@utk09/ui-observability 1.0.0 → 1.1.0

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 (221) hide show
  1. package/CHANGELOG.md +69 -219
  2. package/README.md +24 -26
  3. package/dist/{batch-CXmPmTse.js → batch-D3NHhF9L.js} +3 -3
  4. package/dist/{batch-CXmPmTse.js.map → batch-D3NHhF9L.js.map} +1 -1
  5. package/dist/{batch-mmPigCpi.cjs → batch-DnYRJqhU.cjs} +2 -2
  6. package/dist/{batch-mmPigCpi.cjs.map → batch-DnYRJqhU.cjs.map} +1 -1
  7. package/dist/bus/bus.d.cts +26 -2
  8. package/dist/bus/bus.d.ts +26 -2
  9. package/dist/bus-B__467mL.cjs +2 -0
  10. package/dist/bus-B__467mL.cjs.map +1 -0
  11. package/dist/{bus-C39wspFV.js → bus-dw7T92sO.js} +37 -24
  12. package/dist/bus-dw7T92sO.js.map +1 -0
  13. package/dist/capture/interactions.d.cts +35 -3
  14. package/dist/capture/interactions.d.ts +35 -3
  15. package/dist/capture/observed-windows.d.cts +51 -0
  16. package/dist/capture/observed-windows.d.ts +51 -0
  17. package/dist/{compression-CvED_Jel.cjs → compression-C0hUHKR-.cjs} +2 -2
  18. package/dist/{compression-CvED_Jel.cjs.map → compression-C0hUHKR-.cjs.map} +1 -1
  19. package/dist/{compression-tVtXwVjX.js → compression-SHPAvS4U.js} +2 -2
  20. package/dist/{compression-tVtXwVjX.js.map → compression-SHPAvS4U.js.map} +1 -1
  21. package/dist/{config-SgQcCP1_.js → config-CSNcS7OZ.js} +194 -196
  22. package/dist/config-CSNcS7OZ.js.map +1 -0
  23. package/dist/config-CybPP5VM.cjs +2 -0
  24. package/dist/config-CybPP5VM.cjs.map +1 -0
  25. package/dist/{console-BGgGnjSi.js → console-BsM-fSCQ.js} +4 -4
  26. package/dist/{console-BGgGnjSi.js.map → console-BsM-fSCQ.js.map} +1 -1
  27. package/dist/{console-CSZ5_Vx5.cjs → console-Dkxs6IVQ.cjs} +2 -2
  28. package/dist/{console-CSZ5_Vx5.cjs.map → console-Dkxs6IVQ.cjs.map} +1 -1
  29. package/dist/{constants-CUyd9cTZ.js → constants-BwJDXzj6.js} +23 -23
  30. package/dist/constants-BwJDXzj6.js.map +1 -0
  31. package/dist/constants-CtF52hIV.cjs +2 -0
  32. package/dist/constants-CtF52hIV.cjs.map +1 -0
  33. package/dist/constants.d.cts +12 -0
  34. package/dist/constants.d.ts +12 -0
  35. package/dist/core/diagnostics.d.cts +1 -1
  36. package/dist/core/diagnostics.d.ts +1 -1
  37. package/dist/core/rotation.d.cts +26 -2
  38. package/dist/core/rotation.d.ts +26 -2
  39. package/dist/core/runtime.d.cts +9 -0
  40. package/dist/core/runtime.d.ts +9 -0
  41. package/dist/{debug-bundle-BXIlwDKM.cjs → debug-bundle-B2v6Cym-.cjs} +2 -2
  42. package/dist/{debug-bundle-BXIlwDKM.cjs.map → debug-bundle-B2v6Cym-.cjs.map} +1 -1
  43. package/dist/{debug-bundle-CRpYV_ui.js → debug-bundle-Cs_YWzTa.js} +4 -4
  44. package/dist/{debug-bundle-CRpYV_ui.js.map → debug-bundle-Cs_YWzTa.js.map} +1 -1
  45. package/dist/doctor.cjs +1 -1
  46. package/dist/doctor.js +31 -31
  47. package/dist/doctor.js.map +1 -1
  48. package/dist/{errors-CNPbesMs.cjs → errors-DP2RUm4V.cjs} +2 -2
  49. package/dist/{errors-CNPbesMs.cjs.map → errors-DP2RUm4V.cjs.map} +1 -1
  50. package/dist/{errors-BE_EZV7Q.js → errors-Q3Ng1ciC.js} +3 -3
  51. package/dist/{errors-BE_EZV7Q.js.map → errors-Q3Ng1ciC.js.map} +1 -1
  52. package/dist/{factory-CTi0Is3F.js → factory-DV17sm2p.js} +22 -22
  53. package/dist/{factory-CTi0Is3F.js.map → factory-DV17sm2p.js.map} +1 -1
  54. package/dist/{factory-hRrH32v5.cjs → factory-K8O6gpux.cjs} +2 -2
  55. package/dist/{factory-hRrH32v5.cjs.map → factory-K8O6gpux.cjs.map} +1 -1
  56. package/dist/{identity-DdhKgrpk.js → identity-BgtHyY4u.js} +38 -27
  57. package/dist/identity-BgtHyY4u.js.map +1 -0
  58. package/dist/identity-CvuyqZk7.cjs +2 -0
  59. package/dist/identity-CvuyqZk7.cjs.map +1 -0
  60. package/dist/index.cjs +1 -1
  61. package/dist/index.cjs.map +1 -1
  62. package/dist/index.d.cts +1 -0
  63. package/dist/index.d.ts +1 -0
  64. package/dist/index.js +600 -569
  65. package/dist/index.js.map +1 -1
  66. package/dist/{indexeddb-storage-CL9uqBCy.cjs → indexeddb-storage-D4KVcqdD.cjs} +2 -2
  67. package/dist/{indexeddb-storage-CL9uqBCy.cjs.map → indexeddb-storage-D4KVcqdD.cjs.map} +1 -1
  68. package/dist/{indexeddb-storage-GHdl0t8A.js → indexeddb-storage-e-13ZLWm.js} +17 -17
  69. package/dist/{indexeddb-storage-GHdl0t8A.js.map → indexeddb-storage-e-13ZLWm.js.map} +1 -1
  70. package/dist/interactions-Byxf1C82.js +207 -0
  71. package/dist/interactions-Byxf1C82.js.map +1 -0
  72. package/dist/interactions-OK85T-Dk.cjs +2 -0
  73. package/dist/interactions-OK85T-Dk.cjs.map +1 -0
  74. package/dist/{journey-D2_sia57.js → journey-C93FTYcs.js} +14 -14
  75. package/dist/{journey-D2_sia57.js.map → journey-C93FTYcs.js.map} +1 -1
  76. package/dist/{journey-B4Adltjm.cjs → journey-nMbob3OB.cjs} +2 -2
  77. package/dist/{journey-B4Adltjm.cjs.map → journey-nMbob3OB.cjs.map} +1 -1
  78. package/dist/{library-console-CPW6bvZH.cjs → library-console-DJUQzcgM.cjs} +2 -2
  79. package/dist/{library-console-CPW6bvZH.cjs.map → library-console-DJUQzcgM.cjs.map} +1 -1
  80. package/dist/{library-console-Btrzt814.js → library-console-DklSmucS.js} +2 -2
  81. package/dist/{library-console-Btrzt814.js.map → library-console-DklSmucS.js.map} +1 -1
  82. package/dist/{library-request-BJ9PLRaD.js → library-request-UGEwOHpf.js} +2 -2
  83. package/dist/{library-request-BJ9PLRaD.js.map → library-request-UGEwOHpf.js.map} +1 -1
  84. package/dist/{library-request-D7OvTxZV.cjs → library-request-kY9iTpIF.cjs} +2 -2
  85. package/dist/{library-request-D7OvTxZV.cjs.map → library-request-kY9iTpIF.cjs.map} +1 -1
  86. package/dist/{lifecycle-22CUCrc9.js → lifecycle-B2PlIuQu.js} +2 -2
  87. package/dist/{lifecycle-22CUCrc9.js.map → lifecycle-B2PlIuQu.js.map} +1 -1
  88. package/dist/{lifecycle-IaAm1mOC.cjs → lifecycle-DaMdH_X7.cjs} +2 -2
  89. package/dist/{lifecycle-IaAm1mOC.cjs.map → lifecycle-DaMdH_X7.cjs.map} +1 -1
  90. package/dist/{log-record-CkivuiEl.cjs → log-record-Bmx6etMh.cjs} +2 -2
  91. package/dist/{log-record-CkivuiEl.cjs.map → log-record-Bmx6etMh.cjs.map} +1 -1
  92. package/dist/{log-record-BNiLfqtL.js → log-record-DSt2P-Sr.js} +2 -2
  93. package/dist/{log-record-BNiLfqtL.js.map → log-record-DSt2P-Sr.js.map} +1 -1
  94. package/dist/{long-frames-DNFaRnC3.js → long-frames-Bamjs1WV.js} +3 -3
  95. package/dist/{long-frames-DNFaRnC3.js.map → long-frames-Bamjs1WV.js.map} +1 -1
  96. package/dist/{long-frames-BUUbXd-B.cjs → long-frames-lhtONgGt.cjs} +2 -2
  97. package/dist/{long-frames-BUUbXd-B.cjs.map → long-frames-lhtONgGt.cjs.map} +1 -1
  98. package/dist/models/bus.d.cts +6 -1
  99. package/dist/models/bus.d.ts +6 -1
  100. package/dist/models/config.d.cts +23 -8
  101. package/dist/models/config.d.ts +23 -8
  102. package/dist/models/serializer.d.cts +3 -1
  103. package/dist/models/serializer.d.ts +3 -1
  104. package/dist/{network-CGMLQ-mA.cjs → network-BCn8Gn47.cjs} +2 -2
  105. package/dist/{network-CGMLQ-mA.cjs.map → network-BCn8Gn47.cjs.map} +1 -1
  106. package/dist/{network-on2zZT6H.js → network-Cg1L2w2r.js} +12 -12
  107. package/dist/{network-on2zZT6H.js.map → network-Cg1L2w2r.js.map} +1 -1
  108. package/dist/observed-windows-B3gJkdql.cjs +2 -0
  109. package/dist/observed-windows-B3gJkdql.cjs.map +1 -0
  110. package/dist/observed-windows-BrwaJNlj.js +64 -0
  111. package/dist/observed-windows-BrwaJNlj.js.map +1 -0
  112. package/dist/{otlp-BENHf3g9.cjs → otlp-CrAWkQdO.cjs} +2 -2
  113. package/dist/{otlp-BENHf3g9.cjs.map → otlp-CrAWkQdO.cjs.map} +1 -1
  114. package/dist/{otlp-DimfrRor.js → otlp-D6dRZyB8.js} +6 -6
  115. package/dist/{otlp-DimfrRor.js.map → otlp-D6dRZyB8.js.map} +1 -1
  116. package/dist/{platform-BaaFIPCU.js → platform-8DLhjddo.js} +7 -7
  117. package/dist/{platform-BaaFIPCU.js.map → platform-8DLhjddo.js.map} +1 -1
  118. package/dist/{platform-CfA3-7sJ.cjs → platform-BqRc-7RO.cjs} +2 -2
  119. package/dist/{platform-CfA3-7sJ.cjs.map → platform-BqRc-7RO.cjs.map} +1 -1
  120. package/dist/{profiler-BAZoh7A4.js → profiler-BaXSqCfz.js} +59 -59
  121. package/dist/{profiler-BAZoh7A4.js.map → profiler-BaXSqCfz.js.map} +1 -1
  122. package/dist/{profiler-D4tJpDRc.cjs → profiler-BvWW2kNM.cjs} +2 -2
  123. package/dist/{profiler-D4tJpDRc.cjs.map → profiler-BvWW2kNM.cjs.map} +1 -1
  124. package/dist/{profiler-frames-cJMx9wNM.js → profiler-frames-C4ySHN0X.js} +16 -16
  125. package/dist/{profiler-frames-cJMx9wNM.js.map → profiler-frames-C4ySHN0X.js.map} +1 -1
  126. package/dist/{profiler-frames-C4xr7KfH.cjs → profiler-frames-DeaBiB-5.cjs} +2 -2
  127. package/dist/{profiler-frames-C4xr7KfH.cjs.map → profiler-frames-DeaBiB-5.cjs.map} +1 -1
  128. package/dist/{remote-rules-_tY0zj5o.cjs → remote-rules-D7L6D_D2.cjs} +2 -2
  129. package/dist/{remote-rules-_tY0zj5o.cjs.map → remote-rules-D7L6D_D2.cjs.map} +1 -1
  130. package/dist/{remote-rules-Dz9MRAsB.js → remote-rules-Dq9xe7Qn.js} +22 -22
  131. package/dist/{remote-rules-Dz9MRAsB.js.map → remote-rules-Dq9xe7Qn.js.map} +1 -1
  132. package/dist/{replay-Ds-ANH34.js → replay-B0M8kWz_.js} +24 -24
  133. package/dist/{replay-Ds-ANH34.js.map → replay-B0M8kWz_.js.map} +1 -1
  134. package/dist/{replay-B3gFXIZd.cjs → replay-QOFBpAXh.cjs} +2 -2
  135. package/dist/{replay-B3gFXIZd.cjs.map → replay-QOFBpAXh.cjs.map} +1 -1
  136. package/dist/{reports-C-thq-bk.js → reports--8APRLa-.js} +3 -3
  137. package/dist/{reports-C-thq-bk.js.map → reports--8APRLa-.js.map} +1 -1
  138. package/dist/{reports-BDSe4dFH.cjs → reports-ojuMKGO7.cjs} +2 -2
  139. package/dist/{reports-BDSe4dFH.cjs.map → reports-ojuMKGO7.cjs.map} +1 -1
  140. package/dist/{resource-timing-eUl2dNgC.js → resource-timing-BzR05rE-.js} +4 -4
  141. package/dist/{resource-timing-eUl2dNgC.js.map → resource-timing-BzR05rE-.js.map} +1 -1
  142. package/dist/{resource-timing-C576gFIQ.cjs → resource-timing-pAG3ZhB5.cjs} +2 -2
  143. package/dist/{resource-timing-C576gFIQ.cjs.map → resource-timing-pAG3ZhB5.cjs.map} +1 -1
  144. package/dist/{response-body-eoSQpLiH.js → response-body-BWvwKQ2p.js} +106 -106
  145. package/dist/{response-body-eoSQpLiH.js.map → response-body-BWvwKQ2p.js.map} +1 -1
  146. package/dist/{response-body-YdNl-HkR.cjs → response-body-CKEJ5itk.cjs} +3 -3
  147. package/dist/{response-body-YdNl-HkR.cjs.map → response-body-CKEJ5itk.cjs.map} +1 -1
  148. package/dist/{rotation-Cwct4ckk.js → rotation-BylN1B9e.js} +10 -11
  149. package/dist/rotation-BylN1B9e.js.map +1 -0
  150. package/dist/rotation-E2eKClIs.cjs +2 -0
  151. package/dist/rotation-E2eKClIs.cjs.map +1 -0
  152. package/dist/{sampling-mXt4dstx.cjs → sampling-B46LW0cy.cjs} +2 -2
  153. package/dist/{sampling-mXt4dstx.cjs.map → sampling-B46LW0cy.cjs.map} +1 -1
  154. package/dist/{sampling-BlrI8jor.js → sampling-zXA6r-Nw.js} +16 -16
  155. package/dist/{sampling-BlrI8jor.js.map → sampling-zXA6r-Nw.js.map} +1 -1
  156. package/dist/{sanitize-Ba0KqU06.js → sanitize-DjnR6RXR.js} +2 -2
  157. package/dist/{sanitize-Ba0KqU06.js.map → sanitize-DjnR6RXR.js.map} +1 -1
  158. package/dist/{sanitize-DQyiI_KY.cjs → sanitize-Qj6LuZqp.cjs} +2 -2
  159. package/dist/{sanitize-DQyiI_KY.cjs.map → sanitize-Qj6LuZqp.cjs.map} +1 -1
  160. package/dist/{sender-Dv8rAmpV.js → sender-Bdp-TAS4.js} +71 -71
  161. package/dist/{sender-Dv8rAmpV.js.map → sender-Bdp-TAS4.js.map} +1 -1
  162. package/dist/{sender-BdRuNVhF.cjs → sender-DR7ZycZY.cjs} +2 -2
  163. package/dist/{sender-BdRuNVhF.cjs.map → sender-DR7ZycZY.cjs.map} +1 -1
  164. package/dist/{stored-context-CXt7eHZL.cjs → stored-context-BOu54M8Y.cjs} +2 -2
  165. package/dist/{stored-context-CXt7eHZL.cjs.map → stored-context-BOu54M8Y.cjs.map} +1 -1
  166. package/dist/{stored-context-B2EzVuYm.js → stored-context-CSttrAsw.js} +6 -6
  167. package/dist/{stored-context-B2EzVuYm.js.map → stored-context-CSttrAsw.js.map} +1 -1
  168. package/dist/{storm-C-zYSdDX.cjs → storm-BHgI12iS.cjs} +2 -2
  169. package/dist/{storm-C-zYSdDX.cjs.map → storm-BHgI12iS.cjs.map} +1 -1
  170. package/dist/{storm-DjKetLKZ.js → storm-DKlpv0FL.js} +2 -2
  171. package/dist/{storm-DjKetLKZ.js.map → storm-DKlpv0FL.js.map} +1 -1
  172. package/dist/{unclean-exit-py99ApzT.cjs → unclean-exit-BYPYYkQ5.cjs} +2 -2
  173. package/dist/{unclean-exit-py99ApzT.cjs.map → unclean-exit-BYPYYkQ5.cjs.map} +1 -1
  174. package/dist/{unclean-exit-DQD1cT7c.js → unclean-exit-BcOB8A2e.js} +2 -2
  175. package/dist/{unclean-exit-DQD1cT7c.js.map → unclean-exit-BcOB8A2e.js.map} +1 -1
  176. package/dist/{user-timing-BePqb1uN.js → user-timing-4KIJ74Vi.js} +2 -2
  177. package/dist/{user-timing-BePqb1uN.js.map → user-timing-4KIJ74Vi.js.map} +1 -1
  178. package/dist/{user-timing-D6XTmpuM.cjs → user-timing-BsU2wQKE.cjs} +2 -2
  179. package/dist/{user-timing-D6XTmpuM.cjs.map → user-timing-BsU2wQKE.cjs.map} +1 -1
  180. package/dist/utils/identity.d.cts +5 -0
  181. package/dist/utils/identity.d.ts +5 -0
  182. package/dist/{web-socket-CoIUBM3C.cjs → web-socket-Cs1ZbmmN.cjs} +2 -2
  183. package/dist/{web-socket-CoIUBM3C.cjs.map → web-socket-Cs1ZbmmN.cjs.map} +1 -1
  184. package/dist/{web-socket-DSHgDiZ6.js → web-socket-Zg0hj1LB.js} +4 -4
  185. package/dist/{web-socket-DSHgDiZ6.js.map → web-socket-Zg0hj1LB.js.map} +1 -1
  186. package/dist/{worker-protocol-x074Rpet.js → worker-protocol-CYpAbrVl.js} +4 -4
  187. package/dist/{worker-protocol-x074Rpet.js.map → worker-protocol-CYpAbrVl.js.map} +1 -1
  188. package/dist/{worker-protocol-QbvqNazn.cjs → worker-protocol-DFYXIFus.cjs} +2 -2
  189. package/dist/{worker-protocol-QbvqNazn.cjs.map → worker-protocol-DFYXIFus.cjs.map} +1 -1
  190. package/dist/{worker-server-CFe4nvos.cjs → worker-server--yGTadTA.cjs} +2 -2
  191. package/dist/{worker-server-CFe4nvos.cjs.map → worker-server--yGTadTA.cjs.map} +1 -1
  192. package/dist/{worker-server-iUVSjH8L.js → worker-server-BokySIII.js} +25 -25
  193. package/dist/{worker-server-iUVSjH8L.js.map → worker-server-BokySIII.js.map} +1 -1
  194. package/dist/worker-transport-BdEvh_-a.cjs +2 -0
  195. package/dist/worker-transport-BdEvh_-a.cjs.map +1 -0
  196. package/dist/{worker-transport-Dy1KMA7t.js → worker-transport-JK-Fby9J.js} +23 -19
  197. package/dist/worker-transport-JK-Fby9J.js.map +1 -0
  198. package/llms.txt +13 -10
  199. package/package.json +13 -5
  200. package/dist/bus-C39wspFV.js.map +0 -1
  201. package/dist/bus-_EaOVPGq.cjs +0 -2
  202. package/dist/bus-_EaOVPGq.cjs.map +0 -1
  203. package/dist/config-DUs7uHHt.cjs +0 -2
  204. package/dist/config-DUs7uHHt.cjs.map +0 -1
  205. package/dist/config-SgQcCP1_.js.map +0 -1
  206. package/dist/constants-CUyd9cTZ.js.map +0 -1
  207. package/dist/constants-CqdJhTxH.cjs +0 -2
  208. package/dist/constants-CqdJhTxH.cjs.map +0 -1
  209. package/dist/identity-DdhKgrpk.js.map +0 -1
  210. package/dist/identity-DlWRIuwy.cjs +0 -2
  211. package/dist/identity-DlWRIuwy.cjs.map +0 -1
  212. package/dist/interactions-CUkzK8sR.cjs +0 -2
  213. package/dist/interactions-CUkzK8sR.cjs.map +0 -1
  214. package/dist/interactions-DiFvCosX.js +0 -111
  215. package/dist/interactions-DiFvCosX.js.map +0 -1
  216. package/dist/rotation-Cwct4ckk.js.map +0 -1
  217. package/dist/rotation-D4qUAHAu.cjs +0 -2
  218. package/dist/rotation-D4qUAHAu.cjs.map +0 -1
  219. package/dist/worker-transport-CRAX-09c.cjs +0 -2
  220. package/dist/worker-transport-CRAX-09c.cjs.map +0 -1
  221. package/dist/worker-transport-Dy1KMA7t.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"config-SgQcCP1_.js","names":["BEACON_LIMIT_BYTES","SERIALIZER_NAME_OTLP","CONFIG_SECTIONS","CONSOLE_DEFAULT_LEVEL","CONSOLE_DEFAULT_STYLES","DEFAULT_CONFIG","PROFILER_PROBE_LIMIT","UNKNOWN_SERVICE_NAME","LEVEL_ORDER","UNDEFAULTED_CONFIG_KEYS","REMOTE_CAPTURE_FLAGS","UNDEFAULTED_SECTION_KEYS","isObject","hasOwn","LEVEL_NAMES","COMPRESSION_VALUES","CREDENTIALS_VALUES","STORAGE_VALUES","IDENTITY_VALUES","BUS_MODE_VALUES","OPENFIN_ROLE_VALUES","JOURNEY_SCOPE_VALUES","CONSOLE_METHOD_VALUES","LOG_TYPE_VALUES","BATCHING_RANGES","MAX_BATCHES_RANGE","RETENTION_AGE_RANGE","RETENTION_ATTEMPTS_RANGE","LIMIT_RANGES","JOURNEY_AGE_RANGE","DURATION_RANGE","POSITIVE_DURATION_RANGE","COUNT_RANGE","POSITIVE_RANGE","CLICK_WAIT_RANGE","isStrings","value","entry","isFunctions","isFunctionOrNull","isNull","SCHEME_PATTERN","isRate","HOOK_EXPECTED","URL_EXPECTED","isHeaders","isRecord","keepKind","describeValue","fallback","test","reportInvalid","diagnostics","key","expected","describe","pageBase","absoluteUrl","url","error","resolveDestination","describeKind","resolveEndpoint","POLICY_RULES","resolveDiagnosticRecords","CAPTURE_FLAG_KEYS","SANDBOX_ORIGIN","LEVEL_EXPECTED","listOf","CONSOLE_LEVELS_EXPECTED","PATTERN_LIST_EXPECTED","TARGET_LIST_EXPECTED","ORIGIN_LIST_EXPECTED","LOG_TYPE_LIST_EXPECTED","DIAGNOSTIC_RECORDS_EXPECTED","quoted","values","kept","resolveChoice","match","accepted","resolveBoolean","resolveNonNegative","resolveInteger","min","max","range","resolveLimit","resolveHook","REFUSE_RECORDS","resolveRedact","resolveProcessors","resolveString","resolveRate","resolveRates","rates","ns","rate","resolveRanges","given","input","keys","ranges","section","base","toLevel","upper","level","resolveLevel","resolveMinLevels","levels","prefix","raw","resolveList","entries","accept","toPlugin","toStringEntry","toLogType","type","toPattern","toConsoleMethod","method","toOrigin","origin","toTarget","isStringRecord","resolveHeaders","isSerializer","resolveSerializer","requested","previous","CONSOLE_STYLE_KEYS","validStyles","valid","styles","resolveConsoleLevel","resolveConsole","resolveSampling","resolveBus","resolveJourney","resolveRetention","resolveCaptureOptions","resolved","fields","name","resolveCapture","capture","resolveInteractions","ignore","ignoreSelector","actionAttribute","SIGNAL_OFF","resolveSignalEndpoint","serializer","resolvePolicy","next","rules","limit","choice","custom","checkSections","checked","reportIneffective","config","noEffect","condition","sampling","requests","resolveConfig","policies","merged","reportUnknownKeys","known","sectionKeys","applyResolvedConfig","target"],"sources":["../src/core/config.ts"],"sourcesContent":["// src/core/config.ts\n//\n// Resolves partial consumer options into a validated config, and updates the live config.\n// Three rules to follow here, because breaking any one fails silently:\n// 1. Merge a reconfigure onto the current config, not onto the defaults.\n// 2. Change the resolved object in place, never replace it. Subsystems keep the\n// reference they got at construction.\n// 3. An omitted key or undefined keeps the current value at every depth. Only null clears a\n// hook or lifts a limit, so an unset variable can't remove redact.\n// A getter in the app's input can throw here. ObservabilityRuntime.configure() catches it, so\n// configure() never throws into the app.\n\nimport {\n ACTION_ATTRIBUTE_DEFAULT,\n BEACON_LIMIT_BYTES,\n CONFIG_SECTIONS,\n CONSOLE_DEFAULT_LEVEL,\n CONSOLE_DEFAULT_STYLES,\n DEAD_CLICK_MS,\n DEFAULT_CONFIG,\n HOLD_BUFFER_HEAD_RECORDS,\n LEVEL_ORDER,\n LONG_FRAME_THRESHOLD_MS,\n PROFILER_PROBE_LIMIT,\n REMOTE_CAPTURE_FLAGS,\n RESOURCE_SLOW_MS,\n RAGE_CLICK_COUNT,\n RAGE_CLICK_WINDOW_MS,\n SAMPLING_RATE_MAX,\n SAMPLING_RATE_MIN,\n SERIALIZER_NAME_ECS,\n SERIALIZER_NAME_OTLP,\n UNDEFAULTED_CONFIG_KEYS,\n UNDEFAULTED_SECTION_KEYS,\n UNKNOWN_SERVICE_NAME,\n} from \"../constants\";\nimport type {\n BatchingOptions,\n BusOptions,\n CaptureOptions,\n CapturedConsoleMethod,\n ConsoleStyles,\n InteractionOptions,\n JourneyOptions,\n LimitsOptions,\n ObservabilityConfig,\n ResolvedConfig,\n ResolvedConsole,\n RetentionOptions,\n SamplingOptions,\n SerializerChoice,\n} from \"../models/config\";\nimport type { LogLevel, LogType } from \"../models/log-record\";\nimport type { CapturePlugin } from \"../models/plugin\";\nimport type { LogSerializer } from \"../models/serializer\";\nimport { hasOwn, isObject } from \"../utils/guards\";\nimport type { Diagnostics } from \"./diagnostics\";\n\n/** Level names in severity order. */\nconst LEVEL_NAMES = Object.keys(LEVEL_ORDER) as readonly LogLevel[];\n\n/** Accepted values for each choice option. */\nconst COMPRESSION_VALUES = [\"gzip\", \"none\"] as const;\nconst CREDENTIALS_VALUES = [\"omit\", \"same-origin\", \"include\"] as const;\nconst STORAGE_VALUES = [\"auto\", \"indexeddb\", \"localstorage\", \"memory\", \"none\"] as const;\nconst IDENTITY_VALUES = [\"storage\", \"memory\"] as const;\nconst BUS_MODE_VALUES = [\"auto\", \"sender\", \"forwarder\", \"off\"] as const;\nconst OPENFIN_ROLE_VALUES = [\"auto\", \"provider\", \"client\"] as const;\nconst JOURNEY_SCOPE_VALUES = [\"auto\", \"context\", \"tab\", \"origin\"] as const;\nconst CONSOLE_METHOD_VALUES = [\"error\", \"warn\", \"info\", \"log\"] as const;\nconst LOG_TYPE_VALUES: readonly LogType[] = [\"action\", \"event\", \"metric\", \"log\", \"system\", \"span\"];\n\n/** Lowest and highest value an integer option accepts. */\ntype Range = readonly [min: number, max: number];\n\n/** Accepted range for each batching key. */\nconst BATCHING_RANGES: Record<keyof BatchingOptions, Range> = {\n logFlushIntervalMs: [100, 60_000],\n logBatchSize: [1, 1000],\n metricBatchSize: [1, 1000],\n};\n\n/** Accepted range for retention.maxBatches. */\nconst MAX_BATCHES_RANGE: Range = [1, 5000];\n\n/** Accepted range for retention.maxAgeMs. null lifts the age limit. */\nconst RETENTION_AGE_RANGE: Range = [60_000, 7 * 24 * 60 * 60 * 1000];\n\n/** Accepted range for retention.maxAttempts. null lifts the attempt limit. */\nconst RETENTION_ATTEMPTS_RANGE: Range = [1, 20];\n\n/**\n * Accepted range for each record limit. maxRecordBytes tops out at one beacon, and the body\n * and error fields don't count toward it. An exit batch larger than one beacon goes to the\n * emergency queue.\n */\nconst LIMIT_RANGES: Record<keyof LimitsOptions, Range> = {\n maxBodyChars: [256, 65_536],\n maxAttributeChars: [256, 65_536],\n maxAttributeCount: [1, 1024],\n maxStackChars: [256, 65_536],\n maxDepth: [1, 16],\n maxArrayLength: [1, 10_000],\n maxNodes: [100, 100_000],\n maxRecordBytes: [1024, BEACON_LIMIT_BYTES],\n};\n\n/** Accepted range for journey.maxAgeMs. */\nconst JOURNEY_AGE_RANGE: Range = [60_000, 24 * 60 * 60 * 1000];\n\n/** Range for a duration. The maximum is the largest delay a browser timer accepts. */\nconst DURATION_RANGE: Range = [0, 2_147_483_647];\n\n/** Range for a duration that must be at least 1 ms, because 0 would expire at once. */\nconst POSITIVE_DURATION_RANGE: Range = [1, DURATION_RANGE[1]];\n\n/** Range for a count. Zero allows nothing. */\nconst COUNT_RANGE: Range = [0, Number.MAX_SAFE_INTEGER];\n\n/** Range for a count that must be at least 1. */\nconst POSITIVE_RANGE: Range = [1, Number.MAX_SAFE_INTEGER];\n\n/** Range for the rage click and dead click detection waits. */\nconst CLICK_WAIT_RANGE: Range = [100, 10_000];\n\n/** The keys of a policy section whose values are numbers. */\ntype NumberKeys<T> = { [K in keyof T]: T[K] extends number ? K : never }[keyof T];\n\n/** The keys of a policy section that take a number, or null for no limit. */\ntype LimitKeys<T> = {\n [K in keyof T]: T[K] extends number | null ? (null extends T[K] ? K : never) : never;\n}[keyof T];\n\n/** The policy sections resolvePolicy() checks. */\ntype PolicySection =\n | \"captureLimits\"\n | \"metadata\"\n | \"storage\"\n | \"diagnostics\"\n | \"correlation\"\n | \"metrics\"\n | \"buffering\"\n | \"delivery\"\n | \"debugBuffer\"\n | \"profiler\"\n | \"replay\";\n\n/**\n * Reads one policy key the generic checks can't handle, for example a list.\n * @param key Full config key for the diagnostic message.\n * @param value The value the consumer passed.\n * @param fallback The current value.\n * @param diagnostics Diagnostics reporter.\n * @returns The value to use.\n */\ntype CustomResolver = (\n key: string,\n value: unknown,\n fallback: unknown,\n diagnostics: Diagnostics,\n) => unknown;\n\n/** True for an array of strings. */\nconst isStrings = (value: unknown): boolean =>\n Array.isArray(value) && value.every((entry) => typeof entry === \"string\");\n\n/** True for an array of functions. */\nconst isFunctions = (value: unknown): boolean =>\n Array.isArray(value) && value.every((entry) => typeof entry === \"function\");\n\n/** True for a function or null. */\nconst isFunctionOrNull = (value: unknown): boolean => value === null || typeof value === \"function\";\n\n/** True for null. */\nconst isNull = (value: unknown): boolean => value === null;\n\n/** Matches a URL that names its scheme, for example \"https:\". A relative URL has none. */\nconst SCHEME_PATTERN = /^[a-z][a-z\\d+.-]*:/i;\n\n/** True for a sampling rate from 0 to 1. NaN fails both comparisons, so it's rejected too. */\nconst isRate = (value: unknown): value is number =>\n typeof value === \"number\" && value >= SAMPLING_RATE_MIN && value <= SAMPLING_RATE_MAX;\n\n/** How a hook value and a URL value read in a config.invalid message. */\nconst HOOK_EXPECTED = \"a function or null\";\nconst URL_EXPECTED = \"a URL string or null\";\n\n/** True for request headers: an object of strings, a function, or null. */\nconst isHeaders = (value: unknown): boolean =>\n isFunctionOrNull(value) ||\n (isRecord(value) && Object.values(value as object).every((entry) => typeof entry === \"string\"));\n\n/** True for an object that isn't an array. */\nconst isRecord = (value: unknown): boolean =>\n typeof value === \"object\" && value !== null && !Array.isArray(value);\n\n/**\n * Builds the resolver for a key whose value isn't a number, a boolean or a string.\n * @param test Checks the value.\n * @param expected What the report says was expected.\n * @param describe Describes a rejected value. A key whose text can hold a secret passes\n * describeKind.\n * @returns The resolver. A value that fails the test is ignored, and the current one stays.\n */\nfunction keepKind(\n test: (value: unknown) => boolean,\n expected: string,\n describe: (value: unknown) => string = describeValue,\n): CustomResolver {\n return (key, value, fallback, diagnostics) => {\n if (value === undefined) {\n return fallback;\n }\n\n // null is a valid value for some keys, and it replaces the current value.\n if (test(value)) {\n return value;\n }\n\n reportInvalid(diagnostics, key, expected, value, \"the current value\", describe);\n return fallback;\n };\n}\n\n/**\n * Returns the URL that a relative destination resolves against. A worker has no document, so\n * it uses its own location.\n * @returns The base URL, or undefined when the scope has neither.\n */\nfunction pageBase(): string | undefined {\n if (typeof document !== \"undefined\") {\n return document.baseURI;\n }\n\n return typeof location === \"undefined\" ? undefined : location.href;\n}\n\n/**\n * Checks a destination URL and returns the form the library sends to. A relative URL resolves\n * against the page, so the records go where the app's own requests go, and the report names\n * that origin. A URL with a user name or a password is refused, because each request would\n * carry it.\n * @param key Config key.\n * @param value The URL the consumer passed.\n * @param fallback The current destination.\n * @param diagnostics Diagnostics reporter.\n * @returns The URL, its absolute form for a relative URL, or the fallback for a refused URL.\n */\nfunction absoluteUrl(\n key: string,\n value: string,\n fallback: unknown,\n diagnostics: Diagnostics,\n): unknown {\n let url: URL;\n try {\n url = new URL(value, pageBase());\n } catch (error) {\n // The URL can hold a token, and this message can become a record.\n diagnostics.report(\n \"config.invalid\",\n `${key} is not a valid URL. The library keeps the current value.`,\n undefined,\n error,\n );\n return fallback;\n }\n\n if (url.username !== \"\" || url.password !== \"\") {\n diagnostics.report(\n \"config.invalid\",\n `${key} has a user name or a password. The library keeps the current value.`,\n );\n return fallback;\n }\n\n if (SCHEME_PATTERN.test(value)) {\n return value;\n }\n\n diagnostics.report(\"config.invalid\", `${key} is relative. The library sends to ${url.origin}.`);\n return url.href;\n}\n\n/**\n * Reads a destination that null turns off. An empty or blank string turns it off too, with a\n * report, because an empty environment variable must not leave the records going to the old\n * destination. A rotation runs it too, to find a refused URL.\n * @param key Config key.\n * @param value The value the consumer passed.\n * @param fallback The current destination.\n * @param diagnostics Diagnostics reporter.\n * @returns The URL, null when it's off, or the fallback for a refused value.\n */\nexport function resolveDestination(\n key: string,\n value: unknown,\n fallback: unknown,\n diagnostics: Diagnostics,\n): unknown {\n if (typeof value !== \"string\") {\n return keepKind(isNull, URL_EXPECTED, describeKind)(key, value, fallback, diagnostics);\n }\n\n if (value.trim() === \"\") {\n diagnostics.report(\n \"config.invalid\",\n `${key} is empty. The library turns it off. Use null to turn it off.`,\n );\n return null;\n }\n\n // The current value passed the check already, so it gets no second report.\n return value === fallback ? value : absoluteUrl(key, value, fallback, diagnostics);\n}\n\n/**\n * Reads the endpoint. \"\" stays \"\", the value for \"not set\", so resolveConfig reports a missing\n * endpoint. A blank string is refused, because it would send to the page itself. A rotation\n * runs it too, to find a refused URL.\n * @param value The value the consumer passed.\n * @param fallback The current endpoint.\n * @param diagnostics Diagnostics reporter.\n * @returns The endpoint, null for console-only mode, or the fallback for a refused value.\n */\nexport function resolveEndpoint(\n value: unknown,\n fallback: unknown,\n diagnostics: Diagnostics,\n): unknown {\n if (typeof value !== \"string\") {\n return keepKind(isNull, URL_EXPECTED, describeKind)(\"endpoint\", value, fallback, diagnostics);\n }\n\n if (value === \"\" || value === fallback) {\n return value;\n }\n\n if (value.trim() === \"\") {\n diagnostics.report(\"config.invalid\", \"endpoint is blank. The library keeps the current value.\");\n return fallback;\n }\n\n return absoluteUrl(\"endpoint\", value, fallback, diagnostics);\n}\n\n/** Rules for one policy section. Every number key must have a range. */\ninterface PolicyRules<T> {\n /** Accepted range for each number key. */\n ranges: Record<NumberKeys<T>, Range>;\n /** Accepted range for each key that also takes null, which means no limit. */\n limits: Record<LimitKeys<T>, Range>;\n /** Accepted values for each choice key. */\n choices?: Partial<Record<keyof T, readonly string[]>>;\n /** Resolver for each key with any other value type. */\n custom?: Partial<Record<keyof T, CustomResolver>>;\n}\n\n/** Rules for every policy section. A new number key without a range won't compile. */\nconst POLICY_RULES: { [K in PolicySection]: PolicyRules<ResolvedConfig[K]> } = {\n captureLimits: {\n ranges: {\n // A larger capacity fails as an invalid array allocation.\n breadcrumbs: [0, 1_000_000],\n errorDedupeMs: DURATION_RANGE,\n // A window of 0 ms starts a new window for every event, so no rate limit would apply.\n windowMs: POSITIVE_DURATION_RANGE,\n },\n limits: {\n errorsPerWindow: COUNT_RANGE,\n consolePerWindow: COUNT_RANGE,\n longFramesPerWindow: COUNT_RANGE,\n webSocketPerWindow: COUNT_RANGE,\n reportsPerWindow: COUNT_RANGE,\n resourcesPerWindow: COUNT_RANGE,\n lifecyclePerWindow: COUNT_RANGE,\n },\n },\n metadata: { ranges: {}, limits: {} },\n storage: { ranges: {}, limits: {}, choices: { backend: STORAGE_VALUES } },\n diagnostics: {\n ranges: { throttleMs: DURATION_RANGE },\n limits: {},\n custom: { records: resolveDiagnosticRecords },\n },\n correlation: {\n ranges: {},\n // 0 would end a session or a trace at once, so these start at 1, and null lifts them.\n limits: { sessionIdleMs: POSITIVE_DURATION_RANGE, traceMaxAgeMs: POSITIVE_DURATION_RANGE },\n },\n metrics: {\n ranges: { intervalMs: [1000, 600_000] },\n limits: {\n maxSeries: COUNT_RANGE,\n maxInstruments: COUNT_RANGE,\n maxHistogramBoundaries: COUNT_RANGE,\n },\n },\n buffering: {\n ranges: {\n // Two heads at least, or a full buffer keeps its first records but too few of the newest.\n // The maximum bounds the memory of a startup storm.\n maxHeldRecords: [2 * HOLD_BUFFER_HEAD_RECORDS, 10_000],\n },\n // A buffer that holds nothing would drop every record, so these start at 1.\n limits: { maxPendingRecords: POSITIVE_RANGE, maxPendingBytes: POSITIVE_RANGE },\n choices: { overflow: [\"drop-oldest\", \"drop-newest\", \"persist\"] },\n },\n delivery: {\n ranges: {\n requestTimeoutMs: [1, DURATION_RANGE[1]],\n maxConcurrentRequests: POSITIVE_RANGE,\n retryBaseDelayMs: DURATION_RANGE,\n retryMaxDelayMs: DURATION_RANGE,\n },\n limits: {},\n choices: { priority: [\"low\", \"auto\", \"high\"] },\n },\n debugBuffer: {\n ranges: { maxRecords: [1, 10_000] },\n limits: { maxAgeMs: POSITIVE_DURATION_RANGE },\n },\n profiler: {\n ranges: { maxProbes: [1, PROFILER_PROBE_LIMIT] },\n limits: {},\n },\n replay: {\n ranges: {\n bufferMs: [5000, 600_000],\n maxBufferBytes: [100_000, 200_000_000],\n afterErrorMs: [0, 600_000],\n // A window of 0 ms starts a new window for every upload, so the limit would never apply.\n uploadWindowMs: POSITIVE_DURATION_RANGE,\n maxSegmentEvents: [1, 10_000],\n maxSegmentBytes: [10_000, 10_000_000],\n flushIntervalMs: [100, 60_000],\n maxQueueBytes: [100_000, 200_000_000],\n maxAttempts: [1, 10],\n },\n limits: { uploadsPerWindow: COUNT_RANGE },\n choices: { mode: [\"onError\"] },\n custom: {\n endpoint: resolveDestination,\n maskSelectors: keepKind(isStrings, \"a list of strings\"),\n blockSelectors: keepKind(isStrings, \"a list of strings\"),\n loader: keepKind(isFunctionOrNull, HOOK_EXPECTED, describeKind),\n onSegment: keepKind(isFunctionOrNull, HOOK_EXPECTED, describeKind),\n // A string can be a token, so the report gives only the type.\n headers: keepKind(isHeaders, \"an object of strings, a function or null\", describeKind),\n plugins: keepKind(isFunctions, \"a list of functions\"),\n recordOptions: keepKind(isRecord, \"an object\"),\n },\n },\n};\n\n/** The boolean keys of the capture section. */\nconst CAPTURE_FLAG_KEYS = [\n \"errors\",\n \"rejections\",\n \"resourceErrors\",\n \"fetch\",\n \"xhr\",\n \"httpMetrics\",\n \"navigation\",\n \"fullUrls\",\n \"webSocket\",\n \"uncleanExit\",\n \"serverTiming\",\n \"reports\",\n \"lifecycle\",\n] as const;\n\n/** The origin of a sandboxed frame that lacks allow-same-origin. */\nconst SANDBOX_ORIGIN = \"null\";\n\n/** How each expected value reads in a config.invalid message. */\nconst LEVEL_EXPECTED = `a level name: ${listOf(LEVEL_NAMES)}`;\nconst CONSOLE_LEVELS_EXPECTED = `a list of ${listOf(CONSOLE_METHOD_VALUES)}`;\nconst PATTERN_LIST_EXPECTED = \"a list of strings and RegExp patterns\";\nconst TARGET_LIST_EXPECTED =\n 'a list of origin URLs such as \"https://api.example\" and RegExp patterns';\nconst ORIGIN_LIST_EXPECTED =\n 'a list of origin URLs such as \"https://app.example\". For a sandboxed frame, set bus.mode: \"sender\" in the frame';\nconst LOG_TYPE_LIST_EXPECTED = `a list of log types: ${listOf(LOG_TYPE_VALUES)}`;\nconst DIAGNOSTIC_RECORDS_EXPECTED = \"true, false or a list of diagnostic codes\";\n\n/** Function form of the headers option. */\ntype HeadersFunction = () => Record<string, string> | Promise<Record<string, string>>;\n\n/** The headers option, after null has removed it. */\ntype HeadersOption = NonNullable<ObservabilityConfig[\"headers\"]> | undefined;\n\n/**\n * Formats a list of values as text, for example `\"a\", \"b\" or \"c\"`.\n * @param values Values to list.\n * @returns The text.\n */\nfunction listOf(values: readonly string[]): string {\n const quoted = values.map((value) => `\"${value}\"`);\n return `${quoted.slice(0, -1).join(\", \")} or ${quoted[quoted.length - 1]}`;\n}\n\n/**\n * Describes a config value for a message. Never prints an object or a function.\n * @param value The value the consumer passed.\n * @returns Short text for the value.\n */\nfunction describeValue(value: unknown): string {\n if (typeof value === \"string\") {\n return `\"${value}\"`;\n }\n\n if (typeof value === \"function\") {\n return \"a function\";\n }\n\n if (typeof value === \"object\" && value !== null) {\n return \"an object\";\n }\n\n return String(value);\n}\n\n/**\n * Describes only the type of a value. A hook or a URL key can hold a token as a string, and\n * a diagnostic can become a record, so its text must not appear.\n * @param value The value the consumer passed.\n * @returns The type, for example \"a string\".\n */\nfunction describeKind(value: unknown): string {\n if (value === null) {\n return \"null\";\n }\n\n if (Array.isArray(value)) {\n return \"a list\";\n }\n\n return typeof value === \"object\" ? \"an object\" : `a ${typeof value}`;\n}\n\n/**\n * Reports a value the option doesn't accept.\n * @param diagnostics Diagnostics reporter.\n * @param key Config key, for example `bus.mode`.\n * @param expected Describes the accepted values.\n * @param value The value the consumer passed.\n * @param kept Describes the value that stays in effect.\n * @param describe Describes the value. A key whose text can hold a secret passes describeKind.\n */\nfunction reportInvalid(\n diagnostics: Diagnostics,\n key: string,\n expected: string,\n value: unknown,\n kept: string,\n describe: (value: unknown) => string = describeValue,\n): void {\n diagnostics.report(\n \"config.invalid\",\n `${key} must be ${expected}. The value is ${describe(value)}. The library keeps ${kept}.`,\n );\n}\n\n/**\n * Reads an option that takes one value from a fixed list.\n * @param key Config key.\n * @param value The value the consumer passed.\n * @param accepted Accepted values.\n * @param fallback The current value.\n * @param diagnostics Diagnostics reporter.\n * @returns The value, or the fallback when the value isn't accepted.\n */\nfunction resolveChoice<T extends string>(\n key: string,\n value: unknown,\n accepted: readonly T[],\n fallback: T,\n diagnostics: Diagnostics,\n): T {\n if (value === undefined) {\n return fallback;\n }\n\n const match = accepted.find((entry) => entry === value);\n if (match !== undefined) {\n return match;\n }\n\n // The value isn't printed, because a string can be a token put into the wrong key.\n diagnostics.report(\n \"config.invalid\",\n `${key} must be ${listOf(accepted)}. The library keeps \"${fallback}\".`,\n );\n return fallback;\n}\n\n/**\n * Reads a boolean option.\n * @param key Config key.\n * @param value The value the consumer passed.\n * @param fallback The current value.\n * @param diagnostics Diagnostics reporter.\n * @returns The value, or the fallback when the value isn't a boolean.\n */\nfunction resolveBoolean(\n key: string,\n value: unknown,\n fallback: boolean,\n diagnostics: Diagnostics,\n): boolean {\n if (value === undefined) {\n return fallback;\n }\n\n if (typeof value === \"boolean\") {\n return value;\n }\n\n reportInvalid(diagnostics, key, \"true or false\", value, String(fallback));\n return fallback;\n}\n\n/**\n * Reads an option that takes a finite number, 0 or more.\n * @param key Config key.\n * @param value The value the consumer passed.\n * @param fallback The current value.\n * @param diagnostics Diagnostics reporter.\n * @returns The value, or the fallback when the value isn't accepted.\n */\nfunction resolveNonNegative(\n key: string,\n value: unknown,\n fallback: number,\n diagnostics: Diagnostics,\n): number {\n if (value === undefined) {\n return fallback;\n }\n\n if (typeof value === \"number\" && Number.isFinite(value) && value >= 0) {\n return value;\n }\n\n reportInvalid(diagnostics, key, \"a finite number of 0 or more\", value, String(fallback));\n return fallback;\n}\n\n/**\n * Reads an option that takes an integer in a range.\n * @param key Config key.\n * @param value The value the consumer passed.\n * @param range Lowest and highest accepted value.\n * @param fallback The current value.\n * @param diagnostics Diagnostics reporter.\n * @returns The value, or the fallback when the value isn't accepted.\n */\nfunction resolveInteger(\n key: string,\n value: unknown,\n range: Range,\n fallback: number,\n diagnostics: Diagnostics,\n): number {\n if (value === undefined) {\n return fallback;\n }\n\n const [min, max] = range;\n if (typeof value === \"number\" && Number.isInteger(value) && value >= min && value <= max) {\n return value;\n }\n\n const expected = `an integer from ${String(min)} to ${String(max)}`;\n reportInvalid(diagnostics, key, expected, value, String(fallback));\n return fallback;\n}\n\n/**\n * Reads a limit that takes an integer in a range, or null for no limit.\n * @param key Config key.\n * @param value The value the consumer passed.\n * @param range Lowest and highest accepted value.\n * @param fallback The current limit. Null means no limit.\n * @param diagnostics Diagnostics reporter.\n * @returns The limit, or the fallback when the value isn't accepted.\n */\nfunction resolveLimit(\n key: string,\n value: unknown,\n range: Range,\n fallback: number | null,\n diagnostics: Diagnostics,\n): number | null {\n if (value === undefined) {\n return fallback;\n }\n\n if (value === null) {\n return null;\n }\n\n const [min, max] = range;\n if (typeof value === \"number\" && Number.isInteger(value) && value >= min && value <= max) {\n return value;\n }\n\n const expected = `an integer from ${String(min)} to ${String(max)}, or null for no limit`;\n reportInvalid(diagnostics, key, expected, value, String(fallback));\n return fallback;\n}\n\n/**\n * Reads a hook. Undefined keeps the current hook and null removes it.\n * @param key Config key.\n * @param value The value the consumer passed.\n * @param fallback The current hook.\n * @param diagnostics Diagnostics reporter.\n * @returns The hook, or undefined when there is none.\n */\nfunction resolveHook<T>(\n key: string,\n value: unknown,\n fallback: T | undefined,\n diagnostics: Diagnostics,\n): T | undefined {\n if (value === undefined) {\n return fallback;\n }\n\n if (value === null) {\n return undefined;\n }\n\n if (typeof value === \"function\") {\n return value as T;\n }\n\n reportInvalid(diagnostics, key, HOOK_EXPECTED, value, \"the current value\", describeKind);\n return fallback;\n}\n\n/**\n * Stands in for a redact value that isn't a function when no redact hook was set before. The\n * record builder drops each record while it's the hook, so a record the app meant to redact\n * never leaves the page.\n * @returns null, which drops the record.\n */\nexport const REFUSE_RECORDS = (): null => null;\n\n/**\n * Reads the redact hook. A value that isn't a function keeps the current hook, or fails closed\n * when there is none. Otherwise a typo such as `{ default: fn }` would send raw records.\n * @param value The value the consumer passed.\n * @param fallback The current hook.\n * @param diagnostics Diagnostics reporter.\n * @returns The hook, REFUSE_RECORDS, or undefined when there is none.\n */\nfunction resolveRedact(\n value: unknown,\n fallback: ResolvedConfig[\"redact\"],\n diagnostics: Diagnostics,\n): ResolvedConfig[\"redact\"] {\n if (value === undefined || value === null || typeof value === \"function\" || fallback) {\n return resolveHook(\"redact\", value, fallback, diagnostics);\n }\n\n diagnostics.report(\n \"config.invalid\",\n `redact must be ${HOOK_EXPECTED}. The value is ${describeKind(value)}. The library drops each record until redact is a function or null.`,\n );\n return REFUSE_RECORDS;\n}\n\n/**\n * Reads the processors. A list with one entry that isn't a function is refused as a whole,\n * because running the other processors without it could let a record through unmasked. With\n * no current list, the library drops each record instead.\n * @param value The value the consumer passed.\n * @param fallback The current processors.\n * @param diagnostics Diagnostics reporter.\n * @returns A copy of the new list, the current list, or a list that drops each record.\n */\nfunction resolveProcessors(\n value: unknown,\n fallback: ResolvedConfig[\"processors\"],\n diagnostics: Diagnostics,\n): ResolvedConfig[\"processors\"] {\n if (value === undefined) {\n return fallback;\n }\n\n if (isFunctions(value)) {\n return [...(value as ResolvedConfig[\"processors\"])];\n }\n\n if (fallback.length > 0) {\n reportInvalid(\n diagnostics,\n \"processors\",\n \"a list of functions\",\n value,\n \"the current list\",\n describeKind,\n );\n return fallback;\n }\n\n // No list to keep, and the app meant to process each record, so fail closed.\n diagnostics.report(\n \"config.invalid\",\n `processors must be a list of functions. The value is ${describeKind(value)}. The library drops each record until processors is a list of functions or [].`,\n );\n return [REFUSE_RECORDS];\n}\n\n/**\n * Reads a string option.\n * @param key Config key.\n * @param value The value the consumer passed.\n * @param fallback The current value.\n * @param diagnostics Diagnostics reporter.\n * @returns The value, or the fallback when the value isn't a string.\n */\nfunction resolveString(\n key: string,\n value: unknown,\n fallback: string,\n diagnostics: Diagnostics,\n): string {\n if (value === undefined) {\n return fallback;\n }\n\n if (typeof value === \"string\") {\n return value;\n }\n\n reportInvalid(diagnostics, key, \"a string\", value, \"the current value\");\n return fallback;\n}\n\n/**\n * Reads a sampling rate from 0 to 1.\n * @param key Config key.\n * @param value The value the consumer passed.\n * @param fallback The current rate.\n * @param diagnostics Diagnostics reporter.\n * @returns The rate, or the fallback when the value isn't accepted.\n */\nfunction resolveRate(\n key: string,\n value: unknown,\n fallback: number,\n diagnostics: Diagnostics,\n): number {\n if (value === undefined) {\n return fallback;\n }\n\n if (isRate(value)) {\n return value;\n }\n\n diagnostics.report(\n \"config.invalid\",\n `${key} must be 0..1. The value is ${describeValue(value)}. The library keeps ${String(fallback)}.`,\n );\n return fallback;\n}\n\n/**\n * Reads sampling.rates. A new map replaces the current one, as minLevels does, so a later call\n * can remove a namespace.\n * @param value The value the consumer passed.\n * @param fallback The current rates.\n * @param diagnostics Diagnostics reporter.\n * @returns The rate for each namespace prefix.\n */\nfunction resolveRates(\n value: unknown,\n fallback: Record<string, number>,\n diagnostics: Diagnostics,\n): Record<string, number> {\n if (value === undefined) {\n return fallback;\n }\n\n if (!isObject(value)) {\n reportInvalid(diagnostics, \"sampling.rates\", \"an object of rates\", value, \"the current value\");\n return fallback;\n }\n\n // A bad entry is left out, so the namespace falls back to a shorter prefix or defaultRate.\n // An undefined entry is the same as no entry.\n const rates: [string, number][] = [];\n for (const [ns, rate] of Object.entries(value)) {\n if (isRate(rate)) {\n rates.push([ns, rate]);\n } else if (rate !== undefined) {\n diagnostics.report(\n \"config.invalid\",\n `sampling.rates[\"${ns}\"] must be 0..1. The value is ${describeValue(rate)}. The library ignores this entry.`,\n );\n }\n }\n\n // fromEntries creates own properties, and it copies, so the app's object never changes.\n return Object.fromEntries(rates);\n}\n\n/**\n * Merges and checks a section of integer options. The keys come only from `ranges`.\n * @param section Section name, for example `batching`.\n * @param input The values the consumer passed.\n * @param base The current values.\n * @param ranges Accepted range for each key.\n * @param diagnostics Diagnostics reporter.\n * @returns The value for every key in `ranges`.\n */\nfunction resolveRanges<K extends string>(\n section: string,\n input: Partial<Record<NoInfer<K>, unknown>> | undefined,\n base: Record<NoInfer<K>, number>,\n ranges: Record<K, Range>,\n diagnostics: Diagnostics,\n): Record<K, number> {\n const given: Partial<Record<K, unknown>> = input ?? {};\n const keys = Object.keys(ranges) as K[];\n\n return Object.fromEntries(\n keys.map((key): [K, number] => [\n key,\n resolveInteger(`${section}.${key}`, given[key], ranges[key], base[key], diagnostics),\n ]),\n ) as Record<K, number>;\n}\n\n/**\n * Reads a level name, ignoring case.\n * @param value The value the consumer passed.\n * @returns The level, or undefined when the value isn't a level name.\n */\nfunction toLevel(value: unknown): LogLevel | undefined {\n if (typeof value !== \"string\") {\n return undefined;\n }\n\n const upper = value.toUpperCase();\n return LEVEL_NAMES.find((level) => level === upper);\n}\n\n/**\n * Reads a level option. Without this check, an unknown level silently drops every record.\n * @param key Config key.\n * @param value The value the consumer passed.\n * @param fallback The current level.\n * @param diagnostics Diagnostics reporter.\n * @returns The level, or the fallback when the value isn't a level name.\n */\nfunction resolveLevel(\n key: string,\n value: unknown,\n fallback: LogLevel,\n diagnostics: Diagnostics,\n): LogLevel {\n if (value === undefined) {\n return fallback;\n }\n\n const level = toLevel(value);\n if (level !== undefined) {\n return level;\n }\n\n reportInvalid(diagnostics, key, LEVEL_EXPECTED, value, `\"${fallback}\"`);\n return fallback;\n}\n\n/**\n * Reads the minLevels option. Keeps every valid prefix and reports the rest. A new map\n * replaces the current one.\n * @param value The value the consumer passed.\n * @param fallback The current levels.\n * @param diagnostics Diagnostics reporter.\n * @returns The level for each namespace prefix.\n */\nfunction resolveMinLevels(\n value: unknown,\n fallback: Record<string, LogLevel>,\n diagnostics: Diagnostics,\n): Record<string, LogLevel> {\n if (value === undefined) {\n return fallback;\n }\n\n if (!isObject(value)) {\n reportInvalid(diagnostics, \"minLevels\", \"an object of level names\", value, \"the current value\");\n return fallback;\n }\n\n const levels: [string, LogLevel][] = [];\n for (const [prefix, raw] of Object.entries(value)) {\n const level = toLevel(raw);\n if (prefix !== \"\" && level !== undefined) {\n levels.push([prefix, level]);\n } else {\n reportInvalid(diagnostics, `minLevels[\"${prefix}\"]`, LEVEL_EXPECTED, raw, \"minLevel for it\");\n }\n }\n\n // fromEntries creates own properties, so a \"__proto__\" key can't change the prototype.\n return Object.fromEntries(levels);\n}\n\n/**\n * Reads a list option. Keeps every accepted entry and reports the rest.\n * @param key Config key.\n * @param value The value the consumer passed.\n * @param fallback The current list.\n * @param expected Describes the accepted list.\n * @param accept Converts an entry, or returns undefined to reject it.\n * @param diagnostics Diagnostics reporter.\n * @returns The accepted entries, or the fallback when the value isn't a list.\n */\nfunction resolveList<T>(\n key: string,\n value: unknown,\n fallback: T[],\n expected: string,\n accept: (entry: unknown) => T | undefined,\n diagnostics: Diagnostics,\n): T[] {\n if (value === undefined) {\n return fallback;\n }\n\n if (!Array.isArray(value)) {\n reportInvalid(diagnostics, key, expected, value, \"the current list\");\n return fallback;\n }\n\n const kept: T[] = [];\n const entries: unknown[] = value;\n\n for (const entry of entries) {\n const accepted = accept(entry);\n if (accepted === undefined) {\n diagnostics.report(\n \"config.invalid\",\n `The library ignores the ${key} entry ${describeValue(entry)}. ${key} must be ${expected}.`,\n );\n continue;\n }\n kept.push(accepted);\n }\n\n return kept;\n}\n\n/**\n * Accepts a capture plugin entry.\n * @param entry List entry.\n * @returns The entry, or undefined.\n */\nfunction toPlugin(entry: unknown): CapturePlugin | undefined {\n const valid =\n isObject(entry) &&\n typeof entry.name === \"string\" &&\n entry.name !== \"\" &&\n typeof entry.install === \"function\" &&\n typeof entry.uninstall === \"function\";\n\n return valid ? (entry as unknown as CapturePlugin) : undefined;\n}\n\n/**\n * Reads diagnostics.records. A list keeps its string entries and reports the rest.\n * @param key Full config key.\n * @param value The value the consumer passed.\n * @param fallback The current value.\n * @param diagnostics Diagnostics reporter.\n * @returns True, false or the list of codes.\n */\nfunction resolveDiagnosticRecords(\n key: string,\n value: unknown,\n fallback: unknown,\n diagnostics: Diagnostics,\n): unknown {\n if (value === undefined || typeof value === \"boolean\") {\n return value ?? fallback;\n }\n\n if (Array.isArray(value)) {\n return resolveList(key, value, [], DIAGNOSTIC_RECORDS_EXPECTED, toStringEntry, diagnostics);\n }\n\n reportInvalid(diagnostics, key, DIAGNOSTIC_RECORDS_EXPECTED, value, \"the current value\");\n return fallback;\n}\n\n/**\n * Accepts a string entry.\n * @param entry List entry.\n * @returns The entry, or undefined.\n */\nfunction toStringEntry(entry: unknown): string | undefined {\n return typeof entry === \"string\" ? entry : undefined;\n}\n\n/**\n * Accepts a log type entry. An unknown type would never match a record, so it's rejected.\n * @param entry List entry.\n * @returns The log type, or undefined.\n */\nfunction toLogType(entry: unknown): LogType | undefined {\n return LOG_TYPE_VALUES.find((type) => type === entry);\n}\n\n/**\n * Accepts a string or a RegExp entry.\n * @param entry List entry.\n * @returns The entry, or undefined.\n */\nfunction toPattern(entry: unknown): string | RegExp | undefined {\n return typeof entry === \"string\" || entry instanceof RegExp ? entry : undefined;\n}\n\n/**\n * Accepts a console method name.\n * @param entry List entry.\n * @returns The method, or undefined.\n */\nfunction toConsoleMethod(entry: unknown): CapturedConsoleMethod | undefined {\n return CONSOLE_METHOD_VALUES.find((method) => method === entry);\n}\n\n/**\n * Reads an origin entry. A URL with a path is reduced to its origin.\n * @param entry List entry.\n * @returns The origin, or undefined. resolveList reports the rejected entry.\n */\nfunction toOrigin(entry: unknown): string | undefined {\n if (typeof entry !== \"string\") {\n return undefined;\n }\n\n // Every sandboxed and data: document has the opaque origin \"null\", so a single entry\n // would trust all of them.\n try {\n const { origin } = new URL(entry);\n return origin === SANDBOX_ORIGIN ? undefined : origin;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Reads a trace header target. A string is reduced to its origin, and a RegExp is kept as is.\n * @param entry List entry.\n * @returns The target, or undefined. resolveList reports the rejected entry.\n */\nfunction toTarget(entry: unknown): string | RegExp | undefined {\n return entry instanceof RegExp ? entry : toOrigin(entry);\n}\n\n/**\n * Checks whether a value is an object of string values.\n * @param value Value to test.\n * @returns True for an object whose values are all strings.\n */\nfunction isStringRecord(value: unknown): value is Record<string, string> {\n if (!isObject(value)) {\n return false;\n }\n\n const values: unknown[] = Object.values(value);\n return values.every((entry) => typeof entry === \"string\");\n}\n\n/**\n * Reads the headers option.\n * @param value The value the consumer passed.\n * @param fallback The current headers.\n * @param diagnostics Diagnostics reporter.\n * @returns The headers, undefined after null, or the fallback for undefined or a bad value.\n */\nfunction resolveHeaders(\n value: unknown,\n fallback: HeadersOption,\n diagnostics: Diagnostics,\n): HeadersOption {\n if (value === undefined) {\n return fallback;\n }\n\n // null clears the headers. undefined keeps them, so an unset variable can't drop a token the\n // app still needs. With isolation on, configure() refuses the change and a logout rotates.\n if (value === null) {\n return undefined;\n }\n\n if (typeof value === \"function\") {\n return value as HeadersFunction;\n }\n\n if (isStringRecord(value)) {\n return value;\n }\n\n // The value can hold a token, and this message can become a record.\n diagnostics.report(\n \"config.invalid\",\n \"headers must be an object of strings or a function. The library keeps the current headers.\",\n );\n return fallback;\n}\n\n/**\n * Checks if a value implements the LogSerializer interface.\n * @param value Value to check.\n * @returns True if value implements serialize.\n */\nfunction isSerializer(value: unknown): value is LogSerializer {\n if (typeof value !== \"object\" || value === null) {\n return false;\n }\n const serialize: unknown = Reflect.get(value, \"serialize\");\n return typeof serialize === \"function\";\n}\n\n/**\n * Validates the serializer option. A name stays a name here, because the transport picks\n * the implementation.\n * @param requested Serializer name or custom serializer implementation.\n * @param previous The current serializer option.\n * @param diagnostics Diagnostics reporter.\n * @returns Valid serializer option.\n */\nfunction resolveSerializer(\n requested: unknown,\n previous: SerializerChoice | undefined,\n diagnostics: Diagnostics,\n): SerializerChoice {\n if (requested === undefined) {\n return previous ?? SERIALIZER_NAME_OTLP;\n }\n if (requested === SERIALIZER_NAME_OTLP || requested === SERIALIZER_NAME_ECS) {\n return requested;\n }\n if (isSerializer(requested)) {\n return requested;\n }\n\n diagnostics.report(\n \"config.invalid\",\n `serializer must be \"${SERIALIZER_NAME_OTLP}\", \"${SERIALIZER_NAME_ECS}\" or an implementation. The library keeps the current serializer.`,\n );\n return previous ?? SERIALIZER_NAME_OTLP;\n}\n\n/** The style keys the console option accepts. */\nconst CONSOLE_STYLE_KEYS = new Set(Object.keys(CONSOLE_DEFAULT_STYLES));\n\n/**\n * Keeps the valid entries of a console styles object and reports every entry it drops.\n * @param styles The styles the consumer passed.\n * @param diagnostics Diagnostics reporter.\n * @returns The valid styles.\n */\nfunction validStyles(styles: unknown, diagnostics: Diagnostics): ConsoleStyles {\n const valid: Record<string, string> = {};\n if (styles !== undefined && !isObject(styles)) {\n reportInvalid(\n diagnostics,\n \"consoleOutput.styles\",\n \"an object of CSS strings\",\n styles,\n \"the styles\",\n );\n return valid;\n }\n\n const entries: [string, unknown][] = Object.entries(styles ?? {});\n\n for (const [key, value] of entries) {\n if (!CONSOLE_STYLE_KEYS.has(key)) {\n diagnostics.report(\n \"config.invalid\",\n `The library ignores the unknown consoleOutput.styles key \"${key}\". Check the spelling.`,\n );\n continue;\n }\n\n // undefined keeps the current style, as it does for every other key.\n if (value === undefined) {\n continue;\n }\n\n if (typeof value !== \"string\") {\n diagnostics.report(\n \"config.invalid\",\n `consoleOutput.styles.${key} must be a string. The library keeps the current style.`,\n );\n continue;\n }\n\n valid[key] = value;\n }\n\n return valid;\n}\n\n/**\n * Reads the level from the consoleOutput option's object form.\n * @param requested The level the consumer passed.\n * @param previous The current console level. Null means the console is off.\n * @param diagnostics Diagnostics reporter.\n * @returns The level. An omitted or unknown level keeps the current one, also when it's off.\n */\nfunction resolveConsoleLevel(\n requested: unknown,\n previous: LogLevel | null,\n diagnostics: Diagnostics,\n): LogLevel | null {\n // An omitted level keeps the current one, so setting only the styles can't turn a console on.\n if (requested === undefined) {\n return previous;\n }\n\n const level = toLevel(requested);\n if (level !== undefined) {\n return level;\n }\n\n reportInvalid(\n diagnostics,\n \"consoleOutput.level\",\n LEVEL_EXPECTED,\n requested,\n \"the current console level\",\n );\n return previous;\n}\n\n/**\n * Normalizes the consoleOutput option into a level and a set of styles.\n * @param requested Consumer consoleOutput option.\n * @param previous The current console settings.\n * @param diagnostics Diagnostics reporter.\n * @returns Console settings. The level is null when the console is off.\n */\nfunction resolveConsole(\n requested: ObservabilityConfig[\"consoleOutput\"],\n previous: ResolvedConsole,\n diagnostics: Diagnostics,\n): ResolvedConsole {\n if (requested === undefined) {\n return previous;\n }\n if (requested === false) {\n return { level: null, styles: previous.styles };\n }\n if (requested === true) {\n return { level: CONSOLE_DEFAULT_LEVEL, styles: previous.styles };\n }\n if (typeof requested === \"string\") {\n const level = toLevel(requested);\n if (level === undefined) {\n reportInvalid(\n diagnostics,\n \"consoleOutput\",\n LEVEL_EXPECTED,\n requested,\n \"the current console level\",\n );\n return previous;\n }\n\n return { level, styles: previous.styles };\n }\n\n // Guard against null and other values the type doesn't allow.\n if (typeof requested !== \"object\" || (requested as unknown) === null) {\n diagnostics.report(\n \"config.invalid\",\n \"consoleOutput must be a boolean, a level or an object. The current console settings stay.\",\n );\n return previous;\n }\n\n return {\n level: resolveConsoleLevel(requested.level, previous.level, diagnostics),\n styles: { ...previous.styles, ...validStyles(requested.styles, diagnostics) },\n };\n}\n\n/**\n * Merges and checks the sampling section.\n * @param input The sampling options the consumer passed.\n * @param base The current sampling options.\n * @param diagnostics Diagnostics reporter.\n * @returns The sampling options.\n */\nfunction resolveSampling(\n input: Partial<SamplingOptions> | undefined,\n base: SamplingOptions,\n diagnostics: Diagnostics,\n): SamplingOptions {\n const given = input ?? {};\n\n return {\n defaultRate: resolveRate(\n \"sampling.defaultRate\",\n given.defaultRate,\n base.defaultRate,\n diagnostics,\n ),\n remoteMaxRate: resolveRate(\n \"sampling.remoteMaxRate\",\n given.remoteMaxRate,\n base.remoteMaxRate,\n diagnostics,\n ),\n rates: resolveRates(given.rates, base.rates, diagnostics),\n alwaysSampleTypes: resolveList(\n \"sampling.alwaysSampleTypes\",\n given.alwaysSampleTypes,\n base.alwaysSampleTypes,\n LOG_TYPE_LIST_EXPECTED,\n toLogType,\n diagnostics,\n ),\n alwaysSampleFrom: resolveLevel(\n \"sampling.alwaysSampleFrom\",\n given.alwaysSampleFrom,\n base.alwaysSampleFrom,\n diagnostics,\n ),\n errorCeiling: resolveLimit(\n \"sampling.errorCeiling\",\n given.errorCeiling,\n COUNT_RANGE,\n base.errorCeiling,\n diagnostics,\n ),\n // A window of 0 ms starts a new window for every record, so the ceiling would never apply.\n errorCeilingWindowMs: resolveInteger(\n \"sampling.errorCeilingWindowMs\",\n given.errorCeilingWindowMs,\n POSITIVE_DURATION_RANGE,\n base.errorCeilingWindowMs,\n diagnostics,\n ),\n remote: resolveBoolean(\"sampling.remote\", given.remote, base.remote, diagnostics),\n };\n}\n\n/**\n * Merges and checks the bus section.\n * @param input The bus options the consumer passed.\n * @param base The current bus options.\n * @param diagnostics Diagnostics reporter.\n * @returns The bus options. Every trusted origin is a bare origin.\n */\nfunction resolveBus(\n input: Partial<BusOptions> | undefined,\n base: BusOptions,\n diagnostics: Diagnostics,\n): BusOptions {\n const given = input ?? {};\n\n // A limit of 0 would stop every message, so each limit starts at 1 and null lifts it.\n return {\n sourcePolicy: resolveChoice(\n \"bus.sourcePolicy\",\n given.sourcePolicy,\n [\"registered\", \"trusted-origin\"],\n base.sourcePolicy,\n diagnostics,\n ),\n maxMessageBytes: resolveLimit(\n \"bus.maxMessageBytes\",\n given.maxMessageBytes,\n POSITIVE_RANGE,\n base.maxMessageBytes,\n diagnostics,\n ),\n maxRecordsPerMessage: resolveLimit(\n \"bus.maxRecordsPerMessage\",\n given.maxRecordsPerMessage,\n POSITIVE_RANGE,\n base.maxRecordsPerMessage,\n diagnostics,\n ),\n maxMessagesPerSecond: resolveLimit(\n \"bus.maxMessagesPerSecond\",\n given.maxMessagesPerSecond,\n POSITIVE_RANGE,\n base.maxMessagesPerSecond,\n diagnostics,\n ),\n mode: resolveChoice(\"bus.mode\", given.mode, BUS_MODE_VALUES, base.mode, diagnostics),\n // Compare origins, not URLs. Otherwise an entry with a path never matches event.origin.\n trustedOrigins: resolveList(\n \"bus.trustedOrigins\",\n given.trustedOrigins,\n base.trustedOrigins,\n ORIGIN_LIST_EXPECTED,\n toOrigin,\n diagnostics,\n ),\n openFinRole: resolveChoice(\n \"bus.openFinRole\",\n given.openFinRole,\n OPENFIN_ROLE_VALUES,\n base.openFinRole,\n diagnostics,\n ),\n };\n}\n\n/**\n * Merges and checks the journey section.\n * @param input The journey options the consumer passed.\n * @param base The current journey options.\n * @param diagnostics Diagnostics reporter.\n * @returns The journey options.\n */\nfunction resolveJourney(\n input: Partial<JourneyOptions> | undefined,\n base: JourneyOptions,\n diagnostics: Diagnostics,\n): JourneyOptions {\n const given = input ?? {};\n\n return {\n scope: resolveChoice(\n \"journey.scope\",\n given.scope,\n JOURNEY_SCOPE_VALUES,\n base.scope,\n diagnostics,\n ),\n maxAgeMs: resolveInteger(\n \"journey.maxAgeMs\",\n given.maxAgeMs,\n JOURNEY_AGE_RANGE,\n base.maxAgeMs,\n diagnostics,\n ),\n };\n}\n\n/**\n * Merges and checks the retention section.\n * @param input The retention options the consumer passed.\n * @param base The current retention options.\n * @param diagnostics Diagnostics reporter.\n * @returns The retention options.\n */\nfunction resolveRetention(\n input: Partial<RetentionOptions> | undefined,\n base: RetentionOptions,\n diagnostics: Diagnostics,\n): RetentionOptions {\n const given = input ?? {};\n\n return {\n maxBatches: resolveInteger(\n \"retention.maxBatches\",\n given.maxBatches,\n MAX_BATCHES_RANGE,\n base.maxBatches,\n diagnostics,\n ),\n maxAgeMs: resolveLimit(\n \"retention.maxAgeMs\",\n given.maxAgeMs,\n RETENTION_AGE_RANGE,\n base.maxAgeMs,\n diagnostics,\n ),\n maxAttempts: resolveLimit(\n \"retention.maxAttempts\",\n given.maxAttempts,\n RETENTION_ATTEMPTS_RANGE,\n base.maxAttempts,\n diagnostics,\n ),\n };\n}\n\n/**\n * Reads a capture key that takes a boolean or an options object, where true means the defaults.\n * @param key Capture key, for example `longFrames`.\n * @param value The value the consumer passed.\n * @param base The current value.\n * @param diagnostics Diagnostics reporter.\n * @param fields Checks each field of an object. It gets the current object, or {} after a\n * boolean, so an omitted field keeps its current value.\n * @returns The boolean, the checked object, or the current value for a bad value.\n */\nfunction resolveCaptureOptions<T extends object>(\n key: string,\n value: unknown,\n base: boolean | T,\n diagnostics: Diagnostics,\n fields: (given: Record<string, unknown>, previous: Partial<T>) => T,\n): boolean | T {\n if (value === undefined) {\n return base;\n }\n\n if (typeof value === \"boolean\") {\n return value;\n }\n\n if (!isObject(value)) {\n diagnostics.report(\"config.invalid\", `capture.${key} must be a boolean or an options object.`);\n return base;\n }\n\n const resolved = fields(value, typeof base === \"object\" ? base : {});\n\n // The resolved object has each known option, so a typo such as `threshold` isn't silent.\n for (const name of Object.keys(value)) {\n if (!hasOwn(resolved, name)) {\n diagnostics.report(\n \"config.invalid\",\n `The library ignores the unknown config key \"capture.${key}.${name}\". Check the spelling.`,\n );\n }\n }\n\n return resolved;\n}\n\n/**\n * Merges and checks the capture section.\n * @param input The capture options the consumer passed.\n * @param base The current capture options.\n * @param diagnostics Diagnostics reporter.\n * @returns The capture options.\n */\nfunction resolveCapture(\n input: Partial<CaptureOptions> | undefined,\n base: CaptureOptions,\n diagnostics: Diagnostics,\n): CaptureOptions {\n const given = input ?? {};\n const capture: CaptureOptions = {\n ...base,\n urlTransform: resolveHook(\n \"capture.urlTransform\",\n given.urlTransform,\n base.urlTransform,\n diagnostics,\n ),\n remoteToggles: resolveList(\n \"capture.remoteToggles\",\n given.remoteToggles,\n base.remoteToggles,\n \"a list of capture switch names without privacy controls\",\n (value) => REMOTE_CAPTURE_FLAGS.find((key) => key === value),\n diagnostics,\n ),\n resourceTiming: resolveCaptureOptions(\n \"resourceTiming\",\n given.resourceTiming,\n base.resourceTiming,\n diagnostics,\n (value, previous) => ({\n slowMs: resolveNonNegative(\n \"capture.resourceTiming.slowMs\",\n value.slowMs,\n previous.slowMs ?? RESOURCE_SLOW_MS,\n diagnostics,\n ),\n }),\n ),\n interactions: resolveCaptureOptions(\n \"interactions\",\n given.interactions,\n base.interactions,\n diagnostics,\n (value, previous) => resolveInteractions(value, previous, diagnostics),\n ),\n console: resolveCaptureOptions(\n \"console\",\n given.console,\n base.console,\n diagnostics,\n (value, previous) => ({\n levels: resolveList(\n \"capture.console.levels\",\n value.levels,\n previous.levels ?? [\"error\", \"warn\"],\n CONSOLE_LEVELS_EXPECTED,\n toConsoleMethod,\n diagnostics,\n ),\n }),\n ),\n longFrames: resolveCaptureOptions(\n \"longFrames\",\n given.longFrames,\n base.longFrames,\n diagnostics,\n (value, previous) => ({\n thresholdMs: resolveNonNegative(\n \"capture.longFrames.thresholdMs\",\n value.thresholdMs,\n previous.thresholdMs ?? LONG_FRAME_THRESHOLD_MS,\n diagnostics,\n ),\n }),\n ),\n userTiming: resolveCaptureOptions(\n \"userTiming\",\n given.userTiming,\n base.userTiming,\n diagnostics,\n (value, previous) => ({\n include: resolveList(\n \"capture.userTiming.include\",\n value.include,\n previous.include ?? [],\n PATTERN_LIST_EXPECTED,\n toPattern,\n diagnostics,\n ),\n }),\n ),\n webVitals: resolveCaptureOptions(\n \"webVitals\",\n given.webVitals,\n base.webVitals,\n diagnostics,\n (value, previous) => ({\n loader: resolveHook(\"capture.webVitals.loader\", value.loader, previous.loader, diagnostics),\n }),\n ),\n ignoreUrls: resolveList(\n \"capture.ignoreUrls\",\n given.ignoreUrls,\n base.ignoreUrls,\n PATTERN_LIST_EXPECTED,\n toPattern,\n diagnostics,\n ),\n // A string target is an origin, because a substring test would also match a query value\n // or a longer host.\n propagateTraceHeaderTo: resolveList(\n \"capture.propagateTraceHeaderTo\",\n given.propagateTraceHeaderTo,\n base.propagateTraceHeaderTo,\n TARGET_LIST_EXPECTED,\n toTarget,\n diagnostics,\n ),\n plugins: resolveList(\n \"capture.plugins\",\n given.plugins,\n base.plugins,\n \"a list of objects with a name, install() and uninstall()\",\n toPlugin,\n diagnostics,\n ),\n };\n\n for (const key of CAPTURE_FLAG_KEYS) {\n capture[key] = resolveBoolean(`capture.${key}`, given[key], base[key], diagnostics);\n }\n\n return capture;\n}\n\n/**\n * Checks the click settings. An invalid value never turns on text or selector capture.\n * @param value The settings the app supplied.\n * @param previous The current settings, or {} when the capture was a boolean.\n * @param diagnostics Diagnostics reporter.\n * @returns The valid settings, with invalid values replaced by the current ones.\n */\nfunction resolveInteractions(\n value: Record<string, unknown>,\n previous: InteractionOptions,\n diagnostics: Diagnostics,\n): InteractionOptions {\n const ignore = value.ignoreSelector;\n let ignoreSelector = ignore === undefined ? previous.ignoreSelector : ignore;\n if (ignoreSelector !== undefined && ignoreSelector !== null) {\n try {\n if (typeof ignoreSelector !== \"string\") {\n throw new Error(\"Invalid selector\");\n }\n if (typeof document !== \"undefined\") {\n document.createElement(\"div\").matches(ignoreSelector);\n }\n } catch {\n diagnostics.report(\n \"config.invalid\",\n \"capture.interactions.ignoreSelector must be a valid CSS selector or null.\",\n );\n ignoreSelector = previous.ignoreSelector;\n }\n }\n // The name goes into a CSS attribute selector. Letters, digits, hyphens and underscores need\n // no escaping, and any other name keeps the current attribute.\n let actionAttribute = previous.actionAttribute ?? ACTION_ATTRIBUTE_DEFAULT;\n if (value.actionAttribute !== undefined) {\n if (typeof value.actionAttribute === \"string\" && /^[a-z][\\w-]*$/i.test(value.actionAttribute)) {\n actionAttribute = value.actionAttribute;\n } else {\n reportInvalid(\n diagnostics,\n \"capture.interactions.actionAttribute\",\n \"an attribute name of letters, digits, hyphens and underscores\",\n value.actionAttribute,\n `\"${actionAttribute}\"`,\n );\n }\n }\n return {\n actionAttribute,\n text: resolveBoolean(\n \"capture.interactions.text\",\n value.text,\n previous.text ?? false,\n diagnostics,\n ),\n selector: resolveBoolean(\n \"capture.interactions.selector\",\n value.selector,\n previous.selector ?? false,\n diagnostics,\n ),\n ignoreSelector:\n typeof ignoreSelector === \"string\" || ignoreSelector === null ? ignoreSelector : undefined,\n maxTextChars: resolveInteger(\n \"capture.interactions.maxTextChars\",\n value.maxTextChars,\n [0, Number.MAX_SAFE_INTEGER],\n previous.maxTextChars ?? 50,\n diagnostics,\n ),\n rageClicks: resolveBoolean(\n \"capture.interactions.rageClicks\",\n value.rageClicks,\n previous.rageClicks ?? false,\n diagnostics,\n ),\n rageClickCount: resolveInteger(\n \"capture.interactions.rageClickCount\",\n value.rageClickCount,\n [2, 20],\n previous.rageClickCount ?? RAGE_CLICK_COUNT,\n diagnostics,\n ),\n rageClickWindowMs: resolveInteger(\n \"capture.interactions.rageClickWindowMs\",\n value.rageClickWindowMs,\n CLICK_WAIT_RANGE,\n previous.rageClickWindowMs ?? RAGE_CLICK_WINDOW_MS,\n diagnostics,\n ),\n deadClicks: resolveBoolean(\n \"capture.interactions.deadClicks\",\n value.deadClicks,\n previous.deadClicks ?? false,\n diagnostics,\n ),\n deadClickMs: resolveInteger(\n \"capture.interactions.deadClickMs\",\n value.deadClickMs,\n CLICK_WAIT_RANGE,\n previous.deadClickMs ?? DEAD_CLICK_MS,\n diagnostics,\n ),\n };\n}\n\n/** What happens for each key when its signal endpoint is off. */\nconst SIGNAL_OFF = {\n metricsEndpoint: \"The library sends metric records as log records.\",\n tracesEndpoint: \"The library sends no span.\",\n} as const;\n\n/**\n * Validates the metrics or traces endpoint. Only the OTLP serializer has these formats.\n * @param key Config key.\n * @param value The value the consumer passed.\n * @param fallback The current value.\n * @param serializer Resolved serializer option.\n * @param diagnostics Diagnostics reporter.\n * @returns A valid absolute URL, or null to turn the endpoint off.\n */\nfunction resolveSignalEndpoint(\n key: keyof typeof SIGNAL_OFF,\n value: unknown,\n fallback: string | null,\n serializer: SerializerChoice,\n diagnostics: Diagnostics,\n): string | null {\n const url = resolveDestination(key, value, fallback, diagnostics) as string | null;\n\n // A custom or ECS serializer can't encode a metrics or traces request.\n if (url !== null && serializer !== SERIALIZER_NAME_OTLP) {\n diagnostics.report(\n \"config.invalid\",\n `${key} needs serializer \"${SERIALIZER_NAME_OTLP}\". ${SIGNAL_OFF[key]}`,\n );\n return null;\n }\n\n return url;\n}\n\n/** The rules in the form resolvePolicy() reads. POLICY_RULES holds the typed form. */\ninterface PolicyLookup {\n /** Accepted range for each number key. */\n ranges: Partial<Record<string, Range>>;\n /** Accepted range for each key that also takes null. */\n limits: Partial<Record<string, Range>>;\n /** Accepted values for each choice key. */\n choices?: Partial<Record<string, readonly string[]>>;\n /** Resolver for each key with any other value type. */\n custom?: Partial<Record<string, CustomResolver>>;\n}\n\n/**\n * Checks one policy section. An invalid value keeps the current value.\n * @param name Section name for diagnostic messages.\n * @param input The settings the app supplied.\n * @param base The current settings.\n * @param rules The section's ranges and choices.\n * @param diagnostics Diagnostics reporter.\n * @returns The valid section.\n */\nfunction resolvePolicy<T extends object>(\n name: string,\n input: Partial<T> | undefined,\n base: T,\n rules: PolicyLookup,\n diagnostics: Diagnostics,\n): T {\n const next = { ...base };\n for (const key of Object.keys(base) as (keyof T & string)[]) {\n const value: unknown = input?.[key];\n const fallback: unknown = base[key];\n const range = rules.ranges[key];\n const limit = rules.limits[key];\n const choice = rules.choices?.[key];\n const custom = rules.custom?.[key];\n let resolved: unknown = fallback;\n if (custom) {\n resolved = custom(`${name}.${key}`, value, fallback, diagnostics);\n } else if (limit) {\n resolved = resolveLimit(\n `${name}.${key}`,\n value,\n limit,\n fallback as number | null,\n diagnostics,\n );\n } else if (typeof fallback === \"number\" && range) {\n resolved = resolveInteger(`${name}.${key}`, value, range, fallback, diagnostics);\n } else if (typeof fallback === \"boolean\") {\n resolved = resolveBoolean(`${name}.${key}`, value, fallback, diagnostics);\n } else if (choice) {\n resolved = resolveChoice(`${name}.${key}`, value, choice, String(fallback), diagnostics);\n } else if (value === undefined || typeof value === \"string\") {\n resolved = value ?? fallback;\n } else {\n reportInvalid(diagnostics, `${name}.${key}`, \"a string\", value, String(fallback));\n }\n Object.assign(next, { [key]: resolved });\n }\n return next;\n}\n\n/**\n * Returns the input without a section that isn't an object, and reports each one. Otherwise\n * the library would ignore a section such as `capture: null` with no report.\n * @param input Partial consumer configuration options.\n * @param diagnostics Diagnostics reporter.\n * @returns The input, with every bad section left out so its current values stay.\n */\nfunction checkSections(\n input: Partial<ObservabilityConfig>,\n diagnostics: Diagnostics,\n): Partial<ObservabilityConfig> {\n let checked = input;\n\n for (const section of CONFIG_SECTIONS) {\n const value: unknown = input[section];\n if (value !== undefined && !isObject(value)) {\n reportInvalid(diagnostics, section, \"an object\", value, \"the current values\");\n checked = { ...checked, [section]: undefined };\n }\n }\n\n return checked;\n}\n\n/**\n * Reports each pair of settings where one of them does nothing, so the app learns why. The\n * values stay. Only a call that sets one of the pair reports it, so an unrelated later call\n * stays quiet.\n * @param input The options of this configure() call, after checkSections().\n * @param config The resolved config.\n * @param diagnostics Diagnostics reporter.\n */\nfunction reportIneffective(\n input: Partial<ObservabilityConfig>,\n config: ResolvedConfig,\n diagnostics: Diagnostics,\n): void {\n const { capture, sampling } = config;\n const noEffect = (key: string, condition: string): void => {\n diagnostics.report(\"config.invalid\", `${key} has no effect ${condition}. The value stays.`);\n };\n\n const setsTransport = input.transport !== undefined || input.transportWorker !== undefined;\n if (setsTransport && config.transport && config.transportWorker) {\n noEffect(\"transportWorker\", \"with transport\");\n }\n\n const setsExit = input.transport !== undefined || input.transportOnExit !== undefined;\n if (setsExit && config.transportOnExit && !config.transport) {\n noEffect(\"transportOnExit\", \"without transport\");\n }\n\n const setsToggles =\n input.capture?.remoteToggles !== undefined || input.sampling?.remote !== undefined;\n if (setsToggles && capture.remoteToggles.length > 0 && !sampling.remote) {\n noEffect(\"capture.remoteToggles\", \"without sampling.remote\");\n }\n\n // A remote rule can still turn on fetch or xhr, and then the targets apply.\n const requests =\n capture.fetch ||\n capture.xhr ||\n capture.remoteToggles.includes(\"fetch\") ||\n capture.remoteToggles.includes(\"xhr\");\n const setsTargets =\n input.capture?.propagateTraceHeaderTo !== undefined ||\n input.capture?.fetch !== undefined ||\n input.capture?.xhr !== undefined;\n if (setsTargets && capture.propagateTraceHeaderTo.length > 0 && !requests) {\n noEffect(\"capture.propagateTraceHeaderTo\", \"without capture.fetch or capture.xhr\");\n }\n}\n\n/**\n * Resolves partial configuration input into a validated ResolvedConfig.\n * @param input Partial consumer configuration options.\n * @param diagnostics Diagnostics reporter.\n * @param previous The active configuration, for an incremental reconfigure.\n * @returns Complete, validated configuration object.\n */\nexport function resolveConfig(\n input: Partial<ObservabilityConfig>,\n diagnostics: Diagnostics,\n previous?: ResolvedConfig,\n): ResolvedConfig {\n const base = previous ?? DEFAULT_CONFIG;\n const given = checkSections(input, diagnostics);\n\n // Check every policy section against its own rules. POLICY_RULES key order is the report order.\n const policies = Object.fromEntries(\n (Object.keys(POLICY_RULES) as PolicySection[]).map((key) => [\n key,\n resolvePolicy(key, given[key], base[key], POLICY_RULES[key], diagnostics),\n ]),\n ) as Pick<ResolvedConfig, PolicySection>;\n // Every key is read on its own. Spreading the input would let undefined remove a hook.\n const merged: ResolvedConfig = {\n ...base,\n ...policies,\n\n lockConfiguration: resolveBoolean(\n \"lockConfiguration\",\n given.lockConfiguration,\n base.lockConfiguration,\n diagnostics,\n ),\n loggerCache: {\n // 0 turns the cache off, and null lifts the limit.\n maxEntries: resolveLimit(\n \"loggerCache.maxEntries\",\n given.loggerCache?.maxEntries,\n COUNT_RANGE,\n base.loggerCache.maxEntries,\n diagnostics,\n ),\n },\n securityContext: {\n // An empty id keeps the current one, and the runtime creates one at startup.\n id:\n resolveString(\n \"securityContext.id\",\n given.securityContext?.id,\n base.securityContext.id,\n diagnostics,\n ) || base.securityContext.id,\n isolation: resolveBoolean(\n \"securityContext.isolation\",\n given.securityContext?.isolation,\n base.securityContext.isolation,\n diagnostics,\n ),\n },\n // An unset environment variable arrives as undefined, so keep the current endpoint.\n endpoint: resolveEndpoint(given.endpoint, base.endpoint, diagnostics) as string | null,\n serviceName: resolveString(\"serviceName\", given.serviceName, base.serviceName, diagnostics),\n serviceVersion: resolveString(\n \"serviceVersion\",\n given.serviceVersion,\n base.serviceVersion,\n diagnostics,\n ),\n environment: resolveString(\"environment\", given.environment, base.environment, diagnostics),\n // A bad value reports config.invalid and the current value stays. Without this check, a bad\n // minLevel silently drops every record.\n enabled: resolveBoolean(\"enabled\", given.enabled, base.enabled, diagnostics),\n payloadMode: resolveChoice(\n \"payloadMode\",\n given.payloadMode,\n [\"copy\", \"defer\"] as const,\n base.payloadMode,\n diagnostics,\n ),\n minLevel: resolveLevel(\"minLevel\", given.minLevel, base.minLevel, diagnostics),\n minLevels: resolveMinLevels(given.minLevels, base.minLevels, diagnostics),\n processors: resolveProcessors(given.processors, base.processors, diagnostics),\n compression: resolveChoice(\n \"compression\",\n given.compression,\n COMPRESSION_VALUES,\n base.compression,\n diagnostics,\n ),\n credentials: resolveChoice(\n \"credentials\",\n given.credentials,\n CREDENTIALS_VALUES,\n base.credentials,\n diagnostics,\n ),\n headers: resolveHeaders(given.headers, base.headers, diagnostics),\n identity: resolveChoice(\n \"identity\",\n given.identity,\n IDENTITY_VALUES,\n base.identity,\n diagnostics,\n ),\n // A name stays a name, because the transport picks the implementation.\n serializer: resolveSerializer(given.serializer, previous?.serializer, diagnostics),\n consoleOutput: resolveConsole(given.consoleOutput, base.consoleOutput, diagnostics),\n sampling: resolveSampling(given.sampling, base.sampling, diagnostics),\n bus: resolveBus(given.bus, base.bus, diagnostics),\n batching: resolveRanges(\n \"batching\",\n given.batching,\n base.batching,\n BATCHING_RANGES,\n diagnostics,\n ),\n retention: resolveRetention(given.retention, base.retention, diagnostics),\n limits: resolveRanges(\"limits\", given.limits, base.limits, LIMIT_RANGES, diagnostics),\n journey: resolveJourney(given.journey, base.journey, diagnostics),\n capture: resolveCapture(given.capture, base.capture, diagnostics),\n // Without a transport function, the pipeline drops every batch, so a bad value keeps the\n // current one.\n transport: resolveHook(\"transport\", given.transport, base.transport, diagnostics),\n transportOnExit: resolveHook(\n \"transportOnExit\",\n given.transportOnExit,\n base.transportOnExit,\n diagnostics,\n ),\n transportWorker: resolveHook(\n \"transportWorker\",\n given.transportWorker,\n base.transportWorker,\n diagnostics,\n ),\n otelLoader: resolveHook(\"otelLoader\", given.otelLoader, base.otelLoader, diagnostics),\n contextProvider: resolveHook(\n \"contextProvider\",\n given.contextProvider,\n base.contextProvider,\n diagnostics,\n ),\n redact: resolveRedact(given.redact, base.redact, diagnostics),\n onDiagnostic: resolveHook(\"onDiagnostic\", given.onDiagnostic, base.onDiagnostic, diagnostics),\n onDrop: resolveHook(\"onDrop\", given.onDrop, base.onDrop, diagnostics),\n };\n\n for (const key of [\"metricsEndpoint\", \"tracesEndpoint\"] as const) {\n merged[key] = resolveSignalEndpoint(key, given[key], base[key], merged.serializer, diagnostics);\n }\n\n // null selects console-only mode. \"\" is the default when no call has set an endpoint.\n // A custom transport needs no endpoint.\n if (merged.endpoint === \"\") {\n if (merged.transport === undefined) {\n diagnostics.report(\n \"config.invalid\",\n \"endpoint is missing. The library drops each record. Set endpoint: null for console-only mode.\",\n );\n }\n }\n\n // Only the delivery stack sends, and it loads only with an endpoint or a custom transport.\n for (const key of [\"metricsEndpoint\", \"tracesEndpoint\"] as const) {\n if (merged[key] !== null && merged.endpoint === null && !merged.transport) {\n diagnostics.report(\n \"config.invalid\",\n `${key} needs endpoint or transport. The library sends nothing to ${key}.`,\n );\n }\n }\n\n if (!merged.serviceName) {\n diagnostics.report(\n \"config.invalid\",\n `serviceName is missing. Every record reports service.name as '${UNKNOWN_SERVICE_NAME}'.`,\n );\n merged.serviceName = UNKNOWN_SERVICE_NAME;\n }\n\n // Swap the previous endpoints in the ignore list for the new ones to prevent a self-logging\n // loop. Otherwise one failed POST logs another failed POST without end.\n merged.capture.ignoreUrls = merged.capture.ignoreUrls.filter(\n (url) =>\n url !== previous?.endpoint &&\n url !== previous?.metricsEndpoint &&\n url !== previous?.tracesEndpoint &&\n url !== previous?.replay.endpoint,\n );\n for (const url of [\n merged.endpoint,\n merged.metricsEndpoint,\n merged.tracesEndpoint,\n merged.replay.endpoint,\n ]) {\n if (url && !merged.capture.ignoreUrls.includes(url)) {\n merged.capture.ignoreUrls = [...merged.capture.ignoreUrls, url];\n }\n }\n\n if (merged.delivery.retryMaxDelayMs < merged.delivery.retryBaseDelayMs) {\n diagnostics.report(\n \"config.invalid\",\n \"delivery.retryMaxDelayMs must be at least retryBaseDelayMs.\",\n );\n merged.delivery.retryBaseDelayMs = base.delivery.retryBaseDelayMs;\n merged.delivery.retryMaxDelayMs = base.delivery.retryMaxDelayMs;\n }\n reportIneffective(given, merged, diagnostics);\n reportUnknownKeys(input, diagnostics);\n\n return merged;\n}\n\n/**\n * Reports every config key the schema doesn't know, at the top level and one level inside\n * each section. A typo passes the `Partial` type check and has no effect, for example\n * `remoteUrl` for `endpoint` or `capture.webVital` for `capture.webVitals`. Namespace keys\n * under `sampling.rates` are free-form and one level deeper, so the check skips them.\n * @param input Partial consumer configuration options.\n * @param diagnostics Diagnostics reporter.\n */\nfunction reportUnknownKeys(input: Partial<ObservabilityConfig>, diagnostics: Diagnostics): void {\n const known = new Set<string>([...Object.keys(DEFAULT_CONFIG), ...UNDEFAULTED_CONFIG_KEYS]);\n\n for (const key of Object.keys(input)) {\n if (!known.has(key)) {\n diagnostics.report(\n \"config.invalid\",\n `The library ignores the unknown config key \"${key}\". Check the spelling.`,\n );\n }\n }\n\n for (const section of CONFIG_SECTIONS) {\n const values: unknown = input[section];\n\n if (typeof values !== \"object\" || values === null) {\n continue;\n }\n\n const sectionKeys = new Set<string>([\n ...Object.keys(DEFAULT_CONFIG[section]),\n ...UNDEFAULTED_SECTION_KEYS[section],\n ]);\n\n for (const key of Object.keys(values)) {\n if (!sectionKeys.has(key)) {\n diagnostics.report(\n \"config.invalid\",\n `The library ignores the unknown config key \"${section}.${key}\". Check the spelling.`,\n );\n }\n }\n }\n}\n\n/**\n * Changes the active configuration object in place, so subsystems holding a section\n * reference see the update.\n * @param target Active configuration object to change.\n * @param next Configuration object with the new values.\n */\nexport function applyResolvedConfig(target: ResolvedConfig, next: ResolvedConfig): void {\n for (const key of Object.keys(next) as (keyof ResolvedConfig)[]) {\n // The cast widens the tuple so includes accepts any string key. With satisfies, the tuple\n // stays narrow and every non-section key fails to compile.\n if ((CONFIG_SECTIONS as readonly string[]).includes(key)) {\n continue;\n }\n Object.assign(target, { [key]: next[key] });\n }\n\n // Merge every section object in place to keep its reference. A new object would leave\n // subsystems on the old section they got at construction.\n for (const section of CONFIG_SECTIONS) {\n Object.assign(target[section] as object, next[section] as object);\n }\n}\n"],"mappings":";;;AA2DA,IAAMc,IAAc,OAAO,KAAKN,CAAW,GAGrCO,KAAqB,CAAC,QAAQ,MAAM,GACpCC,KAAqB;CAAC;CAAQ;CAAe;AAAS,GACtDC,KAAiB;CAAC;CAAQ;CAAa;CAAgB;CAAU;AAAM,GACvEC,KAAkB,CAAC,WAAW,QAAQ,GACtCC,KAAkB;CAAC;CAAQ;CAAU;CAAa;AAAK,GACvDC,KAAsB;CAAC;CAAQ;CAAY;AAAQ,GACnDC,KAAuB;CAAC;CAAQ;CAAW;CAAO;AAAQ,GAC1DC,IAAwB;CAAC;CAAS;CAAQ;CAAQ;AAAK,GACvDC,IAAsC;CAAC;CAAU;CAAS;CAAU;CAAO;CAAU;AAAM,GAM3FC,KAAwD;CAC5D,oBAAoB,CAAC,KAAK,GAAM;CAChC,cAAc,CAAC,GAAG,GAAI;CACtB,iBAAiB,CAAC,GAAG,GAAI;AAC3B,GAGMC,KAA2B,CAAC,GAAG,GAAI,GAGnCC,KAA6B,CAAC,KAAQ,MAAuB,GAG7DC,KAAkC,CAAC,GAAG,EAAE,GAOxCC,KAAmD;CACvD,cAAc,CAAC,KAAK,KAAM;CAC1B,mBAAmB,CAAC,KAAK,KAAM;CAC/B,mBAAmB,CAAC,GAAG,IAAI;CAC3B,eAAe,CAAC,KAAK,KAAM;CAC3B,UAAU,CAAC,GAAG,EAAE;CAChB,gBAAgB,CAAC,GAAG,GAAM;CAC1B,UAAU,CAAC,KAAK,GAA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cAAchB,EACZ,wBACAW,EAAM,cACNK,EAAK,cACLpD,CACF;EACA,eAAe6D,EACb,yBACAd,EAAM,eACNK,EAAK,eACL,4DACC,MAAU9F,EAAqB,MAAM,MAAQ2C,MAAQjB,CAAK,GAC3DgB,CACF;EACA,gBAAgB0F,EACd,kBACA3C,EAAM,gBACNK,EAAK,gBACLpD,IACC,GAAO,OAAc,EACpB,QAAQ8B,EACN,iCACA9C,EAAM,QACN+F,EAAS,UAAA,KACT/E,CACF,EACF,EACF;EACA,cAAc0F,EACZ,gBACA3C,EAAM,cACNK,EAAK,cACLpD,IACC,GAAO,MAAagG,GAAoBhH,GAAO+F,GAAU/E,CAAW,CACvE;EACA,SAAS0F,EACP,WACA3C,EAAM,SACNK,EAAK,SACLpD,IACC,GAAO,OAAc,EACpB,QAAQ6D,EACN,0BACA7E,EAAM,QACN+F,EAAS,UAAU,CAAC,SAAS,MAAM,GACnC9D,IACAoD,IACArE,CACF,EACF,EACF;EACA,YAAY0F,EACV,cACA3C,EAAM,YACNK,EAAK,YACLpD,IACC,GAAO,OAAc,EACpB,aAAa8B,EACX,kCACA9C,EAAM,aACN+F,EAAS,eAAA,KACT/E,CACF,EACF,EACF;EACA,YAAY0F,EACV,cACA3C,EAAM,YACNK,EAAK,YACLpD,IACC,GAAO,OAAc,EACpB,SAAS6D,EACP,8BACA7E,EAAM,SACN+F,EAAS,WAAW,CAAC,GACrB7D,GACAkD,IACApE,CACF,EACF,EACF;EACA,WAAW0F,EACT,aACA3C,EAAM,WACNK,EAAK,WACLpD,IACC,GAAO,OAAc,EACpB,QAAQoC,EAAY,4BAA4BpD,EAAM,QAAQ+F,EAAS,QAAQ/E,CAAW,EAC5F,EACF;EACA,YAAY6D,EACV,sBACAd,EAAM,YACNK,EAAK,YACLlC,GACAkD,IACApE,CACF;EAGA,wBAAwB6D,EACtB,kCACAd,EAAM,wBACNK,EAAK,wBACLjC,IACAsD,IACAzE,CACF;EACA,SAAS6D,EACP,mBACAd,EAAM,SACN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VIEW_UA_PATTERN","IOS_DEVICE_UA_PATTERN","MACINTOSH_UA_PATTERN","MOBILE_UA_PATTERN","WEBKIT_UA_TOKEN","SAFARI_UA_TOKEN","HIGH_SURROGATE_MIN","HIGH_SURROGATE_MAX","UTF8_TWO_BYTE_CEILING","SEVERITY_NUMBER","LEVEL_ORDER","ATTR_LOG_TYPE","ATTR_LOG_SEQ","ATTR_APP_NAMESPACE","ATTR_PAGE_URL","ATTR_URL_FULL","ATTR_JOURNEY_ID","ATTR_JOURNEY_NAME","ATTR_JOURNEY_PARENT_ID","ATTR_SANITIZE_FAILED","ATTR_ERROR_DATA","ATTR_BREADCRUMBS","ATTR_ATTRIBUTES_DROPPED","ATTR_ATTRIBUTES_BYTES","ATTR_CLOCK_OFFSET_MS","ATTR_DEBUG_BUFFER","RESOURCE_SERVICE_NAME","RESOURCE_SERVICE_VERSION","RESOURCE_DEPLOYMENT_ENVIRONMENT","RESOURCE_TELEMETRY_SDK_NAME","RESOURCE_TELEMETRY_SDK_VERSION","RESOURCE_TELEMETRY_SDK_LANGUAGE","RESOURCE_HOST_PLATFORM","RESOURCE_SESSION_ID","RESOURCE_TAB_ID","RESOURCE_CONTEXT_ID","RESOURCE_BROWSER_USER_AGENT","RESOURCE_OPENFIN_UUID","RESOURCE_OPENFIN_NAME","TELEMETRY_SDK_NAME","TELEMETRY_SDK_VERSION","TELEMETRY_SDK_LANGUAGE","SERIALIZER_NAME_OTLP","ECS_LEVEL_NAMES","ECS_VERSION","CONTENT_TYPE_JSON","CONTENT_TYPE_NDJSON","NANOS_PER_MILLI","NANOS_PATTERN","HEADER_CONTENT_TYPE","HEADER_CONTENT_ENCODING","HEADER_RETRY_AFTER","HEADER_BATCH_ID","HEADER_ATTEMPT","HEADER_SAMPLING","HEADER_DATE","ENCODING_GZIP","MILLIS_PER_SECOND","BEACON_LIMIT_BYTES","RESPONSE_BODY_LIMIT_BYTES","CONTENT_TYPE_TEXT_PLAIN","QUERY_PARAM_BATCH_ID","QUERY_PARAM_EXIT_REASON","BATCH_STORAGE_KEY_PREFIX","EMERGENCY_STORAGE_KEY_PREFIX","STORAGE_PROBE_KEY","QUOTA_EXCEEDED_ERROR","INDEXEDDB_STORE_NAME","INDEXEDDB_CREATED_AT_INDEX","STORAGE_NAME_INDEXEDDB","STORAGE_NAME_LOCAL","STORAGE_NAME_MEMORY","STORAGE_NAME_NONE","DRAIN_LOCK_NAME","EMERGENCY_LOCK_NAME","JOURNEY_STORAGE_KEY","JOURNEY_ID_PATTERN","JOURNEY_CLOCK_SKEW_MS","OPENFIN_OPTIONS_TIMEOUT_MS","OPENFIN_JOURNEY_CUSTOM_DATA_KEY","BASE64_PLUS_PATTERN","BASE64_SLASH_PATTERN","BASE64_PADDING_PATTERN","BASE64URL_DASH_PATTERN","BASE64URL_UNDERSCORE_PATTERN","TRACE_MAX_AGE_MS","TRACEPARENT_HEADER","FNV_OFFSET_BASIS","FNV_PRIME","UINT32_MAX","LEVEL_BYPASS_TYPES","LOG_TYPE_METRIC","LOG_TYPE_ACTION","LOG_TYPE_SPAN","BUS_PROTOCOL","BUS_TYPE","RUNTIME_GLOBAL_KEY","RUNTIME_STOPPED_KEY","LIBRARY_REQUEST_KEY","LIBRARY_CONSOLE_KEY","TRANSPORT_CALL_KEY","ERROR_STORM_WINDOW_MS","ACTION_ATTRIBUTE_DEFAULT","IGNORE_SELECTOR","RAGE_CLICK_WINDOW_MS","DEAD_CLICK_MS","DEAD_CLICK_CONTROLS","CONSOLE_DEFAULT_STYLES","GAP_REPORT_THROTTLE_MS","CAPTURE_NAMESPACE","STORAGE_NAMESPACE","DIAGNOSTICS_NAMESPACE","DEFAULT_METRIC_UNIT","METRIC_NAMESPACE","ATTR_METRIC_OVERFLOW","METRIC_DEFAULT_BOUNDARIES","METRIC_KEYS","METRIC_FIELD_KEYS","PROFILE_MAX_US","PROFILE_METRIC_NAME","PROFILE_KEYS","PROFILE_FRAME_METRIC_NAME","PROFILE_FRAME_PROBE","INSTRUMENT_OPTIONS_FAULT","REPLAY_ID_KEY","REPLAY_UNMASK_ATTRIBUTE","PROFILER_PROBE_LIMIT","PROFILER_GLOBAL_KEY","PROFILER_CALIBRATION_PAIRS","TRACE_NAMESPACE","SPAN_KEYS","TRANSPORT_WORKER_PROTOCOL","TRANSPORT_WORKER_TYPE","TRANSPORT_WORKER_REFUSAL","WORKER_REPLY_GRACE_MS","DEFER_IDLE_TIMEOUT_MS","DEFER_QUEUE_LIMIT","RESOURCE_SLOW_MS","SERVER_TIMING_HEADER","SERVER_TIMING_MAX_CHARS","REMOTE_CAPTURE_FLAGS","UNKNOWN_SERVICE_NAME","REMOTE_SAMPLING_MAX_CHARS","REMOTE_SAMPLING_MAX_TTL_MS","REMOTE_SAMPLING_POLL_MS","UNDEFAULTED_CONFIG_KEYS","CONFIG_SECTIONS","UNDEFAULTED_SECTION_KEYS","CONSOLE_DEFAULT_LEVEL","LOG_FLUSH_INTERVAL_MS","METRIC_INTERVAL_MS","REQUEST_TIMEOUT_MS","COMPRESSION_THRESHOLD_BYTES","STORAGE_DB_NAME","STORAGE_LIMITS","STORAGE_DEADLINE_MS","FLUSH_TIMEOUT_MS","FLUSH_TIMEOUT_MAX_MS","RETRY_BASE_DELAY_MS","RETRY_MAX_DELAY_MS","RETRY_IDLE_DELAY_MS","JOURNEY_MAX_AGE_MS","JOURNEY_URL_PARAM","BUS_CHANNEL_NAME","BUS_HANDSHAKE_TIMEOUT_MS","BUS_FLUSH_GAP_MS","FLUSH_REQUEST_SHARE","BUS_MAX_BOOT_BUFFER_ACTIONS","ERROR_DEDUPE_MS","RECORD_LIMITS","ROUTING_RESET","ROUTING_KEYS","DEFAULT_CONFIG"],"sources":["../src/constants.ts"],"sourcesContent":["// src/constants.ts\n//\n// Every limit, threshold, timing window, storage key, pattern and default the\n// library uses.\n\nimport type { ConsoleStyles, ResolvedConfig } from \"./models/config\";\nimport type { LogLevel, LogType } from \"./models/log-record\";\nimport type { StorageLimits } from \"./models/storage\";\n\n// ----------------------------------\n// Library-wide\n// ----------------------------------\n\n/** Prefix on console messages this library writes. */\nexport const LIBRARY_LOG_PREFIX = \"[ui-observability]\";\n\n// ----------------------------------\n// Diagnostics\n// ----------------------------------\n\n/**\n * Throttle window per diagnostic code, in milliseconds. Limits how often an error\n * loop can call the handler.\n */\nexport const DIAGNOSTIC_THROTTLE_MS = 1000;\n\n// ----------------------------------\n// Identity\n// ----------------------------------\n\n/** `localStorage` key for the session id and its last-seen time. */\nexport const SESSION_ID_KEY = \"ui-observability.session\";\n\n/** `sessionStorage` key for the tab id. */\nexport const TAB_ID_KEY = \"ui-observability.tab\";\n\n/** sessionStorage key for a live page's marker. A clean close removes it. */\nexport const ALIVE_KEY = \"ui-observability.alive\";\n\n/** How often the alive marker is updated, in milliseconds. */\nexport const ALIVE_UPDATE_MS = 30_000;\n\n/** Session idle timeout, in milliseconds. */\nexport const SESSION_IDLE_MS = 30 * 60 * 1000;\n\n/** Min gap between session last-seen writes, in milliseconds. */\nexport const SESSION_TOUCH_MS = 60_000;\n\n/** Random id length, in bytes, used when `crypto.randomUUID` is unavailable. */\nexport const ID_BYTE_LENGTH = 16;\n\n/** Distinct values in one byte (256). */\nexport const BYTE_VALUE_COUNT = 256;\n\n// ----------------------------------\n// Platform detection\n// ----------------------------------\n\n/** Matches OpenFin's user agent. */\nexport const OPENFIN_UA_PATTERN = /OpenFin/i;\n\n/** Matches Android's webview token (`wv`). */\nexport const ANDROID_WEBVIEW_UA_PATTERN = /\\bwv\\b/;\n\n/** Matches iOS hardware: iPhone, iPad, iPod. */\nexport const IOS_DEVICE_UA_PATTERN = /\\b(iPhone|iPad|iPod)\\b/;\n\n/** Matches desktop macOS in a user agent. */\nexport const MACINTOSH_UA_PATTERN = /\\bMacintosh\\b/;\n\n/** Matches the mobile token. */\nexport const MOBILE_UA_PATTERN = /\\bMobile\\b/;\n\n/** WebKit engine token, present in every WebKit browser including webviews. */\nexport const WEBKIT_UA_TOKEN = \"AppleWebKit\";\n\n/** Safari token sent by real iOS browsers, not in-app webviews. */\nexport const SAFARI_UA_TOKEN = \"Safari/\";\n\n// ----------------------------------\n// Sanitizing and size estimation\n// ----------------------------------\n\n/** First UTF-16 high surrogate code unit. */\nexport const HIGH_SURROGATE_MIN = 0xd800;\n\n/** Last UTF-16 high surrogate code unit. */\nexport const HIGH_SURROGATE_MAX = 0xdbff;\n\n/** Code units below this encode as one UTF-8 byte. */\nexport const UTF8_ONE_BYTE_CEILING = 0x80;\n\n/** Code units below this, and at or above the one-byte ceiling, encode as two UTF-8 bytes. */\nexport const UTF8_TWO_BYTE_CEILING = 0x800;\n\n/** Class names kept in a `describeNode` selector. */\nexport const MAX_NODE_CLASS_NAMES = 3;\n\n/** Byte cost of a null or undefined value. */\nexport const BYTES_PER_NULL = 4;\n\n/** Byte cost of a number (flat estimate). */\nexport const BYTES_PER_NUMBER = 8;\n\n/** Byte cost of a boolean. */\nexport const BYTES_PER_BOOLEAN = 5;\n\n/** Byte cost of an object or array's wrapping braces or brackets. */\nexport const BYTES_PER_CONTAINER = 2;\n\n/** Byte cost of a string's wrapping quotes. */\nexport const BYTES_PER_QUOTED_STRING = 2;\n\n/** Byte cost of one key's punctuation: quotes, colon, comma. */\nexport const BYTES_PER_KEY_OVERHEAD = 4;\n\n// ----------------------------------\n// Record model\n// ----------------------------------\n\n/**\n * Maps each log level to its OpenTelemetry severity number.\n * @see {@link LEVEL_ORDER}\n */\nexport const SEVERITY_NUMBER: Record<LogLevel, number> = {\n TRACE: 1,\n DEBUG: 5,\n INFO: 9,\n WARN: 13,\n ERROR: 17,\n FATAL: 21,\n};\n\n/**\n * Alias for `SEVERITY_NUMBER`, used by the level filter.\n * @see {@link SEVERITY_NUMBER}\n */\nexport const LEVEL_ORDER: Record<LogLevel, number> = SEVERITY_NUMBER;\n\n// ----------------------------------\n// Attribute and resource keys\n// ----------------------------------\n//\n// The attribute and resource key names records carry in the payload. They follow the\n// OpenTelemetry conventions, and the `uiobs.` prefix marks this library's own fields.\n\n/** Record kind attribute key. */\nexport const ATTR_LOG_TYPE = \"log.type\";\n\n/** A record's sequence number within its context. Starts at 1. */\nexport const ATTR_LOG_SEQ = \"log.seq\";\n\n/** Logger namespace attribute key. */\nexport const ATTR_APP_NAMESPACE = \"app.namespace\";\n\n/** The document URL at the time the record was built. */\nexport const ATTR_PAGE_URL = \"page.url\";\n\n/**\n * HTTP request URL attribute key, set by network capture. Don't reuse `ATTR_PAGE_URL` for it,\n * because the page URL overwrites the request target under that key.\n * @see {@link ATTR_PAGE_URL}\n */\nexport const ATTR_URL_FULL = \"url.full\";\n\n/** Journey id attribute key. */\nexport const ATTR_JOURNEY_ID = \"journey.id\";\n\n/** Journey name attribute key. */\nexport const ATTR_JOURNEY_NAME = \"journey.name\";\n\n/** Parent journey id, present only on a child journey. */\nexport const ATTR_JOURNEY_PARENT_ID = \"journey.parent_id\";\n\n/** Marks a record whose attributes failed to sanitize. */\nexport const ATTR_SANITIZE_FAILED = \"uiobs.sanitize_failed\";\n\n/** An Error reason's own fields, or the whole reason when it isn't an Error. */\nexport const ATTR_ERROR_DATA = \"error.data\";\n\n/** An error record's breadcrumb history. */\nexport const ATTR_BREADCRUMBS = \"breadcrumbs\";\n\n/**\n * Marks a record whose attributes were dropped for exceeding the byte budget.\n * @see {@link ATTR_ATTRIBUTES_BYTES}\n */\nexport const ATTR_ATTRIBUTES_DROPPED = \"uiobs.attributes_dropped\";\n\n/**\n * Byte size of the dropped attributes.\n * @see {@link ATTR_ATTRIBUTES_DROPPED}\n */\nexport const ATTR_ATTRIBUTES_BYTES = \"uiobs.attributes_bytes\";\n\n/** Server time minus client time, in milliseconds, from an accepted answer's Date header. */\nexport const ATTR_CLOCK_OFFSET_MS = \"uiobs.clock_offset_ms\";\n\n/** Marks a record the debug buffer held until an error. */\nexport const ATTR_DEBUG_BUFFER = \"uiobs.debug_buffer\";\n\n/** Half the HTTP Date header's resolution. Centers the clock offset's error. */\nexport const DATE_HEADER_HALF_STEP_MS = 500;\n\n/** Application name resource key. */\nexport const RESOURCE_SERVICE_NAME = \"service.name\";\n\n/** Application build version resource key. */\nexport const RESOURCE_SERVICE_VERSION = \"service.version\";\n\n/** Deployment environment resource key. */\nexport const RESOURCE_DEPLOYMENT_ENVIRONMENT = \"deployment.environment\";\n\n/**\n * Producer library name resource key.\n * @see {@link TELEMETRY_SDK_NAME}\n */\nexport const RESOURCE_TELEMETRY_SDK_NAME = \"telemetry.sdk.name\";\n\n/**\n * Producer library version resource key.\n * @see {@link TELEMETRY_SDK_VERSION}\n */\nexport const RESOURCE_TELEMETRY_SDK_VERSION = \"telemetry.sdk.version\";\n\n/**\n * Producer SDK language resource key.\n * @see {@link TELEMETRY_SDK_LANGUAGE}\n */\nexport const RESOURCE_TELEMETRY_SDK_LANGUAGE = \"telemetry.sdk.language\";\n\n/** Host platform resource key: browser, webview, or OpenFin. */\nexport const RESOURCE_HOST_PLATFORM = \"host.platform\";\n\n/** Session id resource key. */\nexport const RESOURCE_SESSION_ID = \"session.id\";\n\n/** Tab id resource key. */\nexport const RESOURCE_TAB_ID = \"tab.id\";\n\n/** Context (realm) id resource key. */\nexport const RESOURCE_CONTEXT_ID = \"context.id\";\n\n/** Raw user agent resource key. */\nexport const RESOURCE_BROWSER_USER_AGENT = \"browser.user_agent\";\n\n/** OpenFin application uuid resource key. */\nexport const RESOURCE_OPENFIN_UUID = \"openfin.uuid\";\n\n/** OpenFin window or view name resource key. */\nexport const RESOURCE_OPENFIN_NAME = \"openfin.name\";\n\n/**\n * Value of `telemetry.sdk.name`.\n * @see {@link RESOURCE_TELEMETRY_SDK_NAME}\n */\nexport const TELEMETRY_SDK_NAME = \"@utk09/ui-observability\";\n\n/**\n * Value of `telemetry.sdk.version`. The build writes the package.json version here.\n * @see {@link RESOURCE_TELEMETRY_SDK_VERSION}\n */\nexport const TELEMETRY_SDK_VERSION = __UIOBS_VERSION__;\n\n/**\n * Value of `telemetry.sdk.language`.\n * @see {@link RESOURCE_TELEMETRY_SDK_LANGUAGE}\n */\nexport const TELEMETRY_SDK_LANGUAGE = \"webjs\";\n\n// ----------------------------------\n// Serializers\n// ----------------------------------\n\n/** OTLP/JSON serializer name. */\nexport const SERIALIZER_NAME_OTLP = \"otlp\";\n\n/** ECS serializer name. */\nexport const SERIALIZER_NAME_ECS = \"ecs\";\n\n/**\n * ECS `log.level` names that differ from the lowercase severity text. ECS spells\n * the warning level out in full, and every other level matches in lowercase.\n * @see {@link SERIALIZER_NAME_ECS}\n */\nexport const ECS_LEVEL_NAMES: Partial<Record<LogLevel, string>> = { WARN: \"warning\" };\n\n/** The ECS version of the documents, the same one the Elastic ECS logging libraries write. */\nexport const ECS_VERSION = \"8.10.0\";\n\n/** Content type for an OTLP/JSON body. */\nexport const CONTENT_TYPE_JSON = \"application/json\";\n\n/** Content type for newline-delimited JSON. */\nexport const CONTENT_TYPE_NDJSON = \"application/x-ndjson\";\n\n/** Nanoseconds per millisecond. */\nexport const NANOS_PER_MILLI = 1000000n;\n\n/**\n * Matches a nanosecond epoch in decimal digits, for example \"1755543600123000000\".\n * @see {@link NANOS_PER_MILLI}\n */\nexport const NANOS_PATTERN = /^\\d+$/;\n\n// ----------------------------------\n// HTTP transport\n// ----------------------------------\n\n/** Content-Type header name. */\nexport const HEADER_CONTENT_TYPE = \"Content-Type\";\n\n/** Content-Encoding header name. */\nexport const HEADER_CONTENT_ENCODING = \"Content-Encoding\";\n\n/** Retry-After header name. */\nexport const HEADER_RETRY_AFTER = \"Retry-After\";\n\n/**\n * Batch deduplication key header name.\n * @see {@link QUERY_PARAM_BATCH_ID}\n */\nexport const HEADER_BATCH_ID = \"X-UiObs-Batch-Id\";\n\n/** Delivery attempt number header name. */\nexport const HEADER_ATTEMPT = \"X-UiObs-Attempt\";\n\n/** Response header that carries sampling rules from the ingest server. */\nexport const HEADER_SAMPLING = \"X-UiObs-Sampling\";\n\n/** Response header that gives the server time. The server must expose it to CORS. */\nexport const HEADER_DATE = \"Date\";\n\n/** Gzip encoding name. */\nexport const ENCODING_GZIP = \"gzip\";\n\n/** Lowest valid HTTP status code. */\nexport const HTTP_STATUS_MIN = 100;\n\n/** Highest valid HTTP status code. */\nexport const HTTP_STATUS_MAX = 599;\n\n/** Lowest HTTP status code that accepts a batch. */\nexport const HTTP_SUCCESS_MIN = 200;\n\n/** Lowest HTTP status code above the success range. */\nexport const HTTP_SUCCESS_END = 300;\n\n/** 401, credentials missing or rejected. */\nexport const HTTP_UNAUTHORIZED = 401;\n\n/** 403, valid credentials but access denied. */\nexport const HTTP_FORBIDDEN = 403;\n\n/** 408, the server closed the connection after a timeout. The transport can retry. */\nexport const HTTP_REQUEST_TIMEOUT = 408;\n\n/** 413, payload too large. The transport must split the batch. */\nexport const HTTP_PAYLOAD_TOO_LARGE = 413;\n\n/** 415, unsupported media type. A stock OpenTelemetry Collector gives it to a text/plain batch. */\nexport const HTTP_UNSUPPORTED_MEDIA_TYPE = 415;\n\n/** 429, backpressure. */\nexport const HTTP_TOO_MANY_REQUESTS = 429;\n\n/** 500, floor for server-side errors. */\nexport const HTTP_SERVER_ERROR_MIN = 500;\n\n/** 503, temporary unavailability. */\nexport const HTTP_SERVICE_UNAVAILABLE = 503;\n\n/** Milliseconds per second. */\nexport const MILLIS_PER_SECOND = 1000;\n\n// ----------------------------------\n// Exit flush\n// ----------------------------------\n\n/** Max exit payload size, in bytes (`sendBeacon`/`fetch(keepalive)` shared budget). */\nexport const BEACON_LIMIT_BYTES = 60_000;\n\n/** Largest ingest response body the library reads, in bytes. It skips a larger body. */\nexport const RESPONSE_BODY_LIMIT_BYTES = 16_384;\n\n/** Longest server message that a diagnostic repeats. The server controls this text. */\nexport const SERVER_MESSAGE_MAX_CHARS = 256;\n\n/** Content type for an exit payload. CORS-safelisted, so it doesn't trigger a preflight. */\nexport const CONTENT_TYPE_TEXT_PLAIN = \"text/plain;charset=UTF-8\";\n\n/**\n * Batch id query param name, for the exit path.\n * @see {@link HEADER_BATCH_ID}\n */\nexport const QUERY_PARAM_BATCH_ID = \"uiobs_batch_id\";\n\n/** Exit reason query param name, for logs only. */\nexport const QUERY_PARAM_EXIT_REASON = \"uiobs_exit\";\n\n// ----------------------------------\n// Storage\n// ----------------------------------\n\n/** localStorage key prefix for a stored batch. */\nexport const BATCH_STORAGE_KEY_PREFIX = \"ui-observability.batch.\";\n\n/** Zero-padded digit width for the creation time in a batch key. */\nexport const BATCH_KEY_TIME_WIDTH = 14;\n\n/** localStorage key prefix for a batch stored by the exit flush. */\nexport const EMERGENCY_STORAGE_KEY_PREFIX = \"ui-observability.emergency.\";\n\n/** Maximum number of exit batches in the emergency queue. */\nexport const EMERGENCY_MAX_ENTRIES = 20;\n\n/** Key we write to check whether localStorage accepts writes. */\nexport const STORAGE_PROBE_KEY = \"ui-observability.probe\";\n\n/** Fraction of the store to evict on a quota error (1 in N). */\nexport const QUOTA_EVICTION_DIVISOR = 4;\n\n/** DOMException name for a full store. */\nexport const QUOTA_EXCEEDED_ERROR = \"QuotaExceededError\";\n\n/**\n * Native IndexedDB version. Version 11 replaced Dexie, and version 12 adds the context index.\n * Dexie opened this database at ten times its declared version, so a version below 11 makes\n * open() fail with VersionError on an existing installation, and then nothing can read its\n * batches.\n */\nexport const INDEXEDDB_SCHEMA_VERSION = 12;\n\n/** IndexedDB object store that holds the batches. The name dates from Dexie, since removed. */\nexport const INDEXEDDB_STORE_NAME = \"batches\";\n\n/** Index on the batch store that orders reads by creation time. */\nexport const INDEXEDDB_CREATED_AT_INDEX = \"createdAt\";\n\n/** IndexedDB adapter/strategy name. */\nexport const STORAGE_NAME_INDEXEDDB = \"indexeddb\";\n\n/** localStorage adapter/strategy name. */\nexport const STORAGE_NAME_LOCAL = \"localstorage\";\n\n/** In-memory adapter/strategy name. */\nexport const STORAGE_NAME_MEMORY = \"memory\";\n\n/** Name of the storage adapter that keeps nothing. */\nexport const STORAGE_NAME_NONE = \"none\";\n\n// ----------------------------------\n// Retry\n// ----------------------------------\n\n/**\n * Origin-wide lock name a drain runs under.\n * @see {@link EMERGENCY_LOCK_NAME}\n */\nexport const DRAIN_LOCK_NAME = \"ui-observability.drain\";\n\n/**\n * Lock name startup recovery runs under.\n * @see {@link DRAIN_LOCK_NAME}\n */\nexport const EMERGENCY_LOCK_NAME = \"ui-observability.emergency\";\n\n/** Batches sent per drain tick. */\nexport const BATCHES_PER_DRAIN = 20;\n\n// ----------------------------------\n// Journey\n// ----------------------------------\n\n/** `sessionStorage` key for the current journey. */\nexport const JOURNEY_STORAGE_KEY = \"ui-observability.journey\";\n\n/**\n * Max journey name length in a token, in characters.\n * @see {@link JOURNEY_TOKEN_MAX_CHARS}\n */\nexport const JOURNEY_TOKEN_NAME_MAX_CHARS = 64;\n\n/**\n * Max length of a journey id from startJourney(), in characters. A journey with an id this long\n * and a full-length name still gets a token below the token limit.\n * @see {@link JOURNEY_TOKEN_MAX_CHARS}\n */\nexport const JOURNEY_ID_MAX_CHARS = 64;\n\n/**\n * Accepted journey id from startJourney(): letters, digits, \"_\", \".\", \":\" and \"-\". Every\n * character is one byte in UTF-8. A multibyte id would push the token over its limit.\n */\nexport const JOURNEY_ID_PATTERN = new RegExp(`^[\\\\w.:-]{1,${String(JOURNEY_ID_MAX_CHARS)}}$`);\n\n/**\n * How far ahead of this clock a journey token's start time can be, in milliseconds. Two machines\n * can disagree on the time, but a token further ahead than this would never expire.\n */\nexport const JOURNEY_CLOCK_SKEW_MS = 5 * 60 * 1000;\n\n/**\n * Max whole-token length, in characters. This only rejects an oversized token. It doesn't\n * validate the token's content.\n * @see {@link JOURNEY_TOKEN_NAME_MAX_CHARS}\n */\nexport const JOURNEY_TOKEN_MAX_CHARS = 256;\n\n/**\n * How long to wait for `fin.me.getOptions()`, in milliseconds. After that, the\n * runtime carries on without a seeded journey.\n * @see {@link OPENFIN_JOURNEY_CUSTOM_DATA_KEY}\n */\nexport const OPENFIN_OPTIONS_TIMEOUT_MS = 2000;\n\n/** Key under an OpenFin window's `customData` carrying a seeded journey token. */\nexport const OPENFIN_JOURNEY_CUSTOM_DATA_KEY = \"uiObsJourney\";\n\n/** Matches `+` in standard base64 (`-` in URL-safe). */\nexport const BASE64_PLUS_PATTERN = /\\+/g;\n\n/** Matches `/` in standard base64 (`_` in URL-safe). */\nexport const BASE64_SLASH_PATTERN = /\\//g;\n\n/** Matches trailing `=` padding. */\nexport const BASE64_PADDING_PATTERN = /=+$/;\n\n/** Matches `-` in URL-safe base64 (`+` in standard). */\nexport const BASE64URL_DASH_PATTERN = /-/g;\n\n/** Matches `_` in URL-safe base64 (`/` in standard). */\nexport const BASE64URL_UNDERSCORE_PATTERN = /_/g;\n\n/** Base64 characters per 3-byte group. */\nexport const BASE64_GROUP_CHARS = 4;\n\n// ----------------------------------\n// Tracing\n// ----------------------------------\n\n/** W3C trace id width, in bytes. */\nexport const TRACE_ID_BYTES = 16;\n\n/** W3C span id width, in bytes. */\nexport const SPAN_ID_BYTES = 8;\n\n/** Max ambient trace lifetime with no activity, in milliseconds. */\nexport const TRACE_MAX_AGE_MS = 5 * 60 * 1000;\n\n/** trace-flags value with the sampled bit set. */\nexport const TRACE_FLAGS_SAMPLED = 1;\n\n/** Mask for the one-byte trace-flags field. */\nexport const TRACE_FLAGS_MASK = 0xff;\n\n/**\n * W3C trace context header name\n * @see {@link TRACEPARENT_VERSION}\n */\nexport const TRACEPARENT_HEADER = \"traceparent\";\n\n/** traceparent header version prefix. */\nexport const TRACEPARENT_VERSION = \"00\";\n\n// ----------------------------------\n// Breadcrumbs\n// ----------------------------------\n\n/** Smallest valid breadcrumb buffer capacity. */\nexport const BREADCRUMB_MIN_CAPACITY = 1;\n\n// ----------------------------------\n// Sampling\n// ----------------------------------\n//\n// FNV-1a hash constants. The sampler uses them to turn a sampling key into a\n// stable 0-1 fraction.\n\n/** FNV-1a 32-bit offset basis. */\nexport const FNV_OFFSET_BASIS = 0x811c9dc5;\n\n/** FNV-1a 32-bit prime. */\nexport const FNV_PRIME = 0x01000193;\n\n/** Largest 32-bit unsigned value. */\nexport const UINT32_MAX = 0xffffffff;\n\n/**\n * Types that minLevel never drops. An action is an audit fact, and a metric or a span is a\n * measurement. The remote rate cap for records below minLevel doesn't apply to them either.\n */\nexport const LEVEL_BYPASS_TYPES: readonly LogType[] = [\"action\", \"metric\", \"span\"];\n\n// ----------------------------------\n// Pipeline\n// ----------------------------------\n\n/** Record kind routed to the metric stream. */\nexport const LOG_TYPE_METRIC: LogType = \"metric\";\n\n/** Record kind of an audit fact. Storage and the hold buffers drop it last. */\nexport const LOG_TYPE_ACTION: LogType = \"action\";\n\n/** Record kind routed to the trace stream. */\nexport const LOG_TYPE_SPAN: LogType = \"span\";\n\n// ----------------------------------\n// Bus\n// ----------------------------------\n\n/** Protocol identifier for bus envelopes. The bus drops an envelope with a different version. */\nexport const BUS_PROTOCOL = \"ui-observability/2\";\n\n/**\n * Type tag for every bus message. Every frame must use the same values. The prefix makes a\n * message easy to spot in a postMessage log, but it is still the BUS_PROTOCOL envelope tag that\n * separates the bus from other traffic.\n */\nexport const BUS_TYPE = {\n hello: \"ui-observability.message.hello\",\n welcome: \"ui-observability.message.welcome\",\n records: \"ui-observability.message.records\",\n securityContext: \"ui-observability.message.security-context\",\n journey: \"ui-observability.message.journey\",\n journeyRequest: \"ui-observability.message.journey-request\",\n sampling: \"ui-observability.message.sampling\",\n samplingRequest: \"ui-observability.message.sampling-request\",\n tab: \"ui-observability.message.tab\",\n flushRequest: \"ui-observability.message.flush-request\",\n flushResult: \"ui-observability.message.flush-result\",\n} as const;\n\n/** Global window property key used to locate a same-origin runtime instance. */\nexport const RUNTIME_GLOBAL_KEY = \"ui-observability.runtime\";\n\n/** Global key for the runtime shutdown() stopped. Calls go to it until the next configure(). */\nexport const RUNTIME_STOPPED_KEY = \"ui-observability.stopped\";\n\n/** Global symbol key for the library request scope count, shared by every copy on the page. */\nexport const LIBRARY_REQUEST_KEY = \"ui-observability.request-scope\";\n\n/** Global symbol key for the library console scope count, shared by every copy on the page. */\nexport const LIBRARY_CONSOLE_KEY = \"ui-observability.console-scope\";\n\n/** Global symbol key for the number of custom transport calls still waiting for an answer. */\nexport const TRANSPORT_CALL_KEY = \"ui-observability.transport-calls\";\n\n// ----------------------------------\n// Capture\n// ----------------------------------\n\n/** Maximum error records captured per throttling window before suppression. */\nexport const ERROR_STORM_MAX_PER_WINDOW = 20;\n\n/**\n * Default length of the capture rate limit window, and of the replay upload and error ceiling\n * windows, in milliseconds.\n */\nexport const ERROR_STORM_WINDOW_MS = 10_000;\n\n/**\n * Max ERROR and FATAL records the pipeline admits per storm window. This is a safety limit for\n * a render loop, not a way to shape normal traffic. ERROR and FATAL records skip sampling, so a\n * direct logger.error call has no other limit.\n */\nexport const ERROR_CEILING_MAX_PER_WINDOW = 500;\n\n/** Default minimum duration for a long frame to be recorded, in milliseconds. */\nexport const LONG_FRAME_THRESHOLD_MS = 100;\n\n/** Maximum long frames recorded per storm window, so a frozen tab can't flood the pipeline. */\nexport const LONG_FRAME_MAX_PER_WINDOW = 20;\n\n/** Max WebSocket events recorded per storm window, so a reconnect loop can't flood the pipeline. */\nexport const WEBSOCKET_MAX_PER_WINDOW = 20;\n\n/** Maximum character length of a console breadcrumb message. */\nexport const CONSOLE_BREADCRUMB_MAX_CHARS = 200;\n\n/** Maximum distinct error signatures tracked for deduplication before LRU eviction. */\nexport const MAX_TRACKED_ERROR_SIGNATURES = 200;\n\n/** Maximum characters of a clicked element's text kept in a breadcrumb. */\nexport const CLICK_TEXT_MAX_CHARS = 50;\n\n/** Attribute that names a click action, unless the app configures a different one. */\nexport const ACTION_ATTRIBUTE_DEFAULT = \"data-observability-action\";\n\n/**\n * Selector for the regions the app keeps out of the records. Click capture skips them by\n * default, and session replay always blocks them, so a hidden region can't leak through either.\n */\nexport const IGNORE_SELECTOR = \"[data-observability-ignore]\";\n\n/** How many clicks on one element make a rage click, by default. */\nexport const RAGE_CLICK_COUNT = 3;\n\n/** The time window a rage click's clicks must fall within, in milliseconds, by default. */\nexport const RAGE_CLICK_WINDOW_MS = 1000;\n\n/** How long to wait for a visible response before a click counts as dead, in milliseconds. */\nexport const DEAD_CLICK_MS = 1000;\n\n/** Controls that should respond visibly to a click. Only these get a dead click check. */\nexport const DEAD_CLICK_CONTROLS =\n 'a, button, summary, input[type=\"button\"], input[type=\"submit\"], input[type=\"reset\"], [role=\"button\"], [role=\"link\"], [role=\"menuitem\"], [role=\"tab\"]';\n\n/** Maximum characters of an aria-label kept in a generated selector. */\nexport const ARIA_LABEL_MAX_CHARS = 40;\n\n/** Maximum class names per element in a generated CSS selector. */\nexport const SELECTOR_MAX_CLASSES = 2;\n\n/** Default CSS for the console prefix. The colors are readable in light and dark devtools. */\nexport const CONSOLE_DEFAULT_STYLES: Readonly<Required<ConsoleStyles>> = {\n namespace: \"color:#888\",\n TRACE: \"color:#888;font-weight:bold\",\n DEBUG: \"color:#888;font-weight:bold\",\n INFO: \"color:#1e6fd9;font-weight:bold\",\n WARN: \"color:#c77700;font-weight:bold\",\n ERROR: \"color:#d32f2f;font-weight:bold\",\n FATAL: \"color:#d32f2f;font-weight:bold\",\n};\n\n// ----------------------------------\n// Runtime\n// ----------------------------------\n\n/** Minimum time between storage gap warning reports, in milliseconds. */\nexport const GAP_REPORT_THROTTLE_MS = 60_000;\n\n/** Default namespace for records the auto-capture modules emit. */\nexport const CAPTURE_NAMESPACE = \"uiobs.capture\";\n\n/** Default namespace for records the storage subsystems emit. */\nexport const STORAGE_NAMESPACE = \"uiobs.storage\";\n\n/** Namespace for the records `diagnostics.records` produces. */\nexport const DIAGNOSTICS_NAMESPACE = \"uiobs.diagnostics\";\n\n/** The measurement unit used when a call doesn't give one. */\nexport const DEFAULT_METRIC_UNIT = \"count\";\n\n/** Namespace for the points the counter and histogram instruments produce. */\nexport const METRIC_NAMESPACE = \"uiobs.metrics\";\n\n/** Maximum attribute sets per instrument per interval. Any more go into one overflow set. */\nexport const METRIC_MAX_SERIES = 100;\n\n/** Maximum bucket boundaries per histogram. More than that makes for a large point. */\nexport const METRIC_MAX_BOUNDARIES = 50;\n\n/** Attribute on the overflow set. OpenTelemetry uses the same key. */\nexport const ATTR_METRIC_OVERFLOW = \"otel.metric.overflow\";\n\n/** Default histogram boundaries, the same as OpenTelemetry's defaults. */\nexport const METRIC_DEFAULT_BOUNDARIES: readonly number[] = [\n 0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000,\n];\n\n/**\n * Attribute keys on an aggregated metric point, read by the OTLP metrics serializer.\n * Sampling keeps every record that has a start time, because sampling a sum gives a false sum.\n */\nexport const METRIC_KEYS = {\n start: \"metric.start_time_unix_nano\",\n attributeKeys: \"metric.attribute_keys\",\n count: \"metric.count\",\n sum: \"metric.sum\",\n min: \"metric.min\",\n max: \"metric.max\",\n bounds: \"metric.bounds\",\n buckets: \"metric.bucket_counts\",\n} as const;\n\n/**\n * Every metric field the library writes on a metric record. The OTLP metrics serializer keeps\n * them off a point's attributes, because the record holds the library's value under that name.\n */\nexport const METRIC_FIELD_KEYS: readonly string[] = [\n \"metric.name\",\n \"metric.value\",\n \"metric.unit\",\n \"metric.type\",\n ...Object.values(METRIC_KEYS),\n];\n\n/** Precision of the profiler histogram: 2^4 = 16 sub-buckets per power of two. */\nexport const PROFILE_SUB_BITS = 4;\n\n/** Buckets per probe: 16 for 0 to 15 us, then 16 for each exponent from 4 to 25. */\nexport const PROFILE_BUCKETS = 368;\n\n/** Largest tracked duration in microseconds (2^26 - 1). Larger values go in the last bucket. */\nexport const PROFILE_MAX_US = 67_108_863;\n\n/** Cap on the buckets in one profiler summary record, to keep the payload small. */\nexport const PROFILE_POINT_BUCKETS = 100;\n\n/** Default probe limit. The runtime fixes the limit at startup. */\nexport const PROFILER_MAX_PROBES = 64;\n\n/** Metric name for profiler summary records. */\nexport const PROFILE_METRIC_NAME = \"ui.profile.duration\";\n\n/** Attribute keys on profiler summary records. */\nexport const PROFILE_KEYS = {\n probe: \"profile.probe\",\n sampleEvery: \"profile.sample_every\",\n p50: \"profile.p50\",\n p90: \"profile.p90\",\n p99: \"profile.p99\",\n overhead: \"profile.overhead_ns\",\n selfP99: \"profile.self_p99\",\n framePhase: \"profile.frame_phase\",\n} as const;\n\n/** How deep spans can nest and still get a self time. Going deeper drops the frames below. */\nexport const PROFILER_STACK_DEPTH = 32;\n\n/** How many recent spans the profiler keeps for linking to long animation frames. */\nexport const PROFILER_RING_SPANS = 256;\n\n/** Shortest span, in ms, that gets linked to a long animation frame. */\nexport const PROFILER_LINK_MIN_MS = 1;\n\n/** Metric name for long animation frame phases, reported per probe in the frame. */\nexport const PROFILE_FRAME_METRIC_NAME = \"ui.profile.frame.duration\";\n\n/** Probe name for frame pacing. Each value is the time between two frames. */\nexport const PROFILE_FRAME_PROBE = \"frame.interval\";\n\n/** Reported when the library can't read an instrument's options. */\nexport const INSTRUMENT_OPTIONS_FAULT =\n \"The library could not read the options of an instrument. The library uses the defaults.\";\n\n/** Ambient attribute that ties every record to the session replay recording. */\nexport const REPLAY_ID_KEY = \"replay.id\";\n\n/** Put this attribute on an element to leave its text unmasked in session replay. */\nexport const REPLAY_UNMASK_ATTRIBUTE = \"data-observability-unmask\";\n\n/** Hard cap on registered probe names, and so the upper bound for profiler.maxProbes. */\nexport const PROFILER_PROBE_LIMIT = 1024;\n\n/** Global symbol key for the profiler core. Copies of the same library version share the core. */\nexport const PROFILER_GLOBAL_KEY = \"ui-observability.profiler\";\n\n/** Minimum window for the profiler's overhead measurement, in ms. */\nexport const PROFILER_CALIBRATION_MS = 2;\n\n/** Cap on begin()/end() pairs in the profiler's overhead measurement. */\nexport const PROFILER_CALIBRATION_PAIRS = 100_000;\n\n/** Namespace of the span records. */\nexport const TRACE_NAMESPACE = \"uiobs.traces\";\n\n/** Attribute keys for the span fields on a span record, read by the traces serializer. */\nexport const SPAN_KEYS = {\n kind: \"span.kind\",\n parentId: \"span.parent_id\",\n start: \"span.start_time_unix_nano\",\n end: \"span.end_time_unix_nano\",\n status: \"span.status\",\n linkTraceId: \"span.link.trace_id\",\n linkSpanId: \"span.link.span_id\",\n} as const;\n\n// ----------------------------------\n// Configuration\n// ----------------------------------\n\n/** Protocol for the private transport worker channel. */\nexport const TRANSPORT_WORKER_PROTOCOL = \"ui-observability.transport/1\";\n\n/** Type tags for the private transport worker messages. */\nexport const TRANSPORT_WORKER_TYPE = {\n connect: \"connect\",\n ready: \"ready\",\n send: \"send\",\n result: \"result\",\n cancel: \"cancel\",\n} as const;\n\n/** The worker entry's refusal message. A constant keeps the protocol code out of the main chunk. */\nexport const TRANSPORT_WORKER_REFUSAL = {\n p: TRANSPORT_WORKER_PROTOCOL,\n v: TELEMETRY_SDK_VERSION,\n t: TRANSPORT_WORKER_TYPE.ready,\n ok: false,\n} as const;\n\n/** Maximum requests in one transport worker. */\nexport const TRANSPORT_WORKER_MAX_JOBS = 64;\n\n/**\n * Extra wait for the transport worker's answer after the request deadline. The worker replies\n * with a status it got in time when the deadline ends its body read, and that reply needs a\n * message hop.\n */\nexport const WORKER_REPLY_GRACE_MS = 1_000;\n\n/** Longest the deferred logger waits for idle time before it builds its records. */\nexport const DEFER_IDLE_TIMEOUT_MS = 1000;\n\n/** Maximum pending payload references per runtime. A full queue builds its records first. */\nexport const DEFER_QUEUE_LIMIT = 1000;\n\n/** Default minimum duration for a slow resource event, in milliseconds. */\nexport const RESOURCE_SLOW_MS = 1000;\n\n/** Response header with server duration entries. */\nexport const SERVER_TIMING_HEADER = \"Server-Timing\";\n\n/** Maximum Server-Timing header length and entry count. */\nexport const SERVER_TIMING_MAX_CHARS = 4096;\nexport const SERVER_TIMING_MAX_ENTRIES = 32;\n\n/** Capture switches a remote rule can change. Privacy controls stay local. */\nexport const REMOTE_CAPTURE_FLAGS = [\n \"errors\",\n \"rejections\",\n \"resourceErrors\",\n \"fetch\",\n \"xhr\",\n \"httpMetrics\",\n \"navigation\",\n \"webVitals\",\n \"longFrames\",\n \"interactions\",\n \"console\",\n \"webSocket\",\n \"uncleanExit\",\n \"userTiming\",\n \"serverTiming\",\n \"reports\",\n \"resourceTiming\",\n \"lifecycle\",\n] as const;\n\n/** Default `service.name` when a consumer sets none. */\nexport const UNKNOWN_SERVICE_NAME = \"unknown-service\";\n\n/** Lowest sampling rate (drop everything). */\nexport const SAMPLING_RATE_MIN = 0;\n\n/** Highest sampling rate (keep everything). */\nexport const SAMPLING_RATE_MAX = 1;\n\n/** The remote sampling rules version this library accepts. */\nexport const REMOTE_SAMPLING_VERSION = 1;\n\n/** Maximum length of the sampling header, in characters. */\nexport const REMOTE_SAMPLING_MAX_CHARS = 4096;\n\n/** Longest that remote sampling rules stay in effect, in milliseconds. */\nexport const REMOTE_SAMPLING_MAX_TTL_MS = 60 * 60 * 1000;\n\n/** Maximum namespace rates in one set of remote sampling rules. */\nexport const REMOTE_SAMPLING_MAX_RATES = 100;\n\n/** How often a forwarder asks for the remote sampling rules, in milliseconds. */\nexport const REMOTE_SAMPLING_POLL_MS = 30_000;\n\n/**\n * Config keys with no default, excluded from `DEFAULT_CONFIG`.\n * @see {@link DEFAULT_CONFIG}\n */\nexport const UNDEFAULTED_CONFIG_KEYS = [\n \"contextProvider\",\n \"redact\",\n \"onDiagnostic\",\n \"onDrop\",\n \"headers\",\n \"serializer\",\n \"otelLoader\",\n \"transport\",\n \"transportOnExit\",\n \"transportWorker\",\n] as const;\n\n/**\n * Nested config section keys.\n * @see {@link ResolvedConfig}\n */\nexport const CONFIG_SECTIONS = [\n \"captureLimits\",\n \"metadata\",\n \"storage\",\n \"diagnostics\",\n \"correlation\",\n \"metrics\",\n \"buffering\",\n \"delivery\",\n \"loggerCache\",\n \"securityContext\",\n \"sampling\",\n \"bus\",\n \"journey\",\n \"batching\",\n \"retention\",\n \"limits\",\n \"capture\",\n \"debugBuffer\",\n \"profiler\",\n \"replay\",\n] as const;\n\n/**\n * Section keys with no default, excluded from their section of `DEFAULT_CONFIG`.\n * @see {@link UNDEFAULTED_CONFIG_KEYS}\n */\nexport const UNDEFAULTED_SECTION_KEYS: Record<(typeof CONFIG_SECTIONS)[number], string[]> = {\n captureLimits: [],\n metadata: [],\n storage: [],\n diagnostics: [],\n correlation: [],\n metrics: [],\n buffering: [],\n delivery: [],\n loggerCache: [],\n securityContext: [],\n sampling: [],\n bus: [],\n journey: [],\n batching: [],\n retention: [],\n limits: [],\n capture: [\"urlTransform\"],\n debugBuffer: [],\n profiler: [],\n replay: [],\n};\n\n/** Console output level used when a consumer passes `consoleOutput: true`. */\nexport const CONSOLE_DEFAULT_LEVEL: LogLevel = \"DEBUG\";\n\n// ----------------------------------\n// Batching\n// ----------------------------------\n\n/** Max time a partial log batch waits before the pipeline sends it, in milliseconds. */\nexport const LOG_FLUSH_INTERVAL_MS = 2000;\n\n/** Max records per log batch. At this count, the pipeline sends the batch early. */\nexport const LOG_BATCH_SIZE = 100;\n\n/**\n * Default interval of the counter, histogram and profiler points, in milliseconds. A partial\n * metric batch waits this long too, longer than a log batch, because metrics have a higher\n * volume and no caller is waiting for them.\n */\nexport const METRIC_INTERVAL_MS = 10_000;\n\n/** Max records per metric batch. At this count, the pipeline sends the batch early. */\nexport const METRIC_BATCH_SIZE = 500;\n\n/** Max concurrent ingest requests, across both streams. */\nexport const MAX_CONCURRENT_REQUESTS = 2;\n\n// ----------------------------------\n// HTTP transport\n// ----------------------------------\n\n/** Max time for one ingest request, in milliseconds. The transport then aborts and retries it. */\nexport const REQUEST_TIMEOUT_MS = 15_000;\n\n/** Min payload size to compress, in bytes. */\nexport const COMPRESSION_THRESHOLD_BYTES = 1024;\n\n// ----------------------------------\n// Storage retention\n// ----------------------------------\n\n/** IndexedDB database name. */\nexport const STORAGE_DB_NAME = \"UiObservability\";\n\n/** Capacity and retention thresholds every storage adapter enforces. */\nexport const STORAGE_LIMITS: StorageLimits = {\n maxBatches: 500,\n maxAgeMs: 24 * 60 * 60 * 1000,\n maxAttempts: 5,\n};\n\n/**\n * Max time for one storage call, in milliseconds. After that the call counts as failed, because\n * a call that never settles would hold on to a dispatch slot or the drain flag.\n */\nexport const STORAGE_DEADLINE_MS = 10_000;\n\n/** Default wait of flush() and of a rotation's flush, in milliseconds. */\nexport const FLUSH_TIMEOUT_MS = 5000;\n\n/**\n * Longest wait of flush() and of a rotation's flush, in milliseconds. A browser timer fires at\n * once for a delay above 2^31 - 1 ms, so the wait has a ceiling.\n */\nexport const FLUSH_TIMEOUT_MAX_MS = 600_000;\n\n// ----------------------------------\n// Retry backoff\n// ----------------------------------\n\n/** First backoff step, in milliseconds. Doubles with every attempt. */\nexport const RETRY_BASE_DELAY_MS = 2000;\n\n/** Backoff ceiling, in milliseconds. */\nexport const RETRY_MAX_DELAY_MS = 60_000;\n\n/** How often to check for stored work when nothing has failed recently, in milliseconds. */\nexport const RETRY_IDLE_DELAY_MS = 30_000;\n\n// ----------------------------------\n// Journey lifetime\n// ----------------------------------\n\n/** Max time a journey stays open, in milliseconds. After that it counts as abandoned. */\nexport const JOURNEY_MAX_AGE_MS = 30 * 60 * 1000;\n\n/** True if the journey ends for all contexts when the owning context closes. */\nexport const JOURNEY_END_ON_OWNER_CLOSE = false;\n\n/** Query parameter checked at boot for a seeded journey token. */\nexport const JOURNEY_URL_PARAM = \"__uiobs_journey\";\n\n// ----------------------------------\n// Bus handshake\n// ----------------------------------\n\n/** BroadcastChannel name for the control plane. */\nexport const BUS_CHANNEL_NAME = \"ui_observability_control\";\n\n/** Max time a forwarder waits for an owner to answer before it promotes itself, in milliseconds. */\nexport const BUS_HANDSHAKE_TIMEOUT_MS = 1500;\n\n/** Handshake attempts allowed before a cross-origin forwarder promotes itself to sender. */\nexport const BUS_MAX_HANDSHAKE_ATTEMPTS = 3;\n\n/**\n * Max named sources, for example OpenFin identities, whose message rate the bus tracks at once.\n * A new source past it is refused, so a flood of fake names can't grow the map without end.\n */\nexport const BUS_MAX_TRACKED_SOURCES = 256;\n\n/**\n * Max flush requests from other contexts that wait for the next flush. A request past it gets\n * no answer, so a flood of requests can't grow the list without end.\n */\nexport const BUS_MAX_FLUSH_REQUESTS = 100;\n\n/** Max flush requests of one source that wait, so one frame can't fill the whole list. */\nexport const BUS_MAX_FLUSH_REQUESTS_PER_SOURCE = 4;\n\n/**\n * Min time between the starts of two flushes that the bus runs for other contexts, in\n * milliseconds. A request in the gap joins the next one, so a flood can't flush without a pause.\n */\nexport const BUS_FLUSH_GAP_MS = 1000;\n\n/**\n * Share of a forwarder's time left that it gives its sender in a flush request. The rest is for\n * the answer, so the caller's wait outlasts the callee's deadline at each hop of a chain.\n */\nexport const FLUSH_REQUEST_SHARE = 0.9;\n\n/** Default of buffering.maxHeldRecords, the cap on non-action records in one hold buffer. */\nexport const BUS_MAX_BOOT_BUFFER_RECORDS = 500;\n\n/** Max action records in one hold buffer. Their own cap means a log storm can't push one out. */\nexport const BUS_MAX_BOOT_BUFFER_ACTIONS = 2000;\n\n/**\n * Records of each kind that a full hold buffer never drops, counted from the first one. The\n * first error of a failed startup is usually the cause, so it has to outlive the storm.\n */\nexport const HOLD_BUFFER_HEAD_RECORDS = 100;\n\n/** Max distinct values in each list of an onDrop summary. */\nexport const DROP_SUMMARY_MAX_ITEMS = 20;\n\n/**\n * Max characters of an untrusted message type in a diagnostic detail, since the sender controls\n * that text. The longest BUS_TYPE value is 41 characters, so every valid type fits.\n */\nexport const BUS_TYPE_DETAIL_MAX_CHARS = 48;\n\n// ----------------------------------\n// Capture\n// ----------------------------------\n\n/** Breadcrumbs kept as context for the next error. */\nexport const MAX_BREADCRUMBS = 50;\n\n/** How long identical errors are counted without being sent again, in milliseconds. */\nexport const ERROR_DEDUPE_MS = 5000;\n\n// ----------------------------------\n// Per-record size caps\n// ----------------------------------\n\n/** Size caps for every record, applied after sanitize and after redact. */\nexport const RECORD_LIMITS = {\n maxBodyChars: 4096,\n maxAttributeChars: 8192,\n maxAttributeCount: 128,\n maxStackChars: 8192,\n maxDepth: 6,\n maxArrayLength: 100,\n maxNodes: 10_000,\n maxRecordBytes: 32_768,\n};\n\n// ----------------------------------\n// Config defaults\n// ----------------------------------\n\n/**\n * Routing settings a rotation resets when the update leaves them out. The rotation also spreads\n * this into its base, where undefined means no hook, so an undefined key in the update resets too.\n */\nexport const ROUTING_RESET = {\n endpoint: null,\n metricsEndpoint: null,\n tracesEndpoint: null,\n headers: undefined,\n credentials: \"omit\",\n transport: undefined,\n transportOnExit: undefined,\n transportWorker: undefined,\n} as const;\n\n/** Routing settings that configure() can't change while isolation is on. */\nexport const ROUTING_KEYS = Object.keys(ROUTING_RESET) as (keyof typeof ROUTING_RESET)[];\n\n/**\n * The default runtime config, before the consumer calls `configure()`. `serializer` is left\n * out, because `resolveConfig` supplies that default to avoid a circular import.\n * This sits below the constants it reads, since a const can't be read before its own line.\n * @see {@link ResolvedConfig}\n * @see {@link UNDEFAULTED_CONFIG_KEYS}\n */\nexport const DEFAULT_CONFIG: Omit<ResolvedConfig, \"serializer\"> = {\n captureLimits: {\n breadcrumbs: MAX_BREADCRUMBS,\n errorDedupeMs: ERROR_DEDUPE_MS,\n errorsPerWindow: 20,\n consolePerWindow: 20,\n longFramesPerWindow: 20,\n webSocketPerWindow: 20,\n reportsPerWindow: 20,\n resourcesPerWindow: 100,\n lifecyclePerWindow: 20,\n windowMs: ERROR_STORM_WINDOW_MS,\n },\n metadata: { pageUrl: true, userAgent: true, openfin: true, clockOffset: true },\n debugBuffer: { enabled: false, maxRecords: 200, maxAgeMs: 60_000 },\n profiler: {\n enabled: false,\n maxProbes: PROFILER_MAX_PROBES,\n framePhases: false,\n framePacing: false,\n },\n replay: {\n enabled: false,\n mode: \"onError\",\n endpoint: null,\n requireConsent: false,\n bufferMs: 60_000,\n maxBufferBytes: 10_000_000,\n afterErrorMs: 5000,\n uploadsPerWindow: 3,\n uploadWindowMs: ERROR_STORM_WINDOW_MS,\n maxSegmentEvents: 200,\n maxSegmentBytes: 512_000,\n flushIntervalMs: 2000,\n maxQueueBytes: 20_000_000,\n maxAttempts: 3,\n maskText: true,\n maskInputs: true,\n recordCanvas: false,\n maskSelectors: [],\n blockSelectors: [],\n loader: null,\n onSegment: null,\n headers: null,\n plugins: [],\n recordOptions: {},\n },\n storage: { backend: \"auto\", namespace: \"\", requestPersistent: false },\n diagnostics: { throttleMs: 1000, consoleFallback: false, records: false },\n correlation: { sessionIdleMs: SESSION_IDLE_MS, traceMaxAgeMs: TRACE_MAX_AGE_MS },\n metrics: {\n intervalMs: METRIC_INTERVAL_MS,\n maxSeries: METRIC_MAX_SERIES,\n maxInstruments: 1000,\n maxHistogramBoundaries: METRIC_MAX_BOUNDARIES,\n },\n buffering: {\n maxPendingRecords: 10000,\n maxPendingBytes: 16777216,\n maxHeldRecords: BUS_MAX_BOOT_BUFFER_RECORDS,\n overflow: \"drop-oldest\",\n },\n delivery: {\n requestTimeoutMs: REQUEST_TIMEOUT_MS,\n maxConcurrentRequests: MAX_CONCURRENT_REQUESTS,\n retryBaseDelayMs: RETRY_BASE_DELAY_MS,\n retryMaxDelayMs: RETRY_MAX_DELAY_MS,\n priority: \"low\",\n },\n lockConfiguration: false,\n loggerCache: { maxEntries: 256 },\n securityContext: { id: \"\", isolation: true },\n // \"\" means not set, so a configure() without an endpoint reports it. An app can't pass \"\".\n endpoint: \"\",\n metricsEndpoint: null,\n tracesEndpoint: null,\n serviceName: \"\",\n serviceVersion: \"\",\n environment: \"\",\n enabled: true,\n payloadMode: \"copy\",\n minLevel: \"INFO\",\n minLevels: {},\n processors: [],\n compression: \"gzip\",\n credentials: \"omit\",\n identity: \"storage\",\n sampling: {\n defaultRate: 1,\n rates: {},\n alwaysSampleTypes: [\"action\"],\n alwaysSampleFrom: \"ERROR\",\n errorCeiling: ERROR_CEILING_MAX_PER_WINDOW,\n errorCeilingWindowMs: ERROR_STORM_WINDOW_MS,\n remote: false,\n remoteMaxRate: 1,\n },\n bus: {\n mode: \"auto\",\n trustedOrigins: [],\n openFinRole: \"auto\",\n sourcePolicy: \"registered\",\n maxMessageBytes: 262144,\n maxRecordsPerMessage: 100,\n maxMessagesPerSecond: 100,\n },\n journey: { scope: \"auto\", maxAgeMs: JOURNEY_MAX_AGE_MS },\n batching: {\n logFlushIntervalMs: LOG_FLUSH_INTERVAL_MS,\n logBatchSize: LOG_BATCH_SIZE,\n metricBatchSize: METRIC_BATCH_SIZE,\n },\n retention: { ...STORAGE_LIMITS },\n limits: { ...RECORD_LIMITS },\n capture: {\n errors: true,\n rejections: true,\n resourceErrors: false,\n fetch: false,\n xhr: false,\n httpMetrics: true,\n interactions: false,\n navigation: false,\n webVitals: false,\n longFrames: false,\n console: false,\n fullUrls: false,\n ignoreUrls: [],\n propagateTraceHeaderTo: [],\n webSocket: false,\n uncleanExit: false,\n userTiming: false,\n remoteToggles: [],\n serverTiming: false,\n reports: false,\n resourceTiming: false,\n lifecycle: false,\n plugins: [],\n },\n consoleOutput: { level: null, styles: CONSOLE_DEFAULT_STYLES },\n};\n"],"mappings":";AAcA,IAAaA,KAAqB,sBAUrBC,KAAyB,KAOzBC,KAAiB,4BAGjBC,IAAa,wBAGbC,IAAY,0BAGZC,KAAkB,KAGlBC,IAAkB,MAGlBC,KAAmB,KAanBC,KAAqB,YAGrBC,KAA6B,UAG7BC,KAAwB,0BAGxBC,KAAuB,iBAGvBC,KAAoB,cAGpBC,KAAkB,eAGlBC,KAAkB,WAOlBC,IAAqB,OAGrBC,IAAqB,OAMrBC,IAAwB,MA+BxBC,IAA4C;CACvD,OAAO;CACP,OAAO;CACP,MAAM;CACN,MAAM;CACN,OAAO;CACP,OAAO;AACT,GAMaC,IAAwCD,GAUxCE,IAAgB,YAGhBC,IAAe,WAGfC,IAAqB,iBAGrBC,IAAgB,YAOhBC,IAAgB,YAGhBC,IAAkB,cAGlBC,IAAoB,gBAGpBC,IAAyB,qBAGzBC,IAAuB,yBAGvBC,IAAkB,cAGlBC,IAAmB,eAMnBC,IAA0B,4BAM1BC,IAAwB,0BAGxBC,IAAuB,yBAGvBC,IAAoB,sBAMpBC,IAAwB,gBAGxBC,IAA2B,mBAG3BC,IAAkC,0BAMlCC,IAA8B,sBAM9BC,IAAiC,yBAMjCC,IAAkC,0BAGlCC,IAAyB,iBAGzBC,IAAsB,cAGtBC,IAAkB,UAGlBC,IAAsB,cAGtBC,IAA8B,sBAG9BC,IA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log.type`,oe=`log.seq`,se=`app.namespace`,ce=`page.url`,le=`url.full`,ue=`journey.id`,de=`journey.name`,r=`journey.parent_id`,i=`uiobs.sanitize_failed`,a=`error.data`,o=`breadcrumbs`,s=`uiobs.attributes_dropped`,c=`uiobs.attributes_bytes`,l=`uiobs.clock_offset_ms`,u=`uiobs.debug_buffer`,d=`service.name`,f=`service.version`,p=`deployment.environment`,m=`telemetry.sdk.name`,h=`telemetry.sdk.version`,g=`telemetry.sdk.language`,_=`host.platform`,v=`session.id`,y=`tab.id`,b=`context.id`,x=`browser.user_agent`,S=`openfin.uuid`,C=`openfin.name`,w=`@utk09/ui-observability`,T=`1.0.0`,E=`webjs`,D=`otlp`,O={WARN:`warning`},k=`8.10.0`,A=`application/json`,j=`application/x-ndjson`,M=1000000n,N=/^\d+$/,P=`Content-Type`,F=`Content-Encoding`,I=`Retry-After`,L=`X-UiObs-Batch-Id`,R=`X-UiObs-Attempt`,z=`X-UiObs-Sampling`,B=`Date`,V=`gzip`,H=1e3,fe=6e4,pe=16384,me=`text/plain;charset=UTF-8`,he=`uiobs_batch_id`,ge=`uiobs_exit`,_e=`ui-observability.batch.`,ve=`ui-observability.emergency.`,ye=`ui-observability.probe`,be=`QuotaExceededError`,xe=`batches`,Se=`createdAt`,Ce=`indexeddb`,we=`localstorage`,Te=`memory`,Ee=`none`,De=`ui-observability.drain`,Oe=`ui-observability.emergency`,ke=`ui-observability.journey`,Ae=RegExp(`^[\\w.:-]{1,64}$`),je=3e5,Me=2e3,Ne=`uiObsJourney`,Pe=/\+/g,Fe=/\//g,Ie=/=+$/,Le=/-/g,Re=/_/g,U=3e5,ze=`traceparent`,Be=2166136261,Ve=16777619,He=4294967295,Ue=[`action`,`metric`,`span`],We=`metric`,Ge=`action`,Ke=`span`,qe=`ui-observability/2`,W={hello:`ui-observability.message.hello`,welcome:`ui-observability.message.welcome`,records:`ui-observability.message.records`,securityContext:`ui-observability.message.security-context`,journey:`ui-observability.message.journey`,journeyRequest:`ui-observability.message.journey-request`,sampling:`ui-observability.message.sampling`,samplingRequest:`ui-observability.message.sampling-request`,tab:`ui-observability.message.tab`,flushRequest:`ui-observability.message.flush-request`,flushResult:`ui-observability.message.flush-result`},Je=`ui-observability.runtime`,Ye=`ui-observability.stopped`,Xe=`ui-observability.request-scope`,Ze=`ui-observability.console-scope`,Qe=`ui-observability.transport-calls`,G=1e4,$e=`data-observability-action`,et=`[data-observability-ignore]`,tt=1e3,nt=1e3,rt=`a, button, summary, input[type="button"], input[type="submit"], input[type="reset"], [role="button"], [role="link"], [role="menuitem"], [role="tab"]`,K={namespace:`color:#888`,TRACE:`color:#888;font-weight:bold`,DEBUG:`color:#888;font-weight:bold`,INFO:`color:#1e6fd9;font-weight:bold`,WARN:`color:#c77700;font-weight:bold`,ERROR:`color:#d32f2f;font-weight:bold`,FATAL:`color:#d32f2f;font-weight:bold`},it=6e4,at=`uiobs.capture`,ot=`uiobs.storage`,st=`uiobs.diagnostics`,ct=`count`,lt=`uiobs.metrics`,ut=`otel.metric.overflow`,dt=[0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],q={start:`metric.start_time_unix_nano`,attributeKeys:`metric.attribute_keys`,count:`metric.count`,sum:`metric.sum`,min:`metric.min`,max:`metric.max`,bounds:`metric.bounds`,buckets:`metric.bucket_counts`},ft=[`metric.name`,`metric.value`,`metric.unit`,`metric.type`,...Object.values(q)],pt=67108863,mt=`ui.profile.duration`,ht={probe:`profile.probe`,sampleEvery:`profile.sample_every`,p50:`profile.p50`,p90:`profile.p90`,p99:`profile.p99`,overhead:`profile.overhead_ns`,selfP99:`profile.self_p99`,framePhase:`profile.frame_phase`},gt=`ui.profile.frame.duration`,_t=`frame.interval`,vt=`The library could not read the options of an instrument. The library uses the defaults.`,yt=`replay.id`,bt=`data-observability-unmask`,xt=1024,St=`ui-observability.profiler`,Ct=1e5,wt=`uiobs.traces`,Tt={kind:`span.kind`,parentId:`span.parent_id`,start:`span.start_time_unix_nano`,end:`span.end_time_unix_nano`,status:`span.status`,linkTraceId:`span.link.trace_id`,linkSpanId:`span.link.span_id`},J=`ui-observability.transport/1`,Y={connect:`connect`,ready:`ready`,send:`send`,result:`result`,cancel:`cancel`},Et={p:J,v:T,t:Y.ready,ok:!1},Dt=1e3,Ot=1e3,kt=1e3,At=1e3,jt=`Server-Timing`,Mt=4096,Nt=[`errors`,`rejections`,`resourceErrors`,`fetch`,`xhr`,`httpMetrics`,`navigation`,`webVitals`,`longFrames`,`interactions`,`console`,`webSocket`,`uncleanExit`,`userTiming`,`serverTiming`,`reports`,`resourceTiming`,`lifecycle`],Pt=`unknown-service`,Ft=4096,It=36e5,Lt=3e4,Rt=[`contextProvider`,`redact`,`onDiagnostic`,`onDrop`,`headers`,`serializer`,`otelLoader`,`transport`,`transportOnExit`,`transportWorker`],zt=[`captureLimits`,`metadata`,`storage`,`diagnostics`,`correlation`,`metrics`,`buffering`,`delivery`,`loggerCache`,`securityContext`,`sampling`,`bus`,`journey`,`batching`,`retention`,`limits`,`capture`,`debugBuffer`,`profiler`,`replay`],Bt={captureLimits:[],metadata:[],storage:[],diagnostics:[],correlation:[],metrics:[],buffering:[],delivery:[],loggerCache:[],securityContext:[],sampling:[],bus:[],journey:[],batching:[],retention:[],limits:[],capture:[`urlTransform`],debugBuffer:[],profiler:[],replay:[]},Vt=`DEBUG`,Ht=2e3,Ut=1e4,X=15e3,Wt=1024,Gt=`UiObservability`,Kt={maxBatches:500,maxAgeMs:864e5,maxAttempts:5},qt=1e4,Jt=5e3,Yt=6e5,Xt=2e3,Zt=6e4,Qt=3e4,Z=18e5,$t=`__uiobs_journey`,en=`ui_observability_control`,tn=1500,nn=1e3,rn=.9,an=2e3,on=5e3,Q={maxBodyChars:4096,maxAttributeChars:8192,maxAttributeCount:128,maxStackChars:8192,maxDepth:6,maxArrayLength:100,maxNodes:1e4,maxRecordBytes:32768},$={endpoint:null,metricsEndpoint:null,tracesEndpoint:null,headers:void 0,credentials:`omit`,transport:void 0,transportOnExit:void 0,transportWorker:void 0},sn=Object.keys($),cn={captureLimits:{breadcrumbs:50,errorDedupeMs:on,errorsPerWindow:20,consolePerWindow:20,longFramesPerWindow:20,webSocketPerWindow:20,reportsPerWindow:20,resourcesPerWindow:100,lifecyclePerWindow:20,windowMs:G},metadata:{pageUrl:!0,userAgent:!0,openfin:!0,clockOffset:!0},debugBuffer:{enabled:!1,maxRecords:200,maxAgeMs:6e4},profiler:{enabled:!1,maxProbes:64,framePhases:!1,framePacing:!1},replay:{enabled:!1,mode:`onError`,endpoint:null,requireConsent:!1,bufferMs:6e4,maxBufferBytes:1e7,afterErrorMs:5e3,uploadsPerWindow:3,uploadWindowMs:G,maxSegmentEvents:200,maxSegmentBytes:512e3,flushIntervalMs:2e3,maxQueueBytes:2e7,maxAttempts:3,maskText:!0,maskInputs:!0,recordCanvas:!1,maskSelectors:[],blockSelectors:[],loader:null,onSegment:null,headers:null,plugins:[],recordOptions:{}},storage:{backend:`auto`,namespace:``,requestPersistent:!1},diagnostics:{throttleMs:1e3,consoleFallback:!1,records:!1},correlation:{sessionIdleMs:e,traceMaxAgeMs:U},metrics:{intervalMs:Ut,maxSeries:100,maxInstruments:1e3,maxHistogramBoundaries:50},buffering:{maxPendingRecords:1e4,maxPendingBytes:16777216,maxHeldRecords:500,overflow:`drop-oldest`},delivery:{requestTimeoutMs:X,maxConcurrentRequests:2,retryBaseDelayMs:Xt,retryMaxDelayMs:Zt,priority:`low`},lockConfiguration:!1,loggerCache:{maxEntries:256},securityContext:{id:``,isolation:!0},endpoint:``,metricsEndpoint:null,tracesEndpoint:null,serviceName:``,serviceVersion:``,environment:``,enabled:!0,payloadMode:`copy`,minLevel:`INFO`,minLevels:{},processors:[],compression:`gzip`,credentials:`omit`,identity:`storage`,sampling:{defaultRate:1,rates:{},alwaysSampleTypes:[`action`],alwaysSampleFrom:`ERROR`,errorCeiling:500,errorCeilingWindowMs:G,remote:!1,remoteMaxRate:1},bus:{mode:`auto`,trustedOrigins:[],openFinRole:`auto`,sourcePolicy:`registered`,maxMessageBytes:262144,maxRecordsPerMessage:100,maxMessagesPerSecond:100},journey:{scope:`auto`,maxAgeMs:Z},batching:{logFlushIntervalMs:Ht,logBatchSize:100,metricBatchSize:500},retention:{...Kt},limits:{...Q},capture:{errors:!0,rejections:!0,resourceErrors:!1,fetch:!1,xhr:!1,httpMetrics:!0,interactions:!1,navigation:!1,webVitals:!1,longFrames:!1,console:!1,fullUrls:!1,ignoreUrls:[],propagateTraceHeaderTo:[],webSocket:!1,uncleanExit:!1,userTiming:!1,remoteToggles:[],serverTiming:!1,reports:!1,resourceTiming:!1,lifecycle:!1,plugins:[]},consoleOutput:{level:null,styles:K}};Object.defineProperty(exports,"$",{enumerable:!0,get:function(){return Oe}}),Object.defineProperty(exports,"$n",{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,"$t",{enumerable:!0,get:function(){return ht}}),Object.defineProperty(exports,"A",{enumerable:!0,get:function(){return tn}}),Object.defineProperty(exports,"An",{enumerable:!0,get:function(){return sn}}),Object.defineProperty(exports,"At",{enumerable:!0,get:function(){return Ze}}),Object.defineProperty(exports,"B",{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,"Bn",{enumerable:!0,get:function(){return 6e4}}),Object.defineProperty(exports,"Bt",{enumerable:!0,get:function(){return lt}}),Object.defineProperty(exports,"C",{enumerable:!0,get:function(){return Ie}}),Object.defineProperty(exports,"Cn",{enumerable:!0,get:function(){return At}}),Object.defineProperty(exports,"Ct",{enumerable:!0,get:function(){return je}}),Object.defineProperty(exports,"D",{enumerable:!0,get:function(){return fe}}),Object.defineProperty(exports,"Dn",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"Dt",{enumerable:!0,get:function(){return $t}}),Object.defineProperty(exports,"E",{enumerable:!0,get:function(){return _e}}),Object.defineProperty(exports,"En",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"Et",{enumerable:!0,get:function(){return ke}}),Object.defineProperty(exports,"F",{enumerable:!0,get:function(){return Wt}}),Object.defineProperty(exports,"Fn",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"Ft",{enumerable:!0,get:function(){return Ke}}),Object.defineProperty(exports,"G",{enumerable:!0,get:function(){return ct}}),Object.defineProperty(exports,"Gn",{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,"Gt",{enumerable:!0,get:function(){return Ne}}),Object.defineProperty(exports,"H",{enumerable:!0,get:function(){return rt}}),Object.defineProperty(exports,"Hn",{enumerable:!0,get:function(){return Tt}}),Object.defineProperty(exports,"Ht",{enumerable:!0,get:function(){return re}}),Object.defineProperty(exports,"I",{enumerable:!0,get:function(){return zt}}),Object.defineProperty(exports,"In",{enumerable:!0,get:function(){return jt}}),Object.defineProperty(exports,"It",{enumerable:!0,get:function(){return ne}}),Object.defineProperty(exports,"J",{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,"Jn",{enumerable:!0,get:function(){return Te}}),Object.defineProperty(exports,"Jt",{enumerable:!0,get:function(){return Ct}}),Object.defineProperty(exports,"K",{enumerable:!0,get:function(){return Ot}}),Object.defineProperty(exports,"Kn",{enumerable:!0,get:function(){return Ce}}),Object.defineProperty(exports,"Kt",{enumerable:!0,get:function(){return Me}}),Object.defineProperty(exports,"L",{enumerable:!0,get:function(){return Vt}}),Object.defineProperty(exports,"Ln",{enumerable:!0,get:function(){return Mt}}),Object.defineProperty(exports,"Lt",{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,"M",{enumerable:!0,get:function(){return qe}}),Object.defineProperty(exports,"Mn",{enumerable:!0,get:function(){return Je}}),Object.defineProperty(exports,"Mt",{enumerable:!0,get:function(){return Xe}}),Object.defineProperty(exports,"N",{enumerable:!0,get:function(){return W}}),Object.defineProperty(exports,"Nn",{enumerable:!0,get:function(){return Ye}}),Object.defineProperty(exports,"Nt",{enumerable:!0,get:function(){return Ge}}),Object.defineProperty(exports,"O",{enumerable:!0,get:function(){return en}}),Object.defineProperty(exports,"On",{enumerable:!0,get:function(){return pe}}),Object.defineProperty(exports,"Ot",{enumerable:!0,get:function(){return Ue}}),Object.defineProperty(exports,"P",{enumerable:!0,get:function(){return at}}),Object.defineProperty(exports,"Pn",{enumerable:!0,get:function(){return`Safari/`}}),Object.defineProperty(exports,"Pt",{enumerable:!0,get:function(){return We}}),Object.defineProperty(exports,"Q",{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,"Qn",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"Qt",{enumerable:!0,get:function(){return _t}}),Object.defineProperty(exports,"R",{enumerable:!0,get:function(){return K}}),Object.defineProperty(exports,"Rn",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"Rt",{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,"S",{enumerable:!0,get:function(){return Re}}),Object.defineProperty(exports,"Sn",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"St",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"T",{enumerable:!0,get:function(){return Fe}}),Object.defineProperty(exports,"Tn",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"Tt",{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,"U",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(exports,"Un",{enumerable:!0,get:function(){return Gt}}),Object.defineProperty(exports,"Ut",{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,"V",{enumerable:!0,get:function(){return me}}),Object.defineProperty(exports,"Vn",{enumerable:!0,get:function(){return n}}),Object.defineProperty(exports,"Vt",{enumerable:!0,get:function(){return H}}),Object.defineProperty(exports,"W",{enumerable:!0,get:function(){return cn}}),Object.defineProperty(exports,"Wn",{enumerable:!0,get:function(){return qt}}),Object.defineProperty(exports,"Wt",{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,"X",{enumerable:!0,get:function(){return De}}),Object.defineProperty(exports,"Xn",{enumerable:!0,get:function(){return ye}}),Object.defineProperty(exports,"Xt",{enumerable:!0,get:function(){return xt}}),Object.defineProperty(exports,"Y",{enumerable:!0,get:function(){return 1e3}}),Object.defineProperty(exports,"Yn",{enumerable:!0,get:function(){return Ee}}),Object.defineProperty(exports,"Yt",{enumerable:!0,get:function(){return St}}),Object.defineProperty(exports,"Z",{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,"Zn",{enumerable:!0,get:function(){return`ui-observability.tab`}}),Object.defineProperty(exports,"Zt",{enumerable:!0,get:function(){return gt}}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,"_n",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"_t",{enumerable:!0,get:function(){return 55296}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return se}}),Object.defineProperty(exports,"an",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(exports,"ar",{enumerable:!0,get:function(){return J}}),Object.defineProperty(exports,"at",{enumerable:!0,get:function(){return Jt}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return le}}),Object.defineProperty(exports,"bn",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"bt",{enumerable:!0,get:function(){return xe}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"cn",{enumerable:!0,get:function(){return Ft}}),Object.defineProperty(exports,"cr",{enumerable:!0,get:function(){return He}}),Object.defineProperty(exports,"ct",{enumerable:!0,get:function(){return it}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"dn",{enumerable:!0,get:function(){return yt}}),Object.defineProperty(exports,"dr",{enumerable:!0,get:function(){return Pt}}),Object.defineProperty(exports,"dt",{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,"en",{enumerable:!0,get:function(){return pt}}),Object.defineProperty(exports,"er",{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,"et",{enumerable:!0,get:function(){return ve}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return ue}}),Object.defineProperty(exports,"fn",{enumerable:!0,get:function(){return bt}}),Object.defineProperty(exports,"fr",{enumerable:!0,get:function(){return 2048}}),Object.defineProperty(exports,"ft",{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return ae}}),Object.defineProperty(exports,"gn",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"gt",{enumerable:!0,get:function(){return 56319}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return oe}}),Object.defineProperty(exports,"hn",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"ht",{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return te}}),Object.defineProperty(exports,"in",{enumerable:!0,get:function(){return be}}),Object.defineProperty(exports,"ir",{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(exports,"it",{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(exports,"j",{enumerable:!0,get:function(){return an}}),Object.defineProperty(exports,"jn",{enumerable:!0,get:function(){return $}}),Object.defineProperty(exports,"jt",{enumerable:!0,get:function(){return`[ui-observability]`}}),Object.defineProperty(exports,"k",{enumerable:!0,get:function(){return nn}}),Object.defineProperty(exports,"kn",{enumerable:!0,get:function(){return Qt}}),Object.defineProperty(exports,"kt",{enumerable:!0,get:function(){return ie}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"ln",{enumerable:!0,get:function(){return It}}),Object.defineProperty(exports,"lr",{enumerable:!0,get:function(){return Rt}}),Object.defineProperty(exports,"lt",{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"mn",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"mr",{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,"mt",{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return`ui-observability.alive`}}),Object.defineProperty(exports,"nn",{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,"nr",{enumerable:!0,get:function(){return U}}),Object.defineProperty(exports,"nt",{enumerable:!0,get:function(){return G}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"on",{enumerable:!0,get:function(){return Q}}),Object.defineProperty(exports,"or",{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,"ot",{enumerable:!0,get:function(){return Be}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return de}}),Object.defineProperty(exports,"pn",{enumerable:!0,get:function(){return X}}),Object.defineProperty(exports,"pr",{enumerable:!0,get:function(){return`AppleWebKit`}}),Object.defineProperty(exports,"pt",{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,"q",{enumerable:!0,get:function(){return kt}}),Object.defineProperty(exports,"qn",{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,"qt",{enumerable:!0,get:function(){return ee}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return 3e4}}),Object.defineProperty(exports,"rn",{enumerable:!0,get:function(){return ge}}),Object.defineProperty(exports,"rr",{enumerable:!0,get:function(){return wt}}),Object.defineProperty(exports,"rt",{enumerable:!0,get:function(){return rn}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"sn",{enumerable:!0,get:function(){return Nt}}),Object.defineProperty(exports,"sr",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"st",{enumerable:!0,get:function(){return Ve}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return $e}}),Object.defineProperty(exports,"tn",{enumerable:!0,get:function(){return mt}}),Object.defineProperty(exports,"tr",{enumerable:!0,get:function(){return ze}}),Object.defineProperty(exports,"tt",{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"un",{enumerable:!0,get:function(){return Lt}}),Object.defineProperty(exports,"ur",{enumerable:!0,get:function(){return Bt}}),Object.defineProperty(exports,"ut",{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return ce}}),Object.defineProperty(exports,"vn",{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,"vt",{enumerable:!0,get:function(){return et}}),Object.defineProperty(exports,"w",{enumerable:!0,get:function(){return Pe}}),Object.defineProperty(exports,"wn",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"wt",{enumerable:!0,get:function(){return Ae}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return Le}}),Object.defineProperty(exports,"xn",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"xt",{enumerable:!0,get:function(){return vt}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"yn",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"yt",{enumerable:!0,get:function(){return Se}}),Object.defineProperty(exports,"z",{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,"zn",{enumerable:!0,get:function(){return`ui-observability.session`}}),Object.defineProperty(exports,"zt",{enumerable:!0,get:function(){return q}});
2
- //# sourceMappingURL=constants-CqdJhTxH.cjs.map