@cloudcare/browser-rum 3.3.6 → 3.3.8

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 (363) hide show
  1. package/README.md +24 -3
  2. package/README.zh.md +19 -3
  3. package/bundle/dataflux-rum.js +1 -1
  4. package/cjs/boot/buildEnv.js +1 -1
  5. package/cjs/boot/buildEnv.js.map +1 -1
  6. package/cjs/boot/perStartRum.js.map +1 -1
  7. package/cjs/boot/recorderApi.js +170 -200
  8. package/cjs/boot/recorderApi.js.map +1 -1
  9. package/cjs/boot/recorderApiStub.js +3 -29
  10. package/cjs/boot/recorderApiStub.js.map +1 -1
  11. package/cjs/boot/rum.entry.js.map +1 -1
  12. package/cjs/boot/rum.js.map +1 -1
  13. package/cjs/boot/rum.slim.entry.js.map +1 -1
  14. package/cjs/boot/rumEntryFactory.js.map +1 -1
  15. package/cjs/boot/rumPublicApi.js.map +1 -1
  16. package/cjs/boot/rumRecorderApiStub.js.map +1 -1
  17. package/cjs/boot/rumSlimConfiguration.js.map +1 -1
  18. package/cjs/boot/sessionReplayPublicApi.js +14 -27
  19. package/cjs/boot/sessionReplayPublicApi.js.map +1 -1
  20. package/cjs/boot/startRecording.js +333 -108
  21. package/cjs/boot/startRecording.js.map +1 -1
  22. package/cjs/constants.js.map +1 -1
  23. package/cjs/domain/assembly.js +1 -7
  24. package/cjs/domain/assembly.js.map +1 -1
  25. package/cjs/domain/configuration.js +31 -43
  26. package/cjs/domain/configuration.js.map +1 -1
  27. package/cjs/domain/contexts/commonContext.js.map +1 -1
  28. package/cjs/domain/contexts/displayContext.js.map +1 -1
  29. package/cjs/domain/contexts/foregroundContexts.js.map +1 -1
  30. package/cjs/domain/contexts/internalContext.js.map +1 -1
  31. package/cjs/domain/contexts/pageStateHistory.js.map +1 -1
  32. package/cjs/domain/contexts/urlContexts.js +10 -1
  33. package/cjs/domain/contexts/urlContexts.js.map +1 -1
  34. package/cjs/domain/contexts/viewContexts.js +1 -0
  35. package/cjs/domain/contexts/viewContexts.js.map +1 -1
  36. package/cjs/domain/deflate/deflateEncoder.js +517 -39
  37. package/cjs/domain/deflate/deflateEncoder.js.map +1 -1
  38. package/cjs/domain/deflate/deflateWorker.js +194 -115
  39. package/cjs/domain/deflate/deflateWorker.js.map +1 -1
  40. package/cjs/domain/deflate/index.js.map +1 -1
  41. package/cjs/domain/domMutationObservable.js.map +1 -1
  42. package/cjs/domain/encoderStreamId.js.map +1 -1
  43. package/cjs/domain/firstInputPolyfill.js.map +1 -1
  44. package/cjs/domain/initViewportObservable.js.map +1 -1
  45. package/cjs/domain/locationChangeObservable.js.map +1 -1
  46. package/cjs/domain/performanceObservable.js.map +1 -1
  47. package/cjs/domain/performanceUtils.js.map +1 -1
  48. package/cjs/domain/plugins.js.map +1 -1
  49. package/cjs/domain/replay/record/canvasAutoSnapshot.js.map +1 -1
  50. package/cjs/domain/replay/record/canvasCommandCapture.js +968 -167
  51. package/cjs/domain/replay/record/canvasCommandCapture.js.map +1 -1
  52. package/cjs/domain/replay/record/canvasCommandObserver.js +1058 -119
  53. package/cjs/domain/replay/record/canvasCommandObserver.js.map +1 -1
  54. package/cjs/domain/replay/record/canvasCommandSerializeArgs.js +61 -37
  55. package/cjs/domain/replay/record/canvasCommandSerializeArgs.js.map +1 -1
  56. package/cjs/domain/replay/record/canvasContext.js +63 -0
  57. package/cjs/domain/replay/record/canvasContext.js.map +1 -0
  58. package/cjs/domain/replay/record/canvasContinuousScheduler.js +246 -118
  59. package/cjs/domain/replay/record/canvasContinuousScheduler.js.map +1 -1
  60. package/cjs/domain/replay/record/canvasEncodeBridge.js +539 -87
  61. package/cjs/domain/replay/record/canvasEncodeBridge.js.map +1 -1
  62. package/cjs/domain/replay/record/canvasEncodeWorker.js +50 -32
  63. package/cjs/domain/replay/record/canvasEncodeWorker.js.map +1 -1
  64. package/cjs/domain/replay/record/canvasFrameSignature.js +49 -17
  65. package/cjs/domain/replay/record/canvasFrameSignature.js.map +1 -1
  66. package/cjs/domain/replay/record/canvasMutationRecord.js.map +1 -1
  67. package/cjs/domain/replay/record/canvasObserver.js +295 -59
  68. package/cjs/domain/replay/record/canvasObserver.js.map +1 -1
  69. package/cjs/domain/replay/record/canvasSerializeArgs.js.map +1 -1
  70. package/cjs/domain/replay/record/canvasWebGLPluginHost.js +33 -0
  71. package/cjs/domain/replay/record/canvasWebGLPluginHost.js.map +1 -0
  72. package/cjs/domain/replay/record/elementsScrollPositions.js +3 -0
  73. package/cjs/domain/replay/record/elementsScrollPositions.js.map +1 -1
  74. package/cjs/domain/replay/record/index.js.map +1 -1
  75. package/cjs/domain/replay/record/mutationBatch.js +542 -25
  76. package/cjs/domain/replay/record/mutationBatch.js.map +1 -1
  77. package/cjs/domain/replay/record/mutationObserver.js +1900 -191
  78. package/cjs/domain/replay/record/mutationObserver.js.map +1 -1
  79. package/cjs/domain/replay/record/mutationResourceBudget.js +144 -0
  80. package/cjs/domain/replay/record/mutationResourceBudget.js.map +1 -0
  81. package/cjs/domain/replay/record/observers.js +222 -53
  82. package/cjs/domain/replay/record/observers.js.map +1 -1
  83. package/cjs/domain/replay/record/privacy.js +31 -8
  84. package/cjs/domain/replay/record/privacy.js.map +1 -1
  85. package/cjs/domain/replay/record/record.js +3083 -321
  86. package/cjs/domain/replay/record/record.js.map +1 -1
  87. package/cjs/domain/replay/record/serializationUtils.js +426 -26
  88. package/cjs/domain/replay/record/serializationUtils.js.map +1 -1
  89. package/cjs/domain/replay/record/serialize.js +259 -49
  90. package/cjs/domain/replay/record/serialize.js.map +1 -1
  91. package/cjs/domain/replay/record/shadowRootsController.js +875 -21
  92. package/cjs/domain/replay/record/shadowRootsController.js.map +1 -1
  93. package/cjs/domain/replay/record/utils.js.map +1 -1
  94. package/cjs/domain/replay/record/viewports.js.map +1 -1
  95. package/cjs/domain/replay/replayStats.js.map +1 -1
  96. package/cjs/domain/replay/segmentCollection/buildReplayPayload.js.map +1 -1
  97. package/cjs/domain/replay/segmentCollection/index.js.map +1 -1
  98. package/cjs/domain/replay/segmentCollection/segment.js +315 -11
  99. package/cjs/domain/replay/segmentCollection/segment.js.map +1 -1
  100. package/cjs/domain/replay/segmentCollection/segmentCollection.js +956 -71
  101. package/cjs/domain/replay/segmentCollection/segmentCollection.js.map +1 -1
  102. package/cjs/domain/replay/startRecordBridge.js.map +1 -1
  103. package/cjs/domain/requestCollection.js.map +1 -1
  104. package/cjs/domain/rumEventsCollection/actions/actionCollection.js.map +1 -1
  105. package/cjs/domain/rumEventsCollection/actions/clickChain.js.map +1 -1
  106. package/cjs/domain/rumEventsCollection/actions/computeFrustration.js.map +1 -1
  107. package/cjs/domain/rumEventsCollection/actions/getActionNameFromElement.js.map +1 -1
  108. package/cjs/domain/rumEventsCollection/actions/getSelectorsFromElement.js.map +1 -1
  109. package/cjs/domain/rumEventsCollection/actions/interactionSelectorCache.js.map +1 -1
  110. package/cjs/domain/rumEventsCollection/actions/listenActionEvents.js.map +1 -1
  111. package/cjs/domain/rumEventsCollection/actions/trackClickActions.js.map +1 -1
  112. package/cjs/domain/rumEventsCollection/error/errorCollection.js.map +1 -1
  113. package/cjs/domain/rumEventsCollection/error/trackConsoleError.js.map +1 -1
  114. package/cjs/domain/rumEventsCollection/error/trackReportError.js.map +1 -1
  115. package/cjs/domain/rumEventsCollection/longTask/longAnimationFrameCollection.js.map +1 -1
  116. package/cjs/domain/rumEventsCollection/longTask/longTaskCollection.js.map +1 -1
  117. package/cjs/domain/rumEventsCollection/resource/matchRequestResourceEntry.js.map +1 -1
  118. package/cjs/domain/rumEventsCollection/resource/resourceCollection.js +1 -0
  119. package/cjs/domain/rumEventsCollection/resource/resourceCollection.js.map +1 -1
  120. package/cjs/domain/rumEventsCollection/resource/resourceTrackerManager.js.map +1 -1
  121. package/cjs/domain/rumEventsCollection/resource/resourceUtils.js.map +1 -1
  122. package/cjs/domain/rumEventsCollection/resource/retrieveInitialDocumentResourceTiming.js.map +1 -1
  123. package/cjs/domain/rumEventsCollection/resource/webSocketCollection.js +1 -0
  124. package/cjs/domain/rumEventsCollection/resource/webSocketCollection.js.map +1 -1
  125. package/cjs/domain/rumEventsCollection/view/interactionCountPolyfill.js.map +1 -1
  126. package/cjs/domain/rumEventsCollection/view/trackCommonViewMetrics.js.map +1 -1
  127. package/cjs/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js.map +1 -1
  128. package/cjs/domain/rumEventsCollection/view/trackFirstContentfulPaint.js.map +1 -1
  129. package/cjs/domain/rumEventsCollection/view/trackFirstHidden.js.map +1 -1
  130. package/cjs/domain/rumEventsCollection/view/trackFirstInput.js.map +1 -1
  131. package/cjs/domain/rumEventsCollection/view/trackInitialViewTimings.js.map +1 -1
  132. package/cjs/domain/rumEventsCollection/view/trackInteractionToNextPaint.js.map +1 -1
  133. package/cjs/domain/rumEventsCollection/view/trackLargestContentfulPaint.js.map +1 -1
  134. package/cjs/domain/rumEventsCollection/view/trackLoadingTime.js.map +1 -1
  135. package/cjs/domain/rumEventsCollection/view/trackNavigationTimings.js.map +1 -1
  136. package/cjs/domain/rumEventsCollection/view/trackScrollMetrics.js.map +1 -1
  137. package/cjs/domain/rumEventsCollection/view/trackViewEventCounts.js.map +1 -1
  138. package/cjs/domain/rumEventsCollection/view/trackViews.js +29 -11
  139. package/cjs/domain/rumEventsCollection/view/trackViews.js.map +1 -1
  140. package/cjs/domain/rumEventsCollection/view/viewCollection.js.map +1 -1
  141. package/cjs/domain/rumSessionManager.js.map +1 -1
  142. package/cjs/domain/tracing/ddtraceTracer.js.map +1 -1
  143. package/cjs/domain/tracing/getDocumentTraceId.js.map +1 -1
  144. package/cjs/domain/tracing/jaegerTracer.js.map +1 -1
  145. package/cjs/domain/tracing/sampler.js.map +1 -1
  146. package/cjs/domain/tracing/skywalkingTracer.js.map +1 -1
  147. package/cjs/domain/tracing/traceIdentifier.js.map +1 -1
  148. package/cjs/domain/tracing/tracer.js +2 -2
  149. package/cjs/domain/tracing/tracer.js.map +1 -1
  150. package/cjs/domain/tracing/w3cTraceParentTracer.js.map +1 -1
  151. package/cjs/domain/tracing/zipkinMultiTracer.js.map +1 -1
  152. package/cjs/domain/tracing/zipkinSingleTracer.js.map +1 -1
  153. package/cjs/domain/trackEventCounts.js.map +1 -1
  154. package/cjs/domain/usr/index.js.map +1 -1
  155. package/cjs/domain/waitPageActivityEnd.js.map +1 -1
  156. package/cjs/index.js.map +1 -1
  157. package/cjs/transport/startRumBatch.js +3 -1
  158. package/cjs/transport/startRumBatch.js.map +1 -1
  159. package/cjs/transport/startRumEventBridge.js.map +1 -1
  160. package/cjs/types/index.js.map +1 -1
  161. package/cjs/types/sessionReplayConstants.js.map +1 -1
  162. package/esm/boot/buildEnv.js +1 -1
  163. package/esm/boot/buildEnv.js.map +1 -1
  164. package/esm/boot/perStartRum.js.map +1 -1
  165. package/esm/boot/recorderApi.js +172 -202
  166. package/esm/boot/recorderApi.js.map +1 -1
  167. package/esm/boot/recorderApiStub.js +3 -29
  168. package/esm/boot/recorderApiStub.js.map +1 -1
  169. package/esm/boot/rum.entry.js.map +1 -1
  170. package/esm/boot/rum.js.map +1 -1
  171. package/esm/boot/rum.slim.entry.js.map +1 -1
  172. package/esm/boot/rumEntryFactory.js.map +1 -1
  173. package/esm/boot/rumPublicApi.js.map +1 -1
  174. package/esm/boot/rumRecorderApiStub.js.map +1 -1
  175. package/esm/boot/rumSlimConfiguration.js.map +1 -1
  176. package/esm/boot/sessionReplayPublicApi.js +14 -27
  177. package/esm/boot/sessionReplayPublicApi.js.map +1 -1
  178. package/esm/boot/startRecording.js +334 -109
  179. package/esm/boot/startRecording.js.map +1 -1
  180. package/esm/constants.js.map +1 -1
  181. package/esm/domain/assembly.js +1 -7
  182. package/esm/domain/assembly.js.map +1 -1
  183. package/esm/domain/configuration.js +31 -43
  184. package/esm/domain/configuration.js.map +1 -1
  185. package/esm/domain/contexts/commonContext.js.map +1 -1
  186. package/esm/domain/contexts/displayContext.js.map +1 -1
  187. package/esm/domain/contexts/foregroundContexts.js.map +1 -1
  188. package/esm/domain/contexts/internalContext.js.map +1 -1
  189. package/esm/domain/contexts/pageStateHistory.js.map +1 -1
  190. package/esm/domain/contexts/urlContexts.js +11 -2
  191. package/esm/domain/contexts/urlContexts.js.map +1 -1
  192. package/esm/domain/contexts/viewContexts.js +2 -1
  193. package/esm/domain/contexts/viewContexts.js.map +1 -1
  194. package/esm/domain/deflate/deflateEncoder.js +517 -39
  195. package/esm/domain/deflate/deflateEncoder.js.map +1 -1
  196. package/esm/domain/deflate/deflateWorker.js +193 -116
  197. package/esm/domain/deflate/deflateWorker.js.map +1 -1
  198. package/esm/domain/deflate/index.js.map +1 -1
  199. package/esm/domain/domMutationObservable.js.map +1 -1
  200. package/esm/domain/encoderStreamId.js.map +1 -1
  201. package/esm/domain/firstInputPolyfill.js.map +1 -1
  202. package/esm/domain/initViewportObservable.js.map +1 -1
  203. package/esm/domain/locationChangeObservable.js.map +1 -1
  204. package/esm/domain/performanceObservable.js.map +1 -1
  205. package/esm/domain/performanceUtils.js.map +1 -1
  206. package/esm/domain/plugins.js.map +1 -1
  207. package/esm/domain/replay/record/canvasAutoSnapshot.js.map +1 -1
  208. package/esm/domain/replay/record/canvasCommandCapture.js +968 -168
  209. package/esm/domain/replay/record/canvasCommandCapture.js.map +1 -1
  210. package/esm/domain/replay/record/canvasCommandObserver.js +1058 -119
  211. package/esm/domain/replay/record/canvasCommandObserver.js.map +1 -1
  212. package/esm/domain/replay/record/canvasCommandSerializeArgs.js +60 -37
  213. package/esm/domain/replay/record/canvasCommandSerializeArgs.js.map +1 -1
  214. package/esm/domain/replay/record/canvasContext.js +50 -0
  215. package/esm/domain/replay/record/canvasContext.js.map +1 -0
  216. package/esm/domain/replay/record/canvasContinuousScheduler.js +246 -118
  217. package/esm/domain/replay/record/canvasContinuousScheduler.js.map +1 -1
  218. package/esm/domain/replay/record/canvasEncodeBridge.js +539 -87
  219. package/esm/domain/replay/record/canvasEncodeBridge.js.map +1 -1
  220. package/esm/domain/replay/record/canvasEncodeWorker.js +51 -33
  221. package/esm/domain/replay/record/canvasEncodeWorker.js.map +1 -1
  222. package/esm/domain/replay/record/canvasFrameSignature.js +50 -17
  223. package/esm/domain/replay/record/canvasFrameSignature.js.map +1 -1
  224. package/esm/domain/replay/record/canvasMutationRecord.js.map +1 -1
  225. package/esm/domain/replay/record/canvasObserver.js +295 -59
  226. package/esm/domain/replay/record/canvasObserver.js.map +1 -1
  227. package/esm/domain/replay/record/canvasSerializeArgs.js.map +1 -1
  228. package/esm/domain/replay/record/canvasWebGLPluginHost.js +26 -0
  229. package/esm/domain/replay/record/canvasWebGLPluginHost.js.map +1 -0
  230. package/esm/domain/replay/record/elementsScrollPositions.js +3 -0
  231. package/esm/domain/replay/record/elementsScrollPositions.js.map +1 -1
  232. package/esm/domain/replay/record/index.js.map +1 -1
  233. package/esm/domain/replay/record/mutationBatch.js +541 -25
  234. package/esm/domain/replay/record/mutationBatch.js.map +1 -1
  235. package/esm/domain/replay/record/mutationObserver.js +1892 -195
  236. package/esm/domain/replay/record/mutationObserver.js.map +1 -1
  237. package/esm/domain/replay/record/mutationResourceBudget.js +137 -0
  238. package/esm/domain/replay/record/mutationResourceBudget.js.map +1 -0
  239. package/esm/domain/replay/record/observers.js +224 -55
  240. package/esm/domain/replay/record/observers.js.map +1 -1
  241. package/esm/domain/replay/record/privacy.js +30 -7
  242. package/esm/domain/replay/record/privacy.js.map +1 -1
  243. package/esm/domain/replay/record/record.js +3086 -325
  244. package/esm/domain/replay/record/record.js.map +1 -1
  245. package/esm/domain/replay/record/serializationUtils.js +422 -25
  246. package/esm/domain/replay/record/serializationUtils.js.map +1 -1
  247. package/esm/domain/replay/record/serialize.js +258 -50
  248. package/esm/domain/replay/record/serialize.js.map +1 -1
  249. package/esm/domain/replay/record/shadowRootsController.js +875 -21
  250. package/esm/domain/replay/record/shadowRootsController.js.map +1 -1
  251. package/esm/domain/replay/record/utils.js.map +1 -1
  252. package/esm/domain/replay/record/viewports.js.map +1 -1
  253. package/esm/domain/replay/replayStats.js.map +1 -1
  254. package/esm/domain/replay/segmentCollection/buildReplayPayload.js.map +1 -1
  255. package/esm/domain/replay/segmentCollection/index.js.map +1 -1
  256. package/esm/domain/replay/segmentCollection/segment.js +315 -10
  257. package/esm/domain/replay/segmentCollection/segment.js.map +1 -1
  258. package/esm/domain/replay/segmentCollection/segmentCollection.js +957 -72
  259. package/esm/domain/replay/segmentCollection/segmentCollection.js.map +1 -1
  260. package/esm/domain/replay/startRecordBridge.js.map +1 -1
  261. package/esm/domain/requestCollection.js.map +1 -1
  262. package/esm/domain/rumEventsCollection/actions/actionCollection.js.map +1 -1
  263. package/esm/domain/rumEventsCollection/actions/clickChain.js.map +1 -1
  264. package/esm/domain/rumEventsCollection/actions/computeFrustration.js.map +1 -1
  265. package/esm/domain/rumEventsCollection/actions/getActionNameFromElement.js.map +1 -1
  266. package/esm/domain/rumEventsCollection/actions/getSelectorsFromElement.js.map +1 -1
  267. package/esm/domain/rumEventsCollection/actions/interactionSelectorCache.js.map +1 -1
  268. package/esm/domain/rumEventsCollection/actions/listenActionEvents.js.map +1 -1
  269. package/esm/domain/rumEventsCollection/actions/trackClickActions.js.map +1 -1
  270. package/esm/domain/rumEventsCollection/error/errorCollection.js.map +1 -1
  271. package/esm/domain/rumEventsCollection/error/trackConsoleError.js.map +1 -1
  272. package/esm/domain/rumEventsCollection/error/trackReportError.js.map +1 -1
  273. package/esm/domain/rumEventsCollection/longTask/longAnimationFrameCollection.js.map +1 -1
  274. package/esm/domain/rumEventsCollection/longTask/longTaskCollection.js.map +1 -1
  275. package/esm/domain/rumEventsCollection/resource/matchRequestResourceEntry.js.map +1 -1
  276. package/esm/domain/rumEventsCollection/resource/resourceCollection.js +1 -0
  277. package/esm/domain/rumEventsCollection/resource/resourceCollection.js.map +1 -1
  278. package/esm/domain/rumEventsCollection/resource/resourceTrackerManager.js.map +1 -1
  279. package/esm/domain/rumEventsCollection/resource/resourceUtils.js.map +1 -1
  280. package/esm/domain/rumEventsCollection/resource/retrieveInitialDocumentResourceTiming.js.map +1 -1
  281. package/esm/domain/rumEventsCollection/resource/webSocketCollection.js +1 -0
  282. package/esm/domain/rumEventsCollection/resource/webSocketCollection.js.map +1 -1
  283. package/esm/domain/rumEventsCollection/view/interactionCountPolyfill.js.map +1 -1
  284. package/esm/domain/rumEventsCollection/view/trackCommonViewMetrics.js.map +1 -1
  285. package/esm/domain/rumEventsCollection/view/trackCumulativeLayoutShift.js.map +1 -1
  286. package/esm/domain/rumEventsCollection/view/trackFirstContentfulPaint.js.map +1 -1
  287. package/esm/domain/rumEventsCollection/view/trackFirstHidden.js.map +1 -1
  288. package/esm/domain/rumEventsCollection/view/trackFirstInput.js.map +1 -1
  289. package/esm/domain/rumEventsCollection/view/trackInitialViewTimings.js.map +1 -1
  290. package/esm/domain/rumEventsCollection/view/trackInteractionToNextPaint.js.map +1 -1
  291. package/esm/domain/rumEventsCollection/view/trackLargestContentfulPaint.js.map +1 -1
  292. package/esm/domain/rumEventsCollection/view/trackLoadingTime.js.map +1 -1
  293. package/esm/domain/rumEventsCollection/view/trackNavigationTimings.js.map +1 -1
  294. package/esm/domain/rumEventsCollection/view/trackScrollMetrics.js.map +1 -1
  295. package/esm/domain/rumEventsCollection/view/trackViewEventCounts.js.map +1 -1
  296. package/esm/domain/rumEventsCollection/view/trackViews.js +30 -12
  297. package/esm/domain/rumEventsCollection/view/trackViews.js.map +1 -1
  298. package/esm/domain/rumEventsCollection/view/viewCollection.js.map +1 -1
  299. package/esm/domain/rumSessionManager.js.map +1 -1
  300. package/esm/domain/tracing/ddtraceTracer.js.map +1 -1
  301. package/esm/domain/tracing/getDocumentTraceId.js.map +1 -1
  302. package/esm/domain/tracing/jaegerTracer.js.map +1 -1
  303. package/esm/domain/tracing/sampler.js.map +1 -1
  304. package/esm/domain/tracing/skywalkingTracer.js.map +1 -1
  305. package/esm/domain/tracing/traceIdentifier.js.map +1 -1
  306. package/esm/domain/tracing/tracer.js +2 -2
  307. package/esm/domain/tracing/tracer.js.map +1 -1
  308. package/esm/domain/tracing/w3cTraceParentTracer.js.map +1 -1
  309. package/esm/domain/tracing/zipkinMultiTracer.js.map +1 -1
  310. package/esm/domain/tracing/zipkinSingleTracer.js.map +1 -1
  311. package/esm/domain/trackEventCounts.js.map +1 -1
  312. package/esm/domain/usr/index.js.map +1 -1
  313. package/esm/domain/waitPageActivityEnd.js.map +1 -1
  314. package/esm/index.js.map +1 -1
  315. package/esm/transport/startRumBatch.js +4 -2
  316. package/esm/transport/startRumBatch.js.map +1 -1
  317. package/esm/transport/startRumEventBridge.js.map +1 -1
  318. package/esm/types/index.js.map +1 -1
  319. package/esm/types/sessionReplayConstants.js.map +1 -1
  320. package/package.json +12 -7
  321. package/src/boot/recorderApi.js +247 -220
  322. package/src/boot/recorderApiStub.js +3 -29
  323. package/src/boot/sessionReplayPublicApi.js +15 -28
  324. package/src/boot/startRecording.js +429 -146
  325. package/src/domain/assembly.js +5 -4
  326. package/src/domain/configuration.js +63 -100
  327. package/src/domain/contexts/urlContexts.js +16 -4
  328. package/src/domain/contexts/viewContexts.js +3 -1
  329. package/src/domain/deflate/deflateEncoder.js +699 -43
  330. package/src/domain/deflate/deflateWorker.js +237 -136
  331. package/src/domain/replay/record/canvasCommandCapture.js +1374 -180
  332. package/src/domain/replay/record/canvasCommandObserver.js +1585 -150
  333. package/src/domain/replay/record/canvasCommandSerializeArgs.js +79 -42
  334. package/src/domain/replay/record/canvasContext.js +67 -0
  335. package/src/domain/replay/record/canvasContinuousScheduler.js +379 -143
  336. package/src/domain/replay/record/canvasEncodeBridge.js +691 -106
  337. package/src/domain/replay/record/canvasEncodeWorker.js +67 -43
  338. package/src/domain/replay/record/canvasFrameSignature.js +58 -24
  339. package/src/domain/replay/record/canvasObserver.js +461 -89
  340. package/src/domain/replay/record/canvasWebGLPluginHost.js +43 -0
  341. package/src/domain/replay/record/elementsScrollPositions.js +3 -0
  342. package/src/domain/replay/record/mutationBatch.js +761 -27
  343. package/src/domain/replay/record/mutationObserver.js +2992 -261
  344. package/src/domain/replay/record/mutationResourceBudget.js +191 -0
  345. package/src/domain/replay/record/observers.js +367 -97
  346. package/src/domain/replay/record/privacy.js +34 -12
  347. package/src/domain/replay/record/record.js +4284 -413
  348. package/src/domain/replay/record/serializationUtils.js +587 -28
  349. package/src/domain/replay/record/serialize.js +432 -66
  350. package/src/domain/replay/record/shadowRootsController.js +1108 -30
  351. package/src/domain/replay/segmentCollection/segment.js +441 -11
  352. package/src/domain/replay/segmentCollection/segmentCollection.js +1300 -77
  353. package/src/domain/rumEventsCollection/resource/resourceCollection.js +1 -0
  354. package/src/domain/rumEventsCollection/resource/webSocketCollection.js +1 -0
  355. package/src/domain/rumEventsCollection/view/trackViews.js +36 -12
  356. package/src/domain/tracing/tracer.js +4 -5
  357. package/src/transport/startRumBatch.js +6 -1
  358. package/types/index.d.ts +15 -2
  359. package/cjs/domain/replay/record/canvasReplayFixtures.js +0 -105
  360. package/cjs/domain/replay/record/canvasReplayFixtures.js.map +0 -1
  361. package/esm/domain/replay/record/canvasReplayFixtures.js +0 -96
  362. package/esm/domain/replay/record/canvasReplayFixtures.js.map +0 -1
  363. package/src/domain/replay/record/canvasReplayFixtures.js +0 -113
