@kubesense/kubesense-browser-rum 1.8.0 → 2.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (784) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +23 -0
  3. package/bundle/chunks/kubesenseProfiler-4b8cfd8f889074788478-kubesense-rum.js +1 -0
  4. package/bundle/chunks/kubesenseRecorder-db948e96649585a2b3e9-kubesense-rum.js +1 -0
  5. package/bundle/kubesense-rum.js +1 -1
  6. package/cjs/boot/kubesenseRecorder.d.ts +6 -0
  7. package/cjs/boot/kubesenseRecorder.js +75 -0
  8. package/cjs/boot/kubesenseRecorder.js.map +1 -0
  9. package/cjs/boot/lazyLoadProfiler.d.ts +3 -4
  10. package/cjs/boot/lazyLoadProfiler.js +18 -50
  11. package/cjs/boot/lazyLoadProfiler.js.map +1 -1
  12. package/cjs/boot/lazyLoadRecorder.d.ts +3 -4
  13. package/cjs/boot/lazyLoadRecorder.js +18 -50
  14. package/cjs/boot/lazyLoadRecorder.js.map +1 -1
  15. package/cjs/boot/postStartStrategy.d.ts +4 -4
  16. package/cjs/boot/postStartStrategy.js +89 -110
  17. package/cjs/boot/postStartStrategy.js.map +1 -1
  18. package/cjs/boot/preStartStrategy.js +21 -21
  19. package/cjs/boot/preStartStrategy.js.map +1 -1
  20. package/cjs/boot/profilerApi.js +44 -50
  21. package/cjs/boot/profilerApi.js.map +1 -1
  22. package/cjs/boot/recorderApi.d.ts +1 -3
  23. package/cjs/boot/recorderApi.js +41 -71
  24. package/cjs/boot/recorderApi.js.map +1 -1
  25. package/cjs/domain/deflate/deflateEncoder.d.ts +1 -2
  26. package/cjs/domain/deflate/deflateEncoder.js +94 -108
  27. package/cjs/domain/deflate/deflateEncoder.js.map +1 -1
  28. package/cjs/domain/deflate/deflateWorker.d.ts +3 -4
  29. package/cjs/domain/deflate/deflateWorker.js +79 -90
  30. package/cjs/domain/deflate/deflateWorker.js.map +1 -1
  31. package/cjs/domain/deflate/index.d.ts +1 -1
  32. package/cjs/domain/deflate/index.js +5 -10
  33. package/cjs/domain/getSessionReplayLink.d.ts +3 -2
  34. package/cjs/domain/getSessionReplayLink.js +17 -31
  35. package/cjs/domain/getSessionReplayLink.js.map +1 -1
  36. package/cjs/domain/profiling/actionHistory.d.ts +10 -0
  37. package/cjs/domain/profiling/actionHistory.js +37 -0
  38. package/cjs/domain/profiling/actionHistory.js.map +1 -0
  39. package/cjs/domain/profiling/kubesenseProfiler.d.ts +6 -0
  40. package/cjs/domain/profiling/kubesenseProfiler.js +243 -0
  41. package/cjs/domain/profiling/kubesenseProfiler.js.map +1 -0
  42. package/cjs/domain/profiling/longTaskHistory.d.ts +11 -0
  43. package/cjs/domain/profiling/longTaskHistory.js +22 -0
  44. package/cjs/domain/profiling/longTaskHistory.js.map +1 -0
  45. package/cjs/domain/profiling/profilerDebugIds.d.ts +2 -0
  46. package/cjs/domain/profiling/profilerDebugIds.js +18 -0
  47. package/cjs/domain/profiling/profilerDebugIds.js.map +1 -0
  48. package/cjs/domain/profiling/profilingContext.js +20 -25
  49. package/cjs/domain/profiling/profilingContext.js.map +1 -1
  50. package/cjs/domain/profiling/profilingSupported.js +6 -8
  51. package/cjs/domain/profiling/profilingSupported.js.map +1 -1
  52. package/cjs/domain/profiling/quotaCheck.d.ts +9 -0
  53. package/cjs/domain/profiling/quotaCheck.js +66 -0
  54. package/cjs/domain/profiling/quotaCheck.js.map +1 -0
  55. package/cjs/domain/profiling/test-utils/mockedTrace.d.ts +1 -1
  56. package/cjs/domain/profiling/transport/buildProfileEvent.d.ts +38 -0
  57. package/cjs/domain/profiling/transport/buildProfileEvent.js +91 -0
  58. package/cjs/domain/profiling/transport/buildProfileEvent.js.map +1 -0
  59. package/cjs/domain/profiling/transport/formDataEmitter.d.ts +5 -0
  60. package/cjs/domain/profiling/transport/formDataEmitter.js +17 -0
  61. package/cjs/domain/profiling/transport/formDataEmitter.js.map +1 -0
  62. package/cjs/domain/profiling/transport/profilingBridge.d.ts +2 -0
  63. package/cjs/domain/profiling/transport/profilingBridge.js +12 -0
  64. package/cjs/domain/profiling/transport/profilingBridge.js.map +1 -0
  65. package/cjs/domain/profiling/{types/rumProfiler.types.d.ts → types.d.ts} +13 -24
  66. package/cjs/domain/profiling/utils/getCustomOrDefaultViewName.js +5 -5
  67. package/cjs/domain/profiling/utils/getCustomOrDefaultViewName.js.map +1 -1
  68. package/cjs/domain/profiling/utils/getDefaultViewName.js +6 -10
  69. package/cjs/domain/profiling/utils/getDefaultViewName.js.map +1 -1
  70. package/cjs/domain/profiling/vitalHistory.d.ts +13 -0
  71. package/cjs/domain/profiling/vitalHistory.js +56 -0
  72. package/cjs/domain/profiling/vitalHistory.js.map +1 -0
  73. package/cjs/domain/record/assembly.d.ts +2 -1
  74. package/cjs/domain/record/assembly.js +15 -14
  75. package/cjs/domain/record/assembly.js.map +1 -1
  76. package/cjs/domain/record/canvas/canvasHash.d.ts +2 -0
  77. package/cjs/domain/record/canvas/canvasHash.js +33 -0
  78. package/cjs/domain/record/canvas/canvasHash.js.map +1 -0
  79. package/cjs/domain/record/canvas/canvasManager.d.ts +42 -0
  80. package/cjs/domain/record/canvas/canvasManager.js +99 -0
  81. package/cjs/domain/record/canvas/canvasManager.js.map +1 -0
  82. package/cjs/domain/record/canvas/canvasSnapshot.d.ts +8 -0
  83. package/cjs/domain/record/canvas/canvasSnapshot.js +40 -0
  84. package/cjs/domain/record/canvas/canvasSnapshot.js.map +1 -0
  85. package/cjs/domain/record/canvas/canvasUtils.d.ts +2 -0
  86. package/cjs/domain/record/canvas/canvasUtils.js +14 -0
  87. package/cjs/domain/record/canvas/canvasUtils.js.map +1 -0
  88. package/cjs/domain/record/elementsScrollPositions.js +17 -20
  89. package/cjs/domain/record/elementsScrollPositions.js.map +1 -1
  90. package/cjs/domain/record/encoding/changeDecoder.d.ts +39 -0
  91. package/cjs/domain/record/encoding/changeDecoder.js +152 -0
  92. package/cjs/domain/record/encoding/changeDecoder.js.map +1 -0
  93. package/cjs/domain/record/encoding/changeEncoder.d.ts +39 -0
  94. package/cjs/domain/record/encoding/changeEncoder.js +146 -0
  95. package/cjs/domain/record/encoding/changeEncoder.js.map +1 -0
  96. package/cjs/domain/record/encoding/index.d.ts +10 -0
  97. package/cjs/domain/record/encoding/itemIds.d.ts +32 -0
  98. package/cjs/domain/record/encoding/itemIds.js +49 -0
  99. package/cjs/domain/record/encoding/itemIds.js.map +1 -0
  100. package/cjs/domain/record/encoding/roles.d.ts +52 -0
  101. package/cjs/domain/record/encoding/roles.js +66 -0
  102. package/cjs/domain/record/encoding/roles.js.map +1 -0
  103. package/cjs/domain/record/encoding/stringIds.d.ts +15 -0
  104. package/cjs/domain/record/encoding/stringIds.js +47 -0
  105. package/cjs/domain/record/encoding/stringIds.js.map +1 -0
  106. package/cjs/domain/record/encoding/stringTable.d.ts +15 -0
  107. package/cjs/domain/record/encoding/stringTable.js +38 -0
  108. package/cjs/domain/record/encoding/stringTable.js.map +1 -0
  109. package/cjs/domain/record/eventsUtils.js +9 -10
  110. package/cjs/domain/record/eventsUtils.js.map +1 -1
  111. package/cjs/domain/record/index.d.ts +5 -2
  112. package/cjs/domain/record/index.js +13 -17
  113. package/cjs/domain/record/internalApi.d.ts +6 -6
  114. package/cjs/domain/record/internalApi.js +55 -49
  115. package/cjs/domain/record/internalApi.js.map +1 -1
  116. package/cjs/domain/record/mutationBatch.d.ts +1 -0
  117. package/cjs/domain/record/mutationBatch.js +38 -39
  118. package/cjs/domain/record/mutationBatch.js.map +1 -1
  119. package/cjs/domain/record/record.d.ts +7 -1
  120. package/cjs/domain/record/record.js +76 -87
  121. package/cjs/domain/record/record.js.map +1 -1
  122. package/cjs/domain/record/record.types.d.ts +1 -0
  123. package/cjs/domain/record/recordingScope.d.ts +7 -3
  124. package/cjs/domain/record/recordingScope.js +25 -11
  125. package/cjs/domain/record/recordingScope.js.map +1 -1
  126. package/cjs/domain/record/serialization/index.d.ts +4 -2
  127. package/cjs/domain/record/serialization/index.js +16 -18
  128. package/cjs/domain/record/serialization/insertionCursor.d.ts +57 -0
  129. package/cjs/domain/record/serialization/insertionCursor.js +55 -0
  130. package/cjs/domain/record/serialization/insertionCursor.js.map +1 -0
  131. package/cjs/domain/record/serialization/serialization.types.d.ts +0 -6
  132. package/cjs/domain/record/serialization/serializationStats.js +26 -25
  133. package/cjs/domain/record/serialization/serializationStats.js.map +1 -1
  134. package/cjs/domain/record/serialization/serializationTransaction.d.ts +44 -22
  135. package/cjs/domain/record/serialization/serializationTransaction.js +90 -36
  136. package/cjs/domain/record/serialization/serializationTransaction.js.map +1 -1
  137. package/cjs/domain/record/serialization/serializationUtils.d.ts +0 -1
  138. package/cjs/domain/record/serialization/serializationUtils.js +46 -75
  139. package/cjs/domain/record/serialization/serializationUtils.js.map +1 -1
  140. package/cjs/domain/record/serialization/serializeAttribute.js +24 -39
  141. package/cjs/domain/record/serialization/serializeAttribute.js.map +1 -1
  142. package/cjs/domain/record/serialization/serializeAttributes.d.ts +2 -2
  143. package/cjs/domain/record/serialization/serializeAttributes.js +100 -152
  144. package/cjs/domain/record/serialization/serializeAttributes.js.map +1 -1
  145. package/cjs/domain/record/serialization/serializeFullSnapshot.d.ts +5 -0
  146. package/cjs/domain/record/serialization/serializeFullSnapshot.js +14 -0
  147. package/cjs/domain/record/serialization/serializeFullSnapshot.js.map +1 -0
  148. package/cjs/domain/record/serialization/serializeMutations.d.ts +5 -0
  149. package/cjs/domain/record/serialization/serializeMutations.js +152 -0
  150. package/cjs/domain/record/serialization/serializeMutations.js.map +1 -0
  151. package/cjs/domain/record/serialization/serializeNode.d.ts +3 -6
  152. package/cjs/domain/record/serialization/serializeNode.js +116 -144
  153. package/cjs/domain/record/serialization/serializeNode.js.map +1 -1
  154. package/cjs/domain/record/shadowRootsController.d.ts +2 -2
  155. package/cjs/domain/record/shadowRootsController.js +37 -42
  156. package/cjs/domain/record/shadowRootsController.js.map +1 -1
  157. package/cjs/domain/record/startFullSnapshots.d.ts +1 -1
  158. package/cjs/domain/record/startFullSnapshots.js +38 -54
  159. package/cjs/domain/record/startFullSnapshots.js.map +1 -1
  160. package/cjs/domain/record/trackers/index.d.ts +2 -1
  161. package/cjs/domain/record/trackers/index.js +25 -27
  162. package/cjs/domain/record/trackers/trackCanvasCapture.d.ts +3 -0
  163. package/cjs/domain/record/trackers/trackCanvasCapture.js +102 -0
  164. package/cjs/domain/record/trackers/trackCanvasCapture.js.map +1 -0
  165. package/cjs/domain/record/trackers/trackCanvasContent.d.ts +3 -0
  166. package/cjs/domain/record/trackers/trackCanvasContent.js +31 -0
  167. package/cjs/domain/record/trackers/trackCanvasContent.js.map +1 -0
  168. package/cjs/domain/record/trackers/trackFocus.d.ts +1 -2
  169. package/cjs/domain/record/trackers/trackFocus.js +15 -13
  170. package/cjs/domain/record/trackers/trackFocus.js.map +1 -1
  171. package/cjs/domain/record/trackers/trackInput.d.ts +2 -2
  172. package/cjs/domain/record/trackers/trackInput.js +129 -102
  173. package/cjs/domain/record/trackers/trackInput.js.map +1 -1
  174. package/cjs/domain/record/trackers/trackMediaInteraction.js +22 -26
  175. package/cjs/domain/record/trackers/trackMediaInteraction.js.map +1 -1
  176. package/cjs/domain/record/trackers/trackMouseInteraction.js +47 -54
  177. package/cjs/domain/record/trackers/trackMouseInteraction.js.map +1 -1
  178. package/cjs/domain/record/trackers/trackMove.js +43 -49
  179. package/cjs/domain/record/trackers/trackMove.js.map +1 -1
  180. package/cjs/domain/record/trackers/trackMutation.d.ts +3 -3
  181. package/cjs/domain/record/trackers/trackMutation.js +42 -267
  182. package/cjs/domain/record/trackers/trackMutation.js.map +1 -1
  183. package/cjs/domain/record/trackers/trackScroll.js +36 -44
  184. package/cjs/domain/record/trackers/trackScroll.js.map +1 -1
  185. package/cjs/domain/record/trackers/trackStyleSheet.js +75 -84
  186. package/cjs/domain/record/trackers/trackStyleSheet.js.map +1 -1
  187. package/cjs/domain/record/trackers/trackViewEnd.js +17 -17
  188. package/cjs/domain/record/trackers/trackViewEnd.js.map +1 -1
  189. package/cjs/domain/record/trackers/trackViewportResize.d.ts +2 -3
  190. package/cjs/domain/record/trackers/trackViewportResize.js +36 -42
  191. package/cjs/domain/record/trackers/trackViewportResize.js.map +1 -1
  192. package/cjs/domain/record/viewports.js +32 -50
  193. package/cjs/domain/record/viewports.js.map +1 -1
  194. package/cjs/domain/replayStats.d.ts +1 -0
  195. package/cjs/domain/replayStats.js +36 -44
  196. package/cjs/domain/replayStats.js.map +1 -1
  197. package/cjs/domain/scriptLoadingError.js +15 -22
  198. package/cjs/domain/scriptLoadingError.js.map +1 -1
  199. package/cjs/domain/segmentCollection/buildReplayPayload.js +22 -23
  200. package/cjs/domain/segmentCollection/buildReplayPayload.js.map +1 -1
  201. package/cjs/domain/segmentCollection/buildResourcePayload.d.ts +5 -0
  202. package/cjs/domain/segmentCollection/buildResourcePayload.js +19 -0
  203. package/cjs/domain/segmentCollection/buildResourcePayload.js.map +1 -0
  204. package/cjs/domain/segmentCollection/index.d.ts +3 -0
  205. package/cjs/domain/segmentCollection/index.js +14 -11
  206. package/cjs/domain/segmentCollection/replayResourceCollection.d.ts +10 -0
  207. package/cjs/domain/segmentCollection/replayResourceCollection.js +52 -0
  208. package/cjs/domain/segmentCollection/replayResourceCollection.js.map +1 -0
  209. package/cjs/domain/segmentCollection/segment.js +50 -80
  210. package/cjs/domain/segmentCollection/segment.js.map +1 -1
  211. package/cjs/domain/segmentCollection/segmentCollection.d.ts +4 -4
  212. package/cjs/domain/segmentCollection/segmentCollection.js +87 -105
  213. package/cjs/domain/segmentCollection/segmentCollection.js.map +1 -1
  214. package/cjs/domain/segmentCollection/startDroppedSegmentRecovery.d.ts +16 -0
  215. package/cjs/domain/segmentCollection/startDroppedSegmentRecovery.js +29 -0
  216. package/cjs/domain/segmentCollection/startDroppedSegmentRecovery.js.map +1 -0
  217. package/cjs/domain/segmentCollection/startSegmentTelemetry.js +40 -42
  218. package/cjs/domain/segmentCollection/startSegmentTelemetry.js.map +1 -1
  219. package/cjs/domain/startRecordBridge.js +10 -14
  220. package/cjs/domain/startRecordBridge.js.map +1 -1
  221. package/cjs/domain/startRecorderInitTelemetry.js +42 -50
  222. package/cjs/domain/startRecorderInitTelemetry.js.map +1 -1
  223. package/cjs/entries/internal.d.ts +11 -2
  224. package/cjs/entries/internal.js +47 -28
  225. package/cjs/entries/internalSynthetics.js +26 -24
  226. package/cjs/entries/internalSynthetics.js.map +1 -1
  227. package/cjs/entries/main.d.ts +5 -3
  228. package/cjs/entries/main.js +50 -31
  229. package/cjs/entries/main.js.map +1 -1
  230. package/cjs/types/index.d.ts +1 -0
  231. package/cjs/types/profiling.d.ts +313 -0
  232. package/cjs/types/sessionReplay.d.ts +381 -3
  233. package/cjs/types/sessionReplayConstants.d.ts +57 -0
  234. package/cjs/types/sessionReplayConstants.js +104 -47
  235. package/cjs/types/sessionReplayConstants.js.map +1 -1
  236. package/esm/boot/kubesenseRecorder.mjs +75 -0
  237. package/esm/boot/kubesenseRecorder.mjs.map +1 -0
  238. package/esm/boot/lazyLoadProfiler.mjs +24 -0
  239. package/esm/boot/lazyLoadProfiler.mjs.map +1 -0
  240. package/esm/boot/lazyLoadRecorder.mjs +24 -0
  241. package/esm/boot/lazyLoadRecorder.mjs.map +1 -0
  242. package/esm/boot/postStartStrategy.mjs +97 -0
  243. package/esm/boot/postStartStrategy.mjs.map +1 -0
  244. package/esm/boot/preStartStrategy.mjs +24 -0
  245. package/esm/boot/preStartStrategy.mjs.map +1 -0
  246. package/esm/boot/profilerApi.mjs +47 -0
  247. package/esm/boot/profilerApi.mjs.map +1 -0
  248. package/esm/boot/recorderApi.mjs +43 -0
  249. package/esm/boot/recorderApi.mjs.map +1 -0
  250. package/esm/domain/deflate/deflateEncoder.mjs +96 -0
  251. package/esm/domain/deflate/deflateEncoder.mjs.map +1 -0
  252. package/esm/domain/deflate/deflateWorker.mjs +90 -0
  253. package/esm/domain/deflate/deflateWorker.mjs.map +1 -0
  254. package/esm/domain/deflate/index.mjs +3 -0
  255. package/esm/domain/getSessionReplayLink.mjs +21 -0
  256. package/esm/domain/getSessionReplayLink.mjs.map +1 -0
  257. package/esm/domain/profiling/actionHistory.mjs +36 -0
  258. package/esm/domain/profiling/actionHistory.mjs.map +1 -0
  259. package/esm/domain/profiling/kubesenseProfiler.mjs +242 -0
  260. package/esm/domain/profiling/kubesenseProfiler.mjs.map +1 -0
  261. package/esm/domain/profiling/longTaskHistory.mjs +21 -0
  262. package/esm/domain/profiling/longTaskHistory.mjs.map +1 -0
  263. package/esm/domain/profiling/profilerDebugIds.mjs +18 -0
  264. package/esm/domain/profiling/profilerDebugIds.mjs.map +1 -0
  265. package/esm/domain/profiling/profilingContext.mjs +23 -0
  266. package/esm/domain/profiling/profilingContext.mjs.map +1 -0
  267. package/esm/domain/profiling/profilingSupported.mjs +9 -0
  268. package/esm/domain/profiling/profilingSupported.mjs.map +1 -0
  269. package/esm/domain/profiling/quotaCheck.mjs +66 -0
  270. package/esm/domain/profiling/quotaCheck.mjs.map +1 -0
  271. package/esm/domain/profiling/transport/buildProfileEvent.mjs +90 -0
  272. package/esm/domain/profiling/transport/buildProfileEvent.mjs.map +1 -0
  273. package/esm/domain/profiling/transport/formDataEmitter.mjs +17 -0
  274. package/esm/domain/profiling/transport/formDataEmitter.mjs.map +1 -0
  275. package/esm/domain/profiling/transport/profilingBridge.mjs +12 -0
  276. package/esm/domain/profiling/transport/profilingBridge.mjs.map +1 -0
  277. package/esm/domain/profiling/utils/getCustomOrDefaultViewName.mjs +7 -0
  278. package/esm/domain/profiling/utils/getCustomOrDefaultViewName.mjs.map +1 -0
  279. package/esm/domain/profiling/utils/getDefaultViewName.mjs +10 -0
  280. package/esm/domain/profiling/utils/getDefaultViewName.mjs.map +1 -0
  281. package/esm/domain/profiling/vitalHistory.mjs +55 -0
  282. package/esm/domain/profiling/vitalHistory.mjs.map +1 -0
  283. package/esm/domain/record/assembly.mjs +17 -0
  284. package/esm/domain/record/assembly.mjs.map +1 -0
  285. package/esm/domain/record/canvas/canvasHash.mjs +33 -0
  286. package/esm/domain/record/canvas/canvasHash.mjs.map +1 -0
  287. package/esm/domain/record/canvas/canvasManager.mjs +99 -0
  288. package/esm/domain/record/canvas/canvasManager.mjs.map +1 -0
  289. package/esm/domain/record/canvas/canvasSnapshot.mjs +38 -0
  290. package/esm/domain/record/canvas/canvasSnapshot.mjs.map +1 -0
  291. package/esm/domain/record/canvas/canvasUtils.mjs +13 -0
  292. package/esm/domain/record/canvas/canvasUtils.mjs.map +1 -0
  293. package/esm/domain/record/elementsScrollPositions.mjs +20 -0
  294. package/esm/domain/record/elementsScrollPositions.mjs.map +1 -0
  295. package/esm/domain/record/encoding/changeDecoder.mjs +152 -0
  296. package/esm/domain/record/encoding/changeDecoder.mjs.map +1 -0
  297. package/esm/domain/record/encoding/changeEncoder.mjs +146 -0
  298. package/esm/domain/record/encoding/changeEncoder.mjs.map +1 -0
  299. package/esm/domain/record/encoding/itemIds.mjs +47 -0
  300. package/esm/domain/record/encoding/itemIds.mjs.map +1 -0
  301. package/esm/domain/record/encoding/roles.mjs +64 -0
  302. package/esm/domain/record/encoding/roles.mjs.map +1 -0
  303. package/esm/domain/record/encoding/stringIds.mjs +47 -0
  304. package/esm/domain/record/encoding/stringIds.mjs.map +1 -0
  305. package/esm/domain/record/encoding/stringTable.mjs +38 -0
  306. package/esm/domain/record/encoding/stringTable.mjs.map +1 -0
  307. package/esm/domain/record/eventsUtils.mjs +13 -0
  308. package/esm/domain/record/eventsUtils.mjs.map +1 -0
  309. package/esm/domain/record/index.mjs +8 -0
  310. package/esm/domain/record/internalApi.mjs +62 -0
  311. package/esm/domain/record/internalApi.mjs.map +1 -0
  312. package/esm/domain/record/mutationBatch.mjs +43 -0
  313. package/esm/domain/record/mutationBatch.mjs.map +1 -0
  314. package/esm/domain/record/record.mjs +79 -0
  315. package/esm/domain/record/record.mjs.map +1 -0
  316. package/esm/domain/record/recordingScope.mjs +27 -0
  317. package/esm/domain/record/recordingScope.mjs.map +1 -0
  318. package/esm/domain/record/serialization/index.mjs +9 -0
  319. package/esm/domain/record/serialization/insertionCursor.mjs +54 -0
  320. package/esm/domain/record/serialization/insertionCursor.mjs.map +1 -0
  321. package/esm/domain/record/serialization/serializationStats.mjs +31 -0
  322. package/esm/domain/record/serialization/serializationStats.mjs.map +1 -0
  323. package/esm/domain/record/serialization/serializationTransaction.mjs +92 -0
  324. package/esm/domain/record/serialization/serializationTransaction.mjs.map +1 -0
  325. package/esm/domain/record/serialization/serializationUtils.mjs +53 -0
  326. package/esm/domain/record/serialization/serializationUtils.mjs.map +1 -0
  327. package/esm/domain/record/serialization/serializeAttribute.mjs +26 -0
  328. package/esm/domain/record/serialization/serializeAttribute.mjs.map +1 -0
  329. package/esm/domain/record/serialization/serializeAttributes.mjs +113 -0
  330. package/esm/domain/record/serialization/serializeAttributes.mjs.map +1 -0
  331. package/esm/domain/record/serialization/serializeFullSnapshot.mjs +14 -0
  332. package/esm/domain/record/serialization/serializeFullSnapshot.mjs.map +1 -0
  333. package/esm/domain/record/serialization/serializeMutations.mjs +152 -0
  334. package/esm/domain/record/serialization/serializeMutations.mjs.map +1 -0
  335. package/esm/domain/record/serialization/serializeNode.mjs +126 -0
  336. package/esm/domain/record/serialization/serializeNode.mjs.map +1 -0
  337. package/esm/domain/record/shadowRootsController.mjs +40 -0
  338. package/esm/domain/record/shadowRootsController.mjs.map +1 -0
  339. package/esm/domain/record/startFullSnapshots.mjs +42 -0
  340. package/esm/domain/record/startFullSnapshots.mjs.map +1 -0
  341. package/esm/domain/record/trackers/index.mjs +13 -0
  342. package/esm/domain/record/trackers/trackCanvasCapture.mjs +102 -0
  343. package/esm/domain/record/trackers/trackCanvasCapture.mjs.map +1 -0
  344. package/esm/domain/record/trackers/trackCanvasContent.mjs +31 -0
  345. package/esm/domain/record/trackers/trackCanvasContent.mjs.map +1 -0
  346. package/esm/domain/record/trackers/trackFocus.mjs +17 -0
  347. package/esm/domain/record/trackers/trackFocus.mjs.map +1 -0
  348. package/esm/domain/record/trackers/trackInput.mjs +131 -0
  349. package/esm/domain/record/trackers/trackInput.mjs.map +1 -0
  350. package/esm/domain/record/trackers/trackMediaInteraction.mjs +25 -0
  351. package/esm/domain/record/trackers/trackMediaInteraction.mjs.map +1 -0
  352. package/esm/domain/record/trackers/trackMouseInteraction.mjs +52 -0
  353. package/esm/domain/record/trackers/trackMouseInteraction.mjs.map +1 -0
  354. package/esm/domain/record/trackers/trackMove.mjs +48 -0
  355. package/esm/domain/record/trackers/trackMove.mjs.map +1 -0
  356. package/esm/domain/record/trackers/trackMutation.mjs +45 -0
  357. package/esm/domain/record/trackers/trackMutation.mjs.map +1 -0
  358. package/esm/domain/record/trackers/trackScroll.mjs +40 -0
  359. package/esm/domain/record/trackers/trackScroll.mjs.map +1 -0
  360. package/esm/domain/record/trackers/trackStyleSheet.mjs +79 -0
  361. package/esm/domain/record/trackers/trackStyleSheet.mjs.map +1 -0
  362. package/esm/domain/record/trackers/trackViewEnd.mjs +20 -0
  363. package/esm/domain/record/trackers/trackViewEnd.mjs.map +1 -0
  364. package/esm/domain/record/trackers/trackViewportResize.mjs +39 -0
  365. package/esm/domain/record/trackers/trackViewportResize.mjs.map +1 -0
  366. package/esm/domain/record/viewports.mjs +41 -0
  367. package/esm/domain/record/viewports.mjs.map +1 -0
  368. package/esm/domain/replayStats.mjs +46 -0
  369. package/esm/domain/replayStats.mjs.map +1 -0
  370. package/esm/domain/scriptLoadingError.mjs +19 -0
  371. package/esm/domain/scriptLoadingError.mjs.map +1 -0
  372. package/esm/domain/segmentCollection/buildReplayPayload.mjs +25 -0
  373. package/esm/domain/segmentCollection/buildReplayPayload.mjs.map +1 -0
  374. package/esm/domain/segmentCollection/buildResourcePayload.mjs +19 -0
  375. package/esm/domain/segmentCollection/buildResourcePayload.mjs.map +1 -0
  376. package/esm/domain/segmentCollection/index.mjs +5 -0
  377. package/esm/domain/segmentCollection/replayResourceCollection.mjs +52 -0
  378. package/esm/domain/segmentCollection/replayResourceCollection.mjs.map +1 -0
  379. package/esm/domain/segmentCollection/segment.mjs +52 -0
  380. package/esm/domain/segmentCollection/segment.mjs.map +1 -0
  381. package/esm/domain/segmentCollection/segmentCollection.mjs +87 -0
  382. package/esm/domain/segmentCollection/segmentCollection.mjs.map +1 -0
  383. package/esm/domain/segmentCollection/startDroppedSegmentRecovery.mjs +28 -0
  384. package/esm/domain/segmentCollection/startDroppedSegmentRecovery.mjs.map +1 -0
  385. package/esm/domain/segmentCollection/startSegmentTelemetry.mjs +45 -0
  386. package/esm/domain/segmentCollection/startSegmentTelemetry.mjs.map +1 -0
  387. package/esm/domain/startRecordBridge.mjs +13 -0
  388. package/esm/domain/startRecordBridge.mjs.map +1 -0
  389. package/esm/domain/startRecorderInitTelemetry.mjs +47 -0
  390. package/esm/domain/startRecorderInitTelemetry.mjs.map +1 -0
  391. package/esm/entries/internal.mjs +8 -0
  392. package/esm/entries/internalSynthetics.mjs +22 -0
  393. package/esm/entries/internalSynthetics.mjs.map +1 -0
  394. package/esm/entries/main.mjs +35 -0
  395. package/esm/entries/main.mjs.map +1 -0
  396. package/esm/types/sessionReplayConstants.mjs +97 -0
  397. package/esm/types/sessionReplayConstants.mjs.map +1 -0
  398. package/internal/package.json +1 -1
  399. package/internal-synthetics/package.json +1 -1
  400. package/package.json +26 -15
  401. package/src/boot/kubesenseRecorder.ts +134 -0
  402. package/src/boot/lazyLoadProfiler.ts +6 -7
  403. package/src/boot/lazyLoadRecorder.ts +6 -7
  404. package/src/boot/postStartStrategy.ts +18 -16
  405. package/src/boot/profilerApi.ts +29 -19
  406. package/src/boot/recorderApi.ts +6 -21
  407. package/src/domain/deflate/deflateEncoder.ts +3 -8
  408. package/src/domain/deflate/deflateWorker.ts +8 -13
  409. package/src/domain/deflate/index.ts +1 -0
  410. package/src/domain/getSessionReplayLink.ts +15 -11
  411. package/src/domain/profiling/actionHistory.ts +66 -0
  412. package/src/domain/profiling/{profiler.ts → kubesenseProfiler.ts} +166 -79
  413. package/src/domain/profiling/longTaskHistory.ts +45 -0
  414. package/src/domain/profiling/profilerDebugIds.ts +17 -0
  415. package/src/domain/profiling/profilingContext.ts +8 -3
  416. package/src/domain/profiling/profilingSupported.ts +2 -7
  417. package/src/domain/profiling/quotaCheck.ts +89 -0
  418. package/src/domain/profiling/test-utils/mockedTrace.ts +1 -2
  419. package/src/domain/profiling/transport/buildProfileEvent.ts +143 -0
  420. package/src/domain/profiling/transport/formDataEmitter.ts +17 -0
  421. package/src/domain/profiling/transport/profilingBridge.ts +9 -0
  422. package/src/domain/profiling/{types/rumProfiler.types.ts → types.ts} +14 -26
  423. package/src/domain/profiling/vitalHistory.ts +106 -0
  424. package/src/domain/record/assembly.ts +5 -3
  425. package/src/domain/record/canvas/canvasHash.ts +54 -0
  426. package/src/domain/record/canvas/canvasManager.ts +175 -0
  427. package/src/domain/record/canvas/canvasSnapshot.ts +52 -0
  428. package/src/domain/record/canvas/canvasUtils.ts +11 -0
  429. package/src/domain/record/encoding/changeDecoder.ts +287 -0
  430. package/src/domain/record/encoding/changeEncoder.ts +327 -0
  431. package/src/domain/record/encoding/index.ts +19 -0
  432. package/src/domain/record/encoding/itemIds.ts +84 -0
  433. package/src/domain/record/encoding/roles.ts +136 -0
  434. package/src/domain/record/encoding/stringIds.ts +70 -0
  435. package/src/domain/record/encoding/stringTable.ts +68 -0
  436. package/src/domain/record/index.ts +5 -2
  437. package/src/domain/record/internalApi.ts +21 -18
  438. package/src/domain/record/mutationBatch.ts +14 -3
  439. package/src/domain/record/record.ts +35 -16
  440. package/src/domain/record/record.types.ts +1 -0
  441. package/src/domain/record/recordingScope.ts +28 -5
  442. package/src/domain/record/serialization/index.ts +4 -2
  443. package/src/domain/record/serialization/insertionCursor.ts +131 -0
  444. package/src/domain/record/serialization/serialization.types.ts +0 -16
  445. package/src/domain/record/serialization/serializationTransaction.ts +191 -37
  446. package/src/domain/record/serialization/serializationUtils.ts +1 -15
  447. package/src/domain/record/serialization/serializeAttributes.ts +36 -32
  448. package/src/domain/record/serialization/serializeFullSnapshot.ts +26 -0
  449. package/src/domain/record/serialization/serializeMutations.ts +357 -0
  450. package/src/domain/record/serialization/serializeNode.ts +200 -164
  451. package/src/domain/record/shadowRootsController.ts +4 -3
  452. package/src/domain/record/startFullSnapshots.ts +28 -41
  453. package/src/domain/record/trackers/index.ts +2 -1
  454. package/src/domain/record/trackers/trackCanvasCapture.ts +137 -0
  455. package/src/domain/record/trackers/trackCanvasContent.ts +46 -0
  456. package/src/domain/record/trackers/trackFocus.ts +4 -4
  457. package/src/domain/record/trackers/trackInput.ts +146 -41
  458. package/src/domain/record/trackers/trackMediaInteraction.ts +0 -1
  459. package/src/domain/record/trackers/trackMouseInteraction.ts +1 -2
  460. package/src/domain/record/trackers/trackMove.ts +0 -1
  461. package/src/domain/record/trackers/trackMutation.ts +17 -355
  462. package/src/domain/record/trackers/trackScroll.ts +1 -1
  463. package/src/domain/record/trackers/trackStyleSheet.ts +1 -1
  464. package/src/domain/record/trackers/trackViewEnd.ts +1 -1
  465. package/src/domain/record/trackers/trackViewportResize.ts +7 -16
  466. package/src/domain/record/trackers/tracker.types.ts +1 -1
  467. package/src/domain/replayStats.ts +5 -0
  468. package/src/domain/scriptLoadingError.ts +2 -1
  469. package/src/domain/segmentCollection/buildResourcePayload.ts +20 -0
  470. package/src/domain/segmentCollection/index.ts +3 -0
  471. package/src/domain/segmentCollection/replayResourceCollection.ts +79 -0
  472. package/src/domain/segmentCollection/segment.ts +2 -1
  473. package/src/domain/segmentCollection/segmentCollection.ts +14 -13
  474. package/src/domain/segmentCollection/startDroppedSegmentRecovery.ts +37 -0
  475. package/src/domain/segmentCollection/startSegmentTelemetry.ts +16 -2
  476. package/src/domain/startRecorderInitTelemetry.ts +5 -3
  477. package/src/entries/internal.ts +13 -2
  478. package/src/entries/internalSynthetics.ts +3 -4
  479. package/src/entries/main.ts +23 -14
  480. package/src/types/index.ts +1 -0
  481. package/src/types/profiling.ts +315 -0
  482. package/src/types/sessionReplay.ts +395 -3
  483. package/src/types/sessionReplayConstants.ts +109 -0
  484. package/bundle/chunks/profiler-6f621c66a29d9f39a9bd-kubesense-rum.js +0 -1
  485. package/bundle/chunks/recorder-c73b8d42b98d4a01f120-kubesense-rum.js +0 -1
  486. package/cjs/boot/isBrowserSupported.d.ts +0 -4
  487. package/cjs/boot/isBrowserSupported.js +0 -17
  488. package/cjs/boot/isBrowserSupported.js.map +0 -1
  489. package/cjs/boot/startRecording.d.ts +0 -6
  490. package/cjs/boot/startRecording.js +0 -45
  491. package/cjs/boot/startRecording.js.map +0 -1
  492. package/cjs/domain/deflate/index.js.map +0 -1
  493. package/cjs/domain/profiling/profiler.d.ts +0 -7
  494. package/cjs/domain/profiling/profiler.js +0 -244
  495. package/cjs/domain/profiling/profiler.js.map +0 -1
  496. package/cjs/domain/profiling/test-utils/mockedTrace.js +0 -57
  497. package/cjs/domain/profiling/test-utils/mockedTrace.js.map +0 -1
  498. package/cjs/domain/profiling/transport/assembly.d.ts +0 -21
  499. package/cjs/domain/profiling/transport/assembly.js +0 -45
  500. package/cjs/domain/profiling/transport/assembly.js.map +0 -1
  501. package/cjs/domain/profiling/transport/buildProfileEventAttributes.d.ts +0 -25
  502. package/cjs/domain/profiling/transport/buildProfileEventAttributes.js +0 -50
  503. package/cjs/domain/profiling/transport/buildProfileEventAttributes.js.map +0 -1
  504. package/cjs/domain/profiling/types/index.d.ts +0 -2
  505. package/cjs/domain/profiling/types/index.js +0 -3
  506. package/cjs/domain/profiling/types/index.js.map +0 -1
  507. package/cjs/domain/profiling/types/profilerApi.types.d.ts +0 -58
  508. package/cjs/domain/profiling/types/profilerApi.types.js +0 -5
  509. package/cjs/domain/profiling/types/profilerApi.types.js.map +0 -1
  510. package/cjs/domain/profiling/types/rumProfiler.types.js +0 -3
  511. package/cjs/domain/profiling/types/rumProfiler.types.js.map +0 -1
  512. package/cjs/domain/profiling/utils/getNumberOfSamples.d.ts +0 -7
  513. package/cjs/domain/profiling/utils/getNumberOfSamples.js +0 -18
  514. package/cjs/domain/profiling/utils/getNumberOfSamples.js.map +0 -1
  515. package/cjs/domain/record/eventIds.d.ts +0 -4
  516. package/cjs/domain/record/eventIds.js +0 -16
  517. package/cjs/domain/record/eventIds.js.map +0 -1
  518. package/cjs/domain/record/index.js.map +0 -1
  519. package/cjs/domain/record/nodeIds.d.ts +0 -15
  520. package/cjs/domain/record/nodeIds.js +0 -32
  521. package/cjs/domain/record/nodeIds.js.map +0 -1
  522. package/cjs/domain/record/record.types.js +0 -3
  523. package/cjs/domain/record/record.types.js.map +0 -1
  524. package/cjs/domain/record/serialization/index.js.map +0 -1
  525. package/cjs/domain/record/serialization/serialization.types.js +0 -3
  526. package/cjs/domain/record/serialization/serialization.types.js.map +0 -1
  527. package/cjs/domain/record/serialization/serializeDocument.d.ts +0 -3
  528. package/cjs/domain/record/serialization/serializeDocument.js +0 -11
  529. package/cjs/domain/record/serialization/serializeDocument.js.map +0 -1
  530. package/cjs/domain/record/serialization/serializeStyleSheets.d.ts +0 -2
  531. package/cjs/domain/record/serialization/serializeStyleSheets.js +0 -19
  532. package/cjs/domain/record/serialization/serializeStyleSheets.js.map +0 -1
  533. package/cjs/domain/record/trackers/index.js.map +0 -1
  534. package/cjs/domain/record/trackers/trackFrustration.d.ts +0 -7
  535. package/cjs/domain/record/trackers/trackFrustration.js +0 -31
  536. package/cjs/domain/record/trackers/trackFrustration.js.map +0 -1
  537. package/cjs/domain/record/trackers/tracker.types.js +0 -3
  538. package/cjs/domain/record/trackers/tracker.types.js.map +0 -1
  539. package/cjs/domain/segmentCollection/index.js.map +0 -1
  540. package/cjs/entries/internal.js.map +0 -1
  541. package/cjs/types/index.js +0 -18
  542. package/cjs/types/index.js.map +0 -1
  543. package/cjs/types/sessionReplay.js +0 -7
  544. package/cjs/types/sessionReplay.js.map +0 -1
  545. package/esm/boot/isBrowserSupported.d.ts +0 -4
  546. package/esm/boot/isBrowserSupported.js +0 -14
  547. package/esm/boot/isBrowserSupported.js.map +0 -1
  548. package/esm/boot/lazyLoadProfiler.d.ts +0 -4
  549. package/esm/boot/lazyLoadProfiler.js +0 -18
  550. package/esm/boot/lazyLoadProfiler.js.map +0 -1
  551. package/esm/boot/lazyLoadRecorder.d.ts +0 -4
  552. package/esm/boot/lazyLoadRecorder.js +0 -18
  553. package/esm/boot/lazyLoadRecorder.js.map +0 -1
  554. package/esm/boot/postStartStrategy.d.ts +0 -33
  555. package/esm/boot/postStartStrategy.js +0 -115
  556. package/esm/boot/postStartStrategy.js.map +0 -1
  557. package/esm/boot/preStartStrategy.d.ts +0 -6
  558. package/esm/boot/preStartStrategy.js +0 -21
  559. package/esm/boot/preStartStrategy.js.map +0 -1
  560. package/esm/boot/profilerApi.d.ts +0 -2
  561. package/esm/boot/profilerApi.js +0 -50
  562. package/esm/boot/profilerApi.js.map +0 -1
  563. package/esm/boot/recorderApi.d.ts +0 -4
  564. package/esm/boot/recorderApi.js +0 -70
  565. package/esm/boot/recorderApi.js.map +0 -1
  566. package/esm/boot/startRecording.d.ts +0 -6
  567. package/esm/boot/startRecording.js +0 -42
  568. package/esm/boot/startRecording.js.map +0 -1
  569. package/esm/domain/deflate/deflateEncoder.d.ts +0 -3
  570. package/esm/domain/deflate/deflateEncoder.js +0 -107
  571. package/esm/domain/deflate/deflateEncoder.js.map +0 -1
  572. package/esm/domain/deflate/deflateWorker.d.ts +0 -30
  573. package/esm/domain/deflate/deflateWorker.js +0 -97
  574. package/esm/domain/deflate/deflateWorker.js.map +0 -1
  575. package/esm/domain/deflate/index.d.ts +0 -3
  576. package/esm/domain/deflate/index.js +0 -3
  577. package/esm/domain/deflate/index.js.map +0 -1
  578. package/esm/domain/getSessionReplayLink.d.ts +0 -2
  579. package/esm/domain/getSessionReplayLink.js +0 -32
  580. package/esm/domain/getSessionReplayLink.js.map +0 -1
  581. package/esm/domain/profiling/profiler.d.ts +0 -7
  582. package/esm/domain/profiling/profiler.js +0 -240
  583. package/esm/domain/profiling/profiler.js.map +0 -1
  584. package/esm/domain/profiling/profilingContext.d.ts +0 -6
  585. package/esm/domain/profiling/profilingContext.js +0 -25
  586. package/esm/domain/profiling/profilingContext.js.map +0 -1
  587. package/esm/domain/profiling/profilingSupported.d.ts +0 -1
  588. package/esm/domain/profiling/profilingSupported.js +0 -8
  589. package/esm/domain/profiling/profilingSupported.js.map +0 -1
  590. package/esm/domain/profiling/test-utils/mockedTrace.d.ts +0 -3
  591. package/esm/domain/profiling/test-utils/mockedTrace.js +0 -54
  592. package/esm/domain/profiling/test-utils/mockedTrace.js.map +0 -1
  593. package/esm/domain/profiling/transport/assembly.d.ts +0 -21
  594. package/esm/domain/profiling/transport/assembly.js +0 -42
  595. package/esm/domain/profiling/transport/assembly.js.map +0 -1
  596. package/esm/domain/profiling/transport/buildProfileEventAttributes.d.ts +0 -25
  597. package/esm/domain/profiling/transport/buildProfileEventAttributes.js +0 -47
  598. package/esm/domain/profiling/transport/buildProfileEventAttributes.js.map +0 -1
  599. package/esm/domain/profiling/types/index.d.ts +0 -2
  600. package/esm/domain/profiling/types/index.js +0 -2
  601. package/esm/domain/profiling/types/index.js.map +0 -1
  602. package/esm/domain/profiling/types/profilerApi.types.d.ts +0 -58
  603. package/esm/domain/profiling/types/profilerApi.types.js +0 -4
  604. package/esm/domain/profiling/types/profilerApi.types.js.map +0 -1
  605. package/esm/domain/profiling/types/rumProfiler.types.d.ts +0 -72
  606. package/esm/domain/profiling/types/rumProfiler.types.js +0 -2
  607. package/esm/domain/profiling/types/rumProfiler.types.js.map +0 -1
  608. package/esm/domain/profiling/utils/getCustomOrDefaultViewName.d.ts +0 -1
  609. package/esm/domain/profiling/utils/getCustomOrDefaultViewName.js +0 -3
  610. package/esm/domain/profiling/utils/getCustomOrDefaultViewName.js.map +0 -1
  611. package/esm/domain/profiling/utils/getDefaultViewName.d.ts +0 -1
  612. package/esm/domain/profiling/utils/getDefaultViewName.js +0 -11
  613. package/esm/domain/profiling/utils/getDefaultViewName.js.map +0 -1
  614. package/esm/domain/profiling/utils/getNumberOfSamples.d.ts +0 -7
  615. package/esm/domain/profiling/utils/getNumberOfSamples.js +0 -15
  616. package/esm/domain/profiling/utils/getNumberOfSamples.js.map +0 -1
  617. package/esm/domain/record/assembly.d.ts +0 -2
  618. package/esm/domain/record/assembly.js +0 -13
  619. package/esm/domain/record/assembly.js.map +0 -1
  620. package/esm/domain/record/elementsScrollPositions.d.ts +0 -10
  621. package/esm/domain/record/elementsScrollPositions.js +0 -20
  622. package/esm/domain/record/elementsScrollPositions.js.map +0 -1
  623. package/esm/domain/record/eventIds.d.ts +0 -4
  624. package/esm/domain/record/eventIds.js +0 -13
  625. package/esm/domain/record/eventIds.js.map +0 -1
  626. package/esm/domain/record/eventsUtils.d.ts +0 -2
  627. package/esm/domain/record/eventsUtils.js +0 -11
  628. package/esm/domain/record/eventsUtils.js.map +0 -1
  629. package/esm/domain/record/index.d.ts +0 -7
  630. package/esm/domain/record/index.js +0 -6
  631. package/esm/domain/record/index.js.map +0 -1
  632. package/esm/domain/record/internalApi.d.ts +0 -22
  633. package/esm/domain/record/internalApi.js +0 -53
  634. package/esm/domain/record/internalApi.js.map +0 -1
  635. package/esm/domain/record/mutationBatch.d.ts +0 -12
  636. package/esm/domain/record/mutationBatch.js +0 -40
  637. package/esm/domain/record/mutationBatch.js.map +0 -1
  638. package/esm/domain/record/nodeIds.d.ts +0 -15
  639. package/esm/domain/record/nodeIds.js +0 -29
  640. package/esm/domain/record/nodeIds.js.map +0 -1
  641. package/esm/domain/record/record.d.ts +0 -16
  642. package/esm/domain/record/record.js +0 -54
  643. package/esm/domain/record/record.js.map +0 -1
  644. package/esm/domain/record/record.types.d.ts +0 -4
  645. package/esm/domain/record/record.types.js +0 -2
  646. package/esm/domain/record/record.types.js.map +0 -1
  647. package/esm/domain/record/recordingScope.d.ts +0 -19
  648. package/esm/domain/record/recordingScope.js +0 -10
  649. package/esm/domain/record/recordingScope.js.map +0 -1
  650. package/esm/domain/record/serialization/index.d.ts +0 -8
  651. package/esm/domain/record/serialization/index.js +0 -7
  652. package/esm/domain/record/serialization/index.js.map +0 -1
  653. package/esm/domain/record/serialization/serialization.types.d.ts +0 -28
  654. package/esm/domain/record/serialization/serialization.types.js +0 -2
  655. package/esm/domain/record/serialization/serialization.types.js.map +0 -1
  656. package/esm/domain/record/serialization/serializationStats.d.ts +0 -12
  657. package/esm/domain/record/serialization/serializationStats.js +0 -27
  658. package/esm/domain/record/serialization/serializationStats.js.map +0 -1
  659. package/esm/domain/record/serialization/serializationTransaction.d.ts +0 -45
  660. package/esm/domain/record/serialization/serializationTransaction.js +0 -35
  661. package/esm/domain/record/serialization/serializationTransaction.js.map +0 -1
  662. package/esm/domain/record/serialization/serializationUtils.d.ts +0 -18
  663. package/esm/domain/record/serialization/serializationUtils.js +0 -80
  664. package/esm/domain/record/serialization/serializationUtils.js.map +0 -1
  665. package/esm/domain/record/serialization/serializeAttribute.d.ts +0 -4
  666. package/esm/domain/record/serialization/serializeAttribute.js +0 -38
  667. package/esm/domain/record/serialization/serializeAttribute.js.map +0 -1
  668. package/esm/domain/record/serialization/serializeAttributes.d.ts +0 -7
  669. package/esm/domain/record/serialization/serializeAttributes.js +0 -161
  670. package/esm/domain/record/serialization/serializeAttributes.js.map +0 -1
  671. package/esm/domain/record/serialization/serializeDocument.d.ts +0 -3
  672. package/esm/domain/record/serialization/serializeDocument.js +0 -8
  673. package/esm/domain/record/serialization/serializeDocument.js.map +0 -1
  674. package/esm/domain/record/serialization/serializeNode.d.ts +0 -7
  675. package/esm/domain/record/serialization/serializeNode.js +0 -149
  676. package/esm/domain/record/serialization/serializeNode.js.map +0 -1
  677. package/esm/domain/record/serialization/serializeStyleSheets.d.ts +0 -2
  678. package/esm/domain/record/serialization/serializeStyleSheets.js +0 -16
  679. package/esm/domain/record/serialization/serializeStyleSheets.js.map +0 -1
  680. package/esm/domain/record/shadowRootsController.d.ts +0 -11
  681. package/esm/domain/record/shadowRootsController.js +0 -41
  682. package/esm/domain/record/shadowRootsController.js.map +0 -1
  683. package/esm/domain/record/startFullSnapshots.d.ts +0 -9
  684. package/esm/domain/record/startFullSnapshots.js +0 -55
  685. package/esm/domain/record/startFullSnapshots.js.map +0 -1
  686. package/esm/domain/record/trackers/index.d.ts +0 -12
  687. package/esm/domain/record/trackers/index.js +0 -12
  688. package/esm/domain/record/trackers/index.js.map +0 -1
  689. package/esm/domain/record/trackers/trackFocus.d.ts +0 -5
  690. package/esm/domain/record/trackers/trackFocus.js +0 -12
  691. package/esm/domain/record/trackers/trackFocus.js.map +0 -1
  692. package/esm/domain/record/trackers/trackFrustration.d.ts +0 -7
  693. package/esm/domain/record/trackers/trackFrustration.js +0 -28
  694. package/esm/domain/record/trackers/trackFrustration.js.map +0 -1
  695. package/esm/domain/record/trackers/trackInput.d.ts +0 -4
  696. package/esm/domain/record/trackers/trackInput.js +0 -101
  697. package/esm/domain/record/trackers/trackInput.js.map +0 -1
  698. package/esm/domain/record/trackers/trackMediaInteraction.d.ts +0 -5
  699. package/esm/domain/record/trackers/trackMediaInteraction.js +0 -26
  700. package/esm/domain/record/trackers/trackMediaInteraction.js.map +0 -1
  701. package/esm/domain/record/trackers/trackMouseInteraction.d.ts +0 -5
  702. package/esm/domain/record/trackers/trackMouseInteraction.js +0 -56
  703. package/esm/domain/record/trackers/trackMouseInteraction.js.map +0 -1
  704. package/esm/domain/record/trackers/trackMove.d.ts +0 -9
  705. package/esm/domain/record/trackers/trackMove.js +0 -51
  706. package/esm/domain/record/trackers/trackMove.js.map +0 -1
  707. package/esm/domain/record/trackers/trackMutation.d.ts +0 -11
  708. package/esm/domain/record/trackers/trackMutation.js +0 -266
  709. package/esm/domain/record/trackers/trackMutation.js.map +0 -1
  710. package/esm/domain/record/trackers/trackScroll.d.ts +0 -5
  711. package/esm/domain/record/trackers/trackScroll.js +0 -45
  712. package/esm/domain/record/trackers/trackScroll.js.map +0 -1
  713. package/esm/domain/record/trackers/trackStyleSheet.d.ts +0 -6
  714. package/esm/domain/record/trackers/trackStyleSheet.js +0 -85
  715. package/esm/domain/record/trackers/trackStyleSheet.js.map +0 -1
  716. package/esm/domain/record/trackers/trackViewEnd.d.ts +0 -5
  717. package/esm/domain/record/trackers/trackViewEnd.js +0 -17
  718. package/esm/domain/record/trackers/trackViewEnd.js.map +0 -1
  719. package/esm/domain/record/trackers/trackViewportResize.d.ts +0 -6
  720. package/esm/domain/record/trackers/trackViewportResize.js +0 -42
  721. package/esm/domain/record/trackers/trackViewportResize.js.map +0 -1
  722. package/esm/domain/record/trackers/tracker.types.d.ts +0 -3
  723. package/esm/domain/record/trackers/tracker.types.js +0 -2
  724. package/esm/domain/record/trackers/tracker.types.js.map +0 -1
  725. package/esm/domain/record/viewports.d.ts +0 -20
  726. package/esm/domain/record/viewports.js +0 -55
  727. package/esm/domain/record/viewports.js.map +0 -1
  728. package/esm/domain/replayStats.d.ts +0 -8
  729. package/esm/domain/replayStats.js +0 -51
  730. package/esm/domain/replayStats.js.map +0 -1
  731. package/esm/domain/scriptLoadingError.d.ts +0 -6
  732. package/esm/domain/scriptLoadingError.js +0 -23
  733. package/esm/domain/scriptLoadingError.js.map +0 -1
  734. package/esm/domain/segmentCollection/buildReplayPayload.d.ts +0 -15
  735. package/esm/domain/segmentCollection/buildReplayPayload.js +0 -23
  736. package/esm/domain/segmentCollection/buildReplayPayload.js.map +0 -1
  737. package/esm/domain/segmentCollection/index.d.ts +0 -4
  738. package/esm/domain/segmentCollection/index.js +0 -4
  739. package/esm/domain/segmentCollection/index.js.map +0 -1
  740. package/esm/domain/segmentCollection/segment.d.ts +0 -16
  741. package/esm/domain/segmentCollection/segment.js +0 -46
  742. package/esm/domain/segmentCollection/segment.js.map +0 -1
  743. package/esm/domain/segmentCollection/segmentCollection.d.ts +0 -31
  744. package/esm/domain/segmentCollection/segmentCollection.js +0 -106
  745. package/esm/domain/segmentCollection/segmentCollection.js.map +0 -1
  746. package/esm/domain/segmentCollection/startSegmentTelemetry.d.ts +0 -6
  747. package/esm/domain/segmentCollection/startSegmentTelemetry.js +0 -44
  748. package/esm/domain/segmentCollection/startSegmentTelemetry.js.map +0 -1
  749. package/esm/domain/startRecordBridge.d.ts +0 -5
  750. package/esm/domain/startRecordBridge.js +0 -14
  751. package/esm/domain/startRecordBridge.js.map +0 -1
  752. package/esm/domain/startRecorderInitTelemetry.d.ts +0 -15
  753. package/esm/domain/startRecorderInitTelemetry.js +0 -52
  754. package/esm/domain/startRecorderInitTelemetry.js.map +0 -1
  755. package/esm/entries/internal.d.ts +0 -11
  756. package/esm/entries/internal.js +0 -4
  757. package/esm/entries/internal.js.map +0 -1
  758. package/esm/entries/internalSynthetics.d.ts +0 -2
  759. package/esm/entries/internalSynthetics.js +0 -23
  760. package/esm/entries/internalSynthetics.js.map +0 -1
  761. package/esm/entries/main.d.ts +0 -23
  762. package/esm/entries/main.js +0 -31
  763. package/esm/entries/main.js.map +0 -1
  764. package/esm/types/index.d.ts +0 -2
  765. package/esm/types/index.js +0 -2
  766. package/esm/types/index.js.map +0 -1
  767. package/esm/types/sessionReplay.d.ts +0 -703
  768. package/esm/types/sessionReplay.js +0 -6
  769. package/esm/types/sessionReplay.js.map +0 -1
  770. package/esm/types/sessionReplayConstants.d.ts +0 -49
  771. package/esm/types/sessionReplayConstants.js +0 -46
  772. package/esm/types/sessionReplayConstants.js.map +0 -1
  773. package/src/boot/isBrowserSupported.ts +0 -14
  774. package/src/boot/startRecording.ts +0 -70
  775. package/src/domain/profiling/transport/assembly.ts +0 -78
  776. package/src/domain/profiling/transport/buildProfileEventAttributes.ts +0 -66
  777. package/src/domain/profiling/types/index.ts +0 -2
  778. package/src/domain/profiling/types/profilerApi.types.ts +0 -87
  779. package/src/domain/profiling/utils/getNumberOfSamples.ts +0 -16
  780. package/src/domain/record/eventIds.ts +0 -17
  781. package/src/domain/record/nodeIds.ts +0 -46
  782. package/src/domain/record/serialization/serializeDocument.ts +0 -13
  783. package/src/domain/record/serialization/serializeStyleSheets.ts +0 -18
  784. package/src/domain/record/trackers/trackFrustration.ts +0 -41
