@datadog/vite-plugin 3.0.4 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/reports/datadog-vite-plugin/build.json +381 -0
  2. package/dist/reports/datadog-vite-plugin/bundler.json +3155 -0
  3. package/dist/reports/datadog-vite-plugin/dependencies.json +1184 -0
  4. package/dist/reports/datadog-vite-plugin/errors.json +1 -0
  5. package/dist/reports/datadog-vite-plugin/logs.json +555 -0
  6. package/dist/reports/datadog-vite-plugin/metrics.json +7052 -0
  7. package/dist/reports/datadog-vite-plugin/timings.json +1689 -0
  8. package/dist/reports/datadog-vite-plugin/warnings.json +1 -0
  9. package/dist/reports/dts-datadog-vite-plugin/build.json +72 -0
  10. package/dist/reports/dts-datadog-vite-plugin/bundler.json +365 -0
  11. package/dist/reports/dts-datadog-vite-plugin/dependencies.json +267 -0
  12. package/dist/reports/dts-datadog-vite-plugin/errors.json +1 -0
  13. package/dist/reports/dts-datadog-vite-plugin/logs.json +366 -0
  14. package/dist/reports/dts-datadog-vite-plugin/timings.json +982 -0
  15. package/dist/reports/dts-datadog-vite-plugin/warnings.json +14 -0
  16. package/dist/reports/privacy-helpers/build.json +55 -0
  17. package/dist/reports/privacy-helpers/bundler.json +68 -0
  18. package/dist/reports/privacy-helpers/dependencies.json +10 -0
  19. package/dist/reports/privacy-helpers/errors.json +1 -0
  20. package/dist/reports/privacy-helpers/logs.json +303 -0
  21. package/dist/reports/privacy-helpers/timings.json +903 -0
  22. package/dist/reports/privacy-helpers/warnings.json +1 -0
  23. package/dist/reports/rum-browser-sdk/build.json +468 -0
  24. package/dist/reports/rum-browser-sdk/bundler.json +2502 -0
  25. package/dist/reports/rum-browser-sdk/dependencies.json +3347 -0
  26. package/dist/reports/rum-browser-sdk/errors.json +1 -0
  27. package/dist/reports/rum-browser-sdk/logs.json +254 -0
  28. package/dist/reports/rum-browser-sdk/timings.json +2585 -0
  29. package/dist/reports/rum-browser-sdk/warnings.json +1 -0
  30. package/dist/src/index.js +1 -1
  31. package/dist/src/index.js.map +1 -1
  32. package/dist/src/index.mjs +2 -2
  33. package/package.json +1 -1
@@ -0,0 +1,2502 @@
1
+ [
2
+ {
3
+ "rum-browser-sdk.js": {
4
+ "exports": [],
5
+ "facadeModuleId": "/home/runner/work/build-plugins/build-plugins/packages/plugins/rum/src/built/rum-browser-sdk.ts",
6
+ "isDynamicEntry": false,
7
+ "isEntry": true,
8
+ "isImplicitEntry": false,
9
+ "moduleIds": [
10
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/display.js",
11
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/catchUserErrors.js",
12
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/numberUtils.js",
13
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js",
14
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/byteUtils.js",
15
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/objectUtils.js",
16
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/getGlobalObject.js",
17
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/getZoneJsOriginalValue.js",
18
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/monitor.js",
19
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/timer.js",
20
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/observable.js",
21
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/functionUtils.js",
22
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/stringUtils.js",
23
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/browserDetection.js",
24
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/browser/cookie.js",
25
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionStoreStrategy.js",
26
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js",
27
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/user/user.types.js",
28
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/typeUtils.js",
29
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/user/user.js",
30
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/user/index.js",
31
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/sessionConstants.js",
32
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/sessionStateValidation.js",
33
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/sessionState.js",
34
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/oldCookiesMigration.js",
35
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionInCookie.js",
36
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionInLocalStorage.js",
37
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/sessionStoreOperations.js",
38
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/sessionStore.js",
39
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/trackingConsent.js",
40
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/serialisation/jsonStringify.js",
41
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/urlPolyfill.js",
42
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/configuration/intakeSites.js",
43
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/configuration/endpointBuilder.js",
44
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/configuration/tags.js",
45
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/configuration/transportConfiguration.js",
46
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/configuration/configuration.js",
47
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/configuration/index.js",
48
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/experimentalFeatures.js",
49
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/stackTrace/computeStackTrace.js",
50
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/stackTrace/handlingStack.js",
51
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/instrumentMethod.js",
52
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/serialisation/sanitize.js",
53
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/error/error.js",
54
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/error/error.types.js",
55
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/error/trackRuntimeError.js",
56
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/boot/init.js",
57
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/boot/displayAlreadyInitializedError.js",
58
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/browser/addEventListener.js",
59
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/report/reportObservable.js",
60
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/sendToExtension.js",
61
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/mergeInto.js",
62
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/connectivity/connectivity.js",
63
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/connectivity/index.js",
64
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/arrayUtils.js",
65
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/boundedBuffer.js",
66
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/telemetry/rawTelemetryEvent.types.js",
67
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/telemetry/telemetry.js",
68
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/telemetry/telemetryEvent.types.js",
69
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/telemetry/index.js",
70
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/valueHistory.js",
71
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/sessionManager.js",
72
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/responseUtils.js",
73
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/transport/sendWithRetryStrategy.js",
74
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/transport/httpRequest.js",
75
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/transport/eventBridge.js",
76
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/browser/pageExitObservable.js",
77
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/transport/batch.js",
78
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/transport/flushController.js",
79
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/transport/startBatchWithReplica.js",
80
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/transport/index.js",
81
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/encoder.js",
82
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/abstractLifeCycle.js",
83
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/eventRateLimiter/createEventRateLimiter.js",
84
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/browser/runOnReadyState.js",
85
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/browser/xhrObservable.js",
86
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/browser/fetchObservable.js",
87
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/requestIdleCallback.js",
88
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/taskQueue.js",
89
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/console/consoleObservable.js",
90
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/context/contextManager.js",
91
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/context/storeContextManager.js",
92
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/context/customerDataTracker.js",
93
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/readBytesFromStream.js",
94
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/synthetics/syntheticsWorkerValues.js",
95
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/resourceUtils.js",
96
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/matchOption.js",
97
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/deflate/deflate.types.js",
98
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/deflate/index.js",
99
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/index.js",
100
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/commonContext.js",
101
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/vital/vitalCollection.js",
102
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/crypto.js",
103
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/tracing/identifier.js",
104
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/tracing/sampler.js",
105
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/tracing/tracer.js",
106
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/configuration/configuration.js",
107
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/configuration/remoteConfiguration.js",
108
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/configuration/index.js",
109
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/plugins.js",
110
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/boot/preStartRum.js",
111
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/boot/rumPublicApi.js",
112
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/domMutationObservable.js",
113
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/windowOpenObservable.js",
114
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/syntheticsContext.js",
115
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/limitModification.js",
116
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/assembly.js",
117
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/internalContext.js",
118
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/lifeCycle.js",
119
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/viewHistory.js",
120
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/resource/resourceUtils.js",
121
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/requestCollection.js",
122
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/discardNegativeDuration.js",
123
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/trackEventCounts.js",
124
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/firstInputPolyfill.js",
125
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/performanceObservable.js",
126
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/waitPageActivityEnd.js",
127
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/htmlDomUtils.js",
128
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/privacy.js",
129
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/action/getActionNameFromElement.js",
130
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/getSelectorFromElement.js",
131
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/action/clickChain.js",
132
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/action/listenActionEvents.js",
133
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/action/computeFrustration.js",
134
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/action/interactionSelectorCache.js",
135
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/action/trackClickActions.js",
136
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/action/actionCollection.js",
137
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/error/trackConsoleError.js",
138
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/error/trackReportError.js",
139
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/error/errorCollection.js",
140
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/resource/matchRequestResourceEntry.js",
141
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/tracing/getDocumentTraceId.js",
142
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/performanceUtils.js",
143
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/resource/retrieveInitialDocumentResourceTiming.js",
144
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/resource/resourceCollection.js",
145
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/trackViewEventCounts.js",
146
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackFirstContentfulPaint.js",
147
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackFirstInput.js",
148
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackNavigationTimings.js",
149
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackLargestContentfulPaint.js",
150
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackFirstHidden.js",
151
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackInitialViewMetrics.js",
152
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackCumulativeLayoutShift.js",
153
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/interactionCountPolyfill.js",
154
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackInteractionToNextPaint.js",
155
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackLoadingTime.js",
156
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/scroll.js",
157
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/viewportObservable.js",
158
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackScrollMetrics.js",
159
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackCommonViewMetrics.js",
160
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/trackViews.js",
161
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewCollection.js",
162
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/rumSessionManager.js",
163
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/transport/startRumBatch.js",
164
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/transport/startRumEventBridge.js",
165
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/urlContexts.js",
166
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/locationChangeObservable.js",
167
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/featureFlagContext.js",
168
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/startCustomerDataTelemetry.js",
169
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/pageStateHistory.js",
170
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/displayContext.js",
171
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/cookieObservable.js",
172
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/ciVisibilityContext.js",
173
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/longAnimationFrame/longAnimationFrameCollection.js",
174
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/longTask/longTaskCollection.js",
175
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/boot/startRum.js",
176
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/getSessionReplayUrl.js",
177
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/index.js",
178
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/replayStats.js",
179
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/deflate/deflateEncoder.js",
180
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/deflate/deflateWorker.js",
181
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/deflate/index.js",
182
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/boot/isBrowserSupported.js",
183
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/getSessionReplayLink.js",
184
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/boot/postStartStrategy.js",
185
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/boot/preStartStrategy.js",
186
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/boot/recorderApi.js",
187
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/boot/lazyLoadRecorder.js",
188
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/entries/main.js",
189
+ "/home/runner/work/build-plugins/build-plugins/packages/plugins/rum/src/built/rum-browser-sdk.ts",
190
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializationUtils.js",
191
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/types/sessionReplay.js",
192
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/types/sessionReplayConstants.js",
193
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/types/index.js",
194
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeStyleSheets.js",
195
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeAttribute.js",
196
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeAttributes.js",
197
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeNode.js",
198
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeDocument.js",
199
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/serialization/index.js",
200
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/eventsUtils.js",
201
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/viewports.js",
202
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/assembly.js",
203
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackMove.js",
204
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackMouseInteraction.js",
205
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackScroll.js",
206
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackViewportResize.js",
207
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackMediaInteraction.js",
208
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackStyleSheet.js",
209
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackFocus.js",
210
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackFrustration.js",
211
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackViewEnd.js",
212
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackInput.js",
213
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/mutationBatch.js",
214
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackMutation.js",
215
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/index.js",
216
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/elementsScrollPositions.js",
217
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/shadowRootsController.js",
218
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/startFullSnapshots.js",
219
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/recordIds.js",
220
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/record.js",
221
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/index.js",
222
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/segmentCollection/buildReplayPayload.js",
223
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/segmentCollection/segment.js",
224
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/segmentCollection/segmentCollection.js",
225
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/segmentCollection/index.js",
226
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/startRecordBridge.js",
227
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/boot/startRecording.js"
228
+ ],
229
+ "name": "rum-browser-sdk",
230
+ "type": "chunk",
231
+ "dynamicImports": [],
232
+ "fileName": "rum-browser-sdk.js",
233
+ "implicitlyLoadedBefore": [],
234
+ "importedBindings": {},
235
+ "imports": [],
236
+ "modules": {
237
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/display.js": {
238
+ "code": "/* 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 */\nconst 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 */\nconst globalConsole = console;\nconst originalConsoleMethods = {};\nObject.keys(ConsoleApiName).forEach((name) => {\n originalConsoleMethods[name] = globalConsole[name];\n});\nconst PREFIX = 'Datadog Browser SDK:';\nconst display = {\n debug: originalConsoleMethods.debug.bind(globalConsole, PREFIX),\n log: originalConsoleMethods.log.bind(globalConsole, PREFIX),\n info: originalConsoleMethods.info.bind(globalConsole, PREFIX),\n warn: originalConsoleMethods.warn.bind(globalConsole, PREFIX),\n error: originalConsoleMethods.error.bind(globalConsole, PREFIX),\n};\nconst DOCS_ORIGIN = 'https://docs.datadoghq.com';\nconst DOCS_TROUBLESHOOTING = `${DOCS_ORIGIN}/real_user_monitoring/browser/troubleshooting`;\nconst MORE_DETAILS = 'More details:';",
239
+ "originalLength": 1766,
240
+ "removedExports": [],
241
+ "renderedExports": [
242
+ "ConsoleApiName",
243
+ "globalConsole",
244
+ "originalConsoleMethods",
245
+ "display",
246
+ "DOCS_ORIGIN",
247
+ "DOCS_TROUBLESHOOTING",
248
+ "MORE_DETAILS"
249
+ ],
250
+ "renderedLength": 1681
251
+ },
252
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/catchUserErrors.js": {
253
+ "code": "function catchUserErrors(fn, errorMsg) {\n return (...args) => {\n try {\n return fn(...args);\n }\n catch (err) {\n display.error(errorMsg, err);\n }\n };\n}",
254
+ "originalLength": 293,
255
+ "removedExports": [],
256
+ "renderedExports": [
257
+ "catchUserErrors"
258
+ ],
259
+ "renderedLength": 205
260
+ },
261
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/numberUtils.js": {
262
+ "code": "/**\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}",
263
+ "originalLength": 481,
264
+ "removedExports": [],
265
+ "renderedExports": [
266
+ "performDraw",
267
+ "round",
268
+ "isPercentage",
269
+ "isNumber"
270
+ ],
271
+ "renderedLength": 413
272
+ },
273
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/timeUtils.js": {
274
+ "code": "const ONE_SECOND = 1000;\nconst ONE_MINUTE = 60 * ONE_SECOND;\nconst ONE_HOUR = 60 * ONE_MINUTE;\nconst ONE_DAY = 24 * ONE_HOUR;\nconst ONE_YEAR = 365 * ONE_DAY;\nfunction relativeToClocks(relative) {\n return { relative, timeStamp: getCorrectedTimeStamp(relative) };\n}\nfunction timeStampToClocks(timeStamp) {\n return { relative: getRelativeTime(timeStamp), timeStamp };\n}\nfunction getCorrectedTimeStamp(relativeTime) {\n const 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 (!isNumber(duration)) {\n return duration;\n }\n return 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// Get the time since the navigation was started.\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 < ONE_YEAR;\n}\n/**\n * Navigation start slightly change on some rare cases\n */\nlet navigationStart;\n/**\n * Notes: this does not use `performance.timeOrigin` because:\n * - It doesn't seem to reflect the actual time on which the navigation has started: it may be much farther in the past,\n * at least in Firefox 71. (see: https://bugzilla.mozilla.org/show_bug.cgi?id=1429926)\n * - It is not supported in Safari <15\n */\nfunction getNavigationStart() {\n if (navigationStart === undefined) {\n navigationStart = performance.timing.navigationStart;\n }\n return navigationStart;\n}",
275
+ "originalLength": 2960,
276
+ "removedExports": [],
277
+ "renderedExports": [
278
+ "ONE_SECOND",
279
+ "ONE_MINUTE",
280
+ "ONE_HOUR",
281
+ "ONE_DAY",
282
+ "ONE_YEAR",
283
+ "relativeToClocks",
284
+ "timeStampToClocks",
285
+ "currentDrift",
286
+ "toServerDuration",
287
+ "dateNow",
288
+ "timeStampNow",
289
+ "relativeNow",
290
+ "clocksNow",
291
+ "clocksOrigin",
292
+ "elapsed",
293
+ "addDuration",
294
+ "getRelativeTime",
295
+ "getTimeStamp",
296
+ "looksLikeRelativeTime"
297
+ ],
298
+ "renderedLength": 2740
299
+ },
300
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/byteUtils.js": {
301
+ "code": "const ONE_KIBI_BYTE = 1024;\nconst ONE_MEBI_BYTE = 1024 * ONE_KIBI_BYTE;\n// eslint-disable-next-line no-control-regex\nconst 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 const length = buffers.reduce((total, buffer) => total + buffer.length, 0);\n const result = new Uint8Array(length);\n let offset = 0;\n for (const buffer of buffers) {\n result.set(buffer, offset);\n offset += buffer.length;\n }\n return result;\n}",
302
+ "originalLength": 937,
303
+ "removedExports": [],
304
+ "renderedExports": [
305
+ "ONE_KIBI_BYTE",
306
+ "ONE_MEBI_BYTE",
307
+ "computeBytesCount",
308
+ "concatBuffers"
309
+ ],
310
+ "renderedLength": 871
311
+ },
312
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/objectUtils.js": {
313
+ "code": "function shallowClone(object) {\n return { ...object };\n}\nfunction objectHasValue(object, value) {\n return Object.keys(object).some((key) => object[key] === value);\n}\nfunction isEmptyObject(object) {\n return Object.keys(object).length === 0;\n}\nfunction mapValues(object, fn) {\n const newObject = {};\n for (const key of Object.keys(object)) {\n newObject[key] = fn(object[key]);\n }\n return newObject;\n}",
314
+ "originalLength": 495,
315
+ "removedExports": [],
316
+ "renderedExports": [
317
+ "shallowClone",
318
+ "objectHasValue",
319
+ "isEmptyObject",
320
+ "mapValues"
321
+ ],
322
+ "renderedLength": 427
323
+ },
324
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/getGlobalObject.js": {
325
+ "code": "/**\n * inspired by https://mathiasbynens.be/notes/globalthis\n */\nfunction getGlobalObject() {\n if (typeof globalThis === 'object') {\n return globalThis;\n }\n Object.defineProperty(Object.prototype, '_dd_temp_', {\n get() {\n return this;\n },\n configurable: true,\n });\n // @ts-ignore _dd_temp is defined using defineProperty\n let 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}",
326
+ "originalLength": 987,
327
+ "removedExports": [],
328
+ "renderedExports": [
329
+ "getGlobalObject"
330
+ ],
331
+ "renderedLength": 936
332
+ },
333
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/getZoneJsOriginalValue.js": {
334
+ "code": "/**\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 const browserWindow = getGlobalObject();\n let 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}",
335
+ "originalLength": 1100,
336
+ "removedExports": [],
337
+ "renderedExports": [
338
+ "getZoneJsOriginalValue"
339
+ ],
340
+ "renderedLength": 989
341
+ },
342
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/monitor.js": {
343
+ "code": "let onMonitorErrorCollected;\nlet debugMode = false;\nfunction startMonitorErrorCollection(newOnMonitorErrorCollected) {\n onMonitorErrorCollected = newOnMonitorErrorCollected;\n}\nfunction setDebugMode(newDebugMode) {\n debugMode = newDebugMode;\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 monitorError(e);\n }\n}\nfunction monitorError(e) {\n displayIfDebugEnabled(e);\n if (onMonitorErrorCollected) {\n try {\n onMonitorErrorCollected(e);\n }\n catch (e) {\n displayIfDebugEnabled(e);\n }\n }\n}\nfunction displayIfDebugEnabled(...args) {\n if (debugMode) {\n display.error('[MONITOR]', ...args);\n }\n}",
344
+ "originalLength": 1533,
345
+ "removedExports": [
346
+ "resetMonitor",
347
+ "monitored"
348
+ ],
349
+ "renderedExports": [
350
+ "startMonitorErrorCollection",
351
+ "setDebugMode",
352
+ "monitor",
353
+ "callMonitored",
354
+ "monitorError",
355
+ "displayIfDebugEnabled"
356
+ ],
357
+ "renderedLength": 1036
358
+ },
359
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/timer.js": {
360
+ "code": "function setTimeout(callback, delay) {\n return getZoneJsOriginalValue(getGlobalObject(), 'setTimeout')(monitor(callback), delay);\n}\nfunction clearTimeout(timeoutId) {\n getZoneJsOriginalValue(getGlobalObject(), 'clearTimeout')(timeoutId);\n}\nfunction setInterval(callback, delay) {\n return getZoneJsOriginalValue(getGlobalObject(), 'setInterval')(monitor(callback), delay);\n}\nfunction clearInterval(timeoutId) {\n getZoneJsOriginalValue(getGlobalObject(), 'clearInterval')(timeoutId);\n}",
361
+ "originalLength": 714,
362
+ "removedExports": [],
363
+ "renderedExports": [
364
+ "setTimeout",
365
+ "clearTimeout",
366
+ "setInterval",
367
+ "clearInterval"
368
+ ],
369
+ "renderedLength": 495
370
+ },
371
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/observable.js": {
372
+ "code": "// eslint-disable-next-line no-restricted-syntax\nclass Observable {\n constructor(onFirstSubscribe) {\n this.onFirstSubscribe = onFirstSubscribe;\n this.observers = [];\n }\n subscribe(f) {\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: () => {\n this.observers = this.observers.filter((other) => f !== other);\n if (!this.observers.length && this.onLastUnsubscribe) {\n this.onLastUnsubscribe();\n }\n },\n };\n }\n notify(data) {\n this.observers.forEach((observer) => observer(data));\n }\n}\nfunction mergeObservables(...observables) {\n return new Observable((globalObservable) => {\n const subscriptions = observables.map((observable) => observable.subscribe((data) => globalObservable.notify(data)));\n return () => subscriptions.forEach((subscription) => subscription.unsubscribe());\n });\n}",
373
+ "originalLength": 1156,
374
+ "removedExports": [],
375
+ "renderedExports": [
376
+ "Observable",
377
+ "mergeObservables"
378
+ ],
379
+ "renderedLength": 1103
380
+ },
381
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/functionUtils.js": {
382
+ "code": "// use lodash API\nfunction throttle(fn, wait, options) {\n const needLeadingExecution = options && options.leading !== undefined ? options.leading : true;\n const needTrailingExecution = options && options.trailing !== undefined ? options.trailing : true;\n let inWaitPeriod = false;\n let pendingExecutionWithParameters;\n let pendingTimeoutId;\n return {\n throttled: (...parameters) => {\n if (inWaitPeriod) {\n pendingExecutionWithParameters = parameters;\n return;\n }\n if (needLeadingExecution) {\n fn(...parameters);\n }\n else {\n pendingExecutionWithParameters = parameters;\n }\n inWaitPeriod = true;\n pendingTimeoutId = setTimeout(() => {\n if (needTrailingExecution && pendingExecutionWithParameters) {\n fn(...pendingExecutionWithParameters);\n }\n inWaitPeriod = false;\n pendingExecutionWithParameters = undefined;\n }, wait);\n },\n cancel: () => {\n clearTimeout(pendingTimeoutId);\n inWaitPeriod = false;\n pendingExecutionWithParameters = undefined;\n },\n };\n}\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nfunction noop() { }",
383
+ "originalLength": 1464,
384
+ "removedExports": [],
385
+ "renderedExports": [
386
+ "throttle",
387
+ "noop"
388
+ ],
389
+ "renderedLength": 1355
390
+ },
391
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/stringUtils.js": {
392
+ "code": "/**\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 : `${1e7}-${1e3}-${4e3}-${8e3}-${1e11}`.replace(/[018]/g, generateUUID);\n}\nconst 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 const 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 const result = new Map();\n COMMA_SEPARATED_KEY_VALUE.lastIndex = 0;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const 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 const lastChar = candidate.charCodeAt(length - 1);\n const isLastCharSurrogatePair = lastChar >= 0xd800 && lastChar <= 0xdbff;\n const correctedLength = isLastCharSurrogatePair ? length + 1 : length;\n if (candidate.length <= correctedLength) {\n return candidate;\n }\n return `${candidate.slice(0, correctedLength)}${suffix}`;\n}",
393
+ "originalLength": 1711,
394
+ "removedExports": [],
395
+ "renderedExports": [
396
+ "generateUUID",
397
+ "findCommaSeparatedValue",
398
+ "findCommaSeparatedValues",
399
+ "safeTruncate"
400
+ ],
401
+ "renderedLength": 1643
402
+ },
403
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/browserDetection.js": {
404
+ "code": "function isChromium() {\n return detectBrowserCached() === 0 /* Browser.CHROMIUM */;\n}\nfunction isSafari() {\n return detectBrowserCached() === 1 /* Browser.SAFARI */;\n}\nlet browserCache;\nfunction detectBrowserCached() {\n return browserCache !== null && browserCache !== void 0 ? browserCache : (browserCache = detectBrowser());\n}\n// Exported only for tests\nfunction detectBrowser(browserWindow = window) {\n var _a;\n const userAgent = browserWindow.navigator.userAgent;\n if (browserWindow.chrome || /HeadlessChrome/.test(userAgent)) {\n return 0 /* 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 1 /* Browser.SAFARI */;\n }\n return 2 /* Browser.OTHER */;\n}",
405
+ "originalLength": 1176,
406
+ "removedExports": [],
407
+ "renderedExports": [
408
+ "isChromium",
409
+ "isSafari",
410
+ "detectBrowser"
411
+ ],
412
+ "renderedLength": 1110
413
+ },
414
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/browser/cookie.js": {
415
+ "code": "function setCookie(name, value, expireDelay = 0, options) {\n const date = new Date();\n date.setTime(date.getTime() + expireDelay);\n const expires = `expires=${date.toUTCString()}`;\n const sameSite = options && options.crossSite ? 'none' : 'strict';\n const domain = options && options.domain ? `;domain=${options.domain}` : '';\n const secure = options && options.secure ? ';secure' : '';\n const partitioned = options && options.partitioned ? ';partitioned' : '';\n document.cookie = `${name}=${value};${expires};path=/;samesite=${sameSite}${domain}${secure}${partitioned}`;\n}\nfunction getCookie(name) {\n return findCommaSeparatedValue(document.cookie, name);\n}\nlet 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 = findCommaSeparatedValues(document.cookie);\n }\n return initCookieParsed.get(name);\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 const testCookieName = `dd_cookie_test_${generateUUID()}`;\n const testCookieValue = 'test';\n setCookie(testCookieName, testCookieValue, ONE_MINUTE, options);\n const isCookieCorrectlySet = getCookie(testCookieName) === testCookieValue;\n deleteCookie(testCookieName, options);\n return isCookieCorrectlySet;\n }\n catch (error) {\n 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 */\nlet 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 const testCookieName = `dd_site_test_${generateUUID()}`;\n const testCookieValue = 'test';\n const domainLevels = window.location.hostname.split('.');\n let candidateDomain = domainLevels.pop();\n while (domainLevels.length && !getCookie(testCookieName)) {\n candidateDomain = `${domainLevels.pop()}.${candidateDomain}`;\n setCookie(testCookieName, testCookieValue, ONE_SECOND, { domain: candidateDomain });\n }\n deleteCookie(testCookieName, { domain: candidateDomain });\n getCurrentSiteCache = candidateDomain;\n }\n return getCurrentSiteCache;\n}",
416
+ "originalLength": 3286,
417
+ "removedExports": [
418
+ "resetInitCookies"
419
+ ],
420
+ "renderedExports": [
421
+ "setCookie",
422
+ "getCookie",
423
+ "getInitCookie",
424
+ "deleteCookie",
425
+ "areCookiesAuthorized",
426
+ "getCurrentSite"
427
+ ],
428
+ "renderedLength": 2915
429
+ },
430
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionStoreStrategy.js": {
431
+ "code": "const SESSION_STORE_KEY = '_dd_s';",
432
+ "originalLength": 90,
433
+ "removedExports": [],
434
+ "renderedExports": [
435
+ "SESSION_STORE_KEY"
436
+ ],
437
+ "renderedLength": 34
438
+ },
439
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/polyfills.js": {
440
+ "code": "function findLast(array, predicate) {\n for (let i = array.length - 1; i >= 0; i -= 1) {\n const item = array[i];\n if (predicate(item, i, array)) {\n return item;\n }\n }\n return undefined;\n}\n// Keep the following wrapper functions as it can be mangled and will result in smaller bundle size that using\n// the native Object.values and Object.entries directly\nfunction objectValues(object) {\n return Object.values(object);\n}\nfunction objectEntries(object) {\n return Object.entries(object);\n}",
441
+ "originalLength": 591,
442
+ "removedExports": [],
443
+ "renderedExports": [
444
+ "findLast",
445
+ "objectValues",
446
+ "objectEntries"
447
+ ],
448
+ "renderedLength": 532
449
+ },
450
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/user/user.types.js": {
451
+ "code": null,
452
+ "originalLength": 49,
453
+ "removedExports": [],
454
+ "renderedExports": [],
455
+ "renderedLength": 0
456
+ },
457
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/typeUtils.js": {
458
+ "code": "/**\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}",
459
+ "originalLength": 299,
460
+ "removedExports": [],
461
+ "renderedExports": [
462
+ "getType"
463
+ ],
464
+ "renderedLength": 254
465
+ },
466
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/user/user.js": {
467
+ "code": "/**\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 const user = { ...newUser };\n const keys = ['id', 'name', 'email'];\n keys.forEach((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 const isValid = getType(newUser) === 'object';\n if (!isValid) {\n display.error('Unsupported user:', newUser);\n }\n return isValid;\n}\nfunction generateAnonymousId() {\n return Math.floor(Math.random() * Math.pow(36, 10))\n .toString(36)\n .padStart(10, '0');\n}",
468
+ "originalLength": 1121,
469
+ "removedExports": [],
470
+ "renderedExports": [
471
+ "sanitizeUser",
472
+ "checkUser",
473
+ "generateAnonymousId"
474
+ ],
475
+ "renderedLength": 965
476
+ },
477
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/user/index.js": {
478
+ "code": null,
479
+ "originalLength": 87,
480
+ "removedExports": [],
481
+ "renderedExports": [],
482
+ "renderedLength": 0
483
+ },
484
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/sessionConstants.js": {
485
+ "code": "const SESSION_TIME_OUT_DELAY = 4 * ONE_HOUR;\nconst SESSION_EXPIRATION_DELAY = 15 * ONE_MINUTE;\nconst SESSION_COOKIE_EXPIRATION_DELAY = ONE_YEAR;\nconst SessionPersistence = {\n COOKIE: 'cookie',\n LOCAL_STORAGE: 'local-storage',\n};",
486
+ "originalLength": 385,
487
+ "removedExports": [],
488
+ "renderedExports": [
489
+ "SESSION_TIME_OUT_DELAY",
490
+ "SESSION_EXPIRATION_DELAY",
491
+ "SESSION_COOKIE_EXPIRATION_DELAY",
492
+ "SessionPersistence"
493
+ ],
494
+ "renderedLength": 234
495
+ },
496
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/sessionStateValidation.js": {
497
+ "code": "const SESSION_ENTRY_REGEXP = /^([a-zA-Z]+)=([a-z0-9-]+)$/;\nconst SESSION_ENTRY_SEPARATOR = '&';\nfunction isValidSessionString(sessionString) {\n return (!!sessionString &&\n (sessionString.indexOf(SESSION_ENTRY_SEPARATOR) !== -1 || SESSION_ENTRY_REGEXP.test(sessionString)));\n}",
498
+ "originalLength": 357,
499
+ "removedExports": [],
500
+ "renderedExports": [
501
+ "SESSION_ENTRY_REGEXP",
502
+ "SESSION_ENTRY_SEPARATOR",
503
+ "isValidSessionString"
504
+ ],
505
+ "renderedLength": 285
506
+ },
507
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/sessionState.js": {
508
+ "code": "const EXPIRED = '1';\nfunction getExpiredSessionState(previousSessionState, configuration) {\n const expiredSessionState = {\n isExpired: EXPIRED,\n };\n if (configuration.trackAnonymousUser) {\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 = generateAnonymousId();\n }\n }\n return expiredSessionState;\n}\nfunction isSessionInNotStartedState(session) {\n return 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 || dateNow() - Number(sessionState.created) < SESSION_TIME_OUT_DELAY) &&\n (sessionState.expire === undefined || dateNow() < Number(sessionState.expire)));\n}\nfunction expandSessionState(session) {\n session.expire = String(dateNow() + SESSION_EXPIRATION_DELAY);\n}\nfunction toSessionString(session) {\n return (objectEntries(session)\n // we use `aid` as a key for anonymousId\n .map(([key, value]) => (key === 'anonymousId' ? `aid=${value}` : `${key}=${value}`))\n .join(SESSION_ENTRY_SEPARATOR));\n}\nfunction toSessionState(sessionString) {\n const session = {};\n if (isValidSessionString(sessionString)) {\n sessionString.split(SESSION_ENTRY_SEPARATOR).forEach((entry) => {\n const matches = SESSION_ENTRY_REGEXP.exec(entry);\n if (matches !== null) {\n const [, key, value] = matches;\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}",
509
+ "originalLength": 2943,
510
+ "removedExports": [],
511
+ "renderedExports": [
512
+ "EXPIRED",
513
+ "getExpiredSessionState",
514
+ "isSessionInNotStartedState",
515
+ "isSessionStarted",
516
+ "isSessionInExpiredState",
517
+ "expandSessionState",
518
+ "toSessionString",
519
+ "toSessionState"
520
+ ],
521
+ "renderedLength": 2421
522
+ },
523
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/oldCookiesMigration.js": {
524
+ "code": "const OLD_SESSION_COOKIE_NAME = '_dd';\nconst OLD_RUM_COOKIE_NAME = '_dd_r';\nconst OLD_LOGS_COOKIE_NAME = '_dd_l';\n// duplicate values to avoid dependency issues\nconst RUM_SESSION_KEY$1 = 'rum';\nconst 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 const sessionString = getInitCookie(SESSION_STORE_KEY);\n if (!sessionString) {\n const oldSessionId = getInitCookie(OLD_SESSION_COOKIE_NAME);\n const oldRumType = getInitCookie(OLD_RUM_COOKIE_NAME);\n const oldLogsType = getInitCookie(OLD_LOGS_COOKIE_NAME);\n const session = {};\n if (oldSessionId) {\n session.id = oldSessionId;\n }\n if (oldLogsType && /^[01]$/.test(oldLogsType)) {\n session[LOGS_SESSION_KEY] = oldLogsType;\n }\n if (oldRumType && /^[012]$/.test(oldRumType)) {\n session[RUM_SESSION_KEY$1] = oldRumType;\n }\n if (isSessionStarted(session)) {\n expandSessionState(session);\n cookieStoreStrategy.persistSession(session);\n }\n }\n}",
525
+ "originalLength": 1547,
526
+ "removedExports": [],
527
+ "renderedExports": [
528
+ "OLD_SESSION_COOKIE_NAME",
529
+ "OLD_RUM_COOKIE_NAME",
530
+ "OLD_LOGS_COOKIE_NAME",
531
+ "RUM_SESSION_KEY",
532
+ "LOGS_SESSION_KEY",
533
+ "tryOldCookiesMigration"
534
+ ],
535
+ "renderedLength": 1260
536
+ },
537
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionInCookie.js": {
538
+ "code": "function selectCookieStrategy(initConfiguration) {\n const cookieOptions = buildCookieOptions(initConfiguration);\n return areCookiesAuthorized(cookieOptions) ? { type: SessionPersistence.COOKIE, cookieOptions } : undefined;\n}\nfunction initCookieStrategy(configuration, cookieOptions) {\n const 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: isChromium(),\n persistSession: persistSessionCookie(cookieOptions),\n retrieveSession: retrieveSessionCookie,\n expireSession: (sessionState) => expireSessionCookie(cookieOptions, sessionState, configuration),\n };\n tryOldCookiesMigration(cookieStore);\n return cookieStore;\n}\nfunction persistSessionCookie(options) {\n return (session) => {\n setCookie(SESSION_STORE_KEY, toSessionString(session), SESSION_EXPIRATION_DELAY, options);\n };\n}\nfunction expireSessionCookie(options, sessionState, configuration) {\n const expiredSessionState = getExpiredSessionState(sessionState, configuration);\n // we do not extend cookie expiration date\n setCookie(SESSION_STORE_KEY, toSessionString(expiredSessionState), configuration.trackAnonymousUser ? SESSION_COOKIE_EXPIRATION_DELAY : SESSION_TIME_OUT_DELAY, options);\n}\nfunction retrieveSessionCookie() {\n const sessionString = getCookie(SESSION_STORE_KEY);\n const sessionState = toSessionState(sessionString);\n return sessionState;\n}\nfunction buildCookieOptions(initConfiguration) {\n const cookieOptions = {};\n cookieOptions.secure =\n !!initConfiguration.useSecureSessionCookie || !!initConfiguration.usePartitionedCrossSiteSessionCookie;\n cookieOptions.crossSite = !!initConfiguration.usePartitionedCrossSiteSessionCookie;\n cookieOptions.partitioned = !!initConfiguration.usePartitionedCrossSiteSessionCookie;\n if (initConfiguration.trackSessionAcrossSubdomains) {\n cookieOptions.domain = getCurrentSite();\n }\n return cookieOptions;\n}",
539
+ "originalLength": 2724,
540
+ "removedExports": [],
541
+ "renderedExports": [
542
+ "selectCookieStrategy",
543
+ "initCookieStrategy",
544
+ "buildCookieOptions"
545
+ ],
546
+ "renderedLength": 2131
547
+ },
548
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/storeStrategies/sessionInLocalStorage.js": {
549
+ "code": "const LOCAL_STORAGE_TEST_KEY = '_dd_test_';\nfunction selectLocalStorageStrategy() {\n try {\n const id = generateUUID();\n const testKey = `${LOCAL_STORAGE_TEST_KEY}${id}`;\n localStorage.setItem(testKey, id);\n const retrievedId = localStorage.getItem(testKey);\n localStorage.removeItem(testKey);\n return id === retrievedId ? { type: SessionPersistence.LOCAL_STORAGE } : undefined;\n }\n catch (_a) {\n return undefined;\n }\n}\nfunction initLocalStorageStrategy(configuration) {\n return {\n isLockEnabled: false,\n persistSession: persistInLocalStorage,\n retrieveSession: retrieveSessionFromLocalStorage,\n expireSession: (sessionState) => expireSessionFromLocalStorage(sessionState, configuration),\n };\n}\nfunction persistInLocalStorage(sessionState) {\n localStorage.setItem(SESSION_STORE_KEY, toSessionString(sessionState));\n}\nfunction retrieveSessionFromLocalStorage() {\n const sessionString = localStorage.getItem(SESSION_STORE_KEY);\n return toSessionState(sessionString);\n}\nfunction expireSessionFromLocalStorage(previousSessionState, configuration) {\n persistInLocalStorage(getExpiredSessionState(previousSessionState, configuration));\n}",
550
+ "originalLength": 1575,
551
+ "removedExports": [],
552
+ "renderedExports": [
553
+ "selectLocalStorageStrategy",
554
+ "initLocalStorageStrategy"
555
+ ],
556
+ "renderedLength": 1237
557
+ },
558
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/sessionStoreOperations.js": {
559
+ "code": "const LOCK_RETRY_DELAY = 10;\nconst LOCK_MAX_TRIES = 100;\nconst bufferedOperations = [];\nlet ongoingOperations;\nfunction processSessionStoreOperations(operations, sessionStoreStrategy, numberOfRetries = 0) {\n var _a;\n const { isLockEnabled, persistSession, expireSession } = sessionStoreStrategy;\n const persistWithLock = (session) => persistSession({ ...session, lock: currentLock });\n const retrieveStore = () => {\n const session = sessionStoreStrategy.retrieveSession();\n const lock = session.lock;\n if (session.lock) {\n delete session.lock;\n }\n return {\n session,\n 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 >= LOCK_MAX_TRIES) {\n next(sessionStoreStrategy);\n return;\n }\n let currentLock;\n let 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 = 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 let 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 (isSessionInExpiredState(processedSession)) {\n expireSession(processedSession);\n }\n else {\n 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 && 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 setTimeout(() => {\n processSessionStoreOperations(operations, sessionStore, currentNumberOfRetries + 1);\n }, LOCK_RETRY_DELAY);\n}\nfunction next(sessionStore) {\n ongoingOperations = undefined;\n const nextOperations = bufferedOperations.shift();\n if (nextOperations) {\n processSessionStoreOperations(nextOperations, sessionStore);\n }\n}",
560
+ "originalLength": 4122,
561
+ "removedExports": [],
562
+ "renderedExports": [
563
+ "LOCK_RETRY_DELAY",
564
+ "LOCK_MAX_TRIES",
565
+ "processSessionStoreOperations"
566
+ ],
567
+ "renderedLength": 3862
568
+ },
569
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/sessionStore.js": {
570
+ "code": "/**\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 */\nconst STORAGE_POLL_DELAY = 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 SessionPersistence.COOKIE:\n return selectCookieStrategy(initConfiguration);\n case SessionPersistence.LOCAL_STORAGE:\n return selectLocalStorageStrategy();\n case undefined: {\n let sessionStoreStrategyType = selectCookieStrategy(initConfiguration);\n if (!sessionStoreStrategyType && initConfiguration.allowFallbackToLocalStorage) {\n sessionStoreStrategyType = selectLocalStorageStrategy();\n }\n return sessionStoreStrategyType;\n }\n default:\n display.error(`Invalid session persistence '${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, configuration, productKey, computeSessionState) {\n const renewObservable = new Observable();\n const expireObservable = new Observable();\n const sessionStateUpdateObservable = new Observable();\n const sessionStoreStrategy = sessionStoreStrategyType.type === SessionPersistence.COOKIE\n ? initCookieStrategy(configuration, sessionStoreStrategyType.cookieOptions)\n : initLocalStorageStrategy(configuration);\n const { expireSession } = sessionStoreStrategy;\n const watchSessionTimeoutId = setInterval(watchSession, STORAGE_POLL_DELAY);\n let sessionCache;\n startSession();\n const { throttled: throttledExpandOrRenewSession, cancel: cancelExpandOrRenewSession } = throttle(() => {\n processSessionStoreOperations({\n process: (sessionState) => {\n if (isSessionInNotStartedState(sessionState)) {\n return;\n }\n const synchronizedSession = synchronizeSession(sessionState);\n expandOrRenewSessionState(synchronizedSession);\n return synchronizedSession;\n },\n after: (sessionState) => {\n if (isSessionStarted(sessionState) && !hasSessionInCache()) {\n renewSessionInCache(sessionState);\n }\n sessionCache = sessionState;\n },\n }, sessionStoreStrategy);\n }, STORAGE_POLL_DELAY);\n function expandSession() {\n processSessionStoreOperations({\n process: (sessionState) => (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 processSessionStoreOperations({\n process: (sessionState) => isSessionInExpiredState(sessionState) ? getExpiredSessionState(sessionState, configuration) : undefined,\n after: synchronizeSession,\n }, sessionStoreStrategy);\n }\n function synchronizeSession(sessionState) {\n if (isSessionInExpiredState(sessionState)) {\n sessionState = getExpiredSessionState(sessionState, configuration);\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 processSessionStoreOperations({\n process: (sessionState) => {\n if (isSessionInNotStartedState(sessionState)) {\n return getExpiredSessionState(sessionState, configuration);\n }\n },\n after: (sessionState) => {\n sessionCache = sessionState;\n },\n }, sessionStoreStrategy);\n }\n function expandOrRenewSessionState(sessionState) {\n if (isSessionInNotStartedState(sessionState)) {\n return false;\n }\n const { trackingType, isTracked } = computeSessionState(sessionState[productKey]);\n sessionState[productKey] = trackingType;\n delete sessionState.isExpired;\n if (isTracked && !sessionState.id) {\n sessionState.id = generateUUID();\n sessionState.created = String(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 = getExpiredSessionState(sessionCache, configuration);\n expireObservable.notify();\n }\n function renewSessionInCache(sessionState) {\n sessionCache = sessionState;\n renewObservable.notify();\n }\n function updateSessionState(partialSessionState) {\n processSessionStoreOperations({\n process: (sessionState) => ({ ...sessionState, ...partialSessionState }),\n after: synchronizeSession,\n }, sessionStoreStrategy);\n }\n return {\n expandOrRenewSession: throttledExpandOrRenewSession,\n expandSession,\n getSession: () => sessionCache,\n renewObservable,\n expireObservable,\n sessionStateUpdateObservable,\n restartSession: startSession,\n expire: () => {\n cancelExpandOrRenewSession();\n expireSession(sessionCache);\n synchronizeSession(getExpiredSessionState(sessionCache, configuration));\n },\n stop: () => {\n clearInterval(watchSessionTimeoutId);\n },\n updateSessionState,\n };\n}",
571
+ "originalLength": 7453,
572
+ "removedExports": [],
573
+ "renderedExports": [
574
+ "STORAGE_POLL_DELAY",
575
+ "selectSessionStoreStrategyType",
576
+ "startSessionStore"
577
+ ],
578
+ "renderedLength": 6572
579
+ },
580
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/trackingConsent.js": {
581
+ "code": "const TrackingConsent = {\n GRANTED: 'granted',\n NOT_GRANTED: 'not-granted',\n};\nfunction createTrackingConsentState(currentConsent) {\n const observable = new Observable();\n return {\n tryToInit(trackingConsent) {\n if (!currentConsent) {\n currentConsent = trackingConsent;\n }\n },\n update(trackingConsent) {\n currentConsent = trackingConsent;\n observable.notify();\n },\n isGranted() {\n return currentConsent === TrackingConsent.GRANTED;\n },\n observable,\n };\n}",
582
+ "originalLength": 696,
583
+ "removedExports": [],
584
+ "renderedExports": [
585
+ "TrackingConsent",
586
+ "createTrackingConsentState"
587
+ ],
588
+ "renderedLength": 588
589
+ },
590
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/serialisation/jsonStringify.js": {
591
+ "code": "/**\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 const restoreObjectPrototypeToJson = detachToJsonMethod(Object.prototype);\n const restoreArrayPrototypeToJson = detachToJsonMethod(Array.prototype);\n const restoreValuePrototypeToJson = detachToJsonMethod(Object.getPrototypeOf(value));\n const restoreValueToJson = detachToJsonMethod(value);\n try {\n return JSON.stringify(value, replacer, space);\n }\n catch (_a) {\n return '<error: unable to serialize object>';\n }\n finally {\n restoreObjectPrototypeToJson();\n restoreArrayPrototypeToJson();\n restoreValuePrototypeToJson();\n restoreValueToJson();\n }\n}\nfunction detachToJsonMethod(value) {\n const object = value;\n const objectToJson = object.toJSON;\n if (objectToJson) {\n delete object.toJSON;\n return () => {\n object.toJSON = objectToJson;\n };\n }\n return noop;\n}",
592
+ "originalLength": 1663,
593
+ "removedExports": [],
594
+ "renderedExports": [
595
+ "jsonStringify",
596
+ "detachToJsonMethod"
597
+ ],
598
+ "renderedLength": 1560
599
+ },
600
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/urlPolyfill.js": {
601
+ "code": "function 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 const pathname = buildUrl(url).pathname;\n return pathname[0] === '/' ? pathname : `/${pathname}`;\n}\nfunction buildUrl(url, base) {\n const 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: ${String(error)} ${jsonStringify({ url, base })}`);\n }\n }\n if (base === undefined && !/:/.test(url)) {\n throw new Error(`Invalid URL: '${url}'`);\n }\n let doc = document;\n const anchorElement = doc.createElement('a');\n if (base !== undefined) {\n doc = document.implementation.createHTMLDocument('');\n const 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}\nconst originalURL = URL;\nlet isURLSupported;\nfunction getSupportedUrl() {\n if (isURLSupported === undefined) {\n try {\n const 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}",
602
+ "originalLength": 1726,
603
+ "removedExports": [],
604
+ "renderedExports": [
605
+ "normalizeUrl",
606
+ "isValidUrl",
607
+ "getPathName",
608
+ "buildUrl"
609
+ ],
610
+ "renderedLength": 1594
611
+ },
612
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/configuration/intakeSites.js": {
613
+ "code": "const INTAKE_SITE_STAGING = 'datad0g.com';\nconst INTAKE_SITE_FED_STAGING = 'dd0g-gov.com';\nconst INTAKE_SITE_US1 = 'datadoghq.com';\nconst INTAKE_SITE_EU1 = 'datadoghq.eu';\nconst INTAKE_SITE_US1_FED = 'ddog-gov.com';\nconst PCI_INTAKE_HOST_US1 = 'pci.browser-intake-datadoghq.com';\nconst INTAKE_URL_PARAMETERS = ['ddsource', 'ddtags'];",
614
+ "originalLength": 422,
615
+ "removedExports": [],
616
+ "renderedExports": [
617
+ "INTAKE_SITE_STAGING",
618
+ "INTAKE_SITE_FED_STAGING",
619
+ "INTAKE_SITE_US1",
620
+ "INTAKE_SITE_EU1",
621
+ "INTAKE_SITE_US1_FED",
622
+ "PCI_INTAKE_HOST_US1",
623
+ "INTAKE_URL_PARAMETERS"
624
+ ],
625
+ "renderedLength": 333
626
+ },
627
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/configuration/endpointBuilder.js": {
628
+ "code": "function createEndpointBuilder(initConfiguration, trackType, configurationTags) {\n const buildUrlWithParameters = createEndpointUrlWithParametersBuilder(initConfiguration, trackType);\n return {\n build(api, payload) {\n const parameters = buildEndpointParameters(initConfiguration, trackType, configurationTags, api, payload);\n return buildUrlWithParameters(parameters);\n },\n urlPrefix: buildUrlWithParameters(''),\n 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 const path = `/api/v2/${trackType}`;\n const proxy = initConfiguration.proxy;\n if (typeof proxy === 'string') {\n const normalizedProxyUrl = normalizeUrl(proxy);\n return (parameters) => `${normalizedProxyUrl}?ddforward=${encodeURIComponent(`${path}?${parameters}`)}`;\n }\n if (typeof proxy === 'function') {\n return (parameters) => proxy({ path, parameters });\n }\n const host = buildEndpointHost(trackType, initConfiguration);\n return (parameters) => `https://${host}${path}?${parameters}`;\n}\nfunction buildEndpointHost(trackType, initConfiguration) {\n const { site = INTAKE_SITE_US1, internalAnalyticsSubdomain } = initConfiguration;\n if (trackType === 'logs' && initConfiguration.usePciIntake && site === INTAKE_SITE_US1) {\n return PCI_INTAKE_HOST_US1;\n }\n if (internalAnalyticsSubdomain && site === INTAKE_SITE_US1) {\n return `${internalAnalyticsSubdomain}.${INTAKE_SITE_US1}`;\n }\n if (site === INTAKE_SITE_FED_STAGING) {\n return `http-intake.logs.${site}`;\n }\n const domainParts = site.split('.');\n const extension = domainParts.pop();\n return `browser-intake-${domainParts.join('-')}.${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({ clientToken, internalAnalyticsSubdomain }, trackType, configurationTags, api, { retry, encoding }) {\n const tags = [`sdk_version:${\"6.0.0\"}`, `api:${api}`].concat(configurationTags);\n if (retry) {\n tags.push(`retry_count:${retry.count}`, `retry_after:${retry.lastFailureStatus}`);\n }\n const parameters = [\n 'ddsource=browser',\n `ddtags=${encodeURIComponent(tags.join(','))}`,\n `dd-api-key=${clientToken}`,\n `dd-evp-origin-version=${encodeURIComponent(\"6.0.0\")}`,\n 'dd-evp-origin=browser',\n `dd-request-id=${generateUUID()}`,\n ];\n if (encoding) {\n parameters.push(`dd-evp-encoding=${encoding}`);\n }\n if (trackType === 'rum') {\n parameters.push(`batch_time=${timeStampNow()}`);\n }\n if (internalAnalyticsSubdomain) {\n parameters.reverse();\n }\n return parameters.join('&');\n}",
629
+ "originalLength": 3395,
630
+ "removedExports": [],
631
+ "renderedExports": [
632
+ "createEndpointBuilder"
633
+ ],
634
+ "renderedLength": 3065
635
+ },
636
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/configuration/tags.js": {
637
+ "code": "const TAG_SIZE_LIMIT = 200;\nfunction buildTags(configuration) {\n const { env, service, version, datacenter } = configuration;\n const 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 const valueSizeLimit = TAG_SIZE_LIMIT - key.length - 1;\n if (rawValue.length > valueSizeLimit || hasForbiddenCharacters(rawValue)) {\n display.warn(`${key} value doesn't meet tag requirements and will be sanitized. ${MORE_DETAILS} ${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 const sanitizedValue = rawValue.replace(/,/g, '_');\n return `${key}:${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 support for Chrome 63 and Firefox 67\n // see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Unicode_character_class_escape#browser_compatibility\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}",
638
+ "originalLength": 2529,
639
+ "removedExports": [],
640
+ "renderedExports": [
641
+ "TAG_SIZE_LIMIT",
642
+ "buildTags",
643
+ "buildTag",
644
+ "supportUnicodePropertyEscapes"
645
+ ],
646
+ "renderedLength": 2394
647
+ },
648
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/configuration/transportConfiguration.js": {
649
+ "code": "function computeTransportConfiguration(initConfiguration) {\n const site = initConfiguration.site || INTAKE_SITE_US1;\n const tags = buildTags(initConfiguration);\n const endpointBuilders = computeEndpointBuilders(initConfiguration, tags);\n const replicaConfiguration = computeReplicaConfiguration(initConfiguration, tags);\n return {\n replica: replicaConfiguration,\n site,\n ...endpointBuilders,\n };\n}\nfunction computeEndpointBuilders(initConfiguration, tags) {\n return {\n logsEndpointBuilder: createEndpointBuilder(initConfiguration, 'logs', tags),\n rumEndpointBuilder: createEndpointBuilder(initConfiguration, 'rum', tags),\n sessionReplayEndpointBuilder: createEndpointBuilder(initConfiguration, 'replay', tags),\n };\n}\nfunction computeReplicaConfiguration(initConfiguration, tags) {\n if (!initConfiguration.replica) {\n return;\n }\n const replicaConfiguration = {\n ...initConfiguration,\n site: INTAKE_SITE_US1,\n clientToken: initConfiguration.replica.clientToken,\n };\n const replicaEndpointBuilders = {\n logsEndpointBuilder: createEndpointBuilder(replicaConfiguration, 'logs', tags),\n rumEndpointBuilder: createEndpointBuilder(replicaConfiguration, 'rum', tags),\n };\n return { applicationId: initConfiguration.replica.applicationId, ...replicaEndpointBuilders };\n}\nfunction isIntakeUrl(url) {\n // check if tags is present in the query string\n return INTAKE_URL_PARAMETERS.every((param) => url.includes(param));\n}",
650
+ "originalLength": 1775,
651
+ "removedExports": [],
652
+ "renderedExports": [
653
+ "computeTransportConfiguration",
654
+ "isIntakeUrl"
655
+ ],
656
+ "renderedLength": 1543
657
+ },
658
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/configuration/configuration.js": {
659
+ "code": "const DefaultPrivacyLevel = {\n ALLOW: 'allow',\n MASK: 'mask',\n MASK_USER_INPUT: 'mask-user-input',\n};\nconst TraceContextInjection = {\n ALL: 'all',\n SAMPLED: 'sampled',\n};\nfunction isString(tag, tagName) {\n if (tag !== undefined && tag !== null && typeof tag !== 'string') {\n display.error(`${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.error(`Site should be a valid Datadog site. ${MORE_DETAILS} ${DOCS_ORIGIN}/getting_started/site/.`);\n return false;\n }\n return true;\n}\nfunction isSampleRate(sampleRate, name) {\n if (sampleRate !== undefined && !isPercentage(sampleRate)) {\n display.error(`${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, _f;\n if (!initConfiguration || !initConfiguration.clientToken) {\n 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 !objectHasValue(TrackingConsent, initConfiguration.trackingConsent)) {\n display.error('Tracking Consent should be either \"granted\" or \"not-granted\"');\n return;\n }\n return {\n beforeSend: initConfiguration.beforeSend && catchUserErrors(initConfiguration.beforeSend, 'beforeSend threw an error:'),\n sessionStoreStrategyType: 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.GRANTED,\n trackAnonymousUser: (_f = initConfiguration.trackAnonymousUser) !== null && _f !== void 0 ? _f : true,\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 * 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 * ONE_SECOND),\n /**\n * Logs intake limit\n */\n batchMessagesLimit: 50,\n messageBytesLimit: 256 * ONE_KIBI_BYTE,\n ...computeTransportConfiguration(initConfiguration),\n };\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_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 track_anonymous_user: initConfiguration.trackAnonymousUser,\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}",
660
+ "originalLength": 5843,
661
+ "removedExports": [],
662
+ "renderedExports": [
663
+ "DefaultPrivacyLevel",
664
+ "TraceContextInjection",
665
+ "isSampleRate",
666
+ "validateAndBuildConfiguration",
667
+ "serializeConfiguration"
668
+ ],
669
+ "renderedLength": 5182
670
+ },
671
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/configuration/index.js": {
672
+ "code": null,
673
+ "originalLength": 358,
674
+ "removedExports": [],
675
+ "renderedExports": [],
676
+ "renderedLength": 0
677
+ },
678
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/experimentalFeatures.js": {
679
+ "code": "/**\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\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[\"ACTION_NAME_MASKING\"] = \"action_name_masking\";\n ExperimentalFeature[\"CONSISTENT_TRACE_SAMPLING\"] = \"consistent_trace_sampling\";\n ExperimentalFeature[\"DELAY_VIEWPORT_COLLECTION\"] = \"delay_viewport_collection\";\n})(ExperimentalFeature || (ExperimentalFeature = {}));\nconst enabledExperimentalFeatures = new Set();\nfunction initFeatureFlags(enableExperimentalFeatures) {\n if (Array.isArray(enableExperimentalFeatures)) {\n addExperimentalFeatures(enableExperimentalFeatures.filter((flag) => objectHasValue(ExperimentalFeature, flag)));\n }\n}\nfunction addExperimentalFeatures(enabledFeatures) {\n enabledFeatures.forEach((flag) => {\n enabledExperimentalFeatures.add(flag);\n });\n}\nfunction isExperimentalFeatureEnabled(featureName) {\n return enabledExperimentalFeatures.has(featureName);\n}\nfunction getExperimentalFeatures() {\n return enabledExperimentalFeatures;\n}",
680
+ "originalLength": 1922,
681
+ "removedExports": [
682
+ "resetExperimentalFeatures"
683
+ ],
684
+ "renderedExports": [
685
+ "ExperimentalFeature",
686
+ "initFeatureFlags",
687
+ "addExperimentalFeatures",
688
+ "isExperimentalFeatureEnabled",
689
+ "getExperimentalFeatures"
690
+ ],
691
+ "renderedLength": 1695
692
+ },
693
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/stackTrace/computeStackTrace.js": {
694
+ "code": "/**\n * Cross-browser stack trace computation.\n *\n * Reference implementation: https://github.com/csnover/TraceKit/blob/04530298073c3823de72deb0b97e7b38ca7bcb59/tracekit.js\n */\nconst UNKNOWN_FUNCTION = '?';\nfunction computeStackTrace(ex) {\n const stack = [];\n let stackProperty = tryToGetString(ex, 'stack');\n const exString = String(ex);\n if (stackProperty && stackProperty.startsWith(exString)) {\n stackProperty = stackProperty.slice(exString.length);\n }\n if (stackProperty) {\n stackProperty.split('\\n').forEach((line) => {\n const 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,\n };\n}\nconst fileUrl = '((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\\\w+\\\\.|\\\\/).*?)';\nconst filePosition = '(?::(\\\\d+))';\nconst CHROME_LINE_RE = new RegExp(`^\\\\s*at (.*?) ?\\\\(${fileUrl}${filePosition}?${filePosition}?\\\\)?\\\\s*$`, 'i');\nconst CHROME_EVAL_RE = new RegExp(`\\\\((\\\\S*)${filePosition}${filePosition}\\\\)`);\nfunction parseChromeLine(line) {\n const parts = CHROME_LINE_RE.exec(line);\n if (!parts) {\n return;\n }\n const isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n const isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n const 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}\nconst CHROME_ANONYMOUS_FUNCTION_RE = new RegExp(`^\\\\s*at ?${fileUrl}${filePosition}?${filePosition}??\\\\s*$`, 'i');\nfunction parseChromeAnonymousLine(line) {\n const 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}\nconst WINJS_LINE_RE = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nfunction parseWinLine(line) {\n const 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}\nconst GECKO_LINE_RE = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst GECKO_EVAL_RE = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nfunction parseGeckoLine(line) {\n const parts = GECKO_LINE_RE.exec(line);\n if (!parts) {\n return;\n }\n const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n const 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 const value = candidate[property];\n return typeof value === 'string' ? value : undefined;\n}\nfunction computeStackTraceFromOnErrorMessage(messageObj, url, line, column) {\n const stack = [{ url, column, line }];\n const { name, message } = tryToParseMessage(messageObj);\n return {\n name,\n message,\n stack,\n };\n}\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error#Error_types\nconst ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\\s\\S]*)$/;\nfunction tryToParseMessage(messageObj) {\n let name;\n let message;\n if ({}.toString.call(messageObj) === '[object String]') {\n [, name, message] = ERROR_TYPES_RE.exec(messageObj);\n }\n return { name, message };\n}",
695
+ "originalLength": 5078,
696
+ "removedExports": [],
697
+ "renderedExports": [
698
+ "computeStackTrace",
699
+ "computeStackTraceFromOnErrorMessage"
700
+ ],
701
+ "renderedLength": 5008
702
+ },
703
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/stackTrace/handlingStack.js": {
704
+ "code": "/**\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 const internalFramesToSkip = 2;\n const error = new Error();\n let formattedStack;\n callMonitored(() => {\n const stackTrace = computeStackTrace(error);\n stackTrace.stack = stackTrace.stack.slice(internalFramesToSkip);\n formattedStack = toStackTraceString(stackTrace);\n });\n return formattedStack;\n}\nfunction toStackTraceString(stack) {\n let result = formatErrorMessage(stack);\n stack.stack.forEach((frame) => {\n const func = frame.func === '?' ? '<anonymous>' : frame.func;\n const args = frame.args && frame.args.length > 0 ? `(${frame.args.join(', ')})` : '';\n const line = frame.line ? `:${frame.line}` : '';\n const column = frame.line && frame.column ? `:${frame.column}` : '';\n result += `\\n at ${func}${args} @ ${frame.url}${line}${column}`;\n });\n return result;\n}\nfunction formatErrorMessage(stack) {\n return `${stack.name || 'Error'}: ${stack.message}`;\n}",
705
+ "originalLength": 1549,
706
+ "removedExports": [],
707
+ "renderedExports": [
708
+ "createHandlingStack",
709
+ "toStackTraceString",
710
+ "formatErrorMessage"
711
+ ],
712
+ "renderedLength": 1385
713
+ },
714
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/instrumentMethod.js": {
715
+ "code": "/**\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, { computeHandlingStack } = {}) {\n let original = targetPrototype[method];\n if (typeof original !== 'function') {\n if (method in targetPrototype && method.startsWith('on')) {\n original = noop;\n }\n else {\n return { stop: noop };\n }\n }\n let stopped = false;\n const 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 const parameters = Array.from(arguments);\n let postCallCallback;\n callMonitored(onPreCall, null, [\n {\n target: this,\n parameters,\n onPostCall: (callback) => {\n postCallCallback = callback;\n },\n handlingStack: computeHandlingStack ? createHandlingStack() : undefined,\n },\n ]);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n const result = original.apply(this, parameters);\n if (postCallCallback) {\n 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: () => {\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 const originalDescriptor = Object.getOwnPropertyDescriptor(targetPrototype, property);\n if (!originalDescriptor || !originalDescriptor.set || !originalDescriptor.configurable) {\n return { stop: noop };\n }\n const stoppedInstrumentation = noop;\n let instrumentation = (target, value) => {\n // put hooked setter into event loop to avoid of set latency\n setTimeout(() => {\n if (instrumentation !== stoppedInstrumentation) {\n after(target, value);\n }\n }, 0);\n };\n const 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: () => {\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}",
716
+ "originalLength": 4696,
717
+ "removedExports": [],
718
+ "renderedExports": [
719
+ "instrumentMethod",
720
+ "instrumentSetter"
721
+ ],
722
+ "renderedLength": 4444
723
+ },
724
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/serialisation/sanitize.js": {
725
+ "code": "// 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, ...\nconst SANITIZE_DEFAULT_MAX_CHARACTER_COUNT = 220 * ONE_KIBI_BYTE;\n// Symbol for the root element of the JSONPath used for visited objects\nconst 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.\nconst KEY_DECORATION_LENGTH = 3;\nfunction sanitize(source, maxCharacterCount = SANITIZE_DEFAULT_MAX_CHARACTER_COUNT) {\n // Unbind any toJSON function we may have on [] or {} prototypes\n const restoreObjectPrototypeToJson = detachToJsonMethod(Object.prototype);\n const restoreArrayPrototypeToJson = detachToJsonMethod(Array.prototype);\n // Initial call to sanitizeProcessor - will populate containerQueue if source is an Array or a plain Object\n const containerQueue = [];\n const visitedObjectsWithPath = new WeakMap();\n const sanitizedData = sanitizeProcessor(source, JSON_PATH_ROOT_ELEMENT, undefined, containerQueue, visitedObjectsWithPath);\n const serializedSanitizedData = JSON.stringify(sanitizedData);\n let 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 const containerToProcess = containerQueue.shift();\n let 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 (let key = 0; key < containerToProcess.source.length; key++) {\n const 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 containerToProcess.target[key] = targetData;\n }\n }\n else {\n for (const key in containerToProcess.source) {\n if (Object.prototype.hasOwnProperty.call(containerToProcess.source, key)) {\n const 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 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 const sourceToSanitize = tryToApplyToJSON(source);\n if (!sourceToSanitize || typeof sourceToSanitize !== 'object') {\n return sanitizePrimitivesAndFunctions(sourceToSanitize);\n }\n const 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 const sourceAsObject = source;\n if (visitedObjectsWithPath.has(sourceAsObject)) {\n return `[Reference seen at ${visitedObjectsWithPath.get(sourceAsObject)}]`;\n }\n // Add processed source to queue\n const currentPath = key !== undefined ? `${parentPath}.${key}` : parentPath;\n const target = Array.isArray(sourceToSanitize) ? [] : {};\n visitedObjectsWithPath.set(sourceAsObject, currentPath);\n queue.push({ source: sourceToSanitize, 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] ${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] ${value.name || 'unknown'}`;\n }\n // JSON.stringify() does not serialize symbols.\n if (typeof value === 'symbol') {\n return `[Symbol] ${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 */\nfunction sanitizeObjects(value) {\n try {\n if (value instanceof Event) {\n return sanitizeEvent(value);\n }\n if (value instanceof RegExp) {\n return `[RegExp] ${value.toString()}`;\n }\n // Handle all remaining object types in a generic way\n const result = Object.prototype.toString.call(value);\n const match = result.match(/\\[object (.*)\\]/);\n if (match && match[1]) {\n return `[${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}\nfunction sanitizeEvent(event) {\n return {\n type: event.type,\n isTrusted: event.isTrusted,\n currentTarget: event.currentTarget ? sanitizeObjects(event.currentTarget) : null,\n target: event.target ? sanitizeObjects(event.target) : null,\n };\n}\n/**\n * Checks if a toJSON function exists and tries to execute it\n *\n */\nfunction tryToApplyToJSON(value) {\n const 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.warn(`The data provided has been ${changeType} as it is over the limit of ${maxCharacterCount} characters:`, source);\n}",
726
+ "originalLength": 8601,
727
+ "removedExports": [],
728
+ "renderedExports": [
729
+ "sanitize"
730
+ ],
731
+ "renderedLength": 8373
732
+ },
733
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/error/error.js": {
734
+ "code": "const NO_ERROR_STACK_PRESENT_MESSAGE = 'No stack, consider using an instance of Error';\nfunction computeRawError({ stackTrace, originalError, handlingStack, startClocks, nonErrorPrefix, source, handling, }) {\n const isErrorInstance = isError(originalError);\n const message = computeMessage(stackTrace, isErrorInstance, nonErrorPrefix, originalError);\n const stack = hasUsableStack(isErrorInstance, stackTrace)\n ? toStackTraceString(stackTrace)\n : NO_ERROR_STACK_PRESENT_MESSAGE;\n const causes = isErrorInstance ? flattenErrorCauses(originalError, source) : undefined;\n const type = stackTrace ? stackTrace.name : undefined;\n const fingerprint = tryToGetFingerprint(originalError);\n return {\n startClocks,\n source,\n handling,\n handlingStack,\n originalError,\n type,\n message,\n stack,\n causes,\n 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 ? `${nonErrorPrefix} ${jsonStringify(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 isError(error) {\n return error instanceof Error || Object.prototype.toString.call(error) === '[object Error]';\n}\nfunction flattenErrorCauses(error, parentSource) {\n let currentError = error;\n const causes = [];\n while (isError(currentError === null || currentError === void 0 ? void 0 : currentError.cause) && causes.length < 10) {\n const stackTrace = 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 && toStackTraceString(stackTrace),\n });\n currentError = currentError.cause;\n }\n return causes.length ? causes : undefined;\n}",
735
+ "originalLength": 3492,
736
+ "removedExports": [
737
+ "getFileFromStackTraceString"
738
+ ],
739
+ "renderedExports": [
740
+ "NO_ERROR_STACK_PRESENT_MESSAGE",
741
+ "computeRawError",
742
+ "tryToGetFingerprint",
743
+ "isError",
744
+ "flattenErrorCauses"
745
+ ],
746
+ "renderedLength": 2984
747
+ },
748
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/error/error.types.js": {
749
+ "code": "const ErrorSource = {\n AGENT: 'agent',\n CONSOLE: 'console',\n CUSTOM: 'custom',\n LOGGER: 'logger',\n NETWORK: 'network',\n SOURCE: 'source',\n REPORT: 'report',\n};",
750
+ "originalLength": 227,
751
+ "removedExports": [],
752
+ "renderedExports": [
753
+ "ErrorSource"
754
+ ],
755
+ "renderedLength": 180
756
+ },
757
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/error/trackRuntimeError.js": {
758
+ "code": "function trackRuntimeError(errorObservable) {\n const handleRuntimeError = (stackTrace, originalError) => {\n const rawError = computeRawError({\n stackTrace,\n originalError,\n startClocks: clocksNow(),\n nonErrorPrefix: \"Uncaught\" /* NonErrorPrefix.UNCAUGHT */,\n source: ErrorSource.SOURCE,\n handling: \"unhandled\" /* ErrorHandling.UNHANDLED */,\n });\n errorObservable.notify(rawError);\n };\n const { stop: stopInstrumentingOnError } = instrumentOnError(handleRuntimeError);\n const { stop: stopInstrumentingOnUnhandledRejection } = instrumentUnhandledRejection(handleRuntimeError);\n return {\n stop: () => {\n stopInstrumentingOnError();\n stopInstrumentingOnUnhandledRejection();\n },\n };\n}\nfunction instrumentOnError(callback) {\n return instrumentMethod(window, 'onerror', ({ parameters: [messageObj, url, line, column, errorObj] }) => {\n let stackTrace;\n if (isError(errorObj)) {\n stackTrace = computeStackTrace(errorObj);\n }\n else {\n stackTrace = computeStackTraceFromOnErrorMessage(messageObj, url, line, column);\n }\n callback(stackTrace, errorObj !== null && errorObj !== void 0 ? errorObj : messageObj);\n });\n}\nfunction instrumentUnhandledRejection(callback) {\n return instrumentMethod(window, 'onunhandledrejection', ({ parameters: [e] }) => {\n const reason = e.reason || 'Empty reason';\n const stack = computeStackTrace(reason);\n callback(stack, reason);\n });\n}",
759
+ "originalLength": 1998,
760
+ "removedExports": [],
761
+ "renderedExports": [
762
+ "trackRuntimeError",
763
+ "instrumentOnError",
764
+ "instrumentUnhandledRejection"
765
+ ],
766
+ "renderedLength": 1597
767
+ },
768
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/boot/init.js": {
769
+ "code": "function makePublicApi(stub) {\n const publicApi = {\n version: \"6.0.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(callback) {\n callback();\n },\n ...stub,\n };\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() {\n return setDebugMode;\n },\n enumerable: false,\n });\n return publicApi;\n}\nfunction defineGlobal(global, name, api) {\n const existingGlobalVariable = global[name];\n if (existingGlobalVariable && !existingGlobalVariable.q && existingGlobalVariable.version) {\n 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((fn) => catchUserErrors(fn, 'onReady callback threw an error:')());\n }\n}",
770
+ "originalLength": 1471,
771
+ "removedExports": [],
772
+ "renderedExports": [
773
+ "makePublicApi",
774
+ "defineGlobal"
775
+ ],
776
+ "renderedLength": 1271
777
+ },
778
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/boot/displayAlreadyInitializedError.js": {
779
+ "code": "function displayAlreadyInitializedError(sdkName, initConfiguration) {\n if (!initConfiguration.silentMultipleInit) {\n display.error(`${sdkName} is already initialized.`);\n }\n}",
780
+ "originalLength": 297,
781
+ "removedExports": [],
782
+ "renderedExports": [
783
+ "displayAlreadyInitializedError"
784
+ ],
785
+ "renderedLength": 187
786
+ },
787
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/browser/addEventListener.js": {
788
+ "code": "/**\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, { once, capture, passive } = {}) {\n const listenerWithMonitor = monitor((event) => {\n if (!event.isTrusted && !event.__ddIsTrusted && !configuration.allowUntrustedEvents) {\n return;\n }\n if (once) {\n stop();\n }\n listener(event);\n });\n const options = passive ? { capture, passive } : capture;\n // Use the window.EventTarget.prototype when possible to avoid wrong overrides (e.g: https://github.com/salesforce/lwc/issues/1824)\n const listenerTarget = window.EventTarget && eventTarget instanceof EventTarget ? window.EventTarget.prototype : eventTarget;\n const add = getZoneJsOriginalValue(listenerTarget, 'addEventListener');\n eventNames.forEach((eventName) => add.call(eventTarget, eventName, listenerWithMonitor, options));\n function stop() {\n const remove = getZoneJsOriginalValue(listenerTarget, 'removeEventListener');\n eventNames.forEach((eventName) => remove.call(eventTarget, eventName, listenerWithMonitor, options));\n }\n return {\n stop,\n };\n}",
789
+ "originalLength": 2383,
790
+ "removedExports": [],
791
+ "renderedExports": [
792
+ "addEventListener",
793
+ "addEventListeners"
794
+ ],
795
+ "renderedLength": 2206
796
+ },
797
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/report/reportObservable.js": {
798
+ "code": "const RawReportType = {\n intervention: 'intervention',\n cspViolation: 'csp_violation',\n};\nfunction initReportObservable(configuration, apis) {\n const observables = [];\n if (apis.includes(RawReportType.cspViolation)) {\n observables.push(createCspViolationReportObservable(configuration));\n }\n const reportTypes = apis.filter((api) => api !== RawReportType.cspViolation);\n if (reportTypes.length) {\n observables.push(createReportObservable(reportTypes));\n }\n return mergeObservables(...observables);\n}\nfunction createReportObservable(reportTypes) {\n return new Observable((observable) => {\n if (!window.ReportingObserver) {\n return;\n }\n const handleReports = monitor((reports, _) => reports.forEach((report) => observable.notify(buildRawReportErrorFromReport(report))));\n const observer = new window.ReportingObserver(handleReports, {\n types: reportTypes,\n buffered: true,\n });\n observer.observe();\n return () => {\n observer.disconnect();\n };\n });\n}\nfunction createCspViolationReportObservable(configuration) {\n return new Observable((observable) => {\n const { stop } = addEventListener(configuration, document, \"securitypolicyviolation\" /* DOM_EVENT.SECURITY_POLICY_VIOLATION */, (event) => {\n observable.notify(buildRawReportErrorFromCspViolation(event));\n });\n return stop;\n });\n}\nfunction buildRawReportErrorFromReport(report) {\n const { type, body } = report;\n return buildRawReportError({\n type: body.id,\n message: `${type}: ${body.message}`,\n originalError: report,\n stack: buildStack(body.id, body.message, body.sourceFile, body.lineNumber, body.columnNumber),\n });\n}\nfunction buildRawReportErrorFromCspViolation(event) {\n const message = `'${event.blockedURI}' blocked by '${event.effectiveDirective}' directive`;\n return buildRawReportError({\n type: event.effectiveDirective,\n message: `${RawReportType.cspViolation}: ${message}`,\n originalError: event,\n csp: {\n disposition: event.disposition,\n },\n stack: buildStack(event.effectiveDirective, event.originalPolicy\n ? `${message} of the policy \"${safeTruncate(event.originalPolicy, 100, '...')}\"`\n : 'no policy', event.sourceFile, event.lineNumber, event.columnNumber),\n });\n}\nfunction buildRawReportError(partial) {\n return {\n startClocks: clocksNow(),\n source: ErrorSource.REPORT,\n handling: \"unhandled\" /* ErrorHandling.UNHANDLED */,\n ...partial,\n };\n}\nfunction buildStack(name, message, sourceFile, lineNumber, columnNumber) {\n return sourceFile\n ? toStackTraceString({\n name,\n 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}",
799
+ "originalLength": 3719,
800
+ "removedExports": [],
801
+ "renderedExports": [
802
+ "RawReportType",
803
+ "initReportObservable"
804
+ ],
805
+ "renderedLength": 3197
806
+ },
807
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/sendToExtension.js": {
808
+ "code": "function sendToExtension(type, payload) {\n const callback = window.__ddBrowserSdkExtensionCallback;\n if (callback) {\n callback({ type, payload });\n }\n}",
809
+ "originalLength": 218,
810
+ "removedExports": [],
811
+ "renderedExports": [
812
+ "sendToExtension"
813
+ ],
814
+ "renderedLength": 167
815
+ },
816
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/mergeInto.js": {
817
+ "code": "/**\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 = 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 const 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 const merged = Array.isArray(destination) ? destination : [];\n for (let i = 0; i < source.length; ++i) {\n merged[i] = mergeInto(merged[i], source[i], circularReferenceChecker);\n }\n return merged;\n }\n const merged = getType(destination) === 'object' ? destination : {};\n for (const 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(...sources) {\n let destination;\n for (const source of sources) {\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 const set = new WeakSet();\n return {\n hasAlreadyBeenSeen(value) {\n const has = set.has(value);\n if (!has) {\n set.add(value);\n }\n return has;\n },\n };\n }\n const array = [];\n return {\n hasAlreadyBeenSeen(value) {\n const has = array.indexOf(value) >= 0;\n if (!has) {\n array.push(value);\n }\n return has;\n },\n };\n}",
818
+ "originalLength": 3017,
819
+ "removedExports": [],
820
+ "renderedExports": [
821
+ "mergeInto",
822
+ "deepClone",
823
+ "combine"
824
+ ],
825
+ "renderedLength": 2913
826
+ },
827
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/connectivity/connectivity.js": {
828
+ "code": "function getConnectivity() {\n var _a;\n const 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}",
829
+ "originalLength": 436,
830
+ "removedExports": [],
831
+ "renderedExports": [
832
+ "getConnectivity"
833
+ ],
834
+ "renderedLength": 388
835
+ },
836
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/connectivity/index.js": {
837
+ "code": null,
838
+ "originalLength": 65,
839
+ "removedExports": [],
840
+ "renderedExports": [],
841
+ "renderedLength": 0
842
+ },
843
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/arrayUtils.js": {
844
+ "code": "function removeItem(array, item) {\n const index = array.indexOf(item);\n if (index >= 0) {\n array.splice(index, 1);\n }\n}",
845
+ "originalLength": 324,
846
+ "removedExports": [
847
+ "removeDuplicates"
848
+ ],
849
+ "renderedExports": [
850
+ "removeItem"
851
+ ],
852
+ "renderedLength": 135
853
+ },
854
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/boundedBuffer.js": {
855
+ "code": "const BUFFER_LIMIT = 500;\nfunction createBoundedBuffer() {\n const buffer = [];\n const add = (callback) => {\n const length = buffer.push(callback);\n if (length > BUFFER_LIMIT) {\n buffer.splice(0, 1);\n }\n };\n const remove = (callback) => {\n removeItem(buffer, callback);\n };\n const drain = (arg) => {\n buffer.forEach((callback) => callback(arg));\n buffer.length = 0;\n };\n return {\n add,\n remove,\n drain,\n };\n}",
856
+ "originalLength": 606,
857
+ "removedExports": [],
858
+ "renderedExports": [
859
+ "createBoundedBuffer"
860
+ ],
861
+ "renderedLength": 508
862
+ },
863
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/telemetry/rawTelemetryEvent.types.js": {
864
+ "code": "const TelemetryType = {\n log: 'log',\n configuration: 'configuration',\n usage: 'usage',\n};",
865
+ "originalLength": 157,
866
+ "removedExports": [],
867
+ "renderedExports": [
868
+ "TelemetryType"
869
+ ],
870
+ "renderedLength": 98
871
+ },
872
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/telemetry/telemetry.js": {
873
+ "code": "const 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 '<anonymous>',\n];\nconst TELEMETRY_EXCLUDED_SITES = [INTAKE_SITE_US1_FED];\n// eslint-disable-next-line local-rules/disallow-side-effects\nlet preStartTelemetryBuffer = createBoundedBuffer();\nlet onRawTelemetryEventCollected = (event) => {\n preStartTelemetryBuffer.add(() => onRawTelemetryEventCollected(event));\n};\nfunction startTelemetry(telemetryService, configuration) {\n let contextProvider;\n const observable = new Observable();\n const alreadySentEvents = new Set();\n const telemetryEnabled = !TELEMETRY_EXCLUDED_SITES.includes(configuration.site) && performDraw(configuration.telemetrySampleRate);\n const telemetryEnabledPerType = {\n [TelemetryType.log]: telemetryEnabled,\n [TelemetryType.configuration]: telemetryEnabled && performDraw(configuration.telemetryConfigurationSampleRate),\n [TelemetryType.usage]: telemetryEnabled && performDraw(configuration.telemetryUsageSampleRate),\n };\n const runtimeEnvInfo = getRuntimeEnvInfo();\n onRawTelemetryEventCollected = (rawEvent) => {\n const stringifiedEvent = jsonStringify(rawEvent);\n if (telemetryEnabledPerType[rawEvent.type] &&\n alreadySentEvents.size < configuration.maxTelemetryEventsPerPage &&\n !alreadySentEvents.has(stringifiedEvent)) {\n const event = toTelemetryEvent(telemetryService, rawEvent, runtimeEnvInfo);\n observable.notify(event);\n sendToExtension('telemetry', event);\n alreadySentEvents.add(stringifiedEvent);\n }\n };\n startMonitorErrorCollection(addTelemetryError);\n function toTelemetryEvent(telemetryService, event, runtimeEnvInfo) {\n return combine({\n type: 'telemetry',\n date: timeStampNow(),\n service: telemetryService,\n version: \"6.0.0\",\n source: 'browser',\n _dd: {\n format_version: 2,\n },\n telemetry: combine(event, {\n runtime_env: runtimeEnvInfo,\n connectivity: getConnectivity(),\n sdk_setup: \"npm\",\n }),\n experimental_features: Array.from(getExperimentalFeatures()),\n }, contextProvider !== undefined ? contextProvider() : {});\n }\n return {\n setContextProvider: (provider) => {\n contextProvider = provider;\n },\n 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}\n// need to be called after telemetry context is provided and observers are registered\nfunction drainPreStartTelemetry() {\n preStartTelemetryBuffer.drain();\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 === INTAKE_SITE_STAGING;\n}\nfunction addTelemetryDebug(message, context) {\n displayIfDebugEnabled(ConsoleApiName.debug, message, context);\n onRawTelemetryEventCollected({\n type: TelemetryType.log,\n message,\n status: \"debug\" /* StatusType.debug */,\n ...context,\n });\n}\nfunction addTelemetryError(e, context) {\n onRawTelemetryEventCollected({\n type: TelemetryType.log,\n status: \"error\" /* StatusType.error */,\n ...formatError(e),\n ...context,\n });\n}\nfunction addTelemetryConfiguration(configuration) {\n onRawTelemetryEventCollected({\n type: TelemetryType.configuration,\n configuration,\n });\n}\nfunction addTelemetryUsage(usage) {\n onRawTelemetryEventCollected({\n type: TelemetryType.usage,\n usage,\n });\n}\nfunction formatError(e) {\n if (isError(e)) {\n const stackTrace = computeStackTrace(e);\n return {\n error: {\n kind: stackTrace.name,\n stack: toStackTraceString(scrubCustomerFrames(stackTrace)),\n },\n message: stackTrace.message,\n };\n }\n return {\n error: {\n stack: NO_ERROR_STACK_PRESENT_MESSAGE,\n },\n message: `${\"Uncaught\" /* NonErrorPrefix.UNCAUGHT */} ${jsonStringify(e)}`,\n };\n}\nfunction scrubCustomerFrames(stackTrace) {\n stackTrace.stack = stackTrace.stack.filter((frame) => !frame.url || ALLOWED_FRAME_URLS.some((allowedFrameUrl) => frame.url.startsWith(allowedFrameUrl)));\n return stackTrace;\n}",
874
+ "originalLength": 6280,
875
+ "removedExports": [
876
+ "startFakeTelemetry",
877
+ "resetTelemetry"
878
+ ],
879
+ "renderedExports": [
880
+ "startTelemetry",
881
+ "drainPreStartTelemetry",
882
+ "isTelemetryReplicationAllowed",
883
+ "addTelemetryDebug",
884
+ "addTelemetryError",
885
+ "addTelemetryConfiguration",
886
+ "addTelemetryUsage",
887
+ "formatError",
888
+ "scrubCustomerFrames"
889
+ ],
890
+ "renderedLength": 4730
891
+ },
892
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/telemetry/telemetryEvent.types.js": {
893
+ "code": null,
894
+ "originalLength": 160,
895
+ "removedExports": [],
896
+ "renderedExports": [],
897
+ "renderedLength": 0
898
+ },
899
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/telemetry/index.js": {
900
+ "code": null,
901
+ "originalLength": 338,
902
+ "removedExports": [],
903
+ "renderedExports": [],
904
+ "renderedLength": 0
905
+ },
906
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/valueHistory.js": {
907
+ "code": "const END_OF_TIMES = Infinity;\nconst CLEAR_OLD_VALUES_INTERVAL = ONE_MINUTE;\nfunction createValueHistory({ expireDelay, maxEntries, }) {\n let entries = [];\n const clearOldValuesInterval = setInterval(() => clearOldValues(), CLEAR_OLD_VALUES_INTERVAL);\n function clearOldValues() {\n const oldTimeThreshold = 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 const entry = {\n value,\n startTime,\n endTime: END_OF_TIMES,\n remove: () => {\n removeItem(entries, entry);\n },\n close: (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 = END_OF_TIMES, options = { returnInactive: false }) {\n for (const entry of entries) {\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 const 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 = END_OF_TIMES, duration = 0) {\n const endTime = addDuration(startTime, duration);\n return entries\n .filter((entry) => entry.startTime <= endTime && startTime <= entry.endTime)\n .map((entry) => 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 clearInterval(clearOldValuesInterval);\n }\n return { add, find, closeActive, findAll, reset, stop };\n}",
908
+ "originalLength": 3227,
909
+ "removedExports": [],
910
+ "renderedExports": [
911
+ "CLEAR_OLD_VALUES_INTERVAL",
912
+ "createValueHistory"
913
+ ],
914
+ "renderedLength": 2995
915
+ },
916
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/session/sessionManager.js": {
917
+ "code": "const VISIBILITY_CHECK_DELAY = ONE_MINUTE;\nconst SESSION_CONTEXT_TIMEOUT_DELAY = SESSION_TIME_OUT_DELAY;\nfunction startSessionManager(configuration, productKey, computeSessionState, trackingConsentState) {\n const renewObservable = new Observable();\n const expireObservable = new Observable();\n // TODO - Improve configuration type and remove assertion\n const sessionStore = startSessionStore(configuration.sessionStoreStrategyType, configuration, productKey, computeSessionState);\n const sessionContextHistory = createValueHistory({\n expireDelay: SESSION_CONTEXT_TIMEOUT_DELAY,\n });\n sessionStore.renewObservable.subscribe(() => {\n sessionContextHistory.add(buildSessionContext(), relativeNow());\n renewObservable.notify();\n });\n sessionStore.expireObservable.subscribe(() => {\n expireObservable.notify();\n sessionContextHistory.closeActive(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(), clocksOrigin().relative);\n trackingConsentState.observable.subscribe(() => {\n if (trackingConsentState.isGranted()) {\n sessionStore.expandOrRenewSession();\n }\n else {\n sessionStore.expire();\n }\n });\n trackActivity(configuration, () => {\n if (trackingConsentState.isGranted()) {\n sessionStore.expandOrRenewSession();\n }\n });\n trackVisibility(configuration, () => sessionStore.expandSession());\n trackResume(configuration, () => 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: (startTime, options) => sessionContextHistory.find(startTime, options),\n renewObservable,\n expireObservable,\n sessionStateUpdateObservable: sessionStore.sessionStateUpdateObservable,\n expire: sessionStore.expire,\n updateSessionState: sessionStore.updateSessionState,\n };\n}\nfunction trackActivity(configuration, expandOrRenewSession) {\n const { stop } = 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 });\n}\nfunction trackVisibility(configuration, expandSession) {\n const expandSessionWhenVisible = () => {\n if (document.visibilityState === 'visible') {\n expandSession();\n }\n };\n const { stop } = addEventListener(configuration, document, \"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */, expandSessionWhenVisible);\n setInterval(expandSessionWhenVisible, VISIBILITY_CHECK_DELAY);\n}\nfunction trackResume(configuration, cb) {\n const { stop } = addEventListener(configuration, window, \"resume\" /* DOM_EVENT.RESUME */, cb, { capture: true });\n}",
918
+ "originalLength": 4235,
919
+ "removedExports": [
920
+ "stopSessionManager"
921
+ ],
922
+ "renderedExports": [
923
+ "VISIBILITY_CHECK_DELAY",
924
+ "startSessionManager"
925
+ ],
926
+ "renderedLength": 3266
927
+ },
928
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/utils/responseUtils.js": {
929
+ "code": "function 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}",
930
+ "originalLength": 346,
931
+ "removedExports": [],
932
+ "renderedExports": [
933
+ "isServerError",
934
+ "tryToClone"
935
+ ],
936
+ "renderedLength": 290
937
+ },
938
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/transport/sendWithRetryStrategy.js": {
939
+ "code": "const MAX_ONGOING_BYTES_COUNT = 80 * ONE_KIBI_BYTE;\nconst MAX_ONGOING_REQUESTS = 32;\nconst MAX_QUEUE_BYTES_COUNT = 3 * ONE_MEBI_BYTE;\nconst MAX_BACKOFF_TIME = ONE_MINUTE;\nconst INITIAL_BACKOFF_TIME = 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: () => retryQueuedPayloads(0 /* RetryReason.AFTER_SUCCESS */, state, sendStrategy, trackType, reportError),\n onFailure: () => {\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 setTimeout(() => {\n const payload = state.queuedPayloads.first();\n send(payload, state, sendStrategy, {\n onSuccess: () => {\n state.queuedPayloads.dequeue();\n state.currentBackoffTime = INITIAL_BACKOFF_TIME;\n retryQueuedPayloads(1 /* RetryReason.AFTER_RESUME */, state, sendStrategy, trackType, reportError);\n },\n onFailure: () => {\n state.currentBackoffTime = Math.min(MAX_BACKOFF_TIME, state.currentBackoffTime * 2);\n scheduleRetry(state, sendStrategy, trackType, reportError);\n },\n });\n }, state.currentBackoffTime);\n}\nfunction send(payload, state, sendStrategy, { onSuccess, onFailure }) {\n state.bandwidthMonitor.add(payload);\n sendStrategy(payload, (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 ${trackType} events size queued for upload: ${MAX_QUEUE_BYTES_COUNT / ONE_MEBI_BYTE}MiB`,\n source: ErrorSource.AGENT,\n startClocks: clocksNow(),\n });\n state.queueFullReported = true;\n }\n const 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 isServerError(response.status)));\n}\nfunction newRetryState() {\n return {\n transportStatus: 0 /* TransportStatus.UP */,\n currentBackoffTime: INITIAL_BACKOFF_TIME,\n bandwidthMonitor: newBandwidthMonitor(),\n queuedPayloads: newPayloadQueue(),\n queueFullReported: false,\n };\n}\nfunction newPayloadQueue() {\n const queue = [];\n return {\n bytesCount: 0,\n enqueue(payload) {\n if (this.isFull()) {\n return;\n }\n queue.push(payload);\n this.bytesCount += payload.bytesCount;\n },\n first() {\n return queue[0];\n },\n dequeue() {\n const payload = queue.shift();\n if (payload) {\n this.bytesCount -= payload.bytesCount;\n }\n return payload;\n },\n size() {\n return queue.length;\n },\n isFull() {\n return this.bytesCount >= MAX_QUEUE_BYTES_COUNT;\n },\n };\n}\nfunction newBandwidthMonitor() {\n return {\n ongoingRequestCount: 0,\n ongoingByteCount: 0,\n canHandle(payload) {\n return (this.ongoingRequestCount === 0 ||\n (this.ongoingByteCount + payload.bytesCount <= MAX_ONGOING_BYTES_COUNT &&\n this.ongoingRequestCount < MAX_ONGOING_REQUESTS));\n },\n add(payload) {\n this.ongoingRequestCount += 1;\n this.ongoingByteCount += payload.bytesCount;\n },\n remove(payload) {\n this.ongoingRequestCount -= 1;\n this.ongoingByteCount -= payload.bytesCount;\n },\n };\n}",
940
+ "originalLength": 5577,
941
+ "removedExports": [],
942
+ "renderedExports": [
943
+ "MAX_ONGOING_BYTES_COUNT",
944
+ "MAX_ONGOING_REQUESTS",
945
+ "MAX_QUEUE_BYTES_COUNT",
946
+ "MAX_BACKOFF_TIME",
947
+ "INITIAL_BACKOFF_TIME",
948
+ "sendWithRetryStrategy",
949
+ "newRetryState"
950
+ ],
951
+ "renderedLength": 5161
952
+ },
953
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/transport/httpRequest.js": {
954
+ "code": "function createHttpRequest(endpointBuilder, bytesLimit, reportError) {\n const retryState = newRetryState();\n const sendStrategyForRetry = (payload, onResponse) => fetchKeepAliveStrategy(endpointBuilder, bytesLimit, payload, onResponse);\n return {\n send: (payload) => {\n 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: (payload) => {\n sendBeaconStrategy(endpointBuilder, bytesLimit, payload);\n },\n };\n}\nfunction sendBeaconStrategy(endpointBuilder, bytesLimit, payload) {\n const canUseBeacon = !!navigator.sendBeacon && payload.bytesCount < bytesLimit;\n if (canUseBeacon) {\n try {\n const beaconUrl = endpointBuilder.build('beacon', payload);\n const isQueued = navigator.sendBeacon(beaconUrl, payload.data);\n if (isQueued) {\n return;\n }\n }\n catch (e) {\n reportBeaconError(e);\n }\n }\n const xhrUrl = endpointBuilder.build('xhr', payload);\n sendXHR(xhrUrl, payload.data);\n}\nlet hasReportedBeaconError = false;\nfunction reportBeaconError(e) {\n if (!hasReportedBeaconError) {\n hasReportedBeaconError = true;\n addTelemetryError(e);\n }\n}\nfunction fetchKeepAliveStrategy(endpointBuilder, bytesLimit, payload, onResponse) {\n const canUseKeepAlive = isKeepAliveSupported() && payload.bytesCount < bytesLimit;\n if (canUseKeepAlive) {\n const fetchUrl = endpointBuilder.build('fetch', payload);\n fetch(fetchUrl, { method: 'POST', body: payload.data, keepalive: true, mode: 'cors' }).then(monitor((response) => onResponse === null || onResponse === void 0 ? void 0 : onResponse({ status: response.status, type: response.type })), monitor(() => {\n const xhrUrl = endpointBuilder.build('xhr', payload);\n // failed to queue the request\n sendXHR(xhrUrl, payload.data, onResponse);\n }));\n }\n else {\n const 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 const 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 addEventListener(\n // allow untrusted event to acount for synthetic event dispatched by third party xhr wrapper\n { allowUntrustedEvents: true }, request, 'loadend', () => {\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}",
955
+ "originalLength": 3787,
956
+ "removedExports": [],
957
+ "renderedExports": [
958
+ "createHttpRequest",
959
+ "fetchKeepAliveStrategy",
960
+ "sendXHR"
961
+ ],
962
+ "renderedLength": 3481
963
+ },
964
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/transport/eventBridge.js": {
965
+ "code": "function getEventBridge() {\n const eventBridgeGlobal = getEventBridgeGlobal();\n if (!eventBridgeGlobal) {\n return;\n }\n return {\n getCapabilities() {\n var _a;\n return JSON.parse(((_a = eventBridgeGlobal.getCapabilities) === null || _a === void 0 ? void 0 : _a.call(eventBridgeGlobal)) || '[]');\n },\n getPrivacyLevel() {\n var _a;\n return (_a = eventBridgeGlobal.getPrivacyLevel) === null || _a === void 0 ? void 0 : _a.call(eventBridgeGlobal);\n },\n getAllowedWebViewHosts() {\n return JSON.parse(eventBridgeGlobal.getAllowedWebViewHosts());\n },\n send(eventType, event, viewId) {\n const view = viewId ? { id: viewId } : undefined;\n eventBridgeGlobal.send(JSON.stringify({ eventType, event, view }));\n },\n };\n}\nfunction bridgeSupports(capability) {\n const bridge = getEventBridge();\n return !!bridge && bridge.getCapabilities().includes(capability);\n}\nfunction canUseEventBridge(currentHost) {\n var _a;\n if (currentHost === void 0) { currentHost = (_a = getGlobalObject().location) === null || _a === void 0 ? void 0 : _a.hostname; }\n const bridge = getEventBridge();\n return (!!bridge &&\n bridge\n .getAllowedWebViewHosts()\n .some((allowedHost) => currentHost === allowedHost || currentHost.endsWith(`.${allowedHost}`)));\n}\nfunction getEventBridgeGlobal() {\n return getGlobalObject().DatadogEventBridge;\n}",
966
+ "originalLength": 1626,
967
+ "removedExports": [],
968
+ "renderedExports": [
969
+ "getEventBridge",
970
+ "bridgeSupports",
971
+ "canUseEventBridge"
972
+ ],
973
+ "renderedLength": 1505
974
+ },
975
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/browser/pageExitObservable.js": {
976
+ "code": "const 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((observable) => {\n const { stop: stopListeners } = addEventListeners(configuration, window, [\"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */, \"freeze\" /* DOM_EVENT.FREEZE */], (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: 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: PageExitReason.FROZEN });\n }\n }, { capture: true });\n const stopBeforeUnloadListener = addEventListener(configuration, window, \"beforeunload\" /* DOM_EVENT.BEFORE_UNLOAD */, () => {\n observable.notify({ reason: PageExitReason.UNLOADING });\n }).stop;\n return () => {\n stopListeners();\n stopBeforeUnloadListener();\n };\n });\n}\nfunction isPageExitReason(reason) {\n return objectValues(PageExitReason).includes(reason);\n}",
977
+ "originalLength": 2060,
978
+ "removedExports": [],
979
+ "renderedExports": [
980
+ "PageExitReason",
981
+ "createPageExitObservable",
982
+ "isPageExitReason"
983
+ ],
984
+ "renderedLength": 1811
985
+ },
986
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/transport/batch.js": {
987
+ "code": "function createBatch({ encoder, request, flushController, messageBytesLimit, }) {\n let upsertBuffer = {};\n const flushSubscription = flushController.flushObservable.subscribe((event) => 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${serializedMessage}`, (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 const removedMessage = upsertBuffer[key];\n delete upsertBuffer[key];\n const messageBytesCount = encoder.estimateEncodedBytesCount(removedMessage);\n flushController.notifyAfterRemoveMessage(messageBytesCount);\n }\n function addOrUpdate(message, key) {\n const serializedMessage = jsonStringify(message);\n const estimatedMessageBytesCount = encoder.estimateEncodedBytesCount(serializedMessage);\n if (estimatedMessageBytesCount >= messageBytesLimit) {\n display.warn(`Discarded a message whose size was bigger than the maximum allowed size ${messageBytesLimit}KB. ${MORE_DETAILS} ${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 const upsertMessages = objectValues(upsertBuffer).join('\\n');\n upsertBuffer = {};\n const isPageExit = isPageExitReason(event.reason);\n const 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 const 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 const pendingMessages = [encoderResult.pendingData, upsertMessages].filter(Boolean).join('\\n');\n if (pendingMessages) {\n send({\n data: pendingMessages,\n bytesCount: computeBytesCount(pendingMessages),\n });\n }\n }\n else {\n if (upsertMessages) {\n encoder.write(encoder.isEmpty ? upsertMessages : `\\n${upsertMessages}`);\n }\n encoder.finish((encoderResult) => {\n send(formatPayloadFromEncoder(encoderResult));\n });\n }\n }\n return {\n flushController,\n add: addOrUpdate,\n upsert: addOrUpdate,\n stop: flushSubscription.unsubscribe,\n };\n}\nfunction formatPayloadFromEncoder(encoderResult) {\n let 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,\n bytesCount: encoderResult.outputBytesCount,\n encoding: encoderResult.encoding,\n };\n}",
988
+ "originalLength": 4747,
989
+ "removedExports": [],
990
+ "renderedExports": [
991
+ "createBatch"
992
+ ],
993
+ "renderedLength": 4371
994
+ },
995
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/transport/flushController.js": {
996
+ "code": "/**\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({ messagesLimit, bytesLimit, durationLimit, pageExitObservable, sessionExpireObservable, }) {\n const pageExitSubscription = pageExitObservable.subscribe((event) => flush(event.reason));\n const sessionExpireSubscription = sessionExpireObservable.subscribe(() => flush('session_expire'));\n const flushObservable = new Observable(() => () => {\n pageExitSubscription.unsubscribe();\n sessionExpireSubscription.unsubscribe();\n });\n let currentBytesCount = 0;\n let currentMessagesCount = 0;\n function flush(flushReason) {\n if (currentMessagesCount === 0) {\n return;\n }\n const messagesCount = currentMessagesCount;\n const bytesCount = currentBytesCount;\n currentMessagesCount = 0;\n currentBytesCount = 0;\n cancelDurationLimitTimeout();\n flushObservable.notify({\n reason: flushReason,\n messagesCount,\n bytesCount,\n });\n }\n let durationLimitTimeoutId;\n function scheduleDurationLimitTimeout() {\n if (durationLimitTimeoutId === undefined) {\n durationLimitTimeoutId = setTimeout(() => {\n flush('duration_limit');\n }, durationLimit);\n }\n }\n function cancelDurationLimitTimeout() {\n clearTimeout(durationLimitTimeoutId);\n durationLimitTimeoutId = undefined;\n }\n return {\n 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(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(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(messageBytesCount) {\n currentBytesCount -= messageBytesCount;\n currentMessagesCount -= 1;\n if (currentMessagesCount === 0) {\n cancelDurationLimitTimeout();\n }\n },\n };\n}",
997
+ "originalLength": 4747,
998
+ "removedExports": [],
999
+ "renderedExports": [
1000
+ "createFlushController"
1001
+ ],
1002
+ "renderedLength": 4587
1003
+ },
1004
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/transport/startBatchWithReplica.js": {
1005
+ "code": "function startBatchWithReplica(configuration, primary, replica, reportError, pageExitObservable, sessionExpireObservable, batchFactoryImp = createBatch) {\n const primaryBatch = createBatchFromConfig(configuration, primary);\n const replicaBatch = replica && createBatchFromConfig(configuration, replica);\n function createBatchFromConfig(configuration, { endpoint, encoder }) {\n return batchFactoryImp({\n encoder,\n request: createHttpRequest(endpoint, configuration.batchBytesLimit, reportError),\n flushController: createFlushController({\n messagesLimit: configuration.batchMessagesLimit,\n bytesLimit: configuration.batchBytesLimit,\n durationLimit: configuration.flushTimeout,\n pageExitObservable,\n sessionExpireObservable,\n }),\n messageBytesLimit: configuration.messageBytesLimit,\n });\n }\n return {\n flushObservable: primaryBatch.flushController.flushObservable,\n add(message, replicated = true) {\n primaryBatch.add(message);\n if (replicaBatch && replicated) {\n replicaBatch.add(replica.transformMessage ? replica.transformMessage(message) : message);\n }\n },\n upsert: (message, key) => {\n primaryBatch.upsert(message, key);\n if (replicaBatch) {\n replicaBatch.upsert(replica.transformMessage ? replica.transformMessage(message) : message, key);\n }\n },\n stop: () => {\n primaryBatch.stop();\n if (replicaBatch) {\n replicaBatch.stop();\n }\n },\n };\n}",
1006
+ "originalLength": 1903,
1007
+ "removedExports": [],
1008
+ "renderedExports": [
1009
+ "startBatchWithReplica"
1010
+ ],
1011
+ "renderedLength": 1697
1012
+ },
1013
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/transport/index.js": {
1014
+ "code": null,
1015
+ "originalLength": 292,
1016
+ "removedExports": [],
1017
+ "renderedExports": [],
1018
+ "renderedLength": 0
1019
+ },
1020
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/encoder.js": {
1021
+ "code": "function createIdentityEncoder() {\n let output = '';\n let outputBytesCount = 0;\n return {\n isAsync: false,\n get isEmpty() {\n return !output;\n },\n write(data, callback) {\n const additionalEncodedBytesCount = computeBytesCount(data);\n outputBytesCount += additionalEncodedBytesCount;\n output += data;\n if (callback) {\n callback(additionalEncodedBytesCount);\n }\n },\n finish(callback) {\n callback(this.finishSync());\n },\n finishSync() {\n const result = {\n output,\n outputBytesCount,\n rawBytesCount: outputBytesCount,\n pendingData: '',\n };\n output = '';\n outputBytesCount = 0;\n return result;\n },\n estimateEncodedBytesCount(data) {\n return data.length;\n },\n };\n}",
1022
+ "originalLength": 1062,
1023
+ "removedExports": [],
1024
+ "renderedExports": [
1025
+ "createIdentityEncoder"
1026
+ ],
1027
+ "renderedLength": 964
1028
+ },
1029
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/abstractLifeCycle.js": {
1030
+ "code": "// eslint-disable-next-line no-restricted-syntax\nclass AbstractLifeCycle {\n constructor() {\n this.callbacks = {};\n }\n notify(eventType, data) {\n const eventCallbacks = this.callbacks[eventType];\n if (eventCallbacks) {\n eventCallbacks.forEach((callback) => callback(data));\n }\n }\n subscribe(eventType, callback) {\n if (!this.callbacks[eventType]) {\n this.callbacks[eventType] = [];\n }\n this.callbacks[eventType].push(callback);\n return {\n unsubscribe: () => {\n this.callbacks[eventType] = this.callbacks[eventType].filter((other) => callback !== other);\n },\n };\n }\n}",
1031
+ "originalLength": 758,
1032
+ "removedExports": [],
1033
+ "renderedExports": [
1034
+ "AbstractLifeCycle"
1035
+ ],
1036
+ "renderedLength": 705
1037
+ },
1038
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/eventRateLimiter/createEventRateLimiter.js": {
1039
+ "code": "function createEventRateLimiter(eventType, limit, onLimitReached) {\n let eventCount = 0;\n let allowNextEvent = false;\n return {\n isLimitReached() {\n if (eventCount === 0) {\n setTimeout(() => {\n eventCount = 0;\n }, 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 ${eventType}s by minute: ${limit}`,\n source: ErrorSource.AGENT,\n startClocks: clocksNow(),\n });\n }\n finally {\n allowNextEvent = false;\n }\n }\n return true;\n },\n };\n}",
1040
+ "originalLength": 1237,
1041
+ "removedExports": [],
1042
+ "renderedExports": [
1043
+ "createEventRateLimiter"
1044
+ ],
1045
+ "renderedLength": 1010
1046
+ },
1047
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/browser/runOnReadyState.js": {
1048
+ "code": "function runOnReadyState(configuration, expectedReadyState, callback) {\n if (document.readyState === expectedReadyState || document.readyState === 'complete') {\n callback();\n return { stop: noop };\n }\n const eventName = expectedReadyState === 'complete' ? \"load\" /* DOM_EVENT.LOAD */ : \"DOMContentLoaded\" /* DOM_EVENT.DOM_CONTENT_LOADED */;\n return addEventListener(configuration, window, eventName, callback, { once: true });\n}\nfunction asyncRunOnReadyState(configuration, expectedReadyState) {\n return new Promise((resolve) => {\n runOnReadyState(configuration, expectedReadyState, resolve);\n });\n}",
1049
+ "originalLength": 804,
1050
+ "removedExports": [],
1051
+ "renderedExports": [
1052
+ "runOnReadyState",
1053
+ "asyncRunOnReadyState"
1054
+ ],
1055
+ "renderedLength": 638
1056
+ },
1057
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/browser/xhrObservable.js": {
1058
+ "code": "let xhrObservable;\nconst 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((observable) => {\n const { stop: stopInstrumentingStart } = instrumentMethod(XMLHttpRequest.prototype, 'open', openXhr);\n const { stop: stopInstrumentingSend } = instrumentMethod(XMLHttpRequest.prototype, 'send', (call) => {\n sendXhr(call, configuration, observable);\n }, { computeHandlingStack: true });\n const { stop: stopInstrumentingAbort } = instrumentMethod(XMLHttpRequest.prototype, 'abort', abortXhr);\n return () => {\n stopInstrumentingStart();\n stopInstrumentingSend();\n stopInstrumentingAbort();\n };\n });\n}\nfunction openXhr({ target: xhr, parameters: [method, url] }) {\n xhrContexts.set(xhr, {\n state: 'open',\n method: String(method).toUpperCase(),\n url: normalizeUrl(String(url)),\n });\n}\nfunction sendXhr({ target: xhr, handlingStack }, configuration, observable) {\n const context = xhrContexts.get(xhr);\n if (!context) {\n return;\n }\n const startContext = context;\n startContext.state = 'start';\n startContext.startClocks = clocksNow();\n startContext.isAborted = false;\n startContext.xhr = xhr;\n startContext.handlingStack = handlingStack;\n let hasBeenReported = false;\n const { stop: stopInstrumentingOnReadyStateChange } = instrumentMethod(xhr, 'onreadystatechange', () => {\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 });\n const onEnd = () => {\n unsubscribeLoadEndListener();\n stopInstrumentingOnReadyStateChange();\n if (hasBeenReported) {\n return;\n }\n hasBeenReported = true;\n const completeContext = context;\n completeContext.state = 'complete';\n completeContext.duration = elapsed(startContext.startClocks.timeStamp, timeStampNow());\n completeContext.status = xhr.status;\n observable.notify(shallowClone(completeContext));\n };\n const { stop: unsubscribeLoadEndListener } = addEventListener(configuration, xhr, 'loadend', onEnd);\n observable.notify(startContext);\n}\nfunction abortXhr({ target: xhr }) {\n const context = xhrContexts.get(xhr);\n if (context) {\n context.isAborted = true;\n }\n}",
1059
+ "originalLength": 3250,
1060
+ "removedExports": [],
1061
+ "renderedExports": [
1062
+ "initXhrObservable"
1063
+ ],
1064
+ "renderedLength": 2839
1065
+ },
1066
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/browser/fetchObservable.js": {
1067
+ "code": "let fetchObservable;\nfunction initFetchObservable() {\n if (!fetchObservable) {\n fetchObservable = createFetchObservable();\n }\n return fetchObservable;\n}\nfunction createFetchObservable() {\n return new Observable((observable) => {\n if (!window.fetch) {\n return;\n }\n const { stop } = instrumentMethod(window, 'fetch', (call) => beforeSend(call, observable), {\n computeHandlingStack: true,\n });\n return stop;\n });\n}\nfunction beforeSend({ parameters, onPostCall, handlingStack }, observable) {\n const [input, init] = parameters;\n let methodFromParams = init && init.method;\n if (methodFromParams === undefined && input instanceof Request) {\n methodFromParams = input.method;\n }\n const method = methodFromParams !== undefined ? String(methodFromParams).toUpperCase() : 'GET';\n const url = input instanceof Request ? input.url : normalizeUrl(String(input));\n const startClocks = clocksNow();\n const context = {\n state: 'start',\n init,\n input,\n method,\n startClocks,\n url,\n 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((responsePromise) => afterSend(observable, responsePromise, context));\n}\nfunction afterSend(observable, responsePromise, startContext) {\n const context = startContext;\n function reportFetch(partialContext) {\n context.state = 'resolve';\n Object.assign(context, partialContext);\n observable.notify(context);\n }\n responsePromise.then(monitor((response) => {\n reportFetch({\n response,\n responseType: response.type,\n status: response.status,\n isAborted: false,\n });\n }), monitor((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,\n });\n }));\n}",
1068
+ "originalLength": 2635,
1069
+ "removedExports": [
1070
+ "resetFetchObservable"
1071
+ ],
1072
+ "renderedExports": [
1073
+ "initFetchObservable"
1074
+ ],
1075
+ "renderedLength": 2239
1076
+ },
1077
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/requestIdleCallback.js": {
1078
+ "code": "/**\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 const id = window.requestIdleCallback(monitor(callback), opts);\n return () => window.cancelIdleCallback(id);\n }\n return requestIdleCallbackShim(callback);\n}\nconst 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 const start = dateNow();\n const timeoutId = setTimeout(() => {\n callback({\n didTimeout: false,\n timeRemaining: () => Math.max(0, MAX_TASK_TIME - (dateNow() - start)),\n });\n }, 0);\n return () => clearTimeout(timeoutId);\n}",
1079
+ "originalLength": 1218,
1080
+ "removedExports": [],
1081
+ "renderedExports": [
1082
+ "requestIdleCallback",
1083
+ "MAX_TASK_TIME",
1084
+ "requestIdleCallbackShim"
1085
+ ],
1086
+ "renderedLength": 1015
1087
+ },
1088
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/taskQueue.js": {
1089
+ "code": "/**\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 */\nconst IDLE_CALLBACK_TIMEOUT = 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 */\nconst MAX_EXECUTION_TIME_ON_TIMEOUT = 30;\nfunction createTaskQueue() {\n const pendingTasks = [];\n function run(deadline) {\n let executionTimeRemaining;\n if (deadline.didTimeout) {\n const start = performance.now();\n executionTimeRemaining = () => MAX_EXECUTION_TIME_ON_TIMEOUT - (performance.now() - start);\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 requestIdleCallback(run, { timeout: IDLE_CALLBACK_TIMEOUT });\n }\n return {\n push(task) {\n if (pendingTasks.push(task) === 1) {\n scheduleNextRun();\n }\n },\n };\n}",
1090
+ "originalLength": 1793,
1091
+ "removedExports": [],
1092
+ "renderedExports": [
1093
+ "MAX_EXECUTION_TIME_ON_TIMEOUT",
1094
+ "createTaskQueue"
1095
+ ],
1096
+ "renderedLength": 1632
1097
+ },
1098
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/console/consoleObservable.js": {
1099
+ "code": "let consoleObservablesByApi = {};\nfunction initConsoleObservable(apis) {\n const consoleObservables = apis.map((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 mergeObservables(...consoleObservables);\n}\nfunction createConsoleObservable(api) {\n return new Observable((observable) => {\n const originalConsoleApi = globalConsole[api];\n globalConsole[api] = (...params) => {\n originalConsoleApi.apply(console, params);\n const handlingStack = createHandlingStack();\n callMonitored(() => {\n observable.notify(buildConsoleLog(params, api, handlingStack));\n });\n };\n return () => {\n globalConsole[api] = originalConsoleApi;\n };\n });\n}\nfunction buildConsoleLog(params, api, handlingStack) {\n const message = params.map((param) => formatConsoleParameters(param)).join(' ');\n let error;\n if (api === ConsoleApiName.error) {\n const firstErrorParam = params.find(isError);\n error = {\n stack: firstErrorParam ? toStackTraceString(computeStackTrace(firstErrorParam)) : undefined,\n fingerprint: tryToGetFingerprint(firstErrorParam),\n causes: firstErrorParam ? flattenErrorCauses(firstErrorParam, 'console') : undefined,\n startClocks: clocksNow(),\n message,\n source: ErrorSource.CONSOLE,\n handling: \"handled\" /* ErrorHandling.HANDLED */,\n handlingStack,\n };\n }\n return {\n api,\n message,\n error,\n handlingStack,\n };\n}\nfunction formatConsoleParameters(param) {\n if (typeof param === 'string') {\n return sanitize(param);\n }\n if (isError(param)) {\n return formatErrorMessage(computeStackTrace(param));\n }\n return jsonStringify(sanitize(param), undefined, 2);\n}",
1100
+ "originalLength": 2933,
1101
+ "removedExports": [
1102
+ "resetConsoleObservable"
1103
+ ],
1104
+ "renderedExports": [
1105
+ "initConsoleObservable"
1106
+ ],
1107
+ "renderedLength": 2086
1108
+ },
1109
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/context/contextManager.js": {
1110
+ "code": "function createContextManager(customerDataTracker) {\n let context = {};\n const changeObservable = new Observable();\n const contextManager = {\n getContext: () => deepClone(context),\n setContext: (newContext) => {\n if (getType(newContext) === 'object') {\n context = 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: (key, property) => {\n context[key] = sanitize(property);\n customerDataTracker === null || customerDataTracker === void 0 ? void 0 : customerDataTracker.updateCustomerData(context);\n changeObservable.notify();\n },\n removeContextProperty: (key) => {\n delete context[key];\n customerDataTracker === null || customerDataTracker === void 0 ? void 0 : customerDataTracker.updateCustomerData(context);\n changeObservable.notify();\n },\n clearContext: () => {\n context = {};\n customerDataTracker === null || customerDataTracker === void 0 ? void 0 : customerDataTracker.resetCustomerData();\n changeObservable.notify();\n },\n changeObservable,\n };\n return contextManager;\n}",
1111
+ "originalLength": 1725,
1112
+ "removedExports": [],
1113
+ "renderedExports": [
1114
+ "createContextManager"
1115
+ ],
1116
+ "renderedLength": 1453
1117
+ },
1118
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/context/storeContextManager.js": {
1119
+ "code": "const CONTEXT_STORE_KEY_PREFIX = '_dd_c';\nconst storageListeners = [];\nfunction storeContextManager(configuration, contextManager, productKey, customerDataType) {\n const storageKey = buildStorageKey(productKey, customerDataType);\n storageListeners.push(addEventListener(configuration, window, \"storage\" /* DOM_EVENT.STORAGE */, ({ key }) => {\n if (storageKey === key) {\n synchronizeWithStorage();\n }\n }));\n contextManager.changeObservable.subscribe(dumpToStorage);\n contextManager.setContext(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 const rawContext = localStorage.getItem(storageKey);\n return rawContext !== null ? JSON.parse(rawContext) : {};\n }\n}\nfunction buildStorageKey(productKey, customerDataType) {\n return `${CONTEXT_STORE_KEY_PREFIX}_${productKey}_${customerDataType}`;\n}",
1120
+ "originalLength": 1393,
1121
+ "removedExports": [
1122
+ "removeStorageListeners"
1123
+ ],
1124
+ "renderedExports": [
1125
+ "storeContextManager",
1126
+ "buildStorageKey"
1127
+ ],
1128
+ "renderedLength": 1113
1129
+ },
1130
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/context/customerDataTracker.js": {
1131
+ "code": "// 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\nconst CUSTOMER_DATA_BYTES_LIMIT = 3 * 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.\nconst CUSTOMER_COMPRESSED_DATA_BYTES_LIMIT = 16 * ONE_KIBI_BYTE;\nconst BYTES_COMPUTATION_THROTTLING_DELAY = 200;\nfunction createCustomerDataTrackerManager(compressionStatus = 2 /* CustomerDataCompressionStatus.Disabled */) {\n const customerDataTrackers = new Map();\n let alreadyWarned = false;\n function checkCustomerDataLimit(initialBytesCount = 0) {\n if (alreadyWarned || compressionStatus === 0 /* CustomerDataCompressionStatus.Unknown */) {\n return;\n }\n const bytesCountLimit = compressionStatus === 2 /* CustomerDataCompressionStatus.Disabled */\n ? CUSTOMER_DATA_BYTES_LIMIT\n : CUSTOMER_COMPRESSED_DATA_BYTES_LIMIT;\n let bytesCount = initialBytesCount;\n customerDataTrackers.forEach((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: () => {\n const tracker = createCustomerDataTracker(() => checkCustomerDataLimit(tracker.getBytesCount()));\n return tracker;\n },\n /**\n * Creates a tracker if it doesn't exist, and returns it.\n */\n getOrCreateTracker: (type) => {\n if (!customerDataTrackers.has(type)) {\n customerDataTrackers.set(type, createCustomerDataTracker(checkCustomerDataLimit));\n }\n return customerDataTrackers.get(type);\n },\n setCompressionStatus: (newCompressionStatus) => {\n if (compressionStatus === 0 /* CustomerDataCompressionStatus.Unknown */) {\n compressionStatus = newCompressionStatus;\n checkCustomerDataLimit();\n }\n },\n getCompressionStatus: () => compressionStatus,\n stop: () => {\n customerDataTrackers.forEach((tracker) => tracker.stop());\n customerDataTrackers.clear();\n },\n };\n}\nfunction createCustomerDataTracker(checkCustomerDataLimit) {\n let 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 const { throttled: computeBytesCountThrottled, cancel: cancelComputeBytesCount } = throttle((context) => {\n bytesCountCache = computeBytesCount(jsonStringify(context));\n checkCustomerDataLimit();\n }, BYTES_COMPUTATION_THROTTLING_DELAY);\n const resetBytesCount = () => {\n cancelComputeBytesCount();\n bytesCountCache = 0;\n };\n return {\n updateCustomerData: (context) => {\n if (isEmptyObject(context)) {\n resetBytesCount();\n }\n else {\n computeBytesCountThrottled(context);\n }\n },\n resetCustomerData: resetBytesCount,\n getBytesCount: () => bytesCountCache,\n stop: () => {\n cancelComputeBytesCount();\n },\n };\n}\nfunction displayCustomerDataLimitReachedWarning(bytesCountLimit) {\n display.warn(`Customer data exceeds the recommended ${bytesCountLimit / ONE_KIBI_BYTE}KiB threshold. ${MORE_DETAILS} ${DOCS_TROUBLESHOOTING}/#customer-data-exceeds-the-recommended-threshold-warning`);\n}",
1132
+ "originalLength": 4782,
1133
+ "removedExports": [],
1134
+ "renderedExports": [
1135
+ "CUSTOMER_DATA_BYTES_LIMIT",
1136
+ "CUSTOMER_COMPRESSED_DATA_BYTES_LIMIT",
1137
+ "BYTES_COMPUTATION_THROTTLING_DELAY",
1138
+ "createCustomerDataTrackerManager",
1139
+ "createCustomerDataTracker"
1140
+ ],
1141
+ "renderedLength": 4340
1142
+ },
1143
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/readBytesFromStream.js": {
1144
+ "code": "/**\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 const reader = stream.getReader();\n let readBytesCount = 0;\n readMore();\n function readMore() {\n reader.read().then(monitor((result) => {\n if (result.done) {\n onDone();\n return;\n }\n readBytesCount += result.value.length;\n if (readBytesCount > options.bytesLimit) {\n onDone();\n }\n else {\n readMore();\n }\n }), monitor((error) => 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 noop);\n let bytes;\n let limitExceeded;\n callback(undefined, bytes, limitExceeded);\n }\n}",
1145
+ "originalLength": 2270,
1146
+ "removedExports": [],
1147
+ "renderedExports": [
1148
+ "readBytesFromStream"
1149
+ ],
1150
+ "renderedLength": 1147
1151
+ },
1152
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/synthetics/syntheticsWorkerValues.js": {
1153
+ "code": "const SYNTHETICS_TEST_ID_COOKIE_NAME = 'datadog-synthetics-public-id';\nconst SYNTHETICS_RESULT_ID_COOKIE_NAME = 'datadog-synthetics-result-id';\nconst SYNTHETICS_INJECTS_RUM_COOKIE_NAME = 'datadog-synthetics-injects-rum';\nfunction willSyntheticsInjectRum() {\n return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM || getInitCookie(SYNTHETICS_INJECTS_RUM_COOKIE_NAME));\n}\nfunction getSyntheticsTestId() {\n const value = window._DATADOG_SYNTHETICS_PUBLIC_ID || getInitCookie(SYNTHETICS_TEST_ID_COOKIE_NAME);\n return typeof value === 'string' ? value : undefined;\n}\nfunction getSyntheticsResultId() {\n const value = window._DATADOG_SYNTHETICS_RESULT_ID || getInitCookie(SYNTHETICS_RESULT_ID_COOKIE_NAME);\n return typeof value === 'string' ? value : undefined;\n}",
1154
+ "originalLength": 919,
1155
+ "removedExports": [],
1156
+ "renderedExports": [
1157
+ "SYNTHETICS_TEST_ID_COOKIE_NAME",
1158
+ "SYNTHETICS_RESULT_ID_COOKIE_NAME",
1159
+ "SYNTHETICS_INJECTS_RUM_COOKIE_NAME",
1160
+ "willSyntheticsInjectRum",
1161
+ "getSyntheticsTestId",
1162
+ "getSyntheticsResultId"
1163
+ ],
1164
+ "renderedLength": 772
1165
+ },
1166
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/resourceUtils.js": {
1167
+ "code": null,
1168
+ "originalLength": 52,
1169
+ "removedExports": [],
1170
+ "renderedExports": [],
1171
+ "renderedLength": 0
1172
+ },
1173
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/tools/matchOption.js": {
1174
+ "code": "function isMatchOption(item) {\n const itemType = 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 = false) {\n return list.some((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 ? value.startsWith(item) : item === value;\n }\n }\n catch (e) {\n display.error(e);\n }\n return false;\n });\n}",
1175
+ "originalLength": 1082,
1176
+ "removedExports": [],
1177
+ "renderedExports": [
1178
+ "isMatchOption",
1179
+ "matchList"
1180
+ ],
1181
+ "renderedLength": 946
1182
+ },
1183
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/deflate/deflate.types.js": {
1184
+ "code": null,
1185
+ "originalLength": 52,
1186
+ "removedExports": [],
1187
+ "renderedExports": [],
1188
+ "renderedLength": 0
1189
+ },
1190
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/domain/deflate/index.js": {
1191
+ "code": null,
1192
+ "originalLength": 66,
1193
+ "removedExports": [],
1194
+ "renderedExports": [],
1195
+ "renderedLength": 0
1196
+ },
1197
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-core/esm/index.js": {
1198
+ "code": null,
1199
+ "originalLength": 4955,
1200
+ "removedExports": [],
1201
+ "renderedExports": [],
1202
+ "renderedLength": 0
1203
+ },
1204
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/commonContext.js": {
1205
+ "code": "function buildCommonContext(globalContextManager, userContextManager, recorderApi) {\n return {\n context: globalContextManager.getContext(),\n user: userContextManager.getContext(),\n hasReplay: recorderApi.isRecording() ? true : undefined,\n };\n}",
1206
+ "originalLength": 319,
1207
+ "removedExports": [],
1208
+ "renderedExports": [
1209
+ "buildCommonContext"
1210
+ ],
1211
+ "renderedLength": 270
1212
+ },
1213
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/vital/vitalCollection.js": {
1214
+ "code": "function createCustomVitalsState() {\n const vitalsByName = new Map();\n const vitalsByReference = new WeakMap();\n return { vitalsByName, vitalsByReference };\n}\nfunction startVitalCollection(lifeCycle, pageStateHistory, customVitalsState) {\n function isValid(vital) {\n return !pageStateHistory.wasInPageStateDuringPeriod(\"frozen\" /* PageState.FROZEN */, vital.startClocks.relative, vital.duration);\n }\n function addDurationVital(vital) {\n if (isValid(vital)) {\n lifeCycle.notify(11 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, processVital(vital));\n }\n }\n return {\n addDurationVital,\n startDurationVital: (name, options = {}) => startDurationVital(customVitalsState, name, options),\n stopDurationVital: (nameOrRef, options = {}) => {\n stopDurationVital(addDurationVital, customVitalsState, nameOrRef, options);\n },\n };\n}\nfunction startDurationVital({ vitalsByName, vitalsByReference }, name, options = {}) {\n const vital = {\n name,\n startClocks: clocksNow(),\n context: options.context,\n description: options.description,\n };\n // To avoid leaking implementation details of the vital, we return a reference to it.\n const reference = { __dd_vital_reference: true };\n vitalsByName.set(name, vital);\n // To avoid memory leaks caused by the creation of numerous references (e.g., from improper useEffect implementations), we use a WeakMap.\n vitalsByReference.set(reference, vital);\n return reference;\n}\nfunction stopDurationVital(stopCallback, { vitalsByName, vitalsByReference }, nameOrRef, options = {}) {\n const vitalStart = typeof nameOrRef === 'string' ? vitalsByName.get(nameOrRef) : vitalsByReference.get(nameOrRef);\n if (!vitalStart) {\n return;\n }\n stopCallback(buildDurationVital(vitalStart, vitalStart.startClocks, options, clocksNow()));\n if (typeof nameOrRef === 'string') {\n vitalsByName.delete(nameOrRef);\n }\n else {\n vitalsByReference.delete(nameOrRef);\n }\n}\nfunction buildDurationVital(vitalStart, startClocks, stopOptions, stopClocks) {\n var _a;\n return {\n name: vitalStart.name,\n type: \"duration\" /* VitalType.DURATION */,\n startClocks,\n duration: elapsed(startClocks.timeStamp, stopClocks.timeStamp),\n context: combine(vitalStart.context, stopOptions.context),\n description: (_a = stopOptions.description) !== null && _a !== void 0 ? _a : vitalStart.description,\n };\n}\nfunction processVital(vital, valueComputedBySdk) {\n const rawRumEvent = {\n date: vital.startClocks.timeStamp,\n vital: {\n id: generateUUID(),\n type: vital.type,\n name: vital.name,\n duration: toServerDuration(vital.duration),\n description: vital.description,\n },\n type: \"vital\" /* RumEventType.VITAL */,\n };\n {\n rawRumEvent._dd = {\n vital: {\n computed_value: true,\n },\n };\n }\n return {\n rawRumEvent,\n startTime: vital.startClocks.relative,\n customerContext: vital.context,\n domainContext: {},\n };\n}",
1215
+ "originalLength": 3410,
1216
+ "removedExports": [],
1217
+ "renderedExports": [
1218
+ "createCustomVitalsState",
1219
+ "startVitalCollection",
1220
+ "startDurationVital",
1221
+ "stopDurationVital"
1222
+ ],
1223
+ "renderedLength": 3207
1224
+ },
1225
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/crypto.js": {
1226
+ "code": "function getCrypto() {\n // TODO: remove msCrypto when IE11 support is dropped\n return window.crypto || window.msCrypto;\n}",
1227
+ "originalLength": 169,
1228
+ "removedExports": [],
1229
+ "renderedExports": [
1230
+ "getCrypto"
1231
+ ],
1232
+ "renderedLength": 127
1233
+ },
1234
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/tracing/identifier.js": {
1235
+ "code": "function createTraceIdentifier() {\n return createIdentifier(64);\n}\nfunction createSpanIdentifier() {\n return createIdentifier(63);\n}\nlet createIdentifierImplementationCache;\nfunction createIdentifier(bits) {\n if (!createIdentifierImplementationCache) {\n createIdentifierImplementationCache =\n isExperimentalFeatureEnabled(ExperimentalFeature.CONSISTENT_TRACE_SAMPLING) && areBigIntIdentifiersSupported()\n ? createIdentifierUsingBigInt\n : createIdentifierUsingUint32Array;\n }\n return createIdentifierImplementationCache(bits);\n}\nfunction areBigIntIdentifiersSupported() {\n try {\n crypto.getRandomValues(new BigUint64Array(1));\n return true;\n }\n catch (_a) {\n return false;\n }\n}\nfunction createIdentifierUsingBigInt(bits) {\n let id = crypto.getRandomValues(new BigUint64Array(1))[0];\n if (bits === 63) {\n // eslint-disable-next-line no-bitwise\n id >>= BigInt('1');\n }\n return id;\n}\n// TODO: remove this when all browser we support have BigInt support\nfunction createIdentifierUsingUint32Array(bits) {\n const buffer = getCrypto().getRandomValues(new Uint32Array(2));\n if (bits === 63) {\n // eslint-disable-next-line no-bitwise\n buffer[buffer.length - 1] >>>= 1; // force 63-bit\n }\n return {\n toString(radix = 10) {\n let high = buffer[1];\n let low = buffer[0];\n let str = '';\n do {\n const mod = (high % radix) * 4294967296 + low;\n high = Math.floor(high / radix);\n low = Math.floor(mod / radix);\n str = (mod % radix).toString(radix) + str;\n } while (high || low);\n return str;\n },\n };\n}\nfunction toPaddedHexadecimalString(id) {\n const traceId = id.toString(16);\n // TODO: replace with String.prototype.padStart when we drop IE11 support\n return Array(17 - traceId.length).join('0') + traceId;\n}",
1236
+ "originalLength": 2198,
1237
+ "removedExports": [],
1238
+ "renderedExports": [
1239
+ "createTraceIdentifier",
1240
+ "createSpanIdentifier",
1241
+ "areBigIntIdentifiersSupported",
1242
+ "toPaddedHexadecimalString"
1243
+ ],
1244
+ "renderedLength": 1990
1245
+ },
1246
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/tracing/sampler.js": {
1247
+ "code": "function isTraceSampled(identifier, sampleRate) {\n // Shortcuts for common cases. This is not strictly necessary, but it makes the code faster for\n // customers willing to ingest all traces.\n if (sampleRate === 100) {\n return true;\n }\n if (sampleRate === 0) {\n return false;\n }\n // For simplicity, we don't use consistent sampling for browser that don't support BigInt\n // TODO: remove this when all browser we support have BigInt support\n if (typeof identifier !== 'bigint') {\n return performDraw(sampleRate);\n }\n // Offer consistent sampling for the same trace id across different environments. The rule is:\n //\n // (identifier * knuthFactor) % 2^64 < sampleRate * 2^64\n //\n // Because JavaScript numbers are 64-bit floats, we can't represent 64-bit integers, and the\n // modulo would be incorrect. Thus, we are using BigInts here.\n //\n // Implementation in other languages:\n // * Go https://github.com/DataDog/dd-trace-go/blob/ec6fbb1f2d517b7b8e69961052adf7136f3af773/ddtrace/tracer/sampler.go#L86-L91\n // * Python https://github.com/DataDog/dd-trace-py/blob/0cee2f066fb6e79aa15947c1514c0f406dea47c5/ddtrace/sampling_rule.py#L197\n // * Ruby https://github.com/DataDog/dd-trace-rb/blob/1a6e255cdcb7e7e22235ea5955f90f6dfa91045d/lib/datadog/tracing/sampling/rate_sampler.rb#L42\n // * C++ https://github.com/DataDog/dd-trace-cpp/blob/159629edc438ae45f2bb318eb7bd51abd05e94b5/src/datadog/trace_sampler.cpp#L58\n // * Java https://github.com/DataDog/dd-trace-java/blob/896dd6b380533216e0bdee59614606c8272d313e/dd-trace-core/src/main/java/datadog/trace/common/sampling/DeterministicSampler.java#L48\n //\n // Note: All implementations have slight variations. Some of them use '<=' instead of '<', and\n // use `sampleRate * 2^64 - 1` instead of `sampleRate * 2^64`. The following implementation\n // should adhere to the spec and is a bit simpler than using a 2^64-1 limit as there are less\n // BigInt arithmetic to write. In practice this does not matter, as we are using floating point\n // numbers in the end, and Number(2n**64n-1n) === Number(2n**64n).\n const knuthFactor = BigInt('1111111111111111111');\n const twoPow64 = BigInt('0x10000000000000000'); // 2n ** 64n\n const hash = (identifier * knuthFactor) % twoPow64;\n return Number(hash) <= (sampleRate / 100) * Number(twoPow64);\n}",
1248
+ "originalLength": 2507,
1249
+ "removedExports": [],
1250
+ "renderedExports": [
1251
+ "isTraceSampled"
1252
+ ],
1253
+ "renderedLength": 2411
1254
+ },
1255
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/tracing/tracer.js": {
1256
+ "code": "function isTracingOption(item) {\n const expectedItem = item;\n return (getType(expectedItem) === 'object' &&\n isMatchOption(expectedItem.match) &&\n Array.isArray(expectedItem.propagatorTypes));\n}\n/**\n * Clear tracing information to avoid incomplete traces. Ideally, we should do it when the\n * request did not reach the server, but the browser does not expose this. So, we clear tracing\n * information if the request ended with status 0 without being aborted by the application.\n *\n * Reasoning:\n *\n * * Applications are usually aborting requests after a bit of time, for example when the user is\n * typing (autocompletion) or navigating away (in a SPA). With a performant device and good\n * network conditions, the request is likely to reach the server before being canceled.\n *\n * * Requests aborted otherwise (ex: lack of internet, CORS issue, blocked by a privacy extension)\n * are likely to finish quickly and without reaching the server.\n *\n * Of course, it might not be the case every time, but it should limit having incomplete traces a\n * bit.\n * */\nfunction clearTracingIfNeeded(context) {\n if (context.status === 0 && !context.isAborted) {\n context.traceId = undefined;\n context.spanId = undefined;\n context.traceSampled = undefined;\n }\n}\nfunction startTracer(configuration, sessionManager) {\n return {\n clearTracingIfNeeded,\n traceFetch: (context) => injectHeadersIfTracingAllowed(configuration, context, sessionManager, (tracingHeaders) => {\n var _a;\n if (context.input instanceof Request && !((_a = context.init) === null || _a === void 0 ? void 0 : _a.headers)) {\n context.input = new Request(context.input);\n Object.keys(tracingHeaders).forEach((key) => {\n context.input.headers.append(key, tracingHeaders[key]);\n });\n }\n else {\n context.init = shallowClone(context.init);\n const headers = [];\n if (context.init.headers instanceof Headers) {\n context.init.headers.forEach((value, key) => {\n headers.push([key, value]);\n });\n }\n else if (Array.isArray(context.init.headers)) {\n context.init.headers.forEach((header) => {\n headers.push(header);\n });\n }\n else if (context.init.headers) {\n Object.keys(context.init.headers).forEach((key) => {\n headers.push([key, context.init.headers[key]]);\n });\n }\n context.init.headers = headers.concat(objectEntries(tracingHeaders));\n }\n }),\n traceXhr: (context, xhr) => injectHeadersIfTracingAllowed(configuration, context, sessionManager, (tracingHeaders) => {\n Object.keys(tracingHeaders).forEach((name) => {\n xhr.setRequestHeader(name, tracingHeaders[name]);\n });\n }),\n };\n}\nfunction injectHeadersIfTracingAllowed(configuration, context, sessionManager, inject) {\n if (!isTracingSupported() || !sessionManager.findTrackedSession()) {\n return;\n }\n const tracingOption = configuration.allowedTracingUrls.find((tracingOption) => matchList([tracingOption.match], context.url, true));\n if (!tracingOption) {\n return;\n }\n const traceId = createTraceIdentifier();\n context.traceSampled = isTraceSampled(traceId, configuration.traceSampleRate);\n const shouldInjectHeaders = context.traceSampled || configuration.traceContextInjection === TraceContextInjection.ALL;\n if (!shouldInjectHeaders) {\n return;\n }\n context.traceId = traceId;\n context.spanId = createSpanIdentifier();\n inject(makeTracingHeaders(context.traceId, context.spanId, context.traceSampled, tracingOption.propagatorTypes));\n}\nfunction isTracingSupported() {\n return getCrypto() !== undefined;\n}\n/**\n * When trace is not sampled, set priority to '0' instead of not adding the tracing headers\n * to prepare the implementation for sampling delegation.\n */\nfunction makeTracingHeaders(traceId, spanId, traceSampled, propagatorTypes) {\n const tracingHeaders = {};\n propagatorTypes.forEach((propagatorType) => {\n switch (propagatorType) {\n case 'datadog': {\n Object.assign(tracingHeaders, {\n 'x-datadog-origin': 'rum',\n 'x-datadog-parent-id': spanId.toString(),\n 'x-datadog-sampling-priority': traceSampled ? '1' : '0',\n 'x-datadog-trace-id': traceId.toString(),\n });\n break;\n }\n // https://www.w3.org/TR/trace-context/\n case 'tracecontext': {\n Object.assign(tracingHeaders, {\n traceparent: `00-0000000000000000${toPaddedHexadecimalString(traceId)}-${toPaddedHexadecimalString(spanId)}-0${traceSampled ? '1' : '0'}`,\n tracestate: `dd=s:${traceSampled ? '1' : '0'};o:rum`,\n });\n break;\n }\n // https://github.com/openzipkin/b3-propagation\n case 'b3': {\n Object.assign(tracingHeaders, {\n b3: `${toPaddedHexadecimalString(traceId)}-${toPaddedHexadecimalString(spanId)}-${traceSampled ? '1' : '0'}`,\n });\n break;\n }\n case 'b3multi': {\n Object.assign(tracingHeaders, {\n 'X-B3-TraceId': toPaddedHexadecimalString(traceId),\n 'X-B3-SpanId': toPaddedHexadecimalString(spanId),\n 'X-B3-Sampled': traceSampled ? '1' : '0',\n });\n break;\n }\n }\n });\n return tracingHeaders;\n}",
1257
+ "originalLength": 6305,
1258
+ "removedExports": [],
1259
+ "renderedExports": [
1260
+ "isTracingOption",
1261
+ "clearTracingIfNeeded",
1262
+ "startTracer",
1263
+ "isTracingSupported"
1264
+ ],
1265
+ "renderedLength": 5895
1266
+ },
1267
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/configuration/configuration.js": {
1268
+ "code": "const DEFAULT_PROPAGATOR_TYPES = ['tracecontext', 'datadog'];\nfunction validateAndBuildRumConfiguration(initConfiguration) {\n var _a, _b, _c, _d, _e, _f;\n if (!initConfiguration.applicationId) {\n display.error('Application ID is not configured, no RUM data will be collected.');\n return;\n }\n if (!isSampleRate(initConfiguration.sessionReplaySampleRate, 'Session Replay') ||\n !isSampleRate(initConfiguration.traceSampleRate, 'Trace')) {\n return;\n }\n if (initConfiguration.excludedActivityUrls !== undefined && !Array.isArray(initConfiguration.excludedActivityUrls)) {\n display.error('Excluded Activity Urls should be an array');\n return;\n }\n const allowedTracingUrls = validateAndBuildTracingOptions(initConfiguration);\n if (!allowedTracingUrls) {\n return;\n }\n const baseConfiguration = validateAndBuildConfiguration(initConfiguration);\n if (!baseConfiguration) {\n return;\n }\n const sessionReplaySampleRate = (_a = initConfiguration.sessionReplaySampleRate) !== null && _a !== void 0 ? _a : 0;\n return {\n applicationId: initConfiguration.applicationId,\n version: initConfiguration.version || undefined,\n actionNameAttribute: initConfiguration.actionNameAttribute,\n 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: isNumber(initConfiguration.traceSampleRate) ? initConfiguration.traceSampleRate / 100 : undefined,\n allowedTracingUrls,\n excludedActivityUrls: (_c = initConfiguration.excludedActivityUrls) !== null && _c !== void 0 ? _c : [],\n workerUrl: initConfiguration.workerUrl,\n compressIntakeRequests: !!initConfiguration.compressIntakeRequests,\n trackUserInteractions: !!((_d = initConfiguration.trackUserInteractions) !== null && _d !== void 0 ? _d : true),\n trackViewsManually: !!initConfiguration.trackViewsManually,\n trackResources: !!((_e = initConfiguration.trackResources) !== null && _e !== void 0 ? _e : true),\n trackLongTasks: !!((_f = initConfiguration.trackLongTasks) !== null && _f !== void 0 ? _f : true),\n subdomain: initConfiguration.subdomain,\n defaultPrivacyLevel: objectHasValue(DefaultPrivacyLevel, initConfiguration.defaultPrivacyLevel)\n ? initConfiguration.defaultPrivacyLevel\n : DefaultPrivacyLevel.MASK,\n enablePrivacyForActionName: !!initConfiguration.enablePrivacyForActionName,\n customerDataTelemetrySampleRate: 1,\n traceContextInjection: objectHasValue(TraceContextInjection, initConfiguration.traceContextInjection)\n ? initConfiguration.traceContextInjection\n : TraceContextInjection.SAMPLED,\n plugins: initConfiguration.plugins || [],\n ...baseConfiguration,\n };\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 display.error('Allowed Tracing URLs should be an array');\n return;\n }\n if (initConfiguration.allowedTracingUrls.length !== 0 && initConfiguration.service === undefined) {\n 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 const tracingOptions = [];\n initConfiguration.allowedTracingUrls.forEach((option) => {\n if (isMatchOption(option)) {\n tracingOptions.push({ match: option, propagatorTypes: DEFAULT_PROPAGATOR_TYPES });\n }\n else if (isTracingOption(option)) {\n tracingOptions.push(option);\n }\n else {\n 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 const usedTracingPropagators = new Set();\n if (Array.isArray(configuration.allowedTracingUrls) && configuration.allowedTracingUrls.length > 0) {\n configuration.allowedTracingUrls.forEach((option) => {\n if (isMatchOption(option)) {\n DEFAULT_PROPAGATOR_TYPES.forEach((propagatorType) => usedTracingPropagators.add(propagatorType));\n }\n else if (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((propagatorType) => usedTracingPropagators.add(propagatorType));\n }\n });\n }\n return Array.from(usedTracingPropagators);\n}\nfunction serializeRumConfiguration(configuration) {\n var _a;\n const baseSerializedConfiguration = serializeConfiguration(configuration);\n return {\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((plugin) => {\n var _a;\n return ({\n name: plugin.name,\n ...(_a = plugin.getConfigurationTelemetry) === null || _a === void 0 ? void 0 : _a.call(plugin),\n });\n }),\n ...baseSerializedConfiguration,\n };\n}",
1269
+ "originalLength": 7354,
1270
+ "removedExports": [],
1271
+ "renderedExports": [
1272
+ "DEFAULT_PROPAGATOR_TYPES",
1273
+ "validateAndBuildRumConfiguration",
1274
+ "serializeRumConfiguration"
1275
+ ],
1276
+ "renderedLength": 7025
1277
+ },
1278
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/configuration/remoteConfiguration.js": {
1279
+ "code": "const REMOTE_CONFIGURATION_URL = 'https://d3uc069fcn7uxw.cloudfront.net/configuration';\nfunction fetchAndApplyRemoteConfiguration(initConfiguration, callback) {\n fetchRemoteConfiguration(initConfiguration, (remoteInitConfiguration) => {\n callback(applyRemoteConfiguration(initConfiguration, remoteInitConfiguration));\n });\n}\nfunction applyRemoteConfiguration(initConfiguration, remoteInitConfiguration) {\n return { ...initConfiguration, ...remoteInitConfiguration };\n}\nfunction fetchRemoteConfiguration(configuration, callback) {\n const xhr = new XMLHttpRequest();\n addEventListener(configuration, xhr, 'load', function () {\n if (xhr.status === 200) {\n callback(JSON.parse(xhr.responseText));\n }\n else {\n displayRemoteConfigurationFetchingError();\n }\n });\n addEventListener(configuration, xhr, 'error', function () {\n displayRemoteConfigurationFetchingError();\n });\n xhr.open('GET', `${REMOTE_CONFIGURATION_URL}/${encodeURIComponent(configuration.remoteConfigurationId)}.json`);\n xhr.send();\n}\nfunction displayRemoteConfigurationFetchingError() {\n display.error('Error fetching the remote configuration.');\n}",
1280
+ "originalLength": 1348,
1281
+ "removedExports": [],
1282
+ "renderedExports": [
1283
+ "REMOTE_CONFIGURATION_URL",
1284
+ "fetchAndApplyRemoteConfiguration",
1285
+ "applyRemoteConfiguration",
1286
+ "fetchRemoteConfiguration"
1287
+ ],
1288
+ "renderedLength": 1205
1289
+ },
1290
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/configuration/index.js": {
1291
+ "code": null,
1292
+ "originalLength": 105,
1293
+ "removedExports": [],
1294
+ "renderedExports": [],
1295
+ "renderedLength": 0
1296
+ },
1297
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/plugins.js": {
1298
+ "code": "function callPluginsMethod(plugins, methodName, parameter) {\n if (!plugins) {\n return;\n }\n for (const plugin of plugins) {\n const method = plugin[methodName];\n if (method) {\n method(parameter);\n }\n }\n}",
1299
+ "originalLength": 295,
1300
+ "removedExports": [],
1301
+ "renderedExports": [
1302
+ "callPluginsMethod"
1303
+ ],
1304
+ "renderedLength": 252
1305
+ },
1306
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/boot/preStartRum.js": {
1307
+ "code": "function createPreStartStrategy$1({ ignoreInitIfSyntheticsWillInjectRum, startDeflateWorker }, getCommonContext, trackingConsentState, customVitalsState, doStartRum) {\n const bufferApiCalls = createBoundedBuffer();\n let firstStartViewCall;\n let deflateWorker;\n let cachedInitConfiguration;\n let cachedConfiguration;\n const trackingConsentStateSubscription = trackingConsentState.observable.subscribe(tryStartRum);\n function tryStartRum() {\n if (!cachedInitConfiguration || !cachedConfiguration || !trackingConsentState.isGranted()) {\n return;\n }\n trackingConsentStateSubscription.unsubscribe();\n let 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 const startRumResult = doStartRum(cachedConfiguration, deflateWorker, initialViewOptions);\n bufferApiCalls.drain(startRumResult);\n }\n function doInit(initConfiguration) {\n const eventBridgeAvailable = 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 addTelemetryConfiguration(serializeRumConfiguration(initConfiguration));\n if (cachedConfiguration) {\n displayAlreadyInitializedError('DD_RUM', initConfiguration);\n return;\n }\n const configuration = validateAndBuildRumConfiguration(initConfiguration);\n if (!configuration) {\n return;\n }\n if (!eventBridgeAvailable && !configuration.sessionStoreStrategyType) {\n 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 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 initFetchObservable().subscribe(noop);\n trackingConsentState.tryToInit(configuration.trackingConsent);\n tryStartRum();\n }\n const addDurationVital = (vital) => {\n bufferApiCalls.add((startRumResult) => startRumResult.addDurationVital(vital));\n };\n return {\n init(initConfiguration, publicApi) {\n if (!initConfiguration) {\n 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 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 && willSyntheticsInjectRum()) {\n return;\n }\n callPluginsMethod(initConfiguration.plugins, 'onInit', { initConfiguration, publicApi });\n if (initConfiguration.remoteConfigurationId &&\n isExperimentalFeatureEnabled(ExperimentalFeature.REMOTE_CONFIGURATION)) {\n fetchAndApplyRemoteConfiguration(initConfiguration, doInit);\n }\n else {\n doInit(initConfiguration);\n }\n },\n get initConfiguration() {\n return cachedInitConfiguration;\n },\n getInternalContext: noop,\n stopSession: noop,\n addTiming(name, time = timeStampNow()) {\n bufferApiCalls.add((startRumResult) => startRumResult.addTiming(name, time));\n },\n startView(options, startClocks = clocksNow()) {\n const callback = (startRumResult) => {\n startRumResult.startView(options, startClocks);\n };\n bufferApiCalls.add(callback);\n if (!firstStartViewCall) {\n firstStartViewCall = { options, callback };\n tryStartRum();\n }\n },\n setViewName(name) {\n bufferApiCalls.add((startRumResult) => startRumResult.setViewName(name));\n },\n setViewContext(context) {\n bufferApiCalls.add((startRumResult) => startRumResult.setViewContext(context));\n },\n setViewContextProperty(key, value) {\n bufferApiCalls.add((startRumResult) => startRumResult.setViewContextProperty(key, value));\n },\n addAction(action, commonContext = getCommonContext()) {\n bufferApiCalls.add((startRumResult) => startRumResult.addAction(action, commonContext));\n },\n addError(providedError, commonContext = getCommonContext()) {\n bufferApiCalls.add((startRumResult) => startRumResult.addError(providedError, commonContext));\n },\n addFeatureFlagEvaluation(key, value) {\n bufferApiCalls.add((startRumResult) => startRumResult.addFeatureFlagEvaluation(key, value));\n },\n startDurationVital(name, options) {\n return startDurationVital(customVitalsState, name, options);\n },\n stopDurationVital(name, options) {\n stopDurationVital(addDurationVital, customVitalsState, name, options);\n },\n addDurationVital,\n };\n}\nfunction overrideInitConfigurationForBridge(initConfiguration) {\n var _a, _b;\n return {\n ...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 = getEventBridge()) === null || _b === void 0 ? void 0 : _b.getPrivacyLevel(),\n };\n}",
1308
+ "originalLength": 8320,
1309
+ "removedExports": [],
1310
+ "renderedExports": [
1311
+ "createPreStartStrategy"
1312
+ ],
1313
+ "renderedLength": 7640
1314
+ },
1315
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/boot/rumPublicApi.js": {
1316
+ "code": "const RUM_STORAGE_KEY = 'rum';\nfunction makeRumPublicApi(startRumImpl, recorderApi, options = {}) {\n const customerDataTrackerManager = createCustomerDataTrackerManager(0 /* CustomerDataCompressionStatus.Unknown */);\n const globalContextManager = createContextManager(customerDataTrackerManager.getOrCreateTracker(2 /* CustomerDataType.GlobalContext */));\n const userContextManager = createContextManager(customerDataTrackerManager.getOrCreateTracker(1 /* CustomerDataType.User */));\n const trackingConsentState = createTrackingConsentState();\n const customVitalsState = createCustomVitalsState();\n function getCommonContext() {\n return buildCommonContext(globalContextManager, userContextManager, recorderApi);\n }\n let strategy = createPreStartStrategy$1(options, getCommonContext, trackingConsentState, customVitalsState, (configuration, deflateWorker, initialViewOptions) => {\n if (configuration.storeContextsAcrossPages) {\n storeContextManager(configuration, globalContextManager, RUM_STORAGE_KEY, 2 /* CustomerDataType.GlobalContext */);\n storeContextManager(configuration, userContextManager, RUM_STORAGE_KEY, 1 /* CustomerDataType.User */);\n }\n customerDataTrackerManager.setCompressionStatus(deflateWorker ? 1 /* CustomerDataCompressionStatus.Enabled */ : 2 /* CustomerDataCompressionStatus.Disabled */);\n const startRumResult = startRumImpl(configuration, recorderApi, customerDataTrackerManager, getCommonContext, initialViewOptions, deflateWorker && options.createDeflateEncoder\n ? (streamId) => options.createDeflateEncoder(configuration, deflateWorker, streamId)\n : createIdentityEncoder, trackingConsentState, customVitalsState);\n recorderApi.onRumStart(startRumResult.lifeCycle, configuration, startRumResult.session, startRumResult.viewHistory, deflateWorker);\n strategy = createPostStartStrategy$1(strategy, startRumResult);\n return startRumResult;\n });\n const startView = monitor((options) => {\n const 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 addTelemetryUsage({ feature: 'start-view' });\n });\n const rumPublicApi = makePublicApi({\n init: monitor((initConfiguration) => {\n strategy.init(initConfiguration, rumPublicApi);\n }),\n setTrackingConsent: monitor((trackingConsent) => {\n trackingConsentState.update(trackingConsent);\n addTelemetryUsage({ feature: 'set-tracking-consent', tracking_consent: trackingConsent });\n }),\n setViewName: monitor((name) => {\n strategy.setViewName(name);\n }),\n setViewContext: monitor((context) => {\n strategy.setViewContext(context);\n }),\n setViewContextProperty: monitor((key, value) => {\n strategy.setViewContextProperty(key, value);\n }),\n setGlobalContext: monitor((context) => {\n globalContextManager.setContext(context);\n addTelemetryUsage({ feature: 'set-global-context' });\n }),\n getGlobalContext: monitor(() => globalContextManager.getContext()),\n setGlobalContextProperty: monitor((key, value) => {\n globalContextManager.setContextProperty(key, value);\n addTelemetryUsage({ feature: 'set-global-context' });\n }),\n removeGlobalContextProperty: monitor((key) => globalContextManager.removeContextProperty(key)),\n clearGlobalContext: monitor(() => globalContextManager.clearContext()),\n getInternalContext: monitor((startTime) => strategy.getInternalContext(startTime)),\n getInitConfiguration: monitor(() => deepClone(strategy.initConfiguration)),\n addAction: (name, context) => {\n const handlingStack = createHandlingStack();\n callMonitored(() => {\n strategy.addAction({\n name: sanitize(name),\n context: sanitize(context),\n startClocks: clocksNow(),\n type: \"custom\" /* ActionType.CUSTOM */,\n handlingStack,\n });\n addTelemetryUsage({ feature: 'add-action' });\n });\n },\n addError: (error, context) => {\n const handlingStack = createHandlingStack();\n callMonitored(() => {\n strategy.addError({\n error, // Do not sanitize error here, it is needed unserialized by computeRawError()\n handlingStack,\n context: sanitize(context),\n startClocks: clocksNow(),\n });\n addTelemetryUsage({ feature: 'add-error' });\n });\n },\n addTiming: monitor((name, time) => {\n // TODO: next major decide to drop relative time support or update its behaviour\n strategy.addTiming(sanitize(name), time);\n }),\n setUser: monitor((newUser) => {\n if (checkUser(newUser)) {\n userContextManager.setContext(sanitizeUser(newUser));\n }\n addTelemetryUsage({ feature: 'set-user' });\n }),\n getUser: monitor(() => userContextManager.getContext()),\n setUserProperty: monitor((key, property) => {\n const sanitizedProperty = sanitizeUser({ [key]: property })[key];\n userContextManager.setContextProperty(key, sanitizedProperty);\n addTelemetryUsage({ feature: 'set-user' });\n }),\n removeUserProperty: monitor((key) => userContextManager.removeContextProperty(key)),\n clearUser: monitor(() => userContextManager.clearContext()),\n startView,\n stopSession: monitor(() => {\n strategy.stopSession();\n addTelemetryUsage({ feature: 'stop-session' });\n }),\n addFeatureFlagEvaluation: monitor((key, value) => {\n strategy.addFeatureFlagEvaluation(sanitize(key), sanitize(value));\n addTelemetryUsage({ feature: 'add-feature-flag-evaluation' });\n }),\n getSessionReplayLink: monitor(() => recorderApi.getSessionReplayLink()),\n startSessionReplayRecording: monitor((options) => {\n recorderApi.start(options);\n addTelemetryUsage({ feature: 'start-session-replay-recording', force: options && options.force });\n }),\n stopSessionReplayRecording: monitor(() => recorderApi.stop()),\n addDurationVital: monitor((name, options) => {\n addTelemetryUsage({ feature: 'add-duration-vital' });\n strategy.addDurationVital({\n name: sanitize(name),\n type: \"duration\" /* VitalType.DURATION */,\n startClocks: timeStampToClocks(options.startTime),\n duration: options.duration,\n context: sanitize(options && options.context),\n description: sanitize(options && options.description),\n });\n }),\n startDurationVital: monitor((name, options) => {\n addTelemetryUsage({ feature: 'start-duration-vital' });\n return strategy.startDurationVital(sanitize(name), {\n context: sanitize(options && options.context),\n description: sanitize(options && options.description),\n });\n }),\n stopDurationVital: monitor((nameOrRef, options) => {\n addTelemetryUsage({ feature: 'stop-duration-vital' });\n strategy.stopDurationVital(typeof nameOrRef === 'string' ? sanitize(nameOrRef) : nameOrRef, {\n context: sanitize(options && options.context),\n description: sanitize(options && options.description),\n });\n }),\n });\n return rumPublicApi;\n}\nfunction createPostStartStrategy$1(preStartStrategy, startRumResult) {\n return {\n init: (initConfiguration) => {\n displayAlreadyInitializedError('DD_RUM', initConfiguration);\n },\n initConfiguration: preStartStrategy.initConfiguration,\n ...startRumResult,\n };\n}",
1317
+ "originalLength": 8902,
1318
+ "removedExports": [],
1319
+ "renderedExports": [
1320
+ "makeRumPublicApi"
1321
+ ],
1322
+ "renderedLength": 8302
1323
+ },
1324
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/domMutationObservable.js": {
1325
+ "code": "function createDOMMutationObservable() {\n const MutationObserver = getMutationObserverConstructor();\n return new Observable((observable) => {\n if (!MutationObserver) {\n return;\n }\n const observer = new MutationObserver(monitor(() => observable.notify()));\n observer.observe(document, {\n attributes: true,\n characterData: true,\n childList: true,\n subtree: true,\n });\n return () => observer.disconnect();\n });\n}\nfunction getMutationObserverConstructor() {\n let constructor;\n const 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 = 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 const patchedInstance = new browserWindow.MutationObserver(noop);\n const originalInstance = getZoneJsOriginalValue(patchedInstance, 'originalInstance');\n constructor = originalInstance && originalInstance.constructor;\n }\n }\n if (!constructor) {\n constructor = browserWindow.MutationObserver;\n }\n return constructor;\n}",
1326
+ "originalLength": 2768,
1327
+ "removedExports": [],
1328
+ "renderedExports": [
1329
+ "createDOMMutationObservable",
1330
+ "getMutationObserverConstructor"
1331
+ ],
1332
+ "renderedLength": 2613
1333
+ },
1334
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/windowOpenObservable.js": {
1335
+ "code": "function createWindowOpenObservable() {\n const observable = new Observable();\n const { stop } = instrumentMethod(window, 'open', () => observable.notify());\n return { observable, stop };\n}",
1336
+ "originalLength": 323,
1337
+ "removedExports": [],
1338
+ "renderedExports": [
1339
+ "createWindowOpenObservable"
1340
+ ],
1341
+ "renderedLength": 197
1342
+ },
1343
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/syntheticsContext.js": {
1344
+ "code": "function getSyntheticsContext() {\n const testId = getSyntheticsTestId();\n const resultId = getSyntheticsResultId();\n if (testId && resultId) {\n return {\n test_id: testId,\n result_id: resultId,\n injected: willSyntheticsInjectRum(),\n };\n }\n}",
1345
+ "originalLength": 460,
1346
+ "removedExports": [],
1347
+ "renderedExports": [
1348
+ "getSyntheticsContext"
1349
+ ],
1350
+ "renderedLength": 298
1351
+ },
1352
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/limitModification.js": {
1353
+ "code": "/**\n * Current limitation:\n * - field path do not support array, 'a.b.c' only\n */\nfunction limitModification(object, modifiableFieldPaths, modifier) {\n const clone = deepClone(object);\n const result = modifier(clone);\n objectEntries(modifiableFieldPaths).forEach(([fieldPath, fieldType]) => {\n const newValue = get(clone, fieldPath);\n const newType = getType(newValue);\n if (newType === fieldType) {\n set(object, fieldPath, 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 let current = object;\n for (const field of path.split('.')) {\n if (!isValidObjectContaining(current, field)) {\n return;\n }\n current = current[field];\n }\n return current;\n}\nfunction set(object, path, value) {\n let current = object;\n const fields = path.split('.');\n for (let i = 0; i < fields.length; i += 1) {\n const 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 getType(object) === 'object';\n}\nfunction isValidObjectContaining(object, field) {\n return isValidObject(object) && Object.prototype.hasOwnProperty.call(object, field);\n}",
1354
+ "originalLength": 1674,
1355
+ "removedExports": [],
1356
+ "renderedExports": [
1357
+ "limitModification"
1358
+ ],
1359
+ "renderedLength": 1536
1360
+ },
1361
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/assembly.js": {
1362
+ "code": "const VIEW_MODIFIABLE_FIELD_PATHS = {\n 'view.name': 'string',\n 'view.url': 'string',\n 'view.referrer': 'string',\n};\nconst USER_CUSTOMIZABLE_FIELD_PATHS = {\n context: 'object',\n};\nconst ROOT_MODIFIABLE_FIELD_PATHS = {\n service: 'string',\n version: 'string',\n};\nlet modifiableFieldPathsByEvent;\nfunction startRumAssembly(configuration, lifeCycle, sessionManager, viewHistory, urlContexts, actionContexts, displayContext, ciVisibilityContext, getCommonContext, reportError) {\n modifiableFieldPathsByEvent = {\n [\"view\" /* RumEventType.VIEW */]: { ...USER_CUSTOMIZABLE_FIELD_PATHS, ...VIEW_MODIFIABLE_FIELD_PATHS },\n [\"error\" /* RumEventType.ERROR */]: {\n 'error.message': 'string',\n 'error.stack': 'string',\n 'error.resource.url': 'string',\n 'error.fingerprint': 'string',\n ...USER_CUSTOMIZABLE_FIELD_PATHS,\n ...VIEW_MODIFIABLE_FIELD_PATHS,\n ...ROOT_MODIFIABLE_FIELD_PATHS,\n },\n [\"resource\" /* RumEventType.RESOURCE */]: {\n 'resource.url': 'string',\n ...(isExperimentalFeatureEnabled(ExperimentalFeature.WRITABLE_RESOURCE_GRAPHQL)\n ? { 'resource.graphql': 'object' }\n : {}),\n ...USER_CUSTOMIZABLE_FIELD_PATHS,\n ...VIEW_MODIFIABLE_FIELD_PATHS,\n ...ROOT_MODIFIABLE_FIELD_PATHS,\n },\n [\"action\" /* RumEventType.ACTION */]: {\n 'action.target.name': 'string',\n ...USER_CUSTOMIZABLE_FIELD_PATHS,\n ...VIEW_MODIFIABLE_FIELD_PATHS,\n ...ROOT_MODIFIABLE_FIELD_PATHS,\n },\n [\"long_task\" /* RumEventType.LONG_TASK */]: {\n ...USER_CUSTOMIZABLE_FIELD_PATHS,\n ...VIEW_MODIFIABLE_FIELD_PATHS,\n },\n [\"vital\" /* RumEventType.VITAL */]: {\n ...USER_CUSTOMIZABLE_FIELD_PATHS,\n ...VIEW_MODIFIABLE_FIELD_PATHS,\n },\n };\n const eventRateLimiters = {\n [\"error\" /* RumEventType.ERROR */]: createEventRateLimiter(\"error\" /* RumEventType.ERROR */, configuration.eventRateLimiterThreshold, reportError),\n [\"action\" /* RumEventType.ACTION */]: createEventRateLimiter(\"action\" /* RumEventType.ACTION */, configuration.eventRateLimiterThreshold, reportError),\n [\"vital\" /* RumEventType.VITAL */]: createEventRateLimiter(\"vital\" /* RumEventType.VITAL */, configuration.eventRateLimiterThreshold, reportError),\n };\n const syntheticsContext = getSyntheticsContext();\n lifeCycle.subscribe(11 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, ({ startTime, rawRumEvent, domainContext, savedCommonContext, customerContext }) => {\n const viewHistoryEntry = viewHistory.findView(startTime);\n const urlContext = urlContexts.findUrl(startTime);\n const session = sessionManager.findTrackedSession(startTime);\n if (session && viewHistoryEntry && urlContext) {\n const commonContext = savedCommonContext || getCommonContext();\n const actionId = actionContexts.findActionId(startTime);\n const rumContext = {\n _dd: {\n format_version: 2,\n drift: currentDrift(),\n configuration: {\n session_sample_rate: round(configuration.sessionSampleRate, 3),\n session_replay_sample_rate: round(configuration.sessionReplaySampleRate, 3),\n },\n browser_sdk_version: canUseEventBridge() ? \"6.0.0\" : undefined,\n },\n application: {\n id: configuration.applicationId,\n },\n date: 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: getConnectivity(),\n };\n const serverRumEvent = combine(rumContext, rawRumEvent);\n serverRumEvent.context = combine(commonContext.context, viewHistoryEntry.context, customerContext);\n if (!('has_replay' in serverRumEvent.session)) {\n serverRumEvent.session.has_replay = commonContext.hasReplay;\n }\n if (serverRumEvent.type === 'view') {\n serverRumEvent.session.sampled_for_replay =\n session.sessionReplay === 1 /* SessionReplayState.SAMPLED */;\n }\n if (session.anonymousId && !commonContext.user.anonymous_id && !!configuration.trackAnonymousUser) {\n commonContext.user.anonymous_id = session.anonymousId;\n }\n if (!isEmptyObject(commonContext.user)) {\n serverRumEvent.usr = commonContext.user;\n }\n if (shouldSend(serverRumEvent, configuration.beforeSend, domainContext, eventRateLimiters)) {\n if (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 const result = limitModification(event, modifiableFieldPathsByEvent[event.type], (event) => beforeSend(event, domainContext));\n if (result === false && event.type !== \"view\" /* RumEventType.VIEW */) {\n return false;\n }\n if (result === false) {\n display.warn(\"Can't dismiss view events using beforeSend!\");\n }\n }\n const 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}",
1363
+ "originalLength": 7314,
1364
+ "removedExports": [],
1365
+ "renderedExports": [
1366
+ "startRumAssembly"
1367
+ ],
1368
+ "renderedLength": 6870
1369
+ },
1370
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/internalContext.js": {
1371
+ "code": "/**\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: (startTime) => {\n const viewContext = viewHistory.findView(startTime);\n const urlContext = urlContexts.findUrl(startTime);\n const session = sessionManager.findTrackedSession(startTime);\n if (session && viewContext && urlContext) {\n const 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}",
1372
+ "originalLength": 1007,
1373
+ "removedExports": [],
1374
+ "renderedExports": [
1375
+ "startInternalContext"
1376
+ ],
1377
+ "renderedLength": 956
1378
+ },
1379
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/lifeCycle.js": {
1380
+ "code": "const LifeCycle = (AbstractLifeCycle);",
1381
+ "originalLength": 142,
1382
+ "removedExports": [],
1383
+ "renderedExports": [
1384
+ "LifeCycle"
1385
+ ],
1386
+ "renderedLength": 38
1387
+ },
1388
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/viewHistory.js": {
1389
+ "code": "const VIEW_CONTEXT_TIME_OUT_DELAY = SESSION_TIME_OUT_DELAY;\nfunction startViewHistory(lifeCycle) {\n const viewValueHistory = createValueHistory({ expireDelay: VIEW_CONTEXT_TIME_OUT_DELAY });\n lifeCycle.subscribe(1 /* LifeCycleEventType.BEFORE_VIEW_CREATED */, (view) => {\n viewValueHistory.add(buildViewHistoryEntry(view), view.startClocks.relative);\n });\n lifeCycle.subscribe(5 /* LifeCycleEventType.AFTER_VIEW_ENDED */, ({ endClocks }) => {\n viewValueHistory.closeActive(endClocks.relative);\n });\n lifeCycle.subscribe(3 /* LifeCycleEventType.VIEW_UPDATED */, (viewUpdate) => {\n const 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 */, () => {\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: (startTime) => viewValueHistory.find(startTime),\n stop: () => {\n viewValueHistory.stop();\n },\n };\n}",
1390
+ "originalLength": 1613,
1391
+ "removedExports": [],
1392
+ "renderedExports": [
1393
+ "VIEW_CONTEXT_TIME_OUT_DELAY",
1394
+ "startViewHistory"
1395
+ ],
1396
+ "renderedLength": 1475
1397
+ },
1398
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/resource/resourceUtils.js": {
1399
+ "code": "const FAKE_INITIAL_DOCUMENT = 'initial_document';\nconst RESOURCE_TYPES = [\n [\"document\" /* ResourceType.DOCUMENT */, (initiatorType) => FAKE_INITIAL_DOCUMENT === initiatorType],\n [\"xhr\" /* ResourceType.XHR */, (initiatorType) => 'xmlhttprequest' === initiatorType],\n [\"fetch\" /* ResourceType.FETCH */, (initiatorType) => 'fetch' === initiatorType],\n [\"beacon\" /* ResourceType.BEACON */, (initiatorType) => 'beacon' === initiatorType],\n [\"css\" /* ResourceType.CSS */, (_, path) => /\\.css$/i.test(path)],\n [\"js\" /* ResourceType.JS */, (_, path) => /\\.js$/i.test(path)],\n [\n \"image\" /* ResourceType.IMAGE */,\n (initiatorType, path) => ['image', 'img', 'icon'].includes(initiatorType) || /\\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(path) !== null,\n ],\n [\"font\" /* ResourceType.FONT */, (_, path) => /\\.(woff|eot|woff2|ttf)$/i.exec(path) !== null],\n [\n \"media\" /* ResourceType.MEDIA */,\n (initiatorType, path) => ['audio', 'video'].includes(initiatorType) || /\\.(mp3|mp4)$/i.exec(path) !== null,\n ],\n];\nfunction computeResourceEntryType(entry) {\n const url = entry.name;\n if (!isValidUrl(url)) {\n addTelemetryDebug(`Failed to construct URL for \"${entry.name}\"`);\n return \"other\" /* ResourceType.OTHER */;\n }\n const path = getPathName(url);\n for (const [type, isType] of RESOURCE_TYPES) {\n if (isType(entry.initiatorType, path)) {\n return type;\n }\n }\n return \"other\" /* ResourceType.OTHER */;\n}\nfunction areInOrder(...numbers) {\n for (let i = 1; i < numbers.length; i += 1) {\n if (numbers[i - 1] > numbers[i]) {\n return false;\n }\n }\n return true;\n}\nfunction isResourceEntryRequestType(entry) {\n return entry.initiatorType === 'xmlhttprequest' || entry.initiatorType === 'fetch';\n}\nfunction computeResourceEntryDuration(entry) {\n const { duration, startTime, responseEnd } = entry;\n // Safari duration is always 0 on timings blocked by cross origin policies.\n if (duration === 0 && startTime < responseEnd) {\n return toServerDuration(elapsed(startTime, responseEnd));\n }\n return toServerDuration(duration);\n}\nfunction computeResourceEntryDetails(entry) {\n if (!hasValidResourceEntryTimings(entry)) {\n return undefined;\n }\n const { startTime, fetchStart, workerStart, redirectStart, redirectEnd, domainLookupStart, domainLookupEnd, connectStart, secureConnectionStart, connectEnd, requestStart, responseStart, responseEnd, } = entry;\n const details = {\n download: formatTiming(startTime, responseStart, responseEnd),\n first_byte: formatTiming(startTime, requestStart, responseStart),\n };\n // Make sure a worker processing time is recorded\n if (0 < workerStart && workerStart < fetchStart) {\n details.worker = formatTiming(startTime, workerStart, fetchStart);\n }\n // Make sure a connection occurred\n if (fetchStart < connectEnd) {\n details.connect = formatTiming(startTime, connectStart, connectEnd);\n // Make sure a secure connection occurred\n if (connectStart <= secureConnectionStart && secureConnectionStart <= connectEnd) {\n details.ssl = formatTiming(startTime, secureConnectionStart, connectEnd);\n }\n }\n // Make sure a domain lookup occurred\n if (fetchStart < domainLookupEnd) {\n details.dns = formatTiming(startTime, domainLookupStart, domainLookupEnd);\n }\n // Make sure a redirection occurred\n if (startTime < redirectEnd) {\n details.redirect = formatTiming(startTime, redirectStart, redirectEnd);\n }\n return details;\n}\n/**\n * Entries with negative duration are unexpected and should be dismissed. The intake will ignore RUM\n * Resource events with negative durations anyway.\n * Since Chromium 128, more entries have unexpected negative durations, see\n * https://issues.chromium.org/issues/363031537\n */\nfunction hasValidResourceEntryDuration(entry) {\n return entry.duration >= 0;\n}\nfunction hasValidResourceEntryTimings(entry) {\n // Ensure timings are in the right order. On top of filtering out potential invalid\n // RumPerformanceResourceTiming, it will ignore entries from requests where timings cannot be\n // collected, for example cross origin requests without a \"Timing-Allow-Origin\" header allowing\n // it.\n const areCommonTimingsInOrder = areInOrder(entry.startTime, entry.fetchStart, entry.domainLookupStart, entry.domainLookupEnd, entry.connectStart, entry.connectEnd, entry.requestStart, entry.responseStart, entry.responseEnd);\n const areRedirectionTimingsInOrder = hasRedirection(entry)\n ? areInOrder(entry.startTime, entry.redirectStart, entry.redirectEnd, entry.fetchStart)\n : true;\n return areCommonTimingsInOrder && areRedirectionTimingsInOrder;\n}\nfunction hasRedirection(entry) {\n return entry.redirectEnd > entry.startTime;\n}\nfunction formatTiming(origin, start, end) {\n if (origin <= start && start <= end) {\n return {\n duration: toServerDuration(elapsed(start, end)),\n start: toServerDuration(elapsed(origin, start)),\n };\n }\n}\n/**\n * The 'nextHopProtocol' is an empty string for cross-origin resources without CORS headers,\n * meaning the protocol is unknown, and we shouldn't report it.\n * https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/nextHopProtocol#cross-origin_resources\n */\nfunction computeResourceEntryProtocol(entry) {\n return entry.nextHopProtocol === '' ? undefined : entry.nextHopProtocol;\n}\n/**\n * Handles the 'deliveryType' property to distinguish between supported values ('cache', 'navigational-prefetch'),\n * undefined (unsupported in some browsers), and other cases ('other' for unknown or unrecognized values).\n * see: https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/deliveryType\n */\nfunction computeResourceEntryDeliveryType(entry) {\n return entry.deliveryType === '' ? 'other' : entry.deliveryType;\n}\nfunction computeResourceEntrySize(entry) {\n // Make sure a request actually occurred\n if (entry.startTime < entry.responseStart) {\n const { encodedBodySize, decodedBodySize, transferSize } = entry;\n return {\n size: decodedBodySize,\n encoded_body_size: encodedBodySize,\n decoded_body_size: decodedBodySize,\n transfer_size: transferSize,\n };\n }\n return {\n size: undefined,\n encoded_body_size: undefined,\n decoded_body_size: undefined,\n transfer_size: undefined,\n };\n}\nfunction isAllowedRequestUrl(url) {\n return url && !isIntakeUrl(url);\n}\nconst DATA_URL_REGEX = /data:(.+)?(;base64)?,/g;\nconst MAX_ATTRIBUTE_VALUE_CHAR_LENGTH = 24000;\nfunction isLongDataUrl(url) {\n if (url.length <= MAX_ATTRIBUTE_VALUE_CHAR_LENGTH) {\n return false;\n }\n else if (url.substring(0, 5) === 'data:') {\n // Avoid String.match RangeError: Maximum call stack size exceeded\n url = url.substring(0, MAX_ATTRIBUTE_VALUE_CHAR_LENGTH);\n return true;\n }\n return false;\n}\nfunction sanitizeDataUrl(url) {\n return `${url.match(DATA_URL_REGEX)[0]}[...]`;\n}",
1400
+ "originalLength": 7446,
1401
+ "removedExports": [],
1402
+ "renderedExports": [
1403
+ "FAKE_INITIAL_DOCUMENT",
1404
+ "computeResourceEntryType",
1405
+ "isResourceEntryRequestType",
1406
+ "computeResourceEntryDuration",
1407
+ "computeResourceEntryDetails",
1408
+ "hasValidResourceEntryDuration",
1409
+ "hasValidResourceEntryTimings",
1410
+ "computeResourceEntryProtocol",
1411
+ "computeResourceEntryDeliveryType",
1412
+ "computeResourceEntrySize",
1413
+ "isAllowedRequestUrl",
1414
+ "MAX_ATTRIBUTE_VALUE_CHAR_LENGTH",
1415
+ "isLongDataUrl",
1416
+ "sanitizeDataUrl"
1417
+ ],
1418
+ "renderedLength": 7181
1419
+ },
1420
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/requestCollection.js": {
1421
+ "code": "let nextRequestIndex = 1;\nfunction startRequestCollection(lifeCycle, configuration, sessionManager) {\n const tracer = startTracer(configuration, sessionManager);\n trackXhr(lifeCycle, configuration, tracer);\n trackFetch(lifeCycle, tracer);\n}\nfunction trackXhr(lifeCycle, configuration, tracer) {\n const subscription = initXhrObservable(configuration).subscribe((rawContext) => {\n const context = rawContext;\n if (!isAllowedRequestUrl(context.url)) {\n return;\n }\n switch (context.state) {\n case 'start':\n tracer.traceXhr(context, context.xhr);\n context.requestIndex = getNextRequestIndex();\n lifeCycle.notify(6 /* LifeCycleEventType.REQUEST_STARTED */, {\n requestIndex: context.requestIndex,\n url: context.url,\n });\n break;\n case 'complete':\n tracer.clearTracingIfNeeded(context);\n lifeCycle.notify(7 /* LifeCycleEventType.REQUEST_COMPLETED */, {\n duration: context.duration,\n method: context.method,\n requestIndex: context.requestIndex,\n spanId: context.spanId,\n startClocks: context.startClocks,\n status: context.status,\n traceId: context.traceId,\n traceSampled: context.traceSampled,\n type: \"xhr\" /* RequestType.XHR */,\n url: context.url,\n xhr: context.xhr,\n isAborted: context.isAborted,\n handlingStack: context.handlingStack,\n });\n break;\n }\n });\n return { stop: () => subscription.unsubscribe() };\n}\nfunction trackFetch(lifeCycle, tracer) {\n const subscription = initFetchObservable().subscribe((rawContext) => {\n const context = rawContext;\n if (!isAllowedRequestUrl(context.url)) {\n return;\n }\n switch (context.state) {\n case 'start':\n tracer.traceFetch(context);\n context.requestIndex = getNextRequestIndex();\n lifeCycle.notify(6 /* LifeCycleEventType.REQUEST_STARTED */, {\n requestIndex: context.requestIndex,\n url: context.url,\n });\n break;\n case 'resolve':\n waitForResponseToComplete(context, (duration) => {\n tracer.clearTracingIfNeeded(context);\n lifeCycle.notify(7 /* LifeCycleEventType.REQUEST_COMPLETED */, {\n duration,\n method: context.method,\n requestIndex: context.requestIndex,\n responseType: context.responseType,\n spanId: context.spanId,\n startClocks: context.startClocks,\n status: context.status,\n traceId: context.traceId,\n traceSampled: context.traceSampled,\n type: \"fetch\" /* RequestType.FETCH */,\n url: context.url,\n response: context.response,\n init: context.init,\n input: context.input,\n isAborted: context.isAborted,\n handlingStack: context.handlingStack,\n });\n });\n break;\n }\n });\n return { stop: () => subscription.unsubscribe() };\n}\nfunction getNextRequestIndex() {\n const result = nextRequestIndex;\n nextRequestIndex += 1;\n return result;\n}\nfunction waitForResponseToComplete(context, callback) {\n const clonedResponse = context.response && tryToClone(context.response);\n if (!clonedResponse || !clonedResponse.body) {\n // do not try to wait for the response if the clone failed, fetch error or null body\n callback(elapsed(context.startClocks.timeStamp, timeStampNow()));\n }\n else {\n readBytesFromStream(clonedResponse.body, () => {\n callback(elapsed(context.startClocks.timeStamp, timeStampNow()));\n }, {\n bytesLimit: Number.POSITIVE_INFINITY});\n }\n}",
1422
+ "originalLength": 4688,
1423
+ "removedExports": [],
1424
+ "renderedExports": [
1425
+ "startRequestCollection",
1426
+ "trackXhr",
1427
+ "trackFetch"
1428
+ ],
1429
+ "renderedLength": 4324
1430
+ },
1431
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/discardNegativeDuration.js": {
1432
+ "code": "function discardNegativeDuration(duration) {\n return isNumber(duration) && duration < 0 ? undefined : duration;\n}",
1433
+ "originalLength": 225,
1434
+ "removedExports": [],
1435
+ "renderedExports": [
1436
+ "discardNegativeDuration"
1437
+ ],
1438
+ "renderedLength": 116
1439
+ },
1440
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/trackEventCounts.js": {
1441
+ "code": "function trackEventCounts({ lifeCycle, isChildEvent, onChange: callback = noop, }) {\n const eventCounts = {\n errorCount: 0,\n longTaskCount: 0,\n resourceCount: 0,\n actionCount: 0,\n frustrationCount: 0,\n };\n const subscription = lifeCycle.subscribe(12 /* LifeCycleEventType.RUM_EVENT_COLLECTED */, (event) => {\n var _a;\n if (event.type === 'view' || event.type === 'vital' || !isChildEvent(event)) {\n return;\n }\n switch (event.type) {\n case \"error\" /* RumEventType.ERROR */:\n eventCounts.errorCount += 1;\n callback();\n break;\n case \"action\" /* RumEventType.ACTION */:\n eventCounts.actionCount += 1;\n if (event.action.frustration) {\n eventCounts.frustrationCount += event.action.frustration.type.length;\n }\n callback();\n break;\n case \"long_task\" /* RumEventType.LONG_TASK */:\n eventCounts.longTaskCount += 1;\n callback();\n break;\n case \"resource\" /* RumEventType.RESOURCE */:\n if (!((_a = event._dd) === null || _a === void 0 ? void 0 : _a.discarded)) {\n eventCounts.resourceCount += 1;\n callback();\n }\n break;\n }\n });\n return {\n stop: () => {\n subscription.unsubscribe();\n },\n eventCounts,\n };\n}",
1442
+ "originalLength": 1633,
1443
+ "removedExports": [],
1444
+ "renderedExports": [
1445
+ "trackEventCounts"
1446
+ ],
1447
+ "renderedLength": 1535
1448
+ },
1449
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/firstInputPolyfill.js": {
1450
+ "code": "/**\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 const startTimeStamp = dateNow();\n let timingSent = false;\n const { stop: removeEventListeners } = 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 */], (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 const timing = {\n entryType: 'first-input',\n processingStart: relativeNow(),\n processingEnd: 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: () => ({}),\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 });\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 addEventListeners(configuration, window, [\"pointerup\" /* DOM_EVENT.POINTER_UP */, \"pointercancel\" /* DOM_EVENT.POINTER_CANCEL */], (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 const delay = timing.processingStart - timing.startTime;\n if (delay >= 0 && delay < dateNow() - startTimeStamp) {\n callback(timing);\n }\n }\n }\n}",
1451
+ "originalLength": 3273,
1452
+ "removedExports": [],
1453
+ "renderedExports": [
1454
+ "retrieveFirstInputTiming"
1455
+ ],
1456
+ "renderedLength": 3138
1457
+ },
1458
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/performanceObservable.js": {
1459
+ "code": "// 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 || (RumPerformanceEntryType = {}));\nfunction createPerformanceObservable(configuration, options) {\n return new Observable((observable) => {\n if (!window.PerformanceObserver) {\n return;\n }\n const handlePerformanceEntries = (entries) => {\n const rumPerformanceEntries = filterRumPerformanceEntries(entries);\n if (rumPerformanceEntries.length > 0) {\n observable.notify(rumPerformanceEntries);\n }\n };\n let timeoutId;\n let isObserverInitializing = true;\n const observer = new PerformanceObserver(monitor((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 = setTimeout(() => 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 const fallbackSupportedEntryTypes = [\n RumPerformanceEntryType.RESOURCE,\n RumPerformanceEntryType.NAVIGATION,\n RumPerformanceEntryType.LONG_TASK,\n RumPerformanceEntryType.PAINT,\n ];\n if (fallbackSupportedEntryTypes.includes(options.type)) {\n if (options.buffered) {\n timeoutId = setTimeout(() => 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 let stopFirstInputTiming;\n if (!supportPerformanceTimingEvent(RumPerformanceEntryType.FIRST_INPUT) &&\n options.type === RumPerformanceEntryType.FIRST_INPUT) {\n ({ stop: stopFirstInputTiming } = retrieveFirstInputTiming(configuration, (timing) => {\n handlePerformanceEntries([timing]);\n }));\n }\n return () => {\n observer.disconnect();\n if (stopFirstInputTiming) {\n stopFirstInputTiming();\n }\n clearTimeout(timeoutId);\n };\n });\n}\nlet resourceTimingBufferFullListener;\nfunction manageResourceTimingBufferFull(configuration) {\n if (!resourceTimingBufferFullListener && supportPerformanceObject() && 'addEventListener' in performance) {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1559377\n resourceTimingBufferFullListener = addEventListener(configuration, performance, 'resourcetimingbufferfull', () => {\n performance.clearResourceTimings();\n });\n }\n return () => {\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((entry) => !isForbiddenResource(entry));\n}\nfunction isForbiddenResource(entry) {\n return (entry.entryType === RumPerformanceEntryType.RESOURCE &&\n (!isAllowedRequestUrl(entry.name) || !hasValidResourceEntryDuration(entry)));\n}",
1460
+ "originalLength": 5953,
1461
+ "removedExports": [],
1462
+ "renderedExports": [
1463
+ "RumPerformanceEntryType",
1464
+ "createPerformanceObservable",
1465
+ "supportPerformanceTimingEvent"
1466
+ ],
1467
+ "renderedLength": 5595
1468
+ },
1469
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/waitPageActivityEnd.js": {
1470
+ "code": "// Delay to wait for a page activity to validate the tracking process\nconst PAGE_ACTIVITY_VALIDATION_DELAY = 100;\n// Delay to wait after a page activity to end the tracking process\nconst PAGE_ACTIVITY_END_DELAY = 100;\n/**\n * Wait for the page activity end\n *\n * Detection lifecycle:\n * ```\n * Wait page activity end\n * .-------------------'--------------------.\n * v v\n * [Wait for a page activity ] [Wait for a maximum duration]\n * [timeout: VALIDATION_DELAY] [ timeout: maxDuration ]\n * / \\ |\n * v v |\n * [No page activity] [Page activity] |\n * | |,----------------------. |\n * v v | |\n * (Discard) [Wait for a page activity] | |\n * [ timeout: END_DELAY ] | |\n * / \\ | |\n * v v | |\n * [No page activity] [Page activity] | |\n * | | | |\n * | '------------' |\n * '-----------. ,--------------------'\n * v\n * (End)\n * ```\n *\n * Note: by assuming that maxDuration is greater than VALIDATION_DELAY, we are sure that if the\n * process is still alive after maxDuration, it has been validated.\n */\nfunction waitPageActivityEnd(lifeCycle, domMutationObservable, windowOpenObservable, configuration, pageActivityEndCallback, maxDuration) {\n const pageActivityObservable = createPageActivityObservable(lifeCycle, domMutationObservable, windowOpenObservable, configuration);\n return doWaitPageActivityEnd(pageActivityObservable, pageActivityEndCallback, maxDuration);\n}\nfunction doWaitPageActivityEnd(pageActivityObservable, pageActivityEndCallback, maxDuration) {\n let pageActivityEndTimeoutId;\n let hasCompleted = false;\n const validationTimeoutId = setTimeout(monitor(() => complete({ hadActivity: false })), PAGE_ACTIVITY_VALIDATION_DELAY);\n const maxDurationTimeoutId = maxDuration !== undefined\n ? setTimeout(monitor(() => complete({ hadActivity: true, end: timeStampNow() })), maxDuration)\n : undefined;\n const pageActivitySubscription = pageActivityObservable.subscribe(({ isBusy }) => {\n clearTimeout(validationTimeoutId);\n clearTimeout(pageActivityEndTimeoutId);\n const lastChangeTime = timeStampNow();\n if (!isBusy) {\n pageActivityEndTimeoutId = setTimeout(monitor(() => complete({ hadActivity: true, end: lastChangeTime })), PAGE_ACTIVITY_END_DELAY);\n }\n });\n const stop = () => {\n hasCompleted = true;\n clearTimeout(validationTimeoutId);\n clearTimeout(pageActivityEndTimeoutId);\n clearTimeout(maxDurationTimeoutId);\n pageActivitySubscription.unsubscribe();\n };\n function complete(event) {\n if (hasCompleted) {\n return;\n }\n stop();\n pageActivityEndCallback(event);\n }\n return { stop };\n}\nfunction createPageActivityObservable(lifeCycle, domMutationObservable, windowOpenObservable, configuration) {\n return new Observable((observable) => {\n const subscriptions = [];\n let firstRequestIndex;\n let pendingRequestsCount = 0;\n subscriptions.push(domMutationObservable.subscribe(notifyPageActivity), windowOpenObservable.subscribe(notifyPageActivity), createPerformanceObservable(configuration, { type: RumPerformanceEntryType.RESOURCE }).subscribe((entries) => {\n if (entries.some((entry) => !isExcludedUrl(configuration, entry.name))) {\n notifyPageActivity();\n }\n }), lifeCycle.subscribe(6 /* LifeCycleEventType.REQUEST_STARTED */, (startEvent) => {\n if (isExcludedUrl(configuration, startEvent.url)) {\n return;\n }\n if (firstRequestIndex === undefined) {\n firstRequestIndex = startEvent.requestIndex;\n }\n pendingRequestsCount += 1;\n notifyPageActivity();\n }), lifeCycle.subscribe(7 /* LifeCycleEventType.REQUEST_COMPLETED */, (request) => {\n if (isExcludedUrl(configuration, request.url) ||\n firstRequestIndex === undefined ||\n // If the request started before the tracking start, ignore it\n request.requestIndex < firstRequestIndex) {\n return;\n }\n pendingRequestsCount -= 1;\n notifyPageActivity();\n }));\n return () => {\n subscriptions.forEach((s) => s.unsubscribe());\n };\n function notifyPageActivity() {\n observable.notify({ isBusy: pendingRequestsCount > 0 });\n }\n });\n}\nfunction isExcludedUrl(configuration, requestUrl) {\n return matchList(configuration.excludedActivityUrls, requestUrl);\n}",
1471
+ "originalLength": 5475,
1472
+ "removedExports": [],
1473
+ "renderedExports": [
1474
+ "PAGE_ACTIVITY_VALIDATION_DELAY",
1475
+ "PAGE_ACTIVITY_END_DELAY",
1476
+ "waitPageActivityEnd",
1477
+ "doWaitPageActivityEnd",
1478
+ "createPageActivityObservable"
1479
+ ],
1480
+ "renderedLength": 5175
1481
+ },
1482
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/htmlDomUtils.js": {
1483
+ "code": "function 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 const 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 let 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}",
1484
+ "originalLength": 1159,
1485
+ "removedExports": [],
1486
+ "renderedExports": [
1487
+ "isTextNode",
1488
+ "isCommentNode",
1489
+ "isElementNode",
1490
+ "isNodeShadowHost",
1491
+ "isNodeShadowRoot",
1492
+ "hasChildNodes",
1493
+ "forEachChildNodes",
1494
+ "getParentNode"
1495
+ ],
1496
+ "renderedLength": 1062
1497
+ },
1498
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/privacy.js": {
1499
+ "code": "const NodePrivacyLevel = {\n IGNORE: 'ignore',\n HIDDEN: 'hidden',\n ALLOW: DefaultPrivacyLevel.ALLOW,\n MASK: DefaultPrivacyLevel.MASK,\n MASK_USER_INPUT: DefaultPrivacyLevel.MASK_USER_INPUT,\n};\nconst PRIVACY_ATTR_NAME = 'data-dd-privacy';\nconst PRIVACY_ATTR_VALUE_HIDDEN = 'hidden';\n// Privacy Classes - not all customers can set plain HTML attributes, so support classes too\nconst PRIVACY_CLASS_PREFIX = 'dd-privacy-';\n// Private Replacement Templates\nconst CENSORED_STRING_MARK = '***';\nconst CENSORED_IMG_MARK = 'data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==';\nconst 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};\nconst 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 const parentNode = getParentNode(node);\n const parentNodePrivacyLevel = parentNode\n ? getNodePrivacyLevel(parentNode, defaultPrivacyLevel, cache)\n : defaultPrivacyLevel;\n const selfNodePrivacyLevel = getNodeSelfPrivacyLevel(node);\n const 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 NodePrivacyLevel.HIDDEN:\n case NodePrivacyLevel.IGNORE:\n return parentNodePrivacyLevel;\n }\n switch (childPrivacyLevel) {\n case NodePrivacyLevel.ALLOW:\n case NodePrivacyLevel.MASK:\n case NodePrivacyLevel.MASK_USER_INPUT:\n case NodePrivacyLevel.HIDDEN:\n case 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 (!isElementNode(node)) {\n return;\n }\n // Overrules for replay purpose\n if (node.tagName === 'BASE') {\n return NodePrivacyLevel.ALLOW;\n }\n // Overrules to enforce end-user protection\n if (node.tagName === 'INPUT') {\n const inputElement = node;\n if (inputElement.type === 'password' || inputElement.type === 'email' || inputElement.type === 'tel') {\n return NodePrivacyLevel.MASK;\n }\n if (inputElement.type === 'hidden') {\n return NodePrivacyLevel.MASK;\n }\n const 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 NodePrivacyLevel.MASK;\n }\n }\n // Check HTML privacy attributes and classes\n if (node.matches(getPrivacySelector(NodePrivacyLevel.HIDDEN))) {\n return NodePrivacyLevel.HIDDEN;\n }\n if (node.matches(getPrivacySelector(NodePrivacyLevel.MASK))) {\n return NodePrivacyLevel.MASK;\n }\n if (node.matches(getPrivacySelector(NodePrivacyLevel.MASK_USER_INPUT))) {\n return NodePrivacyLevel.MASK_USER_INPUT;\n }\n if (node.matches(getPrivacySelector(NodePrivacyLevel.ALLOW))) {\n return NodePrivacyLevel.ALLOW;\n }\n if (shouldIgnoreElement(node)) {\n return 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 NodePrivacyLevel.MASK:\n case NodePrivacyLevel.HIDDEN:\n case NodePrivacyLevel.IGNORE:\n return true;\n case NodePrivacyLevel.MASK_USER_INPUT:\n return 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 const 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 !!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 */\nconst censorText = (text) => text.replace(/\\S/g, TEXT_MASKING_CHAR);\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 const parentTagName = (_a = textNode.parentElement) === null || _a === void 0 ? void 0 : _a.tagName;\n let textContent = textNode.textContent || '';\n if (ignoreWhiteSpace && !textContent.trim()) {\n return;\n }\n const nodePrivacyLevel = parentNodePrivacyLevel;\n const isScript = parentTagName === 'SCRIPT';\n if (isScript) {\n // For perf reasons, we don't record script (heuristic)\n textContent = CENSORED_STRING_MARK;\n }\n else if (nodePrivacyLevel === NodePrivacyLevel.HIDDEN) {\n // Should never occur, but just in case, we set to CENSORED_MARK.\n textContent = 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 // <Option> has low entropy in charset + text length, so use `CENSORED_STRING_MARK` when masked\n textContent = CENSORED_STRING_MARK;\n }\n else {\n textContent = censorText(textContent);\n }\n }\n return textContent;\n}\n/**\n * TODO: Preserve CSS element order, and record the presence of the tag, just don't render\n * We don't need this logic on the recorder side.\n * For security related meta's, customer can mask themmanually given they\n * are easy to identify in the HEAD tag.\n */\nfunction shouldIgnoreElement(element) {\n if (element.nodeName === 'SCRIPT') {\n return true;\n }\n if (element.nodeName === 'LINK') {\n const relAttribute = getLowerCaseAttribute('rel');\n return (\n // Link as script - Ignore only when rel=preload, modulepreload or prefetch\n (/preload|prefetch/i.test(relAttribute) && getLowerCaseAttribute('as') === 'script') ||\n // Favicons\n relAttribute === 'shortcut icon' ||\n relAttribute === 'icon');\n }\n if (element.nodeName === 'META') {\n const nameAttribute = getLowerCaseAttribute('name');\n const relAttribute = getLowerCaseAttribute('rel');\n const propertyAttribute = getLowerCaseAttribute('property');\n return (\n // Favicons\n /^msapplication-tile(image|color)$/.test(nameAttribute) ||\n nameAttribute === 'application-name' ||\n relAttribute === 'icon' ||\n relAttribute === 'apple-touch-icon' ||\n relAttribute === 'shortcut icon' ||\n // Description\n nameAttribute === 'keywords' ||\n nameAttribute === 'description' ||\n // Social\n /^(og|twitter|fb):/.test(propertyAttribute) ||\n /^(og|twitter):/.test(nameAttribute) ||\n nameAttribute === 'pinterest' ||\n // Robots\n nameAttribute === 'robots' ||\n nameAttribute === 'googlebot' ||\n nameAttribute === 'bingbot' ||\n // Http headers. Ex: X-UA-Compatible, Content-Type, Content-Language, cache-control,\n // X-Translated-By\n element.hasAttribute('http-equiv') ||\n // Authorship\n nameAttribute === 'author' ||\n nameAttribute === 'generator' ||\n nameAttribute === 'framework' ||\n nameAttribute === 'publisher' ||\n nameAttribute === 'progid' ||\n /^article:/.test(propertyAttribute) ||\n /^product:/.test(propertyAttribute) ||\n // Verification\n nameAttribute === 'google-site-verification' ||\n nameAttribute === 'yandex-verification' ||\n nameAttribute === 'csrf-token' ||\n nameAttribute === 'p:domain_verify' ||\n nameAttribute === 'verify-v1' ||\n nameAttribute === 'verification' ||\n nameAttribute === 'shopify-checkout-api-token');\n }\n function getLowerCaseAttribute(name) {\n return (element.getAttribute(name) || '').toLowerCase();\n }\n return false;\n}\nfunction getPrivacySelector(privacyLevel) {\n return `[${PRIVACY_ATTR_NAME}=\"${privacyLevel}\"], .${PRIVACY_CLASS_PREFIX}${privacyLevel}`;\n}",
1500
+ "originalLength": 10521,
1501
+ "removedExports": [
1502
+ "PRIVACY_ATTR_VALUE_ALLOW",
1503
+ "PRIVACY_ATTR_VALUE_MASK",
1504
+ "PRIVACY_ATTR_VALUE_MASK_USER_INPUT"
1505
+ ],
1506
+ "renderedExports": [
1507
+ "NodePrivacyLevel",
1508
+ "PRIVACY_ATTR_NAME",
1509
+ "PRIVACY_ATTR_VALUE_HIDDEN",
1510
+ "PRIVACY_CLASS_PREFIX",
1511
+ "CENSORED_STRING_MARK",
1512
+ "CENSORED_IMG_MARK",
1513
+ "FORM_PRIVATE_TAG_NAMES",
1514
+ "getNodePrivacyLevel",
1515
+ "reducePrivacyLevel",
1516
+ "getNodeSelfPrivacyLevel",
1517
+ "shouldMaskNode",
1518
+ "censorText",
1519
+ "getTextContent",
1520
+ "shouldIgnoreElement",
1521
+ "getPrivacySelector"
1522
+ ],
1523
+ "renderedLength": 10053
1524
+ },
1525
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/action/getActionNameFromElement.js": {
1526
+ "code": "/**\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 */\nconst DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE = 'data-dd-action-name';\nconst ACTION_NAME_PLACEHOLDER = 'Masked Element';\nfunction getActionNameFromElement(element, { enablePrivacyForActionName, actionNameAttribute: userProgrammaticAttribute }, nodePrivacyLevel) {\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 const defaultActionName = getActionNameFromElementProgrammatically(element, 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 === NodePrivacyLevel.MASK) {\n return { name: 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 // 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 const elementWithAttribute = targetElement.closest(`[${programmaticAttribute}]`);\n if (!elementWithAttribute) {\n return;\n }\n const name = elementWithAttribute.getAttribute(programmaticAttribute);\n return truncate(normalizeWhitespace(name.trim()));\n}\nconst priorityStrategies = [\n // associated LABEL text\n (element, userProgrammaticAttribute) => {\n if ('labels' in element && element.labels && element.labels.length > 0) {\n return getActionNameFromTextualContent(element.labels[0], userProgrammaticAttribute);\n }\n },\n // INPUT button (and associated) value\n (element) => {\n if (element.nodeName === 'INPUT') {\n const input = element;\n const 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 (element, userProgrammaticAttribute, privacyEnabledActionName) => {\n if (element.nodeName === 'BUTTON' || element.nodeName === 'LABEL' || element.getAttribute('role') === 'button') {\n return getActionNameFromTextualContent(element, userProgrammaticAttribute, privacyEnabledActionName);\n }\n },\n (element) => getActionNameFromStandardAttribute(element, 'aria-label'),\n // associated element text designated by the aria-labelledby attribute\n (element, userProgrammaticAttribute, privacyEnabledActionName) => {\n const labelledByAttribute = element.getAttribute('aria-labelledby');\n if (labelledByAttribute) {\n return {\n name: labelledByAttribute\n .split(/\\s+/)\n .map((id) => getElementById(element, id))\n .filter((label) => Boolean(label))\n .map((element) => getTextualContent(element, userProgrammaticAttribute, privacyEnabledActionName))\n .join(' '),\n nameSource: \"text_content\" /* ActionNameSource.TEXT_CONTENT */,\n };\n }\n },\n (element) => getActionNameFromStandardAttribute(element, 'alt'),\n (element) => getActionNameFromStandardAttribute(element, 'name'),\n (element) => getActionNameFromStandardAttribute(element, 'title'),\n (element) => getActionNameFromStandardAttribute(element, 'placeholder'),\n // SELECT first OPTION text\n (element, userProgrammaticAttribute) => {\n if ('options' in element && element.options.length > 0) {\n return getActionNameFromTextualContent(element.options[0], userProgrammaticAttribute);\n }\n },\n];\nconst fallbackStrategies = [\n (element, userProgrammaticAttribute, privacyEnabledActionName) => getActionNameFromTextualContent(element, userProgrammaticAttribute, privacyEnabledActionName),\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 */\nconst MAX_PARENTS_TO_CONSIDER = 10;\nfunction getActionNameFromElementForStrategies(targetElement, userProgrammaticAttribute, strategies, privacyEnabledActionName) {\n let element = targetElement;\n let 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 (const strategy of strategies) {\n const actionName = strategy(element, userProgrammaticAttribute, privacyEnabledActionName);\n if (actionName) {\n const { name, nameSource } = actionName;\n const trimmedName = name && name.trim();\n if (trimmedName) {\n return { name: truncate(normalizeWhitespace(trimmedName)), 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 = element.parentElement;\n recursionCounter += 1;\n }\n}\nfunction normalizeWhitespace(s) {\n return s.replace(/\\s+/g, ' ');\n}\nfunction truncate(s) {\n return s.length > 100 ? `${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 let text = element.innerText;\n const removeTextFromElements = (query) => {\n const list = element.querySelectorAll(query);\n for (let index = 0; index < list.length; index += 1) {\n const element = list[index];\n if ('innerText' in element) {\n const textToReplace = element.innerText;\n if (textToReplace && textToReplace.trim().length > 0) {\n text = text.replace(textToReplace, '');\n }\n }\n }\n };\n // remove the text of elements with programmatic attribute value\n removeTextFromElements(`[${DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE}]`);\n if (userProgrammaticAttribute) {\n removeTextFromElements(`[${userProgrammaticAttribute}]`);\n }\n if (privacyEnabledActionName) {\n // remove the text of elements with privacy override\n removeTextFromElements(`${getPrivacySelector(NodePrivacyLevel.HIDDEN)}, ${getPrivacySelector(NodePrivacyLevel.MASK)}`);\n }\n return text;\n }\n return element.textContent;\n}",
1527
+ "originalLength": 8995,
1528
+ "removedExports": [],
1529
+ "renderedExports": [
1530
+ "DEFAULT_PROGRAMMATIC_ACTION_NAME_ATTRIBUTE",
1531
+ "ACTION_NAME_PLACEHOLDER",
1532
+ "getActionNameFromElement"
1533
+ ],
1534
+ "renderedLength": 8800
1535
+ },
1536
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/getSelectorFromElement.js": {
1537
+ "code": "/**\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 */\nconst STABLE_ATTRIBUTES = [\n 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.\nconst 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.\nconst 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 let targetElementSelector;\n let currentElement = targetElement;\n while (currentElement && currentElement.nodeName !== 'HTML') {\n const globallyUniqueSelector = findSelector(currentElement, GLOBALLY_UNIQUE_SELECTOR_GETTERS, isSelectorUniqueGlobally, actionNameAttribute, targetElementSelector);\n if (globallyUniqueSelector) {\n return globallyUniqueSelector;\n }\n const uniqueSelectorAmongChildren = findSelector(currentElement, UNIQUE_AMONG_CHILDREN_SELECTOR_GETTERS, isSelectorUniqueAmongSiblings, actionNameAttribute, targetElementSelector);\n targetElementSelector =\n uniqueSelectorAmongChildren || combineSelector(getPositionSelector(currentElement), targetElementSelector);\n currentElement = currentElement.parentElement;\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 `#${CSS.escape(element.id)}`;\n }\n}\nfunction getClassSelector(element) {\n if (element.tagName === 'BODY') {\n return;\n }\n const classList = element.classList;\n for (let i = 0; i < classList.length; i += 1) {\n const className = classList[i];\n if (isGeneratedValue(className)) {\n continue;\n }\n return `${CSS.escape(element.tagName)}.${CSS.escape(className)}`;\n }\n}\nfunction getTagNameSelector(element) {\n return CSS.escape(element.tagName);\n}\nfunction getStableAttributeSelector(element, actionNameAttribute) {\n if (actionNameAttribute) {\n const selector = getAttributeSelector(actionNameAttribute);\n if (selector) {\n return selector;\n }\n }\n for (const attributeName of STABLE_ATTRIBUTES) {\n const selector = getAttributeSelector(attributeName);\n if (selector) {\n return selector;\n }\n }\n function getAttributeSelector(attributeName) {\n if (element.hasAttribute(attributeName)) {\n return `${CSS.escape(element.tagName)}[${attributeName}=\"${CSS.escape(element.getAttribute(attributeName))}\"]`;\n }\n }\n}\nfunction getPositionSelector(element) {\n let sibling = element.parentElement.firstElementChild;\n let elementIndex = 1;\n while (sibling && sibling !== element) {\n if (sibling.tagName === element.tagName) {\n elementIndex += 1;\n }\n sibling = sibling.nextElementSibling;\n }\n return `${CSS.escape(element.tagName)}:nth-of-type(${elementIndex})`;\n}\nfunction findSelector(element, selectorGetters, predicate, actionNameAttribute, childSelector) {\n for (const selectorGetter of selectorGetters) {\n const 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 * <main>\n * <div>\n * <span></span>\n * </div>\n * <marquee>\n * <div>\n * <span></span>\n * </div>\n * </marquee>\n * </main>\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 let 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 = (sibling) => sibling.matches(currentElementSelector);\n }\n else {\n const scopedSelector = supportScopeSelector()\n ? combineSelector(`${currentElementSelector}:scope`, childSelector)\n : combineSelector(currentElementSelector, childSelector);\n isSiblingMatching = (sibling) => sibling.querySelector(scopedSelector) !== null;\n }\n const parent = currentElement.parentElement;\n let 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 ? `${parent}>${child}` : parent;\n}\nlet 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 Edge <=18\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}",
1538
+ "originalLength": 10593,
1539
+ "removedExports": [],
1540
+ "renderedExports": [
1541
+ "STABLE_ATTRIBUTES",
1542
+ "getSelectorFromElement",
1543
+ "isSelectorUniqueAmongSiblings",
1544
+ "supportScopeSelector"
1545
+ ],
1546
+ "renderedLength": 10418
1547
+ },
1548
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/action/clickChain.js": {
1549
+ "code": "const MAX_DURATION_BETWEEN_CLICKS = ONE_SECOND;\nconst MAX_DISTANCE_BETWEEN_CLICKS = 100;\nfunction createClickChain(firstClick, onFinalize) {\n const bufferedClicks = [];\n let status = 0 /* ClickChainStatus.WaitingForMoreClicks */;\n let maxDurationBetweenClicksTimeoutId;\n appendClick(firstClick);\n function appendClick(click) {\n click.stopObservable.subscribe(tryFinalize);\n bufferedClicks.push(click);\n clearTimeout(maxDurationBetweenClicksTimeoutId);\n maxDurationBetweenClicksTimeoutId = setTimeout(dontAcceptMoreClick, MAX_DURATION_BETWEEN_CLICKS);\n }\n function tryFinalize() {\n if (status === 1 /* ClickChainStatus.WaitingForClicksToStop */ && bufferedClicks.every((click) => click.isStopped())) {\n status = 2 /* ClickChainStatus.Finalized */;\n onFinalize(bufferedClicks);\n }\n }\n function dontAcceptMoreClick() {\n clearTimeout(maxDurationBetweenClicksTimeoutId);\n if (status === 0 /* ClickChainStatus.WaitingForMoreClicks */) {\n status = 1 /* ClickChainStatus.WaitingForClicksToStop */;\n tryFinalize();\n }\n }\n return {\n tryAppend: (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: () => {\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) <= MAX_DISTANCE_BETWEEN_CLICKS &&\n first.timeStamp - second.timeStamp <= 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}",
1550
+ "originalLength": 2325,
1551
+ "removedExports": [],
1552
+ "renderedExports": [
1553
+ "MAX_DURATION_BETWEEN_CLICKS",
1554
+ "MAX_DISTANCE_BETWEEN_CLICKS",
1555
+ "createClickChain"
1556
+ ],
1557
+ "renderedLength": 2187
1558
+ },
1559
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/action/listenActionEvents.js": {
1560
+ "code": "function listenActionEvents(configuration, { onPointerDown, onPointerUp }) {\n let selectionEmptyAtPointerDown;\n let userActivity = {\n selection: false,\n input: false,\n scroll: false,\n };\n let clickContext;\n const listeners = [\n addEventListener(configuration, window, \"pointerdown\" /* DOM_EVENT.POINTER_DOWN */, (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 addEventListener(configuration, window, \"selectionchange\" /* DOM_EVENT.SELECTION_CHANGE */, () => {\n if (!selectionEmptyAtPointerDown || !isSelectionEmpty()) {\n userActivity.selection = true;\n }\n }, { capture: true }),\n addEventListener(configuration, window, \"scroll\" /* DOM_EVENT.SCROLL */, () => {\n userActivity.scroll = true;\n }, { capture: true, passive: true }),\n addEventListener(configuration, window, \"pointerup\" /* DOM_EVENT.POINTER_UP */, (event) => {\n if (isValidPointerEvent(event) && clickContext) {\n // Use a scoped variable to make sure the value is not changed by other clicks\n const localUserActivity = userActivity;\n onPointerUp(clickContext, event, () => localUserActivity);\n clickContext = undefined;\n }\n }, { capture: true }),\n addEventListener(configuration, window, \"input\" /* DOM_EVENT.INPUT */, () => {\n userActivity.input = true;\n }, { capture: true }),\n ];\n return {\n stop: () => {\n listeners.forEach((listener) => listener.stop());\n },\n };\n}\nfunction isSelectionEmpty() {\n const 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}",
1561
+ "originalLength": 2425,
1562
+ "removedExports": [],
1563
+ "renderedExports": [
1564
+ "listenActionEvents"
1565
+ ],
1566
+ "renderedLength": 2313
1567
+ },
1568
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/action/computeFrustration.js": {
1569
+ "code": "const 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 const hasSelectionChanged = clicks.some((click) => click.getUserActivity().selection);\n clicks.forEach((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((click) => click.getUserActivity().selection || click.getUserActivity().scroll)) {\n return false;\n }\n for (let 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 ONE_SECOND) {\n return true;\n }\n }\n return false;\n}\nconst 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 !click.event.target.matches(DEAD_CLICK_EXCLUDE_SELECTOR);\n}",
1570
+ "originalLength": 2670,
1571
+ "removedExports": [],
1572
+ "renderedExports": [
1573
+ "computeFrustration",
1574
+ "isRage",
1575
+ "isDead"
1576
+ ],
1577
+ "renderedLength": 2550
1578
+ },
1579
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/action/interactionSelectorCache.js": {
1580
+ "code": "// Maximum duration for click actions\nconst CLICK_ACTION_MAX_DURATION = 10 * ONE_SECOND;\nconst interactionSelectorCache = new Map();\nfunction getInteractionSelector(relativeTimestamp) {\n const selector = interactionSelectorCache.get(relativeTimestamp);\n interactionSelectorCache.delete(relativeTimestamp);\n return selector;\n}\nfunction updateInteractionSelector(relativeTimestamp, selector) {\n interactionSelectorCache.set(relativeTimestamp, selector);\n interactionSelectorCache.forEach((_, relativeTimestamp) => {\n if (elapsed(relativeTimestamp, relativeNow()) > CLICK_ACTION_MAX_DURATION) {\n interactionSelectorCache.delete(relativeTimestamp);\n }\n });\n}",
1581
+ "originalLength": 852,
1582
+ "removedExports": [],
1583
+ "renderedExports": [
1584
+ "CLICK_ACTION_MAX_DURATION",
1585
+ "interactionSelectorCache",
1586
+ "getInteractionSelector",
1587
+ "updateInteractionSelector"
1588
+ ],
1589
+ "renderedLength": 697
1590
+ },
1591
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/action/trackClickActions.js": {
1592
+ "code": "const ACTION_CONTEXT_TIME_OUT_DELAY = 5 * ONE_MINUTE; // arbitrary\nfunction trackClickActions(lifeCycle, domMutationObservable, windowOpenObservable, configuration) {\n const history = createValueHistory({ expireDelay: ACTION_CONTEXT_TIME_OUT_DELAY });\n const stopObservable = new Observable();\n let currentClickChain;\n lifeCycle.subscribe(9 /* LifeCycleEventType.SESSION_RENEWED */, () => {\n history.reset();\n });\n lifeCycle.subscribe(4 /* LifeCycleEventType.VIEW_ENDED */, stopClickChain);\n const { stop: stopActionEventsListener } = listenActionEvents(configuration, {\n onPointerDown: (pointerDownEvent) => processPointerDown(configuration, lifeCycle, domMutationObservable, pointerDownEvent, windowOpenObservable),\n onPointerUp: ({ clickActionBase, hadActivityOnPointerDown }, startEvent, getUserActivity) => {\n startClickAction(configuration, lifeCycle, domMutationObservable, windowOpenObservable, history, stopObservable, appendClickToClickChain, clickActionBase, startEvent, getUserActivity, hadActivityOnPointerDown);\n },\n });\n const actionContexts = {\n findActionId: (startTime) => history.findAll(startTime),\n };\n return {\n stop: () => {\n stopClickChain();\n stopObservable.notify();\n stopActionEventsListener();\n },\n actionContexts,\n };\n function appendClickToClickChain(click) {\n if (!currentClickChain || !currentClickChain.tryAppend(click)) {\n const rageClick = click.clone();\n currentClickChain = createClickChain(click, (clicks) => {\n finalizeClicks(clicks, rageClick);\n });\n }\n }\n function stopClickChain() {\n if (currentClickChain) {\n currentClickChain.stop();\n }\n }\n}\nfunction processPointerDown(configuration, lifeCycle, domMutationObservable, pointerDownEvent, windowOpenObservable) {\n const nodePrivacyLevel = configuration.enablePrivacyForActionName\n ? getNodePrivacyLevel(pointerDownEvent.target, configuration.defaultPrivacyLevel)\n : NodePrivacyLevel.ALLOW;\n if (nodePrivacyLevel === NodePrivacyLevel.HIDDEN) {\n return undefined;\n }\n const clickActionBase = computeClickActionBase(pointerDownEvent, nodePrivacyLevel, configuration);\n let hadActivityOnPointerDown = false;\n waitPageActivityEnd(lifeCycle, domMutationObservable, windowOpenObservable, configuration, (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 PAGE_ACTIVITY_VALIDATION_DELAY);\n return { clickActionBase, hadActivityOnPointerDown: () => hadActivityOnPointerDown };\n}\nfunction startClickAction(configuration, lifeCycle, domMutationObservable, windowOpenObservable, history, stopObservable, appendClickToClickChain, clickActionBase, startEvent, getUserActivity, hadActivityOnPointerDown) {\n var _a;\n const click = newClick(lifeCycle, history, getUserActivity, clickActionBase, startEvent);\n appendClickToClickChain(click);\n const selector = (_a = clickActionBase === null || clickActionBase === void 0 ? void 0 : clickActionBase.target) === null || _a === void 0 ? void 0 : _a.selector;\n if (selector) {\n updateInteractionSelector(startEvent.timeStamp, selector);\n }\n const { stop: stopWaitPageActivityEnd } = waitPageActivityEnd(lifeCycle, domMutationObservable, windowOpenObservable, configuration, (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 }, CLICK_ACTION_MAX_DURATION);\n const viewEndedSubscription = lifeCycle.subscribe(4 /* LifeCycleEventType.VIEW_ENDED */, ({ endClocks }) => {\n click.stop(endClocks.timeStamp);\n });\n const stopSubscription = stopObservable.subscribe(() => {\n click.stop();\n });\n click.stopObservable.subscribe(() => {\n viewEndedSubscription.unsubscribe();\n stopWaitPageActivityEnd();\n stopSubscription.unsubscribe();\n });\n}\nfunction computeClickActionBase(event, nodePrivacyLevel, configuration) {\n const rect = event.target.getBoundingClientRect();\n const selector = getSelectorFromElement(event.target, configuration.actionNameAttribute);\n if (selector) {\n updateInteractionSelector(event.timeStamp, selector);\n }\n const actionName = 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,\n },\n position: {\n // Use clientX and Y because for SVG element offsetX and Y are relatives to the <svg> 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 const id = generateUUID();\n const startClocks = clocksNow();\n const historyEntry = history.add(id, startClocks.relative);\n const eventCountsSubscription = trackEventCounts({\n lifeCycle,\n isChildEvent: (event) => event.action !== undefined &&\n (Array.isArray(event.action.id) ? event.action.id.includes(id) : event.action.id === id),\n });\n let status = 0 /* ClickStatus.ONGOING */;\n let activityEndTime;\n const frustrationTypes = [];\n const stopObservable = new 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(getRelativeTime(activityEndTime));\n }\n else {\n historyEntry.remove();\n }\n eventCountsSubscription.stop();\n stopObservable.notify();\n }\n return {\n event: startEvent,\n stop,\n stopObservable,\n get hasError() {\n return eventCountsSubscription.eventCounts.errorCount > 0;\n },\n get hasPageActivity() {\n return activityEndTime !== undefined;\n },\n getUserActivity,\n addFrustration: (frustrationType) => {\n frustrationTypes.push(frustrationType);\n },\n startClocks,\n isStopped: () => status === 1 /* ClickStatus.STOPPED */ || status === 2 /* ClickStatus.FINALIZED */,\n clone: () => newClick(lifeCycle, history, getUserActivity, clickActionBase, startEvent),\n validate: (domEvents) => {\n stop();\n if (status !== 1 /* ClickStatus.STOPPED */) {\n return;\n }\n const { resourceCount, errorCount, longTaskCount } = eventCountsSubscription.eventCounts;\n const clickAction = {\n duration: activityEndTime && elapsed(startClocks.timeStamp, activityEndTime),\n startClocks,\n id,\n frustrationTypes,\n counts: {\n resourceCount,\n errorCount,\n longTaskCount,\n },\n events: domEvents !== null && domEvents !== void 0 ? domEvents : [startEvent],\n event: startEvent,\n ...clickActionBase,\n };\n lifeCycle.notify(0 /* LifeCycleEventType.AUTO_ACTION_COMPLETED */, clickAction);\n status = 2 /* ClickStatus.FINALIZED */;\n },\n discard: () => {\n stop();\n status = 2 /* ClickStatus.FINALIZED */;\n },\n };\n}\nfunction finalizeClicks(clicks, rageClick) {\n const { isRage } = computeFrustration(clicks, rageClick);\n if (isRage) {\n clicks.forEach((click) => click.discard());\n rageClick.stop(timeStampNow());\n rageClick.validate(clicks.map((click) => click.event));\n }\n else {\n rageClick.discard();\n clicks.forEach((click) => click.validate());\n }\n}",
1593
+ "originalLength": 9838,
1594
+ "removedExports": [],
1595
+ "renderedExports": [
1596
+ "ACTION_CONTEXT_TIME_OUT_DELAY",
1597
+ "trackClickActions",
1598
+ "finalizeClicks"
1599
+ ],
1600
+ "renderedLength": 8998
1601
+ },
1602
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/action/actionCollection.js": {
1603
+ "code": "function startActionCollection(lifeCycle, domMutationObservable, windowOpenObservable, configuration, pageStateHistory) {\n lifeCycle.subscribe(0 /* LifeCycleEventType.AUTO_ACTION_COMPLETED */, (action) => lifeCycle.notify(11 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, processAction(action, pageStateHistory)));\n let actionContexts = { findActionId: noop };\n let stop = noop;\n if (configuration.trackUserInteractions) {\n ({ actionContexts, stop } = trackClickActions(lifeCycle, domMutationObservable, windowOpenObservable, configuration));\n }\n return {\n addAction: (action, savedCommonContext) => {\n lifeCycle.notify(11 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, {\n savedCommonContext,\n ...processAction(action, pageStateHistory),\n });\n },\n actionContexts,\n stop,\n };\n}\nfunction processAction(action, pageStateHistory) {\n const autoActionProperties = isAutoAction(action)\n ? {\n action: {\n id: action.id,\n loading_time: discardNegativeDuration(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: isExperimentalFeatureEnabled(ExperimentalFeature.ACTION_NAME_MASKING)\n ? action.nameSource\n : undefined,\n },\n },\n }\n : undefined;\n const customerContext = !isAutoAction(action) ? action.context : undefined;\n const actionEvent = combine({\n action: {\n id: 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 const domainContext = isAutoAction(action) ? { events: action.events } : {};\n if (!isAutoAction(action) && action.handlingStack) {\n domainContext.handlingStack = action.handlingStack;\n }\n return {\n customerContext,\n rawRumEvent: actionEvent,\n startTime: action.startClocks.relative,\n domainContext,\n };\n}\nfunction isAutoAction(action) {\n return action.type !== \"custom\" /* ActionType.CUSTOM */;\n}",
1604
+ "originalLength": 3265,
1605
+ "removedExports": [],
1606
+ "renderedExports": [
1607
+ "startActionCollection"
1608
+ ],
1609
+ "renderedLength": 2937
1610
+ },
1611
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/error/trackConsoleError.js": {
1612
+ "code": "function trackConsoleError(errorObservable) {\n const subscription = initConsoleObservable([ConsoleApiName.error]).subscribe((consoleLog) => errorObservable.notify(consoleLog.error));\n return {\n stop: () => {\n subscription.unsubscribe();\n },\n };\n}",
1613
+ "originalLength": 412,
1614
+ "removedExports": [],
1615
+ "renderedExports": [
1616
+ "trackConsoleError"
1617
+ ],
1618
+ "renderedLength": 280
1619
+ },
1620
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/error/trackReportError.js": {
1621
+ "code": "function trackReportError(configuration, errorObservable) {\n const subscription = initReportObservable(configuration, [\n RawReportType.cspViolation,\n RawReportType.intervention,\n ]).subscribe((rawError) => errorObservable.notify(rawError));\n return {\n stop: () => {\n subscription.unsubscribe();\n },\n };\n}",
1622
+ "originalLength": 484,
1623
+ "removedExports": [],
1624
+ "renderedExports": [
1625
+ "trackReportError"
1626
+ ],
1627
+ "renderedLength": 355
1628
+ },
1629
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/error/errorCollection.js": {
1630
+ "code": "function startErrorCollection(lifeCycle, configuration, pageStateHistory, featureFlagContexts) {\n const errorObservable = new Observable();\n trackConsoleError(errorObservable);\n trackRuntimeError(errorObservable);\n trackReportError(configuration, errorObservable);\n errorObservable.subscribe((error) => lifeCycle.notify(13 /* LifeCycleEventType.RAW_ERROR_COLLECTED */, { error }));\n return doStartErrorCollection(lifeCycle, pageStateHistory, featureFlagContexts);\n}\nfunction doStartErrorCollection(lifeCycle, pageStateHistory, featureFlagContexts) {\n lifeCycle.subscribe(13 /* LifeCycleEventType.RAW_ERROR_COLLECTED */, ({ error, customerContext, savedCommonContext }) => {\n lifeCycle.notify(11 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, {\n customerContext,\n savedCommonContext,\n ...processError(error, pageStateHistory, featureFlagContexts),\n });\n });\n return {\n addError: ({ error, handlingStack, startClocks, context: customerContext }, savedCommonContext) => {\n const stackTrace = isError(error) ? computeStackTrace(error) : undefined;\n const rawError = computeRawError({\n stackTrace,\n originalError: error,\n handlingStack,\n startClocks,\n nonErrorPrefix: \"Provided\" /* NonErrorPrefix.PROVIDED */,\n source: ErrorSource.CUSTOM,\n handling: \"handled\" /* ErrorHandling.HANDLED */,\n });\n lifeCycle.notify(13 /* LifeCycleEventType.RAW_ERROR_COLLECTED */, {\n customerContext,\n savedCommonContext,\n error: rawError,\n });\n },\n };\n}\nfunction processError(error, pageStateHistory, featureFlagContexts) {\n const rawRumEvent = {\n date: error.startClocks.timeStamp,\n error: {\n id: 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 const featureFlagContext = featureFlagContexts.findFeatureFlagEvaluations(error.startClocks.relative);\n if (featureFlagContext && !isEmptyObject(featureFlagContext)) {\n rawRumEvent.feature_flags = featureFlagContext;\n }\n const domainContext = {\n error: error.originalError,\n handlingStack: error.handlingStack,\n };\n return {\n rawRumEvent,\n startTime: error.startClocks.relative,\n domainContext,\n };\n}",
1631
+ "originalLength": 3266,
1632
+ "removedExports": [],
1633
+ "renderedExports": [
1634
+ "startErrorCollection",
1635
+ "doStartErrorCollection"
1636
+ ],
1637
+ "renderedLength": 2937
1638
+ },
1639
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/resource/matchRequestResourceEntry.js": {
1640
+ "code": "const alreadyMatchedEntries = new WeakSet();\n/**\n * Look for corresponding timing in resource timing buffer\n *\n * Observations:\n * - Timing (start, end) are nested inside the request (start, end)\n * - Some timing can be not exactly nested, being off by < 1 ms\n *\n * Strategy:\n * - from valid nested entries (with 1 ms error margin)\n * - filter out timing that were already matched to a request\n * - then, if a single timing match, return the timing\n * - otherwise we can't decide, return undefined\n */\nfunction matchRequestResourceEntry(request) {\n if (!performance || !('getEntriesByName' in performance)) {\n return;\n }\n const sameNameEntries = performance.getEntriesByName(request.url, 'resource');\n if (!sameNameEntries.length || !('toJSON' in sameNameEntries[0])) {\n return;\n }\n const candidates = sameNameEntries\n .filter((entry) => !alreadyMatchedEntries.has(entry))\n .filter((entry) => hasValidResourceEntryDuration(entry) && hasValidResourceEntryTimings(entry))\n .filter((entry) => isBetween(entry, request.startClocks.relative, endTime({ startTime: request.startClocks.relative, duration: request.duration })));\n if (candidates.length === 1) {\n alreadyMatchedEntries.add(candidates[0]);\n return candidates[0].toJSON();\n }\n return;\n}\nfunction endTime(timing) {\n return addDuration(timing.startTime, timing.duration);\n}\nfunction isBetween(timing, start, end) {\n const errorMargin = 1;\n return timing.startTime >= start - errorMargin && endTime(timing) <= addDuration(end, errorMargin);\n}",
1641
+ "originalLength": 1788,
1642
+ "removedExports": [],
1643
+ "renderedExports": [
1644
+ "matchRequestResourceEntry"
1645
+ ],
1646
+ "renderedLength": 1579
1647
+ },
1648
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/tracing/getDocumentTraceId.js": {
1649
+ "code": "const INITIAL_DOCUMENT_OUTDATED_TRACE_ID_THRESHOLD = 2 * ONE_MINUTE;\nfunction getDocumentTraceId(document) {\n const data = getDocumentTraceDataFromMeta(document) || getDocumentTraceDataFromComment(document);\n if (!data || data.traceTime <= dateNow() - INITIAL_DOCUMENT_OUTDATED_TRACE_ID_THRESHOLD) {\n return undefined;\n }\n return data.traceId;\n}\nfunction getDocumentTraceDataFromMeta(document) {\n const traceIdMeta = document.querySelector('meta[name=dd-trace-id]');\n const traceTimeMeta = document.querySelector('meta[name=dd-trace-time]');\n return createDocumentTraceData(traceIdMeta && traceIdMeta.content, traceTimeMeta && traceTimeMeta.content);\n}\nfunction getDocumentTraceDataFromComment(document) {\n const comment = findTraceComment(document);\n if (!comment) {\n return undefined;\n }\n return createDocumentTraceData(findCommaSeparatedValue(comment, 'trace-id'), findCommaSeparatedValue(comment, 'trace-time'));\n}\nfunction createDocumentTraceData(traceId, rawTraceTime) {\n const traceTime = rawTraceTime && Number(rawTraceTime);\n if (!traceId || !traceTime) {\n return undefined;\n }\n return {\n traceId,\n traceTime,\n };\n}\nfunction findTraceComment(document) {\n // 1. Try to find the comment as a direct child of the document\n // Note: TSLint advises to use a 'for of', but TS doesn't allow to use 'for of' if the iterated\n // value is not an array or string (here, a NodeList).\n for (let i = 0; i < document.childNodes.length; i += 1) {\n const comment = getTraceCommentFromNode(document.childNodes[i]);\n if (comment) {\n return comment;\n }\n }\n // 2. If the comment is placed after the </html> tag, but have some space or new lines before or\n // after, the DOM parser will lift it (and the surrounding text) at the end of the <body> tag.\n // Try to look for the comment at the end of the <body> by by iterating over its child nodes in\n // reverse order, stopping if we come across a non-text node.\n if (document.body) {\n for (let i = document.body.childNodes.length - 1; i >= 0; i -= 1) {\n const node = document.body.childNodes[i];\n const comment = getTraceCommentFromNode(node);\n if (comment) {\n return comment;\n }\n if (!isTextNode(node)) {\n break;\n }\n }\n }\n}\nfunction getTraceCommentFromNode(node) {\n if (node && isCommentNode(node)) {\n const match = /^\\s*DATADOG;(.*?)\\s*$/.exec(node.data);\n if (match) {\n return match[1];\n }\n }\n}",
1650
+ "originalLength": 2877,
1651
+ "removedExports": [],
1652
+ "renderedExports": [
1653
+ "INITIAL_DOCUMENT_OUTDATED_TRACE_ID_THRESHOLD",
1654
+ "getDocumentTraceId",
1655
+ "getDocumentTraceDataFromMeta",
1656
+ "getDocumentTraceDataFromComment",
1657
+ "createDocumentTraceData",
1658
+ "findTraceComment"
1659
+ ],
1660
+ "renderedLength": 2630
1661
+ },
1662
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/performanceUtils.js": {
1663
+ "code": "function getNavigationEntry() {\n if (supportPerformanceTimingEvent(RumPerformanceEntryType.NAVIGATION)) {\n const navigationEntry = performance.getEntriesByType(RumPerformanceEntryType.NAVIGATION)[0];\n if (navigationEntry) {\n return navigationEntry;\n }\n }\n const timings = computeTimingsFromDeprecatedPerformanceTiming();\n const entry = {\n entryType: 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: () => ({ ...entry, toJSON: undefined }),\n ...timings,\n };\n return entry;\n}\nfunction computeTimingsFromDeprecatedPerformanceTiming() {\n const result = {};\n const timing = performance.timing;\n for (const key in timing) {\n if (isNumber(timing[key])) {\n const numberKey = key;\n const timingElement = timing[numberKey];\n result[numberKey] = timingElement === 0 ? 0 : getRelativeTime(timingElement);\n }\n }\n return result;\n}",
1664
+ "originalLength": 1409,
1665
+ "removedExports": [],
1666
+ "renderedExports": [
1667
+ "getNavigationEntry",
1668
+ "computeTimingsFromDeprecatedPerformanceTiming"
1669
+ ],
1670
+ "renderedLength": 1184
1671
+ },
1672
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/resource/retrieveInitialDocumentResourceTiming.js": {
1673
+ "code": "function retrieveInitialDocumentResourceTiming(configuration, callback) {\n runOnReadyState(configuration, 'interactive', () => {\n const entry = Object.assign(getNavigationEntry().toJSON(), {\n entryType: RumPerformanceEntryType.RESOURCE,\n initiatorType: FAKE_INITIAL_DOCUMENT,\n traceId: getDocumentTraceId(document),\n toJSON: () => ({ ...entry, toJSON: undefined }),\n });\n callback(entry);\n });\n}",
1674
+ "originalLength": 869,
1675
+ "removedExports": [],
1676
+ "renderedExports": [
1677
+ "retrieveInitialDocumentResourceTiming"
1678
+ ],
1679
+ "renderedLength": 466
1680
+ },
1681
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/resource/resourceCollection.js": {
1682
+ "code": "function startResourceCollection(lifeCycle, configuration, pageStateHistory, taskQueue = createTaskQueue(), retrieveInitialDocumentResourceTimingImpl = retrieveInitialDocumentResourceTiming) {\n lifeCycle.subscribe(7 /* LifeCycleEventType.REQUEST_COMPLETED */, (request) => {\n handleResource(() => processRequest(request, configuration, pageStateHistory));\n });\n const performanceResourceSubscription = createPerformanceObservable(configuration, {\n type: RumPerformanceEntryType.RESOURCE,\n buffered: true,\n }).subscribe((entries) => {\n for (const entry of entries) {\n if (!isResourceEntryRequestType(entry)) {\n handleResource(() => processResourceEntry(entry, configuration));\n }\n }\n });\n retrieveInitialDocumentResourceTimingImpl(configuration, (timing) => {\n handleResource(() => processResourceEntry(timing, configuration));\n });\n function handleResource(computeRawEvent) {\n taskQueue.push(() => {\n const rawEvent = computeRawEvent();\n if (rawEvent) {\n lifeCycle.notify(11 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, rawEvent);\n }\n });\n }\n return {\n stop: () => {\n performanceResourceSubscription.unsubscribe();\n },\n };\n}\nfunction processRequest(request, configuration, pageStateHistory) {\n const matchingTiming = matchRequestResourceEntry(request);\n const startClocks = matchingTiming ? relativeToClocks(matchingTiming.startTime) : request.startClocks;\n const tracingInfo = computeRequestTracingInfo(request, configuration);\n if (!configuration.trackResources && !tracingInfo) {\n return;\n }\n const type = request.type === \"xhr\" /* RequestType.XHR */ ? \"xhr\" /* ResourceType.XHR */ : \"fetch\" /* ResourceType.FETCH */;\n const correspondingTimingOverrides = matchingTiming ? computeResourceEntryMetrics(matchingTiming) : undefined;\n const duration = computeRequestDuration(pageStateHistory, startClocks, request.duration);\n const resourceEvent = combine({\n date: startClocks.timeStamp,\n resource: {\n id: generateUUID(),\n type,\n duration,\n method: request.method,\n status_code: request.status,\n protocol: matchingTiming && computeResourceEntryProtocol(matchingTiming),\n url: isLongDataUrl(request.url) ? sanitizeDataUrl(request.url) : request.url,\n delivery_type: matchingTiming && computeResourceEntryDeliveryType(matchingTiming),\n },\n type: \"resource\" /* RumEventType.RESOURCE */,\n _dd: {\n discarded: !configuration.trackResources,\n },\n }, tracingInfo, correspondingTimingOverrides);\n return {\n startTime: startClocks.relative,\n rawRumEvent: resourceEvent,\n domainContext: {\n performanceEntry: matchingTiming,\n xhr: request.xhr,\n response: request.response,\n requestInput: request.input,\n requestInit: request.init,\n error: request.error,\n isAborted: request.isAborted,\n handlingStack: request.handlingStack,\n },\n };\n}\nfunction processResourceEntry(entry, configuration) {\n const startClocks = relativeToClocks(entry.startTime);\n const tracingInfo = computeResourceEntryTracingInfo(entry, configuration);\n if (!configuration.trackResources && !tracingInfo) {\n return;\n }\n const type = computeResourceEntryType(entry);\n const entryMetrics = computeResourceEntryMetrics(entry);\n const resourceEvent = combine({\n date: startClocks.timeStamp,\n resource: {\n id: generateUUID(),\n type,\n url: entry.name,\n status_code: discardZeroStatus(entry.responseStatus),\n protocol: computeResourceEntryProtocol(entry),\n delivery_type: computeResourceEntryDeliveryType(entry),\n },\n type: \"resource\" /* RumEventType.RESOURCE */,\n _dd: {\n discarded: !configuration.trackResources,\n },\n }, tracingInfo, entryMetrics);\n return {\n startTime: startClocks.relative,\n rawRumEvent: resourceEvent,\n domainContext: {\n performanceEntry: entry,\n },\n };\n}\nfunction computeResourceEntryMetrics(entry) {\n const { renderBlockingStatus } = entry;\n return {\n resource: {\n duration: computeResourceEntryDuration(entry),\n render_blocking_status: renderBlockingStatus,\n ...computeResourceEntrySize(entry),\n ...computeResourceEntryDetails(entry),\n },\n };\n}\nfunction computeRequestTracingInfo(request, configuration) {\n const hasBeenTraced = request.traceSampled && request.traceId && request.spanId;\n if (!hasBeenTraced) {\n return undefined;\n }\n return {\n _dd: {\n span_id: request.spanId.toString(),\n trace_id: request.traceId.toString(),\n rule_psr: configuration.rulePsr,\n },\n };\n}\nfunction computeResourceEntryTracingInfo(entry, configuration) {\n const hasBeenTraced = entry.traceId;\n if (!hasBeenTraced) {\n return undefined;\n }\n return {\n _dd: {\n trace_id: entry.traceId,\n span_id: createSpanIdentifier().toString(),\n rule_psr: configuration.rulePsr,\n },\n };\n}\nfunction computeRequestDuration(pageStateHistory, startClocks, duration) {\n return !pageStateHistory.wasInPageStateDuringPeriod(\"frozen\" /* PageState.FROZEN */, startClocks.relative, duration)\n ? toServerDuration(duration)\n : undefined;\n}\n/**\n * The status is 0 for cross-origin resources without CORS headers, so the status is meaningless, and we shouldn't report it\n * https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming/responseStatus#cross-origin_response_status_codes\n */\nfunction discardZeroStatus(statusCode) {\n return statusCode === 0 ? undefined : statusCode;\n}",
1683
+ "originalLength": 6823,
1684
+ "removedExports": [],
1685
+ "renderedExports": [
1686
+ "startResourceCollection"
1687
+ ],
1688
+ "renderedLength": 6041
1689
+ },
1690
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/trackViewEventCounts.js": {
1691
+ "code": "function trackViewEventCounts(lifeCycle, viewId, onChange) {\n const { stop, eventCounts } = trackEventCounts({\n lifeCycle,\n isChildEvent: (event) => event.view.id === viewId,\n onChange,\n });\n return {\n stop,\n eventCounts,\n };\n}",
1692
+ "originalLength": 386,
1693
+ "removedExports": [],
1694
+ "renderedExports": [
1695
+ "trackViewEventCounts"
1696
+ ],
1697
+ "renderedLength": 274
1698
+ },
1699
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackFirstContentfulPaint.js": {
1700
+ "code": "// Discard FCP timings above a certain delay to avoid incorrect data\n// It happens in some cases like sleep mode or some browser implementations\nconst FCP_MAXIMUM_DELAY = 10 * ONE_MINUTE;\nfunction trackFirstContentfulPaint(configuration, firstHidden, callback) {\n const performanceSubscription = createPerformanceObservable(configuration, {\n type: RumPerformanceEntryType.PAINT,\n buffered: true,\n }).subscribe((entries) => {\n const fcpEntry = entries.find((entry) => entry.name === 'first-contentful-paint' &&\n entry.startTime < firstHidden.timeStamp &&\n entry.startTime < FCP_MAXIMUM_DELAY);\n if (fcpEntry) {\n callback(fcpEntry.startTime);\n }\n });\n return {\n stop: performanceSubscription.unsubscribe,\n };\n}",
1701
+ "originalLength": 1029,
1702
+ "removedExports": [],
1703
+ "renderedExports": [
1704
+ "FCP_MAXIMUM_DELAY",
1705
+ "trackFirstContentfulPaint"
1706
+ ],
1707
+ "renderedLength": 798
1708
+ },
1709
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackFirstInput.js": {
1710
+ "code": "/**\n * Track the first input occurring during the initial View to return:\n * - First Input Delay\n * - First Input Time\n * Callback is called at most one time.\n * Documentation: https://web.dev/fid/\n * Reference implementation: https://github.com/GoogleChrome/web-vitals/blob/master/src/getFID.ts\n */\nfunction trackFirstInput(configuration, firstHidden, callback) {\n const performanceFirstInputSubscription = createPerformanceObservable(configuration, {\n type: RumPerformanceEntryType.FIRST_INPUT,\n buffered: true,\n }).subscribe((entries) => {\n const firstInputEntry = entries.find((entry) => entry.startTime < firstHidden.timeStamp);\n if (firstInputEntry) {\n const firstInputDelay = elapsed(firstInputEntry.startTime, firstInputEntry.processingStart);\n let firstInputTargetSelector;\n if (firstInputEntry.target && isElementNode(firstInputEntry.target)) {\n firstInputTargetSelector = getSelectorFromElement(firstInputEntry.target, configuration.actionNameAttribute);\n }\n callback({\n // Ensure firstInputDelay to be positive, see\n // https://bugs.chromium.org/p/chromium/issues/detail?id=1185815\n delay: firstInputDelay >= 0 ? firstInputDelay : 0,\n time: firstInputEntry.startTime,\n targetSelector: firstInputTargetSelector,\n });\n }\n });\n return {\n stop: () => {\n performanceFirstInputSubscription.unsubscribe();\n },\n };\n}",
1711
+ "originalLength": 1896,
1712
+ "removedExports": [],
1713
+ "renderedExports": [
1714
+ "trackFirstInput"
1715
+ ],
1716
+ "renderedLength": 1551
1717
+ },
1718
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackNavigationTimings.js": {
1719
+ "code": "function trackNavigationTimings(configuration, callback, getNavigationEntryImpl = getNavigationEntry) {\n return waitAfterLoadEvent(configuration, () => {\n const entry = getNavigationEntryImpl();\n if (!isIncompleteNavigation(entry)) {\n callback(processNavigationEntry(entry));\n }\n });\n}\nfunction processNavigationEntry(entry) {\n return {\n domComplete: entry.domComplete,\n domContentLoaded: entry.domContentLoadedEventEnd,\n domInteractive: entry.domInteractive,\n loadEvent: entry.loadEventEnd,\n // In some cases the value reported is negative or is larger\n // than the current page time. Ignore these cases:\n // https://github.com/GoogleChrome/web-vitals/issues/137\n // https://github.com/GoogleChrome/web-vitals/issues/162\n firstByte: entry.responseStart >= 0 && entry.responseStart <= relativeNow() ? entry.responseStart : undefined,\n };\n}\nfunction isIncompleteNavigation(entry) {\n return entry.loadEventEnd <= 0;\n}\nfunction waitAfterLoadEvent(configuration, callback) {\n let timeoutId;\n const { stop: stopOnReadyState } = runOnReadyState(configuration, 'complete', () => {\n // Invoke the callback a bit after the actual load event, so the \"loadEventEnd\" timing is accurate\n timeoutId = setTimeout(() => callback());\n });\n return {\n stop: () => {\n stopOnReadyState();\n clearTimeout(timeoutId);\n },\n };\n}",
1720
+ "originalLength": 1704,
1721
+ "removedExports": [],
1722
+ "renderedExports": [
1723
+ "trackNavigationTimings"
1724
+ ],
1725
+ "renderedLength": 1478
1726
+ },
1727
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackLargestContentfulPaint.js": {
1728
+ "code": "// Discard LCP timings above a certain delay to avoid incorrect data\n// It happens in some cases like sleep mode or some browser implementations\nconst LCP_MAXIMUM_DELAY = 10 * ONE_MINUTE;\n/**\n * Track the largest contentful paint (LCP) occurring during the initial View. This can yield\n * multiple values, only the most recent one should be used.\n * Documentation: https://web.dev/lcp/\n * Reference implementation: https://github.com/GoogleChrome/web-vitals/blob/master/src/onLCP.ts\n */\nfunction trackLargestContentfulPaint(configuration, firstHidden, eventTarget, callback) {\n // Ignore entries that come after the first user interaction. According to the documentation, the\n // browser should not send largest-contentful-paint entries after a user interact with the page,\n // but the web-vitals reference implementation uses this as a safeguard.\n let firstInteractionTimestamp = Infinity;\n const { stop: stopEventListener } = addEventListeners(configuration, eventTarget, [\"pointerdown\" /* DOM_EVENT.POINTER_DOWN */, \"keydown\" /* DOM_EVENT.KEY_DOWN */], (event) => {\n firstInteractionTimestamp = event.timeStamp;\n }, { capture: true, once: true });\n let biggestLcpSize = 0;\n const performanceLcpSubscription = createPerformanceObservable(configuration, {\n type: RumPerformanceEntryType.LARGEST_CONTENTFUL_PAINT,\n buffered: true,\n }).subscribe((entries) => {\n const lcpEntry = findLast(entries, (entry) => entry.entryType === RumPerformanceEntryType.LARGEST_CONTENTFUL_PAINT &&\n entry.startTime < firstInteractionTimestamp &&\n entry.startTime < firstHidden.timeStamp &&\n entry.startTime < LCP_MAXIMUM_DELAY &&\n // Ensure to get the LCP entry with the biggest size, see\n // https://bugs.chromium.org/p/chromium/issues/detail?id=1516655\n entry.size > biggestLcpSize);\n if (lcpEntry) {\n let lcpTargetSelector;\n if (lcpEntry.element) {\n lcpTargetSelector = getSelectorFromElement(lcpEntry.element, configuration.actionNameAttribute);\n }\n callback({\n value: lcpEntry.startTime,\n targetSelector: lcpTargetSelector,\n });\n biggestLcpSize = lcpEntry.size;\n }\n });\n return {\n stop: () => {\n stopEventListener();\n performanceLcpSubscription.unsubscribe();\n },\n };\n}",
1729
+ "originalLength": 2780,
1730
+ "removedExports": [],
1731
+ "renderedExports": [
1732
+ "LCP_MAXIMUM_DELAY",
1733
+ "trackLargestContentfulPaint"
1734
+ ],
1735
+ "renderedLength": 2447
1736
+ },
1737
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackFirstHidden.js": {
1738
+ "code": "function trackFirstHidden(configuration, eventTarget = window) {\n let timeStamp;\n let stopListeners;\n if (document.visibilityState === 'hidden') {\n timeStamp = 0;\n }\n else {\n timeStamp = Infinity;\n ({ stop: stopListeners } = addEventListeners(configuration, eventTarget, [\"pagehide\" /* DOM_EVENT.PAGE_HIDE */, \"visibilitychange\" /* DOM_EVENT.VISIBILITY_CHANGE */], (event) => {\n if (event.type === \"pagehide\" /* DOM_EVENT.PAGE_HIDE */ || document.visibilityState === 'hidden') {\n timeStamp = event.timeStamp;\n stopListeners();\n }\n }, { capture: true }));\n }\n return {\n get timeStamp() {\n return timeStamp;\n },\n stop() {\n stopListeners === null || stopListeners === void 0 ? void 0 : stopListeners();\n },\n };\n}",
1739
+ "originalLength": 974,
1740
+ "removedExports": [],
1741
+ "renderedExports": [
1742
+ "trackFirstHidden"
1743
+ ],
1744
+ "renderedLength": 863
1745
+ },
1746
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackInitialViewMetrics.js": {
1747
+ "code": "function trackInitialViewMetrics(configuration, setLoadEvent, scheduleViewUpdate) {\n const initialViewMetrics = {};\n const { stop: stopNavigationTracking } = trackNavigationTimings(configuration, (navigationTimings) => {\n setLoadEvent(navigationTimings.loadEvent);\n initialViewMetrics.navigationTimings = navigationTimings;\n scheduleViewUpdate();\n });\n const firstHidden = trackFirstHidden(configuration);\n const { stop: stopFCPTracking } = trackFirstContentfulPaint(configuration, firstHidden, (firstContentfulPaint) => {\n initialViewMetrics.firstContentfulPaint = firstContentfulPaint;\n scheduleViewUpdate();\n });\n const { stop: stopLCPTracking } = trackLargestContentfulPaint(configuration, firstHidden, window, (largestContentfulPaint) => {\n initialViewMetrics.largestContentfulPaint = largestContentfulPaint;\n scheduleViewUpdate();\n });\n const { stop: stopFIDTracking } = trackFirstInput(configuration, firstHidden, (firstInput) => {\n initialViewMetrics.firstInput = firstInput;\n scheduleViewUpdate();\n });\n function stop() {\n stopNavigationTracking();\n stopFCPTracking();\n stopLCPTracking();\n stopFIDTracking();\n firstHidden.stop();\n }\n return {\n stop,\n initialViewMetrics,\n };\n}",
1748
+ "originalLength": 1723,
1749
+ "removedExports": [],
1750
+ "renderedExports": [
1751
+ "trackInitialViewMetrics"
1752
+ ],
1753
+ "renderedLength": 1339
1754
+ },
1755
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackCumulativeLayoutShift.js": {
1756
+ "code": "/**\n * Track the cumulative layout shifts (CLS).\n * Layout shifts are grouped into session windows.\n * The minimum gap between session windows is 1 second.\n * The maximum duration of a session window is 5 second.\n * The session window layout shift value is the sum of layout shifts inside it.\n * The CLS value is the max of session windows values.\n *\n * This yields a new value whenever the CLS value is updated (a higher session window value is computed).\n *\n * See isLayoutShiftSupported to check for browser support.\n *\n * Documentation:\n * https://web.dev/cls/\n * https://web.dev/evolving-cls/\n * Reference implementation: https://github.com/GoogleChrome/web-vitals/blob/master/src/getCLS.ts\n */\nfunction trackCumulativeLayoutShift(configuration, viewStart, callback) {\n if (!isLayoutShiftSupported()) {\n return {\n stop: noop,\n };\n }\n let maxClsValue = 0;\n let maxClsTarget;\n let maxClsStartTime;\n // if no layout shift happen the value should be reported as 0\n callback({\n value: 0,\n });\n const window = slidingSessionWindow();\n const performanceSubscription = createPerformanceObservable(configuration, {\n type: RumPerformanceEntryType.LAYOUT_SHIFT,\n buffered: true,\n }).subscribe((entries) => {\n for (const entry of entries) {\n if (entry.hadRecentInput || entry.startTime < viewStart) {\n continue;\n }\n const { cumulatedValue, isMaxValue } = window.update(entry);\n if (isMaxValue) {\n const target = getTargetFromSource(entry.sources);\n maxClsTarget = target ? new WeakRef(target) : undefined;\n maxClsStartTime = elapsed(viewStart, entry.startTime);\n }\n if (cumulatedValue > maxClsValue) {\n maxClsValue = cumulatedValue;\n const target = maxClsTarget === null || maxClsTarget === void 0 ? void 0 : maxClsTarget.deref();\n callback({\n value: round(maxClsValue, 4),\n targetSelector: target && getSelectorFromElement(target, configuration.actionNameAttribute),\n time: maxClsStartTime,\n });\n }\n }\n });\n return {\n stop: () => {\n performanceSubscription.unsubscribe();\n },\n };\n}\nfunction getTargetFromSource(sources) {\n var _a;\n if (!sources) {\n return;\n }\n return (_a = sources.find((source) => !!source.node && isElementNode(source.node))) === null || _a === void 0 ? void 0 : _a.node;\n}\nconst MAX_WINDOW_DURATION = 5 * ONE_SECOND;\nconst MAX_UPDATE_GAP = ONE_SECOND;\nfunction slidingSessionWindow() {\n let cumulatedValue = 0;\n let startTime;\n let endTime;\n let maxValue = 0;\n return {\n update: (entry) => {\n const shouldCreateNewWindow = startTime === undefined ||\n entry.startTime - endTime >= MAX_UPDATE_GAP ||\n entry.startTime - startTime >= MAX_WINDOW_DURATION;\n let isMaxValue;\n if (shouldCreateNewWindow) {\n startTime = endTime = entry.startTime;\n maxValue = cumulatedValue = entry.value;\n isMaxValue = true;\n }\n else {\n cumulatedValue += entry.value;\n endTime = entry.startTime;\n isMaxValue = entry.value > maxValue;\n if (isMaxValue) {\n maxValue = entry.value;\n }\n }\n return {\n cumulatedValue,\n isMaxValue,\n };\n },\n };\n}\n/**\n * Check whether `layout-shift` is supported by the browser.\n */\nfunction isLayoutShiftSupported() {\n return supportPerformanceTimingEvent(RumPerformanceEntryType.LAYOUT_SHIFT) && 'WeakRef' in window;\n}",
1757
+ "originalLength": 4282,
1758
+ "removedExports": [],
1759
+ "renderedExports": [
1760
+ "trackCumulativeLayoutShift",
1761
+ "MAX_WINDOW_DURATION",
1762
+ "isLayoutShiftSupported"
1763
+ ],
1764
+ "renderedLength": 3855
1765
+ },
1766
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/interactionCountPolyfill.js": {
1767
+ "code": "/**\n * performance.interactionCount polyfill\n *\n * The interactionCount is an integer which counts the total number of distinct user interactions,\n * for which there was a unique interactionId.\n *\n * The interactionCount polyfill is an estimate based on a convention specific to Chrome. Cf: https://github.com/GoogleChrome/web-vitals/pull/213\n * This is currently not an issue as the polyfill is only used for INP which is currently only supported on Chrome.\n * Hopefully when/if other browsers will support INP, they will also implement performance.interactionCount at the same time, so we won't need that polyfill.\n *\n * Reference implementation: https://github.com/GoogleChrome/web-vitals/blob/main/src/lib/polyfills/interactionCountPolyfill.ts\n */\nlet observer;\nlet interactionCountEstimate = 0;\nlet minKnownInteractionId = Infinity;\nlet maxKnownInteractionId = 0;\nfunction initInteractionCountPolyfill() {\n if ('interactionCount' in performance || observer) {\n return;\n }\n observer = new window.PerformanceObserver(monitor((entries) => {\n entries.getEntries().forEach((e) => {\n const entry = e;\n if (entry.interactionId) {\n minKnownInteractionId = Math.min(minKnownInteractionId, entry.interactionId);\n maxKnownInteractionId = Math.max(maxKnownInteractionId, entry.interactionId);\n interactionCountEstimate = (maxKnownInteractionId - minKnownInteractionId) / 7 + 1;\n }\n });\n }));\n observer.observe({ type: 'event', buffered: true, durationThreshold: 0 });\n}\n/**\n * Returns the `interactionCount` value using the native API (if available)\n * or the polyfill estimate in this module.\n */\nconst getInteractionCount = () => observer ? interactionCountEstimate : window.performance.interactionCount || 0;",
1768
+ "originalLength": 1934,
1769
+ "removedExports": [],
1770
+ "renderedExports": [
1771
+ "initInteractionCountPolyfill",
1772
+ "getInteractionCount"
1773
+ ],
1774
+ "renderedLength": 1818
1775
+ },
1776
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackInteractionToNextPaint.js": {
1777
+ "code": "// Arbitrary value to prevent unnecessary memory usage on views with lots of interactions.\nconst MAX_INTERACTION_ENTRIES = 10;\n// Arbitrary value to cap INP outliers\nconst MAX_INP_VALUE = (1 * ONE_MINUTE);\n/**\n * Track the interaction to next paint (INP).\n * To avoid outliers, return the p98 worst interaction of the view.\n * Documentation: https://web.dev/inp/\n * Reference implementation: https://github.com/GoogleChrome/web-vitals/blob/main/src/onINP.ts\n */\nfunction trackInteractionToNextPaint(configuration, viewStart, viewLoadingType) {\n if (!isInteractionToNextPaintSupported()) {\n return {\n getInteractionToNextPaint: () => undefined,\n setViewEnd: noop,\n stop: noop,\n };\n }\n const { getViewInteractionCount, stopViewInteractionCount } = trackViewInteractionCount(viewLoadingType);\n let viewEnd = Infinity;\n const longestInteractions = trackLongestInteractions(getViewInteractionCount);\n let interactionToNextPaint = -1;\n let interactionToNextPaintTargetSelector;\n let interactionToNextPaintStartTime;\n function handleEntries(entries) {\n for (const entry of entries) {\n if (entry.interactionId &&\n // Check the entry start time is inside the view bounds because some view interactions can be reported after the view end (if long duration).\n entry.startTime >= viewStart &&\n entry.startTime <= viewEnd) {\n longestInteractions.process(entry);\n }\n }\n const newInteraction = longestInteractions.estimateP98Interaction();\n if (newInteraction && newInteraction.duration !== interactionToNextPaint) {\n interactionToNextPaint = newInteraction.duration;\n interactionToNextPaintStartTime = elapsed(viewStart, newInteraction.startTime);\n interactionToNextPaintTargetSelector = getInteractionSelector(newInteraction.startTime);\n if (!interactionToNextPaintTargetSelector && newInteraction.target && isElementNode(newInteraction.target)) {\n interactionToNextPaintTargetSelector = getSelectorFromElement(newInteraction.target, configuration.actionNameAttribute);\n }\n }\n }\n const firstInputSubscription = createPerformanceObservable(configuration, {\n type: RumPerformanceEntryType.FIRST_INPUT,\n buffered: true,\n }).subscribe(handleEntries);\n const eventSubscription = createPerformanceObservable(configuration, {\n type: RumPerformanceEntryType.EVENT,\n // durationThreshold only impact PerformanceEventTiming entries used for INP computation which requires a threshold at 40 (default is 104ms)\n // cf: https://github.com/GoogleChrome/web-vitals/blob/3806160ffbc93c3c4abf210a167b81228172b31c/src/onINP.ts#L202-L210\n durationThreshold: 40,\n buffered: true,\n }).subscribe(handleEntries);\n return {\n getInteractionToNextPaint: () => {\n // If no INP duration where captured because of the performanceObserver 40ms threshold\n // but the view interaction count > 0 then report 0\n if (interactionToNextPaint >= 0) {\n return {\n value: Math.min(interactionToNextPaint, MAX_INP_VALUE),\n targetSelector: interactionToNextPaintTargetSelector,\n time: interactionToNextPaintStartTime,\n };\n }\n else if (getViewInteractionCount()) {\n return {\n value: 0,\n };\n }\n },\n setViewEnd: (viewEndTime) => {\n viewEnd = viewEndTime;\n stopViewInteractionCount();\n },\n stop: () => {\n eventSubscription.unsubscribe();\n firstInputSubscription.unsubscribe();\n },\n };\n}\nfunction trackLongestInteractions(getViewInteractionCount) {\n const longestInteractions = [];\n function sortAndTrimLongestInteractions() {\n longestInteractions.sort((a, b) => b.duration - a.duration).splice(MAX_INTERACTION_ENTRIES);\n }\n return {\n /**\n * Process the performance entry:\n * - if its duration is long enough, add the performance entry to the list of worst interactions\n * - if an entry with the same interaction id exists and its duration is lower than the new one, then replace it in the list of worst interactions\n */\n process(entry) {\n const interactionIndex = longestInteractions.findIndex((interaction) => entry.interactionId === interaction.interactionId);\n const minLongestInteraction = longestInteractions[longestInteractions.length - 1];\n if (interactionIndex !== -1) {\n if (entry.duration > longestInteractions[interactionIndex].duration) {\n longestInteractions[interactionIndex] = entry;\n sortAndTrimLongestInteractions();\n }\n }\n else if (longestInteractions.length < MAX_INTERACTION_ENTRIES ||\n entry.duration > minLongestInteraction.duration) {\n longestInteractions.push(entry);\n sortAndTrimLongestInteractions();\n }\n },\n /**\n * Compute the p98 longest interaction.\n * For better performance the computation is based on 10 longest interactions and the interaction count of the current view.\n */\n estimateP98Interaction() {\n const interactionIndex = Math.min(longestInteractions.length - 1, Math.floor(getViewInteractionCount() / 50));\n return longestInteractions[interactionIndex];\n },\n };\n}\nfunction trackViewInteractionCount(viewLoadingType) {\n initInteractionCountPolyfill();\n const previousInteractionCount = viewLoadingType === \"initial_load\" /* ViewLoadingType.INITIAL_LOAD */ ? 0 : getInteractionCount();\n let state = { stopped: false };\n function computeViewInteractionCount() {\n return getInteractionCount() - previousInteractionCount;\n }\n return {\n getViewInteractionCount: () => {\n if (state.stopped) {\n return state.interactionCount;\n }\n return computeViewInteractionCount();\n },\n stopViewInteractionCount: () => {\n state = { stopped: true, interactionCount: computeViewInteractionCount() };\n },\n };\n}\nfunction isInteractionToNextPaintSupported() {\n return (supportPerformanceTimingEvent(RumPerformanceEntryType.EVENT) &&\n window.PerformanceEventTiming &&\n 'interactionId' in PerformanceEventTiming.prototype);\n}",
1778
+ "originalLength": 7253,
1779
+ "removedExports": [],
1780
+ "renderedExports": [
1781
+ "MAX_INP_VALUE",
1782
+ "trackInteractionToNextPaint",
1783
+ "trackViewInteractionCount",
1784
+ "isInteractionToNextPaintSupported"
1785
+ ],
1786
+ "renderedLength": 6649
1787
+ },
1788
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackLoadingTime.js": {
1789
+ "code": "function trackLoadingTime(lifeCycle, domMutationObservable, windowOpenObservable, configuration, loadType, viewStart, callback) {\n let isWaitingForLoadEvent = loadType === \"initial_load\" /* ViewLoadingType.INITIAL_LOAD */;\n let isWaitingForActivityLoadingTime = true;\n const loadingTimeCandidates = [];\n const firstHidden = trackFirstHidden(configuration);\n function invokeCallbackIfAllCandidatesAreReceived() {\n if (!isWaitingForActivityLoadingTime && !isWaitingForLoadEvent && loadingTimeCandidates.length > 0) {\n const loadingTime = Math.max(...loadingTimeCandidates);\n if (loadingTime < firstHidden.timeStamp) {\n callback(loadingTime);\n }\n }\n }\n const { stop } = waitPageActivityEnd(lifeCycle, domMutationObservable, windowOpenObservable, configuration, (event) => {\n if (isWaitingForActivityLoadingTime) {\n isWaitingForActivityLoadingTime = false;\n if (event.hadActivity) {\n loadingTimeCandidates.push(elapsed(viewStart.timeStamp, event.end));\n }\n invokeCallbackIfAllCandidatesAreReceived();\n }\n });\n return {\n stop: () => {\n stop();\n firstHidden.stop();\n },\n setLoadEvent: (loadEvent) => {\n if (isWaitingForLoadEvent) {\n isWaitingForLoadEvent = false;\n loadingTimeCandidates.push(loadEvent);\n invokeCallbackIfAllCandidatesAreReceived();\n }\n },\n };\n}",
1790
+ "originalLength": 1758,
1791
+ "removedExports": [],
1792
+ "renderedExports": [
1793
+ "trackLoadingTime"
1794
+ ],
1795
+ "renderedLength": 1537
1796
+ },
1797
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/scroll.js": {
1798
+ "code": "function getScrollX() {\n let scrollX;\n const 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 let scrollY;\n const 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}",
1799
+ "originalLength": 728,
1800
+ "removedExports": [],
1801
+ "renderedExports": [
1802
+ "getScrollX",
1803
+ "getScrollY"
1804
+ ],
1805
+ "renderedLength": 679
1806
+ },
1807
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/viewportObservable.js": {
1808
+ "code": "let viewportObservable;\nfunction initViewportObservable(configuration) {\n if (!viewportObservable) {\n viewportObservable = createViewportObservable(configuration);\n }\n return viewportObservable;\n}\nfunction createViewportObservable(configuration) {\n return new Observable((observable) => {\n const { throttled: updateDimension } = throttle(() => {\n observable.notify(getViewportDimension());\n }, 200);\n return 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 const 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}",
1809
+ "originalLength": 1223,
1810
+ "removedExports": [],
1811
+ "renderedExports": [
1812
+ "initViewportObservable",
1813
+ "createViewportObservable",
1814
+ "getViewportDimension"
1815
+ ],
1816
+ "renderedLength": 1075
1817
+ },
1818
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackScrollMetrics.js": {
1819
+ "code": "/** Arbitrary scroll throttle duration */\nconst THROTTLE_SCROLL_DURATION = ONE_SECOND;\nfunction trackScrollMetrics(configuration, viewStart, callback, scrollValues = createScrollValuesObservable(configuration)) {\n let maxScrollDepth = 0;\n let maxScrollHeight = 0;\n let maxScrollHeightTime = 0;\n const subscription = scrollValues.subscribe(({ scrollDepth, scrollTop, scrollHeight }) => {\n let shouldUpdate = false;\n if (scrollDepth > maxScrollDepth) {\n maxScrollDepth = scrollDepth;\n shouldUpdate = true;\n }\n if (scrollHeight > maxScrollHeight) {\n maxScrollHeight = scrollHeight;\n const now = relativeNow();\n maxScrollHeightTime = elapsed(viewStart.relative, now);\n shouldUpdate = true;\n }\n if (shouldUpdate) {\n callback({\n maxDepth: Math.min(maxScrollDepth, maxScrollHeight),\n maxDepthScrollTop: scrollTop,\n maxScrollHeight,\n maxScrollHeightTime,\n });\n }\n });\n return {\n stop: () => subscription.unsubscribe(),\n };\n}\nfunction computeScrollValues() {\n const scrollTop = getScrollY();\n const { height } = getViewportDimension();\n const scrollHeight = Math.round((document.scrollingElement || document.documentElement).scrollHeight);\n const scrollDepth = Math.round(height + scrollTop);\n return {\n scrollHeight,\n scrollDepth,\n scrollTop,\n };\n}\nfunction createScrollValuesObservable(configuration, throttleDuration = THROTTLE_SCROLL_DURATION) {\n return new Observable((observable) => {\n function notify() {\n observable.notify(computeScrollValues());\n }\n if (window.ResizeObserver) {\n const throttledNotify = throttle(notify, throttleDuration, {\n leading: false,\n trailing: true,\n });\n const observerTarget = document.scrollingElement || document.documentElement;\n const resizeObserver = new ResizeObserver(monitor(throttledNotify.throttled));\n if (observerTarget) {\n resizeObserver.observe(observerTarget);\n }\n const eventListener = addEventListener(configuration, window, \"scroll\" /* DOM_EVENT.SCROLL */, throttledNotify.throttled, {\n passive: true,\n });\n return () => {\n throttledNotify.cancel();\n resizeObserver.disconnect();\n eventListener.stop();\n };\n }\n });\n}",
1820
+ "originalLength": 2914,
1821
+ "removedExports": [],
1822
+ "renderedExports": [
1823
+ "THROTTLE_SCROLL_DURATION",
1824
+ "trackScrollMetrics",
1825
+ "computeScrollValues",
1826
+ "createScrollValuesObservable"
1827
+ ],
1828
+ "renderedLength": 2585
1829
+ },
1830
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewMetrics/trackCommonViewMetrics.js": {
1831
+ "code": "function trackCommonViewMetrics(lifeCycle, domMutationObservable, windowOpenObservable, configuration, scheduleViewUpdate, loadingType, viewStart) {\n const commonViewMetrics = {};\n const { stop: stopLoadingTimeTracking, setLoadEvent } = trackLoadingTime(lifeCycle, domMutationObservable, windowOpenObservable, configuration, loadingType, viewStart, (newLoadingTime) => {\n commonViewMetrics.loadingTime = newLoadingTime;\n scheduleViewUpdate();\n });\n const { stop: stopScrollMetricsTracking } = trackScrollMetrics(configuration, viewStart, (newScrollMetrics) => {\n commonViewMetrics.scroll = newScrollMetrics;\n });\n const { stop: stopCLSTracking } = trackCumulativeLayoutShift(configuration, viewStart.relative, (cumulativeLayoutShift) => {\n commonViewMetrics.cumulativeLayoutShift = cumulativeLayoutShift;\n scheduleViewUpdate();\n });\n const { stop: stopINPTracking, getInteractionToNextPaint, setViewEnd, } = trackInteractionToNextPaint(configuration, viewStart.relative, loadingType);\n return {\n stop: () => {\n stopLoadingTimeTracking();\n stopCLSTracking();\n stopScrollMetricsTracking();\n },\n stopINPTracking,\n setLoadEvent,\n setViewEnd,\n getCommonViewMetrics: () => {\n commonViewMetrics.interactionToNextPaint = getInteractionToNextPaint();\n return commonViewMetrics;\n },\n };\n}",
1832
+ "originalLength": 1771,
1833
+ "removedExports": [],
1834
+ "renderedExports": [
1835
+ "trackCommonViewMetrics"
1836
+ ],
1837
+ "renderedLength": 1447
1838
+ },
1839
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/trackViews.js": {
1840
+ "code": "const THROTTLE_VIEW_UPDATE_PERIOD = 3000;\nconst SESSION_KEEP_ALIVE_INTERVAL = 5 * ONE_MINUTE;\n// Some events or metrics can be captured after the end of the view. To avoid missing those;\n// an arbitrary delay is added for stopping their tracking after the view ends.\n//\n// Ideally, we would not stop and keep tracking events or metrics until the end of the session.\n// But this might have a small performance impact if there are many many views.\n// So let's have a fairly short delay improving the situation in most cases and avoid impacting performances too much.\nconst KEEP_TRACKING_AFTER_VIEW_DELAY = 5 * ONE_MINUTE;\nfunction trackViews(location, lifeCycle, domMutationObservable, windowOpenObservable, configuration, locationChangeObservable, areViewsTrackedAutomatically, initialViewOptions) {\n const activeViews = new Set();\n let currentView = startNewView(\"initial_load\" /* ViewLoadingType.INITIAL_LOAD */, clocksOrigin(), initialViewOptions);\n startViewLifeCycle();\n let locationChangeSubscription;\n if (areViewsTrackedAutomatically) {\n locationChangeSubscription = renewViewOnLocationChange(locationChangeObservable);\n }\n function startNewView(loadingType, startClocks, viewOptions) {\n const newlyCreatedView = newView(lifeCycle, domMutationObservable, windowOpenObservable, configuration, location, loadingType, startClocks, viewOptions);\n activeViews.add(newlyCreatedView);\n newlyCreatedView.stopObservable.subscribe(() => {\n activeViews.delete(newlyCreatedView);\n });\n return newlyCreatedView;\n }\n function startViewLifeCycle() {\n lifeCycle.subscribe(9 /* LifeCycleEventType.SESSION_RENEWED */, () => {\n // Renew view on session renewal\n currentView = startNewView(\"route_change\" /* ViewLoadingType.ROUTE_CHANGE */, undefined, {\n name: currentView.name,\n service: currentView.service,\n version: currentView.version,\n context: currentView.contextManager.getContext(),\n });\n });\n lifeCycle.subscribe(8 /* LifeCycleEventType.SESSION_EXPIRED */, () => {\n currentView.end({ sessionIsActive: false });\n });\n // End the current view on page unload\n lifeCycle.subscribe(10 /* LifeCycleEventType.PAGE_EXITED */, (pageExitEvent) => {\n if (pageExitEvent.reason === PageExitReason.UNLOADING) {\n currentView.end();\n }\n });\n }\n function renewViewOnLocationChange(locationChangeObservable) {\n return locationChangeObservable.subscribe(({ oldLocation, newLocation }) => {\n if (areDifferentLocation(oldLocation, newLocation)) {\n currentView.end();\n currentView = startNewView(\"route_change\" /* ViewLoadingType.ROUTE_CHANGE */);\n }\n });\n }\n return {\n addTiming: (name, time = timeStampNow()) => {\n currentView.addTiming(name, time);\n },\n startView: (options, startClocks) => {\n currentView.end({ endClocks: startClocks });\n currentView = startNewView(\"route_change\" /* ViewLoadingType.ROUTE_CHANGE */, startClocks, options);\n },\n setViewContext: (context) => {\n currentView.contextManager.setContext(context);\n },\n setViewContextProperty: (key, value) => {\n currentView.contextManager.setContextProperty(key, value);\n },\n setViewName: (name) => {\n currentView.setViewName(name);\n },\n stop: () => {\n if (locationChangeSubscription) {\n locationChangeSubscription.unsubscribe();\n }\n currentView.end();\n activeViews.forEach((view) => view.stop());\n },\n };\n}\nfunction newView(lifeCycle, domMutationObservable, windowOpenObservable, configuration, initialLocation, loadingType, startClocks = clocksNow(), viewOptions) {\n // Setup initial values\n const id = generateUUID();\n const stopObservable = new Observable();\n const customTimings = {};\n let documentVersion = 0;\n let endClocks;\n const location = shallowClone(initialLocation);\n const contextManager = createContextManager();\n let sessionIsActive = true;\n let name;\n let service;\n let version;\n let context;\n if (viewOptions) {\n name = viewOptions.name;\n service = viewOptions.service || undefined;\n version = viewOptions.version || undefined;\n if (viewOptions.context) {\n context = viewOptions.context;\n // use ContextManager to update the context so we always sanitize it\n contextManager.setContext(context);\n }\n }\n const viewCreatedEvent = {\n id,\n name,\n startClocks,\n service,\n version,\n context,\n };\n lifeCycle.notify(1 /* LifeCycleEventType.BEFORE_VIEW_CREATED */, viewCreatedEvent);\n lifeCycle.notify(2 /* LifeCycleEventType.VIEW_CREATED */, viewCreatedEvent);\n // Update the view every time the measures are changing\n const { throttled: scheduleViewUpdate, cancel: cancelScheduleViewUpdate } = throttle(triggerViewUpdate, THROTTLE_VIEW_UPDATE_PERIOD, {\n leading: false,\n });\n const { setLoadEvent, setViewEnd, stop: stopCommonViewMetricsTracking, stopINPTracking, getCommonViewMetrics, } = trackCommonViewMetrics(lifeCycle, domMutationObservable, windowOpenObservable, configuration, scheduleViewUpdate, loadingType, startClocks);\n const { stop: stopInitialViewMetricsTracking, initialViewMetrics } = loadingType === \"initial_load\" /* ViewLoadingType.INITIAL_LOAD */\n ? trackInitialViewMetrics(configuration, setLoadEvent, scheduleViewUpdate)\n : { stop: noop, initialViewMetrics: {} };\n const { stop: stopEventCountsTracking, eventCounts } = trackViewEventCounts(lifeCycle, id, scheduleViewUpdate);\n // Session keep alive\n const keepAliveIntervalId = setInterval(triggerViewUpdate, SESSION_KEEP_ALIVE_INTERVAL);\n // Initial view update\n triggerViewUpdate();\n contextManager.changeObservable.subscribe(triggerViewUpdate);\n function triggerViewUpdate() {\n cancelScheduleViewUpdate();\n documentVersion += 1;\n const currentEnd = endClocks === undefined ? timeStampNow() : endClocks.timeStamp;\n lifeCycle.notify(3 /* LifeCycleEventType.VIEW_UPDATED */, {\n customTimings,\n documentVersion,\n id,\n name,\n service,\n version,\n context: contextManager.getContext(),\n loadingType,\n location,\n startClocks,\n commonViewMetrics: getCommonViewMetrics(),\n initialViewMetrics,\n duration: elapsed(startClocks.timeStamp, currentEnd),\n isActive: endClocks === undefined,\n sessionIsActive,\n eventCounts,\n });\n }\n return {\n get name() {\n return name;\n },\n service,\n version,\n contextManager,\n stopObservable,\n end(options = {}) {\n var _a, _b;\n if (endClocks) {\n // view already ended\n return;\n }\n endClocks = (_a = options.endClocks) !== null && _a !== void 0 ? _a : clocksNow();\n sessionIsActive = (_b = options.sessionIsActive) !== null && _b !== void 0 ? _b : true;\n lifeCycle.notify(4 /* LifeCycleEventType.VIEW_ENDED */, { endClocks });\n lifeCycle.notify(5 /* LifeCycleEventType.AFTER_VIEW_ENDED */, { endClocks });\n clearInterval(keepAliveIntervalId);\n setViewEnd(endClocks.relative);\n stopCommonViewMetricsTracking();\n triggerViewUpdate();\n setTimeout(() => {\n this.stop();\n }, KEEP_TRACKING_AFTER_VIEW_DELAY);\n },\n stop() {\n stopInitialViewMetricsTracking();\n stopEventCountsTracking();\n stopINPTracking();\n stopObservable.notify();\n },\n addTiming(name, time) {\n if (endClocks) {\n return;\n }\n const relativeTime = looksLikeRelativeTime(time) ? time : elapsed(startClocks.timeStamp, time);\n customTimings[sanitizeTiming(name)] = relativeTime;\n scheduleViewUpdate();\n },\n setViewName(updatedName) {\n name = updatedName;\n triggerViewUpdate();\n },\n };\n}\n/**\n * Timing name is used as facet path that must contain only letters, digits, or the characters - _ . @ $\n */\nfunction sanitizeTiming(name) {\n const sanitized = name.replace(/[^a-zA-Z0-9-_.@$]/g, '_');\n if (sanitized !== name) {\n display.warn(`Invalid timing name: ${name}, sanitized to: ${sanitized}`);\n }\n return sanitized;\n}\nfunction areDifferentLocation(currentLocation, otherLocation) {\n return (currentLocation.pathname !== otherLocation.pathname ||\n (!isHashAnAnchor(otherLocation.hash) &&\n getPathFromHash(otherLocation.hash) !== getPathFromHash(currentLocation.hash)));\n}\nfunction isHashAnAnchor(hash) {\n const correspondingId = hash.substring(1);\n // check if the correspondingId is empty because on Firefox an empty string passed to getElementById() prints a consol warning\n return correspondingId !== '' && !!document.getElementById(correspondingId);\n}\nfunction getPathFromHash(hash) {\n const index = hash.indexOf('?');\n return index < 0 ? hash : hash.slice(0, index);\n}",
1841
+ "originalLength": 10120,
1842
+ "removedExports": [],
1843
+ "renderedExports": [
1844
+ "THROTTLE_VIEW_UPDATE_PERIOD",
1845
+ "SESSION_KEEP_ALIVE_INTERVAL",
1846
+ "KEEP_TRACKING_AFTER_VIEW_DELAY",
1847
+ "trackViews"
1848
+ ],
1849
+ "renderedLength": 9563
1850
+ },
1851
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/view/viewCollection.js": {
1852
+ "code": "function startViewCollection(lifeCycle, configuration, location, domMutationObservable, pageOpenObserable, locationChangeObservable, featureFlagContexts, pageStateHistory, recorderApi, initialViewOptions) {\n lifeCycle.subscribe(3 /* LifeCycleEventType.VIEW_UPDATED */, (view) => lifeCycle.notify(11 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, processViewUpdate(view, configuration, featureFlagContexts, recorderApi, pageStateHistory)));\n return trackViews(location, lifeCycle, domMutationObservable, pageOpenObserable, configuration, locationChangeObservable, !configuration.trackViewsManually, initialViewOptions);\n}\nfunction processViewUpdate(view, configuration, featureFlagContexts, recorderApi, pageStateHistory) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;\n const replayStats = recorderApi.getReplayStats(view.id);\n const featureFlagContext = featureFlagContexts.findFeatureFlagEvaluations(view.startClocks.relative);\n const pageStates = pageStateHistory.findAll(view.startClocks.relative, view.duration);\n const viewEvent = {\n _dd: {\n document_version: view.documentVersion,\n replay_stats: replayStats,\n page_states: pageStates,\n configuration: {\n start_session_replay_recording_manually: configuration.startSessionReplayRecordingManually,\n },\n },\n date: view.startClocks.timeStamp,\n type: \"view\" /* RumEventType.VIEW */,\n view: {\n action: {\n count: view.eventCounts.actionCount,\n },\n frustration: {\n count: view.eventCounts.frustrationCount,\n },\n cumulative_layout_shift: (_a = view.commonViewMetrics.cumulativeLayoutShift) === null || _a === void 0 ? void 0 : _a.value,\n cumulative_layout_shift_time: toServerDuration((_b = view.commonViewMetrics.cumulativeLayoutShift) === null || _b === void 0 ? void 0 : _b.time),\n cumulative_layout_shift_target_selector: (_c = view.commonViewMetrics.cumulativeLayoutShift) === null || _c === void 0 ? void 0 : _c.targetSelector,\n first_byte: toServerDuration((_d = view.initialViewMetrics.navigationTimings) === null || _d === void 0 ? void 0 : _d.firstByte),\n dom_complete: toServerDuration((_e = view.initialViewMetrics.navigationTimings) === null || _e === void 0 ? void 0 : _e.domComplete),\n dom_content_loaded: toServerDuration((_f = view.initialViewMetrics.navigationTimings) === null || _f === void 0 ? void 0 : _f.domContentLoaded),\n dom_interactive: toServerDuration((_g = view.initialViewMetrics.navigationTimings) === null || _g === void 0 ? void 0 : _g.domInteractive),\n error: {\n count: view.eventCounts.errorCount,\n },\n first_contentful_paint: toServerDuration(view.initialViewMetrics.firstContentfulPaint),\n first_input_delay: toServerDuration((_h = view.initialViewMetrics.firstInput) === null || _h === void 0 ? void 0 : _h.delay),\n first_input_time: toServerDuration((_j = view.initialViewMetrics.firstInput) === null || _j === void 0 ? void 0 : _j.time),\n first_input_target_selector: (_k = view.initialViewMetrics.firstInput) === null || _k === void 0 ? void 0 : _k.targetSelector,\n interaction_to_next_paint: toServerDuration((_l = view.commonViewMetrics.interactionToNextPaint) === null || _l === void 0 ? void 0 : _l.value),\n interaction_to_next_paint_time: toServerDuration((_m = view.commonViewMetrics.interactionToNextPaint) === null || _m === void 0 ? void 0 : _m.time),\n interaction_to_next_paint_target_selector: (_o = view.commonViewMetrics.interactionToNextPaint) === null || _o === void 0 ? void 0 : _o.targetSelector,\n is_active: view.isActive,\n name: view.name,\n largest_contentful_paint: toServerDuration((_p = view.initialViewMetrics.largestContentfulPaint) === null || _p === void 0 ? void 0 : _p.value),\n largest_contentful_paint_target_selector: (_q = view.initialViewMetrics.largestContentfulPaint) === null || _q === void 0 ? void 0 : _q.targetSelector,\n load_event: toServerDuration((_r = view.initialViewMetrics.navigationTimings) === null || _r === void 0 ? void 0 : _r.loadEvent),\n loading_time: discardNegativeDuration(toServerDuration(view.commonViewMetrics.loadingTime)),\n loading_type: view.loadingType,\n long_task: {\n count: view.eventCounts.longTaskCount,\n },\n resource: {\n count: view.eventCounts.resourceCount,\n },\n time_spent: toServerDuration(view.duration),\n },\n feature_flags: featureFlagContext && !isEmptyObject(featureFlagContext) ? featureFlagContext : undefined,\n display: view.commonViewMetrics.scroll\n ? {\n scroll: {\n max_depth: view.commonViewMetrics.scroll.maxDepth,\n max_depth_scroll_top: view.commonViewMetrics.scroll.maxDepthScrollTop,\n max_scroll_height: view.commonViewMetrics.scroll.maxScrollHeight,\n max_scroll_height_time: toServerDuration(view.commonViewMetrics.scroll.maxScrollHeightTime),\n },\n }\n : undefined,\n session: {\n has_replay: replayStats ? true : undefined,\n is_active: view.sessionIsActive ? undefined : false,\n },\n privacy: {\n replay_level: configuration.defaultPrivacyLevel,\n },\n };\n if (!isEmptyObject(view.customTimings)) {\n viewEvent.view.custom_timings = mapValues(view.customTimings, toServerDuration);\n }\n return {\n rawRumEvent: viewEvent,\n startTime: view.startClocks.relative,\n domainContext: {\n location: view.location,\n },\n };\n}",
1853
+ "originalLength": 6188,
1854
+ "removedExports": [],
1855
+ "renderedExports": [
1856
+ "startViewCollection"
1857
+ ],
1858
+ "renderedLength": 5941
1859
+ },
1860
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/rumSessionManager.js": {
1861
+ "code": "const RUM_SESSION_KEY = 'rum';\nfunction startRumSessionManager(configuration, lifeCycle, trackingConsentState) {\n const sessionManager = startSessionManager(configuration, RUM_SESSION_KEY, (rawTrackingType) => computeSessionState(configuration, rawTrackingType), trackingConsentState);\n sessionManager.expireObservable.subscribe(() => {\n lifeCycle.notify(8 /* LifeCycleEventType.SESSION_EXPIRED */);\n });\n sessionManager.renewObservable.subscribe(() => {\n lifeCycle.notify(9 /* LifeCycleEventType.SESSION_RENEWED */);\n });\n sessionManager.sessionStateUpdateObservable.subscribe(({ previousState, newState }) => {\n if (!previousState.forcedReplay && newState.forcedReplay) {\n const sessionEntity = sessionManager.findSession();\n if (sessionEntity) {\n sessionEntity.isReplayForced = true;\n }\n }\n });\n return {\n findTrackedSession: (startTime) => {\n const session = sessionManager.findSession(startTime);\n if (!session || !isTypeTracked(session.trackingType)) {\n return;\n }\n return {\n id: session.id,\n sessionReplay: session.trackingType === \"1\" /* RumTrackingType.TRACKED_WITH_SESSION_REPLAY */\n ? 1 /* SessionReplayState.SAMPLED */\n : session.isReplayForced\n ? 2 /* SessionReplayState.FORCED */\n : 0 /* SessionReplayState.OFF */,\n anonymousId: session.anonymousId,\n };\n },\n expire: sessionManager.expire,\n expireObservable: sessionManager.expireObservable,\n setForcedReplay: () => sessionManager.updateSessionState({ forcedReplay: '1' }),\n };\n}\n/**\n * Start a tracked replay session stub\n */\nfunction startRumSessionManagerStub() {\n const session = {\n id: '00000000-aaaa-0000-aaaa-000000000000',\n sessionReplay: bridgeSupports(\"records\" /* BridgeCapability.RECORDS */) ? 1 /* SessionReplayState.SAMPLED */ : 0 /* SessionReplayState.OFF */,\n };\n return {\n findTrackedSession: () => session,\n expire: noop,\n expireObservable: new Observable(),\n setForcedReplay: noop,\n };\n}\nfunction computeSessionState(configuration, rawTrackingType) {\n let trackingType;\n if (hasValidRumSession(rawTrackingType)) {\n trackingType = rawTrackingType;\n }\n else if (!performDraw(configuration.sessionSampleRate)) {\n trackingType = \"0\" /* RumTrackingType.NOT_TRACKED */;\n }\n else if (!performDraw(configuration.sessionReplaySampleRate)) {\n trackingType = \"2\" /* RumTrackingType.TRACKED_WITHOUT_SESSION_REPLAY */;\n }\n else {\n trackingType = \"1\" /* RumTrackingType.TRACKED_WITH_SESSION_REPLAY */;\n }\n return {\n trackingType,\n isTracked: isTypeTracked(trackingType),\n };\n}\nfunction hasValidRumSession(trackingType) {\n return (trackingType === \"0\" /* RumTrackingType.NOT_TRACKED */ ||\n trackingType === \"1\" /* RumTrackingType.TRACKED_WITH_SESSION_REPLAY */ ||\n trackingType === \"2\" /* RumTrackingType.TRACKED_WITHOUT_SESSION_REPLAY */);\n}\nfunction isTypeTracked(rumSessionType) {\n return (rumSessionType === \"2\" /* RumTrackingType.TRACKED_WITHOUT_SESSION_REPLAY */ ||\n rumSessionType === \"1\" /* RumTrackingType.TRACKED_WITH_SESSION_REPLAY */);\n}",
1862
+ "originalLength": 3586,
1863
+ "removedExports": [],
1864
+ "renderedExports": [
1865
+ "RUM_SESSION_KEY",
1866
+ "startRumSessionManager",
1867
+ "startRumSessionManagerStub"
1868
+ ],
1869
+ "renderedLength": 3410
1870
+ },
1871
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/transport/startRumBatch.js": {
1872
+ "code": "function startRumBatch(configuration, lifeCycle, telemetryEventObservable, reportError, pageExitObservable, sessionExpireObservable, createEncoder) {\n const replica = configuration.replica;\n const batch = startBatchWithReplica(configuration, {\n endpoint: configuration.rumEndpointBuilder,\n encoder: createEncoder(2 /* DeflateEncoderStreamId.RUM */),\n }, replica && {\n endpoint: replica.rumEndpointBuilder,\n transformMessage: (message) => combine(message, { application: { id: replica.applicationId } }),\n encoder: createEncoder(3 /* DeflateEncoderStreamId.RUM_REPLICA */),\n }, reportError, pageExitObservable, sessionExpireObservable);\n lifeCycle.subscribe(12 /* LifeCycleEventType.RUM_EVENT_COLLECTED */, (serverRumEvent) => {\n if (serverRumEvent.type === \"view\" /* RumEventType.VIEW */) {\n batch.upsert(serverRumEvent, serverRumEvent.view.id);\n }\n else {\n batch.add(serverRumEvent);\n }\n });\n telemetryEventObservable.subscribe((event) => batch.add(event, isTelemetryReplicationAllowed(configuration)));\n return batch;\n}",
1873
+ "originalLength": 1283,
1874
+ "removedExports": [],
1875
+ "renderedExports": [
1876
+ "startRumBatch"
1877
+ ],
1878
+ "renderedLength": 1130
1879
+ },
1880
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/transport/startRumEventBridge.js": {
1881
+ "code": "function startRumEventBridge(lifeCycle) {\n const bridge = getEventBridge();\n lifeCycle.subscribe(12 /* LifeCycleEventType.RUM_EVENT_COLLECTED */, (serverRumEvent) => {\n bridge.send('rum', serverRumEvent);\n });\n}",
1882
+ "originalLength": 338,
1883
+ "removedExports": [],
1884
+ "renderedExports": [
1885
+ "startRumEventBridge"
1886
+ ],
1887
+ "renderedLength": 227
1888
+ },
1889
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/urlContexts.js": {
1890
+ "code": "/**\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 */\nconst URL_CONTEXT_TIME_OUT_DELAY = SESSION_TIME_OUT_DELAY;\nfunction startUrlContexts(lifeCycle, locationChangeObservable, location) {\n const urlContextHistory = createValueHistory({ expireDelay: URL_CONTEXT_TIME_OUT_DELAY });\n let previousViewUrl;\n lifeCycle.subscribe(1 /* LifeCycleEventType.BEFORE_VIEW_CREATED */, ({ startClocks }) => {\n const 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 */, ({ endClocks }) => {\n urlContextHistory.closeActive(endClocks.relative);\n });\n const locationChangeSubscription = locationChangeObservable.subscribe(({ newLocation }) => {\n const current = urlContextHistory.find();\n if (current) {\n const changeTime = relativeNow();\n urlContextHistory.closeActive(changeTime);\n urlContextHistory.add(buildUrlContext({\n url: newLocation.href,\n referrer: current.referrer,\n }), changeTime);\n }\n });\n function buildUrlContext({ url, referrer }) {\n return {\n url,\n referrer,\n };\n }\n return {\n findUrl: (startTime) => urlContextHistory.find(startTime),\n stop: () => {\n locationChangeSubscription.unsubscribe();\n urlContextHistory.stop();\n },\n };\n}",
1891
+ "originalLength": 1894,
1892
+ "removedExports": [],
1893
+ "renderedExports": [
1894
+ "URL_CONTEXT_TIME_OUT_DELAY",
1895
+ "startUrlContexts"
1896
+ ],
1897
+ "renderedLength": 1743
1898
+ },
1899
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/locationChangeObservable.js": {
1900
+ "code": "function createLocationChangeObservable(configuration, location) {\n let currentLocation = shallowClone(location);\n return new Observable((observable) => {\n const { stop: stopHistoryTracking } = trackHistory(configuration, onLocationChange);\n const { stop: stopHashTracking } = trackHash(configuration, onLocationChange);\n function onLocationChange() {\n if (currentLocation.href === location.href) {\n return;\n }\n const newLocation = shallowClone(location);\n observable.notify({\n newLocation,\n oldLocation: currentLocation,\n });\n currentLocation = newLocation;\n }\n return () => {\n stopHistoryTracking();\n stopHashTracking();\n };\n });\n}\nfunction trackHistory(configuration, onHistoryChange) {\n const { stop: stopInstrumentingPushState } = instrumentMethod(getHistoryInstrumentationTarget('pushState'), 'pushState', ({ onPostCall }) => {\n onPostCall(onHistoryChange);\n });\n const { stop: stopInstrumentingReplaceState } = instrumentMethod(getHistoryInstrumentationTarget('replaceState'), 'replaceState', ({ onPostCall }) => {\n onPostCall(onHistoryChange);\n });\n const { stop: removeListener } = addEventListener(configuration, window, \"popstate\" /* DOM_EVENT.POP_STATE */, onHistoryChange);\n return {\n stop: () => {\n stopInstrumentingPushState();\n stopInstrumentingReplaceState();\n removeListener();\n },\n };\n}\nfunction trackHash(configuration, onHashChange) {\n return 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}",
1901
+ "originalLength": 2393,
1902
+ "removedExports": [],
1903
+ "renderedExports": [
1904
+ "createLocationChangeObservable"
1905
+ ],
1906
+ "renderedLength": 2231
1907
+ },
1908
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/featureFlagContext.js": {
1909
+ "code": "const FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY = SESSION_TIME_OUT_DELAY;\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 const featureFlagContexts = createValueHistory({\n expireDelay: FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY,\n });\n lifeCycle.subscribe(1 /* LifeCycleEventType.BEFORE_VIEW_CREATED */, ({ startClocks }) => {\n featureFlagContexts.add({}, startClocks.relative);\n customerDataTracker.resetCustomerData();\n });\n lifeCycle.subscribe(5 /* LifeCycleEventType.AFTER_VIEW_ENDED */, ({ endClocks }) => {\n featureFlagContexts.closeActive(endClocks.relative);\n });\n return {\n findFeatureFlagEvaluations: (startTime) => featureFlagContexts.find(startTime),\n addFeatureFlagEvaluation: (key, value) => {\n const currentContext = featureFlagContexts.find();\n if (currentContext) {\n currentContext[key] = value;\n customerDataTracker.updateCustomerData(currentContext);\n }\n },\n stop: () => customerDataTracker.stop(),\n };\n}",
1910
+ "originalLength": 1529,
1911
+ "removedExports": [
1912
+ "BYTES_COMPUTATION_THROTTLING_DELAY"
1913
+ ],
1914
+ "renderedExports": [
1915
+ "FEATURE_FLAG_CONTEXT_TIME_OUT_DELAY",
1916
+ "startFeatureFlagContexts"
1917
+ ],
1918
+ "renderedLength": 1329
1919
+ },
1920
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/startCustomerDataTelemetry.js": {
1921
+ "code": "const MEASURES_PERIOD_DURATION = 10 * ONE_SECOND;\nlet currentPeriodMeasures;\nlet currentBatchMeasures;\nlet batchHasRumEvent;\nfunction startCustomerDataTelemetry(configuration, telemetry, lifeCycle, customerDataTrackerManager, batchFlushObservable) {\n const customerDataTelemetryEnabled = telemetry.enabled && performDraw(configuration.customerDataTelemetrySampleRate);\n if (!customerDataTelemetryEnabled) {\n return;\n }\n initCurrentPeriodMeasures();\n initCurrentBatchMeasures();\n // We measure the data of every view updates even if there could only be one per batch due to the upsert\n // It means that contexts bytes count sums can be higher than it really is\n lifeCycle.subscribe(12 /* LifeCycleEventType.RUM_EVENT_COLLECTED */, (event) => {\n batchHasRumEvent = true;\n updateMeasure(currentBatchMeasures.globalContextBytes, customerDataTrackerManager.getOrCreateTracker(2 /* CustomerDataType.GlobalContext */).getBytesCount());\n updateMeasure(currentBatchMeasures.userContextBytes, customerDataTrackerManager.getOrCreateTracker(1 /* CustomerDataType.User */).getBytesCount());\n updateMeasure(currentBatchMeasures.featureFlagBytes, [\"view\" /* RumEventType.VIEW */, \"error\" /* RumEventType.ERROR */].includes(event.type)\n ? customerDataTrackerManager.getOrCreateTracker(0 /* CustomerDataType.FeatureFlag */).getBytesCount()\n : 0);\n });\n batchFlushObservable.subscribe(({ bytesCount, messagesCount }) => {\n // Don't measure batch that only contains telemetry events to avoid batch sending loop\n // It could happen because after each batch we are adding a customer data measures telemetry event to the next one\n if (!batchHasRumEvent) {\n return;\n }\n currentPeriodMeasures.batchCount += 1;\n updateMeasure(currentPeriodMeasures.batchBytesCount, bytesCount);\n updateMeasure(currentPeriodMeasures.batchMessagesCount, messagesCount);\n mergeMeasure(currentPeriodMeasures.globalContextBytes, currentBatchMeasures.globalContextBytes);\n mergeMeasure(currentPeriodMeasures.userContextBytes, currentBatchMeasures.userContextBytes);\n mergeMeasure(currentPeriodMeasures.featureFlagBytes, currentBatchMeasures.featureFlagBytes);\n initCurrentBatchMeasures();\n });\n setInterval(sendCurrentPeriodMeasures, MEASURES_PERIOD_DURATION);\n}\nfunction sendCurrentPeriodMeasures() {\n if (currentPeriodMeasures.batchCount === 0) {\n return;\n }\n addTelemetryDebug('Customer data measures', currentPeriodMeasures);\n initCurrentPeriodMeasures();\n}\nfunction createMeasure() {\n return { min: Infinity, max: 0, sum: 0 };\n}\nfunction updateMeasure(measure, value) {\n measure.sum += value;\n measure.min = Math.min(measure.min, value);\n measure.max = Math.max(measure.max, value);\n}\nfunction mergeMeasure(target, source) {\n target.sum += source.sum;\n target.min = Math.min(target.min, source.min);\n target.max = Math.max(target.max, source.max);\n}\nfunction initCurrentPeriodMeasures() {\n currentPeriodMeasures = {\n batchCount: 0,\n batchBytesCount: createMeasure(),\n batchMessagesCount: createMeasure(),\n globalContextBytes: createMeasure(),\n userContextBytes: createMeasure(),\n featureFlagBytes: createMeasure(),\n };\n}\nfunction initCurrentBatchMeasures() {\n batchHasRumEvent = false;\n currentBatchMeasures = {\n globalContextBytes: createMeasure(),\n userContextBytes: createMeasure(),\n featureFlagBytes: createMeasure(),\n };\n}",
1922
+ "originalLength": 3749,
1923
+ "removedExports": [],
1924
+ "renderedExports": [
1925
+ "MEASURES_PERIOD_DURATION",
1926
+ "startCustomerDataTelemetry"
1927
+ ],
1928
+ "renderedLength": 3583
1929
+ },
1930
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/pageStateHistory.js": {
1931
+ "code": "// Arbitrary value to cap number of element for memory consumption in the browser\nconst MAX_PAGE_STATE_ENTRIES = 4000;\n// Arbitrary value to cap number of element for backend & to save bandwidth\nconst MAX_PAGE_STATE_ENTRIES_SELECTABLE = 500;\nconst PAGE_STATE_CONTEXT_TIME_OUT_DELAY = SESSION_TIME_OUT_DELAY;\nfunction startPageStateHistory(configuration, maxPageStateEntriesSelectable = MAX_PAGE_STATE_ENTRIES_SELECTABLE) {\n const pageStateEntryHistory = createValueHistory({\n expireDelay: PAGE_STATE_CONTEXT_TIME_OUT_DELAY,\n maxEntries: MAX_PAGE_STATE_ENTRIES,\n });\n let currentPageState;\n addPageState(getPageState(), relativeNow());\n const { stop: stopEventListeners } = 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 ], (event) => {\n addPageState(computePageState(event), event.timeStamp);\n }, { capture: true });\n function addPageState(nextPageState, startTime = relativeNow()) {\n if (nextPageState === currentPageState) {\n return;\n }\n currentPageState = nextPageState;\n pageStateEntryHistory.closeActive(startTime);\n pageStateEntryHistory.add({ state: currentPageState, startTime }, startTime);\n }\n const pageStateHistory = {\n findAll: (eventStartTime, duration) => {\n const pageStateEntries = pageStateEntryHistory.findAll(eventStartTime, duration);\n if (pageStateEntries.length === 0) {\n return;\n }\n const pageStateServerEntries = [];\n // limit the number of entries to return\n const limit = Math.max(0, pageStateEntries.length - maxPageStateEntriesSelectable);\n // loop page state entries backward to return the selected ones in desc order\n for (let index = pageStateEntries.length - 1; index >= limit; index--) {\n const pageState = pageStateEntries[index];\n // compute the start time relative to the event start time (ex: to be relative to the view start time)\n const relativeStartTime = elapsed(eventStartTime, pageState.startTime);\n pageStateServerEntries.push({\n state: pageState.state,\n start: toServerDuration(relativeStartTime),\n });\n }\n return pageStateServerEntries;\n },\n wasInPageStateAt: (state, startTime) => pageStateHistory.wasInPageStateDuringPeriod(state, startTime, 0),\n wasInPageStateDuringPeriod: (state, startTime, duration) => pageStateEntryHistory.findAll(startTime, duration).some((pageState) => pageState.state === state),\n addPageState,\n stop: () => {\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}",
1932
+ "originalLength": 3932,
1933
+ "removedExports": [],
1934
+ "renderedExports": [
1935
+ "MAX_PAGE_STATE_ENTRIES",
1936
+ "MAX_PAGE_STATE_ENTRIES_SELECTABLE",
1937
+ "PAGE_STATE_CONTEXT_TIME_OUT_DELAY",
1938
+ "startPageStateHistory"
1939
+ ],
1940
+ "renderedLength": 3715
1941
+ },
1942
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/displayContext.js": {
1943
+ "code": "function startDisplayContext(configuration) {\n let viewport;\n let animationFrameId;\n if (isExperimentalFeatureEnabled(ExperimentalFeature.DELAY_VIEWPORT_COLLECTION)) {\n // Use requestAnimationFrame to delay the calculation of viewport dimensions until after SDK initialization, preventing long tasks.\n animationFrameId = requestAnimationFrame(() => {\n viewport = getViewportDimension();\n });\n }\n else {\n viewport = getViewportDimension();\n }\n const unsubscribeViewport = initViewportObservable(configuration).subscribe((viewportDimension) => {\n viewport = viewportDimension;\n }).unsubscribe;\n return {\n get: () => (viewport ? { viewport } : undefined),\n stop: () => {\n unsubscribeViewport();\n if (animationFrameId) {\n cancelAnimationFrame(animationFrameId);\n }\n },\n };\n}",
1944
+ "originalLength": 1153,
1945
+ "removedExports": [],
1946
+ "renderedExports": [
1947
+ "startDisplayContext"
1948
+ ],
1949
+ "renderedLength": 915
1950
+ },
1951
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/browser/cookieObservable.js": {
1952
+ "code": "function createCookieObservable(configuration, cookieName) {\n const detectCookieChangeStrategy = window.cookieStore\n ? listenToCookieStoreChange(configuration)\n : watchCookieFallback;\n return new Observable((observable) => detectCookieChangeStrategy(cookieName, (event) => observable.notify(event)));\n}\nfunction listenToCookieStoreChange(configuration) {\n return (cookieName, callback) => {\n const listener = addEventListener(configuration, window.cookieStore, \"change\" /* DOM_EVENT.CHANGE */, (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 const changeEvent = event.changed.find((event) => event.name === cookieName) ||\n event.deleted.find((event) => event.name === cookieName);\n if (changeEvent) {\n callback(changeEvent.value);\n }\n });\n return listener.stop;\n };\n}\nconst WATCH_COOKIE_INTERVAL_DELAY = ONE_SECOND;\nfunction watchCookieFallback(cookieName, callback) {\n const previousCookieValue = findCommaSeparatedValue(document.cookie, cookieName);\n const watchCookieIntervalId = setInterval(() => {\n const cookieValue = findCommaSeparatedValue(document.cookie, cookieName);\n if (cookieValue !== previousCookieValue) {\n callback(cookieValue);\n }\n }, WATCH_COOKIE_INTERVAL_DELAY);\n return () => {\n clearInterval(watchCookieIntervalId);\n };\n}",
1953
+ "originalLength": 1854,
1954
+ "removedExports": [],
1955
+ "renderedExports": [
1956
+ "createCookieObservable",
1957
+ "WATCH_COOKIE_INTERVAL_DELAY"
1958
+ ],
1959
+ "renderedLength": 1659
1960
+ },
1961
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/contexts/ciVisibilityContext.js": {
1962
+ "code": "const CI_VISIBILITY_TEST_ID_COOKIE_NAME = 'datadog-ci-visibility-test-execution-id';\nfunction startCiVisibilityContext(configuration, cookieObservable = createCookieObservable(configuration, CI_VISIBILITY_TEST_ID_COOKIE_NAME)) {\n var _a;\n let testExecutionId = getInitCookie(CI_VISIBILITY_TEST_ID_COOKIE_NAME) || ((_a = window.Cypress) === null || _a === void 0 ? void 0 : _a.env('traceId'));\n const cookieObservableSubscription = cookieObservable.subscribe((value) => {\n testExecutionId = value;\n });\n return {\n get: () => {\n if (typeof testExecutionId === 'string') {\n return {\n test_execution_id: testExecutionId,\n };\n }\n },\n stop: () => cookieObservableSubscription.unsubscribe(),\n };\n}",
1963
+ "originalLength": 997,
1964
+ "removedExports": [],
1965
+ "renderedExports": [
1966
+ "CI_VISIBILITY_TEST_ID_COOKIE_NAME",
1967
+ "startCiVisibilityContext"
1968
+ ],
1969
+ "renderedLength": 807
1970
+ },
1971
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/longAnimationFrame/longAnimationFrameCollection.js": {
1972
+ "code": "function startLongAnimationFrameCollection(lifeCycle, configuration) {\n const performanceResourceSubscription = createPerformanceObservable(configuration, {\n type: RumPerformanceEntryType.LONG_ANIMATION_FRAME,\n buffered: true,\n }).subscribe((entries) => {\n for (const entry of entries) {\n const startClocks = relativeToClocks(entry.startTime);\n const rawRumEvent = {\n date: startClocks.timeStamp,\n long_task: {\n id: generateUUID(),\n entry_type: \"long-animation-frame\" /* RumLongTaskEntryType.LONG_ANIMATION_FRAME */,\n duration: toServerDuration(entry.duration),\n blocking_duration: toServerDuration(entry.blockingDuration),\n first_ui_event_timestamp: toServerDuration(entry.firstUIEventTimestamp),\n render_start: toServerDuration(entry.renderStart),\n style_and_layout_start: toServerDuration(entry.styleAndLayoutStart),\n start_time: toServerDuration(entry.startTime),\n scripts: entry.scripts.map((script) => ({\n duration: toServerDuration(script.duration),\n pause_duration: toServerDuration(script.pauseDuration),\n forced_style_and_layout_duration: toServerDuration(script.forcedStyleAndLayoutDuration),\n start_time: toServerDuration(script.startTime),\n execution_start: 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,\n startTime: startClocks.relative,\n domainContext: { performanceEntry: entry },\n });\n }\n });\n return {\n stop: () => performanceResourceSubscription.unsubscribe(),\n };\n}",
1973
+ "originalLength": 2763,
1974
+ "removedExports": [],
1975
+ "renderedExports": [
1976
+ "startLongAnimationFrameCollection"
1977
+ ],
1978
+ "renderedLength": 2501
1979
+ },
1980
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/longTask/longTaskCollection.js": {
1981
+ "code": "function startLongTaskCollection(lifeCycle, configuration) {\n const performanceLongTaskSubscription = createPerformanceObservable(configuration, {\n type: RumPerformanceEntryType.LONG_TASK,\n buffered: true,\n }).subscribe((entries) => {\n for (const entry of entries) {\n if (entry.entryType !== RumPerformanceEntryType.LONG_TASK) {\n break;\n }\n if (!configuration.trackLongTasks) {\n break;\n }\n const startClocks = relativeToClocks(entry.startTime);\n const rawRumEvent = {\n date: startClocks.timeStamp,\n long_task: {\n id: generateUUID(),\n entry_type: \"long-task\" /* RumLongTaskEntryType.LONG_TASK */,\n duration: 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,\n startTime: startClocks.relative,\n domainContext: { performanceEntry: entry },\n });\n }\n });\n return {\n stop() {\n performanceLongTaskSubscription.unsubscribe();\n },\n };\n}",
1982
+ "originalLength": 1645,
1983
+ "removedExports": [],
1984
+ "renderedExports": [
1985
+ "startLongTaskCollection"
1986
+ ],
1987
+ "renderedLength": 1393
1988
+ },
1989
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/boot/startRum.js": {
1990
+ "code": "function 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 _a;\n const cleanupTasks = [];\n const lifeCycle = new LifeCycle();\n lifeCycle.subscribe(12 /* LifeCycleEventType.RUM_EVENT_COLLECTED */, (event) => sendToExtension('rum', event));\n const telemetry = startRumTelemetry(configuration);\n telemetry.setContextProvider(() => {\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 const reportError = (error) => {\n lifeCycle.notify(13 /* LifeCycleEventType.RAW_ERROR_COLLECTED */, { error });\n addTelemetryDebug('Error reported to customer', { 'error.message': error.message });\n };\n const featureFlagContexts = startFeatureFlagContexts(lifeCycle, customerDataTrackerManager.getOrCreateTracker(0 /* CustomerDataType.FeatureFlag */));\n const pageExitObservable = createPageExitObservable(configuration);\n const pageExitSubscription = pageExitObservable.subscribe((event) => {\n lifeCycle.notify(10 /* LifeCycleEventType.PAGE_EXITED */, event);\n });\n cleanupTasks.push(() => pageExitSubscription.unsubscribe());\n const session = !canUseEventBridge()\n ? startRumSessionManager(configuration, lifeCycle, trackingConsentState)\n : startRumSessionManagerStub();\n if (!canUseEventBridge()) {\n const batch = startRumBatch(configuration, lifeCycle, telemetry.observable, reportError, pageExitObservable, session.expireObservable, createEncoder);\n cleanupTasks.push(() => batch.stop());\n startCustomerDataTelemetry(configuration, telemetry, lifeCycle, customerDataTrackerManager, batch.flushObservable);\n }\n else {\n startRumEventBridge(lifeCycle);\n }\n const domMutationObservable = createDOMMutationObservable();\n const locationChangeObservable = createLocationChangeObservable(configuration, location);\n const pageStateHistory = startPageStateHistory(configuration);\n const { observable: windowOpenObservable, stop: stopWindowOpen } = createWindowOpenObservable();\n cleanupTasks.push(stopWindowOpen);\n const { viewHistory, urlContexts, actionContexts, addAction, stop: stopRumEventCollection, } = startRumEventCollection(lifeCycle, configuration, location, session, pageStateHistory, locationChangeObservable, domMutationObservable, windowOpenObservable, getCommonContext, reportError);\n cleanupTasks.push(stopRumEventCollection);\n drainPreStartTelemetry();\n const { addTiming, startView, setViewName, setViewContext, setViewContextProperty, stop: stopViewCollection, } = startViewCollection(lifeCycle, configuration, location, domMutationObservable, windowOpenObservable, locationChangeObservable, featureFlagContexts, pageStateHistory, recorderApi, initialViewOptions);\n cleanupTasks.push(stopViewCollection);\n const { stop: stopResourceCollection } = startResourceCollection(lifeCycle, configuration, pageStateHistory);\n cleanupTasks.push(stopResourceCollection);\n if (configuration.trackLongTasks) {\n if ((_a = PerformanceObserver.supportedEntryTypes) === null || _a === void 0 ? void 0 : _a.includes(RumPerformanceEntryType.LONG_ANIMATION_FRAME)) {\n const { stop: stopLongAnimationFrameCollection } = startLongAnimationFrameCollection(lifeCycle, configuration);\n cleanupTasks.push(stopLongAnimationFrameCollection);\n }\n else {\n startLongTaskCollection(lifeCycle, configuration);\n }\n }\n const { addError } = startErrorCollection(lifeCycle, configuration, pageStateHistory, featureFlagContexts);\n startRequestCollection(lifeCycle, configuration, session);\n const vitalCollection = startVitalCollection(lifeCycle, pageStateHistory, customVitalsState);\n const internalContext = startInternalContext(configuration.applicationId, session, viewHistory, actionContexts, urlContexts);\n return {\n addAction,\n addError,\n addTiming,\n addFeatureFlagEvaluation: featureFlagContexts.addFeatureFlagEvaluation,\n startView,\n setViewContext,\n setViewContextProperty,\n setViewName,\n lifeCycle,\n viewHistory,\n session,\n stopSession: () => session.expire(),\n getInternalContext: internalContext.get,\n startDurationVital: vitalCollection.startDurationVital,\n stopDurationVital: vitalCollection.stopDurationVital,\n addDurationVital: vitalCollection.addDurationVital,\n stop: () => {\n cleanupTasks.forEach((task) => task());\n },\n };\n}\nfunction startRumTelemetry(configuration) {\n const telemetry = startTelemetry(\"browser-rum-sdk\" /* TelemetryService.RUM */, configuration);\n if (canUseEventBridge()) {\n const bridge = getEventBridge();\n telemetry.observable.subscribe((event) => bridge.send('internal_telemetry', event));\n }\n return telemetry;\n}\nfunction startRumEventCollection(lifeCycle, configuration, location, sessionManager, pageStateHistory, locationChangeObservable, domMutationObservable, windowOpenObservable, getCommonContext, reportError) {\n const viewHistory = startViewHistory(lifeCycle);\n const urlContexts = startUrlContexts(lifeCycle, locationChangeObservable, location);\n const actionCollection = startActionCollection(lifeCycle, domMutationObservable, windowOpenObservable, configuration, pageStateHistory);\n const displayContext = startDisplayContext(configuration);\n const ciVisibilityContext = startCiVisibilityContext(configuration);\n startRumAssembly(configuration, lifeCycle, sessionManager, viewHistory, urlContexts, actionCollection.actionContexts, displayContext, ciVisibilityContext, getCommonContext, reportError);\n return {\n viewHistory,\n pageStateHistory,\n urlContexts,\n addAction: actionCollection.addAction,\n actionContexts: actionCollection.actionContexts,\n stop: () => {\n actionCollection.stop();\n ciVisibilityContext.stop();\n displayContext.stop();\n urlContexts.stop();\n viewHistory.stop();\n pageStateHistory.stop();\n },\n };\n}",
1991
+ "originalLength": 8979,
1992
+ "removedExports": [],
1993
+ "renderedExports": [
1994
+ "startRum",
1995
+ "startRumEventCollection"
1996
+ ],
1997
+ "renderedLength": 6858
1998
+ },
1999
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/domain/getSessionReplayUrl.js": {
2000
+ "code": "function getSessionReplayUrl(configuration, { session, viewContext, errorType, }) {\n const sessionId = session ? session.id : 'no-session-id';\n const parameters = [];\n if (errorType !== undefined) {\n parameters.push(`error-type=${errorType}`);\n }\n if (viewContext) {\n parameters.push(`seed=${viewContext.id}`);\n parameters.push(`from=${viewContext.startClocks.timeStamp}`);\n }\n const origin = getDatadogSiteUrl(configuration);\n const path = `/rum/replay/sessions/${sessionId}`;\n return `${origin}${path}?${parameters.join('&')}`;\n}\nfunction getDatadogSiteUrl(rumConfiguration) {\n const site = rumConfiguration.site;\n const subdomain = rumConfiguration.subdomain || getSiteDefaultSubdomain(rumConfiguration);\n return `https://${subdomain ? `${subdomain}.` : ''}${site}`;\n}\nfunction getSiteDefaultSubdomain(configuration) {\n switch (configuration.site) {\n case INTAKE_SITE_US1:\n case INTAKE_SITE_EU1:\n return 'app';\n case INTAKE_SITE_STAGING:\n return 'dd';\n default:\n return undefined;\n }\n}",
2001
+ "originalLength": 1269,
2002
+ "removedExports": [],
2003
+ "renderedExports": [
2004
+ "getSessionReplayUrl",
2005
+ "getDatadogSiteUrl"
2006
+ ],
2007
+ "renderedLength": 1112
2008
+ },
2009
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum-core/esm/index.js": {
2010
+ "code": null,
2011
+ "originalLength": 910,
2012
+ "removedExports": [],
2013
+ "renderedExports": [],
2014
+ "renderedLength": 0
2015
+ },
2016
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/replayStats.js": {
2017
+ "code": "const MAX_STATS_HISTORY = 10;\nlet statsPerView;\nfunction getSegmentsCount(viewId) {\n return getOrCreateReplayStats(viewId).segments_count;\n}\nfunction addSegment(viewId) {\n getOrCreateReplayStats(viewId).segments_count += 1;\n}\nfunction addRecord(viewId) {\n getOrCreateReplayStats(viewId).records_count += 1;\n}\nfunction addWroteData(viewId, additionalBytesCount) {\n getOrCreateReplayStats(viewId).segments_total_raw_size += additionalBytesCount;\n}\nfunction getReplayStats(viewId) {\n return statsPerView === null || statsPerView === void 0 ? void 0 : statsPerView.get(viewId);\n}\nfunction getOrCreateReplayStats(viewId) {\n if (!statsPerView) {\n statsPerView = new Map();\n }\n let replayStats;\n if (statsPerView.has(viewId)) {\n replayStats = statsPerView.get(viewId);\n }\n else {\n replayStats = {\n records_count: 0,\n segments_count: 0,\n segments_total_raw_size: 0,\n };\n statsPerView.set(viewId, replayStats);\n if (statsPerView.size > MAX_STATS_HISTORY) {\n deleteOldestStats();\n }\n }\n return replayStats;\n}\nfunction deleteOldestStats() {\n if (!statsPerView) {\n return;\n }\n const toDelete = statsPerView.keys().next().value;\n if (toDelete) {\n statsPerView.delete(toDelete);\n }\n}",
2018
+ "originalLength": 1481,
2019
+ "removedExports": [
2020
+ "resetReplayStats"
2021
+ ],
2022
+ "renderedExports": [
2023
+ "MAX_STATS_HISTORY",
2024
+ "getSegmentsCount",
2025
+ "addSegment",
2026
+ "addRecord",
2027
+ "addWroteData",
2028
+ "getReplayStats"
2029
+ ],
2030
+ "renderedLength": 1330
2031
+ },
2032
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/deflate/deflateEncoder.js": {
2033
+ "code": "function createDeflateEncoder(configuration, worker, streamId) {\n let rawBytesCount = 0;\n let compressedData = [];\n let compressedDataTrailer;\n let nextWriteActionId = 0;\n const pendingWriteActions = [];\n const { stop: removeMessageListener } = addEventListener(configuration, worker, 'message', ({ data: workerResponse }) => {\n if (workerResponse.type !== 'wrote' || workerResponse.streamId !== streamId) {\n return;\n }\n rawBytesCount += workerResponse.additionalBytesCount;\n compressedData.push(workerResponse.result);\n compressedDataTrailer = workerResponse.trailer;\n const nextPendingAction = pendingWriteActions.shift();\n if (nextPendingAction && nextPendingAction.id === workerResponse.id) {\n if (nextPendingAction.writeCallback) {\n nextPendingAction.writeCallback(workerResponse.result.byteLength);\n }\n else if (nextPendingAction.finishCallback) {\n nextPendingAction.finishCallback();\n }\n }\n else {\n removeMessageListener();\n addTelemetryDebug('Worker responses received out of order.');\n }\n });\n function consumeResult() {\n const output = compressedData.length === 0 ? new Uint8Array(0) : concatBuffers(compressedData.concat(compressedDataTrailer));\n const result = {\n rawBytesCount,\n output,\n outputBytesCount: output.byteLength,\n encoding: 'deflate',\n };\n rawBytesCount = 0;\n compressedData = [];\n return result;\n }\n function sendResetIfNeeded() {\n if (nextWriteActionId > 0) {\n worker.postMessage({\n action: 'reset',\n streamId,\n });\n nextWriteActionId = 0;\n }\n }\n return {\n isAsync: true,\n get isEmpty() {\n return nextWriteActionId === 0;\n },\n write(data, callback) {\n worker.postMessage({\n action: 'write',\n id: nextWriteActionId,\n data,\n streamId,\n });\n pendingWriteActions.push({\n id: nextWriteActionId,\n writeCallback: callback,\n data,\n });\n nextWriteActionId += 1;\n },\n finish(callback) {\n sendResetIfNeeded();\n if (!pendingWriteActions.length) {\n callback(consumeResult());\n }\n else {\n // Make sure we do not call any write callback\n pendingWriteActions.forEach((pendingWriteAction) => {\n delete pendingWriteAction.writeCallback;\n });\n // Wait for the last action to finish before calling the finish callback\n pendingWriteActions[pendingWriteActions.length - 1].finishCallback = () => callback(consumeResult());\n }\n },\n finishSync() {\n sendResetIfNeeded();\n const pendingData = pendingWriteActions\n .map((pendingWriteAction) => {\n // Make sure we do not call any write or finish callback\n delete pendingWriteAction.writeCallback;\n delete pendingWriteAction.finishCallback;\n return pendingWriteAction.data;\n })\n .join('');\n return { ...consumeResult(), pendingData };\n },\n estimateEncodedBytesCount(data) {\n // This is a rough estimation of the data size once it'll be encoded by deflate. We observed\n // that if it's the first chunk of data pushed to the stream, the ratio is lower (3-4), but\n // after that the ratio is greater (10+). We chose 8 here, which (on average) seems to produce\n // requests of the expected size.\n return data.length / 8;\n },\n stop() {\n removeMessageListener();\n },\n };\n}",
2034
+ "originalLength": 4161,
2035
+ "removedExports": [],
2036
+ "renderedExports": [
2037
+ "createDeflateEncoder"
2038
+ ],
2039
+ "renderedLength": 4019
2040
+ },
2041
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/deflate/deflateWorker.js": {
2042
+ "code": "const INITIALIZATION_TIME_OUT_DELAY = 30 * ONE_SECOND;\nfunction createDeflateWorker(configuration) {\n return new Worker(configuration.workerUrl || URL.createObjectURL(new Blob([\"(()=>{\\\"use strict\\\";function t(t){const e=t.reduce(((t,e)=>t+e.length),0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=256,n=286,r=30,i=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),h=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),_=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=new Array(576);e(o);var d=new Array(60);e(d);var u=new Array(512);e(u);var f=new Array(256);e(f);var c=new Array(29);e(c);var p,g,w,v=new Array(r);function b(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function m(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(v);var y=function(t){return t<256?u[t]:u[256+(t>>>7)]},k=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},z=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,k(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},x=function(t,e,a){z(t,a[2*e],a[2*e+1])},A=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},U=function(t,e,a){var n,r,s=new Array(16),h=0;for(n=1;n<=i;n++)s[n]=h=h+a[n-1]<<1;for(r=0;r<=e;r++){var l=t[2*r+1];0!==l&&(t[2*r]=A(s[l]++,l))}},I=function(t){var e;for(e=0;e<n;e++)t.dyn_ltree[2*e]=0;for(e=0;e<r;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},B=function(t){t.bi_valid>8?k(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},E=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},S=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&E(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!E(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},C=function(t,e,n){var r,i,l,_,o=0;if(0!==t.last_lit)do{r=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],i=t.pending_buf[t.l_buf+o],o++,0===r?x(t,i,e):(l=f[i],x(t,l+a+1,e),0!==(_=s[l])&&(i-=c[l],z(t,i,_)),r--,l=y(r),x(t,l,n),0!==(_=h[l])&&(r-=v[l],z(t,r,_)))}while(o<t.last_lit);x(t,256,e)},D=function(t,e){var a,n,r,s=e.dyn_tree,h=e.stat_desc.static_tree,l=e.stat_desc.has_stree,_=e.stat_desc.elems,o=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<_;a++)0!==s[2*a]?(t.heap[++t.heap_len]=o=a,t.depth[a]=0):s[2*a+1]=0;for(;t.heap_len<2;)s[2*(r=t.heap[++t.heap_len]=o<2?++o:0)]=1,t.depth[r]=0,t.opt_len--,l&&(t.static_len-=h[2*r+1]);for(e.max_code=o,a=t.heap_len>>1;a>=1;a--)S(t,s,a);r=_;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],S(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,s[2*r]=s[2*a]+s[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,s[2*a+1]=s[2*n+1]=r,t.heap[1]=r++,S(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,s,h,l,_=e.dyn_tree,o=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(s=0;s<=i;s++)t.bl_count[s]=0;for(_[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=_[2*_[2*(n=t.heap[a])+1]+1]+1)>p&&(s=p,g++),_[2*n+1]=s,n>o||(t.bl_count[s]++,h=0,n>=c&&(h=f[n-c]),l=_[2*n],t.opt_len+=l*(s+h),u&&(t.static_len+=l*(d[2*n+1]+h)));if(0!==g){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(s=p;0!==s;s--)for(n=t.bl_count[s];0!==n;)(r=t.heap[--a])>o||(_[2*r+1]!==s&&(t.opt_len+=(s-_[2*r+1])*_[2*r],_[2*r+1]=s),n--)}}(t,e),U(s,o,t.bl_count)},j=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},M=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{x(t,r,t.bl_tree)}while(0!=--h);else 0!==r?(r!==i&&(x(t,r,t.bl_tree),h--),x(t,16,t.bl_tree),z(t,h-3,2)):h<=10?(x(t,17,t.bl_tree),z(t,h-3,3)):(x(t,18,t.bl_tree),z(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},L=!1,T=function(t,e,a,n){z(t,0+(n?1:0),3),function(t,e,a,n){B(t),n&&(k(t,a),k(t,~a)),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a,!0)},H=function(t,e,n,r){var i,s,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),D(t,t.l_desc),D(t,t.d_desc),h=function(t){var e;for(j(t,t.dyn_ltree,t.l_desc.max_code),j(t,t.dyn_dtree,t.d_desc.max_code),D(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*_[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==e?T(t,e,n,r):4===t.strategy||s===i?(z(t,2+(r?1:0),3),C(t,o,d)):(z(t,4+(r?1:0),3),function(t,e,a,n){var r;for(z(t,e-257,5),z(t,a-1,5),z(t,n-4,4),r=0;r<n;r++)z(t,t.bl_tree[2*_[r]+1],3);M(t,t.dyn_ltree,e-1),M(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),C(t,t.dyn_ltree,t.dyn_dtree)),I(t),r&&B(t)},R={_tr_init:function(t){L||(!function(){var t,e,a,_,m,y=new Array(16);for(a=0,_=0;_<28;_++)for(c[_]=a,t=0;t<1<<s[_];t++)f[a++]=_;for(f[a-1]=_,m=0,_=0;_<16;_++)for(v[_]=m,t=0;t<1<<h[_];t++)u[m++]=_;for(m>>=7;_<r;_++)for(v[_]=m<<7,t=0;t<1<<h[_]-7;t++)u[256+m++]=_;for(e=0;e<=i;e++)y[e]=0;for(t=0;t<=143;)o[2*t+1]=8,t++,y[8]++;for(;t<=255;)o[2*t+1]=9,t++,y[9]++;for(;t<=279;)o[2*t+1]=7,t++,y[7]++;for(;t<=287;)o[2*t+1]=8,t++,y[8]++;for(U(o,287,y),t=0;t<r;t++)d[2*t+1]=5,d[2*t]=A(t,5);p=new b(o,s,257,n,i),g=new b(d,h,0,r,i),w=new b(new Array(0),l,0,19,7)}(),L=!0),t.l_desc=new m(t.dyn_ltree,p),t.d_desc=new m(t.dyn_dtree,g),t.bl_desc=new m(t.bl_tree,w),t.bi_buf=0,t.bi_valid=0,I(t)},_tr_stored_block:T,_tr_flush_block:H,_tr_tally:function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(f[n]+a+1)]++,t.dyn_dtree[2*y(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){z(t,2,3),x(t,256,o),function(t){16===t.bi_valid?(k(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},K=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},N=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),O=function(t,e,a,n){var r=N,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return~t},q={2:\\\"need dictionary\\\",1:\\\"stream end\\\",0:\\\"\\\",\\\"-1\\\":\\\"file error\\\",\\\"-2\\\":\\\"stream error\\\",\\\"-3\\\":\\\"data error\\\",\\\"-4\\\":\\\"insufficient memory\\\",\\\"-5\\\":\\\"buffer error\\\",\\\"-6\\\":\\\"incompatible version\\\"},F=0,G=2,J=3,P=4,Q=0,V=1,W=-1,X=0,Y=8,Z=R._tr_init,$=R._tr_stored_block,tt=R._tr_flush_block,et=R._tr_tally,at=R._tr_align,nt=F,rt=1,it=J,st=P,ht=5,lt=Q,_t=V,ot=-2,dt=-3,ut=-5,ft=W,ct=1,pt=2,gt=3,wt=4,vt=X,bt=2,mt=Y,yt=258,kt=262,zt=103,xt=113,At=666,Ut=function(t,e){return t.msg=q[e],e},It=function(t){return(t<<1)-(t>4?9:0)},Bt=function(t){for(var e=t.length;--e>=0;)t[e]=0},Et=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},St=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Ct=function(t,e){tt(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,St(t.strm)},Dt=function(t,e){t.pending_buf[t.pending++]=e},jt=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Mt=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-kt?t.strstart-(t.w_size-kt):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+yt,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=yt-(u-i),i=u-yt,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!=--r);return s<=t.lookahead?s:t.lookahead},Lt=function(t){var e,a,n,r,i,s,h,l,_,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-kt)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,h=t.window,l=t.strstart+t.lookahead,_=r,o=void 0,(o=s.avail_in)>_&&(o=_),a=0===o?0:(s.avail_in-=o,h.set(s.input.subarray(s.next_in,s.next_in+o),l),1===s.state.wrap?s.adler=K(s.adler,h,o,l):2===s.state.wrap&&(s.adler=O(s.adler,h,o,l)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=Et(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=Et(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<kt&&0!==t.strm.avail_in)},Tt=function(t,e){for(var a,n;;){if(t.lookahead<kt){if(Lt(t),t.lookahead<kt&&e===nt)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=Et(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-kt&&(t.match_length=Mt(t,a)),t.match_length>=3)if(n=et(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=Et(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Et(t,t.ins_h,t.window[t.strstart+1]);else n=et(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Ct(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===st?(Ct(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ct(t,!1),0===t.strm.avail_out)?1:2},Ht=function(t,e){for(var a,n,r;;){if(t.lookahead<kt){if(Lt(t),t.lookahead<kt&&e===nt)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=Et(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-kt&&(t.match_length=Mt(t,a),t.match_length<=5&&(t.strategy===ct||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=et(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=Et(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Ct(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=et(t,0,t.window[t.strstart-1]))&&Ct(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=et(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===st?(Ct(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ct(t,!1),0===t.strm.avail_out)?1:2};function Rt(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var Kt=[new Rt(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Lt(t),0===t.lookahead&&e===nt)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Ct(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-kt&&(Ct(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Ct(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Ct(t,!1),t.strm.avail_out),1)})),new Rt(4,4,8,4,Tt),new Rt(4,5,16,8,Tt),new Rt(4,6,32,32,Tt),new Rt(4,4,16,16,Ht),new Rt(8,16,32,32,Ht),new Rt(8,16,128,128,Ht),new Rt(8,32,128,256,Ht),new Rt(32,128,258,1024,Ht),new Rt(32,258,258,4096,Ht)];function Nt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=mt,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Bt(this.dyn_ltree),Bt(this.dyn_dtree),Bt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Bt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Bt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Ot=function(t){if(!t||!t.state)return Ut(t,ot);t.total_in=t.total_out=0,t.data_type=bt;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:xt,t.adler=2===e.wrap?0:1,e.last_flush=nt,Z(e),lt},qt=function(t){var e,a=Ot(t);return a===lt&&((e=t.state).window_size=2*e.w_size,Bt(e.head),e.max_lazy_match=Kt[e.level].max_lazy,e.good_match=Kt[e.level].good_length,e.nice_match=Kt[e.level].nice_length,e.max_chain_length=Kt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Ft=function(t,e,a,n,r,i){if(!t)return ot;var s=1;if(e===ft&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||a!==mt||n<8||n>15||e<0||e>9||i<0||i>wt)return Ut(t,ot);8===n&&(n=9);var h=new Nt;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,qt(t)},Gt={deflateInit:function(t,e){return Ft(t,e,mt,15,8,vt)},deflateInit2:Ft,deflateReset:qt,deflateResetKeep:Ot,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?ot:(t.state.gzhead=e,lt):ot},deflate:function(t,e){var a,n;if(!t||!t.state||e>ht||e<0)return t?Ut(t,ot):ot;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===At&&e!==st)return Ut(t,0===t.avail_out?ut:ot);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Dt(r,31),Dt(r,139),Dt(r,8),r.gzhead?(Dt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Dt(r,255&r.gzhead.time),Dt(r,r.gzhead.time>>8&255),Dt(r,r.gzhead.time>>16&255),Dt(r,r.gzhead.time>>24&255),Dt(r,9===r.level?2:r.strategy>=pt||r.level<2?4:0),Dt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Dt(r,255&r.gzhead.extra.length),Dt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=O(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Dt(r,0),Dt(r,0),Dt(r,0),Dt(r,0),Dt(r,0),Dt(r,9===r.level?2:r.strategy>=pt||r.level<2?4:0),Dt(r,3),r.status=xt);else{var s=mt+(r.w_bits-8<<4)<<8;s|=(r.strategy>=pt||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(s|=32),s+=31-s%31,r.status=xt,jt(r,s),0!==r.strstart&&(jt(r,t.adler>>>16),jt(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),St(t),a=r.pending,r.pending!==r.pending_buf_size));)Dt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),St(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Dt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),St(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Dt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=zt)}else r.status=zt;if(r.status===zt&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&St(t),r.pending+2<=r.pending_buf_size&&(Dt(r,255&t.adler),Dt(r,t.adler>>8&255),t.adler=0,r.status=xt)):r.status=xt),0!==r.pending){if(St(t),0===t.avail_out)return r.last_flush=-1,lt}else if(0===t.avail_in&&It(e)<=It(i)&&e!==st)return Ut(t,ut);if(r.status===At&&0!==t.avail_in)return Ut(t,ut);if(0!==t.avail_in||0!==r.lookahead||e!==nt&&r.status!==At){var h=r.strategy===pt?function(t,e){for(var a;;){if(0===t.lookahead&&(Lt(t),0===t.lookahead)){if(e===nt)return 1;break}if(t.match_length=0,a=et(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Ct(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Ct(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ct(t,!1),0===t.strm.avail_out)?1:2}(r,e):r.strategy===gt?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=yt){if(Lt(t),t.lookahead<=yt&&e===nt)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+yt;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=yt-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=et(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=et(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Ct(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Ct(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ct(t,!1),0===t.strm.avail_out)?1:2}(r,e):Kt[r.level].func(r,e);if(3!==h&&4!==h||(r.status=At),1===h||3===h)return 0===t.avail_out&&(r.last_flush=-1),lt;if(2===h&&(e===rt?at(r):e!==ht&&($(r,0,0,!1),e===it&&(Bt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),St(t),0===t.avail_out))return r.last_flush=-1,lt}return e!==st?lt:r.wrap<=0?_t:(2===r.wrap?(Dt(r,255&t.adler),Dt(r,t.adler>>8&255),Dt(r,t.adler>>16&255),Dt(r,t.adler>>24&255),Dt(r,255&t.total_in),Dt(r,t.total_in>>8&255),Dt(r,t.total_in>>16&255),Dt(r,t.total_in>>24&255)):(jt(r,t.adler>>>16),jt(r,65535&t.adler)),St(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?lt:_t)},deflateEnd:function(t){if(!t||!t.state)return ot;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==zt&&e!==xt&&e!==At?Ut(t,ot):(t.state=null,e===xt?Ut(t,dt):lt)},deflateSetDictionary:function(t,e){var a=e.length;if(!t||!t.state)return ot;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return ot;if(1===r&&(t.adler=K(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(Bt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Lt(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=Et(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,Lt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,lt},deflateInfo:\\\"pako deflate (from Nodeca project)\\\"};for(var Jt=new Uint8Array(256),Pt=0;Pt<256;Pt++)Jt[Pt]=Pt>=252?6:Pt>=248?5:Pt>=240?4:Pt>=224?3:Pt>=192?2:1;Jt[254]=Jt[254]=1;var Qt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\\\"\\\",this.state=null,this.data_type=2,this.adler=0},Vt=Object.prototype.toString,Wt=F,Xt=G,Yt=J,Zt=P,$t=Q,te=V,ee=W,ae=X,ne=Y;function re(){this.options={level:ee,method:ne,chunkSize:16384,windowBits:15,memLevel:8,strategy:ae};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=\\\"\\\",this.ended=!1,this.chunks=[],this.strm=new Qt,this.strm.avail_out=0;var e=Gt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==$t)throw new Error(q[e]);if(t.header&&Gt.deflateSetHeader(this.strm,t.header),t.dictionary){var a;if(a=\\\"[object ArrayBuffer]\\\"===Vt.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(e=Gt.deflateSetDictionary(this.strm,a))!==$t)throw new Error(q[e]);this._dict_set=!0}}function ie(t,e,a){try{t.postMessage({type:\\\"errored\\\",error:e,streamId:a})}catch(n){t.postMessage({type:\\\"errored\\\",error:String(e),streamId:a})}}function se(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}re.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?Zt:Wt,\\\"[object ArrayBuffer]\\\"===Vt.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===Xt||n===Yt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((a=Gt.deflate(r,n))===te)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=Gt.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===$t;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},re.prototype.onData=function(t){this.chunks.push(t)},re.prototype.onEnd=function(t){t===$t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener(\\\"message\\\",(n=>{try{const r=function(e,a){switch(a.action){case\\\"init\\\":return{type:\\\"initialized\\\",version:\\\"6.0.0\\\"};case\\\"write\\\":{let n=e.get(a.streamId);n||(n=new re,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if(\\\"function\\\"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,G),{type:\\\"wrote\\\",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:se(n),additionalBytesCount:i.length}}case\\\"reset\\\":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){ie(e,t,n.data&&\\\"streamId\\\"in n.data?n.data.streamId:void 0)}}))}catch(t){ie(e,t)}}()})();\"])));\n}\nlet state = { status: 0 /* DeflateWorkerStatus.Nil */ };\nfunction startDeflateWorker(configuration, source, onInitializationFailure, createDeflateWorkerImpl = createDeflateWorker) {\n if (state.status === 0 /* DeflateWorkerStatus.Nil */) {\n // doStartDeflateWorker updates the state to \"loading\" or \"error\"\n doStartDeflateWorker(configuration, source, createDeflateWorkerImpl);\n }\n switch (state.status) {\n case 1 /* DeflateWorkerStatus.Loading */:\n state.initializationFailureCallbacks.push(onInitializationFailure);\n return state.worker;\n case 3 /* DeflateWorkerStatus.Initialized */:\n return state.worker;\n }\n}\nfunction getDeflateWorkerStatus() {\n return state.status;\n}\n/**\n * Starts the deflate worker and handle messages and errors\n *\n * The spec allow browsers to handle worker errors differently:\n * - Chromium throws an exception\n * - Firefox fires an error event\n *\n * more details: https://bugzilla.mozilla.org/show_bug.cgi?id=1736865#c2\n */\nfunction doStartDeflateWorker(configuration, source, createDeflateWorkerImpl = createDeflateWorker) {\n try {\n const worker = createDeflateWorkerImpl(configuration);\n const { stop: removeErrorListener } = addEventListener(configuration, worker, 'error', (error) => {\n onError(configuration, source, error);\n });\n const { stop: removeMessageListener } = addEventListener(configuration, worker, 'message', ({ data }) => {\n if (data.type === 'errored') {\n onError(configuration, source, data.error, data.streamId);\n }\n else if (data.type === 'initialized') {\n onInitialized(data.version);\n }\n });\n worker.postMessage({ action: 'init' });\n setTimeout(() => onTimeout(source), INITIALIZATION_TIME_OUT_DELAY);\n const stop = () => {\n removeErrorListener();\n removeMessageListener();\n };\n state = { status: 1 /* DeflateWorkerStatus.Loading */, worker, stop, initializationFailureCallbacks: [] };\n }\n catch (error) {\n onError(configuration, source, error);\n }\n}\nfunction onTimeout(source) {\n if (state.status === 1 /* DeflateWorkerStatus.Loading */) {\n display.error(`${source} failed to start: a timeout occurred while initializing the Worker`);\n state.initializationFailureCallbacks.forEach((callback) => callback());\n state = { status: 2 /* DeflateWorkerStatus.Error */ };\n }\n}\nfunction onInitialized(version) {\n if (state.status === 1 /* DeflateWorkerStatus.Loading */) {\n state = { status: 3 /* DeflateWorkerStatus.Initialized */, worker: state.worker, stop: state.stop, version };\n }\n}\nfunction onError(configuration, source, error, streamId) {\n if (state.status === 1 /* DeflateWorkerStatus.Loading */ || state.status === 0 /* DeflateWorkerStatus.Nil */) {\n display.error(`${source} failed to start: an error occurred while creating the Worker:`, error);\n if (error instanceof Event || (error instanceof Error && isMessageCspRelated(error.message))) {\n let baseMessage;\n if (configuration.workerUrl) {\n baseMessage = `Please make sure the Worker URL ${configuration.workerUrl} is correct and CSP is correctly configured.`;\n }\n else {\n baseMessage = 'Please make sure CSP is correctly configured.';\n }\n display.error(`${baseMessage} See documentation at ${DOCS_ORIGIN}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`);\n }\n else {\n addTelemetryError(error);\n }\n if (state.status === 1 /* DeflateWorkerStatus.Loading */) {\n state.initializationFailureCallbacks.forEach((callback) => callback());\n }\n state = { status: 2 /* DeflateWorkerStatus.Error */ };\n }\n else {\n addTelemetryError(error, {\n worker_version: state.status === 3 /* DeflateWorkerStatus.Initialized */ && state.version,\n stream_id: streamId,\n });\n }\n}\nfunction isMessageCspRelated(message) {\n return (message.includes('Content Security Policy') ||\n // Related to `require-trusted-types-for` CSP: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/require-trusted-types-for\n message.includes(\"requires 'TrustedScriptURL'\"));\n}",
2043
+ "originalLength": 30259,
2044
+ "removedExports": [
2045
+ "resetDeflateWorkerState"
2046
+ ],
2047
+ "renderedExports": [
2048
+ "INITIALIZATION_TIME_OUT_DELAY",
2049
+ "startDeflateWorker",
2050
+ "getDeflateWorkerStatus",
2051
+ "doStartDeflateWorker"
2052
+ ],
2053
+ "renderedLength": 29810
2054
+ },
2055
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/deflate/index.js": {
2056
+ "code": null,
2057
+ "originalLength": 194,
2058
+ "removedExports": [],
2059
+ "renderedExports": [],
2060
+ "renderedLength": 0
2061
+ },
2062
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/boot/isBrowserSupported.js": {
2063
+ "code": "/**\n * Test for Browser features used while recording\n */\nfunction isBrowserSupported() {\n return (\n // Array.from is a bit less supported by browsers than CSSSupportsRule, but has higher chances\n // to be polyfilled. Test for both to be more confident. We could add more things if we find out\n // this test is not sufficient.\n typeof Array.from === 'function' &&\n typeof CSSSupportsRule === 'function' &&\n typeof URL.createObjectURL === 'function' &&\n 'forEach' in NodeList.prototype);\n}",
2064
+ "originalLength": 578,
2065
+ "removedExports": [],
2066
+ "renderedExports": [
2067
+ "isBrowserSupported"
2068
+ ],
2069
+ "renderedLength": 524
2070
+ },
2071
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/getSessionReplayLink.js": {
2072
+ "code": "function getSessionReplayLink(configuration, sessionManager, viewHistory, isRecordingStarted) {\n const session = sessionManager.findTrackedSession();\n const errorType = getErrorType(session, isRecordingStarted);\n const viewContext = viewHistory.findView();\n return getSessionReplayUrl(configuration, {\n viewContext,\n errorType,\n session,\n });\n}\nfunction getErrorType(session, isRecordingStarted) {\n if (!isBrowserSupported()) {\n return 'browser-not-supported';\n }\n if (!session) {\n // possibilities:\n // - rum sampled out\n // - session expired (edge case)\n return 'rum-not-tracked';\n }\n if (session.sessionReplay === 0 /* SessionReplayState.OFF */) {\n // possibilities\n // - replay sampled out\n return 'incorrect-session-plan';\n }\n if (!isRecordingStarted) {\n return 'replay-not-started';\n }\n}",
2073
+ "originalLength": 1102,
2074
+ "removedExports": [],
2075
+ "renderedExports": [
2076
+ "getSessionReplayLink"
2077
+ ],
2078
+ "renderedLength": 916
2079
+ },
2080
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/boot/postStartStrategy.js": {
2081
+ "code": "function createPostStartStrategy(configuration, lifeCycle, sessionManager, viewHistory, loadRecorder, getOrCreateDeflateEncoder) {\n let status = 0 /* RecorderStatus.Stopped */;\n let stopRecording;\n lifeCycle.subscribe(8 /* LifeCycleEventType.SESSION_EXPIRED */, () => {\n if (status === 2 /* RecorderStatus.Starting */ || status === 3 /* RecorderStatus.Started */) {\n stop();\n status = 1 /* RecorderStatus.IntentToStart */;\n }\n });\n // Stop the recorder on page unload to avoid sending records after the page is ended.\n lifeCycle.subscribe(10 /* LifeCycleEventType.PAGE_EXITED */, (pageExitEvent) => {\n if (pageExitEvent.reason === PageExitReason.UNLOADING) {\n stop();\n }\n });\n lifeCycle.subscribe(9 /* LifeCycleEventType.SESSION_RENEWED */, () => {\n if (status === 1 /* RecorderStatus.IntentToStart */) {\n start();\n }\n });\n const doStart = async () => {\n const [startRecordingImpl] = await Promise.all([loadRecorder(), asyncRunOnReadyState(configuration, 'interactive')]);\n if (status !== 2 /* RecorderStatus.Starting */) {\n return;\n }\n const deflateEncoder = getOrCreateDeflateEncoder();\n if (!deflateEncoder || !startRecordingImpl) {\n status = 0 /* RecorderStatus.Stopped */;\n return;\n }\n ({ stop: stopRecording } = startRecordingImpl(lifeCycle, configuration, sessionManager, viewHistory, deflateEncoder));\n status = 3 /* RecorderStatus.Started */;\n };\n function start(options) {\n const session = sessionManager.findTrackedSession();\n if (canStartRecording(session, options)) {\n status = 1 /* RecorderStatus.IntentToStart */;\n return;\n }\n if (isRecordingInProgress(status)) {\n return;\n }\n status = 2 /* RecorderStatus.Starting */;\n // Intentionally not awaiting doStart() to keep it asynchronous\n doStart().catch(monitorError);\n if (shouldForceReplay(session, options)) {\n sessionManager.setForcedReplay();\n }\n }\n function stop() {\n if (status === 3 /* RecorderStatus.Started */) {\n stopRecording === null || stopRecording === void 0 ? void 0 : stopRecording();\n }\n status = 0 /* RecorderStatus.Stopped */;\n }\n return {\n start,\n stop,\n getSessionReplayLink() {\n return getSessionReplayLink(configuration, sessionManager, viewHistory, status !== 0 /* RecorderStatus.Stopped */);\n },\n isRecording: () => status === 3 /* RecorderStatus.Started */,\n };\n}\nfunction canStartRecording(session, options) {\n return !session || (session.sessionReplay === 0 /* SessionReplayState.OFF */ && (!options || !options.force));\n}\nfunction isRecordingInProgress(status) {\n return status === 2 /* RecorderStatus.Starting */ || status === 3 /* RecorderStatus.Started */;\n}\nfunction shouldForceReplay(session, options) {\n return options && options.force && session.sessionReplay === 0 /* SessionReplayState.OFF */;\n}",
2082
+ "originalLength": 3350,
2083
+ "removedExports": [],
2084
+ "renderedExports": [
2085
+ "createPostStartStrategy"
2086
+ ],
2087
+ "renderedLength": 3124
2088
+ },
2089
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/boot/preStartStrategy.js": {
2090
+ "code": "function createPreStartStrategy() {\n let status = 0 /* PreStartRecorderStatus.None */;\n return {\n strategy: {\n start() {\n status = 1 /* PreStartRecorderStatus.HadManualStart */;\n },\n stop() {\n status = 2 /* PreStartRecorderStatus.HadManualStop */;\n },\n isRecording: () => false,\n getSessionReplayLink: noop,\n },\n shouldStartImmediately(configuration) {\n return (status === 1 /* PreStartRecorderStatus.HadManualStart */ ||\n (status === 0 /* PreStartRecorderStatus.None */ && !configuration.startSessionReplayRecordingManually));\n },\n };\n}",
2091
+ "originalLength": 794,
2092
+ "removedExports": [],
2093
+ "renderedExports": [
2094
+ "createPreStartStrategy"
2095
+ ],
2096
+ "renderedLength": 696
2097
+ },
2098
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/boot/recorderApi.js": {
2099
+ "code": "function makeRecorderApi(loadRecorder, createDeflateWorkerImpl) {\n if ((canUseEventBridge() && !bridgeSupports(\"records\" /* BridgeCapability.RECORDS */)) || !isBrowserSupported()) {\n return {\n start: noop,\n stop: noop,\n getReplayStats: () => undefined,\n onRumStart: noop,\n isRecording: () => false,\n getSessionReplayLink: () => undefined,\n };\n }\n // eslint-disable-next-line prefer-const\n let { strategy, shouldStartImmediately } = createPreStartStrategy();\n return {\n start: (options) => strategy.start(options),\n stop: () => strategy.stop(),\n getSessionReplayLink: () => strategy.getSessionReplayLink(),\n onRumStart,\n isRecording: () => \n // The worker is started optimistically, meaning we could have started to record but its\n // initialization fails a bit later. This could happen when:\n // * the worker URL (blob or plain URL) is blocked by CSP in Firefox only (Chromium and Safari\n // throw an exception when instantiating the worker, and IE doesn't care about CSP)\n // * the browser fails to load the worker in case the workerUrl is used\n // * an unexpected error occurs in the Worker before initialization, ex:\n // * a runtime exception collected by monitor()\n // * a syntax error notified by the browser via an error event\n // * the worker is unresponsive for some reason and timeouts\n //\n // It is not expected to happen often. Nonetheless, the \"replayable\" status on RUM events is\n // an important part of the Datadog App:\n // * If we have a false positive (we set has_replay: true even if no replay data is present),\n // we might display broken links to the Session Replay player.\n // * If we have a false negative (we don't set has_replay: true even if replay data is\n // available), it is less noticeable because no link will be displayed.\n //\n // Thus, it is better to have false negative, so let's make sure the worker is correctly\n // initialized before advertizing that we are recording.\n //\n // In the future, when the compression worker will also be used for RUM data, this will be\n // less important since no RUM event will be sent when the worker fails to initialize.\n getDeflateWorkerStatus() === 3 /* DeflateWorkerStatus.Initialized */ && strategy.isRecording(),\n getReplayStats: (viewId) => getDeflateWorkerStatus() === 3 /* DeflateWorkerStatus.Initialized */ ? getReplayStats(viewId) : undefined,\n };\n function onRumStart(lifeCycle, configuration, sessionManager, viewHistory, worker) {\n let cachedDeflateEncoder;\n function getOrCreateDeflateEncoder() {\n if (!cachedDeflateEncoder) {\n worker !== null && worker !== void 0 ? worker : (worker = startDeflateWorker(configuration, 'Datadog Session Replay', () => {\n strategy.stop();\n }, createDeflateWorkerImpl));\n if (worker) {\n cachedDeflateEncoder = createDeflateEncoder(configuration, worker, 1 /* DeflateEncoderStreamId.REPLAY */);\n }\n }\n return cachedDeflateEncoder;\n }\n strategy = createPostStartStrategy(configuration, lifeCycle, sessionManager, viewHistory, loadRecorder, getOrCreateDeflateEncoder);\n if (shouldStartImmediately(configuration)) {\n strategy.start();\n }\n }\n}",
2100
+ "originalLength": 4046,
2101
+ "removedExports": [],
2102
+ "renderedExports": [
2103
+ "makeRecorderApi"
2104
+ ],
2105
+ "renderedLength": 3549
2106
+ },
2107
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/boot/lazyLoadRecorder.js": {
2108
+ "code": "async function lazyLoadRecorder() {\n try {\n const module = await Promise.resolve().then(function () { return startRecording$1; });\n return module.startRecording;\n }\n catch (_a) {\n /* Prevent collecting the webpack ChunkLoadError as it is already collected as a RUM resource. */\n }\n}",
2109
+ "originalLength": 364,
2110
+ "removedExports": [],
2111
+ "renderedExports": [
2112
+ "lazyLoadRecorder"
2113
+ ],
2114
+ "renderedLength": 315
2115
+ },
2116
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/entries/main.js": {
2117
+ "code": "// Keep the following in sync with packages/rum-slim/src/entries/main.ts\nconst recorderApi = makeRecorderApi(lazyLoadRecorder);\nconst datadogRum = makeRumPublicApi(startRum, recorderApi, { startDeflateWorker, createDeflateEncoder });\ndefineGlobal(getGlobalObject(), 'DD_RUM', datadogRum);",
2118
+ "originalLength": 726,
2119
+ "removedExports": [],
2120
+ "renderedExports": [
2121
+ "datadogRum"
2122
+ ],
2123
+ "renderedLength": 288
2124
+ },
2125
+ "/home/runner/work/build-plugins/build-plugins/packages/plugins/rum/src/built/rum-browser-sdk.ts": {
2126
+ "code": "const globalAny = globalThis;\nglobalAny.DD_RUM = datadogRum;",
2127
+ "originalLength": 440,
2128
+ "removedExports": [],
2129
+ "renderedExports": [],
2130
+ "renderedLength": 60
2131
+ },
2132
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializationUtils.js": {
2133
+ "code": "const serializedNodeIds = new WeakMap();\nfunction hasSerializedNode(node) {\n return serializedNodeIds.has(node);\n}\nfunction nodeAndAncestorsHaveSerializedNode(node) {\n let current = node;\n while (current) {\n if (!hasSerializedNode(current) && !isNodeShadowRoot(current)) {\n return false;\n }\n current = getParentNode(current);\n }\n return true;\n}\nfunction getSerializedNodeId(node) {\n return serializedNodeIds.get(node);\n}\nfunction setSerializedNodeId(node, serializeNodeId) {\n serializedNodeIds.set(node, serializeNodeId);\n}\n/**\n * Get the element \"value\" to be serialized as an attribute or an input update record. It respects\n * the input privacy mode of the element.\n * PERFROMANCE OPTIMIZATION: Assumes that privacy level `HIDDEN` is never encountered because of earlier checks.\n */\nfunction getElementInputValue(element, nodePrivacyLevel) {\n /*\n BROWSER SPEC NOTE: <input>, <select>\n For some <input> elements, the `value` is an exceptional property/attribute that has the\n value synced between el.value and el.getAttribute()\n input[type=button,checkbox,hidden,image,radio,reset,submit]\n */\n const tagName = element.tagName;\n const value = element.value;\n if (shouldMaskNode(element, nodePrivacyLevel)) {\n const type = element.type;\n if (tagName === 'INPUT' && (type === 'button' || type === 'submit' || type === 'reset')) {\n // Overrule `MASK` privacy level for button-like element values, as they are used during replay\n // to display their label. They can still be hidden via the \"hidden\" privacy attribute or class name.\n return value;\n }\n else if (!value || tagName === 'OPTION') {\n // <Option> value provides no benefit\n return;\n }\n return CENSORED_STRING_MARK;\n }\n if (tagName === 'OPTION' || tagName === 'SELECT') {\n return element.value;\n }\n if (tagName !== 'INPUT' && tagName !== 'TEXTAREA') {\n return;\n }\n return value;\n}\nconst URL_IN_CSS_REF = /url\\((?:(')([^']*)'|(\")([^\"]*)\"|([^)]*))\\)/gm;\nconst ABSOLUTE_URL = /^[A-Za-z]+:|^\\/\\//;\nconst DATA_URI = /^data:.*,/i;\nfunction switchToAbsoluteUrl(cssText, cssHref) {\n return cssText.replace(URL_IN_CSS_REF, (matchingSubstring, singleQuote, urlWrappedInSingleQuotes, doubleQuote, urlWrappedInDoubleQuotes, urlNotWrappedInQuotes) => {\n const url = urlWrappedInSingleQuotes || urlWrappedInDoubleQuotes || urlNotWrappedInQuotes;\n if (!cssHref || !url || ABSOLUTE_URL.test(url) || DATA_URI.test(url)) {\n return matchingSubstring;\n }\n const quote = singleQuote || doubleQuote || '';\n return `url(${quote}${makeUrlAbsolute(url, cssHref)}${quote})`;\n });\n}\nfunction makeUrlAbsolute(url, baseUrl) {\n try {\n return buildUrl(url, baseUrl).href;\n }\n catch (_a) {\n return url;\n }\n}\nconst TAG_NAME_REGEX = /[^a-z1-6-_]/;\nfunction getValidTagName(tagName) {\n const processedTagName = tagName.toLowerCase().trim();\n if (TAG_NAME_REGEX.test(processedTagName)) {\n // if the tag name is odd and we cannot extract\n // anything from the string, then we return a\n // generic div\n return 'div';\n }\n return processedTagName;\n}\nfunction censoredImageForSize(width, height) {\n return `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${width}' height='${height}' style='background-color:silver'%3E%3C/svg%3E`;\n}",
2134
+ "originalLength": 3798,
2135
+ "removedExports": [],
2136
+ "renderedExports": [
2137
+ "hasSerializedNode",
2138
+ "nodeAndAncestorsHaveSerializedNode",
2139
+ "getSerializedNodeId",
2140
+ "setSerializedNodeId",
2141
+ "getElementInputValue",
2142
+ "URL_IN_CSS_REF",
2143
+ "ABSOLUTE_URL",
2144
+ "DATA_URI",
2145
+ "switchToAbsoluteUrl",
2146
+ "makeUrlAbsolute",
2147
+ "getValidTagName",
2148
+ "censoredImageForSize"
2149
+ ],
2150
+ "renderedLength": 3502
2151
+ },
2152
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/types/sessionReplay.js": {
2153
+ "code": null,
2154
+ "originalLength": 153,
2155
+ "removedExports": [],
2156
+ "renderedExports": [],
2157
+ "renderedLength": 0
2158
+ },
2159
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/types/sessionReplayConstants.js": {
2160
+ "code": "const RecordType = {\n FullSnapshot: 2,\n IncrementalSnapshot: 3,\n Meta: 4,\n Focus: 6,\n ViewEnd: 7,\n VisualViewport: 8,\n FrustrationRecord: 9,\n};\nconst NodeType = {\n Document: 0,\n DocumentType: 1,\n Element: 2,\n Text: 3,\n CDATA: 4,\n DocumentFragment: 11,\n};\nconst IncrementalSource = {\n Mutation: 0,\n MouseMove: 1,\n MouseInteraction: 2,\n Scroll: 3,\n ViewportResize: 4,\n Input: 5,\n TouchMove: 6,\n MediaInteraction: 7,\n StyleSheetRule: 8,\n // CanvasMutation : 9,\n // Font : 10,\n};\nconst MouseInteractionType = {\n MouseUp: 0,\n MouseDown: 1,\n Click: 2,\n ContextMenu: 3,\n DblClick: 4,\n Focus: 5,\n Blur: 6,\n TouchStart: 7,\n TouchEnd: 9,\n};\nconst MediaInteractionType = {\n Play: 0,\n Pause: 1,\n};",
2161
+ "originalLength": 876,
2162
+ "removedExports": [],
2163
+ "renderedExports": [
2164
+ "RecordType",
2165
+ "NodeType",
2166
+ "IncrementalSource",
2167
+ "MouseInteractionType",
2168
+ "MediaInteractionType"
2169
+ ],
2170
+ "renderedLength": 790
2171
+ },
2172
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/types/index.js": {
2173
+ "code": null,
2174
+ "originalLength": 108,
2175
+ "removedExports": [],
2176
+ "renderedExports": [],
2177
+ "renderedLength": 0
2178
+ },
2179
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeStyleSheets.js": {
2180
+ "code": "function serializeStyleSheets(cssStyleSheets) {\n if (cssStyleSheets === undefined || cssStyleSheets.length === 0) {\n return undefined;\n }\n return cssStyleSheets.map((cssStyleSheet) => {\n const rules = cssStyleSheet.cssRules || cssStyleSheet.rules;\n const cssRules = Array.from(rules, (cssRule) => cssRule.cssText);\n const styleSheet = {\n cssRules,\n disabled: cssStyleSheet.disabled || undefined,\n media: cssStyleSheet.media.length > 0 ? Array.from(cssStyleSheet.media) : undefined,\n };\n return styleSheet;\n });\n}",
2181
+ "originalLength": 655,
2182
+ "removedExports": [],
2183
+ "renderedExports": [
2184
+ "serializeStyleSheets"
2185
+ ],
2186
+ "renderedLength": 599
2187
+ },
2188
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeAttribute.js": {
2189
+ "code": "function serializeAttribute(element, nodePrivacyLevel, attributeName, configuration) {\n if (nodePrivacyLevel === NodePrivacyLevel.HIDDEN) {\n // dup condition for direct access case\n return null;\n }\n const attributeValue = element.getAttribute(attributeName);\n if (nodePrivacyLevel === NodePrivacyLevel.MASK &&\n attributeName !== PRIVACY_ATTR_NAME &&\n !STABLE_ATTRIBUTES.includes(attributeName) &&\n attributeName !== configuration.actionNameAttribute) {\n const tagName = element.tagName;\n switch (attributeName) {\n // Mask Attribute text content\n case 'title':\n case 'alt':\n case 'placeholder':\n return CENSORED_STRING_MARK;\n }\n // mask image URLs\n if (tagName === 'IMG' && (attributeName === 'src' || attributeName === 'srcset')) {\n // generate image with similar dimension than the original to have the same rendering behaviour\n const image = element;\n if (image.naturalWidth > 0) {\n return censoredImageForSize(image.naturalWidth, image.naturalHeight);\n }\n const { width, height } = element.getBoundingClientRect();\n if (width > 0 || height > 0) {\n return censoredImageForSize(width, height);\n }\n // if we can't get the image size, fallback to the censored image\n return CENSORED_IMG_MARK;\n }\n // mask source URLs\n if (tagName === 'SOURCE' && (attributeName === 'src' || attributeName === 'srcset')) {\n return CENSORED_IMG_MARK;\n }\n // mask <a> URLs\n if (tagName === 'A' && attributeName === 'href') {\n return CENSORED_STRING_MARK;\n }\n // mask data-* attributes\n if (attributeValue && attributeName.startsWith('data-')) {\n // Exception: it's safe to reveal the `${PRIVACY_ATTR_NAME}` attr\n return CENSORED_STRING_MARK;\n }\n // mask iframe srcdoc\n if (tagName === 'IFRAME' && attributeName === 'srcdoc') {\n return CENSORED_STRING_MARK;\n }\n }\n if (!attributeValue || typeof attributeValue !== 'string') {\n return attributeValue;\n }\n // Minimum Fix for customer.\n if (isLongDataUrl(attributeValue)) {\n return sanitizeDataUrl(attributeValue);\n }\n return attributeValue;\n}",
2190
+ "originalLength": 2708,
2191
+ "removedExports": [],
2192
+ "renderedExports": [
2193
+ "serializeAttribute"
2194
+ ],
2195
+ "renderedLength": 2419
2196
+ },
2197
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeAttributes.js": {
2198
+ "code": "function serializeAttributes(element, nodePrivacyLevel, options) {\n if (nodePrivacyLevel === NodePrivacyLevel.HIDDEN) {\n return {};\n }\n const safeAttrs = {};\n const tagName = getValidTagName(element.tagName);\n const doc = element.ownerDocument;\n for (let i = 0; i < element.attributes.length; i += 1) {\n const attribute = element.attributes.item(i);\n const attributeName = attribute.name;\n const attributeValue = serializeAttribute(element, nodePrivacyLevel, attributeName, options.configuration);\n if (attributeValue !== null) {\n safeAttrs[attributeName] = attributeValue;\n }\n }\n if (element.value &&\n (tagName === 'textarea' || tagName === 'select' || tagName === 'option' || tagName === 'input')) {\n const formValue = getElementInputValue(element, nodePrivacyLevel);\n if (formValue !== undefined) {\n safeAttrs.value = formValue;\n }\n }\n /**\n * <Option> can be selected, which occurs if its `value` matches ancestor `<Select>.value`\n */\n if (tagName === 'option' && nodePrivacyLevel === NodePrivacyLevel.ALLOW) {\n // For privacy=`MASK`, all the values would be the same, so skip.\n const optionElement = element;\n if (optionElement.selected) {\n safeAttrs.selected = optionElement.selected;\n }\n }\n // remote css\n if (tagName === 'link') {\n const stylesheet = Array.from(doc.styleSheets).find((s) => s.href === element.href);\n const cssText = getCssRulesString(stylesheet);\n if (cssText && stylesheet) {\n safeAttrs._cssText = cssText;\n }\n }\n // dynamic stylesheet\n if (tagName === 'style' && element.sheet) {\n const cssText = getCssRulesString(element.sheet);\n if (cssText) {\n safeAttrs._cssText = cssText;\n }\n }\n /**\n * Forms: input[type=checkbox,radio]\n * The `checked` property for <input> is a little bit special:\n * 1. el.checked is a setter that returns if truthy.\n * 2. getAttribute returns the string value\n * getAttribute('checked') does not sync with `Element.checked`, so use JS property\n * NOTE: `checked` property exists on `HTMLInputElement`. For serializer assumptions, we check for type=radio|check.\n */\n const inputElement = element;\n if (tagName === 'input' && (inputElement.type === 'radio' || inputElement.type === 'checkbox')) {\n if (nodePrivacyLevel === NodePrivacyLevel.ALLOW) {\n safeAttrs.checked = !!inputElement.checked;\n }\n else if (shouldMaskNode(inputElement, nodePrivacyLevel)) {\n delete safeAttrs.checked;\n }\n }\n /**\n * Serialize the media playback state\n */\n if (tagName === 'audio' || tagName === 'video') {\n const mediaElement = element;\n safeAttrs.rr_mediaState = mediaElement.paused ? 'paused' : 'played';\n }\n /**\n * Serialize the scroll state for each element only for full snapshot\n */\n let scrollTop;\n let scrollLeft;\n const serializationContext = options.serializationContext;\n switch (serializationContext.status) {\n case 0 /* SerializationContextStatus.INITIAL_FULL_SNAPSHOT */:\n scrollTop = Math.round(element.scrollTop);\n scrollLeft = Math.round(element.scrollLeft);\n if (scrollTop || scrollLeft) {\n serializationContext.elementsScrollPositions.set(element, { scrollTop, scrollLeft });\n }\n break;\n case 1 /* SerializationContextStatus.SUBSEQUENT_FULL_SNAPSHOT */:\n if (serializationContext.elementsScrollPositions.has(element)) {\n ({ scrollTop, scrollLeft } = serializationContext.elementsScrollPositions.get(element));\n }\n break;\n }\n if (scrollLeft) {\n safeAttrs.rr_scrollLeft = scrollLeft;\n }\n if (scrollTop) {\n safeAttrs.rr_scrollTop = scrollTop;\n }\n return safeAttrs;\n}\nfunction getCssRulesString(cssStyleSheet) {\n if (!cssStyleSheet) {\n return null;\n }\n let rules;\n try {\n rules = cssStyleSheet.rules || cssStyleSheet.cssRules;\n }\n catch (_a) {\n // if css is protected by CORS we cannot access cssRules see: https://www.w3.org/TR/cssom-1/#the-cssstylesheet-interface\n }\n if (!rules) {\n return null;\n }\n const styleSheetCssText = Array.from(rules, isSafari() ? getCssRuleStringForSafari : getCssRuleString).join('');\n return switchToAbsoluteUrl(styleSheetCssText, cssStyleSheet.href);\n}\nfunction getCssRuleStringForSafari(rule) {\n // Safari does not escape attribute selectors containing : properly\n // https://bugs.webkit.org/show_bug.cgi?id=184604\n if (isCSSStyleRule(rule) && rule.selectorText.includes(':')) {\n // This regex replaces [foo:bar] by [foo\\\\:bar]\n const escapeColon = /(\\[[\\w-]+[^\\\\])(:[^\\]]+\\])/g;\n return rule.cssText.replace(escapeColon, '$1\\\\$2');\n }\n return getCssRuleString(rule);\n}\nfunction getCssRuleString(rule) {\n // If it's an @import rule, try to inline sub-rules recursively with `getCssRulesString`. This\n // operation can fail if the imported stylesheet is protected by CORS, in which case we fallback\n // to the @import rule CSS text.\n return (isCSSImportRule(rule) && getCssRulesString(rule.styleSheet)) || rule.cssText;\n}\nfunction isCSSImportRule(rule) {\n return 'styleSheet' in rule;\n}\nfunction isCSSStyleRule(rule) {\n return 'selectorText' in rule;\n}",
2199
+ "originalLength": 5885,
2200
+ "removedExports": [],
2201
+ "renderedExports": [
2202
+ "serializeAttributes",
2203
+ "getCssRulesString"
2204
+ ],
2205
+ "renderedLength": 5519
2206
+ },
2207
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeNode.js": {
2208
+ "code": "function serializeNodeWithId(node, options) {\n const serializedNode = serializeNode(node, options);\n if (!serializedNode) {\n return null;\n }\n // Try to reuse the previous id\n const id = getSerializedNodeId(node) || generateNextId();\n const serializedNodeWithId = serializedNode;\n serializedNodeWithId.id = id;\n setSerializedNodeId(node, id);\n if (options.serializedNodeIds) {\n options.serializedNodeIds.add(id);\n }\n return serializedNodeWithId;\n}\nlet _nextId = 1;\nfunction generateNextId() {\n return _nextId++;\n}\nfunction serializeChildNodes(node, options) {\n const result = [];\n forEachChildNodes(node, (childNode) => {\n const serializedChildNode = serializeNodeWithId(childNode, options);\n if (serializedChildNode) {\n result.push(serializedChildNode);\n }\n });\n return result;\n}\nfunction serializeNode(node, options) {\n switch (node.nodeType) {\n case node.DOCUMENT_NODE:\n return serializeDocumentNode(node, options);\n case node.DOCUMENT_FRAGMENT_NODE:\n return serializeDocumentFragmentNode(node, options);\n case node.DOCUMENT_TYPE_NODE:\n return serializeDocumentTypeNode(node);\n case node.ELEMENT_NODE:\n return serializeElementNode(node, options);\n case node.TEXT_NODE:\n return serializeTextNode(node, options);\n case node.CDATA_SECTION_NODE:\n return serializeCDataNode();\n }\n}\nfunction serializeDocumentNode(document, options) {\n return {\n type: NodeType.Document,\n childNodes: serializeChildNodes(document, options),\n adoptedStyleSheets: serializeStyleSheets(document.adoptedStyleSheets),\n };\n}\nfunction serializeDocumentFragmentNode(element, options) {\n const isShadowRoot = isNodeShadowRoot(element);\n if (isShadowRoot) {\n options.serializationContext.shadowRootsController.addShadowRoot(element);\n }\n return {\n type: NodeType.DocumentFragment,\n childNodes: serializeChildNodes(element, options),\n isShadowRoot,\n adoptedStyleSheets: isShadowRoot ? serializeStyleSheets(element.adoptedStyleSheets) : undefined,\n };\n}\nfunction serializeDocumentTypeNode(documentType) {\n return {\n type: NodeType.DocumentType,\n name: documentType.name,\n publicId: documentType.publicId,\n systemId: documentType.systemId,\n };\n}\n/**\n * Serializing Element nodes involves capturing:\n * 1. HTML ATTRIBUTES:\n * 2. JS STATE:\n * - scroll offsets\n * - Form fields (input value, checkbox checked, option selection, range)\n * - Canvas state,\n * - Media (video/audio) play mode + currentTime\n * - iframe contents\n * - webcomponents\n * 3. CUSTOM PROPERTIES:\n * - height+width for when `hidden` to cover the element\n * 4. EXCLUDED INTERACTION STATE:\n * - focus (possible, but not worth perf impact)\n * - hover (tracked only via mouse activity)\n * - fullscreen mode\n */\nfunction serializeElementNode(element, options) {\n const tagName = getValidTagName(element.tagName);\n const isSVG = isSVGElement(element) || undefined;\n // For performance reason, we don't use getNodePrivacyLevel directly: we leverage the\n // parentNodePrivacyLevel option to avoid iterating over all parents\n const nodePrivacyLevel = reducePrivacyLevel(getNodeSelfPrivacyLevel(element), options.parentNodePrivacyLevel);\n if (nodePrivacyLevel === NodePrivacyLevel.HIDDEN) {\n const { width, height } = element.getBoundingClientRect();\n return {\n type: NodeType.Element,\n tagName,\n attributes: {\n rr_width: `${width}px`,\n rr_height: `${height}px`,\n [PRIVACY_ATTR_NAME]: PRIVACY_ATTR_VALUE_HIDDEN,\n },\n childNodes: [],\n isSVG,\n };\n }\n // Ignore Elements like Script and some Link, Metas\n if (nodePrivacyLevel === NodePrivacyLevel.IGNORE) {\n return;\n }\n const attributes = serializeAttributes(element, nodePrivacyLevel, options);\n let childNodes = [];\n if (hasChildNodes(element) &&\n // Do not serialize style children as the css rules are already in the _cssText attribute\n tagName !== 'style') {\n // OBJECT POOLING OPTIMIZATION:\n // We should not create a new object systematically as it could impact performances. Try to reuse\n // the same object as much as possible, and clone it only if we need to.\n let childNodesSerializationOptions;\n if (options.parentNodePrivacyLevel === nodePrivacyLevel && options.ignoreWhiteSpace === (tagName === 'head')) {\n childNodesSerializationOptions = options;\n }\n else {\n childNodesSerializationOptions = {\n ...options,\n parentNodePrivacyLevel: nodePrivacyLevel,\n ignoreWhiteSpace: tagName === 'head',\n };\n }\n childNodes = serializeChildNodes(element, childNodesSerializationOptions);\n }\n return {\n type: NodeType.Element,\n tagName,\n attributes,\n childNodes,\n isSVG,\n };\n}\nfunction isSVGElement(el) {\n return el.tagName === 'svg' || el instanceof SVGElement;\n}\n/**\n * Text Nodes are dependant on Element nodes\n * Privacy levels are set on elements so we check the parentElement of a text node\n * for privacy level.\n */\nfunction serializeTextNode(textNode, options) {\n const textContent = getTextContent(textNode, options.ignoreWhiteSpace || false, options.parentNodePrivacyLevel);\n if (textContent === undefined) {\n return;\n }\n return {\n type: NodeType.Text,\n textContent,\n };\n}\nfunction serializeCDataNode() {\n return {\n type: NodeType.CDATA,\n textContent: '',\n };\n}",
2209
+ "originalLength": 6353,
2210
+ "removedExports": [],
2211
+ "renderedExports": [
2212
+ "serializeNodeWithId",
2213
+ "generateNextId",
2214
+ "serializeChildNodes",
2215
+ "serializeDocumentNode"
2216
+ ],
2217
+ "renderedLength": 5796
2218
+ },
2219
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/serialization/serializeDocument.js": {
2220
+ "code": "function serializeDocument(document, configuration, serializationContext) {\n // We are sure that Documents are never ignored, so this function never returns null\n return serializeNodeWithId(document, {\n serializationContext,\n parentNodePrivacyLevel: configuration.defaultPrivacyLevel,\n configuration,\n });\n}",
2221
+ "originalLength": 445,
2222
+ "removedExports": [],
2223
+ "renderedExports": [
2224
+ "serializeDocument"
2225
+ ],
2226
+ "renderedLength": 337
2227
+ },
2228
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/serialization/index.js": {
2229
+ "code": null,
2230
+ "originalLength": 342,
2231
+ "removedExports": [],
2232
+ "renderedExports": [],
2233
+ "renderedLength": 0
2234
+ },
2235
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/eventsUtils.js": {
2236
+ "code": "function isTouchEvent(event) {\n return Boolean(event.changedTouches);\n}\nfunction getEventTarget(event) {\n if (event.composed === true && isNodeShadowHost(event.target)) {\n return event.composedPath()[0];\n }\n return event.target;\n}",
2237
+ "originalLength": 365,
2238
+ "removedExports": [],
2239
+ "renderedExports": [
2240
+ "isTouchEvent",
2241
+ "getEventTarget"
2242
+ ],
2243
+ "renderedLength": 249
2244
+ },
2245
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/viewports.js": {
2246
+ "code": "/**\n * Browsers have not standardized various dimension properties. Mobile devices typically report\n * dimensions in reference to the visual viewport, while desktop uses the layout viewport. For example,\n * Mobile Chrome will change innerWidth when a pinch zoom takes place, while Chrome Desktop (mac) will not.\n *\n * With the new Viewport API, we now calculate and normalize dimension properties to the layout viewport.\n * If the VisualViewport API is not supported by a browser, it isn't reasonably possible to detect or normalize\n * which viewport is being measured. Therefore these exported functions will fallback to assuming that the layout\n * viewport is being measured by the browser\n */\n// Scrollbar widths vary across properties on different devices and browsers\nconst TOLERANCE = 25;\n/**\n * Use the Visual Viewport API's properties to measure scrollX/Y in reference to the layout viewport\n * in order to determine if window.scrollX/Y is measuring the layout or visual viewport.\n * This finding corresponds to which viewport mouseEvent.clientX/Y and window.innerWidth/Height measures.\n */\nfunction isVisualViewportFactoredIn(visualViewport) {\n return (Math.abs(visualViewport.pageTop - visualViewport.offsetTop - window.scrollY) > TOLERANCE ||\n Math.abs(visualViewport.pageLeft - visualViewport.offsetLeft - window.scrollX) > TOLERANCE);\n}\nconst convertMouseEventToLayoutCoordinates = (clientX, clientY) => {\n const visualViewport = window.visualViewport;\n const normalized = {\n layoutViewportX: clientX,\n layoutViewportY: clientY,\n visualViewportX: clientX,\n visualViewportY: clientY,\n };\n if (!visualViewport) {\n // On old browsers, we cannot normalize, so fallback to clientX/Y\n return normalized;\n }\n else if (isVisualViewportFactoredIn(visualViewport)) {\n // Typically Mobile Devices\n normalized.layoutViewportX = Math.round(clientX + visualViewport.offsetLeft);\n normalized.layoutViewportY = Math.round(clientY + visualViewport.offsetTop);\n }\n else {\n // Typically Desktop Devices\n normalized.visualViewportX = Math.round(clientX - visualViewport.offsetLeft);\n normalized.visualViewportY = Math.round(clientY - visualViewport.offsetTop);\n }\n return normalized;\n};\nconst getVisualViewport = (visualViewport) => ({\n scale: visualViewport.scale,\n offsetLeft: visualViewport.offsetLeft,\n offsetTop: visualViewport.offsetTop,\n pageLeft: visualViewport.pageLeft,\n pageTop: visualViewport.pageTop,\n height: visualViewport.height,\n width: visualViewport.width,\n});",
2247
+ "originalLength": 2669,
2248
+ "removedExports": [],
2249
+ "renderedExports": [
2250
+ "convertMouseEventToLayoutCoordinates",
2251
+ "getVisualViewport"
2252
+ ],
2253
+ "renderedLength": 2617
2254
+ },
2255
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/assembly.js": {
2256
+ "code": "function assembleIncrementalSnapshot(source, data) {\n return {\n data: {\n source,\n ...data,\n },\n type: RecordType.IncrementalSnapshot,\n timestamp: timeStampNow(),\n };\n}",
2257
+ "originalLength": 363,
2258
+ "removedExports": [],
2259
+ "renderedExports": [
2260
+ "assembleIncrementalSnapshot"
2261
+ ],
2262
+ "renderedLength": 223
2263
+ },
2264
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackMove.js": {
2265
+ "code": "const MOUSE_MOVE_OBSERVER_THRESHOLD = 50;\nfunction trackMove(configuration, moveCb) {\n const { throttled: updatePosition, cancel: cancelThrottle } = throttle((event) => {\n const target = getEventTarget(event);\n if (hasSerializedNode(target)) {\n const coordinates = tryToComputeCoordinates(event);\n if (!coordinates) {\n return;\n }\n const position = {\n id: getSerializedNodeId(target),\n timeOffset: 0,\n x: coordinates.x,\n y: coordinates.y,\n };\n moveCb(assembleIncrementalSnapshot(isTouchEvent(event) ? IncrementalSource.TouchMove : IncrementalSource.MouseMove, { positions: [position] }));\n }\n }, MOUSE_MOVE_OBSERVER_THRESHOLD, {\n trailing: false,\n });\n const { stop: removeListener } = addEventListeners(configuration, document, [\"mousemove\" /* DOM_EVENT.MOUSE_MOVE */, \"touchmove\" /* DOM_EVENT.TOUCH_MOVE */], updatePosition, {\n capture: true,\n passive: true,\n });\n return {\n stop: () => {\n removeListener();\n cancelThrottle();\n },\n };\n}\nfunction tryToComputeCoordinates(event) {\n let { clientX: x, clientY: y } = isTouchEvent(event) ? event.changedTouches[0] : event;\n if (window.visualViewport) {\n const { visualViewportX, visualViewportY } = convertMouseEventToLayoutCoordinates(x, y);\n x = visualViewportX;\n y = visualViewportY;\n }\n if (!Number.isFinite(x) || !Number.isFinite(y)) {\n if (event.isTrusted) {\n addTelemetryDebug('mouse/touch event without x/y');\n }\n return undefined;\n }\n return { x, y };\n}",
2266
+ "originalLength": 2177,
2267
+ "removedExports": [],
2268
+ "renderedExports": [
2269
+ "trackMove",
2270
+ "tryToComputeCoordinates"
2271
+ ],
2272
+ "renderedLength": 1719
2273
+ },
2274
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackMouseInteraction.js": {
2275
+ "code": "const eventTypeToMouseInteraction = {\n // Listen for pointerup DOM events instead of mouseup for MouseInteraction/MouseUp records. This\n // allows to reference such records from Frustration records.\n //\n // In the context of supporting Mobile Session Replay, we introduced `PointerInteraction` records\n // used by the Mobile SDKs in place of `MouseInteraction`. In the future, we should replace\n // `MouseInteraction` by `PointerInteraction` in the Browser SDK so we have an uniform way to\n // convey such interaction. This would cleanly solve the issue since we would have\n // `PointerInteraction/Up` records that we could reference from `Frustration` records.\n [\"pointerup\" /* DOM_EVENT.POINTER_UP */]: MouseInteractionType.MouseUp,\n [\"mousedown\" /* DOM_EVENT.MOUSE_DOWN */]: MouseInteractionType.MouseDown,\n [\"click\" /* DOM_EVENT.CLICK */]: MouseInteractionType.Click,\n [\"contextmenu\" /* DOM_EVENT.CONTEXT_MENU */]: MouseInteractionType.ContextMenu,\n [\"dblclick\" /* DOM_EVENT.DBL_CLICK */]: MouseInteractionType.DblClick,\n [\"focus\" /* DOM_EVENT.FOCUS */]: MouseInteractionType.Focus,\n [\"blur\" /* DOM_EVENT.BLUR */]: MouseInteractionType.Blur,\n [\"touchstart\" /* DOM_EVENT.TOUCH_START */]: MouseInteractionType.TouchStart,\n [\"touchend\" /* DOM_EVENT.TOUCH_END */]: MouseInteractionType.TouchEnd,\n};\nfunction trackMouseInteraction(configuration, mouseInteractionCb, recordIds) {\n const handler = (event) => {\n const target = getEventTarget(event);\n if (getNodePrivacyLevel(target, configuration.defaultPrivacyLevel) === NodePrivacyLevel.HIDDEN ||\n !hasSerializedNode(target)) {\n return;\n }\n const id = getSerializedNodeId(target);\n const type = eventTypeToMouseInteraction[event.type];\n let interaction;\n if (type !== MouseInteractionType.Blur && type !== MouseInteractionType.Focus) {\n const coordinates = tryToComputeCoordinates(event);\n if (!coordinates) {\n return;\n }\n interaction = { id, type, x: coordinates.x, y: coordinates.y };\n }\n else {\n interaction = { id, type };\n }\n const record = {\n id: recordIds.getIdForEvent(event),\n ...assembleIncrementalSnapshot(IncrementalSource.MouseInteraction, interaction),\n };\n mouseInteractionCb(record);\n };\n return addEventListeners(configuration, document, Object.keys(eventTypeToMouseInteraction), handler, {\n capture: true,\n passive: true,\n });\n}",
2276
+ "originalLength": 3088,
2277
+ "removedExports": [],
2278
+ "renderedExports": [
2279
+ "trackMouseInteraction"
2280
+ ],
2281
+ "renderedLength": 2577
2282
+ },
2283
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackScroll.js": {
2284
+ "code": "const SCROLL_OBSERVER_THRESHOLD = 100;\nfunction trackScroll(configuration, scrollCb, elementsScrollPositions, target = document) {\n const { throttled: updatePosition, cancel: cancelThrottle } = throttle((event) => {\n const target = getEventTarget(event);\n if (!target ||\n getNodePrivacyLevel(target, configuration.defaultPrivacyLevel) === NodePrivacyLevel.HIDDEN ||\n !hasSerializedNode(target)) {\n return;\n }\n const id = getSerializedNodeId(target);\n const scrollPositions = target === document\n ? {\n scrollTop: getScrollY(),\n scrollLeft: getScrollX(),\n }\n : {\n scrollTop: Math.round(target.scrollTop),\n scrollLeft: Math.round(target.scrollLeft),\n };\n elementsScrollPositions.set(target, scrollPositions);\n scrollCb(assembleIncrementalSnapshot(IncrementalSource.Scroll, {\n id,\n x: scrollPositions.scrollLeft,\n y: scrollPositions.scrollTop,\n }));\n }, SCROLL_OBSERVER_THRESHOLD);\n const { stop: removeListener } = addEventListener(configuration, target, \"scroll\" /* DOM_EVENT.SCROLL */, updatePosition, {\n capture: true,\n passive: true,\n });\n return {\n stop: () => {\n removeListener();\n cancelThrottle();\n },\n };\n}",
2285
+ "originalLength": 1863,
2286
+ "removedExports": [],
2287
+ "renderedExports": [
2288
+ "trackScroll"
2289
+ ],
2290
+ "renderedLength": 1406
2291
+ },
2292
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackViewportResize.js": {
2293
+ "code": "const VISUAL_VIEWPORT_OBSERVER_THRESHOLD = 200;\nfunction trackViewportResize(configuration, viewportResizeCb) {\n const viewportResizeSubscription = initViewportObservable(configuration).subscribe((data) => {\n viewportResizeCb(assembleIncrementalSnapshot(IncrementalSource.ViewportResize, data));\n });\n return {\n stop: () => {\n viewportResizeSubscription.unsubscribe();\n },\n };\n}\nfunction trackVisualViewportResize(configuration, visualViewportResizeCb) {\n const visualViewport = window.visualViewport;\n if (!visualViewport) {\n return { stop: noop };\n }\n const { throttled: updateDimension, cancel: cancelThrottle } = throttle(() => {\n visualViewportResizeCb({\n data: getVisualViewport(visualViewport),\n type: RecordType.VisualViewport,\n timestamp: timeStampNow(),\n });\n }, VISUAL_VIEWPORT_OBSERVER_THRESHOLD, {\n trailing: false,\n });\n const { stop: removeListener } = addEventListeners(configuration, visualViewport, [\"resize\" /* DOM_EVENT.RESIZE */, \"scroll\" /* DOM_EVENT.SCROLL */], updateDimension, {\n capture: true,\n passive: true,\n });\n return {\n stop: () => {\n removeListener();\n cancelThrottle();\n },\n };\n}",
2294
+ "originalLength": 1690,
2295
+ "removedExports": [],
2296
+ "renderedExports": [
2297
+ "trackViewportResize",
2298
+ "trackVisualViewportResize"
2299
+ ],
2300
+ "renderedLength": 1298
2301
+ },
2302
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackMediaInteraction.js": {
2303
+ "code": "function trackMediaInteraction(configuration, mediaInteractionCb) {\n return addEventListeners(configuration, document, [\"play\" /* DOM_EVENT.PLAY */, \"pause\" /* DOM_EVENT.PAUSE */], (event) => {\n const target = getEventTarget(event);\n if (!target ||\n getNodePrivacyLevel(target, configuration.defaultPrivacyLevel) === NodePrivacyLevel.HIDDEN ||\n !hasSerializedNode(target)) {\n return;\n }\n mediaInteractionCb(assembleIncrementalSnapshot(IncrementalSource.MediaInteraction, {\n id: getSerializedNodeId(target),\n type: event.type === \"play\" /* DOM_EVENT.PLAY */ ? MediaInteractionType.Play : MediaInteractionType.Pause,\n }));\n }, {\n capture: true,\n passive: true,\n });\n}",
2304
+ "originalLength": 1234,
2305
+ "removedExports": [],
2306
+ "renderedExports": [
2307
+ "trackMediaInteraction"
2308
+ ],
2309
+ "renderedLength": 778
2310
+ },
2311
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackStyleSheet.js": {
2312
+ "code": "function trackStyleSheet(styleSheetCb) {\n function checkStyleSheetAndCallback(styleSheet, callback) {\n if (styleSheet && hasSerializedNode(styleSheet.ownerNode)) {\n callback(getSerializedNodeId(styleSheet.ownerNode));\n }\n }\n const instrumentationStoppers = [\n instrumentMethod(CSSStyleSheet.prototype, 'insertRule', ({ target: styleSheet, parameters: [rule, index] }) => {\n checkStyleSheetAndCallback(styleSheet, (id) => styleSheetCb(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule, {\n id,\n adds: [{ rule, index }],\n })));\n }),\n instrumentMethod(CSSStyleSheet.prototype, 'deleteRule', ({ target: styleSheet, parameters: [index] }) => {\n checkStyleSheetAndCallback(styleSheet, (id) => styleSheetCb(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule, {\n id,\n removes: [{ index }],\n })));\n }),\n ];\n if (typeof CSSGroupingRule !== 'undefined') {\n instrumentGroupingCSSRuleClass(CSSGroupingRule);\n }\n else {\n instrumentGroupingCSSRuleClass(CSSMediaRule);\n instrumentGroupingCSSRuleClass(CSSSupportsRule);\n }\n function instrumentGroupingCSSRuleClass(cls) {\n instrumentationStoppers.push(instrumentMethod(cls.prototype, 'insertRule', ({ target: styleSheet, parameters: [rule, index] }) => {\n checkStyleSheetAndCallback(styleSheet.parentStyleSheet, (id) => {\n const path = getPathToNestedCSSRule(styleSheet);\n if (path) {\n path.push(index || 0);\n styleSheetCb(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule, {\n id,\n adds: [{ rule, index: path }],\n }));\n }\n });\n }), instrumentMethod(cls.prototype, 'deleteRule', ({ target: styleSheet, parameters: [index] }) => {\n checkStyleSheetAndCallback(styleSheet.parentStyleSheet, (id) => {\n const path = getPathToNestedCSSRule(styleSheet);\n if (path) {\n path.push(index);\n styleSheetCb(assembleIncrementalSnapshot(IncrementalSource.StyleSheetRule, {\n id,\n removes: [{ index: path }],\n }));\n }\n });\n }));\n }\n return {\n stop: () => {\n instrumentationStoppers.forEach((stopper) => stopper.stop());\n },\n };\n}\nfunction getPathToNestedCSSRule(rule) {\n const path = [];\n let currentRule = rule;\n while (currentRule.parentRule) {\n const rules = Array.from(currentRule.parentRule.cssRules);\n const index = rules.indexOf(currentRule);\n path.unshift(index);\n currentRule = currentRule.parentRule;\n }\n // A rule may not be attached to a stylesheet\n if (!currentRule.parentStyleSheet) {\n return;\n }\n const rules = Array.from(currentRule.parentStyleSheet.cssRules);\n const index = rules.indexOf(currentRule);\n path.unshift(index);\n return path;\n}",
2313
+ "originalLength": 3471,
2314
+ "removedExports": [],
2315
+ "renderedExports": [
2316
+ "trackStyleSheet",
2317
+ "getPathToNestedCSSRule"
2318
+ ],
2319
+ "renderedLength": 3169
2320
+ },
2321
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackFocus.js": {
2322
+ "code": "function trackFocus(configuration, focusCb) {\n return addEventListeners(configuration, window, [\"focus\" /* DOM_EVENT.FOCUS */, \"blur\" /* DOM_EVENT.BLUR */], () => {\n focusCb({\n data: { has_focus: document.hasFocus() },\n type: RecordType.Focus,\n timestamp: timeStampNow(),\n });\n });\n}",
2323
+ "originalLength": 500,
2324
+ "removedExports": [],
2325
+ "renderedExports": [
2326
+ "trackFocus"
2327
+ ],
2328
+ "renderedLength": 336
2329
+ },
2330
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackFrustration.js": {
2331
+ "code": "function trackFrustration(lifeCycle, frustrationCb, recordIds) {\n const frustrationSubscription = lifeCycle.subscribe(11 /* LifeCycleEventType.RAW_RUM_EVENT_COLLECTED */, (data) => {\n var _a, _b;\n if (data.rawRumEvent.type === \"action\" /* RumEventType.ACTION */ &&\n data.rawRumEvent.action.type === \"click\" /* ActionType.CLICK */ &&\n ((_b = (_a = data.rawRumEvent.action.frustration) === null || _a === void 0 ? void 0 : _a.type) === null || _b === void 0 ? void 0 : _b.length) &&\n 'events' in data.domainContext &&\n data.domainContext.events &&\n data.domainContext.events.length) {\n frustrationCb({\n timestamp: data.rawRumEvent.date,\n type: RecordType.FrustrationRecord,\n data: {\n frustrationTypes: data.rawRumEvent.action.frustration.type,\n recordIds: data.domainContext.events.map((e) => recordIds.getIdForEvent(e)),\n },\n });\n }\n });\n return {\n stop: () => {\n frustrationSubscription.unsubscribe();\n },\n };\n}",
2332
+ "originalLength": 1241,
2333
+ "removedExports": [],
2334
+ "renderedExports": [
2335
+ "trackFrustration"
2336
+ ],
2337
+ "renderedLength": 1144
2338
+ },
2339
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackViewEnd.js": {
2340
+ "code": "function trackViewEnd(lifeCycle, viewEndCb) {\n const viewEndSubscription = lifeCycle.subscribe(4 /* LifeCycleEventType.VIEW_ENDED */, () => {\n viewEndCb({\n timestamp: timeStampNow(),\n type: RecordType.ViewEnd,\n });\n });\n return {\n stop: () => {\n viewEndSubscription.unsubscribe();\n },\n };\n}",
2341
+ "originalLength": 510,
2342
+ "removedExports": [],
2343
+ "renderedExports": [
2344
+ "trackViewEnd"
2345
+ ],
2346
+ "renderedLength": 363
2347
+ },
2348
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackInput.js": {
2349
+ "code": "function trackInput(configuration, inputCb, target = document) {\n const defaultPrivacyLevel = configuration.defaultPrivacyLevel;\n const lastInputStateMap = new WeakMap();\n const isShadowRoot = target !== document;\n const { stop: stopEventListeners } = addEventListeners(configuration, target, \n // The 'input' event bubbles across shadow roots, so we don't have to listen for it on shadow\n // roots since it will be handled by the event listener that we did add to the document. Only\n // the 'change' event is blocked and needs to be handled on shadow roots.\n isShadowRoot ? [\"change\" /* DOM_EVENT.CHANGE */] : [\"input\" /* DOM_EVENT.INPUT */, \"change\" /* DOM_EVENT.CHANGE */], (event) => {\n const target = getEventTarget(event);\n if (target instanceof HTMLInputElement ||\n target instanceof HTMLTextAreaElement ||\n target instanceof HTMLSelectElement) {\n onElementChange(target);\n }\n }, {\n capture: true,\n passive: true,\n });\n let stopPropertySetterInstrumentation;\n if (!isShadowRoot) {\n const instrumentationStoppers = [\n instrumentSetter(HTMLInputElement.prototype, 'value', onElementChange),\n instrumentSetter(HTMLInputElement.prototype, 'checked', onElementChange),\n instrumentSetter(HTMLSelectElement.prototype, 'value', onElementChange),\n instrumentSetter(HTMLTextAreaElement.prototype, 'value', onElementChange),\n instrumentSetter(HTMLSelectElement.prototype, 'selectedIndex', onElementChange),\n ];\n stopPropertySetterInstrumentation = () => {\n instrumentationStoppers.forEach((stopper) => stopper.stop());\n };\n }\n else {\n stopPropertySetterInstrumentation = noop;\n }\n return {\n stop: () => {\n stopPropertySetterInstrumentation();\n stopEventListeners();\n },\n };\n function onElementChange(target) {\n const nodePrivacyLevel = getNodePrivacyLevel(target, defaultPrivacyLevel);\n if (nodePrivacyLevel === NodePrivacyLevel.HIDDEN) {\n return;\n }\n const type = target.type;\n let inputState;\n if (type === 'radio' || type === 'checkbox') {\n if (shouldMaskNode(target, nodePrivacyLevel)) {\n return;\n }\n inputState = { isChecked: target.checked };\n }\n else {\n const value = getElementInputValue(target, nodePrivacyLevel);\n if (value === undefined) {\n return;\n }\n inputState = { text: value };\n }\n // Can be multiple changes on the same node within the same batched mutation observation.\n cbWithDedup(target, inputState);\n // If a radio was checked, other radios with the same name attribute will be unchecked.\n const name = target.name;\n if (type === 'radio' && name && target.checked) {\n document.querySelectorAll(`input[type=\"radio\"][name=\"${CSS.escape(name)}\"]`).forEach((el) => {\n if (el !== target) {\n // TODO: Consider the privacy implications for various differing input privacy levels\n cbWithDedup(el, { isChecked: false });\n }\n });\n }\n }\n /**\n * There can be multiple changes on the same node within the same batched mutation observation.\n */\n function cbWithDedup(target, inputState) {\n if (!hasSerializedNode(target)) {\n return;\n }\n const lastInputState = lastInputStateMap.get(target);\n if (!lastInputState ||\n lastInputState.text !== inputState.text ||\n lastInputState.isChecked !== inputState.isChecked) {\n lastInputStateMap.set(target, inputState);\n inputCb(assembleIncrementalSnapshot(IncrementalSource.Input, {\n id: getSerializedNodeId(target),\n ...inputState,\n }));\n }\n }\n}",
2350
+ "originalLength": 4496,
2351
+ "removedExports": [],
2352
+ "renderedExports": [
2353
+ "trackInput"
2354
+ ],
2355
+ "renderedLength": 4011
2356
+ },
2357
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/mutationBatch.js": {
2358
+ "code": "/**\n * Maximum duration to wait before processing mutations. If the browser is idle, mutations will be\n * processed more quickly. If the browser is busy executing small tasks (ex: rendering frames), the\n * mutations will wait MUTATION_PROCESS_MAX_DELAY milliseconds before being processed. If the\n * browser is busy executing a longer task, mutations will be processed after this task.\n */\nconst MUTATION_PROCESS_MAX_DELAY = 100;\n/**\n * Minimum duration to wait before processing mutations. This is used to batch mutations together\n * and be able to deduplicate them to save processing time and bandwidth.\n * 16ms is the duration of a frame at 60fps that ensure fluid UI.\n */\nconst MUTATION_PROCESS_MIN_DELAY = 16;\nfunction createMutationBatch(processMutationBatch) {\n let cancelScheduledFlush = noop;\n let pendingMutations = [];\n function flush() {\n cancelScheduledFlush();\n processMutationBatch(pendingMutations);\n pendingMutations = [];\n }\n const { throttled: throttledFlush, cancel: cancelThrottle } = throttle(flush, MUTATION_PROCESS_MIN_DELAY, {\n leading: false,\n });\n return {\n addMutations: (mutations) => {\n if (pendingMutations.length === 0) {\n cancelScheduledFlush = requestIdleCallback(throttledFlush, { timeout: MUTATION_PROCESS_MAX_DELAY });\n }\n pendingMutations.push(...mutations);\n },\n flush,\n stop: () => {\n cancelScheduledFlush();\n cancelThrottle();\n },\n };\n}",
2359
+ "originalLength": 1667,
2360
+ "removedExports": [],
2361
+ "renderedExports": [
2362
+ "MUTATION_PROCESS_MIN_DELAY",
2363
+ "createMutationBatch"
2364
+ ],
2365
+ "renderedLength": 1534
2366
+ },
2367
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/trackMutation.js": {
2368
+ "code": "/**\n * Buffers and aggregate mutations generated by a MutationObserver into MutationPayload\n */\nfunction trackMutation(mutationCallback, configuration, shadowRootsController, target) {\n const MutationObserver = getMutationObserverConstructor();\n if (!MutationObserver) {\n return { stop: noop, flush: noop };\n }\n const mutationBatch = createMutationBatch((mutations) => {\n processMutations(mutations.concat(observer.takeRecords()), mutationCallback, configuration, shadowRootsController);\n });\n const observer = new MutationObserver(monitor(mutationBatch.addMutations));\n observer.observe(target, {\n attributeOldValue: true,\n attributes: true,\n characterData: true,\n characterDataOldValue: true,\n childList: true,\n subtree: true,\n });\n return {\n stop: () => {\n observer.disconnect();\n mutationBatch.stop();\n },\n flush: () => {\n mutationBatch.flush();\n },\n };\n}\nfunction processMutations(mutations, mutationCallback, configuration, shadowRootsController) {\n const nodePrivacyLevelCache = new Map();\n mutations\n .filter((mutation) => mutation.type === 'childList')\n .forEach((mutation) => {\n mutation.removedNodes.forEach((removedNode) => {\n traverseRemovedShadowDom(removedNode, shadowRootsController.removeShadowRoot);\n });\n });\n // Discard any mutation with a 'target' node that:\n // * isn't injected in the current document or isn't known/serialized yet: those nodes are likely\n // part of a mutation occurring in a parent Node\n // * should be hidden or ignored\n const filteredMutations = mutations.filter((mutation) => mutation.target.isConnected &&\n nodeAndAncestorsHaveSerializedNode(mutation.target) &&\n getNodePrivacyLevel(mutation.target, configuration.defaultPrivacyLevel, nodePrivacyLevelCache) !==\n NodePrivacyLevel.HIDDEN);\n const { adds, removes, hasBeenSerialized } = processChildListMutations(filteredMutations.filter((mutation) => mutation.type === 'childList'), configuration, shadowRootsController, nodePrivacyLevelCache);\n const texts = processCharacterDataMutations(filteredMutations.filter((mutation) => mutation.type === 'characterData' && !hasBeenSerialized(mutation.target)), configuration, nodePrivacyLevelCache);\n const attributes = processAttributesMutations(filteredMutations.filter((mutation) => mutation.type === 'attributes' && !hasBeenSerialized(mutation.target)), configuration, nodePrivacyLevelCache);\n if (!texts.length && !attributes.length && !removes.length && !adds.length) {\n return;\n }\n mutationCallback(assembleIncrementalSnapshot(IncrementalSource.Mutation, { adds, removes, texts, attributes }));\n}\nfunction processChildListMutations(mutations, configuration, shadowRootsController, nodePrivacyLevelCache) {\n // First, we iterate over mutations to collect:\n //\n // * nodes that have been added in the document and not removed by a subsequent mutation\n // * nodes that have been removed from the document but were not added in a previous mutation\n //\n // For this second category, we also collect their previous parent (mutation.target) because we'll\n // need it to emit a 'remove' mutation.\n //\n // Those two categories may overlap: if a node moved from a position to another, it is reported as\n // two mutation records, one with a \"removedNodes\" and the other with \"addedNodes\". In this case,\n // the node will be in both sets.\n const addedAndMovedNodes = new Set();\n const removedNodes = new Map();\n for (const mutation of mutations) {\n mutation.addedNodes.forEach((node) => {\n addedAndMovedNodes.add(node);\n });\n mutation.removedNodes.forEach((node) => {\n if (!addedAndMovedNodes.has(node)) {\n removedNodes.set(node, mutation.target);\n }\n addedAndMovedNodes.delete(node);\n });\n }\n // Then, we sort nodes that are still in the document by topological order, for two reasons:\n //\n // * We will serialize each added nodes with their descendants. We don't want to serialize a node\n // twice, so we need to iterate over the parent nodes first and skip any node that is contained in\n // a precedent node.\n //\n // * To emit \"add\" mutations, we need references to the parent and potential next sibling of each\n // added node. So we need to iterate over the parent nodes first, and when multiple nodes are\n // siblings, we want to iterate from last to first. This will ensure that any \"next\" node is\n // already serialized and have an id.\n const sortedAddedAndMovedNodes = Array.from(addedAndMovedNodes);\n sortAddedAndMovedNodes(sortedAddedAndMovedNodes);\n // Then, we iterate over our sorted node sets to emit mutations. We collect the newly serialized\n // node ids in a set to be able to skip subsequent related mutations.\n const serializedNodeIds = new Set();\n const addedNodeMutations = [];\n for (const node of sortedAddedAndMovedNodes) {\n if (hasBeenSerialized(node)) {\n continue;\n }\n const parentNodePrivacyLevel = getNodePrivacyLevel(node.parentNode, configuration.defaultPrivacyLevel, nodePrivacyLevelCache);\n if (parentNodePrivacyLevel === NodePrivacyLevel.HIDDEN || parentNodePrivacyLevel === NodePrivacyLevel.IGNORE) {\n continue;\n }\n const serializedNode = serializeNodeWithId(node, {\n serializedNodeIds,\n parentNodePrivacyLevel,\n serializationContext: { status: 2 /* SerializationContextStatus.MUTATION */, shadowRootsController },\n configuration,\n });\n if (!serializedNode) {\n continue;\n }\n const parentNode = getParentNode(node);\n addedNodeMutations.push({\n nextId: getNextSibling(node),\n parentId: getSerializedNodeId(parentNode),\n node: serializedNode,\n });\n }\n // Finally, we emit remove mutations.\n const removedNodeMutations = [];\n removedNodes.forEach((parent, node) => {\n if (hasSerializedNode(node)) {\n removedNodeMutations.push({\n parentId: getSerializedNodeId(parent),\n id: getSerializedNodeId(node),\n });\n }\n });\n return { adds: addedNodeMutations, removes: removedNodeMutations, hasBeenSerialized };\n function hasBeenSerialized(node) {\n return hasSerializedNode(node) && serializedNodeIds.has(getSerializedNodeId(node));\n }\n function getNextSibling(node) {\n let nextSibling = node.nextSibling;\n while (nextSibling) {\n if (hasSerializedNode(nextSibling)) {\n return getSerializedNodeId(nextSibling);\n }\n nextSibling = nextSibling.nextSibling;\n }\n return null;\n }\n}\nfunction processCharacterDataMutations(mutations, configuration, nodePrivacyLevelCache) {\n var _a;\n const textMutations = [];\n // Deduplicate mutations based on their target node\n const handledNodes = new Set();\n const filteredMutations = mutations.filter((mutation) => {\n if (handledNodes.has(mutation.target)) {\n return false;\n }\n handledNodes.add(mutation.target);\n return true;\n });\n // Emit mutations\n for (const mutation of filteredMutations) {\n const value = mutation.target.textContent;\n if (value === mutation.oldValue) {\n continue;\n }\n const parentNodePrivacyLevel = getNodePrivacyLevel(getParentNode(mutation.target), configuration.defaultPrivacyLevel, nodePrivacyLevelCache);\n if (parentNodePrivacyLevel === NodePrivacyLevel.HIDDEN || parentNodePrivacyLevel === NodePrivacyLevel.IGNORE) {\n continue;\n }\n textMutations.push({\n id: getSerializedNodeId(mutation.target),\n // TODO: pass a valid \"ignoreWhiteSpace\" argument\n value: (_a = getTextContent(mutation.target, false, parentNodePrivacyLevel)) !== null && _a !== void 0 ? _a : null,\n });\n }\n return textMutations;\n}\nfunction processAttributesMutations(mutations, configuration, nodePrivacyLevelCache) {\n const attributeMutations = [];\n // Deduplicate mutations based on their target node and changed attribute\n const handledElements = new Map();\n const filteredMutations = mutations.filter((mutation) => {\n const handledAttributes = handledElements.get(mutation.target);\n if (handledAttributes && handledAttributes.has(mutation.attributeName)) {\n return false;\n }\n if (!handledAttributes) {\n handledElements.set(mutation.target, new Set([mutation.attributeName]));\n }\n else {\n handledAttributes.add(mutation.attributeName);\n }\n return true;\n });\n // Emit mutations\n const emittedMutations = new Map();\n for (const mutation of filteredMutations) {\n const uncensoredValue = mutation.target.getAttribute(mutation.attributeName);\n if (uncensoredValue === mutation.oldValue) {\n continue;\n }\n const privacyLevel = getNodePrivacyLevel(mutation.target, configuration.defaultPrivacyLevel, nodePrivacyLevelCache);\n const attributeValue = serializeAttribute(mutation.target, privacyLevel, mutation.attributeName, configuration);\n let transformedValue;\n if (mutation.attributeName === 'value') {\n const inputValue = getElementInputValue(mutation.target, privacyLevel);\n if (inputValue === undefined) {\n continue;\n }\n transformedValue = inputValue;\n }\n else if (typeof attributeValue === 'string') {\n transformedValue = attributeValue;\n }\n else {\n transformedValue = null;\n }\n let emittedMutation = emittedMutations.get(mutation.target);\n if (!emittedMutation) {\n emittedMutation = {\n id: getSerializedNodeId(mutation.target),\n attributes: {},\n };\n attributeMutations.push(emittedMutation);\n emittedMutations.set(mutation.target, emittedMutation);\n }\n emittedMutation.attributes[mutation.attributeName] = transformedValue;\n }\n return attributeMutations;\n}\nfunction sortAddedAndMovedNodes(nodes) {\n nodes.sort((a, b) => {\n const position = a.compareDocumentPosition(b);\n /* eslint-disable no-bitwise */\n if (position & Node.DOCUMENT_POSITION_CONTAINED_BY) {\n return -1;\n }\n else if (position & Node.DOCUMENT_POSITION_CONTAINS) {\n return 1;\n }\n else if (position & Node.DOCUMENT_POSITION_FOLLOWING) {\n return 1;\n }\n else if (position & Node.DOCUMENT_POSITION_PRECEDING) {\n return -1;\n }\n /* eslint-enable no-bitwise */\n return 0;\n });\n}\nfunction traverseRemovedShadowDom(removedNode, shadowDomRemovedCallback) {\n if (isNodeShadowHost(removedNode)) {\n shadowDomRemovedCallback(removedNode.shadowRoot);\n }\n forEachChildNodes(removedNode, (childNode) => traverseRemovedShadowDom(childNode, shadowDomRemovedCallback));\n}",
2369
+ "originalLength": 11972,
2370
+ "removedExports": [],
2371
+ "renderedExports": [
2372
+ "trackMutation",
2373
+ "sortAddedAndMovedNodes"
2374
+ ],
2375
+ "renderedLength": 11335
2376
+ },
2377
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/trackers/index.js": {
2378
+ "code": null,
2379
+ "originalLength": 627,
2380
+ "removedExports": [],
2381
+ "renderedExports": [],
2382
+ "renderedLength": 0
2383
+ },
2384
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/elementsScrollPositions.js": {
2385
+ "code": "function createElementsScrollPositions() {\n const scrollPositionsByElement = new WeakMap();\n return {\n set(element, scrollPositions) {\n if (element === document && !document.scrollingElement) {\n // cf https://drafts.csswg.org/cssom-view/#dom-document-scrollingelement,\n // in some cases scrolling elements can not be defined, we don't support those for now\n return;\n }\n scrollPositionsByElement.set(element === document ? document.scrollingElement : element, scrollPositions);\n },\n get(element) {\n return scrollPositionsByElement.get(element);\n },\n has(element) {\n return scrollPositionsByElement.has(element);\n },\n };\n}",
2386
+ "originalLength": 830,
2387
+ "removedExports": [],
2388
+ "renderedExports": [
2389
+ "createElementsScrollPositions"
2390
+ ],
2391
+ "renderedLength": 771
2392
+ },
2393
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/shadowRootsController.js": {
2394
+ "code": "const initShadowRootsController = (configuration, callback, elementsScrollPositions) => {\n const controllerByShadowRoot = new Map();\n const shadowRootsController = {\n addShadowRoot: (shadowRoot) => {\n if (controllerByShadowRoot.has(shadowRoot)) {\n return;\n }\n const mutationTracker = trackMutation(callback, configuration, shadowRootsController, shadowRoot);\n // The change event does not bubble up across the shadow root, we have to listen on the shadow root\n const inputTracker = trackInput(configuration, callback, shadowRoot);\n // The scroll event does not bubble up across the shadow root, we have to listen on the shadow root\n const scrollTracker = trackScroll(configuration, callback, elementsScrollPositions, shadowRoot);\n controllerByShadowRoot.set(shadowRoot, {\n flush: () => mutationTracker.flush(),\n stop: () => {\n mutationTracker.stop();\n inputTracker.stop();\n scrollTracker.stop();\n },\n });\n },\n removeShadowRoot: (shadowRoot) => {\n const entry = controllerByShadowRoot.get(shadowRoot);\n if (!entry) {\n // unidentified root cause: observed in some cases with shadow DOM added by browser extensions\n return;\n }\n entry.stop();\n controllerByShadowRoot.delete(shadowRoot);\n },\n stop: () => {\n controllerByShadowRoot.forEach(({ stop }) => stop());\n },\n flush: () => {\n controllerByShadowRoot.forEach(({ flush }) => flush());\n },\n };\n return shadowRootsController;\n};",
2395
+ "originalLength": 1892,
2396
+ "removedExports": [],
2397
+ "renderedExports": [
2398
+ "initShadowRootsController"
2399
+ ],
2400
+ "renderedLength": 1766
2401
+ },
2402
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/startFullSnapshots.js": {
2403
+ "code": "function startFullSnapshots(elementsScrollPositions, shadowRootsController, lifeCycle, configuration, flushMutations, fullSnapshotCallback) {\n const takeFullSnapshot = (timestamp = timeStampNow(), serializationContext = {\n status: 0 /* SerializationContextStatus.INITIAL_FULL_SNAPSHOT */,\n elementsScrollPositions,\n shadowRootsController,\n }) => {\n const { width, height } = getViewportDimension();\n const records = [\n {\n data: {\n height,\n href: window.location.href,\n width,\n },\n type: RecordType.Meta,\n timestamp,\n },\n {\n data: {\n has_focus: document.hasFocus(),\n },\n type: RecordType.Focus,\n timestamp,\n },\n {\n data: {\n node: serializeDocument(document, configuration, serializationContext),\n initialOffset: {\n left: getScrollX(),\n top: getScrollY(),\n },\n },\n type: RecordType.FullSnapshot,\n timestamp,\n },\n ];\n if (window.visualViewport) {\n records.push({\n data: getVisualViewport(window.visualViewport),\n type: RecordType.VisualViewport,\n timestamp,\n });\n }\n return records;\n };\n fullSnapshotCallback(takeFullSnapshot());\n const { unsubscribe } = lifeCycle.subscribe(2 /* LifeCycleEventType.VIEW_CREATED */, (view) => {\n flushMutations();\n fullSnapshotCallback(takeFullSnapshot(view.startClocks.timeStamp, {\n shadowRootsController,\n status: 1 /* SerializationContextStatus.SUBSEQUENT_FULL_SNAPSHOT */,\n elementsScrollPositions,\n }));\n });\n return {\n stop: unsubscribe,\n };\n}",
2404
+ "originalLength": 2361,
2405
+ "removedExports": [],
2406
+ "renderedExports": [
2407
+ "startFullSnapshots"
2408
+ ],
2409
+ "renderedLength": 2019
2410
+ },
2411
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/recordIds.js": {
2412
+ "code": "function initRecordIds() {\n const recordIds = new WeakMap();\n let nextId = 1;\n return {\n getIdForEvent(event) {\n if (!recordIds.has(event)) {\n recordIds.set(event, nextId++);\n }\n return recordIds.get(event);\n },\n };\n}",
2413
+ "originalLength": 336,
2414
+ "removedExports": [],
2415
+ "renderedExports": [
2416
+ "initRecordIds"
2417
+ ],
2418
+ "renderedLength": 291
2419
+ },
2420
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/record.js": {
2421
+ "code": "function record(options) {\n const { emit, configuration, lifeCycle } = options;\n // runtime checks for user options\n if (!emit) {\n throw new Error('emit function is required');\n }\n const emitAndComputeStats = (record) => {\n emit(record);\n sendToExtension('record', { record });\n const view = options.viewHistory.findView();\n addRecord(view.id);\n };\n const elementsScrollPositions = createElementsScrollPositions();\n const shadowRootsController = initShadowRootsController(configuration, emitAndComputeStats, elementsScrollPositions);\n const { stop: stopFullSnapshots } = startFullSnapshots(elementsScrollPositions, shadowRootsController, lifeCycle, configuration, flushMutations, (records) => records.forEach((record) => emitAndComputeStats(record)));\n function flushMutations() {\n shadowRootsController.flush();\n mutationTracker.flush();\n }\n const recordIds = initRecordIds();\n const mutationTracker = trackMutation(emitAndComputeStats, configuration, shadowRootsController, document);\n const trackers = [\n mutationTracker,\n trackMove(configuration, emitAndComputeStats),\n trackMouseInteraction(configuration, emitAndComputeStats, recordIds),\n trackScroll(configuration, emitAndComputeStats, elementsScrollPositions, document),\n trackViewportResize(configuration, emitAndComputeStats),\n trackInput(configuration, emitAndComputeStats),\n trackMediaInteraction(configuration, emitAndComputeStats),\n trackStyleSheet(emitAndComputeStats),\n trackFocus(configuration, emitAndComputeStats),\n trackVisualViewportResize(configuration, emitAndComputeStats),\n trackFrustration(lifeCycle, emitAndComputeStats, recordIds),\n trackViewEnd(lifeCycle, (viewEndRecord) => {\n flushMutations();\n emitAndComputeStats(viewEndRecord);\n }),\n ];\n return {\n stop: () => {\n shadowRootsController.stop();\n trackers.forEach((tracker) => tracker.stop());\n stopFullSnapshots();\n },\n flushMutations,\n shadowRootsController,\n };\n}",
2422
+ "originalLength": 2813,
2423
+ "removedExports": [],
2424
+ "renderedExports": [
2425
+ "record"
2426
+ ],
2427
+ "renderedLength": 2171
2428
+ },
2429
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/record/index.js": {
2430
+ "code": null,
2431
+ "originalLength": 217,
2432
+ "removedExports": [],
2433
+ "renderedExports": [],
2434
+ "renderedLength": 0
2435
+ },
2436
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/segmentCollection/buildReplayPayload.js": {
2437
+ "code": "function buildReplayPayload(data, metadata, rawSegmentBytesCount) {\n const formData = new FormData();\n formData.append('segment', new Blob([data], {\n type: 'application/octet-stream',\n }), `${metadata.session.id}-${metadata.start}`);\n const metadataAndSegmentSizes = {\n raw_segment_size: rawSegmentBytesCount,\n compressed_segment_size: data.byteLength,\n ...metadata,\n };\n const serializedMetadataAndSegmentSizes = JSON.stringify(metadataAndSegmentSizes);\n formData.append('event', new Blob([serializedMetadataAndSegmentSizes], { type: 'application/json' }));\n return { data: formData, bytesCount: data.byteLength };\n}",
2438
+ "originalLength": 723,
2439
+ "removedExports": [],
2440
+ "renderedExports": [
2441
+ "buildReplayPayload"
2442
+ ],
2443
+ "renderedLength": 669
2444
+ },
2445
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/segmentCollection/segment.js": {
2446
+ "code": "function createSegment({ context, creationReason, encoder, }) {\n let encodedBytesCount = 0;\n const viewId = context.view.id;\n const metadata = {\n start: Infinity,\n end: -Infinity,\n creation_reason: creationReason,\n records_count: 0,\n has_full_snapshot: false,\n index_in_view: getSegmentsCount(viewId),\n source: 'browser',\n ...context,\n };\n addSegment(viewId);\n function addRecord(record, callback) {\n metadata.start = Math.min(metadata.start, record.timestamp);\n metadata.end = Math.max(metadata.end, record.timestamp);\n metadata.records_count += 1;\n metadata.has_full_snapshot || (metadata.has_full_snapshot = record.type === RecordType.FullSnapshot);\n const prefix = encoder.isEmpty ? '{\"records\":[' : ',';\n encoder.write(prefix + JSON.stringify(record), (additionalEncodedBytesCount) => {\n encodedBytesCount += additionalEncodedBytesCount;\n callback(encodedBytesCount);\n });\n }\n function flush(callback) {\n if (encoder.isEmpty) {\n throw new Error('Empty segment flushed');\n }\n encoder.write(`],${JSON.stringify(metadata).slice(1)}\\n`);\n encoder.finish((encoderResult) => {\n addWroteData(metadata.view.id, encoderResult.rawBytesCount);\n callback(metadata, encoderResult);\n });\n }\n return { addRecord, flush };\n}",
2447
+ "originalLength": 1606,
2448
+ "removedExports": [],
2449
+ "renderedExports": [
2450
+ "createSegment"
2451
+ ],
2452
+ "renderedLength": 1438
2453
+ },
2454
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/segmentCollection/segmentCollection.js": {
2455
+ "code": "const SEGMENT_DURATION_LIMIT = 5 * ONE_SECOND;\n/**\n * beacon payload max queue size implementation is 64kb\n * ensure that we leave room for logs, rum and potential other users\n */\nlet SEGMENT_BYTES_LIMIT = 60000;\n// Segments are the main data structure for session replays. They contain context information used\n// for indexing or UI needs, and a list of records (RRWeb 'events', renamed to avoid confusing\n// namings). They are stored without any processing from the intake, and fetched one after the\n// other while a session is being replayed. Their encoding (deflate) are carefully crafted to allow\n// concatenating multiple segments together. Segments have a size overhead (metadata), so our goal is to\n// build segments containing as many records as possible while complying with the various flush\n// strategies to guarantee a good replay quality.\n//\n// When the recording starts, a segment is initially created. The segment is flushed (finalized and\n// sent) based on various events (non-exhaustive list):\n//\n// * the page visibility change or becomes to unload\n// * the segment duration reaches a limit\n// * the encoded segment bytes count reaches a limit\n// * ...\n//\n// A segment cannot be created without its context. If the RUM session ends and no session id is\n// available when creating a new segment, records will be ignored, until the session is renewed and\n// a new session id is available.\n//\n// Empty segments (segments with no record) aren't useful and should be ignored.\n//\n// To help investigate session replays issues, each segment is created with a \"creation reason\",\n// indicating why the session has been created.\nfunction startSegmentCollection(lifeCycle, configuration, sessionManager, viewHistory, httpRequest, encoder) {\n return doStartSegmentCollection(lifeCycle, () => computeSegmentContext(configuration.applicationId, sessionManager, viewHistory), httpRequest, encoder);\n}\nfunction doStartSegmentCollection(lifeCycle, getSegmentContext, httpRequest, encoder) {\n let state = {\n status: 0 /* SegmentCollectionStatus.WaitingForInitialRecord */,\n nextSegmentCreationReason: 'init',\n };\n const { unsubscribe: unsubscribeViewCreated } = lifeCycle.subscribe(2 /* LifeCycleEventType.VIEW_CREATED */, () => {\n flushSegment('view_change');\n });\n const { unsubscribe: unsubscribePageExited } = lifeCycle.subscribe(10 /* LifeCycleEventType.PAGE_EXITED */, (pageExitEvent) => {\n flushSegment(pageExitEvent.reason);\n });\n function flushSegment(flushReason) {\n if (state.status === 1 /* SegmentCollectionStatus.SegmentPending */) {\n state.segment.flush((metadata, encoderResult) => {\n const payload = buildReplayPayload(encoderResult.output, metadata, encoderResult.rawBytesCount);\n if (isPageExitReason(flushReason)) {\n httpRequest.sendOnExit(payload);\n }\n else {\n httpRequest.send(payload);\n }\n });\n clearTimeout(state.expirationTimeoutId);\n }\n if (flushReason !== 'stop') {\n state = {\n status: 0 /* SegmentCollectionStatus.WaitingForInitialRecord */,\n nextSegmentCreationReason: flushReason,\n };\n }\n else {\n state = {\n status: 2 /* SegmentCollectionStatus.Stopped */,\n };\n }\n }\n return {\n addRecord: (record) => {\n if (state.status === 2 /* SegmentCollectionStatus.Stopped */) {\n return;\n }\n if (state.status === 0 /* SegmentCollectionStatus.WaitingForInitialRecord */) {\n const context = getSegmentContext();\n if (!context) {\n return;\n }\n state = {\n status: 1 /* SegmentCollectionStatus.SegmentPending */,\n segment: createSegment({ encoder, context, creationReason: state.nextSegmentCreationReason }),\n expirationTimeoutId: setTimeout(() => {\n flushSegment('segment_duration_limit');\n }, SEGMENT_DURATION_LIMIT),\n };\n }\n state.segment.addRecord(record, (encodedBytesCount) => {\n if (encodedBytesCount > SEGMENT_BYTES_LIMIT) {\n flushSegment('segment_bytes_limit');\n }\n });\n },\n stop: () => {\n flushSegment('stop');\n unsubscribeViewCreated();\n unsubscribePageExited();\n },\n };\n}\nfunction computeSegmentContext(applicationId, sessionManager, viewHistory) {\n const session = sessionManager.findTrackedSession();\n const viewContext = viewHistory.findView();\n if (!session || !viewContext) {\n return undefined;\n }\n return {\n application: {\n id: applicationId,\n },\n session: {\n id: session.id,\n },\n view: {\n id: viewContext.id,\n },\n };\n}",
2456
+ "originalLength": 5473,
2457
+ "removedExports": [
2458
+ "setSegmentBytesLimit"
2459
+ ],
2460
+ "renderedExports": [
2461
+ "SEGMENT_DURATION_LIMIT",
2462
+ "SEGMENT_BYTES_LIMIT",
2463
+ "startSegmentCollection",
2464
+ "doStartSegmentCollection",
2465
+ "computeSegmentContext"
2466
+ ],
2467
+ "renderedLength": 5075
2468
+ },
2469
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/segmentCollection/index.js": {
2470
+ "code": null,
2471
+ "originalLength": 176,
2472
+ "removedExports": [],
2473
+ "renderedExports": [],
2474
+ "renderedLength": 0
2475
+ },
2476
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/domain/startRecordBridge.js": {
2477
+ "code": "function startRecordBridge(viewHistory) {\n const bridge = getEventBridge();\n return {\n addRecord: (record) => {\n // Get the current active view, not at the time of the record, aligning with the segment logic.\n // This approach could potentially associate the record to an incorrect view, in case the record date is in the past (e.g. frustration records).\n // However the risk is minimal. We could address the issue when potential negative impact are identified.\n const view = viewHistory.findView();\n bridge.send('record', record, view.id);\n },\n };\n}",
2478
+ "originalLength": 737,
2479
+ "removedExports": [],
2480
+ "renderedExports": [
2481
+ "startRecordBridge"
2482
+ ],
2483
+ "renderedLength": 628
2484
+ },
2485
+ "/home/runner/work/build-plugins/build-plugins/node_modules/@datadog/browser-rum/esm/boot/startRecording.js": {
2486
+ "code": "function startRecording(lifeCycle, configuration, sessionManager, viewHistory, encoder, httpRequest) {\n const cleanupTasks = [];\n const reportError = (error) => {\n lifeCycle.notify(13 /* LifeCycleEventType.RAW_ERROR_COLLECTED */, { error });\n addTelemetryDebug('Error reported to customer', { 'error.message': error.message });\n };\n const replayRequest = httpRequest || createHttpRequest(configuration.sessionReplayEndpointBuilder, SEGMENT_BYTES_LIMIT, reportError);\n let addRecord;\n if (!canUseEventBridge()) {\n const segmentCollection = startSegmentCollection(lifeCycle, configuration, sessionManager, viewHistory, replayRequest, encoder);\n addRecord = segmentCollection.addRecord;\n cleanupTasks.push(segmentCollection.stop);\n }\n else {\n ({ addRecord } = startRecordBridge(viewHistory));\n }\n const { stop: stopRecording } = record({\n emit: addRecord,\n configuration,\n lifeCycle,\n viewHistory,\n });\n cleanupTasks.push(stopRecording);\n return {\n stop: () => {\n cleanupTasks.forEach((task) => task());\n },\n };\n}",
2487
+ "originalLength": 1503,
2488
+ "removedExports": [],
2489
+ "renderedExports": [
2490
+ "startRecording"
2491
+ ],
2492
+ "renderedLength": 1147
2493
+ }
2494
+ },
2495
+ "referencedFiles": [],
2496
+ "code": "\"use strict\";const t={log:\"log\",debug:\"debug\",info:\"info\",warn:\"warn\",error:\"error\"},e=console,n={};Object.keys(t).forEach((t=>{n[t]=e[t]}));const r=\"Datadog Browser SDK:\",o={debug:n.debug.bind(e,r),log:n.log.bind(e,r),info:n.info.bind(e,r),warn:n.warn.bind(e,r),error:n.error.bind(e,r)},i=\"https://docs.datadoghq.com\",s=`${i}/real_user_monitoring/browser/troubleshooting`,a=\"More details:\";function c(t,e){return(...n)=>{try{return t(...n)}catch(t){o.error(e,t)}}}function u(t){return 0!==t&&100*Math.random()<=t}function l(t,e){return+t.toFixed(e)}function d(t){return\"number\"==typeof t}const f=1e3,p=6e4,h=31536e6;function m(t){return{relative:t,timeStamp:g(t)}}function g(t){const e=y()-performance.now();return e>E()?Math.round(C(e,t)):function(t){return Math.round(C(E(),t))}(t)}function v(t){return d(t)?l(1e6*t,0):t}function y(){return(new Date).getTime()}function _(){return y()}function b(){return performance.now()}function w(){return{relative:b(),timeStamp:_()}}function S(){return{relative:0,timeStamp:E()}}function k(t,e){return e-t}function C(t,e){return t+e}function x(t){return t-E()}let T;function E(){return void 0===T&&(T=performance.timing.navigationStart),T}const A=1024,R=/[^\\u0000-\\u007F]/;function I(t){return R.test(t)?void 0!==window.TextEncoder?(new TextEncoder).encode(t).length:new Blob([t]).size:t.length}function N(t){return{...t}}function O(t,e){return Object.keys(t).some((n=>t[n]===e))}function L(t){return 0===Object.keys(t).length}function M(){if(\"object\"==typeof globalThis)return globalThis;Object.defineProperty(Object.prototype,\"_dd_temp_\",{get(){return this},configurable:!0});let t=_dd_temp_;return delete Object.prototype._dd_temp_,\"object\"!=typeof t&&(t=\"object\"==typeof self?self:\"object\"==typeof window?window:{}),t}function D(t,e){const n=M();let r;return n.Zone&&\"function\"==typeof n.Zone.__symbol__&&(r=t[n.Zone.__symbol__(e)]),r||(r=t[e]),r}let P,U=!1;function $(t){U=t}function z(t){return function(){return B(t,this,arguments)}}function B(t,e,n){try{return t.apply(e,n)}catch(t){V(t)}}function V(t){if(F(t),P)try{P(t)}catch(t){F(t)}}function F(...t){U&&o.error(\"[MONITOR]\",...t)}function j(t,e){return D(M(),\"setTimeout\")(z(t),e)}function q(t){D(M(),\"clearTimeout\")(t)}function H(t,e){return D(M(),\"setInterval\")(z(t),e)}function G(t){D(M(),\"clearInterval\")(t)}class W{constructor(t){this.onFirstSubscribe=t,this.observers=[]}subscribe(t){return this.observers.push(t),1===this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0),{unsubscribe:()=>{this.observers=this.observers.filter((e=>t!==e)),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}}}notify(t){this.observers.forEach((e=>e(t)))}}function K(...t){return new W((e=>{const n=t.map((t=>t.subscribe((t=>e.notify(t)))));return()=>n.forEach((t=>t.unsubscribe()))}))}function J(t,e,n){const r=!n||void 0===n.leading||n.leading,o=!n||void 0===n.trailing||n.trailing;let i,s,a=!1;return{throttled:(...n)=>{a?i=n:(r?t(...n):i=n,a=!0,s=j((()=>{o&&i&&t(...i),a=!1,i=void 0}),e))},cancel:()=>{q(s),a=!1,i=void 0}}}function X(){}function Y(t){return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):\"10000000-1000-4000-8000-100000000000\".replace(/[018]/g,Y)}const Z=/([\\w-]+)\\s*=\\s*([^;]+)/g;function Q(t,e){for(Z.lastIndex=0;;){const n=Z.exec(t);if(!n)break;if(n[1]===e)return n[2]}}function tt(t,e,n=\"\"){const r=t.charCodeAt(e-1),o=r>=55296&&r<=56319?e+1:e;return t.length<=o?t:`${t.slice(0,o)}${n}`}let et,nt,rt;function ot(){return null!=et?et:et=function(t=window){var e;const n=t.navigator.userAgent;if(t.chrome||/HeadlessChrome/.test(n))return 0;if(0===(null===(e=t.navigator.vendor)||void 0===e?void 0:e.indexOf(\"Apple\"))||/safari/i.test(n)&&!/chrome|android/i.test(n))return 1;return 2}()}function it(t,e,n=0,r){const o=new Date;o.setTime(o.getTime()+n);const i=`expires=${o.toUTCString()}`,s=r&&r.crossSite?\"none\":\"strict\",a=r&&r.domain?`;domain=${r.domain}`:\"\",c=r&&r.secure?\";secure\":\"\",u=r&&r.partitioned?\";partitioned\":\"\";document.cookie=`${t}=${e};${i};path=/;samesite=${s}${a}${c}${u}`}function st(t){return Q(document.cookie,t)}function at(t){return nt||(nt=function(t){const e=new Map;for(Z.lastIndex=0;;){const n=Z.exec(t);if(!n)break;e.set(n[1],n[2])}return e}(document.cookie)),nt.get(t)}function ct(t,e){it(t,\"\",0,e)}const ut=\"_dd_s\";function lt(t){return Object.values(t)}function dt(t){return Object.entries(t)}function ft(t){return null===t?\"null\":Array.isArray(t)?\"array\":typeof t}function pt(t){const e={...t};return[\"id\",\"name\",\"email\"].forEach((t=>{t in e&&(e[t]=String(e[t]))})),e}const ht=144e5,mt=9e5,gt=h,vt=\"cookie\",yt=\"local-storage\",_t=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function bt(t,e){const n={isExpired:\"1\"};return e.trackAnonymousUser&&((null==t?void 0:t.anonymousId)?n.anonymousId=null==t?void 0:t.anonymousId:n.anonymousId=Math.floor(Math.random()*Math.pow(36,10)).toString(36).padStart(10,\"0\")),n}function wt(t){return L(t)}function St(t){return!wt(t)}function kt(t){return void 0!==t.isExpired||!((void 0===(e=t).created||y()-Number(e.created)<ht)&&(void 0===e.expire||y()<Number(e.expire)));var e}function Ct(t){t.expire=String(y()+mt)}function xt(t){return dt(t).map((([t,e])=>\"anonymousId\"===t?`aid=${e}`:`${t}=${e}`)).join(\"&\")}function Tt(t){const e={};return function(t){return!!t&&(-1!==t.indexOf(\"&\")||_t.test(t))}(t)&&t.split(\"&\").forEach((t=>{const n=_t.exec(t);if(null!==n){const[,t,r]=n;\"aid\"===t?e.anonymousId=r:e[t]=r}})),e}function Et(t){const e=function(t){const e={};e.secure=!!t.useSecureSessionCookie||!!t.usePartitionedCrossSiteSessionCookie,e.crossSite=!!t.usePartitionedCrossSiteSessionCookie,e.partitioned=!!t.usePartitionedCrossSiteSessionCookie,t.trackSessionAcrossSubdomains&&(e.domain=function(){if(void 0===rt){const t=`dd_site_test_${Y()}`,e=\"test\",n=window.location.hostname.split(\".\");let r=n.pop();for(;n.length&&!st(t);)r=`${n.pop()}.${r}`,it(t,e,f,{domain:r});ct(t,{domain:r}),rt=r}return rt}());return e}(t);return function(t){if(void 0===document.cookie||null===document.cookie)return!1;try{const e=`dd_cookie_test_${Y()}`,n=\"test\";it(e,n,p,t);const r=st(e)===n;return ct(e,t),r}catch(t){return o.error(t),!1}}(e)?{type:vt,cookieOptions:e}:void 0}function At(t,e){const n={isLockEnabled:0===ot(),persistSession:(r=e,t=>{it(ut,xt(t),mt,r)}),retrieveSession:Rt,expireSession:n=>function(t,e,n){const r=bt(e,n);it(ut,xt(r),n.trackAnonymousUser?gt:ht,t)}(e,n,t)};var r;return function(t){if(!at(ut)){const e=at(\"_dd\"),n=at(\"_dd_r\"),r=at(\"_dd_l\"),o={};e&&(o.id=e),r&&/^[01]$/.test(r)&&(o.logs=r),n&&/^[012]$/.test(n)&&(o.rum=n),St(o)&&(Ct(o),t.persistSession(o))}}(n),n}function Rt(){return Tt(st(ut))}function It(){try{const t=Y(),e=`_dd_test_${t}`;localStorage.setItem(e,t);const n=localStorage.getItem(e);return localStorage.removeItem(e),t===n?{type:yt}:void 0}catch(t){return}}function Nt(t){return{isLockEnabled:!1,persistSession:Ot,retrieveSession:Lt,expireSession:e=>function(t,e){Ot(bt(t,e))}(e,t)}}function Ot(t){localStorage.setItem(ut,xt(t))}function Lt(){return Tt(localStorage.getItem(ut))}const Mt=[];let Dt;function Pt(t,e,n=0){var r;const{isLockEnabled:o,persistSession:i,expireSession:s}=e,a=t=>i({...t,lock:u}),c=()=>{const t=e.retrieveSession(),n=t.lock;return t.lock&&delete t.lock,{session:t,lock:n}};if(Dt||(Dt=t),t!==Dt)return void Mt.push(t);if(o&&n>=100)return void $t(e);let u,l=c();if(o){if(l.lock)return void Ut(t,e,n);if(u=Y(),a(l.session),l=c(),l.lock!==u)return void Ut(t,e,n)}let d=t.process(l.session);if(o&&(l=c(),l.lock!==u))Ut(t,e,n);else{if(d&&(kt(d)?s(d):(Ct(d),o?a(d):i(d))),o&&(!d||!kt(d))){if(l=c(),l.lock!==u)return void Ut(t,e,n);i(l.session),d=l.session}null===(r=t.after)||void 0===r||r.call(t,d||l.session),$t(e)}}function Ut(t,e,n){j((()=>{Pt(t,e,n+1)}),10)}function $t(t){Dt=void 0;const e=Mt.shift();e&&Pt(e,t)}const zt=f;function Bt(t){switch(t.sessionPersistence){case vt:return Et(t);case yt:return It();case void 0:{let e=Et(t);return!e&&t.allowFallbackToLocalStorage&&(e=It()),e}default:o.error(`Invalid session persistence '${String(t.sessionPersistence)}'`)}}function Vt(t,e,n,r){const o=new W,i=new W,s=new W,a=t.type===vt?At(e,t.cookieOptions):Nt(e),{expireSession:c}=a,u=H((function(){Pt({process:t=>kt(t)?bt(t,e):void 0,after:p},a)}),zt);let l;h();const{throttled:d,cancel:f}=J((()=>{Pt({process:t=>{if(wt(t))return;const e=p(t);return function(t){if(wt(t))return!1;const{trackingType:e,isTracked:o}=r(t[n]);t[n]=e,delete t.isExpired,o&&!t.id&&(t.id=Y(),t.created=String(y()))}(e),e},after:t=>{St(t)&&!m()&&function(t){l=t,o.notify()}(t),l=t}},a)}),zt);function p(t){return kt(t)&&(t=bt(t,e)),m()&&(!function(t){return l.id!==t.id||l[n]!==t[n]}(t)?(s.notify({previousState:l,newState:t}),l=t):(l=bt(l,e),i.notify())),t}function h(){Pt({process:t=>{if(wt(t))return bt(t,e)},after:t=>{l=t}},a)}function m(){return void 0!==l[n]}return{expandOrRenewSession:d,expandSession:function(){Pt({process:t=>m()?p(t):void 0},a)},getSession:()=>l,renewObservable:o,expireObservable:i,sessionStateUpdateObservable:s,restartSession:h,expire:()=>{f(),c(l),p(bt(l,e))},stop:()=>{G(u)},updateSessionState:function(t){Pt({process:e=>({...e,...t}),after:p},a)}}}const Ft={GRANTED:\"granted\",NOT_GRANTED:\"not-granted\"};function jt(t,e,n){if(\"object\"!=typeof t||null===t)return JSON.stringify(t);const r=qt(Object.prototype),o=qt(Array.prototype),i=qt(Object.getPrototypeOf(t)),s=qt(t);try{return JSON.stringify(t,e,n)}catch(t){return\"<error: unable to serialize object>\"}finally{r(),o(),i(),s()}}function qt(t){const e=t,n=e.toJSON;return n?(delete e.toJSON,()=>{e.toJSON=n}):X}function Ht(t){return Gt(t,location.href).href}function Gt(t,e){const n=function(){if(void 0===Kt)try{const t=new Wt(\"http://test/path\");Kt=\"http://test/path\"===t.href}catch(t){Kt=!1}return Kt?Wt:void 0}();if(n)try{return void 0!==e?new n(t,e):new n(t)}catch(n){throw new Error(`Failed to construct URL: ${String(n)} ${jt({url:t,base:e})}`)}if(void 0===e&&!/:/.test(t))throw new Error(`Invalid URL: '${t}'`);let r=document;const o=r.createElement(\"a\");if(void 0!==e){r=document.implementation.createHTMLDocument(\"\");const t=r.createElement(\"base\");t.href=e,r.head.appendChild(t),r.body.appendChild(o)}return o.href=t,o}const Wt=URL;let Kt;const Jt=\"datad0g.com\",Xt=\"dd0g-gov.com\",Yt=\"datadoghq.com\",Zt=\"datadoghq.eu\",Qt=\"pci.browser-intake-datadoghq.com\",te=[\"ddsource\",\"ddtags\"];function ee(t,e,n){const r=function(t,e){const n=`/api/v2/${e}`,r=t.proxy;if(\"string\"==typeof r){const t=Ht(r);return e=>`${t}?ddforward=${encodeURIComponent(`${n}?${e}`)}`}if(\"function\"==typeof r)return t=>r({path:n,parameters:t});const o=function(t,e){const{site:n=Yt,internalAnalyticsSubdomain:r}=e;if(\"logs\"===t&&e.usePciIntake&&n===Yt)return Qt;if(r&&n===Yt)return`${r}.${Yt}`;if(n===Xt)return`http-intake.logs.${n}`;const o=n.split(\".\"),i=o.pop();return`browser-intake-${o.join(\"-\")}.${i}`}(e,t);return t=>`https://${o}${n}?${t}`}(t,e);return{build(o,i){const s=function({clientToken:t,internalAnalyticsSubdomain:e},n,r,o,{retry:i,encoding:s}){const a=[\"sdk_version:6.0.0\",`api:${o}`].concat(r);i&&a.push(`retry_count:${i.count}`,`retry_after:${i.lastFailureStatus}`);const c=[\"ddsource=browser\",`ddtags=${encodeURIComponent(a.join(\",\"))}`,`dd-api-key=${t}`,`dd-evp-origin-version=${encodeURIComponent(\"6.0.0\")}`,\"dd-evp-origin=browser\",`dd-request-id=${Y()}`];s&&c.push(`dd-evp-encoding=${s}`);\"rum\"===n&&c.push(`batch_time=${_()}`);e&&c.reverse();return c.join(\"&\")}(t,e,n,o,i);return r(s)},urlPrefix:r(\"\"),trackType:e}}function ne(t,e){const n=200-t.length-1;(e.length>n||function(t){if(!function(){try{return new RegExp(\"[\\\\p{Ll}]\",\"u\"),!0}catch(t){return!1}}())return!1;return new RegExp(\"[^\\\\p{Ll}\\\\p{Lo}0-9_:./-]\",\"u\").test(t)}(e))&&o.warn(`${t} value doesn't meet tag requirements and will be sanitized. ${a} ${i}/getting_started/tagging/#defining-tags`);return`${t}:${e.replace(/,/g,\"_\")}`}function re(t){const e=t.site||Yt,n=function(t){const{env:e,service:n,version:r,datacenter:o}=t,i=[];return e&&i.push(ne(\"env\",e)),n&&i.push(ne(\"service\",n)),r&&i.push(ne(\"version\",r)),o&&i.push(ne(\"datacenter\",o)),i}(t),r=function(t,e){return{logsEndpointBuilder:ee(t,\"logs\",e),rumEndpointBuilder:ee(t,\"rum\",e),sessionReplayEndpointBuilder:ee(t,\"replay\",e)}}(t,n),o=function(t,e){if(!t.replica)return;const n={...t,site:Yt,clientToken:t.replica.clientToken},r={logsEndpointBuilder:ee(n,\"logs\",e),rumEndpointBuilder:ee(n,\"rum\",e)};return{applicationId:t.replica.applicationId,...r}}(t,n);return{replica:o,site:e,...r}}const oe={ALLOW:\"allow\",MASK:\"mask\",MASK_USER_INPUT:\"mask-user-input\"},ie={ALL:\"all\",SAMPLED:\"sampled\"};function se(t,e){return null==t||\"string\"==typeof t||(o.error(`${e} must be defined as a string`),!1)}function ae(t,e){return!!(void 0===t||(n=t,d(n)&&n>=0&&n<=100))||(o.error(`${e} Sample Rate should be a number between 0 and 100`),!1);var n}function ce(t){var e,n,r,s,u,l;if(t&&t.clientToken){if((!(d=t.site)||\"string\"!=typeof d||/(datadog|ddog|datad0g|dd0g)/.test(d)||(o.error(`Site should be a valid Datadog site. ${a} ${i}/getting_started/site/.`),0))&&ae(t.sessionSampleRate,\"Session\")&&ae(t.telemetrySampleRate,\"Telemetry\")&&ae(t.telemetryConfigurationSampleRate,\"Telemetry Configuration\")&&ae(t.telemetryUsageSampleRate,\"Telemetry Usage\")&&se(t.version,\"Version\")&&se(t.env,\"Env\")&&se(t.service,\"Service\")){var d;if(void 0===t.trackingConsent||O(Ft,t.trackingConsent))return{beforeSend:t.beforeSend&&c(t.beforeSend,\"beforeSend threw an error:\"),sessionStoreStrategyType:Bt(t),sessionSampleRate:null!==(e=t.sessionSampleRate)&&void 0!==e?e:100,telemetrySampleRate:null!==(n=t.telemetrySampleRate)&&void 0!==n?n:20,telemetryConfigurationSampleRate:null!==(r=t.telemetryConfigurationSampleRate)&&void 0!==r?r:5,telemetryUsageSampleRate:null!==(s=t.telemetryUsageSampleRate)&&void 0!==s?s:5,service:t.service||void 0,silentMultipleInit:!!t.silentMultipleInit,allowUntrustedEvents:!!t.allowUntrustedEvents,trackingConsent:null!==(u=t.trackingConsent)&&void 0!==u?u:Ft.GRANTED,trackAnonymousUser:null===(l=t.trackAnonymousUser)||void 0===l||l,storeContextsAcrossPages:!!t.storeContextsAcrossPages,batchBytesLimit:16384,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:3e4,batchMessagesLimit:50,messageBytesLimit:262144,...re(t)};o.error('Tracking Consent should be either \"granted\" or \"not-granted\"')}}else o.error(\"Client Token is not configured, we will not send any data.\")}var ue;!function(t){t.WRITABLE_RESOURCE_GRAPHQL=\"writable_resource_graphql\",t.REMOTE_CONFIGURATION=\"remote_configuration\",t.ACTION_NAME_MASKING=\"action_name_masking\",t.CONSISTENT_TRACE_SAMPLING=\"consistent_trace_sampling\",t.DELAY_VIEWPORT_COLLECTION=\"delay_viewport_collection\"}(ue||(ue={}));const le=new Set;function de(t){Array.isArray(t)&&t.filter((t=>O(ue,t))).forEach((t=>{le.add(t)}))}function fe(t){return le.has(t)}function pe(){return le}const he=\"?\";function me(t){const e=[];let n=Ce(t,\"stack\");const r=String(t);return n&&n.startsWith(r)&&(n=n.slice(r.length)),n&&n.split(\"\\n\").forEach((t=>{const n=function(t){const e=ye.exec(t);if(!e)return;const n=e[2]&&0===e[2].indexOf(\"native\"),r=e[2]&&0===e[2].indexOf(\"eval\"),o=_e.exec(e[2]);r&&o&&(e[2]=o[1],e[3]=o[2],e[4]=o[3]);return{args:n?[e[2]]:[],column:e[4]?+e[4]:void 0,func:e[1]||he,line:e[3]?+e[3]:void 0,url:n?void 0:e[2]}}(t)||function(t){const e=be.exec(t);if(!e)return;return{args:[],column:e[3]?+e[3]:void 0,func:he,line:e[2]?+e[2]:void 0,url:e[1]}}(t)||function(t){const e=we.exec(t);if(!e)return;return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||he,line:+e[3],url:e[2]}}(t)||function(t){const e=Se.exec(t);if(!e)return;const n=e[3]&&e[3].indexOf(\" > eval\")>-1,r=ke.exec(e[3]);n&&r&&(e[3]=r[1],e[4]=r[2],e[5]=void 0);return{args:e[2]?e[2].split(\",\"):[],column:e[5]?+e[5]:void 0,func:e[1]||he,line:e[4]?+e[4]:void 0,url:e[3]}}(t);n&&(!n.func&&n.line&&(n.func=he),e.push(n))})),{message:Ce(t,\"message\"),name:Ce(t,\"name\"),stack:e}}const ge=\"((?:file|https?|blob|chrome-extension|electron|native|eval|webpack|snippet|<anonymous>|\\\\w+\\\\.|\\\\/).*?)\",ve=\"(?::(\\\\d+))\",ye=new RegExp(`^\\\\s*at (.*?) ?\\\\(${ge}${ve}?${ve}?\\\\)?\\\\s*$`,\"i\"),_e=new RegExp(`\\\\((\\\\S*)${ve}${ve}\\\\)`);const be=new RegExp(`^\\\\s*at ?${ge}${ve}?${ve}??\\\\s*$`,\"i\");const we=/^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;const Se=/^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i,ke=/(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;function Ce(t,e){if(\"object\"!=typeof t||!t||!(e in t))return;const n=t[e];return\"string\"==typeof n?n:void 0}function xe(t,e,n,r){const o=[{url:e,column:r,line:n}],{name:i,message:s}=function(t){let e,n;\"[object String]\"==={}.toString.call(t)&&([,e,n]=Te.exec(t));return{name:e,message:n}}(t);return{name:i,message:s,stack:o}}const Te=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\\s\\S]*)$/;function Ee(){const t=new Error;let e;return B((()=>{const n=me(t);n.stack=n.stack.slice(2),e=Ae(n)})),e}function Ae(t){let e=Re(t);return t.stack.forEach((t=>{const n=\"?\"===t.func?\"<anonymous>\":t.func,r=t.args&&t.args.length>0?`(${t.args.join(\", \")})`:\"\",o=t.line?`:${t.line}`:\"\",i=t.line&&t.column?`:${t.column}`:\"\";e+=`\\n at ${n}${r} @ ${t.url}${o}${i}`})),e}function Re(t){return`${t.name||\"Error\"}: ${t.message}`}function Ie(t,e,n,{computeHandlingStack:r}={}){let o=t[e];if(\"function\"!=typeof o){if(!(e in t)||!e.startsWith(\"on\"))return{stop:X};o=X}let i=!1;const s=function(){if(i)return o.apply(this,arguments);const t=Array.from(arguments);let e;B(n,null,[{target:this,parameters:t,onPostCall:t=>{e=t},handlingStack:r?Ee():void 0}]);const s=o.apply(this,t);return e&&B(e,null,[s]),s};return t[e]=s,{stop:()=>{i=!0,t[e]===s&&(t[e]=o)}}}function Ne(t,e,n){const r=Object.getOwnPropertyDescriptor(t,e);if(!r||!r.set||!r.configurable)return{stop:X};const o=X;let i=(t,e)=>{j((()=>{i!==o&&n(t,e)}),0)};const s=function(t){r.set.call(this,t),i(this,t)};return Object.defineProperty(t,e,{set:s}),{stop:()=>{var n;(null===(n=Object.getOwnPropertyDescriptor(t,e))||void 0===n?void 0:n.set)===s&&Object.defineProperty(t,e,r),i=o}}}function Oe(t,e=225280){const n=qt(Object.prototype),r=qt(Array.prototype),o=[],i=new WeakMap,s=Le(t,\"$\",void 0,o,i),a=JSON.stringify(s);let c=a?a.length:0;if(!(c>e)){for(;o.length>0&&c<e;){const n=o.shift();let r=0;if(Array.isArray(n.source))for(let s=0;s<n.source.length;s++){const a=Le(n.source[s],n.path,s,o,i);if(c+=void 0!==a?JSON.stringify(a).length:4,c+=r,r=1,c>e){De(e,\"truncated\",t);break}n.target[s]=a}else for(const s in n.source)if(Object.prototype.hasOwnProperty.call(n.source,s)){const a=Le(n.source[s],n.path,s,o,i);if(void 0!==a&&(c+=JSON.stringify(a).length+r+s.length+3,r=1),c>e){De(e,\"truncated\",t);break}n.target[s]=a}}return n(),r(),s}De(e,\"discarded\",t)}function Le(t,e,n,r,o){const i=function(t){const e=t;if(e&&\"function\"==typeof e.toJSON)try{return e.toJSON()}catch(t){}return t}(t);if(!i||\"object\"!=typeof i)return function(t){if(\"bigint\"==typeof t)return`[BigInt] ${t.toString()}`;if(\"function\"==typeof t)return`[Function] ${t.name||\"unknown\"}`;if(\"symbol\"==typeof t)return`[Symbol] ${t.description||t.toString()}`;return t}(i);const s=Me(i);if(\"[Object]\"!==s&&\"[Array]\"!==s&&\"[Error]\"!==s)return s;const a=t;if(o.has(a))return`[Reference seen at ${o.get(a)}]`;const c=void 0!==n?`${e}.${n}`:e,u=Array.isArray(i)?[]:{};return o.set(a,c),r.push({source:i,target:u,path:c}),u}function Me(t){try{if(t instanceof Event)return{type:(e=t).type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?Me(e.currentTarget):null,target:e.target?Me(e.target):null};if(t instanceof RegExp)return`[RegExp] ${t.toString()}`;const n=Object.prototype.toString.call(t).match(/\\[object (.*)\\]/);if(n&&n[1])return`[${n[1]}]`}catch(t){}var e;return\"[Unserializable]\"}function De(t,e,n){o.warn(`The data provided has been ${e} as it is over the limit of ${t} characters:`,n)}const Pe=\"No stack, consider using an instance of Error\";function Ue({stackTrace:t,originalError:e,handlingStack:n,startClocks:r,nonErrorPrefix:o,source:i,handling:s}){const a=ze(e),c=function(t,e,n,r){return(null==t?void 0:t.message)&&(null==t?void 0:t.name)?t.message:e?\"Empty message\":`${n} ${jt(Oe(r))}`}(t,a,o,e),u=function(t,e){if(void 0===e)return!1;if(t)return!0;return e.stack.length>0&&(e.stack.length>1||void 0!==e.stack[0].url)}(a,t)?Ae(t):Pe,l=a?Be(e,i):void 0;return{startClocks:r,source:i,handling:s,handlingStack:n,originalError:e,type:t?t.name:void 0,message:c,stack:u,causes:l,fingerprint:$e(e)}}function $e(t){return ze(t)&&\"dd_fingerprint\"in t?String(t.dd_fingerprint):void 0}function ze(t){return t instanceof Error||\"[object Error]\"===Object.prototype.toString.call(t)}function Be(t,e){let n=t;const r=[];for(;ze(null==n?void 0:n.cause)&&r.length<10;){const t=me(n.cause);r.push({message:n.cause.message,source:e,type:null==t?void 0:t.name,stack:t&&Ae(t)}),n=n.cause}return r.length?r:void 0}const Ve=\"agent\",Fe=\"console\",je=\"custom\",qe=\"source\",He=\"report\";function Ge(t){const e=(e,n)=>{const r=Ue({stackTrace:e,originalError:n,startClocks:w(),nonErrorPrefix:\"Uncaught\",source:qe,handling:\"unhandled\"});t.notify(r)},{stop:n}=(r=e,Ie(window,\"onerror\",(({parameters:[t,e,n,o,i]})=>{let s;s=ze(i)?me(i):xe(t,e,n,o),r(s,null!=i?i:t)})));var r;const{stop:o}=function(t){return Ie(window,\"onunhandledrejection\",(({parameters:[e]})=>{const n=e.reason||\"Empty reason\",r=me(n);t(r,n)}))}(e);return{stop:()=>{n(),o()}}}function We(t,e){e.silentMultipleInit||o.error(`${t} is already initialized.`)}function Ke(t,e,n,r,o){return Je(t,e,[n],r,o)}function Je(t,e,n,r,{once:o,capture:i,passive:s}={}){const a=z((e=>{(e.isTrusted||e.__ddIsTrusted||t.allowUntrustedEvents)&&(o&&d(),r(e))})),c=s?{capture:i,passive:s}:i,u=window.EventTarget&&e instanceof EventTarget?window.EventTarget.prototype:e,l=D(u,\"addEventListener\");function d(){const t=D(u,\"removeEventListener\");n.forEach((n=>t.call(e,n,a,c)))}return n.forEach((t=>l.call(e,t,a,c))),{stop:d}}const Xe=\"intervention\",Ye=\"csp_violation\";function Ze(t,e){const n=[];e.includes(Ye)&&n.push(function(t){return new W((e=>{const{stop:n}=Ke(t,document,\"securitypolicyviolation\",(t=>{e.notify(function(t){const e=`'${t.blockedURI}' blocked by '${t.effectiveDirective}' directive`;return Qe({type:t.effectiveDirective,message:`${Ye}: ${e}`,originalError:t,csp:{disposition:t.disposition},stack:tn(t.effectiveDirective,t.originalPolicy?`${e} of the policy \"${tt(t.originalPolicy,100,\"...\")}\"`:\"no policy\",t.sourceFile,t.lineNumber,t.columnNumber)})}(t))}));return n}))}(t));const r=e.filter((t=>t!==Ye));return r.length&&n.push(function(t){return new W((e=>{if(!window.ReportingObserver)return;const n=z(((t,n)=>t.forEach((t=>e.notify(function(t){const{type:e,body:n}=t;return Qe({type:n.id,message:`${e}: ${n.message}`,originalError:t,stack:tn(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)})}(t)))))),r=new window.ReportingObserver(n,{types:t,buffered:!0});return r.observe(),()=>{r.disconnect()}}))}(r)),K(...n)}function Qe(t){return{startClocks:w(),source:He,handling:\"unhandled\",...t}}function tn(t,e,n,r,o){return n?Ae({name:t,message:e,stack:[{func:\"?\",url:n,line:null!=r?r:void 0,column:null!=o?o:void 0}]}):void 0}function en(t,e){const n=window.__ddBrowserSdkExtensionCallback;n&&n({type:t,payload:e})}function nn(t,e,n=function(){if(\"undefined\"!=typeof WeakSet){const t=new WeakSet;return{hasAlreadyBeenSeen(e){const n=t.has(e);return n||t.add(e),n}}}const t=[];return{hasAlreadyBeenSeen(e){const n=t.indexOf(e)>=0;return n||t.push(e),n}}}()){if(void 0===e)return t;if(\"object\"!=typeof e||null===e)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const t=e.flags||[e.global?\"g\":\"\",e.ignoreCase?\"i\":\"\",e.multiline?\"m\":\"\",e.sticky?\"y\":\"\",e.unicode?\"u\":\"\"].join(\"\");return new RegExp(e.source,t)}if(n.hasAlreadyBeenSeen(e))return;if(Array.isArray(e)){const r=Array.isArray(t)?t:[];for(let t=0;t<e.length;++t)r[t]=nn(r[t],e[t],n);return r}const r=\"object\"===ft(t)?t:{};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=nn(r[t],e[t],n));return r}function rn(t){return nn(void 0,t)}function on(...t){let e;for(const n of t)null!=n&&(e=nn(e,n));return e}function sn(){var t;const e=window.navigator;return{status:e.onLine?\"connected\":\"not_connected\",interfaces:e.connection&&e.connection.type?[e.connection.type]:void 0,effective_type:null===(t=e.connection)||void 0===t?void 0:t.effectiveType}}function an(t,e){const n=t.indexOf(e);n>=0&&t.splice(n,1)}function cn(){const t=[];return{add:e=>{t.push(e)>500&&t.splice(0,1)},remove:e=>{an(t,e)},drain:e=>{t.forEach((t=>t(e))),t.length=0}}}const un=\"log\",ln=\"configuration\",dn=\"usage\",fn=[\"https://www.datadoghq-browser-agent.com\",\"https://www.datad0g-browser-agent.com\",\"https://d3uc069fcn7uxw.cloudfront.net\",\"https://d20xtzwzcl0ceb.cloudfront.net\",\"http://localhost\",\"<anonymous>\"],pn=[\"ddog-gov.com\"];let hn=cn(),mn=t=>{hn.add((()=>mn(t)))};function gn(t,e){let n;const r=new W,o=new Set,i=!pn.includes(e.site)&&u(e.telemetrySampleRate),s={[un]:i,[ln]:i&&u(e.telemetryConfigurationSampleRate),[dn]:i&&u(e.telemetryUsageSampleRate)},a={is_local_file:\"file:\"===window.location.protocol,is_worker:\"WorkerGlobalScope\"in self};return mn=i=>{const c=jt(i);if(s[i.type]&&o.size<e.maxTelemetryEventsPerPage&&!o.has(c)){const e=function(t,e,r){return on({type:\"telemetry\",date:_(),service:t,version:\"6.0.0\",source:\"browser\",_dd:{format_version:2},telemetry:on(e,{runtime_env:r,connectivity:sn(),sdk_setup:\"npm\"}),experimental_features:Array.from(pe())},void 0!==n?n():{})}(t,i,a);r.notify(e),en(\"telemetry\",e),o.add(c)}},P=yn,{setContextProvider:t=>{n=t},observable:r,enabled:i}}function vn(e,n){F(t.debug,e,n),mn({type:un,message:e,status:\"debug\",...n})}function yn(t,e){mn({type:un,status:\"error\",...bn(t),...e})}function _n(t){mn({type:dn,usage:t})}function bn(t){if(ze(t)){const e=me(t);return{error:{kind:e.name,stack:Ae(wn(e))},message:e.message}}return{error:{stack:Pe},message:`Uncaught ${jt(t)}`}}function wn(t){return t.stack=t.stack.filter((t=>!t.url||fn.some((e=>t.url.startsWith(e))))),t}const Sn=1/0;function kn({expireDelay:t,maxEntries:e}){let n=[];const r=H((()=>function(){const e=b()-t;for(;n.length>0&&n[n.length-1].endTime<e;)n.pop()}()),6e4);return{add:function(t,r){const o={value:t,startTime:r,endTime:Sn,remove:()=>{an(n,o)},close:t=>{o.endTime=t}};return e&&n.length>=e&&n.pop(),n.unshift(o),o},find:function(t=Infinity,e={returnInactive:!1}){for(const r of n)if(r.startTime<=t){if(e.returnInactive||t<=r.endTime)return r.value;break}},closeActive:function(t){const e=n[0];e&&e.endTime===Sn&&e.close(t)},findAll:function(t=Infinity,e=0){const r=C(t,e);return n.filter((e=>e.startTime<=r&&t<=e.endTime)).map((t=>t.value))},reset:function(){n=[]},stop:function(){G(r)}}}const Cn=p,xn=ht;function Tn(t,e,n,r){const o=new W,i=new W,s=Vt(t.sessionStoreStrategyType,t,e,n),a=kn({expireDelay:xn});function c(){return{id:s.getSession().id,trackingType:s.getSession()[e],isReplayForced:!!s.getSession().forcedReplay,anonymousId:s.getSession().anonymousId}}return s.renewObservable.subscribe((()=>{a.add(c(),b()),o.notify()})),s.expireObservable.subscribe((()=>{i.notify(),a.closeActive(b())})),s.expandOrRenewSession(),a.add(c(),S().relative),r.observable.subscribe((()=>{r.isGranted()?s.expandOrRenewSession():s.expire()})),function(t,e){const{stop:n}=Je(t,window,[\"click\",\"touchstart\",\"keydown\",\"scroll\"],e,{capture:!0,passive:!0})}(t,(()=>{r.isGranted()&&s.expandOrRenewSession()})),function(t,e){const n=()=>{\"visible\"===document.visibilityState&&e()},{stop:r}=Ke(t,document,\"visibilitychange\",n);H(n,Cn)}(t,(()=>s.expandSession())),function(t,e){const{stop:n}=Ke(t,window,\"resume\",e,{capture:!0})}(t,(()=>s.restartSession())),{findSession:(t,e)=>a.find(t,e),renewObservable:o,expireObservable:i,sessionStateUpdateObservable:s.sessionStateUpdateObservable,expire:s.expire,updateSessionState:s.updateSessionState}}const En=3145728,An=f;function Rn(t,e,n,r,o){0===e.transportStatus&&0===e.queuedPayloads.size()&&e.bandwidthMonitor.canHandle(t)?Nn(t,e,n,{onSuccess:()=>On(0,e,n,r,o),onFailure:()=>{e.queuedPayloads.enqueue(t),In(e,n,r,o)}}):e.queuedPayloads.enqueue(t)}function In(t,e,n,r){2===t.transportStatus&&j((()=>{Nn(t.queuedPayloads.first(),t,e,{onSuccess:()=>{t.queuedPayloads.dequeue(),t.currentBackoffTime=An,On(1,t,e,n,r)},onFailure:()=>{t.currentBackoffTime=Math.min(6e4,2*t.currentBackoffTime),In(t,e,n,r)}})}),t.currentBackoffTime)}function Nn(t,e,n,{onSuccess:r,onFailure:o}){e.bandwidthMonitor.add(t),n(t,(n=>{e.bandwidthMonitor.remove(t),!function(t){return\"opaque\"!==t.type&&(0===t.status&&!navigator.onLine||408===t.status||429===t.status||(e=t.status,e>=500));var e}(n)?(e.transportStatus=0,r()):(e.transportStatus=e.bandwidthMonitor.ongoingRequestCount>0?1:2,t.retry={count:t.retry?t.retry.count+1:1,lastFailureStatus:n.status},o())}))}function On(t,e,n,r,o){0===t&&e.queuedPayloads.isFull()&&!e.queueFullReported&&(o({message:`Reached max ${r} events size queued for upload: 3MiB`,source:Ve,startClocks:w()}),e.queueFullReported=!0);const i=e.queuedPayloads;for(e.queuedPayloads=Ln();i.size()>0;)Rn(i.dequeue(),e,n,r,o)}function Ln(){const t=[];return{bytesCount:0,enqueue(e){this.isFull()||(t.push(e),this.bytesCount+=e.bytesCount)},first:()=>t[0],dequeue(){const e=t.shift();return e&&(this.bytesCount-=e.bytesCount),e},size:()=>t.length,isFull(){return this.bytesCount>=En}}}function Mn(t,e,n){const r={transportStatus:0,currentBackoffTime:An,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle(t){return 0===this.ongoingRequestCount||this.ongoingByteCount+t.bytesCount<=81920&&this.ongoingRequestCount<32},add(t){this.ongoingRequestCount+=1,this.ongoingByteCount+=t.bytesCount},remove(t){this.ongoingRequestCount-=1,this.ongoingByteCount-=t.bytesCount}},queuedPayloads:Ln(),queueFullReported:!1},o=(n,r)=>function(t,e,n,r){const o=function(){try{return window.Request&&\"keepalive\"in new Request(\"http://a\")}catch(t){return!1}}()&&n.bytesCount<e;if(o){const e=t.build(\"fetch\",n);fetch(e,{method:\"POST\",body:n.data,keepalive:!0,mode:\"cors\"}).then(z((t=>null==r?void 0:r({status:t.status,type:t.type}))),z((()=>{Pn(t.build(\"xhr\",n),n.data,r)})))}else{Pn(t.build(\"xhr\",n),n.data,r)}}(t,e,n,r);return{send:e=>{Rn(e,r,o,t.trackType,n)},sendOnExit:n=>{!function(t,e,n){const r=!!navigator.sendBeacon&&n.bytesCount<e;if(r)try{const e=t.build(\"beacon\",n);if(navigator.sendBeacon(e,n.data))return}catch(t){!function(t){Dn||(Dn=!0,yn(t))}(t)}const o=t.build(\"xhr\",n);Pn(o,n.data)}(t,e,n)}}}let Dn=!1;function Pn(t,e,n){const r=new XMLHttpRequest;r.open(\"POST\",t,!0),e instanceof Blob&&r.setRequestHeader(\"Content-Type\",e.type),Ke({allowUntrustedEvents:!0},r,\"loadend\",(()=>{null==n||n({status:r.status})}),{once:!0}),r.send(e)}function Un(){const t=M().DatadogEventBridge;if(t)return{getCapabilities(){var e;return JSON.parse((null===(e=t.getCapabilities)||void 0===e?void 0:e.call(t))||\"[]\")},getPrivacyLevel(){var e;return null===(e=t.getPrivacyLevel)||void 0===e?void 0:e.call(t)},getAllowedWebViewHosts:()=>JSON.parse(t.getAllowedWebViewHosts()),send(e,n,r){const o=r?{id:r}:void 0;t.send(JSON.stringify({eventType:e,event:n,view:o}))}}}function $n(t){const e=Un();return!!e&&e.getCapabilities().includes(t)}function zn(t){var e;void 0===t&&(t=null===(e=M().location)||void 0===e?void 0:e.hostname);const n=Un();return!!n&&n.getAllowedWebViewHosts().some((e=>t===e||t.endsWith(`.${e}`)))}const Bn={HIDDEN:\"visibility_hidden\",UNLOADING:\"before_unload\",PAGEHIDE:\"page_hide\",FROZEN:\"page_frozen\"};function Vn(t){return lt(Bn).includes(t)}function Fn({encoder:t,request:e,flushController:n,messageBytesLimit:r}){let i={};const c=n.flushObservable.subscribe((n=>function(n){const r=lt(i).join(\"\\n\");i={};const o=Vn(n.reason),s=o?e.sendOnExit:e.send;if(o&&t.isAsync){const e=t.finishSync();e.outputBytesCount&&s(jn(e));const n=[e.pendingData,r].filter(Boolean).join(\"\\n\");n&&s({data:n,bytesCount:I(n)})}else r&&t.write(t.isEmpty?r:`\\n${r}`),t.finish((t=>{s(jn(t))}))}(n)));function u(e,c){const u=jt(e),l=t.estimateEncodedBytesCount(u);l>=r?o.warn(`Discarded a message whose size was bigger than the maximum allowed size ${r}KB. ${a} ${s}/#technical-limitations`):(function(t){return void 0!==t&&void 0!==i[t]}(c)&&function(e){const r=i[e];delete i[e];const o=t.estimateEncodedBytesCount(r);n.notifyAfterRemoveMessage(o)}(c),function(e,r,o){n.notifyBeforeAddMessage(r),void 0!==o?(i[o]=e,n.notifyAfterAddMessage()):t.write(t.isEmpty?e:`\\n${e}`,(t=>{n.notifyAfterAddMessage(t-r)}))}(u,l,c))}return{flushController:n,add:u,upsert:u,stop:c.unsubscribe}}function jn(t){let e;return e=\"string\"==typeof t.output?t.output:new Blob([t.output],{type:\"text/plain\"}),{data:e,bytesCount:t.outputBytesCount,encoding:t.encoding}}function qn({messagesLimit:t,bytesLimit:e,durationLimit:n,pageExitObservable:r,sessionExpireObservable:o}){const i=r.subscribe((t=>d(t.reason))),s=o.subscribe((()=>d(\"session_expire\"))),a=new W((()=>()=>{i.unsubscribe(),s.unsubscribe()}));let c,u=0,l=0;function d(t){if(0===l)return;const e=l,n=u;l=0,u=0,f(),a.notify({reason:t,messagesCount:e,bytesCount:n})}function f(){q(c),c=void 0}return{flushObservable:a,get messagesCount(){return l},notifyBeforeAddMessage(t){u+t>=e&&d(\"bytes_limit\"),l+=1,u+=t,void 0===c&&(c=j((()=>{d(\"duration_limit\")}),n))},notifyAfterAddMessage(n=0){u+=n,l>=t?d(\"messages_limit\"):u>=e&&d(\"bytes_limit\")},notifyAfterRemoveMessage(t){u-=t,l-=1,0===l&&f()}}}function Hn(){let t=\"\",e=0;return{isAsync:!1,get isEmpty(){return!t},write(n,r){const o=I(n);e+=o,t+=n,r&&r(o)},finish(t){t(this.finishSync())},finishSync(){const n={output:t,outputBytesCount:e,rawBytesCount:e,pendingData:\"\"};return t=\"\",e=0,n},estimateEncodedBytesCount:t=>t.length}}function Gn(t,e,n){let r=0,o=!1;return{isLimitReached(){if(0===r&&j((()=>{r=0}),p),r+=1,r<=e||o)return o=!1,!1;if(r===e+1){o=!0;try{n({message:`Reached max number of ${t}s by minute: ${e}`,source:Ve,startClocks:w()})}finally{o=!1}}return!0}}}function Wn(t,e,n){if(document.readyState===e||\"complete\"===document.readyState)return n(),{stop:X};return Ke(t,window,\"complete\"===e?\"load\":\"DOMContentLoaded\",n,{once:!0})}function Kn(t,e){return new Promise((n=>{Wn(t,e,n)}))}let Jn;const Xn=new WeakMap;function Yn(t){return Jn||(Jn=function(t){return new W((e=>{const{stop:n}=Ie(XMLHttpRequest.prototype,\"open\",Zn),{stop:r}=Ie(XMLHttpRequest.prototype,\"send\",(n=>{!function({target:t,handlingStack:e},n,r){const o=Xn.get(t);if(!o)return;const i=o;i.state=\"start\",i.startClocks=w(),i.isAborted=!1,i.xhr=t,i.handlingStack=e;let s=!1;const{stop:a}=Ie(t,\"onreadystatechange\",(()=>{t.readyState===XMLHttpRequest.DONE&&c()})),c=()=>{if(u(),a(),s)return;s=!0;const e=o;e.state=\"complete\",e.duration=k(i.startClocks.timeStamp,_()),e.status=t.status,r.notify(N(e))},{stop:u}=Ke(n,t,\"loadend\",c);r.notify(i)}(n,t,e)}),{computeHandlingStack:!0}),{stop:o}=Ie(XMLHttpRequest.prototype,\"abort\",Qn);return()=>{n(),r(),o()}}))}(t)),Jn}function Zn({target:t,parameters:[e,n]}){Xn.set(t,{state:\"open\",method:String(e).toUpperCase(),url:Ht(String(n))})}function Qn({target:t}){const e=Xn.get(t);e&&(e.isAborted=!0)}let tr;function er(){return tr||(tr=new W((t=>{if(!window.fetch)return;const{stop:e}=Ie(window,\"fetch\",(e=>function({parameters:t,onPostCall:e,handlingStack:n},r){const[o,i]=t;let s=i&&i.method;void 0===s&&o instanceof Request&&(s=o.method);const a=void 0!==s?String(s).toUpperCase():\"GET\",c=o instanceof Request?o.url:Ht(String(o)),u=w(),l={state:\"start\",init:i,input:o,method:a,startClocks:u,url:c,handlingStack:n};r.notify(l),t[0]=l.input,t[1]=l.init,e((t=>function(t,e,n){const r=n;function o(e){r.state=\"resolve\",Object.assign(r,e),t.notify(r)}e.then(z((t=>{o({response:t,responseType:t.type,status:t.status,isAborted:!1})})),z((t=>{var e,n;o({status:0,isAborted:(null===(n=null===(e=r.init)||void 0===e?void 0:e.signal)||void 0===n?void 0:n.aborted)||t instanceof DOMException&&t.code===DOMException.ABORT_ERR,error:t})})))}(r,t,l)))}(e,t)),{computeHandlingStack:!0});return e}))),tr}function nr(t,e){if(window.requestIdleCallback&&window.cancelIdleCallback){const n=window.requestIdleCallback(z(t),e);return()=>window.cancelIdleCallback(n)}return function(t){const e=y(),n=j((()=>{t({didTimeout:!1,timeRemaining:()=>Math.max(0,rr-(y()-e))})}),0);return()=>q(n)}(t)}const rr=50;let or={};function ir(n){return K(...n.map((n=>(or[n]||(or[n]=function(n){return new W((r=>{const o=e[n];return e[n]=(...e)=>{o.apply(console,e);const i=Ee();B((()=>{r.notify(function(e,n,r){const o=e.map((t=>function(t){if(\"string\"==typeof t)return Oe(t);if(ze(t))return Re(me(t));return jt(Oe(t),void 0,2)}(t))).join(\" \");let i;if(n===t.error){const t=e.find(ze);i={stack:t?Ae(me(t)):void 0,fingerprint:$e(t),causes:t?Be(t,\"console\"):void 0,startClocks:w(),message:o,source:Fe,handling:\"handled\",handlingStack:r}}return{api:n,message:o,error:i,handlingStack:r}}(e,n,i))}))},()=>{e[n]=o}}))}(n)),or[n]))))}function sr(t){let e={};const n=new W,r={getContext:()=>rn(e),setContext:o=>{\"object\"===ft(o)?(e=Oe(o),null==t||t.updateCustomerData(e)):r.clearContext(),n.notify()},setContextProperty:(r,o)=>{e[r]=Oe(o),null==t||t.updateCustomerData(e),n.notify()},removeContextProperty:r=>{delete e[r],null==t||t.updateCustomerData(e),n.notify()},clearContext:()=>{e={},null==t||t.resetCustomerData(),n.notify()},changeObservable:n};return r}const ar=\"_dd_c\",cr=[];function ur(t,e,n,r){const o=function(t,e){return`${ar}_${t}_${e}`}(n,r);function i(){const t=localStorage.getItem(o);return null!==t?JSON.parse(t):{}}cr.push(Ke(t,window,\"storage\",(({key:t})=>{o===t&&e.setContext(i())}))),e.changeObservable.subscribe((function(){localStorage.setItem(o,JSON.stringify(e.getContext()))})),e.setContext(on(i(),e.getContext()))}function lr(t=2){const e=new Map;let n=!1;function r(r=0){if(n||0===t)return;const i=2===t?3072:16384;let c=r;e.forEach((t=>{c+=t.getBytesCount()})),c>i&&(!function(t){o.warn(`Customer data exceeds the recommended ${t/A}KiB threshold. ${a} ${s}/#customer-data-exceeds-the-recommended-threshold-warning`)}(i),n=!0)}return{createDetachedTracker:()=>{const t=dr((()=>r(t.getBytesCount())));return t},getOrCreateTracker:t=>(e.has(t)||e.set(t,dr(r)),e.get(t)),setCompressionStatus:e=>{0===t&&(t=e,r())},getCompressionStatus:()=>t,stop:()=>{e.forEach((t=>t.stop())),e.clear()}}}function dr(t){let e=0;const{throttled:n,cancel:r}=J((n=>{e=I(jt(n)),t()}),200),o=()=>{r(),e=0};return{updateCustomerData:t=>{L(t)?o():n(t)},resetCustomerData:o,getBytesCount:()=>e,stop:()=>{r()}}}function fr(){return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM||at(\"datadog-synthetics-injects-rum\"))}function pr(t){const e=ft(t);return\"string\"===e||\"function\"===e||t instanceof RegExp}function hr(t,e,n=!1){return t.some((t=>{try{if(\"function\"==typeof t)return t(e);if(t instanceof RegExp)return t.test(e);if(\"string\"==typeof t)return n?e.startsWith(t):t===e}catch(t){o.error(t)}return!1}))}function mr(t,e,n){function r(n){(function(t){return!e.wasInPageStateDuringPeriod(\"frozen\",t.startClocks.relative,t.duration)})(n)&&t.notify(11,function(t){const e={date:t.startClocks.timeStamp,vital:{id:Y(),type:t.type,name:t.name,duration:v(t.duration),description:t.description},type:\"vital\",_dd:{vital:{computed_value:!0}}};return{rawRumEvent:e,startTime:t.startClocks.relative,customerContext:t.context,domainContext:{}}}(n))}return{addDurationVital:r,startDurationVital:(t,e={})=>gr(n,t,e),stopDurationVital:(t,e={})=>{vr(r,n,t,e)}}}function gr({vitalsByName:t,vitalsByReference:e},n,r={}){const o={name:n,startClocks:w(),context:r.context,description:r.description},i={__dd_vital_reference:!0};return t.set(n,o),e.set(i,o),i}function vr(t,{vitalsByName:e,vitalsByReference:n},r,o={}){const i=\"string\"==typeof r?e.get(r):n.get(r);i&&(t(function(t,e,n,r){var o;return{name:t.name,type:\"duration\",startClocks:e,duration:k(e.timeStamp,r.timeStamp),context:on(t.context,n.context),description:null!==(o=n.description)&&void 0!==o?o:t.description}}(i,i.startClocks,o,w())),\"string\"==typeof r?e.delete(r):n.delete(r))}function yr(){return window.crypto||window.msCrypto}function _r(){return wr(63)}let br;function wr(t){return br||(br=fe(ue.CONSISTENT_TRACE_SAMPLING)&&function(){try{return crypto.getRandomValues(new BigUint64Array(1)),!0}catch(t){return!1}}()?Sr:kr),br(t)}function Sr(t){let e=crypto.getRandomValues(new BigUint64Array(1))[0];return 63===t&&(e>>=BigInt(\"1\")),e}function kr(t){const e=yr().getRandomValues(new Uint32Array(2));return 63===t&&(e[e.length-1]>>>=1),{toString(t=10){let n=e[1],r=e[0],o=\"\";do{const e=n%t*4294967296+r;n=Math.floor(n/t),r=Math.floor(e/t),o=(e%t).toString(t)+o}while(n||r);return o}}}function Cr(t){const e=t.toString(16);return Array(17-e.length).join(\"0\")+e}function xr(t){0!==t.status||t.isAborted||(t.traceId=void 0,t.spanId=void 0,t.traceSampled=void 0)}function Tr(t,e,n,r){if(void 0===yr()||!n.findTrackedSession())return;const o=t.allowedTracingUrls.find((t=>hr([t.match],e.url,!0)));if(!o)return;const i=wr(64);e.traceSampled=function(t,e){if(100===e)return!0;if(0===e)return!1;if(\"bigint\"!=typeof t)return u(e);const n=BigInt(\"1111111111111111111\"),r=BigInt(\"0x10000000000000000\");return Number(t*n%r)<=e/100*Number(r)}(i,t.traceSampleRate);(e.traceSampled||t.traceContextInjection===ie.ALL)&&(e.traceId=i,e.spanId=_r(),r(function(t,e,n,r){const o={};return r.forEach((r=>{switch(r){case\"datadog\":Object.assign(o,{\"x-datadog-origin\":\"rum\",\"x-datadog-parent-id\":e.toString(),\"x-datadog-sampling-priority\":n?\"1\":\"0\",\"x-datadog-trace-id\":t.toString()});break;case\"tracecontext\":Object.assign(o,{traceparent:`00-0000000000000000${Cr(t)}-${Cr(e)}-0${n?\"1\":\"0\"}`,tracestate:`dd=s:${n?\"1\":\"0\"};o:rum`});break;case\"b3\":Object.assign(o,{b3:`${Cr(t)}-${Cr(e)}-${n?\"1\":\"0\"}`});break;case\"b3multi\":Object.assign(o,{\"X-B3-TraceId\":Cr(t),\"X-B3-SpanId\":Cr(e),\"X-B3-Sampled\":n?\"1\":\"0\"})}})),o}(e.traceId,e.spanId,e.traceSampled,o.propagatorTypes)))}const Er=[\"tracecontext\",\"datadog\"];function Ar(t){var e,n,r,i,s,a;if(!t.applicationId)return void o.error(\"Application ID is not configured, no RUM data will be collected.\");if(!ae(t.sessionReplaySampleRate,\"Session Replay\")||!ae(t.traceSampleRate,\"Trace\"))return;if(void 0!==t.excludedActivityUrls&&!Array.isArray(t.excludedActivityUrls))return void o.error(\"Excluded Activity Urls should be an array\");const c=function(t){if(void 0===t.allowedTracingUrls)return[];if(!Array.isArray(t.allowedTracingUrls))return void o.error(\"Allowed Tracing URLs should be an array\");if(0!==t.allowedTracingUrls.length&&void 0===t.service)return void o.error(\"Service needs to be configured when tracing is enabled\");const e=[];return t.allowedTracingUrls.forEach((t=>{pr(t)?e.push({match:t,propagatorTypes:Er}):!function(t){const e=t;return\"object\"===ft(e)&&pr(e.match)&&Array.isArray(e.propagatorTypes)}(t)?o.warn(\"Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter\",t):e.push(t)})),e}(t);if(!c)return;const u=ce(t);if(!u)return;const l=null!==(e=t.sessionReplaySampleRate)&&void 0!==e?e:0;return{applicationId:t.applicationId,version:t.version||void 0,actionNameAttribute:t.actionNameAttribute,sessionReplaySampleRate:l,startSessionReplayRecordingManually:void 0!==t.startSessionReplayRecordingManually?!!t.startSessionReplayRecordingManually:0===l,traceSampleRate:null!==(n=t.traceSampleRate)&&void 0!==n?n:100,rulePsr:d(t.traceSampleRate)?t.traceSampleRate/100:void 0,allowedTracingUrls:c,excludedActivityUrls:null!==(r=t.excludedActivityUrls)&&void 0!==r?r:[],workerUrl:t.workerUrl,compressIntakeRequests:!!t.compressIntakeRequests,trackUserInteractions:!(null!==(i=t.trackUserInteractions)&&void 0!==i&&!i),trackViewsManually:!!t.trackViewsManually,trackResources:!(null!==(s=t.trackResources)&&void 0!==s&&!s),trackLongTasks:!(null!==(a=t.trackLongTasks)&&void 0!==a&&!a),subdomain:t.subdomain,defaultPrivacyLevel:O(oe,t.defaultPrivacyLevel)?t.defaultPrivacyLevel:oe.MASK,enablePrivacyForActionName:!!t.enablePrivacyForActionName,customerDataTelemetrySampleRate:1,traceContextInjection:O(ie,t.traceContextInjection)?t.traceContextInjection:ie.SAMPLED,plugins:t.plugins||[],...u}}function Rr(t){const e=new Set;return Array.isArray(t.allowedTracingUrls)&&t.allowedTracingUrls.length>0&&t.allowedTracingUrls.forEach((t=>{pr(t)?Er.forEach((t=>e.add(t))):\"object\"===ft(t)&&Array.isArray(t.propagatorTypes)&&t.propagatorTypes.forEach((t=>e.add(t)))})),Array.from(e)}const Ir=\"https://d3uc069fcn7uxw.cloudfront.net/configuration\";function Nr(t,e){!function(t,e){const n=new XMLHttpRequest;Ke(t,n,\"load\",(function(){200===n.status?e(JSON.parse(n.responseText)):Or()})),Ke(t,n,\"error\",(function(){Or()})),n.open(\"GET\",`${Ir}/${encodeURIComponent(t.remoteConfigurationId)}.json`),n.send()}(t,(n=>{e(function(t,e){return{...t,...e}}(t,n))}))}function Or(){o.error(\"Error fetching the remote configuration.\")}function Lr({ignoreInitIfSyntheticsWillInjectRum:t,startDeflateWorker:e},n,r,i,s){const a=cn();let c,u,l,d;const f=r.observable.subscribe(p);function p(){if(!l||!d||!r.isGranted())return;let t;if(f.unsubscribe(),d.trackViewsManually){if(!c)return;a.remove(c.callback),t=c.options}const e=s(d,u,t);a.drain(e)}function h(t){const n=zn();if(n&&(t=function(t){var e,n;return{...t,applicationId:\"00000000-aaaa-0000-aaaa-000000000000\",clientToken:\"empty\",sessionSampleRate:100,defaultPrivacyLevel:null!==(e=t.defaultPrivacyLevel)&&void 0!==e?e:null===(n=Un())||void 0===n?void 0:n.getPrivacyLevel()}}(t)),l=t,function(t){mn({type:ln,configuration:t})}(function(t){var e;const n={session_sample_rate:(r=t).sessionSampleRate,telemetry_sample_rate:r.telemetrySampleRate,telemetry_configuration_sample_rate:r.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:r.telemetryUsageSampleRate,use_before_send:!!r.beforeSend,use_partitioned_cross_site_session_cookie:r.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:r.useSecureSessionCookie,use_proxy:!!r.proxy,silent_multiple_init:r.silentMultipleInit,track_session_across_subdomains:r.trackSessionAcrossSubdomains,track_anonymous_user:r.trackAnonymousUser,session_persistence:r.sessionPersistence,allow_fallback_to_local_storage:!!r.allowFallbackToLocalStorage,store_contexts_across_pages:!!r.storeContextsAcrossPages,allow_untrusted_events:!!r.allowUntrustedEvents,tracking_consent:r.trackingConsent};var r;return{session_replay_sample_rate:t.sessionReplaySampleRate,start_session_replay_recording_manually:t.startSessionReplayRecordingManually,trace_sample_rate:t.traceSampleRate,trace_context_injection:t.traceContextInjection,action_name_attribute:t.actionNameAttribute,use_allowed_tracing_urls:Array.isArray(t.allowedTracingUrls)&&t.allowedTracingUrls.length>0,selected_tracing_propagators:Rr(t),default_privacy_level:t.defaultPrivacyLevel,enable_privacy_for_action_name:t.enablePrivacyForActionName,use_excluded_activity_urls:Array.isArray(t.excludedActivityUrls)&&t.excludedActivityUrls.length>0,use_worker_url:!!t.workerUrl,compress_intake_requests:t.compressIntakeRequests,track_views_manually:t.trackViewsManually,track_user_interactions:t.trackUserInteractions,track_resources:t.trackResources,track_long_task:t.trackLongTasks,plugins:null===(e=t.plugins)||void 0===e?void 0:e.map((t=>{var e;return{name:t.name,...null===(e=t.getConfigurationTelemetry)||void 0===e?void 0:e.call(t)}})),...n}}(t)),d)return void We(\"DD_RUM\",t);const i=Ar(t);i&&(n||i.sessionStoreStrategyType?i.compressIntakeRequests&&!n&&e&&(u=e(i,\"Datadog RUM\",X),!u)||(d=i,er().subscribe(X),r.tryToInit(i.trackingConsent),p()):o.warn(\"No storage available for session. We will not send any data.\"))}const m=t=>{a.add((e=>e.addDurationVital(t)))};return{init(e,n){e?(de(e.enableExperimentalFeatures),l=e,t&&fr()||(!function(t,e,n){if(t)for(const r of t){const t=r[e];t&&t(n)}}(e.plugins,\"onInit\",{initConfiguration:e,publicApi:n}),e.remoteConfigurationId&&fe(ue.REMOTE_CONFIGURATION)?Nr(e,h):h(e))):o.error(\"Missing configuration\")},get initConfiguration(){return l},getInternalContext:X,stopSession:X,addTiming(t,e=_()){a.add((n=>n.addTiming(t,e)))},startView(t,e=w()){const n=n=>{n.startView(t,e)};a.add(n),c||(c={options:t,callback:n},p())},setViewName(t){a.add((e=>e.setViewName(t)))},setViewContext(t){a.add((e=>e.setViewContext(t)))},setViewContextProperty(t,e){a.add((n=>n.setViewContextProperty(t,e)))},addAction(t,e=n()){a.add((n=>n.addAction(t,e)))},addError(t,e=n()){a.add((n=>n.addError(t,e)))},addFeatureFlagEvaluation(t,e){a.add((n=>n.addFeatureFlagEvaluation(t,e)))},startDurationVital:(t,e)=>gr(i,t,e),stopDurationVital(t,e){vr(m,i,t,e)},addDurationVital:m}}function Mr(){let t;const e=window;if(e.Zone&&(t=D(e,\"MutationObserver\"),e.MutationObserver&&t===e.MutationObserver)){const n=D(new e.MutationObserver(X),\"originalInstance\");t=n&&n.constructor}return t||(t=e.MutationObserver),t}function Dr(){const t=function(){const t=window._DATADOG_SYNTHETICS_PUBLIC_ID||at(\"datadog-synthetics-public-id\");return\"string\"==typeof t?t:void 0}(),e=function(){const t=window._DATADOG_SYNTHETICS_RESULT_ID||at(\"datadog-synthetics-result-id\");return\"string\"==typeof t?t:void 0}();if(t&&e)return{test_id:t,result_id:e,injected:fr()}}function Pr(t,e,n){const r=rn(t),o=n(r);return dt(e).forEach((([e,n])=>{const o=function(t,e){let n=t;for(const t of e.split(\".\")){if(!zr(n,t))return;n=n[t]}return n}(r,e),i=ft(o);i===n?Ur(t,e,Oe(o)):\"object\"!==n||\"undefined\"!==i&&\"null\"!==i||Ur(t,e,{})})),o}function Ur(t,e,n){let r=t;const o=e.split(\".\");for(let t=0;t<o.length;t+=1){const e=o[t];if(!$r(r))return;t!==o.length-1?r=r[e]:r[e]=n}}function $r(t){return\"object\"===ft(t)}function zr(t,e){return $r(t)&&Object.prototype.hasOwnProperty.call(t,e)}const Br={\"view.name\":\"string\",\"view.url\":\"string\",\"view.referrer\":\"string\"},Vr={context:\"object\"},Fr={service:\"string\",version:\"string\"};let jr;function qr(t,e,n,r,i,s,a,c,u,d){jr={view:{...Vr,...Br},error:{\"error.message\":\"string\",\"error.stack\":\"string\",\"error.resource.url\":\"string\",\"error.fingerprint\":\"string\",...Vr,...Br,...Fr},resource:{\"resource.url\":\"string\",...fe(ue.WRITABLE_RESOURCE_GRAPHQL)?{\"resource.graphql\":\"object\"}:{},...Vr,...Br,...Fr},action:{\"action.target.name\":\"string\",...Vr,...Br,...Fr},long_task:{...Vr,...Br},vital:{...Vr,...Br}};const f={error:Gn(\"error\",t.eventRateLimiterThreshold,d),action:Gn(\"action\",t.eventRateLimiterThreshold,d),vital:Gn(\"vital\",t.eventRateLimiterThreshold,d)},p=Dr();e.subscribe(11,(({startTime:d,rawRumEvent:h,domainContext:m,savedCommonContext:g,customerContext:v})=>{const b=r.findView(d),w=i.findUrl(d),S=n.findTrackedSession(d);if(S&&b&&w){const n=g||u(),r=s.findActionId(d),i=on({_dd:{format_version:2,drift:Math.round(y()-C(E(),performance.now())),configuration:{session_sample_rate:l(t.sessionSampleRate,3),session_replay_sample_rate:l(t.sessionReplaySampleRate,3)},browser_sdk_version:zn()?\"6.0.0\":void 0},application:{id:t.applicationId},date:_(),service:b.service||t.service,version:b.version||t.version,source:\"browser\",session:{id:S.id,type:p?\"synthetics\":c.get()?\"ci_test\":\"user\"},view:{id:b.id,name:b.name,url:w.url,referrer:w.referrer},action:(k=h,-1!==[\"error\",\"resource\",\"long_task\"].indexOf(k.type)&&r?{id:r}:void 0),synthetics:p,ci_test:c.get(),display:a.get(),connectivity:sn()},h);i.context=on(n.context,b.context,v),\"has_replay\"in i.session||(i.session.has_replay=n.hasReplay),\"view\"===i.type&&(i.session.sampled_for_replay=1===S.sessionReplay),S.anonymousId&&!n.user.anonymous_id&&t.trackAnonymousUser&&(n.user.anonymous_id=S.anonymousId),L(n.user)||(i.usr=n.user),function(t,e,n,r){var i;if(e){const r=Pr(t,jr[t.type],(t=>e(t,n)));if(!1===r&&\"view\"!==t.type)return!1;!1===r&&o.warn(\"Can't dismiss view events using beforeSend!\")}const s=null===(i=r[t.type])||void 0===i?void 0:i.isLimitReached();return!s}(i,t.beforeSend,m,f)&&(L(i.context)&&delete i.context,e.notify(12,i))}var k}))}const Hr=class{constructor(){this.callbacks={}}notify(t,e){const n=this.callbacks[t];n&&n.forEach((t=>t(e)))}subscribe(t,e){return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),{unsubscribe:()=>{this.callbacks[t]=this.callbacks[t].filter((t=>e!==t))}}}},Gr=ht;const Wr=\"initial_document\",Kr=[[\"document\",t=>Wr===t],[\"xhr\",t=>\"xmlhttprequest\"===t],[\"fetch\",t=>\"fetch\"===t],[\"beacon\",t=>\"beacon\"===t],[\"css\",(t,e)=>/\\.css$/i.test(e)],[\"js\",(t,e)=>/\\.js$/i.test(e)],[\"image\",(t,e)=>[\"image\",\"img\",\"icon\"].includes(t)||null!==/\\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(e)],[\"font\",(t,e)=>null!==/\\.(woff|eot|woff2|ttf)$/i.exec(e)],[\"media\",(t,e)=>[\"audio\",\"video\"].includes(t)||null!==/\\.(mp3|mp4)$/i.exec(e)]];function Jr(t){const e=t.name;if(!function(t){try{return!!Gt(t)}catch(t){return!1}}(e))return vn(`Failed to construct URL for \"${t.name}\"`),\"other\";const n=function(t){const e=Gt(t).pathname;return\"/\"===e[0]?e:`/${e}`}(e);for(const[e,r]of Kr)if(r(t.initiatorType,n))return e;return\"other\"}function Xr(...t){for(let e=1;e<t.length;e+=1)if(t[e-1]>t[e])return!1;return!0}function Yr(t){return\"xmlhttprequest\"===t.initiatorType||\"fetch\"===t.initiatorType}function Zr(t){const{duration:e,startTime:n,responseEnd:r}=t;return v(0===e&&n<r?k(n,r):e)}function Qr(t){if(!eo(t))return;const{startTime:e,fetchStart:n,workerStart:r,redirectStart:o,redirectEnd:i,domainLookupStart:s,domainLookupEnd:a,connectStart:c,secureConnectionStart:u,connectEnd:l,requestStart:d,responseStart:f,responseEnd:p}=t,h={download:no(e,f,p),first_byte:no(e,d,f)};return 0<r&&r<n&&(h.worker=no(e,r,n)),n<l&&(h.connect=no(e,c,l),c<=u&&u<=l&&(h.ssl=no(e,u,l))),n<a&&(h.dns=no(e,s,a)),e<i&&(h.redirect=no(e,o,i)),h}function to(t){return t.duration>=0}function eo(t){const e=Xr(t.startTime,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.requestStart,t.responseStart,t.responseEnd),n=!function(t){return t.redirectEnd>t.startTime}(t)||Xr(t.startTime,t.redirectStart,t.redirectEnd,t.fetchStart);return e&&n}function no(t,e,n){if(t<=e&&e<=n)return{duration:v(k(e,n)),start:v(k(t,e))}}function ro(t){return\"\"===t.nextHopProtocol?void 0:t.nextHopProtocol}function oo(t){return\"\"===t.deliveryType?\"other\":t.deliveryType}function io(t){if(t.startTime<t.responseStart){const{encodedBodySize:e,decodedBodySize:n,transferSize:r}=t;return{size:n,encoded_body_size:e,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function so(t){return t&&!function(t){return te.every((e=>t.includes(e)))}(t)}const ao=/data:(.+)?(;base64)?,/g;function co(t){return!(t.length<=24e3)&&(\"data:\"===t.substring(0,5)&&(t=t.substring(0,24e3),!0))}function uo(t){return`${t.match(ao)[0]}[...]`}let lo=1;function fo(t,e,n){const r=function(t,e){return{clearTracingIfNeeded:xr,traceFetch:n=>Tr(t,n,e,(t=>{var e;if(n.input instanceof Request&&!(null===(e=n.init)||void 0===e?void 0:e.headers))n.input=new Request(n.input),Object.keys(t).forEach((e=>{n.input.headers.append(e,t[e])}));else{n.init=N(n.init);const e=[];n.init.headers instanceof Headers?n.init.headers.forEach(((t,n)=>{e.push([n,t])})):Array.isArray(n.init.headers)?n.init.headers.forEach((t=>{e.push(t)})):n.init.headers&&Object.keys(n.init.headers).forEach((t=>{e.push([t,n.init.headers[t]])})),n.init.headers=e.concat(dt(t))}})),traceXhr:(n,r)=>Tr(t,n,e,(t=>{Object.keys(t).forEach((e=>{r.setRequestHeader(e,t[e])}))}))}}(e,n);!function(t,e,n){const r=Yn(e).subscribe((e=>{const r=e;if(so(r.url))switch(r.state){case\"start\":n.traceXhr(r,r.xhr),r.requestIndex=po(),t.notify(6,{requestIndex:r.requestIndex,url:r.url});break;case\"complete\":n.clearTracingIfNeeded(r),t.notify(7,{duration:r.duration,method:r.method,requestIndex:r.requestIndex,spanId:r.spanId,startClocks:r.startClocks,status:r.status,traceId:r.traceId,traceSampled:r.traceSampled,type:\"xhr\",url:r.url,xhr:r.xhr,isAborted:r.isAborted,handlingStack:r.handlingStack})}}))}(t,e,r),function(t,e){const n=er().subscribe((n=>{const r=n;if(so(r.url))switch(r.state){case\"start\":e.traceFetch(r),r.requestIndex=po(),t.notify(6,{requestIndex:r.requestIndex,url:r.url});break;case\"resolve\":!function(t,e){const n=t.response&&function(t){try{return t.clone()}catch(t){return}}(t.response);n&&n.body?function(t,e,n){const r=t.getReader();let o=0;function i(){r.cancel().catch(X),e(void 0,void 0,void 0)}!function t(){r.read().then(z((e=>{e.done?i():(o+=e.value.length,o>n.bytesLimit?i():t())})),z((t=>e(t))))}()}(n.body,(()=>{e(k(t.startClocks.timeStamp,_()))}),{bytesLimit:Number.POSITIVE_INFINITY}):e(k(t.startClocks.timeStamp,_()))}(r,(n=>{e.clearTracingIfNeeded(r),t.notify(7,{duration:n,method:r.method,requestIndex:r.requestIndex,responseType:r.responseType,spanId:r.spanId,startClocks:r.startClocks,status:r.status,traceId:r.traceId,traceSampled:r.traceSampled,type:\"fetch\",url:r.url,response:r.response,init:r.init,input:r.input,isAborted:r.isAborted,handlingStack:r.handlingStack})}))}}))}(t,r)}function po(){const t=lo;return lo+=1,t}function ho(t){return d(t)&&t<0?void 0:t}function mo({lifeCycle:t,isChildEvent:e,onChange:n=X}){const r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=t.subscribe(12,(t=>{var o;if(\"view\"!==t.type&&\"vital\"!==t.type&&e(t))switch(t.type){case\"error\":r.errorCount+=1,n();break;case\"action\":r.actionCount+=1,t.action.frustration&&(r.frustrationCount+=t.action.frustration.type.length),n();break;case\"long_task\":r.longTaskCount+=1,n();break;case\"resource\":(null===(o=t._dd)||void 0===o?void 0:o.discarded)||(r.resourceCount+=1,n())}}));return{stop:()=>{o.unsubscribe()},eventCounts:r}}function go(t,e){const n=y();let r=!1;const{stop:o}=Je(t,window,[\"click\",\"mousedown\",\"keydown\",\"touchstart\",\"pointerdown\"],(e=>{if(!e.cancelable)return;const n={entryType:\"first-input\",processingStart:b(),processingEnd:b(),startTime:e.timeStamp,duration:0,name:\"\",cancelable:!1,target:null,toJSON:()=>({})};\"pointerdown\"===e.type?function(t,e){Je(t,window,[\"pointerup\",\"pointercancel\"],(t=>{\"pointerup\"===t.type&&i(e)}),{once:!0})}(t,n):i(n)}),{passive:!0,capture:!0});return{stop:o};function i(t){if(!r){r=!0,o();const i=t.processingStart-t.startTime;i>=0&&i<y()-n&&e(t)}}}var vo;function yo(t,e){return new W((n=>{if(!window.PerformanceObserver)return;const r=t=>{const e=function(t){return t.filter((t=>!function(t){return!(t.entryType!==vo.RESOURCE||so(t.name)&&to(t))}(t)))}(t);e.length>0&&n.notify(e)};let o,i=!0;const s=new PerformanceObserver(z((t=>{i?o=j((()=>r(t.getEntries()))):r(t.getEntries())})));try{s.observe(e)}catch(t){if([vo.RESOURCE,vo.NAVIGATION,vo.LONG_TASK,vo.PAINT].includes(e.type)){e.buffered&&(o=j((()=>r(performance.getEntriesByType(e.type)))));try{s.observe({entryTypes:[e.type]})}catch(t){return}}}let a;return i=!1,function(t){!_o&&void 0!==window.performance&&\"getEntries\"in performance&&\"addEventListener\"in performance&&(_o=Ke(t,performance,\"resourcetimingbufferfull\",(()=>{performance.clearResourceTimings()})))}(t),bo(vo.FIRST_INPUT)||e.type!==vo.FIRST_INPUT||({stop:a}=go(t,(t=>{r([t])}))),()=>{s.disconnect(),a&&a(),q(o)}}))}let _o;function bo(t){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes(t)}!function(t){t.EVENT=\"event\",t.FIRST_INPUT=\"first-input\",t.LARGEST_CONTENTFUL_PAINT=\"largest-contentful-paint\",t.LAYOUT_SHIFT=\"layout-shift\",t.LONG_TASK=\"longtask\",t.LONG_ANIMATION_FRAME=\"long-animation-frame\",t.NAVIGATION=\"navigation\",t.PAINT=\"paint\",t.RESOURCE=\"resource\"}(vo||(vo={}));const wo=100;function So(t,e,n,r,o,i){const s=function(t,e,n,r){return new W((o=>{const i=[];let s,a=0;return i.push(e.subscribe(c),n.subscribe(c),yo(r,{type:vo.RESOURCE}).subscribe((t=>{t.some((t=>!ko(r,t.name)))&&c()})),t.subscribe(6,(t=>{ko(r,t.url)||(void 0===s&&(s=t.requestIndex),a+=1,c())})),t.subscribe(7,(t=>{ko(r,t.url)||void 0===s||t.requestIndex<s||(a-=1,c())}))),()=>{i.forEach((t=>t.unsubscribe()))};function c(){o.notify({isBusy:a>0})}}))}(t,e,n,r);return function(t,e,n){let r,o=!1;const i=j(z((()=>u({hadActivity:!1}))),100),s=void 0!==n?j(z((()=>u({hadActivity:!0,end:_()}))),n):void 0,a=t.subscribe((({isBusy:t})=>{q(i),q(r);const e=_();t||(r=j(z((()=>u({hadActivity:!0,end:e}))),100))})),c=()=>{o=!0,q(i),q(r),q(s),a.unsubscribe()};function u(t){o||(c(),e(t))}return{stop:c}}(s,o,i)}function ko(t,e){return hr(t.excludedActivityUrls,e)}function Co(t){return t.nodeType===Node.TEXT_NODE}function xo(t){return t.nodeType===Node.ELEMENT_NODE}function To(t){return xo(t)&&Boolean(t.shadowRoot)}function Eo(t){const e=t;return!!e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&xo(e.host)}function Ao(t,e){let n=t.firstChild;for(;n;)e(n),n=n.nextSibling;To(t)&&e(t.shadowRoot)}function Ro(t){return Eo(t)?t.host:t.parentNode}const Io={IGNORE:\"ignore\",HIDDEN:\"hidden\",ALLOW:oe.ALLOW,MASK:oe.MASK,MASK_USER_INPUT:oe.MASK_USER_INPUT},No=\"data-dd-privacy\",Oo=\"hidden\",Lo=\"***\",Mo=\"data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==\",Do={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function Po(t,e,n){if(n&&n.has(t))return n.get(t);const r=Ro(t),o=r?Po(r,e,n):e,i=Uo($o(t),o);return n&&n.set(t,i),i}function Uo(t,e){switch(e){case Io.HIDDEN:case Io.IGNORE:return e}switch(t){case Io.ALLOW:case Io.MASK:case Io.MASK_USER_INPUT:case Io.HIDDEN:case Io.IGNORE:return t;default:return e}}function $o(t){if(xo(t)){if(\"BASE\"===t.tagName)return Io.ALLOW;if(\"INPUT\"===t.tagName){const e=t;if(\"password\"===e.type||\"email\"===e.type||\"tel\"===e.type)return Io.MASK;if(\"hidden\"===e.type)return Io.MASK;const n=e.getAttribute(\"autocomplete\");if(n&&(n.startsWith(\"cc-\")||n.endsWith(\"-password\")))return Io.MASK}return t.matches(Fo(Io.HIDDEN))?Io.HIDDEN:t.matches(Fo(Io.MASK))?Io.MASK:t.matches(Fo(Io.MASK_USER_INPUT))?Io.MASK_USER_INPUT:t.matches(Fo(Io.ALLOW))?Io.ALLOW:function(t){if(\"SCRIPT\"===t.nodeName)return!0;if(\"LINK\"===t.nodeName){const t=e(\"rel\");return/preload|prefetch/i.test(t)&&\"script\"===e(\"as\")||\"shortcut icon\"===t||\"icon\"===t}if(\"META\"===t.nodeName){const n=e(\"name\"),r=e(\"rel\"),o=e(\"property\");return/^msapplication-tile(image|color)$/.test(n)||\"application-name\"===n||\"icon\"===r||\"apple-touch-icon\"===r||\"shortcut icon\"===r||\"keywords\"===n||\"description\"===n||/^(og|twitter|fb):/.test(o)||/^(og|twitter):/.test(n)||\"pinterest\"===n||\"robots\"===n||\"googlebot\"===n||\"bingbot\"===n||t.hasAttribute(\"http-equiv\")||\"author\"===n||\"generator\"===n||\"framework\"===n||\"publisher\"===n||\"progid\"===n||/^article:/.test(o)||/^product:/.test(o)||\"google-site-verification\"===n||\"yandex-verification\"===n||\"csrf-token\"===n||\"p:domain_verify\"===n||\"verify-v1\"===n||\"verification\"===n||\"shopify-checkout-api-token\"===n}function e(e){return(t.getAttribute(e)||\"\").toLowerCase()}return!1}(t)?Io.IGNORE:void 0}}function zo(t,e){switch(e){case Io.MASK:case Io.HIDDEN:case Io.IGNORE:return!0;case Io.MASK_USER_INPUT:return Co(t)?Bo(t.parentNode):Bo(t);default:return!1}}function Bo(t){if(!t||t.nodeType!==t.ELEMENT_NODE)return!1;const e=t;if(\"INPUT\"===e.tagName)switch(e.type){case\"button\":case\"color\":case\"reset\":case\"submit\":return!1}return!!Do[e.tagName]}function Vo(t,e,n){var r;const o=null===(r=t.parentElement)||void 0===r?void 0:r.tagName;let i=t.textContent||\"\";if(e&&!i.trim())return;if(\"SCRIPT\"===o)i=Lo;else if(n===Io.HIDDEN)i=Lo;else if(zo(t,n))if(\"DATALIST\"===o||\"SELECT\"===o||\"OPTGROUP\"===o){if(!i.trim())return}else i=\"OPTION\"===o?Lo:i.replace(/\\S/g,\"x\");return i}function Fo(t){return`[${No}=\"${t}\"], .dd-privacy-${t}`}const jo=\"data-dd-action-name\";function qo(t,e){const n=t.closest(`[${e}]`);if(!n)return;return Xo(Jo(n.getAttribute(e).trim()))}const Ho=[(t,e)=>{if(\"labels\"in t&&t.labels&&t.labels.length>0)return Zo(t.labels[0],e)},t=>{if(\"INPUT\"===t.nodeName){const e=t,n=e.getAttribute(\"type\");if(\"button\"===n||\"submit\"===n||\"reset\"===n)return{name:e.value,nameSource:\"text_content\"}}},(t,e,n)=>{if(\"BUTTON\"===t.nodeName||\"LABEL\"===t.nodeName||\"button\"===t.getAttribute(\"role\"))return Zo(t,e,n)},t=>Yo(t,\"aria-label\"),(t,e,n)=>{const r=t.getAttribute(\"aria-labelledby\");if(r)return{name:r.split(/\\s+/).map((e=>function(t,e){return t.ownerDocument?t.ownerDocument.getElementById(e):null}(t,e))).filter((t=>Boolean(t))).map((t=>Qo(t,e,n))).join(\" \"),nameSource:\"text_content\"}},t=>Yo(t,\"alt\"),t=>Yo(t,\"name\"),t=>Yo(t,\"title\"),t=>Yo(t,\"placeholder\"),(t,e)=>{if(\"options\"in t&&t.options.length>0)return Zo(t.options[0],e)}],Go=[(t,e,n)=>Zo(t,e,n)],Wo=10;function Ko(t,e,n,r){let o=t,i=0;for(;i<=Wo&&o&&\"BODY\"!==o.nodeName&&\"HTML\"!==o.nodeName&&\"HEAD\"!==o.nodeName;){for(const t of n){const n=t(o,e,r);if(n){const{name:t,nameSource:e}=n,r=t&&t.trim();if(r)return{name:Xo(Jo(r)),nameSource:e}}}if(\"FORM\"===o.nodeName)break;o=o.parentElement,i+=1}}function Jo(t){return t.replace(/\\s+/g,\" \")}function Xo(t){return t.length>100?`${tt(t,100)} [...]`:t}function Yo(t,e){return{name:t.getAttribute(e)||\"\",nameSource:\"standard_attribute\"}}function Zo(t,e,n){return{name:Qo(t,e,n)||\"\",nameSource:\"text_content\"}}function Qo(t,e,n){if(!t.isContentEditable){if(\"innerText\"in t){let r=t.innerText;const o=e=>{const n=t.querySelectorAll(e);for(let t=0;t<n.length;t+=1){const e=n[t];if(\"innerText\"in e){const t=e.innerText;t&&t.trim().length>0&&(r=r.replace(t,\"\"))}}};return o(`[${jo}]`),e&&o(`[${e}]`),n&&o(`${Fo(Io.HIDDEN)}, ${Fo(Io.MASK)}`),r}return t.textContent}}const ti=[jo,\"data-testid\",\"data-test\",\"data-qa\",\"data-cy\",\"data-test-id\",\"data-qa-id\",\"data-testing\",\"data-component\",\"data-element\",\"data-source-file\"],ei=[ii,function(t){if(t.id&&!oi(t.id))return`#${CSS.escape(t.id)}`}],ni=[ii,function(t){if(\"BODY\"===t.tagName)return;const e=t.classList;for(let n=0;n<e.length;n+=1){const r=e[n];if(!oi(r))return`${CSS.escape(t.tagName)}.${CSS.escape(r)}`}},function(t){return CSS.escape(t.tagName)}];function ri(t,e){if(!function(t){if(\"isConnected\"in t)return t.isConnected;return t.ownerDocument.documentElement.contains(t)}(t))return;let n,r=t;for(;r&&\"HTML\"!==r.nodeName;){const t=ai(r,ei,ci,e,n);if(t)return t;n=ai(r,ni,ui,e,n)||li(si(r),n),r=r.parentElement}return n}function oi(t){return/[0-9]/.test(t)}function ii(t,e){if(e){const t=n(e);if(t)return t}for(const t of ti){const e=n(t);if(e)return e}function n(e){if(t.hasAttribute(e))return`${CSS.escape(t.tagName)}[${e}=\"${CSS.escape(t.getAttribute(e))}\"]`}}function si(t){let e=t.parentElement.firstElementChild,n=1;for(;e&&e!==t;)e.tagName===t.tagName&&(n+=1),e=e.nextElementSibling;return`${CSS.escape(t.tagName)}:nth-of-type(${n})`}function ai(t,e,n,r,o){for(const i of e){const e=i(t,r);if(e&&n(t,e,o))return li(e,o)}}function ci(t,e,n){return 1===t.ownerDocument.querySelectorAll(li(e,n)).length}function ui(t,e,n){let r;if(void 0===n)r=t=>t.matches(e);else{const t=function(){if(void 0===di)try{document.querySelector(\":scope\"),di=!0}catch(t){di=!1}return di}()?li(`${e}:scope`,n):li(e,n);r=e=>null!==e.querySelector(t)}let o=t.parentElement.firstElementChild;for(;o;){if(o!==t&&r(o))return!1;o=o.nextElementSibling}return!0}function li(t,e){return e?`${t}>${e}`:t}let di;const fi=f;function pi(t,e){const n=[];let r,o=0;function i(t){t.stopObservable.subscribe(s),n.push(t),q(r),r=j(a,fi)}function s(){1===o&&n.every((t=>t.isStopped()))&&(o=2,e(n))}function a(){q(r),0===o&&(o=1,s())}return i(t),{tryAppend:t=>{return 0===o&&(n.length>0&&(e=n[n.length-1].event,r=t.event,!(e.target===r.target&&(s=e,c=r,Math.sqrt(Math.pow(s.clientX-c.clientX,2)+Math.pow(s.clientY-c.clientY,2))<=100)&&e.timeStamp-r.timeStamp<=fi))?(a(),!1):(i(t),!0));var e,r,s,c},stop:()=>{a()}}}function hi(){const t=window.getSelection();return!t||t.isCollapsed}function mi(t){return t.target instanceof Element&&!1!==t.isPrimary}function gi(t,e){if(function(t){if(t.some((t=>t.getUserActivity().selection||t.getUserActivity().scroll)))return!1;for(let e=0;e<t.length-2;e+=1)if(t[e+3-1].event.timeStamp-t[e].event.timeStamp<=f)return!0;return!1}(t))return e.addFrustration(\"rage_click\"),t.some(yi)&&e.addFrustration(\"dead_click\"),e.hasError&&e.addFrustration(\"error_click\"),{isRage:!0};const n=t.some((t=>t.getUserActivity().selection));return t.forEach((t=>{t.hasError&&t.addFrustration(\"error_click\"),yi(t)&&!n&&t.addFrustration(\"dead_click\")})),{isRage:!1}}const vi='input:not([type=\"checkbox\"]):not([type=\"radio\"]):not([type=\"button\"]):not([type=\"submit\"]):not([type=\"reset\"]):not([type=\"range\"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function yi(t){return!(t.hasPageActivity||t.getUserActivity().input||t.getUserActivity().scroll)&&!t.event.target.matches(vi)}const _i=1e4,bi=new Map;function wi(t,e){bi.set(t,e),bi.forEach(((t,e)=>{k(e,b())>1e4&&bi.delete(e)}))}function Si(t,e,n,r){const o=kn({expireDelay:3e5}),i=new W;let s;t.subscribe(9,(()=>{o.reset()})),t.subscribe(4,u);const{stop:a}=function(t,{onPointerDown:e,onPointerUp:n}){let r,o,i={selection:!1,input:!1,scroll:!1};const s=[Ke(t,window,\"pointerdown\",(t=>{mi(t)&&(r=hi(),i={selection:!1,input:!1,scroll:!1},o=e(t))}),{capture:!0}),Ke(t,window,\"selectionchange\",(()=>{r&&hi()||(i.selection=!0)}),{capture:!0}),Ke(t,window,\"scroll\",(()=>{i.scroll=!0}),{capture:!0,passive:!0}),Ke(t,window,\"pointerup\",(t=>{if(mi(t)&&o){const e=i;n(o,t,(()=>e)),o=void 0}}),{capture:!0}),Ke(t,window,\"input\",(()=>{i.input=!0}),{capture:!0})];return{stop:()=>{s.forEach((t=>t.stop()))}}}(r,{onPointerDown:o=>function(t,e,n,r,o){const i=t.enablePrivacyForActionName?Po(r.target,t.defaultPrivacyLevel):Io.ALLOW;if(i===Io.HIDDEN)return;const s=function(t,e,n){const r=t.target.getBoundingClientRect(),o=ri(t.target,n.actionNameAttribute);o&&wi(t.timeStamp,o);const i=function(t,{enablePrivacyForActionName:e,actionNameAttribute:n},r){const o=qo(t,jo)||n&&qo(t,n);return o?{name:o,nameSource:\"custom_attribute\"}:r===Io.MASK?{name:\"Masked Element\",nameSource:\"mask_placeholder\"}:Ko(t,n,Ho,e)||Ko(t,n,Go,e)||{name:\"\",nameSource:\"blank\"}}(t.target,n,e);return{type:\"click\",target:{width:Math.round(r.width),height:Math.round(r.height),selector:o},position:{x:Math.round(t.clientX-r.left),y:Math.round(t.clientY-r.top)},name:i.name,nameSource:i.nameSource}}(r,i,t);let a=!1;return So(e,n,o,t,(t=>{a=t.hadActivity}),wo),{clickActionBase:s,hadActivityOnPointerDown:()=>a}}(r,t,e,o,n),onPointerUp:({clickActionBase:s,hadActivityOnPointerDown:a},u,l)=>{!function(t,e,n,r,o,i,s,a,c,u,l){var d;const f=ki(e,o,u,a,c);s(f);const p=null===(d=null==a?void 0:a.target)||void 0===d?void 0:d.selector;p&&wi(c.timeStamp,p);const{stop:h}=So(e,n,r,t,(t=>{t.hadActivity&&t.end<f.startClocks.timeStamp?f.discard():t.hadActivity?f.stop(t.end):l()?f.stop(f.startClocks.timeStamp):f.stop()}),_i),m=e.subscribe(4,(({endClocks:t})=>{f.stop(t.timeStamp)})),g=i.subscribe((()=>{f.stop()}));f.stopObservable.subscribe((()=>{m.unsubscribe(),h(),g.unsubscribe()}))}(r,t,e,n,o,i,c,s,u,l,a)}});return{stop:()=>{u(),i.notify(),a()},actionContexts:{findActionId:t=>o.findAll(t)}};function c(t){if(!s||!s.tryAppend(t)){const e=t.clone();s=pi(t,(t=>{!function(t,e){const{isRage:n}=gi(t,e);n?(t.forEach((t=>t.discard())),e.stop(_()),e.validate(t.map((t=>t.event)))):(e.discard(),t.forEach((t=>t.validate())))}(t,e)}))}}function u(){s&&s.stop()}}function ki(t,e,n,r,o){const i=Y(),s=w(),a=e.add(i,s.relative),c=mo({lifeCycle:t,isChildEvent:t=>void 0!==t.action&&(Array.isArray(t.action.id)?t.action.id.includes(i):t.action.id===i)});let u,l=0;const d=[],f=new W;function p(t){0===l&&(u=t,l=1,u?a.close(x(u)):a.remove(),c.stop(),f.notify())}return{event:o,stop:p,stopObservable:f,get hasError(){return c.eventCounts.errorCount>0},get hasPageActivity(){return void 0!==u},getUserActivity:n,addFrustration:t=>{d.push(t)},startClocks:s,isStopped:()=>1===l||2===l,clone:()=>ki(t,e,n,r,o),validate:e=>{if(p(),1!==l)return;const{resourceCount:n,errorCount:a,longTaskCount:f}=c.eventCounts,h={duration:u&&k(s.timeStamp,u),startClocks:s,id:i,frustrationTypes:d,counts:{resourceCount:n,errorCount:a,longTaskCount:f},events:null!=e?e:[o],event:o,...r};t.notify(0,h),l=2},discard:()=>{p(),l=2}}}function Ci(t,e){const n=xi(t)?{action:{id:t.id,loading_time:ho(v(t.duration)),frustration:{type:t.frustrationTypes},error:{count:t.counts.errorCount},long_task:{count:t.counts.longTaskCount},resource:{count:t.counts.resourceCount}},_dd:{action:{target:t.target,position:t.position,name_source:fe(ue.ACTION_NAME_MASKING)?t.nameSource:void 0}}}:void 0,r=xi(t)?void 0:t.context,o=on({action:{id:Y(),target:{name:t.name},type:t.type},date:t.startClocks.timeStamp,type:\"action\",view:{in_foreground:e.wasInPageStateAt(\"active\",t.startClocks.relative)}},n),i=xi(t)?{events:t.events}:{};return!xi(t)&&t.handlingStack&&(i.handlingStack=t.handlingStack),{customerContext:r,rawRumEvent:o,startTime:t.startClocks.relative,domainContext:i}}function xi(t){return\"custom\"!==t.type}function Ti(e,n,r,o){const i=new W;return function(e){const n=ir([t.error]).subscribe((t=>e.notify(t.error)))}(i),Ge(i),function(t,e){const n=Ze(t,[Ye,Xe]).subscribe((t=>e.notify(t)))}(n,i),i.subscribe((t=>e.notify(13,{error:t}))),function(t,e,n){return t.subscribe(13,(({error:r,customerContext:o,savedCommonContext:i})=>{t.notify(11,{customerContext:o,savedCommonContext:i,...Ei(r,e,n)})})),{addError:({error:e,handlingStack:n,startClocks:r,context:o},i)=>{const s=Ue({stackTrace:ze(e)?me(e):void 0,originalError:e,handlingStack:n,startClocks:r,nonErrorPrefix:\"Provided\",source:je,handling:\"handled\"});t.notify(13,{customerContext:o,savedCommonContext:i,error:s})}}}(e,r,o)}function Ei(t,e,n){const r={date:t.startClocks.timeStamp,error:{id:Y(),message:t.message,source:t.source,stack:t.stack,handling_stack:t.handlingStack,type:t.type,handling:t.handling,causes:t.causes,source_type:\"browser\",fingerprint:t.fingerprint,csp:t.csp},type:\"error\",view:{in_foreground:e.wasInPageStateAt(\"active\",t.startClocks.relative)}},o=n.findFeatureFlagEvaluations(t.startClocks.relative);o&&!L(o)&&(r.feature_flags=o);const i={error:t.originalError,handlingStack:t.handlingStack};return{rawRumEvent:r,startTime:t.startClocks.relative,domainContext:i}}const Ai=new WeakSet;function Ri(t){if(!performance||!(\"getEntriesByName\"in performance))return;const e=performance.getEntriesByName(t.url,\"resource\");if(!e.length||!(\"toJSON\"in e[0]))return;const n=e.filter((t=>!Ai.has(t))).filter((t=>to(t)&&eo(t))).filter((e=>function(t,e,n){const r=1;return t.startTime>=e-r&&Ii(t)<=C(n,r)}(e,t.startClocks.relative,Ii({startTime:t.startClocks.relative,duration:t.duration}))));return 1===n.length?(Ai.add(n[0]),n[0].toJSON()):void 0}function Ii(t){return C(t.startTime,t.duration)}function Ni(t){const e=function(t){const e=t.querySelector(\"meta[name=dd-trace-id]\"),n=t.querySelector(\"meta[name=dd-trace-time]\");return Oi(e&&e.content,n&&n.content)}(t)||function(t){const e=function(t){for(let e=0;e<t.childNodes.length;e+=1){const n=Li(t.childNodes[e]);if(n)return n}if(t.body)for(let e=t.body.childNodes.length-1;e>=0;e-=1){const n=t.body.childNodes[e],r=Li(n);if(r)return r;if(!Co(n))break}}(t);if(!e)return;return Oi(Q(e,\"trace-id\"),Q(e,\"trace-time\"))}(t);if(e&&!(e.traceTime<=y()-12e4))return e.traceId}function Oi(t,e){const n=e&&Number(e);if(t&&n)return{traceId:t,traceTime:n}}function Li(t){if(t&&function(t){return t.nodeType===Node.COMMENT_NODE}(t)){const e=/^\\s*DATADOG;(.*?)\\s*$/.exec(t.data);if(e)return e[1]}}function Mi(){if(bo(vo.NAVIGATION)){const t=performance.getEntriesByType(vo.NAVIGATION)[0];if(t)return t}const t=function(){const t={},e=performance.timing;for(const n in e)if(d(e[n])){const r=n,o=e[r];t[r]=0===o?0:x(o)}return t}(),e={entryType:vo.NAVIGATION,initiatorType:\"navigation\",name:window.location.href,startTime:0,duration:t.responseEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...e,toJSON:void 0}),...t};return e}function Di(t,e){Wn(t,\"interactive\",(()=>{const t=Object.assign(Mi().toJSON(),{entryType:vo.RESOURCE,initiatorType:Wr,traceId:Ni(document),toJSON:()=>({...t,toJSON:void 0})});e(t)}))}function Pi(t,e,n,r=function(){const t=[];function e(e){let r;if(e.didTimeout){const t=performance.now();r=()=>30-(performance.now()-t)}else r=e.timeRemaining.bind(e);for(;r()>0&&t.length;)t.shift()();t.length&&n()}function n(){nr(e,{timeout:1e3})}return{push(e){1===t.push(e)&&n()}}}(),o=Di){t.subscribe(7,(t=>{s((()=>function(t,e,n){const r=Ri(t),o=r?m(r.startTime):t.startClocks,i=function(t,e){const n=t.traceSampled&&t.traceId&&t.spanId;if(!n)return;return{_dd:{span_id:t.spanId.toString(),trace_id:t.traceId.toString(),rule_psr:e.rulePsr}}}(t,e);if(!e.trackResources&&!i)return;const s=\"xhr\"===t.type?\"xhr\":\"fetch\",a=r?$i(r):void 0,c=function(t,e,n){return t.wasInPageStateDuringPeriod(\"frozen\",e.relative,n)?void 0:v(n)}(n,o,t.duration),u=on({date:o.timeStamp,resource:{id:Y(),type:s,duration:c,method:t.method,status_code:t.status,protocol:r&&ro(r),url:co(t.url)?uo(t.url):t.url,delivery_type:r&&oo(r)},type:\"resource\",_dd:{discarded:!e.trackResources}},i,a);return{startTime:o.relative,rawRumEvent:u,domainContext:{performanceEntry:r,xhr:t.xhr,response:t.response,requestInput:t.input,requestInit:t.init,error:t.error,isAborted:t.isAborted,handlingStack:t.handlingStack}}}(t,e,n)))}));const i=yo(e,{type:vo.RESOURCE,buffered:!0}).subscribe((t=>{for(const n of t)Yr(n)||s((()=>Ui(n,e)))}));function s(e){r.push((()=>{const n=e();n&&t.notify(11,n)}))}return o(e,(t=>{s((()=>Ui(t,e)))})),{stop:()=>{i.unsubscribe()}}}function Ui(t,e){const n=m(t.startTime),r=function(t,e){const n=t.traceId;if(!n)return;return{_dd:{trace_id:t.traceId,span_id:_r().toString(),rule_psr:e.rulePsr}}}(t,e);if(!e.trackResources&&!r)return;const o=Jr(t),i=$i(t),s=on({date:n.timeStamp,resource:{id:Y(),type:o,url:t.name,status_code:(a=t.responseStatus,0===a?void 0:a),protocol:ro(t),delivery_type:oo(t)},type:\"resource\",_dd:{discarded:!e.trackResources}},r,i);var a;return{startTime:n.relative,rawRumEvent:s,domainContext:{performanceEntry:t}}}function $i(t){const{renderBlockingStatus:e}=t;return{resource:{duration:Zr(t),render_blocking_status:e,...io(t),...Qr(t)}}}function zi(t,e,n=Mi){return function(t,e){let n;const{stop:r}=Wn(t,\"complete\",(()=>{n=j((()=>e()))}));return{stop:()=>{r(),q(n)}}}(t,(()=>{const t=n();(function(t){return t.loadEventEnd<=0})(t)||e(function(t){return{domComplete:t.domComplete,domContentLoaded:t.domContentLoadedEventEnd,domInteractive:t.domInteractive,loadEvent:t.loadEventEnd,firstByte:t.responseStart>=0&&t.responseStart<=b()?t.responseStart:void 0}}(t))}))}function Bi(t,e=window){let n,r;return\"hidden\"===document.visibilityState?n=0:(n=1/0,({stop:r}=Je(t,e,[\"pagehide\",\"visibilitychange\"],(t=>{\"pagehide\"!==t.type&&\"hidden\"!==document.visibilityState||(n=t.timeStamp,r())}),{capture:!0}))),{get timeStamp(){return n},stop(){null==r||r()}}}function Vi(t,e,n){const r={},{stop:o}=zi(t,(t=>{e(t.loadEvent),r.navigationTimings=t,n()})),i=Bi(t),{stop:s}=function(t,e,n){return{stop:yo(t,{type:vo.PAINT,buffered:!0}).subscribe((t=>{const r=t.find((t=>\"first-contentful-paint\"===t.name&&t.startTime<e.timeStamp&&t.startTime<6e5));r&&n(r.startTime)})).unsubscribe}}(t,i,(t=>{r.firstContentfulPaint=t,n()})),{stop:a}=function(t,e,n,r){let o=1/0;const{stop:i}=Je(t,n,[\"pointerdown\",\"keydown\"],(t=>{o=t.timeStamp}),{capture:!0,once:!0});let s=0;const a=yo(t,{type:vo.LARGEST_CONTENTFUL_PAINT,buffered:!0}).subscribe((n=>{const i=function(t,e){for(let n=t.length-1;n>=0;n-=1){const r=t[n];if(e(r,n,t))return r}}(n,(t=>t.entryType===vo.LARGEST_CONTENTFUL_PAINT&&t.startTime<o&&t.startTime<e.timeStamp&&t.startTime<6e5&&t.size>s));if(i){let e;i.element&&(e=ri(i.element,t.actionNameAttribute)),r({value:i.startTime,targetSelector:e}),s=i.size}}));return{stop:()=>{i(),a.unsubscribe()}}}(t,i,window,(t=>{r.largestContentfulPaint=t,n()})),{stop:c}=function(t,e,n){const r=yo(t,{type:vo.FIRST_INPUT,buffered:!0}).subscribe((r=>{const o=r.find((t=>t.startTime<e.timeStamp));if(o){const e=k(o.startTime,o.processingStart);let r;o.target&&xo(o.target)&&(r=ri(o.target,t.actionNameAttribute)),n({delay:e>=0?e:0,time:o.startTime,targetSelector:r})}}));return{stop:()=>{r.unsubscribe()}}}(t,i,(t=>{r.firstInput=t,n()}));return{stop:function(){o(),s(),a(),c(),i.stop()},initialViewMetrics:r}}function Fi(t,e,n){if(!Gi())return{stop:X};let r,o,i=0;n({value:0});const s=function(){let t,e,n=0,r=0;return{update:o=>{let i;return void 0===t||o.startTime-e>=Hi||o.startTime-t>=qi?(t=e=o.startTime,r=n=o.value,i=!0):(n+=o.value,e=o.startTime,i=o.value>r,i&&(r=o.value)),{cumulatedValue:n,isMaxValue:i}}}}(),a=yo(t,{type:vo.LAYOUT_SHIFT,buffered:!0}).subscribe((a=>{for(const c of a){if(c.hadRecentInput||c.startTime<e)continue;const{cumulatedValue:a,isMaxValue:u}=s.update(c);if(u){const t=ji(c.sources);r=t?new WeakRef(t):void 0,o=k(e,c.startTime)}if(a>i){i=a;const e=null==r?void 0:r.deref();n({value:l(i,4),targetSelector:e&&ri(e,t.actionNameAttribute),time:o})}}}));return{stop:()=>{a.unsubscribe()}}}function ji(t){var e;if(t)return null===(e=t.find((t=>!!t.node&&xo(t.node))))||void 0===e?void 0:e.node}const qi=5e3,Hi=f;function Gi(){return bo(vo.LAYOUT_SHIFT)&&\"WeakRef\"in window}let Wi,Ki=0,Ji=1/0,Xi=0;const Yi=()=>Wi?Ki:window.performance.interactionCount||0;function Zi(t,e,n){if(!(bo(vo.EVENT)&&window.PerformanceEventTiming&&\"interactionId\"in PerformanceEventTiming.prototype))return{getInteractionToNextPaint:()=>{},setViewEnd:X,stop:X};const{getViewInteractionCount:r,stopViewInteractionCount:o}=function(t){\"interactionCount\"in performance||Wi||(Wi=new window.PerformanceObserver(z((t=>{t.getEntries().forEach((t=>{const e=t;e.interactionId&&(Ji=Math.min(Ji,e.interactionId),Xi=Math.max(Xi,e.interactionId),Ki=(Xi-Ji)/7+1)}))}))),Wi.observe({type:\"event\",buffered:!0,durationThreshold:0}));const e=\"initial_load\"===t?0:Yi();let n={stopped:!1};function r(){return Yi()-e}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}(n);let i=1/0;const s=function(t){const e=[];function n(){e.sort(((t,e)=>e.duration-t.duration)).splice(10)}return{process(t){const r=e.findIndex((e=>t.interactionId===e.interactionId)),o=e[e.length-1];-1!==r?t.duration>e[r].duration&&(e[r]=t,n()):(e.length<10||t.duration>o.duration)&&(e.push(t),n())},estimateP98Interaction(){const n=Math.min(e.length-1,Math.floor(t()/50));return e[n]}}}(r);let a,c,u=-1;function l(n){for(const t of n)t.interactionId&&t.startTime>=e&&t.startTime<=i&&s.process(t);const r=s.estimateP98Interaction();r&&r.duration!==u&&(u=r.duration,c=k(e,r.startTime),a=function(t){const e=bi.get(t);return bi.delete(t),e}(r.startTime),!a&&r.target&&xo(r.target)&&(a=ri(r.target,t.actionNameAttribute)))}const d=yo(t,{type:vo.FIRST_INPUT,buffered:!0}).subscribe(l),f=yo(t,{type:vo.EVENT,durationThreshold:40,buffered:!0}).subscribe(l);return{getInteractionToNextPaint:()=>u>=0?{value:Math.min(u,6e4),targetSelector:a,time:c}:r()?{value:0}:void 0,setViewEnd:t=>{i=t,o()},stop:()=>{f.unsubscribe(),d.unsubscribe()}}}function Qi(){let t;const e=window.visualViewport;return t=e?e.pageLeft-e.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(t)}function ts(){let t;const e=window.visualViewport;return t=e?e.pageTop-e.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(t)}let es;function ns(t){return es||(es=function(t){return new W((e=>{const{throttled:n}=J((()=>{e.notify(rs())}),200);return Ke(t,window,\"resize\",n,{capture:!0,passive:!0}).stop}))}(t)),es}function rs(){const t=window.visualViewport;return t?{width:Number(t.width*t.scale),height:Number(t.height*t.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}function os(t,e,n,r=function(t,e=1e3){return new W((n=>{function r(){n.notify(function(){const t=ts(),{height:e}=rs(),n=Math.round((document.scrollingElement||document.documentElement).scrollHeight),r=Math.round(e+t);return{scrollHeight:n,scrollDepth:r,scrollTop:t}}())}if(window.ResizeObserver){const n=J(r,e,{leading:!1,trailing:!0}),o=document.scrollingElement||document.documentElement,i=new ResizeObserver(z(n.throttled));o&&i.observe(o);const s=Ke(t,window,\"scroll\",n.throttled,{passive:!0});return()=>{n.cancel(),i.disconnect(),s.stop()}}}))}(t)){let o=0,i=0,s=0;const a=r.subscribe((({scrollDepth:t,scrollTop:r,scrollHeight:a})=>{let c=!1;if(t>o&&(o=t,c=!0),a>i){i=a;const t=b();s=k(e.relative,t),c=!0}c&&n({maxDepth:Math.min(o,i),maxDepthScrollTop:r,maxScrollHeight:i,maxScrollHeightTime:s})}));return{stop:()=>a.unsubscribe()}}function is(t,e,n,r,o,i,s){const a={},{stop:c,setLoadEvent:u}=function(t,e,n,r,o,i,s){let a=\"initial_load\"===o,c=!0;const u=[],l=Bi(r);function d(){if(!c&&!a&&u.length>0){const t=Math.max(...u);t<l.timeStamp&&s(t)}}const{stop:f}=So(t,e,n,r,(t=>{c&&(c=!1,t.hadActivity&&u.push(k(i.timeStamp,t.end)),d())}));return{stop:()=>{f(),l.stop()},setLoadEvent:t=>{a&&(a=!1,u.push(t),d())}}}(t,e,n,r,i,s,(t=>{a.loadingTime=t,o()})),{stop:l}=os(r,s,(t=>{a.scroll=t})),{stop:d}=Fi(r,s.relative,(t=>{a.cumulativeLayoutShift=t,o()})),{stop:f,getInteractionToNextPaint:p,setViewEnd:h}=Zi(r,s.relative,i);return{stop:()=>{c(),d(),l()},stopINPTracking:f,setLoadEvent:u,setViewEnd:h,getCommonViewMetrics:()=>(a.interactionToNextPaint=p(),a)}}const ss=3e5,as=3e5;function cs(t,e,n,r,i,s,a,c){const u=new Set;let l,d=f(\"initial_load\",S(),c);function f(s,a,c){const l=function(t,e,n,r,i,s,a=w(),c){const u=Y(),l=new W,d={};let f,p=0;const m=N(i),g=sr();let v,y,b,S,C=!0;c&&(v=c.name,y=c.service||void 0,b=c.version||void 0,c.context&&(S=c.context,g.setContext(S)));const x={id:u,name:v,startClocks:a,service:y,version:b,context:S};t.notify(1,x),t.notify(2,x);const{throttled:T,cancel:E}=J(z,3e3,{leading:!1}),{setLoadEvent:A,setViewEnd:R,stop:I,stopINPTracking:O,getCommonViewMetrics:L}=is(t,e,n,r,T,s,a),{stop:M,initialViewMetrics:D}=\"initial_load\"===s?Vi(r,A,T):{stop:X,initialViewMetrics:{}},{stop:P,eventCounts:U}=function(t,e,n){const{stop:r,eventCounts:o}=mo({lifeCycle:t,isChildEvent:t=>t.view.id===e,onChange:n});return{stop:r,eventCounts:o}}(t,u,T),$=H(z,ss);function z(){E(),p+=1;const e=void 0===f?_():f.timeStamp;t.notify(3,{customTimings:d,documentVersion:p,id:u,name:v,service:y,version:b,context:g.getContext(),loadingType:s,location:m,startClocks:a,commonViewMetrics:L(),initialViewMetrics:D,duration:k(a.timeStamp,e),isActive:void 0===f,sessionIsActive:C,eventCounts:U})}return z(),g.changeObservable.subscribe(z),{get name(){return v},service:y,version:b,contextManager:g,stopObservable:l,end(e={}){var n,r;f||(f=null!==(n=e.endClocks)&&void 0!==n?n:w(),C=null===(r=e.sessionIsActive)||void 0===r||r,t.notify(4,{endClocks:f}),t.notify(5,{endClocks:f}),G($),R(f.relative),I(),z(),j((()=>{this.stop()}),as))},stop(){M(),P(),O(),l.notify()},addTiming(t,e){if(f)return;const n=function(t){return t<h}(e)?e:k(a.timeStamp,e);d[function(t){const e=t.replace(/[^a-zA-Z0-9-_.@$]/g,\"_\");e!==t&&o.warn(`Invalid timing name: ${t}, sanitized to: ${e}`);return e}(t)]=n,T()},setViewName(t){v=t,z()}}}(e,n,r,i,t,s,a,c);return u.add(l),l.stopObservable.subscribe((()=>{u.delete(l)})),l}return e.subscribe(9,(()=>{d=f(\"route_change\",void 0,{name:d.name,service:d.service,version:d.version,context:d.contextManager.getContext()})})),e.subscribe(8,(()=>{d.end({sessionIsActive:!1})})),e.subscribe(10,(t=>{t.reason===Bn.UNLOADING&&d.end()})),a&&(l=function(t){return t.subscribe((({oldLocation:t,newLocation:e})=>{var n,r;r=e,((n=t).pathname!==r.pathname||!function(t){const e=t.substring(1);return\"\"!==e&&!!document.getElementById(e)}(r.hash)&&us(r.hash)!==us(n.hash))&&(d.end(),d=f(\"route_change\"))}))}(s)),{addTiming:(t,e=_())=>{d.addTiming(t,e)},startView:(t,e)=>{d.end({endClocks:e}),d=f(\"route_change\",e,t)},setViewContext:t=>{d.contextManager.setContext(t)},setViewContextProperty:(t,e)=>{d.contextManager.setContextProperty(t,e)},setViewName:t=>{d.setViewName(t)},stop:()=>{l&&l.unsubscribe(),d.end(),u.forEach((t=>t.stop()))}}}function us(t){const e=t.indexOf(\"?\");return e<0?t:t.slice(0,e)}function ls(t,e,n,r,o,i,s,a,c,u){return t.subscribe(3,(n=>t.notify(11,function(t,e,n,r,o){var i,s,a,c,u,l,d,f,p,h,m,g,y,_,b,w;const S=r.getReplayStats(t.id),k=n.findFeatureFlagEvaluations(t.startClocks.relative),C=o.findAll(t.startClocks.relative,t.duration),x={_dd:{document_version:t.documentVersion,replay_stats:S,page_states:C,configuration:{start_session_replay_recording_manually:e.startSessionReplayRecordingManually}},date:t.startClocks.timeStamp,type:\"view\",view:{action:{count:t.eventCounts.actionCount},frustration:{count:t.eventCounts.frustrationCount},cumulative_layout_shift:null===(i=t.commonViewMetrics.cumulativeLayoutShift)||void 0===i?void 0:i.value,cumulative_layout_shift_time:v(null===(s=t.commonViewMetrics.cumulativeLayoutShift)||void 0===s?void 0:s.time),cumulative_layout_shift_target_selector:null===(a=t.commonViewMetrics.cumulativeLayoutShift)||void 0===a?void 0:a.targetSelector,first_byte:v(null===(c=t.initialViewMetrics.navigationTimings)||void 0===c?void 0:c.firstByte),dom_complete:v(null===(u=t.initialViewMetrics.navigationTimings)||void 0===u?void 0:u.domComplete),dom_content_loaded:v(null===(l=t.initialViewMetrics.navigationTimings)||void 0===l?void 0:l.domContentLoaded),dom_interactive:v(null===(d=t.initialViewMetrics.navigationTimings)||void 0===d?void 0:d.domInteractive),error:{count:t.eventCounts.errorCount},first_contentful_paint:v(t.initialViewMetrics.firstContentfulPaint),first_input_delay:v(null===(f=t.initialViewMetrics.firstInput)||void 0===f?void 0:f.delay),first_input_time:v(null===(p=t.initialViewMetrics.firstInput)||void 0===p?void 0:p.time),first_input_target_selector:null===(h=t.initialViewMetrics.firstInput)||void 0===h?void 0:h.targetSelector,interaction_to_next_paint:v(null===(m=t.commonViewMetrics.interactionToNextPaint)||void 0===m?void 0:m.value),interaction_to_next_paint_time:v(null===(g=t.commonViewMetrics.interactionToNextPaint)||void 0===g?void 0:g.time),interaction_to_next_paint_target_selector:null===(y=t.commonViewMetrics.interactionToNextPaint)||void 0===y?void 0:y.targetSelector,is_active:t.isActive,name:t.name,largest_contentful_paint:v(null===(_=t.initialViewMetrics.largestContentfulPaint)||void 0===_?void 0:_.value),largest_contentful_paint_target_selector:null===(b=t.initialViewMetrics.largestContentfulPaint)||void 0===b?void 0:b.targetSelector,load_event:v(null===(w=t.initialViewMetrics.navigationTimings)||void 0===w?void 0:w.loadEvent),loading_time:ho(v(t.commonViewMetrics.loadingTime)),loading_type:t.loadingType,long_task:{count:t.eventCounts.longTaskCount},resource:{count:t.eventCounts.resourceCount},time_spent:v(t.duration)},feature_flags:k&&!L(k)?k:void 0,display:t.commonViewMetrics.scroll?{scroll:{max_depth:t.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:t.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:t.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:v(t.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,session:{has_replay:!!S||void 0,is_active:!!t.sessionIsActive&&void 0},privacy:{replay_level:e.defaultPrivacyLevel}};L(t.customTimings)||(x.view.custom_timings=function(t,e){const n={};for(const r of Object.keys(t))n[r]=e(t[r]);return n}(t.customTimings,v));return{rawRumEvent:x,startTime:t.startClocks.relative,domainContext:{location:t.location}}}(n,e,s,c,a)))),cs(n,t,r,o,e,i,!e.trackViewsManually,u)}function ds(t,e,n){const r=Tn(t,\"rum\",(e=>function(t,e){let n;n=function(t){return\"0\"===t||\"1\"===t||\"2\"===t}(e)?e:u(t.sessionSampleRate)?u(t.sessionReplaySampleRate)?\"1\":\"2\":\"0\";return{trackingType:n,isTracked:fs(n)}}(t,e)),n);return r.expireObservable.subscribe((()=>{e.notify(8)})),r.renewObservable.subscribe((()=>{e.notify(9)})),r.sessionStateUpdateObservable.subscribe((({previousState:t,newState:e})=>{if(!t.forcedReplay&&e.forcedReplay){const t=r.findSession();t&&(t.isReplayForced=!0)}})),{findTrackedSession:t=>{const e=r.findSession(t);if(e&&fs(e.trackingType))return{id:e.id,sessionReplay:\"1\"===e.trackingType?1:e.isReplayForced?2:0,anonymousId:e.anonymousId}},expire:r.expire,expireObservable:r.expireObservable,setForcedReplay:()=>r.updateSessionState({forcedReplay:\"1\"})}}function fs(t){return\"2\"===t||\"1\"===t}function ps(t,e,n,r,o,i,s){const a=t.replica,c=function(t,e,n,r,o,i,s=Fn){const a=u(t,e),c=n&&u(t,n);function u(t,{endpoint:e,encoder:n}){return s({encoder:n,request:Mn(e,t.batchBytesLimit,r),flushController:qn({messagesLimit:t.batchMessagesLimit,bytesLimit:t.batchBytesLimit,durationLimit:t.flushTimeout,pageExitObservable:o,sessionExpireObservable:i}),messageBytesLimit:t.messageBytesLimit})}return{flushObservable:a.flushController.flushObservable,add(t,e=!0){a.add(t),c&&e&&c.add(n.transformMessage?n.transformMessage(t):t)},upsert:(t,e)=>{a.upsert(t,e),c&&c.upsert(n.transformMessage?n.transformMessage(t):t,e)},stop:()=>{a.stop(),c&&c.stop()}}}(t,{endpoint:t.rumEndpointBuilder,encoder:s(2)},a&&{endpoint:a.rumEndpointBuilder,transformMessage:t=>on(t,{application:{id:a.applicationId}}),encoder:s(3)},r,o,i);return e.subscribe(12,(t=>{\"view\"===t.type?c.upsert(t,t.view.id):c.add(t)})),n.subscribe((e=>c.add(e,function(t){return t.site===Jt}(t)))),c}const hs=ht;function ms(t,e){let n=N(e);return new W((r=>{const{stop:o}=function(t,e){const{stop:n}=Ie(gs(\"pushState\"),\"pushState\",(({onPostCall:t})=>{t(e)})),{stop:r}=Ie(gs(\"replaceState\"),\"replaceState\",(({onPostCall:t})=>{t(e)})),{stop:o}=Ke(t,window,\"popstate\",e);return{stop:()=>{n(),r(),o()}}}(t,s),{stop:i}=function(t,e){return Ke(t,window,\"hashchange\",e)}(t,s);function s(){if(n.href===e.href)return;const t=N(e);r.notify({newLocation:t,oldLocation:n}),n=t}return()=>{o(),i()}}))}function gs(t){return Object.prototype.hasOwnProperty.call(history,t)?history:History.prototype}const vs=ht;let ys,_s,bs;function ws(){0!==ys.batchCount&&(vn(\"Customer data measures\",ys),Cs())}function Ss(t,e){t.sum+=e,t.min=Math.min(t.min,e),t.max=Math.max(t.max,e)}function ks(t,e){t.sum+=e.sum,t.min=Math.min(t.min,e.min),t.max=Math.max(t.max,e.max)}function Cs(){ys={batchCount:0,batchBytesCount:{min:1/0,max:0,sum:0},batchMessagesCount:{min:1/0,max:0,sum:0},globalContextBytes:{min:1/0,max:0,sum:0},userContextBytes:{min:1/0,max:0,sum:0},featureFlagBytes:{min:1/0,max:0,sum:0}}}function xs(){bs=!1,_s={globalContextBytes:{min:1/0,max:0,sum:0},userContextBytes:{min:1/0,max:0,sum:0},featureFlagBytes:{min:1/0,max:0,sum:0}}}const Ts=ht;function Es(t,e=500){const n=kn({expireDelay:Ts,maxEntries:4e3});let r;i(As(),b());const{stop:o}=Je(t,window,[\"pageshow\",\"focus\",\"blur\",\"visibilitychange\",\"resume\",\"freeze\",\"pagehide\"],(t=>{i(function(t){if(\"freeze\"===t.type)return\"frozen\";if(\"pagehide\"===t.type)return t.persisted?\"frozen\":\"terminated\";return As()}(t),t.timeStamp)}),{capture:!0});function i(t,e=b()){t!==r&&(r=t,n.closeActive(e),n.add({state:r,startTime:e},e))}const s={findAll:(t,r)=>{const o=n.findAll(t,r);if(0===o.length)return;const i=[],s=Math.max(0,o.length-e);for(let e=o.length-1;e>=s;e--){const n=o[e],r=k(t,n.startTime);i.push({state:n.state,start:v(r)})}return i},wasInPageStateAt:(t,e)=>s.wasInPageStateDuringPeriod(t,e,0),wasInPageStateDuringPeriod:(t,e,r)=>n.findAll(e,r).some((e=>e.state===t)),addPageState:i,stop:()=>{o(),n.stop()}};return s}function As(){return\"hidden\"===document.visibilityState?\"hidden\":document.hasFocus()?\"active\":\"passive\"}function Rs(t,e){const n=window.cookieStore?function(t){return(e,n)=>Ke(t,window.cookieStore,\"change\",(t=>{const r=t.changed.find((t=>t.name===e))||t.deleted.find((t=>t.name===e));r&&n(r.value)})).stop}(t):Ns;return new W((t=>n(e,(e=>t.notify(e)))))}const Is=f;function Ns(t,e){const n=Q(document.cookie,t),r=H((()=>{const r=Q(document.cookie,t);r!==n&&e(r)}),Is);return()=>{G(r)}}const Os=\"datadog-ci-visibility-test-execution-id\";function Ls(t,{session:e,viewContext:n,errorType:r}){const o=e?e.id:\"no-session-id\",i=[];void 0!==r&&i.push(`error-type=${r}`),n&&(i.push(`seed=${n.id}`),i.push(`from=${n.startClocks.timeStamp}`));const s=function(t){const e=t.site,n=t.subdomain||function(t){switch(t.site){case Yt:case Zt:return\"app\";case Jt:return\"dd\";default:return}}(t);return`https://${n?`${n}.`:\"\"}${e}`}(t);return`${s}${`/rum/replay/sessions/${o}`}?${i.join(\"&\")}`}let Ms;function Ds(t){return Ps(t).segments_count}function Ps(t){let e;return Ms||(Ms=new Map),Ms.has(t)?e=Ms.get(t):(e={records_count:0,segments_count:0,segments_total_raw_size:0},Ms.set(t,e),Ms.size>10&&function(){if(!Ms)return;const t=Ms.keys().next().value;t&&Ms.delete(t)}()),e}function Us(t,e,n){let r,o=0,i=[],s=0;const a=[],{stop:c}=Ke(t,e,\"message\",(({data:t})=>{if(\"wrote\"!==t.type||t.streamId!==n)return;o+=t.additionalBytesCount,i.push(t.result),r=t.trailer;const e=a.shift();e&&e.id===t.id?e.writeCallback?e.writeCallback(t.result.byteLength):e.finishCallback&&e.finishCallback():(c(),vn(\"Worker responses received out of order.\"))}));function u(){const t=0===i.length?new Uint8Array(0):function(t){const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(i.concat(r)),e={rawBytesCount:o,output:t,outputBytesCount:t.byteLength,encoding:\"deflate\"};return o=0,i=[],e}function l(){s>0&&(e.postMessage({action:\"reset\",streamId:n}),s=0)}return{isAsync:!0,get isEmpty(){return 0===s},write(t,r){e.postMessage({action:\"write\",id:s,data:t,streamId:n}),a.push({id:s,writeCallback:r,data:t}),s+=1},finish(t){l(),a.length?(a.forEach((t=>{delete t.writeCallback})),a[a.length-1].finishCallback=()=>t(u())):t(u())},finishSync(){l();const t=a.map((t=>(delete t.writeCallback,delete t.finishCallback,t.data))).join(\"\");return{...u(),pendingData:t}},estimateEncodedBytesCount:t=>t.length/8,stop(){c()}}}function $s(t){return new Worker(t.workerUrl||URL.createObjectURL(new Blob(['(()=>{\"use strict\";function t(t){const e=t.reduce(((t,e)=>t+e.length),0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=256,n=286,r=30,i=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),h=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),l=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),_=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=new Array(576);e(o);var d=new Array(60);e(d);var u=new Array(512);e(u);var f=new Array(256);e(f);var c=new Array(29);e(c);var p,g,w,v=new Array(r);function b(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function m(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(v);var y=function(t){return t<256?u[t]:u[256+(t>>>7)]},k=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},z=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,k(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},x=function(t,e,a){z(t,a[2*e],a[2*e+1])},A=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},U=function(t,e,a){var n,r,s=new Array(16),h=0;for(n=1;n<=i;n++)s[n]=h=h+a[n-1]<<1;for(r=0;r<=e;r++){var l=t[2*r+1];0!==l&&(t[2*r]=A(s[l]++,l))}},I=function(t){var e;for(e=0;e<n;e++)t.dyn_ltree[2*e]=0;for(e=0;e<r;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},B=function(t){t.bi_valid>8?k(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},E=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},S=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&E(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!E(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},C=function(t,e,n){var r,i,l,_,o=0;if(0!==t.last_lit)do{r=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],i=t.pending_buf[t.l_buf+o],o++,0===r?x(t,i,e):(l=f[i],x(t,l+a+1,e),0!==(_=s[l])&&(i-=c[l],z(t,i,_)),r--,l=y(r),x(t,l,n),0!==(_=h[l])&&(r-=v[l],z(t,r,_)))}while(o<t.last_lit);x(t,256,e)},D=function(t,e){var a,n,r,s=e.dyn_tree,h=e.stat_desc.static_tree,l=e.stat_desc.has_stree,_=e.stat_desc.elems,o=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<_;a++)0!==s[2*a]?(t.heap[++t.heap_len]=o=a,t.depth[a]=0):s[2*a+1]=0;for(;t.heap_len<2;)s[2*(r=t.heap[++t.heap_len]=o<2?++o:0)]=1,t.depth[r]=0,t.opt_len--,l&&(t.static_len-=h[2*r+1]);for(e.max_code=o,a=t.heap_len>>1;a>=1;a--)S(t,s,a);r=_;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],S(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,s[2*r]=s[2*a]+s[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,s[2*a+1]=s[2*n+1]=r,t.heap[1]=r++,S(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,s,h,l,_=e.dyn_tree,o=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(s=0;s<=i;s++)t.bl_count[s]=0;for(_[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=_[2*_[2*(n=t.heap[a])+1]+1]+1)>p&&(s=p,g++),_[2*n+1]=s,n>o||(t.bl_count[s]++,h=0,n>=c&&(h=f[n-c]),l=_[2*n],t.opt_len+=l*(s+h),u&&(t.static_len+=l*(d[2*n+1]+h)));if(0!==g){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(s=p;0!==s;s--)for(n=t.bl_count[s];0!==n;)(r=t.heap[--a])>o||(_[2*r+1]!==s&&(t.opt_len+=(s-_[2*r+1])*_[2*r],_[2*r+1]=s),n--)}}(t,e),U(s,o,t.bl_count)},j=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},M=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{x(t,r,t.bl_tree)}while(0!=--h);else 0!==r?(r!==i&&(x(t,r,t.bl_tree),h--),x(t,16,t.bl_tree),z(t,h-3,2)):h<=10?(x(t,17,t.bl_tree),z(t,h-3,3)):(x(t,18,t.bl_tree),z(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},L=!1,T=function(t,e,a,n){z(t,0+(n?1:0),3),function(t,e,a,n){B(t),n&&(k(t,a),k(t,~a)),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a,!0)},H=function(t,e,n,r){var i,s,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),D(t,t.l_desc),D(t,t.d_desc),h=function(t){var e;for(j(t,t.dyn_ltree,t.l_desc.max_code),j(t,t.dyn_dtree,t.d_desc.max_code),D(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*_[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==e?T(t,e,n,r):4===t.strategy||s===i?(z(t,2+(r?1:0),3),C(t,o,d)):(z(t,4+(r?1:0),3),function(t,e,a,n){var r;for(z(t,e-257,5),z(t,a-1,5),z(t,n-4,4),r=0;r<n;r++)z(t,t.bl_tree[2*_[r]+1],3);M(t,t.dyn_ltree,e-1),M(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),C(t,t.dyn_ltree,t.dyn_dtree)),I(t),r&&B(t)},R={_tr_init:function(t){L||(!function(){var t,e,a,_,m,y=new Array(16);for(a=0,_=0;_<28;_++)for(c[_]=a,t=0;t<1<<s[_];t++)f[a++]=_;for(f[a-1]=_,m=0,_=0;_<16;_++)for(v[_]=m,t=0;t<1<<h[_];t++)u[m++]=_;for(m>>=7;_<r;_++)for(v[_]=m<<7,t=0;t<1<<h[_]-7;t++)u[256+m++]=_;for(e=0;e<=i;e++)y[e]=0;for(t=0;t<=143;)o[2*t+1]=8,t++,y[8]++;for(;t<=255;)o[2*t+1]=9,t++,y[9]++;for(;t<=279;)o[2*t+1]=7,t++,y[7]++;for(;t<=287;)o[2*t+1]=8,t++,y[8]++;for(U(o,287,y),t=0;t<r;t++)d[2*t+1]=5,d[2*t]=A(t,5);p=new b(o,s,257,n,i),g=new b(d,h,0,r,i),w=new b(new Array(0),l,0,19,7)}(),L=!0),t.l_desc=new m(t.dyn_ltree,p),t.d_desc=new m(t.dyn_dtree,g),t.bl_desc=new m(t.bl_tree,w),t.bi_buf=0,t.bi_valid=0,I(t)},_tr_stored_block:T,_tr_flush_block:H,_tr_tally:function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(f[n]+a+1)]++,t.dyn_dtree[2*y(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){z(t,2,3),x(t,256,o),function(t){16===t.bi_valid?(k(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},K=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},N=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),O=function(t,e,a,n){var r=N,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return~t},q={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"},F=0,G=2,J=3,P=4,Q=0,V=1,W=-1,X=0,Y=8,Z=R._tr_init,$=R._tr_stored_block,tt=R._tr_flush_block,et=R._tr_tally,at=R._tr_align,nt=F,rt=1,it=J,st=P,ht=5,lt=Q,_t=V,ot=-2,dt=-3,ut=-5,ft=W,ct=1,pt=2,gt=3,wt=4,vt=X,bt=2,mt=Y,yt=258,kt=262,zt=103,xt=113,At=666,Ut=function(t,e){return t.msg=q[e],e},It=function(t){return(t<<1)-(t>4?9:0)},Bt=function(t){for(var e=t.length;--e>=0;)t[e]=0},Et=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},St=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Ct=function(t,e){tt(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,St(t.strm)},Dt=function(t,e){t.pending_buf[t.pending++]=e},jt=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Mt=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-kt?t.strstart-(t.w_size-kt):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+yt,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=yt-(u-i),i=u-yt,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!=--r);return s<=t.lookahead?s:t.lookahead},Lt=function(t){var e,a,n,r,i,s,h,l,_,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-kt)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,h=t.window,l=t.strstart+t.lookahead,_=r,o=void 0,(o=s.avail_in)>_&&(o=_),a=0===o?0:(s.avail_in-=o,h.set(s.input.subarray(s.next_in,s.next_in+o),l),1===s.state.wrap?s.adler=K(s.adler,h,o,l):2===s.state.wrap&&(s.adler=O(s.adler,h,o,l)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=Et(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=Et(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<kt&&0!==t.strm.avail_in)},Tt=function(t,e){for(var a,n;;){if(t.lookahead<kt){if(Lt(t),t.lookahead<kt&&e===nt)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=Et(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-kt&&(t.match_length=Mt(t,a)),t.match_length>=3)if(n=et(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=Et(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Et(t,t.ins_h,t.window[t.strstart+1]);else n=et(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Ct(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===st?(Ct(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ct(t,!1),0===t.strm.avail_out)?1:2},Ht=function(t,e){for(var a,n,r;;){if(t.lookahead<kt){if(Lt(t),t.lookahead<kt&&e===nt)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=Et(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-kt&&(t.match_length=Mt(t,a),t.match_length<=5&&(t.strategy===ct||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=et(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=Et(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Ct(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=et(t,0,t.window[t.strstart-1]))&&Ct(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=et(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===st?(Ct(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ct(t,!1),0===t.strm.avail_out)?1:2};function Rt(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var Kt=[new Rt(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Lt(t),0===t.lookahead&&e===nt)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Ct(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-kt&&(Ct(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Ct(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Ct(t,!1),t.strm.avail_out),1)})),new Rt(4,4,8,4,Tt),new Rt(4,5,16,8,Tt),new Rt(4,6,32,32,Tt),new Rt(4,4,16,16,Ht),new Rt(8,16,32,32,Ht),new Rt(8,16,128,128,Ht),new Rt(8,32,128,256,Ht),new Rt(32,128,258,1024,Ht),new Rt(32,258,258,4096,Ht)];function Nt(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=mt,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Bt(this.dyn_ltree),Bt(this.dyn_dtree),Bt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Bt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Bt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Ot=function(t){if(!t||!t.state)return Ut(t,ot);t.total_in=t.total_out=0,t.data_type=bt;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:xt,t.adler=2===e.wrap?0:1,e.last_flush=nt,Z(e),lt},qt=function(t){var e,a=Ot(t);return a===lt&&((e=t.state).window_size=2*e.w_size,Bt(e.head),e.max_lazy_match=Kt[e.level].max_lazy,e.good_match=Kt[e.level].good_length,e.nice_match=Kt[e.level].nice_length,e.max_chain_length=Kt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Ft=function(t,e,a,n,r,i){if(!t)return ot;var s=1;if(e===ft&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||a!==mt||n<8||n>15||e<0||e>9||i<0||i>wt)return Ut(t,ot);8===n&&(n=9);var h=new Nt;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,qt(t)},Gt={deflateInit:function(t,e){return Ft(t,e,mt,15,8,vt)},deflateInit2:Ft,deflateReset:qt,deflateResetKeep:Ot,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?ot:(t.state.gzhead=e,lt):ot},deflate:function(t,e){var a,n;if(!t||!t.state||e>ht||e<0)return t?Ut(t,ot):ot;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===At&&e!==st)return Ut(t,0===t.avail_out?ut:ot);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Dt(r,31),Dt(r,139),Dt(r,8),r.gzhead?(Dt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Dt(r,255&r.gzhead.time),Dt(r,r.gzhead.time>>8&255),Dt(r,r.gzhead.time>>16&255),Dt(r,r.gzhead.time>>24&255),Dt(r,9===r.level?2:r.strategy>=pt||r.level<2?4:0),Dt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(Dt(r,255&r.gzhead.extra.length),Dt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=O(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Dt(r,0),Dt(r,0),Dt(r,0),Dt(r,0),Dt(r,0),Dt(r,9===r.level?2:r.strategy>=pt||r.level<2?4:0),Dt(r,3),r.status=xt);else{var s=mt+(r.w_bits-8<<4)<<8;s|=(r.strategy>=pt||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(s|=32),s+=31-s%31,r.status=xt,jt(r,s),0!==r.strstart&&(jt(r,t.adler>>>16),jt(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),St(t),a=r.pending,r.pending!==r.pending_buf_size));)Dt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),St(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Dt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),St(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Dt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=zt)}else r.status=zt;if(r.status===zt&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&St(t),r.pending+2<=r.pending_buf_size&&(Dt(r,255&t.adler),Dt(r,t.adler>>8&255),t.adler=0,r.status=xt)):r.status=xt),0!==r.pending){if(St(t),0===t.avail_out)return r.last_flush=-1,lt}else if(0===t.avail_in&&It(e)<=It(i)&&e!==st)return Ut(t,ut);if(r.status===At&&0!==t.avail_in)return Ut(t,ut);if(0!==t.avail_in||0!==r.lookahead||e!==nt&&r.status!==At){var h=r.strategy===pt?function(t,e){for(var a;;){if(0===t.lookahead&&(Lt(t),0===t.lookahead)){if(e===nt)return 1;break}if(t.match_length=0,a=et(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Ct(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Ct(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ct(t,!1),0===t.strm.avail_out)?1:2}(r,e):r.strategy===gt?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=yt){if(Lt(t),t.lookahead<=yt&&e===nt)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+yt;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=yt-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=et(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=et(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Ct(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===st?(Ct(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Ct(t,!1),0===t.strm.avail_out)?1:2}(r,e):Kt[r.level].func(r,e);if(3!==h&&4!==h||(r.status=At),1===h||3===h)return 0===t.avail_out&&(r.last_flush=-1),lt;if(2===h&&(e===rt?at(r):e!==ht&&($(r,0,0,!1),e===it&&(Bt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),St(t),0===t.avail_out))return r.last_flush=-1,lt}return e!==st?lt:r.wrap<=0?_t:(2===r.wrap?(Dt(r,255&t.adler),Dt(r,t.adler>>8&255),Dt(r,t.adler>>16&255),Dt(r,t.adler>>24&255),Dt(r,255&t.total_in),Dt(r,t.total_in>>8&255),Dt(r,t.total_in>>16&255),Dt(r,t.total_in>>24&255)):(jt(r,t.adler>>>16),jt(r,65535&t.adler)),St(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?lt:_t)},deflateEnd:function(t){if(!t||!t.state)return ot;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==zt&&e!==xt&&e!==At?Ut(t,ot):(t.state=null,e===xt?Ut(t,dt):lt)},deflateSetDictionary:function(t,e){var a=e.length;if(!t||!t.state)return ot;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return ot;if(1===r&&(t.adler=K(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(Bt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Lt(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=Et(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,Lt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,lt},deflateInfo:\"pako deflate (from Nodeca project)\"};for(var Jt=new Uint8Array(256),Pt=0;Pt<256;Pt++)Jt[Pt]=Pt>=252?6:Pt>=248?5:Pt>=240?4:Pt>=224?3:Pt>=192?2:1;Jt[254]=Jt[254]=1;var Qt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=\"\",this.state=null,this.data_type=2,this.adler=0},Vt=Object.prototype.toString,Wt=F,Xt=G,Yt=J,Zt=P,$t=Q,te=V,ee=W,ae=X,ne=Y;function re(){this.options={level:ee,method:ne,chunkSize:16384,windowBits:15,memLevel:8,strategy:ae};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=\"\",this.ended=!1,this.chunks=[],this.strm=new Qt,this.strm.avail_out=0;var e=Gt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==$t)throw new Error(q[e]);if(t.header&&Gt.deflateSetHeader(this.strm,t.header),t.dictionary){var a;if(a=\"[object ArrayBuffer]\"===Vt.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(e=Gt.deflateSetDictionary(this.strm,a))!==$t)throw new Error(q[e]);this._dict_set=!0}}function ie(t,e,a){try{t.postMessage({type:\"errored\",error:e,streamId:a})}catch(n){t.postMessage({type:\"errored\",error:String(e),streamId:a})}}function se(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}re.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?Zt:Wt,\"[object ArrayBuffer]\"===Vt.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===Xt||n===Yt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((a=Gt.deflate(r,n))===te)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=Gt.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===$t;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},re.prototype.onData=function(t){this.chunks.push(t)},re.prototype.onEnd=function(t){t===$t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener(\"message\",(n=>{try{const r=function(e,a){switch(a.action){case\"init\":return{type:\"initialized\",version:\"6.0.0\"};case\"write\":{let n=e.get(a.streamId);n||(n=new re,e.set(a.streamId,n));const r=n.chunks.length,i=function(t){if(\"function\"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,n,r,i,s=t.length,h=0;for(r=0;r<s;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),h+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(h),i=0,r=0;i<h;r++)a=t.charCodeAt(r),55296==(64512&a)&&r+1<s&&(n=t.charCodeAt(r+1),56320==(64512&n)&&(a=65536+(a-55296<<10)+(n-56320),r++)),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,G),{type:\"wrote\",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:se(n),additionalBytesCount:i.length}}case\"reset\":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){ie(e,t,n.data&&\"streamId\"in n.data?n.data.streamId:void 0)}}))}catch(t){ie(e,t)}}()})();'])))}let zs={status:0};function Bs(t,e,n,r=$s){switch(0===zs.status&&function(t,e,n=$s){try{const r=n(t),{stop:i}=Ke(t,r,\"error\",(n=>{Fs(t,e,n)})),{stop:s}=Ke(t,r,\"message\",(({data:n})=>{var r;\"errored\"===n.type?Fs(t,e,n.error,n.streamId):\"initialized\"===n.type&&(r=n.version,1===zs.status&&(zs={status:3,worker:zs.worker,stop:zs.stop,version:r}))}));r.postMessage({action:\"init\"}),j((()=>function(t){1===zs.status&&(o.error(`${t} failed to start: a timeout occurred while initializing the Worker`),zs.initializationFailureCallbacks.forEach((t=>t())),zs={status:2})}(e)),3e4);zs={status:1,worker:r,stop:()=>{i(),s()},initializationFailureCallbacks:[]}}catch(n){Fs(t,e,n)}}(t,e,r),zs.status){case 1:return zs.initializationFailureCallbacks.push(n),zs.worker;case 3:return zs.worker}}function Vs(){return zs.status}function Fs(t,e,n,r){if(1===zs.status||0===zs.status){if(o.error(`${e} failed to start: an error occurred while creating the Worker:`,n),n instanceof Event||n instanceof Error&&((s=n.message).includes(\"Content Security Policy\")||s.includes(\"requires 'TrustedScriptURL'\"))){let e;e=t.workerUrl?`Please make sure the Worker URL ${t.workerUrl} is correct and CSP is correctly configured.`:\"Please make sure CSP is correctly configured.\",o.error(`${e} See documentation at ${i}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else yn(n);1===zs.status&&zs.initializationFailureCallbacks.forEach((t=>t())),zs={status:2}}else yn(n,{worker_version:3===zs.status&&zs.version,stream_id:r});var s}function js(){return\"function\"==typeof Array.from&&\"function\"==typeof CSSSupportsRule&&\"function\"==typeof URL.createObjectURL&&\"forEach\"in NodeList.prototype}function qs(t,e,n,r){const o=e.findTrackedSession(),i=function(t,e){if(!js())return\"browser-not-supported\";if(!t)return\"rum-not-tracked\";if(0===t.sessionReplay)return\"incorrect-session-plan\";if(!e)return\"replay-not-started\"}(o,r);return Ls(t,{viewContext:n.findView(),errorType:i,session:o})}function Hs(t,e,n,r,o,i){let s,a=0;e.subscribe(8,(()=>{2!==a&&3!==a||(l(),a=1)})),e.subscribe(10,(t=>{t.reason===Bn.UNLOADING&&l()})),e.subscribe(9,(()=>{1===a&&u()}));const c=async()=>{const[c]=await Promise.all([o(),Kn(t,\"interactive\")]);if(2!==a)return;const u=i();u&&c?(({stop:s}=c(e,t,n,r,u)),a=3):a=0};function u(t){const e=n.findTrackedSession();!function(t,e){return!t||0===t.sessionReplay&&(!e||!e.force)}(e,t)?function(t){return 2===t||3===t}(a)||(a=2,c().catch(V),function(t,e){return e&&e.force&&0===t.sessionReplay}(e,t)&&n.setForcedReplay()):a=1}function l(){3===a&&(null==s||s()),a=0}return{start:u,stop:l,getSessionReplayLink:()=>qs(t,n,r,0!==a),isRecording:()=>3===a}}const Gs=function(t,e,n={}){const r=lr(0),i=sr(r.getOrCreateTracker(2)),s=sr(r.getOrCreateTracker(1)),a=function(t){const e=new W;return{tryToInit(e){t||(t=e)},update(n){t=n,e.notify()},isGranted:()=>t===Ft.GRANTED,observable:e}}(),c={vitalsByName:new Map,vitalsByReference:new WeakMap};function u(){return function(t,e,n){return{context:t.getContext(),user:e.getContext(),hasReplay:!!n.isRecording()||void 0}}(i,s,e)}let l=Lr(n,u,a,c,((o,d,f)=>{o.storeContextsAcrossPages&&(ur(o,i,\"rum\",2),ur(o,s,\"rum\",1)),r.setCompressionStatus(d?1:2);const p=t(o,e,r,u,f,d&&n.createDeflateEncoder?t=>n.createDeflateEncoder(o,d,t):Hn,a,c);return e.onRumStart(p.lifeCycle,o,p.session,p.viewHistory,d),l=function(t,e){return{init:t=>{We(\"DD_RUM\",t)},initConfiguration:t.initConfiguration,...e}}(l,p),p}));const d=z((t=>{const e=\"object\"==typeof t?t:{name:t};e.context&&r.getOrCreateTracker(3).updateCustomerData(e.context),l.startView(e),_n({feature:\"start-view\"})})),f=function(t){const e={version:\"6.0.0\",onReady(t){t()},...t};return Object.defineProperty(e,\"_setDebug\",{get:()=>$,enumerable:!1}),e}({init:z((t=>{l.init(t,f)})),setTrackingConsent:z((t=>{a.update(t),_n({feature:\"set-tracking-consent\",tracking_consent:t})})),setViewName:z((t=>{l.setViewName(t)})),setViewContext:z((t=>{l.setViewContext(t)})),setViewContextProperty:z(((t,e)=>{l.setViewContextProperty(t,e)})),setGlobalContext:z((t=>{i.setContext(t),_n({feature:\"set-global-context\"})})),getGlobalContext:z((()=>i.getContext())),setGlobalContextProperty:z(((t,e)=>{i.setContextProperty(t,e),_n({feature:\"set-global-context\"})})),removeGlobalContextProperty:z((t=>i.removeContextProperty(t))),clearGlobalContext:z((()=>i.clearContext())),getInternalContext:z((t=>l.getInternalContext(t))),getInitConfiguration:z((()=>rn(l.initConfiguration))),addAction:(t,e)=>{const n=Ee();B((()=>{l.addAction({name:Oe(t),context:Oe(e),startClocks:w(),type:\"custom\",handlingStack:n}),_n({feature:\"add-action\"})}))},addError:(t,e)=>{const n=Ee();B((()=>{l.addError({error:t,handlingStack:n,context:Oe(e),startClocks:w()}),_n({feature:\"add-error\"})}))},addTiming:z(((t,e)=>{l.addTiming(Oe(t),e)})),setUser:z((t=>{(function(t){const e=\"object\"===ft(t);return e||o.error(\"Unsupported user:\",t),e})(t)&&s.setContext(pt(t)),_n({feature:\"set-user\"})})),getUser:z((()=>s.getContext())),setUserProperty:z(((t,e)=>{const n=pt({[t]:e})[t];s.setContextProperty(t,n),_n({feature:\"set-user\"})})),removeUserProperty:z((t=>s.removeContextProperty(t))),clearUser:z((()=>s.clearContext())),startView:d,stopSession:z((()=>{l.stopSession(),_n({feature:\"stop-session\"})})),addFeatureFlagEvaluation:z(((t,e)=>{l.addFeatureFlagEvaluation(Oe(t),Oe(e)),_n({feature:\"add-feature-flag-evaluation\"})})),getSessionReplayLink:z((()=>e.getSessionReplayLink())),startSessionReplayRecording:z((t=>{e.start(t),_n({feature:\"start-session-replay-recording\",force:t&&t.force})})),stopSessionReplayRecording:z((()=>e.stop())),addDurationVital:z(((t,e)=>{var n;_n({feature:\"add-duration-vital\"}),l.addDurationVital({name:Oe(t),type:\"duration\",startClocks:(n=e.startTime,{relative:x(n),timeStamp:n}),duration:e.duration,context:Oe(e&&e.context),description:Oe(e&&e.description)})})),startDurationVital:z(((t,e)=>(_n({feature:\"start-duration-vital\"}),l.startDurationVital(Oe(t),{context:Oe(e&&e.context),description:Oe(e&&e.description)})))),stopDurationVital:z(((t,e)=>{_n({feature:\"stop-duration-vital\"}),l.stopDurationVital(\"string\"==typeof t?Oe(t):t,{context:Oe(e&&e.context),description:Oe(e&&e.description)})}))});return f}((function(t,e,n,r,o,i,s,a){var c;const l=[],d=new Hr;d.subscribe(12,(t=>en(\"rum\",t)));const f=function(t){const e=gn(\"browser-rum-sdk\",t);if(zn()){const t=Un();e.observable.subscribe((e=>t.send(\"internal_telemetry\",e)))}return e}(t);f.setContextProvider((()=>{var e,n;return{application:{id:t.applicationId},session:{id:null===(e=_.findTrackedSession())||void 0===e?void 0:e.id},view:{id:null===(n=T.findView())||void 0===n?void 0:n.id},action:{id:A.findActionId()}}}));const p=t=>{d.notify(13,{error:t}),vn(\"Error reported to customer\",{\"error.message\":t.message})},h=function(t,e){const n=kn({expireDelay:vs});return t.subscribe(1,(({startClocks:t})=>{n.add({},t.relative),e.resetCustomerData()})),t.subscribe(5,(({endClocks:t})=>{n.closeActive(t.relative)})),{findFeatureFlagEvaluations:t=>n.find(t),addFeatureFlagEvaluation:(t,r)=>{const o=n.find();o&&(o[t]=r,e.updateCustomerData(o))},stop:()=>e.stop()}}(d,n.getOrCreateTracker(0)),g=function(t){return new W((e=>{const{stop:n}=Je(t,window,[\"visibilitychange\",\"freeze\"],(t=>{\"visibilitychange\"===t.type&&\"hidden\"===document.visibilityState?e.notify({reason:Bn.HIDDEN}):\"freeze\"===t.type&&e.notify({reason:Bn.FROZEN})}),{capture:!0}),r=Ke(t,window,\"beforeunload\",(()=>{e.notify({reason:Bn.UNLOADING})})).stop;return()=>{n(),r()}}))}(t),y=g.subscribe((t=>{d.notify(10,t)}));l.push((()=>y.unsubscribe()));const _=zn()?function(){const t={id:\"00000000-aaaa-0000-aaaa-000000000000\",sessionReplay:$n(\"records\")?1:0};return{findTrackedSession:()=>t,expire:X,expireObservable:new W,setForcedReplay:X}}():ds(t,d,s);if(zn())!function(t){const e=Un();t.subscribe(12,(t=>{e.send(\"rum\",t)}))}(d);else{const e=ps(t,d,f.observable,p,g,_.expireObservable,i);l.push((()=>e.stop())),function(t,e,n,r,o){e.enabled&&u(t.customerDataTelemetrySampleRate)&&(Cs(),xs(),n.subscribe(12,(t=>{bs=!0,Ss(_s.globalContextBytes,r.getOrCreateTracker(2).getBytesCount()),Ss(_s.userContextBytes,r.getOrCreateTracker(1).getBytesCount()),Ss(_s.featureFlagBytes,[\"view\",\"error\"].includes(t.type)?r.getOrCreateTracker(0).getBytesCount():0)})),o.subscribe((({bytesCount:t,messagesCount:e})=>{bs&&(ys.batchCount+=1,Ss(ys.batchBytesCount,t),Ss(ys.batchMessagesCount,e),ks(ys.globalContextBytes,_s.globalContextBytes),ks(ys.userContextBytes,_s.userContextBytes),ks(ys.featureFlagBytes,_s.featureFlagBytes),xs())})),H(ws,1e4))}(t,f,d,n,e.flushObservable)}const w=function(){const t=Mr();return new W((e=>{if(!t)return;const n=new t(z((()=>e.notify())));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()}))}(),S=ms(t,location),k=Es(t),{observable:C,stop:x}=function(){const t=new W,{stop:e}=Ie(window,\"open\",(()=>t.notify()));return{observable:t,stop:e}}();l.push(x);const{viewHistory:T,urlContexts:E,actionContexts:A,addAction:R,stop:I}=function(t,e,n,r,o,i,s,a,c,u){const l=function(t){const e=kn({expireDelay:Gr});return t.subscribe(1,(t=>{e.add(function(t){return{service:t.service,version:t.version,context:t.context,id:t.id,name:t.name,startClocks:t.startClocks}}(t),t.startClocks.relative)})),t.subscribe(5,(({endClocks:t})=>{e.closeActive(t.relative)})),t.subscribe(3,(t=>{const n=e.find(t.startClocks.relative);n&&t.name&&(n.name=t.name),n&&t.context&&(n.context=t.context)})),t.subscribe(9,(()=>{e.reset()})),{findView:t=>e.find(t),stop:()=>{e.stop()}}}(t),d=function(t,e,n){const r=kn({expireDelay:hs});let o;t.subscribe(1,(({startClocks:t})=>{const e=n.href;r.add(s({url:e,referrer:o||document.referrer}),t.relative),o=e})),t.subscribe(5,(({endClocks:t})=>{r.closeActive(t.relative)}));const i=e.subscribe((({newLocation:t})=>{const e=r.find();if(e){const n=b();r.closeActive(n),r.add(s({url:t.href,referrer:e.referrer}),n)}}));function s({url:t,referrer:e}){return{url:t,referrer:e}}return{findUrl:t=>r.find(t),stop:()=>{i.unsubscribe(),r.stop()}}}(t,i,n),f=function(t,e,n,r,o){t.subscribe(0,(e=>t.notify(11,Ci(e,o))));let i={findActionId:X},s=X;return r.trackUserInteractions&&({actionContexts:i,stop:s}=Si(t,e,n,r)),{addAction:(e,n)=>{t.notify(11,{savedCommonContext:n,...Ci(e,o)})},actionContexts:i,stop:s}}(t,s,a,e,o),p=function(t){let e,n;fe(ue.DELAY_VIEWPORT_COLLECTION)?n=requestAnimationFrame((()=>{e=rs()})):e=rs();const r=ns(t).subscribe((t=>{e=t})).unsubscribe;return{get:()=>e?{viewport:e}:void 0,stop:()=>{r(),n&&cancelAnimationFrame(n)}}}(e),h=function(t,e=Rs(t,Os)){var n;let r=at(Os)||(null===(n=window.Cypress)||void 0===n?void 0:n.env(\"traceId\"));const o=e.subscribe((t=>{r=t}));return{get:()=>{if(\"string\"==typeof r)return{test_execution_id:r}},stop:()=>o.unsubscribe()}}(e);return qr(e,t,r,l,d,f.actionContexts,p,h,c,u),{viewHistory:l,pageStateHistory:o,urlContexts:d,addAction:f.addAction,actionContexts:f.actionContexts,stop:()=>{f.stop(),h.stop(),p.stop(),d.stop(),l.stop(),o.stop()}}}(d,t,location,_,k,S,w,C,r,p);l.push(I),hn.drain();const{addTiming:N,startView:O,setViewName:L,setViewContext:M,setViewContextProperty:D,stop:P}=ls(d,t,location,w,C,S,h,k,e,o);l.push(P);const{stop:U}=Pi(d,t,k);if(l.push(U),t.trackLongTasks)if(null===(c=PerformanceObserver.supportedEntryTypes)||void 0===c?void 0:c.includes(vo.LONG_ANIMATION_FRAME)){const{stop:e}=function(t,e){const n=yo(e,{type:vo.LONG_ANIMATION_FRAME,buffered:!0}).subscribe((e=>{for(const n of e){const e=m(n.startTime),r={date:e.timeStamp,long_task:{id:Y(),entry_type:\"long-animation-frame\",duration:v(n.duration),blocking_duration:v(n.blockingDuration),first_ui_event_timestamp:v(n.firstUIEventTimestamp),render_start:v(n.renderStart),style_and_layout_start:v(n.styleAndLayoutStart),start_time:v(n.startTime),scripts:n.scripts.map((t=>({duration:v(t.duration),pause_duration:v(t.pauseDuration),forced_style_and_layout_duration:v(t.forcedStyleAndLayoutDuration),start_time:v(t.startTime),execution_start:v(t.executionStart),source_url:t.sourceURL,source_function_name:t.sourceFunctionName,source_char_position:t.sourceCharPosition,invoker:t.invoker,invoker_type:t.invokerType,window_attribution:t.windowAttribution})))},type:\"long_task\",_dd:{discarded:!1}};t.notify(11,{rawRumEvent:r,startTime:e.relative,domainContext:{performanceEntry:n}})}}));return{stop:()=>n.unsubscribe()}}(d,t);l.push(e)}else!function(t,e){const n=yo(e,{type:vo.LONG_TASK,buffered:!0}).subscribe((n=>{for(const r of n){if(r.entryType!==vo.LONG_TASK)break;if(!e.trackLongTasks)break;const n=m(r.startTime),o={date:n.timeStamp,long_task:{id:Y(),entry_type:\"long-task\",duration:v(r.duration)},type:\"long_task\",_dd:{discarded:!1}};t.notify(11,{rawRumEvent:o,startTime:n.relative,domainContext:{performanceEntry:r}})}}))}(d,t);const{addError:$}=Ti(d,t,k,h);fo(d,t,_);const B=mr(d,k,a),V=function(t,e,n,r,o){return{get:i=>{const s=n.findView(i),a=o.findUrl(i),c=e.findTrackedSession(i);if(c&&s&&a){const e=r.findActionId(i);return{application_id:t,session_id:c.id,user_action:e?{id:e}:void 0,view:{id:s.id,name:s.name,referrer:a.referrer,url:a.url}}}}}}(t.applicationId,_,T,A,E);return{addAction:R,addError:$,addTiming:N,addFeatureFlagEvaluation:h.addFeatureFlagEvaluation,startView:O,setViewContext:M,setViewContextProperty:D,setViewName:L,lifeCycle:d,viewHistory:T,session:_,stopSession:()=>_.expire(),getInternalContext:V.get,startDurationVital:B.startDurationVital,stopDurationVital:B.stopDurationVital,addDurationVital:B.addDurationVital,stop:()=>{l.forEach((t=>t()))}}}),function(t,e){if(zn()&&!$n(\"records\")||!js())return{start:X,stop:X,getReplayStats:()=>{},onRumStart:X,isRecording:()=>!1,getSessionReplayLink:()=>{}};let{strategy:n,shouldStartImmediately:r}=function(){let t=0;return{strategy:{start(){t=1},stop(){t=2},isRecording:()=>!1,getSessionReplayLink:X},shouldStartImmediately:e=>1===t||0===t&&!e.startSessionReplayRecordingManually}}();return{start:t=>n.start(t),stop:()=>n.stop(),getSessionReplayLink:()=>n.getSessionReplayLink(),onRumStart:function(o,i,s,a,c){let u;n=Hs(i,o,s,a,t,(function(){u||(null!=c||(c=Bs(i,\"Datadog Session Replay\",(()=>{n.stop()}),e)),c&&(u=Us(i,c,1)));return u})),r(i)&&n.start()},isRecording:()=>3===Vs()&&n.isRecording(),getReplayStats:t=>3===Vs()?function(t){return null==Ms?void 0:Ms.get(t)}(t):void 0}}((async function(){try{return(await Promise.resolve().then((function(){return lc}))).startRecording}catch(t){}})),{startDeflateWorker:Bs,createDeflateEncoder:Us});!function(t,e,n){const r=t[e];r&&!r.q&&r.version&&o.warn(\"SDK is loaded more than once. This is unsupported and might have unexpected behavior.\"),t[e]=n,r&&r.q&&r.q.forEach((t=>c(t,\"onReady callback threw an error:\")()))}(M(),\"DD_RUM\",Gs);globalThis.DD_RUM=Gs;const Ws=new WeakMap;function Ks(t){return Ws.has(t)}function Js(t){return Ws.get(t)}function Xs(t,e){const n=t.tagName,r=t.value;if(zo(t,e)){const e=t.type;if(\"INPUT\"===n&&(\"button\"===e||\"submit\"===e||\"reset\"===e))return r;if(!r||\"OPTION\"===n)return;return Lo}return\"OPTION\"===n||\"SELECT\"===n?t.value:\"INPUT\"===n||\"TEXTAREA\"===n?r:void 0}const Ys=/url\\((?:(')([^']*)'|(\")([^\"]*)\"|([^)]*))\\)/gm,Zs=/^[A-Za-z]+:|^\\/\\//,Qs=/^data:.*,/i;function ta(t,e){return t.replace(Ys,((t,n,r,o,i,s)=>{const a=r||i||s;if(!e||!a||Zs.test(a)||Qs.test(a))return t;const c=n||o||\"\";return`url(${c}${function(t,e){try{return Gt(t,e).href}catch(e){return t}}(a,e)}${c})`}))}const ea=/[^a-z1-6-_]/;function na(t){const e=t.toLowerCase().trim();return ea.test(e)?\"div\":e}function ra(t,e){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${e}' style='background-color:silver'%3E%3C/svg%3E`}const oa=2,ia=3,sa=4,aa=6,ca=7,ua=8,la=9,da=0,fa=1,pa=2,ha=3,ma=4,ga=11,va=0,ya=1,_a=2,ba=3,wa=4,Sa=5,ka=6,Ca=7,xa=8,Ta=5,Ea=6,Aa=0,Ra=1;function Ia(t){if(void 0!==t&&0!==t.length)return t.map((t=>{const e=t.cssRules||t.rules;return{cssRules:Array.from(e,(t=>t.cssText)),disabled:t.disabled||void 0,media:t.media.length>0?Array.from(t.media):void 0}}))}function Na(t,e,n,r){if(e===Io.HIDDEN)return null;const o=t.getAttribute(n);if(e===Io.MASK&&n!==No&&!ti.includes(n)&&n!==r.actionNameAttribute){const e=t.tagName;switch(n){case\"title\":case\"alt\":case\"placeholder\":return Lo}if(\"IMG\"===e&&(\"src\"===n||\"srcset\"===n)){const e=t;if(e.naturalWidth>0)return ra(e.naturalWidth,e.naturalHeight);const{width:n,height:r}=t.getBoundingClientRect();return n>0||r>0?ra(n,r):Mo}if(\"SOURCE\"===e&&(\"src\"===n||\"srcset\"===n))return Mo;if(\"A\"===e&&\"href\"===n)return Lo;if(o&&n.startsWith(\"data-\"))return Lo;if(\"IFRAME\"===e&&\"srcdoc\"===n)return Lo}return o&&\"string\"==typeof o&&co(o)?uo(o):o}function Oa(t){if(!t)return null;let e;try{e=t.rules||t.cssRules}catch(t){}if(!e)return null;return ta(Array.from(e,1===ot()?La:Ma).join(\"\"),t.href)}function La(t){if(function(t){return\"selectorText\"in t}(t)&&t.selectorText.includes(\":\")){const e=/(\\[[\\w-]+[^\\\\])(:[^\\]]+\\])/g;return t.cssText.replace(e,\"$1\\\\$2\")}return Ma(t)}function Ma(t){return function(t){return\"styleSheet\"in t}(t)&&Oa(t.styleSheet)||t.cssText}function Da(t,e){const n=function(t,e){switch(t.nodeType){case t.DOCUMENT_NODE:return function(t,e){return{type:da,childNodes:Ua(t,e),adoptedStyleSheets:Ia(t.adoptedStyleSheets)}}(t,e);case t.DOCUMENT_FRAGMENT_NODE:return function(t,e){const n=Eo(t);n&&e.serializationContext.shadowRootsController.addShadowRoot(t);return{type:ga,childNodes:Ua(t,e),isShadowRoot:n,adoptedStyleSheets:n?Ia(t.adoptedStyleSheets):void 0}}(t,e);case t.DOCUMENT_TYPE_NODE:return{type:fa,name:(n=t).name,publicId:n.publicId,systemId:n.systemId};case t.ELEMENT_NODE:return function(t,e){const n=na(t.tagName),r=(i=t,\"svg\"===i.tagName||i instanceof SVGElement||void 0),o=Uo($o(t),e.parentNodePrivacyLevel);var i;if(o===Io.HIDDEN){const{width:e,height:o}=t.getBoundingClientRect();return{type:pa,tagName:n,attributes:{rr_width:`${e}px`,rr_height:`${o}px`,[No]:Oo},childNodes:[],isSVG:r}}if(o===Io.IGNORE)return;const s=function(t,e,n){if(e===Io.HIDDEN)return{};const r={},o=na(t.tagName),i=t.ownerDocument;for(let o=0;o<t.attributes.length;o+=1){const i=t.attributes.item(o).name,s=Na(t,e,i,n.configuration);null!==s&&(r[i]=s)}if(t.value&&(\"textarea\"===o||\"select\"===o||\"option\"===o||\"input\"===o)){const n=Xs(t,e);void 0!==n&&(r.value=n)}if(\"option\"===o&&e===Io.ALLOW){const e=t;e.selected&&(r.selected=e.selected)}if(\"link\"===o){const e=Array.from(i.styleSheets).find((e=>e.href===t.href)),n=Oa(e);n&&e&&(r._cssText=n)}if(\"style\"===o&&t.sheet){const e=Oa(t.sheet);e&&(r._cssText=e)}const s=t;if(\"input\"!==o||\"radio\"!==s.type&&\"checkbox\"!==s.type||(e===Io.ALLOW?r.checked=!!s.checked:zo(s,e)&&delete r.checked),\"audio\"===o||\"video\"===o){const e=t;r.rr_mediaState=e.paused?\"paused\":\"played\"}let a,c;const u=n.serializationContext;switch(u.status){case 0:a=Math.round(t.scrollTop),c=Math.round(t.scrollLeft),(a||c)&&u.elementsScrollPositions.set(t,{scrollTop:a,scrollLeft:c});break;case 1:u.elementsScrollPositions.has(t)&&({scrollTop:a,scrollLeft:c}=u.elementsScrollPositions.get(t))}return c&&(r.rr_scrollLeft=c),a&&(r.rr_scrollTop=a),r}(t,o,e);let a=[];if(function(t){return t.childNodes.length>0||To(t)}(t)&&\"style\"!==n){let r;r=e.parentNodePrivacyLevel===o&&e.ignoreWhiteSpace===(\"head\"===n)?e:{...e,parentNodePrivacyLevel:o,ignoreWhiteSpace:\"head\"===n},a=Ua(t,r)}return{type:pa,tagName:n,attributes:s,childNodes:a,isSVG:r}}(t,e);case t.TEXT_NODE:return function(t,e){const n=Vo(t,e.ignoreWhiteSpace||!1,e.parentNodePrivacyLevel);if(void 0===n)return;return{type:ha,textContent:n}}(t,e);case t.CDATA_SECTION_NODE:return{type:ma,textContent:\"\"}}var n}(t,e);if(!n)return null;const r=Js(t)||Pa++,o=n;return o.id=r,function(t,e){Ws.set(t,e)}(t,r),e.serializedNodeIds&&e.serializedNodeIds.add(r),o}let Pa=1;function Ua(t,e){const n=[];return Ao(t,(t=>{const r=Da(t,e);r&&n.push(r)})),n}function $a(t,e,n){return Da(t,{serializationContext:n,parentNodePrivacyLevel:e.defaultPrivacyLevel,configuration:e})}function za(t){return Boolean(t.changedTouches)}function Ba(t){return!0===t.composed&&To(t.target)?t.composedPath()[0]:t.target}const Va=(t,e)=>{const n=window.visualViewport,r={layoutViewportX:t,layoutViewportY:e,visualViewportX:t,visualViewportY:e};return n?(!function(t){return Math.abs(t.pageTop-t.offsetTop-window.scrollY)>25||Math.abs(t.pageLeft-t.offsetLeft-window.scrollX)>25}(n)?(r.visualViewportX=Math.round(t-n.offsetLeft),r.visualViewportY=Math.round(e-n.offsetTop)):(r.layoutViewportX=Math.round(t+n.offsetLeft),r.layoutViewportY=Math.round(e+n.offsetTop)),r):r},Fa=t=>({scale:t.scale,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,pageLeft:t.pageLeft,pageTop:t.pageTop,height:t.height,width:t.width});function ja(t,e){return{data:{source:t,...e},type:ia,timestamp:_()}}function qa(t,e){const{throttled:n,cancel:r}=J((t=>{const n=Ba(t);if(Ks(n)){const r=Ha(t);if(!r)return;const o={id:Js(n),timeOffset:0,x:r.x,y:r.y};e(ja(za(t)?ka:ya,{positions:[o]}))}}),50,{trailing:!1}),{stop:o}=Je(t,document,[\"mousemove\",\"touchmove\"],n,{capture:!0,passive:!0});return{stop:()=>{o(),r()}}}function Ha(t){let{clientX:e,clientY:n}=za(t)?t.changedTouches[0]:t;if(window.visualViewport){const{visualViewportX:t,visualViewportY:r}=Va(e,n);e=t,n=r}if(Number.isFinite(e)&&Number.isFinite(n))return{x:e,y:n};t.isTrusted&&vn(\"mouse/touch event without x/y\")}const Ga={pointerup:0,mousedown:1,click:2,contextmenu:3,dblclick:4,focus:Ta,blur:Ea,touchstart:7,touchend:9};function Wa(t,e,n){return Je(t,document,Object.keys(Ga),(r=>{const o=Ba(r);if(Po(o,t.defaultPrivacyLevel)===Io.HIDDEN||!Ks(o))return;const i=Js(o),s=Ga[r.type];let a;if(s!==Ea&&s!==Ta){const t=Ha(r);if(!t)return;a={id:i,type:s,x:t.x,y:t.y}}else a={id:i,type:s};const c={id:n.getIdForEvent(r),...ja(_a,a)};e(c)}),{capture:!0,passive:!0})}function Ka(t,e,n,r=document){const{throttled:o,cancel:i}=J((r=>{const o=Ba(r);if(!o||Po(o,t.defaultPrivacyLevel)===Io.HIDDEN||!Ks(o))return;const i=Js(o),s=o===document?{scrollTop:ts(),scrollLeft:Qi()}:{scrollTop:Math.round(o.scrollTop),scrollLeft:Math.round(o.scrollLeft)};n.set(o,s),e(ja(ba,{id:i,x:s.scrollLeft,y:s.scrollTop}))}),100),{stop:s}=Ke(t,r,\"scroll\",o,{capture:!0,passive:!0});return{stop:()=>{s(),i()}}}function Ja(t,e){const n=ns(t).subscribe((t=>{e(ja(wa,t))}));return{stop:()=>{n.unsubscribe()}}}function Xa(t,e){const n=window.visualViewport;if(!n)return{stop:X};const{throttled:r,cancel:o}=J((()=>{e({data:Fa(n),type:ua,timestamp:_()})}),200,{trailing:!1}),{stop:i}=Je(t,n,[\"resize\",\"scroll\"],r,{capture:!0,passive:!0});return{stop:()=>{i(),o()}}}function Ya(t,e){return Je(t,document,[\"play\",\"pause\"],(n=>{const r=Ba(n);r&&Po(r,t.defaultPrivacyLevel)!==Io.HIDDEN&&Ks(r)&&e(ja(Ca,{id:Js(r),type:\"play\"===n.type?Aa:Ra}))}),{capture:!0,passive:!0})}function Za(t){function e(t,e){t&&Ks(t.ownerNode)&&e(Js(t.ownerNode))}const n=[Ie(CSSStyleSheet.prototype,\"insertRule\",(({target:n,parameters:[r,o]})=>{e(n,(e=>t(ja(xa,{id:e,adds:[{rule:r,index:o}]}))))})),Ie(CSSStyleSheet.prototype,\"deleteRule\",(({target:n,parameters:[r]})=>{e(n,(e=>t(ja(xa,{id:e,removes:[{index:r}]}))))}))];function r(r){n.push(Ie(r.prototype,\"insertRule\",(({target:n,parameters:[r,o]})=>{e(n.parentStyleSheet,(e=>{const i=Qa(n);i&&(i.push(o||0),t(ja(xa,{id:e,adds:[{rule:r,index:i}]})))}))})),Ie(r.prototype,\"deleteRule\",(({target:n,parameters:[r]})=>{e(n.parentStyleSheet,(e=>{const o=Qa(n);o&&(o.push(r),t(ja(xa,{id:e,removes:[{index:o}]})))}))})))}return\"undefined\"!=typeof CSSGroupingRule?r(CSSGroupingRule):(r(CSSMediaRule),r(CSSSupportsRule)),{stop:()=>{n.forEach((t=>t.stop()))}}}function Qa(t){const e=[];let n=t;for(;n.parentRule;){const t=Array.from(n.parentRule.cssRules).indexOf(n);e.unshift(t),n=n.parentRule}if(!n.parentStyleSheet)return;const r=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return e.unshift(r),e}function tc(t,e){return Je(t,window,[\"focus\",\"blur\"],(()=>{e({data:{has_focus:document.hasFocus()},type:aa,timestamp:_()})}))}function ec(t,e,n){const r=t.subscribe(11,(t=>{var r,o;\"action\"===t.rawRumEvent.type&&\"click\"===t.rawRumEvent.action.type&&(null===(o=null===(r=t.rawRumEvent.action.frustration)||void 0===r?void 0:r.type)||void 0===o?void 0:o.length)&&\"events\"in t.domainContext&&t.domainContext.events&&t.domainContext.events.length&&e({timestamp:t.rawRumEvent.date,type:la,data:{frustrationTypes:t.rawRumEvent.action.frustration.type,recordIds:t.domainContext.events.map((t=>n.getIdForEvent(t)))}})}));return{stop:()=>{r.unsubscribe()}}}function nc(t,e){const n=t.subscribe(4,(()=>{e({timestamp:_(),type:ca})}));return{stop:()=>{n.unsubscribe()}}}function rc(t,e,n=document){const r=t.defaultPrivacyLevel,o=new WeakMap,i=n!==document,{stop:s}=Je(t,n,i?[\"change\"]:[\"input\",\"change\"],(t=>{const e=Ba(t);(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)&&c(e)}),{capture:!0,passive:!0});let a;if(i)a=X;else{const t=[Ne(HTMLInputElement.prototype,\"value\",c),Ne(HTMLInputElement.prototype,\"checked\",c),Ne(HTMLSelectElement.prototype,\"value\",c),Ne(HTMLTextAreaElement.prototype,\"value\",c),Ne(HTMLSelectElement.prototype,\"selectedIndex\",c)];a=()=>{t.forEach((t=>t.stop()))}}return{stop:()=>{a(),s()}};function c(t){const e=Po(t,r);if(e===Io.HIDDEN)return;const n=t.type;let o;if(\"radio\"===n||\"checkbox\"===n){if(zo(t,e))return;o={isChecked:t.checked}}else{const n=Xs(t,e);if(void 0===n)return;o={text:n}}u(t,o);const i=t.name;\"radio\"===n&&i&&t.checked&&document.querySelectorAll(`input[type=\"radio\"][name=\"${CSS.escape(i)}\"]`).forEach((e=>{e!==t&&u(e,{isChecked:!1})}))}function u(t,n){if(!Ks(t))return;const r=o.get(t);r&&r.text===n.text&&r.isChecked===n.isChecked||(o.set(t,n),e(ja(Sa,{id:Js(t),...n})))}}function oc(t,e,n,r){const o=Mr();if(!o)return{stop:X,flush:X};const i=function(t){let e=X,n=[];function r(){e(),t(n),n=[]}const{throttled:o,cancel:i}=J(r,16,{leading:!1});return{addMutations:t=>{0===n.length&&(e=nr(o,{timeout:100})),n.push(...t)},flush:r,stop:()=>{e(),i()}}}((r=>{!function(t,e,n,r){const o=new Map;t.filter((t=>\"childList\"===t.type)).forEach((t=>{t.removedNodes.forEach((t=>{ic(t,r.removeShadowRoot)}))}));const i=t.filter((t=>t.target.isConnected&&function(t){let e=t;for(;e;){if(!Ks(e)&&!Eo(e))return!1;e=Ro(e)}return!0}(t.target)&&Po(t.target,n.defaultPrivacyLevel,o)!==Io.HIDDEN)),{adds:s,removes:a,hasBeenSerialized:c}=function(t,e,n,r){const o=new Set,i=new Map;for(const e of t)e.addedNodes.forEach((t=>{o.add(t)})),e.removedNodes.forEach((t=>{o.has(t)||i.set(t,e.target),o.delete(t)}));const s=Array.from(o);a=s,a.sort(((t,e)=>{const n=t.compareDocumentPosition(e);return n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_CONTAINS||n&Node.DOCUMENT_POSITION_FOLLOWING?1:n&Node.DOCUMENT_POSITION_PRECEDING?-1:0}));var a;const c=new Set,u=[];for(const t of s){if(d(t))continue;const o=Po(t.parentNode,e.defaultPrivacyLevel,r);if(o===Io.HIDDEN||o===Io.IGNORE)continue;const i=Da(t,{serializedNodeIds:c,parentNodePrivacyLevel:o,serializationContext:{status:2,shadowRootsController:n},configuration:e});if(!i)continue;const s=Ro(t);u.push({nextId:f(t),parentId:Js(s),node:i})}const l=[];return i.forEach(((t,e)=>{Ks(e)&&l.push({parentId:Js(t),id:Js(e)})})),{adds:u,removes:l,hasBeenSerialized:d};function d(t){return Ks(t)&&c.has(Js(t))}function f(t){let e=t.nextSibling;for(;e;){if(Ks(e))return Js(e);e=e.nextSibling}return null}}(i.filter((t=>\"childList\"===t.type)),n,r,o),u=function(t,e,n){var r;const o=[],i=new Set,s=t.filter((t=>!i.has(t.target)&&(i.add(t.target),!0)));for(const t of s){if(t.target.textContent===t.oldValue)continue;const i=Po(Ro(t.target),e.defaultPrivacyLevel,n);i!==Io.HIDDEN&&i!==Io.IGNORE&&o.push({id:Js(t.target),value:null!==(r=Vo(t.target,!1,i))&&void 0!==r?r:null})}return o}(i.filter((t=>\"characterData\"===t.type&&!c(t.target))),n,o),l=function(t,e,n){const r=[],o=new Map,i=t.filter((t=>{const e=o.get(t.target);return(!e||!e.has(t.attributeName))&&(e?e.add(t.attributeName):o.set(t.target,new Set([t.attributeName])),!0)})),s=new Map;for(const t of i){if(t.target.getAttribute(t.attributeName)===t.oldValue)continue;const o=Po(t.target,e.defaultPrivacyLevel,n),i=Na(t.target,o,t.attributeName,e);let a;if(\"value\"===t.attributeName){const e=Xs(t.target,o);if(void 0===e)continue;a=e}else a=\"string\"==typeof i?i:null;let c=s.get(t.target);c||(c={id:Js(t.target),attributes:{}},r.push(c),s.set(t.target,c)),c.attributes[t.attributeName]=a}return r}(i.filter((t=>\"attributes\"===t.type&&!c(t.target))),n,o);if(!(u.length||l.length||a.length||s.length))return;e(ja(va,{adds:s,removes:a,texts:u,attributes:l}))}(r.concat(s.takeRecords()),t,e,n)})),s=new o(z(i.addMutations));return s.observe(r,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:()=>{s.disconnect(),i.stop()},flush:()=>{i.flush()}}}function ic(t,e){To(t)&&e(t.shadowRoot),Ao(t,(t=>ic(t,e)))}function sc(t){const{emit:e,configuration:n,lifeCycle:r}=t;if(!e)throw new Error(\"emit function is required\");const o=n=>{e(n),en(\"record\",{record:n});const r=t.viewHistory.findView();Ps(r.id).records_count+=1},i=function(){const t=new WeakMap;return{set(e,n){(e!==document||document.scrollingElement)&&t.set(e===document?document.scrollingElement:e,n)},get:e=>t.get(e),has:e=>t.has(e)}}(),s=((t,e,n)=>{const r=new Map,o={addShadowRoot:i=>{if(r.has(i))return;const s=oc(e,t,o,i),a=rc(t,e,i),c=Ka(t,e,n,i);r.set(i,{flush:()=>s.flush(),stop:()=>{s.stop(),a.stop(),c.stop()}})},removeShadowRoot:t=>{const e=r.get(t);e&&(e.stop(),r.delete(t))},stop:()=>{r.forEach((({stop:t})=>t()))},flush:()=>{r.forEach((({flush:t})=>t()))}};return o})(n,o,i),{stop:a}=function(t,e,n,r,o,i){const s=(n=_(),o={status:0,elementsScrollPositions:t,shadowRootsController:e})=>{const{width:i,height:s}=rs(),a=[{data:{height:s,href:window.location.href,width:i},type:sa,timestamp:n},{data:{has_focus:document.hasFocus()},type:aa,timestamp:n},{data:{node:$a(document,r,o),initialOffset:{left:Qi(),top:ts()}},type:oa,timestamp:n}];return window.visualViewport&&a.push({data:Fa(window.visualViewport),type:ua,timestamp:n}),a};i(s());const{unsubscribe:a}=n.subscribe(2,(n=>{o(),i(s(n.startClocks.timeStamp,{shadowRootsController:e,status:1,elementsScrollPositions:t}))}));return{stop:a}}(i,s,r,n,c,(t=>t.forEach((t=>o(t)))));function c(){s.flush(),l.flush()}const u=function(){const t=new WeakMap;let e=1;return{getIdForEvent:n=>(t.has(n)||t.set(n,e++),t.get(n))}}(),l=oc(o,n,s,document),d=[l,qa(n,o),Wa(n,o,u),Ka(n,o,i,document),Ja(n,o),rc(n,o),Ya(n,o),Za(o),tc(n,o),Xa(n,o),ec(r,o,u),nc(r,(t=>{c(),o(t)}))];return{stop:()=>{s.stop(),d.forEach((t=>t.stop())),a()},flushMutations:c,shadowRootsController:s}}function ac({context:t,creationReason:e,encoder:n}){let r=0;const o=t.view.id,i={start:1/0,end:-1/0,creation_reason:e,records_count:0,has_full_snapshot:!1,index_in_view:Ds(o),source:\"browser\",...t};return function(t){Ps(t).segments_count+=1}(o),{addRecord:function(t,e){i.start=Math.min(i.start,t.timestamp),i.end=Math.max(i.end,t.timestamp),i.records_count+=1,i.has_full_snapshot||(i.has_full_snapshot=t.type===oa);const o=n.isEmpty?'{\"records\":[':\",\";n.write(o+JSON.stringify(t),(t=>{r+=t,e(r)}))},flush:function(t){if(n.isEmpty)throw new Error(\"Empty segment flushed\");n.write(`],${JSON.stringify(i).slice(1)}\\n`),n.finish((e=>{!function(t,e){Ps(t).segments_total_raw_size+=e}(i.view.id,e.rawBytesCount),t(i,e)}))}}}let cc=6e4;function uc(t,e,n,r,o,i){return function(t,e,n,r){let o={status:0,nextSegmentCreationReason:\"init\"};const{unsubscribe:i}=t.subscribe(2,(()=>{a(\"view_change\")})),{unsubscribe:s}=t.subscribe(10,(t=>{a(t.reason)}));function a(t){1===o.status&&(o.segment.flush(((e,r)=>{const o=function(t,e,n){const r=new FormData;r.append(\"segment\",new Blob([t],{type:\"application/octet-stream\"}),`${e.session.id}-${e.start}`);const o={raw_segment_size:n,compressed_segment_size:t.byteLength,...e},i=JSON.stringify(o);return r.append(\"event\",new Blob([i],{type:\"application/json\"})),{data:r,bytesCount:t.byteLength}}(r.output,e,r.rawBytesCount);Vn(t)?n.sendOnExit(o):n.send(o)})),q(o.expirationTimeoutId)),o=\"stop\"!==t?{status:0,nextSegmentCreationReason:t}:{status:2}}return{addRecord:t=>{if(2!==o.status){if(0===o.status){const t=e();if(!t)return;o={status:1,segment:ac({encoder:r,context:t,creationReason:o.nextSegmentCreationReason}),expirationTimeoutId:j((()=>{a(\"segment_duration_limit\")}),5e3)}}o.segment.addRecord(t,(t=>{t>cc&&a(\"segment_bytes_limit\")}))}},stop:()=>{a(\"stop\"),i(),s()}}}(t,(()=>function(t,e,n){const r=e.findTrackedSession(),o=n.findView();if(!r||!o)return;return{application:{id:t},session:{id:r.id},view:{id:o.id}}}(e.applicationId,n,r)),o,i)}var lc=Object.freeze({__proto__:null,startRecording:function(t,e,n,r,o,i){const s=[],a=i||Mn(e.sessionReplayEndpointBuilder,cc,(e=>{t.notify(13,{error:e}),vn(\"Error reported to customer\",{\"error.message\":e.message})}));let c;if(zn())({addRecord:c}=function(t){const e=Un();return{addRecord:n=>{const r=t.findView();e.send(\"record\",n,r.id)}}}(r));else{const i=uc(t,e,n,r,a,o);c=i.addRecord,s.push(i.stop)}const{stop:u}=sc({emit:c,configuration:e,lifeCycle:t,viewHistory:r});return s.push(u),{stop:()=>{s.forEach((t=>t()))}}}});\n",
2497
+ "map": null,
2498
+ "preliminaryFileName": "rum-browser-sdk.js",
2499
+ "sourcemapFileName": null
2500
+ }
2501
+ }
2502
+ ]