@monoscopetech/browser 0.4.4 → 0.5.1

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.
@@ -1 +0,0 @@
1
- {"version":3,"file":"browser.js","sources":["../node_modules/.pnpm/@rrweb+rrweb-plugin-console-record@2.0.0-alpha.18_rrweb@2.0.0-alpha.4/node_modules/@rrweb/rrweb-plugin-console-record/dist/rrweb-plugin-console-record.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/packages/rrweb/src/utils.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/packages/types/dist/types.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/mutation.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/observer.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/cross-origin-iframe-mirror.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/iframe-manager.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/shadow-dom-manager.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/ext/tslib/tslib.es6.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/ext/base64-arraybuffer/dist/base64-arraybuffer.es5.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/observers/canvas/serialize-args.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/observers/canvas/webgl.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__node__WorkerClass.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__node__createBase64WorkerFactory.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__auto__isNodeJS.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/_virtual/image-bitmap-data-url-worker.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/_virtual/_rollup-plugin-web-worker-loader__helper__auto__createBase64WorkerFactory.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/observers/canvas/2d.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/stylesheet-manager.js","../node_modules/.pnpm/rrweb@2.0.0-alpha.4/node_modules/rrweb/es/rrweb/packages/rrweb/src/record/index.js","../src/replay.ts","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/platform/node/globalThis.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/version.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/internal/semver.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/internal/global-utils.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/ComponentLogger.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/types.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/api/diag.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag/internal/logLevelLogger.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/baggage/internal/baggage-impl.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/baggage/internal/symbol.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/baggage/utils.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/context/context.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeter.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/trace_flags.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/propagation/TextMapPropagator.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/context/NoopContextManager.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/api/context.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/invalid-span-constants.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/NonRecordingSpan.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/context-utils.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/spancontext-utils.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/NoopTracer.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracer.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/SamplingResult.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/span_kind.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/status.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/ProxyTracerProvider.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace/NoopTracerProvider.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/context-api.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/diag-api.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/metrics/NoopMeterProvider.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/api/metrics.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/metrics-api.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/propagation/NoopTextMapPropagator.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/baggage/context-helpers.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/api/propagation.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/propagation-api.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/api/trace.js","../node_modules/.pnpm/@opentelemetry+api@1.9.0/node_modules/@opentelemetry/api/build/esm/trace-api.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/trace/suppress-tracing.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/baggage/constants.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/baggage/utils.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/baggage/propagation/W3CBaggagePropagator.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/common/attributes.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/common/global-error-handler.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/common/logging-error-handler.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/platform/node/environment.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/platform/node/globalThis.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/platform/node/performance.js","../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.36.0/node_modules/@opentelemetry/semantic-conventions/build/esm/trace/SemanticAttributes.js","../node_modules/.pnpm/@opentelemetry+semantic-conventions@1.36.0/node_modules/@opentelemetry/semantic-conventions/build/esm/stable_attributes.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/semconv.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/platform/node/sdk-info.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/version.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/common/time.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/ExportResult.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/propagation/composite.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/internal/validators.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/trace/TraceState.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/trace/W3CTraceContextPropagator.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/utils/lodash.merge.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/utils/merge.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/utils/url.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/utils/promise.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/utils/callback.js","../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/utils.js","../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/ResourceImpl.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/Span.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/enums.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/Sampler.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/AlwaysOffSampler.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/AlwaysOnSampler.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/ParentBasedSampler.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/sampler/TraceIdRatioBasedSampler.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/config.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/utility.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/export/BatchSpanProcessorBase.js","../node_modules/.pnpm/@opentelemetry+core@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/core/build/esm/platform/node/timer-util.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/platform/node/export/BatchSpanProcessor.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/platform/node/RandomIdGenerator.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/Tracer.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/MultiSpanProcessor.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-base@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-base/build/esm/BasicTracerProvider.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-web@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-web/build/esm/enums/PerformanceTimingNames.js","../node_modules/.pnpm/@opentelemetry+resources@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/resources/build/esm/platform/node/default-service-name.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-web@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-web/build/esm/StackContextManager.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-web@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-web/build/esm/WebTracerProvider.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-web@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-web/build/esm/utils.js","../node_modules/.pnpm/@opentelemetry+sdk-trace-web@2.0.1_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/sdk-trace-web/build/esm/semconv.js","../node_modules/.pnpm/@opentelemetry+api-logs@0.203.0/node_modules/@opentelemetry/api-logs/build/esm/NoopLogger.js","../node_modules/.pnpm/@opentelemetry+api-logs@0.203.0/node_modules/@opentelemetry/api-logs/build/esm/NoopLoggerProvider.js","../node_modules/.pnpm/@opentelemetry+api-logs@0.203.0/node_modules/@opentelemetry/api-logs/build/esm/ProxyLogger.js","../node_modules/.pnpm/@opentelemetry+api-logs@0.203.0/node_modules/@opentelemetry/api-logs/build/esm/ProxyLoggerProvider.js","../node_modules/.pnpm/@opentelemetry+api-logs@0.203.0/node_modules/@opentelemetry/api-logs/build/esm/platform/node/globalThis.js","../node_modules/.pnpm/@opentelemetry+api-logs@0.203.0/node_modules/@opentelemetry/api-logs/build/esm/internal/global-utils.js","../node_modules/.pnpm/@opentelemetry+api-logs@0.203.0/node_modules/@opentelemetry/api-logs/build/esm/api/logs.js","../node_modules/.pnpm/@opentelemetry+api-logs@0.203.0/node_modules/@opentelemetry/api-logs/build/esm/index.js","../node_modules/.pnpm/@opentelemetry+instrumentation@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/esm/semver.js","../node_modules/.pnpm/@opentelemetry+instrumentation@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/esm/shimmer.js","../node_modules/.pnpm/@opentelemetry+instrumentation@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/esm/instrumentation.js","../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/common.js","../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/index.js","../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/browser.js","../node_modules/.pnpm/debug@4.4.1/node_modules/debug/src/node.js","../node_modules/.pnpm/module-details-from-path@1.0.4/node_modules/module-details-from-path/index.js","../node_modules/.pnpm/resolve@1.22.10/node_modules/resolve/lib/homedir.js","../node_modules/.pnpm/resolve@1.22.10/node_modules/resolve/lib/caller.js","../node_modules/.pnpm/path-parse@1.0.7/node_modules/path-parse/index.js","../node_modules/.pnpm/resolve@1.22.10/node_modules/resolve/lib/node-modules-paths.js","../node_modules/.pnpm/resolve@1.22.10/node_modules/resolve/lib/normalize-options.js","../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js","../node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js","../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js","../node_modules/.pnpm/is-core-module@2.16.1/node_modules/is-core-module/index.js","../node_modules/.pnpm/resolve@1.22.10/node_modules/resolve/lib/async.js","../node_modules/.pnpm/resolve@1.22.10/node_modules/resolve/lib/sync.js","../node_modules/.pnpm/resolve@1.22.10/node_modules/resolve/index.js","../node_modules/.pnpm/resolve@1.22.10/node_modules/resolve/lib/core.js","../node_modules/.pnpm/resolve@1.22.10/node_modules/resolve/lib/is-core.js","../node_modules/.pnpm/require-in-the-middle@7.5.2/node_modules/require-in-the-middle/index.js","../node_modules/.pnpm/@opentelemetry+instrumentation@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/ModuleNameTrie.js","../node_modules/.pnpm/@opentelemetry+instrumentation@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/RequireInTheMiddleSingleton.js","../node_modules/.pnpm/import-in-the-middle@1.14.2/node_modules/import-in-the-middle/lib/register.js","../node_modules/.pnpm/import-in-the-middle@1.14.2/node_modules/import-in-the-middle/index.js","../node_modules/.pnpm/@opentelemetry+instrumentation@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/esm/semconvStability.js","../node_modules/.pnpm/@opentelemetry+instrumentation-document-load@0.48.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-document-load/build/esm/enums/AttributeNames.js","../node_modules/.pnpm/@opentelemetry+instrumentation@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/esm/utils.js","../node_modules/.pnpm/@opentelemetry+instrumentation@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/esm/platform/node/instrumentation.js","../node_modules/.pnpm/@opentelemetry+instrumentation-document-load@0.48.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-document-load/build/esm/enums/EventNames.js","../node_modules/.pnpm/@opentelemetry+instrumentation-document-load@0.48.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-document-load/build/esm/utils.js","../node_modules/.pnpm/@opentelemetry+instrumentation-document-load@0.48.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-document-load/build/esm/instrumentation.js","../node_modules/.pnpm/@opentelemetry+instrumentation-document-load@0.48.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-document-load/build/esm/version.js","../node_modules/.pnpm/@opentelemetry+context-zone-peer-dep@2.0.1_@opentelemetry+api@1.9.0_zone.js@0.15.1/node_modules/@opentelemetry/context-zone-peer-dep/build/esm/ZoneContextManager.js","../node_modules/.pnpm/@opentelemetry+context-zone-peer-dep@2.0.1_@opentelemetry+api@1.9.0_zone.js@0.15.1/node_modules/@opentelemetry/context-zone-peer-dep/build/esm/util.js","../node_modules/.pnpm/zone.js@0.15.1/node_modules/zone.js/fesm2015/zone.js","../node_modules/.pnpm/@opentelemetry+instrumentation-xml-http-request@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-xml-http-request/build/esm/enums/EventNames.js","../node_modules/.pnpm/@opentelemetry+instrumentation-xml-http-request@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-xml-http-request/build/esm/utils.js","../node_modules/.pnpm/@opentelemetry+instrumentation-xml-http-request@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-xml-http-request/build/esm/version.js","../node_modules/.pnpm/@opentelemetry+instrumentation-xml-http-request@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-xml-http-request/build/esm/enums/AttributeNames.js","../node_modules/.pnpm/@opentelemetry+instrumentation-xml-http-request@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-xml-http-request/build/esm/xhr.js","../node_modules/.pnpm/@opentelemetry+instrumentation-xml-http-request@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-xml-http-request/build/esm/semconv.js","../node_modules/.pnpm/@opentelemetry+instrumentation-fetch@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-fetch/build/esm/enums/AttributeNames.js","../node_modules/.pnpm/@opentelemetry+instrumentation-fetch@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-fetch/build/src/semconv.js","../node_modules/.pnpm/@opentelemetry+instrumentation-fetch@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-fetch/build/esm/utils.js","../node_modules/.pnpm/@opentelemetry+instrumentation-fetch@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-fetch/build/esm/version.js","../node_modules/.pnpm/@opentelemetry+instrumentation-fetch@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation-fetch/build/esm/fetch.js","../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/OTLPExporterBase.js","../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/types.js","../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/shared-configuration.js","../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/bounded-queue-export-promise-handler.js","../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/logging-response-handler.js","../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-export-delegate.js","../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-transformer/build/esm/common/hex-to-binary.js","../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-transformer/build/esm/common/utils.js","../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.js","../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js","../node_modules/.pnpm/@opentelemetry+otlp-transformer@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/json/trace.js","../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/transport/http-exporter-transport.js","../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/retrying-transport.js","../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/otlp-http-export-delegate.js","../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/shared-env-configuration.js","../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/otlp-http-configuration.js","../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/otlp-http-env-configuration.js","../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/configuration/convert-legacy-node-http-options.js","../node_modules/.pnpm/@opentelemetry+otlp-exporter-base@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/otlp-exporter-base/build/esm/util.js","../node_modules/.pnpm/@opentelemetry+exporter-trace-otlp-http@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/platform/node/OTLPTraceExporter.js","../src/tracing.ts","../node_modules/.pnpm/@opentelemetry+instrumentation@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/esm/autoLoader.js","../node_modules/.pnpm/@opentelemetry+instrumentation@0.203.0_@opentelemetry+api@1.9.0/node_modules/@opentelemetry/instrumentation/build/esm/autoLoaderUtils.js","../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/stringify.js","../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/rng.js","../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/native.js","../node_modules/.pnpm/uuid@11.1.0/node_modules/uuid/dist/esm-browser/v4.js","../src/index.ts"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar __defProp2 = Object.defineProperty;\nvar __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField2 = (obj, key, value) => __defNormalProp2(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nvar _a;\nvar __defProp$1 = Object.defineProperty;\nvar __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField$1 = (obj, key, value) => __defNormalProp$1(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nconst testableAccessors$1 = {\n Node: [\"childNodes\", \"parentNode\", \"parentElement\", \"textContent\"],\n ShadowRoot: [\"host\", \"styleSheets\"],\n Element: [\"shadowRoot\", \"querySelector\", \"querySelectorAll\"],\n MutationObserver: []\n};\nconst testableMethods$1 = {\n Node: [\"contains\", \"getRootNode\"],\n ShadowRoot: [\"getSelection\"],\n Element: [],\n MutationObserver: [\"constructor\"]\n};\nconst untaintedBasePrototype$1 = {};\nconst isAngularZonePresent$1 = () => {\n return !!globalThis.Zone;\n};\nfunction getUntaintedPrototype$1(key) {\n if (untaintedBasePrototype$1[key])\n return untaintedBasePrototype$1[key];\n const defaultObj = globalThis[key];\n const defaultPrototype = defaultObj.prototype;\n const accessorNames = key in testableAccessors$1 ? testableAccessors$1[key] : void 0;\n const isUntaintedAccessors = Boolean(\n accessorNames && // @ts-expect-error 2345\n accessorNames.every(\n (accessor) => {\n var _a2, _b;\n return Boolean(\n (_b = (_a2 = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a2.get) == null ? void 0 : _b.toString().includes(\"[native code]\")\n );\n }\n )\n );\n const methodNames = key in testableMethods$1 ? testableMethods$1[key] : void 0;\n const isUntaintedMethods = Boolean(\n methodNames && methodNames.every(\n // @ts-expect-error 2345\n (method) => {\n var _a2;\n return typeof defaultPrototype[method] === \"function\" && ((_a2 = defaultPrototype[method]) == null ? void 0 : _a2.toString().includes(\"[native code]\"));\n }\n )\n );\n if (isUntaintedAccessors && isUntaintedMethods && !isAngularZonePresent$1()) {\n untaintedBasePrototype$1[key] = defaultObj.prototype;\n return defaultObj.prototype;\n }\n try {\n const iframeEl = document.createElement(\"iframe\");\n document.body.appendChild(iframeEl);\n const win = iframeEl.contentWindow;\n if (!win) return defaultObj.prototype;\n const untaintedObject = win[key].prototype;\n document.body.removeChild(iframeEl);\n if (!untaintedObject) return defaultPrototype;\n return untaintedBasePrototype$1[key] = untaintedObject;\n } catch {\n return defaultPrototype;\n }\n}\nconst untaintedAccessorCache$1 = {};\nfunction getUntaintedAccessor$1(key, instance, accessor) {\n var _a2;\n const cacheKey = `${key}.${String(accessor)}`;\n if (untaintedAccessorCache$1[cacheKey])\n return untaintedAccessorCache$1[cacheKey].call(\n instance\n );\n const untaintedPrototype = getUntaintedPrototype$1(key);\n const untaintedAccessor = (_a2 = Object.getOwnPropertyDescriptor(\n untaintedPrototype,\n accessor\n )) == null ? void 0 : _a2.get;\n if (!untaintedAccessor) return instance[accessor];\n untaintedAccessorCache$1[cacheKey] = untaintedAccessor;\n return untaintedAccessor.call(instance);\n}\nconst untaintedMethodCache$1 = {};\nfunction getUntaintedMethod$1(key, instance, method) {\n const cacheKey = `${key}.${String(method)}`;\n if (untaintedMethodCache$1[cacheKey])\n return untaintedMethodCache$1[cacheKey].bind(\n instance\n );\n const untaintedPrototype = getUntaintedPrototype$1(key);\n const untaintedMethod = untaintedPrototype[method];\n if (typeof untaintedMethod !== \"function\") return instance[method];\n untaintedMethodCache$1[cacheKey] = untaintedMethod;\n return untaintedMethod.bind(instance);\n}\nfunction childNodes$1(n2) {\n return getUntaintedAccessor$1(\"Node\", n2, \"childNodes\");\n}\nfunction parentNode$1(n2) {\n return getUntaintedAccessor$1(\"Node\", n2, \"parentNode\");\n}\nfunction parentElement$1(n2) {\n return getUntaintedAccessor$1(\"Node\", n2, \"parentElement\");\n}\nfunction textContent$1(n2) {\n return getUntaintedAccessor$1(\"Node\", n2, \"textContent\");\n}\nfunction contains$1(n2, other) {\n return getUntaintedMethod$1(\"Node\", n2, \"contains\")(other);\n}\nfunction getRootNode$1(n2) {\n return getUntaintedMethod$1(\"Node\", n2, \"getRootNode\")();\n}\nfunction host$1(n2) {\n if (!n2 || !(\"host\" in n2)) return null;\n return getUntaintedAccessor$1(\"ShadowRoot\", n2, \"host\");\n}\nfunction styleSheets$1(n2) {\n return n2.styleSheets;\n}\nfunction shadowRoot$1(n2) {\n if (!n2 || !(\"shadowRoot\" in n2)) return null;\n return getUntaintedAccessor$1(\"Element\", n2, \"shadowRoot\");\n}\nfunction querySelector$1(n2, selectors) {\n return getUntaintedAccessor$1(\"Element\", n2, \"querySelector\")(selectors);\n}\nfunction querySelectorAll$1(n2, selectors) {\n return getUntaintedAccessor$1(\"Element\", n2, \"querySelectorAll\")(selectors);\n}\nfunction mutationObserverCtor$1() {\n return getUntaintedPrototype$1(\"MutationObserver\").constructor;\n}\nconst index$1 = {\n childNodes: childNodes$1,\n parentNode: parentNode$1,\n parentElement: parentElement$1,\n textContent: textContent$1,\n contains: contains$1,\n getRootNode: getRootNode$1,\n host: host$1,\n styleSheets: styleSheets$1,\n shadowRoot: shadowRoot$1,\n querySelector: querySelector$1,\n querySelectorAll: querySelectorAll$1,\n mutationObserver: mutationObserverCtor$1\n};\nfunction isShadowRoot(n2) {\n const hostEl = (\n // anchor and textarea elements also have a `host` property\n // but only shadow roots have a `mode` property\n n2 && \"host\" in n2 && \"mode\" in n2 && index$1.host(n2) || null\n );\n return Boolean(\n hostEl && \"shadowRoot\" in hostEl && index$1.shadowRoot(hostEl) === n2\n );\n}\nclass Mirror {\n constructor() {\n __publicField$1(this, \"idNodeMap\", /* @__PURE__ */ new Map());\n __publicField$1(this, \"nodeMetaMap\", /* @__PURE__ */ new WeakMap());\n }\n getId(n2) {\n var _a2;\n if (!n2) return -1;\n const id = (_a2 = this.getMeta(n2)) == null ? void 0 : _a2.id;\n return id ?? -1;\n }\n getNode(id) {\n return this.idNodeMap.get(id) || null;\n }\n getIds() {\n return Array.from(this.idNodeMap.keys());\n }\n getMeta(n2) {\n return this.nodeMetaMap.get(n2) || null;\n }\n // removes the node from idNodeMap\n // doesn't remove the node from nodeMetaMap\n removeNodeFromMap(n2) {\n const id = this.getId(n2);\n this.idNodeMap.delete(id);\n if (n2.childNodes) {\n n2.childNodes.forEach(\n (childNode) => this.removeNodeFromMap(childNode)\n );\n }\n }\n has(id) {\n return this.idNodeMap.has(id);\n }\n hasNode(node2) {\n return this.nodeMetaMap.has(node2);\n }\n add(n2, meta) {\n const id = meta.id;\n this.idNodeMap.set(id, n2);\n this.nodeMetaMap.set(n2, meta);\n }\n replace(id, n2) {\n const oldNode = this.getNode(id);\n if (oldNode) {\n const meta = this.nodeMetaMap.get(oldNode);\n if (meta) this.nodeMetaMap.set(n2, meta);\n }\n this.idNodeMap.set(id, n2);\n }\n reset() {\n this.idNodeMap = /* @__PURE__ */ new Map();\n this.nodeMetaMap = /* @__PURE__ */ new WeakMap();\n }\n}\nfunction createMirror$2() {\n return new Mirror();\n}\nconst IGNORED_NODE = -2;\nfunction classMatchesRegex(node2, regex, checkAncestors) {\n if (!node2) return false;\n if (node2.nodeType !== node2.ELEMENT_NODE) {\n if (!checkAncestors) return false;\n return classMatchesRegex(index$1.parentNode(node2), regex, checkAncestors);\n }\n for (let eIndex = node2.classList.length; eIndex--; ) {\n const className = node2.classList[eIndex];\n if (regex.test(className)) {\n return true;\n }\n }\n if (!checkAncestors) return false;\n return classMatchesRegex(index$1.parentNode(node2), regex, checkAncestors);\n}\nfunction getDefaultExportFromCjs$1(x2) {\n return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, \"default\") ? x2[\"default\"] : x2;\n}\nfunction getAugmentedNamespace$1(n2) {\n if (n2.__esModule) return n2;\n var f2 = n2.default;\n if (typeof f2 == \"function\") {\n var a2 = function a22() {\n if (this instanceof a22) {\n return Reflect.construct(f2, arguments, this.constructor);\n }\n return f2.apply(this, arguments);\n };\n a2.prototype = f2.prototype;\n } else a2 = {};\n Object.defineProperty(a2, \"__esModule\", { value: true });\n Object.keys(n2).forEach(function(k) {\n var d = Object.getOwnPropertyDescriptor(n2, k);\n Object.defineProperty(a2, k, d.get ? d : {\n enumerable: true,\n get: function() {\n return n2[k];\n }\n });\n });\n return a2;\n}\nvar picocolors_browser$1 = { exports: {} };\nvar x$1 = String;\nvar create$1 = function() {\n return { isColorSupported: false, reset: x$1, bold: x$1, dim: x$1, italic: x$1, underline: x$1, inverse: x$1, hidden: x$1, strikethrough: x$1, black: x$1, red: x$1, green: x$1, yellow: x$1, blue: x$1, magenta: x$1, cyan: x$1, white: x$1, gray: x$1, bgBlack: x$1, bgRed: x$1, bgGreen: x$1, bgYellow: x$1, bgBlue: x$1, bgMagenta: x$1, bgCyan: x$1, bgWhite: x$1 };\n};\npicocolors_browser$1.exports = create$1();\npicocolors_browser$1.exports.createColors = create$1;\nvar picocolors_browserExports$1 = picocolors_browser$1.exports;\nconst __viteBrowserExternal$2 = {};\nconst __viteBrowserExternal$1$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__: null,\n default: __viteBrowserExternal$2\n}, Symbol.toStringTag, { value: \"Module\" }));\nconst require$$2$1 = /* @__PURE__ */ getAugmentedNamespace$1(__viteBrowserExternal$1$1);\nlet pico$1 = picocolors_browserExports$1;\nlet terminalHighlight$1$1 = require$$2$1;\nlet CssSyntaxError$3$1 = class CssSyntaxError extends Error {\n constructor(message, line, column, source, file, plugin22) {\n super(message);\n this.name = \"CssSyntaxError\";\n this.reason = message;\n if (file) {\n this.file = file;\n }\n if (source) {\n this.source = source;\n }\n if (plugin22) {\n this.plugin = plugin22;\n }\n if (typeof line !== \"undefined\" && typeof column !== \"undefined\") {\n if (typeof line === \"number\") {\n this.line = line;\n this.column = column;\n } else {\n this.line = line.line;\n this.column = line.column;\n this.endLine = column.line;\n this.endColumn = column.column;\n }\n }\n this.setMessage();\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, CssSyntaxError);\n }\n }\n setMessage() {\n this.message = this.plugin ? this.plugin + \": \" : \"\";\n this.message += this.file ? this.file : \"<css input>\";\n if (typeof this.line !== \"undefined\") {\n this.message += \":\" + this.line + \":\" + this.column;\n }\n this.message += \": \" + this.reason;\n }\n showSourceCode(color) {\n if (!this.source) return \"\";\n let css = this.source;\n if (color == null) color = pico$1.isColorSupported;\n if (terminalHighlight$1$1) {\n if (color) css = terminalHighlight$1$1(css);\n }\n let lines = css.split(/\\r?\\n/);\n let start = Math.max(this.line - 3, 0);\n let end = Math.min(this.line + 2, lines.length);\n let maxWidth = String(end).length;\n let mark, aside;\n if (color) {\n let { bold, gray, red } = pico$1.createColors(true);\n mark = (text) => bold(red(text));\n aside = (text) => gray(text);\n } else {\n mark = aside = (str) => str;\n }\n return lines.slice(start, end).map((line, index2) => {\n let number = start + 1 + index2;\n let gutter = \" \" + (\" \" + number).slice(-maxWidth) + \" | \";\n if (number === this.line) {\n let spacing = aside(gutter.replace(/\\d/g, \" \")) + line.slice(0, this.column - 1).replace(/[^\\t]/g, \" \");\n return mark(\">\") + aside(gutter) + line + \"\\n \" + spacing + mark(\"^\");\n }\n return \" \" + aside(gutter) + line;\n }).join(\"\\n\");\n }\n toString() {\n let code = this.showSourceCode();\n if (code) {\n code = \"\\n\\n\" + code + \"\\n\";\n }\n return this.name + \": \" + this.message + code;\n }\n};\nvar cssSyntaxError$1 = CssSyntaxError$3$1;\nCssSyntaxError$3$1.default = CssSyntaxError$3$1;\nvar symbols$1 = {};\nsymbols$1.isClean = Symbol(\"isClean\");\nsymbols$1.my = Symbol(\"my\");\nconst DEFAULT_RAW$1 = {\n after: \"\\n\",\n beforeClose: \"\\n\",\n beforeComment: \"\\n\",\n beforeDecl: \"\\n\",\n beforeOpen: \" \",\n beforeRule: \"\\n\",\n colon: \": \",\n commentLeft: \" \",\n commentRight: \" \",\n emptyBody: \"\",\n indent: \" \",\n semicolon: false\n};\nfunction capitalize$1(str) {\n return str[0].toUpperCase() + str.slice(1);\n}\nlet Stringifier$2$1 = class Stringifier {\n constructor(builder) {\n this.builder = builder;\n }\n atrule(node2, semicolon) {\n let name = \"@\" + node2.name;\n let params = node2.params ? this.rawValue(node2, \"params\") : \"\";\n if (typeof node2.raws.afterName !== \"undefined\") {\n name += node2.raws.afterName;\n } else if (params) {\n name += \" \";\n }\n if (node2.nodes) {\n this.block(node2, name + params);\n } else {\n let end = (node2.raws.between || \"\") + (semicolon ? \";\" : \"\");\n this.builder(name + params + end, node2);\n }\n }\n beforeAfter(node2, detect) {\n let value;\n if (node2.type === \"decl\") {\n value = this.raw(node2, null, \"beforeDecl\");\n } else if (node2.type === \"comment\") {\n value = this.raw(node2, null, \"beforeComment\");\n } else if (detect === \"before\") {\n value = this.raw(node2, null, \"beforeRule\");\n } else {\n value = this.raw(node2, null, \"beforeClose\");\n }\n let buf = node2.parent;\n let depth = 0;\n while (buf && buf.type !== \"root\") {\n depth += 1;\n buf = buf.parent;\n }\n if (value.includes(\"\\n\")) {\n let indent = this.raw(node2, null, \"indent\");\n if (indent.length) {\n for (let step = 0; step < depth; step++) value += indent;\n }\n }\n return value;\n }\n block(node2, start) {\n let between = this.raw(node2, \"between\", \"beforeOpen\");\n this.builder(start + between + \"{\", node2, \"start\");\n let after;\n if (node2.nodes && node2.nodes.length) {\n this.body(node2);\n after = this.raw(node2, \"after\");\n } else {\n after = this.raw(node2, \"after\", \"emptyBody\");\n }\n if (after) this.builder(after);\n this.builder(\"}\", node2, \"end\");\n }\n body(node2) {\n let last = node2.nodes.length - 1;\n while (last > 0) {\n if (node2.nodes[last].type !== \"comment\") break;\n last -= 1;\n }\n let semicolon = this.raw(node2, \"semicolon\");\n for (let i2 = 0; i2 < node2.nodes.length; i2++) {\n let child = node2.nodes[i2];\n let before = this.raw(child, \"before\");\n if (before) this.builder(before);\n this.stringify(child, last !== i2 || semicolon);\n }\n }\n comment(node2) {\n let left = this.raw(node2, \"left\", \"commentLeft\");\n let right = this.raw(node2, \"right\", \"commentRight\");\n this.builder(\"/*\" + left + node2.text + right + \"*/\", node2);\n }\n decl(node2, semicolon) {\n let between = this.raw(node2, \"between\", \"colon\");\n let string = node2.prop + between + this.rawValue(node2, \"value\");\n if (node2.important) {\n string += node2.raws.important || \" !important\";\n }\n if (semicolon) string += \";\";\n this.builder(string, node2);\n }\n document(node2) {\n this.body(node2);\n }\n raw(node2, own, detect) {\n let value;\n if (!detect) detect = own;\n if (own) {\n value = node2.raws[own];\n if (typeof value !== \"undefined\") return value;\n }\n let parent = node2.parent;\n if (detect === \"before\") {\n if (!parent || parent.type === \"root\" && parent.first === node2) {\n return \"\";\n }\n if (parent && parent.type === \"document\") {\n return \"\";\n }\n }\n if (!parent) return DEFAULT_RAW$1[detect];\n let root2 = node2.root();\n if (!root2.rawCache) root2.rawCache = {};\n if (typeof root2.rawCache[detect] !== \"undefined\") {\n return root2.rawCache[detect];\n }\n if (detect === \"before\" || detect === \"after\") {\n return this.beforeAfter(node2, detect);\n } else {\n let method = \"raw\" + capitalize$1(detect);\n if (this[method]) {\n value = this[method](root2, node2);\n } else {\n root2.walk((i2) => {\n value = i2.raws[own];\n if (typeof value !== \"undefined\") return false;\n });\n }\n }\n if (typeof value === \"undefined\") value = DEFAULT_RAW$1[detect];\n root2.rawCache[detect] = value;\n return value;\n }\n rawBeforeClose(root2) {\n let value;\n root2.walk((i2) => {\n if (i2.nodes && i2.nodes.length > 0) {\n if (typeof i2.raws.after !== \"undefined\") {\n value = i2.raws.after;\n if (value.includes(\"\\n\")) {\n value = value.replace(/[^\\n]+$/, \"\");\n }\n return false;\n }\n }\n });\n if (value) value = value.replace(/\\S/g, \"\");\n return value;\n }\n rawBeforeComment(root2, node2) {\n let value;\n root2.walkComments((i2) => {\n if (typeof i2.raws.before !== \"undefined\") {\n value = i2.raws.before;\n if (value.includes(\"\\n\")) {\n value = value.replace(/[^\\n]+$/, \"\");\n }\n return false;\n }\n });\n if (typeof value === \"undefined\") {\n value = this.raw(node2, null, \"beforeDecl\");\n } else if (value) {\n value = value.replace(/\\S/g, \"\");\n }\n return value;\n }\n rawBeforeDecl(root2, node2) {\n let value;\n root2.walkDecls((i2) => {\n if (typeof i2.raws.before !== \"undefined\") {\n value = i2.raws.before;\n if (value.includes(\"\\n\")) {\n value = value.replace(/[^\\n]+$/, \"\");\n }\n return false;\n }\n });\n if (typeof value === \"undefined\") {\n value = this.raw(node2, null, \"beforeRule\");\n } else if (value) {\n value = value.replace(/\\S/g, \"\");\n }\n return value;\n }\n rawBeforeOpen(root2) {\n let value;\n root2.walk((i2) => {\n if (i2.type !== \"decl\") {\n value = i2.raws.between;\n if (typeof value !== \"undefined\") return false;\n }\n });\n return value;\n }\n rawBeforeRule(root2) {\n let value;\n root2.walk((i2) => {\n if (i2.nodes && (i2.parent !== root2 || root2.first !== i2)) {\n if (typeof i2.raws.before !== \"undefined\") {\n value = i2.raws.before;\n if (value.includes(\"\\n\")) {\n value = value.replace(/[^\\n]+$/, \"\");\n }\n return false;\n }\n }\n });\n if (value) value = value.replace(/\\S/g, \"\");\n return value;\n }\n rawColon(root2) {\n let value;\n root2.walkDecls((i2) => {\n if (typeof i2.raws.between !== \"undefined\") {\n value = i2.raws.between.replace(/[^\\s:]/g, \"\");\n return false;\n }\n });\n return value;\n }\n rawEmptyBody(root2) {\n let value;\n root2.walk((i2) => {\n if (i2.nodes && i2.nodes.length === 0) {\n value = i2.raws.after;\n if (typeof value !== \"undefined\") return false;\n }\n });\n return value;\n }\n rawIndent(root2) {\n if (root2.raws.indent) return root2.raws.indent;\n let value;\n root2.walk((i2) => {\n let p = i2.parent;\n if (p && p !== root2 && p.parent && p.parent === root2) {\n if (typeof i2.raws.before !== \"undefined\") {\n let parts = i2.raws.before.split(\"\\n\");\n value = parts[parts.length - 1];\n value = value.replace(/\\S/g, \"\");\n return false;\n }\n }\n });\n return value;\n }\n rawSemicolon(root2) {\n let value;\n root2.walk((i2) => {\n if (i2.nodes && i2.nodes.length && i2.last.type === \"decl\") {\n value = i2.raws.semicolon;\n if (typeof value !== \"undefined\") return false;\n }\n });\n return value;\n }\n rawValue(node2, prop) {\n let value = node2[prop];\n let raw = node2.raws[prop];\n if (raw && raw.value === value) {\n return raw.raw;\n }\n return value;\n }\n root(node2) {\n this.body(node2);\n if (node2.raws.after) this.builder(node2.raws.after);\n }\n rule(node2) {\n this.block(node2, this.rawValue(node2, \"selector\"));\n if (node2.raws.ownSemicolon) {\n this.builder(node2.raws.ownSemicolon, node2, \"end\");\n }\n }\n stringify(node2, semicolon) {\n if (!this[node2.type]) {\n throw new Error(\n \"Unknown AST node type \" + node2.type + \". Maybe you need to change PostCSS stringifier.\"\n );\n }\n this[node2.type](node2, semicolon);\n }\n};\nvar stringifier$1 = Stringifier$2$1;\nStringifier$2$1.default = Stringifier$2$1;\nlet Stringifier$1$1 = stringifier$1;\nfunction stringify$4$1(node2, builder) {\n let str = new Stringifier$1$1(builder);\n str.stringify(node2);\n}\nvar stringify_1$1 = stringify$4$1;\nstringify$4$1.default = stringify$4$1;\nlet { isClean: isClean$2$1, my: my$2$1 } = symbols$1;\nlet CssSyntaxError$2$1 = cssSyntaxError$1;\nlet Stringifier2$1 = stringifier$1;\nlet stringify$3$1 = stringify_1$1;\nfunction cloneNode$1(obj, parent) {\n let cloned = new obj.constructor();\n for (let i2 in obj) {\n if (!Object.prototype.hasOwnProperty.call(obj, i2)) {\n continue;\n }\n if (i2 === \"proxyCache\") continue;\n let value = obj[i2];\n let type = typeof value;\n if (i2 === \"parent\" && type === \"object\") {\n if (parent) cloned[i2] = parent;\n } else if (i2 === \"source\") {\n cloned[i2] = value;\n } else if (Array.isArray(value)) {\n cloned[i2] = value.map((j) => cloneNode$1(j, cloned));\n } else {\n if (type === \"object\" && value !== null) value = cloneNode$1(value);\n cloned[i2] = value;\n }\n }\n return cloned;\n}\nlet Node$4$1 = class Node2 {\n constructor(defaults = {}) {\n this.raws = {};\n this[isClean$2$1] = false;\n this[my$2$1] = true;\n for (let name in defaults) {\n if (name === \"nodes\") {\n this.nodes = [];\n for (let node2 of defaults[name]) {\n if (typeof node2.clone === \"function\") {\n this.append(node2.clone());\n } else {\n this.append(node2);\n }\n }\n } else {\n this[name] = defaults[name];\n }\n }\n }\n addToError(error) {\n error.postcssNode = this;\n if (error.stack && this.source && /\\n\\s{4}at /.test(error.stack)) {\n let s2 = this.source;\n error.stack = error.stack.replace(\n /\\n\\s{4}at /,\n `$&${s2.input.from}:${s2.start.line}:${s2.start.column}$&`\n );\n }\n return error;\n }\n after(add) {\n this.parent.insertAfter(this, add);\n return this;\n }\n assign(overrides = {}) {\n for (let name in overrides) {\n this[name] = overrides[name];\n }\n return this;\n }\n before(add) {\n this.parent.insertBefore(this, add);\n return this;\n }\n cleanRaws(keepBetween) {\n delete this.raws.before;\n delete this.raws.after;\n if (!keepBetween) delete this.raws.between;\n }\n clone(overrides = {}) {\n let cloned = cloneNode$1(this);\n for (let name in overrides) {\n cloned[name] = overrides[name];\n }\n return cloned;\n }\n cloneAfter(overrides = {}) {\n let cloned = this.clone(overrides);\n this.parent.insertAfter(this, cloned);\n return cloned;\n }\n cloneBefore(overrides = {}) {\n let cloned = this.clone(overrides);\n this.parent.insertBefore(this, cloned);\n return cloned;\n }\n error(message, opts = {}) {\n if (this.source) {\n let { end, start } = this.rangeBy(opts);\n return this.source.input.error(\n message,\n { column: start.column, line: start.line },\n { column: end.column, line: end.line },\n opts\n );\n }\n return new CssSyntaxError$2$1(message);\n }\n getProxyProcessor() {\n return {\n get(node2, prop) {\n if (prop === \"proxyOf\") {\n return node2;\n } else if (prop === \"root\") {\n return () => node2.root().toProxy();\n } else {\n return node2[prop];\n }\n },\n set(node2, prop, value) {\n if (node2[prop] === value) return true;\n node2[prop] = value;\n if (prop === \"prop\" || prop === \"value\" || prop === \"name\" || prop === \"params\" || prop === \"important\" || /* c8 ignore next */\n prop === \"text\") {\n node2.markDirty();\n }\n return true;\n }\n };\n }\n markDirty() {\n if (this[isClean$2$1]) {\n this[isClean$2$1] = false;\n let next = this;\n while (next = next.parent) {\n next[isClean$2$1] = false;\n }\n }\n }\n next() {\n if (!this.parent) return void 0;\n let index2 = this.parent.index(this);\n return this.parent.nodes[index2 + 1];\n }\n positionBy(opts, stringRepresentation) {\n let pos = this.source.start;\n if (opts.index) {\n pos = this.positionInside(opts.index, stringRepresentation);\n } else if (opts.word) {\n stringRepresentation = this.toString();\n let index2 = stringRepresentation.indexOf(opts.word);\n if (index2 !== -1) pos = this.positionInside(index2, stringRepresentation);\n }\n return pos;\n }\n positionInside(index2, stringRepresentation) {\n let string = stringRepresentation || this.toString();\n let column = this.source.start.column;\n let line = this.source.start.line;\n for (let i2 = 0; i2 < index2; i2++) {\n if (string[i2] === \"\\n\") {\n column = 1;\n line += 1;\n } else {\n column += 1;\n }\n }\n return { column, line };\n }\n prev() {\n if (!this.parent) return void 0;\n let index2 = this.parent.index(this);\n return this.parent.nodes[index2 - 1];\n }\n rangeBy(opts) {\n let start = {\n column: this.source.start.column,\n line: this.source.start.line\n };\n let end = this.source.end ? {\n column: this.source.end.column + 1,\n line: this.source.end.line\n } : {\n column: start.column + 1,\n line: start.line\n };\n if (opts.word) {\n let stringRepresentation = this.toString();\n let index2 = stringRepresentation.indexOf(opts.word);\n if (index2 !== -1) {\n start = this.positionInside(index2, stringRepresentation);\n end = this.positionInside(index2 + opts.word.length, stringRepresentation);\n }\n } else {\n if (opts.start) {\n start = {\n column: opts.start.column,\n line: opts.start.line\n };\n } else if (opts.index) {\n start = this.positionInside(opts.index);\n }\n if (opts.end) {\n end = {\n column: opts.end.column,\n line: opts.end.line\n };\n } else if (typeof opts.endIndex === \"number\") {\n end = this.positionInside(opts.endIndex);\n } else if (opts.index) {\n end = this.positionInside(opts.index + 1);\n }\n }\n if (end.line < start.line || end.line === start.line && end.column <= start.column) {\n end = { column: start.column + 1, line: start.line };\n }\n return { end, start };\n }\n raw(prop, defaultType) {\n let str = new Stringifier2$1();\n return str.raw(this, prop, defaultType);\n }\n remove() {\n if (this.parent) {\n this.parent.removeChild(this);\n }\n this.parent = void 0;\n return this;\n }\n replaceWith(...nodes) {\n if (this.parent) {\n let bookmark = this;\n let foundSelf = false;\n for (let node2 of nodes) {\n if (node2 === this) {\n foundSelf = true;\n } else if (foundSelf) {\n this.parent.insertAfter(bookmark, node2);\n bookmark = node2;\n } else {\n this.parent.insertBefore(bookmark, node2);\n }\n }\n if (!foundSelf) {\n this.remove();\n }\n }\n return this;\n }\n root() {\n let result2 = this;\n while (result2.parent && result2.parent.type !== \"document\") {\n result2 = result2.parent;\n }\n return result2;\n }\n toJSON(_, inputs) {\n let fixed = {};\n let emitInputs = inputs == null;\n inputs = inputs || /* @__PURE__ */ new Map();\n let inputsNextIndex = 0;\n for (let name in this) {\n if (!Object.prototype.hasOwnProperty.call(this, name)) {\n continue;\n }\n if (name === \"parent\" || name === \"proxyCache\") continue;\n let value = this[name];\n if (Array.isArray(value)) {\n fixed[name] = value.map((i2) => {\n if (typeof i2 === \"object\" && i2.toJSON) {\n return i2.toJSON(null, inputs);\n } else {\n return i2;\n }\n });\n } else if (typeof value === \"object\" && value.toJSON) {\n fixed[name] = value.toJSON(null, inputs);\n } else if (name === \"source\") {\n let inputId = inputs.get(value.input);\n if (inputId == null) {\n inputId = inputsNextIndex;\n inputs.set(value.input, inputsNextIndex);\n inputsNextIndex++;\n }\n fixed[name] = {\n end: value.end,\n inputId,\n start: value.start\n };\n } else {\n fixed[name] = value;\n }\n }\n if (emitInputs) {\n fixed.inputs = [...inputs.keys()].map((input2) => input2.toJSON());\n }\n return fixed;\n }\n toProxy() {\n if (!this.proxyCache) {\n this.proxyCache = new Proxy(this, this.getProxyProcessor());\n }\n return this.proxyCache;\n }\n toString(stringifier2 = stringify$3$1) {\n if (stringifier2.stringify) stringifier2 = stringifier2.stringify;\n let result2 = \"\";\n stringifier2(this, (i2) => {\n result2 += i2;\n });\n return result2;\n }\n warn(result2, text, opts) {\n let data = { node: this };\n for (let i2 in opts) data[i2] = opts[i2];\n return result2.warn(text, data);\n }\n get proxyOf() {\n return this;\n }\n};\nvar node$1 = Node$4$1;\nNode$4$1.default = Node$4$1;\nlet Node$3$1 = node$1;\nlet Declaration$4$1 = class Declaration extends Node$3$1 {\n constructor(defaults) {\n if (defaults && typeof defaults.value !== \"undefined\" && typeof defaults.value !== \"string\") {\n defaults = { ...defaults, value: String(defaults.value) };\n }\n super(defaults);\n this.type = \"decl\";\n }\n get variable() {\n return this.prop.startsWith(\"--\") || this.prop[0] === \"$\";\n }\n};\nvar declaration$1 = Declaration$4$1;\nDeclaration$4$1.default = Declaration$4$1;\nlet urlAlphabet$1 = \"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\";\nlet customAlphabet$1 = (alphabet, defaultSize = 21) => {\n return (size = defaultSize) => {\n let id = \"\";\n let i2 = size;\n while (i2--) {\n id += alphabet[Math.random() * alphabet.length | 0];\n }\n return id;\n };\n};\nlet nanoid$1$1 = (size = 21) => {\n let id = \"\";\n let i2 = size;\n while (i2--) {\n id += urlAlphabet$1[Math.random() * 64 | 0];\n }\n return id;\n};\nvar nonSecure$1 = { nanoid: nanoid$1$1, customAlphabet: customAlphabet$1 };\nlet { SourceMapConsumer: SourceMapConsumer$2$1, SourceMapGenerator: SourceMapGenerator$2$1 } = require$$2$1;\nlet { existsSync: existsSync$1, readFileSync: readFileSync$1 } = require$$2$1;\nlet { dirname: dirname$1$1, join: join$1 } = require$$2$1;\nfunction fromBase64$1(str) {\n if (Buffer) {\n return Buffer.from(str, \"base64\").toString();\n } else {\n return window.atob(str);\n }\n}\nlet PreviousMap$2$1 = class PreviousMap {\n constructor(css, opts) {\n if (opts.map === false) return;\n this.loadAnnotation(css);\n this.inline = this.startWith(this.annotation, \"data:\");\n let prev = opts.map ? opts.map.prev : void 0;\n let text = this.loadMap(opts.from, prev);\n if (!this.mapFile && opts.from) {\n this.mapFile = opts.from;\n }\n if (this.mapFile) this.root = dirname$1$1(this.mapFile);\n if (text) this.text = text;\n }\n consumer() {\n if (!this.consumerCache) {\n this.consumerCache = new SourceMapConsumer$2$1(this.text);\n }\n return this.consumerCache;\n }\n decodeInline(text) {\n let baseCharsetUri = /^data:application\\/json;charset=utf-?8;base64,/;\n let baseUri = /^data:application\\/json;base64,/;\n let charsetUri = /^data:application\\/json;charset=utf-?8,/;\n let uri = /^data:application\\/json,/;\n if (charsetUri.test(text) || uri.test(text)) {\n return decodeURIComponent(text.substr(RegExp.lastMatch.length));\n }\n if (baseCharsetUri.test(text) || baseUri.test(text)) {\n return fromBase64$1(text.substr(RegExp.lastMatch.length));\n }\n let encoding = text.match(/data:application\\/json;([^,]+),/)[1];\n throw new Error(\"Unsupported source map encoding \" + encoding);\n }\n getAnnotationURL(sourceMapString) {\n return sourceMapString.replace(/^\\/\\*\\s*# sourceMappingURL=/, \"\").trim();\n }\n isMap(map) {\n if (typeof map !== \"object\") return false;\n return typeof map.mappings === \"string\" || typeof map._mappings === \"string\" || Array.isArray(map.sections);\n }\n loadAnnotation(css) {\n let comments = css.match(/\\/\\*\\s*# sourceMappingURL=/gm);\n if (!comments) return;\n let start = css.lastIndexOf(comments.pop());\n let end = css.indexOf(\"*/\", start);\n if (start > -1 && end > -1) {\n this.annotation = this.getAnnotationURL(css.substring(start, end));\n }\n }\n loadFile(path) {\n this.root = dirname$1$1(path);\n if (existsSync$1(path)) {\n this.mapFile = path;\n return readFileSync$1(path, \"utf-8\").toString().trim();\n }\n }\n loadMap(file, prev) {\n if (prev === false) return false;\n if (prev) {\n if (typeof prev === \"string\") {\n return prev;\n } else if (typeof prev === \"function\") {\n let prevPath = prev(file);\n if (prevPath) {\n let map = this.loadFile(prevPath);\n if (!map) {\n throw new Error(\n \"Unable to load previous source map: \" + prevPath.toString()\n );\n }\n return map;\n }\n } else if (prev instanceof SourceMapConsumer$2$1) {\n return SourceMapGenerator$2$1.fromSourceMap(prev).toString();\n } else if (prev instanceof SourceMapGenerator$2$1) {\n return prev.toString();\n } else if (this.isMap(prev)) {\n return JSON.stringify(prev);\n } else {\n throw new Error(\n \"Unsupported previous source map format: \" + prev.toString()\n );\n }\n } else if (this.inline) {\n return this.decodeInline(this.annotation);\n } else if (this.annotation) {\n let map = this.annotation;\n if (file) map = join$1(dirname$1$1(file), map);\n return this.loadFile(map);\n }\n }\n startWith(string, start) {\n if (!string) return false;\n return string.substr(0, start.length) === start;\n }\n withContent() {\n return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);\n }\n};\nvar previousMap$1 = PreviousMap$2$1;\nPreviousMap$2$1.default = PreviousMap$2$1;\nlet { SourceMapConsumer: SourceMapConsumer$1$1, SourceMapGenerator: SourceMapGenerator$1$1 } = require$$2$1;\nlet { fileURLToPath: fileURLToPath$1, pathToFileURL: pathToFileURL$1$1 } = require$$2$1;\nlet { isAbsolute: isAbsolute$1, resolve: resolve$1$1 } = require$$2$1;\nlet { nanoid: nanoid$2 } = nonSecure$1;\nlet terminalHighlight$2 = require$$2$1;\nlet CssSyntaxError$1$1 = cssSyntaxError$1;\nlet PreviousMap$1$1 = previousMap$1;\nlet fromOffsetCache$1 = Symbol(\"fromOffsetCache\");\nlet sourceMapAvailable$1$1 = Boolean(SourceMapConsumer$1$1 && SourceMapGenerator$1$1);\nlet pathAvailable$1$1 = Boolean(resolve$1$1 && isAbsolute$1);\nlet Input$4$1 = class Input {\n constructor(css, opts = {}) {\n if (css === null || typeof css === \"undefined\" || typeof css === \"object\" && !css.toString) {\n throw new Error(`PostCSS received ${css} instead of CSS string`);\n }\n this.css = css.toString();\n if (this.css[0] === \"\\uFEFF\" || this.css[0] === \"￾\") {\n this.hasBOM = true;\n this.css = this.css.slice(1);\n } else {\n this.hasBOM = false;\n }\n if (opts.from) {\n if (!pathAvailable$1$1 || /^\\w+:\\/\\//.test(opts.from) || isAbsolute$1(opts.from)) {\n this.file = opts.from;\n } else {\n this.file = resolve$1$1(opts.from);\n }\n }\n if (pathAvailable$1$1 && sourceMapAvailable$1$1) {\n let map = new PreviousMap$1$1(this.css, opts);\n if (map.text) {\n this.map = map;\n let file = map.consumer().file;\n if (!this.file && file) this.file = this.mapResolve(file);\n }\n }\n if (!this.file) {\n this.id = \"<input css \" + nanoid$2(6) + \">\";\n }\n if (this.map) this.map.file = this.from;\n }\n error(message, line, column, opts = {}) {\n let result2, endLine, endColumn;\n if (line && typeof line === \"object\") {\n let start = line;\n let end = column;\n if (typeof start.offset === \"number\") {\n let pos = this.fromOffset(start.offset);\n line = pos.line;\n column = pos.col;\n } else {\n line = start.line;\n column = start.column;\n }\n if (typeof end.offset === \"number\") {\n let pos = this.fromOffset(end.offset);\n endLine = pos.line;\n endColumn = pos.col;\n } else {\n endLine = end.line;\n endColumn = end.column;\n }\n } else if (!column) {\n let pos = this.fromOffset(line);\n line = pos.line;\n column = pos.col;\n }\n let origin = this.origin(line, column, endLine, endColumn);\n if (origin) {\n result2 = new CssSyntaxError$1$1(\n message,\n origin.endLine === void 0 ? origin.line : { column: origin.column, line: origin.line },\n origin.endLine === void 0 ? origin.column : { column: origin.endColumn, line: origin.endLine },\n origin.source,\n origin.file,\n opts.plugin\n );\n } else {\n result2 = new CssSyntaxError$1$1(\n message,\n endLine === void 0 ? line : { column, line },\n endLine === void 0 ? column : { column: endColumn, line: endLine },\n this.css,\n this.file,\n opts.plugin\n );\n }\n result2.input = { column, endColumn, endLine, line, source: this.css };\n if (this.file) {\n if (pathToFileURL$1$1) {\n result2.input.url = pathToFileURL$1$1(this.file).toString();\n }\n result2.input.file = this.file;\n }\n return result2;\n }\n fromOffset(offset) {\n let lastLine, lineToIndex;\n if (!this[fromOffsetCache$1]) {\n let lines = this.css.split(\"\\n\");\n lineToIndex = new Array(lines.length);\n let prevIndex = 0;\n for (let i2 = 0, l2 = lines.length; i2 < l2; i2++) {\n lineToIndex[i2] = prevIndex;\n prevIndex += lines[i2].length + 1;\n }\n this[fromOffsetCache$1] = lineToIndex;\n } else {\n lineToIndex = this[fromOffsetCache$1];\n }\n lastLine = lineToIndex[lineToIndex.length - 1];\n let min = 0;\n if (offset >= lastLine) {\n min = lineToIndex.length - 1;\n } else {\n let max = lineToIndex.length - 2;\n let mid;\n while (min < max) {\n mid = min + (max - min >> 1);\n if (offset < lineToIndex[mid]) {\n max = mid - 1;\n } else if (offset >= lineToIndex[mid + 1]) {\n min = mid + 1;\n } else {\n min = mid;\n break;\n }\n }\n }\n return {\n col: offset - lineToIndex[min] + 1,\n line: min + 1\n };\n }\n mapResolve(file) {\n if (/^\\w+:\\/\\//.test(file)) {\n return file;\n }\n return resolve$1$1(this.map.consumer().sourceRoot || this.map.root || \".\", file);\n }\n origin(line, column, endLine, endColumn) {\n if (!this.map) return false;\n let consumer = this.map.consumer();\n let from = consumer.originalPositionFor({ column, line });\n if (!from.source) return false;\n let to;\n if (typeof endLine === \"number\") {\n to = consumer.originalPositionFor({ column: endColumn, line: endLine });\n }\n let fromUrl;\n if (isAbsolute$1(from.source)) {\n fromUrl = pathToFileURL$1$1(from.source);\n } else {\n fromUrl = new URL(\n from.source,\n this.map.consumer().sourceRoot || pathToFileURL$1$1(this.map.mapFile)\n );\n }\n let result2 = {\n column: from.column,\n endColumn: to && to.column,\n endLine: to && to.line,\n line: from.line,\n url: fromUrl.toString()\n };\n if (fromUrl.protocol === \"file:\") {\n if (fileURLToPath$1) {\n result2.file = fileURLToPath$1(fromUrl);\n } else {\n throw new Error(`file: protocol is not available in this PostCSS build`);\n }\n }\n let source = consumer.sourceContentFor(from.source);\n if (source) result2.source = source;\n return result2;\n }\n toJSON() {\n let json = {};\n for (let name of [\"hasBOM\", \"css\", \"file\", \"id\"]) {\n if (this[name] != null) {\n json[name] = this[name];\n }\n }\n if (this.map) {\n json.map = { ...this.map };\n if (json.map.consumerCache) {\n json.map.consumerCache = void 0;\n }\n }\n return json;\n }\n get from() {\n return this.file || this.id;\n }\n};\nvar input$1 = Input$4$1;\nInput$4$1.default = Input$4$1;\nif (terminalHighlight$2 && terminalHighlight$2.registerInput) {\n terminalHighlight$2.registerInput(Input$4$1);\n}\nlet { SourceMapConsumer: SourceMapConsumer$3, SourceMapGenerator: SourceMapGenerator$3 } = require$$2$1;\nlet { dirname: dirname$2, relative: relative$1, resolve: resolve$2, sep: sep$1 } = require$$2$1;\nlet { pathToFileURL: pathToFileURL$2 } = require$$2$1;\nlet Input$3$1 = input$1;\nlet sourceMapAvailable$2 = Boolean(SourceMapConsumer$3 && SourceMapGenerator$3);\nlet pathAvailable$2 = Boolean(dirname$2 && resolve$2 && relative$1 && sep$1);\nlet MapGenerator$2$1 = class MapGenerator {\n constructor(stringify2, root2, opts, cssString) {\n this.stringify = stringify2;\n this.mapOpts = opts.map || {};\n this.root = root2;\n this.opts = opts;\n this.css = cssString;\n this.originalCSS = cssString;\n this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute;\n this.memoizedFileURLs = /* @__PURE__ */ new Map();\n this.memoizedPaths = /* @__PURE__ */ new Map();\n this.memoizedURLs = /* @__PURE__ */ new Map();\n }\n addAnnotation() {\n let content;\n if (this.isInline()) {\n content = \"data:application/json;base64,\" + this.toBase64(this.map.toString());\n } else if (typeof this.mapOpts.annotation === \"string\") {\n content = this.mapOpts.annotation;\n } else if (typeof this.mapOpts.annotation === \"function\") {\n content = this.mapOpts.annotation(this.opts.to, this.root);\n } else {\n content = this.outputFile() + \".map\";\n }\n let eol = \"\\n\";\n if (this.css.includes(\"\\r\\n\")) eol = \"\\r\\n\";\n this.css += eol + \"/*# sourceMappingURL=\" + content + \" */\";\n }\n applyPrevMaps() {\n for (let prev of this.previous()) {\n let from = this.toUrl(this.path(prev.file));\n let root2 = prev.root || dirname$2(prev.file);\n let map;\n if (this.mapOpts.sourcesContent === false) {\n map = new SourceMapConsumer$3(prev.text);\n if (map.sourcesContent) {\n map.sourcesContent = null;\n }\n } else {\n map = prev.consumer();\n }\n this.map.applySourceMap(map, from, this.toUrl(this.path(root2)));\n }\n }\n clearAnnotation() {\n if (this.mapOpts.annotation === false) return;\n if (this.root) {\n let node2;\n for (let i2 = this.root.nodes.length - 1; i2 >= 0; i2--) {\n node2 = this.root.nodes[i2];\n if (node2.type !== \"comment\") continue;\n if (node2.text.indexOf(\"# sourceMappingURL=\") === 0) {\n this.root.removeChild(i2);\n }\n }\n } else if (this.css) {\n this.css = this.css.replace(/\\n*?\\/\\*#[\\S\\s]*?\\*\\/$/gm, \"\");\n }\n }\n generate() {\n this.clearAnnotation();\n if (pathAvailable$2 && sourceMapAvailable$2 && this.isMap()) {\n return this.generateMap();\n } else {\n let result2 = \"\";\n this.stringify(this.root, (i2) => {\n result2 += i2;\n });\n return [result2];\n }\n }\n generateMap() {\n if (this.root) {\n this.generateString();\n } else if (this.previous().length === 1) {\n let prev = this.previous()[0].consumer();\n prev.file = this.outputFile();\n this.map = SourceMapGenerator$3.fromSourceMap(prev, {\n ignoreInvalidMapping: true\n });\n } else {\n this.map = new SourceMapGenerator$3({\n file: this.outputFile(),\n ignoreInvalidMapping: true\n });\n this.map.addMapping({\n generated: { column: 0, line: 1 },\n original: { column: 0, line: 1 },\n source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : \"<no source>\"\n });\n }\n if (this.isSourcesContent()) this.setSourcesContent();\n if (this.root && this.previous().length > 0) this.applyPrevMaps();\n if (this.isAnnotation()) this.addAnnotation();\n if (this.isInline()) {\n return [this.css];\n } else {\n return [this.css, this.map];\n }\n }\n generateString() {\n this.css = \"\";\n this.map = new SourceMapGenerator$3({\n file: this.outputFile(),\n ignoreInvalidMapping: true\n });\n let line = 1;\n let column = 1;\n let noSource = \"<no source>\";\n let mapping = {\n generated: { column: 0, line: 0 },\n original: { column: 0, line: 0 },\n source: \"\"\n };\n let lines, last;\n this.stringify(this.root, (str, node2, type) => {\n this.css += str;\n if (node2 && type !== \"end\") {\n mapping.generated.line = line;\n mapping.generated.column = column - 1;\n if (node2.source && node2.source.start) {\n mapping.source = this.sourcePath(node2);\n mapping.original.line = node2.source.start.line;\n mapping.original.column = node2.source.start.column - 1;\n this.map.addMapping(mapping);\n } else {\n mapping.source = noSource;\n mapping.original.line = 1;\n mapping.original.column = 0;\n this.map.addMapping(mapping);\n }\n }\n lines = str.match(/\\n/g);\n if (lines) {\n line += lines.length;\n last = str.lastIndexOf(\"\\n\");\n column = str.length - last;\n } else {\n column += str.length;\n }\n if (node2 && type !== \"start\") {\n let p = node2.parent || { raws: {} };\n let childless = node2.type === \"decl\" || node2.type === \"atrule\" && !node2.nodes;\n if (!childless || node2 !== p.last || p.raws.semicolon) {\n if (node2.source && node2.source.end) {\n mapping.source = this.sourcePath(node2);\n mapping.original.line = node2.source.end.line;\n mapping.original.column = node2.source.end.column - 1;\n mapping.generated.line = line;\n mapping.generated.column = column - 2;\n this.map.addMapping(mapping);\n } else {\n mapping.source = noSource;\n mapping.original.line = 1;\n mapping.original.column = 0;\n mapping.generated.line = line;\n mapping.generated.column = column - 1;\n this.map.addMapping(mapping);\n }\n }\n }\n });\n }\n isAnnotation() {\n if (this.isInline()) {\n return true;\n }\n if (typeof this.mapOpts.annotation !== \"undefined\") {\n return this.mapOpts.annotation;\n }\n if (this.previous().length) {\n return this.previous().some((i2) => i2.annotation);\n }\n return true;\n }\n isInline() {\n if (typeof this.mapOpts.inline !== \"undefined\") {\n return this.mapOpts.inline;\n }\n let annotation = this.mapOpts.annotation;\n if (typeof annotation !== \"undefined\" && annotation !== true) {\n return false;\n }\n if (this.previous().length) {\n return this.previous().some((i2) => i2.inline);\n }\n return true;\n }\n isMap() {\n if (typeof this.opts.map !== \"undefined\") {\n return !!this.opts.map;\n }\n return this.previous().length > 0;\n }\n isSourcesContent() {\n if (typeof this.mapOpts.sourcesContent !== \"undefined\") {\n return this.mapOpts.sourcesContent;\n }\n if (this.previous().length) {\n return this.previous().some((i2) => i2.withContent());\n }\n return true;\n }\n outputFile() {\n if (this.opts.to) {\n return this.path(this.opts.to);\n } else if (this.opts.from) {\n return this.path(this.opts.from);\n } else {\n return \"to.css\";\n }\n }\n path(file) {\n if (this.mapOpts.absolute) return file;\n if (file.charCodeAt(0) === 60) return file;\n if (/^\\w+:\\/\\//.test(file)) return file;\n let cached = this.memoizedPaths.get(file);\n if (cached) return cached;\n let from = this.opts.to ? dirname$2(this.opts.to) : \".\";\n if (typeof this.mapOpts.annotation === \"string\") {\n from = dirname$2(resolve$2(from, this.mapOpts.annotation));\n }\n let path = relative$1(from, file);\n this.memoizedPaths.set(file, path);\n return path;\n }\n previous() {\n if (!this.previousMaps) {\n this.previousMaps = [];\n if (this.root) {\n this.root.walk((node2) => {\n if (node2.source && node2.source.input.map) {\n let map = node2.source.input.map;\n if (!this.previousMaps.includes(map)) {\n this.previousMaps.push(map);\n }\n }\n });\n } else {\n let input2 = new Input$3$1(this.originalCSS, this.opts);\n if (input2.map) this.previousMaps.push(input2.map);\n }\n }\n return this.previousMaps;\n }\n setSourcesContent() {\n let already = {};\n if (this.root) {\n this.root.walk((node2) => {\n if (node2.source) {\n let from = node2.source.input.from;\n if (from && !already[from]) {\n already[from] = true;\n let fromUrl = this.usesFileUrls ? this.toFileUrl(from) : this.toUrl(this.path(from));\n this.map.setSourceContent(fromUrl, node2.source.input.css);\n }\n }\n });\n } else if (this.css) {\n let from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : \"<no source>\";\n this.map.setSourceContent(from, this.css);\n }\n }\n sourcePath(node2) {\n if (this.mapOpts.from) {\n return this.toUrl(this.mapOpts.from);\n } else if (this.usesFileUrls) {\n return this.toFileUrl(node2.source.input.from);\n } else {\n return this.toUrl(this.path(node2.source.input.from));\n }\n }\n toBase64(str) {\n if (Buffer) {\n return Buffer.from(str).toString(\"base64\");\n } else {\n return window.btoa(unescape(encodeURIComponent(str)));\n }\n }\n toFileUrl(path) {\n let cached = this.memoizedFileURLs.get(path);\n if (cached) return cached;\n if (pathToFileURL$2) {\n let fileURL = pathToFileURL$2(path).toString();\n this.memoizedFileURLs.set(path, fileURL);\n return fileURL;\n } else {\n throw new Error(\n \"`map.absolute` option is not available in this PostCSS build\"\n );\n }\n }\n toUrl(path) {\n let cached = this.memoizedURLs.get(path);\n if (cached) return cached;\n if (sep$1 === \"\\\\\") {\n path = path.replace(/\\\\/g, \"/\");\n }\n let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent);\n this.memoizedURLs.set(path, url);\n return url;\n }\n};\nvar mapGenerator$1 = MapGenerator$2$1;\nlet Node$2$1 = node$1;\nlet Comment$4$1 = class Comment extends Node$2$1 {\n constructor(defaults) {\n super(defaults);\n this.type = \"comment\";\n }\n};\nvar comment$1 = Comment$4$1;\nComment$4$1.default = Comment$4$1;\nlet { isClean: isClean$1$1, my: my$1$1 } = symbols$1;\nlet Declaration$3$1 = declaration$1;\nlet Comment$3$1 = comment$1;\nlet Node$1$1 = node$1;\nlet parse$4$1, Rule$4$1, AtRule$4$1, Root$6$1;\nfunction cleanSource$1(nodes) {\n return nodes.map((i2) => {\n if (i2.nodes) i2.nodes = cleanSource$1(i2.nodes);\n delete i2.source;\n return i2;\n });\n}\nfunction markDirtyUp$1(node2) {\n node2[isClean$1$1] = false;\n if (node2.proxyOf.nodes) {\n for (let i2 of node2.proxyOf.nodes) {\n markDirtyUp$1(i2);\n }\n }\n}\nlet Container$7$1 = class Container extends Node$1$1 {\n append(...children) {\n for (let child of children) {\n let nodes = this.normalize(child, this.last);\n for (let node2 of nodes) this.proxyOf.nodes.push(node2);\n }\n this.markDirty();\n return this;\n }\n cleanRaws(keepBetween) {\n super.cleanRaws(keepBetween);\n if (this.nodes) {\n for (let node2 of this.nodes) node2.cleanRaws(keepBetween);\n }\n }\n each(callback) {\n if (!this.proxyOf.nodes) return void 0;\n let iterator = this.getIterator();\n let index2, result2;\n while (this.indexes[iterator] < this.proxyOf.nodes.length) {\n index2 = this.indexes[iterator];\n result2 = callback(this.proxyOf.nodes[index2], index2);\n if (result2 === false) break;\n this.indexes[iterator] += 1;\n }\n delete this.indexes[iterator];\n return result2;\n }\n every(condition) {\n return this.nodes.every(condition);\n }\n getIterator() {\n if (!this.lastEach) this.lastEach = 0;\n if (!this.indexes) this.indexes = {};\n this.lastEach += 1;\n let iterator = this.lastEach;\n this.indexes[iterator] = 0;\n return iterator;\n }\n getProxyProcessor() {\n return {\n get(node2, prop) {\n if (prop === \"proxyOf\") {\n return node2;\n } else if (!node2[prop]) {\n return node2[prop];\n } else if (prop === \"each\" || typeof prop === \"string\" && prop.startsWith(\"walk\")) {\n return (...args) => {\n return node2[prop](\n ...args.map((i2) => {\n if (typeof i2 === \"function\") {\n return (child, index2) => i2(child.toProxy(), index2);\n } else {\n return i2;\n }\n })\n );\n };\n } else if (prop === \"every\" || prop === \"some\") {\n return (cb) => {\n return node2[prop](\n (child, ...other) => cb(child.toProxy(), ...other)\n );\n };\n } else if (prop === \"root\") {\n return () => node2.root().toProxy();\n } else if (prop === \"nodes\") {\n return node2.nodes.map((i2) => i2.toProxy());\n } else if (prop === \"first\" || prop === \"last\") {\n return node2[prop].toProxy();\n } else {\n return node2[prop];\n }\n },\n set(node2, prop, value) {\n if (node2[prop] === value) return true;\n node2[prop] = value;\n if (prop === \"name\" || prop === \"params\" || prop === \"selector\") {\n node2.markDirty();\n }\n return true;\n }\n };\n }\n index(child) {\n if (typeof child === \"number\") return child;\n if (child.proxyOf) child = child.proxyOf;\n return this.proxyOf.nodes.indexOf(child);\n }\n insertAfter(exist, add) {\n let existIndex = this.index(exist);\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();\n existIndex = this.index(exist);\n for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node2);\n let index2;\n for (let id in this.indexes) {\n index2 = this.indexes[id];\n if (existIndex < index2) {\n this.indexes[id] = index2 + nodes.length;\n }\n }\n this.markDirty();\n return this;\n }\n insertBefore(exist, add) {\n let existIndex = this.index(exist);\n let type = existIndex === 0 ? \"prepend\" : false;\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse();\n existIndex = this.index(exist);\n for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex, 0, node2);\n let index2;\n for (let id in this.indexes) {\n index2 = this.indexes[id];\n if (existIndex <= index2) {\n this.indexes[id] = index2 + nodes.length;\n }\n }\n this.markDirty();\n return this;\n }\n normalize(nodes, sample) {\n if (typeof nodes === \"string\") {\n nodes = cleanSource$1(parse$4$1(nodes).nodes);\n } else if (typeof nodes === \"undefined\") {\n nodes = [];\n } else if (Array.isArray(nodes)) {\n nodes = nodes.slice(0);\n for (let i2 of nodes) {\n if (i2.parent) i2.parent.removeChild(i2, \"ignore\");\n }\n } else if (nodes.type === \"root\" && this.type !== \"document\") {\n nodes = nodes.nodes.slice(0);\n for (let i2 of nodes) {\n if (i2.parent) i2.parent.removeChild(i2, \"ignore\");\n }\n } else if (nodes.type) {\n nodes = [nodes];\n } else if (nodes.prop) {\n if (typeof nodes.value === \"undefined\") {\n throw new Error(\"Value field is missed in node creation\");\n } else if (typeof nodes.value !== \"string\") {\n nodes.value = String(nodes.value);\n }\n nodes = [new Declaration$3$1(nodes)];\n } else if (nodes.selector) {\n nodes = [new Rule$4$1(nodes)];\n } else if (nodes.name) {\n nodes = [new AtRule$4$1(nodes)];\n } else if (nodes.text) {\n nodes = [new Comment$3$1(nodes)];\n } else {\n throw new Error(\"Unknown node type in node creation\");\n }\n let processed = nodes.map((i2) => {\n if (!i2[my$1$1]) Container.rebuild(i2);\n i2 = i2.proxyOf;\n if (i2.parent) i2.parent.removeChild(i2);\n if (i2[isClean$1$1]) markDirtyUp$1(i2);\n if (typeof i2.raws.before === \"undefined\") {\n if (sample && typeof sample.raws.before !== \"undefined\") {\n i2.raws.before = sample.raws.before.replace(/\\S/g, \"\");\n }\n }\n i2.parent = this.proxyOf;\n return i2;\n });\n return processed;\n }\n prepend(...children) {\n children = children.reverse();\n for (let child of children) {\n let nodes = this.normalize(child, this.first, \"prepend\").reverse();\n for (let node2 of nodes) this.proxyOf.nodes.unshift(node2);\n for (let id in this.indexes) {\n this.indexes[id] = this.indexes[id] + nodes.length;\n }\n }\n this.markDirty();\n return this;\n }\n push(child) {\n child.parent = this;\n this.proxyOf.nodes.push(child);\n return this;\n }\n removeAll() {\n for (let node2 of this.proxyOf.nodes) node2.parent = void 0;\n this.proxyOf.nodes = [];\n this.markDirty();\n return this;\n }\n removeChild(child) {\n child = this.index(child);\n this.proxyOf.nodes[child].parent = void 0;\n this.proxyOf.nodes.splice(child, 1);\n let index2;\n for (let id in this.indexes) {\n index2 = this.indexes[id];\n if (index2 >= child) {\n this.indexes[id] = index2 - 1;\n }\n }\n this.markDirty();\n return this;\n }\n replaceValues(pattern, opts, callback) {\n if (!callback) {\n callback = opts;\n opts = {};\n }\n this.walkDecls((decl) => {\n if (opts.props && !opts.props.includes(decl.prop)) return;\n if (opts.fast && !decl.value.includes(opts.fast)) return;\n decl.value = decl.value.replace(pattern, callback);\n });\n this.markDirty();\n return this;\n }\n some(condition) {\n return this.nodes.some(condition);\n }\n walk(callback) {\n return this.each((child, i2) => {\n let result2;\n try {\n result2 = callback(child, i2);\n } catch (e2) {\n throw child.addToError(e2);\n }\n if (result2 !== false && child.walk) {\n result2 = child.walk(callback);\n }\n return result2;\n });\n }\n walkAtRules(name, callback) {\n if (!callback) {\n callback = name;\n return this.walk((child, i2) => {\n if (child.type === \"atrule\") {\n return callback(child, i2);\n }\n });\n }\n if (name instanceof RegExp) {\n return this.walk((child, i2) => {\n if (child.type === \"atrule\" && name.test(child.name)) {\n return callback(child, i2);\n }\n });\n }\n return this.walk((child, i2) => {\n if (child.type === \"atrule\" && child.name === name) {\n return callback(child, i2);\n }\n });\n }\n walkComments(callback) {\n return this.walk((child, i2) => {\n if (child.type === \"comment\") {\n return callback(child, i2);\n }\n });\n }\n walkDecls(prop, callback) {\n if (!callback) {\n callback = prop;\n return this.walk((child, i2) => {\n if (child.type === \"decl\") {\n return callback(child, i2);\n }\n });\n }\n if (prop instanceof RegExp) {\n return this.walk((child, i2) => {\n if (child.type === \"decl\" && prop.test(child.prop)) {\n return callback(child, i2);\n }\n });\n }\n return this.walk((child, i2) => {\n if (child.type === \"decl\" && child.prop === prop) {\n return callback(child, i2);\n }\n });\n }\n walkRules(selector, callback) {\n if (!callback) {\n callback = selector;\n return this.walk((child, i2) => {\n if (child.type === \"rule\") {\n return callback(child, i2);\n }\n });\n }\n if (selector instanceof RegExp) {\n return this.walk((child, i2) => {\n if (child.type === \"rule\" && selector.test(child.selector)) {\n return callback(child, i2);\n }\n });\n }\n return this.walk((child, i2) => {\n if (child.type === \"rule\" && child.selector === selector) {\n return callback(child, i2);\n }\n });\n }\n get first() {\n if (!this.proxyOf.nodes) return void 0;\n return this.proxyOf.nodes[0];\n }\n get last() {\n if (!this.proxyOf.nodes) return void 0;\n return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];\n }\n};\nContainer$7$1.registerParse = (dependant) => {\n parse$4$1 = dependant;\n};\nContainer$7$1.registerRule = (dependant) => {\n Rule$4$1 = dependant;\n};\nContainer$7$1.registerAtRule = (dependant) => {\n AtRule$4$1 = dependant;\n};\nContainer$7$1.registerRoot = (dependant) => {\n Root$6$1 = dependant;\n};\nvar container$1 = Container$7$1;\nContainer$7$1.default = Container$7$1;\nContainer$7$1.rebuild = (node2) => {\n if (node2.type === \"atrule\") {\n Object.setPrototypeOf(node2, AtRule$4$1.prototype);\n } else if (node2.type === \"rule\") {\n Object.setPrototypeOf(node2, Rule$4$1.prototype);\n } else if (node2.type === \"decl\") {\n Object.setPrototypeOf(node2, Declaration$3$1.prototype);\n } else if (node2.type === \"comment\") {\n Object.setPrototypeOf(node2, Comment$3$1.prototype);\n } else if (node2.type === \"root\") {\n Object.setPrototypeOf(node2, Root$6$1.prototype);\n }\n node2[my$1$1] = true;\n if (node2.nodes) {\n node2.nodes.forEach((child) => {\n Container$7$1.rebuild(child);\n });\n }\n};\nlet Container$6$1 = container$1;\nlet LazyResult$4$1, Processor$3$1;\nlet Document$3$1 = class Document2 extends Container$6$1 {\n constructor(defaults) {\n super({ type: \"document\", ...defaults });\n if (!this.nodes) {\n this.nodes = [];\n }\n }\n toResult(opts = {}) {\n let lazy = new LazyResult$4$1(new Processor$3$1(), this, opts);\n return lazy.stringify();\n }\n};\nDocument$3$1.registerLazyResult = (dependant) => {\n LazyResult$4$1 = dependant;\n};\nDocument$3$1.registerProcessor = (dependant) => {\n Processor$3$1 = dependant;\n};\nvar document$1$1 = Document$3$1;\nDocument$3$1.default = Document$3$1;\nlet printed$1 = {};\nvar warnOnce$2$1 = function warnOnce(message) {\n if (printed$1[message]) return;\n printed$1[message] = true;\n if (typeof console !== \"undefined\" && console.warn) {\n console.warn(message);\n }\n};\nlet Warning$2$1 = class Warning {\n constructor(text, opts = {}) {\n this.type = \"warning\";\n this.text = text;\n if (opts.node && opts.node.source) {\n let range = opts.node.rangeBy(opts);\n this.line = range.start.line;\n this.column = range.start.column;\n this.endLine = range.end.line;\n this.endColumn = range.end.column;\n }\n for (let opt in opts) this[opt] = opts[opt];\n }\n toString() {\n if (this.node) {\n return this.node.error(this.text, {\n index: this.index,\n plugin: this.plugin,\n word: this.word\n }).message;\n }\n if (this.plugin) {\n return this.plugin + \": \" + this.text;\n }\n return this.text;\n }\n};\nvar warning$1 = Warning$2$1;\nWarning$2$1.default = Warning$2$1;\nlet Warning$1$1 = warning$1;\nlet Result$3$1 = class Result {\n constructor(processor2, root2, opts) {\n this.processor = processor2;\n this.messages = [];\n this.root = root2;\n this.opts = opts;\n this.css = void 0;\n this.map = void 0;\n }\n toString() {\n return this.css;\n }\n warn(text, opts = {}) {\n if (!opts.plugin) {\n if (this.lastPlugin && this.lastPlugin.postcssPlugin) {\n opts.plugin = this.lastPlugin.postcssPlugin;\n }\n }\n let warning2 = new Warning$1$1(text, opts);\n this.messages.push(warning2);\n return warning2;\n }\n warnings() {\n return this.messages.filter((i2) => i2.type === \"warning\");\n }\n get content() {\n return this.css;\n }\n};\nvar result$1 = Result$3$1;\nResult$3$1.default = Result$3$1;\nconst SINGLE_QUOTE$1 = \"'\".charCodeAt(0);\nconst DOUBLE_QUOTE$1 = '\"'.charCodeAt(0);\nconst BACKSLASH$1 = \"\\\\\".charCodeAt(0);\nconst SLASH$1 = \"/\".charCodeAt(0);\nconst NEWLINE$1 = \"\\n\".charCodeAt(0);\nconst SPACE$1 = \" \".charCodeAt(0);\nconst FEED$1 = \"\\f\".charCodeAt(0);\nconst TAB$1 = \"\t\".charCodeAt(0);\nconst CR$1 = \"\\r\".charCodeAt(0);\nconst OPEN_SQUARE$1 = \"[\".charCodeAt(0);\nconst CLOSE_SQUARE$1 = \"]\".charCodeAt(0);\nconst OPEN_PARENTHESES$1 = \"(\".charCodeAt(0);\nconst CLOSE_PARENTHESES$1 = \")\".charCodeAt(0);\nconst OPEN_CURLY$1 = \"{\".charCodeAt(0);\nconst CLOSE_CURLY$1 = \"}\".charCodeAt(0);\nconst SEMICOLON$1 = \";\".charCodeAt(0);\nconst ASTERISK$1 = \"*\".charCodeAt(0);\nconst COLON$1 = \":\".charCodeAt(0);\nconst AT$1 = \"@\".charCodeAt(0);\nconst RE_AT_END$1 = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g;\nconst RE_WORD_END$1 = /[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g;\nconst RE_BAD_BRACKET$1 = /.[\\r\\n\"'(/\\\\]/;\nconst RE_HEX_ESCAPE$1 = /[\\da-f]/i;\nvar tokenize$1 = function tokenizer(input2, options = {}) {\n let css = input2.css.valueOf();\n let ignore = options.ignoreErrors;\n let code, next, quote, content, escape;\n let escaped, escapePos, prev, n2, currentToken;\n let length = css.length;\n let pos = 0;\n let buffer = [];\n let returned = [];\n function position() {\n return pos;\n }\n function unclosed(what) {\n throw input2.error(\"Unclosed \" + what, pos);\n }\n function endOfFile() {\n return returned.length === 0 && pos >= length;\n }\n function nextToken(opts) {\n if (returned.length) return returned.pop();\n if (pos >= length) return;\n let ignoreUnclosed = opts ? opts.ignoreUnclosed : false;\n code = css.charCodeAt(pos);\n switch (code) {\n case NEWLINE$1:\n case SPACE$1:\n case TAB$1:\n case CR$1:\n case FEED$1: {\n next = pos;\n do {\n next += 1;\n code = css.charCodeAt(next);\n } while (code === SPACE$1 || code === NEWLINE$1 || code === TAB$1 || code === CR$1 || code === FEED$1);\n currentToken = [\"space\", css.slice(pos, next)];\n pos = next - 1;\n break;\n }\n case OPEN_SQUARE$1:\n case CLOSE_SQUARE$1:\n case OPEN_CURLY$1:\n case CLOSE_CURLY$1:\n case COLON$1:\n case SEMICOLON$1:\n case CLOSE_PARENTHESES$1: {\n let controlChar = String.fromCharCode(code);\n currentToken = [controlChar, controlChar, pos];\n break;\n }\n case OPEN_PARENTHESES$1: {\n prev = buffer.length ? buffer.pop()[1] : \"\";\n n2 = css.charCodeAt(pos + 1);\n if (prev === \"url\" && n2 !== SINGLE_QUOTE$1 && n2 !== DOUBLE_QUOTE$1 && n2 !== SPACE$1 && n2 !== NEWLINE$1 && n2 !== TAB$1 && n2 !== FEED$1 && n2 !== CR$1) {\n next = pos;\n do {\n escaped = false;\n next = css.indexOf(\")\", next + 1);\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos;\n break;\n } else {\n unclosed(\"bracket\");\n }\n }\n escapePos = next;\n while (css.charCodeAt(escapePos - 1) === BACKSLASH$1) {\n escapePos -= 1;\n escaped = !escaped;\n }\n } while (escaped);\n currentToken = [\"brackets\", css.slice(pos, next + 1), pos, next];\n pos = next;\n } else {\n next = css.indexOf(\")\", pos + 1);\n content = css.slice(pos, next + 1);\n if (next === -1 || RE_BAD_BRACKET$1.test(content)) {\n currentToken = [\"(\", \"(\", pos];\n } else {\n currentToken = [\"brackets\", content, pos, next];\n pos = next;\n }\n }\n break;\n }\n case SINGLE_QUOTE$1:\n case DOUBLE_QUOTE$1: {\n quote = code === SINGLE_QUOTE$1 ? \"'\" : '\"';\n next = pos;\n do {\n escaped = false;\n next = css.indexOf(quote, next + 1);\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos + 1;\n break;\n } else {\n unclosed(\"string\");\n }\n }\n escapePos = next;\n while (css.charCodeAt(escapePos - 1) === BACKSLASH$1) {\n escapePos -= 1;\n escaped = !escaped;\n }\n } while (escaped);\n currentToken = [\"string\", css.slice(pos, next + 1), pos, next];\n pos = next;\n break;\n }\n case AT$1: {\n RE_AT_END$1.lastIndex = pos + 1;\n RE_AT_END$1.test(css);\n if (RE_AT_END$1.lastIndex === 0) {\n next = css.length - 1;\n } else {\n next = RE_AT_END$1.lastIndex - 2;\n }\n currentToken = [\"at-word\", css.slice(pos, next + 1), pos, next];\n pos = next;\n break;\n }\n case BACKSLASH$1: {\n next = pos;\n escape = true;\n while (css.charCodeAt(next + 1) === BACKSLASH$1) {\n next += 1;\n escape = !escape;\n }\n code = css.charCodeAt(next + 1);\n if (escape && code !== SLASH$1 && code !== SPACE$1 && code !== NEWLINE$1 && code !== TAB$1 && code !== CR$1 && code !== FEED$1) {\n next += 1;\n if (RE_HEX_ESCAPE$1.test(css.charAt(next))) {\n while (RE_HEX_ESCAPE$1.test(css.charAt(next + 1))) {\n next += 1;\n }\n if (css.charCodeAt(next + 1) === SPACE$1) {\n next += 1;\n }\n }\n }\n currentToken = [\"word\", css.slice(pos, next + 1), pos, next];\n pos = next;\n break;\n }\n default: {\n if (code === SLASH$1 && css.charCodeAt(pos + 1) === ASTERISK$1) {\n next = css.indexOf(\"*/\", pos + 2) + 1;\n if (next === 0) {\n if (ignore || ignoreUnclosed) {\n next = css.length;\n } else {\n unclosed(\"comment\");\n }\n }\n currentToken = [\"comment\", css.slice(pos, next + 1), pos, next];\n pos = next;\n } else {\n RE_WORD_END$1.lastIndex = pos + 1;\n RE_WORD_END$1.test(css);\n if (RE_WORD_END$1.lastIndex === 0) {\n next = css.length - 1;\n } else {\n next = RE_WORD_END$1.lastIndex - 2;\n }\n currentToken = [\"word\", css.slice(pos, next + 1), pos, next];\n buffer.push(currentToken);\n pos = next;\n }\n break;\n }\n }\n pos++;\n return currentToken;\n }\n function back(token) {\n returned.push(token);\n }\n return {\n back,\n endOfFile,\n nextToken,\n position\n };\n};\nlet Container$5$1 = container$1;\nlet AtRule$3$1 = class AtRule extends Container$5$1 {\n constructor(defaults) {\n super(defaults);\n this.type = \"atrule\";\n }\n append(...children) {\n if (!this.proxyOf.nodes) this.nodes = [];\n return super.append(...children);\n }\n prepend(...children) {\n if (!this.proxyOf.nodes) this.nodes = [];\n return super.prepend(...children);\n }\n};\nvar atRule$1 = AtRule$3$1;\nAtRule$3$1.default = AtRule$3$1;\nContainer$5$1.registerAtRule(AtRule$3$1);\nlet Container$4$1 = container$1;\nlet LazyResult$3$1, Processor$2$1;\nlet Root$5$1 = class Root extends Container$4$1 {\n constructor(defaults) {\n super(defaults);\n this.type = \"root\";\n if (!this.nodes) this.nodes = [];\n }\n normalize(child, sample, type) {\n let nodes = super.normalize(child);\n if (sample) {\n if (type === \"prepend\") {\n if (this.nodes.length > 1) {\n sample.raws.before = this.nodes[1].raws.before;\n } else {\n delete sample.raws.before;\n }\n } else if (this.first !== sample) {\n for (let node2 of nodes) {\n node2.raws.before = sample.raws.before;\n }\n }\n }\n return nodes;\n }\n removeChild(child, ignore) {\n let index2 = this.index(child);\n if (!ignore && index2 === 0 && this.nodes.length > 1) {\n this.nodes[1].raws.before = this.nodes[index2].raws.before;\n }\n return super.removeChild(child);\n }\n toResult(opts = {}) {\n let lazy = new LazyResult$3$1(new Processor$2$1(), this, opts);\n return lazy.stringify();\n }\n};\nRoot$5$1.registerLazyResult = (dependant) => {\n LazyResult$3$1 = dependant;\n};\nRoot$5$1.registerProcessor = (dependant) => {\n Processor$2$1 = dependant;\n};\nvar root$1 = Root$5$1;\nRoot$5$1.default = Root$5$1;\nContainer$4$1.registerRoot(Root$5$1);\nlet list$2$1 = {\n comma(string) {\n return list$2$1.split(string, [\",\"], true);\n },\n space(string) {\n let spaces = [\" \", \"\\n\", \"\t\"];\n return list$2$1.split(string, spaces);\n },\n split(string, separators, last) {\n let array = [];\n let current = \"\";\n let split = false;\n let func = 0;\n let inQuote = false;\n let prevQuote = \"\";\n let escape = false;\n for (let letter of string) {\n if (escape) {\n escape = false;\n } else if (letter === \"\\\\\") {\n escape = true;\n } else if (inQuote) {\n if (letter === prevQuote) {\n inQuote = false;\n }\n } else if (letter === '\"' || letter === \"'\") {\n inQuote = true;\n prevQuote = letter;\n } else if (letter === \"(\") {\n func += 1;\n } else if (letter === \")\") {\n if (func > 0) func -= 1;\n } else if (func === 0) {\n if (separators.includes(letter)) split = true;\n }\n if (split) {\n if (current !== \"\") array.push(current.trim());\n current = \"\";\n split = false;\n } else {\n current += letter;\n }\n }\n if (last || current !== \"\") array.push(current.trim());\n return array;\n }\n};\nvar list_1$1 = list$2$1;\nlist$2$1.default = list$2$1;\nlet Container$3$1 = container$1;\nlet list$1$1 = list_1$1;\nlet Rule$3$1 = class Rule extends Container$3$1 {\n constructor(defaults) {\n super(defaults);\n this.type = \"rule\";\n if (!this.nodes) this.nodes = [];\n }\n get selectors() {\n return list$1$1.comma(this.selector);\n }\n set selectors(values) {\n let match = this.selector ? this.selector.match(/,\\s*/) : null;\n let sep2 = match ? match[0] : \",\" + this.raw(\"between\", \"beforeOpen\");\n this.selector = values.join(sep2);\n }\n};\nvar rule$1 = Rule$3$1;\nRule$3$1.default = Rule$3$1;\nContainer$3$1.registerRule(Rule$3$1);\nlet Declaration$2$1 = declaration$1;\nlet tokenizer2$1 = tokenize$1;\nlet Comment$2$1 = comment$1;\nlet AtRule$2$1 = atRule$1;\nlet Root$4$1 = root$1;\nlet Rule$2$1 = rule$1;\nconst SAFE_COMMENT_NEIGHBOR$1 = {\n empty: true,\n space: true\n};\nfunction findLastWithPosition$1(tokens) {\n for (let i2 = tokens.length - 1; i2 >= 0; i2--) {\n let token = tokens[i2];\n let pos = token[3] || token[2];\n if (pos) return pos;\n }\n}\nlet Parser$1$1 = class Parser {\n constructor(input2) {\n this.input = input2;\n this.root = new Root$4$1();\n this.current = this.root;\n this.spaces = \"\";\n this.semicolon = false;\n this.createTokenizer();\n this.root.source = { input: input2, start: { column: 1, line: 1, offset: 0 } };\n }\n atrule(token) {\n let node2 = new AtRule$2$1();\n node2.name = token[1].slice(1);\n if (node2.name === \"\") {\n this.unnamedAtrule(node2, token);\n }\n this.init(node2, token[2]);\n let type;\n let prev;\n let shift;\n let last = false;\n let open = false;\n let params = [];\n let brackets = [];\n while (!this.tokenizer.endOfFile()) {\n token = this.tokenizer.nextToken();\n type = token[0];\n if (type === \"(\" || type === \"[\") {\n brackets.push(type === \"(\" ? \")\" : \"]\");\n } else if (type === \"{\" && brackets.length > 0) {\n brackets.push(\"}\");\n } else if (type === brackets[brackets.length - 1]) {\n brackets.pop();\n }\n if (brackets.length === 0) {\n if (type === \";\") {\n node2.source.end = this.getPosition(token[2]);\n node2.source.end.offset++;\n this.semicolon = true;\n break;\n } else if (type === \"{\") {\n open = true;\n break;\n } else if (type === \"}\") {\n if (params.length > 0) {\n shift = params.length - 1;\n prev = params[shift];\n while (prev && prev[0] === \"space\") {\n prev = params[--shift];\n }\n if (prev) {\n node2.source.end = this.getPosition(prev[3] || prev[2]);\n node2.source.end.offset++;\n }\n }\n this.end(token);\n break;\n } else {\n params.push(token);\n }\n } else {\n params.push(token);\n }\n if (this.tokenizer.endOfFile()) {\n last = true;\n break;\n }\n }\n node2.raws.between = this.spacesAndCommentsFromEnd(params);\n if (params.length) {\n node2.raws.afterName = this.spacesAndCommentsFromStart(params);\n this.raw(node2, \"params\", params);\n if (last) {\n token = params[params.length - 1];\n node2.source.end = this.getPosition(token[3] || token[2]);\n node2.source.end.offset++;\n this.spaces = node2.raws.between;\n node2.raws.between = \"\";\n }\n } else {\n node2.raws.afterName = \"\";\n node2.params = \"\";\n }\n if (open) {\n node2.nodes = [];\n this.current = node2;\n }\n }\n checkMissedSemicolon(tokens) {\n let colon = this.colon(tokens);\n if (colon === false) return;\n let founded = 0;\n let token;\n for (let j = colon - 1; j >= 0; j--) {\n token = tokens[j];\n if (token[0] !== \"space\") {\n founded += 1;\n if (founded === 2) break;\n }\n }\n throw this.input.error(\n \"Missed semicolon\",\n token[0] === \"word\" ? token[3] + 1 : token[2]\n );\n }\n colon(tokens) {\n let brackets = 0;\n let token, type, prev;\n for (let [i2, element] of tokens.entries()) {\n token = element;\n type = token[0];\n if (type === \"(\") {\n brackets += 1;\n }\n if (type === \")\") {\n brackets -= 1;\n }\n if (brackets === 0 && type === \":\") {\n if (!prev) {\n this.doubleColon(token);\n } else if (prev[0] === \"word\" && prev[1] === \"progid\") {\n continue;\n } else {\n return i2;\n }\n }\n prev = token;\n }\n return false;\n }\n comment(token) {\n let node2 = new Comment$2$1();\n this.init(node2, token[2]);\n node2.source.end = this.getPosition(token[3] || token[2]);\n node2.source.end.offset++;\n let text = token[1].slice(2, -2);\n if (/^\\s*$/.test(text)) {\n node2.text = \"\";\n node2.raws.left = text;\n node2.raws.right = \"\";\n } else {\n let match = text.match(/^(\\s*)([^]*\\S)(\\s*)$/);\n node2.text = match[2];\n node2.raws.left = match[1];\n node2.raws.right = match[3];\n }\n }\n createTokenizer() {\n this.tokenizer = tokenizer2$1(this.input);\n }\n decl(tokens, customProperty) {\n let node2 = new Declaration$2$1();\n this.init(node2, tokens[0][2]);\n let last = tokens[tokens.length - 1];\n if (last[0] === \";\") {\n this.semicolon = true;\n tokens.pop();\n }\n node2.source.end = this.getPosition(\n last[3] || last[2] || findLastWithPosition$1(tokens)\n );\n node2.source.end.offset++;\n while (tokens[0][0] !== \"word\") {\n if (tokens.length === 1) this.unknownWord(tokens);\n node2.raws.before += tokens.shift()[1];\n }\n node2.source.start = this.getPosition(tokens[0][2]);\n node2.prop = \"\";\n while (tokens.length) {\n let type = tokens[0][0];\n if (type === \":\" || type === \"space\" || type === \"comment\") {\n break;\n }\n node2.prop += tokens.shift()[1];\n }\n node2.raws.between = \"\";\n let token;\n while (tokens.length) {\n token = tokens.shift();\n if (token[0] === \":\") {\n node2.raws.between += token[1];\n break;\n } else {\n if (token[0] === \"word\" && /\\w/.test(token[1])) {\n this.unknownWord([token]);\n }\n node2.raws.between += token[1];\n }\n }\n if (node2.prop[0] === \"_\" || node2.prop[0] === \"*\") {\n node2.raws.before += node2.prop[0];\n node2.prop = node2.prop.slice(1);\n }\n let firstSpaces = [];\n let next;\n while (tokens.length) {\n next = tokens[0][0];\n if (next !== \"space\" && next !== \"comment\") break;\n firstSpaces.push(tokens.shift());\n }\n this.precheckMissedSemicolon(tokens);\n for (let i2 = tokens.length - 1; i2 >= 0; i2--) {\n token = tokens[i2];\n if (token[1].toLowerCase() === \"!important\") {\n node2.important = true;\n let string = this.stringFrom(tokens, i2);\n string = this.spacesFromEnd(tokens) + string;\n if (string !== \" !important\") node2.raws.important = string;\n break;\n } else if (token[1].toLowerCase() === \"important\") {\n let cache = tokens.slice(0);\n let str = \"\";\n for (let j = i2; j > 0; j--) {\n let type = cache[j][0];\n if (str.trim().indexOf(\"!\") === 0 && type !== \"space\") {\n break;\n }\n str = cache.pop()[1] + str;\n }\n if (str.trim().indexOf(\"!\") === 0) {\n node2.important = true;\n node2.raws.important = str;\n tokens = cache;\n }\n }\n if (token[0] !== \"space\" && token[0] !== \"comment\") {\n break;\n }\n }\n let hasWord = tokens.some((i2) => i2[0] !== \"space\" && i2[0] !== \"comment\");\n if (hasWord) {\n node2.raws.between += firstSpaces.map((i2) => i2[1]).join(\"\");\n firstSpaces = [];\n }\n this.raw(node2, \"value\", firstSpaces.concat(tokens), customProperty);\n if (node2.value.includes(\":\") && !customProperty) {\n this.checkMissedSemicolon(tokens);\n }\n }\n doubleColon(token) {\n throw this.input.error(\n \"Double colon\",\n { offset: token[2] },\n { offset: token[2] + token[1].length }\n );\n }\n emptyRule(token) {\n let node2 = new Rule$2$1();\n this.init(node2, token[2]);\n node2.selector = \"\";\n node2.raws.between = \"\";\n this.current = node2;\n }\n end(token) {\n if (this.current.nodes && this.current.nodes.length) {\n this.current.raws.semicolon = this.semicolon;\n }\n this.semicolon = false;\n this.current.raws.after = (this.current.raws.after || \"\") + this.spaces;\n this.spaces = \"\";\n if (this.current.parent) {\n this.current.source.end = this.getPosition(token[2]);\n this.current.source.end.offset++;\n this.current = this.current.parent;\n } else {\n this.unexpectedClose(token);\n }\n }\n endFile() {\n if (this.current.parent) this.unclosedBlock();\n if (this.current.nodes && this.current.nodes.length) {\n this.current.raws.semicolon = this.semicolon;\n }\n this.current.raws.after = (this.current.raws.after || \"\") + this.spaces;\n this.root.source.end = this.getPosition(this.tokenizer.position());\n }\n freeSemicolon(token) {\n this.spaces += token[1];\n if (this.current.nodes) {\n let prev = this.current.nodes[this.current.nodes.length - 1];\n if (prev && prev.type === \"rule\" && !prev.raws.ownSemicolon) {\n prev.raws.ownSemicolon = this.spaces;\n this.spaces = \"\";\n }\n }\n }\n // Helpers\n getPosition(offset) {\n let pos = this.input.fromOffset(offset);\n return {\n column: pos.col,\n line: pos.line,\n offset\n };\n }\n init(node2, offset) {\n this.current.push(node2);\n node2.source = {\n input: this.input,\n start: this.getPosition(offset)\n };\n node2.raws.before = this.spaces;\n this.spaces = \"\";\n if (node2.type !== \"comment\") this.semicolon = false;\n }\n other(start) {\n let end = false;\n let type = null;\n let colon = false;\n let bracket = null;\n let brackets = [];\n let customProperty = start[1].startsWith(\"--\");\n let tokens = [];\n let token = start;\n while (token) {\n type = token[0];\n tokens.push(token);\n if (type === \"(\" || type === \"[\") {\n if (!bracket) bracket = token;\n brackets.push(type === \"(\" ? \")\" : \"]\");\n } else if (customProperty && colon && type === \"{\") {\n if (!bracket) bracket = token;\n brackets.push(\"}\");\n } else if (brackets.length === 0) {\n if (type === \";\") {\n if (colon) {\n this.decl(tokens, customProperty);\n return;\n } else {\n break;\n }\n } else if (type === \"{\") {\n this.rule(tokens);\n return;\n } else if (type === \"}\") {\n this.tokenizer.back(tokens.pop());\n end = true;\n break;\n } else if (type === \":\") {\n colon = true;\n }\n } else if (type === brackets[brackets.length - 1]) {\n brackets.pop();\n if (brackets.length === 0) bracket = null;\n }\n token = this.tokenizer.nextToken();\n }\n if (this.tokenizer.endOfFile()) end = true;\n if (brackets.length > 0) this.unclosedBracket(bracket);\n if (end && colon) {\n if (!customProperty) {\n while (tokens.length) {\n token = tokens[tokens.length - 1][0];\n if (token !== \"space\" && token !== \"comment\") break;\n this.tokenizer.back(tokens.pop());\n }\n }\n this.decl(tokens, customProperty);\n } else {\n this.unknownWord(tokens);\n }\n }\n parse() {\n let token;\n while (!this.tokenizer.endOfFile()) {\n token = this.tokenizer.nextToken();\n switch (token[0]) {\n case \"space\":\n this.spaces += token[1];\n break;\n case \";\":\n this.freeSemicolon(token);\n break;\n case \"}\":\n this.end(token);\n break;\n case \"comment\":\n this.comment(token);\n break;\n case \"at-word\":\n this.atrule(token);\n break;\n case \"{\":\n this.emptyRule(token);\n break;\n default:\n this.other(token);\n break;\n }\n }\n this.endFile();\n }\n precheckMissedSemicolon() {\n }\n raw(node2, prop, tokens, customProperty) {\n let token, type;\n let length = tokens.length;\n let value = \"\";\n let clean = true;\n let next, prev;\n for (let i2 = 0; i2 < length; i2 += 1) {\n token = tokens[i2];\n type = token[0];\n if (type === \"space\" && i2 === length - 1 && !customProperty) {\n clean = false;\n } else if (type === \"comment\") {\n prev = tokens[i2 - 1] ? tokens[i2 - 1][0] : \"empty\";\n next = tokens[i2 + 1] ? tokens[i2 + 1][0] : \"empty\";\n if (!SAFE_COMMENT_NEIGHBOR$1[prev] && !SAFE_COMMENT_NEIGHBOR$1[next]) {\n if (value.slice(-1) === \",\") {\n clean = false;\n } else {\n value += token[1];\n }\n } else {\n clean = false;\n }\n } else {\n value += token[1];\n }\n }\n if (!clean) {\n let raw = tokens.reduce((all, i2) => all + i2[1], \"\");\n node2.raws[prop] = { raw, value };\n }\n node2[prop] = value;\n }\n rule(tokens) {\n tokens.pop();\n let node2 = new Rule$2$1();\n this.init(node2, tokens[0][2]);\n node2.raws.between = this.spacesAndCommentsFromEnd(tokens);\n this.raw(node2, \"selector\", tokens);\n this.current = node2;\n }\n spacesAndCommentsFromEnd(tokens) {\n let lastTokenType;\n let spaces = \"\";\n while (tokens.length) {\n lastTokenType = tokens[tokens.length - 1][0];\n if (lastTokenType !== \"space\" && lastTokenType !== \"comment\") break;\n spaces = tokens.pop()[1] + spaces;\n }\n return spaces;\n }\n // Errors\n spacesAndCommentsFromStart(tokens) {\n let next;\n let spaces = \"\";\n while (tokens.length) {\n next = tokens[0][0];\n if (next !== \"space\" && next !== \"comment\") break;\n spaces += tokens.shift()[1];\n }\n return spaces;\n }\n spacesFromEnd(tokens) {\n let lastTokenType;\n let spaces = \"\";\n while (tokens.length) {\n lastTokenType = tokens[tokens.length - 1][0];\n if (lastTokenType !== \"space\") break;\n spaces = tokens.pop()[1] + spaces;\n }\n return spaces;\n }\n stringFrom(tokens, from) {\n let result2 = \"\";\n for (let i2 = from; i2 < tokens.length; i2++) {\n result2 += tokens[i2][1];\n }\n tokens.splice(from, tokens.length - from);\n return result2;\n }\n unclosedBlock() {\n let pos = this.current.source.start;\n throw this.input.error(\"Unclosed block\", pos.line, pos.column);\n }\n unclosedBracket(bracket) {\n throw this.input.error(\n \"Unclosed bracket\",\n { offset: bracket[2] },\n { offset: bracket[2] + 1 }\n );\n }\n unexpectedClose(token) {\n throw this.input.error(\n \"Unexpected }\",\n { offset: token[2] },\n { offset: token[2] + 1 }\n );\n }\n unknownWord(tokens) {\n throw this.input.error(\n \"Unknown word\",\n { offset: tokens[0][2] },\n { offset: tokens[0][2] + tokens[0][1].length }\n );\n }\n unnamedAtrule(node2, token) {\n throw this.input.error(\n \"At-rule without name\",\n { offset: token[2] },\n { offset: token[2] + token[1].length }\n );\n }\n};\nvar parser$1 = Parser$1$1;\nlet Container$2$1 = container$1;\nlet Parser2$1 = parser$1;\nlet Input$2$1 = input$1;\nfunction parse$3$1(css, opts) {\n let input2 = new Input$2$1(css, opts);\n let parser2 = new Parser2$1(input2);\n try {\n parser2.parse();\n } catch (e2) {\n if (process.env.NODE_ENV !== \"production\") {\n if (e2.name === \"CssSyntaxError\" && opts && opts.from) {\n if (/\\.scss$/i.test(opts.from)) {\n e2.message += \"\\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser\";\n } else if (/\\.sass/i.test(opts.from)) {\n e2.message += \"\\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser\";\n } else if (/\\.less$/i.test(opts.from)) {\n e2.message += \"\\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser\";\n }\n }\n }\n throw e2;\n }\n return parser2.root;\n}\nvar parse_1$1 = parse$3$1;\nparse$3$1.default = parse$3$1;\nContainer$2$1.registerParse(parse$3$1);\nlet { isClean: isClean$3, my: my$3 } = symbols$1;\nlet MapGenerator$1$1 = mapGenerator$1;\nlet stringify$2$1 = stringify_1$1;\nlet Container$1$1 = container$1;\nlet Document$2$1 = document$1$1;\nlet warnOnce$1$1 = warnOnce$2$1;\nlet Result$2$1 = result$1;\nlet parse$2$1 = parse_1$1;\nlet Root$3$1 = root$1;\nconst TYPE_TO_CLASS_NAME$1 = {\n atrule: \"AtRule\",\n comment: \"Comment\",\n decl: \"Declaration\",\n document: \"Document\",\n root: \"Root\",\n rule: \"Rule\"\n};\nconst PLUGIN_PROPS$1 = {\n AtRule: true,\n AtRuleExit: true,\n Comment: true,\n CommentExit: true,\n Declaration: true,\n DeclarationExit: true,\n Document: true,\n DocumentExit: true,\n Once: true,\n OnceExit: true,\n postcssPlugin: true,\n prepare: true,\n Root: true,\n RootExit: true,\n Rule: true,\n RuleExit: true\n};\nconst NOT_VISITORS$1 = {\n Once: true,\n postcssPlugin: true,\n prepare: true\n};\nconst CHILDREN$1 = 0;\nfunction isPromise$1(obj) {\n return typeof obj === \"object\" && typeof obj.then === \"function\";\n}\nfunction getEvents$1(node2) {\n let key = false;\n let type = TYPE_TO_CLASS_NAME$1[node2.type];\n if (node2.type === \"decl\") {\n key = node2.prop.toLowerCase();\n } else if (node2.type === \"atrule\") {\n key = node2.name.toLowerCase();\n }\n if (key && node2.append) {\n return [\n type,\n type + \"-\" + key,\n CHILDREN$1,\n type + \"Exit\",\n type + \"Exit-\" + key\n ];\n } else if (key) {\n return [type, type + \"-\" + key, type + \"Exit\", type + \"Exit-\" + key];\n } else if (node2.append) {\n return [type, CHILDREN$1, type + \"Exit\"];\n } else {\n return [type, type + \"Exit\"];\n }\n}\nfunction toStack$1(node2) {\n let events;\n if (node2.type === \"document\") {\n events = [\"Document\", CHILDREN$1, \"DocumentExit\"];\n } else if (node2.type === \"root\") {\n events = [\"Root\", CHILDREN$1, \"RootExit\"];\n } else {\n events = getEvents$1(node2);\n }\n return {\n eventIndex: 0,\n events,\n iterator: 0,\n node: node2,\n visitorIndex: 0,\n visitors: []\n };\n}\nfunction cleanMarks$1(node2) {\n node2[isClean$3] = false;\n if (node2.nodes) node2.nodes.forEach((i2) => cleanMarks$1(i2));\n return node2;\n}\nlet postcss$2$1 = {};\nlet LazyResult$2$1 = class LazyResult {\n constructor(processor2, css, opts) {\n this.stringified = false;\n this.processed = false;\n let root2;\n if (typeof css === \"object\" && css !== null && (css.type === \"root\" || css.type === \"document\")) {\n root2 = cleanMarks$1(css);\n } else if (css instanceof LazyResult || css instanceof Result$2$1) {\n root2 = cleanMarks$1(css.root);\n if (css.map) {\n if (typeof opts.map === \"undefined\") opts.map = {};\n if (!opts.map.inline) opts.map.inline = false;\n opts.map.prev = css.map;\n }\n } else {\n let parser2 = parse$2$1;\n if (opts.syntax) parser2 = opts.syntax.parse;\n if (opts.parser) parser2 = opts.parser;\n if (parser2.parse) parser2 = parser2.parse;\n try {\n root2 = parser2(css, opts);\n } catch (error) {\n this.processed = true;\n this.error = error;\n }\n if (root2 && !root2[my$3]) {\n Container$1$1.rebuild(root2);\n }\n }\n this.result = new Result$2$1(processor2, root2, opts);\n this.helpers = { ...postcss$2$1, postcss: postcss$2$1, result: this.result };\n this.plugins = this.processor.plugins.map((plugin22) => {\n if (typeof plugin22 === \"object\" && plugin22.prepare) {\n return { ...plugin22, ...plugin22.prepare(this.result) };\n } else {\n return plugin22;\n }\n });\n }\n async() {\n if (this.error) return Promise.reject(this.error);\n if (this.processed) return Promise.resolve(this.result);\n if (!this.processing) {\n this.processing = this.runAsync();\n }\n return this.processing;\n }\n catch(onRejected) {\n return this.async().catch(onRejected);\n }\n finally(onFinally) {\n return this.async().then(onFinally, onFinally);\n }\n getAsyncError() {\n throw new Error(\"Use process(css).then(cb) to work with async plugins\");\n }\n handleError(error, node2) {\n let plugin22 = this.result.lastPlugin;\n try {\n if (node2) node2.addToError(error);\n this.error = error;\n if (error.name === \"CssSyntaxError\" && !error.plugin) {\n error.plugin = plugin22.postcssPlugin;\n error.setMessage();\n } else if (plugin22.postcssVersion) {\n if (process.env.NODE_ENV !== \"production\") {\n let pluginName = plugin22.postcssPlugin;\n let pluginVer = plugin22.postcssVersion;\n let runtimeVer = this.result.processor.version;\n let a2 = pluginVer.split(\".\");\n let b = runtimeVer.split(\".\");\n if (a2[0] !== b[0] || parseInt(a2[1]) > parseInt(b[1])) {\n console.error(\n \"Unknown error from PostCSS plugin. Your current PostCSS version is \" + runtimeVer + \", but \" + pluginName + \" uses \" + pluginVer + \". Perhaps this is the source of the error below.\"\n );\n }\n }\n }\n } catch (err) {\n if (console && console.error) console.error(err);\n }\n return error;\n }\n prepareVisitors() {\n this.listeners = {};\n let add = (plugin22, type, cb) => {\n if (!this.listeners[type]) this.listeners[type] = [];\n this.listeners[type].push([plugin22, cb]);\n };\n for (let plugin22 of this.plugins) {\n if (typeof plugin22 === \"object\") {\n for (let event in plugin22) {\n if (!PLUGIN_PROPS$1[event] && /^[A-Z]/.test(event)) {\n throw new Error(\n `Unknown event ${event} in ${plugin22.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`\n );\n }\n if (!NOT_VISITORS$1[event]) {\n if (typeof plugin22[event] === \"object\") {\n for (let filter in plugin22[event]) {\n if (filter === \"*\") {\n add(plugin22, event, plugin22[event][filter]);\n } else {\n add(\n plugin22,\n event + \"-\" + filter.toLowerCase(),\n plugin22[event][filter]\n );\n }\n }\n } else if (typeof plugin22[event] === \"function\") {\n add(plugin22, event, plugin22[event]);\n }\n }\n }\n }\n }\n this.hasListener = Object.keys(this.listeners).length > 0;\n }\n async runAsync() {\n this.plugin = 0;\n for (let i2 = 0; i2 < this.plugins.length; i2++) {\n let plugin22 = this.plugins[i2];\n let promise = this.runOnRoot(plugin22);\n if (isPromise$1(promise)) {\n try {\n await promise;\n } catch (error) {\n throw this.handleError(error);\n }\n }\n }\n this.prepareVisitors();\n if (this.hasListener) {\n let root2 = this.result.root;\n while (!root2[isClean$3]) {\n root2[isClean$3] = true;\n let stack = [toStack$1(root2)];\n while (stack.length > 0) {\n let promise = this.visitTick(stack);\n if (isPromise$1(promise)) {\n try {\n await promise;\n } catch (e2) {\n let node2 = stack[stack.length - 1].node;\n throw this.handleError(e2, node2);\n }\n }\n }\n }\n if (this.listeners.OnceExit) {\n for (let [plugin22, visitor] of this.listeners.OnceExit) {\n this.result.lastPlugin = plugin22;\n try {\n if (root2.type === \"document\") {\n let roots = root2.nodes.map(\n (subRoot) => visitor(subRoot, this.helpers)\n );\n await Promise.all(roots);\n } else {\n await visitor(root2, this.helpers);\n }\n } catch (e2) {\n throw this.handleError(e2);\n }\n }\n }\n }\n this.processed = true;\n return this.stringify();\n }\n runOnRoot(plugin22) {\n this.result.lastPlugin = plugin22;\n try {\n if (typeof plugin22 === \"object\" && plugin22.Once) {\n if (this.result.root.type === \"document\") {\n let roots = this.result.root.nodes.map(\n (root2) => plugin22.Once(root2, this.helpers)\n );\n if (isPromise$1(roots[0])) {\n return Promise.all(roots);\n }\n return roots;\n }\n return plugin22.Once(this.result.root, this.helpers);\n } else if (typeof plugin22 === \"function\") {\n return plugin22(this.result.root, this.result);\n }\n } catch (error) {\n throw this.handleError(error);\n }\n }\n stringify() {\n if (this.error) throw this.error;\n if (this.stringified) return this.result;\n this.stringified = true;\n this.sync();\n let opts = this.result.opts;\n let str = stringify$2$1;\n if (opts.syntax) str = opts.syntax.stringify;\n if (opts.stringifier) str = opts.stringifier;\n if (str.stringify) str = str.stringify;\n let map = new MapGenerator$1$1(str, this.result.root, this.result.opts);\n let data = map.generate();\n this.result.css = data[0];\n this.result.map = data[1];\n return this.result;\n }\n sync() {\n if (this.error) throw this.error;\n if (this.processed) return this.result;\n this.processed = true;\n if (this.processing) {\n throw this.getAsyncError();\n }\n for (let plugin22 of this.plugins) {\n let promise = this.runOnRoot(plugin22);\n if (isPromise$1(promise)) {\n throw this.getAsyncError();\n }\n }\n this.prepareVisitors();\n if (this.hasListener) {\n let root2 = this.result.root;\n while (!root2[isClean$3]) {\n root2[isClean$3] = true;\n this.walkSync(root2);\n }\n if (this.listeners.OnceExit) {\n if (root2.type === \"document\") {\n for (let subRoot of root2.nodes) {\n this.visitSync(this.listeners.OnceExit, subRoot);\n }\n } else {\n this.visitSync(this.listeners.OnceExit, root2);\n }\n }\n }\n return this.result;\n }\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!(\"from\" in this.opts)) {\n warnOnce$1$1(\n \"Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.\"\n );\n }\n }\n return this.async().then(onFulfilled, onRejected);\n }\n toString() {\n return this.css;\n }\n visitSync(visitors, node2) {\n for (let [plugin22, visitor] of visitors) {\n this.result.lastPlugin = plugin22;\n let promise;\n try {\n promise = visitor(node2, this.helpers);\n } catch (e2) {\n throw this.handleError(e2, node2.proxyOf);\n }\n if (node2.type !== \"root\" && node2.type !== \"document\" && !node2.parent) {\n return true;\n }\n if (isPromise$1(promise)) {\n throw this.getAsyncError();\n }\n }\n }\n visitTick(stack) {\n let visit2 = stack[stack.length - 1];\n let { node: node2, visitors } = visit2;\n if (node2.type !== \"root\" && node2.type !== \"document\" && !node2.parent) {\n stack.pop();\n return;\n }\n if (visitors.length > 0 && visit2.visitorIndex < visitors.length) {\n let [plugin22, visitor] = visitors[visit2.visitorIndex];\n visit2.visitorIndex += 1;\n if (visit2.visitorIndex === visitors.length) {\n visit2.visitors = [];\n visit2.visitorIndex = 0;\n }\n this.result.lastPlugin = plugin22;\n try {\n return visitor(node2.toProxy(), this.helpers);\n } catch (e2) {\n throw this.handleError(e2, node2);\n }\n }\n if (visit2.iterator !== 0) {\n let iterator = visit2.iterator;\n let child;\n while (child = node2.nodes[node2.indexes[iterator]]) {\n node2.indexes[iterator] += 1;\n if (!child[isClean$3]) {\n child[isClean$3] = true;\n stack.push(toStack$1(child));\n return;\n }\n }\n visit2.iterator = 0;\n delete node2.indexes[iterator];\n }\n let events = visit2.events;\n while (visit2.eventIndex < events.length) {\n let event = events[visit2.eventIndex];\n visit2.eventIndex += 1;\n if (event === CHILDREN$1) {\n if (node2.nodes && node2.nodes.length) {\n node2[isClean$3] = true;\n visit2.iterator = node2.getIterator();\n }\n return;\n } else if (this.listeners[event]) {\n visit2.visitors = this.listeners[event];\n return;\n }\n }\n stack.pop();\n }\n walkSync(node2) {\n node2[isClean$3] = true;\n let events = getEvents$1(node2);\n for (let event of events) {\n if (event === CHILDREN$1) {\n if (node2.nodes) {\n node2.each((child) => {\n if (!child[isClean$3]) this.walkSync(child);\n });\n }\n } else {\n let visitors = this.listeners[event];\n if (visitors) {\n if (this.visitSync(visitors, node2.toProxy())) return;\n }\n }\n }\n }\n warnings() {\n return this.sync().warnings();\n }\n get content() {\n return this.stringify().content;\n }\n get css() {\n return this.stringify().css;\n }\n get map() {\n return this.stringify().map;\n }\n get messages() {\n return this.sync().messages;\n }\n get opts() {\n return this.result.opts;\n }\n get processor() {\n return this.result.processor;\n }\n get root() {\n return this.sync().root;\n }\n get [Symbol.toStringTag]() {\n return \"LazyResult\";\n }\n};\nLazyResult$2$1.registerPostcss = (dependant) => {\n postcss$2$1 = dependant;\n};\nvar lazyResult$1 = LazyResult$2$1;\nLazyResult$2$1.default = LazyResult$2$1;\nRoot$3$1.registerLazyResult(LazyResult$2$1);\nDocument$2$1.registerLazyResult(LazyResult$2$1);\nlet MapGenerator2$1 = mapGenerator$1;\nlet stringify$1$1 = stringify_1$1;\nlet warnOnce2$1 = warnOnce$2$1;\nlet parse$1$1 = parse_1$1;\nconst Result$1$1 = result$1;\nlet NoWorkResult$1$1 = class NoWorkResult {\n constructor(processor2, css, opts) {\n css = css.toString();\n this.stringified = false;\n this._processor = processor2;\n this._css = css;\n this._opts = opts;\n this._map = void 0;\n let root2;\n let str = stringify$1$1;\n this.result = new Result$1$1(this._processor, root2, this._opts);\n this.result.css = css;\n let self = this;\n Object.defineProperty(this.result, \"root\", {\n get() {\n return self.root;\n }\n });\n let map = new MapGenerator2$1(str, root2, this._opts, css);\n if (map.isMap()) {\n let [generatedCSS, generatedMap] = map.generate();\n if (generatedCSS) {\n this.result.css = generatedCSS;\n }\n if (generatedMap) {\n this.result.map = generatedMap;\n }\n } else {\n map.clearAnnotation();\n this.result.css = map.css;\n }\n }\n async() {\n if (this.error) return Promise.reject(this.error);\n return Promise.resolve(this.result);\n }\n catch(onRejected) {\n return this.async().catch(onRejected);\n }\n finally(onFinally) {\n return this.async().then(onFinally, onFinally);\n }\n sync() {\n if (this.error) throw this.error;\n return this.result;\n }\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!(\"from\" in this._opts)) {\n warnOnce2$1(\n \"Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.\"\n );\n }\n }\n return this.async().then(onFulfilled, onRejected);\n }\n toString() {\n return this._css;\n }\n warnings() {\n return [];\n }\n get content() {\n return this.result.css;\n }\n get css() {\n return this.result.css;\n }\n get map() {\n return this.result.map;\n }\n get messages() {\n return [];\n }\n get opts() {\n return this.result.opts;\n }\n get processor() {\n return this.result.processor;\n }\n get root() {\n if (this._root) {\n return this._root;\n }\n let root2;\n let parser2 = parse$1$1;\n try {\n root2 = parser2(this._css, this._opts);\n } catch (error) {\n this.error = error;\n }\n if (this.error) {\n throw this.error;\n } else {\n this._root = root2;\n return root2;\n }\n }\n get [Symbol.toStringTag]() {\n return \"NoWorkResult\";\n }\n};\nvar noWorkResult$1 = NoWorkResult$1$1;\nNoWorkResult$1$1.default = NoWorkResult$1$1;\nlet NoWorkResult2$1 = noWorkResult$1;\nlet LazyResult$1$1 = lazyResult$1;\nlet Document$1$1 = document$1$1;\nlet Root$2$1 = root$1;\nlet Processor$1$1 = class Processor {\n constructor(plugins = []) {\n this.version = \"8.4.38\";\n this.plugins = this.normalize(plugins);\n }\n normalize(plugins) {\n let normalized = [];\n for (let i2 of plugins) {\n if (i2.postcss === true) {\n i2 = i2();\n } else if (i2.postcss) {\n i2 = i2.postcss;\n }\n if (typeof i2 === \"object\" && Array.isArray(i2.plugins)) {\n normalized = normalized.concat(i2.plugins);\n } else if (typeof i2 === \"object\" && i2.postcssPlugin) {\n normalized.push(i2);\n } else if (typeof i2 === \"function\") {\n normalized.push(i2);\n } else if (typeof i2 === \"object\" && (i2.parse || i2.stringify)) {\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error(\n \"PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.\"\n );\n }\n } else {\n throw new Error(i2 + \" is not a PostCSS plugin\");\n }\n }\n return normalized;\n }\n process(css, opts = {}) {\n if (!this.plugins.length && !opts.parser && !opts.stringifier && !opts.syntax) {\n return new NoWorkResult2$1(this, css, opts);\n } else {\n return new LazyResult$1$1(this, css, opts);\n }\n }\n use(plugin22) {\n this.plugins = this.plugins.concat(this.normalize([plugin22]));\n return this;\n }\n};\nvar processor$1 = Processor$1$1;\nProcessor$1$1.default = Processor$1$1;\nRoot$2$1.registerProcessor(Processor$1$1);\nDocument$1$1.registerProcessor(Processor$1$1);\nlet Declaration$1$1 = declaration$1;\nlet PreviousMap2$1 = previousMap$1;\nlet Comment$1$1 = comment$1;\nlet AtRule$1$1 = atRule$1;\nlet Input$1$1 = input$1;\nlet Root$1$1 = root$1;\nlet Rule$1$1 = rule$1;\nfunction fromJSON$1$1(json, inputs) {\n if (Array.isArray(json)) return json.map((n2) => fromJSON$1$1(n2));\n let { inputs: ownInputs, ...defaults } = json;\n if (ownInputs) {\n inputs = [];\n for (let input2 of ownInputs) {\n let inputHydrated = { ...input2, __proto__: Input$1$1.prototype };\n if (inputHydrated.map) {\n inputHydrated.map = {\n ...inputHydrated.map,\n __proto__: PreviousMap2$1.prototype\n };\n }\n inputs.push(inputHydrated);\n }\n }\n if (defaults.nodes) {\n defaults.nodes = json.nodes.map((n2) => fromJSON$1$1(n2, inputs));\n }\n if (defaults.source) {\n let { inputId, ...source } = defaults.source;\n defaults.source = source;\n if (inputId != null) {\n defaults.source.input = inputs[inputId];\n }\n }\n if (defaults.type === \"root\") {\n return new Root$1$1(defaults);\n } else if (defaults.type === \"decl\") {\n return new Declaration$1$1(defaults);\n } else if (defaults.type === \"rule\") {\n return new Rule$1$1(defaults);\n } else if (defaults.type === \"comment\") {\n return new Comment$1$1(defaults);\n } else if (defaults.type === \"atrule\") {\n return new AtRule$1$1(defaults);\n } else {\n throw new Error(\"Unknown node type: \" + json.type);\n }\n}\nvar fromJSON_1$1 = fromJSON$1$1;\nfromJSON$1$1.default = fromJSON$1$1;\nlet CssSyntaxError2$1 = cssSyntaxError$1;\nlet Declaration2$1 = declaration$1;\nlet LazyResult2$1 = lazyResult$1;\nlet Container2$1 = container$1;\nlet Processor2$1 = processor$1;\nlet stringify$5 = stringify_1$1;\nlet fromJSON$2 = fromJSON_1$1;\nlet Document22 = document$1$1;\nlet Warning2$1 = warning$1;\nlet Comment2$1 = comment$1;\nlet AtRule2$1 = atRule$1;\nlet Result2$1 = result$1;\nlet Input2$1 = input$1;\nlet parse$5 = parse_1$1;\nlet list$3 = list_1$1;\nlet Rule2$1 = rule$1;\nlet Root2$1 = root$1;\nlet Node2$1 = node$1;\nfunction postcss$3(...plugins) {\n if (plugins.length === 1 && Array.isArray(plugins[0])) {\n plugins = plugins[0];\n }\n return new Processor2$1(plugins);\n}\npostcss$3.plugin = function plugin(name, initializer) {\n let warningPrinted = false;\n function creator(...args) {\n if (console && console.warn && !warningPrinted) {\n warningPrinted = true;\n console.warn(\n name + \": postcss.plugin was deprecated. Migration guide:\\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration\"\n );\n if (process.env.LANG && process.env.LANG.startsWith(\"cn\")) {\n console.warn(\n name + \": 里面 postcss.plugin 被弃用. 迁移指南:\\nhttps://www.w3ctech.com/topic/2226\"\n );\n }\n }\n let transformer = initializer(...args);\n transformer.postcssPlugin = name;\n transformer.postcssVersion = new Processor2$1().version;\n return transformer;\n }\n let cache;\n Object.defineProperty(creator, \"postcss\", {\n get() {\n if (!cache) cache = creator();\n return cache;\n }\n });\n creator.process = function(css, processOpts, pluginOpts) {\n return postcss$3([creator(pluginOpts)]).process(css, processOpts);\n };\n return creator;\n};\npostcss$3.stringify = stringify$5;\npostcss$3.parse = parse$5;\npostcss$3.fromJSON = fromJSON$2;\npostcss$3.list = list$3;\npostcss$3.comment = (defaults) => new Comment2$1(defaults);\npostcss$3.atRule = (defaults) => new AtRule2$1(defaults);\npostcss$3.decl = (defaults) => new Declaration2$1(defaults);\npostcss$3.rule = (defaults) => new Rule2$1(defaults);\npostcss$3.root = (defaults) => new Root2$1(defaults);\npostcss$3.document = (defaults) => new Document22(defaults);\npostcss$3.CssSyntaxError = CssSyntaxError2$1;\npostcss$3.Declaration = Declaration2$1;\npostcss$3.Container = Container2$1;\npostcss$3.Processor = Processor2$1;\npostcss$3.Document = Document22;\npostcss$3.Comment = Comment2$1;\npostcss$3.Warning = Warning2$1;\npostcss$3.AtRule = AtRule2$1;\npostcss$3.Result = Result2$1;\npostcss$3.Input = Input2$1;\npostcss$3.Rule = Rule2$1;\npostcss$3.Root = Root2$1;\npostcss$3.Node = Node2$1;\nLazyResult2$1.registerPostcss(postcss$3);\nvar postcss_1$1 = postcss$3;\npostcss$3.default = postcss$3;\nconst postcss$1$1 = /* @__PURE__ */ getDefaultExportFromCjs$1(postcss_1$1);\npostcss$1$1.stringify;\npostcss$1$1.fromJSON;\npostcss$1$1.plugin;\npostcss$1$1.parse;\npostcss$1$1.list;\npostcss$1$1.document;\npostcss$1$1.comment;\npostcss$1$1.atRule;\npostcss$1$1.rule;\npostcss$1$1.decl;\npostcss$1$1.root;\npostcss$1$1.CssSyntaxError;\npostcss$1$1.Declaration;\npostcss$1$1.Container;\npostcss$1$1.Processor;\npostcss$1$1.Document;\npostcss$1$1.Comment;\npostcss$1$1.Warning;\npostcss$1$1.AtRule;\npostcss$1$1.Result;\npostcss$1$1.Input;\npostcss$1$1.Rule;\npostcss$1$1.Root;\npostcss$1$1.Node;\nvar __defProp22 = Object.defineProperty;\nvar __defNormalProp22 = (obj, key, value) => key in obj ? __defProp22(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __publicField22 = (obj, key, value) => __defNormalProp22(obj, typeof key !== \"symbol\" ? key + \"\" : key, value);\nfunction getDefaultExportFromCjs(x2) {\n return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, \"default\") ? x2[\"default\"] : x2;\n}\nfunction getAugmentedNamespace(n2) {\n if (n2.__esModule) return n2;\n var f2 = n2.default;\n if (typeof f2 == \"function\") {\n var a2 = function a22() {\n if (this instanceof a22) {\n return Reflect.construct(f2, arguments, this.constructor);\n }\n return f2.apply(this, arguments);\n };\n a2.prototype = f2.prototype;\n } else a2 = {};\n Object.defineProperty(a2, \"__esModule\", { value: true });\n Object.keys(n2).forEach(function(k) {\n var d = Object.getOwnPropertyDescriptor(n2, k);\n Object.defineProperty(a2, k, d.get ? d : {\n enumerable: true,\n get: function() {\n return n2[k];\n }\n });\n });\n return a2;\n}\nvar picocolors_browser = { exports: {} };\nvar x = String;\nvar create = function() {\n return { isColorSupported: false, reset: x, bold: x, dim: x, italic: x, underline: x, inverse: x, hidden: x, strikethrough: x, black: x, red: x, green: x, yellow: x, blue: x, magenta: x, cyan: x, white: x, gray: x, bgBlack: x, bgRed: x, bgGreen: x, bgYellow: x, bgBlue: x, bgMagenta: x, bgCyan: x, bgWhite: x };\n};\npicocolors_browser.exports = create();\npicocolors_browser.exports.createColors = create;\nvar picocolors_browserExports = picocolors_browser.exports;\nconst __viteBrowserExternal = {};\nconst __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__: null,\n default: __viteBrowserExternal\n}, Symbol.toStringTag, { value: \"Module\" }));\nconst require$$2 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1);\nlet pico = picocolors_browserExports;\nlet terminalHighlight$1 = require$$2;\nlet CssSyntaxError$3 = class CssSyntaxError2 extends Error {\n constructor(message, line, column, source, file, plugin22) {\n super(message);\n this.name = \"CssSyntaxError\";\n this.reason = message;\n if (file) {\n this.file = file;\n }\n if (source) {\n this.source = source;\n }\n if (plugin22) {\n this.plugin = plugin22;\n }\n if (typeof line !== \"undefined\" && typeof column !== \"undefined\") {\n if (typeof line === \"number\") {\n this.line = line;\n this.column = column;\n } else {\n this.line = line.line;\n this.column = line.column;\n this.endLine = column.line;\n this.endColumn = column.column;\n }\n }\n this.setMessage();\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, CssSyntaxError2);\n }\n }\n setMessage() {\n this.message = this.plugin ? this.plugin + \": \" : \"\";\n this.message += this.file ? this.file : \"<css input>\";\n if (typeof this.line !== \"undefined\") {\n this.message += \":\" + this.line + \":\" + this.column;\n }\n this.message += \": \" + this.reason;\n }\n showSourceCode(color) {\n if (!this.source) return \"\";\n let css = this.source;\n if (color == null) color = pico.isColorSupported;\n if (terminalHighlight$1) {\n if (color) css = terminalHighlight$1(css);\n }\n let lines = css.split(/\\r?\\n/);\n let start = Math.max(this.line - 3, 0);\n let end = Math.min(this.line + 2, lines.length);\n let maxWidth = String(end).length;\n let mark, aside;\n if (color) {\n let { bold, gray, red } = pico.createColors(true);\n mark = (text) => bold(red(text));\n aside = (text) => gray(text);\n } else {\n mark = aside = (str) => str;\n }\n return lines.slice(start, end).map((line, index2) => {\n let number = start + 1 + index2;\n let gutter = \" \" + (\" \" + number).slice(-maxWidth) + \" | \";\n if (number === this.line) {\n let spacing = aside(gutter.replace(/\\d/g, \" \")) + line.slice(0, this.column - 1).replace(/[^\\t]/g, \" \");\n return mark(\">\") + aside(gutter) + line + \"\\n \" + spacing + mark(\"^\");\n }\n return \" \" + aside(gutter) + line;\n }).join(\"\\n\");\n }\n toString() {\n let code = this.showSourceCode();\n if (code) {\n code = \"\\n\\n\" + code + \"\\n\";\n }\n return this.name + \": \" + this.message + code;\n }\n};\nvar cssSyntaxError = CssSyntaxError$3;\nCssSyntaxError$3.default = CssSyntaxError$3;\nvar symbols = {};\nsymbols.isClean = Symbol(\"isClean\");\nsymbols.my = Symbol(\"my\");\nconst DEFAULT_RAW = {\n after: \"\\n\",\n beforeClose: \"\\n\",\n beforeComment: \"\\n\",\n beforeDecl: \"\\n\",\n beforeOpen: \" \",\n beforeRule: \"\\n\",\n colon: \": \",\n commentLeft: \" \",\n commentRight: \" \",\n emptyBody: \"\",\n indent: \" \",\n semicolon: false\n};\nfunction capitalize(str) {\n return str[0].toUpperCase() + str.slice(1);\n}\nlet Stringifier$2 = class Stringifier2 {\n constructor(builder) {\n this.builder = builder;\n }\n atrule(node2, semicolon) {\n let name = \"@\" + node2.name;\n let params = node2.params ? this.rawValue(node2, \"params\") : \"\";\n if (typeof node2.raws.afterName !== \"undefined\") {\n name += node2.raws.afterName;\n } else if (params) {\n name += \" \";\n }\n if (node2.nodes) {\n this.block(node2, name + params);\n } else {\n let end = (node2.raws.between || \"\") + (semicolon ? \";\" : \"\");\n this.builder(name + params + end, node2);\n }\n }\n beforeAfter(node2, detect) {\n let value;\n if (node2.type === \"decl\") {\n value = this.raw(node2, null, \"beforeDecl\");\n } else if (node2.type === \"comment\") {\n value = this.raw(node2, null, \"beforeComment\");\n } else if (detect === \"before\") {\n value = this.raw(node2, null, \"beforeRule\");\n } else {\n value = this.raw(node2, null, \"beforeClose\");\n }\n let buf = node2.parent;\n let depth = 0;\n while (buf && buf.type !== \"root\") {\n depth += 1;\n buf = buf.parent;\n }\n if (value.includes(\"\\n\")) {\n let indent = this.raw(node2, null, \"indent\");\n if (indent.length) {\n for (let step = 0; step < depth; step++) value += indent;\n }\n }\n return value;\n }\n block(node2, start) {\n let between = this.raw(node2, \"between\", \"beforeOpen\");\n this.builder(start + between + \"{\", node2, \"start\");\n let after;\n if (node2.nodes && node2.nodes.length) {\n this.body(node2);\n after = this.raw(node2, \"after\");\n } else {\n after = this.raw(node2, \"after\", \"emptyBody\");\n }\n if (after) this.builder(after);\n this.builder(\"}\", node2, \"end\");\n }\n body(node2) {\n let last = node2.nodes.length - 1;\n while (last > 0) {\n if (node2.nodes[last].type !== \"comment\") break;\n last -= 1;\n }\n let semicolon = this.raw(node2, \"semicolon\");\n for (let i2 = 0; i2 < node2.nodes.length; i2++) {\n let child = node2.nodes[i2];\n let before = this.raw(child, \"before\");\n if (before) this.builder(before);\n this.stringify(child, last !== i2 || semicolon);\n }\n }\n comment(node2) {\n let left = this.raw(node2, \"left\", \"commentLeft\");\n let right = this.raw(node2, \"right\", \"commentRight\");\n this.builder(\"/*\" + left + node2.text + right + \"*/\", node2);\n }\n decl(node2, semicolon) {\n let between = this.raw(node2, \"between\", \"colon\");\n let string = node2.prop + between + this.rawValue(node2, \"value\");\n if (node2.important) {\n string += node2.raws.important || \" !important\";\n }\n if (semicolon) string += \";\";\n this.builder(string, node2);\n }\n document(node2) {\n this.body(node2);\n }\n raw(node2, own, detect) {\n let value;\n if (!detect) detect = own;\n if (own) {\n value = node2.raws[own];\n if (typeof value !== \"undefined\") return value;\n }\n let parent = node2.parent;\n if (detect === \"before\") {\n if (!parent || parent.type === \"root\" && parent.first === node2) {\n return \"\";\n }\n if (parent && parent.type === \"document\") {\n return \"\";\n }\n }\n if (!parent) return DEFAULT_RAW[detect];\n let root2 = node2.root();\n if (!root2.rawCache) root2.rawCache = {};\n if (typeof root2.rawCache[detect] !== \"undefined\") {\n return root2.rawCache[detect];\n }\n if (detect === \"before\" || detect === \"after\") {\n return this.beforeAfter(node2, detect);\n } else {\n let method = \"raw\" + capitalize(detect);\n if (this[method]) {\n value = this[method](root2, node2);\n } else {\n root2.walk((i2) => {\n value = i2.raws[own];\n if (typeof value !== \"undefined\") return false;\n });\n }\n }\n if (typeof value === \"undefined\") value = DEFAULT_RAW[detect];\n root2.rawCache[detect] = value;\n return value;\n }\n rawBeforeClose(root2) {\n let value;\n root2.walk((i2) => {\n if (i2.nodes && i2.nodes.length > 0) {\n if (typeof i2.raws.after !== \"undefined\") {\n value = i2.raws.after;\n if (value.includes(\"\\n\")) {\n value = value.replace(/[^\\n]+$/, \"\");\n }\n return false;\n }\n }\n });\n if (value) value = value.replace(/\\S/g, \"\");\n return value;\n }\n rawBeforeComment(root2, node2) {\n let value;\n root2.walkComments((i2) => {\n if (typeof i2.raws.before !== \"undefined\") {\n value = i2.raws.before;\n if (value.includes(\"\\n\")) {\n value = value.replace(/[^\\n]+$/, \"\");\n }\n return false;\n }\n });\n if (typeof value === \"undefined\") {\n value = this.raw(node2, null, \"beforeDecl\");\n } else if (value) {\n value = value.replace(/\\S/g, \"\");\n }\n return value;\n }\n rawBeforeDecl(root2, node2) {\n let value;\n root2.walkDecls((i2) => {\n if (typeof i2.raws.before !== \"undefined\") {\n value = i2.raws.before;\n if (value.includes(\"\\n\")) {\n value = value.replace(/[^\\n]+$/, \"\");\n }\n return false;\n }\n });\n if (typeof value === \"undefined\") {\n value = this.raw(node2, null, \"beforeRule\");\n } else if (value) {\n value = value.replace(/\\S/g, \"\");\n }\n return value;\n }\n rawBeforeOpen(root2) {\n let value;\n root2.walk((i2) => {\n if (i2.type !== \"decl\") {\n value = i2.raws.between;\n if (typeof value !== \"undefined\") return false;\n }\n });\n return value;\n }\n rawBeforeRule(root2) {\n let value;\n root2.walk((i2) => {\n if (i2.nodes && (i2.parent !== root2 || root2.first !== i2)) {\n if (typeof i2.raws.before !== \"undefined\") {\n value = i2.raws.before;\n if (value.includes(\"\\n\")) {\n value = value.replace(/[^\\n]+$/, \"\");\n }\n return false;\n }\n }\n });\n if (value) value = value.replace(/\\S/g, \"\");\n return value;\n }\n rawColon(root2) {\n let value;\n root2.walkDecls((i2) => {\n if (typeof i2.raws.between !== \"undefined\") {\n value = i2.raws.between.replace(/[^\\s:]/g, \"\");\n return false;\n }\n });\n return value;\n }\n rawEmptyBody(root2) {\n let value;\n root2.walk((i2) => {\n if (i2.nodes && i2.nodes.length === 0) {\n value = i2.raws.after;\n if (typeof value !== \"undefined\") return false;\n }\n });\n return value;\n }\n rawIndent(root2) {\n if (root2.raws.indent) return root2.raws.indent;\n let value;\n root2.walk((i2) => {\n let p = i2.parent;\n if (p && p !== root2 && p.parent && p.parent === root2) {\n if (typeof i2.raws.before !== \"undefined\") {\n let parts = i2.raws.before.split(\"\\n\");\n value = parts[parts.length - 1];\n value = value.replace(/\\S/g, \"\");\n return false;\n }\n }\n });\n return value;\n }\n rawSemicolon(root2) {\n let value;\n root2.walk((i2) => {\n if (i2.nodes && i2.nodes.length && i2.last.type === \"decl\") {\n value = i2.raws.semicolon;\n if (typeof value !== \"undefined\") return false;\n }\n });\n return value;\n }\n rawValue(node2, prop) {\n let value = node2[prop];\n let raw = node2.raws[prop];\n if (raw && raw.value === value) {\n return raw.raw;\n }\n return value;\n }\n root(node2) {\n this.body(node2);\n if (node2.raws.after) this.builder(node2.raws.after);\n }\n rule(node2) {\n this.block(node2, this.rawValue(node2, \"selector\"));\n if (node2.raws.ownSemicolon) {\n this.builder(node2.raws.ownSemicolon, node2, \"end\");\n }\n }\n stringify(node2, semicolon) {\n if (!this[node2.type]) {\n throw new Error(\n \"Unknown AST node type \" + node2.type + \". Maybe you need to change PostCSS stringifier.\"\n );\n }\n this[node2.type](node2, semicolon);\n }\n};\nvar stringifier = Stringifier$2;\nStringifier$2.default = Stringifier$2;\nlet Stringifier$1 = stringifier;\nfunction stringify$4(node2, builder) {\n let str = new Stringifier$1(builder);\n str.stringify(node2);\n}\nvar stringify_1 = stringify$4;\nstringify$4.default = stringify$4;\nlet { isClean: isClean$2, my: my$2 } = symbols;\nlet CssSyntaxError$2 = cssSyntaxError;\nlet Stringifier22 = stringifier;\nlet stringify$3 = stringify_1;\nfunction cloneNode(obj, parent) {\n let cloned = new obj.constructor();\n for (let i2 in obj) {\n if (!Object.prototype.hasOwnProperty.call(obj, i2)) {\n continue;\n }\n if (i2 === \"proxyCache\") continue;\n let value = obj[i2];\n let type = typeof value;\n if (i2 === \"parent\" && type === \"object\") {\n if (parent) cloned[i2] = parent;\n } else if (i2 === \"source\") {\n cloned[i2] = value;\n } else if (Array.isArray(value)) {\n cloned[i2] = value.map((j) => cloneNode(j, cloned));\n } else {\n if (type === \"object\" && value !== null) value = cloneNode(value);\n cloned[i2] = value;\n }\n }\n return cloned;\n}\nlet Node$4 = class Node3 {\n constructor(defaults = {}) {\n this.raws = {};\n this[isClean$2] = false;\n this[my$2] = true;\n for (let name in defaults) {\n if (name === \"nodes\") {\n this.nodes = [];\n for (let node2 of defaults[name]) {\n if (typeof node2.clone === \"function\") {\n this.append(node2.clone());\n } else {\n this.append(node2);\n }\n }\n } else {\n this[name] = defaults[name];\n }\n }\n }\n addToError(error) {\n error.postcssNode = this;\n if (error.stack && this.source && /\\n\\s{4}at /.test(error.stack)) {\n let s2 = this.source;\n error.stack = error.stack.replace(\n /\\n\\s{4}at /,\n `$&${s2.input.from}:${s2.start.line}:${s2.start.column}$&`\n );\n }\n return error;\n }\n after(add) {\n this.parent.insertAfter(this, add);\n return this;\n }\n assign(overrides = {}) {\n for (let name in overrides) {\n this[name] = overrides[name];\n }\n return this;\n }\n before(add) {\n this.parent.insertBefore(this, add);\n return this;\n }\n cleanRaws(keepBetween) {\n delete this.raws.before;\n delete this.raws.after;\n if (!keepBetween) delete this.raws.between;\n }\n clone(overrides = {}) {\n let cloned = cloneNode(this);\n for (let name in overrides) {\n cloned[name] = overrides[name];\n }\n return cloned;\n }\n cloneAfter(overrides = {}) {\n let cloned = this.clone(overrides);\n this.parent.insertAfter(this, cloned);\n return cloned;\n }\n cloneBefore(overrides = {}) {\n let cloned = this.clone(overrides);\n this.parent.insertBefore(this, cloned);\n return cloned;\n }\n error(message, opts = {}) {\n if (this.source) {\n let { end, start } = this.rangeBy(opts);\n return this.source.input.error(\n message,\n { column: start.column, line: start.line },\n { column: end.column, line: end.line },\n opts\n );\n }\n return new CssSyntaxError$2(message);\n }\n getProxyProcessor() {\n return {\n get(node2, prop) {\n if (prop === \"proxyOf\") {\n return node2;\n } else if (prop === \"root\") {\n return () => node2.root().toProxy();\n } else {\n return node2[prop];\n }\n },\n set(node2, prop, value) {\n if (node2[prop] === value) return true;\n node2[prop] = value;\n if (prop === \"prop\" || prop === \"value\" || prop === \"name\" || prop === \"params\" || prop === \"important\" || /* c8 ignore next */\n prop === \"text\") {\n node2.markDirty();\n }\n return true;\n }\n };\n }\n markDirty() {\n if (this[isClean$2]) {\n this[isClean$2] = false;\n let next = this;\n while (next = next.parent) {\n next[isClean$2] = false;\n }\n }\n }\n next() {\n if (!this.parent) return void 0;\n let index2 = this.parent.index(this);\n return this.parent.nodes[index2 + 1];\n }\n positionBy(opts, stringRepresentation) {\n let pos = this.source.start;\n if (opts.index) {\n pos = this.positionInside(opts.index, stringRepresentation);\n } else if (opts.word) {\n stringRepresentation = this.toString();\n let index2 = stringRepresentation.indexOf(opts.word);\n if (index2 !== -1) pos = this.positionInside(index2, stringRepresentation);\n }\n return pos;\n }\n positionInside(index2, stringRepresentation) {\n let string = stringRepresentation || this.toString();\n let column = this.source.start.column;\n let line = this.source.start.line;\n for (let i2 = 0; i2 < index2; i2++) {\n if (string[i2] === \"\\n\") {\n column = 1;\n line += 1;\n } else {\n column += 1;\n }\n }\n return { column, line };\n }\n prev() {\n if (!this.parent) return void 0;\n let index2 = this.parent.index(this);\n return this.parent.nodes[index2 - 1];\n }\n rangeBy(opts) {\n let start = {\n column: this.source.start.column,\n line: this.source.start.line\n };\n let end = this.source.end ? {\n column: this.source.end.column + 1,\n line: this.source.end.line\n } : {\n column: start.column + 1,\n line: start.line\n };\n if (opts.word) {\n let stringRepresentation = this.toString();\n let index2 = stringRepresentation.indexOf(opts.word);\n if (index2 !== -1) {\n start = this.positionInside(index2, stringRepresentation);\n end = this.positionInside(index2 + opts.word.length, stringRepresentation);\n }\n } else {\n if (opts.start) {\n start = {\n column: opts.start.column,\n line: opts.start.line\n };\n } else if (opts.index) {\n start = this.positionInside(opts.index);\n }\n if (opts.end) {\n end = {\n column: opts.end.column,\n line: opts.end.line\n };\n } else if (typeof opts.endIndex === \"number\") {\n end = this.positionInside(opts.endIndex);\n } else if (opts.index) {\n end = this.positionInside(opts.index + 1);\n }\n }\n if (end.line < start.line || end.line === start.line && end.column <= start.column) {\n end = { column: start.column + 1, line: start.line };\n }\n return { end, start };\n }\n raw(prop, defaultType) {\n let str = new Stringifier22();\n return str.raw(this, prop, defaultType);\n }\n remove() {\n if (this.parent) {\n this.parent.removeChild(this);\n }\n this.parent = void 0;\n return this;\n }\n replaceWith(...nodes) {\n if (this.parent) {\n let bookmark = this;\n let foundSelf = false;\n for (let node2 of nodes) {\n if (node2 === this) {\n foundSelf = true;\n } else if (foundSelf) {\n this.parent.insertAfter(bookmark, node2);\n bookmark = node2;\n } else {\n this.parent.insertBefore(bookmark, node2);\n }\n }\n if (!foundSelf) {\n this.remove();\n }\n }\n return this;\n }\n root() {\n let result2 = this;\n while (result2.parent && result2.parent.type !== \"document\") {\n result2 = result2.parent;\n }\n return result2;\n }\n toJSON(_, inputs) {\n let fixed = {};\n let emitInputs = inputs == null;\n inputs = inputs || /* @__PURE__ */ new Map();\n let inputsNextIndex = 0;\n for (let name in this) {\n if (!Object.prototype.hasOwnProperty.call(this, name)) {\n continue;\n }\n if (name === \"parent\" || name === \"proxyCache\") continue;\n let value = this[name];\n if (Array.isArray(value)) {\n fixed[name] = value.map((i2) => {\n if (typeof i2 === \"object\" && i2.toJSON) {\n return i2.toJSON(null, inputs);\n } else {\n return i2;\n }\n });\n } else if (typeof value === \"object\" && value.toJSON) {\n fixed[name] = value.toJSON(null, inputs);\n } else if (name === \"source\") {\n let inputId = inputs.get(value.input);\n if (inputId == null) {\n inputId = inputsNextIndex;\n inputs.set(value.input, inputsNextIndex);\n inputsNextIndex++;\n }\n fixed[name] = {\n end: value.end,\n inputId,\n start: value.start\n };\n } else {\n fixed[name] = value;\n }\n }\n if (emitInputs) {\n fixed.inputs = [...inputs.keys()].map((input2) => input2.toJSON());\n }\n return fixed;\n }\n toProxy() {\n if (!this.proxyCache) {\n this.proxyCache = new Proxy(this, this.getProxyProcessor());\n }\n return this.proxyCache;\n }\n toString(stringifier2 = stringify$3) {\n if (stringifier2.stringify) stringifier2 = stringifier2.stringify;\n let result2 = \"\";\n stringifier2(this, (i2) => {\n result2 += i2;\n });\n return result2;\n }\n warn(result2, text, opts) {\n let data = { node: this };\n for (let i2 in opts) data[i2] = opts[i2];\n return result2.warn(text, data);\n }\n get proxyOf() {\n return this;\n }\n};\nvar node = Node$4;\nNode$4.default = Node$4;\nlet Node$3 = node;\nlet Declaration$4 = class Declaration2 extends Node$3 {\n constructor(defaults) {\n if (defaults && typeof defaults.value !== \"undefined\" && typeof defaults.value !== \"string\") {\n defaults = { ...defaults, value: String(defaults.value) };\n }\n super(defaults);\n this.type = \"decl\";\n }\n get variable() {\n return this.prop.startsWith(\"--\") || this.prop[0] === \"$\";\n }\n};\nvar declaration = Declaration$4;\nDeclaration$4.default = Declaration$4;\nlet urlAlphabet = \"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\";\nlet customAlphabet = (alphabet, defaultSize = 21) => {\n return (size = defaultSize) => {\n let id = \"\";\n let i2 = size;\n while (i2--) {\n id += alphabet[Math.random() * alphabet.length | 0];\n }\n return id;\n };\n};\nlet nanoid$1 = (size = 21) => {\n let id = \"\";\n let i2 = size;\n while (i2--) {\n id += urlAlphabet[Math.random() * 64 | 0];\n }\n return id;\n};\nvar nonSecure = { nanoid: nanoid$1, customAlphabet };\nlet { SourceMapConsumer: SourceMapConsumer$2, SourceMapGenerator: SourceMapGenerator$2 } = require$$2;\nlet { existsSync, readFileSync } = require$$2;\nlet { dirname: dirname$1, join } = require$$2;\nfunction fromBase64(str) {\n if (Buffer) {\n return Buffer.from(str, \"base64\").toString();\n } else {\n return window.atob(str);\n }\n}\nlet PreviousMap$2 = class PreviousMap2 {\n constructor(css, opts) {\n if (opts.map === false) return;\n this.loadAnnotation(css);\n this.inline = this.startWith(this.annotation, \"data:\");\n let prev = opts.map ? opts.map.prev : void 0;\n let text = this.loadMap(opts.from, prev);\n if (!this.mapFile && opts.from) {\n this.mapFile = opts.from;\n }\n if (this.mapFile) this.root = dirname$1(this.mapFile);\n if (text) this.text = text;\n }\n consumer() {\n if (!this.consumerCache) {\n this.consumerCache = new SourceMapConsumer$2(this.text);\n }\n return this.consumerCache;\n }\n decodeInline(text) {\n let baseCharsetUri = /^data:application\\/json;charset=utf-?8;base64,/;\n let baseUri = /^data:application\\/json;base64,/;\n let charsetUri = /^data:application\\/json;charset=utf-?8,/;\n let uri = /^data:application\\/json,/;\n if (charsetUri.test(text) || uri.test(text)) {\n return decodeURIComponent(text.substr(RegExp.lastMatch.length));\n }\n if (baseCharsetUri.test(text) || baseUri.test(text)) {\n return fromBase64(text.substr(RegExp.lastMatch.length));\n }\n let encoding = text.match(/data:application\\/json;([^,]+),/)[1];\n throw new Error(\"Unsupported source map encoding \" + encoding);\n }\n getAnnotationURL(sourceMapString) {\n return sourceMapString.replace(/^\\/\\*\\s*# sourceMappingURL=/, \"\").trim();\n }\n isMap(map) {\n if (typeof map !== \"object\") return false;\n return typeof map.mappings === \"string\" || typeof map._mappings === \"string\" || Array.isArray(map.sections);\n }\n loadAnnotation(css) {\n let comments = css.match(/\\/\\*\\s*# sourceMappingURL=/gm);\n if (!comments) return;\n let start = css.lastIndexOf(comments.pop());\n let end = css.indexOf(\"*/\", start);\n if (start > -1 && end > -1) {\n this.annotation = this.getAnnotationURL(css.substring(start, end));\n }\n }\n loadFile(path) {\n this.root = dirname$1(path);\n if (existsSync(path)) {\n this.mapFile = path;\n return readFileSync(path, \"utf-8\").toString().trim();\n }\n }\n loadMap(file, prev) {\n if (prev === false) return false;\n if (prev) {\n if (typeof prev === \"string\") {\n return prev;\n } else if (typeof prev === \"function\") {\n let prevPath = prev(file);\n if (prevPath) {\n let map = this.loadFile(prevPath);\n if (!map) {\n throw new Error(\n \"Unable to load previous source map: \" + prevPath.toString()\n );\n }\n return map;\n }\n } else if (prev instanceof SourceMapConsumer$2) {\n return SourceMapGenerator$2.fromSourceMap(prev).toString();\n } else if (prev instanceof SourceMapGenerator$2) {\n return prev.toString();\n } else if (this.isMap(prev)) {\n return JSON.stringify(prev);\n } else {\n throw new Error(\n \"Unsupported previous source map format: \" + prev.toString()\n );\n }\n } else if (this.inline) {\n return this.decodeInline(this.annotation);\n } else if (this.annotation) {\n let map = this.annotation;\n if (file) map = join(dirname$1(file), map);\n return this.loadFile(map);\n }\n }\n startWith(string, start) {\n if (!string) return false;\n return string.substr(0, start.length) === start;\n }\n withContent() {\n return !!(this.consumer().sourcesContent && this.consumer().sourcesContent.length > 0);\n }\n};\nvar previousMap = PreviousMap$2;\nPreviousMap$2.default = PreviousMap$2;\nlet { SourceMapConsumer: SourceMapConsumer$1, SourceMapGenerator: SourceMapGenerator$1 } = require$$2;\nlet { fileURLToPath, pathToFileURL: pathToFileURL$1 } = require$$2;\nlet { isAbsolute, resolve: resolve$1 } = require$$2;\nlet { nanoid } = nonSecure;\nlet terminalHighlight = require$$2;\nlet CssSyntaxError$1 = cssSyntaxError;\nlet PreviousMap$1 = previousMap;\nlet fromOffsetCache = Symbol(\"fromOffsetCache\");\nlet sourceMapAvailable$1 = Boolean(SourceMapConsumer$1 && SourceMapGenerator$1);\nlet pathAvailable$1 = Boolean(resolve$1 && isAbsolute);\nlet Input$4 = class Input2 {\n constructor(css, opts = {}) {\n if (css === null || typeof css === \"undefined\" || typeof css === \"object\" && !css.toString) {\n throw new Error(`PostCSS received ${css} instead of CSS string`);\n }\n this.css = css.toString();\n if (this.css[0] === \"\\uFEFF\" || this.css[0] === \"￾\") {\n this.hasBOM = true;\n this.css = this.css.slice(1);\n } else {\n this.hasBOM = false;\n }\n if (opts.from) {\n if (!pathAvailable$1 || /^\\w+:\\/\\//.test(opts.from) || isAbsolute(opts.from)) {\n this.file = opts.from;\n } else {\n this.file = resolve$1(opts.from);\n }\n }\n if (pathAvailable$1 && sourceMapAvailable$1) {\n let map = new PreviousMap$1(this.css, opts);\n if (map.text) {\n this.map = map;\n let file = map.consumer().file;\n if (!this.file && file) this.file = this.mapResolve(file);\n }\n }\n if (!this.file) {\n this.id = \"<input css \" + nanoid(6) + \">\";\n }\n if (this.map) this.map.file = this.from;\n }\n error(message, line, column, opts = {}) {\n let result2, endLine, endColumn;\n if (line && typeof line === \"object\") {\n let start = line;\n let end = column;\n if (typeof start.offset === \"number\") {\n let pos = this.fromOffset(start.offset);\n line = pos.line;\n column = pos.col;\n } else {\n line = start.line;\n column = start.column;\n }\n if (typeof end.offset === \"number\") {\n let pos = this.fromOffset(end.offset);\n endLine = pos.line;\n endColumn = pos.col;\n } else {\n endLine = end.line;\n endColumn = end.column;\n }\n } else if (!column) {\n let pos = this.fromOffset(line);\n line = pos.line;\n column = pos.col;\n }\n let origin = this.origin(line, column, endLine, endColumn);\n if (origin) {\n result2 = new CssSyntaxError$1(\n message,\n origin.endLine === void 0 ? origin.line : { column: origin.column, line: origin.line },\n origin.endLine === void 0 ? origin.column : { column: origin.endColumn, line: origin.endLine },\n origin.source,\n origin.file,\n opts.plugin\n );\n } else {\n result2 = new CssSyntaxError$1(\n message,\n endLine === void 0 ? line : { column, line },\n endLine === void 0 ? column : { column: endColumn, line: endLine },\n this.css,\n this.file,\n opts.plugin\n );\n }\n result2.input = { column, endColumn, endLine, line, source: this.css };\n if (this.file) {\n if (pathToFileURL$1) {\n result2.input.url = pathToFileURL$1(this.file).toString();\n }\n result2.input.file = this.file;\n }\n return result2;\n }\n fromOffset(offset) {\n let lastLine, lineToIndex;\n if (!this[fromOffsetCache]) {\n let lines = this.css.split(\"\\n\");\n lineToIndex = new Array(lines.length);\n let prevIndex = 0;\n for (let i2 = 0, l2 = lines.length; i2 < l2; i2++) {\n lineToIndex[i2] = prevIndex;\n prevIndex += lines[i2].length + 1;\n }\n this[fromOffsetCache] = lineToIndex;\n } else {\n lineToIndex = this[fromOffsetCache];\n }\n lastLine = lineToIndex[lineToIndex.length - 1];\n let min = 0;\n if (offset >= lastLine) {\n min = lineToIndex.length - 1;\n } else {\n let max = lineToIndex.length - 2;\n let mid;\n while (min < max) {\n mid = min + (max - min >> 1);\n if (offset < lineToIndex[mid]) {\n max = mid - 1;\n } else if (offset >= lineToIndex[mid + 1]) {\n min = mid + 1;\n } else {\n min = mid;\n break;\n }\n }\n }\n return {\n col: offset - lineToIndex[min] + 1,\n line: min + 1\n };\n }\n mapResolve(file) {\n if (/^\\w+:\\/\\//.test(file)) {\n return file;\n }\n return resolve$1(this.map.consumer().sourceRoot || this.map.root || \".\", file);\n }\n origin(line, column, endLine, endColumn) {\n if (!this.map) return false;\n let consumer = this.map.consumer();\n let from = consumer.originalPositionFor({ column, line });\n if (!from.source) return false;\n let to;\n if (typeof endLine === \"number\") {\n to = consumer.originalPositionFor({ column: endColumn, line: endLine });\n }\n let fromUrl;\n if (isAbsolute(from.source)) {\n fromUrl = pathToFileURL$1(from.source);\n } else {\n fromUrl = new URL(\n from.source,\n this.map.consumer().sourceRoot || pathToFileURL$1(this.map.mapFile)\n );\n }\n let result2 = {\n column: from.column,\n endColumn: to && to.column,\n endLine: to && to.line,\n line: from.line,\n url: fromUrl.toString()\n };\n if (fromUrl.protocol === \"file:\") {\n if (fileURLToPath) {\n result2.file = fileURLToPath(fromUrl);\n } else {\n throw new Error(`file: protocol is not available in this PostCSS build`);\n }\n }\n let source = consumer.sourceContentFor(from.source);\n if (source) result2.source = source;\n return result2;\n }\n toJSON() {\n let json = {};\n for (let name of [\"hasBOM\", \"css\", \"file\", \"id\"]) {\n if (this[name] != null) {\n json[name] = this[name];\n }\n }\n if (this.map) {\n json.map = { ...this.map };\n if (json.map.consumerCache) {\n json.map.consumerCache = void 0;\n }\n }\n return json;\n }\n get from() {\n return this.file || this.id;\n }\n};\nvar input = Input$4;\nInput$4.default = Input$4;\nif (terminalHighlight && terminalHighlight.registerInput) {\n terminalHighlight.registerInput(Input$4);\n}\nlet { SourceMapConsumer, SourceMapGenerator } = require$$2;\nlet { dirname, relative, resolve, sep } = require$$2;\nlet { pathToFileURL } = require$$2;\nlet Input$3 = input;\nlet sourceMapAvailable = Boolean(SourceMapConsumer && SourceMapGenerator);\nlet pathAvailable = Boolean(dirname && resolve && relative && sep);\nlet MapGenerator$2 = class MapGenerator2 {\n constructor(stringify2, root2, opts, cssString) {\n this.stringify = stringify2;\n this.mapOpts = opts.map || {};\n this.root = root2;\n this.opts = opts;\n this.css = cssString;\n this.originalCSS = cssString;\n this.usesFileUrls = !this.mapOpts.from && this.mapOpts.absolute;\n this.memoizedFileURLs = /* @__PURE__ */ new Map();\n this.memoizedPaths = /* @__PURE__ */ new Map();\n this.memoizedURLs = /* @__PURE__ */ new Map();\n }\n addAnnotation() {\n let content;\n if (this.isInline()) {\n content = \"data:application/json;base64,\" + this.toBase64(this.map.toString());\n } else if (typeof this.mapOpts.annotation === \"string\") {\n content = this.mapOpts.annotation;\n } else if (typeof this.mapOpts.annotation === \"function\") {\n content = this.mapOpts.annotation(this.opts.to, this.root);\n } else {\n content = this.outputFile() + \".map\";\n }\n let eol = \"\\n\";\n if (this.css.includes(\"\\r\\n\")) eol = \"\\r\\n\";\n this.css += eol + \"/*# sourceMappingURL=\" + content + \" */\";\n }\n applyPrevMaps() {\n for (let prev of this.previous()) {\n let from = this.toUrl(this.path(prev.file));\n let root2 = prev.root || dirname(prev.file);\n let map;\n if (this.mapOpts.sourcesContent === false) {\n map = new SourceMapConsumer(prev.text);\n if (map.sourcesContent) {\n map.sourcesContent = null;\n }\n } else {\n map = prev.consumer();\n }\n this.map.applySourceMap(map, from, this.toUrl(this.path(root2)));\n }\n }\n clearAnnotation() {\n if (this.mapOpts.annotation === false) return;\n if (this.root) {\n let node2;\n for (let i2 = this.root.nodes.length - 1; i2 >= 0; i2--) {\n node2 = this.root.nodes[i2];\n if (node2.type !== \"comment\") continue;\n if (node2.text.indexOf(\"# sourceMappingURL=\") === 0) {\n this.root.removeChild(i2);\n }\n }\n } else if (this.css) {\n this.css = this.css.replace(/\\n*?\\/\\*#[\\S\\s]*?\\*\\/$/gm, \"\");\n }\n }\n generate() {\n this.clearAnnotation();\n if (pathAvailable && sourceMapAvailable && this.isMap()) {\n return this.generateMap();\n } else {\n let result2 = \"\";\n this.stringify(this.root, (i2) => {\n result2 += i2;\n });\n return [result2];\n }\n }\n generateMap() {\n if (this.root) {\n this.generateString();\n } else if (this.previous().length === 1) {\n let prev = this.previous()[0].consumer();\n prev.file = this.outputFile();\n this.map = SourceMapGenerator.fromSourceMap(prev, {\n ignoreInvalidMapping: true\n });\n } else {\n this.map = new SourceMapGenerator({\n file: this.outputFile(),\n ignoreInvalidMapping: true\n });\n this.map.addMapping({\n generated: { column: 0, line: 1 },\n original: { column: 0, line: 1 },\n source: this.opts.from ? this.toUrl(this.path(this.opts.from)) : \"<no source>\"\n });\n }\n if (this.isSourcesContent()) this.setSourcesContent();\n if (this.root && this.previous().length > 0) this.applyPrevMaps();\n if (this.isAnnotation()) this.addAnnotation();\n if (this.isInline()) {\n return [this.css];\n } else {\n return [this.css, this.map];\n }\n }\n generateString() {\n this.css = \"\";\n this.map = new SourceMapGenerator({\n file: this.outputFile(),\n ignoreInvalidMapping: true\n });\n let line = 1;\n let column = 1;\n let noSource = \"<no source>\";\n let mapping = {\n generated: { column: 0, line: 0 },\n original: { column: 0, line: 0 },\n source: \"\"\n };\n let lines, last;\n this.stringify(this.root, (str, node2, type) => {\n this.css += str;\n if (node2 && type !== \"end\") {\n mapping.generated.line = line;\n mapping.generated.column = column - 1;\n if (node2.source && node2.source.start) {\n mapping.source = this.sourcePath(node2);\n mapping.original.line = node2.source.start.line;\n mapping.original.column = node2.source.start.column - 1;\n this.map.addMapping(mapping);\n } else {\n mapping.source = noSource;\n mapping.original.line = 1;\n mapping.original.column = 0;\n this.map.addMapping(mapping);\n }\n }\n lines = str.match(/\\n/g);\n if (lines) {\n line += lines.length;\n last = str.lastIndexOf(\"\\n\");\n column = str.length - last;\n } else {\n column += str.length;\n }\n if (node2 && type !== \"start\") {\n let p = node2.parent || { raws: {} };\n let childless = node2.type === \"decl\" || node2.type === \"atrule\" && !node2.nodes;\n if (!childless || node2 !== p.last || p.raws.semicolon) {\n if (node2.source && node2.source.end) {\n mapping.source = this.sourcePath(node2);\n mapping.original.line = node2.source.end.line;\n mapping.original.column = node2.source.end.column - 1;\n mapping.generated.line = line;\n mapping.generated.column = column - 2;\n this.map.addMapping(mapping);\n } else {\n mapping.source = noSource;\n mapping.original.line = 1;\n mapping.original.column = 0;\n mapping.generated.line = line;\n mapping.generated.column = column - 1;\n this.map.addMapping(mapping);\n }\n }\n }\n });\n }\n isAnnotation() {\n if (this.isInline()) {\n return true;\n }\n if (typeof this.mapOpts.annotation !== \"undefined\") {\n return this.mapOpts.annotation;\n }\n if (this.previous().length) {\n return this.previous().some((i2) => i2.annotation);\n }\n return true;\n }\n isInline() {\n if (typeof this.mapOpts.inline !== \"undefined\") {\n return this.mapOpts.inline;\n }\n let annotation = this.mapOpts.annotation;\n if (typeof annotation !== \"undefined\" && annotation !== true) {\n return false;\n }\n if (this.previous().length) {\n return this.previous().some((i2) => i2.inline);\n }\n return true;\n }\n isMap() {\n if (typeof this.opts.map !== \"undefined\") {\n return !!this.opts.map;\n }\n return this.previous().length > 0;\n }\n isSourcesContent() {\n if (typeof this.mapOpts.sourcesContent !== \"undefined\") {\n return this.mapOpts.sourcesContent;\n }\n if (this.previous().length) {\n return this.previous().some((i2) => i2.withContent());\n }\n return true;\n }\n outputFile() {\n if (this.opts.to) {\n return this.path(this.opts.to);\n } else if (this.opts.from) {\n return this.path(this.opts.from);\n } else {\n return \"to.css\";\n }\n }\n path(file) {\n if (this.mapOpts.absolute) return file;\n if (file.charCodeAt(0) === 60) return file;\n if (/^\\w+:\\/\\//.test(file)) return file;\n let cached = this.memoizedPaths.get(file);\n if (cached) return cached;\n let from = this.opts.to ? dirname(this.opts.to) : \".\";\n if (typeof this.mapOpts.annotation === \"string\") {\n from = dirname(resolve(from, this.mapOpts.annotation));\n }\n let path = relative(from, file);\n this.memoizedPaths.set(file, path);\n return path;\n }\n previous() {\n if (!this.previousMaps) {\n this.previousMaps = [];\n if (this.root) {\n this.root.walk((node2) => {\n if (node2.source && node2.source.input.map) {\n let map = node2.source.input.map;\n if (!this.previousMaps.includes(map)) {\n this.previousMaps.push(map);\n }\n }\n });\n } else {\n let input2 = new Input$3(this.originalCSS, this.opts);\n if (input2.map) this.previousMaps.push(input2.map);\n }\n }\n return this.previousMaps;\n }\n setSourcesContent() {\n let already = {};\n if (this.root) {\n this.root.walk((node2) => {\n if (node2.source) {\n let from = node2.source.input.from;\n if (from && !already[from]) {\n already[from] = true;\n let fromUrl = this.usesFileUrls ? this.toFileUrl(from) : this.toUrl(this.path(from));\n this.map.setSourceContent(fromUrl, node2.source.input.css);\n }\n }\n });\n } else if (this.css) {\n let from = this.opts.from ? this.toUrl(this.path(this.opts.from)) : \"<no source>\";\n this.map.setSourceContent(from, this.css);\n }\n }\n sourcePath(node2) {\n if (this.mapOpts.from) {\n return this.toUrl(this.mapOpts.from);\n } else if (this.usesFileUrls) {\n return this.toFileUrl(node2.source.input.from);\n } else {\n return this.toUrl(this.path(node2.source.input.from));\n }\n }\n toBase64(str) {\n if (Buffer) {\n return Buffer.from(str).toString(\"base64\");\n } else {\n return window.btoa(unescape(encodeURIComponent(str)));\n }\n }\n toFileUrl(path) {\n let cached = this.memoizedFileURLs.get(path);\n if (cached) return cached;\n if (pathToFileURL) {\n let fileURL = pathToFileURL(path).toString();\n this.memoizedFileURLs.set(path, fileURL);\n return fileURL;\n } else {\n throw new Error(\n \"`map.absolute` option is not available in this PostCSS build\"\n );\n }\n }\n toUrl(path) {\n let cached = this.memoizedURLs.get(path);\n if (cached) return cached;\n if (sep === \"\\\\\") {\n path = path.replace(/\\\\/g, \"/\");\n }\n let url = encodeURI(path).replace(/[#?]/g, encodeURIComponent);\n this.memoizedURLs.set(path, url);\n return url;\n }\n};\nvar mapGenerator = MapGenerator$2;\nlet Node$2 = node;\nlet Comment$4 = class Comment2 extends Node$2 {\n constructor(defaults) {\n super(defaults);\n this.type = \"comment\";\n }\n};\nvar comment = Comment$4;\nComment$4.default = Comment$4;\nlet { isClean: isClean$1, my: my$1 } = symbols;\nlet Declaration$3 = declaration;\nlet Comment$3 = comment;\nlet Node$1 = node;\nlet parse$4, Rule$4, AtRule$4, Root$6;\nfunction cleanSource(nodes) {\n return nodes.map((i2) => {\n if (i2.nodes) i2.nodes = cleanSource(i2.nodes);\n delete i2.source;\n return i2;\n });\n}\nfunction markDirtyUp(node2) {\n node2[isClean$1] = false;\n if (node2.proxyOf.nodes) {\n for (let i2 of node2.proxyOf.nodes) {\n markDirtyUp(i2);\n }\n }\n}\nlet Container$7 = class Container2 extends Node$1 {\n append(...children) {\n for (let child of children) {\n let nodes = this.normalize(child, this.last);\n for (let node2 of nodes) this.proxyOf.nodes.push(node2);\n }\n this.markDirty();\n return this;\n }\n cleanRaws(keepBetween) {\n super.cleanRaws(keepBetween);\n if (this.nodes) {\n for (let node2 of this.nodes) node2.cleanRaws(keepBetween);\n }\n }\n each(callback) {\n if (!this.proxyOf.nodes) return void 0;\n let iterator = this.getIterator();\n let index2, result2;\n while (this.indexes[iterator] < this.proxyOf.nodes.length) {\n index2 = this.indexes[iterator];\n result2 = callback(this.proxyOf.nodes[index2], index2);\n if (result2 === false) break;\n this.indexes[iterator] += 1;\n }\n delete this.indexes[iterator];\n return result2;\n }\n every(condition) {\n return this.nodes.every(condition);\n }\n getIterator() {\n if (!this.lastEach) this.lastEach = 0;\n if (!this.indexes) this.indexes = {};\n this.lastEach += 1;\n let iterator = this.lastEach;\n this.indexes[iterator] = 0;\n return iterator;\n }\n getProxyProcessor() {\n return {\n get(node2, prop) {\n if (prop === \"proxyOf\") {\n return node2;\n } else if (!node2[prop]) {\n return node2[prop];\n } else if (prop === \"each\" || typeof prop === \"string\" && prop.startsWith(\"walk\")) {\n return (...args) => {\n return node2[prop](\n ...args.map((i2) => {\n if (typeof i2 === \"function\") {\n return (child, index2) => i2(child.toProxy(), index2);\n } else {\n return i2;\n }\n })\n );\n };\n } else if (prop === \"every\" || prop === \"some\") {\n return (cb) => {\n return node2[prop](\n (child, ...other) => cb(child.toProxy(), ...other)\n );\n };\n } else if (prop === \"root\") {\n return () => node2.root().toProxy();\n } else if (prop === \"nodes\") {\n return node2.nodes.map((i2) => i2.toProxy());\n } else if (prop === \"first\" || prop === \"last\") {\n return node2[prop].toProxy();\n } else {\n return node2[prop];\n }\n },\n set(node2, prop, value) {\n if (node2[prop] === value) return true;\n node2[prop] = value;\n if (prop === \"name\" || prop === \"params\" || prop === \"selector\") {\n node2.markDirty();\n }\n return true;\n }\n };\n }\n index(child) {\n if (typeof child === \"number\") return child;\n if (child.proxyOf) child = child.proxyOf;\n return this.proxyOf.nodes.indexOf(child);\n }\n insertAfter(exist, add) {\n let existIndex = this.index(exist);\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex]).reverse();\n existIndex = this.index(exist);\n for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex + 1, 0, node2);\n let index2;\n for (let id in this.indexes) {\n index2 = this.indexes[id];\n if (existIndex < index2) {\n this.indexes[id] = index2 + nodes.length;\n }\n }\n this.markDirty();\n return this;\n }\n insertBefore(exist, add) {\n let existIndex = this.index(exist);\n let type = existIndex === 0 ? \"prepend\" : false;\n let nodes = this.normalize(add, this.proxyOf.nodes[existIndex], type).reverse();\n existIndex = this.index(exist);\n for (let node2 of nodes) this.proxyOf.nodes.splice(existIndex, 0, node2);\n let index2;\n for (let id in this.indexes) {\n index2 = this.indexes[id];\n if (existIndex <= index2) {\n this.indexes[id] = index2 + nodes.length;\n }\n }\n this.markDirty();\n return this;\n }\n normalize(nodes, sample) {\n if (typeof nodes === \"string\") {\n nodes = cleanSource(parse$4(nodes).nodes);\n } else if (typeof nodes === \"undefined\") {\n nodes = [];\n } else if (Array.isArray(nodes)) {\n nodes = nodes.slice(0);\n for (let i2 of nodes) {\n if (i2.parent) i2.parent.removeChild(i2, \"ignore\");\n }\n } else if (nodes.type === \"root\" && this.type !== \"document\") {\n nodes = nodes.nodes.slice(0);\n for (let i2 of nodes) {\n if (i2.parent) i2.parent.removeChild(i2, \"ignore\");\n }\n } else if (nodes.type) {\n nodes = [nodes];\n } else if (nodes.prop) {\n if (typeof nodes.value === \"undefined\") {\n throw new Error(\"Value field is missed in node creation\");\n } else if (typeof nodes.value !== \"string\") {\n nodes.value = String(nodes.value);\n }\n nodes = [new Declaration$3(nodes)];\n } else if (nodes.selector) {\n nodes = [new Rule$4(nodes)];\n } else if (nodes.name) {\n nodes = [new AtRule$4(nodes)];\n } else if (nodes.text) {\n nodes = [new Comment$3(nodes)];\n } else {\n throw new Error(\"Unknown node type in node creation\");\n }\n let processed = nodes.map((i2) => {\n if (!i2[my$1]) Container2.rebuild(i2);\n i2 = i2.proxyOf;\n if (i2.parent) i2.parent.removeChild(i2);\n if (i2[isClean$1]) markDirtyUp(i2);\n if (typeof i2.raws.before === \"undefined\") {\n if (sample && typeof sample.raws.before !== \"undefined\") {\n i2.raws.before = sample.raws.before.replace(/\\S/g, \"\");\n }\n }\n i2.parent = this.proxyOf;\n return i2;\n });\n return processed;\n }\n prepend(...children) {\n children = children.reverse();\n for (let child of children) {\n let nodes = this.normalize(child, this.first, \"prepend\").reverse();\n for (let node2 of nodes) this.proxyOf.nodes.unshift(node2);\n for (let id in this.indexes) {\n this.indexes[id] = this.indexes[id] + nodes.length;\n }\n }\n this.markDirty();\n return this;\n }\n push(child) {\n child.parent = this;\n this.proxyOf.nodes.push(child);\n return this;\n }\n removeAll() {\n for (let node2 of this.proxyOf.nodes) node2.parent = void 0;\n this.proxyOf.nodes = [];\n this.markDirty();\n return this;\n }\n removeChild(child) {\n child = this.index(child);\n this.proxyOf.nodes[child].parent = void 0;\n this.proxyOf.nodes.splice(child, 1);\n let index2;\n for (let id in this.indexes) {\n index2 = this.indexes[id];\n if (index2 >= child) {\n this.indexes[id] = index2 - 1;\n }\n }\n this.markDirty();\n return this;\n }\n replaceValues(pattern, opts, callback) {\n if (!callback) {\n callback = opts;\n opts = {};\n }\n this.walkDecls((decl) => {\n if (opts.props && !opts.props.includes(decl.prop)) return;\n if (opts.fast && !decl.value.includes(opts.fast)) return;\n decl.value = decl.value.replace(pattern, callback);\n });\n this.markDirty();\n return this;\n }\n some(condition) {\n return this.nodes.some(condition);\n }\n walk(callback) {\n return this.each((child, i2) => {\n let result2;\n try {\n result2 = callback(child, i2);\n } catch (e2) {\n throw child.addToError(e2);\n }\n if (result2 !== false && child.walk) {\n result2 = child.walk(callback);\n }\n return result2;\n });\n }\n walkAtRules(name, callback) {\n if (!callback) {\n callback = name;\n return this.walk((child, i2) => {\n if (child.type === \"atrule\") {\n return callback(child, i2);\n }\n });\n }\n if (name instanceof RegExp) {\n return this.walk((child, i2) => {\n if (child.type === \"atrule\" && name.test(child.name)) {\n return callback(child, i2);\n }\n });\n }\n return this.walk((child, i2) => {\n if (child.type === \"atrule\" && child.name === name) {\n return callback(child, i2);\n }\n });\n }\n walkComments(callback) {\n return this.walk((child, i2) => {\n if (child.type === \"comment\") {\n return callback(child, i2);\n }\n });\n }\n walkDecls(prop, callback) {\n if (!callback) {\n callback = prop;\n return this.walk((child, i2) => {\n if (child.type === \"decl\") {\n return callback(child, i2);\n }\n });\n }\n if (prop instanceof RegExp) {\n return this.walk((child, i2) => {\n if (child.type === \"decl\" && prop.test(child.prop)) {\n return callback(child, i2);\n }\n });\n }\n return this.walk((child, i2) => {\n if (child.type === \"decl\" && child.prop === prop) {\n return callback(child, i2);\n }\n });\n }\n walkRules(selector, callback) {\n if (!callback) {\n callback = selector;\n return this.walk((child, i2) => {\n if (child.type === \"rule\") {\n return callback(child, i2);\n }\n });\n }\n if (selector instanceof RegExp) {\n return this.walk((child, i2) => {\n if (child.type === \"rule\" && selector.test(child.selector)) {\n return callback(child, i2);\n }\n });\n }\n return this.walk((child, i2) => {\n if (child.type === \"rule\" && child.selector === selector) {\n return callback(child, i2);\n }\n });\n }\n get first() {\n if (!this.proxyOf.nodes) return void 0;\n return this.proxyOf.nodes[0];\n }\n get last() {\n if (!this.proxyOf.nodes) return void 0;\n return this.proxyOf.nodes[this.proxyOf.nodes.length - 1];\n }\n};\nContainer$7.registerParse = (dependant) => {\n parse$4 = dependant;\n};\nContainer$7.registerRule = (dependant) => {\n Rule$4 = dependant;\n};\nContainer$7.registerAtRule = (dependant) => {\n AtRule$4 = dependant;\n};\nContainer$7.registerRoot = (dependant) => {\n Root$6 = dependant;\n};\nvar container = Container$7;\nContainer$7.default = Container$7;\nContainer$7.rebuild = (node2) => {\n if (node2.type === \"atrule\") {\n Object.setPrototypeOf(node2, AtRule$4.prototype);\n } else if (node2.type === \"rule\") {\n Object.setPrototypeOf(node2, Rule$4.prototype);\n } else if (node2.type === \"decl\") {\n Object.setPrototypeOf(node2, Declaration$3.prototype);\n } else if (node2.type === \"comment\") {\n Object.setPrototypeOf(node2, Comment$3.prototype);\n } else if (node2.type === \"root\") {\n Object.setPrototypeOf(node2, Root$6.prototype);\n }\n node2[my$1] = true;\n if (node2.nodes) {\n node2.nodes.forEach((child) => {\n Container$7.rebuild(child);\n });\n }\n};\nlet Container$6 = container;\nlet LazyResult$4, Processor$3;\nlet Document$3 = class Document23 extends Container$6 {\n constructor(defaults) {\n super({ type: \"document\", ...defaults });\n if (!this.nodes) {\n this.nodes = [];\n }\n }\n toResult(opts = {}) {\n let lazy = new LazyResult$4(new Processor$3(), this, opts);\n return lazy.stringify();\n }\n};\nDocument$3.registerLazyResult = (dependant) => {\n LazyResult$4 = dependant;\n};\nDocument$3.registerProcessor = (dependant) => {\n Processor$3 = dependant;\n};\nvar document$1 = Document$3;\nDocument$3.default = Document$3;\nlet printed = {};\nvar warnOnce$2 = function warnOnce2(message) {\n if (printed[message]) return;\n printed[message] = true;\n if (typeof console !== \"undefined\" && console.warn) {\n console.warn(message);\n }\n};\nlet Warning$2 = class Warning2 {\n constructor(text, opts = {}) {\n this.type = \"warning\";\n this.text = text;\n if (opts.node && opts.node.source) {\n let range = opts.node.rangeBy(opts);\n this.line = range.start.line;\n this.column = range.start.column;\n this.endLine = range.end.line;\n this.endColumn = range.end.column;\n }\n for (let opt in opts) this[opt] = opts[opt];\n }\n toString() {\n if (this.node) {\n return this.node.error(this.text, {\n index: this.index,\n plugin: this.plugin,\n word: this.word\n }).message;\n }\n if (this.plugin) {\n return this.plugin + \": \" + this.text;\n }\n return this.text;\n }\n};\nvar warning = Warning$2;\nWarning$2.default = Warning$2;\nlet Warning$1 = warning;\nlet Result$3 = class Result2 {\n constructor(processor2, root2, opts) {\n this.processor = processor2;\n this.messages = [];\n this.root = root2;\n this.opts = opts;\n this.css = void 0;\n this.map = void 0;\n }\n toString() {\n return this.css;\n }\n warn(text, opts = {}) {\n if (!opts.plugin) {\n if (this.lastPlugin && this.lastPlugin.postcssPlugin) {\n opts.plugin = this.lastPlugin.postcssPlugin;\n }\n }\n let warning2 = new Warning$1(text, opts);\n this.messages.push(warning2);\n return warning2;\n }\n warnings() {\n return this.messages.filter((i2) => i2.type === \"warning\");\n }\n get content() {\n return this.css;\n }\n};\nvar result = Result$3;\nResult$3.default = Result$3;\nconst SINGLE_QUOTE = \"'\".charCodeAt(0);\nconst DOUBLE_QUOTE = '\"'.charCodeAt(0);\nconst BACKSLASH = \"\\\\\".charCodeAt(0);\nconst SLASH = \"/\".charCodeAt(0);\nconst NEWLINE = \"\\n\".charCodeAt(0);\nconst SPACE = \" \".charCodeAt(0);\nconst FEED = \"\\f\".charCodeAt(0);\nconst TAB = \"\t\".charCodeAt(0);\nconst CR = \"\\r\".charCodeAt(0);\nconst OPEN_SQUARE = \"[\".charCodeAt(0);\nconst CLOSE_SQUARE = \"]\".charCodeAt(0);\nconst OPEN_PARENTHESES = \"(\".charCodeAt(0);\nconst CLOSE_PARENTHESES = \")\".charCodeAt(0);\nconst OPEN_CURLY = \"{\".charCodeAt(0);\nconst CLOSE_CURLY = \"}\".charCodeAt(0);\nconst SEMICOLON = \";\".charCodeAt(0);\nconst ASTERISK = \"*\".charCodeAt(0);\nconst COLON = \":\".charCodeAt(0);\nconst AT = \"@\".charCodeAt(0);\nconst RE_AT_END = /[\\t\\n\\f\\r \"#'()/;[\\\\\\]{}]/g;\nconst RE_WORD_END = /[\\t\\n\\f\\r !\"#'():;@[\\\\\\]{}]|\\/(?=\\*)/g;\nconst RE_BAD_BRACKET = /.[\\r\\n\"'(/\\\\]/;\nconst RE_HEX_ESCAPE = /[\\da-f]/i;\nvar tokenize = function tokenizer2(input2, options = {}) {\n let css = input2.css.valueOf();\n let ignore = options.ignoreErrors;\n let code, next, quote, content, escape;\n let escaped, escapePos, prev, n2, currentToken;\n let length = css.length;\n let pos = 0;\n let buffer = [];\n let returned = [];\n function position() {\n return pos;\n }\n function unclosed(what) {\n throw input2.error(\"Unclosed \" + what, pos);\n }\n function endOfFile() {\n return returned.length === 0 && pos >= length;\n }\n function nextToken(opts) {\n if (returned.length) return returned.pop();\n if (pos >= length) return;\n let ignoreUnclosed = opts ? opts.ignoreUnclosed : false;\n code = css.charCodeAt(pos);\n switch (code) {\n case NEWLINE:\n case SPACE:\n case TAB:\n case CR:\n case FEED: {\n next = pos;\n do {\n next += 1;\n code = css.charCodeAt(next);\n } while (code === SPACE || code === NEWLINE || code === TAB || code === CR || code === FEED);\n currentToken = [\"space\", css.slice(pos, next)];\n pos = next - 1;\n break;\n }\n case OPEN_SQUARE:\n case CLOSE_SQUARE:\n case OPEN_CURLY:\n case CLOSE_CURLY:\n case COLON:\n case SEMICOLON:\n case CLOSE_PARENTHESES: {\n let controlChar = String.fromCharCode(code);\n currentToken = [controlChar, controlChar, pos];\n break;\n }\n case OPEN_PARENTHESES: {\n prev = buffer.length ? buffer.pop()[1] : \"\";\n n2 = css.charCodeAt(pos + 1);\n if (prev === \"url\" && n2 !== SINGLE_QUOTE && n2 !== DOUBLE_QUOTE && n2 !== SPACE && n2 !== NEWLINE && n2 !== TAB && n2 !== FEED && n2 !== CR) {\n next = pos;\n do {\n escaped = false;\n next = css.indexOf(\")\", next + 1);\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos;\n break;\n } else {\n unclosed(\"bracket\");\n }\n }\n escapePos = next;\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1;\n escaped = !escaped;\n }\n } while (escaped);\n currentToken = [\"brackets\", css.slice(pos, next + 1), pos, next];\n pos = next;\n } else {\n next = css.indexOf(\")\", pos + 1);\n content = css.slice(pos, next + 1);\n if (next === -1 || RE_BAD_BRACKET.test(content)) {\n currentToken = [\"(\", \"(\", pos];\n } else {\n currentToken = [\"brackets\", content, pos, next];\n pos = next;\n }\n }\n break;\n }\n case SINGLE_QUOTE:\n case DOUBLE_QUOTE: {\n quote = code === SINGLE_QUOTE ? \"'\" : '\"';\n next = pos;\n do {\n escaped = false;\n next = css.indexOf(quote, next + 1);\n if (next === -1) {\n if (ignore || ignoreUnclosed) {\n next = pos + 1;\n break;\n } else {\n unclosed(\"string\");\n }\n }\n escapePos = next;\n while (css.charCodeAt(escapePos - 1) === BACKSLASH) {\n escapePos -= 1;\n escaped = !escaped;\n }\n } while (escaped);\n currentToken = [\"string\", css.slice(pos, next + 1), pos, next];\n pos = next;\n break;\n }\n case AT: {\n RE_AT_END.lastIndex = pos + 1;\n RE_AT_END.test(css);\n if (RE_AT_END.lastIndex === 0) {\n next = css.length - 1;\n } else {\n next = RE_AT_END.lastIndex - 2;\n }\n currentToken = [\"at-word\", css.slice(pos, next + 1), pos, next];\n pos = next;\n break;\n }\n case BACKSLASH: {\n next = pos;\n escape = true;\n while (css.charCodeAt(next + 1) === BACKSLASH) {\n next += 1;\n escape = !escape;\n }\n code = css.charCodeAt(next + 1);\n if (escape && code !== SLASH && code !== SPACE && code !== NEWLINE && code !== TAB && code !== CR && code !== FEED) {\n next += 1;\n if (RE_HEX_ESCAPE.test(css.charAt(next))) {\n while (RE_HEX_ESCAPE.test(css.charAt(next + 1))) {\n next += 1;\n }\n if (css.charCodeAt(next + 1) === SPACE) {\n next += 1;\n }\n }\n }\n currentToken = [\"word\", css.slice(pos, next + 1), pos, next];\n pos = next;\n break;\n }\n default: {\n if (code === SLASH && css.charCodeAt(pos + 1) === ASTERISK) {\n next = css.indexOf(\"*/\", pos + 2) + 1;\n if (next === 0) {\n if (ignore || ignoreUnclosed) {\n next = css.length;\n } else {\n unclosed(\"comment\");\n }\n }\n currentToken = [\"comment\", css.slice(pos, next + 1), pos, next];\n pos = next;\n } else {\n RE_WORD_END.lastIndex = pos + 1;\n RE_WORD_END.test(css);\n if (RE_WORD_END.lastIndex === 0) {\n next = css.length - 1;\n } else {\n next = RE_WORD_END.lastIndex - 2;\n }\n currentToken = [\"word\", css.slice(pos, next + 1), pos, next];\n buffer.push(currentToken);\n pos = next;\n }\n break;\n }\n }\n pos++;\n return currentToken;\n }\n function back(token) {\n returned.push(token);\n }\n return {\n back,\n endOfFile,\n nextToken,\n position\n };\n};\nlet Container$5 = container;\nlet AtRule$3 = class AtRule2 extends Container$5 {\n constructor(defaults) {\n super(defaults);\n this.type = \"atrule\";\n }\n append(...children) {\n if (!this.proxyOf.nodes) this.nodes = [];\n return super.append(...children);\n }\n prepend(...children) {\n if (!this.proxyOf.nodes) this.nodes = [];\n return super.prepend(...children);\n }\n};\nvar atRule = AtRule$3;\nAtRule$3.default = AtRule$3;\nContainer$5.registerAtRule(AtRule$3);\nlet Container$4 = container;\nlet LazyResult$3, Processor$2;\nlet Root$5 = class Root2 extends Container$4 {\n constructor(defaults) {\n super(defaults);\n this.type = \"root\";\n if (!this.nodes) this.nodes = [];\n }\n normalize(child, sample, type) {\n let nodes = super.normalize(child);\n if (sample) {\n if (type === \"prepend\") {\n if (this.nodes.length > 1) {\n sample.raws.before = this.nodes[1].raws.before;\n } else {\n delete sample.raws.before;\n }\n } else if (this.first !== sample) {\n for (let node2 of nodes) {\n node2.raws.before = sample.raws.before;\n }\n }\n }\n return nodes;\n }\n removeChild(child, ignore) {\n let index2 = this.index(child);\n if (!ignore && index2 === 0 && this.nodes.length > 1) {\n this.nodes[1].raws.before = this.nodes[index2].raws.before;\n }\n return super.removeChild(child);\n }\n toResult(opts = {}) {\n let lazy = new LazyResult$3(new Processor$2(), this, opts);\n return lazy.stringify();\n }\n};\nRoot$5.registerLazyResult = (dependant) => {\n LazyResult$3 = dependant;\n};\nRoot$5.registerProcessor = (dependant) => {\n Processor$2 = dependant;\n};\nvar root = Root$5;\nRoot$5.default = Root$5;\nContainer$4.registerRoot(Root$5);\nlet list$2 = {\n comma(string) {\n return list$2.split(string, [\",\"], true);\n },\n space(string) {\n let spaces = [\" \", \"\\n\", \"\t\"];\n return list$2.split(string, spaces);\n },\n split(string, separators, last) {\n let array = [];\n let current = \"\";\n let split = false;\n let func = 0;\n let inQuote = false;\n let prevQuote = \"\";\n let escape = false;\n for (let letter of string) {\n if (escape) {\n escape = false;\n } else if (letter === \"\\\\\") {\n escape = true;\n } else if (inQuote) {\n if (letter === prevQuote) {\n inQuote = false;\n }\n } else if (letter === '\"' || letter === \"'\") {\n inQuote = true;\n prevQuote = letter;\n } else if (letter === \"(\") {\n func += 1;\n } else if (letter === \")\") {\n if (func > 0) func -= 1;\n } else if (func === 0) {\n if (separators.includes(letter)) split = true;\n }\n if (split) {\n if (current !== \"\") array.push(current.trim());\n current = \"\";\n split = false;\n } else {\n current += letter;\n }\n }\n if (last || current !== \"\") array.push(current.trim());\n return array;\n }\n};\nvar list_1 = list$2;\nlist$2.default = list$2;\nlet Container$3 = container;\nlet list$1 = list_1;\nlet Rule$3 = class Rule2 extends Container$3 {\n constructor(defaults) {\n super(defaults);\n this.type = \"rule\";\n if (!this.nodes) this.nodes = [];\n }\n get selectors() {\n return list$1.comma(this.selector);\n }\n set selectors(values) {\n let match = this.selector ? this.selector.match(/,\\s*/) : null;\n let sep2 = match ? match[0] : \",\" + this.raw(\"between\", \"beforeOpen\");\n this.selector = values.join(sep2);\n }\n};\nvar rule = Rule$3;\nRule$3.default = Rule$3;\nContainer$3.registerRule(Rule$3);\nlet Declaration$2 = declaration;\nlet tokenizer22 = tokenize;\nlet Comment$2 = comment;\nlet AtRule$2 = atRule;\nlet Root$4 = root;\nlet Rule$2 = rule;\nconst SAFE_COMMENT_NEIGHBOR = {\n empty: true,\n space: true\n};\nfunction findLastWithPosition(tokens) {\n for (let i2 = tokens.length - 1; i2 >= 0; i2--) {\n let token = tokens[i2];\n let pos = token[3] || token[2];\n if (pos) return pos;\n }\n}\nlet Parser$1 = class Parser2 {\n constructor(input2) {\n this.input = input2;\n this.root = new Root$4();\n this.current = this.root;\n this.spaces = \"\";\n this.semicolon = false;\n this.createTokenizer();\n this.root.source = { input: input2, start: { column: 1, line: 1, offset: 0 } };\n }\n atrule(token) {\n let node2 = new AtRule$2();\n node2.name = token[1].slice(1);\n if (node2.name === \"\") {\n this.unnamedAtrule(node2, token);\n }\n this.init(node2, token[2]);\n let type;\n let prev;\n let shift;\n let last = false;\n let open = false;\n let params = [];\n let brackets = [];\n while (!this.tokenizer.endOfFile()) {\n token = this.tokenizer.nextToken();\n type = token[0];\n if (type === \"(\" || type === \"[\") {\n brackets.push(type === \"(\" ? \")\" : \"]\");\n } else if (type === \"{\" && brackets.length > 0) {\n brackets.push(\"}\");\n } else if (type === brackets[brackets.length - 1]) {\n brackets.pop();\n }\n if (brackets.length === 0) {\n if (type === \";\") {\n node2.source.end = this.getPosition(token[2]);\n node2.source.end.offset++;\n this.semicolon = true;\n break;\n } else if (type === \"{\") {\n open = true;\n break;\n } else if (type === \"}\") {\n if (params.length > 0) {\n shift = params.length - 1;\n prev = params[shift];\n while (prev && prev[0] === \"space\") {\n prev = params[--shift];\n }\n if (prev) {\n node2.source.end = this.getPosition(prev[3] || prev[2]);\n node2.source.end.offset++;\n }\n }\n this.end(token);\n break;\n } else {\n params.push(token);\n }\n } else {\n params.push(token);\n }\n if (this.tokenizer.endOfFile()) {\n last = true;\n break;\n }\n }\n node2.raws.between = this.spacesAndCommentsFromEnd(params);\n if (params.length) {\n node2.raws.afterName = this.spacesAndCommentsFromStart(params);\n this.raw(node2, \"params\", params);\n if (last) {\n token = params[params.length - 1];\n node2.source.end = this.getPosition(token[3] || token[2]);\n node2.source.end.offset++;\n this.spaces = node2.raws.between;\n node2.raws.between = \"\";\n }\n } else {\n node2.raws.afterName = \"\";\n node2.params = \"\";\n }\n if (open) {\n node2.nodes = [];\n this.current = node2;\n }\n }\n checkMissedSemicolon(tokens) {\n let colon = this.colon(tokens);\n if (colon === false) return;\n let founded = 0;\n let token;\n for (let j = colon - 1; j >= 0; j--) {\n token = tokens[j];\n if (token[0] !== \"space\") {\n founded += 1;\n if (founded === 2) break;\n }\n }\n throw this.input.error(\n \"Missed semicolon\",\n token[0] === \"word\" ? token[3] + 1 : token[2]\n );\n }\n colon(tokens) {\n let brackets = 0;\n let token, type, prev;\n for (let [i2, element] of tokens.entries()) {\n token = element;\n type = token[0];\n if (type === \"(\") {\n brackets += 1;\n }\n if (type === \")\") {\n brackets -= 1;\n }\n if (brackets === 0 && type === \":\") {\n if (!prev) {\n this.doubleColon(token);\n } else if (prev[0] === \"word\" && prev[1] === \"progid\") {\n continue;\n } else {\n return i2;\n }\n }\n prev = token;\n }\n return false;\n }\n comment(token) {\n let node2 = new Comment$2();\n this.init(node2, token[2]);\n node2.source.end = this.getPosition(token[3] || token[2]);\n node2.source.end.offset++;\n let text = token[1].slice(2, -2);\n if (/^\\s*$/.test(text)) {\n node2.text = \"\";\n node2.raws.left = text;\n node2.raws.right = \"\";\n } else {\n let match = text.match(/^(\\s*)([^]*\\S)(\\s*)$/);\n node2.text = match[2];\n node2.raws.left = match[1];\n node2.raws.right = match[3];\n }\n }\n createTokenizer() {\n this.tokenizer = tokenizer22(this.input);\n }\n decl(tokens, customProperty) {\n let node2 = new Declaration$2();\n this.init(node2, tokens[0][2]);\n let last = tokens[tokens.length - 1];\n if (last[0] === \";\") {\n this.semicolon = true;\n tokens.pop();\n }\n node2.source.end = this.getPosition(\n last[3] || last[2] || findLastWithPosition(tokens)\n );\n node2.source.end.offset++;\n while (tokens[0][0] !== \"word\") {\n if (tokens.length === 1) this.unknownWord(tokens);\n node2.raws.before += tokens.shift()[1];\n }\n node2.source.start = this.getPosition(tokens[0][2]);\n node2.prop = \"\";\n while (tokens.length) {\n let type = tokens[0][0];\n if (type === \":\" || type === \"space\" || type === \"comment\") {\n break;\n }\n node2.prop += tokens.shift()[1];\n }\n node2.raws.between = \"\";\n let token;\n while (tokens.length) {\n token = tokens.shift();\n if (token[0] === \":\") {\n node2.raws.between += token[1];\n break;\n } else {\n if (token[0] === \"word\" && /\\w/.test(token[1])) {\n this.unknownWord([token]);\n }\n node2.raws.between += token[1];\n }\n }\n if (node2.prop[0] === \"_\" || node2.prop[0] === \"*\") {\n node2.raws.before += node2.prop[0];\n node2.prop = node2.prop.slice(1);\n }\n let firstSpaces = [];\n let next;\n while (tokens.length) {\n next = tokens[0][0];\n if (next !== \"space\" && next !== \"comment\") break;\n firstSpaces.push(tokens.shift());\n }\n this.precheckMissedSemicolon(tokens);\n for (let i2 = tokens.length - 1; i2 >= 0; i2--) {\n token = tokens[i2];\n if (token[1].toLowerCase() === \"!important\") {\n node2.important = true;\n let string = this.stringFrom(tokens, i2);\n string = this.spacesFromEnd(tokens) + string;\n if (string !== \" !important\") node2.raws.important = string;\n break;\n } else if (token[1].toLowerCase() === \"important\") {\n let cache = tokens.slice(0);\n let str = \"\";\n for (let j = i2; j > 0; j--) {\n let type = cache[j][0];\n if (str.trim().indexOf(\"!\") === 0 && type !== \"space\") {\n break;\n }\n str = cache.pop()[1] + str;\n }\n if (str.trim().indexOf(\"!\") === 0) {\n node2.important = true;\n node2.raws.important = str;\n tokens = cache;\n }\n }\n if (token[0] !== \"space\" && token[0] !== \"comment\") {\n break;\n }\n }\n let hasWord = tokens.some((i2) => i2[0] !== \"space\" && i2[0] !== \"comment\");\n if (hasWord) {\n node2.raws.between += firstSpaces.map((i2) => i2[1]).join(\"\");\n firstSpaces = [];\n }\n this.raw(node2, \"value\", firstSpaces.concat(tokens), customProperty);\n if (node2.value.includes(\":\") && !customProperty) {\n this.checkMissedSemicolon(tokens);\n }\n }\n doubleColon(token) {\n throw this.input.error(\n \"Double colon\",\n { offset: token[2] },\n { offset: token[2] + token[1].length }\n );\n }\n emptyRule(token) {\n let node2 = new Rule$2();\n this.init(node2, token[2]);\n node2.selector = \"\";\n node2.raws.between = \"\";\n this.current = node2;\n }\n end(token) {\n if (this.current.nodes && this.current.nodes.length) {\n this.current.raws.semicolon = this.semicolon;\n }\n this.semicolon = false;\n this.current.raws.after = (this.current.raws.after || \"\") + this.spaces;\n this.spaces = \"\";\n if (this.current.parent) {\n this.current.source.end = this.getPosition(token[2]);\n this.current.source.end.offset++;\n this.current = this.current.parent;\n } else {\n this.unexpectedClose(token);\n }\n }\n endFile() {\n if (this.current.parent) this.unclosedBlock();\n if (this.current.nodes && this.current.nodes.length) {\n this.current.raws.semicolon = this.semicolon;\n }\n this.current.raws.after = (this.current.raws.after || \"\") + this.spaces;\n this.root.source.end = this.getPosition(this.tokenizer.position());\n }\n freeSemicolon(token) {\n this.spaces += token[1];\n if (this.current.nodes) {\n let prev = this.current.nodes[this.current.nodes.length - 1];\n if (prev && prev.type === \"rule\" && !prev.raws.ownSemicolon) {\n prev.raws.ownSemicolon = this.spaces;\n this.spaces = \"\";\n }\n }\n }\n // Helpers\n getPosition(offset) {\n let pos = this.input.fromOffset(offset);\n return {\n column: pos.col,\n line: pos.line,\n offset\n };\n }\n init(node2, offset) {\n this.current.push(node2);\n node2.source = {\n input: this.input,\n start: this.getPosition(offset)\n };\n node2.raws.before = this.spaces;\n this.spaces = \"\";\n if (node2.type !== \"comment\") this.semicolon = false;\n }\n other(start) {\n let end = false;\n let type = null;\n let colon = false;\n let bracket = null;\n let brackets = [];\n let customProperty = start[1].startsWith(\"--\");\n let tokens = [];\n let token = start;\n while (token) {\n type = token[0];\n tokens.push(token);\n if (type === \"(\" || type === \"[\") {\n if (!bracket) bracket = token;\n brackets.push(type === \"(\" ? \")\" : \"]\");\n } else if (customProperty && colon && type === \"{\") {\n if (!bracket) bracket = token;\n brackets.push(\"}\");\n } else if (brackets.length === 0) {\n if (type === \";\") {\n if (colon) {\n this.decl(tokens, customProperty);\n return;\n } else {\n break;\n }\n } else if (type === \"{\") {\n this.rule(tokens);\n return;\n } else if (type === \"}\") {\n this.tokenizer.back(tokens.pop());\n end = true;\n break;\n } else if (type === \":\") {\n colon = true;\n }\n } else if (type === brackets[brackets.length - 1]) {\n brackets.pop();\n if (brackets.length === 0) bracket = null;\n }\n token = this.tokenizer.nextToken();\n }\n if (this.tokenizer.endOfFile()) end = true;\n if (brackets.length > 0) this.unclosedBracket(bracket);\n if (end && colon) {\n if (!customProperty) {\n while (tokens.length) {\n token = tokens[tokens.length - 1][0];\n if (token !== \"space\" && token !== \"comment\") break;\n this.tokenizer.back(tokens.pop());\n }\n }\n this.decl(tokens, customProperty);\n } else {\n this.unknownWord(tokens);\n }\n }\n parse() {\n let token;\n while (!this.tokenizer.endOfFile()) {\n token = this.tokenizer.nextToken();\n switch (token[0]) {\n case \"space\":\n this.spaces += token[1];\n break;\n case \";\":\n this.freeSemicolon(token);\n break;\n case \"}\":\n this.end(token);\n break;\n case \"comment\":\n this.comment(token);\n break;\n case \"at-word\":\n this.atrule(token);\n break;\n case \"{\":\n this.emptyRule(token);\n break;\n default:\n this.other(token);\n break;\n }\n }\n this.endFile();\n }\n precheckMissedSemicolon() {\n }\n raw(node2, prop, tokens, customProperty) {\n let token, type;\n let length = tokens.length;\n let value = \"\";\n let clean = true;\n let next, prev;\n for (let i2 = 0; i2 < length; i2 += 1) {\n token = tokens[i2];\n type = token[0];\n if (type === \"space\" && i2 === length - 1 && !customProperty) {\n clean = false;\n } else if (type === \"comment\") {\n prev = tokens[i2 - 1] ? tokens[i2 - 1][0] : \"empty\";\n next = tokens[i2 + 1] ? tokens[i2 + 1][0] : \"empty\";\n if (!SAFE_COMMENT_NEIGHBOR[prev] && !SAFE_COMMENT_NEIGHBOR[next]) {\n if (value.slice(-1) === \",\") {\n clean = false;\n } else {\n value += token[1];\n }\n } else {\n clean = false;\n }\n } else {\n value += token[1];\n }\n }\n if (!clean) {\n let raw = tokens.reduce((all, i2) => all + i2[1], \"\");\n node2.raws[prop] = { raw, value };\n }\n node2[prop] = value;\n }\n rule(tokens) {\n tokens.pop();\n let node2 = new Rule$2();\n this.init(node2, tokens[0][2]);\n node2.raws.between = this.spacesAndCommentsFromEnd(tokens);\n this.raw(node2, \"selector\", tokens);\n this.current = node2;\n }\n spacesAndCommentsFromEnd(tokens) {\n let lastTokenType;\n let spaces = \"\";\n while (tokens.length) {\n lastTokenType = tokens[tokens.length - 1][0];\n if (lastTokenType !== \"space\" && lastTokenType !== \"comment\") break;\n spaces = tokens.pop()[1] + spaces;\n }\n return spaces;\n }\n // Errors\n spacesAndCommentsFromStart(tokens) {\n let next;\n let spaces = \"\";\n while (tokens.length) {\n next = tokens[0][0];\n if (next !== \"space\" && next !== \"comment\") break;\n spaces += tokens.shift()[1];\n }\n return spaces;\n }\n spacesFromEnd(tokens) {\n let lastTokenType;\n let spaces = \"\";\n while (tokens.length) {\n lastTokenType = tokens[tokens.length - 1][0];\n if (lastTokenType !== \"space\") break;\n spaces = tokens.pop()[1] + spaces;\n }\n return spaces;\n }\n stringFrom(tokens, from) {\n let result2 = \"\";\n for (let i2 = from; i2 < tokens.length; i2++) {\n result2 += tokens[i2][1];\n }\n tokens.splice(from, tokens.length - from);\n return result2;\n }\n unclosedBlock() {\n let pos = this.current.source.start;\n throw this.input.error(\"Unclosed block\", pos.line, pos.column);\n }\n unclosedBracket(bracket) {\n throw this.input.error(\n \"Unclosed bracket\",\n { offset: bracket[2] },\n { offset: bracket[2] + 1 }\n );\n }\n unexpectedClose(token) {\n throw this.input.error(\n \"Unexpected }\",\n { offset: token[2] },\n { offset: token[2] + 1 }\n );\n }\n unknownWord(tokens) {\n throw this.input.error(\n \"Unknown word\",\n { offset: tokens[0][2] },\n { offset: tokens[0][2] + tokens[0][1].length }\n );\n }\n unnamedAtrule(node2, token) {\n throw this.input.error(\n \"At-rule without name\",\n { offset: token[2] },\n { offset: token[2] + token[1].length }\n );\n }\n};\nvar parser = Parser$1;\nlet Container$2 = container;\nlet Parser22 = parser;\nlet Input$2 = input;\nfunction parse$3(css, opts) {\n let input2 = new Input$2(css, opts);\n let parser2 = new Parser22(input2);\n try {\n parser2.parse();\n } catch (e2) {\n if (process.env.NODE_ENV !== \"production\") {\n if (e2.name === \"CssSyntaxError\" && opts && opts.from) {\n if (/\\.scss$/i.test(opts.from)) {\n e2.message += \"\\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser\";\n } else if (/\\.sass/i.test(opts.from)) {\n e2.message += \"\\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser\";\n } else if (/\\.less$/i.test(opts.from)) {\n e2.message += \"\\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser\";\n }\n }\n }\n throw e2;\n }\n return parser2.root;\n}\nvar parse_1 = parse$3;\nparse$3.default = parse$3;\nContainer$2.registerParse(parse$3);\nlet { isClean, my } = symbols;\nlet MapGenerator$1 = mapGenerator;\nlet stringify$2 = stringify_1;\nlet Container$1 = container;\nlet Document$2 = document$1;\nlet warnOnce$1 = warnOnce$2;\nlet Result$2 = result;\nlet parse$2 = parse_1;\nlet Root$3 = root;\nconst TYPE_TO_CLASS_NAME = {\n atrule: \"AtRule\",\n comment: \"Comment\",\n decl: \"Declaration\",\n document: \"Document\",\n root: \"Root\",\n rule: \"Rule\"\n};\nconst PLUGIN_PROPS = {\n AtRule: true,\n AtRuleExit: true,\n Comment: true,\n CommentExit: true,\n Declaration: true,\n DeclarationExit: true,\n Document: true,\n DocumentExit: true,\n Once: true,\n OnceExit: true,\n postcssPlugin: true,\n prepare: true,\n Root: true,\n RootExit: true,\n Rule: true,\n RuleExit: true\n};\nconst NOT_VISITORS = {\n Once: true,\n postcssPlugin: true,\n prepare: true\n};\nconst CHILDREN = 0;\nfunction isPromise(obj) {\n return typeof obj === \"object\" && typeof obj.then === \"function\";\n}\nfunction getEvents(node2) {\n let key = false;\n let type = TYPE_TO_CLASS_NAME[node2.type];\n if (node2.type === \"decl\") {\n key = node2.prop.toLowerCase();\n } else if (node2.type === \"atrule\") {\n key = node2.name.toLowerCase();\n }\n if (key && node2.append) {\n return [\n type,\n type + \"-\" + key,\n CHILDREN,\n type + \"Exit\",\n type + \"Exit-\" + key\n ];\n } else if (key) {\n return [type, type + \"-\" + key, type + \"Exit\", type + \"Exit-\" + key];\n } else if (node2.append) {\n return [type, CHILDREN, type + \"Exit\"];\n } else {\n return [type, type + \"Exit\"];\n }\n}\nfunction toStack(node2) {\n let events;\n if (node2.type === \"document\") {\n events = [\"Document\", CHILDREN, \"DocumentExit\"];\n } else if (node2.type === \"root\") {\n events = [\"Root\", CHILDREN, \"RootExit\"];\n } else {\n events = getEvents(node2);\n }\n return {\n eventIndex: 0,\n events,\n iterator: 0,\n node: node2,\n visitorIndex: 0,\n visitors: []\n };\n}\nfunction cleanMarks(node2) {\n node2[isClean] = false;\n if (node2.nodes) node2.nodes.forEach((i2) => cleanMarks(i2));\n return node2;\n}\nlet postcss$2 = {};\nlet LazyResult$2 = class LazyResult2 {\n constructor(processor2, css, opts) {\n this.stringified = false;\n this.processed = false;\n let root2;\n if (typeof css === \"object\" && css !== null && (css.type === \"root\" || css.type === \"document\")) {\n root2 = cleanMarks(css);\n } else if (css instanceof LazyResult2 || css instanceof Result$2) {\n root2 = cleanMarks(css.root);\n if (css.map) {\n if (typeof opts.map === \"undefined\") opts.map = {};\n if (!opts.map.inline) opts.map.inline = false;\n opts.map.prev = css.map;\n }\n } else {\n let parser2 = parse$2;\n if (opts.syntax) parser2 = opts.syntax.parse;\n if (opts.parser) parser2 = opts.parser;\n if (parser2.parse) parser2 = parser2.parse;\n try {\n root2 = parser2(css, opts);\n } catch (error) {\n this.processed = true;\n this.error = error;\n }\n if (root2 && !root2[my]) {\n Container$1.rebuild(root2);\n }\n }\n this.result = new Result$2(processor2, root2, opts);\n this.helpers = { ...postcss$2, postcss: postcss$2, result: this.result };\n this.plugins = this.processor.plugins.map((plugin22) => {\n if (typeof plugin22 === \"object\" && plugin22.prepare) {\n return { ...plugin22, ...plugin22.prepare(this.result) };\n } else {\n return plugin22;\n }\n });\n }\n async() {\n if (this.error) return Promise.reject(this.error);\n if (this.processed) return Promise.resolve(this.result);\n if (!this.processing) {\n this.processing = this.runAsync();\n }\n return this.processing;\n }\n catch(onRejected) {\n return this.async().catch(onRejected);\n }\n finally(onFinally) {\n return this.async().then(onFinally, onFinally);\n }\n getAsyncError() {\n throw new Error(\"Use process(css).then(cb) to work with async plugins\");\n }\n handleError(error, node2) {\n let plugin22 = this.result.lastPlugin;\n try {\n if (node2) node2.addToError(error);\n this.error = error;\n if (error.name === \"CssSyntaxError\" && !error.plugin) {\n error.plugin = plugin22.postcssPlugin;\n error.setMessage();\n } else if (plugin22.postcssVersion) {\n if (process.env.NODE_ENV !== \"production\") {\n let pluginName = plugin22.postcssPlugin;\n let pluginVer = plugin22.postcssVersion;\n let runtimeVer = this.result.processor.version;\n let a2 = pluginVer.split(\".\");\n let b = runtimeVer.split(\".\");\n if (a2[0] !== b[0] || parseInt(a2[1]) > parseInt(b[1])) {\n console.error(\n \"Unknown error from PostCSS plugin. Your current PostCSS version is \" + runtimeVer + \", but \" + pluginName + \" uses \" + pluginVer + \". Perhaps this is the source of the error below.\"\n );\n }\n }\n }\n } catch (err) {\n if (console && console.error) console.error(err);\n }\n return error;\n }\n prepareVisitors() {\n this.listeners = {};\n let add = (plugin22, type, cb) => {\n if (!this.listeners[type]) this.listeners[type] = [];\n this.listeners[type].push([plugin22, cb]);\n };\n for (let plugin22 of this.plugins) {\n if (typeof plugin22 === \"object\") {\n for (let event in plugin22) {\n if (!PLUGIN_PROPS[event] && /^[A-Z]/.test(event)) {\n throw new Error(\n `Unknown event ${event} in ${plugin22.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`\n );\n }\n if (!NOT_VISITORS[event]) {\n if (typeof plugin22[event] === \"object\") {\n for (let filter in plugin22[event]) {\n if (filter === \"*\") {\n add(plugin22, event, plugin22[event][filter]);\n } else {\n add(\n plugin22,\n event + \"-\" + filter.toLowerCase(),\n plugin22[event][filter]\n );\n }\n }\n } else if (typeof plugin22[event] === \"function\") {\n add(plugin22, event, plugin22[event]);\n }\n }\n }\n }\n }\n this.hasListener = Object.keys(this.listeners).length > 0;\n }\n async runAsync() {\n this.plugin = 0;\n for (let i2 = 0; i2 < this.plugins.length; i2++) {\n let plugin22 = this.plugins[i2];\n let promise = this.runOnRoot(plugin22);\n if (isPromise(promise)) {\n try {\n await promise;\n } catch (error) {\n throw this.handleError(error);\n }\n }\n }\n this.prepareVisitors();\n if (this.hasListener) {\n let root2 = this.result.root;\n while (!root2[isClean]) {\n root2[isClean] = true;\n let stack = [toStack(root2)];\n while (stack.length > 0) {\n let promise = this.visitTick(stack);\n if (isPromise(promise)) {\n try {\n await promise;\n } catch (e2) {\n let node2 = stack[stack.length - 1].node;\n throw this.handleError(e2, node2);\n }\n }\n }\n }\n if (this.listeners.OnceExit) {\n for (let [plugin22, visitor] of this.listeners.OnceExit) {\n this.result.lastPlugin = plugin22;\n try {\n if (root2.type === \"document\") {\n let roots = root2.nodes.map(\n (subRoot) => visitor(subRoot, this.helpers)\n );\n await Promise.all(roots);\n } else {\n await visitor(root2, this.helpers);\n }\n } catch (e2) {\n throw this.handleError(e2);\n }\n }\n }\n }\n this.processed = true;\n return this.stringify();\n }\n runOnRoot(plugin22) {\n this.result.lastPlugin = plugin22;\n try {\n if (typeof plugin22 === \"object\" && plugin22.Once) {\n if (this.result.root.type === \"document\") {\n let roots = this.result.root.nodes.map(\n (root2) => plugin22.Once(root2, this.helpers)\n );\n if (isPromise(roots[0])) {\n return Promise.all(roots);\n }\n return roots;\n }\n return plugin22.Once(this.result.root, this.helpers);\n } else if (typeof plugin22 === \"function\") {\n return plugin22(this.result.root, this.result);\n }\n } catch (error) {\n throw this.handleError(error);\n }\n }\n stringify() {\n if (this.error) throw this.error;\n if (this.stringified) return this.result;\n this.stringified = true;\n this.sync();\n let opts = this.result.opts;\n let str = stringify$2;\n if (opts.syntax) str = opts.syntax.stringify;\n if (opts.stringifier) str = opts.stringifier;\n if (str.stringify) str = str.stringify;\n let map = new MapGenerator$1(str, this.result.root, this.result.opts);\n let data = map.generate();\n this.result.css = data[0];\n this.result.map = data[1];\n return this.result;\n }\n sync() {\n if (this.error) throw this.error;\n if (this.processed) return this.result;\n this.processed = true;\n if (this.processing) {\n throw this.getAsyncError();\n }\n for (let plugin22 of this.plugins) {\n let promise = this.runOnRoot(plugin22);\n if (isPromise(promise)) {\n throw this.getAsyncError();\n }\n }\n this.prepareVisitors();\n if (this.hasListener) {\n let root2 = this.result.root;\n while (!root2[isClean]) {\n root2[isClean] = true;\n this.walkSync(root2);\n }\n if (this.listeners.OnceExit) {\n if (root2.type === \"document\") {\n for (let subRoot of root2.nodes) {\n this.visitSync(this.listeners.OnceExit, subRoot);\n }\n } else {\n this.visitSync(this.listeners.OnceExit, root2);\n }\n }\n }\n return this.result;\n }\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!(\"from\" in this.opts)) {\n warnOnce$1(\n \"Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.\"\n );\n }\n }\n return this.async().then(onFulfilled, onRejected);\n }\n toString() {\n return this.css;\n }\n visitSync(visitors, node2) {\n for (let [plugin22, visitor] of visitors) {\n this.result.lastPlugin = plugin22;\n let promise;\n try {\n promise = visitor(node2, this.helpers);\n } catch (e2) {\n throw this.handleError(e2, node2.proxyOf);\n }\n if (node2.type !== \"root\" && node2.type !== \"document\" && !node2.parent) {\n return true;\n }\n if (isPromise(promise)) {\n throw this.getAsyncError();\n }\n }\n }\n visitTick(stack) {\n let visit2 = stack[stack.length - 1];\n let { node: node2, visitors } = visit2;\n if (node2.type !== \"root\" && node2.type !== \"document\" && !node2.parent) {\n stack.pop();\n return;\n }\n if (visitors.length > 0 && visit2.visitorIndex < visitors.length) {\n let [plugin22, visitor] = visitors[visit2.visitorIndex];\n visit2.visitorIndex += 1;\n if (visit2.visitorIndex === visitors.length) {\n visit2.visitors = [];\n visit2.visitorIndex = 0;\n }\n this.result.lastPlugin = plugin22;\n try {\n return visitor(node2.toProxy(), this.helpers);\n } catch (e2) {\n throw this.handleError(e2, node2);\n }\n }\n if (visit2.iterator !== 0) {\n let iterator = visit2.iterator;\n let child;\n while (child = node2.nodes[node2.indexes[iterator]]) {\n node2.indexes[iterator] += 1;\n if (!child[isClean]) {\n child[isClean] = true;\n stack.push(toStack(child));\n return;\n }\n }\n visit2.iterator = 0;\n delete node2.indexes[iterator];\n }\n let events = visit2.events;\n while (visit2.eventIndex < events.length) {\n let event = events[visit2.eventIndex];\n visit2.eventIndex += 1;\n if (event === CHILDREN) {\n if (node2.nodes && node2.nodes.length) {\n node2[isClean] = true;\n visit2.iterator = node2.getIterator();\n }\n return;\n } else if (this.listeners[event]) {\n visit2.visitors = this.listeners[event];\n return;\n }\n }\n stack.pop();\n }\n walkSync(node2) {\n node2[isClean] = true;\n let events = getEvents(node2);\n for (let event of events) {\n if (event === CHILDREN) {\n if (node2.nodes) {\n node2.each((child) => {\n if (!child[isClean]) this.walkSync(child);\n });\n }\n } else {\n let visitors = this.listeners[event];\n if (visitors) {\n if (this.visitSync(visitors, node2.toProxy())) return;\n }\n }\n }\n }\n warnings() {\n return this.sync().warnings();\n }\n get content() {\n return this.stringify().content;\n }\n get css() {\n return this.stringify().css;\n }\n get map() {\n return this.stringify().map;\n }\n get messages() {\n return this.sync().messages;\n }\n get opts() {\n return this.result.opts;\n }\n get processor() {\n return this.result.processor;\n }\n get root() {\n return this.sync().root;\n }\n get [Symbol.toStringTag]() {\n return \"LazyResult\";\n }\n};\nLazyResult$2.registerPostcss = (dependant) => {\n postcss$2 = dependant;\n};\nvar lazyResult = LazyResult$2;\nLazyResult$2.default = LazyResult$2;\nRoot$3.registerLazyResult(LazyResult$2);\nDocument$2.registerLazyResult(LazyResult$2);\nlet MapGenerator22 = mapGenerator;\nlet stringify$1 = stringify_1;\nlet warnOnce22 = warnOnce$2;\nlet parse$1 = parse_1;\nconst Result$1 = result;\nlet NoWorkResult$1 = class NoWorkResult2 {\n constructor(processor2, css, opts) {\n css = css.toString();\n this.stringified = false;\n this._processor = processor2;\n this._css = css;\n this._opts = opts;\n this._map = void 0;\n let root2;\n let str = stringify$1;\n this.result = new Result$1(this._processor, root2, this._opts);\n this.result.css = css;\n let self = this;\n Object.defineProperty(this.result, \"root\", {\n get() {\n return self.root;\n }\n });\n let map = new MapGenerator22(str, root2, this._opts, css);\n if (map.isMap()) {\n let [generatedCSS, generatedMap] = map.generate();\n if (generatedCSS) {\n this.result.css = generatedCSS;\n }\n if (generatedMap) {\n this.result.map = generatedMap;\n }\n } else {\n map.clearAnnotation();\n this.result.css = map.css;\n }\n }\n async() {\n if (this.error) return Promise.reject(this.error);\n return Promise.resolve(this.result);\n }\n catch(onRejected) {\n return this.async().catch(onRejected);\n }\n finally(onFinally) {\n return this.async().then(onFinally, onFinally);\n }\n sync() {\n if (this.error) throw this.error;\n return this.result;\n }\n then(onFulfilled, onRejected) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!(\"from\" in this._opts)) {\n warnOnce22(\n \"Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.\"\n );\n }\n }\n return this.async().then(onFulfilled, onRejected);\n }\n toString() {\n return this._css;\n }\n warnings() {\n return [];\n }\n get content() {\n return this.result.css;\n }\n get css() {\n return this.result.css;\n }\n get map() {\n return this.result.map;\n }\n get messages() {\n return [];\n }\n get opts() {\n return this.result.opts;\n }\n get processor() {\n return this.result.processor;\n }\n get root() {\n if (this._root) {\n return this._root;\n }\n let root2;\n let parser2 = parse$1;\n try {\n root2 = parser2(this._css, this._opts);\n } catch (error) {\n this.error = error;\n }\n if (this.error) {\n throw this.error;\n } else {\n this._root = root2;\n return root2;\n }\n }\n get [Symbol.toStringTag]() {\n return \"NoWorkResult\";\n }\n};\nvar noWorkResult = NoWorkResult$1;\nNoWorkResult$1.default = NoWorkResult$1;\nlet NoWorkResult22 = noWorkResult;\nlet LazyResult$1 = lazyResult;\nlet Document$1 = document$1;\nlet Root$2 = root;\nlet Processor$1 = class Processor2 {\n constructor(plugins = []) {\n this.version = \"8.4.38\";\n this.plugins = this.normalize(plugins);\n }\n normalize(plugins) {\n let normalized = [];\n for (let i2 of plugins) {\n if (i2.postcss === true) {\n i2 = i2();\n } else if (i2.postcss) {\n i2 = i2.postcss;\n }\n if (typeof i2 === \"object\" && Array.isArray(i2.plugins)) {\n normalized = normalized.concat(i2.plugins);\n } else if (typeof i2 === \"object\" && i2.postcssPlugin) {\n normalized.push(i2);\n } else if (typeof i2 === \"function\") {\n normalized.push(i2);\n } else if (typeof i2 === \"object\" && (i2.parse || i2.stringify)) {\n if (process.env.NODE_ENV !== \"production\") {\n throw new Error(\n \"PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.\"\n );\n }\n } else {\n throw new Error(i2 + \" is not a PostCSS plugin\");\n }\n }\n return normalized;\n }\n process(css, opts = {}) {\n if (!this.plugins.length && !opts.parser && !opts.stringifier && !opts.syntax) {\n return new NoWorkResult22(this, css, opts);\n } else {\n return new LazyResult$1(this, css, opts);\n }\n }\n use(plugin22) {\n this.plugins = this.plugins.concat(this.normalize([plugin22]));\n return this;\n }\n};\nvar processor = Processor$1;\nProcessor$1.default = Processor$1;\nRoot$2.registerProcessor(Processor$1);\nDocument$1.registerProcessor(Processor$1);\nlet Declaration$1 = declaration;\nlet PreviousMap22 = previousMap;\nlet Comment$1 = comment;\nlet AtRule$1 = atRule;\nlet Input$1 = input;\nlet Root$1 = root;\nlet Rule$1 = rule;\nfunction fromJSON$1(json, inputs) {\n if (Array.isArray(json)) return json.map((n2) => fromJSON$1(n2));\n let { inputs: ownInputs, ...defaults } = json;\n if (ownInputs) {\n inputs = [];\n for (let input2 of ownInputs) {\n let inputHydrated = { ...input2, __proto__: Input$1.prototype };\n if (inputHydrated.map) {\n inputHydrated.map = {\n ...inputHydrated.map,\n __proto__: PreviousMap22.prototype\n };\n }\n inputs.push(inputHydrated);\n }\n }\n if (defaults.nodes) {\n defaults.nodes = json.nodes.map((n2) => fromJSON$1(n2, inputs));\n }\n if (defaults.source) {\n let { inputId, ...source } = defaults.source;\n defaults.source = source;\n if (inputId != null) {\n defaults.source.input = inputs[inputId];\n }\n }\n if (defaults.type === \"root\") {\n return new Root$1(defaults);\n } else if (defaults.type === \"decl\") {\n return new Declaration$1(defaults);\n } else if (defaults.type === \"rule\") {\n return new Rule$1(defaults);\n } else if (defaults.type === \"comment\") {\n return new Comment$1(defaults);\n } else if (defaults.type === \"atrule\") {\n return new AtRule$1(defaults);\n } else {\n throw new Error(\"Unknown node type: \" + json.type);\n }\n}\nvar fromJSON_1 = fromJSON$1;\nfromJSON$1.default = fromJSON$1;\nlet CssSyntaxError22 = cssSyntaxError;\nlet Declaration22 = declaration;\nlet LazyResult22 = lazyResult;\nlet Container22 = container;\nlet Processor22 = processor;\nlet stringify$6 = stringify_1;\nlet fromJSON = fromJSON_1;\nlet Document222 = document$1;\nlet Warning22 = warning;\nlet Comment22 = comment;\nlet AtRule22 = atRule;\nlet Result22 = result;\nlet Input22 = input;\nlet parse = parse_1;\nlet list = list_1;\nlet Rule22 = rule;\nlet Root22 = root;\nlet Node22 = node;\nfunction postcss(...plugins) {\n if (plugins.length === 1 && Array.isArray(plugins[0])) {\n plugins = plugins[0];\n }\n return new Processor22(plugins);\n}\npostcss.plugin = function plugin2(name, initializer) {\n let warningPrinted = false;\n function creator(...args) {\n if (console && console.warn && !warningPrinted) {\n warningPrinted = true;\n console.warn(\n name + \": postcss.plugin was deprecated. Migration guide:\\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration\"\n );\n if (process.env.LANG && process.env.LANG.startsWith(\"cn\")) {\n console.warn(\n name + \": 里面 postcss.plugin 被弃用. 迁移指南:\\nhttps://www.w3ctech.com/topic/2226\"\n );\n }\n }\n let transformer = initializer(...args);\n transformer.postcssPlugin = name;\n transformer.postcssVersion = new Processor22().version;\n return transformer;\n }\n let cache;\n Object.defineProperty(creator, \"postcss\", {\n get() {\n if (!cache) cache = creator();\n return cache;\n }\n });\n creator.process = function(css, processOpts, pluginOpts) {\n return postcss([creator(pluginOpts)]).process(css, processOpts);\n };\n return creator;\n};\npostcss.stringify = stringify$6;\npostcss.parse = parse;\npostcss.fromJSON = fromJSON;\npostcss.list = list;\npostcss.comment = (defaults) => new Comment22(defaults);\npostcss.atRule = (defaults) => new AtRule22(defaults);\npostcss.decl = (defaults) => new Declaration22(defaults);\npostcss.rule = (defaults) => new Rule22(defaults);\npostcss.root = (defaults) => new Root22(defaults);\npostcss.document = (defaults) => new Document222(defaults);\npostcss.CssSyntaxError = CssSyntaxError22;\npostcss.Declaration = Declaration22;\npostcss.Container = Container22;\npostcss.Processor = Processor22;\npostcss.Document = Document222;\npostcss.Comment = Comment22;\npostcss.Warning = Warning22;\npostcss.AtRule = AtRule22;\npostcss.Result = Result22;\npostcss.Input = Input22;\npostcss.Rule = Rule22;\npostcss.Root = Root22;\npostcss.Node = Node22;\nLazyResult22.registerPostcss(postcss);\nvar postcss_1 = postcss;\npostcss.default = postcss;\nconst postcss$1 = /* @__PURE__ */ getDefaultExportFromCjs(postcss_1);\npostcss$1.stringify;\npostcss$1.fromJSON;\npostcss$1.plugin;\npostcss$1.parse;\npostcss$1.list;\npostcss$1.document;\npostcss$1.comment;\npostcss$1.atRule;\npostcss$1.rule;\npostcss$1.decl;\npostcss$1.root;\npostcss$1.CssSyntaxError;\npostcss$1.Declaration;\npostcss$1.Container;\npostcss$1.Processor;\npostcss$1.Document;\npostcss$1.Comment;\npostcss$1.Warning;\npostcss$1.AtRule;\npostcss$1.Result;\npostcss$1.Input;\npostcss$1.Rule;\npostcss$1.Root;\npostcss$1.Node;\nclass BaseRRNode {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any\n constructor(..._args) {\n __publicField22(this, \"parentElement\", null);\n __publicField22(this, \"parentNode\", null);\n __publicField22(this, \"ownerDocument\");\n __publicField22(this, \"firstChild\", null);\n __publicField22(this, \"lastChild\", null);\n __publicField22(this, \"previousSibling\", null);\n __publicField22(this, \"nextSibling\", null);\n __publicField22(this, \"ELEMENT_NODE\", 1);\n __publicField22(this, \"TEXT_NODE\", 3);\n __publicField22(this, \"nodeType\");\n __publicField22(this, \"nodeName\");\n __publicField22(this, \"RRNodeType\");\n }\n get childNodes() {\n const childNodes2 = [];\n let childIterator = this.firstChild;\n while (childIterator) {\n childNodes2.push(childIterator);\n childIterator = childIterator.nextSibling;\n }\n return childNodes2;\n }\n contains(node2) {\n if (!(node2 instanceof BaseRRNode)) return false;\n else if (node2.ownerDocument !== this.ownerDocument) return false;\n else if (node2 === this) return true;\n while (node2.parentNode) {\n if (node2.parentNode === this) return true;\n node2 = node2.parentNode;\n }\n return false;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n appendChild(_newChild) {\n throw new Error(\n `RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.`\n );\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n insertBefore(_newChild, _refChild) {\n throw new Error(\n `RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.`\n );\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n removeChild(_node) {\n throw new Error(\n `RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.`\n );\n }\n toString() {\n return \"RRNode\";\n }\n}\nconst testableAccessors = {\n Node: [\"childNodes\", \"parentNode\", \"parentElement\", \"textContent\"],\n ShadowRoot: [\"host\", \"styleSheets\"],\n Element: [\"shadowRoot\", \"querySelector\", \"querySelectorAll\"],\n MutationObserver: []\n};\nconst testableMethods = {\n Node: [\"contains\", \"getRootNode\"],\n ShadowRoot: [\"getSelection\"],\n Element: [],\n MutationObserver: [\"constructor\"]\n};\nconst untaintedBasePrototype = {};\nconst isAngularZonePresent = () => {\n return !!globalThis.Zone;\n};\nfunction getUntaintedPrototype(key) {\n if (untaintedBasePrototype[key])\n return untaintedBasePrototype[key];\n const defaultObj = globalThis[key];\n const defaultPrototype = defaultObj.prototype;\n const accessorNames = key in testableAccessors ? testableAccessors[key] : void 0;\n const isUntaintedAccessors = Boolean(\n accessorNames && // @ts-expect-error 2345\n accessorNames.every(\n (accessor) => {\n var _a2, _b;\n return Boolean(\n (_b = (_a2 = Object.getOwnPropertyDescriptor(defaultPrototype, accessor)) == null ? void 0 : _a2.get) == null ? void 0 : _b.toString().includes(\"[native code]\")\n );\n }\n )\n );\n const methodNames = key in testableMethods ? testableMethods[key] : void 0;\n const isUntaintedMethods = Boolean(\n methodNames && methodNames.every(\n // @ts-expect-error 2345\n (method) => {\n var _a2;\n return typeof defaultPrototype[method] === \"function\" && ((_a2 = defaultPrototype[method]) == null ? void 0 : _a2.toString().includes(\"[native code]\"));\n }\n )\n );\n if (isUntaintedAccessors && isUntaintedMethods && !isAngularZonePresent()) {\n untaintedBasePrototype[key] = defaultObj.prototype;\n return defaultObj.prototype;\n }\n try {\n const iframeEl = document.createElement(\"iframe\");\n document.body.appendChild(iframeEl);\n const win = iframeEl.contentWindow;\n if (!win) return defaultObj.prototype;\n const untaintedObject = win[key].prototype;\n document.body.removeChild(iframeEl);\n if (!untaintedObject) return defaultPrototype;\n return untaintedBasePrototype[key] = untaintedObject;\n } catch {\n return defaultPrototype;\n }\n}\nconst untaintedAccessorCache = {};\nfunction getUntaintedAccessor(key, instance, accessor) {\n var _a2;\n const cacheKey = `${key}.${String(accessor)}`;\n if (untaintedAccessorCache[cacheKey])\n return untaintedAccessorCache[cacheKey].call(\n instance\n );\n const untaintedPrototype = getUntaintedPrototype(key);\n const untaintedAccessor = (_a2 = Object.getOwnPropertyDescriptor(\n untaintedPrototype,\n accessor\n )) == null ? void 0 : _a2.get;\n if (!untaintedAccessor) return instance[accessor];\n untaintedAccessorCache[cacheKey] = untaintedAccessor;\n return untaintedAccessor.call(instance);\n}\nconst untaintedMethodCache = {};\nfunction getUntaintedMethod(key, instance, method) {\n const cacheKey = `${key}.${String(method)}`;\n if (untaintedMethodCache[cacheKey])\n return untaintedMethodCache[cacheKey].bind(\n instance\n );\n const untaintedPrototype = getUntaintedPrototype(key);\n const untaintedMethod = untaintedPrototype[method];\n if (typeof untaintedMethod !== \"function\") return instance[method];\n untaintedMethodCache[cacheKey] = untaintedMethod;\n return untaintedMethod.bind(instance);\n}\nfunction childNodes(n2) {\n return getUntaintedAccessor(\"Node\", n2, \"childNodes\");\n}\nfunction parentNode(n2) {\n return getUntaintedAccessor(\"Node\", n2, \"parentNode\");\n}\nfunction parentElement(n2) {\n return getUntaintedAccessor(\"Node\", n2, \"parentElement\");\n}\nfunction textContent(n2) {\n return getUntaintedAccessor(\"Node\", n2, \"textContent\");\n}\nfunction contains(n2, other) {\n return getUntaintedMethod(\"Node\", n2, \"contains\")(other);\n}\nfunction getRootNode(n2) {\n return getUntaintedMethod(\"Node\", n2, \"getRootNode\")();\n}\nfunction host(n2) {\n if (!n2 || !(\"host\" in n2)) return null;\n return getUntaintedAccessor(\"ShadowRoot\", n2, \"host\");\n}\nfunction styleSheets(n2) {\n return n2.styleSheets;\n}\nfunction shadowRoot(n2) {\n if (!n2 || !(\"shadowRoot\" in n2)) return null;\n return getUntaintedAccessor(\"Element\", n2, \"shadowRoot\");\n}\nfunction querySelector(n2, selectors) {\n return getUntaintedAccessor(\"Element\", n2, \"querySelector\")(selectors);\n}\nfunction querySelectorAll(n2, selectors) {\n return getUntaintedAccessor(\"Element\", n2, \"querySelectorAll\")(selectors);\n}\nfunction mutationObserverCtor() {\n return getUntaintedPrototype(\"MutationObserver\").constructor;\n}\nconst index = {\n childNodes,\n parentNode,\n parentElement,\n textContent,\n contains,\n getRootNode,\n host,\n styleSheets,\n shadowRoot,\n querySelector,\n querySelectorAll,\n mutationObserver: mutationObserverCtor\n};\nfunction on(type, fn, target = document) {\n const options = { capture: true, passive: true };\n target.addEventListener(type, fn, options);\n return () => target.removeEventListener(type, fn, options);\n}\nconst DEPARTED_MIRROR_ACCESS_WARNING = \"Please stop import mirror directly. Instead of that,\\r\\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\\r\\nor you can use record.mirror to access the mirror instance during recording.\";\nlet _mirror = {\n map: {},\n getId() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return -1;\n },\n getNode() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return null;\n },\n removeNodeFromMap() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n },\n has() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n return false;\n },\n reset() {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n }\n};\nif (typeof window !== \"undefined\" && window.Proxy && window.Reflect) {\n _mirror = new Proxy(_mirror, {\n get(target, prop, receiver) {\n if (prop === \"map\") {\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\n }\n return Reflect.get(target, prop, receiver);\n }\n });\n}\nfunction throttle(func, wait, options = {}) {\n let timeout = null;\n let previous = 0;\n return function(...args) {\n const now = Date.now();\n if (!previous && options.leading === false) {\n previous = now;\n }\n const remaining = wait - (now - previous);\n const context = this;\n if (remaining <= 0 || remaining > wait) {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n previous = now;\n func.apply(context, args);\n } else if (!timeout && options.trailing !== false) {\n timeout = setTimeout(() => {\n previous = options.leading === false ? 0 : Date.now();\n timeout = null;\n func.apply(context, args);\n }, remaining);\n }\n };\n}\nfunction hookSetter(target, key, d, isRevoked, win = window) {\n const original = win.Object.getOwnPropertyDescriptor(target, key);\n win.Object.defineProperty(\n target,\n key,\n isRevoked ? d : {\n set(value) {\n setTimeout(() => {\n d.set.call(this, value);\n }, 0);\n if (original && original.set) {\n original.set.call(this, value);\n }\n }\n }\n );\n return () => hookSetter(target, key, original || {}, true);\n}\nfunction patch(source, name, replacement) {\n try {\n if (!(name in source)) {\n return () => {\n };\n }\n const original = source[name];\n const wrapped = replacement(original);\n if (typeof wrapped === \"function\") {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __rrweb_original__: {\n enumerable: false,\n value: original\n }\n });\n }\n source[name] = wrapped;\n return () => {\n source[name] = original;\n };\n } catch {\n return () => {\n };\n }\n}\nlet nowTimestamp = Date.now;\nif (!/* @__PURE__ */ /[1-9][0-9]{12}/.test(Date.now().toString())) {\n nowTimestamp = () => (/* @__PURE__ */ new Date()).getTime();\n}\nfunction getWindowScroll(win) {\n var _a2, _b, _c, _d;\n const doc = win.document;\n return {\n left: doc.scrollingElement ? doc.scrollingElement.scrollLeft : win.pageXOffset !== void 0 ? win.pageXOffset : doc.documentElement.scrollLeft || (doc == null ? void 0 : doc.body) && ((_a2 = index.parentElement(doc.body)) == null ? void 0 : _a2.scrollLeft) || ((_b = doc == null ? void 0 : doc.body) == null ? void 0 : _b.scrollLeft) || 0,\n top: doc.scrollingElement ? doc.scrollingElement.scrollTop : win.pageYOffset !== void 0 ? win.pageYOffset : (doc == null ? void 0 : doc.documentElement.scrollTop) || (doc == null ? void 0 : doc.body) && ((_c = index.parentElement(doc.body)) == null ? void 0 : _c.scrollTop) || ((_d = doc == null ? void 0 : doc.body) == null ? void 0 : _d.scrollTop) || 0\n };\n}\nfunction getWindowHeight() {\n return window.innerHeight || document.documentElement && document.documentElement.clientHeight || document.body && document.body.clientHeight;\n}\nfunction getWindowWidth() {\n return window.innerWidth || document.documentElement && document.documentElement.clientWidth || document.body && document.body.clientWidth;\n}\nfunction closestElementOfNode(node2) {\n if (!node2) {\n return null;\n }\n const el = node2.nodeType === node2.ELEMENT_NODE ? node2 : index.parentElement(node2);\n return el;\n}\nfunction isBlocked(node2, blockClass, blockSelector, checkAncestors) {\n if (!node2) {\n return false;\n }\n const el = closestElementOfNode(node2);\n if (!el) {\n return false;\n }\n try {\n if (typeof blockClass === \"string\") {\n if (el.classList.contains(blockClass)) return true;\n if (checkAncestors && el.closest(\".\" + blockClass) !== null) return true;\n } else {\n if (classMatchesRegex(el, blockClass, checkAncestors)) return true;\n }\n } catch (e2) {\n }\n if (blockSelector) {\n if (el.matches(blockSelector)) return true;\n if (checkAncestors && el.closest(blockSelector) !== null) return true;\n }\n return false;\n}\nfunction isSerialized(n2, mirror2) {\n return mirror2.getId(n2) !== -1;\n}\nfunction isIgnored(n2, mirror2, slimDOMOptions) {\n if (n2.tagName === \"TITLE\" && slimDOMOptions.headTitleMutations) {\n return true;\n }\n return mirror2.getId(n2) === IGNORED_NODE;\n}\nfunction isAncestorRemoved(target, mirror2) {\n if (isShadowRoot(target)) {\n return false;\n }\n const id = mirror2.getId(target);\n if (!mirror2.has(id)) {\n return true;\n }\n const parent = index.parentNode(target);\n if (parent && parent.nodeType === target.DOCUMENT_NODE) {\n return false;\n }\n if (!parent) {\n return true;\n }\n return isAncestorRemoved(parent, mirror2);\n}\nfunction legacy_isTouchEvent(event) {\n return Boolean(event.changedTouches);\n}\nfunction polyfill$1(win = window) {\n if (\"NodeList\" in win && !win.NodeList.prototype.forEach) {\n win.NodeList.prototype.forEach = Array.prototype.forEach;\n }\n if (\"DOMTokenList\" in win && !win.DOMTokenList.prototype.forEach) {\n win.DOMTokenList.prototype.forEach = Array.prototype.forEach;\n }\n}\nfunction queueToResolveTrees(queue) {\n const queueNodeMap = {};\n const putIntoMap = (m, parent) => {\n const nodeInTree = {\n value: m,\n parent,\n children: []\n };\n queueNodeMap[m.node.id] = nodeInTree;\n return nodeInTree;\n };\n const queueNodeTrees = [];\n for (const mutation of queue) {\n const { nextId, parentId } = mutation;\n if (nextId && nextId in queueNodeMap) {\n const nextInTree = queueNodeMap[nextId];\n if (nextInTree.parent) {\n const idx = nextInTree.parent.children.indexOf(nextInTree);\n nextInTree.parent.children.splice(\n idx,\n 0,\n putIntoMap(mutation, nextInTree.parent)\n );\n } else {\n const idx = queueNodeTrees.indexOf(nextInTree);\n queueNodeTrees.splice(idx, 0, putIntoMap(mutation, null));\n }\n continue;\n }\n if (parentId in queueNodeMap) {\n const parentInTree = queueNodeMap[parentId];\n parentInTree.children.push(putIntoMap(mutation, parentInTree));\n continue;\n }\n queueNodeTrees.push(putIntoMap(mutation, null));\n }\n return queueNodeTrees;\n}\nfunction iterateResolveTree(tree, cb) {\n cb(tree.value);\n for (let i2 = tree.children.length - 1; i2 >= 0; i2--) {\n iterateResolveTree(tree.children[i2], cb);\n }\n}\nfunction isSerializedIframe(n2, mirror2) {\n return Boolean(n2.nodeName === \"IFRAME\" && mirror2.getMeta(n2));\n}\nfunction isSerializedStylesheet(n2, mirror2) {\n return Boolean(\n n2.nodeName === \"LINK\" && n2.nodeType === n2.ELEMENT_NODE && n2.getAttribute && n2.getAttribute(\"rel\") === \"stylesheet\" && mirror2.getMeta(n2)\n );\n}\nfunction getBaseDimension(node2, rootIframe) {\n var _a2, _b;\n const frameElement = (_b = (_a2 = node2.ownerDocument) == null ? void 0 : _a2.defaultView) == null ? void 0 : _b.frameElement;\n if (!frameElement || frameElement === rootIframe) {\n return {\n x: 0,\n y: 0,\n relativeScale: 1,\n absoluteScale: 1\n };\n }\n const frameDimension = frameElement.getBoundingClientRect();\n const frameBaseDimension = getBaseDimension(frameElement, rootIframe);\n const relativeScale = frameDimension.height / frameElement.clientHeight;\n return {\n x: frameDimension.x * frameBaseDimension.relativeScale + frameBaseDimension.x,\n y: frameDimension.y * frameBaseDimension.relativeScale + frameBaseDimension.y,\n relativeScale,\n absoluteScale: frameBaseDimension.absoluteScale * relativeScale\n };\n}\nfunction hasShadowRoot(n2) {\n if (!n2) return false;\n if (n2 instanceof BaseRRNode && \"shadowRoot\" in n2) {\n return Boolean(n2.shadowRoot);\n }\n return Boolean(index.shadowRoot(n2));\n}\nfunction getNestedRule(rules2, position) {\n const rule2 = rules2[position[0]];\n if (position.length === 1) {\n return rule2;\n } else {\n return getNestedRule(\n rule2.cssRules[position[1]].cssRules,\n position.slice(2)\n );\n }\n}\nfunction getPositionsAndIndex(nestedIndex) {\n const positions = [...nestedIndex];\n const index2 = positions.pop();\n return { positions, index: index2 };\n}\nfunction uniqueTextMutations(mutations) {\n const idSet = /* @__PURE__ */ new Set();\n const uniqueMutations = [];\n for (let i2 = mutations.length; i2--; ) {\n const mutation = mutations[i2];\n if (!idSet.has(mutation.id)) {\n uniqueMutations.push(mutation);\n idSet.add(mutation.id);\n }\n }\n return uniqueMutations;\n}\nclass StyleSheetMirror {\n constructor() {\n __publicField2(this, \"id\", 1);\n __publicField2(this, \"styleIDMap\", /* @__PURE__ */ new WeakMap());\n __publicField2(this, \"idStyleMap\", /* @__PURE__ */ new Map());\n }\n getId(stylesheet) {\n return this.styleIDMap.get(stylesheet) ?? -1;\n }\n has(stylesheet) {\n return this.styleIDMap.has(stylesheet);\n }\n /**\n * @returns If the stylesheet is in the mirror, returns the id of the stylesheet. If not, return the new assigned id.\n */\n add(stylesheet, id) {\n if (this.has(stylesheet)) return this.getId(stylesheet);\n let newId;\n if (id === void 0) {\n newId = this.id++;\n } else newId = id;\n this.styleIDMap.set(stylesheet, newId);\n this.idStyleMap.set(newId, stylesheet);\n return newId;\n }\n getStyle(id) {\n return this.idStyleMap.get(id) || null;\n }\n reset() {\n this.styleIDMap = /* @__PURE__ */ new WeakMap();\n this.idStyleMap = /* @__PURE__ */ new Map();\n this.id = 1;\n }\n generateId() {\n return this.id++;\n }\n}\nfunction getShadowHost(n2) {\n var _a2;\n let shadowHost = null;\n if (\"getRootNode\" in n2 && ((_a2 = index.getRootNode(n2)) == null ? void 0 : _a2.nodeType) === Node.DOCUMENT_FRAGMENT_NODE && index.host(index.getRootNode(n2)))\n shadowHost = index.host(index.getRootNode(n2));\n return shadowHost;\n}\nfunction getRootShadowHost(n2) {\n let rootShadowHost = n2;\n let shadowHost;\n while (shadowHost = getShadowHost(rootShadowHost))\n rootShadowHost = shadowHost;\n return rootShadowHost;\n}\nfunction shadowHostInDom(n2) {\n const doc = n2.ownerDocument;\n if (!doc) return false;\n const shadowHost = getRootShadowHost(n2);\n return index.contains(doc, shadowHost);\n}\nfunction inDom(n2) {\n const doc = n2.ownerDocument;\n if (!doc) return false;\n return index.contains(doc, n2) || shadowHostInDom(n2);\n}\nconst utils = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({\n __proto__: null,\n StyleSheetMirror,\n get _mirror() {\n return _mirror;\n },\n closestElementOfNode,\n getBaseDimension,\n getNestedRule,\n getPositionsAndIndex,\n getRootShadowHost,\n getShadowHost,\n getWindowHeight,\n getWindowScroll,\n getWindowWidth,\n hasShadowRoot,\n hookSetter,\n inDom,\n isAncestorRemoved,\n isBlocked,\n isIgnored,\n isSerialized,\n isSerializedIframe,\n isSerializedStylesheet,\n iterateResolveTree,\n legacy_isTouchEvent,\n get nowTimestamp() {\n return nowTimestamp;\n },\n on,\n patch,\n polyfill: polyfill$1,\n queueToResolveTrees,\n shadowHostInDom,\n throttle,\n uniqueTextMutations\n}, Symbol.toStringTag, { value: \"Module\" }));\nvar chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\nvar lookup = typeof Uint8Array === \"undefined\" ? [] : new Uint8Array(256);\nfor (var i$1 = 0; i$1 < chars.length; i$1++) {\n lookup[chars.charCodeAt(i$1)] = i$1;\n}\nconst encodedJs = \"KGZ1bmN0aW9uKCkgewogICJ1c2Ugc3RyaWN0IjsKICB2YXIgY2hhcnMgPSAiQUJDREVGR0hJSktMTU5PUFFSU1RVVldYWVphYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkrLyI7CiAgdmFyIGxvb2t1cCA9IHR5cGVvZiBVaW50OEFycmF5ID09PSAidW5kZWZpbmVkIiA/IFtdIDogbmV3IFVpbnQ4QXJ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GF0YS5pZCB9KTsKICAgIH0KICB9Owp9KSgpOwovLyMgc291cmNlTWFwcGluZ1VSTD1pbWFnZS1iaXRtYXAtZGF0YS11cmwtd29ya2VyLUlKcEM3Z19iLmpzLm1hcAo=\";\nconst decodeBase64 = (base64) => Uint8Array.from(atob(base64), (c2) => c2.charCodeAt(0));\ntypeof window !== \"undefined\" && window.Blob && new Blob([decodeBase64(encodedJs)], { type: \"text/javascript;charset=utf-8\" });\ntry {\n if (Array.from([1], (x2) => x2 * 2)[0] !== 2) {\n const cleanFrame = document.createElement(\"iframe\");\n document.body.appendChild(cleanFrame);\n Array.from = ((_a = cleanFrame.contentWindow) == null ? void 0 : _a.Array.from) || Array.from;\n document.body.removeChild(cleanFrame);\n }\n} catch (err) {\n console.debug(\"Unable to override Array.from\", err);\n}\ncreateMirror$2();\nvar n;\n!function(t2) {\n t2[t2.NotStarted = 0] = \"NotStarted\", t2[t2.Running = 1] = \"Running\", t2[t2.Stopped = 2] = \"Stopped\";\n}(n || (n = {}));\nclass StackFrame {\n constructor(obj) {\n __publicField(this, \"fileName\");\n __publicField(this, \"functionName\");\n __publicField(this, \"lineNumber\");\n __publicField(this, \"columnNumber\");\n this.fileName = obj.fileName || \"\";\n this.functionName = obj.functionName || \"\";\n this.lineNumber = obj.lineNumber;\n this.columnNumber = obj.columnNumber;\n }\n toString() {\n const lineNumber = this.lineNumber || \"\";\n const columnNumber = this.columnNumber || \"\";\n if (this.functionName)\n return `${this.functionName} (${this.fileName}:${lineNumber}:${columnNumber})`;\n return `${this.fileName}:${lineNumber}:${columnNumber}`;\n }\n}\nconst FIREFOX_SAFARI_STACK_REGEXP = /(^|@)\\S+:\\d+/;\nconst CHROME_IE_STACK_REGEXP = /^\\s*at .*(\\S+:\\d+|\\(native\\))/m;\nconst SAFARI_NATIVE_CODE_REGEXP = /^(eval@)?(\\[native code])?$/;\nconst ErrorStackParser = {\n /**\n * Given an Error object, extract the most information from it.\n */\n parse: function(error) {\n if (!error) {\n return [];\n }\n if (\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n typeof error.stacktrace !== \"undefined\" || // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n typeof error[\"opera#sourceloc\"] !== \"undefined\"\n ) {\n return this.parseOpera(\n error\n );\n } else if (error.stack && error.stack.match(CHROME_IE_STACK_REGEXP)) {\n return this.parseV8OrIE(error);\n } else if (error.stack) {\n return this.parseFFOrSafari(error);\n } else {\n console.warn(\n \"[console-record-plugin]: Failed to parse error object:\",\n error\n );\n return [];\n }\n },\n // Separate line and column numbers from a string of the form: (URI:Line:Column)\n extractLocation: function(urlLike) {\n if (urlLike.indexOf(\":\") === -1) {\n return [urlLike];\n }\n const regExp = /(.+?)(?::(\\d+))?(?::(\\d+))?$/;\n const parts = regExp.exec(urlLike.replace(/[()]/g, \"\"));\n if (!parts) throw new Error(`Cannot parse given url: ${urlLike}`);\n return [parts[1], parts[2] || void 0, parts[3] || void 0];\n },\n parseV8OrIE: function(error) {\n const filtered = error.stack.split(\"\\n\").filter(function(line) {\n return !!line.match(CHROME_IE_STACK_REGEXP);\n }, this);\n return filtered.map(function(line) {\n if (line.indexOf(\"(eval \") > -1) {\n line = line.replace(/eval code/g, \"eval\").replace(/(\\(eval at [^()]*)|(\\),.*$)/g, \"\");\n }\n let sanitizedLine = line.replace(/^\\s+/, \"\").replace(/\\(eval code/g, \"(\");\n const location = sanitizedLine.match(/ (\\((.+):(\\d+):(\\d+)\\)$)/);\n sanitizedLine = location ? sanitizedLine.replace(location[0], \"\") : sanitizedLine;\n const tokens = sanitizedLine.split(/\\s+/).slice(1);\n const locationParts = this.extractLocation(\n location ? location[1] : tokens.pop()\n );\n const functionName = tokens.join(\" \") || void 0;\n const fileName = [\"eval\", \"<anonymous>\"].indexOf(locationParts[0]) > -1 ? void 0 : locationParts[0];\n return new StackFrame({\n functionName,\n fileName,\n lineNumber: locationParts[1],\n columnNumber: locationParts[2]\n });\n }, this);\n },\n parseFFOrSafari: function(error) {\n const filtered = error.stack.split(\"\\n\").filter(function(line) {\n return !line.match(SAFARI_NATIVE_CODE_REGEXP);\n }, this);\n return filtered.map(function(line) {\n if (line.indexOf(\" > eval\") > -1) {\n line = line.replace(\n / line (\\d+)(?: > eval line \\d+)* > eval:\\d+:\\d+/g,\n \":$1\"\n );\n }\n if (line.indexOf(\"@\") === -1 && line.indexOf(\":\") === -1) {\n return new StackFrame({\n functionName: line\n });\n } else {\n const functionNameRegex = /((.*\".+\"[^@]*)?[^@]*)(?:@)/;\n const matches = line.match(functionNameRegex);\n const functionName = matches && matches[1] ? matches[1] : void 0;\n const locationParts = this.extractLocation(\n line.replace(functionNameRegex, \"\")\n );\n return new StackFrame({\n functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2]\n });\n }\n }, this);\n },\n parseOpera: function(e) {\n if (!e.stacktrace || e.message.indexOf(\"\\n\") > -1 && e.message.split(\"\\n\").length > e.stacktrace.split(\"\\n\").length) {\n return this.parseOpera9(e);\n } else if (!e.stack) {\n return this.parseOpera10(e);\n } else {\n return this.parseOpera11(e);\n }\n },\n parseOpera9: function(e) {\n const lineRE = /Line (\\d+).*script (?:in )?(\\S+)/i;\n const lines = e.message.split(\"\\n\");\n const result2 = [];\n for (let i = 2, len = lines.length; i < len; i += 2) {\n const match = lineRE.exec(lines[i]);\n if (match) {\n result2.push(\n new StackFrame({\n fileName: match[2],\n lineNumber: parseFloat(match[1])\n })\n );\n }\n }\n return result2;\n },\n parseOpera10: function(e) {\n const lineRE = /Line (\\d+).*script (?:in )?(\\S+)(?:: In function (\\S+))?$/i;\n const lines = e.stacktrace.split(\"\\n\");\n const result2 = [];\n for (let i = 0, len = lines.length; i < len; i += 2) {\n const match = lineRE.exec(lines[i]);\n if (match) {\n result2.push(\n new StackFrame({\n functionName: match[3] || void 0,\n fileName: match[2],\n lineNumber: parseFloat(match[1])\n })\n );\n }\n }\n return result2;\n },\n // Opera 10.65+ Error.stack very similar to FF/Safari\n parseOpera11: function(error) {\n const filtered = error.stack.split(\"\\n\").filter(function(line) {\n return !!line.match(FIREFOX_SAFARI_STACK_REGEXP) && !line.match(/^Error created at/);\n }, this);\n return filtered.map(function(line) {\n const tokens = line.split(\"@\");\n const locationParts = this.extractLocation(tokens.pop());\n const functionCall = tokens.shift() || \"\";\n const functionName = functionCall.replace(/<anonymous function(: (\\w+))?>/, \"$2\").replace(/\\([^)]*\\)/g, \"\") || void 0;\n return new StackFrame({\n functionName,\n fileName: locationParts[0],\n lineNumber: locationParts[1],\n columnNumber: locationParts[2]\n });\n }, this);\n }\n};\nfunction pathToSelector(node2) {\n if (!node2 || !node2.outerHTML) {\n return \"\";\n }\n let path = \"\";\n while (node2.parentElement) {\n let name = node2.localName;\n if (!name) {\n break;\n }\n name = name.toLowerCase();\n const parent = node2.parentElement;\n const domSiblings = [];\n if (parent.children && parent.children.length > 0) {\n for (let i = 0; i < parent.children.length; i++) {\n const sibling = parent.children[i];\n if (sibling.localName && sibling.localName.toLowerCase) {\n if (sibling.localName.toLowerCase() === name) {\n domSiblings.push(sibling);\n }\n }\n }\n }\n if (domSiblings.length > 1) {\n name += `:eq(${domSiblings.indexOf(node2)})`;\n }\n path = name + (path ? \">\" + path : \"\");\n node2 = parent;\n }\n return path;\n}\nfunction isObject(obj) {\n return Object.prototype.toString.call(obj) === \"[object Object]\";\n}\nfunction isObjTooDeep(obj, limit) {\n if (limit === 0) {\n return true;\n }\n const keys = Object.keys(obj);\n for (const key of keys) {\n if (isObject(obj[key]) && isObjTooDeep(obj[key], limit - 1)) {\n return true;\n }\n }\n return false;\n}\nfunction stringify(obj, stringifyOptions) {\n const options = {\n numOfKeysLimit: 50,\n depthOfLimit: 4\n };\n Object.assign(options, stringifyOptions);\n const stack = [];\n const keys = [];\n return JSON.stringify(\n obj,\n function(key, value) {\n if (stack.length > 0) {\n const thisPos = stack.indexOf(this);\n ~thisPos ? stack.splice(thisPos + 1) : stack.push(this);\n ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key);\n if (~stack.indexOf(value)) {\n if (stack[0] === value) {\n value = \"[Circular ~]\";\n } else {\n value = \"[Circular ~.\" + keys.slice(0, stack.indexOf(value)).join(\".\") + \"]\";\n }\n }\n } else {\n stack.push(value);\n }\n if (value === null) return value;\n if (value === void 0) return \"undefined\";\n if (shouldIgnore(value)) {\n return toString(value);\n }\n if (typeof value === \"bigint\") {\n return value.toString() + \"n\";\n }\n if (value instanceof Event) {\n const eventResult = {};\n for (const eventKey in value) {\n const eventValue = value[eventKey];\n if (Array.isArray(eventValue)) {\n eventResult[eventKey] = pathToSelector(\n eventValue.length ? eventValue[0] : null\n );\n } else {\n eventResult[eventKey] = eventValue;\n }\n }\n return eventResult;\n } else if (value instanceof Node) {\n if (value instanceof HTMLElement) {\n return value ? value.outerHTML : \"\";\n }\n return value.nodeName;\n } else if (value instanceof Error) {\n return value.stack ? value.stack + \"\\nEnd of stack for Error object\" : value.name + \": \" + value.message;\n }\n return value;\n }\n );\n function shouldIgnore(_obj) {\n if (isObject(_obj) && Object.keys(_obj).length > options.numOfKeysLimit) {\n return true;\n }\n if (typeof _obj === \"function\") {\n return true;\n }\n if (isObject(_obj) && isObjTooDeep(_obj, options.depthOfLimit)) {\n return true;\n }\n return false;\n }\n function toString(_obj) {\n let str = _obj.toString();\n if (options.stringLengthLimit && str.length > options.stringLengthLimit) {\n str = `${str.slice(0, options.stringLengthLimit)}...`;\n }\n return str;\n }\n}\nconst defaultLogOptions = {\n level: [\n \"assert\",\n \"clear\",\n \"count\",\n \"countReset\",\n \"debug\",\n \"dir\",\n \"dirxml\",\n \"error\",\n \"group\",\n \"groupCollapsed\",\n \"groupEnd\",\n \"info\",\n \"log\",\n \"table\",\n \"time\",\n \"timeEnd\",\n \"timeLog\",\n \"trace\",\n \"warn\"\n ],\n lengthThreshold: 1e3,\n logger: \"console\"\n};\nfunction initLogObserver(cb, win, options) {\n const logOptions = options ? Object.assign({}, defaultLogOptions, options) : defaultLogOptions;\n const loggerType = logOptions.logger;\n if (!loggerType) {\n return () => {\n };\n }\n let logger;\n if (typeof loggerType === \"string\") {\n logger = win[loggerType];\n } else {\n logger = loggerType;\n }\n let logCount = 0;\n let inStack = false;\n const cancelHandlers = [];\n if (logOptions.level.includes(\"error\")) {\n const errorHandler = (event) => {\n const message = event.message, error = event.error;\n const trace = ErrorStackParser.parse(error).map(\n (stackFrame) => stackFrame.toString()\n );\n const payload = [stringify(message, logOptions.stringifyOptions)];\n cb({\n level: \"error\",\n trace,\n payload\n });\n };\n win.addEventListener(\"error\", errorHandler);\n cancelHandlers.push(() => {\n win.removeEventListener(\"error\", errorHandler);\n });\n const unhandledrejectionHandler = (event) => {\n let error;\n let payload;\n if (event.reason instanceof Error) {\n error = event.reason;\n payload = [\n stringify(\n `Uncaught (in promise) ${error.name}: ${error.message}`,\n logOptions.stringifyOptions\n )\n ];\n } else {\n error = new Error();\n payload = [\n stringify(\"Uncaught (in promise)\", logOptions.stringifyOptions),\n stringify(event.reason, logOptions.stringifyOptions)\n ];\n }\n const trace = ErrorStackParser.parse(error).map(\n (stackFrame) => stackFrame.toString()\n );\n cb({\n level: \"error\",\n trace,\n payload\n });\n };\n win.addEventListener(\"unhandledrejection\", unhandledrejectionHandler);\n cancelHandlers.push(() => {\n win.removeEventListener(\"unhandledrejection\", unhandledrejectionHandler);\n });\n }\n for (const levelType of logOptions.level) {\n cancelHandlers.push(replace(logger, levelType));\n }\n return () => {\n cancelHandlers.forEach((h) => h());\n };\n function replace(_logger, level) {\n if (!_logger[level]) {\n return () => {\n };\n }\n return utils.patch(\n _logger,\n level,\n (original) => {\n return (...args) => {\n original.apply(this, args);\n if (level === \"assert\" && !!args[0]) {\n return;\n }\n if (inStack) {\n return;\n }\n inStack = true;\n try {\n const trace = ErrorStackParser.parse(new Error()).map((stackFrame) => stackFrame.toString()).splice(1);\n const argsForPayload = level === \"assert\" ? args.slice(1) : args;\n const payload = argsForPayload.map(\n (s) => stringify(s, logOptions.stringifyOptions)\n );\n logCount++;\n if (logCount < logOptions.lengthThreshold) {\n cb({\n level,\n trace,\n payload\n });\n } else if (logCount === logOptions.lengthThreshold) {\n cb({\n level: \"warn\",\n trace: [],\n payload: [\n stringify(\"The number of log records reached the threshold.\")\n ]\n });\n }\n } catch (error) {\n original(\"rrweb logger error:\", error, ...args);\n } finally {\n inStack = false;\n }\n };\n }\n );\n }\n}\nconst PLUGIN_NAME = \"rrweb/console@1\";\nconst getRecordConsolePlugin = (options) => ({\n name: PLUGIN_NAME,\n observer: initLogObserver,\n options\n});\nexport {\n PLUGIN_NAME,\n getRecordConsolePlugin\n};\n//# sourceMappingURL=rrweb-plugin-console-record.js.map\n","var NodeType;\r\n(function (NodeType) {\r\n NodeType[NodeType[\"Document\"] = 0] = \"Document\";\r\n NodeType[NodeType[\"DocumentType\"] = 1] = \"DocumentType\";\r\n NodeType[NodeType[\"Element\"] = 2] = \"Element\";\r\n NodeType[NodeType[\"Text\"] = 3] = \"Text\";\r\n NodeType[NodeType[\"CDATA\"] = 4] = \"CDATA\";\r\n NodeType[NodeType[\"Comment\"] = 5] = \"Comment\";\r\n})(NodeType || (NodeType = {}));\n\nfunction isElement(n) {\r\n return n.nodeType === n.ELEMENT_NODE;\r\n}\r\nfunction isShadowRoot(n) {\r\n var host = n === null || n === void 0 ? void 0 : n.host;\r\n return Boolean((host === null || host === void 0 ? void 0 : host.shadowRoot) === n);\r\n}\r\nfunction isNativeShadowDom(shadowRoot) {\r\n return Object.prototype.toString.call(shadowRoot) === '[object ShadowRoot]';\r\n}\r\nfunction fixBrowserCompatibilityIssuesInCSS(cssText) {\r\n if (cssText.includes(' background-clip: text;') &&\r\n !cssText.includes(' -webkit-background-clip: text;')) {\r\n cssText = cssText.replace(' background-clip: text;', ' -webkit-background-clip: text; background-clip: text;');\r\n }\r\n return cssText;\r\n}\r\nfunction getCssRulesString(s) {\r\n try {\r\n var rules = s.rules || s.cssRules;\r\n return rules\r\n ? fixBrowserCompatibilityIssuesInCSS(Array.from(rules).map(getCssRuleString).join(''))\r\n : null;\r\n }\r\n catch (error) {\r\n return null;\r\n }\r\n}\r\nfunction getCssRuleString(rule) {\r\n var cssStringified = rule.cssText;\r\n if (isCSSImportRule(rule)) {\r\n try {\r\n cssStringified = getCssRulesString(rule.styleSheet) || cssStringified;\r\n }\r\n catch (_a) {\r\n }\r\n }\r\n return cssStringified;\r\n}\r\nfunction isCSSImportRule(rule) {\r\n return 'styleSheet' in rule;\r\n}\r\nvar Mirror = (function () {\r\n function Mirror() {\r\n this.idNodeMap = new Map();\r\n this.nodeMetaMap = new WeakMap();\r\n }\r\n Mirror.prototype.getId = function (n) {\r\n var _a;\r\n if (!n)\r\n return -1;\r\n var id = (_a = this.getMeta(n)) === null || _a === void 0 ? void 0 : _a.id;\r\n return id !== null && id !== void 0 ? id : -1;\r\n };\r\n Mirror.prototype.getNode = function (id) {\r\n return this.idNodeMap.get(id) || null;\r\n };\r\n Mirror.prototype.getIds = function () {\r\n return Array.from(this.idNodeMap.keys());\r\n };\r\n Mirror.prototype.getMeta = function (n) {\r\n return this.nodeMetaMap.get(n) || null;\r\n };\r\n Mirror.prototype.removeNodeFromMap = function (n) {\r\n var _this = this;\r\n var id = this.getId(n);\r\n this.idNodeMap[\"delete\"](id);\r\n if (n.childNodes) {\r\n n.childNodes.forEach(function (childNode) {\r\n return _this.removeNodeFromMap(childNode);\r\n });\r\n }\r\n };\r\n Mirror.prototype.has = function (id) {\r\n return this.idNodeMap.has(id);\r\n };\r\n Mirror.prototype.hasNode = function (node) {\r\n return this.nodeMetaMap.has(node);\r\n };\r\n Mirror.prototype.add = function (n, meta) {\r\n var id = meta.id;\r\n this.idNodeMap.set(id, n);\r\n this.nodeMetaMap.set(n, meta);\r\n };\r\n Mirror.prototype.replace = function (id, n) {\r\n var oldNode = this.getNode(id);\r\n if (oldNode) {\r\n var meta = this.nodeMetaMap.get(oldNode);\r\n if (meta)\r\n this.nodeMetaMap.set(n, meta);\r\n }\r\n this.idNodeMap.set(id, n);\r\n };\r\n Mirror.prototype.reset = function () {\r\n this.idNodeMap = new Map();\r\n this.nodeMetaMap = new WeakMap();\r\n };\r\n return Mirror;\r\n}());\r\nfunction createMirror() {\r\n return new Mirror();\r\n}\r\nfunction maskInputValue(_a) {\r\n var maskInputOptions = _a.maskInputOptions, tagName = _a.tagName, type = _a.type, value = _a.value, maskInputFn = _a.maskInputFn;\r\n var text = value || '';\r\n if (maskInputOptions[tagName.toLowerCase()] ||\r\n maskInputOptions[type]) {\r\n if (maskInputFn) {\r\n text = maskInputFn(text);\r\n }\r\n else {\r\n text = '*'.repeat(text.length);\r\n }\r\n }\r\n return text;\r\n}\r\nvar ORIGINAL_ATTRIBUTE_NAME = '__rrweb_original__';\r\nfunction is2DCanvasBlank(canvas) {\r\n var ctx = canvas.getContext('2d');\r\n if (!ctx)\r\n return true;\r\n var chunkSize = 50;\r\n for (var x = 0; x < canvas.width; x += chunkSize) {\r\n for (var y = 0; y < canvas.height; y += chunkSize) {\r\n var getImageData = ctx.getImageData;\r\n var originalGetImageData = ORIGINAL_ATTRIBUTE_NAME in getImageData\r\n ? getImageData[ORIGINAL_ATTRIBUTE_NAME]\r\n : getImageData;\r\n var pixelBuffer = new Uint32Array(originalGetImageData.call(ctx, x, y, Math.min(chunkSize, canvas.width - x), Math.min(chunkSize, canvas.height - y)).data.buffer);\r\n if (pixelBuffer.some(function (pixel) { return pixel !== 0; }))\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\n\nvar _id = 1;\r\nvar tagNameRegex = new RegExp('[^a-z0-9-_:]');\r\nvar IGNORED_NODE = -2;\r\nfunction genId() {\r\n return _id++;\r\n}\r\nfunction getValidTagName(element) {\r\n if (element instanceof HTMLFormElement) {\r\n return 'form';\r\n }\r\n var processedTagName = element.tagName.toLowerCase().trim();\r\n if (tagNameRegex.test(processedTagName)) {\r\n return 'div';\r\n }\r\n return processedTagName;\r\n}\r\nfunction stringifyStyleSheet(sheet) {\r\n return sheet.cssRules\r\n ? Array.from(sheet.cssRules)\r\n .map(function (rule) { return rule.cssText || ''; })\r\n .join('')\r\n : '';\r\n}\r\nfunction extractOrigin(url) {\r\n var origin = '';\r\n if (url.indexOf('//') > -1) {\r\n origin = url.split('/').slice(0, 3).join('/');\r\n }\r\n else {\r\n origin = url.split('/')[0];\r\n }\r\n origin = origin.split('?')[0];\r\n return origin;\r\n}\r\nvar canvasService;\r\nvar canvasCtx;\r\nvar URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")(.*?)\"|([^)]*))\\)/gm;\r\nvar RELATIVE_PATH = /^(?!www\\.|(?:http|ftp)s?:\\/\\/|[A-Za-z]:\\\\|\\/\\/|#).*/;\r\nvar DATA_URI = /^(data:)([^,]*),(.*)/i;\r\nfunction absoluteToStylesheet(cssText, href) {\r\n return (cssText || '').replace(URL_IN_CSS_REF, function (origin, quote1, path1, quote2, path2, path3) {\r\n var filePath = path1 || path2 || path3;\r\n var maybeQuote = quote1 || quote2 || '';\r\n if (!filePath) {\r\n return origin;\r\n }\r\n if (!RELATIVE_PATH.test(filePath)) {\r\n return \"url(\".concat(maybeQuote).concat(filePath).concat(maybeQuote, \")\");\r\n }\r\n if (DATA_URI.test(filePath)) {\r\n return \"url(\".concat(maybeQuote).concat(filePath).concat(maybeQuote, \")\");\r\n }\r\n if (filePath[0] === '/') {\r\n return \"url(\".concat(maybeQuote).concat(extractOrigin(href) + filePath).concat(maybeQuote, \")\");\r\n }\r\n var stack = href.split('/');\r\n var parts = filePath.split('/');\r\n stack.pop();\r\n for (var _i = 0, parts_1 = parts; _i < parts_1.length; _i++) {\r\n var part = parts_1[_i];\r\n if (part === '.') {\r\n continue;\r\n }\r\n else if (part === '..') {\r\n stack.pop();\r\n }\r\n else {\r\n stack.push(part);\r\n }\r\n }\r\n return \"url(\".concat(maybeQuote).concat(stack.join('/')).concat(maybeQuote, \")\");\r\n });\r\n}\r\nvar SRCSET_NOT_SPACES = /^[^ \\t\\n\\r\\u000c]+/;\r\nvar SRCSET_COMMAS_OR_SPACES = /^[, \\t\\n\\r\\u000c]+/;\r\nfunction getAbsoluteSrcsetString(doc, attributeValue) {\r\n if (attributeValue.trim() === '') {\r\n return attributeValue;\r\n }\r\n var pos = 0;\r\n function collectCharacters(regEx) {\r\n var chars;\r\n var match = regEx.exec(attributeValue.substring(pos));\r\n if (match) {\r\n chars = match[0];\r\n pos += chars.length;\r\n return chars;\r\n }\r\n return '';\r\n }\r\n var output = [];\r\n while (true) {\r\n collectCharacters(SRCSET_COMMAS_OR_SPACES);\r\n if (pos >= attributeValue.length) {\r\n break;\r\n }\r\n var url = collectCharacters(SRCSET_NOT_SPACES);\r\n if (url.slice(-1) === ',') {\r\n url = absoluteToDoc(doc, url.substring(0, url.length - 1));\r\n output.push(url);\r\n }\r\n else {\r\n var descriptorsStr = '';\r\n url = absoluteToDoc(doc, url);\r\n var inParens = false;\r\n while (true) {\r\n var c = attributeValue.charAt(pos);\r\n if (c === '') {\r\n output.push((url + descriptorsStr).trim());\r\n break;\r\n }\r\n else if (!inParens) {\r\n if (c === ',') {\r\n pos += 1;\r\n output.push((url + descriptorsStr).trim());\r\n break;\r\n }\r\n else if (c === '(') {\r\n inParens = true;\r\n }\r\n }\r\n else {\r\n if (c === ')') {\r\n inParens = false;\r\n }\r\n }\r\n descriptorsStr += c;\r\n pos += 1;\r\n }\r\n }\r\n }\r\n return output.join(', ');\r\n}\r\nfunction absoluteToDoc(doc, attributeValue) {\r\n if (!attributeValue || attributeValue.trim() === '') {\r\n return attributeValue;\r\n }\r\n var a = doc.createElement('a');\r\n a.href = attributeValue;\r\n return a.href;\r\n}\r\nfunction isSVGElement(el) {\r\n return Boolean(el.tagName === 'svg' || el.ownerSVGElement);\r\n}\r\nfunction getHref() {\r\n var a = document.createElement('a');\r\n a.href = '';\r\n return a.href;\r\n}\r\nfunction transformAttribute(doc, tagName, name, value) {\r\n if (name === 'src' ||\r\n (name === 'href' && value && !(tagName === 'use' && value[0] === '#'))) {\r\n return absoluteToDoc(doc, value);\r\n }\r\n else if (name === 'xlink:href' && value && value[0] !== '#') {\r\n return absoluteToDoc(doc, value);\r\n }\r\n else if (name === 'background' &&\r\n value &&\r\n (tagName === 'table' || tagName === 'td' || tagName === 'th')) {\r\n return absoluteToDoc(doc, value);\r\n }\r\n else if (name === 'srcset' && value) {\r\n return getAbsoluteSrcsetString(doc, value);\r\n }\r\n else if (name === 'style' && value) {\r\n return absoluteToStylesheet(value, getHref());\r\n }\r\n else if (tagName === 'object' && name === 'data' && value) {\r\n return absoluteToDoc(doc, value);\r\n }\r\n else {\r\n return value;\r\n }\r\n}\r\nfunction _isBlockedElement(element, blockClass, blockSelector) {\r\n if (typeof blockClass === 'string') {\r\n if (element.classList.contains(blockClass)) {\r\n return true;\r\n }\r\n }\r\n else {\r\n for (var eIndex = element.classList.length; eIndex--;) {\r\n var className = element.classList[eIndex];\r\n if (blockClass.test(className)) {\r\n return true;\r\n }\r\n }\r\n }\r\n if (blockSelector) {\r\n return element.matches(blockSelector);\r\n }\r\n return false;\r\n}\r\nfunction classMatchesRegex(node, regex, checkAncestors) {\r\n if (!node)\r\n return false;\r\n if (node.nodeType !== node.ELEMENT_NODE) {\r\n if (!checkAncestors)\r\n return false;\r\n return classMatchesRegex(node.parentNode, regex, checkAncestors);\r\n }\r\n for (var eIndex = node.classList.length; eIndex--;) {\r\n var className = node.classList[eIndex];\r\n if (regex.test(className)) {\r\n return true;\r\n }\r\n }\r\n if (!checkAncestors)\r\n return false;\r\n return classMatchesRegex(node.parentNode, regex, checkAncestors);\r\n}\r\nfunction needMaskingText(node, maskTextClass, maskTextSelector) {\r\n var el = node.nodeType === node.ELEMENT_NODE\r\n ? node\r\n : node.parentElement;\r\n if (el === null)\r\n return false;\r\n if (typeof maskTextClass === 'string') {\r\n if (el.classList.contains(maskTextClass))\r\n return true;\r\n if (el.closest(\".\".concat(maskTextClass)))\r\n return true;\r\n }\r\n else {\r\n if (classMatchesRegex(el, maskTextClass, true))\r\n return true;\r\n }\r\n if (maskTextSelector) {\r\n if (el.matches(maskTextSelector))\r\n return true;\r\n if (el.closest(maskTextSelector))\r\n return true;\r\n }\r\n return false;\r\n}\r\nfunction onceIframeLoaded(iframeEl, listener, iframeLoadTimeout) {\r\n var win = iframeEl.contentWindow;\r\n if (!win) {\r\n return;\r\n }\r\n var fired = false;\r\n var readyState;\r\n try {\r\n readyState = win.document.readyState;\r\n }\r\n catch (error) {\r\n return;\r\n }\r\n if (readyState !== 'complete') {\r\n var timer_1 = setTimeout(function () {\r\n if (!fired) {\r\n listener();\r\n fired = true;\r\n }\r\n }, iframeLoadTimeout);\r\n iframeEl.addEventListener('load', function () {\r\n clearTimeout(timer_1);\r\n fired = true;\r\n listener();\r\n });\r\n return;\r\n }\r\n var blankUrl = 'about:blank';\r\n if (win.location.href !== blankUrl ||\r\n iframeEl.src === blankUrl ||\r\n iframeEl.src === '') {\r\n setTimeout(listener, 0);\r\n return iframeEl.addEventListener('load', listener);\r\n }\r\n iframeEl.addEventListener('load', listener);\r\n}\r\nfunction onceStylesheetLoaded(link, listener, styleSheetLoadTimeout) {\r\n var fired = false;\r\n var styleSheetLoaded;\r\n try {\r\n styleSheetLoaded = link.sheet;\r\n }\r\n catch (error) {\r\n return;\r\n }\r\n if (styleSheetLoaded)\r\n return;\r\n var timer = setTimeout(function () {\r\n if (!fired) {\r\n listener();\r\n fired = true;\r\n }\r\n }, styleSheetLoadTimeout);\r\n link.addEventListener('load', function () {\r\n clearTimeout(timer);\r\n fired = true;\r\n listener();\r\n });\r\n}\r\nfunction serializeNode(n, options) {\r\n var doc = options.doc, mirror = options.mirror, blockClass = options.blockClass, blockSelector = options.blockSelector, maskTextClass = options.maskTextClass, maskTextSelector = options.maskTextSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskTextFn = options.maskTextFn, maskInputFn = options.maskInputFn, _b = options.dataURLOptions, dataURLOptions = _b === void 0 ? {} : _b, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _c = options.newlyAddedElement, newlyAddedElement = _c === void 0 ? false : _c;\r\n var rootId = getRootId(doc, mirror);\r\n switch (n.nodeType) {\r\n case n.DOCUMENT_NODE:\r\n if (n.compatMode !== 'CSS1Compat') {\r\n return {\r\n type: NodeType.Document,\r\n childNodes: [],\r\n compatMode: n.compatMode\r\n };\r\n }\r\n else {\r\n return {\r\n type: NodeType.Document,\r\n childNodes: []\r\n };\r\n }\r\n case n.DOCUMENT_TYPE_NODE:\r\n return {\r\n type: NodeType.DocumentType,\r\n name: n.name,\r\n publicId: n.publicId,\r\n systemId: n.systemId,\r\n rootId: rootId\r\n };\r\n case n.ELEMENT_NODE:\r\n return serializeElementNode(n, {\r\n doc: doc,\r\n blockClass: blockClass,\r\n blockSelector: blockSelector,\r\n inlineStylesheet: inlineStylesheet,\r\n maskInputOptions: maskInputOptions,\r\n maskInputFn: maskInputFn,\r\n dataURLOptions: dataURLOptions,\r\n inlineImages: inlineImages,\r\n recordCanvas: recordCanvas,\r\n keepIframeSrcFn: keepIframeSrcFn,\r\n newlyAddedElement: newlyAddedElement,\r\n rootId: rootId\r\n });\r\n case n.TEXT_NODE:\r\n return serializeTextNode(n, {\r\n maskTextClass: maskTextClass,\r\n maskTextSelector: maskTextSelector,\r\n maskTextFn: maskTextFn,\r\n rootId: rootId\r\n });\r\n case n.CDATA_SECTION_NODE:\r\n return {\r\n type: NodeType.CDATA,\r\n textContent: '',\r\n rootId: rootId\r\n };\r\n case n.COMMENT_NODE:\r\n return {\r\n type: NodeType.Comment,\r\n textContent: n.textContent || '',\r\n rootId: rootId\r\n };\r\n default:\r\n return false;\r\n }\r\n}\r\nfunction getRootId(doc, mirror) {\r\n if (!mirror.hasNode(doc))\r\n return undefined;\r\n var docId = mirror.getId(doc);\r\n return docId === 1 ? undefined : docId;\r\n}\r\nfunction serializeTextNode(n, options) {\r\n var _a;\r\n var maskTextClass = options.maskTextClass, maskTextSelector = options.maskTextSelector, maskTextFn = options.maskTextFn, rootId = options.rootId;\r\n var parentTagName = n.parentNode && n.parentNode.tagName;\r\n var textContent = n.textContent;\r\n var isStyle = parentTagName === 'STYLE' ? true : undefined;\r\n var isScript = parentTagName === 'SCRIPT' ? true : undefined;\r\n if (isStyle && textContent) {\r\n try {\r\n if (n.nextSibling || n.previousSibling) {\r\n }\r\n else if ((_a = n.parentNode.sheet) === null || _a === void 0 ? void 0 : _a.cssRules) {\r\n textContent = stringifyStyleSheet(n.parentNode.sheet);\r\n }\r\n }\r\n catch (err) {\r\n console.warn(\"Cannot get CSS styles from text's parentNode. Error: \".concat(err), n);\r\n }\r\n textContent = absoluteToStylesheet(textContent, getHref());\r\n }\r\n if (isScript) {\r\n textContent = 'SCRIPT_PLACEHOLDER';\r\n }\r\n if (!isStyle &&\r\n !isScript &&\r\n textContent &&\r\n needMaskingText(n, maskTextClass, maskTextSelector)) {\r\n textContent = maskTextFn\r\n ? maskTextFn(textContent)\r\n : textContent.replace(/[\\S]/g, '*');\r\n }\r\n return {\r\n type: NodeType.Text,\r\n textContent: textContent || '',\r\n isStyle: isStyle,\r\n rootId: rootId\r\n };\r\n}\r\nfunction serializeElementNode(n, options) {\r\n var doc = options.doc, blockClass = options.blockClass, blockSelector = options.blockSelector, inlineStylesheet = options.inlineStylesheet, _a = options.maskInputOptions, maskInputOptions = _a === void 0 ? {} : _a, maskInputFn = options.maskInputFn, _b = options.dataURLOptions, dataURLOptions = _b === void 0 ? {} : _b, inlineImages = options.inlineImages, recordCanvas = options.recordCanvas, keepIframeSrcFn = options.keepIframeSrcFn, _c = options.newlyAddedElement, newlyAddedElement = _c === void 0 ? false : _c, rootId = options.rootId;\r\n var needBlock = _isBlockedElement(n, blockClass, blockSelector);\r\n var tagName = getValidTagName(n);\r\n var attributes = {};\r\n var len = n.attributes.length;\r\n for (var i = 0; i < len; i++) {\r\n var attr = n.attributes[i];\r\n attributes[attr.name] = transformAttribute(doc, tagName, attr.name, attr.value);\r\n }\r\n if (tagName === 'link' && inlineStylesheet) {\r\n var stylesheet = Array.from(doc.styleSheets).find(function (s) {\r\n return s.href === n.href;\r\n });\r\n var cssText = null;\r\n if (stylesheet) {\r\n cssText = getCssRulesString(stylesheet);\r\n }\r\n if (cssText) {\r\n delete attributes.rel;\r\n delete attributes.href;\r\n attributes._cssText = absoluteToStylesheet(cssText, stylesheet.href);\r\n }\r\n }\r\n if (tagName === 'style' &&\r\n n.sheet &&\r\n !(n.innerText || n.textContent || '').trim().length) {\r\n var cssText = getCssRulesString(n.sheet);\r\n if (cssText) {\r\n attributes._cssText = absoluteToStylesheet(cssText, getHref());\r\n }\r\n }\r\n if (tagName === 'input' || tagName === 'textarea' || tagName === 'select') {\r\n var value = n.value;\r\n var checked = n.checked;\r\n if (attributes.type !== 'radio' &&\r\n attributes.type !== 'checkbox' &&\r\n attributes.type !== 'submit' &&\r\n attributes.type !== 'button' &&\r\n value) {\r\n attributes.value = maskInputValue({\r\n type: attributes.type,\r\n tagName: tagName,\r\n value: value,\r\n maskInputOptions: maskInputOptions,\r\n maskInputFn: maskInputFn\r\n });\r\n }\r\n else if (checked) {\r\n attributes.checked = checked;\r\n }\r\n }\r\n if (tagName === 'option') {\r\n if (n.selected && !maskInputOptions['select']) {\r\n attributes.selected = true;\r\n }\r\n else {\r\n delete attributes.selected;\r\n }\r\n }\r\n if (tagName === 'canvas' && recordCanvas) {\r\n if (n.__context === '2d') {\r\n if (!is2DCanvasBlank(n)) {\r\n attributes.rr_dataURL = n.toDataURL(dataURLOptions.type, dataURLOptions.quality);\r\n }\r\n }\r\n else if (!('__context' in n)) {\r\n var canvasDataURL = n.toDataURL(dataURLOptions.type, dataURLOptions.quality);\r\n var blankCanvas = document.createElement('canvas');\r\n blankCanvas.width = n.width;\r\n blankCanvas.height = n.height;\r\n var blankCanvasDataURL = blankCanvas.toDataURL(dataURLOptions.type, dataURLOptions.quality);\r\n if (canvasDataURL !== blankCanvasDataURL) {\r\n attributes.rr_dataURL = canvasDataURL;\r\n }\r\n }\r\n }\r\n if (tagName === 'img' && inlineImages) {\r\n if (!canvasService) {\r\n canvasService = doc.createElement('canvas');\r\n canvasCtx = canvasService.getContext('2d');\r\n }\r\n var image_1 = n;\r\n var oldValue_1 = image_1.crossOrigin;\r\n image_1.crossOrigin = 'anonymous';\r\n var recordInlineImage = function () {\r\n try {\r\n canvasService.width = image_1.naturalWidth;\r\n canvasService.height = image_1.naturalHeight;\r\n canvasCtx.drawImage(image_1, 0, 0);\r\n attributes.rr_dataURL = canvasService.toDataURL(dataURLOptions.type, dataURLOptions.quality);\r\n }\r\n catch (err) {\r\n console.warn(\"Cannot inline img src=\".concat(image_1.currentSrc, \"! Error: \").concat(err));\r\n }\r\n oldValue_1\r\n ? (attributes.crossOrigin = oldValue_1)\r\n : image_1.removeAttribute('crossorigin');\r\n };\r\n if (image_1.complete && image_1.naturalWidth !== 0)\r\n recordInlineImage();\r\n else\r\n image_1.onload = recordInlineImage;\r\n }\r\n if (tagName === 'audio' || tagName === 'video') {\r\n attributes.rr_mediaState = n.paused\r\n ? 'paused'\r\n : 'played';\r\n attributes.rr_mediaCurrentTime = n.currentTime;\r\n }\r\n if (!newlyAddedElement) {\r\n if (n.scrollLeft) {\r\n attributes.rr_scrollLeft = n.scrollLeft;\r\n }\r\n if (n.scrollTop) {\r\n attributes.rr_scrollTop = n.scrollTop;\r\n }\r\n }\r\n if (needBlock) {\r\n var _d = n.getBoundingClientRect(), width = _d.width, height = _d.height;\r\n attributes = {\r\n \"class\": attributes[\"class\"],\r\n rr_width: \"\".concat(width, \"px\"),\r\n rr_height: \"\".concat(height, \"px\")\r\n };\r\n }\r\n if (tagName === 'iframe' && !keepIframeSrcFn(attributes.src)) {\r\n if (!n.contentDocument) {\r\n attributes.rr_src = attributes.src;\r\n }\r\n delete attributes.src;\r\n }\r\n return {\r\n type: NodeType.Element,\r\n tagName: tagName,\r\n attributes: attributes,\r\n childNodes: [],\r\n isSVG: isSVGElement(n) || undefined,\r\n needBlock: needBlock,\r\n rootId: rootId\r\n };\r\n}\r\nfunction lowerIfExists(maybeAttr) {\r\n if (maybeAttr === undefined) {\r\n return '';\r\n }\r\n else {\r\n return maybeAttr.toLowerCase();\r\n }\r\n}\r\nfunction slimDOMExcluded(sn, slimDOMOptions) {\r\n if (slimDOMOptions.comment && sn.type === NodeType.Comment) {\r\n return true;\r\n }\r\n else if (sn.type === NodeType.Element) {\r\n if (slimDOMOptions.script &&\r\n (sn.tagName === 'script' ||\r\n (sn.tagName === 'link' &&\r\n sn.attributes.rel === 'preload' &&\r\n sn.attributes.as === 'script') ||\r\n (sn.tagName === 'link' &&\r\n sn.attributes.rel === 'prefetch' &&\r\n typeof sn.attributes.href === 'string' &&\r\n sn.attributes.href.endsWith('.js')))) {\r\n return true;\r\n }\r\n else if (slimDOMOptions.headFavicon &&\r\n ((sn.tagName === 'link' && sn.attributes.rel === 'shortcut icon') ||\r\n (sn.tagName === 'meta' &&\r\n (lowerIfExists(sn.attributes.name).match(/^msapplication-tile(image|color)$/) ||\r\n lowerIfExists(sn.attributes.name) === 'application-name' ||\r\n lowerIfExists(sn.attributes.rel) === 'icon' ||\r\n lowerIfExists(sn.attributes.rel) === 'apple-touch-icon' ||\r\n lowerIfExists(sn.attributes.rel) === 'shortcut icon')))) {\r\n return true;\r\n }\r\n else if (sn.tagName === 'meta') {\r\n if (slimDOMOptions.headMetaDescKeywords &&\r\n lowerIfExists(sn.attributes.name).match(/^description|keywords$/)) {\r\n return true;\r\n }\r\n else if (slimDOMOptions.headMetaSocial &&\r\n (lowerIfExists(sn.attributes.property).match(/^(og|twitter|fb):/) ||\r\n lowerIfExists(sn.attributes.name).match(/^(og|twitter):/) ||\r\n lowerIfExists(sn.attributes.name) === 'pinterest')) {\r\n return true;\r\n }\r\n else if (slimDOMOptions.headMetaRobots &&\r\n (lowerIfExists(sn.attributes.name) === 'robots' ||\r\n lowerIfExists(sn.attributes.name) === 'googlebot' ||\r\n lowerIfExists(sn.attributes.name) === 'bingbot')) {\r\n return true;\r\n }\r\n else if (slimDOMOptions.headMetaHttpEquiv &&\r\n sn.attributes['http-equiv'] !== undefined) {\r\n return true;\r\n }\r\n else if (slimDOMOptions.headMetaAuthorship &&\r\n (lowerIfExists(sn.attributes.name) === 'author' ||\r\n lowerIfExists(sn.attributes.name) === 'generator' ||\r\n lowerIfExists(sn.attributes.name) === 'framework' ||\r\n lowerIfExists(sn.attributes.name) === 'publisher' ||\r\n lowerIfExists(sn.attributes.name) === 'progid' ||\r\n lowerIfExists(sn.attributes.property).match(/^article:/) ||\r\n lowerIfExists(sn.attributes.property).match(/^product:/))) {\r\n return true;\r\n }\r\n else if (slimDOMOptions.headMetaVerification &&\r\n (lowerIfExists(sn.attributes.name) === 'google-site-verification' ||\r\n lowerIfExists(sn.attributes.name) === 'yandex-verification' ||\r\n lowerIfExists(sn.attributes.name) === 'csrf-token' ||\r\n lowerIfExists(sn.attributes.name) === 'p:domain_verify' ||\r\n lowerIfExists(sn.attributes.name) === 'verify-v1' ||\r\n lowerIfExists(sn.attributes.name) === 'verification' ||\r\n lowerIfExists(sn.attributes.name) === 'shopify-checkout-api-token')) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n}\r\nfunction serializeNodeWithId(n, options) {\r\n var doc = options.doc, mirror = options.mirror, blockClass = options.blockClass, blockSelector = options.blockSelector, maskTextClass = options.maskTextClass, maskTextSelector = options.maskTextSelector, _a = options.skipChild, skipChild = _a === void 0 ? false : _a, _b = options.inlineStylesheet, inlineStylesheet = _b === void 0 ? true : _b, _c = options.maskInputOptions, maskInputOptions = _c === void 0 ? {} : _c, maskTextFn = options.maskTextFn, maskInputFn = options.maskInputFn, slimDOMOptions = options.slimDOMOptions, _d = options.dataURLOptions, dataURLOptions = _d === void 0 ? {} : _d, _e = options.inlineImages, inlineImages = _e === void 0 ? false : _e, _f = options.recordCanvas, recordCanvas = _f === void 0 ? false : _f, onSerialize = options.onSerialize, onIframeLoad = options.onIframeLoad, _g = options.iframeLoadTimeout, iframeLoadTimeout = _g === void 0 ? 5000 : _g, onStylesheetLoad = options.onStylesheetLoad, _h = options.stylesheetLoadTimeout, stylesheetLoadTimeout = _h === void 0 ? 5000 : _h, _j = options.keepIframeSrcFn, keepIframeSrcFn = _j === void 0 ? function () { return false; } : _j, _k = options.newlyAddedElement, newlyAddedElement = _k === void 0 ? false : _k;\r\n var _l = options.preserveWhiteSpace, preserveWhiteSpace = _l === void 0 ? true : _l;\r\n var _serializedNode = serializeNode(n, {\r\n doc: doc,\r\n mirror: mirror,\r\n blockClass: blockClass,\r\n blockSelector: blockSelector,\r\n maskTextClass: maskTextClass,\r\n maskTextSelector: maskTextSelector,\r\n inlineStylesheet: inlineStylesheet,\r\n maskInputOptions: maskInputOptions,\r\n maskTextFn: maskTextFn,\r\n maskInputFn: maskInputFn,\r\n dataURLOptions: dataURLOptions,\r\n inlineImages: inlineImages,\r\n recordCanvas: recordCanvas,\r\n keepIframeSrcFn: keepIframeSrcFn,\r\n newlyAddedElement: newlyAddedElement\r\n });\r\n if (!_serializedNode) {\r\n console.warn(n, 'not serialized');\r\n return null;\r\n }\r\n var id;\r\n if (mirror.hasNode(n)) {\r\n id = mirror.getId(n);\r\n }\r\n else if (slimDOMExcluded(_serializedNode, slimDOMOptions) ||\r\n (!preserveWhiteSpace &&\r\n _serializedNode.type === NodeType.Text &&\r\n !_serializedNode.isStyle &&\r\n !_serializedNode.textContent.replace(/^\\s+|\\s+$/gm, '').length)) {\r\n id = IGNORED_NODE;\r\n }\r\n else {\r\n id = genId();\r\n }\r\n var serializedNode = Object.assign(_serializedNode, { id: id });\r\n mirror.add(n, serializedNode);\r\n if (id === IGNORED_NODE) {\r\n return null;\r\n }\r\n if (onSerialize) {\r\n onSerialize(n);\r\n }\r\n var recordChild = !skipChild;\r\n if (serializedNode.type === NodeType.Element) {\r\n recordChild = recordChild && !serializedNode.needBlock;\r\n delete serializedNode.needBlock;\r\n var shadowRoot = n.shadowRoot;\r\n if (shadowRoot && isNativeShadowDom(shadowRoot))\r\n serializedNode.isShadowHost = true;\r\n }\r\n if ((serializedNode.type === NodeType.Document ||\r\n serializedNode.type === NodeType.Element) &&\r\n recordChild) {\r\n if (slimDOMOptions.headWhitespace &&\r\n serializedNode.type === NodeType.Element &&\r\n serializedNode.tagName === 'head') {\r\n preserveWhiteSpace = false;\r\n }\r\n var bypassOptions = {\r\n doc: doc,\r\n mirror: mirror,\r\n blockClass: blockClass,\r\n blockSelector: blockSelector,\r\n maskTextClass: maskTextClass,\r\n maskTextSelector: maskTextSelector,\r\n skipChild: skipChild,\r\n inlineStylesheet: inlineStylesheet,\r\n maskInputOptions: maskInputOptions,\r\n maskTextFn: maskTextFn,\r\n maskInputFn: maskInputFn,\r\n slimDOMOptions: slimDOMOptions,\r\n dataURLOptions: dataURLOptions,\r\n inlineImages: inlineImages,\r\n recordCanvas: recordCanvas,\r\n preserveWhiteSpace: preserveWhiteSpace,\r\n onSerialize: onSerialize,\r\n onIframeLoad: onIframeLoad,\r\n iframeLoadTimeout: iframeLoadTimeout,\r\n onStylesheetLoad: onStylesheetLoad,\r\n stylesheetLoadTimeout: stylesheetLoadTimeout,\r\n keepIframeSrcFn: keepIframeSrcFn\r\n };\r\n for (var _i = 0, _m = Array.from(n.childNodes); _i < _m.length; _i++) {\r\n var childN = _m[_i];\r\n var serializedChildNode = serializeNodeWithId(childN, bypassOptions);\r\n if (serializedChildNode) {\r\n serializedNode.childNodes.push(serializedChildNode);\r\n }\r\n }\r\n if (isElement(n) && n.shadowRoot) {\r\n for (var _o = 0, _p = Array.from(n.shadowRoot.childNodes); _o < _p.length; _o++) {\r\n var childN = _p[_o];\r\n var serializedChildNode = serializeNodeWithId(childN, bypassOptions);\r\n if (serializedChildNode) {\r\n isNativeShadowDom(n.shadowRoot) &&\r\n (serializedChildNode.isShadow = true);\r\n serializedNode.childNodes.push(serializedChildNode);\r\n }\r\n }\r\n }\r\n }\r\n if (n.parentNode &&\r\n isShadowRoot(n.parentNode) &&\r\n isNativeShadowDom(n.parentNode)) {\r\n serializedNode.isShadow = true;\r\n }\r\n if (serializedNode.type === NodeType.Element &&\r\n serializedNode.tagName === 'iframe') {\r\n onceIframeLoaded(n, function () {\r\n var iframeDoc = n.contentDocument;\r\n if (iframeDoc && onIframeLoad) {\r\n var serializedIframeNode = serializeNodeWithId(iframeDoc, {\r\n doc: iframeDoc,\r\n mirror: mirror,\r\n blockClass: blockClass,\r\n blockSelector: blockSelector,\r\n maskTextClass: maskTextClass,\r\n maskTextSelector: maskTextSelector,\r\n skipChild: false,\r\n inlineStylesheet: inlineStylesheet,\r\n maskInputOptions: maskInputOptions,\r\n maskTextFn: maskTextFn,\r\n maskInputFn: maskInputFn,\r\n slimDOMOptions: slimDOMOptions,\r\n dataURLOptions: dataURLOptions,\r\n inlineImages: inlineImages,\r\n recordCanvas: recordCanvas,\r\n preserveWhiteSpace: preserveWhiteSpace,\r\n onSerialize: onSerialize,\r\n onIframeLoad: onIframeLoad,\r\n iframeLoadTimeout: iframeLoadTimeout,\r\n onStylesheetLoad: onStylesheetLoad,\r\n stylesheetLoadTimeout: stylesheetLoadTimeout,\r\n keepIframeSrcFn: keepIframeSrcFn\r\n });\r\n if (serializedIframeNode) {\r\n onIframeLoad(n, serializedIframeNode);\r\n }\r\n }\r\n }, iframeLoadTimeout);\r\n }\r\n if (serializedNode.type === NodeType.Element &&\r\n serializedNode.tagName === 'link' &&\r\n serializedNode.attributes.rel === 'stylesheet') {\r\n onceStylesheetLoaded(n, function () {\r\n if (onStylesheetLoad) {\r\n var serializedLinkNode = serializeNodeWithId(n, {\r\n doc: doc,\r\n mirror: mirror,\r\n blockClass: blockClass,\r\n blockSelector: blockSelector,\r\n maskTextClass: maskTextClass,\r\n maskTextSelector: maskTextSelector,\r\n skipChild: false,\r\n inlineStylesheet: inlineStylesheet,\r\n maskInputOptions: maskInputOptions,\r\n maskTextFn: maskTextFn,\r\n maskInputFn: maskInputFn,\r\n slimDOMOptions: slimDOMOptions,\r\n dataURLOptions: dataURLOptions,\r\n inlineImages: inlineImages,\r\n recordCanvas: recordCanvas,\r\n preserveWhiteSpace: preserveWhiteSpace,\r\n onSerialize: onSerialize,\r\n onIframeLoad: onIframeLoad,\r\n iframeLoadTimeout: iframeLoadTimeout,\r\n onStylesheetLoad: onStylesheetLoad,\r\n stylesheetLoadTimeout: stylesheetLoadTimeout,\r\n keepIframeSrcFn: keepIframeSrcFn\r\n });\r\n if (serializedLinkNode) {\r\n onStylesheetLoad(n, serializedLinkNode);\r\n }\r\n }\r\n }, stylesheetLoadTimeout);\r\n }\r\n return serializedNode;\r\n}\r\nfunction snapshot(n, options) {\r\n var _a = options || {}, _b = _a.mirror, mirror = _b === void 0 ? new Mirror() : _b, _c = _a.blockClass, blockClass = _c === void 0 ? 'rr-block' : _c, _d = _a.blockSelector, blockSelector = _d === void 0 ? null : _d, _e = _a.maskTextClass, maskTextClass = _e === void 0 ? 'rr-mask' : _e, _f = _a.maskTextSelector, maskTextSelector = _f === void 0 ? null : _f, _g = _a.inlineStylesheet, inlineStylesheet = _g === void 0 ? true : _g, _h = _a.inlineImages, inlineImages = _h === void 0 ? false : _h, _j = _a.recordCanvas, recordCanvas = _j === void 0 ? false : _j, _k = _a.maskAllInputs, maskAllInputs = _k === void 0 ? false : _k, maskTextFn = _a.maskTextFn, maskInputFn = _a.maskInputFn, _l = _a.slimDOM, slimDOM = _l === void 0 ? false : _l, dataURLOptions = _a.dataURLOptions, preserveWhiteSpace = _a.preserveWhiteSpace, onSerialize = _a.onSerialize, onIframeLoad = _a.onIframeLoad, iframeLoadTimeout = _a.iframeLoadTimeout, onStylesheetLoad = _a.onStylesheetLoad, stylesheetLoadTimeout = _a.stylesheetLoadTimeout, _m = _a.keepIframeSrcFn, keepIframeSrcFn = _m === void 0 ? function () { return false; } : _m;\r\n var maskInputOptions = maskAllInputs === true\r\n ? {\r\n color: true,\r\n date: true,\r\n 'datetime-local': true,\r\n email: true,\r\n month: true,\r\n number: true,\r\n range: true,\r\n search: true,\r\n tel: true,\r\n text: true,\r\n time: true,\r\n url: true,\r\n week: true,\r\n textarea: true,\r\n select: true,\r\n password: true\r\n }\r\n : maskAllInputs === false\r\n ? {\r\n password: true\r\n }\r\n : maskAllInputs;\r\n var slimDOMOptions = slimDOM === true || slimDOM === 'all'\r\n ?\r\n {\r\n script: true,\r\n comment: true,\r\n headFavicon: true,\r\n headWhitespace: true,\r\n headMetaDescKeywords: slimDOM === 'all',\r\n headMetaSocial: true,\r\n headMetaRobots: true,\r\n headMetaHttpEquiv: true,\r\n headMetaAuthorship: true,\r\n headMetaVerification: true\r\n }\r\n : slimDOM === false\r\n ? {}\r\n : slimDOM;\r\n return serializeNodeWithId(n, {\r\n doc: n,\r\n mirror: mirror,\r\n blockClass: blockClass,\r\n blockSelector: blockSelector,\r\n maskTextClass: maskTextClass,\r\n maskTextSelector: maskTextSelector,\r\n skipChild: false,\r\n inlineStylesheet: inlineStylesheet,\r\n maskInputOptions: maskInputOptions,\r\n maskTextFn: maskTextFn,\r\n maskInputFn: maskInputFn,\r\n slimDOMOptions: slimDOMOptions,\r\n dataURLOptions: dataURLOptions,\r\n inlineImages: inlineImages,\r\n recordCanvas: recordCanvas,\r\n preserveWhiteSpace: preserveWhiteSpace,\r\n onSerialize: onSerialize,\r\n onIframeLoad: onIframeLoad,\r\n iframeLoadTimeout: iframeLoadTimeout,\r\n onStylesheetLoad: onStylesheetLoad,\r\n stylesheetLoadTimeout: stylesheetLoadTimeout,\r\n keepIframeSrcFn: keepIframeSrcFn,\r\n newlyAddedElement: false\r\n });\r\n}\r\n\nvar commentre = /\\/\\*[^*]*\\*+([^/*][^*]*\\*+)*\\//g;\r\nfunction parse(css, options) {\r\n if (options === void 0) { options = {}; }\r\n var lineno = 1;\r\n var column = 1;\r\n function updatePosition(str) {\r\n var lines = str.match(/\\n/g);\r\n if (lines) {\r\n lineno += lines.length;\r\n }\r\n var i = str.lastIndexOf('\\n');\r\n column = i === -1 ? column + str.length : str.length - i;\r\n }\r\n function position() {\r\n var start = { line: lineno, column: column };\r\n return function (node) {\r\n node.position = new Position(start);\r\n whitespace();\r\n return node;\r\n };\r\n }\r\n var Position = (function () {\r\n function Position(start) {\r\n this.start = start;\r\n this.end = { line: lineno, column: column };\r\n this.source = options.source;\r\n }\r\n return Position;\r\n }());\r\n Position.prototype.content = css;\r\n var errorsList = [];\r\n function error(msg) {\r\n var err = new Error(\"\".concat(options.source || '', \":\").concat(lineno, \":\").concat(column, \": \").concat(msg));\r\n err.reason = msg;\r\n err.filename = options.source;\r\n err.line = lineno;\r\n err.column = column;\r\n err.source = css;\r\n if (options.silent) {\r\n errorsList.push(err);\r\n }\r\n else {\r\n throw err;\r\n }\r\n }\r\n function stylesheet() {\r\n var rulesList = rules();\r\n return {\r\n type: 'stylesheet',\r\n stylesheet: {\r\n source: options.source,\r\n rules: rulesList,\r\n parsingErrors: errorsList\r\n }\r\n };\r\n }\r\n function open() {\r\n return match(/^{\\s*/);\r\n }\r\n function close() {\r\n return match(/^}/);\r\n }\r\n function rules() {\r\n var node;\r\n var rules = [];\r\n whitespace();\r\n comments(rules);\r\n while (css.length && css.charAt(0) !== '}' && (node = atrule() || rule())) {\r\n if (node !== false) {\r\n rules.push(node);\r\n comments(rules);\r\n }\r\n }\r\n return rules;\r\n }\r\n function match(re) {\r\n var m = re.exec(css);\r\n if (!m) {\r\n return;\r\n }\r\n var str = m[0];\r\n updatePosition(str);\r\n css = css.slice(str.length);\r\n return m;\r\n }\r\n function whitespace() {\r\n match(/^\\s*/);\r\n }\r\n function comments(rules) {\r\n if (rules === void 0) { rules = []; }\r\n var c;\r\n while ((c = comment())) {\r\n if (c !== false) {\r\n rules.push(c);\r\n }\r\n c = comment();\r\n }\r\n return rules;\r\n }\r\n function comment() {\r\n var pos = position();\r\n if ('/' !== css.charAt(0) || '*' !== css.charAt(1)) {\r\n return;\r\n }\r\n var i = 2;\r\n while ('' !== css.charAt(i) &&\r\n ('*' !== css.charAt(i) || '/' !== css.charAt(i + 1))) {\r\n ++i;\r\n }\r\n i += 2;\r\n if ('' === css.charAt(i - 1)) {\r\n return error('End of comment missing');\r\n }\r\n var str = css.slice(2, i - 2);\r\n column += 2;\r\n updatePosition(str);\r\n css = css.slice(i);\r\n column += 2;\r\n return pos({\r\n type: 'comment',\r\n comment: str\r\n });\r\n }\r\n function selector() {\r\n var m = match(/^([^{]+)/);\r\n if (!m) {\r\n return;\r\n }\r\n return trim(m[0])\r\n .replace(/\\/\\*([^*]|[\\r\\n]|(\\*+([^*/]|[\\r\\n])))*\\*\\/+/g, '')\r\n .replace(/\"(?:\\\\\"|[^\"])*\"|'(?:\\\\'|[^'])*'/g, function (m) {\r\n return m.replace(/,/g, '\\u200C');\r\n })\r\n .split(/\\s*(?![^(]*\\)),\\s*/)\r\n .map(function (s) {\r\n return s.replace(/\\u200C/g, ',');\r\n });\r\n }\r\n function declaration() {\r\n var pos = position();\r\n var propMatch = match(/^(\\*?[-#\\/\\*\\\\\\w]+(\\[[0-9a-z_-]+\\])?)\\s*/);\r\n if (!propMatch) {\r\n return;\r\n }\r\n var prop = trim(propMatch[0]);\r\n if (!match(/^:\\s*/)) {\r\n return error(\"property missing ':'\");\r\n }\r\n var val = match(/^((?:'(?:\\\\'|.)*?'|\"(?:\\\\\"|.)*?\"|\\([^\\)]*?\\)|[^};])+)/);\r\n var ret = pos({\r\n type: 'declaration',\r\n property: prop.replace(commentre, ''),\r\n value: val ? trim(val[0]).replace(commentre, '') : ''\r\n });\r\n match(/^[;\\s]*/);\r\n return ret;\r\n }\r\n function declarations() {\r\n var decls = [];\r\n if (!open()) {\r\n return error(\"missing '{'\");\r\n }\r\n comments(decls);\r\n var decl;\r\n while ((decl = declaration())) {\r\n if (decl !== false) {\r\n decls.push(decl);\r\n comments(decls);\r\n }\r\n decl = declaration();\r\n }\r\n if (!close()) {\r\n return error(\"missing '}'\");\r\n }\r\n return decls;\r\n }\r\n function keyframe() {\r\n var m;\r\n var vals = [];\r\n var pos = position();\r\n while ((m = match(/^((\\d+\\.\\d+|\\.\\d+|\\d+)%?|[a-z]+)\\s*/))) {\r\n vals.push(m[1]);\r\n match(/^,\\s*/);\r\n }\r\n if (!vals.length) {\r\n return;\r\n }\r\n return pos({\r\n type: 'keyframe',\r\n values: vals,\r\n declarations: declarations()\r\n });\r\n }\r\n function atkeyframes() {\r\n var pos = position();\r\n var m = match(/^@([-\\w]+)?keyframes\\s*/);\r\n if (!m) {\r\n return;\r\n }\r\n var vendor = m[1];\r\n m = match(/^([-\\w]+)\\s*/);\r\n if (!m) {\r\n return error('@keyframes missing name');\r\n }\r\n var name = m[1];\r\n if (!open()) {\r\n return error(\"@keyframes missing '{'\");\r\n }\r\n var frame;\r\n var frames = comments();\r\n while ((frame = keyframe())) {\r\n frames.push(frame);\r\n frames = frames.concat(comments());\r\n }\r\n if (!close()) {\r\n return error(\"@keyframes missing '}'\");\r\n }\r\n return pos({\r\n type: 'keyframes',\r\n name: name,\r\n vendor: vendor,\r\n keyframes: frames\r\n });\r\n }\r\n function atsupports() {\r\n var pos = position();\r\n var m = match(/^@supports *([^{]+)/);\r\n if (!m) {\r\n return;\r\n }\r\n var supports = trim(m[1]);\r\n if (!open()) {\r\n return error(\"@supports missing '{'\");\r\n }\r\n var style = comments().concat(rules());\r\n if (!close()) {\r\n return error(\"@supports missing '}'\");\r\n }\r\n return pos({\r\n type: 'supports',\r\n supports: supports,\r\n rules: style\r\n });\r\n }\r\n function athost() {\r\n var pos = position();\r\n var m = match(/^@host\\s*/);\r\n if (!m) {\r\n return;\r\n }\r\n if (!open()) {\r\n return error(\"@host missing '{'\");\r\n }\r\n var style = comments().concat(rules());\r\n if (!close()) {\r\n return error(\"@host missing '}'\");\r\n }\r\n return pos({\r\n type: 'host',\r\n rules: style\r\n });\r\n }\r\n function atmedia() {\r\n var pos = position();\r\n var m = match(/^@media *([^{]+)/);\r\n if (!m) {\r\n return;\r\n }\r\n var media = trim(m[1]);\r\n if (!open()) {\r\n return error(\"@media missing '{'\");\r\n }\r\n var style = comments().concat(rules());\r\n if (!close()) {\r\n return error(\"@media missing '}'\");\r\n }\r\n return pos({\r\n type: 'media',\r\n media: media,\r\n rules: style\r\n });\r\n }\r\n function atcustommedia() {\r\n var pos = position();\r\n var m = match(/^@custom-media\\s+(--[^\\s]+)\\s*([^{;]+);/);\r\n if (!m) {\r\n return;\r\n }\r\n return pos({\r\n type: 'custom-media',\r\n name: trim(m[1]),\r\n media: trim(m[2])\r\n });\r\n }\r\n function atpage() {\r\n var pos = position();\r\n var m = match(/^@page */);\r\n if (!m) {\r\n return;\r\n }\r\n var sel = selector() || [];\r\n if (!open()) {\r\n return error(\"@page missing '{'\");\r\n }\r\n var decls = comments();\r\n var decl;\r\n while ((decl = declaration())) {\r\n decls.push(decl);\r\n decls = decls.concat(comments());\r\n }\r\n if (!close()) {\r\n return error(\"@page missing '}'\");\r\n }\r\n return pos({\r\n type: 'page',\r\n selectors: sel,\r\n declarations: decls\r\n });\r\n }\r\n function atdocument() {\r\n var pos = position();\r\n var m = match(/^@([-\\w]+)?document *([^{]+)/);\r\n if (!m) {\r\n return;\r\n }\r\n var vendor = trim(m[1]);\r\n var doc = trim(m[2]);\r\n if (!open()) {\r\n return error(\"@document missing '{'\");\r\n }\r\n var style = comments().concat(rules());\r\n if (!close()) {\r\n return error(\"@document missing '}'\");\r\n }\r\n return pos({\r\n type: 'document',\r\n document: doc,\r\n vendor: vendor,\r\n rules: style\r\n });\r\n }\r\n function atfontface() {\r\n var pos = position();\r\n var m = match(/^@font-face\\s*/);\r\n if (!m) {\r\n return;\r\n }\r\n if (!open()) {\r\n return error(\"@font-face missing '{'\");\r\n }\r\n var decls = comments();\r\n var decl;\r\n while ((decl = declaration())) {\r\n decls.push(decl);\r\n decls = decls.concat(comments());\r\n }\r\n if (!close()) {\r\n return error(\"@font-face missing '}'\");\r\n }\r\n return pos({\r\n type: 'font-face',\r\n declarations: decls\r\n });\r\n }\r\n var atimport = _compileAtrule('import');\r\n var atcharset = _compileAtrule('charset');\r\n var atnamespace = _compileAtrule('namespace');\r\n function _compileAtrule(name) {\r\n var re = new RegExp('^@' + name + '\\\\s*([^;]+);');\r\n return function () {\r\n var pos = position();\r\n var m = match(re);\r\n if (!m) {\r\n return;\r\n }\r\n var ret = { type: name };\r\n ret[name] = m[1].trim();\r\n return pos(ret);\r\n };\r\n }\r\n function atrule() {\r\n if (css[0] !== '@') {\r\n return;\r\n }\r\n return (atkeyframes() ||\r\n atmedia() ||\r\n atcustommedia() ||\r\n atsupports() ||\r\n atimport() ||\r\n atcharset() ||\r\n atnamespace() ||\r\n atdocument() ||\r\n atpage() ||\r\n athost() ||\r\n atfontface());\r\n }\r\n function rule() {\r\n var pos = position();\r\n var sel = selector();\r\n if (!sel) {\r\n return error('selector missing');\r\n }\r\n comments();\r\n return pos({\r\n type: 'rule',\r\n selectors: sel,\r\n declarations: declarations()\r\n });\r\n }\r\n return addParent(stylesheet());\r\n}\r\nfunction trim(str) {\r\n return str ? str.replace(/^\\s+|\\s+$/g, '') : '';\r\n}\r\nfunction addParent(obj, parent) {\r\n var isNode = obj && typeof obj.type === 'string';\r\n var childParent = isNode ? obj : parent;\r\n for (var _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) {\r\n var k = _a[_i];\r\n var value = obj[k];\r\n if (Array.isArray(value)) {\r\n value.forEach(function (v) {\r\n addParent(v, childParent);\r\n });\r\n }\r\n else if (value && typeof value === 'object') {\r\n addParent(value, childParent);\r\n }\r\n }\r\n if (isNode) {\r\n Object.defineProperty(obj, 'parent', {\r\n configurable: true,\r\n writable: true,\r\n enumerable: false,\r\n value: parent || null\r\n });\r\n }\r\n return obj;\r\n}\n\nvar tagMap = {\r\n script: 'noscript',\r\n altglyph: 'altGlyph',\r\n altglyphdef: 'altGlyphDef',\r\n altglyphitem: 'altGlyphItem',\r\n animatecolor: 'animateColor',\r\n animatemotion: 'animateMotion',\r\n animatetransform: 'animateTransform',\r\n clippath: 'clipPath',\r\n feblend: 'feBlend',\r\n fecolormatrix: 'feColorMatrix',\r\n fecomponenttransfer: 'feComponentTransfer',\r\n fecomposite: 'feComposite',\r\n feconvolvematrix: 'feConvolveMatrix',\r\n fediffuselighting: 'feDiffuseLighting',\r\n fedisplacementmap: 'feDisplacementMap',\r\n fedistantlight: 'feDistantLight',\r\n fedropshadow: 'feDropShadow',\r\n feflood: 'feFlood',\r\n fefunca: 'feFuncA',\r\n fefuncb: 'feFuncB',\r\n fefuncg: 'feFuncG',\r\n fefuncr: 'feFuncR',\r\n fegaussianblur: 'feGaussianBlur',\r\n feimage: 'feImage',\r\n femerge: 'feMerge',\r\n femergenode: 'feMergeNode',\r\n femorphology: 'feMorphology',\r\n feoffset: 'feOffset',\r\n fepointlight: 'fePointLight',\r\n fespecularlighting: 'feSpecularLighting',\r\n fespotlight: 'feSpotLight',\r\n fetile: 'feTile',\r\n feturbulence: 'feTurbulence',\r\n foreignobject: 'foreignObject',\r\n glyphref: 'glyphRef',\r\n lineargradient: 'linearGradient',\r\n radialgradient: 'radialGradient'\r\n};\r\nfunction getTagName(n) {\r\n var tagName = tagMap[n.tagName] ? tagMap[n.tagName] : n.tagName;\r\n if (tagName === 'link' && n.attributes._cssText) {\r\n tagName = 'style';\r\n }\r\n return tagName;\r\n}\r\nfunction escapeRegExp(str) {\r\n return str.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\r\n}\r\nvar HOVER_SELECTOR = /([^\\\\]):hover/;\r\nvar HOVER_SELECTOR_GLOBAL = new RegExp(HOVER_SELECTOR.source, 'g');\r\nfunction addHoverClass(cssText, cache) {\r\n var cachedStyle = cache === null || cache === void 0 ? void 0 : cache.stylesWithHoverClass.get(cssText);\r\n if (cachedStyle)\r\n return cachedStyle;\r\n var ast = parse(cssText, {\r\n silent: true\r\n });\r\n if (!ast.stylesheet) {\r\n return cssText;\r\n }\r\n var selectors = [];\r\n ast.stylesheet.rules.forEach(function (rule) {\r\n if ('selectors' in rule) {\r\n (rule.selectors || []).forEach(function (selector) {\r\n if (HOVER_SELECTOR.test(selector)) {\r\n selectors.push(selector);\r\n }\r\n });\r\n }\r\n });\r\n if (selectors.length === 0) {\r\n return cssText;\r\n }\r\n var selectorMatcher = new RegExp(selectors\r\n .filter(function (selector, index) { return selectors.indexOf(selector) === index; })\r\n .sort(function (a, b) { return b.length - a.length; })\r\n .map(function (selector) {\r\n return escapeRegExp(selector);\r\n })\r\n .join('|'), 'g');\r\n var result = cssText.replace(selectorMatcher, function (selector) {\r\n var newSelector = selector.replace(HOVER_SELECTOR_GLOBAL, '$1.\\\\:hover');\r\n return \"\".concat(selector, \", \").concat(newSelector);\r\n });\r\n cache === null || cache === void 0 ? void 0 : cache.stylesWithHoverClass.set(cssText, result);\r\n return result;\r\n}\r\nfunction createCache() {\r\n var stylesWithHoverClass = new Map();\r\n return {\r\n stylesWithHoverClass: stylesWithHoverClass\r\n };\r\n}\r\nfunction buildNode(n, options) {\r\n var doc = options.doc, hackCss = options.hackCss, cache = options.cache;\r\n switch (n.type) {\r\n case NodeType.Document:\r\n return doc.implementation.createDocument(null, '', null);\r\n case NodeType.DocumentType:\r\n return doc.implementation.createDocumentType(n.name || 'html', n.publicId, n.systemId);\r\n case NodeType.Element: {\r\n var tagName = getTagName(n);\r\n var node_1;\r\n if (n.isSVG) {\r\n node_1 = doc.createElementNS('http://www.w3.org/2000/svg', tagName);\r\n }\r\n else {\r\n node_1 = doc.createElement(tagName);\r\n }\r\n var specialAttributes = {};\r\n for (var name_1 in n.attributes) {\r\n if (!Object.prototype.hasOwnProperty.call(n.attributes, name_1)) {\r\n continue;\r\n }\r\n var value = n.attributes[name_1];\r\n if (tagName === 'option' &&\r\n name_1 === 'selected' &&\r\n value === false) {\r\n continue;\r\n }\r\n if (value === true)\r\n value = '';\r\n if (name_1.startsWith('rr_')) {\r\n specialAttributes[name_1] = value;\r\n continue;\r\n }\r\n var isTextarea = tagName === 'textarea' && name_1 === 'value';\r\n var isRemoteOrDynamicCss = tagName === 'style' && name_1 === '_cssText';\r\n if (isRemoteOrDynamicCss && hackCss && typeof value === 'string') {\r\n value = addHoverClass(value, cache);\r\n }\r\n if ((isTextarea || isRemoteOrDynamicCss) && typeof value === 'string') {\r\n var child = doc.createTextNode(value);\r\n for (var _i = 0, _a = Array.from(node_1.childNodes); _i < _a.length; _i++) {\r\n var c = _a[_i];\r\n if (c.nodeType === node_1.TEXT_NODE) {\r\n node_1.removeChild(c);\r\n }\r\n }\r\n node_1.appendChild(child);\r\n continue;\r\n }\r\n try {\r\n if (n.isSVG && name_1 === 'xlink:href') {\r\n node_1.setAttributeNS('http://www.w3.org/1999/xlink', name_1, value.toString());\r\n }\r\n else if (name_1 === 'onload' ||\r\n name_1 === 'onclick' ||\r\n name_1.substring(0, 7) === 'onmouse') {\r\n node_1.setAttribute('_' + name_1, value.toString());\r\n }\r\n else if (tagName === 'meta' &&\r\n n.attributes['http-equiv'] === 'Content-Security-Policy' &&\r\n name_1 === 'content') {\r\n node_1.setAttribute('csp-content', value.toString());\r\n continue;\r\n }\r\n else if (tagName === 'link' &&\r\n n.attributes.rel === 'preload' &&\r\n n.attributes.as === 'script') {\r\n }\r\n else if (tagName === 'link' &&\r\n n.attributes.rel === 'prefetch' &&\r\n typeof n.attributes.href === 'string' &&\r\n n.attributes.href.endsWith('.js')) {\r\n }\r\n else if (tagName === 'img' &&\r\n n.attributes.srcset &&\r\n n.attributes.rr_dataURL) {\r\n node_1.setAttribute('rrweb-original-srcset', n.attributes.srcset);\r\n }\r\n else {\r\n node_1.setAttribute(name_1, value.toString());\r\n }\r\n }\r\n catch (error) {\r\n }\r\n }\r\n var _loop_1 = function (name_2) {\r\n var value = specialAttributes[name_2];\r\n if (tagName === 'canvas' && name_2 === 'rr_dataURL') {\r\n var image_1 = document.createElement('img');\r\n image_1.onload = function () {\r\n var ctx = node_1.getContext('2d');\r\n if (ctx) {\r\n ctx.drawImage(image_1, 0, 0, image_1.width, image_1.height);\r\n }\r\n };\r\n image_1.src = value.toString();\r\n if (node_1.RRNodeType)\r\n node_1.rr_dataURL = value.toString();\r\n }\r\n else if (tagName === 'img' && name_2 === 'rr_dataURL') {\r\n var image = node_1;\r\n if (!image.currentSrc.startsWith('data:')) {\r\n image.setAttribute('rrweb-original-src', n.attributes.src);\r\n image.src = value.toString();\r\n }\r\n }\r\n if (name_2 === 'rr_width') {\r\n node_1.style.width = value.toString();\r\n }\r\n else if (name_2 === 'rr_height') {\r\n node_1.style.height = value.toString();\r\n }\r\n else if (name_2 === 'rr_mediaCurrentTime' &&\r\n typeof value === 'number') {\r\n node_1.currentTime = value;\r\n }\r\n else if (name_2 === 'rr_mediaState') {\r\n switch (value) {\r\n case 'played':\r\n node_1\r\n .play()[\"catch\"](function (e) { return console.warn('media playback error', e); });\r\n break;\r\n case 'paused':\r\n node_1.pause();\r\n break;\r\n }\r\n }\r\n };\r\n for (var name_2 in specialAttributes) {\r\n _loop_1(name_2);\r\n }\r\n if (n.isShadowHost) {\r\n if (!node_1.shadowRoot) {\r\n node_1.attachShadow({ mode: 'open' });\r\n }\r\n else {\r\n while (node_1.shadowRoot.firstChild) {\r\n node_1.shadowRoot.removeChild(node_1.shadowRoot.firstChild);\r\n }\r\n }\r\n }\r\n return node_1;\r\n }\r\n case NodeType.Text:\r\n return doc.createTextNode(n.isStyle && hackCss\r\n ? addHoverClass(n.textContent, cache)\r\n : n.textContent);\r\n case NodeType.CDATA:\r\n return doc.createCDATASection(n.textContent);\r\n case NodeType.Comment:\r\n return doc.createComment(n.textContent);\r\n default:\r\n return null;\r\n }\r\n}\r\nfunction buildNodeWithSN(n, options) {\r\n var doc = options.doc, mirror = options.mirror, _a = options.skipChild, skipChild = _a === void 0 ? false : _a, _b = options.hackCss, hackCss = _b === void 0 ? true : _b, afterAppend = options.afterAppend, cache = options.cache;\r\n var node = buildNode(n, { doc: doc, hackCss: hackCss, cache: cache });\r\n if (!node) {\r\n return null;\r\n }\r\n if (n.rootId && mirror.getNode(n.rootId) !== doc) {\r\n mirror.replace(n.rootId, doc);\r\n }\r\n if (n.type === NodeType.Document) {\r\n doc.close();\r\n doc.open();\r\n if (n.compatMode === 'BackCompat' &&\r\n n.childNodes &&\r\n n.childNodes[0].type !== NodeType.DocumentType) {\r\n if (n.childNodes[0].type === NodeType.Element &&\r\n 'xmlns' in n.childNodes[0].attributes &&\r\n n.childNodes[0].attributes.xmlns === 'http://www.w3.org/1999/xhtml') {\r\n doc.write('<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"\">');\r\n }\r\n else {\r\n doc.write('<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\" \"\">');\r\n }\r\n }\r\n node = doc;\r\n }\r\n mirror.add(node, n);\r\n if ((n.type === NodeType.Document || n.type === NodeType.Element) &&\r\n !skipChild) {\r\n for (var _i = 0, _c = n.childNodes; _i < _c.length; _i++) {\r\n var childN = _c[_i];\r\n var childNode = buildNodeWithSN(childN, {\r\n doc: doc,\r\n mirror: mirror,\r\n skipChild: false,\r\n hackCss: hackCss,\r\n afterAppend: afterAppend,\r\n cache: cache\r\n });\r\n if (!childNode) {\r\n console.warn('Failed to rebuild', childN);\r\n continue;\r\n }\r\n if (childN.isShadow && isElement(node) && node.shadowRoot) {\r\n node.shadowRoot.appendChild(childNode);\r\n }\r\n else {\r\n node.appendChild(childNode);\r\n }\r\n if (afterAppend) {\r\n afterAppend(childNode, childN.id);\r\n }\r\n }\r\n }\r\n return node;\r\n}\r\nfunction visit(mirror, onVisit) {\r\n function walk(node) {\r\n onVisit(node);\r\n }\r\n for (var _i = 0, _a = mirror.getIds(); _i < _a.length; _i++) {\r\n var id = _a[_i];\r\n if (mirror.has(id)) {\r\n walk(mirror.getNode(id));\r\n }\r\n }\r\n}\r\nfunction handleScroll(node, mirror) {\r\n var n = mirror.getMeta(node);\r\n if ((n === null || n === void 0 ? void 0 : n.type) !== NodeType.Element) {\r\n return;\r\n }\r\n var el = node;\r\n for (var name_3 in n.attributes) {\r\n if (!(Object.prototype.hasOwnProperty.call(n.attributes, name_3) &&\r\n name_3.startsWith('rr_'))) {\r\n continue;\r\n }\r\n var value = n.attributes[name_3];\r\n if (name_3 === 'rr_scrollLeft') {\r\n el.scrollLeft = value;\r\n }\r\n if (name_3 === 'rr_scrollTop') {\r\n el.scrollTop = value;\r\n }\r\n }\r\n}\r\nfunction rebuild(n, options) {\r\n var doc = options.doc, onVisit = options.onVisit, _a = options.hackCss, hackCss = _a === void 0 ? true : _a, afterAppend = options.afterAppend, cache = options.cache, _b = options.mirror, mirror = _b === void 0 ? new Mirror() : _b;\r\n var node = buildNodeWithSN(n, {\r\n doc: doc,\r\n mirror: mirror,\r\n skipChild: false,\r\n hackCss: hackCss,\r\n afterAppend: afterAppend,\r\n cache: cache\r\n });\r\n visit(mirror, function (visitedNode) {\r\n if (onVisit) {\r\n onVisit(visitedNode);\r\n }\r\n handleScroll(visitedNode, mirror);\r\n });\r\n return node;\r\n}\n\nexport { IGNORED_NODE, Mirror, NodeType, addHoverClass, buildNodeWithSN, classMatchesRegex, createCache, createMirror, genId, getCssRuleString, getCssRulesString, is2DCanvasBlank, isCSSImportRule, isElement, isNativeShadowDom, isShadowRoot, maskInputValue, needMaskingText, rebuild, serializeNodeWithId, snapshot, transformAttribute };\n","import { classMatchesRegex, IGNORED_NODE, isShadowRoot } from '../../rrweb-snapshot/es/rrweb-snapshot.js';\n\nfunction on(type, fn, target = document) {\r\n const options = { capture: true, passive: true };\r\n target.addEventListener(type, fn, options);\r\n return () => target.removeEventListener(type, fn, options);\r\n}\r\nconst DEPARTED_MIRROR_ACCESS_WARNING = 'Please stop import mirror directly. Instead of that,' +\r\n '\\r\\n' +\r\n 'now you can use replayer.getMirror() to access the mirror instance of a replayer,' +\r\n '\\r\\n' +\r\n 'or you can use record.mirror to access the mirror instance during recording.';\r\nlet _mirror = {\r\n map: {},\r\n getId() {\r\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\r\n return -1;\r\n },\r\n getNode() {\r\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\r\n return null;\r\n },\r\n removeNodeFromMap() {\r\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\r\n },\r\n has() {\r\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\r\n return false;\r\n },\r\n reset() {\r\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\r\n },\r\n};\r\nif (typeof window !== 'undefined' && window.Proxy && window.Reflect) {\r\n _mirror = new Proxy(_mirror, {\r\n get(target, prop, receiver) {\r\n if (prop === 'map') {\r\n console.error(DEPARTED_MIRROR_ACCESS_WARNING);\r\n }\r\n return Reflect.get(target, prop, receiver);\r\n },\r\n });\r\n}\r\nfunction throttle(func, wait, options = {}) {\r\n let timeout = null;\r\n let previous = 0;\r\n return function (...args) {\r\n const now = Date.now();\r\n if (!previous && options.leading === false) {\r\n previous = now;\r\n }\r\n const remaining = wait - (now - previous);\r\n const context = this;\r\n if (remaining <= 0 || remaining > wait) {\r\n if (timeout) {\r\n clearTimeout(timeout);\r\n timeout = null;\r\n }\r\n previous = now;\r\n func.apply(context, args);\r\n }\r\n else if (!timeout && options.trailing !== false) {\r\n timeout = setTimeout(() => {\r\n previous = options.leading === false ? 0 : Date.now();\r\n timeout = null;\r\n func.apply(context, args);\r\n }, remaining);\r\n }\r\n };\r\n}\r\nfunction hookSetter(target, key, d, isRevoked, win = window) {\r\n const original = win.Object.getOwnPropertyDescriptor(target, key);\r\n win.Object.defineProperty(target, key, isRevoked\r\n ? d\r\n : {\r\n set(value) {\r\n setTimeout(() => {\r\n d.set.call(this, value);\r\n }, 0);\r\n if (original && original.set) {\r\n original.set.call(this, value);\r\n }\r\n },\r\n });\r\n return () => hookSetter(target, key, original || {}, true);\r\n}\r\nfunction patch(source, name, replacement) {\r\n try {\r\n if (!(name in source)) {\r\n return () => {\r\n };\r\n }\r\n const original = source[name];\r\n const wrapped = replacement(original);\r\n if (typeof wrapped === 'function') {\r\n wrapped.prototype = wrapped.prototype || {};\r\n Object.defineProperties(wrapped, {\r\n __rrweb_original__: {\r\n enumerable: false,\r\n value: original,\r\n },\r\n });\r\n }\r\n source[name] = wrapped;\r\n return () => {\r\n source[name] = original;\r\n };\r\n }\r\n catch (_a) {\r\n return () => {\r\n };\r\n }\r\n}\r\nfunction getWindowHeight() {\r\n return (window.innerHeight ||\r\n (document.documentElement && document.documentElement.clientHeight) ||\r\n (document.body && document.body.clientHeight));\r\n}\r\nfunction getWindowWidth() {\r\n return (window.innerWidth ||\r\n (document.documentElement && document.documentElement.clientWidth) ||\r\n (document.body && document.body.clientWidth));\r\n}\r\nfunction isBlocked(node, blockClass, blockSelector, checkAncestors) {\r\n if (!node) {\r\n return false;\r\n }\r\n const el = node.nodeType === node.ELEMENT_NODE\r\n ? node\r\n : node.parentElement;\r\n if (!el)\r\n return false;\r\n if (typeof blockClass === 'string') {\r\n if (el.classList.contains(blockClass))\r\n return true;\r\n if (checkAncestors && el.closest('.' + blockClass) !== null)\r\n return true;\r\n }\r\n else {\r\n if (classMatchesRegex(el, blockClass, checkAncestors))\r\n return true;\r\n }\r\n if (blockSelector) {\r\n if (node.matches(blockSelector))\r\n return true;\r\n if (checkAncestors && el.closest(blockSelector) !== null)\r\n return true;\r\n }\r\n return false;\r\n}\r\nfunction isSerialized(n, mirror) {\r\n return mirror.getId(n) !== -1;\r\n}\r\nfunction isIgnored(n, mirror) {\r\n return mirror.getId(n) === IGNORED_NODE;\r\n}\r\nfunction isAncestorRemoved(target, mirror) {\r\n if (isShadowRoot(target)) {\r\n return false;\r\n }\r\n const id = mirror.getId(target);\r\n if (!mirror.has(id)) {\r\n return true;\r\n }\r\n if (target.parentNode &&\r\n target.parentNode.nodeType === target.DOCUMENT_NODE) {\r\n return false;\r\n }\r\n if (!target.parentNode) {\r\n return true;\r\n }\r\n return isAncestorRemoved(target.parentNode, mirror);\r\n}\r\nfunction isTouchEvent(event) {\r\n return Boolean(event.changedTouches);\r\n}\r\nfunction polyfill(win = window) {\r\n if ('NodeList' in win && !win.NodeList.prototype.forEach) {\r\n win.NodeList.prototype.forEach = Array.prototype\r\n .forEach;\r\n }\r\n if ('DOMTokenList' in win && !win.DOMTokenList.prototype.forEach) {\r\n win.DOMTokenList.prototype.forEach = Array.prototype\r\n .forEach;\r\n }\r\n if (!Node.prototype.contains) {\r\n Node.prototype.contains = (...args) => {\r\n let node = args[0];\r\n if (!(0 in args)) {\r\n throw new TypeError('1 argument is required');\r\n }\r\n do {\r\n if (this === node) {\r\n return true;\r\n }\r\n } while ((node = node && node.parentNode));\r\n return false;\r\n };\r\n }\r\n}\r\nfunction queueToResolveTrees(queue) {\r\n const queueNodeMap = {};\r\n const putIntoMap = (m, parent) => {\r\n const nodeInTree = {\r\n value: m,\r\n parent,\r\n children: [],\r\n };\r\n queueNodeMap[m.node.id] = nodeInTree;\r\n return nodeInTree;\r\n };\r\n const queueNodeTrees = [];\r\n for (const mutation of queue) {\r\n const { nextId, parentId } = mutation;\r\n if (nextId && nextId in queueNodeMap) {\r\n const nextInTree = queueNodeMap[nextId];\r\n if (nextInTree.parent) {\r\n const idx = nextInTree.parent.children.indexOf(nextInTree);\r\n nextInTree.parent.children.splice(idx, 0, putIntoMap(mutation, nextInTree.parent));\r\n }\r\n else {\r\n const idx = queueNodeTrees.indexOf(nextInTree);\r\n queueNodeTrees.splice(idx, 0, putIntoMap(mutation, null));\r\n }\r\n continue;\r\n }\r\n if (parentId in queueNodeMap) {\r\n const parentInTree = queueNodeMap[parentId];\r\n parentInTree.children.push(putIntoMap(mutation, parentInTree));\r\n continue;\r\n }\r\n queueNodeTrees.push(putIntoMap(mutation, null));\r\n }\r\n return queueNodeTrees;\r\n}\r\nfunction iterateResolveTree(tree, cb) {\r\n cb(tree.value);\r\n for (let i = tree.children.length - 1; i >= 0; i--) {\r\n iterateResolveTree(tree.children[i], cb);\r\n }\r\n}\r\nfunction isSerializedIframe(n, mirror) {\r\n return Boolean(n.nodeName === 'IFRAME' && mirror.getMeta(n));\r\n}\r\nfunction isSerializedStylesheet(n, mirror) {\r\n return Boolean(n.nodeName === 'LINK' &&\r\n n.nodeType === n.ELEMENT_NODE &&\r\n n.getAttribute &&\r\n n.getAttribute('rel') === 'stylesheet' &&\r\n mirror.getMeta(n));\r\n}\r\nfunction getBaseDimension(node, rootIframe) {\r\n var _a, _b;\r\n const frameElement = (_b = (_a = node.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView) === null || _b === void 0 ? void 0 : _b.frameElement;\r\n if (!frameElement || frameElement === rootIframe) {\r\n return {\r\n x: 0,\r\n y: 0,\r\n relativeScale: 1,\r\n absoluteScale: 1,\r\n };\r\n }\r\n const frameDimension = frameElement.getBoundingClientRect();\r\n const frameBaseDimension = getBaseDimension(frameElement, rootIframe);\r\n const relativeScale = frameDimension.height / frameElement.clientHeight;\r\n return {\r\n x: frameDimension.x * frameBaseDimension.relativeScale +\r\n frameBaseDimension.x,\r\n y: frameDimension.y * frameBaseDimension.relativeScale +\r\n frameBaseDimension.y,\r\n relativeScale,\r\n absoluteScale: frameBaseDimension.absoluteScale * relativeScale,\r\n };\r\n}\r\nfunction hasShadowRoot(n) {\r\n return Boolean(n === null || n === void 0 ? void 0 : n.shadowRoot);\r\n}\r\nfunction getNestedRule(rules, position) {\r\n const rule = rules[position[0]];\r\n if (position.length === 1) {\r\n return rule;\r\n }\r\n else {\r\n return getNestedRule(rule.cssRules[position[1]].cssRules, position.slice(2));\r\n }\r\n}\r\nfunction getPositionsAndIndex(nestedIndex) {\r\n const positions = [...nestedIndex];\r\n const index = positions.pop();\r\n return { positions, index };\r\n}\r\nfunction uniqueTextMutations(mutations) {\r\n const idSet = new Set();\r\n const uniqueMutations = [];\r\n for (let i = mutations.length; i--;) {\r\n const mutation = mutations[i];\r\n if (!idSet.has(mutation.id)) {\r\n uniqueMutations.push(mutation);\r\n idSet.add(mutation.id);\r\n }\r\n }\r\n return uniqueMutations;\r\n}\r\nclass StyleSheetMirror {\r\n constructor() {\r\n this.id = 1;\r\n this.styleIDMap = new WeakMap();\r\n this.idStyleMap = new Map();\r\n }\r\n getId(stylesheet) {\r\n var _a;\r\n return (_a = this.styleIDMap.get(stylesheet)) !== null && _a !== void 0 ? _a : -1;\r\n }\r\n has(stylesheet) {\r\n return this.styleIDMap.has(stylesheet);\r\n }\r\n add(stylesheet, id) {\r\n if (this.has(stylesheet))\r\n return this.getId(stylesheet);\r\n let newId;\r\n if (id === undefined) {\r\n newId = this.id++;\r\n }\r\n else\r\n newId = id;\r\n this.styleIDMap.set(stylesheet, newId);\r\n this.idStyleMap.set(newId, stylesheet);\r\n return newId;\r\n }\r\n getStyle(id) {\r\n return this.idStyleMap.get(id) || null;\r\n }\r\n reset() {\r\n this.styleIDMap = new WeakMap();\r\n this.idStyleMap = new Map();\r\n this.id = 1;\r\n }\r\n generateId() {\r\n return this.id++;\r\n }\r\n}\n\nexport { StyleSheetMirror, _mirror, getBaseDimension, getNestedRule, getPositionsAndIndex, getWindowHeight, getWindowWidth, hasShadowRoot, hookSetter, isAncestorRemoved, isBlocked, isIgnored, isSerialized, isSerializedIframe, isSerializedStylesheet, isTouchEvent, iterateResolveTree, on, patch, polyfill, queueToResolveTrees, throttle, uniqueTextMutations };\n","var EventType = /* @__PURE__ */ ((EventType2) => {\n EventType2[EventType2[\"DomContentLoaded\"] = 0] = \"DomContentLoaded\";\n EventType2[EventType2[\"Load\"] = 1] = \"Load\";\n EventType2[EventType2[\"FullSnapshot\"] = 2] = \"FullSnapshot\";\n EventType2[EventType2[\"IncrementalSnapshot\"] = 3] = \"IncrementalSnapshot\";\n EventType2[EventType2[\"Meta\"] = 4] = \"Meta\";\n EventType2[EventType2[\"Custom\"] = 5] = \"Custom\";\n EventType2[EventType2[\"Plugin\"] = 6] = \"Plugin\";\n return EventType2;\n})(EventType || {});\nvar IncrementalSource = /* @__PURE__ */ ((IncrementalSource2) => {\n IncrementalSource2[IncrementalSource2[\"Mutation\"] = 0] = \"Mutation\";\n IncrementalSource2[IncrementalSource2[\"MouseMove\"] = 1] = \"MouseMove\";\n IncrementalSource2[IncrementalSource2[\"MouseInteraction\"] = 2] = \"MouseInteraction\";\n IncrementalSource2[IncrementalSource2[\"Scroll\"] = 3] = \"Scroll\";\n IncrementalSource2[IncrementalSource2[\"ViewportResize\"] = 4] = \"ViewportResize\";\n IncrementalSource2[IncrementalSource2[\"Input\"] = 5] = \"Input\";\n IncrementalSource2[IncrementalSource2[\"TouchMove\"] = 6] = \"TouchMove\";\n IncrementalSource2[IncrementalSource2[\"MediaInteraction\"] = 7] = \"MediaInteraction\";\n IncrementalSource2[IncrementalSource2[\"StyleSheetRule\"] = 8] = \"StyleSheetRule\";\n IncrementalSource2[IncrementalSource2[\"CanvasMutation\"] = 9] = \"CanvasMutation\";\n IncrementalSource2[IncrementalSource2[\"Font\"] = 10] = \"Font\";\n IncrementalSource2[IncrementalSource2[\"Log\"] = 11] = \"Log\";\n IncrementalSource2[IncrementalSource2[\"Drag\"] = 12] = \"Drag\";\n IncrementalSource2[IncrementalSource2[\"StyleDeclaration\"] = 13] = \"StyleDeclaration\";\n IncrementalSource2[IncrementalSource2[\"Selection\"] = 14] = \"Selection\";\n IncrementalSource2[IncrementalSource2[\"AdoptedStyleSheet\"] = 15] = \"AdoptedStyleSheet\";\n return IncrementalSource2;\n})(IncrementalSource || {});\nvar MouseInteractions = /* @__PURE__ */ ((MouseInteractions2) => {\n MouseInteractions2[MouseInteractions2[\"MouseUp\"] = 0] = \"MouseUp\";\n MouseInteractions2[MouseInteractions2[\"MouseDown\"] = 1] = \"MouseDown\";\n MouseInteractions2[MouseInteractions2[\"Click\"] = 2] = \"Click\";\n MouseInteractions2[MouseInteractions2[\"ContextMenu\"] = 3] = \"ContextMenu\";\n MouseInteractions2[MouseInteractions2[\"DblClick\"] = 4] = \"DblClick\";\n MouseInteractions2[MouseInteractions2[\"Focus\"] = 5] = \"Focus\";\n MouseInteractions2[MouseInteractions2[\"Blur\"] = 6] = \"Blur\";\n MouseInteractions2[MouseInteractions2[\"TouchStart\"] = 7] = \"TouchStart\";\n MouseInteractions2[MouseInteractions2[\"TouchMove_Departed\"] = 8] = \"TouchMove_Departed\";\n MouseInteractions2[MouseInteractions2[\"TouchEnd\"] = 9] = \"TouchEnd\";\n MouseInteractions2[MouseInteractions2[\"TouchCancel\"] = 10] = \"TouchCancel\";\n return MouseInteractions2;\n})(MouseInteractions || {});\nvar CanvasContext = /* @__PURE__ */ ((CanvasContext2) => {\n CanvasContext2[CanvasContext2[\"2D\"] = 0] = \"2D\";\n CanvasContext2[CanvasContext2[\"WebGL\"] = 1] = \"WebGL\";\n CanvasContext2[CanvasContext2[\"WebGL2\"] = 2] = \"WebGL2\";\n return CanvasContext2;\n})(CanvasContext || {});\nvar ReplayerEvents = /* @__PURE__ */ ((ReplayerEvents2) => {\n ReplayerEvents2[\"Start\"] = \"start\";\n ReplayerEvents2[\"Pause\"] = \"pause\";\n ReplayerEvents2[\"Resume\"] = \"resume\";\n ReplayerEvents2[\"Resize\"] = \"resize\";\n ReplayerEvents2[\"Finish\"] = \"finish\";\n ReplayerEvents2[\"FullsnapshotRebuilded\"] = \"fullsnapshot-rebuilded\";\n ReplayerEvents2[\"LoadStylesheetStart\"] = \"load-stylesheet-start\";\n ReplayerEvents2[\"LoadStylesheetEnd\"] = \"load-stylesheet-end\";\n ReplayerEvents2[\"SkipStart\"] = \"skip-start\";\n ReplayerEvents2[\"SkipEnd\"] = \"skip-end\";\n ReplayerEvents2[\"MouseInteraction\"] = \"mouse-interaction\";\n ReplayerEvents2[\"EventCast\"] = \"event-cast\";\n ReplayerEvents2[\"CustomEvent\"] = \"custom-event\";\n ReplayerEvents2[\"Flush\"] = \"flush\";\n ReplayerEvents2[\"StateChange\"] = \"state-change\";\n ReplayerEvents2[\"PlayBack\"] = \"play-back\";\n ReplayerEvents2[\"Destroy\"] = \"destroy\";\n return ReplayerEvents2;\n})(ReplayerEvents || {});\n\nexport { CanvasContext, EventType, IncrementalSource, MouseInteractions, ReplayerEvents };\n","import { isShadowRoot, isNativeShadowDom, maskInputValue, transformAttribute, needMaskingText, IGNORED_NODE, serializeNodeWithId } from '../../../rrweb-snapshot/es/rrweb-snapshot.js';\nimport { isIgnored, isBlocked, isSerialized, isAncestorRemoved, isSerializedIframe, isSerializedStylesheet, hasShadowRoot } from '../utils.js';\n\nfunction isNodeInLinkedList(n) {\r\n return '__ln' in n;\r\n}\r\nclass DoubleLinkedList {\r\n constructor() {\r\n this.length = 0;\r\n this.head = null;\r\n }\r\n get(position) {\r\n if (position >= this.length) {\r\n throw new Error('Position outside of list range');\r\n }\r\n let current = this.head;\r\n for (let index = 0; index < position; index++) {\r\n current = (current === null || current === void 0 ? void 0 : current.next) || null;\r\n }\r\n return current;\r\n }\r\n addNode(n) {\r\n const node = {\r\n value: n,\r\n previous: null,\r\n next: null,\r\n };\r\n n.__ln = node;\r\n if (n.previousSibling && isNodeInLinkedList(n.previousSibling)) {\r\n const current = n.previousSibling.__ln.next;\r\n node.next = current;\r\n node.previous = n.previousSibling.__ln;\r\n n.previousSibling.__ln.next = node;\r\n if (current) {\r\n current.previous = node;\r\n }\r\n }\r\n else if (n.nextSibling &&\r\n isNodeInLinkedList(n.nextSibling) &&\r\n n.nextSibling.__ln.previous) {\r\n const current = n.nextSibling.__ln.previous;\r\n node.previous = current;\r\n node.next = n.nextSibling.__ln;\r\n n.nextSibling.__ln.previous = node;\r\n if (current) {\r\n current.next = node;\r\n }\r\n }\r\n else {\r\n if (this.head) {\r\n this.head.previous = node;\r\n }\r\n node.next = this.head;\r\n this.head = node;\r\n }\r\n this.length++;\r\n }\r\n removeNode(n) {\r\n const current = n.__ln;\r\n if (!this.head) {\r\n return;\r\n }\r\n if (!current.previous) {\r\n this.head = current.next;\r\n if (this.head) {\r\n this.head.previous = null;\r\n }\r\n }\r\n else {\r\n current.previous.next = current.next;\r\n if (current.next) {\r\n current.next.previous = current.previous;\r\n }\r\n }\r\n if (n.__ln) {\r\n delete n.__ln;\r\n }\r\n this.length--;\r\n }\r\n}\r\nconst moveKey = (id, parentId) => `${id}@${parentId}`;\r\nclass MutationBuffer {\r\n constructor() {\r\n this.frozen = false;\r\n this.locked = false;\r\n this.texts = [];\r\n this.attributes = [];\r\n this.removes = [];\r\n this.mapRemoves = [];\r\n this.movedMap = {};\r\n this.addedSet = new Set();\r\n this.movedSet = new Set();\r\n this.droppedSet = new Set();\r\n this.processMutations = (mutations) => {\r\n mutations.forEach(this.processMutation);\r\n this.emit();\r\n };\r\n this.emit = () => {\r\n if (this.frozen || this.locked) {\r\n return;\r\n }\r\n const adds = [];\r\n const addList = new DoubleLinkedList();\r\n const getNextId = (n) => {\r\n let ns = n;\r\n let nextId = IGNORED_NODE;\r\n while (nextId === IGNORED_NODE) {\r\n ns = ns && ns.nextSibling;\r\n nextId = ns && this.mirror.getId(ns);\r\n }\r\n return nextId;\r\n };\r\n const pushAdd = (n) => {\r\n var _a, _b, _c, _d;\r\n let shadowHost = null;\r\n if (((_b = (_a = n.getRootNode) === null || _a === void 0 ? void 0 : _a.call(n)) === null || _b === void 0 ? void 0 : _b.nodeType) === Node.DOCUMENT_FRAGMENT_NODE &&\r\n n.getRootNode().host)\r\n shadowHost = n.getRootNode().host;\r\n let rootShadowHost = shadowHost;\r\n while (((_d = (_c = rootShadowHost === null || rootShadowHost === void 0 ? void 0 : rootShadowHost.getRootNode) === null || _c === void 0 ? void 0 : _c.call(rootShadowHost)) === null || _d === void 0 ? void 0 : _d.nodeType) ===\r\n Node.DOCUMENT_FRAGMENT_NODE &&\r\n rootShadowHost.getRootNode().host)\r\n rootShadowHost = rootShadowHost.getRootNode().host;\r\n const notInDoc = !this.doc.contains(n) &&\r\n (!rootShadowHost || !this.doc.contains(rootShadowHost));\r\n if (!n.parentNode || notInDoc) {\r\n return;\r\n }\r\n const parentId = isShadowRoot(n.parentNode)\r\n ? this.mirror.getId(shadowHost)\r\n : this.mirror.getId(n.parentNode);\r\n const nextId = getNextId(n);\r\n if (parentId === -1 || nextId === -1) {\r\n return addList.addNode(n);\r\n }\r\n const sn = serializeNodeWithId(n, {\r\n doc: this.doc,\r\n mirror: this.mirror,\r\n blockClass: this.blockClass,\r\n blockSelector: this.blockSelector,\r\n maskTextClass: this.maskTextClass,\r\n maskTextSelector: this.maskTextSelector,\r\n skipChild: true,\r\n newlyAddedElement: true,\r\n inlineStylesheet: this.inlineStylesheet,\r\n maskInputOptions: this.maskInputOptions,\r\n maskTextFn: this.maskTextFn,\r\n maskInputFn: this.maskInputFn,\r\n slimDOMOptions: this.slimDOMOptions,\r\n dataURLOptions: this.dataURLOptions,\r\n recordCanvas: this.recordCanvas,\r\n inlineImages: this.inlineImages,\r\n onSerialize: (currentN) => {\r\n if (isSerializedIframe(currentN, this.mirror)) {\r\n this.iframeManager.addIframe(currentN);\r\n }\r\n if (isSerializedStylesheet(currentN, this.mirror)) {\r\n this.stylesheetManager.trackLinkElement(currentN);\r\n }\r\n if (hasShadowRoot(n)) {\r\n this.shadowDomManager.addShadowRoot(n.shadowRoot, this.doc);\r\n }\r\n },\r\n onIframeLoad: (iframe, childSn) => {\r\n this.iframeManager.attachIframe(iframe, childSn);\r\n this.shadowDomManager.observeAttachShadow(iframe);\r\n },\r\n onStylesheetLoad: (link, childSn) => {\r\n this.stylesheetManager.attachLinkElement(link, childSn);\r\n },\r\n });\r\n if (sn) {\r\n adds.push({\r\n parentId,\r\n nextId,\r\n node: sn,\r\n });\r\n }\r\n };\r\n while (this.mapRemoves.length) {\r\n this.mirror.removeNodeFromMap(this.mapRemoves.shift());\r\n }\r\n for (const n of Array.from(this.movedSet.values())) {\r\n if (isParentRemoved(this.removes, n, this.mirror) &&\r\n !this.movedSet.has(n.parentNode)) {\r\n continue;\r\n }\r\n pushAdd(n);\r\n }\r\n for (const n of Array.from(this.addedSet.values())) {\r\n if (!isAncestorInSet(this.droppedSet, n) &&\r\n !isParentRemoved(this.removes, n, this.mirror)) {\r\n pushAdd(n);\r\n }\r\n else if (isAncestorInSet(this.movedSet, n)) {\r\n pushAdd(n);\r\n }\r\n else {\r\n this.droppedSet.add(n);\r\n }\r\n }\r\n let candidate = null;\r\n while (addList.length) {\r\n let node = null;\r\n if (candidate) {\r\n const parentId = this.mirror.getId(candidate.value.parentNode);\r\n const nextId = getNextId(candidate.value);\r\n if (parentId !== -1 && nextId !== -1) {\r\n node = candidate;\r\n }\r\n }\r\n if (!node) {\r\n for (let index = addList.length - 1; index >= 0; index--) {\r\n const _node = addList.get(index);\r\n if (_node) {\r\n const parentId = this.mirror.getId(_node.value.parentNode);\r\n const nextId = getNextId(_node.value);\r\n if (nextId === -1)\r\n continue;\r\n else if (parentId !== -1) {\r\n node = _node;\r\n break;\r\n }\r\n else {\r\n const unhandledNode = _node.value;\r\n if (unhandledNode.parentNode &&\r\n unhandledNode.parentNode.nodeType ===\r\n Node.DOCUMENT_FRAGMENT_NODE) {\r\n const shadowHost = unhandledNode.parentNode\r\n .host;\r\n const parentId = this.mirror.getId(shadowHost);\r\n if (parentId !== -1) {\r\n node = _node;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n if (!node) {\r\n while (addList.head) {\r\n addList.removeNode(addList.head.value);\r\n }\r\n break;\r\n }\r\n candidate = node.previous;\r\n addList.removeNode(node.value);\r\n pushAdd(node.value);\r\n }\r\n const payload = {\r\n texts: this.texts\r\n .map((text) => ({\r\n id: this.mirror.getId(text.node),\r\n value: text.value,\r\n }))\r\n .filter((text) => this.mirror.has(text.id)),\r\n attributes: this.attributes\r\n .map((attribute) => ({\r\n id: this.mirror.getId(attribute.node),\r\n attributes: attribute.attributes,\r\n }))\r\n .filter((attribute) => this.mirror.has(attribute.id)),\r\n removes: this.removes,\r\n adds,\r\n };\r\n if (!payload.texts.length &&\r\n !payload.attributes.length &&\r\n !payload.removes.length &&\r\n !payload.adds.length) {\r\n return;\r\n }\r\n this.texts = [];\r\n this.attributes = [];\r\n this.removes = [];\r\n this.addedSet = new Set();\r\n this.movedSet = new Set();\r\n this.droppedSet = new Set();\r\n this.movedMap = {};\r\n this.mutationCb(payload);\r\n };\r\n this.processMutation = (m) => {\r\n if (isIgnored(m.target, this.mirror)) {\r\n return;\r\n }\r\n switch (m.type) {\r\n case 'characterData': {\r\n const value = m.target.textContent;\r\n if (!isBlocked(m.target, this.blockClass, this.blockSelector, false) &&\r\n value !== m.oldValue) {\r\n this.texts.push({\r\n value: needMaskingText(m.target, this.maskTextClass, this.maskTextSelector) && value\r\n ? this.maskTextFn\r\n ? this.maskTextFn(value)\r\n : value.replace(/[\\S]/g, '*')\r\n : value,\r\n node: m.target,\r\n });\r\n }\r\n break;\r\n }\r\n case 'attributes': {\r\n const target = m.target;\r\n let value = m.target.getAttribute(m.attributeName);\r\n if (m.attributeName === 'value') {\r\n value = maskInputValue({\r\n maskInputOptions: this.maskInputOptions,\r\n tagName: m.target.tagName,\r\n type: m.target.getAttribute('type'),\r\n value,\r\n maskInputFn: this.maskInputFn,\r\n });\r\n }\r\n if (isBlocked(m.target, this.blockClass, this.blockSelector, false) ||\r\n value === m.oldValue) {\r\n return;\r\n }\r\n let item = this.attributes.find((a) => a.node === m.target);\r\n if (target.tagName === 'IFRAME' &&\r\n m.attributeName === 'src' &&\r\n !this.keepIframeSrcFn(value)) {\r\n if (!target.contentDocument) {\r\n m.attributeName = 'rr_src';\r\n }\r\n else {\r\n return;\r\n }\r\n }\r\n if (!item) {\r\n item = {\r\n node: m.target,\r\n attributes: {},\r\n };\r\n this.attributes.push(item);\r\n }\r\n if (m.attributeName === 'style') {\r\n const old = this.doc.createElement('span');\r\n if (m.oldValue) {\r\n old.setAttribute('style', m.oldValue);\r\n }\r\n if (item.attributes.style === undefined ||\r\n item.attributes.style === null) {\r\n item.attributes.style = {};\r\n }\r\n const styleObj = item.attributes.style;\r\n for (const pname of Array.from(target.style)) {\r\n const newValue = target.style.getPropertyValue(pname);\r\n const newPriority = target.style.getPropertyPriority(pname);\r\n if (newValue !== old.style.getPropertyValue(pname) ||\r\n newPriority !== old.style.getPropertyPriority(pname)) {\r\n if (newPriority === '') {\r\n styleObj[pname] = newValue;\r\n }\r\n else {\r\n styleObj[pname] = [newValue, newPriority];\r\n }\r\n }\r\n }\r\n for (const pname of Array.from(old.style)) {\r\n if (target.style.getPropertyValue(pname) === '') {\r\n styleObj[pname] = false;\r\n }\r\n }\r\n }\r\n else {\r\n item.attributes[m.attributeName] = transformAttribute(this.doc, target.tagName, m.attributeName, value);\r\n }\r\n break;\r\n }\r\n case 'childList': {\r\n if (isBlocked(m.target, this.blockClass, this.blockSelector, true))\r\n return;\r\n m.addedNodes.forEach((n) => this.genAdds(n, m.target));\r\n m.removedNodes.forEach((n) => {\r\n const nodeId = this.mirror.getId(n);\r\n const parentId = isShadowRoot(m.target)\r\n ? this.mirror.getId(m.target.host)\r\n : this.mirror.getId(m.target);\r\n if (isBlocked(m.target, this.blockClass, this.blockSelector, false) ||\r\n isIgnored(n, this.mirror) ||\r\n !isSerialized(n, this.mirror)) {\r\n return;\r\n }\r\n if (this.addedSet.has(n)) {\r\n deepDelete(this.addedSet, n);\r\n this.droppedSet.add(n);\r\n }\r\n else if (this.addedSet.has(m.target) && nodeId === -1) ;\r\n else if (isAncestorRemoved(m.target, this.mirror)) ;\r\n else if (this.movedSet.has(n) &&\r\n this.movedMap[moveKey(nodeId, parentId)]) {\r\n deepDelete(this.movedSet, n);\r\n }\r\n else {\r\n this.removes.push({\r\n parentId,\r\n id: nodeId,\r\n isShadow: isShadowRoot(m.target) && isNativeShadowDom(m.target)\r\n ? true\r\n : undefined,\r\n });\r\n }\r\n this.mapRemoves.push(n);\r\n });\r\n break;\r\n }\r\n }\r\n };\r\n this.genAdds = (n, target) => {\r\n if (this.mirror.hasNode(n)) {\r\n if (isIgnored(n, this.mirror)) {\r\n return;\r\n }\r\n this.movedSet.add(n);\r\n let targetId = null;\r\n if (target && this.mirror.hasNode(target)) {\r\n targetId = this.mirror.getId(target);\r\n }\r\n if (targetId && targetId !== -1) {\r\n this.movedMap[moveKey(this.mirror.getId(n), targetId)] = true;\r\n }\r\n }\r\n else {\r\n this.addedSet.add(n);\r\n this.droppedSet.delete(n);\r\n }\r\n if (!isBlocked(n, this.blockClass, this.blockSelector, false))\r\n n.childNodes.forEach((childN) => this.genAdds(childN));\r\n };\r\n }\r\n init(options) {\r\n [\r\n 'mutationCb',\r\n 'blockClass',\r\n 'blockSelector',\r\n 'maskTextClass',\r\n 'maskTextSelector',\r\n 'inlineStylesheet',\r\n 'maskInputOptions',\r\n 'maskTextFn',\r\n 'maskInputFn',\r\n 'keepIframeSrcFn',\r\n 'recordCanvas',\r\n 'inlineImages',\r\n 'slimDOMOptions',\r\n 'dataURLOptions',\r\n 'doc',\r\n 'mirror',\r\n 'iframeManager',\r\n 'stylesheetManager',\r\n 'shadowDomManager',\r\n 'canvasManager',\r\n ].forEach((key) => {\r\n this[key] = options[key];\r\n });\r\n }\r\n freeze() {\r\n this.frozen = true;\r\n this.canvasManager.freeze();\r\n }\r\n unfreeze() {\r\n this.frozen = false;\r\n this.canvasManager.unfreeze();\r\n this.emit();\r\n }\r\n isFrozen() {\r\n return this.frozen;\r\n }\r\n lock() {\r\n this.locked = true;\r\n this.canvasManager.lock();\r\n }\r\n unlock() {\r\n this.locked = false;\r\n this.canvasManager.unlock();\r\n this.emit();\r\n }\r\n reset() {\r\n this.shadowDomManager.reset();\r\n this.canvasManager.reset();\r\n }\r\n}\r\nfunction deepDelete(addsSet, n) {\r\n addsSet.delete(n);\r\n n.childNodes.forEach((childN) => deepDelete(addsSet, childN));\r\n}\r\nfunction isParentRemoved(removes, n, mirror) {\r\n if (removes.length === 0)\r\n return false;\r\n return _isParentRemoved(removes, n, mirror);\r\n}\r\nfunction _isParentRemoved(removes, n, mirror) {\r\n const { parentNode } = n;\r\n if (!parentNode) {\r\n return false;\r\n }\r\n const parentId = mirror.getId(parentNode);\r\n if (removes.some((r) => r.id === parentId)) {\r\n return true;\r\n }\r\n return _isParentRemoved(removes, parentNode, mirror);\r\n}\r\nfunction isAncestorInSet(set, n) {\r\n if (set.size === 0)\r\n return false;\r\n return _isAncestorInSet(set, n);\r\n}\r\nfunction _isAncestorInSet(set, n) {\r\n const { parentNode } = n;\r\n if (!parentNode) {\r\n return false;\r\n }\r\n if (set.has(parentNode)) {\r\n return true;\r\n }\r\n return _isAncestorInSet(set, parentNode);\r\n}\n\nexport { MutationBuffer as default };\n","import { maskInputValue } from '../../../rrweb-snapshot/es/rrweb-snapshot.js';\nimport { on, throttle, isBlocked, getWindowHeight, getWindowWidth, hookSetter, patch, isTouchEvent } from '../utils.js';\nimport { MouseInteractions, IncrementalSource } from '../../../types/dist/types.js';\nimport MutationBuffer from './mutation.js';\n\nconst mutationBuffers = [];\r\nconst isCSSGroupingRuleSupported = typeof CSSGroupingRule !== 'undefined';\r\nconst isCSSMediaRuleSupported = typeof CSSMediaRule !== 'undefined';\r\nconst isCSSSupportsRuleSupported = typeof CSSSupportsRule !== 'undefined';\r\nconst isCSSConditionRuleSupported = typeof CSSConditionRule !== 'undefined';\r\nfunction getEventTarget(event) {\r\n try {\r\n if ('composedPath' in event) {\r\n const path = event.composedPath();\r\n if (path.length) {\r\n return path[0];\r\n }\r\n }\r\n else if ('path' in event && event.path.length) {\r\n return event.path[0];\r\n }\r\n return event.target;\r\n }\r\n catch (_a) {\r\n return event.target;\r\n }\r\n}\r\nfunction initMutationObserver(options, rootEl) {\r\n var _a, _b;\r\n const mutationBuffer = new MutationBuffer();\r\n mutationBuffers.push(mutationBuffer);\r\n mutationBuffer.init(options);\r\n let mutationObserverCtor = window.MutationObserver ||\r\n window.__rrMutationObserver;\r\n const angularZoneSymbol = (_b = (_a = window === null || window === void 0 ? void 0 : window.Zone) === null || _a === void 0 ? void 0 : _a.__symbol__) === null || _b === void 0 ? void 0 : _b.call(_a, 'MutationObserver');\r\n if (angularZoneSymbol &&\r\n window[angularZoneSymbol]) {\r\n mutationObserverCtor = window[angularZoneSymbol];\r\n }\r\n const observer = new mutationObserverCtor(mutationBuffer.processMutations.bind(mutationBuffer));\r\n observer.observe(rootEl, {\r\n attributes: true,\r\n attributeOldValue: true,\r\n characterData: true,\r\n characterDataOldValue: true,\r\n childList: true,\r\n subtree: true,\r\n });\r\n return observer;\r\n}\r\nfunction initMoveObserver({ mousemoveCb, sampling, doc, mirror, }) {\r\n if (sampling.mousemove === false) {\r\n return () => {\r\n };\r\n }\r\n const threshold = typeof sampling.mousemove === 'number' ? sampling.mousemove : 50;\r\n const callbackThreshold = typeof sampling.mousemoveCallback === 'number'\r\n ? sampling.mousemoveCallback\r\n : 500;\r\n let positions = [];\r\n let timeBaseline;\r\n const wrappedCb = throttle((source) => {\r\n const totalOffset = Date.now() - timeBaseline;\r\n mousemoveCb(positions.map((p) => {\r\n p.timeOffset -= totalOffset;\r\n return p;\r\n }), source);\r\n positions = [];\r\n timeBaseline = null;\r\n }, callbackThreshold);\r\n const updatePosition = throttle((evt) => {\r\n const target = getEventTarget(evt);\r\n const { clientX, clientY } = isTouchEvent(evt)\r\n ? evt.changedTouches[0]\r\n : evt;\r\n if (!timeBaseline) {\r\n timeBaseline = Date.now();\r\n }\r\n positions.push({\r\n x: clientX,\r\n y: clientY,\r\n id: mirror.getId(target),\r\n timeOffset: Date.now() - timeBaseline,\r\n });\r\n wrappedCb(typeof DragEvent !== 'undefined' && evt instanceof DragEvent\r\n ? IncrementalSource.Drag\r\n : evt instanceof MouseEvent\r\n ? IncrementalSource.MouseMove\r\n : IncrementalSource.TouchMove);\r\n }, threshold, {\r\n trailing: false,\r\n });\r\n const handlers = [\r\n on('mousemove', updatePosition, doc),\r\n on('touchmove', updatePosition, doc),\r\n on('drag', updatePosition, doc),\r\n ];\r\n return () => {\r\n handlers.forEach((h) => h());\r\n };\r\n}\r\nfunction initMouseInteractionObserver({ mouseInteractionCb, doc, mirror, blockClass, blockSelector, sampling, }) {\r\n if (sampling.mouseInteraction === false) {\r\n return () => {\r\n };\r\n }\r\n const disableMap = sampling.mouseInteraction === true ||\r\n sampling.mouseInteraction === undefined\r\n ? {}\r\n : sampling.mouseInteraction;\r\n const handlers = [];\r\n const getHandler = (eventKey) => {\r\n return (event) => {\r\n const target = getEventTarget(event);\r\n if (isBlocked(target, blockClass, blockSelector, true)) {\r\n return;\r\n }\r\n const e = isTouchEvent(event) ? event.changedTouches[0] : event;\r\n if (!e) {\r\n return;\r\n }\r\n const id = mirror.getId(target);\r\n const { clientX, clientY } = e;\r\n mouseInteractionCb({\r\n type: MouseInteractions[eventKey],\r\n id,\r\n x: clientX,\r\n y: clientY,\r\n });\r\n };\r\n };\r\n Object.keys(MouseInteractions)\r\n .filter((key) => Number.isNaN(Number(key)) &&\r\n !key.endsWith('_Departed') &&\r\n disableMap[key] !== false)\r\n .forEach((eventKey) => {\r\n const eventName = eventKey.toLowerCase();\r\n const handler = getHandler(eventKey);\r\n handlers.push(on(eventName, handler, doc));\r\n });\r\n return () => {\r\n handlers.forEach((h) => h());\r\n };\r\n}\r\nfunction initScrollObserver({ scrollCb, doc, mirror, blockClass, blockSelector, sampling, }) {\r\n const updatePosition = throttle((evt) => {\r\n const target = getEventTarget(evt);\r\n if (!target || isBlocked(target, blockClass, blockSelector, true)) {\r\n return;\r\n }\r\n const id = mirror.getId(target);\r\n if (target === doc) {\r\n const scrollEl = (doc.scrollingElement || doc.documentElement);\r\n scrollCb({\r\n id,\r\n x: scrollEl.scrollLeft,\r\n y: scrollEl.scrollTop,\r\n });\r\n }\r\n else {\r\n scrollCb({\r\n id,\r\n x: target.scrollLeft,\r\n y: target.scrollTop,\r\n });\r\n }\r\n }, sampling.scroll || 100);\r\n return on('scroll', updatePosition, doc);\r\n}\r\nfunction initViewportResizeObserver({ viewportResizeCb, }) {\r\n let lastH = -1;\r\n let lastW = -1;\r\n const updateDimension = throttle(() => {\r\n const height = getWindowHeight();\r\n const width = getWindowWidth();\r\n if (lastH !== height || lastW !== width) {\r\n viewportResizeCb({\r\n width: Number(width),\r\n height: Number(height),\r\n });\r\n lastH = height;\r\n lastW = width;\r\n }\r\n }, 200);\r\n return on('resize', updateDimension, window);\r\n}\r\nfunction wrapEventWithUserTriggeredFlag(v, enable) {\r\n const value = Object.assign({}, v);\r\n if (!enable)\r\n delete value.userTriggered;\r\n return value;\r\n}\r\nconst INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];\r\nconst lastInputValueMap = new WeakMap();\r\nfunction initInputObserver({ inputCb, doc, mirror, blockClass, blockSelector, ignoreClass, maskInputOptions, maskInputFn, sampling, userTriggeredOnInput, }) {\r\n function eventHandler(event) {\r\n let target = getEventTarget(event);\r\n const userTriggered = event.isTrusted;\r\n if (target && target.tagName === 'OPTION')\r\n target = target.parentElement;\r\n if (!target ||\r\n !target.tagName ||\r\n INPUT_TAGS.indexOf(target.tagName) < 0 ||\r\n isBlocked(target, blockClass, blockSelector, true)) {\r\n return;\r\n }\r\n const type = target.type;\r\n if (target.classList.contains(ignoreClass)) {\r\n return;\r\n }\r\n let text = target.value;\r\n let isChecked = false;\r\n if (type === 'radio' || type === 'checkbox') {\r\n isChecked = target.checked;\r\n }\r\n else if (maskInputOptions[target.tagName.toLowerCase()] ||\r\n maskInputOptions[type]) {\r\n text = maskInputValue({\r\n maskInputOptions,\r\n tagName: target.tagName,\r\n type,\r\n value: text,\r\n maskInputFn,\r\n });\r\n }\r\n cbWithDedup(target, wrapEventWithUserTriggeredFlag({ text, isChecked, userTriggered }, userTriggeredOnInput));\r\n const name = target.name;\r\n if (type === 'radio' && name && isChecked) {\r\n doc\r\n .querySelectorAll(`input[type=\"radio\"][name=\"${name}\"]`)\r\n .forEach((el) => {\r\n if (el !== target) {\r\n cbWithDedup(el, wrapEventWithUserTriggeredFlag({\r\n text: el.value,\r\n isChecked: !isChecked,\r\n userTriggered: false,\r\n }, userTriggeredOnInput));\r\n }\r\n });\r\n }\r\n }\r\n function cbWithDedup(target, v) {\r\n const lastInputValue = lastInputValueMap.get(target);\r\n if (!lastInputValue ||\r\n lastInputValue.text !== v.text ||\r\n lastInputValue.isChecked !== v.isChecked) {\r\n lastInputValueMap.set(target, v);\r\n const id = mirror.getId(target);\r\n inputCb(Object.assign(Object.assign({}, v), { id }));\r\n }\r\n }\r\n const events = sampling.input === 'last' ? ['change'] : ['input', 'change'];\r\n const handlers = events.map((eventName) => on(eventName, eventHandler, doc));\r\n const currentWindow = doc.defaultView;\r\n if (!currentWindow) {\r\n return () => {\r\n handlers.forEach((h) => h());\r\n };\r\n }\r\n const propertyDescriptor = currentWindow.Object.getOwnPropertyDescriptor(currentWindow.HTMLInputElement.prototype, 'value');\r\n const hookProperties = [\r\n [currentWindow.HTMLInputElement.prototype, 'value'],\r\n [currentWindow.HTMLInputElement.prototype, 'checked'],\r\n [currentWindow.HTMLSelectElement.prototype, 'value'],\r\n [currentWindow.HTMLTextAreaElement.prototype, 'value'],\r\n [currentWindow.HTMLSelectElement.prototype, 'selectedIndex'],\r\n [currentWindow.HTMLOptionElement.prototype, 'selected'],\r\n ];\r\n if (propertyDescriptor && propertyDescriptor.set) {\r\n handlers.push(...hookProperties.map((p) => hookSetter(p[0], p[1], {\r\n set() {\r\n eventHandler({ target: this });\r\n },\r\n }, false, currentWindow)));\r\n }\r\n return () => {\r\n handlers.forEach((h) => h());\r\n };\r\n}\r\nfunction getNestedCSSRulePositions(rule) {\r\n const positions = [];\r\n function recurse(childRule, pos) {\r\n if ((isCSSGroupingRuleSupported &&\r\n childRule.parentRule instanceof CSSGroupingRule) ||\r\n (isCSSMediaRuleSupported &&\r\n childRule.parentRule instanceof CSSMediaRule) ||\r\n (isCSSSupportsRuleSupported &&\r\n childRule.parentRule instanceof CSSSupportsRule) ||\r\n (isCSSConditionRuleSupported &&\r\n childRule.parentRule instanceof CSSConditionRule)) {\r\n const rules = Array.from(childRule.parentRule.cssRules);\r\n const index = rules.indexOf(childRule);\r\n pos.unshift(index);\r\n }\r\n else if (childRule.parentStyleSheet) {\r\n const rules = Array.from(childRule.parentStyleSheet.cssRules);\r\n const index = rules.indexOf(childRule);\r\n pos.unshift(index);\r\n }\r\n return pos;\r\n }\r\n return recurse(rule, positions);\r\n}\r\nfunction getIdAndStyleId(sheet, mirror, styleMirror) {\r\n let id, styleId;\r\n if (!sheet)\r\n return {};\r\n if (sheet.ownerNode)\r\n id = mirror.getId(sheet.ownerNode);\r\n else\r\n styleId = styleMirror.getId(sheet);\r\n return {\r\n styleId,\r\n id,\r\n };\r\n}\r\nfunction initStyleSheetObserver({ styleSheetRuleCb, mirror, stylesheetManager }, { win }) {\r\n const insertRule = win.CSSStyleSheet.prototype.insertRule;\r\n win.CSSStyleSheet.prototype.insertRule = function (rule, index) {\r\n const { id, styleId } = getIdAndStyleId(this, mirror, stylesheetManager.styleMirror);\r\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\r\n styleSheetRuleCb({\r\n id,\r\n styleId,\r\n adds: [{ rule, index }],\r\n });\r\n }\r\n return insertRule.apply(this, [rule, index]);\r\n };\r\n const deleteRule = win.CSSStyleSheet.prototype.deleteRule;\r\n win.CSSStyleSheet.prototype.deleteRule = function (index) {\r\n const { id, styleId } = getIdAndStyleId(this, mirror, stylesheetManager.styleMirror);\r\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\r\n styleSheetRuleCb({\r\n id,\r\n styleId,\r\n removes: [{ index }],\r\n });\r\n }\r\n return deleteRule.apply(this, [index]);\r\n };\r\n let replace;\r\n if (win.CSSStyleSheet.prototype.replace) {\r\n replace = win.CSSStyleSheet.prototype.replace;\r\n win.CSSStyleSheet.prototype.replace = function (text) {\r\n const { id, styleId } = getIdAndStyleId(this, mirror, stylesheetManager.styleMirror);\r\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\r\n styleSheetRuleCb({\r\n id,\r\n styleId,\r\n replace: text,\r\n });\r\n }\r\n return replace.apply(this, [text]);\r\n };\r\n }\r\n let replaceSync;\r\n if (win.CSSStyleSheet.prototype.replaceSync) {\r\n replaceSync = win.CSSStyleSheet.prototype.replaceSync;\r\n win.CSSStyleSheet.prototype.replaceSync = function (text) {\r\n const { id, styleId } = getIdAndStyleId(this, mirror, stylesheetManager.styleMirror);\r\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\r\n styleSheetRuleCb({\r\n id,\r\n styleId,\r\n replaceSync: text,\r\n });\r\n }\r\n return replaceSync.apply(this, [text]);\r\n };\r\n }\r\n const supportedNestedCSSRuleTypes = {};\r\n if (isCSSGroupingRuleSupported) {\r\n supportedNestedCSSRuleTypes.CSSGroupingRule = win.CSSGroupingRule;\r\n }\r\n else {\r\n if (isCSSMediaRuleSupported) {\r\n supportedNestedCSSRuleTypes.CSSMediaRule = win.CSSMediaRule;\r\n }\r\n if (isCSSConditionRuleSupported) {\r\n supportedNestedCSSRuleTypes.CSSConditionRule = win.CSSConditionRule;\r\n }\r\n if (isCSSSupportsRuleSupported) {\r\n supportedNestedCSSRuleTypes.CSSSupportsRule = win.CSSSupportsRule;\r\n }\r\n }\r\n const unmodifiedFunctions = {};\r\n Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\r\n unmodifiedFunctions[typeKey] = {\r\n insertRule: type.prototype.insertRule,\r\n deleteRule: type.prototype.deleteRule,\r\n };\r\n type.prototype.insertRule = function (rule, index) {\r\n const { id, styleId } = getIdAndStyleId(this.parentStyleSheet, mirror, stylesheetManager.styleMirror);\r\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\r\n styleSheetRuleCb({\r\n id,\r\n styleId,\r\n adds: [\r\n {\r\n rule,\r\n index: [\r\n ...getNestedCSSRulePositions(this),\r\n index || 0,\r\n ],\r\n },\r\n ],\r\n });\r\n }\r\n return unmodifiedFunctions[typeKey].insertRule.apply(this, [rule, index]);\r\n };\r\n type.prototype.deleteRule = function (index) {\r\n const { id, styleId } = getIdAndStyleId(this.parentStyleSheet, mirror, stylesheetManager.styleMirror);\r\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\r\n styleSheetRuleCb({\r\n id,\r\n styleId,\r\n removes: [\r\n { index: [...getNestedCSSRulePositions(this), index] },\r\n ],\r\n });\r\n }\r\n return unmodifiedFunctions[typeKey].deleteRule.apply(this, [index]);\r\n };\r\n });\r\n return () => {\r\n win.CSSStyleSheet.prototype.insertRule = insertRule;\r\n win.CSSStyleSheet.prototype.deleteRule = deleteRule;\r\n replace && (win.CSSStyleSheet.prototype.replace = replace);\r\n replaceSync && (win.CSSStyleSheet.prototype.replaceSync = replaceSync);\r\n Object.entries(supportedNestedCSSRuleTypes).forEach(([typeKey, type]) => {\r\n type.prototype.insertRule = unmodifiedFunctions[typeKey].insertRule;\r\n type.prototype.deleteRule = unmodifiedFunctions[typeKey].deleteRule;\r\n });\r\n };\r\n}\r\nfunction initAdoptedStyleSheetObserver({ mirror, stylesheetManager, }, host) {\r\n var _a, _b, _c;\r\n let hostId = null;\r\n if (host.nodeName === '#document')\r\n hostId = mirror.getId(host);\r\n else\r\n hostId = mirror.getId(host.host);\r\n const patchTarget = host.nodeName === '#document'\r\n ? (_a = host.defaultView) === null || _a === void 0 ? void 0 : _a.Document\r\n : (_c = (_b = host.ownerDocument) === null || _b === void 0 ? void 0 : _b.defaultView) === null || _c === void 0 ? void 0 : _c.ShadowRoot;\r\n const originalPropertyDescriptor = Object.getOwnPropertyDescriptor(patchTarget === null || patchTarget === void 0 ? void 0 : patchTarget.prototype, 'adoptedStyleSheets');\r\n if (hostId === null ||\r\n hostId === -1 ||\r\n !patchTarget ||\r\n !originalPropertyDescriptor)\r\n return () => {\r\n };\r\n Object.defineProperty(host, 'adoptedStyleSheets', {\r\n configurable: originalPropertyDescriptor.configurable,\r\n enumerable: originalPropertyDescriptor.enumerable,\r\n get() {\r\n var _a;\r\n return (_a = originalPropertyDescriptor.get) === null || _a === void 0 ? void 0 : _a.call(this);\r\n },\r\n set(sheets) {\r\n var _a;\r\n const result = (_a = originalPropertyDescriptor.set) === null || _a === void 0 ? void 0 : _a.call(this, sheets);\r\n if (hostId !== null && hostId !== -1) {\r\n try {\r\n stylesheetManager.adoptStyleSheets(sheets, hostId);\r\n }\r\n catch (e) {\r\n }\r\n }\r\n return result;\r\n },\r\n });\r\n return () => {\r\n Object.defineProperty(host, 'adoptedStyleSheets', {\r\n configurable: originalPropertyDescriptor.configurable,\r\n enumerable: originalPropertyDescriptor.enumerable,\r\n get: originalPropertyDescriptor.get,\r\n set: originalPropertyDescriptor.set,\r\n });\r\n };\r\n}\r\nfunction initStyleDeclarationObserver({ styleDeclarationCb, mirror, ignoreCSSAttributes, stylesheetManager, }, { win }) {\r\n const setProperty = win.CSSStyleDeclaration.prototype.setProperty;\r\n win.CSSStyleDeclaration.prototype.setProperty = function (property, value, priority) {\r\n var _a;\r\n if (ignoreCSSAttributes.has(property)) {\r\n return setProperty.apply(this, [property, value, priority]);\r\n }\r\n const { id, styleId } = getIdAndStyleId((_a = this.parentRule) === null || _a === void 0 ? void 0 : _a.parentStyleSheet, mirror, stylesheetManager.styleMirror);\r\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\r\n styleDeclarationCb({\r\n id,\r\n styleId,\r\n set: {\r\n property,\r\n value,\r\n priority,\r\n },\r\n index: getNestedCSSRulePositions(this.parentRule),\r\n });\r\n }\r\n return setProperty.apply(this, [property, value, priority]);\r\n };\r\n const removeProperty = win.CSSStyleDeclaration.prototype.removeProperty;\r\n win.CSSStyleDeclaration.prototype.removeProperty = function (property) {\r\n var _a;\r\n if (ignoreCSSAttributes.has(property)) {\r\n return removeProperty.apply(this, [property]);\r\n }\r\n const { id, styleId } = getIdAndStyleId((_a = this.parentRule) === null || _a === void 0 ? void 0 : _a.parentStyleSheet, mirror, stylesheetManager.styleMirror);\r\n if ((id && id !== -1) || (styleId && styleId !== -1)) {\r\n styleDeclarationCb({\r\n id,\r\n styleId,\r\n remove: {\r\n property,\r\n },\r\n index: getNestedCSSRulePositions(this.parentRule),\r\n });\r\n }\r\n return removeProperty.apply(this, [property]);\r\n };\r\n return () => {\r\n win.CSSStyleDeclaration.prototype.setProperty = setProperty;\r\n win.CSSStyleDeclaration.prototype.removeProperty = removeProperty;\r\n };\r\n}\r\nfunction initMediaInteractionObserver({ mediaInteractionCb, blockClass, blockSelector, mirror, sampling, }) {\r\n const handler = (type) => throttle((event) => {\r\n const target = getEventTarget(event);\r\n if (!target ||\r\n isBlocked(target, blockClass, blockSelector, true)) {\r\n return;\r\n }\r\n const { currentTime, volume, muted, playbackRate, } = target;\r\n mediaInteractionCb({\r\n type,\r\n id: mirror.getId(target),\r\n currentTime,\r\n volume,\r\n muted,\r\n playbackRate,\r\n });\r\n }, sampling.media || 500);\r\n const handlers = [\r\n on('play', handler(0)),\r\n on('pause', handler(1)),\r\n on('seeked', handler(2)),\r\n on('volumechange', handler(3)),\r\n on('ratechange', handler(4)),\r\n ];\r\n return () => {\r\n handlers.forEach((h) => h());\r\n };\r\n}\r\nfunction initFontObserver({ fontCb, doc }) {\r\n const win = doc.defaultView;\r\n if (!win) {\r\n return () => {\r\n };\r\n }\r\n const handlers = [];\r\n const fontMap = new WeakMap();\r\n const originalFontFace = win.FontFace;\r\n win.FontFace = function FontFace(family, source, descriptors) {\r\n const fontFace = new originalFontFace(family, source, descriptors);\r\n fontMap.set(fontFace, {\r\n family,\r\n buffer: typeof source !== 'string',\r\n descriptors,\r\n fontSource: typeof source === 'string'\r\n ? source\r\n : JSON.stringify(Array.from(new Uint8Array(source))),\r\n });\r\n return fontFace;\r\n };\r\n const restoreHandler = patch(doc.fonts, 'add', function (original) {\r\n return function (fontFace) {\r\n setTimeout(() => {\r\n const p = fontMap.get(fontFace);\r\n if (p) {\r\n fontCb(p);\r\n fontMap.delete(fontFace);\r\n }\r\n }, 0);\r\n return original.apply(this, [fontFace]);\r\n };\r\n });\r\n handlers.push(() => {\r\n win.FontFace = originalFontFace;\r\n });\r\n handlers.push(restoreHandler);\r\n return () => {\r\n handlers.forEach((h) => h());\r\n };\r\n}\r\nfunction initSelectionObserver(param) {\r\n const { doc, mirror, blockClass, blockSelector, selectionCb } = param;\r\n let collapsed = true;\r\n const updateSelection = () => {\r\n const selection = doc.getSelection();\r\n if (!selection || (collapsed && (selection === null || selection === void 0 ? void 0 : selection.isCollapsed)))\r\n return;\r\n collapsed = selection.isCollapsed || false;\r\n const ranges = [];\r\n const count = selection.rangeCount || 0;\r\n for (let i = 0; i < count; i++) {\r\n const range = selection.getRangeAt(i);\r\n const { startContainer, startOffset, endContainer, endOffset } = range;\r\n const blocked = isBlocked(startContainer, blockClass, blockSelector, true) ||\r\n isBlocked(endContainer, blockClass, blockSelector, true);\r\n if (blocked)\r\n continue;\r\n ranges.push({\r\n start: mirror.getId(startContainer),\r\n startOffset,\r\n end: mirror.getId(endContainer),\r\n endOffset,\r\n });\r\n }\r\n selectionCb({ ranges });\r\n };\r\n updateSelection();\r\n return on('selectionchange', updateSelection);\r\n}\r\nfunction mergeHooks(o, hooks) {\r\n const { mutationCb, mousemoveCb, mouseInteractionCb, scrollCb, viewportResizeCb, inputCb, mediaInteractionCb, styleSheetRuleCb, styleDeclarationCb, canvasMutationCb, fontCb, selectionCb, } = o;\r\n o.mutationCb = (...p) => {\r\n if (hooks.mutation) {\r\n hooks.mutation(...p);\r\n }\r\n mutationCb(...p);\r\n };\r\n o.mousemoveCb = (...p) => {\r\n if (hooks.mousemove) {\r\n hooks.mousemove(...p);\r\n }\r\n mousemoveCb(...p);\r\n };\r\n o.mouseInteractionCb = (...p) => {\r\n if (hooks.mouseInteraction) {\r\n hooks.mouseInteraction(...p);\r\n }\r\n mouseInteractionCb(...p);\r\n };\r\n o.scrollCb = (...p) => {\r\n if (hooks.scroll) {\r\n hooks.scroll(...p);\r\n }\r\n scrollCb(...p);\r\n };\r\n o.viewportResizeCb = (...p) => {\r\n if (hooks.viewportResize) {\r\n hooks.viewportResize(...p);\r\n }\r\n viewportResizeCb(...p);\r\n };\r\n o.inputCb = (...p) => {\r\n if (hooks.input) {\r\n hooks.input(...p);\r\n }\r\n inputCb(...p);\r\n };\r\n o.mediaInteractionCb = (...p) => {\r\n if (hooks.mediaInteaction) {\r\n hooks.mediaInteaction(...p);\r\n }\r\n mediaInteractionCb(...p);\r\n };\r\n o.styleSheetRuleCb = (...p) => {\r\n if (hooks.styleSheetRule) {\r\n hooks.styleSheetRule(...p);\r\n }\r\n styleSheetRuleCb(...p);\r\n };\r\n o.styleDeclarationCb = (...p) => {\r\n if (hooks.styleDeclaration) {\r\n hooks.styleDeclaration(...p);\r\n }\r\n styleDeclarationCb(...p);\r\n };\r\n o.canvasMutationCb = (...p) => {\r\n if (hooks.canvasMutation) {\r\n hooks.canvasMutation(...p);\r\n }\r\n canvasMutationCb(...p);\r\n };\r\n o.fontCb = (...p) => {\r\n if (hooks.font) {\r\n hooks.font(...p);\r\n }\r\n fontCb(...p);\r\n };\r\n o.selectionCb = (...p) => {\r\n if (hooks.selection) {\r\n hooks.selection(...p);\r\n }\r\n selectionCb(...p);\r\n };\r\n}\r\nfunction initObservers(o, hooks = {}) {\r\n const currentWindow = o.doc.defaultView;\r\n if (!currentWindow) {\r\n return () => {\r\n };\r\n }\r\n mergeHooks(o, hooks);\r\n const mutationObserver = initMutationObserver(o, o.doc);\r\n const mousemoveHandler = initMoveObserver(o);\r\n const mouseInteractionHandler = initMouseInteractionObserver(o);\r\n const scrollHandler = initScrollObserver(o);\r\n const viewportResizeHandler = initViewportResizeObserver(o);\r\n const inputHandler = initInputObserver(o);\r\n const mediaInteractionHandler = initMediaInteractionObserver(o);\r\n const styleSheetObserver = initStyleSheetObserver(o, { win: currentWindow });\r\n const adoptedStyleSheetObserver = initAdoptedStyleSheetObserver(o, o.doc);\r\n const styleDeclarationObserver = initStyleDeclarationObserver(o, {\r\n win: currentWindow,\r\n });\r\n const fontObserver = o.collectFonts\r\n ? initFontObserver(o)\r\n : () => {\r\n };\r\n const selectionObserver = initSelectionObserver(o);\r\n const pluginHandlers = [];\r\n for (const plugin of o.plugins) {\r\n pluginHandlers.push(plugin.observer(plugin.callback, currentWindow, plugin.options));\r\n }\r\n return () => {\r\n mutationBuffers.forEach((b) => b.reset());\r\n mutationObserver.disconnect();\r\n mousemoveHandler();\r\n mouseInteractionHandler();\r\n scrollHandler();\r\n viewportResizeHandler();\r\n inputHandler();\r\n mediaInteractionHandler();\r\n styleSheetObserver();\r\n adoptedStyleSheetObserver();\r\n styleDeclarationObserver();\r\n fontObserver();\r\n selectionObserver();\r\n pluginHandlers.forEach((h) => h());\r\n };\r\n}\n\nexport { INPUT_TAGS, initAdoptedStyleSheetObserver, initMutationObserver, initObservers, initScrollObserver, mutationBuffers };\n","class CrossOriginIframeMirror {\r\n constructor(generateIdFn) {\r\n this.generateIdFn = generateIdFn;\r\n this.iframeIdToRemoteIdMap = new WeakMap();\r\n this.iframeRemoteIdToIdMap = new WeakMap();\r\n }\r\n getId(iframe, remoteId, idToRemoteMap, remoteToIdMap) {\r\n const idToRemoteIdMap = idToRemoteMap || this.getIdToRemoteIdMap(iframe);\r\n const remoteIdToIdMap = remoteToIdMap || this.getRemoteIdToIdMap(iframe);\r\n let id = idToRemoteIdMap.get(remoteId);\r\n if (!id) {\r\n id = this.generateIdFn();\r\n idToRemoteIdMap.set(remoteId, id);\r\n remoteIdToIdMap.set(id, remoteId);\r\n }\r\n return id;\r\n }\r\n getIds(iframe, remoteId) {\r\n const idToRemoteIdMap = this.getIdToRemoteIdMap(iframe);\r\n const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\r\n return remoteId.map((id) => this.getId(iframe, id, idToRemoteIdMap, remoteIdToIdMap));\r\n }\r\n getRemoteId(iframe, id, map) {\r\n const remoteIdToIdMap = map || this.getRemoteIdToIdMap(iframe);\r\n if (typeof id !== 'number')\r\n return id;\r\n const remoteId = remoteIdToIdMap.get(id);\r\n if (!remoteId)\r\n return -1;\r\n return remoteId;\r\n }\r\n getRemoteIds(iframe, ids) {\r\n const remoteIdToIdMap = this.getRemoteIdToIdMap(iframe);\r\n return ids.map((id) => this.getRemoteId(iframe, id, remoteIdToIdMap));\r\n }\r\n reset(iframe) {\r\n if (!iframe) {\r\n this.iframeIdToRemoteIdMap = new WeakMap();\r\n this.iframeRemoteIdToIdMap = new WeakMap();\r\n return;\r\n }\r\n this.iframeIdToRemoteIdMap.delete(iframe);\r\n this.iframeRemoteIdToIdMap.delete(iframe);\r\n }\r\n getIdToRemoteIdMap(iframe) {\r\n let idToRemoteIdMap = this.iframeIdToRemoteIdMap.get(iframe);\r\n if (!idToRemoteIdMap) {\r\n idToRemoteIdMap = new Map();\r\n this.iframeIdToRemoteIdMap.set(iframe, idToRemoteIdMap);\r\n }\r\n return idToRemoteIdMap;\r\n }\r\n getRemoteIdToIdMap(iframe) {\r\n let remoteIdToIdMap = this.iframeRemoteIdToIdMap.get(iframe);\r\n if (!remoteIdToIdMap) {\r\n remoteIdToIdMap = new Map();\r\n this.iframeRemoteIdToIdMap.set(iframe, remoteIdToIdMap);\r\n }\r\n return remoteIdToIdMap;\r\n }\r\n}\n\nexport { CrossOriginIframeMirror as default };\n","import { genId } from '../../../rrweb-snapshot/es/rrweb-snapshot.js';\nimport CrossOriginIframeMirror from './cross-origin-iframe-mirror.js';\nimport { EventType, IncrementalSource } from '../../../types/dist/types.js';\n\nclass IframeManager {\r\n constructor(options) {\r\n this.iframes = new WeakMap();\r\n this.crossOriginIframeMap = new WeakMap();\r\n this.crossOriginIframeMirror = new CrossOriginIframeMirror(genId);\r\n this.mutationCb = options.mutationCb;\r\n this.wrappedEmit = options.wrappedEmit;\r\n this.stylesheetManager = options.stylesheetManager;\r\n this.recordCrossOriginIframes = options.recordCrossOriginIframes;\r\n this.crossOriginIframeStyleMirror = new CrossOriginIframeMirror(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror));\r\n this.mirror = options.mirror;\r\n if (this.recordCrossOriginIframes) {\r\n window.addEventListener('message', this.handleMessage.bind(this));\r\n }\r\n }\r\n addIframe(iframeEl) {\r\n this.iframes.set(iframeEl, true);\r\n if (iframeEl.contentWindow)\r\n this.crossOriginIframeMap.set(iframeEl.contentWindow, iframeEl);\r\n }\r\n addLoadListener(cb) {\r\n this.loadListener = cb;\r\n }\r\n attachIframe(iframeEl, childSn) {\r\n var _a;\r\n this.mutationCb({\r\n adds: [\r\n {\r\n parentId: this.mirror.getId(iframeEl),\r\n nextId: null,\r\n node: childSn,\r\n },\r\n ],\r\n removes: [],\r\n texts: [],\r\n attributes: [],\r\n isAttachIframe: true,\r\n });\r\n (_a = this.loadListener) === null || _a === void 0 ? void 0 : _a.call(this, iframeEl);\r\n if (iframeEl.contentDocument &&\r\n iframeEl.contentDocument.adoptedStyleSheets &&\r\n iframeEl.contentDocument.adoptedStyleSheets.length > 0)\r\n this.stylesheetManager.adoptStyleSheets(iframeEl.contentDocument.adoptedStyleSheets, this.mirror.getId(iframeEl.contentDocument));\r\n }\r\n handleMessage(message) {\r\n if (message.data.type === 'rrweb') {\r\n const iframeSourceWindow = message.source;\r\n if (!iframeSourceWindow)\r\n return;\r\n const iframeEl = this.crossOriginIframeMap.get(message.source);\r\n if (!iframeEl)\r\n return;\r\n const transformedEvent = this.transformCrossOriginEvent(iframeEl, message.data.event);\r\n if (transformedEvent)\r\n this.wrappedEmit(transformedEvent, message.data.isCheckout);\r\n }\r\n }\r\n transformCrossOriginEvent(iframeEl, e) {\r\n var _a;\r\n switch (e.type) {\r\n case EventType.FullSnapshot: {\r\n this.crossOriginIframeMirror.reset(iframeEl);\r\n this.crossOriginIframeStyleMirror.reset(iframeEl);\r\n this.replaceIdOnNode(e.data.node, iframeEl);\r\n return {\r\n timestamp: e.timestamp,\r\n type: EventType.IncrementalSnapshot,\r\n data: {\r\n source: IncrementalSource.Mutation,\r\n adds: [\r\n {\r\n parentId: this.mirror.getId(iframeEl),\r\n nextId: null,\r\n node: e.data.node,\r\n },\r\n ],\r\n removes: [],\r\n texts: [],\r\n attributes: [],\r\n isAttachIframe: true,\r\n },\r\n };\r\n }\r\n case EventType.Meta:\r\n case EventType.Load:\r\n case EventType.DomContentLoaded: {\r\n return false;\r\n }\r\n case EventType.Plugin: {\r\n return e;\r\n }\r\n case EventType.Custom: {\r\n this.replaceIds(e.data.payload, iframeEl, ['id', 'parentId', 'previousId', 'nextId']);\r\n return e;\r\n }\r\n case EventType.IncrementalSnapshot: {\r\n switch (e.data.source) {\r\n case IncrementalSource.Mutation: {\r\n e.data.adds.forEach((n) => {\r\n this.replaceIds(n, iframeEl, [\r\n 'parentId',\r\n 'nextId',\r\n 'previousId',\r\n ]);\r\n this.replaceIdOnNode(n.node, iframeEl);\r\n });\r\n e.data.removes.forEach((n) => {\r\n this.replaceIds(n, iframeEl, ['parentId', 'id']);\r\n });\r\n e.data.attributes.forEach((n) => {\r\n this.replaceIds(n, iframeEl, ['id']);\r\n });\r\n e.data.texts.forEach((n) => {\r\n this.replaceIds(n, iframeEl, ['id']);\r\n });\r\n return e;\r\n }\r\n case IncrementalSource.Drag:\r\n case IncrementalSource.TouchMove:\r\n case IncrementalSource.MouseMove: {\r\n e.data.positions.forEach((p) => {\r\n this.replaceIds(p, iframeEl, ['id']);\r\n });\r\n return e;\r\n }\r\n case IncrementalSource.ViewportResize: {\r\n return false;\r\n }\r\n case IncrementalSource.MediaInteraction:\r\n case IncrementalSource.MouseInteraction:\r\n case IncrementalSource.Scroll:\r\n case IncrementalSource.CanvasMutation:\r\n case IncrementalSource.Input: {\r\n this.replaceIds(e.data, iframeEl, ['id']);\r\n return e;\r\n }\r\n case IncrementalSource.StyleSheetRule:\r\n case IncrementalSource.StyleDeclaration: {\r\n this.replaceIds(e.data, iframeEl, ['id']);\r\n this.replaceStyleIds(e.data, iframeEl, ['styleId']);\r\n return e;\r\n }\r\n case IncrementalSource.Font: {\r\n return e;\r\n }\r\n case IncrementalSource.Selection: {\r\n e.data.ranges.forEach((range) => {\r\n this.replaceIds(range, iframeEl, ['start', 'end']);\r\n });\r\n return e;\r\n }\r\n case IncrementalSource.AdoptedStyleSheet: {\r\n this.replaceIds(e.data, iframeEl, ['id']);\r\n this.replaceStyleIds(e.data, iframeEl, ['styleIds']);\r\n (_a = e.data.styles) === null || _a === void 0 ? void 0 : _a.forEach((style) => {\r\n this.replaceStyleIds(style, iframeEl, ['styleId']);\r\n });\r\n return e;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n replace(iframeMirror, obj, iframeEl, keys) {\r\n for (const key of keys) {\r\n if (!Array.isArray(obj[key]) && typeof obj[key] !== 'number')\r\n continue;\r\n if (Array.isArray(obj[key])) {\r\n obj[key] = iframeMirror.getIds(iframeEl, obj[key]);\r\n }\r\n else {\r\n obj[key] = iframeMirror.getId(iframeEl, obj[key]);\r\n }\r\n }\r\n return obj;\r\n }\r\n replaceIds(obj, iframeEl, keys) {\r\n return this.replace(this.crossOriginIframeMirror, obj, iframeEl, keys);\r\n }\r\n replaceStyleIds(obj, iframeEl, keys) {\r\n return this.replace(this.crossOriginIframeStyleMirror, obj, iframeEl, keys);\r\n }\r\n replaceIdOnNode(node, iframeEl) {\r\n this.replaceIds(node, iframeEl, ['id']);\r\n if ('childNodes' in node) {\r\n node.childNodes.forEach((child) => {\r\n this.replaceIdOnNode(child, iframeEl);\r\n });\r\n }\r\n }\r\n}\n\nexport { IframeManager };\n","import { initMutationObserver, initScrollObserver, initAdoptedStyleSheetObserver } from './observer.js';\nimport { patch } from '../utils.js';\nimport { isNativeShadowDom } from '../../../rrweb-snapshot/es/rrweb-snapshot.js';\n\nclass ShadowDomManager {\r\n constructor(options) {\r\n this.shadowDoms = new WeakSet();\r\n this.restorePatches = [];\r\n this.mutationCb = options.mutationCb;\r\n this.scrollCb = options.scrollCb;\r\n this.bypassOptions = options.bypassOptions;\r\n this.mirror = options.mirror;\r\n const manager = this;\r\n this.restorePatches.push(patch(Element.prototype, 'attachShadow', function (original) {\r\n return function (option) {\r\n const shadowRoot = original.call(this, option);\r\n if (this.shadowRoot)\r\n manager.addShadowRoot(this.shadowRoot, this.ownerDocument);\r\n return shadowRoot;\r\n };\r\n }));\r\n }\r\n addShadowRoot(shadowRoot, doc) {\r\n if (!isNativeShadowDom(shadowRoot))\r\n return;\r\n if (this.shadowDoms.has(shadowRoot))\r\n return;\r\n this.shadowDoms.add(shadowRoot);\r\n initMutationObserver(Object.assign(Object.assign({}, this.bypassOptions), { doc, mutationCb: this.mutationCb, mirror: this.mirror, shadowDomManager: this }), shadowRoot);\r\n initScrollObserver(Object.assign(Object.assign({}, this.bypassOptions), { scrollCb: this.scrollCb, doc: shadowRoot, mirror: this.mirror }));\r\n setTimeout(() => {\r\n if (shadowRoot.adoptedStyleSheets &&\r\n shadowRoot.adoptedStyleSheets.length > 0)\r\n this.bypassOptions.stylesheetManager.adoptStyleSheets(shadowRoot.adoptedStyleSheets, this.mirror.getId(shadowRoot.host));\r\n initAdoptedStyleSheetObserver({\r\n mirror: this.mirror,\r\n stylesheetManager: this.bypassOptions.stylesheetManager,\r\n }, shadowRoot);\r\n }, 0);\r\n }\r\n observeAttachShadow(iframeElement) {\r\n if (iframeElement.contentWindow) {\r\n const manager = this;\r\n this.restorePatches.push(patch(iframeElement.contentWindow.HTMLElement.prototype, 'attachShadow', function (original) {\r\n return function (option) {\r\n const shadowRoot = original.call(this, option);\r\n if (this.shadowRoot)\r\n manager.addShadowRoot(this.shadowRoot, iframeElement.contentDocument);\r\n return shadowRoot;\r\n };\r\n }));\r\n }\r\n }\r\n reset() {\r\n this.restorePatches.forEach((restorePatch) => restorePatch());\r\n this.shadowDoms = new WeakSet();\r\n }\r\n}\n\nexport { ShadowDomManager };\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\nexport { __awaiter, __rest };\n","/*\n * base64-arraybuffer 1.0.1 <https://github.com/niklasvh/base64-arraybuffer>\n * Copyright (c) 2021 Niklas von Hertzen <https://hertzen.com>\n * Released under MIT License\n */\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\n// Use a lookup table to find the index.\nvar lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);\nfor (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n}\nvar encode = function (arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = '';\n for (i = 0; i < len; i += 3) {\n base64 += chars[bytes[i] >> 2];\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\n base64 += chars[bytes[i + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + '=';\n }\n else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + '==';\n }\n return base64;\n};\nvar decode = function (base64) {\n var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4;\n if (base64[base64.length - 1] === '=') {\n bufferLength--;\n if (base64[base64.length - 2] === '=') {\n bufferLength--;\n }\n }\n var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer);\n for (i = 0; i < len; i += 4) {\n encoded1 = lookup[base64.charCodeAt(i)];\n encoded2 = lookup[base64.charCodeAt(i + 1)];\n encoded3 = lookup[base64.charCodeAt(i + 2)];\n encoded4 = lookup[base64.charCodeAt(i + 3)];\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\n }\n return arraybuffer;\n};\n\nexport { decode, encode };\n","import { encode } from './../../../../../../ext/base64-arraybuffer/dist/base64-arraybuffer.es5.js';\n\nconst canvasVarMap = new Map();\r\nfunction variableListFor(ctx, ctor) {\r\n let contextMap = canvasVarMap.get(ctx);\r\n if (!contextMap) {\r\n contextMap = new Map();\r\n canvasVarMap.set(ctx, contextMap);\r\n }\r\n if (!contextMap.has(ctor)) {\r\n contextMap.set(ctor, []);\r\n }\r\n return contextMap.get(ctor);\r\n}\r\nconst saveWebGLVar = (value, win, ctx) => {\r\n if (!value ||\r\n !(isInstanceOfWebGLObject(value, win) || typeof value === 'object'))\r\n return;\r\n const name = value.constructor.name;\r\n const list = variableListFor(ctx, name);\r\n let index = list.indexOf(value);\r\n if (index === -1) {\r\n index = list.length;\r\n list.push(value);\r\n }\r\n return index;\r\n};\r\nfunction serializeArg(value, win, ctx) {\r\n if (value instanceof Array) {\r\n return value.map((arg) => serializeArg(arg, win, ctx));\r\n }\r\n else if (value === null) {\r\n return value;\r\n }\r\n else if (value instanceof Float32Array ||\r\n value instanceof Float64Array ||\r\n value instanceof Int32Array ||\r\n value instanceof Uint32Array ||\r\n value instanceof Uint8Array ||\r\n value instanceof Uint16Array ||\r\n value instanceof Int16Array ||\r\n value instanceof Int8Array ||\r\n value instanceof Uint8ClampedArray) {\r\n const name = value.constructor.name;\r\n return {\r\n rr_type: name,\r\n args: [Object.values(value)],\r\n };\r\n }\r\n else if (value instanceof ArrayBuffer) {\r\n const name = value.constructor.name;\r\n const base64 = encode(value);\r\n return {\r\n rr_type: name,\r\n base64,\r\n };\r\n }\r\n else if (value instanceof DataView) {\r\n const name = value.constructor.name;\r\n return {\r\n rr_type: name,\r\n args: [\r\n serializeArg(value.buffer, win, ctx),\r\n value.byteOffset,\r\n value.byteLength,\r\n ],\r\n };\r\n }\r\n else if (value instanceof HTMLImageElement) {\r\n const name = value.constructor.name;\r\n const { src } = value;\r\n return {\r\n rr_type: name,\r\n src,\r\n };\r\n }\r\n else if (value instanceof HTMLCanvasElement) {\r\n const name = 'HTMLImageElement';\r\n const src = value.toDataURL();\r\n return {\r\n rr_type: name,\r\n src,\r\n };\r\n }\r\n else if (value instanceof ImageData) {\r\n const name = value.constructor.name;\r\n return {\r\n rr_type: name,\r\n args: [serializeArg(value.data, win, ctx), value.width, value.height],\r\n };\r\n }\r\n else if (isInstanceOfWebGLObject(value, win) || typeof value === 'object') {\r\n const name = value.constructor.name;\r\n const index = saveWebGLVar(value, win, ctx);\r\n return {\r\n rr_type: name,\r\n index: index,\r\n };\r\n }\r\n return value;\r\n}\r\nconst serializeArgs = (args, win, ctx) => {\r\n return [...args].map((arg) => serializeArg(arg, win, ctx));\r\n};\r\nconst isInstanceOfWebGLObject = (value, win) => {\r\n const webGLConstructorNames = [\r\n 'WebGLActiveInfo',\r\n 'WebGLBuffer',\r\n 'WebGLFramebuffer',\r\n 'WebGLProgram',\r\n 'WebGLRenderbuffer',\r\n 'WebGLShader',\r\n 'WebGLShaderPrecisionFormat',\r\n 'WebGLTexture',\r\n 'WebGLUniformLocation',\r\n 'WebGLVertexArrayObject',\r\n 'WebGLVertexArrayObjectOES',\r\n ];\r\n const supportedWebGLConstructorNames = webGLConstructorNames.filter((name) => typeof win[name] === 'function');\r\n return Boolean(supportedWebGLConstructorNames.find((name) => value instanceof win[name]));\r\n};\n\nexport { isInstanceOfWebGLObject, saveWebGLVar, serializeArg, serializeArgs, variableListFor };\n","import { patch, isBlocked } from '../../../utils.js';\n\nfunction initCanvasContextObserver(win, blockClass, blockSelector) {\r\n const handlers = [];\r\n try {\r\n const restoreHandler = patch(win.HTMLCanvasElement.prototype, 'getContext', function (original) {\r\n return function (contextType, ...args) {\r\n if (!isBlocked(this, blockClass, blockSelector, true)) {\r\n if (!('__context' in this))\r\n this.__context = contextType;\r\n }\r\n return original.apply(this, [contextType, ...args]);\r\n };\r\n });\r\n handlers.push(restoreHandler);\r\n }\r\n catch (_a) {\r\n console.error('failed to patch HTMLCanvasElement.prototype.getContext');\r\n }\r\n return () => {\r\n handlers.forEach((h) => h());\r\n };\r\n}\n\nexport { initCanvasContextObserver as default };\n","import { CanvasContext } from '../../../../../types/dist/types.js';\nimport { patch, isBlocked, hookSetter } from '../../../utils.js';\nimport { saveWebGLVar, serializeArgs } from './serialize-args.js';\n\nfunction patchGLPrototype(prototype, type, cb, blockClass, blockSelector, mirror, win) {\r\n const handlers = [];\r\n const props = Object.getOwnPropertyNames(prototype);\r\n for (const prop of props) {\r\n if ([\r\n 'isContextLost',\r\n 'canvas',\r\n 'drawingBufferWidth',\r\n 'drawingBufferHeight',\r\n ].includes(prop)) {\r\n continue;\r\n }\r\n try {\r\n if (typeof prototype[prop] !== 'function') {\r\n continue;\r\n }\r\n const restoreHandler = patch(prototype, prop, function (original) {\r\n return function (...args) {\r\n const result = original.apply(this, args);\r\n saveWebGLVar(result, win, this);\r\n if (!isBlocked(this.canvas, blockClass, blockSelector, true)) {\r\n const recordArgs = serializeArgs([...args], win, this);\r\n const mutation = {\r\n type,\r\n property: prop,\r\n args: recordArgs,\r\n };\r\n cb(this.canvas, mutation);\r\n }\r\n return result;\r\n };\r\n });\r\n handlers.push(restoreHandler);\r\n }\r\n catch (_a) {\r\n const hookHandler = hookSetter(prototype, prop, {\r\n set(v) {\r\n cb(this.canvas, {\r\n type,\r\n property: prop,\r\n args: [v],\r\n setter: true,\r\n });\r\n },\r\n });\r\n handlers.push(hookHandler);\r\n }\r\n }\r\n return handlers;\r\n}\r\nfunction initCanvasWebGLMutationObserver(cb, win, blockClass, blockSelector, mirror) {\r\n const handlers = [];\r\n handlers.push(...patchGLPrototype(win.WebGLRenderingContext.prototype, CanvasContext.WebGL, cb, blockClass, blockSelector, mirror, win));\r\n if (typeof win.WebGL2RenderingContext !== 'undefined') {\r\n handlers.push(...patchGLPrototype(win.WebGL2RenderingContext.prototype, CanvasContext.WebGL2, cb, blockClass, blockSelector, mirror, win));\r\n }\r\n return () => {\r\n handlers.forEach((h) => h());\r\n };\r\n}\n\nexport { initCanvasWebGLMutationObserver as default };\n","var WorkerClass = null;\n\ntry {\n var WorkerThreads =\n typeof module !== 'undefined' && typeof module.require === 'function' && module.require('worker_threads') ||\n typeof __non_webpack_require__ === 'function' && __non_webpack_require__('worker_threads') ||\n typeof require === 'function' && require('worker_threads');\n WorkerClass = WorkerThreads.Worker;\n} catch(e) {} // eslint-disable-line\n\nexport { WorkerClass };\n","import { WorkerClass } from './_rollup-plugin-web-worker-loader__helper__node__WorkerClass.js';\n\nfunction decodeBase64(base64, enableUnicode) {\n return Buffer.from(base64, 'base64').toString(enableUnicode ? 'utf16' : 'utf8');\n}\n\nfunction createBase64WorkerFactory(base64, sourcemapArg, enableUnicodeArg) {\n var sourcemap = sourcemapArg === undefined ? null : sourcemapArg;\n var enableUnicode = enableUnicodeArg === undefined ? false : enableUnicodeArg;\n var source = decodeBase64(base64, enableUnicode);\n var start = source.indexOf('\\n', 10) + 1;\n var body = source.substring(start) + (sourcemap ? '\\/\\/# sourceMappingURL=' + sourcemap : '');\n return function WorkerFactory(options) {\n return new WorkerClass(body, Object.assign({}, options, { eval: true }));\n };\n}\n\nexport { createBase64WorkerFactory };\n","function decodeBase64(base64, enableUnicode) {\n var binaryString = atob(base64);\n if (enableUnicode) {\n var binaryView = new Uint8Array(binaryString.length);\n for (var i = 0, n = binaryString.length; i < n; ++i) {\n binaryView[i] = binaryString.charCodeAt(i);\n }\n return String.fromCharCode.apply(null, new Uint16Array(binaryView.buffer));\n }\n return binaryString;\n}\n\nfunction createURL(base64, sourcemapArg, enableUnicodeArg) {\n var sourcemap = sourcemapArg === undefined ? null : sourcemapArg;\n var enableUnicode = enableUnicodeArg === undefined ? false : enableUnicodeArg;\n var source = decodeBase64(base64, enableUnicode);\n var start = source.indexOf('\\n', 10) + 1;\n var body = source.substring(start) + (sourcemap ? '\\/\\/# sourceMappingURL=' + sourcemap : '');\n var blob = new Blob([body], { type: 'application/javascript' });\n return URL.createObjectURL(blob);\n}\n\nfunction createBase64WorkerFactory(base64, sourcemapArg, enableUnicodeArg) {\n var url;\n return function WorkerFactory(options) {\n url = url || createURL(base64, sourcemapArg, enableUnicodeArg);\n return new Worker(url, options);\n };\n}\n\nexport { createBase64WorkerFactory };\n","var kIsNodeJS = Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';\n\nfunction isNodeJS() {\n return kIsNodeJS;\n}\n\nexport { isNodeJS };\n","import { createBase64WorkerFactory } from './_rollup-plugin-web-worker-loader__helper__auto__createBase64WorkerFactory.js';\n\nvar WorkerFactory = createBase64WorkerFactory('Lyogcm9sbHVwLXBsdWdpbi13ZWItd29ya2VyLWxvYWRlciAqLwooZnVuY3Rpb24gKCkgewogICAgJ3VzZSBzdHJpY3QnOwoKICAgIC8qISAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICAgIENvcHlyaWdodCAoYykgTWljcm9zb2Z0IENvcnBvcmF0aW9uLg0KDQogICAgUGVybWlzc2lvbiB0byB1c2UsIGNvcHksIG1vZGlmeSwgYW5kL29yIGR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AgICAgICAgICAgY29uc3QgYXJyYXlCdWZmZXIgPSB5aWVsZCBibG9iLmFycmF5QnVmZmVyKCk7DQogICAgICAgICAgICAgICAgY29uc3QgYmFzZTY0ID0gZW5jb2RlKGFycmF5QnVmZmVyKTsNCiAgICAgICAgICAgICAgICBpZiAoIWxhc3RCbG9iTWFwLmhhcyhpZCkgJiYgKHlpZWxkIHRyYW5zcGFyZW50QmFzZTY0KSA9PT0gYmFzZTY0KSB7DQogICAgICAgICAgICAgICAgICAgIGxhc3RCbG9iTWFwLnNldChpZCwgYmFzZTY0KTsNCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHdvcmtlci5wb3N0TWVzc2FnZSh7IGlkIH0pOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZiAobGFzdEJsb2JNYXAuZ2V0KGlkKSA9PT0gYmFzZTY0KQ0KICAgICAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQgfSk7DQogICAgICAgICAgICAgICAgd29ya2VyLnBvc3RNZXNzYWdlKHsNCiAgICAgICAgICAgICAgICAgICAgaWQsDQogICAgICAgICAgICAgICAgICAgIHR5cGUsDQogICAgICAgICAgICAgICAgICAgIGJhc2U2NCwNCiAgICAgICAgICAgICAgICAgICAgd2lkdGgsDQogICAgICAgICAgICAgICAgICAgIGhlaWdodCwNCiAgICAgICAgICAgICAgICB9KTsNCiAgICAgICAgICAgICAgICBsYXN0QmxvYk1hcC5zZXQoaWQsIGJhc2U2NCk7DQogICAgICAgICAgICB9DQogICAgICAgICAgICBlbHNlIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gd29ya2VyLnBvc3RNZXNzYWdlKHsgaWQ6IGUuZGF0YS5pZCB9KTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfSk7DQogICAgfTsKCn0pKCk7Cgo=', null, false);\n/* eslint-enable */\n\nexport { WorkerFactory as default };\n","import { createBase64WorkerFactory as createBase64WorkerFactory$1 } from './_rollup-plugin-web-worker-loader__helper__node__createBase64WorkerFactory.js';\nimport { createBase64WorkerFactory as createBase64WorkerFactory$2 } from './_rollup-plugin-web-worker-loader__helper__browser__createBase64WorkerFactory.js';\nimport { isNodeJS } from './_rollup-plugin-web-worker-loader__helper__auto__isNodeJS.js';\n\nfunction createBase64WorkerFactory(base64, sourcemapArg, enableUnicodeArg) {\n if (isNodeJS()) {\n return createBase64WorkerFactory$1(base64, sourcemapArg, enableUnicodeArg);\n }\n return createBase64WorkerFactory$2(base64, sourcemapArg, enableUnicodeArg);\n}\n\nexport { createBase64WorkerFactory };\n","import { __rest, __awaiter } from './../../../../../../ext/tslib/tslib.es6.js';\nimport { isBlocked } from '../../../utils.js';\nimport { CanvasContext } from '../../../../../types/dist/types.js';\nimport initCanvas2DMutationObserver from './2d.js';\nimport initCanvasContextObserver from './canvas.js';\nimport initCanvasWebGLMutationObserver from './webgl.js';\nimport WorkerFactory from '../../../../../../_virtual/image-bitmap-data-url-worker.js';\n\nclass CanvasManager {\r\n constructor(options) {\r\n this.pendingCanvasMutations = new Map();\r\n this.rafStamps = { latestId: 0, invokeId: null };\r\n this.frozen = false;\r\n this.locked = false;\r\n this.processMutation = (target, mutation) => {\r\n const newFrame = this.rafStamps.invokeId &&\r\n this.rafStamps.latestId !== this.rafStamps.invokeId;\r\n if (newFrame || !this.rafStamps.invokeId)\r\n this.rafStamps.invokeId = this.rafStamps.latestId;\r\n if (!this.pendingCanvasMutations.has(target)) {\r\n this.pendingCanvasMutations.set(target, []);\r\n }\r\n this.pendingCanvasMutations.get(target).push(mutation);\r\n };\r\n const { sampling = 'all', win, blockClass, blockSelector, recordCanvas, dataURLOptions, } = options;\r\n this.mutationCb = options.mutationCb;\r\n this.mirror = options.mirror;\r\n if (recordCanvas && sampling === 'all')\r\n this.initCanvasMutationObserver(win, blockClass, blockSelector);\r\n if (recordCanvas && typeof sampling === 'number')\r\n this.initCanvasFPSObserver(sampling, win, blockClass, blockSelector, {\r\n dataURLOptions,\r\n });\r\n }\r\n reset() {\r\n this.pendingCanvasMutations.clear();\r\n this.resetObservers && this.resetObservers();\r\n }\r\n freeze() {\r\n this.frozen = true;\r\n }\r\n unfreeze() {\r\n this.frozen = false;\r\n }\r\n lock() {\r\n this.locked = true;\r\n }\r\n unlock() {\r\n this.locked = false;\r\n }\r\n initCanvasFPSObserver(fps, win, blockClass, blockSelector, options) {\r\n const canvasContextReset = initCanvasContextObserver(win, blockClass, blockSelector);\r\n const snapshotInProgressMap = new Map();\r\n const worker = new WorkerFactory();\r\n worker.onmessage = (e) => {\r\n const { id } = e.data;\r\n snapshotInProgressMap.set(id, false);\r\n if (!('base64' in e.data))\r\n return;\r\n const { base64, type, width, height } = e.data;\r\n this.mutationCb({\r\n id,\r\n type: CanvasContext['2D'],\r\n commands: [\r\n {\r\n property: 'clearRect',\r\n args: [0, 0, width, height],\r\n },\r\n {\r\n property: 'drawImage',\r\n args: [\r\n {\r\n rr_type: 'ImageBitmap',\r\n args: [\r\n {\r\n rr_type: 'Blob',\r\n data: [{ rr_type: 'ArrayBuffer', base64 }],\r\n type,\r\n },\r\n ],\r\n },\r\n 0,\r\n 0,\r\n ],\r\n },\r\n ],\r\n });\r\n };\r\n const timeBetweenSnapshots = 1000 / fps;\r\n let lastSnapshotTime = 0;\r\n let rafId;\r\n const getCanvas = () => {\r\n const matchedCanvas = [];\r\n win.document.querySelectorAll('canvas').forEach((canvas) => {\r\n if (!isBlocked(canvas, blockClass, blockSelector, true)) {\r\n matchedCanvas.push(canvas);\r\n }\r\n });\r\n return matchedCanvas;\r\n };\r\n const takeCanvasSnapshots = (timestamp) => {\r\n if (lastSnapshotTime &&\r\n timestamp - lastSnapshotTime < timeBetweenSnapshots) {\r\n rafId = requestAnimationFrame(takeCanvasSnapshots);\r\n return;\r\n }\r\n lastSnapshotTime = timestamp;\r\n getCanvas()\r\n .forEach((canvas) => __awaiter(this, void 0, void 0, function* () {\r\n var _a;\r\n const id = this.mirror.getId(canvas);\r\n if (snapshotInProgressMap.get(id))\r\n return;\r\n snapshotInProgressMap.set(id, true);\r\n if (['webgl', 'webgl2'].includes(canvas.__context)) {\r\n const context = canvas.getContext(canvas.__context);\r\n if (((_a = context === null || context === void 0 ? void 0 : context.getContextAttributes()) === null || _a === void 0 ? void 0 : _a.preserveDrawingBuffer) === false) {\r\n context === null || context === void 0 ? void 0 : context.clear(context.COLOR_BUFFER_BIT);\r\n }\r\n }\r\n const bitmap = yield createImageBitmap(canvas);\r\n worker.postMessage({\r\n id,\r\n bitmap,\r\n width: canvas.width,\r\n height: canvas.height,\r\n dataURLOptions: options.dataURLOptions,\r\n }, [bitmap]);\r\n }));\r\n rafId = requestAnimationFrame(takeCanvasSnapshots);\r\n };\r\n rafId = requestAnimationFrame(takeCanvasSnapshots);\r\n this.resetObservers = () => {\r\n canvasContextReset();\r\n cancelAnimationFrame(rafId);\r\n };\r\n }\r\n initCanvasMutationObserver(win, blockClass, blockSelector) {\r\n this.startRAFTimestamping();\r\n this.startPendingCanvasMutationFlusher();\r\n const canvasContextReset = initCanvasContextObserver(win, blockClass, blockSelector);\r\n const canvas2DReset = initCanvas2DMutationObserver(this.processMutation.bind(this), win, blockClass, blockSelector);\r\n const canvasWebGL1and2Reset = initCanvasWebGLMutationObserver(this.processMutation.bind(this), win, blockClass, blockSelector, this.mirror);\r\n this.resetObservers = () => {\r\n canvasContextReset();\r\n canvas2DReset();\r\n canvasWebGL1and2Reset();\r\n };\r\n }\r\n startPendingCanvasMutationFlusher() {\r\n requestAnimationFrame(() => this.flushPendingCanvasMutations());\r\n }\r\n startRAFTimestamping() {\r\n const setLatestRAFTimestamp = (timestamp) => {\r\n this.rafStamps.latestId = timestamp;\r\n requestAnimationFrame(setLatestRAFTimestamp);\r\n };\r\n requestAnimationFrame(setLatestRAFTimestamp);\r\n }\r\n flushPendingCanvasMutations() {\r\n this.pendingCanvasMutations.forEach((values, canvas) => {\r\n const id = this.mirror.getId(canvas);\r\n this.flushPendingCanvasMutationFor(canvas, id);\r\n });\r\n requestAnimationFrame(() => this.flushPendingCanvasMutations());\r\n }\r\n flushPendingCanvasMutationFor(canvas, id) {\r\n if (this.frozen || this.locked) {\r\n return;\r\n }\r\n const valuesWithType = this.pendingCanvasMutations.get(canvas);\r\n if (!valuesWithType || id === -1)\r\n return;\r\n const values = valuesWithType.map((value) => {\r\n const rest = __rest(value, [\"type\"]);\r\n return rest;\r\n });\r\n const { type } = valuesWithType[0];\r\n this.mutationCb({ id, type, commands: values });\r\n this.pendingCanvasMutations.delete(canvas);\r\n }\r\n}\n\nexport { CanvasManager };\n","import { CanvasContext } from '../../../../../types/dist/types.js';\nimport { patch, isBlocked, hookSetter } from '../../../utils.js';\nimport { serializeArgs } from './serialize-args.js';\n\nfunction initCanvas2DMutationObserver(cb, win, blockClass, blockSelector) {\r\n const handlers = [];\r\n const props2D = Object.getOwnPropertyNames(win.CanvasRenderingContext2D.prototype);\r\n for (const prop of props2D) {\r\n try {\r\n if (typeof win.CanvasRenderingContext2D.prototype[prop] !== 'function') {\r\n continue;\r\n }\r\n const restoreHandler = patch(win.CanvasRenderingContext2D.prototype, prop, function (original) {\r\n return function (...args) {\r\n if (!isBlocked(this.canvas, blockClass, blockSelector, true)) {\r\n setTimeout(() => {\r\n const recordArgs = serializeArgs([...args], win, this);\r\n cb(this.canvas, {\r\n type: CanvasContext['2D'],\r\n property: prop,\r\n args: recordArgs,\r\n });\r\n }, 0);\r\n }\r\n return original.apply(this, args);\r\n };\r\n });\r\n handlers.push(restoreHandler);\r\n }\r\n catch (_a) {\r\n const hookHandler = hookSetter(win.CanvasRenderingContext2D.prototype, prop, {\r\n set(v) {\r\n cb(this.canvas, {\r\n type: CanvasContext['2D'],\r\n property: prop,\r\n args: [v],\r\n setter: true,\r\n });\r\n },\r\n });\r\n handlers.push(hookHandler);\r\n }\r\n }\r\n return () => {\r\n handlers.forEach((h) => h());\r\n };\r\n}\n\nexport { initCanvas2DMutationObserver as default };\n","import { getCssRuleString } from '../../../rrweb-snapshot/es/rrweb-snapshot.js';\nimport { StyleSheetMirror } from '../utils.js';\n\nclass StylesheetManager {\r\n constructor(options) {\r\n this.trackedLinkElements = new WeakSet();\r\n this.styleMirror = new StyleSheetMirror();\r\n this.mutationCb = options.mutationCb;\r\n this.adoptedStyleSheetCb = options.adoptedStyleSheetCb;\r\n }\r\n attachLinkElement(linkEl, childSn) {\r\n if ('_cssText' in childSn.attributes)\r\n this.mutationCb({\r\n adds: [],\r\n removes: [],\r\n texts: [],\r\n attributes: [\r\n {\r\n id: childSn.id,\r\n attributes: childSn\r\n .attributes,\r\n },\r\n ],\r\n });\r\n this.trackLinkElement(linkEl);\r\n }\r\n trackLinkElement(linkEl) {\r\n if (this.trackedLinkElements.has(linkEl))\r\n return;\r\n this.trackedLinkElements.add(linkEl);\r\n this.trackStylesheetInLinkElement(linkEl);\r\n }\r\n adoptStyleSheets(sheets, hostId) {\r\n if (sheets.length === 0)\r\n return;\r\n const adoptedStyleSheetData = {\r\n id: hostId,\r\n styleIds: [],\r\n };\r\n const styles = [];\r\n for (const sheet of sheets) {\r\n let styleId;\r\n if (!this.styleMirror.has(sheet)) {\r\n styleId = this.styleMirror.add(sheet);\r\n const rules = Array.from(sheet.rules || CSSRule);\r\n styles.push({\r\n styleId,\r\n rules: rules.map((r, index) => {\r\n return {\r\n rule: getCssRuleString(r),\r\n index,\r\n };\r\n }),\r\n });\r\n }\r\n else\r\n styleId = this.styleMirror.getId(sheet);\r\n adoptedStyleSheetData.styleIds.push(styleId);\r\n }\r\n if (styles.length > 0)\r\n adoptedStyleSheetData.styles = styles;\r\n this.adoptedStyleSheetCb(adoptedStyleSheetData);\r\n }\r\n reset() {\r\n this.styleMirror.reset();\r\n this.trackedLinkElements = new WeakSet();\r\n }\r\n trackStylesheetInLinkElement(linkEl) {\r\n }\r\n}\n\nexport { StylesheetManager };\n","import { createMirror, snapshot } from '../../../rrweb-snapshot/es/rrweb-snapshot.js';\nimport { initObservers, mutationBuffers } from './observer.js';\nimport { polyfill, on, getWindowWidth, getWindowHeight, isSerializedIframe, isSerializedStylesheet, hasShadowRoot } from '../utils.js';\nimport { EventType, IncrementalSource } from '../../../types/dist/types.js';\nimport { IframeManager } from './iframe-manager.js';\nimport { ShadowDomManager } from './shadow-dom-manager.js';\nimport { CanvasManager } from './observers/canvas/canvas-manager.js';\nimport { StylesheetManager } from './stylesheet-manager.js';\n\nfunction wrapEvent(e) {\r\n return Object.assign(Object.assign({}, e), { timestamp: Date.now() });\r\n}\r\nlet wrappedEmit;\r\nlet takeFullSnapshot;\r\nlet canvasManager;\r\nlet recording = false;\r\nconst mirror = createMirror();\r\nfunction record(options = {}) {\r\n const { emit, checkoutEveryNms, checkoutEveryNth, blockClass = 'rr-block', blockSelector = null, ignoreClass = 'rr-ignore', maskTextClass = 'rr-mask', maskTextSelector = null, inlineStylesheet = true, maskAllInputs, maskInputOptions: _maskInputOptions, slimDOMOptions: _slimDOMOptions, maskInputFn, maskTextFn, hooks, packFn, sampling = {}, dataURLOptions = {}, mousemoveWait, recordCanvas = false, recordCrossOriginIframes = false, userTriggeredOnInput = false, collectFonts = false, inlineImages = false, plugins, keepIframeSrcFn = () => false, ignoreCSSAttributes = new Set([]), } = options;\r\n const inEmittingFrame = recordCrossOriginIframes\r\n ? window.parent === window\r\n : true;\r\n let passEmitsToParent = false;\r\n if (!inEmittingFrame) {\r\n try {\r\n window.parent.document;\r\n passEmitsToParent = false;\r\n }\r\n catch (e) {\r\n passEmitsToParent = true;\r\n }\r\n }\r\n if (inEmittingFrame && !emit) {\r\n throw new Error('emit function is required');\r\n }\r\n if (mousemoveWait !== undefined && sampling.mousemove === undefined) {\r\n sampling.mousemove = mousemoveWait;\r\n }\r\n mirror.reset();\r\n const maskInputOptions = maskAllInputs === true\r\n ? {\r\n color: true,\r\n date: true,\r\n 'datetime-local': true,\r\n email: true,\r\n month: true,\r\n number: true,\r\n range: true,\r\n search: true,\r\n tel: true,\r\n text: true,\r\n time: true,\r\n url: true,\r\n week: true,\r\n textarea: true,\r\n select: true,\r\n password: true,\r\n }\r\n : _maskInputOptions !== undefined\r\n ? _maskInputOptions\r\n : { password: true };\r\n const slimDOMOptions = _slimDOMOptions === true || _slimDOMOptions === 'all'\r\n ? {\r\n script: true,\r\n comment: true,\r\n headFavicon: true,\r\n headWhitespace: true,\r\n headMetaSocial: true,\r\n headMetaRobots: true,\r\n headMetaHttpEquiv: true,\r\n headMetaVerification: true,\r\n headMetaAuthorship: _slimDOMOptions === 'all',\r\n headMetaDescKeywords: _slimDOMOptions === 'all',\r\n }\r\n : _slimDOMOptions\r\n ? _slimDOMOptions\r\n : {};\r\n polyfill();\r\n let lastFullSnapshotEvent;\r\n let incrementalSnapshotCount = 0;\r\n const eventProcessor = (e) => {\r\n for (const plugin of plugins || []) {\r\n if (plugin.eventProcessor) {\r\n e = plugin.eventProcessor(e);\r\n }\r\n }\r\n if (packFn) {\r\n e = packFn(e);\r\n }\r\n return e;\r\n };\r\n wrappedEmit = (e, isCheckout) => {\r\n var _a;\r\n if (((_a = mutationBuffers[0]) === null || _a === void 0 ? void 0 : _a.isFrozen()) &&\r\n e.type !== EventType.FullSnapshot &&\r\n !(e.type === EventType.IncrementalSnapshot &&\r\n e.data.source === IncrementalSource.Mutation)) {\r\n mutationBuffers.forEach((buf) => buf.unfreeze());\r\n }\r\n if (inEmittingFrame) {\r\n emit === null || emit === void 0 ? void 0 : emit(eventProcessor(e), isCheckout);\r\n }\r\n else if (passEmitsToParent) {\r\n const message = {\r\n type: 'rrweb',\r\n event: eventProcessor(e),\r\n isCheckout,\r\n };\r\n window.parent.postMessage(message, '*');\r\n }\r\n if (e.type === EventType.FullSnapshot) {\r\n lastFullSnapshotEvent = e;\r\n incrementalSnapshotCount = 0;\r\n }\r\n else if (e.type === EventType.IncrementalSnapshot) {\r\n if (e.data.source === IncrementalSource.Mutation &&\r\n e.data.isAttachIframe) {\r\n return;\r\n }\r\n incrementalSnapshotCount++;\r\n const exceedCount = checkoutEveryNth && incrementalSnapshotCount >= checkoutEveryNth;\r\n const exceedTime = checkoutEveryNms &&\r\n e.timestamp - lastFullSnapshotEvent.timestamp > checkoutEveryNms;\r\n if (exceedCount || exceedTime) {\r\n takeFullSnapshot(true);\r\n }\r\n }\r\n };\r\n const wrappedMutationEmit = (m) => {\r\n wrappedEmit(wrapEvent({\r\n type: EventType.IncrementalSnapshot,\r\n data: Object.assign({ source: IncrementalSource.Mutation }, m),\r\n }));\r\n };\r\n const wrappedScrollEmit = (p) => wrappedEmit(wrapEvent({\r\n type: EventType.IncrementalSnapshot,\r\n data: Object.assign({ source: IncrementalSource.Scroll }, p),\r\n }));\r\n const wrappedCanvasMutationEmit = (p) => wrappedEmit(wrapEvent({\r\n type: EventType.IncrementalSnapshot,\r\n data: Object.assign({ source: IncrementalSource.CanvasMutation }, p),\r\n }));\r\n const wrappedAdoptedStyleSheetEmit = (a) => wrappedEmit(wrapEvent({\r\n type: EventType.IncrementalSnapshot,\r\n data: Object.assign({ source: IncrementalSource.AdoptedStyleSheet }, a),\r\n }));\r\n const stylesheetManager = new StylesheetManager({\r\n mutationCb: wrappedMutationEmit,\r\n adoptedStyleSheetCb: wrappedAdoptedStyleSheetEmit,\r\n });\r\n const iframeManager = new IframeManager({\r\n mirror,\r\n mutationCb: wrappedMutationEmit,\r\n stylesheetManager: stylesheetManager,\r\n recordCrossOriginIframes,\r\n wrappedEmit,\r\n });\r\n for (const plugin of plugins || []) {\r\n if (plugin.getMirror)\r\n plugin.getMirror({\r\n nodeMirror: mirror,\r\n crossOriginIframeMirror: iframeManager.crossOriginIframeMirror,\r\n crossOriginIframeStyleMirror: iframeManager.crossOriginIframeStyleMirror,\r\n });\r\n }\r\n canvasManager = new CanvasManager({\r\n recordCanvas,\r\n mutationCb: wrappedCanvasMutationEmit,\r\n win: window,\r\n blockClass,\r\n blockSelector,\r\n mirror,\r\n sampling: sampling.canvas,\r\n dataURLOptions,\r\n });\r\n const shadowDomManager = new ShadowDomManager({\r\n mutationCb: wrappedMutationEmit,\r\n scrollCb: wrappedScrollEmit,\r\n bypassOptions: {\r\n blockClass,\r\n blockSelector,\r\n maskTextClass,\r\n maskTextSelector,\r\n inlineStylesheet,\r\n maskInputOptions,\r\n dataURLOptions,\r\n maskTextFn,\r\n maskInputFn,\r\n recordCanvas,\r\n inlineImages,\r\n sampling,\r\n slimDOMOptions,\r\n iframeManager,\r\n stylesheetManager,\r\n canvasManager,\r\n keepIframeSrcFn,\r\n },\r\n mirror,\r\n });\r\n takeFullSnapshot = (isCheckout = false) => {\r\n var _a, _b, _c, _d, _e, _f;\r\n wrappedEmit(wrapEvent({\r\n type: EventType.Meta,\r\n data: {\r\n href: window.location.href,\r\n width: getWindowWidth(),\r\n height: getWindowHeight(),\r\n },\r\n }), isCheckout);\r\n stylesheetManager.reset();\r\n mutationBuffers.forEach((buf) => buf.lock());\r\n const node = snapshot(document, {\r\n mirror,\r\n blockClass,\r\n blockSelector,\r\n maskTextClass,\r\n maskTextSelector,\r\n inlineStylesheet,\r\n maskAllInputs: maskInputOptions,\r\n maskTextFn,\r\n slimDOM: slimDOMOptions,\r\n dataURLOptions,\r\n recordCanvas,\r\n inlineImages,\r\n onSerialize: (n) => {\r\n if (isSerializedIframe(n, mirror)) {\r\n iframeManager.addIframe(n);\r\n }\r\n if (isSerializedStylesheet(n, mirror)) {\r\n stylesheetManager.trackLinkElement(n);\r\n }\r\n if (hasShadowRoot(n)) {\r\n shadowDomManager.addShadowRoot(n.shadowRoot, document);\r\n }\r\n },\r\n onIframeLoad: (iframe, childSn) => {\r\n iframeManager.attachIframe(iframe, childSn);\r\n shadowDomManager.observeAttachShadow(iframe);\r\n },\r\n onStylesheetLoad: (linkEl, childSn) => {\r\n stylesheetManager.attachLinkElement(linkEl, childSn);\r\n },\r\n keepIframeSrcFn,\r\n });\r\n if (!node) {\r\n return console.warn('Failed to snapshot the document');\r\n }\r\n wrappedEmit(wrapEvent({\r\n type: EventType.FullSnapshot,\r\n data: {\r\n node,\r\n initialOffset: {\r\n left: window.pageXOffset !== undefined\r\n ? window.pageXOffset\r\n : (document === null || document === void 0 ? void 0 : document.documentElement.scrollLeft) ||\r\n ((_b = (_a = document === null || document === void 0 ? void 0 : document.body) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.scrollLeft) ||\r\n ((_c = document === null || document === void 0 ? void 0 : document.body) === null || _c === void 0 ? void 0 : _c.scrollLeft) ||\r\n 0,\r\n top: window.pageYOffset !== undefined\r\n ? window.pageYOffset\r\n : (document === null || document === void 0 ? void 0 : document.documentElement.scrollTop) ||\r\n ((_e = (_d = document === null || document === void 0 ? void 0 : document.body) === null || _d === void 0 ? void 0 : _d.parentElement) === null || _e === void 0 ? void 0 : _e.scrollTop) ||\r\n ((_f = document === null || document === void 0 ? void 0 : document.body) === null || _f === void 0 ? void 0 : _f.scrollTop) ||\r\n 0,\r\n },\r\n },\r\n }));\r\n mutationBuffers.forEach((buf) => buf.unlock());\r\n if (document.adoptedStyleSheets && document.adoptedStyleSheets.length > 0)\r\n stylesheetManager.adoptStyleSheets(document.adoptedStyleSheets, mirror.getId(document));\r\n };\r\n try {\r\n const handlers = [];\r\n handlers.push(on('DOMContentLoaded', () => {\r\n wrappedEmit(wrapEvent({\r\n type: EventType.DomContentLoaded,\r\n data: {},\r\n }));\r\n }));\r\n const observe = (doc) => {\r\n var _a;\r\n return initObservers({\r\n mutationCb: wrappedMutationEmit,\r\n mousemoveCb: (positions, source) => wrappedEmit(wrapEvent({\r\n type: EventType.IncrementalSnapshot,\r\n data: {\r\n source,\r\n positions,\r\n },\r\n })),\r\n mouseInteractionCb: (d) => wrappedEmit(wrapEvent({\r\n type: EventType.IncrementalSnapshot,\r\n data: Object.assign({ source: IncrementalSource.MouseInteraction }, d),\r\n })),\r\n scrollCb: wrappedScrollEmit,\r\n viewportResizeCb: (d) => wrappedEmit(wrapEvent({\r\n type: EventType.IncrementalSnapshot,\r\n data: Object.assign({ source: IncrementalSource.ViewportResize }, d),\r\n })),\r\n inputCb: (v) => wrappedEmit(wrapEvent({\r\n type: EventType.IncrementalSnapshot,\r\n data: Object.assign({ source: IncrementalSource.Input }, v),\r\n })),\r\n mediaInteractionCb: (p) => wrappedEmit(wrapEvent({\r\n type: EventType.IncrementalSnapshot,\r\n data: Object.assign({ source: IncrementalSource.MediaInteraction }, p),\r\n })),\r\n styleSheetRuleCb: (r) => wrappedEmit(wrapEvent({\r\n type: EventType.IncrementalSnapshot,\r\n data: Object.assign({ source: IncrementalSource.StyleSheetRule }, r),\r\n })),\r\n styleDeclarationCb: (r) => wrappedEmit(wrapEvent({\r\n type: EventType.IncrementalSnapshot,\r\n data: Object.assign({ source: IncrementalSource.StyleDeclaration }, r),\r\n })),\r\n canvasMutationCb: wrappedCanvasMutationEmit,\r\n fontCb: (p) => wrappedEmit(wrapEvent({\r\n type: EventType.IncrementalSnapshot,\r\n data: Object.assign({ source: IncrementalSource.Font }, p),\r\n })),\r\n selectionCb: (p) => {\r\n wrappedEmit(wrapEvent({\r\n type: EventType.IncrementalSnapshot,\r\n data: Object.assign({ source: IncrementalSource.Selection }, p),\r\n }));\r\n },\r\n blockClass,\r\n ignoreClass,\r\n maskTextClass,\r\n maskTextSelector,\r\n maskInputOptions,\r\n inlineStylesheet,\r\n sampling,\r\n recordCanvas,\r\n inlineImages,\r\n userTriggeredOnInput,\r\n collectFonts,\r\n doc,\r\n maskInputFn,\r\n maskTextFn,\r\n keepIframeSrcFn,\r\n blockSelector,\r\n slimDOMOptions,\r\n dataURLOptions,\r\n mirror,\r\n iframeManager,\r\n stylesheetManager,\r\n shadowDomManager,\r\n canvasManager,\r\n ignoreCSSAttributes,\r\n plugins: ((_a = plugins === null || plugins === void 0 ? void 0 : plugins.filter((p) => p.observer)) === null || _a === void 0 ? void 0 : _a.map((p) => ({\r\n observer: p.observer,\r\n options: p.options,\r\n callback: (payload) => wrappedEmit(wrapEvent({\r\n type: EventType.Plugin,\r\n data: {\r\n plugin: p.name,\r\n payload,\r\n },\r\n })),\r\n }))) || [],\r\n }, hooks);\r\n };\r\n iframeManager.addLoadListener((iframeEl) => {\r\n handlers.push(observe(iframeEl.contentDocument));\r\n });\r\n const init = () => {\r\n takeFullSnapshot();\r\n handlers.push(observe(document));\r\n recording = true;\r\n };\r\n if (document.readyState === 'interactive' ||\r\n document.readyState === 'complete') {\r\n init();\r\n }\r\n else {\r\n handlers.push(on('load', () => {\r\n wrappedEmit(wrapEvent({\r\n type: EventType.Load,\r\n data: {},\r\n }));\r\n init();\r\n }, window));\r\n }\r\n return () => {\r\n handlers.forEach((h) => h());\r\n recording = false;\r\n };\r\n }\r\n catch (error) {\r\n console.warn(error);\r\n }\r\n}\r\nrecord.addCustomEvent = (tag, payload) => {\r\n if (!recording) {\r\n throw new Error('please add custom event after start recording');\r\n }\r\n wrappedEmit(wrapEvent({\r\n type: EventType.Custom,\r\n data: {\r\n tag,\r\n payload,\r\n },\r\n }));\r\n};\r\nrecord.freezePage = () => {\r\n mutationBuffers.forEach((buf) => buf.freeze());\r\n};\r\nrecord.takeFullSnapshot = (isCheckout) => {\r\n if (!recording) {\r\n throw new Error('please take full snapshot after start recording');\r\n }\r\n takeFullSnapshot(isCheckout);\r\n};\r\nrecord.mirror = mirror;\n\nexport { record as default };\n","import { getRecordConsolePlugin } from \"@rrweb/rrweb-plugin-console-record\";\nimport { MonoscopeConfig } from \"./types\";\nimport * as rrweb from \"rrweb\";\n\nexport class MonoscopeReplay {\n events: any[] = [];\n config: MonoscopeConfig;\n sessionId: string;\n constructor(config: MonoscopeConfig, sessionId: string) {\n this.sessionId = sessionId;\n this.config = config;\n this.save = this.save.bind(this);\n this.events = [];\n this.configure = this.configure.bind(this);\n\n window.addEventListener(\"unload\", () => this.save());\n }\n\n configure() {\n rrweb.record({\n emit: (event) => {\n this.events.push(event);\n },\n plugins: [\n getRecordConsolePlugin({\n level: [\"info\", \"log\", \"warn\", \"error\"],\n lengthThreshold: 10000,\n stringifyOptions: {\n stringLengthLimit: 1000,\n numOfKeysLimit: 100,\n depthOfLimit: 1,\n },\n }),\n ],\n });\n setInterval(this.save, 15 * 1000);\n }\n\n save() {\n if (this.events.length === 0) return;\n let { replayEventsBaseUrl, projectId } = this.config;\n if (!replayEventsBaseUrl) {\n replayEventsBaseUrl = `https://app.apitoolkit.io/rrweb/${projectId}`;\n } else {\n replayEventsBaseUrl = `${replayEventsBaseUrl}/rrweb/${projectId}`;\n }\n const events = this.events;\n this.events = [];\n const body = JSON.stringify({\n events,\n sessionId: this.sessionId,\n timestamp: new Date().toISOString(),\n });\n fetch(replayEventsBaseUrl, {\n mode: \"no-cors\",\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n },\n body,\n }).catch((error) => {\n console.error(\"Failed to save replay events:\", error);\n this.events = [...events, ...this.events];\n });\n }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexport var _globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// this is autogenerated file, see scripts/version-update.js\nexport var VERSION = '1.9.0';\n//# sourceMappingURL=version.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { VERSION } from '../version';\nvar re = /^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;\n/**\n * Create a function to test an API version to see if it is compatible with the provided ownVersion.\n *\n * The returned function has the following semantics:\n * - Exact match is always compatible\n * - Major versions must match exactly\n * - 1.x package cannot use global 2.x package\n * - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param ownVersion version which should be checked against\n */\nexport function _makeCompatibilityCheck(ownVersion) {\n var acceptedVersions = new Set([ownVersion]);\n var rejectedVersions = new Set();\n var myVersionMatch = ownVersion.match(re);\n if (!myVersionMatch) {\n // we cannot guarantee compatibility so we always return noop\n return function () { return false; };\n }\n var ownVersionParsed = {\n major: +myVersionMatch[1],\n minor: +myVersionMatch[2],\n patch: +myVersionMatch[3],\n prerelease: myVersionMatch[4],\n };\n // if ownVersion has a prerelease tag, versions must match exactly\n if (ownVersionParsed.prerelease != null) {\n return function isExactmatch(globalVersion) {\n return globalVersion === ownVersion;\n };\n }\n function _reject(v) {\n rejectedVersions.add(v);\n return false;\n }\n function _accept(v) {\n acceptedVersions.add(v);\n return true;\n }\n return function isCompatible(globalVersion) {\n if (acceptedVersions.has(globalVersion)) {\n return true;\n }\n if (rejectedVersions.has(globalVersion)) {\n return false;\n }\n var globalVersionMatch = globalVersion.match(re);\n if (!globalVersionMatch) {\n // cannot parse other version\n // we cannot guarantee compatibility so we always noop\n return _reject(globalVersion);\n }\n var globalVersionParsed = {\n major: +globalVersionMatch[1],\n minor: +globalVersionMatch[2],\n patch: +globalVersionMatch[3],\n prerelease: globalVersionMatch[4],\n };\n // if globalVersion has a prerelease tag, versions must match exactly\n if (globalVersionParsed.prerelease != null) {\n return _reject(globalVersion);\n }\n // major versions must match\n if (ownVersionParsed.major !== globalVersionParsed.major) {\n return _reject(globalVersion);\n }\n if (ownVersionParsed.major === 0) {\n if (ownVersionParsed.minor === globalVersionParsed.minor &&\n ownVersionParsed.patch <= globalVersionParsed.patch) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\n }\n if (ownVersionParsed.minor <= globalVersionParsed.minor) {\n return _accept(globalVersion);\n }\n return _reject(globalVersion);\n };\n}\n/**\n * Test an API version to see if it is compatible with this API.\n *\n * - Exact match is always compatible\n * - Major versions must match exactly\n * - 1.x package cannot use global 2.x package\n * - 2.x package cannot use global 1.x package\n * - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n * - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n * - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n * - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n * - Patch and build tag differences are not considered at this time\n *\n * @param version version of the API requesting an instance of the global API\n */\nexport var isCompatible = _makeCompatibilityCheck(VERSION);\n//# sourceMappingURL=semver.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { _globalThis } from '../platform';\nimport { VERSION } from '../version';\nimport { isCompatible } from './semver';\nvar major = VERSION.split('.')[0];\nvar GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(\"opentelemetry.js.api.\" + major);\nvar _global = _globalThis;\nexport function registerGlobal(type, instance, diag, allowOverride) {\n var _a;\n if (allowOverride === void 0) { allowOverride = false; }\n var api = (_global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : {\n version: VERSION,\n });\n if (!allowOverride && api[type]) {\n // already registered an API of this type\n var err = new Error(\"@opentelemetry/api: Attempted duplicate registration of API: \" + type);\n diag.error(err.stack || err.message);\n return false;\n }\n if (api.version !== VERSION) {\n // All registered APIs must be of the same version exactly\n var err = new Error(\"@opentelemetry/api: Registration of version v\" + api.version + \" for \" + type + \" does not match previously registered API v\" + VERSION);\n diag.error(err.stack || err.message);\n return false;\n }\n api[type] = instance;\n diag.debug(\"@opentelemetry/api: Registered a global for \" + type + \" v\" + VERSION + \".\");\n return true;\n}\nexport function getGlobal(type) {\n var _a, _b;\n var globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;\n if (!globalVersion || !isCompatible(globalVersion)) {\n return;\n }\n return (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];\n}\nexport function unregisterGlobal(type, diag) {\n diag.debug(\"@opentelemetry/api: Unregistering a global for \" + type + \" v\" + VERSION + \".\");\n var api = _global[GLOBAL_OPENTELEMETRY_API_KEY];\n if (api) {\n delete api[type];\n }\n}\n//# sourceMappingURL=global-utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { getGlobal } from '../internal/global-utils';\n/**\n * Component Logger which is meant to be used as part of any component which\n * will add automatically additional namespace in front of the log message.\n * It will then forward all message to global diag logger\n * @example\n * const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });\n * cLogger.debug('test');\n * // @opentelemetry/instrumentation-http test\n */\nvar DiagComponentLogger = /** @class */ (function () {\n function DiagComponentLogger(props) {\n this._namespace = props.namespace || 'DiagComponentLogger';\n }\n DiagComponentLogger.prototype.debug = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('debug', this._namespace, args);\n };\n DiagComponentLogger.prototype.error = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('error', this._namespace, args);\n };\n DiagComponentLogger.prototype.info = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('info', this._namespace, args);\n };\n DiagComponentLogger.prototype.warn = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('warn', this._namespace, args);\n };\n DiagComponentLogger.prototype.verbose = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return logProxy('verbose', this._namespace, args);\n };\n return DiagComponentLogger;\n}());\nexport { DiagComponentLogger };\nfunction logProxy(funcName, namespace, args) {\n var logger = getGlobal('diag');\n // shortcut if logger not set\n if (!logger) {\n return;\n }\n args.unshift(namespace);\n return logger[funcName].apply(logger, __spreadArray([], __read(args), false));\n}\n//# sourceMappingURL=ComponentLogger.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Defines the available internal logging levels for the diagnostic logger, the numeric values\n * of the levels are defined to match the original values from the initial LogLevel to avoid\n * compatibility/migration issues for any implementation that assume the numeric ordering.\n */\nexport var DiagLogLevel;\n(function (DiagLogLevel) {\n /** Diagnostic Logging level setting to disable all logging (except and forced logs) */\n DiagLogLevel[DiagLogLevel[\"NONE\"] = 0] = \"NONE\";\n /** Identifies an error scenario */\n DiagLogLevel[DiagLogLevel[\"ERROR\"] = 30] = \"ERROR\";\n /** Identifies a warning scenario */\n DiagLogLevel[DiagLogLevel[\"WARN\"] = 50] = \"WARN\";\n /** General informational log message */\n DiagLogLevel[DiagLogLevel[\"INFO\"] = 60] = \"INFO\";\n /** General debug log message */\n DiagLogLevel[DiagLogLevel[\"DEBUG\"] = 70] = \"DEBUG\";\n /**\n * Detailed trace level logging should only be used for development, should only be set\n * in a development environment.\n */\n DiagLogLevel[DiagLogLevel[\"VERBOSE\"] = 80] = \"VERBOSE\";\n /** Used to set the logging level to include all logging */\n DiagLogLevel[DiagLogLevel[\"ALL\"] = 9999] = \"ALL\";\n})(DiagLogLevel || (DiagLogLevel = {}));\n//# sourceMappingURL=types.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { DiagComponentLogger } from '../diag/ComponentLogger';\nimport { createLogLevelDiagLogger } from '../diag/internal/logLevelLogger';\nimport { DiagLogLevel, } from '../diag/types';\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nvar API_NAME = 'diag';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry internal\n * diagnostic API\n */\nvar DiagAPI = /** @class */ (function () {\n /**\n * Private internal constructor\n * @private\n */\n function DiagAPI() {\n function _logProxy(funcName) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var logger = getGlobal('diag');\n // shortcut if logger not set\n if (!logger)\n return;\n return logger[funcName].apply(logger, __spreadArray([], __read(args), false));\n };\n }\n // Using self local variable for minification purposes as 'this' cannot be minified\n var self = this;\n // DiagAPI specific functions\n var setLogger = function (logger, optionsOrLogLevel) {\n var _a, _b, _c;\n if (optionsOrLogLevel === void 0) { optionsOrLogLevel = { logLevel: DiagLogLevel.INFO }; }\n if (logger === self) {\n // There isn't much we can do here.\n // Logging to the console might break the user application.\n // Try to log to self. If a logger was previously registered it will receive the log.\n var err = new Error('Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation');\n self.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);\n return false;\n }\n if (typeof optionsOrLogLevel === 'number') {\n optionsOrLogLevel = {\n logLevel: optionsOrLogLevel,\n };\n }\n var oldLogger = getGlobal('diag');\n var newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);\n // There already is an logger registered. We'll let it know before overwriting it.\n if (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {\n var stack = (_c = new Error().stack) !== null && _c !== void 0 ? _c : '<failed to generate stacktrace>';\n oldLogger.warn(\"Current logger will be overwritten from \" + stack);\n newLogger.warn(\"Current logger will overwrite one already registered from \" + stack);\n }\n return registerGlobal('diag', newLogger, self, true);\n };\n self.setLogger = setLogger;\n self.disable = function () {\n unregisterGlobal(API_NAME, self);\n };\n self.createComponentLogger = function (options) {\n return new DiagComponentLogger(options);\n };\n self.verbose = _logProxy('verbose');\n self.debug = _logProxy('debug');\n self.info = _logProxy('info');\n self.warn = _logProxy('warn');\n self.error = _logProxy('error');\n }\n /** Get the singleton instance of the DiagAPI API */\n DiagAPI.instance = function () {\n if (!this._instance) {\n this._instance = new DiagAPI();\n }\n return this._instance;\n };\n return DiagAPI;\n}());\nexport { DiagAPI };\n//# sourceMappingURL=diag.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DiagLogLevel } from '../types';\nexport function createLogLevelDiagLogger(maxLevel, logger) {\n if (maxLevel < DiagLogLevel.NONE) {\n maxLevel = DiagLogLevel.NONE;\n }\n else if (maxLevel > DiagLogLevel.ALL) {\n maxLevel = DiagLogLevel.ALL;\n }\n // In case the logger is null or undefined\n logger = logger || {};\n function _filterFunc(funcName, theLevel) {\n var theFunc = logger[funcName];\n if (typeof theFunc === 'function' && maxLevel >= theLevel) {\n return theFunc.bind(logger);\n }\n return function () { };\n }\n return {\n error: _filterFunc('error', DiagLogLevel.ERROR),\n warn: _filterFunc('warn', DiagLogLevel.WARN),\n info: _filterFunc('info', DiagLogLevel.INFO),\n debug: _filterFunc('debug', DiagLogLevel.DEBUG),\n verbose: _filterFunc('verbose', DiagLogLevel.VERBOSE),\n };\n}\n//# sourceMappingURL=logLevelLogger.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar BaggageImpl = /** @class */ (function () {\n function BaggageImpl(entries) {\n this._entries = entries ? new Map(entries) : new Map();\n }\n BaggageImpl.prototype.getEntry = function (key) {\n var entry = this._entries.get(key);\n if (!entry) {\n return undefined;\n }\n return Object.assign({}, entry);\n };\n BaggageImpl.prototype.getAllEntries = function () {\n return Array.from(this._entries.entries()).map(function (_a) {\n var _b = __read(_a, 2), k = _b[0], v = _b[1];\n return [k, v];\n });\n };\n BaggageImpl.prototype.setEntry = function (key, entry) {\n var newBaggage = new BaggageImpl(this._entries);\n newBaggage._entries.set(key, entry);\n return newBaggage;\n };\n BaggageImpl.prototype.removeEntry = function (key) {\n var newBaggage = new BaggageImpl(this._entries);\n newBaggage._entries.delete(key);\n return newBaggage;\n };\n BaggageImpl.prototype.removeEntries = function () {\n var e_1, _a;\n var keys = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n keys[_i] = arguments[_i];\n }\n var newBaggage = new BaggageImpl(this._entries);\n try {\n for (var keys_1 = __values(keys), keys_1_1 = keys_1.next(); !keys_1_1.done; keys_1_1 = keys_1.next()) {\n var key = keys_1_1.value;\n newBaggage._entries.delete(key);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (keys_1_1 && !keys_1_1.done && (_a = keys_1.return)) _a.call(keys_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return newBaggage;\n };\n BaggageImpl.prototype.clear = function () {\n return new BaggageImpl();\n };\n return BaggageImpl;\n}());\nexport { BaggageImpl };\n//# sourceMappingURL=baggage-impl.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Symbol used to make BaggageEntryMetadata an opaque type\n */\nexport var baggageEntryMetadataSymbol = Symbol('BaggageEntryMetadata');\n//# sourceMappingURL=symbol.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { DiagAPI } from '../api/diag';\nimport { BaggageImpl } from './internal/baggage-impl';\nimport { baggageEntryMetadataSymbol } from './internal/symbol';\nvar diag = DiagAPI.instance();\n/**\n * Create a new Baggage with optional entries\n *\n * @param entries An array of baggage entries the new baggage should contain\n */\nexport function createBaggage(entries) {\n if (entries === void 0) { entries = {}; }\n return new BaggageImpl(new Map(Object.entries(entries)));\n}\n/**\n * Create a serializable BaggageEntryMetadata object from a string.\n *\n * @param str string metadata. Format is currently not defined by the spec and has no special meaning.\n *\n */\nexport function baggageEntryMetadataFromString(str) {\n if (typeof str !== 'string') {\n diag.error(\"Cannot create baggage metadata from unknown type: \" + typeof str);\n str = '';\n }\n return {\n __TYPE__: baggageEntryMetadataSymbol,\n toString: function () {\n return str;\n },\n };\n}\n//# sourceMappingURL=utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** Get a key to uniquely identify a context value */\nexport function createContextKey(description) {\n // The specification states that for the same input, multiple calls should\n // return different keys. Due to the nature of the JS dependency management\n // system, this creates problems where multiple versions of some package\n // could hold different keys for the same property.\n //\n // Therefore, we use Symbol.for which returns the same key for the same input.\n return Symbol.for(description);\n}\nvar BaseContext = /** @class */ (function () {\n /**\n * Construct a new context which inherits values from an optional parent context.\n *\n * @param parentContext a context from which to inherit values\n */\n function BaseContext(parentContext) {\n // for minification\n var self = this;\n self._currentContext = parentContext ? new Map(parentContext) : new Map();\n self.getValue = function (key) { return self._currentContext.get(key); };\n self.setValue = function (key, value) {\n var context = new BaseContext(self._currentContext);\n context._currentContext.set(key, value);\n return context;\n };\n self.deleteValue = function (key) {\n var context = new BaseContext(self._currentContext);\n context._currentContext.delete(key);\n return context;\n };\n }\n return BaseContext;\n}());\n/** The root context is used as the default parent context when there is no active context */\nexport var ROOT_CONTEXT = new BaseContext();\n//# sourceMappingURL=context.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * NoopMeter is a noop implementation of the {@link Meter} interface. It reuses\n * constant NoopMetrics for all of its methods.\n */\nvar NoopMeter = /** @class */ (function () {\n function NoopMeter() {\n }\n /**\n * @see {@link Meter.createGauge}\n */\n NoopMeter.prototype.createGauge = function (_name, _options) {\n return NOOP_GAUGE_METRIC;\n };\n /**\n * @see {@link Meter.createHistogram}\n */\n NoopMeter.prototype.createHistogram = function (_name, _options) {\n return NOOP_HISTOGRAM_METRIC;\n };\n /**\n * @see {@link Meter.createCounter}\n */\n NoopMeter.prototype.createCounter = function (_name, _options) {\n return NOOP_COUNTER_METRIC;\n };\n /**\n * @see {@link Meter.createUpDownCounter}\n */\n NoopMeter.prototype.createUpDownCounter = function (_name, _options) {\n return NOOP_UP_DOWN_COUNTER_METRIC;\n };\n /**\n * @see {@link Meter.createObservableGauge}\n */\n NoopMeter.prototype.createObservableGauge = function (_name, _options) {\n return NOOP_OBSERVABLE_GAUGE_METRIC;\n };\n /**\n * @see {@link Meter.createObservableCounter}\n */\n NoopMeter.prototype.createObservableCounter = function (_name, _options) {\n return NOOP_OBSERVABLE_COUNTER_METRIC;\n };\n /**\n * @see {@link Meter.createObservableUpDownCounter}\n */\n NoopMeter.prototype.createObservableUpDownCounter = function (_name, _options) {\n return NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC;\n };\n /**\n * @see {@link Meter.addBatchObservableCallback}\n */\n NoopMeter.prototype.addBatchObservableCallback = function (_callback, _observables) { };\n /**\n * @see {@link Meter.removeBatchObservableCallback}\n */\n NoopMeter.prototype.removeBatchObservableCallback = function (_callback) { };\n return NoopMeter;\n}());\nexport { NoopMeter };\nvar NoopMetric = /** @class */ (function () {\n function NoopMetric() {\n }\n return NoopMetric;\n}());\nexport { NoopMetric };\nvar NoopCounterMetric = /** @class */ (function (_super) {\n __extends(NoopCounterMetric, _super);\n function NoopCounterMetric() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NoopCounterMetric.prototype.add = function (_value, _attributes) { };\n return NoopCounterMetric;\n}(NoopMetric));\nexport { NoopCounterMetric };\nvar NoopUpDownCounterMetric = /** @class */ (function (_super) {\n __extends(NoopUpDownCounterMetric, _super);\n function NoopUpDownCounterMetric() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NoopUpDownCounterMetric.prototype.add = function (_value, _attributes) { };\n return NoopUpDownCounterMetric;\n}(NoopMetric));\nexport { NoopUpDownCounterMetric };\nvar NoopGaugeMetric = /** @class */ (function (_super) {\n __extends(NoopGaugeMetric, _super);\n function NoopGaugeMetric() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NoopGaugeMetric.prototype.record = function (_value, _attributes) { };\n return NoopGaugeMetric;\n}(NoopMetric));\nexport { NoopGaugeMetric };\nvar NoopHistogramMetric = /** @class */ (function (_super) {\n __extends(NoopHistogramMetric, _super);\n function NoopHistogramMetric() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n NoopHistogramMetric.prototype.record = function (_value, _attributes) { };\n return NoopHistogramMetric;\n}(NoopMetric));\nexport { NoopHistogramMetric };\nvar NoopObservableMetric = /** @class */ (function () {\n function NoopObservableMetric() {\n }\n NoopObservableMetric.prototype.addCallback = function (_callback) { };\n NoopObservableMetric.prototype.removeCallback = function (_callback) { };\n return NoopObservableMetric;\n}());\nexport { NoopObservableMetric };\nvar NoopObservableCounterMetric = /** @class */ (function (_super) {\n __extends(NoopObservableCounterMetric, _super);\n function NoopObservableCounterMetric() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return NoopObservableCounterMetric;\n}(NoopObservableMetric));\nexport { NoopObservableCounterMetric };\nvar NoopObservableGaugeMetric = /** @class */ (function (_super) {\n __extends(NoopObservableGaugeMetric, _super);\n function NoopObservableGaugeMetric() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return NoopObservableGaugeMetric;\n}(NoopObservableMetric));\nexport { NoopObservableGaugeMetric };\nvar NoopObservableUpDownCounterMetric = /** @class */ (function (_super) {\n __extends(NoopObservableUpDownCounterMetric, _super);\n function NoopObservableUpDownCounterMetric() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return NoopObservableUpDownCounterMetric;\n}(NoopObservableMetric));\nexport { NoopObservableUpDownCounterMetric };\nexport var NOOP_METER = new NoopMeter();\n// Synchronous instruments\nexport var NOOP_COUNTER_METRIC = new NoopCounterMetric();\nexport var NOOP_GAUGE_METRIC = new NoopGaugeMetric();\nexport var NOOP_HISTOGRAM_METRIC = new NoopHistogramMetric();\nexport var NOOP_UP_DOWN_COUNTER_METRIC = new NoopUpDownCounterMetric();\n// Asynchronous instruments\nexport var NOOP_OBSERVABLE_COUNTER_METRIC = new NoopObservableCounterMetric();\nexport var NOOP_OBSERVABLE_GAUGE_METRIC = new NoopObservableGaugeMetric();\nexport var NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC = new NoopObservableUpDownCounterMetric();\n/**\n * Create a no-op Meter\n */\nexport function createNoopMeter() {\n return NOOP_METER;\n}\n//# sourceMappingURL=NoopMeter.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var TraceFlags;\n(function (TraceFlags) {\n /** Represents no flag set. */\n TraceFlags[TraceFlags[\"NONE\"] = 0] = \"NONE\";\n /** Bit to represent whether trace is sampled in trace flags. */\n TraceFlags[TraceFlags[\"SAMPLED\"] = 1] = \"SAMPLED\";\n})(TraceFlags || (TraceFlags = {}));\n//# sourceMappingURL=trace_flags.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var defaultTextMapGetter = {\n get: function (carrier, key) {\n if (carrier == null) {\n return undefined;\n }\n return carrier[key];\n },\n keys: function (carrier) {\n if (carrier == null) {\n return [];\n }\n return Object.keys(carrier);\n },\n};\nexport var defaultTextMapSetter = {\n set: function (carrier, key, value) {\n if (carrier == null) {\n return;\n }\n carrier[key] = value;\n },\n};\n//# sourceMappingURL=TextMapPropagator.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { ROOT_CONTEXT } from './context';\nvar NoopContextManager = /** @class */ (function () {\n function NoopContextManager() {\n }\n NoopContextManager.prototype.active = function () {\n return ROOT_CONTEXT;\n };\n NoopContextManager.prototype.with = function (_context, fn, thisArg) {\n var args = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n args[_i - 3] = arguments[_i];\n }\n return fn.call.apply(fn, __spreadArray([thisArg], __read(args), false));\n };\n NoopContextManager.prototype.bind = function (_context, target) {\n return target;\n };\n NoopContextManager.prototype.enable = function () {\n return this;\n };\n NoopContextManager.prototype.disable = function () {\n return this;\n };\n return NoopContextManager;\n}());\nexport { NoopContextManager };\n//# sourceMappingURL=NoopContextManager.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nimport { NoopContextManager } from '../context/NoopContextManager';\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nimport { DiagAPI } from './diag';\nvar API_NAME = 'context';\nvar NOOP_CONTEXT_MANAGER = new NoopContextManager();\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Context API\n */\nvar ContextAPI = /** @class */ (function () {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n function ContextAPI() {\n }\n /** Get the singleton instance of the Context API */\n ContextAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new ContextAPI();\n }\n return this._instance;\n };\n /**\n * Set the current context manager.\n *\n * @returns true if the context manager was successfully registered, else false\n */\n ContextAPI.prototype.setGlobalContextManager = function (contextManager) {\n return registerGlobal(API_NAME, contextManager, DiagAPI.instance());\n };\n /**\n * Get the currently active context\n */\n ContextAPI.prototype.active = function () {\n return this._getContextManager().active();\n };\n /**\n * Execute a function with an active context\n *\n * @param context context to be active during function execution\n * @param fn function to execute in a context\n * @param thisArg optional receiver to be used for calling fn\n * @param args optional arguments forwarded to fn\n */\n ContextAPI.prototype.with = function (context, fn, thisArg) {\n var _a;\n var args = [];\n for (var _i = 3; _i < arguments.length; _i++) {\n args[_i - 3] = arguments[_i];\n }\n return (_a = this._getContextManager()).with.apply(_a, __spreadArray([context, fn, thisArg], __read(args), false));\n };\n /**\n * Bind a context to a target function or event emitter\n *\n * @param context context to bind to the event emitter or function. Defaults to the currently active context\n * @param target function or event emitter to bind\n */\n ContextAPI.prototype.bind = function (context, target) {\n return this._getContextManager().bind(context, target);\n };\n ContextAPI.prototype._getContextManager = function () {\n return getGlobal(API_NAME) || NOOP_CONTEXT_MANAGER;\n };\n /** Disable and remove the global context manager */\n ContextAPI.prototype.disable = function () {\n this._getContextManager().disable();\n unregisterGlobal(API_NAME, DiagAPI.instance());\n };\n return ContextAPI;\n}());\nexport { ContextAPI };\n//# sourceMappingURL=context.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { TraceFlags } from './trace_flags';\nexport var INVALID_SPANID = '0000000000000000';\nexport var INVALID_TRACEID = '00000000000000000000000000000000';\nexport var INVALID_SPAN_CONTEXT = {\n traceId: INVALID_TRACEID,\n spanId: INVALID_SPANID,\n traceFlags: TraceFlags.NONE,\n};\n//# sourceMappingURL=invalid-span-constants.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { INVALID_SPAN_CONTEXT } from './invalid-span-constants';\n/**\n * The NonRecordingSpan is the default {@link Span} that is used when no Span\n * implementation is available. All operations are no-op including context\n * propagation.\n */\nvar NonRecordingSpan = /** @class */ (function () {\n function NonRecordingSpan(_spanContext) {\n if (_spanContext === void 0) { _spanContext = INVALID_SPAN_CONTEXT; }\n this._spanContext = _spanContext;\n }\n // Returns a SpanContext.\n NonRecordingSpan.prototype.spanContext = function () {\n return this._spanContext;\n };\n // By default does nothing\n NonRecordingSpan.prototype.setAttribute = function (_key, _value) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.setAttributes = function (_attributes) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.addEvent = function (_name, _attributes) {\n return this;\n };\n NonRecordingSpan.prototype.addLink = function (_link) {\n return this;\n };\n NonRecordingSpan.prototype.addLinks = function (_links) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.setStatus = function (_status) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.updateName = function (_name) {\n return this;\n };\n // By default does nothing\n NonRecordingSpan.prototype.end = function (_endTime) { };\n // isRecording always returns false for NonRecordingSpan.\n NonRecordingSpan.prototype.isRecording = function () {\n return false;\n };\n // By default does nothing\n NonRecordingSpan.prototype.recordException = function (_exception, _time) { };\n return NonRecordingSpan;\n}());\nexport { NonRecordingSpan };\n//# sourceMappingURL=NonRecordingSpan.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContextKey } from '../context/context';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { ContextAPI } from '../api/context';\n/**\n * span key\n */\nvar SPAN_KEY = createContextKey('OpenTelemetry Context Key SPAN');\n/**\n * Return the span if one exists\n *\n * @param context context to get span from\n */\nexport function getSpan(context) {\n return context.getValue(SPAN_KEY) || undefined;\n}\n/**\n * Gets the span from the current context, if one exists.\n */\nexport function getActiveSpan() {\n return getSpan(ContextAPI.getInstance().active());\n}\n/**\n * Set the span on a context\n *\n * @param context context to use as parent\n * @param span span to set active\n */\nexport function setSpan(context, span) {\n return context.setValue(SPAN_KEY, span);\n}\n/**\n * Remove current span stored in the context\n *\n * @param context context to delete span from\n */\nexport function deleteSpan(context) {\n return context.deleteValue(SPAN_KEY);\n}\n/**\n * Wrap span context in a NoopSpan and set as span in a new\n * context\n *\n * @param context context to set active span on\n * @param spanContext span context to be wrapped\n */\nexport function setSpanContext(context, spanContext) {\n return setSpan(context, new NonRecordingSpan(spanContext));\n}\n/**\n * Get the span context of the span if it exists.\n *\n * @param context context to get values from\n */\nexport function getSpanContext(context) {\n var _a;\n return (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();\n}\n//# sourceMappingURL=context-utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { INVALID_SPANID, INVALID_TRACEID } from './invalid-span-constants';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nvar VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;\nvar VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;\nexport function isValidTraceId(traceId) {\n return VALID_TRACEID_REGEX.test(traceId) && traceId !== INVALID_TRACEID;\n}\nexport function isValidSpanId(spanId) {\n return VALID_SPANID_REGEX.test(spanId) && spanId !== INVALID_SPANID;\n}\n/**\n * Returns true if this {@link SpanContext} is valid.\n * @return true if this {@link SpanContext} is valid.\n */\nexport function isSpanContextValid(spanContext) {\n return (isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId));\n}\n/**\n * Wrap the given {@link SpanContext} in a new non-recording {@link Span}\n *\n * @param spanContext span context to be wrapped\n * @returns a new non-recording {@link Span} with the provided context\n */\nexport function wrapSpanContext(spanContext) {\n return new NonRecordingSpan(spanContext);\n}\n//# sourceMappingURL=spancontext-utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ContextAPI } from '../api/context';\nimport { getSpanContext, setSpan } from '../trace/context-utils';\nimport { NonRecordingSpan } from './NonRecordingSpan';\nimport { isSpanContextValid } from './spancontext-utils';\nvar contextApi = ContextAPI.getInstance();\n/**\n * No-op implementations of {@link Tracer}.\n */\nvar NoopTracer = /** @class */ (function () {\n function NoopTracer() {\n }\n // startSpan starts a noop span.\n NoopTracer.prototype.startSpan = function (name, options, context) {\n if (context === void 0) { context = contextApi.active(); }\n var root = Boolean(options === null || options === void 0 ? void 0 : options.root);\n if (root) {\n return new NonRecordingSpan();\n }\n var parentFromContext = context && getSpanContext(context);\n if (isSpanContext(parentFromContext) &&\n isSpanContextValid(parentFromContext)) {\n return new NonRecordingSpan(parentFromContext);\n }\n else {\n return new NonRecordingSpan();\n }\n };\n NoopTracer.prototype.startActiveSpan = function (name, arg2, arg3, arg4) {\n var opts;\n var ctx;\n var fn;\n if (arguments.length < 2) {\n return;\n }\n else if (arguments.length === 2) {\n fn = arg2;\n }\n else if (arguments.length === 3) {\n opts = arg2;\n fn = arg3;\n }\n else {\n opts = arg2;\n ctx = arg3;\n fn = arg4;\n }\n var parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();\n var span = this.startSpan(name, opts, parentContext);\n var contextWithSpanSet = setSpan(parentContext, span);\n return contextApi.with(contextWithSpanSet, fn, undefined, span);\n };\n return NoopTracer;\n}());\nexport { NoopTracer };\nfunction isSpanContext(spanContext) {\n return (typeof spanContext === 'object' &&\n typeof spanContext['spanId'] === 'string' &&\n typeof spanContext['traceId'] === 'string' &&\n typeof spanContext['traceFlags'] === 'number');\n}\n//# sourceMappingURL=NoopTracer.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NoopTracer } from './NoopTracer';\nvar NOOP_TRACER = new NoopTracer();\n/**\n * Proxy tracer provided by the proxy tracer provider\n */\nvar ProxyTracer = /** @class */ (function () {\n function ProxyTracer(_provider, name, version, options) {\n this._provider = _provider;\n this.name = name;\n this.version = version;\n this.options = options;\n }\n ProxyTracer.prototype.startSpan = function (name, options, context) {\n return this._getTracer().startSpan(name, options, context);\n };\n ProxyTracer.prototype.startActiveSpan = function (_name, _options, _context, _fn) {\n var tracer = this._getTracer();\n return Reflect.apply(tracer.startActiveSpan, tracer, arguments);\n };\n /**\n * Try to get a tracer from the proxy tracer provider.\n * If the proxy tracer provider has no delegate, return a noop tracer.\n */\n ProxyTracer.prototype._getTracer = function () {\n if (this._delegate) {\n return this._delegate;\n }\n var tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);\n if (!tracer) {\n return NOOP_TRACER;\n }\n this._delegate = tracer;\n return this._delegate;\n };\n return ProxyTracer;\n}());\nexport { ProxyTracer };\n//# sourceMappingURL=ProxyTracer.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * @deprecated use the one declared in @opentelemetry/sdk-trace-base instead.\n * A sampling decision that determines how a {@link Span} will be recorded\n * and collected.\n */\nexport var SamplingDecision;\n(function (SamplingDecision) {\n /**\n * `Span.isRecording() === false`, span will not be recorded and all events\n * and attributes will be dropped.\n */\n SamplingDecision[SamplingDecision[\"NOT_RECORD\"] = 0] = \"NOT_RECORD\";\n /**\n * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}\n * MUST NOT be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD\"] = 1] = \"RECORD\";\n /**\n * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}\n * MUST be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD_AND_SAMPLED\"] = 2] = \"RECORD_AND_SAMPLED\";\n})(SamplingDecision || (SamplingDecision = {}));\n//# sourceMappingURL=SamplingResult.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var SpanKind;\n(function (SpanKind) {\n /** Default value. Indicates that the span is used internally. */\n SpanKind[SpanKind[\"INTERNAL\"] = 0] = \"INTERNAL\";\n /**\n * Indicates that the span covers server-side handling of an RPC or other\n * remote request.\n */\n SpanKind[SpanKind[\"SERVER\"] = 1] = \"SERVER\";\n /**\n * Indicates that the span covers the client-side wrapper around an RPC or\n * other remote request.\n */\n SpanKind[SpanKind[\"CLIENT\"] = 2] = \"CLIENT\";\n /**\n * Indicates that the span describes producer sending a message to a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"PRODUCER\"] = 3] = \"PRODUCER\";\n /**\n * Indicates that the span describes consumer receiving a message from a\n * broker. Unlike client and server, there is no direct critical path latency\n * relationship between producer and consumer spans.\n */\n SpanKind[SpanKind[\"CONSUMER\"] = 4] = \"CONSUMER\";\n})(SpanKind || (SpanKind = {}));\n//# sourceMappingURL=span_kind.js.map","/**\n * An enumeration of status codes.\n */\nexport var SpanStatusCode;\n(function (SpanStatusCode) {\n /**\n * The default status.\n */\n SpanStatusCode[SpanStatusCode[\"UNSET\"] = 0] = \"UNSET\";\n /**\n * The operation has been validated by an Application developer or\n * Operator to have completed successfully.\n */\n SpanStatusCode[SpanStatusCode[\"OK\"] = 1] = \"OK\";\n /**\n * The operation contains an error.\n */\n SpanStatusCode[SpanStatusCode[\"ERROR\"] = 2] = \"ERROR\";\n})(SpanStatusCode || (SpanStatusCode = {}));\n//# sourceMappingURL=status.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ProxyTracer } from './ProxyTracer';\nimport { NoopTracerProvider } from './NoopTracerProvider';\nvar NOOP_TRACER_PROVIDER = new NoopTracerProvider();\n/**\n * Tracer provider which provides {@link ProxyTracer}s.\n *\n * Before a delegate is set, tracers provided are NoOp.\n * When a delegate is set, traces are provided from the delegate.\n * When a delegate is set after tracers have already been provided,\n * all tracers already provided will use the provided delegate implementation.\n */\nvar ProxyTracerProvider = /** @class */ (function () {\n function ProxyTracerProvider() {\n }\n /**\n * Get a {@link ProxyTracer}\n */\n ProxyTracerProvider.prototype.getTracer = function (name, version, options) {\n var _a;\n return ((_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version, options));\n };\n ProxyTracerProvider.prototype.getDelegate = function () {\n var _a;\n return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;\n };\n /**\n * Set the delegate tracer provider\n */\n ProxyTracerProvider.prototype.setDelegate = function (delegate) {\n this._delegate = delegate;\n };\n ProxyTracerProvider.prototype.getDelegateTracer = function (name, version, options) {\n var _a;\n return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);\n };\n return ProxyTracerProvider;\n}());\nexport { ProxyTracerProvider };\n//# sourceMappingURL=ProxyTracerProvider.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NoopTracer } from './NoopTracer';\n/**\n * An implementation of the {@link TracerProvider} which returns an impotent\n * Tracer for all calls to `getTracer`.\n *\n * All operations are no-op.\n */\nvar NoopTracerProvider = /** @class */ (function () {\n function NoopTracerProvider() {\n }\n NoopTracerProvider.prototype.getTracer = function (_name, _version, _options) {\n return new NoopTracer();\n };\n return NoopTracerProvider;\n}());\nexport { NoopTracerProvider };\n//# sourceMappingURL=NoopTracerProvider.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { ContextAPI } from './api/context';\n/** Entrypoint for context API */\nexport var context = ContextAPI.getInstance();\n//# sourceMappingURL=context-api.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { DiagAPI } from './api/diag';\n/**\n * Entrypoint for Diag API.\n * Defines Diagnostic handler used for internal diagnostic logging operations.\n * The default provides a Noop DiagLogger implementation which may be changed via the\n * diag.setLogger(logger: DiagLogger) function.\n */\nexport var diag = DiagAPI.instance();\n//# sourceMappingURL=diag-api.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NOOP_METER } from './NoopMeter';\n/**\n * An implementation of the {@link MeterProvider} which returns an impotent Meter\n * for all calls to `getMeter`\n */\nvar NoopMeterProvider = /** @class */ (function () {\n function NoopMeterProvider() {\n }\n NoopMeterProvider.prototype.getMeter = function (_name, _version, _options) {\n return NOOP_METER;\n };\n return NoopMeterProvider;\n}());\nexport { NoopMeterProvider };\nexport var NOOP_METER_PROVIDER = new NoopMeterProvider();\n//# sourceMappingURL=NoopMeterProvider.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NOOP_METER_PROVIDER } from '../metrics/NoopMeterProvider';\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nimport { DiagAPI } from './diag';\nvar API_NAME = 'metrics';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Metrics API\n */\nvar MetricsAPI = /** @class */ (function () {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n function MetricsAPI() {\n }\n /** Get the singleton instance of the Metrics API */\n MetricsAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new MetricsAPI();\n }\n return this._instance;\n };\n /**\n * Set the current global meter provider.\n * Returns true if the meter provider was successfully registered, else false.\n */\n MetricsAPI.prototype.setGlobalMeterProvider = function (provider) {\n return registerGlobal(API_NAME, provider, DiagAPI.instance());\n };\n /**\n * Returns the global meter provider.\n */\n MetricsAPI.prototype.getMeterProvider = function () {\n return getGlobal(API_NAME) || NOOP_METER_PROVIDER;\n };\n /**\n * Returns a meter from the global meter provider.\n */\n MetricsAPI.prototype.getMeter = function (name, version, options) {\n return this.getMeterProvider().getMeter(name, version, options);\n };\n /** Remove the global meter provider */\n MetricsAPI.prototype.disable = function () {\n unregisterGlobal(API_NAME, DiagAPI.instance());\n };\n return MetricsAPI;\n}());\nexport { MetricsAPI };\n//# sourceMappingURL=metrics.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { MetricsAPI } from './api/metrics';\n/** Entrypoint for metrics API */\nexport var metrics = MetricsAPI.getInstance();\n//# sourceMappingURL=metrics-api.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * No-op implementations of {@link TextMapPropagator}.\n */\nvar NoopTextMapPropagator = /** @class */ (function () {\n function NoopTextMapPropagator() {\n }\n /** Noop inject function does nothing */\n NoopTextMapPropagator.prototype.inject = function (_context, _carrier) { };\n /** Noop extract function does nothing and returns the input context */\n NoopTextMapPropagator.prototype.extract = function (context, _carrier) {\n return context;\n };\n NoopTextMapPropagator.prototype.fields = function () {\n return [];\n };\n return NoopTextMapPropagator;\n}());\nexport { NoopTextMapPropagator };\n//# sourceMappingURL=NoopTextMapPropagator.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ContextAPI } from '../api/context';\nimport { createContextKey } from '../context/context';\n/**\n * Baggage key\n */\nvar BAGGAGE_KEY = createContextKey('OpenTelemetry Baggage Key');\n/**\n * Retrieve the current baggage from the given context\n *\n * @param {Context} Context that manage all context values\n * @returns {Baggage} Extracted baggage from the context\n */\nexport function getBaggage(context) {\n return context.getValue(BAGGAGE_KEY) || undefined;\n}\n/**\n * Retrieve the current baggage from the active/current context\n *\n * @returns {Baggage} Extracted baggage from the context\n */\nexport function getActiveBaggage() {\n return getBaggage(ContextAPI.getInstance().active());\n}\n/**\n * Store a baggage in the given context\n *\n * @param {Context} Context that manage all context values\n * @param {Baggage} baggage that will be set in the actual context\n */\nexport function setBaggage(context, baggage) {\n return context.setValue(BAGGAGE_KEY, baggage);\n}\n/**\n * Delete the baggage stored in the given context\n *\n * @param {Context} Context that manage all context values\n */\nexport function deleteBaggage(context) {\n return context.deleteValue(BAGGAGE_KEY);\n}\n//# sourceMappingURL=context-helpers.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nimport { NoopTextMapPropagator } from '../propagation/NoopTextMapPropagator';\nimport { defaultTextMapGetter, defaultTextMapSetter, } from '../propagation/TextMapPropagator';\nimport { getBaggage, getActiveBaggage, setBaggage, deleteBaggage, } from '../baggage/context-helpers';\nimport { createBaggage } from '../baggage/utils';\nimport { DiagAPI } from './diag';\nvar API_NAME = 'propagation';\nvar NOOP_TEXT_MAP_PROPAGATOR = new NoopTextMapPropagator();\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Propagation API\n */\nvar PropagationAPI = /** @class */ (function () {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n function PropagationAPI() {\n this.createBaggage = createBaggage;\n this.getBaggage = getBaggage;\n this.getActiveBaggage = getActiveBaggage;\n this.setBaggage = setBaggage;\n this.deleteBaggage = deleteBaggage;\n }\n /** Get the singleton instance of the Propagator API */\n PropagationAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new PropagationAPI();\n }\n return this._instance;\n };\n /**\n * Set the current propagator.\n *\n * @returns true if the propagator was successfully registered, else false\n */\n PropagationAPI.prototype.setGlobalPropagator = function (propagator) {\n return registerGlobal(API_NAME, propagator, DiagAPI.instance());\n };\n /**\n * Inject context into a carrier to be propagated inter-process\n *\n * @param context Context carrying tracing data to inject\n * @param carrier carrier to inject context into\n * @param setter Function used to set values on the carrier\n */\n PropagationAPI.prototype.inject = function (context, carrier, setter) {\n if (setter === void 0) { setter = defaultTextMapSetter; }\n return this._getGlobalPropagator().inject(context, carrier, setter);\n };\n /**\n * Extract context from a carrier\n *\n * @param context Context which the newly created context will inherit from\n * @param carrier Carrier to extract context from\n * @param getter Function used to extract keys from a carrier\n */\n PropagationAPI.prototype.extract = function (context, carrier, getter) {\n if (getter === void 0) { getter = defaultTextMapGetter; }\n return this._getGlobalPropagator().extract(context, carrier, getter);\n };\n /**\n * Return a list of all fields which may be used by the propagator.\n */\n PropagationAPI.prototype.fields = function () {\n return this._getGlobalPropagator().fields();\n };\n /** Remove the global propagator */\n PropagationAPI.prototype.disable = function () {\n unregisterGlobal(API_NAME, DiagAPI.instance());\n };\n PropagationAPI.prototype._getGlobalPropagator = function () {\n return getGlobal(API_NAME) || NOOP_TEXT_MAP_PROPAGATOR;\n };\n return PropagationAPI;\n}());\nexport { PropagationAPI };\n//# sourceMappingURL=propagation.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { PropagationAPI } from './api/propagation';\n/** Entrypoint for propagation API */\nexport var propagation = PropagationAPI.getInstance();\n//# sourceMappingURL=propagation-api.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getGlobal, registerGlobal, unregisterGlobal, } from '../internal/global-utils';\nimport { ProxyTracerProvider } from '../trace/ProxyTracerProvider';\nimport { isSpanContextValid, wrapSpanContext, } from '../trace/spancontext-utils';\nimport { deleteSpan, getActiveSpan, getSpan, getSpanContext, setSpan, setSpanContext, } from '../trace/context-utils';\nimport { DiagAPI } from './diag';\nvar API_NAME = 'trace';\n/**\n * Singleton object which represents the entry point to the OpenTelemetry Tracing API\n */\nvar TraceAPI = /** @class */ (function () {\n /** Empty private constructor prevents end users from constructing a new instance of the API */\n function TraceAPI() {\n this._proxyTracerProvider = new ProxyTracerProvider();\n this.wrapSpanContext = wrapSpanContext;\n this.isSpanContextValid = isSpanContextValid;\n this.deleteSpan = deleteSpan;\n this.getSpan = getSpan;\n this.getActiveSpan = getActiveSpan;\n this.getSpanContext = getSpanContext;\n this.setSpan = setSpan;\n this.setSpanContext = setSpanContext;\n }\n /** Get the singleton instance of the Trace API */\n TraceAPI.getInstance = function () {\n if (!this._instance) {\n this._instance = new TraceAPI();\n }\n return this._instance;\n };\n /**\n * Set the current global tracer.\n *\n * @returns true if the tracer provider was successfully registered, else false\n */\n TraceAPI.prototype.setGlobalTracerProvider = function (provider) {\n var success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());\n if (success) {\n this._proxyTracerProvider.setDelegate(provider);\n }\n return success;\n };\n /**\n * Returns the global tracer provider.\n */\n TraceAPI.prototype.getTracerProvider = function () {\n return getGlobal(API_NAME) || this._proxyTracerProvider;\n };\n /**\n * Returns a tracer from the global tracer provider.\n */\n TraceAPI.prototype.getTracer = function (name, version) {\n return this.getTracerProvider().getTracer(name, version);\n };\n /** Remove the global tracer provider */\n TraceAPI.prototype.disable = function () {\n unregisterGlobal(API_NAME, DiagAPI.instance());\n this._proxyTracerProvider = new ProxyTracerProvider();\n };\n return TraceAPI;\n}());\nexport { TraceAPI };\n//# sourceMappingURL=trace.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Split module-level variable definition into separate files to allow\n// tree-shaking on each api instance.\nimport { TraceAPI } from './api/trace';\n/** Entrypoint for trace API */\nexport var trace = TraceAPI.getInstance();\n//# sourceMappingURL=trace-api.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createContextKey } from '@opentelemetry/api';\nconst SUPPRESS_TRACING_KEY = createContextKey('OpenTelemetry SDK Context Key SUPPRESS_TRACING');\nexport function suppressTracing(context) {\n return context.setValue(SUPPRESS_TRACING_KEY, true);\n}\nexport function unsuppressTracing(context) {\n return context.deleteValue(SUPPRESS_TRACING_KEY);\n}\nexport function isTracingSuppressed(context) {\n return context.getValue(SUPPRESS_TRACING_KEY) === true;\n}\n//# sourceMappingURL=suppress-tracing.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const BAGGAGE_KEY_PAIR_SEPARATOR = '=';\nexport const BAGGAGE_PROPERTIES_SEPARATOR = ';';\nexport const BAGGAGE_ITEMS_SEPARATOR = ',';\n// Name of the http header used to propagate the baggage\nexport const BAGGAGE_HEADER = 'baggage';\n// Maximum number of name-value pairs allowed by w3c spec\nexport const BAGGAGE_MAX_NAME_VALUE_PAIRS = 180;\n// Maximum number of bytes per a single name-value pair allowed by w3c spec\nexport const BAGGAGE_MAX_PER_NAME_VALUE_PAIRS = 4096;\n// Maximum total length of all name-value pairs allowed by w3c spec\nexport const BAGGAGE_MAX_TOTAL_LENGTH = 8192;\n//# sourceMappingURL=constants.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { baggageEntryMetadataFromString, } from '@opentelemetry/api';\nimport { BAGGAGE_ITEMS_SEPARATOR, BAGGAGE_PROPERTIES_SEPARATOR, BAGGAGE_KEY_PAIR_SEPARATOR, BAGGAGE_MAX_TOTAL_LENGTH, } from './constants';\nexport function serializeKeyPairs(keyPairs) {\n return keyPairs.reduce((hValue, current) => {\n const value = `${hValue}${hValue !== '' ? BAGGAGE_ITEMS_SEPARATOR : ''}${current}`;\n return value.length > BAGGAGE_MAX_TOTAL_LENGTH ? hValue : value;\n }, '');\n}\nexport function getKeyPairs(baggage) {\n return baggage.getAllEntries().map(([key, value]) => {\n let entry = `${encodeURIComponent(key)}=${encodeURIComponent(value.value)}`;\n // include opaque metadata if provided\n // NOTE: we intentionally don't URI-encode the metadata - that responsibility falls on the metadata implementation\n if (value.metadata !== undefined) {\n entry += BAGGAGE_PROPERTIES_SEPARATOR + value.metadata.toString();\n }\n return entry;\n });\n}\nexport function parsePairKeyValue(entry) {\n const valueProps = entry.split(BAGGAGE_PROPERTIES_SEPARATOR);\n if (valueProps.length <= 0)\n return;\n const keyPairPart = valueProps.shift();\n if (!keyPairPart)\n return;\n const separatorIndex = keyPairPart.indexOf(BAGGAGE_KEY_PAIR_SEPARATOR);\n if (separatorIndex <= 0)\n return;\n const key = decodeURIComponent(keyPairPart.substring(0, separatorIndex).trim());\n const value = decodeURIComponent(keyPairPart.substring(separatorIndex + 1).trim());\n let metadata;\n if (valueProps.length > 0) {\n metadata = baggageEntryMetadataFromString(valueProps.join(BAGGAGE_PROPERTIES_SEPARATOR));\n }\n return { key, value, metadata };\n}\n/**\n * Parse a string serialized in the baggage HTTP Format (without metadata):\n * https://github.com/w3c/baggage/blob/master/baggage/HTTP_HEADER_FORMAT.md\n */\nexport function parseKeyPairsIntoRecord(value) {\n const result = {};\n if (typeof value === 'string' && value.length > 0) {\n value.split(BAGGAGE_ITEMS_SEPARATOR).forEach(entry => {\n const keyPair = parsePairKeyValue(entry);\n if (keyPair !== undefined && keyPair.value.length > 0) {\n result[keyPair.key] = keyPair.value;\n }\n });\n }\n return result;\n}\n//# sourceMappingURL=utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { propagation, } from '@opentelemetry/api';\nimport { isTracingSuppressed } from '../../trace/suppress-tracing';\nimport { BAGGAGE_HEADER, BAGGAGE_ITEMS_SEPARATOR, BAGGAGE_MAX_NAME_VALUE_PAIRS, BAGGAGE_MAX_PER_NAME_VALUE_PAIRS, } from '../constants';\nimport { getKeyPairs, parsePairKeyValue, serializeKeyPairs } from '../utils';\n/**\n * Propagates {@link Baggage} through Context format propagation.\n *\n * Based on the Baggage specification:\n * https://w3c.github.io/baggage/\n */\nexport class W3CBaggagePropagator {\n inject(context, carrier, setter) {\n const baggage = propagation.getBaggage(context);\n if (!baggage || isTracingSuppressed(context))\n return;\n const keyPairs = getKeyPairs(baggage)\n .filter((pair) => {\n return pair.length <= BAGGAGE_MAX_PER_NAME_VALUE_PAIRS;\n })\n .slice(0, BAGGAGE_MAX_NAME_VALUE_PAIRS);\n const headerValue = serializeKeyPairs(keyPairs);\n if (headerValue.length > 0) {\n setter.set(carrier, BAGGAGE_HEADER, headerValue);\n }\n }\n extract(context, carrier, getter) {\n const headerValue = getter.get(carrier, BAGGAGE_HEADER);\n const baggageString = Array.isArray(headerValue)\n ? headerValue.join(BAGGAGE_ITEMS_SEPARATOR)\n : headerValue;\n if (!baggageString)\n return context;\n const baggage = {};\n if (baggageString.length === 0) {\n return context;\n }\n const pairs = baggageString.split(BAGGAGE_ITEMS_SEPARATOR);\n pairs.forEach(entry => {\n const keyPair = parsePairKeyValue(entry);\n if (keyPair) {\n const baggageEntry = { value: keyPair.value };\n if (keyPair.metadata) {\n baggageEntry.metadata = keyPair.metadata;\n }\n baggage[keyPair.key] = baggageEntry;\n }\n });\n if (Object.entries(baggage).length === 0) {\n return context;\n }\n return propagation.setBaggage(context, propagation.createBaggage(baggage));\n }\n fields() {\n return [BAGGAGE_HEADER];\n }\n}\n//# sourceMappingURL=W3CBaggagePropagator.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { diag } from '@opentelemetry/api';\nexport function sanitizeAttributes(attributes) {\n const out = {};\n if (typeof attributes !== 'object' || attributes == null) {\n return out;\n }\n for (const [key, val] of Object.entries(attributes)) {\n if (!isAttributeKey(key)) {\n diag.warn(`Invalid attribute key: ${key}`);\n continue;\n }\n if (!isAttributeValue(val)) {\n diag.warn(`Invalid attribute value set for key: ${key}`);\n continue;\n }\n if (Array.isArray(val)) {\n out[key] = val.slice();\n }\n else {\n out[key] = val;\n }\n }\n return out;\n}\nexport function isAttributeKey(key) {\n return typeof key === 'string' && key.length > 0;\n}\nexport function isAttributeValue(val) {\n if (val == null) {\n return true;\n }\n if (Array.isArray(val)) {\n return isHomogeneousAttributeValueArray(val);\n }\n return isValidPrimitiveAttributeValue(val);\n}\nfunction isHomogeneousAttributeValueArray(arr) {\n let type;\n for (const element of arr) {\n // null/undefined elements are allowed\n if (element == null)\n continue;\n if (!type) {\n if (isValidPrimitiveAttributeValue(element)) {\n type = typeof element;\n continue;\n }\n // encountered an invalid primitive\n return false;\n }\n if (typeof element === type) {\n continue;\n }\n return false;\n }\n return true;\n}\nfunction isValidPrimitiveAttributeValue(val) {\n switch (typeof val) {\n case 'number':\n case 'boolean':\n case 'string':\n return true;\n }\n return false;\n}\n//# sourceMappingURL=attributes.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { loggingErrorHandler } from './logging-error-handler';\n/** The global error handler delegate */\nlet delegateHandler = loggingErrorHandler();\n/**\n * Set the global error handler\n * @param {ErrorHandler} handler\n */\nexport function setGlobalErrorHandler(handler) {\n delegateHandler = handler;\n}\n/**\n * Return the global error handler\n * @param {Exception} ex\n */\nexport function globalErrorHandler(ex) {\n try {\n delegateHandler(ex);\n }\n catch { } // eslint-disable-line no-empty\n}\n//# sourceMappingURL=global-error-handler.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { diag } from '@opentelemetry/api';\n/**\n * Returns a function that logs an error using the provided logger, or a\n * console logger if one was not provided.\n */\nexport function loggingErrorHandler() {\n return (ex) => {\n diag.error(stringifyException(ex));\n };\n}\n/**\n * Converts an exception into a string representation\n * @param {Exception} ex\n */\nfunction stringifyException(ex) {\n if (typeof ex === 'string') {\n return ex;\n }\n else {\n return JSON.stringify(flattenException(ex));\n }\n}\n/**\n * Flattens an exception into key-value pairs by traversing the prototype chain\n * and coercing values to strings. Duplicate properties will not be overwritten;\n * the first insert wins.\n */\nfunction flattenException(ex) {\n const result = {};\n let current = ex;\n while (current !== null) {\n Object.getOwnPropertyNames(current).forEach(propertyName => {\n if (result[propertyName])\n return;\n const value = current[propertyName];\n if (value) {\n result[propertyName] = String(value);\n }\n });\n current = Object.getPrototypeOf(current);\n }\n return result;\n}\n//# sourceMappingURL=logging-error-handler.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { diag } from '@opentelemetry/api';\nimport { inspect } from 'util';\n/**\n * Retrieves a number from an environment variable.\n * - Returns `undefined` if the environment variable is empty, unset, contains only whitespace, or is not a number.\n * - Returns a number in all other cases.\n *\n * @param {string} key - The name of the environment variable to retrieve.\n * @returns {number | undefined} - The number value or `undefined`.\n */\nexport function getNumberFromEnv(key) {\n const raw = process.env[key];\n if (raw == null || raw.trim() === '') {\n return undefined;\n }\n const value = Number(raw);\n if (isNaN(value)) {\n diag.warn(`Unknown value ${inspect(raw)} for ${key}, expected a number, using defaults`);\n return undefined;\n }\n return value;\n}\n/**\n * Retrieves a string from an environment variable.\n * - Returns `undefined` if the environment variable is empty, unset, or contains only whitespace.\n *\n * @param {string} key - The name of the environment variable to retrieve.\n * @returns {string | undefined} - The string value or `undefined`.\n */\nexport function getStringFromEnv(key) {\n const raw = process.env[key];\n if (raw == null || raw.trim() === '') {\n return undefined;\n }\n return raw;\n}\n/**\n * Retrieves a boolean value from an environment variable.\n * - Trims leading and trailing whitespace and ignores casing.\n * - Returns `false` if the environment variable is empty, unset, or contains only whitespace.\n * - Returns `false` for strings that cannot be mapped to a boolean.\n *\n * @param {string} key - The name of the environment variable to retrieve.\n * @returns {boolean} - The boolean value or `false` if the environment variable is unset empty, unset, or contains only whitespace.\n */\nexport function getBooleanFromEnv(key) {\n const raw = process.env[key]?.trim().toLowerCase();\n if (raw == null || raw === '') {\n // NOTE: falling back to `false` instead of `undefined` as required by the specification.\n // If you have a use-case that requires `undefined`, consider using `getStringFromEnv()` and applying the necessary\n // normalizations in the consuming code.\n return false;\n }\n if (raw === 'true') {\n return true;\n }\n else if (raw === 'false') {\n return false;\n }\n else {\n diag.warn(`Unknown value ${inspect(raw)} for ${key}, expected 'true' or 'false', falling back to 'false' (default)`);\n return false;\n }\n}\n/**\n * Retrieves a list of strings from an environment variable.\n * - Uses ',' as the delimiter.\n * - Trims leading and trailing whitespace from each entry.\n * - Excludes empty entries.\n * - Returns `undefined` if the environment variable is empty or contains only whitespace.\n * - Returns an empty array if all entries are empty or whitespace.\n *\n * @param {string} key - The name of the environment variable to retrieve.\n * @returns {string[] | undefined} - The list of strings or `undefined`.\n */\nexport function getStringListFromEnv(key) {\n return getStringFromEnv(key)\n ?.split(',')\n .map(v => v.trim())\n .filter(s => s !== '');\n}\n//# sourceMappingURL=environment.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexport const _globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { performance } from 'perf_hooks';\nexport const otperformance = performance;\n//# sourceMappingURL=performance.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createConstMap } from '../internal/utils';\n//----------------------------------------------------------------------------------------------------------\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates//templates/SemanticAttributes.ts.j2\n//----------------------------------------------------------------------------------------------------------\n//----------------------------------------------------------------------------------------------------------\n// Constant values for SemanticAttributes\n//----------------------------------------------------------------------------------------------------------\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_AWS_LAMBDA_INVOKED_ARN = 'aws.lambda.invoked_arn';\nconst TMP_DB_SYSTEM = 'db.system';\nconst TMP_DB_CONNECTION_STRING = 'db.connection_string';\nconst TMP_DB_USER = 'db.user';\nconst TMP_DB_JDBC_DRIVER_CLASSNAME = 'db.jdbc.driver_classname';\nconst TMP_DB_NAME = 'db.name';\nconst TMP_DB_STATEMENT = 'db.statement';\nconst TMP_DB_OPERATION = 'db.operation';\nconst TMP_DB_MSSQL_INSTANCE_NAME = 'db.mssql.instance_name';\nconst TMP_DB_CASSANDRA_KEYSPACE = 'db.cassandra.keyspace';\nconst TMP_DB_CASSANDRA_PAGE_SIZE = 'db.cassandra.page_size';\nconst TMP_DB_CASSANDRA_CONSISTENCY_LEVEL = 'db.cassandra.consistency_level';\nconst TMP_DB_CASSANDRA_TABLE = 'db.cassandra.table';\nconst TMP_DB_CASSANDRA_IDEMPOTENCE = 'db.cassandra.idempotence';\nconst TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = 'db.cassandra.speculative_execution_count';\nconst TMP_DB_CASSANDRA_COORDINATOR_ID = 'db.cassandra.coordinator.id';\nconst TMP_DB_CASSANDRA_COORDINATOR_DC = 'db.cassandra.coordinator.dc';\nconst TMP_DB_HBASE_NAMESPACE = 'db.hbase.namespace';\nconst TMP_DB_REDIS_DATABASE_INDEX = 'db.redis.database_index';\nconst TMP_DB_MONGODB_COLLECTION = 'db.mongodb.collection';\nconst TMP_DB_SQL_TABLE = 'db.sql.table';\nconst TMP_EXCEPTION_TYPE = 'exception.type';\nconst TMP_EXCEPTION_MESSAGE = 'exception.message';\nconst TMP_EXCEPTION_STACKTRACE = 'exception.stacktrace';\nconst TMP_EXCEPTION_ESCAPED = 'exception.escaped';\nconst TMP_FAAS_TRIGGER = 'faas.trigger';\nconst TMP_FAAS_EXECUTION = 'faas.execution';\nconst TMP_FAAS_DOCUMENT_COLLECTION = 'faas.document.collection';\nconst TMP_FAAS_DOCUMENT_OPERATION = 'faas.document.operation';\nconst TMP_FAAS_DOCUMENT_TIME = 'faas.document.time';\nconst TMP_FAAS_DOCUMENT_NAME = 'faas.document.name';\nconst TMP_FAAS_TIME = 'faas.time';\nconst TMP_FAAS_CRON = 'faas.cron';\nconst TMP_FAAS_COLDSTART = 'faas.coldstart';\nconst TMP_FAAS_INVOKED_NAME = 'faas.invoked_name';\nconst TMP_FAAS_INVOKED_PROVIDER = 'faas.invoked_provider';\nconst TMP_FAAS_INVOKED_REGION = 'faas.invoked_region';\nconst TMP_NET_TRANSPORT = 'net.transport';\nconst TMP_NET_PEER_IP = 'net.peer.ip';\nconst TMP_NET_PEER_PORT = 'net.peer.port';\nconst TMP_NET_PEER_NAME = 'net.peer.name';\nconst TMP_NET_HOST_IP = 'net.host.ip';\nconst TMP_NET_HOST_PORT = 'net.host.port';\nconst TMP_NET_HOST_NAME = 'net.host.name';\nconst TMP_NET_HOST_CONNECTION_TYPE = 'net.host.connection.type';\nconst TMP_NET_HOST_CONNECTION_SUBTYPE = 'net.host.connection.subtype';\nconst TMP_NET_HOST_CARRIER_NAME = 'net.host.carrier.name';\nconst TMP_NET_HOST_CARRIER_MCC = 'net.host.carrier.mcc';\nconst TMP_NET_HOST_CARRIER_MNC = 'net.host.carrier.mnc';\nconst TMP_NET_HOST_CARRIER_ICC = 'net.host.carrier.icc';\nconst TMP_PEER_SERVICE = 'peer.service';\nconst TMP_ENDUSER_ID = 'enduser.id';\nconst TMP_ENDUSER_ROLE = 'enduser.role';\nconst TMP_ENDUSER_SCOPE = 'enduser.scope';\nconst TMP_THREAD_ID = 'thread.id';\nconst TMP_THREAD_NAME = 'thread.name';\nconst TMP_CODE_FUNCTION = 'code.function';\nconst TMP_CODE_NAMESPACE = 'code.namespace';\nconst TMP_CODE_FILEPATH = 'code.filepath';\nconst TMP_CODE_LINENO = 'code.lineno';\nconst TMP_HTTP_METHOD = 'http.method';\nconst TMP_HTTP_URL = 'http.url';\nconst TMP_HTTP_TARGET = 'http.target';\nconst TMP_HTTP_HOST = 'http.host';\nconst TMP_HTTP_SCHEME = 'http.scheme';\nconst TMP_HTTP_STATUS_CODE = 'http.status_code';\nconst TMP_HTTP_FLAVOR = 'http.flavor';\nconst TMP_HTTP_USER_AGENT = 'http.user_agent';\nconst TMP_HTTP_REQUEST_CONTENT_LENGTH = 'http.request_content_length';\nconst TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = 'http.request_content_length_uncompressed';\nconst TMP_HTTP_RESPONSE_CONTENT_LENGTH = 'http.response_content_length';\nconst TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = 'http.response_content_length_uncompressed';\nconst TMP_HTTP_SERVER_NAME = 'http.server_name';\nconst TMP_HTTP_ROUTE = 'http.route';\nconst TMP_HTTP_CLIENT_IP = 'http.client_ip';\nconst TMP_AWS_DYNAMODB_TABLE_NAMES = 'aws.dynamodb.table_names';\nconst TMP_AWS_DYNAMODB_CONSUMED_CAPACITY = 'aws.dynamodb.consumed_capacity';\nconst TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = 'aws.dynamodb.item_collection_metrics';\nconst TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = 'aws.dynamodb.provisioned_read_capacity';\nconst TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = 'aws.dynamodb.provisioned_write_capacity';\nconst TMP_AWS_DYNAMODB_CONSISTENT_READ = 'aws.dynamodb.consistent_read';\nconst TMP_AWS_DYNAMODB_PROJECTION = 'aws.dynamodb.projection';\nconst TMP_AWS_DYNAMODB_LIMIT = 'aws.dynamodb.limit';\nconst TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET = 'aws.dynamodb.attributes_to_get';\nconst TMP_AWS_DYNAMODB_INDEX_NAME = 'aws.dynamodb.index_name';\nconst TMP_AWS_DYNAMODB_SELECT = 'aws.dynamodb.select';\nconst TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = 'aws.dynamodb.global_secondary_indexes';\nconst TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = 'aws.dynamodb.local_secondary_indexes';\nconst TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = 'aws.dynamodb.exclusive_start_table';\nconst TMP_AWS_DYNAMODB_TABLE_COUNT = 'aws.dynamodb.table_count';\nconst TMP_AWS_DYNAMODB_SCAN_FORWARD = 'aws.dynamodb.scan_forward';\nconst TMP_AWS_DYNAMODB_SEGMENT = 'aws.dynamodb.segment';\nconst TMP_AWS_DYNAMODB_TOTAL_SEGMENTS = 'aws.dynamodb.total_segments';\nconst TMP_AWS_DYNAMODB_COUNT = 'aws.dynamodb.count';\nconst TMP_AWS_DYNAMODB_SCANNED_COUNT = 'aws.dynamodb.scanned_count';\nconst TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = 'aws.dynamodb.attribute_definitions';\nconst TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = 'aws.dynamodb.global_secondary_index_updates';\nconst TMP_MESSAGING_SYSTEM = 'messaging.system';\nconst TMP_MESSAGING_DESTINATION = 'messaging.destination';\nconst TMP_MESSAGING_DESTINATION_KIND = 'messaging.destination_kind';\nconst TMP_MESSAGING_TEMP_DESTINATION = 'messaging.temp_destination';\nconst TMP_MESSAGING_PROTOCOL = 'messaging.protocol';\nconst TMP_MESSAGING_PROTOCOL_VERSION = 'messaging.protocol_version';\nconst TMP_MESSAGING_URL = 'messaging.url';\nconst TMP_MESSAGING_MESSAGE_ID = 'messaging.message_id';\nconst TMP_MESSAGING_CONVERSATION_ID = 'messaging.conversation_id';\nconst TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = 'messaging.message_payload_size_bytes';\nconst TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = 'messaging.message_payload_compressed_size_bytes';\nconst TMP_MESSAGING_OPERATION = 'messaging.operation';\nconst TMP_MESSAGING_CONSUMER_ID = 'messaging.consumer_id';\nconst TMP_MESSAGING_RABBITMQ_ROUTING_KEY = 'messaging.rabbitmq.routing_key';\nconst TMP_MESSAGING_KAFKA_MESSAGE_KEY = 'messaging.kafka.message_key';\nconst TMP_MESSAGING_KAFKA_CONSUMER_GROUP = 'messaging.kafka.consumer_group';\nconst TMP_MESSAGING_KAFKA_CLIENT_ID = 'messaging.kafka.client_id';\nconst TMP_MESSAGING_KAFKA_PARTITION = 'messaging.kafka.partition';\nconst TMP_MESSAGING_KAFKA_TOMBSTONE = 'messaging.kafka.tombstone';\nconst TMP_RPC_SYSTEM = 'rpc.system';\nconst TMP_RPC_SERVICE = 'rpc.service';\nconst TMP_RPC_METHOD = 'rpc.method';\nconst TMP_RPC_GRPC_STATUS_CODE = 'rpc.grpc.status_code';\nconst TMP_RPC_JSONRPC_VERSION = 'rpc.jsonrpc.version';\nconst TMP_RPC_JSONRPC_REQUEST_ID = 'rpc.jsonrpc.request_id';\nconst TMP_RPC_JSONRPC_ERROR_CODE = 'rpc.jsonrpc.error_code';\nconst TMP_RPC_JSONRPC_ERROR_MESSAGE = 'rpc.jsonrpc.error_message';\nconst TMP_MESSAGE_TYPE = 'message.type';\nconst TMP_MESSAGE_ID = 'message.id';\nconst TMP_MESSAGE_COMPRESSED_SIZE = 'message.compressed_size';\nconst TMP_MESSAGE_UNCOMPRESSED_SIZE = 'message.uncompressed_size';\n/**\n * The full invoked ARN as provided on the `Context` passed to the function (`Lambda-Runtime-Invoked-Function-Arn` header on the `/runtime/invocation/next` applicable).\n *\n * Note: This may be different from `faas.id` if an alias is involved.\n *\n * @deprecated Use ATTR_AWS_LAMBDA_INVOKED_ARN in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_LAMBDA_INVOKED_ARN = TMP_AWS_LAMBDA_INVOKED_ARN;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use ATTR_DB_SYSTEM in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_SYSTEM = TMP_DB_SYSTEM;\n/**\n * The connection string used to connect to the database. It is recommended to remove embedded credentials.\n *\n * @deprecated Use ATTR_DB_CONNECTION_STRING in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_CONNECTION_STRING = TMP_DB_CONNECTION_STRING;\n/**\n * Username for accessing the database.\n *\n * @deprecated Use ATTR_DB_USER in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_USER = TMP_DB_USER;\n/**\n * The fully-qualified class name of the [Java Database Connectivity (JDBC)](https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/) driver used to connect.\n *\n * @deprecated Use ATTR_DB_JDBC_DRIVER_CLASSNAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_JDBC_DRIVER_CLASSNAME = TMP_DB_JDBC_DRIVER_CLASSNAME;\n/**\n * If no [tech-specific attribute](#call-level-attributes-for-specific-technologies) is defined, this attribute is used to report the name of the database being accessed. For commands that switch the database, this should be set to the target database (even if the command fails).\n *\n * Note: In some SQL databases, the database name to be used is called &#34;schema name&#34;.\n *\n * @deprecated Use ATTR_DB_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_NAME = TMP_DB_NAME;\n/**\n * The database statement being executed.\n *\n * Note: The value may be sanitized to exclude sensitive information.\n *\n * @deprecated Use ATTR_DB_STATEMENT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_STATEMENT = TMP_DB_STATEMENT;\n/**\n * The name of the operation being executed, e.g. the [MongoDB command name](https://docs.mongodb.com/manual/reference/command/#database-operations) such as `findAndModify`, or the SQL keyword.\n *\n * Note: When setting this to an SQL keyword, it is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if the operation name is provided by the library being instrumented. If the SQL statement has an ambiguous operation, or performs more than one operation, this value may be omitted.\n *\n * @deprecated Use ATTR_DB_OPERATION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_OPERATION = TMP_DB_OPERATION;\n/**\n * The Microsoft SQL Server [instance name](https://docs.microsoft.com/en-us/sql/connect/jdbc/building-the-connection-url?view=sql-server-ver15) connecting to. This name is used to determine the port of a named instance.\n *\n * Note: If setting a `db.mssql.instance_name`, `net.peer.port` is no longer required (but still recommended if non-standard).\n *\n * @deprecated Use ATTR_DB_MSSQL_INSTANCE_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_MSSQL_INSTANCE_NAME = TMP_DB_MSSQL_INSTANCE_NAME;\n/**\n * The name of the keyspace being accessed. To be used instead of the generic `db.name` attribute.\n *\n * @deprecated Use ATTR_DB_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_CASSANDRA_KEYSPACE = TMP_DB_CASSANDRA_KEYSPACE;\n/**\n * The fetch size used for paging, i.e. how many rows will be returned at once.\n *\n * @deprecated Use ATTR_DB_CASSANDRA_PAGE_SIZE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_CASSANDRA_PAGE_SIZE = TMP_DB_CASSANDRA_PAGE_SIZE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use ATTR_DB_CASSANDRA_CONSISTENCY_LEVEL in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL = TMP_DB_CASSANDRA_CONSISTENCY_LEVEL;\n/**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: This mirrors the db.sql.table attribute but references cassandra rather than sql. It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n *\n * @deprecated Use ATTR_DB_CASSANDRA_TABLE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_CASSANDRA_TABLE = TMP_DB_CASSANDRA_TABLE;\n/**\n * Whether or not the query is idempotent.\n *\n * @deprecated Use ATTR_DB_CASSANDRA_IDEMPOTENCE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_CASSANDRA_IDEMPOTENCE = TMP_DB_CASSANDRA_IDEMPOTENCE;\n/**\n * The number of times a query was speculatively executed. Not set or `0` if the query was not executed speculatively.\n *\n * @deprecated Use ATTR_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT = TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT;\n/**\n * The ID of the coordinating node for a query.\n *\n * @deprecated Use ATTR_DB_CASSANDRA_COORDINATOR_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_CASSANDRA_COORDINATOR_ID = TMP_DB_CASSANDRA_COORDINATOR_ID;\n/**\n * The data center of the coordinating node for a query.\n *\n * @deprecated Use ATTR_DB_CASSANDRA_COORDINATOR_DC in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_CASSANDRA_COORDINATOR_DC = TMP_DB_CASSANDRA_COORDINATOR_DC;\n/**\n * The [HBase namespace](https://hbase.apache.org/book.html#_namespace) being accessed. To be used instead of the generic `db.name` attribute.\n *\n * @deprecated Use ATTR_DB_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_HBASE_NAMESPACE = TMP_DB_HBASE_NAMESPACE;\n/**\n * The index of the database being accessed as used in the [`SELECT` command](https://redis.io/commands/select), provided as an integer. To be used instead of the generic `db.name` attribute.\n *\n * @deprecated Use ATTR_DB_REDIS_DATABASE_INDEX in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_REDIS_DATABASE_INDEX = TMP_DB_REDIS_DATABASE_INDEX;\n/**\n * The collection being accessed within the database stated in `db.name`.\n *\n * @deprecated Use ATTR_DB_MONGODB_COLLECTION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_MONGODB_COLLECTION = TMP_DB_MONGODB_COLLECTION;\n/**\n * The name of the primary table that the operation is acting upon, including the schema name (if applicable).\n *\n * Note: It is not recommended to attempt any client-side parsing of `db.statement` just to get this property, but it should be set if it is provided by the library being instrumented. If the operation is acting upon an anonymous table, or more than one table, this value MUST NOT be set.\n *\n * @deprecated Use ATTR_DB_SQL_TABLE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_DB_SQL_TABLE = TMP_DB_SQL_TABLE;\n/**\n * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.\n *\n * @deprecated Use ATTR_EXCEPTION_TYPE.\n */\nexport const SEMATTRS_EXCEPTION_TYPE = TMP_EXCEPTION_TYPE;\n/**\n * The exception message.\n *\n * @deprecated Use ATTR_EXCEPTION_MESSAGE.\n */\nexport const SEMATTRS_EXCEPTION_MESSAGE = TMP_EXCEPTION_MESSAGE;\n/**\n * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.\n *\n * @deprecated Use ATTR_EXCEPTION_STACKTRACE.\n */\nexport const SEMATTRS_EXCEPTION_STACKTRACE = TMP_EXCEPTION_STACKTRACE;\n/**\n* SHOULD be set to true if the exception event is recorded at a point where it is known that the exception is escaping the scope of the span.\n*\n* Note: An exception is considered to have escaped (or left) the scope of a span,\nif that span is ended while the exception is still logically &#34;in flight&#34;.\nThis may be actually &#34;in flight&#34; in some languages (e.g. if the exception\nis passed to a Context manager&#39;s `__exit__` method in Python) but will\nusually be caught at the point of recording the exception in most languages.\n\nIt is usually not possible to determine at the point where an exception is thrown\nwhether it will escape the scope of a span.\nHowever, it is trivial to know that an exception\nwill escape, if one checks for an active exception just before ending the span,\nas done in the [example above](#exception-end-example).\n\nIt follows that an exception may still escape the scope of the span\neven if the `exception.escaped` attribute was not set or set to false,\nsince the event might have been recorded at a time where it was not\nclear whether the exception will escape.\n*\n* @deprecated Use ATTR_EXCEPTION_ESCAPED.\n*/\nexport const SEMATTRS_EXCEPTION_ESCAPED = TMP_EXCEPTION_ESCAPED;\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use ATTR_FAAS_TRIGGER in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_FAAS_TRIGGER = TMP_FAAS_TRIGGER;\n/**\n * The execution ID of the current function execution.\n *\n * @deprecated Use ATTR_FAAS_INVOCATION_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_FAAS_EXECUTION = TMP_FAAS_EXECUTION;\n/**\n * The name of the source on which the triggering operation was performed. For example, in Cloud Storage or S3 corresponds to the bucket name, and in Cosmos DB to the database name.\n *\n * @deprecated Use ATTR_FAAS_DOCUMENT_COLLECTION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_FAAS_DOCUMENT_COLLECTION = TMP_FAAS_DOCUMENT_COLLECTION;\n/**\n * Describes the type of the operation that was performed on the data.\n *\n * @deprecated Use ATTR_FAAS_DOCUMENT_OPERATION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_FAAS_DOCUMENT_OPERATION = TMP_FAAS_DOCUMENT_OPERATION;\n/**\n * A string containing the time when the data was accessed in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n *\n * @deprecated Use ATTR_FAAS_DOCUMENT_TIME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_FAAS_DOCUMENT_TIME = TMP_FAAS_DOCUMENT_TIME;\n/**\n * The document name/table subjected to the operation. For example, in Cloud Storage or S3 is the name of the file, and in Cosmos DB the table name.\n *\n * @deprecated Use ATTR_FAAS_DOCUMENT_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_FAAS_DOCUMENT_NAME = TMP_FAAS_DOCUMENT_NAME;\n/**\n * A string containing the function invocation time in the [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format expressed in [UTC](https://www.w3.org/TR/NOTE-datetime).\n *\n * @deprecated Use ATTR_FAAS_TIME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_FAAS_TIME = TMP_FAAS_TIME;\n/**\n * A string containing the schedule period as [Cron Expression](https://docs.oracle.com/cd/E12058_01/doc/doc.1014/e12030/cron_expressions.htm).\n *\n * @deprecated Use ATTR_FAAS_CRON in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_FAAS_CRON = TMP_FAAS_CRON;\n/**\n * A boolean that is true if the serverless function is executed for the first time (aka cold-start).\n *\n * @deprecated Use ATTR_FAAS_COLDSTART in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_FAAS_COLDSTART = TMP_FAAS_COLDSTART;\n/**\n * The name of the invoked function.\n *\n * Note: SHOULD be equal to the `faas.name` resource attribute of the invoked function.\n *\n * @deprecated Use ATTR_FAAS_INVOKED_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_FAAS_INVOKED_NAME = TMP_FAAS_INVOKED_NAME;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n *\n * @deprecated Use ATTR_FAAS_INVOKED_PROVIDER in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_FAAS_INVOKED_PROVIDER = TMP_FAAS_INVOKED_PROVIDER;\n/**\n * The cloud region of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.region` resource attribute of the invoked function.\n *\n * @deprecated Use ATTR_FAAS_INVOKED_REGION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_FAAS_INVOKED_REGION = TMP_FAAS_INVOKED_REGION;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use ATTR_NET_TRANSPORT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_NET_TRANSPORT = TMP_NET_TRANSPORT;\n/**\n * Remote address of the peer (dotted decimal for IPv4 or [RFC5952](https://tools.ietf.org/html/rfc5952) for IPv6).\n *\n * @deprecated Use ATTR_NET_PEER_IP in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_NET_PEER_IP = TMP_NET_PEER_IP;\n/**\n * Remote port number.\n *\n * @deprecated Use ATTR_NET_PEER_PORT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_NET_PEER_PORT = TMP_NET_PEER_PORT;\n/**\n * Remote hostname or similar, see note below.\n *\n * @deprecated Use ATTR_NET_PEER_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_NET_PEER_NAME = TMP_NET_PEER_NAME;\n/**\n * Like `net.peer.ip` but for the host IP. Useful in case of a multi-IP host.\n *\n * @deprecated Use ATTR_NET_HOST_IP in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_NET_HOST_IP = TMP_NET_HOST_IP;\n/**\n * Like `net.peer.port` but for the host port.\n *\n * @deprecated Use ATTR_NET_HOST_PORT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_NET_HOST_PORT = TMP_NET_HOST_PORT;\n/**\n * Local hostname or similar, see note below.\n *\n * @deprecated Use ATTR_NET_HOST_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_NET_HOST_NAME = TMP_NET_HOST_NAME;\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use ATTR_NETWORK_CONNECTION_TYPE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_NET_HOST_CONNECTION_TYPE = TMP_NET_HOST_CONNECTION_TYPE;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use ATTR_NETWORK_CONNECTION_SUBTYPE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_NET_HOST_CONNECTION_SUBTYPE = TMP_NET_HOST_CONNECTION_SUBTYPE;\n/**\n * The name of the mobile carrier.\n *\n * @deprecated Use ATTR_NETWORK_CARRIER_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_NET_HOST_CARRIER_NAME = TMP_NET_HOST_CARRIER_NAME;\n/**\n * The mobile carrier country code.\n *\n * @deprecated Use ATTR_NETWORK_CARRIER_MCC in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_NET_HOST_CARRIER_MCC = TMP_NET_HOST_CARRIER_MCC;\n/**\n * The mobile carrier network code.\n *\n * @deprecated Use ATTR_NETWORK_CARRIER_MNC in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_NET_HOST_CARRIER_MNC = TMP_NET_HOST_CARRIER_MNC;\n/**\n * The ISO 3166-1 alpha-2 2-character country code associated with the mobile carrier network.\n *\n * @deprecated Use ATTR_NETWORK_CARRIER_ICC in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_NET_HOST_CARRIER_ICC = TMP_NET_HOST_CARRIER_ICC;\n/**\n * The [`service.name`](../../resource/semantic_conventions/README.md#service) of the remote service. SHOULD be equal to the actual `service.name` resource attribute of the remote service if any.\n *\n * @deprecated Use ATTR_PEER_SERVICE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_PEER_SERVICE = TMP_PEER_SERVICE;\n/**\n * Username or client_id extracted from the access token or [Authorization](https://tools.ietf.org/html/rfc7235#section-4.2) header in the inbound request from outside the system.\n *\n * @deprecated Use ATTR_ENDUSER_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_ENDUSER_ID = TMP_ENDUSER_ID;\n/**\n * Actual/assumed role the client is making the request under extracted from token or application security context.\n *\n * @deprecated Use ATTR_ENDUSER_ROLE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_ENDUSER_ROLE = TMP_ENDUSER_ROLE;\n/**\n * Scopes or granted authorities the client currently possesses extracted from token or application security context. The value would come from the scope associated with an [OAuth 2.0 Access Token](https://tools.ietf.org/html/rfc6749#section-3.3) or an attribute value in a [SAML 2.0 Assertion](http://docs.oasis-open.org/security/saml/Post2.0/sstc-saml-tech-overview-2.0.html).\n *\n * @deprecated Use ATTR_ENDUSER_SCOPE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_ENDUSER_SCOPE = TMP_ENDUSER_SCOPE;\n/**\n * Current &#34;managed&#34; thread ID (as opposed to OS thread ID).\n *\n * @deprecated Use ATTR_THREAD_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_THREAD_ID = TMP_THREAD_ID;\n/**\n * Current thread name.\n *\n * @deprecated Use ATTR_THREAD_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_THREAD_NAME = TMP_THREAD_NAME;\n/**\n * The method or function name, or equivalent (usually rightmost part of the code unit&#39;s name).\n *\n * @deprecated Use ATTR_CODE_FUNCTION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_CODE_FUNCTION = TMP_CODE_FUNCTION;\n/**\n * The &#34;namespace&#34; within which `code.function` is defined. Usually the qualified class or module name, such that `code.namespace` + some separator + `code.function` form a unique identifier for the code unit.\n *\n * @deprecated Use ATTR_CODE_NAMESPACE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_CODE_NAMESPACE = TMP_CODE_NAMESPACE;\n/**\n * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path).\n *\n * @deprecated Use ATTR_CODE_FILEPATH in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_CODE_FILEPATH = TMP_CODE_FILEPATH;\n/**\n * The line number in `code.filepath` best representing the operation. It SHOULD point within the code unit named in `code.function`.\n *\n * @deprecated Use ATTR_CODE_LINENO in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_CODE_LINENO = TMP_CODE_LINENO;\n/**\n * HTTP request method.\n *\n * @deprecated Use ATTR_HTTP_METHOD in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_HTTP_METHOD = TMP_HTTP_METHOD;\n/**\n * Full HTTP request URL in the form `scheme://host[:port]/path?query[#fragment]`. Usually the fragment is not transmitted over HTTP, but if it is known, it should be included nevertheless.\n *\n * Note: `http.url` MUST NOT contain credentials passed via URL in form of `https://username:password@www.example.com/`. In such case the attribute&#39;s value should be `https://www.example.com/`.\n *\n * @deprecated Use ATTR_HTTP_URL in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_HTTP_URL = TMP_HTTP_URL;\n/**\n * The full request target as passed in a HTTP request line or equivalent.\n *\n * @deprecated Use ATTR_HTTP_TARGET in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_HTTP_TARGET = TMP_HTTP_TARGET;\n/**\n * The value of the [HTTP host header](https://tools.ietf.org/html/rfc7230#section-5.4). An empty Host header should also be reported, see note.\n *\n * Note: When the header is present but empty the attribute SHOULD be set to the empty string. Note that this is a valid situation that is expected in certain cases, according the aforementioned [section of RFC 7230](https://tools.ietf.org/html/rfc7230#section-5.4). When the header is not set the attribute MUST NOT be set.\n *\n * @deprecated Use ATTR_HTTP_HOST in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_HTTP_HOST = TMP_HTTP_HOST;\n/**\n * The URI scheme identifying the used protocol.\n *\n * @deprecated Use ATTR_HTTP_SCHEME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_HTTP_SCHEME = TMP_HTTP_SCHEME;\n/**\n * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\n *\n * @deprecated Use ATTR_HTTP_STATUS_CODE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_HTTP_STATUS_CODE = TMP_HTTP_STATUS_CODE;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use ATTR_HTTP_FLAVOR in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_HTTP_FLAVOR = TMP_HTTP_FLAVOR;\n/**\n * Value of the [HTTP User-Agent](https://tools.ietf.org/html/rfc7231#section-5.5.3) header sent by the client.\n *\n * @deprecated Use ATTR_HTTP_USER_AGENT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_HTTP_USER_AGENT = TMP_HTTP_USER_AGENT;\n/**\n * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n *\n * @deprecated Use ATTR_HTTP_REQUEST_CONTENT_LENGTH in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH = TMP_HTTP_REQUEST_CONTENT_LENGTH;\n/**\n * The size of the uncompressed request payload body after transport decoding. Not set if transport encoding not used.\n *\n * @deprecated Use ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED;\n/**\n * The size of the response payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://tools.ietf.org/html/rfc7230#section-3.3.2) header. For requests using transport encoding, this should be the compressed size.\n *\n * @deprecated Use ATTR_HTTP_RESPONSE_CONTENT_LENGTH in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH = TMP_HTTP_RESPONSE_CONTENT_LENGTH;\n/**\n * The size of the uncompressed response payload body after transport decoding. Not set if transport encoding not used.\n *\n * @deprecated Use ATTR_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED;\n/**\n * The primary server name of the matched virtual host. This should be obtained via configuration. If no such configuration can be obtained, this attribute MUST NOT be set ( `net.host.name` should be used instead).\n *\n * Note: `http.url` is usually not readily available on the server side but would have to be assembled in a cumbersome and sometimes lossy process from other information (see e.g. open-telemetry/opentelemetry-python/pull/148). It is thus preferred to supply the raw data that is available.\n *\n * @deprecated Use ATTR_HTTP_SERVER_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_HTTP_SERVER_NAME = TMP_HTTP_SERVER_NAME;\n/**\n * The matched route (path template).\n *\n * @deprecated Use ATTR_HTTP_ROUTE.\n */\nexport const SEMATTRS_HTTP_ROUTE = TMP_HTTP_ROUTE;\n/**\n* The IP address of the original client behind all proxies, if known (e.g. from [X-Forwarded-For](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For)).\n*\n* Note: This is not necessarily the same as `net.peer.ip`, which would\nidentify the network-level peer, which may be a proxy.\n\nThis attribute should be set when a source of information different\nfrom the one used for `net.peer.ip`, is available even if that other\nsource just confirms the same value as `net.peer.ip`.\nRationale: For `net.peer.ip`, one typically does not know if it\ncomes from a proxy, reverse proxy, or the actual client. Setting\n`http.client_ip` when it&#39;s the same as `net.peer.ip` means that\none is at least somewhat confident that the address is not that of\nthe closest proxy.\n*\n* @deprecated Use ATTR_HTTP_CLIENT_IP in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n*/\nexport const SEMATTRS_HTTP_CLIENT_IP = TMP_HTTP_CLIENT_IP;\n/**\n * The keys in the `RequestItems` object field.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_TABLE_NAMES in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_TABLE_NAMES = TMP_AWS_DYNAMODB_TABLE_NAMES;\n/**\n * The JSON-serialized value of each item in the `ConsumedCapacity` response field.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_CONSUMED_CAPACITY in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY = TMP_AWS_DYNAMODB_CONSUMED_CAPACITY;\n/**\n * The JSON-serialized value of the `ItemCollectionMetrics` response field.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_ITEM_COLLECTION_METRICS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS = TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS;\n/**\n * The value of the `ProvisionedThroughput.ReadCapacityUnits` request parameter.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY = TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY;\n/**\n * The value of the `ProvisionedThroughput.WriteCapacityUnits` request parameter.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY = TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY;\n/**\n * The value of the `ConsistentRead` request parameter.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_CONSISTENT_READ in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ = TMP_AWS_DYNAMODB_CONSISTENT_READ;\n/**\n * The value of the `ProjectionExpression` request parameter.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_PROJECTION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_PROJECTION = TMP_AWS_DYNAMODB_PROJECTION;\n/**\n * The value of the `Limit` request parameter.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_LIMIT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_LIMIT = TMP_AWS_DYNAMODB_LIMIT;\n/**\n * The value of the `AttributesToGet` request parameter.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_ATTRIBUTES_TO_GET in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET = TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET;\n/**\n * The value of the `IndexName` request parameter.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_INDEX_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_INDEX_NAME = TMP_AWS_DYNAMODB_INDEX_NAME;\n/**\n * The value of the `Select` request parameter.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_SELECT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_SELECT = TMP_AWS_DYNAMODB_SELECT;\n/**\n * The JSON-serialized value of each item of the `GlobalSecondaryIndexes` request field.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES = TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES;\n/**\n * The JSON-serialized value of each item of the `LocalSecondaryIndexes` request field.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES = TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES;\n/**\n * The value of the `ExclusiveStartTableName` request parameter.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_EXCLUSIVE_START_TABLE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE = TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE;\n/**\n * The the number of items in the `TableNames` response parameter.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_TABLE_COUNT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_TABLE_COUNT = TMP_AWS_DYNAMODB_TABLE_COUNT;\n/**\n * The value of the `ScanIndexForward` request parameter.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_SCAN_FORWARD in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD = TMP_AWS_DYNAMODB_SCAN_FORWARD;\n/**\n * The value of the `Segment` request parameter.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_SEGMENT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_SEGMENT = TMP_AWS_DYNAMODB_SEGMENT;\n/**\n * The value of the `TotalSegments` request parameter.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_TOTAL_SEGMENTS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS = TMP_AWS_DYNAMODB_TOTAL_SEGMENTS;\n/**\n * The value of the `Count` response parameter.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_COUNT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_COUNT = TMP_AWS_DYNAMODB_COUNT;\n/**\n * The value of the `ScannedCount` response parameter.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_SCANNED_COUNT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT = TMP_AWS_DYNAMODB_SCANNED_COUNT;\n/**\n * The JSON-serialized value of each item in the `AttributeDefinitions` request field.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS = TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS;\n/**\n * The JSON-serialized value of each item in the the `GlobalSecondaryIndexUpdates` request field.\n *\n * @deprecated Use ATTR_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES = TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES;\n/**\n * A string identifying the messaging system.\n *\n * @deprecated Use ATTR_MESSAGING_SYSTEM in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGING_SYSTEM = TMP_MESSAGING_SYSTEM;\n/**\n * The message destination name. This might be equal to the span name but is required nevertheless.\n *\n * @deprecated Use ATTR_MESSAGING_DESTINATION_NAME in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGING_DESTINATION = TMP_MESSAGING_DESTINATION;\n/**\n * The kind of message destination.\n *\n * @deprecated Removed in semconv v1.20.0.\n */\nexport const SEMATTRS_MESSAGING_DESTINATION_KIND = TMP_MESSAGING_DESTINATION_KIND;\n/**\n * A boolean that is true if the message destination is temporary.\n *\n * @deprecated Use ATTR_MESSAGING_DESTINATION_TEMPORARY in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGING_TEMP_DESTINATION = TMP_MESSAGING_TEMP_DESTINATION;\n/**\n * The name of the transport protocol.\n *\n * @deprecated Use ATTR_NETWORK_PROTOCOL_NAME.\n */\nexport const SEMATTRS_MESSAGING_PROTOCOL = TMP_MESSAGING_PROTOCOL;\n/**\n * The version of the transport protocol.\n *\n * @deprecated Use ATTR_NETWORK_PROTOCOL_VERSION.\n */\nexport const SEMATTRS_MESSAGING_PROTOCOL_VERSION = TMP_MESSAGING_PROTOCOL_VERSION;\n/**\n * Connection string.\n *\n * @deprecated Removed in semconv v1.17.0.\n */\nexport const SEMATTRS_MESSAGING_URL = TMP_MESSAGING_URL;\n/**\n * A value used by the messaging system as an identifier for the message, represented as a string.\n *\n * @deprecated Use ATTR_MESSAGING_MESSAGE_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGING_MESSAGE_ID = TMP_MESSAGING_MESSAGE_ID;\n/**\n * The [conversation ID](#conversations) identifying the conversation to which the message belongs, represented as a string. Sometimes called &#34;Correlation ID&#34;.\n *\n * @deprecated Use ATTR_MESSAGING_MESSAGE_CONVERSATION_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGING_CONVERSATION_ID = TMP_MESSAGING_CONVERSATION_ID;\n/**\n * The (uncompressed) size of the message payload in bytes. Also use this attribute if it is unknown whether the compressed or uncompressed payload size is reported.\n *\n * @deprecated Use ATTR_MESSAGING_MESSAGE_BODY_SIZE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES = TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES;\n/**\n * The compressed size of the message payload in bytes.\n *\n * @deprecated Removed in semconv v1.22.0.\n */\nexport const SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES = TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES;\n/**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is &#34;send&#34;, this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n *\n * @deprecated Use ATTR_MESSAGING_OPERATION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGING_OPERATION = TMP_MESSAGING_OPERATION;\n/**\n * The identifier for the consumer receiving a message. For Kafka, set it to `{messaging.kafka.consumer_group} - {messaging.kafka.client_id}`, if both are present, or only `messaging.kafka.consumer_group`. For brokers, such as RabbitMQ and Artemis, set it to the `client_id` of the client consuming the message.\n *\n * @deprecated Removed in semconv v1.21.0.\n */\nexport const SEMATTRS_MESSAGING_CONSUMER_ID = TMP_MESSAGING_CONSUMER_ID;\n/**\n * RabbitMQ message routing key.\n *\n * @deprecated Use ATTR_MESSAGING_RABBITMQ_DESTINATION_ROUTING_KEY in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY = TMP_MESSAGING_RABBITMQ_ROUTING_KEY;\n/**\n * Message keys in Kafka are used for grouping alike messages to ensure they&#39;re processed on the same partition. They differ from `messaging.message_id` in that they&#39;re not unique. If the key is `null`, the attribute MUST NOT be set.\n *\n * Note: If the key type is not string, it&#39;s string representation has to be supplied for the attribute. If the key has no unambiguous, canonical string form, don&#39;t include its value.\n *\n * @deprecated Use ATTR_MESSAGING_KAFKA_MESSAGE_KEY in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY = TMP_MESSAGING_KAFKA_MESSAGE_KEY;\n/**\n * Name of the Kafka Consumer Group that is handling the message. Only applies to consumers, not producers.\n *\n * @deprecated Use ATTR_MESSAGING_KAFKA_CONSUMER_GROUP in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP = TMP_MESSAGING_KAFKA_CONSUMER_GROUP;\n/**\n * Client Id for the Consumer or Producer that is handling the message.\n *\n * @deprecated Use ATTR_MESSAGING_CLIENT_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGING_KAFKA_CLIENT_ID = TMP_MESSAGING_KAFKA_CLIENT_ID;\n/**\n * Partition the message is sent to.\n *\n * @deprecated Use ATTR_MESSAGING_KAFKA_DESTINATION_PARTITION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGING_KAFKA_PARTITION = TMP_MESSAGING_KAFKA_PARTITION;\n/**\n * A boolean that is true if the message is a tombstone.\n *\n * @deprecated Use ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGING_KAFKA_TOMBSTONE = TMP_MESSAGING_KAFKA_TOMBSTONE;\n/**\n * A string identifying the remoting system.\n *\n * @deprecated Use ATTR_RPC_SYSTEM in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_RPC_SYSTEM = TMP_RPC_SYSTEM;\n/**\n * The full (logical) name of the service being called, including its package name, if applicable.\n *\n * Note: This is the logical name of the service from the RPC interface perspective, which can be different from the name of any implementing class. The `code.namespace` attribute may be used to store the latter (despite the attribute name, it may include a class name; e.g., class with method actually executing the call on the server side, RPC client stub class on the client side).\n *\n * @deprecated Use ATTR_RPC_SERVICE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_RPC_SERVICE = TMP_RPC_SERVICE;\n/**\n * The name of the (logical) method being called, must be equal to the $method part in the span name.\n *\n * Note: This is the logical name of the method from the RPC interface perspective, which can be different from the name of any implementing method/function. The `code.function` attribute may be used to store the latter (e.g., method actually executing the call on the server side, RPC client stub method on the client side).\n *\n * @deprecated Use ATTR_RPC_METHOD in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_RPC_METHOD = TMP_RPC_METHOD;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use ATTR_RPC_GRPC_STATUS_CODE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_RPC_GRPC_STATUS_CODE = TMP_RPC_GRPC_STATUS_CODE;\n/**\n * Protocol version as in `jsonrpc` property of request/response. Since JSON-RPC 1.0 does not specify this, the value can be omitted.\n *\n * @deprecated Use ATTR_RPC_JSONRPC_VERSION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_RPC_JSONRPC_VERSION = TMP_RPC_JSONRPC_VERSION;\n/**\n * `id` property of request or response. Since protocol allows id to be int, string, `null` or missing (for notifications), value is expected to be cast to string for simplicity. Use empty string in case of `null` value. Omit entirely if this is a notification.\n *\n * @deprecated Use ATTR_RPC_JSONRPC_REQUEST_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_RPC_JSONRPC_REQUEST_ID = TMP_RPC_JSONRPC_REQUEST_ID;\n/**\n * `error.code` property of response if it is an error response.\n *\n * @deprecated Use ATTR_RPC_JSONRPC_ERROR_CODE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_RPC_JSONRPC_ERROR_CODE = TMP_RPC_JSONRPC_ERROR_CODE;\n/**\n * `error.message` property of response if it is an error response.\n *\n * @deprecated Use ATTR_RPC_JSONRPC_ERROR_MESSAGE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE = TMP_RPC_JSONRPC_ERROR_MESSAGE;\n/**\n * Whether this is a received or sent message.\n *\n * @deprecated Use ATTR_MESSAGE_TYPE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGE_TYPE = TMP_MESSAGE_TYPE;\n/**\n * MUST be calculated as two different counters starting from `1` one for sent messages and one for received message.\n *\n * Note: This way we guarantee that the values will be consistent between different implementations.\n *\n * @deprecated Use ATTR_MESSAGE_ID in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGE_ID = TMP_MESSAGE_ID;\n/**\n * Compressed size of the message in bytes.\n *\n * @deprecated Use ATTR_MESSAGE_COMPRESSED_SIZE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGE_COMPRESSED_SIZE = TMP_MESSAGE_COMPRESSED_SIZE;\n/**\n * Uncompressed size of the message in bytes.\n *\n * @deprecated Use ATTR_MESSAGE_UNCOMPRESSED_SIZE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE = TMP_MESSAGE_UNCOMPRESSED_SIZE;\n/**\n * Create exported Value Map for SemanticAttributes values\n * @deprecated Use the SEMATTRS_XXXXX constants rather than the SemanticAttributes.XXXXX for bundle minification\n */\nexport const SemanticAttributes = \n/*#__PURE__*/ createConstMap([\n TMP_AWS_LAMBDA_INVOKED_ARN,\n TMP_DB_SYSTEM,\n TMP_DB_CONNECTION_STRING,\n TMP_DB_USER,\n TMP_DB_JDBC_DRIVER_CLASSNAME,\n TMP_DB_NAME,\n TMP_DB_STATEMENT,\n TMP_DB_OPERATION,\n TMP_DB_MSSQL_INSTANCE_NAME,\n TMP_DB_CASSANDRA_KEYSPACE,\n TMP_DB_CASSANDRA_PAGE_SIZE,\n TMP_DB_CASSANDRA_CONSISTENCY_LEVEL,\n TMP_DB_CASSANDRA_TABLE,\n TMP_DB_CASSANDRA_IDEMPOTENCE,\n TMP_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT,\n TMP_DB_CASSANDRA_COORDINATOR_ID,\n TMP_DB_CASSANDRA_COORDINATOR_DC,\n TMP_DB_HBASE_NAMESPACE,\n TMP_DB_REDIS_DATABASE_INDEX,\n TMP_DB_MONGODB_COLLECTION,\n TMP_DB_SQL_TABLE,\n TMP_EXCEPTION_TYPE,\n TMP_EXCEPTION_MESSAGE,\n TMP_EXCEPTION_STACKTRACE,\n TMP_EXCEPTION_ESCAPED,\n TMP_FAAS_TRIGGER,\n TMP_FAAS_EXECUTION,\n TMP_FAAS_DOCUMENT_COLLECTION,\n TMP_FAAS_DOCUMENT_OPERATION,\n TMP_FAAS_DOCUMENT_TIME,\n TMP_FAAS_DOCUMENT_NAME,\n TMP_FAAS_TIME,\n TMP_FAAS_CRON,\n TMP_FAAS_COLDSTART,\n TMP_FAAS_INVOKED_NAME,\n TMP_FAAS_INVOKED_PROVIDER,\n TMP_FAAS_INVOKED_REGION,\n TMP_NET_TRANSPORT,\n TMP_NET_PEER_IP,\n TMP_NET_PEER_PORT,\n TMP_NET_PEER_NAME,\n TMP_NET_HOST_IP,\n TMP_NET_HOST_PORT,\n TMP_NET_HOST_NAME,\n TMP_NET_HOST_CONNECTION_TYPE,\n TMP_NET_HOST_CONNECTION_SUBTYPE,\n TMP_NET_HOST_CARRIER_NAME,\n TMP_NET_HOST_CARRIER_MCC,\n TMP_NET_HOST_CARRIER_MNC,\n TMP_NET_HOST_CARRIER_ICC,\n TMP_PEER_SERVICE,\n TMP_ENDUSER_ID,\n TMP_ENDUSER_ROLE,\n TMP_ENDUSER_SCOPE,\n TMP_THREAD_ID,\n TMP_THREAD_NAME,\n TMP_CODE_FUNCTION,\n TMP_CODE_NAMESPACE,\n TMP_CODE_FILEPATH,\n TMP_CODE_LINENO,\n TMP_HTTP_METHOD,\n TMP_HTTP_URL,\n TMP_HTTP_TARGET,\n TMP_HTTP_HOST,\n TMP_HTTP_SCHEME,\n TMP_HTTP_STATUS_CODE,\n TMP_HTTP_FLAVOR,\n TMP_HTTP_USER_AGENT,\n TMP_HTTP_REQUEST_CONTENT_LENGTH,\n TMP_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED,\n TMP_HTTP_RESPONSE_CONTENT_LENGTH,\n TMP_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,\n TMP_HTTP_SERVER_NAME,\n TMP_HTTP_ROUTE,\n TMP_HTTP_CLIENT_IP,\n TMP_AWS_DYNAMODB_TABLE_NAMES,\n TMP_AWS_DYNAMODB_CONSUMED_CAPACITY,\n TMP_AWS_DYNAMODB_ITEM_COLLECTION_METRICS,\n TMP_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY,\n TMP_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY,\n TMP_AWS_DYNAMODB_CONSISTENT_READ,\n TMP_AWS_DYNAMODB_PROJECTION,\n TMP_AWS_DYNAMODB_LIMIT,\n TMP_AWS_DYNAMODB_ATTRIBUTES_TO_GET,\n TMP_AWS_DYNAMODB_INDEX_NAME,\n TMP_AWS_DYNAMODB_SELECT,\n TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES,\n TMP_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES,\n TMP_AWS_DYNAMODB_EXCLUSIVE_START_TABLE,\n TMP_AWS_DYNAMODB_TABLE_COUNT,\n TMP_AWS_DYNAMODB_SCAN_FORWARD,\n TMP_AWS_DYNAMODB_SEGMENT,\n TMP_AWS_DYNAMODB_TOTAL_SEGMENTS,\n TMP_AWS_DYNAMODB_COUNT,\n TMP_AWS_DYNAMODB_SCANNED_COUNT,\n TMP_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS,\n TMP_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES,\n TMP_MESSAGING_SYSTEM,\n TMP_MESSAGING_DESTINATION,\n TMP_MESSAGING_DESTINATION_KIND,\n TMP_MESSAGING_TEMP_DESTINATION,\n TMP_MESSAGING_PROTOCOL,\n TMP_MESSAGING_PROTOCOL_VERSION,\n TMP_MESSAGING_URL,\n TMP_MESSAGING_MESSAGE_ID,\n TMP_MESSAGING_CONVERSATION_ID,\n TMP_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES,\n TMP_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES,\n TMP_MESSAGING_OPERATION,\n TMP_MESSAGING_CONSUMER_ID,\n TMP_MESSAGING_RABBITMQ_ROUTING_KEY,\n TMP_MESSAGING_KAFKA_MESSAGE_KEY,\n TMP_MESSAGING_KAFKA_CONSUMER_GROUP,\n TMP_MESSAGING_KAFKA_CLIENT_ID,\n TMP_MESSAGING_KAFKA_PARTITION,\n TMP_MESSAGING_KAFKA_TOMBSTONE,\n TMP_RPC_SYSTEM,\n TMP_RPC_SERVICE,\n TMP_RPC_METHOD,\n TMP_RPC_GRPC_STATUS_CODE,\n TMP_RPC_JSONRPC_VERSION,\n TMP_RPC_JSONRPC_REQUEST_ID,\n TMP_RPC_JSONRPC_ERROR_CODE,\n TMP_RPC_JSONRPC_ERROR_MESSAGE,\n TMP_MESSAGE_TYPE,\n TMP_MESSAGE_ID,\n TMP_MESSAGE_COMPRESSED_SIZE,\n TMP_MESSAGE_UNCOMPRESSED_SIZE,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for DbSystemValues enum definition\n *\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_DBSYSTEMVALUES_OTHER_SQL = 'other_sql';\nconst TMP_DBSYSTEMVALUES_MSSQL = 'mssql';\nconst TMP_DBSYSTEMVALUES_MYSQL = 'mysql';\nconst TMP_DBSYSTEMVALUES_ORACLE = 'oracle';\nconst TMP_DBSYSTEMVALUES_DB2 = 'db2';\nconst TMP_DBSYSTEMVALUES_POSTGRESQL = 'postgresql';\nconst TMP_DBSYSTEMVALUES_REDSHIFT = 'redshift';\nconst TMP_DBSYSTEMVALUES_HIVE = 'hive';\nconst TMP_DBSYSTEMVALUES_CLOUDSCAPE = 'cloudscape';\nconst TMP_DBSYSTEMVALUES_HSQLDB = 'hsqldb';\nconst TMP_DBSYSTEMVALUES_PROGRESS = 'progress';\nconst TMP_DBSYSTEMVALUES_MAXDB = 'maxdb';\nconst TMP_DBSYSTEMVALUES_HANADB = 'hanadb';\nconst TMP_DBSYSTEMVALUES_INGRES = 'ingres';\nconst TMP_DBSYSTEMVALUES_FIRSTSQL = 'firstsql';\nconst TMP_DBSYSTEMVALUES_EDB = 'edb';\nconst TMP_DBSYSTEMVALUES_CACHE = 'cache';\nconst TMP_DBSYSTEMVALUES_ADABAS = 'adabas';\nconst TMP_DBSYSTEMVALUES_FIREBIRD = 'firebird';\nconst TMP_DBSYSTEMVALUES_DERBY = 'derby';\nconst TMP_DBSYSTEMVALUES_FILEMAKER = 'filemaker';\nconst TMP_DBSYSTEMVALUES_INFORMIX = 'informix';\nconst TMP_DBSYSTEMVALUES_INSTANTDB = 'instantdb';\nconst TMP_DBSYSTEMVALUES_INTERBASE = 'interbase';\nconst TMP_DBSYSTEMVALUES_MARIADB = 'mariadb';\nconst TMP_DBSYSTEMVALUES_NETEZZA = 'netezza';\nconst TMP_DBSYSTEMVALUES_PERVASIVE = 'pervasive';\nconst TMP_DBSYSTEMVALUES_POINTBASE = 'pointbase';\nconst TMP_DBSYSTEMVALUES_SQLITE = 'sqlite';\nconst TMP_DBSYSTEMVALUES_SYBASE = 'sybase';\nconst TMP_DBSYSTEMVALUES_TERADATA = 'teradata';\nconst TMP_DBSYSTEMVALUES_VERTICA = 'vertica';\nconst TMP_DBSYSTEMVALUES_H2 = 'h2';\nconst TMP_DBSYSTEMVALUES_COLDFUSION = 'coldfusion';\nconst TMP_DBSYSTEMVALUES_CASSANDRA = 'cassandra';\nconst TMP_DBSYSTEMVALUES_HBASE = 'hbase';\nconst TMP_DBSYSTEMVALUES_MONGODB = 'mongodb';\nconst TMP_DBSYSTEMVALUES_REDIS = 'redis';\nconst TMP_DBSYSTEMVALUES_COUCHBASE = 'couchbase';\nconst TMP_DBSYSTEMVALUES_COUCHDB = 'couchdb';\nconst TMP_DBSYSTEMVALUES_COSMOSDB = 'cosmosdb';\nconst TMP_DBSYSTEMVALUES_DYNAMODB = 'dynamodb';\nconst TMP_DBSYSTEMVALUES_NEO4J = 'neo4j';\nconst TMP_DBSYSTEMVALUES_GEODE = 'geode';\nconst TMP_DBSYSTEMVALUES_ELASTICSEARCH = 'elasticsearch';\nconst TMP_DBSYSTEMVALUES_MEMCACHED = 'memcached';\nconst TMP_DBSYSTEMVALUES_COCKROACHDB = 'cockroachdb';\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_OTHER_SQL in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_OTHER_SQL = TMP_DBSYSTEMVALUES_OTHER_SQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MSSQL in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_MSSQL = TMP_DBSYSTEMVALUES_MSSQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MYSQL in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_MYSQL = TMP_DBSYSTEMVALUES_MYSQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_ORACLE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_ORACLE = TMP_DBSYSTEMVALUES_ORACLE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_DB2 in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_DB2 = TMP_DBSYSTEMVALUES_DB2;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_POSTGRESQL in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_POSTGRESQL = TMP_DBSYSTEMVALUES_POSTGRESQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_REDSHIFT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_REDSHIFT = TMP_DBSYSTEMVALUES_REDSHIFT;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_HIVE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_HIVE = TMP_DBSYSTEMVALUES_HIVE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_CLOUDSCAPE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_CLOUDSCAPE = TMP_DBSYSTEMVALUES_CLOUDSCAPE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_HSQLDB in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_HSQLDB = TMP_DBSYSTEMVALUES_HSQLDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_PROGRESS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_PROGRESS = TMP_DBSYSTEMVALUES_PROGRESS;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MAXDB in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_MAXDB = TMP_DBSYSTEMVALUES_MAXDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_HANADB in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_HANADB = TMP_DBSYSTEMVALUES_HANADB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_INGRES in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_INGRES = TMP_DBSYSTEMVALUES_INGRES;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_FIRSTSQL in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_FIRSTSQL = TMP_DBSYSTEMVALUES_FIRSTSQL;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_EDB in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_EDB = TMP_DBSYSTEMVALUES_EDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_CACHE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_CACHE = TMP_DBSYSTEMVALUES_CACHE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_ADABAS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_ADABAS = TMP_DBSYSTEMVALUES_ADABAS;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_FIREBIRD in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_FIREBIRD = TMP_DBSYSTEMVALUES_FIREBIRD;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_DERBY in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_DERBY = TMP_DBSYSTEMVALUES_DERBY;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_FILEMAKER in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_FILEMAKER = TMP_DBSYSTEMVALUES_FILEMAKER;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_INFORMIX in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_INFORMIX = TMP_DBSYSTEMVALUES_INFORMIX;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_INSTANTDB in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_INSTANTDB = TMP_DBSYSTEMVALUES_INSTANTDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_INTERBASE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_INTERBASE = TMP_DBSYSTEMVALUES_INTERBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MARIADB in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_MARIADB = TMP_DBSYSTEMVALUES_MARIADB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_NETEZZA in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_NETEZZA = TMP_DBSYSTEMVALUES_NETEZZA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_PERVASIVE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_PERVASIVE = TMP_DBSYSTEMVALUES_PERVASIVE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_POINTBASE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_POINTBASE = TMP_DBSYSTEMVALUES_POINTBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_SQLITE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_SQLITE = TMP_DBSYSTEMVALUES_SQLITE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_SYBASE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_SYBASE = TMP_DBSYSTEMVALUES_SYBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_TERADATA in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_TERADATA = TMP_DBSYSTEMVALUES_TERADATA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_VERTICA in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_VERTICA = TMP_DBSYSTEMVALUES_VERTICA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_H2 in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_H2 = TMP_DBSYSTEMVALUES_H2;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_COLDFUSION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_COLDFUSION = TMP_DBSYSTEMVALUES_COLDFUSION;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_CASSANDRA in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_CASSANDRA = TMP_DBSYSTEMVALUES_CASSANDRA;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_HBASE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_HBASE = TMP_DBSYSTEMVALUES_HBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MONGODB in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_MONGODB = TMP_DBSYSTEMVALUES_MONGODB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_REDIS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_REDIS = TMP_DBSYSTEMVALUES_REDIS;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_COUCHBASE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_COUCHBASE = TMP_DBSYSTEMVALUES_COUCHBASE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_COUCHDB in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_COUCHDB = TMP_DBSYSTEMVALUES_COUCHDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_COSMOSDB in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_COSMOSDB = TMP_DBSYSTEMVALUES_COSMOSDB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_DYNAMODB in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_DYNAMODB = TMP_DBSYSTEMVALUES_DYNAMODB;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_NEO4J in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_NEO4J = TMP_DBSYSTEMVALUES_NEO4J;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_GEODE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_GEODE = TMP_DBSYSTEMVALUES_GEODE;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_ELASTICSEARCH in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_ELASTICSEARCH = TMP_DBSYSTEMVALUES_ELASTICSEARCH;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_MEMCACHED in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_MEMCACHED = TMP_DBSYSTEMVALUES_MEMCACHED;\n/**\n * An identifier for the database management system (DBMS) product being used. See below for a list of well-known identifiers.\n *\n * @deprecated Use DB_SYSTEM_VALUE_COCKROACHDB in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBSYSTEMVALUES_COCKROACHDB = TMP_DBSYSTEMVALUES_COCKROACHDB;\n/**\n * The constant map of values for DbSystemValues.\n * @deprecated Use the DBSYSTEMVALUES_XXXXX constants rather than the DbSystemValues.XXXXX for bundle minification.\n */\nexport const DbSystemValues = \n/*#__PURE__*/ createConstMap([\n TMP_DBSYSTEMVALUES_OTHER_SQL,\n TMP_DBSYSTEMVALUES_MSSQL,\n TMP_DBSYSTEMVALUES_MYSQL,\n TMP_DBSYSTEMVALUES_ORACLE,\n TMP_DBSYSTEMVALUES_DB2,\n TMP_DBSYSTEMVALUES_POSTGRESQL,\n TMP_DBSYSTEMVALUES_REDSHIFT,\n TMP_DBSYSTEMVALUES_HIVE,\n TMP_DBSYSTEMVALUES_CLOUDSCAPE,\n TMP_DBSYSTEMVALUES_HSQLDB,\n TMP_DBSYSTEMVALUES_PROGRESS,\n TMP_DBSYSTEMVALUES_MAXDB,\n TMP_DBSYSTEMVALUES_HANADB,\n TMP_DBSYSTEMVALUES_INGRES,\n TMP_DBSYSTEMVALUES_FIRSTSQL,\n TMP_DBSYSTEMVALUES_EDB,\n TMP_DBSYSTEMVALUES_CACHE,\n TMP_DBSYSTEMVALUES_ADABAS,\n TMP_DBSYSTEMVALUES_FIREBIRD,\n TMP_DBSYSTEMVALUES_DERBY,\n TMP_DBSYSTEMVALUES_FILEMAKER,\n TMP_DBSYSTEMVALUES_INFORMIX,\n TMP_DBSYSTEMVALUES_INSTANTDB,\n TMP_DBSYSTEMVALUES_INTERBASE,\n TMP_DBSYSTEMVALUES_MARIADB,\n TMP_DBSYSTEMVALUES_NETEZZA,\n TMP_DBSYSTEMVALUES_PERVASIVE,\n TMP_DBSYSTEMVALUES_POINTBASE,\n TMP_DBSYSTEMVALUES_SQLITE,\n TMP_DBSYSTEMVALUES_SYBASE,\n TMP_DBSYSTEMVALUES_TERADATA,\n TMP_DBSYSTEMVALUES_VERTICA,\n TMP_DBSYSTEMVALUES_H2,\n TMP_DBSYSTEMVALUES_COLDFUSION,\n TMP_DBSYSTEMVALUES_CASSANDRA,\n TMP_DBSYSTEMVALUES_HBASE,\n TMP_DBSYSTEMVALUES_MONGODB,\n TMP_DBSYSTEMVALUES_REDIS,\n TMP_DBSYSTEMVALUES_COUCHBASE,\n TMP_DBSYSTEMVALUES_COUCHDB,\n TMP_DBSYSTEMVALUES_COSMOSDB,\n TMP_DBSYSTEMVALUES_DYNAMODB,\n TMP_DBSYSTEMVALUES_NEO4J,\n TMP_DBSYSTEMVALUES_GEODE,\n TMP_DBSYSTEMVALUES_ELASTICSEARCH,\n TMP_DBSYSTEMVALUES_MEMCACHED,\n TMP_DBSYSTEMVALUES_COCKROACHDB,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for DbCassandraConsistencyLevelValues enum definition\n *\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL = 'all';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = 'each_quorum';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = 'quorum';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = 'local_quorum';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE = 'one';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO = 'two';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE = 'three';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = 'local_one';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY = 'any';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = 'serial';\nconst TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = 'local_serial';\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_ALL in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBCASSANDRACONSISTENCYLEVELVALUES_ALL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_EACH_QUORUM in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_QUORUM in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_LOCAL_QUORUM in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_ONE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBCASSANDRACONSISTENCYLEVELVALUES_ONE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_TWO in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBCASSANDRACONSISTENCYLEVELVALUES_TWO = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_THREE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBCASSANDRACONSISTENCYLEVELVALUES_THREE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_LOCAL_ONE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_ANY in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBCASSANDRACONSISTENCYLEVELVALUES_ANY = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_SERIAL in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL;\n/**\n * The consistency level of the query. Based on consistency values from [CQL](https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/dml/dmlConfigConsistency.html).\n *\n * @deprecated Use DB_CASSANDRA_CONSISTENCY_LEVEL_VALUE_LOCAL_SERIAL in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL = TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL;\n/**\n * The constant map of values for DbCassandraConsistencyLevelValues.\n * @deprecated Use the DBCASSANDRACONSISTENCYLEVELVALUES_XXXXX constants rather than the DbCassandraConsistencyLevelValues.XXXXX for bundle minification.\n */\nexport const DbCassandraConsistencyLevelValues = \n/*#__PURE__*/ createConstMap([\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ALL,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ONE,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_TWO,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_THREE,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_ANY,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL,\n TMP_DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for FaasTriggerValues enum definition\n *\n * Type of the trigger on which the function is executed.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_FAASTRIGGERVALUES_DATASOURCE = 'datasource';\nconst TMP_FAASTRIGGERVALUES_HTTP = 'http';\nconst TMP_FAASTRIGGERVALUES_PUBSUB = 'pubsub';\nconst TMP_FAASTRIGGERVALUES_TIMER = 'timer';\nconst TMP_FAASTRIGGERVALUES_OTHER = 'other';\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use FAAS_TRIGGER_VALUE_DATASOURCE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const FAASTRIGGERVALUES_DATASOURCE = TMP_FAASTRIGGERVALUES_DATASOURCE;\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use FAAS_TRIGGER_VALUE_HTTP in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const FAASTRIGGERVALUES_HTTP = TMP_FAASTRIGGERVALUES_HTTP;\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use FAAS_TRIGGER_VALUE_PUBSUB in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const FAASTRIGGERVALUES_PUBSUB = TMP_FAASTRIGGERVALUES_PUBSUB;\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use FAAS_TRIGGER_VALUE_TIMER in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const FAASTRIGGERVALUES_TIMER = TMP_FAASTRIGGERVALUES_TIMER;\n/**\n * Type of the trigger on which the function is executed.\n *\n * @deprecated Use FAAS_TRIGGER_VALUE_OTHER in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const FAASTRIGGERVALUES_OTHER = TMP_FAASTRIGGERVALUES_OTHER;\n/**\n * The constant map of values for FaasTriggerValues.\n * @deprecated Use the FAASTRIGGERVALUES_XXXXX constants rather than the FaasTriggerValues.XXXXX for bundle minification.\n */\nexport const FaasTriggerValues = \n/*#__PURE__*/ createConstMap([\n TMP_FAASTRIGGERVALUES_DATASOURCE,\n TMP_FAASTRIGGERVALUES_HTTP,\n TMP_FAASTRIGGERVALUES_PUBSUB,\n TMP_FAASTRIGGERVALUES_TIMER,\n TMP_FAASTRIGGERVALUES_OTHER,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for FaasDocumentOperationValues enum definition\n *\n * Describes the type of the operation that was performed on the data.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_FAASDOCUMENTOPERATIONVALUES_INSERT = 'insert';\nconst TMP_FAASDOCUMENTOPERATIONVALUES_EDIT = 'edit';\nconst TMP_FAASDOCUMENTOPERATIONVALUES_DELETE = 'delete';\n/**\n * Describes the type of the operation that was performed on the data.\n *\n * @deprecated Use FAAS_DOCUMENT_OPERATION_VALUE_INSERT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const FAASDOCUMENTOPERATIONVALUES_INSERT = TMP_FAASDOCUMENTOPERATIONVALUES_INSERT;\n/**\n * Describes the type of the operation that was performed on the data.\n *\n * @deprecated Use FAAS_DOCUMENT_OPERATION_VALUE_EDIT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const FAASDOCUMENTOPERATIONVALUES_EDIT = TMP_FAASDOCUMENTOPERATIONVALUES_EDIT;\n/**\n * Describes the type of the operation that was performed on the data.\n *\n * @deprecated Use FAAS_DOCUMENT_OPERATION_VALUE_DELETE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const FAASDOCUMENTOPERATIONVALUES_DELETE = TMP_FAASDOCUMENTOPERATIONVALUES_DELETE;\n/**\n * The constant map of values for FaasDocumentOperationValues.\n * @deprecated Use the FAASDOCUMENTOPERATIONVALUES_XXXXX constants rather than the FaasDocumentOperationValues.XXXXX for bundle minification.\n */\nexport const FaasDocumentOperationValues = \n/*#__PURE__*/ createConstMap([\n TMP_FAASDOCUMENTOPERATIONVALUES_INSERT,\n TMP_FAASDOCUMENTOPERATIONVALUES_EDIT,\n TMP_FAASDOCUMENTOPERATIONVALUES_DELETE,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for FaasInvokedProviderValues enum definition\n *\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = 'alibaba_cloud';\nconst TMP_FAASINVOKEDPROVIDERVALUES_AWS = 'aws';\nconst TMP_FAASINVOKEDPROVIDERVALUES_AZURE = 'azure';\nconst TMP_FAASINVOKEDPROVIDERVALUES_GCP = 'gcp';\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n *\n * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_ALIBABA_CLOUD in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD = TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n *\n * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_AWS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const FAASINVOKEDPROVIDERVALUES_AWS = TMP_FAASINVOKEDPROVIDERVALUES_AWS;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n *\n * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_AZURE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const FAASINVOKEDPROVIDERVALUES_AZURE = TMP_FAASINVOKEDPROVIDERVALUES_AZURE;\n/**\n * The cloud provider of the invoked function.\n *\n * Note: SHOULD be equal to the `cloud.provider` resource attribute of the invoked function.\n *\n * @deprecated Use FAAS_INVOKED_PROVIDER_VALUE_GCP in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const FAASINVOKEDPROVIDERVALUES_GCP = TMP_FAASINVOKEDPROVIDERVALUES_GCP;\n/**\n * The constant map of values for FaasInvokedProviderValues.\n * @deprecated Use the FAASINVOKEDPROVIDERVALUES_XXXXX constants rather than the FaasInvokedProviderValues.XXXXX for bundle minification.\n */\nexport const FaasInvokedProviderValues = \n/*#__PURE__*/ createConstMap([\n TMP_FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD,\n TMP_FAASINVOKEDPROVIDERVALUES_AWS,\n TMP_FAASINVOKEDPROVIDERVALUES_AZURE,\n TMP_FAASINVOKEDPROVIDERVALUES_GCP,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for NetTransportValues enum definition\n *\n * Transport protocol used. See note below.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_NETTRANSPORTVALUES_IP_TCP = 'ip_tcp';\nconst TMP_NETTRANSPORTVALUES_IP_UDP = 'ip_udp';\nconst TMP_NETTRANSPORTVALUES_IP = 'ip';\nconst TMP_NETTRANSPORTVALUES_UNIX = 'unix';\nconst TMP_NETTRANSPORTVALUES_PIPE = 'pipe';\nconst TMP_NETTRANSPORTVALUES_INPROC = 'inproc';\nconst TMP_NETTRANSPORTVALUES_OTHER = 'other';\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_IP_TCP in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETTRANSPORTVALUES_IP_TCP = TMP_NETTRANSPORTVALUES_IP_TCP;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_IP_UDP in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETTRANSPORTVALUES_IP_UDP = TMP_NETTRANSPORTVALUES_IP_UDP;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Removed in v1.21.0.\n */\nexport const NETTRANSPORTVALUES_IP = TMP_NETTRANSPORTVALUES_IP;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Removed in v1.21.0.\n */\nexport const NETTRANSPORTVALUES_UNIX = TMP_NETTRANSPORTVALUES_UNIX;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_PIPE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETTRANSPORTVALUES_PIPE = TMP_NETTRANSPORTVALUES_PIPE;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_INPROC in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETTRANSPORTVALUES_INPROC = TMP_NETTRANSPORTVALUES_INPROC;\n/**\n * Transport protocol used. See note below.\n *\n * @deprecated Use NET_TRANSPORT_VALUE_OTHER in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETTRANSPORTVALUES_OTHER = TMP_NETTRANSPORTVALUES_OTHER;\n/**\n * The constant map of values for NetTransportValues.\n * @deprecated Use the NETTRANSPORTVALUES_XXXXX constants rather than the NetTransportValues.XXXXX for bundle minification.\n */\nexport const NetTransportValues = \n/*#__PURE__*/ createConstMap([\n TMP_NETTRANSPORTVALUES_IP_TCP,\n TMP_NETTRANSPORTVALUES_IP_UDP,\n TMP_NETTRANSPORTVALUES_IP,\n TMP_NETTRANSPORTVALUES_UNIX,\n TMP_NETTRANSPORTVALUES_PIPE,\n TMP_NETTRANSPORTVALUES_INPROC,\n TMP_NETTRANSPORTVALUES_OTHER,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for NetHostConnectionTypeValues enum definition\n *\n * The internet connection type currently being used by the host.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI = 'wifi';\nconst TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED = 'wired';\nconst TMP_NETHOSTCONNECTIONTYPEVALUES_CELL = 'cell';\nconst TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = 'unavailable';\nconst TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = 'unknown';\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use NETWORK_CONNECTION_TYPE_VALUE_WIFI in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONTYPEVALUES_WIFI = TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI;\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use NETWORK_CONNECTION_TYPE_VALUE_WIRED in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONTYPEVALUES_WIRED = TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED;\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use NETWORK_CONNECTION_TYPE_VALUE_CELL in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONTYPEVALUES_CELL = TMP_NETHOSTCONNECTIONTYPEVALUES_CELL;\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use NETWORK_CONNECTION_TYPE_VALUE_UNAVAILABLE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE = TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE;\n/**\n * The internet connection type currently being used by the host.\n *\n * @deprecated Use NETWORK_CONNECTION_TYPE_VALUE_UNKNOWN in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONTYPEVALUES_UNKNOWN = TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN;\n/**\n * The constant map of values for NetHostConnectionTypeValues.\n * @deprecated Use the NETHOSTCONNECTIONTYPEVALUES_XXXXX constants rather than the NetHostConnectionTypeValues.XXXXX for bundle minification.\n */\nexport const NetHostConnectionTypeValues = \n/*#__PURE__*/ createConstMap([\n TMP_NETHOSTCONNECTIONTYPEVALUES_WIFI,\n TMP_NETHOSTCONNECTIONTYPEVALUES_WIRED,\n TMP_NETHOSTCONNECTIONTYPEVALUES_CELL,\n TMP_NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE,\n TMP_NETHOSTCONNECTIONTYPEVALUES_UNKNOWN,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for NetHostConnectionSubtypeValues enum definition\n *\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = 'gprs';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = 'edge';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = 'umts';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = 'cdma';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = 'evdo_0';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = 'evdo_a';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = 'cdma2000_1xrtt';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = 'hsdpa';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = 'hsupa';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = 'hspa';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = 'iden';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = 'evdo_b';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE = 'lte';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = 'ehrpd';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = 'hspap';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM = 'gsm';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = 'td_scdma';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = 'iwlan';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR = 'nr';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = 'nrnsa';\nconst TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = 'lte_ca';\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_GPRS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_GPRS = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_EDGE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_EDGE = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_UMTS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_UMTS = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_CDMA in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_CDMA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_EVDO_0 in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0 = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_EVDO_A in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_CDMA2000_1XRTT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_HSDPA in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_HSUPA in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_HSPA in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_HSPA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_IDEN in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_IDEN = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_EVDO_B in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_LTE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_LTE = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_EHRPD in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_HSPAP in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_GSM in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_GSM = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_TD_SCDMA in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_IWLAN in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_NR in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_NR = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_NRNSA in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA;\n/**\n * This describes more details regarding the connection.type. It may be the type of cell technology connection, but it could be used for describing details about a wifi connection.\n *\n * @deprecated Use NETWORK_CONNECTION_SUBTYPE_VALUE_LTE_CA in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA = TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA;\n/**\n * The constant map of values for NetHostConnectionSubtypeValues.\n * @deprecated Use the NETHOSTCONNECTIONSUBTYPEVALUES_XXXXX constants rather than the NetHostConnectionSubtypeValues.XXXXX for bundle minification.\n */\nexport const NetHostConnectionSubtypeValues = \n/*#__PURE__*/ createConstMap([\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GPRS,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EDGE,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_UMTS,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IDEN,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_GSM,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NR,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA,\n TMP_NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for HttpFlavorValues enum definition\n *\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_HTTPFLAVORVALUES_HTTP_1_0 = '1.0';\nconst TMP_HTTPFLAVORVALUES_HTTP_1_1 = '1.1';\nconst TMP_HTTPFLAVORVALUES_HTTP_2_0 = '2.0';\nconst TMP_HTTPFLAVORVALUES_SPDY = 'SPDY';\nconst TMP_HTTPFLAVORVALUES_QUIC = 'QUIC';\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use HTTP_FLAVOR_VALUE_HTTP_1_0 in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const HTTPFLAVORVALUES_HTTP_1_0 = TMP_HTTPFLAVORVALUES_HTTP_1_0;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use HTTP_FLAVOR_VALUE_HTTP_1_1 in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const HTTPFLAVORVALUES_HTTP_1_1 = TMP_HTTPFLAVORVALUES_HTTP_1_1;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use HTTP_FLAVOR_VALUE_HTTP_2_0 in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const HTTPFLAVORVALUES_HTTP_2_0 = TMP_HTTPFLAVORVALUES_HTTP_2_0;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use HTTP_FLAVOR_VALUE_SPDY in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const HTTPFLAVORVALUES_SPDY = TMP_HTTPFLAVORVALUES_SPDY;\n/**\n * Kind of HTTP protocol used.\n *\n * Note: If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed.\n *\n * @deprecated Use HTTP_FLAVOR_VALUE_QUIC in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const HTTPFLAVORVALUES_QUIC = TMP_HTTPFLAVORVALUES_QUIC;\n/**\n * The constant map of values for HttpFlavorValues.\n * @deprecated Use the HTTPFLAVORVALUES_XXXXX constants rather than the HttpFlavorValues.XXXXX for bundle minification.\n */\nexport const HttpFlavorValues = {\n HTTP_1_0: TMP_HTTPFLAVORVALUES_HTTP_1_0,\n HTTP_1_1: TMP_HTTPFLAVORVALUES_HTTP_1_1,\n HTTP_2_0: TMP_HTTPFLAVORVALUES_HTTP_2_0,\n SPDY: TMP_HTTPFLAVORVALUES_SPDY,\n QUIC: TMP_HTTPFLAVORVALUES_QUIC,\n};\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for MessagingDestinationKindValues enum definition\n *\n * The kind of message destination.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE = 'queue';\nconst TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC = 'topic';\n/**\n * The kind of message destination.\n *\n * @deprecated Removed in semconv v1.20.0.\n */\nexport const MESSAGINGDESTINATIONKINDVALUES_QUEUE = TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE;\n/**\n * The kind of message destination.\n *\n * @deprecated Removed in semconv v1.20.0.\n */\nexport const MESSAGINGDESTINATIONKINDVALUES_TOPIC = TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC;\n/**\n * The constant map of values for MessagingDestinationKindValues.\n * @deprecated Use the MESSAGINGDESTINATIONKINDVALUES_XXXXX constants rather than the MessagingDestinationKindValues.XXXXX for bundle minification.\n */\nexport const MessagingDestinationKindValues = \n/*#__PURE__*/ createConstMap([\n TMP_MESSAGINGDESTINATIONKINDVALUES_QUEUE,\n TMP_MESSAGINGDESTINATIONKINDVALUES_TOPIC,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for MessagingOperationValues enum definition\n *\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is &#34;send&#34;, this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_MESSAGINGOPERATIONVALUES_RECEIVE = 'receive';\nconst TMP_MESSAGINGOPERATIONVALUES_PROCESS = 'process';\n/**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is &#34;send&#34;, this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n *\n * @deprecated Use MESSAGING_OPERATION_TYPE_VALUE_RECEIVE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const MESSAGINGOPERATIONVALUES_RECEIVE = TMP_MESSAGINGOPERATIONVALUES_RECEIVE;\n/**\n * A string identifying the kind of message consumption as defined in the [Operation names](#operation-names) section above. If the operation is &#34;send&#34;, this attribute MUST NOT be set, since the operation can be inferred from the span kind in that case.\n *\n * @deprecated Use MESSAGING_OPERATION_TYPE_VALUE_PROCESS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const MESSAGINGOPERATIONVALUES_PROCESS = TMP_MESSAGINGOPERATIONVALUES_PROCESS;\n/**\n * The constant map of values for MessagingOperationValues.\n * @deprecated Use the MESSAGINGOPERATIONVALUES_XXXXX constants rather than the MessagingOperationValues.XXXXX for bundle minification.\n */\nexport const MessagingOperationValues = \n/*#__PURE__*/ createConstMap([\n TMP_MESSAGINGOPERATIONVALUES_RECEIVE,\n TMP_MESSAGINGOPERATIONVALUES_PROCESS,\n]);\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for RpcGrpcStatusCodeValues enum definition\n *\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_RPCGRPCSTATUSCODEVALUES_OK = 0;\nconst TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED = 1;\nconst TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN = 2;\nconst TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = 3;\nconst TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = 4;\nconst TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND = 5;\nconst TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = 6;\nconst TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = 7;\nconst TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = 8;\nconst TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = 9;\nconst TMP_RPCGRPCSTATUSCODEVALUES_ABORTED = 10;\nconst TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = 11;\nconst TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = 12;\nconst TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL = 13;\nconst TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = 14;\nconst TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS = 15;\nconst TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = 16;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_OK in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_OK = TMP_RPCGRPCSTATUSCODEVALUES_OK;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_CANCELLED in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_CANCELLED = TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNKNOWN in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_UNKNOWN = TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_INVALID_ARGUMENT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT = TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_DEADLINE_EXCEEDED in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED = TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_NOT_FOUND in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_NOT_FOUND = TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_ALREADY_EXISTS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS = TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_PERMISSION_DENIED in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED = TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_RESOURCE_EXHAUSTED in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED = TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_FAILED_PRECONDITION in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION = TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_ABORTED in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_ABORTED = TMP_RPCGRPCSTATUSCODEVALUES_ABORTED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_OUT_OF_RANGE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE = TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNIMPLEMENTED in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED = TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_INTERNAL in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_INTERNAL = TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNAVAILABLE in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_UNAVAILABLE = TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_DATA_LOSS in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_DATA_LOSS = TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS;\n/**\n * The [numeric status code](https://github.com/grpc/grpc/blob/v1.33.2/doc/statuscodes.md) of the gRPC request.\n *\n * @deprecated Use RPC_GRPC_STATUS_CODE_VALUE_UNAUTHENTICATED in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED = TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED;\n/**\n * The constant map of values for RpcGrpcStatusCodeValues.\n * @deprecated Use the RPCGRPCSTATUSCODEVALUES_XXXXX constants rather than the RpcGrpcStatusCodeValues.XXXXX for bundle minification.\n */\nexport const RpcGrpcStatusCodeValues = {\n OK: TMP_RPCGRPCSTATUSCODEVALUES_OK,\n CANCELLED: TMP_RPCGRPCSTATUSCODEVALUES_CANCELLED,\n UNKNOWN: TMP_RPCGRPCSTATUSCODEVALUES_UNKNOWN,\n INVALID_ARGUMENT: TMP_RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT,\n DEADLINE_EXCEEDED: TMP_RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED,\n NOT_FOUND: TMP_RPCGRPCSTATUSCODEVALUES_NOT_FOUND,\n ALREADY_EXISTS: TMP_RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS,\n PERMISSION_DENIED: TMP_RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED,\n RESOURCE_EXHAUSTED: TMP_RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED,\n FAILED_PRECONDITION: TMP_RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION,\n ABORTED: TMP_RPCGRPCSTATUSCODEVALUES_ABORTED,\n OUT_OF_RANGE: TMP_RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE,\n UNIMPLEMENTED: TMP_RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED,\n INTERNAL: TMP_RPCGRPCSTATUSCODEVALUES_INTERNAL,\n UNAVAILABLE: TMP_RPCGRPCSTATUSCODEVALUES_UNAVAILABLE,\n DATA_LOSS: TMP_RPCGRPCSTATUSCODEVALUES_DATA_LOSS,\n UNAUTHENTICATED: TMP_RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED,\n};\n/* ----------------------------------------------------------------------------------------------------------\n * Constant values for MessageTypeValues enum definition\n *\n * Whether this is a received or sent message.\n * ---------------------------------------------------------------------------------------------------------- */\n// Temporary local constants to assign to the individual exports and the namespaced version\n// Required to avoid the namespace exports using the unminifiable export names for some package types\nconst TMP_MESSAGETYPEVALUES_SENT = 'SENT';\nconst TMP_MESSAGETYPEVALUES_RECEIVED = 'RECEIVED';\n/**\n * Whether this is a received or sent message.\n *\n * @deprecated Use MESSAGE_TYPE_VALUE_SENT in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const MESSAGETYPEVALUES_SENT = TMP_MESSAGETYPEVALUES_SENT;\n/**\n * Whether this is a received or sent message.\n *\n * @deprecated Use MESSAGE_TYPE_VALUE_RECEIVED in [incubating entry-point]({@link https://github.com/open-telemetry/opentelemetry-js/blob/main/semantic-conventions/README.md#unstable-semconv}).\n */\nexport const MESSAGETYPEVALUES_RECEIVED = TMP_MESSAGETYPEVALUES_RECEIVED;\n/**\n * The constant map of values for MessageTypeValues.\n * @deprecated Use the MESSAGETYPEVALUES_XXXXX constants rather than the MessageTypeValues.XXXXX for bundle minification.\n */\nexport const MessageTypeValues = \n/*#__PURE__*/ createConstMap([\n TMP_MESSAGETYPEVALUES_SENT,\n TMP_MESSAGETYPEVALUES_RECEIVED,\n]);\n//# sourceMappingURL=SemanticAttributes.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n//----------------------------------------------------------------------------------------------------------\n// DO NOT EDIT, this is an Auto-generated file from scripts/semconv/templates/registry/stable/attributes.ts.j2\n//----------------------------------------------------------------------------------------------------------\n/**\n * ASP.NET Core exception middleware handling result\n *\n * @example handled\n * @example unhandled\n */\nexport const ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT = 'aspnetcore.diagnostics.exception.result';\n/**\n * Enum value \"aborted\" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}.\n *\n * Exception handling didn't run because the request was aborted.\n */\nexport const ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED = \"aborted\";\n/**\n * Enum value \"handled\" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}.\n *\n * Exception was handled by the exception handling middleware.\n */\nexport const ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED = \"handled\";\n/**\n * Enum value \"skipped\" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}.\n *\n * Exception handling was skipped because the response had started.\n */\nexport const ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED = \"skipped\";\n/**\n * Enum value \"unhandled\" for attribute {@link ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT}.\n *\n * Exception was not handled by the exception handling middleware.\n */\nexport const ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED = \"unhandled\";\n/**\n * Full type name of the [`IExceptionHandler`](https://learn.microsoft.com/dotnet/api/microsoft.aspnetcore.diagnostics.iexceptionhandler) implementation that handled the exception.\n *\n * @example Contoso.MyHandler\n */\nexport const ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE = 'aspnetcore.diagnostics.handler.type';\n/**\n * Rate limiting policy name.\n *\n * @example fixed\n * @example sliding\n * @example token\n */\nexport const ATTR_ASPNETCORE_RATE_LIMITING_POLICY = 'aspnetcore.rate_limiting.policy';\n/**\n * Rate-limiting result, shows whether the lease was acquired or contains a rejection reason\n *\n * @example acquired\n * @example request_canceled\n */\nexport const ATTR_ASPNETCORE_RATE_LIMITING_RESULT = 'aspnetcore.rate_limiting.result';\n/**\n * Enum value \"acquired\" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}.\n *\n * Lease was acquired\n */\nexport const ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED = \"acquired\";\n/**\n * Enum value \"endpoint_limiter\" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}.\n *\n * Lease request was rejected by the endpoint limiter\n */\nexport const ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER = \"endpoint_limiter\";\n/**\n * Enum value \"global_limiter\" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}.\n *\n * Lease request was rejected by the global limiter\n */\nexport const ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER = \"global_limiter\";\n/**\n * Enum value \"request_canceled\" for attribute {@link ATTR_ASPNETCORE_RATE_LIMITING_RESULT}.\n *\n * Lease request was canceled\n */\nexport const ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED = \"request_canceled\";\n/**\n * Flag indicating if request was handled by the application pipeline.\n *\n * @example true\n */\nexport const ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED = 'aspnetcore.request.is_unhandled';\n/**\n * A value that indicates whether the matched route is a fallback route.\n *\n * @example true\n */\nexport const ATTR_ASPNETCORE_ROUTING_IS_FALLBACK = 'aspnetcore.routing.is_fallback';\n/**\n * Match result - success or failure\n *\n * @example success\n * @example failure\n */\nexport const ATTR_ASPNETCORE_ROUTING_MATCH_STATUS = 'aspnetcore.routing.match_status';\n/**\n * Enum value \"failure\" for attribute {@link ATTR_ASPNETCORE_ROUTING_MATCH_STATUS}.\n *\n * Match failed\n */\nexport const ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE = \"failure\";\n/**\n * Enum value \"success\" for attribute {@link ATTR_ASPNETCORE_ROUTING_MATCH_STATUS}.\n *\n * Match succeeded\n */\nexport const ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS = \"success\";\n/**\n * Client address - domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\n *\n * @example client.example.com\n * @example 10.1.2.80\n * @example /tmp/my.sock\n *\n * @note When observed from the server side, and when communicating through an intermediary, `client.address` **SHOULD** represent the client address behind any intermediaries, for example proxies, if it's available.\n */\nexport const ATTR_CLIENT_ADDRESS = 'client.address';\n/**\n * Client port number.\n *\n * @example 65123\n *\n * @note When observed from the server side, and when communicating through an intermediary, `client.port` **SHOULD** represent the client port behind any intermediaries, for example proxies, if it's available.\n */\nexport const ATTR_CLIENT_PORT = 'client.port';\n/**\n * The column number in `code.file.path` best representing the operation. It **SHOULD** point within the code unit named in `code.function.name`. This attribute **MUST NOT** be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity.\n *\n * @example 16\n */\nexport const ATTR_CODE_COLUMN_NUMBER = 'code.column.number';\n/**\n * The source code file name that identifies the code unit as uniquely as possible (preferably an absolute file path). This attribute **MUST NOT** be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity.\n *\n * @example \"/usr/local/MyApplication/content_root/app/index.php\"\n */\nexport const ATTR_CODE_FILE_PATH = 'code.file.path';\n/**\n * The method or function fully-qualified name without arguments. The value should fit the natural representation of the language runtime, which is also likely the same used within `code.stacktrace` attribute value. This attribute **MUST NOT** be used on the Profile signal since the data is already captured in 'message Function'. This constraint is imposed to prevent redundancy and maintain data integrity.\n *\n * @example com.example.MyHttpService.serveRequest\n * @example GuzzleHttp\\\\Client::transfer\n * @example fopen\n *\n * @note Values and format depends on each language runtime, thus it is impossible to provide an exhaustive list of examples.\n * The values are usually the same (or prefixes of) the ones found in native stack trace representation stored in\n * `code.stacktrace` without information on arguments.\n *\n * Examples:\n *\n * - Java method: `com.example.MyHttpService.serveRequest`\n * - Java anonymous class method: `com.mycompany.Main$1.myMethod`\n * - Java lambda method: `com.mycompany.Main$$Lambda/0x0000748ae4149c00.myMethod`\n * - PHP function: `GuzzleHttp\\Client::transfer`\n * - Go function: `github.com/my/repo/pkg.foo.func5`\n * - Elixir: `OpenTelemetry.Ctx.new`\n * - Erlang: `opentelemetry_ctx:new`\n * - Rust: `playground::my_module::my_cool_func`\n * - C function: `fopen`\n */\nexport const ATTR_CODE_FUNCTION_NAME = 'code.function.name';\n/**\n * The line number in `code.file.path` best representing the operation. It **SHOULD** point within the code unit named in `code.function.name`. This attribute **MUST NOT** be used on the Profile signal since the data is already captured in 'message Line'. This constraint is imposed to prevent redundancy and maintain data integrity.\n *\n * @example 42\n */\nexport const ATTR_CODE_LINE_NUMBER = 'code.line.number';\n/**\n * A stacktrace as a string in the natural representation for the language runtime. The representation is identical to [`exception.stacktrace`](/docs/exceptions/exceptions-spans.md#stacktrace-representation). This attribute **MUST NOT** be used on the Profile signal since the data is already captured in 'message Location'. This constraint is imposed to prevent redundancy and maintain data integrity.\n *\n * @example \"at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\\\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\\\n at com.example.GenerateTrace.main(GenerateTrace.java:5)\\\\n\"\n */\nexport const ATTR_CODE_STACKTRACE = 'code.stacktrace';\n/**\n * The name of a collection (table, container) within the database.\n *\n * @example public.users\n * @example customers\n *\n * @note It is **RECOMMENDED** to capture the value as provided by the application\n * without attempting to do any case normalization.\n *\n * The collection name **SHOULD NOT** be extracted from `db.query.text`,\n * when the database system supports query text with multiple collections\n * in non-batch operations.\n *\n * For batch operations, if the individual operations are known to have the same\n * collection name then that collection name **SHOULD** be used.\n */\nexport const ATTR_DB_COLLECTION_NAME = 'db.collection.name';\n/**\n * The name of the database, fully qualified within the server address and port.\n *\n * @example customers\n * @example test.users\n *\n * @note If a database system has multiple namespace components, they **SHOULD** be concatenated from the most general to the most specific namespace component, using `|` as a separator between the components. Any missing components (and their associated separators) **SHOULD** be omitted.\n * Semantic conventions for individual database systems **SHOULD** document what `db.namespace` means in the context of that system.\n * It is **RECOMMENDED** to capture the value as provided by the application without attempting to do any case normalization.\n */\nexport const ATTR_DB_NAMESPACE = 'db.namespace';\n/**\n * The number of queries included in a batch operation.\n *\n * @example 2\n * @example 3\n * @example 4\n *\n * @note Operations are only considered batches when they contain two or more operations, and so `db.operation.batch.size` **SHOULD** never be `1`.\n */\nexport const ATTR_DB_OPERATION_BATCH_SIZE = 'db.operation.batch.size';\n/**\n * The name of the operation or command being executed.\n *\n * @example findAndModify\n * @example HMSET\n * @example SELECT\n *\n * @note It is **RECOMMENDED** to capture the value as provided by the application\n * without attempting to do any case normalization.\n *\n * The operation name **SHOULD NOT** be extracted from `db.query.text`,\n * when the database system supports query text with multiple operations\n * in non-batch operations.\n *\n * If spaces can occur in the operation name, multiple consecutive spaces\n * **SHOULD** be normalized to a single space.\n *\n * For batch operations, if the individual operations are known to have the same operation name\n * then that operation name **SHOULD** be used prepended by `BATCH `,\n * otherwise `db.operation.name` **SHOULD** be `BATCH` or some other database\n * system specific term if more applicable.\n */\nexport const ATTR_DB_OPERATION_NAME = 'db.operation.name';\n/**\n * Low cardinality summary of a database query.\n *\n * @example SELECT wuser_table\n * @example INSERT shipping_details SELECT orders\n * @example get user by id\n *\n * @note The query summary describes a class of database queries and is useful\n * as a grouping key, especially when analyzing telemetry for database\n * calls involving complex queries.\n *\n * Summary may be available to the instrumentation through\n * instrumentation hooks or other means. If it is not available, instrumentations\n * that support query parsing **SHOULD** generate a summary following\n * [Generating query summary](/docs/database/database-spans.md#generating-a-summary-of-the-query)\n * section.\n */\nexport const ATTR_DB_QUERY_SUMMARY = 'db.query.summary';\n/**\n * The database query being executed.\n *\n * @example SELECT * FROM wuser_table where username = ?\n * @example SET mykey ?\n *\n * @note For sanitization see [Sanitization of `db.query.text`](/docs/database/database-spans.md#sanitization-of-dbquerytext).\n * For batch operations, if the individual operations are known to have the same query text then that query text **SHOULD** be used, otherwise all of the individual query texts **SHOULD** be concatenated with separator `; ` or some other database system specific separator if more applicable.\n * Parameterized query text **SHOULD NOT** be sanitized. Even though parameterized query text can potentially have sensitive data, by using a parameterized query the user is giving a strong signal that any sensitive data will be passed as parameter values, and the benefit to observability of capturing the static part of the query text by default outweighs the risk.\n */\nexport const ATTR_DB_QUERY_TEXT = 'db.query.text';\n/**\n * Database response status code.\n *\n * @example 102\n * @example ORA-17002\n * @example 08P01\n * @example 404\n *\n * @note The status code returned by the database. Usually it represents an error code, but may also represent partial success, warning, or differentiate between various types of successful outcomes.\n * Semantic conventions for individual database systems **SHOULD** document what `db.response.status_code` means in the context of that system.\n */\nexport const ATTR_DB_RESPONSE_STATUS_CODE = 'db.response.status_code';\n/**\n * The name of a stored procedure within the database.\n *\n * @example GetCustomer\n *\n * @note It is **RECOMMENDED** to capture the value as provided by the application\n * without attempting to do any case normalization.\n *\n * For batch operations, if the individual operations are known to have the same\n * stored procedure name then that stored procedure name **SHOULD** be used.\n */\nexport const ATTR_DB_STORED_PROCEDURE_NAME = 'db.stored_procedure.name';\n/**\n * The database management system (DBMS) product as identified by the client instrumentation.\n *\n * @note The actual DBMS may differ from the one identified by the client. For example, when using PostgreSQL client libraries to connect to a CockroachDB, the `db.system.name` is set to `postgresql` based on the instrumentation's best knowledge.\n */\nexport const ATTR_DB_SYSTEM_NAME = 'db.system.name';\n/**\n * Enum value \"mariadb\" for attribute {@link ATTR_DB_SYSTEM_NAME}.\n *\n * [MariaDB](https://mariadb.org/)\n */\nexport const DB_SYSTEM_NAME_VALUE_MARIADB = \"mariadb\";\n/**\n * Enum value \"microsoft.sql_server\" for attribute {@link ATTR_DB_SYSTEM_NAME}.\n *\n * [Microsoft SQL Server](https://www.microsoft.com/sql-server)\n */\nexport const DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER = \"microsoft.sql_server\";\n/**\n * Enum value \"mysql\" for attribute {@link ATTR_DB_SYSTEM_NAME}.\n *\n * [MySQL](https://www.mysql.com/)\n */\nexport const DB_SYSTEM_NAME_VALUE_MYSQL = \"mysql\";\n/**\n * Enum value \"postgresql\" for attribute {@link ATTR_DB_SYSTEM_NAME}.\n *\n * [PostgreSQL](https://www.postgresql.org/)\n */\nexport const DB_SYSTEM_NAME_VALUE_POSTGRESQL = \"postgresql\";\n/**\n * Name of the garbage collector managed heap generation.\n *\n * @example gen0\n * @example gen1\n * @example gen2\n */\nexport const ATTR_DOTNET_GC_HEAP_GENERATION = 'dotnet.gc.heap.generation';\n/**\n * Enum value \"gen0\" for attribute {@link ATTR_DOTNET_GC_HEAP_GENERATION}.\n *\n * Generation 0\n */\nexport const DOTNET_GC_HEAP_GENERATION_VALUE_GEN0 = \"gen0\";\n/**\n * Enum value \"gen1\" for attribute {@link ATTR_DOTNET_GC_HEAP_GENERATION}.\n *\n * Generation 1\n */\nexport const DOTNET_GC_HEAP_GENERATION_VALUE_GEN1 = \"gen1\";\n/**\n * Enum value \"gen2\" for attribute {@link ATTR_DOTNET_GC_HEAP_GENERATION}.\n *\n * Generation 2\n */\nexport const DOTNET_GC_HEAP_GENERATION_VALUE_GEN2 = \"gen2\";\n/**\n * Enum value \"loh\" for attribute {@link ATTR_DOTNET_GC_HEAP_GENERATION}.\n *\n * Large Object Heap\n */\nexport const DOTNET_GC_HEAP_GENERATION_VALUE_LOH = \"loh\";\n/**\n * Enum value \"poh\" for attribute {@link ATTR_DOTNET_GC_HEAP_GENERATION}.\n *\n * Pinned Object Heap\n */\nexport const DOTNET_GC_HEAP_GENERATION_VALUE_POH = \"poh\";\n/**\n * Describes a class of error the operation ended with.\n *\n * @example timeout\n * @example java.net.UnknownHostException\n * @example server_certificate_invalid\n * @example 500\n *\n * @note The `error.type` **SHOULD** be predictable, and **SHOULD** have low cardinality.\n *\n * When `error.type` is set to a type (e.g., an exception type), its\n * canonical class name identifying the type within the artifact **SHOULD** be used.\n *\n * Instrumentations **SHOULD** document the list of errors they report.\n *\n * The cardinality of `error.type` within one instrumentation library **SHOULD** be low.\n * Telemetry consumers that aggregate data from multiple instrumentation libraries and applications\n * should be prepared for `error.type` to have high cardinality at query time when no\n * additional filters are applied.\n *\n * If the operation has completed successfully, instrumentations **SHOULD NOT** set `error.type`.\n *\n * If a specific domain defines its own set of error identifiers (such as HTTP or gRPC status codes),\n * it's **RECOMMENDED** to:\n *\n * - Use a domain-specific attribute\n * - Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.\n */\nexport const ATTR_ERROR_TYPE = 'error.type';\n/**\n * Enum value \"_OTHER\" for attribute {@link ATTR_ERROR_TYPE}.\n *\n * A fallback error value to be used when the instrumentation doesn't define a custom value.\n */\nexport const ERROR_TYPE_VALUE_OTHER = \"_OTHER\";\n/**\n * Indicates that the exception is escaping the scope of the span.\n *\n * @deprecated It's no longer recommended to record exceptions that are handled and do not escape the scope of a span.\n */\nexport const ATTR_EXCEPTION_ESCAPED = 'exception.escaped';\n/**\n * The exception message.\n *\n * @example Division by zero\n * @example Can't convert 'int' object to str implicitly\n */\nexport const ATTR_EXCEPTION_MESSAGE = 'exception.message';\n/**\n * A stacktrace as a string in the natural representation for the language runtime. The representation is to be determined and documented by each language SIG.\n *\n * @example \"Exception in thread \"main\" java.lang.RuntimeException: Test exception\\\\n at com.example.GenerateTrace.methodB(GenerateTrace.java:13)\\\\n at com.example.GenerateTrace.methodA(GenerateTrace.java:9)\\\\n at com.example.GenerateTrace.main(GenerateTrace.java:5)\\\\n\"\n */\nexport const ATTR_EXCEPTION_STACKTRACE = 'exception.stacktrace';\n/**\n * The type of the exception (its fully-qualified class name, if applicable). The dynamic type of the exception should be preferred over the static type in languages that support it.\n *\n * @example java.net.ConnectException\n * @example OSError\n */\nexport const ATTR_EXCEPTION_TYPE = 'exception.type';\n/**\n * HTTP request headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.\n *\n * @example [\"application/json\"]\n * @example [\"1.2.3.4\", \"1.2.3.5\"]\n *\n * @note Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured.\n * Including all request headers can be a security risk - explicit configuration helps avoid leaking sensitive information.\n *\n * The `User-Agent` header is already captured in the `user_agent.original` attribute.\n * Users **MAY** explicitly configure instrumentations to capture them even though it is not recommended.\n *\n * The attribute value **MUST** consist of either multiple header values as an array of strings\n * or a single-item array containing a possibly comma-concatenated string, depending on the way\n * the HTTP library provides access to headers.\n *\n * Examples:\n *\n * - A header `Content-Type: application/json` **SHOULD** be recorded as the `http.request.header.content-type`\n * attribute with value `[\"application/json\"]`.\n * - A header `X-Forwarded-For: 1.2.3.4, 1.2.3.5` **SHOULD** be recorded as the `http.request.header.x-forwarded-for`\n * attribute with value `[\"1.2.3.4\", \"1.2.3.5\"]` or `[\"1.2.3.4, 1.2.3.5\"]` depending on the HTTP library.\n */\nexport const ATTR_HTTP_REQUEST_HEADER = (key) => `http.request.header.${key}`;\n/**\n * HTTP request method.\n *\n * @example GET\n * @example POST\n * @example HEAD\n *\n * @note HTTP request method value **SHOULD** be \"known\" to the instrumentation.\n * By default, this convention defines \"known\" methods as the ones listed in [RFC9110](https://www.rfc-editor.org/rfc/rfc9110.html#name-methods)\n * and the PATCH method defined in [RFC5789](https://www.rfc-editor.org/rfc/rfc5789.html).\n *\n * If the HTTP request method is not known to instrumentation, it **MUST** set the `http.request.method` attribute to `_OTHER`.\n *\n * If the HTTP instrumentation could end up converting valid HTTP request methods to `_OTHER`, then it **MUST** provide a way to override\n * the list of known HTTP methods. If this override is done via environment variable, then the environment variable **MUST** be named\n * OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS and support a comma-separated list of case-sensitive known HTTP methods\n * (this list **MUST** be a full override of the default known method, it is not a list of known methods in addition to the defaults).\n *\n * HTTP method names are case-sensitive and `http.request.method` attribute value **MUST** match a known HTTP method name exactly.\n * Instrumentations for specific web frameworks that consider HTTP methods to be case insensitive, **SHOULD** populate a canonical equivalent.\n * Tracing instrumentations that do so, **MUST** also set `http.request.method_original` to the original value.\n */\nexport const ATTR_HTTP_REQUEST_METHOD = 'http.request.method';\n/**\n * Enum value \"_OTHER\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n *\n * Any HTTP method that the instrumentation has no prior knowledge of.\n */\nexport const HTTP_REQUEST_METHOD_VALUE_OTHER = \"_OTHER\";\n/**\n * Enum value \"CONNECT\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n *\n * CONNECT method.\n */\nexport const HTTP_REQUEST_METHOD_VALUE_CONNECT = \"CONNECT\";\n/**\n * Enum value \"DELETE\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n *\n * DELETE method.\n */\nexport const HTTP_REQUEST_METHOD_VALUE_DELETE = \"DELETE\";\n/**\n * Enum value \"GET\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n *\n * GET method.\n */\nexport const HTTP_REQUEST_METHOD_VALUE_GET = \"GET\";\n/**\n * Enum value \"HEAD\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n *\n * HEAD method.\n */\nexport const HTTP_REQUEST_METHOD_VALUE_HEAD = \"HEAD\";\n/**\n * Enum value \"OPTIONS\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n *\n * OPTIONS method.\n */\nexport const HTTP_REQUEST_METHOD_VALUE_OPTIONS = \"OPTIONS\";\n/**\n * Enum value \"PATCH\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n *\n * PATCH method.\n */\nexport const HTTP_REQUEST_METHOD_VALUE_PATCH = \"PATCH\";\n/**\n * Enum value \"POST\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n *\n * POST method.\n */\nexport const HTTP_REQUEST_METHOD_VALUE_POST = \"POST\";\n/**\n * Enum value \"PUT\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n *\n * PUT method.\n */\nexport const HTTP_REQUEST_METHOD_VALUE_PUT = \"PUT\";\n/**\n * Enum value \"TRACE\" for attribute {@link ATTR_HTTP_REQUEST_METHOD}.\n *\n * TRACE method.\n */\nexport const HTTP_REQUEST_METHOD_VALUE_TRACE = \"TRACE\";\n/**\n * Original HTTP method sent by the client in the request line.\n *\n * @example GeT\n * @example ACL\n * @example foo\n */\nexport const ATTR_HTTP_REQUEST_METHOD_ORIGINAL = 'http.request.method_original';\n/**\n * The ordinal number of request resending attempt (for any reason, including redirects).\n *\n * @example 3\n *\n * @note The resend count **SHOULD** be updated each time an HTTP request gets resent by the client, regardless of what was the cause of the resending (e.g. redirection, authorization failure, 503 Server Unavailable, network issues, or any other).\n */\nexport const ATTR_HTTP_REQUEST_RESEND_COUNT = 'http.request.resend_count';\n/**\n * HTTP response headers, `<key>` being the normalized HTTP Header name (lowercase), the value being the header values.\n *\n * @example [\"application/json\"]\n * @example [\"abc\", \"def\"]\n *\n * @note Instrumentations **SHOULD** require an explicit configuration of which headers are to be captured.\n * Including all response headers can be a security risk - explicit configuration helps avoid leaking sensitive information.\n *\n * Users **MAY** explicitly configure instrumentations to capture them even though it is not recommended.\n *\n * The attribute value **MUST** consist of either multiple header values as an array of strings\n * or a single-item array containing a possibly comma-concatenated string, depending on the way\n * the HTTP library provides access to headers.\n *\n * Examples:\n *\n * - A header `Content-Type: application/json` header **SHOULD** be recorded as the `http.request.response.content-type`\n * attribute with value `[\"application/json\"]`.\n * - A header `My-custom-header: abc, def` header **SHOULD** be recorded as the `http.response.header.my-custom-header`\n * attribute with value `[\"abc\", \"def\"]` or `[\"abc, def\"]` depending on the HTTP library.\n */\nexport const ATTR_HTTP_RESPONSE_HEADER = (key) => `http.response.header.${key}`;\n/**\n * [HTTP response status code](https://tools.ietf.org/html/rfc7231#section-6).\n *\n * @example 200\n */\nexport const ATTR_HTTP_RESPONSE_STATUS_CODE = 'http.response.status_code';\n/**\n * The matched route, that is, the path template in the format used by the respective server framework.\n *\n * @example /users/:userID?\n * @example {controller}/{action}/{id?}\n *\n * @note **MUST NOT** be populated when this is not supported by the HTTP server framework as the route attribute should have low-cardinality and the URI path can NOT substitute it.\n * **SHOULD** include the [application root](/docs/http/http-spans.md#http-server-definitions) if there is one.\n */\nexport const ATTR_HTTP_ROUTE = 'http.route';\n/**\n * Name of the garbage collector action.\n *\n * @example end of minor GC\n * @example end of major GC\n *\n * @note Garbage collector action is generally obtained via [GarbageCollectionNotificationInfo#getGcAction()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcAction()).\n */\nexport const ATTR_JVM_GC_ACTION = 'jvm.gc.action';\n/**\n * Name of the garbage collector.\n *\n * @example G1 Young Generation\n * @example G1 Old Generation\n *\n * @note Garbage collector name is generally obtained via [GarbageCollectionNotificationInfo#getGcName()](https://docs.oracle.com/en/java/javase/11/docs/api/jdk.management/com/sun/management/GarbageCollectionNotificationInfo.html#getGcName()).\n */\nexport const ATTR_JVM_GC_NAME = 'jvm.gc.name';\n/**\n * Name of the memory pool.\n *\n * @example G1 Old Gen\n * @example G1 Eden space\n * @example G1 Survivor Space\n *\n * @note Pool names are generally obtained via [MemoryPoolMXBean#getName()](https://docs.oracle.com/en/java/javase/11/docs/api/java.management/java/lang/management/MemoryPoolMXBean.html#getName()).\n */\nexport const ATTR_JVM_MEMORY_POOL_NAME = 'jvm.memory.pool.name';\n/**\n * The type of memory.\n *\n * @example heap\n * @example non_heap\n */\nexport const ATTR_JVM_MEMORY_TYPE = 'jvm.memory.type';\n/**\n * Enum value \"heap\" for attribute {@link ATTR_JVM_MEMORY_TYPE}.\n *\n * Heap memory.\n */\nexport const JVM_MEMORY_TYPE_VALUE_HEAP = \"heap\";\n/**\n * Enum value \"non_heap\" for attribute {@link ATTR_JVM_MEMORY_TYPE}.\n *\n * Non-heap memory\n */\nexport const JVM_MEMORY_TYPE_VALUE_NON_HEAP = \"non_heap\";\n/**\n * Whether the thread is daemon or not.\n */\nexport const ATTR_JVM_THREAD_DAEMON = 'jvm.thread.daemon';\n/**\n * State of the thread.\n *\n * @example runnable\n * @example blocked\n */\nexport const ATTR_JVM_THREAD_STATE = 'jvm.thread.state';\n/**\n * Enum value \"blocked\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n *\n * A thread that is blocked waiting for a monitor lock is in this state.\n */\nexport const JVM_THREAD_STATE_VALUE_BLOCKED = \"blocked\";\n/**\n * Enum value \"new\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n *\n * A thread that has not yet started is in this state.\n */\nexport const JVM_THREAD_STATE_VALUE_NEW = \"new\";\n/**\n * Enum value \"runnable\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n *\n * A thread executing in the Java virtual machine is in this state.\n */\nexport const JVM_THREAD_STATE_VALUE_RUNNABLE = \"runnable\";\n/**\n * Enum value \"terminated\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n *\n * A thread that has exited is in this state.\n */\nexport const JVM_THREAD_STATE_VALUE_TERMINATED = \"terminated\";\n/**\n * Enum value \"timed_waiting\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n *\n * A thread that is waiting for another thread to perform an action for up to a specified waiting time is in this state.\n */\nexport const JVM_THREAD_STATE_VALUE_TIMED_WAITING = \"timed_waiting\";\n/**\n * Enum value \"waiting\" for attribute {@link ATTR_JVM_THREAD_STATE}.\n *\n * A thread that is waiting indefinitely for another thread to perform a particular action is in this state.\n */\nexport const JVM_THREAD_STATE_VALUE_WAITING = \"waiting\";\n/**\n * Local address of the network connection - IP address or Unix domain socket name.\n *\n * @example 10.1.2.80\n * @example /tmp/my.sock\n */\nexport const ATTR_NETWORK_LOCAL_ADDRESS = 'network.local.address';\n/**\n * Local port number of the network connection.\n *\n * @example 65123\n */\nexport const ATTR_NETWORK_LOCAL_PORT = 'network.local.port';\n/**\n * Peer address of the network connection - IP address or Unix domain socket name.\n *\n * @example 10.1.2.80\n * @example /tmp/my.sock\n */\nexport const ATTR_NETWORK_PEER_ADDRESS = 'network.peer.address';\n/**\n * Peer port number of the network connection.\n *\n * @example 65123\n */\nexport const ATTR_NETWORK_PEER_PORT = 'network.peer.port';\n/**\n * [OSI application layer](https://wikipedia.org/wiki/Application_layer) or non-OSI equivalent.\n *\n * @example amqp\n * @example http\n * @example mqtt\n *\n * @note The value **SHOULD** be normalized to lowercase.\n */\nexport const ATTR_NETWORK_PROTOCOL_NAME = 'network.protocol.name';\n/**\n * The actual version of the protocol used for network communication.\n *\n * @example 1.1\n * @example 2\n *\n * @note If protocol version is subject to negotiation (for example using [ALPN](https://www.rfc-editor.org/rfc/rfc7301.html)), this attribute **SHOULD** be set to the negotiated version. If the actual protocol version is not known, this attribute **SHOULD NOT** be set.\n */\nexport const ATTR_NETWORK_PROTOCOL_VERSION = 'network.protocol.version';\n/**\n * [OSI transport layer](https://wikipedia.org/wiki/Transport_layer) or [inter-process communication method](https://wikipedia.org/wiki/Inter-process_communication).\n *\n * @example tcp\n * @example udp\n *\n * @note The value **SHOULD** be normalized to lowercase.\n *\n * Consider always setting the transport when setting a port number, since\n * a port number is ambiguous without knowing the transport. For example\n * different processes could be listening on TCP port 12345 and UDP port 12345.\n */\nexport const ATTR_NETWORK_TRANSPORT = 'network.transport';\n/**\n * Enum value \"pipe\" for attribute {@link ATTR_NETWORK_TRANSPORT}.\n *\n * Named or anonymous pipe.\n */\nexport const NETWORK_TRANSPORT_VALUE_PIPE = \"pipe\";\n/**\n * Enum value \"quic\" for attribute {@link ATTR_NETWORK_TRANSPORT}.\n *\n * QUIC\n */\nexport const NETWORK_TRANSPORT_VALUE_QUIC = \"quic\";\n/**\n * Enum value \"tcp\" for attribute {@link ATTR_NETWORK_TRANSPORT}.\n *\n * TCP\n */\nexport const NETWORK_TRANSPORT_VALUE_TCP = \"tcp\";\n/**\n * Enum value \"udp\" for attribute {@link ATTR_NETWORK_TRANSPORT}.\n *\n * UDP\n */\nexport const NETWORK_TRANSPORT_VALUE_UDP = \"udp\";\n/**\n * Enum value \"unix\" for attribute {@link ATTR_NETWORK_TRANSPORT}.\n *\n * Unix domain socket\n */\nexport const NETWORK_TRANSPORT_VALUE_UNIX = \"unix\";\n/**\n * [OSI network layer](https://wikipedia.org/wiki/Network_layer) or non-OSI equivalent.\n *\n * @example ipv4\n * @example ipv6\n *\n * @note The value **SHOULD** be normalized to lowercase.\n */\nexport const ATTR_NETWORK_TYPE = 'network.type';\n/**\n * Enum value \"ipv4\" for attribute {@link ATTR_NETWORK_TYPE}.\n *\n * IPv4\n */\nexport const NETWORK_TYPE_VALUE_IPV4 = \"ipv4\";\n/**\n * Enum value \"ipv6\" for attribute {@link ATTR_NETWORK_TYPE}.\n *\n * IPv6\n */\nexport const NETWORK_TYPE_VALUE_IPV6 = \"ipv6\";\n/**\n * The name of the instrumentation scope - (`InstrumentationScope.Name` in OTLP).\n *\n * @example io.opentelemetry.contrib.mongodb\n */\nexport const ATTR_OTEL_SCOPE_NAME = 'otel.scope.name';\n/**\n * The version of the instrumentation scope - (`InstrumentationScope.Version` in OTLP).\n *\n * @example 1.0.0\n */\nexport const ATTR_OTEL_SCOPE_VERSION = 'otel.scope.version';\n/**\n * Name of the code, either \"OK\" or \"ERROR\". **MUST NOT** be set if the status code is UNSET.\n */\nexport const ATTR_OTEL_STATUS_CODE = 'otel.status_code';\n/**\n * Enum value \"ERROR\" for attribute {@link ATTR_OTEL_STATUS_CODE}.\n *\n * The operation contains an error.\n */\nexport const OTEL_STATUS_CODE_VALUE_ERROR = \"ERROR\";\n/**\n * Enum value \"OK\" for attribute {@link ATTR_OTEL_STATUS_CODE}.\n *\n * The operation has been validated by an Application developer or Operator to have completed successfully.\n */\nexport const OTEL_STATUS_CODE_VALUE_OK = \"OK\";\n/**\n * Description of the Status if it has a value, otherwise not set.\n *\n * @example resource not found\n */\nexport const ATTR_OTEL_STATUS_DESCRIPTION = 'otel.status_description';\n/**\n * Server domain name if available without reverse DNS lookup; otherwise, IP address or Unix domain socket name.\n *\n * @example example.com\n * @example 10.1.2.80\n * @example /tmp/my.sock\n *\n * @note When observed from the client side, and when communicating through an intermediary, `server.address` **SHOULD** represent the server address behind any intermediaries, for example proxies, if it's available.\n */\nexport const ATTR_SERVER_ADDRESS = 'server.address';\n/**\n * Server port number.\n *\n * @example 80\n * @example 8080\n * @example 443\n *\n * @note When observed from the client side, and when communicating through an intermediary, `server.port` **SHOULD** represent the server port behind any intermediaries, for example proxies, if it's available.\n */\nexport const ATTR_SERVER_PORT = 'server.port';\n/**\n * Logical name of the service.\n *\n * @example shoppingcart\n *\n * @note **MUST** be the same for all instances of horizontally scaled services. If the value was not specified, SDKs **MUST** fallback to `unknown_service:` concatenated with [`process.executable.name`](process.md), e.g. `unknown_service:bash`. If `process.executable.name` is not available, the value **MUST** be set to `unknown_service`.\n */\nexport const ATTR_SERVICE_NAME = 'service.name';\n/**\n * The version string of the service API or implementation. The format is not defined by these conventions.\n *\n * @example 2.0.0\n * @example a01dbef8a\n */\nexport const ATTR_SERVICE_VERSION = 'service.version';\n/**\n * SignalR HTTP connection closure status.\n *\n * @example app_shutdown\n * @example timeout\n */\nexport const ATTR_SIGNALR_CONNECTION_STATUS = 'signalr.connection.status';\n/**\n * Enum value \"app_shutdown\" for attribute {@link ATTR_SIGNALR_CONNECTION_STATUS}.\n *\n * The connection was closed because the app is shutting down.\n */\nexport const SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN = \"app_shutdown\";\n/**\n * Enum value \"normal_closure\" for attribute {@link ATTR_SIGNALR_CONNECTION_STATUS}.\n *\n * The connection was closed normally.\n */\nexport const SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE = \"normal_closure\";\n/**\n * Enum value \"timeout\" for attribute {@link ATTR_SIGNALR_CONNECTION_STATUS}.\n *\n * The connection was closed due to a timeout.\n */\nexport const SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT = \"timeout\";\n/**\n * [SignalR transport type](https://github.com/dotnet/aspnetcore/blob/main/src/SignalR/docs/specs/TransportProtocols.md)\n *\n * @example web_sockets\n * @example long_polling\n */\nexport const ATTR_SIGNALR_TRANSPORT = 'signalr.transport';\n/**\n * Enum value \"long_polling\" for attribute {@link ATTR_SIGNALR_TRANSPORT}.\n *\n * LongPolling protocol\n */\nexport const SIGNALR_TRANSPORT_VALUE_LONG_POLLING = \"long_polling\";\n/**\n * Enum value \"server_sent_events\" for attribute {@link ATTR_SIGNALR_TRANSPORT}.\n *\n * ServerSentEvents protocol\n */\nexport const SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS = \"server_sent_events\";\n/**\n * Enum value \"web_sockets\" for attribute {@link ATTR_SIGNALR_TRANSPORT}.\n *\n * WebSockets protocol\n */\nexport const SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS = \"web_sockets\";\n/**\n * The language of the telemetry SDK.\n */\nexport const ATTR_TELEMETRY_SDK_LANGUAGE = 'telemetry.sdk.language';\n/**\n * Enum value \"cpp\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_CPP = \"cpp\";\n/**\n * Enum value \"dotnet\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET = \"dotnet\";\n/**\n * Enum value \"erlang\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG = \"erlang\";\n/**\n * Enum value \"go\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_GO = \"go\";\n/**\n * Enum value \"java\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_JAVA = \"java\";\n/**\n * Enum value \"nodejs\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS = \"nodejs\";\n/**\n * Enum value \"php\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_PHP = \"php\";\n/**\n * Enum value \"python\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON = \"python\";\n/**\n * Enum value \"ruby\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_RUBY = \"ruby\";\n/**\n * Enum value \"rust\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_RUST = \"rust\";\n/**\n * Enum value \"swift\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT = \"swift\";\n/**\n * Enum value \"webjs\" for attribute {@link ATTR_TELEMETRY_SDK_LANGUAGE}.\n */\nexport const TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS = \"webjs\";\n/**\n * The name of the telemetry SDK as defined above.\n *\n * @example opentelemetry\n *\n * @note The OpenTelemetry SDK **MUST** set the `telemetry.sdk.name` attribute to `opentelemetry`.\n * If another SDK, like a fork or a vendor-provided implementation, is used, this SDK **MUST** set the\n * `telemetry.sdk.name` attribute to the fully-qualified class or module name of this SDK's main entry point\n * or another suitable identifier depending on the language.\n * The identifier `opentelemetry` is reserved and **MUST NOT** be used in this case.\n * All custom identifiers **SHOULD** be stable across different versions of an implementation.\n */\nexport const ATTR_TELEMETRY_SDK_NAME = 'telemetry.sdk.name';\n/**\n * The version string of the telemetry SDK.\n *\n * @example 1.2.3\n */\nexport const ATTR_TELEMETRY_SDK_VERSION = 'telemetry.sdk.version';\n/**\n * The [URI fragment](https://www.rfc-editor.org/rfc/rfc3986#section-3.5) component\n *\n * @example SemConv\n */\nexport const ATTR_URL_FRAGMENT = 'url.fragment';\n/**\n * Absolute URL describing a network resource according to [RFC3986](https://www.rfc-editor.org/rfc/rfc3986)\n *\n * @example https://www.foo.bar/search?q=OpenTelemetry#SemConv\n * @example //localhost\n *\n * @note For network calls, URL usually has `scheme://host[:port][path][?query][#fragment]` format, where the fragment\n * is not transmitted over HTTP, but if it is known, it **SHOULD** be included nevertheless.\n *\n * `url.full` **MUST NOT** contain credentials passed via URL in form of `https://username:password@www.example.com/`.\n * In such case username and password **SHOULD** be redacted and attribute's value **SHOULD** be `https://REDACTED:REDACTED@www.example.com/`.\n *\n * `url.full` **SHOULD** capture the absolute URL when it is available (or can be reconstructed).\n *\n * Sensitive content provided in `url.full` **SHOULD** be scrubbed when instrumentations can identify it.\n *\n *\n * Query string values for the following keys **SHOULD** be redacted by default and replaced by the\n * value `REDACTED`:\n *\n * - [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\n * - [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\n * - [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token)\n * - [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls)\n *\n * This list is subject to change over time.\n *\n * When a query string value is redacted, the query string key **SHOULD** still be preserved, e.g.\n * `https://www.example.com/path?color=blue&sig=REDACTED`.\n */\nexport const ATTR_URL_FULL = 'url.full';\n/**\n * The [URI path](https://www.rfc-editor.org/rfc/rfc3986#section-3.3) component\n *\n * @example /search\n *\n * @note Sensitive content provided in `url.path` **SHOULD** be scrubbed when instrumentations can identify it.\n */\nexport const ATTR_URL_PATH = 'url.path';\n/**\n * The [URI query](https://www.rfc-editor.org/rfc/rfc3986#section-3.4) component\n *\n * @example q=OpenTelemetry\n *\n * @note Sensitive content provided in `url.query` **SHOULD** be scrubbed when instrumentations can identify it.\n *\n *\n * Query string values for the following keys **SHOULD** be redacted by default and replaced by the value `REDACTED`:\n *\n * - [`AWSAccessKeyId`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\n * - [`Signature`](https://docs.aws.amazon.com/AmazonS3/latest/userguide/RESTAuthentication.html#RESTAuthenticationQueryStringAuth)\n * - [`sig`](https://learn.microsoft.com/azure/storage/common/storage-sas-overview#sas-token)\n * - [`X-Goog-Signature`](https://cloud.google.com/storage/docs/access-control/signed-urls)\n *\n * This list is subject to change over time.\n *\n * When a query string value is redacted, the query string key **SHOULD** still be preserved, e.g.\n * `q=OpenTelemetry&sig=REDACTED`.\n */\nexport const ATTR_URL_QUERY = 'url.query';\n/**\n * The [URI scheme](https://www.rfc-editor.org/rfc/rfc3986#section-3.1) component identifying the used protocol.\n *\n * @example https\n * @example ftp\n * @example telnet\n */\nexport const ATTR_URL_SCHEME = 'url.scheme';\n/**\n * Value of the [HTTP User-Agent](https://www.rfc-editor.org/rfc/rfc9110.html#field.user-agent) header sent by the client.\n *\n * @example CERN-LineMode/2.15 libwww/2.17b3\n * @example Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1\n * @example YourApp/1.0.0 grpc-java-okhttp/1.27.2\n */\nexport const ATTR_USER_AGENT_ORIGINAL = 'user_agent.original';\n//# sourceMappingURL=stable_attributes.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n/**\n * The name of the runtime of this process.\n *\n * @example OpenJDK Runtime Environment\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_PROCESS_RUNTIME_NAME = 'process.runtime.name';\n//# sourceMappingURL=semconv.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { VERSION } from '../../version';\nimport { ATTR_TELEMETRY_SDK_NAME, ATTR_TELEMETRY_SDK_LANGUAGE, TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS, ATTR_TELEMETRY_SDK_VERSION, } from '@opentelemetry/semantic-conventions';\nimport { ATTR_PROCESS_RUNTIME_NAME } from '../../semconv';\n/** Constants describing the SDK in use */\nexport const SDK_INFO = {\n [ATTR_TELEMETRY_SDK_NAME]: 'opentelemetry',\n [ATTR_PROCESS_RUNTIME_NAME]: 'node',\n [ATTR_TELEMETRY_SDK_LANGUAGE]: TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS,\n [ATTR_TELEMETRY_SDK_VERSION]: VERSION,\n};\n//# sourceMappingURL=sdk-info.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '2.0.1';\n//# sourceMappingURL=version.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { otperformance as performance } from '../platform';\nconst NANOSECOND_DIGITS = 9;\nconst NANOSECOND_DIGITS_IN_MILLIS = 6;\nconst MILLISECONDS_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS_IN_MILLIS);\nconst SECOND_TO_NANOSECONDS = Math.pow(10, NANOSECOND_DIGITS);\n/**\n * Converts a number of milliseconds from epoch to HrTime([seconds, remainder in nanoseconds]).\n * @param epochMillis\n */\nexport function millisToHrTime(epochMillis) {\n const epochSeconds = epochMillis / 1000;\n // Decimals only.\n const seconds = Math.trunc(epochSeconds);\n // Round sub-nanosecond accuracy to nanosecond.\n const nanos = Math.round((epochMillis % 1000) * MILLISECONDS_TO_NANOSECONDS);\n return [seconds, nanos];\n}\nexport function getTimeOrigin() {\n let timeOrigin = performance.timeOrigin;\n if (typeof timeOrigin !== 'number') {\n const perf = performance;\n timeOrigin = perf.timing && perf.timing.fetchStart;\n }\n return timeOrigin;\n}\n/**\n * Returns an hrtime calculated via performance component.\n * @param performanceNow\n */\nexport function hrTime(performanceNow) {\n const timeOrigin = millisToHrTime(getTimeOrigin());\n const now = millisToHrTime(typeof performanceNow === 'number' ? performanceNow : performance.now());\n return addHrTimes(timeOrigin, now);\n}\n/**\n *\n * Converts a TimeInput to an HrTime, defaults to _hrtime().\n * @param time\n */\nexport function timeInputToHrTime(time) {\n // process.hrtime\n if (isTimeInputHrTime(time)) {\n return time;\n }\n else if (typeof time === 'number') {\n // Must be a performance.now() if it's smaller than process start time.\n if (time < getTimeOrigin()) {\n return hrTime(time);\n }\n else {\n // epoch milliseconds or performance.timeOrigin\n return millisToHrTime(time);\n }\n }\n else if (time instanceof Date) {\n return millisToHrTime(time.getTime());\n }\n else {\n throw TypeError('Invalid input type');\n }\n}\n/**\n * Returns a duration of two hrTime.\n * @param startTime\n * @param endTime\n */\nexport function hrTimeDuration(startTime, endTime) {\n let seconds = endTime[0] - startTime[0];\n let nanos = endTime[1] - startTime[1];\n // overflow\n if (nanos < 0) {\n seconds -= 1;\n // negate\n nanos += SECOND_TO_NANOSECONDS;\n }\n return [seconds, nanos];\n}\n/**\n * Convert hrTime to timestamp, for example \"2019-05-14T17:00:00.000123456Z\"\n * @param time\n */\nexport function hrTimeToTimeStamp(time) {\n const precision = NANOSECOND_DIGITS;\n const tmp = `${'0'.repeat(precision)}${time[1]}Z`;\n const nanoString = tmp.substring(tmp.length - precision - 1);\n const date = new Date(time[0] * 1000).toISOString();\n return date.replace('000Z', nanoString);\n}\n/**\n * Convert hrTime to nanoseconds.\n * @param time\n */\nexport function hrTimeToNanoseconds(time) {\n return time[0] * SECOND_TO_NANOSECONDS + time[1];\n}\n/**\n * Convert hrTime to milliseconds.\n * @param time\n */\nexport function hrTimeToMilliseconds(time) {\n return time[0] * 1e3 + time[1] / 1e6;\n}\n/**\n * Convert hrTime to microseconds.\n * @param time\n */\nexport function hrTimeToMicroseconds(time) {\n return time[0] * 1e6 + time[1] / 1e3;\n}\n/**\n * check if time is HrTime\n * @param value\n */\nexport function isTimeInputHrTime(value) {\n return (Array.isArray(value) &&\n value.length === 2 &&\n typeof value[0] === 'number' &&\n typeof value[1] === 'number');\n}\n/**\n * check if input value is a correct types.TimeInput\n * @param value\n */\nexport function isTimeInput(value) {\n return (isTimeInputHrTime(value) ||\n typeof value === 'number' ||\n value instanceof Date);\n}\n/**\n * Given 2 HrTime formatted times, return their sum as an HrTime.\n */\nexport function addHrTimes(time1, time2) {\n const out = [time1[0] + time2[0], time1[1] + time2[1]];\n // Nanoseconds\n if (out[1] >= SECOND_TO_NANOSECONDS) {\n out[1] -= SECOND_TO_NANOSECONDS;\n out[0] += 1;\n }\n return out;\n}\n//# sourceMappingURL=time.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var ExportResultCode;\n(function (ExportResultCode) {\n ExportResultCode[ExportResultCode[\"SUCCESS\"] = 0] = \"SUCCESS\";\n ExportResultCode[ExportResultCode[\"FAILED\"] = 1] = \"FAILED\";\n})(ExportResultCode || (ExportResultCode = {}));\n//# sourceMappingURL=ExportResult.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { diag, } from '@opentelemetry/api';\n/** Combines multiple propagators into a single propagator. */\nexport class CompositePropagator {\n _propagators;\n _fields;\n /**\n * Construct a composite propagator from a list of propagators.\n *\n * @param [config] Configuration object for composite propagator\n */\n constructor(config = {}) {\n this._propagators = config.propagators ?? [];\n this._fields = Array.from(new Set(this._propagators\n // older propagators may not have fields function, null check to be sure\n .map(p => (typeof p.fields === 'function' ? p.fields() : []))\n .reduce((x, y) => x.concat(y), [])));\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same carrier key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to inject\n * @param carrier Carrier into which context will be injected\n */\n inject(context, carrier, setter) {\n for (const propagator of this._propagators) {\n try {\n propagator.inject(context, carrier, setter);\n }\n catch (err) {\n diag.warn(`Failed to inject with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n }\n }\n /**\n * Run each of the configured propagators with the given context and carrier.\n * Propagators are run in the order they are configured, so if multiple\n * propagators write the same context key, the propagator later in the list\n * will \"win\".\n *\n * @param context Context to add values to\n * @param carrier Carrier from which to extract context\n */\n extract(context, carrier, getter) {\n return this._propagators.reduce((ctx, propagator) => {\n try {\n return propagator.extract(ctx, carrier, getter);\n }\n catch (err) {\n diag.warn(`Failed to extract with ${propagator.constructor.name}. Err: ${err.message}`);\n }\n return ctx;\n }, context);\n }\n fields() {\n // return a new array so our fields cannot be modified\n return this._fields.slice();\n }\n}\n//# sourceMappingURL=composite.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst VALID_KEY_CHAR_RANGE = '[_0-9a-z-*/]';\nconst VALID_KEY = `[a-z]${VALID_KEY_CHAR_RANGE}{0,255}`;\nconst VALID_VENDOR_KEY = `[a-z0-9]${VALID_KEY_CHAR_RANGE}{0,240}@[a-z]${VALID_KEY_CHAR_RANGE}{0,13}`;\nconst VALID_KEY_REGEX = new RegExp(`^(?:${VALID_KEY}|${VALID_VENDOR_KEY})$`);\nconst VALID_VALUE_BASE_REGEX = /^[ -~]{0,255}[!-~]$/;\nconst INVALID_VALUE_COMMA_EQUAL_REGEX = /,|=/;\n/**\n * Key is opaque string up to 256 characters printable. It MUST begin with a\n * lowercase letter, and can only contain lowercase letters a-z, digits 0-9,\n * underscores _, dashes -, asterisks *, and forward slashes /.\n * For multi-tenant vendor scenarios, an at sign (@) can be used to prefix the\n * vendor name. Vendors SHOULD set the tenant ID at the beginning of the key.\n * see https://www.w3.org/TR/trace-context/#key\n */\nexport function validateKey(key) {\n return VALID_KEY_REGEX.test(key);\n}\n/**\n * Value is opaque string up to 256 characters printable ASCII RFC0020\n * characters (i.e., the range 0x20 to 0x7E) except comma , and =.\n */\nexport function validateValue(value) {\n return (VALID_VALUE_BASE_REGEX.test(value) &&\n !INVALID_VALUE_COMMA_EQUAL_REGEX.test(value));\n}\n//# sourceMappingURL=validators.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { validateKey, validateValue } from '../internal/validators';\nconst MAX_TRACE_STATE_ITEMS = 32;\nconst MAX_TRACE_STATE_LEN = 512;\nconst LIST_MEMBERS_SEPARATOR = ',';\nconst LIST_MEMBER_KEY_VALUE_SPLITTER = '=';\n/**\n * TraceState must be a class and not a simple object type because of the spec\n * requirement (https://www.w3.org/TR/trace-context/#tracestate-field).\n *\n * Here is the list of allowed mutations:\n * - New key-value pair should be added into the beginning of the list\n * - The value of any key can be updated. Modified keys MUST be moved to the\n * beginning of the list.\n */\nexport class TraceState {\n _internalState = new Map();\n constructor(rawTraceState) {\n if (rawTraceState)\n this._parse(rawTraceState);\n }\n set(key, value) {\n // TODO: Benchmark the different approaches(map vs list) and\n // use the faster one.\n const traceState = this._clone();\n if (traceState._internalState.has(key)) {\n traceState._internalState.delete(key);\n }\n traceState._internalState.set(key, value);\n return traceState;\n }\n unset(key) {\n const traceState = this._clone();\n traceState._internalState.delete(key);\n return traceState;\n }\n get(key) {\n return this._internalState.get(key);\n }\n serialize() {\n return this._keys()\n .reduce((agg, key) => {\n agg.push(key + LIST_MEMBER_KEY_VALUE_SPLITTER + this.get(key));\n return agg;\n }, [])\n .join(LIST_MEMBERS_SEPARATOR);\n }\n _parse(rawTraceState) {\n if (rawTraceState.length > MAX_TRACE_STATE_LEN)\n return;\n this._internalState = rawTraceState\n .split(LIST_MEMBERS_SEPARATOR)\n .reverse() // Store in reverse so new keys (.set(...)) will be placed at the beginning\n .reduce((agg, part) => {\n const listMember = part.trim(); // Optional Whitespace (OWS) handling\n const i = listMember.indexOf(LIST_MEMBER_KEY_VALUE_SPLITTER);\n if (i !== -1) {\n const key = listMember.slice(0, i);\n const value = listMember.slice(i + 1, part.length);\n if (validateKey(key) && validateValue(value)) {\n agg.set(key, value);\n }\n else {\n // TODO: Consider to add warning log\n }\n }\n return agg;\n }, new Map());\n // Because of the reverse() requirement, trunc must be done after map is created\n if (this._internalState.size > MAX_TRACE_STATE_ITEMS) {\n this._internalState = new Map(Array.from(this._internalState.entries())\n .reverse() // Use reverse same as original tracestate parse chain\n .slice(0, MAX_TRACE_STATE_ITEMS));\n }\n }\n _keys() {\n return Array.from(this._internalState.keys()).reverse();\n }\n _clone() {\n const traceState = new TraceState();\n traceState._internalState = new Map(this._internalState);\n return traceState;\n }\n}\n//# sourceMappingURL=TraceState.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isSpanContextValid, trace, TraceFlags, } from '@opentelemetry/api';\nimport { isTracingSuppressed } from './suppress-tracing';\nimport { TraceState } from './TraceState';\nexport const TRACE_PARENT_HEADER = 'traceparent';\nexport const TRACE_STATE_HEADER = 'tracestate';\nconst VERSION = '00';\nconst VERSION_PART = '(?!ff)[\\\\da-f]{2}';\nconst TRACE_ID_PART = '(?![0]{32})[\\\\da-f]{32}';\nconst PARENT_ID_PART = '(?![0]{16})[\\\\da-f]{16}';\nconst FLAGS_PART = '[\\\\da-f]{2}';\nconst TRACE_PARENT_REGEX = new RegExp(`^\\\\s?(${VERSION_PART})-(${TRACE_ID_PART})-(${PARENT_ID_PART})-(${FLAGS_PART})(-.*)?\\\\s?$`);\n/**\n * Parses information from the [traceparent] span tag and converts it into {@link SpanContext}\n * @param traceParent - A meta property that comes from server.\n * It should be dynamically generated server side to have the server's request trace Id,\n * a parent span Id that was set on the server's request span,\n * and the trace flags to indicate the server's sampling decision\n * (01 = sampled, 00 = not sampled).\n * for example: '{version}-{traceId}-{spanId}-{sampleDecision}'\n * For more information see {@link https://www.w3.org/TR/trace-context/}\n */\nexport function parseTraceParent(traceParent) {\n const match = TRACE_PARENT_REGEX.exec(traceParent);\n if (!match)\n return null;\n // According to the specification the implementation should be compatible\n // with future versions. If there are more parts, we only reject it if it's using version 00\n // See https://www.w3.org/TR/trace-context/#versioning-of-traceparent\n if (match[1] === '00' && match[5])\n return null;\n return {\n traceId: match[2],\n spanId: match[3],\n traceFlags: parseInt(match[4], 16),\n };\n}\n/**\n * Propagates {@link SpanContext} through Trace Context format propagation.\n *\n * Based on the Trace Context specification:\n * https://www.w3.org/TR/trace-context/\n */\nexport class W3CTraceContextPropagator {\n inject(context, carrier, setter) {\n const spanContext = trace.getSpanContext(context);\n if (!spanContext ||\n isTracingSuppressed(context) ||\n !isSpanContextValid(spanContext))\n return;\n const traceParent = `${VERSION}-${spanContext.traceId}-${spanContext.spanId}-0${Number(spanContext.traceFlags || TraceFlags.NONE).toString(16)}`;\n setter.set(carrier, TRACE_PARENT_HEADER, traceParent);\n if (spanContext.traceState) {\n setter.set(carrier, TRACE_STATE_HEADER, spanContext.traceState.serialize());\n }\n }\n extract(context, carrier, getter) {\n const traceParentHeader = getter.get(carrier, TRACE_PARENT_HEADER);\n if (!traceParentHeader)\n return context;\n const traceParent = Array.isArray(traceParentHeader)\n ? traceParentHeader[0]\n : traceParentHeader;\n if (typeof traceParent !== 'string')\n return context;\n const spanContext = parseTraceParent(traceParent);\n if (!spanContext)\n return context;\n spanContext.isRemote = true;\n const traceStateHeader = getter.get(carrier, TRACE_STATE_HEADER);\n if (traceStateHeader) {\n // If more than one `tracestate` header is found, we merge them into a\n // single header.\n const state = Array.isArray(traceStateHeader)\n ? traceStateHeader.join(',')\n : traceStateHeader;\n spanContext.traceState = new TraceState(typeof state === 'string' ? state : undefined);\n }\n return trace.setSpanContext(context, spanContext);\n }\n fields() {\n return [TRACE_PARENT_HEADER, TRACE_STATE_HEADER];\n }\n}\n//# sourceMappingURL=W3CTraceContextPropagator.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * based on lodash in order to support esm builds without esModuleInterop.\n * lodash is using MIT License.\n **/\nconst objectTag = '[object Object]';\nconst nullTag = '[object Null]';\nconst undefinedTag = '[object Undefined]';\nconst funcProto = Function.prototype;\nconst funcToString = funcProto.toString;\nconst objectCtorString = funcToString.call(Object);\nconst getPrototypeOf = Object.getPrototypeOf;\nconst objectProto = Object.prototype;\nconst hasOwnProperty = objectProto.hasOwnProperty;\nconst symToStringTag = Symbol ? Symbol.toStringTag : undefined;\nconst nativeObjectToString = objectProto.toString;\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nexport function isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) !== objectTag) {\n return false;\n }\n const proto = getPrototypeOf(value);\n if (proto === null) {\n return true;\n }\n const Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return (typeof Ctor == 'function' &&\n Ctor instanceof Ctor &&\n funcToString.call(Ctor) === objectCtorString);\n}\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return symToStringTag && symToStringTag in Object(value)\n ? getRawTag(value)\n : objectToString(value);\n}\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n const isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];\n let unmasked = false;\n try {\n value[symToStringTag] = undefined;\n unmasked = true;\n }\n catch (e) {\n // silence\n }\n const result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n }\n else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n//# sourceMappingURL=lodash.merge.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { isPlainObject } from './lodash.merge';\nconst MAX_LEVEL = 20;\n/**\n * Merges objects together\n * @param args - objects / values to be merged\n */\nexport function merge(...args) {\n let result = args.shift();\n const objects = new WeakMap();\n while (args.length > 0) {\n result = mergeTwoObjects(result, args.shift(), 0, objects);\n }\n return result;\n}\nfunction takeValue(value) {\n if (isArray(value)) {\n return value.slice();\n }\n return value;\n}\n/**\n * Merges two objects\n * @param one - first object\n * @param two - second object\n * @param level - current deep level\n * @param objects - objects holder that has been already referenced - to prevent\n * cyclic dependency\n */\nfunction mergeTwoObjects(one, two, level = 0, objects) {\n let result;\n if (level > MAX_LEVEL) {\n return undefined;\n }\n level++;\n if (isPrimitive(one) || isPrimitive(two) || isFunction(two)) {\n result = takeValue(two);\n }\n else if (isArray(one)) {\n result = one.slice();\n if (isArray(two)) {\n for (let i = 0, j = two.length; i < j; i++) {\n result.push(takeValue(two[i]));\n }\n }\n else if (isObject(two)) {\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n result[key] = takeValue(two[key]);\n }\n }\n }\n else if (isObject(one)) {\n if (isObject(two)) {\n if (!shouldMerge(one, two)) {\n return two;\n }\n result = Object.assign({}, one);\n const keys = Object.keys(two);\n for (let i = 0, j = keys.length; i < j; i++) {\n const key = keys[i];\n const twoValue = two[key];\n if (isPrimitive(twoValue)) {\n if (typeof twoValue === 'undefined') {\n delete result[key];\n }\n else {\n // result[key] = takeValue(twoValue);\n result[key] = twoValue;\n }\n }\n else {\n const obj1 = result[key];\n const obj2 = twoValue;\n if (wasObjectReferenced(one, key, objects) ||\n wasObjectReferenced(two, key, objects)) {\n delete result[key];\n }\n else {\n if (isObject(obj1) && isObject(obj2)) {\n const arr1 = objects.get(obj1) || [];\n const arr2 = objects.get(obj2) || [];\n arr1.push({ obj: one, key });\n arr2.push({ obj: two, key });\n objects.set(obj1, arr1);\n objects.set(obj2, arr2);\n }\n result[key] = mergeTwoObjects(result[key], twoValue, level, objects);\n }\n }\n }\n }\n else {\n result = two;\n }\n }\n return result;\n}\n/**\n * Function to check if object has been already reference\n * @param obj\n * @param key\n * @param objects\n */\nfunction wasObjectReferenced(obj, key, objects) {\n const arr = objects.get(obj[key]) || [];\n for (let i = 0, j = arr.length; i < j; i++) {\n const info = arr[i];\n if (info.key === key && info.obj === obj) {\n return true;\n }\n }\n return false;\n}\nfunction isArray(value) {\n return Array.isArray(value);\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\nfunction isObject(value) {\n return (!isPrimitive(value) &&\n !isArray(value) &&\n !isFunction(value) &&\n typeof value === 'object');\n}\nfunction isPrimitive(value) {\n return (typeof value === 'string' ||\n typeof value === 'number' ||\n typeof value === 'boolean' ||\n typeof value === 'undefined' ||\n value instanceof Date ||\n value instanceof RegExp ||\n value === null);\n}\nfunction shouldMerge(one, two) {\n if (!isPlainObject(one) || !isPlainObject(two)) {\n return false;\n }\n return true;\n}\n//# sourceMappingURL=merge.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport function urlMatches(url, urlToMatch) {\n if (typeof urlToMatch === 'string') {\n return url === urlToMatch;\n }\n else {\n return !!url.match(urlToMatch);\n }\n}\n/**\n * Check if {@param url} should be ignored when comparing against {@param ignoredUrls}\n * @param url\n * @param ignoredUrls\n */\nexport function isUrlIgnored(url, ignoredUrls) {\n if (!ignoredUrls) {\n return false;\n }\n for (const ignoreUrl of ignoredUrls) {\n if (urlMatches(url, ignoreUrl)) {\n return true;\n }\n }\n return false;\n}\n//# sourceMappingURL=url.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class Deferred {\n _promise;\n _resolve;\n _reject;\n constructor() {\n this._promise = new Promise((resolve, reject) => {\n this._resolve = resolve;\n this._reject = reject;\n });\n }\n get promise() {\n return this._promise;\n }\n resolve(val) {\n this._resolve(val);\n }\n reject(err) {\n this._reject(err);\n }\n}\n//# sourceMappingURL=promise.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Deferred } from './promise';\n/**\n * Bind the callback and only invoke the callback once regardless how many times `BindOnceFuture.call` is invoked.\n */\nexport class BindOnceFuture {\n _callback;\n _that;\n _isCalled = false;\n _deferred = new Deferred();\n constructor(_callback, _that) {\n this._callback = _callback;\n this._that = _that;\n }\n get isCalled() {\n return this._isCalled;\n }\n get promise() {\n return this._deferred.promise;\n }\n call(...args) {\n if (!this._isCalled) {\n this._isCalled = true;\n try {\n Promise.resolve(this._callback.call(this._that, ...args)).then(val => this._deferred.resolve(val), err => this._deferred.reject(err));\n }\n catch (err) {\n this._deferred.reject(err);\n }\n }\n return this._deferred.promise;\n }\n}\n//# sourceMappingURL=callback.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const isPromiseLike = (val) => {\n return (val !== null &&\n typeof val === 'object' &&\n typeof val.then === 'function');\n};\nexport function identity(_) {\n return _;\n}\n//# sourceMappingURL=utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { diag } from '@opentelemetry/api';\nimport { SDK_INFO } from '@opentelemetry/core';\nimport { ATTR_SERVICE_NAME, ATTR_TELEMETRY_SDK_LANGUAGE, ATTR_TELEMETRY_SDK_NAME, ATTR_TELEMETRY_SDK_VERSION, } from '@opentelemetry/semantic-conventions';\nimport { defaultServiceName } from './platform';\nimport { isPromiseLike } from './utils';\nclass ResourceImpl {\n _rawAttributes;\n _asyncAttributesPending = false;\n _memoizedAttributes;\n static FromAttributeList(attributes) {\n const res = new ResourceImpl({});\n res._rawAttributes = guardedRawAttributes(attributes);\n res._asyncAttributesPending =\n attributes.filter(([_, val]) => isPromiseLike(val)).length > 0;\n return res;\n }\n constructor(\n /**\n * A dictionary of attributes with string keys and values that provide\n * information about the entity as numbers, strings or booleans\n * TODO: Consider to add check/validation on attributes.\n */\n resource) {\n const attributes = resource.attributes ?? {};\n this._rawAttributes = Object.entries(attributes).map(([k, v]) => {\n if (isPromiseLike(v)) {\n // side-effect\n this._asyncAttributesPending = true;\n }\n return [k, v];\n });\n this._rawAttributes = guardedRawAttributes(this._rawAttributes);\n }\n get asyncAttributesPending() {\n return this._asyncAttributesPending;\n }\n async waitForAsyncAttributes() {\n if (!this.asyncAttributesPending) {\n return;\n }\n for (let i = 0; i < this._rawAttributes.length; i++) {\n const [k, v] = this._rawAttributes[i];\n this._rawAttributes[i] = [k, isPromiseLike(v) ? await v : v];\n }\n this._asyncAttributesPending = false;\n }\n get attributes() {\n if (this.asyncAttributesPending) {\n diag.error('Accessing resource attributes before async attributes settled');\n }\n if (this._memoizedAttributes) {\n return this._memoizedAttributes;\n }\n const attrs = {};\n for (const [k, v] of this._rawAttributes) {\n if (isPromiseLike(v)) {\n diag.debug(`Unsettled resource attribute ${k} skipped`);\n continue;\n }\n if (v != null) {\n attrs[k] ??= v;\n }\n }\n // only memoize output if all attributes are settled\n if (!this._asyncAttributesPending) {\n this._memoizedAttributes = attrs;\n }\n return attrs;\n }\n getRawAttributes() {\n return this._rawAttributes;\n }\n merge(resource) {\n if (resource == null)\n return this;\n // Order is important\n // Spec states incoming attributes override existing attributes\n return ResourceImpl.FromAttributeList([\n ...resource.getRawAttributes(),\n ...this.getRawAttributes(),\n ]);\n }\n}\nexport function resourceFromAttributes(attributes) {\n return ResourceImpl.FromAttributeList(Object.entries(attributes));\n}\nexport function resourceFromDetectedResource(detectedResource) {\n return new ResourceImpl(detectedResource);\n}\nexport function emptyResource() {\n return resourceFromAttributes({});\n}\nexport function defaultResource() {\n return resourceFromAttributes({\n [ATTR_SERVICE_NAME]: defaultServiceName(),\n [ATTR_TELEMETRY_SDK_LANGUAGE]: SDK_INFO[ATTR_TELEMETRY_SDK_LANGUAGE],\n [ATTR_TELEMETRY_SDK_NAME]: SDK_INFO[ATTR_TELEMETRY_SDK_NAME],\n [ATTR_TELEMETRY_SDK_VERSION]: SDK_INFO[ATTR_TELEMETRY_SDK_VERSION],\n });\n}\nfunction guardedRawAttributes(attributes) {\n return attributes.map(([k, v]) => {\n if (isPromiseLike(v)) {\n return [\n k,\n v.catch(err => {\n diag.debug('promise rejection for resource attribute: %s - %s', k, err);\n return undefined;\n }),\n ];\n }\n return [k, v];\n });\n}\n//# sourceMappingURL=ResourceImpl.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { diag, SpanStatusCode, } from '@opentelemetry/api';\nimport { addHrTimes, millisToHrTime, getTimeOrigin, hrTime, hrTimeDuration, isAttributeValue, isTimeInput, isTimeInputHrTime, otperformance, sanitizeAttributes, } from '@opentelemetry/core';\nimport { ATTR_EXCEPTION_MESSAGE, ATTR_EXCEPTION_STACKTRACE, ATTR_EXCEPTION_TYPE, } from '@opentelemetry/semantic-conventions';\nimport { ExceptionEventName } from './enums';\n/**\n * This class represents a span.\n */\nexport class SpanImpl {\n // Below properties are included to implement ReadableSpan for export\n // purposes but are not intended to be written-to directly.\n _spanContext;\n kind;\n parentSpanContext;\n attributes = {};\n links = [];\n events = [];\n startTime;\n resource;\n instrumentationScope;\n _droppedAttributesCount = 0;\n _droppedEventsCount = 0;\n _droppedLinksCount = 0;\n name;\n status = {\n code: SpanStatusCode.UNSET,\n };\n endTime = [0, 0];\n _ended = false;\n _duration = [-1, -1];\n _spanProcessor;\n _spanLimits;\n _attributeValueLengthLimit;\n _performanceStartTime;\n _performanceOffset;\n _startTimeProvided;\n /**\n * Constructs a new SpanImpl instance.\n */\n constructor(opts) {\n const now = Date.now();\n this._spanContext = opts.spanContext;\n this._performanceStartTime = otperformance.now();\n this._performanceOffset =\n now - (this._performanceStartTime + getTimeOrigin());\n this._startTimeProvided = opts.startTime != null;\n this._spanLimits = opts.spanLimits;\n this._attributeValueLengthLimit =\n this._spanLimits.attributeValueLengthLimit || 0;\n this._spanProcessor = opts.spanProcessor;\n this.name = opts.name;\n this.parentSpanContext = opts.parentSpanContext;\n this.kind = opts.kind;\n this.links = opts.links || [];\n this.startTime = this._getTime(opts.startTime ?? now);\n this.resource = opts.resource;\n this.instrumentationScope = opts.scope;\n if (opts.attributes != null) {\n this.setAttributes(opts.attributes);\n }\n this._spanProcessor.onStart(this, opts.context);\n }\n spanContext() {\n return this._spanContext;\n }\n setAttribute(key, value) {\n if (value == null || this._isSpanEnded())\n return this;\n if (key.length === 0) {\n diag.warn(`Invalid attribute key: ${key}`);\n return this;\n }\n if (!isAttributeValue(value)) {\n diag.warn(`Invalid attribute value set for key: ${key}`);\n return this;\n }\n const { attributeCountLimit } = this._spanLimits;\n if (attributeCountLimit !== undefined &&\n Object.keys(this.attributes).length >= attributeCountLimit &&\n !Object.prototype.hasOwnProperty.call(this.attributes, key)) {\n this._droppedAttributesCount++;\n return this;\n }\n this.attributes[key] = this._truncateToSize(value);\n return this;\n }\n setAttributes(attributes) {\n for (const [k, v] of Object.entries(attributes)) {\n this.setAttribute(k, v);\n }\n return this;\n }\n /**\n *\n * @param name Span Name\n * @param [attributesOrStartTime] Span attributes or start time\n * if type is {@type TimeInput} and 3rd param is undefined\n * @param [timeStamp] Specified time stamp for the event\n */\n addEvent(name, attributesOrStartTime, timeStamp) {\n if (this._isSpanEnded())\n return this;\n const { eventCountLimit } = this._spanLimits;\n if (eventCountLimit === 0) {\n diag.warn('No events allowed.');\n this._droppedEventsCount++;\n return this;\n }\n if (eventCountLimit !== undefined &&\n this.events.length >= eventCountLimit) {\n if (this._droppedEventsCount === 0) {\n diag.debug('Dropping extra events.');\n }\n this.events.shift();\n this._droppedEventsCount++;\n }\n if (isTimeInput(attributesOrStartTime)) {\n if (!isTimeInput(timeStamp)) {\n timeStamp = attributesOrStartTime;\n }\n attributesOrStartTime = undefined;\n }\n const attributes = sanitizeAttributes(attributesOrStartTime);\n this.events.push({\n name,\n attributes,\n time: this._getTime(timeStamp),\n droppedAttributesCount: 0,\n });\n return this;\n }\n addLink(link) {\n this.links.push(link);\n return this;\n }\n addLinks(links) {\n this.links.push(...links);\n return this;\n }\n setStatus(status) {\n if (this._isSpanEnded())\n return this;\n this.status = { ...status };\n // When using try-catch, the caught \"error\" is of type `any`. When then assigning `any` to `status.message`,\n // TypeScript will not error. While this can happen during use of any API, it is more common on Span#setStatus()\n // as it's likely used in a catch-block. Therefore, we validate if `status.message` is actually a string, null, or\n // undefined to avoid an incorrect type causing issues downstream.\n if (this.status.message != null && typeof status.message !== 'string') {\n diag.warn(`Dropping invalid status.message of type '${typeof status.message}', expected 'string'`);\n delete this.status.message;\n }\n return this;\n }\n updateName(name) {\n if (this._isSpanEnded())\n return this;\n this.name = name;\n return this;\n }\n end(endTime) {\n if (this._isSpanEnded()) {\n diag.error(`${this.name} ${this._spanContext.traceId}-${this._spanContext.spanId} - You can only call end() on a span once.`);\n return;\n }\n this._ended = true;\n this.endTime = this._getTime(endTime);\n this._duration = hrTimeDuration(this.startTime, this.endTime);\n if (this._duration[0] < 0) {\n diag.warn('Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.', this.startTime, this.endTime);\n this.endTime = this.startTime.slice();\n this._duration = [0, 0];\n }\n if (this._droppedEventsCount > 0) {\n diag.warn(`Dropped ${this._droppedEventsCount} events because eventCountLimit reached`);\n }\n this._spanProcessor.onEnd(this);\n }\n _getTime(inp) {\n if (typeof inp === 'number' && inp <= otperformance.now()) {\n // must be a performance timestamp\n // apply correction and convert to hrtime\n return hrTime(inp + this._performanceOffset);\n }\n if (typeof inp === 'number') {\n return millisToHrTime(inp);\n }\n if (inp instanceof Date) {\n return millisToHrTime(inp.getTime());\n }\n if (isTimeInputHrTime(inp)) {\n return inp;\n }\n if (this._startTimeProvided) {\n // if user provided a time for the start manually\n // we can't use duration to calculate event/end times\n return millisToHrTime(Date.now());\n }\n const msDuration = otperformance.now() - this._performanceStartTime;\n return addHrTimes(this.startTime, millisToHrTime(msDuration));\n }\n isRecording() {\n return this._ended === false;\n }\n recordException(exception, time) {\n const attributes = {};\n if (typeof exception === 'string') {\n attributes[ATTR_EXCEPTION_MESSAGE] = exception;\n }\n else if (exception) {\n if (exception.code) {\n attributes[ATTR_EXCEPTION_TYPE] = exception.code.toString();\n }\n else if (exception.name) {\n attributes[ATTR_EXCEPTION_TYPE] = exception.name;\n }\n if (exception.message) {\n attributes[ATTR_EXCEPTION_MESSAGE] = exception.message;\n }\n if (exception.stack) {\n attributes[ATTR_EXCEPTION_STACKTRACE] = exception.stack;\n }\n }\n // these are minimum requirements from spec\n if (attributes[ATTR_EXCEPTION_TYPE] || attributes[ATTR_EXCEPTION_MESSAGE]) {\n this.addEvent(ExceptionEventName, attributes, time);\n }\n else {\n diag.warn(`Failed to record an exception ${exception}`);\n }\n }\n get duration() {\n return this._duration;\n }\n get ended() {\n return this._ended;\n }\n get droppedAttributesCount() {\n return this._droppedAttributesCount;\n }\n get droppedEventsCount() {\n return this._droppedEventsCount;\n }\n get droppedLinksCount() {\n return this._droppedLinksCount;\n }\n _isSpanEnded() {\n if (this._ended) {\n const error = new Error(`Operation attempted on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`);\n diag.warn(`Cannot execute the operation on ended Span {traceId: ${this._spanContext.traceId}, spanId: ${this._spanContext.spanId}}`, error);\n }\n return this._ended;\n }\n // Utility function to truncate given value within size\n // for value type of string, will truncate to given limit\n // for type of non-string, will return same value\n _truncateToLimitUtil(value, limit) {\n if (value.length <= limit) {\n return value;\n }\n return value.substring(0, limit);\n }\n /**\n * If the given attribute value is of type string and has more characters than given {@code attributeValueLengthLimit} then\n * return string with truncated to {@code attributeValueLengthLimit} characters\n *\n * If the given attribute value is array of strings then\n * return new array of strings with each element truncated to {@code attributeValueLengthLimit} characters\n *\n * Otherwise return same Attribute {@code value}\n *\n * @param value Attribute value\n * @returns truncated attribute value if required, otherwise same value\n */\n _truncateToSize(value) {\n const limit = this._attributeValueLengthLimit;\n // Check limit\n if (limit <= 0) {\n // Negative values are invalid, so do not truncate\n diag.warn(`Attribute value limit must be positive, got ${limit}`);\n return value;\n }\n // String\n if (typeof value === 'string') {\n return this._truncateToLimitUtil(value, limit);\n }\n // Array of strings\n if (Array.isArray(value)) {\n return value.map(val => typeof val === 'string' ? this._truncateToLimitUtil(val, limit) : val);\n }\n // Other types, no need to apply value length limit\n return value;\n }\n}\n//# sourceMappingURL=Span.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Event name definitions\nexport const ExceptionEventName = 'exception';\n//# sourceMappingURL=enums.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * A sampling decision that determines how a {@link Span} will be recorded\n * and collected.\n */\nexport var SamplingDecision;\n(function (SamplingDecision) {\n /**\n * `Span.isRecording() === false`, span will not be recorded and all events\n * and attributes will be dropped.\n */\n SamplingDecision[SamplingDecision[\"NOT_RECORD\"] = 0] = \"NOT_RECORD\";\n /**\n * `Span.isRecording() === true`, but `Sampled` flag in {@link TraceFlags}\n * MUST NOT be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD\"] = 1] = \"RECORD\";\n /**\n * `Span.isRecording() === true` AND `Sampled` flag in {@link TraceFlags}\n * MUST be set.\n */\n SamplingDecision[SamplingDecision[\"RECORD_AND_SAMPLED\"] = 2] = \"RECORD_AND_SAMPLED\";\n})(SamplingDecision || (SamplingDecision = {}));\n//# sourceMappingURL=Sampler.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SamplingDecision } from '../Sampler';\n/** Sampler that samples no traces. */\nexport class AlwaysOffSampler {\n shouldSample() {\n return {\n decision: SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return 'AlwaysOffSampler';\n }\n}\n//# sourceMappingURL=AlwaysOffSampler.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { SamplingDecision } from '../Sampler';\n/** Sampler that samples all traces. */\nexport class AlwaysOnSampler {\n shouldSample() {\n return {\n decision: SamplingDecision.RECORD_AND_SAMPLED,\n };\n }\n toString() {\n return 'AlwaysOnSampler';\n }\n}\n//# sourceMappingURL=AlwaysOnSampler.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isSpanContextValid, TraceFlags, trace, } from '@opentelemetry/api';\nimport { globalErrorHandler } from '@opentelemetry/core';\nimport { AlwaysOffSampler } from './AlwaysOffSampler';\nimport { AlwaysOnSampler } from './AlwaysOnSampler';\n/**\n * A composite sampler that either respects the parent span's sampling decision\n * or delegates to `delegateSampler` for root spans.\n */\nexport class ParentBasedSampler {\n _root;\n _remoteParentSampled;\n _remoteParentNotSampled;\n _localParentSampled;\n _localParentNotSampled;\n constructor(config) {\n this._root = config.root;\n if (!this._root) {\n globalErrorHandler(new Error('ParentBasedSampler must have a root sampler configured'));\n this._root = new AlwaysOnSampler();\n }\n this._remoteParentSampled =\n config.remoteParentSampled ?? new AlwaysOnSampler();\n this._remoteParentNotSampled =\n config.remoteParentNotSampled ?? new AlwaysOffSampler();\n this._localParentSampled =\n config.localParentSampled ?? new AlwaysOnSampler();\n this._localParentNotSampled =\n config.localParentNotSampled ?? new AlwaysOffSampler();\n }\n shouldSample(context, traceId, spanName, spanKind, attributes, links) {\n const parentContext = trace.getSpanContext(context);\n if (!parentContext || !isSpanContextValid(parentContext)) {\n return this._root.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.isRemote) {\n if (parentContext.traceFlags & TraceFlags.SAMPLED) {\n return this._remoteParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._remoteParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n if (parentContext.traceFlags & TraceFlags.SAMPLED) {\n return this._localParentSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n return this._localParentNotSampled.shouldSample(context, traceId, spanName, spanKind, attributes, links);\n }\n toString() {\n return `ParentBased{root=${this._root.toString()}, remoteParentSampled=${this._remoteParentSampled.toString()}, remoteParentNotSampled=${this._remoteParentNotSampled.toString()}, localParentSampled=${this._localParentSampled.toString()}, localParentNotSampled=${this._localParentNotSampled.toString()}}`;\n }\n}\n//# sourceMappingURL=ParentBasedSampler.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { isValidTraceId } from '@opentelemetry/api';\nimport { SamplingDecision } from '../Sampler';\n/** Sampler that samples a given fraction of traces based of trace id deterministically. */\nexport class TraceIdRatioBasedSampler {\n _ratio;\n _upperBound;\n constructor(_ratio = 0) {\n this._ratio = _ratio;\n this._ratio = this._normalize(_ratio);\n this._upperBound = Math.floor(this._ratio * 0xffffffff);\n }\n shouldSample(context, traceId) {\n return {\n decision: isValidTraceId(traceId) && this._accumulate(traceId) < this._upperBound\n ? SamplingDecision.RECORD_AND_SAMPLED\n : SamplingDecision.NOT_RECORD,\n };\n }\n toString() {\n return `TraceIdRatioBased{${this._ratio}}`;\n }\n _normalize(ratio) {\n if (typeof ratio !== 'number' || isNaN(ratio))\n return 0;\n return ratio >= 1 ? 1 : ratio <= 0 ? 0 : ratio;\n }\n _accumulate(traceId) {\n let accumulation = 0;\n for (let i = 0; i < traceId.length / 8; i++) {\n const pos = i * 8;\n const part = parseInt(traceId.slice(pos, pos + 8), 16);\n accumulation = (accumulation ^ part) >>> 0;\n }\n return accumulation;\n }\n}\n//# sourceMappingURL=TraceIdRatioBasedSampler.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { diag } from '@opentelemetry/api';\nimport { getNumberFromEnv, getStringFromEnv } from '@opentelemetry/core';\nimport { AlwaysOffSampler } from './sampler/AlwaysOffSampler';\nimport { AlwaysOnSampler } from './sampler/AlwaysOnSampler';\nimport { ParentBasedSampler } from './sampler/ParentBasedSampler';\nimport { TraceIdRatioBasedSampler } from './sampler/TraceIdRatioBasedSampler';\nconst DEFAULT_RATIO = 1;\n/**\n * Load default configuration. For fields with primitive values, any user-provided\n * value will override the corresponding default value. For fields with\n * non-primitive values (like `spanLimits`), the user-provided value will be\n * used to extend the default value.\n */\n// object needs to be wrapped in this function and called when needed otherwise\n// envs are parsed before tests are ran - causes tests using these envs to fail\nexport function loadDefaultConfig() {\n return {\n sampler: buildSamplerFromEnv(),\n forceFlushTimeoutMillis: 30000,\n generalLimits: {\n attributeValueLengthLimit: getNumberFromEnv('OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT') ?? Infinity,\n attributeCountLimit: getNumberFromEnv('OTEL_ATTRIBUTE_COUNT_LIMIT') ?? 128,\n },\n spanLimits: {\n attributeValueLengthLimit: getNumberFromEnv('OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT') ?? Infinity,\n attributeCountLimit: getNumberFromEnv('OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT') ?? 128,\n linkCountLimit: getNumberFromEnv('OTEL_SPAN_LINK_COUNT_LIMIT') ?? 128,\n eventCountLimit: getNumberFromEnv('OTEL_SPAN_EVENT_COUNT_LIMIT') ?? 128,\n attributePerEventCountLimit: getNumberFromEnv('OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT') ?? 128,\n attributePerLinkCountLimit: getNumberFromEnv('OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT') ?? 128,\n },\n };\n}\n/**\n * Based on environment, builds a sampler, complies with specification.\n */\nexport function buildSamplerFromEnv() {\n const sampler = getStringFromEnv('OTEL_TRACES_SAMPLER') ??\n \"parentbased_always_on\" /* TracesSamplerValues.ParentBasedAlwaysOn */;\n switch (sampler) {\n case \"always_on\" /* TracesSamplerValues.AlwaysOn */:\n return new AlwaysOnSampler();\n case \"always_off\" /* TracesSamplerValues.AlwaysOff */:\n return new AlwaysOffSampler();\n case \"parentbased_always_on\" /* TracesSamplerValues.ParentBasedAlwaysOn */:\n return new ParentBasedSampler({\n root: new AlwaysOnSampler(),\n });\n case \"parentbased_always_off\" /* TracesSamplerValues.ParentBasedAlwaysOff */:\n return new ParentBasedSampler({\n root: new AlwaysOffSampler(),\n });\n case \"traceidratio\" /* TracesSamplerValues.TraceIdRatio */:\n return new TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv());\n case \"parentbased_traceidratio\" /* TracesSamplerValues.ParentBasedTraceIdRatio */:\n return new ParentBasedSampler({\n root: new TraceIdRatioBasedSampler(getSamplerProbabilityFromEnv()),\n });\n default:\n diag.error(`OTEL_TRACES_SAMPLER value \"${sampler}\" invalid, defaulting to \"${\"parentbased_always_on\" /* TracesSamplerValues.ParentBasedAlwaysOn */}\".`);\n return new ParentBasedSampler({\n root: new AlwaysOnSampler(),\n });\n }\n}\nfunction getSamplerProbabilityFromEnv() {\n const probability = getNumberFromEnv('OTEL_TRACES_SAMPLER_ARG');\n if (probability == null) {\n diag.error(`OTEL_TRACES_SAMPLER_ARG is blank, defaulting to ${DEFAULT_RATIO}.`);\n return DEFAULT_RATIO;\n }\n if (probability < 0 || probability > 1) {\n diag.error(`OTEL_TRACES_SAMPLER_ARG=${probability} was given, but it is out of range ([0..1]), defaulting to ${DEFAULT_RATIO}.`);\n return DEFAULT_RATIO;\n }\n return probability;\n}\n//# sourceMappingURL=config.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { buildSamplerFromEnv, loadDefaultConfig } from './config';\nimport { getNumberFromEnv } from '@opentelemetry/core';\nexport const DEFAULT_ATTRIBUTE_COUNT_LIMIT = 128;\nexport const DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT = Infinity;\n/**\n * Function to merge Default configuration (as specified in './config') with\n * user provided configurations.\n */\nexport function mergeConfig(userConfig) {\n const perInstanceDefaults = {\n sampler: buildSamplerFromEnv(),\n };\n const DEFAULT_CONFIG = loadDefaultConfig();\n const target = Object.assign({}, DEFAULT_CONFIG, perInstanceDefaults, userConfig);\n target.generalLimits = Object.assign({}, DEFAULT_CONFIG.generalLimits, userConfig.generalLimits || {});\n target.spanLimits = Object.assign({}, DEFAULT_CONFIG.spanLimits, userConfig.spanLimits || {});\n return target;\n}\n/**\n * When general limits are provided and model specific limits are not,\n * configures the model specific limits by using the values from the general ones.\n * @param userConfig User provided tracer configuration\n */\nexport function reconfigureLimits(userConfig) {\n const spanLimits = Object.assign({}, userConfig.spanLimits);\n /**\n * Reassign span attribute count limit to use first non null value defined by user or use default value\n */\n spanLimits.attributeCountLimit =\n userConfig.spanLimits?.attributeCountLimit ??\n userConfig.generalLimits?.attributeCountLimit ??\n getNumberFromEnv('OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT') ??\n getNumberFromEnv('OTEL_ATTRIBUTE_COUNT_LIMIT') ??\n DEFAULT_ATTRIBUTE_COUNT_LIMIT;\n /**\n * Reassign span attribute value length limit to use first non null value defined by user or use default value\n */\n spanLimits.attributeValueLengthLimit =\n userConfig.spanLimits?.attributeValueLengthLimit ??\n userConfig.generalLimits?.attributeValueLengthLimit ??\n getNumberFromEnv('OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT') ??\n getNumberFromEnv('OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT') ??\n DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT;\n return Object.assign({}, userConfig, { spanLimits });\n}\n//# sourceMappingURL=utility.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { context, diag, TraceFlags } from '@opentelemetry/api';\nimport { BindOnceFuture, ExportResultCode, getNumberFromEnv, globalErrorHandler, suppressTracing, unrefTimer, } from '@opentelemetry/core';\n/**\n * Implementation of the {@link SpanProcessor} that batches spans exported by\n * the SDK then pushes them to the exporter pipeline.\n */\nexport class BatchSpanProcessorBase {\n _exporter;\n _maxExportBatchSize;\n _maxQueueSize;\n _scheduledDelayMillis;\n _exportTimeoutMillis;\n _isExporting = false;\n _finishedSpans = [];\n _timer;\n _shutdownOnce;\n _droppedSpansCount = 0;\n constructor(_exporter, config) {\n this._exporter = _exporter;\n this._maxExportBatchSize =\n typeof config?.maxExportBatchSize === 'number'\n ? config.maxExportBatchSize\n : (getNumberFromEnv('OTEL_BSP_MAX_EXPORT_BATCH_SIZE') ?? 512);\n this._maxQueueSize =\n typeof config?.maxQueueSize === 'number'\n ? config.maxQueueSize\n : (getNumberFromEnv('OTEL_BSP_MAX_QUEUE_SIZE') ?? 2048);\n this._scheduledDelayMillis =\n typeof config?.scheduledDelayMillis === 'number'\n ? config.scheduledDelayMillis\n : (getNumberFromEnv('OTEL_BSP_SCHEDULE_DELAY') ?? 5000);\n this._exportTimeoutMillis =\n typeof config?.exportTimeoutMillis === 'number'\n ? config.exportTimeoutMillis\n : (getNumberFromEnv('OTEL_BSP_EXPORT_TIMEOUT') ?? 30000);\n this._shutdownOnce = new BindOnceFuture(this._shutdown, this);\n if (this._maxExportBatchSize > this._maxQueueSize) {\n diag.warn('BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize');\n this._maxExportBatchSize = this._maxQueueSize;\n }\n }\n forceFlush() {\n if (this._shutdownOnce.isCalled) {\n return this._shutdownOnce.promise;\n }\n return this._flushAll();\n }\n // does nothing.\n onStart(_span, _parentContext) { }\n onEnd(span) {\n if (this._shutdownOnce.isCalled) {\n return;\n }\n if ((span.spanContext().traceFlags & TraceFlags.SAMPLED) === 0) {\n return;\n }\n this._addToBuffer(span);\n }\n shutdown() {\n return this._shutdownOnce.call();\n }\n _shutdown() {\n return Promise.resolve()\n .then(() => {\n return this.onShutdown();\n })\n .then(() => {\n return this._flushAll();\n })\n .then(() => {\n return this._exporter.shutdown();\n });\n }\n /** Add a span in the buffer. */\n _addToBuffer(span) {\n if (this._finishedSpans.length >= this._maxQueueSize) {\n // limit reached, drop span\n if (this._droppedSpansCount === 0) {\n diag.debug('maxQueueSize reached, dropping spans');\n }\n this._droppedSpansCount++;\n return;\n }\n if (this._droppedSpansCount > 0) {\n // some spans were dropped, log once with count of spans dropped\n diag.warn(`Dropped ${this._droppedSpansCount} spans because maxQueueSize reached`);\n this._droppedSpansCount = 0;\n }\n this._finishedSpans.push(span);\n this._maybeStartTimer();\n }\n /**\n * Send all spans to the exporter respecting the batch size limit\n * This function is used only on forceFlush or shutdown,\n * for all other cases _flush should be used\n * */\n _flushAll() {\n return new Promise((resolve, reject) => {\n const promises = [];\n // calculate number of batches\n const count = Math.ceil(this._finishedSpans.length / this._maxExportBatchSize);\n for (let i = 0, j = count; i < j; i++) {\n promises.push(this._flushOneBatch());\n }\n Promise.all(promises)\n .then(() => {\n resolve();\n })\n .catch(reject);\n });\n }\n _flushOneBatch() {\n this._clearTimer();\n if (this._finishedSpans.length === 0) {\n return Promise.resolve();\n }\n return new Promise((resolve, reject) => {\n const timer = setTimeout(() => {\n // don't wait anymore for export, this way the next batch can start\n reject(new Error('Timeout'));\n }, this._exportTimeoutMillis);\n // prevent downstream exporter calls from generating spans\n context.with(suppressTracing(context.active()), () => {\n // Reset the finished spans buffer here because the next invocations of the _flush method\n // could pass the same finished spans to the exporter if the buffer is cleared\n // outside the execution of this callback.\n let spans;\n if (this._finishedSpans.length <= this._maxExportBatchSize) {\n spans = this._finishedSpans;\n this._finishedSpans = [];\n }\n else {\n spans = this._finishedSpans.splice(0, this._maxExportBatchSize);\n }\n const doExport = () => this._exporter.export(spans, result => {\n clearTimeout(timer);\n if (result.code === ExportResultCode.SUCCESS) {\n resolve();\n }\n else {\n reject(result.error ??\n new Error('BatchSpanProcessor: span export failed'));\n }\n });\n let pendingResources = null;\n for (let i = 0, len = spans.length; i < len; i++) {\n const span = spans[i];\n if (span.resource.asyncAttributesPending &&\n span.resource.waitForAsyncAttributes) {\n pendingResources ??= [];\n pendingResources.push(span.resource.waitForAsyncAttributes());\n }\n }\n // Avoid scheduling a promise to make the behavior more predictable and easier to test\n if (pendingResources === null) {\n doExport();\n }\n else {\n Promise.all(pendingResources).then(doExport, err => {\n globalErrorHandler(err);\n reject(err);\n });\n }\n });\n });\n }\n _maybeStartTimer() {\n if (this._isExporting)\n return;\n const flush = () => {\n this._isExporting = true;\n this._flushOneBatch()\n .finally(() => {\n this._isExporting = false;\n if (this._finishedSpans.length > 0) {\n this._clearTimer();\n this._maybeStartTimer();\n }\n })\n .catch(e => {\n this._isExporting = false;\n globalErrorHandler(e);\n });\n };\n // we only wait if the queue doesn't have enough elements yet\n if (this._finishedSpans.length >= this._maxExportBatchSize) {\n return flush();\n }\n if (this._timer !== undefined)\n return;\n this._timer = setTimeout(() => flush(), this._scheduledDelayMillis);\n unrefTimer(this._timer);\n }\n _clearTimer() {\n if (this._timer !== undefined) {\n clearTimeout(this._timer);\n this._timer = undefined;\n }\n }\n}\n//# sourceMappingURL=BatchSpanProcessorBase.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport function unrefTimer(timer) {\n timer.unref();\n}\n//# sourceMappingURL=timer-util.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { BatchSpanProcessorBase } from '../../../export/BatchSpanProcessorBase';\nexport class BatchSpanProcessor extends BatchSpanProcessorBase {\n onShutdown() { }\n}\n//# sourceMappingURL=BatchSpanProcessor.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst SPAN_ID_BYTES = 8;\nconst TRACE_ID_BYTES = 16;\nexport class RandomIdGenerator {\n /**\n * Returns a random 16-byte trace ID formatted/encoded as a 32 lowercase hex\n * characters corresponding to 128 bits.\n */\n generateTraceId = getIdGenerator(TRACE_ID_BYTES);\n /**\n * Returns a random 8-byte span ID formatted/encoded as a 16 lowercase hex\n * characters corresponding to 64 bits.\n */\n generateSpanId = getIdGenerator(SPAN_ID_BYTES);\n}\nconst SHARED_BUFFER = Buffer.allocUnsafe(TRACE_ID_BYTES);\nfunction getIdGenerator(bytes) {\n return function generateId() {\n for (let i = 0; i < bytes / 4; i++) {\n // unsigned right shift drops decimal part of the number\n // it is required because if a number between 2**32 and 2**32 - 1 is generated, an out of range error is thrown by writeUInt32BE\n SHARED_BUFFER.writeUInt32BE((Math.random() * 2 ** 32) >>> 0, i * 4);\n }\n // If buffer is all 0, set the last byte to 1 to guarantee a valid w3c id is generated\n for (let i = 0; i < bytes; i++) {\n if (SHARED_BUFFER[i] > 0) {\n break;\n }\n else if (i === bytes - 1) {\n SHARED_BUFFER[bytes - 1] = 1;\n }\n }\n return SHARED_BUFFER.toString('hex', 0, bytes);\n };\n}\n//# sourceMappingURL=RandomIdGenerator.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as api from '@opentelemetry/api';\nimport { sanitizeAttributes, isTracingSuppressed, } from '@opentelemetry/core';\nimport { SpanImpl } from './Span';\nimport { mergeConfig } from './utility';\nimport { RandomIdGenerator } from './platform';\n/**\n * This class represents a basic tracer.\n */\nexport class Tracer {\n _sampler;\n _generalLimits;\n _spanLimits;\n _idGenerator;\n instrumentationScope;\n _resource;\n _spanProcessor;\n /**\n * Constructs a new Tracer instance.\n */\n constructor(instrumentationScope, config, resource, spanProcessor) {\n const localConfig = mergeConfig(config);\n this._sampler = localConfig.sampler;\n this._generalLimits = localConfig.generalLimits;\n this._spanLimits = localConfig.spanLimits;\n this._idGenerator = config.idGenerator || new RandomIdGenerator();\n this._resource = resource;\n this._spanProcessor = spanProcessor;\n this.instrumentationScope = instrumentationScope;\n }\n /**\n * Starts a new Span or returns the default NoopSpan based on the sampling\n * decision.\n */\n startSpan(name, options = {}, context = api.context.active()) {\n // remove span from context in case a root span is requested via options\n if (options.root) {\n context = api.trace.deleteSpan(context);\n }\n const parentSpan = api.trace.getSpan(context);\n if (isTracingSuppressed(context)) {\n api.diag.debug('Instrumentation suppressed, returning Noop Span');\n const nonRecordingSpan = api.trace.wrapSpanContext(api.INVALID_SPAN_CONTEXT);\n return nonRecordingSpan;\n }\n const parentSpanContext = parentSpan?.spanContext();\n const spanId = this._idGenerator.generateSpanId();\n let validParentSpanContext;\n let traceId;\n let traceState;\n if (!parentSpanContext ||\n !api.trace.isSpanContextValid(parentSpanContext)) {\n // New root span.\n traceId = this._idGenerator.generateTraceId();\n }\n else {\n // New child span.\n traceId = parentSpanContext.traceId;\n traceState = parentSpanContext.traceState;\n validParentSpanContext = parentSpanContext;\n }\n const spanKind = options.kind ?? api.SpanKind.INTERNAL;\n const links = (options.links ?? []).map(link => {\n return {\n context: link.context,\n attributes: sanitizeAttributes(link.attributes),\n };\n });\n const attributes = sanitizeAttributes(options.attributes);\n // make sampling decision\n const samplingResult = this._sampler.shouldSample(context, traceId, name, spanKind, attributes, links);\n traceState = samplingResult.traceState ?? traceState;\n const traceFlags = samplingResult.decision === api.SamplingDecision.RECORD_AND_SAMPLED\n ? api.TraceFlags.SAMPLED\n : api.TraceFlags.NONE;\n const spanContext = { traceId, spanId, traceFlags, traceState };\n if (samplingResult.decision === api.SamplingDecision.NOT_RECORD) {\n api.diag.debug('Recording is off, propagating context in a non-recording span');\n const nonRecordingSpan = api.trace.wrapSpanContext(spanContext);\n return nonRecordingSpan;\n }\n // Set initial span attributes. The attributes object may have been mutated\n // by the sampler, so we sanitize the merged attributes before setting them.\n const initAttributes = sanitizeAttributes(Object.assign(attributes, samplingResult.attributes));\n const span = new SpanImpl({\n resource: this._resource,\n scope: this.instrumentationScope,\n context,\n spanContext,\n name,\n kind: spanKind,\n links,\n parentSpanContext: validParentSpanContext,\n attributes: initAttributes,\n startTime: options.startTime,\n spanProcessor: this._spanProcessor,\n spanLimits: this._spanLimits,\n });\n return span;\n }\n startActiveSpan(name, arg2, arg3, arg4) {\n let opts;\n let ctx;\n let fn;\n if (arguments.length < 2) {\n return;\n }\n else if (arguments.length === 2) {\n fn = arg2;\n }\n else if (arguments.length === 3) {\n opts = arg2;\n fn = arg3;\n }\n else {\n opts = arg2;\n ctx = arg3;\n fn = arg4;\n }\n const parentContext = ctx ?? api.context.active();\n const span = this.startSpan(name, opts, parentContext);\n const contextWithSpanSet = api.trace.setSpan(parentContext, span);\n return api.context.with(contextWithSpanSet, fn, undefined, span);\n }\n /** Returns the active {@link GeneralLimits}. */\n getGeneralLimits() {\n return this._generalLimits;\n }\n /** Returns the active {@link SpanLimits}. */\n getSpanLimits() {\n return this._spanLimits;\n }\n}\n//# sourceMappingURL=Tracer.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { globalErrorHandler } from '@opentelemetry/core';\n/**\n * Implementation of the {@link SpanProcessor} that simply forwards all\n * received events to a list of {@link SpanProcessor}s.\n */\nexport class MultiSpanProcessor {\n _spanProcessors;\n constructor(_spanProcessors) {\n this._spanProcessors = _spanProcessors;\n }\n forceFlush() {\n const promises = [];\n for (const spanProcessor of this._spanProcessors) {\n promises.push(spanProcessor.forceFlush());\n }\n return new Promise(resolve => {\n Promise.all(promises)\n .then(() => {\n resolve();\n })\n .catch(error => {\n globalErrorHandler(error || new Error('MultiSpanProcessor: forceFlush failed'));\n resolve();\n });\n });\n }\n onStart(span, context) {\n for (const spanProcessor of this._spanProcessors) {\n spanProcessor.onStart(span, context);\n }\n }\n onEnd(span) {\n for (const spanProcessor of this._spanProcessors) {\n spanProcessor.onEnd(span);\n }\n }\n shutdown() {\n const promises = [];\n for (const spanProcessor of this._spanProcessors) {\n promises.push(spanProcessor.shutdown());\n }\n return new Promise((resolve, reject) => {\n Promise.all(promises).then(() => {\n resolve();\n }, reject);\n });\n }\n}\n//# sourceMappingURL=MultiSpanProcessor.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { merge } from '@opentelemetry/core';\nimport { defaultResource } from '@opentelemetry/resources';\nimport { Tracer } from './Tracer';\nimport { loadDefaultConfig } from './config';\nimport { MultiSpanProcessor } from './MultiSpanProcessor';\nimport { reconfigureLimits } from './utility';\nexport var ForceFlushState;\n(function (ForceFlushState) {\n ForceFlushState[ForceFlushState[\"resolved\"] = 0] = \"resolved\";\n ForceFlushState[ForceFlushState[\"timeout\"] = 1] = \"timeout\";\n ForceFlushState[ForceFlushState[\"error\"] = 2] = \"error\";\n ForceFlushState[ForceFlushState[\"unresolved\"] = 3] = \"unresolved\";\n})(ForceFlushState || (ForceFlushState = {}));\n/**\n * This class represents a basic tracer provider which platform libraries can extend\n */\nexport class BasicTracerProvider {\n _config;\n _tracers = new Map();\n _resource;\n _activeSpanProcessor;\n constructor(config = {}) {\n const mergedConfig = merge({}, loadDefaultConfig(), reconfigureLimits(config));\n this._resource = mergedConfig.resource ?? defaultResource();\n this._config = Object.assign({}, mergedConfig, {\n resource: this._resource,\n });\n const spanProcessors = [];\n if (config.spanProcessors?.length) {\n spanProcessors.push(...config.spanProcessors);\n }\n this._activeSpanProcessor = new MultiSpanProcessor(spanProcessors);\n }\n getTracer(name, version, options) {\n const key = `${name}@${version || ''}:${options?.schemaUrl || ''}`;\n if (!this._tracers.has(key)) {\n this._tracers.set(key, new Tracer({ name, version, schemaUrl: options?.schemaUrl }, this._config, this._resource, this._activeSpanProcessor));\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return this._tracers.get(key);\n }\n forceFlush() {\n const timeout = this._config.forceFlushTimeoutMillis;\n const promises = this._activeSpanProcessor['_spanProcessors'].map((spanProcessor) => {\n return new Promise(resolve => {\n let state;\n const timeoutInterval = setTimeout(() => {\n resolve(new Error(`Span processor did not completed within timeout period of ${timeout} ms`));\n state = ForceFlushState.timeout;\n }, timeout);\n spanProcessor\n .forceFlush()\n .then(() => {\n clearTimeout(timeoutInterval);\n if (state !== ForceFlushState.timeout) {\n state = ForceFlushState.resolved;\n resolve(state);\n }\n })\n .catch(error => {\n clearTimeout(timeoutInterval);\n state = ForceFlushState.error;\n resolve(error);\n });\n });\n });\n return new Promise((resolve, reject) => {\n Promise.all(promises)\n .then(results => {\n const errors = results.filter(result => result !== ForceFlushState.resolved);\n if (errors.length > 0) {\n reject(errors);\n }\n else {\n resolve();\n }\n })\n .catch(error => reject([error]));\n });\n }\n shutdown() {\n return this._activeSpanProcessor.shutdown();\n }\n}\n//# sourceMappingURL=BasicTracerProvider.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var PerformanceTimingNames;\n(function (PerformanceTimingNames) {\n PerformanceTimingNames[\"CONNECT_END\"] = \"connectEnd\";\n PerformanceTimingNames[\"CONNECT_START\"] = \"connectStart\";\n PerformanceTimingNames[\"DECODED_BODY_SIZE\"] = \"decodedBodySize\";\n PerformanceTimingNames[\"DOM_COMPLETE\"] = \"domComplete\";\n PerformanceTimingNames[\"DOM_CONTENT_LOADED_EVENT_END\"] = \"domContentLoadedEventEnd\";\n PerformanceTimingNames[\"DOM_CONTENT_LOADED_EVENT_START\"] = \"domContentLoadedEventStart\";\n PerformanceTimingNames[\"DOM_INTERACTIVE\"] = \"domInteractive\";\n PerformanceTimingNames[\"DOMAIN_LOOKUP_END\"] = \"domainLookupEnd\";\n PerformanceTimingNames[\"DOMAIN_LOOKUP_START\"] = \"domainLookupStart\";\n PerformanceTimingNames[\"ENCODED_BODY_SIZE\"] = \"encodedBodySize\";\n PerformanceTimingNames[\"FETCH_START\"] = \"fetchStart\";\n PerformanceTimingNames[\"LOAD_EVENT_END\"] = \"loadEventEnd\";\n PerformanceTimingNames[\"LOAD_EVENT_START\"] = \"loadEventStart\";\n PerformanceTimingNames[\"NAVIGATION_START\"] = \"navigationStart\";\n PerformanceTimingNames[\"REDIRECT_END\"] = \"redirectEnd\";\n PerformanceTimingNames[\"REDIRECT_START\"] = \"redirectStart\";\n PerformanceTimingNames[\"REQUEST_START\"] = \"requestStart\";\n PerformanceTimingNames[\"RESPONSE_END\"] = \"responseEnd\";\n PerformanceTimingNames[\"RESPONSE_START\"] = \"responseStart\";\n PerformanceTimingNames[\"SECURE_CONNECTION_START\"] = \"secureConnectionStart\";\n PerformanceTimingNames[\"START_TIME\"] = \"startTime\";\n PerformanceTimingNames[\"UNLOAD_EVENT_END\"] = \"unloadEventEnd\";\n PerformanceTimingNames[\"UNLOAD_EVENT_START\"] = \"unloadEventStart\";\n})(PerformanceTimingNames || (PerformanceTimingNames = {}));\n//# sourceMappingURL=PerformanceTimingNames.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport function defaultServiceName() {\n return `unknown_service:${process.argv0}`;\n}\n//# sourceMappingURL=default-service-name.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ROOT_CONTEXT } from '@opentelemetry/api';\n/**\n * Stack Context Manager for managing the state in web\n * it doesn't fully support the async calls though\n */\nexport class StackContextManager {\n /**\n * whether the context manager is enabled or not\n */\n _enabled = false;\n /**\n * Keeps the reference to current context\n */\n _currentContext = ROOT_CONTEXT;\n /**\n *\n * @param context\n * @param target Function to be executed within the context\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n _bindFunction(context = ROOT_CONTEXT, target) {\n const manager = this;\n const contextWrapper = function (...args) {\n return manager.with(context, () => target.apply(this, args));\n };\n Object.defineProperty(contextWrapper, 'length', {\n enumerable: false,\n configurable: true,\n writable: false,\n value: target.length,\n });\n return contextWrapper;\n }\n /**\n * Returns the active context\n */\n active() {\n return this._currentContext;\n }\n /**\n * Binds a the certain context or the active one to the target function and then returns the target\n * @param context A context (span) to be bind to target\n * @param target a function or event emitter. When target or one of its callbacks is called,\n * the provided context will be used as the active context for the duration of the call.\n */\n bind(context, target) {\n // if no specific context to propagate is given, we use the current one\n if (context === undefined) {\n context = this.active();\n }\n if (typeof target === 'function') {\n return this._bindFunction(context, target);\n }\n return target;\n }\n /**\n * Disable the context manager (clears the current context)\n */\n disable() {\n this._currentContext = ROOT_CONTEXT;\n this._enabled = false;\n return this;\n }\n /**\n * Enables the context manager and creates a default(root) context\n */\n enable() {\n if (this._enabled) {\n return this;\n }\n this._enabled = true;\n this._currentContext = ROOT_CONTEXT;\n return this;\n }\n /**\n * Calls the callback function [fn] with the provided [context]. If [context] is undefined then it will use the window.\n * The context will be set as active\n * @param context\n * @param fn Callback function\n * @param thisArg optional receiver to be used for calling fn\n * @param args optional arguments forwarded to fn\n */\n with(context, fn, thisArg, ...args) {\n const previousContext = this._currentContext;\n this._currentContext = context || ROOT_CONTEXT;\n try {\n return fn.call(thisArg, ...args);\n }\n finally {\n this._currentContext = previousContext;\n }\n }\n}\n//# sourceMappingURL=StackContextManager.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { BasicTracerProvider, } from '@opentelemetry/sdk-trace-base';\nimport { StackContextManager } from './StackContextManager';\nimport { trace, context, propagation, } from '@opentelemetry/api';\nimport { CompositePropagator, W3CBaggagePropagator, W3CTraceContextPropagator, } from '@opentelemetry/core';\nfunction setupContextManager(contextManager) {\n // null means 'do not register'\n if (contextManager === null) {\n return;\n }\n // undefined means 'register default'\n if (contextManager === undefined) {\n const defaultContextManager = new StackContextManager();\n defaultContextManager.enable();\n context.setGlobalContextManager(defaultContextManager);\n return;\n }\n contextManager.enable();\n context.setGlobalContextManager(contextManager);\n}\nfunction setupPropagator(propagator) {\n // null means 'do not register'\n if (propagator === null) {\n return;\n }\n // undefined means 'register default'\n if (propagator === undefined) {\n propagation.setGlobalPropagator(new CompositePropagator({\n propagators: [\n new W3CTraceContextPropagator(),\n new W3CBaggagePropagator(),\n ],\n }));\n return;\n }\n propagation.setGlobalPropagator(propagator);\n}\n/**\n * This class represents a web tracer with {@link StackContextManager}\n */\nexport class WebTracerProvider extends BasicTracerProvider {\n /**\n * Constructs a new Tracer instance.\n * @param config Web Tracer config\n */\n constructor(config = {}) {\n super(config);\n }\n /**\n * Register this TracerProvider for use with the OpenTelemetry API.\n * Undefined values may be replaced with defaults, and\n * null values will be skipped.\n *\n * @param config Configuration object for SDK registration\n */\n register(config = {}) {\n trace.setGlobalTracerProvider(this);\n setupPropagator(config.propagator);\n setupContextManager(config.contextManager);\n }\n}\n//# sourceMappingURL=WebTracerProvider.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PerformanceTimingNames as PTN } from './enums/PerformanceTimingNames';\nimport { hrTimeToNanoseconds, timeInputToHrTime, urlMatches, } from '@opentelemetry/core';\nimport { ATTR_HTTP_RESPONSE_CONTENT_LENGTH, ATTR_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED, } from './semconv';\n// Used to normalize relative URLs\nlet urlNormalizingAnchor;\nfunction getUrlNormalizingAnchor() {\n if (!urlNormalizingAnchor) {\n urlNormalizingAnchor = document.createElement('a');\n }\n return urlNormalizingAnchor;\n}\n/**\n * Helper function to be able to use enum as typed key in type and in interface when using forEach\n * @param obj\n * @param key\n */\nexport function hasKey(obj, key) {\n return key in obj;\n}\n/**\n * Helper function for starting an event on span based on {@link PerformanceEntries}\n * @param span\n * @param performanceName name of performance entry for time start\n * @param entries\n * @param ignoreZeros\n */\nexport function addSpanNetworkEvent(span, performanceName, entries, ignoreZeros = true) {\n if (hasKey(entries, performanceName) &&\n typeof entries[performanceName] === 'number' &&\n !(ignoreZeros && entries[performanceName] === 0)) {\n return span.addEvent(performanceName, entries[performanceName]);\n }\n return undefined;\n}\n/**\n * Helper function for adding network events and content length attributes.\n */\nexport function addSpanNetworkEvents(span, resource, ignoreNetworkEvents = false, ignoreZeros, skipOldSemconvContentLengthAttrs) {\n if (ignoreZeros === undefined) {\n ignoreZeros = resource[PTN.START_TIME] !== 0;\n }\n if (!ignoreNetworkEvents) {\n addSpanNetworkEvent(span, PTN.FETCH_START, resource, ignoreZeros);\n addSpanNetworkEvent(span, PTN.DOMAIN_LOOKUP_START, resource, ignoreZeros);\n addSpanNetworkEvent(span, PTN.DOMAIN_LOOKUP_END, resource, ignoreZeros);\n addSpanNetworkEvent(span, PTN.CONNECT_START, resource, ignoreZeros);\n addSpanNetworkEvent(span, PTN.SECURE_CONNECTION_START, resource, ignoreZeros);\n addSpanNetworkEvent(span, PTN.CONNECT_END, resource, ignoreZeros);\n addSpanNetworkEvent(span, PTN.REQUEST_START, resource, ignoreZeros);\n addSpanNetworkEvent(span, PTN.RESPONSE_START, resource, ignoreZeros);\n addSpanNetworkEvent(span, PTN.RESPONSE_END, resource, ignoreZeros);\n }\n if (!skipOldSemconvContentLengthAttrs) {\n // This block adds content-length-related span attributes using the\n // *old* HTTP semconv (v1.7.0).\n const encodedLength = resource[PTN.ENCODED_BODY_SIZE];\n if (encodedLength !== undefined) {\n span.setAttribute(ATTR_HTTP_RESPONSE_CONTENT_LENGTH, encodedLength);\n }\n const decodedLength = resource[PTN.DECODED_BODY_SIZE];\n // Spec: Not set if transport encoding not used (in which case encoded and decoded sizes match)\n if (decodedLength !== undefined && encodedLength !== decodedLength) {\n span.setAttribute(ATTR_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED, decodedLength);\n }\n }\n}\n/**\n * sort resources by startTime\n * @param filteredResources\n */\nexport function sortResources(filteredResources) {\n return filteredResources.slice().sort((a, b) => {\n const valueA = a[PTN.FETCH_START];\n const valueB = b[PTN.FETCH_START];\n if (valueA > valueB) {\n return 1;\n }\n else if (valueA < valueB) {\n return -1;\n }\n return 0;\n });\n}\n/** Returns the origin if present (if in browser context). */\nfunction getOrigin() {\n return typeof location !== 'undefined' ? location.origin : undefined;\n}\n/**\n * Get closest performance resource ignoring the resources that have been\n * already used.\n * @param spanUrl\n * @param startTimeHR\n * @param endTimeHR\n * @param resources\n * @param ignoredResources\n * @param initiatorType\n */\nexport function getResource(spanUrl, startTimeHR, endTimeHR, resources, ignoredResources = new WeakSet(), initiatorType) {\n // de-relativize the URL before usage (does no harm to absolute URLs)\n const parsedSpanUrl = parseUrl(spanUrl);\n spanUrl = parsedSpanUrl.toString();\n const filteredResources = filterResourcesForSpan(spanUrl, startTimeHR, endTimeHR, resources, ignoredResources, initiatorType);\n if (filteredResources.length === 0) {\n return {\n mainRequest: undefined,\n };\n }\n if (filteredResources.length === 1) {\n return {\n mainRequest: filteredResources[0],\n };\n }\n const sorted = sortResources(filteredResources);\n if (parsedSpanUrl.origin !== getOrigin() && sorted.length > 1) {\n let corsPreFlightRequest = sorted[0];\n let mainRequest = findMainRequest(sorted, corsPreFlightRequest[PTN.RESPONSE_END], endTimeHR);\n const responseEnd = corsPreFlightRequest[PTN.RESPONSE_END];\n const fetchStart = mainRequest[PTN.FETCH_START];\n // no corsPreFlightRequest\n if (fetchStart < responseEnd) {\n mainRequest = corsPreFlightRequest;\n corsPreFlightRequest = undefined;\n }\n return {\n corsPreFlightRequest,\n mainRequest,\n };\n }\n else {\n return {\n mainRequest: filteredResources[0],\n };\n }\n}\n/**\n * Will find the main request skipping the cors pre flight requests\n * @param resources\n * @param corsPreFlightRequestEndTime\n * @param spanEndTimeHR\n */\nfunction findMainRequest(resources, corsPreFlightRequestEndTime, spanEndTimeHR) {\n const spanEndTime = hrTimeToNanoseconds(spanEndTimeHR);\n const minTime = hrTimeToNanoseconds(timeInputToHrTime(corsPreFlightRequestEndTime));\n let mainRequest = resources[1];\n let bestGap;\n const length = resources.length;\n for (let i = 1; i < length; i++) {\n const resource = resources[i];\n const resourceStartTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.FETCH_START]));\n const resourceEndTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.RESPONSE_END]));\n const currentGap = spanEndTime - resourceEndTime;\n if (resourceStartTime >= minTime && (!bestGap || currentGap < bestGap)) {\n bestGap = currentGap;\n mainRequest = resource;\n }\n }\n return mainRequest;\n}\n/**\n * Filter all resources that has started and finished according to span start time and end time.\n * It will return the closest resource to a start time\n * @param spanUrl\n * @param startTimeHR\n * @param endTimeHR\n * @param resources\n * @param ignoredResources\n */\nfunction filterResourcesForSpan(spanUrl, startTimeHR, endTimeHR, resources, ignoredResources, initiatorType) {\n const startTime = hrTimeToNanoseconds(startTimeHR);\n const endTime = hrTimeToNanoseconds(endTimeHR);\n let filteredResources = resources.filter(resource => {\n const resourceStartTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.FETCH_START]));\n const resourceEndTime = hrTimeToNanoseconds(timeInputToHrTime(resource[PTN.RESPONSE_END]));\n return (resource.initiatorType.toLowerCase() ===\n (initiatorType || 'xmlhttprequest') &&\n resource.name === spanUrl &&\n resourceStartTime >= startTime &&\n resourceEndTime <= endTime);\n });\n if (filteredResources.length > 0) {\n filteredResources = filteredResources.filter(resource => {\n return !ignoredResources.has(resource);\n });\n }\n return filteredResources;\n}\n/**\n * Parses url using URL constructor or fallback to anchor element.\n * @param url\n */\nexport function parseUrl(url) {\n if (typeof URL === 'function') {\n return new URL(url, typeof document !== 'undefined'\n ? document.baseURI\n : typeof location !== 'undefined' // Some JS runtimes (e.g. Deno) don't define this\n ? location.href\n : undefined);\n }\n const element = getUrlNormalizingAnchor();\n element.href = url;\n return element;\n}\n/**\n * Parses url using URL constructor or fallback to anchor element and serialize\n * it to a string.\n *\n * Performs the steps described in https://html.spec.whatwg.org/multipage/urls-and-fetching.html#parse-a-url\n *\n * @param url\n */\nexport function normalizeUrl(url) {\n const urlLike = parseUrl(url);\n return urlLike.href;\n}\n/**\n * Get element XPath\n * @param target - target element\n * @param optimised - when id attribute of element is present the xpath can be\n * simplified to contain id\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\nexport function getElementXPath(target, optimised) {\n if (target.nodeType === Node.DOCUMENT_NODE) {\n return '/';\n }\n const targetValue = getNodeValue(target, optimised);\n if (optimised && targetValue.indexOf('@id') > 0) {\n return targetValue;\n }\n let xpath = '';\n if (target.parentNode) {\n xpath += getElementXPath(target.parentNode, false);\n }\n xpath += targetValue;\n return xpath;\n}\n/**\n * get node index within the siblings\n * @param target\n */\nfunction getNodeIndex(target) {\n if (!target.parentNode) {\n return 0;\n }\n const allowedTypes = [target.nodeType];\n if (target.nodeType === Node.CDATA_SECTION_NODE) {\n allowedTypes.push(Node.TEXT_NODE);\n }\n let elements = Array.from(target.parentNode.childNodes);\n elements = elements.filter((element) => {\n const localName = element.localName;\n return (allowedTypes.indexOf(element.nodeType) >= 0 &&\n localName === target.localName);\n });\n if (elements.length >= 1) {\n return elements.indexOf(target) + 1; // xpath starts from 1\n }\n // if there are no other similar child xpath doesn't need index\n return 0;\n}\n/**\n * get node value for xpath\n * @param target\n * @param optimised\n */\nfunction getNodeValue(target, optimised) {\n const nodeType = target.nodeType;\n const index = getNodeIndex(target);\n let nodeValue = '';\n if (nodeType === Node.ELEMENT_NODE) {\n const id = target.getAttribute('id');\n if (optimised && id) {\n return `//*[@id=\"${id}\"]`;\n }\n nodeValue = target.localName;\n }\n else if (nodeType === Node.TEXT_NODE ||\n nodeType === Node.CDATA_SECTION_NODE) {\n nodeValue = 'text()';\n }\n else if (nodeType === Node.COMMENT_NODE) {\n nodeValue = 'comment()';\n }\n else {\n return '';\n }\n // if index is 1 it can be omitted in xpath\n if (nodeValue && index > 1) {\n return `/${nodeValue}[${index}]`;\n }\n return `/${nodeValue}`;\n}\n/**\n * Checks if trace headers should be propagated\n * @param spanUrl\n * @private\n */\nexport function shouldPropagateTraceHeaders(spanUrl, propagateTraceHeaderCorsUrls) {\n let propagateTraceHeaderUrls = propagateTraceHeaderCorsUrls || [];\n if (typeof propagateTraceHeaderUrls === 'string' ||\n propagateTraceHeaderUrls instanceof RegExp) {\n propagateTraceHeaderUrls = [propagateTraceHeaderUrls];\n }\n const parsedSpanUrl = parseUrl(spanUrl);\n if (parsedSpanUrl.origin === getOrigin()) {\n return true;\n }\n else {\n return propagateTraceHeaderUrls.some(propagateTraceHeaderUrl => urlMatches(spanUrl, propagateTraceHeaderUrl));\n }\n}\n//# sourceMappingURL=utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n/**\n * Deprecated, use `http.response.header.<key>` instead.\n *\n * @example 3495\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `http.response.header.<key>`.\n */\nexport const ATTR_HTTP_RESPONSE_CONTENT_LENGTH = 'http.response_content_length';\n/**\n * Deprecated, use `http.response.body.size` instead.\n *\n * @example 5493\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replace by `http.response.body.size`.\n */\nexport const ATTR_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED = 'http.response_content_length_uncompressed';\n//# sourceMappingURL=semconv.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class NoopLogger {\n emit(_logRecord) { }\n}\nexport const NOOP_LOGGER = new NoopLogger();\n//# sourceMappingURL=NoopLogger.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NoopLogger } from './NoopLogger';\nexport class NoopLoggerProvider {\n getLogger(_name, _version, _options) {\n return new NoopLogger();\n }\n}\nexport const NOOP_LOGGER_PROVIDER = new NoopLoggerProvider();\n//# sourceMappingURL=NoopLoggerProvider.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NOOP_LOGGER } from './NoopLogger';\nexport class ProxyLogger {\n constructor(_provider, name, version, options) {\n this._provider = _provider;\n this.name = name;\n this.version = version;\n this.options = options;\n }\n /**\n * Emit a log record. This method should only be used by log appenders.\n *\n * @param logRecord\n */\n emit(logRecord) {\n this._getLogger().emit(logRecord);\n }\n /**\n * Try to get a logger from the proxy logger provider.\n * If the proxy logger provider has no delegate, return a noop logger.\n */\n _getLogger() {\n if (this._delegate) {\n return this._delegate;\n }\n const logger = this._provider.getDelegateLogger(this.name, this.version, this.options);\n if (!logger) {\n return NOOP_LOGGER;\n }\n this._delegate = logger;\n return this._delegate;\n }\n}\n//# sourceMappingURL=ProxyLogger.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { NOOP_LOGGER_PROVIDER } from './NoopLoggerProvider';\nimport { ProxyLogger } from './ProxyLogger';\nexport class ProxyLoggerProvider {\n getLogger(name, version, options) {\n var _a;\n return ((_a = this.getDelegateLogger(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyLogger(this, name, version, options));\n }\n getDelegate() {\n var _a;\n return (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_LOGGER_PROVIDER;\n }\n /**\n * Set the delegate logger provider\n */\n setDelegate(delegate) {\n this._delegate = delegate;\n }\n getDelegateLogger(name, version, options) {\n var _a;\n return (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getLogger(name, version, options);\n }\n}\n//# sourceMappingURL=ProxyLoggerProvider.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/** only globals that common to node and browsers are allowed */\n// eslint-disable-next-line node/no-unsupported-features/es-builtins\nexport const _globalThis = typeof globalThis === 'object' ? globalThis : global;\n//# sourceMappingURL=globalThis.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { _globalThis } from '../platform';\nexport const GLOBAL_LOGS_API_KEY = Symbol.for('io.opentelemetry.js.api.logs');\nexport const _global = _globalThis;\n/**\n * Make a function which accepts a version integer and returns the instance of an API if the version\n * is compatible, or a fallback version (usually NOOP) if it is not.\n *\n * @param requiredVersion Backwards compatibility version which is required to return the instance\n * @param instance Instance which should be returned if the required version is compatible\n * @param fallback Fallback instance, usually NOOP, which will be returned if the required version is not compatible\n */\nexport function makeGetter(requiredVersion, instance, fallback) {\n return (version) => version === requiredVersion ? instance : fallback;\n}\n/**\n * A number which should be incremented each time a backwards incompatible\n * change is made to the API. This number is used when an API package\n * attempts to access the global API to ensure it is getting a compatible\n * version. If the global API is not compatible with the API package\n * attempting to get it, a NOOP API implementation will be returned.\n */\nexport const API_BACKWARDS_COMPATIBILITY_VERSION = 1;\n//# sourceMappingURL=global-utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { API_BACKWARDS_COMPATIBILITY_VERSION, GLOBAL_LOGS_API_KEY, _global, makeGetter, } from '../internal/global-utils';\nimport { NOOP_LOGGER_PROVIDER } from '../NoopLoggerProvider';\nimport { ProxyLoggerProvider } from '../ProxyLoggerProvider';\nexport class LogsAPI {\n constructor() {\n this._proxyLoggerProvider = new ProxyLoggerProvider();\n }\n static getInstance() {\n if (!this._instance) {\n this._instance = new LogsAPI();\n }\n return this._instance;\n }\n setGlobalLoggerProvider(provider) {\n if (_global[GLOBAL_LOGS_API_KEY]) {\n return this.getLoggerProvider();\n }\n _global[GLOBAL_LOGS_API_KEY] = makeGetter(API_BACKWARDS_COMPATIBILITY_VERSION, provider, NOOP_LOGGER_PROVIDER);\n this._proxyLoggerProvider.setDelegate(provider);\n return provider;\n }\n /**\n * Returns the global logger provider.\n *\n * @returns LoggerProvider\n */\n getLoggerProvider() {\n var _a, _b;\n return ((_b = (_a = _global[GLOBAL_LOGS_API_KEY]) === null || _a === void 0 ? void 0 : _a.call(_global, API_BACKWARDS_COMPATIBILITY_VERSION)) !== null && _b !== void 0 ? _b : this._proxyLoggerProvider);\n }\n /**\n * Returns a logger from the global logger provider.\n *\n * @returns Logger\n */\n getLogger(name, version, options) {\n return this.getLoggerProvider().getLogger(name, version, options);\n }\n /** Remove the global logger provider */\n disable() {\n delete _global[GLOBAL_LOGS_API_KEY];\n this._proxyLoggerProvider = new ProxyLoggerProvider();\n }\n}\n//# sourceMappingURL=logs.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport { SeverityNumber } from './types/LogRecord';\nexport { NOOP_LOGGER, NoopLogger } from './NoopLogger';\nexport { NOOP_LOGGER_PROVIDER, NoopLoggerProvider } from './NoopLoggerProvider';\nexport { ProxyLogger } from './ProxyLogger';\nexport { ProxyLoggerProvider } from './ProxyLoggerProvider';\nimport { LogsAPI } from './api/logs';\nexport const logs = LogsAPI.getInstance();\n//# sourceMappingURL=index.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// This is a custom semantic versioning implementation compatible with the\n// `satisfies(version, range, options?)` function from the `semver` npm package;\n// with the exception that the `loose` option is not supported.\n//\n// The motivation for the custom semver implementation is that\n// `semver` package has some initialization delay (lots of RegExp init and compile)\n// and this leads to coldstart overhead for the OTEL Lambda Node.js layer.\n// Hence, we have implemented lightweight version of it internally with required functionalities.\nimport { diag } from '@opentelemetry/api';\nconst VERSION_REGEXP = /^(?:v)?(?<version>(?<major>0|[1-9]\\d*)\\.(?<minor>0|[1-9]\\d*)\\.(?<patch>0|[1-9]\\d*))(?:-(?<prerelease>(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+(?<build>[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\nconst RANGE_REGEXP = /^(?<op><|>|=|==|<=|>=|~|\\^|~>)?\\s*(?:v)?(?<version>(?<major>x|X|\\*|0|[1-9]\\d*)(?:\\.(?<minor>x|X|\\*|0|[1-9]\\d*))?(?:\\.(?<patch>x|X|\\*|0|[1-9]\\d*))?)(?:-(?<prerelease>(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+(?<build>[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\nconst operatorResMap = {\n '>': [1],\n '>=': [0, 1],\n '=': [0],\n '<=': [-1, 0],\n '<': [-1],\n '!=': [-1, 1],\n};\n/**\n * Checks given version whether it satisfies given range expression.\n * @param version the [version](https://github.com/npm/node-semver#versions) to be checked\n * @param range the [range](https://github.com/npm/node-semver#ranges) expression for version check\n * @param options options to configure semver satisfy check\n */\nexport function satisfies(version, range, options) {\n // Strict semver format check\n if (!_validateVersion(version)) {\n diag.error(`Invalid version: ${version}`);\n return false;\n }\n // If range is empty, satisfy check succeeds regardless what version is\n if (!range) {\n return true;\n }\n // Cleanup range\n range = range.replace(/([<>=~^]+)\\s+/g, '$1');\n // Parse version\n const parsedVersion = _parseVersion(version);\n if (!parsedVersion) {\n return false;\n }\n const allParsedRanges = [];\n // Check given version whether it satisfies given range expression\n const checkResult = _doSatisfies(parsedVersion, range, allParsedRanges, options);\n // If check result is OK,\n // do another final check for pre-release, if pre-release check is included by option\n if (checkResult && !options?.includePrerelease) {\n return _doPreleaseCheck(parsedVersion, allParsedRanges);\n }\n return checkResult;\n}\nfunction _validateVersion(version) {\n return typeof version === 'string' && VERSION_REGEXP.test(version);\n}\nfunction _doSatisfies(parsedVersion, range, allParsedRanges, options) {\n if (range.includes('||')) {\n // A version matches a range if and only if\n // every comparator in at least one of the ||-separated comparator sets is satisfied by the version\n const ranges = range.trim().split('||');\n for (const r of ranges) {\n if (_checkRange(parsedVersion, r, allParsedRanges, options)) {\n return true;\n }\n }\n return false;\n }\n else if (range.includes(' - ')) {\n // Hyphen ranges: https://github.com/npm/node-semver#hyphen-ranges-xyz---abc\n range = replaceHyphen(range, options);\n }\n else if (range.includes(' ')) {\n // Multiple separated ranges and all needs to be satisfied for success\n const ranges = range\n .trim()\n .replace(/\\s{2,}/g, ' ')\n .split(' ');\n for (const r of ranges) {\n if (!_checkRange(parsedVersion, r, allParsedRanges, options)) {\n return false;\n }\n }\n return true;\n }\n // Check given parsed version with given range\n return _checkRange(parsedVersion, range, allParsedRanges, options);\n}\nfunction _checkRange(parsedVersion, range, allParsedRanges, options) {\n range = _normalizeRange(range, options);\n if (range.includes(' ')) {\n // If there are multiple ranges separated, satisfy each of them\n return _doSatisfies(parsedVersion, range, allParsedRanges, options);\n }\n else {\n // Validate and parse range\n const parsedRange = _parseRange(range);\n allParsedRanges.push(parsedRange);\n // Check parsed version by parsed range\n return _satisfies(parsedVersion, parsedRange);\n }\n}\nfunction _satisfies(parsedVersion, parsedRange) {\n // If range is invalid, satisfy check fails (no error throw)\n if (parsedRange.invalid) {\n return false;\n }\n // If range is empty or wildcard, satisfy check succeeds regardless what version is\n if (!parsedRange.version || _isWildcard(parsedRange.version)) {\n return true;\n }\n // Compare version segment first\n let comparisonResult = _compareVersionSegments(parsedVersion.versionSegments || [], parsedRange.versionSegments || []);\n // If versions segments are equal, compare by pre-release segments\n if (comparisonResult === 0) {\n const versionPrereleaseSegments = parsedVersion.prereleaseSegments || [];\n const rangePrereleaseSegments = parsedRange.prereleaseSegments || [];\n if (!versionPrereleaseSegments.length && !rangePrereleaseSegments.length) {\n comparisonResult = 0;\n }\n else if (!versionPrereleaseSegments.length &&\n rangePrereleaseSegments.length) {\n comparisonResult = 1;\n }\n else if (versionPrereleaseSegments.length &&\n !rangePrereleaseSegments.length) {\n comparisonResult = -1;\n }\n else {\n comparisonResult = _compareVersionSegments(versionPrereleaseSegments, rangePrereleaseSegments);\n }\n }\n // Resolve check result according to comparison operator\n return operatorResMap[parsedRange.op]?.includes(comparisonResult);\n}\nfunction _doPreleaseCheck(parsedVersion, allParsedRanges) {\n if (parsedVersion.prerelease) {\n return allParsedRanges.some(r => r.prerelease && r.version === parsedVersion.version);\n }\n return true;\n}\nfunction _normalizeRange(range, options) {\n range = range.trim();\n range = replaceCaret(range, options);\n range = replaceTilde(range);\n range = replaceXRange(range, options);\n range = range.trim();\n return range;\n}\nfunction isX(id) {\n return !id || id.toLowerCase() === 'x' || id === '*';\n}\nfunction _parseVersion(versionString) {\n const match = versionString.match(VERSION_REGEXP);\n if (!match) {\n diag.error(`Invalid version: ${versionString}`);\n return undefined;\n }\n const version = match.groups.version;\n const prerelease = match.groups.prerelease;\n const build = match.groups.build;\n const versionSegments = version.split('.');\n const prereleaseSegments = prerelease?.split('.');\n return {\n op: undefined,\n version,\n versionSegments,\n versionSegmentCount: versionSegments.length,\n prerelease,\n prereleaseSegments,\n prereleaseSegmentCount: prereleaseSegments ? prereleaseSegments.length : 0,\n build,\n };\n}\nfunction _parseRange(rangeString) {\n if (!rangeString) {\n return {};\n }\n const match = rangeString.match(RANGE_REGEXP);\n if (!match) {\n diag.error(`Invalid range: ${rangeString}`);\n return {\n invalid: true,\n };\n }\n let op = match.groups.op;\n const version = match.groups.version;\n const prerelease = match.groups.prerelease;\n const build = match.groups.build;\n const versionSegments = version.split('.');\n const prereleaseSegments = prerelease?.split('.');\n if (op === '==') {\n op = '=';\n }\n return {\n op: op || '=',\n version,\n versionSegments,\n versionSegmentCount: versionSegments.length,\n prerelease,\n prereleaseSegments,\n prereleaseSegmentCount: prereleaseSegments ? prereleaseSegments.length : 0,\n build,\n };\n}\nfunction _isWildcard(s) {\n return s === '*' || s === 'x' || s === 'X';\n}\nfunction _parseVersionString(v) {\n const n = parseInt(v, 10);\n return isNaN(n) ? v : n;\n}\nfunction _normalizeVersionType(a, b) {\n if (typeof a === typeof b) {\n if (typeof a === 'number') {\n return [a, b];\n }\n else if (typeof a === 'string') {\n return [a, b];\n }\n else {\n throw new Error('Version segments can only be strings or numbers');\n }\n }\n else {\n return [String(a), String(b)];\n }\n}\nfunction _compareVersionStrings(v1, v2) {\n if (_isWildcard(v1) || _isWildcard(v2)) {\n return 0;\n }\n const [parsedV1, parsedV2] = _normalizeVersionType(_parseVersionString(v1), _parseVersionString(v2));\n if (parsedV1 > parsedV2) {\n return 1;\n }\n else if (parsedV1 < parsedV2) {\n return -1;\n }\n return 0;\n}\nfunction _compareVersionSegments(v1, v2) {\n for (let i = 0; i < Math.max(v1.length, v2.length); i++) {\n const res = _compareVersionStrings(v1[i] || '0', v2[i] || '0');\n if (res !== 0) {\n return res;\n }\n }\n return 0;\n}\n////////////////////////////////////////////////////////////////////////////////\n// The rest of this file is adapted from portions of https://github.com/npm/node-semver/tree/868d4bb\n// License:\n/*\n * The ISC License\n *\n * Copyright (c) Isaac Z. Schlueter and Contributors\n *\n * Permission to use, copy, modify, and/or distribute this software for any\n * purpose with or without fee is hereby granted, provided that the above\n * copyright notice and this permission notice appear in all copies.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\n * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\n * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\n * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\n * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR\n * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n */\nconst LETTERDASHNUMBER = '[a-zA-Z0-9-]';\nconst NUMERICIDENTIFIER = '0|[1-9]\\\\d*';\nconst NONNUMERICIDENTIFIER = `\\\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`;\nconst GTLT = '((?:<|>)?=?)';\nconst PRERELEASEIDENTIFIER = `(?:${NUMERICIDENTIFIER}|${NONNUMERICIDENTIFIER})`;\nconst PRERELEASE = `(?:-(${PRERELEASEIDENTIFIER}(?:\\\\.${PRERELEASEIDENTIFIER})*))`;\nconst BUILDIDENTIFIER = `${LETTERDASHNUMBER}+`;\nconst BUILD = `(?:\\\\+(${BUILDIDENTIFIER}(?:\\\\.${BUILDIDENTIFIER})*))`;\nconst XRANGEIDENTIFIER = `${NUMERICIDENTIFIER}|x|X|\\\\*`;\nconst XRANGEPLAIN = `[v=\\\\s]*(${XRANGEIDENTIFIER})` +\n `(?:\\\\.(${XRANGEIDENTIFIER})` +\n `(?:\\\\.(${XRANGEIDENTIFIER})` +\n `(?:${PRERELEASE})?${BUILD}?` +\n `)?)?`;\nconst XRANGE = `^${GTLT}\\\\s*${XRANGEPLAIN}$`;\nconst XRANGE_REGEXP = new RegExp(XRANGE);\nconst HYPHENRANGE = `^\\\\s*(${XRANGEPLAIN})` + `\\\\s+-\\\\s+` + `(${XRANGEPLAIN})` + `\\\\s*$`;\nconst HYPHENRANGE_REGEXP = new RegExp(HYPHENRANGE);\nconst LONETILDE = '(?:~>?)';\nconst TILDE = `^${LONETILDE}${XRANGEPLAIN}$`;\nconst TILDE_REGEXP = new RegExp(TILDE);\nconst LONECARET = '(?:\\\\^)';\nconst CARET = `^${LONECARET}${XRANGEPLAIN}$`;\nconst CARET_REGEXP = new RegExp(CARET);\n// Borrowed from https://github.com/npm/node-semver/blob/868d4bbe3d318c52544f38d5f9977a1103e924c2/classes/range.js#L285\n//\n// ~, ~> --> * (any, kinda silly)\n// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0\n// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0\n// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0\n// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0\n// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0\n// ~0.0.1 --> >=0.0.1 <0.1.0-0\nfunction replaceTilde(comp) {\n const r = TILDE_REGEXP;\n return comp.replace(r, (_, M, m, p, pr) => {\n let ret;\n if (isX(M)) {\n ret = '';\n }\n else if (isX(m)) {\n ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;\n }\n else if (isX(p)) {\n // ~1.2 == >=1.2.0 <1.3.0-0\n ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;\n }\n else if (pr) {\n ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;\n }\n else {\n // ~1.2.3 == >=1.2.3 <1.3.0-0\n ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;\n }\n return ret;\n });\n}\n// Borrowed from https://github.com/npm/node-semver/blob/868d4bbe3d318c52544f38d5f9977a1103e924c2/classes/range.js#L329\n//\n// ^ --> * (any, kinda silly)\n// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0\n// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0\n// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0\n// ^1.2.3 --> >=1.2.3 <2.0.0-0\n// ^1.2.0 --> >=1.2.0 <2.0.0-0\n// ^0.0.1 --> >=0.0.1 <0.0.2-0\n// ^0.1.0 --> >=0.1.0 <0.2.0-0\nfunction replaceCaret(comp, options) {\n const r = CARET_REGEXP;\n const z = options?.includePrerelease ? '-0' : '';\n return comp.replace(r, (_, M, m, p, pr) => {\n let ret;\n if (isX(M)) {\n ret = '';\n }\n else if (isX(m)) {\n ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;\n }\n else if (isX(p)) {\n if (M === '0') {\n ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;\n }\n else {\n ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;\n }\n }\n else if (pr) {\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;\n }\n else {\n ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;\n }\n }\n else {\n ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;\n }\n }\n else {\n if (M === '0') {\n if (m === '0') {\n ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;\n }\n else {\n ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;\n }\n }\n else {\n ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;\n }\n }\n return ret;\n });\n}\n// Borrowed from https://github.com/npm/node-semver/blob/868d4bbe3d318c52544f38d5f9977a1103e924c2/classes/range.js#L390\nfunction replaceXRange(comp, options) {\n const r = XRANGE_REGEXP;\n return comp.replace(r, (ret, gtlt, M, m, p, pr) => {\n const xM = isX(M);\n const xm = xM || isX(m);\n const xp = xm || isX(p);\n const anyX = xp;\n if (gtlt === '=' && anyX) {\n gtlt = '';\n }\n // if we're including prereleases in the match, then we need\n // to fix this to -0, the lowest possible prerelease value\n pr = options?.includePrerelease ? '-0' : '';\n if (xM) {\n if (gtlt === '>' || gtlt === '<') {\n // nothing is allowed\n ret = '<0.0.0-0';\n }\n else {\n // nothing is forbidden\n ret = '*';\n }\n }\n else if (gtlt && anyX) {\n // we know patch is an x, because we have any x at all.\n // replace X with 0\n if (xm) {\n m = 0;\n }\n p = 0;\n if (gtlt === '>') {\n // >1 => >=2.0.0\n // >1.2 => >=1.3.0\n gtlt = '>=';\n if (xm) {\n M = +M + 1;\n m = 0;\n p = 0;\n }\n else {\n m = +m + 1;\n p = 0;\n }\n }\n else if (gtlt === '<=') {\n // <=0.7.x is actually <0.8.0, since any 0.7.x should\n // pass. Similarly, <=7.x is actually <8.0.0, etc.\n gtlt = '<';\n if (xm) {\n M = +M + 1;\n }\n else {\n m = +m + 1;\n }\n }\n if (gtlt === '<') {\n pr = '-0';\n }\n ret = `${gtlt + M}.${m}.${p}${pr}`;\n }\n else if (xm) {\n ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;\n }\n else if (xp) {\n ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;\n }\n return ret;\n });\n}\n// Borrowed from https://github.com/npm/node-semver/blob/868d4bbe3d318c52544f38d5f9977a1103e924c2/classes/range.js#L488\n//\n// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5\n// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do\n// 1.2 - 3.4 => >=1.2.0 <3.5.0-0\nfunction replaceHyphen(comp, options) {\n const r = HYPHENRANGE_REGEXP;\n return comp.replace(r, (_, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {\n if (isX(fM)) {\n from = '';\n }\n else if (isX(fm)) {\n from = `>=${fM}.0.0${options?.includePrerelease ? '-0' : ''}`;\n }\n else if (isX(fp)) {\n from = `>=${fM}.${fm}.0${options?.includePrerelease ? '-0' : ''}`;\n }\n else if (fpr) {\n from = `>=${from}`;\n }\n else {\n from = `>=${from}${options?.includePrerelease ? '-0' : ''}`;\n }\n if (isX(tM)) {\n to = '';\n }\n else if (isX(tm)) {\n to = `<${+tM + 1}.0.0-0`;\n }\n else if (isX(tp)) {\n to = `<${tM}.${+tm + 1}.0-0`;\n }\n else if (tpr) {\n to = `<=${tM}.${tm}.${tp}-${tpr}`;\n }\n else if (options?.includePrerelease) {\n to = `<${tM}.${tm}.${+tp + 1}-0`;\n }\n else {\n to = `<=${to}`;\n }\n return `${from} ${to}`.trim();\n });\n}\n//# sourceMappingURL=semver.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Default to complaining loudly when things don't go according to plan.\n// eslint-disable-next-line no-console\nlet logger = console.error.bind(console);\n// Sets a property on an object, preserving its enumerability.\n// This function assumes that the property is already writable.\nfunction defineProperty(obj, name, value) {\n const enumerable = !!obj[name] &&\n Object.prototype.propertyIsEnumerable.call(obj, name);\n Object.defineProperty(obj, name, {\n configurable: true,\n enumerable,\n writable: true,\n value,\n });\n}\nexport const wrap = (nodule, name, wrapper) => {\n if (!nodule || !nodule[name]) {\n logger('no original function ' + String(name) + ' to wrap');\n return;\n }\n if (!wrapper) {\n logger('no wrapper function');\n logger(new Error().stack);\n return;\n }\n const original = nodule[name];\n if (typeof original !== 'function' || typeof wrapper !== 'function') {\n logger('original object and wrapper must be functions');\n return;\n }\n const wrapped = wrapper(original, name);\n defineProperty(wrapped, '__original', original);\n defineProperty(wrapped, '__unwrap', () => {\n if (nodule[name] === wrapped) {\n defineProperty(nodule, name, original);\n }\n });\n defineProperty(wrapped, '__wrapped', true);\n defineProperty(nodule, name, wrapped);\n return wrapped;\n};\nexport const massWrap = (nodules, names, wrapper) => {\n if (!nodules) {\n logger('must provide one or more modules to patch');\n logger(new Error().stack);\n return;\n }\n else if (!Array.isArray(nodules)) {\n nodules = [nodules];\n }\n if (!(names && Array.isArray(names))) {\n logger('must provide one or more functions to wrap on modules');\n return;\n }\n nodules.forEach(nodule => {\n names.forEach(name => {\n wrap(nodule, name, wrapper);\n });\n });\n};\nexport const unwrap = (nodule, name) => {\n if (!nodule || !nodule[name]) {\n logger('no function to unwrap.');\n logger(new Error().stack);\n return;\n }\n const wrapped = nodule[name];\n if (!wrapped.__unwrap) {\n logger('no original to unwrap to -- has ' +\n String(name) +\n ' already been unwrapped?');\n }\n else {\n wrapped.__unwrap();\n return;\n }\n};\nexport const massUnwrap = (nodules, names) => {\n if (!nodules) {\n logger('must provide one or more modules to patch');\n logger(new Error().stack);\n return;\n }\n else if (!Array.isArray(nodules)) {\n nodules = [nodules];\n }\n if (!(names && Array.isArray(names))) {\n logger('must provide one or more functions to unwrap on modules');\n return;\n }\n nodules.forEach(nodule => {\n names.forEach(name => {\n unwrap(nodule, name);\n });\n });\n};\nexport default function shimmer(options) {\n if (options && options.logger) {\n if (typeof options.logger !== 'function') {\n logger(\"new logger isn't a function, not replacing\");\n }\n else {\n logger = options.logger;\n }\n }\n}\nshimmer.wrap = wrap;\nshimmer.massWrap = massWrap;\nshimmer.unwrap = unwrap;\nshimmer.massUnwrap = massUnwrap;\n//# sourceMappingURL=shimmer.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { diag, metrics, trace, } from '@opentelemetry/api';\nimport { logs } from '@opentelemetry/api-logs';\nimport * as shimmer from './shimmer';\n/**\n * Base abstract internal class for instrumenting node and web plugins\n */\nexport class InstrumentationAbstract {\n instrumentationName;\n instrumentationVersion;\n _config = {};\n _tracer;\n _meter;\n _logger;\n _diag;\n constructor(instrumentationName, instrumentationVersion, config) {\n this.instrumentationName = instrumentationName;\n this.instrumentationVersion = instrumentationVersion;\n this.setConfig(config);\n this._diag = diag.createComponentLogger({\n namespace: instrumentationName,\n });\n this._tracer = trace.getTracer(instrumentationName, instrumentationVersion);\n this._meter = metrics.getMeter(instrumentationName, instrumentationVersion);\n this._logger = logs.getLogger(instrumentationName, instrumentationVersion);\n this._updateMetricInstruments();\n }\n /* Api to wrap instrumented method */\n _wrap = shimmer.wrap;\n /* Api to unwrap instrumented methods */\n _unwrap = shimmer.unwrap;\n /* Api to mass wrap instrumented method */\n _massWrap = shimmer.massWrap;\n /* Api to mass unwrap instrumented methods */\n _massUnwrap = shimmer.massUnwrap;\n /* Returns meter */\n get meter() {\n return this._meter;\n }\n /**\n * Sets MeterProvider to this plugin\n * @param meterProvider\n */\n setMeterProvider(meterProvider) {\n this._meter = meterProvider.getMeter(this.instrumentationName, this.instrumentationVersion);\n this._updateMetricInstruments();\n }\n /* Returns logger */\n get logger() {\n return this._logger;\n }\n /**\n * Sets LoggerProvider to this plugin\n * @param loggerProvider\n */\n setLoggerProvider(loggerProvider) {\n this._logger = loggerProvider.getLogger(this.instrumentationName, this.instrumentationVersion);\n }\n /**\n * @experimental\n *\n * Get module definitions defined by {@link init}.\n * This can be used for experimental compile-time instrumentation.\n *\n * @returns an array of {@link InstrumentationModuleDefinition}\n */\n getModuleDefinitions() {\n const initResult = this.init() ?? [];\n if (!Array.isArray(initResult)) {\n return [initResult];\n }\n return initResult;\n }\n /**\n * Sets the new metric instruments with the current Meter.\n */\n _updateMetricInstruments() {\n return;\n }\n /* Returns InstrumentationConfig */\n getConfig() {\n return this._config;\n }\n /**\n * Sets InstrumentationConfig to this plugin\n * @param config\n */\n setConfig(config) {\n // copy config first level properties to ensure they are immutable.\n // nested properties are not copied, thus are mutable from the outside.\n this._config = {\n enabled: true,\n ...config,\n };\n }\n /**\n * Sets TraceProvider to this plugin\n * @param tracerProvider\n */\n setTracerProvider(tracerProvider) {\n this._tracer = tracerProvider.getTracer(this.instrumentationName, this.instrumentationVersion);\n }\n /* Returns tracer */\n get tracer() {\n return this._tracer;\n }\n /**\n * Execute span customization hook, if configured, and log any errors.\n * Any semantics of the trigger and info are defined by the specific instrumentation.\n * @param hookHandler The optional hook handler which the user has configured via instrumentation config\n * @param triggerName The name of the trigger for executing the hook for logging purposes\n * @param span The span to which the hook should be applied\n * @param info The info object to be passed to the hook, with useful data the hook may use\n */\n _runSpanCustomizationHook(hookHandler, triggerName, span, info) {\n if (!hookHandler) {\n return;\n }\n try {\n hookHandler(span, info);\n }\n catch (e) {\n this._diag.error(`Error running span customization hook due to exception in handler`, { triggerName }, e);\n }\n }\n}\n//# sourceMappingURL=instrumentation.js.map","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '')\n\t\t\t.trim()\n\t\t\t.replace(/\\s+/g, ',')\n\t\t\t.split(',')\n\t\t\t.filter(Boolean);\n\n\t\tfor (const ns of split) {\n\t\t\tif (ns[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(ns.slice(1));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(ns);\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the given string matches a namespace template, honoring\n\t * asterisks as wildcards.\n\t *\n\t * @param {String} search\n\t * @param {String} template\n\t * @return {Boolean}\n\t */\n\tfunction matchesTemplate(search, template) {\n\t\tlet searchIndex = 0;\n\t\tlet templateIndex = 0;\n\t\tlet starIndex = -1;\n\t\tlet matchIndex = 0;\n\n\t\twhile (searchIndex < search.length) {\n\t\t\tif (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {\n\t\t\t\t// Match character or proceed with wildcard\n\t\t\t\tif (template[templateIndex] === '*') {\n\t\t\t\t\tstarIndex = templateIndex;\n\t\t\t\t\tmatchIndex = searchIndex;\n\t\t\t\t\ttemplateIndex++; // Skip the '*'\n\t\t\t\t} else {\n\t\t\t\t\tsearchIndex++;\n\t\t\t\t\ttemplateIndex++;\n\t\t\t\t}\n\t\t\t} else if (starIndex !== -1) { // eslint-disable-line no-negated-condition\n\t\t\t\t// Backtrack to the last '*' and try to match more characters\n\t\t\t\ttemplateIndex = starIndex + 1;\n\t\t\t\tmatchIndex++;\n\t\t\t\tsearchIndex = matchIndex;\n\t\t\t} else {\n\t\t\t\treturn false; // No match\n\t\t\t}\n\t\t}\n\n\t\t// Handle trailing '*' in template\n\t\twhile (templateIndex < template.length && template[templateIndex] === '*') {\n\t\t\ttemplateIndex++;\n\t\t}\n\n\t\treturn templateIndex === template.length;\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names,\n\t\t\t...createDebug.skips.map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tfor (const skip of createDebug.skips) {\n\t\t\tif (matchesTemplate(name, skip)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (const ns of createDebug.names) {\n\t\t\tif (matchesTemplate(name, ns)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","/**\n * Detect Electron renderer / nwjs process, which is node, but we should\n * treat as a browser.\n */\n\nif (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {\n\tmodule.exports = require('./browser.js');\n} else {\n\tmodule.exports = require('./node.js');\n}\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\t// eslint-disable-next-line no-return-assign\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","/**\n * Module dependencies.\n */\n\nconst tty = require('tty');\nconst util = require('util');\n\n/**\n * This is the Node.js implementation of `debug()`.\n */\n\nexports.init = init;\nexports.log = log;\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.destroy = util.deprecate(\n\t() => {},\n\t'Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.'\n);\n\n/**\n * Colors.\n */\n\nexports.colors = [6, 2, 3, 4, 5, 1];\n\ntry {\n\t// Optional dependency (as in, doesn't need to be installed, NOT like optionalDependencies in package.json)\n\t// eslint-disable-next-line import/no-extraneous-dependencies\n\tconst supportsColor = require('supports-color');\n\n\tif (supportsColor && (supportsColor.stderr || supportsColor).level >= 2) {\n\t\texports.colors = [\n\t\t\t20,\n\t\t\t21,\n\t\t\t26,\n\t\t\t27,\n\t\t\t32,\n\t\t\t33,\n\t\t\t38,\n\t\t\t39,\n\t\t\t40,\n\t\t\t41,\n\t\t\t42,\n\t\t\t43,\n\t\t\t44,\n\t\t\t45,\n\t\t\t56,\n\t\t\t57,\n\t\t\t62,\n\t\t\t63,\n\t\t\t68,\n\t\t\t69,\n\t\t\t74,\n\t\t\t75,\n\t\t\t76,\n\t\t\t77,\n\t\t\t78,\n\t\t\t79,\n\t\t\t80,\n\t\t\t81,\n\t\t\t92,\n\t\t\t93,\n\t\t\t98,\n\t\t\t99,\n\t\t\t112,\n\t\t\t113,\n\t\t\t128,\n\t\t\t129,\n\t\t\t134,\n\t\t\t135,\n\t\t\t148,\n\t\t\t149,\n\t\t\t160,\n\t\t\t161,\n\t\t\t162,\n\t\t\t163,\n\t\t\t164,\n\t\t\t165,\n\t\t\t166,\n\t\t\t167,\n\t\t\t168,\n\t\t\t169,\n\t\t\t170,\n\t\t\t171,\n\t\t\t172,\n\t\t\t173,\n\t\t\t178,\n\t\t\t179,\n\t\t\t184,\n\t\t\t185,\n\t\t\t196,\n\t\t\t197,\n\t\t\t198,\n\t\t\t199,\n\t\t\t200,\n\t\t\t201,\n\t\t\t202,\n\t\t\t203,\n\t\t\t204,\n\t\t\t205,\n\t\t\t206,\n\t\t\t207,\n\t\t\t208,\n\t\t\t209,\n\t\t\t214,\n\t\t\t215,\n\t\t\t220,\n\t\t\t221\n\t\t];\n\t}\n} catch (error) {\n\t// Swallow - we only care if `supports-color` is available; it doesn't have to be.\n}\n\n/**\n * Build up the default `inspectOpts` object from the environment variables.\n *\n * $ DEBUG_COLORS=no DEBUG_DEPTH=10 DEBUG_SHOW_HIDDEN=enabled node script.js\n */\n\nexports.inspectOpts = Object.keys(process.env).filter(key => {\n\treturn /^debug_/i.test(key);\n}).reduce((obj, key) => {\n\t// Camel-case\n\tconst prop = key\n\t\t.substring(6)\n\t\t.toLowerCase()\n\t\t.replace(/_([a-z])/g, (_, k) => {\n\t\t\treturn k.toUpperCase();\n\t\t});\n\n\t// Coerce string value into JS value\n\tlet val = process.env[key];\n\tif (/^(yes|on|true|enabled)$/i.test(val)) {\n\t\tval = true;\n\t} else if (/^(no|off|false|disabled)$/i.test(val)) {\n\t\tval = false;\n\t} else if (val === 'null') {\n\t\tval = null;\n\t} else {\n\t\tval = Number(val);\n\t}\n\n\tobj[prop] = val;\n\treturn obj;\n}, {});\n\n/**\n * Is stdout a TTY? Colored output is enabled when `true`.\n */\n\nfunction useColors() {\n\treturn 'colors' in exports.inspectOpts ?\n\t\tBoolean(exports.inspectOpts.colors) :\n\t\ttty.isatty(process.stderr.fd);\n}\n\n/**\n * Adds ANSI color escape codes if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\tconst {namespace: name, useColors} = this;\n\n\tif (useColors) {\n\t\tconst c = this.color;\n\t\tconst colorCode = '\\u001B[3' + (c < 8 ? c : '8;5;' + c);\n\t\tconst prefix = ` ${colorCode};1m${name} \\u001B[0m`;\n\n\t\targs[0] = prefix + args[0].split('\\n').join('\\n' + prefix);\n\t\targs.push(colorCode + 'm+' + module.exports.humanize(this.diff) + '\\u001B[0m');\n\t} else {\n\t\targs[0] = getDate() + name + ' ' + args[0];\n\t}\n}\n\nfunction getDate() {\n\tif (exports.inspectOpts.hideDate) {\n\t\treturn '';\n\t}\n\treturn new Date().toISOString() + ' ';\n}\n\n/**\n * Invokes `util.formatWithOptions()` with the specified arguments and writes to stderr.\n */\n\nfunction log(...args) {\n\treturn process.stderr.write(util.formatWithOptions(exports.inspectOpts, ...args) + '\\n');\n}\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\tif (namespaces) {\n\t\tprocess.env.DEBUG = namespaces;\n\t} else {\n\t\t// If you set a process.env field to null or undefined, it gets cast to the\n\t\t// string 'null' or 'undefined'. Just delete instead.\n\t\tdelete process.env.DEBUG;\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\n\nfunction load() {\n\treturn process.env.DEBUG;\n}\n\n/**\n * Init logic for `debug` instances.\n *\n * Create a new `inspectOpts` object in case `useColors` is set\n * differently for a particular `debug` instance.\n */\n\nfunction init(debug) {\n\tdebug.inspectOpts = {};\n\n\tconst keys = Object.keys(exports.inspectOpts);\n\tfor (let i = 0; i < keys.length; i++) {\n\t\tdebug.inspectOpts[keys[i]] = exports.inspectOpts[keys[i]];\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %o to `util.inspect()`, all on a single line.\n */\n\nformatters.o = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts)\n\t\t.split('\\n')\n\t\t.map(str => str.trim())\n\t\t.join(' ');\n};\n\n/**\n * Map %O to `util.inspect()`, allowing multiple lines if needed.\n */\n\nformatters.O = function (v) {\n\tthis.inspectOpts.colors = this.useColors;\n\treturn util.inspect(v, this.inspectOpts);\n};\n","'use strict'\n\nvar sep = require('path').sep\n\nmodule.exports = function (file) {\n var segments = file.split(sep)\n var index = segments.lastIndexOf('node_modules')\n\n if (index === -1) return\n if (!segments[index + 1]) return\n\n var scoped = segments[index + 1][0] === '@'\n var name = scoped ? segments[index + 1] + '/' + segments[index + 2] : segments[index + 1]\n var offset = scoped ? 3 : 2\n\n var basedir = ''\n var lastBaseDirSegmentIndex = index + offset - 1\n for (var i = 0; i <= lastBaseDirSegmentIndex; i++) {\n if (i === lastBaseDirSegmentIndex) {\n basedir += segments[i]\n } else {\n basedir += segments[i] + sep\n }\n }\n\n var path = ''\n var lastSegmentIndex = segments.length - 1\n for (var i2 = index + offset; i2 <= lastSegmentIndex; i2++) {\n if (i2 === lastSegmentIndex) {\n path += segments[i2]\n } else {\n path += segments[i2] + sep\n }\n }\n\n return {\n name: name,\n basedir: basedir,\n path: path\n }\n}\n","'use strict';\n\nvar os = require('os');\n\n// adapted from https://github.com/sindresorhus/os-homedir/blob/11e089f4754db38bb535e5a8416320c4446e8cfd/index.js\n\nmodule.exports = os.homedir || function homedir() {\n var home = process.env.HOME;\n var user = process.env.LOGNAME || process.env.USER || process.env.LNAME || process.env.USERNAME;\n\n if (process.platform === 'win32') {\n return process.env.USERPROFILE || process.env.HOMEDRIVE + process.env.HOMEPATH || home || null;\n }\n\n if (process.platform === 'darwin') {\n return home || (user ? '/Users/' + user : null);\n }\n\n if (process.platform === 'linux') {\n return home || (process.getuid() === 0 ? '/root' : (user ? '/home/' + user : null)); // eslint-disable-line no-extra-parens\n }\n\n return home || null;\n};\n","module.exports = function () {\n // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi\n var origPrepareStackTrace = Error.prepareStackTrace;\n Error.prepareStackTrace = function (_, stack) { return stack; };\n var stack = (new Error()).stack;\n Error.prepareStackTrace = origPrepareStackTrace;\n return stack[2].getFileName();\n};\n","'use strict';\n\nvar isWindows = process.platform === 'win32';\n\n// Regex to split a windows path into into [dir, root, basename, name, ext]\nvar splitWindowsRe =\n /^(((?:[a-zA-Z]:|[\\\\\\/]{2}[^\\\\\\/]+[\\\\\\/]+[^\\\\\\/]+)?[\\\\\\/]?)(?:[^\\\\\\/]*[\\\\\\/])*)((\\.{1,2}|[^\\\\\\/]+?|)(\\.[^.\\/\\\\]*|))[\\\\\\/]*$/;\n\nvar win32 = {};\n\nfunction win32SplitPath(filename) {\n return splitWindowsRe.exec(filename).slice(1);\n}\n\nwin32.parse = function(pathString) {\n if (typeof pathString !== 'string') {\n throw new TypeError(\n \"Parameter 'pathString' must be a string, not \" + typeof pathString\n );\n }\n var allParts = win32SplitPath(pathString);\n if (!allParts || allParts.length !== 5) {\n throw new TypeError(\"Invalid path '\" + pathString + \"'\");\n }\n return {\n root: allParts[1],\n dir: allParts[0] === allParts[1] ? allParts[0] : allParts[0].slice(0, -1),\n base: allParts[2],\n ext: allParts[4],\n name: allParts[3]\n };\n};\n\n\n\n// Split a filename into [dir, root, basename, name, ext], unix version\n// 'root' is just a slash, or nothing.\nvar splitPathRe =\n /^((\\/?)(?:[^\\/]*\\/)*)((\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))[\\/]*$/;\nvar posix = {};\n\n\nfunction posixSplitPath(filename) {\n return splitPathRe.exec(filename).slice(1);\n}\n\n\nposix.parse = function(pathString) {\n if (typeof pathString !== 'string') {\n throw new TypeError(\n \"Parameter 'pathString' must be a string, not \" + typeof pathString\n );\n }\n var allParts = posixSplitPath(pathString);\n if (!allParts || allParts.length !== 5) {\n throw new TypeError(\"Invalid path '\" + pathString + \"'\");\n }\n \n return {\n root: allParts[1],\n dir: allParts[0].slice(0, -1),\n base: allParts[2],\n ext: allParts[4],\n name: allParts[3],\n };\n};\n\n\nif (isWindows)\n module.exports = win32.parse;\nelse /* posix */\n module.exports = posix.parse;\n\nmodule.exports.posix = posix.parse;\nmodule.exports.win32 = win32.parse;\n","var path = require('path');\nvar parse = path.parse || require('path-parse'); // eslint-disable-line global-require\n\nvar getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {\n var prefix = '/';\n if ((/^([A-Za-z]:)/).test(absoluteStart)) {\n prefix = '';\n } else if ((/^\\\\\\\\/).test(absoluteStart)) {\n prefix = '\\\\\\\\';\n }\n\n var paths = [absoluteStart];\n var parsed = parse(absoluteStart);\n while (parsed.dir !== paths[paths.length - 1]) {\n paths.push(parsed.dir);\n parsed = parse(parsed.dir);\n }\n\n return paths.reduce(function (dirs, aPath) {\n return dirs.concat(modules.map(function (moduleDir) {\n return path.resolve(prefix, aPath, moduleDir);\n }));\n }, []);\n};\n\nmodule.exports = function nodeModulesPaths(start, opts, request) {\n var modules = opts && opts.moduleDirectory\n ? [].concat(opts.moduleDirectory)\n : ['node_modules'];\n\n if (opts && typeof opts.paths === 'function') {\n return opts.paths(\n request,\n start,\n function () { return getNodeModulesDirs(start, modules); },\n opts\n );\n }\n\n var dirs = getNodeModulesDirs(start, modules);\n return opts && opts.paths ? dirs.concat(opts.paths) : dirs;\n};\n","module.exports = function (x, opts) {\n /**\n * This file is purposefully a passthrough. It's expected that third-party\n * environments will override it at runtime in order to inject special logic\n * into `resolve` (by manipulating the options). One such example is the PnP\n * code path in Yarn.\n */\n\n return opts || {};\n};\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n var arr = [];\n\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n\n return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\n\nvar joiny = function (arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n\n };\n\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = require('function-bind');\n\n/** @type {import('.')} */\nmodule.exports = bind.call(call, $hasOwn);\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar hasOwn = require('hasown');\n\nfunction specifierIncluded(current, specifier) {\n\tvar nodeParts = current.split('.');\n\tvar parts = specifier.split(' ');\n\tvar op = parts.length > 1 ? parts[0] : '=';\n\tvar versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');\n\n\tfor (var i = 0; i < 3; ++i) {\n\t\tvar cur = parseInt(nodeParts[i] || 0, 10);\n\t\tvar ver = parseInt(versionParts[i] || 0, 10);\n\t\tif (cur === ver) {\n\t\t\tcontinue; // eslint-disable-line no-restricted-syntax, no-continue\n\t\t}\n\t\tif (op === '<') {\n\t\t\treturn cur < ver;\n\t\t}\n\t\tif (op === '>=') {\n\t\t\treturn cur >= ver;\n\t\t}\n\t\treturn false;\n\t}\n\treturn op === '>=';\n}\n\nfunction matchesRange(current, range) {\n\tvar specifiers = range.split(/ ?&& ?/);\n\tif (specifiers.length === 0) {\n\t\treturn false;\n\t}\n\tfor (var i = 0; i < specifiers.length; ++i) {\n\t\tif (!specifierIncluded(current, specifiers[i])) {\n\t\t\treturn false;\n\t\t}\n\t}\n\treturn true;\n}\n\nfunction versionIncluded(nodeVersion, specifierValue) {\n\tif (typeof specifierValue === 'boolean') {\n\t\treturn specifierValue;\n\t}\n\n\tvar current = typeof nodeVersion === 'undefined'\n\t\t? process.versions && process.versions.node\n\t\t: nodeVersion;\n\n\tif (typeof current !== 'string') {\n\t\tthrow new TypeError(typeof nodeVersion === 'undefined' ? 'Unable to determine current node version' : 'If provided, a valid node version is required');\n\t}\n\n\tif (specifierValue && typeof specifierValue === 'object') {\n\t\tfor (var i = 0; i < specifierValue.length; ++i) {\n\t\t\tif (matchesRange(current, specifierValue[i])) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}\n\treturn matchesRange(current, specifierValue);\n}\n\nvar data = require('./core.json');\n\nmodule.exports = function isCore(x, nodeVersion) {\n\treturn hasOwn(data, x) && versionIncluded(nodeVersion, data[x]);\n};\n","var fs = require('fs');\nvar getHomedir = require('./homedir');\nvar path = require('path');\nvar caller = require('./caller');\nvar nodeModulesPaths = require('./node-modules-paths');\nvar normalizeOptions = require('./normalize-options');\nvar isCore = require('is-core-module');\n\nvar realpathFS = process.platform !== 'win32' && fs.realpath && typeof fs.realpath.native === 'function' ? fs.realpath.native : fs.realpath;\n\nvar homedir = getHomedir();\nvar defaultPaths = function () {\n return [\n path.join(homedir, '.node_modules'),\n path.join(homedir, '.node_libraries')\n ];\n};\n\nvar defaultIsFile = function isFile(file, cb) {\n fs.stat(file, function (err, stat) {\n if (!err) {\n return cb(null, stat.isFile() || stat.isFIFO());\n }\n if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);\n return cb(err);\n });\n};\n\nvar defaultIsDir = function isDirectory(dir, cb) {\n fs.stat(dir, function (err, stat) {\n if (!err) {\n return cb(null, stat.isDirectory());\n }\n if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);\n return cb(err);\n });\n};\n\nvar defaultRealpath = function realpath(x, cb) {\n realpathFS(x, function (realpathErr, realPath) {\n if (realpathErr && realpathErr.code !== 'ENOENT') cb(realpathErr);\n else cb(null, realpathErr ? x : realPath);\n });\n};\n\nvar maybeRealpath = function maybeRealpath(realpath, x, opts, cb) {\n if (opts && opts.preserveSymlinks === false) {\n realpath(x, cb);\n } else {\n cb(null, x);\n }\n};\n\nvar defaultReadPackage = function defaultReadPackage(readFile, pkgfile, cb) {\n readFile(pkgfile, function (readFileErr, body) {\n if (readFileErr) cb(readFileErr);\n else {\n try {\n var pkg = JSON.parse(body);\n cb(null, pkg);\n } catch (jsonErr) {\n cb(null);\n }\n }\n });\n};\n\nvar getPackageCandidates = function getPackageCandidates(x, start, opts) {\n var dirs = nodeModulesPaths(start, opts, x);\n for (var i = 0; i < dirs.length; i++) {\n dirs[i] = path.join(dirs[i], x);\n }\n return dirs;\n};\n\nmodule.exports = function resolve(x, options, callback) {\n var cb = callback;\n var opts = options;\n if (typeof options === 'function') {\n cb = opts;\n opts = {};\n }\n if (typeof x !== 'string') {\n var err = new TypeError('Path must be a string.');\n return process.nextTick(function () {\n cb(err);\n });\n }\n\n opts = normalizeOptions(x, opts);\n\n var isFile = opts.isFile || defaultIsFile;\n var isDirectory = opts.isDirectory || defaultIsDir;\n var readFile = opts.readFile || fs.readFile;\n var realpath = opts.realpath || defaultRealpath;\n var readPackage = opts.readPackage || defaultReadPackage;\n if (opts.readFile && opts.readPackage) {\n var conflictErr = new TypeError('`readFile` and `readPackage` are mutually exclusive.');\n return process.nextTick(function () {\n cb(conflictErr);\n });\n }\n var packageIterator = opts.packageIterator;\n\n var extensions = opts.extensions || ['.js'];\n var includeCoreModules = opts.includeCoreModules !== false;\n var basedir = opts.basedir || path.dirname(caller());\n var parent = opts.filename || basedir;\n\n opts.paths = opts.paths || defaultPaths();\n\n // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory\n var absoluteStart = path.resolve(basedir);\n\n maybeRealpath(\n realpath,\n absoluteStart,\n opts,\n function (err, realStart) {\n if (err) cb(err);\n else init(realStart);\n }\n );\n\n var res;\n function init(basedir) {\n if ((/^(?:\\.\\.?(?:\\/|$)|\\/|([A-Za-z]:)?[/\\\\])/).test(x)) {\n res = path.resolve(basedir, x);\n if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';\n if ((/\\/$/).test(x) && res === basedir) {\n loadAsDirectory(res, opts.package, onfile);\n } else loadAsFile(res, opts.package, onfile);\n } else if (includeCoreModules && isCore(x)) {\n return cb(null, x);\n } else loadNodeModules(x, basedir, function (err, n, pkg) {\n if (err) cb(err);\n else if (n) {\n return maybeRealpath(realpath, n, opts, function (err, realN) {\n if (err) {\n cb(err);\n } else {\n cb(null, realN, pkg);\n }\n });\n } else {\n var moduleError = new Error(\"Cannot find module '\" + x + \"' from '\" + parent + \"'\");\n moduleError.code = 'MODULE_NOT_FOUND';\n cb(moduleError);\n }\n });\n }\n\n function onfile(err, m, pkg) {\n if (err) cb(err);\n else if (m) cb(null, m, pkg);\n else loadAsDirectory(res, function (err, d, pkg) {\n if (err) cb(err);\n else if (d) {\n maybeRealpath(realpath, d, opts, function (err, realD) {\n if (err) {\n cb(err);\n } else {\n cb(null, realD, pkg);\n }\n });\n } else {\n var moduleError = new Error(\"Cannot find module '\" + x + \"' from '\" + parent + \"'\");\n moduleError.code = 'MODULE_NOT_FOUND';\n cb(moduleError);\n }\n });\n }\n\n function loadAsFile(x, thePackage, callback) {\n var loadAsFilePackage = thePackage;\n var cb = callback;\n if (typeof loadAsFilePackage === 'function') {\n cb = loadAsFilePackage;\n loadAsFilePackage = undefined;\n }\n\n var exts = [''].concat(extensions);\n load(exts, x, loadAsFilePackage);\n\n function load(exts, x, loadPackage) {\n if (exts.length === 0) return cb(null, undefined, loadPackage);\n var file = x + exts[0];\n\n var pkg = loadPackage;\n if (pkg) onpkg(null, pkg);\n else loadpkg(path.dirname(file), onpkg);\n\n function onpkg(err, pkg_, dir) {\n pkg = pkg_;\n if (err) return cb(err);\n if (dir && pkg && opts.pathFilter) {\n var rfile = path.relative(dir, file);\n var rel = rfile.slice(0, rfile.length - exts[0].length);\n var r = opts.pathFilter(pkg, x, rel);\n if (r) return load(\n [''].concat(extensions.slice()),\n path.resolve(dir, r),\n pkg\n );\n }\n isFile(file, onex);\n }\n function onex(err, ex) {\n if (err) return cb(err);\n if (ex) return cb(null, file, pkg);\n load(exts.slice(1), x, pkg);\n }\n }\n }\n\n function loadpkg(dir, cb) {\n if (dir === '' || dir === '/') return cb(null);\n if (process.platform === 'win32' && (/^\\w:[/\\\\]*$/).test(dir)) {\n return cb(null);\n }\n if ((/[/\\\\]node_modules[/\\\\]*$/).test(dir)) return cb(null);\n\n maybeRealpath(realpath, dir, opts, function (unwrapErr, pkgdir) {\n if (unwrapErr) return loadpkg(path.dirname(dir), cb);\n var pkgfile = path.join(pkgdir, 'package.json');\n isFile(pkgfile, function (err, ex) {\n // on err, ex is false\n if (!ex) return loadpkg(path.dirname(dir), cb);\n\n readPackage(readFile, pkgfile, function (err, pkgParam) {\n if (err) cb(err);\n\n var pkg = pkgParam;\n\n if (pkg && opts.packageFilter) {\n pkg = opts.packageFilter(pkg, pkgfile);\n }\n cb(null, pkg, dir);\n });\n });\n });\n }\n\n function loadAsDirectory(x, loadAsDirectoryPackage, callback) {\n var cb = callback;\n var fpkg = loadAsDirectoryPackage;\n if (typeof fpkg === 'function') {\n cb = fpkg;\n fpkg = opts.package;\n }\n\n maybeRealpath(realpath, x, opts, function (unwrapErr, pkgdir) {\n if (unwrapErr) return cb(unwrapErr);\n var pkgfile = path.join(pkgdir, 'package.json');\n isFile(pkgfile, function (err, ex) {\n if (err) return cb(err);\n if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb);\n\n readPackage(readFile, pkgfile, function (err, pkgParam) {\n if (err) return cb(err);\n\n var pkg = pkgParam;\n\n if (pkg && opts.packageFilter) {\n pkg = opts.packageFilter(pkg, pkgfile);\n }\n\n if (pkg && pkg.main) {\n if (typeof pkg.main !== 'string') {\n var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');\n mainError.code = 'INVALID_PACKAGE_MAIN';\n return cb(mainError);\n }\n if (pkg.main === '.' || pkg.main === './') {\n pkg.main = 'index';\n }\n loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) {\n if (err) return cb(err);\n if (m) return cb(null, m, pkg);\n if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb);\n\n var dir = path.resolve(x, pkg.main);\n loadAsDirectory(dir, pkg, function (err, n, pkg) {\n if (err) return cb(err);\n if (n) return cb(null, n, pkg);\n loadAsFile(path.join(x, 'index'), pkg, cb);\n });\n });\n return;\n }\n\n loadAsFile(path.join(x, '/index'), pkg, cb);\n });\n });\n });\n }\n\n function processDirs(cb, dirs) {\n if (dirs.length === 0) return cb(null, undefined);\n var dir = dirs[0];\n\n isDirectory(path.dirname(dir), isdir);\n\n function isdir(err, isdir) {\n if (err) return cb(err);\n if (!isdir) return processDirs(cb, dirs.slice(1));\n loadAsFile(dir, opts.package, onfile);\n }\n\n function onfile(err, m, pkg) {\n if (err) return cb(err);\n if (m) return cb(null, m, pkg);\n loadAsDirectory(dir, opts.package, ondir);\n }\n\n function ondir(err, n, pkg) {\n if (err) return cb(err);\n if (n) return cb(null, n, pkg);\n processDirs(cb, dirs.slice(1));\n }\n }\n function loadNodeModules(x, start, cb) {\n var thunk = function () { return getPackageCandidates(x, start, opts); };\n processDirs(\n cb,\n packageIterator ? packageIterator(x, start, thunk, opts) : thunk()\n );\n }\n};\n","var isCore = require('is-core-module');\nvar fs = require('fs');\nvar path = require('path');\nvar getHomedir = require('./homedir');\nvar caller = require('./caller');\nvar nodeModulesPaths = require('./node-modules-paths');\nvar normalizeOptions = require('./normalize-options');\n\nvar realpathFS = process.platform !== 'win32' && fs.realpathSync && typeof fs.realpathSync.native === 'function' ? fs.realpathSync.native : fs.realpathSync;\n\nvar homedir = getHomedir();\nvar defaultPaths = function () {\n return [\n path.join(homedir, '.node_modules'),\n path.join(homedir, '.node_libraries')\n ];\n};\n\nvar defaultIsFile = function isFile(file) {\n try {\n var stat = fs.statSync(file, { throwIfNoEntry: false });\n } catch (e) {\n if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;\n throw e;\n }\n return !!stat && (stat.isFile() || stat.isFIFO());\n};\n\nvar defaultIsDir = function isDirectory(dir) {\n try {\n var stat = fs.statSync(dir, { throwIfNoEntry: false });\n } catch (e) {\n if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;\n throw e;\n }\n return !!stat && stat.isDirectory();\n};\n\nvar defaultRealpathSync = function realpathSync(x) {\n try {\n return realpathFS(x);\n } catch (realpathErr) {\n if (realpathErr.code !== 'ENOENT') {\n throw realpathErr;\n }\n }\n return x;\n};\n\nvar maybeRealpathSync = function maybeRealpathSync(realpathSync, x, opts) {\n if (opts && opts.preserveSymlinks === false) {\n return realpathSync(x);\n }\n return x;\n};\n\nvar defaultReadPackageSync = function defaultReadPackageSync(readFileSync, pkgfile) {\n var body = readFileSync(pkgfile);\n try {\n var pkg = JSON.parse(body);\n return pkg;\n } catch (jsonErr) {}\n};\n\nvar getPackageCandidates = function getPackageCandidates(x, start, opts) {\n var dirs = nodeModulesPaths(start, opts, x);\n for (var i = 0; i < dirs.length; i++) {\n dirs[i] = path.join(dirs[i], x);\n }\n return dirs;\n};\n\nmodule.exports = function resolveSync(x, options) {\n if (typeof x !== 'string') {\n throw new TypeError('Path must be a string.');\n }\n var opts = normalizeOptions(x, options);\n\n var isFile = opts.isFile || defaultIsFile;\n var readFileSync = opts.readFileSync || fs.readFileSync;\n var isDirectory = opts.isDirectory || defaultIsDir;\n var realpathSync = opts.realpathSync || defaultRealpathSync;\n var readPackageSync = opts.readPackageSync || defaultReadPackageSync;\n if (opts.readFileSync && opts.readPackageSync) {\n throw new TypeError('`readFileSync` and `readPackageSync` are mutually exclusive.');\n }\n var packageIterator = opts.packageIterator;\n\n var extensions = opts.extensions || ['.js'];\n var includeCoreModules = opts.includeCoreModules !== false;\n var basedir = opts.basedir || path.dirname(caller());\n var parent = opts.filename || basedir;\n\n opts.paths = opts.paths || defaultPaths();\n\n // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory\n var absoluteStart = maybeRealpathSync(realpathSync, path.resolve(basedir), opts);\n\n if ((/^(?:\\.\\.?(?:\\/|$)|\\/|([A-Za-z]:)?[/\\\\])/).test(x)) {\n var res = path.resolve(absoluteStart, x);\n if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';\n var m = loadAsFileSync(res) || loadAsDirectorySync(res);\n if (m) return maybeRealpathSync(realpathSync, m, opts);\n } else if (includeCoreModules && isCore(x)) {\n return x;\n } else {\n var n = loadNodeModulesSync(x, absoluteStart);\n if (n) return maybeRealpathSync(realpathSync, n, opts);\n }\n\n var err = new Error(\"Cannot find module '\" + x + \"' from '\" + parent + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n\n function loadAsFileSync(x) {\n var pkg = loadpkg(path.dirname(x));\n\n if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {\n var rfile = path.relative(pkg.dir, x);\n var r = opts.pathFilter(pkg.pkg, x, rfile);\n if (r) {\n x = path.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign\n }\n }\n\n if (isFile(x)) {\n return x;\n }\n\n for (var i = 0; i < extensions.length; i++) {\n var file = x + extensions[i];\n if (isFile(file)) {\n return file;\n }\n }\n }\n\n function loadpkg(dir) {\n if (dir === '' || dir === '/') return;\n if (process.platform === 'win32' && (/^\\w:[/\\\\]*$/).test(dir)) {\n return;\n }\n if ((/[/\\\\]node_modules[/\\\\]*$/).test(dir)) return;\n\n var pkgfile = path.join(maybeRealpathSync(realpathSync, dir, opts), 'package.json');\n\n if (!isFile(pkgfile)) {\n return loadpkg(path.dirname(dir));\n }\n\n var pkg = readPackageSync(readFileSync, pkgfile);\n\n if (pkg && opts.packageFilter) {\n // v2 will pass pkgfile\n pkg = opts.packageFilter(pkg, /*pkgfile,*/ dir); // eslint-disable-line spaced-comment\n }\n\n return { pkg: pkg, dir: dir };\n }\n\n function loadAsDirectorySync(x) {\n var pkgfile = path.join(maybeRealpathSync(realpathSync, x, opts), '/package.json');\n if (isFile(pkgfile)) {\n try {\n var pkg = readPackageSync(readFileSync, pkgfile);\n } catch (e) {}\n\n if (pkg && opts.packageFilter) {\n // v2 will pass pkgfile\n pkg = opts.packageFilter(pkg, /*pkgfile,*/ x); // eslint-disable-line spaced-comment\n }\n\n if (pkg && pkg.main) {\n if (typeof pkg.main !== 'string') {\n var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');\n mainError.code = 'INVALID_PACKAGE_MAIN';\n throw mainError;\n }\n if (pkg.main === '.' || pkg.main === './') {\n pkg.main = 'index';\n }\n try {\n var m = loadAsFileSync(path.resolve(x, pkg.main));\n if (m) return m;\n var n = loadAsDirectorySync(path.resolve(x, pkg.main));\n if (n) return n;\n } catch (e) {}\n }\n }\n\n return loadAsFileSync(path.join(x, '/index'));\n }\n\n function loadNodeModulesSync(x, start) {\n var thunk = function () { return getPackageCandidates(x, start, opts); };\n var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk();\n\n for (var i = 0; i < dirs.length; i++) {\n var dir = dirs[i];\n if (isDirectory(path.dirname(dir))) {\n var m = loadAsFileSync(dir);\n if (m) return m;\n var n = loadAsDirectorySync(dir);\n if (n) return n;\n }\n }\n }\n};\n","var async = require('./lib/async');\nasync.core = require('./lib/core');\nasync.isCore = require('./lib/is-core');\nasync.sync = require('./lib/sync');\n\nmodule.exports = async;\n","'use strict';\n\nvar isCoreModule = require('is-core-module');\nvar data = require('./core.json');\n\nvar core = {};\nfor (var mod in data) { // eslint-disable-line no-restricted-syntax\n if (Object.prototype.hasOwnProperty.call(data, mod)) {\n core[mod] = isCoreModule(mod);\n }\n}\nmodule.exports = core;\n","var isCoreModule = require('is-core-module');\n\nmodule.exports = function isCore(x) {\n return isCoreModule(x);\n};\n","'use strict'\n\nconst path = require('path')\nconst Module = require('module')\nconst debug = require('debug')('require-in-the-middle')\nconst moduleDetailsFromPath = require('module-details-from-path')\n\n// Using the default export is discouraged, but kept for backward compatibility.\n// Use this instead:\n// const { Hook } = require('require-in-the-middle')\nmodule.exports = Hook\nmodule.exports.Hook = Hook\n\nlet builtinModules // Set<string>\n\n/**\n * Is the given module a \"core\" module?\n * https://nodejs.org/api/modules.html#core-modules\n *\n * @type {(moduleName: string) => boolean}\n */\nlet isCore\nif (Module.isBuiltin) { // Added in node v18.6.0, v16.17.0\n isCore = Module.isBuiltin\n} else if (Module.builtinModules) { // Added in node v9.3.0, v8.10.0, v6.13.0\n isCore = moduleName => {\n if (moduleName.startsWith('node:')) {\n return true\n }\n\n if (builtinModules === undefined) {\n builtinModules = new Set(Module.builtinModules)\n }\n\n return builtinModules.has(moduleName)\n }\n} else {\n const _resolve = require('resolve')\n const [major, minor] = process.versions.node.split('.').map(Number)\n if (major === 8 && minor < 8) {\n // For node versions `[8.0, 8.8)` the \"http2\" module was built-in but\n // behind the `--expose-http2` flag. `resolve` only considers unflagged\n // modules to be core: https://github.com/browserify/resolve/issues/139\n // However, for `ExportsCache` to work for \"http2\" we need it to be\n // considered core.\n isCore = moduleName => {\n if (moduleName === 'http2') {\n return true\n }\n // Prefer `resolve.core` lookup to `resolve.isCore(moduleName)` because\n // the latter is doing version range matches for every call.\n return !!_resolve.core[moduleName]\n }\n } else {\n isCore = moduleName => {\n // Prefer `resolve.core` lookup to `resolve.isCore(moduleName)` because\n // the latter is doing version range matches for every call.\n return !!_resolve.core[moduleName]\n }\n }\n}\n\nlet _resolve\n\nfunction resolve (moduleName, basedir) {\n // Feature detection: This property was added in Node.js 8.9.0, the same time\n // as the `paths` options argument was added to the `require.resolve` function,\n // which is the one we want\n if (!_resolve) {\n // require.resolve might be undefined when using Node SEA mode:\n // https://nodejs.org/api/single-executable-applications.html\n // Also see https://github.com/nodejs/require-in-the-middle/issues/105\n if (require.resolve && require.resolve.paths) {\n _resolve = function (moduleName, basedir) {\n return require.resolve(moduleName, { paths: [basedir] })\n }\n } else {\n const resolve = require('resolve')\n _resolve = function (moduleName, basedir) {\n return resolve.sync(moduleName, { basedir })\n }\n }\n }\n\n return _resolve(moduleName, basedir)\n}\n\n// 'foo/bar.js' or 'foo/bar/index.js' => 'foo/bar'\nconst normalize = /([/\\\\]index)?(\\.js)?$/\n\n// Cache `onrequire`-patched exports for modules.\n//\n// Exports for built-in (a.k.a. \"core\") modules are stored in an internal Map.\n//\n// Exports for non-core modules are stored on a private field on the `Module`\n// object in `require.cache`. This allows users to delete from `require.cache`\n// to trigger a re-load (and re-run of the hook's `onrequire`) of a module the\n// next time it is required.\n// https://nodejs.org/docs/latest/api/all.html#all_modules_requirecache\n//\n// In some special cases -- e.g. some other `require()` hook swapping out\n// `Module._cache` like `@babel/register` -- a non-core module won't be in\n// `require.cache`. In that case this falls back to caching on the internal Map.\nclass ExportsCache {\n constructor () {\n this._localCache = new Map() // <module filename or id> -> <exports>\n this._kRitmExports = Symbol('RitmExports')\n }\n\n has (filename, isBuiltin) {\n if (this._localCache.has(filename)) {\n return true\n } else if (!isBuiltin) {\n const mod = require.cache[filename]\n return !!(mod && this._kRitmExports in mod)\n } else {\n return false\n }\n }\n\n get (filename, isBuiltin) {\n const cachedExports = this._localCache.get(filename)\n if (cachedExports !== undefined) {\n return cachedExports\n } else if (!isBuiltin) {\n const mod = require.cache[filename]\n return (mod && mod[this._kRitmExports])\n }\n }\n\n set (filename, exports, isBuiltin) {\n if (isBuiltin) {\n this._localCache.set(filename, exports)\n } else if (filename in require.cache) {\n require.cache[filename][this._kRitmExports] = exports\n } else {\n debug('non-core module is unexpectedly not in require.cache: \"%s\"', filename)\n this._localCache.set(filename, exports)\n }\n }\n}\n\nfunction Hook (modules, options, onrequire) {\n if ((this instanceof Hook) === false) return new Hook(modules, options, onrequire)\n if (typeof modules === 'function') {\n onrequire = modules\n modules = null\n options = null\n } else if (typeof options === 'function') {\n onrequire = options\n options = null\n }\n\n if (typeof Module._resolveFilename !== 'function') {\n console.error('Error: Expected Module._resolveFilename to be a function (was: %s) - aborting!', typeof Module._resolveFilename)\n console.error('Please report this error as an issue related to Node.js %s at %s', process.version, require('./package.json').bugs.url)\n return\n }\n\n this._cache = new ExportsCache()\n\n this._unhooked = false\n this._origRequire = Module.prototype.require\n\n const self = this\n const patching = new Set()\n const internals = options ? options.internals === true : false\n const hasWhitelist = Array.isArray(modules)\n\n debug('registering require hook')\n\n this._require = Module.prototype.require = function (id) {\n if (self._unhooked === true) {\n // if the patched require function could not be removed because\n // someone else patched it after it was patched here, we just\n // abort and pass the request onwards to the original require\n debug('ignoring require call - module is soft-unhooked')\n return self._origRequire.apply(this, arguments)\n }\n\n return patchedRequire.call(this, arguments, false)\n }\n\n if (typeof process.getBuiltinModule === 'function') {\n this._origGetBuiltinModule = process.getBuiltinModule\n this._getBuiltinModule = process.getBuiltinModule = function (id) {\n if (self._unhooked === true) {\n // if the patched process.getBuiltinModule function could not be removed because\n // someone else patched it after it was patched here, we just abort and pass the\n // request onwards to the original process.getBuiltinModule\n debug('ignoring process.getBuiltinModule call - module is soft-unhooked')\n return self._origGetBuiltinModule.apply(this, arguments)\n }\n\n return patchedRequire.call(this, arguments, true)\n }\n }\n\n // Preserve the original require/process.getBuiltinModule arguments in `args`\n function patchedRequire (args, coreOnly) {\n const id = args[0]\n const core = isCore(id)\n let filename // the string used for caching\n if (core) {\n filename = id\n // If this is a builtin module that can be identified both as 'foo' and\n // 'node:foo', then prefer 'foo' as the caching key.\n if (id.startsWith('node:')) {\n const idWithoutPrefix = id.slice(5)\n if (isCore(idWithoutPrefix)) {\n filename = idWithoutPrefix\n }\n }\n } else if (coreOnly) {\n // `coreOnly` is `true` if this was a call to `process.getBuiltinModule`, in which case\n // we don't want to return anything if the requested `id` isn't a core module. Falling\n // back to default behaviour, which at the time of this wrting is simply returning `undefined`\n debug('call to process.getBuiltinModule with unknown built-in id')\n return self._origGetBuiltinModule.apply(this, args)\n } else {\n try {\n filename = Module._resolveFilename(id, this)\n } catch (resolveErr) {\n // If someone *else* monkey-patches before this monkey-patch, then that\n // code might expect `require(someId)` to get through so it can be\n // handled, even if `someId` cannot be resolved to a filename. In this\n // case, instead of throwing we defer to the underlying `require`.\n //\n // For example the Azure Functions Node.js worker module does this,\n // where `@azure/functions-core` resolves to an internal object.\n // https://github.com/Azure/azure-functions-nodejs-worker/blob/v3.5.2/src/setupCoreModule.ts#L46-L54\n debug('Module._resolveFilename(\"%s\") threw %j, calling original Module.require', id, resolveErr.message)\n return self._origRequire.apply(this, args)\n }\n }\n\n let moduleName, basedir\n\n debug('processing %s module require(\\'%s\\'): %s', core === true ? 'core' : 'non-core', id, filename)\n\n // return known patched modules immediately\n if (self._cache.has(filename, core) === true) {\n debug('returning already patched cached module: %s', filename)\n return self._cache.get(filename, core)\n }\n\n // Check if this module has a patcher in-progress already.\n // Otherwise, mark this module as patching in-progress.\n const isPatching = patching.has(filename)\n if (isPatching === false) {\n patching.add(filename)\n }\n\n const exports = coreOnly\n ? self._origGetBuiltinModule.apply(this, args)\n : self._origRequire.apply(this, args)\n\n // If it's already patched, just return it as-is.\n if (isPatching === true) {\n debug('module is in the process of being patched already - ignoring: %s', filename)\n return exports\n }\n\n // The module has already been loaded,\n // so the patching mark can be cleaned up.\n patching.delete(filename)\n\n if (core === true) {\n if (hasWhitelist === true && modules.includes(filename) === false) {\n debug('ignoring core module not on whitelist: %s', filename)\n return exports // abort if module name isn't on whitelist\n }\n moduleName = filename\n } else if (hasWhitelist === true && modules.includes(filename)) {\n // whitelist includes the absolute path to the file including extension\n const parsedPath = path.parse(filename)\n moduleName = parsedPath.name\n basedir = parsedPath.dir\n } else {\n const stat = moduleDetailsFromPath(filename)\n if (stat === undefined) {\n debug('could not parse filename: %s', filename)\n return exports // abort if filename could not be parsed\n }\n moduleName = stat.name\n basedir = stat.basedir\n\n // Ex: require('foo/lib/../bar.js')\n // moduleName = 'foo'\n // fullModuleName = 'foo/bar'\n const fullModuleName = resolveModuleName(stat)\n\n debug('resolved filename to module: %s (id: %s, resolved: %s, basedir: %s)', moduleName, id, fullModuleName, basedir)\n\n let matchFound = false\n if (hasWhitelist) {\n if (!id.startsWith('.') && modules.includes(id)) {\n // Not starting with '.' means `id` is identifying a module path,\n // as opposed to a local file path. (Note: I'm not sure about\n // absolute paths, but those are handled above.)\n // If this `id` is in `modules`, then this could be a match to an\n // package \"exports\" entry point that wouldn't otherwise match below.\n moduleName = id\n matchFound = true\n }\n\n // abort if module name isn't on whitelist\n if (!modules.includes(moduleName) && !modules.includes(fullModuleName)) {\n return exports\n }\n\n if (modules.includes(fullModuleName) && fullModuleName !== moduleName) {\n // if we get to this point, it means that we're requiring a whitelisted sub-module\n moduleName = fullModuleName\n matchFound = true\n }\n }\n\n if (!matchFound) {\n // figure out if this is the main module file, or a file inside the module\n let res\n try {\n res = resolve(moduleName, basedir)\n } catch (e) {\n debug('could not resolve module: %s', moduleName)\n self._cache.set(filename, exports, core)\n return exports // abort if module could not be resolved (e.g. no main in package.json and no index.js file)\n }\n\n if (res !== filename) {\n // this is a module-internal file\n if (internals === true) {\n // use the module-relative path to the file, prefixed by original module name\n moduleName = moduleName + path.sep + path.relative(basedir, filename)\n debug('preparing to process require of internal file: %s', moduleName)\n } else {\n debug('ignoring require of non-main module file: %s', res)\n self._cache.set(filename, exports, core)\n return exports // abort if not main module file\n }\n }\n }\n }\n\n // ensure that the cache entry is assigned a value before calling\n // onrequire, in case calling onrequire requires the same module.\n self._cache.set(filename, exports, core)\n debug('calling require hook: %s', moduleName)\n const patchedExports = onrequire(exports, moduleName, basedir)\n self._cache.set(filename, patchedExports, core)\n\n debug('returning module: %s', moduleName)\n return patchedExports\n }\n}\n\nHook.prototype.unhook = function () {\n this._unhooked = true\n\n if (this._require === Module.prototype.require) {\n Module.prototype.require = this._origRequire\n debug('require unhook successful')\n } else {\n debug('require unhook unsuccessful')\n }\n\n if (process.getBuiltinModule !== undefined) {\n if (this._getBuiltinModule === process.getBuiltinModule) {\n process.getBuiltinModule = this._origGetBuiltinModule\n debug('process.getBuiltinModule unhook successful')\n } else {\n debug('process.getBuiltinModule unhook unsuccessful')\n }\n }\n}\n\nfunction resolveModuleName (stat) {\n const normalizedPath = path.sep !== '/' ? stat.path.split(path.sep).join('/') : stat.path\n return path.posix.join(stat.name, normalizedPath).replace(normalize, '')\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport const ModuleNameSeparator = '/';\n/**\n * Node in a `ModuleNameTrie`\n */\nclass ModuleNameTrieNode {\n hooks = [];\n children = new Map();\n}\n/**\n * Trie containing nodes that represent a part of a module name (i.e. the parts separated by forward slash)\n */\nexport class ModuleNameTrie {\n _trie = new ModuleNameTrieNode();\n _counter = 0;\n /**\n * Insert a module hook into the trie\n *\n * @param {Hooked} hook Hook\n */\n insert(hook) {\n let trieNode = this._trie;\n for (const moduleNamePart of hook.moduleName.split(ModuleNameSeparator)) {\n let nextNode = trieNode.children.get(moduleNamePart);\n if (!nextNode) {\n nextNode = new ModuleNameTrieNode();\n trieNode.children.set(moduleNamePart, nextNode);\n }\n trieNode = nextNode;\n }\n trieNode.hooks.push({ hook, insertedId: this._counter++ });\n }\n /**\n * Search for matching hooks in the trie\n *\n * @param {string} moduleName Module name\n * @param {boolean} maintainInsertionOrder Whether to return the results in insertion order\n * @param {boolean} fullOnly Whether to return only full matches\n * @returns {Hooked[]} Matching hooks\n */\n search(moduleName, { maintainInsertionOrder, fullOnly } = {}) {\n let trieNode = this._trie;\n const results = [];\n let foundFull = true;\n for (const moduleNamePart of moduleName.split(ModuleNameSeparator)) {\n const nextNode = trieNode.children.get(moduleNamePart);\n if (!nextNode) {\n foundFull = false;\n break;\n }\n if (!fullOnly) {\n results.push(...nextNode.hooks);\n }\n trieNode = nextNode;\n }\n if (fullOnly && foundFull) {\n results.push(...trieNode.hooks);\n }\n if (results.length === 0) {\n return [];\n }\n if (results.length === 1) {\n return [results[0].hook];\n }\n if (maintainInsertionOrder) {\n results.sort((a, b) => a.insertedId - b.insertedId);\n }\n return results.map(({ hook }) => hook);\n }\n}\n//# sourceMappingURL=ModuleNameTrie.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { Hook } from 'require-in-the-middle';\nimport * as path from 'path';\nimport { ModuleNameTrie, ModuleNameSeparator } from './ModuleNameTrie';\n/**\n * Whether Mocha is running in this process\n * Inspired by https://github.com/AndreasPizsa/detect-mocha\n *\n * @type {boolean}\n */\nconst isMocha = [\n 'afterEach',\n 'after',\n 'beforeEach',\n 'before',\n 'describe',\n 'it',\n].every(fn => {\n // @ts-expect-error TS7053: Element implicitly has an 'any' type\n return typeof global[fn] === 'function';\n});\n/**\n * Singleton class for `require-in-the-middle`\n * Allows instrumentation plugins to patch modules with only a single `require` patch\n * WARNING: Because this class will create its own `require-in-the-middle` (RITM) instance,\n * we should minimize the number of new instances of this class.\n * Multiple instances of `@opentelemetry/instrumentation` (e.g. multiple versions) in a single process\n * will result in multiple instances of RITM, which will have an impact\n * on the performance of instrumentation hooks being applied.\n */\nexport class RequireInTheMiddleSingleton {\n _moduleNameTrie = new ModuleNameTrie();\n static _instance;\n constructor() {\n this._initialize();\n }\n _initialize() {\n new Hook(\n // Intercept all `require` calls; we will filter the matching ones below\n null, { internals: true }, (exports, name, basedir) => {\n // For internal files on Windows, `name` will use backslash as the path separator\n const normalizedModuleName = normalizePathSeparators(name);\n const matches = this._moduleNameTrie.search(normalizedModuleName, {\n maintainInsertionOrder: true,\n // For core modules (e.g. `fs`), do not match on sub-paths (e.g. `fs/promises').\n // This matches the behavior of `require-in-the-middle`.\n // `basedir` is always `undefined` for core modules.\n fullOnly: basedir === undefined,\n });\n for (const { onRequire } of matches) {\n exports = onRequire(exports, name, basedir);\n }\n return exports;\n });\n }\n /**\n * Register a hook with `require-in-the-middle`\n *\n * @param {string} moduleName Module name\n * @param {OnRequireFn} onRequire Hook function\n * @returns {Hooked} Registered hook\n */\n register(moduleName, onRequire) {\n const hooked = { moduleName, onRequire };\n this._moduleNameTrie.insert(hooked);\n return hooked;\n }\n /**\n * Get the `RequireInTheMiddleSingleton` singleton\n *\n * @returns {RequireInTheMiddleSingleton} Singleton of `RequireInTheMiddleSingleton`\n */\n static getInstance() {\n // Mocha runs all test suites in the same process\n // This prevents test suites from sharing a singleton\n if (isMocha)\n return new RequireInTheMiddleSingleton();\n return (this._instance =\n this._instance ?? new RequireInTheMiddleSingleton());\n }\n}\n/**\n * Normalize the path separators to forward slash in a module name or path\n *\n * @param {string} moduleNameOrPath Module name or path\n * @returns {string} Normalized module name or path\n */\nfunction normalizePathSeparators(moduleNameOrPath) {\n return path.sep !== ModuleNameSeparator\n ? moduleNameOrPath.split(path.sep).join(ModuleNameSeparator)\n : moduleNameOrPath;\n}\n//# sourceMappingURL=RequireInTheMiddleSingleton.js.map","// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2.0 License.\n//\n// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2021 Datadog, Inc.\n\nconst importHooks = [] // TODO should this be a Set?\nconst setters = new WeakMap()\nconst getters = new WeakMap()\nconst specifiers = new Map()\nconst toHook = []\n\nconst proxyHandler = {\n set (target, name, value) {\n return setters.get(target)[name](value)\n },\n\n get (target, name) {\n if (name === Symbol.toStringTag) {\n return 'Module'\n }\n\n const getter = getters.get(target)[name]\n\n if (typeof getter === 'function') {\n return getter()\n }\n },\n\n defineProperty (target, property, descriptor) {\n if ((!('value' in descriptor))) {\n throw new Error('Getters/setters are not supported for exports property descriptors.')\n }\n\n return setters.get(target)[property](descriptor.value)\n }\n}\n\nfunction register (name, namespace, set, get, specifier) {\n specifiers.set(name, specifier)\n setters.set(namespace, set)\n getters.set(namespace, get)\n const proxy = new Proxy(namespace, proxyHandler)\n importHooks.forEach(hook => hook(name, proxy))\n toHook.push([name, proxy])\n}\n\nlet experimentalPatchInternals = false\n\nfunction getExperimentalPatchInternals () {\n return experimentalPatchInternals\n}\n\nfunction setExperimentalPatchInternals (value) {\n experimentalPatchInternals = value\n}\n\nexports.register = register\nexports.importHooks = importHooks\nexports.specifiers = specifiers\nexports.toHook = toHook\nexports.getExperimentalPatchInternals = getExperimentalPatchInternals\nexports.setExperimentalPatchInternals = setExperimentalPatchInternals\n","// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2.0 License.\n//\n// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2021 Datadog, Inc.\n\nconst path = require('path')\nconst parse = require('module-details-from-path')\nconst { fileURLToPath } = require('url')\nconst { MessageChannel } = require('worker_threads')\n\nconst {\n importHooks,\n specifiers,\n toHook,\n getExperimentalPatchInternals\n} = require('./lib/register')\n\nfunction addHook (hook) {\n importHooks.push(hook)\n toHook.forEach(([name, namespace]) => hook(name, namespace))\n}\n\nfunction removeHook (hook) {\n const index = importHooks.indexOf(hook)\n if (index > -1) {\n importHooks.splice(index, 1)\n }\n}\n\nfunction callHookFn (hookFn, namespace, name, baseDir) {\n const newDefault = hookFn(namespace, name, baseDir)\n if (newDefault && newDefault !== namespace) {\n namespace.default = newDefault\n }\n}\n\nlet sendModulesToLoader\n\n/**\n * EXPERIMENTAL\n * This feature is experimental and may change in minor versions.\n * **NOTE** This feature is incompatible with the {internals: true} Hook option.\n *\n * Creates a message channel with a port that can be used to add hooks to the\n * list of exclusively included modules.\n *\n * This can be used to only wrap modules that are Hook'ed, however modules need\n * to be hooked before they are imported.\n *\n * ```ts\n * import { register } from 'module'\n * import { Hook, createAddHookMessageChannel } from 'import-in-the-middle'\n *\n * const { registerOptions, waitForAllMessagesAcknowledged } = createAddHookMessageChannel()\n *\n * register('import-in-the-middle/hook.mjs', import.meta.url, registerOptions)\n *\n * Hook(['fs'], (exported, name, baseDir) => {\n * // Instrument the fs module\n * })\n *\n * // Ensure that the loader has acknowledged all the modules\n * // before we allow execution to continue\n * await waitForAllMessagesAcknowledged()\n * ```\n */\nfunction createAddHookMessageChannel () {\n const { port1, port2 } = new MessageChannel()\n let pendingAckCount = 0\n let resolveFn\n\n sendModulesToLoader = (modules) => {\n pendingAckCount++\n port1.postMessage(modules)\n }\n\n port1.on('message', () => {\n pendingAckCount--\n\n if (resolveFn && pendingAckCount <= 0) {\n resolveFn()\n }\n }).unref()\n\n function waitForAllMessagesAcknowledged () {\n // This timer is to prevent the process from exiting with code 13:\n // 13: Unsettled Top-Level Await.\n const timer = setInterval(() => { }, 1000)\n const promise = new Promise((resolve) => {\n resolveFn = resolve\n }).then(() => { clearInterval(timer) })\n\n if (pendingAckCount === 0) {\n resolveFn()\n }\n\n return promise\n }\n\n const addHookMessagePort = port2\n const registerOptions = { data: { addHookMessagePort, include: [] }, transferList: [addHookMessagePort] }\n\n return { registerOptions, addHookMessagePort, waitForAllMessagesAcknowledged }\n}\n\nfunction Hook (modules, options, hookFn) {\n if ((this instanceof Hook) === false) return new Hook(modules, options, hookFn)\n if (typeof modules === 'function') {\n hookFn = modules\n modules = null\n options = null\n } else if (typeof options === 'function') {\n hookFn = options\n options = null\n }\n const internals = options ? options.internals === true : false\n\n if (sendModulesToLoader && Array.isArray(modules)) {\n sendModulesToLoader(modules)\n }\n\n this._iitmHook = (name, namespace) => {\n const filename = name\n const isBuiltin = name.startsWith('node:')\n let baseDir\n\n if (isBuiltin) {\n name = name.replace(/^node:/, '')\n } else {\n if (name.startsWith('file://')) {\n try {\n name = fileURLToPath(name)\n } catch (e) {}\n }\n const details = parse(name)\n if (details) {\n name = details.name\n baseDir = details.basedir\n }\n }\n\n if (modules) {\n for (const moduleName of modules) {\n if (moduleName === name) {\n if (baseDir) {\n if (internals) {\n name = name + path.sep + path.relative(baseDir, fileURLToPath(filename))\n } else {\n if (!getExperimentalPatchInternals() && !baseDir.endsWith(specifiers.get(filename))) continue\n }\n }\n callHookFn(hookFn, namespace, name, baseDir)\n }\n }\n } else {\n callHookFn(hookFn, namespace, name, baseDir)\n }\n }\n\n addHook(this._iitmHook)\n}\n\nHook.prototype.unhook = function () {\n removeHook(this._iitmHook)\n}\n\nmodule.exports = Hook\nmodule.exports.Hook = Hook\nmodule.exports.addHook = addHook\nmodule.exports.removeHook = removeHook\nmodule.exports.createAddHookMessageChannel = createAddHookMessageChannel\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var SemconvStability;\n(function (SemconvStability) {\n /** Emit only stable semantic conventions. */\n SemconvStability[SemconvStability[\"STABLE\"] = 1] = \"STABLE\";\n /** Emit only old semantic conventions. */\n SemconvStability[SemconvStability[\"OLD\"] = 2] = \"OLD\";\n /** Emit both stable and old semantic conventions. */\n SemconvStability[SemconvStability[\"DUPLICATE\"] = 3] = \"DUPLICATE\";\n})(SemconvStability || (SemconvStability = {}));\n/**\n * Determine the appropriate semconv stability for the given namespace.\n *\n * This will parse the given string of comma-separated values (often\n * `process.env.OTEL_SEMCONV_STABILITY_OPT_IN`) looking for the `${namespace}`\n * or `${namespace}/dup` tokens. This is a pattern defined by a number of\n * non-normative semconv documents.\n *\n * For example:\n * - namespace 'http': https://opentelemetry.io/docs/specs/semconv/non-normative/http-migration/\n * - namespace 'database': https://opentelemetry.io/docs/specs/semconv/non-normative/database-migration/\n * - namespace 'k8s': https://opentelemetry.io/docs/specs/semconv/non-normative/k8s-migration/\n *\n * Usage:\n *\n * import {SemconvStability, semconvStabilityFromStr} from '@opentelemetry/instrumentation';\n *\n * export class FooInstrumentation extends InstrumentationBase<FooInstrumentationConfig> {\n * private _semconvStability: SemconvStability;\n * constructor(config: FooInstrumentationConfig = {}) {\n * super('@opentelemetry/instrumentation-foo', VERSION, config);\n *\n * // When supporting the OTEL_SEMCONV_STABILITY_OPT_IN envvar\n * this._semconvStability = semconvStabilityFromStr(\n * 'http',\n * process.env.OTEL_SEMCONV_STABILITY_OPT_IN\n * );\n *\n * // or when supporting a `semconvStabilityOptIn` config option (e.g. for\n * // the web where there are no envvars).\n * this._semconvStability = semconvStabilityFromStr(\n * 'http',\n * config?.semconvStabilityOptIn\n * );\n * }\n * }\n *\n * // Then, to apply semconv, use the following or similar:\n * if (this._semconvStability & SemconvStability.OLD) {\n * // ...\n * }\n * if (this._semconvStability & SemconvStability.STABLE) {\n * // ...\n * }\n *\n */\nexport function semconvStabilityFromStr(namespace, str) {\n let semconvStability = SemconvStability.OLD;\n // The same parsing of `str` as `getStringListFromEnv` from the core pkg.\n const entries = str\n ?.split(',')\n .map(v => v.trim())\n .filter(s => s !== '');\n for (const entry of entries ?? []) {\n if (entry.toLowerCase() === namespace + '/dup') {\n // DUPLICATE takes highest precedence.\n semconvStability = SemconvStability.DUPLICATE;\n break;\n }\n else if (entry.toLowerCase() === namespace) {\n semconvStability = SemconvStability.STABLE;\n }\n }\n return semconvStability;\n}\n//# sourceMappingURL=semconvStability.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var AttributeNames;\n(function (AttributeNames) {\n AttributeNames[\"DOCUMENT_LOAD\"] = \"documentLoad\";\n AttributeNames[\"DOCUMENT_FETCH\"] = \"documentFetch\";\n AttributeNames[\"RESOURCE_FETCH\"] = \"resourceFetch\";\n})(AttributeNames || (AttributeNames = {}));\n//# sourceMappingURL=AttributeNames.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * function to execute patched function and being able to catch errors\n * @param execute - function to be executed\n * @param onFinish - callback to run when execute finishes\n */\nexport function safeExecuteInTheMiddle(execute, onFinish, preventThrowingError) {\n let error;\n let result;\n try {\n result = execute();\n }\n catch (e) {\n error = e;\n }\n finally {\n onFinish(error, result);\n if (error && !preventThrowingError) {\n // eslint-disable-next-line no-unsafe-finally\n throw error;\n }\n // eslint-disable-next-line no-unsafe-finally\n return result;\n }\n}\n/**\n * Async function to execute patched function and being able to catch errors\n * @param execute - function to be executed\n * @param onFinish - callback to run when execute finishes\n */\nexport async function safeExecuteInTheMiddleAsync(execute, onFinish, preventThrowingError) {\n let error;\n let result;\n try {\n result = await execute();\n }\n catch (e) {\n error = e;\n }\n finally {\n onFinish(error, result);\n if (error && !preventThrowingError) {\n // eslint-disable-next-line no-unsafe-finally\n throw error;\n }\n // eslint-disable-next-line no-unsafe-finally\n return result;\n }\n}\n/**\n * Checks if certain function has been already wrapped\n * @param func\n */\nexport function isWrapped(func) {\n return (typeof func === 'function' &&\n typeof func.__original === 'function' &&\n typeof func.__unwrap === 'function' &&\n func.__wrapped === true);\n}\n//# sourceMappingURL=utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as path from 'path';\nimport { types as utilTypes } from 'util';\nimport { satisfies } from '../../semver';\nimport { wrap, unwrap } from '../../shimmer';\nimport { InstrumentationAbstract } from '../../instrumentation';\nimport { RequireInTheMiddleSingleton, } from './RequireInTheMiddleSingleton';\nimport { Hook as HookImport } from 'import-in-the-middle';\nimport { diag } from '@opentelemetry/api';\nimport { Hook as HookRequire } from 'require-in-the-middle';\nimport { readFileSync } from 'fs';\nimport { isWrapped } from '../../utils';\n/**\n * Base abstract class for instrumenting node plugins\n */\nexport class InstrumentationBase extends InstrumentationAbstract {\n _modules;\n _hooks = [];\n _requireInTheMiddleSingleton = RequireInTheMiddleSingleton.getInstance();\n _enabled = false;\n constructor(instrumentationName, instrumentationVersion, config) {\n super(instrumentationName, instrumentationVersion, config);\n let modules = this.init();\n if (modules && !Array.isArray(modules)) {\n modules = [modules];\n }\n this._modules = modules || [];\n if (this._config.enabled) {\n this.enable();\n }\n }\n _wrap = (moduleExports, name, wrapper) => {\n if (isWrapped(moduleExports[name])) {\n this._unwrap(moduleExports, name);\n }\n if (!utilTypes.isProxy(moduleExports)) {\n return wrap(moduleExports, name, wrapper);\n }\n else {\n const wrapped = wrap(Object.assign({}, moduleExports), name, wrapper);\n Object.defineProperty(moduleExports, name, {\n value: wrapped,\n });\n return wrapped;\n }\n };\n _unwrap = (moduleExports, name) => {\n if (!utilTypes.isProxy(moduleExports)) {\n return unwrap(moduleExports, name);\n }\n else {\n return Object.defineProperty(moduleExports, name, {\n value: moduleExports[name],\n });\n }\n };\n _massWrap = (moduleExportsArray, names, wrapper) => {\n if (!moduleExportsArray) {\n diag.error('must provide one or more modules to patch');\n return;\n }\n else if (!Array.isArray(moduleExportsArray)) {\n moduleExportsArray = [moduleExportsArray];\n }\n if (!(names && Array.isArray(names))) {\n diag.error('must provide one or more functions to wrap on modules');\n return;\n }\n moduleExportsArray.forEach(moduleExports => {\n names.forEach(name => {\n this._wrap(moduleExports, name, wrapper);\n });\n });\n };\n _massUnwrap = (moduleExportsArray, names) => {\n if (!moduleExportsArray) {\n diag.error('must provide one or more modules to patch');\n return;\n }\n else if (!Array.isArray(moduleExportsArray)) {\n moduleExportsArray = [moduleExportsArray];\n }\n if (!(names && Array.isArray(names))) {\n diag.error('must provide one or more functions to wrap on modules');\n return;\n }\n moduleExportsArray.forEach(moduleExports => {\n names.forEach(name => {\n this._unwrap(moduleExports, name);\n });\n });\n };\n _warnOnPreloadedModules() {\n this._modules.forEach((module) => {\n const { name } = module;\n try {\n const resolvedModule = require.resolve(name);\n if (require.cache[resolvedModule]) {\n // Module is already cached, which means the instrumentation hook might not work\n this._diag.warn(`Module ${name} has been loaded before ${this.instrumentationName} so it might not work, please initialize it before requiring ${name}`);\n }\n }\n catch {\n // Module isn't available, we can simply skip\n }\n });\n }\n _extractPackageVersion(baseDir) {\n try {\n const json = readFileSync(path.join(baseDir, 'package.json'), {\n encoding: 'utf8',\n });\n const version = JSON.parse(json).version;\n return typeof version === 'string' ? version : undefined;\n }\n catch {\n diag.warn('Failed extracting version', baseDir);\n }\n return undefined;\n }\n _onRequire(module, exports, name, baseDir) {\n if (!baseDir) {\n if (typeof module.patch === 'function') {\n module.moduleExports = exports;\n if (this._enabled) {\n this._diag.debug('Applying instrumentation patch for nodejs core module on require hook', {\n module: module.name,\n });\n return module.patch(exports);\n }\n }\n return exports;\n }\n const version = this._extractPackageVersion(baseDir);\n module.moduleVersion = version;\n if (module.name === name) {\n // main module\n if (isSupported(module.supportedVersions, version, module.includePrerelease)) {\n if (typeof module.patch === 'function') {\n module.moduleExports = exports;\n if (this._enabled) {\n this._diag.debug('Applying instrumentation patch for module on require hook', {\n module: module.name,\n version: module.moduleVersion,\n baseDir,\n });\n return module.patch(exports, module.moduleVersion);\n }\n }\n }\n return exports;\n }\n // internal file\n const files = module.files ?? [];\n const normalizedName = path.normalize(name);\n const supportedFileInstrumentations = files\n .filter(f => f.name === normalizedName)\n .filter(f => isSupported(f.supportedVersions, version, module.includePrerelease));\n return supportedFileInstrumentations.reduce((patchedExports, file) => {\n file.moduleExports = patchedExports;\n if (this._enabled) {\n this._diag.debug('Applying instrumentation patch for nodejs module file on require hook', {\n module: module.name,\n version: module.moduleVersion,\n fileName: file.name,\n baseDir,\n });\n // patch signature is not typed, so we cast it assuming it's correct\n return file.patch(patchedExports, module.moduleVersion);\n }\n return patchedExports;\n }, exports);\n }\n enable() {\n if (this._enabled) {\n return;\n }\n this._enabled = true;\n // already hooked, just call patch again\n if (this._hooks.length > 0) {\n for (const module of this._modules) {\n if (typeof module.patch === 'function' && module.moduleExports) {\n this._diag.debug('Applying instrumentation patch for nodejs module on instrumentation enabled', {\n module: module.name,\n version: module.moduleVersion,\n });\n module.patch(module.moduleExports, module.moduleVersion);\n }\n for (const file of module.files) {\n if (file.moduleExports) {\n this._diag.debug('Applying instrumentation patch for nodejs module file on instrumentation enabled', {\n module: module.name,\n version: module.moduleVersion,\n fileName: file.name,\n });\n file.patch(file.moduleExports, module.moduleVersion);\n }\n }\n }\n return;\n }\n this._warnOnPreloadedModules();\n for (const module of this._modules) {\n const hookFn = (exports, name, baseDir) => {\n if (!baseDir && path.isAbsolute(name)) {\n const parsedPath = path.parse(name);\n name = parsedPath.name;\n baseDir = parsedPath.dir;\n }\n return this._onRequire(module, exports, name, baseDir);\n };\n const onRequire = (exports, name, baseDir) => {\n return this._onRequire(module, exports, name, baseDir);\n };\n // `RequireInTheMiddleSingleton` does not support absolute paths.\n // For an absolute paths, we must create a separate instance of the\n // require-in-the-middle `Hook`.\n const hook = path.isAbsolute(module.name)\n ? new HookRequire([module.name], { internals: true }, onRequire)\n : this._requireInTheMiddleSingleton.register(module.name, onRequire);\n this._hooks.push(hook);\n const esmHook = new HookImport([module.name], { internals: false }, hookFn);\n this._hooks.push(esmHook);\n }\n }\n disable() {\n if (!this._enabled) {\n return;\n }\n this._enabled = false;\n for (const module of this._modules) {\n if (typeof module.unpatch === 'function' && module.moduleExports) {\n this._diag.debug('Removing instrumentation patch for nodejs module on instrumentation disabled', {\n module: module.name,\n version: module.moduleVersion,\n });\n module.unpatch(module.moduleExports, module.moduleVersion);\n }\n for (const file of module.files) {\n if (file.moduleExports) {\n this._diag.debug('Removing instrumentation patch for nodejs module file on instrumentation disabled', {\n module: module.name,\n version: module.moduleVersion,\n fileName: file.name,\n });\n file.unpatch(file.moduleExports, module.moduleVersion);\n }\n }\n }\n }\n isEnabled() {\n return this._enabled;\n }\n}\nfunction isSupported(supportedVersions, version, includePrerelease) {\n if (typeof version === 'undefined') {\n // If we don't have the version, accept the wildcard case only\n return supportedVersions.includes('*');\n }\n return supportedVersions.some(supportedVersion => {\n return satisfies(version, supportedVersion, { includePrerelease });\n });\n}\n//# sourceMappingURL=instrumentation.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var EventNames;\n(function (EventNames) {\n EventNames[\"FIRST_PAINT\"] = \"firstPaint\";\n EventNames[\"FIRST_CONTENTFUL_PAINT\"] = \"firstContentfulPaint\";\n})(EventNames || (EventNames = {}));\n//# sourceMappingURL=EventNames.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { otperformance } from '@opentelemetry/core';\nimport { hasKey, PerformanceTimingNames as PTN, } from '@opentelemetry/sdk-trace-web';\nimport { EventNames } from './enums/EventNames';\nexport const getPerformanceNavigationEntries = () => {\n const entries = {};\n const performanceNavigationTiming = otperformance.getEntriesByType?.('navigation')[0];\n if (performanceNavigationTiming) {\n const keys = Object.values(PTN);\n keys.forEach((key) => {\n if (hasKey(performanceNavigationTiming, key)) {\n const value = performanceNavigationTiming[key];\n if (typeof value === 'number') {\n entries[key] = value;\n }\n }\n });\n }\n else {\n // // fallback to previous version\n const perf = otperformance;\n const performanceTiming = perf.timing;\n if (performanceTiming) {\n const keys = Object.values(PTN);\n keys.forEach((key) => {\n if (hasKey(performanceTiming, key)) {\n const value = performanceTiming[key];\n if (typeof value === 'number') {\n entries[key] = value;\n }\n }\n });\n }\n }\n return entries;\n};\nconst performancePaintNames = {\n 'first-paint': EventNames.FIRST_PAINT,\n 'first-contentful-paint': EventNames.FIRST_CONTENTFUL_PAINT,\n};\nexport const addSpanPerformancePaintEvents = (span) => {\n const performancePaintTiming = otperformance.getEntriesByType?.('paint');\n if (performancePaintTiming) {\n performancePaintTiming.forEach(({ name, startTime }) => {\n if (hasKey(performancePaintNames, name)) {\n span.addEvent(performancePaintNames[name], startTime);\n }\n });\n }\n};\n//# sourceMappingURL=utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { context, propagation, trace, ROOT_CONTEXT, } from '@opentelemetry/api';\nimport { otperformance, TRACE_PARENT_HEADER } from '@opentelemetry/core';\nimport { addSpanNetworkEvent, addSpanNetworkEvents, hasKey, PerformanceTimingNames as PTN, } from '@opentelemetry/sdk-trace-web';\nimport { InstrumentationBase, safeExecuteInTheMiddle, } from '@opentelemetry/instrumentation';\nimport { AttributeNames } from './enums/AttributeNames';\n/** @knipignore */\nimport { PACKAGE_NAME, PACKAGE_VERSION } from './version';\nimport { SEMATTRS_HTTP_URL, SEMATTRS_HTTP_USER_AGENT, } from '@opentelemetry/semantic-conventions';\nimport { addSpanPerformancePaintEvents, getPerformanceNavigationEntries, } from './utils';\n/**\n * This class represents a document load plugin\n */\nexport class DocumentLoadInstrumentation extends InstrumentationBase {\n component = 'document-load';\n version = '1';\n moduleName = this.component;\n constructor(config = {}) {\n super(PACKAGE_NAME, PACKAGE_VERSION, config);\n }\n init() { }\n /**\n * callback to be executed when page is loaded\n */\n _onDocumentLoaded() {\n // Timeout is needed as load event doesn't have yet the performance metrics for loadEnd.\n // Support for event \"loadend\" is very limited and cannot be used\n window.setTimeout(() => {\n this._collectPerformance();\n });\n }\n /**\n * Adds spans for all resources\n * @param rootSpan\n */\n _addResourcesSpans(rootSpan) {\n const resources = otperformance.getEntriesByType?.('resource');\n if (resources) {\n resources.forEach(resource => {\n this._initResourceSpan(resource, rootSpan);\n });\n }\n }\n /**\n * Collects information about performance and creates appropriate spans\n */\n _collectPerformance() {\n const metaElement = Array.from(document.getElementsByTagName('meta')).find(e => e.getAttribute('name') === TRACE_PARENT_HEADER);\n const entries = getPerformanceNavigationEntries();\n const traceparent = (metaElement && metaElement.content) || '';\n context.with(propagation.extract(ROOT_CONTEXT, { traceparent }), () => {\n const rootSpan = this._startSpan(AttributeNames.DOCUMENT_LOAD, PTN.FETCH_START, entries);\n if (!rootSpan) {\n return;\n }\n context.with(trace.setSpan(context.active(), rootSpan), () => {\n const fetchSpan = this._startSpan(AttributeNames.DOCUMENT_FETCH, PTN.FETCH_START, entries);\n if (fetchSpan) {\n fetchSpan.setAttribute(SEMATTRS_HTTP_URL, location.href);\n context.with(trace.setSpan(context.active(), fetchSpan), () => {\n addSpanNetworkEvents(fetchSpan, entries, this.getConfig().ignoreNetworkEvents);\n this._addCustomAttributesOnSpan(fetchSpan, this.getConfig().applyCustomAttributesOnSpan?.documentFetch);\n this._endSpan(fetchSpan, PTN.RESPONSE_END, entries);\n });\n }\n });\n rootSpan.setAttribute(SEMATTRS_HTTP_URL, location.href);\n rootSpan.setAttribute(SEMATTRS_HTTP_USER_AGENT, navigator.userAgent);\n this._addResourcesSpans(rootSpan);\n if (!this.getConfig().ignoreNetworkEvents) {\n addSpanNetworkEvent(rootSpan, PTN.FETCH_START, entries);\n addSpanNetworkEvent(rootSpan, PTN.UNLOAD_EVENT_START, entries);\n addSpanNetworkEvent(rootSpan, PTN.UNLOAD_EVENT_END, entries);\n addSpanNetworkEvent(rootSpan, PTN.DOM_INTERACTIVE, entries);\n addSpanNetworkEvent(rootSpan, PTN.DOM_CONTENT_LOADED_EVENT_START, entries);\n addSpanNetworkEvent(rootSpan, PTN.DOM_CONTENT_LOADED_EVENT_END, entries);\n addSpanNetworkEvent(rootSpan, PTN.DOM_COMPLETE, entries);\n addSpanNetworkEvent(rootSpan, PTN.LOAD_EVENT_START, entries);\n addSpanNetworkEvent(rootSpan, PTN.LOAD_EVENT_END, entries);\n }\n if (!this.getConfig().ignorePerformancePaintEvents) {\n addSpanPerformancePaintEvents(rootSpan);\n }\n this._addCustomAttributesOnSpan(rootSpan, this.getConfig().applyCustomAttributesOnSpan?.documentLoad);\n this._endSpan(rootSpan, PTN.LOAD_EVENT_END, entries);\n });\n }\n /**\n * Helper function for ending span\n * @param span\n * @param performanceName name of performance entry for time end\n * @param entries\n */\n _endSpan(span, performanceName, entries) {\n // span can be undefined when entries are missing the certain performance - the span will not be created\n if (span) {\n if (hasKey(entries, performanceName)) {\n span.end(entries[performanceName]);\n }\n else {\n // just end span\n span.end();\n }\n }\n }\n /**\n * Creates and ends a span with network information about resource added as timed events\n * @param resource\n * @param parentSpan\n */\n _initResourceSpan(resource, parentSpan) {\n const span = this._startSpan(AttributeNames.RESOURCE_FETCH, PTN.FETCH_START, resource, parentSpan);\n if (span) {\n span.setAttribute(SEMATTRS_HTTP_URL, resource.name);\n addSpanNetworkEvents(span, resource, this.getConfig().ignoreNetworkEvents);\n this._addCustomAttributesOnResourceSpan(span, resource, this.getConfig().applyCustomAttributesOnSpan?.resourceFetch);\n this._endSpan(span, PTN.RESPONSE_END, resource);\n }\n }\n /**\n * Helper function for starting a span\n * @param spanName name of span\n * @param performanceName name of performance entry for time start\n * @param entries\n * @param parentSpan\n */\n _startSpan(spanName, performanceName, entries, parentSpan) {\n if (hasKey(entries, performanceName) &&\n typeof entries[performanceName] === 'number') {\n const span = this.tracer.startSpan(spanName, {\n startTime: entries[performanceName],\n }, parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined);\n return span;\n }\n return undefined;\n }\n /**\n * executes callback {_onDocumentLoaded} when the page is loaded\n */\n _waitForPageLoad() {\n if (window.document.readyState === 'complete') {\n this._onDocumentLoaded();\n }\n else {\n this._onDocumentLoaded = this._onDocumentLoaded.bind(this);\n window.addEventListener('load', this._onDocumentLoaded);\n }\n }\n /**\n * adds custom attributes to root span if configured\n */\n _addCustomAttributesOnSpan(span, applyCustomAttributesOnSpan) {\n if (applyCustomAttributesOnSpan) {\n safeExecuteInTheMiddle(() => applyCustomAttributesOnSpan(span), error => {\n if (!error) {\n return;\n }\n this._diag.error('addCustomAttributesOnSpan', error);\n }, true);\n }\n }\n /**\n * adds custom attributes to span if configured\n */\n _addCustomAttributesOnResourceSpan(span, resource, applyCustomAttributesOnSpan) {\n if (applyCustomAttributesOnSpan) {\n safeExecuteInTheMiddle(() => applyCustomAttributesOnSpan(span, resource), error => {\n if (!error) {\n return;\n }\n this._diag.error('addCustomAttributesOnResourceSpan', error);\n }, true);\n }\n }\n /**\n * implements enable function\n */\n enable() {\n // remove previously attached load to avoid adding the same event twice\n // in case of multiple enable calling.\n window.removeEventListener('load', this._onDocumentLoaded);\n this._waitForPageLoad();\n }\n /**\n * implements disable function\n */\n disable() {\n window.removeEventListener('load', this._onDocumentLoaded);\n }\n}\n//# sourceMappingURL=instrumentation.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// this is autogenerated file, see scripts/version-update.js\nexport const PACKAGE_VERSION = '0.48.0';\nexport const PACKAGE_NAME = '@opentelemetry/instrumentation-document-load';\n//# sourceMappingURL=version.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/// <reference types=\"zone.js\" />\nimport { ROOT_CONTEXT } from '@opentelemetry/api';\nimport { isListenerObject } from './util';\n/* Key name to be used to save a context reference in Zone */\nconst ZONE_CONTEXT_KEY = 'OT_ZONE_CONTEXT';\n/**\n * ZoneContextManager\n * This module provides an easy functionality for tracing action between asynchronous operations in web.\n * It was not possible with standard [StackContextManager]{@link https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-sdk-trace-web/src/StackContextManager.ts}.\n * It heavily depends on [zone.js]{@link https://www.npmjs.com/package/zone.js}.\n * It stores the information about context in zone. Each Context will have always new Zone;\n * It also supports binding a certain Span to a target that has \"addEventListener\" and \"removeEventListener\".\n * When this happens a new zone is being created and the provided Span is being assigned to this zone.\n */\nexport class ZoneContextManager {\n /**\n * whether the context manager is enabled or not\n */\n _enabled = false;\n /**\n * Helps to create a unique name for the zones - part of zone name\n */\n _zoneCounter = 0;\n /**\n * Returns the active context from certain zone name\n * @param activeZone\n */\n _activeContextFromZone(activeZone) {\n return (activeZone && activeZone.get(ZONE_CONTEXT_KEY)) || ROOT_CONTEXT;\n }\n /**\n * @param context A context (span) to be executed within target function\n * @param target Function to be executed within the context\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n _bindFunction(context, target) {\n const manager = this;\n const contextWrapper = function (...args) {\n return manager.with(context, () => target.apply(this, args));\n };\n Object.defineProperty(contextWrapper, 'length', {\n enumerable: false,\n configurable: true,\n writable: false,\n value: target.length,\n });\n return contextWrapper;\n }\n /**\n * @param context A context (span) to be bind to target\n * @param obj target object on which the listeners will be patched\n */\n _bindListener(context, obj) {\n const target = obj;\n if (target.__ot_listeners !== undefined) {\n return obj;\n }\n target.__ot_listeners = {};\n if (typeof target.addEventListener === 'function') {\n target.addEventListener = this._patchAddEventListener(target, target.addEventListener, context);\n }\n if (typeof target.removeEventListener === 'function') {\n target.removeEventListener = this._patchRemoveEventListener(target, target.removeEventListener);\n }\n return obj;\n }\n /**\n * Creates a new unique zone name\n */\n _createZoneName() {\n this._zoneCounter++;\n const random = Math.random();\n return `${this._zoneCounter}-${random}`;\n }\n /**\n * Creates a new zone\n * @param zoneName zone name\n * @param context A context (span) to be bind with Zone\n */\n _createZone(zoneName, context) {\n return Zone.current.fork({\n name: zoneName,\n properties: {\n [ZONE_CONTEXT_KEY]: context,\n },\n });\n }\n /**\n * Returns the active zone\n */\n _getActiveZone() {\n return Zone.current;\n }\n /**\n * Patches addEventListener method\n * @param target any target that has \"addEventListener\" method\n * @param original reference to the patched method\n * @param [context] context to be bind to the listener\n */\n _patchAddEventListener(target, original, context) {\n const contextManager = this;\n return function (event, listener, opts) {\n if (target.__ot_listeners === undefined) {\n target.__ot_listeners = {};\n }\n let listeners = target.__ot_listeners[event];\n if (listeners === undefined) {\n listeners = new WeakMap();\n target.__ot_listeners[event] = listeners;\n }\n const patchedListener = contextManager.bind(context, listener);\n // store a weak reference of the user listener to ours\n listeners.set(listener, patchedListener);\n return original.call(this, event, patchedListener, opts);\n };\n }\n /**\n * Patches removeEventListener method\n * @param target any target that has \"removeEventListener\" method\n * @param original reference to the patched method\n */\n _patchRemoveEventListener(target, original) {\n return function (event, listener) {\n if (target.__ot_listeners === undefined ||\n target.__ot_listeners[event] === undefined) {\n return original.call(this, event, listener);\n }\n const events = target.__ot_listeners[event];\n const patchedListener = events.get(listener);\n events.delete(listener);\n return original.call(this, event, patchedListener || listener);\n };\n }\n /**\n * Returns the active context\n */\n active() {\n if (!this._enabled) {\n return ROOT_CONTEXT;\n }\n const activeZone = this._getActiveZone();\n const active = this._activeContextFromZone(activeZone);\n if (active) {\n return active;\n }\n return ROOT_CONTEXT;\n }\n /**\n * Binds a the certain context or the active one to the target function and then returns the target\n * @param context A context (span) to be bind to target\n * @param target a function or event emitter. When target or one of its callbacks is called,\n * the provided context will be used as the active context for the duration of the call.\n */\n bind(context, target) {\n // if no specific context to propagate is given, we use the current one\n if (context === undefined) {\n context = this.active();\n }\n if (typeof target === 'function') {\n return this._bindFunction(context, target);\n }\n else if (isListenerObject(target)) {\n this._bindListener(context, target);\n }\n return target;\n }\n /**\n * Disable the context manager (clears all the contexts)\n */\n disable() {\n this._enabled = false;\n return this;\n }\n /**\n * Enables the context manager and creates a default(root) context\n */\n enable() {\n this._enabled = true;\n return this;\n }\n /**\n * Calls the callback function [fn] with the provided [context].\n * If [context] is undefined then it will use the active context.\n * The context will be set as active\n * @param context A context (span) to be called with provided callback\n * @param fn Callback function\n * @param thisArg optional receiver to be used for calling fn\n * @param args optional arguments forwarded to fn\n */\n with(context, fn, thisArg, ...args) {\n const zoneName = this._createZoneName();\n const newZone = this._createZone(zoneName, context);\n return newZone.run(fn, thisArg, args);\n }\n}\n//# sourceMappingURL=ZoneContextManager.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * check if an object has `addEventListener` and `removeEventListener` functions.\n * Generally only called with a `TargetWithEvents` but may be called with an `unknown` value.\n * @param obj - The object to check.\n */\nexport function isListenerObject(obj) {\n return (typeof obj === 'object' &&\n obj !== null &&\n 'addEventListener' in obj &&\n typeof obj.addEventListener === 'function' &&\n 'removeEventListener' in obj &&\n typeof obj.removeEventListener === 'function');\n}\n//# sourceMappingURL=util.js.map","'use strict';\n/**\n * @license Angular v<unknown>\n * (c) 2010-2025 Google LLC. https://angular.io/\n * License: MIT\n */\nconst global = globalThis;\n// __Zone_symbol_prefix global can be used to override the default zone\n// symbol prefix with a custom one if needed.\nfunction __symbol__(name) {\n const symbolPrefix = global['__Zone_symbol_prefix'] || '__zone_symbol__';\n return symbolPrefix + name;\n}\nfunction initZone() {\n const performance = global['performance'];\n function mark(name) {\n performance && performance['mark'] && performance['mark'](name);\n }\n function performanceMeasure(name, label) {\n performance && performance['measure'] && performance['measure'](name, label);\n }\n mark('Zone');\n class ZoneImpl {\n static __symbol__ = __symbol__;\n static assertZonePatched() {\n if (global['Promise'] !== patches['ZoneAwarePromise']) {\n throw new Error('Zone.js has detected that ZoneAwarePromise `(window|global).Promise` ' +\n 'has been overwritten.\\n' +\n 'Most likely cause is that a Promise polyfill has been loaded ' +\n 'after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. ' +\n 'If you must load one, do so before loading zone.js.)');\n }\n }\n static get root() {\n let zone = ZoneImpl.current;\n while (zone.parent) {\n zone = zone.parent;\n }\n return zone;\n }\n static get current() {\n return _currentZoneFrame.zone;\n }\n static get currentTask() {\n return _currentTask;\n }\n static __load_patch(name, fn, ignoreDuplicate = false) {\n if (patches.hasOwnProperty(name)) {\n // `checkDuplicate` option is defined from global variable\n // so it works for all modules.\n // `ignoreDuplicate` can work for the specified module\n const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true;\n if (!ignoreDuplicate && checkDuplicate) {\n throw Error('Already loaded patch: ' + name);\n }\n }\n else if (!global['__Zone_disable_' + name]) {\n const perfName = 'Zone:' + name;\n mark(perfName);\n patches[name] = fn(global, ZoneImpl, _api);\n performanceMeasure(perfName, perfName);\n }\n }\n get parent() {\n return this._parent;\n }\n get name() {\n return this._name;\n }\n _parent;\n _name;\n _properties;\n _zoneDelegate;\n constructor(parent, zoneSpec) {\n this._parent = parent;\n this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '<root>';\n this._properties = (zoneSpec && zoneSpec.properties) || {};\n this._zoneDelegate = new _ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);\n }\n get(key) {\n const zone = this.getZoneWith(key);\n if (zone)\n return zone._properties[key];\n }\n getZoneWith(key) {\n let current = this;\n while (current) {\n if (current._properties.hasOwnProperty(key)) {\n return current;\n }\n current = current._parent;\n }\n return null;\n }\n fork(zoneSpec) {\n if (!zoneSpec)\n throw new Error('ZoneSpec required!');\n return this._zoneDelegate.fork(this, zoneSpec);\n }\n wrap(callback, source) {\n if (typeof callback !== 'function') {\n throw new Error('Expecting function got: ' + callback);\n }\n const _callback = this._zoneDelegate.intercept(this, callback, source);\n const zone = this;\n return function () {\n return zone.runGuarded(_callback, this, arguments, source);\n };\n }\n run(callback, applyThis, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n }\n runGuarded(callback, applyThis = null, applyArgs, source) {\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n try {\n return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n _currentZoneFrame = _currentZoneFrame.parent;\n }\n }\n runTask(task, applyThis, applyArgs) {\n if (task.zone != this) {\n throw new Error('A task can only be run in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name +\n '; Execution: ' +\n this.name +\n ')');\n }\n const zoneTask = task;\n // https://github.com/angular/zone.js/issues/778, sometimes eventTask\n // will run in notScheduled(canceled) state, we should not try to\n // run such kind of task but just return\n const { type, data: { isPeriodic = false, isRefreshable = false } = {} } = task;\n if (task.state === notScheduled && (type === eventTask || type === macroTask)) {\n return;\n }\n const reEntryGuard = task.state != running;\n reEntryGuard && zoneTask._transitionTo(running, scheduled);\n const previousTask = _currentTask;\n _currentTask = zoneTask;\n _currentZoneFrame = { parent: _currentZoneFrame, zone: this };\n try {\n if (type == macroTask && task.data && !isPeriodic && !isRefreshable) {\n task.cancelFn = undefined;\n }\n try {\n return this._zoneDelegate.invokeTask(this, zoneTask, applyThis, applyArgs);\n }\n catch (error) {\n if (this._zoneDelegate.handleError(this, error)) {\n throw error;\n }\n }\n }\n finally {\n // if the task's state is notScheduled or unknown, then it has already been cancelled\n // we should not reset the state to scheduled\n const state = task.state;\n if (state !== notScheduled && state !== unknown) {\n if (type == eventTask || isPeriodic || (isRefreshable && state === scheduling)) {\n reEntryGuard && zoneTask._transitionTo(scheduled, running, scheduling);\n }\n else {\n const zoneDelegates = zoneTask._zoneDelegates;\n this._updateTaskCount(zoneTask, -1);\n reEntryGuard && zoneTask._transitionTo(notScheduled, running, notScheduled);\n if (isRefreshable) {\n zoneTask._zoneDelegates = zoneDelegates;\n }\n }\n }\n _currentZoneFrame = _currentZoneFrame.parent;\n _currentTask = previousTask;\n }\n }\n scheduleTask(task) {\n if (task.zone && task.zone !== this) {\n // check if the task was rescheduled, the newZone\n // should not be the children of the original zone\n let newZone = this;\n while (newZone) {\n if (newZone === task.zone) {\n throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${task.zone.name}`);\n }\n newZone = newZone.parent;\n }\n }\n task._transitionTo(scheduling, notScheduled);\n const zoneDelegates = [];\n task._zoneDelegates = zoneDelegates;\n task._zone = this;\n try {\n task = this._zoneDelegate.scheduleTask(this, task);\n }\n catch (err) {\n // should set task's state to unknown when scheduleTask throw error\n // because the err may from reschedule, so the fromState maybe notScheduled\n task._transitionTo(unknown, scheduling, notScheduled);\n // TODO: @JiaLiPassion, should we check the result from handleError?\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n if (task._zoneDelegates === zoneDelegates) {\n // we have to check because internally the delegate can reschedule the task.\n this._updateTaskCount(task, 1);\n }\n if (task.state == scheduling) {\n task._transitionTo(scheduled, scheduling);\n }\n return task;\n }\n scheduleMicroTask(source, callback, data, customSchedule) {\n return this.scheduleTask(new ZoneTask(microTask, source, callback, data, customSchedule, undefined));\n }\n scheduleMacroTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(macroTask, source, callback, data, customSchedule, customCancel));\n }\n scheduleEventTask(source, callback, data, customSchedule, customCancel) {\n return this.scheduleTask(new ZoneTask(eventTask, source, callback, data, customSchedule, customCancel));\n }\n cancelTask(task) {\n if (task.zone != this)\n throw new Error('A task can only be cancelled in the zone of creation! (Creation: ' +\n (task.zone || NO_ZONE).name +\n '; Execution: ' +\n this.name +\n ')');\n if (task.state !== scheduled && task.state !== running) {\n return;\n }\n task._transitionTo(canceling, scheduled, running);\n try {\n this._zoneDelegate.cancelTask(this, task);\n }\n catch (err) {\n // if error occurs when cancelTask, transit the state to unknown\n task._transitionTo(unknown, canceling);\n this._zoneDelegate.handleError(this, err);\n throw err;\n }\n this._updateTaskCount(task, -1);\n task._transitionTo(notScheduled, canceling);\n task.runCount = -1;\n return task;\n }\n _updateTaskCount(task, count) {\n const zoneDelegates = task._zoneDelegates;\n if (count == -1) {\n task._zoneDelegates = null;\n }\n for (let i = 0; i < zoneDelegates.length; i++) {\n zoneDelegates[i]._updateTaskCount(task.type, count);\n }\n }\n }\n const DELEGATE_ZS = {\n name: '',\n onHasTask: (delegate, _, target, hasTaskState) => delegate.hasTask(target, hasTaskState),\n onScheduleTask: (delegate, _, target, task) => delegate.scheduleTask(target, task),\n onInvokeTask: (delegate, _, target, task, applyThis, applyArgs) => delegate.invokeTask(target, task, applyThis, applyArgs),\n onCancelTask: (delegate, _, target, task) => delegate.cancelTask(target, task),\n };\n class _ZoneDelegate {\n get zone() {\n return this._zone;\n }\n _zone;\n _taskCounts = {\n 'microTask': 0,\n 'macroTask': 0,\n 'eventTask': 0,\n };\n _parentDelegate;\n _forkDlgt;\n _forkZS;\n _forkCurrZone;\n _interceptDlgt;\n _interceptZS;\n _interceptCurrZone;\n _invokeDlgt;\n _invokeZS;\n _invokeCurrZone;\n _handleErrorDlgt;\n _handleErrorZS;\n _handleErrorCurrZone;\n _scheduleTaskDlgt;\n _scheduleTaskZS;\n _scheduleTaskCurrZone;\n _invokeTaskDlgt;\n _invokeTaskZS;\n _invokeTaskCurrZone;\n _cancelTaskDlgt;\n _cancelTaskZS;\n _cancelTaskCurrZone;\n _hasTaskDlgt;\n _hasTaskDlgtOwner;\n _hasTaskZS;\n _hasTaskCurrZone;\n constructor(zone, parentDelegate, zoneSpec) {\n this._zone = zone;\n this._parentDelegate = parentDelegate;\n this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);\n this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);\n this._forkCurrZone =\n zoneSpec && (zoneSpec.onFork ? this._zone : parentDelegate._forkCurrZone);\n this._interceptZS =\n zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);\n this._interceptDlgt =\n zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);\n this._interceptCurrZone =\n zoneSpec && (zoneSpec.onIntercept ? this._zone : parentDelegate._interceptCurrZone);\n this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);\n this._invokeDlgt =\n zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);\n this._invokeCurrZone =\n zoneSpec && (zoneSpec.onInvoke ? this._zone : parentDelegate._invokeCurrZone);\n this._handleErrorZS =\n zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);\n this._handleErrorDlgt =\n zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);\n this._handleErrorCurrZone =\n zoneSpec && (zoneSpec.onHandleError ? this._zone : parentDelegate._handleErrorCurrZone);\n this._scheduleTaskZS =\n zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);\n this._scheduleTaskDlgt =\n zoneSpec && (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);\n this._scheduleTaskCurrZone =\n zoneSpec && (zoneSpec.onScheduleTask ? this._zone : parentDelegate._scheduleTaskCurrZone);\n this._invokeTaskZS =\n zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);\n this._invokeTaskDlgt =\n zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);\n this._invokeTaskCurrZone =\n zoneSpec && (zoneSpec.onInvokeTask ? this._zone : parentDelegate._invokeTaskCurrZone);\n this._cancelTaskZS =\n zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);\n this._cancelTaskDlgt =\n zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);\n this._cancelTaskCurrZone =\n zoneSpec && (zoneSpec.onCancelTask ? this._zone : parentDelegate._cancelTaskCurrZone);\n this._hasTaskZS = null;\n this._hasTaskDlgt = null;\n this._hasTaskDlgtOwner = null;\n this._hasTaskCurrZone = null;\n const zoneSpecHasTask = zoneSpec && zoneSpec.onHasTask;\n const parentHasTask = parentDelegate && parentDelegate._hasTaskZS;\n if (zoneSpecHasTask || parentHasTask) {\n // If we need to report hasTask, than this ZS needs to do ref counting on tasks. In such\n // a case all task related interceptors must go through this ZD. We can't short circuit it.\n this._hasTaskZS = zoneSpecHasTask ? zoneSpec : DELEGATE_ZS;\n this._hasTaskDlgt = parentDelegate;\n this._hasTaskDlgtOwner = this;\n this._hasTaskCurrZone = this._zone;\n if (!zoneSpec.onScheduleTask) {\n this._scheduleTaskZS = DELEGATE_ZS;\n this._scheduleTaskDlgt = parentDelegate;\n this._scheduleTaskCurrZone = this._zone;\n }\n if (!zoneSpec.onInvokeTask) {\n this._invokeTaskZS = DELEGATE_ZS;\n this._invokeTaskDlgt = parentDelegate;\n this._invokeTaskCurrZone = this._zone;\n }\n if (!zoneSpec.onCancelTask) {\n this._cancelTaskZS = DELEGATE_ZS;\n this._cancelTaskDlgt = parentDelegate;\n this._cancelTaskCurrZone = this._zone;\n }\n }\n }\n fork(targetZone, zoneSpec) {\n return this._forkZS\n ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec)\n : new ZoneImpl(targetZone, zoneSpec);\n }\n intercept(targetZone, callback, source) {\n return this._interceptZS\n ? this._interceptZS.onIntercept(this._interceptDlgt, this._interceptCurrZone, targetZone, callback, source)\n : callback;\n }\n invoke(targetZone, callback, applyThis, applyArgs, source) {\n return this._invokeZS\n ? this._invokeZS.onInvoke(this._invokeDlgt, this._invokeCurrZone, targetZone, callback, applyThis, applyArgs, source)\n : callback.apply(applyThis, applyArgs);\n }\n handleError(targetZone, error) {\n return this._handleErrorZS\n ? this._handleErrorZS.onHandleError(this._handleErrorDlgt, this._handleErrorCurrZone, targetZone, error)\n : true;\n }\n scheduleTask(targetZone, task) {\n let returnTask = task;\n if (this._scheduleTaskZS) {\n if (this._hasTaskZS) {\n returnTask._zoneDelegates.push(this._hasTaskDlgtOwner);\n }\n returnTask = this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this._scheduleTaskCurrZone, targetZone, task);\n if (!returnTask)\n returnTask = task;\n }\n else {\n if (task.scheduleFn) {\n task.scheduleFn(task);\n }\n else if (task.type == microTask) {\n scheduleMicroTask(task);\n }\n else {\n throw new Error('Task is missing scheduleFn.');\n }\n }\n return returnTask;\n }\n invokeTask(targetZone, task, applyThis, applyArgs) {\n return this._invokeTaskZS\n ? this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this._invokeTaskCurrZone, targetZone, task, applyThis, applyArgs)\n : task.callback.apply(applyThis, applyArgs);\n }\n cancelTask(targetZone, task) {\n let value;\n if (this._cancelTaskZS) {\n value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this._cancelTaskCurrZone, targetZone, task);\n }\n else {\n if (!task.cancelFn) {\n throw Error('Task is not cancelable');\n }\n value = task.cancelFn(task);\n }\n return value;\n }\n hasTask(targetZone, isEmpty) {\n // hasTask should not throw error so other ZoneDelegate\n // can still trigger hasTask callback\n try {\n this._hasTaskZS &&\n this._hasTaskZS.onHasTask(this._hasTaskDlgt, this._hasTaskCurrZone, targetZone, isEmpty);\n }\n catch (err) {\n this.handleError(targetZone, err);\n }\n }\n _updateTaskCount(type, count) {\n const counts = this._taskCounts;\n const prev = counts[type];\n const next = (counts[type] = prev + count);\n if (next < 0) {\n throw new Error('More tasks executed then were scheduled.');\n }\n if (prev == 0 || next == 0) {\n const isEmpty = {\n microTask: counts['microTask'] > 0,\n macroTask: counts['macroTask'] > 0,\n eventTask: counts['eventTask'] > 0,\n change: type,\n };\n this.hasTask(this._zone, isEmpty);\n }\n }\n }\n class ZoneTask {\n type;\n source;\n invoke;\n callback;\n data;\n scheduleFn;\n cancelFn;\n _zone = null;\n runCount = 0;\n _zoneDelegates = null;\n _state = 'notScheduled';\n constructor(type, source, callback, options, scheduleFn, cancelFn) {\n this.type = type;\n this.source = source;\n this.data = options;\n this.scheduleFn = scheduleFn;\n this.cancelFn = cancelFn;\n if (!callback) {\n throw new Error('callback is not defined');\n }\n this.callback = callback;\n const self = this;\n // TODO: @JiaLiPassion options should have interface\n if (type === eventTask && options && options.useG) {\n this.invoke = ZoneTask.invokeTask;\n }\n else {\n this.invoke = function () {\n return ZoneTask.invokeTask.call(global, self, this, arguments);\n };\n }\n }\n static invokeTask(task, target, args) {\n if (!task) {\n task = this;\n }\n _numberOfNestedTaskFrames++;\n try {\n task.runCount++;\n return task.zone.runTask(task, target, args);\n }\n finally {\n if (_numberOfNestedTaskFrames == 1) {\n drainMicroTaskQueue();\n }\n _numberOfNestedTaskFrames--;\n }\n }\n get zone() {\n return this._zone;\n }\n get state() {\n return this._state;\n }\n cancelScheduleRequest() {\n this._transitionTo(notScheduled, scheduling);\n }\n _transitionTo(toState, fromState1, fromState2) {\n if (this._state === fromState1 || this._state === fromState2) {\n this._state = toState;\n if (toState == notScheduled) {\n this._zoneDelegates = null;\n }\n }\n else {\n throw new Error(`${this.type} '${this.source}': can not transition to '${toState}', expecting state '${fromState1}'${fromState2 ? \" or '\" + fromState2 + \"'\" : ''}, was '${this._state}'.`);\n }\n }\n toString() {\n if (this.data && typeof this.data.handleId !== 'undefined') {\n return this.data.handleId.toString();\n }\n else {\n return Object.prototype.toString.call(this);\n }\n }\n // add toJSON method to prevent cyclic error when\n // call JSON.stringify(zoneTask)\n toJSON() {\n return {\n type: this.type,\n state: this.state,\n source: this.source,\n zone: this.zone.name,\n runCount: this.runCount,\n };\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// MICROTASK QUEUE\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n const symbolSetTimeout = __symbol__('setTimeout');\n const symbolPromise = __symbol__('Promise');\n const symbolThen = __symbol__('then');\n let _microTaskQueue = [];\n let _isDrainingMicrotaskQueue = false;\n let nativeMicroTaskQueuePromise;\n function nativeScheduleMicroTask(func) {\n if (!nativeMicroTaskQueuePromise) {\n if (global[symbolPromise]) {\n nativeMicroTaskQueuePromise = global[symbolPromise].resolve(0);\n }\n }\n if (nativeMicroTaskQueuePromise) {\n let nativeThen = nativeMicroTaskQueuePromise[symbolThen];\n if (!nativeThen) {\n // native Promise is not patchable, we need to use `then` directly\n // issue 1078\n nativeThen = nativeMicroTaskQueuePromise['then'];\n }\n nativeThen.call(nativeMicroTaskQueuePromise, func);\n }\n else {\n global[symbolSetTimeout](func, 0);\n }\n }\n function scheduleMicroTask(task) {\n // if we are not running in any task, and there has not been anything scheduled\n // we must bootstrap the initial task creation by manually scheduling the drain\n if (_numberOfNestedTaskFrames === 0 && _microTaskQueue.length === 0) {\n // We are not running in Task, so we need to kickstart the microtask queue.\n nativeScheduleMicroTask(drainMicroTaskQueue);\n }\n task && _microTaskQueue.push(task);\n }\n function drainMicroTaskQueue() {\n if (!_isDrainingMicrotaskQueue) {\n _isDrainingMicrotaskQueue = true;\n while (_microTaskQueue.length) {\n const queue = _microTaskQueue;\n _microTaskQueue = [];\n for (let i = 0; i < queue.length; i++) {\n const task = queue[i];\n try {\n task.zone.runTask(task, null, null);\n }\n catch (error) {\n _api.onUnhandledError(error);\n }\n }\n }\n _api.microtaskDrainDone();\n _isDrainingMicrotaskQueue = false;\n }\n }\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n /// BOOTSTRAP\n //////////////////////////////////////////////////////\n //////////////////////////////////////////////////////\n const NO_ZONE = { name: 'NO ZONE' };\n const notScheduled = 'notScheduled', scheduling = 'scheduling', scheduled = 'scheduled', running = 'running', canceling = 'canceling', unknown = 'unknown';\n const microTask = 'microTask', macroTask = 'macroTask', eventTask = 'eventTask';\n const patches = {};\n const _api = {\n symbol: __symbol__,\n currentZoneFrame: () => _currentZoneFrame,\n onUnhandledError: noop,\n microtaskDrainDone: noop,\n scheduleMicroTask: scheduleMicroTask,\n showUncaughtError: () => !ZoneImpl[__symbol__('ignoreConsoleErrorUncaughtError')],\n patchEventTarget: () => [],\n patchOnProperties: noop,\n patchMethod: () => noop,\n bindArguments: () => [],\n patchThen: () => noop,\n patchMacroTask: () => noop,\n patchEventPrototype: () => noop,\n isIEOrEdge: () => false,\n getGlobalObjects: () => undefined,\n ObjectDefineProperty: () => noop,\n ObjectGetOwnPropertyDescriptor: () => undefined,\n ObjectCreate: () => undefined,\n ArraySlice: () => [],\n patchClass: () => noop,\n wrapWithCurrentZone: () => noop,\n filterProperties: () => [],\n attachOriginToPatched: () => noop,\n _redefineProperty: () => noop,\n patchCallbacks: () => noop,\n nativeScheduleMicroTask: nativeScheduleMicroTask,\n };\n let _currentZoneFrame = { parent: null, zone: new ZoneImpl(null, null) };\n let _currentTask = null;\n let _numberOfNestedTaskFrames = 0;\n function noop() { }\n performanceMeasure('Zone', 'Zone');\n return ZoneImpl;\n}\n\nfunction loadZone() {\n // if global['Zone'] already exists (maybe zone.js was already loaded or\n // some other lib also registered a global object named Zone), we may need\n // to throw an error, but sometimes user may not want this error.\n // For example,\n // we have two web pages, page1 includes zone.js, page2 doesn't.\n // and the 1st time user load page1 and page2, everything work fine,\n // but when user load page2 again, error occurs because global['Zone'] already exists.\n // so we add a flag to let user choose whether to throw this error or not.\n // By default, if existing Zone is from zone.js, we will not throw the error.\n const global = globalThis;\n const checkDuplicate = global[__symbol__('forceDuplicateZoneCheck')] === true;\n if (global['Zone'] && (checkDuplicate || typeof global['Zone'].__symbol__ !== 'function')) {\n throw new Error('Zone already loaded.');\n }\n // Initialize global `Zone` constant.\n global['Zone'] ??= initZone();\n return global['Zone'];\n}\n\n/**\n * Suppress closure compiler errors about unknown 'Zone' variable\n * @fileoverview\n * @suppress {undefinedVars,globalThis,missingRequire}\n */\n/// <reference types=\"node\"/>\n// issue #989, to reduce bundle size, use short name\n/** Object.getOwnPropertyDescriptor */\nconst ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n/** Object.defineProperty */\nconst ObjectDefineProperty = Object.defineProperty;\n/** Object.getPrototypeOf */\nconst ObjectGetPrototypeOf = Object.getPrototypeOf;\n/** Object.create */\nconst ObjectCreate = Object.create;\n/** Array.prototype.slice */\nconst ArraySlice = Array.prototype.slice;\n/** addEventListener string const */\nconst ADD_EVENT_LISTENER_STR = 'addEventListener';\n/** removeEventListener string const */\nconst REMOVE_EVENT_LISTENER_STR = 'removeEventListener';\n/** zoneSymbol addEventListener */\nconst ZONE_SYMBOL_ADD_EVENT_LISTENER = __symbol__(ADD_EVENT_LISTENER_STR);\n/** zoneSymbol removeEventListener */\nconst ZONE_SYMBOL_REMOVE_EVENT_LISTENER = __symbol__(REMOVE_EVENT_LISTENER_STR);\n/** true string const */\nconst TRUE_STR = 'true';\n/** false string const */\nconst FALSE_STR = 'false';\n/** Zone symbol prefix string const. */\nconst ZONE_SYMBOL_PREFIX = __symbol__('');\nfunction wrapWithCurrentZone(callback, source) {\n return Zone.current.wrap(callback, source);\n}\nfunction scheduleMacroTaskWithCurrentZone(source, callback, data, customSchedule, customCancel) {\n return Zone.current.scheduleMacroTask(source, callback, data, customSchedule, customCancel);\n}\nconst zoneSymbol = __symbol__;\nconst isWindowExists = typeof window !== 'undefined';\nconst internalWindow = isWindowExists ? window : undefined;\nconst _global = (isWindowExists && internalWindow) || globalThis;\nconst REMOVE_ATTRIBUTE = 'removeAttribute';\nfunction bindArguments(args, source) {\n for (let i = args.length - 1; i >= 0; i--) {\n if (typeof args[i] === 'function') {\n args[i] = wrapWithCurrentZone(args[i], source + '_' + i);\n }\n }\n return args;\n}\nfunction patchPrototype(prototype, fnNames) {\n const source = prototype.constructor['name'];\n for (let i = 0; i < fnNames.length; i++) {\n const name = fnNames[i];\n const delegate = prototype[name];\n if (delegate) {\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, name);\n if (!isPropertyWritable(prototypeDesc)) {\n continue;\n }\n prototype[name] = ((delegate) => {\n const patched = function () {\n return delegate.apply(this, bindArguments(arguments, source + '.' + name));\n };\n attachOriginToPatched(patched, delegate);\n return patched;\n })(delegate);\n }\n }\n}\nfunction isPropertyWritable(propertyDesc) {\n if (!propertyDesc) {\n return true;\n }\n if (propertyDesc.writable === false) {\n return false;\n }\n return !(typeof propertyDesc.get === 'function' && typeof propertyDesc.set === 'undefined');\n}\nconst isWebWorker = typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope;\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nconst isNode = !('nw' in _global) &&\n typeof _global.process !== 'undefined' &&\n _global.process.toString() === '[object process]';\nconst isBrowser = !isNode && !isWebWorker && !!(isWindowExists && internalWindow['HTMLElement']);\n// we are in electron of nw, so we are both browser and nodejs\n// Make sure to access `process` through `_global` so that WebPack does not accidentally browserify\n// this code.\nconst isMix = typeof _global.process !== 'undefined' &&\n _global.process.toString() === '[object process]' &&\n !isWebWorker &&\n !!(isWindowExists && internalWindow['HTMLElement']);\nconst zoneSymbolEventNames$1 = {};\nconst enableBeforeunloadSymbol = zoneSymbol('enable_beforeunload');\nconst wrapFn = function (event) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n let eventNameSymbol = zoneSymbolEventNames$1[event.type];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames$1[event.type] = zoneSymbol('ON_PROPERTY' + event.type);\n }\n const target = this || event.target || _global;\n const listener = target[eventNameSymbol];\n let result;\n if (isBrowser && target === internalWindow && event.type === 'error') {\n // window.onerror have different signature\n // https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror#window.onerror\n // and onerror callback will prevent default when callback return true\n const errorEvent = event;\n result =\n listener &&\n listener.call(this, errorEvent.message, errorEvent.filename, errorEvent.lineno, errorEvent.colno, errorEvent.error);\n if (result === true) {\n event.preventDefault();\n }\n }\n else {\n result = listener && listener.apply(this, arguments);\n if (\n // https://github.com/angular/angular/issues/47579\n // https://www.w3.org/TR/2011/WD-html5-20110525/history.html#beforeunloadevent\n // This is the only specific case we should check for. The spec defines that the\n // `returnValue` attribute represents the message to show the user. When the event\n // is created, this attribute must be set to the empty string.\n event.type === 'beforeunload' &&\n // To prevent any breaking changes resulting from this change, given that\n // it was already causing a significant number of failures in G3, we have hidden\n // that behavior behind a global configuration flag. Consumers can enable this\n // flag explicitly if they want the `beforeunload` event to be handled as defined\n // in the specification.\n _global[enableBeforeunloadSymbol] &&\n // The IDL event definition is `attribute DOMString returnValue`, so we check whether\n // `typeof result` is a string.\n typeof result === 'string') {\n event.returnValue = result;\n }\n else if (result != undefined && !result) {\n event.preventDefault();\n }\n }\n return result;\n};\nfunction patchProperty(obj, prop, prototype) {\n let desc = ObjectGetOwnPropertyDescriptor(obj, prop);\n if (!desc && prototype) {\n // when patch window object, use prototype to check prop exist or not\n const prototypeDesc = ObjectGetOwnPropertyDescriptor(prototype, prop);\n if (prototypeDesc) {\n desc = { enumerable: true, configurable: true };\n }\n }\n // if the descriptor not exists or is not configurable\n // just return\n if (!desc || !desc.configurable) {\n return;\n }\n const onPropPatchedSymbol = zoneSymbol('on' + prop + 'patched');\n if (obj.hasOwnProperty(onPropPatchedSymbol) && obj[onPropPatchedSymbol]) {\n return;\n }\n // A property descriptor cannot have getter/setter and be writable\n // deleting the writable and value properties avoids this error:\n //\n // TypeError: property descriptors must not specify a value or be writable when a\n // getter or setter has been specified\n delete desc.writable;\n delete desc.value;\n const originalDescGet = desc.get;\n const originalDescSet = desc.set;\n // slice(2) cuz 'onclick' -> 'click', etc\n const eventName = prop.slice(2);\n let eventNameSymbol = zoneSymbolEventNames$1[eventName];\n if (!eventNameSymbol) {\n eventNameSymbol = zoneSymbolEventNames$1[eventName] = zoneSymbol('ON_PROPERTY' + eventName);\n }\n desc.set = function (newValue) {\n // In some versions of Windows, the `this` context may be undefined\n // in on-property callbacks.\n // To handle this edge case, we check if `this` is falsy and\n // fallback to `_global` if needed.\n let target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return;\n }\n const previousValue = target[eventNameSymbol];\n if (typeof previousValue === 'function') {\n target.removeEventListener(eventName, wrapFn);\n }\n // https://github.com/angular/zone.js/issues/978\n // If an inline handler (like `onload`) was defined before zone.js was loaded,\n // call the original descriptor's setter to clean it up.\n originalDescSet?.call(target, null);\n target[eventNameSymbol] = newValue;\n if (typeof newValue === 'function') {\n target.addEventListener(eventName, wrapFn, false);\n }\n };\n // The getter would return undefined for unassigned properties but the default value of an\n // unassigned property is null\n desc.get = function () {\n // in some of windows's onproperty callback, this is undefined\n // so we need to check it\n let target = this;\n if (!target && obj === _global) {\n target = _global;\n }\n if (!target) {\n return null;\n }\n const listener = target[eventNameSymbol];\n if (listener) {\n return listener;\n }\n else if (originalDescGet) {\n // result will be null when use inline event attribute,\n // such as <button onclick=\"func();\">OK</button>\n // because the onclick function is internal raw uncompiled handler\n // the onclick will be evaluated when first time event was triggered or\n // the property is accessed, https://github.com/angular/zone.js/issues/525\n // so we should use original native get to retrieve the handler\n let value = originalDescGet.call(this);\n if (value) {\n desc.set.call(this, value);\n if (typeof target[REMOVE_ATTRIBUTE] === 'function') {\n target.removeAttribute(prop);\n }\n return value;\n }\n }\n return null;\n };\n ObjectDefineProperty(obj, prop, desc);\n obj[onPropPatchedSymbol] = true;\n}\nfunction patchOnProperties(obj, properties, prototype) {\n if (properties) {\n for (let i = 0; i < properties.length; i++) {\n patchProperty(obj, 'on' + properties[i], prototype);\n }\n }\n else {\n const onProperties = [];\n for (const prop in obj) {\n if (prop.slice(0, 2) == 'on') {\n onProperties.push(prop);\n }\n }\n for (let j = 0; j < onProperties.length; j++) {\n patchProperty(obj, onProperties[j], prototype);\n }\n }\n}\nconst originalInstanceKey = zoneSymbol('originalInstance');\n// wrap some native API on `window`\nfunction patchClass(className) {\n const OriginalClass = _global[className];\n if (!OriginalClass)\n return;\n // keep original class in global\n _global[zoneSymbol(className)] = OriginalClass;\n _global[className] = function () {\n const a = bindArguments(arguments, className);\n switch (a.length) {\n case 0:\n this[originalInstanceKey] = new OriginalClass();\n break;\n case 1:\n this[originalInstanceKey] = new OriginalClass(a[0]);\n break;\n case 2:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1]);\n break;\n case 3:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);\n break;\n case 4:\n this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);\n break;\n default:\n throw new Error('Arg list too long.');\n }\n };\n // attach original delegate to patched function\n attachOriginToPatched(_global[className], OriginalClass);\n const instance = new OriginalClass(function () { });\n let prop;\n for (prop in instance) {\n // https://bugs.webkit.org/show_bug.cgi?id=44721\n if (className === 'XMLHttpRequest' && prop === 'responseBlob')\n continue;\n (function (prop) {\n if (typeof instance[prop] === 'function') {\n _global[className].prototype[prop] = function () {\n return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);\n };\n }\n else {\n ObjectDefineProperty(_global[className].prototype, prop, {\n set: function (fn) {\n if (typeof fn === 'function') {\n this[originalInstanceKey][prop] = wrapWithCurrentZone(fn, className + '.' + prop);\n // keep callback in wrapped function so we can\n // use it in Function.prototype.toString to return\n // the native one.\n attachOriginToPatched(this[originalInstanceKey][prop], fn);\n }\n else {\n this[originalInstanceKey][prop] = fn;\n }\n },\n get: function () {\n return this[originalInstanceKey][prop];\n },\n });\n }\n })(prop);\n }\n for (prop in OriginalClass) {\n if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {\n _global[className][prop] = OriginalClass[prop];\n }\n }\n}\nfunction patchMethod(target, name, patchFn) {\n let proto = target;\n while (proto && !proto.hasOwnProperty(name)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && target[name]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = target;\n }\n const delegateName = zoneSymbol(name);\n let delegate = null;\n if (proto && (!(delegate = proto[delegateName]) || !proto.hasOwnProperty(delegateName))) {\n delegate = proto[delegateName] = proto[name];\n // check whether proto[name] is writable\n // some property is readonly in safari, such as HtmlCanvasElement.prototype.toBlob\n const desc = proto && ObjectGetOwnPropertyDescriptor(proto, name);\n if (isPropertyWritable(desc)) {\n const patchDelegate = patchFn(delegate, delegateName, name);\n proto[name] = function () {\n return patchDelegate(this, arguments);\n };\n attachOriginToPatched(proto[name], delegate);\n }\n }\n return delegate;\n}\n// TODO: @JiaLiPassion, support cancel task later if necessary\nfunction patchMacroTask(obj, funcName, metaCreator) {\n let setNative = null;\n function scheduleTask(task) {\n const data = task.data;\n data.args[data.cbIdx] = function () {\n task.invoke.apply(this, arguments);\n };\n setNative.apply(data.target, data.args);\n return task;\n }\n setNative = patchMethod(obj, funcName, (delegate) => function (self, args) {\n const meta = metaCreator(self, args);\n if (meta.cbIdx >= 0 && typeof args[meta.cbIdx] === 'function') {\n return scheduleMacroTaskWithCurrentZone(meta.name, args[meta.cbIdx], meta, scheduleTask);\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(self, args);\n }\n });\n}\nfunction attachOriginToPatched(patched, original) {\n patched[zoneSymbol('OriginalDelegate')] = original;\n}\nlet isDetectedIEOrEdge = false;\nlet ieOrEdge = false;\nfunction isIEOrEdge() {\n if (isDetectedIEOrEdge) {\n return ieOrEdge;\n }\n isDetectedIEOrEdge = true;\n try {\n const ua = internalWindow.navigator.userAgent;\n if (ua.indexOf('MSIE ') !== -1 || ua.indexOf('Trident/') !== -1 || ua.indexOf('Edge/') !== -1) {\n ieOrEdge = true;\n }\n }\n catch (error) { }\n return ieOrEdge;\n}\nfunction isFunction(value) {\n return typeof value === 'function';\n}\nfunction isNumber(value) {\n return typeof value === 'number';\n}\n\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\n// an identifier to tell ZoneTask do not create a new invoke closure\nconst OPTIMIZED_ZONE_EVENT_TASK_DATA = {\n useG: true,\n};\nconst zoneSymbolEventNames = {};\nconst globalSources = {};\nconst EVENT_NAME_SYMBOL_REGX = new RegExp('^' + ZONE_SYMBOL_PREFIX + '(\\\\w+)(true|false)$');\nconst IMMEDIATE_PROPAGATION_SYMBOL = zoneSymbol('propagationStopped');\nfunction prepareEventNames(eventName, eventNameToString) {\n const falseEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + FALSE_STR;\n const trueEventName = (eventNameToString ? eventNameToString(eventName) : eventName) + TRUE_STR;\n const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n}\nfunction patchEventTarget(_global, api, apis, patchOptions) {\n const ADD_EVENT_LISTENER = (patchOptions && patchOptions.add) || ADD_EVENT_LISTENER_STR;\n const REMOVE_EVENT_LISTENER = (patchOptions && patchOptions.rm) || REMOVE_EVENT_LISTENER_STR;\n const LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.listeners) || 'eventListeners';\n const REMOVE_ALL_LISTENERS_EVENT_LISTENER = (patchOptions && patchOptions.rmAll) || 'removeAllListeners';\n const zoneSymbolAddEventListener = zoneSymbol(ADD_EVENT_LISTENER);\n const ADD_EVENT_LISTENER_SOURCE = '.' + ADD_EVENT_LISTENER + ':';\n const PREPEND_EVENT_LISTENER = 'prependListener';\n const PREPEND_EVENT_LISTENER_SOURCE = '.' + PREPEND_EVENT_LISTENER + ':';\n const invokeTask = function (task, target, event) {\n // for better performance, check isRemoved which is set\n // by removeEventListener\n if (task.isRemoved) {\n return;\n }\n const delegate = task.callback;\n if (typeof delegate === 'object' && delegate.handleEvent) {\n // create the bind version of handleEvent when invoke\n task.callback = (event) => delegate.handleEvent(event);\n task.originalDelegate = delegate;\n }\n // invoke static task.invoke\n // need to try/catch error here, otherwise, the error in one event listener\n // will break the executions of the other event listeners. Also error will\n // not remove the event listener when `once` options is true.\n let error;\n try {\n task.invoke(task, target, [event]);\n }\n catch (err) {\n error = err;\n }\n const options = task.options;\n if (options && typeof options === 'object' && options.once) {\n // if options.once is true, after invoke once remove listener here\n // only browser need to do this, nodejs eventEmitter will cal removeListener\n // inside EventEmitter.once\n const delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n target[REMOVE_EVENT_LISTENER].call(target, event.type, delegate, options);\n }\n return error;\n };\n function globalCallback(context, event, isCapture) {\n // https://github.com/angular/zone.js/issues/911, in IE, sometimes\n // event will be undefined, so we need to use window.event\n event = event || _global.event;\n if (!event) {\n return;\n }\n // event.target is needed for Samsung TV and SourceBuffer\n // || global is needed https://github.com/angular/zone.js/issues/190\n const target = context || event.target || _global;\n const tasks = target[zoneSymbolEventNames[event.type][isCapture ? TRUE_STR : FALSE_STR]];\n if (tasks) {\n const errors = [];\n // invoke all tasks which attached to current target with given event.type and capture = false\n // for performance concern, if task.length === 1, just invoke\n if (tasks.length === 1) {\n const err = invokeTask(tasks[0], target, event);\n err && errors.push(err);\n }\n else {\n // https://github.com/angular/zone.js/issues/836\n // copy the tasks array before invoke, to avoid\n // the callback will remove itself or other listener\n const copyTasks = tasks.slice();\n for (let i = 0; i < copyTasks.length; i++) {\n if (event && event[IMMEDIATE_PROPAGATION_SYMBOL] === true) {\n break;\n }\n const err = invokeTask(copyTasks[i], target, event);\n err && errors.push(err);\n }\n }\n // Since there is only one error, we don't need to schedule microTask\n // to throw the error.\n if (errors.length === 1) {\n throw errors[0];\n }\n else {\n for (let i = 0; i < errors.length; i++) {\n const err = errors[i];\n api.nativeScheduleMicroTask(() => {\n throw err;\n });\n }\n }\n }\n }\n // global shared zoneAwareCallback to handle all event callback with capture = false\n const globalZoneAwareCallback = function (event) {\n return globalCallback(this, event, false);\n };\n // global shared zoneAwareCallback to handle all event callback with capture = true\n const globalZoneAwareCaptureCallback = function (event) {\n return globalCallback(this, event, true);\n };\n function patchEventTargetMethods(obj, patchOptions) {\n if (!obj) {\n return false;\n }\n let useGlobalCallback = true;\n if (patchOptions && patchOptions.useG !== undefined) {\n useGlobalCallback = patchOptions.useG;\n }\n const validateHandler = patchOptions && patchOptions.vh;\n let checkDuplicate = true;\n if (patchOptions && patchOptions.chkDup !== undefined) {\n checkDuplicate = patchOptions.chkDup;\n }\n let returnTarget = false;\n if (patchOptions && patchOptions.rt !== undefined) {\n returnTarget = patchOptions.rt;\n }\n let proto = obj;\n while (proto && !proto.hasOwnProperty(ADD_EVENT_LISTENER)) {\n proto = ObjectGetPrototypeOf(proto);\n }\n if (!proto && obj[ADD_EVENT_LISTENER]) {\n // somehow we did not find it, but we can see it. This happens on IE for Window properties.\n proto = obj;\n }\n if (!proto) {\n return false;\n }\n if (proto[zoneSymbolAddEventListener]) {\n return false;\n }\n const eventNameToString = patchOptions && patchOptions.eventNameToString;\n // We use a shared global `taskData` to pass data for `scheduleEventTask`,\n // eliminating the need to create a new object solely for passing data.\n // WARNING: This object has a static lifetime, meaning it is not created\n // each time `addEventListener` is called. It is instantiated only once\n // and captured by reference inside the `addEventListener` and\n // `removeEventListener` functions. Do not add any new properties to this\n // object, as doing so would necessitate maintaining the information\n // between `addEventListener` calls.\n const taskData = {};\n const nativeAddEventListener = (proto[zoneSymbolAddEventListener] = proto[ADD_EVENT_LISTENER]);\n const nativeRemoveEventListener = (proto[zoneSymbol(REMOVE_EVENT_LISTENER)] =\n proto[REMOVE_EVENT_LISTENER]);\n const nativeListeners = (proto[zoneSymbol(LISTENERS_EVENT_LISTENER)] =\n proto[LISTENERS_EVENT_LISTENER]);\n const nativeRemoveAllListeners = (proto[zoneSymbol(REMOVE_ALL_LISTENERS_EVENT_LISTENER)] =\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER]);\n let nativePrependEventListener;\n if (patchOptions && patchOptions.prepend) {\n nativePrependEventListener = proto[zoneSymbol(patchOptions.prepend)] =\n proto[patchOptions.prepend];\n }\n /**\n * This util function will build an option object with passive option\n * to handle all possible input from the user.\n */\n function buildEventListenerOptions(options, passive) {\n if (!passive) {\n return options;\n }\n if (typeof options === 'boolean') {\n return { capture: options, passive: true };\n }\n if (!options) {\n return { passive: true };\n }\n if (typeof options === 'object' && options.passive !== false) {\n return { ...options, passive: true };\n }\n return options;\n }\n const customScheduleGlobal = function (task) {\n // if there is already a task for the eventName + capture,\n // just return, because we use the shared globalZoneAwareCallback here.\n if (taskData.isExisting) {\n return;\n }\n return nativeAddEventListener.call(taskData.target, taskData.eventName, taskData.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, taskData.options);\n };\n /**\n * In the context of events and listeners, this function will be\n * called at the end by `cancelTask`, which, in turn, calls `task.cancelFn`.\n * Cancelling a task is primarily used to remove event listeners from\n * the task target.\n */\n const customCancelGlobal = function (task) {\n // if task is not marked as isRemoved, this call is directly\n // from Zone.prototype.cancelTask, we should remove the task\n // from tasksList of target first\n if (!task.isRemoved) {\n const symbolEventNames = zoneSymbolEventNames[task.eventName];\n let symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[task.capture ? TRUE_STR : FALSE_STR];\n }\n const existingTasks = symbolEventName && task.target[symbolEventName];\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n if (existingTask === task) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n task.isRemoved = true;\n if (task.removeAbortListener) {\n task.removeAbortListener();\n task.removeAbortListener = null;\n }\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n task.allRemoved = true;\n task.target[symbolEventName] = null;\n }\n break;\n }\n }\n }\n }\n // if all tasks for the eventName + capture have gone,\n // we will really remove the global event callback,\n // if not, return\n if (!task.allRemoved) {\n return;\n }\n return nativeRemoveEventListener.call(task.target, task.eventName, task.capture ? globalZoneAwareCaptureCallback : globalZoneAwareCallback, task.options);\n };\n const customScheduleNonGlobal = function (task) {\n return nativeAddEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n const customSchedulePrepend = function (task) {\n return nativePrependEventListener.call(taskData.target, taskData.eventName, task.invoke, taskData.options);\n };\n const customCancelNonGlobal = function (task) {\n return nativeRemoveEventListener.call(task.target, task.eventName, task.invoke, task.options);\n };\n const customSchedule = useGlobalCallback ? customScheduleGlobal : customScheduleNonGlobal;\n const customCancel = useGlobalCallback ? customCancelGlobal : customCancelNonGlobal;\n const compareTaskCallbackVsDelegate = function (task, delegate) {\n const typeOfDelegate = typeof delegate;\n return ((typeOfDelegate === 'function' && task.callback === delegate) ||\n (typeOfDelegate === 'object' && task.originalDelegate === delegate));\n };\n const compare = patchOptions?.diff || compareTaskCallbackVsDelegate;\n const unpatchedEvents = Zone[zoneSymbol('UNPATCHED_EVENTS')];\n const passiveEvents = _global[zoneSymbol('PASSIVE_EVENTS')];\n function copyEventListenerOptions(options) {\n if (typeof options === 'object' && options !== null) {\n // We need to destructure the target `options` object since it may\n // be frozen or sealed (possibly provided implicitly by a third-party\n // library), or its properties may be readonly.\n const newOptions = { ...options };\n // The `signal` option was recently introduced, which caused regressions in\n // third-party scenarios where `AbortController` was directly provided to\n // `addEventListener` as options. For instance, in cases like\n // `document.addEventListener('keydown', callback, abortControllerInstance)`,\n // which is valid because `AbortController` includes a `signal` getter, spreading\n // `{...options}` wouldn't copy the `signal`. Additionally, using `Object.create`\n // isn't feasible since `AbortController` is a built-in object type, and attempting\n // to create a new object directly with it as the prototype might result in\n // unexpected behavior.\n if (options.signal) {\n newOptions.signal = options.signal;\n }\n return newOptions;\n }\n return options;\n }\n const makeAddListener = function (nativeListener, addSource, customScheduleFn, customCancelFn, returnTarget = false, prepend = false) {\n return function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n let delegate = arguments[1];\n if (!delegate) {\n return nativeListener.apply(this, arguments);\n }\n if (isNode && eventName === 'uncaughtException') {\n // don't patch uncaughtException of nodejs to prevent endless loop\n return nativeListener.apply(this, arguments);\n }\n // To improve `addEventListener` performance, we will create the callback\n // for the task later when the task is invoked.\n let isEventListenerObject = false;\n if (typeof delegate !== 'function') {\n // This checks whether the provided listener argument is an object with\n // a `handleEvent` method (since we can call `addEventListener` with a\n // function `event => ...` or with an object `{ handleEvent: event => ... }`).\n if (!delegate.handleEvent) {\n return nativeListener.apply(this, arguments);\n }\n isEventListenerObject = true;\n }\n if (validateHandler && !validateHandler(nativeListener, delegate, target, arguments)) {\n return;\n }\n const passive = !!passiveEvents && passiveEvents.indexOf(eventName) !== -1;\n const options = copyEventListenerOptions(buildEventListenerOptions(arguments[2], passive));\n const signal = options?.signal;\n if (signal?.aborted) {\n // the signal is an aborted one, just return without attaching the event listener.\n return;\n }\n if (unpatchedEvents) {\n // check unpatched list\n for (let i = 0; i < unpatchedEvents.length; i++) {\n if (eventName === unpatchedEvents[i]) {\n if (passive) {\n return nativeListener.call(target, eventName, delegate, options);\n }\n else {\n return nativeListener.apply(this, arguments);\n }\n }\n }\n }\n const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n const once = options && typeof options === 'object' ? options.once : false;\n const zone = Zone.current;\n let symbolEventNames = zoneSymbolEventNames[eventName];\n if (!symbolEventNames) {\n prepareEventNames(eventName, eventNameToString);\n symbolEventNames = zoneSymbolEventNames[eventName];\n }\n const symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n let existingTasks = target[symbolEventName];\n let isExisting = false;\n if (existingTasks) {\n // already have task registered\n isExisting = true;\n if (checkDuplicate) {\n for (let i = 0; i < existingTasks.length; i++) {\n if (compare(existingTasks[i], delegate)) {\n // same callback, same capture, same event name, just return\n return;\n }\n }\n }\n }\n else {\n existingTasks = target[symbolEventName] = [];\n }\n let source;\n const constructorName = target.constructor['name'];\n const targetSource = globalSources[constructorName];\n if (targetSource) {\n source = targetSource[eventName];\n }\n if (!source) {\n source =\n constructorName +\n addSource +\n (eventNameToString ? eventNameToString(eventName) : eventName);\n }\n // In the code below, `options` should no longer be reassigned; instead, it\n // should only be mutated. This is because we pass that object to the native\n // `addEventListener`.\n // It's generally recommended to use the same object reference for options.\n // This ensures consistency and avoids potential issues.\n taskData.options = options;\n if (once) {\n // When using `addEventListener` with the `once` option, we don't pass\n // the `once` option directly to the native `addEventListener` method.\n // Instead, we keep the `once` setting and handle it ourselves.\n taskData.options.once = false;\n }\n taskData.target = target;\n taskData.capture = capture;\n taskData.eventName = eventName;\n taskData.isExisting = isExisting;\n const data = useGlobalCallback ? OPTIMIZED_ZONE_EVENT_TASK_DATA : undefined;\n // keep taskData into data to allow onScheduleEventTask to access the task information\n if (data) {\n data.taskData = taskData;\n }\n if (signal) {\n // When using `addEventListener` with the `signal` option, we don't pass\n // the `signal` option directly to the native `addEventListener` method.\n // Instead, we keep the `signal` setting and handle it ourselves.\n taskData.options.signal = undefined;\n }\n // The `scheduleEventTask` function will ultimately call `customScheduleGlobal`,\n // which in turn calls the native `addEventListener`. This is why `taskData.options`\n // is updated before scheduling the task, as `customScheduleGlobal` uses\n // `taskData.options` to pass it to the native `addEventListener`.\n const task = zone.scheduleEventTask(source, delegate, data, customScheduleFn, customCancelFn);\n if (signal) {\n // after task is scheduled, we need to store the signal back to task.options\n taskData.options.signal = signal;\n // Wrapping `task` in a weak reference would not prevent memory leaks. Weak references are\n // primarily used for preventing strong references cycles. `onAbort` is always reachable\n // as it's an event listener, so its closure retains a strong reference to the `task`.\n const onAbort = () => task.zone.cancelTask(task);\n nativeListener.call(signal, 'abort', onAbort, { once: true });\n // We need to remove the `abort` listener when the event listener is going to be removed,\n // as it creates a closure that captures `task`. This closure retains a reference to the\n // `task` object even after it goes out of scope, preventing `task` from being garbage\n // collected.\n task.removeAbortListener = () => signal.removeEventListener('abort', onAbort);\n }\n // should clear taskData.target to avoid memory leak\n // issue, https://github.com/angular/angular/issues/20442\n taskData.target = null;\n // need to clear up taskData because it is a global object\n if (data) {\n data.taskData = null;\n }\n // have to save those information to task in case\n // application may call task.zone.cancelTask() directly\n if (once) {\n taskData.options.once = true;\n }\n if (typeof task.options !== 'boolean') {\n // We should save the options on the task (if it's an object) because\n // we'll be using `task.options` later when removing the event listener\n // and passing it back to `removeEventListener`.\n task.options = options;\n }\n task.target = target;\n task.capture = capture;\n task.eventName = eventName;\n if (isEventListenerObject) {\n // save original delegate for compare to check duplicate\n task.originalDelegate = delegate;\n }\n if (!prepend) {\n existingTasks.push(task);\n }\n else {\n existingTasks.unshift(task);\n }\n if (returnTarget) {\n return target;\n }\n };\n };\n proto[ADD_EVENT_LISTENER] = makeAddListener(nativeAddEventListener, ADD_EVENT_LISTENER_SOURCE, customSchedule, customCancel, returnTarget);\n if (nativePrependEventListener) {\n proto[PREPEND_EVENT_LISTENER] = makeAddListener(nativePrependEventListener, PREPEND_EVENT_LISTENER_SOURCE, customSchedulePrepend, customCancel, returnTarget, true);\n }\n proto[REMOVE_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const options = arguments[2];\n const capture = !options ? false : typeof options === 'boolean' ? true : options.capture;\n const delegate = arguments[1];\n if (!delegate) {\n return nativeRemoveEventListener.apply(this, arguments);\n }\n if (validateHandler &&\n !validateHandler(nativeRemoveEventListener, delegate, target, arguments)) {\n return;\n }\n const symbolEventNames = zoneSymbolEventNames[eventName];\n let symbolEventName;\n if (symbolEventNames) {\n symbolEventName = symbolEventNames[capture ? TRUE_STR : FALSE_STR];\n }\n const existingTasks = symbolEventName && target[symbolEventName];\n // `existingTasks` may not exist if the `addEventListener` was called before\n // it was patched by zone.js. Please refer to the attached issue for\n // clarification, particularly after the `if` condition, before calling\n // the native `removeEventListener`.\n if (existingTasks) {\n for (let i = 0; i < existingTasks.length; i++) {\n const existingTask = existingTasks[i];\n if (compare(existingTask, delegate)) {\n existingTasks.splice(i, 1);\n // set isRemoved to data for faster invokeTask check\n existingTask.isRemoved = true;\n if (existingTasks.length === 0) {\n // all tasks for the eventName + capture have gone,\n // remove globalZoneAwareCallback and remove the task cache from target\n existingTask.allRemoved = true;\n target[symbolEventName] = null;\n // in the target, we have an event listener which is added by on_property\n // such as target.onclick = function() {}, so we need to clear this internal\n // property too if all delegates with capture=false were removed\n // https:// github.com/angular/angular/issues/31643\n // https://github.com/angular/angular/issues/54581\n if (!capture && typeof eventName === 'string') {\n const onPropertySymbol = ZONE_SYMBOL_PREFIX + 'ON_PROPERTY' + eventName;\n target[onPropertySymbol] = null;\n }\n }\n // In all other conditions, when `addEventListener` is called after being\n // patched by zone.js, we would always find an event task on the `EventTarget`.\n // This will trigger `cancelFn` on the `existingTask`, leading to `customCancelGlobal`,\n // which ultimately removes an event listener and cleans up the abort listener\n // (if an `AbortSignal` was provided when scheduling a task).\n existingTask.zone.cancelTask(existingTask);\n if (returnTarget) {\n return target;\n }\n return;\n }\n }\n }\n // https://github.com/angular/zone.js/issues/930\n // We may encounter a situation where the `addEventListener` was\n // called on the event target before zone.js is loaded, resulting\n // in no task being stored on the event target due to its invocation\n // of the native implementation. In this scenario, we simply need to\n // invoke the native `removeEventListener`.\n return nativeRemoveEventListener.apply(this, arguments);\n };\n proto[LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const listeners = [];\n const tasks = findEventTasks(target, eventNameToString ? eventNameToString(eventName) : eventName);\n for (let i = 0; i < tasks.length; i++) {\n const task = tasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n listeners.push(delegate);\n }\n return listeners;\n };\n proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER] = function () {\n const target = this || _global;\n let eventName = arguments[0];\n if (!eventName) {\n const keys = Object.keys(target);\n for (let i = 0; i < keys.length; i++) {\n const prop = keys[i];\n const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n let evtName = match && match[1];\n // in nodejs EventEmitter, removeListener event is\n // used for monitoring the removeListener call,\n // so just keep removeListener eventListener until\n // all other eventListeners are removed\n if (evtName && evtName !== 'removeListener') {\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, evtName);\n }\n }\n // remove removeListener listener finally\n this[REMOVE_ALL_LISTENERS_EVENT_LISTENER].call(this, 'removeListener');\n }\n else {\n if (patchOptions && patchOptions.transferEventName) {\n eventName = patchOptions.transferEventName(eventName);\n }\n const symbolEventNames = zoneSymbolEventNames[eventName];\n if (symbolEventNames) {\n const symbolEventName = symbolEventNames[FALSE_STR];\n const symbolCaptureEventName = symbolEventNames[TRUE_STR];\n const tasks = target[symbolEventName];\n const captureTasks = target[symbolCaptureEventName];\n if (tasks) {\n const removeTasks = tasks.slice();\n for (let i = 0; i < removeTasks.length; i++) {\n const task = removeTasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n if (captureTasks) {\n const removeTasks = captureTasks.slice();\n for (let i = 0; i < removeTasks.length; i++) {\n const task = removeTasks[i];\n let delegate = task.originalDelegate ? task.originalDelegate : task.callback;\n this[REMOVE_EVENT_LISTENER].call(this, eventName, delegate, task.options);\n }\n }\n }\n }\n if (returnTarget) {\n return this;\n }\n };\n // for native toString patch\n attachOriginToPatched(proto[ADD_EVENT_LISTENER], nativeAddEventListener);\n attachOriginToPatched(proto[REMOVE_EVENT_LISTENER], nativeRemoveEventListener);\n if (nativeRemoveAllListeners) {\n attachOriginToPatched(proto[REMOVE_ALL_LISTENERS_EVENT_LISTENER], nativeRemoveAllListeners);\n }\n if (nativeListeners) {\n attachOriginToPatched(proto[LISTENERS_EVENT_LISTENER], nativeListeners);\n }\n return true;\n }\n let results = [];\n for (let i = 0; i < apis.length; i++) {\n results[i] = patchEventTargetMethods(apis[i], patchOptions);\n }\n return results;\n}\nfunction findEventTasks(target, eventName) {\n if (!eventName) {\n const foundTasks = [];\n for (let prop in target) {\n const match = EVENT_NAME_SYMBOL_REGX.exec(prop);\n let evtName = match && match[1];\n if (evtName && (!eventName || evtName === eventName)) {\n const tasks = target[prop];\n if (tasks) {\n for (let i = 0; i < tasks.length; i++) {\n foundTasks.push(tasks[i]);\n }\n }\n }\n }\n return foundTasks;\n }\n let symbolEventName = zoneSymbolEventNames[eventName];\n if (!symbolEventName) {\n prepareEventNames(eventName);\n symbolEventName = zoneSymbolEventNames[eventName];\n }\n const captureFalseTasks = target[symbolEventName[FALSE_STR]];\n const captureTrueTasks = target[symbolEventName[TRUE_STR]];\n if (!captureFalseTasks) {\n return captureTrueTasks ? captureTrueTasks.slice() : [];\n }\n else {\n return captureTrueTasks\n ? captureFalseTasks.concat(captureTrueTasks)\n : captureFalseTasks.slice();\n }\n}\nfunction patchEventPrototype(global, api) {\n const Event = global['Event'];\n if (Event && Event.prototype) {\n api.patchMethod(Event.prototype, 'stopImmediatePropagation', (delegate) => function (self, args) {\n self[IMMEDIATE_PROPAGATION_SYMBOL] = true;\n // we need to call the native stopImmediatePropagation\n // in case in some hybrid application, some part of\n // application will be controlled by zone, some are not\n delegate && delegate.apply(self, args);\n });\n }\n}\n\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nfunction patchQueueMicrotask(global, api) {\n api.patchMethod(global, 'queueMicrotask', (delegate) => {\n return function (self, args) {\n Zone.current.scheduleMicroTask('queueMicrotask', args[0]);\n };\n });\n}\n\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nconst taskSymbol = zoneSymbol('zoneTask');\nfunction patchTimer(window, setName, cancelName, nameSuffix) {\n let setNative = null;\n let clearNative = null;\n setName += nameSuffix;\n cancelName += nameSuffix;\n const tasksByHandleId = {};\n function scheduleTask(task) {\n const data = task.data;\n data.args[0] = function () {\n return task.invoke.apply(this, arguments);\n };\n const handleOrId = setNative.apply(window, data.args);\n // Whlist on Node.js when get can the ID by using `[Symbol.toPrimitive]()` we do\n // to this so that we do not cause potentally leaks when using `setTimeout`\n // since this can be periodic when using `.refresh`.\n if (isNumber(handleOrId)) {\n data.handleId = handleOrId;\n }\n else {\n data.handle = handleOrId;\n // On Node.js a timeout and interval can be restarted over and over again by using the `.refresh` method.\n data.isRefreshable = isFunction(handleOrId.refresh);\n }\n return task;\n }\n function clearTask(task) {\n const { handle, handleId } = task.data;\n return clearNative.call(window, handle ?? handleId);\n }\n setNative = patchMethod(window, setName, (delegate) => function (self, args) {\n if (isFunction(args[0])) {\n const options = {\n isRefreshable: false,\n isPeriodic: nameSuffix === 'Interval',\n delay: nameSuffix === 'Timeout' || nameSuffix === 'Interval' ? args[1] || 0 : undefined,\n args: args,\n };\n const callback = args[0];\n args[0] = function timer() {\n try {\n return callback.apply(this, arguments);\n }\n finally {\n // issue-934, task will be cancelled\n // even it is a periodic task such as\n // setInterval\n // https://github.com/angular/angular/issues/40387\n // Cleanup tasksByHandleId should be handled before scheduleTask\n // Since some zoneSpec may intercept and doesn't trigger\n // scheduleFn(scheduleTask) provided here.\n const { handle, handleId, isPeriodic, isRefreshable } = options;\n if (!isPeriodic && !isRefreshable) {\n if (handleId) {\n // in non-nodejs env, we remove timerId\n // from local cache\n delete tasksByHandleId[handleId];\n }\n else if (handle) {\n // Node returns complex objects as handleIds\n // we remove task reference from timer object\n handle[taskSymbol] = null;\n }\n }\n }\n };\n const task = scheduleMacroTaskWithCurrentZone(setName, args[0], options, scheduleTask, clearTask);\n if (!task) {\n return task;\n }\n // Node.js must additionally support the ref and unref functions.\n const { handleId, handle, isRefreshable, isPeriodic } = task.data;\n if (handleId) {\n // for non nodejs env, we save handleId: task\n // mapping in local cache for clearTimeout\n tasksByHandleId[handleId] = task;\n }\n else if (handle) {\n // for nodejs env, we save task\n // reference in timerId Object for clearTimeout\n handle[taskSymbol] = task;\n if (isRefreshable && !isPeriodic) {\n const originalRefresh = handle.refresh;\n handle.refresh = function () {\n const { zone, state } = task;\n if (state === 'notScheduled') {\n task._state = 'scheduled';\n zone._updateTaskCount(task, 1);\n }\n else if (state === 'running') {\n task._state = 'scheduling';\n }\n return originalRefresh.call(this);\n };\n }\n }\n return handle ?? handleId ?? task;\n }\n else {\n // cause an error by calling it directly.\n return delegate.apply(window, args);\n }\n });\n clearNative = patchMethod(window, cancelName, (delegate) => function (self, args) {\n const id = args[0];\n let task;\n if (isNumber(id)) {\n // non nodejs env.\n task = tasksByHandleId[id];\n delete tasksByHandleId[id];\n }\n else {\n // nodejs env ?? other environments.\n task = id?.[taskSymbol];\n if (task) {\n id[taskSymbol] = null;\n }\n else {\n task = id;\n }\n }\n if (task?.type) {\n if (task.cancelFn) {\n // Do not cancel already canceled functions\n task.zone.cancelTask(task);\n }\n }\n else {\n // cause an error by calling it directly.\n delegate.apply(window, args);\n }\n });\n}\n\nfunction patchCustomElements(_global, api) {\n const { isBrowser, isMix } = api.getGlobalObjects();\n if ((!isBrowser && !isMix) || !_global['customElements'] || !('customElements' in _global)) {\n return;\n }\n // https://html.spec.whatwg.org/multipage/custom-elements.html#concept-custom-element-definition-lifecycle-callbacks\n const callbacks = [\n 'connectedCallback',\n 'disconnectedCallback',\n 'adoptedCallback',\n 'attributeChangedCallback',\n 'formAssociatedCallback',\n 'formDisabledCallback',\n 'formResetCallback',\n 'formStateRestoreCallback',\n ];\n api.patchCallbacks(api, _global.customElements, 'customElements', 'define', callbacks);\n}\n\nfunction eventTargetPatch(_global, api) {\n if (Zone[api.symbol('patchEventTarget')]) {\n // EventTarget is already patched.\n return;\n }\n const { eventNames, zoneSymbolEventNames, TRUE_STR, FALSE_STR, ZONE_SYMBOL_PREFIX } = api.getGlobalObjects();\n // predefine all __zone_symbol__ + eventName + true/false string\n for (let i = 0; i < eventNames.length; i++) {\n const eventName = eventNames[i];\n const falseEventName = eventName + FALSE_STR;\n const trueEventName = eventName + TRUE_STR;\n const symbol = ZONE_SYMBOL_PREFIX + falseEventName;\n const symbolCapture = ZONE_SYMBOL_PREFIX + trueEventName;\n zoneSymbolEventNames[eventName] = {};\n zoneSymbolEventNames[eventName][FALSE_STR] = symbol;\n zoneSymbolEventNames[eventName][TRUE_STR] = symbolCapture;\n }\n const EVENT_TARGET = _global['EventTarget'];\n if (!EVENT_TARGET || !EVENT_TARGET.prototype) {\n return;\n }\n api.patchEventTarget(_global, api, [EVENT_TARGET && EVENT_TARGET.prototype]);\n return true;\n}\nfunction patchEvent(global, api) {\n api.patchEventPrototype(global, api);\n}\n\n/**\n * @fileoverview\n * @suppress {globalThis}\n */\nfunction filterProperties(target, onProperties, ignoreProperties) {\n if (!ignoreProperties || ignoreProperties.length === 0) {\n return onProperties;\n }\n const tip = ignoreProperties.filter((ip) => ip.target === target);\n if (tip.length === 0) {\n return onProperties;\n }\n const targetIgnoreProperties = tip[0].ignoreProperties;\n return onProperties.filter((op) => targetIgnoreProperties.indexOf(op) === -1);\n}\nfunction patchFilteredProperties(target, onProperties, ignoreProperties, prototype) {\n // check whether target is available, sometimes target will be undefined\n // because different browser or some 3rd party plugin.\n if (!target) {\n return;\n }\n const filteredProperties = filterProperties(target, onProperties, ignoreProperties);\n patchOnProperties(target, filteredProperties, prototype);\n}\n/**\n * Get all event name properties which the event name startsWith `on`\n * from the target object itself, inherited properties are not considered.\n */\nfunction getOnEventNames(target) {\n return Object.getOwnPropertyNames(target)\n .filter((name) => name.startsWith('on') && name.length > 2)\n .map((name) => name.substring(2));\n}\nfunction propertyDescriptorPatch(api, _global) {\n if (isNode && !isMix) {\n return;\n }\n if (Zone[api.symbol('patchEvents')]) {\n // events are already been patched by legacy patch.\n return;\n }\n const ignoreProperties = _global['__Zone_ignore_on_properties'];\n // for browsers that we can patch the descriptor: Chrome & Firefox\n let patchTargets = [];\n if (isBrowser) {\n const internalWindow = window;\n patchTargets = patchTargets.concat([\n 'Document',\n 'SVGElement',\n 'Element',\n 'HTMLElement',\n 'HTMLBodyElement',\n 'HTMLMediaElement',\n 'HTMLFrameSetElement',\n 'HTMLFrameElement',\n 'HTMLIFrameElement',\n 'HTMLMarqueeElement',\n 'Worker',\n ]);\n const ignoreErrorProperties = [];\n // In older browsers like IE or Edge, event handler properties (e.g., `onclick`)\n // may not be defined directly on the `window` object but on its prototype (`WindowPrototype`).\n // To ensure complete coverage, we use the prototype when checking\n // for and patching these properties.\n patchFilteredProperties(internalWindow, getOnEventNames(internalWindow), ignoreProperties ? ignoreProperties.concat(ignoreErrorProperties) : ignoreProperties, ObjectGetPrototypeOf(internalWindow));\n }\n patchTargets = patchTargets.concat([\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'IDBIndex',\n 'IDBRequest',\n 'IDBOpenDBRequest',\n 'IDBDatabase',\n 'IDBTransaction',\n 'IDBCursor',\n 'WebSocket',\n ]);\n for (let i = 0; i < patchTargets.length; i++) {\n const target = _global[patchTargets[i]];\n target?.prototype &&\n patchFilteredProperties(target.prototype, getOnEventNames(target.prototype), ignoreProperties);\n }\n}\n\n/**\n * @fileoverview\n * @suppress {missingRequire}\n */\nfunction patchBrowser(Zone) {\n Zone.__load_patch('legacy', (global) => {\n const legacyPatch = global[Zone.__symbol__('legacyPatch')];\n if (legacyPatch) {\n legacyPatch();\n }\n });\n Zone.__load_patch('timers', (global) => {\n const set = 'set';\n const clear = 'clear';\n patchTimer(global, set, clear, 'Timeout');\n patchTimer(global, set, clear, 'Interval');\n patchTimer(global, set, clear, 'Immediate');\n });\n Zone.__load_patch('requestAnimationFrame', (global) => {\n patchTimer(global, 'request', 'cancel', 'AnimationFrame');\n patchTimer(global, 'mozRequest', 'mozCancel', 'AnimationFrame');\n patchTimer(global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');\n });\n Zone.__load_patch('blocking', (global, Zone) => {\n const blockingMethods = ['alert', 'prompt', 'confirm'];\n for (let i = 0; i < blockingMethods.length; i++) {\n const name = blockingMethods[i];\n patchMethod(global, name, (delegate, symbol, name) => {\n return function (s, args) {\n return Zone.current.run(delegate, global, args, name);\n };\n });\n }\n });\n Zone.__load_patch('EventTarget', (global, Zone, api) => {\n patchEvent(global, api);\n eventTargetPatch(global, api);\n // patch XMLHttpRequestEventTarget's addEventListener/removeEventListener\n const XMLHttpRequestEventTarget = global['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget && XMLHttpRequestEventTarget.prototype) {\n api.patchEventTarget(global, api, [XMLHttpRequestEventTarget.prototype]);\n }\n });\n Zone.__load_patch('MutationObserver', (global, Zone, api) => {\n patchClass('MutationObserver');\n patchClass('WebKitMutationObserver');\n });\n Zone.__load_patch('IntersectionObserver', (global, Zone, api) => {\n patchClass('IntersectionObserver');\n });\n Zone.__load_patch('FileReader', (global, Zone, api) => {\n patchClass('FileReader');\n });\n Zone.__load_patch('on_property', (global, Zone, api) => {\n propertyDescriptorPatch(api, global);\n });\n Zone.__load_patch('customElements', (global, Zone, api) => {\n patchCustomElements(global, api);\n });\n Zone.__load_patch('XHR', (global, Zone) => {\n // Treat XMLHttpRequest as a macrotask.\n patchXHR(global);\n const XHR_TASK = zoneSymbol('xhrTask');\n const XHR_SYNC = zoneSymbol('xhrSync');\n const XHR_LISTENER = zoneSymbol('xhrListener');\n const XHR_SCHEDULED = zoneSymbol('xhrScheduled');\n const XHR_URL = zoneSymbol('xhrURL');\n const XHR_ERROR_BEFORE_SCHEDULED = zoneSymbol('xhrErrorBeforeScheduled');\n function patchXHR(window) {\n const XMLHttpRequest = window['XMLHttpRequest'];\n if (!XMLHttpRequest) {\n // XMLHttpRequest is not available in service worker\n return;\n }\n const XMLHttpRequestPrototype = XMLHttpRequest.prototype;\n function findPendingTask(target) {\n return target[XHR_TASK];\n }\n let oriAddListener = XMLHttpRequestPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n let oriRemoveListener = XMLHttpRequestPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n if (!oriAddListener) {\n const XMLHttpRequestEventTarget = window['XMLHttpRequestEventTarget'];\n if (XMLHttpRequestEventTarget) {\n const XMLHttpRequestEventTargetPrototype = XMLHttpRequestEventTarget.prototype;\n oriAddListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = XMLHttpRequestEventTargetPrototype[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n }\n const READY_STATE_CHANGE = 'readystatechange';\n const SCHEDULED = 'scheduled';\n function scheduleTask(task) {\n const data = task.data;\n const target = data.target;\n target[XHR_SCHEDULED] = false;\n target[XHR_ERROR_BEFORE_SCHEDULED] = false;\n // remove existing event listener\n const listener = target[XHR_LISTENER];\n if (!oriAddListener) {\n oriAddListener = target[ZONE_SYMBOL_ADD_EVENT_LISTENER];\n oriRemoveListener = target[ZONE_SYMBOL_REMOVE_EVENT_LISTENER];\n }\n if (listener) {\n oriRemoveListener.call(target, READY_STATE_CHANGE, listener);\n }\n const newListener = (target[XHR_LISTENER] = () => {\n if (target.readyState === target.DONE) {\n // sometimes on some browsers XMLHttpRequest will fire onreadystatechange with\n // readyState=4 multiple times, so we need to check task state here\n if (!data.aborted && target[XHR_SCHEDULED] && task.state === SCHEDULED) {\n // check whether the xhr has registered onload listener\n // if that is the case, the task should invoke after all\n // onload listeners finish.\n // Also if the request failed without response (status = 0), the load event handler\n // will not be triggered, in that case, we should also invoke the placeholder callback\n // to close the XMLHttpRequest::send macroTask.\n // https://github.com/angular/angular/issues/38795\n const loadTasks = target[Zone.__symbol__('loadfalse')];\n if (target.status !== 0 && loadTasks && loadTasks.length > 0) {\n const oriInvoke = task.invoke;\n task.invoke = function () {\n // need to load the tasks again, because in other\n // load listener, they may remove themselves\n const loadTasks = target[Zone.__symbol__('loadfalse')];\n for (let i = 0; i < loadTasks.length; i++) {\n if (loadTasks[i] === task) {\n loadTasks.splice(i, 1);\n }\n }\n if (!data.aborted && task.state === SCHEDULED) {\n oriInvoke.call(task);\n }\n };\n loadTasks.push(task);\n }\n else {\n task.invoke();\n }\n }\n else if (!data.aborted && target[XHR_SCHEDULED] === false) {\n // error occurs when xhr.send()\n target[XHR_ERROR_BEFORE_SCHEDULED] = true;\n }\n }\n });\n oriAddListener.call(target, READY_STATE_CHANGE, newListener);\n const storedTask = target[XHR_TASK];\n if (!storedTask) {\n target[XHR_TASK] = task;\n }\n sendNative.apply(target, data.args);\n target[XHR_SCHEDULED] = true;\n return task;\n }\n function placeholderCallback() { }\n function clearTask(task) {\n const data = task.data;\n // Note - ideally, we would call data.target.removeEventListener here, but it's too late\n // to prevent it from firing. So instead, we store info for the event listener.\n data.aborted = true;\n return abortNative.apply(data.target, data.args);\n }\n const openNative = patchMethod(XMLHttpRequestPrototype, 'open', () => function (self, args) {\n self[XHR_SYNC] = args[2] == false;\n self[XHR_URL] = args[1];\n return openNative.apply(self, args);\n });\n const XMLHTTPREQUEST_SOURCE = 'XMLHttpRequest.send';\n const fetchTaskAborting = zoneSymbol('fetchTaskAborting');\n const fetchTaskScheduling = zoneSymbol('fetchTaskScheduling');\n const sendNative = patchMethod(XMLHttpRequestPrototype, 'send', () => function (self, args) {\n if (Zone.current[fetchTaskScheduling] === true) {\n // a fetch is scheduling, so we are using xhr to polyfill fetch\n // and because we already schedule macroTask for fetch, we should\n // not schedule a macroTask for xhr again\n return sendNative.apply(self, args);\n }\n if (self[XHR_SYNC]) {\n // if the XHR is sync there is no task to schedule, just execute the code.\n return sendNative.apply(self, args);\n }\n else {\n const options = {\n target: self,\n url: self[XHR_URL],\n isPeriodic: false,\n args: args,\n aborted: false,\n };\n const task = scheduleMacroTaskWithCurrentZone(XMLHTTPREQUEST_SOURCE, placeholderCallback, options, scheduleTask, clearTask);\n if (self &&\n self[XHR_ERROR_BEFORE_SCHEDULED] === true &&\n !options.aborted &&\n task.state === SCHEDULED) {\n // xhr request throw error when send\n // we should invoke task instead of leaving a scheduled\n // pending macroTask\n task.invoke();\n }\n }\n });\n const abortNative = patchMethod(XMLHttpRequestPrototype, 'abort', () => function (self, args) {\n const task = findPendingTask(self);\n if (task && typeof task.type == 'string') {\n // If the XHR has already completed, do nothing.\n // If the XHR has already been aborted, do nothing.\n // Fix #569, call abort multiple times before done will cause\n // macroTask task count be negative number\n if (task.cancelFn == null || (task.data && task.data.aborted)) {\n return;\n }\n task.zone.cancelTask(task);\n }\n else if (Zone.current[fetchTaskAborting] === true) {\n // the abort is called from fetch polyfill, we need to call native abort of XHR.\n return abortNative.apply(self, args);\n }\n // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no\n // task\n // to cancel. Do nothing.\n });\n }\n });\n Zone.__load_patch('geolocation', (global) => {\n /// GEO_LOCATION\n if (global['navigator'] && global['navigator'].geolocation) {\n patchPrototype(global['navigator'].geolocation, ['getCurrentPosition', 'watchPosition']);\n }\n });\n Zone.__load_patch('PromiseRejectionEvent', (global, Zone) => {\n // handle unhandled promise rejection\n function findPromiseRejectionHandler(evtName) {\n return function (e) {\n const eventTasks = findEventTasks(global, evtName);\n eventTasks.forEach((eventTask) => {\n // windows has added unhandledrejection event listener\n // trigger the event listener\n const PromiseRejectionEvent = global['PromiseRejectionEvent'];\n if (PromiseRejectionEvent) {\n const evt = new PromiseRejectionEvent(evtName, {\n promise: e.promise,\n reason: e.rejection,\n });\n eventTask.invoke(evt);\n }\n });\n };\n }\n if (global['PromiseRejectionEvent']) {\n Zone[zoneSymbol('unhandledPromiseRejectionHandler')] =\n findPromiseRejectionHandler('unhandledrejection');\n Zone[zoneSymbol('rejectionHandledHandler')] =\n findPromiseRejectionHandler('rejectionhandled');\n }\n });\n Zone.__load_patch('queueMicrotask', (global, Zone, api) => {\n patchQueueMicrotask(global, api);\n });\n}\n\nfunction patchPromise(Zone) {\n Zone.__load_patch('ZoneAwarePromise', (global, Zone, api) => {\n const ObjectGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n const ObjectDefineProperty = Object.defineProperty;\n function readableObjectToString(obj) {\n if (obj && obj.toString === Object.prototype.toString) {\n const className = obj.constructor && obj.constructor.name;\n return (className ? className : '') + ': ' + JSON.stringify(obj);\n }\n return obj ? obj.toString() : Object.prototype.toString.call(obj);\n }\n const __symbol__ = api.symbol;\n const _uncaughtPromiseErrors = [];\n const isDisableWrappingUncaughtPromiseRejection = global[__symbol__('DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION')] !== false;\n const symbolPromise = __symbol__('Promise');\n const symbolThen = __symbol__('then');\n const creationTrace = '__creationTrace__';\n api.onUnhandledError = (e) => {\n if (api.showUncaughtError()) {\n const rejection = e && e.rejection;\n if (rejection) {\n console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection, rejection instanceof Error ? rejection.stack : undefined);\n }\n else {\n console.error(e);\n }\n }\n };\n api.microtaskDrainDone = () => {\n while (_uncaughtPromiseErrors.length) {\n const uncaughtPromiseError = _uncaughtPromiseErrors.shift();\n try {\n uncaughtPromiseError.zone.runGuarded(() => {\n if (uncaughtPromiseError.throwOriginal) {\n throw uncaughtPromiseError.rejection;\n }\n throw uncaughtPromiseError;\n });\n }\n catch (error) {\n handleUnhandledRejection(error);\n }\n }\n };\n const UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL = __symbol__('unhandledPromiseRejectionHandler');\n function handleUnhandledRejection(e) {\n api.onUnhandledError(e);\n try {\n const handler = Zone[UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL];\n if (typeof handler === 'function') {\n handler.call(this, e);\n }\n }\n catch (err) { }\n }\n function isThenable(value) {\n return value && typeof value.then === 'function';\n }\n function forwardResolution(value) {\n return value;\n }\n function forwardRejection(rejection) {\n return ZoneAwarePromise.reject(rejection);\n }\n const symbolState = __symbol__('state');\n const symbolValue = __symbol__('value');\n const symbolFinally = __symbol__('finally');\n const symbolParentPromiseValue = __symbol__('parentPromiseValue');\n const symbolParentPromiseState = __symbol__('parentPromiseState');\n const source = 'Promise.then';\n const UNRESOLVED = null;\n const RESOLVED = true;\n const REJECTED = false;\n const REJECTED_NO_CATCH = 0;\n function makeResolver(promise, state) {\n return (v) => {\n try {\n resolvePromise(promise, state, v);\n }\n catch (err) {\n resolvePromise(promise, false, err);\n }\n // Do not return value or you will break the Promise spec.\n };\n }\n const once = function () {\n let wasCalled = false;\n return function wrapper(wrappedFunction) {\n return function () {\n if (wasCalled) {\n return;\n }\n wasCalled = true;\n wrappedFunction.apply(null, arguments);\n };\n };\n };\n const TYPE_ERROR = 'Promise resolved with itself';\n const CURRENT_TASK_TRACE_SYMBOL = __symbol__('currentTaskTrace');\n // Promise Resolution\n function resolvePromise(promise, state, value) {\n const onceWrapper = once();\n if (promise === value) {\n throw new TypeError(TYPE_ERROR);\n }\n if (promise[symbolState] === UNRESOLVED) {\n // should only get value.then once based on promise spec.\n let then = null;\n try {\n if (typeof value === 'object' || typeof value === 'function') {\n then = value && value.then;\n }\n }\n catch (err) {\n onceWrapper(() => {\n resolvePromise(promise, false, err);\n })();\n return promise;\n }\n // if (value instanceof ZoneAwarePromise) {\n if (state !== REJECTED &&\n value instanceof ZoneAwarePromise &&\n value.hasOwnProperty(symbolState) &&\n value.hasOwnProperty(symbolValue) &&\n value[symbolState] !== UNRESOLVED) {\n clearRejectedNoCatch(value);\n resolvePromise(promise, value[symbolState], value[symbolValue]);\n }\n else if (state !== REJECTED && typeof then === 'function') {\n try {\n then.call(value, onceWrapper(makeResolver(promise, state)), onceWrapper(makeResolver(promise, false)));\n }\n catch (err) {\n onceWrapper(() => {\n resolvePromise(promise, false, err);\n })();\n }\n }\n else {\n promise[symbolState] = state;\n const queue = promise[symbolValue];\n promise[symbolValue] = value;\n if (promise[symbolFinally] === symbolFinally) {\n // the promise is generated by Promise.prototype.finally\n if (state === RESOLVED) {\n // the state is resolved, should ignore the value\n // and use parent promise value\n promise[symbolState] = promise[symbolParentPromiseState];\n promise[symbolValue] = promise[symbolParentPromiseValue];\n }\n }\n // record task information in value when error occurs, so we can\n // do some additional work such as render longStackTrace\n if (state === REJECTED && value instanceof Error) {\n // check if longStackTraceZone is here\n const trace = Zone.currentTask &&\n Zone.currentTask.data &&\n Zone.currentTask.data[creationTrace];\n if (trace) {\n // only keep the long stack trace into error when in longStackTraceZone\n ObjectDefineProperty(value, CURRENT_TASK_TRACE_SYMBOL, {\n configurable: true,\n enumerable: false,\n writable: true,\n value: trace,\n });\n }\n }\n for (let i = 0; i < queue.length;) {\n scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);\n }\n if (queue.length == 0 && state == REJECTED) {\n promise[symbolState] = REJECTED_NO_CATCH;\n let uncaughtPromiseError = value;\n try {\n // Here we throws a new Error to print more readable error log\n // and if the value is not an error, zone.js builds an `Error`\n // Object here to attach the stack information.\n throw new Error('Uncaught (in promise): ' +\n readableObjectToString(value) +\n (value && value.stack ? '\\n' + value.stack : ''));\n }\n catch (err) {\n uncaughtPromiseError = err;\n }\n if (isDisableWrappingUncaughtPromiseRejection) {\n // If disable wrapping uncaught promise reject\n // use the value instead of wrapping it.\n uncaughtPromiseError.throwOriginal = true;\n }\n uncaughtPromiseError.rejection = value;\n uncaughtPromiseError.promise = promise;\n uncaughtPromiseError.zone = Zone.current;\n uncaughtPromiseError.task = Zone.currentTask;\n _uncaughtPromiseErrors.push(uncaughtPromiseError);\n api.scheduleMicroTask(); // to make sure that it is running\n }\n }\n }\n // Resolving an already resolved promise is a noop.\n return promise;\n }\n const REJECTION_HANDLED_HANDLER = __symbol__('rejectionHandledHandler');\n function clearRejectedNoCatch(promise) {\n if (promise[symbolState] === REJECTED_NO_CATCH) {\n // if the promise is rejected no catch status\n // and queue.length > 0, means there is a error handler\n // here to handle the rejected promise, we should trigger\n // windows.rejectionhandled eventHandler or nodejs rejectionHandled\n // eventHandler\n try {\n const handler = Zone[REJECTION_HANDLED_HANDLER];\n if (handler && typeof handler === 'function') {\n handler.call(this, { rejection: promise[symbolValue], promise: promise });\n }\n }\n catch (err) { }\n promise[symbolState] = REJECTED;\n for (let i = 0; i < _uncaughtPromiseErrors.length; i++) {\n if (promise === _uncaughtPromiseErrors[i].promise) {\n _uncaughtPromiseErrors.splice(i, 1);\n }\n }\n }\n }\n function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {\n clearRejectedNoCatch(promise);\n const promiseState = promise[symbolState];\n const delegate = promiseState\n ? typeof onFulfilled === 'function'\n ? onFulfilled\n : forwardResolution\n : typeof onRejected === 'function'\n ? onRejected\n : forwardRejection;\n zone.scheduleMicroTask(source, () => {\n try {\n const parentPromiseValue = promise[symbolValue];\n const isFinallyPromise = !!chainPromise && symbolFinally === chainPromise[symbolFinally];\n if (isFinallyPromise) {\n // if the promise is generated from finally call, keep parent promise's state and value\n chainPromise[symbolParentPromiseValue] = parentPromiseValue;\n chainPromise[symbolParentPromiseState] = promiseState;\n }\n // should not pass value to finally callback\n const value = zone.run(delegate, undefined, isFinallyPromise && delegate !== forwardRejection && delegate !== forwardResolution\n ? []\n : [parentPromiseValue]);\n resolvePromise(chainPromise, true, value);\n }\n catch (error) {\n // if error occurs, should always return this error\n resolvePromise(chainPromise, false, error);\n }\n }, chainPromise);\n }\n const ZONE_AWARE_PROMISE_TO_STRING = 'function ZoneAwarePromise() { [native code] }';\n const noop = function () { };\n const AggregateError = global.AggregateError;\n class ZoneAwarePromise {\n static toString() {\n return ZONE_AWARE_PROMISE_TO_STRING;\n }\n static resolve(value) {\n if (value instanceof ZoneAwarePromise) {\n return value;\n }\n return resolvePromise(new this(null), RESOLVED, value);\n }\n static reject(error) {\n return resolvePromise(new this(null), REJECTED, error);\n }\n static withResolvers() {\n const result = {};\n result.promise = new ZoneAwarePromise((res, rej) => {\n result.resolve = res;\n result.reject = rej;\n });\n return result;\n }\n static any(values) {\n if (!values || typeof values[Symbol.iterator] !== 'function') {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n const promises = [];\n let count = 0;\n try {\n for (let v of values) {\n count++;\n promises.push(ZoneAwarePromise.resolve(v));\n }\n }\n catch (err) {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n if (count === 0) {\n return Promise.reject(new AggregateError([], 'All promises were rejected'));\n }\n let finished = false;\n const errors = [];\n return new ZoneAwarePromise((resolve, reject) => {\n for (let i = 0; i < promises.length; i++) {\n promises[i].then((v) => {\n if (finished) {\n return;\n }\n finished = true;\n resolve(v);\n }, (err) => {\n errors.push(err);\n count--;\n if (count === 0) {\n finished = true;\n reject(new AggregateError(errors, 'All promises were rejected'));\n }\n });\n }\n });\n }\n static race(values) {\n let resolve;\n let reject;\n let promise = new this((res, rej) => {\n resolve = res;\n reject = rej;\n });\n function onResolve(value) {\n resolve(value);\n }\n function onReject(error) {\n reject(error);\n }\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n value.then(onResolve, onReject);\n }\n return promise;\n }\n static all(values) {\n return ZoneAwarePromise.allWithCallback(values);\n }\n static allSettled(values) {\n const P = this && this.prototype instanceof ZoneAwarePromise ? this : ZoneAwarePromise;\n return P.allWithCallback(values, {\n thenCallback: (value) => ({ status: 'fulfilled', value }),\n errorCallback: (err) => ({ status: 'rejected', reason: err }),\n });\n }\n static allWithCallback(values, callback) {\n let resolve;\n let reject;\n let promise = new this((res, rej) => {\n resolve = res;\n reject = rej;\n });\n // Start at 2 to prevent prematurely resolving if .then is called immediately.\n let unresolvedCount = 2;\n let valueIndex = 0;\n const resolvedValues = [];\n for (let value of values) {\n if (!isThenable(value)) {\n value = this.resolve(value);\n }\n const curValueIndex = valueIndex;\n try {\n value.then((value) => {\n resolvedValues[curValueIndex] = callback ? callback.thenCallback(value) : value;\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }, (err) => {\n if (!callback) {\n reject(err);\n }\n else {\n resolvedValues[curValueIndex] = callback.errorCallback(err);\n unresolvedCount--;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n }\n });\n }\n catch (thenErr) {\n reject(thenErr);\n }\n unresolvedCount++;\n valueIndex++;\n }\n // Make the unresolvedCount zero-based again.\n unresolvedCount -= 2;\n if (unresolvedCount === 0) {\n resolve(resolvedValues);\n }\n return promise;\n }\n constructor(executor) {\n const promise = this;\n if (!(promise instanceof ZoneAwarePromise)) {\n throw new Error('Must be an instanceof Promise.');\n }\n promise[symbolState] = UNRESOLVED;\n promise[symbolValue] = []; // queue;\n try {\n const onceWrapper = once();\n executor &&\n executor(onceWrapper(makeResolver(promise, RESOLVED)), onceWrapper(makeResolver(promise, REJECTED)));\n }\n catch (error) {\n resolvePromise(promise, false, error);\n }\n }\n get [Symbol.toStringTag]() {\n return 'Promise';\n }\n get [Symbol.species]() {\n return ZoneAwarePromise;\n }\n then(onFulfilled, onRejected) {\n // We must read `Symbol.species` safely because `this` may be anything. For instance, `this`\n // may be an object without a prototype (created through `Object.create(null)`); thus\n // `this.constructor` will be undefined. One of the use cases is SystemJS creating\n // prototype-less objects (modules) via `Object.create(null)`. The SystemJS creates an empty\n // object and copies promise properties into that object (within the `getOrCreateLoad`\n // function). The zone.js then checks if the resolved value has the `then` method and\n // invokes it with the `value` context. Otherwise, this will throw an error: `TypeError:\n // Cannot read properties of undefined (reading 'Symbol(Symbol.species)')`.\n let C = this.constructor?.[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = this.constructor || ZoneAwarePromise;\n }\n const chainPromise = new C(noop);\n const zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);\n }\n return chainPromise;\n }\n catch(onRejected) {\n return this.then(null, onRejected);\n }\n finally(onFinally) {\n // See comment on the call to `then` about why thee `Symbol.species` is safely accessed.\n let C = this.constructor?.[Symbol.species];\n if (!C || typeof C !== 'function') {\n C = ZoneAwarePromise;\n }\n const chainPromise = new C(noop);\n chainPromise[symbolFinally] = symbolFinally;\n const zone = Zone.current;\n if (this[symbolState] == UNRESOLVED) {\n this[symbolValue].push(zone, chainPromise, onFinally, onFinally);\n }\n else {\n scheduleResolveOrReject(this, zone, chainPromise, onFinally, onFinally);\n }\n return chainPromise;\n }\n }\n // Protect against aggressive optimizers dropping seemingly unused properties.\n // E.g. Closure Compiler in advanced mode.\n ZoneAwarePromise['resolve'] = ZoneAwarePromise.resolve;\n ZoneAwarePromise['reject'] = ZoneAwarePromise.reject;\n ZoneAwarePromise['race'] = ZoneAwarePromise.race;\n ZoneAwarePromise['all'] = ZoneAwarePromise.all;\n const NativePromise = (global[symbolPromise] = global['Promise']);\n global['Promise'] = ZoneAwarePromise;\n const symbolThenPatched = __symbol__('thenPatched');\n function patchThen(Ctor) {\n const proto = Ctor.prototype;\n const prop = ObjectGetOwnPropertyDescriptor(proto, 'then');\n if (prop && (prop.writable === false || !prop.configurable)) {\n // check Ctor.prototype.then propertyDescriptor is writable or not\n // in meteor env, writable is false, we should ignore such case\n return;\n }\n const originalThen = proto.then;\n // Keep a reference to the original method.\n proto[symbolThen] = originalThen;\n Ctor.prototype.then = function (onResolve, onReject) {\n const wrapped = new ZoneAwarePromise((resolve, reject) => {\n originalThen.call(this, resolve, reject);\n });\n return wrapped.then(onResolve, onReject);\n };\n Ctor[symbolThenPatched] = true;\n }\n api.patchThen = patchThen;\n function zoneify(fn) {\n return function (self, args) {\n let resultPromise = fn.apply(self, args);\n if (resultPromise instanceof ZoneAwarePromise) {\n return resultPromise;\n }\n let ctor = resultPromise.constructor;\n if (!ctor[symbolThenPatched]) {\n patchThen(ctor);\n }\n return resultPromise;\n };\n }\n if (NativePromise) {\n patchThen(NativePromise);\n patchMethod(global, 'fetch', (delegate) => zoneify(delegate));\n }\n // This is not part of public API, but it is useful for tests, so we expose it.\n Promise[Zone.__symbol__('uncaughtPromiseErrors')] = _uncaughtPromiseErrors;\n return ZoneAwarePromise;\n });\n}\n\nfunction patchToString(Zone) {\n // override Function.prototype.toString to make zone.js patched function\n // look like native function\n Zone.__load_patch('toString', (global) => {\n // patch Func.prototype.toString to let them look like native\n const originalFunctionToString = Function.prototype.toString;\n const ORIGINAL_DELEGATE_SYMBOL = zoneSymbol('OriginalDelegate');\n const PROMISE_SYMBOL = zoneSymbol('Promise');\n const ERROR_SYMBOL = zoneSymbol('Error');\n const newFunctionToString = function toString() {\n if (typeof this === 'function') {\n const originalDelegate = this[ORIGINAL_DELEGATE_SYMBOL];\n if (originalDelegate) {\n if (typeof originalDelegate === 'function') {\n return originalFunctionToString.call(originalDelegate);\n }\n else {\n return Object.prototype.toString.call(originalDelegate);\n }\n }\n if (this === Promise) {\n const nativePromise = global[PROMISE_SYMBOL];\n if (nativePromise) {\n return originalFunctionToString.call(nativePromise);\n }\n }\n if (this === Error) {\n const nativeError = global[ERROR_SYMBOL];\n if (nativeError) {\n return originalFunctionToString.call(nativeError);\n }\n }\n }\n return originalFunctionToString.call(this);\n };\n newFunctionToString[ORIGINAL_DELEGATE_SYMBOL] = originalFunctionToString;\n Function.prototype.toString = newFunctionToString;\n // patch Object.prototype.toString to let them look like native\n const originalObjectToString = Object.prototype.toString;\n const PROMISE_OBJECT_TO_STRING = '[object Promise]';\n Object.prototype.toString = function () {\n if (typeof Promise === 'function' && this instanceof Promise) {\n return PROMISE_OBJECT_TO_STRING;\n }\n return originalObjectToString.call(this);\n };\n });\n}\n\nfunction patchCallbacks(api, target, targetName, method, callbacks) {\n const symbol = Zone.__symbol__(method);\n if (target[symbol]) {\n return;\n }\n const nativeDelegate = (target[symbol] = target[method]);\n target[method] = function (name, opts, options) {\n if (opts && opts.prototype) {\n callbacks.forEach(function (callback) {\n const source = `${targetName}.${method}::` + callback;\n const prototype = opts.prototype;\n // Note: the `patchCallbacks` is used for patching the `document.registerElement` and\n // `customElements.define`. We explicitly wrap the patching code into try-catch since\n // callbacks may be already patched by other web components frameworks (e.g. LWC), and they\n // make those properties non-writable. This means that patching callback will throw an error\n // `cannot assign to read-only property`. See this code as an example:\n // https://github.com/salesforce/lwc/blob/master/packages/@lwc/engine-core/src/framework/base-bridge-element.ts#L180-L186\n // We don't want to stop the application rendering if we couldn't patch some\n // callback, e.g. `attributeChangedCallback`.\n try {\n if (prototype.hasOwnProperty(callback)) {\n const descriptor = api.ObjectGetOwnPropertyDescriptor(prototype, callback);\n if (descriptor && descriptor.value) {\n descriptor.value = api.wrapWithCurrentZone(descriptor.value, source);\n api._redefineProperty(opts.prototype, callback, descriptor);\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n }\n else if (prototype[callback]) {\n prototype[callback] = api.wrapWithCurrentZone(prototype[callback], source);\n }\n }\n catch {\n // Note: we leave the catch block empty since there's no way to handle the error related\n // to non-writable property.\n }\n });\n }\n return nativeDelegate.call(target, name, opts, options);\n };\n api.attachOriginToPatched(target[method], nativeDelegate);\n}\n\nfunction patchUtil(Zone) {\n Zone.__load_patch('util', (global, Zone, api) => {\n // Collect native event names by looking at properties\n // on the global namespace, e.g. 'onclick'.\n const eventNames = getOnEventNames(global);\n api.patchOnProperties = patchOnProperties;\n api.patchMethod = patchMethod;\n api.bindArguments = bindArguments;\n api.patchMacroTask = patchMacroTask;\n // In earlier version of zone.js (<0.9.0), we use env name `__zone_symbol__BLACK_LISTED_EVENTS`\n // to define which events will not be patched by `Zone.js`. In newer version (>=0.9.0), we\n // change the env name to `__zone_symbol__UNPATCHED_EVENTS` to keep the name consistent with\n // angular repo. The `__zone_symbol__BLACK_LISTED_EVENTS` is deprecated, but it is still be\n // supported for backwards compatibility.\n const SYMBOL_BLACK_LISTED_EVENTS = Zone.__symbol__('BLACK_LISTED_EVENTS');\n const SYMBOL_UNPATCHED_EVENTS = Zone.__symbol__('UNPATCHED_EVENTS');\n if (global[SYMBOL_UNPATCHED_EVENTS]) {\n global[SYMBOL_BLACK_LISTED_EVENTS] = global[SYMBOL_UNPATCHED_EVENTS];\n }\n if (global[SYMBOL_BLACK_LISTED_EVENTS]) {\n Zone[SYMBOL_BLACK_LISTED_EVENTS] = Zone[SYMBOL_UNPATCHED_EVENTS] =\n global[SYMBOL_BLACK_LISTED_EVENTS];\n }\n api.patchEventPrototype = patchEventPrototype;\n api.patchEventTarget = patchEventTarget;\n api.isIEOrEdge = isIEOrEdge;\n api.ObjectDefineProperty = ObjectDefineProperty;\n api.ObjectGetOwnPropertyDescriptor = ObjectGetOwnPropertyDescriptor;\n api.ObjectCreate = ObjectCreate;\n api.ArraySlice = ArraySlice;\n api.patchClass = patchClass;\n api.wrapWithCurrentZone = wrapWithCurrentZone;\n api.filterProperties = filterProperties;\n api.attachOriginToPatched = attachOriginToPatched;\n api._redefineProperty = Object.defineProperty;\n api.patchCallbacks = patchCallbacks;\n api.getGlobalObjects = () => ({\n globalSources,\n zoneSymbolEventNames,\n eventNames,\n isBrowser,\n isMix,\n isNode,\n TRUE_STR,\n FALSE_STR,\n ZONE_SYMBOL_PREFIX,\n ADD_EVENT_LISTENER_STR,\n REMOVE_EVENT_LISTENER_STR,\n });\n });\n}\n\nfunction patchCommon(Zone) {\n patchPromise(Zone);\n patchToString(Zone);\n patchUtil(Zone);\n}\n\nconst Zone$1 = loadZone();\npatchCommon(Zone$1);\npatchBrowser(Zone$1);\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport var EventNames;\n(function (EventNames) {\n EventNames[\"METHOD_OPEN\"] = \"open\";\n EventNames[\"METHOD_SEND\"] = \"send\";\n EventNames[\"EVENT_ABORT\"] = \"abort\";\n EventNames[\"EVENT_ERROR\"] = \"error\";\n EventNames[\"EVENT_LOAD\"] = \"loaded\";\n EventNames[\"EVENT_TIMEOUT\"] = \"timeout\";\n})(EventNames || (EventNames = {}));\n//# sourceMappingURL=EventNames.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Much of the logic here overlaps with the same utils file in opentelemetry-instrumentation-fetch\n// These may be unified in the future.\nimport * as api from '@opentelemetry/api';\nimport { getStringListFromEnv } from '@opentelemetry/core';\nconst DIAG_LOGGER = api.diag.createComponentLogger({\n namespace: '@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils',\n});\nfunction isDocument(value) {\n return typeof Document !== 'undefined' && value instanceof Document;\n}\n/**\n * Helper function to determine payload content length for XHR requests\n * @param body\n * @returns content length\n */\nexport function getXHRBodyLength(body) {\n if (isDocument(body)) {\n return new XMLSerializer().serializeToString(document).length;\n }\n // XMLHttpRequestBodyInit expands to the following:\n if (typeof body === 'string') {\n return getByteLength(body);\n }\n if (body instanceof Blob) {\n return body.size;\n }\n if (body instanceof FormData) {\n return getFormDataSize(body);\n }\n if (body instanceof URLSearchParams) {\n return getByteLength(body.toString());\n }\n // ArrayBuffer | ArrayBufferView\n if (body.byteLength !== undefined) {\n return body.byteLength;\n }\n DIAG_LOGGER.warn('unknown body type');\n return undefined;\n}\nconst TEXT_ENCODER = new TextEncoder();\nfunction getByteLength(s) {\n return TEXT_ENCODER.encode(s).byteLength;\n}\nfunction getFormDataSize(formData) {\n let size = 0;\n for (const [key, value] of formData.entries()) {\n size += key.length;\n if (value instanceof Blob) {\n size += value.size;\n }\n else {\n size += value.length;\n }\n }\n return size;\n}\n/**\n * Normalize an HTTP request method string per `http.request.method` spec\n * https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md#http-client-span\n */\nexport function normalizeHttpRequestMethod(method) {\n const knownMethods = getKnownMethods();\n const methUpper = method.toUpperCase();\n if (methUpper in knownMethods) {\n return methUpper;\n }\n else {\n return '_OTHER';\n }\n}\nconst DEFAULT_KNOWN_METHODS = {\n CONNECT: true,\n DELETE: true,\n GET: true,\n HEAD: true,\n OPTIONS: true,\n PATCH: true,\n POST: true,\n PUT: true,\n TRACE: true,\n};\nlet knownMethods;\nfunction getKnownMethods() {\n if (knownMethods === undefined) {\n const cfgMethods = getStringListFromEnv('OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS');\n if (cfgMethods && cfgMethods.length > 0) {\n knownMethods = {};\n cfgMethods.forEach(m => {\n knownMethods[m] = true;\n });\n }\n else {\n knownMethods = DEFAULT_KNOWN_METHODS;\n }\n }\n return knownMethods;\n}\nconst HTTP_PORT_FROM_PROTOCOL = {\n 'https:': '443',\n 'http:': '80',\n};\nexport function serverPortFromUrl(url) {\n const serverPort = Number(url.port || HTTP_PORT_FROM_PROTOCOL[url.protocol]);\n // Guard with `if (serverPort)` because `Number('') === 0`.\n if (serverPort && !isNaN(serverPort)) {\n return serverPort;\n }\n else {\n return undefined;\n }\n}\n//# sourceMappingURL=utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.203.0';\n//# sourceMappingURL=version.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/http.md\n */\nexport var AttributeNames;\n(function (AttributeNames) {\n AttributeNames[\"HTTP_STATUS_TEXT\"] = \"http.status_text\";\n})(AttributeNames || (AttributeNames = {}));\n//# sourceMappingURL=AttributeNames.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as api from '@opentelemetry/api';\nimport { SemconvStability, semconvStabilityFromStr, isWrapped, InstrumentationBase, safeExecuteInTheMiddle, } from '@opentelemetry/instrumentation';\nimport { hrTime, isUrlIgnored, otperformance } from '@opentelemetry/core';\nimport { addSpanNetworkEvents, getResource, PerformanceTimingNames as PTN, shouldPropagateTraceHeaders, parseUrl, } from '@opentelemetry/sdk-trace-web';\nimport { ATTR_ERROR_TYPE, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_REQUEST_METHOD_ORIGINAL, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, ATTR_URL_FULL, } from '@opentelemetry/semantic-conventions';\nimport { ATTR_HTTP_HOST, ATTR_HTTP_METHOD, ATTR_HTTP_SCHEME, ATTR_HTTP_STATUS_CODE, ATTR_HTTP_URL, ATTR_HTTP_USER_AGENT, ATTR_HTTP_REQUEST_BODY_SIZE, ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED, } from './semconv';\nimport { EventNames } from './enums/EventNames';\nimport { normalizeHttpRequestMethod, serverPortFromUrl, getXHRBodyLength, } from './utils';\nimport { VERSION } from './version';\nimport { AttributeNames } from './enums/AttributeNames';\n// how long to wait for observer to collect information about resources\n// this is needed as event \"load\" is called before observer\n// hard to say how long it should really wait, seems like 300ms is\n// safe enough\nconst OBSERVER_WAIT_TIME_MS = 300;\n/**\n * This class represents a XMLHttpRequest plugin for auto instrumentation\n */\nexport class XMLHttpRequestInstrumentation extends InstrumentationBase {\n component = 'xml-http-request';\n version = VERSION;\n moduleName = this.component;\n _tasksCount = 0;\n _xhrMem = new WeakMap();\n _usedResources = new WeakSet();\n _semconvStability;\n constructor(config = {}) {\n super('@opentelemetry/instrumentation-xml-http-request', VERSION, config);\n this._semconvStability = semconvStabilityFromStr('http', config?.semconvStabilityOptIn);\n }\n init() { }\n /**\n * Adds custom headers to XMLHttpRequest\n * @param xhr\n * @param spanUrl\n * @private\n */\n _addHeaders(xhr, spanUrl) {\n const url = parseUrl(spanUrl).href;\n if (!shouldPropagateTraceHeaders(url, this.getConfig().propagateTraceHeaderCorsUrls)) {\n const headers = {};\n api.propagation.inject(api.context.active(), headers);\n if (Object.keys(headers).length > 0) {\n this._diag.debug('headers inject skipped due to CORS policy');\n }\n return;\n }\n const headers = {};\n api.propagation.inject(api.context.active(), headers);\n Object.keys(headers).forEach(key => {\n xhr.setRequestHeader(key, String(headers[key]));\n });\n }\n /**\n * Add cors pre flight child span\n * @param span\n * @param corsPreFlightRequest\n * @private\n */\n _addChildSpan(span, corsPreFlightRequest) {\n api.context.with(api.trace.setSpan(api.context.active(), span), () => {\n const childSpan = this.tracer.startSpan('CORS Preflight', {\n startTime: corsPreFlightRequest[PTN.FETCH_START],\n });\n const skipOldSemconvContentLengthAttrs = !(this._semconvStability & SemconvStability.OLD);\n addSpanNetworkEvents(childSpan, corsPreFlightRequest, this.getConfig().ignoreNetworkEvents, undefined, skipOldSemconvContentLengthAttrs);\n childSpan.end(corsPreFlightRequest[PTN.RESPONSE_END]);\n });\n }\n /**\n * Add attributes when span is going to end\n * @param span\n * @param xhr\n * @param spanUrl\n * @private\n */\n _addFinalSpanAttributes(span, xhrMem, spanUrl) {\n if (this._semconvStability & SemconvStability.OLD) {\n if (xhrMem.status !== undefined) {\n span.setAttribute(ATTR_HTTP_STATUS_CODE, xhrMem.status);\n }\n if (xhrMem.statusText !== undefined) {\n span.setAttribute(AttributeNames.HTTP_STATUS_TEXT, xhrMem.statusText);\n }\n if (typeof spanUrl === 'string') {\n const parsedUrl = parseUrl(spanUrl);\n span.setAttribute(ATTR_HTTP_HOST, parsedUrl.host);\n span.setAttribute(ATTR_HTTP_SCHEME, parsedUrl.protocol.replace(':', ''));\n }\n // @TODO do we want to collect this or it will be collected earlier once only or\n // maybe when parent span is not available ?\n span.setAttribute(ATTR_HTTP_USER_AGENT, navigator.userAgent);\n }\n if (this._semconvStability & SemconvStability.STABLE) {\n if (xhrMem.status) {\n // Intentionally exclude status=0, because XHR uses 0 for before a\n // response is received and semconv says to only add the attribute if\n // received a response.\n span.setAttribute(ATTR_HTTP_RESPONSE_STATUS_CODE, xhrMem.status);\n }\n }\n }\n _applyAttributesAfterXHR(span, xhr) {\n const applyCustomAttributesOnSpan = this.getConfig().applyCustomAttributesOnSpan;\n if (typeof applyCustomAttributesOnSpan === 'function') {\n safeExecuteInTheMiddle(() => applyCustomAttributesOnSpan(span, xhr), error => {\n if (!error) {\n return;\n }\n this._diag.error('applyCustomAttributesOnSpan', error);\n }, true);\n }\n }\n /**\n * will collect information about all resources created\n * between \"send\" and \"end\" with additional waiting for main resource\n * @param xhr\n * @param spanUrl\n * @private\n */\n _addResourceObserver(xhr, spanUrl) {\n const xhrMem = this._xhrMem.get(xhr);\n if (!xhrMem ||\n typeof PerformanceObserver !== 'function' ||\n typeof PerformanceResourceTiming !== 'function') {\n return;\n }\n xhrMem.createdResources = {\n observer: new PerformanceObserver(list => {\n const entries = list.getEntries();\n const parsedUrl = parseUrl(spanUrl);\n entries.forEach(entry => {\n if (entry.initiatorType === 'xmlhttprequest' &&\n entry.name === parsedUrl.href) {\n if (xhrMem.createdResources) {\n xhrMem.createdResources.entries.push(entry);\n }\n }\n });\n }),\n entries: [],\n };\n xhrMem.createdResources.observer.observe({\n entryTypes: ['resource'],\n });\n }\n /**\n * Clears the resource timings and all resources assigned with spans\n * when {@link XMLHttpRequestInstrumentationConfig.clearTimingResources} is\n * set to true (default false)\n * @private\n */\n _clearResources() {\n if (this._tasksCount === 0 && this.getConfig().clearTimingResources) {\n otperformance.clearResourceTimings();\n this._xhrMem = new WeakMap();\n this._usedResources = new WeakSet();\n }\n }\n /**\n * Finds appropriate resource and add network events to the span\n * @param span\n */\n _findResourceAndAddNetworkEvents(xhrMem, span, spanUrl, startTime, endTime) {\n if (!spanUrl || !startTime || !endTime || !xhrMem.createdResources) {\n return;\n }\n let resources = xhrMem.createdResources.entries;\n if (!resources || !resources.length) {\n // fallback - either Observer is not available or it took longer\n // then OBSERVER_WAIT_TIME_MS and observer didn't collect enough\n // information\n // ts thinks this is the perf_hooks module, but it is the browser performance api\n resources = otperformance.getEntriesByType('resource');\n }\n const resource = getResource(parseUrl(spanUrl).href, startTime, endTime, resources, this._usedResources);\n if (resource.mainRequest) {\n const mainRequest = resource.mainRequest;\n this._markResourceAsUsed(mainRequest);\n const corsPreFlightRequest = resource.corsPreFlightRequest;\n if (corsPreFlightRequest) {\n this._addChildSpan(span, corsPreFlightRequest);\n this._markResourceAsUsed(corsPreFlightRequest);\n }\n const skipOldSemconvContentLengthAttrs = !(this._semconvStability & SemconvStability.OLD);\n addSpanNetworkEvents(span, mainRequest, this.getConfig().ignoreNetworkEvents, undefined, skipOldSemconvContentLengthAttrs);\n }\n }\n /**\n * Removes the previous information about span.\n * This might happened when the same xhr is used again.\n * @param xhr\n * @private\n */\n _cleanPreviousSpanInformation(xhr) {\n const xhrMem = this._xhrMem.get(xhr);\n if (xhrMem) {\n const callbackToRemoveEvents = xhrMem.callbackToRemoveEvents;\n if (callbackToRemoveEvents) {\n callbackToRemoveEvents();\n }\n this._xhrMem.delete(xhr);\n }\n }\n /**\n * Creates a new span when method \"open\" is called\n * @param xhr\n * @param url\n * @param method\n * @private\n */\n _createSpan(xhr, url, method) {\n if (isUrlIgnored(url, this.getConfig().ignoreUrls)) {\n this._diag.debug('ignoring span as url matches ignored url');\n return;\n }\n let name = '';\n const parsedUrl = parseUrl(url);\n const attributes = {};\n if (this._semconvStability & SemconvStability.OLD) {\n name = method.toUpperCase();\n attributes[ATTR_HTTP_METHOD] = method;\n attributes[ATTR_HTTP_URL] = parsedUrl.toString();\n }\n if (this._semconvStability & SemconvStability.STABLE) {\n const origMethod = method;\n const normMethod = normalizeHttpRequestMethod(method);\n if (!name) {\n // The \"old\" span name wins if emitting both old and stable semconv\n // ('http/dup').\n name = normMethod;\n }\n attributes[ATTR_HTTP_REQUEST_METHOD] = normMethod;\n if (normMethod !== origMethod) {\n attributes[ATTR_HTTP_REQUEST_METHOD_ORIGINAL] = origMethod;\n }\n attributes[ATTR_URL_FULL] = parsedUrl.toString();\n attributes[ATTR_SERVER_ADDRESS] = parsedUrl.hostname;\n const serverPort = serverPortFromUrl(parsedUrl);\n if (serverPort) {\n attributes[ATTR_SERVER_PORT] = serverPort;\n }\n }\n const currentSpan = this.tracer.startSpan(name, {\n kind: api.SpanKind.CLIENT,\n attributes,\n });\n currentSpan.addEvent(EventNames.METHOD_OPEN);\n this._cleanPreviousSpanInformation(xhr);\n this._xhrMem.set(xhr, {\n span: currentSpan,\n spanUrl: url,\n });\n return currentSpan;\n }\n /**\n * Marks certain [resource]{@link PerformanceResourceTiming} when information\n * from this is used to add events to span.\n * This is done to avoid reusing the same resource again for next span\n * @param resource\n * @private\n */\n _markResourceAsUsed(resource) {\n this._usedResources.add(resource);\n }\n /**\n * Patches the method open\n * @private\n */\n _patchOpen() {\n return (original) => {\n const plugin = this;\n return function patchOpen(...args) {\n const method = args[0];\n const url = args[1];\n plugin._createSpan(this, url, method);\n return original.apply(this, args);\n };\n };\n }\n /**\n * Patches the method send\n * @private\n */\n _patchSend() {\n const plugin = this;\n function endSpanTimeout(eventName, xhrMem, performanceEndTime, endTime) {\n const callbackToRemoveEvents = xhrMem.callbackToRemoveEvents;\n if (typeof callbackToRemoveEvents === 'function') {\n callbackToRemoveEvents();\n }\n const { span, spanUrl, sendStartTime } = xhrMem;\n if (span) {\n plugin._findResourceAndAddNetworkEvents(xhrMem, span, spanUrl, sendStartTime, performanceEndTime);\n span.addEvent(eventName, endTime);\n plugin._addFinalSpanAttributes(span, xhrMem, spanUrl);\n span.end(endTime);\n plugin._tasksCount--;\n }\n plugin._clearResources();\n }\n function endSpan(eventName, xhr, isError, errorType) {\n const xhrMem = plugin._xhrMem.get(xhr);\n if (!xhrMem) {\n return;\n }\n xhrMem.status = xhr.status;\n xhrMem.statusText = xhr.statusText;\n plugin._xhrMem.delete(xhr);\n if (xhrMem.span) {\n const span = xhrMem.span;\n plugin._applyAttributesAfterXHR(span, xhr);\n if (plugin._semconvStability & SemconvStability.STABLE) {\n if (isError) {\n if (errorType) {\n span.setStatus({\n code: api.SpanStatusCode.ERROR,\n message: errorType,\n });\n span.setAttribute(ATTR_ERROR_TYPE, errorType);\n }\n }\n else if (xhrMem.status && xhrMem.status >= 400) {\n span.setStatus({ code: api.SpanStatusCode.ERROR });\n span.setAttribute(ATTR_ERROR_TYPE, String(xhrMem.status));\n }\n }\n }\n const performanceEndTime = hrTime();\n const endTime = Date.now();\n // the timeout is needed as observer doesn't have yet information\n // when event \"load\" is called. Also the time may differ depends on\n // browser and speed of computer\n setTimeout(() => {\n endSpanTimeout(eventName, xhrMem, performanceEndTime, endTime);\n }, OBSERVER_WAIT_TIME_MS);\n }\n function onError() {\n endSpan(EventNames.EVENT_ERROR, this, true, 'error');\n }\n function onAbort() {\n endSpan(EventNames.EVENT_ABORT, this, false);\n }\n function onTimeout() {\n endSpan(EventNames.EVENT_TIMEOUT, this, true, 'timeout');\n }\n function onLoad() {\n if (this.status < 299) {\n endSpan(EventNames.EVENT_LOAD, this, false);\n }\n else {\n endSpan(EventNames.EVENT_ERROR, this, false);\n }\n }\n function unregister(xhr) {\n xhr.removeEventListener('abort', onAbort);\n xhr.removeEventListener('error', onError);\n xhr.removeEventListener('load', onLoad);\n xhr.removeEventListener('timeout', onTimeout);\n const xhrMem = plugin._xhrMem.get(xhr);\n if (xhrMem) {\n xhrMem.callbackToRemoveEvents = undefined;\n }\n }\n return (original) => {\n return function patchSend(...args) {\n const xhrMem = plugin._xhrMem.get(this);\n if (!xhrMem) {\n return original.apply(this, args);\n }\n const currentSpan = xhrMem.span;\n const spanUrl = xhrMem.spanUrl;\n if (currentSpan && spanUrl) {\n if (plugin.getConfig().measureRequestSize && args?.[0]) {\n const body = args[0];\n const bodyLength = getXHRBodyLength(body);\n if (bodyLength !== undefined) {\n if (plugin._semconvStability & SemconvStability.OLD) {\n currentSpan.setAttribute(ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED, bodyLength);\n }\n if (plugin._semconvStability & SemconvStability.STABLE) {\n currentSpan.setAttribute(ATTR_HTTP_REQUEST_BODY_SIZE, bodyLength);\n }\n }\n }\n api.context.with(api.trace.setSpan(api.context.active(), currentSpan), () => {\n plugin._tasksCount++;\n xhrMem.sendStartTime = hrTime();\n currentSpan.addEvent(EventNames.METHOD_SEND);\n this.addEventListener('abort', onAbort);\n this.addEventListener('error', onError);\n this.addEventListener('load', onLoad);\n this.addEventListener('timeout', onTimeout);\n xhrMem.callbackToRemoveEvents = () => {\n unregister(this);\n if (xhrMem.createdResources) {\n xhrMem.createdResources.observer.disconnect();\n }\n };\n plugin._addHeaders(this, spanUrl);\n plugin._addResourceObserver(this, spanUrl);\n });\n }\n return original.apply(this, args);\n };\n };\n }\n /**\n * implements enable function\n */\n enable() {\n this._diag.debug('applying patch to', this.moduleName, this.version);\n if (isWrapped(XMLHttpRequest.prototype.open)) {\n this._unwrap(XMLHttpRequest.prototype, 'open');\n this._diag.debug('removing previous patch from method open');\n }\n if (isWrapped(XMLHttpRequest.prototype.send)) {\n this._unwrap(XMLHttpRequest.prototype, 'send');\n this._diag.debug('removing previous patch from method send');\n }\n this._wrap(XMLHttpRequest.prototype, 'open', this._patchOpen());\n this._wrap(XMLHttpRequest.prototype, 'send', this._patchSend());\n }\n /**\n * implements disable function\n */\n disable() {\n this._diag.debug('removing patch from', this.moduleName, this.version);\n this._unwrap(XMLHttpRequest.prototype, 'open');\n this._unwrap(XMLHttpRequest.prototype, 'send');\n this._tasksCount = 0;\n this._xhrMem = new WeakMap();\n this._usedResources = new WeakSet();\n }\n}\n//# sourceMappingURL=xhr.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n/**\n * Deprecated, use one of `server.address`, `client.address` or `http.request.header.host` instead, depending on the usage.\n *\n * @example www.example.org\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage.\n */\nexport const ATTR_HTTP_HOST = 'http.host';\n/**\n * Deprecated, use `http.request.method` instead.\n *\n * @example GET\n * @example POST\n * @example HEAD\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `http.request.method`.\n */\nexport const ATTR_HTTP_METHOD = 'http.method';\n/**\n * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size.\n *\n * @example 3495\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_HTTP_REQUEST_BODY_SIZE = 'http.request.body.size';\n/**\n * Deprecated, use `http.request.body.size` instead.\n *\n * @example 5493\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `http.request.body.size`.\n */\nexport const ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = 'http.request_content_length_uncompressed';\n/**\n * Deprecated, use `http.response.header.<key>` instead.\n *\n * @example 3495\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `http.response.header.<key>`.\n */\nexport const ATTR_HTTP_RESPONSE_CONTENT_LENGTH = 'http.response_content_length';\n/**\n * Deprecated, use `url.scheme` instead.\n *\n * @example http\n * @example https\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `url.scheme` instead.\n */\nexport const ATTR_HTTP_SCHEME = 'http.scheme';\n/**\n * Deprecated, use `http.response.status_code` instead.\n *\n * @example 200\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `http.response.status_code`.\n */\nexport const ATTR_HTTP_STATUS_CODE = 'http.status_code';\n/**\n * Deprecated, use `url.full` instead.\n *\n * @example https://www.foo.bar/search?q=OpenTelemetry#SemConv\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `url.full`.\n */\nexport const ATTR_HTTP_URL = 'http.url';\n/**\n * Deprecated, use `user_agent.original` instead.\n *\n * @example CERN-LineMode/2.15 libwww/2.17b3\n * @example Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `user_agent.original`.\n */\nexport const ATTR_HTTP_USER_AGENT = 'http.user_agent';\n//# sourceMappingURL=semconv.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/http.md\n */\nexport var AttributeNames;\n(function (AttributeNames) {\n AttributeNames[\"COMPONENT\"] = \"component\";\n AttributeNames[\"HTTP_STATUS_TEXT\"] = \"http.status_text\";\n})(AttributeNames || (AttributeNames = {}));\n//# sourceMappingURL=AttributeNames.js.map","\"use strict\";\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ATTR_HTTP_USER_AGENT = exports.ATTR_HTTP_URL = exports.ATTR_HTTP_STATUS_CODE = exports.ATTR_HTTP_SCHEME = exports.ATTR_HTTP_RESPONSE_CONTENT_LENGTH = exports.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = exports.ATTR_HTTP_REQUEST_BODY_SIZE = exports.ATTR_HTTP_METHOD = exports.ATTR_HTTP_HOST = void 0;\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n/**\n * Deprecated, use one of `server.address`, `client.address` or `http.request.header.host` instead, depending on the usage.\n *\n * @example www.example.org\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by one of `server.address`, `client.address` or `http.request.header.host`, depending on the usage.\n */\nexports.ATTR_HTTP_HOST = 'http.host';\n/**\n * Deprecated, use `http.request.method` instead.\n *\n * @example GET\n * @example POST\n * @example HEAD\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `http.request.method`.\n */\nexports.ATTR_HTTP_METHOD = 'http.method';\n/**\n * The size of the request payload body in bytes. This is the number of bytes transferred excluding headers and is often, but not always, present as the [Content-Length](https://www.rfc-editor.org/rfc/rfc9110.html#field.content-length) header. For requests using transport encoding, this should be the compressed size.\n *\n * @example 3495\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexports.ATTR_HTTP_REQUEST_BODY_SIZE = 'http.request.body.size';\n/**\n * Deprecated, use `http.request.body.size` instead.\n *\n * @example 5493\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `http.request.body.size`.\n */\nexports.ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED = 'http.request_content_length_uncompressed';\n/**\n * Deprecated, use `http.response.header.<key>` instead.\n *\n * @example 3495\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `http.response.header.<key>`.\n */\nexports.ATTR_HTTP_RESPONSE_CONTENT_LENGTH = 'http.response_content_length';\n/**\n * Deprecated, use `url.scheme` instead.\n *\n * @example http\n * @example https\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `url.scheme` instead.\n */\nexports.ATTR_HTTP_SCHEME = 'http.scheme';\n/**\n * Deprecated, use `http.response.status_code` instead.\n *\n * @example 200\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `http.response.status_code`.\n */\nexports.ATTR_HTTP_STATUS_CODE = 'http.status_code';\n/**\n * Deprecated, use `url.full` instead.\n *\n * @example https://www.foo.bar/search?q=OpenTelemetry#SemConv\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `url.full`.\n */\nexports.ATTR_HTTP_URL = 'http.url';\n/**\n * Deprecated, use `user_agent.original` instead.\n *\n * @example CERN-LineMode/2.15 libwww/2.17b3\n * @example Mozilla/5.0 (iPhone; CPU iPhone OS 14_7_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.2 Mobile/15E148 Safari/604.1\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `user_agent.original`.\n */\nexports.ATTR_HTTP_USER_AGENT = 'http.user_agent';\n//# sourceMappingURL=semconv.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// Much of the logic here overlaps with the same utils file in opentelemetry-instrumentation-xml-http-request\n// These may be unified in the future.\nimport * as api from '@opentelemetry/api';\nimport { getStringListFromEnv } from '@opentelemetry/core';\nconst DIAG_LOGGER = api.diag.createComponentLogger({\n namespace: '@opentelemetry/opentelemetry-instrumentation-fetch/utils',\n});\n/**\n * Helper function to determine payload content length for fetch requests\n *\n * The fetch API is kinda messy: there are a couple of ways the body can be passed in.\n *\n * In all cases, the body param can be some variation of ReadableStream,\n * and ReadableStreams can only be read once! We want to avoid consuming the body here,\n * because that would mean that the body never gets sent with the actual fetch request.\n *\n * Either the first arg is a Request object, which can be cloned\n * so we can clone that object and read the body of the clone\n * without disturbing the original argument\n * However, reading the body here can only be done async; the body() method returns a promise\n * this means this entire function has to return a promise\n *\n * OR the first arg is a url/string\n * in which case the second arg has type RequestInit\n * RequestInit is NOT cloneable, but RequestInit.body is writable\n * so we can chain it into ReadableStream.pipeThrough()\n *\n * ReadableStream.pipeThrough() lets us process a stream and returns a new stream\n * So we can measure the body length as it passes through the pie, but need to attach\n * the new stream to the original request\n * so that the browser still has access to the body.\n *\n * @param body\n * @returns promise that resolves to the content length of the body\n */\nexport function getFetchBodyLength(...args) {\n if (args[0] instanceof URL || typeof args[0] === 'string') {\n const requestInit = args[1];\n if (!requestInit?.body) {\n return Promise.resolve();\n }\n if (requestInit.body instanceof ReadableStream) {\n const { body, length } = _getBodyNonDestructively(requestInit.body);\n requestInit.body = body;\n return length;\n }\n else {\n return Promise.resolve(getXHRBodyLength(requestInit.body));\n }\n }\n else {\n const info = args[0];\n if (!info?.body) {\n return Promise.resolve();\n }\n return info\n .clone()\n .text()\n .then(t => getByteLength(t));\n }\n}\nfunction _getBodyNonDestructively(body) {\n // can't read a ReadableStream without destroying it\n // but we CAN pipe it through and return a new ReadableStream\n // some (older) platforms don't expose the pipeThrough method and in that scenario, we're out of luck;\n // there's no way to read the stream without consuming it.\n if (!body.pipeThrough) {\n DIAG_LOGGER.warn('Platform has ReadableStream but not pipeThrough!');\n return {\n body,\n length: Promise.resolve(undefined),\n };\n }\n let length = 0;\n let resolveLength;\n const lengthPromise = new Promise(resolve => {\n resolveLength = resolve;\n });\n const transform = new TransformStream({\n start() { },\n async transform(chunk, controller) {\n const bytearray = (await chunk);\n length += bytearray.byteLength;\n controller.enqueue(chunk);\n },\n flush() {\n resolveLength(length);\n },\n });\n return {\n body: body.pipeThrough(transform),\n length: lengthPromise,\n };\n}\nfunction isDocument(value) {\n return typeof Document !== 'undefined' && value instanceof Document;\n}\n/**\n * Helper function to determine payload content length for XHR requests\n * @param body\n * @returns content length\n */\nexport function getXHRBodyLength(body) {\n if (isDocument(body)) {\n return new XMLSerializer().serializeToString(document).length;\n }\n // XMLHttpRequestBodyInit expands to the following:\n if (typeof body === 'string') {\n return getByteLength(body);\n }\n if (body instanceof Blob) {\n return body.size;\n }\n if (body instanceof FormData) {\n return getFormDataSize(body);\n }\n if (body instanceof URLSearchParams) {\n return getByteLength(body.toString());\n }\n // ArrayBuffer | ArrayBufferView\n if (body.byteLength !== undefined) {\n return body.byteLength;\n }\n DIAG_LOGGER.warn('unknown body type');\n return undefined;\n}\nconst TEXT_ENCODER = new TextEncoder();\nfunction getByteLength(s) {\n return TEXT_ENCODER.encode(s).byteLength;\n}\nfunction getFormDataSize(formData) {\n let size = 0;\n for (const [key, value] of formData.entries()) {\n size += key.length;\n if (value instanceof Blob) {\n size += value.size;\n }\n else {\n size += value.length;\n }\n }\n return size;\n}\n/**\n * Normalize an HTTP request method string per `http.request.method` spec\n * https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md#http-client-span\n */\nexport function normalizeHttpRequestMethod(method) {\n const knownMethods = getKnownMethods();\n const methUpper = method.toUpperCase();\n if (methUpper in knownMethods) {\n return methUpper;\n }\n else {\n return '_OTHER';\n }\n}\nconst DEFAULT_KNOWN_METHODS = {\n CONNECT: true,\n DELETE: true,\n GET: true,\n HEAD: true,\n OPTIONS: true,\n PATCH: true,\n POST: true,\n PUT: true,\n TRACE: true,\n};\nlet knownMethods;\nfunction getKnownMethods() {\n if (knownMethods === undefined) {\n const cfgMethods = getStringListFromEnv('OTEL_INSTRUMENTATION_HTTP_KNOWN_METHODS');\n if (cfgMethods && cfgMethods.length > 0) {\n knownMethods = {};\n cfgMethods.forEach(m => {\n knownMethods[m] = true;\n });\n }\n else {\n knownMethods = DEFAULT_KNOWN_METHODS;\n }\n }\n return knownMethods;\n}\nconst HTTP_PORT_FROM_PROTOCOL = {\n 'https:': '443',\n 'http:': '80',\n};\nexport function serverPortFromUrl(url) {\n const serverPort = Number(url.port || HTTP_PORT_FROM_PROTOCOL[url.protocol]);\n // Guard with `if (serverPort)` because `Number('') === 0`.\n if (serverPort && !isNaN(serverPort)) {\n return serverPort;\n }\n else {\n return undefined;\n }\n}\n//# sourceMappingURL=utils.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '0.203.0';\n//# sourceMappingURL=version.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport * as api from '@opentelemetry/api';\nimport { SemconvStability, semconvStabilityFromStr, isWrapped, InstrumentationBase, safeExecuteInTheMiddle, } from '@opentelemetry/instrumentation';\nimport * as core from '@opentelemetry/core';\nimport * as web from '@opentelemetry/sdk-trace-web';\nimport { AttributeNames } from './enums/AttributeNames';\nimport { ATTR_HTTP_STATUS_CODE, ATTR_HTTP_HOST, ATTR_HTTP_USER_AGENT, ATTR_HTTP_SCHEME, ATTR_HTTP_URL, ATTR_HTTP_METHOD, ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED, ATTR_HTTP_REQUEST_BODY_SIZE, } from '../src/semconv';\nimport { ATTR_ERROR_TYPE, ATTR_HTTP_REQUEST_METHOD, ATTR_HTTP_REQUEST_METHOD_ORIGINAL, ATTR_HTTP_RESPONSE_STATUS_CODE, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT, ATTR_URL_FULL, } from '@opentelemetry/semantic-conventions';\nimport { getFetchBodyLength, normalizeHttpRequestMethod, serverPortFromUrl, } from './utils';\nimport { VERSION } from './version';\nimport { _globalThis } from '@opentelemetry/core';\n// how long to wait for observer to collect information about resources\n// this is needed as event \"load\" is called before observer\n// hard to say how long it should really wait, seems like 300ms is\n// safe enough\nconst OBSERVER_WAIT_TIME_MS = 300;\nconst isNode = typeof process === 'object' && process.release?.name === 'node';\n/**\n * This class represents a fetch plugin for auto instrumentation\n */\nexport class FetchInstrumentation extends InstrumentationBase {\n component = 'fetch';\n version = VERSION;\n moduleName = this.component;\n _usedResources = new WeakSet();\n _tasksCount = 0;\n _semconvStability;\n constructor(config = {}) {\n super('@opentelemetry/instrumentation-fetch', VERSION, config);\n this._semconvStability = semconvStabilityFromStr('http', config?.semconvStabilityOptIn);\n }\n init() { }\n /**\n * Add cors pre flight child span\n * @param span\n * @param corsPreFlightRequest\n */\n _addChildSpan(span, corsPreFlightRequest) {\n const childSpan = this.tracer.startSpan('CORS Preflight', {\n startTime: corsPreFlightRequest[web.PerformanceTimingNames.FETCH_START],\n }, api.trace.setSpan(api.context.active(), span));\n const skipOldSemconvContentLengthAttrs = !(this._semconvStability & SemconvStability.OLD);\n web.addSpanNetworkEvents(childSpan, corsPreFlightRequest, this.getConfig().ignoreNetworkEvents, undefined, skipOldSemconvContentLengthAttrs);\n childSpan.end(corsPreFlightRequest[web.PerformanceTimingNames.RESPONSE_END]);\n }\n /**\n * Adds more attributes to span just before ending it\n * @param span\n * @param response\n */\n _addFinalSpanAttributes(span, response) {\n const parsedUrl = web.parseUrl(response.url);\n if (this._semconvStability & SemconvStability.OLD) {\n span.setAttribute(ATTR_HTTP_STATUS_CODE, response.status);\n if (response.statusText != null) {\n span.setAttribute(AttributeNames.HTTP_STATUS_TEXT, response.statusText);\n }\n span.setAttribute(ATTR_HTTP_HOST, parsedUrl.host);\n span.setAttribute(ATTR_HTTP_SCHEME, parsedUrl.protocol.replace(':', ''));\n if (typeof navigator !== 'undefined') {\n span.setAttribute(ATTR_HTTP_USER_AGENT, navigator.userAgent);\n }\n }\n if (this._semconvStability & SemconvStability.STABLE) {\n span.setAttribute(ATTR_HTTP_RESPONSE_STATUS_CODE, response.status);\n // TODO: Set server.{address,port} at span creation for sampling decisions\n // (a \"SHOULD\" requirement in semconv).\n span.setAttribute(ATTR_SERVER_ADDRESS, parsedUrl.hostname);\n const serverPort = serverPortFromUrl(parsedUrl);\n if (serverPort) {\n span.setAttribute(ATTR_SERVER_PORT, serverPort);\n }\n }\n }\n /**\n * Add headers\n * @param options\n * @param spanUrl\n */\n _addHeaders(options, spanUrl) {\n if (!web.shouldPropagateTraceHeaders(spanUrl, this.getConfig().propagateTraceHeaderCorsUrls)) {\n const headers = {};\n api.propagation.inject(api.context.active(), headers);\n if (Object.keys(headers).length > 0) {\n this._diag.debug('headers inject skipped due to CORS policy');\n }\n return;\n }\n if (options instanceof Request) {\n api.propagation.inject(api.context.active(), options.headers, {\n set: (h, k, v) => h.set(k, typeof v === 'string' ? v : String(v)),\n });\n }\n else if (options.headers instanceof Headers) {\n api.propagation.inject(api.context.active(), options.headers, {\n set: (h, k, v) => h.set(k, typeof v === 'string' ? v : String(v)),\n });\n }\n else if (options.headers instanceof Map) {\n api.propagation.inject(api.context.active(), options.headers, {\n set: (h, k, v) => h.set(k, typeof v === 'string' ? v : String(v)),\n });\n }\n else {\n const headers = {};\n api.propagation.inject(api.context.active(), headers);\n options.headers = Object.assign({}, headers, options.headers || {});\n }\n }\n /**\n * Clears the resource timings and all resources assigned with spans\n * when {@link FetchPluginConfig.clearTimingResources} is\n * set to true (default false)\n * @private\n */\n _clearResources() {\n if (this._tasksCount === 0 && this.getConfig().clearTimingResources) {\n performance.clearResourceTimings();\n this._usedResources = new WeakSet();\n }\n }\n /**\n * Creates a new span\n * @param url\n * @param options\n */\n _createSpan(url, options = {}) {\n if (core.isUrlIgnored(url, this.getConfig().ignoreUrls)) {\n this._diag.debug('ignoring span as url matches ignored url');\n return;\n }\n let name = '';\n const attributes = {};\n if (this._semconvStability & SemconvStability.OLD) {\n const method = (options.method || 'GET').toUpperCase();\n name = `HTTP ${method}`;\n attributes[AttributeNames.COMPONENT] = this.moduleName;\n attributes[ATTR_HTTP_METHOD] = method;\n attributes[ATTR_HTTP_URL] = url;\n }\n if (this._semconvStability & SemconvStability.STABLE) {\n const origMethod = options.method;\n const normMethod = normalizeHttpRequestMethod(options.method || 'GET');\n if (!name) {\n // The \"old\" span name wins if emitting both old and stable semconv\n // ('http/dup').\n name = normMethod;\n }\n attributes[ATTR_HTTP_REQUEST_METHOD] = normMethod;\n if (normMethod !== origMethod) {\n attributes[ATTR_HTTP_REQUEST_METHOD_ORIGINAL] = origMethod;\n }\n attributes[ATTR_URL_FULL] = url;\n }\n return this.tracer.startSpan(name, {\n kind: api.SpanKind.CLIENT,\n attributes,\n });\n }\n /**\n * Finds appropriate resource and add network events to the span\n * @param span\n * @param resourcesObserver\n * @param endTime\n */\n _findResourceAndAddNetworkEvents(span, resourcesObserver, endTime) {\n let resources = resourcesObserver.entries;\n if (!resources.length) {\n if (!performance.getEntriesByType) {\n return;\n }\n // fallback - either Observer is not available or it took longer\n // then OBSERVER_WAIT_TIME_MS and observer didn't collect enough\n // information\n resources = performance.getEntriesByType('resource');\n }\n const resource = web.getResource(resourcesObserver.spanUrl, resourcesObserver.startTime, endTime, resources, this._usedResources, 'fetch');\n if (resource.mainRequest) {\n const mainRequest = resource.mainRequest;\n this._markResourceAsUsed(mainRequest);\n const corsPreFlightRequest = resource.corsPreFlightRequest;\n if (corsPreFlightRequest) {\n this._addChildSpan(span, corsPreFlightRequest);\n this._markResourceAsUsed(corsPreFlightRequest);\n }\n const skipOldSemconvContentLengthAttrs = !(this._semconvStability & SemconvStability.OLD);\n web.addSpanNetworkEvents(span, mainRequest, this.getConfig().ignoreNetworkEvents, undefined, skipOldSemconvContentLengthAttrs);\n }\n }\n /**\n * Marks certain [resource]{@link PerformanceResourceTiming} when information\n * from this is used to add events to span.\n * This is done to avoid reusing the same resource again for next span\n * @param resource\n */\n _markResourceAsUsed(resource) {\n this._usedResources.add(resource);\n }\n /**\n * Finish span, add attributes, network events etc.\n * @param span\n * @param spanData\n * @param response\n */\n _endSpan(span, spanData, response) {\n const endTime = core.millisToHrTime(Date.now());\n const performanceEndTime = core.hrTime();\n this._addFinalSpanAttributes(span, response);\n if (this._semconvStability & SemconvStability.STABLE) {\n // https://github.com/open-telemetry/semantic-conventions/blob/main/docs/http/http-spans.md#status\n if (response.status >= 400) {\n span.setStatus({ code: api.SpanStatusCode.ERROR });\n span.setAttribute(ATTR_ERROR_TYPE, String(response.status));\n }\n }\n setTimeout(() => {\n spanData.observer?.disconnect();\n this._findResourceAndAddNetworkEvents(span, spanData, performanceEndTime);\n this._tasksCount--;\n this._clearResources();\n span.end(endTime);\n }, OBSERVER_WAIT_TIME_MS);\n }\n /**\n * Patches the constructor of fetch\n */\n _patchConstructor() {\n return original => {\n const plugin = this;\n return function patchConstructor(...args) {\n const self = this;\n const url = web.parseUrl(args[0] instanceof Request ? args[0].url : String(args[0])).href;\n const options = args[0] instanceof Request ? args[0] : args[1] || {};\n const createdSpan = plugin._createSpan(url, options);\n if (!createdSpan) {\n return original.apply(this, args);\n }\n const spanData = plugin._prepareSpanData(url);\n if (plugin.getConfig().measureRequestSize) {\n getFetchBodyLength(...args)\n .then(bodyLength => {\n if (!bodyLength)\n return;\n if (plugin._semconvStability & SemconvStability.OLD) {\n createdSpan.setAttribute(ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED, bodyLength);\n }\n if (plugin._semconvStability & SemconvStability.STABLE) {\n createdSpan.setAttribute(ATTR_HTTP_REQUEST_BODY_SIZE, bodyLength);\n }\n })\n .catch(error => {\n plugin._diag.warn('getFetchBodyLength', error);\n });\n }\n function endSpanOnError(span, error) {\n plugin._applyAttributesAfterFetch(span, options, error);\n plugin._endSpan(span, spanData, {\n status: error.status || 0,\n statusText: error.message,\n url,\n });\n }\n function endSpanOnSuccess(span, response) {\n plugin._applyAttributesAfterFetch(span, options, response);\n if (response.status >= 200 && response.status < 400) {\n plugin._endSpan(span, spanData, response);\n }\n else {\n plugin._endSpan(span, spanData, {\n status: response.status,\n statusText: response.statusText,\n url,\n });\n }\n }\n function onSuccess(span, resolve, response) {\n try {\n const resClone = response.clone();\n const body = resClone.body;\n if (body) {\n const reader = body.getReader();\n const read = () => {\n reader.read().then(({ done }) => {\n if (done) {\n endSpanOnSuccess(span, response);\n }\n else {\n read();\n }\n }, error => {\n endSpanOnError(span, error);\n });\n };\n read();\n }\n else {\n // some older browsers don't have .body implemented\n endSpanOnSuccess(span, response);\n }\n }\n finally {\n resolve(response);\n }\n }\n function onError(span, reject, error) {\n try {\n endSpanOnError(span, error);\n }\n finally {\n reject(error);\n }\n }\n return new Promise((resolve, reject) => {\n return api.context.with(api.trace.setSpan(api.context.active(), createdSpan), () => {\n plugin._addHeaders(options, url);\n // Important to execute \"_callRequestHook\" after \"_addHeaders\", allowing the consumer code to override the request headers.\n plugin._callRequestHook(createdSpan, options);\n plugin._tasksCount++;\n // TypeScript complains about arrow function captured a this typed as globalThis\n // ts(7041)\n return original\n .apply(self, options instanceof Request ? [options] : [url, options])\n .then(onSuccess.bind(self, createdSpan, resolve), onError.bind(self, createdSpan, reject));\n });\n });\n };\n };\n }\n _applyAttributesAfterFetch(span, request, result) {\n const applyCustomAttributesOnSpan = this.getConfig().applyCustomAttributesOnSpan;\n if (applyCustomAttributesOnSpan) {\n safeExecuteInTheMiddle(() => applyCustomAttributesOnSpan(span, request, result), error => {\n if (!error) {\n return;\n }\n this._diag.error('applyCustomAttributesOnSpan', error);\n }, true);\n }\n }\n _callRequestHook(span, request) {\n const requestHook = this.getConfig().requestHook;\n if (requestHook) {\n safeExecuteInTheMiddle(() => requestHook(span, request), error => {\n if (!error) {\n return;\n }\n this._diag.error('requestHook', error);\n }, true);\n }\n }\n /**\n * Prepares a span data - needed later for matching appropriate network\n * resources\n * @param spanUrl\n */\n _prepareSpanData(spanUrl) {\n const startTime = core.hrTime();\n const entries = [];\n if (typeof PerformanceObserver !== 'function') {\n return { entries, startTime, spanUrl };\n }\n const observer = new PerformanceObserver(list => {\n const perfObsEntries = list.getEntries();\n perfObsEntries.forEach(entry => {\n if (entry.initiatorType === 'fetch' && entry.name === spanUrl) {\n entries.push(entry);\n }\n });\n });\n observer.observe({\n entryTypes: ['resource'],\n });\n return { entries, observer, startTime, spanUrl };\n }\n /**\n * implements enable function\n */\n enable() {\n if (isNode) {\n // Node.js v18+ *does* have a global `fetch()`, but this package does not\n // support instrumenting it.\n this._diag.warn(\"this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()\");\n return;\n }\n if (isWrapped(fetch)) {\n this._unwrap(_globalThis, 'fetch');\n this._diag.debug('removing previous patch for constructor');\n }\n this._wrap(_globalThis, 'fetch', this._patchConstructor());\n }\n /**\n * implements unpatch function\n */\n disable() {\n if (isNode) {\n return;\n }\n this._unwrap(_globalThis, 'fetch');\n this._usedResources = new WeakSet();\n }\n}\n//# sourceMappingURL=fetch.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport class OTLPExporterBase {\n _delegate;\n constructor(_delegate) {\n this._delegate = _delegate;\n }\n /**\n * Export items.\n * @param items\n * @param resultCallback\n */\n export(items, resultCallback) {\n this._delegate.export(items, resultCallback);\n }\n forceFlush() {\n return this._delegate.forceFlush();\n }\n shutdown() {\n return this._delegate.shutdown();\n }\n}\n//# sourceMappingURL=OTLPExporterBase.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Interface for handling error\n */\nexport class OTLPExporterError extends Error {\n code;\n name = 'OTLPExporterError';\n data;\n constructor(message, code, data) {\n super(message);\n this.data = data;\n this.code = code;\n }\n}\n//# sourceMappingURL=types.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport function validateTimeoutMillis(timeoutMillis) {\n if (Number.isFinite(timeoutMillis) && timeoutMillis > 0) {\n return timeoutMillis;\n }\n throw new Error(`Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '${timeoutMillis}')`);\n}\nexport function wrapStaticHeadersInFunction(headers) {\n if (headers == null) {\n return undefined;\n }\n return () => headers;\n}\n/**\n * @param userProvidedConfiguration Configuration options provided by the user in code.\n * @param fallbackConfiguration Fallback to use when the {@link userProvidedConfiguration} does not specify an option.\n * @param defaultConfiguration The defaults as defined by the exporter specification\n */\nexport function mergeOtlpSharedConfigurationWithDefaults(userProvidedConfiguration, fallbackConfiguration, defaultConfiguration) {\n return {\n timeoutMillis: validateTimeoutMillis(userProvidedConfiguration.timeoutMillis ??\n fallbackConfiguration.timeoutMillis ??\n defaultConfiguration.timeoutMillis),\n concurrencyLimit: userProvidedConfiguration.concurrencyLimit ??\n fallbackConfiguration.concurrencyLimit ??\n defaultConfiguration.concurrencyLimit,\n compression: userProvidedConfiguration.compression ??\n fallbackConfiguration.compression ??\n defaultConfiguration.compression,\n };\n}\nexport function getSharedConfigurationDefaults() {\n return {\n timeoutMillis: 10000,\n concurrencyLimit: 30,\n compression: 'none',\n };\n}\n//# sourceMappingURL=shared-configuration.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass BoundedQueueExportPromiseHandler {\n _concurrencyLimit;\n _sendingPromises = [];\n /**\n * @param concurrencyLimit maximum promises allowed in a queue at the same time.\n */\n constructor(concurrencyLimit) {\n this._concurrencyLimit = concurrencyLimit;\n }\n pushPromise(promise) {\n if (this.hasReachedLimit()) {\n throw new Error('Concurrency Limit reached');\n }\n this._sendingPromises.push(promise);\n const popPromise = () => {\n const index = this._sendingPromises.indexOf(promise);\n void this._sendingPromises.splice(index, 1);\n };\n promise.then(popPromise, popPromise);\n }\n hasReachedLimit() {\n return this._sendingPromises.length >= this._concurrencyLimit;\n }\n async awaitAll() {\n await Promise.all(this._sendingPromises);\n }\n}\n/**\n * Promise queue for keeping track of export promises. Finished promises will be auto-dequeued.\n * Allows for awaiting all promises in the queue.\n */\nexport function createBoundedQueueExportPromiseHandler(options) {\n return new BoundedQueueExportPromiseHandler(options.concurrencyLimit);\n}\n//# sourceMappingURL=bounded-queue-export-promise-handler.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { diag } from '@opentelemetry/api';\nfunction isPartialSuccessResponse(response) {\n return Object.prototype.hasOwnProperty.call(response, 'partialSuccess');\n}\n/**\n * Default response handler that logs a partial success to the console.\n */\nexport function createLoggingPartialSuccessResponseHandler() {\n return {\n handleResponse(response) {\n // Partial success MUST never be an empty object according the specification\n // see https://opentelemetry.io/docs/specs/otlp/#partial-success\n if (response == null ||\n !isPartialSuccessResponse(response) ||\n response.partialSuccess == null ||\n Object.keys(response.partialSuccess).length === 0) {\n return;\n }\n diag.warn('Received Partial Success response:', JSON.stringify(response.partialSuccess));\n },\n };\n}\n//# sourceMappingURL=logging-response-handler.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { ExportResultCode } from '@opentelemetry/core';\nimport { OTLPExporterError } from './types';\nimport { createLoggingPartialSuccessResponseHandler } from './logging-response-handler';\nimport { diag } from '@opentelemetry/api';\nclass OTLPExportDelegate {\n _transport;\n _serializer;\n _responseHandler;\n _promiseQueue;\n _timeout;\n _diagLogger;\n constructor(_transport, _serializer, _responseHandler, _promiseQueue, _timeout) {\n this._transport = _transport;\n this._serializer = _serializer;\n this._responseHandler = _responseHandler;\n this._promiseQueue = _promiseQueue;\n this._timeout = _timeout;\n this._diagLogger = diag.createComponentLogger({\n namespace: 'OTLPExportDelegate',\n });\n }\n export(internalRepresentation, resultCallback) {\n this._diagLogger.debug('items to be sent', internalRepresentation);\n // don't do any work if too many exports are in progress.\n if (this._promiseQueue.hasReachedLimit()) {\n resultCallback({\n code: ExportResultCode.FAILED,\n error: new Error('Concurrent export limit reached'),\n });\n return;\n }\n const serializedRequest = this._serializer.serializeRequest(internalRepresentation);\n if (serializedRequest == null) {\n resultCallback({\n code: ExportResultCode.FAILED,\n error: new Error('Nothing to send'),\n });\n return;\n }\n this._promiseQueue.pushPromise(this._transport.send(serializedRequest, this._timeout).then(response => {\n if (response.status === 'success') {\n if (response.data != null) {\n try {\n this._responseHandler.handleResponse(this._serializer.deserializeResponse(response.data));\n }\n catch (e) {\n this._diagLogger.warn('Export succeeded but could not deserialize response - is the response specification compliant?', e, response.data);\n }\n }\n // No matter the response, we can consider the export still successful.\n resultCallback({\n code: ExportResultCode.SUCCESS,\n });\n return;\n }\n else if (response.status === 'failure' && response.error) {\n resultCallback({\n code: ExportResultCode.FAILED,\n error: response.error,\n });\n return;\n }\n else if (response.status === 'retryable') {\n resultCallback({\n code: ExportResultCode.FAILED,\n error: new OTLPExporterError('Export failed with retryable status'),\n });\n }\n else {\n resultCallback({\n code: ExportResultCode.FAILED,\n error: new OTLPExporterError('Export failed with unknown error'),\n });\n }\n }, reason => resultCallback({\n code: ExportResultCode.FAILED,\n error: reason,\n })));\n }\n forceFlush() {\n return this._promiseQueue.awaitAll();\n }\n async shutdown() {\n this._diagLogger.debug('shutdown started');\n await this.forceFlush();\n this._transport.shutdown();\n }\n}\n/**\n * Creates a generic delegate for OTLP exports which only contains parts of the OTLP export that are shared across all\n * signals.\n */\nexport function createOtlpExportDelegate(components, settings) {\n return new OTLPExportDelegate(components.transport, components.serializer, createLoggingPartialSuccessResponseHandler(), components.promiseHandler, settings.timeout);\n}\n//# sourceMappingURL=otlp-export-delegate.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nfunction intValue(charCode) {\n // 0-9\n if (charCode >= 48 && charCode <= 57) {\n return charCode - 48;\n }\n // a-f\n if (charCode >= 97 && charCode <= 102) {\n return charCode - 87;\n }\n // A-F\n return charCode - 55;\n}\nexport function hexToBinary(hexStr) {\n const buf = new Uint8Array(hexStr.length / 2);\n let offset = 0;\n for (let i = 0; i < hexStr.length; i += 2) {\n const hi = intValue(hexStr.charCodeAt(i));\n const lo = intValue(hexStr.charCodeAt(i + 1));\n buf[offset++] = (hi << 4) | lo;\n }\n return buf;\n}\n//# sourceMappingURL=hex-to-binary.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { hrTimeToNanoseconds } from '@opentelemetry/core';\nimport { hexToBinary } from './hex-to-binary';\nexport function hrTimeToNanos(hrTime) {\n const NANOSECONDS = BigInt(1000000000);\n return BigInt(hrTime[0]) * NANOSECONDS + BigInt(hrTime[1]);\n}\nexport function toLongBits(value) {\n const low = Number(BigInt.asUintN(32, value));\n const high = Number(BigInt.asUintN(32, value >> BigInt(32)));\n return { low, high };\n}\nexport function encodeAsLongBits(hrTime) {\n const nanos = hrTimeToNanos(hrTime);\n return toLongBits(nanos);\n}\nexport function encodeAsString(hrTime) {\n const nanos = hrTimeToNanos(hrTime);\n return nanos.toString();\n}\nconst encodeTimestamp = typeof BigInt !== 'undefined' ? encodeAsString : hrTimeToNanoseconds;\nfunction identity(value) {\n return value;\n}\nfunction optionalHexToBinary(str) {\n if (str === undefined)\n return undefined;\n return hexToBinary(str);\n}\nconst DEFAULT_ENCODER = {\n encodeHrTime: encodeAsLongBits,\n encodeSpanContext: hexToBinary,\n encodeOptionalSpanContext: optionalHexToBinary,\n};\nexport function getOtlpEncoder(options) {\n if (options === undefined) {\n return DEFAULT_ENCODER;\n }\n const useLongBits = options.useLongBits ?? true;\n const useHex = options.useHex ?? false;\n return {\n encodeHrTime: useLongBits ? encodeAsLongBits : encodeTimestamp,\n encodeSpanContext: useHex ? identity : hexToBinary,\n encodeOptionalSpanContext: useHex ? identity : optionalHexToBinary,\n };\n}\n//# sourceMappingURL=utils.js.map","export function createResource(resource) {\n return {\n attributes: toAttributes(resource.attributes),\n droppedAttributesCount: 0,\n };\n}\nexport function createInstrumentationScope(scope) {\n return {\n name: scope.name,\n version: scope.version,\n };\n}\nexport function toAttributes(attributes) {\n return Object.keys(attributes).map(key => toKeyValue(key, attributes[key]));\n}\nexport function toKeyValue(key, value) {\n return {\n key: key,\n value: toAnyValue(value),\n };\n}\nexport function toAnyValue(value) {\n const t = typeof value;\n if (t === 'string')\n return { stringValue: value };\n if (t === 'number') {\n if (!Number.isInteger(value))\n return { doubleValue: value };\n return { intValue: value };\n }\n if (t === 'boolean')\n return { boolValue: value };\n if (value instanceof Uint8Array)\n return { bytesValue: value };\n if (Array.isArray(value))\n return { arrayValue: { values: value.map(toAnyValue) } };\n if (t === 'object' && value != null)\n return {\n kvlistValue: {\n values: Object.entries(value).map(([k, v]) => toKeyValue(k, v)),\n },\n };\n return {};\n}\n//# sourceMappingURL=internal.js.map","import { createInstrumentationScope, createResource, toAttributes, } from '../common/internal';\nimport { getOtlpEncoder } from '../common/utils';\nexport function sdkSpanToOtlpSpan(span, encoder) {\n const ctx = span.spanContext();\n const status = span.status;\n const parentSpanId = span.parentSpanContext?.spanId\n ? encoder.encodeSpanContext(span.parentSpanContext?.spanId)\n : undefined;\n return {\n traceId: encoder.encodeSpanContext(ctx.traceId),\n spanId: encoder.encodeSpanContext(ctx.spanId),\n parentSpanId: parentSpanId,\n traceState: ctx.traceState?.serialize(),\n name: span.name,\n // Span kind is offset by 1 because the API does not define a value for unset\n kind: span.kind == null ? 0 : span.kind + 1,\n startTimeUnixNano: encoder.encodeHrTime(span.startTime),\n endTimeUnixNano: encoder.encodeHrTime(span.endTime),\n attributes: toAttributes(span.attributes),\n droppedAttributesCount: span.droppedAttributesCount,\n events: span.events.map(event => toOtlpSpanEvent(event, encoder)),\n droppedEventsCount: span.droppedEventsCount,\n status: {\n // API and proto enums share the same values\n code: status.code,\n message: status.message,\n },\n links: span.links.map(link => toOtlpLink(link, encoder)),\n droppedLinksCount: span.droppedLinksCount,\n };\n}\nexport function toOtlpLink(link, encoder) {\n return {\n attributes: link.attributes ? toAttributes(link.attributes) : [],\n spanId: encoder.encodeSpanContext(link.context.spanId),\n traceId: encoder.encodeSpanContext(link.context.traceId),\n traceState: link.context.traceState?.serialize(),\n droppedAttributesCount: link.droppedAttributesCount || 0,\n };\n}\nexport function toOtlpSpanEvent(timedEvent, encoder) {\n return {\n attributes: timedEvent.attributes\n ? toAttributes(timedEvent.attributes)\n : [],\n name: timedEvent.name,\n timeUnixNano: encoder.encodeHrTime(timedEvent.time),\n droppedAttributesCount: timedEvent.droppedAttributesCount || 0,\n };\n}\n/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nexport function createExportTraceServiceRequest(spans, options) {\n const encoder = getOtlpEncoder(options);\n return {\n resourceSpans: spanRecordsToResourceSpans(spans, encoder),\n };\n}\nfunction createResourceMap(readableSpans) {\n const resourceMap = new Map();\n for (const record of readableSpans) {\n let ilsMap = resourceMap.get(record.resource);\n if (!ilsMap) {\n ilsMap = new Map();\n resourceMap.set(record.resource, ilsMap);\n }\n // TODO this is duplicated in basic tracer. Consolidate on a common helper in core\n const instrumentationScopeKey = `${record.instrumentationScope.name}@${record.instrumentationScope.version || ''}:${record.instrumentationScope.schemaUrl || ''}`;\n let records = ilsMap.get(instrumentationScopeKey);\n if (!records) {\n records = [];\n ilsMap.set(instrumentationScopeKey, records);\n }\n records.push(record);\n }\n return resourceMap;\n}\nfunction spanRecordsToResourceSpans(readableSpans, encoder) {\n const resourceMap = createResourceMap(readableSpans);\n const out = [];\n const entryIterator = resourceMap.entries();\n let entry = entryIterator.next();\n while (!entry.done) {\n const [resource, ilmMap] = entry.value;\n const scopeResourceSpans = [];\n const ilmIterator = ilmMap.values();\n let ilmEntry = ilmIterator.next();\n while (!ilmEntry.done) {\n const scopeSpans = ilmEntry.value;\n if (scopeSpans.length > 0) {\n const spans = scopeSpans.map(readableSpan => sdkSpanToOtlpSpan(readableSpan, encoder));\n scopeResourceSpans.push({\n scope: createInstrumentationScope(scopeSpans[0].instrumentationScope),\n spans: spans,\n schemaUrl: scopeSpans[0].instrumentationScope.schemaUrl,\n });\n }\n ilmEntry = ilmIterator.next();\n }\n // TODO SDK types don't provide resource schema URL at this time\n const transformedSpans = {\n resource: createResource(resource),\n scopeSpans: scopeResourceSpans,\n schemaUrl: undefined,\n };\n out.push(transformedSpans);\n entry = entryIterator.next();\n }\n return out;\n}\n//# sourceMappingURL=internal.js.map","import { createExportTraceServiceRequest } from '../internal';\nexport const JsonTraceSerializer = {\n serializeRequest: (arg) => {\n const request = createExportTraceServiceRequest(arg, {\n useHex: true,\n useLongBits: false,\n });\n const encoder = new TextEncoder();\n return encoder.encode(JSON.stringify(request));\n },\n deserializeResponse: (arg) => {\n if (arg.length === 0) {\n return {};\n }\n const decoder = new TextDecoder();\n return JSON.parse(decoder.decode(arg));\n },\n};\n//# sourceMappingURL=trace.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nclass HttpExporterTransport {\n _parameters;\n _utils = null;\n constructor(_parameters) {\n this._parameters = _parameters;\n }\n async send(data, timeoutMillis) {\n const { agent, send } = this._loadUtils();\n return new Promise(resolve => {\n send(this._parameters, agent, data, result => {\n resolve(result);\n }, timeoutMillis);\n });\n }\n shutdown() {\n // intentionally left empty, nothing to do.\n }\n _loadUtils() {\n let utils = this._utils;\n if (utils === null) {\n // Lazy require to ensure that http/https is not required before instrumentations can wrap it.\n const { sendWithHttp, createHttpAgent,\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n } = require('./http-transport-utils');\n utils = this._utils = {\n agent: createHttpAgent(this._parameters.url, this._parameters.agentOptions),\n send: sendWithHttp,\n };\n }\n return utils;\n }\n}\nexport function createHttpExporterTransport(parameters) {\n return new HttpExporterTransport(parameters);\n}\n//# sourceMappingURL=http-exporter-transport.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst MAX_ATTEMPTS = 5;\nconst INITIAL_BACKOFF = 1000;\nconst MAX_BACKOFF = 5000;\nconst BACKOFF_MULTIPLIER = 1.5;\nconst JITTER = 0.2;\n/**\n * Get a pseudo-random jitter that falls in the range of [-JITTER, +JITTER]\n */\nfunction getJitter() {\n return Math.random() * (2 * JITTER) - JITTER;\n}\nclass RetryingTransport {\n _transport;\n constructor(_transport) {\n this._transport = _transport;\n }\n retry(data, timeoutMillis, inMillis) {\n return new Promise((resolve, reject) => {\n setTimeout(() => {\n this._transport.send(data, timeoutMillis).then(resolve, reject);\n }, inMillis);\n });\n }\n async send(data, timeoutMillis) {\n const deadline = Date.now() + timeoutMillis;\n let result = await this._transport.send(data, timeoutMillis);\n let attempts = MAX_ATTEMPTS;\n let nextBackoff = INITIAL_BACKOFF;\n while (result.status === 'retryable' && attempts > 0) {\n attempts--;\n // use maximum of computed backoff and 0 to avoid negative timeouts\n const backoff = Math.max(Math.min(nextBackoff, MAX_BACKOFF) + getJitter(), 0);\n nextBackoff = nextBackoff * BACKOFF_MULTIPLIER;\n const retryInMillis = result.retryInMillis ?? backoff;\n // return when expected retry time is after the export deadline.\n const remainingTimeoutMillis = deadline - Date.now();\n if (retryInMillis > remainingTimeoutMillis) {\n return result;\n }\n result = await this.retry(data, remainingTimeoutMillis, retryInMillis);\n }\n return result;\n }\n shutdown() {\n return this._transport.shutdown();\n }\n}\n/**\n * Creates an Exporter Transport that retries on 'retryable' response.\n */\nexport function createRetryingTransport(options) {\n return new RetryingTransport(options.transport);\n}\n//# sourceMappingURL=retrying-transport.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createOtlpExportDelegate, } from './otlp-export-delegate';\nimport { createHttpExporterTransport } from './transport/http-exporter-transport';\nimport { createBoundedQueueExportPromiseHandler } from './bounded-queue-export-promise-handler';\nimport { createRetryingTransport } from './retrying-transport';\nexport function createOtlpHttpExportDelegate(options, serializer) {\n return createOtlpExportDelegate({\n transport: createRetryingTransport({\n transport: createHttpExporterTransport(options),\n }),\n serializer: serializer,\n promiseHandler: createBoundedQueueExportPromiseHandler(options),\n }, { timeout: options.timeoutMillis });\n}\n//# sourceMappingURL=otlp-http-export-delegate.js.map","import { diag } from '@opentelemetry/api';\nfunction parseAndValidateTimeoutFromEnv(timeoutEnvVar) {\n const envTimeout = process.env[timeoutEnvVar]?.trim();\n if (envTimeout != null && envTimeout !== '') {\n const definedTimeout = Number(envTimeout);\n if (Number.isFinite(definedTimeout) && definedTimeout > 0) {\n return definedTimeout;\n }\n diag.warn(`Configuration: ${timeoutEnvVar} is invalid, expected number greater than 0 (actual: ${envTimeout})`);\n }\n return undefined;\n}\nfunction getTimeoutFromEnv(signalIdentifier) {\n const specificTimeout = parseAndValidateTimeoutFromEnv(`OTEL_EXPORTER_OTLP_${signalIdentifier}_TIMEOUT`);\n const nonSpecificTimeout = parseAndValidateTimeoutFromEnv('OTEL_EXPORTER_OTLP_TIMEOUT');\n return specificTimeout ?? nonSpecificTimeout;\n}\nfunction parseAndValidateCompressionFromEnv(compressionEnvVar) {\n const compression = process.env[compressionEnvVar]?.trim();\n if (compression === '') {\n return undefined;\n }\n if (compression == null || compression === 'none' || compression === 'gzip') {\n return compression;\n }\n diag.warn(`Configuration: ${compressionEnvVar} is invalid, expected 'none' or 'gzip' (actual: '${compression}')`);\n return undefined;\n}\nfunction getCompressionFromEnv(signalIdentifier) {\n const specificCompression = parseAndValidateCompressionFromEnv(`OTEL_EXPORTER_OTLP_${signalIdentifier}_COMPRESSION`);\n const nonSpecificCompression = parseAndValidateCompressionFromEnv('OTEL_EXPORTER_OTLP_COMPRESSION');\n return specificCompression ?? nonSpecificCompression;\n}\nexport function getSharedConfigurationFromEnvironment(signalIdentifier) {\n return {\n timeoutMillis: getTimeoutFromEnv(signalIdentifier),\n compression: getCompressionFromEnv(signalIdentifier),\n };\n}\n//# sourceMappingURL=shared-env-configuration.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { getSharedConfigurationDefaults, mergeOtlpSharedConfigurationWithDefaults, } from './shared-configuration';\nimport { validateAndNormalizeHeaders } from '../util';\nfunction mergeHeaders(userProvidedHeaders, fallbackHeaders, defaultHeaders) {\n const requiredHeaders = {\n ...defaultHeaders(),\n };\n const headers = {};\n return () => {\n // add fallback ones first\n if (fallbackHeaders != null) {\n Object.assign(headers, fallbackHeaders());\n }\n // override with user-provided ones\n if (userProvidedHeaders != null) {\n Object.assign(headers, userProvidedHeaders());\n }\n // override required ones.\n return Object.assign(headers, requiredHeaders);\n };\n}\nfunction validateUserProvidedUrl(url) {\n if (url == null) {\n return undefined;\n }\n try {\n new URL(url);\n return url;\n }\n catch {\n throw new Error(`Configuration: Could not parse user-provided export URL: '${url}'`);\n }\n}\n/**\n * @param userProvidedConfiguration Configuration options provided by the user in code.\n * @param fallbackConfiguration Fallback to use when the {@link userProvidedConfiguration} does not specify an option.\n * @param defaultConfiguration The defaults as defined by the exporter specification\n */\nexport function mergeOtlpHttpConfigurationWithDefaults(userProvidedConfiguration, fallbackConfiguration, defaultConfiguration) {\n return {\n ...mergeOtlpSharedConfigurationWithDefaults(userProvidedConfiguration, fallbackConfiguration, defaultConfiguration),\n headers: mergeHeaders(validateAndNormalizeHeaders(userProvidedConfiguration.headers), fallbackConfiguration.headers, defaultConfiguration.headers),\n url: validateUserProvidedUrl(userProvidedConfiguration.url) ??\n fallbackConfiguration.url ??\n defaultConfiguration.url,\n agentOptions: userProvidedConfiguration.agentOptions ??\n fallbackConfiguration.agentOptions ??\n defaultConfiguration.agentOptions,\n };\n}\nexport function getHttpConfigurationDefaults(requiredHeaders, signalResourcePath) {\n return {\n ...getSharedConfigurationDefaults(),\n headers: () => requiredHeaders,\n url: 'http://localhost:4318/' + signalResourcePath,\n agentOptions: { keepAlive: true },\n };\n}\n//# sourceMappingURL=otlp-http-configuration.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { parseKeyPairsIntoRecord } from '@opentelemetry/core';\nimport { diag } from '@opentelemetry/api';\nimport { getSharedConfigurationFromEnvironment } from './shared-env-configuration';\nimport { wrapStaticHeadersInFunction } from './shared-configuration';\nfunction getStaticHeadersFromEnv(signalIdentifier) {\n const signalSpecificRawHeaders = process.env[`OTEL_EXPORTER_OTLP_${signalIdentifier}_HEADERS`]?.trim();\n const nonSignalSpecificRawHeaders = process.env['OTEL_EXPORTER_OTLP_HEADERS']?.trim();\n const signalSpecificHeaders = parseKeyPairsIntoRecord(signalSpecificRawHeaders);\n const nonSignalSpecificHeaders = parseKeyPairsIntoRecord(nonSignalSpecificRawHeaders);\n if (Object.keys(signalSpecificHeaders).length === 0 &&\n Object.keys(nonSignalSpecificHeaders).length === 0) {\n return undefined;\n }\n // headers are combined instead of overwritten, with the specific headers taking precedence over\n // the non-specific ones.\n return Object.assign({}, parseKeyPairsIntoRecord(nonSignalSpecificRawHeaders), parseKeyPairsIntoRecord(signalSpecificRawHeaders));\n}\nfunction appendRootPathToUrlIfNeeded(url) {\n try {\n const parsedUrl = new URL(url);\n // This will automatically append '/' if there's no root path.\n return parsedUrl.toString();\n }\n catch {\n diag.warn(`Configuration: Could not parse environment-provided export URL: '${url}', falling back to undefined`);\n return undefined;\n }\n}\nfunction appendResourcePathToUrl(url, path) {\n try {\n // just try to parse, if it fails we catch and warn.\n new URL(url);\n }\n catch {\n diag.warn(`Configuration: Could not parse environment-provided export URL: '${url}', falling back to undefined`);\n return undefined;\n }\n if (!url.endsWith('/')) {\n url = url + '/';\n }\n url += path;\n try {\n // just try to parse, if it fails we catch and warn.\n new URL(url);\n }\n catch {\n diag.warn(`Configuration: Provided URL appended with '${path}' is not a valid URL, using 'undefined' instead of '${url}'`);\n return undefined;\n }\n return url;\n}\nfunction getNonSpecificUrlFromEnv(signalResourcePath) {\n const envUrl = process.env.OTEL_EXPORTER_OTLP_ENDPOINT?.trim();\n if (envUrl == null || envUrl === '') {\n return undefined;\n }\n return appendResourcePathToUrl(envUrl, signalResourcePath);\n}\nfunction getSpecificUrlFromEnv(signalIdentifier) {\n const envUrl = process.env[`OTEL_EXPORTER_OTLP_${signalIdentifier}_ENDPOINT`]?.trim();\n if (envUrl == null || envUrl === '') {\n return undefined;\n }\n return appendRootPathToUrlIfNeeded(envUrl);\n}\n/**\n * Reads and returns configuration from the environment\n *\n * @param signalIdentifier all caps part in environment variables that identifies the signal (e.g.: METRICS, TRACES, LOGS)\n * @param signalResourcePath signal resource path to append if necessary (e.g.: v1/metrics, v1/traces, v1/logs)\n */\nexport function getHttpConfigurationFromEnvironment(signalIdentifier, signalResourcePath) {\n return {\n ...getSharedConfigurationFromEnvironment(signalIdentifier),\n url: getSpecificUrlFromEnv(signalIdentifier) ??\n getNonSpecificUrlFromEnv(signalResourcePath),\n headers: wrapStaticHeadersInFunction(getStaticHeadersFromEnv(signalIdentifier)),\n };\n}\n//# sourceMappingURL=otlp-http-env-configuration.js.map","import { getHttpConfigurationDefaults, mergeOtlpHttpConfigurationWithDefaults, } from './otlp-http-configuration';\nimport { getHttpConfigurationFromEnvironment } from './otlp-http-env-configuration';\nimport { diag } from '@opentelemetry/api';\nimport { wrapStaticHeadersInFunction } from './shared-configuration';\nfunction convertLegacyAgentOptions(config) {\n // populate keepAlive for use with new settings\n if (config?.keepAlive != null) {\n if (config.httpAgentOptions != null) {\n if (config.httpAgentOptions.keepAlive == null) {\n // specific setting is not set, populate with non-specific setting.\n config.httpAgentOptions.keepAlive = config.keepAlive;\n }\n // do nothing, use specific setting otherwise\n }\n else {\n // populate specific option if AgentOptions does not exist.\n config.httpAgentOptions = {\n keepAlive: config.keepAlive,\n };\n }\n }\n return config.httpAgentOptions;\n}\n/**\n * @deprecated this will be removed in 2.0\n * @param config\n * @param signalIdentifier\n * @param signalResourcePath\n * @param requiredHeaders\n */\nexport function convertLegacyHttpOptions(config, signalIdentifier, signalResourcePath, requiredHeaders) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n if (config.metadata) {\n diag.warn('Metadata cannot be set when using http');\n }\n return mergeOtlpHttpConfigurationWithDefaults({\n url: config.url,\n headers: wrapStaticHeadersInFunction(config.headers),\n concurrencyLimit: config.concurrencyLimit,\n timeoutMillis: config.timeoutMillis,\n compression: config.compression,\n agentOptions: convertLegacyAgentOptions(config),\n }, getHttpConfigurationFromEnvironment(signalIdentifier, signalResourcePath), getHttpConfigurationDefaults(requiredHeaders, signalResourcePath));\n}\n//# sourceMappingURL=convert-legacy-node-http-options.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { diag } from '@opentelemetry/api';\n/**\n * Parses headers from config leaving only those that have defined values\n * @param partialHeaders\n */\nexport function validateAndNormalizeHeaders(partialHeaders) {\n return () => {\n const headers = {};\n Object.entries(partialHeaders?.() ?? {}).forEach(([key, value]) => {\n if (typeof value !== 'undefined') {\n headers[key] = String(value);\n }\n else {\n diag.warn(`Header \"${key}\" has invalid value (${value}) and will be ignored`);\n }\n });\n return headers;\n };\n}\n//# sourceMappingURL=util.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { OTLPExporterBase, } from '@opentelemetry/otlp-exporter-base';\nimport { VERSION } from '../../version';\nimport { JsonTraceSerializer } from '@opentelemetry/otlp-transformer';\nimport { convertLegacyHttpOptions, createOtlpHttpExportDelegate, } from '@opentelemetry/otlp-exporter-base/node-http';\n/**\n * Collector Trace Exporter for Node\n */\nexport class OTLPTraceExporter extends OTLPExporterBase {\n constructor(config = {}) {\n super(createOtlpHttpExportDelegate(convertLegacyHttpOptions(config, 'TRACES', 'v1/traces', {\n 'User-Agent': `OTel-OTLP-Exporter-JavaScript/${VERSION}`,\n 'Content-Type': 'application/json',\n }), JsonTraceSerializer));\n }\n}\n//# sourceMappingURL=OTLPTraceExporter.js.map","import { BatchSpanProcessor } from \"@opentelemetry/sdk-trace-base\";\nimport { WebTracerProvider } from \"@opentelemetry/sdk-trace-web\";\nimport { DocumentLoadInstrumentation } from \"@opentelemetry/instrumentation-document-load\";\nimport { ZoneContextManager } from \"@opentelemetry/context-zone\";\nimport { registerInstrumentations } from \"@opentelemetry/instrumentation\";\nimport { XMLHttpRequestInstrumentation } from \"@opentelemetry/instrumentation-xml-http-request\";\nimport { FetchInstrumentation } from \"@opentelemetry/instrumentation-fetch\";\nimport { W3CTraceContextPropagator } from \"@opentelemetry/core\";\nimport { MonoscopeConfig, MonoscopeUser } from \"./types\";\nimport { resourceFromAttributes } from \"@opentelemetry/resources\";\nimport { ATTR_SERVICE_NAME } from \"@opentelemetry/semantic-conventions\";\nimport { OTLPTraceExporter } from \"@opentelemetry/exporter-trace-otlp-http\";\n\nexport class OpenTelemetryManager {\n private config: MonoscopeConfig;\n private sessionId: string;\n private provider: WebTracerProvider;\n\n constructor(config: MonoscopeConfig, sessionId: string) {\n this.config = config;\n this.sessionId = sessionId;\n this.provider = this.createProvider();\n }\n\n private createProvider(): WebTracerProvider {\n const { serviceName, resourceAttributes, exporterEndpoint, projectId } =\n this.config;\n\n const resource = resourceFromAttributes({\n [ATTR_SERVICE_NAME]: serviceName,\n \"at-project-id\": projectId,\n ...(resourceAttributes || {}),\n });\n\n const otlpExporter = new OTLPTraceExporter({\n url: exporterEndpoint || \"http://otelcol.apitoolkit.io:4318/v1/traces\",\n headers: {},\n });\n\n return new WebTracerProvider({\n resource,\n spanProcessors: [new BatchSpanProcessor(otlpExporter)],\n });\n }\n\n public configure(): void {\n this.provider.register({\n contextManager: new ZoneContextManager(),\n propagator: new W3CTraceContextPropagator(),\n });\n\n const headerUrls = this.config.propagateTraceHeaderCorsUrls || [\n /^https?:\\/\\/.*/,\n ];\n const ignoreUrls = [\n /^https?:\\/\\/(?:[^\\/]+\\.)?apitoolkit\\.io\\//,\n /^https?:\\/\\/(?:[^\\/]+\\.)?monoscope\\.tech\\//,\n ];\n\n registerInstrumentations({\n tracerProvider: this.provider,\n instrumentations: [\n ...(this.config.instrumentations || []),\n new DocumentLoadInstrumentation({\n applyCustomAttributesOnSpan: {\n documentLoad: (span) => {\n span.setAttribute(\"session.id\", this.sessionId);\n this.setUserAttributes(span);\n },\n documentFetch: (span) => {\n span.setAttribute(\"session.id\", this.sessionId);\n this.setUserAttributes(span);\n },\n resourceFetch: (span) => {\n span.setAttribute(\"session.id\", this.sessionId);\n this.setUserAttributes(span);\n },\n },\n }),\n new XMLHttpRequestInstrumentation({\n propagateTraceHeaderCorsUrls: headerUrls,\n ignoreUrls,\n applyCustomAttributesOnSpan: (span) => {\n span.setAttribute(\"session.id\", this.sessionId);\n this.setUserAttributes(span);\n },\n }),\n new FetchInstrumentation({\n propagateTraceHeaderCorsUrls: headerUrls,\n ignoreUrls,\n applyCustomAttributesOnSpan: (span) => {\n span.setAttribute(\"session.id\", this.sessionId);\n this.setUserAttributes(span);\n },\n }),\n ],\n });\n }\n\n private setUserAttributes(span: any) {\n if (this.config.user) {\n for (let k in this.config.user) {\n span.setAttribute(`user.${k}`, this.config.user[k]);\n }\n }\n }\n\n public async shutdown(): Promise<void> {\n await this.provider.shutdown();\n }\n\n public setUser(newConfig: MonoscopeUser) {\n this.config = {\n ...this.config,\n user: { ...this.config.user, ...newConfig },\n };\n }\n}\n","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { trace, metrics } from '@opentelemetry/api';\nimport { logs } from '@opentelemetry/api-logs';\nimport { disableInstrumentations, enableInstrumentations, } from './autoLoaderUtils';\n/**\n * It will register instrumentations and plugins\n * @param options\n * @return returns function to unload instrumentation and plugins that were\n * registered\n */\nexport function registerInstrumentations(options) {\n const tracerProvider = options.tracerProvider || trace.getTracerProvider();\n const meterProvider = options.meterProvider || metrics.getMeterProvider();\n const loggerProvider = options.loggerProvider || logs.getLoggerProvider();\n const instrumentations = options.instrumentations?.flat() ?? [];\n enableInstrumentations(instrumentations, tracerProvider, meterProvider, loggerProvider);\n return () => {\n disableInstrumentations(instrumentations);\n };\n}\n//# sourceMappingURL=autoLoader.js.map","/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Enable instrumentations\n * @param instrumentations\n * @param tracerProvider\n * @param meterProvider\n */\nexport function enableInstrumentations(instrumentations, tracerProvider, meterProvider, loggerProvider) {\n for (let i = 0, j = instrumentations.length; i < j; i++) {\n const instrumentation = instrumentations[i];\n if (tracerProvider) {\n instrumentation.setTracerProvider(tracerProvider);\n }\n if (meterProvider) {\n instrumentation.setMeterProvider(meterProvider);\n }\n if (loggerProvider && instrumentation.setLoggerProvider) {\n instrumentation.setLoggerProvider(loggerProvider);\n }\n // instrumentations have been already enabled during creation\n // so enable only if user prevented that by setting enabled to false\n // this is to prevent double enabling but when calling register all\n // instrumentations should be now enabled\n if (!instrumentation.getConfig().enabled) {\n instrumentation.enable();\n }\n }\n}\n/**\n * Disable instrumentations\n * @param instrumentations\n */\nexport function disableInstrumentations(instrumentations) {\n instrumentations.forEach(instrumentation => instrumentation.disable());\n}\n//# sourceMappingURL=autoLoaderUtils.js.map","import validate from './validate.js';\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset);\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexport default stringify;\n","let getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n if (typeof crypto === 'undefined' || !crypto.getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n getRandomValues = crypto.getRandomValues.bind(crypto);\n }\n return getRandomValues(rnds8);\n}\n","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default { randomUUID };\n","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n options = options || {};\n const rnds = options.random ?? options.rng?.() ?? rng();\n if (rnds.length < 16) {\n throw new Error('Random bytes length must be >= 16');\n }\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n if (offset < 0 || offset + 16 > buf.length) {\n throw new RangeError(`UUID byte range ${offset}:${offset + 15} is out of buffer bounds`);\n }\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n}\nexport default v4;\n","import { MonoscopeReplay } from \"./replay\";\nimport { OpenTelemetryManager } from \"./tracing\";\nimport { MonoscopeConfig, MonoscopeUser } from \"./types\";\nimport { v4 as uuidv4 } from \"uuid\";\n\nclass Monoscope {\n replay: MonoscopeReplay;\n config: MonoscopeConfig;\n otel: OpenTelemetryManager;\n sessionId: string;\n\n constructor(config: MonoscopeConfig) {\n if (!config.projectId) {\n throw new Error(\"MonoscopeConfig must include projectId\");\n }\n\n const storedSessionId = sessionStorage.getItem(\"monoscope-session-id\");\n if (storedSessionId) {\n this.sessionId = storedSessionId;\n } else {\n this.sessionId = uuidv4();\n sessionStorage.setItem(\"monoscope-session-id\", this.sessionId);\n }\n\n this.config = config;\n this.replay = new MonoscopeReplay(config, this.sessionId);\n this.otel = new OpenTelemetryManager(config, this.sessionId);\n this.otel.configure();\n this.replay.configure();\n if (typeof window !== \"undefined\") {\n (window as any).monoscope = this;\n }\n }\n\n getSessionId() {\n return this.sessionId;\n }\n setUser(u: MonoscopeUser) {\n this.otel.setUser(u);\n }\n}\n\nif (typeof window !== \"undefined\") {\n (window as any).Monoscope = Monoscope;\n}\n\nexport default Monoscope;\n"],"names":["_a","__defProp","Object","defineProperty","__publicField","obj","key","value","enumerable","configurable","writable","__defNormalProp","__defProp2","__publicField2","__defNormalProp2","__defProp$1","__publicField$1","__defNormalProp$1","testableAccessors$1","Node","ShadowRoot","Element","MutationObserver","testableMethods$1","untaintedBasePrototype$1","getUntaintedPrototype$1","defaultObj","globalThis","defaultPrototype","prototype","accessorNames","isUntaintedAccessors","Boolean","every","accessor","_a2","_b","getOwnPropertyDescriptor","get","toString","includes","methodNames","isUntaintedMethods","method","Zone","iframeEl","document","createElement","body","appendChild","win","contentWindow","untaintedObject","removeChild","untaintedAccessorCache$1","getUntaintedAccessor$1","instance","cacheKey","String","call","untaintedPrototype","untaintedAccessor","untaintedMethodCache$1","getUntaintedMethod$1","bind","untaintedMethod","index$1","childNodes","n2","parentNode","parentElement","textContent","contains","other","getRootNode","host","styleSheets","shadowRoot","querySelector","selectors","querySelectorAll","mutationObserver","constructor","Mirror$1","this","Map","WeakMap","getId","getMeta","id","getNode","idNodeMap","getIds","Array","from","keys","nodeMetaMap","removeNodeFromMap","delete","forEach","childNode","has","hasNode","node2","add","meta","set","replace","oldNode","reset","classMatchesRegex","regex","checkAncestors","nodeType","ELEMENT_NODE","eIndex","classList","length","className","test","getDefaultExportFromCjs$1","x2","__esModule","hasOwnProperty","getAugmentedNamespace$1","f2","default","a2","a22","Reflect","construct","arguments","apply","k","d","picocolors_browser$1","exports","x$1","create$1","isColorSupported","bold","dim","italic","underline","inverse","hidden","strikethrough","black","red","green","yellow","blue","magenta","cyan","white","gray","bgBlack","bgRed","bgGreen","bgYellow","bgBlue","bgMagenta","bgCyan","bgWhite","createColors","picocolors_browserExports$1","require$$2$1","freeze","__proto__","Symbol","toStringTag","pico$1","terminalHighlight$1$1","CssSyntaxError$3$1","CssSyntaxError","Error","message","line","column","source","file","plugin22","super","name","reason","plugin","endLine","endColumn","setMessage","captureStackTrace","showSourceCode","color","css","mark","aside","lines","split","start","Math","max","end","min","maxWidth","text","str","slice","map","index2","number","gutter","spacing","join","code","cssSyntaxError$1","symbols$1","isClean","my","DEFAULT_RAW$1","after","beforeClose","beforeComment","beforeDecl","beforeOpen","beforeRule","colon","commentLeft","commentRight","emptyBody","indent","semicolon","Stringifier$2$1","builder","atrule","params","rawValue","raws","afterName","nodes","block","between","beforeAfter","detect","type","raw","buf","parent","depth","step","last","i2","child","before","stringify","comment","left","right","decl","string","prop","important","own","first","root2","root","rawCache","toUpperCase","walk","rawBeforeClose","rawBeforeComment","walkComments","rawBeforeDecl","walkDecls","rawBeforeOpen","rawBeforeRule","rawColon","rawEmptyBody","rawIndent","p","parts","rawSemicolon","rule","ownSemicolon","stringifier$1","Stringifier$1$1","stringify$4$1","stringify_1$1","isClean$2$1","my$2$1","CssSyntaxError$2$1","Stringifier2$1","stringify$3$1","cloneNode$1","cloned","isArray","j","Node$4$1","defaults","clone","append","addToError","error","postcssNode","stack","s2","input","insertAfter","assign","overrides","insertBefore","cleanRaws","keepBetween","cloneAfter","cloneBefore","opts","rangeBy","getProxyProcessor","toProxy","markDirty","next","index","positionBy","stringRepresentation","pos","positionInside","word","indexOf","prev","endIndex","defaultType","remove","replaceWith","bookmark","foundSelf","result2","toJSON","_","inputs","fixed","emitInputs","inputsNextIndex","inputId","input2","proxyCache","Proxy","stringifier2","warn","data","node","proxyOf","node$1","Node$3$1","Declaration$4$1","variable","startsWith","declaration$1","nonSecure$1","nanoid","size","random","SourceMapConsumer","SourceMapConsumer$2$1","SourceMapGenerator","SourceMapGenerator$2$1","existsSync","existsSync$1","readFileSync","readFileSync$1","dirname","dirname$1$1","join$1","PreviousMap$2$1","loadAnnotation","inline","startWith","annotation","loadMap","mapFile","consumer","consumerCache","decodeInline","decodeURIComponent","substr","RegExp","lastMatch","Buffer","window","atob","encoding","match","getAnnotationURL","sourceMapString","trim","isMap","mappings","_mappings","sections","comments","lastIndexOf","pop","substring","loadFile","path","fromSourceMap","JSON","prevPath","withContent","sourcesContent","previousMap$1","SourceMapConsumer$1$1","SourceMapGenerator$1$1","fileURLToPath","fileURLToPath$1","pathToFileURL","pathToFileURL$1$1","isAbsolute","isAbsolute$1","resolve","resolve$1$1","nanoid$2","terminalHighlight$2","CssSyntaxError$1$1","PreviousMap$1$1","fromOffsetCache$1","sourceMapAvailable$1$1","pathAvailable$1$1","Input$4$1","hasBOM","mapResolve","offset","fromOffset","col","origin","url","lastLine","lineToIndex","prevIndex","l2","mid","sourceRoot","to","fromUrl","originalPositionFor","URL","protocol","sourceContentFor","json","input$1","registerInput","SourceMapConsumer$3","SourceMapGenerator$3","dirname$2","relative","relative$1","resolve$2","sep","sep$1","pathToFileURL$2","Input$3$1","sourceMapAvailable$2","pathAvailable$2","mapGenerator$1","stringify2","cssString","mapOpts","originalCSS","usesFileUrls","absolute","memoizedFileURLs","memoizedPaths","memoizedURLs","addAnnotation","content","isInline","toBase64","outputFile","eol","applyPrevMaps","previous","toUrl","applySourceMap","clearAnnotation","generate","generateMap","generateString","ignoreInvalidMapping","addMapping","generated","original","isSourcesContent","setSourcesContent","isAnnotation","noSource","mapping","sourcePath","some","charCodeAt","cached","previousMaps","push","already","toFileUrl","setSourceContent","btoa","unescape","encodeURIComponent","fileURL","encodeURI","Node$2$1","Comment$4$1","comment$1","parse$4$1","Rule$4$1","AtRule$4$1","Root$6$1","isClean$1$1","my$1$1","Declaration$3$1","Comment$3$1","Node$1$1","cleanSource$1","markDirtyUp$1","Container$7$1","Container","children","normalize","each","callback","iterator","getIterator","indexes","condition","lastEach","args","cb","exist","existIndex","reverse","splice","sample","selector","rebuild","prepend","unshift","removeAll","replaceValues","pattern","props","fast","e2","walkAtRules","walkRules","registerParse","dependant","registerRule","registerAtRule","registerRoot","container$1","setPrototypeOf","LazyResult$4$1","Processor$3$1","Container$6$1","Document$3$1","toResult","registerLazyResult","registerProcessor","document$1$1","printed$1","warnOnce$2$1","console","Warning$2$1","range","opt","warning$1","Warning$1$1","Result$3$1","processor2","processor","messages","lastPlugin","postcssPlugin","warning2","warnings","filter","result$1","SINGLE_QUOTE$1","DOUBLE_QUOTE$1","BACKSLASH$1","SLASH$1","NEWLINE$1","SPACE$1","FEED$1","TAB$1","CR$1","OPEN_SQUARE$1","CLOSE_SQUARE$1","OPEN_PARENTHESES$1","CLOSE_PARENTHESES$1","OPEN_CURLY$1","CLOSE_CURLY$1","SEMICOLON$1","ASTERISK$1","COLON$1","AT$1","RE_AT_END$1","RE_WORD_END$1","RE_BAD_BRACKET$1","RE_HEX_ESCAPE$1","Container$5$1","AtRule$3$1","atRule$1","LazyResult$3$1","Processor$2$1","Container$4$1","Root$5$1","ignore","root$1","list$2$1","comma","space","separators","array","current","func","inQuote","prevQuote","escape","letter","list_1$1","Container$3$1","list$1$1","Rule$3$1","values","sep2","rule$1","Declaration$2$1","tokenizer2$1","options","quote","escaped","escapePos","currentToken","valueOf","ignoreErrors","buffer","returned","unclosed","what","back","token","endOfFile","nextToken","ignoreUnclosed","controlChar","fromCharCode","lastIndex","charAt","position","Comment$2$1","AtRule$2$1","Root$4$1","Rule$2$1","SAFE_COMMENT_NEIGHBOR$1","empty","Container$2$1","Parser2$1","spaces","createTokenizer","shift","unnamedAtrule","init","open","brackets","tokenizer","getPosition","spacesAndCommentsFromEnd","spacesAndCommentsFromStart","checkMissedSemicolon","tokens","founded","element","entries","doubleColon","customProperty","findLastWithPosition$1","unknownWord","firstSpaces","precheckMissedSemicolon","toLowerCase","stringFrom","spacesFromEnd","cache","concat","emptyRule","unexpectedClose","endFile","unclosedBlock","freeSemicolon","bracket","unclosedBracket","parse","clean","reduce","all","lastTokenType","Input$2$1","parse$3$1","parser2","process","env","NODE_ENV","parse_1$1","isClean$3","my$3","MapGenerator$1$1","stringify$2$1","Container$1$1","Document$2$1","warnOnce$1$1","Result$2$1","parse$2$1","Root$3$1","TYPE_TO_CLASS_NAME$1","PLUGIN_PROPS$1","AtRule","AtRuleExit","Comment","CommentExit","Declaration","DeclarationExit","Document","DocumentExit","Once","OnceExit","prepare","Root","RootExit","Rule","RuleExit","NOT_VISITORS$1","isPromise$1","then","getEvents$1","toStack$1","events","eventIndex","visitorIndex","visitors","cleanMarks$1","postcss$2$1","LazyResult$2$1","LazyResult","stringified","processed","syntax","parser","result","helpers","postcss","plugins","async","Promise","reject","processing","runAsync","onRejected","catch","onFinally","getAsyncError","handleError","postcssVersion","pluginName","pluginVer","runtimeVer","version","b","parseInt","err","prepareVisitors","listeners","event","hasListener","promise","runOnRoot","visitTick","visitor","roots","subRoot","sync","stringifier","walkSync","visitSync","onFulfilled","visit2","registerPostcss","lazyResult$1","MapGenerator2$1","stringify$1$1","warnOnce2$1","parse$1$1","Result$1$1","NoWorkResult$1$1","_processor","_css","_opts","_map","self","generatedCSS","generatedMap","_root","noWorkResult$1","NoWorkResult2$1","LazyResult$1$1","Document$1$1","Root$2$1","Processor$1$1","normalized","use","processor$1","Declaration$1$1","PreviousMap2$1","Comment$1$1","AtRule$1$1","Input$1$1","Root$1$1","Rule$1$1","fromJSON$1$1","ownInputs","inputHydrated","fromJSON_1$1","CssSyntaxError2$1","Declaration2$1","LazyResult2$1","Container2$1","Processor2$1","stringify$5","fromJSON$2","Document22","Warning2$1","Comment2$1","AtRule2$1","Result2$1","Input2$1","parse$5","list$3","Rule2$1","Root2$1","Node2$1","postcss$3","initializer","warningPrinted","creator","LANG","transformer","processOpts","pluginOpts","fromJSON","list","atRule","Processor","Warning","Result","Input","postcss_1$1","postcss$1$1","__defProp22","__publicField22","__defNormalProp22","getDefaultExportFromCjs","getAugmentedNamespace","picocolors_browser","x","create","picocolors_browserExports","require$$2","pico","terminalHighlight$1","CssSyntaxError$3","CssSyntaxError2","cssSyntaxError","symbols","DEFAULT_RAW","Stringifier$2","Stringifier$1","stringify$4","stringify_1","isClean$2","my$2","CssSyntaxError$2","Stringifier22","stringify$3","cloneNode","Node$4","Node$3","Declaration$4","declaration","nonSecure","SourceMapConsumer$2","SourceMapGenerator$2","dirname$1","PreviousMap$2","previousMap","SourceMapConsumer$1","SourceMapGenerator$1","pathToFileURL$1","resolve$1","terminalHighlight","CssSyntaxError$1","PreviousMap$1","fromOffsetCache","sourceMapAvailable$1","pathAvailable$1","Input$4","Input$3","sourceMapAvailable","pathAvailable","mapGenerator","Node$2","Comment$4","parse$4","Rule$4","AtRule$4","Root$6","isClean$1","my$1","Declaration$3","Comment$3","Node$1","cleanSource","markDirtyUp","Container$7","Container2","container","LazyResult$4","Processor$3","Container$6","Document$3","document$1","printed","warnOnce$2","Warning$2","warning","Warning$1","Result$3","SINGLE_QUOTE","DOUBLE_QUOTE","BACKSLASH","SLASH","NEWLINE","SPACE","FEED","TAB","CR","OPEN_SQUARE","CLOSE_SQUARE","OPEN_PARENTHESES","CLOSE_PARENTHESES","OPEN_CURLY","CLOSE_CURLY","SEMICOLON","ASTERISK","COLON","AT","RE_AT_END","RE_WORD_END","RE_BAD_BRACKET","RE_HEX_ESCAPE","Container$5","AtRule$3","LazyResult$3","Processor$2","Container$4","Root$5","list$2","list_1","Container$3","list$1","Rule$3","Declaration$2","tokenizer22","Comment$2","AtRule$2","Root$4","Rule$2","SAFE_COMMENT_NEIGHBOR","Container$2","Parser22","findLastWithPosition","Input$2","parse$3","parse_1","MapGenerator$1","stringify$2","Container$1","Document$2","warnOnce$1","Result$2","parse$2","Root$3","TYPE_TO_CLASS_NAME","PLUGIN_PROPS","NOT_VISITORS","isPromise","getEvents","toStack","cleanMarks","postcss$2","LazyResult$2","LazyResult2","lazyResult","MapGenerator22","stringify$1","warnOnce22","parse$1","Result$1","NoWorkResult$1","noWorkResult","NoWorkResult22","LazyResult$1","Document$1","Root$2","Processor$1","Declaration$1","PreviousMap22","Comment$1","AtRule$1","Input$1","Root$1","Rule$1","fromJSON$1","fromJSON_1","CssSyntaxError22","Declaration22","LazyResult22","Container22","Processor22","stringify$6","Document222","Warning22","Comment22","AtRule22","Result22","Input22","Rule22","Root22","Node22","postcss_1","postcss$1","BaseRRNode","_args","childNodes2","childIterator","firstChild","nextSibling","ownerDocument","_newChild","_refChild","_node","testableAccessors","testableMethods","untaintedBasePrototype","getUntaintedPrototype","untaintedAccessorCache","getUntaintedAccessor","untaintedMethodCache","getUntaintedMethod","DEPARTED_MIRROR_ACCESS_WARNING","_mirror","target","receiver","nowTimestamp","Date","now","closestElementOfNode","getTime","getShadowHost","shadowHost","DOCUMENT_FRAGMENT_NODE","getRootShadowHost","rootShadowHost","shadowHostInDom","doc","utils","StyleSheetMirror","stylesheet","styleIDMap","newId","idStyleMap","getStyle","generateId","getBaseDimension","rootIframe","frameElement","defaultView","y","relativeScale","absoluteScale","frameDimension","getBoundingClientRect","frameBaseDimension","height","clientHeight","getNestedRule","rules2","rule2","cssRules","getPositionsAndIndex","nestedIndex","positions","getWindowHeight","innerHeight","documentElement","getWindowScroll","_c","_d","scrollingElement","scrollLeft","pageXOffset","top","scrollTop","pageYOffset","getWindowWidth","innerWidth","clientWidth","hasShadowRoot","hookSetter","isRevoked","setTimeout","inDom","isAncestorRemoved","mirror2","hostEl","isShadowRoot","DOCUMENT_NODE","isBlocked","blockClass","blockSelector","el","closest","matches","isIgnored","slimDOMOptions","tagName","headTitleMutations","isSerialized","isSerializedIframe","nodeName","isSerializedStylesheet","getAttribute","iterateResolveTree","tree","legacy_isTouchEvent","changedTouches","on","fn","capture","passive","addEventListener","removeEventListener","patch","replacement","wrapped","defineProperties","__rrweb_original__","polyfill","NodeList","DOMTokenList","queueToResolveTrees","queue","queueNodeMap","putIntoMap","m","nodeInTree","queueNodeTrees","mutation","nextId","parentId","nextInTree","idx","parentInTree","throttle","wait","timeout","leading","remaining","context","clearTimeout","trailing","uniqueTextMutations","mutations","idSet","Set","uniqueMutations","chars","lookup","Uint8Array","i$1","base64","n","t2","Blob","c2","cleanFrame","debug","Mirror","NotStarted","Running","Stopped","StackFrame","fileName","functionName","lineNumber","columnNumber","FIREFOX_SAFARI_STACK_REGEXP","CHROME_IE_STACK_REGEXP","SAFARI_NATIVE_CODE_REGEXP","ErrorStackParser","stacktrace","parseOpera","parseV8OrIE","parseFFOrSafari","extractLocation","urlLike","exec","sanitizedLine","location","locationParts","functionNameRegex","e","parseOpera9","parseOpera11","parseOpera10","lineRE","i","len","parseFloat","pathToSelector","outerHTML","localName","domSiblings","sibling","isObject","isObjTooDeep","limit","stringifyOptions","numOfKeysLimit","depthOfLimit","thisPos","Infinity","_obj","shouldIgnore","stringLengthLimit","Event","eventResult","eventKey","eventValue","HTMLElement","defaultLogOptions","level","lengthThreshold","logger","initLogObserver","logOptions","loggerType","logCount","inStack","cancelHandlers","errorHandler","trace","stackFrame","payload","unhandledrejectionHandler","levelType","h","_logger","s","NodeType","isNativeShadowDom","getCssRulesString","rules","cssText","getCssRuleString","cssStringified","isCSSImportRule","styleSheet","_this","maskInputValue","maskInputOptions","maskInputFn","repeat","ORIGINAL_ATTRIBUTE_NAME","canvasService","canvasCtx","_id","tagNameRegex","genId","URL_IN_CSS_REF","RELATIVE_PATH","DATA_URI","absoluteToStylesheet","href","quote1","path1","quote2","path2","path3","filePath","maybeQuote","extractOrigin","_i","parts_1","part","SRCSET_NOT_SPACES","SRCSET_COMMAS_OR_SPACES","absoluteToDoc","attributeValue","a","isSVGElement","ownerSVGElement","getHref","transformAttribute","collectCharacters","regEx","output","descriptorsStr","inParens","c","getAbsoluteSrcsetString","needMaskingText","maskTextClass","maskTextSelector","serializeNode","mirror","inlineStylesheet","maskTextFn","dataURLOptions","inlineImages","recordCanvas","keepIframeSrcFn","newlyAddedElement","rootId","docId","undefined","getRootId","compatMode","DOCUMENT_TYPE_NODE","DocumentType","publicId","systemId","needBlock","_isBlockedElement","HTMLFormElement","processedTagName","getValidTagName","attributes","attr","find","rel","_cssText","sheet","innerText","checked","selected","__context","canvas","ctx","getContext","width","getImageData","originalGetImageData","Uint32Array","pixel","is2DCanvasBlank","rr_dataURL","toDataURL","quality","canvasDataURL","blankCanvas","image_1","oldValue_1","crossOrigin","recordInlineImage","naturalWidth","naturalHeight","drawImage","currentSrc","removeAttribute","complete","onload","rr_mediaState","paused","rr_mediaCurrentTime","currentTime","rr_scrollLeft","rr_scrollTop","class","rr_width","rr_height","src","contentDocument","rr_src","isSVG","serializeElementNode","TEXT_NODE","parentTagName","isStyle","isScript","previousSibling","Text","serializeTextNode","CDATA_SECTION_NODE","CDATA","COMMENT_NODE","lowerIfExists","maybeAttr","serializeNodeWithId","skipChild","_e","_f","onSerialize","onIframeLoad","_g","iframeLoadTimeout","onStylesheetLoad","_h","stylesheetLoadTimeout","_j","_k","_l","preserveWhiteSpace","_serializedNode","sn","script","as","endsWith","headFavicon","headMetaDescKeywords","headMetaSocial","property","headMetaRobots","headMetaHttpEquiv","headMetaAuthorship","headMetaVerification","slimDOMExcluded","serializedNode","recordChild","isShadowHost","headWhitespace","bypassOptions","_m","serializedChildNode","isElement","_o","_p","isShadow","listener","readyState","fired","blankUrl","timer_1","onceIframeLoaded","iframeDoc","serializedIframeNode","link","styleSheetLoadTimeout","styleSheetLoaded","timer","onceStylesheetLoaded","serializedLinkNode","isTouchEvent","EventType","EventType2","IncrementalSource","IncrementalSource2","MouseInteractions","MouseInteractions2","CanvasContext","CanvasContext2","isNodeInLinkedList","DoubleLinkedList","head","addNode","__ln","removeNode","moveKey","MutationBuffer","frozen","locked","texts","removes","mapRemoves","movedMap","addedSet","movedSet","droppedSet","processMutations","processMutation","emit","adds","addList","getNextId","ns","pushAdd","notInDoc","currentN","iframeManager","addIframe","stylesheetManager","trackLinkElement","shadowDomManager","addShadowRoot","iframe","childSn","attachIframe","observeAttachShadow","attachLinkElement","isParentRemoved","isAncestorInSet","candidate","unhandledNode","attribute","mutationCb","oldValue","attributeName","item","old","setAttribute","style","styleObj","pname","newValue","getPropertyValue","newPriority","getPropertyPriority","addedNodes","genAdds","removedNodes","nodeId","deepDelete","targetId","childN","canvasManager","unfreeze","isFrozen","lock","unlock","addsSet","_isParentRemoved","r","_isAncestorInSet","mutationBuffers","isCSSGroupingRuleSupported","CSSGroupingRule","isCSSMediaRuleSupported","CSSMediaRule","isCSSSupportsRuleSupported","CSSSupportsRule","isCSSConditionRuleSupported","CSSConditionRule","getEventTarget","composedPath","initMutationObserver","rootEl","mutationBuffer","mutationObserverCtor","__rrMutationObserver","angularZoneSymbol","__symbol__","observer","observe","attributeOldValue","characterData","characterDataOldValue","childList","subtree","initMouseInteractionObserver","mouseInteractionCb","sampling","mouseInteraction","disableMap","handlers","Number","isNaN","eventName","handler","clientX","clientY","getHandler","initScrollObserver","scrollCb","evt","scrollEl","scroll","wrapEventWithUserTriggeredFlag","v","enable","userTriggered","INPUT_TAGS","lastInputValueMap","getNestedCSSRulePositions","childRule","parentRule","parentStyleSheet","recurse","getIdAndStyleId","styleMirror","styleId","ownerNode","initAdoptedStyleSheetObserver","hostId","patchTarget","originalPropertyDescriptor","sheets","adoptStyleSheets","initObservers","o","hooks","currentWindow","mousemoveCb","viewportResizeCb","inputCb","mediaInteractionCb","styleSheetRuleCb","styleDeclarationCb","canvasMutationCb","fontCb","selectionCb","mousemove","viewportResize","mediaInteaction","styleSheetRule","styleDeclaration","canvasMutation","font","selection","mergeHooks","mousemoveHandler","threshold","callbackThreshold","mousemoveCallback","timeBaseline","wrappedCb","totalOffset","timeOffset","updatePosition","DragEvent","Drag","MouseEvent","MouseMove","TouchMove","initMoveObserver","mouseInteractionHandler","scrollHandler","viewportResizeHandler","lastH","lastW","initViewportResizeObserver","inputHandler","ignoreClass","userTriggeredOnInput","eventHandler","isTrusted","isChecked","cbWithDedup","lastInputValue","propertyDescriptor","HTMLInputElement","hookProperties","HTMLSelectElement","HTMLTextAreaElement","HTMLOptionElement","initInputObserver","mediaInteractionHandler","volume","muted","playbackRate","media","initMediaInteractionObserver","styleSheetObserver","insertRule","CSSStyleSheet","deleteRule","replaceSync","supportedNestedCSSRuleTypes","unmodifiedFunctions","typeKey","initStyleSheetObserver","adoptedStyleSheetObserver","styleDeclarationObserver","ignoreCSSAttributes","setProperty","CSSStyleDeclaration","priority","removeProperty","initStyleDeclarationObserver","fontObserver","collectFonts","fontMap","originalFontFace","FontFace","family","descriptors","fontFace","fontSource","restoreHandler","fonts","initFontObserver","selectionObserver","param","collapsed","updateSelection","getSelection","isCollapsed","ranges","count","rangeCount","getRangeAt","startContainer","startOffset","endContainer","endOffset","initSelectionObserver","pluginHandlers","disconnect","CrossOriginIframeMirror","generateIdFn","iframeIdToRemoteIdMap","iframeRemoteIdToIdMap","remoteId","idToRemoteMap","remoteToIdMap","idToRemoteIdMap","getIdToRemoteIdMap","remoteIdToIdMap","getRemoteIdToIdMap","getRemoteId","getRemoteIds","ids","IframeManager","iframes","crossOriginIframeMap","crossOriginIframeMirror","wrappedEmit","recordCrossOriginIframes","crossOriginIframeStyleMirror","handleMessage","addLoadListener","loadListener","isAttachIframe","adoptedStyleSheets","transformedEvent","transformCrossOriginEvent","isCheckout","FullSnapshot","replaceIdOnNode","timestamp","IncrementalSnapshot","Mutation","Meta","Load","DomContentLoaded","Plugin","Custom","replaceIds","ViewportResize","MediaInteraction","MouseInteraction","Scroll","CanvasMutation","StyleSheetRule","StyleDeclaration","replaceStyleIds","Font","Selection","AdoptedStyleSheet","styles","iframeMirror","ShadowDomManager","shadowDoms","WeakSet","restorePatches","manager","option","iframeElement","restorePatch","__awaiter","thisArg","_arguments","P","generator","fulfilled","rejected","done","canvasVarMap","saveWebGLVar","isInstanceOfWebGLObject","ctor","contextMap","variableListFor","serializeArg","arg","Float32Array","Float64Array","Int32Array","Uint16Array","Int16Array","Int8Array","Uint8ClampedArray","rr_type","ArrayBuffer","arraybuffer","bytes","encode","DataView","byteOffset","byteLength","HTMLImageElement","HTMLCanvasElement","ImageData","serializeArgs","supportedWebGLConstructorNames","initCanvasContextObserver","contextType","patchGLPrototype","getOwnPropertyNames","recordArgs","hookHandler","setter","WorkerClass","WorkerThreads","module","require","__non_webpack_require__","Worker","createBase64WorkerFactory","sourcemapArg","enableUnicodeArg","decodeBase64","eval","createURL","blob","createObjectURL","kIsNodeJS","WorkerFactory","createBase64WorkerFactory$1","createBase64WorkerFactory$2","CanvasManager","pendingCanvasMutations","rafStamps","latestId","invokeId","initCanvasMutationObserver","initCanvasFPSObserver","clear","resetObservers","fps","canvasContextReset","snapshotInProgressMap","worker","onmessage","commands","timeBetweenSnapshots","rafId","lastSnapshotTime","takeCanvasSnapshots","matchedCanvas","getCanvas","getContextAttributes","preserveDrawingBuffer","COLOR_BUFFER_BIT","bitmap","createImageBitmap","postMessage","requestAnimationFrame","cancelAnimationFrame","startRAFTimestamping","startPendingCanvasMutationFlusher","canvas2DReset","props2D","CanvasRenderingContext2D","initCanvas2DMutationObserver","canvasWebGL1and2Reset","WebGLRenderingContext","WebGL","WebGL2RenderingContext","WebGL2","initCanvasWebGLMutationObserver","flushPendingCanvasMutations","setLatestRAFTimestamp","flushPendingCanvasMutationFor","valuesWithType","rest","t","getOwnPropertySymbols","propertyIsEnumerable","__rest","StylesheetManager","trackedLinkElements","adoptedStyleSheetCb","linkEl","trackStylesheetInLinkElement","adoptedStyleSheetData","styleIds","CSSRule","wrapEvent","takeFullSnapshot","recording","record","checkoutEveryNms","checkoutEveryNth","maskAllInputs","_maskInputOptions","_slimDOMOptions","packFn","mousemoveWait","inEmittingFrame","passEmitsToParent","date","email","month","search","tel","time","week","textarea","select","password","lastFullSnapshotEvent","TypeError","incrementalSnapshotCount","eventProcessor","exceedCount","exceedTime","wrappedMutationEmit","wrappedScrollEmit","wrappedCanvasMutationEmit","getMirror","nodeMirror","slimDOM","snapshot","initialOffset","addCustomEvent","tag","freezePage","MonoscopeReplay","config","sessionId","save","configure","rrweb.record","setInterval","replayEventsBaseUrl","projectId","toISOString","fetch","mode","headers","_globalThis","global","VERSION","re","isCompatible","ownVersion","acceptedVersions","rejectedVersions","myVersionMatch","ownVersionParsed","globalVersion","_reject","_accept","globalVersionMatch","globalVersionParsed","_makeCompatibilityCheck","major","GLOBAL_OPENTELEMETRY_API_KEY","for","_global","registerGlobal","diag","allowOverride","api","getGlobal","unregisterGlobal","DiagLogLevel","__read","ar","__spreadArray","pack","l","DiagComponentLogger","_namespace","namespace","logProxy","info","verbose","funcName","DiagAPI","_logProxy","setLogger","optionsOrLogLevel","logLevel","INFO","oldLogger","newLogger","maxLevel","_filterFunc","theLevel","theFunc","NONE","ALL","ERROR","WARN","DEBUG","VERBOSE","createLogLevelDiagLogger","suppressOverrideMessage","disable","createComponentLogger","_instance","__values","BaggageImpl","_entries","getEntry","entry","getAllEntries","setEntry","newBaggage","removeEntry","removeEntries","e_1","keys_1","keys_1_1","e_1_1","return","baggageEntryMetadataSymbol","createBaggage","createContextKey","description","extendStatics","TraceFlags","BaseContext","parentContext","_currentContext","getValue","setValue","deleteValue","ROOT_CONTEXT","__extends","__","NoopMeter","createGauge","_name","_options","NOOP_GAUGE_METRIC","createHistogram","NOOP_HISTOGRAM_METRIC","createCounter","NOOP_COUNTER_METRIC","createUpDownCounter","NOOP_UP_DOWN_COUNTER_METRIC","createObservableGauge","NOOP_OBSERVABLE_GAUGE_METRIC","createObservableCounter","NOOP_OBSERVABLE_COUNTER_METRIC","createObservableUpDownCounter","NOOP_OBSERVABLE_UP_DOWN_COUNTER_METRIC","addBatchObservableCallback","_callback","_observables","removeBatchObservableCallback","NoopMetric","NoopCounterMetric","_super","_value","_attributes","NoopUpDownCounterMetric","NoopGaugeMetric","NoopHistogramMetric","NoopObservableMetric","addCallback","removeCallback","NoopObservableCounterMetric","NoopObservableGaugeMetric","NoopObservableUpDownCounterMetric","NOOP_METER","defaultTextMapGetter","carrier","defaultTextMapSetter","NoopContextManager","active","with","_context","API_NAME","NOOP_CONTEXT_MANAGER","ContextAPI","getInstance","setGlobalContextManager","contextManager","_getContextManager","INVALID_SPANID","INVALID_TRACEID","INVALID_SPAN_CONTEXT","traceId","spanId","traceFlags","NonRecordingSpan","_spanContext","spanContext","_key","setAttributes","addEvent","addLink","_link","addLinks","_links","setStatus","_status","updateName","_endTime","isRecording","recordException","_exception","_time","SPAN_KEY","getSpan","getActiveSpan","setSpan","span","deleteSpan","setSpanContext","getSpanContext","VALID_TRACEID_REGEX","VALID_SPANID_REGEX","isValidTraceId","isSpanContextValid","wrapSpanContext","contextApi","NoopTracer","startSpan","parentFromContext","startActiveSpan","arg2","arg3","arg4","contextWithSpanSet","SamplingDecision","SpanKind","SpanStatusCode","NOOP_TRACER","ProxyTracer","_provider","_getTracer","_fn","tracer","_delegate","getDelegateTracer","NOOP_TRACER_PROVIDER","NoopTracerProvider","getTracer","_version","ProxyTracerProvider","getDelegate","setDelegate","delegate","NOOP_METER_PROVIDER","NoopMeterProvider","getMeter","metrics","MetricsAPI","setGlobalMeterProvider","provider","getMeterProvider","NoopTextMapPropagator","inject","_carrier","extract","fields","BAGGAGE_KEY","getBaggage","getActiveBaggage","setBaggage","baggage","deleteBaggage","NOOP_TEXT_MAP_PROPAGATOR","PropagationAPI","setGlobalPropagator","propagator","_getGlobalPropagator","getter","propagation","TraceAPI","_proxyTracerProvider","setGlobalTracerProvider","success","getTracerProvider","SUPPRESS_TRACING_KEY","isTracingSuppressed","BAGGAGE_ITEMS_SEPARATOR","BAGGAGE_HEADER","parsePairKeyValue","valueProps","keyPairPart","separatorIndex","metadata","__TYPE__","parseKeyPairsIntoRecord","keyPair","W3CBaggagePropagator","keyPairs","getKeyPairs","pair","headerValue","hValue","serializeKeyPairs","baggageString","baggageEntry","sanitizeAttributes","out","val","isAttributeKey","isAttributeValue","arr","isValidPrimitiveAttributeValue","isHomogeneousAttributeValueArray","delegateHandler","ex","propertyName","getPrototypeOf","flattenException","stringifyException","globalErrorHandler","getNumberFromEnv","inspect","getStringFromEnv","getStringListFromEnv","otperformance","performance","SEMATTRS_HTTP_URL","ATTR_ERROR_TYPE","ATTR_EXCEPTION_MESSAGE","ATTR_EXCEPTION_TYPE","ATTR_HTTP_REQUEST_METHOD","ATTR_HTTP_REQUEST_METHOD_ORIGINAL","ATTR_HTTP_RESPONSE_STATUS_CODE","ATTR_SERVER_ADDRESS","ATTR_SERVER_PORT","ATTR_SERVICE_NAME","ATTR_TELEMETRY_SDK_LANGUAGE","ATTR_TELEMETRY_SDK_NAME","ATTR_TELEMETRY_SDK_VERSION","ATTR_URL_FULL","ATTR_PROCESS_RUNTIME_NAME","SDK_INFO","MILLISECONDS_TO_NANOSECONDS","pow","SECOND_TO_NANOSECONDS","millisToHrTime","epochMillis","epochSeconds","trunc","round","getTimeOrigin","timeOrigin","perf","timing","fetchStart","hrTime","performanceNow","addHrTimes","timeInputToHrTime","isTimeInputHrTime","hrTimeToNanoseconds","isTimeInput","time1","time2","ExportResultCode","CompositePropagator","_propagators","_fields","propagators","VALID_KEY_CHAR_RANGE","VALID_KEY_REGEX","VALID_VALUE_BASE_REGEX","INVALID_VALUE_COMMA_EQUAL_REGEX","TraceState","_internalState","rawTraceState","_parse","traceState","_clone","unset","serialize","_keys","agg","listMember","validateKey","validateValue","TRACE_PARENT_HEADER","TRACE_STATE_HEADER","TRACE_PARENT_REGEX","W3CTraceContextPropagator","traceParent","traceParentHeader","parseTraceParent","isRemote","traceStateHeader","state","nullTag","undefinedTag","funcToString","Function","objectCtorString","objectProto","symToStringTag","nativeObjectToString","isPlainObject","isObjectLike","isOwn","unmasked","getRawTag","objectToString","baseGetTag","proto","Ctor","takeValue","mergeTwoObjects","one","two","objects","isPrimitive","isFunction","shouldMerge","twoValue","obj1","obj2","wasObjectReferenced","arr1","arr2","urlMatches","urlToMatch","isUrlIgnored","ignoredUrls","ignoreUrl","Deferred","_promise","_resolve","BindOnceFuture","_that","_isCalled","_deferred","isCalled","isPromiseLike","ResourceImpl","_rawAttributes","_asyncAttributesPending","_memoizedAttributes","FromAttributeList","res","guardedRawAttributes","resource","asyncAttributesPending","waitForAsyncAttributes","attrs","getRawAttributes","merge","resourceFromAttributes","SpanImpl","kind","parentSpanContext","links","startTime","instrumentationScope","_droppedAttributesCount","_droppedEventsCount","_droppedLinksCount","status","UNSET","endTime","_ended","_duration","_spanProcessor","_spanLimits","_attributeValueLengthLimit","_performanceStartTime","_performanceOffset","_startTimeProvided","spanLimits","attributeValueLengthLimit","spanProcessor","_getTime","scope","onStart","_isSpanEnded","attributeCountLimit","_truncateToSize","attributesOrStartTime","timeStamp","eventCountLimit","droppedAttributesCount","seconds","nanos","hrTimeDuration","onEnd","inp","msDuration","exception","duration","ended","droppedEventsCount","droppedLinksCount","_truncateToLimitUtil","AlwaysOffSampler","shouldSample","decision","NOT_RECORD","AlwaysOnSampler","RECORD_AND_SAMPLED","ParentBasedSampler","_remoteParentSampled","_remoteParentNotSampled","_localParentSampled","_localParentNotSampled","remoteParentSampled","remoteParentNotSampled","localParentSampled","localParentNotSampled","spanName","spanKind","SAMPLED","TraceIdRatioBasedSampler","_ratio","_upperBound","_normalize","floor","_accumulate","ratio","accumulation","loadDefaultConfig","sampler","buildSamplerFromEnv","forceFlushTimeoutMillis","generalLimits","linkCountLimit","attributePerEventCountLimit","attributePerLinkCountLimit","getSamplerProbabilityFromEnv","probability","DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT","BatchSpanProcessorBase","_exporter","_maxExportBatchSize","_maxQueueSize","_scheduledDelayMillis","_exportTimeoutMillis","_isExporting","_finishedSpans","_timer","_shutdownOnce","_droppedSpansCount","maxExportBatchSize","maxQueueSize","scheduledDelayMillis","exportTimeoutMillis","_shutdown","forceFlush","_flushAll","_span","_parentContext","_addToBuffer","shutdown","onShutdown","_maybeStartTimer","promises","ceil","_flushOneBatch","_clearTimer","suppressTracing","spans","doExport","export","SUCCESS","pendingResources","flush","finally","unref","BatchSpanProcessor","RandomIdGenerator","generateTraceId","getIdGenerator","generateSpanId","SHARED_BUFFER","allocUnsafe","writeUInt32BE","Tracer","_sampler","_generalLimits","_idGenerator","_resource","localConfig","userConfig","perInstanceDefaults","DEFAULT_CONFIG","mergeConfig","idGenerator","api.context","api.trace","parentSpan","api.diag","api.INVALID_SPAN_CONTEXT","validParentSpanContext","api.SpanKind","INTERNAL","samplingResult","api.SamplingDecision","api.TraceFlags","initAttributes","getGeneralLimits","getSpanLimits","MultiSpanProcessor","_spanProcessors","ForceFlushState","PerformanceTimingNames","BasicTracerProvider","_config","_tracers","_activeSpanProcessor","mergedConfig","reconfigureLimits","argv0","spanProcessors","schemaUrl","timeoutInterval","resolved","results","errors","StackContextManager","_enabled","_bindFunction","contextWrapper","previousContext","WebTracerProvider","register","defaultContextManager","setupContextManager","urlNormalizingAnchor","hasKey","addSpanNetworkEvent","performanceName","ignoreZeros","addSpanNetworkEvents","ignoreNetworkEvents","skipOldSemconvContentLengthAttrs","PTN","START_TIME","FETCH_START","DOMAIN_LOOKUP_START","DOMAIN_LOOKUP_END","CONNECT_START","SECURE_CONNECTION_START","CONNECT_END","REQUEST_START","RESPONSE_START","RESPONSE_END","encodedLength","ENCODED_BODY_SIZE","decodedLength","DECODED_BODY_SIZE","getOrigin","getResource","spanUrl","startTimeHR","endTimeHR","resources","ignoredResources","initiatorType","parsedSpanUrl","parseUrl","filteredResources","resourceStartTime","resourceEndTime","filterResourcesForSpan","mainRequest","sorted","sort","valueA","valueB","sortResources","corsPreFlightRequest","corsPreFlightRequestEndTime","spanEndTimeHR","spanEndTime","minTime","bestGap","currentGap","findMainRequest","responseEnd","baseURI","shouldPropagateTraceHeaders","propagateTraceHeaderCorsUrls","propagateTraceHeaderUrls","propagateTraceHeaderUrl","NoopLogger","_logRecord","NOOP_LOGGER","NOOP_LOGGER_PROVIDER","getLogger","ProxyLogger","logRecord","_getLogger","getDelegateLogger","ProxyLoggerProvider","GLOBAL_LOGS_API_KEY","LogsAPI","_proxyLoggerProvider","setGlobalLoggerProvider","getLoggerProvider","requiredVersion","fallback","logs","VERSION_REGEXP","RANGE_REGEXP","operatorResMap","satisfies","_validateVersion","parsedVersion","versionString","groups","prerelease","build","versionSegments","prereleaseSegments","op","versionSegmentCount","prereleaseSegmentCount","_parseVersion","allParsedRanges","checkResult","_doSatisfies","includePrerelease","_doPreleaseCheck","_checkRange","comp","HYPHENRANGE_REGEXP","fM","fm","fp","fpr","fb","tM","tm","tp","tpr","isX","replaceHyphen","CARET_REGEXP","z","M","pr","ret","replaceCaret","TILDE_REGEXP","replaceTilde","XRANGE_REGEXP","gtlt","xM","xm","xp","anyX","replaceXRange","_normalizeRange","parsedRange","rangeString","invalid","_parseRange","_isWildcard","comparisonResult","_compareVersionSegments","versionPrereleaseSegments","rangePrereleaseSegments","_satisfies","_parseVersionString","_compareVersionStrings","v1","v2","parsedV1","parsedV2","_normalizeVersionType","LETTERDASHNUMBER","NUMERICIDENTIFIER","PRERELEASEIDENTIFIER","BUILDIDENTIFIER","XRANGEIDENTIFIER","XRANGEPLAIN","wrap","nodule","wrapper","massWrap","nodules","names","unwrap","__unwrap","massUnwrap","InstrumentationAbstract","instrumentationName","instrumentationVersion","_tracer","_meter","_diag","setConfig","_updateMetricInstruments","_wrap","shimmer.wrap","_unwrap","shimmer.unwrap","_massWrap","shimmer.massWrap","_massUnwrap","shimmer.massUnwrap","meter","setMeterProvider","meterProvider","setLoggerProvider","loggerProvider","getModuleDefinitions","initResult","getConfig","enabled","setTracerProvider","tracerProvider","_runSpanCustomizationHook","triggerName","w","plural","ms","msAbs","isPlural","isFinite","long","abs","fmtLong","fmtShort","common","createDebug","prevTime","namespacesCache","enabledCache","enableOverride","curr","diff","coerce","format","formatter","formatters","formatArgs","log","useColors","selectColor","extend","destroy","namespaces","delimiter","newDebug","matchesTemplate","template","searchIndex","templateIndex","starIndex","matchIndex","skips","skip","humanize","require$$0","hash","colors","load","browser","__nwjs","srcModule","lastC","storage","setItem","removeItem","getItem","navigator","userAgent","WebkitAppearance","firebug","table","localStorage","localstorage","warned","tty","util","require$$1","inspectOpts","stderr","write","formatWithOptions","colorCode","prefix","hideDate","isatty","fd","deprecate","supportsColor","require$$3","O","moduleDetailsFromPath","segments","scoped","basedir","lastBaseDirSegmentIndex","lastSegmentIndex","homedir","home","HOME","user","LOGNAME","USER","LNAME","USERNAME","platform","USERPROFILE","HOMEDRIVE","HOMEPATH","getuid","caller","origPrepareStackTrace","prepareStackTrace","getFileName","isWindows","splitWindowsRe","win32","pathString","filename","allParts","dir","base","ext","splitPathRe","posix","pathParseModule","getNodeModulesDirs","absoluteStart","modules","paths","parsed","dirs","aPath","moduleDir","nodeModulesPaths","request","moduleDirectory","normalizeOptions","toStr","concatty","implementation","that","bound","arrLike","slicy","boundLength","boundArgs","joiner","joiny","Empty","$hasOwn","functionBind","hasown","hasOwn","specifierIncluded","specifier","nodeParts","versionParts","cur","ver","matchesRange","specifiers","isCoreModule","nodeVersion","specifierValue","versions","versionIncluded","fs","getHomedir","require$$4","require$$5","isCore","require$$6","realpathFS","realpath","native","defaultIsFile","stat","isFile","isFIFO","defaultIsDir","isDirectory","defaultRealpath","realpathErr","realPath","maybeRealpath","preserveSymlinks","defaultReadPackage","readFile","pkgfile","readFileErr","pkg","jsonErr","nextTick","readPackage","conflictErr","packageIterator","extensions","includeCoreModules","onfile","loadAsDirectory","realD","moduleError","loadAsFile","thePackage","loadAsFilePackage","exts","loadPackage","onpkg","loadpkg","pkg_","pathFilter","rfile","onex","unwrapErr","pkgdir","pkgParam","packageFilter","loadAsDirectoryPackage","fpkg","package","main","mainError","processDirs","ondir","isdir","realStart","thunk","getPackageCandidates","loadNodeModules","realN","realpathSync","statSync","throwIfNoEntry","defaultRealpathSync","maybeRealpathSync","defaultReadPackageSync","readPackageSync","loadAsFileSync","loadAsDirectorySync","loadNodeModulesSync","core","mod","core_1","Module","requireInTheMiddleModule","Hook","Hook_1","builtinModules","isBuiltin","moduleName","minor","ExportsCache","_localCache","_kRitmExports","cachedExports","onrequire","_resolveFilename","_cache","_unhooked","_origRequire","patching","internals","hasWhitelist","patchedRequire","coreOnly","idWithoutPrefix","_origGetBuiltinModule","resolveErr","isPatching","parsedPath","fullModuleName","normalizedPath","resolveModuleName","matchFound","patchedExports","_require","getBuiltinModule","_getBuiltinModule","unhook","ModuleNameSeparator","ModuleNameTrieNode","ModuleNameTrie","_trie","_counter","insert","hook","trieNode","moduleNamePart","nextNode","insertedId","maintainInsertionOrder","fullOnly","foundFull","isMocha","RequireInTheMiddleSingleton","_moduleNameTrie","static","_initialize","normalizedModuleName","moduleNameOrPath","onRequire","hooked","importHooks","setters","getters","toHook","proxyHandler","descriptor","experimentalPatchInternals","register_1","proxy","getExperimentalPatchInternals","setExperimentalPatchInternals","MessageChannel","addHook","removeHook","callHookFn","hookFn","baseDir","newDefault","sendModulesToLoader","_iitmHook","details","importInTheMiddleModule","SemconvStability","AttributeNames","safeExecuteInTheMiddle","execute","onFinish","preventThrowingError","isWrapped","__original","__wrapped","createAddHookMessageChannel","port1","port2","resolveFn","pendingAckCount","registerOptions","addHookMessagePort","include","transferList","waitForAllMessagesAcknowledged","clearInterval","InstrumentationBase","_modules","_hooks","_requireInTheMiddleSingleton","moduleExports","utilTypes","isProxy","moduleExportsArray","_warnOnPreloadedModules","resolvedModule","_extractPackageVersion","_onRequire","moduleVersion","isSupported","supportedVersions","files","normalizedName","f","HookRequire","esmHook","HookImport","unpatch","isEnabled","supportedVersion","semconvStabilityFromStr","semconvStability","OLD","DUPLICATE","STABLE","EventNames","performancePaintNames","FIRST_PAINT","FIRST_CONTENTFUL_PAINT","DocumentLoadInstrumentation","component","_onDocumentLoaded","_collectPerformance","_addResourcesSpans","rootSpan","getEntriesByType","_initResourceSpan","metaElement","getElementsByTagName","performanceNavigationTiming","performanceTiming","getPerformanceNavigationEntries","traceparent","_startSpan","DOCUMENT_LOAD","fetchSpan","DOCUMENT_FETCH","_addCustomAttributesOnSpan","applyCustomAttributesOnSpan","documentFetch","_endSpan","UNLOAD_EVENT_START","UNLOAD_EVENT_END","DOM_INTERACTIVE","DOM_CONTENT_LOADED_EVENT_START","DOM_CONTENT_LOADED_EVENT_END","DOM_COMPLETE","LOAD_EVENT_START","LOAD_EVENT_END","ignorePerformancePaintEvents","performancePaintTiming","addSpanPerformancePaintEvents","documentLoad","RESOURCE_FETCH","_addCustomAttributesOnResourceSpan","resourceFetch","_waitForPageLoad","ZONE_CONTEXT_KEY","ZoneContextManager","_zoneCounter","_activeContextFromZone","activeZone","_bindListener","__ot_listeners","_patchAddEventListener","_patchRemoveEventListener","_createZoneName","_createZone","zoneName","fork","properties","_getActiveZone","patchedListener","run","ObjectGetOwnPropertyDescriptor","ObjectDefineProperty","ObjectGetPrototypeOf","ObjectCreate","ArraySlice","ADD_EVENT_LISTENER_STR","REMOVE_EVENT_LISTENER_STR","ZONE_SYMBOL_ADD_EVENT_LISTENER","ZONE_SYMBOL_REMOVE_EVENT_LISTENER","TRUE_STR","FALSE_STR","ZONE_SYMBOL_PREFIX","wrapWithCurrentZone","scheduleMacroTaskWithCurrentZone","customSchedule","customCancel","scheduleMacroTask","zoneSymbol","isWindowExists","internalWindow","bindArguments","isPropertyWritable","propertyDesc","isWebWorker","WorkerGlobalScope","isNode","isBrowser","isMix","zoneSymbolEventNames$1","enableBeforeunloadSymbol","wrapFn","eventNameSymbol","errorEvent","lineno","colno","preventDefault","returnValue","patchProperty","desc","onPropPatchedSymbol","originalDescGet","originalDescSet","patchOnProperties","onProperties","originalInstanceKey","patchClass","OriginalClass","attachOriginToPatched","patchMethod","patchFn","delegateName","patchDelegate","patchMacroTask","metaCreator","setNative","scheduleTask","task","cbIdx","invoke","patched","isDetectedIEOrEdge","ieOrEdge","isIEOrEdge","ua","isNumber","OPTIMIZED_ZONE_EVENT_TASK_DATA","useG","zoneSymbolEventNames","globalSources","EVENT_NAME_SYMBOL_REGX","IMMEDIATE_PROPAGATION_SYMBOL","prepareEventNames","eventNameToString","falseEventName","trueEventName","symbol","symbolCapture","patchEventTarget","apis","patchOptions","ADD_EVENT_LISTENER","REMOVE_EVENT_LISTENER","rm","LISTENERS_EVENT_LISTENER","REMOVE_ALL_LISTENERS_EVENT_LISTENER","rmAll","zoneSymbolAddEventListener","ADD_EVENT_LISTENER_SOURCE","PREPEND_EVENT_LISTENER","PREPEND_EVENT_LISTENER_SOURCE","invokeTask","isRemoved","handleEvent","originalDelegate","once","globalCallback","isCapture","tasks","copyTasks","nativeScheduleMicroTask","globalZoneAwareCallback","globalZoneAwareCaptureCallback","patchEventTargetMethods","useGlobalCallback","validateHandler","vh","checkDuplicate","chkDup","returnTarget","rt","taskData","nativeAddEventListener","nativeRemoveEventListener","nativeListeners","nativeRemoveAllListeners","nativePrependEventListener","customSchedulePrepend","isExisting","symbolEventNames","symbolEventName","existingTasks","removeAbortListener","allRemoved","compare","typeOfDelegate","unpatchedEvents","passiveEvents","makeAddListener","nativeListener","addSource","customScheduleFn","customCancelFn","transferEventName","isEventListenerObject","newOptions","signal","copyEventListenerOptions","buildEventListenerOptions","aborted","zone","constructorName","targetSource","scheduleEventTask","onAbort","cancelTask","existingTask","findEventTasks","symbolCaptureEventName","captureTasks","removeTasks","evtName","foundTasks","captureFalseTasks","captureTrueTasks","patchEventPrototype","patchQueueMicrotask","scheduleMicroTask","taskSymbol","patchTimer","setName","cancelName","nameSuffix","clearNative","tasksByHandleId","handleOrId","handleId","handle","isRefreshable","refresh","clearTask","isPeriodic","delay","originalRefresh","_state","_updateTaskCount","cancelFn","eventTargetPatch","eventNames","getGlobalObjects","EVENT_TARGET","filterProperties","ignoreProperties","tip","ip","targetIgnoreProperties","patchFilteredProperties","getOnEventNames","propertyDescriptorPatch","patchTargets","ignoreErrorProperties","patchPromise","__load_patch","_uncaughtPromiseErrors","isDisableWrappingUncaughtPromiseRejection","symbolPromise","symbolThen","onUnhandledError","showUncaughtError","rejection","microtaskDrainDone","uncaughtPromiseError","runGuarded","throwOriginal","handleUnhandledRejection","UNHANDLED_PROMISE_REJECTION_HANDLER_SYMBOL","isThenable","forwardResolution","forwardRejection","ZoneAwarePromise","symbolState","symbolValue","symbolFinally","symbolParentPromiseValue","symbolParentPromiseState","UNRESOLVED","RESOLVED","REJECTED","makeResolver","resolvePromise","wasCalled","wrappedFunction","TYPE_ERROR","CURRENT_TASK_TRACE_SYMBOL","onceWrapper","clearRejectedNoCatch","currentTask","scheduleResolveOrReject","readableObjectToString","REJECTION_HANDLED_HANDLER","chainPromise","promiseState","parentPromiseValue","isFinallyPromise","noop","AggregateError","withResolvers","rej","any","finished","race","onResolve","onReject","allWithCallback","allSettled","thenCallback","errorCallback","unresolvedCount","valueIndex","resolvedValues","curValueIndex","thenErr","executor","species","C","NativePromise","symbolThenPatched","patchThen","originalThen","zoneify","resultPromise","patchCallbacks","targetName","callbacks","nativeDelegate","_redefineProperty","Zone$1","performanceMeasure","label","ZoneImpl","assertZonePatched","patches","_currentZoneFrame","_currentTask","ignoreDuplicate","perfName","_api","_parent","_properties","_zoneDelegate","zoneSpec","_ZoneDelegate","getZoneWith","intercept","applyThis","applyArgs","runTask","NO_ZONE","zoneTask","notScheduled","eventTask","macroTask","reEntryGuard","running","_transitionTo","scheduled","previousTask","unknown","scheduling","zoneDelegates","_zoneDelegates","newZone","_zone","ZoneTask","microTask","canceling","runCount","DELEGATE_ZS","onHasTask","hasTaskState","hasTask","onScheduleTask","onInvokeTask","onCancelTask","_taskCounts","_parentDelegate","_forkDlgt","_forkZS","_forkCurrZone","_interceptDlgt","_interceptZS","_interceptCurrZone","_invokeDlgt","_invokeZS","_invokeCurrZone","_handleErrorDlgt","_handleErrorZS","_handleErrorCurrZone","_scheduleTaskDlgt","_scheduleTaskZS","_scheduleTaskCurrZone","_invokeTaskDlgt","_invokeTaskZS","_invokeTaskCurrZone","_cancelTaskDlgt","_cancelTaskZS","_cancelTaskCurrZone","_hasTaskDlgt","_hasTaskDlgtOwner","_hasTaskZS","_hasTaskCurrZone","parentDelegate","onFork","onIntercept","onInvoke","onHandleError","zoneSpecHasTask","parentHasTask","targetZone","returnTask","scheduleFn","isEmpty","counts","change","_numberOfNestedTaskFrames","drainMicroTaskQueue","cancelScheduleRequest","toState","fromState1","fromState2","symbolSetTimeout","nativeMicroTaskQueuePromise","_microTaskQueue","_isDrainingMicrotaskQueue","nativeThen","currentZoneFrame","initZone","loadZone","originalFunctionToString","ORIGINAL_DELEGATE_SYMBOL","PROMISE_SYMBOL","ERROR_SYMBOL","newFunctionToString","nativePromise","nativeError","originalObjectToString","patchToString","SYMBOL_BLACK_LISTED_EVENTS","SYMBOL_UNPATCHED_EVENTS","patchUtil","patchCommon","legacyPatch","blockingMethods","patchEvent","XMLHttpRequestEventTarget","customElements","patchCustomElements","XMLHttpRequest","XMLHttpRequestPrototype","oriAddListener","oriRemoveListener","XMLHttpRequestEventTargetPrototype","READY_STATE_CHANGE","SCHEDULED","XHR_SCHEDULED","XHR_ERROR_BEFORE_SCHEDULED","XHR_LISTENER","newListener","DONE","loadTasks","oriInvoke","XHR_TASK","sendNative","placeholderCallback","abortNative","openNative","XHR_SYNC","XHR_URL","fetchTaskAborting","fetchTaskScheduling","patchXHR","geolocation","fnNames","patchPrototype","findPromiseRejectionHandler","PromiseRejectionEvent","patchBrowser","DIAG_LOGGER","getXHRBodyLength","XMLSerializer","serializeToString","getByteLength","FormData","formData","getFormDataSize","URLSearchParams","TEXT_ENCODER","TextEncoder","normalizeHttpRequestMethod","knownMethods","cfgMethods","DEFAULT_KNOWN_METHODS","getKnownMethods","methUpper","CONNECT","DELETE","GET","HEAD","OPTIONS","PATCH","POST","PUT","TRACE","HTTP_PORT_FROM_PROTOCOL","XMLHttpRequestInstrumentation","_tasksCount","_xhrMem","_usedResources","_semconvStability","semconvStabilityOptIn","_addHeaders","xhr","api.propagation","setRequestHeader","_addChildSpan","childSpan","_addFinalSpanAttributes","xhrMem","statusText","HTTP_STATUS_TEXT","parsedUrl","_applyAttributesAfterXHR","_addResourceObserver","PerformanceObserver","PerformanceResourceTiming","createdResources","getEntries","entryTypes","_clearResources","clearTimingResources","clearResourceTimings","_findResourceAndAddNetworkEvents","_markResourceAsUsed","_cleanPreviousSpanInformation","callbackToRemoveEvents","_createSpan","ignoreUrls","origMethod","normMethod","hostname","serverPort","port","serverPortFromUrl","currentSpan","CLIENT","METHOD_OPEN","_patchOpen","_patchSend","endSpan","isError","errorType","api.SpanStatusCode","performanceEndTime","sendStartTime","endSpanTimeout","onError","EVENT_ERROR","EVENT_ABORT","onTimeout","EVENT_TIMEOUT","onLoad","EVENT_LOAD","measureRequestSize","bodyLength","METHOD_SEND","unregister","send","semconv","ATTR_HTTP_USER_AGENT","ATTR_HTTP_URL","ATTR_HTTP_SCHEME","ATTR_HTTP_RESPONSE_CONTENT_LENGTH","ATTR_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED","ATTR_HTTP_METHOD","ATTR_HTTP_HOST","ATTR_HTTP_REQUEST_BODY_SIZE","ATTR_HTTP_STATUS_CODE","getFetchBodyLength","requestInit","ReadableStream","pipeThrough","resolveLength","lengthPromise","transform","TransformStream","chunk","controller","bytearray","enqueue","_getBodyNonDestructively","release","FetchInstrumentation","web.PerformanceTimingNames","web.addSpanNetworkEvents","response","web.parseUrl","web.shouldPropagateTraceHeaders","Request","Headers","core.isUrlIgnored","COMPONENT","resourcesObserver","web.getResource","spanData","core.millisToHrTime","core.hrTime","_patchConstructor","createdSpan","_prepareSpanData","endSpanOnError","_applyAttributesAfterFetch","endSpanOnSuccess","onSuccess","reader","getReader","read","_callRequestHook","requestHook","OTLPExporterBase","items","resultCallback","OTLPExporterError","validateTimeoutMillis","timeoutMillis","wrapStaticHeadersInFunction","mergeOtlpSharedConfigurationWithDefaults","userProvidedConfiguration","fallbackConfiguration","defaultConfiguration","concurrencyLimit","compression","BoundedQueueExportPromiseHandler","_concurrencyLimit","_sendingPromises","pushPromise","hasReachedLimit","popPromise","awaitAll","createBoundedQueueExportPromiseHandler","createLoggingPartialSuccessResponseHandler","handleResponse","isPartialSuccessResponse","partialSuccess","OTLPExportDelegate","_transport","_serializer","_responseHandler","_promiseQueue","_timeout","_diagLogger","internalRepresentation","FAILED","serializedRequest","serializeRequest","deserializeResponse","intValue","charCode","hexToBinary","hexStr","hi","lo","hrTimeToNanos","NANOSECONDS","BigInt","encodeTimestamp","identity","DEFAULT_ENCODER","encodeHrTime","low","asUintN","high","encodeSpanContext","encodeOptionalSpanContext","createResource","toAttributes","createInstrumentationScope","toKeyValue","toAnyValue","stringValue","isInteger","doubleValue","boolValue","bytesValue","arrayValue","kvlistValue","sdkSpanToOtlpSpan","encoder","parentSpanId","startTimeUnixNano","endTimeUnixNano","timedEvent","timeUnixNano","toOtlpSpanEvent","toOtlpLink","createExportTraceServiceRequest","getOtlpEncoder","resourceSpans","spanRecordsToResourceSpans","readableSpans","resourceMap","ilsMap","instrumentationScopeKey","records","createResourceMap","entryIterator","ilmMap","scopeResourceSpans","ilmIterator","ilmEntry","scopeSpans","readableSpan","transformedSpans","JsonTraceSerializer","decoder","TextDecoder","decode","HttpExporterTransport","_parameters","_utils","agent","_loadUtils","sendWithHttp","createHttpAgent","agentOptions","getJitter","RetryingTransport","retry","inMillis","deadline","attempts","nextBackoff","backoff","retryInMillis","remainingTimeoutMillis","createRetryingTransport","transport","createOtlpHttpExportDelegate","serializer","components","parameters","promiseHandler","settings","parseAndValidateTimeoutFromEnv","timeoutEnvVar","envTimeout","definedTimeout","getTimeoutFromEnv","signalIdentifier","specificTimeout","nonSpecificTimeout","parseAndValidateCompressionFromEnv","compressionEnvVar","getCompressionFromEnv","specificCompression","nonSpecificCompression","getSharedConfigurationFromEnvironment","mergeHeaders","userProvidedHeaders","fallbackHeaders","defaultHeaders","requiredHeaders","validateUserProvidedUrl","getStaticHeadersFromEnv","signalSpecificRawHeaders","nonSignalSpecificRawHeaders","signalSpecificHeaders","nonSignalSpecificHeaders","getNonSpecificUrlFromEnv","signalResourcePath","envUrl","OTEL_EXPORTER_OTLP_ENDPOINT","appendResourcePathToUrl","getSpecificUrlFromEnv","appendRootPathToUrlIfNeeded","convertLegacyAgentOptions","keepAlive","httpAgentOptions","convertLegacyHttpOptions","getHttpConfigurationFromEnvironment","getHttpConfigurationDefaults","partialHeaders","OTLPTraceExporter","OpenTelemetryManager","createProvider","serviceName","resourceAttributes","exporterEndpoint","otlpExporter","headerUrls","instrumentations","flat","instrumentation","enableInstrumentations","registerInstrumentations","setUserAttributes","setUser","newConfig","byteToHex","getRandomValues","rnds8","randomUUID","crypto","v4","rnds","rng","unsafeStringify","Monoscope","storedSessionId","sessionStorage","uuidv4","replay","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AA6BA,UAAUC,WAAaD,UAAUC,UAAUhjE,cAAc3S,MAAM,qBACtG,EAlIA5P,EAAAklF,QA4OA,WACC,IAGC,OAAOS,YACT,CAAG,MAAOv7E,GAGV,CACA,CArPkBw7E,GAClB5lF,EAAA6jF,QAAkB,MACjB,IAAIgC,GAAS,EAEb,MAAO,KACDA,IACJA,GAAS,EACT7qE,QAAQ/N,KAAK,0IAGf,EATiB,GAelBjN,EAAA4kF,OAAiB,CAChB,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,WAyFD5kF,EAAAyjF,IAAczoE,QAAQ0nB,OAAS1nB,QAAQyoE,KAAG,MAAa,GAkEvD55B,EAAA7pD,QAAiB0kF,KAAoB1kF,GAErC,MAAMujF,WAACA,GAAc15B,EAAO7pD,QAM5BujF,EAAWz5E,EAAI,SAAUmxC,GACxB,IACC,OAAOtqC,KAAKvJ,UAAU6zC,EACxB,CAAG,MAAO7wC,GACR,MAAO,+BAAiCA,EAAM5H,OAChD,CACA,+BDvQCwiF,GAAAhlF,iCEJD,MAAM8lF,EAAMpB,EACNqB,EAAOC,EAMbhmF,EAAAqhB,KA2NA,SAAcqhB,GACbA,EAAMujD,YAAc,CAAA,EAEpB,MAAM1oF,EAAO7F,OAAO6F,KAAKyC,EAAQimF,aACjC,IAAK,IAAIzhD,EAAI,EAAGA,EAAIjnC,EAAKsB,OAAQ2lC,IAChC9B,EAAMujD,YAAY1oF,EAAKinC,IAAMxkC,EAAQimF,Y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GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,GACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,KAGH,CAAE,MAAOx6E,GAET,CAQApK,EAAAimF,YAAsBvuF,OAAO6F,KAAKomB,QAAQC,KAAK9H,OAAOhkB,GAC9C,WAAWiH,KAAKjH,IACrBurB,OAAO,CAACxrB,EAAKC,KAEf,MAAM4P,EAAO5P,EACXyY,UAAU,GACVgS,cACApkB,QAAQ,YAAa,CAACoO,EAAG1M,IAClBA,EAAEoI,eAIX,IAAIg6D,EAAMt+C,QAAQC,IAAI9rB,GAYtB,OAVCmqE,IADG,2BAA2BljE,KAAKkjE,KAEzB,6BAA6BljE,KAAKkjE,KAE1B,SAARA,EACJ,KAEA7nB,OAAO6nB,IAGdpqE,EAAI6P,GAAQu6D,EACLpqE,GACL,CAAA,GA2FHgyD,EAAA7pD,QAAiB4mF,KAAoB5mF,GAErC,MAAMujF,WAACA,GAAc15B,EAAO7pD,QAM5BujF,EAAWjnC,EAAI,SAAUrB,GAExB,OADAr+C,KAAKqpF,YAAYrB,OAAShoF,KAAK8mF,UACxBqC,EAAKhjB,QAAQ9nB,EAAGr+C,KAAKqpF,aAC1BriF,MAAM,MACNU,IAAIF,GAAOA,EAAI2L,QACfpL,KAAK,IACR,EAMA4+E,EAAWsD,EAAI,SAAU5rC,GAExB,OADAr+C,KAAKqpF,YAAYrB,OAAShoF,KAAK8mF,UACxBqC,EAAKhjB,QAAQ9nB,EAAGr+C,KAAKqpF,YAC7B,6DCpQInyE,GAAM4wE,EAAgB5wE,IAE1Bg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D,EAAQp0D,KAAKq0D,WAClDr0D,KAAKsuH,KAAK/5D,YACVv0D,KAAKquH,OAAO95D,YACU,oBAAX1hD,SACRA,OAAe07G,UAAYvuH,KAEhC,CAEA,YAAAwuH,GACE,OAAOxuH,KAAKq0D,SACd,CACA,OAAAi5D,CAAQmB,GACNzuH,KAAKsuH,KAAKhB,QAAQmB,EACpB,QAGoB,oBAAX57G,SACRA,OAAeo7G,UAAYA","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,193,194,195,196,197,198]}