@harperfast/harper 5.2.9 → 5.2.10

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 (177) hide show
  1. package/dist/resources/DatabaseTransaction.d.ts +3 -0
  2. package/dist/resources/DatabaseTransaction.js +90 -2
  3. package/dist/resources/DatabaseTransaction.js.map +1 -1
  4. package/dist/resources/PrimaryRocksDatabase.js +2 -1
  5. package/dist/resources/PrimaryRocksDatabase.js.map +1 -1
  6. package/dist/resources/RocksIndexStore.js +2 -1
  7. package/dist/resources/RocksIndexStore.js.map +1 -1
  8. package/dist/resources/Table.js +13 -5
  9. package/dist/resources/Table.js.map +1 -1
  10. package/dist/resources/auditStore.js +142 -53
  11. package/dist/resources/auditStore.js.map +1 -1
  12. package/dist/resources/databases.d.ts +9 -0
  13. package/dist/resources/databases.js +315 -76
  14. package/dist/resources/databases.js.map +1 -1
  15. package/dist/resources/search.js +33 -7
  16. package/dist/resources/search.js.map +1 -1
  17. package/dist/server/storageReclamation.d.ts +7 -0
  18. package/dist/server/storageReclamation.js +10 -0
  19. package/dist/server/storageReclamation.js.map +1 -1
  20. package/dist/server/threads/manageThreads.d.ts +1 -0
  21. package/dist/server/threads/manageThreads.js +7 -0
  22. package/dist/server/threads/manageThreads.js.map +1 -1
  23. package/npm-shrinkwrap.json +41 -41
  24. package/package.json +2 -2
  25. package/resources/DatabaseTransaction.ts +88 -2
  26. package/resources/PrimaryRocksDatabase.ts +2 -1
  27. package/resources/RocksIndexStore.ts +2 -1
  28. package/resources/Table.ts +13 -5
  29. package/resources/auditStore.ts +144 -52
  30. package/resources/databases.ts +296 -70
  31. package/resources/search.ts +32 -7
  32. package/server/storageReclamation.ts +10 -0
  33. package/server/threads/manageThreads.js +7 -0
  34. package/studio/web/assets/Chat-Br06zdMA.js +2267 -0
  35. package/studio/web/assets/FloatingChat-BWImX5fA.js +23 -0
  36. package/studio/web/assets/{abnfDiagram-VCTEODGH-C0_BAZyO.js → abnfDiagram-VCTEODGH-B0BebmD2.js} +1 -1
  37. package/studio/web/assets/{alertDialog-DIHt7Z0r.js → alertDialog-CQyAJJhl.js} +1 -1
  38. package/studio/web/assets/{apiToken-c3Rd-w6g.js → apiToken-DN0nmDsq.js} +1 -1
  39. package/studio/web/assets/applications-kSxVoyeU.js +296 -0
  40. package/studio/web/assets/architecture-7GRP2DOG-LB-MLAAb.js +1 -0
  41. package/studio/web/assets/{architectureDiagram-5GKGNRK7-BWzrASgm.js → architectureDiagram-5GKGNRK7-7SW3GD-K.js} +1 -1
  42. package/studio/web/assets/authStore-C3Nfubqr.js +3 -0
  43. package/studio/web/assets/{blockDiagram-NRAW4CY4-BdJX9Khj.js → blockDiagram-I7D4REHJ-BqguiadH.js} +2 -2
  44. package/studio/web/assets/{button-DhiX-njv.js → button-BIsUKRZq.js} +2 -2
  45. package/studio/web/assets/{c4Diagram-UCG6FXSJ-CI6MzGmQ.js → c4Diagram-7LVT6UL2-LBNf8t_X.js} +1 -1
  46. package/studio/web/assets/channel-yictG-U-.js +1 -0
  47. package/studio/web/assets/{chevron-up-Df2c8uoU.js → chevron-up-DtKGqDn3.js} +1 -1
  48. package/studio/web/assets/{chunk-TEH6E4GO-P87k5mNi.js → chunk-4HAMMTFA-DWtTut21.js} +1 -1
  49. package/studio/web/assets/{chunk-75Z2AOVW-BT8tVmks.js → chunk-75Z2AOVW-QGQD6th2.js} +1 -1
  50. package/studio/web/assets/{chunk-DU6HZSFF-9kAOOmI6.js → chunk-DU6HZSFF-Chq20Ba5.js} +1 -1
  51. package/studio/web/assets/{chunk-F27PBJKO-BW7ao8AY.js → chunk-F27PBJKO-BVA5EPhV.js} +1 -1
  52. package/studio/web/assets/{chunk-GMAD6QVW-BNyXpoQO.js → chunk-GMAD6QVW-BeS7S07A.js} +1 -1
  53. package/studio/web/assets/{chunk-OBVCFTLP-D4wWOqDQ.js → chunk-GVQU2GXP-sbwVIQ8i.js} +1 -1
  54. package/studio/web/assets/{chunk-G27WJ6UU-COyLMcgK.js → chunk-IMKFNOWR-Bnh3tAVd.js} +1 -1
  55. package/studio/web/assets/{chunk-JQ64N6SF-Cyz1IeLf.js → chunk-L3NEJ4N5-COfUyKII.js} +1 -1
  56. package/studio/web/assets/chunk-OSK3NFVY-ByciRftO.js +10 -0
  57. package/studio/web/assets/{chunk-P2QGCYS3-DmIFY4d7.js → chunk-P2QGCYS3-CP1VhG_c.js} +1 -1
  58. package/studio/web/assets/{chunk-POPQ4Y6H-BPrvMyKz.js → chunk-POPQ4Y6H-ClWhhkwW.js} +1 -1
  59. package/studio/web/assets/{chunk-PWAF6VOD-2zB6IW9i.js → chunk-PWAF6VOD-1z1THyS5.js} +1 -1
  60. package/studio/web/assets/{chunk-RHFEMEQ7-2FgyI8YU.js → chunk-SHT3W25Y-LpQkMsah.js} +2 -2
  61. package/studio/web/assets/{chunk-SVP7TREG-FwtbH2QC.js → chunk-SVP7TREG-jtdAHw0S.js} +1 -1
  62. package/studio/web/assets/{chunk-LCL6LL3I-HOzK_ppE.js → chunk-TICWLB2K-VOwzetX-.js} +1 -1
  63. package/studio/web/assets/classDiagram-ZZMXUADV-VaEwSy_g.js +1 -0
  64. package/studio/web/assets/classDiagram-v2-VYDZK3BY-VaEwSy_g.js +1 -0
  65. package/studio/web/assets/{createLucideIcon-BKGPfjm2.js → createLucideIcon-CzW9508A.js} +1 -1
  66. package/studio/web/assets/{cssMode-CEN2mzSA.js → cssMode-C1JeufH5.js} +1 -1
  67. package/studio/web/assets/{cynefin-OW5HDTMX-BRkpLFQV.js → cynefin-OW5HDTMX-BbdbCvub.js} +1 -1
  68. package/studio/web/assets/{cynefinDiagram-5FMLGOSQ-CHT1DaX6.js → cynefinDiagram-5FMLGOSQ-TP-aIqbt.js} +1 -1
  69. package/studio/web/assets/{dagre-3AP2YEHR-DpUXBh63.js → dagre-GXQ25YYZ-DShnGpGo.js} +1 -1
  70. package/studio/web/assets/{diagram-S7CK7UJ4-BuymVFZT.js → diagram-S7CK7UJ4-aoCVTtcy.js} +1 -1
  71. package/studio/web/assets/{diagram-UQ7AKVKN-CyP148RM.js → diagram-UQ7AKVKN-DglXtQ6x.js} +1 -1
  72. package/studio/web/assets/{diagram-VSXAHHWV-CoCAg3M9.js → diagram-VSXAHHWV-fhEdmkwM.js} +1 -1
  73. package/studio/web/assets/{diagram-VX7I27RA-BpOqCFca.js → diagram-VX7I27RA-DccVJet6.js} +1 -1
  74. package/studio/web/assets/{diagram-Z3DM3KII-Bfpw7Vbj.js → diagram-Z3DM3KII-D-RyJJb7.js} +1 -1
  75. package/studio/web/assets/{dialog-CBf0Mr1d.js → dialog-Cn2uWgD4.js} +1 -1
  76. package/studio/web/assets/{dist-lkA3O3eM.js → dist-DP8UjMB_.js} +1 -1
  77. package/studio/web/assets/{download-BtTOBem-.js → download-B5T5r7ss.js} +1 -1
  78. package/studio/web/assets/{ebnfDiagram-PWID7BFC-DS_6aWqL.js → ebnfDiagram-PWID7BFC-DJGpIpz_.js} +1 -1
  79. package/studio/web/assets/{editor-D8oDeCTL.js → editor-qoo9CrGO.js} +1 -1
  80. package/studio/web/assets/{erDiagram-SSCWMZ5O-DJNk6Fgw.js → erDiagram-RLTQ6QDP-CIfNlgkC.js} +1 -1
  81. package/studio/web/assets/eventmodeling-NTZA5JFV-CLxnp2CR.js +1 -0
  82. package/studio/web/assets/flowDiagram-HODETNUW-BIbhmz9f.js +1 -0
  83. package/studio/web/assets/{ganttDiagram-EL5Y4UJY-2pOExxMY.js → ganttDiagram-EL5Y4UJY-BxToTzzD.js} +1 -1
  84. package/studio/web/assets/{getAnalytics-D4LKGeVy.js → getAnalytics-GHK8ORfM.js} +1 -1
  85. package/studio/web/assets/{gitGraph-4MIJSDKK-CH5ZxwzF.js → gitGraph-4MIJSDKK-D2s2w8lE.js} +1 -1
  86. package/studio/web/assets/{gitGraphDiagram-WWUBYQGX-DVIsIhbO.js → gitGraphDiagram-WWUBYQGX-Dwntd4-x.js} +1 -1
  87. package/studio/web/assets/{html-u3vOg7LJ.js → html-Dt4IIy04.js} +1 -1
  88. package/studio/web/assets/{htmlMode-DyO31v-P.js → htmlMode-DXgKKr4C.js} +1 -1
  89. package/studio/web/assets/index-6onkYFOG.js +824 -0
  90. package/studio/web/assets/{index-Cxj2_wsl.css → index-7RMEgVG1.css} +1 -1
  91. package/studio/web/assets/index.lazy-BrCFnpNJ.js +2 -0
  92. package/studio/web/assets/{info-A6RAGUB7-CPQfTnaG.js → info-A6RAGUB7-DYjkvb0C.js} +1 -1
  93. package/studio/web/assets/{infoDiagram-RXCK75RN-DlwLYlwm.js → infoDiagram-27XIBGKW-Bnp1FJE5.js} +1 -1
  94. package/studio/web/assets/{ishikawaDiagram-5VMMS53U-BRXRp29U.js → ishikawaDiagram-5VMMS53U-D9Xh2r6X.js} +1 -1
  95. package/studio/web/assets/{javascript-CUvxOyTC.js → javascript-DNCQGUBc.js} +1 -1
  96. package/studio/web/assets/{journeyDiagram-EYS64GPL-B0ou8k0n.js → journeyDiagram-3NMN7TZE-CokIi6ll.js} +2 -2
  97. package/studio/web/assets/{jsonMode-f_IwbF3D.js → jsonMode-CR6HWruP.js} +1 -1
  98. package/studio/web/assets/{kanban-definition-3QL26DDD-uYg7iYzp.js → kanban-definition-UXKFOSKX-CukSFJfX.js} +1 -1
  99. package/studio/web/assets/{languageServices-DXtZ6rEF.js → languageServices-BM4fI4rS.js} +1 -1
  100. package/studio/web/assets/{lspLanguageFeatures-B4pCF1zO.js → lspLanguageFeatures-DSa1ttcD.js} +1 -1
  101. package/studio/web/assets/{mermaid-parser.core-Ck-fC8b7.js → mermaid-parser.core-BlEsOWNO.js} +3 -3
  102. package/studio/web/assets/{mermaid.core-CP8aNNYm.js → mermaid.core-BlkGaMIH.js} +5 -5
  103. package/studio/web/assets/{mindmap-definition-FBJOCRG2-CgTZ-rit.js → mindmap-definition-YA3MSWOX-IprMc_0j.js} +1 -1
  104. package/studio/web/assets/{notifications-D3tIQ4sg.js → notifications-BHXLnh6x.js} +1 -1
  105. package/studio/web/assets/notifications-CUmtIA6z.js +1 -0
  106. package/studio/web/assets/{packet-AYTQ26CC-DEyoPtPb.js → packet-AYTQ26CC-Bi3V04Zi.js} +1 -1
  107. package/studio/web/assets/{pegDiagram-XKGWAZYB-DrD-7sD9.js → pegDiagram-XKGWAZYB-BNuPDLZY.js} +1 -1
  108. package/studio/web/assets/{pie-WAS4IAKB-wjj-EI1d.js → pie-WAS4IAKB-_6DoDbng.js} +1 -1
  109. package/studio/web/assets/{pieDiagram-E7YTZNPT-GntqDCzv.js → pieDiagram-E7YTZNPT-DqNb6Ht2.js} +1 -1
  110. package/studio/web/assets/{profile-DZWU7MgT.js → profile-8BeFSF3j.js} +1 -1
  111. package/studio/web/assets/{quadrantDiagram-AXDQQJYC-0UeqXQGd.js → quadrantDiagram-AXDQQJYC-BGH9E2YR.js} +1 -1
  112. package/studio/web/assets/{radar-RG4KPBEZ-DFSA5h7k.js → radar-RG4KPBEZ-DDdVczcL.js} +1 -1
  113. package/studio/web/assets/{railroad-74A4TZTK-CaOUG9wR.js → railroad-74A4TZTK-BJUP4Jds.js} +1 -1
  114. package/studio/web/assets/railroad-abnf-HS5TGJTU-Bm3L1L0h.js +1 -0
  115. package/studio/web/assets/railroad-ebnf-LZEXJU2U-CKzLGlkw.js +1 -0
  116. package/studio/web/assets/railroad-peg-WCYAUIDC-S8xLjslx.js +1 -0
  117. package/studio/web/assets/{railroadDiagram-O6MQD6OU-yHUELZaV.js → railroadDiagram-O6MQD6OU-DGTPh2KZ.js} +1 -1
  118. package/studio/web/assets/{regions-CkyurXzE.js → regions-C8qR0HhD.js} +1 -1
  119. package/studio/web/assets/{register-BUyhWjBO.js → register-B4n5i0SD.js} +3 -3
  120. package/studio/web/assets/{requirementDiagram-EFPCY7ZU-DNEGFjuW.js → requirementDiagram-BXWQKSXE-BJnO6uLz.js} +1 -1
  121. package/studio/web/assets/{sankeyDiagram-P5KCCOFB-DpyAmSVR.js → sankeyDiagram-P5KCCOFB-0vSOdymH.js} +1 -1
  122. package/studio/web/assets/{sequenceDiagram-WJ2MYXX4-TyaT7xNk.js → sequenceDiagram-WJ2MYXX4-hETizDWE.js} +1 -1
  123. package/studio/web/assets/{setComponentFile-CeyKSZAa.js → setComponentFile-g0_B0lgX.js} +1 -1
  124. package/studio/web/assets/{setup-D2kn7cAA.js → setup-B0CTj_Q5.js} +2 -2
  125. package/studio/web/assets/{stateDiagram-HBIQ2CUA-CeEdTArZ.js → stateDiagram-D77RDMKH-CdYQ_KtC.js} +1 -1
  126. package/studio/web/assets/stateDiagram-v2-MP3YSRHH-CdKuzQMT.js +1 -0
  127. package/studio/web/assets/status-C6Yib7-K.js +61 -0
  128. package/studio/web/assets/{swimlanes-XN3QIQJK-B54FmF46.js → swimlanes-42K2YHIH-B8cHIpU4.js} +1 -1
  129. package/studio/web/assets/swimlanesDiagram-VR7AAH4N-DmOSJwaH.js +8 -0
  130. package/studio/web/assets/{tabs-B_G5zscN.js → tabs-BrHu7gJi.js} +1 -1
  131. package/studio/web/assets/{timeline-definition-24CTP7MA-D-a9ujbo.js → timeline-definition-24CTP7MA-BJWYSXqF.js} +1 -1
  132. package/studio/web/assets/{toggleHighContrast-C0UW6rI2.js → toggleHighContrast-Dgta7bVi.js} +1 -1
  133. package/studio/web/assets/{treeView-Q6P3EWNA-CrW_6JnS.js → treeView-Q6P3EWNA-qxe_v6CQ.js} +1 -1
  134. package/studio/web/assets/{treemap-WGGIJYW6-BxyYLdP_.js → treemap-WGGIJYW6-dDo97XXF.js} +1 -1
  135. package/studio/web/assets/{tsMode-DBC0zmDx.js → tsMode-CH_jHvU-.js} +1 -1
  136. package/studio/web/assets/{typescript-DApRQir3.js → typescript-Co9LCXd5.js} +1 -1
  137. package/studio/web/assets/{useEntityRestURL-DB6JStU1.js → useEntityRestURL-wKC8NsC_.js} +1 -1
  138. package/studio/web/assets/{useLocalStorage-Dtj1QS8_.js → useLocalStorage-BqMR3D8_.js} +1 -1
  139. package/studio/web/assets/vendor-core-c2JRRJpV.js +58 -0
  140. package/studio/web/assets/vendor-datadog-CLUcJXOo.js +6 -0
  141. package/studio/web/assets/{vendor-react-Dyj4O3HE.js → vendor-react-CJV_K1u4.js} +1 -1
  142. package/studio/web/assets/vendor-tanstack-DxzraizX.js +1 -0
  143. package/studio/web/assets/{vendor-ui-vhu-UHhF.js → vendor-ui-BUjK0h8a.js} +2 -2
  144. package/studio/web/assets/{vennDiagram-4TSXK5OY-Cy7s7Mpy.js → vennDiagram-4TSXK5OY-A3i-lCdl.js} +1 -1
  145. package/studio/web/assets/{wardley-WFR3VGLG-BeBL35g2.js → wardley-WFR3VGLG-B0ik-_6g.js} +1 -1
  146. package/studio/web/assets/{wardleyDiagram-VM6X3IG4-BylmIGSg.js → wardleyDiagram-VM6X3IG4-CjrkKWUR.js} +1 -1
  147. package/studio/web/assets/{workers-C0bFIedw.js → workers-CWeLxCXA.js} +1 -1
  148. package/studio/web/assets/x-DIzaLEdK.js +1 -0
  149. package/studio/web/assets/{xml-HWd01lU-.js → xml-BadC-0Rk.js} +1 -1
  150. package/studio/web/assets/{xychartDiagram-S5SC5T6Z-CoKALMXr.js → xychartDiagram-S5SC5T6Z-Biok4GYV.js} +1 -1
  151. package/studio/web/assets/{yaml-CIH0Nt-h.js → yaml-BiUfxPbC.js} +1 -1
  152. package/studio/web/index.html +14 -14
  153. package/studio/web/assets/Chat-JpO8EtUu.js +0 -2067
  154. package/studio/web/assets/FloatingChat-Bcj3xSZu.js +0 -23
  155. package/studio/web/assets/applications-ByqLRKyZ.js +0 -296
  156. package/studio/web/assets/architecture-7GRP2DOG-DNdx5tEU.js +0 -1
  157. package/studio/web/assets/authStore-qKmCZcaf.js +0 -3
  158. package/studio/web/assets/channel-DtCV8PTL.js +0 -1
  159. package/studio/web/assets/chunk-R7TYR2AO-Irip67yr.js +0 -10
  160. package/studio/web/assets/classDiagram-DTDB5LWJ-DbO_dCNE.js +0 -1
  161. package/studio/web/assets/classDiagram-v2-JRS7N3AN-DbO_dCNE.js +0 -1
  162. package/studio/web/assets/eventmodeling-NTZA5JFV-5jbe4A5P.js +0 -1
  163. package/studio/web/assets/flowDiagram-A5DVABFB-Dp9Ezlow.js +0 -1
  164. package/studio/web/assets/index-aSt5tY-L.js +0 -824
  165. package/studio/web/assets/index.lazy-B9jiPwT8.js +0 -2
  166. package/studio/web/assets/notifications-CUoYgU98.js +0 -1
  167. package/studio/web/assets/railroad-abnf-HS5TGJTU-Bc0Qi0WH.js +0 -1
  168. package/studio/web/assets/railroad-ebnf-LZEXJU2U-G8rVVZ2C.js +0 -1
  169. package/studio/web/assets/railroad-peg-WCYAUIDC-CrehKBhC.js +0 -1
  170. package/studio/web/assets/stateDiagram-v2-4QOOHH4V-D4tuw9Su.js +0 -1
  171. package/studio/web/assets/status-D7Xn5ePA.js +0 -61
  172. package/studio/web/assets/swimlanesDiagram-VK2B7HYN-XOhmNEvq.js +0 -8
  173. package/studio/web/assets/vendor-core-RCcadM3e.js +0 -73
  174. package/studio/web/assets/vendor-datadog-BRv-mOv1.js +0 -6
  175. package/studio/web/assets/vendor-tanstack-BiFWSB3W.js +0 -1
  176. package/studio/web/assets/x-B9o9hsep.js +0 -1
  177. /package/studio/web/assets/{sizeCapture-X5ZJPWSS-B0uUizjq.js → sizeCapture-INFHLROL-B0uUizjq.js} +0 -0
