@elenjical-ai/browser 0.0.0-stage → 10.76.2

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 (695) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +57 -2
  3. package/build/npm/cjs/dev/client.js +77 -0
  4. package/build/npm/cjs/dev/client.js.map +1 -0
  5. package/build/npm/cjs/dev/debug-build.js +6 -0
  6. package/build/npm/cjs/dev/debug-build.js.map +1 -0
  7. package/build/npm/cjs/dev/diagnose-sdk.js +34 -0
  8. package/build/npm/cjs/dev/diagnose-sdk.js.map +1 -0
  9. package/build/npm/cjs/dev/eventbuilder.js +231 -0
  10. package/build/npm/cjs/dev/eventbuilder.js.map +1 -0
  11. package/build/npm/cjs/dev/feedbackAsync.js +11 -0
  12. package/build/npm/cjs/dev/feedbackAsync.js.map +1 -0
  13. package/build/npm/cjs/dev/feedbackSync.js +11 -0
  14. package/build/npm/cjs/dev/feedbackSync.js.map +1 -0
  15. package/build/npm/cjs/dev/helpers.js +108 -0
  16. package/build/npm/cjs/dev/helpers.js.map +1 -0
  17. package/build/npm/cjs/dev/index.js +208 -0
  18. package/build/npm/cjs/dev/index.js.map +1 -0
  19. package/build/npm/cjs/dev/integrations/breadcrumbs.js +249 -0
  20. package/build/npm/cjs/dev/integrations/breadcrumbs.js.map +1 -0
  21. package/build/npm/cjs/dev/integrations/browserapierrors.js +167 -0
  22. package/build/npm/cjs/dev/integrations/browserapierrors.js.map +1 -0
  23. package/build/npm/cjs/dev/integrations/browsersession.js +50 -0
  24. package/build/npm/cjs/dev/integrations/browsersession.js.map +1 -0
  25. package/build/npm/cjs/dev/integrations/contextlines.js +53 -0
  26. package/build/npm/cjs/dev/integrations/contextlines.js.map +1 -0
  27. package/build/npm/cjs/dev/integrations/culturecontext.js +50 -0
  28. package/build/npm/cjs/dev/integrations/culturecontext.js.map +1 -0
  29. package/build/npm/cjs/dev/integrations/featureFlags/growthbook/integration.js +8 -0
  30. package/build/npm/cjs/dev/integrations/featureFlags/growthbook/integration.js.map +1 -0
  31. package/build/npm/cjs/dev/integrations/featureFlags/launchdarkly/integration.js +30 -0
  32. package/build/npm/cjs/dev/integrations/featureFlags/launchdarkly/integration.js.map +1 -0
  33. package/build/npm/cjs/dev/integrations/featureFlags/openfeature/integration.js +32 -0
  34. package/build/npm/cjs/dev/integrations/featureFlags/openfeature/integration.js.map +1 -0
  35. package/build/npm/cjs/dev/integrations/featureFlags/statsig/integration.js +23 -0
  36. package/build/npm/cjs/dev/integrations/featureFlags/statsig/integration.js.map +1 -0
  37. package/build/npm/cjs/dev/integrations/featureFlags/unleash/integration.js +37 -0
  38. package/build/npm/cjs/dev/integrations/featureFlags/unleash/integration.js.map +1 -0
  39. package/build/npm/cjs/dev/integrations/fetchStreamPerformance.js +60 -0
  40. package/build/npm/cjs/dev/integrations/fetchStreamPerformance.js.map +1 -0
  41. package/build/npm/cjs/dev/integrations/globalhandlers.js +143 -0
  42. package/build/npm/cjs/dev/integrations/globalhandlers.js.map +1 -0
  43. package/build/npm/cjs/dev/integrations/graphqlClient.js +148 -0
  44. package/build/npm/cjs/dev/integrations/graphqlClient.js.map +1 -0
  45. package/build/npm/cjs/dev/integrations/httpclient.js +250 -0
  46. package/build/npm/cjs/dev/integrations/httpclient.js.map +1 -0
  47. package/build/npm/cjs/dev/integrations/httpcontext.js +47 -0
  48. package/build/npm/cjs/dev/integrations/httpcontext.js.map +1 -0
  49. package/build/npm/cjs/dev/integrations/linkederrors.js +31 -0
  50. package/build/npm/cjs/dev/integrations/linkederrors.js.map +1 -0
  51. package/build/npm/cjs/dev/integrations/reportingobserver.js +60 -0
  52. package/build/npm/cjs/dev/integrations/reportingobserver.js.map +1 -0
  53. package/build/npm/cjs/dev/integrations/spanstreaming.js +49 -0
  54. package/build/npm/cjs/dev/integrations/spanstreaming.js.map +1 -0
  55. package/build/npm/cjs/dev/integrations/spotlight.js +61 -0
  56. package/build/npm/cjs/dev/integrations/spotlight.js.map +1 -0
  57. package/build/npm/cjs/dev/integrations/view-hierarchy.js +74 -0
  58. package/build/npm/cjs/dev/integrations/view-hierarchy.js.map +1 -0
  59. package/build/npm/cjs/dev/integrations/webVitals.js +62 -0
  60. package/build/npm/cjs/dev/integrations/webVitals.js.map +1 -0
  61. package/build/npm/cjs/dev/integrations/webWorker.js +133 -0
  62. package/build/npm/cjs/dev/integrations/webWorker.js.map +1 -0
  63. package/build/npm/cjs/dev/normalizeStringifyValue.js +27 -0
  64. package/build/npm/cjs/dev/normalizeStringifyValue.js.map +1 -0
  65. package/build/npm/cjs/dev/profiling/UIProfiler.js +306 -0
  66. package/build/npm/cjs/dev/profiling/UIProfiler.js.map +1 -0
  67. package/build/npm/cjs/dev/profiling/index.js +38 -0
  68. package/build/npm/cjs/dev/profiling/index.js.map +1 -0
  69. package/build/npm/cjs/dev/profiling/integration.js +120 -0
  70. package/build/npm/cjs/dev/profiling/integration.js.map +1 -0
  71. package/build/npm/cjs/dev/profiling/startProfileForSpan.js +91 -0
  72. package/build/npm/cjs/dev/profiling/startProfileForSpan.js.map +1 -0
  73. package/build/npm/cjs/dev/profiling/utils.js +498 -0
  74. package/build/npm/cjs/dev/profiling/utils.js.map +1 -0
  75. package/build/npm/cjs/dev/report-dialog.js +53 -0
  76. package/build/npm/cjs/dev/report-dialog.js.map +1 -0
  77. package/build/npm/cjs/dev/sdk.js +70 -0
  78. package/build/npm/cjs/dev/sdk.js.map +1 -0
  79. package/build/npm/cjs/dev/stack-parsers.js +118 -0
  80. package/build/npm/cjs/dev/stack-parsers.js.map +1 -0
  81. package/build/npm/cjs/dev/tracing/backgroundtab.js +34 -0
  82. package/build/npm/cjs/dev/tracing/backgroundtab.js.map +1 -0
  83. package/build/npm/cjs/dev/tracing/browserTracingIntegration.js +437 -0
  84. package/build/npm/cjs/dev/tracing/browserTracingIntegration.js.map +1 -0
  85. package/build/npm/cjs/dev/tracing/linkedTraces.js +140 -0
  86. package/build/npm/cjs/dev/tracing/linkedTraces.js.map +1 -0
  87. package/build/npm/cjs/dev/tracing/reportPageLoaded.js +10 -0
  88. package/build/npm/cjs/dev/tracing/reportPageLoaded.js.map +1 -0
  89. package/build/npm/cjs/dev/tracing/request.js +236 -0
  90. package/build/npm/cjs/dev/tracing/request.js.map +1 -0
  91. package/build/npm/cjs/dev/tracing/setActiveSpan.js +21 -0
  92. package/build/npm/cjs/dev/tracing/setActiveSpan.js.map +1 -0
  93. package/build/npm/cjs/dev/tracing/utils.js +31 -0
  94. package/build/npm/cjs/dev/tracing/utils.js.map +1 -0
  95. package/build/npm/cjs/dev/transports/fetch.js +58 -0
  96. package/build/npm/cjs/dev/transports/fetch.js.map +1 -0
  97. package/build/npm/cjs/dev/transports/offline.js +111 -0
  98. package/build/npm/cjs/dev/transports/offline.js.map +1 -0
  99. package/build/npm/cjs/dev/userfeedback.js +32 -0
  100. package/build/npm/cjs/dev/userfeedback.js.map +1 -0
  101. package/build/npm/cjs/dev/utils/detectBrowserExtension.js +38 -0
  102. package/build/npm/cjs/dev/utils/detectBrowserExtension.js.map +1 -0
  103. package/build/npm/cjs/dev/utils/lazyLoadIntegration.js +92 -0
  104. package/build/npm/cjs/dev/utils/lazyLoadIntegration.js.map +1 -0
  105. package/build/npm/cjs/prod/client.js +77 -0
  106. package/build/npm/cjs/prod/client.js.map +1 -0
  107. package/build/npm/cjs/prod/debug-build.js +6 -0
  108. package/build/npm/cjs/prod/debug-build.js.map +1 -0
  109. package/build/npm/cjs/prod/diagnose-sdk.js +34 -0
  110. package/build/npm/cjs/prod/diagnose-sdk.js.map +1 -0
  111. package/build/npm/cjs/prod/eventbuilder.js +231 -0
  112. package/build/npm/cjs/prod/eventbuilder.js.map +1 -0
  113. package/build/npm/cjs/prod/feedbackAsync.js +11 -0
  114. package/build/npm/cjs/prod/feedbackAsync.js.map +1 -0
  115. package/build/npm/cjs/prod/feedbackSync.js +11 -0
  116. package/build/npm/cjs/prod/feedbackSync.js.map +1 -0
  117. package/build/npm/cjs/prod/helpers.js +108 -0
  118. package/build/npm/cjs/prod/helpers.js.map +1 -0
  119. package/build/npm/cjs/prod/index.js +208 -0
  120. package/build/npm/cjs/prod/index.js.map +1 -0
  121. package/build/npm/cjs/prod/integrations/breadcrumbs.js +249 -0
  122. package/build/npm/cjs/prod/integrations/breadcrumbs.js.map +1 -0
  123. package/build/npm/cjs/prod/integrations/browserapierrors.js +167 -0
  124. package/build/npm/cjs/prod/integrations/browserapierrors.js.map +1 -0
  125. package/build/npm/cjs/prod/integrations/browsersession.js +50 -0
  126. package/build/npm/cjs/prod/integrations/browsersession.js.map +1 -0
  127. package/build/npm/cjs/prod/integrations/contextlines.js +53 -0
  128. package/build/npm/cjs/prod/integrations/contextlines.js.map +1 -0
  129. package/build/npm/cjs/prod/integrations/culturecontext.js +50 -0
  130. package/build/npm/cjs/prod/integrations/culturecontext.js.map +1 -0
  131. package/build/npm/cjs/prod/integrations/featureFlags/growthbook/integration.js +8 -0
  132. package/build/npm/cjs/prod/integrations/featureFlags/growthbook/integration.js.map +1 -0
  133. package/build/npm/cjs/prod/integrations/featureFlags/launchdarkly/integration.js +30 -0
  134. package/build/npm/cjs/prod/integrations/featureFlags/launchdarkly/integration.js.map +1 -0
  135. package/build/npm/cjs/prod/integrations/featureFlags/openfeature/integration.js +32 -0
  136. package/build/npm/cjs/prod/integrations/featureFlags/openfeature/integration.js.map +1 -0
  137. package/build/npm/cjs/prod/integrations/featureFlags/statsig/integration.js +23 -0
  138. package/build/npm/cjs/prod/integrations/featureFlags/statsig/integration.js.map +1 -0
  139. package/build/npm/cjs/prod/integrations/featureFlags/unleash/integration.js +37 -0
  140. package/build/npm/cjs/prod/integrations/featureFlags/unleash/integration.js.map +1 -0
  141. package/build/npm/cjs/prod/integrations/fetchStreamPerformance.js +60 -0
  142. package/build/npm/cjs/prod/integrations/fetchStreamPerformance.js.map +1 -0
  143. package/build/npm/cjs/prod/integrations/globalhandlers.js +143 -0
  144. package/build/npm/cjs/prod/integrations/globalhandlers.js.map +1 -0
  145. package/build/npm/cjs/prod/integrations/graphqlClient.js +148 -0
  146. package/build/npm/cjs/prod/integrations/graphqlClient.js.map +1 -0
  147. package/build/npm/cjs/prod/integrations/httpclient.js +250 -0
  148. package/build/npm/cjs/prod/integrations/httpclient.js.map +1 -0
  149. package/build/npm/cjs/prod/integrations/httpcontext.js +47 -0
  150. package/build/npm/cjs/prod/integrations/httpcontext.js.map +1 -0
  151. package/build/npm/cjs/prod/integrations/linkederrors.js +31 -0
  152. package/build/npm/cjs/prod/integrations/linkederrors.js.map +1 -0
  153. package/build/npm/cjs/prod/integrations/reportingobserver.js +60 -0
  154. package/build/npm/cjs/prod/integrations/reportingobserver.js.map +1 -0
  155. package/build/npm/cjs/prod/integrations/spanstreaming.js +49 -0
  156. package/build/npm/cjs/prod/integrations/spanstreaming.js.map +1 -0
  157. package/build/npm/cjs/prod/integrations/spotlight.js +61 -0
  158. package/build/npm/cjs/prod/integrations/spotlight.js.map +1 -0
  159. package/build/npm/cjs/prod/integrations/view-hierarchy.js +74 -0
  160. package/build/npm/cjs/prod/integrations/view-hierarchy.js.map +1 -0
  161. package/build/npm/cjs/prod/integrations/webVitals.js +62 -0
  162. package/build/npm/cjs/prod/integrations/webVitals.js.map +1 -0
  163. package/build/npm/cjs/prod/integrations/webWorker.js +133 -0
  164. package/build/npm/cjs/prod/integrations/webWorker.js.map +1 -0
  165. package/build/npm/cjs/prod/normalizeStringifyValue.js +27 -0
  166. package/build/npm/cjs/prod/normalizeStringifyValue.js.map +1 -0
  167. package/build/npm/cjs/prod/profiling/UIProfiler.js +306 -0
  168. package/build/npm/cjs/prod/profiling/UIProfiler.js.map +1 -0
  169. package/build/npm/cjs/prod/profiling/index.js +38 -0
  170. package/build/npm/cjs/prod/profiling/index.js.map +1 -0
  171. package/build/npm/cjs/prod/profiling/integration.js +120 -0
  172. package/build/npm/cjs/prod/profiling/integration.js.map +1 -0
  173. package/build/npm/cjs/prod/profiling/startProfileForSpan.js +91 -0
  174. package/build/npm/cjs/prod/profiling/startProfileForSpan.js.map +1 -0
  175. package/build/npm/cjs/prod/profiling/utils.js +498 -0
  176. package/build/npm/cjs/prod/profiling/utils.js.map +1 -0
  177. package/build/npm/cjs/prod/report-dialog.js +53 -0
  178. package/build/npm/cjs/prod/report-dialog.js.map +1 -0
  179. package/build/npm/cjs/prod/sdk.js +60 -0
  180. package/build/npm/cjs/prod/sdk.js.map +1 -0
  181. package/build/npm/cjs/prod/stack-parsers.js +118 -0
  182. package/build/npm/cjs/prod/stack-parsers.js.map +1 -0
  183. package/build/npm/cjs/prod/tracing/backgroundtab.js +34 -0
  184. package/build/npm/cjs/prod/tracing/backgroundtab.js.map +1 -0
  185. package/build/npm/cjs/prod/tracing/browserTracingIntegration.js +437 -0
  186. package/build/npm/cjs/prod/tracing/browserTracingIntegration.js.map +1 -0
  187. package/build/npm/cjs/prod/tracing/linkedTraces.js +139 -0
  188. package/build/npm/cjs/prod/tracing/linkedTraces.js.map +1 -0
  189. package/build/npm/cjs/prod/tracing/reportPageLoaded.js +10 -0
  190. package/build/npm/cjs/prod/tracing/reportPageLoaded.js.map +1 -0
  191. package/build/npm/cjs/prod/tracing/request.js +236 -0
  192. package/build/npm/cjs/prod/tracing/request.js.map +1 -0
  193. package/build/npm/cjs/prod/tracing/setActiveSpan.js +21 -0
  194. package/build/npm/cjs/prod/tracing/setActiveSpan.js.map +1 -0
  195. package/build/npm/cjs/prod/tracing/utils.js +31 -0
  196. package/build/npm/cjs/prod/tracing/utils.js.map +1 -0
  197. package/build/npm/cjs/prod/transports/fetch.js +58 -0
  198. package/build/npm/cjs/prod/transports/fetch.js.map +1 -0
  199. package/build/npm/cjs/prod/transports/offline.js +111 -0
  200. package/build/npm/cjs/prod/transports/offline.js.map +1 -0
  201. package/build/npm/cjs/prod/userfeedback.js +32 -0
  202. package/build/npm/cjs/prod/userfeedback.js.map +1 -0
  203. package/build/npm/cjs/prod/utils/detectBrowserExtension.js +38 -0
  204. package/build/npm/cjs/prod/utils/detectBrowserExtension.js.map +1 -0
  205. package/build/npm/cjs/prod/utils/lazyLoadIntegration.js +92 -0
  206. package/build/npm/cjs/prod/utils/lazyLoadIntegration.js.map +1 -0
  207. package/build/npm/esm/dev/client.js +74 -0
  208. package/build/npm/esm/dev/client.js.map +1 -0
  209. package/build/npm/esm/dev/debug-build.js +4 -0
  210. package/build/npm/esm/dev/debug-build.js.map +1 -0
  211. package/build/npm/esm/dev/diagnose-sdk.js +32 -0
  212. package/build/npm/esm/dev/diagnose-sdk.js.map +1 -0
  213. package/build/npm/esm/dev/eventbuilder.js +224 -0
  214. package/build/npm/esm/dev/eventbuilder.js.map +1 -0
  215. package/build/npm/esm/dev/feedbackAsync.js +9 -0
  216. package/build/npm/esm/dev/feedbackAsync.js.map +1 -0
  217. package/build/npm/esm/dev/feedbackSync.js +9 -0
  218. package/build/npm/esm/dev/feedbackSync.js.map +1 -0
  219. package/build/npm/esm/dev/helpers.js +102 -0
  220. package/build/npm/esm/dev/helpers.js.map +1 -0
  221. package/build/npm/esm/dev/index.js +48 -0
  222. package/build/npm/esm/dev/index.js.map +1 -0
  223. package/build/npm/esm/dev/integrations/breadcrumbs.js +247 -0
  224. package/build/npm/esm/dev/integrations/breadcrumbs.js.map +1 -0
  225. package/build/npm/esm/dev/integrations/browserapierrors.js +165 -0
  226. package/build/npm/esm/dev/integrations/browserapierrors.js.map +1 -0
  227. package/build/npm/esm/dev/integrations/browsersession.js +48 -0
  228. package/build/npm/esm/dev/integrations/browsersession.js.map +1 -0
  229. package/build/npm/esm/dev/integrations/contextlines.js +50 -0
  230. package/build/npm/esm/dev/integrations/contextlines.js.map +1 -0
  231. package/build/npm/esm/dev/integrations/culturecontext.js +48 -0
  232. package/build/npm/esm/dev/integrations/culturecontext.js.map +1 -0
  233. package/build/npm/esm/dev/integrations/featureFlags/growthbook/integration.js +6 -0
  234. package/build/npm/esm/dev/integrations/featureFlags/growthbook/integration.js.map +1 -0
  235. package/build/npm/esm/dev/integrations/featureFlags/launchdarkly/integration.js +27 -0
  236. package/build/npm/esm/dev/integrations/featureFlags/launchdarkly/integration.js.map +1 -0
  237. package/build/npm/esm/dev/integrations/featureFlags/openfeature/integration.js +29 -0
  238. package/build/npm/esm/dev/integrations/featureFlags/openfeature/integration.js.map +1 -0
  239. package/build/npm/esm/dev/integrations/featureFlags/statsig/integration.js +21 -0
  240. package/build/npm/esm/dev/integrations/featureFlags/statsig/integration.js.map +1 -0
  241. package/build/npm/esm/dev/integrations/featureFlags/unleash/integration.js +35 -0
  242. package/build/npm/esm/dev/integrations/featureFlags/unleash/integration.js.map +1 -0
  243. package/build/npm/esm/dev/integrations/fetchStreamPerformance.js +58 -0
  244. package/build/npm/esm/dev/integrations/fetchStreamPerformance.js.map +1 -0
  245. package/build/npm/esm/dev/integrations/globalhandlers.js +139 -0
  246. package/build/npm/esm/dev/integrations/globalhandlers.js.map +1 -0
  247. package/build/npm/esm/dev/integrations/graphqlClient.js +142 -0
  248. package/build/npm/esm/dev/integrations/graphqlClient.js.map +1 -0
  249. package/build/npm/esm/dev/integrations/httpclient.js +248 -0
  250. package/build/npm/esm/dev/integrations/httpclient.js.map +1 -0
  251. package/build/npm/esm/dev/integrations/httpcontext.js +45 -0
  252. package/build/npm/esm/dev/integrations/httpcontext.js.map +1 -0
  253. package/build/npm/esm/dev/integrations/linkederrors.js +29 -0
  254. package/build/npm/esm/dev/integrations/linkederrors.js.map +1 -0
  255. package/build/npm/esm/dev/integrations/reportingobserver.js +58 -0
  256. package/build/npm/esm/dev/integrations/reportingobserver.js.map +1 -0
  257. package/build/npm/esm/dev/integrations/spanstreaming.js +47 -0
  258. package/build/npm/esm/dev/integrations/spanstreaming.js.map +1 -0
  259. package/build/npm/esm/dev/integrations/spotlight.js +57 -0
  260. package/build/npm/esm/dev/integrations/spotlight.js.map +1 -0
  261. package/build/npm/esm/dev/integrations/view-hierarchy.js +72 -0
  262. package/build/npm/esm/dev/integrations/view-hierarchy.js.map +1 -0
  263. package/build/npm/esm/dev/integrations/webVitals.js +59 -0
  264. package/build/npm/esm/dev/integrations/webVitals.js.map +1 -0
  265. package/build/npm/esm/dev/integrations/webWorker.js +129 -0
  266. package/build/npm/esm/dev/integrations/webWorker.js.map +1 -0
  267. package/build/npm/esm/dev/normalizeStringifyValue.js +25 -0
  268. package/build/npm/esm/dev/normalizeStringifyValue.js.map +1 -0
  269. package/build/npm/esm/dev/package.json +1 -0
  270. package/build/npm/esm/dev/profiling/UIProfiler.js +304 -0
  271. package/build/npm/esm/dev/profiling/UIProfiler.js.map +1 -0
  272. package/build/npm/esm/dev/profiling/index.js +36 -0
  273. package/build/npm/esm/dev/profiling/index.js.map +1 -0
  274. package/build/npm/esm/dev/profiling/integration.js +118 -0
  275. package/build/npm/esm/dev/profiling/integration.js.map +1 -0
  276. package/build/npm/esm/dev/profiling/startProfileForSpan.js +89 -0
  277. package/build/npm/esm/dev/profiling/startProfileForSpan.js.map +1 -0
  278. package/build/npm/esm/dev/profiling/utils.js +474 -0
  279. package/build/npm/esm/dev/profiling/utils.js.map +1 -0
  280. package/build/npm/esm/dev/report-dialog.js +51 -0
  281. package/build/npm/esm/dev/report-dialog.js.map +1 -0
  282. package/build/npm/esm/dev/sdk.js +65 -0
  283. package/build/npm/esm/dev/sdk.js.map +1 -0
  284. package/build/npm/esm/dev/stack-parsers.js +110 -0
  285. package/build/npm/esm/dev/stack-parsers.js.map +1 -0
  286. package/build/npm/esm/dev/tracing/backgroundtab.js +32 -0
  287. package/build/npm/esm/dev/tracing/backgroundtab.js.map +1 -0
  288. package/build/npm/esm/dev/tracing/browserTracingIntegration.js +429 -0
  289. package/build/npm/esm/dev/tracing/browserTracingIntegration.js.map +1 -0
  290. package/build/npm/esm/dev/tracing/linkedTraces.js +131 -0
  291. package/build/npm/esm/dev/tracing/linkedTraces.js.map +1 -0
  292. package/build/npm/esm/dev/tracing/reportPageLoaded.js +8 -0
  293. package/build/npm/esm/dev/tracing/reportPageLoaded.js.map +1 -0
  294. package/build/npm/esm/dev/tracing/request.js +232 -0
  295. package/build/npm/esm/dev/tracing/request.js.map +1 -0
  296. package/build/npm/esm/dev/tracing/setActiveSpan.js +19 -0
  297. package/build/npm/esm/dev/tracing/setActiveSpan.js.map +1 -0
  298. package/build/npm/esm/dev/tracing/utils.js +26 -0
  299. package/build/npm/esm/dev/tracing/utils.js.map +1 -0
  300. package/build/npm/esm/dev/transports/fetch.js +56 -0
  301. package/build/npm/esm/dev/transports/fetch.js.map +1 -0
  302. package/build/npm/esm/dev/transports/offline.js +105 -0
  303. package/build/npm/esm/dev/transports/offline.js.map +1 -0
  304. package/build/npm/esm/dev/userfeedback.js +30 -0
  305. package/build/npm/esm/dev/userfeedback.js.map +1 -0
  306. package/build/npm/esm/dev/utils/detectBrowserExtension.js +36 -0
  307. package/build/npm/esm/dev/utils/detectBrowserExtension.js.map +1 -0
  308. package/build/npm/esm/dev/utils/lazyLoadIntegration.js +89 -0
  309. package/build/npm/esm/dev/utils/lazyLoadIntegration.js.map +1 -0
  310. package/build/npm/esm/prod/client.js +74 -0
  311. package/build/npm/esm/prod/client.js.map +1 -0
  312. package/build/npm/esm/prod/debug-build.js +4 -0
  313. package/build/npm/esm/prod/debug-build.js.map +1 -0
  314. package/build/npm/esm/prod/diagnose-sdk.js +32 -0
  315. package/build/npm/esm/prod/diagnose-sdk.js.map +1 -0
  316. package/build/npm/esm/prod/eventbuilder.js +224 -0
  317. package/build/npm/esm/prod/eventbuilder.js.map +1 -0
  318. package/build/npm/esm/prod/feedbackAsync.js +9 -0
  319. package/build/npm/esm/prod/feedbackAsync.js.map +1 -0
  320. package/build/npm/esm/prod/feedbackSync.js +9 -0
  321. package/build/npm/esm/prod/feedbackSync.js.map +1 -0
  322. package/build/npm/esm/prod/helpers.js +102 -0
  323. package/build/npm/esm/prod/helpers.js.map +1 -0
  324. package/build/npm/esm/prod/index.js +48 -0
  325. package/build/npm/esm/prod/index.js.map +1 -0
  326. package/build/npm/esm/prod/integrations/breadcrumbs.js +247 -0
  327. package/build/npm/esm/prod/integrations/breadcrumbs.js.map +1 -0
  328. package/build/npm/esm/prod/integrations/browserapierrors.js +165 -0
  329. package/build/npm/esm/prod/integrations/browserapierrors.js.map +1 -0
  330. package/build/npm/esm/prod/integrations/browsersession.js +48 -0
  331. package/build/npm/esm/prod/integrations/browsersession.js.map +1 -0
  332. package/build/npm/esm/prod/integrations/contextlines.js +50 -0
  333. package/build/npm/esm/prod/integrations/contextlines.js.map +1 -0
  334. package/build/npm/esm/prod/integrations/culturecontext.js +48 -0
  335. package/build/npm/esm/prod/integrations/culturecontext.js.map +1 -0
  336. package/build/npm/esm/prod/integrations/featureFlags/growthbook/integration.js +6 -0
  337. package/build/npm/esm/prod/integrations/featureFlags/growthbook/integration.js.map +1 -0
  338. package/build/npm/esm/prod/integrations/featureFlags/launchdarkly/integration.js +27 -0
  339. package/build/npm/esm/prod/integrations/featureFlags/launchdarkly/integration.js.map +1 -0
  340. package/build/npm/esm/prod/integrations/featureFlags/openfeature/integration.js +29 -0
  341. package/build/npm/esm/prod/integrations/featureFlags/openfeature/integration.js.map +1 -0
  342. package/build/npm/esm/prod/integrations/featureFlags/statsig/integration.js +21 -0
  343. package/build/npm/esm/prod/integrations/featureFlags/statsig/integration.js.map +1 -0
  344. package/build/npm/esm/prod/integrations/featureFlags/unleash/integration.js +35 -0
  345. package/build/npm/esm/prod/integrations/featureFlags/unleash/integration.js.map +1 -0
  346. package/build/npm/esm/prod/integrations/fetchStreamPerformance.js +58 -0
  347. package/build/npm/esm/prod/integrations/fetchStreamPerformance.js.map +1 -0
  348. package/build/npm/esm/prod/integrations/globalhandlers.js +139 -0
  349. package/build/npm/esm/prod/integrations/globalhandlers.js.map +1 -0
  350. package/build/npm/esm/prod/integrations/graphqlClient.js +142 -0
  351. package/build/npm/esm/prod/integrations/graphqlClient.js.map +1 -0
  352. package/build/npm/esm/prod/integrations/httpclient.js +248 -0
  353. package/build/npm/esm/prod/integrations/httpclient.js.map +1 -0
  354. package/build/npm/esm/prod/integrations/httpcontext.js +45 -0
  355. package/build/npm/esm/prod/integrations/httpcontext.js.map +1 -0
  356. package/build/npm/esm/prod/integrations/linkederrors.js +29 -0
  357. package/build/npm/esm/prod/integrations/linkederrors.js.map +1 -0
  358. package/build/npm/esm/prod/integrations/reportingobserver.js +58 -0
  359. package/build/npm/esm/prod/integrations/reportingobserver.js.map +1 -0
  360. package/build/npm/esm/prod/integrations/spanstreaming.js +47 -0
  361. package/build/npm/esm/prod/integrations/spanstreaming.js.map +1 -0
  362. package/build/npm/esm/prod/integrations/spotlight.js +57 -0
  363. package/build/npm/esm/prod/integrations/spotlight.js.map +1 -0
  364. package/build/npm/esm/prod/integrations/view-hierarchy.js +72 -0
  365. package/build/npm/esm/prod/integrations/view-hierarchy.js.map +1 -0
  366. package/build/npm/esm/prod/integrations/webVitals.js +59 -0
  367. package/build/npm/esm/prod/integrations/webVitals.js.map +1 -0
  368. package/build/npm/esm/prod/integrations/webWorker.js +129 -0
  369. package/build/npm/esm/prod/integrations/webWorker.js.map +1 -0
  370. package/build/npm/esm/prod/normalizeStringifyValue.js +25 -0
  371. package/build/npm/esm/prod/normalizeStringifyValue.js.map +1 -0
  372. package/build/npm/esm/prod/package.json +1 -0
  373. package/build/npm/esm/prod/profiling/UIProfiler.js +304 -0
  374. package/build/npm/esm/prod/profiling/UIProfiler.js.map +1 -0
  375. package/build/npm/esm/prod/profiling/index.js +36 -0
  376. package/build/npm/esm/prod/profiling/index.js.map +1 -0
  377. package/build/npm/esm/prod/profiling/integration.js +118 -0
  378. package/build/npm/esm/prod/profiling/integration.js.map +1 -0
  379. package/build/npm/esm/prod/profiling/startProfileForSpan.js +89 -0
  380. package/build/npm/esm/prod/profiling/startProfileForSpan.js.map +1 -0
  381. package/build/npm/esm/prod/profiling/utils.js +474 -0
  382. package/build/npm/esm/prod/profiling/utils.js.map +1 -0
  383. package/build/npm/esm/prod/report-dialog.js +51 -0
  384. package/build/npm/esm/prod/report-dialog.js.map +1 -0
  385. package/build/npm/esm/prod/sdk.js +55 -0
  386. package/build/npm/esm/prod/sdk.js.map +1 -0
  387. package/build/npm/esm/prod/stack-parsers.js +110 -0
  388. package/build/npm/esm/prod/stack-parsers.js.map +1 -0
  389. package/build/npm/esm/prod/tracing/backgroundtab.js +32 -0
  390. package/build/npm/esm/prod/tracing/backgroundtab.js.map +1 -0
  391. package/build/npm/esm/prod/tracing/browserTracingIntegration.js +429 -0
  392. package/build/npm/esm/prod/tracing/browserTracingIntegration.js.map +1 -0
  393. package/build/npm/esm/prod/tracing/linkedTraces.js +130 -0
  394. package/build/npm/esm/prod/tracing/linkedTraces.js.map +1 -0
  395. package/build/npm/esm/prod/tracing/reportPageLoaded.js +8 -0
  396. package/build/npm/esm/prod/tracing/reportPageLoaded.js.map +1 -0
  397. package/build/npm/esm/prod/tracing/request.js +232 -0
  398. package/build/npm/esm/prod/tracing/request.js.map +1 -0
  399. package/build/npm/esm/prod/tracing/setActiveSpan.js +19 -0
  400. package/build/npm/esm/prod/tracing/setActiveSpan.js.map +1 -0
  401. package/build/npm/esm/prod/tracing/utils.js +26 -0
  402. package/build/npm/esm/prod/tracing/utils.js.map +1 -0
  403. package/build/npm/esm/prod/transports/fetch.js +56 -0
  404. package/build/npm/esm/prod/transports/fetch.js.map +1 -0
  405. package/build/npm/esm/prod/transports/offline.js +105 -0
  406. package/build/npm/esm/prod/transports/offline.js.map +1 -0
  407. package/build/npm/esm/prod/userfeedback.js +30 -0
  408. package/build/npm/esm/prod/userfeedback.js.map +1 -0
  409. package/build/npm/esm/prod/utils/detectBrowserExtension.js +36 -0
  410. package/build/npm/esm/prod/utils/detectBrowserExtension.js.map +1 -0
  411. package/build/npm/esm/prod/utils/lazyLoadIntegration.js +89 -0
  412. package/build/npm/esm/prod/utils/lazyLoadIntegration.js.map +1 -0
  413. package/build/npm/types/client.d.ts +79 -0
  414. package/build/npm/types/client.d.ts.map +1 -0
  415. package/build/npm/types/debug-build.d.ts +7 -0
  416. package/build/npm/types/debug-build.d.ts.map +1 -0
  417. package/build/npm/types/diagnose-sdk.d.ts +11 -0
  418. package/build/npm/types/diagnose-sdk.d.ts.map +1 -0
  419. package/build/npm/types/eventbuilder.d.ts +40 -0
  420. package/build/npm/types/eventbuilder.d.ts.map +1 -0
  421. package/build/npm/types/exports.d.ts +21 -0
  422. package/build/npm/types/exports.d.ts.map +1 -0
  423. package/build/npm/types/feedbackAsync.d.ts +7 -0
  424. package/build/npm/types/feedbackAsync.d.ts.map +1 -0
  425. package/build/npm/types/feedbackSync.d.ts +4 -0
  426. package/build/npm/types/feedbackSync.d.ts.map +1 -0
  427. package/build/npm/types/helpers.d.ts +27 -0
  428. package/build/npm/types/helpers.d.ts.map +1 -0
  429. package/build/npm/types/index.bundle.base.d.ts +2 -0
  430. package/build/npm/types/index.bundle.base.d.ts.map +1 -0
  431. package/build/npm/types/index.bundle.d.ts +5 -0
  432. package/build/npm/types/index.bundle.d.ts.map +1 -0
  433. package/build/npm/types/index.bundle.feedback.d.ts +7 -0
  434. package/build/npm/types/index.bundle.feedback.d.ts.map +1 -0
  435. package/build/npm/types/index.bundle.logs.metrics.d.ts +6 -0
  436. package/build/npm/types/index.bundle.logs.metrics.d.ts.map +1 -0
  437. package/build/npm/types/index.bundle.replay.d.ts +6 -0
  438. package/build/npm/types/index.bundle.replay.d.ts.map +1 -0
  439. package/build/npm/types/index.bundle.replay.feedback.d.ts +8 -0
  440. package/build/npm/types/index.bundle.replay.feedback.d.ts.map +1 -0
  441. package/build/npm/types/index.bundle.replay.logs.metrics.d.ts +7 -0
  442. package/build/npm/types/index.bundle.replay.logs.metrics.d.ts.map +1 -0
  443. package/build/npm/types/index.bundle.tracing.d.ts +13 -0
  444. package/build/npm/types/index.bundle.tracing.d.ts.map +1 -0
  445. package/build/npm/types/index.bundle.tracing.logs.metrics.d.ts +13 -0
  446. package/build/npm/types/index.bundle.tracing.logs.metrics.d.ts.map +1 -0
  447. package/build/npm/types/index.bundle.tracing.replay.d.ts +14 -0
  448. package/build/npm/types/index.bundle.tracing.replay.d.ts.map +1 -0
  449. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts +16 -0
  450. package/build/npm/types/index.bundle.tracing.replay.feedback.d.ts.map +1 -0
  451. package/build/npm/types/index.bundle.tracing.replay.feedback.logs.metrics.d.ts +14 -0
  452. package/build/npm/types/index.bundle.tracing.replay.feedback.logs.metrics.d.ts.map +1 -0
  453. package/build/npm/types/index.bundle.tracing.replay.logs.metrics.d.ts +14 -0
  454. package/build/npm/types/index.bundle.tracing.replay.logs.metrics.d.ts.map +1 -0
  455. package/build/npm/types/index.d.ts +38 -0
  456. package/build/npm/types/index.d.ts.map +1 -0
  457. package/build/npm/types/integrations/breadcrumbs.d.ts +16 -0
  458. package/build/npm/types/integrations/breadcrumbs.d.ts.map +1 -0
  459. package/build/npm/types/integrations/browserapierrors.d.ts +23 -0
  460. package/build/npm/types/integrations/browserapierrors.d.ts.map +1 -0
  461. package/build/npm/types/integrations/browserprofiling.d.ts +2 -0
  462. package/build/npm/types/integrations/browserprofiling.d.ts.map +1 -0
  463. package/build/npm/types/integrations/browsersession.d.ts +25 -0
  464. package/build/npm/types/integrations/browsersession.d.ts.map +1 -0
  465. package/build/npm/types/integrations/contextlines.d.ts +32 -0
  466. package/build/npm/types/integrations/contextlines.d.ts.map +1 -0
  467. package/build/npm/types/integrations/culturecontext.d.ts +18 -0
  468. package/build/npm/types/integrations/culturecontext.d.ts.map +1 -0
  469. package/build/npm/types/integrations/featureFlags/growthbook/index.d.ts +2 -0
  470. package/build/npm/types/integrations/featureFlags/growthbook/index.d.ts.map +1 -0
  471. package/build/npm/types/integrations/featureFlags/growthbook/integration.d.ts +25 -0
  472. package/build/npm/types/integrations/featureFlags/growthbook/integration.d.ts.map +1 -0
  473. package/build/npm/types/integrations/featureFlags/growthbook/types.d.ts +6 -0
  474. package/build/npm/types/integrations/featureFlags/growthbook/types.d.ts.map +1 -0
  475. package/build/npm/types/integrations/featureFlags/launchdarkly/index.d.ts +2 -0
  476. package/build/npm/types/integrations/featureFlags/launchdarkly/index.d.ts.map +1 -0
  477. package/build/npm/types/integrations/featureFlags/launchdarkly/integration.d.ts +27 -0
  478. package/build/npm/types/integrations/featureFlags/launchdarkly/integration.d.ts.map +1 -0
  479. package/build/npm/types/integrations/featureFlags/launchdarkly/types.d.ts +44 -0
  480. package/build/npm/types/integrations/featureFlags/launchdarkly/types.d.ts.map +1 -0
  481. package/build/npm/types/integrations/featureFlags/openfeature/index.d.ts +2 -0
  482. package/build/npm/types/integrations/featureFlags/openfeature/index.d.ts.map +1 -0
  483. package/build/npm/types/integrations/featureFlags/openfeature/integration.d.ts +18 -0
  484. package/build/npm/types/integrations/featureFlags/openfeature/integration.d.ts.map +1 -0
  485. package/build/npm/types/integrations/featureFlags/openfeature/types.d.ts +78 -0
  486. package/build/npm/types/integrations/featureFlags/openfeature/types.d.ts.map +1 -0
  487. package/build/npm/types/integrations/featureFlags/statsig/index.d.ts +2 -0
  488. package/build/npm/types/integrations/featureFlags/statsig/index.d.ts.map +1 -0
  489. package/build/npm/types/integrations/featureFlags/statsig/integration.d.ts +30 -0
  490. package/build/npm/types/integrations/featureFlags/statsig/integration.d.ts.map +1 -0
  491. package/build/npm/types/integrations/featureFlags/statsig/types.d.ts +14 -0
  492. package/build/npm/types/integrations/featureFlags/statsig/types.d.ts.map +1 -0
  493. package/build/npm/types/integrations/featureFlags/unleash/index.d.ts +2 -0
  494. package/build/npm/types/integrations/featureFlags/unleash/index.d.ts.map +1 -0
  495. package/build/npm/types/integrations/featureFlags/unleash/integration.d.ts +31 -0
  496. package/build/npm/types/integrations/featureFlags/unleash/integration.d.ts.map +1 -0
  497. package/build/npm/types/integrations/featureFlags/unleash/types.d.ts +21 -0
  498. package/build/npm/types/integrations/featureFlags/unleash/types.d.ts.map +1 -0
  499. package/build/npm/types/integrations/fetchStreamPerformance.d.ts +16 -0
  500. package/build/npm/types/integrations/fetchStreamPerformance.d.ts.map +1 -0
  501. package/build/npm/types/integrations/globalhandlers.d.ts +19 -0
  502. package/build/npm/types/integrations/globalhandlers.d.ts.map +1 -0
  503. package/build/npm/types/integrations/graphqlClient.d.ts +60 -0
  504. package/build/npm/types/integrations/graphqlClient.d.ts.map +1 -0
  505. package/build/npm/types/integrations/httpclient.d.ts +29 -0
  506. package/build/npm/types/integrations/httpclient.d.ts.map +1 -0
  507. package/build/npm/types/integrations/httpcontext.d.ts +8 -0
  508. package/build/npm/types/integrations/httpcontext.d.ts.map +1 -0
  509. package/build/npm/types/integrations/linkederrors.d.ts +12 -0
  510. package/build/npm/types/integrations/linkederrors.d.ts.map +1 -0
  511. package/build/npm/types/integrations/reportingobserver.d.ts +12 -0
  512. package/build/npm/types/integrations/reportingobserver.d.ts.map +1 -0
  513. package/build/npm/types/integrations/spanstreaming.d.ts +4 -0
  514. package/build/npm/types/integrations/spanstreaming.d.ts.map +1 -0
  515. package/build/npm/types/integrations/spotlight.d.ts +21 -0
  516. package/build/npm/types/integrations/spotlight.d.ts.map +1 -0
  517. package/build/npm/types/integrations/view-hierarchy.d.ts +51 -0
  518. package/build/npm/types/integrations/view-hierarchy.d.ts.map +1 -0
  519. package/build/npm/types/integrations/webVitals.d.ts +26 -0
  520. package/build/npm/types/integrations/webVitals.d.ts.map +1 -0
  521. package/build/npm/types/integrations/webWorker.d.ts +129 -0
  522. package/build/npm/types/integrations/webWorker.d.ts.map +1 -0
  523. package/build/npm/types/integrations-bundle/index.captureconsole.d.ts +2 -0
  524. package/build/npm/types/integrations-bundle/index.captureconsole.d.ts.map +1 -0
  525. package/build/npm/types/integrations-bundle/index.createlangchaincallbackhandler.d.ts +2 -0
  526. package/build/npm/types/integrations-bundle/index.createlangchaincallbackhandler.d.ts.map +1 -0
  527. package/build/npm/types/integrations-bundle/index.dedupe.d.ts +2 -0
  528. package/build/npm/types/integrations-bundle/index.dedupe.d.ts.map +1 -0
  529. package/build/npm/types/integrations-bundle/index.extraerrordata.d.ts +2 -0
  530. package/build/npm/types/integrations-bundle/index.extraerrordata.d.ts.map +1 -0
  531. package/build/npm/types/integrations-bundle/index.feedback.d.ts +5 -0
  532. package/build/npm/types/integrations-bundle/index.feedback.d.ts.map +1 -0
  533. package/build/npm/types/integrations-bundle/index.graphqlclient.d.ts +2 -0
  534. package/build/npm/types/integrations-bundle/index.graphqlclient.d.ts.map +1 -0
  535. package/build/npm/types/integrations-bundle/index.instrumentanthropicaiclient.d.ts +2 -0
  536. package/build/npm/types/integrations-bundle/index.instrumentanthropicaiclient.d.ts.map +1 -0
  537. package/build/npm/types/integrations-bundle/index.instrumentgooglegenaiclient.d.ts +2 -0
  538. package/build/npm/types/integrations-bundle/index.instrumentgooglegenaiclient.d.ts.map +1 -0
  539. package/build/npm/types/integrations-bundle/index.instrumentlangchainembeddings.d.ts +2 -0
  540. package/build/npm/types/integrations-bundle/index.instrumentlangchainembeddings.d.ts.map +1 -0
  541. package/build/npm/types/integrations-bundle/index.instrumentlanggraph.d.ts +2 -0
  542. package/build/npm/types/integrations-bundle/index.instrumentlanggraph.d.ts.map +1 -0
  543. package/build/npm/types/integrations-bundle/index.instrumentopenaiclient.d.ts +2 -0
  544. package/build/npm/types/integrations-bundle/index.instrumentopenaiclient.d.ts.map +1 -0
  545. package/build/npm/types/integrations-bundle/index.instrumentstategraph.d.ts +2 -0
  546. package/build/npm/types/integrations-bundle/index.instrumentstategraph.d.ts.map +1 -0
  547. package/build/npm/types/integrations-bundle/index.modulemetadata.d.ts +2 -0
  548. package/build/npm/types/integrations-bundle/index.modulemetadata.d.ts.map +1 -0
  549. package/build/npm/types/integrations-bundle/index.rewriteframes.d.ts +2 -0
  550. package/build/npm/types/integrations-bundle/index.rewriteframes.d.ts.map +1 -0
  551. package/build/npm/types/integrations-bundle/index.spotlight.d.ts +2 -0
  552. package/build/npm/types/integrations-bundle/index.spotlight.d.ts.map +1 -0
  553. package/build/npm/types/normalizeStringifyValue.d.ts +15 -0
  554. package/build/npm/types/normalizeStringifyValue.d.ts.map +1 -0
  555. package/build/npm/types/pluggable-exports-bundle/index.multiplexedtransport.d.ts +2 -0
  556. package/build/npm/types/pluggable-exports-bundle/index.multiplexedtransport.d.ts.map +1 -0
  557. package/build/npm/types/profiling/UIProfiler.d.ts +75 -0
  558. package/build/npm/types/profiling/UIProfiler.d.ts.map +1 -0
  559. package/build/npm/types/profiling/index.d.ts +8 -0
  560. package/build/npm/types/profiling/index.d.ts.map +1 -0
  561. package/build/npm/types/profiling/integration.d.ts +4 -0
  562. package/build/npm/types/profiling/integration.d.ts.map +1 -0
  563. package/build/npm/types/profiling/jsSelfProfiling.d.ts +41 -0
  564. package/build/npm/types/profiling/jsSelfProfiling.d.ts.map +1 -0
  565. package/build/npm/types/profiling/startProfileForSpan.d.ts +8 -0
  566. package/build/npm/types/profiling/startProfileForSpan.d.ts.map +1 -0
  567. package/build/npm/types/profiling/utils.d.ts +112 -0
  568. package/build/npm/types/profiling/utils.d.ts.map +1 -0
  569. package/build/npm/types/report-dialog.d.ts +8 -0
  570. package/build/npm/types/report-dialog.d.ts.map +1 -0
  571. package/build/npm/types/sdk.d.ts +62 -0
  572. package/build/npm/types/sdk.d.ts.map +1 -0
  573. package/build/npm/types/stack-parsers.d.ts +9 -0
  574. package/build/npm/types/stack-parsers.d.ts.map +1 -0
  575. package/build/npm/types/tracing/backgroundtab.d.ts +6 -0
  576. package/build/npm/types/tracing/backgroundtab.d.ts.map +1 -0
  577. package/build/npm/types/tracing/browserTracingIntegration.d.ts +271 -0
  578. package/build/npm/types/tracing/browserTracingIntegration.d.ts.map +1 -0
  579. package/build/npm/types/tracing/linkedTraces.d.ts +52 -0
  580. package/build/npm/types/tracing/linkedTraces.d.ts.map +1 -0
  581. package/build/npm/types/tracing/reportPageLoaded.d.ts +11 -0
  582. package/build/npm/types/tracing/reportPageLoaded.d.ts.map +1 -0
  583. package/build/npm/types/tracing/request.d.ts +87 -0
  584. package/build/npm/types/tracing/request.d.ts.map +1 -0
  585. package/build/npm/types/tracing/setActiveSpan.d.ts +39 -0
  586. package/build/npm/types/tracing/setActiveSpan.d.ts.map +1 -0
  587. package/build/npm/types/tracing/utils.d.ts +17 -0
  588. package/build/npm/types/tracing/utils.d.ts.map +1 -0
  589. package/build/npm/types/transports/fetch.d.ts +8 -0
  590. package/build/npm/types/transports/fetch.d.ts.map +1 -0
  591. package/build/npm/types/transports/offline.d.ts +33 -0
  592. package/build/npm/types/transports/offline.d.ts.map +1 -0
  593. package/build/npm/types/transports/types.d.ts +6 -0
  594. package/build/npm/types/transports/types.d.ts.map +1 -0
  595. package/build/npm/types/userfeedback.d.ts +10 -0
  596. package/build/npm/types/userfeedback.d.ts.map +1 -0
  597. package/build/npm/types/utils/detectBrowserExtension.d.ts +6 -0
  598. package/build/npm/types/utils/detectBrowserExtension.d.ts.map +1 -0
  599. package/build/npm/types/utils/lazyLoadIntegration.d.ts +13 -0
  600. package/build/npm/types/utils/lazyLoadIntegration.d.ts.map +1 -0
  601. package/build/npm/types-ts3.8/client.d.ts +79 -0
  602. package/build/npm/types-ts3.8/debug-build.d.ts +7 -0
  603. package/build/npm/types-ts3.8/diagnose-sdk.d.ts +11 -0
  604. package/build/npm/types-ts3.8/eventbuilder.d.ts +40 -0
  605. package/build/npm/types-ts3.8/exports.d.ts +21 -0
  606. package/build/npm/types-ts3.8/feedbackAsync.d.ts +7 -0
  607. package/build/npm/types-ts3.8/feedbackSync.d.ts +4 -0
  608. package/build/npm/types-ts3.8/helpers.d.ts +27 -0
  609. package/build/npm/types-ts3.8/index.bundle.base.d.ts +2 -0
  610. package/build/npm/types-ts3.8/index.bundle.d.ts +5 -0
  611. package/build/npm/types-ts3.8/index.bundle.feedback.d.ts +7 -0
  612. package/build/npm/types-ts3.8/index.bundle.logs.metrics.d.ts +6 -0
  613. package/build/npm/types-ts3.8/index.bundle.replay.d.ts +6 -0
  614. package/build/npm/types-ts3.8/index.bundle.replay.feedback.d.ts +8 -0
  615. package/build/npm/types-ts3.8/index.bundle.replay.logs.metrics.d.ts +7 -0
  616. package/build/npm/types-ts3.8/index.bundle.tracing.d.ts +13 -0
  617. package/build/npm/types-ts3.8/index.bundle.tracing.logs.metrics.d.ts +13 -0
  618. package/build/npm/types-ts3.8/index.bundle.tracing.replay.d.ts +14 -0
  619. package/build/npm/types-ts3.8/index.bundle.tracing.replay.feedback.d.ts +16 -0
  620. package/build/npm/types-ts3.8/index.bundle.tracing.replay.feedback.logs.metrics.d.ts +14 -0
  621. package/build/npm/types-ts3.8/index.bundle.tracing.replay.logs.metrics.d.ts +14 -0
  622. package/build/npm/types-ts3.8/index.d.ts +38 -0
  623. package/build/npm/types-ts3.8/integrations/breadcrumbs.d.ts +16 -0
  624. package/build/npm/types-ts3.8/integrations/browserapierrors.d.ts +23 -0
  625. package/build/npm/types-ts3.8/integrations/browserprofiling.d.ts +2 -0
  626. package/build/npm/types-ts3.8/integrations/browsersession.d.ts +25 -0
  627. package/build/npm/types-ts3.8/integrations/contextlines.d.ts +32 -0
  628. package/build/npm/types-ts3.8/integrations/culturecontext.d.ts +18 -0
  629. package/build/npm/types-ts3.8/integrations/featureFlags/growthbook/index.d.ts +2 -0
  630. package/build/npm/types-ts3.8/integrations/featureFlags/growthbook/integration.d.ts +25 -0
  631. package/build/npm/types-ts3.8/integrations/featureFlags/growthbook/types.d.ts +6 -0
  632. package/build/npm/types-ts3.8/integrations/featureFlags/launchdarkly/index.d.ts +2 -0
  633. package/build/npm/types-ts3.8/integrations/featureFlags/launchdarkly/integration.d.ts +27 -0
  634. package/build/npm/types-ts3.8/integrations/featureFlags/launchdarkly/types.d.ts +44 -0
  635. package/build/npm/types-ts3.8/integrations/featureFlags/openfeature/index.d.ts +2 -0
  636. package/build/npm/types-ts3.8/integrations/featureFlags/openfeature/integration.d.ts +18 -0
  637. package/build/npm/types-ts3.8/integrations/featureFlags/openfeature/types.d.ts +78 -0
  638. package/build/npm/types-ts3.8/integrations/featureFlags/statsig/index.d.ts +2 -0
  639. package/build/npm/types-ts3.8/integrations/featureFlags/statsig/integration.d.ts +30 -0
  640. package/build/npm/types-ts3.8/integrations/featureFlags/statsig/types.d.ts +14 -0
  641. package/build/npm/types-ts3.8/integrations/featureFlags/unleash/index.d.ts +2 -0
  642. package/build/npm/types-ts3.8/integrations/featureFlags/unleash/integration.d.ts +31 -0
  643. package/build/npm/types-ts3.8/integrations/featureFlags/unleash/types.d.ts +21 -0
  644. package/build/npm/types-ts3.8/integrations/fetchStreamPerformance.d.ts +16 -0
  645. package/build/npm/types-ts3.8/integrations/globalhandlers.d.ts +19 -0
  646. package/build/npm/types-ts3.8/integrations/graphqlClient.d.ts +60 -0
  647. package/build/npm/types-ts3.8/integrations/httpclient.d.ts +32 -0
  648. package/build/npm/types-ts3.8/integrations/httpcontext.d.ts +8 -0
  649. package/build/npm/types-ts3.8/integrations/linkederrors.d.ts +12 -0
  650. package/build/npm/types-ts3.8/integrations/reportingobserver.d.ts +12 -0
  651. package/build/npm/types-ts3.8/integrations/spanstreaming.d.ts +4 -0
  652. package/build/npm/types-ts3.8/integrations/spotlight.d.ts +21 -0
  653. package/build/npm/types-ts3.8/integrations/view-hierarchy.d.ts +51 -0
  654. package/build/npm/types-ts3.8/integrations/webVitals.d.ts +26 -0
  655. package/build/npm/types-ts3.8/integrations/webWorker.d.ts +129 -0
  656. package/build/npm/types-ts3.8/integrations-bundle/index.captureconsole.d.ts +2 -0
  657. package/build/npm/types-ts3.8/integrations-bundle/index.createlangchaincallbackhandler.d.ts +2 -0
  658. package/build/npm/types-ts3.8/integrations-bundle/index.dedupe.d.ts +2 -0
  659. package/build/npm/types-ts3.8/integrations-bundle/index.extraerrordata.d.ts +2 -0
  660. package/build/npm/types-ts3.8/integrations-bundle/index.feedback.d.ts +5 -0
  661. package/build/npm/types-ts3.8/integrations-bundle/index.graphqlclient.d.ts +2 -0
  662. package/build/npm/types-ts3.8/integrations-bundle/index.instrumentanthropicaiclient.d.ts +2 -0
  663. package/build/npm/types-ts3.8/integrations-bundle/index.instrumentgooglegenaiclient.d.ts +2 -0
  664. package/build/npm/types-ts3.8/integrations-bundle/index.instrumentlangchainembeddings.d.ts +2 -0
  665. package/build/npm/types-ts3.8/integrations-bundle/index.instrumentlanggraph.d.ts +2 -0
  666. package/build/npm/types-ts3.8/integrations-bundle/index.instrumentopenaiclient.d.ts +2 -0
  667. package/build/npm/types-ts3.8/integrations-bundle/index.instrumentstategraph.d.ts +2 -0
  668. package/build/npm/types-ts3.8/integrations-bundle/index.modulemetadata.d.ts +2 -0
  669. package/build/npm/types-ts3.8/integrations-bundle/index.rewriteframes.d.ts +2 -0
  670. package/build/npm/types-ts3.8/integrations-bundle/index.spotlight.d.ts +2 -0
  671. package/build/npm/types-ts3.8/normalizeStringifyValue.d.ts +15 -0
  672. package/build/npm/types-ts3.8/pluggable-exports-bundle/index.multiplexedtransport.d.ts +2 -0
  673. package/build/npm/types-ts3.8/profiling/UIProfiler.d.ts +75 -0
  674. package/build/npm/types-ts3.8/profiling/index.d.ts +8 -0
  675. package/build/npm/types-ts3.8/profiling/integration.d.ts +4 -0
  676. package/build/npm/types-ts3.8/profiling/jsSelfProfiling.d.ts +41 -0
  677. package/build/npm/types-ts3.8/profiling/startProfileForSpan.d.ts +8 -0
  678. package/build/npm/types-ts3.8/profiling/utils.d.ts +112 -0
  679. package/build/npm/types-ts3.8/report-dialog.d.ts +8 -0
  680. package/build/npm/types-ts3.8/sdk.d.ts +62 -0
  681. package/build/npm/types-ts3.8/stack-parsers.d.ts +9 -0
  682. package/build/npm/types-ts3.8/tracing/backgroundtab.d.ts +6 -0
  683. package/build/npm/types-ts3.8/tracing/browserTracingIntegration.d.ts +271 -0
  684. package/build/npm/types-ts3.8/tracing/linkedTraces.d.ts +52 -0
  685. package/build/npm/types-ts3.8/tracing/reportPageLoaded.d.ts +11 -0
  686. package/build/npm/types-ts3.8/tracing/request.d.ts +87 -0
  687. package/build/npm/types-ts3.8/tracing/setActiveSpan.d.ts +39 -0
  688. package/build/npm/types-ts3.8/tracing/utils.d.ts +17 -0
  689. package/build/npm/types-ts3.8/transports/fetch.d.ts +8 -0
  690. package/build/npm/types-ts3.8/transports/offline.d.ts +33 -0
  691. package/build/npm/types-ts3.8/transports/types.d.ts +6 -0
  692. package/build/npm/types-ts3.8/userfeedback.d.ts +10 -0
  693. package/build/npm/types-ts3.8/utils/detectBrowserExtension.d.ts +6 -0
  694. package/build/npm/types-ts3.8/utils/lazyLoadIntegration.d.ts +37 -0
  695. package/package.json +85 -4