@@ -1,4 +1,3 @@
1
- /* eslint-disable */
2
1
  /**
3
2
  * DO NOT MODIFY IT BY HAND. Run `yarn json-schemas:sync` instead.
4
3
  */
@@ -45,14 +44,20 @@ export type BrowserRecord =
45
44
  | ViewEndRecord
46
45
  | VisualViewportRecord
47
46
  | FrustrationRecord
47
+ | BrowserChangeRecord
48
48
  /**
49
- * Browser-specific. Schema of a Record type which contains the full snapshot of a screen.
49
+ * Browser-specific. Schema of a Record type which contains a full snapshot of a document.
50
50
  */
51
- export type BrowserFullSnapshotRecord = SlotSupportedCommonRecordSchema & {
51
+ export type BrowserFullSnapshotRecord = BrowserFullSnapshotV1Record | BrowserFullSnapshotChangeRecord
52
+ /**
53
+ * Browser-specific. Schema of a Record type which contains a full snapshot of a document in V1 format.
54
+ */
55
+ export type BrowserFullSnapshotV1Record = SlotSupportedCommonRecordSchema & {
52
56
  /**
53
57
  * The type of this Record.
54
58
  */
55
59
  readonly type: 2
60
+ readonly format?: SnapshotFormatV1
56
61
  data: BrowserNode
57
62
  }
58
63
  /**
@@ -64,6 +69,10 @@ export type SlotSupportedCommonRecordSchema = CommonRecordSchema & {
64
69
  */
65
70
  readonly slotId?: string
66
71
  }