@@ -14,11 +14,70 @@ var _replayStats = require("../domain/replay/replayStats");
14
14
  /* How long to wait for error checkouts */
15
15
  var BUFFER_CHECKOUT_TIME = exports.BUFFER_CHECKOUT_TIME = 60 * _browserCore.ONE_SECOND;
16
16
  var REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT = 10;
17
- function startRecording(lifeCycle, configuration, sessionManager, viewContexts, encoder, httpRequest) {
17
+ function startRecording(lifeCycle, configuration, sessionManager, viewContexts, encoder, httpRequest, onStopped, createHttpRequestOverride, recordOverride) {
18
+ var createHttpRequestImpl = false ? createHttpRequestOverride || _browserCore.createHttpRequest : _browserCore.createHttpRequest;
19
+ var recordImpl = false ? recordOverride || _record2.record : _record2.record;
18
20
  var cleanupTasks = [];
21
+ var isRecordingStopped = false;
22
+ var isRecordingReady = false;
23
+ var pendingStopRequested = false;
24
+ var pendingStopReason;
25
+ var stoppedNotificationSent = false;
26
+ var flushRecorderBeforePageExit = function flushRecorderBeforePageExit() {};
27
+ var replayResetRequestedBeforeRecorder = false;
28
+ var requestReplayReset = function requestReplayReset() {
29
+ replayResetRequestedBeforeRecorder = true;
30
+ };
31
+ function notifyStopped(flushReason) {
32
+ if (stoppedNotificationSent || !onStopped) {
33
+ return;
34
+ }
35
+ stoppedNotificationSent = true;
36
+ try {
37
+ onStopped(flushReason);
38
+ } catch (error) {
39
+ (0, _browserCore.addTelemetryDebug)('Session Replay stopped callback failed.', {
40
+ reason: flushReason,
41
+ error: String(error)
42
+ });
43
+ }
44
+ }
45
+ function stopRecording(flushReason) {
46
+ if (isRecordingStopped) {
47
+ return;
48
+ }
49
+ if (!isRecordingReady) {
50
+ pendingStopRequested = true;
51
+ pendingStopReason = flushReason;
52
+ return;
53
+ }
54
+ isRecordingStopped = true;
55
+ var firstCleanupError;
56
+ cleanupTasks.slice().reverse().forEach(function (task) {
57
+ try {
58
+ task(flushReason);
59
+ } catch (error) {
60
+ if (!firstCleanupError) {
61
+ firstCleanupError = error;
62
+ }
63
+ }
64
+ });
65
+ if (firstCleanupError) {
66
+ (0, _browserCore.addTelemetryDebug)('Session Replay cleanup failed.', {
67
+ reason: flushReason,
68
+ error: String(firstCleanupError)
69
+ });
70
+ }
71
+ notifyStopped(flushReason);
72
+ }
19
73
  var lastReplaySegmentFlushForDebug;
20
- var replaySegmentFlushHistoryForDebug = [];
74
+ var replaySegmentFlushHistoryForDebug = false ? [] : undefined;
21
75
  var replaySegmentFlushCount = 0;
76
+ var replayResetCountForDebug = 0;
77
+ var replayResetLastReasonForDebug;
78
+ var areReplaySegmentsLockedForDebug = function areReplaySegmentsLockedForDebug() {
79
+ return false;
80
+ };
22
81
  var reportError = function reportError(error) {
23
82
  lifeCycle.notify(_browserCore.LifeCycleEventType.RAW_ERROR_COLLECTED, {
24
83
  error: error
@@ -27,124 +86,287 @@ function startRecording(lifeCycle, configuration, sessionManager, viewContexts,
27
86
  'error.message': error.message
28
87
  });
29
88
  };
30
- var replayRequest = httpRequest || (0, _browserCore.createHttpRequest)(configuration.sessionReplayEndPoint, _segmentCollection.SEGMENT_BYTES_LIMIT, configuration.retryMaxSize, reportError);
31
- var addRecord, _record;
32
- if (!(0, _browserCore.canUseEventBridge)()) {
33
- var session = sessionManager.findTrackedSession();
34
- var isRecordErrorSessionReplay = session && session.errorSessionReplayAllowed && !session.sessionHasError;
35
- var segmentCollection = (0, _segmentCollection.startSegmentCollection)(lifeCycle, configuration, sessionManager, viewContexts, replayRequest, encoder, isRecordErrorSessionReplay, {
36
- onSegmentFlushed: function onSegmentFlushed(segmentFlush) {
37
- replaySegmentFlushCount += 1;
38
- lastReplaySegmentFlushForDebug = cloneReplaySegmentFlushForDebug(segmentFlush, replaySegmentFlushCount);
39
- replaySegmentFlushHistoryForDebug.push(lastReplaySegmentFlushForDebug);
40
- if (replaySegmentFlushHistoryForDebug.length > REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT) {
41
- replaySegmentFlushHistoryForDebug.shift();
42
- }
43
- }
44
- });
45
- addRecord = segmentCollection.addRecord;
46
- var flushBufferSegment = segmentCollection.flushBufferSegment;
47
- var unlockSegment = segmentCollection.unlockSegment;
48
- cleanupTasks.push(segmentCollection.stop);
49
- if (isRecordErrorSessionReplay) {
50
- sessionManager.sessionStateUpdateObservable.subscribe(function (_ref) {
51
- var previousState = _ref.previousState,
52
- newState = _ref.newState;
53
- if (!previousState.hasError && newState.hasError) {
54
- isRecordErrorSessionReplay = false;
55
- unlockSegment();
56
- }
57
- });
89
+ try {
90
+ var replayRequest = httpRequest || lifeCycle.$rReplayRequest;
91
+ if (!replayRequest) {
92
+ replayRequest = createHttpRequestImpl(configuration.sessionReplayEndPoint, _segmentCollection.SEGMENT_BYTES_LIMIT, configuration.retryMaxSize, reportError);
93
+ // Recorder restarts share one bounded retry queue/timer/request state.
94
+ // Old segment finishes can then drain in order without multiplying a
95
+ // 20 MiB queue for every stop/start cycle.
96
+ lifeCycle.$rReplayRequest = replayRequest;
58
97
  }
59
- var lastFullSnapshotEvent = null;
60
- var wrappedEmit = function wrappedEmit(recordData) {
61
- addRecord(recordData);
98
+ var addRecord, addBaselineRecords, _record;
99
+ var stopSegmentCollection;
100
+ var beginMandatoryFullSnapshotRecovery = function beginMandatoryFullSnapshotRecovery() {};
101
+ var discardMandatoryFullSnapshotRecovery = function discardMandatoryFullSnapshotRecovery() {};
102
+ var wasLastEmitBackpressured = function wasLastEmitBackpressured() {};
103
+ if (!(0, _browserCore.canUseEventBridge)()) {
104
+ var session = sessionManager.findTrackedSession();
105
+ var isRecordErrorSessionReplay = session && session.errorSessionReplayAllowed && !session.sessionHasError;
106
+ var segmentCollection = (0, _segmentCollection.startSegmentCollection)(lifeCycle, configuration, sessionManager, viewContexts, replayRequest, encoder, isRecordErrorSessionReplay, {
107
+ beforePageExitFlush: function beforePageExitFlush(pageExitEvent) {
108
+ flushRecorderBeforePageExit(pageExitEvent);
109
+ },
110
+ onReplayResetNeeded: function onReplayResetNeeded(reason) {
111
+ if (false) {
112
+ replayResetCountForDebug += 1;
113
+ replayResetLastReasonForDebug = reason;
114
+ }
115
+ requestReplayReset(reason);
116
+ },
117
+ onReplayResetExhausted: function onReplayResetExhausted(reason) {
118
+ stopRecording(reason || 'full_snapshot_failure_limit');
119
+ },
120
+ onSegmentFlushed: false ? function (segmentFlush) {
121
+ replaySegmentFlushCount += 1;
122
+ lastReplaySegmentFlushForDebug = cloneReplaySegmentFlushForDebug(segmentFlush, replaySegmentFlushCount);
123
+ replaySegmentFlushHistoryForDebug.push(lastReplaySegmentFlushForDebug);
124
+ if (replaySegmentFlushHistoryForDebug.length > REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT) {
125
+ replaySegmentFlushHistoryForDebug.shift();
126
+ }
127
+ } : undefined
128
+ });
129
+ addRecord = segmentCollection.addRecord;
130
+ addBaselineRecords = segmentCollection.$rAddBaselineRecords;
131
+ wasLastEmitBackpressured = segmentCollection.$rWasLastAddRecordBackpressured || wasLastEmitBackpressured;
132
+ beginMandatoryFullSnapshotRecovery = segmentCollection.$rBeginMandatoryRecovery || beginMandatoryFullSnapshotRecovery;
133
+ discardMandatoryFullSnapshotRecovery = segmentCollection.$rDiscardMandatoryRecovery || discardMandatoryFullSnapshotRecovery;
134
+ var flushBufferSegment = segmentCollection.flushBufferSegment;
135
+ var unlockSegment = segmentCollection.unlockSegment;
136
+ if (false) {
137
+ areReplaySegmentsLockedForDebug = segmentCollection.isLocked;
138
+ }
139
+ stopSegmentCollection = segmentCollection.stop;
140
+ // Register a provisional cleanup before record() starts. Unexpected
141
+ // recorder initialization failures must not leave segment lifecycle
142
+ // subscriptions and timers alive.
143
+ cleanupTasks.push(stopSegmentCollection);
62
144
  if (isRecordErrorSessionReplay) {
63
- if (recordData.type === _types.RecordType.FullSnapshot) {
64
- lastFullSnapshotEvent = recordData;
65
- } else if (recordData.type === _types.RecordType.IncrementalSnapshot) {
66
- var exceedTime = recordData.timestamp - lastFullSnapshotEvent.timestamp > BUFFER_CHECKOUT_TIME;
67
- // If the time between the last full snapshot and the incremental snapshot is greater than the buffer time, we need to take a new full snapshot
68
- if (exceedTime) {
69
- flushBufferSegment(function () {
70
- (0, _replayStats.deleteOldestStats)();
71
- takeSubsequentFullSnapshot();
72
- });
145
+ var sessionStateUpdateSubscription = sessionManager.sessionStateUpdateObservable.subscribe(function (_ref) {
146
+ var previousState = _ref.previousState,
147
+ newState = _ref.newState;
148
+ if (!previousState.hasError && newState.hasError) {
149
+ isRecordErrorSessionReplay = false;
150
+ unlockSegment();
151
+ }
152
+ });
153
+ cleanupTasks.push(sessionStateUpdateSubscription.unsubscribe);
154
+ }
155
+ var lastFullSnapshotEvent = null;
156
+ var wrappedEmit = function wrappedEmit(recordData) {
157
+ var accepted = addRecord(recordData);
158
+ if (accepted !== false && isRecordErrorSessionReplay) {
159
+ if (recordData.type === _types.RecordType.FullSnapshot) {
160
+ lastFullSnapshotEvent = recordData;
161
+ } else if (recordData.type === _types.RecordType.IncrementalSnapshot) {
162
+ var exceedTime = recordData.timestamp - lastFullSnapshotEvent.timestamp > BUFFER_CHECKOUT_TIME;
163
+ // If the time between the last full snapshot and the incremental snapshot is greater than the buffer time, we need to take a new full snapshot
164
+ if (exceedTime) {
165
+ flushBufferSegment(function () {
166
+ (0, _replayStats.deleteOldestStats)();
167
+ _takeSubsequentFullSnapshot();
168
+ });
169
+ }
73
170
  }
74
171
  }
172
+ return accepted;
173
+ };
174
+ var wrappedEmitBaseline = function wrappedEmitBaseline(records) {
175
+ var accepted = addBaselineRecords(records);
176
+ if (accepted !== false && isRecordErrorSessionReplay) {
177
+ lastFullSnapshotEvent = records[records.length - 1];
178
+ }
179
+ return accepted;
180
+ };
181
+ _record = recordImpl({
182
+ emit: wrappedEmit,
183
+ $rEmitBaseline: wrappedEmitBaseline,
184
+ configuration: configuration,
185
+ lifeCycle: lifeCycle,
186
+ sessionManager: sessionManager,
187
+ $rWasLastEmitBackpressured: wasLastEmitBackpressured,
188
+ $rOnMandatoryFullSnapshotStarted: beginMandatoryFullSnapshotRecovery,
189
+ $rOnMandatoryFullSnapshotAbandoned: discardMandatoryFullSnapshotRecovery,
190
+ onFullSnapshotFailure: stopRecording
191
+ });
192
+ } else {
193
+ ;
194
+ var _startRecordBridge = (0, _startRecordBridge2.startRecordBridge)(viewContexts);
195
+ addRecord = _startRecordBridge.addRecord;
196
+ _record = recordImpl({
197
+ emit: addRecord,
198
+ configuration: configuration,
199
+ lifeCycle: lifeCycle,
200
+ sessionManager: sessionManager,
201
+ $rWasLastEmitBackpressured: wasLastEmitBackpressured,
202
+ $rOnMandatoryFullSnapshotStarted: beginMandatoryFullSnapshotRecovery,
203
+ $rOnMandatoryFullSnapshotAbandoned: discardMandatoryFullSnapshotRecovery,
204
+ onFullSnapshotFailure: stopRecording
205
+ });
206
+ }
207
+ if (!_record || typeof _record.stop !== 'function') {
208
+ throw new Error('Session Replay recorder failed to initialize.');
209
+ }
210
+ var stopRecorder = _record.stop;
211
+ if (stopSegmentCollection) {
212
+ // Remove the provisional entry and restore the intended successful-stop
213
+ // ordering below (cleanup tasks run in reverse).
214
+ var provisionalCleanupIndex = cleanupTasks.indexOf(stopSegmentCollection);
215
+ if (provisionalCleanupIndex !== -1) {
216
+ cleanupTasks.splice(provisionalCleanupIndex, 1);
75
217
  }
218
+ }
219
+ cleanupTasks.push(stopSegmentCollection ? function (flushReason) {
220
+ // segmentCollection already invoked beforePageExitFlush while its
221
+ // encoder was writable. Teardown must now discard any unfinished
222
+ // atomic tail instead of doing work that can no longer be sent.
223
+ stopRecorder(flushReason, true);
224
+ } : stopRecorder);
225
+ if (stopSegmentCollection) {
226
+ // Stop the segment collection first (cleanup tasks run in reverse).
227
+ // Its beforePageExitFlush hook can then drain the still-live recorder,
228
+ // including a second unload pass after synchronous encoder backpressure
229
+ // is released, before the observers are torn down.
230
+ cleanupTasks.push(stopSegmentCollection);
231
+ }
232
+ var _takeSubsequentFullSnapshot = _record.takeSubsequentFullSnapshot;
233
+ var flushScheduledFullSnapshot = _record.flushScheduledFullSnapshot || function () {};
234
+ var flushCanvasCommands = _record.$rFlushCanvasCommands || function () {};
235
+ flushRecorderBeforePageExit = function flushRecorderBeforePageExit(pageExitEvent) {
236
+ if (pageExitEvent && pageExitEvent.reason !== _browserCore.PageExitReason.UNLOADING) {
237
+ // Hidden, frozen, and pagehide states can resume in the same view.
238
+ // Keep an in-progress DOM recovery baseline scheduled so later
239
+ // mutations are never attached to the stale pre-overflow snapshot.
240
+ _record.flushMutations();
241
+ flushCanvasCommands();
242
+ return;
243
+ }
244
+ if (!flushScheduledFullSnapshot()) {
245
+ // The segment is still writable in this hook. Give a paged raw/shadow
246
+ // transaction its final bounded drain before segmentCollection closes;
247
+ // record.stop() runs afterwards and can only discard an unfinished
248
+ // atomic tail.
249
+ _record.flushMutations(true);
250
+ }
251
+ // Keep the command recorder alive until this hook runs: the segment is
252
+ // still writable here, including the second unload pass after synchronous
253
+ // encoder backpressure is released.
254
+ flushCanvasCommands();
76
255
  };
77
- _record = (0, _record2.record)({
78
- emit: wrappedEmit,
79
- configuration: configuration,
80
- lifeCycle: lifeCycle,
81
- sessionManager: sessionManager
256
+ requestReplayReset = createReplayResetScheduler(_takeSubsequentFullSnapshot, cleanupTasks);
257
+ if (replayResetRequestedBeforeRecorder) {
258
+ requestReplayReset();
259
+ }
260
+ var scheduleSubsequentFullSnapshot = _record.scheduleSubsequentFullSnapshot || _takeSubsequentFullSnapshot;
261
+ var prepareForViewChange = _record.prepareForViewChange || _record.flushMutations;
262
+ var snapshotCanvas = _record.snapshotCanvas;
263
+ var getSerializedNodeIdForDebug = _record.getSerializedNodeIdForDebug;
264
+ var recordingDebug;
265
+ if (false) {
266
+ recordingDebug = {
267
+ getLastAutoCanvasSnapshotResultForDebug: _record.getLastAutoCanvasSnapshotResultForDebug,
268
+ getAutoCanvasSnapshotDebugHistoryForDebug: _record.getAutoCanvasSnapshotDebugHistoryForDebug,
269
+ getLastCanvasMutationForDebug: _record.getLastCanvasMutationForDebug,
270
+ getCanvasMutationHistoryForDebug: _record.getCanvasMutationHistoryForDebug,
271
+ getLastDomMutationForDebug: _record.getLastDomMutationForDebug,
272
+ getDomMutationHistoryForDebug: _record.getDomMutationHistoryForDebug,
273
+ getReplayPerformanceForDebug: function getReplayPerformanceForDebug() {
274
+ return cloneReplayPerformanceForDebug(_record.getReplayPerformanceForDebug ? _record.getReplayPerformanceForDebug() : undefined, replaySegmentFlushCount, replayResetCountForDebug, replayResetLastReasonForDebug, areReplaySegmentsLockedForDebug());
275
+ },
276
+ getLastReplaySegmentFlushForDebug: function getLastReplaySegmentFlushForDebug() {
277
+ return cloneReplaySegmentFlushForDebug(lastReplaySegmentFlushForDebug);
278
+ },
279
+ getReplaySegmentFlushHistoryForDebug: function getReplaySegmentFlushHistoryForDebug() {
280
+ return replaySegmentFlushHistoryForDebug.map(function (segmentFlush) {
281
+ return cloneReplaySegmentFlushForDebug(segmentFlush);
282
+ });
283
+ }
284
+ };
285
+ }
286
+ var flushMutations = _record.flushMutations;
287
+ var subscribeViewEnded = lifeCycle.subscribe(_browserCore.LifeCycleEventType.VIEW_ENDED, function () {
288
+ if (!flushScheduledFullSnapshot(true, true)) {
289
+ // Preserve DOM changes still queued by the native MutationObservers.
290
+ // The next view snapshot has not been scheduled yet, so resetting the
291
+ // observers here would otherwise lose the old view's final state.
292
+ flushMutations();
293
+ }
294
+ // Canvas command batches are frame-scheduled. Publish the old view's
295
+ // final batch before ViewEnd and before VIEW_CREATED resets the canvas
296
+ // baseline for the next replay tree.
297
+ flushCanvasCommands();
298
+ prepareForViewChange();
299
+ addRecord({
300
+ timestamp: (0, _browserCore.timeStampNow)(),
301
+ type: _types.RecordType.ViewEnd
302
+ });
82
303
  });
83
- } else {
84
- ;
85
- var _startRecordBridge = (0, _startRecordBridge2.startRecordBridge)(viewContexts);
86
- addRecord = _startRecordBridge.addRecord;
87
- _record = (0, _record2.record)({
88
- emit: addRecord,
89
- configuration: configuration,
90
- lifeCycle: lifeCycle,
91
- sessionManager: sessionManager
304
+ cleanupTasks.push(subscribeViewEnded.unsubscribe);
305
+ var scribeViewCreated = lifeCycle.subscribe(_browserCore.LifeCycleEventType.VIEW_CREATED, function (view) {
306
+ scheduleSubsequentFullSnapshot(view.startClocks.timeStamp);
92
307
  });
308
+ cleanupTasks.push(scribeViewCreated.unsubscribe);
309
+ isRecordingReady = true;
310
+ if (pendingStopRequested) {
311
+ stopRecording(pendingStopReason);
312
+ }
313
+ } catch (error) {
314
+ isRecordingReady = true;
315
+ stopRecording('start_failure');
316
+ throw error;
93
317
  }
94
- cleanupTasks.push(_record.stop);
95
- var takeSubsequentFullSnapshot = _record.takeSubsequentFullSnapshot;
96
- var snapshotCanvas = _record.snapshotCanvas;
97
- var getSerializedNodeIdForDebug = _record.getSerializedNodeIdForDebug;
98
- var getLastAutoCanvasSnapshotResultForDebug = _record.getLastAutoCanvasSnapshotResultForDebug;
99
- var getAutoCanvasSnapshotDebugHistoryForDebug = _record.getAutoCanvasSnapshotDebugHistoryForDebug;
100
- var getLastCanvasMutationForDebug = _record.getLastCanvasMutationForDebug;
101
- var getCanvasMutationHistoryForDebug = _record.getCanvasMutationHistoryForDebug;
102
- var getLastDomMutationForDebug = _record.getLastDomMutationForDebug;
103
- var getDomMutationHistoryForDebug = _record.getDomMutationHistoryForDebug;
104
- var getReplayPerformanceForDebug = function getReplayPerformanceForDebug() {
105
- return cloneReplayPerformanceForDebug(_record.getReplayPerformanceForDebug ? _record.getReplayPerformanceForDebug() : undefined, replaySegmentFlushCount);
106
- };
107
- var getLastReplaySegmentFlushForDebug = function getLastReplaySegmentFlushForDebug() {
108
- return cloneReplaySegmentFlushForDebug(lastReplaySegmentFlushForDebug);
109
- };
110
- var getReplaySegmentFlushHistoryForDebug = function getReplaySegmentFlushHistoryForDebug() {
111
- return replaySegmentFlushHistoryForDebug.map(function (segmentFlush) {
112
- return cloneReplaySegmentFlushForDebug(segmentFlush);
113
- });
114
- };
115
- var flushMutations = _record.flushMutations;
116
- var subscribeViewEnded = lifeCycle.subscribe(_browserCore.LifeCycleEventType.VIEW_ENDED, function () {
117
- flushMutations();
118
- addRecord({
119
- timestamp: (0, _browserCore.timeStampNow)(),
120
- type: _types.RecordType.ViewEnd
121
- });
122
- });
123
- cleanupTasks.push(subscribeViewEnded.unsubscribe);
124
- var scribeViewCreated = lifeCycle.subscribe(_browserCore.LifeCycleEventType.VIEW_CREATED, function (view) {
125
- takeSubsequentFullSnapshot(view.startClocks.timeStamp);
126
- });
127
- cleanupTasks.push(scribeViewCreated.unsubscribe);
128
- return {
129
- stop: function stop() {
130
- cleanupTasks.forEach(function (task) {
131
- task();
132
- });
318
+ var recording = {
319
+ stop: stopRecording,
320
+ isStopped: function isStopped() {
321
+ return isRecordingStopped;
322
+ },
323
+ // The public/manual snapshot is opportunistic. Internal view, buffer and
324
+ // recovery snapshots keep using the raw non-discardable function above.
325
+ takeSubsequentFullSnapshot: function takeSubsequentFullSnapshot() {
326
+ return _takeSubsequentFullSnapshot(undefined, true);
133
327
  },
134
- takeSubsequentFullSnapshot: takeSubsequentFullSnapshot,
135
328
  snapshotCanvas: snapshotCanvas,
136
329
  getSerializedNodeIdForDebug: getSerializedNodeIdForDebug,
137
- getLastAutoCanvasSnapshotResultForDebug: getLastAutoCanvasSnapshotResultForDebug,
138
- getAutoCanvasSnapshotDebugHistoryForDebug: getAutoCanvasSnapshotDebugHistoryForDebug,
139
- getLastCanvasMutationForDebug: getLastCanvasMutationForDebug,
140
- getCanvasMutationHistoryForDebug: getCanvasMutationHistoryForDebug,
141
- getLastDomMutationForDebug: getLastDomMutationForDebug,
142
- getDomMutationHistoryForDebug: getDomMutationHistoryForDebug,
143
- getLastReplaySegmentFlushForDebug: getLastReplaySegmentFlushForDebug,
144
- getReplaySegmentFlushHistoryForDebug: getReplaySegmentFlushHistoryForDebug,
145
- getReplayPerformanceForDebug: getReplayPerformanceForDebug,
146
330
  flushReplayMutationsForDebug: flushMutations
147
331
  };
332
+ if (false) {
333
+ (0, _browserCore.assign)(recording, recordingDebug);
334
+ }
335
+ return recording;
336
+ }
337
+ function createReplayResetScheduler(takeSubsequentFullSnapshot, cleanupTasks) {
338
+ var stopped = false;
339
+ var pending = false;
340
+ var lastResetAt = -Infinity;
341
+ var resetTimeoutId;
342
+ var RESET_MIN_INTERVAL = _browserCore.ONE_SECOND;
343
+ function runReset() {
344
+ resetTimeoutId = undefined;
345
+ if (stopped || !pending) {
346
+ return;
347
+ }
348
+ pending = false;
349
+ lastResetAt = Date.now();
350
+ takeSubsequentFullSnapshot();
351
+ }
352
+ cleanupTasks.push(function () {
353
+ stopped = true;
354
+ if (resetTimeoutId !== undefined) {
355
+ clearTimeout(resetTimeoutId);
356
+ resetTimeoutId = undefined;
357
+ }
358
+ });
359
+ return function () {
360
+ if (stopped) {
361
+ return;
362
+ }
363
+ pending = true;
364
+ if (resetTimeoutId !== undefined) {
365
+ return;
366
+ }
367
+ var delay = Math.max(lastResetAt + RESET_MIN_INTERVAL - Date.now(), 0);
368
+ resetTimeoutId = setTimeout(runReset, delay);
369
+ };
148
370
  }
149
371
  function cloneReplaySegmentFlushForDebug(segmentFlush, sequence) {
150
372
  if (!segmentFlush) {
@@ -162,12 +384,15 @@ function cloneReplaySegmentFlushForDebug(segmentFlush, sequence) {
162
384
  rawBytesCount: segmentFlush.rawBytesCount
163
385
  };
164
386
  }
165
- function cloneReplayPerformanceForDebug(stats, replaySegmentFlushCount) {
387
+ function cloneReplayPerformanceForDebug(stats, replaySegmentFlushCount, replayResetCount, replayResetLastReason, replaySegmentsLocked) {
166
388
  if (!stats && typeof replaySegmentFlushCount === 'undefined') {
167
389
  return undefined;
168
390
  }
169
391
  return (0, _browserCore.assign)({}, stats || {}, {
170
- replaySegmentFlushCount: replaySegmentFlushCount || 0
392
+ replaySegmentFlushCount: replaySegmentFlushCount || 0,
393
+ replayResetCount: replayResetCount || 0,
394
+ replayResetLastReason: replayResetLastReason,
395
+ replaySegmentsLocked: Boolean(replaySegmentsLocked)
171
396
  });
172
397
  }
173
398
  //# sourceMappingURL=startRecording.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"startRecording.js","names":["_browserCore","require","_record2","_startRecordBridge2","_segmentCollection","_types","_replayStats","BUFFER_CHECKOUT_TIME","exports","ONE_SECOND","REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT","startRecording","lifeCycle","configuration","sessionManager","viewContexts","encoder","httpRequest","cleanupTasks","lastReplaySegmentFlushForDebug","replaySegmentFlushHistoryForDebug","replaySegmentFlushCount","reportError","error","notify","LifeCycleEventType","RAW_ERROR_COLLECTED","addTelemetryDebug","message","replayRequest","createHttpRequest","sessionReplayEndPoint","SEGMENT_BYTES_LIMIT","retryMaxSize","addRecord","_record","canUseEventBridge","session","findTrackedSession","isRecordErrorSessionReplay","errorSessionReplayAllowed","sessionHasError","segmentCollection","startSegmentCollection","onSegmentFlushed","segmentFlush","cloneReplaySegmentFlushForDebug","push","length","shift","flushBufferSegment","unlockSegment","stop","sessionStateUpdateObservable","subscribe","_ref","previousState","newState","hasError","lastFullSnapshotEvent","wrappedEmit","recordData","type","RecordType","FullSnapshot","IncrementalSnapshot","exceedTime","timestamp","deleteOldestStats","takeSubsequentFullSnapshot","record","emit","_startRecordBridge","startRecordBridge","snapshotCanvas","getSerializedNodeIdForDebug","getLastAutoCanvasSnapshotResultForDebug","getAutoCanvasSnapshotDebugHistoryForDebug","getLastCanvasMutationForDebug","getCanvasMutationHistoryForDebug","getLastDomMutationForDebug","getDomMutationHistoryForDebug","getReplayPerformanceForDebug","cloneReplayPerformanceForDebug","undefined","getLastReplaySegmentFlushForDebug","getReplaySegmentFlushHistoryForDebug","map","flushMutations","subscribeViewEnded","VIEW_ENDED","timeStampNow","ViewEnd","unsubscribe","scribeViewCreated","VIEW_CREATED","view","startClocks","timeStamp","forEach","task","flushReplayMutationsForDebug","sequence","creationReason","flushReason","recordsCount","recordCountsByType","assign","start","end","indexInView","rawBytesCount","stats"],"sources":["../../src/boot/startRecording.js"],"sourcesContent":["import {\n timeStampNow,\n createHttpRequest,\n LifeCycleEventType,\n addTelemetryDebug,\n ONE_SECOND,\n canUseEventBridge,\n assign\n} from '@cloudcare/browser-core'\nimport { record } from '../domain/replay/record'\nimport { startRecordBridge } from '../domain/replay/startRecordBridge'\nimport {\n startSegmentCollection,\n SEGMENT_BYTES_LIMIT\n} from '../domain/replay/segmentCollection'\nimport { RecordType } from '../types'\nimport { deleteOldestStats } from '../domain/replay/replayStats'\n/* How long to wait for error checkouts */\nexport const BUFFER_CHECKOUT_TIME = 60 * ONE_SECOND\nvar REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT = 10\nexport function startRecording(\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n encoder,\n httpRequest\n) {\n var cleanupTasks = []\n var lastReplaySegmentFlushForDebug\n var replaySegmentFlushHistoryForDebug = []\n var replaySegmentFlushCount = 0\n var reportError = function (error) {\n lifeCycle.notify(LifeCycleEventType.RAW_ERROR_COLLECTED, { error: error })\n addTelemetryDebug('Error reported to customer', {\n 'error.message': error.message\n })\n }\n\n var replayRequest =\n httpRequest ||\n createHttpRequest(\n configuration.sessionReplayEndPoint,\n SEGMENT_BYTES_LIMIT,\n configuration.retryMaxSize,\n reportError\n )\n\n let addRecord, _record\n if (!canUseEventBridge()) {\n const session = sessionManager.findTrackedSession()\n let isRecordErrorSessionReplay =\n session && session.errorSessionReplayAllowed && !session.sessionHasError\n var segmentCollection = startSegmentCollection(\n lifeCycle,\n configuration,\n sessionManager,\n viewContexts,\n replayRequest,\n encoder,\n isRecordErrorSessionReplay,\n {\n onSegmentFlushed: function (segmentFlush) {\n replaySegmentFlushCount += 1\n lastReplaySegmentFlushForDebug =\n cloneReplaySegmentFlushForDebug(\n segmentFlush,\n replaySegmentFlushCount\n )\n replaySegmentFlushHistoryForDebug.push(lastReplaySegmentFlushForDebug)\n if (\n replaySegmentFlushHistoryForDebug.length >\n REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT\n ) {\n replaySegmentFlushHistoryForDebug.shift()\n }\n }\n }\n )\n addRecord = segmentCollection.addRecord\n let flushBufferSegment = segmentCollection.flushBufferSegment\n let unlockSegment = segmentCollection.unlockSegment\n cleanupTasks.push(segmentCollection.stop)\n if (isRecordErrorSessionReplay) {\n sessionManager.sessionStateUpdateObservable.subscribe(\n ({ previousState, newState }) => {\n if (!previousState.hasError && newState.hasError) {\n isRecordErrorSessionReplay = false\n unlockSegment()\n }\n }\n )\n }\n let lastFullSnapshotEvent = null\n const wrappedEmit = (recordData) => {\n addRecord(recordData)\n if (isRecordErrorSessionReplay) {\n if (recordData.type === RecordType.FullSnapshot) {\n lastFullSnapshotEvent = recordData\n } else if (recordData.type === RecordType.IncrementalSnapshot) {\n const exceedTime =\n recordData.timestamp - lastFullSnapshotEvent.timestamp >\n BUFFER_CHECKOUT_TIME\n // If the time between the last full snapshot and the incremental snapshot is greater than the buffer time, we need to take a new full snapshot\n if (exceedTime) {\n flushBufferSegment(() => {\n deleteOldestStats()\n takeSubsequentFullSnapshot()\n })\n }\n }\n }\n }\n _record = record({\n emit: wrappedEmit,\n configuration: configuration,\n lifeCycle: lifeCycle,\n sessionManager: sessionManager\n })\n } else {\n ;({ addRecord } = startRecordBridge(viewContexts))\n _record = record({\n emit: addRecord,\n configuration: configuration,\n lifeCycle: lifeCycle,\n sessionManager: sessionManager\n })\n }\n cleanupTasks.push(_record.stop)\n var takeSubsequentFullSnapshot = _record.takeSubsequentFullSnapshot\n var snapshotCanvas = _record.snapshotCanvas\n var getSerializedNodeIdForDebug = _record.getSerializedNodeIdForDebug\n var getLastAutoCanvasSnapshotResultForDebug =\n _record.getLastAutoCanvasSnapshotResultForDebug\n var getAutoCanvasSnapshotDebugHistoryForDebug =\n _record.getAutoCanvasSnapshotDebugHistoryForDebug\n var getLastCanvasMutationForDebug = _record.getLastCanvasMutationForDebug\n var getCanvasMutationHistoryForDebug =\n _record.getCanvasMutationHistoryForDebug\n var getLastDomMutationForDebug = _record.getLastDomMutationForDebug\n var getDomMutationHistoryForDebug = _record.getDomMutationHistoryForDebug\n var getReplayPerformanceForDebug = function () {\n return cloneReplayPerformanceForDebug(\n _record.getReplayPerformanceForDebug\n ? _record.getReplayPerformanceForDebug()\n : undefined,\n replaySegmentFlushCount\n )\n }\n var getLastReplaySegmentFlushForDebug = function () {\n return cloneReplaySegmentFlushForDebug(lastReplaySegmentFlushForDebug)\n }\n var getReplaySegmentFlushHistoryForDebug = function () {\n return replaySegmentFlushHistoryForDebug.map(function (segmentFlush) {\n return cloneReplaySegmentFlushForDebug(segmentFlush)\n })\n }\n var flushMutations = _record.flushMutations\n var subscribeViewEnded = lifeCycle.subscribe(\n LifeCycleEventType.VIEW_ENDED,\n function () {\n flushMutations()\n addRecord({\n timestamp: timeStampNow(),\n type: RecordType.ViewEnd\n })\n }\n )\n cleanupTasks.push(subscribeViewEnded.unsubscribe)\n var scribeViewCreated = lifeCycle.subscribe(\n LifeCycleEventType.VIEW_CREATED,\n function (view) {\n takeSubsequentFullSnapshot(view.startClocks.timeStamp)\n }\n )\n cleanupTasks.push(scribeViewCreated.unsubscribe)\n\n return {\n stop: function () {\n cleanupTasks.forEach(function (task) {\n task()\n })\n },\n takeSubsequentFullSnapshot: takeSubsequentFullSnapshot,\n snapshotCanvas: snapshotCanvas,\n getSerializedNodeIdForDebug: getSerializedNodeIdForDebug,\n getLastAutoCanvasSnapshotResultForDebug:\n getLastAutoCanvasSnapshotResultForDebug,\n getAutoCanvasSnapshotDebugHistoryForDebug:\n getAutoCanvasSnapshotDebugHistoryForDebug,\n getLastCanvasMutationForDebug: getLastCanvasMutationForDebug,\n getCanvasMutationHistoryForDebug: getCanvasMutationHistoryForDebug,\n getLastDomMutationForDebug: getLastDomMutationForDebug,\n getDomMutationHistoryForDebug: getDomMutationHistoryForDebug,\n getLastReplaySegmentFlushForDebug: getLastReplaySegmentFlushForDebug,\n getReplaySegmentFlushHistoryForDebug:\n getReplaySegmentFlushHistoryForDebug,\n getReplayPerformanceForDebug: getReplayPerformanceForDebug,\n flushReplayMutationsForDebug: flushMutations\n }\n}\n\nfunction cloneReplaySegmentFlushForDebug(segmentFlush, sequence) {\n if (!segmentFlush) {\n return segmentFlush\n }\n\n return {\n sequence: typeof sequence === 'number' ? sequence : segmentFlush.sequence,\n creationReason: segmentFlush.creationReason,\n flushReason: segmentFlush.flushReason,\n recordsCount: segmentFlush.recordsCount,\n recordCountsByType: assign({}, segmentFlush.recordCountsByType),\n start: segmentFlush.start,\n end: segmentFlush.end,\n indexInView: segmentFlush.indexInView,\n rawBytesCount: segmentFlush.rawBytesCount\n }\n}\n\nfunction cloneReplayPerformanceForDebug(stats, replaySegmentFlushCount) {\n if (!stats && typeof replaySegmentFlushCount === 'undefined') {\n return undefined\n }\n\n return assign({}, stats || {}, {\n replaySegmentFlushCount: replaySegmentFlushCount || 0\n })\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,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B,KAAK,WAAW,EAAE;IAC5D,OAAO+D,SAAS;EAClB;EAEA,OAAO,IAAAuB,mBAAM,EAAC,CAAC,CAAC,EAAEK,KAAK,IAAI,CAAC,CAAC,EAAE;IAC7B3F,uBAAuB,EAAEA,uBAAuB,IAAI;EACtD,CAAC,CAAC;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"startRecording.js","names":["_browserCore","require","_record2","_startRecordBridge2","_segmentCollection","_types","_replayStats","BUFFER_CHECKOUT_TIME","exports","ONE_SECOND","REPLAY_SEGMENT_FLUSH_HISTORY_LIMIT","startRecording","lifeCycle","configuration","sessionManager","viewContexts","encoder","httpRequest","onStopped","createHttpRequestOverride","recordOverride","createHttpRequestImpl","__BUILD_ENV__REPLAY_DEBUG_ENABLED__","createHttpRequest","recordImpl","record","cleanupTasks","isRecordingStopped","isRecordingReady","pendingStopRequested","pendingStopReason","stoppedNotificationSent","flushRecorderBeforePageExit","replayResetRequestedBeforeRecorder","requestReplayReset","notifyStopped","flushReason","error","addTelemetryDebug","reason","String","stopRecording","firstCleanupError","slice","reverse","forEach","task","lastReplaySegmentFlushForDebug","replaySegmentFlushHistoryForDebug","undefined","replaySegmentFlushCount","replayResetCountForDebug","replayResetLastReasonForDebug","areReplaySegmentsLockedForDebug","reportError","notify","LifeCycleEventType","RAW_ERROR_COLLECTED","message","replayRequest","$rReplayRequest","sessionReplayEndPoint","SEGMENT_BYTES_LIMIT","retryMaxSize","addRecord","addBaselineRecords","_record","stopSegmentCollection","beginMandatoryFullSnapshotRecovery","discardMandatoryFullSnapshotRecovery","wasLastEmitBackpressured","canUseEventBridge","session","findTrackedSession","isRecordErrorSessionReplay","errorSessionReplayAllowed","sessionHasError","segmentCollection","startSegmentCollection","beforePageExitFlush","pageExitEvent","onReplayResetNeeded","onReplayResetExhausted","onSegmentFlushed","segmentFlush","cloneReplaySegmentFlushForDebug","push","length","shift","$rAddBaselineRecords","$rWasLastAddRecordBackpressured","$rBeginMandatoryRecovery","$rDiscardMandatoryRecovery","flushBufferSegment","unlockSegment","isLocked","stop","sessionStateUpdateSubscription","sessionStateUpdateObservable","subscribe","_ref","previousState","newState","hasError","unsubscribe","lastFullSnapshotEvent","wrappedEmit","recordData","accepted","type","RecordType","FullSnapshot","IncrementalSnapshot","exceedTime","timestamp","deleteOldestStats","takeSubsequentFullSnapshot","wrappedEmitBaseline","records","emit","$rEmitBaseline","$rWasLastEmitBackpressured","$rOnMandatoryFullSnapshotStarted","$rOnMandatoryFullSnapshotAbandoned","onFullSnapshotFailure","_startRecordBridge","startRecordBridge","Error","stopRecorder","provisionalCleanupIndex","indexOf","splice","flushScheduledFullSnapshot","flushCanvasCommands","$rFlushCanvasCommands","PageExitReason","UNLOADING","flushMutations","createReplayResetScheduler","scheduleSubsequentFullSnapshot","prepareForViewChange","snapshotCanvas","getSerializedNodeIdForDebug","recordingDebug","getLastAutoCanvasSnapshotResultForDebug","getAutoCanvasSnapshotDebugHistoryForDebug","getLastCanvasMutationForDebug","getCanvasMutationHistoryForDebug","getLastDomMutationForDebug","getDomMutationHistoryForDebug","getReplayPerformanceForDebug","cloneReplayPerformanceForDebug","getLastReplaySegmentFlushForDebug","getReplaySegmentFlushHistoryForDebug","map","subscribeViewEnded","VIEW_ENDED","timeStampNow","ViewEnd","scribeViewCreated","VIEW_CREATED","view","startClocks","timeStamp","recording","isStopped","flushReplayMutationsForDebug","assign","stopped","pending","lastResetAt","Infinity","resetTimeoutId","RESET_MIN_INTERVAL","runReset","Date","now","clearTimeout","delay","Math","max","setTimeout","sequence","creationReason","recordsCount","recordCountsByType","start","end","indexInView","rawBytesCount","stats","replayResetCount","replayResetLastReason","replaySegmentsLocked","Boolean"],"sources":["../../src/boot/startRecording.js"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAUA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,mBAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAIA,IAAAI,MAAA,GAAAJ,OA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,WAAW;IACrCC,aAAa,EAAEzG,YAAY,CAACyG;EAC9B,CAAC;AACH;AAEA,SAAStC,8BAA8BA,CACrCuC,KAAK,EACL5I,uBAAuB,EACvB6I,gBAAgB,EAChBC,qBAAqB,EACrBC,oBAAoB,EACpB;EACA,IAAI,CAACH,KAAK,IAAI,OAAO5I,uBAAuB,KAAK,WAAW,EAAE;IAC5D,OAAOD,SAAS;EAClB;EAEA,OAAO,IAAAsH,mBAAM,EAAC,CAAC,CAAC,EAAEuB,KAAK,IAAI,CAAC,CAAC,EAAE;IAC7B5I,uBAAuB,EAAEA,uBAAuB,IAAI,CAAC;IACrD6I,gBAAgB,EAAEA,gBAAgB,IAAI,CAAC;IACvCC,qBAAqB,EAAEA,qBAAqB;IAC5CC,oBAAoB,EAAEC,OAAO,CAACD,oBAAoB;EACpD,CAAC,CAAC;AACJ","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":["_browserCore","require","NodePrivacyLevel","exports","IGNORE","HIDDEN","ALLOW","DefaultPrivacyLevel","MASK","MASK_USER_INPUT","PRIVACY_ATTR_NAME","PRIVACY_ATTR_VALUE_ALLOW","PRIVACY_ATTR_VALUE_MASK","PRIVACY_ATTR_VALUE_MASK_USER_INPUT","PRIVACY_ATTR_VALUE_HIDDEN","PRIVACY_CLASS_ALLOW","PRIVACY_CLASS_MASK","PRIVACY_CLASS_MASK_USER_INPUT","PRIVACY_CLASS_HIDDEN","CENSORED_STRING_MARK","CENSORED_IMG_MARK","FORM_PRIVATE_TAG_NAMES","INPUT","OUTPUT","TEXTAREA","SELECT","OPTION","DATALIST","OPTGROUP"],"sources":["../src/constants.js"],"sourcesContent":["import { DefaultPrivacyLevel } from '@cloudcare/browser-core'\nexport var NodePrivacyLevel = {\n IGNORE: 'ignore',\n HIDDEN: 'hidden',\n ALLOW: DefaultPrivacyLevel.ALLOW,\n MASK: DefaultPrivacyLevel.MASK,\n MASK_USER_INPUT: DefaultPrivacyLevel.MASK_USER_INPUT\n}\n\nexport var PRIVACY_ATTR_NAME = 'data-gc-privacy'\n\n// Privacy Attrs\nexport var PRIVACY_ATTR_VALUE_ALLOW = 'allow'\nexport var PRIVACY_ATTR_VALUE_MASK = 'mask'\nexport var PRIVACY_ATTR_VALUE_MASK_USER_INPUT = 'mask-user-input'\nexport var PRIVACY_ATTR_VALUE_HIDDEN = 'hidden'\n\n// Privacy Classes - not all customers can set plain HTML attributes, so support classes too\nexport var PRIVACY_CLASS_ALLOW = 'gc-privacy-allow'\nexport var PRIVACY_CLASS_MASK = 'gc-privacy-mask'\nexport var PRIVACY_CLASS_MASK_USER_INPUT = 'gc-privacy-mask-user-input'\nexport var PRIVACY_CLASS_HIDDEN = 'gc-privacy-hidden'\n\n// Private Replacement Templates\nexport var CENSORED_STRING_MARK = '***'\nexport var CENSORED_IMG_MARK =\n 'data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw=='\n\nexport var 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}\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACO,IAAIC,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAG;EAC5BE,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE,QAAQ;EAChBC,KAAK,EAAEC,gCAAmB,CAACD,KAAK;EAChCE,IAAI,EAAED,gCAAmB,CAACC,IAAI;EAC9BC,eAAe,EAAEF,gCAAmB,CAACE;AACvC,CAAC;AAEM,IAAIC,iBAAiB,GAAAP,OAAA,CAAAO,iBAAA,GAAG,iBAAiB;;AAEhD;AACO,IAAIC,wBAAwB,GAAAR,OAAA,CAAAQ,wBAAA,GAAG,OAAO;AACtC,IAAIC,uBAAuB,GAAAT,OAAA,CAAAS,uBAAA,GAAG,MAAM;AACpC,IAAIC,kCAAkC,GAAAV,OAAA,CAAAU,kCAAA,GAAG,iBAAiB;AAC1D,IAAIC,yBAAyB,GAAAX,OAAA,CAAAW,yBAAA,GAAG,QAAQ;;AAE/C;AACO,IAAIC,mBAAmB,GAAAZ,OAAA,CAAAY,mBAAA,GAAG,kBAAkB;AAC5C,IAAIC,kBAAkB,GAAAb,OAAA,CAAAa,kBAAA,GAAG,iBAAiB;AAC1C,IAAIC,6BAA6B,GAAAd,OAAA,CAAAc,6BAAA,GAAG,4BAA4B;AAChE,IAAIC,oBAAoB,GAAAf,OAAA,CAAAe,oBAAA,GAAG,mBAAmB;;AAErD;AACO,IAAIC,oBAAoB,GAAAhB,OAAA,CAAAgB,oBAAA,GAAG,KAAK;AAChC,IAAIC,iBAAiB,GAAAjB,OAAA,CAAAiB,iBAAA,GAC1B,oFAAoF;AAE/E,IAAIC,sBAAsB,GAAAlB,OAAA,CAAAkB,sBAAA,GAAG;EAClCC,KAAK,EAAE,IAAI;EACXC,MAAM,EAAE,IAAI;EACZC,QAAQ,EAAE,IAAI;EACdC,MAAM,EAAE,IAAI;EACZC,MAAM,EAAE,IAAI;EACZC,QAAQ,EAAE,IAAI;EACdC,QAAQ,EAAE;AACZ,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"constants.js","names":["_browserCore","require","NodePrivacyLevel","exports","IGNORE","HIDDEN","ALLOW","DefaultPrivacyLevel","MASK","MASK_USER_INPUT","PRIVACY_ATTR_NAME","PRIVACY_ATTR_VALUE_ALLOW","PRIVACY_ATTR_VALUE_MASK","PRIVACY_ATTR_VALUE_MASK_USER_INPUT","PRIVACY_ATTR_VALUE_HIDDEN","PRIVACY_CLASS_ALLOW","PRIVACY_CLASS_MASK","PRIVACY_CLASS_MASK_USER_INPUT","PRIVACY_CLASS_HIDDEN","CENSORED_STRING_MARK","CENSORED_IMG_MARK","FORM_PRIVATE_TAG_NAMES","INPUT","OUTPUT","TEXTAREA","SELECT","OPTION","DATALIST","OPTGROUP"],"sources":["../src/constants.js"],"mappings":";;;;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AC","ignoreList":[]}
@@ -5,12 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.startRumAssembly = startRumAssembly;
7
7
  var _browserCore = require("@cloudcare/browser-core");
8
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
9
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
10
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
11
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
12
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
13
- function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
14
8
  var SessionType = {
15
9
  SYNTHETICS: 'synthetics',
16
10
  USER: 'user'
@@ -28,7 +22,7 @@ var ROOT_MODIFIABLE_FIELD_PATHS = {
28
22
  };
29
23
  var modifiableFieldPathsByEvent = {};
30
24
  function startRumAssembly(configuration, lifeCycle, sessionManager, userSessionManager, viewContexts, urlContexts, actionContexts, displayContext, getCommonContext, reportError) {
31
- modifiableFieldPathsByEvent[_browserCore.RumEventType.VIEW] = _objectSpread(_objectSpread({}, USER_CUSTOMIZABLE_FIELD_PATHS), VIEW_MODIFIABLE_FIELD_PATHS);
25
+ modifiableFieldPathsByEvent[_browserCore.RumEventType.VIEW] = (0, _browserCore.assign)({}, USER_CUSTOMIZABLE_FIELD_PATHS, VIEW_MODIFIABLE_FIELD_PATHS);
32
26
  modifiableFieldPathsByEvent[_browserCore.RumEventType.ERROR] = (0, _browserCore.assign)({
33
27
  'error.message': 'string',
34
28
  'error.stack': 'string',