@@ -0,0 +1,60 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const browser = require('@elenjical/core/browser');
4
+ const client = require('./client.js');
5
+ const breadcrumbs = require('./integrations/breadcrumbs.js');
6
+ const browserapierrors = require('./integrations/browserapierrors.js');
7
+ const browsersession = require('./integrations/browsersession.js');
8
+ const culturecontext = require('./integrations/culturecontext.js');
9
+ const globalhandlers = require('./integrations/globalhandlers.js');
10
+ const httpcontext = require('./integrations/httpcontext.js');
11
+ const linkederrors = require('./integrations/linkederrors.js');
12
+ const stackParsers = require('./stack-parsers.js');
13
+ const fetch = require('./transports/fetch.js');
14
+ const normalizeStringifyValue = require('./normalizeStringifyValue.js');
15
+ const detectBrowserExtension = require('./utils/detectBrowserExtension.js');
16
+
17
+ function getDefaultIntegrations(_options) {
18
+ return [
19
+ // TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`
20
+ // eslint-disable-next-line typescript/no-deprecated
21
+ browser.inboundFiltersIntegration(),
22
+ browser.functionToStringIntegration(),
23
+ browser.conversationIdIntegration(),
24
+ browserapierrors.browserApiErrorsIntegration(),
25
+ breadcrumbs.breadcrumbsIntegration(),
26
+ globalhandlers.globalHandlersIntegration(),
27
+ linkederrors.linkedErrorsIntegration(),
28
+ browser.dedupeIntegration(),
29
+ httpcontext.httpContextIntegration(),
30
+ culturecontext.cultureContextIntegration(),
31
+ browsersession.browserSessionIntegration()
32
+ ];
33
+ }
34
+ function init(options = {}) {
35
+ const shouldDisableBecauseIsBrowserExtenstion = !options.skipBrowserExtensionCheck && detectBrowserExtension.checkAndWarnIfIsEmbeddedBrowserExtension();
36
+ let defaultIntegrations = options.defaultIntegrations == null ? getDefaultIntegrations() : options.defaultIntegrations;
37
+ const clientOptions = {
38
+ ...options,
39
+ enabled: shouldDisableBecauseIsBrowserExtenstion ? false : options.enabled,
40
+ stackParser: browser.stackParserFromStackParserOptions(options.stackParser || stackParsers.defaultStackParser),
41
+ integrations: browser.getIntegrationsToSetup({
42
+ integrations: options.integrations,
43
+ defaultIntegrations
44
+ }),
45
+ transport: options.transport || fetch.makeFetchTransport
46
+ };
47
+ browser.setNormalizeStringifier(normalizeStringifyValue.normalizeStringifyValue);
48
+ return browser.initAndBind(client.BrowserClient, clientOptions);
49
+ }
50
+ function forceLoad() {
51
+ }
52
+ function onLoad(callback) {
53
+ callback();
54
+ }
55
+
56
+ exports.forceLoad = forceLoad;
57
+ exports.getDefaultIntegrations = getDefaultIntegrations;
58
+ exports.init = init;
59
+ exports.onLoad = onLoad;
60
+ //# sourceMappingURL=sdk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk.js","sources":["../../../../src/sdk.ts"],"sourcesContent":["import type { Client, Integration, Options } from '@elenjical/core/browser';\nimport {\n conversationIdIntegration,\n dedupeIntegration,\n functionToStringIntegration,\n getIntegrationsToSetup,\n inboundFiltersIntegration,\n initAndBind,\n setNormalizeStringifier,\n stackParserFromStackParserOptions,\n} from '@elenjical/core/browser';\nimport type { BrowserClientOptions, BrowserOptions } from './client';\nimport { BrowserClient } from './client';\nimport { breadcrumbsIntegration } from './integrations/breadcrumbs';\nimport { browserApiErrorsIntegration } from './integrations/browserapierrors';\nimport { browserSessionIntegration } from './integrations/browsersession';\nimport { cultureContextIntegration } from './integrations/culturecontext';\nimport { globalHandlersIntegration } from './integrations/globalhandlers';\nimport { httpContextIntegration } from './integrations/httpcontext';\nimport { linkedErrorsIntegration } from './integrations/linkederrors';\nimport { spotlightBrowserIntegration } from './integrations/spotlight';\nimport { defaultStackParser } from './stack-parsers';\nimport { makeFetchTransport } from './transports/fetch';\nimport { normalizeStringifyValue } from './normalizeStringifyValue';\nimport { checkAndWarnIfIsEmbeddedBrowserExtension } from './utils/detectBrowserExtension';\n\n/** Get the default integrations for the browser SDK. */\nexport function getDefaultIntegrations(_options: Options): Integration[] {\n /**\n * Note: Please make sure this stays in sync with Angular SDK, which re-exports\n * `getDefaultIntegrations` but with an adjusted set of integrations.\n */\n return [\n // TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`\n // eslint-disable-next-line typescript/no-deprecated\n inboundFiltersIntegration(),\n functionToStringIntegration(),\n conversationIdIntegration(),\n browserApiErrorsIntegration(),\n breadcrumbsIntegration(),\n globalHandlersIntegration(),\n linkedErrorsIntegration(),\n dedupeIntegration(),\n httpContextIntegration(),\n cultureContextIntegration(),\n browserSessionIntegration(),\n ];\n}\n\n/**\n * The Elenjical Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@elenjical/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@elenjical/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Elenjical from '@elenjical/browser';\n * Elenjical.captureMessage('Hello, world!');\n * Elenjical.captureException(new Error('Good bye'));\n * Elenjical.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options: BrowserOptions = {}): Client | undefined {\n const shouldDisableBecauseIsBrowserExtenstion =\n !options.skipBrowserExtensionCheck && checkAndWarnIfIsEmbeddedBrowserExtension();\n\n let defaultIntegrations =\n options.defaultIntegrations == null ? getDefaultIntegrations(options) : options.defaultIntegrations;\n\n /*! rollup-include-development-only */\n if (options.spotlight) {\n if (!defaultIntegrations) {\n defaultIntegrations = [];\n }\n const args = typeof options.spotlight === 'string' ? { sidecarUrl: options.spotlight } : undefined;\n defaultIntegrations.push(spotlightBrowserIntegration(args));\n }\n /*! rollup-include-development-only-end */\n\n const clientOptions: BrowserClientOptions = {\n ...options,\n enabled: shouldDisableBecauseIsBrowserExtenstion ? false : options.enabled,\n stackParser: stackParserFromStackParserOptions(options.stackParser || defaultStackParser),\n integrations: getIntegrationsToSetup({\n integrations: options.integrations,\n defaultIntegrations,\n }),\n transport: options.transport || makeFetchTransport,\n };\n\n setNormalizeStringifier(normalizeStringifyValue);\n\n return initAndBind(BrowserClient, clientOptions);\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad(): void {\n // Noop\n}\n\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback: () => void): void {\n callback();\n}\n"],"names":["inboundFiltersIntegration","functionToStringIntegration","conversationIdIntegration","browserApiErrorsIntegration","breadcrumbsIntegration","globalHandlersIntegration","linkedErrorsIntegration","dedupeIntegration","httpContextIntegration","cultureContextIntegration","browserSessionIntegration","checkAndWarnIfIsEmbeddedBrowserExtension","stackParserFromStackParserOptions","defaultStackParser","getIntegrationsToSetup","makeFetchTransport","setNormalizeStringifier","normalizeStringifyValue","initAndBind","BrowserClient"],"mappings":";;;;;;;;;;;;;;;;AA2BO,SAAS,uBAAuB,QAAA,EAAkC;AAKvE,EAAA,OAAO;AAAA;AAAA;AAAA,IAGLA,iCAAA,EAA0B;AAAA,IAC1BC,mCAAA,EAA4B;AAAA,IAC5BC,iCAAA,EAA0B;AAAA,IAC1BC,4CAAA,EAA4B;AAAA,IAC5BC,kCAAA,EAAuB;AAAA,IACvBC,wCAAA,EAA0B;AAAA,IAC1BC,oCAAA,EAAwB;AAAA,IACxBC,yBAAA,EAAkB;AAAA,IAClBC,kCAAA,EAAuB;AAAA,IACvBC,wCAAA,EAA0B;AAAA,IAC1BC,wCAAA;AAA0B,GAC5B;AACF;AAgDO,SAAS,IAAA,CAAK,OAAA,GAA0B,EAAC,EAAuB;AACrE,EAAA,MAAM,uCAAA,GACJ,CAAC,OAAA,CAAQ,yBAAA,IAA6BC,+DAAA,EAAyC;AAEjF,EAAA,IAAI,sBACF,OAAA,CAAQ,mBAAA,IAAuB,OAAO,sBAAA,CAA8B,IAAI,OAAA,CAAQ,mBAAA;AAElF,EAAA,MAAM,aAAA,GAAsC;AAAA,IAC1C,GAAG,OAAA;AAAA,IACH,OAAA,EAAS,uCAAA,GAA0C,KAAA,GAAQ,OAAA,CAAQ,OAAA;AAAA,IACnE,WAAA,EAAaC,yCAAA,CAAkC,OAAA,CAAQ,WAAA,IAAeC,+BAAkB,CAAA;AAAA,IACxF,cAAcC,8BAAA,CAAuB;AAAA,MACnC,cAAc,OAAA,CAAQ,YAAA;AAAA,MACtB;AAAA,KACD,CAAA;AAAA,IACD,SAAA,EAAW,QAAQ,SAAA,IAAaC;AAAA,GAClC;AAEA,EAAAC,+BAAA,CAAwBC,+CAAuB,CAAA;AAE/C,EAAA,OAAOC,mBAAA,CAAYC,sBAAe,aAAa,CAAA;AACjD;AAMO,SAAS,SAAA,GAAkB;AAElC;AAMO,SAAS,OAAO,QAAA,EAA4B;AACjD,EAAA,QAAA,EAAS;AACX;;;;;;;"}
@@ -0,0 +1,118 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const browser = require('@elenjical/core/browser');
4
+
5
+ const OPERA10_PRIORITY = 10;
6
+ const OPERA11_PRIORITY = 20;
7
+ const CHROME_PRIORITY = 30;
8
+ const WINJS_PRIORITY = 40;
9
+ const GECKO_PRIORITY = 50;
10
+ function createFrame(filename, func, lineno, colno) {
11
+ const frame = {
12
+ filename,
13
+ function: func === "<anonymous>" ? browser.UNKNOWN_FUNCTION : func,
14
+ in_app: true
15
+ // All browser frames are considered in_app
16
+ };
17
+ if (lineno !== void 0) {
18
+ frame.lineno = lineno;
19
+ }
20
+ if (colno !== void 0) {
21
+ frame.colno = colno;
22
+ }
23
+ return frame;
24
+ }
25
+ const chromeRegexNoFnName = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i;
26
+ const chromeRegex = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;
27
+ const chromeEvalRegex = /\((\S*)(?::(\d+))(?::(\d+))\)/;
28
+ const chromeDataUriRegex = /at (.+?) ?\(data:(.+?),/;
29
+ const chromeStackParserFn = (line) => {
30
+ const dataUriMatch = line.match(chromeDataUriRegex);
31
+ if (dataUriMatch) {
32
+ return {
33
+ filename: `<data:${dataUriMatch[2]}>`,
34
+ function: dataUriMatch[1]
35
+ };
36
+ }
37
+ const noFnParts = chromeRegexNoFnName.exec(line);
38
+ if (noFnParts) {
39
+ const [, filename, line2, col] = noFnParts;
40
+ return createFrame(filename, browser.UNKNOWN_FUNCTION, +line2, +col);
41
+ }
42
+ const parts = chromeRegex.exec(line);
43
+ if (parts) {
44
+ const isEval = parts[2]?.indexOf("eval") === 0;
45
+ if (isEval) {
46
+ const subMatch = chromeEvalRegex.exec(parts[2]);
47
+ if (subMatch) {
48
+ parts[2] = subMatch[1];
49
+ parts[3] = subMatch[2];
50
+ parts[4] = subMatch[3];
51
+ }
52
+ }
53
+ const [func, filename] = extractSafariExtensionDetails(parts[1] || browser.UNKNOWN_FUNCTION, parts[2]);
54
+ return createFrame(filename, func, parts[3] ? +parts[3] : void 0, parts[4] ? +parts[4] : void 0);
55
+ }
56
+ return;
57
+ };
58
+ const chromeStackLineParser = [CHROME_PRIORITY, chromeStackParserFn];
59
+ const geckoREgex = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
60
+ const geckoEvalRegex = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
61
+ const gecko = (line) => {
62
+ const parts = geckoREgex.exec(line);
63
+ if (parts) {
64
+ const isEval = parts[3] && parts[3].indexOf(" > eval") > -1;
65
+ if (isEval) {
66
+ const subMatch = geckoEvalRegex.exec(parts[3]);
67
+ if (subMatch) {
68
+ parts[1] = parts[1] || "eval";
69
+ parts[3] = subMatch[1];
70
+ parts[4] = subMatch[2];
71
+ parts[5] = "";
72
+ }
73
+ }
74
+ let filename = parts[3];
75
+ let func = parts[1] || browser.UNKNOWN_FUNCTION;
76
+ [func, filename] = extractSafariExtensionDetails(func, filename);
77
+ return createFrame(filename, func, parts[4] ? +parts[4] : void 0, parts[5] ? +parts[5] : void 0);
78
+ }
79
+ return;
80
+ };
81
+ const geckoStackLineParser = [GECKO_PRIORITY, gecko];
82
+ const winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
83
+ const winjs = (line) => {
84
+ const parts = winjsRegex.exec(line);
85
+ return parts ? createFrame(parts[2], parts[1] || browser.UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : void 0) : void 0;
86
+ };
87
+ const winjsStackLineParser = [WINJS_PRIORITY, winjs];
88
+ const opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
89
+ const opera10 = (line) => {
90
+ const parts = opera10Regex.exec(line);
91
+ return parts ? createFrame(parts[2], parts[3] || browser.UNKNOWN_FUNCTION, +parts[1]) : void 0;
92
+ };
93
+ const opera10StackLineParser = [OPERA10_PRIORITY, opera10];
94
+ const opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i;
95
+ const opera11 = (line) => {
96
+ const parts = opera11Regex.exec(line);
97
+ return parts ? createFrame(parts[5], parts[3] || parts[4] || browser.UNKNOWN_FUNCTION, +parts[1], +parts[2]) : void 0;
98
+ };
99
+ const opera11StackLineParser = [OPERA11_PRIORITY, opera11];
100
+ const defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser];
101
+ const defaultStackParser = browser.createStackParser(...defaultStackLineParsers);
102
+ const extractSafariExtensionDetails = (func, filename) => {
103
+ const isSafariExtension = func.indexOf("safari-extension") !== -1;
104
+ const isSafariWebExtension = func.indexOf("safari-web-extension") !== -1;
105
+ return isSafariExtension || isSafariWebExtension ? [
106
+ func.indexOf("@") !== -1 ? func.split("@")[0] : browser.UNKNOWN_FUNCTION,
107
+ isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`
108
+ ] : [func, filename];
109
+ };
110
+
111
+ exports.chromeStackLineParser = chromeStackLineParser;
112
+ exports.defaultStackLineParsers = defaultStackLineParsers;
113
+ exports.defaultStackParser = defaultStackParser;
114
+ exports.geckoStackLineParser = geckoStackLineParser;
115
+ exports.opera10StackLineParser = opera10StackLineParser;
116
+ exports.opera11StackLineParser = opera11StackLineParser;
117
+ exports.winjsStackLineParser = winjsStackLineParser;
118
+ //# sourceMappingURL=stack-parsers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stack-parsers.js","sources":["../../../../src/stack-parsers.ts"],"sourcesContent":["// This was originally forked from https://github.com/csnover/TraceKit, and was largely\n// re - written as part of raven - js.\n//\n// This code was later copied to the JavaScript mono - repo and further modified and\n// refactored over the years.\n\n// Copyright (c) 2013 Onur Can Cakmak onur.cakmak@gmail.com and all TraceKit contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy of this\n// software and associated documentation files(the 'Software'), to deal in the Software\n// without restriction, including without limitation the rights to use, copy, modify,\n// merge, publish, distribute, sublicense, and / or sell copies of the Software, and to\n// permit persons to whom the Software is furnished to do so, subject to the following\n// conditions:\n//\n// The above copyright notice and this permission notice shall be included in all copies\n// or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,\n// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n// PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF\n// CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE\n// OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nimport type { StackFrame, StackLineParser, StackLineParserFn } from '@elenjical/core/browser';\nimport { createStackParser, UNKNOWN_FUNCTION } from '@elenjical/core/browser';\n\nconst OPERA10_PRIORITY = 10;\nconst OPERA11_PRIORITY = 20;\nconst CHROME_PRIORITY = 30;\nconst WINJS_PRIORITY = 40;\nconst GECKO_PRIORITY = 50;\n\nfunction createFrame(filename: string, func: string, lineno?: number, colno?: number): StackFrame {\n const frame: StackFrame = {\n filename,\n function: func === '<anonymous>' ? UNKNOWN_FUNCTION : func,\n in_app: true, // All browser frames are considered in_app\n };\n\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n\n if (colno !== undefined) {\n frame.colno = colno;\n }\n\n return frame;\n}\n\n// This regex matches frames that have no function name (ie. are at the top level of a module).\n// For example \"at http://localhost:5000//script.js:1:126\"\n// Frames _with_ function names usually look as follows: \"at commitLayoutEffects (react-dom.development.js:23426:1)\"\nconst chromeRegexNoFnName = /^\\s*at (\\S+?)(?::(\\d+))(?::(\\d+))\\s*$/i;\n\n// This regex matches all the frames that have a function name.\nconst chromeRegex =\n /^\\s*at (?:(.+?\\)(?: \\[.+\\])?|.*?) ?\\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\\/)?.*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n\nconst chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\n// Matches stack frames with data URIs instead of filename so we can still get the function name\n// Example: \"at dynamicFn (data:application/javascript,export function dynamicFn() {...\"\nconst chromeDataUriRegex = /at (.+?) ?\\(data:(.+?),/;\n\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\n// We cannot call this variable `chrome` because it can conflict with global `chrome` variable in certain environments\n// See: https://github.com/getsentry/sentry-javascript/issues/6880\nconst chromeStackParserFn: StackLineParserFn = line => {\n const dataUriMatch = line.match(chromeDataUriRegex);\n if (dataUriMatch) {\n return {\n filename: `<data:${dataUriMatch[2]}>`,\n function: dataUriMatch[1],\n };\n }\n\n // If the stack line has no function name, we need to parse it differently\n const noFnParts = chromeRegexNoFnName.exec(line) as null | [string, string, string, string];\n\n if (noFnParts) {\n const [, filename, line, col] = noFnParts;\n return createFrame(filename, UNKNOWN_FUNCTION, +line, +col);\n }\n\n const parts = chromeRegex.exec(line) as null | [string, string, string, string, string];\n\n if (parts) {\n const isEval = parts[2]?.indexOf('eval') === 0; // start of line\n\n if (isEval) {\n const subMatch = chromeEvalRegex.exec(parts[2]) as null | [string, string, string, string];\n\n if (subMatch) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = subMatch[1]; // url\n parts[3] = subMatch[2]; // line\n parts[4] = subMatch[3]; // column\n }\n }\n\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);\n\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n\n return;\n};\n\nexport const chromeStackLineParser: StackLineParser = [CHROME_PRIORITY, chromeStackParserFn];\n\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nconst geckoREgex =\n /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:[-a-z]+)?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nconst geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nconst gecko: StackLineParserFn = line => {\n const parts = geckoREgex.exec(line) as null | [string, string, string, string, string, string];\n\n if (parts) {\n const isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n const subMatch = geckoEvalRegex.exec(parts[3]) as null | [string, string, string];\n\n if (subMatch) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || 'eval';\n parts[3] = subMatch[1];\n parts[4] = subMatch[2];\n parts[5] = ''; // no column when eval\n }\n }\n\n let filename = parts[3];\n let func = parts[1] || UNKNOWN_FUNCTION;\n [func, filename] = extractSafariExtensionDetails(func, filename);\n\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n\n return;\n};\n\nexport const geckoStackLineParser: StackLineParser = [GECKO_PRIORITY, gecko];\n\nconst winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:[-a-z]+):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nconst winjs: StackLineParserFn = line => {\n const parts = winjsRegex.exec(line) as null | [string, string, string, string, string];\n\n return parts\n ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n : undefined;\n};\n\nexport const winjsStackLineParser: StackLineParser = [WINJS_PRIORITY, winjs];\n\nconst opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n\nconst opera10: StackLineParserFn = line => {\n const parts = opera10Regex.exec(line) as null | [string, string, string, string];\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\n\nexport const opera10StackLineParser: StackLineParser = [OPERA10_PRIORITY, opera10];\n\nconst opera11Regex =\n / line (\\d+), column (\\d+)\\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\n\nconst opera11: StackLineParserFn = line => {\n const parts = opera11Regex.exec(line) as null | [string, string, string, string, string, string];\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\n\nexport const opera11StackLineParser: StackLineParser = [OPERA11_PRIORITY, opera11];\n\nexport const defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser];\n\nexport const defaultStackParser = createStackParser(...defaultStackLineParsers);\n\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nconst extractSafariExtensionDetails = (func: string, filename: string): [string, string] => {\n const isSafariExtension = func.indexOf('safari-extension') !== -1;\n const isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? (func.split('@')[0] as string) : UNKNOWN_FUNCTION,\n isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,\n ]\n : [func, filename];\n};\n"],"names":["UNKNOWN_FUNCTION","line","createStackParser"],"mappings":"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"}
@@ -0,0 +1,34 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const browser = require('@elenjical/core/browser');
4
+ const debugBuild = require('../debug-build.js');
5
+ const helpers = require('../helpers.js');
6
+
7
+ function registerBackgroundTabDetection() {
8
+ if (helpers.WINDOW.document) {
9
+ helpers.WINDOW.document.addEventListener("visibilitychange", () => {
10
+ const activeSpan = browser.getActiveSpan();
11
+ if (!activeSpan) {
12
+ return;
13
+ }
14
+ const rootSpan = browser.getRootSpan(activeSpan);
15
+ if (helpers.WINDOW.document.hidden && rootSpan) {
16
+ const cancelledStatus = "cancelled";
17
+ const { op, status } = browser.spanToJSON(rootSpan);
18
+ if (debugBuild.DEBUG_BUILD) {
19
+ browser.debug.log(`[Tracing] Transaction: ${cancelledStatus} -> since tab moved to the background, op: ${op}`);
20
+ }
21
+ if (!status) {
22
+ rootSpan.setStatus({ code: browser.SPAN_STATUS_ERROR, message: cancelledStatus });
23
+ }
24
+ rootSpan.setAttribute("sentry.cancellation_reason", "document.hidden");
25
+ rootSpan.end();
26
+ }
27
+ });
28
+ } else {
29
+ debugBuild.DEBUG_BUILD && browser.debug.warn("[Tracing] Could not set up background tab detection due to lack of global document");
30
+ }
31
+ }
32
+
33
+ exports.registerBackgroundTabDetection = registerBackgroundTabDetection;
34
+ //# sourceMappingURL=backgroundtab.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backgroundtab.js","sources":["../../../../../src/tracing/backgroundtab.ts"],"sourcesContent":["import { debug, getActiveSpan, getRootSpan, SPAN_STATUS_ERROR, spanToJSON } from '@elenjical/core/browser';\nimport { DEBUG_BUILD } from '../debug-build';\nimport { WINDOW } from '../helpers';\n\n/**\n * Add a listener that cancels and finishes a transaction when the global\n * document is hidden.\n */\nexport function registerBackgroundTabDetection(): void {\n if (WINDOW.document) {\n WINDOW.document.addEventListener('visibilitychange', () => {\n const activeSpan = getActiveSpan();\n if (!activeSpan) {\n return;\n }\n\n const rootSpan = getRootSpan(activeSpan);\n\n if (WINDOW.document.hidden && rootSpan) {\n const cancelledStatus = 'cancelled';\n\n const { op, status } = spanToJSON(rootSpan);\n\n if (DEBUG_BUILD) {\n debug.log(`[Tracing] Transaction: ${cancelledStatus} -> since tab moved to the background, op: ${op}`);\n }\n\n // We should not set status if it is already set, this prevent important statuses like\n // error or data loss from being overwritten on transaction.\n if (!status) {\n rootSpan.setStatus({ code: SPAN_STATUS_ERROR, message: cancelledStatus });\n }\n\n rootSpan.setAttribute('sentry.cancellation_reason', 'document.hidden');\n rootSpan.end();\n }\n });\n } else {\n DEBUG_BUILD && debug.warn('[Tracing] Could not set up background tab detection due to lack of global document');\n }\n}\n"],"names":["WINDOW","getActiveSpan","getRootSpan","spanToJSON","DEBUG_BUILD","debug","SPAN_STATUS_ERROR"],"mappings":";;;;;;AAQO,SAAS,8BAAA,GAAuC;AACrD,EAAA,IAAIA,eAAO,QAAA,EAAU;AACnB,IAAAA,cAAA,CAAO,QAAA,CAAS,gBAAA,CAAiB,kBAAA,EAAoB,MAAM;AACzD,MAAA,MAAM,aAAaC,qBAAA,EAAc;AACjC,MAAA,IAAI,CAAC,UAAA,EAAY;AACf,QAAA;AAAA,MACF;AAEA,MAAA,MAAM,QAAA,GAAWC,oBAAY,UAAU,CAAA;AAEvC,MAAA,IAAIF,cAAA,CAAO,QAAA,CAAS,MAAA,IAAU,QAAA,EAAU;AACtC,QAAA,MAAM,eAAA,GAAkB,WAAA;AAExB,QAAA,MAAM,EAAE,EAAA,EAAI,MAAA,EAAO,GAAIG,mBAAW,QAAQ,CAAA;AAE1C,QAAA,IAAIC,sBAAA,EAAa;AACf,UAAAC,aAAA,CAAM,GAAA,CAAI,CAAA,uBAAA,EAA0B,eAAe,CAAA,2CAAA,EAA8C,EAAE,CAAA,CAAE,CAAA;AAAA,QACvG;AAIA,QAAA,IAAI,CAAC,MAAA,EAAQ;AACX,UAAA,QAAA,CAAS,UAAU,EAAE,IAAA,EAAMC,yBAAA,EAAmB,OAAA,EAAS,iBAAiB,CAAA;AAAA,QAC1E;AAEA,QAAA,QAAA,CAAS,YAAA,CAAa,8BAA8B,iBAAiB,CAAA;AACrE,QAAA,QAAA,CAAS,GAAA,EAAI;AAAA,MACf;AAAA,IACF,CAAC,CAAA;AAAA,EACH,CAAA,MAAO;AACL,IAAAF,sBAAA,IAAeC,aAAA,CAAM,KAAK,oFAAoF,CAAA;AAAA,EAChH;AACF;;;;"}