@@ -0,0 +1,6 @@
1
+ import{n as e,r as t,t as n}from"./rolldown-runtime-hePW80VL.js";var r=n((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function ee(){}ee.prototype=v.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var te=y.prototype=new ee;te.constructor=y,g(te,v.prototype),te.isPureReactComponent=!0;var ne=Array.isArray;function b(){}var x={H:null,A:null,T:null,S:null},re=Object.prototype.hasOwnProperty;function ie(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ae(e,t){return ie(e.type,t,e.props)}function S(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function oe(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var se=/\/+/g;function ce(e,t){return typeof e==`object`&&e&&e.key!=null?oe(``+e.key):t.toString(36)}function le(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(b,b):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function C(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,C(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ce(e,0):a,ne(o)?(i=``,c!=null&&(i=c.replace(se,`$&/`)+`/`),C(o,r,i,``,function(e){return e})):o!=null&&(S(o)&&(o=ae(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(se,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ne(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ce(a,u),c+=C(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ce(a,u++),c+=C(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return C(le(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ue(e,t,n){if(e==null)return e;var r=[],i=0;return C(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function de(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var fe=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},pe={map:ue,forEach:function(e,t,n){ue(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ue(e,function(){t++}),t},toArray:function(e){return ue(e,function(e){return e})||[]},only:function(e){if(!S(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=pe,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return x.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!re.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return ie(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)re.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return ie(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=S,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:de}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=x.T,n={};x.T=n;try{var r=e(),i=x.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(b,fe)}catch(e){fe(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),x.T=t}},e.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()},e.use=function(e){return x.H.use(e)},e.useActionState=function(e,t,n){return x.H.useActionState(e,t,n)},e.useCallback=function(e,t){return x.H.useCallback(e,t)},e.useContext=function(e){return x.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return x.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return x.H.useEffect(e,t)},e.useEffectEvent=function(e){return x.H.useEffectEvent(e)},e.useId=function(){return x.H.useId()},e.useImperativeHandle=function(e,t,n){return x.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return x.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return x.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return x.H.useMemo(e,t)},e.useOptimistic=function(e,t){return x.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return x.H.useReducer(e,t,n)},e.useRef=function(e){return x.H.useRef(e)},e.useState=function(e){return x.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return x.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return x.H.useTransition()},e.version=`19.2.8`})),i=n(((e,t)=>{t.exports=r()}));function a(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e}function o(e){return a(e)===`object`}function s(e){return typeof e==`number`&&e>=0&&e<=100}function c(e){return typeof e==`string`||e instanceof RegExp||typeof e==`function`}function l(e,t){return u(e,t,p())}function u(e,t,n){if(t===void 0)return e;if(typeof t!=`object`||!t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp)return new RegExp(t.source,t.flags);if(n.hasAlreadyBeenSeen(t))return;if(Array.isArray(t)){let r=Array.isArray(e)?e:[];for(let e=0;e<t.length;++e)r[e]=u(r[e],t[e],n);return r}let r=a(e)===`object`?e:{};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&e!==`__proto__`&&(r[e]=u(r[e],t[e],n));return r}function d(e){return l(void 0,e)}function f(...e){let t;for(let n of e)n!=null&&(t=l(t,n));return t}function p(){let e=new WeakSet;return{hasAlreadyBeenSeen(t){let n=e.has(t);return n||e.add(t),n}}}var m=`https://docs.datadoghq.com`,h=`More details:`,g={log:`log`,debug:`debug`,info:`info`,warn:`warn`,error:`error`},_=console,v={log:_.log,debug:_.debug,info:_.info,warn:_.warn,error:_.error};function ee(e){return{debug:v.debug.bind(_,e),log:v.log.bind(_,e),info:v.info.bind(_,e),warn:v.warn.bind(_,e),error:v.error.bind(_,e)}}var y=!1;function te(e){y=e}function ne(){return y}var b=globalThis,x=`WorkerGlobalScope`in b;function re(e){return S(e,b.document?.baseURI??b.location?.href).href}function ie(e){try{return!!S(e)}catch{return!1}}function ae(e){let t=S(e).pathname;return t[0]===`/`?t:`/${t}`}function S(e,t){let n=se();try{return t===void 0?new n(e):new n(e,t)}catch(e){throw Error(`Failed to construct URL: ${String(e)}`)}}var oe;function se(){if(!oe){let e=!1;try{e=new b.URL(`b`,`http://a`).href===`http://a/b`}catch{}oe=e?b.URL:le().URL}return oe}var ce;function le(){if(!ce){let e,t;try{e=document.createElement(`iframe`),e.style.display=`none`,document.body.appendChild(e),t=e.contentWindow??b}catch{t=b}ce={URL:t.URL},e?.remove()}return ce}var C=ee(`Datadog Browser SDK:`),ue=`${m}/real_user_monitoring/browser/troubleshooting`;function de(e,t){function n(e,t,n){n.value=r(n.value)}function r(e){return function(...t){return i(e,this,t)}}function i(e,t,n){try{return e.apply(t,n)}catch(e){a(e)}}function a(n){let r=t=>{ne()&&e.error(`[MONITOR]`,t)};r(n);try{t(n)}catch(e){r(e)}}return{monitored:n,monitor:r,callMonitored:i,monitorError:a}}var fe,{monitored:pe,monitor:w,callMonitored:me,monitorError:T}=de(C,e=>fe?.(e));function he(e){fe=e}function ge(e){let t=b.queueMicrotask;typeof t==`function`?t(w(e)):Promise.resolve().then(w(e))}var E=class{constructor(e){this.onFirstSubscribe=e,this.observers=[]}subscribe(e){return this.addObserver(e),{unsubscribe:()=>this.removeObserver(e)}}notify(e){this.observers.forEach(t=>t(e))}addObserver(e){this.observers.push(e),this.observers.length===1&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe(this)||void 0)}removeObserver(e){this.observers=this.observers.filter(t=>e!==t),!this.observers.length&&this.onLastUnsubscribe&&this.onLastUnsubscribe()}};function _e(...e){return new E(t=>{let n=e.map(e=>e.subscribe(e=>t.notify(e)));return()=>n.forEach(e=>e.unsubscribe())})}var ve=class extends E{constructor(e,t){super(),this.maxBufferSize=e,this.onDrop=t,this.buffer=[],this.droppedCount=0}notify(e){this.buffer.push(e),this.buffer.length>this.maxBufferSize&&(this.buffer.shift(),this.droppedCount++),super.notify(e)}subscribe(e){let t=!1;return ge(()=>{for(let n of this.buffer){if(t)return;e(n)}t||this.addObserver(e)}),{unsubscribe:()=>{t=!0,this.removeObserver(e)}}}unbuffer(){ge(()=>{this.droppedCount>0&&this.onDrop&&this.onDrop(this.droppedCount),this.maxBufferSize=this.buffer.length=0})}},ye={GRANTED:`granted`,NOT_GRANTED:`not-granted`};function be(e){let t=new E;function n(){return e===ye.GRANTED}return{tryToInit(t){e||=t},onGrantedOnce(e){if(n())e();else{let r=t.subscribe(()=>{n()&&(e(),r.unsubscribe())})}},update(n){e=n,t.notify()},isGranted:n,observable:t}}var xe=`datad0g.com`,Se=`datadoghq.com`,Ce=`datadoghq.eu`,we=`ddog-gov.com`,Te=`us2.ddog-gov.com`,Ee=[`ddsource`,`dd-api-key`,`dd-request-id`];function De(e){return Ee.every(t=>e.includes(t))}var D=1e3,O=60*D,Oe=60*O,ke=31536e6;function Ae(){return new Date().getTime()}function k(){return Ae()}function A(e,t){return t-e}function j(e){return typeof e==`number`?Math.round(e*1e6):e}function je(e,t){return e+t}function Me(){return performance.now()}function M(){return{relative:Me(),timeStamp:k()}}function Ne(){return{relative:0,timeStamp:Ve()}}function Pe(e){return{relative:e,timeStamp:He(e)}}function Fe(e){return{relative:Ie(e),timeStamp:e}}function Ie(e){return e-Ve()}function Le(e){return Math.round(je(Ve(),e))}function Re(e){return e<ke}function ze(){return Math.round(Ae()-je(Ve(),performance.now()))}var Be;function Ve(){return Be===void 0&&(Be=performance.timing?.navigationStart??performance.timeOrigin),Be}function He(e){let t=Ae()-performance.now();return t>Ve()?Math.round(je(t,e)):Le(e)}function Ue(e,t,n){return{build(r,i){return Ge({proxy:e.proxy,site:e.site,path:`/api/v2/${t}`,parameters:Ke(e,t,r,i,n)})},trackType:t}}function We({replica:e,proxy:t,source:n},r){if(e)return Ue({clientToken:e.clientToken,proxy:t,source:n,site:Se},r,r===`rum`?[`application.id=${e.applicationId}`]:void 0)}function Ge({proxy:e,site:t=Se,path:n,parameters:r=``,subdomain:i}){let a=n;if(r&&(a+=`?${r}`),typeof e==`string`){let t=`${re(e)}?ddforward=${encodeURIComponent(a)}`;return i&&(t+=`&ddforwardSubdomain=${i}`),t}if(typeof e==`function`)return e({path:n,parameters:r,subdomain:i});let o=t.split(`.`),s=o.pop(),c=`browser-intake-${o.join(`-`)}.${s}`;return i&&(c=`${i}.${c}`),`https://${c}${a}`}function Ke({clientToken:e,source:t=`browser`},n,r,{retry:i,encoding:a},o=[]){let s=[`ddsource=${t}`,`dd-api-key=${e}`,`dd-evp-origin-version=7.12.0`,`dd-evp-origin=browser`,`dd-request-id=${qe()}`].concat(o);return a&&s.push(`dd-evp-encoding=${a}`),n===`rum`&&(s.push(`batch_time=${k()}`,`_dd.api=${r}`),i&&s.push(`_dd.retry_count=${i.count}`,`_dd.retry_after=${i.lastFailureStatus}`)),s.join(`&`)}function qe(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,qe)}var Je={ALLOW:`allow`,MASK:`mask`,MASK_USER_INPUT:`mask-user-input`,MASK_UNLESS_ALLOWLISTED:`mask-unless-allowlisted`},Ye={ALL:`all`,SAMPLED:`sampled`},Xe={clientToken:{type:`string`,required:!0},service:{type:`string`},env:{type:`string`},version:{type:`string`},site:{type:`site`,default:Se},proxy:{type:`union`,variants:[{type:`string`},{type:`function`,signature:void 0}]},sessionSampleRate:{type:`percentage`,default:100},telemetrySampleRate:{type:`percentage`,default:20},telemetryConfigurationSampleRate:{type:`percentage`,default:5},telemetryUsageSampleRate:{type:`percentage`,default:5},silentMultipleInit:{type:`boolean`,default:!1,strict:!1},storeContextsAcrossPages:{type:`boolean`,default:!1,strict:!1},trackAnonymousUser:{type:`boolean`,default:!0,strict:!1},useSecureSessionCookie:{type:`boolean`,default:!1,strict:!1},usePartitionedCrossSiteSessionCookie:{type:`boolean`,default:!1,strict:!1},trackSessionAcrossSubdomains:{type:`boolean`,default:!1,strict:!1},allowedTrackingOrigins:{type:`match-option`,multiple:!0,strict:!1},trackingConsent:{type:`enum`,values:ye,default:ye.GRANTED},beforeSend:{type:`function`,signature:void 0},source:{type:`enum`,values:[`browser`,`flutter`,`unity`],default:`browser`,strict:!1},sessionPersistence:{type:`enum`,values:[`cookie`,`local-storage`,`memory`],multiple:!0,strict:!1},replica:{type:`schema`,schema:{clientToken:{type:`string`,required:!0},applicationId:{type:`string`}}},datacenter:{type:`string`},sdkVersion:{type:`string`},variant:{type:`string`}};function Ze(e){return{session_sample_rate:e.sessionSampleRate,telemetry_sample_rate:e.telemetrySampleRate,telemetry_configuration_sample_rate:e.telemetryConfigurationSampleRate,telemetry_usage_sample_rate:e.telemetryUsageSampleRate,use_before_send:!!e.beforeSend,use_partitioned_cross_site_session_cookie:e.usePartitionedCrossSiteSessionCookie,use_secure_session_cookie:e.useSecureSessionCookie,use_proxy:!!e.proxy,silent_multiple_init:e.silentMultipleInit,track_session_across_subdomains:e.trackSessionAcrossSubdomains,track_anonymous_user:e.trackAnonymousUser,session_persistence:Array.isArray(e.sessionPersistence)?e.sessionPersistence[0]:e.sessionPersistence,store_contexts_across_pages:!!e.storeContextsAcrossPages,allow_untrusted_events:!!e.allowUntrustedEvents,tracking_consent:e.trackingConsent,use_allowed_tracking_origins:Array.isArray(e.allowedTrackingOrigins),source:e.source,sdk_version:e.sdkVersion,variant:e.variant}}function N(e){return e?(parseInt(e,10)^Math.random()*16>>parseInt(e,10)/4).toString(16):`10000000-1000-4000-8000-100000000000`.replace(/[018]/g,N)}var Qe=/(\S+?)\s*=\s*(.*?)(?:;|$)/g;function $e(e,t){for(Qe.lastIndex=0;;){let n=Qe.exec(e);if(n){if(n[1]===t)return n[2]}else break}}function et(e){let t=new Map;for(Qe.lastIndex=0;;){let n=Qe.exec(e);if(n){let e=n[1],r=n[2];t.has(e)?t.get(e).push(r):t.set(e,[r])}else break}return t}function tt(e){let t=new Map;for(Qe.lastIndex=0;;){let n=Qe.exec(e);if(n)t.set(n[1],n[2]);else break}return t}function nt(e,t,n=``){let r=e.charCodeAt(t-1),i=r>=55296&&r<=56319?t+1:t;return e.length<=i?e:`${e.slice(0,i)}${n}`}function rt(e,t){return t?`${e}-v${t.split(`.`)[0]}`:e}function it(...e){let t=e.filter(e=>!!e);return t.length>0?t:void 0}function at(e,t,n=0,r){let i=new Date;i.setTime(i.getTime()+n);let a=`expires=${i.toUTCString()}`,o=r?.crossSite?`none`:`strict`,s=r?.domain?`;domain=${r.domain}`:``,c=r?.secure?`;secure`:``,l=r?.partitioned?`;partitioned`:``;document.cookie=`${e}=${t};${a};path=/;samesite=${o}${s}${c}${l}`}function ot(e){let t=$e(document.cookie,e);if(t!==``)return t}function st(e){return et(document.cookie).get(e)||[]}var ct;function lt(e){return ct||=tt(document.cookie),ct.get(e)}function ut(e,t){at(e,``,0,t)}var dt;function ft(e=b.location?.hostname??``,t=typeof document<`u`?document.referrer:``){if(!(typeof document>`u`)){if(dt===void 0){let n=pt(e,t);if(n){let e=`dd_site_test_${N()}`,t=n.split(`.`),r=t.pop();for(;t.length&&!ot(e);)r=`${t.pop()}.${r}`,at(e,`test`,D,{domain:r});ut(e,{domain:r}),dt=r}}return dt}}function pt(e,t){try{return e||S(t).hostname}catch{}}function mt(e){let t={};if(t.secure=e.useSecureSessionCookie||e.usePartitionedCrossSiteSessionCookie,t.crossSite=e.usePartitionedCrossSiteSessionCookie,t.partitioned=e.usePartitionedCrossSiteSessionCookie,e.trackSessionAcrossSubdomains){let e=ft();if(!e)return;t.domain=e}return t}function ht(e,t,n=!1){return e.some(e=>{try{if(typeof e==`function`)return e(t);if(e instanceof RegExp)return e.lastIndex=0,e.test(t);if(typeof e==`string`)return n?t.startsWith(e):e===t}catch(e){C.error(e)}return!1})}function P(e){return e}var gt=[`chrome-extension://`,`moz-extension://`];function _t(e){return gt.some(t=>e.includes(t))}function vt(e,t=``){return!_t(e)&&_t(t.split(`
2
+ `).filter(e=>{let t=e.trim();return t.length&&/^at\s+|@/.test(t)})[1]||``)}var yt="Running the Browser SDK in a Web extension content script is forbidden unless the `allowedTrackingOrigins` option is provided.",bt=`SDK initialized on a non-allowed domain.`;function xt(e,t){let n=P(b.location),r=n?n.origin:``,i=e.allowedTrackingOrigins;if(!i)return!vt(r,t)||(C.error(yt),!1);let a=ht(i,r);return a||C.error(bt),a}var St=(e,t)=>e===`__proto__`?void 0:t;function Ct(e){try{return JSON.parse(e,St)}catch{}}function wt(e){return{...e}}function Tt(e,t){return Object.keys(e).some(n=>e[n]===t)}function Et(e){return Object.keys(e).length===0}function Dt(e,t){let n={};for(let r of Object.keys(e))n[r]=t(e[r]);return n}var Ot=function(e){return e.SESSION_REPLAY_RECORD_CANVAS=`session_replay_record_canvas`,e.TRACK_INTAKE_REQUESTS=`track_intake_requests`,e.TRACK_WEBSOCKETS=`track_websockets`,e}({}),kt=new Set;function At(e){Array.isArray(e)&&jt(e.filter(e=>Tt(Ot,e)))}function jt(e){e.forEach(e=>{kt.add(e)})}function Mt(e){return kt.has(e)}function Nt(){return kt}function Pt(e,t){let n=b,r;return n.Zone&&typeof n.Zone.__symbol__==`function`&&(r=e[n.Zone.__symbol__(t)]),r||=e[t],r}function F(e,t){return Pt(b,`setTimeout`)(w(e),t)}function I(e){Pt(b,`clearTimeout`)(e)}function Ft(e,t){return Pt(b,`setInterval`)(w(e),t)}function It(e){Pt(b,`clearInterval`)(e)}function Lt(e,t,n){let r=n?.leading===void 0||n.leading,i=n?.trailing===void 0||n.trailing,a=!1,o,s;return{throttled:(...n)=>{if(a){o=n;return}r?e(...n):o=n,a=!0,s=F(()=>{i&&o&&e(...o),a=!1,o=void 0},t)},cancel:()=>{I(s),a=!1,o=void 0}}}function L(){}var Rt=`?`;function zt(e){let t=[],n=Qt(e,`stack`),r=String(e);if(n?.startsWith(r)&&(n=n.slice(r.length)),n&&n.split(`
3
+ `).forEach(e=>{let n=Wt(e)||Kt(e)||Jt(e)||Zt(e);n&&(!n.func&&n.line&&(n.func=Rt),t.push(n))}),t.length>0&&an()&&e instanceof Error){let n=[],r=e;for(;(r=Object.getPrototypeOf(r))&&nn(r);){let e=r.constructor?.name||Rt;n.push(e)}for(let e=n.length-1;e>=0&&t[0]?.func===n[e];e--)t.shift()}return{message:Qt(e,`message`),name:Qt(e,`name`),stack:t}}var Bt=`((?:blob|native|eval|<anonymous>|[a-zA-Z][a-zA-Z0-9+.-]*:\\/\\/|\\w+\\.|\\/).*?)`,Vt=`(?::(\\d+))`,Ht=RegExp(`^\\s*at (.*?) ?\\(${Bt}${Vt}?${Vt}?\\)?\\s*$`,`i`),Ut=RegExp(`\\((\\S*)${Vt}${Vt}\\)`);function Wt(e){let t=Ht.exec(e);if(!t)return;let n=t[2]?.indexOf(`native`)===0,r=t[2]?.indexOf(`eval`)===0,i=Ut.exec(t[2]);return r&&i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3]),{args:n?[t[2]]:[],column:t[4]?+t[4]:void 0,func:t[1]||Rt,line:t[3]?+t[3]:void 0,url:n?void 0:t[2]}}var Gt=RegExp(`^\\s*at\\s*(?:(.*)?(?: @))?\\s*${Bt}${Vt}?${Vt}??\\s*$`,`i`);function Kt(e){let t=Gt.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Rt,line:t[3]?+t[3]:void 0,url:t[2]}}var qt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Jt(e){let t=qt.exec(e);if(t)return{args:[],column:t[4]?+t[4]:void 0,func:t[1]||Rt,line:+t[3],url:t[2]}}var Yt=/^\s*(.*?)(?:\((.*?)\))?(?:(?:(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle|\[wasm code\])(?::(\d+))?(?::(\d+))?)|@)\s*$/i,Xt=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Zt(e){let t=Yt.exec(e);if(!t)return;let n=t[3]&&t[3].indexOf(` > eval`)>-1,r=Xt.exec(t[3]);return n&&r&&(t[3]=r[1],t[4]=r[2],t[5]=void 0),{args:t[2]?t[2].split(`,`):[],column:t[5]?+t[5]:void 0,func:t[1]||Rt,line:t[4]?+t[4]:void 0,url:t[3]}}function Qt(e,t){return o(e)&&typeof e[t]==`string`?e[t]:void 0}function $t(e,t,n,r){if(t===void 0)return;let{name:i,message:a}=tn(e);return{name:i,message:a,stack:[{url:t,column:r,line:n}]}}var en=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function tn(e){let t,n;return{}.toString.call(e)===`[object String]`&&([,t,n]=en.exec(e)),{name:t,message:n}}function nn(e){return String(e.constructor).startsWith(`class `)}var rn;function an(){if(rn!==void 0)return rn;class e extends Error{constructor(){super(),this.name=`Error`}}let[t,n]=[e,Error].map(e=>new e);return rn=nn(Object.getPrototypeOf(t))&&n.stack!==t.stack,rn}function on(e){let t=Error(e);t.name=`HandlingStack`;let n;return me(()=>{let e=zt(t);e.stack=e.stack.slice(2),n=sn(e)}),n}function sn(e){let t=cn(e);return e.stack.forEach(e=>{let n=e.func===`?`?`<anonymous>`:e.func,r=e.args&&e.args.length>0?`(${e.args.join(`, `)})`:``,i=e.line?`:${e.line}`:``,a=e.line&&e.column?`:${e.column}`:``;t+=`\n at ${n}${r} @ ${e.url}${i}${a}`}),t}function cn(e){return`${e.name||`Error`}: ${e.message}`}function R(e,t,n,{computeHandlingStack:r}={}){let i=e[t];if(typeof i!=`function`){if(t in e&&typeof t==`string`&&t.startsWith(`on`))i=L;else return{stop:L}}let a=!1,{stop:o}=un(e,t,i,function(){if(a)return i.apply(this,arguments);let e=Array.from(arguments);return dn(n,{target:this,parameters:e,handlingStack:r?on(`instrumented method`):void 0},()=>i.apply(this,e))});return{stop:()=>{a=!0,o()}}}function ln(e,t,n,{computeHandlingStack:r}={}){let i=e[t];if(typeof i!=`function`)return{stop:L};let a=!1,o=function(){if(!new.target)return Reflect.apply(i,this,Array.from(arguments));let e=new.target===o?i:new.target;if(a)return Reflect.construct(i,arguments,e);let t=Array.from(arguments);return dn(n,{parameters:t,handlingStack:r?on(`instrumented constructor`):void 0},()=>Reflect.construct(i,t,e))},s=fn(o,i),{stop:c}=un(e,t,i,o);return{stop:()=>{a=!0,s(),c()}}}function un(e,t,n,r){return e[t]=r,{stop:()=>{e[t]===r&&(e[t]=n)}}}function dn(e,t,n){let r;me(e,null,[{...t,onPostCall:e=>{r=e}}]);let i=n();return r&&me(r,null,[i]),i}function fn(e,t){for(let n of[].concat(Object.getOwnPropertyNames(t),Object.getOwnPropertySymbols(t))){let r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r)}let{stop:n}=un(t.prototype,`constructor`,t.prototype.constructor,e);return n}function pn(e,t,n){let r=Object.getOwnPropertyDescriptor(e,t);if(!r?.set||!r.configurable)return{stop:L};let i=L,a=(e,t)=>{F(()=>{a!==i&&n(e,t)},0)},o=function(e){r.set.call(this,e),a(this,e)};return Object.defineProperty(e,t,{set:o}),{stop:()=>{Object.getOwnPropertyDescriptor(e,t)?.set===o&&Object.defineProperty(e,t,r),a=i}}}var z=function(e){return e.BEFORE_UNLOAD=`beforeunload`,e.CLICK=`click`,e.DBL_CLICK=`dblclick`,e.KEY_DOWN=`keydown`,e.LOAD=`load`,e.POP_STATE=`popstate`,e.SCROLL=`scroll`,e.TOUCH_START=`touchstart`,e.TOUCH_END=`touchend`,e.TOUCH_MOVE=`touchmove`,e.VISIBILITY_CHANGE=`visibilitychange`,e.PAGE_SHOW=`pageshow`,e.FREEZE=`freeze`,e.RESUME=`resume`,e.DOM_CONTENT_LOADED=`DOMContentLoaded`,e.POINTER_DOWN=`pointerdown`,e.POINTER_UP=`pointerup`,e.POINTER_CANCEL=`pointercancel`,e.HASH_CHANGE=`hashchange`,e.PAGE_HIDE=`pagehide`,e.MOUSE_DOWN=`mousedown`,e.MOUSE_UP=`mouseup`,e.MOUSE_MOVE=`mousemove`,e.FOCUS=`focus`,e.BLUR=`blur`,e.CONTEXT_MENU=`contextmenu`,e.RESIZE=`resize`,e.CHANGE=`change`,e.INPUT=`input`,e.PLAY=`play`,e.PAUSE=`pause`,e.SECURITY_POLICY_VIOLATION=`securitypolicyviolation`,e.SELECTION_CHANGE=`selectionchange`,e.STORAGE=`storage`,e.UNHANDLED_REJECTION=`unhandledrejection`,e}({});function B(e,t,n,r){return mn(e,[t],n,r)}function mn(e,t,n,{once:r,capture:i,passive:a}={}){let o=w(e=>{!e.isTrusted&&!e.__ddIsTrusted&&gn===!1||(r&&u(),n(e))}),s=a?{capture:i,passive:a}:i,c=window.EventTarget&&e instanceof EventTarget?window.EventTarget.prototype:e,l=Pt(c,`addEventListener`);t.forEach(t=>l.call(e,t,o,s));function u(){let n=Pt(c,`removeEventListener`);t.forEach(t=>n.call(e,t,o,s))}return{stop:u}}function hn(e,t){if(!e)return!1;try{return B(e,t,L).stop(),!0}catch{return!1}}var gn;function _n(e){gn!==!0&&(gn=e??!1)}var vn=1024,yn=1024*vn,bn=/[^\u0000-\u007F]/;function xn(e){return bn.test(e)?new TextEncoder().encode(e).length:e.length}function Sn(e){if(e.length===1)return e[0];let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Cn(e,t,n){if(typeof e!=`object`||!e)return JSON.stringify(e);let r=wn(Object.prototype),i=wn(Array.prototype),a=wn(Object.getPrototypeOf(e)),o=wn(e);try{return JSON.stringify(e,t,n)}catch{return`<error: unable to serialize object>`}finally{r(),i(),a(),o()}}function wn(e){let t=e,n=t.toJSON;return n?(delete t.toJSON,()=>{t.toJSON=n}):L}var Tn=220*vn,En=`$`,Dn=3;function V(e,t=Tn){let n=wn(Object.prototype),r=wn(Array.prototype);try{let n=[],r=new WeakMap,i=On(e,En,void 0,n,r),a=JSON.stringify(i),o=a?a.length:0;if(o>t){Nn(t,`discarded`,e);return}for(;n.length>0&&o<t;){let i=n.shift(),a=0;if(Array.isArray(i.source))for(let s=0;s<i.source.length;s++){let c=On(i.source[s],i.path,s,n,r);if(o+=c===void 0?4:JSON.stringify(c).length,o+=a,a=1,o>t){Nn(t,`truncated`,e);break}i.target[s]=c}else for(let s in i.source)if(Object.prototype.hasOwnProperty.call(i.source,s)){let c=On(i.source[s],i.path,s,n,r);if(c!==void 0&&(o+=JSON.stringify(c).length+a+s.length+Dn,a=1),o>t){Nn(t,`truncated`,e);break}i.target[s]=c}}return i}finally{n(),r()}}function On(e,t,n,r,i){let a=Mn(e);if(!a||typeof a!=`object`)return kn(a);let o=An(a);if(o!==`[Object]`&&o!==`[Array]`&&o!==`[Error]`)return o;let s=e;if(i.has(s))return`[Reference seen at ${i.get(s)}]`;let c=n===void 0?t:`${t}.${n}`,l=Array.isArray(a)?[]:{};return i.set(s,c),r.push({source:a,target:l,path:c}),l}function kn(e){return typeof e==`bigint`?`[BigInt] ${e.toString()}`:typeof e==`function`?`[Function] ${e.name||`unknown`}`:typeof e==`symbol`?`[Symbol] ${e.description||e.toString()}`:e}function An(e){try{if(e instanceof Event)return jn(e);if(e instanceof RegExp)return`[RegExp] ${e.toString()}`;let t=Object.prototype.toString.call(e).match(/\[object (.*)\]/);if(t?.[1])return`[${t[1]}]`}catch{}return`[Unserializable]`}function jn(e){return{type:e.type,isTrusted:e.isTrusted,currentTarget:e.currentTarget?An(e.currentTarget):null,target:e.target?An(e.target):null}}function Mn(e){if((typeof e!=`object`||!e)&&typeof e!=`function`)return e;let t=e;if(typeof t.toJSON==`function`)try{return t.toJSON()}catch{}return e}function Nn(e,t,n){C.warn(`The data provided has been ${t} as it is over the limit of ${e} characters:`,n)}var Pn=`No stack, consider using an instance of Error`;function Fn(e){try{return e instanceof Error||Object.prototype.toString.call(e)===`[object Error]`}catch{return!1}}function In(e){let{env:t,service:n,version:r,datacenter:i,sdkVersion:a,variant:o}=e,s=[Ln(`sdk_version`,a??`7.12.0`)];return t&&s.push(Ln(`env`,t)),n&&s.push(Ln(`service`,n)),r&&s.push(Ln(`version`,r)),i&&s.push(Ln(`datacenter`,i)),o&&s.push(Ln(`variant`,o)),s}function Ln(e,t){let n=t?`${e}:${t}`:e;return(n.length>200||zn(n))&&C.warn(`Tag ${n} doesn't meet tag requirements and will be sanitized. ${h} ${m}/getting_started/tagging/#defining-tags`),Rn(n)}function Rn(e){return e.replace(/,/g,`_`)}function zn(e){return RegExp(`[^\\p{Ll}\\p{Lo}0-9_:./-]`,`u`).test(e)}function Bn(e,t){let n=b.__ddBrowserSdkExtensionCallback;n&&n({type:e,payload:t})}var Vn={AGENT:`agent`,CONSOLE:`console`,CUSTOM:`custom`,LOGGER:`logger`,NETWORK:`network`,SOURCE:`source`,REPORT:`report`},Hn=function(e){return e.UNCAUGHT=`Uncaught`,e.PROVIDED=`Provided`,e}({}),Un=function(e){return e.HANDLED=`handled`,e.UNHANDLED=`unhandled`,e}({});function Wn(){let{navigator:e}=b;return{status:e?.onLine?`connected`:`not_connected`,interfaces:e?.connection?.type?[e.connection.type]:void 0,effective_type:e?.connection?.effectiveType}}function Gn(e,t){return Pt(b,`fetch`)(e,t)}function Kn(e){return e>=500}function qn(e){try{return e.clone()}catch{return}}var Jn=80*vn,Yn=20*yn,Xn=O,Zn=D;function Qn(e,t,n,r,i,a){t.transportStatus===0&&t.queuedPayloads.size()===0&&t.bandwidthMonitor.canHandle(e)?er(e,t,n,a,{onSuccess:()=>tr(0,t,n,r,i,a),onFailure:()=>{t.queuedPayloads.enqueue(e)||a.notify({type:`queue-full`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),$n(t,n,r,i,a)}}):t.queuedPayloads.enqueue(e)||a.notify({type:`queue-full`,bandwidth:t.bandwidthMonitor.stats(),payload:e})}function $n(e,t,n,r,i){e.transportStatus===2&&F(()=>{er(e.queuedPayloads.first(),e,t,i,{onSuccess:()=>{e.queuedPayloads.dequeue(),e.currentBackoffTime=Zn,tr(1,e,t,n,r,i)},onFailure:()=>{e.currentBackoffTime=Math.min(Xn,e.currentBackoffTime*2),$n(e,t,n,r,i)}})},e.currentBackoffTime)}function er(e,t,n,r,{onSuccess:i,onFailure:a}){t.bandwidthMonitor.add(e),n(e,n=>{t.bandwidthMonitor.remove(e),nr(n)?(t.transportStatus=t.bandwidthMonitor.ongoingRequestCount>0?1:2,e.retry={count:e.retry?e.retry.count+1:1,lastFailureStatus:n.status},r.notify({type:`failure`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),a()):(t.transportStatus=0,r.notify({type:`success`,bandwidth:t.bandwidthMonitor.stats(),payload:e}),i())})}function tr(e,t,n,r,i,a){e===0&&t.queuedPayloads.isFull()&&!t.queueFullReported&&(i(`Reached max ${r} events size queued for upload: ${Yn/yn}MiB`),t.queueFullReported=!0);let o=t.queuedPayloads;for(t.queuedPayloads=ir();o.size()>0;)Qn(o.dequeue(),t,n,r,i,a)}function nr(e){return e.type!==`opaque`&&(e.status===0&&!navigator.onLine||e.status===408||e.status===429||Kn(e.status))}function rr(){return{transportStatus:0,currentBackoffTime:Zn,bandwidthMonitor:ar(),queuedPayloads:ir(),queueFullReported:!1}}function ir(){let e=[];return{bytesCount:0,enqueue(t){return!this.isFull()&&(e.push(t),this.bytesCount+=t.bytesCount,!0)},first(){return e[0]},dequeue(){let t=e.shift();return t&&(this.bytesCount-=t.bytesCount),t},size(){return e.length},isFull(){return this.bytesCount>=Yn}}}function ar(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle(e){return this.ongoingRequestCount===0||this.ongoingByteCount+e.bytesCount<=Jn&&this.ongoingRequestCount<32},add(e){this.ongoingRequestCount+=1,this.ongoingByteCount+=e.bytesCount},remove(e){--this.ongoingRequestCount,this.ongoingByteCount-=e.bytesCount},stats(){return{ongoingByteCount:this.ongoingByteCount,ongoingRequestCount:this.ongoingRequestCount}}}}var or=16*vn;function sr(e,t,n=or){let r=new E,i=rr();return{observable:r,send:n=>{for(let a of e)Qn(n,i,(e,t)=>{dr(a,e,t)},a.trackType,t,r)},sendOnExit:t=>{for(let r of e)cr(r,n,t)}}}function cr(e,t,n){if(n.bytesCount<t)try{let t=e.build(`beacon`,n);if(navigator.sendBeacon(t,n.data))return}catch(e){ur(e)}dr(e,n)}var lr=!1;function ur(e){lr||(lr=!0,T(e))}function dr(e,t,n){Gn(e.build(`fetch`,t),{method:`POST`,body:t.data,mode:`cors`}).then(w(e=>n?.({status:e.status,type:e.type}))).catch(w(()=>n?.({status:0})))}var fr=function(e){return e.RECORDS=`records`,e.PROFILES=`profiles`,e}({});function pr(){let e=_r();if(e)return{getCapabilities(){return JSON.parse(e.getCapabilities?.()||`[]`)},getPrivacyLevel(){return e.getPrivacyLevel?.()},getIsTraceSampled(){return JSON.parse(e.getIsTraceSampled?.()||`null`)},getAllowedWebViewHosts(){return JSON.parse(e.getAllowedWebViewHosts())},send(t,n,r){let i=r?{id:r}:void 0;e.send(JSON.stringify({eventType:t,event:n,view:i}))}}}function mr(e){let t=pr();return!!t&&t.getCapabilities().includes(e)}function hr(e=b.location?.hostname){return pr()?.getAllowedWebViewHosts().some(t=>gr(e,t))??!1}function gr(e,t){if(!t.includes(`*`))return e===t||e.endsWith(`.${t}`);let n=t.split(`*`);if(n.length!==2)return C.error(`Invalid WebView host pattern "${t}": only one wildcard (*) is supported.`),!1;let[r,i]=n;return e.length>r.length+i.length&&e.startsWith(r)&&e.endsWith(i)}function _r(){return b.DatadogEventBridge}function vr(e,t){for(let n=e.length-1;n>=0;--n){let r=e[n];if(t(r,n,e))return r}}function yr(e){return Object.values(e)}function br(e){return Object.entries(e)}var xr={HIDDEN:`visibility_hidden`,UNLOADING:`before_unload`,PAGEHIDE:`page_hide`,FROZEN:`page_frozen`};function Sr(){return new E(e=>{let t=b.window;if(!t)return;let{stop:n}=mn(t,[`visibilitychange`,`freeze`],t=>{t.type===`visibilitychange`&&document.visibilityState===`hidden`?e.notify({reason:xr.HIDDEN}):t.type===`freeze`&&e.notify({reason:xr.FROZEN})},{capture:!0}),r=B(t,`beforeunload`,()=>{e.notify({reason:xr.UNLOADING})}).stop;return()=>{n(),r()}})}function Cr(e){return yr(xr).includes(e)}function wr(){let e=``,t=0;return{isAsync:!1,get isEmpty(){return!e},write(n,r){let i=xn(n);t+=i,e+=n,r&&r(i)},finish(e){e(this.finishSync())},finishSync(){let n={output:e,outputBytesCount:t,rawBytesCount:t,pendingData:``};return e=``,t=0,n},estimateEncodedBytesCount(e){return e.length}}}var Tr=30*D,Er=x?1:50;function Dr({pageMayExitObservable:e}){let t,n=new E,r=e.subscribe(e=>{t=e.reason;try{n.notify(e.reason)}finally{t=void 0}s(e.reason)}),i=new E(()=>()=>{r.unsubscribe()}),a=0,o=0;function s(e){if(o===0)return;let t=o,n=a;o=0,a=0,u(),i.notify({reason:e,messagesCount:t,bytesCount:n})}let c;function l(){c===void 0&&(c=F(()=>{s(`duration_limit`)},Tr))}function u(){I(c),c=void 0}return{flushObservable:i,prepareUrgentFlushObservable:n,forceFlush:s,get messagesCount(){return o},notifyBeforeAddMessage(e){a+e>=or&&s(t??`bytes_limit`),o+=1,a+=e,l()},notifyAfterAddMessage(e=0){a+=e,o>=Er?s(t??`messages_limit`):a>=or&&s(t??`bytes_limit`)}}}var Or=256*vn;function kr({encoder:e=wr(),endpoints:t,reportError:n}){let r=P(sr)(t,n),i=P(Sr)(),a=P(Dr)({pageMayExitObservable:i}),o={},s=a.flushObservable.subscribe(e=>u(e));function c(t,n,r){if(r!==void 0){let i;o[r]===void 0?(a.notifyBeforeAddMessage(n),i=0):i=n-e.estimateEncodedBytesCount(o[r]),o[r]=t,a.notifyAfterAddMessage(i)}else a.notifyBeforeAddMessage(n),e.write(e.isEmpty?t:`\n${t}`,e=>{a.notifyAfterAddMessage(e-n)})}function l(t,n){let r=Cn(t),i=e.estimateEncodedBytesCount(r);if(i>=Or){C.warn(`Discarded a message whose size was bigger than the maximum allowed size ${Or/vn}KiB. ${h} ${ue}/#technical-limitations`);return}c(r,i,n)}function u(t){let n=yr(o).join(`
4
+ `);o={};let i=Cr(t.reason),a=i?r.sendOnExit:r.send;if(i&&e.isAsync){let t=e.finishSync();t.outputBytesCount&&a(Ar(t));let r=[t.pendingData,n].filter(Boolean).join(`
5
+ `);r&&a({data:r,bytesCount:xn(r)})}else n&&e.write(e.isEmpty?n:`\n${n}`),e.finish(e=>{a(Ar(e))})}return{get isEmpty(){return a.messagesCount===0},add:l,upsert:l,prepareUrgentFlushObservable:a.prepareUrgentFlushObservable,forceFlush:a.forceFlush,flushObservable:a.flushObservable,stop:s.unsubscribe}}function Ar(e){let t;return t=typeof e.output==`string`?e.output:new Blob([e.output],{type:`text/plain`}),{data:t,bytesCount:e.outputBytesCount,encoding:e.encoding}}var jr={LOG:`log`,CONFIGURATION:`configuration`,USAGE:`usage`};function Mr(){let e=[];return{register(t){return e.push(t),{unregister(){e=e.filter(e=>e!==t)}}},trigger(t){let n=[];for(let r of e){let e=r(t);if(e===`DISCARDED`)return Nr;e!==`SKIPPED`&&n.push(e)}return f(...n)}}}var Nr=`DISCARDED`,Pr=`SKIPPED`;function Fr(e){return e!==0&&Math.random()*100<=e}var Ir=[`https://www.datadoghq-browser-agent.com`,`https://www.datad0g-browser-agent.com`,`https://d3uc069fcn7uxw.cloudfront.net`,`https://d20xtzwzcl0ceb.cloudfront.net`,`http://localhost`,`<anonymous>`],Lr=function(e){return e.LOGS=`browser-logs-sdk`,e.RUM=`browser-rum-sdk`,e}({}),Rr=function(e){return e.CUSTOMER_DATA_METRIC_NAME=`Customer data measures`,e.REMOTE_CONFIGURATION_METRIC_NAME=`remote configuration metrics`,e.RECORDER_INIT_METRICS_TELEMETRY_NAME=`Recorder init metrics`,e.SEGMENT_METRICS_TELEMETRY_NAME=`Segment network request metrics`,e.SESSION_MANAGER_INIT_METRICS_TELEMETRY_NAME=`Session manager init metrics`,e}({}),zr=1,Br=[we,Te],Vr=15,Hr;function Ur(){return Hr||=new ve(100),Hr}function Wr(e,t,n,r){let i=new E,{enabled:a,metricsEnabled:o}=Gr(e,t,n,i,r),{stop:s}=Kr(t,i);return{stop:s,enabled:a,metricsEnabled:o}}function Gr(e,t,n,r,i,a=zr,o=Vr){let s={},c=!Br.includes(t.site)&&Fr(t.telemetrySampleRate),l={[jr.LOG]:c,[jr.CONFIGURATION]:c&&Fr(t.telemetryConfigurationSampleRate),[jr.USAGE]:c&&Fr(t.telemetryUsageSampleRate),metric:c&&Fr(a)},u=qr(),d=Ur();return d.subscribe(({rawEvent:t,metricName:i})=>{if(i&&!l.metric||!l[t.type])return;let a=i||t.status||t.type,c=s[a];if(c||=s[a]=new Set,c.size>=o)return;let d=Cn(t);if(c.has(d))return;let f=n.trigger({startTime:M().relative});if(f===`DISCARDED`)return;let m=p(f,e,t,u);r.notify(m),Bn(`telemetry`,m),c.add(d)}),d.unbuffer(),he(Xr),{enabled:c,metricsEnabled:l.metric};function p(e,n,r,a){return f({type:`telemetry`,date:M().timeStamp,service:n,version:`7.12.0`,source:`browser`,_dd:{format_version:2},telemetry:f(r,{runtime_env:a,connectivity:Wn(),sdk_setup:`npm`,sdk_name:i}),ddtags:In(t).join(`,`),experimental_features:Array.from(Nt())},e)}}function Kr(e,t){let n=[];if(hr()){let e=pr(),r=t.subscribe(t=>e.send(`internal_telemetry`,t));n.push(r.unsubscribe)}else{let r=[Ue(e,`rum`)],i=We(e,`rum`);i&&Jr(e)&&r.push(i);let a=kr({endpoints:r,reportError:L});n.push(a.stop);let o=t.subscribe(a.add);n.push(o.unsubscribe)}return{stop:()=>n.forEach(e=>e())}}function qr(){return{is_local_file:b.location?.protocol===`file:`,is_worker:x}}function Jr(e){return e.site===xe}function Yr(e,t){ne()&&C.debug(`[Telemetry]`,e,t),Ur().notify({rawEvent:{type:jr.LOG,message:e,status:`debug`,...t}})}function Xr(e,t){Ur().notify({rawEvent:{type:jr.LOG,status:`error`,...$r(e),...t}})}function Zr(e){Ur().notify({rawEvent:{type:jr.CONFIGURATION,configuration:e}})}function Qr(e,t){Ur().notify({rawEvent:{type:jr.LOG,message:e,status:`debug`,...t},metricName:e})}function H(e){Ur().notify({rawEvent:{type:jr.USAGE,usage:e}})}function $r(e){if(Fn(e)){let t=zt(e);return{error:{kind:t.name,stack:sn(ei(t))},message:t.message}}return{error:{stack:Pn},message:`Uncaught ${Cn(e)}`}}function ei(e){return e.stack=e.stack.filter(e=>!e.url||Ir.some(t=>e.url.startsWith(t))),e}var ti=new Map,ni=new Set,ri=!1;function ii(){let e=b.window?.DD_SOURCE_CODE_CONTEXT;if(!e)return;let t=!1,n=!1,r=!1;for(let[i,a]of Object.entries(e)){if(t||=a.ddDebugId!==void 0,n||=a.service!==void 0,r||=a.version!==void 0,ni.has(i))continue;ni.add(i);let e=zt({stack:i}).stack[0]?.url;e&&!ti.has(e)&&ti.set(e,a)}ri||(ri=!0,H({feature:`source-code-context`,use_debug_id:t,use_service:n,use_version:r}))}function ai(e){ii();let t=new Set,n=[];for(let r of e){if(t.has(r))continue;t.add(r);let e=ti.get(r)?.ddDebugId;e!==void 0&&n.push({url:r,id:e})}return n.length?n:void 0}function oi(e){return ii(),ti.get(e)}function si({originalError:e,stackTrace:t,source:n,useFallbackStack:r=!0,nonErrorPrefix:i}){let a=Fn(e);return{source:n,type:t?t.name:void 0,message:fi(t,a,i,e),stack:t?sn(t):r?Pn:void 0}}function ci(e){return e?.stack.map(e=>e.url).filter(e=>!!e)??[]}function li(e,t){let n=t.flatMap(({stackTrace:e})=>ci(e));return ai(ci(e).concat(n))}function ui(e){let t=[],n=e.cause;for(;n!=null&&t.length<10;){let e=Fn(n),r=e?zt(n):void 0;t.push({originalError:n,stackTrace:r}),n=e?n.cause:void 0}return t}function di({stackTrace:e,originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:a,useFallbackStack:o=!0,source:s,handling:c}){let l=e??(Fn(t)?zt(t):void 0),u=Fn(t)?ui(t):[],d=si({originalError:t,stackTrace:l,source:s,useFallbackStack:o,nonErrorPrefix:a}),f=u.map(({originalError:e,stackTrace:t})=>si({originalError:e,stackTrace:t,source:s,useFallbackStack:!1}));return{startClocks:i,handling:c,handlingStack:n,componentStack:r,originalError:t,...d,debugIds:li(l,u),causes:f.length?f:void 0,fingerprint:pi(t),context:mi(t)}}function fi(e,t,n,r){return e?.message&&e?.name?e.message:t?`Empty message`:n?`${n} ${Cn(V(r))}`:Cn(V(r))}function pi(e){return Fn(e)&&`dd_fingerprint`in e?String(e.dd_fingerprint):void 0}function mi(e){if(o(e))return e.dd_context}function hi(){return new E(e=>{let t=(t,n)=>{let r=di({stackTrace:n,originalError:t,startClocks:M(),nonErrorPrefix:`Uncaught`,source:Vn.SOURCE,handling:`unhandled`});e.notify(r)},{stop:n}=gi(t),{stop:r}=_i(t);return()=>{n(),r()}})}function gi(e){return R(b,`onerror`,({parameters:[t,n,r,i,a]})=>{let o;Fn(a)||(o=$t(t,n,r,i)),e(a??t,o)})}function _i(e){return hn(b.window,`unhandledrejection`)?R(b,`onunhandledrejection`,({parameters:[t]})=>{e(t.reason||`Empty reason`)}):{stop:L}}function vi(e,t){return(...n)=>{try{return e(...n)}catch(e){C.error(t,e)}}}function yi(e){let t={version:`7.12.0`,onReady(e){e()},...e};return Object.defineProperty(t,"_setDebug",{get(){return te},enumerable:!1}),t}function bi(e,t,n){let r=e[t];r&&!r.q&&r.version&&C.warn(`SDK is loaded more than once. This is unsupported and might have unexpected behavior.`),e[t]=n,r?.q&&r.q.forEach(e=>vi(e,`onReady callback threw an error:`)())}function xi(e,t){t.silentMultipleInit||C.error(`${e} is already initialized.`)}var Si={intervention:`intervention`,deprecation:`deprecation`,cspViolation:`csp_violation`};function Ci(e){let t=[];e.includes(Si.cspViolation)&&t.push(Ti());let n=e.filter(e=>e!==Si.cspViolation);return n.length&&t.push(wi(n)),_e(...t)}function wi(e){return new E(t=>{if(!window.ReportingObserver)return;let n=w((e,n)=>e.forEach(e=>t.notify(Ei(e)))),r=new window.ReportingObserver(n,{types:e,buffered:!0});return r.observe(),()=>{r.disconnect()}})}function Ti(){return new E(e=>{if(!hn(document,`securitypolicyviolation`))return;let{stop:t}=B(document,`securitypolicyviolation`,t=>{e.notify(Di(t))});return t})}function Ei(e){let{type:t,body:n}=e;return Oi({type:n.id,message:`${t}: ${n.message}`,originalError:e,stack:ki(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber),debugIds:n.sourceFile?ai([n.sourceFile]):void 0})}function Di(e){let t=`'${e.blockedURI}' blocked by '${e.effectiveDirective}' directive`;return Oi({type:e.effectiveDirective,message:`${Si.cspViolation}: ${t}`,originalError:e,csp:{disposition:e.disposition},stack:ki(e.effectiveDirective,e.originalPolicy?`${t} of the policy "${nt(e.originalPolicy,100,`...`)}"`:`no policy`,e.sourceFile,e.lineNumber,e.columnNumber),debugIds:e.sourceFile?ai([e.sourceFile]):void 0})}function Oi(e){return{startClocks:M(),source:Vn.REPORT,handling:`unhandled`,...e}}function ki(e,t,n,r,i){return n?sn({name:e,message:t,stack:[{func:`?`,url:n,line:r??void 0,column:i??void 0}]}):void 0}function Ai(e,t){let n=e.indexOf(t);n>=0&&e.splice(n,1)}function ji(e){return Array.isArray(e)&&e.length>0}var Mi=1/0,Ni=O,Pi,Fi=new Set;function Ii(){Fi.forEach(e=>e())}function Li({expireDelay:e,maxEntries:t}){let n=[],r=()=>{if(!e)return;let t=Me()-e;for(;n.length>0&&n[n.length-1].endTime<t;)n.pop()};e&&(Pi||=Ft(()=>Ii(),Ni),Fi.add(r));function i(e,r){let i={value:e,startTime:r,endTime:Mi,remove:()=>{Ai(n,i)},close:e=>{i.endTime=e}};return t&&n.length>=t&&n.pop(),n.unshift(i),i}function a(e=Mi,t={returnInactive:!1}){for(let r of n)if(r.startTime<=e){if(t.returnInactive||e<=r.endTime)return r.value;break}}function o(e){let t=n[0];t?.endTime===Mi&&t.close(e)}function s(e=Mi,t=0){let r=je(e,t);return n.filter(t=>t.startTime<=r&&e<=t.endTime).map(e=>e.value)}function c(e=Mi,t=0){let r=je(e,t);return n.filter(t=>t.startTime<=r&&e<=t.endTime)}function l(e){return n.filter(t=>t.startTime===e)}function u(){n=[]}function d(){Fi.delete(r),Fi.size===0&&Pi&&(It(Pi),Pi=void 0)}return{add:i,find:a,closeActive:o,findAll:s,findAllEntries:c,getEntries:l,reset:u,stop:d}}function Ri(e,t){return e*t/100}var zi=new Map;function Bi(e,t){if(t===100)return!0;if(t===0)return!1;let n=zi.get(t);if(e===n?.sessionId)return n.decision;let r=Vi(BigInt(`0x${e.split(`-`)[4]}`),t);return zi.set(t,{sessionId:e,decision:r}),r}function Vi(e,t){let n=1n<<64n,r=e*1111111111111111111n%n;return Number(r)<=t/100*Number(n)}var Hi=4*Oe,Ui=15*O,Wi=ke,Gi={COOKIE:`cookie`,MEMORY:`memory`,LOCAL_STORAGE:`local-storage`},Ki=`dd_cookie_test_`;async function qi(e,t){let n=`${Ki}${N()}`,r=`test`,i=e(n,t);try{return await i.getAllAndSet(()=>({value:r,expireDelay:O})),(await i.getAll()).includes(r)}catch(e){return C.error(e),!1}finally{try{await i.delete()}catch{}}}function Ji(e,t){let n=P(b.cookieStore),r=new E(()=>B(n,`change`,t=>{(t.changed.some(t=>t.name===e)||t.deleted.some(t=>t.name===e))&&r.notify()}).stop);return{async getAll(){return(await n.getAll(e)).map(e=>e.value)},delete(){return n.delete({name:e,domain:t.domain,path:`/`,partitioned:t.partitioned})},async getAllAndSet(r){let i=await n.getAll(e),{value:a,expireDelay:o}=r(i.map(e=>e.value));try{await n.set({name:e,value:a,expires:Ae()+o,path:`/`,sameSite:t.crossSite?`none`:`strict`,domain:t.domain,secure:t.secure,partitioned:t.partitioned})}catch(n){if(!e.startsWith(`dd_cookie_test_`)){let r=st(e);Yr(`Failed to set cookie using Cookie Store API`,{"error.message":n.message,newValue:a,cookieOptions:{...t},cookies:i.map(e=>({...e})),cookieCount:i.length,documentCookies:r})}}},observable:r}}var Yi=D;function Xi(e,t){let n=st(e),r=new E(()=>{let t=Ft(()=>{i(st(e))},Yi);return()=>{It(t)}});function i(e){String(e)!==String(n)&&(n=e,r.notify())}return{getAll(){return Promise.resolve(st(e))},async getAllAndSet(n){let{value:r,expireDelay:a}=n(st(e));at(e,r,a,t),await Promise.resolve(),i([r])},async delete(){ut(e,t),await Promise.resolve(),i([])},observable:r}}function Zi(){let e=P(b.cookieStore);return!!(e&&hn(e,`change`))}var Qi=`_dd_s_v2`,$i=`_dd_s`,ea=`_DD_SESSION`;function ta(){return{type:Gi.MEMORY}}function na(){let e=b;e._DD_SESSION||(e[ea]={});let t=e[ea],n=new E,r=t.onChange;return t.onChange=e=>{r?.(e),n.notify(e)},{async setSessionState(e,n){let r=wt(e(t.state??{}));t.state=r,await Promise.resolve(),t.onChange?.(r)},sessionObservable:n}}var ra=/^([a-zA-Z]+)=([a-z0-9-]+)$/;function ia(e){return!!e&&(e.indexOf(`&`)!==-1||ra.test(e))}function aa(e){return e.created?Number(e.created):void 0}function oa(e){let t=e.expire&&Number(e.expire),n=aa(e);if(t&&n)return Math.min(t,n+Hi)}function sa(e,t){let n={isExpired:`1`};return t.trackAnonymousUser&&e?.anonymousId&&(n.anonymousId=e?.anonymousId),n}function ca(e){return Et(e)}function la(e){return e.isExpired!==void 0||!ua(e)}function ua(e){let t=oa(e);return t?Ae()<t:!1}function da(e){e.expire=String(Ae()+Ui)}function fa(e){return br(e).map(([e,t])=>e===`anonymousId`?`aid=${t}`:`${e}=${t}`).join(`&`)}function pa(e){let t={};return ia(e)&&e.split(`&`).forEach(e=>{let n=ra.exec(e);if(n!==null){let[,e,r]=n;e===`aid`?t.anonymousId=r:t[e]=r}}),t}function ma(e,t){return ca(e)?(t.trackAnonymousUser&&(e.anonymousId=N()),sa(e,t)):e}function ha(e,t){if(ca(e))return e;let n=e;return la(e)&&(n=sa(e,t)),n.id||(n.id=N(),n.created=String(Ae())),t.trackAnonymousUser&&!n.anonymousId&&(n.anonymousId=N()),delete n.isExpired,da(n),n}function ga(e){return la(e)||ca(e)||!e.id||da(e),e}async function _a(e){let t=mt(e);if(t){if(Zi()&&await qi(Ji,t))return{type:Gi.COOKIE,cookieOptions:t,cookieApi:1};if(await qi(Xi,t))return{type:Gi.COOKIE,cookieOptions:t,cookieApi:0}}}var va;function ya(e,t){let{cookieOptions:n,cookieApi:r}=e,i=new E,a=!!t.trackAnonymousUser,o=wa(n),s=P(xa)(r,n),c=!0;s.observable.subscribe(()=>{s.getAll().then(e=>{i.notify(Sa(e,o))}).catch(e=>T(Error(`Error while reading session cookies on change: ${e}`)))});function l(e){return s.getAllAndSet(t=>{let r=Sa(t,o);return c&&Et(r)&&(r=Sa(st($i),o)),c=!1,{value:Ca(e(r),n),expireDelay:a?Wi:Hi}})}return{async setSessionState(e,t){typeof navigator<`u`&&navigator.locks?await navigator.locks.request(Qi,()=>l(e)).catch(e=>{if(!ba(e))throw e}):(va=(va??Promise.resolve()).then(()=>l(e)),await va)},sessionObservable:i}}function ba(e){return e instanceof Error?e.name===`AbortError`||e.message.includes(`no longer runnable`):!1}function xa(e,t){return e===1?Ji(Qi,t):Xi(Qi,t)}function Sa(e,t){let n;for(let r of e.slice().reverse())if(n=pa(r),n.c===t)break;return delete n?.c,n??{}}function Ca(e,t){return fa(Et(e)?e:{...e,c:wa(t)})}function wa(e){let t=e.domain?e.domain.split(`.`).length-1:0,n=0;return n|=0,n|=t<<1,n|=+!!e.crossSite,n.toString(16)}var Ta=`_dd_test_`;function Ea(){try{let e=N(),t=`${Ta}${e}`;localStorage.setItem(t,e);let n=localStorage.getItem(t);return localStorage.removeItem(t),e===n?{type:Gi.LOCAL_STORAGE}:void 0}catch{return}}function Da(){let e=new E(e=>B(window,`storage`,t=>{t.key===`_dd_s_v2`&&t.storageArea===localStorage&&e.notify(pa(t.newValue))}).stop),t=!0;return{async setSessionState(n,r){let i=pa(localStorage.getItem(Qi));t&&ca(i)&&(i=pa(localStorage.getItem($i))),t=!1;let a=n(i);localStorage.setItem(Qi,fa(a)),await Promise.resolve(),e.notify(a)},sessionObservable:e}}async function Oa(e){let t=ka(e.sessionPersistence);for(let n of t){let t=await Aa(n,e);if(t!==void 0)return t}}function ka(e){return e===void 0?x?[Gi.MEMORY]:[Gi.COOKIE]:e}function Aa(e,t){switch(e){case Gi.COOKIE:return _a(t);case Gi.LOCAL_STORAGE:return Ea();case Gi.MEMORY:return ta();default:C.error(`Invalid session persistence '${String(e)}'`);return}}function ja(e,t){switch(e.type){case Gi.COOKIE:return ya(e,t);case Gi.LOCAL_STORAGE:return Da();case Gi.MEMORY:return na()}}var Ma=O,Na=1e3,Pa=Oe*12,Fa=[];async function Ia(e,t){let n=Me(),r=new E,i=new E,a=await P(Oa)(e);if(!a){C.warn(`No storage available for session. We will not send any data.`);return}let o=P(ja)(a,e),s=Li({maxEntries:Na});Fa.push(()=>s.stop());let c=!1,{throttled:l,cancel:u}=Lt(()=>{c=!1,o.setSessionState(t=>ha(t,e),`expandOrRenewOnActivity`).catch(T)},D);Fa.push(u);let d;Fa.push(()=>I(d));let f=!1;Fa.push(()=>{f=!0});let p=await m().catch(e=>T(Error(`Error while resolving initial session state: ${e}`)));if(!p||f)return;for(;!t.isGranted();)if(y(),await new Promise(e=>t.onGrantedOnce(e)),f||(p=await m().catch(T),!p||f))return;return s.add(te(p),Ne().relative),g(p),h(),_(),Qr(`Session manager init metrics`,{metrics:{duration:A(n,Me())}}),v();async function m(){let t={};return await o.setSessionState(n=>(t=ha(ma(n,e),e),t),`initialize`),t}function h(){let e=o.sessionObservable.subscribe(e=>{g(e),ee(e)});Fa.push(()=>e.unsubscribe())}function g(n){I(d);let r=oa(n);r&&(d=F(()=>{o.setSessionState(n=>la(n)?(t.isGranted()||delete n.anonymousId,sa(n,e)):n,`expireOnTimeout`).catch(T)},r-Ae()))}function _(){t.observable.subscribe(()=>{t.isGranted()?(c=!1,o.setSessionState(t=>ha(t,e),`expandOrRenewOnConsent`).catch(T)):y()}),x||(Ra(()=>{t.isGranted()&&l()}),za(()=>{c||o.setSessionState(e=>ga(e),`expandOnVisibility`).catch(T)}),Ba(()=>{o.setSessionState(t=>ma(t,e),`initializeOnResume`).catch(T)}))}function v(){return{findSession:(e,t)=>s.find(e,t),findTrackedSession:(t,{returnInactive:n=!1,maxAge:r=Pa}={})=>{let i=s.find(t,{returnInactive:n});if(!(!i||i.id===`invalid`||!Bi(i.id,e.sessionSampleRate))&&!(Ae()-i.createdAt>r))return i},renewObservable:r,expireObservable:i,expire:y,updateSessionState:e=>{o.setSessionState(t=>({...t,...e}),`updateState`).catch(T)}}}function ee(e){let t=s.find(),n=t?.id!==void 0,a=e.id!==void 0,o=n&&a&&t.id!==e.id;if(n&&(!a||o)&&(c=!0,i.notify(),s.closeActive(Me())),a&&(!n||o)){if(c)return;s.add(te(e),Me()),r.notify()}else n&&a&&!o&&(t.isReplayForced=!!e.forcedReplay)}function y(){u();let n=sa(s.find(),e);t.isGranted()||delete n.anonymousId,ee(n),o.setSessionState(n=>(t.isGranted()||delete n.anonymousId,sa(n,e)),`expire`).catch(T)}function te(e){let t=aa(e)??k();return e.id?{id:e.id,isReplayForced:!!e.forcedReplay,anonymousId:e.anonymousId,createdAt:t}:{id:`invalid`,isReplayForced:!1,anonymousId:void 0,createdAt:t}}}function La(){let e={id:N(),isReplayForced:!1,anonymousId:void 0,createdAt:k()};return Promise.resolve({findSession:()=>e,findTrackedSession:()=>e,renewObservable:new E,expireObservable:new E,expire:L,updateSessionState:t=>{e={...e,...t}}})}function Ra(e){let{stop:t}=mn(window,[`click`,`touchstart`,`keydown`,`scroll`],e,{capture:!0,passive:!0});Fa.push(t)}function za(e){let t=()=>{document.visibilityState===`visible`&&e()},{stop:n}=B(document,`visibilitychange`,t);Fa.push(n);let r=Ft(t,Ma);Fa.push(()=>{It(r)})}function Ba(e){let{stop:t}=B(window,`resume`,e,{capture:!0});Fa.push(t)}var Va=class{constructor(){this.callbacks={}}notify(e,t){let n=this.callbacks[e];n&&n.forEach(e=>e(t))}subscribe(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),{unsubscribe:()=>{this.callbacks[e]=this.callbacks[e].filter(e=>t!==e)}}}},Ha=3e3;function Ua(e,t,n=Ha){let r=0,i=!1;return{isLimitReached(){if(r===0&&F(()=>{r=0},O),r+=1,r<=n||i)return i=!1,!1;if(r===n+1){i=!0;try{t(`Reached max number of ${e}s by minute: ${n}`)}finally{i=!1}}return!0}}}function Wa(){return Ka()===1}var Ga;function Ka(){return Ga??=qa()}function qa(e=window){let t=e.navigator.userAgent;return e.chrome||/HeadlessChrome/.test(t)?0:e.navigator.vendor?.indexOf(`Apple`)===0||/safari/i.test(t)&&!/chrome|android/i.test(t)?1:2}function Ja(e,t){return document.readyState===e||document.readyState===`complete`?(t(),{stop:L}):B(window,e===`complete`?`load`:`DOMContentLoaded`,t,{once:!0})}function Ya(e){return new Promise(t=>{Ja(e,t)})}var Xa,Za=new WeakMap;function Qa(){return Xa||=$a(),Xa}function $a(){return`XMLHttpRequest`in b?new E(e=>{let{stop:t}=R(XMLHttpRequest.prototype,`open`,eo),{stop:n}=R(XMLHttpRequest.prototype,`send`,t=>{to(t,e)},{computeHandlingStack:!0}),{stop:r}=R(XMLHttpRequest.prototype,`abort`,no);return()=>{t(),n(),r()}}):new E}function eo({target:e,parameters:[t,n]}){Za.set(e,{state:`open`,method:String(t).toUpperCase(),url:re(String(n))})}function to({target:e,parameters:[t],handlingStack:n},r){let i=Za.get(e);if(!i)return;let a=i;a.state=`start`,a.startClocks=M(),a.isAborted=!1,a.xhr=e,a.handlingStack=n,a.requestBody=t;let o=!1,{stop:s}=R(e,`onreadystatechange`,()=>{e.readyState===XMLHttpRequest.DONE&&c()}),c=()=>{if(l(),s(),o)return;o=!0;let t=i;t.duration=A(a.startClocks.timeStamp,k()),t.status=e.status,typeof e.response==`string`&&(t.responseBody=e.response),r.notify({...t,state:`complete`})},{stop:l}=B(e,`loadend`,c);r.notify(a)}function no({target:e}){let t=Za.get(e);t&&(t.isAborted=!0)}async function ro(e){let t=e.getReader(),n=[];for(;;){let e=await t.read();if(e.done)break;n.push(e.value)}return t.cancel().catch(L),Sn(n)}var io=function(e){return e[e.IGNORE=0]=`IGNORE`,e[e.COLLECT=1]=`COLLECT`,e}({}),ao,oo=[];function so({responseBodyAction:e}={}){return e&&oo.push(e),ao||=co(),ao}function co(){return new E(e=>{if(!b.fetch)return;let{stop:t}=R(b,`fetch`,t=>lo(t,e),{computeHandlingStack:!0});return t})}function lo({parameters:e,onPostCall:t,handlingStack:n},r){let[i,a]=e,o=a?.method;o===void 0&&i instanceof Request&&(o=i.method);let s=o===void 0?`GET`:String(o).toUpperCase(),c=i instanceof Request?i.url:re(String(i)),l={state:`start`,init:a,input:i,method:s,startClocks:M(),url:c,handlingStack:n,isAbortedOnStart:i instanceof Request&&i.signal?.aborted||a?.signal?.aborted||!1};r.notify(l),e[0]=l.input,e[1]=l.init,t(e=>{uo(r,e,l).catch(T)})}async function uo(e,t,n){let r=n,i;try{i=await t}catch(t){e.notify({...r,state:`resolve`,status:0,isAborted:r.init?.signal?.aborted||t instanceof DOMException&&t.code===DOMException.ABORT_ERR,error:t});return}if(r.response=i,r.status=i.status,r.responseType=i.type,r.isAborted=!1,oo.reduce((e,t)=>Math.max(e,t(r)),0)===1){let e=qn(i);if(e?.body)try{let t=await ro(e.body);r.responseBody=new TextDecoder().decode(t)}catch{}}e.notify({...r,state:`resolve`})}function fo(e){return typeof e.WebSocket==`function`}var po;function mo(){return po||=ho(),po}function ho(){return new E(e=>{if(!fo(b))return;let{stop:t}=ln(b,`WebSocket`,({parameters:t,onPostCall:n})=>{let r=Array.isArray(t[1])?[].concat(t[1]):t[1],i=M();n(t=>{e.notify({state:`connecting`,instance:t,url:t.url,protocols:r,startClocks:i}),go(t,e)})}),{stop:n}=R(b.WebSocket.prototype,`send`,({target:t,parameters:[n],onPostCall:r})=>{let i=_o(n),a=t.bufferedAmount;r(()=>{e.notify({state:`message-out`,instance:t,size:i,bufferedAmountPreSend:a,at:M()})})});return()=>{t(),n()}})}function go(e,t){let{stop:n}=B(e,`open`,()=>{t.notify({state:`open`,instance:e,openClocks:M(),protocol:e.protocol||``}),n()}),{stop:r}=B(e,`message`,n=>{t.notify({state:`message-in`,instance:e,size:_o(n.data),at:M()})}),{stop:i}=B(e,`close`,n=>{t.notify({state:`closed`,instance:e,code:n.code,reason:n.reason,wasClean:n.wasClean,at:M()}),r(),i()})}function _o(e){return typeof e==`string`?xn(e):e instanceof ArrayBuffer||ArrayBuffer.isView(e)?e.byteLength:typeof Blob<`u`&&e instanceof Blob?e.size:0}function vo(e,t){if(window.requestIdleCallback&&window.cancelIdleCallback){let n=window.requestIdleCallback(w(e),t);return()=>window.cancelIdleCallback(n)}return yo(e)}function yo(e){let t=Ae(),n=F(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Ae()-t))})},0);return()=>I(n)}var bo=D;function xo(){let e=[];function t(t){let r;if(!t||t.didTimeout){let e=performance.now();r=()=>30-(performance.now()-e)}else r=t.timeRemaining.bind(t);for(;r()>0&&e.length;)e.shift()();e.length&&n()}function n(){vo(t,{timeout:bo})}return{push(t){e.push(t)===1&&n()},stop(){e.length=0}}}function So(e){return!!e&&typeof e.then==`function`}var Co={};function wo(e){return _e(...e.map(e=>(Co[e]||(Co[e]=To(e)),Co[e])))}function To(e){return new E(t=>{let n=_[e];return _[e]=(...r)=>{n.apply(console,r);let i=on(`console error`);me(()=>{t.notify(Eo(r,e,i))})},()=>{_[e]=n}})}function Eo(e,t,n){let r=e.map(e=>Do(e)).join(` `);if(t===g.error){let i=di({originalError:e.find(Fn),handlingStack:n,startClocks:M(),source:Vn.CONSOLE,handling:`handled`,nonErrorPrefix:`Provided`,useFallbackStack:!1});return i.message=r,{api:t,message:r,handlingStack:n,error:i}}return{api:t,message:r,error:void 0,handlingStack:n}}function Do(e){return typeof e==`string`?V(e):Fn(e)?cn(zt(e)):Cn(V(e),void 0,2)}function Oo(e){let t=a(e)===`object`;return t||C.error(`Unsupported context:`,e),t}function ko(e,t,n){let r={...e};for(let[e,{required:i,type:a}]of Object.entries(t))a===`string`&&!Ao(r[e])&&(r[e]=String(r[e])),i&&Ao(r[e])&&C.warn(`The property ${e} of ${n} is required; context will not be sent to the intake.`);return r}function Ao(e){return e==null||e===``}function jo(e=``,{propertiesConfig:t={}}={}){let n={},r=new E,i={getContext:()=>d(n),setContext:a=>{Oo(a)?n=V(ko(a,t,e)):i.clearContext(),r.notify()},setContextProperty:(i,a)=>{n=V(ko({...n,[i]:a},t,e)),r.notify()},removeContextProperty:i=>{delete n[i],ko(n,t,e),r.notify()},clearContext:()=>{n={},r.notify()},changeObservable:r};return i}function U(e,t,n,r){return w((...i)=>(r&&H({feature:r}),e()[t][n](...i)))}function Mo(e,t,n){e.changeObservable.subscribe(()=>{let r=e.getContext();n.notify(e=>e[t].setContext(r))})}var No=`_dd_c`,Po=[];function Fo(e,t,n){if(typeof window>`u`||typeof localStorage>`u`)return;let r=Io(t,n);Po.push(B(window,`storage`,({key:e})=>{r===e&&a()})),e.changeObservable.subscribe(o);let i=f(s(),e.getContext());Et(i)||e.setContext(i);function a(){e.setContext(s())}function o(){localStorage.setItem(r,JSON.stringify(e.getContext()))}function s(){let e=localStorage.getItem(r);return e?Ct(e)??{}:{}}}function Io(e,t){return`${No}_${e}_${t}`}var W={userContext:`userContext`,globalContext:`globalContext`,accountContext:`accountContext`},G={getContext:`getContext`,setContext:`setContext`,setContextProperty:`setContextProperty`,removeContextProperty:`removeContextProperty`,clearContext:`clearContext`};function Lo(e,t,n){let r=Ro();return t.storeContextsAcrossPages&&Fo(r,n,4),e.register(()=>{let e=r.getContext();return Et(e)||!e.id?Pr:{account:e}}),r}function Ro(){return jo(`account`,{propertiesConfig:{id:{type:`string`,required:!0},name:{type:`string`}}})}var zo=`_dd_tab_id`,Bo;function Vo(e){let t=Ho();e.register(()=>({tab:{id:t}}))}function Ho(){return Bo||=Uo()??N(),Bo}function Uo(){try{let e=sessionStorage.getItem(zo);if(e)return e;let t=N();return sessionStorage.setItem(zo,t),t}catch{return}}function Wo(e,t,n,r){let i=Go();return t.storeContextsAcrossPages&&Fo(i,n,2),e.register(()=>{let e=i.getContext();return r?{context:e}:e}),i}function Go(){return jo(`global context`)}function Ko(e,t,n,r){let i=qo();return t.storeContextsAcrossPages&&Fo(i,r,1),e.register(({eventType:e,startTime:r})=>{let a=i.getContext(),o=n.findTrackedSession(r);return o?.anonymousId&&!a.anonymous_id&&t.trackAnonymousUser&&(a.anonymous_id=o.anonymousId),Et(a)?Pr:{type:e,usr:a}}),i}function qo(){return jo(`user`,{propertiesConfig:{id:{type:`string`},name:{type:`string`},email:{type:`string`}}})}var Jo=`datadog-synthetics-`,Yo=`${Jo}public-id`,Xo=`${Jo}result-id`,Zo=`${Jo}injects-rum`,Qo=`${Jo}rum-context`;function $o(){return!x&&!!(b._DATADOG_SYNTHETICS_INJECTS_RUM||lt(Zo))}function es(){let e=ns();return rs(e)?e:void 0}function ts(){return!!es()}function ns(){let e=b._DATADOG_SYNTHETICS_RUM_CONTEXT;if(e)return e;let t=lt(Qo);return t?Ct(decodeURIComponent(t)):{test_id:window._DATADOG_SYNTHETICS_PUBLIC_ID||lt(Yo),result_id:window._DATADOG_SYNTHETICS_RESULT_ID||lt(Xo)}}function rs(e){return typeof e==`object`&&!!e&&typeof e.test_id==`string`&&typeof e.result_id==`string`}var K={DOCUMENT:`document`,XHR:`xhr`,BEACON:`beacon`,FETCH:`fetch`,CSS:`css`,JS:`js`,IMAGE:`image`,FONT:`font`,MEDIA:`media`,WEBSOCKET:`websocket`,OTHER:`other`},is={FETCH:K.FETCH,XHR:K.XHR},as=500,os=function(e){return e[e.RUNTIME_ERROR=0]=`RUNTIME_ERROR`,e[e.FETCH=1]=`FETCH`,e[e.XHR=2]=`XHR`,e[e.CONSOLE=3]=`CONSOLE`,e}({});function ss(){let e=new ve(as,e=>{Yr(`Early data collection dropped data on unbuffer`,{count:e})}),t=[];function n(n,r){t.push(r.subscribe(t=>{e.notify({type:n,data:t})}))}return n(0,P(hi)()),n(1,so()),n(2,Qa()),n(3,wo(Object.values(g))),{observable:e,stop:()=>t.forEach(e=>e.unsubscribe())}}function cs(){try{return new Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function ls(e,t){return+e.toFixed(t)}function us(e){return typeof e==`number`}var ds=function(e){return e[e.REPLAY=1]=`REPLAY`,e[e.RUM=2]=`RUM`,e[e.TELEMETRY=4]=`TELEMETRY`,e[e.PROFILING=6]=`PROFILING`,e}({});function fs(e,t,n){e.register(({startTime:e})=>{let r=t.findTrackedSession(e);return r?{session:{id:r.id},anonymous_id:r.anonymousId,...n}:Pr})}function ps(e,t){let n=0,r=[],i,a=!0,o=0,s=[],c=t,{stop:l}=B(e,`message`,({data:e})=>{if(e.type!==`wrote`||e.streamId!==c)return;let t=s[0];t&&(t.id===e.id?(s.shift(),n+=e.additionalBytesCount,r.push(e.result),i=e.trailer,t.writeCallback?t.writeCallback(e.result.byteLength):t.finishCallback&&t.finishCallback()):t.id<e.id&&l())});function u(){let e=r.length===0?new Uint8Array:Sn(r.concat(i)),t={rawBytesCount:n,output:e,outputBytesCount:e.byteLength,encoding:`deflate`};return n=0,r=[],t}function d(){a||=(e.postMessage({action:`reset`,streamId:t}),!0)}return{isAsync:!0,get isEmpty(){return a},write(n,r){e.postMessage({action:`write`,id:o,data:n,streamId:t}),s.push({id:o,writeCallback:r,data:n}),a=!1,o+=1},finish(e){d(),s.length?(s.forEach(e=>{delete e.writeCallback}),s[s.length-1].finishCallback=()=>e(u())):e(u())},finishSync(){d();let e=s.map(e=>e.data).join(``);return s.length=0,{...u(),pendingData:e}},estimateEncodedBytesCount(e){return e.length/8},stop(){l()}}}function ms({configuredUrl:e,error:t,source:n,scriptType:r}){if(C.error(`${n} failed to start: an error occurred while initializing the ${r}:`,t),t instanceof Event||t instanceof Error&&hs(t.message)){let t;t=e?`Please make sure the ${r} URL ${e} is correct and CSP is correctly configured.`:`Please make sure CSP is correctly configured.`,C.error(`${t} See documentation at ${m}/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay`)}else r===`worker`&&Xr(t)}function hs(e){return e.includes(`Content Security Policy`)||e.includes(`requires 'TrustedScriptURL'`)}var gs=30*D;function _s(e){return new Worker(e.workerUrl||URL.createObjectURL(new Blob([`(()=>{function t(t){if(1===t.length)return t[0];const e=t.reduce((t,e)=>t+e.length,0),a=new Uint8Array(e);let n=0;for(const e of t)a.set(e,n),n+=e.length;return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),n=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),r=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),i=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=Array(576);e(s);var h=Array(60);e(h);var l=Array(512);e(l);var _=Array(256);e(_);var o=Array(29);e(o);var d,u,f,c=Array(30);function p(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t?.length}function g(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(c);var v=function(t){return t<256?l[t]:l[256+(t>>>7)]},w=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},m=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,w(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},b=function(t,e,a){m(t,a[2*e],a[2*e+1])},y=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},z=function(t,e,a){var n,r,i=Array(16),s=0;for(n=1;n<=15;n++)i[n]=s=s+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=y(i[h]++,h))}},k=function(t){var e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},x=function(t){t.bi_valid>8?w(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},A=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},U=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&A(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!A(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},B=function(t,e,r){var i,s,h,l,d=0;if(0!==t.last_lit)do{i=t.pending_buf[t.d_buf+2*d]<<8|t.pending_buf[t.d_buf+2*d+1],s=t.pending_buf[t.l_buf+d],d++,0===i?b(t,s,e):(h=_[s],b(t,h+256+1,e),0!==(l=a[h])&&(s-=o[h],m(t,s,l)),i--,h=v(i),b(t,h,r),0!==(l=n[h])&&(i-=c[h],m(t,i,l)))}while(d<t.last_lit);b(t,256,e)},I=function(t,e){var a,n,r,i=e.dyn_tree,s=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,_=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==i[2*a]?(t.heap[++t.heap_len]=_=a,t.depth[a]=0):i[2*a+1]=0;for(;t.heap_len<2;)i[2*(r=t.heap[++t.heap_len]=_<2?++_:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=s[2*r+1]);for(e.max_code=_,a=t.heap_len>>1;a>=1;a--)U(t,i,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],U(t,i,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,i[2*r]=i[2*a]+i[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,i[2*a+1]=i[2*n+1]=r,t.heap[1]=r++,U(t,i,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,i,s,h,l=e.dyn_tree,_=e.max_code,o=e.stat_desc.static_tree,d=e.stat_desc.has_stree,u=e.stat_desc.extra_bits,f=e.stat_desc.extra_base,c=e.stat_desc.max_length,p=0;for(i=0;i<=15;i++)t.bl_count[i]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(i=l[2*l[2*(n=t.heap[a])+1]+1]+1)>c&&(i=c,p++),l[2*n+1]=i,n>_||(t.bl_count[i]++,s=0,n>=f&&(s=u[n-f]),h=l[2*n],t.opt_len+=h*(i+s),d&&(t.static_len+=h*(o[2*n+1]+s)));if(0!==p){do{for(i=c-1;0===t.bl_count[i];)i--;t.bl_count[i]--,t.bl_count[i+1]+=2,t.bl_count[c]--,p-=2}while(p>0);for(i=c;0!==i;i--)for(n=t.bl_count[i];0!==n;)(r=t.heap[--a])>_||(l[2*r+1]!==i&&(t.opt_len+=(i-l[2*r+1])*l[2*r],l[2*r+1]=i),n--)}}(t,e),z(i,_,t.bl_count)},E=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++h<l&&r===s||(h<_?t.bl_tree[2*r]+=h:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4))},D=function(t,e,a){var n,r,i=-1,s=e[1],h=0,l=7,_=4;for(0===s&&(l=138,_=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++h<l&&r===s)){if(h<_)do{b(t,r,t.bl_tree)}while(0!==--h);else 0!==r?(r!==i&&(b(t,r,t.bl_tree),h--),b(t,16,t.bl_tree),m(t,h-3,2)):h<=10?(b(t,17,t.bl_tree),m(t,h-3,3)):(b(t,18,t.bl_tree),m(t,h-11,7));h=0,i=r,0===s?(l=138,_=3):r===s?(l=6,_=3):(l=7,_=4)}},M=!1,j=function(t,e,a,n){m(t,0+(n?1:0),3),function(t,e,a){x(t),w(t,a),w(t,~a),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a)},C=j,L=function(t,e,a,n){for(var r=65535&t,i=t>>>16&65535,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16},S=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),O=function(t,e,a,n){var r=S,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},T={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},q=C,F=function(t,e,a){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&a,t.last_lit++,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(_[a]+256+1)]++,t.dyn_dtree[2*v(e)]++),t.last_lit===t.lit_bufsize-1},G=-2,H=258,J=262,K=103,N=113,P=666,Q=function(t,e){return t.msg=T[e],e},R=function(t){return(t<<1)-(t>4?9:0)},V=function(t){for(var e=t.length;--e>=0;)t[e]=0},W=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},X=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},Y=function(t,e){(function(t,e,a,n){var r,l,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),I(t,t.l_desc),I(t,t.d_desc),_=function(t){var e;for(E(t,t.dyn_ltree,t.l_desc.max_code),E(t,t.dyn_dtree,t.d_desc.max_code),I(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*i[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),r=t.opt_len+3+7>>>3,(l=t.static_len+3+7>>>3)<=r&&(r=l)):r=l=a+5,a+4<=r&&-1!==e?j(t,e,a,n):4===t.strategy||l===r?(m(t,2+(n?1:0),3),B(t,s,h)):(m(t,4+(n?1:0),3),function(t,e,a,n){var r;for(m(t,e-257,5),m(t,a-1,5),m(t,n-4,4),r=0;r<n;r++)m(t,t.bl_tree[2*i[r]+1],3);D(t,t.dyn_ltree,e-1),D(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),B(t,t.dyn_ltree,t.dyn_dtree)),k(t),n&&x(t)})(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,X(t.strm)},Z=function(t,e){t.pending_buf[t.pending++]=e},$=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},tt=function(t,e,a,n){var r=t.avail_in;return r>n&&(r=n),0===r?0:(t.avail_in-=r,e.set(t.input.subarray(t.next_in,t.next_in+r),a),1===t.state.wrap?t.adler=L(t.adler,e,r,a):2===t.state.wrap&&(t.adler=O(t.adler,e,r,a)),t.next_in+=r,t.total_in+=r,r)},et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,h=t.nice_match,l=t.strstart>t.w_size-J?t.strstart-(t.w_size-J):0,_=t.window,o=t.w_mask,d=t.prev,u=t.strstart+H,f=_[i+s-1],c=_[i+s];t.prev_length>=t.good_match&&(r>>=2),h>t.lookahead&&(h=t.lookahead);do{if(_[(a=e)+s]===c&&_[a+s-1]===f&&_[a]===_[i]&&_[++a]===_[i+1]){i+=2,a++;do{}while(_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&_[++i]===_[++a]&&i<u);if(n=H-(u-i),i=u-H,n>s){if(t.match_start=e,s=n,n>=h)break;f=_[i+s-1],c=_[i+s]}}}while((e=d[e&o])>l&&0!==--r);return s<=t.lookahead?s:t.lookahead},at=function(t){var e,a,n,r,i,s=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-J)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--a);e=a=s;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--a);r+=s}if(0===t.strm.avail_in)break;if(a=tt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=W(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=W(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<J&&0!==t.strm.avail_in)},nt=function(t,e){for(var a,n;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a)),t.match_length>=3)if(n=F(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!==--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=W(t,t.ins_h,t.window[t.strstart+1]);else n=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2},rt=function(t,e){for(var a,n,r;;){if(t.lookahead<J){if(at(t),t.lookahead<J&&0===e)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-J&&(t.match_length=et(t,a),t.match_length<=5&&(1===t.strategy||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=F(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=W(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!==--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(Y(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=F(t,0,t.window[t.strstart-1]))&&Y(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=F(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2};function it(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var st=[new it(0,0,0,0,function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(at(t),0===t.lookahead&&0===e)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,Y(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-J&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Y(t,!1),t.strm.avail_out),1)}),new it(4,4,8,4,nt),new it(4,5,16,8,nt),new it(4,6,32,32,nt),new it(4,4,16,16,rt),new it(8,16,32,32,rt),new it(8,16,128,128,rt),new it(8,32,128,256,rt),new it(32,128,258,1024,rt),new it(32,258,258,4096,rt)];function ht(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}for(var lt=function(t){var e,i=function(t){if(!t?.state)return Q(t,G);t.total_in=t.total_out=0,t.data_type=2;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:N,t.adler=2===e.wrap?0:1,e.last_flush=0,function(t){M||(function(){var t,e,i,g,v,w=Array(16);for(i=0,g=0;g<28;g++)for(o[g]=i,t=0;t<1<<a[g];t++)_[i++]=g;for(_[i-1]=g,v=0,g=0;g<16;g++)for(c[g]=v,t=0;t<1<<n[g];t++)l[v++]=g;for(v>>=7;g<30;g++)for(c[g]=v<<7,t=0;t<1<<n[g]-7;t++)l[256+v++]=g;for(e=0;e<=15;e++)w[e]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,w[8]++;for(;t<=255;)s[2*t+1]=9,t++,w[9]++;for(;t<=279;)s[2*t+1]=7,t++,w[7]++;for(;t<=287;)s[2*t+1]=8,t++,w[8]++;for(z(s,287,w),t=0;t<30;t++)h[2*t+1]=5,h[2*t]=y(t,5);d=new p(s,a,257,286,15),u=new p(h,n,0,30,15),f=new p([],r,0,19,7)}(),M=!0),t.l_desc=new g(t.dyn_ltree,d),t.d_desc=new g(t.dyn_dtree,u),t.bl_desc=new g(t.bl_tree,f),t.bi_buf=0,t.bi_valid=0,k(t)}(e),0}(t);return 0===i&&((e=t.state).window_size=2*e.w_size,V(e.head),e.max_lazy_match=st[e.level].max_lazy,e.good_match=st[e.level].good_length,e.nice_match=st[e.level].nice_length,e.max_chain_length=st[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),i},_t=function(t,e){var a,n;if(!t?.state||e>5||e<0)return t?Q(t,G):G;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===P&&4!==e)return Q(t,0===t.avail_out?-5:G);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,Z(r,31),Z(r,139),Z(r,8),r.gzhead?(Z(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),Z(r,255&r.gzhead.time),Z(r,r.gzhead.time>>8&255),Z(r,r.gzhead.time>>16&255),Z(r,r.gzhead.time>>24&255),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,255&r.gzhead.os),r.gzhead.extra?.length&&(Z(r,255&r.gzhead.extra.length),Z(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=O(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,0),Z(r,9===r.level?2:r.strategy>=2||r.level<2?4:0),Z(r,3),r.status=N);else{var h=8+(r.w_bits-8<<4)<<8;h|=(r.strategy>=2||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(h|=32),h+=31-h%31,r.status=N,$(r,h),0!==r.strstart&&($(r,t.adler>>>16),$(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending!==r.pending_buf_size));)Z(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),X(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,Z(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=O(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=K)}else r.status=K;if(r.status===K&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&X(t),r.pending+2<=r.pending_buf_size&&(Z(r,255&t.adler),Z(r,t.adler>>8&255),t.adler=0,r.status=N)):r.status=N),0!==r.pending){if(X(t),0===t.avail_out)return r.last_flush=-1,0}else if(0===t.avail_in&&R(e)<=R(i)&&4!==e)return Q(t,-5);if(r.status===P&&0!==t.avail_in)return Q(t,-5);if(0!==t.avail_in||0!==r.lookahead||0!==e&&r.status!==P){var l=2===r.strategy?function(t,e){for(var a;;){if(0===t.lookahead&&(at(t),0===t.lookahead)){if(0===e)return 1;break}if(t.match_length=0,a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):3===r.strategy?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=H){if(at(t),t.lookahead<=H&&0===e)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+H;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=H-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=F(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=F(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(Y(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,4===e?(Y(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Y(t,!1),0===t.strm.avail_out)?1:2}(r,e):st[r.level].func(r,e);if(3!==l&&4!==l||(r.status=P),1===l||3===l)return 0===t.avail_out&&(r.last_flush=-1),0;if(2===l&&(1===e?function(t){m(t,2,3),b(t,256,s),function(t){16===t.bi_valid?(w(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}(r):5!==e&&(q(r,0,0,!1),3===e&&(V(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),X(t),0===t.avail_out))return r.last_flush=-1,0}return 4!==e?0:r.wrap<=0?1:(2===r.wrap?(Z(r,255&t.adler),Z(r,t.adler>>8&255),Z(r,t.adler>>16&255),Z(r,t.adler>>24&255),Z(r,255&t.total_in),Z(r,t.total_in>>8&255),Z(r,t.total_in>>16&255),Z(r,t.total_in>>24&255)):($(r,t.adler>>>16),$(r,65535&t.adler)),X(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?0:1)},ot=function(t){if(!t?.state)return G;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==K&&e!==N&&e!==P?Q(t,G):(t.state=null,e===N?Q(t,-3):0)},dt=new Uint8Array(256),ut=0;ut<256;ut++)dt[ut]=ut>=252?6:ut>=248?5:ut>=240?4:ut>=224?3:ut>=192?2:1;dt[254]=dt[254]=1;var ft=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},ct=Object.prototype.toString;function pt(){this.options={level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ft,this.strm.avail_out=0;var e,a,n=function(t,e,a,n,r,i){if(!t)return G;var s=1;if(-1===e&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||8!==a||n<8||n>15||e<0||e>9||i<0||i>4)return Q(t,G);8===n&&(n=9);var h=new ht;return t.state=h,h.strm=t,h.wrap=s,h.gzhead=null,h.w_bits=n,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=r+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<r+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=e,h.strategy=i,h.method=a,lt(t)}(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(0!==n)throw Error(T[n]);if(t.header&&(e=this.strm,a=t.header,e?.state&&(2!==e.state.wrap||(e.state.gzhead=a))),t.dictionary){var r;if(r="[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,0!==(n=function(t,e){var a=e.length;if(!t?.state)return G;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return G;if(1===r&&(t.adler=L(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(V(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,h=t.next_in,l=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,at(n);n.lookahead>=3;){var _=n.strstart,o=n.lookahead-2;do{n.ins_h=W(n,n.ins_h,n.window[_+3-1]),n.prev[_&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=_,_++}while(--o);n.strstart=_,n.lookahead=2,at(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=h,t.input=l,t.avail_in=s,n.wrap=r,0}(this.strm,r)))throw Error(T[n]);this._dict_set=!0}}function gt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch{t.postMessage({type:"errored",error:e+"",streamId:a})}}function vt(t){const e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}pt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?4:0,"[object ArrayBuffer]"===ct.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(2===n||3===n)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(1===(a=_t(r,n)))return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=ot(this.strm),this.onEnd(a),this.ended=!0,0===a;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},pt.prototype.onData=function(t){this.chunks.push(t)},pt.prototype.onEnd=function(t){0===t&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,h=t.length;i<h;i++){var l=t[i];r.set(l,s),s+=l.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e=self){try{const a=new Map;e.addEventListener("message",n=>{try{const r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"7.12.0"};case"write":{let n=e.get(a.streamId);n||(n=new pt,e.set(a.streamId,n));const r=n.chunks.length,i=(new TextEncoder).encode(a.data);return n.push(i,2),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:vt(n),additionalBytesCount:i.length}}case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){gt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}})}catch(t){gt(e,t)}}()})();`])))}var q={status:0};function vs(e,t,n){switch(q.status===0&&bs(e,t),q.status){case 1:return q.initializationFailureCallbacks.push(n),q.worker;case 3:return q.worker}}function ys(){return q.status}function bs(e,t){try{let n=P(_s)(e),{stop:r}=B(n,`error`,n=>{Cs(e,t,n)}),{stop:i}=B(n,`message`,({data:n})=>{n.type===`errored`?Cs(e,t,n.error,n.streamId):n.type===`initialized`&&Ss(n.version)});n.postMessage({action:`init`}),F(()=>xs(t),gs),q={status:1,worker:n,stop:()=>{r(),i()},initializationFailureCallbacks:[]}}catch(n){Cs(e,t,n)}}function xs(e){q.status===1&&(C.error(`${e} failed to start: a timeout occurred while initializing the Worker`),q.initializationFailureCallbacks.forEach(e=>e()),q={status:2})}function Ss(e){q.status===1&&(q={status:3,worker:q.worker,stop:q.stop,version:e})}function Cs(e,t,n,r){q.status===1||q.status===0?(ms({configuredUrl:e.workerUrl,error:n,source:t,scriptType:`worker`}),q.status===1&&q.initializationFailureCallbacks.forEach(e=>e()),q={status:2}):Xr(n,{worker_version:q.status===3&&q.version,stream_id:r})}var ws;function Ts(e){return As(e).segments_count}function Es(e){As(e).segments_count+=1}function Ds(e){As(e).records_count+=1}function Os(e,t){As(e).segments_total_raw_size+=t}function ks(e){return ws?.get(e)}function As(e){ws||=new Map;let t;return ws.has(e)?t=ws.get(e):(t={records_count:0,segments_count:0,segments_total_raw_size:0},ws.set(e,t),ws.size>1e3&&js()),t}function js(){if(!ws)return;let e=ws.keys().next().value;e&&ws.delete(e)}var J={ACTION:`action`,ERROR:`error`,LONG_TASK:`long_task`,VIEW:`view`,VIEW_UPDATE:`view_update`,RESOURCE:`resource`,VITAL:`vital`},Ms={LONG_TASK:`long-task`,LONG_ANIMATION_FRAME:`long-animation-frame`},Ns={INITIAL_LOAD:`initial_load`,ROUTE_CHANGE:`route_change`,SESSION_RENEWAL:`session_renewal`,BF_CACHE:`bf_cache`},Ps={CLICK:`click`,CUSTOM:`custom`,TAP:`tap`,SCROLL:`scroll`,SWIPE:`swipe`,APPLICATION_START:`application_start`,BACK:`back`},Fs={RAGE_CLICK:`rage_click`,ERROR_CLICK:`error_click`,DEAD_CLICK:`dead_click`},Is={DURATION:`duration`,OPERATION_STEP:`operation_step`};function Ls(e,t){t.lastIndex=0;let n=t.exec(e);if(!n)return;let[r,i]=n;return i||r}function Rs(e){let t=[],n=0,r,i={quote:void 0,escapeSequence:void 0},a=``;for(let o of e){if(r=Gs[n].find(e=>Ws[e](o,i)),!r)return[];if(i.escapeSequence!==void 0&&r!==12){if(!Js(i.escapeSequence))return[];a+=Xs(i.escapeSequence),i.escapeSequence=void 0}Ks.includes(r)?a+=o:qs.includes(r)&&a!==``?(t.push(a),a=``):r===12?i.escapeSequence=i.escapeSequence?`${i.escapeSequence}${o}`:o:r===8?i.quote=o:r===9&&(i.quote=void 0),n=r}return Gs[n].includes(1)?(a!==``&&t.push(a),t):[]}var zs=/[a-zA-Z_$]/,Bs=/[a-zA-Z0-9_$]/,Vs=/[0-9]/,Hs=/[a-fA-F0-9]/,Us=`'"`,Ws={0:()=>!1,1:()=>!1,2:e=>zs.test(e),3:e=>Bs.test(e),4:e=>e===`.`,5:e=>e===`[`,6:e=>e===`]`,7:e=>Vs.test(e),8:e=>Us.includes(e),9:(e,t)=>e===t.quote,10:()=>!0,11:e=>e===`\\`,12:(e,t)=>t.escapeSequence===void 0?`${t.quote}/\\bfnrtu`.includes(e):t.escapeSequence.startsWith(`u`)&&t.escapeSequence.length<5?Hs.test(e):!1},Gs={0:[2,5],1:[],2:[3,4,5,1],3:[3,4,5,1],4:[2],5:[8,7],6:[4,5,1],7:[7,6],8:[11,9,10],9:[6],10:[11,9,10],11:[12],12:[12,11,9,10]},Ks=[2,3,7,10],qs=[4,5,6];function Js(e){return`"'/\\bfnrt`.includes(e)||e.startsWith(`u`)&&e.length===5}var Ys={'"':`"`,"'":`'`,"/":`/`,"\\":`\\`,b:`\b`,f:`\f`,n:`
6
+ `,r:`\r`,t:` `};function Xs(e){return e.startsWith(`u`)?String.fromCharCode(parseInt(e.slice(1),16)):Ys[e]}var Zs=`dd_rc_`,Qs={hit:`success`,miss:`missing`,error:`failure`};function $s(e){return`${Zs}${e}`}function ec(e){if(typeof e!=`object`||!e)return!1;let t=`version`in e&&e.version===2,n=`config`in e&&typeof e.config==`object`&&e.config!==null;return t&&n}function tc({remoteConfigurationId:e}){let t=$s(e);return{read(){let e;try{e=localStorage.getItem(t)}catch{return{status:`error`}}if(e===null)return{status:`miss`};let n=Ct(e);return n===void 0||!ec(n)?(this.remove(),{status:`error`}):{status:`hit`,config:n.config}},remove(){try{localStorage.removeItem(t)}catch{}},write(e){let n={version:2,config:e,fetchedAt:k()};try{localStorage.setItem(t,JSON.stringify(n))}catch{}}}}var nc=`v1`,rc=[`applicationId`,`service`,`env`,`version`,`sessionSampleRate`,`sessionReplaySampleRate`,`telemetrySampleRate`,`trackAnonymousUser`,`trackUserInteractions`,`trackResources`,`trackLongTasks`,`traceContextInjection`,`actionNameAttribute`,`defaultPrivacyLevel`,`enablePrivacyForActionName`,`traceSampleRate`,`trackSessionAcrossSubdomains`,`allowedTracingUrls`,`allowedTrackingOrigins`];async function ic(e,t){let n,r=oc(),i=await uc(e);return i.ok?(r.increment(`fetch`,`success`),n=ac(e,i.value,t,r)):(r.increment(`fetch`,`failure`),C.error(i.error)),Qr(Rr.REMOTE_CONFIGURATION_METRIC_NAME,{metrics:r.get()}),n}function ac(e,t,n,r){let i={...e};if(t.rum){let e=t.rum;rc.forEach(t=>{t in e&&(i[t]=a(e[t]))}),Object.keys(n).forEach(t=>{e[t]!==void 0&&s(n[t],e[t])})}return t.profiling?.sampleRate!==void 0&&(i.profilingSampleRate=t.profiling.sampleRate),i;function a(e){if(Array.isArray(e))return e.map(a);if(o(e)){if(sc(e)){let t=e.rcSerializedType;switch(t){case`string`:return e.value;case`regex`:return cc(e.value);case`dynamic`:return c(e);default:C.error(`Unsupported remote configuration: "rcSerializedType": "${t}"`);return}}return Dt(e,a)}return e}function s(e,t){t.forEach(({key:t,value:n})=>{e.setContextProperty(t,a(n))})}function c(e){let t=e.strategy,n;switch(t){case`cookie`:n=l(e);break;case`dom`:n=d(e);break;case`js`:n=p(e);break;case`localStorage`:n=u(e);break;default:C.error(`Unsupported remote configuration: "strategy": "${t}"`);return}let r=e.extractor;return r!==void 0&&typeof n==`string`?lc(r,n):n}function l({name:e}){let t=ot(e);return r.increment(`cookie`,t===void 0?`missing`:`success`),t}function u({key:e}){let t;try{t=localStorage.getItem(e)}catch{r.increment(`localStorage`,`failure`);return}return r.increment(`localStorage`,t===null?`missing`:`success`),t??void 0}function d({selector:e,attribute:t}){let n;try{n=document.querySelector(e)}catch{C.error(`Invalid selector in the remote configuration: '${e}'`),r.increment(`dom`,`failure`);return}if(!n){r.increment(`dom`,`missing`);return}if(f(n,t)){C.error(`Forbidden element selected by the remote configuration: '${e}'`),r.increment(`dom`,`failure`);return}let i=t===void 0?n.textContent:n.getAttribute(t);if(i===null){r.increment(`dom`,`missing`);return}return r.increment(`dom`,`success`),i}function f(e,t){return e.getAttribute(`type`)===`password`&&t===`value`}function p({path:e}){let t=window,n=Rs(e);if(n.length===0){C.error(`Invalid JSON path in the remote configuration: '${e}'`),r.increment(`js`,`failure`);return}for(let i of n){if(!(i in t)){r.increment(`js`,`missing`);return}try{t=t[i]}catch(t){C.error(`Error accessing: '${e}'`,t),r.increment(`js`,`failure`);return}}return r.increment(`js`,`success`),t}}function oc(){let e={fetch:{}};return{get:()=>e,increment:(t,n)=>{e[t]||(e[t]={}),e[t][n]||(e[t][n]=0),e[t][n]=e[t][n]+1}}}function sc(e){return`rcSerializedType`in e}function cc(e){try{return new RegExp(e)}catch{C.error(`Invalid regex in the remote configuration: '${e}'`)}}function lc(e,t){let n=cc(e.value);if(n!==void 0)return Ls(t,n)}async function uc(e){let t;try{t=await Gn(fc(e))}catch{t=void 0}if(!t?.ok)return{ok:!1,error:Error(`Error fetching the remote configuration.`)};let n=await t.json();return n.rum||n.profiling?{ok:!0,value:n}:{ok:!1,error:Error(`No remote configuration for RUM.`)}}function dc(e){return e.remoteConfiguration?.id??e.remoteConfigurationId}function fc(e){if(e.remoteConfigurationProxy)return e.remoteConfigurationProxy;let t=dc(e);return Ge({site:e.site,path:`/${nc}/${encodeURIComponent(t)}.json`,subdomain:`sdk-configuration`})}function pc(e,t,n){uc(e).then(e=>{e.ok?(n.increment(`fetch`,`success`),t.write(e.value)):(n.increment(`fetch`,`failure`),C.error(e.error))}).catch(T).finally(()=>{Qr(Rr.REMOTE_CONFIGURATION_METRIC_NAME,{metrics:n.get()})})}function mc(e,t){let n=tc({remoteConfigurationId:dc(e)}),r=oc(),i=n.read();if(r.increment(`cache`,Qs[i.status]),pc(e,n,r),i.status===`hit`)return ac(e,i.config,t,r);if(!e.remoteConfiguration?.required)return e}function hc(e,t){switch(t.type){case`string`:return`"${e}" must be a non-empty string`;case`number`:return t.min!==void 0&&t.max!==void 0?`"${e}" must be a number between ${t.min} and ${t.max}`:t.min===void 0?t.max===void 0?`"${e}" must be a finite number`:`"${e}" must be a number less than or equal to ${t.max}`:`"${e}" must be a number greater than or equal to ${t.min}`;case`percentage`:return`"${e}" must be a number between 0 and 100`;case`boolean`:return`"${e}" must be a boolean`;case`site`:return`"${e}" must be a valid Datadog site. ${h} ${m}/getting_started/site/.`;case`match-option`:return`"${e}" must be a string, RegExp, or function`;case`enum`:return`"${e}" must be one of: "${xc(t.values).join(`", "`)}"`;case`union`:return`"${e}" does not match any expected type`;case`schema`:return`"${e}" is not a valid object`;case`function`:return`"${e}" must be a function`}}function gc(e,t,n){if(!e||typeof e!=`object`){n.error(`Configuration must be an object`);return}return _c(t,e,n)}function _c(e,t,n){let r={};for(let[i,a]of Object.entries(e)){let e=t[i],o=a.multiple?vc(a,e,n):bc(a,e,n);if(o===void 0){if(e!=null&&e!==``){if(n.error(hc(i,a)),a.required||a.strict!==!1)return}else if(a.required){n.error(`"${i}" is required`);return}r[i]=`default`in a?d(a.default):void 0}else r[i]=o}return r}function vc(e,t,n){if(t==null)return;if(e.type===`enum`&&e.allowAll&&t===`all`)return xc(e.values).slice();let r=Array.isArray(t)?t:[t],i=[];for(let t of r){let r=bc(e,t,n);if(r===void 0){if(e.strict!==!1)return}else i.push(r)}if(!(e.strict===!1&&i.length===0&&r.length>0))return i}var yc=/(datadog|ddog|datad0g|dd0g)/;function bc(e,t,n){if(e.type===`schema`)return typeof t!=`object`||!t?void 0:_c(e.schema,t,n);if(e.type===`union`){if(t==null)return;for(let r of e.variants){let e=bc(r,t,n);if(e!==void 0)return e}return}if(t!=null)switch(e.type){case`function`:return typeof t==`function`?t:void 0;case`string`:return typeof t==`string`&&t.length>0?t:void 0;case`number`:return typeof t==`number`&&Number.isFinite(t)&&(e.min===void 0||t>=e.min)&&(e.max===void 0||t<=e.max)?t:void 0;case`percentage`:return s(t)?t:void 0;case`boolean`:return typeof t==`boolean`?t:e.strict===!1?!!t:void 0;case`site`:return typeof t!=`string`||!yc.test(t)?void 0:t;case`match-option`:return c(t)?t:void 0;case`enum`:return typeof t==`string`&&xc(e.values).includes(t)?t:void 0}}function xc(e){return Sc(e)?e:Object.values(e)}function Sc(e){return Array.isArray(e)}var Cc=[`tracecontext`,`datadog`],wc=[`cache-control`,`etag`,`age`,`expires`,`content-type`,`content-encoding`,`vary`,`content-length`,`server-timing`,`x-cache`,`cf-cache-status`,`x-vercel-cache`],Tc={...Xe,applicationId:{type:`string`,required:!0},actionNameAttribute:{type:`string`},workerUrl:{type:`string`},subdomain:{type:`string`},sessionReplaySampleRate:{type:`percentage`,default:0},traceSampleRate:{type:`percentage`,default:100},profilingSampleRate:{type:`percentage`,default:0},compressIntakeRequests:{type:`boolean`,default:!1},trackUserInteractions:{type:`boolean`,default:!0,strict:!1},trackResources:{type:`boolean`,default:!0,strict:!1},trackLongTasks:{type:`boolean`,default:!0,strict:!1},trackViewsManually:{type:`boolean`,default:!1,strict:!1},betaEnableViewUpdates:{type:`boolean`},betaTrackWebSockets:{type:`boolean`,default:!1,strict:!1},enablePrivacyForActionName:{type:`boolean`,default:!0},propagateTraceBaggage:{type:`boolean`,default:!0},startSessionReplayRecordingManually:{type:`boolean`,default:!1,strict:!1},sessionReplayCanvasRecording:{type:`schema`,schema:{enable:{type:`boolean`,required:!0},maxFramesPerSecond:{type:`number`,min:0,max:5,default:1}}},defaultPrivacyLevel:{type:`enum`,values:Je,default:Je.MASK_USER_INPUT,strict:!1},traceContextInjection:{type:`enum`,values:Ye,default:Ye.SAMPLED,strict:!1},excludedActivityUrls:{type:`match-option`,multiple:!0,default:[]},allowedTracingUrls:{type:`union`,multiple:!0,strict:!1,default:[],variants:[{type:`match-option`},{type:`schema`,schema:{match:{type:`match-option`,required:!0},propagatorTypes:{type:`enum`,values:[`datadog`,`b3`,`b3multi`,`tracecontext`],multiple:!0,strict:!1,default:Cc}}}]},plugins:{type:`schema`,multiple:!0,strict:!1,default:[],schema:{name:{type:`string`,required:!0},getConfigurationTelemetry:{type:`function`,strict:!1,signature:void 0},onInit:{type:`function`,strict:!1,signature:void 0},onRumStart:{type:`function`,strict:!1,signature:void 0}}},trackFeatureFlagsForEvents:{type:`enum`,values:[`vital`,`action`,`long_task`,`resource`],multiple:!0,strict:!1,default:[]}};function Ec(e,t,n){return hr()?!1:e??!1}function Dc(e,t){let n=gc(e,Tc,C);if(!n)return;let r=n.allowedTracingUrls.map(kc).filter(Boolean);if(r.length>0&&!n.service){C.error(`Service needs to be configured when tracing is enabled`);return}let i=Mt(Ot.SESSION_REPLAY_RECORD_CANVAS)?n.sessionReplayCanvasRecording:void 0;return{...n,sessionReplayCanvasRecording:i,betaEnableViewUpdates:Ec(n.betaEnableViewUpdates,n.proxy,t),allowedTracingUrls:r,beforeSend:n.beforeSend?vi(n.beforeSend,`beforeSend threw an error:`):void 0,rulePsr:us(e.traceSampleRate)?e.traceSampleRate/100:void 0,trackResourceHeaders:Mc(e),allowedGraphQlUrls:Ac(e),remoteConfigurationId:dc(e)}}function Oc(e){let t=new Set;return ji(e.allowedTracingUrls)&&e.allowedTracingUrls.forEach(e=>{kc(e)?.propagatorTypes.forEach(e=>t.add(e))}),Array.from(t)}function kc(e){if(c(e))return{match:e,propagatorTypes:Cc};if(o(e)&&c(e.match)&&(e.propagatorTypes===null||e.propagatorTypes===void 0||Array.isArray(e.propagatorTypes)))return{match:e.match,propagatorTypes:e.propagatorTypes||Cc}}function Ac(e){if(!e.allowedGraphQlUrls)return[];if(!Array.isArray(e.allowedGraphQlUrls))return C.warn(`allowedGraphQlUrls should be an array`),[];let t=[];return e.allowedGraphQlUrls.forEach(e=>{c(e)?t.push({match:e,trackPayload:!1,trackResponseErrors:!1}):o(e)&&c(e.match)&&t.push({match:e.match,trackPayload:!!e.trackPayload,trackResponseErrors:!!e.trackResponseErrors})}),t}var jc=[`request`,`response`,`any`];function Mc(e){let t=e.trackResourceHeaders;if(t===void 0||t===!1)return[];if(t===!0)return wc.map(e=>({name:e}));if(!Array.isArray(t))return C.warn(`trackResourceHeaders should be true or an array of MatchHeader`),[];if(t.length===0)return C.warn(`trackResourceHeaders is an empty array, no headers will be captured`),[];let n=[];return t.forEach((e,t)=>{if(!o(e)){C.warn(`trackResourceHeaders[${t}] should be a MatchHeader object`);return}if(e.name!==void 0&&!c(e.name)){C.warn(`trackResourceHeaders[${t}].name should be a MatchOption`);return}if(e.url!==void 0&&!c(e.url)){C.warn(`trackResourceHeaders[${t}].url should be a MatchOption`);return}if(e.extractor!==void 0&&!(e.extractor instanceof RegExp)){C.warn(`trackResourceHeaders[${t}].extractor should be a RegExp`);return}if(e.location!==void 0&&(typeof e.location!=`string`||!jc.includes(e.location))){C.warn(`trackResourceHeaders[${t}].location should be 'request', 'response', or 'any'`);return}let{name:r,...i}=e;n.push({...i,...r===void 0?{}:{name:typeof r==`string`?r.toLowerCase():r}})}),n}function Nc(e){return ji(e)&&e.some(e=>o(e)&&e.trackPayload)}function Pc(e){return ji(e)&&e.some(e=>o(e)&&e.trackResponseErrors)}function Fc(e){if(e===!0)return`default_headers`;if(Array.isArray(e))return`custom`}function Ic(e,t){let n=Ze(e);return{session_replay_sample_rate:e.sessionReplaySampleRate,start_session_replay_recording_manually:e.startSessionReplayRecordingManually,trace_sample_rate:e.traceSampleRate,trace_context_injection:e.traceContextInjection,propagate_trace_baggage:e.propagateTraceBaggage,action_name_attribute:e.actionNameAttribute,use_allowed_tracing_urls:ji(e.allowedTracingUrls),use_allowed_graph_ql_urls:ji(e.allowedGraphQlUrls),use_track_graph_ql_payload:Nc(e.allowedGraphQlUrls),use_track_graph_ql_response_errors:Pc(e.allowedGraphQlUrls),selected_tracing_propagators:Oc(e),default_privacy_level:e.defaultPrivacyLevel,enable_privacy_for_action_name:e.enablePrivacyForActionName,use_excluded_activity_urls:ji(e.excludedActivityUrls),use_worker_url:!!e.workerUrl,compress_intake_requests:e.compressIntakeRequests,track_views_manually:e.trackViewsManually,track_user_interactions:e.trackUserInteractions,track_resources:e.trackResources,track_long_task:e.trackLongTasks,plugins:e.plugins?.map(e=>({name:e.name,...e.getConfigurationTelemetry?.()})),track_feature_flags_for_events:e.trackFeatureFlagsForEvents,remote_configuration_id:dc(e),profiling_sample_rate:e.profilingSampleRate,use_remote_configuration_proxy:!!e.remoteConfigurationProxy,track_resource_headers:Fc(e.trackResourceHeaders),beta_enable_view_updates:Ec(e.betaEnableViewUpdates,e.proxy,t),beta_track_web_sockets:e.betaTrackWebSockets,...n}}function Lc(){return{assemble:Mr(),assembleTelemetry:Mr()}}function Rc(){let e=zc();return new E(t=>{let n=new e(w(e=>t.notify(e)));return n.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),()=>n.disconnect()})}function zc(){let e,t=window;return t.Zone&&(e=Pt(t,`MutationObserver`),t.MutationObserver&&e===t.MutationObserver&&(e=Pt(new t.MutationObserver(L),`originalInstance`)?.constructor)),e||=t.MutationObserver,e}var Y=function(e){return e[e.AUTO_ACTION_COMPLETED=0]=`AUTO_ACTION_COMPLETED`,e[e.BEFORE_VIEW_CREATED=1]=`BEFORE_VIEW_CREATED`,e[e.VIEW_CREATED=2]=`VIEW_CREATED`,e[e.BEFORE_VIEW_UPDATED=3]=`BEFORE_VIEW_UPDATED`,e[e.VIEW_UPDATED=4]=`VIEW_UPDATED`,e[e.VIEW_ENDED=5]=`VIEW_ENDED`,e[e.AFTER_VIEW_ENDED=6]=`AFTER_VIEW_ENDED`,e[e.REQUEST_STARTED=7]=`REQUEST_STARTED`,e[e.REQUEST_COMPLETED=8]=`REQUEST_COMPLETED`,e[e.WEBSOCKET_COMPLETED=9]=`WEBSOCKET_COMPLETED`,e[e.SESSION_EXPIRED=10]=`SESSION_EXPIRED`,e[e.SESSION_RENEWED=11]=`SESSION_RENEWED`,e[e.PREPARE_URGENT_FLUSH=12]=`PREPARE_URGENT_FLUSH`,e[e.RAW_RUM_EVENT_COLLECTED=13]=`RAW_RUM_EVENT_COLLECTED`,e[e.RUM_EVENT_COLLECTED=14]=`RUM_EVENT_COLLECTED`,e[e.RAW_ERROR_COLLECTED=15]=`RAW_ERROR_COLLECTED`,e[e.ACTION_STARTED=16]=`ACTION_STARTED`,e[e.DURATION_VITAL_STARTED=17]=`DURATION_VITAL_STARTED`,e}({}),Bc=Va,Vc=Hi;function Hc(e){let t=Li({expireDelay:Vc});e.subscribe(1,e=>{t.add(n(e),e.startClocks.relative)}),e.subscribe(6,({endClocks:e})=>{t.closeActive(e.relative)}),e.subscribe(3,e=>{let n=t.find(e.startClocks.relative);n&&(e.name&&(n.name=e.name),e.context&&(n.context=e.context),n.sessionIsActive=e.sessionIsActive)}),e.subscribe(11,()=>{t.reset()});function n(e){return{service:e.service,version:e.version,context:e.context,id:e.id,name:e.name,startClocks:e.startClocks}}return{findView:(e,n)=>t.find(e,n),stop:()=>{t.stop()}}}var Uc=[[K.DOCUMENT,e=>e===`navigation`],[K.XHR,e=>e===`xmlhttprequest`],[K.FETCH,e=>e===`fetch`],[K.BEACON,e=>e===`beacon`],[K.CSS,(e,t)=>/\.css$/i.test(t)],[K.JS,(e,t)=>/\.js$/i.test(t)],[K.IMAGE,(e,t)=>[`image`,`img`,`icon`].includes(e)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(t)!==null],[K.FONT,(e,t)=>/\.(woff|eot|woff2|ttf)$/i.exec(t)!==null],[K.MEDIA,(e,t)=>[`audio`,`video`].includes(e)||/\.(mp3|mp4)$/i.exec(t)!==null]];function Wc(e){let t=e.name;if(!ie(t))return K.OTHER;let n=ae(t);for(let[t,r]of Uc)if(r(e.initiatorType,n))return t;return K.OTHER}function Gc(...e){for(let t=1;t<e.length;t+=1)if(e[t-1]>e[t])return!1;return!0}function Kc(e){return e.initiatorType===`xmlhttprequest`||e.initiatorType===`fetch`}function qc(e){let{duration:t,startTime:n,responseEnd:r}=e;return e.initiatorType===`navigation`||t===0&&n<r?A(n,r):t}function Jc(e){if(!Xc(e))return;let{startTime:t,fetchStart:n,workerStart:r,redirectStart:i,redirectEnd:a,domainLookupStart:o,domainLookupEnd:s,connectStart:c,secureConnectionStart:l,connectEnd:u,requestStart:d,responseStart:f,responseEnd:p}=e,m={download:Qc(t,f,p),first_byte:Qc(t,d,f)};return 0<r&&r<n&&(m.worker=Qc(t,r,n)),n<u&&(m.connect=Qc(t,c,u),c<=l&&l<=u&&(m.ssl=Qc(t,l,u))),n<s&&(m.dns=Qc(t,o,s)),t<a&&(m.redirect=Qc(t,i,a)),m}function Yc(e){return e.duration>=0}function Xc(e){let t=Gc(e.startTime,e.fetchStart,e.domainLookupStart,e.domainLookupEnd,e.connectStart,e.connectEnd,e.requestStart,e.responseStart,e.responseEnd),n=!Zc(e)||Gc(e.startTime,e.redirectStart,e.redirectEnd,e.fetchStart);return t&&n}function Zc(e){return e.redirectEnd>e.startTime}function Qc(e,t,n){if(e<=t&&t<=n)return{duration:j(A(t,n)),start:j(A(e,t))}}function $c(e){return e.nextHopProtocol===``?void 0:e.nextHopProtocol}function el(e){return e.deliveryType===``?`other`:e.deliveryType}function tl(e){if(e.startTime<e.responseStart){let{encodedBodySize:t,decodedBodySize:n,transferSize:r}=e;return{size:n,encoded_body_size:t,decoded_body_size:n,transfer_size:r}}return{size:void 0,encoded_body_size:void 0,decoded_body_size:void 0,transfer_size:void 0}}function nl(e){return e&&(!De(e)||Mt(Ot.TRACK_INTAKE_REQUESTS))}var rl=/data:(.+)?(;base64)?,/g,il=24e3;function al(e,t=il){if(e.length<=t||!e.startsWith(`data:`))return e;let n=e.substring(0,100).match(rl);return n?`${n[0]}[...]`:e}function ol(e){return e.nodeType===Node.TEXT_NODE}function sl(e){return e.nodeType===Node.COMMENT_NODE}function cl(e){return e.nodeType===Node.ELEMENT_NODE}function ll(e){return cl(e)&&!!e.shadowRoot}function ul(e){let t=e;return!!t.host&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&cl(t.host)}function dl(e,t){let n=e.firstChild;for(;n;)t(n),n=n.nextSibling;ll(e)&&t(e.shadowRoot)}function fl(e){return ul(e)?e.host:e.parentNode}function pl(e){if(e.parentElement)return e.parentElement;let t=e.parentNode;return t&&ul(t)?t.host:null}var ml=function(e){return e.EVENT=`event`,e.FIRST_INPUT=`first-input`,e.LARGEST_CONTENTFUL_PAINT=`largest-contentful-paint`,e.LAYOUT_SHIFT=`layout-shift`,e.LONG_TASK=`longtask`,e.LONG_ANIMATION_FRAME=`long-animation-frame`,e.NAVIGATION=`navigation`,e.PAINT=`paint`,e.RESOURCE=`resource`,e.VISIBILITY_STATE=`visibility-state`,e}({});function hl(e){return new E(t=>{let n=e=>{let n=bl(e);n.length>0&&t.notify(n)},r,i=!0,a=new PerformanceObserver(w(e=>{i?r=F(()=>n(e.getEntries())):n(e.getEntries())}));return a.observe(e),i=!1,_l(),()=>{a.disconnect(),I(r)}})}var gl;function _l(){!gl&&vl()&&`addEventListener`in performance&&(gl=B(performance,`resourcetimingbufferfull`,()=>{performance.clearResourceTimings()}))}function vl(){return window.performance!==void 0&&`getEntries`in performance}function yl(e){return PerformanceObserver.supportedEntryTypes.includes(e)}function bl(e){return e.filter(e=>!xl(e))}function xl(e){return e.entryType===`resource`&&(!nl(e.name)||!Yc(e))}var Sl=`data-dd-action-name`,Cl=`Masked Element`,wl=`::shadow `,Tl=[Sl,`data-testid`,`data-test`,`data-qa`,`data-cy`,`data-test-id`,`data-qa-id`,`data-testing`,`data-component`,`data-element`,`data-source-file`],El=[Fl,Ml],Dl=[Fl,Nl,Pl];function Ol(e,t){if(!e.isConnected)return;let n=kl(e),r=[];for(let{rootNode:e,target:i}of n){let n=Al(i,e,t);if(!n)return;r.push(n)}return r.join(wl)}function kl(e){let t=[],n=e;for(;n;){let e=n.getRootNode();if(t.push({rootNode:e,target:n}),ul(e))n=e.host;else break}return t.reverse()}function Al(e,t,n){let r,i=e;for(;i&&i.nodeName!==`HTML`;){let e=zl(i,t,El,Bl,n,r);if(e)return Hl(e,r);r=Hl(zl(i,t,Dl,Vl,n,r)||Ll(i),r),i=i.parentElement}return r}function jl(e){return/[0-9]/.test(e)}function Ml(e){if(e.id&&!jl(e.id))return`#${CSS.escape(e.id)}`}function Nl(e){if(e.tagName===`BODY`)return;let t=e.classList;for(let n=0;n<t.length;n+=1){let r=t[n];if(!jl(r))return`${CSS.escape(e.tagName)}.${CSS.escape(r)}`}}function Pl(e){return CSS.escape(e.tagName)}function Fl(e,t){if(t){let e=n(t);if(e)return e}for(let e of Tl){let t=n(e);if(t)return t}function n(t){if(e.hasAttribute(t))return`${CSS.escape(e.tagName)}${Il(t,e.getAttribute(t))}`}}function Il(e,t){return`[${e}="${CSS.escape(t)}"]`}function Ll(e){let t=Rl(e);return`${CSS.escape(e.tagName)}:nth-of-type(${t})`}function Rl(e){let t=e.parentNode.firstElementChild,n=1;for(;t&&t!==e;)t.tagName===e.tagName&&(n+=1),t=t.nextElementSibling;return n}function zl(e,t,n,r,i,a){for(let o of n){let n=o(e,i);if(n&&r(e,t,n,a))return n}}function Bl(e,t,n,r){return t.querySelectorAll(Hl(n,r)).length===1}function Vl(e,t,n,r){let i;if(r===void 0)i=e=>e.matches(n);else{let e=Hl(`${n}:scope`,r);i=t=>t.querySelector(e)!==null}let a=e.previousElementSibling;for(;a;){if(i(a))return!1;a=a.previousElementSibling}for(a=e.nextElementSibling;a;){if(i(a))return!1;a=a.nextElementSibling}return!0}function Hl(e,t){return t?`${e}>${t}`:e}var X={IGNORE:`ignore`,HIDDEN:`hidden`,ALLOW:Je.ALLOW,MASK:Je.MASK,MASK_USER_INPUT:Je.MASK_USER_INPUT,MASK_UNLESS_ALLOWLISTED:Je.MASK_UNLESS_ALLOWLISTED},Ul=`data-dd-privacy`,Wl=`hidden`,Gl=`dd-privacy-`,Kl=`data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==`,ql={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0};function Jl(e){return`[${Ul}="${e}"], .${Gl}${e}`}function Yl(e,t,n){if(n?.has(e))return n.get(e);let r=fl(e),i=r?Yl(r,t,n):t,a=Xl(Zl(e),i);return n&&n.set(e,a),a}function Xl(e,t){switch(t){case X.HIDDEN:case X.IGNORE:return t}switch(e){case X.ALLOW:case X.MASK:case X.MASK_USER_INPUT:case X.MASK_UNLESS_ALLOWLISTED:case X.HIDDEN:case X.IGNORE:return e;default:return t}}function Zl(e){if(cl(e)){if(e.tagName===`BASE`)return X.ALLOW;if(e.tagName===`INPUT`){let t=e;if(t.type===`password`||t.type===`email`||t.type===`tel`||t.type===`hidden`)return X.MASK;let n=t.getAttribute(`autocomplete`);if(n&&(n.startsWith(`cc-`)||n.endsWith(`-password`)))return X.MASK}if(e.matches(Jl(X.HIDDEN)))return X.HIDDEN;if(e.matches(Jl(X.MASK)))return X.MASK;if(e.matches(Jl(X.MASK_UNLESS_ALLOWLISTED)))return X.MASK_UNLESS_ALLOWLISTED;if(e.matches(Jl(X.MASK_USER_INPUT)))return X.MASK_USER_INPUT;if(e.matches(Jl(X.ALLOW)))return X.ALLOW;if(ru(e))return X.IGNORE}}function Ql(e,t){switch(t){case X.MASK:case X.HIDDEN:case X.IGNORE:return!0;case X.MASK_UNLESS_ALLOWLISTED:return ol(e)?eu(e.parentNode)?!0:!iu(e.textContent||``):eu(e);case X.MASK_USER_INPUT:return ol(e)?eu(e.parentNode):eu(e);default:return!1}}function $l(e,t,n,r,i){if(r!==X.MASK&&r!==X.MASK_UNLESS_ALLOWLISTED||t===`data-dd-privacy`||Tl.includes(t)||t===i.actionNameAttribute)return!1;switch(t){case`title`:case`alt`:case`placeholder`:case`aria-label`:case`name`:return!0}return!!(e===`A`&&t===`href`||e===`IFRAME`&&t===`srcdoc`||n&&t.startsWith(`data-`)||(e===`IMG`||e===`SOURCE`)&&(t===`src`||t===`srcset`))}function eu(e){if(!e||e.nodeType!==e.ELEMENT_NODE)return!1;let t=e;if(t.tagName===`INPUT`)switch(t.type){case`button`:case`color`:case`reset`:case`submit`:return!1}return!!ql[t.tagName]}function tu(e){return e.replace(/\S/g,`x`)}function nu(e,t){let n=e.parentElement?.tagName,r=e.textContent||``,i=t;return n===`SCRIPT`||i===X.HIDDEN?r=`***`:Ql(e,i)&&(n===`DATALIST`||n===`SELECT`||n===`OPTGROUP`||(r=n===`OPTION`?`***`:tu(r))),n===`HEAD`&&!r.trim()?``:r}function ru(e){if(e.nodeName===`SCRIPT`)return!0;if(e.nodeName===`LINK`){let e=t(`rel`);return/preload|prefetch/i.test(e)&&t(`as`)===`script`||e===`shortcut icon`||e===`icon`}if(e.nodeName===`META`){let n=t(`name`),r=t(`rel`),i=t(`property`);return/^msapplication-tile(image|color)$/.test(n)||n===`application-name`||r===`icon`||r===`apple-touch-icon`||r===`shortcut icon`||n===`keywords`||n===`description`||/^(og|twitter|fb):/.test(i)||/^(og|twitter):/.test(n)||n===`pinterest`||n===`robots`||n===`googlebot`||n===`bingbot`||e.hasAttribute(`http-equiv`)||n===`author`||n===`generator`||n===`framework`||n===`publisher`||n===`progid`||/^article:/.test(i)||/^product:/.test(i)||n===`google-site-verification`||n===`yandex-verification`||n===`csrf-token`||n===`p:domain_verify`||n===`verify-v1`||n===`verification`||n===`shopify-checkout-api-token`}function t(t){return(e.getAttribute(t)||``).toLowerCase()}return!1}function iu(e){return!e?.trim()||window.$DD_ALLOW?.has(e.toLocaleLowerCase())||!1}function au(e,t){return iu(e)?e:t||tu(e)}function ou(){let e,t=window.visualViewport;return e=t?t.pageLeft-t.offsetLeft:window.scrollX===void 0?window.pageXOffset||0:window.scrollX,Math.round(e)}function su(){let e,t=window.visualViewport;return e=t?t.pageTop-t.offsetTop:window.scrollY===void 0?window.pageYOffset||0:window.scrollY,Math.round(e)}var cu;function lu(){return cu||=uu(),cu}function uu(){return new E(e=>{let{throttled:t}=Lt(()=>{e.notify(du())},200);return B(window,z.RESIZE,t,{capture:!0,passive:!0}).stop})}function du(){let e=window.visualViewport;return e?{width:Number(e.width*e.scale),height:Number(e.height*e.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}var fu=function(e){return e[e.OFF=0]=`OFF`,e[e.SAMPLED=1]=`SAMPLED`,e[e.FORCED=2]=`FORCED`,e}({});function pu(e,t){return hr()?+!!mr(fr.RECORDS):Bi(e.id,Ri(t.sessionSampleRate,t.sessionReplaySampleRate))?1:e.isReplayForced?2:0}function mu(){let e=new E,{stop:t}=R(window,`open`,()=>e.notify());return{observable:e,stop:t}}function hu(e,t,n,r,i){return{get:a=>{let o=n.findView(a),s=i.findUrl(a),c=t.findTrackedSession(a);if(c&&o&&s){let t=r.findActionId(a);return{application_id:e,session_id:c.id,user_action:t?{id:t}:void 0,view:{id:o.id,name:o.name,referrer:s.referrer,url:s.url}}}}}}function gu(){return vu(64)}function _u(){return vu(63)}function vu(e){let t=crypto.getRandomValues(new Uint32Array(2)),n=BigInt(t[0])+(BigInt(t[1])<<32n);return e===63&&(n&=9223372036854775807n),n}function yu(e){return e.toString(16).padStart(16,`0`)}function bu(e){e.status===0&&!e.isAborted&&(e.traceId=void 0,e.spanId=void 0,e.traceSampled=void 0)}function xu(e,t,n,r){return{clearTracingIfNeeded:bu,traceFetch:i=>Su(e,i,t,n,r,e=>{if(i.input instanceof Request&&!i.init?.headers)i.input=new Request(i.input),Object.keys(e).forEach(t=>{i.input.headers.append(t,e[t])});else{i.init=wt(i.init);let t=[];i.init.headers instanceof Headers?i.init.headers.forEach((e,n)=>{t.push([n,e])}):Array.isArray(i.init.headers)?i.init.headers.forEach(e=>{t.push(e)}):i.init.headers&&Object.keys(i.init.headers).forEach(e=>{t.push([e,i.init.headers[e]])}),i.init.headers=t.concat(br(e))}}),traceXhr:(i,a)=>Su(e,i,t,n,r,e=>{try{Object.keys(e).forEach(t=>{a.setRequestHeader(t,e[t])})}catch{}})}}function Su(e,t,n,r,i,a){let o=n.findTrackedSession();if(!o)return;let s=e.allowedTracingUrls.find(e=>ht([e.match],t.url,!0));if(!s)return;let c=Bi(o.id,Ri(e.sessionSampleRate,e.traceSampleRate)),l=hr()?pr()?.getIsTraceSampled()??c:c;(l||e.traceContextInjection===Ye.ALL)&&(t.traceSampled=l,t.traceId=gu(),t.spanId=_u(),a(Cu(t.traceId,t.spanId,t.traceSampled,o.id,s.propagatorTypes,r,i,e)))}function Cu(e,t,n,r,i,a,o,s){let c={};if(i.forEach(r=>{switch(r){case`datadog`:Object.assign(c,{"x-datadog-origin":`rum`,"x-datadog-parent-id":t.toString(),"x-datadog-sampling-priority":n?`1`:`0`,"x-datadog-trace-id":e.toString()});break;case`tracecontext`:Object.assign(c,{traceparent:`00-0000000000000000${yu(e)}-${yu(t)}-0${n?`1`:`0`}`,tracestate:`dd=s:${n?`1`:`0`};o:rum`});break;case`b3`:Object.assign(c,{b3:`${yu(e)}-${yu(t)}-${n?`1`:`0`}`});break;case`b3multi`:Object.assign(c,{"X-B3-TraceId":yu(e),"X-B3-SpanId":yu(t),"X-B3-Sampled":n?`1`:`0`})}}),s.propagateTraceBaggage){let e={"session.id":r},t=a.getContext().id;typeof t==`string`&&(e[`user.id`]=t);let n=o.getContext().id;typeof n==`string`&&(e[`account.id`]=n);let i=Object.entries(e).map(([e,t])=>`${e}=${encodeURIComponent(t)}`).join(`,`);i&&(c.baggage=i)}return c}var wu=32*vn;function Tu(e,t){let n=Ou(e,t.trackPayload);if(n){if(t.trackResponseErrors&&e.responseBody){let t=Eu(e.responseBody);t&&(n.error_count=t.length,n.errors=t)}return n}}function Eu(e){let t=Ct(e);if(!t||typeof t!=`object`)return;let n=t;if(ji(n.errors))return n.errors.map(e=>({message:e.message,path:e.path,locations:e.locations,code:e.extensions?.code}))}function Du(e,t){return t.allowedGraphQlUrls.find(t=>ht([t.match],e))}function Ou(e,t=!1){let n;if(e.method===`POST`?n=ku(e.requestBody):e.method===`GET`&&(n=Au(e.url)),n)return ju(n,t)}function ku(e){if(!e||typeof e!=`string`)return;let t=Ct(e);if(t)return{query:t.query,operationName:t.operationName,variables:t.variables?JSON.stringify(t.variables):void 0,operationType:t.operationType}}function Au(e){let t=S(e).searchParams,n=t.get(`variables`),r=n&&Ct(n)!==void 0?n:void 0;return{query:t.get(`query`)||void 0,operationName:t.get(`operationName`)||void 0,variables:r,operationType:t.get(`operationType`)||void 0}}function ju(e,t){let n,r,i;if(e.query){let i=e.query.trim();n=Mu(i),t&&(r=nt(i,wu,`...`))}if(!n){let t=e.operationType;(t===`query`||t===`mutation`||t===`subscription`)&&(n=t)}return e.variables&&(i=e.variables),{operationType:n,operationName:e.operationName,variables:i,payload:r}}function Mu(e){return e.match(/^\s*(query|mutation|subscription)\b/i)?.[1]}var Nu=1;function Pu(e,t,n,r,i,a){let o=xu(t,n,r,i);Fu(e,o,a),Iu(e,t,o,a)}function Fu(e,t,n){let r=[];return r.push(Qa().subscribe(e=>{e.state===`start`&&nl(e.url)&&(t.traceXhr(e,e.xhr),Lu(e))})),r.push(n.subscribe(({data:n,type:r})=>{if(r!==os.XHR)return;let i=n;if(nl(i.url))switch(i.state){case`start`:Lu(i),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case`complete`:t.clearTracingIfNeeded(i),e.notify(8,{...i,type:is.XHR,isAbortedOnStart:!1})}})),{stop:()=>r.forEach(e=>e.unsubscribe())}}function Iu(e,t,n,r){let i=[];return i.push(so({responseBodyAction:e=>Du(e.url,t)?.trackResponseErrors?io.COLLECT:io.IGNORE}).subscribe(e=>{e.state===`start`&&nl(e.url)&&(n.traceFetch(e),Lu(e))})),i.push(r.subscribe(({data:t,type:r})=>{if(r!==os.FETCH)return;let i=t;if(nl(i.url))switch(i.state){case`start`:Lu(i),e.notify(7,{requestIndex:i.requestIndex,url:i.url});break;case`resolve`:n.clearTracingIfNeeded(i),e.notify(8,{...i,duration:A(i.startClocks.timeStamp,k()),type:is.FETCH,requestBody:i.init?.body})}})),{stop:()=>i.forEach(e=>e.unsubscribe())}}function Lu(e){e.requestIndex||=Nu++}var Ru=`websocket-connecting`,zu=`websocket-closed`;function Bu(e,t,n){let r=Vu(e,mo(),t,n),i=e.subscribe(10,({endClocks:e})=>{r.flushOpenConnections(`session_end`,e)});return{stop:()=>{i.unsubscribe(),r.flushOpenConnections(`session_end`),r.stop()}}}function Vu(e,t,n,r){let i=new Map;function a(t,i,a){let o=Wu(t,i,a,n);e.notify(9,o),r({id:N(),name:zu,type:Is.DURATION,startClocks:o.endClocks,duration:0,context:V({url:o.url,connection_id:o.connectionId})})}let o=t.subscribe(e=>{switch(e.state){case`connecting`:{let t=N(),a=n.findView(e.startClocks.relative)?.id,o=Hu(e.url),s={webSocket:e.instance,connectionId:t,url:o,startClocks:e.startClocks,startViewId:a,messagesIn:{count:0,size:0},messagesOut:{count:0,size:0},longestInboundSilence:0,bufferedAmountMax:0};i.set(e.instance,s),r({id:N(),name:Ru,type:Is.DURATION,startClocks:e.startClocks,duration:0,context:V({url:o,connection_id:t})});return}case`open`:{let t=i.get(e.instance);if(!t)return;t.openClocks=e.openClocks,t.protocol=e.protocol,t.setupDuration=A(t.startClocks.timeStamp,e.openClocks.timeStamp);return}case`message-in`:{let t=i.get(e.instance);if(!t)return;t.messagesIn.count+=1,t.messagesIn.size+=e.size,Uu(t,e.at,`in`);return}case`message-out`:{let t=i.get(e.instance);if(!t)return;e.bufferedAmountPreSend>t.bufferedAmountMax&&(t.bufferedAmountMax=e.bufferedAmountPreSend),t.messagesOut.count+=1,t.messagesOut.size+=e.size,Uu(t,e.at,`out`);return}case`closed`:{let t=i.get(e.instance);if(!t)return;i.delete(e.instance),a(t,e,`close_event`);return}}});return{flushOpenConnections:(e,t=M())=>{i.forEach(n=>{a(n,{at:t},e)}),i.clear()},stop:()=>{o.unsubscribe(),i.clear()}}}function Hu(e){let t=S(e);return t.search=``,t.href}function Uu(e,t,n){if(e.openClocks===void 0)return;let r=A(e.openClocks.timeStamp,t.timeStamp);if(n===`in`&&e.firstMessageInOffset===void 0?e.firstMessageInOffset=r:n===`out`&&e.firstMessageOutOffset===void 0&&(e.firstMessageOutOffset=r),n===`in`){if(e.lastMessageInAt!==void 0){let n=A(e.lastMessageInAt,t.timeStamp);n>e.longestInboundSilence&&(e.longestInboundSilence=n)}e.lastMessageInAt=t.timeStamp}}function Wu(e,t,n,r){let i=t.at,a=n===`session_end`?r.findView(i.relative,{returnInactive:!0})?.id:r.findView(i.relative)?.id,o=e.lastMessageInAt===void 0?void 0:A(e.lastMessageInAt,i.timeStamp),{openClocks:s,...c}=e;return{...c,endClocks:i,endViewId:a,inboundIdleDurationBeforeClose:o,trackingEndReason:n,handshakeSucceeded:s!==void 0,setupDuration:e.setupDuration??A(e.startClocks.timeStamp,i.timeStamp),closeCode:t.code,closeReason:t.reason,wasClean:t.wasClean}}function Gu(e){return us(e)&&e<0?void 0:e}function Ku(e,t,n,r,i,a){let o=P(qu)(e,t,n,r),s,c=!1,l=F(w(()=>p({hadActivity:!1})),100),u=a===void 0?void 0:F(w(()=>p({hadActivity:!0,end:k()})),a),d=o.subscribe(({isBusy:e})=>{I(l),I(s);let t=k();e||(s=F(w(()=>p({hadActivity:!0,end:t})),100))}),f=()=>{c=!0,I(l),I(s),I(u),d.unsubscribe()};function p(e){c||(f(),i(e))}return{stop:f}}function qu(e,t,n,r){return new E(i=>{let a=[],o,s=0;return a.push(t.subscribe(e=>{e.every(Yu)||c()}),n.subscribe(c),hl({type:`resource`}).subscribe(e=>{e.some(e=>!Ju(r,e.name))&&c()}),e.subscribe(7,e=>{Ju(r,e.url)||(o===void 0&&(o=e.requestIndex),s+=1,c())}),e.subscribe(8,e=>{Ju(r,e.url)||o===void 0||e.requestIndex<o||(--s,c())})),()=>{a.forEach(e=>e.unsubscribe())};function c(){i.notify({isBusy:s>0})}})}function Ju(e,t){return ht(e.excludedActivityUrls,t)}function Yu(e){let t=e.type===`characterData`?e.target.parentElement:e.target;return!!(t&&cl(t)&&t.matches(`[data-dd-excluded-activity-mutations], [data-dd-excluded-activity-mutations] *`))}function Xu({lifeCycle:e,isChildEvent:t,onChange:n=L}){let r={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},i=e.subscribe(14,e=>{if(!(e.type===`view`||e.type===`vital`||!t(e)))switch(e.type){case J.ERROR:r.errorCount+=1,n();break;case J.ACTION:r.actionCount+=1,e.action.frustration&&(r.frustrationCount+=e.action.frustration.type.length),n();break;case J.LONG_TASK:r.longTaskCount+=1,n();break;case J.RESOURCE:e._dd?.discarded||(r.resourceCount+=1,n())}});return{stop:()=>{i.unsubscribe()},eventCounts:r}}var Zu=5*O;function Qu(e){let t=Li({expireDelay:Zu}),n=new Map;function r(e){n.delete(e.key),e.eventCounts?.stop()}function i(){n.forEach(e=>{r(e)}),t.reset()}let a=e.subscribe(11,i);function o(i,a,o,s){let c=N(),l=t.add(c,a.relative),u=n.get(i);u&&r(u);let d={id:c,key:i,startClocks:a,data:o,historyEntry:l,eventCounts:s?.isChildEvent?Xu({lifeCycle:e,isChildEvent:s.isChildEvent(c)}):void 0};return n.set(i,d),d}function s(e,t,i){let a=n.get(e);if(!a)return;let o=i?f(a.data,i):a.data;a.historyEntry.close(t.relative);let s=A(a.startClocks.timeStamp,t.timeStamp),c=a.eventCounts?.eventCounts;return r(a),{...o,id:a.id,startClocks:a.startClocks,duration:s,counts:c}}function c(e){let t=n.get(e);if(!t)return;let i=t.eventCounts?.eventCounts;return r(t),t.historyEntry.remove(),{...t.data,id:t.id,startClocks:t.startClocks,counts:i}}function l(e){return t.findAll(e)}function u(e){return n.get(e)?.eventCounts?.eventCounts}function d(){a.unsubscribe(),i(),t.stop()}return{start:o,stop:s,discard:c,getCounts:u,findId:l,stopAll:d}}var $u=[`HTML`,`BODY`],ed=2*vn,td=Tl.concat([`role`,`type`,`disabled`,`readonly`,`tabindex`,`draggable`,`target`,`rel`,`download`,`method`,`action`,`enctype`,`autocomplete`]);function nd(e,t){let n=e.filter(e=>e instanceof Element&&!$u.includes(e.tagName));if(n.length===0)return``;let r=t?[t].concat(td):td,i=``;for(let e of n){let t=rd(e,r);if(i+=t,i.length>=ed)return nt(i,ed)}return i}function rd(e,t){let n=Pl(e),r=Ml(e),i=id(e),a=od(e,t),o=ad(e);return`${n}${r||``}${a}${i}${o};`}function id(e){return Array.from(e.classList).filter(e=>!jl(e)).sort().map(e=>`.${CSS.escape(e)}`).join(``)}function ad(e){let t=Array.from(e.parentNode.children);if(t.length<=1)return``;let n=t.filter(t=>t.tagName===e.tagName),r=t.indexOf(e),i=Rl(e);return`:nth-child(${r+1})${n.length>1?`:nth-of-type(${i})`:``}`}function od(e,t){let n=[],r=Array.from(e.attributes);for(let e of r)t.includes(e.name)&&n.push(Il(e.name,e.value));return n.sort().join(``)}var sd=D;function cd(e,t){let n=[],r=0,i;a(e);function a(e){e.stopObservable.subscribe(o),n.push(e),I(i),i=F(s,sd)}function o(){r===1&&n.every(e=>e.isStopped())&&(r=2,t(n))}function s(){I(i),r===0&&(r=1,o())}return{tryAppend:e=>r===0?n.length>0&&!ld(n[n.length-1].event,e.event)?(s(),!1):(a(e),!0):!1,stop:()=>{s()}}}function ld(e,t){return e.target===t.target&&ud(e,t)<=100&&e.timeStamp-t.timeStamp<=sd}function ud(e,t){return Math.sqrt((e.clientX-t.clientX)**2+(e.clientY-t.clientY)**2)}function dd(e,t,n=X.ALLOW){let r=new Map,{actionNameAttribute:i}=t,a=fd(e,`data-dd-action-name`)||i&&fd(e,i);return a?{name:a,nameSource:`custom_attribute`}:n===X.MASK?{name:Cl,nameSource:`mask_placeholder`}:_d(e,md,t,r)||_d(e,hd,t,r)||{name:``,nameSource:`blank`}}function fd(e,t){let n=pd(e,`[${t}]`);if(n)return yd(vd(n.getAttribute(t).trim()))}function pd(e,t){let n=e;for(;n;){if(n.matches(t))return n;n=pl(n)}return null}var md=[(e,t,n)=>{if(`labels`in e&&e.labels&&e.labels.length>0)return Sd(e.labels[0],t,n)},e=>{if(e.nodeName===`INPUT`){let t=e,n=t.getAttribute(`type`);if(n===`button`||n===`submit`||n===`reset`)return{name:t.value,nameSource:`text_content`}}},(e,t,n)=>{if(e.nodeName===`BUTTON`||e.nodeName===`LABEL`||e.getAttribute(`role`)===`button`)return Sd(e,t,n)},(e,t,n)=>xd(e,`aria-label`,t,n),(e,t,n)=>{let r=e.getAttribute(`aria-labelledby`);if(r)return{name:r.split(/\s+/).map(t=>bd(e,t)).filter(e=>!!e).map(e=>Cd(e,t,n)).join(` `),nameSource:`text_content`}},(e,t,n)=>xd(e,`alt`,t,n),(e,t,n)=>xd(e,`name`,t,n),(e,t,n)=>xd(e,`title`,t,n),(e,t,n)=>xd(e,`placeholder`,t,n),(e,t,n)=>{if(`options`in e&&e.options.length>0)return Sd(e.options[0],t,n)}],hd=[(e,t,n)=>Sd(e,t,n)],gd=10;function _d(e,t,n,r){let i=e,a=0;for(;a<=gd&&i&&i.nodeName!==`BODY`&&i.nodeName!==`HTML`&&i.nodeName!==`HEAD`;){for(let e of t){let t=e(i,n,r);if(t){let{name:e,nameSource:n}=t,r=e?.trim();if(r)return{name:yd(vd(r)),nameSource:n}}}if(i.nodeName===`FORM`)break;i=pl(i),a+=1}}function vd(e){return e.replace(/\s+/g,` `)}function yd(e){return e.length>100?`${nt(e,100)} [...]`:e}function bd(e,t){let n=e.getRootNode();if(n instanceof ShadowRoot){let e=n.getElementById(t);if(e)return e}return e.ownerDocument?e.ownerDocument.getElementById(t):null}function xd(e,t,n,r){let{enablePrivacyForActionName:i,defaultPrivacyLevel:a}=n,o=e.getAttribute(t);if(o&&i){let i=Yl(e,a,r);$l(e.tagName,t,o,i,n)&&(o=au(o,Cl))}else o||=``;return{name:o,nameSource:`standard_attribute`}}function Sd(e,t,n){return{name:Cd(e,t,n)||``,nameSource:`text_content`}}function Cd(e,t,n){if(e.isContentEditable)return;let{enablePrivacyForActionName:r,actionNameAttribute:i,defaultPrivacyLevel:a}=t,o=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,c),s=``;for(;o.nextNode();){let e=o.currentNode;if(cl(e)){(e.nodeName===`BR`||e.nodeName===`P`||[`block`,`flex`,`grid`,`list-item`,`table`,`table-caption`].includes(getComputedStyle(e).display))&&(s+=` `);continue}s+=e.textContent||``}return s.replace(/\s+/g,` `).trim();function c(e){let t=Yl(e,a,n);if(r&&t&&Ql(e,t))return NodeFilter.FILTER_REJECT;if(cl(e)){if(e.hasAttribute(`data-dd-action-name`)||i&&e.hasAttribute(i))return NodeFilter.FILTER_REJECT;let t=getComputedStyle(e);if(t.visibility!==`visible`||t.display===`none`||t.contentVisibility&&t.contentVisibility!==`visible`)return NodeFilter.FILTER_REJECT}return NodeFilter.FILTER_ACCEPT}}function wd({onPointerDown:e,onPointerUp:t}){let n,r={selection:!1,input:!1,scroll:!1},i,a=[B(window,z.POINTER_DOWN,t=>{Ed(t)&&(n=Td(),r={selection:!1,input:!1,scroll:!1},i=e(t))},{capture:!0}),B(window,z.SELECTION_CHANGE,()=>{(!n||!Td())&&(r.selection=!0)},{capture:!0}),B(window,z.SCROLL,()=>{r.scroll=!0},{capture:!0,passive:!0}),B(window,z.POINTER_UP,e=>{if(Ed(e)&&i){let n=r;t(i,e,()=>n),i=void 0}},{capture:!0}),B(window,z.INPUT,()=>{r.input=!0},{capture:!0})];return{stop:()=>{a.forEach(e=>e.stop())}}}function Td(){let e=window.getSelection();return!e||e.isCollapsed}function Ed(e){return e.target instanceof Element&&e.isPrimary!==!1}var Dd=3;function Od(e,t){if(kd(e))return t.addFrustration(Fs.RAGE_CLICK),e.some(jd)&&t.addFrustration(Fs.DEAD_CLICK),t.hasError&&t.addFrustration(Fs.ERROR_CLICK),{isRage:!0};let n=e.some(e=>e.getUserActivity().selection);return e.forEach(e=>{e.hasError&&e.addFrustration(Fs.ERROR_CLICK),jd(e)&&!n&&e.addFrustration(Fs.DEAD_CLICK)}),{isRage:!1}}function kd(e){if(e.some(e=>e.getUserActivity().selection||e.getUserActivity().scroll))return!1;for(let t=0;t<e.length-2;t+=1)if(e[t+Dd-1].event.timeStamp-e[t].event.timeStamp<=1e3)return!0;return!1}var Ad=`input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *`;function jd(e){if(e.hasPageActivity||e.getUserActivity().input||e.getUserActivity().scroll)return!1;let t=e.event.target;return t.tagName===`LABEL`&&t.hasAttribute(`for`)&&(t=document.getElementById(t.getAttribute(`for`))),!t?.matches(Ad)}var Md=10*D,Nd=new Map;function Pd(e){let t=Nd.get(e);return Nd.delete(e),t}function Fd(e,t){Nd.set(e,t),Nd.forEach((e,t)=>{A(t,Me())>Md&&Nd.delete(t)})}function Id(e){return t=>t.action?.id?.includes(e)??!1}function Ld(e,t,n,r){let i=Qu(e),a=new E,o;e.subscribe(5,l),e.subscribe(12,l);let{stop:s}=wd({onPointerDown:i=>Rd(r,e,t,i,n),onPointerUp:({clickActionBase:o,hadActivityOnPointerDown:s},l,u)=>{zd(r,e,t,n,i,a,c,o,l,u,s)}});return{stop:()=>{l(),a.notify(),s(),i.stopAll()},findActionId:i.findId};function c(e){if(!o?.tryAppend(e)){let t=e.clone();o=cd(e,e=>{Ud(e,t),o=void 0})}}function l(){o&&o.stop()}}function Rd(e,t,n,r,i){let a;if(a=e.enablePrivacyForActionName?Yl(Vd(r),e.defaultPrivacyLevel):X.ALLOW,a===X.HIDDEN)return;let o=Bd(r,a,e),s=!1;return Ku(t,n,i,e,e=>{s=e.hadActivity},100),{clickActionBase:o,hadActivityOnPointerDown:()=>s}}function zd(e,t,n,r,i,a,o,s,c,l,u){let d=Hd(t,i,l,s,c);o(d);let f=s?.target?.selector;f&&Fd(c.timeStamp,f);let{stop:p}=Ku(t,n,r,e,e=>{e.hadActivity&&e.end<d.startClocks.timeStamp?d.discard():e.hadActivity?d.stop(e.end):u()?d.stop(d.startClocks.timeStamp):d.stop()},Md),m=t.subscribe(5,({endClocks:e})=>{d.stop(e.timeStamp)}),h=t.subscribe(12,()=>{d.stop(k())}),g=a.subscribe(()=>{d.stop()});d.stopObservable.subscribe(()=>{h.unsubscribe(),m.unsubscribe(),p(),g.unsubscribe()})}function Bd(e,t,n){let r=Vd(e),i=r.getBoundingClientRect(),a=Ol(r,n.actionNameAttribute),o=nd(e.composedPath(),n.actionNameAttribute);a&&Fd(e.timeStamp,a);let{name:s,nameSource:c}=dd(r,n,t);return{type:Ps.CLICK,target:{width:Math.round(i.width),height:Math.round(i.height),selector:a,composedPathSelector:o||void 0},position:{x:Math.round(e.clientX-i.left),y:Math.round(e.clientY-i.top)},name:s,nameSource:c}}function Vd(e){if(e.composed&&ll(e.target)&&typeof e.composedPath==`function`){let t=e.composedPath();if(t.length>0&&t[0]instanceof Element)return t[0]}return e.target}function Hd(e,t,n,r,i){let a=N(),o=Pe(i.timeStamp),s=t.start(a,o,r,{isChildEvent:Id});e.notify(16,s);let c=0,l,u=[],d=new E;function f(e){c===0&&(c=1,l=e?t.stop(a,Fe(e)):t.discard(a),d.notify())}return{event:i,stop:f,stopObservable:d,get hasError(){let e=l?.counts??t.getCounts(a);return e?e.errorCount>0:!1},get hasPageActivity(){return l&&`duration`in l},getUserActivity:n,addFrustration:e=>{u.push(e)},get startClocks(){return o},isStopped:()=>c===1||c===2,clone:()=>Hd(e,t,n,r,i),validate:t=>{if(f(),c!==1||!l)return;let n={frustrationTypes:u,events:t??[i],event:i,...l,counts:l.counts};e.notify(0,n),c=2},discard:()=>{f(),c=2}}}function Ud(e,t){let{isRage:n}=Od(e,t);n?(e.forEach(e=>e.discard()),t.stop(k()),t.validate(e.map(e=>e.event))):(t.discard(),e.forEach(e=>e.validate()))}function Wd(e,t){let n=Qu(e);function r(t,r={},i=M()){let a=r.actionKey??t,o=n.start(a,i,{name:t,...r},{isChildEvent:Id});e.notify(16,o)}function i(e,r={},i=M()){let a=r.actionKey??e,o=n.stop(a,i,r);if(!o)return;let s=[];o.counts&&o.counts.errorCount>0&&s.push(Fs.ERROR_CLICK),t({...o,type:o.type||Ps.CUSTOM,frustrationTypes:s})}function a(e){t({id:N(),frustrationTypes:[],...e})}return{addAction:a,startAction:r,stopAction:i,findActionId:n.findId,stop:n.stopAll}}function Gd(e,t,n,r,i){let{unsubscribe:a}=e.subscribe(0,t=>{e.notify(13,Kd(t))}),o=L,s;i.trackUserInteractions&&(s=Ld(e,n,r,i));let c=Wd(e,t=>{e.notify(13,Kd(t))}),l={findActionId:e=>{let t=c.findActionId(e),n=s?.findActionId(e)??[];return t.concat(n)}};return t.assemble.register(({startTime:e,eventType:t})=>{if(t!==J.ERROR&&t!==J.RESOURCE&&t!==J.LONG_TASK)return Pr;let n=t===J.LONG_TASK?je(e,1):e,r=l.findActionId(n);return r.length?{type:t,action:{id:r}}:Pr}),t.assembleTelemetry.register(({startTime:e})=>({action:{id:l.findActionId(e)}})),{addAction:c.addAction,startAction:c.startAction,stopAction:c.stopAction,actionContexts:l,stop:()=>{a(),o(),c.stop(),s?.stop()}}}function Kd(e){let t=qd(e),n=Gu(j(e.duration));return{rawRumEvent:{type:J.ACTION,date:e.startClocks.timeStamp,action:{id:e.id,target:{name:e.name},type:e.type,...n!==void 0&&{loading_time:n},...e.counts&&{error:{count:e.counts.errorCount},long_task:{count:e.counts.longTaskCount},resource:{count:e.counts.resourceCount}},frustration:{type:e.frustrationTypes}},...t?{_dd:{action:{target:{selector:e.target?.selector||void 0,width:e.target?.width||void 0,height:e.target?.height||void 0,composed_path_selector:e.target?.composedPathSelector},position:e.position,name_source:e.nameSource}}}:{context:e.context}},duration:e.duration,startClocks:e.startClocks,domainContext:t?{events:e.events}:{handlingStack:e.handlingStack}}}function qd(e){return`events`in e}function Jd(e){let t=Ci([Si.cspViolation,Si.intervention]).subscribe(t=>e.notify(t));return{stop:()=>{t.unsubscribe()}}}function Yd(e,t){let n=new E;return t.subscribe(({data:e,type:t})=>{t===os.RUNTIME_ERROR?n.notify(e):t===os.CONSOLE&&e.api===g.error&&n.notify(e.error)}),Jd(n),n.subscribe(t=>e.notify(15,{error:t})),Xd(e)}function Xd(e){return e.subscribe(15,({error:t})=>{e.notify(13,Zd(t))}),{addError:({error:t,handlingStack:n,componentStack:r,startClocks:i,context:a})=>{let o=di({originalError:t,handlingStack:n,componentStack:r,startClocks:i,nonErrorPrefix:Hn.PROVIDED,source:Vn.CUSTOM,handling:Un.HANDLED});o.context=f(o.context,a),e.notify(15,{error:o})}}}function Zd(e){let t={date:e.startClocks.timeStamp,error:{id:N(),message:e.message,source:e.source,stack:e.stack,handling_stack:e.handlingStack,component_stack:e.componentStack,type:e.type,handling:e.handling,causes:e.causes,source_type:`browser`,fingerprint:e.fingerprint,csp:e.csp},_dd:{debug_ids:e.debugIds},type:J.ERROR,context:e.context},n={error:e.originalError,handlingStack:e.handlingStack};return{rawRumEvent:t,startClocks:e.startClocks,domainContext:n}}function Qd(e){return!(e.loadEventEnd>0&&e.domComplete<=0)}function $d(){if(yl(`navigation`)){let e=performance.getEntriesByType(`navigation`)[0];if(e&&Qd(e))return e}let e=ef(),t={entryType:`navigation`,initiatorType:`navigation`,name:window.location.href,startTime:0,duration:e.loadEventEnd,decodedBodySize:0,encodedBodySize:0,transferSize:0,workerStart:0,toJSON:()=>({...t,toJSON:void 0}),...e};return t}function ef(){let e={},t=performance.timing;for(let n in t)if(us(t[n])){let r=n,i=t[r];e[r]=i===0?0:Ie(i)}return e}function tf(e){return e.responseStart>=0&&e.responseStart<=Me()?e.responseStart:void 0}function nf(){if(yl(`resource`))return performance.getEntriesByType(`resource`)}function rf(e,t){let n=nf();if(n)return vr(n,n=>n.name===e&&n.startTime<=t)}var af=2*O;function of(e){let t=sf(e)||cf(e);if(!(!t||t.traceTime<=Ve()-af))return t.traceId}function sf(e){let t=e.querySelector(`meta[name=dd-trace-id]`),n=e.querySelector(`meta[name=dd-trace-time]`);return lf(t?.content,n?.content)}function cf(e){let t=uf(e);if(t)return lf($e(t,`trace-id`),$e(t,`trace-time`))}function lf(e,t){let n=t&&Number(t);if(!(!e||!n))return{traceId:e,traceTime:n}}function uf(e){for(let t=0;t<e.childNodes.length;t+=1){let n=df(e.childNodes[t]);if(n)return n}if(e.body)for(let t=e.body.childNodes.length-1;t>=0;--t){let n=e.body.childNodes[t],r=df(n);if(r)return r;if(!ol(n))break}}function df(e){if(e&&sl(e)){let t=/^\s*DATADOG;(.*?)\s*$/.exec(e.data);if(t)return t[1]}}function ff(e){let t=new Set,n=e.subscribe(8,e=>{t.add(e),t.size>1e3&&t.delete(t.values().next().value)});return{getMatchingRequest(e){let n=1/0,r;for(let i of t){let t=e.startTime-i.startClocks.relative;0<=t&&t<n&&i.url===e.name&&(n=Math.abs(t),r=i)}return r&&t.delete(r),r},stop(){n.unsubscribe()}}}function pf(e,t){function n(e,n={},r=M()){let i=n.resourceKey??e;t.start(i,r,{url:e,...n})}function r(n,r={},i=M()){let a=r.resourceKey??n,o=t.stop(a,i,{context:r.context,type:r.type});if(!o)return;let s=A(o.startClocks.relative,i.relative),c={date:o.startClocks.timeStamp,type:J.RESOURCE,resource:{id:o.id,type:o.type||K.OTHER,url:al(o.url),duration:j(s),method:o.method,status_code:r.statusCode,size:r.size},_dd:{},context:o.context};e.notify(13,{rawRumEvent:c,startClocks:o.startClocks,duration:s,domainContext:{isManual:!0}})}return{startResource:n,stopResource:r}}function mf(e,t){let n=P(xo)(),r=ff(e);e.subscribe(9,n=>{let r=hf(n,t);r&&e.notify(13,r)});let i=hl({type:`resource`,buffered:!0}).subscribe(n=>{for(let i of n)Kc(i)?F(()=>{let n=gf(i,r.getMatchingRequest(i),t);n&&e.notify(13,n)},50):o(()=>gf(i,void 0,t))}),{stop:a}=Ja(`interactive`,()=>{o(()=>gf($d(),void 0,t))});function o(t){n.push(()=>{let n=t();n&&e.notify(13,n)})}let s=Qu(e),c=pf(e,s);return{startResource:c.startResource,stopResource:c.stopResource,stop:()=>{a(),n.stop(),i.unsubscribe(),s.stopAll()}}}function hf(e,t){let n=A(e.startClocks.timeStamp,e.endClocks.timeStamp),r={date:e.startClocks.timeStamp,type:J.RESOURCE,resource:{id:N(),type:K.WEBSOCKET,url:e.url,duration:j(n),websocket:{connection_id:e.connectionId,handshake_succeeded:e.handshakeSucceeded,start_time:e.startClocks.timeStamp,end_time:e.endClocks.timeStamp,start_view_id:e.startViewId,end_view_id:e.endViewId,tracking_end_reason:e.trackingEndReason,close_code:e.closeCode,close_reason:e.closeReason,was_clean:e.wasClean,messages_in:e.messagesIn,messages_out:e.messagesOut,time_to_first_message_in:j(e.firstMessageInOffset),time_to_first_message_out:j(e.firstMessageOutOffset),last_message_in_at:e.lastMessageInAt,longest_inbound_silence:j(e.longestInboundSilence),inbound_idle_duration_before_close:j(e.inboundIdleDurationBeforeClose),buffered_amount_max:e.bufferedAmountMax,protocol:e.protocol,setup_duration:j(e.setupDuration)}},_dd:{discarded:!t.trackResources}};return{startClocks:e.startClocks,duration:n,rawRumEvent:r,domainContext:{isWebSocket:!0,isManual:!1,webSocket:e.webSocket}}}function gf(e,t,n){let r=t?bf(t,n):xf(e,n);if(!n.trackResources&&!r)return;let i=Pe(e.startTime),a=qc(e),o=Cf(t,n);return{startClocks:i,duration:a,rawRumEvent:f({date:i.timeStamp,resource:{id:N(),duration:j(a),type:Wc(e),method:t?.method,status_code:t?t.status:Sf(e.responseStatus),url:t?al(t.url):e.name,protocol:$c(e),delivery_type:el(e),graphql:t&&_f(t,n),render_blocking_status:e.renderBlockingStatus,...tl(e),...Jc(e)},type:J.RESOURCE,_dd:{discarded:!n.trackResources}},r,vf(e),o),domainContext:yf(e,t)}}function _f(e,t){let n=Du(e.url,t);if(n)return Tu(e,n)}function vf(e){let t=e.contentType;if(t)return{resource:{response:{headers:{"content-type":t}}}}}function yf(e,t){return{performanceEntry:e,isManual:!1,isAborted:t?t.isAborted:!1,isWebSocket:!1,handlingStack:t?.handlingStack,requestInit:t?.init,requestInput:t?.input,response:t?.response,error:t?.error,xhr:t?.xhr}}function bf(e,t){if(e.traceSampled&&e.traceId&&e.spanId)return{_dd:{span_id:e.spanId.toString(),trace_id:e.traceId.toString(),rule_psr:t.rulePsr}}}function xf(e,t){if(e.initiatorType!==`navigation`)return;let n=P(of)(document);if(n)return{_dd:{trace_id:n,span_id:_u().toString(),rule_psr:t.rulePsr}}}function Sf(e){return e===0?void 0:e}function Cf(e,t){let n=t.trackResourceHeaders;if(n.length===0||!e)return;let r=n.filter(t=>t.url===void 0||ht([t.url],e.url,!0));if(r.length===0)return;let i=r.filter(e=>e.location===void 0||e.location===`any`||e.location===`response`),a=r.filter(e=>e.location===void 0||e.location===`any`||e.location===`request`),o=i.length>0?wf(e,i):void 0,s=a.length>0?Tf(e,a):void 0;if(!(!o&&!s))return{resource:{request:s?{headers:s}:void 0,response:o?{headers:o}:void 0}}}function wf(e,t){if(e.type===is.FETCH&&e.response)return Af(e.response.headers,t);if(e.type===is.XHR&&e.xhr){let n=e.xhr.getAllResponseHeaders();if(n)try{return Af(new Headers(jf(n)),t)}catch{}}}function Tf(e,t){if(e.type!==is.FETCH)return;let n;return e.init?.headers?n=new Headers(e.init.headers):e.input instanceof Request&&(n=e.input.headers),n?Af(n,t):void 0}var Ef=/(token|cookie|secret|authorization|(api|secret|access|app).?key|(client|connecting|real).?ip|forwarded)/,Df=100,Of=128,kf=e=>wc.includes(e);function Af(e,t){let n={},r=0,i=!1;return e.forEach((e,a)=>{if(r>=Df){i||=(C.warn(`Maximum number of headers (${Df}) has been reached. Further headers are dropped.`),!0);return}let o=a.toLowerCase();if(Ef.test(o))return;let s=t.find(e=>ht([e.name??kf],o));if(!s)return;let{extractor:c}=s,l=c?Ls(e,c):e;l!==void 0&&(l.length>Of&&C.warn(`Header "${o}" value was truncated from ${l.length} to ${Of} characters.`),n[o]=nt(l,Of),r++)}),r>0?n:void 0}function jf(e){let t=[],n=e.trim().split(/\r\n/);for(let e of n){let n=e.indexOf(`:`);n>0&&t.push([e.substring(0,n).trim(),e.substring(n+1).trim()])}return t}function Mf(e,t,n){let{stop:r,eventCounts:i}=Xu({lifeCycle:e,isChildEvent:e=>e.view.id===t,onChange:n});return{stop:r,eventCounts:i}}var Nf=10*O;function Pf(e,t){return{stop:hl({type:`paint`,buffered:!0}).subscribe(n=>{let r=n.find(t=>t.name===`first-contentful-paint`&&t.startTime<e.timeStamp&&t.startTime<Nf);r&&t(r.startTime)}).unsubscribe}}function Ff(e,t){requestAnimationFrame(()=>{requestAnimationFrame(()=>{t(A(e,Me()))})})}function If(e){return zf(()=>{let t=P($d)();Rf(t)||e(Lf(t))})}function Lf(e){return{domComplete:e.domComplete,domContentLoaded:e.domContentLoadedEventEnd,domInteractive:e.domInteractive,loadEvent:e.loadEventEnd,firstByte:tf(e)}}function Rf(e){return e.loadEventEnd<=0}function zf(e){let t,{stop:n}=Ja(`complete`,()=>{t=F(()=>e())});return{stop:()=>{n(),I(t)}}}var Bf=10*O;function Vf(e,t,n,r){let i=1/0,{stop:a}=mn(n,[z.POINTER_DOWN,z.KEY_DOWN],e=>{i=e.timeStamp},{capture:!0,once:!0}),o=0,s=hl({type:`largest-contentful-paint`,buffered:!0}).subscribe(n=>{let a=vr(n,e=>e.entryType===`largest-contentful-paint`&&e.startTime<i&&e.startTime<t.timeStamp&&e.startTime<Bf&&e.size>o);if(a){let t;a.element&&(t=Ol(a.element,e.actionNameAttribute));let n=Hf(a),i=a.startTime,s=Uf(n,i);r({value:i,targetSelector:t,resourceUrl:n,subParts:s}),o=a.size}});return{stop:()=>{a(),s.unsubscribe()}}}function Hf(e){return e.url===``?void 0:e.url}function Uf(e,t){let n=tf($d());if(n===void 0)return;let r=e?rf(e,t):void 0,i=r?Math.max(n,r.requestStart||r.startTime):n,a=Math.min(t,Math.max(i,r?.responseEnd||0));return{loadDelay:i-n,loadTime:a-i,renderDelay:t-a}}function Wf(e,t=window){if(document.visibilityState===`hidden`)return{timeStamp:0,stop:L};if(yl(`visibility-state`)){let t=performance.getEntriesByType(`visibility-state`).filter(e=>e.name===`hidden`).find(t=>t.startTime>=e.relative);if(t)return{timeStamp:t.startTime,stop:L}}let n=1/0,{stop:r}=mn(t,[z.PAGE_HIDE,z.VISIBILITY_CHANGE],e=>{(e.type===z.PAGE_HIDE||document.visibilityState===`hidden`)&&(n=e.timeStamp,r())},{capture:!0});return{get timeStamp(){return n},stop:r}}function Gf(e,t,n,r){let i={},{stop:a}=If(e=>{n(e.loadEvent),i.navigationTimings=e,r()}),o=Wf(t),{stop:s}=Pf(o,e=>{i.firstContentfulPaint=e,r()}),{stop:c}=Vf(e,o,window,e=>{i.largestContentfulPaint=e,r()});function l(){a(),s(),c(),o.stop()}return{stop:l,initialViewMetrics:i}}var Kf=(e,t)=>e*t,qf=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),i=Math.min(e.right,t.right),a=Math.min(e.bottom,t.bottom);return n>=i||r>=a?0:Kf(i-n,a-r)},Jf=e=>{let t=Kf(e.previousRect.width,e.previousRect.height),n=Kf(e.currentRect.width,e.currentRect.height),r=qf(e.previousRect,e.currentRect);return t+n-r};function Yf(e,t,n){if(!tp())return{stop:L};let r=0,i;n({value:0});let a=ep(),o=hl({type:`layout-shift`,buffered:!0}).subscribe(o=>{for(let s of o){if(s.hadRecentInput||s.startTime<t)continue;let{cumulatedValue:o,isMaxValue:c}=a.update(s);if(c){let e=Xf(s.sources);i={target:e?.node?new WeakRef(e.node):void 0,time:A(t,s.startTime),previousRect:e?.previousRect,currentRect:e?.currentRect,devicePixelRatio:window.devicePixelRatio}}if(o>r){r=o;let t=i?.target?.deref();n({value:ls(r,4),targetSelector:t&&Ol(t,e.actionNameAttribute),time:i?.time,previousRect:i?.previousRect?Zf(i.previousRect):void 0,currentRect:i?.currentRect?Zf(i.currentRect):void 0,devicePixelRatio:i?.devicePixelRatio})}}});return{stop:()=>{o.unsubscribe()}}}function Xf(e){let t;for(let n of e)if(n.node&&cl(n.node)){let e=Jf(n);(!t||Jf(t)<e)&&(t=n)}return t}function Zf({x:e,y:t,width:n,height:r}){return{x:e,y:t,width:n,height:r}}var Qf=5*D,$f=D;function ep(){let e=0,t,n,r=0;return{update:i=>{let a=t===void 0||i.startTime-n>=$f||i.startTime-t>=Qf,o;return a?(t=n=i.startTime,r=e=i.value,o=!0):(e+=i.value,n=i.startTime,o=i.value>r,o&&(r=i.value)),{cumulatedValue:e,isMaxValue:o}}}}function tp(){return yl(`layout-shift`)&&`WeakRef`in window}var np,rp=0,ip=1/0,ap=0;function op(){`interactionCount`in performance||np||(np=new window.PerformanceObserver(w(e=>{e.getEntries().forEach(e=>{let t=e;t.interactionId&&(ip=Math.min(ip,t.interactionId),ap=Math.max(ap,t.interactionId),rp=(ap-ip)/7+1)})})),np.observe({type:`event`,buffered:!0,durationThreshold:0}))}var sp=()=>np?rp:window.performance.interactionCount||0,cp=10,lp=1*O,up=8;function dp(e,t,n){if(!hp())return{getInteractionToNextPaint:()=>void 0,setViewEnd:L,stop:L};let r=1/0,i,{getViewInteractionCount:a,stopViewInteractionCount:o}=pp(n),s=fp(a),c=mp(s),l=hl({type:`first-input`,buffered:!0}).subscribe(d),u=hl({type:`event`,durationThreshold:40,buffered:!0}).subscribe(d);function d(e){for(let n of e)n.interactionId&&n.startTime>=t&&n.startTime<=r&&(s.process(n),c.process(n));c.pruneUntracked();let n=s.estimateP98Interaction();n&&f(n)}function f(n){let r=A(t,n.startTime);if(n.duration!==i?.duration||r!==i.startTime){let t=Pd(n.startTime);!t&&n.target&&cl(n.target)&&(t=Ol(n.target,e.actionNameAttribute)),i={duration:n.duration,startTime:r,targetSelector:t}}i.subParts=c.computeSubParts(n,gp(i.duration))}return{getInteractionToNextPaint:()=>{if(i)return{value:gp(i.duration),targetSelector:i.targetSelector,time:i.startTime,subParts:i.subParts};if(a())return{value:0}},setViewEnd:e=>{r=e,o()},stop:()=>{u.unsubscribe(),l.unsubscribe(),c.stop()}}}function fp(e){let t=[];function n(){t.sort((e,t)=>t.duration-e.duration).splice(cp)}return{process(e){let r=t.findIndex(t=>e.interactionId===t.interactionId),i=t[t.length-1];r===-1?(t.length<cp||e.duration>i.duration)&&(t.push(e),n()):e.duration>t[r].duration&&(t[r]=e,n())},estimateP98Interaction(){let n=Math.min(t.length-1,Math.floor(e()/50));return t[n]},isTracked(e){return t.some(t=>t.interactionId===e)}}}function pp(e){op();let t=e===Ns.INITIAL_LOAD?0:sp(),n={stopped:!1};function r(){return sp()-t}return{getViewInteractionCount:()=>n.stopped?n.interactionCount:r(),stopViewInteractionCount:()=>{n={stopped:!0,interactionCount:r()}}}}function mp(e){let t=new Map;function n(e,t){e.startTime=Math.min(t.startTime,e.startTime),e.processingStart=Math.min(t.processingStart,e.processingStart),e.processingEnd=Math.max(t.processingEnd,e.processingEnd)}return{process(e){if(e.interactionId===void 0||!e.processingStart||!e.processingEnd)return;let r=e.startTime+e.duration,i=t.get(e.interactionId);if(i){n(i,e);return}for(let[,i]of t.entries())if(Math.abs(r-i.referenceRenderTime)<=up){n(i,e),t.set(e.interactionId,i);return}t.set(e.interactionId,{startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,referenceRenderTime:r})},pruneUntracked(){for(let[n]of t)e.isTracked(n)||t.delete(n)},computeSubParts(e,n){if(!e.processingStart||!e.processingEnd||e.interactionId===void 0)return;let r=t.get(e.interactionId);if(!r)return;let i=Math.max(r.startTime+n,r.processingStart),a=Math.min(r.processingEnd,i);return{inputDelay:A(r.startTime,r.processingStart),processingDuration:A(r.processingStart,a),presentationDelay:A(a,i)}},stop(){t.clear()}}}function hp(){return yl(`event`)&&window.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype}function gp(e){return Math.min(e,lp)}function _p(e,t,n,r,i,a,o){let s=i===Ns.INITIAL_LOAD,c=!0,l=[],u=Wf(a);function d(){if(!c&&!s&&l.length>0){let e=Math.max(...l);e<u.timeStamp-a.relative&&o(e)}}let{stop:f}=Ku(e,t,n,r,e=>{c&&(c=!1,e.hadActivity&&l.push(A(a.timeStamp,e.end)),d())});return{stop:()=>{f(),u.stop()},setLoadEvent:e=>{s&&(s=!1,l.push(e),d())}}}var vp=D;function yp(e,t,n=xp()){let r=0,i=0,a=0,o=n.subscribe(({scrollDepth:n,scrollTop:o,scrollHeight:s})=>{let c=!1;if(n>r&&(r=n,c=!0),s>i){i=s;let t=Me();a=A(e.relative,t),c=!0}c&&t({maxDepth:Math.min(r,i),maxDepthScrollTop:o,maxScrollHeight:i,maxScrollHeightTime:a})});return{stop:()=>o.unsubscribe()}}function bp(){let e=su(),{height:t}=du();return{scrollHeight:Math.round((document.scrollingElement||document.documentElement).scrollHeight),scrollDepth:Math.round(t+e),scrollTop:e}}function xp(e=vp){return new E(t=>{function n(){t.notify(bp())}let r=Lt(n,e,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,a=new ResizeObserver(w(r.throttled));i&&a.observe(i);let o=B(window,z.SCROLL,r.throttled,{passive:!0});return()=>{r.cancel(),a.disconnect(),o.stop()}})}function Sp(e,t,n,r,i,a,o){let s={},c=!1,l=!1,{stop:u,setLoadEvent:d}=_p(e,t,n,r,a,o,e=>{c||(s.loadingTime=e,i())}),{stop:f}=yp(o,e=>{s.scroll=e}),{stop:p}=Yf(r,o.relative,e=>{s.cumulativeLayoutShift=e,i()}),{stop:m,getInteractionToNextPaint:h,setViewEnd:g}=dp(r,o.relative,a);return{stop:()=>{u(),p(),f()},stopINPTracking:m,setLoadEvent:d,setViewEnd:e=>{l=!0,g(e)},getCommonViewMetrics:()=>(s.interactionToNextPaint=h(),s),setLoadingTime:e=>{if(l)return;let t=A(o.timeStamp,e??k());c||u(),c=!0,s.loadingTime=t,i()}}}function Cp(e){let{stop:t}=B(window,z.PAGE_SHOW,t=>{t.persisted&&e(t)},{capture:!0});return t}function wp(e,t,n){Ff(e.relative,e=>{t.firstContentfulPaint=e,t.largestContentfulPaint={value:e},n()})}var Tp=3e3,Ep=5*O,Dp=5*O;function Op(e,t,n,r,i,a,o){let s=new Set,c=d(Ns.INITIAL_LOAD,Ne(),o),l;f();let u;a&&(u=p(i),l=Cp(e=>{c.end();let t=Pe(e.timeStamp);c=d(Ns.BF_CACHE,t,void 0)}));function d(i,a,o){let c=kp(e,t,n,r,i,a,o);return s.add(c),c.stopObservable.subscribe(()=>{s.delete(c)}),c}function f(){e.subscribe(11,()=>{c=d(Ns.SESSION_RENEWAL,void 0,{name:c.name,service:c.service,version:c.version,context:c.contextManager.getContext()})}),e.subscribe(10,({endClocks:e})=>{c.end({sessionIsActive:!1,endClocks:e})})}function p(e){return e.subscribe(({oldLocation:e,newLocation:t})=>{jp(e,t)&&(c.end(),c=d(Ns.ROUTE_CHANGE))})}return{addTiming:(e,t=k())=>{c.addTiming(e,t)},setLoadingTime:e=>c.setLoadingTime(e),startView:(e,t)=>{c.end({endClocks:t}),c=d(Ns.ROUTE_CHANGE,t,e)},setViewContext:e=>{c.contextManager.setContext(e)},setViewContextProperty:(e,t)=>{c.contextManager.setContextProperty(e,t)},setViewName:e=>{c.setViewName(e)},getViewContext:()=>c.contextManager.getContext(),stop:()=>{u&&u.unsubscribe(),l&&l(),c.end(),s.forEach(e=>e.stop())}}}function kp(e,t,n,r,i,a=M(),o){let s=N(),c=new E,l={},u=0,d,f=wt(P(window.location)),p=jo(),m=!0,h=o?.name,g=o?.service||r.service,_=o?.version||r.version,v=o?.context,ee=o?.handlingStack;v&&p.setContext(v);let y={id:s,name:h,startClocks:a,service:g,version:_,context:v,url:o?.url};e.notify(1,y),e.notify(2,y);let{throttled:te,cancel:ne}=Lt(pe,Tp,{leading:!1}),{setLoadEvent:b,setViewEnd:x,stop:re,stopINPTracking:ie,getCommonViewMetrics:ae,setLoadingTime:S}=Sp(e,t,n,r,fe,i,a),{stop:oe,initialViewMetrics:se}=i===Ns.INITIAL_LOAD?Gf(r,a,b,fe):{stop:L,initialViewMetrics:{}};i===Ns.BF_CACHE&&wp(a,se,fe);let{stop:ce,eventCounts:le}=Mf(e,s,fe),C=Ft(pe,Ep),ue=e.subscribe(12,e=>{e===xr.UNLOADING&&pe()});pe(),p.changeObservable.subscribe(fe);function de(){e.notify(3,{id:s,name:h,context:p.getContext(),startClocks:a,sessionIsActive:m})}function fe(){de(),te()}function pe(){ne(),de(),u+=1;let t=d===void 0?k():d.timeStamp;e.notify(4,{customTimings:l,documentVersion:u,id:s,name:h,service:g,version:_,context:p.getContext(),loadingType:i,location:f,handlingStack:ee,startClocks:a,commonViewMetrics:ae(),initialViewMetrics:se,duration:A(a.timeStamp,t),isActive:d===void 0,sessionIsActive:m,eventCounts:le})}return{get name(){return h},service:g,version:_,contextManager:p,stopObservable:c,end(t={}){d||(d=t.endClocks??M(),m=t.sessionIsActive??!0,e.notify(5,{endClocks:d}),e.notify(6,{endClocks:d}),It(C),x(d.relative),re(),ue.unsubscribe(),pe(),F(()=>{this.stop()},Dp))},stop(){oe(),ce(),ie(),c.notify()},addTiming(e,t){if(d)return;let n=Re(t)?t:A(a.timeStamp,t);l[Ap(e)]=n,fe()},setLoadingTime:S,setViewName(e){h=e,pe()}}}function Ap(e){let t=e.replace(/[^a-zA-Z0-9-_.@$]/g,`_`);return t!==e&&C.warn(`Invalid timing name: ${e}, sanitized to: ${t}`),t}function jp(e,t){return e.pathname!==t.pathname||!Mp(t.hash)&&Np(t.hash)!==Np(e.hash)}function Mp(e){let t=e.substring(1);return t!==``&&!!document.getElementById(t)}function Np(e){let t=e.indexOf(`?`);return t<0?e:e.slice(0,t)}function Pp(e,t,n,r,i,a,o,s,c){return e.subscribe(4,t=>e.notify(13,Fp(t,n,o))),t.assemble.register(({startTime:e,eventType:t})=>{let n=s.findView(e);return n?{type:t,service:n.service,version:n.version,context:n.context,view:{id:n.id,name:n.name}}:Nr}),t.assembleTelemetry.register(({startTime:e})=>({view:{id:s.findView(e)?.id}})),Op(e,r,i,n,a,!n.trackViewsManually,c)}function Fp(e,t,n){let r=n.getReplayStats(e.id),i=e.commonViewMetrics?.cumulativeLayoutShift?.devicePixelRatio,a={_dd:{document_version:e.documentVersion,replay_stats:r,cls:i?{device_pixel_ratio:i}:void 0,configuration:{start_session_replay_recording_manually:t.startSessionReplayRecordingManually,remote_configuration_id:t.remoteConfigurationId}},date:e.startClocks.timeStamp,type:J.VIEW,view:{action:{count:e.eventCounts.actionCount},frustration:{count:e.eventCounts.frustrationCount},cumulative_layout_shift:e.commonViewMetrics.cumulativeLayoutShift?.value,cumulative_layout_shift_time:j(e.commonViewMetrics.cumulativeLayoutShift?.time),cumulative_layout_shift_target_selector:e.commonViewMetrics.cumulativeLayoutShift?.targetSelector,first_byte:j(e.initialViewMetrics.navigationTimings?.firstByte),dom_complete:j(e.initialViewMetrics.navigationTimings?.domComplete),dom_content_loaded:j(e.initialViewMetrics.navigationTimings?.domContentLoaded),dom_interactive:j(e.initialViewMetrics.navigationTimings?.domInteractive),error:{count:e.eventCounts.errorCount},first_contentful_paint:j(e.initialViewMetrics.firstContentfulPaint),interaction_to_next_paint:j(e.commonViewMetrics.interactionToNextPaint?.value),interaction_to_next_paint_time:j(e.commonViewMetrics.interactionToNextPaint?.time),interaction_to_next_paint_target_selector:e.commonViewMetrics.interactionToNextPaint?.targetSelector,is_active:e.isActive,name:e.name,largest_contentful_paint:j(e.initialViewMetrics.largestContentfulPaint?.value),largest_contentful_paint_target_selector:e.initialViewMetrics.largestContentfulPaint?.targetSelector,load_event:j(e.initialViewMetrics.navigationTimings?.loadEvent),loading_time:Gu(j(e.commonViewMetrics.loadingTime)),loading_type:e.loadingType,long_task:{count:e.eventCounts.longTaskCount},performance:Ip(e.commonViewMetrics,e.initialViewMetrics),resource:{count:e.eventCounts.resourceCount},time_spent:j(e.duration)},display:e.commonViewMetrics.scroll?{scroll:{max_depth:e.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:e.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:e.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:j(e.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,privacy:{replay_level:t.defaultPrivacyLevel},device:{locale:navigator.language,locales:navigator.languages,time_zone:cs()}};return Et(e.customTimings)||(a.view.custom_timings=Dt(e.customTimings,j)),{rawRumEvent:a,startClocks:e.startClocks,duration:e.duration,domainContext:{location:e.location,handlingStack:e.handlingStack}}}function Ip({cumulativeLayoutShift:e,interactionToNextPaint:t},{firstContentfulPaint:n,largestContentfulPaint:r}){return{cls:e&&{score:e.value,timestamp:j(e.time),target_selector:e.targetSelector,previous_rect:e.previousRect,current_rect:e.currentRect},fcp:n&&{timestamp:j(n)},inp:t&&{duration:j(t.value),timestamp:j(t.time),target_selector:t.targetSelector,sub_parts:t.subParts?{input_delay:j(t.subParts.inputDelay),processing_duration:j(t.subParts.processingDuration),presentation_delay:j(t.subParts.presentationDelay)}:void 0},lcp:r&&{timestamp:j(r.value),target_selector:r.targetSelector,resource_url:r.resourceUrl,sub_parts:r.subParts?{load_delay:j(r.subParts.loadDelay),load_time:j(r.subParts.loadTime),render_delay:j(r.subParts.renderDelay)}:void 0}}}function Lp(e,t){if(e===t)return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return e===t;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>Lp(e,t[n]));if(Array.isArray(e)||Array.isArray(t))return!1;let n=e,r=t,i=Object.keys(n),a=Object.keys(r);return i.length===a.length&&i.every(e=>a.includes(e)&&Lp(n[e],r[e]))}function Rp(e,t,n){let r={},i=n?.replaceKeys??new Set,a=n?.appendKeys??new Set,s=n?.ignoreKeys??new Set;for(let n of Object.keys(e)){if(s.has(n))continue;let c=e[n],l=t[n];if(!i.has(n)&&o(c)&&o(l)){let e=Rp(c,l,{replaceKeys:zp(i,n),appendKeys:zp(a,n),ignoreKeys:zp(s,n)});e&&(r[n]=e)}else a.has(n)&&Array.isArray(c)&&Array.isArray(l)?c.length>l.length&&(r[n]=c.slice(l.length)):Lp(c,l)||(r[n]=c)}for(let n of Object.keys(t))n in e||(r[n]=null);return Object.keys(r).length>0?r:void 0}function zp(e,t){let n=new Set;for(let r of e)r.startsWith(`${t}.`)&&n.add(r.slice(t.length+1));return n}function Bp(e,t){let n=Rp(e,t,{replaceKeys:new Set([`view.custom_timings`,`context`,`connectivity`,`usr`,`device`,`privacy`]),appendKeys:new Set([`_dd.page_states`]),ignoreKeys:new Set([`date`,`type`,`application`,`session`,`view.id`,`view.url`,`_dd.document_version`,`_dd.format_version`])});if(n)return f(n,{type:J.VIEW_UPDATE,date:e.date,application:e.application,session:e.session,view:{id:e.view.id,url:e.view.url},_dd:{document_version:e._dd.document_version,format_version:e._dd.format_version}})}function Vp(e,t){let n,r,i=!1,a=0,{unsubscribe:o}=e.flushObservable.subscribe(()=>{i=!1,r=n});return{dispatch:o=>{if(o.type!==J.VIEW){e.add(o);return}if(!t){e.upsert(o,o.view.id);return}let s=o.view.id;if(!o.view.is_active){s===n?.view.id&&(n=void 0,r=void 0,i=!1,a=0),e.upsert(o,s);return}if(s!==n?.view.id){a=0,e.upsert(o,s),n=o,i=!e.isEmpty;return}if(n=o,i){e.upsert(o,s);return}if(a+=1,a>=100){a=0,e.upsert(o,s),i=!e.isEmpty;return}if(r){let t=Bp(o,r);t&&(Bn(`rum`,t),e.upsert(t,s))}},stop:o}}function Hp(e,t,n,r,i){let a=[Ue(e,`rum`)],o=We(e,`rum`);o&&a.push(o);let s=kr({encoder:i(ds.RUM),endpoints:a,reportError:n});r.subscribe(()=>s.forceFlush(`session_expire`));let{dispatch:c,stop:l}=Vp(s,e.betaEnableViewUpdates);t.subscribe(14,c);let u=s.stop.bind(s);return s.stop=()=>{l(),u()},s}function Up(e){let t=pr();e.subscribe(14,e=>{t.send(`rum`,e)})}var Wp=Hi;function Gp(e,t,n){let r=Li({expireDelay:Wp}),i;e.subscribe(1,({startClocks:e,url:t})=>{let n=P(b.location).href,a=t===void 0?n:S(t,n).href;r.add(o({url:a,referrer:i||document.referrer}),e.relative),i=a}),e.subscribe(6,({endClocks:e})=>{r.closeActive(e.relative)});let a=n.subscribe(({newLocation:e})=>{let t=r.find();if(t){let n=Me();r.closeActive(n),r.add(o({url:e.href,referrer:t.referrer}),n)}});function o({url:e,referrer:t}){return{url:e,referrer:t}}return t.register(({startTime:e,eventType:t})=>{let n=r.find(e);return n?{type:t,view:{url:n.url,referrer:n.referrer}}:Nr}),{findUrl:e=>r.find(e),stop:()=>{a.unsubscribe(),r.stop()}}}function Kp(){let e=wt(qp());return new E(t=>{let{stop:n}=Jp(i),{stop:r}=Yp(i);function i(){if(e.href===qp().href)return;let n=wt(qp());t.notify({newLocation:n,oldLocation:e}),e=n}return()=>{n(),r()}})}function qp(){return P(b.location)}function Jp(e){let{stop:t}=R(Xp(`pushState`),`pushState`,({onPostCall:t})=>{t(e)}),{stop:n}=R(Xp(`replaceState`),`replaceState`,({onPostCall:t})=>{t(e)}),{stop:r}=B(window,z.POP_STATE,e);return{stop:()=>{t(),n(),r()}}}function Yp(e){return B(window,z.HASH_CHANGE,e)}function Xp(e){return Object.prototype.hasOwnProperty.call(history,e)?history:History.prototype}var Zp=Hi;function Qp(e,t,n){let r=Li({expireDelay:Zp});return e.subscribe(1,({startClocks:e})=>{r.add({},e.relative)}),e.subscribe(6,({endClocks:e})=>{r.closeActive(e.relative)}),t.register(({startTime:e,eventType:t})=>{if(!n.trackFeatureFlagsForEvents.concat([J.VIEW,J.ERROR]).includes(t))return Pr;let i=r.find(e);return!i||Et(i)?Pr:{type:t,feature_flags:i}}),{addFeatureFlagEvaluation:(e,t)=>{let n=r.find();n&&(n[e]=t)}}}var $p=10*D,em,tm;function nm(e,t,n){e.metricsEnabled&&(om(),tm=!1,t.subscribe(14,()=>{tm=!0}),n.subscribe(({bytesCount:e,messagesCount:t})=>{tm&&(tm=!1,em.batchCount+=1,am(em.batchBytesCount,e),am(em.batchMessagesCount,t))}),Ft(rm,$p))}function rm(){em.batchCount!==0&&(Qr(Rr.CUSTOMER_DATA_METRIC_NAME,em),om())}function im(){return{min:1/0,max:0,sum:0}}function am(e,t){e.sum+=t,e.min=Math.min(e.min,t),e.max=Math.max(e.max,t)}function om(){em={batchCount:0,batchBytesCount:im(),batchMessagesCount:im()}}var sm=4e3,cm=Hi;function lm(e,t=500){let n=Li({expireDelay:cm,maxEntries:sm}),r;yl(`visibility-state`)&&performance.getEntriesByType(`visibility-state`).forEach(e=>{a(e.name===`hidden`?`hidden`:`active`,e.startTime)}),a(fm(),Me());let{stop:i}=mn(window,[z.PAGE_SHOW,z.FOCUS,z.BLUR,z.VISIBILITY_CHANGE,z.RESUME,z.FREEZE,z.PAGE_HIDE],e=>{a(dm(e),e.timeStamp)},{capture:!0});function a(e,t=Me()){e!==r&&(r=e,n.closeActive(t),n.add({state:r,startTime:t},t))}function o(e,t,r){return n.findAll(t,r).some(t=>t.state===e)}return e.register(({startTime:e,duration:r=0,eventType:i})=>i===J.VIEW?{type:i,_dd:{page_states:um(n.findAll(e,r),e,t)}}:i===J.ACTION||i===J.ERROR?{type:i,view:{in_foreground:o(`active`,e,0)}}:Pr),{wasInPageStateDuringPeriod:o,addPageState:a,stop:()=>{i(),n.stop()}}}function um(e,t,n){if(e.length!==0)return e.slice(-n).reverse().map(({state:e,startTime:n})=>({state:e,start:j(A(t,n))}))}function dm(e){return e.type===z.FREEZE?`frozen`:e.type===z.PAGE_HIDE?e.persisted?`frozen`:`terminated`:fm()}function fm(){return document.visibilityState===`hidden`?`hidden`:document.hasFocus()?`active`:`passive`}function pm(e){let t,n=requestAnimationFrame(w(()=>{t=du()})),r=lu().subscribe(e=>{t=e}).unsubscribe;return e.register(({eventType:e})=>({type:e,display:t?{viewport:t}:void 0})),{stop:()=>{r(),n&&cancelAnimationFrame(n)}}}function mm(e,t){let n=Qu(e);function r(e){return!t.wasInPageStateDuringPeriod(`frozen`,e.startClocks.relative,e.duration)}function i(t){r(t)&&e.notify(13,hm(t))}function a(t,n,r,i){let{operationKey:a,context:o,description:s,handlingStack:c}=r||{},l={name:t,type:Is.OPERATION_STEP,operationKey:a,failureReason:i,stepType:n,startClocks:M(),context:V(o),description:s,handlingStack:c};e.notify(13,hm(l))}function o(t,r={},i=M()){let{id:a}=n.start(r.vitalKey??t,i,{name:t,...r});e.notify(17,{id:a,name:t,startClocks:i,...r})}function s(e,t={},r=M()){let a=n.stop(t.vitalKey??e,r,t);a&&i({type:Is.DURATION,...a})}return{addOperationStepVital:a,addDurationVital:i,startDurationVital:o,stopDurationVital:s}}function hm(e){let{startClocks:t,type:n,name:r,description:i,context:a,handlingStack:o}=e,s={id:(e.type===Is.DURATION?e.id:void 0)??N(),type:n,name:r,description:i,...n===Is.DURATION?{duration:j(e.duration)}:{step_type:e.stepType,operation_key:e.operationKey,failure_reason:e.failureReason}};return{rawRumEvent:{date:t.timeStamp,vital:s,type:J.VITAL,context:a},startClocks:t,duration:n===Is.DURATION?e.duration:void 0,domainContext:o?{handlingStack:o}:{}}}function gm(e,t,n,r,i){e.register(({eventType:e,startTime:a})=>{let o=n.findTrackedSession(a),s=i.findView(a);if(!o||!s)return Nr;let c,l,u;return e===J.VIEW?(c=r.getReplayStats(s.id)?!0:void 0,l=pu(o,t)===1,u=s.sessionIsActive?void 0:!1):c=r.isRecording()?!0:void 0,{type:e,session:{id:o.id,type:`user`,has_replay:c,sampled_for_replay:l,is_active:u}}})}function _m(e){let t=Zi()?vm():bm;return new E(n=>t(e,e=>n.notify(e)))}function vm(){return(e,t)=>B(b.cookieStore,z.CHANGE,n=>{let r=n.changed.find(t=>t.name===e)||n.deleted.find(t=>t.name===e);r&&t(r.value)}).stop}var ym=D;function bm(e,t){let n=ot(e),r=Ft(()=>{let r=ot(e);r!==n&&(n=r,t(r))},ym);return()=>{It(r)}}var xm=`datadog-ci-visibility-test-execution-id`;function Sm(e,t=_m(xm)){let n=lt(`datadog-ci-visibility-test-execution-id`)||Cm(),r=t.subscribe(e=>{n=e});return e.register(({eventType:e})=>typeof n==`string`?{type:e,session:{type:`ci_test`},ci_test:{test_execution_id:n}}:Pr),{stop:()=>{r.unsubscribe()}}}function Cm(){let e=window.Cypress;if(e)try{return e.env(`traceId`)}catch{C.warn(`Failed to read Cypress test execution id via Cypress.env(). Upgrade dd-trace-js to >= 5.88.0 to keep RUM ↔ test correlation working.`);return}}function wm(e,t){let n=hl({type:yl(`long-animation-frame`)?`long-animation-frame`:`longtask`,buffered:!0}).subscribe(n=>{for(let r of n){if(!t.trackLongTasks)break;let n=Pe(r.startTime),i=Tm(r,n);e.notify(13,{rawRumEvent:i,startClocks:n,duration:r.duration,domainContext:{performanceEntry:r}})}});return{stop:()=>n.unsubscribe()}}function Tm(e,t){let n=N(),r=j(e.duration),i={date:t.timeStamp,type:J.LONG_TASK,_dd:{discarded:!1}};if(e.entryType===`longtask`)return{...i,long_task:{id:n,entry_type:Ms.LONG_TASK,duration:r}};let a=ai(e.scripts.map(e=>e.sourceURL).filter(e=>!!e));return{...i,_dd:{discarded:!1,debug_ids:a},long_task:{id:n,entry_type:Ms.LONG_ANIMATION_FRAME,duration:r,blocking_duration:j(e.blockingDuration),first_ui_event_timestamp:j(e.firstUIEventTimestamp),render_start:j(e.renderStart),style_and_layout_start:j(e.styleAndLayoutStart),start_time:j(e.startTime),scripts:e.scripts.map(e=>({duration:j(e.duration),pause_duration:j(e.pauseDuration),forced_style_and_layout_duration:j(e.forcedStyleAndLayoutDuration),start_time:j(e.startTime),execution_start:j(e.executionStart),source_url:e.sourceURL,source_function_name:e.sourceFunctionName,source_char_position:e.sourceCharPosition,invoker:e.invoker,invoker_type:e.invokerType,window_attribution:e.windowAttribution}))}}}function Em(e){e.register(({eventType:e})=>ts()?{type:e,session:{type:`synthetics`},synthetics:{...es(),injected:$o()}}:Pr)}function Dm(e,t,n){let r=d(e),i=n(r);return br(t).forEach(([t,n])=>Om(e,r,t.split(/\.|(?=\[\])/),n)),i}function Om(e,t,n,r){let[i,...a]=n;if(i===`[]`){Array.isArray(e)&&Array.isArray(t)&&e.forEach((e,n)=>Om(e,t[n],a,r));return}if(!(!Am(e)||!Am(t))){if(a.length>0)return Om(e[i],t[i],a,r);km(e,i,t[i],r)}}function km(e,t,n,r){if(e[t]===n)return;let i=a(n);i===r?e[t]=V(n):r===`object`&&(i===`undefined`||i===`null`)?e[t]={}:r===`array`&&(i===`undefined`||i===`null`)&&(e[t]=[])}function Am(e){return a(e)===`object`}var jm={"view.name":`string`,"view.url":`string`,"view.referrer":`string`,context:`object`,service:`string`,version:`string`},Mm={[J.VIEW]:{...jm,"view.performance.lcp.resource_url":`string`},[J.ERROR]:{...jm,"error.message":`string`,"error.stack":`string`,"error.handling_stack":`string`,"error.resource.url":`string`,"error.fingerprint":`string`,"_dd.debug_ids":`array`},[J.RESOURCE]:{...jm,"resource.url":`string`,"resource.graphql.variables":`string`,"resource.request.headers":`object`,"resource.response.headers":`object`,"resource.websocket.close_reason":`string`,"resource.websocket.protocol":`string`},[J.ACTION]:{...jm,"action.target.name":`string`},[J.LONG_TASK]:{...jm,"long_task.scripts[].source_url":`string`,"long_task.scripts[].invoker":`string`,"_dd.debug_ids":`array`},[J.VITAL]:jm};function Nm(e,t,n,r,i){let a={[J.ERROR]:Ua(J.ERROR,r,i),[J.ACTION]:Ua(J.ACTION,r,i),[J.VITAL]:Ua(J.VITAL,r,i)};t.subscribe(13,({startClocks:r,duration:i,rawRumEvent:o,domainContext:s})=>{let c=n.trigger({eventType:o.type,rawRumEvent:o,domainContext:s,startTime:r.relative,duration:i});if(c===`DISCARDED`)return;let l=f(c,o,{ddtags:In(e).join(`,`)});Pm(l,e.beforeSend,s,a)&&(Et(l.context)&&delete l.context,t.notify(14,l))})}function Pm(e,t,n,r){if(t){let r=Dm(e,Mm[e.type],e=>t(e,n));if(r===!1&&e.type!==J.VIEW)return!1;r===!1&&C.warn(`Can't dismiss view events using beforeSend!`)}return!r[e.type]?.isLimitReached()}function Fm(e){e.register(({eventType:e})=>({type:e,connectivity:Wn()}))}function Im(e,t,n){e.register(({eventType:e})=>{let r=t.source;return{type:e,_dd:{format_version:2,drift:ze(),configuration:{session_sample_rate:ls(t.sessionSampleRate,3),session_replay_sample_rate:ls(t.sessionReplaySampleRate,3),profiling_sample_rate:ls(t.profilingSampleRate,3),trace_sample_rate:ls(t.traceSampleRate,3)},browser_sdk_version:hr()?`7.12.0`:void 0,sdk_name:n},application:{id:t.applicationId},date:k(),source:r}})}var Lm=[J.ACTION,J.ERROR,J.LONG_TASK,J.RESOURCE,J.VITAL];function Rm(e){return{addEvent:(t,n,r,i)=>{Lm.includes(n.type)&&e.notify(13,{startClocks:Pe(t),rawRumEvent:n,domainContext:r,duration:i})}}}function zm(e){e.register(({domainContext:e,rawRumEvent:t})=>{let n=Bm(e,t);if(!n)return Pr;let r=oi(n);return r?{type:t.type,service:r.service,version:r.version}:Pr})}function Bm(e,t){if(t.type===`long_task`&&t.long_task.entry_type===`long-animation-frame`)return t.long_task.scripts[0]?.source_url;let n;return`handlingStack`in e&&(n=e.handlingStack),t.type===`error`&&t.error.stack&&(n=t.error.stack),zt({stack:n}).stack[0]?.url}function Vm(e,t,n,r,i,a,o,s,c,l){let u=[],d=new Bc;d.subscribe(14,e=>Bn(`rum`,e)),t.expireObservable.subscribe(()=>d.notify(10,{endClocks:M()})),t.renewObservable.subscribe(()=>d.notify(11));let f=e=>{d.notify(15,{error:{message:e,source:Vn.AGENT,startClocks:M()}}),Yr(`Error reported to customer`,{"error.message":e})};if(hr()){Up(d);let e=Sr().subscribe(e=>{d.notify(12,e.reason)});u.push(()=>e.unsubscribe())}else{let n=Hp(e,d,f,t.expireObservable,a),r=n.prepareUrgentFlushObservable.subscribe(e=>{d.notify(12,e)});u.push(()=>r.unsubscribe()),u.push(()=>n.stop()),nm(s,d,n.flushObservable)}let{stop:p,...m}=Hm(d,c,e,t,n,i,o,l,f);return u.push(p),o.unbuffer(),u.push(()=>r.stop()),{...m,lifeCycle:d,sessionManager:t,stopSession:()=>t.expire(),telemetry:s,stop:()=>{u.forEach(e=>e())},hooks:c}}function Hm(e,t,n,r,i,a,o,s,c){let l=[],u=Rc(),d=Kp(),{observable:f,stop:p}=mu();l.push(p);let{assemble:m}=t;Im(m,n,s);let h=lm(m);l.push(()=>h.stop());let g=Hc(e);l.push(()=>g.stop());let _=Gp(e,m,d);l.push(()=>_.stop());let v=Qp(e,m,n);gm(m,n,r,i,g),Fm(m),Vo(m);let ee=Wo(m,n,`rum`,!0),y=Ko(m,n,r,`rum`),te=Lo(m,n,`rum`),ne=Gd(e,t,u,f,n);l.push(ne.stop);let b=Rm(e),x=pm(m);l.push(x.stop);let re=Sm(m);l.push(re.stop),Em(m),Nm(n,e,m,c);let{addTiming:ie,setLoadingTime:ae,startView:S,setViewName:oe,setViewContext:se,setViewContextProperty:ce,getViewContext:le,stop:C}=Pp(e,t,n,u,f,d,i,g,a);zm(m),l.push(C);let ue=mf(e,n);l.push(ue.stop);let{stop:de}=wm(e,n);l.push(de);let{addError:fe}=Yd(e,o);Pu(e,n,r,y,te,o);let pe=mm(e,h);if(n.trackResources&&(n.betaTrackWebSockets||Mt(Ot.TRACK_WEBSOCKETS))){let t=Bu(e,g,pe.addDurationVital);l.push(t.stop)}let w=hu(n.applicationId,r,g,ne.actionContexts,_);return{addAction:ne.addAction,startAction:ne.startAction,stopAction:ne.stopAction,startResource:ue.startResource,stopResource:ue.stopResource,addEvent:b.addEvent,addError:fe,addTiming:ie,setLoadingTime:ae,addFeatureFlagEvaluation:v.addFeatureFlagEvaluation,startView:S,setViewContext:se,setViewContextProperty:ce,getViewContext:le,setViewName:oe,viewHistory:g,sessionManager:r,stopSession:()=>r.expire(),getInternalContext:w.get,startDurationVital:pe.startDurationVital,stopDurationVital:pe.stopDurationVital,addDurationVital:pe.addDurationVital,addOperationStepVital:pe.addOperationStepVital,globalContext:ee,userContext:y,accountContext:te,stop:()=>l.forEach(e=>e())}}function Um(e,t){if(!e)return!0;let n=e.map(e=>e.onInit?.(t));return n.some(So)?Promise.all(n).then(e=>!e.includes(!1)):!n.includes(!1)}function Wm(e,t){for(let n of e??[])n.onRumStart?.(t)}function Gm(e,t){e.register(()=>t.isGranted()?Pr:Nr)}function Km({ignoreInitIfSyntheticsWillInjectRum:e=!0,startDeflateWorker:t,sdkName:n},r,i){let a=new ve(500,e=>{Yr(`preStartRum buffer data lost`,{count:e})}),o=Go();Mo(o,W.globalContext,a);let s=qo();Mo(s,W.userContext,a);let c=Ro();Mo(c,W.accountContext,a);let l,u,d,f,p,m,h=Lc(),g=r.observable.subscribe(ee),_={},v=!1;function ee(){if(v||!d||!f||!p||!m)return;g.unsubscribe();let e;if(f.trackViewsManually){if(!l)return;e=l.options}let t=f.trackViewsManually?l?.callback:void 0,n=i(f,p,u,e,m,h);v=!0,a.subscribe(e=>{e!==t&&e(n)}),a.unbuffer()}function y(e,i){let a=hr();if(a&&(e=qm(e)),d=e,f){xi(`DD_RUM`,e);return}let o=Dc(e,n);!o||!xt(o,i??``)||o.compressIntakeRequests&&!a&&t&&(u=t(o,`Datadog RUM`,L),!u)||(f=o,r.tryToInit(o.trackingConsent),r.onGrantedOnce(()=>{let{assembleTelemetry:t}=h;if(Gm(t,r),m=P(Wr)(Lr.RUM,o,t,n),x){C.warn(`The RUM SDK is not supported in a web or service worker environment.`);return}(hr()?La():P(Ia)(o,r)).then(r=>{r&&(p=r,fs(t,p,{application:{id:o.applicationId}}),Zr(Ic(e,n)),ee())}).catch(T)}))}return{init(t,n,r){if(!t){C.error(`Missing configuration`);return}if(At(t.enableExperimentalFeatures),_n(t.allowUntrustedEvents),d=t,e&&$o())return;let i=Um(t.plugins,{initConfiguration:t,publicApi:n});typeof i==`boolean`?i&&a():i.then(e=>{e&&a()}).catch(T);function a(){if(dc(t)){let e={user:s,context:o};if(t.remoteConfigurationId||t.remoteConfiguration?.sync)ic(t,e).then(e=>{e&&y(e,r)}).catch(T);else{let n=mc(t,e);n&&y(n,r)}}else y(t,r)}},get initConfiguration(){return d},getInternalContext:L,stopSession:L,addTiming(e,t=k()){a.notify(n=>n.addTiming(e,t))},setLoadingTime:(e=>{a.notify(t=>t.setLoadingTime(e))}),startView(e,t=M()){let n=n=>{n.startView(e,t)};a.notify(n),l||(l={options:e,callback:n},ee())},setViewName(e){a.notify(t=>t.setViewName(e))},setViewContext(e){a.notify(t=>t.setViewContext(e))},setViewContextProperty(e,t){a.notify(n=>n.setViewContextProperty(e,t))},getViewContext:()=>_,globalContext:o,userContext:s,accountContext:c,addAction(e){a.notify(t=>t.addAction(e))},startAction(e,t){let n=M();a.notify(r=>r.startAction(e,t,n))},stopAction(e,t){let n=M();a.notify(r=>r.stopAction(e,t,n))},startResource(e,t){let n=M();a.notify(r=>r.startResource(e,t,n))},stopResource(e,t){let n=M();a.notify(r=>r.stopResource(e,t,n))},addError(e){a.notify(t=>t.addError(e))},addFeatureFlagEvaluation(e,t){a.notify(n=>n.addFeatureFlagEvaluation(e,t))},startDurationVital(e,t){let n=M();a.notify(r=>r.startDurationVital(e,t,n))},stopDurationVital(e,t){let n=M();a.notify(r=>r.stopDurationVital(e,t,n))},addDurationVital(e){a.notify(t=>t.addDurationVital(e))},addOperationStepVital:(e,t,n,r)=>{a.notify(i=>i.addOperationStepVital(V(e),t,V(n),V(r)))}}}function qm(e){return{...e,applicationId:`00000000-aaaa-0000-aaaa-000000000000`,clientToken:`empty`,sessionSampleRate:100,defaultPrivacyLevel:e.defaultPrivacyLevel??pr()?.getPrivacyLevel()}}function Jm(e,t,n={}){let r=be(),i=ss(),a=Km(n,r,(r,o,s,c,l,u)=>{let d=s&&n.createDeflateEncoder?e=>n.createDeflateEncoder(s,e):wr,f=P(Vm)(r,o,e,t,c,d,i.observable,l,u,n.sdkName);return e.onRumStart(f.lifeCycle,r,o,f.viewHistory,s,f.telemetry),t.onRumStart(f.lifeCycle,f.hooks,r,o,f.viewHistory,d),a=Xm(a,f),Wm(r.plugins,{addEvent:f.addEvent,addError:f.addError}),f}),o=()=>a,s=e=>{let t=on(`view`);me(()=>{let n=typeof e==`object`?e:{name:e};a.startView({...n,name:Ym(n.name,`view name`),service:Ym(n.service,`view service`),version:Ym(n.version,`view version`),handlingStack:t}),H({feature:`start-view`})})},c=(e,t)=>{let n=on(`vital`);me(()=>{H({feature:`add-operation-step-vital`,action_type:`start`}),a.addOperationStepVital(e,`start`,{...t,handlingStack:n})})},l=w((e,t)=>{H({feature:`add-operation-step-vital`,action_type:`succeed`}),a.addOperationStepVital(e,`end`,t)}),u=w((e,t,n)=>{H({feature:`add-operation-step-vital`,action_type:`fail`}),a.addOperationStepVital(e,`end`,n,t)}),f=yi({init:e=>{let t=Error().stack;me(()=>a.init(e,f,t))},setTrackingConsent:w(e=>{r.update(e),H({feature:`set-tracking-consent`,tracking_consent:e})}),setViewName:w(e=>{a.setViewName(Ym(e,`view name`)),H({feature:`set-view-name`})}),setViewContext:w(e=>{a.setViewContext(e),H({feature:`set-view-context`})}),setViewContextProperty:w((e,t)=>{a.setViewContextProperty(e,t),H({feature:`set-view-context-property`})}),getViewContext:w(()=>(H({feature:`set-view-context-property`}),a.getViewContext())),getInternalContext:w(e=>a.getInternalContext(e)),getInitConfiguration:w(()=>d(a.initConfiguration)),addAction:(e,t)=>{let n=on(`action`);me(()=>{a.addAction({name:V(e),context:V(t),startClocks:M(),type:Ps.CUSTOM,handlingStack:n}),H({feature:`add-action`})})},startAction:w((e,t)=>{H({feature:`start-action`}),a.startAction(V(e),{type:V(t?.type),context:V(t?.context),actionKey:t?.actionKey})}),stopAction:w((e,t)=>{H({feature:`stop-action`}),a.stopAction(V(e),{type:V(t?.type),context:V(t?.context),actionKey:t?.actionKey})}),startResource:w((e,t)=>{H({feature:`start-resource`}),a.startResource(V(e),{type:V(t?.type),method:V(t?.method),context:V(t?.context),resourceKey:t?.resourceKey})}),stopResource:w((e,t)=>{H({feature:`stop-resource`}),a.stopResource(V(e),{type:V(t?.type),statusCode:t?.statusCode,size:t?.size,context:V(t?.context),resourceKey:t?.resourceKey})}),addError:(e,t)=>{let n=on(`error`);me(()=>{a.addError({error:e,handlingStack:n,context:V(t),startClocks:M()}),H({feature:`add-error`})})},addTiming:w((e,t)=>{a.addTiming(V(e),t)}),setViewLoadingTime:w(()=>{let e=k();a.setLoadingTime(e),H({feature:`addViewLoadingTime`})}),setGlobalContext:U(o,W.globalContext,G.setContext,`set-global-context`),getGlobalContext:U(o,W.globalContext,G.getContext,`get-global-context`),setGlobalContextProperty:U(o,W.globalContext,G.setContextProperty,`set-global-context-property`),removeGlobalContextProperty:U(o,W.globalContext,G.removeContextProperty,`remove-global-context-property`),clearGlobalContext:U(o,W.globalContext,G.clearContext,`clear-global-context`),setUser:U(o,W.userContext,G.setContext,`set-user`),getUser:U(o,W.userContext,G.getContext,`get-user`),setUserProperty:U(o,W.userContext,G.setContextProperty,`set-user-property`),removeUserProperty:U(o,W.userContext,G.removeContextProperty,`remove-user-property`),clearUser:U(o,W.userContext,G.clearContext,`clear-user`),setAccount:U(o,W.accountContext,G.setContext,`set-account`),getAccount:U(o,W.accountContext,G.getContext,`get-account`),setAccountProperty:U(o,W.accountContext,G.setContextProperty,`set-account-property`),removeAccountProperty:U(o,W.accountContext,G.removeContextProperty,`remove-account-property`),clearAccount:U(o,W.accountContext,G.clearContext,`clear-account`),startView:s,stopSession:w(()=>{a.stopSession(),H({feature:`stop-session`})}),addFeatureFlagEvaluation:w((e,t)=>{a.addFeatureFlagEvaluation(V(e),V(t)),H({feature:`add-feature-flag-evaluation`})}),getSessionReplayLink:w(()=>e.getSessionReplayLink()),startSessionReplayRecording:w(t=>{e.start(t),H({feature:`start-session-replay-recording`,force:t?.force})}),stopSessionReplayRecording:w(()=>e.stop()),addDurationVital:(e,t)=>{let n=on(`vital`);me(()=>{H({feature:`add-duration-vital`}),a.addDurationVital({id:N(),name:V(e),type:Is.DURATION,startClocks:Fe(t.startTime),duration:t.duration,context:V(t?.context),description:V(t?.description),handlingStack:n})})},startDurationVital:(e,t)=>{let n=on(`vital`);me(()=>{H({feature:`start-duration-vital`}),a.startDurationVital(V(e),{vitalKey:t?.vitalKey,context:V(t?.context),description:V(t?.description),handlingStack:n})})},stopDurationVital:w((e,t)=>{H({feature:`stop-duration-vital`}),a.stopDurationVital(V(e),{vitalKey:t?.vitalKey,context:V(t?.context),description:V(t?.description)})}),startOperation:c,succeedOperation:l,failOperation:u,startFeatureOperation:c,succeedFeatureOperation:l,failFeatureOperation:u,DEFAULT_TRACKED_RESOURCE_HEADERS:wc});return f}function Ym(e,t){if(e!==void 0){if(typeof e!=`string`){C.warn(`Invalid ${t} provided (expected a string, got ${typeof e}). Ignoring.`);return}return V(e)}}function Xm(e,t){return{...e,init:e=>{xi(`DD_RUM`,e)},getInternalContext:t.getInternalContext,stopSession:t.stopSession,getViewContext:t.getViewContext,globalContext:t.globalContext,userContext:t.userContext,accountContext:t.accountContext}}function Zm(e,{session:t,viewContext:n,errorType:r}){let i=t?t.id:`no-session-id`,a=[];return r!==void 0&&a.push(`error-type=${r}`),n&&(a.push(`seed=${n.id}`),a.push(`from=${n.startClocks.timeStamp}`)),`${Qm(e)}${`/rum/replay/sessions/${i}`}?${a.join(`&`)}`}function Qm(e){let t=e.site,n=e.subdomain||$m(e);return`https://${n?`${n}.`:``}${t}`}function $m(e){switch(e.site){case Se:case Ce:return`app`;case xe:return`dd`;default:return}}function eh(e,t,n,r){let i=sr([Ue(e,`profile`)],e=>{t.notify(15,{error:{message:e,source:Vn.AGENT,startClocks:M()}}),Yr(`Error reported to customer`,{"error.message":e})}),a=n(r);return{async send({event:e,...t}){let n=new FormData,r=Cn(e);if(!r)throw Error(`Failed to serialize event`);n.append(`event`,new Blob([r],{type:`application/json`}),`event.json`);let o=r.length;for(let[e,r]of br(t)){let t=Cn(r);if(!t)throw Error(`Failed to serialize attachment`);let i=await th(a,t);o+=i.outputBytesCount,n.append(e,new Blob([i.output]),e)}i.send({data:n,bytesCount:o})}}}function th(e,t){return new Promise(n=>{e.write(t),e.finish(e=>{n(e)})})}function nh(e,t,n,r){let i=t.findTrackedSession(),a=rh(e,i,r);return Zm(e,{viewContext:n.findView(),errorType:a,session:i})}function rh(e,t,n){if(!t)return`rum-not-tracked`;if(pu(t,e)===fu.OFF)return`incorrect-session-plan`;if(!n)return`replay-not-started`}function ih(e,t){if(!e.metricsEnabled)return{stop:L};let n,r,i,{unsubscribe:a}=t.subscribe(e=>{switch(e.type){case`start`:n={forced:e.forced,timestamp:k()},r=void 0,i=void 0;break;case`document-ready`:n&&(r=A(n.timestamp,k()));break;case`recorder-settled`:n&&(i=A(n.timestamp,k()));break;case`aborted`:case`deflate-encoder-load-failed`:case`recorder-load-failed`:case`succeeded`:a(),n&&Qr(Rr.RECORDER_INIT_METRICS_TELEMETRY_NAME,{metrics:ah(n.forced,i,A(n.timestamp,k()),e.type,r)})}});return{stop:a}}function ah(e,t,n,r,i){return{forced:e,loadRecorderModuleDuration:t,recorderInitDuration:n,result:r,waitForDocReadyDuration:i}}var oh=`modulepreload`,sh=function(e){return`/`+e},ch={},lh=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=sh(t,n),t=s(t),t in ch)return;ch[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:oh,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};async function uh(){try{return await P(dh)()}catch(e){ms({error:e,source:`Recorder`,scriptType:`module`})}}async function dh(){return(await lh(async()=>{let{startRecording:e}=await Promise.resolve().then(()=>$_);return{startRecording:e}},void 0)).startRecording}function fh(e,t,n,r,i,a){let o=0,s;t.subscribe(Y.SESSION_EXPIRED,()=>{(o===2||o===3)&&(d(),o=1)}),t.subscribe(Y.SESSION_RENEWED,()=>{o===1&&u()});let c=new E;ih(a,c);let l=async l=>{c.notify({type:`start`,forced:l});let[u]=await Promise.all([gh(c,{type:`recorder-settled`},uh()),gh(c,{type:`document-ready`},Ya(`interactive`))]);if(o!==2){c.notify({type:`aborted`});return}if(!u){o=0,c.notify({type:`recorder-load-failed`});return}let d=i();if(!d){o=0,c.notify({type:`deflate-encoder-load-failed`});return}({stop:s}=u(t,e,n,r,d,a)),o=3,c.notify({type:`succeeded`})};function u(t){let r=n.findTrackedSession(),i=r?pu(r,e):void 0;if(!ph(i,t)){o=1;return}if(mh(o))return;o=2;let a=hh(i,t)||!1;l(a).catch(T),a&&n.updateSessionState({forcedReplay:`1`})}function d(){o===3&&s?.(),o=0}return{start:u,stop:d,getSessionReplayLink(){return nh(e,n,r,o!==0)},isRecording:()=>o===3}}function ph(e,t){return e!==void 0&&(e!==fu.OFF||t?.force)}function mh(e){return e===2||e===3}function hh(e,t){return t&&t.force&&e===fu.OFF}async function gh(e,t,n){try{return await n}finally{e.notify(t)}}function _h(){let e=0;return{strategy:{start(){e=1},stop(){e=2},isRecording:()=>!1,getSessionReplayLink:L},shouldStartImmediately(t){return e===1||e===0&&!t.startSessionReplayRecordingManually}}}function vh(){if(hr()&&!mr(fr.RECORDS))return{start:L,stop:L,getReplayStats:()=>void 0,onRumStart:L,isRecording:()=>!1,getSessionReplayLink:()=>void 0};let{strategy:e,shouldStartImmediately:t}=_h();return{start:t=>e.start(t),stop:()=>e.stop(),getSessionReplayLink:()=>e.getSessionReplayLink(),onRumStart:n,isRecording:()=>ys()===3&&e.isRecording(),getReplayStats:e=>ys()===3?ks(e):void 0};function n(n,r,i,a,o,s){let c;function l(){return c||(o??=vs(r,`Datadog Session Replay`,()=>e.stop()),o&&(c=ps(o,ds.REPLAY))),c}e=fh(r,n,i,a,l,s),t(r)&&e.start()}}function yh(){return b.Profiler!==void 0}function bh(e){let t={status:`starting`};return e.assemble.register(({eventType:e})=>e!==J.VIEW&&e!==J.LONG_TASK&&e!==J.ACTION&&e!==J.VITAL?Pr:{type:e,_dd:{profiling:t}}),{get:()=>t,set:e=>{t=e}}}async function xh(){try{return await P(Sh)()}catch(e){ms({error:e,source:`Profiler`,scriptType:`module`})}}async function Sh(){return(await lh(async()=>{let{createRumProfiler:e}=await Promise.resolve().then(()=>xv);return{createRumProfiler:e}},void 0)).createRumProfiler}function Ch(){let e;function t(t,n,r,i,a,o){let s=i.findTrackedSession();if(!s||!wh(r,s))return;let c=bh(n);if(!P(yh)()){c.set({status:`error`,error_reason:`not-supported-by-browser`});return}P(xh)().then(n=>{if(!n){c.set({status:`error`,error_reason:`failed-to-lazy-load`});return}e=n(r,t,i,c,o,a,void 0),e.start()}).catch(T)}return{onRumStart:t,stop:()=>{e?.stop()}}}function wh(e,t){return hr()?mr(fr.PROFILES):Bi(t.id,Ri(e.sessionSampleRate,e.profilingSampleRate))}var Th=Jm(vh(),Ch(),{startDeflateWorker:vs,createDeflateEncoder:ps,sdkName:`rum`});bi(b,`DD_RUM`,Th);var Eh=t(i(),1),Dh,Oh,kh,Ah,jh=[],Mh=[];function Nh(e={}){return{name:`react`,onInit({publicApi:t,initConfiguration:n}){Dh=t,Oh=e;for(let e of jh)e(Oh,Dh);e.router&&(n.trackViewsManually=!0)},onRumStart({addError:e}){kh=e;for(let t of Mh)e&&t(e)},getConfigurationTelemetry(){let t=rt(`react`,Eh.version);return{router:!!e.router,integrations:it(t,e.router&&Ah)}}}}function Ph(e){kh?e(kh):Mh.push(e)}function Fh(e,t){let n=on(`react error`),r=M();Ph(i=>{me(()=>{i({error:e,handlingStack:n,componentStack:t.componentStack??void 0,startClocks:r,context:{...typeof e==`object`&&e?e.dd_context:void 0,framework:`react`}})})})}var Ih={didCatch:!1,error:null};function Lh(e,t=`ErrorBoundary`){let n=class extends Eh.Component{constructor(e){super(e),this.resetError=()=>{this.setState(Ih)},this.state=Ih}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}componentDidCatch(t,n){e(t,n)}render(){return this.state.didCatch?Eh.createElement(this.props.fallback,{error:this.state.error,resetError:this.resetError}):this.props.children}};return n.displayName=t,n}Lh(Fh);var Rh={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9,Change:12},Z={AddString:0,AddNode:1,RemoveNode:2,Attribute:3,Text:4,Size:5,ScrollPosition:6,AddStyleSheet:7,AttachedStyleSheets:8,MediaPlaybackState:9,VisualViewport:10,AddRoleAnnotatedStrings:11,InputValue:12,InputSelection:13,ClearStrings:14},Q={Default:0,NodeName:1,AttributeName:2,AttributeValue:3,TextContent:4,FormInput:5,Css:6,Url:7},zh={Selected:0,Deselected:1,Indeterminate:2},Bh={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},Vh={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},Hh={Play:0,Pause:1},Uh={V1:0,Change:1};function Wh(e){return Kh(void 0,void 0,e)}function Gh(e,t,n){return Kh(e,t,n)}function Kh(e,t,n){let r={container:void 0,parentId:e,previousSiblingId:void 0,nextSiblingId:t},i=e=>r.previousSiblingId===e-1?0:r.nextSiblingId===void 0?r.parentId===void 0?null:e-r.parentId:r.nextSiblingId-e;return{advance(e){let t=n.getOrInsert(e),a=i(t);return r.previousSiblingId=t,{nodeId:t,insertionPoint:a}},ascend(){r.container&&(r=r.container)},descend(){r.previousSiblingId!==void 0&&(r={container:r,parentId:r.previousSiblingId,previousSiblingId:void 0,nextSiblingId:void 0})}}}function $(e,t){return{role:e,string:t}}function qh(e,t,n){return[$(Q.AttributeName,t),$(Zh(e,t),n)]}function Jh(e,t,n){let r=$(Q.AttributeName,t);return n===null?[r]:[r,$(Zh(e,t),n)]}var Yh=new Set([`input`,`option`,`select`,`textarea`]),Xh=new Set([`action`,`background`,`cite`,`data`,`formaction`,`href`,`longdesc`,`manifest`,`ping`,`poster`,`src`,`srcset`,`xlink:href`]);function Zh(e,t){switch(t){case`value`:return Yh.has(e)?Q.FormInput:Q.AttributeValue;case`style`:return Q.Css;default:return Xh.has(t)?Q.Url:Q.AttributeValue}}function Qh(e){let t=[],n=$h(e),r=()=>{n.flushInto(t),n=$h(e)},i=()=>{r(),t.push([Z.ClearStrings]),e.clear()};return{add:(t,r)=>{n.add(t,r),e.size+n.pendingStringCount>=1e6&&i()},flush:()=>{r();let e=t;return t=[],e}}}function $h(e){let t={},n=new Map,r=[],i=0,a=!1,o=t=>{let r=e.get(t);if(r!==void 0)return r;a=!0;let o=n.get(t.role);o||(o={role:t.role,strings:new Map,references:0},n.set(t.role,o)),o.references++;let s=o.strings.get(t.string);if(s)return s;let c={literal:t,id:void 0};return o.strings.set(t.string,c),i++,c},s=e=>{for(let t=0,n=e.length;t<n;t++){let n=e[t];typeof n==`string`?e[t]=o($(Q.Default,n)):Array.isArray(n)?s(n):ng(n)&&(e[t]=o(n))}},c=()=>{if(n.size===0)return;let t=[Z.AddRoleAnnotatedStrings];for(let r of Array.from(n.values()).sort(tg)){let n=[r.role];for(let t of r.strings.values())t.id=e.getOrInsert(t.literal),n.push(t.literal.string);t.push(n)}return t};return{add:(e,n)=>{e in t||(t[e]=[e]),Array.isArray(n)&&(a=!1,s(n),a&&r.push(n)),t[e].push(n)},flushInto:e=>{let n=c();n&&e.push(n);for(let e of r)eg(e);[Z.AddNode,Z.RemoveNode,Z.Attribute,Z.Text,Z.InputValue,Z.InputSelection,Z.Size,Z.ScrollPosition,Z.AddStyleSheet,Z.AttachedStyleSheets,Z.MediaPlaybackState,Z.VisualViewport].forEach(n=>{let r=t[n];r&&e.push(r)})},get pendingStringCount(){return i}}}function eg(e){for(let t=0,n=e.length;t<n;t++){let n=e[t];Array.isArray(n)?eg(n):rg(n)&&(e[t]=n.id)}}function tg(e,t){return t.references-e.references}function ng(e){return typeof e==`object`&&!!e&&`string`in e}function rg(e){return typeof e==`object`&&!!e&&`literal`in e}function ig(){return{cssText:{count:0,max:0,sum:0},serializationDuration:{count:0,max:0,sum:0}}}function ag(e,t,n){e[t].count+=1,e[t].max=Math.max(e[t].max,n),e[t].sum+=n}function og(e,t){for(let n of[`cssText`,`serializationDuration`])e[n].count+=t[n].count,e[n].max=Math.max(e[n].max,t[n].max),e[n].sum+=t[n].sum}function sg(e,t,n,r,i,a){let o=Qh(r.stringIds),s=ig(),c={addMetric(e,t){ag(s,e,t)},addNode(...e){o.add(Z.AddNode,e)},addStyleSheet(e,t,n){n?o.add(Z.AddStyleSheet,[e,t||[],n]):t?o.add(Z.AddStyleSheet,[e,t]):o.add(Z.AddStyleSheet,[e])},attachStyleSheets(e,t){let n=[e];for(let e of t)n.push(e);o.add(Z.AttachedStyleSheets,n)},removeNode(e){o.add(Z.RemoveNode,e)},setAttributes(e){o.add(Z.Attribute,e)},setInputSelection(e,t){let n=[e];for(let e of t)n.push(e);o.add(Z.InputSelection,n)},setInputValue(e,t){o.add(Z.InputValue,[e,t])},setMediaPlaybackState(e,t){o.add(Z.MediaPlaybackState,[e,t])},setScrollPosition(e,t,n){o.add(Z.ScrollPosition,[e,t,n])},setSize(e,t,n){o.add(Z.Size,[e,t,n])},setText(e,t){o.add(Z.Text,[e,t])},kind:e,scope:r},l=k();a(c),ag(s,`serializationDuration`,A(l,k()));let u=o.flush();u.length>0&&t(e===0||e===1?{data:u,format:Uh.Change,type:Rh.FullSnapshot,timestamp:i}:{data:u,type:Rh.Change,timestamp:i}),n(s)}function cg(e,t){let n=e.tagName,r=e.value;if(Ql(e,t)){let t=e.type;return n===`INPUT`&&(t===`button`||t===`submit`||t===`reset`)?r:!r||n===`OPTION`?void 0:`***`}if(n===`OPTION`||n===`SELECT`)return e.value;if(n===`INPUT`||n===`TEXTAREA`)return r}var lg=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,ug=/^[A-Za-z]+:|^\/\//,dg=/^["']?data:.*,/i;function fg(e,t){return e.replace(lg,(e,n,r,i,a,o)=>{let s=r||a||o;if(!t||!s||ug.test(s)||dg.test(s))return e;let c=n||i||``;return`url(${c}${pg(s,t)}${c})`})}function pg(e,t){try{return S(e,t).href}catch{return e}}function mg(e){return e.tagName.toLowerCase()}function hg(e,t){return`data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${e}' height='${t}' style='background-color:silver'%3E%3C/svg%3E`}var gg=[`width`,`height`];function _g(e){return cl(e)&&e.tagName===`CANVAS`}function vg(e){return gg.includes(e.toLowerCase())}var yg=1e6;function bg(e,t,n,r){if(t===X.HIDDEN)return null;let i=e.getAttribute(n),a=e.tagName;if($l(a,n,i,t,r)){if(a===`IMG`){let t=e;if(t.naturalWidth>0)return hg(t.naturalWidth,t.naturalHeight);let{width:n,height:r}=e.getBoundingClientRect();return n>0||r>0?hg(n,r):Kl}return a===`SOURCE`?Kl:`***`}return i&&al(i,yg)}function xg(e,t,n){if(t===X.HIDDEN)return[];let r=[],i=mg(e);for(let a=0;a<e.attributes.length;a+=1){let o=e.attributes.item(a).name;o!==`value`&&o!==`selected`&&o!==`checked`&&Sg(r,e,i,o,t,n)}if(e.value&&(i===`textarea`||i===`select`||i===`option`||i===`input`)){let n=cg(e,t);n!==void 0&&r.push(qh(i,`value`,n))}else e.hasAttribute(`value`)&&Sg(r,e,i,`value`,t,n);i===`option`?e.selected&&!Ql(e,t)&&r.push(qh(i,`selected`,``)):e.hasAttribute(`selected`)&&Sg(r,e,i,`selected`,t,n);let a=e;return i===`input`&&(a.type===`radio`||a.type===`checkbox`)?a.checked&&!Ql(e,t)&&r.push(qh(i,`checked`,``)):e.hasAttribute(`checked`)&&Sg(r,e,i,`checked`,t,n),r}function Sg(e,t,n,r,i,a){let o=bg(t,i,r,a.scope.configuration);o!==null&&e.push(qh(n,r,o))}function Cg(e,t,n){if(t===X.HIDDEN)return{};let r={},i=e.ownerDocument,a=mg(e);if(a===`link`){let t=Array.from(i.styleSheets).find(t=>t.href===e.href),a=wg(t);a&&t&&(n.addMetric(`cssText`,a.length),r._cssText=a)}if(a===`style`&&e.sheet){let t=wg(e.sheet);t&&(n.addMetric(`cssText`,t.length),r._cssText=t)}(a===`audio`||a===`video`)&&(r.rr_mediaState=e.paused?`paused`:`played`);let o,s;switch(n.kind){case 0:o=Math.round(e.scrollTop),s=Math.round(e.scrollLeft),(o||s)&&n.scope.elementsScrollPositions.set(e,{scrollTop:o,scrollLeft:s});break;case 1:n.scope.elementsScrollPositions.has(e)&&({scrollTop:o,scrollLeft:s}=n.scope.elementsScrollPositions.get(e))}return s&&(r.rr_scrollLeft=s),o&&(r.rr_scrollTop=o),r}function wg(e){if(!e)return null;let t;try{t=e.rules||e.cssRules}catch{}return t?fg(Array.from(t,Wa()?Tg:Eg).join(``),e.href):null}function Tg(e){return Og(e)&&e.selectorText.includes(`:`)?e.cssText.replace(/(\[[\w-]+[^\\])(:[^\]]+\])/g,`$1\\$2`):Eg(e)}function Eg(e){return Dg(e)&&wg(e.styleSheet)||e.cssText}function Dg(e){return`styleSheet`in e}function Og(e){return`selectorText`in e}function kg(e,t,n,r){if(t.parentNode?.nodeName===`STYLE`||n===X.HIDDEN||n===X.IGNORE)return;let i,a=Zl(t);if(i=a?Xl(a,n):n,i===X.HIDDEN){Ig(e,t,r);return}if(i!==X.IGNORE){switch(t.nodeType){case t.CDATA_SECTION_NODE:Fg(e,t,r);break;case t.DOCUMENT_NODE:Ag(e,t,r);break;case t.DOCUMENT_FRAGMENT_NODE:jg(e,t,r);break;case t.DOCUMENT_TYPE_NODE:Mg(e,t,r);break;case t.ELEMENT_NODE:Ng(e,t,i,r);break;case t.TEXT_NODE:Pg(e,t,i,r);break;default:return}switch(t.nodeType){case t.CDATA_SECTION_NODE:case t.DOCUMENT_TYPE_NODE:case t.TEXT_NODE:return}e.descend(),dl(t,t=>{kg(e,t,i,r)}),e.ascend()}}function Ag(e,t,n){let{nodeId:r,insertionPoint:i}=e.advance(t);n.addNode(i,$(Q.NodeName,`#document`)),n.setScrollPosition(r,ou(),su()),Lg(t.adoptedStyleSheets,r,n)}function jg(e,t,n){let{nodeId:r,insertionPoint:i}=e.advance(t);if(!ul(t)){n.addNode(i,$(Q.NodeName,`#document-fragment`));return}n.addNode(i,$(Q.NodeName,`#shadow-root`)),n.scope.shadowRootsController.addShadowRoot(t,n.scope),Lg(t.adoptedStyleSheets,r,n)}function Mg(e,t,n){let{insertionPoint:r}=e.advance(t);n.addNode(r,$(Q.NodeName,`#doctype`),$(Q.AttributeValue,t.name),$(Q.AttributeValue,t.publicId),$(Q.Url,t.systemId))}function Ng(e,t,n,r){let{nodeId:i,insertionPoint:a}=e.advance(t),o=xg(t,n,r);r.addNode(a,zg(t),...o),_g(t)&&r.scope.canvasManager.markCanvasDirty(t);let{_cssText:s,rr_mediaState:c,rr_scrollLeft:l,rr_scrollTop:u}=Cg(t,n,r),d=t;if(s!==void 0&&d.sheet){let e=r.scope.styleSheetIds.getOrInsert(d.sheet);r.addStyleSheet($(Q.Css,s)),r.attachStyleSheets(i,[e])}c===`played`?r.setMediaPlaybackState(i,Hh.Play):c===`paused`&&r.setMediaPlaybackState(i,Hh.Pause),(l!==void 0||u!==void 0)&&r.setScrollPosition(i,l||0,u||0)}function Pg(e,t,n,r){let{insertionPoint:i}=e.advance(t),a=nu(t,n);r.addNode(i,$(Q.NodeName,`#text`),$(Q.TextContent,a))}function Fg(e,t,n){let{insertionPoint:r}=e.advance(t);n.addNode(r,$(Q.NodeName,`#cdata-section`))}function Ig(e,t,n){if(!cl(t))return;let{nodeId:r,insertionPoint:i}=e.advance(t);n.addNode(i,zg(t),qh(mg(t),Ul,Wl));let{width:a,height:o}=t.getBoundingClientRect();n.setSize(r,a,o)}function Lg(e,t,n){!e||e.length===0||n.attachStyleSheets(t,e.map(e=>Rg(e,n)))}function Rg(e,t){let n=Array.from(e.cssRules||e.rules,e=>$(Q.Css,e.cssText)),r=e.media.length>0?Array.from(e.media).map(e=>$(Q.Css,e)):void 0;return t.addMetric(`cssText`,n.reduce((e,t)=>e+t.string.length,0)),t.addStyleSheet(n,r,e.disabled),t.scope.styleSheetIds.getOrInsert(e)}function zg(e){let t=e.nodeName;return Bg(e)?$(Q.NodeName,`svg>${t}`):$(Q.NodeName,t)}function Bg(e){return e.namespaceURI===`http://www.w3.org/2000/svg`}function Vg(e,t,n,r,i,a){a.resetIds(),sg(t,r,i,a,e,e=>{kg(Wh(a.nodeIds),n,a.configuration.defaultPrivacyLevel,e)})}function Hg(e,t,n,r,i){sg(2,n,r,i,e,e=>Ug(t,e))}function Ug(e,t){let n=new Set,r=new Map,i=new Map,a=new Set;for(let t of e)switch(t.type){case`attributes`:{let e=t.target,n=r.get(e);n||(n=new Map,r.set(e,n));let i=t.attributeName;n.has(i)||n.set(i,t.oldValue);break}case`characterData`:i.has(t.target)||i.set(t.target,t.oldValue);break;case`childList`:for(let e=0;e<t.addedNodes.length;e++)n.add(t.addedNodes[e]);for(let e=0;e<t.removedNodes.length;e++)a.add(t.removedNodes[e])}let o=t.scope.nodeIds.nextId,s=new Map;Wg(a,t),Gg(n,s,t),Kg(i,o,s,t),qg(r,o,s,t)}function Wg(e,t){let n=t.scope.nodeIds;for(let r of e){let e=n.get(r);e!==void 0&&(Yg(r,e=>{_g(e)&&t.scope.canvasManager.markCanvasClean(e),ll(e)&&t.scope.shadowRootsController.removeShadowRoot(e.shadowRoot),n.delete(e)}),t.removeNode(e))}}function Gg(e,t,n){let r=n.scope.nodeIds;for(let i of e){if(!i.isConnected||r.get(i)!==void 0)continue;let e=fl(i);if(!e)continue;let a=r.get(e);if(a===void 0)continue;let o=Yl(e,n.scope.configuration.defaultPrivacyLevel,t);kg(Gh(a,Jg(i,r),r),i,o,n)}}function Kg(e,t,n,r){let i=r.scope.nodeIds;for(let[a,o]of e){if(a.textContent===o||!a.isConnected)continue;let e=i.get(a);if(e===void 0||e>=t)continue;let s=fl(a);if(!s)continue;let c=Yl(s,r.scope.configuration.defaultPrivacyLevel,n);if(c===X.HIDDEN||c===X.IGNORE)continue;let l=nu(a,c);r.setText(e,$(Q.TextContent,l))}}function qg(e,t,n,r){let i=r.scope.nodeIds;for(let[a,o]of e){if(!a.isConnected)continue;let e=i.get(a);if(e===void 0||e>=t)continue;let s=Yl(a,r.scope.configuration.defaultPrivacyLevel,n);if(s===X.HIDDEN||s===X.IGNORE)continue;let c=mg(a),l=[e];for(let[e,t]of o){if(a.getAttribute(e)===t)continue;if(_g(a)&&vg(e)&&r.scope.canvasManager.markCanvasDirty(a),e===`value`){let t=cg(a,s);t!==void 0&&l.push(qh(c,e,t));continue}let n=bg(a,s,e,r.scope.configuration);l.push(Jh(c,e,n))}l.length>1&&r.setAttributes(l)}}function Jg(e,t){let n=e.nextSibling;for(;n;){let e=t.get(n);if(e!==void 0)return e;n=n.nextSibling}}function Yg(e,t){t(e),dl(e,e=>Yg(e,t))}var Xg=25;function Zg(e){return Math.abs(e.pageTop-e.offsetTop-window.scrollY)>Xg||Math.abs(e.pageLeft-e.offsetLeft-window.scrollX)>Xg}var Qg=(e,t)=>{let n=window.visualViewport,r={layoutViewportX:e,layoutViewportY:t,visualViewportX:e,visualViewportY:t};if(n)Zg(n)?(r.layoutViewportX=Math.round(e+n.offsetLeft),r.layoutViewportY=Math.round(t+n.offsetTop)):(r.visualViewportX=Math.round(e-n.offsetLeft),r.visualViewportY=Math.round(t-n.offsetTop));else return r;return r},$g=e=>({scale:e.scale,offsetLeft:e.offsetLeft,offsetTop:e.offsetTop,pageLeft:e.pageLeft,pageTop:e.pageTop,height:e.height,width:e.width});function e_(e,t,n,r,i){t_(k(),0,t,n,i);let{unsubscribe:a}=e.subscribe(Y.VIEW_CREATED,e=>{r(),t_(e.startClocks.timeStamp,1,t,n,i)});return{stop:a}}function t_(e,t,n,r,i){let{width:a,height:o}=du();n({data:{height:o,href:window.location.href,width:a},type:Rh.Meta,timestamp:e}),n({data:{has_focus:document.hasFocus()},type:Rh.Focus,timestamp:e}),Vg(e,t,document,n,r,i),window.visualViewport&&n({data:$g(window.visualViewport),type:Rh.VisualViewport,timestamp:e})}function n_(){let e=0,t=r_(),n=e=>t[e.role][e.string];return{clear(){e!==0&&(t=r_(),e=0)},get:n,getOrInsert(r){let i=n(r);return i===void 0&&(i=e++,t[r.role][r.string]=i),i},get size(){return e-0}}}function r_(){return{[Q.Default]:i_(),[Q.NodeName]:i_(),[Q.AttributeName]:i_(),[Q.AttributeValue]:i_(),[Q.TextContent]:i_(),[Q.FormInput]:i_(),[Q.Css]:i_(),[Q.Url]:i_()}}function i_(){return Object.create(null)}function a_(){return c_(1)}function o_(){return c_(0)}function s_(){return c_(0)}function c_(e){return l_(()=>new WeakMap,e)}function l_(e,t){let n=e(),r=t,i=e=>n.get(e);return{clear(){r!==t&&(n=e(),r=t)},delete(e){n.delete(e)},get:i,getOrInsert(e){let t=i(e);return t===void 0&&(t=r++,n.set(e,t)),t},get nextId(){return r},get size(){return r-t}}}function u_(e,t,n,r){let i={resetIds(){i.eventIds.clear(),i.nodeIds.clear(),i.stringIds.clear(),i.styleSheetIds.clear()},canvasManager:e,configuration:t,elementsScrollPositions:n,eventIds:a_(),nodeIds:o_(),shadowRootsController:r,stringIds:n_(),styleSheetIds:s_()};return i}function d_(){let e=new WeakMap;return{set(t,n){t===document&&!document.scrollingElement||e.set(t===document?document.scrollingElement:t,n)},get(t){return e.get(t)},has(t){return e.has(t)}}}function f_(){let e=new Set;return{clearDirtyCanvases:()=>e.clear(),getDirtyCanvases:()=>{let t=[];return e.forEach(n=>{n.isConnected?t.push(n):e.delete(n)}),t},isCanvasDirty:t=>e.has(t),markCanvasClean:t=>e.delete(t),markCanvasDirty:t=>{t.isConnected&&e.add(t)}}}function p_(e){return!!e.changedTouches}function m_(e){return e.composed===!0&&ll(e.target)?e.composedPath()[0]:e.target}function h_(e,t,n=k()){return{data:{source:e,...t},type:Rh.IncrementalSnapshot,timestamp:n}}var g_=50;function __(e,t){let{throttled:n,cancel:r}=Lt(n=>{let r=m_(n),i=t.nodeIds.get(r);if(i===void 0)return;let a=v_(n);if(!a)return;let o={id:i,timeOffset:0,x:a.x,y:a.y};e(h_(p_(n)?Bh.TouchMove:Bh.MouseMove,{positions:[o]}))},g_,{trailing:!1}),{stop:i}=mn(document,[z.MOUSE_MOVE,z.TOUCH_MOVE],n,{capture:!0,passive:!0});return{stop:()=>{i(),r()}}}function v_(e){let{clientX:t,clientY:n}=p_(e)?e.changedTouches[0]:e;if(window.visualViewport){let{visualViewportX:e,visualViewportY:r}=Qg(t,n);t=e,n=r}if(!(!Number.isFinite(t)||!Number.isFinite(n)))return{x:t,y:n}}var y_={[z.POINTER_UP]:Vh.MouseUp,[z.MOUSE_DOWN]:Vh.MouseDown,[z.CLICK]:Vh.Click,[z.CONTEXT_MENU]:Vh.ContextMenu,[z.DBL_CLICK]:Vh.DblClick,[z.FOCUS]:Vh.Focus,[z.BLUR]:Vh.Blur,[z.TOUCH_START]:Vh.TouchStart,[z.TOUCH_END]:Vh.TouchEnd};function b_(e,t){return mn(document,Object.keys(y_),n=>{let r=m_(n),i=t.nodeIds.get(r);if(i===void 0||Yl(r,t.configuration.defaultPrivacyLevel)===X.HIDDEN)return;let a=y_[n.type],o;if(a!==Vh.Blur&&a!==Vh.Focus){let e=v_(n);if(!e)return;o={id:i,type:a,x:e.x,y:e.y}}else o={id:i,type:a};e({id:t.eventIds.getOrInsert(n),...h_(Bh.MouseInteraction,o)})},{capture:!0,passive:!0})}var x_=100;function S_(e,t,n){let{throttled:r,cancel:i}=Lt(e=>{let r=m_(e);if(!r)return;let i=n.nodeIds.get(r);if(i===void 0||Yl(r,n.configuration.defaultPrivacyLevel)===X.HIDDEN)return;let a=r===document?{scrollTop:su(),scrollLeft:ou()}:{scrollTop:Math.round(r.scrollTop),scrollLeft:Math.round(r.scrollLeft)};n.elementsScrollPositions.set(r,a),t(h_(Bh.Scroll,{id:i,x:a.scrollLeft,y:a.scrollTop}))},x_),{stop:a}=B(e,z.SCROLL,r,{capture:!0,passive:!0});return{stop:()=>{a(),i()}}}var C_=200;function w_(e){let t=lu().subscribe(t=>{e(h_(Bh.ViewportResize,t))});return{stop:()=>{t.unsubscribe()}}}function T_(e){let t=window.visualViewport;if(!t)return{stop:L};let{throttled:n,cancel:r}=Lt(()=>{e({data:$g(t),type:Rh.VisualViewport,timestamp:k()})},C_,{trailing:!1}),{stop:i}=mn(t,[z.RESIZE,z.SCROLL],n,{capture:!0,passive:!0});return{stop:()=>{i(),r()}}}function E_(e,t){return mn(document,[z.PLAY,z.PAUSE],n=>{let r=m_(n);if(!r)return;let i=t.nodeIds.get(r);i!==void 0&&Yl(r,t.configuration.defaultPrivacyLevel)!==X.HIDDEN&&e(h_(Bh.MediaInteraction,{id:i,type:n.type===z.PLAY?Hh.Play:Hh.Pause}))},{capture:!0,passive:!0})}function D_(e,t){function n(e,n){if(!e?.ownerNode)return;let r=t.nodeIds.get(e.ownerNode);r!==void 0&&n(r)}let r=[R(CSSStyleSheet.prototype,`insertRule`,({target:t,parameters:[r,i]})=>{n(t,t=>e(h_(Bh.StyleSheetRule,{id:t,adds:[{rule:r,index:i}]})))}),R(CSSStyleSheet.prototype,`deleteRule`,({target:t,parameters:[r]})=>{n(t,t=>e(h_(Bh.StyleSheetRule,{id:t,removes:[{index:r}]})))})];typeof CSSGroupingRule<`u`?i(CSSGroupingRule):(i(CSSMediaRule),i(CSSSupportsRule));function i(t){r.push(R(t.prototype,`insertRule`,({target:t,parameters:[r,i]})=>{n(t.parentStyleSheet,n=>{let a=O_(t);a&&(a.push(i||0),e(h_(Bh.StyleSheetRule,{id:n,adds:[{rule:r,index:a}]})))})}),R(t.prototype,`deleteRule`,({target:t,parameters:[r]})=>{n(t.parentStyleSheet,n=>{let i=O_(t);i&&(i.push(r),e(h_(Bh.StyleSheetRule,{id:n,removes:[{index:i}]})))})}))}return{stop:()=>{r.forEach(e=>e.stop())}}}function O_(e){let t=[],n=e;for(;n.parentRule;){let e=Array.from(n.parentRule.cssRules).indexOf(n);t.unshift(e),n=n.parentRule}if(!n.parentStyleSheet)return;let r=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return t.unshift(r),t}function k_(e){return mn(window,[z.FOCUS,z.BLUR],()=>{e({data:{has_focus:document.hasFocus()},type:Rh.Focus,timestamp:k()})})}function A_(e,t,n){let r=e.subscribe(Y.VIEW_ENDED,()=>{n(),t({timestamp:k(),type:Rh.ViewEnd})});return{stop:()=>{r.unsubscribe()}}}var j_={type:1,selection:zh.Deselected};function M_(e,t,n,r){let i=r.configuration.defaultPrivacyLevel,a=new WeakMap,o=e.nodeType!==e.DOCUMENT_NODE,s=(o?e.ownerDocument:e).defaultView;if(!s)return{stop:L};let{stop:c}=mn(e,o?[z.CHANGE]:[z.INPUT,z.CHANGE],e=>{let t=m_(e);(t instanceof s.HTMLInputElement||t instanceof s.HTMLTextAreaElement||t instanceof s.HTMLSelectElement)&&u(t)},{capture:!0,passive:!0}),l;if(o)l=L;else{let e=[pn(s.HTMLInputElement.prototype,`value`,u),pn(s.HTMLInputElement.prototype,`checked`,u),pn(s.HTMLSelectElement.prototype,`value`,u),pn(s.HTMLTextAreaElement.prototype,`value`,u),pn(s.HTMLSelectElement.prototype,`selectedIndex`,u)];l=()=>{e.forEach(e=>e.stop())}}return{stop:()=>{l(),c()}};function u(e){let o=Yl(e,i);if(o===X.HIDDEN)return;let s=e.type,c=e,l;if(s===`radio`||s===`checkbox`){if(Ql(e,o))return;l={type:1,selection:P_(e)}}else if(N_(e)){if(Ql(e,o))return;let t=e.options[e.selectedIndex];if(!t)return;c=t,l={type:1,selection:zh.Selected}}else{let t=cg(e,o);if(t===void 0)return;l={type:0,value:t}}let u=d(c,l),f=[];if(s===`radio`&&e.checked&&F_(e,e=>{let t=d(e,j_);t!==void 0&&f.push(t)}),N_(e))for(let t=0;t<e.options.length;t++){let n=e.options[t];n!==c&&a.delete(n)}(u!==void 0||f.length!==0)&&sg(2,t,n,r,k(),e=>{u!==void 0&&(l.type===0?e.setInputValue(u,$(Q.FormInput,l.value)):e.setInputSelection(l.selection,[u])),f.length>0&&e.setInputSelection(zh.Deselected,f)})}function d(e,t){let n=r.nodeIds.get(e);if(n===void 0)return;let i=a.get(e);if(!(i&&I_(i,t)))return a.set(e,t),n}}function N_(e){return e.tagName===`SELECT`}function P_(e){return e.checked?zh.Selected:zh.Deselected}function F_(e,t){e.name&&e.ownerDocument.querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`).forEach(n=>{let r=n;r!==e&&t(r)})}function I_(e,t){return e.type===0?t.type===0&&e.value===t.value:t.type===1&&e.selection===t.selection}var L_=100;function R_(e){let t=L,n=[];function r(){t(),e(n),n=[]}let{throttled:i,cancel:a}=Lt(r,16,{leading:!1});return{addMutations:e=>{n.length===0&&(t=vo(i,{timeout:L_}));for(let t of e)n.push(t)},flush:r,stop:()=>{t(),a()}}}function z_(e,t,n,r){let i=zc();if(!i)return{stop:L,flush:L};let a=R_(e=>{Hg(k(),e.concat(o.takeRecords()),t,n,r)}),o=new i(w(a.addMutations));return o.observe(e,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:()=>{o.disconnect(),a.stop()},flush:()=>{a.flush()}}}var B_=[`clearRect`,`fillRect`,`strokeRect`,`fill`,`stroke`,`fillText`,`strokeText`,`drawImage`,`putImageData`,`drawFocusIfNeeded`,`reset`];function V_(e){if(!e.configuration.sessionReplayCanvasRecording?.enable||e.configuration.sessionReplayCanvasRecording.maxFramesPerSecond===0||typeof CanvasRenderingContext2D>`u`)return{stop:L};let t=[];return B_.forEach(n=>{t.push(R(CanvasRenderingContext2D.prototype,n,({target:t,onPostCall:n})=>{n(()=>{e.nodeIds.get(t.canvas)!==void 0&&e.canvasManager.markCanvasDirty(t.canvas)})}))}),{stop:()=>t.forEach(e=>e.stop())}}var H_=(e,t)=>{let n=new Map;return{addShadowRoot:(r,i)=>{if(n.has(r))return;let a=z_(r,e,t,i),o=M_(r,e,t,i),s=S_(r,e,i);n.set(r,{flush:()=>a.flush(),stop:()=>{a.stop(),o.stop(),s.stop()}})},removeShadowRoot:e=>{let t=n.get(e);t&&(t.stop(),n.delete(e))},stop:()=>{n.forEach(({stop:e})=>e())},flush:()=>{n.forEach(({flush:e})=>e())}}};function U_(e){let{emitRecord:t,emitStats:n,configuration:r,lifeCycle:i}=e;if(!t||!n)throw Error(`emit functions are required`);let a=n=>{t(n),Bn(`record`,{record:n}),Ds(e.viewHistory.findView().id)},o=f_(),s=H_(a,n),c=u_(o,r,d_(),s),{stop:l}=e_(i,a,n,u,c);function u(){s.flush(),d.flush()}let d=z_(document,a,n,c),f=[d,__(a,c),b_(a,c),S_(document,a,c),w_(a),M_(document,a,n,c),E_(a,c),D_(a,c),k_(a),T_(a),A_(i,a,u),V_(c)];return{stop:()=>{s.stop(),f.forEach(e=>e.stop()),l()},flushMutations:u,shadowRootsController:s}}function W_(e,t,n,r){let i=new FormData;i.append(`segment`,new Blob([e],{type:`application/octet-stream`}),`${t.session.id}-${t.start}`);let a={raw_segment_size:r,compressed_segment_size:e.byteLength,...t},o=JSON.stringify(a);return i.append(`event`,new Blob([o],{type:`application/json`})),{data:i,bytesCount:e.byteLength,cssText:n.cssText,isFullSnapshot:t.index_in_view===0,rawSize:r,recordCount:t.records_count,serializationDuration:n.serializationDuration}}function G_({context:e,creationReason:t,encoder:n}){let r=0,i=e.view.id,a={start:1/0,end:-1/0,creation_reason:t,records_count:0,has_full_snapshot:!1,index_in_view:Ts(i),source:`browser`,...e},o=ig();Es(i);function s(e,t){a.start=Math.min(a.start,e.timestamp),a.end=Math.max(a.end,e.timestamp),a.records_count+=1,a.has_full_snapshot||=e.type===Rh.FullSnapshot||e.type===Rh.Change&&a.index_in_view===0;let i=n.isEmpty?`{"records":[`:`,`;n.write(i+JSON.stringify(e),e=>{r+=e,t(r)})}function c(e){og(o,e)}function l(e){if(n.isEmpty)throw Error(`Empty segment flushed`);n.write(`],${JSON.stringify(a).slice(1)}\n`),n.finish(t=>{Os(a.view.id,t.rawBytesCount),e(a,o,t)})}return{addRecord:s,addStats:c,flush:l}}var K_=5*D;function q_(e,t,n,r,i,a){return J_(e,()=>Y_(t.applicationId,n,r),i,a)}function J_(e,t,n,r){let i={status:0,nextSegmentCreationReason:`init`},{unsubscribe:a}=e.subscribe(Y.VIEW_CREATED,()=>{s(`view_change`)}),{unsubscribe:o}=e.subscribe(Y.PREPARE_URGENT_FLUSH,e=>{s(e)});function s(e){i.status===1&&(i.segment.flush((t,r,i)=>{let a=W_(i.output,t,r,i.rawBytesCount);Cr(e)&&e!==xr.HIDDEN?n.sendOnExit(a):n.send(a)}),I(i.expirationTimeoutId)),i=e===`stop`?{status:2}:{status:0,nextSegmentCreationReason:e}}return{addRecord:e=>{if(i.status!==2){if(i.status===0){let e=t();if(!e)return;i={status:1,segment:G_({encoder:r,context:e,creationReason:i.nextSegmentCreationReason}),expirationTimeoutId:F(()=>{s(`segment_duration_limit`)},K_)}}i.segment.addRecord(e,e=>{e>6e4&&s(`segment_bytes_limit`)})}},addStats:e=>{i.status===1&&i.segment.addStats(e)},stop:()=>{s(`stop`),a(),o()}}}function Y_(e,t,n){let r=t.findTrackedSession(),i=n.findView();if(!(!r||!i))return{application:{id:e},session:{id:r.id},view:{id:i.id}}}function X_(e,t){if(!e.metricsEnabled)return{stop:L};let{unsubscribe:n}=t.subscribe(e=>{if(e.type===`failure`||e.type===`queue-full`||e.type===`success`&&e.payload.isFullSnapshot){let t=Z_(e.type,e.bandwidth,e.payload);Qr(Rr.SEGMENT_METRICS_TELEMETRY_NAME,{metrics:t})}});return{stop:n}}function Z_(e,t,n){return{cssText:{count:n.cssText.count,max:n.cssText.max,sum:n.cssText.sum},encoding:{fullSnapshot:`change`,incrementalSnapshot:`change`},isFullSnapshot:n.isFullSnapshot,ongoingRequests:{count:t.ongoingRequestCount,totalSize:t.ongoingByteCount},recordCount:n.recordCount,result:e,serializationDuration:{count:n.serializationDuration.count,max:n.serializationDuration.max,sum:n.serializationDuration.sum},size:{compressed:n.bytesCount,raw:n.rawSize}}}function Q_(e){let t=pr();return{addRecord:n=>{let r=e.findView();t.send(`record`,n,r.id)}}}var $_=e({startRecording:()=>ev});function ev(e,t,n,r,i,a,o){let s=[],c=o||sr([Ue(t,`replay`)],t=>{e.notify(Y.RAW_ERROR_COLLECTED,{error:{message:t,source:Vn.AGENT,startClocks:M()}}),Yr(`Error reported to customer`,{"error.message":t})},6e4),l,u;if(hr())({addRecord:l}=Q_(r)),u=L;else{let o=q_(e,t,n,r,c,i);l=o.addRecord,u=o.addStats,s.push(o.stop);let d=X_(a,c.observable);s.push(d.stop)}let{stop:d}=U_({emitRecord:l,emitStats:u,configuration:t,lifeCycle:e,viewHistory:r});return s.push(d),{stop:()=>{s.forEach(e=>e())}}}function tv(){let e=pr();return t=>{e.send(`profile`,t)}}function nv(e,t,n){let r=eh(e,t,n,ds.PROFILING);return({profile:e,trace:t})=>{let n={event:e,"wall-time.json":t};r.send(n)}}var rv=/\/(?![vV]\d{1,2}\/)([^/\d?]*\d+[^/?]*)/g;function iv(e){return e?e.replace(rv,`/?`):`/`}var av=(e,t)=>e||iv(t);function ov(e,t,n){let r=In(t),i=sv(e,t.applicationId,n),a=uv(r);return{...i,attachments:[`wall-time.json`],start:new Date(e.startClocks.timeStamp).toISOString(),end:new Date(e.endClocks.timeStamp).toISOString(),family:`chrome`,runtime:`chrome`,format:`json`,version:4,tags_profiler:a.join(`,`),_dd:{clock_drift:ze()}}}function sv(e,t,n){let{ids:r,names:i}=cv(e.views),a=e.longTasks.map(e=>e.id).filter(e=>e!==void 0),o=e.actions?.map(e=>e.id).filter(e=>e!==void 0)??[],{ids:s,labels:c}=lv(e.vitals),l={application:{id:t}};return n&&(l.session={id:n}),r.length&&(l.view={id:r,name:i}),a.length&&(l.long_task={id:a}),o.length&&(l.action={id:o,label:[]}),s.length&&(l.vital={id:s,label:c}),l}function cv(e){let t={ids:[],names:[]};for(let n of e)t.ids.push(n.viewId),n.viewName&&t.names.push(n.viewName);return t.names=Array.from(new Set(t.names)),t}function lv(e){let t={ids:[],labels:[]};if(!e)return t;for(let n of e)t.ids.push(n.id),t.labels.push(n.label);return t.labels=Array.from(new Set(t.labels)),t}function uv(e){return e.concat([`language:javascript`,`runtime:chrome`,`family:chrome`,`host:browser`])}var dv=Hi;function fv(e){let t=Li({expireDelay:dv});return e.subscribe(Y.RAW_RUM_EVENT_COLLECTED,({rawRumEvent:e,startClocks:n,duration:r})=>{e.type===`long_task`&&t.add({id:e.long_task.id,startClocks:n,duration:r,entryType:e.long_task.entry_type===Ms.LONG_TASK?ml.LONG_TASK:ml.LONG_ANIMATION_FRAME},n.relative).close(je(n.relative,r))}),t}var pv=Hi;function mv(e){let t=Li({expireDelay:pv});return e.subscribe(Y.ACTION_STARTED,e=>{t.add({id:e.id,label:``,startClocks:e.startClocks,duration:void 0},e.startClocks.relative)}),e.subscribe(Y.RAW_RUM_EVENT_COLLECTED,({rawRumEvent:e,startClocks:n,duration:r})=>{if(e.type===`action`){let i=t.getEntries(n.relative).find(t=>t.value.id===e.action.id),a=r??0;i?(i.value.duration=a,i.close(je(n.relative,a))):t.add({id:e.action.id,label:``,startClocks:n,duration:r},n.relative).close(je(n.relative,a))}}),t}var hv=Hi;function gv(e){let t=Li({expireDelay:hv});return e.subscribe(Y.DURATION_VITAL_STARTED,e=>{t.add({id:e.id,type:Is.DURATION,startClocks:e.startClocks,duration:void 0,label:e.name},e.startClocks.relative)}),e.subscribe(Y.RAW_RUM_EVENT_COLLECTED,({rawRumEvent:e,startClocks:n,duration:r})=>{if(e.type!==`vital`)return;if(e.vital.type===Is.OPERATION_STEP){if(e.vital.step_type===`start`)t.add({id:e.vital.id,type:e.vital.type,operationKey:e.vital.operation_key,startClocks:n,label:e.vital.name},n.relative);else if(e.vital.step_type===`end`){let r=t.findAllEntries().find(t=>t.value.type===Is.OPERATION_STEP&&t.value.label===e.vital.name&&t.value.operationKey===e.vital.operation_key);if(!r)return;r.value.duration=A(r.value.startClocks.relative,n.relative),r.close(n.relative)}return}let i=t.getEntries(n.relative).find(t=>t.value.id===e.vital.id);if(i){i.value.duration=r,i.close(je(n.relative,r));return}t.add({id:e.vital.id,type:e.vital.type,operationKey:e.vital.operation_key,startClocks:n,duration:r,label:e.vital.name},n.relative).close(je(n.relative,r))}),t}function _v(e,t){let n=e?.data?.attributes;if(!n||typeof n.admitted!=`boolean`||typeof n.reason!=`string`)return t;let r=n.reason===`backend_client_not_initialized`?`backend_unavailable`:n.reason;return{decision:n.admitted?`quota_ok`:`quota_ko`,reason:r}}function vv(e,t){return Ge({proxy:e.proxy,site:e.site,path:`/api/v2/profiling/quota`,parameters:`session_id=${t}`,subdomain:`quota`})}function yv(e,t,n=5e3){let r=vv(e,t),i=new AbortController,a,o=Gn(r,{credentials:`omit`,signal:i.signal,headers:new Headers({"DD-CLIENT-TOKEN":e.clientToken})}).then(e=>{let t=e.status===429?{decision:`quota_ko`,reason:`quota_exceeded`}:{decision:`quota_ok`,reason:`api-error`};return e.json().then(e=>(I(a),_v(e,t)),()=>(I(a),t))}).catch(()=>(I(a),{decision:`quota_ok`,reason:`api-error`})),s=new Promise(e=>{a=F(()=>{i.abort(),e({decision:`quota_ok`,reason:`timeout`})},n)});return Promise.race([o,s])}function bv(e){let t=new Map(ai(e)?.map(e=>[e.url,e.id])),n=[];return e.forEach((e,r)=>{let i=t.get(e);i!==void 0&&n.push({resourceId:r,debugId:i})}),n.length?n:void 0}var xv=e({DEFAULT_RUM_PROFILER_CONFIGURATION:()=>Sv,createRumProfiler:()=>Cv}),Sv={sampleIntervalMs:10,collectIntervalMs:6e4,minProfileDurationMs:5e3};function Cv(e,t,n,r,i,a,o=Sv){let s=hr()?P(tv)():P(nv)(e,t,i),c,l=[],u=P(fv)(t),d=P(mv)(t),f=P(gv)(t),p={state:`stopped`,stateReason:`initializing`},m=0;t.subscribe(Y.SESSION_EXPIRED,()=>{v(`session-expired`)}),t.subscribe(Y.SESSION_RENEWED,()=>{if(p.state===`stopped`&&(p.stateReason===`session-expired`||p.stateReason===`quota_ko`)){let t=n.findTrackedSession();if(!t||!Bi(t.id,Ri(e.sessionSampleRate,e.profilingSampleRate)))return;h()}});function h(){if(p.state===`running`)return;let e=a.findView();c=e?{startClocks:e.startClocks,viewId:e.id,viewName:av(e.name,document.location.pathname)}:void 0,l.push(B(window,z.VISIBILITY_CHANGE,S).stop,B(window,z.BEFORE_UNLOAD,oe).stop),y(),g()}function g(){if(hr())return;let t=++m,r=n.findTrackedSession()?.id;r&&P(yv)(e,r).then(e=>{t===m&&(p.state===`running`||p.state===`paused`)&&e.decision===`quota_ko`&&v(`quota_ko`,e.reason)}).catch(T)}function _(){v(`stopped-by-user`)}function v(e,t){ne(e),l.forEach(e=>e()),l.length=0,r.set({status:`stopped`,error_reason:void 0,quota_reason:t})}function ee(e){if(e.state===`running`)return{cleanupTasks:e.cleanupTasks};let n=[],r=t.subscribe(Y.VIEW_CREATED,e=>{let t={viewId:e.id,viewName:av(e.name,document.location.pathname),startClocks:e.startClocks};re(t),c=t});return n.push(r.unsubscribe),{cleanupTasks:n}}function y(){let e=b.Profiler;if(!e)throw r.set({status:`error`,error_reason:`not-supported-by-browser`}),Error(`RUM Profiler is not supported in this browser.`);p.state===`running`&&te(p);let{cleanupTasks:t}=ee(p),i;try{i=new e({sampleInterval:o.sampleIntervalMs,maxBufferSize:Math.round(o.collectIntervalMs*1.5/o.sampleIntervalMs)})}catch(e){e instanceof Error&&e.message.includes(`disabled by Document Policy`)?(C.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.",e),r.set({status:`error`,error_reason:`missing-document-policy-header`})):r.set({status:`error`,error_reason:`unexpected-exception`});return}r.set({status:`running`,error_reason:void 0}),p={state:`running`,startClocks:M(),profiler:i,timeoutId:F(y,o.collectIntervalMs),views:[],cleanupTasks:t,longTasks:[],sessionId:n.findTrackedSession()?.id},re(c),i.addEventListener(`samplebufferfull`,ae)}function te(e){I(e.timeoutId),e.profiler.removeEventListener(`samplebufferfull`,ae);let{startClocks:t,views:n,sessionId:r}=e;e.profiler.stop().then(e=>{let i=M(),a=A(t.relative,i.relative),s=u.findAll(t.relative,a),c=d.findAll(t.relative,a),l=f.findAll(t.relative,a).map(e=>({id:e.id,label:e.label,startClocks:e.startClocks,duration:e.duration})),p=a<o.minProfileDurationMs;s.length===0&&p||ie(Object.assign({},e,{startClocks:t,endClocks:i,clocksOrigin:Ne(),longTasks:s,actions:c,vitals:l,views:n,sampleInterval:o.sampleIntervalMs,debugIds:bv(e.resources)}),r)}).catch(T)}function ne(e){if(p.state!==`running`){(p.state===`paused`||p.state===`stopped`&&e===`stopped-by-user`)&&(p={state:`stopped`,stateReason:e});return}let t=p;p={state:`stopped`,stateReason:e},t.cleanupTasks.forEach(e=>e()),e===`quota_ko`?(I(t.timeoutId),t.profiler.removeEventListener(`samplebufferfull`,ae),t.profiler.stop().catch(T)):te(t)}function x(){if(p.state!==`running`)return;let e=p;p={state:`paused`},e.cleanupTasks.forEach(e=>e()),te(e)}function re(e){p.state!==`running`||!e||p.views.push(e)}function ie(t,n){let r={profile:ov(t,e,n),trace:t};s(r)}function ae(){y()}function S(){document.visibilityState===`hidden`&&p.state===`running`?x():document.visibilityState===`visible`&&p.state===`paused`&&y()}function oe(){y()}function se(){return p.state===`stopped`}function ce(){return p.state===`running`}function le(){return p.state===`paused`}return{start:h,stop:_,isStopped:se,isRunning:ce,isPaused:le}}export{i as a,lh as i,Nh as n,Th as r,Fh as t};