72
+ /**
73
+ * The V1 snapshot format.
74
+ */
75
+ export type SnapshotFormatV1 = 0
67
76
  /**
68
77
  * Serialized node contained by this Record.
69
78
  */
@@ -74,6 +83,371 @@ export type SerializedNodeWithId = {
74
83
  * Serialized node contained by this Record.
75
84
  */
76
85
  export type SerializedNode = DocumentNode | DocumentFragmentNode | DocumentTypeNode | ElementNode | TextNode | CDataNode
86
+ /**
87
+ * Browser-specific. Schema of a Record type which contains a full snapshot of a document in Change format.
88
+ */
89
+ export type BrowserFullSnapshotChangeRecord = SlotSupportedCommonRecordSchema & {
90
+ /**
91
+ * The type of this Record.
92
+ */
93
+ readonly type: 2
94
+ readonly format: SnapshotFormatChange
95
+ data: Change[]
96
+ }
97
+ /**
98
+ * The Change snapshot format.
99
+ */
100
+ export type SnapshotFormatChange = 1
101
+ /**
102
+ * Browser-specific. Schema representing an individual change within a BrowserChangeData collection.
103
+ */
104
+ export type Change =
105
+ | [0, ...AddStringChange[]]
106
+ | [1, ...AddNodeChange[]]
107
+ | [2, ...RemoveNodeChange[]]
108
+ | [3, ...AttributeChange[]]
109
+ | [4, ...TextChange[]]
110
+ | [5, ...SizeChange[]]
111
+ | [6, ...ScrollPositionChange[]]
112
+ | [7, ...AddStyleSheetChange[]]
113
+ | [8, ...AttachedStyleSheetsChange[]]
114
+ | [9, ...MediaPlaybackStateChange[]]
115
+ | [10, ...VisualViewportChange[]]
116
+ | [11, ...AddRoleAnnotatedStringsChange[]]
117
+ | [12, ...InputValueChange[]]
118
+ | [13, ...InputSelectionChange[]]
119
+ | [14]
120
+ | [15, ...ImageContentChange[]]
121
+ /**
122
+ * Browser-specific. Schema representing the addition of a string to the string table, annotated as belonging to the default string role.
123
+ */
124
+ export type AddStringChange = string
125
+ /**
126
+ * Browser-specific. Schema representing the addition of a new node to the document.
127
+ */
128
+ export type AddNodeChange =
129
+ | AddCDataSectionNodeChange
130
+ | AddDocTypeNodeChange
131
+ | AddDocumentNodeChange
132
+ | AddDocumentFragmentNodeChange
133
+ | AddElementNodeChange
134
+ | AddShadowRootNodeChange
135
+ | AddTextNodeChange
136
+ /**
137
+ * Schema representing the addition of a new #cdata-section node.
138
+ *
139
+ * @minItems 2
140
+ */
141
+ export type AddCDataSectionNodeChange = [
142
+ InsertionPoint,
143
+ '#cdata-section' | { role: 1; string: '#cdata-section' } | StringReference,
144
+ ]
145
+ /**
146
+ * Browser-specific. Schema representing the insertion point of a node which is being added to the document.
147
+ */
148
+ export type InsertionPoint =
149
+ AppendChildInsertionPoint | InsertAfterPreviousInsertionPoint | InsertBeforeInsertionPoint | RootInsertionPoint
150
+ /**
151
+ * A positive integer insertion point. Inserting a node at positive integer N indicates that the new node's parent is the node with an id N lower than the new node, and that we should insert the new node at the end of its parent's child list, as if the DOM method appendChild() was being used.
152
+ */
153
+ export type AppendChildInsertionPoint = number
154
+ /**
155
+ * A zero insertion point. Inserting a node at zero indicates that the new node should be inserted after the node with an id one lower than the new node, as if the DOM method after() is being used. Using a zero insertion point repeatedly is thus a quick way to insert a sequence of sibling elements.
156
+ */
157
+ export type InsertAfterPreviousInsertionPoint = 0
158
+ /**
159
+ * A negative integer insertion point. Inserting a node at negative integer -N indicates that the new node's next sibling is the node with an id N lower than the new node, and that we should insert the new node before its next sibling, as if the DOM method insertBefore() was being used.
160
+ */
161
+ export type InsertBeforeInsertionPoint = number
162
+ /**
163
+ * A null insertion point, indicating that the node should be inserted at the root of the document.
164
+ */
165
+ export type RootInsertionPoint = null
166
+ /**
167
+ * Browser-specific. Schema representing a string, expressed as an index into the string table.
168
+ */
169
+ export type StringReference = number
170
+ /**
171
+ * Schema representing the addition of a new #doctype node, using the format [#doctype, name, public ID, system ID].
172
+ *
173
+ * @minItems 5
174
+ */
175
+ export type AddDocTypeNodeChange = [
176
+ InsertionPoint,
177
+ '#doctype' | { role: 1; string: '#doctype' } | StringReference,
178
+ StringOrStringReference,
179
+ StringOrStringReference,
180
+ StringOrStringReference,
181
+ ]
182
+ /**
183
+ * Browser-specific. Schema representing a string, either expressed as a literal, as a literal with an associated string role, or as an index into the string table.
184
+ */
185
+ export type StringOrStringReference = StringLiteral | RoleAnnotatedStringLiteral | StringReference
186
+ /**
187
+ * Browser-specific. Schema representing a string, expressed as a literal.
188
+ */
189
+ export type StringLiteral = string
190
+ /**
191
+ * Browser-specific. Schema representing a string role.
192
+ */
193
+ export type StringRoleId =
194
+ | StringRoleDefault
195
+ | StringRoleNodeName
196
+ | StringRoleAttributeName
197
+ | StringRoleAttributeValue
198
+ | StringRoleTextContent
199
+ | StringRoleFormInput
200
+ | StringRoleCSS
201
+ | StringRoleURL
202
+ | StringRoleResourceId
203
+ /**
204
+ * The default string role, used for uncategorized strings. Strings added by an AddStringChange are added to this string role.
205
+ */
206
+ export type StringRoleDefault = 0
207
+ /**
208
+ * A string role containing DOM node names (e.g. 'div', '#text').
209
+ */
210
+ export type StringRoleNodeName = 1
211
+ /**
212
+ * A string role containing DOM attribute names.
213
+ */
214
+ export type StringRoleAttributeName = 2
215
+ /**
216
+ * A string role containing DOM attribute values.
217
+ */
218
+ export type StringRoleAttributeValue = 3
219
+ /**
220
+ * A string role containing DOM text content.
221
+ */
222
+ export type StringRoleTextContent = 4
223
+ /**
224
+ * A string role containing DOM form input values.
225
+ */
226
+ export type StringRoleFormInput = 5
227
+ /**
228
+ * A string role containing CSS inline styles and stylesheets.
229
+ */
230
+ export type StringRoleCSS = 6
231
+ /**
232
+ * A string role containing URLs.
233
+ */
234
+ export type StringRoleURL = 7
235
+ /**
236
+ * A string role containing resource IDs.
237
+ */
238
+ export type StringRoleResourceId = 8
239
+ /**
240
+ * Schema representing the addition of a new #document node.
241
+ *
242
+ * @minItems 2
243
+ */
244
+ export type AddDocumentNodeChange = [InsertionPoint, '#document' | { role: 1; string: '#document' } | StringReference]
245
+ /**
246
+ * Schema representing the addition of a new #document-fragment node.
247
+ *
248
+ * @minItems 2
249
+ */
250
+ export type AddDocumentFragmentNodeChange = [
251
+ InsertionPoint,
252
+ '#document-fragment' | { role: 1; string: '#document-fragment' } | StringReference,
253
+ ]
254
+ /**
255
+ * Schema representing the addition of a new element node.
256
+ *
257
+ * @minItems 2
258
+ */
259
+ export type AddElementNodeChange = [InsertionPoint, StringOrStringReference, ...AttributeAssignment[]]
260
+ /**
261
+ * Schema representing an assignment of a value to an attribute. The format is [name, value].
262
+ *
263
+ * @minItems 2
264
+ */
265
+ export type AttributeAssignment = [StringOrStringReference, StringOrStringReference]
266
+ /**
267
+ * Schema representing the addition of a new #shadow-root node.
268
+ *
269
+ * @minItems 2
270
+ */
271
+ export type AddShadowRootNodeChange = [
272
+ InsertionPoint,
273
+ '#shadow-root' | { role: 1; string: '#shadow-root' } | StringReference,
274
+ ]
275
+ /**
276
+ * Schema representing the addition of a new #text node.
277
+ *
278
+ * @minItems 3
279
+ */
280
+ export type AddTextNodeChange = [
281
+ InsertionPoint,
282
+ '#text' | { role: 1; string: '#text' } | StringReference,
283
+ StringOrStringReference,
284
+ ]
285
+ /**
286
+ * Browser-specific. Schema representing the removal of a node from the document.
287
+ */
288
+ export type RemoveNodeChange = number
289
+ /**
290
+ * Browser-specific. Schema representing a change to an node's attributes.
291
+ *
292
+ * @minItems 1
293
+ */
294
+ export type AttributeChange = [NodeId, ...AttributeAssignmentOrDeletion[]]
295
+ /**
296
+ * Browser-specific. Schema representing the ID of a DOM node.
297
+ */
298
+ export type NodeId = number
299
+ /**
300
+ * Schema representing a change to an attribute, either by assignment of a new value or by deletion of the attribute.
301
+ */
302
+ export type AttributeAssignmentOrDeletion = AttributeAssignment | AttributeDeletion
303
+ /**
304
+ * Schema representing the deletion of an attribute.
305
+ *
306
+ * @minItems 1
307
+ */
308
+ export type AttributeDeletion = [StringOrStringReference]
309
+ /**
310
+ * Browser-specific. Schema representing a change to the text content of a #text node.
311
+ *
312
+ * @minItems 2
313
+ */
314
+ export type TextChange = [NodeId, StringOrStringReference]
315
+ /**
316
+ * Browser-specific. Schema representing a change in an element's size.
317
+ *
318
+ * @minItems 3
319
+ */
320
+ export type SizeChange = [NodeId, number, number]
321
+ /**
322
+ * Browser-specific. Schema representing a scroll position change.
323
+ *
324
+ * @minItems 3
325
+ */
326
+ export type ScrollPositionChange = [NodeId, number, number]
327
+ /**
328
+ * Browser-specific. Schema representing the addition of a new stylesheet to the document.
329
+ */
330
+ export type AddStyleSheetChange = StyleSheetSnapshot
331
+ /**
332
+ * Schema representing a snapshot of a CSS stylesheet.
333
+ *
334
+ * @minItems 1
335
+ */
336
+ export type StyleSheetSnapshot =
337
+ [StyleSheetRules] | [StyleSheetRules, StyleSheetMediaList] | [StyleSheetRules, StyleSheetMediaList, boolean]
338
+ /**
339
+ * Schema representing a CSS stylesheet's rules, encoded either as a single string or as an array containing a separate string for each rule.
340
+ */
341
+ export type StyleSheetRules = StringOrStringReference | StringOrStringReference[]
342
+ /**
343
+ * If non-empty, the list of medias for which this stylesheet is active. Defaults to the empty list if not present.
344
+ */
345
+ export type StyleSheetMediaList = StringOrStringReference[]
346
+ /**
347
+ * Browser-specific. Schema representing a change to the stylesheets attached to a DOM node. For <link> or <style> elements, which use classic CSSOM APIs, at most one stylesheet can be attached. For #document, #document-fragment, or #shadow-root nodes, which use the `adoptedStyleSheets` API, any number of stylesheets can be attached.
348
+ *
349
+ * @minItems 1
350
+ */
351
+ export type AttachedStyleSheetsChange = [NodeId, ...StyleSheetId[]]
352
+ /**
353
+ * Browser-specific. Schema representing the ID of a stylesheet.
354
+ */
355
+ export type StyleSheetId = number
356
+ /**
357
+ * Browser-specific. Schema representing a change to the playback state of the media associated with an <audio> or <video> element.
358
+ *
359
+ * @minItems 2
360
+ */
361
+ export type MediaPlaybackStateChange = [NodeId, PlaybackStatePlaying | PlaybackStatePaused]
362
+ /**
363
+ * A playback state indicating that the associated media is playing.
364
+ */
365
+ export type PlaybackStatePlaying = 0
366
+ /**
367
+ * A playback state indicating that the associated media is paused.
368
+ */
369
+ export type PlaybackStatePaused = 1
370
+ /**
371
+ * Browser-specific. Schema representing a change to the visual viewport, defined in terms of the web platform VisualViewport API.
372
+ *
373
+ * @minItems 7
374
+ */
375
+ export type VisualViewportChange = [
376
+ VisualViewportOffsetLeft,
377
+ VisualViewportOffsetTop,
378
+ VisualViewportPageLeft,
379
+ VisualViewportPageTop,
380
+ VisualViewportWidth,
381
+ VisualViewportHeight,
382
+ VisualViewportScale,
383
+ ]
384
+ /**
385
+ * The offset of the left edge of the visual viewport from the left edge of the layout viewport in CSS pixels.
386
+ */
387
+ export type VisualViewportOffsetLeft = number
388
+ /**
389
+ * The offset of the top edge of the visual viewport from the top edge of the layout viewport in CSS pixels.
390
+ */
391
+ export type VisualViewportOffsetTop = number
392
+ /**
393
+ * The x coordinate of the visual viewport relative to the initial containing block origin of the top edge in CSS pixels.
394
+ */
395
+ export type VisualViewportPageLeft = number
396
+ /**
397
+ * The y coordinate of the visual viewport relative to the initial containing block origin of the top edge in CSS pixels.
398
+ */
399
+ export type VisualViewportPageTop = number
400
+ /**
401
+ * The width of the visual viewport in CSS pixels.
402
+ */
403
+ export type VisualViewportWidth = number
404
+ /**
405
+ * The height of the visual viewport in CSS pixels.
406
+ */
407
+ export type VisualViewportHeight = number
408
+ /**
409
+ * The pinch-zoom scaling factor applied to the visual viewport.
410
+ */
411
+ export type VisualViewportScale = number
412
+ /**
413
+ * Browser-specific. Schema representing the addition of a sequence of strings to the string table, annotated as belonging to a particular string role.
414
+ *
415
+ * @minItems 1
416
+ */
417
+ export type AddRoleAnnotatedStringsChange = [StringRoleId, ...StringLiteral[]]
418
+ /**
419
+ * Browser-specific. Schema representing a change to the value of a 'value-serializable' form input element, where 'value-serializable' means that the element's state can be reconstructed from its 'value' property.
420
+ *
421
+ * @minItems 2
422
+ */
423
+ export type InputValueChange = [NodeId, StringOrStringReference]
424
+ /**
425
+ * Browser-specific. Schema representing a change to the selection state of one or more 'selection-driven' form input elements; selection-driven inputs include checkboxes, radio buttons, and <select>/<option>. For <select>, the change targets the <option> elements, which allows multiple selection to be expressed naturally. To model correlated changes like updates to radio button groups, the same selection state can be applied to many nodes at once.
426
+ *
427
+ * @minItems 1
428
+ */
429
+ export type InputSelectionChange = [
430
+ InputSelectionStateSelected | InputSelectionStateDeselected | InputSelectionStateIndeterminate,
431
+ ...NodeId[],
432
+ ]
433
+ /**
434
+ * The element is selected. For a checkbox or radio button, this means that it is checked; for an <option>, this means that it is selected.
435
+ */
436
+ export type InputSelectionStateSelected = 0
437
+ /**
438
+ * The element is not selected. For a checkbox or radio button, this means that it is unchecked; for an <option>, this means that it is deselected.
439
+ */
440
+ export type InputSelectionStateDeselected = 1
441
+ /**
442
+ * The element is neither selected nor deselected. This state only applies to checkboxes, which render it distinctly from both the selected and deselected states.
443
+ */
444
+ export type InputSelectionStateIndeterminate = 2
445
+ /**
446
+ * Browser-specific. Schema representing a change in an element's image content, identified by a resource ID.
447
+ *
448
+ * @minItems 2
449
+ */
450
+ export type ImageContentChange = [NodeId, StringOrStringReference]
77
451
  /**
78
452
  * Browser-specific. Schema of a Record type which contains mutations of a screen.
79
453
  */
@@ -333,6 +707,17 @@ export type FrustrationRecord = SlotSupportedCommonRecordSchema & {
333
707
  recordIds: number[]
334
708
  }
335
709
  }
