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YAAa,EACbC,SAAU,EACVpD,MAAO,EACP4C,KAAM,EACNS,WAAY,EACZC,SAAU,GAEd12F,EAAQ01F,qBAAuB,CAC3BC,KAAM,EACNC,MAAO,E","sources":["webpack:///./node_modules/@datadog/browser-core/cjs/boot/displayAlreadyInitializedError.js","webpack:///./node_modules/@datadog/browser-core/cjs/boot/init.js","webpack:///./node_modules/@datadog/browser-core/cjs/browser/addEventListener.js","webpack:///./node_modules/@datadog/browser-core/cjs/browser/cookie.js","webpack:///./node_modules/@datadog/browser-core/cjs/browser/fetchObservable.js","webpack:///./node_modules/@datadog/browser-core/cjs/browser/pageExitObservable.js","webpack:///./node_modules/@datadog/browser-core/cjs/browser/runOnReadyState.js","webpack:///./node_modules/@datadog/browser-core/cjs/browser/xhrObservable.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/configuration/configuration.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/configuration/endpointBuilder.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/configuration/index.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/configuration/intakeSites.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/configuration/tags.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/configuration/transportConfiguration.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/connectivity/connectivity.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/connectivity/index.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/console/consoleObservable.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/context/contextManager.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/context/customerDataTracker.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/context/storeContextManager.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/deflate/deflate.types.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/deflate/index.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/error/error.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/error/error.types.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/error/trackRuntimeError.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/eventRateLimiter/createEventRateLimiter.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/report/reportObservable.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/resourceUtils.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/session/oldCookiesMigration.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/session/sessionConstants.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/session/sessionManager.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/session/sessionState.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/session/sessionStateValidation.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/session/sessionStore.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/session/sessionStoreOperations.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/session/storeStrategies/sessionInCookie.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/session/storeStrategies/sessionInLocalStorage.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/session/storeStrategies/sessionStoreStrategy.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/synthetics/syntheticsWorkerValues.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/telemetry/index.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/telemetry/rawTelemetryEvent.types.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/telemetry/telemetry.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/telemetry/telemetryEvent.types.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/trackingConsent.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/user/index.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/user/user.js","webpack:///./node_modules/@datadog/browser-core/cjs/domain/user/user.types.js","webpack:///./node_modules/@datadog/browser-core/cjs/index.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/abstractLifeCycle.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/boundedBuffer.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/catchUserErrors.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/display.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/encoder.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/experimentalFeatures.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/getGlobalObject.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/getZoneJsOriginalValue.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/instrumentMethod.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/matchOption.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/mergeInto.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/monitor.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/observable.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/readBytesFromStream.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/requestIdleCallback.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/sendToExtension.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/serialisation/jsonStringify.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/serialisation/sanitize.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/stackTrace/computeStackTrace.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/stackTrace/handlingStack.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/taskQueue.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/timer.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/utils/arrayUtils.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/utils/browserDetection.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/utils/byteUtils.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/utils/functionUtils.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/utils/numberUtils.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/utils/objectUtils.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/utils/polyfills.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/utils/responseUtils.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/utils/stringUtils.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/utils/timeUtils.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/utils/typeUtils.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/utils/urlPolyfill.js","webpack:///./node_modules/@datadog/browser-core/cjs/tools/valueHistory.js","webpack:///./node_modules/@datadog/browser-core/cjs/transport/batch.js","webpack:///./node_modules/@datadog/browser-core/cjs/transport/eventBridge.js","webpack:///./node_modules/@datadog/browser-core/cjs/transport/flushController.js","webpack:///./node_modules/@datadog/browser-core/cjs/transport/httpRequest.js","webpack:///./node_modules/@datadog/browser-core/cjs/transport/index.js","webpack:///./node_modules/@datadog/browser-core/cjs/transport/sendWithRetryStrategy.js","webpack:///./node_modules/@datadog/browser-core/cjs/transport/startBatchWithReplica.js","webpack:///./node_modules/@datadog/browser-logs/cjs/boot/logsPublicApi.js","webpack:///./node_modules/@datadog/browser-logs/cjs/boot/preStartLogs.js","webpack:///./node_modules/@datadog/browser-logs/cjs/boot/startLogs.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/assembly.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/configuration.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/console/consoleCollection.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/contexts/commonContext.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/contexts/internalContext.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/contexts/rumInternalContext.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/createErrorFieldFromRawError.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/lifeCycle.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/logger.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/logger/isAuthorized.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/logger/loggerCollection.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/logsSessionManager.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/logsTelemetry.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/networkError/networkErrorCollection.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/report/reportCollection.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/reportError.js","webpack:///./node_modules/@datadog/browser-logs/cjs/domain/runtimeError/runtimeErrorCollection.js","webpack:///./node_modules/@datadog/browser-logs/cjs/entries/main.js","webpack:///./node_modules/@datadog/browser-logs/cjs/transport/startLogsBatch.js","webpack:///./node_modules/@datadog/browser-logs/cjs/transport/startLogsBridge.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/boot/preStartRum.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/boot/rumPublicApi.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/boot/startRum.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/browser/cookieObservable.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/browser/crypto.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/browser/domMutationObservable.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/browser/firstInputPolyfill.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/browser/htmlDomUtils.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/browser/locationChangeObservable.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/browser/performanceObservable.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/browser/performanceUtils.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/browser/polyfills.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/browser/scroll.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/browser/viewportObservable.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/browser/windowOpenObservable.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/action/actionCollection.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/action/clickChain.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/action/computeFrustration.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/action/getActionNameFromElement.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/action/interactionSelectorCache.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/action/listenActionEvents.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/action/trackClickActions.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/assembly.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/configuration/configuration.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/configuration/index.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/configuration/remoteConfiguration.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/contexts/ciVisibilityContext.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/contexts/commonContext.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/contexts/displayContext.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/contexts/featureFlagContext.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/contexts/internalContext.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/contexts/pageStateHistory.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/contexts/syntheticsContext.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/contexts/urlContexts.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/contexts/viewHistory.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/discardNegativeDuration.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/error/errorCollection.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/error/trackConsoleError.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/error/trackReportError.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/getSelectorFromElement.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/getSessionReplayUrl.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/lifeCycle.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/limitModification.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/longAnimationFrame/longAnimationFrameCollection.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/longTask/longTaskCollection.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/plugins.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/privacy.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/requestCollection.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/resource/matchRequestResourceEntry.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/resource/resourceCollection.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/resource/resourceUtils.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/resource/retrieveInitialDocumentResourceTiming.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/rumSessionManager.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/startCustomerDataTelemetry.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/tracing/getDocumentTraceId.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/tracing/identifier.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/tracing/sampler.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/tracing/tracer.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/trackEventCounts.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/view/trackViewEventCounts.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/view/trackViews.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/view/viewCollection.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/view/viewMetrics/interactionCountPolyfill.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/view/viewMetrics/trackCommonViewMetrics.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/view/viewMetrics/trackCumulativeLayoutShift.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/view/viewMetrics/trackFirstContentfulPaint.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/view/viewMetrics/trackFirstHidden.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/view/viewMetrics/trackFirstInput.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/view/viewMetrics/trackInitialViewMetrics.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/view/viewMetrics/trackInteractionToNextPaint.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/view/viewMetrics/trackLargestContentfulPaint.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/view/viewMetrics/trackLoadingTime.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/view/viewMetrics/trackNavigationTimings.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/view/viewMetrics/trackScrollMetrics.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/vital/vitalCollection.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/domain/waitPageActivityEnd.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/index.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/transport/startRumBatch.js","webpack:///./node_modules/@datadog/browser-rum-core/cjs/transport/startRumEventBridge.js","webpack:///./node_modules/@datadog/browser-rum/cjs/boot/isBrowserSupported.js","webpack:///./node_modules/@datadog/browser-rum/cjs/boot/postStartStrategy.js","webpack:///./node_modules/@datadog/browser-rum/cjs/boot/preStartStrategy.js","webpack:///./node_modules/@datadog/browser-rum/cjs/boot/recorderApi.js","webpack:///./node_modules/@datadog/browser-rum/cjs/boot/startRecording.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/deflate/deflateEncoder.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/deflate/deflateWorker.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/deflate/index.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/getSessionReplayLink.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/assembly.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/elementsScrollPositions.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/eventsUtils.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/index.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/mutationBatch.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/record.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/recordIds.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/serialization/index.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/serialization/serializationUtils.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/serialization/serializeAttribute.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/serialization/serializeAttributes.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/serialization/serializeDocument.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/serialization/serializeNode.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/serialization/serializeStyleSheets.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/shadowRootsController.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/startFullSnapshots.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/trackers/index.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/trackers/trackFocus.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/trackers/trackFrustration.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/trackers/trackInput.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/trackers/trackMediaInteraction.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/trackers/trackMouseInteraction.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/trackers/trackMove.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/trackers/trackMutation.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/trackers/trackScroll.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/trackers/trackStyleSheet.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/trackers/trackViewEnd.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/trackers/trackViewportResize.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/record/viewports.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/replayStats.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/segmentCollection/buildReplayPayload.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/segmentCollection/index.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/segmentCollection/segment.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/segmentCollection/segmentCollection.js","webpack:///./node_modules/@datadog/browser-rum/cjs/domain/startRecordBridge.js","webpack:///./node_modules/@datadog/browser-rum/cjs/entries/main.js","webpack:///./node_modules/@datadog/browser-rum/cjs/types/index.js","webpack:///./node_modules/@datadog/browser-rum/cjs/types/sessionReplay.js","webpack:///./node_modules/@datadog/browser-rum/cjs/types/sessionReplayConstants.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.displayAlreadyInitializedError = displayAlreadyInitializedError;\nvar display_1 = require(\"../tools/display\");\nfunction displayAlreadyInitializedError(sdkName, initConfiguration) {\n if (!initConfiguration.silentMultipleInit) {\n display_1.display.error(\"\".concat(sdkName, \" is already initialized.\"));\n }\n}\n//# sourceMappingURL=displayAlreadyInitializedError.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makePublicApi = makePublicApi;\nexports.defineGlobal = defineGlobal;\nvar catchUserErrors_1 = require(\"../tools/catchUserErrors\");\nvar monitor_1 = require(\"../tools/monitor\");\nvar polyfills_1 = require(\"../tools/utils/polyfills\");\nvar display_1 = require(\"../tools/display\");\nfunction makePublicApi(stub) {\n var publicApi = (0, polyfills_1.assign)({\n version: \"5.35.0\",\n // This API method is intentionally not monitored, since the only thing executed is the\n // user-provided 'callback'. All SDK usages executed in the callback should be monitored, and\n // we don't want to interfere with the user uncaught exceptions.\n onReady: function (callback) {\n callback();\n },\n }, stub);\n // Add a \"hidden\" property to set debug mode. We define it that way to hide it\n // as much as possible but of course it's not a real protection.\n Object.defineProperty(publicApi, '_setDebug', {\n get: function () {\n return monitor_1.setDebugMode;\n },\n enumerable: false,\n });\n return publicApi;\n}\nfunction defineGlobal(global, name, api) {\n var existingGlobalVariable = global[name];\n if (existingGlobalVariable && !existingGlobalVariable.q && existingGlobalVariable.version) {\n display_1.display.warn('SDK is loaded more than once. This is unsupported and might have unexpected behavior.');\n }\n global[name] = api;\n if (existingGlobalVariable && existingGlobalVariable.q) {\n existingGlobalVariable.q.forEach(function (fn) { return (0, catchUserErrors_1.catchUserErrors)(fn, 'onReady callback threw an error:')(); });\n }\n}\n//# sourceMappingURL=init.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.addEventListener = addEventListener;\nexports.addEventListeners = addEventListeners;\nvar monitor_1 = require(\"../tools/monitor\");\nvar getZoneJsOriginalValue_1 = require(\"../tools/getZoneJsOriginalValue\");\n/**\n * Add an event listener to an event target object (Window, Element, mock object...). This provides\n * a few conveniences compared to using `element.addEventListener` directly:\n *\n * * supports IE11 by: using an option object only if needed and emulating the `once` option\n *\n * * wraps the listener with a `monitor` function\n *\n * * returns a `stop` function to remove the listener\n */\nfunction addEventListener(configuration, eventTarget, eventName, listener, options) {\n return addEventListeners(configuration, eventTarget, [eventName], listener, options);\n}\n/**\n * Add event listeners to an event target object (Window, Element, mock object...). This provides\n * a few conveniences compared to using `element.addEventListener` directly:\n *\n * * supports IE11 by: using an option object only if needed and emulating the `once` option\n *\n * * wraps the listener with a `monitor` function\n *\n * * returns a `stop` function to remove the listener\n *\n * * with `once: true`, the listener will be called at most once, even if different events are listened\n */\nfunction addEventListeners(configuration, eventTarget, eventNames, listener, _a) {\n var _b = _a === void 0 ? {} : _a, once = _b.once, capture = _b.capture, passive = _b.passive;\n var listenerWithMonitor = (0, monitor_1.monitor)(function (event) {\n if (!event.isTrusted && !event.__ddIsTrusted && !configuration.allowUntrustedEvents) {\n return;\n }\n if (once) {\n stop();\n }\n listener(event);\n });\n var options = passive ? { capture: capture, passive: passive } : capture;\n // Use the window.EventTarget.prototype when possible to avoid wrong overrides (e.g: https://github.com/salesforce/lwc/issues/1824)\n var listenerTarget = window.EventTarget && eventTarget instanceof EventTarget ? window.EventTarget.prototype : eventTarget;\n var add = (0, getZoneJsOriginalValue_1.getZoneJsOriginalValue)(listenerTarget, 'addEventListener');\n eventNames.forEach(function (eventName) { return add.call(eventTarget, eventName, listenerWithMonitor, options); });\n function stop() {\n var remove = (0, getZoneJsOriginalValue_1.getZoneJsOriginalValue)(listenerTarget, 'removeEventListener');\n eventNames.forEach(function (eventName) { return remove.call(eventTarget, eventName, listenerWithMonitor, options); });\n }\n return {\n stop: stop,\n };\n}\n//# sourceMappingURL=addEventListener.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setCookie = setCookie;\nexports.getCookie = getCookie;\nexports.getInitCookie = getInitCookie;\nexports.resetInitCookies = resetInitCookies;\nexports.deleteCookie = deleteCookie;\nexports.areCookiesAuthorized = areCookiesAuthorized;\nexports.getCurrentSite = getCurrentSite;\nvar display_1 = require(\"../tools/display\");\nvar timeUtils_1 = require(\"../tools/utils/timeUtils\");\nvar stringUtils_1 = require(\"../tools/utils/stringUtils\");\nfunction setCookie(name, value, expireDelay, options) {\n if (expireDelay === void 0) { expireDelay = 0; }\n var date = new Date();\n date.setTime(date.getTime() + expireDelay);\n var expires = \"expires=\".concat(date.toUTCString());\n var sameSite = options && options.crossSite ? 'none' : 'strict';\n var domain = options && options.domain ? \";domain=\".concat(options.domain) : '';\n var secure = options && options.secure ? ';secure' : '';\n var partitioned = options && options.partitioned ? ';partitioned' : '';\n document.cookie = \"\".concat(name, \"=\").concat(value, \";\").concat(expires, \";path=/;samesite=\").concat(sameSite).concat(domain).concat(secure).concat(partitioned);\n}\nfunction getCookie(name) {\n return (0, stringUtils_1.findCommaSeparatedValue)(document.cookie, name);\n}\nvar initCookieParsed;\n/**\n * Returns a cached value of the cookie. Use this during SDK initialization (and whenever possible)\n * to avoid accessing document.cookie multiple times.\n */\nfunction getInitCookie(name) {\n if (!initCookieParsed) {\n initCookieParsed = (0, stringUtils_1.findCommaSeparatedValues)(document.cookie);\n }\n return initCookieParsed.get(name);\n}\nfunction resetInitCookies() {\n initCookieParsed = undefined;\n}\nfunction deleteCookie(name, options) {\n setCookie(name, '', 0, options);\n}\nfunction areCookiesAuthorized(options) {\n if (document.cookie === undefined || document.cookie === null) {\n return false;\n }\n try {\n // Use a unique cookie name to avoid issues when the SDK is initialized multiple times during\n // the test cookie lifetime\n var testCookieName = \"dd_cookie_test_\".concat((0, stringUtils_1.generateUUID)());\n var testCookieValue = 'test';\n setCookie(testCookieName, testCookieValue, timeUtils_1.ONE_MINUTE, options);\n var isCookieCorrectlySet = getCookie(testCookieName) === testCookieValue;\n deleteCookie(testCookieName, options);\n return isCookieCorrectlySet;\n }\n catch (error) {\n display_1.display.error(error);\n return false;\n }\n}\n/**\n * No API to retrieve it, number of levels for subdomain and suffix are unknown\n * strategy: find the minimal domain on which cookies are allowed to be set\n * https://web.dev/same-site-same-origin/#site\n */\nvar getCurrentSiteCache;\nfunction getCurrentSite() {\n if (getCurrentSiteCache === undefined) {\n // Use a unique cookie name to avoid issues when the SDK is initialized multiple times during\n // the test cookie lifetime\n var testCookieName = \"dd_site_test_\".concat((0, stringUtils_1.generateUUID)());\n var testCookieValue = 'test';\n var domainLevels = window.location.hostname.split('.');\n var candidateDomain = domainLevels.pop();\n while (domainLevels.length && !getCookie(testCookieName)) {\n candidateDomain = \"\".concat(domainLevels.pop(), \".\").concat(candidateDomain);\n setCookie(testCookieName, testCookieValue, timeUtils_1.ONE_SECOND, { domain: candidateDomain });\n }\n deleteCookie(testCookieName, { domain: candidateDomain });\n getCurrentSiteCache = candidateDomain;\n }\n return getCurrentSiteCache;\n}\n//# sourceMappingURL=cookie.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.initFetchObservable = initFetchObservable;\nexports.resetFetchObservable = resetFetchObservable;\nvar instrumentMethod_1 = require(\"../tools/instrumentMethod\");\nvar monitor_1 = require(\"../tools/monitor\");\nvar observable_1 = require(\"../tools/observable\");\nvar polyfills_1 = require(\"../tools/utils/polyfills\");\nvar timeUtils_1 = require(\"../tools/utils/timeUtils\");\nvar urlPolyfill_1 = require(\"../tools/utils/urlPolyfill\");\nvar fetchObservable;\nfunction initFetchObservable() {\n if (!fetchObservable) {\n fetchObservable = createFetchObservable();\n }\n return fetchObservable;\n}\nfunction resetFetchObservable() {\n fetchObservable = undefined;\n}\nfunction createFetchObservable() {\n return new observable_1.Observable(function (observable) {\n if (!window.fetch) {\n return;\n }\n var stop = (0, instrumentMethod_1.instrumentMethod)(window, 'fetch', function (call) { return beforeSend(call, observable); }, {\n computeHandlingStack: true,\n }).stop;\n return stop;\n });\n}\nfunction beforeSend(_a, observable) {\n var parameters = _a.parameters, onPostCall = _a.onPostCall, handlingStack = _a.handlingStack;\n var input = parameters[0], init = parameters[1];\n var methodFromParams = init && init.method;\n if (methodFromParams === undefined && input instanceof Request) {\n methodFromParams = input.method;\n }\n var method = methodFromParams !== undefined ? String(methodFromParams).toUpperCase() : 'GET';\n var url = input instanceof Request ? input.url : (0, urlPolyfill_1.normalizeUrl)(String(input));\n var startClocks = (0, timeUtils_1.clocksNow)();\n var context = {\n state: 'start',\n init: init,\n input: input,\n method: method,\n startClocks: startClocks,\n url: url,\n handlingStack: handlingStack,\n };\n observable.notify(context);\n // Those properties can be changed by observable subscribers\n parameters[0] = context.input;\n parameters[1] = context.init;\n onPostCall(function (responsePromise) { return afterSend(observable, responsePromise, context); });\n}\nfunction afterSend(observable, responsePromise, startContext) {\n var context = startContext;\n function reportFetch(partialContext) {\n context.state = 'resolve';\n (0, polyfills_1.assign)(context, partialContext);\n observable.notify(context);\n }\n responsePromise.then((0, monitor_1.monitor)(function (response) {\n reportFetch({\n response: response,\n responseType: response.type,\n status: response.status,\n isAborted: false,\n });\n }), (0, monitor_1.monitor)(function (error) {\n var _a, _b;\n reportFetch({\n status: 0,\n isAborted: ((_b = (_a = context.init) === null || _a === void 0 ? void 0 : _a.signal) === null || _b === void 0 ? void 0 : _b.aborted) || (error instanceof DOMException && error.code === DOMException.ABORT_ERR),\n error: error,\n });\n }));\n}\n//# sourceMappingURL=fetchObservable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PageExitReason = void 0;\nexports.createPageExitObservable = createPageExitObservable;\nexports.isPageExitReason = isPageExitReason;\nvar observable_1 = require(\"../tools/observable\");\nvar polyfills_1 = require(\"../tools/utils/polyfills\");\nvar addEventListener_1 = require(\"./addEventListener\");\nexports.PageExitReason = {\n HIDDEN: 'visibility_hidden',\n UNLOADING: 'before_unload',\n PAGEHIDE: 'page_hide',\n FROZEN: 'page_frozen',\n};\nfunction createPageExitObservable(configuration) {\n return new observable_1.Observable(function (observable) {\n var stopListeners = (0, addEventListener_1.addEventListeners)(configuration, window, [\"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */, \"freeze\" /* DOM_EVENT.FREEZE */], function (event) {\n if (event.type === \"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */ && document.visibilityState === 'hidden') {\n /**\n * Only event that guarantee to fire on mobile devices when the page transitions to background state\n * (e.g. when user switches to a different application, goes to homescreen, etc), or is being unloaded.\n */\n observable.notify({ reason: exports.PageExitReason.HIDDEN });\n }\n else if (event.type === \"freeze\" /* DOM_EVENT.FREEZE */) {\n /**\n * After transitioning in background a tab can be freezed to preserve resources. (cf: https://developer.chrome.com/blog/page-lifecycle-api)\n * Allow to collect events happening between hidden and frozen state.\n */\n observable.notify({ reason: exports.PageExitReason.FROZEN });\n }\n }, { capture: true }).stop;\n var stopBeforeUnloadListener = (0, addEventListener_1.addEventListener)(configuration, window, \"beforeunload\" /* DOM_EVENT.BEFORE_UNLOAD */, function () {\n observable.notify({ reason: exports.PageExitReason.UNLOADING });\n }).stop;\n return function () {\n stopListeners();\n stopBeforeUnloadListener();\n };\n });\n}\nfunction isPageExitReason(reason) {\n return (0, polyfills_1.includes)((0, polyfills_1.objectValues)(exports.PageExitReason), reason);\n}\n//# sourceMappingURL=pageExitObservable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.runOnReadyState = runOnReadyState;\nvar functionUtils_1 = require(\"../tools/utils/functionUtils\");\nvar addEventListener_1 = require(\"./addEventListener\");\nfunction runOnReadyState(configuration, expectedReadyState, callback) {\n if (document.readyState === expectedReadyState || document.readyState === 'complete') {\n callback();\n return { stop: functionUtils_1.noop };\n }\n var eventName = expectedReadyState === 'complete' ? \"load\" /* DOM_EVENT.LOAD */ : \"DOMContentLoaded\" /* DOM_EVENT.DOM_CONTENT_LOADED */;\n return (0, addEventListener_1.addEventListener)(configuration, window, eventName, callback, { once: true });\n}\n//# sourceMappingURL=runOnReadyState.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.initXhrObservable = initXhrObservable;\nvar instrumentMethod_1 = require(\"../tools/instrumentMethod\");\nvar observable_1 = require(\"../tools/observable\");\nvar timeUtils_1 = require(\"../tools/utils/timeUtils\");\nvar urlPolyfill_1 = require(\"../tools/utils/urlPolyfill\");\nvar objectUtils_1 = require(\"../tools/utils/objectUtils\");\nvar addEventListener_1 = require(\"./addEventListener\");\nvar xhrObservable;\nvar xhrContexts = new WeakMap();\nfunction initXhrObservable(configuration) {\n if (!xhrObservable) {\n xhrObservable = createXhrObservable(configuration);\n }\n return xhrObservable;\n}\nfunction createXhrObservable(configuration) {\n return new observable_1.Observable(function (observable) {\n var stopInstrumentingStart = (0, instrumentMethod_1.instrumentMethod)(XMLHttpRequest.prototype, 'open', openXhr).stop;\n var stopInstrumentingSend = (0, instrumentMethod_1.instrumentMethod)(XMLHttpRequest.prototype, 'send', function (call) {\n sendXhr(call, configuration, observable);\n }, { computeHandlingStack: true }).stop;\n var stopInstrumentingAbort = (0, instrumentMethod_1.instrumentMethod)(XMLHttpRequest.prototype, 'abort', abortXhr).stop;\n return function () {\n stopInstrumentingStart();\n stopInstrumentingSend();\n stopInstrumentingAbort();\n };\n });\n}\nfunction openXhr(_a) {\n var xhr = _a.target, _b = _a.parameters, method = _b[0], url = _b[1];\n xhrContexts.set(xhr, {\n state: 'open',\n method: String(method).toUpperCase(),\n url: (0, urlPolyfill_1.normalizeUrl)(String(url)),\n });\n}\nfunction sendXhr(_a, configuration, observable) {\n var xhr = _a.target, handlingStack = _a.handlingStack;\n var context = xhrContexts.get(xhr);\n if (!context) {\n return;\n }\n var startContext = context;\n startContext.state = 'start';\n startContext.startClocks = (0, timeUtils_1.clocksNow)();\n startContext.isAborted = false;\n startContext.xhr = xhr;\n startContext.handlingStack = handlingStack;\n var hasBeenReported = false;\n var stopInstrumentingOnReadyStateChange = (0, instrumentMethod_1.instrumentMethod)(xhr, 'onreadystatechange', function () {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n // Try to report the XHR as soon as possible, because the XHR may be mutated by the\n // application during a future event. For example, Angular is calling .abort() on\n // completed requests during an onreadystatechange event, so the status becomes '0'\n // before the request is collected.\n onEnd();\n }\n }).stop;\n var onEnd = function () {\n unsubscribeLoadEndListener();\n stopInstrumentingOnReadyStateChange();\n if (hasBeenReported) {\n return;\n }\n hasBeenReported = true;\n var completeContext = context;\n completeContext.state = 'complete';\n completeContext.duration = (0, timeUtils_1.elapsed)(startContext.startClocks.timeStamp, (0, timeUtils_1.timeStampNow)());\n completeContext.status = xhr.status;\n observable.notify((0, objectUtils_1.shallowClone)(completeContext));\n };\n var unsubscribeLoadEndListener = (0, addEventListener_1.addEventListener)(configuration, xhr, 'loadend', onEnd).stop;\n observable.notify(startContext);\n}\nfunction abortXhr(_a) {\n var xhr = _a.target;\n var context = xhrContexts.get(xhr);\n if (context) {\n context.isAborted = true;\n }\n}\n//# sourceMappingURL=xhrObservable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TraceContextInjection = exports.DefaultPrivacyLevel = void 0;\nexports.isSampleRate = isSampleRate;\nexports.validateAndBuildConfiguration = validateAndBuildConfiguration;\nexports.serializeConfiguration = serializeConfiguration;\nvar catchUserErrors_1 = require(\"../../tools/catchUserErrors\");\nvar display_1 = require(\"../../tools/display\");\nvar timeUtils_1 = require(\"../../tools/utils/timeUtils\");\nvar numberUtils_1 = require(\"../../tools/utils/numberUtils\");\nvar byteUtils_1 = require(\"../../tools/utils/byteUtils\");\nvar objectUtils_1 = require(\"../../tools/utils/objectUtils\");\nvar polyfills_1 = require(\"../../tools/utils/polyfills\");\nvar sessionStore_1 = require(\"../session/sessionStore\");\nvar trackingConsent_1 = require(\"../trackingConsent\");\nvar transportConfiguration_1 = require(\"./transportConfiguration\");\nexports.DefaultPrivacyLevel = {\n ALLOW: 'allow',\n MASK: 'mask',\n MASK_USER_INPUT: 'mask-user-input',\n};\nexports.TraceContextInjection = {\n ALL: 'all',\n SAMPLED: 'sampled',\n};\nfunction isString(tag, tagName) {\n if (tag !== undefined && tag !== null && typeof tag !== 'string') {\n display_1.display.error(\"\".concat(tagName, \" must be defined as a string\"));\n return false;\n }\n return true;\n}\nfunction isDatadogSite(site) {\n if (site && typeof site === 'string' && !/(datadog|ddog|datad0g|dd0g)/.test(site)) {\n display_1.display.error(\"Site should be a valid Datadog site. \".concat(display_1.MORE_DETAILS, \" \").concat(display_1.DOCS_ORIGIN, \"/getting_started/site/.\"));\n return false;\n }\n return true;\n}\nfunction isSampleRate(sampleRate, name) {\n if (sampleRate !== undefined && !(0, numberUtils_1.isPercentage)(sampleRate)) {\n display_1.display.error(\"\".concat(name, \" Sample Rate should be a number between 0 and 100\"));\n return false;\n }\n return true;\n}\nfunction validateAndBuildConfiguration(initConfiguration) {\n var _a, _b, _c, _d, _e;\n if (!initConfiguration || !initConfiguration.clientToken) {\n display_1.display.error('Client Token is not configured, we will not send any data.');\n return;\n }\n if (!isDatadogSite(initConfiguration.site) ||\n !isSampleRate(initConfiguration.sessionSampleRate, 'Session') ||\n !isSampleRate(initConfiguration.telemetrySampleRate, 'Telemetry') ||\n !isSampleRate(initConfiguration.telemetryConfigurationSampleRate, 'Telemetry Configuration') ||\n !isSampleRate(initConfiguration.telemetryUsageSampleRate, 'Telemetry Usage') ||\n !isString(initConfiguration.version, 'Version') ||\n !isString(initConfiguration.env, 'Env') ||\n !isString(initConfiguration.service, 'Service')) {\n return;\n }\n if (initConfiguration.trackingConsent !== undefined &&\n !(0, objectUtils_1.objectHasValue)(trackingConsent_1.TrackingConsent, initConfiguration.trackingConsent)) {\n display_1.display.error('Tracking Consent should be either \"granted\" or \"not-granted\"');\n return;\n }\n return (0, polyfills_1.assign)({\n beforeSend: initConfiguration.beforeSend && (0, catchUserErrors_1.catchUserErrors)(initConfiguration.beforeSend, 'beforeSend threw an error:'),\n sessionStoreStrategyType: (0, sessionStore_1.selectSessionStoreStrategyType)(initConfiguration),\n sessionSampleRate: (_a = initConfiguration.sessionSampleRate) !== null && _a !== void 0 ? _a : 100,\n telemetrySampleRate: (_b = initConfiguration.telemetrySampleRate) !== null && _b !== void 0 ? _b : 20,\n telemetryConfigurationSampleRate: (_c = initConfiguration.telemetryConfigurationSampleRate) !== null && _c !== void 0 ? _c : 5,\n telemetryUsageSampleRate: (_d = initConfiguration.telemetryUsageSampleRate) !== null && _d !== void 0 ? _d : 5,\n service: initConfiguration.service || undefined,\n silentMultipleInit: !!initConfiguration.silentMultipleInit,\n allowUntrustedEvents: !!initConfiguration.allowUntrustedEvents,\n trackingConsent: (_e = initConfiguration.trackingConsent) !== null && _e !== void 0 ? _e : trackingConsent_1.TrackingConsent.GRANTED,\n storeContextsAcrossPages: !!initConfiguration.storeContextsAcrossPages,\n /**\n * beacon payload max queue size implementation is 64kb\n * ensure that we leave room for logs, rum and potential other users\n */\n batchBytesLimit: 16 * byteUtils_1.ONE_KIBI_BYTE,\n eventRateLimiterThreshold: 3000,\n maxTelemetryEventsPerPage: 15,\n /**\n * flush automatically, aim to be lower than ALB connection timeout\n * to maximize connection reuse.\n */\n flushTimeout: (30 * timeUtils_1.ONE_SECOND),\n /**\n * Logs intake limit\n */\n batchMessagesLimit: 50,\n messageBytesLimit: 256 * byteUtils_1.ONE_KIBI_BYTE,\n }, (0, transportConfiguration_1.computeTransportConfiguration)(initConfiguration));\n}\nfunction serializeConfiguration(initConfiguration) {\n return {\n session_sample_rate: initConfiguration.sessionSampleRate,\n telemetry_sample_rate: initConfiguration.telemetrySampleRate,\n telemetry_configuration_sample_rate: initConfiguration.telemetryConfigurationSampleRate,\n telemetry_usage_sample_rate: initConfiguration.telemetryUsageSampleRate,\n use_before_send: !!initConfiguration.beforeSend,\n use_cross_site_session_cookie: initConfiguration.useCrossSiteSessionCookie,\n use_partitioned_cross_site_session_cookie: initConfiguration.usePartitionedCrossSiteSessionCookie,\n use_secure_session_cookie: initConfiguration.useSecureSessionCookie,\n use_proxy: !!initConfiguration.proxy,\n silent_multiple_init: initConfiguration.silentMultipleInit,\n track_session_across_subdomains: initConfiguration.trackSessionAcrossSubdomains,\n session_persistence: initConfiguration.sessionPersistence,\n allow_fallback_to_local_storage: !!initConfiguration.allowFallbackToLocalStorage,\n store_contexts_across_pages: !!initConfiguration.storeContextsAcrossPages,\n allow_untrusted_events: !!initConfiguration.allowUntrustedEvents,\n tracking_consent: initConfiguration.trackingConsent,\n };\n}\n//# sourceMappingURL=configuration.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createEndpointBuilder = createEndpointBuilder;\nvar timeUtils_1 = require(\"../../tools/utils/timeUtils\");\nvar urlPolyfill_1 = require(\"../../tools/utils/urlPolyfill\");\nvar stringUtils_1 = require(\"../../tools/utils/stringUtils\");\nvar intakeSites_1 = require(\"./intakeSites\");\nfunction createEndpointBuilder(initConfiguration, trackType, configurationTags) {\n var buildUrlWithParameters = createEndpointUrlWithParametersBuilder(initConfiguration, trackType);\n return {\n build: function (api, payload) {\n var parameters = buildEndpointParameters(initConfiguration, trackType, configurationTags, api, payload);\n return buildUrlWithParameters(parameters);\n },\n urlPrefix: buildUrlWithParameters(''),\n trackType: trackType,\n };\n}\n/**\n * Create a function used to build a full endpoint url from provided parameters. The goal of this\n * function is to pre-compute some parts of the URL to avoid re-computing everything on every\n * request, as only parameters are changing.\n */\nfunction createEndpointUrlWithParametersBuilder(initConfiguration, trackType) {\n var path = \"/api/v2/\".concat(trackType);\n var proxy = initConfiguration.proxy;\n if (typeof proxy === 'string') {\n var normalizedProxyUrl_1 = (0, urlPolyfill_1.normalizeUrl)(proxy);\n return function (parameters) { return \"\".concat(normalizedProxyUrl_1, \"?ddforward=\").concat(encodeURIComponent(\"\".concat(path, \"?\").concat(parameters))); };\n }\n if (typeof proxy === 'function') {\n return function (parameters) { return proxy({ path: path, parameters: parameters }); };\n }\n var host = buildEndpointHost(trackType, initConfiguration);\n return function (parameters) { return \"https://\".concat(host).concat(path, \"?\").concat(parameters); };\n}\nfunction buildEndpointHost(trackType, initConfiguration) {\n var _a = initConfiguration.site, site = _a === void 0 ? intakeSites_1.INTAKE_SITE_US1 : _a, internalAnalyticsSubdomain = initConfiguration.internalAnalyticsSubdomain;\n if (trackType === 'logs' && initConfiguration.usePciIntake && site === intakeSites_1.INTAKE_SITE_US1) {\n return intakeSites_1.PCI_INTAKE_HOST_US1;\n }\n if (internalAnalyticsSubdomain && site === intakeSites_1.INTAKE_SITE_US1) {\n return \"\".concat(internalAnalyticsSubdomain, \".\").concat(intakeSites_1.INTAKE_SITE_US1);\n }\n if (site === intakeSites_1.INTAKE_SITE_FED_STAGING) {\n return \"http-intake.logs.\".concat(site);\n }\n var domainParts = site.split('.');\n var extension = domainParts.pop();\n return \"browser-intake-\".concat(domainParts.join('-'), \".\").concat(extension);\n}\n/**\n * Build parameters to be used for an intake request. Parameters should be re-built for each\n * request, as they change randomly.\n */\nfunction buildEndpointParameters(_a, trackType, configurationTags, api, _b) {\n var clientToken = _a.clientToken, internalAnalyticsSubdomain = _a.internalAnalyticsSubdomain;\n var retry = _b.retry, encoding = _b.encoding;\n var tags = [\"sdk_version:\".concat(\"5.35.0\"), \"api:\".concat(api)].concat(configurationTags);\n if (retry) {\n tags.push(\"retry_count:\".concat(retry.count), \"retry_after:\".concat(retry.lastFailureStatus));\n }\n var parameters = [\n 'ddsource=browser',\n \"ddtags=\".concat(encodeURIComponent(tags.join(','))),\n \"dd-api-key=\".concat(clientToken),\n \"dd-evp-origin-version=\".concat(encodeURIComponent(\"5.35.0\")),\n 'dd-evp-origin=browser',\n \"dd-request-id=\".concat((0, stringUtils_1.generateUUID)()),\n ];\n if (encoding) {\n parameters.push(\"dd-evp-encoding=\".concat(encoding));\n }\n if (trackType === 'rum') {\n parameters.push(\"batch_time=\".concat((0, timeUtils_1.timeStampNow)()));\n }\n if (internalAnalyticsSubdomain) {\n parameters.reverse();\n }\n return parameters.join('&');\n}\n//# sourceMappingURL=endpointBuilder.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isIntakeUrl = exports.computeTransportConfiguration = exports.createEndpointBuilder = exports.serializeConfiguration = exports.validateAndBuildConfiguration = exports.isSampleRate = exports.TraceContextInjection = exports.DefaultPrivacyLevel = void 0;\nvar configuration_1 = require(\"./configuration\");\nObject.defineProperty(exports, \"DefaultPrivacyLevel\", { enumerable: true, get: function () { return configuration_1.DefaultPrivacyLevel; } });\nObject.defineProperty(exports, \"TraceContextInjection\", { enumerable: true, get: function () { return configuration_1.TraceContextInjection; } });\nObject.defineProperty(exports, \"isSampleRate\", { enumerable: true, get: function () { return configuration_1.isSampleRate; } });\nObject.defineProperty(exports, \"validateAndBuildConfiguration\", { enumerable: true, get: function () { return configuration_1.validateAndBuildConfiguration; } });\nObject.defineProperty(exports, \"serializeConfiguration\", { enumerable: true, get: function () { return configuration_1.serializeConfiguration; } });\nvar endpointBuilder_1 = require(\"./endpointBuilder\");\nObject.defineProperty(exports, \"createEndpointBuilder\", { enumerable: true, get: function () { return endpointBuilder_1.createEndpointBuilder; } });\n__exportStar(require(\"./intakeSites\"), exports);\nvar transportConfiguration_1 = require(\"./transportConfiguration\");\nObject.defineProperty(exports, \"computeTransportConfiguration\", { enumerable: true, get: function () { return transportConfiguration_1.computeTransportConfiguration; } });\nObject.defineProperty(exports, \"isIntakeUrl\", { enumerable: true, get: function () { return transportConfiguration_1.isIntakeUrl; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.INTAKE_URL_PARAMETERS = exports.PCI_INTAKE_HOST_US1 = exports.INTAKE_SITE_US1_FED = exports.INTAKE_SITE_EU1 = exports.INTAKE_SITE_US1 = exports.INTAKE_SITE_FED_STAGING = exports.INTAKE_SITE_STAGING = void 0;\nexports.INTAKE_SITE_STAGING = 'datad0g.com';\nexports.INTAKE_SITE_FED_STAGING = 'dd0g-gov.com';\nexports.INTAKE_SITE_US1 = 'datadoghq.com';\nexports.INTAKE_SITE_EU1 = 'datadoghq.eu';\nexports.INTAKE_SITE_US1_FED = 'ddog-gov.com';\nexports.PCI_INTAKE_HOST_US1 = 'pci.browser-intake-datadoghq.com';\nexports.INTAKE_URL_PARAMETERS = ['ddsource', 'ddtags'];\n//# sourceMappingURL=intakeSites.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TAG_SIZE_LIMIT = void 0;\nexports.buildTags = buildTags;\nexports.buildTag = buildTag;\nexports.supportUnicodePropertyEscapes = supportUnicodePropertyEscapes;\nvar display_1 = require(\"../../tools/display\");\nexports.TAG_SIZE_LIMIT = 200;\nfunction buildTags(configuration) {\n var env = configuration.env, service = configuration.service, version = configuration.version, datacenter = configuration.datacenter;\n var tags = [];\n if (env) {\n tags.push(buildTag('env', env));\n }\n if (service) {\n tags.push(buildTag('service', service));\n }\n if (version) {\n tags.push(buildTag('version', version));\n }\n if (datacenter) {\n tags.push(buildTag('datacenter', datacenter));\n }\n return tags;\n}\nfunction buildTag(key, rawValue) {\n // See https://docs.datadoghq.com/getting_started/tagging/#defining-tags for tags syntax. Note\n // that the backend may not follow the exact same rules, so we only want to display an informal\n // warning.\n var valueSizeLimit = exports.TAG_SIZE_LIMIT - key.length - 1;\n if (rawValue.length > valueSizeLimit || hasForbiddenCharacters(rawValue)) {\n display_1.display.warn(\"\".concat(key, \" value doesn't meet tag requirements and will be sanitized. \").concat(display_1.MORE_DETAILS, \" \").concat(display_1.DOCS_ORIGIN, \"/getting_started/tagging/#defining-tags\"));\n }\n // Let the backend do most of the sanitization, but still make sure multiple tags can't be crafted\n // by forging a value containing commas.\n var sanitizedValue = rawValue.replace(/,/g, '_');\n return \"\".concat(key, \":\").concat(sanitizedValue);\n}\nfunction hasForbiddenCharacters(rawValue) {\n // Unicode property escapes is not supported in all browsers, so we use a try/catch.\n // Todo: Remove the try/catch when dropping IE11.\n if (!supportUnicodePropertyEscapes()) {\n return false;\n }\n // We use the Unicode property escapes to match any character that is a letter including other languages like Chinese, Japanese, etc.\n // p{Ll} matches a lowercase letter.\n // p{Lo} matches a letter that is neither uppercase nor lowercase (ex: Japanese characters).\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape#unicode_property_escapes_vs._character_classes\n return new RegExp('[^\\\\p{Ll}\\\\p{Lo}0-9_:./-]', 'u').test(rawValue);\n}\nfunction supportUnicodePropertyEscapes() {\n try {\n new RegExp('[\\\\p{Ll}]', 'u');\n return true;\n }\n catch (_a) {\n return false;\n }\n}\n//# sourceMappingURL=tags.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.computeTransportConfiguration = computeTransportConfiguration;\nexports.isIntakeUrl = isIntakeUrl;\nvar polyfills_1 = require(\"../../tools/utils/polyfills\");\nvar endpointBuilder_1 = require(\"./endpointBuilder\");\nvar tags_1 = require(\"./tags\");\nvar intakeSites_1 = require(\"./intakeSites\");\nfunction computeTransportConfiguration(initConfiguration) {\n var site = initConfiguration.site || intakeSites_1.INTAKE_SITE_US1;\n var tags = (0, tags_1.buildTags)(initConfiguration);\n var endpointBuilders = computeEndpointBuilders(initConfiguration, tags);\n var replicaConfiguration = computeReplicaConfiguration(initConfiguration, tags);\n return (0, polyfills_1.assign)({\n replica: replicaConfiguration,\n site: site,\n }, endpointBuilders);\n}\nfunction computeEndpointBuilders(initConfiguration, tags) {\n return {\n logsEndpointBuilder: (0, endpointBuilder_1.createEndpointBuilder)(initConfiguration, 'logs', tags),\n rumEndpointBuilder: (0, endpointBuilder_1.createEndpointBuilder)(initConfiguration, 'rum', tags),\n sessionReplayEndpointBuilder: (0, endpointBuilder_1.createEndpointBuilder)(initConfiguration, 'replay', tags),\n };\n}\nfunction computeReplicaConfiguration(initConfiguration, tags) {\n if (!initConfiguration.replica) {\n return;\n }\n var replicaConfiguration = (0, polyfills_1.assign)({}, initConfiguration, {\n site: intakeSites_1.INTAKE_SITE_US1,\n clientToken: initConfiguration.replica.clientToken,\n });\n var replicaEndpointBuilders = {\n logsEndpointBuilder: (0, endpointBuilder_1.createEndpointBuilder)(replicaConfiguration, 'logs', tags),\n rumEndpointBuilder: (0, endpointBuilder_1.createEndpointBuilder)(replicaConfiguration, 'rum', tags),\n };\n return (0, polyfills_1.assign)({ applicationId: initConfiguration.replica.applicationId }, replicaEndpointBuilders);\n}\nfunction isIntakeUrl(url) {\n // check if tags is present in the query string\n return intakeSites_1.INTAKE_URL_PARAMETERS.every(function (param) { return (0, polyfills_1.includes)(url, param); });\n}\n//# sourceMappingURL=transportConfiguration.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getConnectivity = getConnectivity;\nfunction getConnectivity() {\n var _a;\n var navigator = window.navigator;\n return {\n status: navigator.onLine ? 'connected' : 'not_connected',\n interfaces: navigator.connection && navigator.connection.type ? [navigator.connection.type] : undefined,\n effective_type: (_a = navigator.connection) === null || _a === void 0 ? void 0 : _a.effectiveType,\n };\n}\n//# sourceMappingURL=connectivity.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./connectivity\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.initConsoleObservable = initConsoleObservable;\nexports.resetConsoleObservable = resetConsoleObservable;\nvar error_1 = require(\"../error/error\");\nvar observable_1 = require(\"../../tools/observable\");\nvar display_1 = require(\"../../tools/display\");\nvar monitor_1 = require(\"../../tools/monitor\");\nvar sanitize_1 = require(\"../../tools/serialisation/sanitize\");\nvar polyfills_1 = require(\"../../tools/utils/polyfills\");\nvar jsonStringify_1 = require(\"../../tools/serialisation/jsonStringify\");\nvar error_types_1 = require(\"../error/error.types\");\nvar computeStackTrace_1 = require(\"../../tools/stackTrace/computeStackTrace\");\nvar handlingStack_1 = require(\"../../tools/stackTrace/handlingStack\");\nvar timeUtils_1 = require(\"../../tools/utils/timeUtils\");\nvar consoleObservablesByApi = {};\nfunction initConsoleObservable(apis) {\n var consoleObservables = apis.map(function (api) {\n if (!consoleObservablesByApi[api]) {\n consoleObservablesByApi[api] = createConsoleObservable(api); // we are sure that the observable created for this api will yield the expected ConsoleLog type\n }\n return consoleObservablesByApi[api];\n });\n return observable_1.mergeObservables.apply(void 0, consoleObservables);\n}\nfunction resetConsoleObservable() {\n consoleObservablesByApi = {};\n}\nfunction createConsoleObservable(api) {\n return new observable_1.Observable(function (observable) {\n var originalConsoleApi = display_1.globalConsole[api];\n display_1.globalConsole[api] = function () {\n var params = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n params[_i] = arguments[_i];\n }\n originalConsoleApi.apply(console, params);\n var handlingStack = (0, handlingStack_1.createHandlingStack)();\n (0, monitor_1.callMonitored)(function () {\n observable.notify(buildConsoleLog(params, api, handlingStack));\n });\n };\n return function () {\n display_1.globalConsole[api] = originalConsoleApi;\n };\n });\n}\nfunction buildConsoleLog(params, api, handlingStack) {\n var message = params.map(function (param) { return formatConsoleParameters(param); }).join(' ');\n var error;\n if (api === display_1.ConsoleApiName.error) {\n var firstErrorParam = (0, polyfills_1.find)(params, error_1.isError);\n error = {\n stack: firstErrorParam ? (0, handlingStack_1.toStackTraceString)((0, computeStackTrace_1.computeStackTrace)(firstErrorParam)) : undefined,\n fingerprint: (0, error_1.tryToGetFingerprint)(firstErrorParam),\n causes: firstErrorParam ? (0, error_1.flattenErrorCauses)(firstErrorParam, 'console') : undefined,\n startClocks: (0, timeUtils_1.clocksNow)(),\n message: message,\n source: error_types_1.ErrorSource.CONSOLE,\n handling: \"handled\" /* ErrorHandling.HANDLED */,\n handlingStack: handlingStack,\n };\n }\n return {\n api: api,\n message: message,\n error: error,\n handlingStack: handlingStack,\n };\n}\nfunction formatConsoleParameters(param) {\n if (typeof param === 'string') {\n return (0, sanitize_1.sanitize)(param);\n }\n if ((0, error_1.isError)(param)) {\n return (0, handlingStack_1.formatErrorMessage)((0, computeStackTrace_1.computeStackTrace)(param));\n }\n return (0, jsonStringify_1.jsonStringify)((0, sanitize_1.sanitize)(param), undefined, 2);\n}\n//# sourceMappingURL=consoleObservable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createContextManager = createContextManager;\nvar mergeInto_1 = require(\"../../tools/mergeInto\");\nvar typeUtils_1 = require(\"../../tools/utils/typeUtils\");\nvar sanitize_1 = require(\"../../tools/serialisation/sanitize\");\nvar observable_1 = require(\"../../tools/observable\");\nfunction createContextManager(customerDataTracker) {\n var context = {};\n var changeObservable = new observable_1.Observable();\n var contextManager = {\n getContext: function () { return (0, mergeInto_1.deepClone)(context); },\n setContext: function (newContext) {\n if ((0, typeUtils_1.getType)(newContext) === 'object') {\n context = (0, sanitize_1.sanitize)(newContext);\n customerDataTracker === null || customerDataTracker === void 0 ? void 0 : customerDataTracker.updateCustomerData(context);\n }\n else {\n contextManager.clearContext();\n }\n changeObservable.notify();\n },\n setContextProperty: function (key, property) {\n context[key] = (0, sanitize_1.sanitize)(property);\n customerDataTracker === null || customerDataTracker === void 0 ? void 0 : customerDataTracker.updateCustomerData(context);\n changeObservable.notify();\n },\n removeContextProperty: function (key) {\n delete context[key];\n customerDataTracker === null || customerDataTracker === void 0 ? void 0 : customerDataTracker.updateCustomerData(context);\n changeObservable.notify();\n },\n clearContext: function () {\n context = {};\n customerDataTracker === null || customerDataTracker === void 0 ? void 0 : customerDataTracker.resetCustomerData();\n changeObservable.notify();\n },\n changeObservable: changeObservable,\n };\n return contextManager;\n}\n//# sourceMappingURL=contextManager.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BYTES_COMPUTATION_THROTTLING_DELAY = exports.CUSTOMER_COMPRESSED_DATA_BYTES_LIMIT = exports.CUSTOMER_DATA_BYTES_LIMIT = void 0;\nexports.createCustomerDataTrackerManager = createCustomerDataTrackerManager;\nexports.createCustomerDataTracker = createCustomerDataTracker;\nvar byteUtils_1 = require(\"../../tools/utils/byteUtils\");\nvar functionUtils_1 = require(\"../../tools/utils/functionUtils\");\nvar jsonStringify_1 = require(\"../../tools/serialisation/jsonStringify\");\nvar display_1 = require(\"../../tools/display\");\nvar objectUtils_1 = require(\"../../tools/utils/objectUtils\");\n// RUM and logs batch bytes limit is 16KB\n// ensure that we leave room for other event attributes and maintain a decent amount of event per batch\n// (3KB (customer data) + 1KB (other attributes)) * 4 (events per batch) = 16KB\nexports.CUSTOMER_DATA_BYTES_LIMIT = 3 * byteUtils_1.ONE_KIBI_BYTE;\n// We observed that the compression ratio is around 8 in general, but we also want to keep a margin\n// because some data might not be compressed (ex: last view update on page exit). We chose 16KiB\n// because it is also the limit of the 'batchBytesCount' that we use for RUM and Logs data, but this\n// is a bit arbitrary.\nexports.CUSTOMER_COMPRESSED_DATA_BYTES_LIMIT = 16 * byteUtils_1.ONE_KIBI_BYTE;\nexports.BYTES_COMPUTATION_THROTTLING_DELAY = 200;\nfunction createCustomerDataTrackerManager(compressionStatus) {\n if (compressionStatus === void 0) { compressionStatus = 2 /* CustomerDataCompressionStatus.Disabled */; }\n var customerDataTrackers = new Map();\n var alreadyWarned = false;\n function checkCustomerDataLimit(initialBytesCount) {\n if (initialBytesCount === void 0) { initialBytesCount = 0; }\n if (alreadyWarned || compressionStatus === 0 /* CustomerDataCompressionStatus.Unknown */) {\n return;\n }\n var bytesCountLimit = compressionStatus === 2 /* CustomerDataCompressionStatus.Disabled */\n ? exports.CUSTOMER_DATA_BYTES_LIMIT\n : exports.CUSTOMER_COMPRESSED_DATA_BYTES_LIMIT;\n var bytesCount = initialBytesCount;\n customerDataTrackers.forEach(function (tracker) {\n bytesCount += tracker.getBytesCount();\n });\n if (bytesCount > bytesCountLimit) {\n displayCustomerDataLimitReachedWarning(bytesCountLimit);\n alreadyWarned = true;\n }\n }\n return {\n /**\n * Creates a detached tracker. The manager will not store a reference to that tracker, and the\n * bytes count will be counted independently from other detached trackers.\n *\n * This is particularly useful when we don't know when the tracker will be unused, so we don't\n * leak memory (ex: when used in Logger instances).\n */\n createDetachedTracker: function () {\n var tracker = createCustomerDataTracker(function () { return checkCustomerDataLimit(tracker.getBytesCount()); });\n return tracker;\n },\n /**\n * Creates a tracker if it doesn't exist, and returns it.\n */\n getOrCreateTracker: function (type) {\n if (!customerDataTrackers.has(type)) {\n customerDataTrackers.set(type, createCustomerDataTracker(checkCustomerDataLimit));\n }\n return customerDataTrackers.get(type);\n },\n setCompressionStatus: function (newCompressionStatus) {\n if (compressionStatus === 0 /* CustomerDataCompressionStatus.Unknown */) {\n compressionStatus = newCompressionStatus;\n checkCustomerDataLimit();\n }\n },\n getCompressionStatus: function () { return compressionStatus; },\n stop: function () {\n customerDataTrackers.forEach(function (tracker) { return tracker.stop(); });\n customerDataTrackers.clear();\n },\n };\n}\nfunction createCustomerDataTracker(checkCustomerDataLimit) {\n var bytesCountCache = 0;\n // Throttle the bytes computation to minimize the impact on performance.\n // Especially useful if the user call context APIs synchronously multiple times in a row\n var _a = (0, functionUtils_1.throttle)(function (context) {\n bytesCountCache = (0, byteUtils_1.computeBytesCount)((0, jsonStringify_1.jsonStringify)(context));\n checkCustomerDataLimit();\n }, exports.BYTES_COMPUTATION_THROTTLING_DELAY), computeBytesCountThrottled = _a.throttled, cancelComputeBytesCount = _a.cancel;\n var resetBytesCount = function () {\n cancelComputeBytesCount();\n bytesCountCache = 0;\n };\n return {\n updateCustomerData: function (context) {\n if ((0, objectUtils_1.isEmptyObject)(context)) {\n resetBytesCount();\n }\n else {\n computeBytesCountThrottled(context);\n }\n },\n resetCustomerData: resetBytesCount,\n getBytesCount: function () { return bytesCountCache; },\n stop: function () {\n cancelComputeBytesCount();\n },\n };\n}\nfunction displayCustomerDataLimitReachedWarning(bytesCountLimit) {\n display_1.display.warn(\"Customer data exceeds the recommended \".concat(bytesCountLimit / byteUtils_1.ONE_KIBI_BYTE, \"KiB threshold. \").concat(display_1.MORE_DETAILS, \" \").concat(display_1.DOCS_TROUBLESHOOTING, \"/#customer-data-exceeds-the-recommended-threshold-warning\"));\n}\n//# sourceMappingURL=customerDataTracker.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.storeContextManager = storeContextManager;\nexports.buildStorageKey = buildStorageKey;\nexports.removeStorageListeners = removeStorageListeners;\nvar addEventListener_1 = require(\"../../browser/addEventListener\");\nvar mergeInto_1 = require(\"../../tools/mergeInto\");\nvar CONTEXT_STORE_KEY_PREFIX = '_dd_c';\nvar storageListeners = [];\nfunction storeContextManager(configuration, contextManager, productKey, customerDataType) {\n var storageKey = buildStorageKey(productKey, customerDataType);\n storageListeners.push((0, addEventListener_1.addEventListener)(configuration, window, \"storage\" /* DOM_EVENT.STORAGE */, function (_a) {\n var key = _a.key;\n if (storageKey === key) {\n synchronizeWithStorage();\n }\n }));\n contextManager.changeObservable.subscribe(dumpToStorage);\n contextManager.setContext((0, mergeInto_1.combine)(getFromStorage(), contextManager.getContext()));\n function synchronizeWithStorage() {\n contextManager.setContext(getFromStorage());\n }\n function dumpToStorage() {\n localStorage.setItem(storageKey, JSON.stringify(contextManager.getContext()));\n }\n function getFromStorage() {\n var rawContext = localStorage.getItem(storageKey);\n return rawContext !== null ? JSON.parse(rawContext) : {};\n }\n}\nfunction buildStorageKey(productKey, customerDataType) {\n return \"\".concat(CONTEXT_STORE_KEY_PREFIX, \"_\").concat(productKey, \"_\").concat(customerDataType);\n}\nfunction removeStorageListeners() {\n storageListeners.map(function (listener) { return listener.stop(); });\n}\n//# sourceMappingURL=storeContextManager.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=deflate.types.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./deflate.types\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.NO_ERROR_STACK_PRESENT_MESSAGE = void 0;\nexports.computeRawError = computeRawError;\nexports.tryToGetFingerprint = tryToGetFingerprint;\nexports.getFileFromStackTraceString = getFileFromStackTraceString;\nexports.isError = isError;\nexports.flattenErrorCauses = flattenErrorCauses;\nvar sanitize_1 = require(\"../../tools/serialisation/sanitize\");\nvar jsonStringify_1 = require(\"../../tools/serialisation/jsonStringify\");\nvar computeStackTrace_1 = require(\"../../tools/stackTrace/computeStackTrace\");\nvar handlingStack_1 = require(\"../../tools/stackTrace/handlingStack\");\nexports.NO_ERROR_STACK_PRESENT_MESSAGE = 'No stack, consider using an instance of Error';\nfunction computeRawError(_a) {\n var stackTrace = _a.stackTrace, originalError = _a.originalError, handlingStack = _a.handlingStack, startClocks = _a.startClocks, nonErrorPrefix = _a.nonErrorPrefix, source = _a.source, handling = _a.handling;\n var isErrorInstance = isError(originalError);\n var message = computeMessage(stackTrace, isErrorInstance, nonErrorPrefix, originalError);\n var stack = hasUsableStack(isErrorInstance, stackTrace)\n ? (0, handlingStack_1.toStackTraceString)(stackTrace)\n : exports.NO_ERROR_STACK_PRESENT_MESSAGE;\n var causes = isErrorInstance ? flattenErrorCauses(originalError, source) : undefined;\n var type = stackTrace ? stackTrace.name : undefined;\n var fingerprint = tryToGetFingerprint(originalError);\n return {\n startClocks: startClocks,\n source: source,\n handling: handling,\n handlingStack: handlingStack,\n originalError: originalError,\n type: type,\n message: message,\n stack: stack,\n causes: causes,\n fingerprint: fingerprint,\n };\n}\nfunction computeMessage(stackTrace, isErrorInstance, nonErrorPrefix, originalError) {\n // Favor stackTrace message only if tracekit has really been able to extract something meaningful (message + name)\n // TODO rework tracekit integration to avoid scattering error building logic\n return (stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.message) && (stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.name)\n ? stackTrace.message\n : !isErrorInstance\n ? \"\".concat(nonErrorPrefix, \" \").concat((0, jsonStringify_1.jsonStringify)((0, sanitize_1.sanitize)(originalError)))\n : 'Empty message';\n}\nfunction hasUsableStack(isErrorInstance, stackTrace) {\n if (stackTrace === undefined) {\n return false;\n }\n if (isErrorInstance) {\n return true;\n }\n // handle cases where tracekit return stack = [] or stack = [{url: undefined, line: undefined, column: undefined}]\n // TODO rework tracekit integration to avoid generating those unusable stack\n return stackTrace.stack.length > 0 && (stackTrace.stack.length > 1 || stackTrace.stack[0].url !== undefined);\n}\nfunction tryToGetFingerprint(originalError) {\n return isError(originalError) && 'dd_fingerprint' in originalError ? String(originalError.dd_fingerprint) : undefined;\n}\nfunction getFileFromStackTraceString(stack) {\n var _a;\n return (_a = /@ (.+)/.exec(stack)) === null || _a === void 0 ? void 0 : _a[1];\n}\nfunction isError(error) {\n return error instanceof Error || Object.prototype.toString.call(error) === '[object Error]';\n}\nfunction flattenErrorCauses(error, parentSource) {\n var currentError = error;\n var causes = [];\n while (isError(currentError === null || currentError === void 0 ? void 0 : currentError.cause) && causes.length < 10) {\n var stackTrace = (0, computeStackTrace_1.computeStackTrace)(currentError.cause);\n causes.push({\n message: currentError.cause.message,\n source: parentSource,\n type: stackTrace === null || stackTrace === void 0 ? void 0 : stackTrace.name,\n stack: stackTrace && (0, handlingStack_1.toStackTraceString)(stackTrace),\n });\n currentError = currentError.cause;\n }\n return causes.length ? causes : undefined;\n}\n//# sourceMappingURL=error.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ErrorSource = void 0;\nexports.ErrorSource = {\n AGENT: 'agent',\n CONSOLE: 'console',\n CUSTOM: 'custom',\n LOGGER: 'logger',\n NETWORK: 'network',\n SOURCE: 'source',\n REPORT: 'report',\n};\n//# sourceMappingURL=error.types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.trackRuntimeError = trackRuntimeError;\nexports.instrumentOnError = instrumentOnError;\nexports.instrumentUnhandledRejection = instrumentUnhandledRejection;\nvar instrumentMethod_1 = require(\"../../tools/instrumentMethod\");\nvar timeUtils_1 = require(\"../../tools/utils/timeUtils\");\nvar computeStackTrace_1 = require(\"../../tools/stackTrace/computeStackTrace\");\nvar error_1 = require(\"./error\");\nvar error_types_1 = require(\"./error.types\");\nfunction trackRuntimeError(errorObservable) {\n var handleRuntimeError = function (stackTrace, originalError) {\n var rawError = (0, error_1.computeRawError)({\n stackTrace: stackTrace,\n originalError: originalError,\n startClocks: (0, timeUtils_1.clocksNow)(),\n nonErrorPrefix: \"Uncaught\" /* NonErrorPrefix.UNCAUGHT */,\n source: error_types_1.ErrorSource.SOURCE,\n handling: \"unhandled\" /* ErrorHandling.UNHANDLED */,\n });\n errorObservable.notify(rawError);\n };\n var stopInstrumentingOnError = instrumentOnError(handleRuntimeError).stop;\n var stopInstrumentingOnUnhandledRejection = instrumentUnhandledRejection(handleRuntimeError).stop;\n return {\n stop: function () {\n stopInstrumentingOnError();\n stopInstrumentingOnUnhandledRejection();\n },\n };\n}\nfunction instrumentOnError(callback) {\n return (0, instrumentMethod_1.instrumentMethod)(window, 'onerror', function (_a) {\n var _b = _a.parameters, messageObj = _b[0], url = _b[1], line = _b[2], column = _b[3], errorObj = _b[4];\n var stackTrace;\n if ((0, error_1.isError)(errorObj)) {\n stackTrace = (0, computeStackTrace_1.computeStackTrace)(errorObj);\n }\n else {\n stackTrace = (0, computeStackTrace_1.computeStackTraceFromOnErrorMessage)(messageObj, url, line, column);\n }\n callback(stackTrace, errorObj !== null && errorObj !== void 0 ? errorObj : messageObj);\n });\n}\nfunction instrumentUnhandledRejection(callback) {\n return (0, instrumentMethod_1.instrumentMethod)(window, 'onunhandledrejection', function (_a) {\n var e = _a.parameters[0];\n var reason = e.reason || 'Empty reason';\n var stack = (0, computeStackTrace_1.computeStackTrace)(reason);\n callback(stack, reason);\n });\n}\n//# sourceMappingURL=trackRuntimeError.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createEventRateLimiter = createEventRateLimiter;\nvar timer_1 = require(\"../../tools/timer\");\nvar timeUtils_1 = require(\"../../tools/utils/timeUtils\");\nvar error_types_1 = require(\"../error/error.types\");\nfunction createEventRateLimiter(eventType, limit, onLimitReached) {\n var eventCount = 0;\n var allowNextEvent = false;\n return {\n isLimitReached: function () {\n if (eventCount === 0) {\n (0, timer_1.setTimeout)(function () {\n eventCount = 0;\n }, timeUtils_1.ONE_MINUTE);\n }\n eventCount += 1;\n if (eventCount <= limit || allowNextEvent) {\n allowNextEvent = false;\n return false;\n }\n if (eventCount === limit + 1) {\n allowNextEvent = true;\n try {\n onLimitReached({\n message: \"Reached max number of \".concat(eventType, \"s by minute: \").concat(limit),\n source: error_types_1.ErrorSource.AGENT,\n startClocks: (0, timeUtils_1.clocksNow)(),\n });\n }\n finally {\n allowNextEvent = false;\n }\n }\n return true;\n },\n };\n}\n//# sourceMappingURL=createEventRateLimiter.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RawReportType = void 0;\nexports.initReportObservable = initReportObservable;\nvar handlingStack_1 = require(\"../../tools/stackTrace/handlingStack\");\nvar monitor_1 = require(\"../../tools/monitor\");\nvar observable_1 = require(\"../../tools/observable\");\nvar addEventListener_1 = require(\"../../browser/addEventListener\");\nvar polyfills_1 = require(\"../../tools/utils/polyfills\");\nvar stringUtils_1 = require(\"../../tools/utils/stringUtils\");\nvar error_types_1 = require(\"../error/error.types\");\nvar timeUtils_1 = require(\"../../tools/utils/timeUtils\");\nexports.RawReportType = {\n intervention: 'intervention',\n deprecation: 'deprecation',\n cspViolation: 'csp_violation',\n};\nfunction initReportObservable(configuration, apis) {\n var observables = [];\n if ((0, polyfills_1.includes)(apis, exports.RawReportType.cspViolation)) {\n observables.push(createCspViolationReportObservable(configuration));\n }\n var reportTypes = apis.filter(function (api) { return api !== exports.RawReportType.cspViolation; });\n if (reportTypes.length) {\n observables.push(createReportObservable(reportTypes));\n }\n return observable_1.mergeObservables.apply(void 0, observables);\n}\nfunction createReportObservable(reportTypes) {\n return new observable_1.Observable(function (observable) {\n if (!window.ReportingObserver) {\n return;\n }\n var handleReports = (0, monitor_1.monitor)(function (reports, _) {\n return reports.forEach(function (report) { return observable.notify(buildRawReportErrorFromReport(report)); });\n });\n var observer = new window.ReportingObserver(handleReports, {\n types: reportTypes,\n buffered: true,\n });\n observer.observe();\n return function () {\n observer.disconnect();\n };\n });\n}\nfunction createCspViolationReportObservable(configuration) {\n return new observable_1.Observable(function (observable) {\n var stop = (0, addEventListener_1.addEventListener)(configuration, document, \"securitypolicyviolation\" /* DOM_EVENT.SECURITY_POLICY_VIOLATION */, function (event) {\n observable.notify(buildRawReportErrorFromCspViolation(event));\n }).stop;\n return stop;\n });\n}\nfunction buildRawReportErrorFromReport(report) {\n var type = report.type, body = report.body;\n return buildRawReportError({\n type: body.id,\n message: \"\".concat(type, \": \").concat(body.message),\n originalError: report,\n stack: buildStack(body.id, body.message, body.sourceFile, body.lineNumber, body.columnNumber),\n });\n}\nfunction buildRawReportErrorFromCspViolation(event) {\n var message = \"'\".concat(event.blockedURI, \"' blocked by '\").concat(event.effectiveDirective, \"' directive\");\n return buildRawReportError({\n type: event.effectiveDirective,\n message: \"\".concat(exports.RawReportType.cspViolation, \": \").concat(message),\n originalError: event,\n csp: {\n disposition: event.disposition,\n },\n stack: buildStack(event.effectiveDirective, event.originalPolicy\n ? \"\".concat(message, \" of the policy \\\"\").concat((0, stringUtils_1.safeTruncate)(event.originalPolicy, 100, '...'), \"\\\"\")\n : 'no policy', event.sourceFile, event.lineNumber, event.columnNumber),\n });\n}\nfunction buildRawReportError(partial) {\n return (0, polyfills_1.assign)({\n startClocks: (0, timeUtils_1.clocksNow)(),\n source: error_types_1.ErrorSource.REPORT,\n handling: \"unhandled\" /* ErrorHandling.UNHANDLED */,\n }, partial);\n}\nfunction buildStack(name, message, sourceFile, lineNumber, columnNumber) {\n return sourceFile\n ? (0, handlingStack_1.toStackTraceString)({\n name: name,\n message: message,\n stack: [\n {\n func: '?',\n url: sourceFile,\n line: lineNumber !== null && lineNumber !== void 0 ? lineNumber : undefined,\n column: columnNumber !== null && columnNumber !== void 0 ? columnNumber : undefined,\n },\n ],\n })\n : undefined;\n}\n//# sourceMappingURL=reportObservable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=resourceUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LOGS_SESSION_KEY = exports.RUM_SESSION_KEY = exports.OLD_LOGS_COOKIE_NAME = exports.OLD_RUM_COOKIE_NAME = exports.OLD_SESSION_COOKIE_NAME = void 0;\nexports.tryOldCookiesMigration = tryOldCookiesMigration;\nvar cookie_1 = require(\"../../browser/cookie\");\nvar sessionStoreStrategy_1 = require(\"./storeStrategies/sessionStoreStrategy\");\nvar sessionState_1 = require(\"./sessionState\");\nexports.OLD_SESSION_COOKIE_NAME = '_dd';\nexports.OLD_RUM_COOKIE_NAME = '_dd_r';\nexports.OLD_LOGS_COOKIE_NAME = '_dd_l';\n// duplicate values to avoid dependency issues\nexports.RUM_SESSION_KEY = 'rum';\nexports.LOGS_SESSION_KEY = 'logs';\n/**\n * This migration should remain in the codebase as long as older versions are available/live\n * to allow older sdk versions to be upgraded to newer versions without compatibility issues.\n */\nfunction tryOldCookiesMigration(cookieStoreStrategy) {\n var sessionString = (0, cookie_1.getInitCookie)(sessionStoreStrategy_1.SESSION_STORE_KEY);\n if (!sessionString) {\n var oldSessionId = (0, cookie_1.getInitCookie)(exports.OLD_SESSION_COOKIE_NAME);\n var oldRumType = (0, cookie_1.getInitCookie)(exports.OLD_RUM_COOKIE_NAME);\n var oldLogsType = (0, cookie_1.getInitCookie)(exports.OLD_LOGS_COOKIE_NAME);\n var session = {};\n if (oldSessionId) {\n session.id = oldSessionId;\n }\n if (oldLogsType && /^[01]$/.test(oldLogsType)) {\n session[exports.LOGS_SESSION_KEY] = oldLogsType;\n }\n if (oldRumType && /^[012]$/.test(oldRumType)) {\n session[exports.RUM_SESSION_KEY] = oldRumType;\n }\n if ((0, sessionState_1.isSessionStarted)(session)) {\n (0, sessionState_1.expandSessionState)(session);\n cookieStoreStrategy.persistSession(session);\n }\n }\n}\n//# sourceMappingURL=oldCookiesMigration.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SessionPersistence = exports.SESSION_COOKIE_EXPIRATION_DELAY = exports.SESSION_EXPIRATION_DELAY = exports.SESSION_TIME_OUT_DELAY = void 0;\nvar timeUtils_1 = require(\"../../tools/utils/timeUtils\");\nexports.SESSION_TIME_OUT_DELAY = 4 * timeUtils_1.ONE_HOUR;\nexports.SESSION_EXPIRATION_DELAY = 15 * timeUtils_1.ONE_MINUTE;\nexports.SESSION_COOKIE_EXPIRATION_DELAY = timeUtils_1.ONE_YEAR;\nexports.SessionPersistence = {\n COOKIE: 'cookie',\n LOCAL_STORAGE: 'local-storage',\n};\n//# sourceMappingURL=sessionConstants.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VISIBILITY_CHECK_DELAY = void 0;\nexports.startSessionManager = startSessionManager;\nexports.stopSessionManager = stopSessionManager;\nvar observable_1 = require(\"../../tools/observable\");\nvar valueHistory_1 = require(\"../../tools/valueHistory\");\nvar timeUtils_1 = require(\"../../tools/utils/timeUtils\");\nvar addEventListener_1 = require(\"../../browser/addEventListener\");\nvar timer_1 = require(\"../../tools/timer\");\nvar sessionConstants_1 = require(\"./sessionConstants\");\nvar sessionStore_1 = require(\"./sessionStore\");\nexports.VISIBILITY_CHECK_DELAY = timeUtils_1.ONE_MINUTE;\nvar SESSION_CONTEXT_TIMEOUT_DELAY = sessionConstants_1.SESSION_TIME_OUT_DELAY;\nvar stopCallbacks = [];\nfunction startSessionManager(configuration, productKey, computeSessionState, trackingConsentState) {\n var renewObservable = new observable_1.Observable();\n var expireObservable = new observable_1.Observable();\n // TODO - Improve configuration type and remove assertion\n var sessionStore = (0, sessionStore_1.startSessionStore)(configuration.sessionStoreStrategyType, productKey, computeSessionState);\n stopCallbacks.push(function () { return sessionStore.stop(); });\n var sessionContextHistory = (0, valueHistory_1.createValueHistory)({\n expireDelay: SESSION_CONTEXT_TIMEOUT_DELAY,\n });\n stopCallbacks.push(function () { return sessionContextHistory.stop(); });\n sessionStore.renewObservable.subscribe(function () {\n sessionContextHistory.add(buildSessionContext(), (0, timeUtils_1.relativeNow)());\n renewObservable.notify();\n });\n sessionStore.expireObservable.subscribe(function () {\n expireObservable.notify();\n sessionContextHistory.closeActive((0, timeUtils_1.relativeNow)());\n });\n // We expand/renew session unconditionally as tracking consent is always granted when the session\n // manager is started.\n sessionStore.expandOrRenewSession();\n sessionContextHistory.add(buildSessionContext(), (0, timeUtils_1.clocksOrigin)().relative);\n trackingConsentState.observable.subscribe(function () {\n if (trackingConsentState.isGranted()) {\n sessionStore.expandOrRenewSession();\n }\n else {\n sessionStore.expire();\n }\n });\n trackActivity(configuration, function () {\n if (trackingConsentState.isGranted()) {\n sessionStore.expandOrRenewSession();\n }\n });\n trackVisibility(configuration, function () { return sessionStore.expandSession(); });\n trackResume(configuration, function () { return sessionStore.restartSession(); });\n function buildSessionContext() {\n return {\n id: sessionStore.getSession().id,\n trackingType: sessionStore.getSession()[productKey],\n isReplayForced: !!sessionStore.getSession().forcedReplay,\n anonymousId: sessionStore.getSession().anonymousId,\n };\n }\n return {\n findSession: function (startTime, options) { return sessionContextHistory.find(startTime, options); },\n renewObservable: renewObservable,\n expireObservable: expireObservable,\n sessionStateUpdateObservable: sessionStore.sessionStateUpdateObservable,\n expire: sessionStore.expire,\n updateSessionState: sessionStore.updateSessionState,\n };\n}\nfunction stopSessionManager() {\n stopCallbacks.forEach(function (e) { return e(); });\n stopCallbacks = [];\n}\nfunction trackActivity(configuration, expandOrRenewSession) {\n var stop = (0, addEventListener_1.addEventListeners)(configuration, window, [\"click\" /* DOM_EVENT.CLICK */, \"touchstart\" /* DOM_EVENT.TOUCH_START */, \"keydown\" /* DOM_EVENT.KEY_DOWN */, \"scroll\" /* DOM_EVENT.SCROLL */], expandOrRenewSession, { capture: true, passive: true }).stop;\n stopCallbacks.push(stop);\n}\nfunction trackVisibility(configuration, expandSession) {\n var expandSessionWhenVisible = function () {\n if (document.visibilityState === 'visible') {\n expandSession();\n }\n };\n var stop = (0, addEventListener_1.addEventListener)(configuration, document, \"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */, expandSessionWhenVisible).stop;\n stopCallbacks.push(stop);\n var visibilityCheckInterval = (0, timer_1.setInterval)(expandSessionWhenVisible, exports.VISIBILITY_CHECK_DELAY);\n stopCallbacks.push(function () {\n (0, timer_1.clearInterval)(visibilityCheckInterval);\n });\n}\nfunction trackResume(configuration, cb) {\n var stop = (0, addEventListener_1.addEventListener)(configuration, window, \"resume\" /* DOM_EVENT.RESUME */, cb, { capture: true }).stop;\n stopCallbacks.push(stop);\n}\n//# sourceMappingURL=sessionManager.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EXPIRED = void 0;\nexports.getExpiredSessionState = getExpiredSessionState;\nexports.isSessionInNotStartedState = isSessionInNotStartedState;\nexports.isSessionStarted = isSessionStarted;\nexports.isSessionInExpiredState = isSessionInExpiredState;\nexports.expandSessionState = expandSessionState;\nexports.toSessionString = toSessionString;\nexports.toSessionState = toSessionState;\nvar experimentalFeatures_1 = require(\"../../tools/experimentalFeatures\");\nvar objectUtils_1 = require(\"../../tools/utils/objectUtils\");\nvar polyfills_1 = require(\"../../tools/utils/polyfills\");\nvar timeUtils_1 = require(\"../../tools/utils/timeUtils\");\nvar user_1 = require(\"../user\");\nvar sessionConstants_1 = require(\"./sessionConstants\");\nvar sessionStateValidation_1 = require(\"./sessionStateValidation\");\nexports.EXPIRED = '1';\nfunction getExpiredSessionState(previousSessionState) {\n var expiredSessionState = {\n isExpired: exports.EXPIRED,\n };\n if ((0, experimentalFeatures_1.isExperimentalFeatureEnabled)(experimentalFeatures_1.ExperimentalFeature.ANONYMOUS_USER_TRACKING)) {\n if (previousSessionState === null || previousSessionState === void 0 ? void 0 : previousSessionState.anonymousId) {\n expiredSessionState.anonymousId = previousSessionState === null || previousSessionState === void 0 ? void 0 : previousSessionState.anonymousId;\n }\n else {\n expiredSessionState.anonymousId = (0, user_1.generateAnonymousId)();\n }\n }\n return expiredSessionState;\n}\nfunction isSessionInNotStartedState(session) {\n return (0, objectUtils_1.isEmptyObject)(session);\n}\nfunction isSessionStarted(session) {\n return !isSessionInNotStartedState(session);\n}\nfunction isSessionInExpiredState(session) {\n return session.isExpired !== undefined || !isActiveSession(session);\n}\n// An active session is a session in either `Tracked` or `NotTracked` state\nfunction isActiveSession(sessionState) {\n // created and expire can be undefined for versions which was not storing them\n // these checks could be removed when older versions will not be available/live anymore\n return ((sessionState.created === undefined || (0, timeUtils_1.dateNow)() - Number(sessionState.created) < sessionConstants_1.SESSION_TIME_OUT_DELAY) &&\n (sessionState.expire === undefined || (0, timeUtils_1.dateNow)() < Number(sessionState.expire)));\n}\nfunction expandSessionState(session) {\n session.expire = String((0, timeUtils_1.dateNow)() + sessionConstants_1.SESSION_EXPIRATION_DELAY);\n}\nfunction toSessionString(session) {\n return ((0, polyfills_1.objectEntries)(session)\n // we use `aid` as a key for anonymousId\n .map(function (_a) {\n var key = _a[0], value = _a[1];\n return (key === 'anonymousId' ? \"aid=\".concat(value) : \"\".concat(key, \"=\").concat(value));\n })\n .join(sessionStateValidation_1.SESSION_ENTRY_SEPARATOR));\n}\nfunction toSessionState(sessionString) {\n var session = {};\n if ((0, sessionStateValidation_1.isValidSessionString)(sessionString)) {\n sessionString.split(sessionStateValidation_1.SESSION_ENTRY_SEPARATOR).forEach(function (entry) {\n var matches = sessionStateValidation_1.SESSION_ENTRY_REGEXP.exec(entry);\n if (matches !== null) {\n var key = matches[1], value = matches[2];\n if (key === 'aid') {\n // we use `aid` as a key for anonymousId\n session.anonymousId = value;\n }\n else {\n session[key] = value;\n }\n }\n });\n }\n return session;\n}\n//# sourceMappingURL=sessionState.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SESSION_ENTRY_SEPARATOR = exports.SESSION_ENTRY_REGEXP = void 0;\nexports.isValidSessionString = isValidSessionString;\nexports.SESSION_ENTRY_REGEXP = /^([a-zA-Z]+)=([a-z0-9-]+)$/;\nexports.SESSION_ENTRY_SEPARATOR = '&';\nfunction isValidSessionString(sessionString) {\n return (!!sessionString &&\n (sessionString.indexOf(exports.SESSION_ENTRY_SEPARATOR) !== -1 || exports.SESSION_ENTRY_REGEXP.test(sessionString)));\n}\n//# sourceMappingURL=sessionStateValidation.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.STORAGE_POLL_DELAY = void 0;\nexports.selectSessionStoreStrategyType = selectSessionStoreStrategyType;\nexports.startSessionStore = startSessionStore;\nvar timer_1 = require(\"../../tools/timer\");\nvar observable_1 = require(\"../../tools/observable\");\nvar timeUtils_1 = require(\"../../tools/utils/timeUtils\");\nvar functionUtils_1 = require(\"../../tools/utils/functionUtils\");\nvar stringUtils_1 = require(\"../../tools/utils/stringUtils\");\nvar polyfills_1 = require(\"../../tools/utils/polyfills\");\nvar display_1 = require(\"../../tools/display\");\nvar sessionInCookie_1 = require(\"./storeStrategies/sessionInCookie\");\nvar sessionState_1 = require(\"./sessionState\");\nvar sessionInLocalStorage_1 = require(\"./storeStrategies/sessionInLocalStorage\");\nvar sessionStoreOperations_1 = require(\"./sessionStoreOperations\");\nvar sessionConstants_1 = require(\"./sessionConstants\");\n/**\n * Every second, the storage will be polled to check for any change that can occur\n * to the session state in another browser tab, or another window.\n * This value has been determined from our previous cookie-only implementation.\n */\nexports.STORAGE_POLL_DELAY = timeUtils_1.ONE_SECOND;\n/**\n * Selects the correct session store strategy type based on the configuration and storage\n * availability.\n */\nfunction selectSessionStoreStrategyType(initConfiguration) {\n switch (initConfiguration.sessionPersistence) {\n case sessionConstants_1.SessionPersistence.COOKIE:\n return (0, sessionInCookie_1.selectCookieStrategy)(initConfiguration);\n case sessionConstants_1.SessionPersistence.LOCAL_STORAGE:\n return (0, sessionInLocalStorage_1.selectLocalStorageStrategy)();\n case undefined: {\n var sessionStoreStrategyType = (0, sessionInCookie_1.selectCookieStrategy)(initConfiguration);\n if (!sessionStoreStrategyType && initConfiguration.allowFallbackToLocalStorage) {\n sessionStoreStrategyType = (0, sessionInLocalStorage_1.selectLocalStorageStrategy)();\n }\n return sessionStoreStrategyType;\n }\n default:\n display_1.display.error(\"Invalid session persistence '\".concat(String(initConfiguration.sessionPersistence), \"'\"));\n }\n}\n/**\n * Different session concepts:\n * - tracked, the session has an id and is updated along the user navigation\n * - not tracked, the session does not have an id but it is updated along the user navigation\n * - inactive, no session in store or session expired, waiting for a renew session\n */\nfunction startSessionStore(sessionStoreStrategyType, productKey, computeSessionState) {\n var renewObservable = new observable_1.Observable();\n var expireObservable = new observable_1.Observable();\n var sessionStateUpdateObservable = new observable_1.Observable();\n var sessionStoreStrategy = sessionStoreStrategyType.type === sessionConstants_1.SessionPersistence.COOKIE\n ? (0, sessionInCookie_1.initCookieStrategy)(sessionStoreStrategyType.cookieOptions)\n : (0, sessionInLocalStorage_1.initLocalStorageStrategy)();\n var expireSession = sessionStoreStrategy.expireSession;\n var watchSessionTimeoutId = (0, timer_1.setInterval)(watchSession, exports.STORAGE_POLL_DELAY);\n var sessionCache;\n startSession();\n var _a = (0, functionUtils_1.throttle)(function () {\n (0, sessionStoreOperations_1.processSessionStoreOperations)({\n process: function (sessionState) {\n if ((0, sessionState_1.isSessionInNotStartedState)(sessionState)) {\n return;\n }\n var synchronizedSession = synchronizeSession(sessionState);\n expandOrRenewSessionState(synchronizedSession);\n return synchronizedSession;\n },\n after: function (sessionState) {\n if ((0, sessionState_1.isSessionStarted)(sessionState) && !hasSessionInCache()) {\n renewSessionInCache(sessionState);\n }\n sessionCache = sessionState;\n },\n }, sessionStoreStrategy);\n }, exports.STORAGE_POLL_DELAY), throttledExpandOrRenewSession = _a.throttled, cancelExpandOrRenewSession = _a.cancel;\n function expandSession() {\n (0, sessionStoreOperations_1.processSessionStoreOperations)({\n process: function (sessionState) { return (hasSessionInCache() ? synchronizeSession(sessionState) : undefined); },\n }, sessionStoreStrategy);\n }\n /**\n * allows two behaviors:\n * - if the session is active, synchronize the session cache without updating the session store\n * - if the session is not active, clear the session store and expire the session cache\n */\n function watchSession() {\n (0, sessionStoreOperations_1.processSessionStoreOperations)({\n process: function (sessionState) {\n return (0, sessionState_1.isSessionInExpiredState)(sessionState) ? (0, sessionState_1.getExpiredSessionState)(sessionState) : undefined;\n },\n after: synchronizeSession,\n }, sessionStoreStrategy);\n }\n function synchronizeSession(sessionState) {\n if ((0, sessionState_1.isSessionInExpiredState)(sessionState)) {\n sessionState = (0, sessionState_1.getExpiredSessionState)(sessionState);\n }\n if (hasSessionInCache()) {\n if (isSessionInCacheOutdated(sessionState)) {\n expireSessionInCache();\n }\n else {\n sessionStateUpdateObservable.notify({ previousState: sessionCache, newState: sessionState });\n sessionCache = sessionState;\n }\n }\n return sessionState;\n }\n function startSession() {\n (0, sessionStoreOperations_1.processSessionStoreOperations)({\n process: function (sessionState) {\n if ((0, sessionState_1.isSessionInNotStartedState)(sessionState)) {\n return (0, sessionState_1.getExpiredSessionState)(sessionState);\n }\n },\n after: function (sessionState) {\n sessionCache = sessionState;\n },\n }, sessionStoreStrategy);\n }\n function expandOrRenewSessionState(sessionState) {\n if ((0, sessionState_1.isSessionInNotStartedState)(sessionState)) {\n return false;\n }\n var _a = computeSessionState(sessionState[productKey]), trackingType = _a.trackingType, isTracked = _a.isTracked;\n sessionState[productKey] = trackingType;\n delete sessionState.isExpired;\n if (isTracked && !sessionState.id) {\n sessionState.id = (0, stringUtils_1.generateUUID)();\n sessionState.created = String((0, timeUtils_1.dateNow)());\n }\n }\n function hasSessionInCache() {\n return sessionCache[productKey] !== undefined;\n }\n function isSessionInCacheOutdated(sessionState) {\n return sessionCache.id !== sessionState.id || sessionCache[productKey] !== sessionState[productKey];\n }\n function expireSessionInCache() {\n sessionCache = (0, sessionState_1.getExpiredSessionState)(sessionCache);\n expireObservable.notify();\n }\n function renewSessionInCache(sessionState) {\n sessionCache = sessionState;\n renewObservable.notify();\n }\n function updateSessionState(partialSessionState) {\n (0, sessionStoreOperations_1.processSessionStoreOperations)({\n process: function (sessionState) { return (0, polyfills_1.assign)({}, sessionState, partialSessionState); },\n after: synchronizeSession,\n }, sessionStoreStrategy);\n }\n return {\n expandOrRenewSession: throttledExpandOrRenewSession,\n expandSession: expandSession,\n getSession: function () { return sessionCache; },\n renewObservable: renewObservable,\n expireObservable: expireObservable,\n sessionStateUpdateObservable: sessionStateUpdateObservable,\n restartSession: startSession,\n expire: function () {\n cancelExpandOrRenewSession();\n expireSession(sessionCache);\n synchronizeSession((0, sessionState_1.getExpiredSessionState)(sessionCache));\n },\n stop: function () {\n (0, timer_1.clearInterval)(watchSessionTimeoutId);\n },\n updateSessionState: updateSessionState,\n };\n}\n//# sourceMappingURL=sessionStore.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LOCK_MAX_TRIES = exports.LOCK_RETRY_DELAY = void 0;\nexports.processSessionStoreOperations = processSessionStoreOperations;\nvar timer_1 = require(\"../../tools/timer\");\nvar stringUtils_1 = require(\"../../tools/utils/stringUtils\");\nvar polyfills_1 = require(\"../../tools/utils/polyfills\");\nvar sessionState_1 = require(\"./sessionState\");\nexports.LOCK_RETRY_DELAY = 10;\nexports.LOCK_MAX_TRIES = 100;\nvar bufferedOperations = [];\nvar ongoingOperations;\nfunction processSessionStoreOperations(operations, sessionStoreStrategy, numberOfRetries) {\n var _a;\n if (numberOfRetries === void 0) { numberOfRetries = 0; }\n var isLockEnabled = sessionStoreStrategy.isLockEnabled, persistSession = sessionStoreStrategy.persistSession, expireSession = sessionStoreStrategy.expireSession;\n var persistWithLock = function (session) { return persistSession((0, polyfills_1.assign)({}, session, { lock: currentLock })); };\n var retrieveStore = function () {\n var session = sessionStoreStrategy.retrieveSession();\n var lock = session.lock;\n if (session.lock) {\n delete session.lock;\n }\n return {\n session: session,\n lock: lock,\n };\n };\n if (!ongoingOperations) {\n ongoingOperations = operations;\n }\n if (operations !== ongoingOperations) {\n bufferedOperations.push(operations);\n return;\n }\n if (isLockEnabled && numberOfRetries >= exports.LOCK_MAX_TRIES) {\n next(sessionStoreStrategy);\n return;\n }\n var currentLock;\n var currentStore = retrieveStore();\n if (isLockEnabled) {\n // if someone has lock, retry later\n if (currentStore.lock) {\n retryLater(operations, sessionStoreStrategy, numberOfRetries);\n return;\n }\n // acquire lock\n currentLock = (0, stringUtils_1.generateUUID)();\n persistWithLock(currentStore.session);\n // if lock is not acquired, retry later\n currentStore = retrieveStore();\n if (currentStore.lock !== currentLock) {\n retryLater(operations, sessionStoreStrategy, numberOfRetries);\n return;\n }\n }\n var processedSession = operations.process(currentStore.session);\n if (isLockEnabled) {\n // if lock corrupted after process, retry later\n currentStore = retrieveStore();\n if (currentStore.lock !== currentLock) {\n retryLater(operations, sessionStoreStrategy, numberOfRetries);\n return;\n }\n }\n if (processedSession) {\n if ((0, sessionState_1.isSessionInExpiredState)(processedSession)) {\n expireSession(processedSession);\n }\n else {\n (0, sessionState_1.expandSessionState)(processedSession);\n if (isLockEnabled) {\n persistWithLock(processedSession);\n }\n else {\n persistSession(processedSession);\n }\n }\n }\n if (isLockEnabled) {\n // correctly handle lock around expiration would require to handle this case properly at several levels\n // since we don't have evidence of lock issues around expiration, let's just not do the corruption check for it\n if (!(processedSession && (0, sessionState_1.isSessionInExpiredState)(processedSession))) {\n // if lock corrupted after persist, retry later\n currentStore = retrieveStore();\n if (currentStore.lock !== currentLock) {\n retryLater(operations, sessionStoreStrategy, numberOfRetries);\n return;\n }\n persistSession(currentStore.session);\n processedSession = currentStore.session;\n }\n }\n // call after even if session is not persisted in order to perform operations on\n // up-to-date session state value => the value could have been modified by another tab\n (_a = operations.after) === null || _a === void 0 ? void 0 : _a.call(operations, processedSession || currentStore.session);\n next(sessionStoreStrategy);\n}\nfunction retryLater(operations, sessionStore, currentNumberOfRetries) {\n (0, timer_1.setTimeout)(function () {\n processSessionStoreOperations(operations, sessionStore, currentNumberOfRetries + 1);\n }, exports.LOCK_RETRY_DELAY);\n}\nfunction next(sessionStore) {\n ongoingOperations = undefined;\n var nextOperations = bufferedOperations.shift();\n if (nextOperations) {\n processSessionStoreOperations(nextOperations, sessionStore);\n }\n}\n//# sourceMappingURL=sessionStoreOperations.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.selectCookieStrategy = selectCookieStrategy;\nexports.initCookieStrategy = initCookieStrategy;\nexports.buildCookieOptions = buildCookieOptions;\nvar browserDetection_1 = require(\"../../../tools/utils/browserDetection\");\nvar experimentalFeatures_1 = require(\"../../../tools/experimentalFeatures\");\nvar cookie_1 = require(\"../../../browser/cookie\");\nvar oldCookiesMigration_1 = require(\"../oldCookiesMigration\");\nvar sessionConstants_1 = require(\"../sessionConstants\");\nvar sessionState_1 = require(\"../sessionState\");\nvar sessionStoreStrategy_1 = require(\"./sessionStoreStrategy\");\nfunction selectCookieStrategy(initConfiguration) {\n var cookieOptions = buildCookieOptions(initConfiguration);\n return (0, cookie_1.areCookiesAuthorized)(cookieOptions) ? { type: sessionConstants_1.SessionPersistence.COOKIE, cookieOptions: cookieOptions } : undefined;\n}\nfunction initCookieStrategy(cookieOptions) {\n var cookieStore = {\n /**\n * Lock strategy allows mitigating issues due to concurrent access to cookie.\n * This issue concerns only chromium browsers and enabling this on firefox increases cookie write failures.\n */\n isLockEnabled: (0, browserDetection_1.isChromium)(),\n persistSession: persistSessionCookie(cookieOptions),\n retrieveSession: retrieveSessionCookie,\n expireSession: function (sessionState) { return expireSessionCookie(cookieOptions, sessionState); },\n };\n (0, oldCookiesMigration_1.tryOldCookiesMigration)(cookieStore);\n return cookieStore;\n}\nfunction persistSessionCookie(options) {\n return function (session) {\n (0, cookie_1.setCookie)(sessionStoreStrategy_1.SESSION_STORE_KEY, (0, sessionState_1.toSessionString)(session), sessionConstants_1.SESSION_EXPIRATION_DELAY, options);\n };\n}\nfunction expireSessionCookie(options, sessionState) {\n var expiredSessionState = (0, sessionState_1.getExpiredSessionState)(sessionState);\n (0, cookie_1.setCookie)(sessionStoreStrategy_1.SESSION_STORE_KEY, (0, sessionState_1.toSessionString)(expiredSessionState), (0, experimentalFeatures_1.isExperimentalFeatureEnabled)(experimentalFeatures_1.ExperimentalFeature.ANONYMOUS_USER_TRACKING)\n ? sessionConstants_1.SESSION_COOKIE_EXPIRATION_DELAY\n : sessionConstants_1.SESSION_TIME_OUT_DELAY, options);\n}\nfunction retrieveSessionCookie() {\n var sessionString = (0, cookie_1.getCookie)(sessionStoreStrategy_1.SESSION_STORE_KEY);\n var sessionState = (0, sessionState_1.toSessionState)(sessionString);\n return sessionState;\n}\nfunction buildCookieOptions(initConfiguration) {\n var cookieOptions = {};\n cookieOptions.secure =\n !!initConfiguration.useSecureSessionCookie ||\n !!initConfiguration.usePartitionedCrossSiteSessionCookie ||\n !!initConfiguration.useCrossSiteSessionCookie;\n cookieOptions.crossSite =\n !!initConfiguration.usePartitionedCrossSiteSessionCookie || !!initConfiguration.useCrossSiteSessionCookie;\n cookieOptions.partitioned = !!initConfiguration.usePartitionedCrossSiteSessionCookie;\n if (initConfiguration.trackSessionAcrossSubdomains) {\n cookieOptions.domain = (0, cookie_1.getCurrentSite)();\n }\n return cookieOptions;\n}\n//# sourceMappingURL=sessionInCookie.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.selectLocalStorageStrategy = selectLocalStorageStrategy;\nexports.initLocalStorageStrategy = initLocalStorageStrategy;\nvar stringUtils_1 = require(\"../../../tools/utils/stringUtils\");\nvar sessionConstants_1 = require(\"../sessionConstants\");\nvar sessionState_1 = require(\"../sessionState\");\nvar sessionStoreStrategy_1 = require(\"./sessionStoreStrategy\");\nvar LOCAL_STORAGE_TEST_KEY = '_dd_test_';\nfunction selectLocalStorageStrategy() {\n try {\n var id = (0, stringUtils_1.generateUUID)();\n var testKey = \"\".concat(LOCAL_STORAGE_TEST_KEY).concat(id);\n localStorage.setItem(testKey, id);\n var retrievedId = localStorage.getItem(testKey);\n localStorage.removeItem(testKey);\n return id === retrievedId ? { type: sessionConstants_1.SessionPersistence.LOCAL_STORAGE } : undefined;\n }\n catch (_a) {\n return undefined;\n }\n}\nfunction initLocalStorageStrategy() {\n return {\n isLockEnabled: false,\n persistSession: persistInLocalStorage,\n retrieveSession: retrieveSessionFromLocalStorage,\n expireSession: expireSessionFromLocalStorage,\n };\n}\nfunction persistInLocalStorage(sessionState) {\n localStorage.setItem(sessionStoreStrategy_1.SESSION_STORE_KEY, (0, sessionState_1.toSessionString)(sessionState));\n}\nfunction retrieveSessionFromLocalStorage() {\n var sessionString = localStorage.getItem(sessionStoreStrategy_1.SESSION_STORE_KEY);\n return (0, sessionState_1.toSessionState)(sessionString);\n}\nfunction expireSessionFromLocalStorage(previousSessionState) {\n persistInLocalStorage((0, sessionState_1.getExpiredSessionState)(previousSessionState));\n}\n//# sourceMappingURL=sessionInLocalStorage.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SESSION_STORE_KEY = void 0;\nexports.SESSION_STORE_KEY = '_dd_s';\n//# sourceMappingURL=sessionStoreStrategy.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SYNTHETICS_INJECTS_RUM_COOKIE_NAME = exports.SYNTHETICS_RESULT_ID_COOKIE_NAME = exports.SYNTHETICS_TEST_ID_COOKIE_NAME = void 0;\nexports.willSyntheticsInjectRum = willSyntheticsInjectRum;\nexports.getSyntheticsTestId = getSyntheticsTestId;\nexports.getSyntheticsResultId = getSyntheticsResultId;\nvar cookie_1 = require(\"../../browser/cookie\");\nexports.SYNTHETICS_TEST_ID_COOKIE_NAME = 'datadog-synthetics-public-id';\nexports.SYNTHETICS_RESULT_ID_COOKIE_NAME = 'datadog-synthetics-result-id';\nexports.SYNTHETICS_INJECTS_RUM_COOKIE_NAME = 'datadog-synthetics-injects-rum';\nfunction willSyntheticsInjectRum() {\n return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM || (0, cookie_1.getInitCookie)(exports.SYNTHETICS_INJECTS_RUM_COOKIE_NAME));\n}\nfunction getSyntheticsTestId() {\n var value = window._DATADOG_SYNTHETICS_PUBLIC_ID || (0, cookie_1.getInitCookie)(exports.SYNTHETICS_TEST_ID_COOKIE_NAME);\n return typeof value === 'string' ? value : undefined;\n}\nfunction getSyntheticsResultId() {\n var value = window._DATADOG_SYNTHETICS_RESULT_ID || (0, cookie_1.getInitCookie)(exports.SYNTHETICS_RESULT_ID_COOKIE_NAME);\n return typeof value === 'string' ? value : undefined;\n}\n//# sourceMappingURL=syntheticsWorkerValues.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.drainPreStartTelemetry = exports.addTelemetryUsage = exports.addTelemetryConfiguration = exports.isTelemetryReplicationAllowed = exports.startTelemetry = exports.resetTelemetry = exports.startFakeTelemetry = exports.addTelemetryError = exports.addTelemetryDebug = void 0;\nvar telemetry_1 = require(\"./telemetry\");\nObject.defineProperty(exports, \"addTelemetryDebug\", { enumerable: true, get: function () { return telemetry_1.addTelemetryDebug; } });\nObject.defineProperty(exports, \"addTelemetryError\", { enumerable: true, get: function () { return telemetry_1.addTelemetryError; } });\nObject.defineProperty(exports, \"startFakeTelemetry\", { enumerable: true, get: function () { return telemetry_1.startFakeTelemetry; } });\nObject.defineProperty(exports, \"resetTelemetry\", { enumerable: true, get: function () { return telemetry_1.resetTelemetry; } });\nObject.defineProperty(exports, \"startTelemetry\", { enumerable: true, get: function () { return telemetry_1.startTelemetry; } });\nObject.defineProperty(exports, \"isTelemetryReplicationAllowed\", { enumerable: true, get: function () { return telemetry_1.isTelemetryReplicationAllowed; } });\nObject.defineProperty(exports, \"addTelemetryConfiguration\", { enumerable: true, get: function () { return telemetry_1.addTelemetryConfiguration; } });\nObject.defineProperty(exports, \"addTelemetryUsage\", { enumerable: true, get: function () { return telemetry_1.addTelemetryUsage; } });\nObject.defineProperty(exports, \"drainPreStartTelemetry\", { enumerable: true, get: function () { return telemetry_1.drainPreStartTelemetry; } });\n__exportStar(require(\"./rawTelemetryEvent.types\"), exports);\n__exportStar(require(\"./telemetryEvent.types\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TelemetryType = void 0;\nexports.TelemetryType = {\n log: 'log',\n configuration: 'configuration',\n usage: 'usage',\n};\n//# sourceMappingURL=rawTelemetryEvent.types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startTelemetry = startTelemetry;\nexports.startFakeTelemetry = startFakeTelemetry;\nexports.drainPreStartTelemetry = drainPreStartTelemetry;\nexports.resetTelemetry = resetTelemetry;\nexports.isTelemetryReplicationAllowed = isTelemetryReplicationAllowed;\nexports.addTelemetryDebug = addTelemetryDebug;\nexports.addTelemetryError = addTelemetryError;\nexports.addTelemetryConfiguration = addTelemetryConfiguration;\nexports.addTelemetryUsage = addTelemetryUsage;\nexports.formatError = formatError;\nexports.scrubCustomerFrames = scrubCustomerFrames;\nvar display_1 = require(\"../../tools/display\");\nvar error_1 = require(\"../error/error\");\nvar handlingStack_1 = require(\"../../tools/stackTrace/handlingStack\");\nvar experimentalFeatures_1 = require(\"../../tools/experimentalFeatures\");\nvar configuration_1 = require(\"../configuration\");\nvar observable_1 = require(\"../../tools/observable\");\nvar timeUtils_1 = require(\"../../tools/utils/timeUtils\");\nvar monitor_1 = require(\"../../tools/monitor\");\nvar sendToExtension_1 = require(\"../../tools/sendToExtension\");\nvar polyfills_1 = require(\"../../tools/utils/polyfills\");\nvar numberUtils_1 = require(\"../../tools/utils/numberUtils\");\nvar jsonStringify_1 = require(\"../../tools/serialisation/jsonStringify\");\nvar mergeInto_1 = require(\"../../tools/mergeInto\");\nvar computeStackTrace_1 = require(\"../../tools/stackTrace/computeStackTrace\");\nvar connectivity_1 = require(\"../connectivity\");\nvar boundedBuffer_1 = require(\"../../tools/boundedBuffer\");\nvar rawTelemetryEvent_types_1 = require(\"./rawTelemetryEvent.types\");\nvar ALLOWED_FRAME_URLS = [\n 'https://www.datadoghq-browser-agent.com',\n 'https://www.datad0g-browser-agent.com',\n 'https://d3uc069fcn7uxw.cloudfront.net',\n 'https://d20xtzwzcl0ceb.cloudfront.net',\n 'http://localhost',\n '',\n];\nvar TELEMETRY_EXCLUDED_SITES = [configuration_1.INTAKE_SITE_US1_FED];\n// eslint-disable-next-line local-rules/disallow-side-effects\nvar preStartTelemetryBuffer = (0, boundedBuffer_1.createBoundedBuffer)();\nvar onRawTelemetryEventCollected = function (event) {\n preStartTelemetryBuffer.add(function () { return onRawTelemetryEventCollected(event); });\n};\nfunction startTelemetry(telemetryService, configuration) {\n var _a;\n var contextProvider;\n var observable = new observable_1.Observable();\n var alreadySentEvents = new Set();\n var telemetryEnabled = !(0, polyfills_1.includes)(TELEMETRY_EXCLUDED_SITES, configuration.site) && (0, numberUtils_1.performDraw)(configuration.telemetrySampleRate);\n var telemetryEnabledPerType = (_a = {},\n _a[rawTelemetryEvent_types_1.TelemetryType.log] = telemetryEnabled,\n _a[rawTelemetryEvent_types_1.TelemetryType.configuration] = telemetryEnabled && (0, numberUtils_1.performDraw)(configuration.telemetryConfigurationSampleRate),\n _a[rawTelemetryEvent_types_1.TelemetryType.usage] = telemetryEnabled && (0, numberUtils_1.performDraw)(configuration.telemetryUsageSampleRate),\n _a);\n var runtimeEnvInfo = getRuntimeEnvInfo();\n onRawTelemetryEventCollected = function (rawEvent) {\n var stringifiedEvent = (0, jsonStringify_1.jsonStringify)(rawEvent);\n if (telemetryEnabledPerType[rawEvent.type] &&\n alreadySentEvents.size < configuration.maxTelemetryEventsPerPage &&\n !alreadySentEvents.has(stringifiedEvent)) {\n var event_1 = toTelemetryEvent(telemetryService, rawEvent, runtimeEnvInfo);\n observable.notify(event_1);\n (0, sendToExtension_1.sendToExtension)('telemetry', event_1);\n alreadySentEvents.add(stringifiedEvent);\n }\n };\n (0, monitor_1.startMonitorErrorCollection)(addTelemetryError);\n function toTelemetryEvent(telemetryService, event, runtimeEnvInfo) {\n return (0, mergeInto_1.combine)({\n type: 'telemetry',\n date: (0, timeUtils_1.timeStampNow)(),\n service: telemetryService,\n version: \"5.35.0\",\n source: 'browser',\n _dd: {\n format_version: 2,\n },\n telemetry: (0, mergeInto_1.combine)(event, {\n runtime_env: runtimeEnvInfo,\n connectivity: (0, connectivity_1.getConnectivity)(),\n sdk_setup: \"npm\",\n }),\n experimental_features: (0, polyfills_1.arrayFrom)((0, experimentalFeatures_1.getExperimentalFeatures)()),\n }, contextProvider !== undefined ? contextProvider() : {});\n }\n return {\n setContextProvider: function (provider) {\n contextProvider = provider;\n },\n observable: observable,\n enabled: telemetryEnabled,\n };\n}\nfunction getRuntimeEnvInfo() {\n return {\n is_local_file: window.location.protocol === 'file:',\n is_worker: 'WorkerGlobalScope' in self,\n };\n}\nfunction startFakeTelemetry() {\n var events = [];\n onRawTelemetryEventCollected = function (event) {\n events.push(event);\n };\n return events;\n}\n// need to be called after telemetry context is provided and observers are registered\nfunction drainPreStartTelemetry() {\n preStartTelemetryBuffer.drain();\n}\nfunction resetTelemetry() {\n preStartTelemetryBuffer = (0, boundedBuffer_1.createBoundedBuffer)();\n onRawTelemetryEventCollected = function (event) {\n preStartTelemetryBuffer.add(function () { return onRawTelemetryEventCollected(event); });\n };\n}\n/**\n * Avoid mixing telemetry events from different data centers\n * but keep replicating staging events for reliability\n */\nfunction isTelemetryReplicationAllowed(configuration) {\n return configuration.site === configuration_1.INTAKE_SITE_STAGING;\n}\nfunction addTelemetryDebug(message, context) {\n (0, monitor_1.displayIfDebugEnabled)(display_1.ConsoleApiName.debug, message, context);\n onRawTelemetryEventCollected((0, polyfills_1.assign)({\n type: rawTelemetryEvent_types_1.TelemetryType.log,\n message: message,\n status: \"debug\" /* StatusType.debug */,\n }, context));\n}\nfunction addTelemetryError(e, context) {\n onRawTelemetryEventCollected((0, polyfills_1.assign)({\n type: rawTelemetryEvent_types_1.TelemetryType.log,\n status: \"error\" /* StatusType.error */,\n }, formatError(e), context));\n}\nfunction addTelemetryConfiguration(configuration) {\n onRawTelemetryEventCollected({\n type: rawTelemetryEvent_types_1.TelemetryType.configuration,\n configuration: configuration,\n });\n}\nfunction addTelemetryUsage(usage) {\n onRawTelemetryEventCollected({\n type: rawTelemetryEvent_types_1.TelemetryType.usage,\n usage: usage,\n });\n}\nfunction formatError(e) {\n if ((0, error_1.isError)(e)) {\n var stackTrace = (0, computeStackTrace_1.computeStackTrace)(e);\n return {\n error: {\n kind: stackTrace.name,\n stack: (0, handlingStack_1.toStackTraceString)(scrubCustomerFrames(stackTrace)),\n },\n message: stackTrace.message,\n };\n }\n return {\n error: {\n stack: error_1.NO_ERROR_STACK_PRESENT_MESSAGE,\n },\n message: \"\".concat(\"Uncaught\" /* NonErrorPrefix.UNCAUGHT */, \" \").concat((0, jsonStringify_1.jsonStringify)(e)),\n };\n}\nfunction scrubCustomerFrames(stackTrace) {\n stackTrace.stack = stackTrace.stack.filter(function (frame) { return !frame.url || ALLOWED_FRAME_URLS.some(function (allowedFrameUrl) { return (0, polyfills_1.startsWith)(frame.url, allowedFrameUrl); }); });\n return stackTrace;\n}\n//# sourceMappingURL=telemetry.js.map","\"use strict\";\n/* eslint-disable */\n/**\n * DO NOT MODIFY IT BY HAND. Run `yarn rum-events-format:sync` instead.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=telemetryEvent.types.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TrackingConsent = void 0;\nexports.createTrackingConsentState = createTrackingConsentState;\nvar observable_1 = require(\"../tools/observable\");\nexports.TrackingConsent = {\n GRANTED: 'granted',\n NOT_GRANTED: 'not-granted',\n};\nfunction createTrackingConsentState(currentConsent) {\n var observable = new observable_1.Observable();\n return {\n tryToInit: function (trackingConsent) {\n if (!currentConsent) {\n currentConsent = trackingConsent;\n }\n },\n update: function (trackingConsent) {\n currentConsent = trackingConsent;\n observable.notify();\n },\n isGranted: function () {\n return currentConsent === exports.TrackingConsent.GRANTED;\n },\n observable: observable,\n };\n}\n//# sourceMappingURL=trackingConsent.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./user.types\"), exports);\n__exportStar(require(\"./user\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sanitizeUser = sanitizeUser;\nexports.checkUser = checkUser;\nexports.generateAnonymousId = generateAnonymousId;\nvar display_1 = require(\"../../tools/display\");\nvar typeUtils_1 = require(\"../../tools/utils/typeUtils\");\nvar polyfills_1 = require(\"../../tools/utils/polyfills\");\n/**\n * Clone input data and ensure known user properties (id, name, email)\n * are strings, as defined here:\n * https://docs.datadoghq.com/logs/log_configuration/attributes_naming_convention/#user-related-attributes\n */\nfunction sanitizeUser(newUser) {\n // We shallow clone only to prevent mutation of user data.\n var user = (0, polyfills_1.assign)({}, newUser);\n var keys = ['id', 'name', 'email'];\n keys.forEach(function (key) {\n if (key in user) {\n /* eslint-disable @typescript-eslint/no-base-to-string */\n user[key] = String(user[key]);\n }\n });\n return user;\n}\n/**\n * Simple check to ensure user is valid\n */\nfunction checkUser(newUser) {\n var isValid = (0, typeUtils_1.getType)(newUser) === 'object';\n if (!isValid) {\n display_1.display.error('Unsupported user:', newUser);\n }\n return isValid;\n}\nfunction generateAnonymousId() {\n return Math.floor(Math.random() * Math.pow(2, 53)).toString(36);\n}\n//# sourceMappingURL=user.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=user.types.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createFlushController = exports.startBatchWithReplica = exports.bridgeSupports = exports.getEventBridge = exports.canUseEventBridge = exports.createHttpRequest = exports.SessionPersistence = exports.SESSION_TIME_OUT_DELAY = exports.stopSessionManager = exports.startSessionManager = exports.Observable = exports.setDebugMode = exports.callMonitored = exports.monitor = exports.monitored = exports.drainPreStartTelemetry = exports.addTelemetryUsage = exports.addTelemetryConfiguration = exports.isTelemetryReplicationAllowed = exports.resetTelemetry = exports.startFakeTelemetry = exports.addTelemetryError = exports.addTelemetryDebug = exports.startTelemetry = exports.RawReportType = exports.initReportObservable = exports.displayAlreadyInitializedError = exports.makePublicApi = exports.defineGlobal = exports.computeStackTrace = exports.trackRuntimeError = exports.ExperimentalFeature = exports.initFeatureFlags = exports.getExperimentalFeatures = exports.resetExperimentalFeatures = exports.addExperimentalFeatures = exports.isExperimentalFeatureEnabled = exports.createTrackingConsentState = exports.TrackingConsent = exports.isIntakeUrl = exports.INTAKE_URL_PARAMETERS = exports.INTAKE_SITE_EU1 = exports.INTAKE_SITE_US1_FED = exports.INTAKE_SITE_US1 = exports.INTAKE_SITE_STAGING = exports.isSampleRate = exports.serializeConfiguration = exports.TraceContextInjection = exports.DefaultPrivacyLevel = exports.validateAndBuildConfiguration = void 0;\nexports.ErrorSource = exports.sanitizeUser = exports.checkUser = exports.getSyntheticsResultId = exports.getSyntheticsTestId = exports.willSyntheticsInjectRum = exports.SESSION_STORE_KEY = exports.STORAGE_POLL_DELAY = exports.readBytesFromStream = exports.CLEAR_OLD_VALUES_INTERVAL = exports.createValueHistory = exports.CUSTOMER_DATA_BYTES_LIMIT = exports.createCustomerDataTracker = exports.createCustomerDataTrackerManager = exports.removeStorageListeners = exports.storeContextManager = exports.createContextManager = exports.catchUserErrors = exports.createBoundedBuffer = exports.resetConsoleObservable = exports.initConsoleObservable = exports.isPageExitReason = exports.PageExitReason = exports.createPageExitObservable = exports.resetFetchObservable = exports.initFetchObservable = exports.initXhrObservable = exports.generateAnonymousId = exports.resetInitCookies = exports.deleteCookie = exports.setCookie = exports.getInitCookie = exports.getCookie = exports.areCookiesAuthorized = exports.NO_ERROR_STACK_PRESENT_MESSAGE = exports.isError = exports.getFileFromStackTraceString = exports.computeRawError = exports.instrumentSetter = exports.instrumentMethod = exports.getZoneJsOriginalValue = exports.runOnReadyState = exports.sendToExtension = exports.AbstractLifeCycle = exports.createIdentityEncoder = void 0;\nvar configuration_1 = require(\"./domain/configuration\");\nObject.defineProperty(exports, \"validateAndBuildConfiguration\", { enumerable: true, get: function () { return configuration_1.validateAndBuildConfiguration; } });\nObject.defineProperty(exports, \"DefaultPrivacyLevel\", { enumerable: true, get: function () { return configuration_1.DefaultPrivacyLevel; } });\nObject.defineProperty(exports, \"TraceContextInjection\", { enumerable: true, get: function () { return configuration_1.TraceContextInjection; } });\nObject.defineProperty(exports, \"serializeConfiguration\", { enumerable: true, get: function () { return configuration_1.serializeConfiguration; } });\nObject.defineProperty(exports, \"isSampleRate\", { enumerable: true, get: function () { return configuration_1.isSampleRate; } });\nObject.defineProperty(exports, \"INTAKE_SITE_STAGING\", { enumerable: true, get: function () { return configuration_1.INTAKE_SITE_STAGING; } });\nObject.defineProperty(exports, \"INTAKE_SITE_US1\", { enumerable: true, get: function () { return configuration_1.INTAKE_SITE_US1; } });\nObject.defineProperty(exports, \"INTAKE_SITE_US1_FED\", { enumerable: true, get: function () { return configuration_1.INTAKE_SITE_US1_FED; } });\nObject.defineProperty(exports, \"INTAKE_SITE_EU1\", { enumerable: true, get: function () { return configuration_1.INTAKE_SITE_EU1; } });\nObject.defineProperty(exports, \"INTAKE_URL_PARAMETERS\", { enumerable: true, get: function () { return configuration_1.INTAKE_URL_PARAMETERS; } });\nObject.defineProperty(exports, \"isIntakeUrl\", { enumerable: true, get: function () { return configuration_1.isIntakeUrl; } });\nvar trackingConsent_1 = require(\"./domain/trackingConsent\");\nObject.defineProperty(exports, \"TrackingConsent\", { enumerable: true, get: function () { return trackingConsent_1.TrackingConsent; } });\nObject.defineProperty(exports, \"createTrackingConsentState\", { enumerable: true, get: function () { return trackingConsent_1.createTrackingConsentState; } });\nvar experimentalFeatures_1 = require(\"./tools/experimentalFeatures\");\nObject.defineProperty(exports, \"isExperimentalFeatureEnabled\", { enumerable: true, get: function () { return experimentalFeatures_1.isExperimentalFeatureEnabled; } });\nObject.defineProperty(exports, \"addExperimentalFeatures\", { enumerable: true, get: function () { return experimentalFeatures_1.addExperimentalFeatures; } });\nObject.defineProperty(exports, \"resetExperimentalFeatures\", { enumerable: true, get: function () { return experimentalFeatures_1.resetExperimentalFeatures; } });\nObject.defineProperty(exports, \"getExperimentalFeatures\", { enumerable: true, get: function () { return experimentalFeatures_1.getExperimentalFeatures; } });\nObject.defineProperty(exports, \"initFeatureFlags\", { enumerable: true, get: function () { return experimentalFeatures_1.initFeatureFlags; } });\nObject.defineProperty(exports, \"ExperimentalFeature\", { enumerable: true, get: function () { return experimentalFeatures_1.ExperimentalFeature; } });\nvar trackRuntimeError_1 = require(\"./domain/error/trackRuntimeError\");\nObject.defineProperty(exports, \"trackRuntimeError\", { enumerable: true, get: function () { return trackRuntimeError_1.trackRuntimeError; } });\nvar computeStackTrace_1 = require(\"./tools/stackTrace/computeStackTrace\");\nObject.defineProperty(exports, \"computeStackTrace\", { enumerable: true, get: function () { return computeStackTrace_1.computeStackTrace; } });\nvar init_1 = require(\"./boot/init\");\nObject.defineProperty(exports, \"defineGlobal\", { enumerable: true, get: function () { return init_1.defineGlobal; } });\nObject.defineProperty(exports, \"makePublicApi\", { enumerable: true, get: function () { return init_1.makePublicApi; } });\nvar displayAlreadyInitializedError_1 = require(\"./boot/displayAlreadyInitializedError\");\nObject.defineProperty(exports, \"displayAlreadyInitializedError\", { enumerable: true, get: function () { return displayAlreadyInitializedError_1.displayAlreadyInitializedError; } });\nvar reportObservable_1 = require(\"./domain/report/reportObservable\");\nObject.defineProperty(exports, \"initReportObservable\", { enumerable: true, get: function () { return reportObservable_1.initReportObservable; } });\nObject.defineProperty(exports, \"RawReportType\", { enumerable: true, get: function () { return reportObservable_1.RawReportType; } });\nvar telemetry_1 = require(\"./domain/telemetry\");\nObject.defineProperty(exports, \"startTelemetry\", { enumerable: true, get: function () { return telemetry_1.startTelemetry; } });\nObject.defineProperty(exports, \"addTelemetryDebug\", { enumerable: true, get: function () { return telemetry_1.addTelemetryDebug; } });\nObject.defineProperty(exports, \"addTelemetryError\", { enumerable: true, get: function () { return telemetry_1.addTelemetryError; } });\nObject.defineProperty(exports, \"startFakeTelemetry\", { enumerable: true, get: function () { return telemetry_1.startFakeTelemetry; } });\nObject.defineProperty(exports, \"resetTelemetry\", { enumerable: true, get: function () { return telemetry_1.resetTelemetry; } });\nObject.defineProperty(exports, \"isTelemetryReplicationAllowed\", { enumerable: true, get: function () { return telemetry_1.isTelemetryReplicationAllowed; } });\nObject.defineProperty(exports, \"addTelemetryConfiguration\", { enumerable: true, get: function () { return telemetry_1.addTelemetryConfiguration; } });\nObject.defineProperty(exports, \"addTelemetryUsage\", { enumerable: true, get: function () { return telemetry_1.addTelemetryUsage; } });\nObject.defineProperty(exports, \"drainPreStartTelemetry\", { enumerable: true, get: function () { return telemetry_1.drainPreStartTelemetry; } });\nvar monitor_1 = require(\"./tools/monitor\");\nObject.defineProperty(exports, \"monitored\", { enumerable: true, get: function () { return monitor_1.monitored; } });\nObject.defineProperty(exports, \"monitor\", { enumerable: true, get: function () { return monitor_1.monitor; } });\nObject.defineProperty(exports, \"callMonitored\", { enumerable: true, get: function () { return monitor_1.callMonitored; } });\nObject.defineProperty(exports, \"setDebugMode\", { enumerable: true, get: function () { return monitor_1.setDebugMode; } });\nvar observable_1 = require(\"./tools/observable\");\nObject.defineProperty(exports, \"Observable\", { enumerable: true, get: function () { return observable_1.Observable; } });\nvar sessionManager_1 = require(\"./domain/session/sessionManager\");\nObject.defineProperty(exports, \"startSessionManager\", { enumerable: true, get: function () { return sessionManager_1.startSessionManager; } });\n// Exposed for tests\nObject.defineProperty(exports, \"stopSessionManager\", { enumerable: true, get: function () { return sessionManager_1.stopSessionManager; } });\nvar sessionConstants_1 = require(\"./domain/session/sessionConstants\");\nObject.defineProperty(exports, \"SESSION_TIME_OUT_DELAY\", { enumerable: true, get: function () { return sessionConstants_1.SESSION_TIME_OUT_DELAY; } });\nObject.defineProperty(exports, \"SessionPersistence\", { enumerable: true, get: function () { return sessionConstants_1.SessionPersistence; } });\nvar transport_1 = require(\"./transport\");\nObject.defineProperty(exports, \"createHttpRequest\", { enumerable: true, get: function () { return transport_1.createHttpRequest; } });\nObject.defineProperty(exports, \"canUseEventBridge\", { enumerable: true, get: function () { return transport_1.canUseEventBridge; } });\nObject.defineProperty(exports, \"getEventBridge\", { enumerable: true, get: function () { return transport_1.getEventBridge; } });\nObject.defineProperty(exports, \"bridgeSupports\", { enumerable: true, get: function () { return transport_1.bridgeSupports; } });\nObject.defineProperty(exports, \"startBatchWithReplica\", { enumerable: true, get: function () { return transport_1.startBatchWithReplica; } });\nObject.defineProperty(exports, \"createFlushController\", { enumerable: true, get: function () { return transport_1.createFlushController; } });\n__exportStar(require(\"./tools/display\"), exports);\nvar encoder_1 = require(\"./tools/encoder\");\nObject.defineProperty(exports, \"createIdentityEncoder\", { enumerable: true, get: function () { return encoder_1.createIdentityEncoder; } });\n__exportStar(require(\"./tools/utils/urlPolyfill\"), exports);\n__exportStar(require(\"./tools/utils/timeUtils\"), exports);\n__exportStar(require(\"./tools/utils/arrayUtils\"), exports);\n__exportStar(require(\"./tools/serialisation/sanitize\"), exports);\n__exportStar(require(\"./tools/getGlobalObject\"), exports);\nvar abstractLifeCycle_1 = require(\"./tools/abstractLifeCycle\");\nObject.defineProperty(exports, \"AbstractLifeCycle\", { enumerable: true, get: function () { return abstractLifeCycle_1.AbstractLifeCycle; } });\n__exportStar(require(\"./domain/eventRateLimiter/createEventRateLimiter\"), exports);\n__exportStar(require(\"./tools/utils/browserDetection\"), exports);\nvar sendToExtension_1 = require(\"./tools/sendToExtension\");\nObject.defineProperty(exports, \"sendToExtension\", { enumerable: true, get: function () { return sendToExtension_1.sendToExtension; } });\nvar runOnReadyState_1 = require(\"./browser/runOnReadyState\");\nObject.defineProperty(exports, \"runOnReadyState\", { enumerable: true, get: function () { return runOnReadyState_1.runOnReadyState; } });\nvar getZoneJsOriginalValue_1 = require(\"./tools/getZoneJsOriginalValue\");\nObject.defineProperty(exports, \"getZoneJsOriginalValue\", { enumerable: true, get: function () { return getZoneJsOriginalValue_1.getZoneJsOriginalValue; } });\nvar instrumentMethod_1 = require(\"./tools/instrumentMethod\");\nObject.defineProperty(exports, \"instrumentMethod\", { enumerable: true, get: function () { return instrumentMethod_1.instrumentMethod; } });\nObject.defineProperty(exports, \"instrumentSetter\", { enumerable: true, get: function () { return instrumentMethod_1.instrumentSetter; } });\nvar error_1 = require(\"./domain/error/error\");\nObject.defineProperty(exports, \"computeRawError\", { enumerable: true, get: function () { return error_1.computeRawError; } });\nObject.defineProperty(exports, \"getFileFromStackTraceString\", { enumerable: true, get: function () { return error_1.getFileFromStackTraceString; } });\nObject.defineProperty(exports, \"isError\", { enumerable: true, get: function () { return error_1.isError; } });\nObject.defineProperty(exports, \"NO_ERROR_STACK_PRESENT_MESSAGE\", { enumerable: true, get: function () { return error_1.NO_ERROR_STACK_PRESENT_MESSAGE; } });\nvar cookie_1 = require(\"./browser/cookie\");\nObject.defineProperty(exports, \"areCookiesAuthorized\", { enumerable: true, get: function () { return cookie_1.areCookiesAuthorized; } });\nObject.defineProperty(exports, \"getCookie\", { enumerable: true, get: function () { return cookie_1.getCookie; } });\nObject.defineProperty(exports, \"getInitCookie\", { enumerable: true, get: function () { return cookie_1.getInitCookie; } });\nObject.defineProperty(exports, \"setCookie\", { enumerable: true, get: function () { return cookie_1.setCookie; } });\nObject.defineProperty(exports, \"deleteCookie\", { enumerable: true, get: function () { return cookie_1.deleteCookie; } });\nObject.defineProperty(exports, \"resetInitCookies\", { enumerable: true, get: function () { return cookie_1.resetInitCookies; } });\nvar user_1 = require(\"./domain/user\");\nObject.defineProperty(exports, \"generateAnonymousId\", { enumerable: true, get: function () { return user_1.generateAnonymousId; } });\nvar xhrObservable_1 = require(\"./browser/xhrObservable\");\nObject.defineProperty(exports, \"initXhrObservable\", { enumerable: true, get: function () { return xhrObservable_1.initXhrObservable; } });\nvar fetchObservable_1 = require(\"./browser/fetchObservable\");\nObject.defineProperty(exports, \"initFetchObservable\", { enumerable: true, get: function () { return fetchObservable_1.initFetchObservable; } });\nObject.defineProperty(exports, \"resetFetchObservable\", { enumerable: true, get: function () { return fetchObservable_1.resetFetchObservable; } });\nvar pageExitObservable_1 = require(\"./browser/pageExitObservable\");\nObject.defineProperty(exports, \"createPageExitObservable\", { enumerable: true, get: function () { return pageExitObservable_1.createPageExitObservable; } });\nObject.defineProperty(exports, \"PageExitReason\", { enumerable: true, get: function () { return pageExitObservable_1.PageExitReason; } });\nObject.defineProperty(exports, \"isPageExitReason\", { enumerable: true, get: function () { return pageExitObservable_1.isPageExitReason; } });\n__exportStar(require(\"./browser/addEventListener\"), exports);\nvar requestIdleCallback_1 = require(\"./tools/requestIdleCallback\");\nObject.defineProperty(exports, \"requestIdleCallback\", { enumerable: true, get: function () { return requestIdleCallback_1.requestIdleCallback; } });\n__exportStar(require(\"./tools/taskQueue\"), exports);\n__exportStar(require(\"./tools/timer\"), exports);\nvar consoleObservable_1 = require(\"./domain/console/consoleObservable\");\nObject.defineProperty(exports, \"initConsoleObservable\", { enumerable: true, get: function () { return consoleObservable_1.initConsoleObservable; } });\nObject.defineProperty(exports, \"resetConsoleObservable\", { enumerable: true, get: function () { return consoleObservable_1.resetConsoleObservable; } });\nvar boundedBuffer_1 = require(\"./tools/boundedBuffer\");\nObject.defineProperty(exports, \"createBoundedBuffer\", { enumerable: true, get: function () { return boundedBuffer_1.createBoundedBuffer; } });\nvar catchUserErrors_1 = require(\"./tools/catchUserErrors\");\nObject.defineProperty(exports, \"catchUserErrors\", { enumerable: true, get: function () { return catchUserErrors_1.catchUserErrors; } });\nvar contextManager_1 = require(\"./domain/context/contextManager\");\nObject.defineProperty(exports, \"createContextManager\", { enumerable: true, get: function () { return contextManager_1.createContextManager; } });\nvar storeContextManager_1 = require(\"./domain/context/storeContextManager\");\nObject.defineProperty(exports, \"storeContextManager\", { enumerable: true, get: function () { return storeContextManager_1.storeContextManager; } });\nObject.defineProperty(exports, \"removeStorageListeners\", { enumerable: true, get: function () { return storeContextManager_1.removeStorageListeners; } });\nvar customerDataTracker_1 = require(\"./domain/context/customerDataTracker\");\nObject.defineProperty(exports, \"createCustomerDataTrackerManager\", { enumerable: true, get: function () { return customerDataTracker_1.createCustomerDataTrackerManager; } });\nObject.defineProperty(exports, \"createCustomerDataTracker\", { enumerable: true, get: function () { return customerDataTracker_1.createCustomerDataTracker; } });\nObject.defineProperty(exports, \"CUSTOMER_DATA_BYTES_LIMIT\", { enumerable: true, get: function () { return customerDataTracker_1.CUSTOMER_DATA_BYTES_LIMIT; } });\nvar valueHistory_1 = require(\"./tools/valueHistory\");\nObject.defineProperty(exports, \"createValueHistory\", { enumerable: true, get: function () { return valueHistory_1.createValueHistory; } });\nObject.defineProperty(exports, \"CLEAR_OLD_VALUES_INTERVAL\", { enumerable: true, get: function () { return valueHistory_1.CLEAR_OLD_VALUES_INTERVAL; } });\nvar readBytesFromStream_1 = require(\"./tools/readBytesFromStream\");\nObject.defineProperty(exports, \"readBytesFromStream\", { enumerable: true, get: function () { return readBytesFromStream_1.readBytesFromStream; } });\nvar sessionStore_1 = require(\"./domain/session/sessionStore\");\nObject.defineProperty(exports, \"STORAGE_POLL_DELAY\", { enumerable: true, get: function () { return sessionStore_1.STORAGE_POLL_DELAY; } });\nvar sessionStoreStrategy_1 = require(\"./domain/session/storeStrategies/sessionStoreStrategy\");\nObject.defineProperty(exports, \"SESSION_STORE_KEY\", { enumerable: true, get: function () { return sessionStoreStrategy_1.SESSION_STORE_KEY; } });\nvar syntheticsWorkerValues_1 = require(\"./domain/synthetics/syntheticsWorkerValues\");\nObject.defineProperty(exports, \"willSyntheticsInjectRum\", { enumerable: true, get: function () { return syntheticsWorkerValues_1.willSyntheticsInjectRum; } });\nObject.defineProperty(exports, \"getSyntheticsTestId\", { enumerable: true, get: function () { return syntheticsWorkerValues_1.getSyntheticsTestId; } });\nObject.defineProperty(exports, \"getSyntheticsResultId\", { enumerable: true, get: function () { return syntheticsWorkerValues_1.getSyntheticsResultId; } });\nvar user_2 = require(\"./domain/user\");\nObject.defineProperty(exports, \"checkUser\", { enumerable: true, get: function () { return user_2.checkUser; } });\nObject.defineProperty(exports, \"sanitizeUser\", { enumerable: true, get: function () { return user_2.sanitizeUser; } });\n__exportStar(require(\"./domain/resourceUtils\"), exports);\n__exportStar(require(\"./tools/utils/polyfills\"), exports);\n__exportStar(require(\"./tools/utils/numberUtils\"), exports);\n__exportStar(require(\"./tools/utils/byteUtils\"), exports);\n__exportStar(require(\"./tools/utils/objectUtils\"), exports);\n__exportStar(require(\"./tools/utils/functionUtils\"), exports);\n__exportStar(require(\"./tools/serialisation/jsonStringify\"), exports);\n__exportStar(require(\"./tools/mergeInto\"), exports);\n__exportStar(require(\"./tools/utils/stringUtils\"), exports);\n__exportStar(require(\"./tools/matchOption\"), exports);\n__exportStar(require(\"./tools/utils/responseUtils\"), exports);\n__exportStar(require(\"./tools/utils/typeUtils\"), exports);\nvar error_types_1 = require(\"./domain/error/error.types\");\nObject.defineProperty(exports, \"ErrorSource\", { enumerable: true, get: function () { return error_types_1.ErrorSource; } });\n__exportStar(require(\"./domain/deflate\"), exports);\n__exportStar(require(\"./domain/connectivity\"), exports);\n__exportStar(require(\"./tools/stackTrace/handlingStack\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AbstractLifeCycle = void 0;\n// eslint-disable-next-line no-restricted-syntax\nvar AbstractLifeCycle = /** @class */ (function () {\n function AbstractLifeCycle() {\n this.callbacks = {};\n }\n AbstractLifeCycle.prototype.notify = function (eventType, data) {\n var eventCallbacks = this.callbacks[eventType];\n if (eventCallbacks) {\n eventCallbacks.forEach(function (callback) { return callback(data); });\n }\n };\n AbstractLifeCycle.prototype.subscribe = function (eventType, callback) {\n var _this = this;\n if (!this.callbacks[eventType]) {\n this.callbacks[eventType] = [];\n }\n this.callbacks[eventType].push(callback);\n return {\n unsubscribe: function () {\n _this.callbacks[eventType] = _this.callbacks[eventType].filter(function (other) { return callback !== other; });\n },\n };\n };\n return AbstractLifeCycle;\n}());\nexports.AbstractLifeCycle = AbstractLifeCycle;\n//# sourceMappingURL=abstractLifeCycle.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createBoundedBuffer = createBoundedBuffer;\nvar arrayUtils_1 = require(\"./utils/arrayUtils\");\nvar BUFFER_LIMIT = 500;\nfunction createBoundedBuffer() {\n var buffer = [];\n var add = function (callback) {\n var length = buffer.push(callback);\n if (length > BUFFER_LIMIT) {\n buffer.splice(0, 1);\n }\n };\n var remove = function (callback) {\n (0, arrayUtils_1.removeItem)(buffer, callback);\n };\n var drain = function (arg) {\n buffer.forEach(function (callback) { return callback(arg); });\n buffer.length = 0;\n };\n return {\n add: add,\n remove: remove,\n drain: drain,\n };\n}\n//# sourceMappingURL=boundedBuffer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.catchUserErrors = catchUserErrors;\nvar display_1 = require(\"./display\");\nfunction catchUserErrors(fn, errorMsg) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n try {\n return fn.apply(void 0, args);\n }\n catch (err) {\n display_1.display.error(errorMsg, err);\n }\n };\n}\n//# sourceMappingURL=catchUserErrors.js.map","\"use strict\";\n/* eslint-disable local-rules/disallow-side-effects */\n/**\n * Keep references on console methods to avoid triggering patched behaviors\n *\n * NB: in some setup, console could already be patched by another SDK.\n * In this case, some display messages can be sent by the other SDK\n * but we should be safe from infinite loop nonetheless.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MORE_DETAILS = exports.DOCS_TROUBLESHOOTING = exports.DOCS_ORIGIN = exports.display = exports.originalConsoleMethods = exports.globalConsole = exports.ConsoleApiName = void 0;\nexports.ConsoleApiName = {\n log: 'log',\n debug: 'debug',\n info: 'info',\n warn: 'warn',\n error: 'error',\n};\n/**\n * When building JS bundles, some users might use a plugin[1] or configuration[2] to remove\n * \"console.*\" references. This causes some issue as we expect `console.*` to be defined.\n * As a workaround, let's use a variable alias, so those expressions won't be taken into account by\n * simple static analysis.\n *\n * [1]: https://babeljs.io/docs/babel-plugin-transform-remove-console/\n * [2]: https://github.com/terser/terser#compress-options (look for drop_console)\n */\nexports.globalConsole = console;\nexports.originalConsoleMethods = {};\nObject.keys(exports.ConsoleApiName).forEach(function (name) {\n exports.originalConsoleMethods[name] = exports.globalConsole[name];\n});\nvar PREFIX = 'Datadog Browser SDK:';\nexports.display = {\n debug: exports.originalConsoleMethods.debug.bind(exports.globalConsole, PREFIX),\n log: exports.originalConsoleMethods.log.bind(exports.globalConsole, PREFIX),\n info: exports.originalConsoleMethods.info.bind(exports.globalConsole, PREFIX),\n warn: exports.originalConsoleMethods.warn.bind(exports.globalConsole, PREFIX),\n error: exports.originalConsoleMethods.error.bind(exports.globalConsole, PREFIX),\n};\nexports.DOCS_ORIGIN = 'https://docs.datadoghq.com';\nexports.DOCS_TROUBLESHOOTING = \"\".concat(exports.DOCS_ORIGIN, \"/real_user_monitoring/browser/troubleshooting\");\nexports.MORE_DETAILS = 'More details:';\n//# sourceMappingURL=display.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createIdentityEncoder = createIdentityEncoder;\nvar byteUtils_1 = require(\"./utils/byteUtils\");\nfunction createIdentityEncoder() {\n var output = '';\n var outputBytesCount = 0;\n return {\n isAsync: false,\n get isEmpty() {\n return !output;\n },\n write: function (data, callback) {\n var additionalEncodedBytesCount = (0, byteUtils_1.computeBytesCount)(data);\n outputBytesCount += additionalEncodedBytesCount;\n output += data;\n if (callback) {\n callback(additionalEncodedBytesCount);\n }\n },\n finish: function (callback) {\n callback(this.finishSync());\n },\n finishSync: function () {\n var result = {\n output: output,\n outputBytesCount: outputBytesCount,\n rawBytesCount: outputBytesCount,\n pendingData: '',\n };\n output = '';\n outputBytesCount = 0;\n return result;\n },\n estimateEncodedBytesCount: function (data) {\n return data.length;\n },\n };\n}\n//# sourceMappingURL=encoder.js.map","\"use strict\";\n/**\n * LIMITATION:\n * For NPM setup, this feature flag singleton is shared between RUM and Logs product.\n * This means that an experimental flag set on the RUM product will be set on the Logs product.\n * So keep in mind that in certain configurations, your experimental feature flag may affect other products.\n *\n * FORMAT:\n * All feature flags should be snake_cased\n */\n// We want to use a real enum (i.e. not a const enum) here, to be able to check whether an arbitrary\n// string is an expected feature flag\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ExperimentalFeature = void 0;\nexports.initFeatureFlags = initFeatureFlags;\nexports.addExperimentalFeatures = addExperimentalFeatures;\nexports.isExperimentalFeatureEnabled = isExperimentalFeatureEnabled;\nexports.resetExperimentalFeatures = resetExperimentalFeatures;\nexports.getExperimentalFeatures = getExperimentalFeatures;\nvar objectUtils_1 = require(\"./utils/objectUtils\");\n// eslint-disable-next-line no-restricted-syntax\nvar ExperimentalFeature;\n(function (ExperimentalFeature) {\n ExperimentalFeature[\"WRITABLE_RESOURCE_GRAPHQL\"] = \"writable_resource_graphql\";\n ExperimentalFeature[\"REMOTE_CONFIGURATION\"] = \"remote_configuration\";\n ExperimentalFeature[\"LONG_ANIMATION_FRAME\"] = \"long_animation_frame\";\n ExperimentalFeature[\"ANONYMOUS_USER_TRACKING\"] = \"anonymous_user_tracking\";\n ExperimentalFeature[\"ACTION_NAME_MASKING\"] = \"action_name_masking\";\n ExperimentalFeature[\"CONSISTENT_TRACE_SAMPLING\"] = \"consistent_trace_sampling\";\n ExperimentalFeature[\"DELAY_VIEWPORT_COLLECTION\"] = \"delay_viewport_collection\";\n})(ExperimentalFeature || (exports.ExperimentalFeature = ExperimentalFeature = {}));\nvar enabledExperimentalFeatures = new Set();\nfunction initFeatureFlags(enableExperimentalFeatures) {\n if (Array.isArray(enableExperimentalFeatures)) {\n addExperimentalFeatures(enableExperimentalFeatures.filter(function (flag) {\n return (0, objectUtils_1.objectHasValue)(ExperimentalFeature, flag);\n }));\n }\n}\nfunction addExperimentalFeatures(enabledFeatures) {\n enabledFeatures.forEach(function (flag) {\n enabledExperimentalFeatures.add(flag);\n });\n}\nfunction isExperimentalFeatureEnabled(featureName) {\n return enabledExperimentalFeatures.has(featureName);\n}\nfunction resetExperimentalFeatures() {\n enabledExperimentalFeatures.clear();\n}\nfunction getExperimentalFeatures() {\n return enabledExperimentalFeatures;\n}\n//# sourceMappingURL=experimentalFeatures.js.map","\"use strict\";\n/**\n * inspired by https://mathiasbynens.be/notes/globalthis\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getGlobalObject = getGlobalObject;\nfunction getGlobalObject() {\n if (typeof globalThis === 'object') {\n return globalThis;\n }\n Object.defineProperty(Object.prototype, '_dd_temp_', {\n get: function () {\n return this;\n },\n configurable: true,\n });\n // @ts-ignore _dd_temp is defined using defineProperty\n var globalObject = _dd_temp_;\n // @ts-ignore _dd_temp is defined using defineProperty\n delete Object.prototype._dd_temp_;\n if (typeof globalObject !== 'object') {\n // on safari _dd_temp_ is available on window but not globally\n // fallback on other browser globals check\n if (typeof self === 'object') {\n globalObject = self;\n }\n else if (typeof window === 'object') {\n globalObject = window;\n }\n else {\n globalObject = {};\n }\n }\n return globalObject;\n}\n//# sourceMappingURL=getGlobalObject.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getZoneJsOriginalValue = getZoneJsOriginalValue;\nvar getGlobalObject_1 = require(\"./getGlobalObject\");\n/**\n * Gets the original value for a DOM API that was potentially patched by Zone.js.\n *\n * Zone.js[1] is a library that patches a bunch of JS and DOM APIs. It usually stores the original\n * value of the patched functions/constructors/methods in a hidden property prefixed by\n * __zone_symbol__.\n *\n * In multiple occasions, we observed that Zone.js is the culprit of important issues leading to\n * browser resource exhaustion (memory leak, high CPU usage). This method is used as a workaround to\n * use the original DOM API instead of the one patched by Zone.js.\n *\n * [1]: https://github.com/angular/angular/tree/main/packages/zone.js\n */\nfunction getZoneJsOriginalValue(target, name) {\n var browserWindow = (0, getGlobalObject_1.getGlobalObject)();\n var original;\n if (browserWindow.Zone && typeof browserWindow.Zone.__symbol__ === 'function') {\n original = target[browserWindow.Zone.__symbol__(name)];\n }\n if (!original) {\n original = target[name];\n }\n return original;\n}\n//# sourceMappingURL=getZoneJsOriginalValue.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.instrumentMethod = instrumentMethod;\nexports.instrumentSetter = instrumentSetter;\nvar timer_1 = require(\"./timer\");\nvar monitor_1 = require(\"./monitor\");\nvar functionUtils_1 = require(\"./utils/functionUtils\");\nvar polyfills_1 = require(\"./utils/polyfills\");\nvar handlingStack_1 = require(\"./stackTrace/handlingStack\");\n/**\n * Instruments a method on a object, calling the given callback before the original method is\n * invoked. The callback receives an object with information about the method call.\n *\n * This function makes sure that we are \"good citizens\" regarding third party instrumentations: when\n * removing the instrumentation, the original method is usually restored, but if a third party\n * instrumentation was set after ours, we keep it in place and just replace our instrumentation with\n * a noop.\n *\n * Note: it is generally better to instrument methods that are \"owned\" by the object instead of ones\n * that are inherited from the prototype chain. Example:\n * * do: `instrumentMethod(Array.prototype, 'push', ...)`\n * * don't: `instrumentMethod([], 'push', ...)`\n *\n * This method is also used to set event handler properties (ex: window.onerror = ...), as it has\n * the same requirements as instrumenting a method:\n * * if the event handler is already set by a third party, we need to call it and not just blindly\n * override it.\n * * if the event handler is set by a third party after us, we need to keep it in place when\n * removing ours.\n *\n * @example\n *\n * instrumentMethod(window, 'fetch', ({ target, parameters, onPostCall }) => {\n * console.log('Before calling fetch on', target, 'with parameters', parameters)\n *\n * onPostCall((result) => {\n * console.log('After fetch calling on', target, 'with parameters', parameters, 'and result', result)\n * })\n * })\n */\nfunction instrumentMethod(targetPrototype, method, onPreCall, _a) {\n var _b = _a === void 0 ? {} : _a, computeHandlingStack = _b.computeHandlingStack;\n var original = targetPrototype[method];\n if (typeof original !== 'function') {\n if (method in targetPrototype && (0, polyfills_1.startsWith)(method, 'on')) {\n original = functionUtils_1.noop;\n }\n else {\n return { stop: functionUtils_1.noop };\n }\n }\n var stopped = false;\n var instrumentation = function () {\n if (stopped) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call\n return original.apply(this, arguments);\n }\n var parameters = (0, polyfills_1.arrayFrom)(arguments);\n var postCallCallback;\n (0, monitor_1.callMonitored)(onPreCall, null, [\n {\n target: this,\n parameters: parameters,\n onPostCall: function (callback) {\n postCallCallback = callback;\n },\n handlingStack: computeHandlingStack ? (0, handlingStack_1.createHandlingStack)() : undefined,\n },\n ]);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n var result = original.apply(this, parameters);\n if (postCallCallback) {\n (0, monitor_1.callMonitored)(postCallCallback, null, [result]);\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return result;\n };\n targetPrototype[method] = instrumentation;\n return {\n stop: function () {\n stopped = true;\n // If the instrumentation has been removed by a third party, keep the last one\n if (targetPrototype[method] === instrumentation) {\n targetPrototype[method] = original;\n }\n },\n };\n}\nfunction instrumentSetter(targetPrototype, property, after) {\n var originalDescriptor = Object.getOwnPropertyDescriptor(targetPrototype, property);\n if (!originalDescriptor || !originalDescriptor.set || !originalDescriptor.configurable) {\n return { stop: functionUtils_1.noop };\n }\n var stoppedInstrumentation = functionUtils_1.noop;\n var instrumentation = function (target, value) {\n // put hooked setter into event loop to avoid of set latency\n (0, timer_1.setTimeout)(function () {\n if (instrumentation !== stoppedInstrumentation) {\n after(target, value);\n }\n }, 0);\n };\n var instrumentationWrapper = function (value) {\n originalDescriptor.set.call(this, value);\n instrumentation(this, value);\n };\n Object.defineProperty(targetPrototype, property, {\n set: instrumentationWrapper,\n });\n return {\n stop: function () {\n var _a;\n if (((_a = Object.getOwnPropertyDescriptor(targetPrototype, property)) === null || _a === void 0 ? void 0 : _a.set) === instrumentationWrapper) {\n Object.defineProperty(targetPrototype, property, originalDescriptor);\n }\n instrumentation = stoppedInstrumentation;\n },\n };\n}\n//# sourceMappingURL=instrumentMethod.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isMatchOption = isMatchOption;\nexports.matchList = matchList;\nvar polyfills_1 = require(\"./utils/polyfills\");\nvar display_1 = require(\"./display\");\nvar typeUtils_1 = require(\"./utils/typeUtils\");\nfunction isMatchOption(item) {\n var itemType = (0, typeUtils_1.getType)(item);\n return itemType === 'string' || itemType === 'function' || item instanceof RegExp;\n}\n/**\n * Returns true if value can be matched by at least one of the provided MatchOptions.\n * When comparing strings, setting useStartsWith to true will compare the value with the start of\n * the option, instead of requiring an exact match.\n */\nfunction matchList(list, value, useStartsWith) {\n if (useStartsWith === void 0) { useStartsWith = false; }\n return list.some(function (item) {\n try {\n if (typeof item === 'function') {\n return item(value);\n }\n else if (item instanceof RegExp) {\n return item.test(value);\n }\n else if (typeof item === 'string') {\n return useStartsWith ? (0, polyfills_1.startsWith)(value, item) : item === value;\n }\n }\n catch (e) {\n display_1.display.error(e);\n }\n return false;\n });\n}\n//# sourceMappingURL=matchOption.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.mergeInto = mergeInto;\nexports.deepClone = deepClone;\nexports.combine = combine;\nvar typeUtils_1 = require(\"./utils/typeUtils\");\n/**\n * Iterate over source and affect its sub values into destination, recursively.\n * If the source and destination can't be merged, return source.\n */\nfunction mergeInto(destination, source, circularReferenceChecker) {\n if (circularReferenceChecker === void 0) { circularReferenceChecker = createCircularReferenceChecker(); }\n // ignore the source if it is undefined\n if (source === undefined) {\n return destination;\n }\n if (typeof source !== 'object' || source === null) {\n // primitive values - just return source\n return source;\n }\n else if (source instanceof Date) {\n return new Date(source.getTime());\n }\n else if (source instanceof RegExp) {\n var flags = source.flags ||\n // old browsers compatibility\n [\n source.global ? 'g' : '',\n source.ignoreCase ? 'i' : '',\n source.multiline ? 'm' : '',\n source.sticky ? 'y' : '',\n source.unicode ? 'u' : '',\n ].join('');\n return new RegExp(source.source, flags);\n }\n if (circularReferenceChecker.hasAlreadyBeenSeen(source)) {\n // remove circular references\n return undefined;\n }\n else if (Array.isArray(source)) {\n var merged_1 = Array.isArray(destination) ? destination : [];\n for (var i = 0; i < source.length; ++i) {\n merged_1[i] = mergeInto(merged_1[i], source[i], circularReferenceChecker);\n }\n return merged_1;\n }\n var merged = (0, typeUtils_1.getType)(destination) === 'object' ? destination : {};\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n merged[key] = mergeInto(merged[key], source[key], circularReferenceChecker);\n }\n }\n return merged;\n}\n/**\n * A simplistic implementation of a deep clone algorithm.\n * Caveats:\n * - It doesn't maintain prototype chains - don't use with instances of custom classes.\n * - It doesn't handle Map and Set\n */\nfunction deepClone(value) {\n return mergeInto(undefined, value);\n}\nfunction combine() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n var destination;\n for (var _a = 0, sources_1 = sources; _a < sources_1.length; _a++) {\n var source = sources_1[_a];\n // Ignore any undefined or null sources.\n if (source === undefined || source === null) {\n continue;\n }\n destination = mergeInto(destination, source);\n }\n return destination;\n}\nfunction createCircularReferenceChecker() {\n if (typeof WeakSet !== 'undefined') {\n var set_1 = new WeakSet();\n return {\n hasAlreadyBeenSeen: function (value) {\n var has = set_1.has(value);\n if (!has) {\n set_1.add(value);\n }\n return has;\n },\n };\n }\n var array = [];\n return {\n hasAlreadyBeenSeen: function (value) {\n var has = array.indexOf(value) >= 0;\n if (!has) {\n array.push(value);\n }\n return has;\n },\n };\n}\n//# sourceMappingURL=mergeInto.js.map","\"use strict\";\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};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startMonitorErrorCollection = startMonitorErrorCollection;\nexports.setDebugMode = setDebugMode;\nexports.resetMonitor = resetMonitor;\nexports.monitored = monitored;\nexports.monitor = monitor;\nexports.callMonitored = callMonitored;\nexports.displayIfDebugEnabled = displayIfDebugEnabled;\nvar display_1 = require(\"./display\");\nvar onMonitorErrorCollected;\nvar debugMode = false;\nfunction startMonitorErrorCollection(newOnMonitorErrorCollected) {\n onMonitorErrorCollected = newOnMonitorErrorCollected;\n}\nfunction setDebugMode(newDebugMode) {\n debugMode = newDebugMode;\n}\nfunction resetMonitor() {\n onMonitorErrorCollected = undefined;\n debugMode = false;\n}\nfunction monitored(_, __, descriptor) {\n var originalMethod = descriptor.value;\n descriptor.value = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var decorated = onMonitorErrorCollected ? monitor(originalMethod) : originalMethod;\n return decorated.apply(this, args);\n };\n}\nfunction monitor(fn) {\n return function () {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return callMonitored(fn, this, arguments);\n }; // consider output type has input type\n}\nfunction callMonitored(fn, context, args) {\n try {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return fn.apply(context, args);\n }\n catch (e) {\n displayIfDebugEnabled(e);\n if (onMonitorErrorCollected) {\n try {\n onMonitorErrorCollected(e);\n }\n catch (e) {\n displayIfDebugEnabled(e);\n }\n }\n }\n}\nfunction displayIfDebugEnabled() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (debugMode) {\n display_1.display.error.apply(display_1.display, __spreadArray(['[MONITOR]'], args, false));\n }\n}\n//# sourceMappingURL=monitor.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Observable = void 0;\nexports.mergeObservables = mergeObservables;\n// eslint-disable-next-line no-restricted-syntax\nvar Observable = /** @class */ (function () {\n function Observable(onFirstSubscribe) {\n this.onFirstSubscribe = onFirstSubscribe;\n this.observers = [];\n }\n Observable.prototype.subscribe = function (f) {\n var _this = this;\n this.observers.push(f);\n if (this.observers.length === 1 && this.onFirstSubscribe) {\n this.onLastUnsubscribe = this.onFirstSubscribe(this) || undefined;\n }\n return {\n unsubscribe: function () {\n _this.observers = _this.observers.filter(function (other) { return f !== other; });\n if (!_this.observers.length && _this.onLastUnsubscribe) {\n _this.onLastUnsubscribe();\n }\n },\n };\n };\n Observable.prototype.notify = function (data) {\n this.observers.forEach(function (observer) { return observer(data); });\n };\n return Observable;\n}());\nexports.Observable = Observable;\nfunction mergeObservables() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n return new Observable(function (globalObservable) {\n var subscriptions = observables.map(function (observable) {\n return observable.subscribe(function (data) { return globalObservable.notify(data); });\n });\n return function () { return subscriptions.forEach(function (subscription) { return subscription.unsubscribe(); }); };\n });\n}\n//# sourceMappingURL=observable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.readBytesFromStream = readBytesFromStream;\nvar monitor_1 = require(\"./monitor\");\nvar functionUtils_1 = require(\"./utils/functionUtils\");\n/**\n * Read bytes from a ReadableStream until at least `limit` bytes have been read (or until the end of\n * the stream). The callback is invoked with the at most `limit` bytes, and indicates that the limit\n * has been exceeded if more bytes were available.\n */\nfunction readBytesFromStream(stream, callback, options) {\n var reader = stream.getReader();\n var chunks = [];\n var readBytesCount = 0;\n readMore();\n function readMore() {\n reader.read().then((0, monitor_1.monitor)(function (result) {\n if (result.done) {\n onDone();\n return;\n }\n if (options.collectStreamBody) {\n chunks.push(result.value);\n }\n readBytesCount += result.value.length;\n if (readBytesCount > options.bytesLimit) {\n onDone();\n }\n else {\n readMore();\n }\n }), (0, monitor_1.monitor)(function (error) { return callback(error); }));\n }\n function onDone() {\n reader.cancel().catch(\n // we don't care if cancel fails, but we still need to catch the error to avoid reporting it\n // as an unhandled rejection\n functionUtils_1.noop);\n var bytes;\n var limitExceeded;\n if (options.collectStreamBody) {\n var completeBuffer_1;\n if (chunks.length === 1) {\n // optimization: if the response is small enough to fit in a single buffer (provided by the browser), just\n // use it directly.\n completeBuffer_1 = chunks[0];\n }\n else {\n // else, we need to copy buffers into a larger buffer to concatenate them.\n completeBuffer_1 = new Uint8Array(readBytesCount);\n var offset_1 = 0;\n chunks.forEach(function (chunk) {\n completeBuffer_1.set(chunk, offset_1);\n offset_1 += chunk.length;\n });\n }\n bytes = completeBuffer_1.slice(0, options.bytesLimit);\n limitExceeded = completeBuffer_1.length > options.bytesLimit;\n }\n callback(undefined, bytes, limitExceeded);\n }\n}\n//# sourceMappingURL=readBytesFromStream.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MAX_TASK_TIME = void 0;\nexports.requestIdleCallback = requestIdleCallback;\nexports.requestIdleCallbackShim = requestIdleCallbackShim;\nvar timer_1 = require(\"./timer\");\nvar monitor_1 = require(\"./monitor\");\nvar timeUtils_1 = require(\"./utils/timeUtils\");\n/**\n * 'requestIdleCallback' with a shim.\n */\nfunction requestIdleCallback(callback, opts) {\n // Note: check both 'requestIdleCallback' and 'cancelIdleCallback' existence because some polyfills only implement 'requestIdleCallback'.\n if (window.requestIdleCallback && window.cancelIdleCallback) {\n var id_1 = window.requestIdleCallback((0, monitor_1.monitor)(callback), opts);\n return function () { return window.cancelIdleCallback(id_1); };\n }\n return requestIdleCallbackShim(callback);\n}\nexports.MAX_TASK_TIME = 50;\n/*\n * Shim from https://developer.chrome.com/blog/using-requestidlecallback#checking_for_requestidlecallback\n * Note: there is no simple way to support the \"timeout\" option, so we ignore it.\n */\nfunction requestIdleCallbackShim(callback) {\n var start = (0, timeUtils_1.dateNow)();\n var timeoutId = (0, timer_1.setTimeout)(function () {\n callback({\n didTimeout: false,\n timeRemaining: function () { return Math.max(0, exports.MAX_TASK_TIME - ((0, timeUtils_1.dateNow)() - start)); },\n });\n }, 0);\n return function () { return (0, timer_1.clearTimeout)(timeoutId); };\n}\n//# sourceMappingURL=requestIdleCallback.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sendToExtension = sendToExtension;\nfunction sendToExtension(type, payload) {\n var callback = window.__ddBrowserSdkExtensionCallback;\n if (callback) {\n callback({ type: type, payload: payload });\n }\n}\n//# sourceMappingURL=sendToExtension.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.jsonStringify = jsonStringify;\nexports.detachToJsonMethod = detachToJsonMethod;\nvar functionUtils_1 = require(\"../utils/functionUtils\");\n/**\n * Custom implementation of JSON.stringify that ignores some toJSON methods. We need to do that\n * because some sites badly override toJSON on certain objects. Removing all toJSON methods from\n * nested values would be too costly, so we just detach them from the root value, and native classes\n * used to build JSON values (Array and Object).\n *\n * Note: this still assumes that JSON.stringify is correct.\n */\nfunction jsonStringify(value, replacer, space) {\n if (typeof value !== 'object' || value === null) {\n return JSON.stringify(value);\n }\n // Note: The order matter here. We need to detach toJSON methods on parent classes before their\n // subclasses.\n var restoreObjectPrototypeToJson = detachToJsonMethod(Object.prototype);\n var restoreArrayPrototypeToJson = detachToJsonMethod(Array.prototype);\n var restoreValuePrototypeToJson = detachToJsonMethod(Object.getPrototypeOf(value));\n var restoreValueToJson = detachToJsonMethod(value);\n try {\n return JSON.stringify(value, replacer, space);\n }\n catch (_a) {\n return '';\n }\n finally {\n restoreObjectPrototypeToJson();\n restoreArrayPrototypeToJson();\n restoreValuePrototypeToJson();\n restoreValueToJson();\n }\n}\nfunction detachToJsonMethod(value) {\n var object = value;\n var objectToJson = object.toJSON;\n if (objectToJson) {\n delete object.toJSON;\n return function () {\n object.toJSON = objectToJson;\n };\n }\n return functionUtils_1.noop;\n}\n//# sourceMappingURL=jsonStringify.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sanitize = sanitize;\nvar display_1 = require(\"../display\");\nvar byteUtils_1 = require(\"../utils/byteUtils\");\nvar jsonStringify_1 = require(\"./jsonStringify\");\n// The maximum size of a single event is 256KiB. By default, we ensure that user-provided data\n// going through sanitize fits inside our events, while leaving room for other contexts, metadata, ...\nvar SANITIZE_DEFAULT_MAX_CHARACTER_COUNT = 220 * byteUtils_1.ONE_KIBI_BYTE;\n// Symbol for the root element of the JSONPath used for visited objects\nvar JSON_PATH_ROOT_ELEMENT = '$';\n// When serializing (using JSON.stringify) a key of an object, { key: 42 } gets wrapped in quotes as \"key\".\n// With the separator (:), we need to add 3 characters to the count.\nvar KEY_DECORATION_LENGTH = 3;\nfunction sanitize(source, maxCharacterCount) {\n if (maxCharacterCount === void 0) { maxCharacterCount = SANITIZE_DEFAULT_MAX_CHARACTER_COUNT; }\n // Unbind any toJSON function we may have on [] or {} prototypes\n var restoreObjectPrototypeToJson = (0, jsonStringify_1.detachToJsonMethod)(Object.prototype);\n var restoreArrayPrototypeToJson = (0, jsonStringify_1.detachToJsonMethod)(Array.prototype);\n // Initial call to sanitizeProcessor - will populate containerQueue if source is an Array or a plain Object\n var containerQueue = [];\n var visitedObjectsWithPath = new WeakMap();\n var sanitizedData = sanitizeProcessor(source, JSON_PATH_ROOT_ELEMENT, undefined, containerQueue, visitedObjectsWithPath);\n var serializedSanitizedData = JSON.stringify(sanitizedData);\n var accumulatedCharacterCount = serializedSanitizedData ? serializedSanitizedData.length : 0;\n if (accumulatedCharacterCount > maxCharacterCount) {\n warnOverCharacterLimit(maxCharacterCount, 'discarded', source);\n return undefined;\n }\n while (containerQueue.length > 0 && accumulatedCharacterCount < maxCharacterCount) {\n var containerToProcess = containerQueue.shift();\n var separatorLength = 0; // 0 for the first element, 1 for subsequent elements\n // Arrays and Objects have to be handled distinctly to ensure\n // we do not pick up non-numerical properties from Arrays\n if (Array.isArray(containerToProcess.source)) {\n for (var key = 0; key < containerToProcess.source.length; key++) {\n var targetData = sanitizeProcessor(containerToProcess.source[key], containerToProcess.path, key, containerQueue, visitedObjectsWithPath);\n if (targetData !== undefined) {\n accumulatedCharacterCount += JSON.stringify(targetData).length;\n }\n else {\n // When an element of an Array (targetData) is undefined, it is serialized as null:\n // JSON.stringify([undefined]) => '[null]' - This accounts for 4 characters\n accumulatedCharacterCount += 4;\n }\n accumulatedCharacterCount += separatorLength;\n separatorLength = 1;\n if (accumulatedCharacterCount > maxCharacterCount) {\n warnOverCharacterLimit(maxCharacterCount, 'truncated', source);\n break;\n }\n ;\n containerToProcess.target[key] = targetData;\n }\n }\n else {\n for (var key in containerToProcess.source) {\n if (Object.prototype.hasOwnProperty.call(containerToProcess.source, key)) {\n var targetData = sanitizeProcessor(containerToProcess.source[key], containerToProcess.path, key, containerQueue, visitedObjectsWithPath);\n // When a property of an object has an undefined value, it will be dropped during serialization:\n // JSON.stringify({a:undefined}) => '{}'\n if (targetData !== undefined) {\n accumulatedCharacterCount +=\n JSON.stringify(targetData).length + separatorLength + key.length + KEY_DECORATION_LENGTH;\n separatorLength = 1;\n }\n if (accumulatedCharacterCount > maxCharacterCount) {\n warnOverCharacterLimit(maxCharacterCount, 'truncated', source);\n break;\n }\n ;\n containerToProcess.target[key] = targetData;\n }\n }\n }\n }\n // Rebind detached toJSON functions\n restoreObjectPrototypeToJson();\n restoreArrayPrototypeToJson();\n return sanitizedData;\n}\n/**\n * Internal function to factorize the process common to the\n * initial call to sanitize, and iterations for Arrays and Objects\n *\n */\nfunction sanitizeProcessor(source, parentPath, key, queue, visitedObjectsWithPath) {\n // Start by handling toJSON, as we want to sanitize its output\n var sourceToSanitize = tryToApplyToJSON(source);\n if (!sourceToSanitize || typeof sourceToSanitize !== 'object') {\n return sanitizePrimitivesAndFunctions(sourceToSanitize);\n }\n var sanitizedSource = sanitizeObjects(sourceToSanitize);\n if (sanitizedSource !== '[Object]' && sanitizedSource !== '[Array]' && sanitizedSource !== '[Error]') {\n return sanitizedSource;\n }\n // Handle potential cyclic references\n // We need to use source as sourceToSanitize could be a reference to a new object\n // At this stage, we know the source is an object type\n var sourceAsObject = source;\n if (visitedObjectsWithPath.has(sourceAsObject)) {\n return \"[Reference seen at \".concat(visitedObjectsWithPath.get(sourceAsObject), \"]\");\n }\n // Add processed source to queue\n var currentPath = key !== undefined ? \"\".concat(parentPath, \".\").concat(key) : parentPath;\n var target = Array.isArray(sourceToSanitize) ? [] : {};\n visitedObjectsWithPath.set(sourceAsObject, currentPath);\n queue.push({ source: sourceToSanitize, target: target, path: currentPath });\n return target;\n}\n/**\n * Handles sanitization of simple, non-object types\n *\n */\nfunction sanitizePrimitivesAndFunctions(value) {\n // BigInt cannot be serialized by JSON.stringify(), convert it to a string representation\n if (typeof value === 'bigint') {\n return \"[BigInt] \".concat(value.toString());\n }\n // Functions cannot be serialized by JSON.stringify(). Moreover, if a faulty toJSON is present, it needs to be converted\n // so it won't prevent stringify from serializing later\n if (typeof value === 'function') {\n return \"[Function] \".concat(value.name || 'unknown');\n }\n // JSON.stringify() does not serialize symbols.\n if (typeof value === 'symbol') {\n return \"[Symbol] \".concat(value.description || value.toString());\n }\n return value;\n}\n/**\n * Handles sanitization of object types\n *\n * LIMITATIONS\n * - If a class defines a toStringTag Symbol, it will fall in the catch-all method and prevent enumeration of properties.\n * To avoid this, a toJSON method can be defined.\n * - IE11 does not return a distinct type for objects such as Map, WeakMap, ... These objects will pass through and their\n * properties enumerated if any.\n *\n */\nfunction sanitizeObjects(value) {\n try {\n // Handle events - Keep a simple implementation to avoid breaking changes\n if (value instanceof Event) {\n return {\n isTrusted: value.isTrusted,\n };\n }\n // Handle all remaining object types in a generic way\n var result = Object.prototype.toString.call(value);\n var match = result.match(/\\[object (.*)\\]/);\n if (match && match[1]) {\n return \"[\".concat(match[1], \"]\");\n }\n }\n catch (_a) {\n // If the previous serialization attempts failed, and we cannot convert using\n // Object.prototype.toString, declare the value unserializable\n }\n return '[Unserializable]';\n}\n/**\n * Checks if a toJSON function exists and tries to execute it\n *\n */\nfunction tryToApplyToJSON(value) {\n var object = value;\n if (object && typeof object.toJSON === 'function') {\n try {\n return object.toJSON();\n }\n catch (_a) {\n // If toJSON fails, we continue by trying to serialize the value manually\n }\n }\n return value;\n}\n/**\n * Helper function to display the warning when the accumulated character count is over the limit\n */\nfunction warnOverCharacterLimit(maxCharacterCount, changeType, source) {\n display_1.display.warn(\"The data provided has been \".concat(changeType, \" as it is over the limit of \").concat(maxCharacterCount, \" characters:\"), source);\n}\n//# sourceMappingURL=sanitize.js.map","\"use strict\";\n/**\n * Cross-browser stack trace computation.\n *\n * Reference implementation: https://github.com/csnover/TraceKit/blob/04530298073c3823de72deb0b97e7b38ca7bcb59/tracekit.js\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.computeStackTrace = computeStackTrace;\nexports.computeStackTraceFromOnErrorMessage = computeStackTraceFromOnErrorMessage;\nvar polyfills_1 = require(\"../utils/polyfills\");\nvar UNKNOWN_FUNCTION = '?';\nfunction computeStackTrace(ex) {\n var stack = [];\n var stackProperty = tryToGetString(ex, 'stack');\n var exString = String(ex);\n if (stackProperty && (0, polyfills_1.startsWith)(stackProperty, exString)) {\n stackProperty = stackProperty.slice(exString.length);\n }\n if (stackProperty) {\n stackProperty.split('\\n').forEach(function (line) {\n var stackFrame = parseChromeLine(line) || parseChromeAnonymousLine(line) || parseWinLine(line) || parseGeckoLine(line);\n if (stackFrame) {\n if (!stackFrame.func && stackFrame.line) {\n stackFrame.func = UNKNOWN_FUNCTION;\n }\n stack.push(stackFrame);\n }\n });\n }\n return {\n message: tryToGetString(ex, 'message'),\n name: tryToGetString(ex, 'name'),\n stack: stack,\n };\n}\nvar fileUrl = '((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet||\\\\w+\\\\.|\\\\/).*?)';\nvar filePosition = '(?::(\\\\d+))';\nvar CHROME_LINE_RE = new RegExp(\"^\\\\s*at (.*?) ?\\\\(\".concat(fileUrl).concat(filePosition, \"?\").concat(filePosition, \"?\\\\)?\\\\s*$\"), 'i');\nvar CHROME_EVAL_RE = new RegExp(\"\\\\((\\\\S*)\".concat(filePosition).concat(filePosition, \"\\\\)\"));\nfunction parseChromeLine(line) {\n var parts = CHROME_LINE_RE.exec(line);\n if (!parts) {\n return;\n }\n var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n var submatch = CHROME_EVAL_RE.exec(parts[2]);\n if (isEval && submatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n return {\n args: isNative ? [parts[2]] : [],\n column: parts[4] ? +parts[4] : undefined,\n func: parts[1] || UNKNOWN_FUNCTION,\n line: parts[3] ? +parts[3] : undefined,\n url: !isNative ? parts[2] : undefined,\n };\n}\nvar CHROME_ANONYMOUS_FUNCTION_RE = new RegExp(\"^\\\\s*at ?\".concat(fileUrl).concat(filePosition, \"?\").concat(filePosition, \"??\\\\s*$\"), 'i');\nfunction parseChromeAnonymousLine(line) {\n var parts = CHROME_ANONYMOUS_FUNCTION_RE.exec(line);\n if (!parts) {\n return;\n }\n return {\n args: [],\n column: parts[3] ? +parts[3] : undefined,\n func: UNKNOWN_FUNCTION,\n line: parts[2] ? +parts[2] : undefined,\n url: parts[1],\n };\n}\nvar WINJS_LINE_RE = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nfunction parseWinLine(line) {\n var parts = WINJS_LINE_RE.exec(line);\n if (!parts) {\n return;\n }\n return {\n args: [],\n column: parts[4] ? +parts[4] : undefined,\n func: parts[1] || UNKNOWN_FUNCTION,\n line: +parts[3],\n url: parts[2],\n };\n}\nvar GECKO_LINE_RE = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar GECKO_EVAL_RE = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nfunction parseGeckoLine(line) {\n var parts = GECKO_LINE_RE.exec(line);\n if (!parts) {\n return;\n }\n var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n var submatch = GECKO_EVAL_RE.exec(parts[3]);\n if (isEval && submatch) {\n // throw out eval line/column and use top-most line number\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = undefined; // no column when eval\n }\n return {\n args: parts[2] ? parts[2].split(',') : [],\n column: parts[5] ? +parts[5] : undefined,\n func: parts[1] || UNKNOWN_FUNCTION,\n line: parts[4] ? +parts[4] : undefined,\n url: parts[3],\n };\n}\nfunction tryToGetString(candidate, property) {\n if (typeof candidate !== 'object' || !candidate || !(property in candidate)) {\n return undefined;\n }\n var value = candidate[property];\n return typeof value === 'string' ? value : undefined;\n}\nfunction computeStackTraceFromOnErrorMessage(messageObj, url, line, column) {\n var stack = [{ url: url, column: column, line: line }];\n var _a = tryToParseMessage(messageObj), name = _a.name, message = _a.message;\n return {\n name: name,\n message: message,\n stack: stack,\n };\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types\nvar ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\\s\\S]*)$/;\nfunction tryToParseMessage(messageObj) {\n var _a;\n var name;\n var message;\n if ({}.toString.call(messageObj) === '[object String]') {\n ;\n _a = ERROR_TYPES_RE.exec(messageObj), name = _a[1], message = _a[2];\n }\n return { name: name, message: message };\n}\n//# sourceMappingURL=computeStackTrace.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createHandlingStack = createHandlingStack;\nexports.toStackTraceString = toStackTraceString;\nexports.formatErrorMessage = formatErrorMessage;\nvar monitor_1 = require(\"../monitor\");\nvar functionUtils_1 = require(\"../utils/functionUtils\");\nvar computeStackTrace_1 = require(\"./computeStackTrace\");\n/**\n * Creates a stacktrace without SDK internal frames.\n * Constraints:\n * - Has to be called at the utmost position of the call stack.\n * - No monitored function should encapsulate it, that is why we need to use callMonitored inside it.\n */\nfunction createHandlingStack() {\n /**\n * Skip the two internal frames:\n * - SDK API (console.error, ...)\n * - this function\n * in order to keep only the user calls\n */\n var internalFramesToSkip = 2;\n var error = new Error();\n var formattedStack;\n // IE needs to throw the error to fill in the stack trace\n if (!error.stack) {\n try {\n throw error;\n }\n catch (_a) {\n (0, functionUtils_1.noop)();\n }\n }\n (0, monitor_1.callMonitored)(function () {\n var stackTrace = (0, computeStackTrace_1.computeStackTrace)(error);\n stackTrace.stack = stackTrace.stack.slice(internalFramesToSkip);\n formattedStack = toStackTraceString(stackTrace);\n });\n return formattedStack;\n}\nfunction toStackTraceString(stack) {\n var result = formatErrorMessage(stack);\n stack.stack.forEach(function (frame) {\n var func = frame.func === '?' ? '' : frame.func;\n var args = frame.args && frame.args.length > 0 ? \"(\".concat(frame.args.join(', '), \")\") : '';\n var line = frame.line ? \":\".concat(frame.line) : '';\n var column = frame.line && frame.column ? \":\".concat(frame.column) : '';\n result += \"\\n at \".concat(func).concat(args, \" @ \").concat(frame.url).concat(line).concat(column);\n });\n return result;\n}\nfunction formatErrorMessage(stack) {\n return \"\".concat(stack.name || 'Error', \": \").concat(stack.message);\n}\n//# sourceMappingURL=handlingStack.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MAX_EXECUTION_TIME_ON_TIMEOUT = void 0;\nexports.createTaskQueue = createTaskQueue;\nvar timeUtils_1 = require(\"./utils/timeUtils\");\nvar requestIdleCallback_1 = require(\"./requestIdleCallback\");\n/**\n * Maximum delay before starting to execute tasks in the queue. We don't want to wait too long\n * before running tasks, as it might hurt reliability (ex: if the user navigates away, we might lose\n * the opportunity to send some data). We also don't want to run tasks too often, as it might hurt\n * performance.\n */\nvar IDLE_CALLBACK_TIMEOUT = timeUtils_1.ONE_SECOND;\n/**\n * Maximum amount of time allocated to running tasks when a timeout (`IDLE_CALLBACK_TIMEOUT`) is\n * reached. We should not run tasks for too long as it will hurt performance, but we should still\n * run some tasks to avoid postponing them forever.\n *\n * Rational: Running tasks for 30ms every second (IDLE_CALLBACK_TIMEOUT) should be acceptable.\n */\nexports.MAX_EXECUTION_TIME_ON_TIMEOUT = 30;\nfunction createTaskQueue() {\n var pendingTasks = [];\n function run(deadline) {\n var executionTimeRemaining;\n if (deadline.didTimeout) {\n var start_1 = performance.now();\n executionTimeRemaining = function () { return exports.MAX_EXECUTION_TIME_ON_TIMEOUT - (performance.now() - start_1); };\n }\n else {\n executionTimeRemaining = deadline.timeRemaining.bind(deadline);\n }\n while (executionTimeRemaining() > 0 && pendingTasks.length) {\n pendingTasks.shift()();\n }\n if (pendingTasks.length) {\n scheduleNextRun();\n }\n }\n function scheduleNextRun() {\n (0, requestIdleCallback_1.requestIdleCallback)(run, { timeout: IDLE_CALLBACK_TIMEOUT });\n }\n return {\n push: function (task) {\n if (pendingTasks.push(task) === 1) {\n scheduleNextRun();\n }\n },\n };\n}\n//# sourceMappingURL=taskQueue.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.setTimeout = setTimeout;\nexports.clearTimeout = clearTimeout;\nexports.setInterval = setInterval;\nexports.clearInterval = clearInterval;\nvar getZoneJsOriginalValue_1 = require(\"./getZoneJsOriginalValue\");\nvar monitor_1 = require(\"./monitor\");\nvar getGlobalObject_1 = require(\"./getGlobalObject\");\nfunction setTimeout(callback, delay) {\n return (0, getZoneJsOriginalValue_1.getZoneJsOriginalValue)((0, getGlobalObject_1.getGlobalObject)(), 'setTimeout')((0, monitor_1.monitor)(callback), delay);\n}\nfunction clearTimeout(timeoutId) {\n (0, getZoneJsOriginalValue_1.getZoneJsOriginalValue)((0, getGlobalObject_1.getGlobalObject)(), 'clearTimeout')(timeoutId);\n}\nfunction setInterval(callback, delay) {\n return (0, getZoneJsOriginalValue_1.getZoneJsOriginalValue)((0, getGlobalObject_1.getGlobalObject)(), 'setInterval')((0, monitor_1.monitor)(callback), delay);\n}\nfunction clearInterval(timeoutId) {\n (0, getZoneJsOriginalValue_1.getZoneJsOriginalValue)((0, getGlobalObject_1.getGlobalObject)(), 'clearInterval')(timeoutId);\n}\n//# sourceMappingURL=timer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.removeDuplicates = removeDuplicates;\nexports.removeItem = removeItem;\nvar polyfills_1 = require(\"./polyfills\");\nfunction removeDuplicates(array) {\n var set = new Set();\n array.forEach(function (item) { return set.add(item); });\n return (0, polyfills_1.arrayFrom)(set);\n}\nfunction removeItem(array, item) {\n var index = array.indexOf(item);\n if (index >= 0) {\n array.splice(index, 1);\n }\n}\n//# sourceMappingURL=arrayUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isIE = isIE;\nexports.isChromium = isChromium;\nexports.isSafari = isSafari;\nexports.detectBrowser = detectBrowser;\nfunction isIE() {\n return detectBrowserCached() === 0 /* Browser.IE */;\n}\nfunction isChromium() {\n return detectBrowserCached() === 1 /* Browser.CHROMIUM */;\n}\nfunction isSafari() {\n return detectBrowserCached() === 2 /* Browser.SAFARI */;\n}\nvar browserCache;\nfunction detectBrowserCached() {\n return browserCache !== null && browserCache !== void 0 ? browserCache : (browserCache = detectBrowser());\n}\n// Exported only for tests\nfunction detectBrowser(browserWindow) {\n var _a;\n if (browserWindow === void 0) { browserWindow = window; }\n var userAgent = browserWindow.navigator.userAgent;\n if (browserWindow.chrome || /HeadlessChrome/.test(userAgent)) {\n return 1 /* Browser.CHROMIUM */;\n }\n if (\n // navigator.vendor is deprecated, but it is the most resilient way we found to detect\n // \"Apple maintained browsers\" (AKA Safari). If one day it gets removed, we still have the\n // useragent test as a semi-working fallback.\n ((_a = browserWindow.navigator.vendor) === null || _a === void 0 ? void 0 : _a.indexOf('Apple')) === 0 ||\n (/safari/i.test(userAgent) && !/chrome|android/i.test(userAgent))) {\n return 2 /* Browser.SAFARI */;\n }\n if (browserWindow.document.documentMode) {\n return 0 /* Browser.IE */;\n }\n return 3 /* Browser.OTHER */;\n}\n//# sourceMappingURL=browserDetection.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ONE_MEBI_BYTE = exports.ONE_KIBI_BYTE = void 0;\nexports.computeBytesCount = computeBytesCount;\nexports.concatBuffers = concatBuffers;\nexports.ONE_KIBI_BYTE = 1024;\nexports.ONE_MEBI_BYTE = 1024 * exports.ONE_KIBI_BYTE;\n// eslint-disable-next-line no-control-regex\nvar HAS_MULTI_BYTES_CHARACTERS = /[^\\u0000-\\u007F]/;\nfunction computeBytesCount(candidate) {\n // Accurate bytes count computations can degrade performances when there is a lot of events to process\n if (!HAS_MULTI_BYTES_CHARACTERS.test(candidate)) {\n return candidate.length;\n }\n if (window.TextEncoder !== undefined) {\n return new TextEncoder().encode(candidate).length;\n }\n return new Blob([candidate]).size;\n}\nfunction concatBuffers(buffers) {\n var length = buffers.reduce(function (total, buffer) { return total + buffer.length; }, 0);\n var result = new Uint8Array(length);\n var offset = 0;\n for (var _i = 0, buffers_1 = buffers; _i < buffers_1.length; _i++) {\n var buffer = buffers_1[_i];\n result.set(buffer, offset);\n offset += buffer.length;\n }\n return result;\n}\n//# sourceMappingURL=byteUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.throttle = throttle;\nexports.noop = noop;\nvar timer_1 = require(\"../timer\");\n// use lodash API\nfunction throttle(fn, wait, options) {\n var needLeadingExecution = options && options.leading !== undefined ? options.leading : true;\n var needTrailingExecution = options && options.trailing !== undefined ? options.trailing : true;\n var inWaitPeriod = false;\n var pendingExecutionWithParameters;\n var pendingTimeoutId;\n return {\n throttled: function () {\n var parameters = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n parameters[_i] = arguments[_i];\n }\n if (inWaitPeriod) {\n pendingExecutionWithParameters = parameters;\n return;\n }\n if (needLeadingExecution) {\n fn.apply(void 0, parameters);\n }\n else {\n pendingExecutionWithParameters = parameters;\n }\n inWaitPeriod = true;\n pendingTimeoutId = (0, timer_1.setTimeout)(function () {\n if (needTrailingExecution && pendingExecutionWithParameters) {\n fn.apply(void 0, pendingExecutionWithParameters);\n }\n inWaitPeriod = false;\n pendingExecutionWithParameters = undefined;\n }, wait);\n },\n cancel: function () {\n (0, timer_1.clearTimeout)(pendingTimeoutId);\n inWaitPeriod = false;\n pendingExecutionWithParameters = undefined;\n },\n };\n}\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nfunction noop() { }\n//# sourceMappingURL=functionUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.performDraw = performDraw;\nexports.round = round;\nexports.isPercentage = isPercentage;\nexports.isNumber = isNumber;\n/**\n * Return true if the draw is successful\n * @param threshold between 0 and 100\n */\nfunction performDraw(threshold) {\n return threshold !== 0 && Math.random() * 100 <= threshold;\n}\nfunction round(num, decimals) {\n return +num.toFixed(decimals);\n}\nfunction isPercentage(value) {\n return isNumber(value) && value >= 0 && value <= 100;\n}\nfunction isNumber(value) {\n return typeof value === 'number';\n}\n//# sourceMappingURL=numberUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.shallowClone = shallowClone;\nexports.objectHasValue = objectHasValue;\nexports.isEmptyObject = isEmptyObject;\nexports.mapValues = mapValues;\nvar polyfills_1 = require(\"./polyfills\");\nfunction shallowClone(object) {\n return (0, polyfills_1.assign)({}, object);\n}\nfunction objectHasValue(object, value) {\n return Object.keys(object).some(function (key) { return object[key] === value; });\n}\nfunction isEmptyObject(object) {\n return Object.keys(object).length === 0;\n}\nfunction mapValues(object, fn) {\n var newObject = {};\n for (var _i = 0, _a = Object.keys(object); _i < _a.length; _i++) {\n var key = _a[_i];\n newObject[key] = fn(object[key]);\n }\n return newObject;\n}\n//# sourceMappingURL=objectUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.includes = includes;\nexports.arrayFrom = arrayFrom;\nexports.find = find;\nexports.findLast = findLast;\nexports.forEach = forEach;\nexports.objectValues = objectValues;\nexports.objectEntries = objectEntries;\nexports.startsWith = startsWith;\nexports.endsWith = endsWith;\nexports.assign = assign;\nfunction includes(candidate, search) {\n return candidate.indexOf(search) !== -1;\n}\nfunction arrayFrom(arrayLike) {\n if (Array.from) {\n return Array.from(arrayLike);\n }\n var array = [];\n if (arrayLike instanceof Set) {\n arrayLike.forEach(function (item) { return array.push(item); });\n }\n else {\n for (var i = 0; i < arrayLike.length; i++) {\n array.push(arrayLike[i]);\n }\n }\n return array;\n}\nfunction find(array, predicate) {\n for (var i = 0; i < array.length; i += 1) {\n var item = array[i];\n if (predicate(item, i)) {\n return item;\n }\n }\n return undefined;\n}\nfunction findLast(array, predicate) {\n for (var i = array.length - 1; i >= 0; i -= 1) {\n var item = array[i];\n if (predicate(item, i, array)) {\n return item;\n }\n }\n return undefined;\n}\nfunction forEach(list, callback) {\n Array.prototype.forEach.call(list, callback);\n}\nfunction objectValues(object) {\n return Object.keys(object).map(function (key) { return object[key]; });\n}\nfunction objectEntries(object) {\n return Object.keys(object).map(function (key) { return [key, object[key]]; });\n}\nfunction startsWith(candidate, search) {\n return candidate.slice(0, search.length) === search;\n}\nfunction endsWith(candidate, search) {\n return candidate.slice(-search.length) === search;\n}\nfunction assign(target) {\n var toAssign = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n toAssign[_i - 1] = arguments[_i];\n }\n toAssign.forEach(function (source) {\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n });\n return target;\n}\n//# sourceMappingURL=polyfills.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isServerError = isServerError;\nexports.tryToClone = tryToClone;\nfunction isServerError(status) {\n return status >= 500;\n}\nfunction tryToClone(response) {\n try {\n return response.clone();\n }\n catch (_a) {\n // clone can throw if the response has already been used by another instrumentation or is disturbed\n return;\n }\n}\n//# sourceMappingURL=responseUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.generateUUID = generateUUID;\nexports.findCommaSeparatedValue = findCommaSeparatedValue;\nexports.findCommaSeparatedValues = findCommaSeparatedValues;\nexports.safeTruncate = safeTruncate;\n/**\n * UUID v4\n * from https://gist.github.com/jed/982883\n */\nfunction generateUUID(placeholder) {\n return placeholder\n ? // eslint-disable-next-line no-bitwise\n (parseInt(placeholder, 10) ^ ((Math.random() * 16) >> (parseInt(placeholder, 10) / 4))).toString(16)\n : \"\".concat(1e7, \"-\").concat(1e3, \"-\").concat(4e3, \"-\").concat(8e3, \"-\").concat(1e11).replace(/[018]/g, generateUUID);\n}\nvar COMMA_SEPARATED_KEY_VALUE = /([\\w-]+)\\s*=\\s*([^;]+)/g;\nfunction findCommaSeparatedValue(rawString, name) {\n COMMA_SEPARATED_KEY_VALUE.lastIndex = 0;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n var match = COMMA_SEPARATED_KEY_VALUE.exec(rawString);\n if (match) {\n if (match[1] === name) {\n return match[2];\n }\n }\n else {\n break;\n }\n }\n}\nfunction findCommaSeparatedValues(rawString) {\n var result = new Map();\n COMMA_SEPARATED_KEY_VALUE.lastIndex = 0;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n var match = COMMA_SEPARATED_KEY_VALUE.exec(rawString);\n if (match) {\n result.set(match[1], match[2]);\n }\n else {\n break;\n }\n }\n return result;\n}\nfunction safeTruncate(candidate, length, suffix) {\n if (suffix === void 0) { suffix = ''; }\n var lastChar = candidate.charCodeAt(length - 1);\n var isLastCharSurrogatePair = lastChar >= 0xd800 && lastChar <= 0xdbff;\n var correctedLength = isLastCharSurrogatePair ? length + 1 : length;\n if (candidate.length <= correctedLength) {\n return candidate;\n }\n return \"\".concat(candidate.slice(0, correctedLength)).concat(suffix);\n}\n//# sourceMappingURL=stringUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ONE_YEAR = exports.ONE_DAY = exports.ONE_HOUR = exports.ONE_MINUTE = exports.ONE_SECOND = void 0;\nexports.relativeToClocks = relativeToClocks;\nexports.timeStampToClocks = timeStampToClocks;\nexports.currentDrift = currentDrift;\nexports.toServerDuration = toServerDuration;\nexports.dateNow = dateNow;\nexports.timeStampNow = timeStampNow;\nexports.relativeNow = relativeNow;\nexports.clocksNow = clocksNow;\nexports.clocksOrigin = clocksOrigin;\nexports.elapsed = elapsed;\nexports.addDuration = addDuration;\nexports.getRelativeTime = getRelativeTime;\nexports.getTimeStamp = getTimeStamp;\nexports.looksLikeRelativeTime = looksLikeRelativeTime;\nvar numberUtils_1 = require(\"./numberUtils\");\nexports.ONE_SECOND = 1000;\nexports.ONE_MINUTE = 60 * exports.ONE_SECOND;\nexports.ONE_HOUR = 60 * exports.ONE_MINUTE;\nexports.ONE_DAY = 24 * exports.ONE_HOUR;\nexports.ONE_YEAR = 365 * exports.ONE_DAY;\nfunction relativeToClocks(relative) {\n return { relative: relative, timeStamp: getCorrectedTimeStamp(relative) };\n}\nfunction timeStampToClocks(timeStamp) {\n return { relative: getRelativeTime(timeStamp), timeStamp: timeStamp };\n}\nfunction getCorrectedTimeStamp(relativeTime) {\n var correctedOrigin = (dateNow() - performance.now());\n // apply correction only for positive drift\n if (correctedOrigin > getNavigationStart()) {\n return Math.round(addDuration(correctedOrigin, relativeTime));\n }\n return getTimeStamp(relativeTime);\n}\nfunction currentDrift() {\n return Math.round(dateNow() - addDuration(getNavigationStart(), performance.now()));\n}\nfunction toServerDuration(duration) {\n if (!(0, numberUtils_1.isNumber)(duration)) {\n return duration;\n }\n return (0, numberUtils_1.round)(duration * 1e6, 0);\n}\nfunction dateNow() {\n // Do not use `Date.now` because sometimes websites are wrongly \"polyfilling\" it. For example, we\n // had some users using a very old version of `datejs`, which patched `Date.now` to return a Date\n // instance instead of a timestamp[1]. Those users are unlikely to fix this, so let's handle this\n // case ourselves.\n // [1]: https://github.com/datejs/Datejs/blob/97f5c7c58c5bc5accdab8aa7602b6ac56462d778/src/core-debug.js#L14-L16\n return new Date().getTime();\n}\nfunction timeStampNow() {\n return dateNow();\n}\nfunction relativeNow() {\n return performance.now();\n}\nfunction clocksNow() {\n return { relative: relativeNow(), timeStamp: timeStampNow() };\n}\nfunction clocksOrigin() {\n return { relative: 0, timeStamp: getNavigationStart() };\n}\nfunction elapsed(start, end) {\n return (end - start);\n}\nfunction addDuration(a, b) {\n return a + b;\n}\n/**\n * Get the time since the navigation was started.\n *\n * Note: this does not use `performance.timeOrigin` because it doesn't seem to reflect the actual\n * time on which the navigation has started: it may be much farther in the past, at least in Firefox 71.\n * Related issue in Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=1429926\n */\nfunction getRelativeTime(timestamp) {\n return (timestamp - getNavigationStart());\n}\nfunction getTimeStamp(relativeTime) {\n return Math.round(addDuration(getNavigationStart(), relativeTime));\n}\nfunction looksLikeRelativeTime(time) {\n return time < exports.ONE_YEAR;\n}\n/**\n * Navigation start slightly change on some rare cases\n */\nvar navigationStart;\nfunction getNavigationStart() {\n if (navigationStart === undefined) {\n navigationStart = performance.timing.navigationStart;\n }\n return navigationStart;\n}\n//# sourceMappingURL=timeUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getType = getType;\n/**\n * Similar to `typeof`, but distinguish plain objects from `null` and arrays\n */\nfunction getType(value) {\n if (value === null) {\n return 'null';\n }\n if (Array.isArray(value)) {\n return 'array';\n }\n return typeof value;\n}\n//# sourceMappingURL=typeUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.normalizeUrl = normalizeUrl;\nexports.isValidUrl = isValidUrl;\nexports.getPathName = getPathName;\nexports.buildUrl = buildUrl;\nvar jsonStringify_1 = require(\"../serialisation/jsonStringify\");\nfunction normalizeUrl(url) {\n return buildUrl(url, location.href).href;\n}\nfunction isValidUrl(url) {\n try {\n return !!buildUrl(url);\n }\n catch (_a) {\n return false;\n }\n}\nfunction getPathName(url) {\n var pathname = buildUrl(url).pathname;\n return pathname[0] === '/' ? pathname : \"/\".concat(pathname);\n}\nfunction buildUrl(url, base) {\n var supportedURL = getSupportedUrl();\n if (supportedURL) {\n try {\n return base !== undefined ? new supportedURL(url, base) : new supportedURL(url);\n }\n catch (error) {\n throw new Error(\"Failed to construct URL: \".concat(String(error), \" \").concat((0, jsonStringify_1.jsonStringify)({ url: url, base: base })));\n }\n }\n if (base === undefined && !/:/.test(url)) {\n throw new Error(\"Invalid URL: '\".concat(url, \"'\"));\n }\n var doc = document;\n var anchorElement = doc.createElement('a');\n if (base !== undefined) {\n doc = document.implementation.createHTMLDocument('');\n var baseElement = doc.createElement('base');\n baseElement.href = base;\n doc.head.appendChild(baseElement);\n doc.body.appendChild(anchorElement);\n }\n anchorElement.href = url;\n return anchorElement;\n}\nvar originalURL = URL;\nvar isURLSupported;\nfunction getSupportedUrl() {\n if (isURLSupported === undefined) {\n try {\n var url = new originalURL('http://test/path');\n isURLSupported = url.href === 'http://test/path';\n }\n catch (_a) {\n isURLSupported = false;\n }\n }\n return isURLSupported ? originalURL : undefined;\n}\n//# sourceMappingURL=urlPolyfill.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CLEAR_OLD_VALUES_INTERVAL = void 0;\nexports.createValueHistory = createValueHistory;\nvar timer_1 = require(\"./timer\");\nvar arrayUtils_1 = require(\"./utils/arrayUtils\");\nvar timeUtils_1 = require(\"./utils/timeUtils\");\nvar END_OF_TIMES = Infinity;\nexports.CLEAR_OLD_VALUES_INTERVAL = timeUtils_1.ONE_MINUTE;\nfunction createValueHistory(_a) {\n var expireDelay = _a.expireDelay, maxEntries = _a.maxEntries;\n var entries = [];\n var clearOldValuesInterval = (0, timer_1.setInterval)(function () { return clearOldValues(); }, exports.CLEAR_OLD_VALUES_INTERVAL);\n function clearOldValues() {\n var oldTimeThreshold = (0, timeUtils_1.relativeNow)() - expireDelay;\n while (entries.length > 0 && entries[entries.length - 1].endTime < oldTimeThreshold) {\n entries.pop();\n }\n }\n /**\n * Add a value to the history associated with a start time. Returns a reference to this newly\n * added entry that can be removed or closed.\n */\n function add(value, startTime) {\n var entry = {\n value: value,\n startTime: startTime,\n endTime: END_OF_TIMES,\n remove: function () {\n (0, arrayUtils_1.removeItem)(entries, entry);\n },\n close: function (endTime) {\n entry.endTime = endTime;\n },\n };\n if (maxEntries && entries.length >= maxEntries) {\n entries.pop();\n }\n entries.unshift(entry);\n return entry;\n }\n /**\n * Return the latest value that was active during `startTime`, or the currently active value\n * if no `startTime` is provided. This method assumes that entries are not overlapping.\n *\n * If `option.returnInactive` is true, returns the value at `startTime` (active or not).\n */\n function find(startTime, options) {\n if (startTime === void 0) { startTime = END_OF_TIMES; }\n if (options === void 0) { options = { returnInactive: false }; }\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n var entry = entries_1[_i];\n if (entry.startTime <= startTime) {\n if (options.returnInactive || startTime <= entry.endTime) {\n return entry.value;\n }\n break;\n }\n }\n }\n /**\n * Helper function to close the currently active value, if any. This method assumes that entries\n * are not overlapping.\n */\n function closeActive(endTime) {\n var latestEntry = entries[0];\n if (latestEntry && latestEntry.endTime === END_OF_TIMES) {\n latestEntry.close(endTime);\n }\n }\n /**\n * Return all values with an active period overlapping with the duration,\n * or all values that were active during `startTime` if no duration is provided,\n * or all currently active values if no `startTime` is provided.\n */\n function findAll(startTime, duration) {\n if (startTime === void 0) { startTime = END_OF_TIMES; }\n if (duration === void 0) { duration = 0; }\n var endTime = (0, timeUtils_1.addDuration)(startTime, duration);\n return entries\n .filter(function (entry) { return entry.startTime <= endTime && startTime <= entry.endTime; })\n .map(function (entry) { return entry.value; });\n }\n /**\n * Remove all entries from this collection.\n */\n function reset() {\n entries = [];\n }\n /**\n * Stop internal garbage collection of past entries.\n */\n function stop() {\n (0, timer_1.clearInterval)(clearOldValuesInterval);\n }\n return { add: add, find: find, closeActive: closeActive, findAll: findAll, reset: reset, stop: stop };\n}\n//# sourceMappingURL=valueHistory.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createBatch = createBatch;\nvar display_1 = require(\"../tools/display\");\nvar polyfills_1 = require(\"../tools/utils/polyfills\");\nvar pageExitObservable_1 = require(\"../browser/pageExitObservable\");\nvar jsonStringify_1 = require(\"../tools/serialisation/jsonStringify\");\nvar byteUtils_1 = require(\"../tools/utils/byteUtils\");\nfunction createBatch(_a) {\n var encoder = _a.encoder, request = _a.request, flushController = _a.flushController, messageBytesLimit = _a.messageBytesLimit;\n var upsertBuffer = {};\n var flushSubscription = flushController.flushObservable.subscribe(function (event) { return flush(event); });\n function push(serializedMessage, estimatedMessageBytesCount, key) {\n flushController.notifyBeforeAddMessage(estimatedMessageBytesCount);\n if (key !== undefined) {\n upsertBuffer[key] = serializedMessage;\n flushController.notifyAfterAddMessage();\n }\n else {\n encoder.write(encoder.isEmpty ? serializedMessage : \"\\n\".concat(serializedMessage), function (realMessageBytesCount) {\n flushController.notifyAfterAddMessage(realMessageBytesCount - estimatedMessageBytesCount);\n });\n }\n }\n function hasMessageFor(key) {\n return key !== undefined && upsertBuffer[key] !== undefined;\n }\n function remove(key) {\n var removedMessage = upsertBuffer[key];\n delete upsertBuffer[key];\n var messageBytesCount = encoder.estimateEncodedBytesCount(removedMessage);\n flushController.notifyAfterRemoveMessage(messageBytesCount);\n }\n function addOrUpdate(message, key) {\n var serializedMessage = (0, jsonStringify_1.jsonStringify)(message);\n var estimatedMessageBytesCount = encoder.estimateEncodedBytesCount(serializedMessage);\n if (estimatedMessageBytesCount >= messageBytesLimit) {\n display_1.display.warn(\"Discarded a message whose size was bigger than the maximum allowed size \".concat(messageBytesLimit, \"KB. \").concat(display_1.MORE_DETAILS, \" \").concat(display_1.DOCS_TROUBLESHOOTING, \"/#technical-limitations\"));\n return;\n }\n if (hasMessageFor(key)) {\n remove(key);\n }\n push(serializedMessage, estimatedMessageBytesCount, key);\n }\n function flush(event) {\n var upsertMessages = (0, polyfills_1.objectValues)(upsertBuffer).join('\\n');\n upsertBuffer = {};\n var isPageExit = (0, pageExitObservable_1.isPageExitReason)(event.reason);\n var send = isPageExit ? request.sendOnExit : request.send;\n if (isPageExit &&\n // Note: checking that the encoder is async is not strictly needed, but it's an optimization:\n // if the encoder is async we need to send two requests in some cases (one for encoded data\n // and the other for non-encoded data). But if it's not async, we don't have to worry about\n // it and always send a single request.\n encoder.isAsync) {\n var encoderResult = encoder.finishSync();\n // Send encoded messages\n if (encoderResult.outputBytesCount) {\n send(formatPayloadFromEncoder(encoderResult));\n }\n // Send messages that are not yet encoded at this point\n var pendingMessages = [encoderResult.pendingData, upsertMessages].filter(Boolean).join('\\n');\n if (pendingMessages) {\n send({\n data: pendingMessages,\n bytesCount: (0, byteUtils_1.computeBytesCount)(pendingMessages),\n });\n }\n }\n else {\n if (upsertMessages) {\n encoder.write(encoder.isEmpty ? upsertMessages : \"\\n\".concat(upsertMessages));\n }\n encoder.finish(function (encoderResult) {\n send(formatPayloadFromEncoder(encoderResult));\n });\n }\n }\n return {\n flushController: flushController,\n add: addOrUpdate,\n upsert: addOrUpdate,\n stop: flushSubscription.unsubscribe,\n };\n}\nfunction formatPayloadFromEncoder(encoderResult) {\n var data;\n if (typeof encoderResult.output === 'string') {\n data = encoderResult.output;\n }\n else {\n data = new Blob([encoderResult.output], {\n // This will set the 'Content-Type: text/plain' header. Reasoning:\n // * The intake rejects the request if there is no content type.\n // * The browser will issue CORS preflight requests if we set it to 'application/json', which\n // could induce higher intake load (and maybe has other impacts).\n // * Also it's not quite JSON, since we are concatenating multiple JSON objects separated by\n // new lines.\n type: 'text/plain',\n });\n }\n return {\n data: data,\n bytesCount: encoderResult.outputBytesCount,\n encoding: encoderResult.encoding,\n };\n}\n//# sourceMappingURL=batch.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEventBridge = getEventBridge;\nexports.bridgeSupports = bridgeSupports;\nexports.canUseEventBridge = canUseEventBridge;\nvar polyfills_1 = require(\"../tools/utils/polyfills\");\nvar getGlobalObject_1 = require(\"../tools/getGlobalObject\");\nfunction getEventBridge() {\n var eventBridgeGlobal = getEventBridgeGlobal();\n if (!eventBridgeGlobal) {\n return;\n }\n return {\n getCapabilities: function () {\n var _a;\n return JSON.parse(((_a = eventBridgeGlobal.getCapabilities) === null || _a === void 0 ? void 0 : _a.call(eventBridgeGlobal)) || '[]');\n },\n getPrivacyLevel: function () {\n var _a;\n return (_a = eventBridgeGlobal.getPrivacyLevel) === null || _a === void 0 ? void 0 : _a.call(eventBridgeGlobal);\n },\n getAllowedWebViewHosts: function () {\n return JSON.parse(eventBridgeGlobal.getAllowedWebViewHosts());\n },\n send: function (eventType, event, viewId) {\n var view = viewId ? { id: viewId } : undefined;\n eventBridgeGlobal.send(JSON.stringify({ eventType: eventType, event: event, view: view }));\n },\n };\n}\nfunction bridgeSupports(capability) {\n var bridge = getEventBridge();\n return !!bridge && (0, polyfills_1.includes)(bridge.getCapabilities(), capability);\n}\nfunction canUseEventBridge(currentHost) {\n var _a;\n if (currentHost === void 0) { currentHost = (_a = (0, getGlobalObject_1.getGlobalObject)().location) === null || _a === void 0 ? void 0 : _a.hostname; }\n var bridge = getEventBridge();\n return (!!bridge &&\n bridge\n .getAllowedWebViewHosts()\n .some(function (allowedHost) { return currentHost === allowedHost || (0, polyfills_1.endsWith)(currentHost, \".\".concat(allowedHost)); }));\n}\nfunction getEventBridgeGlobal() {\n return (0, getGlobalObject_1.getGlobalObject)().DatadogEventBridge;\n}\n//# sourceMappingURL=eventBridge.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createFlushController = createFlushController;\nvar observable_1 = require(\"../tools/observable\");\nvar timer_1 = require(\"../tools/timer\");\n/**\n * Returns a \"flush controller\", responsible of notifying when flushing a pool of pending data needs\n * to happen. The implementation is designed to support both synchronous and asynchronous usages,\n * but relies on invariants described in each method documentation to keep a coherent state.\n */\nfunction createFlushController(_a) {\n var messagesLimit = _a.messagesLimit, bytesLimit = _a.bytesLimit, durationLimit = _a.durationLimit, pageExitObservable = _a.pageExitObservable, sessionExpireObservable = _a.sessionExpireObservable;\n var pageExitSubscription = pageExitObservable.subscribe(function (event) { return flush(event.reason); });\n var sessionExpireSubscription = sessionExpireObservable.subscribe(function () { return flush('session_expire'); });\n var flushObservable = new observable_1.Observable(function () { return function () {\n pageExitSubscription.unsubscribe();\n sessionExpireSubscription.unsubscribe();\n }; });\n var currentBytesCount = 0;\n var currentMessagesCount = 0;\n function flush(flushReason) {\n if (currentMessagesCount === 0) {\n return;\n }\n var messagesCount = currentMessagesCount;\n var bytesCount = currentBytesCount;\n currentMessagesCount = 0;\n currentBytesCount = 0;\n cancelDurationLimitTimeout();\n flushObservable.notify({\n reason: flushReason,\n messagesCount: messagesCount,\n bytesCount: bytesCount,\n });\n }\n var durationLimitTimeoutId;\n function scheduleDurationLimitTimeout() {\n if (durationLimitTimeoutId === undefined) {\n durationLimitTimeoutId = (0, timer_1.setTimeout)(function () {\n flush('duration_limit');\n }, durationLimit);\n }\n }\n function cancelDurationLimitTimeout() {\n (0, timer_1.clearTimeout)(durationLimitTimeoutId);\n durationLimitTimeoutId = undefined;\n }\n return {\n flushObservable: flushObservable,\n get messagesCount() {\n return currentMessagesCount;\n },\n /**\n * Notifies that a message will be added to a pool of pending messages waiting to be flushed.\n *\n * This function needs to be called synchronously, right before adding the message, so no flush\n * event can happen after `notifyBeforeAddMessage` and before adding the message.\n *\n * @param estimatedMessageBytesCount: an estimation of the message bytes count once it is\n * actually added.\n */\n notifyBeforeAddMessage: function (estimatedMessageBytesCount) {\n if (currentBytesCount + estimatedMessageBytesCount >= bytesLimit) {\n flush('bytes_limit');\n }\n // Consider the message to be added now rather than in `notifyAfterAddMessage`, because if no\n // message was added yet and `notifyAfterAddMessage` is called asynchronously, we still want\n // to notify when a flush is needed (for example on page exit).\n currentMessagesCount += 1;\n currentBytesCount += estimatedMessageBytesCount;\n scheduleDurationLimitTimeout();\n },\n /**\n * Notifies that a message *was* added to a pool of pending messages waiting to be flushed.\n *\n * This function can be called asynchronously after the message was added, but in this case it\n * should not be called if a flush event occurred in between.\n *\n * @param messageBytesCountDiff: the difference between the estimated message bytes count and\n * its actual bytes count once added to the pool.\n */\n notifyAfterAddMessage: function (messageBytesCountDiff) {\n if (messageBytesCountDiff === void 0) { messageBytesCountDiff = 0; }\n currentBytesCount += messageBytesCountDiff;\n if (currentMessagesCount >= messagesLimit) {\n flush('messages_limit');\n }\n else if (currentBytesCount >= bytesLimit) {\n flush('bytes_limit');\n }\n },\n /**\n * Notifies that a message was removed from a pool of pending messages waiting to be flushed.\n *\n * This function needs to be called synchronously, right after removing the message, so no flush\n * event can happen after removing the message and before `notifyAfterRemoveMessage`.\n *\n * @param messageBytesCount: the message bytes count that was added to the pool. Should\n * correspond to the sum of bytes counts passed to `notifyBeforeAddMessage` and\n * `notifyAfterAddMessage`.\n */\n notifyAfterRemoveMessage: function (messageBytesCount) {\n currentBytesCount -= messageBytesCount;\n currentMessagesCount -= 1;\n if (currentMessagesCount === 0) {\n cancelDurationLimitTimeout();\n }\n },\n };\n}\n//# sourceMappingURL=flushController.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createHttpRequest = createHttpRequest;\nexports.fetchKeepAliveStrategy = fetchKeepAliveStrategy;\nexports.sendXHR = sendXHR;\nvar telemetry_1 = require(\"../domain/telemetry\");\nvar monitor_1 = require(\"../tools/monitor\");\nvar addEventListener_1 = require(\"../browser/addEventListener\");\nvar sendWithRetryStrategy_1 = require(\"./sendWithRetryStrategy\");\nfunction createHttpRequest(endpointBuilder, bytesLimit, reportError) {\n var retryState = (0, sendWithRetryStrategy_1.newRetryState)();\n var sendStrategyForRetry = function (payload, onResponse) {\n return fetchKeepAliveStrategy(endpointBuilder, bytesLimit, payload, onResponse);\n };\n return {\n send: function (payload) {\n (0, sendWithRetryStrategy_1.sendWithRetryStrategy)(payload, retryState, sendStrategyForRetry, endpointBuilder.trackType, reportError);\n },\n /**\n * Since fetch keepalive behaves like regular fetch on Firefox,\n * keep using sendBeaconStrategy on exit\n */\n sendOnExit: function (payload) {\n sendBeaconStrategy(endpointBuilder, bytesLimit, payload);\n },\n };\n}\nfunction sendBeaconStrategy(endpointBuilder, bytesLimit, payload) {\n var canUseBeacon = !!navigator.sendBeacon && payload.bytesCount < bytesLimit;\n if (canUseBeacon) {\n try {\n var beaconUrl = endpointBuilder.build('beacon', payload);\n var isQueued = navigator.sendBeacon(beaconUrl, payload.data);\n if (isQueued) {\n return;\n }\n }\n catch (e) {\n reportBeaconError(e);\n }\n }\n var xhrUrl = endpointBuilder.build('xhr', payload);\n sendXHR(xhrUrl, payload.data);\n}\nvar hasReportedBeaconError = false;\nfunction reportBeaconError(e) {\n if (!hasReportedBeaconError) {\n hasReportedBeaconError = true;\n (0, telemetry_1.addTelemetryError)(e);\n }\n}\nfunction fetchKeepAliveStrategy(endpointBuilder, bytesLimit, payload, onResponse) {\n var canUseKeepAlive = isKeepAliveSupported() && payload.bytesCount < bytesLimit;\n if (canUseKeepAlive) {\n var fetchUrl = endpointBuilder.build('fetch', payload);\n fetch(fetchUrl, { method: 'POST', body: payload.data, keepalive: true, mode: 'cors' }).then((0, monitor_1.monitor)(function (response) { return onResponse === null || onResponse === void 0 ? void 0 : onResponse({ status: response.status, type: response.type }); }), (0, monitor_1.monitor)(function () {\n var xhrUrl = endpointBuilder.build('xhr', payload);\n // failed to queue the request\n sendXHR(xhrUrl, payload.data, onResponse);\n }));\n }\n else {\n var xhrUrl = endpointBuilder.build('xhr', payload);\n sendXHR(xhrUrl, payload.data, onResponse);\n }\n}\nfunction isKeepAliveSupported() {\n // Request can throw, cf https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#errors\n try {\n return window.Request && 'keepalive' in new Request('http://a');\n }\n catch (_a) {\n return false;\n }\n}\nfunction sendXHR(url, data, onResponse) {\n var request = new XMLHttpRequest();\n request.open('POST', url, true);\n if (data instanceof Blob) {\n // When using a Blob instance, IE does not use its 'type' to define the 'Content-Type' header\n // automatically, so the intake request ends up being rejected with an HTTP status 415\n // Defining the header manually fixes this issue.\n request.setRequestHeader('Content-Type', data.type);\n }\n (0, addEventListener_1.addEventListener)(\n // allow untrusted event to acount for synthetic event dispatched by third party xhr wrapper\n { allowUntrustedEvents: true }, request, 'loadend', function () {\n onResponse === null || onResponse === void 0 ? void 0 : onResponse({ status: request.status });\n }, {\n // prevent multiple onResponse callbacks\n // if the xhr instance is reused by a third party\n once: true,\n });\n request.send(data);\n}\n//# sourceMappingURL=httpRequest.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createFlushController = exports.startBatchWithReplica = exports.getEventBridge = exports.bridgeSupports = exports.canUseEventBridge = exports.createHttpRequest = void 0;\nvar httpRequest_1 = require(\"./httpRequest\");\nObject.defineProperty(exports, \"createHttpRequest\", { enumerable: true, get: function () { return httpRequest_1.createHttpRequest; } });\nvar eventBridge_1 = require(\"./eventBridge\");\nObject.defineProperty(exports, \"canUseEventBridge\", { enumerable: true, get: function () { return eventBridge_1.canUseEventBridge; } });\nObject.defineProperty(exports, \"bridgeSupports\", { enumerable: true, get: function () { return eventBridge_1.bridgeSupports; } });\nObject.defineProperty(exports, \"getEventBridge\", { enumerable: true, get: function () { return eventBridge_1.getEventBridge; } });\nvar startBatchWithReplica_1 = require(\"./startBatchWithReplica\");\nObject.defineProperty(exports, \"startBatchWithReplica\", { enumerable: true, get: function () { return startBatchWithReplica_1.startBatchWithReplica; } });\nvar flushController_1 = require(\"./flushController\");\nObject.defineProperty(exports, \"createFlushController\", { enumerable: true, get: function () { return flushController_1.createFlushController; } });\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.INITIAL_BACKOFF_TIME = exports.MAX_BACKOFF_TIME = exports.MAX_QUEUE_BYTES_COUNT = exports.MAX_ONGOING_REQUESTS = exports.MAX_ONGOING_BYTES_COUNT = void 0;\nexports.sendWithRetryStrategy = sendWithRetryStrategy;\nexports.newRetryState = newRetryState;\nvar timer_1 = require(\"../tools/timer\");\nvar timeUtils_1 = require(\"../tools/utils/timeUtils\");\nvar byteUtils_1 = require(\"../tools/utils/byteUtils\");\nvar responseUtils_1 = require(\"../tools/utils/responseUtils\");\nvar error_types_1 = require(\"../domain/error/error.types\");\nexports.MAX_ONGOING_BYTES_COUNT = 80 * byteUtils_1.ONE_KIBI_BYTE;\nexports.MAX_ONGOING_REQUESTS = 32;\nexports.MAX_QUEUE_BYTES_COUNT = 3 * byteUtils_1.ONE_MEBI_BYTE;\nexports.MAX_BACKOFF_TIME = timeUtils_1.ONE_MINUTE;\nexports.INITIAL_BACKOFF_TIME = timeUtils_1.ONE_SECOND;\nfunction sendWithRetryStrategy(payload, state, sendStrategy, trackType, reportError) {\n if (state.transportStatus === 0 /* TransportStatus.UP */ &&\n state.queuedPayloads.size() === 0 &&\n state.bandwidthMonitor.canHandle(payload)) {\n send(payload, state, sendStrategy, {\n onSuccess: function () { return retryQueuedPayloads(0 /* RetryReason.AFTER_SUCCESS */, state, sendStrategy, trackType, reportError); },\n onFailure: function () {\n state.queuedPayloads.enqueue(payload);\n scheduleRetry(state, sendStrategy, trackType, reportError);\n },\n });\n }\n else {\n state.queuedPayloads.enqueue(payload);\n }\n}\nfunction scheduleRetry(state, sendStrategy, trackType, reportError) {\n if (state.transportStatus !== 2 /* TransportStatus.DOWN */) {\n return;\n }\n (0, timer_1.setTimeout)(function () {\n var payload = state.queuedPayloads.first();\n send(payload, state, sendStrategy, {\n onSuccess: function () {\n state.queuedPayloads.dequeue();\n state.currentBackoffTime = exports.INITIAL_BACKOFF_TIME;\n retryQueuedPayloads(1 /* RetryReason.AFTER_RESUME */, state, sendStrategy, trackType, reportError);\n },\n onFailure: function () {\n state.currentBackoffTime = Math.min(exports.MAX_BACKOFF_TIME, state.currentBackoffTime * 2);\n scheduleRetry(state, sendStrategy, trackType, reportError);\n },\n });\n }, state.currentBackoffTime);\n}\nfunction send(payload, state, sendStrategy, _a) {\n var onSuccess = _a.onSuccess, onFailure = _a.onFailure;\n state.bandwidthMonitor.add(payload);\n sendStrategy(payload, function (response) {\n state.bandwidthMonitor.remove(payload);\n if (!shouldRetryRequest(response)) {\n state.transportStatus = 0 /* TransportStatus.UP */;\n onSuccess();\n }\n else {\n // do not consider transport down if another ongoing request could succeed\n state.transportStatus =\n state.bandwidthMonitor.ongoingRequestCount > 0 ? 1 /* TransportStatus.FAILURE_DETECTED */ : 2 /* TransportStatus.DOWN */;\n payload.retry = {\n count: payload.retry ? payload.retry.count + 1 : 1,\n lastFailureStatus: response.status,\n };\n onFailure();\n }\n });\n}\nfunction retryQueuedPayloads(reason, state, sendStrategy, trackType, reportError) {\n if (reason === 0 /* RetryReason.AFTER_SUCCESS */ && state.queuedPayloads.isFull() && !state.queueFullReported) {\n reportError({\n message: \"Reached max \".concat(trackType, \" events size queued for upload: \").concat(exports.MAX_QUEUE_BYTES_COUNT / byteUtils_1.ONE_MEBI_BYTE, \"MiB\"),\n source: error_types_1.ErrorSource.AGENT,\n startClocks: (0, timeUtils_1.clocksNow)(),\n });\n state.queueFullReported = true;\n }\n var previousQueue = state.queuedPayloads;\n state.queuedPayloads = newPayloadQueue();\n while (previousQueue.size() > 0) {\n sendWithRetryStrategy(previousQueue.dequeue(), state, sendStrategy, trackType, reportError);\n }\n}\nfunction shouldRetryRequest(response) {\n return (response.type !== 'opaque' &&\n ((response.status === 0 && !navigator.onLine) ||\n response.status === 408 ||\n response.status === 429 ||\n (0, responseUtils_1.isServerError)(response.status)));\n}\nfunction newRetryState() {\n return {\n transportStatus: 0 /* TransportStatus.UP */,\n currentBackoffTime: exports.INITIAL_BACKOFF_TIME,\n bandwidthMonitor: newBandwidthMonitor(),\n queuedPayloads: newPayloadQueue(),\n queueFullReported: false,\n };\n}\nfunction newPayloadQueue() {\n var queue = [];\n return {\n bytesCount: 0,\n enqueue: function (payload) {\n if (this.isFull()) {\n return;\n }\n queue.push(payload);\n this.bytesCount += payload.bytesCount;\n },\n first: function () {\n return queue[0];\n },\n dequeue: function () {\n var payload = queue.shift();\n if (payload) {\n this.bytesCount -= payload.bytesCount;\n }\n return payload;\n },\n size: function () {\n return queue.length;\n },\n isFull: function () {\n return this.bytesCount >= exports.MAX_QUEUE_BYTES_COUNT;\n },\n };\n}\nfunction newBandwidthMonitor() {\n return {\n ongoingRequestCount: 0,\n ongoingByteCount: 0,\n canHandle: function (payload) {\n return (this.ongoingRequestCount === 0 ||\n (this.ongoingByteCount + payload.bytesCount <= exports.MAX_ONGOING_BYTES_COUNT &&\n this.ongoingRequestCount < exports.MAX_ONGOING_REQUESTS));\n },\n add: function (payload) {\n this.ongoingRequestCount += 1;\n this.ongoingByteCount += payload.bytesCount;\n },\n remove: function (payload) {\n this.ongoingRequestCount -= 1;\n this.ongoingByteCount -= payload.bytesCount;\n },\n };\n}\n//# sourceMappingURL=sendWithRetryStrategy.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startBatchWithReplica = startBatchWithReplica;\nvar batch_1 = require(\"./batch\");\nvar httpRequest_1 = require(\"./httpRequest\");\nvar flushController_1 = require(\"./flushController\");\nfunction startBatchWithReplica(configuration, primary, replica, reportError, pageExitObservable, sessionExpireObservable, batchFactoryImp) {\n if (batchFactoryImp === void 0) { batchFactoryImp = batch_1.createBatch; }\n var primaryBatch = createBatchFromConfig(configuration, primary);\n var replicaBatch = replica && createBatchFromConfig(configuration, replica);\n function createBatchFromConfig(configuration, _a) {\n var endpoint = _a.endpoint, encoder = _a.encoder;\n return batchFactoryImp({\n encoder: encoder,\n request: (0, httpRequest_1.createHttpRequest)(endpoint, configuration.batchBytesLimit, reportError),\n flushController: (0, flushController_1.createFlushController)({\n messagesLimit: configuration.batchMessagesLimit,\n bytesLimit: configuration.batchBytesLimit,\n durationLimit: configuration.flushTimeout,\n pageExitObservable: pageExitObservable,\n sessionExpireObservable: sessionExpireObservable,\n }),\n messageBytesLimit: configuration.messageBytesLimit,\n });\n }\n return {\n flushObservable: primaryBatch.flushController.flushObservable,\n add: function (message, replicated) {\n if (replicated === void 0) { replicated = true; }\n primaryBatch.add(message);\n if (replicaBatch && replicated) {\n replicaBatch.add(replica.transformMessage ? replica.transformMessage(message) : message);\n }\n },\n upsert: function (message, key) {\n primaryBatch.upsert(message, key);\n if (replicaBatch) {\n replicaBatch.upsert(replica.transformMessage ? replica.transformMessage(message) : message, key);\n }\n },\n stop: function () {\n primaryBatch.stop();\n if (replicaBatch) {\n replicaBatch.stop();\n }\n },\n };\n}\n//# sourceMappingURL=startBatchWithReplica.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeLogsPublicApi = makeLogsPublicApi;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar logger_1 = require(\"../domain/logger\");\nvar commonContext_1 = require(\"../domain/contexts/commonContext\");\nvar preStartLogs_1 = require(\"./preStartLogs\");\nvar LOGS_STORAGE_KEY = 'logs';\nfunction makeLogsPublicApi(startLogsImpl) {\n var customerDataTrackerManager = (0, browser_core_1.createCustomerDataTrackerManager)();\n var globalContextManager = (0, browser_core_1.createContextManager)(customerDataTrackerManager.getOrCreateTracker(2 /* CustomerDataType.GlobalContext */));\n var userContextManager = (0, browser_core_1.createContextManager)(customerDataTrackerManager.getOrCreateTracker(1 /* CustomerDataType.User */));\n var trackingConsentState = (0, browser_core_1.createTrackingConsentState)();\n function getCommonContext() {\n return (0, commonContext_1.buildCommonContext)(globalContextManager, userContextManager);\n }\n var strategy = (0, preStartLogs_1.createPreStartStrategy)(getCommonContext, trackingConsentState, function (initConfiguration, configuration) {\n if (initConfiguration.storeContextsAcrossPages) {\n (0, browser_core_1.storeContextManager)(configuration, globalContextManager, LOGS_STORAGE_KEY, 2 /* CustomerDataType.GlobalContext */);\n (0, browser_core_1.storeContextManager)(configuration, userContextManager, LOGS_STORAGE_KEY, 1 /* CustomerDataType.User */);\n }\n var startLogsResult = startLogsImpl(initConfiguration, configuration, getCommonContext, trackingConsentState);\n strategy = createPostStartStrategy(initConfiguration, startLogsResult);\n return startLogsResult;\n });\n var customLoggers = {};\n var mainLogger = new logger_1.Logger(function () {\n var params = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n params[_i] = arguments[_i];\n }\n return strategy.handleLog.apply(strategy, params);\n }, customerDataTrackerManager.createDetachedTracker());\n return (0, browser_core_1.makePublicApi)({\n logger: mainLogger,\n init: (0, browser_core_1.monitor)(function (initConfiguration) { return strategy.init(initConfiguration); }),\n setTrackingConsent: (0, browser_core_1.monitor)(function (trackingConsent) {\n trackingConsentState.update(trackingConsent);\n (0, browser_core_1.addTelemetryUsage)({ feature: 'set-tracking-consent', tracking_consent: trackingConsent });\n }),\n getGlobalContext: (0, browser_core_1.monitor)(function () { return globalContextManager.getContext(); }),\n setGlobalContext: (0, browser_core_1.monitor)(function (context) { return globalContextManager.setContext(context); }),\n setGlobalContextProperty: (0, browser_core_1.monitor)(function (key, value) { return globalContextManager.setContextProperty(key, value); }),\n removeGlobalContextProperty: (0, browser_core_1.monitor)(function (key) { return globalContextManager.removeContextProperty(key); }),\n clearGlobalContext: (0, browser_core_1.monitor)(function () { return globalContextManager.clearContext(); }),\n createLogger: (0, browser_core_1.monitor)(function (name, conf) {\n if (conf === void 0) { conf = {}; }\n customLoggers[name] = new logger_1.Logger(function () {\n var params = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n params[_i] = arguments[_i];\n }\n return strategy.handleLog.apply(strategy, params);\n }, customerDataTrackerManager.createDetachedTracker(), (0, browser_core_1.sanitize)(name), conf.handler, conf.level, (0, browser_core_1.sanitize)(conf.context));\n return customLoggers[name];\n }),\n getLogger: (0, browser_core_1.monitor)(function (name) { return customLoggers[name]; }),\n getInitConfiguration: (0, browser_core_1.monitor)(function () { return (0, browser_core_1.deepClone)(strategy.initConfiguration); }),\n getInternalContext: (0, browser_core_1.monitor)(function (startTime) { return strategy.getInternalContext(startTime); }),\n setUser: (0, browser_core_1.monitor)(function (newUser) {\n if ((0, browser_core_1.checkUser)(newUser)) {\n userContextManager.setContext((0, browser_core_1.sanitizeUser)(newUser));\n }\n }),\n getUser: (0, browser_core_1.monitor)(function () { return userContextManager.getContext(); }),\n setUserProperty: (0, browser_core_1.monitor)(function (key, property) {\n var _a;\n var sanitizedProperty = (0, browser_core_1.sanitizeUser)((_a = {}, _a[key] = property, _a))[key];\n userContextManager.setContextProperty(key, sanitizedProperty);\n }),\n removeUserProperty: (0, browser_core_1.monitor)(function (key) { return userContextManager.removeContextProperty(key); }),\n clearUser: (0, browser_core_1.monitor)(function () { return userContextManager.clearContext(); }),\n });\n}\nfunction createPostStartStrategy(initConfiguration, startLogsResult) {\n return (0, browser_core_1.assign)({\n init: function (initConfiguration) {\n (0, browser_core_1.displayAlreadyInitializedError)('DD_LOGS', initConfiguration);\n },\n initConfiguration: initConfiguration,\n }, startLogsResult);\n}\n//# sourceMappingURL=logsPublicApi.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createPreStartStrategy = createPreStartStrategy;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar configuration_1 = require(\"../domain/configuration\");\nfunction createPreStartStrategy(getCommonContext, trackingConsentState, doStartLogs) {\n var bufferApiCalls = (0, browser_core_1.createBoundedBuffer)();\n var cachedInitConfiguration;\n var cachedConfiguration;\n var trackingConsentStateSubscription = trackingConsentState.observable.subscribe(tryStartLogs);\n function tryStartLogs() {\n if (!cachedConfiguration || !cachedInitConfiguration || !trackingConsentState.isGranted()) {\n return;\n }\n trackingConsentStateSubscription.unsubscribe();\n var startLogsResult = doStartLogs(cachedInitConfiguration, cachedConfiguration);\n bufferApiCalls.drain(startLogsResult);\n }\n return {\n init: function (initConfiguration) {\n if (!initConfiguration) {\n browser_core_1.display.error('Missing configuration');\n return;\n }\n // Set the experimental feature flags as early as possible, so we can use them in most places\n (0, browser_core_1.initFeatureFlags)(initConfiguration.enableExperimentalFeatures);\n if ((0, browser_core_1.canUseEventBridge)()) {\n initConfiguration = overrideInitConfigurationForBridge(initConfiguration);\n }\n // Expose the initial configuration regardless of initialization success.\n cachedInitConfiguration = initConfiguration;\n if (cachedConfiguration) {\n (0, browser_core_1.displayAlreadyInitializedError)('DD_LOGS', initConfiguration);\n return;\n }\n var configuration = (0, configuration_1.validateAndBuildLogsConfiguration)(initConfiguration);\n if (!configuration) {\n return;\n }\n cachedConfiguration = configuration;\n // Instrumuent fetch to track network requests\n // This is needed in case the consent is not granted and some cutsomer\n // library (Apollo Client) is storing uninstrumented fetch to be used later\n // The subscrption is needed so that the instrumentation process is completed\n (0, browser_core_1.initFetchObservable)().subscribe(browser_core_1.noop);\n trackingConsentState.tryToInit(configuration.trackingConsent);\n tryStartLogs();\n },\n get initConfiguration() {\n return cachedInitConfiguration;\n },\n getInternalContext: browser_core_1.noop,\n handleLog: function (message, statusType, handlingStack, context, date) {\n if (context === void 0) { context = getCommonContext(); }\n if (date === void 0) { date = (0, browser_core_1.timeStampNow)(); }\n bufferApiCalls.add(function (startLogsResult) {\n return startLogsResult.handleLog(message, statusType, handlingStack, context, date);\n });\n },\n };\n}\nfunction overrideInitConfigurationForBridge(initConfiguration) {\n return (0, browser_core_1.assign)({}, initConfiguration, { clientToken: 'empty' });\n}\n//# sourceMappingURL=preStartLogs.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startLogs = startLogs;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar logsSessionManager_1 = require(\"../domain/logsSessionManager\");\nvar assembly_1 = require(\"../domain/assembly\");\nvar consoleCollection_1 = require(\"../domain/console/consoleCollection\");\nvar reportCollection_1 = require(\"../domain/report/reportCollection\");\nvar networkErrorCollection_1 = require(\"../domain/networkError/networkErrorCollection\");\nvar runtimeErrorCollection_1 = require(\"../domain/runtimeError/runtimeErrorCollection\");\nvar lifeCycle_1 = require(\"../domain/lifeCycle\");\nvar loggerCollection_1 = require(\"../domain/logger/loggerCollection\");\nvar startLogsBatch_1 = require(\"../transport/startLogsBatch\");\nvar startLogsBridge_1 = require(\"../transport/startLogsBridge\");\nvar internalContext_1 = require(\"../domain/contexts/internalContext\");\nvar reportError_1 = require(\"../domain/reportError\");\nvar logsTelemetry_1 = require(\"../domain/logsTelemetry\");\nfunction startLogs(initConfiguration, configuration, getCommonContext, \n// `startLogs` and its subcomponents assume tracking consent is granted initially and starts\n// collecting logs unconditionally. As such, `startLogs` should be called with a\n// `trackingConsentState` set to \"granted\".\ntrackingConsentState) {\n var lifeCycle = new lifeCycle_1.LifeCycle();\n var cleanupTasks = [];\n lifeCycle.subscribe(1 /* LifeCycleEventType.LOG_COLLECTED */, function (log) { return (0, browser_core_1.sendToExtension)('logs', log); });\n var reportError = (0, reportError_1.startReportError)(lifeCycle);\n var pageExitObservable = (0, browser_core_1.createPageExitObservable)(configuration);\n var session = configuration.sessionStoreStrategyType && !(0, browser_core_1.canUseEventBridge)() && !(0, browser_core_1.willSyntheticsInjectRum)()\n ? (0, logsSessionManager_1.startLogsSessionManager)(configuration, trackingConsentState)\n : (0, logsSessionManager_1.startLogsSessionManagerStub)(configuration);\n var stopLogsTelemetry = (0, logsTelemetry_1.startLogsTelemetry)(initConfiguration, configuration, reportError, pageExitObservable, session).stop;\n cleanupTasks.push(function () { return stopLogsTelemetry(); });\n (0, networkErrorCollection_1.startNetworkErrorCollection)(configuration, lifeCycle);\n (0, runtimeErrorCollection_1.startRuntimeErrorCollection)(configuration, lifeCycle);\n (0, consoleCollection_1.startConsoleCollection)(configuration, lifeCycle);\n (0, reportCollection_1.startReportCollection)(configuration, lifeCycle);\n var handleLog = (0, loggerCollection_1.startLoggerCollection)(lifeCycle).handleLog;\n (0, assembly_1.startLogsAssembly)(session, configuration, lifeCycle, getCommonContext, reportError);\n if (!(0, browser_core_1.canUseEventBridge)()) {\n var stopLogsBatch_1 = (0, startLogsBatch_1.startLogsBatch)(configuration, lifeCycle, reportError, pageExitObservable, session).stop;\n cleanupTasks.push(function () { return stopLogsBatch_1(); });\n }\n else {\n (0, startLogsBridge_1.startLogsBridge)(lifeCycle);\n }\n var internalContext = (0, internalContext_1.startInternalContext)(session);\n return {\n handleLog: handleLog,\n getInternalContext: internalContext.get,\n stop: function () {\n cleanupTasks.forEach(function (task) { return task(); });\n },\n };\n}\n//# sourceMappingURL=startLogs.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startLogsAssembly = startLogsAssembly;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar logger_1 = require(\"./logger\");\nvar rumInternalContext_1 = require(\"./contexts/rumInternalContext\");\nfunction startLogsAssembly(sessionManager, configuration, lifeCycle, getCommonContext, reportError) {\n var statusWithCustom = logger_1.STATUSES.concat(['custom']);\n var logRateLimiters = {};\n statusWithCustom.forEach(function (status) {\n logRateLimiters[status] = (0, browser_core_1.createEventRateLimiter)(status, configuration.eventRateLimiterThreshold, reportError);\n });\n lifeCycle.subscribe(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, function (_a) {\n var _b, _c;\n var rawLogsEvent = _a.rawLogsEvent, _d = _a.messageContext, messageContext = _d === void 0 ? undefined : _d, _e = _a.savedCommonContext, savedCommonContext = _e === void 0 ? undefined : _e, domainContext = _a.domainContext;\n var startTime = (0, browser_core_1.getRelativeTime)(rawLogsEvent.date);\n var session = sessionManager.findTrackedSession(startTime);\n if (!session &&\n (!configuration.sendLogsAfterSessionExpiration ||\n !sessionManager.findTrackedSession(startTime, { returnInactive: true }))) {\n return;\n }\n var commonContext = savedCommonContext || getCommonContext();\n var log = (0, browser_core_1.combine)({\n service: configuration.service,\n session_id: session ? session.id : undefined,\n session: session ? { id: session.id } : undefined,\n // Insert user first to allow overrides from global context\n usr: !(0, browser_core_1.isEmptyObject)(commonContext.user) ? commonContext.user : undefined,\n view: commonContext.view,\n }, commonContext.context, (0, rumInternalContext_1.getRUMInternalContext)(startTime), rawLogsEvent, messageContext);\n if (((_b = configuration.beforeSend) === null || _b === void 0 ? void 0 : _b.call(configuration, log, domainContext)) === false ||\n (log.origin !== browser_core_1.ErrorSource.AGENT &&\n ((_c = logRateLimiters[log.status]) !== null && _c !== void 0 ? _c : logRateLimiters['custom']).isLimitReached())) {\n return;\n }\n lifeCycle.notify(1 /* LifeCycleEventType.LOG_COLLECTED */, log);\n });\n}\n//# sourceMappingURL=assembly.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_REQUEST_ERROR_RESPONSE_LENGTH_LIMIT = void 0;\nexports.validateAndBuildLogsConfiguration = validateAndBuildLogsConfiguration;\nexports.validateAndBuildForwardOption = validateAndBuildForwardOption;\nexports.serializeLogsConfiguration = serializeLogsConfiguration;\nvar browser_core_1 = require(\"@datadog/browser-core\");\n/**\n * arbitrary value, byte precision not needed\n */\nexports.DEFAULT_REQUEST_ERROR_RESPONSE_LENGTH_LIMIT = 32 * browser_core_1.ONE_KIBI_BYTE;\nfunction validateAndBuildLogsConfiguration(initConfiguration) {\n if (initConfiguration.usePciIntake === true && initConfiguration.site && initConfiguration.site !== 'datadoghq.com') {\n browser_core_1.display.warn('PCI compliance for Logs is only available for Datadog organizations in the US1 site. Default intake will be used.');\n }\n var baseConfiguration = (0, browser_core_1.validateAndBuildConfiguration)(initConfiguration);\n var forwardConsoleLogs = validateAndBuildForwardOption(initConfiguration.forwardConsoleLogs, (0, browser_core_1.objectValues)(browser_core_1.ConsoleApiName), 'Forward Console Logs');\n var forwardReports = validateAndBuildForwardOption(initConfiguration.forwardReports, (0, browser_core_1.objectValues)(browser_core_1.RawReportType), 'Forward Reports');\n if (!baseConfiguration || !forwardConsoleLogs || !forwardReports) {\n return;\n }\n if (initConfiguration.forwardErrorsToLogs && !(0, browser_core_1.includes)(forwardConsoleLogs, browser_core_1.ConsoleApiName.error)) {\n forwardConsoleLogs.push(browser_core_1.ConsoleApiName.error);\n }\n return (0, browser_core_1.assign)({\n forwardErrorsToLogs: initConfiguration.forwardErrorsToLogs !== false,\n forwardConsoleLogs: forwardConsoleLogs,\n forwardReports: forwardReports,\n requestErrorResponseLengthLimit: exports.DEFAULT_REQUEST_ERROR_RESPONSE_LENGTH_LIMIT,\n sendLogsAfterSessionExpiration: !!initConfiguration.sendLogsAfterSessionExpiration,\n }, baseConfiguration);\n}\nfunction validateAndBuildForwardOption(option, allowedValues, label) {\n if (option === undefined) {\n return [];\n }\n if (!(option === 'all' || (Array.isArray(option) && option.every(function (api) { return (0, browser_core_1.includes)(allowedValues, api); })))) {\n browser_core_1.display.error(\"\".concat(label, \" should be \\\"all\\\" or an array with allowed values \\\"\").concat(allowedValues.join('\", \"'), \"\\\"\"));\n return;\n }\n return option === 'all' ? allowedValues : (0, browser_core_1.removeDuplicates)(option);\n}\nfunction serializeLogsConfiguration(configuration) {\n var baseSerializedInitConfiguration = (0, browser_core_1.serializeConfiguration)(configuration);\n return (0, browser_core_1.assign)({\n forward_errors_to_logs: configuration.forwardErrorsToLogs,\n forward_console_logs: configuration.forwardConsoleLogs,\n forward_reports: configuration.forwardReports,\n use_pci_intake: configuration.usePciIntake,\n send_logs_after_session_expiration: configuration.sendLogsAfterSessionExpiration,\n }, baseSerializedInitConfiguration);\n}\n//# sourceMappingURL=configuration.js.map","\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LogStatusForApi = void 0;\nexports.startConsoleCollection = startConsoleCollection;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar isAuthorized_1 = require(\"../logger/isAuthorized\");\nvar createErrorFieldFromRawError_1 = require(\"../createErrorFieldFromRawError\");\nexports.LogStatusForApi = (_a = {},\n _a[browser_core_1.ConsoleApiName.log] = isAuthorized_1.StatusType.info,\n _a[browser_core_1.ConsoleApiName.debug] = isAuthorized_1.StatusType.debug,\n _a[browser_core_1.ConsoleApiName.info] = isAuthorized_1.StatusType.info,\n _a[browser_core_1.ConsoleApiName.warn] = isAuthorized_1.StatusType.warn,\n _a[browser_core_1.ConsoleApiName.error] = isAuthorized_1.StatusType.error,\n _a);\nfunction startConsoleCollection(configuration, lifeCycle) {\n var consoleSubscription = (0, browser_core_1.initConsoleObservable)(configuration.forwardConsoleLogs).subscribe(function (log) {\n var collectedData = {\n rawLogsEvent: {\n date: (0, browser_core_1.timeStampNow)(),\n message: log.message,\n origin: browser_core_1.ErrorSource.CONSOLE,\n error: log.error && (0, createErrorFieldFromRawError_1.createErrorFieldFromRawError)(log.error),\n status: exports.LogStatusForApi[log.api],\n },\n domainContext: {\n handlingStack: log.handlingStack,\n },\n };\n lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, collectedData);\n });\n return {\n stop: function () {\n consoleSubscription.unsubscribe();\n },\n };\n}\n//# sourceMappingURL=consoleCollection.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.buildCommonContext = buildCommonContext;\nfunction buildCommonContext(globalContextManager, userContextManager) {\n return {\n view: {\n referrer: document.referrer,\n url: window.location.href,\n },\n context: globalContextManager.getContext(),\n user: userContextManager.getContext(),\n };\n}\n//# sourceMappingURL=commonContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startInternalContext = startInternalContext;\nfunction startInternalContext(sessionManager) {\n return {\n get: function (startTime) {\n var trackedSession = sessionManager.findTrackedSession(startTime);\n if (trackedSession) {\n return {\n session_id: trackedSession.id,\n };\n }\n },\n };\n}\n//# sourceMappingURL=internalContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRUMInternalContext = getRUMInternalContext;\nexports.resetRUMInternalContext = resetRUMInternalContext;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar logsSentBeforeRumInjectionTelemetryAdded = false;\nfunction getRUMInternalContext(startTime) {\n var browserWindow = window;\n if ((0, browser_core_1.willSyntheticsInjectRum)()) {\n var context = getInternalContextFromRumGlobal(browserWindow.DD_RUM_SYNTHETICS);\n if (!context && !logsSentBeforeRumInjectionTelemetryAdded) {\n logsSentBeforeRumInjectionTelemetryAdded = true;\n (0, browser_core_1.addTelemetryDebug)('Logs sent before RUM is injected by the synthetics worker', {\n testId: (0, browser_core_1.getSyntheticsTestId)(),\n resultId: (0, browser_core_1.getSyntheticsResultId)(),\n });\n }\n return context;\n }\n return getInternalContextFromRumGlobal(browserWindow.DD_RUM);\n function getInternalContextFromRumGlobal(rumGlobal) {\n if (rumGlobal && rumGlobal.getInternalContext) {\n return rumGlobal.getInternalContext(startTime);\n }\n }\n}\nfunction resetRUMInternalContext() {\n logsSentBeforeRumInjectionTelemetryAdded = false;\n}\n//# sourceMappingURL=rumInternalContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createErrorFieldFromRawError = createErrorFieldFromRawError;\nfunction createErrorFieldFromRawError(rawError, _a) {\n var _b = _a === void 0 ? {} : _a, \n /**\n * Set this to `true` to include the error message in the error field. In most cases, the error\n * message is already included in the log message, so we don't need to include it again.\n */\n _c = _b.includeMessage, \n /**\n * Set this to `true` to include the error message in the error field. In most cases, the error\n * message is already included in the log message, so we don't need to include it again.\n */\n includeMessage = _c === void 0 ? false : _c;\n return {\n stack: rawError.stack,\n kind: rawError.type,\n message: includeMessage ? rawError.message : undefined,\n causes: rawError.causes,\n fingerprint: rawError.fingerprint,\n handling: rawError.handling,\n };\n}\n//# sourceMappingURL=createErrorFieldFromRawError.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LifeCycle = void 0;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nexports.LifeCycle = (browser_core_1.AbstractLifeCycle);\n//# sourceMappingURL=lifeCycle.js.map","\"use strict\";\nvar __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Logger = exports.STATUSES = exports.HandlerType = void 0;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar isAuthorized_1 = require(\"./logger/isAuthorized\");\nvar createErrorFieldFromRawError_1 = require(\"./createErrorFieldFromRawError\");\nexports.HandlerType = {\n console: 'console',\n http: 'http',\n silent: 'silent',\n};\nexports.STATUSES = Object.keys(isAuthorized_1.StatusType);\n// note: it is safe to merge declarations as long as the methods are actually defined on the prototype\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging, no-restricted-syntax\nvar Logger = /** @class */ (function () {\n function Logger(handleLogStrategy, customerDataTracker, name, handlerType, level, loggerContext) {\n if (handlerType === void 0) { handlerType = exports.HandlerType.http; }\n if (level === void 0) { level = isAuthorized_1.StatusType.debug; }\n if (loggerContext === void 0) { loggerContext = {}; }\n this.handleLogStrategy = handleLogStrategy;\n this.handlerType = handlerType;\n this.level = level;\n this.contextManager = (0, browser_core_1.createContextManager)(customerDataTracker);\n this.contextManager.setContext(loggerContext);\n if (name) {\n this.contextManager.setContextProperty('logger', { name: name });\n }\n }\n Logger.prototype.logImplementation = function (message, messageContext, status, error, handlingStack) {\n if (status === void 0) { status = isAuthorized_1.StatusType.info; }\n var sanitizedMessageContext = (0, browser_core_1.sanitize)(messageContext);\n var context;\n if (error !== undefined && error !== null) {\n var rawError = (0, browser_core_1.computeRawError)({\n stackTrace: (0, browser_core_1.isError)(error) ? (0, browser_core_1.computeStackTrace)(error) : undefined,\n originalError: error,\n nonErrorPrefix: \"Provided\" /* NonErrorPrefix.PROVIDED */,\n source: browser_core_1.ErrorSource.LOGGER,\n handling: \"handled\" /* ErrorHandling.HANDLED */,\n startClocks: (0, browser_core_1.clocksNow)(),\n });\n context = (0, browser_core_1.combine)({\n error: (0, createErrorFieldFromRawError_1.createErrorFieldFromRawError)(rawError, { includeMessage: true }),\n }, sanitizedMessageContext);\n }\n else {\n context = sanitizedMessageContext;\n }\n this.handleLogStrategy({\n message: (0, browser_core_1.sanitize)(message),\n context: context,\n status: status,\n }, this, handlingStack);\n };\n Logger.prototype.log = function (message, messageContext, status, error) {\n if (status === void 0) { status = isAuthorized_1.StatusType.info; }\n var handlingStack;\n if ((0, isAuthorized_1.isAuthorized)(status, exports.HandlerType.http, this)) {\n handlingStack = (0, browser_core_1.createHandlingStack)();\n }\n this.logImplementation(message, messageContext, status, error, handlingStack);\n };\n Logger.prototype.setContext = function (context) {\n this.contextManager.setContext(context);\n };\n Logger.prototype.getContext = function () {\n return this.contextManager.getContext();\n };\n Logger.prototype.setContextProperty = function (key, value) {\n this.contextManager.setContextProperty(key, value);\n };\n Logger.prototype.removeContextProperty = function (key) {\n this.contextManager.removeContextProperty(key);\n };\n Logger.prototype.clearContext = function () {\n this.contextManager.clearContext();\n };\n Logger.prototype.setHandler = function (handler) {\n this.handlerType = handler;\n };\n Logger.prototype.getHandler = function () {\n return this.handlerType;\n };\n Logger.prototype.setLevel = function (level) {\n this.level = level;\n };\n Logger.prototype.getLevel = function () {\n return this.level;\n };\n __decorate([\n browser_core_1.monitored\n ], Logger.prototype, \"logImplementation\", null);\n return Logger;\n}());\nexports.Logger = Logger;\n/* eslint-disable local-rules/disallow-side-effects */\nLogger.prototype.ok = createLoggerMethod(isAuthorized_1.StatusType.ok);\nLogger.prototype.debug = createLoggerMethod(isAuthorized_1.StatusType.debug);\nLogger.prototype.info = createLoggerMethod(isAuthorized_1.StatusType.info);\nLogger.prototype.notice = createLoggerMethod(isAuthorized_1.StatusType.notice);\nLogger.prototype.warn = createLoggerMethod(isAuthorized_1.StatusType.warn);\nLogger.prototype.error = createLoggerMethod(isAuthorized_1.StatusType.error);\nLogger.prototype.critical = createLoggerMethod(isAuthorized_1.StatusType.critical);\nLogger.prototype.alert = createLoggerMethod(isAuthorized_1.StatusType.alert);\nLogger.prototype.emerg = createLoggerMethod(isAuthorized_1.StatusType.emerg);\nfunction createLoggerMethod(status) {\n return function (message, messageContext, error) {\n var handlingStack;\n if ((0, isAuthorized_1.isAuthorized)(status, exports.HandlerType.http, this)) {\n handlingStack = (0, browser_core_1.createHandlingStack)();\n }\n this.logImplementation(message, messageContext, status, error, handlingStack);\n };\n}\n//# sourceMappingURL=logger.js.map","\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.STATUS_PRIORITIES = exports.StatusType = void 0;\nexports.isAuthorized = isAuthorized;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nfunction isAuthorized(status, handlerType, logger) {\n var loggerHandler = logger.getHandler();\n var sanitizedHandlerType = Array.isArray(loggerHandler) ? loggerHandler : [loggerHandler];\n return (exports.STATUS_PRIORITIES[status] >= exports.STATUS_PRIORITIES[logger.getLevel()] && (0, browser_core_1.includes)(sanitizedHandlerType, handlerType));\n}\nexports.StatusType = {\n ok: 'ok',\n debug: 'debug',\n info: 'info',\n notice: 'notice',\n warn: 'warn',\n error: 'error',\n critical: 'critical',\n alert: 'alert',\n emerg: 'emerg',\n};\nexports.STATUS_PRIORITIES = (_a = {},\n _a[exports.StatusType.ok] = 0,\n _a[exports.StatusType.debug] = 1,\n _a[exports.StatusType.info] = 2,\n _a[exports.StatusType.notice] = 4,\n _a[exports.StatusType.warn] = 5,\n _a[exports.StatusType.error] = 6,\n _a[exports.StatusType.critical] = 7,\n _a[exports.StatusType.alert] = 8,\n _a[exports.StatusType.emerg] = 9,\n _a);\n//# sourceMappingURL=isAuthorized.js.map","\"use strict\";\nvar _a;\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startLoggerCollection = startLoggerCollection;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar logger_1 = require(\"../logger\");\nvar isAuthorized_1 = require(\"./isAuthorized\");\nfunction startLoggerCollection(lifeCycle) {\n function handleLog(logsMessage, logger, handlingStack, savedCommonContext, savedDate) {\n var messageContext = (0, browser_core_1.combine)(logger.getContext(), logsMessage.context);\n if ((0, isAuthorized_1.isAuthorized)(logsMessage.status, logger_1.HandlerType.console, logger)) {\n displayInConsole(logsMessage, messageContext);\n }\n if ((0, isAuthorized_1.isAuthorized)(logsMessage.status, logger_1.HandlerType.http, logger)) {\n var rawLogEventData = {\n rawLogsEvent: {\n date: savedDate || (0, browser_core_1.timeStampNow)(),\n message: logsMessage.message,\n status: logsMessage.status,\n origin: browser_core_1.ErrorSource.LOGGER,\n },\n messageContext: messageContext,\n savedCommonContext: savedCommonContext,\n };\n if (handlingStack) {\n rawLogEventData.domainContext = { handlingStack: handlingStack };\n }\n lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, rawLogEventData);\n }\n }\n return {\n handleLog: handleLog,\n };\n}\nvar loggerToConsoleApiName = (_a = {},\n _a[isAuthorized_1.StatusType.ok] = browser_core_1.ConsoleApiName.debug,\n _a[isAuthorized_1.StatusType.debug] = browser_core_1.ConsoleApiName.debug,\n _a[isAuthorized_1.StatusType.info] = browser_core_1.ConsoleApiName.info,\n _a[isAuthorized_1.StatusType.notice] = browser_core_1.ConsoleApiName.info,\n _a[isAuthorized_1.StatusType.warn] = browser_core_1.ConsoleApiName.warn,\n _a[isAuthorized_1.StatusType.error] = browser_core_1.ConsoleApiName.error,\n _a[isAuthorized_1.StatusType.critical] = browser_core_1.ConsoleApiName.error,\n _a[isAuthorized_1.StatusType.alert] = browser_core_1.ConsoleApiName.error,\n _a[isAuthorized_1.StatusType.emerg] = browser_core_1.ConsoleApiName.error,\n _a);\nfunction displayInConsole(_a, messageContext) {\n var status = _a.status, message = _a.message;\n browser_core_1.originalConsoleMethods[loggerToConsoleApiName[status]].call(browser_core_1.globalConsole, message, messageContext);\n}\n//# sourceMappingURL=loggerCollection.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LOGS_SESSION_KEY = void 0;\nexports.startLogsSessionManager = startLogsSessionManager;\nexports.startLogsSessionManagerStub = startLogsSessionManagerStub;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nexports.LOGS_SESSION_KEY = 'logs';\nfunction startLogsSessionManager(configuration, trackingConsentState) {\n var sessionManager = (0, browser_core_1.startSessionManager)(configuration, exports.LOGS_SESSION_KEY, function (rawTrackingType) { return computeSessionState(configuration, rawTrackingType); }, trackingConsentState);\n return {\n findTrackedSession: function (startTime, options) {\n if (options === void 0) { options = { returnInactive: false }; }\n var session = sessionManager.findSession(startTime, options);\n return session && session.trackingType === \"1\" /* LoggerTrackingType.TRACKED */\n ? {\n id: session.id,\n }\n : undefined;\n },\n expireObservable: sessionManager.expireObservable,\n };\n}\nfunction startLogsSessionManagerStub(configuration) {\n var isTracked = computeTrackingType(configuration) === \"1\" /* LoggerTrackingType.TRACKED */;\n var session = isTracked ? {} : undefined;\n return {\n findTrackedSession: function () { return session; },\n expireObservable: new browser_core_1.Observable(),\n };\n}\nfunction computeTrackingType(configuration) {\n if (!(0, browser_core_1.performDraw)(configuration.sessionSampleRate)) {\n return \"0\" /* LoggerTrackingType.NOT_TRACKED */;\n }\n return \"1\" /* LoggerTrackingType.TRACKED */;\n}\nfunction computeSessionState(configuration, rawSessionType) {\n var trackingType = hasValidLoggerSession(rawSessionType) ? rawSessionType : computeTrackingType(configuration);\n return {\n trackingType: trackingType,\n isTracked: trackingType === \"1\" /* LoggerTrackingType.TRACKED */,\n };\n}\nfunction hasValidLoggerSession(trackingType) {\n return trackingType === \"0\" /* LoggerTrackingType.NOT_TRACKED */ || trackingType === \"1\" /* LoggerTrackingType.TRACKED */;\n}\n//# sourceMappingURL=logsSessionManager.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startLogsTelemetry = startLogsTelemetry;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar rumInternalContext_1 = require(\"./contexts/rumInternalContext\");\nvar configuration_1 = require(\"./configuration\");\nfunction startLogsTelemetry(initConfiguration, configuration, reportError, pageExitObservable, session) {\n var telemetry = (0, browser_core_1.startTelemetry)(\"browser-logs-sdk\" /* TelemetryService.LOGS */, configuration);\n telemetry.setContextProvider(function () {\n var _a, _b, _c, _d, _e, _f;\n return ({\n application: {\n id: (_a = (0, rumInternalContext_1.getRUMInternalContext)()) === null || _a === void 0 ? void 0 : _a.application_id,\n },\n session: {\n id: (_b = session.findTrackedSession()) === null || _b === void 0 ? void 0 : _b.id,\n },\n view: {\n id: (_d = (_c = (0, rumInternalContext_1.getRUMInternalContext)()) === null || _c === void 0 ? void 0 : _c.view) === null || _d === void 0 ? void 0 : _d.id,\n },\n action: {\n id: (_f = (_e = (0, rumInternalContext_1.getRUMInternalContext)()) === null || _e === void 0 ? void 0 : _e.user_action) === null || _f === void 0 ? void 0 : _f.id,\n },\n });\n });\n var cleanupTasks = [];\n if ((0, browser_core_1.canUseEventBridge)()) {\n var bridge_1 = (0, browser_core_1.getEventBridge)();\n var telemetrySubscription_1 = telemetry.observable.subscribe(function (event) { return bridge_1.send('internal_telemetry', event); });\n cleanupTasks.push(function () { return telemetrySubscription_1.unsubscribe(); });\n }\n else {\n var telemetryBatch_1 = (0, browser_core_1.startBatchWithReplica)(configuration, {\n endpoint: configuration.rumEndpointBuilder,\n encoder: (0, browser_core_1.createIdentityEncoder)(),\n }, configuration.replica && {\n endpoint: configuration.replica.rumEndpointBuilder,\n encoder: (0, browser_core_1.createIdentityEncoder)(),\n }, reportError, pageExitObservable, session.expireObservable);\n cleanupTasks.push(function () { return telemetryBatch_1.stop(); });\n var telemetrySubscription_2 = telemetry.observable.subscribe(function (event) {\n return telemetryBatch_1.add(event, (0, browser_core_1.isTelemetryReplicationAllowed)(configuration));\n });\n cleanupTasks.push(function () { return telemetrySubscription_2.unsubscribe(); });\n }\n (0, browser_core_1.drainPreStartTelemetry)();\n (0, browser_core_1.addTelemetryConfiguration)((0, configuration_1.serializeLogsConfiguration)(initConfiguration));\n return {\n telemetry: telemetry,\n stop: function () {\n cleanupTasks.forEach(function (task) { return task(); });\n },\n };\n}\n//# sourceMappingURL=logsTelemetry.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startNetworkErrorCollection = startNetworkErrorCollection;\nexports.computeXhrResponseData = computeXhrResponseData;\nexports.computeFetchErrorText = computeFetchErrorText;\nexports.computeFetchResponseText = computeFetchResponseText;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar isAuthorized_1 = require(\"../logger/isAuthorized\");\nfunction startNetworkErrorCollection(configuration, lifeCycle) {\n if (!configuration.forwardErrorsToLogs) {\n return { stop: browser_core_1.noop };\n }\n var xhrSubscription = (0, browser_core_1.initXhrObservable)(configuration).subscribe(function (context) {\n if (context.state === 'complete') {\n handleResponse(\"xhr\" /* RequestType.XHR */, context);\n }\n });\n var fetchSubscription = (0, browser_core_1.initFetchObservable)().subscribe(function (context) {\n if (context.state === 'resolve') {\n handleResponse(\"fetch\" /* RequestType.FETCH */, context);\n }\n });\n function handleResponse(type, request) {\n if (!(0, browser_core_1.isIntakeUrl)(request.url) && (isRejected(request) || (0, browser_core_1.isServerError)(request.status))) {\n if ('xhr' in request) {\n computeXhrResponseData(request.xhr, configuration, onResponseDataAvailable);\n }\n else if (request.response) {\n computeFetchResponseText(request.response, configuration, onResponseDataAvailable);\n }\n else if (request.error) {\n computeFetchErrorText(request.error, configuration, onResponseDataAvailable);\n }\n }\n function onResponseDataAvailable(responseData) {\n var domainContext = {\n isAborted: request.isAborted,\n handlingStack: request.handlingStack,\n };\n lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {\n rawLogsEvent: {\n message: \"\".concat(format(type), \" error \").concat(request.method, \" \").concat(request.url),\n date: request.startClocks.timeStamp,\n error: {\n stack: responseData || 'Failed to load',\n // We don't know if the error was handled or not, so we set it to undefined\n handling: undefined,\n },\n http: {\n method: request.method, // Cast resource method because of case mismatch cf issue RUMF-1152\n status_code: request.status,\n url: request.url,\n },\n status: isAuthorized_1.StatusType.error,\n origin: browser_core_1.ErrorSource.NETWORK,\n },\n domainContext: domainContext,\n });\n }\n }\n return {\n stop: function () {\n xhrSubscription.unsubscribe();\n fetchSubscription.unsubscribe();\n },\n };\n}\n// TODO: ideally, computeXhrResponseData should always call the callback with a string instead of\n// `unknown`. But to keep backward compatibility, in the case of XHR with a `responseType` different\n// than \"text\", the response data should be whatever `xhr.response` is. This is a bit confusing as\n// Logs event 'stack' is expected to be a string. This should be changed in a future major version\n// as it could be a breaking change.\nfunction computeXhrResponseData(xhr, configuration, callback) {\n if (typeof xhr.response === 'string') {\n callback(truncateResponseText(xhr.response, configuration));\n }\n else {\n callback(xhr.response);\n }\n}\nfunction computeFetchErrorText(error, configuration, callback) {\n callback(truncateResponseText((0, browser_core_1.toStackTraceString)((0, browser_core_1.computeStackTrace)(error)), configuration));\n}\nfunction computeFetchResponseText(response, configuration, callback) {\n var clonedResponse = (0, browser_core_1.tryToClone)(response);\n if (!clonedResponse || !clonedResponse.body) {\n // if the clone failed or if the body is null, let's not try to read it.\n callback();\n }\n else if (!window.TextDecoder) {\n // If the browser doesn't support TextDecoder, let's read the whole response then truncate it.\n //\n // This should only be the case on early versions of Edge (before they migrated to Chromium).\n // Even if it could be possible to implement a workaround for the missing TextDecoder API (using\n // a Blob and FileReader), we found another issue preventing us from reading only the first\n // bytes from the response: contrary to other browsers, when reading from the cloned response,\n // if the original response gets canceled, the cloned response is also canceled and we can't\n // know about it. In the following illustration, the promise returned by `reader.read()` may\n // never be fulfilled:\n //\n // fetch('/').then((response) => {\n // const reader = response.clone().body.getReader()\n // readMore()\n // function readMore() {\n // reader.read().then(\n // (result) => {\n // if (result.done) {\n // console.log('done')\n // } else {\n // readMore()\n // }\n // },\n // () => console.log('error')\n // )\n // }\n // response.body.getReader().cancel()\n // })\n clonedResponse.text().then((0, browser_core_1.monitor)(function (text) { return callback(truncateResponseText(text, configuration)); }), (0, browser_core_1.monitor)(function (error) { return callback(\"Unable to retrieve response: \".concat(error)); }));\n }\n else {\n truncateResponseStream(clonedResponse.body, configuration.requestErrorResponseLengthLimit, function (error, responseText) {\n if (error) {\n callback(\"Unable to retrieve response: \".concat(error));\n }\n else {\n callback(responseText);\n }\n });\n }\n}\nfunction isRejected(request) {\n return request.status === 0 && request.responseType !== 'opaque';\n}\nfunction truncateResponseText(responseText, configuration) {\n if (responseText.length > configuration.requestErrorResponseLengthLimit) {\n return \"\".concat(responseText.substring(0, configuration.requestErrorResponseLengthLimit), \"...\");\n }\n return responseText;\n}\nfunction format(type) {\n if (\"xhr\" /* RequestType.XHR */ === type) {\n return 'XHR';\n }\n return 'Fetch';\n}\nfunction truncateResponseStream(stream, bytesLimit, callback) {\n (0, browser_core_1.readBytesFromStream)(stream, function (error, bytes, limitExceeded) {\n if (error) {\n callback(error);\n }\n else {\n var responseText = new TextDecoder().decode(bytes);\n if (limitExceeded) {\n responseText += '...';\n }\n callback(undefined, responseText);\n }\n }, {\n bytesLimit: bytesLimit,\n collectStreamBody: true,\n });\n}\n//# sourceMappingURL=networkErrorCollection.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startReportCollection = startReportCollection;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar isAuthorized_1 = require(\"../logger/isAuthorized\");\nvar createErrorFieldFromRawError_1 = require(\"../createErrorFieldFromRawError\");\nfunction startReportCollection(configuration, lifeCycle) {\n var reportSubscription = (0, browser_core_1.initReportObservable)(configuration, configuration.forwardReports).subscribe(function (rawError) {\n var message = rawError.message;\n var error;\n var status = rawError.originalError.type === 'deprecation' ? isAuthorized_1.StatusType.warn : isAuthorized_1.StatusType.error;\n if (status === isAuthorized_1.StatusType.error) {\n error = (0, createErrorFieldFromRawError_1.createErrorFieldFromRawError)(rawError);\n }\n else if (rawError.stack) {\n message += \" Found in \".concat((0, browser_core_1.getFileFromStackTraceString)(rawError.stack));\n }\n lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {\n rawLogsEvent: {\n date: (0, browser_core_1.timeStampNow)(),\n message: message,\n origin: browser_core_1.ErrorSource.REPORT,\n error: error,\n status: status,\n },\n });\n });\n return {\n stop: function () {\n reportSubscription.unsubscribe();\n },\n };\n}\n//# sourceMappingURL=reportCollection.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startReportError = startReportError;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar isAuthorized_1 = require(\"./logger/isAuthorized\");\nfunction startReportError(lifeCycle) {\n return function (error) {\n lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {\n rawLogsEvent: {\n message: error.message,\n date: error.startClocks.timeStamp,\n origin: browser_core_1.ErrorSource.AGENT,\n status: isAuthorized_1.StatusType.error,\n },\n });\n (0, browser_core_1.addTelemetryDebug)('Error reported to customer', { 'error.message': error.message });\n };\n}\n//# sourceMappingURL=reportError.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startRuntimeErrorCollection = startRuntimeErrorCollection;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar isAuthorized_1 = require(\"../logger/isAuthorized\");\nvar createErrorFieldFromRawError_1 = require(\"../createErrorFieldFromRawError\");\nfunction startRuntimeErrorCollection(configuration, lifeCycle) {\n if (!configuration.forwardErrorsToLogs) {\n return { stop: browser_core_1.noop };\n }\n var rawErrorObservable = new browser_core_1.Observable();\n var stopRuntimeErrorTracking = (0, browser_core_1.trackRuntimeError)(rawErrorObservable).stop;\n var rawErrorSubscription = rawErrorObservable.subscribe(function (rawError) {\n lifeCycle.notify(0 /* LifeCycleEventType.RAW_LOG_COLLECTED */, {\n rawLogsEvent: {\n message: rawError.message,\n date: rawError.startClocks.timeStamp,\n error: (0, createErrorFieldFromRawError_1.createErrorFieldFromRawError)(rawError),\n origin: browser_core_1.ErrorSource.SOURCE,\n status: isAuthorized_1.StatusType.error,\n },\n });\n });\n return {\n stop: function () {\n stopRuntimeErrorTracking();\n rawErrorSubscription.unsubscribe();\n },\n };\n}\n//# sourceMappingURL=runtimeErrorCollection.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.datadogLogs = exports.StatusType = exports.HandlerType = exports.Logger = void 0;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar logsPublicApi_1 = require(\"../boot/logsPublicApi\");\nvar startLogs_1 = require(\"../boot/startLogs\");\nvar logger_1 = require(\"../domain/logger\");\nObject.defineProperty(exports, \"Logger\", { enumerable: true, get: function () { return logger_1.Logger; } });\nObject.defineProperty(exports, \"HandlerType\", { enumerable: true, get: function () { return logger_1.HandlerType; } });\nvar isAuthorized_1 = require(\"../domain/logger/isAuthorized\");\nObject.defineProperty(exports, \"StatusType\", { enumerable: true, get: function () { return isAuthorized_1.StatusType; } });\nexports.datadogLogs = (0, logsPublicApi_1.makeLogsPublicApi)(startLogs_1.startLogs);\n(0, browser_core_1.defineGlobal)((0, browser_core_1.getGlobalObject)(), 'DD_LOGS', exports.datadogLogs);\n//# sourceMappingURL=main.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startLogsBatch = startLogsBatch;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nfunction startLogsBatch(configuration, lifeCycle, reportError, pageExitObservable, session) {\n var batch = (0, browser_core_1.startBatchWithReplica)(configuration, {\n endpoint: configuration.logsEndpointBuilder,\n encoder: (0, browser_core_1.createIdentityEncoder)(),\n }, configuration.replica && {\n endpoint: configuration.replica.logsEndpointBuilder,\n encoder: (0, browser_core_1.createIdentityEncoder)(),\n }, reportError, pageExitObservable, session.expireObservable);\n lifeCycle.subscribe(1 /* LifeCycleEventType.LOG_COLLECTED */, function (serverLogsEvent) {\n batch.add(serverLogsEvent);\n });\n return batch;\n}\n//# sourceMappingURL=startLogsBatch.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startLogsBridge = startLogsBridge;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nfunction startLogsBridge(lifeCycle) {\n var bridge = (0, browser_core_1.getEventBridge)();\n lifeCycle.subscribe(1 /* LifeCycleEventType.LOG_COLLECTED */, function (serverLogsEvent) {\n bridge.send('log', serverLogsEvent);\n });\n}\n//# sourceMappingURL=startLogsBridge.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createPreStartStrategy = createPreStartStrategy;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar configuration_1 = require(\"../domain/configuration\");\nvar vitalCollection_1 = require(\"../domain/vital/vitalCollection\");\nvar configuration_2 = require(\"../domain/configuration\");\nvar plugins_1 = require(\"../domain/plugins\");\nfunction createPreStartStrategy(_a, getCommonContext, trackingConsentState, customVitalsState, doStartRum) {\n var ignoreInitIfSyntheticsWillInjectRum = _a.ignoreInitIfSyntheticsWillInjectRum, startDeflateWorker = _a.startDeflateWorker;\n var bufferApiCalls = (0, browser_core_1.createBoundedBuffer)();\n var firstStartViewCall;\n var deflateWorker;\n var cachedInitConfiguration;\n var cachedConfiguration;\n var trackingConsentStateSubscription = trackingConsentState.observable.subscribe(tryStartRum);\n function tryStartRum() {\n if (!cachedInitConfiguration || !cachedConfiguration || !trackingConsentState.isGranted()) {\n return;\n }\n trackingConsentStateSubscription.unsubscribe();\n var initialViewOptions;\n if (cachedConfiguration.trackViewsManually) {\n if (!firstStartViewCall) {\n return;\n }\n // An initial view is always created when starting RUM.\n // When tracking views automatically, any startView call before RUM start creates an extra\n // view.\n // When tracking views manually, we use the ViewOptions from the first startView call as the\n // initial view options, and we remove the actual startView call so we don't create an extra\n // view.\n bufferApiCalls.remove(firstStartViewCall.callback);\n initialViewOptions = firstStartViewCall.options;\n }\n var startRumResult = doStartRum(cachedConfiguration, deflateWorker, initialViewOptions);\n bufferApiCalls.drain(startRumResult);\n }\n function doInit(initConfiguration) {\n var eventBridgeAvailable = (0, browser_core_1.canUseEventBridge)();\n if (eventBridgeAvailable) {\n initConfiguration = overrideInitConfigurationForBridge(initConfiguration);\n }\n // Update the exposed initConfiguration to reflect the bridge and remote configuration overrides\n cachedInitConfiguration = initConfiguration;\n (0, browser_core_1.addTelemetryConfiguration)((0, configuration_2.serializeRumConfiguration)(initConfiguration));\n if (cachedConfiguration) {\n (0, browser_core_1.displayAlreadyInitializedError)('DD_RUM', initConfiguration);\n return;\n }\n var configuration = (0, configuration_1.validateAndBuildRumConfiguration)(initConfiguration);\n if (!configuration) {\n return;\n }\n if (!eventBridgeAvailable && !configuration.sessionStoreStrategyType) {\n browser_core_1.display.warn('No storage available for session. We will not send any data.');\n return;\n }\n if (configuration.compressIntakeRequests && !eventBridgeAvailable && startDeflateWorker) {\n deflateWorker = startDeflateWorker(configuration, 'Datadog RUM', \n // Worker initialization can fail asynchronously, especially in Firefox where even CSP\n // issues are reported asynchronously. For now, the SDK will continue its execution even if\n // data won't be sent to Datadog. We could improve this behavior in the future.\n browser_core_1.noop);\n if (!deflateWorker) {\n // `startDeflateWorker` should have logged an error message explaining the issue\n return;\n }\n }\n cachedConfiguration = configuration;\n // Instrumuent fetch to track network requests\n // This is needed in case the consent is not granted and some cutsomer\n // library (Apollo Client) is storing uninstrumented fetch to be used later\n // The subscrption is needed so that the instrumentation process is completed\n (0, browser_core_1.initFetchObservable)().subscribe(browser_core_1.noop);\n trackingConsentState.tryToInit(configuration.trackingConsent);\n tryStartRum();\n }\n var addDurationVital = function (vital) {\n bufferApiCalls.add(function (startRumResult) { return startRumResult.addDurationVital(vital); });\n };\n return {\n init: function (initConfiguration, publicApi) {\n if (!initConfiguration) {\n browser_core_1.display.error('Missing configuration');\n return;\n }\n // Set the experimental feature flags as early as possible, so we can use them in most places\n (0, browser_core_1.initFeatureFlags)(initConfiguration.enableExperimentalFeatures);\n // Expose the initial configuration regardless of initialization success.\n cachedInitConfiguration = initConfiguration;\n // If we are in a Synthetics test configured to automatically inject a RUM instance, we want\n // to completely discard the customer application RUM instance by ignoring their init() call.\n // But, we should not ignore the init() call from the Synthetics-injected RUM instance, so the\n // internal `ignoreInitIfSyntheticsWillInjectRum` option is here to bypass this condition.\n if (ignoreInitIfSyntheticsWillInjectRum && (0, browser_core_1.willSyntheticsInjectRum)()) {\n return;\n }\n (0, plugins_1.callPluginsMethod)(initConfiguration.plugins, 'onInit', { initConfiguration: initConfiguration, publicApi: publicApi });\n if (initConfiguration.remoteConfigurationId &&\n (0, browser_core_1.isExperimentalFeatureEnabled)(browser_core_1.ExperimentalFeature.REMOTE_CONFIGURATION)) {\n (0, configuration_2.fetchAndApplyRemoteConfiguration)(initConfiguration, doInit);\n }\n else {\n doInit(initConfiguration);\n }\n },\n get initConfiguration() {\n return cachedInitConfiguration;\n },\n getInternalContext: browser_core_1.noop,\n stopSession: browser_core_1.noop,\n addTiming: function (name, time) {\n if (time === void 0) { time = (0, browser_core_1.timeStampNow)(); }\n bufferApiCalls.add(function (startRumResult) { return startRumResult.addTiming(name, time); });\n },\n startView: function (options, startClocks) {\n if (startClocks === void 0) { startClocks = (0, browser_core_1.clocksNow)(); }\n var callback = function (startRumResult) {\n startRumResult.startView(options, startClocks);\n };\n bufferApiCalls.add(callback);\n if (!firstStartViewCall) {\n firstStartViewCall = { options: options, callback: callback };\n tryStartRum();\n }\n },\n setViewName: function (name) {\n bufferApiCalls.add(function (startRumResult) { return startRumResult.setViewName(name); });\n },\n setViewContext: function (context) {\n bufferApiCalls.add(function (startRumResult) { return startRumResult.setViewContext(context); });\n },\n setViewContextProperty: function (key, value) {\n bufferApiCalls.add(function (startRumResult) { return startRumResult.setViewContextProperty(key, value); });\n },\n addAction: function (action, commonContext) {\n if (commonContext === void 0) { commonContext = getCommonContext(); }\n bufferApiCalls.add(function (startRumResult) { return startRumResult.addAction(action, commonContext); });\n },\n addError: function (providedError, commonContext) {\n if (commonContext === void 0) { commonContext = getCommonContext(); }\n bufferApiCalls.add(function (startRumResult) { return startRumResult.addError(providedError, commonContext); });\n },\n addFeatureFlagEvaluation: function (key, value) {\n bufferApiCalls.add(function (startRumResult) { return startRumResult.addFeatureFlagEvaluation(key, value); });\n },\n startDurationVital: function (name, options) {\n return (0, vitalCollection_1.startDurationVital)(customVitalsState, name, options);\n },\n stopDurationVital: function (name, options) {\n (0, vitalCollection_1.stopDurationVital)(addDurationVital, customVitalsState, name, options);\n },\n addDurationVital: addDurationVital,\n };\n}\nfunction overrideInitConfigurationForBridge(initConfiguration) {\n var _a, _b;\n return (0, browser_core_1.assign)({}, initConfiguration, {\n applicationId: '00000000-aaaa-0000-aaaa-000000000000',\n clientToken: 'empty',\n sessionSampleRate: 100,\n defaultPrivacyLevel: (_a = initConfiguration.defaultPrivacyLevel) !== null && _a !== void 0 ? _a : (_b = (0, browser_core_1.getEventBridge)()) === null || _b === void 0 ? void 0 : _b.getPrivacyLevel(),\n });\n}\n//# sourceMappingURL=preStartRum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.makeRumPublicApi = makeRumPublicApi;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar commonContext_1 = require(\"../domain/contexts/commonContext\");\nvar vitalCollection_1 = require(\"../domain/vital/vitalCollection\");\nvar preStartRum_1 = require(\"./preStartRum\");\nvar RUM_STORAGE_KEY = 'rum';\nfunction makeRumPublicApi(startRumImpl, recorderApi, options) {\n if (options === void 0) { options = {}; }\n var customerDataTrackerManager = (0, browser_core_1.createCustomerDataTrackerManager)(0 /* CustomerDataCompressionStatus.Unknown */);\n var globalContextManager = (0, browser_core_1.createContextManager)(customerDataTrackerManager.getOrCreateTracker(2 /* CustomerDataType.GlobalContext */));\n var userContextManager = (0, browser_core_1.createContextManager)(customerDataTrackerManager.getOrCreateTracker(1 /* CustomerDataType.User */));\n var trackingConsentState = (0, browser_core_1.createTrackingConsentState)();\n var customVitalsState = (0, vitalCollection_1.createCustomVitalsState)();\n function getCommonContext() {\n return (0, commonContext_1.buildCommonContext)(globalContextManager, userContextManager, recorderApi);\n }\n var strategy = (0, preStartRum_1.createPreStartStrategy)(options, getCommonContext, trackingConsentState, customVitalsState, function (configuration, deflateWorker, initialViewOptions) {\n if (configuration.storeContextsAcrossPages) {\n (0, browser_core_1.storeContextManager)(configuration, globalContextManager, RUM_STORAGE_KEY, 2 /* CustomerDataType.GlobalContext */);\n (0, browser_core_1.storeContextManager)(configuration, userContextManager, RUM_STORAGE_KEY, 1 /* CustomerDataType.User */);\n }\n customerDataTrackerManager.setCompressionStatus(deflateWorker ? 1 /* CustomerDataCompressionStatus.Enabled */ : 2 /* CustomerDataCompressionStatus.Disabled */);\n var startRumResult = startRumImpl(configuration, recorderApi, customerDataTrackerManager, getCommonContext, initialViewOptions, deflateWorker && options.createDeflateEncoder\n ? function (streamId) { return options.createDeflateEncoder(configuration, deflateWorker, streamId); }\n : browser_core_1.createIdentityEncoder, trackingConsentState, customVitalsState);\n recorderApi.onRumStart(startRumResult.lifeCycle, configuration, startRumResult.session, startRumResult.viewHistory, deflateWorker);\n strategy = createPostStartStrategy(strategy, startRumResult);\n return startRumResult;\n });\n var startView = (0, browser_core_1.monitor)(function (options) {\n var sanitizedOptions = typeof options === 'object' ? options : { name: options };\n if (sanitizedOptions.context) {\n customerDataTrackerManager.getOrCreateTracker(3 /* CustomerDataType.View */).updateCustomerData(sanitizedOptions.context);\n }\n strategy.startView(sanitizedOptions);\n (0, browser_core_1.addTelemetryUsage)({ feature: 'start-view' });\n });\n var rumPublicApi = (0, browser_core_1.makePublicApi)({\n init: (0, browser_core_1.monitor)(function (initConfiguration) {\n strategy.init(initConfiguration, rumPublicApi);\n }),\n setTrackingConsent: (0, browser_core_1.monitor)(function (trackingConsent) {\n trackingConsentState.update(trackingConsent);\n (0, browser_core_1.addTelemetryUsage)({ feature: 'set-tracking-consent', tracking_consent: trackingConsent });\n }),\n setViewName: (0, browser_core_1.monitor)(function (name) {\n strategy.setViewName(name);\n }),\n setViewContext: (0, browser_core_1.monitor)(function (context) {\n strategy.setViewContext(context);\n }),\n setViewContextProperty: (0, browser_core_1.monitor)(function (key, value) {\n strategy.setViewContextProperty(key, value);\n }),\n setGlobalContext: (0, browser_core_1.monitor)(function (context) {\n globalContextManager.setContext(context);\n (0, browser_core_1.addTelemetryUsage)({ feature: 'set-global-context' });\n }),\n getGlobalContext: (0, browser_core_1.monitor)(function () { return globalContextManager.getContext(); }),\n setGlobalContextProperty: (0, browser_core_1.monitor)(function (key, value) {\n globalContextManager.setContextProperty(key, value);\n (0, browser_core_1.addTelemetryUsage)({ feature: 'set-global-context' });\n }),\n removeGlobalContextProperty: (0, browser_core_1.monitor)(function (key) { return globalContextManager.removeContextProperty(key); }),\n clearGlobalContext: (0, browser_core_1.monitor)(function () { return globalContextManager.clearContext(); }),\n getInternalContext: (0, browser_core_1.monitor)(function (startTime) { return strategy.getInternalContext(startTime); }),\n getInitConfiguration: (0, browser_core_1.monitor)(function () { return (0, browser_core_1.deepClone)(strategy.initConfiguration); }),\n addAction: function (name, context) {\n var handlingStack = (0, browser_core_1.createHandlingStack)();\n (0, browser_core_1.callMonitored)(function () {\n strategy.addAction({\n name: (0, browser_core_1.sanitize)(name),\n context: (0, browser_core_1.sanitize)(context),\n startClocks: (0, browser_core_1.clocksNow)(),\n type: \"custom\" /* ActionType.CUSTOM */,\n handlingStack: handlingStack,\n });\n (0, browser_core_1.addTelemetryUsage)({ feature: 'add-action' });\n });\n },\n addError: function (error, context) {\n var handlingStack = (0, browser_core_1.createHandlingStack)();\n (0, browser_core_1.callMonitored)(function () {\n strategy.addError({\n error: error, // Do not sanitize error here, it is needed unserialized by computeRawError()\n handlingStack: handlingStack,\n context: (0, browser_core_1.sanitize)(context),\n startClocks: (0, browser_core_1.clocksNow)(),\n });\n (0, browser_core_1.addTelemetryUsage)({ feature: 'add-error' });\n });\n },\n addTiming: (0, browser_core_1.monitor)(function (name, time) {\n // TODO: next major decide to drop relative time support or update its behaviour\n strategy.addTiming((0, browser_core_1.sanitize)(name), time);\n }),\n setUser: (0, browser_core_1.monitor)(function (newUser) {\n if ((0, browser_core_1.checkUser)(newUser)) {\n userContextManager.setContext((0, browser_core_1.sanitizeUser)(newUser));\n }\n (0, browser_core_1.addTelemetryUsage)({ feature: 'set-user' });\n }),\n getUser: (0, browser_core_1.monitor)(function () { return userContextManager.getContext(); }),\n setUserProperty: (0, browser_core_1.monitor)(function (key, property) {\n var _a;\n var sanitizedProperty = (0, browser_core_1.sanitizeUser)((_a = {}, _a[key] = property, _a))[key];\n userContextManager.setContextProperty(key, sanitizedProperty);\n (0, browser_core_1.addTelemetryUsage)({ feature: 'set-user' });\n }),\n removeUserProperty: (0, browser_core_1.monitor)(function (key) { return userContextManager.removeContextProperty(key); }),\n clearUser: (0, browser_core_1.monitor)(function () { return userContextManager.clearContext(); }),\n startView: startView,\n stopSession: (0, browser_core_1.monitor)(function () {\n strategy.stopSession();\n (0, browser_core_1.addTelemetryUsage)({ feature: 'stop-session' });\n }),\n addFeatureFlagEvaluation: (0, browser_core_1.monitor)(function (key, value) {\n strategy.addFeatureFlagEvaluation((0, browser_core_1.sanitize)(key), (0, browser_core_1.sanitize)(value));\n (0, browser_core_1.addTelemetryUsage)({ feature: 'add-feature-flag-evaluation' });\n }),\n getSessionReplayLink: (0, browser_core_1.monitor)(function () { return recorderApi.getSessionReplayLink(); }),\n startSessionReplayRecording: (0, browser_core_1.monitor)(function (options) {\n recorderApi.start(options);\n (0, browser_core_1.addTelemetryUsage)({ feature: 'start-session-replay-recording', force: options && options.force });\n }),\n stopSessionReplayRecording: (0, browser_core_1.monitor)(function () { return recorderApi.stop(); }),\n addDurationVital: (0, browser_core_1.monitor)(function (name, options) {\n (0, browser_core_1.addTelemetryUsage)({ feature: 'add-duration-vital' });\n strategy.addDurationVital({\n name: (0, browser_core_1.sanitize)(name),\n type: \"duration\" /* VitalType.DURATION */,\n startClocks: (0, browser_core_1.timeStampToClocks)(options.startTime),\n duration: options.duration,\n context: (0, browser_core_1.sanitize)(options && options.context),\n description: (0, browser_core_1.sanitize)(options && options.description),\n });\n }),\n startDurationVital: (0, browser_core_1.monitor)(function (name, options) {\n (0, browser_core_1.addTelemetryUsage)({ feature: 'start-duration-vital' });\n return strategy.startDurationVital((0, browser_core_1.sanitize)(name), {\n context: (0, browser_core_1.sanitize)(options && options.context),\n description: (0, browser_core_1.sanitize)(options && options.description),\n });\n }),\n stopDurationVital: (0, browser_core_1.monitor)(function (nameOrRef, options) {\n (0, browser_core_1.addTelemetryUsage)({ feature: 'stop-duration-vital' });\n strategy.stopDurationVital(typeof nameOrRef === 'string' ? (0, browser_core_1.sanitize)(nameOrRef) : nameOrRef, {\n context: (0, browser_core_1.sanitize)(options && options.context),\n description: (0, browser_core_1.sanitize)(options && options.description),\n });\n }),\n });\n return rumPublicApi;\n}\nfunction createPostStartStrategy(preStartStrategy, startRumResult) {\n return (0, browser_core_1.assign)({\n init: function (initConfiguration) {\n (0, browser_core_1.displayAlreadyInitializedError)('DD_RUM', initConfiguration);\n },\n initConfiguration: preStartStrategy.initConfiguration,\n }, startRumResult);\n}\n//# sourceMappingURL=rumPublicApi.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startRum = startRum;\nexports.startRumEventCollection = startRumEventCollection;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar domMutationObservable_1 = require(\"../browser/domMutationObservable\");\nvar windowOpenObservable_1 = require(\"../browser/windowOpenObservable\");\nvar assembly_1 = require(\"../domain/assembly\");\nvar internalContext_1 = require(\"../domain/contexts/internalContext\");\nvar lifeCycle_1 = require(\"../domain/lifeCycle\");\nvar viewHistory_1 = require(\"../domain/contexts/viewHistory\");\nvar requestCollection_1 = require(\"../domain/requestCollection\");\nvar actionCollection_1 = require(\"../domain/action/actionCollection\");\nvar errorCollection_1 = require(\"../domain/error/errorCollection\");\nvar longTaskCollection_1 = require(\"../domain/longTask/longTaskCollection\");\nvar resourceCollection_1 = require(\"../domain/resource/resourceCollection\");\nvar viewCollection_1 = require(\"../domain/view/viewCollection\");\nvar rumSessionManager_1 = require(\"../domain/rumSessionManager\");\nvar startRumBatch_1 = require(\"../transport/startRumBatch\");\nvar startRumEventBridge_1 = require(\"../transport/startRumEventBridge\");\nvar urlContexts_1 = require(\"../domain/contexts/urlContexts\");\nvar locationChangeObservable_1 = require(\"../browser/locationChangeObservable\");\nvar featureFlagContext_1 = require(\"../domain/contexts/featureFlagContext\");\nvar startCustomerDataTelemetry_1 = require(\"../domain/startCustomerDataTelemetry\");\nvar pageStateHistory_1 = require(\"../domain/contexts/pageStateHistory\");\nvar displayContext_1 = require(\"../domain/contexts/displayContext\");\nvar vitalCollection_1 = require(\"../domain/vital/vitalCollection\");\nvar ciVisibilityContext_1 = require(\"../domain/contexts/ciVisibilityContext\");\nvar longAnimationFrameCollection_1 = require(\"../domain/longAnimationFrame/longAnimationFrameCollection\");\nfunction startRum(configuration, recorderApi, customerDataTrackerManager, getCommonContext, initialViewOptions, createEncoder, \n// `startRum` and its subcomponents assume tracking consent is granted initially and starts\n// collecting logs unconditionally. As such, `startRum` should be called with a\n// `trackingConsentState` set to \"granted\".\ntrackingConsentState, customVitalsState) {\n var cleanupTasks = [];\n var lifeCycle = new lifeCycle_1.LifeCycle();\n lifeCycle.subscribe(12 /* LifeCycleEventType.RUM_EVENT_COLLECTED */, function (event) { return (0, browser_core_1.sendToExtension)('rum', event); });\n var telemetry = startRumTelemetry(configuration);\n telemetry.setContextProvider(function () {\n var _a, _b;\n return ({\n application: {\n id: configuration.applicationId,\n },\n session: {\n id: (_a = session.findTrackedSession()) === null || _a === void 0 ? void 0 : _a.id,\n },\n view: {\n id: (_b = viewHistory.findView()) === null || _b === void 0 ? void 0 : _b.id,\n },\n action: {\n id: actionContexts.findActionId(),\n },\n });\n });\n var reportError = function (error) {\n lifeCycle.notify(13 /* LifeCycleEventType.RAW_ERROR_COLLECTED */, { error: error });\n (0, browser_core_1.addTelemetryDebug)('Error reported to customer', { 'error.message': error.message });\n };\n var featureFlagContexts = (0, featureFlagContext_1.startFeatureFlagContexts)(lifeCycle, customerDataTrackerManager.getOrCreateTracker(0 /* CustomerDataType.FeatureFlag */));\n var pageExitObservable = (0, browser_core_1.createPageExitObservable)(configuration);\n var pageExitSubscription = pageExitObservable.subscribe(function (event) {\n lifeCycle.notify(10 /* LifeCycleEventType.PAGE_EXITED */, event);\n });\n cleanupTasks.push(function () { return pageExitSubscription.unsubscribe(); });\n var session = !(0, browser_core_1.canUseEventBridge)()\n ? (0, rumSessionManager_1.startRumSessionManager)(configuration, lifeCycle, trackingConsentState)\n : (0, rumSessionManager_1.startRumSessionManagerStub)();\n if (!(0, browser_core_1.canUseEventBridge)()) {\n var batch_1 = (0, startRumBatch_1.startRumBatch)(configuration, lifeCycle, telemetry.observable, reportError, pageExitObservable, session.expireObservable, createEncoder);\n cleanupTasks.push(function () { return batch_1.stop(); });\n (0, startCustomerDataTelemetry_1.startCustomerDataTelemetry)(configuration, telemetry, lifeCycle, customerDataTrackerManager, batch_1.flushObservable);\n }\n else {\n (0, startRumEventBridge_1.startRumEventBridge)(lifeCycle);\n }\n var domMutationObservable = (0, domMutationObservable_1.createDOMMutationObservable)();\n var locationChangeObservable = (0, locationChangeObservable_1.createLocationChangeObservable)(configuration, location);\n var pageStateHistory = (0, pageStateHistory_1.startPageStateHistory)(configuration);\n var _a = (0, windowOpenObservable_1.createWindowOpenObservable)(), windowOpenObservable = _a.observable, stopWindowOpen = _a.stop;\n cleanupTasks.push(stopWindowOpen);\n var _b = startRumEventCollection(lifeCycle, configuration, location, session, pageStateHistory, locationChangeObservable, domMutationObservable, windowOpenObservable, getCommonContext, reportError), viewHistory = _b.viewHistory, urlContexts = _b.urlContexts, actionContexts = _b.actionContexts, addAction = _b.addAction, stopRumEventCollection = _b.stop;\n cleanupTasks.push(stopRumEventCollection);\n (0, browser_core_1.drainPreStartTelemetry)();\n var _c = (0, viewCollection_1.startViewCollection)(lifeCycle, configuration, location, domMutationObservable, windowOpenObservable, locationChangeObservable, featureFlagContexts, pageStateHistory, recorderApi, initialViewOptions), addTiming = _c.addTiming, startView = _c.startView, setViewName = _c.setViewName, setViewContext = _c.setViewContext, setViewContextProperty = _c.setViewContextProperty, stopViewCollection = _c.stop;\n cleanupTasks.push(stopViewCollection);\n var stopResourceCollection = (0, resourceCollection_1.startResourceCollection)(lifeCycle, configuration, pageStateHistory).stop;\n cleanupTasks.push(stopResourceCollection);\n if ((0, browser_core_1.isExperimentalFeatureEnabled)(browser_core_1.ExperimentalFeature.LONG_ANIMATION_FRAME)) {\n if (configuration.trackLongTasks) {\n var stopLongAnimationFrameCollection = (0, longAnimationFrameCollection_1.startLongAnimationFrameCollection)(lifeCycle, configuration).stop;\n cleanupTasks.push(stopLongAnimationFrameCollection);\n }\n }\n else {\n (0, longTaskCollection_1.startLongTaskCollection)(lifeCycle, configuration);\n }\n var addError = (0, errorCollection_1.startErrorCollection)(lifeCycle, configuration, pageStateHistory, featureFlagContexts).addError;\n (0, requestCollection_1.startRequestCollection)(lifeCycle, configuration, session);\n var vitalCollection = (0, vitalCollection_1.startVitalCollection)(lifeCycle, pageStateHistory, customVitalsState);\n var internalContext = (0, internalContext_1.startInternalContext)(configuration.applicationId, session, viewHistory, actionContexts, urlContexts);\n return {\n addAction: addAction,\n addError: addError,\n addTiming: addTiming,\n addFeatureFlagEvaluation: featureFlagContexts.addFeatureFlagEvaluation,\n startView: startView,\n setViewContext: setViewContext,\n setViewContextProperty: setViewContextProperty,\n setViewName: setViewName,\n lifeCycle: lifeCycle,\n viewHistory: viewHistory,\n session: session,\n stopSession: function () { return session.expire(); },\n getInternalContext: internalContext.get,\n startDurationVital: vitalCollection.startDurationVital,\n stopDurationVital: vitalCollection.stopDurationVital,\n addDurationVital: vitalCollection.addDurationVital,\n stop: function () {\n cleanupTasks.forEach(function (task) { return task(); });\n },\n };\n}\nfunction startRumTelemetry(configuration) {\n var telemetry = (0, browser_core_1.startTelemetry)(\"browser-rum-sdk\" /* TelemetryService.RUM */, configuration);\n if ((0, browser_core_1.canUseEventBridge)()) {\n var bridge_1 = (0, browser_core_1.getEventBridge)();\n telemetry.observable.subscribe(function (event) { return bridge_1.send('internal_telemetry', event); });\n }\n return telemetry;\n}\nfunction startRumEventCollection(lifeCycle, configuration, location, sessionManager, pageStateHistory, locationChangeObservable, domMutationObservable, windowOpenObservable, getCommonContext, reportError) {\n var viewHistory = (0, viewHistory_1.startViewHistory)(lifeCycle);\n var urlContexts = (0, urlContexts_1.startUrlContexts)(lifeCycle, locationChangeObservable, location);\n var actionCollection = (0, actionCollection_1.startActionCollection)(lifeCycle, domMutationObservable, windowOpenObservable, configuration, pageStateHistory);\n var displayContext = (0, displayContext_1.startDisplayContext)(configuration);\n var ciVisibilityContext = (0, ciVisibilityContext_1.startCiVisibilityContext)(configuration);\n (0, assembly_1.startRumAssembly)(configuration, lifeCycle, sessionManager, viewHistory, urlContexts, actionCollection.actionContexts, displayContext, ciVisibilityContext, getCommonContext, reportError);\n return {\n viewHistory: viewHistory,\n pageStateHistory: pageStateHistory,\n urlContexts: urlContexts,\n addAction: actionCollection.addAction,\n actionContexts: actionCollection.actionContexts,\n stop: function () {\n actionCollection.stop();\n ciVisibilityContext.stop();\n displayContext.stop();\n urlContexts.stop();\n viewHistory.stop();\n pageStateHistory.stop();\n },\n };\n}\n//# sourceMappingURL=startRum.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WATCH_COOKIE_INTERVAL_DELAY = void 0;\nexports.createCookieObservable = createCookieObservable;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nfunction createCookieObservable(configuration, cookieName) {\n var detectCookieChangeStrategy = window.cookieStore\n ? listenToCookieStoreChange(configuration)\n : watchCookieFallback;\n return new browser_core_1.Observable(function (observable) {\n return detectCookieChangeStrategy(cookieName, function (event) { return observable.notify(event); });\n });\n}\nfunction listenToCookieStoreChange(configuration) {\n return function (cookieName, callback) {\n var listener = (0, browser_core_1.addEventListener)(configuration, window.cookieStore, \"change\" /* DOM_EVENT.CHANGE */, function (event) {\n // Based on our experimentation, we're assuming that entries for the same cookie cannot be in both the 'changed' and 'deleted' arrays.\n // However, due to ambiguity in the specification, we asked for clarification: https://github.com/WICG/cookie-store/issues/226\n var changeEvent = (0, browser_core_1.find)(event.changed, function (event) { return event.name === cookieName; }) ||\n (0, browser_core_1.find)(event.deleted, function (event) { return event.name === cookieName; });\n if (changeEvent) {\n callback(changeEvent.value);\n }\n });\n return listener.stop;\n };\n}\nexports.WATCH_COOKIE_INTERVAL_DELAY = browser_core_1.ONE_SECOND;\nfunction watchCookieFallback(cookieName, callback) {\n var previousCookieValue = (0, browser_core_1.findCommaSeparatedValue)(document.cookie, cookieName);\n var watchCookieIntervalId = (0, browser_core_1.setInterval)(function () {\n var cookieValue = (0, browser_core_1.findCommaSeparatedValue)(document.cookie, cookieName);\n if (cookieValue !== previousCookieValue) {\n callback(cookieValue);\n }\n }, exports.WATCH_COOKIE_INTERVAL_DELAY);\n return function () {\n (0, browser_core_1.clearInterval)(watchCookieIntervalId);\n };\n}\n//# sourceMappingURL=cookieObservable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getCrypto = getCrypto;\nfunction getCrypto() {\n // TODO: remove msCrypto when IE11 support is dropped\n return window.crypto || window.msCrypto;\n}\n//# sourceMappingURL=crypto.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createDOMMutationObservable = createDOMMutationObservable;\nexports.getMutationObserverConstructor = getMutationObserverConstructor;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nfunction createDOMMutationObservable() {\n var MutationObserver = getMutationObserverConstructor();\n return new browser_core_1.Observable(function (observable) {\n if (!MutationObserver) {\n return;\n }\n var observer = new MutationObserver((0, browser_core_1.monitor)(function () { return observable.notify(); }));\n observer.observe(document, {\n attributes: true,\n characterData: true,\n childList: true,\n subtree: true,\n });\n return function () { return observer.disconnect(); };\n });\n}\nfunction getMutationObserverConstructor() {\n var constructor;\n var browserWindow = window;\n // Angular uses Zone.js to provide a context persisting across async tasks. Zone.js replaces the\n // global MutationObserver constructor with a patched version to support the context propagation.\n // There is an ongoing issue[1][2] with this setup when using a MutationObserver within a Angular\n // component: on some occasions, the callback is being called in an infinite loop, causing the\n // page to freeze (even if the callback is completely empty).\n //\n // To work around this issue, we try to get the original MutationObserver constructor stored by\n // Zone.js.\n //\n // [1] https://github.com/angular/angular/issues/26948\n // [2] https://github.com/angular/angular/issues/31712\n if (browserWindow.Zone) {\n // Zone.js 0.8.6+ is storing original class constructors into the browser 'window' object[3].\n //\n // [3] https://github.com/angular/angular/blob/6375fa79875c0fe7b815efc45940a6e6f5c9c9eb/packages/zone.js/lib/common/utils.ts#L288\n constructor = (0, browser_core_1.getZoneJsOriginalValue)(browserWindow, 'MutationObserver');\n if (browserWindow.MutationObserver && constructor === browserWindow.MutationObserver) {\n // Anterior Zone.js versions (used in Angular 2) does not expose the original MutationObserver\n // in the 'window' object. Luckily, the patched MutationObserver class is storing an original\n // instance in its properties[4]. Let's get the original MutationObserver constructor from\n // there.\n //\n // [4] https://github.com/angular/zone.js/blob/v0.8.5/lib/common/utils.ts#L412\n var patchedInstance = new browserWindow.MutationObserver(browser_core_1.noop);\n var originalInstance = (0, browser_core_1.getZoneJsOriginalValue)(patchedInstance, 'originalInstance');\n constructor = originalInstance && originalInstance.constructor;\n }\n }\n if (!constructor) {\n constructor = browserWindow.MutationObserver;\n }\n return constructor;\n}\n//# sourceMappingURL=domMutationObservable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retrieveFirstInputTiming = retrieveFirstInputTiming;\nvar browser_core_1 = require(\"@datadog/browser-core\");\n/**\n * first-input timing entry polyfill based on\n * https://github.com/GoogleChrome/web-vitals/blob/master/src/lib/polyfills/firstInputPolyfill.ts\n */\nfunction retrieveFirstInputTiming(configuration, callback) {\n var startTimeStamp = (0, browser_core_1.dateNow)();\n var timingSent = false;\n var removeEventListeners = (0, browser_core_1.addEventListeners)(configuration, window, [\"click\" /* DOM_EVENT.CLICK */, \"mousedown\" /* DOM_EVENT.MOUSE_DOWN */, \"keydown\" /* DOM_EVENT.KEY_DOWN */, \"touchstart\" /* DOM_EVENT.TOUCH_START */, \"pointerdown\" /* DOM_EVENT.POINTER_DOWN */], function (evt) {\n // Only count cancelable events, which should trigger behavior important to the user.\n if (!evt.cancelable) {\n return;\n }\n // This timing will be used to compute the \"first Input delay\", which is the delta between\n // when the system received the event (e.g. evt.timeStamp) and when it could run the callback\n // (e.g. performance.now()).\n var timing = {\n entryType: 'first-input',\n processingStart: (0, browser_core_1.relativeNow)(),\n processingEnd: (0, browser_core_1.relativeNow)(),\n startTime: evt.timeStamp,\n duration: 0, // arbitrary value to avoid nullable duration and simplify INP logic\n name: '',\n cancelable: false,\n target: null,\n toJSON: function () { return ({}); },\n };\n if (evt.type === \"pointerdown\" /* DOM_EVENT.POINTER_DOWN */) {\n sendTimingIfPointerIsNotCancelled(configuration, timing);\n }\n else {\n sendTiming(timing);\n }\n }, { passive: true, capture: true }).stop;\n return { stop: removeEventListeners };\n /**\n * Pointer events are a special case, because they can trigger main or compositor thread behavior.\n * We differentiate these cases based on whether or not we see a pointercancel event, which are\n * fired when we scroll. If we're scrolling we don't need to report input delay since FID excludes\n * scrolling and pinch/zooming.\n */\n function sendTimingIfPointerIsNotCancelled(configuration, timing) {\n (0, browser_core_1.addEventListeners)(configuration, window, [\"pointerup\" /* DOM_EVENT.POINTER_UP */, \"pointercancel\" /* DOM_EVENT.POINTER_CANCEL */], function (event) {\n if (event.type === \"pointerup\" /* DOM_EVENT.POINTER_UP */) {\n sendTiming(timing);\n }\n }, { once: true });\n }\n function sendTiming(timing) {\n if (!timingSent) {\n timingSent = true;\n removeEventListeners();\n // In some cases the recorded delay is clearly wrong, e.g. it's negative or it's larger than\n // the time between now and when the page was loaded.\n // - https://github.com/GoogleChromeLabs/first-input-delay/issues/4\n // - https://github.com/GoogleChromeLabs/first-input-delay/issues/6\n // - https://github.com/GoogleChromeLabs/first-input-delay/issues/7\n var delay = timing.processingStart - timing.startTime;\n if (delay >= 0 && delay < (0, browser_core_1.dateNow)() - startTimeStamp) {\n callback(timing);\n }\n }\n }\n}\n//# sourceMappingURL=firstInputPolyfill.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isTextNode = isTextNode;\nexports.isCommentNode = isCommentNode;\nexports.isElementNode = isElementNode;\nexports.isNodeShadowHost = isNodeShadowHost;\nexports.isNodeShadowRoot = isNodeShadowRoot;\nexports.hasChildNodes = hasChildNodes;\nexports.forEachChildNodes = forEachChildNodes;\nexports.getParentNode = getParentNode;\nfunction isTextNode(node) {\n return node.nodeType === Node.TEXT_NODE;\n}\nfunction isCommentNode(node) {\n return node.nodeType === Node.COMMENT_NODE;\n}\nfunction isElementNode(node) {\n return node.nodeType === Node.ELEMENT_NODE;\n}\nfunction isNodeShadowHost(node) {\n return isElementNode(node) && Boolean(node.shadowRoot);\n}\nfunction isNodeShadowRoot(node) {\n var shadowRoot = node;\n return !!shadowRoot.host && shadowRoot.nodeType === Node.DOCUMENT_FRAGMENT_NODE && isElementNode(shadowRoot.host);\n}\nfunction hasChildNodes(node) {\n return node.childNodes.length > 0 || isNodeShadowHost(node);\n}\nfunction forEachChildNodes(node, callback) {\n var child = node.firstChild;\n while (child) {\n callback(child);\n child = child.nextSibling;\n }\n if (isNodeShadowHost(node)) {\n callback(node.shadowRoot);\n }\n}\n/**\n * Return `host` in case if the current node is a shadow root otherwise will return the `parentNode`\n */\nfunction getParentNode(node) {\n return isNodeShadowRoot(node) ? node.host : node.parentNode;\n}\n//# sourceMappingURL=htmlDomUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createLocationChangeObservable = createLocationChangeObservable;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nfunction createLocationChangeObservable(configuration, location) {\n var currentLocation = (0, browser_core_1.shallowClone)(location);\n return new browser_core_1.Observable(function (observable) {\n var stopHistoryTracking = trackHistory(configuration, onLocationChange).stop;\n var stopHashTracking = trackHash(configuration, onLocationChange).stop;\n function onLocationChange() {\n if (currentLocation.href === location.href) {\n return;\n }\n var newLocation = (0, browser_core_1.shallowClone)(location);\n observable.notify({\n newLocation: newLocation,\n oldLocation: currentLocation,\n });\n currentLocation = newLocation;\n }\n return function () {\n stopHistoryTracking();\n stopHashTracking();\n };\n });\n}\nfunction trackHistory(configuration, onHistoryChange) {\n var stopInstrumentingPushState = (0, browser_core_1.instrumentMethod)(getHistoryInstrumentationTarget('pushState'), 'pushState', function (_a) {\n var onPostCall = _a.onPostCall;\n onPostCall(onHistoryChange);\n }).stop;\n var stopInstrumentingReplaceState = (0, browser_core_1.instrumentMethod)(getHistoryInstrumentationTarget('replaceState'), 'replaceState', function (_a) {\n var onPostCall = _a.onPostCall;\n onPostCall(onHistoryChange);\n }).stop;\n var removeListener = (0, browser_core_1.addEventListener)(configuration, window, \"popstate\" /* DOM_EVENT.POP_STATE */, onHistoryChange).stop;\n return {\n stop: function () {\n stopInstrumentingPushState();\n stopInstrumentingReplaceState();\n removeListener();\n },\n };\n}\nfunction trackHash(configuration, onHashChange) {\n return (0, browser_core_1.addEventListener)(configuration, window, \"hashchange\" /* DOM_EVENT.HASH_CHANGE */, onHashChange);\n}\nfunction getHistoryInstrumentationTarget(methodName) {\n // Ideally we should always instument the method on the prototype, however some frameworks (e.g [Next.js](https://github.com/vercel/next.js/blob/d3f5532065f3e3bb84fb54bd2dfd1a16d0f03a21/packages/next/src/client/components/app-router.tsx#L429))\n // are wrapping the instance method. In that case we should also wrap the instance method.\n return Object.prototype.hasOwnProperty.call(history, methodName) ? history : History.prototype;\n}\n//# sourceMappingURL=locationChangeObservable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.RumPerformanceEntryType = void 0;\nexports.createPerformanceObservable = createPerformanceObservable;\nexports.supportPerformanceTimingEvent = supportPerformanceTimingEvent;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar resourceUtils_1 = require(\"../domain/resource/resourceUtils\");\nvar firstInputPolyfill_1 = require(\"./firstInputPolyfill\");\n// We want to use a real enum (i.e. not a const enum) here, to be able to check whether an arbitrary\n// string is an expected performance entry\n// eslint-disable-next-line no-restricted-syntax\nvar RumPerformanceEntryType;\n(function (RumPerformanceEntryType) {\n RumPerformanceEntryType[\"EVENT\"] = \"event\";\n RumPerformanceEntryType[\"FIRST_INPUT\"] = \"first-input\";\n RumPerformanceEntryType[\"LARGEST_CONTENTFUL_PAINT\"] = \"largest-contentful-paint\";\n RumPerformanceEntryType[\"LAYOUT_SHIFT\"] = \"layout-shift\";\n RumPerformanceEntryType[\"LONG_TASK\"] = \"longtask\";\n RumPerformanceEntryType[\"LONG_ANIMATION_FRAME\"] = \"long-animation-frame\";\n RumPerformanceEntryType[\"NAVIGATION\"] = \"navigation\";\n RumPerformanceEntryType[\"PAINT\"] = \"paint\";\n RumPerformanceEntryType[\"RESOURCE\"] = \"resource\";\n})(RumPerformanceEntryType || (exports.RumPerformanceEntryType = RumPerformanceEntryType = {}));\nfunction createPerformanceObservable(configuration, options) {\n return new browser_core_1.Observable(function (observable) {\n if (!window.PerformanceObserver) {\n return;\n }\n var handlePerformanceEntries = function (entries) {\n var rumPerformanceEntries = filterRumPerformanceEntries(entries);\n if (rumPerformanceEntries.length > 0) {\n observable.notify(rumPerformanceEntries);\n }\n };\n var timeoutId;\n var isObserverInitializing = true;\n var observer = new PerformanceObserver((0, browser_core_1.monitor)(function (entries) {\n // In Safari the performance observer callback is synchronous.\n // Because the buffered performance entry list can be quite large we delay the computation to prevent the SDK from blocking the main thread on init\n if (isObserverInitializing) {\n timeoutId = (0, browser_core_1.setTimeout)(function () { return handlePerformanceEntries(entries.getEntries()); });\n }\n else {\n handlePerformanceEntries(entries.getEntries());\n }\n }));\n try {\n observer.observe(options);\n }\n catch (_a) {\n // Some old browser versions (<= chrome 74 ) don't support the PerformanceObserver type and buffered options\n // In these cases, fallback to getEntriesByType and PerformanceObserver with entryTypes\n // TODO: remove this fallback in the next major version\n var fallbackSupportedEntryTypes = [\n RumPerformanceEntryType.RESOURCE,\n RumPerformanceEntryType.NAVIGATION,\n RumPerformanceEntryType.LONG_TASK,\n RumPerformanceEntryType.PAINT,\n ];\n if ((0, browser_core_1.includes)(fallbackSupportedEntryTypes, options.type)) {\n if (options.buffered) {\n timeoutId = (0, browser_core_1.setTimeout)(function () { return handlePerformanceEntries(performance.getEntriesByType(options.type)); });\n }\n try {\n observer.observe({ entryTypes: [options.type] });\n }\n catch (_b) {\n // Old versions of Safari are throwing \"entryTypes contained only unsupported types\"\n // errors when observing only unsupported entry types.\n //\n // We could use `supportPerformanceTimingEvent` to make sure we don't invoke\n // `observer.observe` with an unsupported entry type, but Safari 11 and 12 don't support\n // `Performance.supportedEntryTypes`, so doing so would lose support for these versions\n // even if they do support the entry type.\n return;\n }\n }\n }\n isObserverInitializing = false;\n manageResourceTimingBufferFull(configuration);\n var stopFirstInputTiming;\n if (!supportPerformanceTimingEvent(RumPerformanceEntryType.FIRST_INPUT) &&\n options.type === RumPerformanceEntryType.FIRST_INPUT) {\n ;\n (stopFirstInputTiming = (0, firstInputPolyfill_1.retrieveFirstInputTiming)(configuration, function (timing) {\n handlePerformanceEntries([timing]);\n }).stop);\n }\n return function () {\n observer.disconnect();\n if (stopFirstInputTiming) {\n stopFirstInputTiming();\n }\n (0, browser_core_1.clearTimeout)(timeoutId);\n };\n });\n}\nvar resourceTimingBufferFullListener;\nfunction manageResourceTimingBufferFull(configuration) {\n if (!resourceTimingBufferFullListener && supportPerformanceObject() && 'addEventListener' in performance) {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1559377\n resourceTimingBufferFullListener = (0, browser_core_1.addEventListener)(configuration, performance, 'resourcetimingbufferfull', function () {\n performance.clearResourceTimings();\n });\n }\n return function () {\n resourceTimingBufferFullListener === null || resourceTimingBufferFullListener === void 0 ? void 0 : resourceTimingBufferFullListener.stop();\n };\n}\nfunction supportPerformanceObject() {\n return window.performance !== undefined && 'getEntries' in performance;\n}\nfunction supportPerformanceTimingEvent(entryType) {\n return (window.PerformanceObserver &&\n PerformanceObserver.supportedEntryTypes !== undefined &&\n PerformanceObserver.supportedEntryTypes.includes(entryType));\n}\nfunction filterRumPerformanceEntries(entries) {\n return entries.filter(function (entry) { return !isForbiddenResource(entry); });\n}\nfunction isForbiddenResource(entry) {\n return (entry.entryType === RumPerformanceEntryType.RESOURCE &&\n (!(0, resourceUtils_1.isAllowedRequestUrl)(entry.name) || !(0, resourceUtils_1.hasValidResourceEntryDuration)(entry)));\n}\n//# sourceMappingURL=performanceObservable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getNavigationEntry = getNavigationEntry;\nexports.computeTimingsFromDeprecatedPerformanceTiming = computeTimingsFromDeprecatedPerformanceTiming;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar performanceObservable_1 = require(\"./performanceObservable\");\nfunction getNavigationEntry() {\n if ((0, performanceObservable_1.supportPerformanceTimingEvent)(performanceObservable_1.RumPerformanceEntryType.NAVIGATION)) {\n var navigationEntry = performance.getEntriesByType(performanceObservable_1.RumPerformanceEntryType.NAVIGATION)[0];\n if (navigationEntry) {\n return navigationEntry;\n }\n }\n var timings = computeTimingsFromDeprecatedPerformanceTiming();\n var entry = (0, browser_core_1.assign)({\n entryType: performanceObservable_1.RumPerformanceEntryType.NAVIGATION,\n initiatorType: 'navigation',\n name: window.location.href,\n startTime: 0,\n duration: timings.responseEnd,\n decodedBodySize: 0,\n encodedBodySize: 0,\n transferSize: 0,\n workerStart: 0,\n toJSON: function () { return (0, browser_core_1.assign)({}, entry, { toJSON: undefined }); },\n }, timings);\n return entry;\n}\nfunction computeTimingsFromDeprecatedPerformanceTiming() {\n var result = {};\n var timing = performance.timing;\n for (var key in timing) {\n if ((0, browser_core_1.isNumber)(timing[key])) {\n var numberKey = key;\n var timingElement = timing[numberKey];\n result[numberKey] = timingElement === 0 ? 0 : (0, browser_core_1.getRelativeTime)(timingElement);\n }\n }\n return result;\n}\n//# sourceMappingURL=performanceUtils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WeakSet = void 0;\nexports.cssEscape = cssEscape;\nexports.elementMatches = elementMatches;\nexports.getParentElement = getParentElement;\nexports.getClassList = getClassList;\n// https://github.com/jquery/jquery/blob/a684e6ba836f7c553968d7d026ed7941e1a612d8/src/selector/escapeSelector.js\nfunction cssEscape(str) {\n if (window.CSS && window.CSS.escape) {\n return window.CSS.escape(str);\n }\n // eslint-disable-next-line no-control-regex\n return str.replace(/([\\0-\\x1f\\x7f]|^-?\\d)|^-$|[^\\x80-\\uFFFF\\w-]/g, function (ch, asCodePoint) {\n if (asCodePoint) {\n // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER\n if (ch === '\\0') {\n return '\\uFFFD';\n }\n // Control characters and (dependent upon position) numbers get escaped as code points\n return \"\".concat(ch.slice(0, -1), \"\\\\\").concat(ch.charCodeAt(ch.length - 1).toString(16), \" \");\n }\n // Other potentially-special ASCII characters get backslash-escaped\n return \"\\\\\".concat(ch);\n });\n}\nfunction elementMatches(element, selector) {\n if (element.matches) {\n return element.matches(selector);\n }\n // IE11 support\n if (element.msMatchesSelector) {\n return element.msMatchesSelector(selector);\n }\n return false;\n}\n/**\n * Return the parentElement of an node\n *\n * In cases where parentElement is not supported, such as in IE11 for SVG nodes, we fallback to parentNode\n */\nfunction getParentElement(node) {\n if (node.parentElement) {\n return node.parentElement;\n }\n while (node.parentNode) {\n if (node.parentNode.nodeType === Node.ELEMENT_NODE) {\n return node.parentNode;\n }\n node = node.parentNode;\n }\n return null;\n}\n/**\n * Return the classList of an element or an array of classes if classList is not supported\n *\n * In cases where classList is not supported, such as in IE11 for SVG and MathML elements,\n * we fallback to using element.getAttribute('class').\n * We opt for element.getAttribute('class') over element.className because className returns an SVGAnimatedString for SVG elements.\n */\nfunction getClassList(element) {\n if (element.classList) {\n return element.classList;\n }\n var classes = (element.getAttribute('class') || '').trim();\n return classes ? classes.split(/\\s+/) : [];\n}\n// ie11 supports WeakMap but not WeakSet\nvar PLACEHOLDER = 1;\n// eslint-disable-next-line no-restricted-syntax\nvar WeakSet = /** @class */ (function () {\n function WeakSet(initialValues) {\n var _this = this;\n this.map = new WeakMap();\n if (initialValues) {\n initialValues.forEach(function (value) { return _this.map.set(value, PLACEHOLDER); });\n }\n }\n WeakSet.prototype.add = function (value) {\n this.map.set(value, PLACEHOLDER);\n return this;\n };\n WeakSet.prototype.delete = function (value) {\n return this.map.delete(value);\n };\n WeakSet.prototype.has = function (value) {\n return this.map.has(value);\n };\n return WeakSet;\n}());\nexports.WeakSet = WeakSet;\n//# sourceMappingURL=polyfills.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getScrollX = getScrollX;\nexports.getScrollY = getScrollY;\nfunction getScrollX() {\n var scrollX;\n var visual = window.visualViewport;\n if (visual) {\n scrollX = visual.pageLeft - visual.offsetLeft;\n }\n else if (window.scrollX !== undefined) {\n scrollX = window.scrollX;\n }\n else {\n scrollX = window.pageXOffset || 0;\n }\n return Math.round(scrollX);\n}\nfunction getScrollY() {\n var scrollY;\n var visual = window.visualViewport;\n if (visual) {\n scrollY = visual.pageTop - visual.offsetTop;\n }\n else if (window.scrollY !== undefined) {\n scrollY = window.scrollY;\n }\n else {\n scrollY = window.pageYOffset || 0;\n }\n return Math.round(scrollY);\n}\n//# sourceMappingURL=scroll.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.initViewportObservable = initViewportObservable;\nexports.createViewportObservable = createViewportObservable;\nexports.getViewportDimension = getViewportDimension;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar viewportObservable;\nfunction initViewportObservable(configuration) {\n if (!viewportObservable) {\n viewportObservable = createViewportObservable(configuration);\n }\n return viewportObservable;\n}\nfunction createViewportObservable(configuration) {\n return new browser_core_1.Observable(function (observable) {\n var updateDimension = (0, browser_core_1.throttle)(function () {\n observable.notify(getViewportDimension());\n }, 200).throttled;\n return (0, browser_core_1.addEventListener)(configuration, window, \"resize\" /* DOM_EVENT.RESIZE */, updateDimension, { capture: true, passive: true })\n .stop;\n });\n}\n// excludes the width and height of any rendered classic scrollbar that is fixed to the visual viewport\nfunction getViewportDimension() {\n var visual = window.visualViewport;\n if (visual) {\n return {\n width: Number(visual.width * visual.scale),\n height: Number(visual.height * visual.scale),\n };\n }\n return {\n width: Number(window.innerWidth || 0),\n height: Number(window.innerHeight || 0),\n };\n}\n//# sourceMappingURL=viewportObservable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createWindowOpenObservable = createWindowOpenObservable;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nfunction createWindowOpenObservable() {\n var observable = new browser_core_1.Observable();\n var stop = (0, browser_core_1.instrumentMethod)(window, 'open', function () { return observable.notify(); }).stop;\n return { observable: observable, stop: stop };\n}\n//# sourceMappingURL=windowOpenObservable.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startActionCollection = startActionCollection;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar discardNegativeDuration_1 = require(\"../discardNegativeDuration\");\nvar trackClickActions_1 = require(\"./trackClickActions\");\nfunction startActionCollection(lifeCycle, domMutationObservable, windowOpenObservable, configuration, pageStateHistory) {\n var _a;\n lifeCycle.subscribe(0 /* LifeCycleEventType.AUTO_ACTION_COMPLETED */, function (action) {\n return lifeCycle.notify(11 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, processAction(action, pageStateHistory));\n });\n var actionContexts = { findActionId: browser_core_1.noop };\n var stop = browser_core_1.noop;\n if (configuration.trackUserInteractions) {\n ;\n (_a = (0, trackClickActions_1.trackClickActions)(lifeCycle, domMutationObservable, windowOpenObservable, configuration), actionContexts = _a.actionContexts, stop = _a.stop);\n }\n return {\n addAction: function (action, savedCommonContext) {\n lifeCycle.notify(11 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, (0, browser_core_1.assign)({\n savedCommonContext: savedCommonContext,\n }, processAction(action, pageStateHistory)));\n },\n actionContexts: actionContexts,\n stop: stop,\n };\n}\nfunction processAction(action, pageStateHistory) {\n var autoActionProperties = isAutoAction(action)\n ? {\n action: {\n id: action.id,\n loading_time: (0, discardNegativeDuration_1.discardNegativeDuration)((0, browser_core_1.toServerDuration)(action.duration)),\n frustration: {\n type: action.frustrationTypes,\n },\n error: {\n count: action.counts.errorCount,\n },\n long_task: {\n count: action.counts.longTaskCount,\n },\n resource: {\n count: action.counts.resourceCount,\n },\n },\n _dd: {\n action: {\n target: action.target,\n position: action.position,\n name_source: (0, browser_core_1.isExperimentalFeatureEnabled)(browser_core_1.ExperimentalFeature.ACTION_NAME_MASKING)\n ? action.nameSource\n : undefined,\n },\n },\n }\n : undefined;\n var customerContext = !isAutoAction(action) ? action.context : undefined;\n var actionEvent = (0, browser_core_1.combine)({\n action: {\n id: (0, browser_core_1.generateUUID)(),\n target: {\n name: action.name,\n },\n type: action.type,\n },\n date: action.startClocks.timeStamp,\n type: \"action\" /* RumEventType.ACTION */,\n view: { in_foreground: pageStateHistory.wasInPageStateAt(\"active\" /* PageState.ACTIVE */, action.startClocks.relative) },\n }, autoActionProperties);\n var domainContext = isAutoAction(action) ? { events: action.events } : {};\n if (!isAutoAction(action) && action.handlingStack) {\n domainContext.handlingStack = action.handlingStack;\n }\n return {\n customerContext: customerContext,\n rawRumEvent: actionEvent,\n startTime: action.startClocks.relative,\n domainContext: domainContext,\n };\n}\nfunction isAutoAction(action) {\n return action.type !== \"custom\" /* ActionType.CUSTOM */;\n}\n//# sourceMappingURL=actionCollection.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MAX_DISTANCE_BETWEEN_CLICKS = exports.MAX_DURATION_BETWEEN_CLICKS = void 0;\nexports.createClickChain = createClickChain;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nexports.MAX_DURATION_BETWEEN_CLICKS = browser_core_1.ONE_SECOND;\nexports.MAX_DISTANCE_BETWEEN_CLICKS = 100;\nfunction createClickChain(firstClick, onFinalize) {\n var bufferedClicks = [];\n var status = 0 /* ClickChainStatus.WaitingForMoreClicks */;\n var maxDurationBetweenClicksTimeoutId;\n appendClick(firstClick);\n function appendClick(click) {\n click.stopObservable.subscribe(tryFinalize);\n bufferedClicks.push(click);\n (0, browser_core_1.clearTimeout)(maxDurationBetweenClicksTimeoutId);\n maxDurationBetweenClicksTimeoutId = (0, browser_core_1.setTimeout)(dontAcceptMoreClick, exports.MAX_DURATION_BETWEEN_CLICKS);\n }\n function tryFinalize() {\n if (status === 1 /* ClickChainStatus.WaitingForClicksToStop */ && bufferedClicks.every(function (click) { return click.isStopped(); })) {\n status = 2 /* ClickChainStatus.Finalized */;\n onFinalize(bufferedClicks);\n }\n }\n function dontAcceptMoreClick() {\n (0, browser_core_1.clearTimeout)(maxDurationBetweenClicksTimeoutId);\n if (status === 0 /* ClickChainStatus.WaitingForMoreClicks */) {\n status = 1 /* ClickChainStatus.WaitingForClicksToStop */;\n tryFinalize();\n }\n }\n return {\n tryAppend: function (click) {\n if (status !== 0 /* ClickChainStatus.WaitingForMoreClicks */) {\n return false;\n }\n if (bufferedClicks.length > 0 &&\n !areEventsSimilar(bufferedClicks[bufferedClicks.length - 1].event, click.event)) {\n dontAcceptMoreClick();\n return false;\n }\n appendClick(click);\n return true;\n },\n stop: function () {\n dontAcceptMoreClick();\n },\n };\n}\n/**\n * Checks whether two events are similar by comparing their target, position and timestamp\n */\nfunction areEventsSimilar(first, second) {\n return (first.target === second.target &&\n mouseEventDistance(first, second) <= exports.MAX_DISTANCE_BETWEEN_CLICKS &&\n first.timeStamp - second.timeStamp <= exports.MAX_DURATION_BETWEEN_CLICKS);\n}\nfunction mouseEventDistance(origin, other) {\n return Math.sqrt(Math.pow(origin.clientX - other.clientX, 2) + Math.pow(origin.clientY - other.clientY, 2));\n}\n//# sourceMappingURL=clickChain.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.computeFrustration = computeFrustration;\nexports.isRage = isRage;\nexports.isDead = isDead;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar polyfills_1 = require(\"../../browser/polyfills\");\nvar MIN_CLICKS_PER_SECOND_TO_CONSIDER_RAGE = 3;\nfunction computeFrustration(clicks, rageClick) {\n if (isRage(clicks)) {\n rageClick.addFrustration(\"rage_click\" /* FrustrationType.RAGE_CLICK */);\n if (clicks.some(isDead)) {\n rageClick.addFrustration(\"dead_click\" /* FrustrationType.DEAD_CLICK */);\n }\n if (rageClick.hasError) {\n rageClick.addFrustration(\"error_click\" /* FrustrationType.ERROR_CLICK */);\n }\n return { isRage: true };\n }\n var hasSelectionChanged = clicks.some(function (click) { return click.getUserActivity().selection; });\n clicks.forEach(function (click) {\n if (click.hasError) {\n click.addFrustration(\"error_click\" /* FrustrationType.ERROR_CLICK */);\n }\n if (isDead(click) &&\n // Avoid considering clicks part of a double-click or triple-click selections as dead clicks\n !hasSelectionChanged) {\n click.addFrustration(\"dead_click\" /* FrustrationType.DEAD_CLICK */);\n }\n });\n return { isRage: false };\n}\nfunction isRage(clicks) {\n if (clicks.some(function (click) { return click.getUserActivity().selection || click.getUserActivity().scroll; })) {\n return false;\n }\n for (var i = 0; i < clicks.length - (MIN_CLICKS_PER_SECOND_TO_CONSIDER_RAGE - 1); i += 1) {\n if (clicks[i + MIN_CLICKS_PER_SECOND_TO_CONSIDER_RAGE - 1].event.timeStamp - clicks[i].event.timeStamp <=\n browser_core_1.ONE_SECOND) {\n return true;\n }\n }\n return false;\n}\nvar DEAD_CLICK_EXCLUDE_SELECTOR = \n// inputs that don't trigger a meaningful event like \"input\" when clicked, including textual\n// inputs (using a negative selector is shorter here)\n'input:not([type=\"checkbox\"]):not([type=\"radio\"]):not([type=\"button\"]):not([type=\"submit\"]):not([type=\"reset\"]):not([type=\"range\"]),' +\n 'textarea,' +\n 'select,' +\n // contenteditable and their descendants don't always trigger meaningful changes when manipulated\n '[contenteditable],' +\n '[contenteditable] *,' +\n // canvas, as there is no good way to detect activity occurring on them\n 'canvas,' +\n // links that are interactive (have an href attribute) or any of their descendants, as they can\n // open a new tab or navigate to a hash without triggering a meaningful event\n 'a[href],' +\n 'a[href] *';\nfunction isDead(click) {\n if (click.hasPageActivity || click.getUserActivity().input || click.getUserActivity().scroll) {\n return false;\n }\n return !(0, polyfills_1.elementMatches)(click.event.target, DEAD_CLICK_EXCLUDE_SELECTOR);\n}\n//# sourceMappingURL=computeFrustration.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ACTION_NAME_PLACEHOLDER = exports.DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE = void 0;\nexports.getActionNameFromElement = getActionNameFromElement;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar polyfills_1 = require(\"../../browser/polyfills\");\nvar privacy_1 = require(\"../privacy\");\n/**\n * Get the action name from the attribute 'data-dd-action-name' on the element or any of its parent.\n * It can also be retrieved from a user defined attribute.\n */\nexports.DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE = 'data-dd-action-name';\nexports.ACTION_NAME_PLACEHOLDER = 'Masked Element';\nfunction getActionNameFromElement(element, _a, nodePrivacyLevel) {\n var enablePrivacyForActionName = _a.enablePrivacyForActionName, userProgrammaticAttribute = _a.actionNameAttribute;\n // Proceed to get the action name in two steps:\n // * first, get the name programmatically, explicitly defined by the user.\n // * then, if privacy is set to mask, return a placeholder for the undefined.\n // * if privacy is not set to mask, use strategies that are known to return good results.\n // Those strategies will be used on the element and a few parents, but it's likely that they won't succeed at all.\n // * if no name is found this way, use strategies returning less accurate names as a fallback.\n // Those are much likely to succeed.\n var defaultActionName = getActionNameFromElementProgrammatically(element, exports.DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE) ||\n (userProgrammaticAttribute && getActionNameFromElementProgrammatically(element, userProgrammaticAttribute));\n if (defaultActionName) {\n return { name: defaultActionName, nameSource: \"custom_attribute\" /* ActionNameSource.CUSTOM_ATTRIBUTE */ };\n }\n else if (nodePrivacyLevel === privacy_1.NodePrivacyLevel.MASK) {\n return { name: exports.ACTION_NAME_PLACEHOLDER, nameSource: \"mask_placeholder\" /* ActionNameSource.MASK_PLACEHOLDER */ };\n }\n return (getActionNameFromElementForStrategies(element, userProgrammaticAttribute, priorityStrategies, enablePrivacyForActionName) ||\n getActionNameFromElementForStrategies(element, userProgrammaticAttribute, fallbackStrategies, enablePrivacyForActionName) || { name: '', nameSource: \"blank\" /* ActionNameSource.BLANK */ });\n}\nfunction getActionNameFromElementProgrammatically(targetElement, programmaticAttribute) {\n var elementWithAttribute;\n // We don't use getActionNameFromElementForStrategies here, because we want to consider all parents,\n // without limit. It is up to the user to declare a relevant naming strategy.\n // If available, use element.closest() to match get the attribute from the element or any of its\n // parent. Else fallback to a more traditional implementation.\n if (supportsElementClosest()) {\n elementWithAttribute = targetElement.closest(\"[\".concat(programmaticAttribute, \"]\"));\n }\n else {\n var element = targetElement;\n while (element) {\n if (element.hasAttribute(programmaticAttribute)) {\n elementWithAttribute = element;\n break;\n }\n element = (0, polyfills_1.getParentElement)(element);\n }\n }\n if (!elementWithAttribute) {\n return;\n }\n var name = elementWithAttribute.getAttribute(programmaticAttribute);\n return truncate(normalizeWhitespace(name.trim()));\n}\nvar priorityStrategies = [\n // associated LABEL text\n function (element, userProgrammaticAttribute, privacy) {\n // IE does not support element.labels, so we fallback to a CSS selector based on the element id\n // instead\n if (supportsLabelProperty()) {\n if ('labels' in element && element.labels && element.labels.length > 0) {\n return getActionNameFromTextualContent(element.labels[0], userProgrammaticAttribute);\n }\n }\n else if (element.id) {\n var label = element.ownerDocument &&\n (0, browser_core_1.find)(element.ownerDocument.querySelectorAll('label'), function (label) { return label.htmlFor === element.id; });\n return label && getActionNameFromTextualContent(label, userProgrammaticAttribute, privacy);\n }\n },\n // INPUT button (and associated) value\n function (element) {\n if (element.nodeName === 'INPUT') {\n var input = element;\n var type = input.getAttribute('type');\n if (type === 'button' || type === 'submit' || type === 'reset') {\n return { name: input.value, nameSource: \"text_content\" /* ActionNameSource.TEXT_CONTENT */ };\n }\n }\n },\n // BUTTON, LABEL or button-like element text\n function (element, userProgrammaticAttribute, privacyEnabledActionName) {\n if (element.nodeName === 'BUTTON' || element.nodeName === 'LABEL' || element.getAttribute('role') === 'button') {\n return getActionNameFromTextualContent(element, userProgrammaticAttribute, privacyEnabledActionName);\n }\n },\n function (element) { return getActionNameFromStandardAttribute(element, 'aria-label'); },\n // associated element text designated by the aria-labelledby attribute\n function (element, userProgrammaticAttribute, privacyEnabledActionName) {\n var labelledByAttribute = element.getAttribute('aria-labelledby');\n if (labelledByAttribute) {\n return {\n name: labelledByAttribute\n .split(/\\s+/)\n .map(function (id) { return getElementById(element, id); })\n .filter(function (label) { return Boolean(label); })\n .map(function (element) { return getTextualContent(element, userProgrammaticAttribute, privacyEnabledActionName); })\n .join(' '),\n nameSource: \"text_content\" /* ActionNameSource.TEXT_CONTENT */,\n };\n }\n },\n function (element) { return getActionNameFromStandardAttribute(element, 'alt'); },\n function (element) { return getActionNameFromStandardAttribute(element, 'name'); },\n function (element) { return getActionNameFromStandardAttribute(element, 'title'); },\n function (element) { return getActionNameFromStandardAttribute(element, 'placeholder'); },\n // SELECT first OPTION text\n function (element, userProgrammaticAttribute) {\n if ('options' in element && element.options.length > 0) {\n return getActionNameFromTextualContent(element.options[0], userProgrammaticAttribute);\n }\n },\n];\nvar fallbackStrategies = [\n function (element, userProgrammaticAttribute, privacyEnabledActionName) {\n return getActionNameFromTextualContent(element, userProgrammaticAttribute, privacyEnabledActionName);\n },\n];\n/**\n * Iterates over the target element and its parent, using the strategies list to get an action name.\n * Each strategies are applied on each element, stopping as soon as a non-empty value is returned.\n */\nvar MAX_PARENTS_TO_CONSIDER = 10;\nfunction getActionNameFromElementForStrategies(targetElement, userProgrammaticAttribute, strategies, privacyEnabledActionName) {\n var element = targetElement;\n var recursionCounter = 0;\n while (recursionCounter <= MAX_PARENTS_TO_CONSIDER &&\n element &&\n element.nodeName !== 'BODY' &&\n element.nodeName !== 'HTML' &&\n element.nodeName !== 'HEAD') {\n for (var _i = 0, strategies_1 = strategies; _i < strategies_1.length; _i++) {\n var strategy = strategies_1[_i];\n var actionName = strategy(element, userProgrammaticAttribute, privacyEnabledActionName);\n if (actionName) {\n var name_1 = actionName.name, nameSource = actionName.nameSource;\n var trimmedName = name_1 && name_1.trim();\n if (trimmedName) {\n return { name: truncate(normalizeWhitespace(trimmedName)), nameSource: nameSource };\n }\n }\n }\n // Consider a FORM as a contextual limit to get the action name. This is experimental and may\n // be reconsidered in the future.\n if (element.nodeName === 'FORM') {\n break;\n }\n element = (0, polyfills_1.getParentElement)(element);\n recursionCounter += 1;\n }\n}\nfunction normalizeWhitespace(s) {\n return s.replace(/\\s+/g, ' ');\n}\nfunction truncate(s) {\n return s.length > 100 ? \"\".concat((0, browser_core_1.safeTruncate)(s, 100), \" [...]\") : s;\n}\nfunction getElementById(refElement, id) {\n // Use the element ownerDocument here, because tests are executed in an iframe, so\n // document.getElementById won't work.\n return refElement.ownerDocument ? refElement.ownerDocument.getElementById(id) : null;\n}\nfunction getActionNameFromStandardAttribute(element, attribute) {\n return {\n name: element.getAttribute(attribute) || '',\n nameSource: \"standard_attribute\" /* ActionNameSource.STANDARD_ATTRIBUTE */,\n };\n}\nfunction getActionNameFromTextualContent(element, userProgrammaticAttribute, privacyEnabledActionName) {\n return {\n name: getTextualContent(element, userProgrammaticAttribute, privacyEnabledActionName) || '',\n nameSource: \"text_content\" /* ActionNameSource.TEXT_CONTENT */,\n };\n}\nfunction getTextualContent(element, userProgrammaticAttribute, privacyEnabledActionName) {\n if (element.isContentEditable) {\n return;\n }\n if ('innerText' in element) {\n var text_1 = element.innerText;\n var removeTextFromElements = function (query) {\n var list = element.querySelectorAll(query);\n for (var index = 0; index < list.length; index += 1) {\n var element_1 = list[index];\n if ('innerText' in element_1) {\n var textToReplace = element_1.innerText;\n if (textToReplace && textToReplace.trim().length > 0) {\n text_1 = text_1.replace(textToReplace, '');\n }\n }\n }\n };\n if (!supportsInnerTextScriptAndStyleRemoval()) {\n // remove the inner text of SCRIPT and STYLES from the result. This is a bit dirty, but should\n // be relatively fast and work in most cases.\n removeTextFromElements('script, style');\n }\n // remove the text of elements with programmatic attribute value\n removeTextFromElements(\"[\".concat(exports.DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE, \"]\"));\n if (userProgrammaticAttribute) {\n removeTextFromElements(\"[\".concat(userProgrammaticAttribute, \"]\"));\n }\n if (privacyEnabledActionName) {\n // remove the text of elements with privacy override\n removeTextFromElements(\"\".concat((0, privacy_1.getPrivacySelector)(privacy_1.NodePrivacyLevel.HIDDEN), \", \").concat((0, privacy_1.getPrivacySelector)(privacy_1.NodePrivacyLevel.MASK)));\n }\n return text_1;\n }\n return element.textContent;\n}\n/**\n * Returns true if element.innerText excludes the text from inline SCRIPT and STYLE element. This\n * should be the case everywhere except on Internet Explorer 10 and 11 (see [1])\n *\n * The innerText property relies on what is actually rendered to compute its output, so to check if\n * it actually excludes SCRIPT and STYLE content, a solution would be to create a style element, set\n * its content to '*', inject it in the document body, and check if the style element innerText\n * property returns '*'. Using a new `document` instance won't work as it is not rendered.\n *\n * This solution requires specific CSP rules (see [2]) to be set by the customer. We want to avoid\n * this, so instead we rely on browser detection. In case of false negative, the impact should be\n * low, since we rely on this result to remove the SCRIPT and STYLE innerText (which will be empty)\n * from a parent element innerText.\n *\n * [1]: https://web.archive.org/web/20210602165716/http://perfectionkills.com/the-poor-misunderstood-innerText/#diff-with-textContent\n * [2]: https://github.com/DataDog/browser-sdk/issues/1084\n */\nfunction supportsInnerTextScriptAndStyleRemoval() {\n return !(0, browser_core_1.isIE)();\n}\n/**\n * Returns true if the browser supports the element.labels property. This should be the case\n * everywhere except on Internet Explorer.\n * Note: The result is computed lazily, because we don't want any DOM access when the SDK is\n * evaluated.\n */\nvar supportsLabelPropertyResult;\nfunction supportsLabelProperty() {\n if (supportsLabelPropertyResult === undefined) {\n supportsLabelPropertyResult = 'labels' in HTMLInputElement.prototype;\n }\n return supportsLabelPropertyResult;\n}\n/**\n * Returns true if the browser supports the element.closest method. This should be the case\n * everywhere except on Internet Explorer.\n * Note: The result is computed lazily, because we don't want any DOM access when the SDK is\n * evaluated.\n */\nvar supportsElementClosestResult;\nfunction supportsElementClosest() {\n if (supportsElementClosestResult === undefined) {\n supportsElementClosestResult = 'closest' in HTMLElement.prototype;\n }\n return supportsElementClosestResult;\n}\n//# sourceMappingURL=getActionNameFromElement.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.interactionSelectorCache = exports.CLICK_ACTION_MAX_DURATION = void 0;\nexports.getInteractionSelector = getInteractionSelector;\nexports.updateInteractionSelector = updateInteractionSelector;\nvar browser_core_1 = require(\"@datadog/browser-core\");\n// Maximum duration for click actions\nexports.CLICK_ACTION_MAX_DURATION = 10 * browser_core_1.ONE_SECOND;\nexports.interactionSelectorCache = new Map();\nfunction getInteractionSelector(relativeTimestamp) {\n var selector = exports.interactionSelectorCache.get(relativeTimestamp);\n exports.interactionSelectorCache.delete(relativeTimestamp);\n return selector;\n}\nfunction updateInteractionSelector(relativeTimestamp, selector) {\n exports.interactionSelectorCache.set(relativeTimestamp, selector);\n exports.interactionSelectorCache.forEach(function (_, relativeTimestamp) {\n if ((0, browser_core_1.elapsed)(relativeTimestamp, (0, browser_core_1.relativeNow)()) > exports.CLICK_ACTION_MAX_DURATION) {\n exports.interactionSelectorCache.delete(relativeTimestamp);\n }\n });\n}\n//# sourceMappingURL=interactionSelectorCache.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.listenActionEvents = listenActionEvents;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nfunction listenActionEvents(configuration, _a) {\n var onPointerDown = _a.onPointerDown, onPointerUp = _a.onPointerUp;\n var selectionEmptyAtPointerDown;\n var userActivity = {\n selection: false,\n input: false,\n scroll: false,\n };\n var clickContext;\n var listeners = [\n (0, browser_core_1.addEventListener)(configuration, window, \"pointerdown\" /* DOM_EVENT.POINTER_DOWN */, function (event) {\n if (isValidPointerEvent(event)) {\n selectionEmptyAtPointerDown = isSelectionEmpty();\n userActivity = {\n selection: false,\n input: false,\n scroll: false,\n };\n clickContext = onPointerDown(event);\n }\n }, { capture: true }),\n (0, browser_core_1.addEventListener)(configuration, window, \"selectionchange\" /* DOM_EVENT.SELECTION_CHANGE */, function () {\n if (!selectionEmptyAtPointerDown || !isSelectionEmpty()) {\n userActivity.selection = true;\n }\n }, { capture: true }),\n (0, browser_core_1.addEventListener)(configuration, window, \"scroll\" /* DOM_EVENT.SCROLL */, function () {\n userActivity.scroll = true;\n }, { capture: true, passive: true }),\n (0, browser_core_1.addEventListener)(configuration, window, \"pointerup\" /* DOM_EVENT.POINTER_UP */, function (event) {\n if (isValidPointerEvent(event) && clickContext) {\n // Use a scoped variable to make sure the value is not changed by other clicks\n var localUserActivity_1 = userActivity;\n onPointerUp(clickContext, event, function () { return localUserActivity_1; });\n clickContext = undefined;\n }\n }, { capture: true }),\n (0, browser_core_1.addEventListener)(configuration, window, \"input\" /* DOM_EVENT.INPUT */, function () {\n userActivity.input = true;\n }, { capture: true }),\n ];\n return {\n stop: function () {\n listeners.forEach(function (listener) { return listener.stop(); });\n },\n };\n}\nfunction isSelectionEmpty() {\n var selection = window.getSelection();\n return !selection || selection.isCollapsed;\n}\nfunction isValidPointerEvent(event) {\n return (event.target instanceof Element &&\n // Only consider 'primary' pointer events for now. Multi-touch support could be implemented in\n // the future.\n event.isPrimary !== false);\n}\n//# sourceMappingURL=listenActionEvents.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ACTION_CONTEXT_TIME_OUT_DELAY = void 0;\nexports.trackClickActions = trackClickActions;\nexports.finalizeClicks = finalizeClicks;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar trackEventCounts_1 = require(\"../trackEventCounts\");\nvar waitPageActivityEnd_1 = require(\"../waitPageActivityEnd\");\nvar getSelectorFromElement_1 = require(\"../getSelectorFromElement\");\nvar privacy_1 = require(\"../privacy\");\nvar clickChain_1 = require(\"./clickChain\");\nvar getActionNameFromElement_1 = require(\"./getActionNameFromElement\");\nvar listenActionEvents_1 = require(\"./listenActionEvents\");\nvar computeFrustration_1 = require(\"./computeFrustration\");\nvar interactionSelectorCache_1 = require(\"./interactionSelectorCache\");\nexports.ACTION_CONTEXT_TIME_OUT_DELAY = 5 * browser_core_1.ONE_MINUTE; // arbitrary\nfunction trackClickActions(lifeCycle, domMutationObservable, windowOpenObservable, configuration) {\n var history = (0, browser_core_1.createValueHistory)({ expireDelay: exports.ACTION_CONTEXT_TIME_OUT_DELAY });\n var stopObservable = new browser_core_1.Observable();\n var currentClickChain;\n lifeCycle.subscribe(9 /* LifeCycleEventType.SESSION_RENEWED */, function () {\n history.reset();\n });\n lifeCycle.subscribe(4 /* LifeCycleEventType.VIEW_ENDED */, stopClickChain);\n var stopActionEventsListener = (0, listenActionEvents_1.listenActionEvents)(configuration, {\n onPointerDown: function (pointerDownEvent) {\n return processPointerDown(configuration, lifeCycle, domMutationObservable, pointerDownEvent, windowOpenObservable);\n },\n onPointerUp: function (_a, startEvent, getUserActivity) {\n var clickActionBase = _a.clickActionBase, hadActivityOnPointerDown = _a.hadActivityOnPointerDown;\n startClickAction(configuration, lifeCycle, domMutationObservable, windowOpenObservable, history, stopObservable, appendClickToClickChain, clickActionBase, startEvent, getUserActivity, hadActivityOnPointerDown);\n },\n }).stop;\n var actionContexts = {\n findActionId: function (startTime) { return history.findAll(startTime); },\n };\n return {\n stop: function () {\n stopClickChain();\n stopObservable.notify();\n stopActionEventsListener();\n },\n actionContexts: actionContexts,\n };\n function appendClickToClickChain(click) {\n if (!currentClickChain || !currentClickChain.tryAppend(click)) {\n var rageClick_1 = click.clone();\n currentClickChain = (0, clickChain_1.createClickChain)(click, function (clicks) {\n finalizeClicks(clicks, rageClick_1);\n });\n }\n }\n function stopClickChain() {\n if (currentClickChain) {\n currentClickChain.stop();\n }\n }\n}\nfunction processPointerDown(configuration, lifeCycle, domMutationObservable, pointerDownEvent, windowOpenObservable) {\n var nodePrivacyLevel = configuration.enablePrivacyForActionName\n ? (0, privacy_1.getNodePrivacyLevel)(pointerDownEvent.target, configuration.defaultPrivacyLevel)\n : privacy_1.NodePrivacyLevel.ALLOW;\n if (nodePrivacyLevel === privacy_1.NodePrivacyLevel.HIDDEN) {\n return undefined;\n }\n var clickActionBase = computeClickActionBase(pointerDownEvent, nodePrivacyLevel, configuration);\n var hadActivityOnPointerDown = false;\n (0, waitPageActivityEnd_1.waitPageActivityEnd)(lifeCycle, domMutationObservable, windowOpenObservable, configuration, function (pageActivityEndEvent) {\n hadActivityOnPointerDown = pageActivityEndEvent.hadActivity;\n }, \n // We don't care about the activity duration, we just want to know whether an activity did happen\n // within the \"validation delay\" or not. Limit the duration so the callback is called sooner.\n waitPageActivityEnd_1.PAGE_ACTIVITY_VALIDATION_DELAY);\n return { clickActionBase: clickActionBase, hadActivityOnPointerDown: function () { return hadActivityOnPointerDown; } };\n}\nfunction startClickAction(configuration, lifeCycle, domMutationObservable, windowOpenObservable, history, stopObservable, appendClickToClickChain, clickActionBase, startEvent, getUserActivity, hadActivityOnPointerDown) {\n var _a;\n var click = newClick(lifeCycle, history, getUserActivity, clickActionBase, startEvent);\n appendClickToClickChain(click);\n var selector = (_a = clickActionBase === null || clickActionBase === void 0 ? void 0 : clickActionBase.target) === null || _a === void 0 ? void 0 : _a.selector;\n if (selector) {\n (0, interactionSelectorCache_1.updateInteractionSelector)(startEvent.timeStamp, selector);\n }\n var stopWaitPageActivityEnd = (0, waitPageActivityEnd_1.waitPageActivityEnd)(lifeCycle, domMutationObservable, windowOpenObservable, configuration, function (pageActivityEndEvent) {\n if (pageActivityEndEvent.hadActivity && pageActivityEndEvent.end < click.startClocks.timeStamp) {\n // If the clock is looking weird, just discard the click\n click.discard();\n }\n else {\n if (pageActivityEndEvent.hadActivity) {\n click.stop(pageActivityEndEvent.end);\n }\n else if (hadActivityOnPointerDown()) {\n click.stop(\n // using the click start as activity end, so the click will have some activity but its\n // duration will be 0 (as the activity started before the click start)\n click.startClocks.timeStamp);\n }\n else {\n click.stop();\n }\n }\n }, interactionSelectorCache_1.CLICK_ACTION_MAX_DURATION).stop;\n var viewEndedSubscription = lifeCycle.subscribe(4 /* LifeCycleEventType.VIEW_ENDED */, function (_a) {\n var endClocks = _a.endClocks;\n click.stop(endClocks.timeStamp);\n });\n var stopSubscription = stopObservable.subscribe(function () {\n click.stop();\n });\n click.stopObservable.subscribe(function () {\n viewEndedSubscription.unsubscribe();\n stopWaitPageActivityEnd();\n stopSubscription.unsubscribe();\n });\n}\nfunction computeClickActionBase(event, nodePrivacyLevel, configuration) {\n var rect = event.target.getBoundingClientRect();\n var selector = (0, getSelectorFromElement_1.getSelectorFromElement)(event.target, configuration.actionNameAttribute);\n if (selector) {\n (0, interactionSelectorCache_1.updateInteractionSelector)(event.timeStamp, selector);\n }\n var actionName = (0, getActionNameFromElement_1.getActionNameFromElement)(event.target, configuration, nodePrivacyLevel);\n return {\n type: \"click\" /* ActionType.CLICK */,\n target: {\n width: Math.round(rect.width),\n height: Math.round(rect.height),\n selector: selector,\n },\n position: {\n // Use clientX and Y because for SVG element offsetX and Y are relatives to the element\n x: Math.round(event.clientX - rect.left),\n y: Math.round(event.clientY - rect.top),\n },\n name: actionName.name,\n nameSource: actionName.nameSource,\n };\n}\nfunction newClick(lifeCycle, history, getUserActivity, clickActionBase, startEvent) {\n var id = (0, browser_core_1.generateUUID)();\n var startClocks = (0, browser_core_1.clocksNow)();\n var historyEntry = history.add(id, startClocks.relative);\n var eventCountsSubscription = (0, trackEventCounts_1.trackEventCounts)({\n lifeCycle: lifeCycle,\n isChildEvent: function (event) {\n return event.action !== undefined &&\n (Array.isArray(event.action.id) ? (0, browser_core_1.includes)(event.action.id, id) : event.action.id === id);\n },\n });\n var status = 0 /* ClickStatus.ONGOING */;\n var activityEndTime;\n var frustrationTypes = [];\n var stopObservable = new browser_core_1.Observable();\n function stop(newActivityEndTime) {\n if (status !== 0 /* ClickStatus.ONGOING */) {\n return;\n }\n activityEndTime = newActivityEndTime;\n status = 1 /* ClickStatus.STOPPED */;\n if (activityEndTime) {\n historyEntry.close((0, browser_core_1.getRelativeTime)(activityEndTime));\n }\n else {\n historyEntry.remove();\n }\n eventCountsSubscription.stop();\n stopObservable.notify();\n }\n return {\n event: startEvent,\n stop: stop,\n stopObservable: stopObservable,\n get hasError() {\n return eventCountsSubscription.eventCounts.errorCount > 0;\n },\n get hasPageActivity() {\n return activityEndTime !== undefined;\n },\n getUserActivity: getUserActivity,\n addFrustration: function (frustrationType) {\n frustrationTypes.push(frustrationType);\n },\n startClocks: startClocks,\n isStopped: function () { return status === 1 /* ClickStatus.STOPPED */ || status === 2 /* ClickStatus.FINALIZED */; },\n clone: function () { return newClick(lifeCycle, history, getUserActivity, clickActionBase, startEvent); },\n validate: function (domEvents) {\n stop();\n if (status !== 1 /* ClickStatus.STOPPED */) {\n return;\n }\n var _a = eventCountsSubscription.eventCounts, resourceCount = _a.resourceCount, errorCount = _a.errorCount, longTaskCount = _a.longTaskCount;\n var clickAction = (0, browser_core_1.assign)({\n type: \"click\" /* ActionType.CLICK */,\n duration: activityEndTime && (0, browser_core_1.elapsed)(startClocks.timeStamp, activityEndTime),\n startClocks: startClocks,\n id: id,\n frustrationTypes: frustrationTypes,\n counts: {\n resourceCount: resourceCount,\n errorCount: errorCount,\n longTaskCount: longTaskCount,\n },\n events: domEvents !== null && domEvents !== void 0 ? domEvents : [startEvent],\n event: startEvent,\n }, clickActionBase);\n lifeCycle.notify(0 /* LifeCycleEventType.AUTO_ACTION_COMPLETED */, clickAction);\n status = 2 /* ClickStatus.FINALIZED */;\n },\n discard: function () {\n stop();\n status = 2 /* ClickStatus.FINALIZED */;\n },\n };\n}\nfunction finalizeClicks(clicks, rageClick) {\n var isRage = (0, computeFrustration_1.computeFrustration)(clicks, rageClick).isRage;\n if (isRage) {\n clicks.forEach(function (click) { return click.discard(); });\n rageClick.stop((0, browser_core_1.timeStampNow)());\n rageClick.validate(clicks.map(function (click) { return click.event; }));\n }\n else {\n rageClick.discard();\n clicks.forEach(function (click) { return click.validate(); });\n }\n}\n//# sourceMappingURL=trackClickActions.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startRumAssembly = startRumAssembly;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar syntheticsContext_1 = require(\"./contexts/syntheticsContext\");\nvar limitModification_1 = require(\"./limitModification\");\nvar VIEW_MODIFIABLE_FIELD_PATHS = {\n 'view.name': 'string',\n 'view.url': 'string',\n 'view.referrer': 'string',\n};\nvar USER_CUSTOMIZABLE_FIELD_PATHS = {\n context: 'object',\n};\nvar ROOT_MODIFIABLE_FIELD_PATHS = {\n service: 'string',\n version: 'string',\n};\nvar modifiableFieldPathsByEvent;\nfunction startRumAssembly(configuration, lifeCycle, sessionManager, viewHistory, urlContexts, actionContexts, displayContext, ciVisibilityContext, getCommonContext, reportError) {\n var _a, _b;\n modifiableFieldPathsByEvent = (_a = {},\n _a[\"view\" /* RumEventType.VIEW */] = (0, browser_core_1.assign)({}, USER_CUSTOMIZABLE_FIELD_PATHS, VIEW_MODIFIABLE_FIELD_PATHS),\n _a[\"error\" /* RumEventType.ERROR */] = (0, browser_core_1.assign)({\n 'error.message': 'string',\n 'error.stack': 'string',\n 'error.resource.url': 'string',\n 'error.fingerprint': 'string',\n }, USER_CUSTOMIZABLE_FIELD_PATHS, VIEW_MODIFIABLE_FIELD_PATHS, ROOT_MODIFIABLE_FIELD_PATHS),\n _a[\"resource\" /* RumEventType.RESOURCE */] = (0, browser_core_1.assign)({\n 'resource.url': 'string',\n }, (0, browser_core_1.isExperimentalFeatureEnabled)(browser_core_1.ExperimentalFeature.WRITABLE_RESOURCE_GRAPHQL)\n ? {\n 'resource.graphql': 'object',\n }\n : {}, USER_CUSTOMIZABLE_FIELD_PATHS, VIEW_MODIFIABLE_FIELD_PATHS, ROOT_MODIFIABLE_FIELD_PATHS),\n _a[\"action\" /* RumEventType.ACTION */] = (0, browser_core_1.assign)({\n 'action.target.name': 'string',\n }, USER_CUSTOMIZABLE_FIELD_PATHS, VIEW_MODIFIABLE_FIELD_PATHS, ROOT_MODIFIABLE_FIELD_PATHS),\n _a[\"long_task\" /* RumEventType.LONG_TASK */] = (0, browser_core_1.assign)({}, USER_CUSTOMIZABLE_FIELD_PATHS, VIEW_MODIFIABLE_FIELD_PATHS),\n _a[\"vital\" /* RumEventType.VITAL */] = (0, browser_core_1.assign)({}, USER_CUSTOMIZABLE_FIELD_PATHS, VIEW_MODIFIABLE_FIELD_PATHS),\n _a);\n var eventRateLimiters = (_b = {},\n _b[\"error\" /* RumEventType.ERROR */] = (0, browser_core_1.createEventRateLimiter)(\"error\" /* RumEventType.ERROR */, configuration.eventRateLimiterThreshold, reportError),\n _b[\"action\" /* RumEventType.ACTION */] = (0, browser_core_1.createEventRateLimiter)(\"action\" /* RumEventType.ACTION */, configuration.eventRateLimiterThreshold, reportError),\n _b[\"vital\" /* RumEventType.VITAL */] = (0, browser_core_1.createEventRateLimiter)(\"vital\" /* RumEventType.VITAL */, configuration.eventRateLimiterThreshold, reportError),\n _b);\n var syntheticsContext = (0, syntheticsContext_1.getSyntheticsContext)();\n lifeCycle.subscribe(11 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, function (_a) {\n var startTime = _a.startTime, rawRumEvent = _a.rawRumEvent, domainContext = _a.domainContext, savedCommonContext = _a.savedCommonContext, customerContext = _a.customerContext;\n var viewHistoryEntry = viewHistory.findView(startTime);\n var urlContext = urlContexts.findUrl(startTime);\n var session = sessionManager.findTrackedSession(startTime);\n if (session && viewHistoryEntry && urlContext) {\n var commonContext = savedCommonContext || getCommonContext();\n var actionId = actionContexts.findActionId(startTime);\n var rumContext = {\n _dd: {\n format_version: 2,\n drift: (0, browser_core_1.currentDrift)(),\n configuration: {\n session_sample_rate: (0, browser_core_1.round)(configuration.sessionSampleRate, 3),\n session_replay_sample_rate: (0, browser_core_1.round)(configuration.sessionReplaySampleRate, 3),\n },\n browser_sdk_version: (0, browser_core_1.canUseEventBridge)() ? \"5.35.0\" : undefined,\n },\n application: {\n id: configuration.applicationId,\n },\n date: (0, browser_core_1.timeStampNow)(),\n service: viewHistoryEntry.service || configuration.service,\n version: viewHistoryEntry.version || configuration.version,\n source: 'browser',\n session: {\n id: session.id,\n type: syntheticsContext\n ? \"synthetics\" /* SessionType.SYNTHETICS */\n : ciVisibilityContext.get()\n ? \"ci_test\" /* SessionType.CI_TEST */\n : \"user\" /* SessionType.USER */,\n },\n view: {\n id: viewHistoryEntry.id,\n name: viewHistoryEntry.name,\n url: urlContext.url,\n referrer: urlContext.referrer,\n },\n action: needToAssembleWithAction(rawRumEvent) && actionId ? { id: actionId } : undefined,\n synthetics: syntheticsContext,\n ci_test: ciVisibilityContext.get(),\n display: displayContext.get(),\n connectivity: (0, browser_core_1.getConnectivity)(),\n };\n var serverRumEvent = (0, browser_core_1.combine)(rumContext, rawRumEvent);\n serverRumEvent.context = (0, browser_core_1.combine)(commonContext.context, viewHistoryEntry.context, customerContext);\n if (!('has_replay' in serverRumEvent.session)) {\n ;\n serverRumEvent.session.has_replay = commonContext.hasReplay;\n }\n if (serverRumEvent.type === 'view') {\n ;\n serverRumEvent.session.sampled_for_replay =\n session.sessionReplay === 1 /* SessionReplayState.SAMPLED */;\n }\n if (\n // TODO: remove ff and should always add anonymous user id\n (0, browser_core_1.isExperimentalFeatureEnabled)(browser_core_1.ExperimentalFeature.ANONYMOUS_USER_TRACKING) &&\n !commonContext.user.anonymous_id) {\n commonContext.user.anonymous_id = session.anonymousId;\n }\n if (!(0, browser_core_1.isEmptyObject)(commonContext.user)) {\n ;\n serverRumEvent.usr = commonContext.user;\n }\n if (shouldSend(serverRumEvent, configuration.beforeSend, domainContext, eventRateLimiters)) {\n if ((0, browser_core_1.isEmptyObject)(serverRumEvent.context)) {\n delete serverRumEvent.context;\n }\n lifeCycle.notify(12 /* LifeCycleEventType.RUM_EVENT_COLLECTED */, serverRumEvent);\n }\n }\n });\n}\nfunction shouldSend(event, beforeSend, domainContext, eventRateLimiters) {\n var _a;\n if (beforeSend) {\n var result = (0, limitModification_1.limitModification)(event, modifiableFieldPathsByEvent[event.type], function (event) {\n return beforeSend(event, domainContext);\n });\n if (result === false && event.type !== \"view\" /* RumEventType.VIEW */) {\n return false;\n }\n if (result === false) {\n browser_core_1.display.warn(\"Can't dismiss view events using beforeSend!\");\n }\n }\n var rateLimitReached = (_a = eventRateLimiters[event.type]) === null || _a === void 0 ? void 0 : _a.isLimitReached();\n return !rateLimitReached;\n}\nfunction needToAssembleWithAction(event) {\n return [\"error\" /* RumEventType.ERROR */, \"resource\" /* RumEventType.RESOURCE */, \"long_task\" /* RumEventType.LONG_TASK */].indexOf(event.type) !== -1;\n}\n//# sourceMappingURL=assembly.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DEFAULT_PROPAGATOR_TYPES = void 0;\nexports.validateAndBuildRumConfiguration = validateAndBuildRumConfiguration;\nexports.serializeRumConfiguration = serializeRumConfiguration;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar tracer_1 = require(\"../tracing/tracer\");\nexports.DEFAULT_PROPAGATOR_TYPES = ['tracecontext', 'datadog'];\nfunction validateAndBuildRumConfiguration(initConfiguration) {\n var _a, _b, _c;\n if (!initConfiguration.applicationId) {\n browser_core_1.display.error('Application ID is not configured, no RUM data will be collected.');\n return;\n }\n if (!(0, browser_core_1.isSampleRate)(initConfiguration.sessionReplaySampleRate, 'Session Replay') ||\n !(0, browser_core_1.isSampleRate)(initConfiguration.traceSampleRate, 'Trace')) {\n return;\n }\n if (initConfiguration.excludedActivityUrls !== undefined && !Array.isArray(initConfiguration.excludedActivityUrls)) {\n browser_core_1.display.error('Excluded Activity Urls should be an array');\n return;\n }\n var allowedTracingUrls = validateAndBuildTracingOptions(initConfiguration);\n if (!allowedTracingUrls) {\n return;\n }\n var baseConfiguration = (0, browser_core_1.validateAndBuildConfiguration)(initConfiguration);\n if (!baseConfiguration) {\n return;\n }\n var sessionReplaySampleRate = (_a = initConfiguration.sessionReplaySampleRate) !== null && _a !== void 0 ? _a : 0;\n return (0, browser_core_1.assign)({\n applicationId: initConfiguration.applicationId,\n version: initConfiguration.version || undefined,\n actionNameAttribute: initConfiguration.actionNameAttribute,\n sessionReplaySampleRate: sessionReplaySampleRate,\n startSessionReplayRecordingManually: initConfiguration.startSessionReplayRecordingManually !== undefined\n ? !!initConfiguration.startSessionReplayRecordingManually\n : sessionReplaySampleRate === 0,\n traceSampleRate: (_b = initConfiguration.traceSampleRate) !== null && _b !== void 0 ? _b : 100,\n rulePsr: (0, browser_core_1.isNumber)(initConfiguration.traceSampleRate) ? initConfiguration.traceSampleRate / 100 : undefined,\n allowedTracingUrls: allowedTracingUrls,\n excludedActivityUrls: (_c = initConfiguration.excludedActivityUrls) !== null && _c !== void 0 ? _c : [],\n workerUrl: initConfiguration.workerUrl,\n compressIntakeRequests: !!initConfiguration.compressIntakeRequests,\n trackUserInteractions: !!initConfiguration.trackUserInteractions,\n trackViewsManually: !!initConfiguration.trackViewsManually,\n trackResources: !!initConfiguration.trackResources,\n trackLongTasks: !!initConfiguration.trackLongTasks,\n subdomain: initConfiguration.subdomain,\n defaultPrivacyLevel: (0, browser_core_1.objectHasValue)(browser_core_1.DefaultPrivacyLevel, initConfiguration.defaultPrivacyLevel)\n ? initConfiguration.defaultPrivacyLevel\n : browser_core_1.DefaultPrivacyLevel.MASK,\n enablePrivacyForActionName: !!initConfiguration.enablePrivacyForActionName,\n customerDataTelemetrySampleRate: 1,\n traceContextInjection: (0, browser_core_1.objectHasValue)(browser_core_1.TraceContextInjection, initConfiguration.traceContextInjection)\n ? initConfiguration.traceContextInjection\n : browser_core_1.TraceContextInjection.ALL,\n plugins: initConfiguration.plugins || [],\n }, baseConfiguration);\n}\n/**\n * Validates allowedTracingUrls and converts match options to tracing options\n */\nfunction validateAndBuildTracingOptions(initConfiguration) {\n if (initConfiguration.allowedTracingUrls === undefined) {\n return [];\n }\n if (!Array.isArray(initConfiguration.allowedTracingUrls)) {\n browser_core_1.display.error('Allowed Tracing URLs should be an array');\n return;\n }\n if (initConfiguration.allowedTracingUrls.length !== 0 && initConfiguration.service === undefined) {\n browser_core_1.display.error('Service needs to be configured when tracing is enabled');\n return;\n }\n // Convert from (MatchOption | TracingOption) to TracingOption, remove unknown properties\n var tracingOptions = [];\n initConfiguration.allowedTracingUrls.forEach(function (option) {\n if ((0, browser_core_1.isMatchOption)(option)) {\n tracingOptions.push({ match: option, propagatorTypes: exports.DEFAULT_PROPAGATOR_TYPES });\n }\n else if ((0, tracer_1.isTracingOption)(option)) {\n tracingOptions.push(option);\n }\n else {\n browser_core_1.display.warn('Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter', option);\n }\n });\n return tracingOptions;\n}\n/**\n * Combines the selected tracing propagators from the different options in allowedTracingUrls\n */\nfunction getSelectedTracingPropagators(configuration) {\n var usedTracingPropagators = new Set();\n if (Array.isArray(configuration.allowedTracingUrls) && configuration.allowedTracingUrls.length > 0) {\n configuration.allowedTracingUrls.forEach(function (option) {\n if ((0, browser_core_1.isMatchOption)(option)) {\n exports.DEFAULT_PROPAGATOR_TYPES.forEach(function (propagatorType) { return usedTracingPropagators.add(propagatorType); });\n }\n else if ((0, browser_core_1.getType)(option) === 'object' && Array.isArray(option.propagatorTypes)) {\n // Ensure we have an array, as we cannot rely on types yet (configuration is provided by users)\n option.propagatorTypes.forEach(function (propagatorType) { return usedTracingPropagators.add(propagatorType); });\n }\n });\n }\n return (0, browser_core_1.arrayFrom)(usedTracingPropagators);\n}\nfunction serializeRumConfiguration(configuration) {\n var _a;\n var baseSerializedConfiguration = (0, browser_core_1.serializeConfiguration)(configuration);\n return (0, browser_core_1.assign)({\n session_replay_sample_rate: configuration.sessionReplaySampleRate,\n start_session_replay_recording_manually: configuration.startSessionReplayRecordingManually,\n trace_sample_rate: configuration.traceSampleRate,\n trace_context_injection: configuration.traceContextInjection,\n action_name_attribute: configuration.actionNameAttribute,\n use_allowed_tracing_urls: Array.isArray(configuration.allowedTracingUrls) && configuration.allowedTracingUrls.length > 0,\n selected_tracing_propagators: getSelectedTracingPropagators(configuration),\n default_privacy_level: configuration.defaultPrivacyLevel,\n enable_privacy_for_action_name: configuration.enablePrivacyForActionName,\n use_excluded_activity_urls: Array.isArray(configuration.excludedActivityUrls) && configuration.excludedActivityUrls.length > 0,\n use_worker_url: !!configuration.workerUrl,\n compress_intake_requests: configuration.compressIntakeRequests,\n track_views_manually: configuration.trackViewsManually,\n track_user_interactions: configuration.trackUserInteractions,\n track_resources: configuration.trackResources,\n track_long_task: configuration.trackLongTasks,\n plugins: (_a = configuration.plugins) === null || _a === void 0 ? void 0 : _a.map(function (plugin) { var _a; return (0, browser_core_1.assign)({ name: plugin.name }, (_a = plugin.getConfigurationTelemetry) === null || _a === void 0 ? void 0 : _a.call(plugin)); }),\n }, baseSerializedConfiguration);\n}\n//# sourceMappingURL=configuration.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./configuration\"), exports);\n__exportStar(require(\"./remoteConfiguration\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.REMOTE_CONFIGURATION_URL = void 0;\nexports.fetchAndApplyRemoteConfiguration = fetchAndApplyRemoteConfiguration;\nexports.applyRemoteConfiguration = applyRemoteConfiguration;\nexports.fetchRemoteConfiguration = fetchRemoteConfiguration;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nexports.REMOTE_CONFIGURATION_URL = 'https://d3uc069fcn7uxw.cloudfront.net/configuration';\nfunction fetchAndApplyRemoteConfiguration(initConfiguration, callback) {\n fetchRemoteConfiguration(initConfiguration, function (remoteInitConfiguration) {\n callback(applyRemoteConfiguration(initConfiguration, remoteInitConfiguration));\n });\n}\nfunction applyRemoteConfiguration(initConfiguration, remoteInitConfiguration) {\n return (0, browser_core_1.assign)({}, initConfiguration, remoteInitConfiguration);\n}\nfunction fetchRemoteConfiguration(configuration, callback) {\n var xhr = new XMLHttpRequest();\n (0, browser_core_1.addEventListener)(configuration, xhr, 'load', function () {\n if (xhr.status === 200) {\n callback(JSON.parse(xhr.responseText));\n }\n else {\n displayRemoteConfigurationFetchingError();\n }\n });\n (0, browser_core_1.addEventListener)(configuration, xhr, 'error', function () {\n displayRemoteConfigurationFetchingError();\n });\n xhr.open('GET', \"\".concat(exports.REMOTE_CONFIGURATION_URL, \"/\").concat(encodeURIComponent(configuration.remoteConfigurationId), \".json\"));\n xhr.send();\n}\nfunction displayRemoteConfigurationFetchingError() {\n browser_core_1.display.error('Error fetching the remote configuration.');\n}\n//# sourceMappingURL=remoteConfiguration.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CI_VISIBILITY_TEST_ID_COOKIE_NAME = void 0;\nexports.startCiVisibilityContext = startCiVisibilityContext;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar cookieObservable_1 = require(\"../../browser/cookieObservable\");\nexports.CI_VISIBILITY_TEST_ID_COOKIE_NAME = 'datadog-ci-visibility-test-execution-id';\nfunction startCiVisibilityContext(configuration, cookieObservable) {\n var _a;\n if (cookieObservable === void 0) { cookieObservable = (0, cookieObservable_1.createCookieObservable)(configuration, exports.CI_VISIBILITY_TEST_ID_COOKIE_NAME); }\n var testExecutionId = (0, browser_core_1.getInitCookie)(exports.CI_VISIBILITY_TEST_ID_COOKIE_NAME) || ((_a = window.Cypress) === null || _a === void 0 ? void 0 : _a.env('traceId'));\n var cookieObservableSubscription = cookieObservable.subscribe(function (value) {\n testExecutionId = value;\n });\n return {\n get: function () {\n if (typeof testExecutionId === 'string') {\n return {\n test_execution_id: testExecutionId,\n };\n }\n },\n stop: function () { return cookieObservableSubscription.unsubscribe(); },\n };\n}\n//# sourceMappingURL=ciVisibilityContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.buildCommonContext = buildCommonContext;\nfunction buildCommonContext(globalContextManager, userContextManager, recorderApi) {\n return {\n context: globalContextManager.getContext(),\n user: userContextManager.getContext(),\n hasReplay: recorderApi.isRecording() ? true : undefined,\n };\n}\n//# sourceMappingURL=commonContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startDisplayContext = startDisplayContext;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar viewportObservable_1 = require(\"../../browser/viewportObservable\");\nfunction startDisplayContext(configuration) {\n var viewport;\n var animationFrameId;\n if ((0, browser_core_1.isExperimentalFeatureEnabled)(browser_core_1.ExperimentalFeature.DELAY_VIEWPORT_COLLECTION)) {\n // Use requestAnimationFrame to delay the calculation of viewport dimensions until after SDK initialization, preventing long tasks.\n animationFrameId = requestAnimationFrame(function () {\n viewport = (0, viewportObservable_1.getViewportDimension)();\n });\n }\n else {\n viewport = (0, viewportObservable_1.getViewportDimension)();\n }\n var unsubscribeViewport = (0, viewportObservable_1.initViewportObservable)(configuration).subscribe(function (viewportDimension) {\n viewport = viewportDimension;\n }).unsubscribe;\n return {\n get: function () { return (viewport ? { viewport: viewport } : undefined); },\n stop: function () {\n unsubscribeViewport();\n if (animationFrameId) {\n cancelAnimationFrame(animationFrameId);\n }\n },\n };\n}\n//# sourceMappingURL=displayContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BYTES_COMPUTATION_THROTTLING_DELAY = exports.FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY = void 0;\nexports.startFeatureFlagContexts = startFeatureFlagContexts;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nexports.FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY = browser_core_1.SESSION_TIME_OUT_DELAY;\nexports.BYTES_COMPUTATION_THROTTLING_DELAY = 200;\n/**\n * Start feature flag contexts\n *\n * Feature flag contexts follow the life of views.\n * A new context is added when a view is created and ended when the view is ended\n *\n * Note: we choose not to add a new context at each evaluation to save memory\n */\nfunction startFeatureFlagContexts(lifeCycle, customerDataTracker) {\n var featureFlagContexts = (0, browser_core_1.createValueHistory)({\n expireDelay: exports.FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY,\n });\n lifeCycle.subscribe(1 /* LifeCycleEventType.BEFORE_VIEW_CREATED */, function (_a) {\n var startClocks = _a.startClocks;\n featureFlagContexts.add({}, startClocks.relative);\n customerDataTracker.resetCustomerData();\n });\n lifeCycle.subscribe(5 /* LifeCycleEventType.AFTER_VIEW_ENDED */, function (_a) {\n var endClocks = _a.endClocks;\n featureFlagContexts.closeActive(endClocks.relative);\n });\n return {\n findFeatureFlagEvaluations: function (startTime) { return featureFlagContexts.find(startTime); },\n addFeatureFlagEvaluation: function (key, value) {\n var currentContext = featureFlagContexts.find();\n if (currentContext) {\n currentContext[key] = value;\n customerDataTracker.updateCustomerData(currentContext);\n }\n },\n stop: function () { return customerDataTracker.stop(); },\n };\n}\n//# sourceMappingURL=featureFlagContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startInternalContext = startInternalContext;\n/**\n * Internal context keep returning v1 format\n * to not break compatibility with logs data format\n */\nfunction startInternalContext(applicationId, sessionManager, viewHistory, actionContexts, urlContexts) {\n return {\n get: function (startTime) {\n var viewContext = viewHistory.findView(startTime);\n var urlContext = urlContexts.findUrl(startTime);\n var session = sessionManager.findTrackedSession(startTime);\n if (session && viewContext && urlContext) {\n var actionId = actionContexts.findActionId(startTime);\n return {\n application_id: applicationId,\n session_id: session.id,\n user_action: actionId ? { id: actionId } : undefined,\n view: { id: viewContext.id, name: viewContext.name, referrer: urlContext.referrer, url: urlContext.url },\n };\n }\n },\n };\n}\n//# sourceMappingURL=internalContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PAGE_STATE_CONTEXT_TIME_OUT_DELAY = exports.MAX_PAGE_STATE_ENTRIES_SELECTABLE = exports.MAX_PAGE_STATE_ENTRIES = void 0;\nexports.startPageStateHistory = startPageStateHistory;\nvar browser_core_1 = require(\"@datadog/browser-core\");\n// Arbitrary value to cap number of element for memory consumption in the browser\nexports.MAX_PAGE_STATE_ENTRIES = 4000;\n// Arbitrary value to cap number of element for backend & to save bandwidth\nexports.MAX_PAGE_STATE_ENTRIES_SELECTABLE = 500;\nexports.PAGE_STATE_CONTEXT_TIME_OUT_DELAY = browser_core_1.SESSION_TIME_OUT_DELAY;\nfunction startPageStateHistory(configuration, maxPageStateEntriesSelectable) {\n if (maxPageStateEntriesSelectable === void 0) { maxPageStateEntriesSelectable = exports.MAX_PAGE_STATE_ENTRIES_SELECTABLE; }\n var pageStateEntryHistory = (0, browser_core_1.createValueHistory)({\n expireDelay: exports.PAGE_STATE_CONTEXT_TIME_OUT_DELAY,\n maxEntries: exports.MAX_PAGE_STATE_ENTRIES,\n });\n var currentPageState;\n addPageState(getPageState(), (0, browser_core_1.relativeNow)());\n var stopEventListeners = (0, browser_core_1.addEventListeners)(configuration, window, [\n \"pageshow\" /* DOM_EVENT.PAGE_SHOW */,\n \"focus\" /* DOM_EVENT.FOCUS */,\n \"blur\" /* DOM_EVENT.BLUR */,\n \"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */,\n \"resume\" /* DOM_EVENT.RESUME */,\n \"freeze\" /* DOM_EVENT.FREEZE */,\n \"pagehide\" /* DOM_EVENT.PAGE_HIDE */,\n ], function (event) {\n addPageState(computePageState(event), event.timeStamp);\n }, { capture: true }).stop;\n function addPageState(nextPageState, startTime) {\n if (startTime === void 0) { startTime = (0, browser_core_1.relativeNow)(); }\n if (nextPageState === currentPageState) {\n return;\n }\n currentPageState = nextPageState;\n pageStateEntryHistory.closeActive(startTime);\n pageStateEntryHistory.add({ state: currentPageState, startTime: startTime }, startTime);\n }\n var pageStateHistory = {\n findAll: function (eventStartTime, duration) {\n var pageStateEntries = pageStateEntryHistory.findAll(eventStartTime, duration);\n if (pageStateEntries.length === 0) {\n return;\n }\n var pageStateServerEntries = [];\n // limit the number of entries to return\n var limit = Math.max(0, pageStateEntries.length - maxPageStateEntriesSelectable);\n // loop page state entries backward to return the selected ones in desc order\n for (var index = pageStateEntries.length - 1; index >= limit; index--) {\n var pageState = pageStateEntries[index];\n // compute the start time relative to the event start time (ex: to be relative to the view start time)\n var relativeStartTime = (0, browser_core_1.elapsed)(eventStartTime, pageState.startTime);\n pageStateServerEntries.push({\n state: pageState.state,\n start: (0, browser_core_1.toServerDuration)(relativeStartTime),\n });\n }\n return pageStateServerEntries;\n },\n wasInPageStateAt: function (state, startTime) {\n return pageStateHistory.wasInPageStateDuringPeriod(state, startTime, 0);\n },\n wasInPageStateDuringPeriod: function (state, startTime, duration) {\n return pageStateEntryHistory.findAll(startTime, duration).some(function (pageState) { return pageState.state === state; });\n },\n addPageState: addPageState,\n stop: function () {\n stopEventListeners();\n pageStateEntryHistory.stop();\n },\n };\n return pageStateHistory;\n}\nfunction computePageState(event) {\n if (event.type === \"freeze\" /* DOM_EVENT.FREEZE */) {\n return \"frozen\" /* PageState.FROZEN */;\n }\n else if (event.type === \"pagehide\" /* DOM_EVENT.PAGE_HIDE */) {\n return event.persisted ? \"frozen\" /* PageState.FROZEN */ : \"terminated\" /* PageState.TERMINATED */;\n }\n return getPageState();\n}\nfunction getPageState() {\n if (document.visibilityState === 'hidden') {\n return \"hidden\" /* PageState.HIDDEN */;\n }\n if (document.hasFocus()) {\n return \"active\" /* PageState.ACTIVE */;\n }\n return \"passive\" /* PageState.PASSIVE */;\n}\n//# sourceMappingURL=pageStateHistory.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSyntheticsContext = getSyntheticsContext;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nfunction getSyntheticsContext() {\n var testId = (0, browser_core_1.getSyntheticsTestId)();\n var resultId = (0, browser_core_1.getSyntheticsResultId)();\n if (testId && resultId) {\n return {\n test_id: testId,\n result_id: resultId,\n injected: (0, browser_core_1.willSyntheticsInjectRum)(),\n };\n }\n}\n//# sourceMappingURL=syntheticsContext.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.URL_CONTEXT_TIME_OUT_DELAY = void 0;\nexports.startUrlContexts = startUrlContexts;\nvar browser_core_1 = require(\"@datadog/browser-core\");\n/**\n * We want to attach to an event:\n * - the url corresponding to its start\n * - the referrer corresponding to the previous view url (or document referrer for initial view)\n */\nexports.URL_CONTEXT_TIME_OUT_DELAY = browser_core_1.SESSION_TIME_OUT_DELAY;\nfunction startUrlContexts(lifeCycle, locationChangeObservable, location) {\n var urlContextHistory = (0, browser_core_1.createValueHistory)({ expireDelay: exports.URL_CONTEXT_TIME_OUT_DELAY });\n var previousViewUrl;\n lifeCycle.subscribe(1 /* LifeCycleEventType.BEFORE_VIEW_CREATED */, function (_a) {\n var startClocks = _a.startClocks;\n var viewUrl = location.href;\n urlContextHistory.add(buildUrlContext({\n url: viewUrl,\n referrer: !previousViewUrl ? document.referrer : previousViewUrl,\n }), startClocks.relative);\n previousViewUrl = viewUrl;\n });\n lifeCycle.subscribe(5 /* LifeCycleEventType.AFTER_VIEW_ENDED */, function (_a) {\n var endClocks = _a.endClocks;\n urlContextHistory.closeActive(endClocks.relative);\n });\n var locationChangeSubscription = locationChangeObservable.subscribe(function (_a) {\n var newLocation = _a.newLocation;\n var current = urlContextHistory.find();\n if (current) {\n var changeTime = (0, browser_core_1.relativeNow)();\n urlContextHistory.closeActive(changeTime);\n urlContextHistory.add(buildUrlContext({\n url: newLocation.href,\n referrer: current.referrer,\n }), changeTime);\n }\n });\n function buildUrlContext(_a) {\n var url = _a.url, referrer = _a.referrer;\n return {\n url: url,\n referrer: referrer,\n };\n }\n return {\n findUrl: function (startTime) { return urlContextHistory.find(startTime); },\n stop: function () {\n locationChangeSubscription.unsubscribe();\n urlContextHistory.stop();\n },\n };\n}\n//# sourceMappingURL=urlContexts.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.VIEW_CONTEXT_TIME_OUT_DELAY = void 0;\nexports.startViewHistory = startViewHistory;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nexports.VIEW_CONTEXT_TIME_OUT_DELAY = browser_core_1.SESSION_TIME_OUT_DELAY;\nfunction startViewHistory(lifeCycle) {\n var viewValueHistory = (0, browser_core_1.createValueHistory)({ expireDelay: exports.VIEW_CONTEXT_TIME_OUT_DELAY });\n lifeCycle.subscribe(1 /* LifeCycleEventType.BEFORE_VIEW_CREATED */, function (view) {\n viewValueHistory.add(buildViewHistoryEntry(view), view.startClocks.relative);\n });\n lifeCycle.subscribe(5 /* LifeCycleEventType.AFTER_VIEW_ENDED */, function (_a) {\n var endClocks = _a.endClocks;\n viewValueHistory.closeActive(endClocks.relative);\n });\n lifeCycle.subscribe(3 /* LifeCycleEventType.VIEW_UPDATED */, function (viewUpdate) {\n var currentView = viewValueHistory.find(viewUpdate.startClocks.relative);\n if (currentView && viewUpdate.name) {\n currentView.name = viewUpdate.name;\n }\n if (currentView && viewUpdate.context) {\n currentView.context = viewUpdate.context;\n }\n });\n lifeCycle.subscribe(9 /* LifeCycleEventType.SESSION_RENEWED */, function () {\n viewValueHistory.reset();\n });\n function buildViewHistoryEntry(view) {\n return {\n service: view.service,\n version: view.version,\n context: view.context,\n id: view.id,\n name: view.name,\n startClocks: view.startClocks,\n };\n }\n return {\n findView: function (startTime) { return viewValueHistory.find(startTime); },\n stop: function () {\n viewValueHistory.stop();\n },\n };\n}\n//# sourceMappingURL=viewHistory.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.discardNegativeDuration = discardNegativeDuration;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nfunction discardNegativeDuration(duration) {\n return (0, browser_core_1.isNumber)(duration) && duration < 0 ? undefined : duration;\n}\n//# sourceMappingURL=discardNegativeDuration.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startErrorCollection = startErrorCollection;\nexports.doStartErrorCollection = doStartErrorCollection;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar trackConsoleError_1 = require(\"./trackConsoleError\");\nvar trackReportError_1 = require(\"./trackReportError\");\nfunction startErrorCollection(lifeCycle, configuration, pageStateHistory, featureFlagContexts) {\n var errorObservable = new browser_core_1.Observable();\n (0, trackConsoleError_1.trackConsoleError)(errorObservable);\n (0, browser_core_1.trackRuntimeError)(errorObservable);\n (0, trackReportError_1.trackReportError)(configuration, errorObservable);\n errorObservable.subscribe(function (error) { return lifeCycle.notify(13 /* LifeCycleEventType.RAW_ERROR_COLLECTED */, { error: error }); });\n return doStartErrorCollection(lifeCycle, pageStateHistory, featureFlagContexts);\n}\nfunction doStartErrorCollection(lifeCycle, pageStateHistory, featureFlagContexts) {\n lifeCycle.subscribe(13 /* LifeCycleEventType.RAW_ERROR_COLLECTED */, function (_a) {\n var error = _a.error, customerContext = _a.customerContext, savedCommonContext = _a.savedCommonContext;\n lifeCycle.notify(11 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, (0, browser_core_1.assign)({\n customerContext: customerContext,\n savedCommonContext: savedCommonContext,\n }, processError(error, pageStateHistory, featureFlagContexts)));\n });\n return {\n addError: function (_a, savedCommonContext) {\n var error = _a.error, handlingStack = _a.handlingStack, startClocks = _a.startClocks, customerContext = _a.context;\n var stackTrace = (0, browser_core_1.isError)(error) ? (0, browser_core_1.computeStackTrace)(error) : undefined;\n var rawError = (0, browser_core_1.computeRawError)({\n stackTrace: stackTrace,\n originalError: error,\n handlingStack: handlingStack,\n startClocks: startClocks,\n nonErrorPrefix: \"Provided\" /* NonErrorPrefix.PROVIDED */,\n source: browser_core_1.ErrorSource.CUSTOM,\n handling: \"handled\" /* ErrorHandling.HANDLED */,\n });\n lifeCycle.notify(13 /* LifeCycleEventType.RAW_ERROR_COLLECTED */, {\n customerContext: customerContext,\n savedCommonContext: savedCommonContext,\n error: rawError,\n });\n },\n };\n}\nfunction processError(error, pageStateHistory, featureFlagContexts) {\n var rawRumEvent = {\n date: error.startClocks.timeStamp,\n error: {\n id: (0, browser_core_1.generateUUID)(),\n message: error.message,\n source: error.source,\n stack: error.stack,\n handling_stack: error.handlingStack,\n type: error.type,\n handling: error.handling,\n causes: error.causes,\n source_type: 'browser',\n fingerprint: error.fingerprint,\n csp: error.csp,\n },\n type: \"error\" /* RumEventType.ERROR */,\n view: { in_foreground: pageStateHistory.wasInPageStateAt(\"active\" /* PageState.ACTIVE */, error.startClocks.relative) },\n };\n var featureFlagContext = featureFlagContexts.findFeatureFlagEvaluations(error.startClocks.relative);\n if (featureFlagContext && !(0, browser_core_1.isEmptyObject)(featureFlagContext)) {\n rawRumEvent.feature_flags = featureFlagContext;\n }\n var domainContext = {\n error: error.originalError,\n handlingStack: error.handlingStack,\n };\n return {\n rawRumEvent: rawRumEvent,\n startTime: error.startClocks.relative,\n domainContext: domainContext,\n };\n}\n//# sourceMappingURL=errorCollection.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.trackConsoleError = trackConsoleError;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nfunction trackConsoleError(errorObservable) {\n var subscription = (0, browser_core_1.initConsoleObservable)([browser_core_1.ConsoleApiName.error]).subscribe(function (consoleLog) {\n return errorObservable.notify(consoleLog.error);\n });\n return {\n stop: function () {\n subscription.unsubscribe();\n },\n };\n}\n//# sourceMappingURL=trackConsoleError.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.trackReportError = trackReportError;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nfunction trackReportError(configuration, errorObservable) {\n var subscription = (0, browser_core_1.initReportObservable)(configuration, [\n browser_core_1.RawReportType.cspViolation,\n browser_core_1.RawReportType.intervention,\n ]).subscribe(function (rawError) { return errorObservable.notify(rawError); });\n return {\n stop: function () {\n subscription.unsubscribe();\n },\n };\n}\n//# sourceMappingURL=trackReportError.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.STABLE_ATTRIBUTES = void 0;\nexports.getSelectorFromElement = getSelectorFromElement;\nexports.isSelectorUniqueAmongSiblings = isSelectorUniqueAmongSiblings;\nexports.supportScopeSelector = supportScopeSelector;\nvar polyfills_1 = require(\"../browser/polyfills\");\nvar getActionNameFromElement_1 = require(\"./action/getActionNameFromElement\");\n/**\n * Stable attributes are attributes that are commonly used to identify parts of a UI (ex:\n * component). Those attribute values should not be generated randomly (hardcoded most of the time)\n * and stay the same across deploys. They are not necessarily unique across the document.\n */\nexports.STABLE_ATTRIBUTES = [\n getActionNameFromElement_1.DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE,\n // Common test attributes (list provided by google recorder)\n 'data-testid',\n 'data-test',\n 'data-qa',\n 'data-cy',\n 'data-test-id',\n 'data-qa-id',\n 'data-testing',\n // FullStory decorator attributes:\n 'data-component',\n 'data-element',\n 'data-source-file',\n];\n// Selectors to use if they target a single element on the whole document. Those selectors are\n// considered as \"stable\" and uniquely identify an element regardless of the page state. If we find\n// one, we should consider the selector \"complete\" and stop iterating over ancestors.\nvar GLOBALLY_UNIQUE_SELECTOR_GETTERS = [getStableAttributeSelector, getIDSelector];\n// Selectors to use if they target a single element among an element descendants. Those selectors\n// are more brittle than \"globally unique\" selectors and should be combined with ancestor selectors\n// to improve specificity.\nvar UNIQUE_AMONG_CHILDREN_SELECTOR_GETTERS = [\n getStableAttributeSelector,\n getClassSelector,\n getTagNameSelector,\n];\nfunction getSelectorFromElement(targetElement, actionNameAttribute) {\n if (!isConnected(targetElement)) {\n // We cannot compute a selector for a detached element, as we don't have access to all of its\n // parents, and we cannot determine if it's unique in the document.\n return;\n }\n var targetElementSelector;\n var currentElement = targetElement;\n while (currentElement && currentElement.nodeName !== 'HTML') {\n var globallyUniqueSelector = findSelector(currentElement, GLOBALLY_UNIQUE_SELECTOR_GETTERS, isSelectorUniqueGlobally, actionNameAttribute, targetElementSelector);\n if (globallyUniqueSelector) {\n return globallyUniqueSelector;\n }\n var uniqueSelectorAmongChildren = findSelector(currentElement, UNIQUE_AMONG_CHILDREN_SELECTOR_GETTERS, isSelectorUniqueAmongSiblings, actionNameAttribute, targetElementSelector);\n targetElementSelector =\n uniqueSelectorAmongChildren || combineSelector(getPositionSelector(currentElement), targetElementSelector);\n currentElement = (0, polyfills_1.getParentElement)(currentElement);\n }\n return targetElementSelector;\n}\nfunction isGeneratedValue(value) {\n // To compute the \"URL path group\", the backend replaces every URL path parts as a question mark\n // if it thinks the part is an identifier. The condition it uses is to checks whether a digit is\n // present.\n //\n // Here, we use the same strategy: if the value contains a digit, we consider it generated. This\n // strategy might be a bit naive and fail in some cases, but there are many fallbacks to generate\n // CSS selectors so it should be fine most of the time.\n return /[0-9]/.test(value);\n}\nfunction getIDSelector(element) {\n if (element.id && !isGeneratedValue(element.id)) {\n return \"#\".concat((0, polyfills_1.cssEscape)(element.id));\n }\n}\nfunction getClassSelector(element) {\n if (element.tagName === 'BODY') {\n return;\n }\n var classList = (0, polyfills_1.getClassList)(element);\n for (var i = 0; i < classList.length; i += 1) {\n var className = classList[i];\n if (isGeneratedValue(className)) {\n continue;\n }\n return \"\".concat((0, polyfills_1.cssEscape)(element.tagName), \".\").concat((0, polyfills_1.cssEscape)(className));\n }\n}\nfunction getTagNameSelector(element) {\n return (0, polyfills_1.cssEscape)(element.tagName);\n}\nfunction getStableAttributeSelector(element, actionNameAttribute) {\n if (actionNameAttribute) {\n var selector = getAttributeSelector(actionNameAttribute);\n if (selector) {\n return selector;\n }\n }\n for (var _i = 0, STABLE_ATTRIBUTES_1 = exports.STABLE_ATTRIBUTES; _i < STABLE_ATTRIBUTES_1.length; _i++) {\n var attributeName = STABLE_ATTRIBUTES_1[_i];\n var selector = getAttributeSelector(attributeName);\n if (selector) {\n return selector;\n }\n }\n function getAttributeSelector(attributeName) {\n if (element.hasAttribute(attributeName)) {\n return \"\".concat((0, polyfills_1.cssEscape)(element.tagName), \"[\").concat(attributeName, \"=\\\"\").concat((0, polyfills_1.cssEscape)(element.getAttribute(attributeName)), \"\\\"]\");\n }\n }\n}\nfunction getPositionSelector(element) {\n var sibling = (0, polyfills_1.getParentElement)(element).firstElementChild;\n var elementIndex = 1;\n while (sibling && sibling !== element) {\n if (sibling.tagName === element.tagName) {\n elementIndex += 1;\n }\n sibling = sibling.nextElementSibling;\n }\n return \"\".concat((0, polyfills_1.cssEscape)(element.tagName), \":nth-of-type(\").concat(elementIndex, \")\");\n}\nfunction findSelector(element, selectorGetters, predicate, actionNameAttribute, childSelector) {\n for (var _i = 0, selectorGetters_1 = selectorGetters; _i < selectorGetters_1.length; _i++) {\n var selectorGetter = selectorGetters_1[_i];\n var elementSelector = selectorGetter(element, actionNameAttribute);\n if (!elementSelector) {\n continue;\n }\n if (predicate(element, elementSelector, childSelector)) {\n return combineSelector(elementSelector, childSelector);\n }\n }\n}\n/**\n * Check whether the selector is unique among the whole document.\n */\nfunction isSelectorUniqueGlobally(element, elementSelector, childSelector) {\n return element.ownerDocument.querySelectorAll(combineSelector(elementSelector, childSelector)).length === 1;\n}\n/**\n * Check whether the selector is unique among the element siblings. In other words, it returns true\n * if \"ELEMENT_PARENT > CHILD_SELECTOR\" returns a single element.\n *\n * @param {Element} currentElement - the element being considered while iterating over the target\n * element ancestors.\n *\n * @param {string} currentElementSelector - a selector that matches the current element. That\n * selector is not a composed selector (i.e. it might be a single tag name, class name...).\n *\n * @param {string|undefined} childSelector - child selector is a selector that targets a descendant\n * of the current element. When undefined, the current element is the target element.\n *\n * # Scope selector usage\n *\n * When composed together, the final selector will be joined with `>` operators to make sure we\n * target direct descendants at each level. In this function, we'll use `querySelector` to check if\n * a selector matches descendants of the current element. But by default, the query selector match\n * elements at any level. Example:\n *\n * ```html\n *
\n *
\n * \n *
\n * \n *
\n * \n *
\n *
\n * \n * ```\n *\n * `sibling.querySelector('DIV > SPAN')` will match both span elements, so we would consider the\n * selector to be not unique, even if it is unique when we'll compose it with the parent with a `>`\n * operator (`MAIN > DIV > SPAN`).\n *\n * To avoid this, we can use the `:scope` selector to make sure the selector starts from the current\n * sibling (i.e. `sibling.querySelector('DIV:scope > SPAN')` will only match the first span).\n *\n * The result will be less accurate on browsers that don't support :scope (i. e. IE): it will check\n * for any element matching the selector contained in the parent (in other words,\n * \"ELEMENT_PARENT CHILD_SELECTOR\" returns a single element), regardless of whether the selector is\n * a direct descendant of the element parent. This should not impact results too much: if it\n * inaccurately returns false, we'll just fall back to another strategy.\n *\n * [1]: https://developer.mozilla.org/fr/docs/Web/CSS/:scope\n *\n * # Performance considerations\n *\n * We compute selectors in performance-critical operations (ex: during a click), so we need to make\n * sure the function is as fast as possible. We observed that naively using `querySelectorAll` to\n * check if the selector matches more than 1 element is quite expensive, so we want to avoid it.\n *\n * Because we are iterating the DOM upward and we use that function at every level, we know the\n * child selector is already unique among the current element children, so we don't need to check\n * for the current element subtree.\n *\n * Instead, we can focus on the current element siblings. If we find a single element matching the\n * selector within a sibling, we know that it's not unique. This allows us to use `querySelector`\n * (or `matches`, when the current element is the target element) instead of `querySelectorAll`.\n */\nfunction isSelectorUniqueAmongSiblings(currentElement, currentElementSelector, childSelector) {\n var isSiblingMatching;\n if (childSelector === undefined) {\n // If the child selector is undefined (meaning `currentElement` is the target element, not one\n // of its ancestor), we need to use `matches` to check if the sibling is matching the selector,\n // as `querySelector` only returns a descendant of the element.\n isSiblingMatching = function (sibling) { return (0, polyfills_1.elementMatches)(sibling, currentElementSelector); };\n }\n else {\n var scopedSelector_1 = supportScopeSelector()\n ? combineSelector(\"\".concat(currentElementSelector, \":scope\"), childSelector)\n : combineSelector(currentElementSelector, childSelector);\n isSiblingMatching = function (sibling) { return sibling.querySelector(scopedSelector_1) !== null; };\n }\n var parent = (0, polyfills_1.getParentElement)(currentElement);\n var sibling = parent.firstElementChild;\n while (sibling) {\n if (sibling !== currentElement && isSiblingMatching(sibling)) {\n return false;\n }\n sibling = sibling.nextElementSibling;\n }\n return true;\n}\nfunction combineSelector(parent, child) {\n return child ? \"\".concat(parent, \">\").concat(child) : parent;\n}\nvar supportScopeSelectorCache;\nfunction supportScopeSelector() {\n if (supportScopeSelectorCache === undefined) {\n try {\n document.querySelector(':scope');\n supportScopeSelectorCache = true;\n }\n catch (_a) {\n supportScopeSelectorCache = false;\n }\n }\n return supportScopeSelectorCache;\n}\n/**\n * Polyfill-utility for the `isConnected` property not supported in IE11\n */\nfunction isConnected(element) {\n if ('isConnected' in\n // cast is to make sure `element` is not inferred as `never` after the check\n element) {\n return element.isConnected;\n }\n return element.ownerDocument.documentElement.contains(element);\n}\n//# sourceMappingURL=getSelectorFromElement.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSessionReplayUrl = getSessionReplayUrl;\nexports.getDatadogSiteUrl = getDatadogSiteUrl;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nfunction getSessionReplayUrl(configuration, _a) {\n var session = _a.session, viewContext = _a.viewContext, errorType = _a.errorType;\n var sessionId = session ? session.id : 'no-session-id';\n var parameters = [];\n if (errorType !== undefined) {\n parameters.push(\"error-type=\".concat(errorType));\n }\n if (viewContext) {\n parameters.push(\"seed=\".concat(viewContext.id));\n parameters.push(\"from=\".concat(viewContext.startClocks.timeStamp));\n }\n var origin = getDatadogSiteUrl(configuration);\n var path = \"/rum/replay/sessions/\".concat(sessionId);\n return \"\".concat(origin).concat(path, \"?\").concat(parameters.join('&'));\n}\nfunction getDatadogSiteUrl(rumConfiguration) {\n var site = rumConfiguration.site;\n var subdomain = rumConfiguration.subdomain || getSiteDefaultSubdomain(rumConfiguration);\n return \"https://\".concat(subdomain ? \"\".concat(subdomain, \".\") : '').concat(site);\n}\nfunction getSiteDefaultSubdomain(configuration) {\n switch (configuration.site) {\n case browser_core_1.INTAKE_SITE_US1:\n case browser_core_1.INTAKE_SITE_EU1:\n return 'app';\n case browser_core_1.INTAKE_SITE_STAGING:\n return 'dd';\n default:\n return undefined;\n }\n}\n//# sourceMappingURL=getSessionReplayUrl.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LifeCycle = void 0;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nexports.LifeCycle = (browser_core_1.AbstractLifeCycle);\n//# sourceMappingURL=lifeCycle.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.limitModification = limitModification;\nvar browser_core_1 = require(\"@datadog/browser-core\");\n/**\n * Current limitation:\n * - field path do not support array, 'a.b.c' only\n */\nfunction limitModification(object, modifiableFieldPaths, modifier) {\n var clone = (0, browser_core_1.deepClone)(object);\n var result = modifier(clone);\n (0, browser_core_1.objectEntries)(modifiableFieldPaths).forEach(function (_a) {\n var fieldPath = _a[0], fieldType = _a[1];\n var newValue = get(clone, fieldPath);\n var newType = (0, browser_core_1.getType)(newValue);\n if (newType === fieldType) {\n set(object, fieldPath, (0, browser_core_1.sanitize)(newValue));\n }\n else if (fieldType === 'object' && (newType === 'undefined' || newType === 'null')) {\n set(object, fieldPath, {});\n }\n });\n return result;\n}\nfunction get(object, path) {\n var current = object;\n for (var _i = 0, _a = path.split('.'); _i < _a.length; _i++) {\n var field = _a[_i];\n if (!isValidObjectContaining(current, field)) {\n return;\n }\n current = current[field];\n }\n return current;\n}\nfunction set(object, path, value) {\n var current = object;\n var fields = path.split('.');\n for (var i = 0; i < fields.length; i += 1) {\n var field = fields[i];\n if (!isValidObject(current)) {\n return;\n }\n if (i !== fields.length - 1) {\n current = current[field];\n }\n else {\n current[field] = value;\n }\n }\n}\nfunction isValidObject(object) {\n return (0, browser_core_1.getType)(object) === 'object';\n}\nfunction isValidObjectContaining(object, field) {\n return isValidObject(object) && Object.prototype.hasOwnProperty.call(object, field);\n}\n//# sourceMappingURL=limitModification.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startLongAnimationFrameCollection = startLongAnimationFrameCollection;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar performanceObservable_1 = require(\"../../browser/performanceObservable\");\nfunction startLongAnimationFrameCollection(lifeCycle, configuration) {\n var performanceResourceSubscription = (0, performanceObservable_1.createPerformanceObservable)(configuration, {\n type: performanceObservable_1.RumPerformanceEntryType.LONG_ANIMATION_FRAME,\n buffered: true,\n }).subscribe(function (entries) {\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n var entry = entries_1[_i];\n var startClocks = (0, browser_core_1.relativeToClocks)(entry.startTime);\n var rawRumEvent = {\n date: startClocks.timeStamp,\n long_task: {\n id: (0, browser_core_1.generateUUID)(),\n entry_type: \"long-animation-frame\" /* RumLongTaskEntryType.LONG_ANIMATION_FRAME */,\n duration: (0, browser_core_1.toServerDuration)(entry.duration),\n blocking_duration: (0, browser_core_1.toServerDuration)(entry.blockingDuration),\n first_ui_event_timestamp: (0, browser_core_1.toServerDuration)(entry.firstUIEventTimestamp),\n render_start: (0, browser_core_1.toServerDuration)(entry.renderStart),\n style_and_layout_start: (0, browser_core_1.toServerDuration)(entry.styleAndLayoutStart),\n start_time: (0, browser_core_1.toServerDuration)(entry.startTime),\n scripts: entry.scripts.map(function (script) { return ({\n duration: (0, browser_core_1.toServerDuration)(script.duration),\n pause_duration: (0, browser_core_1.toServerDuration)(script.pauseDuration),\n forced_style_and_layout_duration: (0, browser_core_1.toServerDuration)(script.forcedStyleAndLayoutDuration),\n start_time: (0, browser_core_1.toServerDuration)(script.startTime),\n execution_start: (0, browser_core_1.toServerDuration)(script.executionStart),\n source_url: script.sourceURL,\n source_function_name: script.sourceFunctionName,\n source_char_position: script.sourceCharPosition,\n invoker: script.invoker,\n invoker_type: script.invokerType,\n window_attribution: script.windowAttribution,\n }); }),\n },\n type: \"long_task\" /* RumEventType.LONG_TASK */,\n _dd: {\n discarded: false,\n },\n };\n lifeCycle.notify(11 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, {\n rawRumEvent: rawRumEvent,\n startTime: startClocks.relative,\n domainContext: { performanceEntry: entry },\n });\n }\n });\n return {\n stop: function () { return performanceResourceSubscription.unsubscribe(); },\n };\n}\n//# sourceMappingURL=longAnimationFrameCollection.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.startLongTaskCollection = startLongTaskCollection;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar performanceObservable_1 = require(\"../../browser/performanceObservable\");\nfunction startLongTaskCollection(lifeCycle, configuration) {\n var performanceLongTaskSubscription = (0, performanceObservable_1.createPerformanceObservable)(configuration, {\n type: performanceObservable_1.RumPerformanceEntryType.LONG_TASK,\n buffered: true,\n }).subscribe(function (entries) {\n for (var _i = 0, entries_1 = entries; _i < entries_1.length; _i++) {\n var entry = entries_1[_i];\n if (entry.entryType !== performanceObservable_1.RumPerformanceEntryType.LONG_TASK) {\n break;\n }\n if (!configuration.trackLongTasks) {\n break;\n }\n var startClocks = (0, browser_core_1.relativeToClocks)(entry.startTime);\n var rawRumEvent = {\n date: startClocks.timeStamp,\n long_task: {\n id: (0, browser_core_1.generateUUID)(),\n entry_type: \"long-task\" /* RumLongTaskEntryType.LONG_TASK */,\n duration: (0, browser_core_1.toServerDuration)(entry.duration),\n },\n type: \"long_task\" /* RumEventType.LONG_TASK */,\n _dd: {\n discarded: false,\n },\n };\n lifeCycle.notify(11 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, {\n rawRumEvent: rawRumEvent,\n startTime: startClocks.relative,\n domainContext: { performanceEntry: entry },\n });\n }\n });\n return {\n stop: function () {\n performanceLongTaskSubscription.unsubscribe();\n },\n };\n}\n//# sourceMappingURL=longTaskCollection.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.callPluginsMethod = callPluginsMethod;\nfunction callPluginsMethod(plugins, methodName, parameter) {\n if (!plugins) {\n return;\n }\n for (var _i = 0, plugins_1 = plugins; _i < plugins_1.length; _i++) {\n var plugin = plugins_1[_i];\n var method = plugin[methodName];\n if (method) {\n method(parameter);\n }\n }\n}\n//# sourceMappingURL=plugins.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.censorText = exports.FORM_PRIVATE_TAG_NAMES = exports.CENSORED_IMG_MARK = exports.CENSORED_STRING_MARK = exports.PRIVACY_CLASS_PREFIX = exports.PRIVACY_ATTR_VALUE_HIDDEN = exports.PRIVACY_ATTR_VALUE_MASK_USER_INPUT = exports.PRIVACY_ATTR_VALUE_MASK = exports.PRIVACY_ATTR_VALUE_ALLOW = exports.PRIVACY_ATTR_NAME = exports.NodePrivacyLevel = void 0;\nexports.getNodePrivacyLevel = getNodePrivacyLevel;\nexports.reducePrivacyLevel = reducePrivacyLevel;\nexports.getNodeSelfPrivacyLevel = getNodeSelfPrivacyLevel;\nexports.shouldMaskNode = shouldMaskNode;\nexports.getTextContent = getTextContent;\nexports.shouldIgnoreElement = shouldIgnoreElement;\nexports.getPrivacySelector = getPrivacySelector;\nvar browser_core_1 = require(\"@datadog/browser-core\");\nvar htmlDomUtils_1 = require(\"../browser/htmlDomUtils\");\nvar polyfills_1 = require(\"../browser/polyfills\");\nexports.NodePrivacyLevel = {\n IGNORE: 'ignore',\n HIDDEN: 'hidden',\n ALLOW: browser_core_1.DefaultPrivacyLevel.ALLOW,\n MASK: browser_core_1.DefaultPrivacyLevel.MASK,\n MASK_USER_INPUT: browser_core_1.DefaultPrivacyLevel.MASK_USER_INPUT,\n};\nexports.PRIVACY_ATTR_NAME = 'data-dd-privacy';\n// Privacy Attrs\nexports.PRIVACY_ATTR_VALUE_ALLOW = 'allow';\nexports.PRIVACY_ATTR_VALUE_MASK = 'mask';\nexports.PRIVACY_ATTR_VALUE_MASK_USER_INPUT = 'mask-user-input';\nexports.PRIVACY_ATTR_VALUE_HIDDEN = 'hidden';\n// Privacy Classes - not all customers can set plain HTML attributes, so support classes too\nexports.PRIVACY_CLASS_PREFIX = 'dd-privacy-';\n// Private Replacement Templates\nexports.CENSORED_STRING_MARK = '***';\nexports.CENSORED_IMG_MARK = 'data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==';\nexports.FORM_PRIVATE_TAG_NAMES = {\n INPUT: true,\n OUTPUT: true,\n TEXTAREA: true,\n SELECT: true,\n OPTION: true,\n DATALIST: true,\n OPTGROUP: true,\n};\nvar TEXT_MASKING_CHAR = 'x';\n/**\n * Get node privacy level by iterating over its ancestors. When the direct parent privacy level is\n * know, it is best to use something like:\n *\n * derivePrivacyLevelGivenParent(getNodeSelfPrivacyLevel(node), parentNodePrivacyLevel)\n */\nfunction getNodePrivacyLevel(node, defaultPrivacyLevel, cache) {\n if (cache && cache.has(node)) {\n return cache.get(node);\n }\n var parentNode = (0, htmlDomUtils_1.getParentNode)(node);\n var parentNodePrivacyLevel = parentNode\n ? getNodePrivacyLevel(parentNode, defaultPrivacyLevel, cache)\n : defaultPrivacyLevel;\n var selfNodePrivacyLevel = getNodeSelfPrivacyLevel(node);\n var nodePrivacyLevel = reducePrivacyLevel(selfNodePrivacyLevel, parentNodePrivacyLevel);\n if (cache) {\n cache.set(node, nodePrivacyLevel);\n }\n return nodePrivacyLevel;\n}\n/**\n * Reduces the next privacy level based on self + parent privacy levels\n */\nfunction reducePrivacyLevel(childPrivacyLevel, parentNodePrivacyLevel) {\n switch (parentNodePrivacyLevel) {\n // These values cannot be overridden\n case exports.NodePrivacyLevel.HIDDEN:\n case exports.NodePrivacyLevel.IGNORE:\n return parentNodePrivacyLevel;\n }\n switch (childPrivacyLevel) {\n case exports.NodePrivacyLevel.ALLOW:\n case exports.NodePrivacyLevel.MASK:\n case exports.NodePrivacyLevel.MASK_USER_INPUT:\n case exports.NodePrivacyLevel.HIDDEN:\n case exports.NodePrivacyLevel.IGNORE:\n return childPrivacyLevel;\n default:\n return parentNodePrivacyLevel;\n }\n}\n/**\n * Determines the node's own privacy level without checking for ancestors.\n */\nfunction getNodeSelfPrivacyLevel(node) {\n // Only Element types can have a privacy level set\n if (!(0, htmlDomUtils_1.isElementNode)(node)) {\n return;\n }\n // Overrules for replay purpose\n if (node.tagName === 'BASE') {\n return exports.NodePrivacyLevel.ALLOW;\n }\n // Overrules to enforce end-user protection\n if (node.tagName === 'INPUT') {\n var inputElement = node;\n if (inputElement.type === 'password' || inputElement.type === 'email' || inputElement.type === 'tel') {\n return exports.NodePrivacyLevel.MASK;\n }\n if (inputElement.type === 'hidden') {\n return exports.NodePrivacyLevel.MASK;\n }\n var autocomplete = inputElement.getAttribute('autocomplete');\n // Handle input[autocomplete=cc-number/cc-csc/cc-exp/cc-exp-month/cc-exp-year/new-password/current-password]\n if (autocomplete && (autocomplete.startsWith('cc-') || autocomplete.endsWith('-password'))) {\n return exports.NodePrivacyLevel.MASK;\n }\n }\n // Check HTML privacy attributes and classes\n if ((0, polyfills_1.elementMatches)(node, getPrivacySelector(exports.NodePrivacyLevel.HIDDEN))) {\n return exports.NodePrivacyLevel.HIDDEN;\n }\n if ((0, polyfills_1.elementMatches)(node, getPrivacySelector(exports.NodePrivacyLevel.MASK))) {\n return exports.NodePrivacyLevel.MASK;\n }\n if ((0, polyfills_1.elementMatches)(node, getPrivacySelector(exports.NodePrivacyLevel.MASK_USER_INPUT))) {\n return exports.NodePrivacyLevel.MASK_USER_INPUT;\n }\n if ((0, polyfills_1.elementMatches)(node, getPrivacySelector(exports.NodePrivacyLevel.ALLOW))) {\n return exports.NodePrivacyLevel.ALLOW;\n }\n if (shouldIgnoreElement(node)) {\n return exports.NodePrivacyLevel.IGNORE;\n }\n}\n/**\n * Helper aiming to unify `mask` and `mask-user-input` privacy levels:\n *\n * In the `mask` case, it is trivial: we should mask the element.\n *\n * In the `mask-user-input` case, we should mask the element only if it is a \"form\" element or the\n * direct parent is a form element for text nodes).\n *\n * Other `shouldMaskNode` cases are edge cases that should not matter too much (ex: should we mask a\n * node if it is ignored or hidden? it doesn't matter since it won't be serialized).\n */\nfunction shouldMaskNode(node, privacyLevel) {\n switch (privacyLevel) {\n case exports.NodePrivacyLevel.MASK:\n case exports.NodePrivacyLevel.HIDDEN:\n case exports.NodePrivacyLevel.IGNORE:\n return true;\n case exports.NodePrivacyLevel.MASK_USER_INPUT:\n return (0, htmlDomUtils_1.isTextNode)(node) ? isFormElement(node.parentNode) : isFormElement(node);\n default:\n return false;\n }\n}\nfunction isFormElement(node) {\n if (!node || node.nodeType !== node.ELEMENT_NODE) {\n return false;\n }\n var element = node;\n if (element.tagName === 'INPUT') {\n switch (element.type) {\n case 'button':\n case 'color':\n case 'reset':\n case 'submit':\n return false;\n }\n }\n return !!exports.FORM_PRIVATE_TAG_NAMES[element.tagName];\n}\n/**\n * Text censoring non-destructively maintains whitespace characters in order to preserve text shape\n * during replay.\n */\nvar censorText = function (text) { return text.replace(/\\S/g, TEXT_MASKING_CHAR); };\nexports.censorText = censorText;\nfunction getTextContent(textNode, ignoreWhiteSpace, parentNodePrivacyLevel) {\n var _a;\n // The parent node may not be a html element which has a tagName attribute.\n // So just let it be undefined which is ok in this use case.\n var parentTagName = (_a = textNode.parentElement) === null || _a === void 0 ? void 0 : _a.tagName;\n var textContent = textNode.textContent || '';\n if (ignoreWhiteSpace && !textContent.trim()) {\n return;\n }\n var nodePrivacyLevel = parentNodePrivacyLevel;\n var isScript = parentTagName === 'SCRIPT';\n if (isScript) {\n // For perf reasons, we don't record script (heuristic)\n textContent = exports.CENSORED_STRING_MARK;\n }\n else if (nodePrivacyLevel === exports.NodePrivacyLevel.HIDDEN) {\n // Should never occur, but just in case, we set to CENSORED_MARK.\n textContent = exports.CENSORED_STRING_MARK;\n }\n else if (shouldMaskNode(textNode, nodePrivacyLevel)) {\n if (\n // Scrambling the child list breaks text nodes for DATALIST/SELECT/OPTGROUP\n parentTagName === 'DATALIST' ||\n parentTagName === 'SELECT' ||\n parentTagName === 'OPTGROUP') {\n if (!textContent.trim()) {\n return;\n }\n }\n else if (parentTagName === 'OPTION') {\n //