710
+ /**
711
+ * Browser-specific. Schema of a record type which represents changes using a compact encoding. (Experimental; subject to change.)
712
+ */
713
+ export type BrowserChangeRecord = SlotSupportedCommonRecordSchema & {
714
+ /**
715
+ * The type of this Record.
716
+ */
717
+ readonly type: 12
718
+ data: Change[]
719
+ id?: number
720
+ }
336
721
 
337
722
  /**
338
723
  * Schema of a Session Replay Segment context.
@@ -538,6 +923,13 @@ export interface CDataNode {
538
923
  readonly type: 4
539
924
  textContent: ''
540
925
  }
926
+ /**
927
+ * Browser-specific. Schema representing a string literal with an associated string role.
928
+ */
929
+ export interface RoleAnnotatedStringLiteral {
930
+ role: StringRoleId
931
+ string: StringLiteral
932
+ }
541
933
  /**
542
934
  * Schema of an AddedNodeMutation.
543
935
  */
@@ -8,6 +8,7 @@ export const RecordType: {
8
8
  ViewEnd: SessionReplay.ViewEndRecord['type']
9
9
  VisualViewport: SessionReplay.VisualViewportRecord['type']
10
10
  FrustrationRecord: SessionReplay.FrustrationRecord['type']
11
+ Change: SessionReplay.BrowserChangeRecord['type']
11
12
  } = {
12
13
  FullSnapshot: 2,
13
14
  IncrementalSnapshot: 3,
@@ -16,6 +17,7 @@ export const RecordType: {
16
17
  ViewEnd: 7,
17
18
  VisualViewport: 8,
18
19
  FrustrationRecord: 9,
20
+ Change: 12,
19
21
  } as const
20
22
 
21
23
  export type RecordType = (typeof RecordType)[keyof typeof RecordType]
@@ -38,6 +40,103 @@ export const NodeType: {
38
40
 
39
41
  export type NodeType = (typeof NodeType)[keyof typeof NodeType]
40
42
 
43
+ // ChangeTypeId evaluates to Id if [Id, ...Data[]] is a valid variant of Change;
44
+ // otherwise, it triggers a compile-time error.
45
+ type ChangeTypeId<Id, Data> = [Id, ...Data[]] extends SessionReplay.Change ? Id : never
46
+
47
+ // DatalessChangeTypeId is ChangeTypeId for changes which carry no data.
48
+ type DatalessChangeTypeId<Id> = [Id] extends SessionReplay.Change ? Id : never
49
+
50
+ export const ChangeType: {
51
+ AddString: ChangeTypeId<0, SessionReplay.AddStringChange>
52
+ AddNode: ChangeTypeId<1, SessionReplay.AddNodeChange>
53
+ RemoveNode: ChangeTypeId<2, SessionReplay.RemoveNodeChange>
54
+ Attribute: ChangeTypeId<3, SessionReplay.AttributeChange>
55
+ Text: ChangeTypeId<4, SessionReplay.TextChange>
56
+ Size: ChangeTypeId<5, SessionReplay.SizeChange>
57
+ ScrollPosition: ChangeTypeId<6, SessionReplay.ScrollPositionChange>
58
+ AddStyleSheet: ChangeTypeId<7, SessionReplay.AddStyleSheetChange>
59
+ AttachedStyleSheets: ChangeTypeId<8, SessionReplay.AttachedStyleSheetsChange>
60
+ MediaPlaybackState: ChangeTypeId<9, SessionReplay.MediaPlaybackStateChange>
61
+ VisualViewport: ChangeTypeId<10, SessionReplay.VisualViewportChange>
62
+ AddRoleAnnotatedStrings: ChangeTypeId<11, SessionReplay.AddRoleAnnotatedStringsChange>
63
+ InputValue: ChangeTypeId<12, SessionReplay.InputValueChange>
64
+ InputSelection: ChangeTypeId<13, SessionReplay.InputSelectionChange>
65
+ ClearStrings: DatalessChangeTypeId<14>
66
+ ImageContent: ChangeTypeId<15, SessionReplay.ImageContentChange>
67
+ } = {
68
+ AddString: 0,
69
+ AddNode: 1,
70
+ RemoveNode: 2,
71
+ Attribute: 3,
72
+ Text: 4,
73
+ Size: 5,
74
+ ScrollPosition: 6,
75
+ AddStyleSheet: 7,
76
+ AttachedStyleSheets: 8,
77
+ MediaPlaybackState: 9,
78
+ VisualViewport: 10,
79
+ AddRoleAnnotatedStrings: 11,
80
+ InputValue: 12,
81
+ InputSelection: 13,
82
+ ClearStrings: 14,
83
+ ImageContent: 15,
84
+ } as const
85
+
86
+ export type ChangeType = (typeof ChangeType)[keyof typeof ChangeType]
87
+
88
+ /**
89
+ * The role that a string in the string table plays on the page. A role says what kind of data the
90
+ * string holds, which lets the intake store strings with similar content together, and lets it
91
+ * redact them according to their kind.
92
+ */
93
+ export const StringRole: {
94
+ Default: SessionReplay.StringRoleDefault
95
+ NodeName: SessionReplay.StringRoleNodeName
96
+ AttributeName: SessionReplay.StringRoleAttributeName
97
+ AttributeValue: SessionReplay.StringRoleAttributeValue
98
+ TextContent: SessionReplay.StringRoleTextContent
99
+ FormInput: SessionReplay.StringRoleFormInput
100
+ Css: SessionReplay.StringRoleCSS
101
+ Url: SessionReplay.StringRoleURL
102
+ ResourceId: SessionReplay.StringRoleResourceId
103
+ } = {
104
+ Default: 0,
105
+ NodeName: 1,
106
+ AttributeName: 2,
107
+ AttributeValue: 3,
108
+ TextContent: 4,
109
+ FormInput: 5,
110
+ Css: 6,
111
+ Url: 7,
112
+ ResourceId: 8,
113
+ } as const
114
+
115
+ export type StringRole = (typeof StringRole)[keyof typeof StringRole]
116
+
117
+ /** The selection state of a checkbox, radio button, or `<option>`. */
118
+ export const InputSelectionState: {
119
+ Selected: SessionReplay.InputSelectionStateSelected
120
+ Deselected: SessionReplay.InputSelectionStateDeselected
121
+ Indeterminate: SessionReplay.InputSelectionStateIndeterminate
122
+ } = {
123
+ Selected: 0,
124
+ Deselected: 1,
125
+ Indeterminate: 2,
126
+ } as const
127
+
128
+ export type InputSelectionState = (typeof InputSelectionState)[keyof typeof InputSelectionState]
129
+
130
+ export const PlaybackState: {
131
+ Playing: SessionReplay.PlaybackStatePlaying
132
+ Paused: SessionReplay.PlaybackStatePaused
133
+ } = {
134
+ Playing: 0,
135
+ Paused: 1,
136
+ } as const
137
+
138
+ export type PlaybackState = (typeof PlaybackState)[keyof typeof PlaybackState]
139
+
41
140
  export const IncrementalSource: {
42
141
  Mutation: SessionReplay.BrowserMutationData['source']
43
142
  MouseMove: Exclude<SessionReplay.MousemoveData['source'], 6>
@@ -84,3 +183,13 @@ export const MediaInteractionType = {
84
183
  } as const
85
184
 
86
185
  export type MediaInteractionType = (typeof MediaInteractionType)[keyof typeof MediaInteractionType]
186
+
187
+ export const SnapshotFormat: {
188
+ V1: SessionReplay.SnapshotFormatV1
189
+ Change: SessionReplay.SnapshotFormatChange
190
+ } = {
191
+ V1: 0,
192
+ Change: 1,
193
+ } as const
194
+
195
+ export type SnapshotFormat = (typeof SnapshotFormat)[keyof typeof SnapshotFormat]
@@ -1 +0,0 @@
1
- (self.webpackChunk_kubesense_kubesense_browser_rum=self.webpackChunk_kubesense_kubesense_browser_rum||[]).push([["profiler"],{437(e,t,n){n.d(t,{createRumProfiler:()=>f});var s=n(315),r=n(197),a=n(433),i=n(875),o=n(749),c=n(636),u=n(446);const l=/\/(?![vV]\d{1,2}\/)([^/\d?]*\d+[^/?]*)/g,p=(e,t)=>e||function(e){return e?e.replace(l,"/?"):"/"}(t);var d=n(485);const m={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3,minNumberOfSamples:50};function f(e,t,n,l,f,v,w,g=m){const h=(0,u.wP)(e,t,v,6);let k;const b=[];let y={state:"stopped",stateReason:"initializing"};function S(){if("running"===y.state)return;const t=w.findView();k=t?{startClocks:t.startClocks,viewId:t.id,viewName:p(t.name,document.location.pathname)}:void 0,b.push((0,r.q)(e,window,"visibilitychange",P).stop,(0,r.q)(e,window,"beforeunload",E).stop),_()}async function I(e){await async function(e){"running"===y.state&&(await T(),y={state:"stopped",stateReason:e})}(e),b.forEach(e=>e()),l.set({status:"stopped",error_reason:void 0})}function _(){const e=(0,a.VZ)().Profiler;if(!e)throw l.set({status:"error",error_reason:"not-supported-by-browser"}),Error("RUM Profiler is not supported in this browser.");M(y).catch(s.Dx);const{cleanupTasks:n}=function(e){if("running"===e.state)return{cleanupTasks:e.cleanupTasks};const n=[],s=t.subscribe(2,e=>{const t={viewId:e.id,viewName:p(e.name,document.location.pathname),startClocks:e.startClocks};C(t),k=t});return n.push(s.unsubscribe),{cleanupTasks:n}}(y);let r;try{r=new e({sampleInterval:g.sampleIntervalMs,maxBufferSize:Math.round(1.5*g.collectIntervalMs/g.sampleIntervalMs)})}catch(e){return void(e instanceof Error&&e.message.includes("disabled by Document Policy")?(i.Vy.warn("[KUBESENSE_SDK] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",e),l.set({status:"error",error_reason:"missing-document-policy-header"})):l.set({status:"error",error_reason:"unexpected-exception"}))}l.set({status:"running",error_reason:void 0}),y={state:"running",startClocks:(0,o.M8)(),profiler:r,timeoutId:(0,c.wg)(_,g.collectIntervalMs),views:[],cleanupTasks:n,longTasks:[]},C(k),r.addEventListener("samplebufferfull",D)}async function M(t){if("running"!==t.state)return;(0,c.DJ)(t.timeoutId),t.profiler.removeEventListener("samplebufferfull",D);const{startClocks:r,views:a}=t;await t.profiler.stop().then(t=>{const s=(0,o.M8)(),i=f.findLongTasks(r.relative),c=(0,o.vk)(r.timeStamp,s.timeStamp)<g.minProfileDurationMs,u=function(e){let t=0;for(const n of e)void 0!==n.stackId&&t++;return t}(t.samples)<g.minNumberOfSamples;0===i.length&&(c||u)||function(t){var s;const r=null===(s=n.findTrackedSession())||void 0===s?void 0:s.id,a=function(e,t,n){const s=function(e,t,n){const s=(0,d.m5)(t),r=function(e,t,n){const s={application:{id:t}};n&&(s.session={id:n});const{ids:r,names:a}=function(e){const t={ids:[],names:[]};for(const n of e)t.ids.push(n.viewId),n.viewName&&t.names.push(n.viewName);return t.names=Array.from(new Set(t.names)),t}(e.views);r.length&&(s.view={id:r,name:a});const i=e.longTasks.map(e=>e.id).filter(e=>void 0!==e);return i.length&&(s.long_task={id:i}),s}(e,t.applicationId,n),a=function(e){return e.concat(["language:javascript","runtime:chrome","family:chrome","host:browser"])}(s);return{...r,attachments:["wall-time.json"],start:new Date(e.startClocks.timeStamp).toISOString(),end:new Date(e.endClocks.timeStamp).toISOString(),family:"chrome",runtime:"chrome",format:"json",version:4,tags_profiler:a.join(","),_kubesense:{clock_drift:(0,o.TP)()}}}(e,t,n);return{event:s,"wall-time.json":e}}(t,e,r);h.send(a)}(Object.assign(t,{startClocks:r,endClocks:s,clocksOrigin:(0,o.Oc)(),longTasks:i,views:a,sampleInterval:g.sampleIntervalMs}))}).catch(s.Dx)}async function T(){"running"===y.state&&(y.cleanupTasks.forEach(e=>e()),await M(y))}function C(e){"running"===y.state&&e&&y.views.push(e)}function D(){_()}function P(){"hidden"===document.visibilityState&&"running"===y.state?async function(){"running"===y.state&&(await T(),y={state:"paused"})}().catch(s.Dx):"visible"===document.visibilityState&&"paused"===y.state&&_()}function E(){_()}return t.subscribe(9,()=>{I("session-expired").catch(s.Dx)}),t.subscribe(10,()=>{"stopped"===y.state&&"session-expired"===y.stateReason&&S()}),{start:S,async stop(){await I("stopped-by-user")},isStopped:()=>"stopped"===y.state,isRunning:()=>"running"===y.state,isPaused:()=>"paused"===y.state}}}}]);
@@ -1 +0,0 @@
1
- (self.webpackChunk_kubesense_kubesense_browser_rum=self.webpackChunk_kubesense_kubesense_browser_rum||[]).push([["recorder"],{814(t,e,n){n.d(e,{startRecording:()=>at});var o=n(534),s=n(725),r=n(362),i=n(474),a=n(446),c=n(749),u=n(877);function d(t,e){const n=t.tagName,o=t.value;if((0,a.Ie)(t,e)){const e=t.type;if("INPUT"===n&&("button"===e||"submit"===e||"reset"===e))return o;if(!o||"OPTION"===n)return;return a.o}return"OPTION"===n||"SELECT"===n?t.value:"INPUT"===n||"TEXTAREA"===n?o:void 0}const l=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,f=/^[A-Za-z]+:|^\/\//,p=/^["']?data:.*,/i,m=/[^a-z1-6-_]/;function h(t){return t.tagName.toLowerCase()}function g(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`}function v(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}})}var y=n(760);function w(t,e,n,o){if(e===a.$m.HIDDEN)return null;const s=t.getAttribute(n),r=t.tagName;if((0,a.ap)(r,n,s,e,o)){if("IMG"===r){const e=t;if(e.naturalWidth>0)return g(e.naturalWidth,e.naturalHeight);const{width:n,height:o}=t.getBoundingClientRect();return n>0||o>0?g(n,o):a.eT}return"SOURCE"===r?a.eT:a.o}return s?(0,a.ei)(s,1e6):s}function S(t,e,n){if(e===a.$m.HIDDEN)return{};const o={},s=h(t);for(let s=0;s<t.attributes.length;s+=1){const r=t.attributes.item(s).name,i=w(t,e,r,n.scope.configuration);null!==i&&(o[r]=i)}if(t.value&&("textarea"===s||"select"===s||"option"===s||"input"===s)){const n=d(t,e);void 0!==n&&(o.value=n)}if("option"===s){const n=t;n.selected&&!(0,a.Ie)(n,e)?o.selected="":delete o.selected}const r=t;return"input"!==s||"radio"!==r.type&&"checkbox"!==r.type||(r.checked&&!(0,a.Ie)(r,e)?o.checked="":delete o.checked),o}function b(t,e,n){if(e===a.$m.HIDDEN)return{};const o={},s=t.ownerDocument,r=h(t);if("link"===r){const e=Array.from(s.styleSheets).find(e=>e.href===t.href),r=I(e);r&&e&&(n.addMetric("cssText",r.length),o._cssText=r)}if("style"===r&&t.sheet){const e=I(t.sheet);e&&(n.addMetric("cssText",e.length),o._cssText=e)}if("audio"===r||"video"===r){const e=t;o.rr_mediaState=e.paused?"paused":"played"}let i,c;switch(n.kind){case 0:i=Math.round(t.scrollTop),c=Math.round(t.scrollLeft),(i||c)&&n.scope.elementsScrollPositions.set(t,{scrollTop:i,scrollLeft:c});break;case 1:n.scope.elementsScrollPositions.has(t)&&({scrollTop:i,scrollLeft:c}=n.scope.elementsScrollPositions.get(t))}return c&&(o.rr_scrollLeft=c),i&&(o.rr_scrollTop=i),o}function I(t){if(!t)return null;let e;try{e=t.rules||t.cssRules}catch(t){}return e?(n=Array.from(e,(0,y.nr)()?x:N).join(""),o=t.href,n.replace(l,(t,e,n,s,r,i)=>{const a=n||r||i;if(!o||!a||f.test(a)||p.test(a))return t;const c=e||s||"";return`url(${c}${function(t,e){try{return(0,u.c$)(t,e).href}catch(e){return t}}(a,o)}${c})`})):null;var n,o}function x(t){if(function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")){const e=/(\[[\w-]+[^\\])(:[^\]]+\])/g;return t.cssText.replace(e,"$1\\$2")}return N(t)}function N(t){return function(t){return"styleSheet"in t}(t)&&I(t.styleSheet)||t.cssText}function E(t,e,n){switch(t.nodeType){case t.DOCUMENT_NODE:return function(t,e,n){return{type:0,id:n.assignId(t),childNodes:T(t,e,n),adoptedStyleSheets:v(t.adoptedStyleSheets)}}(t,e,n);case t.DOCUMENT_FRAGMENT_NODE:return function(t,e,n){const o=(0,a.p_)(t);return o&&n.scope.shadowRootsController.addShadowRoot(t,n.scope),{type:11,id:n.assignId(t),childNodes:T(t,e,n),isShadowRoot:o,adoptedStyleSheets:o?v(t.adoptedStyleSheets):void 0}}(t,e,n);case t.DOCUMENT_TYPE_NODE:return function(t,e){return{type:1,id:e.assignId(t),name:t.name,publicId:t.publicId,systemId:t.systemId}}(t,n);case t.ELEMENT_NODE:return function(t,e,n){const o=function(t){const e=t.toLowerCase().trim();return m.test(e)?"div":e}(t.tagName),s="svg"===(i=t).tagName||i instanceof SVGElement||void 0,r=(0,a.jR)((0,a.dT)(t),e);var i;if(r===a.$m.HIDDEN){const{width:e,height:r}=t.getBoundingClientRect();return{type:2,id:n.assignId(t),tagName:o,attributes:{rr_width:e+"px",rr_height:r+"px",[a.NT]:a.Wd},childNodes:[],isSVG:s}}if(r===a.$m.IGNORE)return null;const c=n.assignId(t),u=function(t,e,n){return{...S(t,e,n),...b(t,e,n)}}(t,r,n);let d=[];return(0,a.wR)(t)&&"style"!==o&&(d=T(t,r,n)),{type:2,id:c,tagName:o,attributes:u,childNodes:d,isSVG:s}}(t,e,n);case t.TEXT_NODE:return function(t,e,n){const o=(0,a.rf)(t,e);return void 0===o?null:{type:3,id:n.assignId(t),textContent:o}}(t,e,n);case t.CDATA_SECTION_NODE:return function(t,e){return{type:4,id:e.assignId(t),textContent:""}}(t,n);default:return null}}function T(t,e,n){const o=[];return(0,a.wI)(t,t=>{const s=E(t,e,n);s&&o.push(s)}),o}function C(t,e){return E(t,e.scope.configuration.defaultPrivacyLevel,e)}function _(t,e,n){t[e].count+=1,t[e].max=Math.max(t[e].max,n),t[e].sum+=n}function R(t,e,n,o,s){const r=[],i={cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}},a={add(t){r.push(t)},addMetric(t,e){_(i,t,e)},assignId(t){const e=o.nodeIds.assign(t);return a.serializedNodeIds&&a.serializedNodeIds.add(e),e},kind:t,scope:o},u=(0,c.nx)();s(a),_(i,"serializationDuration",(0,c.vk)(u,(0,c.nx)()));for(const t of r)e(t);n(i)}const D=t=>({scale:t.scale,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,pageLeft:t.pageLeft,pageTop:t.pageTop,height:t.height,width:t.width});function L(t,e,n,o,s){R(e,n,o,s,e=>{const{width:n,height:o}=(0,a.pB)();e.add({data:{height:o,href:window.location.href,width:n},type:4,timestamp:t}),e.add({data:{has_focus:document.hasFocus()},type:6,timestamp:t}),e.add({data:{node:C(document,e),initialOffset:{left:(0,a.Gn)(),top:(0,a.zL)()}},type:2,timestamp:t}),window.visualViewport&&e.add({data:D(window.visualViewport),type:8,timestamp:t})})}var M=n(769),O=n(300),k=n(197);function P(t){return!!t.changedTouches}function $(t){return!0===t.composed&&(0,a.XS)(t.target)?t.composedPath()[0]:t.target}function A(t,e){return{data:{source:t,...e},type:3,timestamp:(0,c.nx)()}}function z(t,e){const{throttled:n,cancel:o}=(0,i.n)(n=>{const o=$(n),s=e.nodeIds.get(o);if(void 0===s)return;const r=H(n);if(!r)return;const i={id:s,timeOffset:0,x:r.x,y:r.y};t(A(P(n)?6:1,{positions:[i]}))},50,{trailing:!1}),{stop:s}=(0,k.l)(e.configuration,document,["mousemove","touchmove"],n,{capture:!0,passive:!0});return{stop(){s(),o()}}}function H(t){let{clientX:e,clientY:n}=P(t)?t.changedTouches[0]:t;if(window.visualViewport){const{visualViewportX:t,visualViewportY:o}=((t,e)=>{const n=window.visualViewport,o={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)?(o.layoutViewportX=Math.round(t+n.offsetLeft),o.layoutViewportY=Math.round(e+n.offsetTop)):(o.visualViewportX=Math.round(t-n.offsetLeft),o.visualViewportY=Math.round(e-n.offsetTop)),o):o})(e,n);e=t,n=o}if(Number.isFinite(e)&&Number.isFinite(n))return{x:e,y:n}}const V={pointerup:0,mousedown:1,click:2,contextmenu:3,dblclick:4,focus:5,blur:6,touchstart:7,touchend:9};function F(t,e){return(0,k.l)(e.configuration,document,Object.keys(V),n=>{const o=$(n),s=e.nodeIds.get(o);if(void 0===s||(0,a.PJ)(o,e.configuration.defaultPrivacyLevel)===a.$m.HIDDEN)return;const r=V[n.type];let i;if(6!==r&&5!==r){const t=H(n);if(!t)return;i={id:s,type:r,x:t.x,y:t.y}}else i={id:s,type:r};t({id:e.eventIds.getIdForEvent(n),...A(2,i)})},{capture:!0,passive:!0})}function G(t,e,n){const{throttled:o,cancel:s}=(0,i.n)(t=>{const o=$(t);if(!o)return;const s=n.nodeIds.get(o);if(void 0===s||(0,a.PJ)(o,n.configuration.defaultPrivacyLevel)===a.$m.HIDDEN)return;const r=o===document?{scrollTop:(0,a.zL)(),scrollLeft:(0,a.Gn)()}:{scrollTop:Math.round(o.scrollTop),scrollLeft:Math.round(o.scrollLeft)};n.elementsScrollPositions.set(o,r),e(A(3,{id:s,x:r.scrollLeft,y:r.scrollTop}))},100),{stop:r}=(0,k.q)(n.configuration,t,"scroll",o,{capture:!0,passive:!0});return{stop(){r(),s()}}}function B(t,e){const n=(0,a.g1)(e.configuration).subscribe(e=>{t(A(4,e))});return{stop(){n.unsubscribe()}}}function J(t,e){const n=window.visualViewport;if(!n)return{stop:i.l};const{throttled:o,cancel:s}=(0,i.n)(()=>{t({data:D(n),type:8,timestamp:(0,c.nx)()})},200,{trailing:!1}),{stop:r}=(0,k.l)(e.configuration,n,["resize","scroll"],o,{capture:!0,passive:!0});return{stop(){r(),s()}}}function X(t,e){return(0,k.l)(e.configuration,document,["play","pause"],n=>{const o=$(n);if(!o)return;const s=e.nodeIds.get(o);void 0!==s&&(0,a.PJ)(o,e.configuration.defaultPrivacyLevel)!==a.$m.HIDDEN&&t(A(7,{id:s,type:"play"===n.type?0:1}))},{capture:!0,passive:!0})}var Y=n(801);function U(t,e){function n(t,n){if(!t||!t.ownerNode)return;const o=e.nodeIds.get(t.ownerNode);void 0!==o&&n(o)}const o=[(0,Y.H)(CSSStyleSheet.prototype,"insertRule",({target:e,parameters:[o,s]})=>{n(e,e=>t(A(8,{id:e,adds:[{rule:o,index:s}]})))}),(0,Y.H)(CSSStyleSheet.prototype,"deleteRule",({target:e,parameters:[o]})=>{n(e,e=>t(A(8,{id:e,removes:[{index:o}]})))})];function s(e){o.push((0,Y.H)(e.prototype,"insertRule",({target:e,parameters:[o,s]})=>{n(e.parentStyleSheet,n=>{const r=W(e);r&&(r.push(s||0),t(A(8,{id:n,adds:[{rule:o,index:r}]})))})}),(0,Y.H)(e.prototype,"deleteRule",({target:e,parameters:[o]})=>{n(e.parentStyleSheet,n=>{const s=W(e);s&&(s.push(o),t(A(8,{id:n,removes:[{index:s}]})))})}))}return"undefined"!=typeof CSSGroupingRule?s(CSSGroupingRule):(s(CSSMediaRule),s(CSSSupportsRule)),{stop(){o.forEach(t=>t.stop())}}}function W(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 o=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return e.unshift(o),e}function q(t,e){return(0,k.l)(e.configuration,window,["focus","blur"],()=>{t({data:{has_focus:document.hasFocus()},type:6,timestamp:(0,c.nx)()})})}function j(t,e,n){const o=t.subscribe(12,t=>{var o,s;t.rawRumEvent.type===a.bb.ACTION&&t.rawRumEvent.action.type===a.X2.CLICK&&(null===(s=null===(o=t.rawRumEvent.action.frustration)||void 0===o?void 0:o.type)||void 0===s?void 0:s.length)&&"events"in t.domainContext&&t.domainContext.events&&t.domainContext.events.length&&e({timestamp:t.rawRumEvent.date,type:9,data:{frustrationTypes:t.rawRumEvent.action.frustration.type,recordIds:t.domainContext.events.map(t=>n.eventIds.getIdForEvent(t))}})});return{stop(){o.unsubscribe()}}}function K(t,e,n){const o=t.subscribe(5,()=>{n(),e({timestamp:(0,c.nx)(),type:7})});return{stop(){o.unsubscribe()}}}function Z(t,e,n){const o=n.configuration.defaultPrivacyLevel,s=new WeakMap,r=t!==document,{stop:c}=(0,k.l)(n.configuration,t,r?["change"]:["input","change"],t=>{const e=$(t);(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)&&l(e)},{capture:!0,passive:!0});let u;if(r)u=i.l;else{const t=[(0,Y.t)(HTMLInputElement.prototype,"value",l),(0,Y.t)(HTMLInputElement.prototype,"checked",l),(0,Y.t)(HTMLSelectElement.prototype,"value",l),(0,Y.t)(HTMLTextAreaElement.prototype,"value",l),(0,Y.t)(HTMLSelectElement.prototype,"selectedIndex",l)];u=()=>{t.forEach(t=>t.stop())}}return{stop(){u(),c()}};function l(t){const e=(0,a.PJ)(t,o);if(e===a.$m.HIDDEN)return;const n=t.type;let s;if("radio"===n||"checkbox"===n){if((0,a.Ie)(t,e))return;s={isChecked:t.checked}}else{const n=d(t,e);if(void 0===n)return;s={text:n}}f(t,s);const r=t.name;"radio"===n&&r&&t.checked&&document.querySelectorAll(`input[type="radio"][name="${CSS.escape(r)}"]`).forEach(e=>{e!==t&&f(e,{isChecked:!1})})}function f(t,o){const r=n.nodeIds.get(t);if(void 0===r)return;const i=s.get(t);i&&i.text===o.text&&i.isChecked===o.isChecked||(s.set(t,o),e(A(5,{id:r,...o})))}}var Q=n(315),tt=n(981);function et(t,e,n,o){const s=(0,a.W3)();if(!s)return{stop:i.l,flush:i.l};const r=function(){let t=i.l,s=[];function r(){var r;t(),r=s,R(2,e,n,o,t=>function(t,e){const n=new Map;t.filter(t=>"childList"===t.type).forEach(t=>{t.removedNodes.forEach(t=>{nt(t,e.scope.shadowRootsController.removeShadowRoot)})});const o=t.filter(t=>t.target.isConnected&&e.scope.nodeIds.areAssignedForNodeAndAncestors(t.target)&&(0,a.PJ)(t.target,e.scope.configuration.defaultPrivacyLevel,n)!==a.$m.HIDDEN),{adds:s,removes:r,hasBeenSerialized:i}=function(t,e,n){const o=new Set,s=new Map;for(const e of t)e.addedNodes.forEach(t=>{o.add(t)}),e.removedNodes.forEach(t=>{o.has(t)||s.set(t,e.target),o.delete(t)});const r=Array.from(o);r.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}),n.serializedNodeIds=new Set;const i=[];for(const t of r){if(u(t))continue;const o=(0,a.PJ)(t.parentNode,n.scope.configuration.defaultPrivacyLevel,e);if(o===a.$m.HIDDEN||o===a.$m.IGNORE)continue;const s=E(t,o,n);if(!s)continue;const r=(0,a.$4)(t);i.push({nextId:d(t),parentId:n.scope.nodeIds.get(r),node:s})}const c=[];return s.forEach((t,e)=>{const o=n.scope.nodeIds.get(t),s=n.scope.nodeIds.get(e);void 0!==o&&void 0!==s&&c.push({parentId:o,id:s})}),{adds:i,removes:c,hasBeenSerialized:u};function u(t){var e;const o=n.scope.nodeIds.get(t);return void 0!==o&&(null===(e=n.serializedNodeIds)||void 0===e?void 0:e.has(o))}function d(t){let e=t.nextSibling;for(;e;){const t=n.scope.nodeIds.get(e);if(void 0!==t)return t;e=e.nextSibling}return null}}(o.filter(t=>"childList"===t.type),n,e),c=function(t,e,n){var o;const s=[],r=new Set,i=t.filter(t=>!r.has(t.target)&&(r.add(t.target),!0));for(const t of i){if(t.target.textContent===t.oldValue)continue;const r=n.scope.nodeIds.get(t.target);if(void 0===r)continue;const i=(0,a.PJ)((0,a.$4)(t.target),n.scope.configuration.defaultPrivacyLevel,e);i!==a.$m.HIDDEN&&i!==a.$m.IGNORE&&s.push({id:r,value:null!==(o=(0,a.rf)(t.target,i))&&void 0!==o?o:null})}return s}(o.filter(t=>"characterData"===t.type&&!i(t.target)),n,e),u=function(t,e,n){const o=[],s=new Map,r=t.filter(t=>{const e=s.get(t.target);return!(e&&e.has(t.attributeName)||(e?e.add(t.attributeName):s.set(t.target,new Set([t.attributeName])),0))}),i=new Map;for(const t of r){if(t.target.getAttribute(t.attributeName)===t.oldValue)continue;const s=n.scope.nodeIds.get(t.target);if(void 0===s)continue;const r=(0,a.PJ)(t.target,n.scope.configuration.defaultPrivacyLevel,e),c=w(t.target,r,t.attributeName,n.scope.configuration);let u;if("value"===t.attributeName){const e=d(t.target,r);if(void 0===e)continue;u=e}else u="string"==typeof c?c:null;let l=i.get(t.target);l||(l={id:s,attributes:{}},o.push(l),i.set(t.target,l)),l.attributes[t.attributeName]=u}return o}(o.filter(t=>"attributes"===t.type&&!i(t.target)),n,e);(c.length||u.length||r.length||s.length)&&e.add(A(0,{adds:s,removes:r,texts:c,attributes:u}))}(r.concat(c.takeRecords()),t)),s=[]}const{throttled:u,cancel:l}=(0,i.n)(r,16,{leading:!1});return{addMutations(e){0===s.length&&(t=(0,tt.BB)(u,{timeout:100})),s.push(...e)},flush:r,stop(){t(),l()}}}(),c=new s((0,Q.dm)(r.addMutations));return c.observe(t,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop(){c.disconnect(),r.stop()},flush(){r.flush()}}}function nt(t,e){(0,a.XS)(t)&&e(t.shadowRoot),(0,a.wI)(t,t=>nt(t,e))}var ot=n(887),st=n(636);function rt({context:t,creationReason:e,encoder:n}){let o=0;const s=t.view.id,r={start:1/0,end:-1/0,creation_reason:e,records_count:0,has_full_snapshot:!1,index_in_view:O.K_(s),source:"browser",...t},i={cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}};return O.H5(s),{addRecord(t,e){r.start=Math.min(r.start,t.timestamp),r.end=Math.max(r.end,t.timestamp),r.records_count+=1,r.has_full_snapshot||(r.has_full_snapshot=2===t.type);const s=n.isEmpty?'{"records":[':",";n.write(s+JSON.stringify(t),t=>{o+=t,e(o)})},addStats(t){!function(t,e){for(const n of["cssText","serializationDuration"])t[n].count+=e[n].count,t[n].max=Math.max(t[n].max,e[n].max),t[n].sum+=e[n].sum}(i,t)},flush(t){if(n.isEmpty)throw Error("Empty segment flushed");n.write(`],${JSON.stringify(r).slice(1)}\n`),n.finish(e=>{O.L7(r.view.id,e.rawBytesCount),t(r,i,e)})}}}const it=5*c.OY;function at(t,e,n,u,d,l,f){const p=[],m=f||(0,s.sA)([e.sessionReplayEndpointBuilder],e=>{t.notify(14,{error:e}),(0,o.A2)("Error reported to customer",{"error.message":e.message})},6e4);let h,g;if((0,r.d0)())({addRecord:h}=function(t){const e=(0,r.Y9)();return{addRecord(n){const o=t.findView();e.send("record",n,o.id)}}}(u)),g=i.l;else{const s=function(t,e,n,o,s,r){return function(t,s,r,i){let a={status:0,nextSegmentCreationReason:"init"};const{unsubscribe:c}=t.subscribe(2,()=>{d("view_change")}),{unsubscribe:u}=t.subscribe(11,t=>{d(t.reason)});function d(t){1===a.status&&(a.segment.flush((e,n,o)=>{const s=function(t,e,n,o){const s=new FormData;s.append("segment",new Blob([t],{type:"application/octet-stream"}),`${e.session.id}-${e.start}`);const r={raw_segment_size:o,compressed_segment_size:t.byteLength,...e},i=JSON.stringify(r);return s.append("event",new Blob([i],{type:"application/json"})),{data:s,bytesCount:t.byteLength,cssText:n.cssText,isFullSnapshot:0===e.index_in_view,rawSize:o,recordCount:e.records_count,serializationDuration:n.serializationDuration}}(o.output,e,n,o.rawBytesCount);(0,ot.Kp)(t)?r.sendOnExit(s):r.send(s)}),(0,st.DJ)(a.expirationTimeoutId)),a="stop"!==t?{status:0,nextSegmentCreationReason:t}:{status:2}}return{addRecord(t){if(2!==a.status){if(0===a.status){const t=function(t,e,n){const o=e.findTrackedSession(),s=n.findView();if(o&&s)return{application:{id:t},session:{id:o.id},view:{id:s.id}}}(e.applicationId,n,o);if(!t)return;a={status:1,segment:rt({encoder:i,context:t,creationReason:a.nextSegmentCreationReason}),expirationTimeoutId:(0,st.wg)(()=>{d("segment_duration_limit")},it)}}a.segment.addRecord(t,t=>{t>6e4&&d("segment_bytes_limit")})}},addStats(t){1===a.status&&a.segment.addStats(t)},stop(){d("stop"),c(),u()}}}(t,0,s,r)}(t,e,n,u,m,d);h=s.addRecord,g=s.addStats,p.push(s.stop);const r=function(t,e){if(!t.metricsEnabled)return{stop:i.l};const{unsubscribe:n}=e.subscribe(t=>{if("failure"===t.type||"queue-full"===t.type||"success"===t.type&&t.payload.isFullSnapshot){const r=(e=t.type,n=t.bandwidth,{cssText:{count:(s=t.payload).cssText.count,max:s.cssText.max,sum:s.cssText.sum},isFullSnapshot:s.isFullSnapshot,ongoingRequests:{count:n.ongoingRequestCount,totalSize:n.ongoingByteCount},recordCount:s.recordCount,result:e,serializationDuration:{count:s.serializationDuration.count,max:s.serializationDuration.max,sum:s.serializationDuration.sum},size:{compressed:s.bytesCount,raw:s.rawSize}});(0,o.Gk)("Segment network request metrics",{metrics:r})}var e,n,s});return{stop:n}}(l,m.observable);p.push(r.stop)}const{stop:v}=function(t){const{emitRecord:e,emitStats:n,configuration:o,lifeCycle:s}=t;if(!e||!n)throw Error("emit functions are required");const r=n=>{e(n),(0,M.b)("record",{record:n});const o=t.viewHistory.findView();O.$1(o.id)},i=((t,e)=>{const n=new Map;return{addShadowRoot(o,s){if(n.has(o))return;const r=et(o,t,e,s),i=Z(o,t,s),a=G(o,t,s);n.set(o,{flush:()=>r.flush(),stop(){r.stop(),i.stop(),a.stop()}})},removeShadowRoot(t){const e=n.get(t);e&&(e.stop(),n.delete(t))},stop(){n.forEach(({stop:t})=>t())},flush(){n.forEach(({flush:t})=>t())}}})(r,n),u=function(t,e,n,o,s){return{configuration:t,elementsScrollPositions:e,eventIds:n,nodeIds:o,shadowRootsController:s}}(o,function(){const t=new WeakMap;return{set(e,n){(e!==document||document.scrollingElement)&&t.set(e===document?document.scrollingElement:e,n)},get(e){return t.get(e)},has(e){return t.has(e)}}}(),function(){const t=new WeakMap;let e=1;return{getIdForEvent(n){return t.has(n)||t.set(n,e++),t.get(n)}}}(),function(){const t=new WeakMap;let e=0;const n=e=>t.get(e);return{assign(o){let s=n(o);return void 0===s&&(s=e++,t.set(o,s)),s},get:n,areAssignedForNodeAndAncestors(t){let e=t;for(;e;){if(void 0===n(e)&&!(0,a.p_)(e))return!1;e=(0,a.$4)(e)}return!0}}}(),i),{stop:d}=function(t,e,n,o,s){L((0,c.nx)(),0,e,n,s);const{unsubscribe:r}=t.subscribe(2,t=>{o(),L(t.startClocks.timeStamp,1,e,n,s)});return{stop:r}}(s,r,n,l,u);function l(){i.flush(),f.flush()}const f=et(document,r,n,u),p=[f,z(r,u),F(r,u),G(document,r,u),B(r,u),Z(document,r,u),X(r,u),U(r,u),q(r,u),J(r,u),j(s,r,u),K(s,r,l)];return{stop(){i.stop(),p.forEach(t=>t.stop()),d()},flushMutations:l,shadowRootsController:i}}({emitRecord:h,emitStats:g,configuration:e,lifeCycle:t,viewHistory:u});return p.push(v),{stop(){p.forEach(t=>t())}}}}}]);
@@ -1,4 +0,0 @@
1
- /**
2
- * Test for Browser features used while recording
3
- */
4
- export declare function isBrowserSupported(): boolean;
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isBrowserSupported = isBrowserSupported;
4
- /**
5
- * Test for Browser features used while recording
6
- */
7
- function isBrowserSupported() {
8
- return (
9
- // Array.from is a bit less supported by browsers than CSSSupportsRule, but has higher chances
10
- // to be polyfilled. Test for both to be more confident. We could add more things if we find out
11
- // this test is not sufficient.
12
- typeof Array.from === 'function' &&
13
- typeof CSSSupportsRule === 'function' &&
14
- typeof URL.createObjectURL === 'function' &&
15
- 'forEach' in NodeList.prototype);
16
- }
17
- //# sourceMappingURL=isBrowserSupported.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"isBrowserSupported.js","sourceRoot":"","sources":["../../src/boot/isBrowserSupported.ts"],"names":[],"mappings":";;AAGA,gDAUC;AAbD;;GAEG;AACH,SAAgB,kBAAkB;IAChC,OAAO;IACL,8FAA8F;IAC9F,gGAAgG;IAChG,+BAA+B;IAC/B,OAAO,KAAK,CAAC,IAAI,KAAK,UAAU;QAChC,OAAO,eAAe,KAAK,UAAU;QACrC,OAAO,GAAG,CAAC,eAAe,KAAK,UAAU;QACzC,SAAS,IAAI,QAAQ,CAAC,SAAS,CAChC,CAAA;AACH,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { HttpRequest, DeflateEncoder, Telemetry } from '@kubesense/kubesense-browser-core';
2
- import type { LifeCycle, ViewHistory, RumConfiguration, RumSessionManager } from '@kubesense/kubesense-browser-rum-core';
3
- import type { ReplayPayload } from '../domain/segmentCollection';
4
- export declare function startRecording(lifeCycle: LifeCycle, configuration: RumConfiguration, sessionManager: RumSessionManager, viewHistory: ViewHistory, encoder: DeflateEncoder, telemetry: Telemetry, httpRequest?: HttpRequest<ReplayPayload>): {
5
- stop: () => void;
6
- };