@objectstack/console 9.11.0 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/dist/assets/AdapterProvider-CJjaoZJR.js +1 -0
  2. package/dist/assets/{AiPendingActionsPage-DBH0IlpT.js → AiPendingActionsPage-B4OLmiXS.js} +1 -1
  3. package/dist/assets/{ApiConsolePage-BV14INY2.js → ApiConsolePage-D9A9ewr3.js} +1 -1
  4. package/dist/assets/{AppDocsIndex-C22gKPwi.js → AppDocsIndex-ChEbT5sV.js} +1 -1
  5. package/dist/assets/{AppManagementPage-DTh0NujK.js → AppManagementPage-DwyKF7UE.js} +1 -1
  6. package/dist/assets/ApprovalsInboxPage-Ca5Bb0JN.js +1 -0
  7. package/dist/assets/{AuditLogPage-B_Zg_tx5.js → AuditLogPage-BtNmxWyG.js} +1 -1
  8. package/dist/assets/{ComponentNavView-BhShg1Hw.js → ComponentNavView-naLkSvjF.js} +1 -1
  9. package/dist/assets/ConsoleFloatingChatbot-1MfhDZaK.js +1 -0
  10. package/dist/assets/DashboardView-Ccnc4ERO.js +1 -0
  11. package/dist/assets/DashboardWidgetInspector-DQvlAqdm.js +1 -0
  12. package/dist/assets/{DeveloperHubPage--9rLh7im.js → DeveloperHubPage-COHQrdbV.js} +1 -1
  13. package/dist/assets/{ExpressionProvider-B9tL1RMW.js → ExpressionProvider-C2XzKImE.js} +1 -1
  14. package/dist/assets/FlowRunsPage-DIO45X3A.js +1 -0
  15. package/dist/assets/{IntegrationsPage-CMt7Atqp.js → IntegrationsPage-Bu6X6rLQ.js} +2 -2
  16. package/dist/assets/InterfaceListPage-Cfv6Lkis.js +1 -0
  17. package/dist/assets/{ManagedByBadge-BF_1ck8d.js → ManagedByBadge-DDil8sjK.js} +1 -1
  18. package/dist/assets/MarketplaceAccessDenied-C3bv4Vmg.js +1 -0
  19. package/dist/assets/{MarketplaceInstalledPage-DBh3sDdm.js → MarketplaceInstalledPage-C-saIRJu.js} +1 -1
  20. package/dist/assets/MarketplacePackagePage-CcpJSBrF.js +4 -0
  21. package/dist/assets/MarketplacePage-B0zIXkwO.js +1 -0
  22. package/dist/assets/MetadataInspector-D9KL7Kgi.js +1 -0
  23. package/dist/assets/{MetadataProvider-xgIDLxXw.js → MetadataProvider-BO_KcC86.js} +1 -1
  24. package/dist/assets/{MonacoImpl-BsJjT9SV.js → MonacoImpl-VsaaS7Wx.js} +1 -1
  25. package/dist/assets/{PageView-pabqNsbK.js → PageView-gzbH9RTq.js} +1 -1
  26. package/dist/assets/ProfilePage-BXz0C-TJ.js +1 -0
  27. package/dist/assets/PublicFormsPage-D5-EASU8.js +1 -0
  28. package/dist/assets/RecordDetailView-ANMXqsUj.js +9 -0
  29. package/dist/assets/{RecordFormPage-Dh_BBkOw.js → RecordFormPage-BYeWa90w.js} +1 -1
  30. package/dist/assets/ReportDefaultInspector-B6X1lhzs.js +7 -0
  31. package/dist/assets/ReportView-uPqsauzE.js +2 -0
  32. package/dist/assets/{SearchResultsPage-BPgmZAb1.js → SearchResultsPage-DraOSIqg.js} +1 -1
  33. package/dist/assets/{SettingsHub-B47RbJU1.js → SettingsHub-CzOLpvoR.js} +1 -1
  34. package/dist/assets/{SettingsView-B75wJU1L.js → SettingsView-BJnPeWpq.js} +1 -1
  35. package/dist/assets/SystemHubPage-CeKubn-w.js +1 -0
  36. package/dist/assets/architecture-7EHR7CIX-X1S5OWmc.js +1 -0
  37. package/dist/assets/{architectureDiagram-3BPJPVTR-SscyJlk0.js → architectureDiagram-3BPJPVTR-MvRuEgzs.js} +1 -1
  38. package/dist/assets/{assistantBus-3d9MxsCF.js → assistantBus-BMrg1uLy.js} +1 -1
  39. package/dist/assets/blockDiagram-GPEHLZMM-Bv7ki00F.js +132 -0
  40. package/dist/assets/{c4Diagram-AAUBKEIU-VLeNt7tD.js → c4Diagram-AAUBKEIU-BRUAUvfZ.js} +1 -1
  41. package/dist/assets/channel-BqPJ7J2_.js +1 -0
  42. package/dist/assets/{chunk-2J33WTMH-DyXQVMuc.js → chunk-2J33WTMH-DTuZqhEo.js} +1 -1
  43. package/dist/assets/{chunk-3OPIFGDE-3g0dk_di.js → chunk-3OPIFGDE-C_qRhnNp.js} +1 -1
  44. package/dist/assets/{chunk-4BX2VUAB-BpAZJ7ZC.js → chunk-4BX2VUAB-Curilu76.js} +1 -1
  45. package/dist/assets/chunk-55IACEB6-ClqERWh2.js +1 -0
  46. package/dist/assets/chunk-5ZQYHXKU-NIbfS0Mi.js +2 -0
  47. package/dist/assets/{chunk-727SXJPM-DwSFE_v-.js → chunk-727SXJPM-C9Y2Btvf.js} +1 -1
  48. package/dist/assets/{chunk-AQP2D5EJ-DWgSztUW.js → chunk-AQP2D5EJ-CtIyrl6v.js} +1 -1
  49. package/dist/assets/{chunk-BSJP7CBP-okvguKD4.js → chunk-BSJP7CBP-DjJyEH0K.js} +1 -1
  50. package/dist/assets/chunk-CSCIHK7Q-DbAqhmGo.js +124 -0
  51. package/dist/assets/{chunk-FMBD7UC4-CZzqt4RW.js → chunk-FMBD7UC4-DZ7XVMi3.js} +1 -1
  52. package/dist/assets/{chunk-KSCS5N6A-IxEh4Ag5.js → chunk-KSCS5N6A-DHHPqSRu.js} +2 -2
  53. package/dist/assets/{chunk-L5ZTLDWV-DW1lPBoG.js → chunk-L5ZTLDWV-Cm-9mVS5.js} +1 -1
  54. package/dist/assets/{chunk-LZXEDZCA-C_-aaYcd.js → chunk-LZXEDZCA-DNmRzWTq.js} +1 -1
  55. package/dist/assets/{chunk-ND2GUHAM-C1toj0H3.js → chunk-ND2GUHAM-D-GBTiNx.js} +1 -1
  56. package/dist/assets/{chunk-NZK2D7GU-H2MwBqQV.js → chunk-NZK2D7GU-CtXqakqk.js} +1 -1
  57. package/dist/assets/{chunk-O5CBEL6O-BzyWPZhZ.js → chunk-O5CBEL6O-B7H8dfmV.js} +3 -3
  58. package/dist/assets/chunk-QZHKN3VN-WFr5OVn5.js +1 -0
  59. package/dist/assets/chunk-WU5MYG2G-DKJgGIni.js +1 -0
  60. package/dist/assets/{chunk-XPW4576I-DPNxFY7Q.js → chunk-XPW4576I-BnrxXe1_.js} +1 -1
  61. package/dist/assets/classDiagram-4FO5ZUOK-WH7-26qH.js +1 -0
  62. package/dist/assets/classDiagram-v2-Q7XG4LA2-WH7-26qH.js +1 -0
  63. package/dist/assets/{cose-bilkent-S5V4N54A-HKJWDQRL.js → cose-bilkent-S5V4N54A-DhuYtQPb.js} +1 -1
  64. package/dist/assets/{dagre-BM42HDAG-CU8nx02l.js → dagre-BM42HDAG-Dnyz2UIF.js} +1 -1
  65. package/dist/assets/{data-adapter-Hh2YXzlW.js → data-adapter-QvY0S7Jg.js} +1 -1
  66. package/dist/assets/{diagram-2AECGRRQ-CormMz8j.js → diagram-2AECGRRQ-sHfykK_1.js} +1 -1
  67. package/dist/assets/{diagram-5GNKFQAL-Dh1SagBx.js → diagram-5GNKFQAL-CQPF5SyR.js} +1 -1
  68. package/dist/assets/{diagram-KO2AKTUF-DcG6Z05V.js → diagram-KO2AKTUF-DG_jPd_S.js} +1 -1
  69. package/dist/assets/{diagram-LMA3HP47-DrVLZ6ZE.js → diagram-LMA3HP47-eeIrBazE.js} +1 -1
  70. package/dist/assets/{diagram-OG6HWLK6-C4_MMUc2.js → diagram-OG6HWLK6-aTF20BV0.js} +1 -1
  71. package/dist/assets/{dist-DYcwLEm6.js → dist-D80kLFC3.js} +1 -1
  72. package/dist/assets/{erDiagram-TEJ5UH35-BZH_OrBL.js → erDiagram-TEJ5UH35-CZG8EC14.js} +1 -1
  73. package/dist/assets/eventmodeling-FCH6USID-y9LH0zSr.js +1 -0
  74. package/dist/assets/{flowDiagram-I6XJVG4X-CnjHQUK0.js → flowDiagram-I6XJVG4X-Dy6yH4qt.js} +1 -1
  75. package/dist/assets/framework-CsYa1Kaj.js +34 -0
  76. package/dist/assets/{ganttDiagram-6RSMTGT7-rVbHlqzo.js → ganttDiagram-6RSMTGT7-BbnAVyeg.js} +2 -2
  77. package/dist/assets/{gitGraph-WXDBUCRP-9vsQCBlr.js → gitGraph-WXDBUCRP-CWBdNpUZ.js} +1 -1
  78. package/dist/assets/{gitGraphDiagram-PVQCEYII-CH2LgClA.js → gitGraphDiagram-PVQCEYII-DQzVZDx1.js} +1 -1
  79. package/dist/assets/{highlighted-body-OFNGDK62-0aDolIZW.js → highlighted-body-OFNGDK62-DH1qH6jn.js} +1 -1
  80. package/dist/assets/index-Bx77jcFN.js +4 -0
  81. package/dist/assets/index-CYLGNLiD.css +2 -0
  82. package/dist/assets/{info-J43DQDTF-CfWeH1Bg.js → info-J43DQDTF-BT1tFy_c.js} +1 -1
  83. package/dist/assets/{infoDiagram-5YYISTIA-CRC7ojj-.js → infoDiagram-5YYISTIA-CL6j94aA.js} +1 -1
  84. package/dist/assets/infrastructure-BsIvKvpW.js +3 -0
  85. package/dist/assets/{ishikawaDiagram-YF4QCWOH-8v73fBR1.js → ishikawaDiagram-YF4QCWOH-B2te-ZRn.js} +1 -1
  86. package/dist/assets/{journeyDiagram-JHISSGLW-DbRK-WaU.js → journeyDiagram-JHISSGLW-lZExleN9.js} +1 -1
  87. package/dist/assets/{kanban-definition-UN3LZRKU-BggLxHvZ.js → kanban-definition-UN3LZRKU-C9AtY5D5.js} +1 -1
  88. package/dist/assets/{marketplaceApi-CucX7DD9.js → marketplaceApi-DL8PegzV.js} +1 -1
  89. package/dist/assets/mermaid-GHXKKRXX-DlOIGBXr.js +1 -0
  90. package/dist/assets/{mermaid-parser.core-iuxcj-n_.js → mermaid-parser.core-Fbhy6q19.js} +1 -1
  91. package/dist/assets/mermaid.core-X9A0zXAG.js +8 -0
  92. package/dist/assets/metadata-admin--twLAcNF.js +21 -0
  93. package/dist/assets/{mindmap-definition-RKZ34NQL-kqhi9XCR.js → mindmap-definition-RKZ34NQL-BLNposyO.js} +1 -1
  94. package/dist/assets/{packet-YPE3B663-C0xexAqH.js → packet-YPE3B663-2eu0wHWY.js} +1 -1
  95. package/dist/assets/{pie-LRSECV5Y-DbQVOiyX.js → pie-LRSECV5Y-BA_jHDuN.js} +1 -1
  96. package/dist/assets/{pieDiagram-4H26LBE5-9fHcPmFE.js → pieDiagram-4H26LBE5-B_jWIggY.js} +3 -3
  97. package/dist/assets/plugin-calendar-HZM7PnuZ.js +1 -0
  98. package/dist/assets/plugin-charts-CHVu5fbZ.js +7 -0
  99. package/dist/assets/{plugin-chatbot-76fXVh9-.js → plugin-chatbot-B25XBELF.js} +53 -53
  100. package/dist/assets/plugin-dashboard-C8TbFk_D.js +6 -0
  101. package/dist/assets/plugin-form-sm04IEZv.js +1 -0
  102. package/dist/assets/plugin-gantt-BAbv_iPP.js +93 -0
  103. package/dist/assets/plugin-grid-pjPmzTDb.js +6 -0
  104. package/dist/assets/plugin-kanban-CFOumo0N.js +1 -0
  105. package/dist/assets/{plugin-map-C3ZvB3-I.js → plugin-map-DD4Y0TfP.js} +1 -1
  106. package/dist/assets/{plugin-markdown-C0Wtx408.js → plugin-markdown-Fz2pgiZT.js} +1 -1
  107. package/dist/assets/plugin-report-DidhEKAB.js +59 -0
  108. package/dist/assets/{plugin-timeline-BStIRl3O.js → plugin-timeline-BEk5SlxQ.js} +1 -1
  109. package/dist/assets/plugin-tree-uFJca_YQ.js +1 -0
  110. package/dist/assets/plugin-view-CDxJidrj.js +1 -0
  111. package/dist/assets/plugins-views-BpKTWXXa.js +4 -0
  112. package/dist/assets/{quadrantDiagram-W4KKPZXB-CaMxia_k.js → quadrantDiagram-W4KKPZXB-DuQbsXa3.js} +1 -1
  113. package/dist/assets/{radar-GUYGQ44K-DapGfmwo.js → radar-GUYGQ44K-BdSwem6Q.js} +1 -1
  114. package/dist/assets/{requirementDiagram-4Y6WPE33-CXwY4Gdd.js → requirementDiagram-4Y6WPE33-BS1D5lNA.js} +1 -1
  115. package/dist/assets/{sankeyDiagram-5OEKKPKP-KEb3hSPZ.js → sankeyDiagram-5OEKKPKP-DGvgs5mF.js} +2 -2
  116. package/dist/assets/{sequenceDiagram-3UESZ5HK-BfbOOh3M.js → sequenceDiagram-3UESZ5HK-CoXT3Sa8.js} +1 -1
  117. package/dist/assets/{skeletons-Y2db5nbR.js → skeletons-DZWz9Ill.js} +1 -1
  118. package/dist/assets/{src-CVz7aDdY.js → src-B_91OByQ.js} +1 -1
  119. package/dist/assets/{src-BLxLm3Xq.js → src-CpvBTq6C.js} +1 -1
  120. package/dist/assets/src-ZyouQodC.js +2 -0
  121. package/dist/assets/{stateDiagram-AJRCARHV-BLJI6xj_.js → stateDiagram-AJRCARHV-CGBlOS6N.js} +1 -1
  122. package/dist/assets/stateDiagram-v2-BHNVJYJU-B7qRtpsa.js +1 -0
  123. package/dist/assets/{timeline-definition-PNZ67QCA-aiklZXLq.js → timeline-definition-PNZ67QCA-C3SxX0_p.js} +1 -1
  124. package/dist/assets/{treeView-BLDUP644-Byr_7ESV.js → treeView-BLDUP644-LYooC8jV.js} +1 -1
  125. package/dist/assets/{treemap-LRROVOQU-B6DiJnlo.js → treemap-LRROVOQU-DRMY684K.js} +1 -1
  126. package/dist/assets/{types-C6YwlE8G.js → types-IRCvjK2K.js} +1 -1
  127. package/dist/assets/ui-components-DXl7VfQF.js +42 -0
  128. package/dist/assets/{ui-layout-CL-1JYQ8.js → ui-layout-BwKCXo1Z.js} +1 -1
  129. package/dist/assets/{useActionModal-Dz0k3wwf.js → useActionModal-CYfSmVlP.js} +1 -1
  130. package/dist/assets/useOpenRecordList-CwVRoKH4.js +1 -0
  131. package/dist/assets/{usePackageL10n-shLsxEAx.js → usePackageL10n-DIEe85Ot.js} +1 -1
  132. package/dist/assets/useReconcileOnError-BXVpquqp.js +1 -0
  133. package/dist/assets/vendor-charts-BMpO4zwC.js +39 -0
  134. package/dist/assets/{vendor-dndkit-DMFEUxSy.js → vendor-dndkit-CJ-mJJuO.js} +1 -1
  135. package/dist/assets/{vendor-i18n-Bz5UncqE.js → vendor-i18n-DA5MKfC_.js} +1 -1
  136. package/dist/assets/{vendor-icons-core-C_yMA5lO.js → vendor-icons-core-y1IwBwLD.js} +1 -1
  137. package/dist/assets/{vendor-markdown-CyAGIM8D.js → vendor-markdown-BhPWU2N7.js} +1 -1
  138. package/dist/assets/vendor-objectstack-C1teU2a6.js +96 -0
  139. package/dist/assets/vendor-radix-90T7eS-d.js +46 -0
  140. package/dist/assets/vendor-react-ClIa1CJA.js +11 -0
  141. package/dist/assets/vendor-sentry-DUcsR3Vf.js +501 -0
  142. package/dist/assets/{vendor-ui-utils-rQOI1gAo.js → vendor-ui-utils-C92Fl7BT.js} +1 -1
  143. package/dist/assets/{vennDiagram-CIIHVFJN-DsKC4yvC.js → vennDiagram-CIIHVFJN-BWIbAw03.js} +1 -1
  144. package/dist/assets/{wardley-L42UT6IY-f1iiSYpj.js → wardley-L42UT6IY-zPLhQ1bd.js} +1 -1
  145. package/dist/assets/{wardleyDiagram-YWT4CUSO-DbrUmWlY.js → wardleyDiagram-YWT4CUSO-Ck_J2TTN.js} +1 -1
  146. package/dist/assets/{xychartDiagram-2RQKCTM6-B4biX1Sz.js → xychartDiagram-2RQKCTM6-CDqp4wV0.js} +2 -2
  147. package/dist/index.html +6 -6
  148. package/package.json +1 -1
  149. package/dist/assets/AdapterProvider-DQfb2hDB.js +0 -1
  150. package/dist/assets/ApprovalsInboxPage-C0mBPkCR.js +0 -1
  151. package/dist/assets/ConsoleFloatingChatbot-Ct9u34kL.js +0 -1
  152. package/dist/assets/DashboardView-D3oJL44H.js +0 -1
  153. package/dist/assets/DashboardWidgetInspector-BhjBPVJV.js +0 -1
  154. package/dist/assets/FlowRunsPage-CDYR2nha.js +0 -1
  155. package/dist/assets/InterfaceListPage-CIYeUsaL.js +0 -1
  156. package/dist/assets/MarketplaceAccessDenied-DvMKTKZG.js +0 -1
  157. package/dist/assets/MarketplacePackagePage-DuZ5A7L3.js +0 -4
  158. package/dist/assets/MarketplacePage-8XMnemHc.js +0 -1
  159. package/dist/assets/MetadataInspector-BcJZckHC.js +0 -1
  160. package/dist/assets/ProfilePage-CPP3LKyF.js +0 -1
  161. package/dist/assets/PublicFormsPage-CJz8WQst.js +0 -1
  162. package/dist/assets/RecordDetailView-Dg0FtCgX.js +0 -9
  163. package/dist/assets/ReportDefaultInspector-bXn7Ud0K.js +0 -1
  164. package/dist/assets/ReportView-CYKdWMWV.js +0 -2
  165. package/dist/assets/RuntimeDraftBar-CpfEHMPU.js +0 -1
  166. package/dist/assets/SystemHubPage-DFwicwZT.js +0 -1
  167. package/dist/assets/architecture-7EHR7CIX-BdMnUPE0.js +0 -1
  168. package/dist/assets/blockDiagram-GPEHLZMM-D6-9deBJ.js +0 -132
  169. package/dist/assets/channel-ByUUDCyR.js +0 -1
  170. package/dist/assets/chunk-55IACEB6-BhOjfCrn.js +0 -1
  171. package/dist/assets/chunk-5ZQYHXKU-DG12s6lW.js +0 -2
  172. package/dist/assets/chunk-CSCIHK7Q-DfSAlgJl.js +0 -124
  173. package/dist/assets/chunk-QZHKN3VN-ujroCBCz.js +0 -1
  174. package/dist/assets/chunk-WU5MYG2G-DwQt8tuZ.js +0 -1
  175. package/dist/assets/classDiagram-4FO5ZUOK-B7mTyEXp.js +0 -1
  176. package/dist/assets/classDiagram-v2-Q7XG4LA2-B7mTyEXp.js +0 -1
  177. package/dist/assets/eventmodeling-FCH6USID-CFiyy8DS.js +0 -1
  178. package/dist/assets/framework-DCMHw4uc.js +0 -34
  179. package/dist/assets/index-DIwBADyw.css +0 -2
  180. package/dist/assets/index-OUEQY-pz.js +0 -4
  181. package/dist/assets/infrastructure-CJNwTVno.js +0 -3
  182. package/dist/assets/mergeServerFields-DLHgCyyI.js +0 -7
  183. package/dist/assets/mermaid-GHXKKRXX-BkPYaQdJ.js +0 -1
  184. package/dist/assets/mermaid.core-C41Aiku8.js +0 -8
  185. package/dist/assets/metadata-admin-CLro8Vr2.js +0 -19
  186. package/dist/assets/plugin-calendar-BnAXrMpl.js +0 -1
  187. package/dist/assets/plugin-charts-CqgNZ5dQ.js +0 -7
  188. package/dist/assets/plugin-dashboard-lpyBUnU3.js +0 -5
  189. package/dist/assets/plugin-form-DjP7n76r.js +0 -1
  190. package/dist/assets/plugin-gantt-BRce7Qx4.js +0 -39
  191. package/dist/assets/plugin-grid-3MIxvbIs.js +0 -6
  192. package/dist/assets/plugin-kanban-BY5U45PP.js +0 -1
  193. package/dist/assets/plugin-report-CjGy4oCX.js +0 -59
  194. package/dist/assets/plugin-view-C15Djdpb.js +0 -1
  195. package/dist/assets/plugins-views-DvIN271Q.js +0 -4
  196. package/dist/assets/src-ChUzpvnF.js +0 -2
  197. package/dist/assets/stateDiagram-v2-BHNVJYJU-DPQJ1_JB.js +0 -1
  198. package/dist/assets/ui-components-D1FYlKrM.js +0 -42
  199. package/dist/assets/useReconcileOnError-Cxzq30_3.js +0 -1
  200. package/dist/assets/vendor-charts-fo4ZbB_t.js +0 -39
  201. package/dist/assets/vendor-objectstack-BNd856rx.js +0 -96
  202. package/dist/assets/vendor-radix-CSVEhP0L.js +0 -56
  203. package/dist/assets/vendor-react-DR370ovB.js +0 -11
  204. package/dist/assets/vendor-sentry-BIOhD5Kg.js +0 -501
@@ -1,501 +0,0 @@
1
- import{o as e,r as t}from"./rolldown-runtime-CMxvf4Kt.js";import{_ as n}from"./vendor-react-DR370ovB.js";var r=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,i=globalThis,a=`10.57.0`;function o(){return s(i),i}function s(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`10.57.0`,t[a]=t[`10.57.0`]||{}}function c(e,t,n=i){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[a]=r[`10.57.0`]||{};return o[e]||(o[e]=t())}var l=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],u=`Sentry Logger `,d={};function f(e){if(!(`console`in i))return e();let t=i.console,n={},r=Object.keys(d);r.forEach(e=>{let r=d[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function p(){b().enabled=!0}function m(){b().enabled=!1}function h(){return b().enabled}function g(...e){y(`log`,...e)}function _(...e){y(`warn`,...e)}function v(...e){y(`error`,...e)}function y(e,...t){r&&h()&&f(()=>{i.console[e](`${u}[${e}]:`,...t)})}function b(){return r?c(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var x={enable:p,disable:m,isEnabled:h,log:g,warn:_,error:v},S=50,C=/\(error: (.*)\)/,w=/captureMessage|captureException/;function T(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
2
- `);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=C.test(n)?n.replace(C,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=S+r)break}}return te(i.slice(r))}}function ee(e){return Array.isArray(e)?T(...e):e}function te(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ne(t).function||``)&&t.pop(),t.reverse(),w.test(ne(t).function||``)&&(t.pop(),w.test(ne(t).function||``)&&t.pop()),t.slice(0,S).map(e=>({...e,filename:e.filename||ne(t).filename,function:e.function||`?`}))}function ne(e){return e[e.length-1]||{}}var re=`<anonymous>`;function ie(e){try{return!e||typeof e!=`function`?re:e.name||re}catch{return re}}function ae(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}function oe(e){let t=e?.startsWith(`file://`)?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var se={},E={};function ce(e,t){return se[e]=se[e]||[],se[e].push(t),()=>{let n=se[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function le(e,t){if(!E[e]){E[e]=!0;try{t()}catch(t){r&&x.error(`Error while instrumenting ${e}`,t)}}}function ue(e,t){let n=e&&se[e];if(n)for(let i of n)try{i(t)}catch(t){r&&x.error(`Error while triggering instrumentation handler.
3
- Type: ${e}
4
- Name: ${ie(i)}
5
- Error:`,t)}}var de=null;function fe(e){let t=`error`;ce(t,e),le(t,pe)}function pe(){de=i.onerror,i.onerror=function(e,t,n,r,i){return ue(`error`,{column:r,error:i,line:n,msg:e,url:t}),de?de.apply(this,arguments):!1},i.onerror.__SENTRY_INSTRUMENTED__=!0}var me=null;function he(e){let t=`unhandledrejection`;ce(t,e),le(t,ge)}function ge(){me=i.onunhandledrejection,i.onunhandledrejection=function(e){return ue(`unhandledrejection`,e),me?me.apply(this,arguments):!0},i.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var _e=Object.prototype.toString;function ve(e){switch(_e.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return ke(e,Error)}}function ye(e,t){return _e.call(e)===`[object ${t}]`}function be(e){return ye(e,`ErrorEvent`)}function xe(e){return ye(e,`DOMError`)}function Se(e){return ye(e,`DOMException`)}function D(e){return ye(e,`String`)}function Ce(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function we(e){return e===null||Ce(e)||typeof e!=`object`&&typeof e!=`function`}function Te(e){return ye(e,`Object`)}function Ee(e){return typeof Event<`u`&&ke(e,Event)}function De(e){return ye(e,`RegExp`)}function Oe(e){return!!(e?.then&&typeof e.then==`function`)}function ke(e,t){try{return e instanceof t}catch{return!1}}function Ae(e){return typeof Request<`u`&&ke(e,Request)}function je(e,t,n){if(!(t in e))return;let i=e[t];if(typeof i!=`function`)return;let a=n(i);typeof a==`function`&&Ne(a,i);try{e[t]=a}catch{r&&x.log(`Failed to replace method "${t}" in object`,e)}}function Me(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{r&&x.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Ne(e,t){try{e.prototype=t.prototype=t.prototype||{},Me(e,`__sentry_original__`,t)}catch{}}function Pe(e){return e.__sentry_original__}function Fe(e){if(ve(e))return{message:e.message,name:e.name,stack:e.stack,...Ie(e)};if(Ee(e)){let{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...Ie(e)}}return e}function Ie(e){return typeof e==`object`&&e?Object.fromEntries(Object.entries(e)):{}}function Le(e){let t=Object.keys(Fe(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var Re;function ze(e){if(Re!==void 0)return Re?Re(e):e();let t=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),n=i;return t in n&&typeof n[t]==`function`?(Re=n[t],Re(e)):(Re=null,e())}function Be(){return ze(()=>Math.random())}function Ve(){return ze(()=>Date.now())}var He=Symbol.for(`sentry.skipNormalization`),Ue=Symbol.for(`sentry.overrideNormalizationDepth`);function We(e){Me(e,He,!0)}function Ge(e,t){Me(e,Ue,t)}function Ke(e){return!!e[He]}function qe(e){let t=e[Ue];return typeof t==`number`?t:void 0}var Je;function Ye(e){Je=e}function Xe(e,t=100,n=1/0){try{return Qe(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Ze(e,t=3,n=100*1024){let r=Xe(e,t);return nt(r)>n?Ze(e,t-1,n):r}function Qe(e,t,n=1/0,r=1/0,i=rt()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=$e(e,t);if(!s.startsWith(`[object `))return s;if(Ke(t))return t;let c=qe(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return Qe(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=Fe(t);for(let e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(f>=r){d[e]=`[MaxProperties ~]`;break}let t=p[e];d[e]=Qe(e,t,l-1,r,i),f++}return o(t),d}function $e(e,t){try{if(Je){let e=Je(t);if(e)return e}return typeof global<`u`&&t===global?`[Global]`:typeof t==`number`&&!Number.isFinite(t)?`[${t}]`:typeof t==`function`?`[Function: ${ie(t)}]`:typeof t==`symbol`?`[${String(t)}]`:typeof t==`bigint`?`[BigInt: ${String(t)}]`:`[object ${et(t)}]`}catch(e){return`**non-serializable** (${e})`}}function et(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function tt(e){return~-encodeURI(e).split(/%..|./).length}function nt(e){return tt(JSON.stringify(e))}function rt(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function it(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function at(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let a=Math.min(i+140,r);return a>r-5&&(a=r),a===r&&(i=Math.max(a-140,0)),n=n.slice(i,a),i>0&&(n=`'{snip} ${n}`),a<r&&(n+=` {snip}`),n}function ot(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];we(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push($e(void 0,r))}return n.join(t)}function st(e,t,n=!1){return D(e)?De(t)?t.test(e):D(t)?n?e===t:e.includes(t):typeof t==`function`?t(e):!1:!1}function ct(e,t=[],n=!1){for(let r of t)if(st(e,r,n))return!0;return!1}function lt(){let e=i;return e.crypto||e.msCrypto}var ut;function dt(){return Be()*16}function ft(e=lt()){try{if(e?.randomUUID)return ze(()=>e.randomUUID()).replace(/-/g,``)}catch{}return ut||=`10000000100040008000100000000000`,ut.replace(/[018]/g,e=>(e^(dt()&15)>>e/4).toString(16))}function pt(e){return e.exception?.values?.[0]}function mt(e){let{message:t,event_id:n}=e;if(t)return t;let r=pt(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function ht(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function gt(e,t){let n=pt(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i?.data,...t.data};n.mechanism.data=e}}function _t(e,t,n=5){if(t.lineno===void 0)return;let r=e.length,i=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,i-n),i).map(e=>at(e,0)),t.context_line=at(e[Math.min(r-1,i)],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(e=>at(e,0))}function vt(e){if(yt(e))return!0;try{Me(e,`__sentry_captured__`,!0)}catch{}return!1}function yt(e){try{return e.__sentry_captured__}catch{}}var bt=1e3;function xt(){return Ve()/bt}function St(){let{performance:e}=i;if(!e?.now||!e.timeOrigin)return xt;let t=e.timeOrigin;return()=>(t+ze(()=>e.now()))/bt}var Ct;function O(){return(Ct??=St())()}var wt=null;function Tt(){let{performance:e}=i;if(!e?.now)return;let t=3e5,n=ze(()=>e.now()),r=Ve(),a=e.timeOrigin;if(typeof a==`number`&&Math.abs(a+n-r)<t)return a;let o=e.timing?.navigationStart;return typeof o==`number`&&Math.abs(o+n-r)<t?o:r-n}function Et(){return wt===null&&(wt=Tt()),wt}function Dt(e){let t=O(),n={sid:ft(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>At(n)};return e&&Ot(n,e),n}function Ot(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||O(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:ft()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function kt(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),Ot(e,n)}function At(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function jt(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=jt(r[e],t[e],n-1));return r}function Mt(){return ft()}function Nt(){return ft().substring(16)}function Pt(e){try{let t=i.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function Ft(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var It=`_sentrySpan`;function Lt(e,t){t?Me(e,It,Pt(t)):delete e[It]}function Rt(e){return Ft(e[It])}var zt=100,Bt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Mt(),sampleRand:Be()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Lt(t,Rt(this)),t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Ot(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof e?n.getScopeData():Te(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Lt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Mt(),sampleRand:Be()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:zt;if(n<=0)return this;let r={timestamp:xt(),...e,message:e.message?it(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client?.recordDroppedEvent(`buffer_overflow`,`log_item`)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Rt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=jt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t?.event_id||ft();if(!this._client)return r&&x.warn(`No client configured on scope - will not capture exception!`),n;let i=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:i,...t,event_id:n},this),n}captureMessage(e,t,n){let i=n?.event_id||ft();if(!this._client)return r&&x.warn(`No client configured on scope - will not capture message!`),i;let a=n?.syntheticException??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:a,...n,event_id:i},this),i}captureEvent(e,t){let n=e.event_id||t?.event_id||ft();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(r&&x.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function Vt(){return c(`defaultCurrentScope`,()=>new Bt)}function Ht(){return c(`defaultIsolationScope`,()=>new Bt)}var Ut=e=>e instanceof Promise&&!e[Wt],Wt=Symbol(`chained PromiseLike`),Gt=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Ut(r)&&Ut(e)?r:Kt(e,r)},Kt=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Wt]:!0}),t},qt=class{constructor(e,t){let n;n=e||new Bt;let r;r=t||new Bt,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return Oe(n)?Gt(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Jt(){let e=s(o());return e.stack=e.stack||new qt(Vt(),Ht())}function Yt(e){return Jt().withScope(e)}function Xt(e,t){let n=Jt();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Zt(e){return Jt().withScope(()=>e(Jt().getIsolationScope()))}function Qt(){return{withIsolationScope:Zt,withScope:Yt,withSetScope:Xt,withSetIsolationScope:(e,t)=>Zt(t),getCurrentScope:()=>Jt().getScope(),getIsolationScope:()=>Jt().getIsolationScope()}}function $t(e){let t=s(e);return t.acs?t.acs:Qt()}function en(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function tn(e,t){let{value:n,unit:r}=en(e)?e:{value:e,unit:void 0},i=on(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function nn(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=tn(i,t);e&&(n[r]=e)}return n}function rn(e){if(!e)return 0;let t=0;for(let[n,r]of Object.entries(e)){t+=n.length*2,t+=r.type.length*2,t+=(r.unit?.length??0)*2;let e=r.value;Array.isArray(e)?t+=an(e[0])*e.length:we(e)?t+=an(e):t+=100}return t}function an(e){return typeof e==`string`?e.length*2:typeof e==`boolean`?4:typeof e==`number`?8:0}function on(e){if(Array.isArray(e))return{value:e,type:`array`};let t=typeof e==`string`?`string`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?Number.isInteger(e)?`integer`:`double`:null;if(t)return{value:e,type:t}}var sn;function cn(){return sn?.()}function ln(){return sn!==void 0}function k(){return $t(o()).getCurrentScope()}function un(){return $t(o()).getIsolationScope()}function dn(){return c(`globalScope`,()=>new Bt)}function fn(...e){let t=$t(o());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function pn(...e){let t=$t(o());if(e.length===2){let[n,r]=e;return n?t.withSetIsolationScope(n,r):t.withIsolationScope(r)}return t.withIsolationScope(e[0])}function A(){return k().getClient()}function mn(e){let t=cn();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||Nt()};return r&&(a.parent_span_id=r),a}var j=`sentry.source`,hn=`sentry.sample_rate`,gn=`sentry.previous_trace_sample_rate`,M=`sentry.op`,N=`sentry.origin`,_n=`sentry.idle_span_finish_reason`,vn=`sentry.measurement_unit`,yn=`sentry.measurement_value`,bn=`sentry.release`,xn=`sentry.environment`,Sn=`sentry.segment.name`,Cn=`sentry.segment.id`,wn=`sentry.sdk.name`,Tn=`sentry.sdk.version`,En=`sentry.sdk.integrations`,Dn=`user.id`,On=`user.email`,kn=`user.ip_address`,An=`user.name`,jn=`sentry.custom_span_name`,Mn=`sentry.profile_id`,Nn=`sentry.exclusive_time`,Pn=`sentry.link.type`,Fn=`gen_ai.conversation.id`;function In(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:`unauthenticated`};case 403:return{code:2,message:`permission_denied`};case 404:return{code:2,message:`not_found`};case 409:return{code:2,message:`already_exists`};case 413:return{code:2,message:`failed_precondition`};case 429:return{code:2,message:`resource_exhausted`};case 499:return{code:2,message:`cancelled`};default:return{code:2,message:`invalid_argument`}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:`unimplemented`};case 503:return{code:2,message:`unavailable`};case 504:return{code:2,message:`deadline_exceeded`};default:return{code:2,message:`internal_error`}}return{code:2,message:`internal_error`}}function Ln(e,t){e.setAttribute(`http.response.status_code`,t);let n=In(t);n.message!==`unknown_error`&&e.setStatus(n)}var Rn=`_sentryScope`,zn=`_sentryIsolationScope`;function Bn(e,t,n){e&&(Me(e,zn,Pt(n)),Me(e,Rn,t))}function Vn(e){let t=e;return{scope:t[Rn],isolationScope:Ft(t[zn])}}var Hn=`sentry-`;function Un(e){let t=Gn(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function Wn(e){if(e)return qn(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${Hn}${t}`]=n),e),{}))}function Gn(e){if(!(!e||!D(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=Kn(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Kn(e)}function Kn(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}function qn(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((e,[t,n],i)=>{let a=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,o=i===0?a:`${e},${a}`;return o.length>8192?(r&&x.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):o},``)}var Jn=/^o(\d+)\./,Yn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Xn(e){return e===`http`||e===`https`}function Zn(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function Qn(e){let t=Yn.exec(e);if(!t){f(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return $n({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function $n(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function er(e){if(!r)return!0;let{port:t,projectId:n,protocol:i}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>e[t]?!1:(x.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:n.match(/^\d+$/)?Xn(i)?t&&isNaN(parseInt(t,10))?(x.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(x.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(x.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function tr(e){return e.match(Jn)?.[1]}function nr(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=tr(n)),r}function rr(e){let t=typeof e==`string`?Qn(e):$n(e);if(!(!t||!er(t)))return t}function ir(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var ar=RegExp(`^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$`);function or(e){if(!e)return;let t=e.match(ar);if(!t)return;let n;return t[3]===`1`?n=!0:t[3]===`0`&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function sr(e,t){let n=or(e),r=Un(t);if(!n?.traceId)return{traceId:Mt(),sampleRand:Be()};let i=ur(n,r);r&&(r.sample_rand=i.toString());let{traceId:a,parentSpanId:o,parentSampled:s}=n;return{traceId:a,parentSpanId:o,sampled:s,dsc:r||{},sampleRand:i}}function cr(e=Mt(),t=Nt(),n){let r=``;return n!==void 0&&(r=n?`-1`:`-0`),`${e}-${t}${r}`}function lr(e=Mt(),t=Nt(),n){return`00-${e}-${t}-${n?`01`:`00`}`}function ur(e,t){let n=ir(t?.sample_rand);if(n!==void 0)return n;let r=ir(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Be()*r:r+Be()*(1-r):Be()}function dr(e,t){let n=nr(e);return t&&n&&t!==n?(x.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):e.getOptions().strictTraceContinuation&&(t&&!n||!t&&n)?(x.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}var fr=!1;function pr(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,origin:s,links:c}=P(e);return{parent_span_id:a,span_id:t,trace_id:n,data:r,op:i,status:o,origin:s,links:c}}function mr(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:P(e).parent_span_id,a=Vn(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||Nt():t,trace_id:n}}function hr(e){let{traceId:t,spanId:n}=e.spanContext();return cr(t,n,Er(e))}function gr(e){let{traceId:t,spanId:n}=e.spanContext();return lr(t,n,Er(e))}function _r(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function vr(e){if(e?.length)return e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:n===1,attributes:r}))}function yr(e){return typeof e==`number`?br(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?br(e.getTime()):O()}function br(e){return e>9999999999?e/1e3:e}function P(e){if(Tr(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(wr(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:Sr(e),start_timestamp:yr(i),timestamp:yr(o)||void 0,status:Dr(s),op:r[M],origin:r[N],links:_r(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function xr(e){if(Tr(e))return e.getStreamedSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(wr(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{name:a,span_id:t,trace_id:n,parent_span_id:Sr(e),start_timestamp:yr(i),end_timestamp:yr(o),is_segment:e===Pr(e),status:Or(s),attributes:r,links:vr(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:``,end_timestamp:0,status:`ok`,is_segment:e===Pr(e)}}function Sr(e){return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0}function Cr(e){return{...e,attributes:nn(e.attributes),links:e.links?.map(e=>({...e,attributes:nn(e.attributes)}))}}function wr(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Tr(e){return typeof e.getSpanJSON==`function`}function Er(e){let{traceFlags:t}=e.spanContext();return t===1}function Dr(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}function Or(e){return!e||e.code===1||e.code===0||e.message===`cancelled`?`ok`:`error`}var kr=`_sentryChildSpans`,Ar=`_sentryRootSpan`;function jr(e,t){Me(t,Ar,e[Ar]||e),e[kr]?e[kr].add(t):Me(e,kr,new Set([t]))}function Mr(e,t){e[kr]&&e[kr].delete(t)}function Nr(e){let t=new Set;function n(e){if(!t.has(e)&&Er(e)){t.add(e);let r=e[kr]?Array.from(e[kr]):[];for(let e of r)n(e)}}return n(e),Array.from(t)}var F=Pr;function Pr(e){return e[Ar]||e}function I(){let e=$t(o());return e.getActiveSpan?e.getActiveSpan():Rt(k())}function Fr(){fr||=(f(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}function Ir(e,t){e.updateName(t),e.setAttributes({[j]:`custom`,[jn]:t})}var Lr=!1;function Rr(){if(Lr)return;function e(){let e=I(),t=e&&F(e);if(t){let e=`internal_error`;r&&x.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}Lr=!0,fe(e),he(e)}function zr(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||A()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Br(e){x.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Vr(e,t){if(!t?.length)return!1;for(let n of t){if(Wr(n)){if(e.description&&st(e.description,n))return r&&Br(e),!0;continue}let t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;let i=n.name?e.description&&st(e.description,n.name):!0,a=n.op?e.op&&st(e.op,n.op):!0,o=n.attributes?Object.entries(n.attributes).every(([t,n])=>Hr(e.attributes?.[t],n)):!0;if(i&&a&&o)return r&&Br(e),!0}return!1}function Hr(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?st(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function Ur(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function Wr(e){return typeof e==`string`||e instanceof RegExp}var Gr=`production`,Kr=`_frozenDsc`;function qr(e,t){Me(e,Kr,t)}function Jr(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:nr(t)};return t.emit(`createDsc`,i),i}function Yr(e,t){let n=t.getPropagationContext();return n.dsc||Jr(n.traceId,e)}function Xr(e){let t=A();if(!t)return{};let n=F(e),r=P(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[Kr];if(c)return s(c);let l=a?.get(`sentry.dsc`),u=l&&Un(l);if(u)return s(u);let d=Jr(e.spanContext().traceId,t),f=i[`sentry.source`]??i[`sentry.span.source`],p=r.description;return f!==`url`&&p&&(d.transaction=p),zr()&&(d.sampled=String(Er(n)),d.sample_rand=a?.get(`sentry.sample_rand`)??Vn(n).scope?.getPropagationContext().sampleRand.toString()),s(d),t.emit(`createDsc`,d,n),d}function Zr(e){return Wn(Xr(e))}var Qr=class{constructor(e={}){this._traceId=e.traceId||Mt(),this._spanId=e.spanId||Nt(),this.dropReason=e.dropReason}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}};function $r(e){return Me(e,`_streamed`,!0),e}function ei(e){return!!e&&typeof e==`function`&&`_streamed`in e&&!!e._streamed}function ti(e,t=[]){return[e,t]}function ni(e,t){let[n,r]=e;return[n,[...r,t]]}function ri(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function ii(e,t){return ri(e,(e,n)=>t.includes(n))}function ai(e){let t=s(i);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function oi(e){let t=s(i);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function si(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[ai(r),e]:r.push(typeof e==`string`?ai(e):e)}for(let e of n){let[t,n]=e;if(i(`
6
- ${JSON.stringify(t)}
7
- `),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(Xe(n))}i(e)}}return typeof r==`string`?r:ci(r)}function ci(e){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 li(e){let t=typeof e==`string`?ai(e):e;function n(e){let n=t.subarray(0,e);return t=t.subarray(e+1),n}function r(){let e=t.indexOf(10);return e<0&&(e=t.length),JSON.parse(oi(n(e)))}let i=r(),a=[];for(;t.length;){let e=r(),t=typeof e.length==`number`?e.length:void 0;a.push([e,t?n(t):r()])}return[i,a]}function ui(e){return[{type:`span`},e]}function di(e){let t=typeof e.data==`string`?ai(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var fi={sessions:`session`,event:`error`,client_report:`internal`,user_report:`default`,profile_chunk:`profile`,replay_event:`replay`,replay_recording:`replay`,check_in:`monitor`,raw_security:`security`,log:`log_item`,trace_metric:`metric`};function pi(e){return e in fi}function mi(e){return pi(e)?fi[e]:e}function hi(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function gi(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(Ve()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Zn(r)},...i&&{trace:i}}}function _i(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function vi(e,t,n,r){let i=hi(n);return ti({sent_at:new Date(Ve()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Zn(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function yi(e,t,n,r){let i=hi(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;_i(e,n?.sdk);let o=gi(e,i,r,t);return delete e.sdkProcessingMetadata,ti(o,[[{type:a},e]])}function bi(e,t){function n(e){return!!e.trace_id&&!!e.public_key}let r=Xr(e[0]),i=t?.getDsn(),a=t?.getOptions().tunnel,o={sent_at:new Date(Ve()).toISOString(),...n(r)&&{trace:r},...!!a&&i&&{dsn:Zn(i)}},{beforeSendSpan:s,ignoreSpans:c}=t?.getOptions()||{},l=c?.length?e.filter(e=>{let t=P(e);return!Vr({description:t.description,op:t.op,attributes:t.data},c)}):e,u=e.length-l.length;u&&t?.recordDroppedEvent(`before_send`,`span`,u);let d=s?e=>{let t=P(e);return(ei(s)?t:s(t))||(Fr(),t)}:P,f=[];for(let e of l){let t=d(e);t&&f.push(ui(t))}return ti(o,f)}function xi(e){if(!r)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`,parent_span_id:i}=P(e),{spanId:a}=e.spanContext(),o=Er(e),s=F(e),c=s===e,l=`[Tracing] Starting ${o?`sampled`:`unsampled`} ${c?`root `:``}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${a}`];if(i&&u.push(`parent ID: ${i}`),!c){let{op:e,description:t}=P(s);u.push(`root ID: ${s.spanContext().spanId}`),e&&u.push(`root op: ${e}`),t&&u.push(`root description: ${t}`)}x.log(`${l}
8
- ${u.join(`
9
- `)}`)}function Si(e){if(!r)return;let{description:t=`< unknown name >`,op:n=`< unknown op >`}=P(e),{spanId:i}=e.spanContext(),a=`[Tracing] Finishing "${n}" ${F(e)===e?`root `:``}span "${t}" with ID ${i}`;x.log(a)}function Ci(e,t,n,i=I()){let a=i&&F(i);a&&(r&&x.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),a.addEvent(e,{[yn]:t,[vn]:n}))}function wi(e){if(!e||e.length===0)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[vn],i=n[yn];typeof r==`string`&&typeof i==`number`&&(t[e.name]={value:i,unit:r})}),t}function Ti(e){return e.getOptions().traceLifecycle===`stream`}var Ei=1e3,Di=class{constructor(e={}){this._traceId=e.traceId||Mt(),this._spanId=e.spanId||Nt(),this._startTime=e.startTimestamp||O(),this._links=e.links,this._attributes={},this.setAttributes({[N]:`manual`,[M]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),`sampled`in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:+!!n}}setAttribute(e,t){return t===void 0?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._startTime=yr(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(j,`custom`),this}end(e){this._endTime||(this._endTime=yr(e),Si(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[M],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Dr(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[N],profile_id:this._attributes[Mn],exclusive_time:this._attributes[Nn],measurements:wi(this._events),is_segment:this._isStandaloneSpan&&F(this)===this||void 0,segment_id:this._isStandaloneSpan?F(this).spanContext().spanId:void 0,links:_r(this._links)}}getStreamedSpanJSON(){return{name:this._name??``,span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===F(this),status:Or(this._status),attributes:this._attributes,links:vr(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){r&&x.log(`[Tracing] Adding an event to span:`,e);let i=Oi(t)?t:n||O(),a=Oi(t)?{}:t||{},o={name:e,time:yr(i),attributes:a};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){let e=A();if(e&&(e.emit(`spanEnd`,this),this._isStandaloneSpan||e.emit(`afterSpanEnd`,this)),!(this._isStandaloneSpan||this===F(this)))return;if(this._isStandaloneSpan){this._sampled?ji(bi([this],e)):(r&&x.log(`[Tracing] Discarding standalone span because its trace was not chosen to be sampled.`),e&&e.recordDroppedEvent(`sample_rate`,`span`));return}else if(e&&Ti(e)){e.emit(`afterSegmentSpanEnd`,this);return}let t=this._convertSpanToTransaction();t&&(Vn(this).scope||k()).captureEvent(t)}_convertSpanToTransaction(){if(!ki(P(this)))return;this._name||=(r&&x.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`);let{scope:e,isolationScope:t}=Vn(this),n=e?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;let i=Nr(this).filter(e=>e!==this&&!Ai(e)).map(e=>P(e)).filter(ki),a=this._attributes[j];delete this._attributes[jn];let o=!1;i.forEach(e=>{delete e.data[jn],e.op?.startsWith(`gen_ai.`)&&(o=!0)});let s={contexts:{trace:pr(this)},spans:i.length>Ei?i.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,Ei):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:t,dynamicSamplingContext:Xr(this),hasGenAiSpans:o},request:n,...a&&{transaction_info:{source:a}}},c=wi(this._events);return c&&Object.keys(c).length&&(r&&x.log(`[Measurements] Adding measurements to transaction event`,JSON.stringify(c,void 0,2)),s.measurements=c),s}};function Oi(e){return e&&typeof e==`number`||e instanceof Date||Array.isArray(e)}function ki(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Ai(e){return e instanceof Di&&e.isStandaloneSpan()}function ji(e){let t=A();if(!t)return;let n=e[1];if(!n||n.length===0){t.recordDroppedEvent(`before_send`,`span`);return}t.sendEnvelope(e)}function Mi(e,t,n=()=>{},r=()=>{}){let i;try{i=e()}catch(e){throw t(e),n(),e}return Ni(i,t,n,r)}function Ni(e,t,n,r){return Oe(e)?Gt(e,e=>{n(),r(e)},e=>{t(e),n()}):(n(),r(e),e)}function Pi(e,t,n){if(!zr(e))return[!1];let i,a;typeof e.tracesSampler==`function`?(a=e.tracesSampler({...t,inheritOrSampleWith:e=>typeof t.parentSampleRate==`number`?t.parentSampleRate:typeof t.parentSampled==`boolean`?Number(t.parentSampled):e}),i=!0):t.parentSampled===void 0?e.tracesSampleRate!==void 0&&(a=e.tracesSampleRate,i=!0):a=t.parentSampled;let o=ir(a);if(o===void 0)return r&&x.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(a)} of type ${JSON.stringify(typeof a)}.`),[!1];if(!o)return r&&x.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler==`function`?`tracesSampler returned 0 or false`:`a negative sampling decision was inherited or tracesSampleRate is set to 0`}`),[!1,o,i];let s=n<o;return s||r&&x.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(a)})`),[s,o,i]}var Fi=`__SENTRY_SUPPRESS_TRACING__`;function Ii(e,t){let n=Gi();if(n.startSpan)return n.startSpan(e,t);let r=Wi(e),{forceTransaction:i,parentSpan:a,scope:o}=e,s=o?.clone();return fn(s,()=>Yi(a)(()=>{let n=k(),o=Ji(n,a),s=A(),c=e.onlyIfParent&&!o,l=c?new Qr:Ui({parentSpan:o,spanArguments:r,forceTransaction:i,scope:n});return c&&s?.recordDroppedEvent(`no_parent_span`,`span`),(!Zi(l)||!o)&&Lt(n,l),Mi(()=>t(l),()=>{let{status:e}=P(l);l.isRecording()&&(!e||e===`ok`)&&l.setStatus({code:2,message:`internal_error`})},()=>{l.end()})}))}function Li(e,t){let n=Gi();if(n.startSpanManual)return n.startSpanManual(e,t);let r=Wi(e),{forceTransaction:i,parentSpan:a,scope:o}=e,s=o?.clone();return fn(s,()=>Yi(a)(()=>{let n=k(),o=Ji(n,a),s=e.onlyIfParent&&!o,c=s?new Qr:Ui({parentSpan:o,spanArguments:r,forceTransaction:i,scope:n});return s&&A()?.recordDroppedEvent(`no_parent_span`,`span`),(!Zi(c)||!o)&&Lt(n,c),Mi(()=>t(c,()=>c.end()),()=>{let{status:e}=P(c);c.isRecording()&&(!e||e===`ok`)&&c.setStatus({code:2,message:`internal_error`})})}))}function Ri(e){let t=Gi();if(t.startInactiveSpan)return t.startInactiveSpan(e);let n=Wi(e),{forceTransaction:r,parentSpan:i}=e;return(e.scope?t=>fn(e.scope,t):i===void 0?e=>e():e=>Bi(i,e))(()=>{let t=k(),a=Ji(t,i),o=A();return e.onlyIfParent&&!a?(o?.recordDroppedEvent(`no_parent_span`,`span`),new Qr):Ui({parentSpan:a,spanArguments:n,forceTransaction:r,scope:t})})}var zi=(e,t)=>{let n=$t(o());if(n.continueTrace)return n.continueTrace(e,t);let{sentryTrace:r,baggage:i}=e,a=A(),s=Un(i);return a&&!dr(a,s?.org_id)?Hi(t):fn(e=>{let n=sr(r,i);return e.setPropagationContext(n),Lt(e,void 0),t()})};function Bi(e,t){let n=Gi();return n.withActiveSpan?n.withActiveSpan(e,t):fn(n=>(Lt(n,e||void 0),t(n)))}function Vi(e){let t=Gi();return t.suppressTracing?t.suppressTracing(e):fn(t=>{t.setSDKProcessingMetadata({[Fi]:!0});let n=e();return t.setSDKProcessingMetadata({[Fi]:void 0}),n})}function Hi(e){let t=Gi();return t.startNewTrace?t.startNewTrace(e):fn(t=>(t.setPropagationContext({traceId:Mt(),sampleRand:Be()}),r&&x.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),Bi(null,e)))}function Ui({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!zr()){let r=new Qr;return(n||!e)&&qr(r,{sampled:`false`,sample_rate:`0`,transaction:t.name,...Xr(r)}),r}let i=A();if(Xi(i,t))return Qi(r)||i?.recordDroppedEvent(`ignored`,`span`),new Qr({dropReason:`ignored`,traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});let a=un(),o;if(e&&!n)o=qi(e,r,t),jr(e,o);else if(e){let n=Xr(e),{traceId:i,spanId:a}=e.spanContext(),s=Er(e);o=Ki({traceId:i,parentSpanId:a,...t},r,s),qr(o,n)}else{let{traceId:e,dsc:n,parentSpanId:i,sampled:s}={...a.getPropagationContext(),...r.getPropagationContext()};o=Ki({traceId:e,parentSpanId:i,...t},r,s),n&&qr(o,n)}return xi(o),Bn(o,r,a),o}function Wi(e){let t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){let n={...t};return n.startTimestamp=yr(e.startTime),delete n.startTime,n}return t}function Gi(){return $t(o())}function Ki(e,t,n){let i=A(),a=i?.getOptions()||{},{name:o=``}=e,s={spanAttributes:{...e.attributes},spanName:o,parentSampled:n};i?.emit(`beforeSampling`,s,{decision:!1});let c=s.parentSampled??n,l=s.spanAttributes,u=t.getPropagationContext(),d=Qi(t),[f,p,m]=d?[!1]:Pi(a,{name:o,parentSampled:c,attributes:l,parentSampleRate:ir(u.dsc?.sample_rate)},u.sampleRand),h=new Di({...e,attributes:{[j]:`custom`,[hn]:p!==void 0&&m?p:void 0,...l},sampled:f});return!f&&i&&!d&&(r&&x.log(`[Tracing] Discarding root span because its trace was not chosen to be sampled.`),i.recordDroppedEvent(`sample_rate`,Ti(i)?`span`:`transaction`)),i&&i.emit(`spanStart`,h),h}function qi(e,t,n){let{spanId:r,traceId:i}=e.spanContext(),a=Qi(t),o=a?!1:Er(e),s=o?new Di({...n,parentSpanId:r,traceId:i,sampled:o}):new Qr({traceId:i});jr(e,s);let c=A();return c?(Ti(c)&&s instanceof Qr&&(e instanceof Qr&&e.dropReason?(s.dropReason=e.dropReason,c.recordDroppedEvent(e.dropReason,`span`)):a||(s.dropReason=`sample_rate`,c.recordDroppedEvent(`sample_rate`,`span`))),c.emit(`spanStart`,s),n.endTimestamp&&(c.emit(`spanEnd`,s),c.emit(`afterSpanEnd`,s)),s):s}function Ji(e,t){if(t)return t;if(t===null)return;let n=Rt(e);if(!n)return;let r=A();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?F(n):n}function Yi(e){return e===void 0?e=>e():t=>Bi(e,t)}function Xi(e,t){let n=e?.getOptions().ignoreSpans;return!e||!Ti(e)||!n?.length?!1:Vr({description:t.name||``,op:t.attributes?.[`sentry.op`]||t.op,attributes:t.attributes},n)}function Zi(e){return e instanceof Qr&&e.dropReason===`ignored`}function Qi(e){return e.getScopeData().sdkProcessingMetadata[Fi]===!0}var $i={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},ea=`heartbeatFailed`,ta=`idleTimeout`,na=`finalTimeout`,ra=`externalFinish`;function ia(e,t={}){let n=new Map,i=!1,a,o=ra,s=!t.disableAutoFinish,c=[],{idleTimeout:l=$i.idleTimeout,finalTimeout:u=$i.finalTimeout,childSpanTimeout:d=$i.childSpanTimeout,beforeSpanEnd:f,trimIdleSpanEndTimestamp:p=!0}=t,m=A();if(!m||!zr()){let e=new Qr;return qr(e,{sample_rate:`0`,sampled:`false`,...Xr(e)}),e}let h=k(),g=I(),_=aa(e);_.end=new Proxy(_.end,{apply(e,t,n){if(f&&f(_),t instanceof Qr)return;let[r,...i]=n,a=yr(r||O()),o=Nr(_).filter(e=>e!==_),s=P(_);if(!o.length||!p)return w(a),Reflect.apply(e,t,[a,...i]);let c=m.getOptions().ignoreSpans,l=o?.reduce((e,t)=>{let n=P(t);return!n.timestamp||c&&Vr({description:n.description,op:n.op,attributes:n.data},c)?e:e?Math.max(e,n.timestamp):n.timestamp},void 0),d=s.start_timestamp,h=Math.min(d?d+u/1e3:1/0,Math.max(d||-1/0,Math.min(a,l||1/0)));return w(h),Reflect.apply(e,t,[h,...i])}});function v(){a&&=(clearTimeout(a),void 0)}function y(e){v(),a=setTimeout(()=>{!i&&n.size===0&&s&&(o=ta,_.end(e))},l)}function b(e){a=setTimeout(()=>{!i&&s&&(o=ea,_.end(e))},d)}function S(e){v(),n.set(e,!0),b(O()+d/1e3)}function C(e){n.has(e)&&n.delete(e),n.size===0&&y(O()+l/1e3)}function w(e){i=!0,n.clear(),c.forEach(e=>e()),Lt(h,g);let t=P(_),{start_timestamp:a}=t;if(!a)return;t.data[`sentry.idle_span_finish_reason`]||_.setAttribute(_n,o);let s=t.status;(!s||s===`unknown`)&&_.setStatus({code:1}),x.log(`[Tracing] Idle span "${t.op}" finished`);let d=Nr(_).filter(e=>e!==_),f=0;d.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:`cancelled`}),t.end(e),r&&x.log(`[Tracing] Cancelling span since span ended early`,JSON.stringify(t,void 0,2)));let{timestamp:n=0,start_timestamp:i=0}=P(t),a=i<=e,o=(u+l)/1e3,s=n-i<=o;if(r){let e=JSON.stringify(t,void 0,2);a?s||x.log(`[Tracing] Discarding span since it finished after idle span final timeout`,e):x.log(`[Tracing] Discarding span since it happened after idle span was finished`,e)}(!s||!a)&&(Mr(_,t),f++)}),f>0&&_.setAttribute(`sentry.idle_span_discarded_spans`,f)}return c.push(m.on(`spanStart`,e=>{i||e===_||P(e).timestamp||e instanceof Di&&e.isStandaloneSpan()||Nr(_).includes(e)&&S(e.spanContext().spanId)})),c.push(m.on(`spanEnd`,e=>{i||C(e.spanContext().spanId)})),c.push(m.on(`idleSpanEnableAutoFinish`,e=>{e===_&&(s=!0,y(),n.size&&b())})),t.disableAutoFinish||y(),setTimeout(()=>{i||(_.setStatus({code:2,message:`deadline_exceeded`}),o=na,_.end())},u),_}function aa(e){let t=Ri(e);return Lt(k(),t),r&&x.log(`[Tracing] Started span is an idle span`),t}function oa(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;ua(e,t),r&&pa(e,r),ma(e,n),da(e,i),fa(e,a)}function sa(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:h}=t;ca(e,`extra`,n),ca(e,`tags`,r),ca(e,`attributes`,i),ca(e,`user`,a),ca(e,`contexts`,o),e.sdkProcessingMetadata=jt(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),h&&(e.span=h),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function ca(e,t,n){e[t]=jt(e[t],n,1)}function la(e,t){let n=dn().getScopeData();return e&&sa(n,e.getScopeData()),t&&sa(n,t.getScopeData()),n}function ua(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function da(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function fa(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function pa(e,t){e.contexts={trace:mr(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Xr(t),...e.sdkProcessingMetadata};let n=P(F(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function ma(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}var ha=`thismessage:/`;function ga(e){return`isRelative`in e}function _a(e,t){let n=e.indexOf(`://`)<=0&&e.indexOf(`//`)!==0,r=t??(n?ha:void 0);try{if(`canParse`in URL&&!URL.canParse(e,r))return;let t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function va(e){if(ga(e))return e.pathname;let t=new URL(e);return t.search=``,t.hash=``,[`80`,`443`].includes(t.port)&&(t.port=``),t.password&&=`%filtered%`,t.username&&=`%filtered%`,t.toString()}function ya(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function ba(e){return e.split(/[?#]/,1)[0]}function xa(e){let{protocol:t,host:n,path:r}=e,i=n?.replace(/^.*@/,`[filtered]:[filtered]@`).replace(/(:80)$/,``).replace(/(:443)$/,``)||``;return`${t?`${t}://`:``}${i}${r}`}function Sa(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function Ca(e){let t={},{response:n,profile:r,cloud_resource:i,culture:a,state:o}=e;if(n&&(n.status_code!=null&&(t[`http.response.status_code`]=n.status_code),n.body_size!=null&&(t[`http.response.body.size`]=n.body_size)),r&&(r.profile_id&&(t[`sentry.profile_id`]=r.profile_id),r.profiler_id&&(t[`sentry.profiler_id`]=r.profiler_id)),i)for(let[e,n]of Object.entries(i))n!=null&&(t[e]=n);a&&(a.locale&&(t[`culture.locale`]=a.locale),a.timezone&&(t[`culture.timezone`]=a.timezone)),o?.state&&typeof o.state.type==`string`&&(t[`state.type`]=o.state.type);let s=e.angular;if(s){let e=s.version;(typeof e==`string`||typeof e==`number`)&&(t[`angular.version`]=e)}let c=e.react;if(c){let e=c.version;(typeof e==`string`||typeof e==`number`)&&(t[`react.version`]=e)}return t}function wa(e,t){let n=xr(e),r=Pr(e),i=xr(r),{isolationScope:a,scope:o}=Vn(e),s=la(a,o);Oa(n,i,t,s);let c=e.kind;Ma(n,c),n.is_segment&&(Ta(n,s),Da(n,t),t.emit(`processSegmentSpan`,n)),t.emit(`processSpan`,n);let{beforeSendSpan:l}=t.getOptions(),u=l&&ei(l)?ka(n,l):n,d=u.attributes?.[j];return d&&Ea(u,{"sentry.span.source":d}),{...Cr(u),_segmentSpan:r}}function Ta(e,t){Ea(e,Ca(t.contexts))}function Ea(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}function Da(e,t){let n=t.getIntegrationNames();n.length&&Ea(e,{[En]:n})}function Oa(e,t,n,r){let i=n.getSdkMetadata(),{release:a,environment:o}=n.getOptions();Ea(e,{[bn]:a,[xn]:o,[Sn]:t.name,[Cn]:t.span_id,[wn]:i?.sdk?.name,[Tn]:i?.sdk?.version,[Dn]:r.user?.id,[On]:r.user?.email,[kn]:r.user?.ip_address,[An]:r.user?.username,...r.attributes})}function ka(e,t){return t(e)||(Fr(),e)}var Aa=1,ja=2;function Ma(e,t){let n=e.attributes;if(!n)return;let r=n[`http.request.method`]||n[`http.method`];if(r){Na(e,n,t,r);return}let i=n[`db.system.name`]||n[`db.system`],a=typeof n[`sentry.op`]==`string`&&`${n[`sentry.op`]}`.startsWith(`cache.`);if(i&&!a){Fa(e,n);return}if(n[`rpc.service`]){Ea(e,{[M]:`rpc`});return}if(n[`messaging.system`]){Ea(e,{[M]:`message`});return}let o=n[`faas.trigger`];o&&Ea(e,{[M]:`${o}`})}function Na(e,t,n,r){let i=[`http`];n===ja?i.push(`client`):n===Aa&&i.push(`server`),t[`sentry.http.prefetch`]&&i.push(`prefetch`),Ea(e,{[M]:i.join(`.`)});let a=t[jn];if(typeof a==`string`){e.name=a;return}if(t[`sentry.source`]===`custom`)return;let o=t[`http.route`];if(typeof o==`string`)e.name=`${r} ${o}`,Ea(e,{[j]:`route`});else{if(n===ja||n===Aa){let i=Pa(t,n);i&&(e.name=`${r} ${i}`)}Ea(e,{[j]:`url`})}}function Pa(e,t){let n=e[`http.url`]||e[`url.full`],r=e[`http.target`],i=typeof n==`string`?ya(n):void 0,a=i?xa(i):void 0;if(t===Aa&&typeof r==`string`)return ba(r);if(a)return a;if(typeof r==`string`)return ba(r)}function Fa(e,t){Ea(e,{[M]:`db`});let n=t[jn];if(typeof n==`string`){e.name=n;return}if(t[`sentry.source`]===`custom`)return;let r=t[`db.statement`];r&&(e.name=`${r}`,Ea(e,{[j]:`task`}))}var Ia=0,La=1,Ra=2;function za(e){return new Va(t=>{t(e)})}function Ba(e){return new Va((t,n)=>{n(e)})}var Va=class e{constructor(e){this._state=Ia,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===Ia)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===La&&e[1](this._value),this._state===Ra&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===Ia){if(Oe(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(La,e)},r=e=>{t(Ra,e)};try{e(n,r)}catch(e){r(e)}}};function Ha(e,t,n,r=0){try{let i=Ua(t,n,e,r);return Oe(i)?i:za(i)}catch(e){return Ba(e)}}function Ua(e,t,n,i){let a=n[i];if(!e||!a)return e;let o=a({...e},t);return r&&o===null&&x.log(`Event processor "${a.id||`?`}" dropped event`),Oe(o)?o.then(e=>Ua(e,t,n,i+1)):Ua(o,t,n,i+1)}var Wa,Ga,Ka,qa;function Ja(e){let t=i._sentryDebugIds,n=i._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],a=n?Object.keys(n):[];if(qa&&r.length===Ga&&a.length===Ka)return qa;Ga=r.length,Ka=a.length,qa={},Wa||={};let o=(t,n)=>{for(let r of t){let t=n[r],i=Wa?.[r];if(i&&qa&&t)qa[i[0]]=t,Wa&&(Wa[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&qa&&Wa){qa[i]=t,Wa[r]=[i,t];break}}}}};return t&&o(r,t),n&&o(a,n),qa}function Ya(e,t){let n=Ja(e);if(!n)return[];let r=[];for(let e of t){let t=oe(e);t&&n[t]&&r.push({type:`sourcemap`,code_file:e,debug_id:n[t]})}return r}function Xa(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||ft(),timestamp:t.timestamp||xt()},l=n.integrations||e.integrations.map(e=>e.name);Za(c,e),eo(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&Qa(c,e.stackParser);let u=no(r,n.captureContext);n.mechanism&&gt(c,n.mechanism);let d=i?i.getEventProcessors():[],f=la(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),oa(c,f);let m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?za(c):Ha(m,c,n)).then(e=>(e&&$a(e),typeof o==`number`&&o>0?to(e,o,s):e))}function Za(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=it(o.url,a)),a&&e.exception?.values?.forEach(e=>{e.value&&=it(e.value,a)})}function Qa(e,t){let n=Ja(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function $a(e){let t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function eo(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function to(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Xe(e.data,t,n)}}))},...e.user&&{user:Xe(e.user,t,n)},...e.contexts&&{contexts:Xe(e.contexts,t,n)},...e.extra&&{extra:Xe(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Xe(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:Xe(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Xe(e.contexts.flags,3,n)),r}function no(e,t){if(!t)return e;let n=e?e.clone():new Bt;return n.update(t),n}function ro(e){if(e)return io(e)||oo(e)?{captureContext:e}:e}function io(e){return e instanceof Bt||typeof e==`function`}var ao=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function oo(e){return Object.keys(e).some(e=>ao.includes(e))}function L(e,t){return k().captureException(e,ro(t))}function so(e,t){let n=typeof t==`string`?t:void 0,r=typeof t==`string`?void 0:{captureContext:t};return k().captureMessage(e,n,r)}function co(e,t){return k().captureEvent(e,t)}function lo(e,t){un().setContext(e,t)}function uo(e){un().setExtras(e)}function fo(e,t){un().setExtra(e,t)}function po(e){un().setTags(e)}function mo(e,t){un().setTag(e,t)}function ho(e){un().setUser(e)}function go(e){un().setConversationId(e)}function _o(){return un().lastEventId()}async function vo(e){let t=A();return t?t.flush(e):(r&&x.warn(`Cannot flush events. No client defined.`),Promise.resolve(!1))}async function yo(e){let t=A();return t?t.close(e):(r&&x.warn(`Cannot flush events and disable SDK. No client defined.`),Promise.resolve(!1))}function bo(){return!!A()}function xo(){let e=A();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function So(e){un().addEventProcessor(e)}function Co(e){let t=un(),{user:n}=la(t,k()),{userAgent:r}=i.navigator||{},a=Dt({user:n,...r&&{userAgent:r},...e}),o=t.getSession();return o?.status===`ok`&&Ot(o,{status:`exited`}),wo(),t.setSession(a),a}function wo(){let e=un(),t=k().getSession()||e.getSession();t&&kt(t),To(),e.setSession()}function To(){let e=un(),t=A(),n=e.getSession();n&&t&&t.captureSession(n)}function Eo(e=!1){if(e){wo();return}To()}function Do(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function Oo(e){return`${Do(e)}${e.projectId}/envelope/`}function ko(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Ao(e,t,n){return t||`${Oo(e)}?${ko(e,n)}`}function jo(e,t){let n=rr(e);if(!n)return``;let r=`${Do(n)}embed/error-page/`,i=`dsn=${Zn(n)}`;for(let e in t)if(e!==`dsn`&&e!==`onClose`)if(e===`user`){let e=t.user;if(!e)continue;e.name&&(i+=`&name=${encodeURIComponent(e.name)}`),e.email&&(i+=`&email=${encodeURIComponent(e.email)}`)}else i+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${i}`}var Mo=[];function No(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function Po(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return No(r)}function Fo(e,t){let n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&Lo(e,t,n)}),n}function Io(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Lo(e,t,n){if(n[t.name]){r&&x.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Mo.includes(t.name)&&typeof t.setupOnce==`function`&&(t.setupOnce(),Mo.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(n=>{let r=t[n];typeof r==`function`&&e.on(n,n=>r.call(t,n,e))}),r&&x.log(`Integration installed: ${t.name}`)}function Ro(e){let t=A();if(!t){r&&x.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}function R(e){return e}var zo=`sentry.timestamp.sequence`,Bo=0,Vo;function Ho(e){let t=Math.floor(e*1e3);Vo!==void 0&&t!==Vo&&(Bo=0);let n=Bo;return Bo++,Vo=t,{key:zo,value:{value:n,type:`integer`}}}function Uo(e,t){return t?fn(t,()=>{let n=I(),r=n?mr(n):mn(t);return[n?Xr(n):Yr(e,t),r]}):[void 0,void 0]}var Wo={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function Go(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function Ko(){return`npm`}function qo(){return!Go()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function Jo(){return typeof window<`u`&&(!qo()||Yo())}function Yo(){return i.process?.type===`renderer`}function Xo(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...Jo()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Zo(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=Zn(r)),ti(a,[Xo(e,i)])}var Qo=100;function $o(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function es(e,t){let n=is(),r=rs(e);r===void 0?n.set(e,[t]):r.length>=Qo?(ns(e,r),n.set(e,[t])):n.set(e,[...r,t])}function ts(e,t=k(),n=es){let i=t?.getClient()??A();if(!i){r&&x.warn(`No client available to capture log.`);return}let{release:a,environment:o,enableLogs:s=!1,beforeSendLog:c}=i.getOptions();if(!s){r&&x.warn(`logging option not enabled, log will not be captured.`);return}let[,l]=Uo(i,t),u={...e.attributes},{user:{id:d,email:p,username:m},attributes:h={}}=la(un(),t);$o(u,`user.id`,d,!1),$o(u,`user.email`,p,!1),$o(u,`user.name`,m,!1),$o(u,`sentry.release`,a),$o(u,`sentry.environment`,o);let{name:g,version:_}=i.getSdkMetadata()?.sdk??{};$o(u,`sentry.sdk.name`,g),$o(u,`sentry.sdk.version`,_);let v=i.getIntegrationByName(`Replay`),y=v?.getReplayId(!0);$o(u,`sentry.replay_id`,y),y&&v?.getRecordingMode()===`buffer`&&$o(u,`sentry._internal.replay_is_buffering`,!0);let b=e.message;if(Ce(b)){let{__sentry_template_string__:e,__sentry_template_values__:t=[]}=b;t?.length&&(u[`sentry.message.template`]=e),t.forEach((e,t)=>{u[`sentry.message.parameter.${t}`]=e})}$o(u,`sentry.trace.parent_span_id`,Rt(t)?.spanContext().spanId);let S={...e,attributes:u};i.emit(`beforeCaptureLog`,S);let C=c?f(()=>c(S)):S;if(!C){i.recordDroppedEvent(`before_send`,`log_item`,1),r&&x.warn(`beforeSendLog returned null, log will not be captured.`);return}let{level:w,message:T,attributes:ee={},severityNumber:te}=C,ne=O(),re=Ho(ne);n(i,{timestamp:ne,level:w,body:os(String(T)),trace_id:l?.trace_id,severity_number:te??Wo[w],attributes:as({...nn(h),...nn(ee,!0),[re.key]:re.value})}),i.emit(`afterCaptureLog`,C)}function ns(e,t){let n=t??rs(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Zo(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);is().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function rs(e){return is().get(e)}function is(){return c(`clientToLogBufferMap`,()=>new WeakMap)}function as(e){let t={};for(let[n,r]of Object.entries(e)){let e=os(n);r.type===`string`?t[e]={...r,value:os(r.value)}:t[e]=r}return t}function os(e){let t=Object(e),n=t.isWellFormed,r=t.toWellFormed;return typeof n==`function`&&typeof r==`function`?n.call(e)?e:r.call(e):e}function ss(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...Jo()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function cs(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=Zn(r)),ti(a,[ss(e,i)])}var ls=1e3;function us(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function ds(e,t){let n=_s(),r=gs(e);r===void 0?n.set(e,[t]):r.length>=ls?(hs(e,r),n.set(e,[t])):n.set(e,[...r,t])}function fs(e,t,n){let{release:r,environment:i}=t.getOptions(),a={...e.attributes};us(a,`user.id`,n.id,!1),us(a,`user.email`,n.email,!1),us(a,`user.name`,n.username,!1),us(a,`sentry.release`,r),us(a,`sentry.environment`,i);let{name:o,version:s}=t.getSdkMetadata()?.sdk??{};us(a,`sentry.sdk.name`,o),us(a,`sentry.sdk.version`,s);let c=t.getIntegrationByName(`Replay`),l=c?.getReplayId(!0);return us(a,`sentry.replay_id`,l),l&&c?.getRecordingMode()===`buffer`&&us(a,`sentry._internal.replay_is_buffering`,!0),{...e,attributes:a}}function ps(e,t,n,r){let[,i]=Uo(t,n),a=Rt(n),o=a?a.spanContext().traceId:i?.trace_id,s=a?a.spanContext().spanId:void 0,c=O(),l=Ho(c);return{timestamp:c,trace_id:o??``,span_id:s,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...nn(r),...nn(e.attributes,`skip-undefined`),[l.key]:l.value}}}function ms(e,t){let n=t?.scope??k(),i=t?.captureSerializedMetric??ds,a=n?.getClient()??A();if(!a){r&&x.warn(`No client available to capture metric.`);return}let{_experiments:o,enableMetrics:s,beforeSendMetric:c}=a.getOptions();if(!(s??o?.enableMetrics??!0)){r&&x.warn(`metrics option not enabled, metric will not be captured.`);return}let{user:l,attributes:u}=la(un(),n),d=fs(e,a,l);a.emit(`processMetric`,d);let f=c||o?.beforeSendMetric,p=f?f(d):d;if(!p){r&&x.log("`beforeSendMetric` returned `null`, will not send metric.");return}let m=ps(p,a,n,u);r&&x.log(`[Metric]`,m),i(a,m),a.emit(`afterCaptureMetric`,p)}function hs(e,t){let n=t??gs(e)??[];if(n.length===0)return;let r=e.getOptions(),i=cs(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);_s().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function gs(e){return _s().get(e)}function _s(){return c(`clientToMetricBufferMap`,()=>new WeakMap)}function vs(e){return Cr({trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||``,start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status===`ok`||e.status===`cancelled`?`ok`:`error`,is_segment:!1,attributes:{...e.data},links:e.links})}function ys(e,t){if(e.type!==`transaction`||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!t.getOptions().streamGenAiSpans||Ti(t))return;let n=[],r=[];for(let t of e.spans)t.op?.startsWith(`gen_ai.`)?n.push(vs(t)):r.push(t);if(n.length===0)return;e.spans=r;let i=t.getDataCollectionOptions().userInfo?`auto`:`never`;return[{type:`span`,item_count:n.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,...Jo()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}function bs(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}var xs=Symbol.for(`SentryBufferFullError`);function Ss(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return Ba(xs);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return za(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>bs(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var Cs=60*1e3;function ws(e,t=Ve()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?Cs:r-t}function Ts(e,t){return e[t]||e.all||0}function Es(e,t,n=Ve()){return Ts(e,t)>n}function Ds(e,{statusCode:t,headers:n},r=Ve()){let i={...e},a=n?.[`x-sentry-rate-limits`],o=n?.[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+ws(o,r):t===429&&(i.all=r+60*1e3);return i}function Os(e,t,n=Ss(e.bufferSize||64)){let i={},a=e=>n.drain(e);function o(a){let o=[];if(ri(a,(t,n)=>{let r=mi(n);Es(i,r)?e.recordDroppedEvent(`ratelimit_backoff`,r):o.push(t)}),o.length===0)return Promise.resolve({});let s=ti(a[0],o),c=t=>{if(ii(s,[`client_report`])){r&&x.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`);return}ri(s,(n,r)=>{e.recordDroppedEvent(t,mi(r))})};return n.add(()=>t({body:si(s)}).then(e=>e.statusCode===413?(r&&x.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),c(`send_error`),e):(r&&e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&x.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),i=Ds(i,e),e),e=>{throw c(`network_error`),r&&x.error(`Encountered error running transport request:`,e),e})).then(e=>e,e=>{if(e===xs)return r&&x.error(`Skipped sending event because buffer is full.`),c(`queue_overflow`),Promise.resolve({});throw e})}return{send:o,flush:a}}function ks(e,t,n){let r=[{type:`client_report`},{timestamp:n||xt(),discarded_events:e}];return ti(t?{dsn:t}:{},[r])}function As(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function js(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:o,op:s}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??``,start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??``,origin:a,profile_id:o?.[Mn],exclusive_time:o?.[Nn],measurements:e.measurements,is_segment:!0}}function Ms(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}var Ns=`[Filtered]`,Ps=[`forwarded`,`-ip`,`remote-`,`via`,`-user`],Fs=[`auth`,`token`,`secret`,`session`,`password`,`passwd`,`pwd`,`key`,`jwt`,`bearer`,`sso`,`saml`,`csrf`,`xsrf`,`credentials`,`sid`,`identity`,`set-cookie`,`cookie`],Is=[`.sid`,`sessid`,`remember`,`oidc`,`pkce`,`nonce`,`__secure-`,`__host-`,`awsalb`,`awselb`,`akamai`,`__stripe`,`cognito`,`firebase`,`supabase`,`sb-`,`mfa`,`2fa`];function Ls(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:Ps},httpHeaders:{request:{deny:Ps},response:{deny:Ps}},httpBodies:[],queryParams:{deny:Ps},genAI:{inputs:!1,outputs:!1},stackFrameVariables:!0,frameContextLines:7}}var Rs={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};function zs(e){let t=e.dataCollection==null?Ls(e.sendDefaultPii):Rs,n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,queryParams:n.queryParams??t.queryParams,genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}var Bs=`Not capturing exception because it's already been captured.`,Vs=`Discarded session because of missing or non-string release`,Hs=Symbol.for(`SentryInternalError`),Us=Symbol.for(`SentryDoNotSendEventError`),Ws=5e3;function Gs(e){return{message:e,[Hs]:!0}}function Ks(e){return{message:e,[Us]:!0}}function qs(e){return!!e&&typeof e==`object`&&Hs in e}function Js(e){return!!e&&typeof e==`object`&&Us in e}function Ys(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)i(e);else if(!s){let t=e.getOptions()._flushInterval??Ws;t>0&&(s=!0,o=bs(setTimeout(()=>{i(e)},t)))}}),e.on(`flush`,()=>{i(e)})}var Xs=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Ss(e.transportOptions?.bufferSize??64),this._dataCollection=zs(e),e.dsn?this._dsn=rr(e.dsn):r&&x.warn(`No DSN provided, client will not send events.`),this._dsn){let t=Ao(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&Ys(this,`afterCaptureLog`,`flushLogs`,rc,ns),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Ys(this,`afterCaptureMetric`,`flushMetrics`,nc,hs)}captureException(e,t,n){let i=ft();if(vt(e))return r&&x.log(Bs),i;let a={event_id:i,...t};return this._process(()=>this.eventFromException(e,a).then(e=>this._captureEvent(e,a,n)).then(e=>e),`error`),a.event_id}captureMessage(e,t,n,r){let i={event_id:ft(),...n},a=Ce(e)?e:String(e),o=we(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,t,n){let i=ft();if(t?.originalException&&vt(t.originalException))return r&&x.log(Bs),i;let a={event_id:i,...t},o=e.sdkProcessingMetadata||{},s=o.capturedSpanScope,c=o.capturedSpanIsolationScope,l=Zs(e.type);return this._process(()=>this._captureEvent(e,a,s||n,c),l),a.event_id}captureSession(e){this.sendSession(e),Ot(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){ns(this);let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),Lo(this,e,this._integrations),t||Io(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=ys(e,this),r=yi(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])r=ni(r,di(e));n&&(r=ni(r,n)),this.sendEnvelope(r).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:t,environment:n=Gr}=this._options;if(`aggregates`in e){let i=e.attrs||{};if(!i.release&&!t){r&&x.warn(Vs);return}i.release=i.release||t,i.environment=i.environment||n,e.attrs=i}else{if(!e.release&&!t){r&&x.warn(Vs);return}e.release=e.release||t,e.environment=e.environment||n}this.emit(`beforeSendSession`,e);let i=vi(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){let i=`${e}:${t}`;r&&x.log(`Recording outcome: "${i}"${n>1?` (${n} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+n}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return r&&x.error(`Error while sending envelope:`,e),{}}return r&&x.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=Fo(this,e),Io(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception?.values;if(i){r=!0,n=!1;for(let e of i)if(e.mechanism?.handled===!1){n=!0;break}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(Ot(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),Xa(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...e.contexts?.trace,...mn(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Yr(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n=k(),i=un()){return r&&ec(e)&&x.log(`Captured error event \`${As(e)[0]||`<unknown>`}\``),this._processEvent(e,t,n,i).then(e=>e.event_id,e=>{r&&(Js(e)?x.log(e.message):qs(e)?x.warn(e.message):x.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=tc(e),s=ec(e),c=`before send for type \`${e.type||`error`}\``,l=a===void 0?void 0:ir(a);if(s&&typeof l==`number`&&Be()>l)return this.recordDroppedEvent(`sample_rate`,`error`),Ba(Ks(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));let u=Zs(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw this.recordDroppedEvent(`event_processor`,u),Ks("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?e:Qs($s(this,i,e,t),c)}).then(i=>{if(i===null){if(this.recordDroppedEvent(`before_send`,u),o){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw Ks(`${c} returned \`null\`, will not send event.`)}let a=n.getSession()||r.getSession();if(s&&a&&this._updateSessionFromEvent(a,i),o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let l=i.transaction_info;return o&&l&&i.transaction!==e.transaction&&(i.transaction_info={...l,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw Js(e)||qs(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),Gs(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
10
- Reason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===xs&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){r&&x.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0){r&&x.log(`No outcomes to send`);return}if(!this._dsn){r&&x.log(`No dsn provided, will not send outcomes`);return}r&&x.log(`Sending outcomes:`,e);let t=ks(e,this._options.tunnel&&Zn(this._dsn));this.sendEnvelope(t)}};function Zs(e){return e===`replay_event`?`replay`:e||`error`}function Qs(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Oe(e))return e.then(e=>{if(!Te(e)&&e!==null)throw Gs(n);return e},e=>{throw Gs(`${t} rejected with ${e}`)});if(!Te(e)&&e!==null)throw Gs(n);return e}function $s(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,ignoreSpans:o}=t,s=!ei(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(ec(c)&&i)return i(c,r);if(tc(c)){if(s||o){let t=js(c);if(o?.length&&Vr({description:t.description,op:t.op,attributes:t.data},o))return null;if(s){let e=s(t);e?c=jt(n,Ms(e)):Fr()}if(c.spans){let t=[],n=c.spans;for(let e of n){if(o?.length&&Vr({description:e.description,op:e.op,attributes:e.data},o)){Ur(n,e);continue}if(s){let n=s(e);n?t.push(n):(Fr(),t.push(e))}else t.push(e)}let r=c.spans.length-t.length;r&&e.recordDroppedEvent(`before_send`,`span`,r),c.spans=t}}if(a){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(c,r)}}return c}function ec(e){return e.type===void 0}function tc(e){return e.type===`transaction`}function nc(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+ic(e.attributes)}function rc(e){let t=0;return e.message&&(t+=e.message.length*2),t+ic(e.attributes)}function ic(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*ac(e[0]):we(e)?t+=ac(e):t+=100}),t}function ac(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function oc(e,t){t.debug===!0&&(r?x.enable():f(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),k().update(t.initialScope);let n=new e(t);return sc(n),n.init(),n}function sc(e){k().setClient(e)}var cc=5e3,lc=36e5;function uc(e){function t(...e){r&&x.log(`[Offline]:`,...e)}return n=>{let r=e(n);if(!n.createStore)throw Error("No `createStore` function was provided");let i=n.createStore(n),a=cc,o;function s(e,t,r){return ii(e,[`client_report`])?!1:n.shouldStore?n.shouldStore(e,t,r):!0}function c(e){o&&clearTimeout(o),o=bs(setTimeout(async()=>{o=void 0;let e=await i.shift();e&&(t(`Attempting to send previously queued event`),e[0].sent_at=new Date(Ve()).toISOString(),u(e,!0).catch(e=>{t(`Failed to retry sending`,e)}))},e))}function l(){o||(c(a),a=Math.min(a*2,lc))}async function u(e,o=!1){if(!o&&ii(e,[`replay_event`,`replay_recording`]))return await i.push(e),c(100),{};try{if(n.shouldSend&&await n.shouldSend(e)===!1)throw Error("Envelope not sent because `shouldSend` callback returned false");let t=await r.send(e),i=100;if(t){if(t.headers?.[`retry-after`])i=ws(t.headers[`retry-after`]);else if(t.headers?.[`x-sentry-rate-limits`])i=6e4;else if((t.statusCode||0)>=400)return t}return c(i),a=cc,t}catch(n){if(await s(e,n,a))return o?await i.unshift(e):await i.push(e),l(),t(`Error sending. Event queued.`,n),{};throw n}}return n.flushAtStartup&&l(),{send:u,flush:e=>(e===void 0&&(a=cc,c(100)),r.flush(e))}}}var dc=`MULTIPLEXED_TRANSPORT_EXTRA_KEY`;function fc(e,t){let n;return ri(e,(e,r)=>(t.includes(r)&&(n=Array.isArray(e)?e[1]:void 0),!!n)),n}function pc(e,t){return n=>{let r=e(n);return{...r,send:async e=>{let n=fc(e,[`event`,`transaction`,`profile`,`replay_event`]);return n&&(n.release=t),r.send(e)}}}}function mc(e,t){return ti(t?{...e[0],dsn:t}:e[0],e[1])}function hc(e,t){return n=>{let r=e(n),i=new Map,a=t||(e=>{let t=e.getEvent();return t?.extra?.MULTIPLEXED_TRANSPORT_EXTRA_KEY&&Array.isArray(t.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY)?t.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY:[]});function o(t,r){let a=r?`${t}:${r}`:t,o=i.get(a);if(!o){let s=Qn(t);if(!s)return;let c=Ao(s,n.tunnel);o=r?pc(e,r)({...n,url:c}):e({...n,url:c}),i.set(a,o)}return[t,o]}async function s(e){function t(t){return fc(e,t?.length?t:[`event`])}let n=a({envelope:e,getEvent:t}).map(e=>typeof e==`string`?o(e,void 0):o(e.dsn,e.release)).filter(e=>!!e),i=n.length?n:[[``,r]];return(await Promise.all(i.map(([t,n])=>n.send(mc(e,t)))))[0]}async function c(e){let t=[...i.values(),r];return(await Promise.all(t.map(t=>t.flush(e)))).every(e=>e)}return{send:s,flush:c}}}function gc(e,t){return t.some(t=>e.includes(t))}function _c(e,t,n){if(t===!1)return{};let r=n==null?Fs:[...Fs,...n],i={};if(t===!0){for(let t of Object.keys(e))i[t]=gc(t.toLowerCase(),r)?Ns:e[t];return i}if(`deny`in t){let n=t.deny.map(e=>e.toLowerCase());for(let t of Object.keys(e)){let a=t.toLowerCase();i[t]=gc(a,r)||n.some(e=>a.includes(e))?Ns:e[t]}return i}let a=t.allow.map(e=>e.toLowerCase());for(let t of Object.keys(e)){let n=t.toLowerCase();gc(n,r)?i[t]=Ns:i[t]=a.some(e=>n.includes(e))?e[t]:Ns}return i}function vc(e){let t={},n=0;for(;n<e.length;){let r=e.indexOf(`=`,n);if(r===-1)break;let i=e.indexOf(`;`,n);if(i===-1)i=e.length;else if(i<r){n=e.lastIndexOf(`;`,r-1)+1;continue}let a=e.slice(n,r).trim();if(t[a]===void 0){let n=e.slice(r+1,i).trim();n.charCodeAt(0)===34&&(n=n.slice(1,-1));try{t[a]=n.indexOf(`%`)===-1?n:decodeURIComponent(n)}catch{t[a]=n}}n=i+1}return t}function yc(e,t){if(t===!1)return{};try{let n=vc(e);return Object.keys(n).length===0?{}:_c(n,t,Is)}catch{return Ns}}function bc(e,t){let n=t?.getDsn(),r=t?.getOptions().tunnel;return Sc(e,n)||xc(e,r)}function xc(e,t){return t?wc(e)===wc(t):!1}function Sc(e,t){let n=_a(e);return!n||ga(n)||!t?!1:Cc(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function Cc(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function wc(e){return e[e.length-1]===`/`?e.slice(0,-1):e}function Tc(e,...t){let n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join(`\0`).replace(/%/g,`%%`).replace(/\0/g,`%s`),n.__sentry_template_values__=t,n}var Ec=Tc;function Dc(e){`aggregates`in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`}):e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function Oc(e,t,n=[t],r=`npm`){let i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:a})),i.version=a)}function kc(e={}){let t=e.client||A();if(!xo()||!t)return{};let n=$t(o());if(n.getTraceData)return n.getTraceData(e);let r=e.scope||k(),i=e.span||I();if(!i&&ln())return{};let a=i?hr(i):Ac(r),s=Wn(i?Xr(i):Yr(t,r));if(!ar.test(a))return x.warn(`Invalid sentry-trace data. Cannot generate trace data`),{};let c={"sentry-trace":a,baggage:s};return e.propagateTraceparent&&(c.traceparent=i?gr(i):jc(r)),c}function Ac(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return cr(t,r,n)}function jc(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return lr(t,r,n)}function Mc(e,t,n){let r,i,a,o=n?.maxWait?Math.max(n.maxWait,t):0,s=n?.setTimeoutImpl||setTimeout;function c(){return l(),r=e(),r}function l(){i!==void 0&&clearTimeout(i),a!==void 0&&clearTimeout(a),i=a=void 0}function u(){return i!==void 0||a!==void 0?c():r}function d(){return i&&clearTimeout(i),i=s(c,t),o&&a===void 0&&(a=s(c,o)),r}return d.cancel=l,d.flush=u,d}var Nc=100;function Pc(e,t){let n=A(),r=un();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Nc}=n.getOptions();if(a<=0)return;let o={timestamp:xt(),...e},s=i?f(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var Fc,Ic=`FunctionToString`,Lc=new WeakMap,Rc=R((()=>({name:Ic,setupOnce(){Fc=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Pe(this),n=Lc.has(A())&&t!==void 0?t:this;return Fc.apply(n,e)}}catch{}},setup(e){Lc.set(e,!0)}}))),zc=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/^Java exception was raised during method invocation$/],Bc=`EventFilters`,Vc=R((e={})=>{let t;return{name:Bc,setup(n){t=Uc(e,n.getOptions())},processEvent(n,r,i){return t||=Uc(e,i.getOptions()),Wc(n,t)?null:n}}}),Hc=R(((e={})=>({...Vc(e),name:`InboundFilters`})));function Uc(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:zc],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Wc(e,t){if(!e.type){if(Gc(e,t.ignoreErrors))return r&&x.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
11
- Event: ${mt(e)}`),!0;if(Zc(e))return r&&x.warn(`Event dropped due to not having an error message, error type or stacktrace.
12
- Event: ${mt(e)}`),!0;if(qc(e,t.denyUrls))return r&&x.warn(`Event dropped due to being matched by \`denyUrls\` option.
13
- Event: ${mt(e)}.
14
- Url: ${Xc(e)}`),!0;if(!Jc(e,t.allowUrls))return r&&x.warn(`Event dropped due to not being matched by \`allowUrls\` option.
15
- Event: ${mt(e)}.
16
- Url: ${Xc(e)}`),!0}else if(e.type===`transaction`&&Kc(e,t.ignoreTransactions))return r&&x.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
17
- Event: ${mt(e)}`),!0;return!1}function Gc(e,t){return t?.length?As(e).some(e=>ct(e,t)):!1}function Kc(e,t){if(!t?.length)return!1;let n=e.transaction;return n?ct(n,t):!1}function qc(e,t){if(!t?.length)return!1;let n=Xc(e);return n?ct(n,t):!1}function Jc(e,t){if(!t?.length)return!0;let n=Xc(e);return n?ct(n,t):!0}function Yc(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function Xc(e){try{let t=[...e.exception?.values??[]].reverse().find(e=>e.mechanism?.parent_id===void 0&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return t?Yc(t):null}catch{return r&&x.error(`Cannot extract url for event ${mt(e)}`),null}}function Zc(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function Qc(e,t,n,r,i,a){if(!i.exception?.values||!a||!ke(a.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=$c(e,t,r,a.originalException,n,i.exception.values,o,0))}function $c(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(ke(r[i],Error)){tl(o,s,r);let a=e(t,r[i]),l=c.length;nl(a,i,l,s),c=$c(e,t,n,r[i],i,[a,...c],a,l)}return el(r)&&r.errors.forEach((a,l)=>{if(ke(a,Error)){tl(o,s,r);let u=e(t,a),d=c.length;nl(u,`errors[${l}]`,d,s),c=$c(e,t,n,a,i,[u,...c],u,d)}}),c}function el(e){return Array.isArray(e.errors)}function tl(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...el(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function nl(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function rl(e){return ve(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function il(e){return rl(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var al=new Map,ol=new Set;function sl(e){if(i._sentryModuleMetadata)for(let t of Object.keys(i._sentryModuleMetadata)){let n=i._sentryModuleMetadata[t];if(ol.has(t))continue;ol.add(t);let r=e(t);for(let e of r.reverse())if(e.filename){al.set(e.filename,n);break}}}function cl(e,t){return sl(e),al.get(t)}function ll(e,t){t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{if(!t.filename||t.module_metadata)return;let n=cl(e,t.filename);n&&(t.module_metadata=n)})})}function ul(e){e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{delete e.module_metadata})})}var dl=R(()=>({name:`ModuleMetadata`,setup(e){e.on(`beforeEnvelope`,e=>{ri(e,(e,t)=>{if(t===`event`){let t=Array.isArray(e)?e[1]:void 0;t&&(ul(t),e[1]=t)}})}),e.on(`applyFrameMetadata`,t=>{if(t.type)return;let n=e.getOptions().stackParser;ll(n,t)})}})),fl=new Set([]);function pl(e){let t=`console`,n=ce(t,e);return le(t,ml),n}function ml(){`console`in i&&l.forEach(function(e){e in i.console&&je(i.console,e,function(t){return d[e]=t,function(...t){let n=t[0],a=d[e],o=fl.size&&typeof n==`string`&&ct(n,fl);o||ue(`console`,{args:t,level:e}),(!o||r&&x.isEnabled())&&a?.apply(i.console,t)}})})}function hl(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var gl=`CaptureConsole`,_l=R(((e={})=>{let t=e.levels||l,n=e.handled??!0;return{name:gl,setup(e){`console`in i&&pl(({args:r,level:i})=>{A()!==e||!t.includes(i)||vl(r,i,n)})}}}));function vl(e,t,n){let r=hl(t),i=Error(),a={level:hl(t),extra:{arguments:e}};fn(o=>{if(o.addEventProcessor(e=>(e.logger=`console`,gt(e,{handled:n,type:`auto.core.capture_console`}),e)),t===`assert`){if(!e[0]){let t=`Assertion failed: ${ot(e.slice(1),` `)||`console.assert`}`;o.setExtra(`arguments`,e.slice(1)),o.captureMessage(t,r,{captureContext:a,syntheticException:i})}return}let s=e.find(e=>e instanceof Error);if(s){L(s,a);return}let c=ot(e,` `);o.captureMessage(c,r,{captureContext:a,syntheticException:i})})}var yl=`Dedupe`,bl=R((()=>{let e;return{name:yl,processEvent(t){if(t.type)return t;try{if(xl(t,e))return r&&x.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}));function xl(e,t){return t?!!(Sl(e,t)||Cl(e,t)):!1}function Sl(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Tl(e,t)||!wl(e,t))}function Cl(e,t){let n=El(t),r=El(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Tl(e,t)||!wl(e,t))}function wl(e,t){let n=ae(e),r=ae(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function Tl(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function El(e){return e.exception?.values?.[0]}var Dl=`ExtraErrorData`,Ol=R(((e={})=>{let{depth:t=3,captureErrorCause:n=!0}=e;return{name:Dl,processEvent(e,r,i){let{maxValueLength:a}=i.getOptions();return kl(e,r,t,n,a)}}}));function kl(e,t={},n,r,i){if(!t.originalException||!ve(t.originalException))return e;let a=t.originalException.name||t.originalException.constructor.name,o=Al(t.originalException,r,i);if(o){let t={...e.contexts},r=Xe(o,n);return Te(r)&&(We(r),t[a]=r),{...e,contexts:t}}return e}function Al(e,t,n){try{let r=[`name`,`message`,`stack`,`line`,`column`,`fileName`,`lineNumber`,`columnNumber`,`toJSON`],i={};for(let t of Object.keys(e)){if(r.indexOf(t)!==-1)continue;let a=e[t];i[t]=ve(a)||typeof a==`string`?n?it(`${a}`,n):`${a}`:a}if(t&&e.cause!==void 0&&(ve(e.cause)?i.cause={[e.cause.name||e.cause.constructor.name]:Al(e.cause,!1,n)}:i.cause=e.cause),typeof e.toJSON==`function`){let t=e.toJSON();for(let e of Object.keys(t)){let n=t[e];i[e]=ve(n)?n.toString():n}}return i}catch(e){r&&x.error(`Unable to extract extra data from the Error object:`,e)}return null}function jl(e,t){let n=0;for(let t=e.length-1;t>=0;t--){let r=e[t];r===`.`?e.splice(t,1):r===`..`?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;)e.unshift(`..`);return e}var Ml=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Nl(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Ml.exec(t);return n?n.slice(1):[]}function Pl(...e){let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:`/`;i&&(t=`${i}/${t}`,n=i.charAt(0)===`/`)}return t=jl(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`}function Fl(e){let t=0;for(;t<e.length&&e[t]===``;t++);let n=e.length-1;for(;n>=0&&e[n]===``;n--);return t>n?[]:e.slice(t,n-t+1)}function Il(e,t){e=Pl(e).slice(1),t=Pl(t).slice(1);let n=Fl(e.split(`/`)),r=Fl(t.split(`/`)),i=Math.min(n.length,r.length),a=i;for(let e=0;e<i;e++)if(n[e]!==r[e]){a=e;break}let o=[];for(let e=a;e<n.length;e++)o.push(`..`);return o=o.concat(r.slice(a)),o.join(`/`)}function Ll(e,t){let n=Nl(e)[2]||``;return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}var Rl=`RewriteFrames`,zl=R((e={})=>{let t=e.root,n=e.prefix||`app:///`,r=`window`in i&&!!i.window,a=e.iteratee||Bl({isBrowser:r,root:t,prefix:n});function o(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>({...e,...e.stacktrace&&{stacktrace:s(e.stacktrace)}}))}}}catch{return e}}function s(e){return{...e,frames:e?.frames?.map(e=>a(e))}}return{name:Rl,processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=o(t)),t}}});function Bl({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes(`\\`)&&!r.filename.includes(`/`),a=/^\//.test(r.filename);if(e){if(t){let e=r.filename;e.indexOf(t)===0&&(r.filename=e.replace(t,n))}}else if(i||a){let e=i?r.filename.replace(/^[a-zA-Z]:/,``).replace(/\\/g,`/`):r.filename;r.filename=`${n}${t?Il(t,e):Ll(e)}`}return r}}var Vl=[`reauthenticate`,`signInAnonymously`,`signInWithOAuth`,`signInWithIdToken`,`signInWithOtp`,`signInWithPassword`,`signInWithSSO`,`signOut`,`signUp`,`verifyOtp`],Hl=[`createUser`,`deleteUser`,`listUsers`,`getUserById`,`updateUserById`,`inviteUserByEmail`],Ul={eq:`eq`,neq:`neq`,gt:`gt`,gte:`gte`,lt:`lt`,lte:`lte`,like:`like`,"like(all)":`likeAllOf`,"like(any)":`likeAnyOf`,ilike:`ilike`,"ilike(all)":`ilikeAllOf`,"ilike(any)":`ilikeAnyOf`,is:`is`,in:`in`,cs:`contains`,cd:`containedBy`,sr:`rangeGt`,nxl:`rangeGte`,sl:`rangeLt`,nxr:`rangeLte`,adj:`rangeAdjacent`,ov:`overlaps`,fts:``,plfts:`plain`,phfts:`phrase`,wfts:`websearch`,not:`not`},Wl=[`select`,`insert`,`upsert`,`update`,`delete`];function Gl(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function Kl(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function ql(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function Jl(e,t){return ql(e,t)!==void 0}function Yl(e,t={}){switch(e){case`GET`:return`select`;case`POST`:return t.Prefer?.includes(`resolution=`)?`upsert`:`insert`;case`PATCH`:return`update`;case`DELETE`:return`delete`;default:return`<unknown-op>`}}function Xl(e,t){if(t===``||t===`*`)return`select(*)`;if(e===`select`)return`select(${t})`;if(e===`or`||e.endsWith(`.or`))return`${e}${t}`;let[n,...r]=t.split(`.`),i;return i=n?.startsWith(`fts`)?`textSearch`:n?.startsWith(`plfts`)?`textSearch[plain]`:n?.startsWith(`phfts`)?`textSearch[phrase]`:n?.startsWith(`wfts`)?`textSearch[websearch]`:n&&Ul[n]||`filter`,`${i}(${e}, ${r.join(`.`)})`}function Zl(e,t=!1){return new Proxy(e,{apply(n,r,i){return Ii({name:`auth ${t?`(admin) `:``}${e.name}`,attributes:{[N]:`auto.db.supabase`,[M]:`db`,"db.system":`postgresql`,"db.operation":`auth.${t?`admin.`:``}${e.name}`}},e=>Reflect.apply(n,r,i).then(t=>(t&&typeof t==`object`&&`error`in t&&t.error?(e.setStatus({code:2}),L(t.error,{mechanism:{handled:!1,type:`auto.db.supabase.auth`}})):e.setStatus({code:1}),e.end(),t)).catch(t=>{throw e.setStatus({code:2}),e.end(),L(t,{mechanism:{handled:!1,type:`auto.db.supabase.auth`}}),t}).then(...i))}})}function Ql(e){let t=e.auth;if(!(!t||Kl(e.auth))){for(let n of Vl){let r=t[n];r&&typeof e.auth[n]==`function`&&(e.auth[n]=Zl(r))}for(let n of Hl){let r=t.admin[n];r&&typeof e.auth.admin[n]==`function`&&(e.auth.admin[n]=Zl(r,!0))}Gl(e.auth)}}function $l(e,t){Kl(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(e,n,r){let i=Reflect.apply(e,n,r),a=i.constructor;return tu(a,t),i}}),Gl(e.prototype.from))}function eu(e,t){Kl(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(e,n,r){let i=Wl,a=n,o=Yl(a.method,a.headers);if(!i.includes(o)||!a?.url?.pathname||typeof a.url.pathname!=`string`)return Reflect.apply(e,n,r);let s=a.url.pathname.split(`/`),c=s.length>0?s[s.length-1]:``,l=[];for(let[e,t]of a.url.searchParams.entries())l.push(Xl(e,t));let u=Object.create(null);if(Te(a.body))for(let[e,t]of Object.entries(a.body))u[e]=t;let d=A(),f=t.sendOperationData??d?.getDataCollectionOptions().userInfo===!0,p=ql(a.body,u),m=o===`select`?``:`${o}${Jl(a.body,u)?`(...) `:``}`,h=f?l.join(` `):l.length>0?`[redacted]`:``,g=[m.trimEnd(),h].filter(Boolean).join(` `),_=g?`${g} from(${c})`:`from(${c})`,v={"db.table":c,"db.schema":a.schema,"db.url":a.url.origin,"db.sdk":a.headers[`X-Client-Info`],"db.system":`postgresql`,"db.operation":o,[N]:`auto.db.supabase`,[M]:`db`};return l.length&&f&&(v[`db.query`]=l),p!==void 0&&f&&(v[`db.body`]=p),Ii({name:_,attributes:v},t=>Reflect.apply(e,n,[]).then(e=>{if(t&&(e&&typeof e==`object`&&`status`in e&&Ln(t,e.status||500),t.end()),e?.error){let t=Error(e.error.message);e.error.code&&(t.code=e.error.code),e.error.details&&(t.details=e.error.details);let n={};l.length&&f&&(n.query=l),p!==void 0&&f&&(n.body=p),L(t,e=>(e.addEventProcessor(e=>(gt(e,{handled:!1,type:`auto.db.supabase.postgres`}),e)),e.setContext(`supabase`,n),e))}let n={type:`supabase`,category:`db.${o}`,message:_},r={};return l.length&&f&&(r.query=l),p!==void 0&&f&&(r.body=p),Object.keys(r).length&&(n.data=r),Pc(n),e},e=>{throw t&&(Ln(t,500),t.end()),e}).then(...r))}}),Gl(e.prototype.then))}function tu(e,t){for(let n of Wl)Kl(e.prototype[n])||(e.prototype[n]=new Proxy(e.prototype[n],{apply(e,i,a){let o=Reflect.apply(e,i,a),s=o.constructor;return r&&x.log(`Instrumenting ${n} operation's PostgRESTFilterBuilder`),eu(s,t),o}}),Gl(e.prototype[n]))}var nu=(e,t={})=>{if(!e){r&&x.warn(`Supabase integration was not installed because no Supabase client was provided.`);return}$l(e.constructor===Function?e:e.constructor,t),Ql(e)},ru=`Supabase`,iu=((e,t)=>({setupOnce(){nu(e,t)},name:ru})),au=R(e=>iu(e.supabaseClient,{sendOperationData:e.sendOperationData})),ou=10,su=`ZodErrors`;function cu(e){return ve(e)&&e.name===`ZodError`&&Array.isArray(e.issues)}function lu(e){return{...e,path:`path`in e&&Array.isArray(e.path)?e.path.join(`.`):void 0,keys:`keys`in e?JSON.stringify(e.keys):void 0,unionErrors:`unionErrors`in e?JSON.stringify(e.unionErrors):void 0}}function uu(e){return e.map(e=>typeof e==`number`?`<array>`:e).join(`.`)}function du(e){let t=new Set;for(let n of e.issues){let e=uu(n.path);e.length>0&&t.add(e)}let n=Array.from(t);if(n.length===0){let t=`variable`;if(e.issues.length>0){let n=e.issues[0];n!==void 0&&`expected`in n&&typeof n.expected==`string`&&(t=n.expected)}return`Failed to validate ${t}`}return`Failed to validate keys: ${it(n.join(`, `),100)}`}function fu(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!cu(r.originalException)||r.originalException.issues.length===0)return n;try{let i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(lu);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:`zod_issues.json`,data:JSON.stringify({issues:i})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:du(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":i.slice(0,e)}}}catch(e){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:`an exception was thrown while processing ZodError within applyZodErrorsToEvent()`,error:e instanceof Error?`${e.name}: ${e.message}
18
- ${e.stack}`:`unknown`}}}}}var pu=R(((e={})=>{let t=e.limit??ou;return{name:su,processEvent(n,r){return fu(t,e.saveZodIssuesAsAttachment,n,r)}}})),mu=R(e=>({name:`ThirdPartyErrorsFilter`,setup(e){e.on(`beforeEnvelope`,e=>{ri(e,(e,t)=>{if(t===`event`){let t=Array.isArray(e)?e[1]:void 0;t&&(ul(t),e[1]=t)}})}),e.on(`applyFrameMetadata`,t=>{if(t.type)return;let n=e.getOptions().stackParser;ll(n,t)})},preprocessEvent(t){e.ignoreSentryInternalFrames&&(i._sentryWrappedDepth??0)>0&&(t.sdkProcessingMetadata={...t.sdkProcessingMetadata,insideSentryWrapped:!0})},processEvent(t){let n=e.ignoreSentryInternalFrames?t.sdkProcessingMetadata?.insideSentryWrapped===!0&&t.exception?.values?.length===1:!1,r=gu(t,e.ignoreSentryInternalFrames,n);if(r&&r[e.behaviour===`drop-error-if-contains-third-party-frames`||e.behaviour===`apply-tag-if-contains-third-party-frames`?`some`:`every`](t=>!t.some(t=>e.filterKeys.includes(t)))){if(e.behaviour===`drop-error-if-contains-third-party-frames`||e.behaviour===`drop-error-if-exclusively-contains-third-party-frames`)return null;t.tags={...t.tags,third_party_code:!0}}return t}}));function hu(e,t,n){if(t!==0)return!1;if(n&&_u(e)||e.function===`sentryWrapped`)return!0;if(!e.context_line||!e.filename||!e.filename.includes(`sentry`)||!e.filename.includes(`helpers`)||!e.context_line.includes(bu))return!1;if(e.pre_context){let t=e.pre_context.length;for(let n=0;n<t;n++)if(e.pre_context[n]?.includes(yu))return!0}return!1}function gu(e,t,n){let r=ae(e);if(r)return r.filter((e,r)=>!e.filename||e.lineno==null&&e.colno==null&&e.instruction_addr==null?!1:!t||!hu(e,r,!!n)).map(e=>e.module_metadata?Object.keys(e.module_metadata).filter(e=>e.startsWith(vu)).map(e=>e.slice(vu.length)):[])}function _u(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}var vu=`_sentryBundlerPluginAppKey:`,yu=`Attempt to invoke user-land function`,bu=`fn.apply(this, wrappedArguments)`,xu=`flag.evaluation.`;function Su(e){if(e.type)return e;let t=k().getScopeData().contexts.flags,n=t?t.values:[];return n.length?(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...n]},e):e}function Cu(e,t,n=100){let r=k().getScopeData().contexts;r.flags||={values:[]};let i=r.flags.values;wu(i,e,t,n)}function wu(e,t,n,i){if(typeof n!=`boolean`)return;if(e.length>i){r&&x.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${i}`);return}let a=e.findIndex(e=>e.flag===t);a!==-1&&e.splice(a,1),e.length===i&&e.shift(),e.push({flag:t,result:n})}function Tu(e,t,n=10){if(typeof t!=`boolean`)return;let r=I();if(!r)return;let i=P(r).data;if(`${xu}${e}`in i){r.setAttribute(`${xu}${e}`,t);return}Object.keys(i).filter(e=>e.startsWith(xu)).length<n&&r.setAttribute(`${xu}${e}`,t)}var Eu=R(()=>({name:`FeatureFlags`,processEvent(e,t,n){return Su(e)},addFeatureFlag(e,t){Cu(e,t),Tu(e,t)}})),Du=R(({growthbookClass:e})=>({name:`GrowthBook`,setupOnce(){let t=e.prototype;typeof t.isOn==`function`&&je(t,`isOn`,Ou),typeof t.getFeatureValue==`function`&&je(t,`getFeatureValue`,Ou)},processEvent(e,t,n){return Su(e)}}));function Ou(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n==`string`&&typeof r==`boolean`&&(Cu(n,r),Tu(n,r)),r}}var ku=`ConversationId`,Au=R((()=>({name:ku,setup(e){e.on(`spanStart`,e=>{let t=k().getScopeData(),n=un().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=P(e);if(!t?.startsWith(`gen_ai.`)&&!n[`ai.operationId`]&&!i?.startsWith(`ai.`))return;e.setAttribute(Fn,r)}})}})));function ju(e,t,n,r,i){if(!e.fetchData)return;let{method:a,url:o}=e.fetchData,s=zr()&&t(o);if(e.endTimestamp){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(s&&(Pu(n,e),Mu(n,e,i)),delete r[t]);return}let{spanOrigin:c=`auto.http.browser`,propagateTraceparent:l=!1}=typeof i==`object`?i:{spanOrigin:i},u=A(),d=!!I()||!!u&&Ti(u),f=s&&d?Ri(Ru(o,a,c)):new Qr;if(s&&!d&&u?.recordDroppedEvent(`no_parent_span`,`span`),e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f,n(e.fetchData.url)){let t=e.args[0],n={...e.args[1]||{}},r=Nu(t,n,zr()&&d?f:void 0,l);r&&(e.args[1]=n,n.headers=r)}if(u){let t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};u.emit(`beforeOutgoingRequestSpan`,f,t)}return f}function Mu(e,t,n){(typeof n==`object`&&n?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function Nu(e,t,n,r){let i=kc({span:n,propagateTraceparent:r}),a=i[`sentry-trace`],o=i.baggage,s=i.traceparent;if(!a)return;let c=t.headers||(Ae(e)?e.headers:void 0);if(!c)return{...i};if(Iu(c)){let e=new Headers(c);if(e.get(`sentry-trace`)||e.set(`sentry-trace`,a),r&&s&&!e.get(`traceparent`)&&e.set(`traceparent`,s),o){let t=e.get(`baggage`);t?Fu(t)||e.set(`baggage`,`${t},${o}`):e.set(`baggage`,o)}return e}else if(Lu(c)){let e=[...c];e.find(e=>e[0]===`sentry-trace`)||e.push([`sentry-trace`,a]),r&&s&&!e.find(e=>e[0]===`traceparent`)&&e.push([`traceparent`,s]);let t=c.find(e=>e[0]===`baggage`&&typeof e[1]==`string`&&Fu(e[1]));return o&&!t&&e.push([`baggage`,o]),e}else{let e=`sentry-trace`in c?c[`sentry-trace`]:void 0,t=`traceparent`in c?c.traceparent:void 0,n=`baggage`in c?c.baggage:void 0,i=n?Array.isArray(n)?[...n]:[n]:[],l=n&&(Array.isArray(n)?n.find(e=>Fu(e)):Fu(n));o&&!l&&i.push(o);let u=Object.assign({},c,{"sentry-trace":e??a,baggage:i.length>0?i.join(`,`):void 0});return r&&s&&!t&&(u.traceparent=s),u}}function Pu(e,t){if(t.response){Ln(e,t.response.status);let n=t.response?.headers?.get(`content-length`);if(n){let t=parseInt(n);t>0&&e.setAttribute(`http.response_content_length`,t)}}else t.error&&e.setStatus({code:2,message:`internal_error`});e.end()}function Fu(e){return typeof e==`string`?e.split(`,`).some(e=>e.trim().startsWith(Hn)):!1}function Iu(e){return typeof Headers<`u`&&ke(e,Headers)}function Lu(e){return Array.isArray(e)?e.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]==`string`):!1}function Ru(e,t,n){if(e.startsWith(`data:`))return{name:`${t} ${Sa(e)}`,attributes:zu(e,void 0,t,n)};let r=_a(e);return{name:`${t} ${r?va(r):e}`,attributes:zu(e,r,t,n)}}function zu(e,t,n,r){let i={url:Sa(e),type:`fetch`,"http.method":n,[N]:r,[M]:`http.client`};return t&&(ga(t)||(i[`http.url`]=Sa(t.href),i[`server.address`]=t.host),t.search&&(i[`http.query`]=t.search),t.hash&&(i[`http.fragment`]=t.hash)),i}function Bu(e,t={},n=k()){let{message:r,name:i,email:a,url:o,source:s,associatedEventId:c,tags:l}=e,u={contexts:{feedback:{contact_email:a,name:i,message:r,url:o,source:s,associated_event_id:c}},type:`feedback`,level:`info`,tags:l},d=n?.getClient()||A();return d&&d.emit(`beforeSendFeedback`,u,t),n.captureEvent(u,t)}var Vu=t({debug:()=>Wu,error:()=>qu,fatal:()=>Ju,fmt:()=>Ec,info:()=>Gu,trace:()=>Uu,warn:()=>Ku});function Hu(e,t,n,r,i){ts({level:e,message:t,attributes:n,severityNumber:i},r)}function Uu(e,t,{scope:n}={}){Hu(`trace`,e,t,n)}function Wu(e,t,{scope:n}={}){Hu(`debug`,e,t,n)}function Gu(e,t,{scope:n}={}){Hu(`info`,e,t,n)}function Ku(e,t,{scope:n}={}){Hu(`warn`,e,t,n)}function qu(e,t,{scope:n}={}){Hu(`error`,e,t,n)}function Ju(e,t,{scope:n}={}){Hu(`fatal`,e,t,n)}function Yu(e,t,n){return`util`in i&&typeof i.util.format==`function`?i.util.format(...e):Xu(e,t,n)}function Xu(e,t,n){return e.map(e=>we(e)?String(e):JSON.stringify(Xe(e,t,n))).join(` `)}function Zu(e){return/%[sdifocO]/.test(e)}function Qu(e,t){let n={};return n[`sentry.message.template`]=`${e} ${Array(t.length).fill(`{}`).join(` `)}`,t.forEach((e,t)=>{n[`sentry.message.parameter.${t}`]=e}),n}var $u=`ConsoleLogs`,ed={[N]:`auto.log.console`},td=R(((e={})=>{let t=e.levels||l;return{name:$u,setup(e){let{enableLogs:n,normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e.getOptions();if(!n){r&&x.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}let o=pl(({args:n,level:r})=>{if(A()!==e||!t.includes(r))return;let o=n[0],s=n.slice(1);if(r===`assert`){o||ts({level:`error`,message:s.length>0?`Assertion failed: ${Yu(s,i,a)}`:`Assertion failed`,attributes:ed});return}let c=r===`log`,l=n.length>1&&typeof n[0]==`string`&&!Zu(n[0]),u={...ed,...l?Qu(o,s):{}};ts({level:c?`info`:r,message:Yu(n,i,a),severityNumber:c?10:void 0,attributes:u})});e.registerCleanup(o)}}})),nd=t({count:()=>id,distribution:()=>od,gauge:()=>ad});function rd(e,t,n,r){ms({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function id(e,t=1,n){rd(`counter`,e,t,n)}function ad(e,t,n){rd(`gauge`,e,t,n)}function od(e,t,n){rd(`distribution`,e,t,n)}var sd=[`trace`,`debug`,`info`,`warn`,`error`,`fatal`];function cd(e={}){let t=new Set(e.levels??sd),n=e.client;return{log(e){let{type:r,level:i,message:a,args:o,tag:s,date:c,...l}=e,u=n||A();if(!u)return;let d=dd(r,i);if(!t.has(d))return;let{normalizeDepth:f=3,normalizeMaxBreadth:p=1e3}=u.getOptions(),m={};for(let[e,t]of Object.entries(l))m[e]=Xe(t,f,p);m[`sentry.origin`]=`auto.log.consola`,s&&(m[`consola.tag`]=s),r&&(m[`consola.type`]=r),i!=null&&typeof i==`number`&&(m[`consola.level`]=i);let h=pd(fd(o,f,p),f,p);h?.attributes&&Object.assign(m,h.attributes),ts({level:d,message:h?.message||a||o&&Yu(o,f,p)||``,attributes:m})}}}var ld={silent:`trace`,fatal:`fatal`,error:`error`,warn:`warn`,log:`info`,info:`info`,success:`info`,fail:`error`,ready:`info`,start:`info`,box:`info`,debug:`debug`,trace:`trace`,verbose:`debug`,critical:`fatal`,notice:`info`},ud={0:`fatal`,1:`warn`,2:`info`,3:`info`,4:`debug`,5:`trace`};function dd(e,t){if(e===`verbose`)return`debug`;if(e===`silent`)return`trace`;if(e){let t=ld[e];if(t)return t}if(typeof t==`number`){let e=ud[t];if(e)return e}return`info`}function fd(e,t,n){if(!e?.length)return{message:``};let r=Yu(e,t,n),i=e[0];if(Te(i)){let t=typeof e[1]==`string`?2:1;return{message:r,attributes:i,messageParameters:e.slice(t)}}else{let t=e.slice(1),n=t.length>0&&typeof i==`string`&&!Zu(i);return{message:r,messageTemplate:n?i:void 0,messageParameters:n?t:void 0}}}function pd(e,t,n){let{message:r,attributes:i,messageTemplate:a,messageParameters:o}=e,s={};if(a&&o){let e=Qu(a,o);for(let[r,i]of Object.entries(e))s[r]=r.startsWith(`sentry.message.parameter.`)?Xe(i,t,n):i}else o&&o.length>0&&o.forEach((e,r)=>{s[`sentry.message.parameter.${r}`]=Xe(e,t,n)});return{message:r,attributes:{...Xe(i,t,n),...s}}}var md=`gen_ai.prompt`,hd=`gen_ai.system`,gd=`gen_ai.request.model`,_d=`gen_ai.request.stream`,vd=`gen_ai.request.temperature`,yd=`gen_ai.request.max_tokens`,bd=`gen_ai.request.frequency_penalty`,xd=`gen_ai.request.presence_penalty`,Sd=`gen_ai.request.top_p`,Cd=`gen_ai.request.top_k`,wd=`gen_ai.request.encoding_format`,Td=`gen_ai.request.dimensions`,Ed=`gen_ai.response.finish_reasons`,Dd=`gen_ai.response.model`,Od=`gen_ai.response.id`,kd=`gen_ai.response.stop_reason`,Ad=`gen_ai.usage.input_tokens`,jd=`gen_ai.usage.output_tokens`,Md=`gen_ai.usage.total_tokens`,Nd=`gen_ai.operation.name`,Pd=`sentry.sdk_meta.gen_ai.input.messages.original_length`,Fd=`gen_ai.input.messages`,Id=`gen_ai.system_instructions`,Ld=`gen_ai.response.text`,Rd=`gen_ai.request.available_tools`,zd=`gen_ai.response.streaming`,Bd=`gen_ai.response.tool_calls`,Vd=`gen_ai.agent.name`,Hd=`gen_ai.pipeline.name`,Ud=`gen_ai.conversation.id`,Wd=`gen_ai.usage.cache_creation_input_tokens`,Gd=`gen_ai.usage.cache_read_input_tokens`,Kd=`gen_ai.invoke_agent`,qd=`gen_ai.embeddings.input`,Jd=`gen_ai.embeddings`,Yd=`gen_ai.execute_tool`,Xd=`gen_ai.tool.name`,Zd=`gen_ai.tool.call.id`,Qd=`gen_ai.tool.type`,$d=`gen_ai.tool.input`,ef=`gen_ai.tool.output`,tf=`gen_ai.tool.description`;function nf(e){return!e||typeof e!=`object`?!1:of(e)||sf(e)||rf(e)||cf(e)||lf(e)||uf(e)||df(e)||ff(e)||pf(e)||mf(e)||hf(e)||gf(e)}function rf(e){return`image_url`in e?typeof e.image_url==`string`?e.image_url.startsWith(`data:`):af(e):!1}function af(e){return`image_url`in e&&!!e.image_url&&typeof e.image_url==`object`&&`url`in e.image_url&&typeof e.image_url.url==`string`&&e.image_url.url.startsWith(`data:`)}function of(e){return`type`in e&&typeof e.type==`string`&&`source`in e&&nf(e.source)}function sf(e){return`inlineData`in e&&!!e.inlineData&&typeof e.inlineData==`object`&&`data`in e.inlineData&&typeof e.inlineData.data==`string`}function cf(e){return`type`in e&&e.type===`input_audio`&&`input_audio`in e&&!!e.input_audio&&typeof e.input_audio==`object`&&`data`in e.input_audio&&typeof e.input_audio.data==`string`}function lf(e){return`type`in e&&e.type===`file`&&`file`in e&&!!e.file&&typeof e.file==`object`&&`file_data`in e.file&&typeof e.file.file_data==`string`}function uf(e){return`media_type`in e&&typeof e.media_type==`string`&&`data`in e}function df(e){return`type`in e&&e.type===`file`&&`mediaType`in e&&typeof e.mediaType==`string`&&`data`in e&&typeof e.data==`string`&&!e.data.startsWith(`http://`)&&!e.data.startsWith(`https://`)}function ff(e){return`type`in e&&e.type===`image`&&`image`in e&&typeof e.image==`string`&&!e.image.startsWith(`http://`)&&!e.image.startsWith(`https://`)}function pf(e){return`type`in e&&(e.type===`blob`||e.type===`base64`)}function mf(e){return`b64_json`in e}function hf(e){return`type`in e&&`result`in e&&e.type===`image_generation`}function gf(e){return`uri`in e&&typeof e.uri==`string`&&e.uri.startsWith(`data:`)}var _f=`[Blob substitute]`,vf=[`image_url`,`data`,`content`,`b64_json`,`result`,`uri`,`image`];function yf(e){let t={...e};nf(t.source)&&(t.source=yf(t.source)),sf(e)&&(t.inlineData={...e.inlineData,data:_f}),af(e)&&(t.image_url={...e.image_url,url:_f}),cf(e)&&(t.input_audio={...e.input_audio,data:_f}),lf(e)&&(t.file={...e.file,file_data:_f});for(let e of vf)typeof t[e]==`string`&&(t[e]=_f);return t}var bf=2e4,xf=e=>new TextEncoder().encode(e).length,Sf=e=>xf(JSON.stringify(e));function Cf(e,t){if(xf(e)<=t)return e;let n=0,r=e.length,i=``;for(;n<=r;){let a=Math.floor((n+r)/2),o=e.slice(0,a);xf(o)<=t?(i=o,n=a+1):r=a-1}return i}function wf(e){return typeof e==`string`?e:`text`in e&&typeof e.text==`string`?e.text:``}function Tf(e,t){return typeof e==`string`?t:{...e,text:t}}function Ef(e){return typeof e==`object`&&!!e&&`content`in e&&typeof e.content==`string`}function Df(e){return typeof e==`object`&&!!e&&`content`in e&&Array.isArray(e.content)}function Of(e){return typeof e==`object`&&!!e&&`parts`in e&&Array.isArray(e.parts)&&e.parts.length>0}function kf(e,t){let n=t-Sf({...e,content:``});if(n<=0)return[];let r=Cf(e.content,n);return[{...e,content:r}]}function Af(e){return`parts`in e&&Array.isArray(e.parts)?{key:`parts`,items:e.parts}:`content`in e&&Array.isArray(e.content)?{key:`content`,items:e.content}:{key:null,items:[]}}function jf(e,t){let{key:n,items:r}=Af(e);if(n===null||r.length===0)return[];let i=r.map(e=>Tf(e,``)),a=t-Sf({...e,[n]:i});if(a<=0)return[];let o=[];for(let e of r){let t=wf(e),n=xf(t);if(n<=a)o.push(e),a-=n;else if(o.length===0){let n=Cf(t,a);n&&o.push(Tf(e,n));break}else break}return o.length<=0?[]:[{...e,[n]:o}]}function Mf(e,t){if(!e)return[];if(typeof e==`string`){let n=Cf(e,t);return n?[n]:[]}return typeof e==`object`?Ef(e)?kf(e,t):Df(e)||Of(e)?jf(e,t):[]:[]}function Nf(e){return e.map(e=>{let t;return e&&typeof e==`object`&&(Df(e)?t={...e,content:Nf(e.content)}:`content`in e&&nf(e.content)&&(t={...e,content:yf(e.content)}),Of(e)&&(t={...t??e,parts:Nf(e.parts)}),nf(t)?t=yf(t):nf(e)&&(t=yf(e))),t??e})}function Pf(e,t){if(!Array.isArray(e)||e.length===0)return e;let n=t-2,r=e[e.length-1],i=Nf([r]),a=i[0];return Sf(a)<=n?i:Mf(a,n)}function Ff(e){return Pf(e,bf)}function If(e){return Cf(e,bf)}function Lf(e){let t=A()?.getDataCollectionOptions().genAI;return{...e,recordInputs:e?.recordInputs??t?.inputs??!1,recordOutputs:e?.recordOutputs??t?.outputs??!1}}function Rf(e){let t=A();return e??!(t&&Ti(t))}function zf(e,t){return e?`${e}.${t}`:t}function Bf(e,t,n,r,i){if(t!==void 0&&e.setAttributes({[Ad]:t}),n!==void 0&&e.setAttributes({[jd]:n}),t!==void 0||n!==void 0||r!==void 0||i!==void 0){let a=(t??0)+(n??0)+(r??0)+(i??0);e.setAttributes({[Md]:a})}}function Vf(e,t,n){if(!e.isRecording())return;let r={[zd]:!0};t.responseId&&(r[Od]=t.responseId),t.responseModel&&(r[Dd]=t.responseModel),t.promptTokens!==void 0&&(r[Ad]=t.promptTokens),t.completionTokens!==void 0&&(r[jd]=t.completionTokens),t.totalTokens===void 0?(t.promptTokens!==void 0||t.completionTokens!==void 0||t.cacheCreationInputTokens!==void 0||t.cacheReadInputTokens!==void 0)&&(r[Md]=(t.promptTokens??0)+(t.completionTokens??0)+(t.cacheCreationInputTokens??0)+(t.cacheReadInputTokens??0)):r[Md]=t.totalTokens,t.finishReasons.length&&(r[Ed]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(r[Ld]=t.responseTexts.join(``)),n&&t.toolCalls.length&&(r[Bd]=JSON.stringify(t.toolCalls)),e.setAttributes(r),e.end()}function Hf(e){return typeof e==`string`?e:JSON.stringify(e)}function Uf(e){if(typeof e==`string`)return If(e);if(Array.isArray(e)){let t=Ff(e);return JSON.stringify(t)}return JSON.stringify(e)}function Wf(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};let t=e.findIndex(e=>e&&typeof e==`object`&&`role`in e&&e.role===`system`);if(t===-1)return{systemInstructions:void 0,filteredMessages:e};let n=e[t],r=typeof n.content==`string`?n.content:n.content===void 0?void 0:JSON.stringify(n.content);return r?{systemInstructions:JSON.stringify([{type:`text`,content:r}]),filteredMessages:[...e.slice(0,t),...e.slice(t+1)]}:{systemInstructions:void 0,filteredMessages:e}}async function Gf(e,t,n){let r=e.catch(e=>{throw L(e,{mechanism:{handled:!1,type:n}}),e}),i=await t,a=await r;return a&&typeof a==`object`&&`data`in a?{...a,data:i}:i}function Kf(e,t,n){return Oe(e)?new Proxy(e,{get(e,r){let i=r in Promise.prototype||r===Symbol.toStringTag?t:e,a=Reflect.get(i,r);return r===`withResponse`&&typeof a==`function`?function(){return Gf(a.call(e),t,n)}:typeof a==`function`?a.bind(i):a}}):t}var qf={"responses.create":{operation:`chat`},"chat.completions.create":{operation:`chat`},"embeddings.create":{operation:`embeddings`},"conversations.create":{operation:`chat`}},Jf=[`response.created`,`response.in_progress`,`response.failed`,`response.completed`,`response.incomplete`,`response.queued`,`response.output_text.delta`,`response.output_item.added`,`response.function_call_arguments.delta`,`response.function_call_arguments.done`,`response.output_item.done`];function Yf(e){return typeof e==`object`&&!!e&&`type`in e&&typeof e.type==`string`&&e.type.startsWith(`response.`)}function Xf(e){return typeof e==`object`&&!!e&&`object`in e&&e.object===`chat.completion.chunk`}function Zf(e,t,n){if(!t||typeof t!=`object`)return;let r=t,i={};if(typeof r.id==`string`&&(i[Od]=r.id),typeof r.model==`string`&&(i[Dd]=r.model),r.object===`conversation`&&typeof r.id==`string`&&(i[Ud]=r.id),r.usage&&typeof r.usage==`object`){let e=r.usage,t=e.prompt_tokens??e.input_tokens;typeof t==`number`&&(i[Ad]=t);let n=e.completion_tokens??e.output_tokens;typeof n==`number`&&(i[jd]=n),typeof e.total_tokens==`number`&&(i[Md]=e.total_tokens)}if(Array.isArray(r.choices)){let e=r.choices,t=e.map(e=>e.finish_reason).filter(e=>typeof e==`string`);if(t.length>0&&(i[Ed]=JSON.stringify(t)),n){let t=e.map(e=>e.message?.content||``);i[Ld]=JSON.stringify(t);let n=e.map(e=>e.message?.tool_calls).filter(e=>Array.isArray(e)&&e.length>0).flat();n.length>0&&(i[Bd]=JSON.stringify(n))}}if(typeof r.status==`string`&&(i[`gen_ai.response.finish_reasons`]||(i[Ed]=JSON.stringify([r.status]))),n&&(typeof r.output_text==`string`&&!i[`gen_ai.response.text`]&&(i[Ld]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!i[`gen_ai.response.tool_calls`])){let e=r.output.filter(e=>e?.type===`function_call`);e.length>0&&(i[Bd]=JSON.stringify(e))}e.setAttributes(i)}function Qf(e){if(`conversation`in e&&typeof e.conversation==`string`)return e.conversation;if(`previous_response_id`in e&&typeof e.previous_response_id==`string`)return e.previous_response_id}function $f(e){let t={[gd]:e.model??`unknown`};`temperature`in e&&(t[vd]=e.temperature),`top_p`in e&&(t[Sd]=e.top_p),`frequency_penalty`in e&&(t[bd]=e.frequency_penalty),`presence_penalty`in e&&(t[xd]=e.presence_penalty),`stream`in e&&(t[_d]=e.stream),`encoding_format`in e&&(t[wd]=e.encoding_format),`dimensions`in e&&(t[Td]=e.dimensions);let n=Qf(e);return n&&(t[Ud]=n),t}function ep(e,t){for(let n of e){let e=n.index;if(!(e===void 0||!n.function))if(!(e in t.chatCompletionToolCalls))t.chatCompletionToolCalls[e]={...n,function:{name:n.function.name,arguments:n.function.arguments||``}};else{let r=t.chatCompletionToolCalls[e];n.function.arguments&&r?.function&&(r.function.arguments+=n.function.arguments)}}}function tp(e,t,n){t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,e.usage&&(t.promptTokens=e.usage.prompt_tokens,t.completionTokens=e.usage.completion_tokens,t.totalTokens=e.usage.total_tokens);for(let r of e.choices??[])n&&(r.delta?.content&&t.responseTexts.push(r.delta.content),r.delta?.tool_calls&&ep(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function np(e,t,n,r){if(!(e&&typeof e==`object`)){t.eventTypes.push(`unknown:non-object`);return}if(e instanceof Error){r.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.openai.stream-response`}});return}if(!(`type`in e))return;let i=e;if(!Jf.includes(i.type)){t.eventTypes.push(i.type);return}if(n&&(i.type===`response.output_item.done`&&`item`in i&&t.responsesApiToolCalls.push(i.item),i.type===`response.output_text.delta`&&`delta`in i&&i.delta)){t.responseTexts.push(i.delta);return}if(`response`in i){let{response:e}=i;t.responseId=e.id??t.responseId,t.responseModel=e.model??t.responseModel,e.usage&&(t.promptTokens=e.usage.input_tokens,t.completionTokens=e.usage.output_tokens,t.totalTokens=e.usage.total_tokens),e.status&&t.finishReasons.push(e.status),n&&e.output_text&&t.responseTexts.push(e.output_text)}}async function*rp(e,t,n){let r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:``,responseModel:``,promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(let i of e)Xf(i)?tp(i,r,n):Yf(i)&&np(i,r,n,t),yield i}finally{let e=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];Vf(t,{...r,toolCalls:e},n)}}function ip(e){let t=Array.isArray(e.tools)?e.tools:[],n=e.web_search_options&&typeof e.web_search_options==`object`?[{type:`web_search_options`,...e.web_search_options}]:[],i=[...t,...n];if(i.length!==0)try{return JSON.stringify(i)}catch(e){r&&x.error(`Failed to serialize OpenAI tools:`,e);return}}function ap(e,t){let n={[hd]:`openai`,[Nd]:t,[N]:`auto.ai.openai`};if(e.length>0&&typeof e[0]==`object`&&e[0]!==null){let t=e[0],r=ip(t);r&&(n[Rd]=r),Object.assign(n,$f(t))}else n[gd]=`unknown`;return n}function op(e,t,n,r){if(n===`embeddings`&&`input`in t){let n=t.input;if(n==null||typeof n==`string`&&n.length===0||Array.isArray(n)&&n.length===0)return;e.setAttribute(qd,typeof n==`string`?n:JSON.stringify(n));return}let i=`input`in t?t.input:`messages`in t?t.messages:void 0;if(!i||Array.isArray(i)&&i.length===0)return;let{systemInstructions:a,filteredMessages:o}=Wf(i);a&&e.setAttribute(Id,a),e.setAttribute(Fd,r?Uf(o):Hf(o)),Array.isArray(o)?e.setAttribute(Pd,o.length):e.setAttribute(Pd,1)}function sp(e,t,n,r,i){return function(...a){let o=n.operation||`unknown`,s=ap(a,o),c=s[`gen_ai.request.model`]||`unknown`,l=a[0],u=l&&typeof l==`object`&&l.stream===!0,d={name:`${o} ${c}`,op:`gen_ai.${o}`,attributes:s};if(u){let n,s=Li(d,s=>(n=e.apply(r,a),i.recordInputs&&l&&op(s,l,o,Rf(i.enableTruncation)),(async()=>{try{return rp(await n,s,i.recordOutputs??!1)}catch(e){throw s.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.openai.stream`,data:{function:t}}}),s.end(),e}})()));return Kf(n,s,`auto.ai.openai`)}let f,p=Ii(d,n=>(f=e.apply(r,a),i.recordInputs&&l&&op(n,l,o,Rf(i.enableTruncation)),f.then(e=>(Zf(n,e,i.recordOutputs),e),e=>{throw L(e,{mechanism:{handled:!1,type:`auto.ai.openai`,data:{function:t}}}),e})));return Kf(f,p,`auto.ai.openai`)}}function cp(e,t=``,n){return new Proxy(e,{get(e,r){let i=e[r],a=zf(t,String(r)),o=qf[a];return typeof i==`function`&&o?sp(i,a,o,e,n):typeof i==`function`?i.bind(e):i&&typeof i==`object`?cp(i,a,n):i}})}function lp(e,t){return cp(e,``,Lf(t))}var up={"messages.create":{operation:`chat`},"messages.stream":{operation:`chat`,streaming:!0},"messages.countTokens":{operation:`chat`},"models.get":{operation:`models`},"completions.create":{operation:`chat`},"models.retrieve":{operation:`models`},"beta.messages.create":{operation:`chat`}};function dp(e,t,n){if(Array.isArray(t)&&t.length===0)return;let{systemInstructions:r,filteredMessages:i}=Wf(t);r&&e.setAttributes({[Id]:r});let a=Array.isArray(i)?i.length:1;e.setAttributes({[Fd]:n?Uf(i):Hf(i),[Pd]:a})}var fp={invalid_request_error:`invalid_argument`,authentication_error:`unauthenticated`,permission_error:`permission_denied`,not_found_error:`not_found`,request_too_large:`failed_precondition`,rate_limit_error:`resource_exhausted`,api_error:`internal_error`,overloaded_error:`unavailable`};function pp(e){return e&&fp[e]||`internal_error`}function mp(e,t){t.error&&(e.setStatus({code:2,message:pp(t.error.type)}),L(t.error,{mechanism:{handled:!1,type:`auto.ai.anthropic.anthropic_error`}}))}function hp(e){let{system:t,messages:n,input:r}=e,i=typeof t==`string`?[{role:`system`,content:e.system}]:[],a=(Array.isArray(r)?r:r==null?void 0:[r])??(Array.isArray(n)?n:n==null?[]:[n]);return[...i,...a]}function gp(e,t){return`type`in e&&typeof e.type==`string`&&e.type===`error`?(t.setStatus({code:2,message:pp(e.error?.type)}),L(e.error,{mechanism:{handled:!1,type:`auto.ai.anthropic.anthropic_error`}}),!0):!1}function _p(e,t){if(e.type===`message_delta`&&e.usage&&`output_tokens`in e.usage&&typeof e.usage.output_tokens==`number`&&(t.completionTokens=e.usage.output_tokens),e.message){let n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),n.stop_reason&&t.finishReasons.push(n.stop_reason),n.usage&&(typeof n.usage.input_tokens==`number`&&(t.promptTokens=n.usage.input_tokens),typeof n.usage.cache_creation_input_tokens==`number`&&(t.cacheCreationInputTokens=n.usage.cache_creation_input_tokens),typeof n.usage.cache_read_input_tokens==`number`&&(t.cacheReadInputTokens=n.usage.cache_read_input_tokens))}}function vp(e,t){e.type!==`content_block_start`||typeof e.index!=`number`||!e.content_block||(e.content_block.type===`tool_use`||e.content_block.type===`server_tool_use`)&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]})}function yp(e,t,n){if(!(e.type!==`content_block_delta`||!e.delta)){if(typeof e.index==`number`&&`partial_json`in e.delta&&typeof e.delta.partial_json==`string`){let n=t.activeToolBlocks[e.index];n&&n.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text==`string`&&t.responseTexts.push(e.delta.text)}}function bp(e,t){if(e.type!==`content_block_stop`||typeof e.index!=`number`)return;let n=t.activeToolBlocks[e.index];if(!n)return;let r=n.inputJsonParts.join(``),i;try{i=r?JSON.parse(r):{}}catch{i={__unparsed:r}}t.toolCalls.push({type:`tool_use`,id:n.id,name:n.name,input:i}),delete t.activeToolBlocks[e.index]}function xp(e,t,n,r){e&&typeof e==`object`&&(gp(e,r)||(_p(e,t),vp(e,t),yp(e,t,n),bp(e,t)))}async function*Sp(e,t,n){let r={responseTexts:[],finishReasons:[],responseId:``,responseModel:``,promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(let i of e)xp(i,r,n,t),yield i}finally{Vf(t,r,n)}}function Cp(e,t,n){let r={responseTexts:[],finishReasons:[],responseId:``,responseModel:``,promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on(`streamEvent`,e=>{xp(e,r,n,t)}),e.on(`message`,()=>{Vf(t,r,n)}),e.on(`error`,e=>{L(e,{mechanism:{handled:!1,type:`auto.ai.anthropic.stream_error`}}),t.isRecording()&&(t.setStatus({code:2,message:`internal_error`}),t.end())}),e}function wp(e,t,n){let r={[hd]:`anthropic`,[Nd]:n,[N]:`auto.ai.anthropic`};if(e.length>0&&typeof e[0]==`object`&&e[0]!==null){let t=e[0];t.tools&&Array.isArray(t.tools)&&(r[Rd]=JSON.stringify(t.tools)),r[gd]=t.model??`unknown`,`temperature`in t&&(r[vd]=t.temperature),`top_p`in t&&(r[Sd]=t.top_p),`stream`in t&&(r[_d]=t.stream),`top_k`in t&&(r[Cd]=t.top_k),`frequency_penalty`in t&&(r[bd]=t.frequency_penalty),`max_tokens`in t&&(r[yd]=t.max_tokens)}else t===`models.retrieve`||t===`models.get`?r[gd]=e[0]:r[gd]=`unknown`;return r}function Tp(e,t,n){dp(e,hp(t),n),`prompt`in t&&e.setAttributes({[md]:JSON.stringify(t.prompt)})}function Ep(e,t){if(`content`in t&&Array.isArray(t.content)){e.setAttributes({[Ld]:t.content.map(e=>e.text).filter(e=>!!e).join(``)});let n=[];for(let e of t.content)(e.type===`tool_use`||e.type===`server_tool_use`)&&n.push(e);n.length>0&&e.setAttributes({[Bd]:JSON.stringify(n)})}`completion`in t&&e.setAttributes({[Ld]:t.completion}),`input_tokens`in t&&e.setAttributes({[Ld]:JSON.stringify(t.input_tokens)})}function Dp(e,t){`id`in t&&`model`in t&&(e.setAttributes({[Od]:t.id,[Dd]:t.model}),`usage`in t&&t.usage&&Bf(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function Op(e,t,n){if(!(!t||typeof t!=`object`)){if(`type`in t&&t.type===`error`){mp(e,t);return}n&&Ep(e,t),Dp(e,t)}}function kp(e,t,n){throw L(e,{mechanism:{handled:!1,type:`auto.ai.anthropic`,data:{function:n}}}),t.isRecording()&&(t.setStatus({code:2,message:`internal_error`}),t.end()),e}function Ap(e,t,n,r,i,a,o,s,c,l,u){let d={name:`${a} ${i[`gen_ai.request.model`]??`unknown`}`,op:`gen_ai.${a}`,attributes:i};if(l&&!u){let t,i=Li(d,i=>(t=e.apply(n,r),c.recordInputs&&s&&Tp(i,s,Rf(c.enableTruncation)),(async()=>{try{return Sp(await t,i,c.recordOutputs??!1)}catch(e){return kp(e,i,o)}})()));return Kf(t,i,`auto.ai.anthropic`)}else return Li(d,e=>{try{return c.recordInputs&&s&&Tp(e,s,Rf(c.enableTruncation)),Cp(t.apply(n,r),e,c.recordOutputs??!1)}catch(t){return kp(t,e,o)}})}function jp(e,t,n,r,i){return new Proxy(e,{apply(a,o,s){let c=n.operation||`unknown`,l=wp(s,t,c),u=l[`gen_ai.request.model`]??`unknown`,d=typeof s[0]==`object`?s[0]:void 0,f=!!d?.stream,p=n.streaming===!0;if(f||p)return Ap(e,a,r,s,l,c,t,d,i,f,p);let m,h=Ii({name:`${c} ${u}`,op:`gen_ai.${c}`,attributes:l},e=>(m=a.apply(r,s),i.recordInputs&&d&&Tp(e,d,Rf(i.enableTruncation)),m.then(t=>(Op(e,t,i.recordOutputs),t),e=>{throw L(e,{mechanism:{handled:!1,type:`auto.ai.anthropic`,data:{function:t}}}),e})));return Kf(m,h,`auto.ai.anthropic`)}})}function Mp(e,t=``,n){return new Proxy(e,{get(e,r){let i=e[r],a=zf(t,String(r)),o=up[a];return typeof i==`function`&&o?jp(i,a,o,e,n):typeof i==`function`?i.bind(e):i&&typeof i==`object`?Mp(i,a,n):i}})}function Np(e,t){return Mp(e,``,Lf(t))}var Pp={"models.generateContent":{operation:`generate_content`},"models.generateContentStream":{operation:`generate_content`,streaming:!0},"models.embedContent":{operation:`embeddings`},"chats.create":{proxyResultPath:`chat`},"chat.sendMessage":{operation:`chat`},"chat.sendMessageStream":{operation:`chat`,streaming:!0}},Fp=`google_genai`;function Ip(e,t){let n=e?.promptFeedback;if(n?.blockReason){let e=n.blockReasonMessage??n.blockReason;return t.setStatus({code:2,message:`internal_error`}),L(`Content blocked: ${e}`,{mechanism:{handled:!1,type:`auto.ai.google_genai`}}),!0}return!1}function Lp(e,t){typeof e.responseId==`string`&&(t.responseId=e.responseId),typeof e.modelVersion==`string`&&(t.responseModel=e.modelVersion);let n=e.usageMetadata;n&&(typeof n.promptTokenCount==`number`&&(t.promptTokens=n.promptTokenCount),typeof n.candidatesTokenCount==`number`&&(t.completionTokens=n.candidatesTokenCount),typeof n.totalTokenCount==`number`&&(t.totalTokens=n.totalTokenCount))}function Rp(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(let r of e.candidates??[]){r?.finishReason&&!t.finishReasons.includes(r.finishReason)&&t.finishReasons.push(r.finishReason);for(let e of r?.content?.parts??[])n&&e.text&&t.responseTexts.push(e.text),e.functionCall&&t.toolCalls.push({type:`function`,id:e.functionCall.id,name:e.functionCall.name,arguments:e.functionCall.args})}}function zp(e,t,n,r){!e||Ip(e,r)||(Lp(e,t),Rp(e,t,n))}async function*Bp(e,t,n){let r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(let i of e)zp(i,r,n,t),yield i}finally{Vf(t,r,n)}}function Vp(e,t=`user`){return typeof e==`string`?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(e=>Vp(e,t)):typeof e!=`object`||!e?[]:`role`in e&&typeof e.role==`string`?[e]:`parts`in e?[{...e,role:t}]:[{role:t,content:e}]}function Hp(e,t){if(`model`in e&&typeof e.model==`string`)return e.model;if(t&&typeof t==`object`){let e=t;if(`model`in e&&typeof e.model==`string`)return e.model;if(`modelVersion`in e&&typeof e.modelVersion==`string`)return e.modelVersion}return`unknown`}function Up(e){let t={};return`temperature`in e&&typeof e.temperature==`number`&&(t[vd]=e.temperature),`topP`in e&&typeof e.topP==`number`&&(t[Sd]=e.topP),`topK`in e&&typeof e.topK==`number`&&(t[Cd]=e.topK),`maxOutputTokens`in e&&typeof e.maxOutputTokens==`number`&&(t[yd]=e.maxOutputTokens),`frequencyPenalty`in e&&typeof e.frequencyPenalty==`number`&&(t[bd]=e.frequencyPenalty),`presencePenalty`in e&&typeof e.presencePenalty==`number`&&(t[xd]=e.presencePenalty),t}function Wp(e,t,n){let r={[hd]:Fp,[Nd]:e,[N]:`auto.ai.google_genai`};if(t){if(r[gd]=Hp(t,n),`config`in t&&typeof t.config==`object`&&t.config){let e=t.config;if(Object.assign(r,Up(e)),`tools`in e&&Array.isArray(e.tools)){let t=e.tools.flatMap(e=>e.functionDeclarations);r[Rd]=JSON.stringify(t)}}}else r[gd]=Hp({},n);return r}function Gp(e,t,n,r){if(n){let n=t.contents;n!=null&&e.setAttribute(qd,typeof n==`string`?n:JSON.stringify(n));return}let i=[];if(`config`in t&&t.config&&typeof t.config==`object`&&`systemInstruction`in t.config&&t.config.systemInstruction&&i.push(...Vp(t.config.systemInstruction,`system`)),`history`in t&&i.push(...Vp(t.history,`user`)),`contents`in t&&i.push(...Vp(t.contents,`user`)),`message`in t&&i.push(...Vp(t.message,`user`)),Array.isArray(i)&&i.length){let{systemInstructions:t,filteredMessages:n}=Wf(i);t&&e.setAttribute(Id,t);let a=Array.isArray(n)?n.length:0;e.setAttributes({[Pd]:a,[Fd]:r?Uf(n):Hf(n)})}}function Kp(e,t,n){if(!(!t||typeof t!=`object`)){if(t.modelVersion&&e.setAttribute(Dd,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata==`object`){let n=t.usageMetadata;typeof n.promptTokenCount==`number`&&e.setAttributes({[Ad]:n.promptTokenCount}),typeof n.candidatesTokenCount==`number`&&e.setAttributes({[jd]:n.candidatesTokenCount}),typeof n.totalTokenCount==`number`&&e.setAttributes({[Md]:n.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){let n=t.candidates.map(e=>e.content?.parts&&Array.isArray(e.content.parts)?e.content.parts.map(e=>typeof e.text==`string`?e.text:``).filter(e=>e.length>0).join(``):``).filter(e=>e.length>0);n.length>0&&e.setAttributes({[Ld]:n.join(``)})}if(n&&t.functionCalls){let n=t.functionCalls;Array.isArray(n)&&n.length>0&&e.setAttributes({[Bd]:JSON.stringify(n)})}}}function qp(e,t,n,r,i){let a=n.operation===`embeddings`;return new Proxy(e,{apply(e,o,s){let c=n.operation||`unknown`,l=s[0],u=Wp(c,l,r),d=u[`gen_ai.request.model`]??`unknown`;return n.streaming?Li({name:`${c} ${d}`,op:`gen_ai.${c}`,attributes:u},async n=>{try{return i.recordInputs&&l&&Gp(n,l,a,Rf(i.enableTruncation)),Bp(await e.apply(r,s),n,!!i.recordOutputs)}catch(e){throw n.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.google_genai`,data:{function:t}}}),n.end(),e}}):Ii({name:`${c} ${d}`,op:`gen_ai.${c}`,attributes:u},n=>(i.recordInputs&&l&&Gp(n,l,a,Rf(i.enableTruncation)),Mi(()=>e.apply(r,s),e=>{L(e,{mechanism:{handled:!1,type:`auto.ai.google_genai`,data:{function:t}}})},()=>{},e=>{a||Kp(n,e,i.recordOutputs)})))}})}function Jp(e,t=``,n){return new Proxy(e,{get:(e,r,i)=>{let a=Reflect.get(e,r,i),o=zf(t,String(r)),s=Pp[o];if(typeof a==`function`&&s){let t=s.operation?qp(a,o,s,e,n):a.bind(e);return s.proxyResultPath?function(...e){let r=t(...e);return r&&typeof r==`object`?Jp(r,s.proxyResultPath,n):r}:t}return typeof a==`function`?a.bind(e):a&&typeof a==`object`?Jp(a,o,n):a}})}function Yp(e,t){return Jp(e,``,Lf(t))}var Xp=`auto.ai.langchain`,Zp={human:`user`,ai:`assistant`,assistant:`assistant`,system:`system`,function:`function`,tool:`tool`},Qp=(e,t,n)=>{n!=null&&(e[t]=n)},$p=(e,t,n)=>{let r=Number(n);Number.isNaN(r)||(e[t]=r)};function em(e){if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function tm(e){if(Array.isArray(e))try{let t=e.map(e=>e&&typeof e==`object`&&nf(e)?yf(e):e);return JSON.stringify(t)}catch{return String(e)}return em(e)}function nm(e){let t=e.toLowerCase();return Zp[t]??t}function rm(e){return e.includes(`System`)?`system`:e.includes(`Human`)?`user`:e.includes(`AI`)||e.includes(`Assistant`)?`assistant`:e.includes(`Function`)?`function`:e.includes(`Tool`)?`tool`:`user`}function im(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function am(e){return e.map(e=>{let t=e._getType;if(typeof t==`function`)return{role:nm(t.call(e)),content:tm(e.content)};if(e.lc===1&&e.kwargs){let t=e.id,n=Array.isArray(t)&&t.length>0?t[t.length-1]:``;return{role:nm(typeof n==`string`?rm(n):`user`),content:tm(e.kwargs?.content)}}if(e.type)return{role:nm(String(e.type).toLowerCase()),content:tm(e.content)};if(e.role)return{role:nm(String(e.role)),content:tm(e.content)};let n=e.constructor?.name;return n&&n!==`Object`?{role:nm(rm(n)),content:tm(e.content)}:{role:`user`,content:tm(e.content)}})}function om(e,t,n){let r={},i=`kwargs`in e?e.kwargs:void 0;$p(r,vd,t?.temperature??n?.ls_temperature??i?.temperature),$p(r,yd,t?.max_tokens??n?.ls_max_tokens??i?.max_tokens),$p(r,Sd,t?.top_p??i?.top_p);let a=t?.frequency_penalty;$p(r,bd,a);let o=t?.presence_penalty;return $p(r,xd,o),t&&`stream`in t&&Qp(r,_d,!!t.stream),r}function sm(e,t,n,r,i){return{[hd]:em(e??`langchain`),[Nd]:`chat`,[gd]:em(t),[N]:Xp,...om(n,r,i)}}function cm(e,t,n,r,i,a){let o=a?.ls_provider,s=sm(o,i?.model??a?.ls_model_name??`unknown`,e,i,a);if(n&&Array.isArray(t)&&t.length>0){Qp(s,Pd,t.length);let e=t.map(e=>({role:`user`,content:e}));Qp(s,Fd,r?Uf(e):Hf(e))}return s}function lm(e,t,n,r,i,a){let o=sm(a?.ls_provider??e.id?.[2],i?.model??a?.ls_model_name??`unknown`,e,i,a);if(n&&Array.isArray(t)&&t.length>0){let{systemInstructions:e,filteredMessages:n}=Wf(am(t.flat()));e&&Qp(o,Id,e),Qp(o,Pd,Array.isArray(n)?n.length:0),Qp(o,Fd,r?Uf(n):Hf(n))}return o}function um(e,t){let n=[],r=e.flat();for(let e of r){let t=e.message?.tool_calls;if(Array.isArray(t)&&t.length>0)n.push(...t);else{let t=e.message?.content;if(Array.isArray(t))for(let e of t){let t=e;t.type===`tool_use`&&n.push(t)}}}n.length>0&&Qp(t,Bd,em(n))}function dm(e,t){if(!e)return;let n=e.tokenUsage,r=e.usage;if(n)$p(t,Ad,n.promptTokens),$p(t,jd,n.completionTokens),$p(t,Md,n.totalTokens);else if(r){$p(t,Ad,r.input_tokens),$p(t,jd,r.output_tokens);let e=Number(r.input_tokens),n=Number(r.output_tokens),i=(Number.isNaN(e)?0:e)+(Number.isNaN(n)?0:n);i>0&&$p(t,Md,i),r.cache_creation_input_tokens!==void 0&&$p(t,Wd,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&$p(t,Gd,r.cache_read_input_tokens)}}function fm(e,t){if(!e)return;let n={};if(Array.isArray(e.generations)){let r=e.generations.flat().map(e=>e.generationInfo?.finish_reason?e.generationInfo.finish_reason:e.generation_info?.finish_reason?e.generation_info.finish_reason:null).filter(e=>typeof e==`string`);if(r.length>0&&Qp(n,Ed,em(r)),um(e.generations,n),t){let t=e.generations.flat().map(e=>e.text??e.message?.content).filter(e=>typeof e==`string`);t.length>0&&Qp(n,Ld,em(t))}}dm(e.llmOutput,n);let r=e.llmOutput,i=e.generations?.[0]?.[0]?.message,a=r?.model_name??r?.model??i?.response_metadata?.model_name;a&&Qp(n,Dd,a);let o=r?.id??i?.id;o&&Qp(n,Od,o);let s=r?.stop_reason??i?.response_metadata?.finish_reason;return s&&Qp(n,kd,em(s)),n}function pm(e){let t={},n=e?.lc_agent_name;return typeof n==`string`&&(t[Vd]=n),t}function mm(e){let t=e?.invocation_params?.tools??e?.options?.tools;if(!Array.isArray(t)||t.length===0)return;let n=t.map(e=>{let t=e.function;return{type:`function`,name:e.name??t?.name??``,description:e.description??t?.description}});return JSON.stringify(n)}function hm(e){if(!e||typeof e!=`object`)return!1;let t=e;return typeof t.addHandler==`function`&&typeof t.copy==`function`}function gm(e){return typeof e==`object`&&e?.name===`SentryCallbackHandler`}function _m(e){return e.some(gm)}function vm(e,t){if(!e)return[t];if(hm(e)){if(_m(e.handlers??[]))return e;let n=e.copy();return n.addHandler(t,!0),n}let n=Array.isArray(e)?e:[e];return _m(n)?e:[...n,t]}function ym(e={}){let{recordInputs:t,recordOutputs:n}=Lf(e),r=Rf(e.enableTruncation),i=new Map,a=e=>{let t=i.get(e);t?.isRecording()&&(t.end(),i.delete(e))},o={lc_serializable:!1,lc_namespace:[`langchain_core`,`callbacks`,`sentry`],lc_secrets:void 0,lc_attributes:void 0,lc_aliases:void 0,lc_serializable_keys:void 0,lc_id:[`langchain_core`,`callbacks`,`sentry`],lc_kwargs:{},name:`SentryCallbackHandler`,ignoreLLM:!1,ignoreChain:!1,ignoreAgent:!1,ignoreRetriever:!1,ignoreCustomEvent:!1,raiseError:!1,awaitHandlers:!0,handleLLMStart(e,n,a,o,s,c,l,u){let d=cm(e,n,t,r,im(c),l),f=d[gd],p=d[Nd];Li({name:`${p} ${f}`,op:`gen_ai.chat`,attributes:{...pm(l),...d,[M]:`gen_ai.chat`}},e=>(i.set(a,e),e))},handleChatModelStart(e,n,a,o,s,c,l,u){let d=lm(e,n,t,r,im(c),l),f=mm(s);f&&(d[Rd]=f);let p=d[gd],m=d[Nd];Li({name:`${m} ${p}`,op:`gen_ai.chat`,attributes:{...pm(l),...d,[M]:`gen_ai.chat`}},e=>(i.set(a,e),e))},handleLLMEnd(e,t,r,o,s){let c=i.get(t);if(c?.isRecording()){let r=fm(e,n);r&&c.setAttributes(r),a(t)}},handleLLMError(e,t){let n=i.get(t);n?.isRecording()&&(n.setStatus({code:2,message:`internal_error`}),a(t)),L(e,{mechanism:{handled:!1,type:`${Xp}.llm_error_handler`}})},handleChainStart(e,n,r,a,o,s,c,l){if(s?.__sentry_langgraph__)return;let u=l||e.name||`unknown_chain`,d={[N]:`auto.ai.langchain`,"langchain.chain.name":u};t&&(d[`langchain.chain.inputs`]=JSON.stringify(n)),Li({name:`chain ${u}`,op:`gen_ai.invoke_agent`,attributes:{...d,[M]:`gen_ai.invoke_agent`}},e=>(i.set(r,e),e))},handleChainEnd(e,t){let r=i.get(t);r?.isRecording()&&(n&&r.setAttributes({"langchain.chain.outputs":JSON.stringify(e)}),a(t))},handleChainError(e,t){let n=i.get(t);n?.isRecording()&&(n.setStatus({code:2,message:`internal_error`}),a(t)),L(e,{mechanism:{handled:!1,type:`${Xp}.chain_error_handler`}})},handleToolStart(e,n,r,a,o,s,c){if(s?.__sentry_langgraph__)return;let l=c||e.name||`unknown_tool`,u={...pm(s),[N]:Xp,[Nd]:`execute_tool`,[Xd]:l};t&&(u[$d]=n),Li({name:`execute_tool ${l}`,op:`gen_ai.execute_tool`,attributes:{...u,[M]:`gen_ai.execute_tool`}},e=>(i.set(r,e),e))},handleToolEnd(e,t){let r=i.get(t);if(r?.isRecording()){if(n){let t=e,n=t&&typeof t==`object`&&`content`in t?t.content:e;r.setAttributes({[ef]:typeof n==`string`?n:JSON.stringify(n)})}a(t)}},handleToolError(e,t){let n=i.get(t);n?.isRecording()&&(n.setStatus({code:2,message:`internal_error`}),a(t)),L(e,{mechanism:{handled:!1,type:`${Xp}.tool_error_handler`}})},copy(){return o},toJSON(){return{lc:1,type:`not_implemented`,id:o.lc_id}},toJSONNotImplemented(){return{lc:1,type:`not_implemented`,id:o.lc_id}}};return o}var bm=`auto.ai.langgraph`;function xm(e){let t=e[0];if(typeof t!=`object`||!t||!(`llm`in t)||!t.llm||typeof t.llm!=`object`)return null;let n=t.llm;return typeof n.modelName!=`string`&&typeof n.model!=`string`?null:n}function Sm(e){let t=e[0];return typeof t==`object`&&t&&`name`in t&&typeof t.name==`string`?t.name:null}function Cm(e,t,n){let r=`__sentry_tool_wrapped__`;for(let i of e){if(!i||typeof i!=`object`)continue;let e=i,a=e.invoke;if(typeof a!=`function`||Object.prototype.hasOwnProperty.call(e,r))continue;let o=typeof e.name==`string`?e.name:`unknown_tool`,s=typeof e.description==`string`?e.description:void 0;e.invoke=new Proxy(a,{apply(e,r,i){let a={[N]:bm,[M]:Yd,[Nd]:`execute_tool`,[Xd]:o,[Qd]:`function`},c=i[1]?.metadata?.lc_agent_name??n;typeof c==`string`&&(a[Vd]=c),s&&(a[tf]=s);let l=i[0];if(typeof l==`object`&&l&&(`id`in l&&typeof l.id==`string`&&(a[Zd]=l.id),t.recordInputs)){let e=`args`in l&&typeof l.args==`object`?l.args:l;try{a[$d]=JSON.stringify(e)}catch{}}return Ii({op:Yd,name:`execute_tool ${o}`,attributes:a},async n=>{try{let a=await Reflect.apply(e,r,i);if(t.recordOutputs)try{let e=a,t=e&&typeof e==`object`&&`content`in e?e.content:a;n.setAttribute(ef,typeof t==`string`?t:JSON.stringify(t))}catch{}return a}catch(e){throw n.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.langgraph.error`}}),e}})}}),Object.defineProperty(e,r,{value:!0,enumerable:!1})}return e}function wm(e){if(!e||e.length===0)return null;let t=[];for(let n of e)if(n&&typeof n==`object`){let e=n.tool_calls;e&&Array.isArray(e)&&t.push(...e)}return t.length>0?t:null}function Tm(e){let t=e,n=0,r=0,i=0;if(t.usage_metadata&&typeof t.usage_metadata==`object`){let e=t.usage_metadata;return typeof e.input_tokens==`number`&&(n=e.input_tokens),typeof e.output_tokens==`number`&&(r=e.output_tokens),typeof e.total_tokens==`number`&&(i=e.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:i}}if(t.response_metadata&&typeof t.response_metadata==`object`){let e=t.response_metadata;if(e.tokenUsage&&typeof e.tokenUsage==`object`){let t=e.tokenUsage;typeof t.promptTokens==`number`&&(n=t.promptTokens),typeof t.completionTokens==`number`&&(r=t.completionTokens),typeof t.totalTokens==`number`&&(i=t.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:i}}function Em(e,t){let n=t;if(n.response_metadata&&typeof n.response_metadata==`object`){let t=n.response_metadata;t.model_name&&typeof t.model_name==`string`&&e.setAttribute(Dd,t.model_name),t.finish_reason&&typeof t.finish_reason==`string`&&e.setAttribute(Ed,[t.finish_reason])}}function Dm(e){if(!e.builder?.nodes?.tools?.runnable?.tools)return null;let t=e.builder?.nodes?.tools?.runnable?.tools;return!t||!Array.isArray(t)||t.length===0?null:t.map(e=>({name:e.lc_kwargs?.name,description:e.lc_kwargs?.description,schema:e.lc_kwargs?.schema}))}function Om(e,t,n){let r=n?.messages;if(!r||!Array.isArray(r))return;let i=t?.length??0,a=r.length>i?r.slice(i):[];if(a.length===0)return;let o=wm(a);o&&e.setAttribute(Bd,JSON.stringify(o));let s=am(a);e.setAttribute(Ld,JSON.stringify(s));let c=0,l=0,u=0;for(let t of a){let n=Tm(t);c+=n.inputTokens,l+=n.outputTokens,u+=n.totalTokens,Em(e,t)}c>0&&e.setAttribute(Ad,c),l>0&&e.setAttribute(jd,l),u>0&&e.setAttribute(Md,u)}var km=!1,Am=`__sentry_patched__`;function jm(e,t){if(Object.prototype.hasOwnProperty.call(e,Am))return e;let n=ym(t),r=new Proxy(e,{apply(e,r,i){return km?Reflect.apply(e,r,i):Ii({op:`gen_ai.create_agent`,name:`create_agent`,attributes:{[N]:bm,[M]:`gen_ai.create_agent`,[Nd]:`create_agent`}},a=>{try{let o=Reflect.apply(e,r,i),s=i.length>0?i[0]:{};s?.name&&typeof s.name==`string`&&(a.setAttribute(Vd,s.name),a.updateName(`create_agent ${s.name}`));let c=o.invoke;return c&&typeof c==`function`&&(o.invoke=Mm(c.bind(o),o,s,t,void 0,n)),o}catch(e){throw a.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.langgraph.error`}}),e}})}});return Object.defineProperty(r,Am,{value:!0,enumerable:!1}),r}function Mm(e,t,n,r,i,a){return new Proxy(e,{apply(e,o,s){let c=i?.modelName??i?.model;return Ii({op:`gen_ai.invoke_agent`,name:`invoke_agent`,attributes:{[N]:bm,[M]:Kd,[Nd]:`invoke_agent`}},async i=>{try{let l=n?.name;l&&typeof l==`string`&&(i.setAttribute(Hd,l),i.setAttribute(Vd,l),i.updateName(`invoke_agent ${l}`)),c&&i.setAttribute(gd,c);let u=(s.length>1?s[1]:void 0)?.configurable?.thread_id;if(u&&typeof u==`string`&&i.setAttribute(Ud,u),a){let e=s[1]??{};s[1]=e,e.metadata={...e.metadata??{},__sentry_langgraph__:!0,...typeof l==`string`?{lc_agent_name:l}:{}},e.callbacks=vm(e.callbacks,a)}let d=Dm(t);d&&i.setAttribute(Rd,JSON.stringify(d));let f=r.recordInputs,p=r.recordOutputs,m=s.length>0?s[0]?.messages??[]:[];if(m&&f){let{systemInstructions:e,filteredMessages:t}=Wf(am(m));e&&i.setAttribute(Id,e);let n=Rf(r.enableTruncation),a=Array.isArray(t)?t.length:0;i.setAttributes({[Fd]:n?Uf(t):Hf(t),[Pd]:a})}let h=await Reflect.apply(e,o,s);return p&&Om(i,m??null,h),h}catch(e){throw i.setStatus({code:2,message:`internal_error`}),L(e,{mechanism:{handled:!1,type:`auto.ai.langgraph.error`}}),e}})}})}function Nm(e,t){if(Object.prototype.hasOwnProperty.call(e,Am))return e;let n=Lf(t),r=ym(n),i=new Proxy(e,{apply(e,t,i){let a=xm(i),o=Sm(i),s=i[0];s&&Array.isArray(s.tools)&&s.tools.length>0&&Cm(s.tools,n,o??void 0),km=!0;let c;try{c=Reflect.apply(e,t,i)}finally{km=!1}let l=c.invoke;if(l&&typeof l==`function`){let e={};o&&(e.name=o),c.invoke=Mm(l.bind(c),c,e,n,a,r)}return c}});return Object.defineProperty(i,Am,{value:!0,enumerable:!1}),i}function Pm(e,t){return e.compile=jm(e.compile,Lf(t)),e}function Fm(e,t,n){let r=n.getOptions(),i=n.getDsn(),a=r.tunnel,o=hi(r._metadata),s={sent_at:new Date(Ve()).toISOString(),...Im(t)&&{trace:t},...o&&{sdk:o},...!!a&&i&&{dsn:Zn(i)}},c=n.getDataCollectionOptions().userInfo?`auto`:`never`;return ti(s,[[{type:`span`,item_count:e.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,...Jo()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}]])}function Im(e){return!!e.trace_id&&!!e.public_key}function Lm(e){let t=156;if(t+=e.name.length*2,t+=rn(e.attributes),e.links&&e.links.length>0){let n=e.links[0]?.attributes,r=100+(n?rn(n):0);t+=r*e.links.length}return t}var Rm=1e3,zm=5e6,Bm=class{constructor(e,t){this._traceBuckets=new Map,this._client=e;let{maxSpanLimit:n,flushInterval:r,maxTraceWeightInBytes:i}=t??{};this._maxSpanLimit=n&&n>0&&n<=Rm?n:Rm,this._flushInterval=r&&r>0?r:5e3,this._maxTraceWeight=i&&i>0?i:zm,this._client.on(`flush`,()=>{this.drain()}),this._client.on(`close`,()=>{this._traceBuckets.forEach(e=>{clearTimeout(e.timeout)}),this._traceBuckets.clear()})}add(e){let t=e.trace_id,n=this._traceBuckets.get(t);n||(n={spans:new Set,size:0,timeout:bs(setTimeout(()=>{this.flush(t)},this._flushInterval))},this._traceBuckets.set(t,n)),n.spans.add(e),n.size+=Lm(e),(n.spans.size>=this._maxSpanLimit||n.size>=this._maxTraceWeight)&&this.flush(t)}drain(){this._traceBuckets.size&&(r&&x.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((e,t)=>{this.flush(t)}))}flush(e){let t=this._traceBuckets.get(e);if(!t)return;if(!t.spans.size){this._removeTrace(e);return}let n=Array.from(t.spans),i=n[0]?._segmentSpan;if(!i){r&&x.warn(`No segment span reference found on span JSON, cannot compute DSC`),this._removeTrace(e);return}let a=Xr(i),o=n.map(e=>{let{_segmentSpan:t,...n}=e;return n}),s=Fm(o,a,this._client);r&&x.log(`Sending span envelope for trace ${e} with ${o.length} spans`),this._client.sendEnvelope(s).then(null,e=>{r&&x.error(`Error while sending streamed span envelope:`,e)}),this._removeTrace(e)}_removeTrace(e){let t=this._traceBuckets.get(e);t&&clearTimeout(t.timeout),this._traceBuckets.delete(e)}};function Vm(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var Hm=i;function Um(){return`history`in Hm&&!!Hm.history}function Wm(){if(!(`fetch`in Hm))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function Gm(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Km(){if(typeof EdgeRuntime==`string`)return!0;if(!Wm())return!1;if(Gm(Hm.fetch))return!0;let e=!1,t=Hm.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Gm(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){r&&x.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function qm(){return`ReportingObserver`in Hm}function Jm(e,t){let n=`fetch`,r=ce(n,e);return le(n,()=>Xm(void 0,t)),r}function Ym(e){let t=`fetch-body-resolved`,n=ce(t,e);return le(t,()=>Xm(Qm)),n}function Xm(e,t=!1){t&&!Km()||je(i,`fetch`,function(t){return function(...n){let r=Error(),{method:a,url:o}=th(n),s={args:n,fetchData:{method:a,url:o},startTimestamp:O()*1e3,virtualError:r,headers:nh(n)};return e||ue(`fetch`,{...s}),t.apply(i,n).then(async t=>(e?e(t):ue(`fetch`,{...s,endTimestamp:O()*1e3,response:t}),t),e=>{ue(`fetch`,{...s,endTimestamp:O()*1e3,error:e}),ve(e)&&e.stack===void 0&&(e.stack=r.stack,Me(e,`framesToPop`,1));let t=A()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&e instanceof TypeError&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(s.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:Me(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})}async function Zm(e,t){if(e?.body){let n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3),a=!0;for(;a;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:i}=await r.read();clearTimeout(e),i&&(t(),a=!1)}catch{a=!1}finally{clearTimeout(e)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function Qm(e){let t;try{t=e.clone()}catch{return}Zm(t,()=>{ue(`fetch-body-resolved`,{endTimestamp:O()*1e3,response:e})})}function $m(e,t){return!!e&&typeof e==`object`&&!!e[t]}function eh(e){return typeof e==`string`?e:e?$m(e,`url`)?e.url:e.toString?e.toString():``:``}function th(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:eh(t),method:$m(n,`method`)?String(n.method).toUpperCase():Ae(t)&&$m(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:eh(t),method:$m(t,`method`)?String(t.method).toUpperCase():`GET`}}function nh(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(Ae(t))return new Headers(t.headers)}catch{}}var rh=i;function ih(){try{return rh.document.location.href}catch{return``}}function ah(e,t=5){if(!rh.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}function oh(e){let t=e.constructor?.name??``;return t.includes(`OpenAI`)?`openai`:t.includes(`Google`)?`google_genai`:t.includes(`Mistral`)?`mistralai`:t.includes(`Vertex`)?`google_vertexai`:t.includes(`Bedrock`)?`aws_bedrock`:t.includes(`Ollama`)?`ollama`:t.includes(`Cloudflare`)?`cloudflare`:t.includes(`Cohere`)?`cohere`:`langchain`}function sh(e){let t=e??{},n={[N]:Xp,[M]:Jd,[Nd]:`embeddings`,[gd]:t.model??`unknown`};return n[hd]=oh(t),`dimensions`in t&&(n[Td]=t.dimensions),`encodingFormat`in t&&(n[wd]=t.encodingFormat),n}function ch(e,t={}){let{recordInputs:n}=Lf(t);return new Proxy(e,{apply(e,t,r){let i=sh(t),a=i[`gen_ai.request.model`]||`unknown`;if(n){let e=r[0];e!=null&&(i[qd]=typeof e==`string`?e:JSON.stringify(e))}return Ii({name:`embeddings ${a}`,op:Jd,attributes:i},()=>Reflect.apply(e,t,r).then(void 0,e=>{throw L(e,{mechanism:{handled:!1,type:`auto.ai.langchain`}}),e}))}})}function lh(e,t){let n=e;return typeof n.embedQuery==`function`&&(n.embedQuery=ch(n.embedQuery,t)),typeof n.embedDocuments==`function`&&(n.embedDocuments=ch(n.embedDocuments,t)),e}var uh=i,z=uh.document,dh=uh.navigator,fh=`Report a Bug`,ph=`Cancel`,mh=`Send Bug Report`,hh=`Confirm`,gh=`Report a Bug`,_h=`your.email@example.org`,vh=`Email`,yh=`What's the bug? What did you expect?`,bh=`Description`,xh=`Your Name`,Sh=`Name`,Ch=`Thank you for your report!`,wh=`(required)`,Th=`Add a screenshot`,Eh=`Remove screenshot`,Dh=`Highlight`,Oh=`Hide`,kh=`Remove`,Ah=`Unable to submit feedback with empty message`,jh=`No client setup, cannot send feedback.`,Mh=`Unable to determine if Feedback was correctly sent.`,Nh=`Unable to send feedback. This could be because this domain is not in your list of allowed domains.`,Ph=`Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.`,Fh=`widget`,Ih=`api`,Lh=5e3,Rh={ERROR_EMPTY_MESSAGE:Ah,ERROR_NO_CLIENT:jh,ERROR_TIMEOUT:Mh,ERROR_FORBIDDEN:Nh,ERROR_GENERIC:Ph};function zh(e,t){return t?.[e]??Rh[e]}function Bh(e,t){return Error(zh(e,t))}var Vh=(e,t={includeReplay:!0})=>{let n=t.errorMessages;if(!e.message)throw Bh(`ERROR_EMPTY_MESSAGE`,n);let r=A();if(!r)throw Bh(`ERROR_NO_CLIENT`,n);e.tags&&Object.keys(e.tags).length&&k().setTags(e.tags);let i=Bu({source:Ih,url:ih(),...e},t);return new Promise((e,t)=>{let a=setTimeout(()=>{o(),t(zh(`ERROR_TIMEOUT`,n))},3e4),o=r.on(`afterSendEvent`,(r,s)=>{if(r.event_id===i)return clearTimeout(a),o(),s?.statusCode&&s.statusCode>=200&&s.statusCode<300?e(i):s?.statusCode===403?t(zh(`ERROR_FORBIDDEN`,n)):t(zh(`ERROR_GENERIC`,n))})})},Hh=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function Uh(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(dh.userAgent)||/Macintosh/i.test(dh.userAgent)&&dh.maxTouchPoints&&dh.maxTouchPoints>1||!isSecureContext)}function Wh(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function Gh(e){let t=z.createElement(`style`);return t.textContent=`
19
- .widget__actor {
20
- position: fixed;
21
- z-index: var(--z-index);
22
- margin: var(--page-margin);
23
- inset: var(--actor-inset);
24
-
25
- display: flex;
26
- align-items: center;
27
- gap: 8px;
28
- padding: 16px;
29
-
30
- font-family: inherit;
31
- font-size: var(--font-size);
32
- font-weight: 600;
33
- line-height: 1.14em;
34
- text-decoration: none;
35
-
36
- background: var(--actor-background, var(--background));
37
- border-radius: var(--actor-border-radius, 1.7em/50%);
38
- border: var(--actor-border, var(--border));
39
- box-shadow: var(--actor-box-shadow, var(--box-shadow));
40
- color: var(--actor-color, var(--foreground));
41
- fill: var(--actor-color, var(--foreground));
42
- cursor: pointer;
43
- opacity: 1;
44
- transition: transform 0.2s ease-in-out;
45
- transform: translate(0, 0) scale(1);
46
- }
47
- .widget__actor[aria-hidden="true"] {
48
- opacity: 0;
49
- pointer-events: none;
50
- visibility: hidden;
51
- transform: translate(0, 16px) scale(0.98);
52
- }
53
-
54
- .widget__actor:hover {
55
- background: var(--actor-hover-background, var(--background));
56
- filter: var(--interactive-filter);
57
- }
58
-
59
- .widget__actor svg {
60
- width: 1.14em;
61
- height: 1.14em;
62
- }
63
-
64
- @media (max-width: 600px) {
65
- .widget__actor span {
66
- display: none;
67
- }
68
- }
69
- `,e&&t.setAttribute(`nonce`,e),t}function Kh(e,t){return Object.entries(t).forEach(([t,n])=>{e.setAttributeNS(null,t,n)}),e}var qh=20,Jh=`http://www.w3.org/2000/svg`;function Yh(){let e=e=>uh.document.createElementNS(Jh,e),t=Kh(e(`svg`),{width:`${qh}`,height:`${qh}`,viewBox:`0 0 ${qh} ${qh}`,fill:`var(--actor-color, var(--foreground))`}),n=Kh(e(`g`),{clipPath:`url(#clip0_57_80)`}),r=Kh(e(`path`),{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z`});t.appendChild(n).appendChild(r);let i=e(`defs`),a=Kh(e(`clipPath`),{id:`clip0_57_80`}),o=Kh(e(`rect`),{width:`${qh}`,height:`${qh}`,fill:`white`});return a.appendChild(o),i.appendChild(a),t.appendChild(i).appendChild(a).appendChild(o),t}function Xh({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){let i=z.createElement(`button`);if(i.type=`button`,i.className=`widget__actor`,i.ariaHidden=`false`,i.ariaLabel=t||e||fh,i.appendChild(Yh()),e){let t=z.createElement(`span`);t.appendChild(z.createTextNode(e)),i.appendChild(t)}let a=Gh(r);return{el:i,appendToDom(){n.appendChild(a),n.appendChild(i)},removeFromDom(){i.remove(),a.remove()},show(){i.ariaHidden=`false`},hide(){i.ariaHidden=`true`}}}var Zh=`rgba(88, 74, 192, 1)`,Qh={foreground:`#2b2233`,background:`#ffffff`,accentForeground:`white`,accentBackground:Zh,successColor:`#268d75`,errorColor:`#df3338`,border:`1.5px solid rgba(41, 35, 47, 0.13)`,boxShadow:`0px 4px 24px 0px rgba(43, 34, 51, 0.12)`,outline:`1px auto var(--accent-background)`,interactiveFilter:`brightness(95%)`},$h={foreground:`#ebe6ef`,background:`#29232f`,accentForeground:`white`,accentBackground:Zh,successColor:`#2da98c`,errorColor:`#f55459`,border:`1.5px solid rgba(235, 230, 239, 0.15)`,boxShadow:`0px 4px 24px 0px rgba(43, 34, 51, 0.12)`,outline:`1px auto var(--accent-background)`,interactiveFilter:`brightness(150%)`};function eg(e){return`
70
- --foreground: ${e.foreground};
71
- --background: ${e.background};
72
- --accent-foreground: ${e.accentForeground};
73
- --accent-background: ${e.accentBackground};
74
- --success-color: ${e.successColor};
75
- --error-color: ${e.errorColor};
76
- --border: ${e.border};
77
- --box-shadow: ${e.boxShadow};
78
- --outline: ${e.outline};
79
- --interactive-filter: ${e.interactiveFilter};
80
- `}function tg({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){let i=z.createElement(`style`);return i.textContent=`
81
- :host {
82
- --font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
83
- --font-size: 14px;
84
- --z-index: 100000;
85
-
86
- --page-margin: 16px;
87
- --inset: auto 0 0 auto;
88
- --actor-inset: var(--inset);
89
-
90
- font-family: var(--font-family);
91
- font-size: var(--font-size);
92
-
93
- ${e===`system`?``:`color-scheme: only ${e};`}
94
-
95
- ${eg(e===`dark`?{...$h,...t}:{...Qh,...n})}
96
- }
97
-
98
- ${e===`system`?`
99
- @media (prefers-color-scheme: dark) {
100
- :host {
101
- color-scheme: only dark;
102
-
103
- ${eg({...$h,...t})}
104
- }
105
- }`:``}
106
- `,r&&i.setAttribute(`nonce`,r),i}var ng=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:r=`sentry-feedback`,autoInject:i=!0,showBranding:a=!0,isEmailRequired:o=!1,isNameRequired:s=!1,showEmail:c=!0,showName:l=!0,enableScreenshot:u=!0,useSentryUser:d={email:`email`,name:`username`},tags:f,styleNonce:p,scriptNonce:m,colorScheme:h=`system`,themeLight:g={},themeDark:_={},addScreenshotButtonLabel:v=Th,cancelButtonLabel:y=ph,confirmButtonLabel:b=hh,emailLabel:S=vh,emailPlaceholder:C=_h,formTitle:w=gh,isRequiredLabel:T=wh,messageLabel:ee=bh,messagePlaceholder:te=yh,nameLabel:ne=Sh,namePlaceholder:re=xh,removeScreenshotButtonLabel:ie=Eh,submitButtonLabel:ae=mh,successMessageText:oe=Ch,triggerLabel:se=fh,triggerAriaLabel:E=``,highlightToolText:ce=Dh,hideToolText:le=Oh,removeHighlightText:ue=kh,errorEmptyMessageText:de=Ah,errorNoClientText:fe=jh,errorTimeoutText:pe=Mh,errorForbiddenText:me=Nh,errorGenericText:he=Ph,onFormOpen:ge,onFormClose:_e,onSubmitSuccess:ve,onSubmitError:ye,onFormSubmitted:be}={})=>{let xe={id:r,autoInject:i,showBranding:a,isEmailRequired:o,isNameRequired:s,showEmail:c,showName:l,enableScreenshot:u,useSentryUser:d,tags:f,styleNonce:p,scriptNonce:m,colorScheme:h,themeDark:_,themeLight:g,triggerLabel:se,triggerAriaLabel:E,cancelButtonLabel:y,submitButtonLabel:ae,confirmButtonLabel:b,formTitle:w,emailLabel:S,emailPlaceholder:C,messageLabel:ee,messagePlaceholder:te,nameLabel:ne,namePlaceholder:re,successMessageText:oe,isRequiredLabel:T,addScreenshotButtonLabel:v,removeScreenshotButtonLabel:ie,highlightToolText:ce,hideToolText:le,removeHighlightText:ue,errorEmptyMessageText:de,errorNoClientText:fe,errorTimeoutText:pe,errorForbiddenText:me,errorGenericText:he,onFormClose:_e,onFormOpen:ge,onSubmitError:ye,onSubmitSuccess:ve,onFormSubmitted:be},Se=null,D=null,Ce=[],we=e=>{if(!Se){let t=z.createElement(`div`);t.id=String(e.id),z.body.appendChild(t),Se=t.attachShadow({mode:`open`}),D=tg(e),Se.appendChild(D)}return Se},Te=async r=>{let i=r.enableScreenshot&&Uh(),a,o;try{a=(t?t():await e(`feedbackModalIntegration`,m))(),Ro(a)}catch{throw Hh&&x.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),Error(`[Feedback] Missing feedback modal integration!`)}try{let t=i?n?n():await e(`feedbackScreenshotIntegration`,m):void 0;t&&(o=t(),Ro(o))}catch{Hh&&x.error(`[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.`)}let s={ERROR_EMPTY_MESSAGE:r.errorEmptyMessageText,ERROR_NO_CLIENT:r.errorNoClientText,ERROR_TIMEOUT:r.errorTimeoutText,ERROR_FORBIDDEN:r.errorForbiddenText,ERROR_GENERIC:r.errorGenericText},c=(e,t)=>Vh(e,{includeReplay:!0,...t,errorMessages:s}),l=a.createDialog({options:{...r,onFormClose:()=>{l?.close(),r.onFormClose?.()},onFormSubmitted:()=>{l?.close(),r.onFormSubmitted?.()}},screenshotIntegration:o,sendFeedback:c,shadow:we(r)});return l},Ee=(e,t={})=>{let n=Wh(xe,t),r=typeof e==`string`?z.querySelector(e):typeof e.addEventListener==`function`?e:null;if(!r)throw Hh&&x.error(`[Feedback] Unable to attach to target element`),Error(`Unable to attach to target element`);let i=null,a=async()=>{i||=await Te({...n,onFormSubmitted:()=>{i?.removeFromDom(),n.onFormSubmitted?.()}}),i.appendToDom(),i.open()};r.addEventListener(`click`,a);let o=()=>{Ce=Ce.filter(e=>e!==o),i?.removeFromDom(),i=null,r.removeEventListener(`click`,a)};return Ce.push(o),o},De=(e={})=>{let t=Wh(xe,e),n=we(t),r=Xh({triggerLabel:t.triggerLabel,triggerAriaLabel:t.triggerAriaLabel,shadow:n,styleNonce:p});return Ee(r.el,{...t,onFormOpen(){r.hide()},onFormClose(){r.show()},onFormSubmitted(){r.show()}}),r};return{name:`Feedback`,setupOnce(){!Jo()||!xe.autoInject||(z.readyState===`loading`?z.addEventListener(`DOMContentLoaded`,()=>De().appendToDom()):De().appendToDom())},attachTo:Ee,createWidget(e={}){let t=De(Wh(xe,e));return t.appendToDom(),t},async createForm(e={}){return Te(Wh(xe,e))},setTheme(e){if(xe.colorScheme=e,Se){let e=tg(xe);D?Se.replaceChild(e,D):Se.prepend(e),D=e}},remove(){Se&&(Se.parentElement?.remove(),Se=null,D=null),Ce.forEach(e=>e()),Ce=[]}}});function rg(){return A()?.getIntegrationByName(`Feedback`)}var ig,B,ag,og,sg,cg,lg,ug={},dg=[],fg=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,pg=Array.isArray;function mg(e,t){for(var n in t)e[n]=t[n];return e}function hg(e){var t=e.parentNode;t&&t.removeChild(e)}function V(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?ig.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return gg(e,o,r,i,null)}function gg(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i??++ag,__i:-1,__u:0};return i==null&&B.vnode!=null&&B.vnode(a),a}function _g(e){return e.children}function vg(e,t){this.props=e,this.context=t}function yg(e,t){if(t==null)return e.__?yg(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?yg(e):null}function bg(e,t,n){var r,i=e.__v,a=i.__e,o=e.__P;if(o)return(r=mg({},i)).__v=i.__v+1,B.vnode&&B.vnode(r),Mg(o,r,i,e.__n,o.ownerSVGElement!==void 0,32&i.__u?[a]:null,t,a??yg(i),!!(32&i.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=a&&xg(r),r}function xg(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return xg(e)}}function Sg(e){(!e.__d&&(e.__d=!0)&&og.push(e)&&!Cg.__r++||sg!==B.debounceRendering)&&((sg=B.debounceRendering)||cg)(Cg)}function Cg(){var e,t,n,r=[],i=[];for(og.sort(lg);e=og.shift();)e.__d&&(n=og.length,t=bg(e,r,i)||t,n===0||og.length>n?(Ng(r,t,i),i.length=r.length=0,t=void 0,og.sort(lg)):t&&B.__c&&B.__c(t,dg));t&&Ng(r,t,i),Cg.__r=0}function wg(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g=r&&r.__k||dg,_=t.length;for(n.__d=c,Tg(n,t,g),c=n.__d,d=0;d<_;d++)(p=n.__k[d])!=null&&typeof p!=`boolean`&&typeof p!=`function`&&(f=p.__i===-1?ug:g[p.__i]||ug,p.__i=d,Mg(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&Fg(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),65536&p.__u||f.__k===p.__k?c=Eg(p,c,e):typeof p.type==`function`&&p.__d!==void 0?c=p.__d:m&&(c=m.nextSibling),p.__d=void 0,p.__u&=-196609);n.__d=c,n.__e=h}function Tg(e,t,n){var r,i,a,o,s,c=t.length,l=n.length,u=l,d=0;for(e.__k=[],r=0;r<c;r++)(i=e.__k[r]=(i=t[r])==null||typeof i==`boolean`||typeof i==`function`?null:typeof i==`string`||typeof i==`number`||typeof i==`bigint`||i.constructor==String?gg(null,i,null,null,i):pg(i)?gg(_g,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?gg(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)==null?(a=n[r])&&a.key==null&&a.__e&&(a.__e==e.__d&&(e.__d=yg(a)),Ig(a,a,!1),n[r]=null,u--):(i.__=e,i.__b=e.__b+1,s=Dg(i,n,o=r+d,u),i.__i=s,a=null,s!==-1&&(u--,(a=n[s])&&(a.__u|=131072)),a==null||a.__v===null?(s==-1&&d--,typeof i.type!=`function`&&(i.__u|=65536)):s!==o&&(s===o+1?d++:s>o?u>c-o?d+=s-o:d--:d=s<o&&s==o-1?s-o:0,s!==r+d&&(i.__u|=65536)));if(u)for(r=0;r<l;r++)(a=n[r])!=null&&!(131072&a.__u)&&(a.__e==e.__d&&(e.__d=yg(a)),Ig(a,a))}function Eg(e,t,n){var r,i;if(typeof e.type==`function`){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=Eg(r[i],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType===8);return t}function Dg(e,t,n,r){var i=e.key,a=e.type,o=n-1,s=n+1,c=t[n];if(c===null||c&&i==c.key&&a===c.type)return n;if(r>+(c!=null&&!(131072&c.__u)))for(;o>=0||s<t.length;){if(o>=0){if((c=t[o])&&!(131072&c.__u)&&i==c.key&&a===c.type)return o;o--}if(s<t.length){if((c=t[s])&&!(131072&c.__u)&&i==c.key&&a===c.type)return s;s++}}return-1}function Og(e,t,n){t[0]===`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||fg.test(t)?n:n+`px`}function kg(e,t,n,r,i){var a;n:if(t===`style`)if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||Og(e.style,t,``);if(n)for(t in n)r&&n[t]===r[t]||Og(e.style,t,n[t])}else if(t[0]===`o`&&t[1]===`n`)a=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,`$1`)),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,a?jg:Ag,a)):e.removeEventListener(t,a?jg:Ag,a);else{if(i)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!==`width`&&t!==`height`&&t!==`href`&&t!==`list`&&t!==`form`&&t!==`tabIndex`&&t!==`download`&&t!==`rowSpan`&&t!==`colSpan`&&t!==`role`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!==`-`?e.removeAttribute(t):e.setAttribute(t,n))}}function Ag(e){if(this.l){var t=this.l[e.type+!1];if(e.t){if(e.t<=t.u)return}else e.t=Date.now();return t(B.event?B.event(e):e)}}function jg(e){if(this.l)return this.l[e.type+!0](B.event?B.event(e):e)}function Mg(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=B.__b)&&u(t);n:if(typeof T==`function`)try{if(_=t.props,v=(u=T.contextType)&&r[u.__c],y=u?v?v.props.value:u.__:r,n.__c?g=(d=t.__c=n.__c).__=d.__E:(`prototype`in T&&T.prototype.render?t.__c=d=new T(_,y):(t.__c=d=new vg(_,y),d.constructor=T,d.render=Lg),v&&v.sub(d),d.props=_,d.state||={},d.context=y,d.__n=r,f=d.__d=!0,d.__h=[],d._sb=[]),d.__s??=d.state,T.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=mg({},d.__s)),mg(d.__s,T.getDerivedStateFromProps(_,d.__s))),p=d.props,m=d.state,d.__v=t,f)T.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(T.getDerivedStateFromProps==null&&_!==p&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(_,y),!d.__e&&(d.shouldComponentUpdate!=null&&!1===d.shouldComponentUpdate(_,d.__s,y)||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=_,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[],d.__h.length&&o.push(d);break n}d.componentWillUpdate!=null&&d.componentWillUpdate(_,d.__s,y),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(p,m,h)})}if(d.context=y,d.props=_,d.__P=e,d.__e=!1,x=B.__r,S=0,`prototype`in T&&T.prototype.render){for(d.state=d.__s,d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),C=0;C<d._sb.length;C++)d.__h.push(d._sb[C]);d._sb=[]}else do d.__d=!1,x&&x(t),u=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++S<25);d.state=d.__s,d.getChildContext!=null&&(r=mg(mg({},r),d.getChildContext())),f||d.getSnapshotBeforeUpdate==null||(h=d.getSnapshotBeforeUpdate(p,m)),wg(e,pg(w=u!=null&&u.type===_g&&u.key==null?u.props.children:u)?w:[w],t,n,r,i,a,o,s,c,l),d.base=t.__e,t.__u&=-161,d.__h.length&&o.push(d),g&&(d.__E=d.__=null)}catch(e){t.__v=null,c||a!=null?(t.__e=s,t.__u|=c?160:32,a[a.indexOf(s)]=null):(t.__e=n.__e,t.__k=n.__k),B.__e(e,t,n)}else a==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=Pg(n.__e,t,n,r,i,a,o,c,l);(u=B.diffed)&&u(t)}function Ng(e,t,n){for(var r=0;r<n.length;r++)Fg(n[r],n[++r],n[++r]);B.__c&&B.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){B.__e(e,t.__v)}})}function Pg(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g=n.props,_=t.props,v=t.type;if(v===`svg`&&(i=!0),a!=null){for(l=0;l<a.length;l++)if((p=a[l])&&`setAttribute`in p==!!v&&(v?p.localName===v:p.nodeType===3)){e=p,a[l]=null;break}}if(e==null){if(v===null)return document.createTextNode(_);e=i?document.createElementNS(`http://www.w3.org/2000/svg`,v):document.createElement(v,_.is&&_),a=null,s=!1}if(v===null)g===_||s&&e.data===_||(e.data=_);else{if(a&&=ig.call(e.childNodes),g=n.props||ug,!s&&a!=null)for(g={},l=0;l<e.attributes.length;l++)g[(p=e.attributes[l]).name]=p.value;for(l in g)p=g[l],l==`children`||(l==`dangerouslySetInnerHTML`?d=p:l===`key`||l in _||kg(e,l,null,p,i));for(l in _)p=_[l],l==`children`?f=p:l==`dangerouslySetInnerHTML`?u=p:l==`value`?m=p:l==`checked`?h=p:l===`key`||s&&typeof p!=`function`||g[l]===p||kg(e,l,p,g[l],i);if(u)s||d&&(u.__html===d.__html||u.__html===e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=``),wg(e,pg(f)?f:[f],t,n,r,i&&v!==`foreignObject`,a,o,a?a[0]:n.__k&&yg(n,0),s,c),a!=null)for(l=a.length;l--;)a[l]!=null&&hg(a[l]);s||(l=`value`,m!==void 0&&(m!==e[l]||v===`progress`&&!m||v===`option`&&m!==g[l])&&kg(e,l,m,g[l],!1),l=`checked`,h!==void 0&&h!==e[l]&&kg(e,l,h,g[l],!1))}return e}function Fg(e,t,n){try{typeof e==`function`?e(t):e.current=t}catch(e){B.__e(e,n)}}function Ig(e,t,n){var r,i;if(B.unmount&&B.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Fg(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){B.__e(e,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Ig(r[i],t,n||typeof e.type!=`function`);n||e.__e==null||hg(e.__e),e.__=e.__e=e.__d=void 0}function Lg(e,t,n){return this.constructor(e,n)}function Rg(e,t,n){var r,i,a,o;B.__&&B.__(e,t),i=(r=!1)?null:t.__k,a=[],o=[],Mg(t,e=t.__k=V(_g,null,[e]),i||ug,ug,t.ownerSVGElement!==void 0,i?null:t.firstChild?ig.call(t.childNodes):null,a,i?i.__e:t.firstChild,r,o),e.__d=void 0,Ng(a,e,o)}ig=dg.slice,B={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},ag=0,vg.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=mg({},this.state);typeof e==`function`&&(e=e(mg({},n),this.props)),e&&mg(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Sg(this))},vg.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Sg(this))},vg.prototype.render=_g,og=[],cg=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,lg=function(e,t){return e.__v.__b-t.__v.__b},Cg.__r=0;var zg,H,Bg,Vg,Hg=0,Ug=[],Wg=[],Gg=B,Kg=Gg.__b,qg=Gg.__r,Jg=Gg.diffed,Yg=Gg.__c,Xg=Gg.unmount,Zg=Gg.__;function Qg(e,t){Gg.__h&&Gg.__h(H,e,Hg||t),Hg=0;var n=H.__H||={__:[],__h:[]};return e>=n.__.length&&n.__.push({__V:Wg}),n.__[e]}function $g(e){return Hg=1,e_(__,e)}function e_(e,t,n){var r=Qg(zg++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):__(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=H,!H.u)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=!1;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),!(!o&&r.__c.props===e)&&(!a||a.call(this,e,t,n))};H.u=!0;var a=H.shouldComponentUpdate,o=H.componentWillUpdate;H.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},H.shouldComponentUpdate=i}return r.__N||r.__}function t_(e,t){var n=Qg(zg++,3);!Gg.__s&&g_(n.__H,t)&&(n.__=e,n.i=t,H.__H.__h.push(n))}function n_(e,t){var n=Qg(zg++,4);!Gg.__s&&g_(n.__H,t)&&(n.__=e,n.i=t,H.__h.push(n))}function r_(e){return Hg=5,a_(function(){return{current:e}},[])}function i_(e,t,n){Hg=6,n_(function(){return typeof e==`function`?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function a_(e,t){var n=Qg(zg++,7);return g_(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function o_(e,t){return Hg=8,a_(function(){return e},t)}function s_(e){var t=H.context[e.__c],n=Qg(zg++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(H)),t.props.value):e.__}function c_(e,t){Gg.useDebugValue&&Gg.useDebugValue(t?t(e):e)}function l_(e){var t=Qg(zg++,10),n=$g();return t.__=e,H.componentDidCatch||=function(e,r){t.__&&t.__(e,r),n[1](e)},[n[0],function(){n[1](void 0)}]}function u_(){var e=Qg(zg++,11);if(!e.__){for(var t=H.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||=[0,0];e.__=`P`+n[0]+`-`+ n[1]++}return e.__}function d_(){for(var e;e=Ug.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(m_),e.__H.__h.forEach(h_),e.__H.__h=[]}catch(t){e.__H.__h=[],Gg.__e(t,e.__v)}}Gg.__b=function(e){H=null,Kg&&Kg(e)},Gg.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Zg&&Zg(e,t)},Gg.__r=function(e){qg&&qg(e),zg=0;var t=(H=e.__c).__H;t&&(Bg===H?(t.__h=[],H.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=Wg,e.__N=e.i=void 0})):(t.__h.forEach(m_),t.__h.forEach(h_),t.__h=[],zg=0)),Bg=H},Gg.diffed=function(e){Jg&&Jg(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Ug.push(t)!==1&&Vg===Gg.requestAnimationFrame||((Vg=Gg.requestAnimationFrame)||p_)(d_)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==Wg&&(e.__=e.__V),e.i=void 0,e.__V=Wg})),Bg=H=null},Gg.__c=function(e,t){t.some(function(e){try{e.__h.forEach(m_),e.__h=e.__h.filter(function(e){return!e.__||h_(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],Gg.__e(n,e.__v)}}),Yg&&Yg(e,t)},Gg.unmount=function(e){Xg&&Xg(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{m_(e)}catch(e){t=e}}),n.__H=void 0,t&&Gg.__e(t,n.__v))};var f_=typeof requestAnimationFrame==`function`;function p_(e){var t,n=function(){clearTimeout(r),f_&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);f_&&(t=requestAnimationFrame(n))}function m_(e){var t=H,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),H=t}function h_(e){var t=H;e.__c=e.__(),H=t}function g_(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function __(e,t){return typeof t==`function`?t(e):t}var v_=Object.defineProperty({__proto__:null,useCallback:o_,useContext:s_,useDebugValue:c_,useEffect:t_,useErrorBoundary:l_,useId:u_,useImperativeHandle:i_,useLayoutEffect:n_,useMemo:a_,useReducer:e_,useRef:r_,useState:$g},Symbol.toStringTag,{value:`Module`}),y_=`http://www.w3.org/2000/svg`;function b_(){let e=e=>z.createElementNS(y_,e),t=Kh(e(`svg`),{width:`32`,height:`30`,viewBox:`0 0 72 66`,fill:`inherit`}),n=Kh(e(`path`),{transform:`translate(11, 11)`,d:`M29,2.26a4.67,4.67,0,0,0-8,0L14.42,13.53A32.21,32.21,0,0,1,32.17,40.19H27.55A27.68,27.68,0,0,0,12.09,17.47L6,28a15.92,15.92,0,0,1,9.23,12.17H4.62A.76.76,0,0,1,4,39.06l2.94-5a10.74,10.74,0,0,0-3.36-1.9l-2.91,5a4.54,4.54,0,0,0,1.69,6.24A4.66,4.66,0,0,0,4.62,44H19.15a19.4,19.4,0,0,0-8-17.31l2.31-4A23.87,23.87,0,0,1,23.76,44H36.07a35.88,35.88,0,0,0-16.41-31.8l4.67-8a.77.77,0,0,1,1.05-.27c.53.29,20.29,34.77,20.66,35.17a.76.76,0,0,1-.68,1.13H40.6q.09,1.91,0,3.81h4.78A4.59,4.59,0,0,0,50,39.43a4.49,4.49,0,0,0-.62-2.28Z`});return t.appendChild(n),t}function x_({options:e}){let t=a_(()=>({__html:b_().outerHTML}),[]);return V(`h2`,{class:`dialog__header`},V(`span`,{class:`dialog__title`},e.formTitle),e.showBranding?V(`a`,{class:`brand-link`,target:`_blank`,href:`https://sentry.io/welcome/`,title:`Powered by Sentry`,rel:`noopener noreferrer`,dangerouslySetInnerHTML:t}):null)}function S_(e,t){let n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function C_(e,t){let n=e.get(t);return typeof n==`string`?n.trim():``}function w_({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:a,onSubmitError:o,showEmail:s,showName:c,screenshotInput:l}){let{tags:u,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:f,cancelButtonLabel:p,emailLabel:m,emailPlaceholder:h,isEmailRequired:g,isNameRequired:_,messageLabel:v,messagePlaceholder:y,nameLabel:b,namePlaceholder:S,submitButtonLabel:C,isRequiredLabel:w}=e,[T,ee]=$g(!1),[te,ne]=$g(null),[re,ie]=$g(!1),ae=l?.input,[oe,se]=$g(null),E=o_(e=>{se(e),ie(!1)},[]),ce=o_(e=>{let t=S_(e,{emailLabel:m,isEmailRequired:g,isNameRequired:_,messageLabel:v,nameLabel:b});return t.length>0?ne(`Please enter in the following required fields: ${t.join(`, `)}`):ne(null),t.length===0},[m,g,_,v,b]);return V(`form`,{class:`form`,onSubmit:o_(async e=>{ee(!0);try{if(e.preventDefault(),!(e.target instanceof HTMLFormElement))return;let t=new FormData(e.target),n=await(l&&re?l.value():void 0),r={name:C_(t,`name`),email:C_(t,`email`),message:C_(t,`message`),attachments:n?[n]:void 0};if(!ce(r))return;try{a(r,await i({name:r.name,email:r.email,message:r.message,source:Fh,tags:u},{attachments:r.attachments}))}catch(e){Hh&&x.error(e);let t=e instanceof Error?e:Error(String(e));ne(t.message),o(t)}}finally{ee(!1)}},[l&&re,a,o])},ae&&re?V(ae,{onError:E}):null,V(`fieldset`,{class:`form__right`,"data-sentry-feedback":!0,disabled:T},V(`div`,{class:`form__top`},te?V(`div`,{class:`form__error-container`},te):null,c?V(`label`,{for:`name`,class:`form__label`},V(T_,{label:b,isRequiredLabel:w,isRequired:_}),V(`input`,{class:`form__input`,defaultValue:n,id:`name`,name:`name`,placeholder:S,required:_,type:`text`})):V(`input`,{"aria-hidden":!0,value:n,name:`name`,type:`hidden`}),s?V(`label`,{for:`email`,class:`form__label`},V(T_,{label:m,isRequiredLabel:w,isRequired:g}),V(`input`,{class:`form__input`,defaultValue:t,id:`email`,name:`email`,placeholder:h,required:g,type:`email`})):V(`input`,{"aria-hidden":!0,value:t,name:`email`,type:`hidden`}),V(`label`,{for:`message`,class:`form__label`},V(T_,{label:v,isRequiredLabel:w,isRequired:!0}),V(`textarea`,{autoFocus:!0,class:`form__input form__input--textarea`,id:`message`,name:`message`,placeholder:y,required:!0,rows:5})),ae?V(`label`,{for:`screenshot`,class:`form__label`},V(`button`,{class:`btn btn--default`,disabled:T,type:`button`,onClick:()=>{se(null),ie(e=>!e)}},re?f:d),oe?V(`div`,{class:`form__error-container`},oe.message):null):null),V(`div`,{class:`btn-group`},V(`button`,{class:`btn btn--primary`,disabled:T,type:`submit`},C),V(`button`,{class:`btn btn--default`,disabled:T,type:`button`,onClick:r},p))))}function T_({label:e,isRequired:t,isRequiredLabel:n}){return V(`span`,{class:`form__label__text`},e,t&&V(`span`,{class:`form__label__text--required`},n))}var E_=16,D_=17,O_=`http://www.w3.org/2000/svg`;function k_(){let e=e=>uh.document.createElementNS(O_,e),t=Kh(e(`svg`),{width:`${E_}`,height:`${D_}`,viewBox:`0 0 ${E_} ${D_}`,fill:`inherit`}),n=Kh(e(`g`),{clipPath:`url(#clip0_57_156)`}),r=Kh(e(`path`),{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z`}),i=Kh(e(`path`),{d:`M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z`});t.appendChild(n).append(i,r);let a=e(`defs`),o=Kh(e(`clipPath`),{id:`clip0_57_156`}),s=Kh(e(`rect`),{width:`${E_}`,height:`${E_}`,fill:`white`,transform:`translate(0 0.5)`});return o.appendChild(s),a.appendChild(o),t.appendChild(a).appendChild(o).appendChild(s),t}function A_({open:e,onFormSubmitted:t,...n}){let r=n.options,i=a_(()=>({__html:k_().outerHTML}),[]),[a,o]=$g(null),s=o_(()=>{a&&(clearTimeout(a),o(null)),t()},[a]),c=o_((e,r)=>{n.onSubmitSuccess(e,r),o(setTimeout(()=>{t(),o(null)},Lh))},[t]);return V(_g,null,a?V(`div`,{class:`success__position`,onClick:s},V(`div`,{class:`success__content`},r.successMessageText,V(`span`,{class:`success__icon`,dangerouslySetInnerHTML:i}))):V(`dialog`,{class:`dialog`,onClick:r.onFormClose,open:e},V(`div`,{class:`dialog__position`},V(`div`,{class:`dialog__content`,onClick:e=>{e.stopPropagation()}},V(x_,{options:r}),V(w_,{...n,onSubmitSuccess:c})))))}var j_=`
107
- .dialog {
108
- position: fixed;
109
- z-index: var(--z-index);
110
- margin: 0;
111
- inset: 0;
112
-
113
- display: flex;
114
- align-items: center;
115
- justify-content: center;
116
- padding: 0;
117
- height: 100vh;
118
- width: 100vw;
119
-
120
- color: var(--dialog-color, var(--foreground));
121
- fill: var(--dialog-color, var(--foreground));
122
- line-height: 1.75em;
123
-
124
- background-color: rgba(0, 0, 0, 0.05);
125
- border: none;
126
- inset: 0;
127
- opacity: 1;
128
- transition: opacity 0.2s ease-in-out;
129
- }
130
-
131
- .dialog__position {
132
- position: fixed;
133
- z-index: var(--z-index);
134
- inset: var(--dialog-inset);
135
- padding: var(--page-margin);
136
- display: flex;
137
- max-height: calc(100vh - (2 * var(--page-margin)));
138
- }
139
- @media (max-width: 600px) {
140
- .dialog__position {
141
- inset: var(--page-margin);
142
- padding: 0;
143
- }
144
- }
145
-
146
- .dialog__position:has(.editor) {
147
- inset: var(--page-margin);
148
- padding: 0;
149
- }
150
-
151
- .dialog:not([open]) {
152
- opacity: 0;
153
- pointer-events: none;
154
- visibility: hidden;
155
- }
156
- .dialog:not([open]) .dialog__content {
157
- transform: translate(0, -16px) scale(0.98);
158
- }
159
-
160
- .dialog__content {
161
- display: flex;
162
- flex-direction: column;
163
- gap: 16px;
164
- padding: var(--dialog-padding, 24px);
165
- max-width: 100%;
166
- width: 100%;
167
- max-height: 100%;
168
- overflow: auto;
169
-
170
- background: var(--dialog-background, var(--background));
171
- border-radius: var(--dialog-border-radius, 20px);
172
- border: var(--dialog-border, var(--border));
173
- box-shadow: var(--dialog-box-shadow, var(--box-shadow));
174
- transform: translate(0, 0) scale(1);
175
- transition: transform 0.2s ease-in-out;
176
- }
177
-
178
- `,M_=`
179
- .dialog__header {
180
- display: flex;
181
- gap: 4px;
182
- justify-content: space-between;
183
- font-weight: var(--dialog-header-weight, 600);
184
- margin: 0;
185
- }
186
- .dialog__title {
187
- align-self: center;
188
- width: var(--form-width, 272px);
189
- }
190
-
191
- @media (max-width: 600px) {
192
- .dialog__title {
193
- width: auto;
194
- }
195
- }
196
-
197
- .dialog__position:has(.editor) .dialog__title {
198
- width: auto;
199
- }
200
-
201
-
202
- .brand-link {
203
- display: inline-flex;
204
- }
205
- .brand-link:focus-visible {
206
- outline: var(--outline);
207
- }
208
- `,N_=`
209
- .form {
210
- display: flex;
211
- overflow: auto;
212
- flex-direction: row;
213
- gap: 16px;
214
- flex: 1 0;
215
- }
216
-
217
- .form fieldset {
218
- border: none;
219
- margin: 0;
220
- padding: 0;
221
- }
222
-
223
- .form__right {
224
- flex: 0 0 auto;
225
- display: flex;
226
- overflow: auto;
227
- flex-direction: column;
228
- justify-content: space-between;
229
- gap: 20px;
230
- width: var(--form-width, 100%);
231
- }
232
-
233
- .dialog__position:has(.editor) .form__right {
234
- width: var(--form-width, 272px);
235
- }
236
-
237
- .form__top {
238
- display: flex;
239
- flex-direction: column;
240
- gap: 8px;
241
- }
242
-
243
- .form__error-container {
244
- color: var(--error-color);
245
- fill: var(--error-color);
246
- }
247
-
248
- .form__label {
249
- display: flex;
250
- flex-direction: column;
251
- gap: 4px;
252
- margin: 0px;
253
- }
254
-
255
- .form__label__text {
256
- display: flex;
257
- gap: 4px;
258
- align-items: center;
259
- }
260
-
261
- .form__label__text--required {
262
- font-size: 0.85em;
263
- }
264
-
265
- .form__input {
266
- font-family: inherit;
267
- line-height: inherit;
268
- background: transparent;
269
- box-sizing: border-box;
270
- border: var(--input-border, var(--border));
271
- border-radius: var(--input-border-radius, 6px);
272
- color: var(--input-color, inherit);
273
- fill: var(--input-color, inherit);
274
- font-size: var(--input-font-size, inherit);
275
- font-weight: var(--input-font-weight, 500);
276
- padding: 6px 12px;
277
- }
278
-
279
- .form__input::placeholder {
280
- opacity: 0.65;
281
- color: var(--input-placeholder-color, inherit);
282
- filter: var(--interactive-filter);
283
- }
284
-
285
- .form__input:focus-visible {
286
- outline: var(--input-focus-outline, var(--outline));
287
- }
288
-
289
- .form__input--textarea {
290
- font-family: inherit;
291
- resize: vertical;
292
- }
293
-
294
- .error {
295
- color: var(--error-color);
296
- fill: var(--error-color);
297
- }
298
- `,P_=`
299
- .btn-group {
300
- display: grid;
301
- gap: 8px;
302
- }
303
-
304
- .btn {
305
- line-height: inherit;
306
- border: var(--button-border, var(--border));
307
- border-radius: var(--button-border-radius, 6px);
308
- cursor: pointer;
309
- font-family: inherit;
310
- font-size: var(--button-font-size, inherit);
311
- font-weight: var(--button-font-weight, 600);
312
- padding: var(--button-padding, 6px 16px);
313
- }
314
- .btn[disabled] {
315
- opacity: 0.6;
316
- pointer-events: none;
317
- }
318
-
319
- .btn--primary {
320
- color: var(--button-primary-color, var(--accent-foreground));
321
- fill: var(--button-primary-color, var(--accent-foreground));
322
- background: var(--button-primary-background, var(--accent-background));
323
- border: var(--button-primary-border, var(--border));
324
- border-radius: var(--button-primary-border-radius, 6px);
325
- font-weight: var(--button-primary-font-weight, 500);
326
- }
327
- .btn--primary:hover {
328
- color: var(--button-primary-hover-color, var(--accent-foreground));
329
- fill: var(--button-primary-hover-color, var(--accent-foreground));
330
- background: var(--button-primary-hover-background, var(--accent-background));
331
- filter: var(--interactive-filter);
332
- }
333
- .btn--primary:focus-visible {
334
- background: var(--button-primary-hover-background, var(--accent-background));
335
- filter: var(--interactive-filter);
336
- outline: var(--button-primary-focus-outline, var(--outline));
337
- }
338
-
339
- .btn--default {
340
- color: var(--button-color, var(--foreground));
341
- fill: var(--button-color, var(--foreground));
342
- background: var(--button-background, var(--background));
343
- border: var(--button-border, var(--border));
344
- border-radius: var(--button-border-radius, 6px);
345
- font-weight: var(--button-font-weight, 500);
346
- }
347
- .btn--default:hover {
348
- color: var(--button-color, var(--foreground));
349
- fill: var(--button-color, var(--foreground));
350
- background: var(--button-hover-background, var(--background));
351
- filter: var(--interactive-filter);
352
- }
353
- .btn--default:focus-visible {
354
- background: var(--button-hover-background, var(--background));
355
- filter: var(--interactive-filter);
356
- outline: var(--button-focus-outline, var(--outline));
357
- }
358
- `,F_=`
359
- .success__position {
360
- position: fixed;
361
- inset: var(--dialog-inset);
362
- padding: var(--page-margin);
363
- z-index: var(--z-index);
364
- }
365
- .success__content {
366
- background: var(--success-background, var(--background));
367
- border: var(--success-border, var(--border));
368
- border-radius: var(--success-border-radius, 1.7em/50%);
369
- box-shadow: var(--success-box-shadow, var(--box-shadow));
370
- font-weight: var(--success-font-weight, 600);
371
- color: var(--success-color);
372
- fill: var(--success-color);
373
- padding: 12px 24px;
374
- line-height: 1.75em;
375
-
376
- display: grid;
377
- align-items: center;
378
- grid-auto-flow: column;
379
- gap: 6px;
380
- cursor: default;
381
- }
382
-
383
- .success__icon {
384
- display: flex;
385
- }
386
- `;function I_(e){let t=z.createElement(`style`);return t.textContent=`
387
- :host {
388
- --dialog-inset: var(--inset);
389
- }
390
-
391
- ${j_}
392
- ${M_}
393
- ${N_}
394
- ${P_}
395
- ${F_}
396
- `,e&&t.setAttribute(`nonce`,e),t}function L_(){let e=k().getUser(),t=un().getUser(),n=dn().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}var R_=(()=>({name:`FeedbackModal`,setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{let i=r,a=e.useSentryUser,o=L_(),s=z.createElement(`div`),c=I_(e.styleNonce),l=``,u={get el(){return s},appendToDom(){!i.contains(c)&&!i.contains(s)&&(i.appendChild(c),i.appendChild(s))},removeFromDom(){s.remove(),c.remove(),z.body.style.overflow=l},open(){f(!0),e.onFormOpen?.(),A()?.emit(`openFeedbackWidget`),l=z.body.style.overflow,z.body.style.overflow=`hidden`},close(){f(!1),z.body.style.overflow=l}},d=t?.createInput({h:V,hooks:v_,dialog:u,options:e}),f=t=>{Rg(V(A_,{options:e,screenshotInput:d,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(a&&o?.[a.name]||``),defaultEmail:String(a&&o?.[a.email]||``),onFormClose:()=>{f(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(t,n)=>{f(!1),e.onSubmitSuccess?.(t,n)},onSubmitError:t=>{e.onSubmitError?.(t)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:t}),s)};return u}}));function z_({h:e}){return function(){return e(`svg`,{"data-test-id":`icon-close`,viewBox:`0 0 16 16`,fill:`#2B2233`,height:`25px`,width:`25px`},e(`circle`,{r:`7`,cx:`8`,cy:`8`,fill:`white`}),e(`path`,{strokeWidth:`1.5`,d:`M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z`}),e(`path`,{strokeWidth:`1.5`,d:`M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z`}),e(`path`,{strokeWidth:`1.5`,d:`M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z`}))}}function B_(e){let t=z.createElement(`style`),n=`#1A141F`,r=`#302735`;return t.textContent=`
397
- .editor {
398
- display: flex;
399
- flex-grow: 1;
400
- flex-direction: column;
401
- }
402
-
403
- .editor__image-container {
404
- justify-items: center;
405
- padding: 15px;
406
- position: relative;
407
- height: 100%;
408
- border-radius: var(--menu-border-radius, 6px);
409
-
410
- background-color: ${n};
411
- background-image: repeating-linear-gradient(
412
- -145deg,
413
- transparent,
414
- transparent 8px,
415
- ${n} 8px,
416
- ${n} 11px
417
- ),
418
- repeating-linear-gradient(
419
- -45deg,
420
- transparent,
421
- transparent 15px,
422
- ${r} 15px,
423
- ${r} 16px
424
- );
425
- }
426
-
427
- .editor__canvas-container {
428
- width: 100%;
429
- height: 100%;
430
- position: relative;
431
- display: flex;
432
- align-items: center;
433
- justify-content: center;
434
- }
435
-
436
- .editor__canvas-container > * {
437
- object-fit: contain;
438
- position: absolute;
439
- }
440
-
441
- .editor__tool-container {
442
- padding-top: 8px;
443
- display: flex;
444
- justify-content: center;
445
- }
446
-
447
- .editor__tool-bar {
448
- display: flex;
449
- gap: 8px;
450
- }
451
-
452
- .editor__tool {
453
- display: flex;
454
- padding: 8px 12px;
455
- justify-content: center;
456
- align-items: center;
457
- border: var(--button-border, var(--border));
458
- border-radius: var(--button-border-radius, 6px);
459
- background: var(--button-background, var(--background));
460
- color: var(--button-color, var(--foreground));
461
- }
462
-
463
- .editor__tool--active {
464
- background: var(--button-primary-background, var(--accent-background));
465
- color: var(--button-primary-color, var(--accent-foreground));
466
- }
467
-
468
- .editor__rect {
469
- position: absolute;
470
- z-index: 2;
471
- }
472
-
473
- .editor__rect button {
474
- opacity: 0;
475
- position: absolute;
476
- top: -12px;
477
- right: -12px;
478
- cursor: pointer;
479
- padding: 0;
480
- z-index: 3;
481
- border: none;
482
- background: none;
483
- }
484
-
485
- .editor__rect:hover button {
486
- opacity: 1;
487
- }
488
- `,e&&t.setAttribute(`nonce`,e),t}function V_({h:e}){return function({action:t,setAction:n,options:r}){return e(`div`,{class:`editor__tool-container`},e(`div`,{class:`editor__tool-bar`},e(`button`,{type:`button`,class:`editor__tool ${t===`highlight`?`editor__tool--active`:``}`,onClick:()=>{n(t===`highlight`?``:`highlight`)}},r.highlightToolText),e(`button`,{type:`button`,class:`editor__tool ${t===`hide`?`editor__tool--active`:``}`,onClick:()=>{n(t===`hide`?``:`hide`)}},r.hideToolText)))}}function H_({hooks:e}){function t(){let[t,n]=e.useState(uh.devicePixelRatio??1);return e.useEffect(()=>{let e=()=>{n(uh.devicePixelRatio)},t=matchMedia(`(resolution: ${uh.devicePixelRatio}dppx)`);return t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)}},[]),t}return function({onBeforeScreenshot:n,onScreenshot:r,onAfterScreenshot:i,onError:a}){let o=t();e.useEffect(()=>{(async()=>{n();let e=await dh.mediaDevices.getDisplayMedia({video:{width:uh.innerWidth*o,height:uh.innerHeight*o},audio:!1,monitorTypeSurfaces:`exclude`,preferCurrentTab:!0,selfBrowserSurface:`include`,surfaceSwitching:`exclude`}),t=z.createElement(`video`);await new Promise((n,i)=>{t.srcObject=e,t.onloadedmetadata=()=>{r(t,o),e.getTracks().forEach(e=>e.stop()),n()},t.play().catch(i)}),i()})().catch(a)},[])}}function U_(e,t,n){switch(e.type){case`highlight`:t.shadowColor=`rgba(0, 0, 0, 0.7)`,t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break;case`hide`:t.fillStyle=`rgb(0, 0, 0)`,t.fillRect(e.x,e.y,e.w,e.h);break}}function W_(e,t,n){if(!e)return;let r=e.getContext(`2d`,t);r&&n(e,r)}function G_(e,t){W_(e,{alpha:!0},(e,n)=>{n.drawImage(t,0,0,t.width,t.height,0,0,e.width,e.height)})}function K_(e,t,n){W_(e,{alpha:!0},(e,r)=>{n.length&&(r.fillStyle=`rgba(0, 0, 0, 0.25)`,r.fillRect(0,0,e.width,e.height)),n.forEach(e=>{U_(e,r,t)})})}function q_({h:e,hooks:t,outputBuffer:n,dialog:r,options:i}){let a=H_({hooks:t}),o=V_({h:e}),s=z_({h:e}),c={__html:B_(i.styleNonce).innerText},l=r.el.style,u=({screenshot:r})=>{let[a,l]=t.useState(`highlight`),[u,d]=t.useState([]),f=t.useRef(null),p=t.useRef(null),m=t.useRef(null),h=t.useRef(null),[g,_]=t.useState(1),v=t.useMemo(()=>{let e=z.getElementById(i.id);if(!e)return`white`;let t=getComputedStyle(e);return t.getPropertyValue(`--button-primary-background`)||t.getPropertyValue(`--accent-background`)},[i.id]);t.useLayoutEffect(()=>{let e=()=>{let t=f.current;t&&(W_(r.canvas,{alpha:!1},e=>{_(Math.min(t.clientWidth/e.width,t.clientHeight/e.height))}),(t.clientHeight===0||t.clientWidth===0)&&setTimeout(e,0))};return e(),uh.addEventListener(`resize`,e),()=>{uh.removeEventListener(`resize`,e)}},[r]);let y=t.useCallback((e,t)=>{W_(e,{alpha:!0},(e,n)=>{n.scale(t,t),e.width=r.canvas.width,e.height=r.canvas.height})},[r]);t.useEffect(()=>{y(p.current,r.dpi),G_(p.current,r.canvas)},[r]),t.useEffect(()=>{y(m.current,r.dpi),W_(m.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),K_(m.current,v,u)},[u,v]),t.useEffect(()=>{y(n,r.dpi),G_(n,r.canvas),W_(z.createElement(`canvas`),{alpha:!0},(e,t)=>{t.scale(r.dpi,r.dpi),e.width=r.canvas.width,e.height=r.canvas.height,K_(e,v,u),G_(n,e)})},[u,r,v]);let b=e=>{if(!a||!h.current)return;let t=h.current.getBoundingClientRect(),n={type:a,x:e.offsetX/g,y:e.offsetY/g},r=(e,n)=>{let r=(n.clientX-t.x)/g,i=(n.clientY-t.y)/g;return{type:e.type,x:Math.min(e.x,r),y:Math.min(e.y,i),w:Math.abs(r-e.x),h:Math.abs(i-e.y)}},i=e=>{W_(m.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),K_(m.current,v,[...u,r(n,e)])},o=e=>{let t=r(n,e);t.w*g>=1&&t.h*g>=1&&d(e=>[...e,t]),z.removeEventListener(`mousemove`,i),z.removeEventListener(`mouseup`,o)};z.addEventListener(`mousemove`,i),z.addEventListener(`mouseup`,o)},x=t.useCallback(e=>t=>{t.preventDefault(),t.stopPropagation(),d(t=>{let n=[...t];return n.splice(e,1),n})},[]),S={width:`${r.canvas.width*g}px`,height:`${r.canvas.height*g}px`},C=e=>{e.stopPropagation()};return e(`div`,{class:`editor`},e(`style`,{nonce:i.styleNonce,dangerouslySetInnerHTML:c}),e(`div`,{class:`editor__image-container`},e(`div`,{class:`editor__canvas-container`,ref:f},e(`canvas`,{ref:p,id:`background`,style:S}),e(`canvas`,{ref:m,id:`foreground`,style:S}),e(`div`,{ref:h,onMouseDown:b,style:S},u.map((t,n)=>e(`div`,{key:n,class:`editor__rect`,style:{top:`${t.y*g}px`,left:`${t.x*g}px`,width:`${t.w*g}px`,height:`${t.h*g}px`}},e(`button`,{"aria-label":i.removeHighlightText,onClick:x(n),onMouseDown:C,onMouseUp:C,type:`button`},e(s,null))))))),e(o,{options:i,action:a,setAction:l}))};return function({onError:r}){let[i,o]=t.useState();return a({onBeforeScreenshot:t.useCallback(()=>{l.display=`none`},[]),onScreenshot:t.useCallback((e,t)=>{W_(z.createElement(`canvas`),{alpha:!1},(n,r)=>{r.scale(t,t),n.width=e.videoWidth,n.height=e.videoHeight,r.drawImage(e,0,0,n.width,n.height),o({canvas:n,dpi:t})}),n.width=e.videoWidth,n.height=e.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{l.display=`block`},[]),onError:t.useCallback(e=>{l.display=`block`,r(e)},[])}),i?e(u,{screenshot:i}):e(`div`,null)}}var J_=(()=>({name:`FeedbackScreenshot`,setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{let i=z.createElement(`canvas`);return{input:q_({h:e,hooks:t,outputBuffer:i,dialog:n,options:r}),value:async()=>{let e=await new Promise(e=>{i.toBlob(e,`image/png`)});if(e)return{data:new Uint8Array(await e.arrayBuffer()),filename:`screenshot.png`,contentType:`application/png`}}}}})),U=i,Y_=0;function X_(){return Y_>0}function Z_(){Y_++,setTimeout(()=>{Y_--})}function Q_(e,t={}){function n(e){return typeof e==`function`}if(!n(e))return e;try{let t=e.__sentry_wrapped__;if(t)return typeof t==`function`?t:e;if(Pe(e))return e}catch{return e}let r=function(...n){i._sentryWrappedDepth=(i._sentryWrappedDepth||0)+1;try{let r=n.map(e=>Q_(e,t));return e.apply(this,r)}catch(e){throw Z_(),fn(r=>{r.addEventProcessor(e=>(t.mechanism&&(ht(e,void 0,void 0),gt(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),L(e)}),e}finally{i._sentryWrappedDepth=(i._sentryWrappedDepth||0)-1}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}Ne(r,e),Me(e,`__sentry_wrapped__`,r);try{Object.getOwnPropertyDescriptor(r,`name`).configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function $_(){let e=ih(),{referrer:t}=U.document||{},{userAgent:n}=U.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}var ev=[`replayIntegration`,`replayCanvasIntegration`,`feedbackIntegration`,`feedbackModalIntegration`,`feedbackScreenshotIntegration`,`captureConsoleIntegration`,`contextLinesIntegration`,`linkedErrorsIntegration`,`dedupeIntegration`,`extraErrorDataIntegration`,`graphqlClientIntegration`,`httpClientIntegration`,`reportingObserverIntegration`,`rewriteFramesIntegration`,`browserProfilingIntegration`,`moduleMetadataIntegration`,`instrumentAnthropicAiClient`,`instrumentOpenAiClient`,`instrumentGoogleGenAIClient`,`instrumentLangGraph`,`createLangChainCallbackHandler`,`instrumentLangChainEmbeddings`],tv={replayCanvasIntegration:`replay-canvas`,feedbackModalIntegration:`feedback-modal`,feedbackScreenshotIntegration:`feedback-screenshot`};function nv(e){return tv[e]||e.replace(`Integration`,``).toLowerCase()}var rv=U;async function iv(e,t){let n=ev.includes(e)?nv(e):void 0,r=rv.Sentry=rv.Sentry||{};if(!n)throw Error(`Cannot lazy load integration: ${e}`);let i=r[e];if(typeof i==`function`&&!(`_isShim`in i))return i;let a=av(n),o=U.document.createElement(`script`);o.src=a,o.crossOrigin=`anonymous`,o.referrerPolicy=`strict-origin`,t&&o.setAttribute(`nonce`,t);let s=new Promise((e,t)=>{o.addEventListener(`load`,()=>e()),o.addEventListener(`error`,t)}),c=U.document.currentScript,l=U.document.body||U.document.head||c?.parentElement;if(l)l.appendChild(o);else throw Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await s}catch{throw Error(`Error when loading integration: ${e}`)}let u=r[e];if(typeof u!=`function`)throw Error(`Could not load integration: ${e}`);return u}function av(e){let t=A()?.getOptions()?.cdnBaseUrl||`https://browser.sentry-cdn.com`;return new URL(`/${a}/${e}.min.js`,t).toString()}var ov=ng({lazyLoadIntegration:iv}),sv=ng({getModalIntegration:()=>R_,getScreenshotIntegration:()=>J_});function cv(e,t){let n=dv(e,t),r={type:gv(t),value:_v(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function lv(e,t,n,r){let i=A()?.getOptions().normalizeDepth,a=wv(t),o={__serialized__:Ze(t,i)};if(a)return{exception:{values:[cv(e,a)]},extra:o};let s={exception:{values:[{type:Ee(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:Sv(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=dv(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function uv(e,t){return{exception:{values:[cv(e,t)]}}}function dv(e,t){let n=t.stacktrace||t.stack||``,r=pv(t),i=mv(t);try{return e(n,r,i)}catch{}return[]}var fv=/Minified React error #\d+;/i;function pv(e){return e&&fv.test(e.message)?1:0}function mv(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function hv(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0?e instanceof WebAssembly.Exception:!1}function gv(e){let t=e?.name;return!t&&hv(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function _v(e){let t=e?.message;return hv(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?il(t.error):il(e):`No error message`}function vv(e,t,n,r){let i=bv(e,t,n?.syntheticException||void 0,r);return gt(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),za(i)}function yv(e,t,n=`info`,r,i){let a=xv(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),za(a)}function bv(e,t,n,r,i){let a;if(be(t)&&t.error)return uv(e,t.error);if(xe(t)||Se(t)){let i=t;if(`stack`in t){a=uv(e,t);let i=a.exception?.values?.[0];if(r&&n&&i&&!i.stacktrace){let t=dv(e,n);t.length&&(i.stacktrace={frames:t},gt(a,{synthetic:!0}))}}else{let t=i.name||(xe(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=xv(e,o,n,r),ht(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return ve(t)?uv(e,t):Te(t)||Ee(t)?(a=lv(e,t,n,i),gt(a,{synthetic:!0}),a):(a=xv(e,t,n,r),ht(a,`${t}`,void 0),gt(a,{synthetic:!0}),a)}function xv(e,t,n,r){let i={};if(r&&n){let r=dv(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),gt(i,{synthetic:!0})}if(Ce(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function Sv(e,{isUnhandledRejection:t}){let n=Le(e),r=t?`promise rejection`:`exception`;return be(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Ee(e)?`Event \`${Cv(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Cv(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function wv(e){return Object.values(e).find(e=>e instanceof Error)}var Tv=class extends Xs{constructor(e){let t=Ev(e);Oc(t,`browser`,[`browser`],U.SENTRY_SDK_SOURCE||Ko()),super(t);let{userInfo:n}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:n?`auto`:`never`,...t._metadata.sdk.settings});let{sendClientReports:r,enableLogs:i,_experiments:a,enableMetrics:o}=this._options,s=o??a?.enableMetrics??!0;U.document&&(r||i||s)&&U.document.addEventListener(`visibilitychange`,()=>{U.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),i&&ns(this),s&&hs(this))}),n&&this.on(`beforeSendSession`,Dc)}eventFromException(e,t){return vv(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return yv(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n,r)}};function Ev(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:U.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var Dv=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,W=i,Ov=(e,t)=>e>t[1]?`poor`:e>t[0]?`needs-improvement`:`good`,kv=(e,t,n,r)=>{let i,a;return o=>{t.value>=0&&(o||r)&&(a=t.value-(i??0),(a||i===void 0)&&(i=t.value,t.delta=a,t.rating=Ov(t.value,n),e(t)))}},Av=(e=!0)=>{let t=W.performance?.getEntriesByType?.(`navigation`)[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},jv=()=>Av()?.activationStart??0;function Mv(e,t,n){W.document&&W.addEventListener(e,t,n)}function Nv(e,t,n){W.document&&W.removeEventListener(e,t,n)}var Pv=-1,Fv=new Set,Iv=()=>W.document?.visibilityState===`hidden`&&!W.document?.prerendering?0:1/0,Lv=e=>{if(zv(e)&&Pv>-1){if(e.type===`visibilitychange`||e.type===`pagehide`)for(let e of Fv)e();isFinite(Pv)||(Pv=e.type===`visibilitychange`?e.timeStamp:0,Nv(`prerenderingchange`,Lv,!0))}},Rv=()=>{if(W.document&&Pv<0){let e=jv();Pv=(W.document.prerendering?void 0:globalThis.performance.getEntriesByType(`visibility-state`).filter(t=>t.name===`hidden`&&t.startTime>e)[0]?.startTime)??Iv(),Mv(`visibilitychange`,Lv,!0),Mv(`pagehide`,Lv,!0),Mv(`prerenderingchange`,Lv,!0)}return{get firstHiddenTime(){return Pv},onHidden(e){Fv.add(e)}}};function zv(e){return e.type===`pagehide`||W.document?.visibilityState===`hidden`}var Bv=()=>`v5-${Date.now()}-${Math.floor(Math.random()*8999999999999)+0xe8d4a51000}`,Vv=(e,t=-1)=>{let n=Av(),r=`navigate`;return n&&(W.document?.prerendering||jv()>0?r=`prerender`:W.document?.wasDiscarded?r=`restore`:n.type&&(r=n.type.replace(/_/g,`-`))),{name:e,value:t,rating:`good`,delta:0,entries:[],id:Bv(),navigationType:r}},Hv=new WeakMap;function Uv(e,t){try{return Hv.get(e)||Hv.set(e,new t),Hv.get(e)}catch{return new t}}var Wv=class{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;let t=this._sessionEntries[0],n=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),this._onAfterProcessingUnexpectedShift?.(e)}},Gv=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){let r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Kv=e=>{let t=!1;return()=>{t||=(e(),!0)}},qv=e=>{W.document?.prerendering?addEventListener(`prerenderingchange`,()=>e(),!0):e()},Jv=[1800,3e3],Yv=(e,t={})=>{qv(()=>{let n=Rv(),r=Vv(`FCP`),i,a=Gv(`paint`,e=>{for(let t of e)t.name===`first-contentful-paint`&&(a.disconnect(),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-jv(),0),r.entries.push(t),i(!0)))});a&&(i=kv(e,r,Jv,t.reportAllChanges))})},Xv=[.1,.25],Zv=(e,t={})=>{Yv(Kv(()=>{let n=Vv(`CLS`,0),r,i=Rv(),a=Uv(t,Wv),o=e=>{for(let t of e)a._processEntry(t);a._sessionValue>n.value&&(n.value=a._sessionValue,n.entries=a._sessionEntries,r())},s=Gv(`layout-shift`,o);s&&(r=kv(e,n,Xv,t.reportAllChanges),i.onHidden(()=>{o(s.takeRecords()),r(!0)}),W?.setTimeout?.(r))}))},Qv=0,$v=1/0,ey=0,ty=e=>{e.forEach(e=>{e.interactionId&&($v=Math.min($v,e.interactionId),ey=Math.max(ey,e.interactionId),Qv=ey?(ey-$v)/7+1:0)})},ny,ry=()=>ny?Qv:performance.interactionCount||0,iy=()=>{`interactionCount`in performance||ny||(ny=Gv(`event`,ty,{type:`event`,buffered:!0,durationThreshold:0}))},ay=10,oy=0,sy=()=>ry()-oy,cy=class{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){oy=ry(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){let e=Math.min(this._longestInteractionList.length-1,Math.floor(sy()/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!(e.interactionId||e.entryType===`first-input`))return;let t=this._longestInteractionList.at(-1),n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<ay||e.duration>t._latency){if(n?e.duration>n._latency?(n.entries=[e],n._latency=e.duration):e.duration===n._latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(n.id,n),this._longestInteractionList.push(n)),this._longestInteractionList.sort((e,t)=>t._latency-e._latency),this._longestInteractionList.length>ay){let e=this._longestInteractionList.splice(ay);for(let t of e)this._longestInteractionMap.delete(t.id)}this._onAfterProcessingINPCandidate?.(n)}}},ly=e=>{let t=W.requestIdleCallback||W.setTimeout;W.document?.visibilityState===`hidden`?e():(e=Kv(e),Mv(`visibilitychange`,e,{once:!0,capture:!0}),Mv(`pagehide`,e,{once:!0,capture:!0}),t(()=>{e(),Nv(`visibilitychange`,e,{capture:!0}),Nv(`pagehide`,e,{capture:!0})}))},uy=[200,500],dy=40,fy=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&`interactionId`in PerformanceEventTiming.prototype))return;let n=Rv();qv(()=>{iy();let r=Vv(`INP`),i,a=Uv(t,cy),o=e=>{ly(()=>{for(let t of e)a._processEntry(t);let t=a._estimateP98LongestInteraction();t&&t._latency!==r.value&&(r.value=t._latency,r.entries=t.entries,i())})},s=Gv(`event`,o,{durationThreshold:t.durationThreshold??dy});i=kv(e,r,uy,t.reportAllChanges),s&&(s.observe({type:`first-input`,buffered:!0}),n.onHidden(()=>{o(s.takeRecords()),i(!0)}))})},py=class{_processEntry(e){this._onBeforeProcessingEntry?.(e)}},my=[2500,4e3],hy=(e,t={})=>{qv(()=>{let n=Rv(),r=Vv(`LCP`),i,a=Uv(t,py),o=e=>{t.reportAllChanges||(e=e.slice(-1));for(let t of e)a._processEntry(t),t.startTime<n.firstHiddenTime&&(r.value=Math.max(t.startTime-jv(),0),r.entries=[t],i())},s=Gv(`largest-contentful-paint`,o);if(s){i=kv(e,r,my,t.reportAllChanges);let n=Kv(()=>{o(s.takeRecords()),s.disconnect(),i(!0)}),a=e=>{e.isTrusted&&(ly(n),Nv(e.type,a,{capture:!0}))};for(let e of[`keydown`,`click`,`visibilitychange`])Mv(e,a,{capture:!0})}})},gy=[800,1800],_y=e=>{W.document?.prerendering?qv(()=>_y(e)):W.document?.readyState===`complete`?setTimeout(e):addEventListener(`load`,()=>_y(e),!0)},vy=(e,t={})=>{let n=Vv(`TTFB`),r=kv(e,n,gy,t.reportAllChanges);_y(()=>{let e=Av();e&&(n.value=Math.max(e.responseStart-jv(),0),n.entries=[e],r(!0))})},yy={},by={},xy,Sy,Cy,wy;function Ty(e,t=!1){return Fy(`cls`,e,jy,xy,t)}function Ey(e,t=!1){return Fy(`lcp`,e,My,Sy,t)}function Dy(e){return Fy(`ttfb`,e,Ny,Cy)}function Oy(e){return Fy(`inp`,e,Py,wy)}function ky(e,t){return Ly(e,t),by[e]||(Iy(e),by[e]=!0),Ry(e,t)}function Ay(e,t){let n=yy[e];if(n?.length)for(let r of n)try{r(t)}catch(t){Dv&&x.error(`Error while triggering instrumentation handler.
489
- Type: ${e}
490
- Name: ${ie(r)}
491
- Error:`,t)}}function jy(){return Zv(e=>{Ay(`cls`,{metric:e}),xy=e},{reportAllChanges:!0})}function My(){return hy(e=>{Ay(`lcp`,{metric:e}),Sy=e},{reportAllChanges:!0})}function Ny(){return vy(e=>{Ay(`ttfb`,{metric:e}),Cy=e})}function Py(){return fy(e=>{Ay(`inp`,{metric:e}),wy=e})}function Fy(e,t,n,r,i=!1){Ly(e,t);let a;return by[e]||(a=n(),by[e]=!0),r&&t({metric:r}),Ry(e,t,i?a:void 0)}function Iy(e){let t={};e===`event`&&(t.durationThreshold=0),Gv(e,t=>{Ay(e,{entries:t})},t)}function Ly(e,t){yy[e]=yy[e]||[],yy[e].push(t)}function Ry(e,t,n){return()=>{n&&n();let r=yy[e];if(!r)return;let i=r.indexOf(t);i!==-1&&r.splice(i,1)}}function zy(e){return`duration`in e}var By=80;function Vy(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||By;for(;n&&i++<5&&(o=Hy(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=n.parentNode;return r.reverse().join(` > `)}catch{return`<unknown>`}}function Hy(e,t){let n=e,r=[];if(!n?.tagName)return``;if(typeof HTMLElement<`u`&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t?.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(i?.length)i.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let e=n.className;if(e&&D(e)){let t=e.split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let e of[`aria-label`,`type`,`name`,`title`,`alt`]){let t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join(``)}var Uy=e=>{let t=t=>{(t.type===`pagehide`||W.document?.visibilityState===`hidden`)&&e(t)};Mv(`visibilitychange`,t,{capture:!0,once:!0}),Mv(`pagehide`,t,{capture:!0,once:!0})};function Wy(e){return typeof e==`number`&&isFinite(e)}function Gy(e,t,n,{...r}){let i=P(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime==`function`&&e.updateStartTime(t),Bi(e,()=>{let e=Ri({startTime:t,...r});return e&&e.end(n),e})}function Ky(e){let t=A();if(!t)return;let{name:n,transaction:r,attributes:i,startTime:a}=e,{release:o,environment:s}=t.getOptions(),{userInfo:c}=t.getDataCollectionOptions(),l=t.getIntegrationByName(`Replay`)?.getReplayId(),u=k(),d=u.getUser(),f=d===void 0?void 0:d.email||d.id||d.ip_address,p;try{p=u.getScopeData().contexts.profile.profile_id}catch{}return Ri({name:n,attributes:{release:o,environment:s,user:f||void 0,profile_id:p||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":W.navigator?.userAgent,"client.address":c?`{{auto}}`:void 0,...i},startTime:a,experimental:{standalone:!0}})}function qy(){return W.addEventListener&&W.performance}function G(e){return e/1e3}function Jy(e){let t=`unknown`,n=`unknown`,r=``;for(let i of e){if(i===`/`){[t,n]=e.split(`/`);break}if(!isNaN(Number(i))){t=r===`h`?`http`:r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function Yy(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Xy(e,t){let n,r=!1;function i(e){!r&&n&&t(e,n.spanContext().spanId,n),r=!0}Uy(()=>{i(`pagehide`)});let a=e.on(`beforeStartNavigationSpan`,(e,t)=>{t?.isRedirect||(i(`navigation`),a(),o())}),o=e.on(`afterStartPageLoadSpan`,e=>{n=e,o()})}function Zy(e){let t=0,n;if(!Yy(`layout-shift`))return;let r=Ty(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);Xy(e,(e,i)=>{Qy(t,n,i,e),r()})}function Qy(e,t,n,r){Dv&&x.log(`Sending CLS span (${e})`);let i=t?G((Et()||0)+t.startTime):O(),a=k().getScopeData().transactionName,o=t?Vy(t.sources[0]?.node):`Layout shift`,s={[N]:`auto.http.browser.cls`,[M]:`ui.webvital.cls`,[Nn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((e,t)=>{s[`cls.source.${t+1}`]=Vy(e.node)});let c=Ky({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`cls`,{[vn]:``,[yn]:e}),c.end(i))}function $y(e){return e!=null&&e>0&&e<=6e4}function eb(e){let t=0,n;if(!Yy(`largest-contentful-paint`))return;let r=Ey(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!$y(e.value)||(t=e.value,n=r)},!0);Xy(e,(e,i)=>{tb(t,n,i,e),r()})}function tb(e,t,n,r){if(!$y(e))return;Dv&&x.log(`Sending LCP span (${e})`);let i=G((Et()||0)+(t?.startTime||0)),a=k().getScopeData().transactionName,o=t?Vy(t.element):`Largest contentful paint`,s={[N]:`auto.http.browser.lcp`,[M]:`ui.webvital.lcp`,[Nn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(s[`lcp.element`]=Vy(t.element)),t.id&&(s[`lcp.id`]=t.id),t.url&&(s[`lcp.url`]=t.url),t.loadTime!=null&&(s[`lcp.loadTime`]=t.loadTime),t.renderTime!=null&&(s[`lcp.renderTime`]=t.renderTime),t.size!=null&&(s[`lcp.size`]=t.size));let c=Ky({name:o,transaction:a,attributes:s,startTime:i});c&&(c.addEvent(`lcp`,{[vn]:`millisecond`,[yn]:e}),c.end(i))}function nb(e){return e&&((Et()||performance.timeOrigin)+e)/1e3}function rb(e){let t={};if(e.nextHopProtocol!=null){let{name:n,version:r}=Jy(e.nextHopProtocol);t[`network.protocol.version`]=r,t[`network.protocol.name`]=n}return Et()||qy()?.timeOrigin?ib({...t,"http.request.redirect_start":nb(e.redirectStart),"http.request.redirect_end":nb(e.redirectEnd),"http.request.worker_start":nb(e.workerStart),"http.request.fetch_start":nb(e.fetchStart),"http.request.domain_lookup_start":nb(e.domainLookupStart),"http.request.domain_lookup_end":nb(e.domainLookupEnd),"http.request.connect_start":nb(e.connectStart),"http.request.secure_connection_start":nb(e.secureConnectionStart),"http.request.connection_end":nb(e.connectEnd),"http.request.request_start":nb(e.requestStart),"http.request.response_start":nb(e.responseStart),"http.request.response_end":nb(e.responseEnd),"http.request.time_to_first_byte":e.responseStart==null?void 0:e.responseStart/1e3}):t}function ib(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!=null))}var ab=2147483647,ob=0,sb={},cb,lb;function ub({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){let r=qy();if(r&&Et()){r.mark&&W.performance.mark(`sentry-tracing-init`);let i=t?eb(n):t===!1?hb():void 0,a=e?Zy(n):e===!1?mb():void 0,o=gb(),s=_b();return()=>{o(),s(),i?.(),a?.()}}return()=>void 0}function db(){ky(`longtask`,({entries:e})=>{let t=I();if(!t)return;let{op:n,start_timestamp:r}=P(t);for(let i of e){let e=G(Et()+i.startTime),a=G(i.duration);n===`navigation`&&r&&e<r||Gy(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-task`,attributes:{[N]:`auto.ui.browser.metrics`}})}})}function fb(){new PerformanceObserver(e=>{let t=I();if(t)for(let n of e.getEntries()){if(!n.scripts[0])continue;let e=G(Et()+n.startTime),{start_timestamp:r,op:i}=P(t);if(i===`navigation`&&r&&e<r)continue;let a=G(n.duration),o={[N]:`auto.ui.browser.metrics`},{invoker:s,invokerType:c,sourceURL:l,sourceFunctionName:u,sourceCharPosition:d}=n.scripts[0];o[`browser.script.invoker`]=s,o[`browser.script.invoker_type`]=c,l&&(o[`code.filepath`]=l),u&&(o[`code.function`]=u),d!==-1&&(o[`browser.script.source_char_position`]=d),Gy(t,e,e+a,{name:`Main UI thread blocked`,op:`ui.long-animation-frame`,attributes:o})}}).observe({type:`long-animation-frame`,buffered:!0})}function pb(){ky(`event`,({entries:e})=>{let t=I();if(t){for(let n of e)if(n.name===`click`){let e=G(Et()+n.startTime),r=G(n.duration),i={name:Vy(n.target),op:`ui.interaction.${n.name}`,startTime:e,attributes:{[N]:`auto.ui.browser.metrics`}},a=ah(n.target);a&&(i.attributes[`ui.component_name`]=a),Gy(t,e,e+r,i)}}})}function mb(){return Ty(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(sb.cls={value:e.value,unit:``},lb=t)},!0)}function hb(){return Ey(({metric:e})=>{let t=e.entries[e.entries.length-1];!t||!$y(e.value)||(sb.lcp={value:e.value,unit:`millisecond`},cb=t)},!0)}function gb(){return Dy(({metric:e})=>{e.entries[e.entries.length-1]&&(sb.ttfb={value:e.value,unit:`millisecond`})})}function _b(){return ky(`paint`,({entries:e})=>{let t=Rv();for(let n of e){let e=n.startTime<t.firstHiddenTime;n.name===`first-paint`&&e&&(sb.fp={value:n.startTime,unit:`millisecond`}),n.name===`first-contentful-paint`&&e&&(sb.fcp={value:n.startTime,unit:`millisecond`})}})}function vb(e,t){let n=qy(),r=Et();if(!n?.getEntries||!r)return;let{spanStreamingEnabled:i,ignorePerformanceApiSpans:a,ignoreResourceSpans:o}=t,s=G(r),c=n.getEntries(),{op:l,start_timestamp:u}=P(e);c.slice(ob).forEach(t=>{let n=G(t.startTime),r=G(Math.max(0,t.duration));if(!(l===`navigation`&&u&&s+n<u))switch(t.entryType){case`navigation`:wb(e,t,s);break;case`mark`:case`paint`:case`measure`:Sb(e,t,n,r,s,a);break;case`resource`:Ob(e,t,t.name,n,r,s,o);break}}),ob=Math.max(c.length-1,0),kb(e,i)}function yb(e,t){let n=Et();if(!qy()?.getEntries||!n){bb();return}let{spanStreamingEnabled:r,recordClsOnPageloadSpan:i,recordLcpOnPageloadSpan:a}=t,o=G(n);if(P(e).op===`pageload`){if(Mb(sb),r){let t=(t,n,r)=>{let i=r??`browser.web_vital.${t}.value`;e.setAttribute(i,n),Dv&&x.log(`Setting web vital attribute`,{[i]:n},`on pageload span`)};[`ttfb`,`fp`,`fcp`].forEach(e=>{sb[e]&&t(e,sb[e].value)}),sb[`ttfb.requestTime`]&&t(`ttfb.requestTime`,sb[`ttfb.requestTime`].value,`browser.web_vital.ttfb.request_time`)}else i||delete sb.cls,a||delete sb.lcp,Object.entries(sb).forEach(([t,n])=>{Ci(t,n.value,n.unit,e)}),Ab(e,t);e.setAttribute(r?`browser.performance.time_origin`:`performance.timeOrigin`,o),e.setAttribute(r?`browser.performance.navigation.activation_start`:`performance.activationStart`,jv())}bb()}function bb(){cb=void 0,lb=void 0,sb={}}function xb(e){if(e?.entryType===`measure`)try{return e.detail.devtools.track===`Components ⚛`}catch{return}}function Sb(e,t,n,r,i,a){if(xb(t)||[`mark`,`measure`].includes(t.entryType)&&ct(t.name,a))return;let o=Av(!1),s=G(o?o.requestStart:0),c=i+Math.max(n,s),l=i+n,u=l+r,d={[N]:`auto.resource.browser.metrics`};c!==l&&(d[`sentry.browser.measure_happened_before_request`]=!0,d[`sentry.browser.measure_start_time`]=c),Cb(d,t),c<=u&&Gy(e,c,u,{name:t.name,op:t.entryType,attributes:d})}function Cb(e,t){try{let n=t.detail;if(!n)return;if(typeof n==`object`){for(let[t,r]of Object.entries(n))if(r&&we(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(r!==void 0)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(we(n)){e[`sentry.browser.measure.detail`]=n;return}try{e[`sentry.browser.measure.detail`]=JSON.stringify(n)}catch{}}catch{}}function wb(e,t,n){[`unloadEvent`,`redirect`,`domContentLoadedEvent`,`loadEvent`,`connect`].forEach(r=>{Tb(e,t,r,n)}),Tb(e,t,`secureConnection`,n,`TLS/SSL`),Tb(e,t,`fetch`,n,`cache`),Tb(e,t,`domainLookup`,n,`DNS`),Db(e,t,n)}function Tb(e,t,n,r,i=n){let a=t[Eb(n)],o=t[`${n}Start`];!o||!a||Gy(e,r+G(o),r+G(a),{op:`browser.${i}`,name:t.name,attributes:{[N]:`auto.ui.browser.metrics`,...n===`redirect`&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function Eb(e){return e===`secureConnection`?`connectEnd`:e===`fetch`?`domainLookupStart`:`${e}End`}function Db(e,t,n){let r=n+G(t.requestStart),i=n+G(t.responseEnd),a=n+G(t.responseStart);t.responseEnd&&(Gy(e,r,i,{op:`browser.request`,name:t.name,attributes:{[N]:`auto.ui.browser.metrics`}}),Gy(e,a,i,{op:`browser.response`,name:t.name,attributes:{[N]:`auto.ui.browser.metrics`}}))}function Ob(e,t,n,r,i,a,o){if(t.initiatorType===`xmlhttprequest`||t.initiatorType===`fetch`)return;let s=t.initiatorType?`resource.${t.initiatorType}`:`resource.other`;if(o?.includes(s))return;let c={[N]:`auto.resource.browser.metrics`},l=ya(n);l.protocol&&(c[`url.scheme`]=l.protocol.split(`:`).pop()),l.host&&(c[`server.address`]=l.host),c[`url.same_origin`]=n.includes(W.location.origin),jb(t,c,[[`responseStatus`,`http.response.status_code`],[`transferSize`,`http.response_transfer_size`],[`encodedBodySize`,`http.response_content_length`],[`decodedBodySize`,`http.decoded_response_content_length`],[`renderBlockingStatus`,`resource.render_blocking_status`],[`deliveryType`,`http.response_delivery_type`]]);let u={...c,...rb(t)},d=a+r;Gy(e,d,d+i,{name:n.replace(W.location.origin,``),op:s,attributes:u})}function kb(e,t){let n=W.navigator;if(!n)return;let r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?`network.connection.effective_type`:`effectiveConnectionType`,r.effectiveType),r.type&&e.setAttribute(t?`network.connection.type`:`connectionType`,r.type),Wy(r.rtt)&&(t?e.setAttribute(`network.connection.rtt`,r.rtt):P(e).op===`pageload`&&Ci(`connection.rtt`,r.rtt,`millisecond`))),Wy(n.deviceMemory)&&(t?e.setAttribute(`device.memory.estimated_capacity`,n.deviceMemory):e.setAttribute(`deviceMemory`,`${n.deviceMemory} GB`)),Wy(n.hardwareConcurrency)&&(t?e.setAttribute(`device.processor_count`,n.hardwareConcurrency):e.setAttribute(`hardwareConcurrency`,String(n.hardwareConcurrency)))}function Ab(e,t){cb&&t.recordLcpOnPageloadSpan&&(cb.element&&e.setAttribute(`lcp.element`,Vy(cb.element)),cb.id&&e.setAttribute(`lcp.id`,cb.id),cb.url&&e.setAttribute(`lcp.url`,cb.url.trim().slice(0,200)),cb.loadTime!=null&&e.setAttribute(`lcp.loadTime`,cb.loadTime),cb.renderTime!=null&&e.setAttribute(`lcp.renderTime`,cb.renderTime),e.setAttribute(`lcp.size`,cb.size)),lb?.sources&&t.recordClsOnPageloadSpan&&lb.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,Vy(t.node)))}function jb(e,t,n){n.forEach(([n,r])=>{let i=e[n];i!=null&&(typeof i==`number`&&i<ab||typeof i==`string`)&&(t[r]=i)})}function Mb(e){let t=Av(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e[`ttfb.requestTime`]={value:n-r,unit:`millisecond`})}var Nb=`ElementTiming`,Pb=R((()=>({name:Nb,setup(){!qy()||!Et()||ky(`element`,({entries:e})=>{for(let t of e){let e=t;if(!e.identifier)continue;let n=e.identifier,r=e.name,i=e.renderTime,a=e.loadTime,o={"sentry.origin":`auto.ui.browser.element_timing`,"ui.element.identifier":n};r&&(o[`ui.element.paint_type`]=r),e.id&&(o[`ui.element.id`]=e.id),e.element&&(o[`ui.element.type`]=e.element.tagName.toLowerCase()),e.url&&(o[`ui.element.url`]=e.url),e.naturalWidth&&(o[`ui.element.width`]=e.naturalWidth),e.naturalHeight&&(o[`ui.element.height`]=e.naturalHeight),i>0&&od(`ui.element.render_time`,i,{unit:`millisecond`,attributes:o}),a>0&&od(`ui.element.load_time`,a,{unit:`millisecond`,attributes:o})}})}}))),Fb=[],Ib=new Map,Lb=new Map;function Rb(){if(qy()&&Et()){let e=Bb();return()=>{e()}}return()=>void 0}var zb={click:`click`,pointerdown:`click`,pointerup:`click`,mousedown:`click`,mouseup:`click`,touchstart:`click`,touchend:`click`,mouseover:`hover`,mouseout:`hover`,mouseenter:`hover`,mouseleave:`hover`,pointerover:`hover`,pointerout:`hover`,pointerenter:`hover`,pointerleave:`hover`,dragstart:`drag`,dragend:`drag`,drag:`drag`,dragenter:`drag`,dragleave:`drag`,dragover:`drag`,drop:`drag`,keydown:`press`,keyup:`press`,keypress:`press`,input:`press`};function Bb(){return Oy(Vb)}var Vb=({metric:e})=>{if(e.value==null)return;let t=G(e.value);if(t>60)return;let n=e.entries.find(t=>t.duration===e.value&&zb[t.name]);if(!n)return;let{interactionId:r}=n,i=zb[n.name],a=G(Et()+n.startTime),o=I(),s=o?F(o):void 0,c=r==null?void 0:Ib.get(r),l=c?.span||s,u=l?P(l).description:k().getScopeData().transactionName,d=Ky({name:c?.elementName||Vy(n.target),transaction:u,attributes:{[N]:`auto.http.browser.inp`,[M]:`ui.interaction.${i}`,[Nn]:n.duration},startTime:a});d&&(d.addEvent(`inp`,{[vn]:`millisecond`,[yn]:e.value}),d.end(a+t))};function Hb(e){return e==null?void 0:Ib.get(e)}function Ub(){let e=Object.keys(zb);Jo()&&e.forEach(e=>{W.addEventListener(e,t,{capture:!0,passive:!0})});function t(e){let t=e.target;if(!t)return;let n=Vy(t),r=Math.round(e.timeStamp);if(Lb.set(r,n),Lb.size>50){let e=Lb.keys().next().value;e!==void 0&&Lb.delete(e)}}function n(e){let t=Math.round(e.startTime),n=Lb.get(t);if(!n)for(let e=-5;e<=5;e++){let r=Lb.get(t+e);if(r){n=r;break}}return n||`<unknown>`}let r=({entries:e})=>{let t=I(),r=t&&F(t);e.forEach(e=>{if(!zy(e))return;let t=e.interactionId;if(t==null||Ib.has(t))return;let i=e.target?Vy(e.target):n(e);if(Fb.length>10){let e=Fb.shift();Ib.delete(e)}Fb.push(t),Ib.set(t,{span:r,elementName:i})})};ky(`event`,r),ky(`first-input`,r)}function Wb(e){let{name:t,op:n,origin:r,metricName:i,value:a,attributes:o,parentSpan:s,reportEvent:c,startTime:l,endTime:u}=e,d=k().getScopeData().transactionName,f={[N]:r,[M]:n,[Nn]:0,[`browser.web_vital.${i}.value`]:a,"sentry.transaction":d,"user_agent.original":W.navigator?.userAgent,...o};s&&xr(s).attributes?.[`sentry.op`]===`pageload`&&(f[`sentry.pageload.span_id`]=s.spanContext().spanId),c&&(f[`browser.web_vital.${i}.report_event`]=c);let p=Ri({name:t,attributes:f,startTime:l,parentSpan:s});p&&p.end(u??l)}function Gb(e){let t=0,n;if(!Yy(`largest-contentful-paint`))return;let r=Ey(({metric:e})=>{let r=e.entries[e.entries.length-1];!r||!$y(e.value)||(t=e.value,n=r)},!0);Xy(e,(e,i,a)=>{Kb(t,n,a,e),r()})}function Kb(e,t,n,r){if(!$y(e))return;Dv&&x.log(`Sending LCP span (${e})`);let i=Et()||0,a=G(i),o=G(i+(t?.startTime||0)),s=t?Vy(t.element):`Largest contentful paint`,c={};t?.element&&(c[`browser.web_vital.lcp.element`]=Vy(t.element)),t?.id&&(c[`browser.web_vital.lcp.id`]=t.id),t?.url&&(c[`browser.web_vital.lcp.url`]=t.url),t?.loadTime!=null&&(c[`browser.web_vital.lcp.load_time`]=t.loadTime),t?.renderTime!=null&&(c[`browser.web_vital.lcp.render_time`]=t.renderTime),t?.size!=null&&(c[`browser.web_vital.lcp.size`]=t.size),Wb({name:s,op:`ui.webvital.lcp`,origin:`auto.http.browser.lcp`,metricName:`lcp`,value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:a,endTime:o})}function qb(e){let t=0,n;if(!Yy(`layout-shift`))return;let r=Ty(({metric:e})=>{let r=e.entries[e.entries.length-1];r&&(t=e.value,n=r)},!0);Xy(e,(e,i,a)=>{Jb(t,n,a,e),r()})}function Jb(e,t,n,r){Dv&&x.log(`Sending CLS span (${e})`);let i=t?G((Et()||0)+t.startTime):O(),a=t?Vy(t.sources[0]?.node):`Layout shift`,o={};t?.sources&&t.sources.forEach((e,t)=>{o[`browser.web_vital.cls.source.${t+1}`]=Vy(e.node)}),Wb({name:a,op:`ui.webvital.cls`,origin:`auto.http.browser.cls`,metricName:`cls`,value:e,attributes:o,parentSpan:n,reportEvent:r,startTime:i})}function Yb(){!qy()||!Et()||Oy(({metric:e})=>{if(e.value==null||G(e.value)>60)return;let t=e.entries.find(t=>t.duration===e.value&&zb[t.name]);t&&Xb(e.value,t)})}function Xb(e,t){Dv&&x.log(`Sending INP span (${e})`);let n=G(Et()+t.startTime),r=G(e),i=zb[t.name],a=Hb(t.interactionId),o=I(),s=o?F(o):void 0,c=a?.span||s,l=c?xr(c).name:k().getScopeData().transactionName;Wb({name:a?.elementName||Vy(t.target),op:`ui.interaction.${i}`,origin:`auto.http.browser.inp`,metricName:`inp`,value:e,attributes:{[Nn]:t.duration,"sentry.transaction":l},startTime:n,endTime:n+r,parentSpan:c})}var Zb=1e3,Qb,$b,ex;function tx(e){ce(`dom`,e),le(`dom`,nx)}function nx(){if(!W.document)return;let e=ue.bind(null,`dom`),t=ax(e,!0);W.document.addEventListener(`click`,t,!1),W.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=W[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(je(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=ax(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),je(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function rx(e){if(e.type!==$b)return!1;try{if(!e.target||e.target._sentryId!==ex)return!1}catch{}return!0}function ix(e,t){return e===`keypress`?t?.tagName?!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!0:!1}function ax(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=ox(n);if(ix(n.type,r))return;Me(n,`_sentryCaptured`,!0),r&&!r._sentryId&&Me(r,`_sentryId`,ft());let i=n.type===`keypress`?`input`:n.type;rx(n)||(e({event:n,name:i,global:t}),$b=n.type,ex=r?r._sentryId:void 0),clearTimeout(Qb),Qb=W.setTimeout(()=>{ex=void 0,$b=void 0},Zb)}}function ox(e){try{return e.target}catch{return null}}var sx;function cx(e){let t=`history`;ce(t,e),le(t,lx)}function lx(){if(W.addEventListener(`popstate`,()=>{let e=W.location.href,t=sx;sx=e,t!==e&&ue(`history`,{from:t,to:e})}),!Um())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=sx,i=ux(String(n));if(sx=i,r===i)return e.apply(this,t);ue(`history`,{from:r,to:i})}return e.apply(this,t)}}je(W.history,`pushState`,e),je(W.history,`replaceState`,e)}function ux(e){try{return new URL(e,W.location.origin).toString()}catch{return e}}var dx={};function fx(e){let t=dx[e];if(t)return t;let n=W[e];if(Gm(n))return dx[e]=n.bind(W);let r=W.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){Dv&&x.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(dx[e]=n.bind(W))}function px(e){dx[e]=void 0}function mx(...e){return fx(`setTimeout`)(...e)}var hx=`__sentry_xhr_v3__`;function gx(e){ce(`xhr`,e),le(`xhr`,_x)}function _x(){if(!W.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=O()*1e3,a=D(n[0])?n[0].toUpperCase():void 0,o=vx(n[1]);if(!a||!o)return e.apply(t,n);t[hx]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[hx];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}ue(`xhr`,{endTimestamp:O()*1e3,startTimestamp:i,xhr:t,virtualError:r})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[hx];return a&&D(r)&&D(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[hx];return r?(n[0]!==void 0&&(r.body=n[0]),ue(`xhr`,{startTimestamp:O()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function vx(e){if(D(e))return e;try{return e.toString()}catch{}}var yx=Symbol.for(`sentry__originalRequestBody`);function bx(e){return new URLSearchParams(e).toString()}function xx(e,t=x){try{if(typeof e==`string`)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[bx(e)];if(!e)return[void 0]}catch(n){return Dv&&t.error(n,`Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return Dv&&t.log(`Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function Sx(e=[]){if(e.length>=2&&e[1]&&typeof e[1]==`object`&&`body`in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){let t=e[0][yx];return t===void 0?void 0:t}}function Cx(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return Dv&&x.error(t,`Failed to get xhr response headers`,e),{}}return t?t.split(`\r
492
- `).reduce((e,t)=>{let[n,r]=t.split(`: `);return r&&(e[n.toLowerCase()]=r),e},{}):{}}function wx(e){if(typeof Element>`u`)return!1;try{return e instanceof Element}catch{return!1}}var Tx=40;function Ex(e,t=fx(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw px(`fetch`),e}finally{n-=a,r--}}return Os(e,i,Ss(e.bufferSize||Tx))}var K=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function Dx(){let e=A();if(!e){K&&x.warn(`No Sentry client available, profiling is not started`);return}if(!e.getIntegrationByName(`BrowserProfiling`)){K&&x.warn(`BrowserProfiling integration is not available`);return}e.emit(`startUIProfiler`)}function Ox(){let e=A();if(!e){K&&x.warn(`No Sentry client available, profiling is not started`);return}if(!e.getIntegrationByName(`BrowserProfiling`)){K&&x.warn(`ProfilingIntegration is not available`);return}e.emit(`stopUIProfiler`)}var kx={startProfiler:Dx,stopProfiler:Ox},Ax=10,jx=20,Mx=30,Nx=40,Px=50;function Fx(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var Ix=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Lx=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Rx=/\((\S*)(?::(\d+))(?::(\d+))\)/,zx=/at (.+?) ?\(data:(.+?),/,Bx=[Mx,e=>{let t=e.match(zx);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=Ix.exec(e);if(n){let[,e,t,r]=n;return Fx(e,`?`,+t,+r)}let r=Lx.exec(e);if(r){if(r[2]?.indexOf(`eval`)===0){let e=Rx.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=Qx(r[1]||`?`,r[2]);return Fx(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],Vx=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Hx=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ux=[Px,e=>{let t=Vx.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=Hx.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=Qx(n,e),Fx(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],Wx=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Gx=[Nx,e=>{let t=Wx.exec(e);return t?Fx(t[2],t[1]||`?`,+t[3],t[4]?+t[4]:void 0):void 0}],Kx=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,qx=[Ax,e=>{let t=Kx.exec(e);return t?Fx(t[2],t[3]||`?`,+t[1]):void 0}],Jx=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,Yx=[jx,e=>{let t=Jx.exec(e);return t?Fx(t[5],t[3]||t[4]||`?`,+t[1],+t[2]):void 0}],Xx=[Bx,Ux],Zx=T(...Xx),Qx=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function $x(e,{metadata:t,tunnel:n,dsn:r}){return ti({event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Zn(r)}},[eS(e)])}function eS(e){return[{type:`user_report`},e]}var tS=1024,nS=`Breadcrumbs`,rS=R(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:nS,setup(e){t.console&&pl(oS(e)),t.dom&&tx(aS(e,t.dom)),t.xhr&&gx(sS(e)),t.fetch&&Jm(cS(e)),t.history&&cx(lS(e)),t.sentry&&e.on(`beforeSendEvent`,iS(e))}}}));function iS(e){return function(t){A()===e&&Pc({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:mt(t)},{event:t})}}function aS(e,t){return function(n){if(A()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>tS&&(K&&x.warn(`\`dom.maxStringLength\` cannot exceed ${tS}, but a value of ${o} was configured. Sentry will use ${tS} instead.`),o=tS),typeof a==`string`&&(a=[a]);try{let e=n.event,t=uS(e)?e.target:e;r=Vy(t,{keyAttrs:a,maxStringLength:o}),i=ah(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),Pc(s,{event:n.event,name:n.name,global:n.global})}}function oS(e){return function(t){if(A()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:hl(t.level),message:ot(t.args,` `)};if(t.level===`assert`)if(t.args[0]===!1)n.message=`Assertion failed: ${ot(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return;Pc(n,{input:t.args,level:t.level})}}function sS(e){return function(t){if(A()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[hx];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:Vm(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),Pc(d,u)}}function cS(e){return function(t){if(A()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:t.fetchData,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),Pc(a,i)}else{let i=t.response,a={...t.fetchData,status_code:i?.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:Vm(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),Pc(s,o)}}}function lS(e){return function(t){if(A()!==e)return;let n=t.from,r=t.to,i=ya(U.location.href),a=n?ya(n):void 0,o=ya(r);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),Pc({category:`navigation`,data:{from:n,to:r}})}}function uS(e){return!!e&&!!e.target}var dS=`EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload`.split(`,`),fS=`BrowserApiErrors`,pS=R(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:fS,setupOnce(){t.setTimeout&&je(U,`setTimeout`,mS),t.setInterval&&je(U,`setInterval`,mS),t.requestAnimationFrame&&je(U,`requestAnimationFrame`,hS),t.XMLHttpRequest&&`XMLHttpRequest`in U&&je(XMLHttpRequest.prototype,`send`,gS);let e=t.eventTarget;e&&(Array.isArray(e)?e:dS).forEach(e=>_S(e,t))}}}));function mS(e){return function(...t){let n=t[0];return t[0]=Q_(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ie(e)}`}}),e.apply(this,t)}}function hS(e){return function(t){return e.apply(this,[Q_(t,{mechanism:{data:{handler:ie(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function gS(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&je(n,e,function(t){let n={mechanism:{data:{handler:ie(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Pe(t);return r&&(n.mechanism.data.handler=ie(r)),Q_(t,n)})}),e.apply(this,t)}}function _S(e,t){let n=U[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(je(n,`addEventListener`,function(n){return function(r,i,a){try{vS(i)&&(i.handleEvent=Q_(i.handleEvent,{mechanism:{data:{handler:ie(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&yS(this,r,i),n.apply(this,[r,Q_(i,{mechanism:{data:{handler:ie(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),je(n,`removeEventListener`,function(e){return function(t,n,r){try{let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch{}return e.call(this,t,n,r)}}))}function vS(e){return typeof e.handleEvent==`function`}function yS(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var bS=R((e={})=>{let t=e.lifecycle??`route`;return{name:`BrowserSession`,setupOnce(){if(U.document===void 0){K&&x.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Co({ignoreDuration:!0}),Eo();let e=un(),n=e.getUser();e.addScopeListener(e=>{let t=e.getUser();(n?.id!==t?.id||n?.ip_address!==t?.ip_address)&&(Eo(),n=t)}),t===`route`&&cx(({from:e,to:t})=>{e!==t&&(Co({ignoreDuration:!0}),Eo())})}}}),xS=`CultureContext`,SS=R((()=>({name:xS,preprocessEvent(e){let t=CS();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=CS();t&&Ea(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function CS(){try{let e=U.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var wS=`GlobalHandlers`,TS=R(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:wS,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(ES(e),jS(`onerror`)),t.onunhandledrejection&&(DS(e),jS(`onunhandledrejection`))}}}));function ES(e){fe(t=>{let{stackParser:n,attachStacktrace:r}=MS();if(A()!==e||X_())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=AS(bv(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,co(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function DS(e){he(t=>{let{stackParser:n,attachStacktrace:r}=MS();if(A()!==e||X_())return;let i=OS(t),a=we(i)?kS(i):bv(n,i,void 0,r,!0);a.level=`error`,co(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function OS(e){if(we(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}function kS(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function AS(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:NS(t)??ih(),function:`?`,in_app:!0}),e}function jS(e){K&&x.log(`Global Handler attached: ${e}`)}function MS(){return A()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function NS(e){if(!(!D(e)||e.length===0))return e.startsWith(`data:`)?`<${Sa(e,!1)}>`:e}var PS=R(()=>({name:`HttpContext`,preprocessEvent(e){if(!U.navigator&&!U.location&&!U.document)return;let t=$_(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){if(!U.navigator&&!U.location&&!U.document)return;let t=$_();Ea(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers[`User-Agent`],"http.request.header.referer":t.headers.Referer})}})),FS=`cause`,IS=5,LS=`LinkedErrors`,RS=R(((e={})=>{let t=e.limit||IS,n=e.key||FS;return{name:LS,preprocessEvent(e,r,i){Qc(cv,i.getOptions().stackParser,n,t,e,r)}}})),zS=/^HTML(\w*)Element$/;function BS(e){if(typeof window<`u`&&e===window)return`[Window]`;if(typeof document<`u`&&e===document)return`[Document]`;if(wx(e)){let t=VS(e);if(zS.test(t))return`[HTMLElement: ${Vy(e)}]`}}function VS(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function HS(){return US()?(K&&f(()=>{console.error(`[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/`)}),!0):!1}function US(){if(U.window===void 0)return!1;let e=U;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let t=ih();return!(U===U.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}function WS(e){return[Hc(),Rc(),Au(),pS(),rS(),TS(),RS(),bl(),PS(),SS(),bS()]}function GS(e={}){let t=!e.skipBrowserExtensionCheck&&HS(),n=e.defaultIntegrations==null?WS():e.defaultIntegrations,r={...e,enabled:t?!1:e.enabled,stackParser:ee(e.stackParser||Zx),integrations:Po({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Ex};return Ye(BS),oc(Tv,r)}function KS(){}function qS(e){e()}function JS(e={}){let t=U.document,n=t?.head||t?.body;if(!n){K&&x.error(`[showReportDialog] Global document not defined`);return}let r=k(),i=A()?.getDsn();if(!i){K&&x.error(`[showReportDialog] DSN not configured`);return}let a={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||_o()},o=U.document.createElement(`script`);o.async=!0,o.crossOrigin=`anonymous`,o.src=jo(i,a);let{onLoad:s,onClose:c}=a;if(s&&(o.onload=s),c){let e=t=>{if(t.data===`__sentry_reportdialog_closed__`)try{c()}finally{U.removeEventListener(`message`,e)}};U.addEventListener(`message`,e)}n.appendChild(o)}var YS=i,XS=`ReportingObserver`,ZS=new WeakMap,QS=R(((e={})=>{let t=e.types||[`crash`,`deprecation`,`intervention`];function n(e){if(ZS.has(A()))for(let t of e)fn(e=>{e.setExtra(`url`,t.url);let n=`ReportingObserver [${t.type}]`,r=`No details available`;if(t.body){let n={};for(let e in t.body)n[e]=t.body[e];if(e.setExtra(`body`,n),t.type===`crash`){let e=t.body;r=[e.crashId||``,e.reason||``].join(` `).trim()||r}else r=t.body.message||r}so(`${n}: ${r}`)})}return{name:XS,setupOnce(){qm()&&new YS.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(e){ZS.set(e,!0)}}})),$S=`HttpClient`,eC=R(((e={})=>{let t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:$S,setup(e){cC(e,t),lC(e,t)}}}));function tC(e,t,n,r,i){if(uC(e,n.status,n.url)){let e=fC(t,r),a,o,s,c,l=pC();if(l.requestHeaders!==!1&&(a=_c(iC(e.headers),l.requestHeaders)),l.responseHeaders!==!1&&(o=_c(iC(n.headers),l.responseHeaders)),l.cookies!==!1){let t=e.headers.get(`Cookie`)||void 0;if(t){let e=yc(t,l.cookies);typeof e==`object`&&(s=e)}let r=n.headers.get(`Set-Cookie`)||void 0;if(r){let e=yc(r,l.cookies);typeof e==`object`&&(c=e)}}co(dC({url:e.url,method:e.method,status:n.status,requestHeaders:a,responseHeaders:o,requestCookies:s,responseCookies:c,error:i,type:`fetch`}))}}function nC(e,t,n,r,i){if(uC(e,t.status,t.responseURL)){let e,a,o,s=pC();if(s.cookies!==!1)try{let e=t.getResponseHeader(`Set-Cookie`)||t.getResponseHeader(`set-cookie`)||void 0;if(e){let t=yc(e,s.cookies);typeof t==`object`&&(a=t)}}catch{}if(s.responseHeaders!==!1)try{o=_c(aC(t),s.responseHeaders)}catch{}s.requestHeaders!==!1&&(e=_c(r,s.requestHeaders)),co(dC({url:t.responseURL,method:n,status:t.status,requestHeaders:e,responseHeaders:o,responseCookies:a,error:i,type:`xhr`}))}}function rC(e){if(e){let t=e[`Content-Length`]||e[`content-length`];if(t)return parseInt(t,10)}}function iC(e){let t={};return e.forEach((e,n)=>{t[n]=e}),t}function aC(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
493
- `).reduce((e,t)=>{let[n,r]=t.split(`: `);return n&&r&&(e[n]=r),e},{}):{}}function oC(e,t){return e.some(e=>typeof e==`string`?t.includes(e):e.test(t))}function sC(e,t){return e.some(e=>typeof e==`number`?e===t:t>=e[0]&&t<=e[1])}function cC(e,t){Km()&&Jm(n=>{if(A()!==e)return;let{response:r,args:i,error:a,virtualError:o}=n,[s,c]=i;r&&tC(t,s,r,c,a||o)},!1)}function lC(e,t){`XMLHttpRequest`in i&&gx(n=>{if(A()!==e)return;let{error:r,virtualError:i}=n,a=n.xhr,o=a[hx];if(!o)return;let{method:s,request_headers:c}=o;try{nC(t,a,s,c,r||i)}catch(e){K&&x.warn(`Error while extracting response event form XHR response`,e)}})}function uC(e,t,n){return sC(e.failedRequestStatusCodes,t)&&oC(e.failedRequestTargets,n)&&!bc(n,A())}function dC(e){let t=A(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,i=`HTTP Client Error with status code: ${e.status}`,a={message:i,exception:{values:[{type:`Error`,value:i,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:rC(e.responseHeaders)}}};return gt(a,{type:`auto.http.client.${e.type}`,handled:!1}),a}function fC(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function pC(){let e=A();if(!e)return{cookies:!1,requestHeaders:!1,responseHeaders:!1};let t=e.getOptions();if(t.dataCollection==null){let e=!!t.sendDefaultPii;return{cookies:e,requestHeaders:e,responseHeaders:e}}let{cookies:n,httpHeaders:r}=e.getDataCollectionOptions();return{cookies:n,requestHeaders:r.request,responseHeaders:r.response}}var mC=i,hC=7,gC=`ContextLines`,_C=R(((e={})=>({name:gC,processEvent(t,n,r){return vC(t,e.frameContextLines??r?.getDataCollectionOptions().frameContextLines??hC)}})));function vC(e,t){let n=mC.document,r=mC.location&&ba(mC.location.href);if(!n||!r)return e;let i=e.exception?.values;if(!i?.length)return e;let a=n.documentElement.innerHTML;if(!a)return e;let o=[`<!DOCTYPE html>`,`<html>`,...a.split(`
494
- `),`</html>`];return i.forEach(e=>{let n=e.stacktrace;n?.frames&&(n.frames=n.frames.map(e=>yC(e,o,r,t)))}),e}function yC(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||_t(t,e,r),e}var bC=`GraphQLClient`,xC=(e=>({name:bC,setup(t){SC(t,e),CC(t,e)}}));function SC(e,t){e.on(`beforeOutgoingRequestSpan`,(e,n)=>{let r=P(e).data||{};if(r[`sentry.op`]!==`http.client`)return;let i=r[`url.full`]||r[`http.url`]||r.url,a=r[`http.request.method`]||r[`http.method`];if(!D(i)||!D(a))return;let{endpoints:o}=t,s=ct(i,o),c=TC(n);if(s&&c){let t=AC(c);if(t){let n=wC(t);e.updateName(`${a} ${i} (${n})`),OC(t)&&e.setAttribute(`graphql.document`,t.query),kC(t)&&(e.setAttribute(`graphql.persisted_query.hash.sha256`,t.extensions.persistedQuery.sha256Hash),e.setAttribute(`graphql.persisted_query.version`,t.extensions.persistedQuery.version))}}})}function CC(e,t){e.on(`beforeOutgoingRequestBreadcrumb`,(e,n)=>{let{category:r,type:i,data:a}=e;if(i===`http`&&(r===`fetch`||r===`xhr`)){let e=a?.url,{endpoints:r}=t,i=ct(e,r),o=TC(n);if(i&&a&&o){let e=AC(o);!a.graphql&&e&&(a[`graphql.operation`]=wC(e),OC(e)&&(a[`graphql.document`]=e.query),kC(e)&&(a[`graphql.persisted_query.hash.sha256`]=e.extensions.persistedQuery.sha256Hash,a[`graphql.persisted_query.version`]=e.extensions.persistedQuery.version))}}})}function wC(e){if(kC(e))return`persisted ${e.operationName}`;if(OC(e)){let{query:t,operationName:n}=e,{operationName:r=n,operationType:i}=EC(t);return r?`${i} ${r}`:`${i}`}return`unknown`}function TC(e){let t=`xhr`in e,n;if(t){let t=e.xhr[hx];n=t&&xx(t.body)[0]}else n=xx(Sx(e.input))[0];return n}function EC(e){let t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};let i=e.match(n);return i?{operationType:i[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function DC(e){return typeof e==`object`&&!!e}function OC(e){return DC(e)&&typeof e.query==`string`}function kC(e){return DC(e)&&typeof e.operationName==`string`&&DC(e.extensions)&&DC(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash==`string`&&typeof e.extensions.persistedQuery.version==`number`}function AC(e){try{let t=JSON.parse(e);return OC(t)||kC(t)?t:void 0}catch{return}}var jC=R(xC),MC=R((e={})=>{let t=[`script`];function n(r,i,a=0){if(!r)return;let o=`shadowRoot`in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(let r of o){if(!(r instanceof HTMLElement))continue;let o=ah(r,1)||void 0,s=r.tagName.toLowerCase();if(t.includes(s))continue;let c=e.onElement?.({element:r,componentName:o,tagName:s,depth:a})||{};if(c===`skip`)continue;if(c===`children`){n(r,i,a+1);continue}let{x:l,y:u,width:d,height:f}=r.getBoundingClientRect(),p={identifier:r.id||void 0,type:o||s,visible:!0,alpha:1,height:f,width:d,x:l,y:u,...c};p.children=[],n(r,p.children,a+1),i.push(p)}}return{name:`ViewHierarchy`,processEvent:(t,r)=>{if(t.type!==void 0||e.shouldAttach?.(t,r)===!1)return t;let i={rendering_system:`DOM`,positioning:`absolute`,windows:[]};n(e.rootElement?.()||U.document.body,i.windows);let a={filename:`view-hierarchy.json`,attachmentType:`event.view_hierarchy`,contentType:`application/json`,data:JSON.stringify(i)};return r.attachments=r.attachments||[],r.attachments.push(a),t}}}),q=i,NC=`sentryReplaySession`,PC=`replay_event`,FC=`Unable to send Replay`,IC=3e5,LC=9e5,RC=5e3,zC=5500,BC=6e4,VC=5e3,HC=3,UC=15e4,WC=5e3,GC=3e3,KC=300,qC=2e7,JC=4999,YC=5e4,XC=36e5,ZC=Object.defineProperty,QC=(e,t,n)=>t in e?ZC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,$C=(e,t,n)=>QC(e,typeof t==`symbol`?t:t+``,n),ew=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(ew||{});function tw(e){return e.nodeType===e.ELEMENT_NODE}function nw(e){return e?.host?.shadowRoot===e}function rw(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function iw(e){return e.includes(` background-clip: text;`)&&!e.includes(` -webkit-background-clip: text;`)&&(e=e.replace(/\sbackground-clip:\s*text;/g,` -webkit-background-clip: text; background-clip: text;`)),e}function aw(e){let{cssText:t}=e;if(t.split(`"`).length<3)return t;let n=[`@import`,`url(${JSON.stringify(e.href)})`];return e.layerName===``?n.push(`layer`):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(` `)+`;`}function ow(e){try{let t=e.rules||e.cssRules;return t?iw(Array.from(t,cw).join(``)):null}catch{return null}}function sw(e){let t=``;for(let n=0;n<e.style.length;n++){let r=e.style,i=r[n],a=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${a?` !important`:``};`}return`${e.selectorText} { ${t} }`}function cw(e){let t;if(uw(e))try{t=ow(e.styleSheet)||aw(e)}catch{}else if(dw(e)){let t=e.cssText,n=e.selectorText.includes(`:`),r=typeof e.style.all==`string`&&e.style.all;if(r&&(t=sw(e)),n&&(t=lw(t)),n||r)return t}return t||e.cssText}function lw(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function uw(e){return`styleSheet`in e}function dw(e){return`selectorText`in e}var fw=class{constructor(){$C(this,`idNodeMap`,new Map),$C(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function pw(){return new fw}function mw({maskInputOptions:e,tagName:t,type:n}){return t===`OPTION`&&(t=`SELECT`),!!(e[t.toLowerCase()]||n&&e[n]||n===`password`||t===`INPUT`&&!n&&e.text)}function hw({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||``;return e?(r&&(i=r(i,t)),`*`.repeat(i.length)):i}function gw(e){return e.toLowerCase()}function _w(e){return e.toUpperCase()}var vw=`__rrweb_original__`;function yw(e){let t=e.getContext(`2d`);if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData,a=vw in i?i[vw]:i;if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>e!==0))return!1}return!0}function bw(e){let t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?gw(t):null}function xw(e,t,n){return t===`INPUT`&&(n===`radio`||n===`checkbox`)?e.getAttribute(`value`)||``:e.value}function Sw(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}return n.pathname.match(/\.([0-9a-z]+)(?:$)/i)?.[1]??null}var Cw={};function ww(e){let t=Cw[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return Cw[e]=r.bind(window)}function Tw(...e){return ww(`setTimeout`)(...e)}function Ew(...e){return ww(`clearTimeout`)(...e)}function Dw(e){try{return e.contentDocument}catch{}}function Ow(e){try{return e.contentWindow}catch{}}var kw=1,Aw=RegExp(`[^a-z0-9-_:]`),jw=-2;function Mw(){return kw++}function Nw(e){if(e instanceof HTMLFormElement)return`form`;let t=gw(e.tagName);return Aw.test(t)?`div`:t}function Pw(e){let t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}var Fw,Iw,Lw=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Rw=/^(?:[a-z+]+:)?\/\//i,zw=/^www\..*/i,Bw=/^(data:)([^,]*),(.*)/i;function Vw(e,t){if(!e||t.size===0)return e;try{let n=e.split(`;`),r=[];for(let e of n){if(e=e.trim(),!e)continue;let n=e.indexOf(`:`);if(n===-1){r.push(e);continue}let i=e.slice(0,n).trim();t.has(i)||r.push(e)}return r.join(`; `)+(r.length>0&&e.endsWith(`;`)?`;`:``)}catch(t){return console.warn(`Error filtering CSS properties:`,t),e}}function Hw(e,t){return(e||``).replace(Lw,(e,n,r,i,a,o)=>{let s=r||a||o,c=n||i||``;if(!s)return e;if(Rw.test(s)||zw.test(s)||Bw.test(s))return`url(${c}${s}${c})`;if(s[0]===`/`)return`url(${c}${Pw(t)+s}${c})`;let l=t.split(`/`),u=s.split(`/`);l.pop();for(let e of u)if(e===`.`)continue;else e===`..`?l.pop():l.push(e);return`url(${c}${l.join(`/`)}${c})`})}var Uw=/^[^ \t\n\r\u000c]+/,Ww=/^[, \t\n\r\u000c]+/;function Gw(e,t){if(t.trim()===``)return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}let i=[];for(;r(Ww),!(n>=t.length);){let a=r(Uw);if(a.slice(-1)===`,`)a=qw(e,a.substring(0,a.length-1)),i.push(a);else{let r=``;a=qw(e,a);let o=!1;for(;;){let e=t.charAt(n);if(e===``){i.push((a+r).trim());break}else if(o)e===`)`&&(o=!1);else if(e===`,`){n+=1,i.push((a+r).trim());break}else e===`(`&&(o=!0);r+=e,n+=1}}}return i.join(`, `)}var Kw=new WeakMap;function qw(e,t){return!t||t.trim()===``?t:Yw(e,t)}function Jw(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function Yw(e,t){let n=Kw.get(e);if(n||(n=e.createElement(`a`),Kw.set(e,n)),!t)t=``;else if(t.startsWith(`blob:`)||t.startsWith(`data:`))return t;return n.setAttribute(`href`,t),n.href}function Xw(e,t,n,r,i,a,o){if(!r)return r;if(n===`src`||n===`href`&&!(t===`use`&&r[0]===`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&(t===`table`||t===`td`||t===`th`))return qw(e,r);if(n===`srcset`)return Gw(e,r);if(n===`style`){let t=Hw(r,Yw(e));return o&&o.size>0&&(t=Vw(t,o)),t}else if(t===`object`&&n===`data`)return qw(e,r);return typeof a==`function`?a(n,r,i):r}function Zw(e,t,n){return(e===`video`||e===`audio`)&&t===`autoplay`}function Qw(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t==`string`){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function $w(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function eT(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:eT(e.parentNode,t,n,r+1)}function tT(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if($w(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function nT(e,t,n,r,i,a){try{let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName===`INPUT`){let e=o.getAttribute(`autocomplete`);if([`current-password`,`new-password`,`cc-number`,`cc-exp`,`cc-exp-month`,`cc-exp-year`,`cc-csc`].includes(e))return!0}let s=-1,c=-1;if(a){if(c=eT(o,tT(r,i)),c<0)return!0;s=eT(o,tT(t,n),c>=0?c:1/0)}else{if(s=eT(o,tT(t,n)),s<0)return!1;c=eT(o,tT(r,i),s>=0?s:1/0)}return s>=0?c>=0?s<=c:!0:c>=0?!1:!!a}catch{}return!!a}function rT(e,t,n){let r=Ow(e);if(!r)return;let i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){let r=Tw(()=>{i||=(t(),!0)},n);e.addEventListener(`load`,()=>{Ew(r),i=!0,t()});return}let o=`about:blank`;if(r.location.href!==o||e.src===o||e.src===``)return Tw(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}function iT(e,t,n){let r=!1,i;try{i=e.sheet}catch{i=null}if(i)return;let a=Tw(()=>{r||=(t(),!0)},n);e.addEventListener(`load`,()=>{Ew(a),r=!0,t()})}function aT(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:h,maskInputFn:g,dataURLOptions:_={},inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x=!1,ignoreCSSAttributes:S}=t,C=oT(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:ew.Document,childNodes:[]}:{type:ew.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:ew.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return cT(e,{doc:n,blockClass:i,blockSelector:a,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:_,inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x,rootId:C,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,ignoreCSSAttributes:S});case e.TEXT_NODE:return sT(e,{doc:n,maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:h,maskInputOptions:m,maskInputFn:g,rootId:C});case e.CDATA_SECTION_NODE:return{type:ew.CDATA,textContent:``,rootId:C};case e.COMMENT_NODE:return{type:ew.Comment,textContent:e.textContent||``,rootId:C};default:return!1}}function oT(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function sT(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:a,unmaskTextSelector:o,maskTextFn:s,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName,f=e.textContent,p=d===`STYLE`?!0:void 0,m=d===`SCRIPT`?!0:void 0,h=d===`TEXTAREA`?!0:void 0;if(p&&f){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(f=ow(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}f=Hw(f,Yw(t.doc))}m&&(f=`SCRIPT_PLACEHOLDER`);let g=nT(e,r,a,i,o,n);return!p&&!m&&!h&&f&&g&&(f=s?s(f,e.parentElement):f.replace(/[\S]/g,`*`)),h&&f&&(c.textarea||g)&&(f=l?l(f,e.parentNode):f.replace(/[\S]/g,`*`)),d===`OPTION`&&f&&(f=hw({isMasked:nT(e,r,a,i,o,mw({type:null,tagName:d,maskInputOptions:c})),element:e,value:f,maskInputFn:l})),{type:ew.Text,textContent:f||``,isStyle:p,rootId:u}}function cT(e,t){let{doc:n,blockClass:r,blockSelector:i,unblockSelector:a,inlineStylesheet:o,maskInputOptions:s={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:h,maskTextClass:g,unmaskTextClass:_,maskTextSelector:v,unmaskTextSelector:y,ignoreCSSAttributes:b}=t,x=Qw(e,r,i,a),S=Nw(e),C={},w=e.attributes.length;for(let t=0;t<w;t++){let r=e.attributes[t];r.name&&!Zw(S,r.name,r.value)&&(C[r.name]=Xw(n,S,gw(r.name),r.value,e,c,b))}if(S===`link`&&o){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=ow(t)),r&&(C.rel=null,C.href=null,C.crossorigin=null,C._cssText=Hw(r,t.href))}if(S===`style`&&e.sheet&&!(e.innerText||e.textContent||``).trim().length){let t=ow(e.sheet);t&&(C._cssText=Hw(t,Yw(n)))}if(S===`input`||S===`textarea`||S===`select`||S===`option`){let t=e,n=bw(t),r=xw(t,_w(S),n),i=t.checked;if(n!==`submit`&&n!==`button`&&r){let e=nT(t,g,v,_,y,mw({type:n,tagName:_w(S),maskInputOptions:s}));C.value=hw({isMasked:e,element:t,value:r,maskInputFn:l})}i&&(C.checked=i)}if(S===`option`&&(e.selected&&!s.select?C.selected=!0:delete C.selected),S===`canvas`&&f){if(e.__context===`2d`)yw(e)||(C.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!(`__context`in e)){let t=e.toDataURL(u.type,u.quality),r=n.createElement(`canvas`);r.width=e.width,r.height=e.height,t!==r.toDataURL(u.type,u.quality)&&(C.rr_dataURL=t)}}if(S===`img`&&d){Fw||(Fw=n.createElement(`canvas`),Iw=Fw.getContext(`2d`));let t=e,r=t.currentSrc||t.getAttribute(`src`)||`<unknown-src>`,i=t.crossOrigin,a=()=>{t.removeEventListener(`load`,a);try{Fw.width=t.naturalWidth,Fw.height=t.naturalHeight,Iw.drawImage(t,0,0),C.rr_dataURL=Fw.toDataURL(u.type,u.quality)}catch(e){if(t.crossOrigin!==`anonymous`){t.crossOrigin=`anonymous`,t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a);return}else console.warn(`Cannot inline img src=${r}! Error: ${e}`)}t.crossOrigin===`anonymous`&&(i?C.crossOrigin=i:t.removeAttribute(`crossorigin`))};t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a)}if((S===`audio`||S===`video`)&&(C.rr_mediaState=e.paused?`paused`:`played`,C.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),x){let{width:t,height:n}=e.getBoundingClientRect();C={class:C.class,rr_width:`${t}px`,rr_height:`${n}px`}}S===`iframe`&&!p(C.src)&&(!x&&!Dw(e)&&(C.rr_src=C.src),delete C.src);let T;try{customElements.get(S)&&(T=!0)}catch{}return{type:ew.Element,tagName:S,attributes:C,childNodes:[],isSVG:Jw(e)||void 0,needBlock:x,rootId:h,isCustom:T}}function J(e){return e==null?``:e.toLowerCase()}function lT(e,t){return!!(t.comment&&e.type===ew.Comment||e.type===ew.Element&&(t.script&&(e.tagName===`script`||e.tagName===`link`&&(e.attributes.rel===`preload`||e.attributes.rel===`modulepreload`)||e.tagName===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&Sw(e.attributes.href)===`js`)||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(J(e.attributes.name).match(/^msapplication-tile(image|color)$/)||J(e.attributes.name)===`application-name`||J(e.attributes.rel)===`icon`||J(e.attributes.rel)===`apple-touch-icon`||J(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&J(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(J(e.attributes.property).match(/^(og|twitter|fb):/)||J(e.attributes.name).match(/^(og|twitter):/)||J(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(J(e.attributes.name)===`robots`||J(e.attributes.name)===`googlebot`||J(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(J(e.attributes.name)===`author`||J(e.attributes.name)===`generator`||J(e.attributes.name)===`framework`||J(e.attributes.name)===`publisher`||J(e.attributes.name)===`progid`||J(e.attributes.property).match(/^article:/)||J(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(J(e.attributes.name)===`google-site-verification`||J(e.attributes.name)===`yandex-verification`||J(e.attributes.name)===`csrf-token`||J(e.attributes.name)===`p:domain_verify`||J(e.attributes.name)===`verify-v1`||J(e.attributes.name)===`verification`||J(e.attributes.name)===`shopify-checkout-api-token`))))}function uT(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y={},inlineImages:b=!1,recordCanvas:x=!1,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w=5e3,onBlockedImageLoad:T,onStylesheetLoad:ee,stylesheetLoadTimeout:te=5e3,keepIframeSrcFn:ne=()=>!1,newlyAddedElement:re=!1,ignoreCSSAttributes:ie}=t,{preserveWhiteSpace:ae=!0}=t,oe=aT(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,dataURLOptions:y,inlineImages:b,recordCanvas:x,keepIframeSrcFn:ne,newlyAddedElement:re,ignoreCSSAttributes:ie});if(!oe)return console.warn(e,`not serialized`),null;let se;se=r.hasNode(e)?r.getId(e):lT(oe,v)||!ae&&oe.type===ew.Text&&!oe.isStyle&&!oe.textContent.trim().length?jw:Mw();let E=Object.assign(oe,{id:se});if(r.add(e,E),se===jw)return null;S&&S(e);let ce=!f;if(E.type===ew.Element){ce&&=!E.needBlock;let t=e.shadowRoot;t&&rw(t)&&(E.isShadowHost=!0)}if((E.type===ew.Document||E.type===ew.Element)&&ce){v.headWhitespace&&E.type===ew.Element&&E.tagName===`head`&&(ae=!1);let t={doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:ae,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onBlockedImageLoad:T,onStylesheetLoad:ee,stylesheetLoadTimeout:te,keepIframeSrcFn:ne,ignoreCSSAttributes:ie},re=e.childNodes?Array.from(e.childNodes):[];for(let e of re){let n=uT(e,t);n&&E.childNodes.push(n)}if(tw(e)&&e.shadowRoot)for(let n of Array.from(e.shadowRoot.childNodes)){let r=uT(n,t);r&&(rw(e.shadowRoot)&&(r.isShadow=!0),E.childNodes.push(r))}}if(e.parentNode&&nw(e.parentNode)&&rw(e.parentNode)&&(E.isShadow=!0),E.type===ew.Element&&E.tagName===`iframe`&&!E.needBlock&&rT(e,()=>{let t=Dw(e);if(t&&C){let n=uT(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:ae,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:ee,stylesheetLoadTimeout:te,keepIframeSrcFn:ne,ignoreCSSAttributes:ie});n&&C(e,n)}},w),E.type===ew.Element&&E.tagName===`img`&&!e.complete&&E.needBlock){let t=e,n=()=>{if(t.isConnected&&!t.complete&&T)try{let e=t.getBoundingClientRect();e.width>0&&e.height>0&&T(t,E,e)}catch{}t.removeEventListener(`load`,n)};t.isConnected&&t.addEventListener(`load`,n)}return E.type===ew.Element&&E.tagName===`link`&&typeof E.attributes.rel==`string`&&(E.attributes.rel===`stylesheet`||E.attributes.rel===`preload`&&typeof E.attributes.href==`string`&&Sw(E.attributes.href)===`css`)&&iT(e,()=>{if(ee){let t=uT(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:ae,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:ee,stylesheetLoadTimeout:te,keepIframeSrcFn:ne,ignoreCSSAttributes:ie});t&&ee(e,t)}},te),E.type===ew.Element&&delete E.needBlock,E}function dT(e,t){let{mirror:n=new fw,blockClass:r=`rr-block`,blockSelector:i=null,unblockSelector:a=null,maskAllText:o=!1,maskTextClass:s=`rr-mask`,unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOM:v=!1,dataURLOptions:y,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:T,stylesheetLoadTimeout:ee,keepIframeSrcFn:te=()=>!1,ignoreCSSAttributes:ne=new Set([])}=t||{};return uT(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,maskAllText:o,maskTextClass:s,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v===!0||v===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v===`all`,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:y,inlineImages:f,recordCanvas:p,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:T,stylesheetLoadTimeout:ee,keepIframeSrcFn:te,newlyAddedElement:!1,ignoreCSSAttributes:ne})}function fT(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var pT=`Please stop import mirror directly. Instead of that,\r
495
- now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
496
- or you can use record.mirror to access the mirror instance during recording.`,mT={map:{},getId(){return console.error(pT),-1},getNode(){return console.error(pT),null},removeNodeFromMap(){console.error(pT)},has(){return console.error(pT),!1},reset(){console.error(pT)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(mT=new Proxy(mT,{get(e,t,n){return t===`map`&&console.error(pT),Reflect.get(e,t,n)}}));function hT(e,t,n={}){let r=null,i=0;return function(...a){let o=Date.now();!i&&n.leading===!1&&(i=o);let s=t-(o-i),c=this;s<=0||s>t?(r&&=(VT(r),null),i=o,e.apply(c,a)):!r&&n.trailing!==!1&&(r=BT(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,a)},s))}}function gT(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){BT(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>gT(e,t,a||{},!0)}function _T(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var vT=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(vT=()=>new Date().getTime());function yT(e){let t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset===void 0?t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0:e.pageXOffset,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset===void 0?t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0:e.pageYOffset}}function bT(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function xT(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function ST(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function CT(e,t,n,r,i){if(!e)return!1;let a=ST(e);if(!a)return!1;let o=tT(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=eT(a,o),c=-1;return s<0?!1:(r&&(c=eT(a,tT(null,r))),s>-1&&c<0?!0:s<c)}function wT(e,t){return t.getId(e)!==-1}function TT(e,t){return t.getId(e)===jw}function ET(e,t){if(nw(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?ET(e.parentNode,t):!0:!0}function DT(e){return!!e.changedTouches}function OT(e=window){`NodeList`in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),`DOMTokenList`in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError(`1 argument is required`);do if(this===t)return!0;while(t&&=t.parentNode);return!1})}function kT(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function AT(e,t){return!!(e.nodeName===`LINK`&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute(`rel`)===`stylesheet`&&t.getMeta(e))}function jT(e){return!!e?.shadowRoot}var MT=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=t===void 0?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function NT(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function PT(e){let t=e,n;for(;n=NT(t);)t=n;return t}function FT(e){let t=e.ownerDocument;if(!t)return!1;let n=PT(e);return t.contains(n)}function IT(e){let t=e.ownerDocument;return t?t.contains(e)||FT(e):!1}var LT={};function RT(e){let t=LT[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return LT[e]=r.bind(window)}function zT(...e){return RT(`requestAnimationFrame`)(...e)}function BT(...e){return RT(`setTimeout`)(...e)}function VT(...e){return RT(`clearTimeout`)(...e)}var Y=(e=>(e[e.DomContentLoaded=0]=`DomContentLoaded`,e[e.Load=1]=`Load`,e[e.FullSnapshot=2]=`FullSnapshot`,e[e.IncrementalSnapshot=3]=`IncrementalSnapshot`,e[e.Meta=4]=`Meta`,e[e.Custom=5]=`Custom`,e[e.Plugin=6]=`Plugin`,e))(Y||{}),X=(e=>(e[e.Mutation=0]=`Mutation`,e[e.MouseMove=1]=`MouseMove`,e[e.MouseInteraction=2]=`MouseInteraction`,e[e.Scroll=3]=`Scroll`,e[e.ViewportResize=4]=`ViewportResize`,e[e.Input=5]=`Input`,e[e.TouchMove=6]=`TouchMove`,e[e.MediaInteraction=7]=`MediaInteraction`,e[e.StyleSheetRule=8]=`StyleSheetRule`,e[e.CanvasMutation=9]=`CanvasMutation`,e[e.Font=10]=`Font`,e[e.Log=11]=`Log`,e[e.Drag=12]=`Drag`,e[e.StyleDeclaration=13]=`StyleDeclaration`,e[e.Selection=14]=`Selection`,e[e.AdoptedStyleSheet=15]=`AdoptedStyleSheet`,e[e.CustomElement=16]=`CustomElement`,e))(X||{}),HT=(e=>(e[e.MouseUp=0]=`MouseUp`,e[e.MouseDown=1]=`MouseDown`,e[e.Click=2]=`Click`,e[e.ContextMenu=3]=`ContextMenu`,e[e.DblClick=4]=`DblClick`,e[e.Focus=5]=`Focus`,e[e.Blur=6]=`Blur`,e[e.TouchStart=7]=`TouchStart`,e[e.TouchMove_Departed=8]=`TouchMove_Departed`,e[e.TouchEnd=9]=`TouchEnd`,e[e.TouchCancel=10]=`TouchCancel`,e))(HT||{}),UT=(e=>(e[e.Mouse=0]=`Mouse`,e[e.Pen=1]=`Pen`,e[e.Touch=2]=`Touch`,e))(UT||{}),WT=(e=>(e[e.Play=0]=`Play`,e[e.Pause=1]=`Pause`,e[e.Seeked=2]=`Seeked`,e[e.VolumeChange=3]=`VolumeChange`,e[e.RateChange=4]=`RateChange`,e))(WT||{}),GT;function KT(e){GT=e}function qT(){GT=void 0}for(var Z=e=>GT?((...t)=>{try{return e(...t)}catch(e){if(GT&&GT(e)===!0)return()=>{};throw e}}):e,JT=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,YT=typeof Uint8Array>`u`?[]:new Uint8Array(256),XT=0;XT<JT.length;XT++)YT[JT.charCodeAt(XT)]=XT;var ZT=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}};function QT(e){try{return e.contentDocument}catch{}}function $T(e){try{return e.contentWindow}catch{}}var eE=class{constructor(e){this.doc=e,this.unattachedDoc=null}parse(e){return this.parseWithConstructableStylesheet(e)||this.parseWithDetachedElement(e)}parseWithConstructableStylesheet(e){if(typeof CSSStyleSheet>`u`||typeof CSSStyleSheet.prototype.replaceSync!=`function`)return null;try{let t=new CSSStyleSheet;t.replaceSync(`x { ${e} }`);let n=t.cssRules[0];return!n||n.type!==CSSRule.STYLE_RULE?null:n.style}catch{return null}}parseWithDetachedElement(e){let t=this.getUnattachedDoc().createElement(`span`);return t.setAttribute(`style`,e),t.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}};function tE(e){return`__ln`in e}var nE=class{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error(`Position outside of list range`);let t=this.head;for(let n=0;n<e;n++)t=t?.next||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&tE(e.previousSibling)){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&tE(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},rE=(e,t)=>`${e}@${t}`,iE=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new nE,r=e=>{let t=e,n=jw;for(;n===jw;)t&&=t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!IT(i))return;let a=nw(i.parentNode)?this.mirror.getId(NT(i)):this.mirror.getId(i.parentNode),o=r(i);if(a===-1||o===-1)return n.addNode(i);let s=uT(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{kT(e,this.mirror)&&!CT(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),AT(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),jT(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{if(CT(e,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(e,t);let n=$T(e);n&&this.canvasManager.addWindow(n),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});s&&(e.push({parentId:a,nextId:o,node:s}),t.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(let e of this.movedSet)oE(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||i(e);for(let e of this.addedSet)!cE(this.droppedSet,e)&&!oE(this.removes,e,this.mirror)||cE(this.movedSet,e)?i(e):this.droppedSet.add(e);let a=null;for(;n.length;){let e=null;if(a){let t=this.mirror.getId(a.value.parentNode),n=r(a.value);t!==-1&&n!==-1&&(e=a)}if(!e){let t=n.tail;for(;t;){let n=t;if(t=t.previous,n){let t=this.mirror.getId(n.value.parentNode);if(r(n.value)===-1)continue;if(t!==-1){e=n;break}else{let t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=t.parentNode.host;if(this.mirror.getId(r)!==-1){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}a=e.previous,n.removeNode(e.value),i(e.value)}let o={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if(typeof t.style==`string`){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split(`var(`).length===t.style.split(`var(`).length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};!o.texts.length&&!o.attributes.length&&!o.removes.length&&!o.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.processMutation=e=>{if(!TT(e.target,this.mirror))switch(e.type){case`characterData`:{let t=e.target.textContent;!CT(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:nT(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,ST(e.target)):t.replace(/[\S]/g,`*`):t,node:e.target});break}case`attributes`:{let t=e.target,n=e.attributeName,r=e.target.getAttribute(n);if(n===`value`){let n=bw(t),i=t.tagName;r=xw(t,i,n);let a=mw({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=hw({isMasked:nT(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a),element:t,value:r,maskInputFn:this.maskInputFn})}if(CT(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);if(t.tagName===`IFRAME`&&n===`src`&&!this.keepIframeSrcFn(r))if(!QT(t))n=`rr_src`;else return;if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),n===`type`&&t.tagName===`INPUT`&&(e.oldValue||``).toLowerCase()===`password`&&t.setAttribute(`data-rr-is-password`,`true`),!Zw(t.tagName,n)&&(i.attributes[n]=Xw(this.doc,gw(t.tagName),gw(n),r,t,this.maskAttributeFn),n===`style`)){let n=e.oldValue?this.styleDeclarationParser.parse(e.oldValue):null;for(let e of Array.from(t.style)){let r=t.style.getPropertyValue(e),a=t.style.getPropertyPriority(e);r!==(n?.getPropertyValue(e)||``)||a!==(n?.getPropertyPriority(e)||``)?a===``?i.styleDiff[e]=r:i.styleDiff[e]=[r,a]:i._unchangedStyles[e]=[r,a]}if(n)for(let e of Array.from(n))t.style.getPropertyValue(e)===``&&(i.styleDiff[e]=!1)}break}case`childList`:if(CT(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=nw(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);CT(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||TT(t,this.mirror)||!wT(t,this.mirror)||(this.addedSet.has(t)?(aE(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||ET(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[rE(n,r)]?aE(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:nw(e.target)&&rw(e.target)?!0:void 0})),this.mapRemoves.push(t))});break}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(TT(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[rE(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);CT(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),jT(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){`mutationCb.blockClass.blockSelector.unblockSelector.maskAllText.maskTextClass.unmaskTextClass.maskTextSelector.unmaskTextSelector.inlineStylesheet.maskInputOptions.maskAttributeFn.maskTextFn.maskInputFn.keepIframeSrcFn.recordCanvas.inlineImages.slimDOMOptions.dataURLOptions.doc.mirror.iframeManager.stylesheetManager.shadowDomManager.canvasManager.processedNodeManager.ignoreCSSAttributes`.split(`.`).forEach(t=>{this[t]=e[t]}),this.styleDeclarationParser=new eE(this.doc)}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}};function aE(e,t){e.delete(t),t.childNodes?.forEach(t=>aE(e,t))}function oE(e,t,n){return e.length===0?!1:sE(e,t,n)}function sE(e,t,n){let r=t.parentNode;for(;r;){let t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}function cE(e,t){return e.size===0?!1:lE(e,t)}function lE(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:lE(e,n):!1}var uE=[];function dE(e){try{if(`composedPath`in e){let t=e.composedPath();if(t.length)return t[0]}else if(`path`in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function fE(e,t){let n=new iE;uE.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver,i=window?.Zone?.__symbol__?.(`MutationObserver`);i&&window[i]&&(r=window[i]);let a=new r(Z(t=>{e.onMutation&&e.onMutation(t)===!1||n.processMutations.bind(n)(t)}));return a.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),a}function pE({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove==`number`?t.mousemove:50,a=typeof t.mousemoveCallback==`number`?t.mousemoveCallback:500,o=[],s,c=hT(Z(t=>{let n=Date.now()-s;e(o.map(e=>(e.timeOffset-=n,e)),t),o=[],s=null}),a),l=Z(hT(Z(e=>{let t=dE(e),{clientX:n,clientY:i}=DT(e)?e.changedTouches[0]:e;s||=vT(),o.push({x:n,y:i,id:r.getId(t),timeOffset:vT()-s}),c(typeof DragEvent<`u`&&e instanceof DragEvent?X.Drag:e instanceof MouseEvent?X.MouseMove:X.TouchMove)}),i,{trailing:!1})),u=[fT(`mousemove`,l,n),fT(`touchmove`,l,n),fT(`drag`,l,n)];return Z(()=>{u.forEach(e=>e())})}function mE({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],l=null,u=t=>o=>{let s=dE(o);if(CT(s,r,i,a,!0))return;let c=null,u=t;if(`pointerType`in o){switch(o.pointerType){case`mouse`:c=UT.Mouse;break;case`touch`:c=UT.Touch;break;case`pen`:c=UT.Pen;break}c===UT.Touch?HT[t]===HT.MouseDown?u=`TouchStart`:HT[t]===HT.MouseUp&&(u=`TouchEnd`):UT.Pen}else DT(o)&&(c=UT.Touch);c===null?HT[t]===HT.Click&&(c=l,l=null):(l=c,(u.startsWith(`Touch`)&&c===UT.Touch||u.startsWith(`Mouse`)&&c===UT.Mouse)&&(c=null));let d=DT(o)?o.changedTouches[0]:o;if(!d)return;let f=n.getId(s),{clientX:p,clientY:m}=d;Z(e)({type:HT[u],id:f,x:p,y:m,...c!==null&&{pointerType:c}})};return Object.keys(HT).filter(e=>Number.isNaN(Number(e))&&!e.endsWith(`_Departed`)&&s[e]!==!1).forEach(e=>{let n=gw(e),r=u(e);if(window.PointerEvent)switch(HT[e]){case HT.MouseDown:case HT.MouseUp:n=n.replace(`mouse`,`pointer`);break;case HT.TouchStart:case HT.TouchEnd:return}c.push(fT(n,r,t))}),Z(()=>{c.forEach(e=>e())})}function hE({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){return fT(`scroll`,Z(hT(Z(o=>{let s=dE(o);if(!s||CT(s,r,i,a,!0))return;let c=n.getId(s);if(s===t&&t.defaultView){let n=yT(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100)),t)}function gE({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return fT(`resize`,Z(hT(Z(()=>{let t=bT(),i=xT();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}var _E=[`INPUT`,`TEXTAREA`,`SELECT`],vE=new WeakMap;function yE({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,ignoreClass:o,ignoreSelector:s,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:h}){function g(e){let n=dE(e),u=e.isTrusted,g=n&&_w(n.tagName);if(g===`OPTION`&&(n=n.parentElement),!n||!g||_E.indexOf(g)<0||CT(n,r,i,a,!0))return;let v=n;if(v.classList.contains(o)||s&&v.matches(s))return;let y=bw(n),b=xw(v,g,y),x=!1,S=mw({maskInputOptions:c,tagName:g,type:y}),C=nT(n,f,m,p,h,S);(y===`radio`||y===`checkbox`)&&(x=n.checked),b=hw({isMasked:C,element:n,value:b,maskInputFn:l}),_(n,d?{text:b,isChecked:x,userTriggered:u}:{text:b,isChecked:x});let w=n.name;y===`radio`&&w&&x&&t.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach(e=>{if(e!==n){let t=hw({isMasked:C,element:e,value:xw(e,g,y),maskInputFn:l});_(e,d?{text:t,isChecked:!x,userTriggered:!1}:{text:t,isChecked:!x})}})}function _(t,r){let i=vE.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){vE.set(t,r);let i=n.getId(t);Z(e)({...r,id:i})}}let v=(u.input===`last`?[`change`]:[`input`,`change`]).map(e=>fT(e,Z(g),t)),y=t.defaultView;if(!y)return()=>{v.forEach(e=>e())};let b=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,`value`),x=[[y.HTMLInputElement.prototype,`value`],[y.HTMLInputElement.prototype,`checked`],[y.HTMLSelectElement.prototype,`value`],[y.HTMLTextAreaElement.prototype,`value`],[y.HTMLSelectElement.prototype,`selectedIndex`],[y.HTMLOptionElement.prototype,`selected`]];return b&&b.set&&v.push(...x.map(e=>gT(e[0],e[1],{set(){Z(g)({target:this,isTrusted:!1})}},!1,y))),Z(()=>{v.forEach(e=>e())})}function bE(e){let t=[];function n(e,t){if(AE(`CSSGroupingRule`)&&e.parentRule instanceof CSSGroupingRule||AE(`CSSMediaRule`)&&e.parentRule instanceof CSSMediaRule||AE(`CSSSupportsRule`)&&e.parentRule instanceof CSSSupportsRule||AE(`CSSConditionRule`)&&e.parentRule instanceof CSSConditionRule){let n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){let n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}return n(e,t)}function xE(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function SE({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Z((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=xE(i,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:s}]}),r.apply(i,a)})});let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=xE(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:o}]}),r.apply(i,a)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=xE(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replace:o}),r.apply(i,a)})}));let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=xE(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replaceSync:o}),r.apply(i,a)})}));let c={};jE(`CSSGroupingRule`)?c.CSSGroupingRule=r.CSSGroupingRule:(jE(`CSSMediaRule`)&&(c.CSSMediaRule=r.CSSMediaRule),jE(`CSSConditionRule`)&&(c.CSSConditionRule=r.CSSConditionRule),jE(`CSSSupportsRule`)&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([r,i])=>{l[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(l[r].insertRule,{apply:Z((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=xE(i.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:[...bE(i),s||0]}]}),r.apply(i,a)})}),i.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=xE(i.parentStyleSheet,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:[...bE(i),o]}]}),r.apply(i,a)})})}),Z(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=a,o&&(r.CSSStyleSheet.prototype.replace=o),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}function CE({mirror:e,stylesheetManager:t},n){let r=null;r=n.nodeName===`#document`?e.getId(n):e.getId(n.host);let i=n.nodeName===`#document`?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,a=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,`adoptedStyleSheets`):void 0;return r===null||r===-1||!i||!a?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get(){return a.get?.call(this)},set(e){let n=a.set?.call(this,e);if(r!==null&&r!==-1)try{t.adoptStyleSheets(e,r)}catch{}return n}}),Z(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:a.configurable,enumerable:a.enumerable,get:a.get,set:a.set})}))}function wE({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Z((i,o,s)=>{let[c,l,u]=s;if(n.has(c))return a.apply(o,[c,l,u]);let{id:d,styleId:f}=xE(o.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||f&&f!==-1)&&e({id:d,styleId:f,set:{property:c,value:l,priority:u},index:bE(o.parentRule)}),i.apply(o,s)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Z((i,a,s)=>{let[c]=s;if(n.has(c))return o.apply(a,[c]);let{id:l,styleId:u}=xE(a.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||u&&u!==-1)&&e({id:l,styleId:u,remove:{property:c},index:bE(a.parentRule)}),i.apply(a,s)})}),Z(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function TE({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:a,doc:o}){let s=Z(o=>hT(Z(a=>{let s=dE(a);if(!s||CT(s,t,n,r,!0))return;let{currentTime:c,volume:l,muted:u,playbackRate:d}=s;e({type:o,id:i.getId(s),currentTime:c,volume:l,muted:u,playbackRate:d})}),a.media||500)),c=[fT(`play`,s(WT.Play),o),fT(`pause`,s(WT.Pause),o),fT(`seeked`,s(WT.Seeked),o),fT(`volumechange`,s(WT.VolumeChange),o),fT(`ratechange`,s(WT.RateChange),o)];return Z(()=>{c.forEach(e=>e())})}function EE({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,n){let r=new a(e,t,n);return i.set(r,{family:e,buffer:typeof t!=`string`,descriptors:n,fontSource:typeof t==`string`?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=_T(t.fonts,`add`,function(t){return function(n){return BT(Z(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=a}),r.push(o),Z(()=>{r.forEach(e=>e())})}function DE(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,selectionCb:o}=e,s=!0,c=Z(()=>{let e=t.getSelection();if(!e||s&&e?.isCollapsed)return;s=e.isCollapsed||!1;let c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let{startContainer:o,startOffset:s,endContainer:l,endOffset:u}=e.getRangeAt(t);CT(o,r,i,a,!0)||CT(l,r,i,a,!0)||c.push({start:n.getId(o),startOffset:s,end:n.getId(l),endOffset:u})}o({ranges:c})});return c(),fT(`selectionchange`,c)}function OE({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:_T(n.customElements,`define`,function(e){return function(n,r,i){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,i])}})}function kE(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=fE(e,e.doc));let i=pE(e),a=mE(e),o=hE(e),s=gE(e,{win:n}),c=yE(e),l=TE(e),u=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(u=SE(e,{win:n}),d=CE(e,e.doc),f=wE(e,{win:n}),e.collectFonts&&(p=EE(e)));let m=DE(e),h=OE(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,n,t.options));return Z(()=>{uE.forEach(e=>e.reset()),r?.disconnect(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g.forEach(e=>e())})}function AE(e){return window[e]!==void 0}function jE(e){return!!(window[e]!==void 0&&window[e].prototype&&`insertRule`in window[e].prototype&&`deleteRule`in window[e].prototype)}var ME=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),a.set(o,t)),o}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return typeof t==`number`?r.get(t)||-1:t}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){if(!e){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},NE=class{constructor(){this.crossOriginIframeMirror=new ME(Mw),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},PE=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new ME(Mw),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new ME(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener(`message`,this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0);let t=$T(e);t&&this.crossOriginIframeMap.set(t,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&$T(e)?.addEventListener(`message`,this.handleMessage.bind(this)),this.loadListener?.(e);let n=QT(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){let t=e;if(t.data.type!==`rrweb`||t.origin!==t.data.origin||!e.source)return;let n=this.crossOriginIframeMap.get(e.source);if(!n)return;let r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case Y.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Y.IncrementalSnapshot,data:{source:X.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Y.Meta:case Y.Load:case Y.DomContentLoaded:return!1;case Y.Plugin:return t;case Y.Custom:return this.replaceIds(t.data.payload,e,[`id`,`parentId`,`previousId`,`nextId`]),t;case Y.IncrementalSnapshot:switch(t.data.source){case X.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,[`parentId`,`nextId`,`previousId`]),this.replaceIdOnNode(t.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,[`parentId`,`id`])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,[`id`])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case X.Drag:case X.TouchMove:case X.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case X.ViewportResize:return!1;case X.MediaInteraction:case X.MouseInteraction:case X.Scroll:case X.CanvasMutation:case X.Input:return this.replaceIds(t.data,e,[`id`]),t;case X.StyleSheetRule:case X.StyleDeclaration:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleId`]),t;case X.Font:return t;case X.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,[`start`,`end`])}),t;case X.AdoptedStyleSheet:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleIds`]),t.data.styles?.forEach(t=>{this.replaceStyleIds(t,e,[`styleId`])}),t}}return!1}replace(e,t,n,r){for(let i of r)!Array.isArray(t[i])&&typeof t[i]!=`number`||(Array.isArray(t[i])?t[i]=e.getIds(n,t[i]):t[i]=e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,[`id`,`rootId`]),`childNodes`in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type!==ew.Document&&!e.rootId&&(e.rootId=t),`childNodes`in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}},FE=class{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},IE=class{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!rw(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);let n=fE({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(hE({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),BT(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(CE({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){let t=QT(e),n=$T(e);!t||!n||this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(_T(e.prototype,`attachShadow`,function(e){return function(r){let i=e.call(this,r);return this.shadowRoot&&IT(this)&&n.addShadowRoot(this.shadowRoot,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},LE=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new MT,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){`_cssText`in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:cw(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},RE=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,zT(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},zE,BE;try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}var VE=pw();function HE(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i=`rr-block`,blockSelector:a=null,unblockSelector:o=null,ignoreClass:s=`rr-ignore`,ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u=`rr-mask`,unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:h,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,maxCanvasSize:x=null,packFn:S,sampling:C={},dataURLOptions:w={},mousemoveWait:T,recordDOM:ee=!0,recordCanvas:te=!1,recordCrossOriginIframes:ne=!1,recordAfter:re=e.recordAfter===`DOMContentLoaded`?e.recordAfter:`load`,userTriggeredOnInput:ie=!1,collectFonts:ae=!1,inlineImages:oe=!1,plugins:se,keepIframeSrcFn:E=()=>!1,ignoreCSSAttributes:ce=new Set([]),errorHandler:le,onMutation:ue,getCanvasManager:de}=e;KT(le);let fe=ne?window.parent===window:!0,pe=!1;if(!fe)try{window.parent.document&&(pe=!1)}catch{pe=!0}if(fe&&!t)throw Error(`emit function is required`);if(!fe&&!pe)return()=>{};T!==void 0&&C.mousemove===void 0&&(C.mousemove=T),VE.reset();let me=h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g===void 0?{}:g,he=_===!0||_===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_===`all`,headMetaDescKeywords:_===`all`}:_||{};OT();let ge,_e=0,ve=e=>{for(let t of se||[])t.eventProcessor&&(e=t.eventProcessor(e));return S&&!pe&&(e=S(e)),e};zE=(e,i)=>{let a=e;if(a.timestamp=vT(),uE[0]?.isFrozen()&&a.type!==Y.FullSnapshot&&!(a.type===Y.IncrementalSnapshot&&a.data.source===X.Mutation)&&uE.forEach(e=>e.unfreeze()),fe)t?.(ve(a),i);else if(pe){let e={type:`rrweb`,event:ve(a),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,`*`)}if(a.type===Y.FullSnapshot)ge=a,_e=0;else if(a.type===Y.IncrementalSnapshot){if(a.data.source===X.Mutation&&a.data.isAttachIframe)return;_e++;let e=r&&_e>=r,t=n&&ge&&a.timestamp-ge.timestamp>n;(e||t)&&Ee(!0)}};let ye=e=>{zE({type:Y.IncrementalSnapshot,data:{source:X.Mutation,...e}})},be=e=>zE({type:Y.IncrementalSnapshot,data:{source:X.Scroll,...e}}),xe=e=>zE({type:Y.IncrementalSnapshot,data:{source:X.CanvasMutation,...e}}),Se=new LE({mutationCb:ye,adoptedStyleSheetCb:e=>zE({type:Y.IncrementalSnapshot,data:{source:X.AdoptedStyleSheet,...e}})}),D=typeof __RRWEB_EXCLUDE_IFRAME__==`boolean`&&__RRWEB_EXCLUDE_IFRAME__?new NE:new PE({mirror:VE,mutationCb:ye,stylesheetManager:Se,recordCrossOriginIframes:ne,wrappedEmit:zE});for(let e of se||[])e.getMirror&&e.getMirror({nodeMirror:VE,crossOriginIframeMirror:D.crossOriginIframeMirror,crossOriginIframeStyleMirror:D.crossOriginIframeStyleMirror});let Ce=new RE,we=WE(de,{mirror:VE,win:window,mutationCb:e=>zE({type:Y.IncrementalSnapshot,data:{source:X.CanvasMutation,...e}}),recordCanvas:te,blockClass:i,blockSelector:a,unblockSelector:o,maxCanvasSize:x,sampling:C.canvas,dataURLOptions:w,errorHandler:le}),Te=typeof __RRWEB_EXCLUDE_SHADOW_DOM__==`boolean`&&__RRWEB_EXCLUDE_SHADOW_DOM__?new FE:new IE({mutationCb:ye,scrollCb:be,bypassOptions:{onMutation:ue,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:me,dataURLOptions:w,maskAttributeFn:v,maskTextFn:b,maskInputFn:y,recordCanvas:te,inlineImages:oe,sampling:C,slimDOMOptions:he,iframeManager:D,stylesheetManager:Se,canvasManager:we,keepIframeSrcFn:E,processedNodeManager:Ce,ignoreCSSAttributes:ce},mirror:VE}),Ee=(e=!1)=>{if(!ee)return;zE({type:Y.Meta,data:{href:window.location.href,width:xT(),height:bT()}},e),Se.reset(),Te.init(),uE.forEach(e=>e.lock());let t=dT(document,{mirror:VE,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:me,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,slimDOM:he,dataURLOptions:w,recordCanvas:te,inlineImages:oe,onSerialize:e=>{kT(e,VE)&&D.addIframe(e),AT(e,VE)&&Se.trackLinkElement(e),jT(e)&&Te.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{D.attachIframe(e,t);let n=$T(e);n&&we.addWindow(n),Te.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{Se.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{ye({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:E,ignoreCSSAttributes:ce});if(!t)return console.warn(`Failed to snapshot the document`);zE({type:Y.FullSnapshot,data:{node:t,initialOffset:yT(window)}}),uE.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Se.adoptStyleSheets(document.adoptedStyleSheets,VE.getId(document))};BE=Ee;try{let e=[],t=e=>Z(kE)({onMutation:ue,mutationCb:ye,mousemoveCb:(e,t)=>zE({type:Y.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>zE({type:Y.IncrementalSnapshot,data:{source:X.MouseInteraction,...e}}),scrollCb:be,viewportResizeCb:e=>zE({type:Y.IncrementalSnapshot,data:{source:X.ViewportResize,...e}}),inputCb:e=>zE({type:Y.IncrementalSnapshot,data:{source:X.Input,...e}}),mediaInteractionCb:e=>zE({type:Y.IncrementalSnapshot,data:{source:X.MediaInteraction,...e}}),styleSheetRuleCb:e=>zE({type:Y.IncrementalSnapshot,data:{source:X.StyleSheetRule,...e}}),styleDeclarationCb:e=>zE({type:Y.IncrementalSnapshot,data:{source:X.StyleDeclaration,...e}}),canvasMutationCb:xe,fontCb:e=>zE({type:Y.IncrementalSnapshot,data:{source:X.Font,...e}}),selectionCb:e=>{zE({type:Y.IncrementalSnapshot,data:{source:X.Selection,...e}})},customElementCb:e=>{zE({type:Y.IncrementalSnapshot,data:{source:X.CustomElement,...e}})},blockClass:i,ignoreClass:s,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:me,inlineStylesheet:m,sampling:C,recordDOM:ee,recordCanvas:te,inlineImages:oe,userTriggeredOnInput:ie,collectFonts:ae,doc:e,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,keepIframeSrcFn:E,blockSelector:a,unblockSelector:o,slimDOMOptions:he,dataURLOptions:w,mirror:VE,iframeManager:D,stylesheetManager:Se,shadowDomManager:Te,processedNodeManager:Ce,canvasManager:we,ignoreCSSAttributes:ce,plugins:se?.filter(e=>e.observer)?.map(e=>({observer:e.observer,options:e.options,callback:t=>zE({type:Y.Plugin,data:{plugin:e.name,payload:t}})}))||[]},{});D.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{Ee(),e.push(t(document))};return document.readyState===`interactive`||document.readyState===`complete`?n():(e.push(fT(`DOMContentLoaded`,()=>{zE({type:Y.DomContentLoaded,data:{}}),re===`DOMContentLoaded`&&n()})),e.push(fT(`load`,()=>{zE({type:Y.Load,data:{}}),re===`load`&&n()},window))),()=>{e.forEach(e=>e()),Ce.destroy(),BE=void 0,qT()}}catch(e){console.warn(e)}}function UE(e){if(!BE)throw Error(`please take full snapshot after start recording`);BE(e)}HE.mirror=VE,HE.takeFullSnapshot=UE;function WE(e,t){try{return e?e(t):new ZT}catch{return console.warn(`Unable to initialize CanvasManager`),new ZT}}var GE;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(GE||={});var KE=3,qE=5;function JE(e){return e>9999999999?e:e*1e3}function YE(e){return e>9999999999?e/1e3:e}function XE(e,t){t.category!==`sentry.transaction`&&([`ui.click`,`ui.input`].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Y.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:`breadcrumb`,payload:Xe(t,10,1e3)}}),t.category===`console`)))}var ZE=`button,a`;function QE(e){return e.closest(ZE)||e}function $E(e){let t=eD(e);return!t||!(t instanceof Element)?t:QE(t)}function eD(e){return tD(e)?e.target:e}function tD(e){return typeof e==`object`&&!!e&&`target`in e}var nD;function rD(e){return nD||(nD=[],iD()),nD.push(e),()=>{let t=nD?nD.indexOf(e):-1;t>-1&&nD.splice(t,1)}}function iD(){je(q,`open`,function(e){return function(...t){if(nD)try{nD.forEach(e=>e())}catch{}return e.apply(q,t)}})}var aD=new Set([X.Mutation,X.StyleSheetRule,X.StyleDeclaration,X.AdoptedStyleSheet,X.CanvasMutation,X.Selection,X.MediaInteraction]);function oD(e,t,n){e.handleClick(t,n)}var sD=class{constructor(e,t,n=XE){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){let e=rD(()=>{this._lastMutation=dD()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(lD(t,this._ignoreSelector)||!uD(e))return;let n={timestamp:YE(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=YE(e)}registerScroll(e=Date.now()){this._lastScroll=YE(e)}registerClick(e){let t=QE(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=dD();this._clicks.forEach(n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(let t of e){let e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,i=!n&&!r,{clickCount:a,clickBreadcrumb:o}=e;if(i){let n=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,r=n<this._timeout*1e3?`mutation`:`timeout`,i={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.slowClickDetected`,data:{...o.data,url:q.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:a||1}};this._addBreadcrumbEvent(t,i);return}if(a>1){let e={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.multiClick`,data:{...o.data,url:q.location.href,route:t.getCurrentRoute(),clickCount:a,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=mx(()=>this._checkClicks(),1e3)}},cD=[`A`,`BUTTON`,`INPUT`];function lD(e,t){return!!(!cD.includes(e.tagName)||e.tagName===`INPUT`&&![`submit`,`button`].includes(e.getAttribute(`type`)||``)||e.tagName===`A`&&(e.hasAttribute(`download`)||e.hasAttribute(`target`)&&e.getAttribute(`target`)!==`_self`)||t&&e.matches(t))}function uD(e){return!!(e.data&&typeof e.data.nodeId==`number`&&e.timestamp)}function dD(){return Date.now()/1e3}function fD(e,t){try{if(!pD(t))return;let{source:n}=t.data;if(aD.has(n)&&e.registerMutation(t.timestamp),n===X.Scroll&&e.registerScroll(t.timestamp),mD(t)){let{type:n,id:r}=t.data,i=HE.mirror.getNode(r);i instanceof HTMLElement&&n===HT.Click&&e.registerClick(i)}}catch{}}function pD(e){return e.type===KE}function mD(e){return e.data.source===X.MouseInteraction}function hD(e){return{timestamp:Date.now()/1e3,type:`default`,...e}}var gD=(e=>(e[e.Document=0]=`Document`,e[e.DocumentType=1]=`DocumentType`,e[e.Element=2]=`Element`,e[e.Text=3]=`Text`,e[e.CDATA=4]=`CDATA`,e[e.Comment=5]=`Comment`,e))(gD||{}),_D=new Set([`id`,`class`,`aria-label`,`role`,`name`,`alt`,`title`,`data-test-id`,`data-testid`,`disabled`,`aria-disabled`,`data-sentry-component`]);function vD(e){let t={};!e[`data-sentry-component`]&&e[`data-sentry-element`]&&(e[`data-sentry-component`]=e[`data-sentry-element`]);for(let n in e)if(_D.has(n)){let r=n;(n===`data-testid`||n===`data-test-id`)&&(r=`testId`),t[r]=e[n]}return t}var yD=e=>t=>{if(!e.isEnabled())return;let n=xD(t);if(!n)return;let r=t.name===`click`,i=r?t.event:void 0;r&&e.clickDetector&&i?.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&oD(e.clickDetector,n,$E(t.event)),XE(e,n)};function bD(e,t){let n=HE.mirror.getId(e),r=n&&HE.mirror.getNode(n),i=r&&HE.mirror.getMeta(r),a=i&&CD(i)?i:null;return{message:t,data:a?{nodeId:n,node:{id:n,tagName:a.tagName,textContent:Array.from(a.childNodes).map(e=>e.type===gD.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(``),attributes:vD(a.attributes)}}:{}}}function xD(e){let{target:t,message:n}=SD(e);return hD({category:`ui.${e.name}`,...bD(t,n)})}function SD(e){let t=e.name===`click`,n,r=null;try{r=t?$E(e.event):eD(e.event),n=Vy(r,{maxStringLength:200})||`<unknown>`}catch{n=`<unknown>`}return{target:r,message:n}}function CD(e){return e.type===gD.Element}function wD(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=TD(t);n&&XE(e,n)}function TD(e){let{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a,target:o}=e;if(!o||ED(o)||!a)return null;let s=t||r||i,c=a.length===1;if(!s&&c)return null;let l=Vy(o,{maxStringLength:200})||`<unknown>`;return hD({category:`ui.keyDown`,message:l,data:{...bD(o,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:a}})}function ED(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.isContentEditable}var DD={resource:PD,paint:MD,navigation:ND};function OD(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function kD(e){return e.map(AD).filter(Boolean)}function AD(e){let t=DD[e.entryType];return t?t(e):null}function jD(e){return((Et()||q.performance.timeOrigin)+e)/1e3}function MD(e){let{duration:t,entryType:n,name:r,startTime:i}=e,a=jD(i);return{type:n,name:r,start:a,end:a+t,data:void 0}}function ND(e){let{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:a,encodedBodySize:o,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:m,type:h}=e;return i===0?null:{type:`${t}.${h}`,start:jD(p),end:jD(a),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:l,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:a,redirectCount:f}}}function PD(e){let{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:a,decodedBodySize:o,encodedBodySize:s,responseStatus:c,transferSize:l}=e;return[`fetch`,`xmlhttprequest`].includes(n)?null:{type:`${t}.${n}`,start:jD(a),end:jD(i),name:r,data:{size:l,statusCode:c,decodedBodySize:o,encodedBodySize:s}}}function FD(e){let t=e.entries[e.entries.length-1];return zD(e,`largest-contentful-paint`,t?.element?[t.element]:void 0)}function ID(e){return e.sources!==void 0}function LD(e){let t=[],n=[];for(let r of e.entries)if(ID(r)){let e=[];for(let t of r.sources)if(t.node){n.push(t.node);let r=HE.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return zD(e,`cumulative-layout-shift`,n,t)}function RD(e){let t=e.entries[e.entries.length-1];return zD(e,`interaction-to-next-paint`,t?.target?[t.target]:void 0)}function zD(e,t,n,r){let i=e.value,a=e.rating,o=jD(i);return{type:`web-vital`,name:t,start:o,end:o,data:{value:i,size:i,rating:a,nodeIds:n?n.map(e=>HE.mirror.getId(e)):void 0,attributions:r}}}function BD(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}let r=[];return[`navigation`,`paint`,`resource`].forEach(e=>{r.push(ky(e,n))}),r.push(Ey(OD(FD,e)),Ty(OD(LD,e)),Oy(OD(RD,e))),()=>{r.forEach(e=>e())}}var Q=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,VD=`var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([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,0,0,0]),i=new t([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,0,0]),s=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=function(t,e){for(var i=new n(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new r(i[30]);for(s=1;s<30;++s)for(var o=i[s];o<i[s+1];++o)a[o]=o-i[s]<<5|s;return{b:i,r:a}},o=a(e,2),h=o.b,f=o.r;h[28]=258,f[258]=28;for(var l=a(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,s=0,a=new n(r);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new n(r);for(s=1;s<r;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new n(1<<r);var f=15-r;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=r-t[s],v=h[t[s]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>f]=l}else for(o=new n(i),s=0;s<i;++s)t[s]&&(o[s]=u[h[t[s]-1]++]>>15-t[s]);return o},p=new t(288);for(c=0;c<144;++c)p[c]=8;for(c=144;c<256;++c)p[c]=9;for(c=256;c<280;++c)p[c]=7;for(c=280;c<288;++c)p[c]=8;var g=new t(32);for(c=0;c<32;++c)g[c]=5;var w=d(p,9,0),y=d(g,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],s=0;s<r.length;++s)r[s]&&i.push({s:s,f:r[s]});var a=i.length,o=i.slice();if(!a)return{t:F,l:0};if(1==a){var h=new t(i[0].s+1);return h[i[0].s]=1,{t:h,l:1}}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var f=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:f.f+l.f,l:f,r:l};c!=a-1;)f=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:f.f+l.f,l:f,r:l};var d=o[0].s;for(s=1;s<a;++s)o[s].s>d&&(d=o[s].s);var p=new n(d+1),g=A(i[c-1],p,0);if(g>e){s=0;var w=0,y=g-e,m=1<<y;for(o.sort(function(t,n){return p[n.s]-p[t.s]||t.f-n.f});s<a;++s){var b=o[s].s;if(!(p[b]>e))break;w+=m-(1<<g-p[b]),p[b]=e}for(w>>=y;w>0;){var M=o[s].s;p[M]<e?w-=1<<e-p[M]++-1:++s}for(;s>=0&&w;--s){var E=o[s].s;p[E]==e&&(--p[E],++w)}g=e}return{t:new t(p),l:g}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=r;++h)if(t[h]==s&&h!=r)++a;else{if(!s&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(s),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(s);a=1,s=t[h]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var s=0;s<e;++s)t[i+s+4]=r[s];return 8*(i+4+e)},U=function(t,r,a,o,h,f,l,u,c,v,m){z(r,m++,a),++h[256];for(var b=x(h,15),M=b.t,E=b.l,A=x(f,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[s[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(h,p)+T(f,g)+l,X=T(h,M)+T(f,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[s[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=w,P=p,Q=y,R=g;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,s=0|r.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=r[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},L=function(s,a,o,h,u){if(!u&&(u={l:1},a.dictionary)){var c=a.dictionary.subarray(-32768),v=new t(c.length+s.length);v.set(c),v.set(s,c.length),s=v,u.w=c.length}return function(s,a,o,h,u,c){var v=c.z||s.length,d=new t(h+v+5*(1+Math.ceil(v/7e3))+u),p=d.subarray(h,d.length-u),g=c.l,w=7&(c.r||0);if(a){w&&(p[0]=c.r>>3);for(var y=C[a-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(s[t]^s[t+1]<<A^s[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!g)){w=U(s,p,0,F,I,S,O,q,G,j-G,w),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(s[j+Q]==s[j+Q-W]){for(var $=0;$<Z&&s[j+$]==s[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|f[Q]<<18|l[R];var it=31&f[Q],st=31&l[R];O+=e[it]+i[st],++I[257+it],++S[st],B=j+Q,++L}else F[q++]=s[j],++I[s[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=s[j],++I[s[j]];w=U(s,p,g,F,I,S,O,q,G,j-G,w),g||(c.r=7&w|p[w/8|0]<<3,w-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+g;j+=65535){var at=j+65535;at>=v&&(p[w/8|0]=g,at=v),w=k(p,w+1,s.subarray(j,at))}c.i=v}return b(d,0,h+m(w)+u)}(s,null==a.level?6:a.level,null==a.mem?u.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(s.length)))):20:12+a.mem,o,h,u)},O=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},j=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(L(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var s=this.b.length-this.s.z;this.b.set(n.subarray(0,s),this.s.z),this.s.z=this.b.length,this.p(this.b,!1),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(s),32768),this.s.z=n.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n.prototype.flush=function(){this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2},n}();function q(t,n){n||(n={});var r=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}}(),e=t.length;r.p(t);var i,s=L(t,n,10+((i=n).filename?i.filename.length+1:0),8),a=s.length;return function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&O(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}}(s,n),O(s,a-8,r.d()),O(s,a-4,e),s}var B=function(){function t(t,n){this.c=S(),this.v=1,j.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),j.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=L(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=S();i.p(n.dictionary),O(t,2,i.d())}}(r,this.o),this.v=0),n&&O(r,r.length-4,this.c.d()),this.ondata(r,n)},t.prototype.flush=function(){j.prototype.flush.call(this)},t}(),G="undefined"!=typeof TextEncoder&&new TextEncoder,H="undefined"!=typeof TextDecoder&&new TextDecoder;try{H.decode(F,{stream:!0})}catch(t){}var J=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=n||!1)},t}();function K(n,r){if(G)return G.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),s=0,a=function(t){i[s++]=t},o=0;o<e;++o){if(s+5>i.length){var h=new t(s+8+(e-o<<1));h.set(i),i=h}var f=n.charCodeAt(o);f<128||r?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&n.charCodeAt(++o))>>18),a(128|f>>12&63),a(128|f>>6&63),a(128|63&f)):(a(224|f>>12),a(128|f>>6&63),a(128|63&f))}return b(i,0,s)}const N=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new J((t,n)=>{this.deflate.push(t,n)}),this.stream.push("[")}},P={clear:()=>{N.clear()},addEvent:t=>N.addEvent(t),finish:()=>N.finish(),compress:t=>function(t){return q(K(t))}(t)};addEventListener("message",function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in P&&"function"==typeof P[n])try{const t=P[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});`;function HD(){let e=new Blob([VD]);return URL.createObjectURL(e)}var UD=[`log`,`warn`,`error`],WD=`[Replay] `;function GD(e,t=`info`){Pc({category:`console`,data:{logger:`replay`},level:t,message:`${WD}${e}`},{level:t})}function KD(){let e=!1,t=!1,n={exception:()=>void 0,infoTick:()=>void 0,setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return Q?(UD.forEach(e=>{n[e]=(...n)=>{x[e](WD,...n),t&&GD(n.join(``),hl(e))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),x.error(WD,r),e?L(r,{mechanism:{handled:!0,type:`auto.function.replay.debug`}}):t&&GD(r,`error`)},n.infoTick=(...e)=>{x.log(WD,...e),t&&setTimeout(()=>GD(e[0]),0)}):UD.forEach(e=>{n[e]=()=>void 0}),n}var $=KD(),qD=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${qC}.`)}},JD=class{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return`sync`}destroy(){this.events=[]}async addEvent(e){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>qC)throw new qD;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=null;for(let{timestamp:t}of this.events)(e===null||t<e)&&(e=t);return e===null?e:JE(e)}},YD=class{constructor(e){this._onMessage=({data:e})=>{let t=e;if(typeof t.id!=`number`)return;let n=this._pending.get(t.id);if(!(!n||n.method!==t.method)){if(this._pending.delete(t.id),!t.success){Q&&$.error(`Error in compression worker: `,t.response),n.reject(Error(`Error in compression worker`));return}n.resolve(t.response)}},this._worker=e,this._id=0,this._pending=new Map,this._worker.addEventListener(`message`,this._onMessage)}ensureReady(){return this._ensureReadyPromise||=new Promise((e,t)=>{this._worker.addEventListener(`message`,({data:n})=>{n.success?e():(Q&&$.warn(`Received worker message with unsuccessful status`,n),t(Error(`Received worker message with unsuccessful status`)))},{once:!0}),this._worker.addEventListener(`error`,e=>{Q&&$.warn(`Failed to load Replay compression worker`,e),t(Error(`Failed to load Replay compression worker: ${e instanceof ErrorEvent&&e.message?e.message:`Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load.`}`))},{once:!0})}),this._ensureReadyPromise}destroy(){Q&&$.log(`Destroying compression worker`),this._worker.removeEventListener(`message`,this._onMessage),this._pending.forEach(e=>e.reject(Error(`Worker destroyed`))),this._pending.clear(),this._worker.terminate()}postMessage(e,t){let n=this._getAndIncrementId();return new Promise((r,i)=>{this._pending.set(n,{method:e,resolve:r,reject:i});try{this._worker.postMessage({id:n,method:e,arg:t})}catch(e){this._pending.delete(n),i(e)}})}_getAndIncrementId(){return this._id++}},XD=class{constructor(e){this._worker=new YD(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return`worker`}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){let t=JE(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>qC?Promise.reject(new qD):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage(`clear`).then(null,e=>{Q&&$.exception(e,`Sending "clear" message to worker failed`,e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage(`addEvent`,e)}async _finishRequest(){let e=await this._worker.postMessage(`finish`);return this._earliestTimestamp=null,this._totalSize=0,e}},ZD=class{constructor(e){this._fallback=new JD,this._compression=new XD(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){Q&&$.exception(e,`Failed to load the compression worker, falling back to simple buffer`);return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(let t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){Q&&$.exception(e,`Failed to add events when switching buffers.`)}}};function QD({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=$D(t);if(e)return e}return Q&&$.log(`Using simple buffer`),new JD}function $D(e){try{let t=e||eO();return t?(Q&&$.log(`Using compression worker${e?` from ${e}`:``}`),new ZD(new Worker(t))):void 0}catch(e){Q&&$.exception(e,`Failed to create compression worker`)}}function eO(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>`u`||!__SENTRY_EXCLUDE_REPLAY_WORKER__?HD():``}function tO(){try{return`sessionStorage`in q&&!!q.sessionStorage}catch{return!1}}function nO(e){rO(),e.session=void 0}function rO(){if(tO())try{q.sessionStorage.removeItem(NC)}catch{}}function iO(e){return e===void 0?!1:Math.random()<e}function aO(e){if(tO())try{q.sessionStorage.setItem(NC,JSON.stringify(e))}catch{}}function oO(e){let t=Date.now();return{id:e.id||ft(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}function sO(e,t){return iO(e)?`session`:t?`buffer`:!1}function cO({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let i=oO({sampled:sO(e,t),previousSessionId:r});return n&&aO(i),i}function lO(){if(!tO())return null;try{let e=q.sessionStorage.getItem(NC);if(!e)return null;let t=JSON.parse(e);return Q&&$.infoTick(`Loading existing session`),oO(t)}catch{return null}}function uO(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function dO(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return uO(e.started,t,r)||uO(e.lastActivity,n,r)}function fO(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!dO(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled===`buffer`&&e.segmentId===0)}function pO({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){let i=r.stickySession&&lO();return i?fO(i,{sessionIdleExpire:e,maxReplayDuration:t})?(Q&&$.infoTick(`Session in sessionStorage is expired, creating new one...`),cO(r,{previousSessionId:i.id})):i:(Q&&$.infoTick(`Creating new session`),cO(r,{previousSessionId:n}))}function mO(e){return e.type===Y.Custom}function hO(e,t,n){return vO(e,t)?(_O(e,t,n),!0):!1}function gO(e,t,n){return vO(e,t)?_O(e,t,n):Promise.resolve(null)}async function _O(e,t,n){let{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;let i=e.recordingMode===`buffer`;try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);let a=yO(t,e.getOptions().beforeAddRecordingEvent);return a?await r.addEvent(a):void 0}catch(t){let n=t&&t instanceof qD,a=n?`eventBufferOverflow`:`eventBufferError`,o=A();if(o){let e=n?`buffer_overflow`:`internal_sdk_error`;o.recordDroppedEvent(e,`replay`)}if(n&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:a})}}function vO(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=JE(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Q&&$.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function yO(e,t){try{if(typeof t==`function`&&mO(e))return t(e)}catch(e){return Q&&$.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function bO(e){return!e.type}function xO(e){return e.type===`transaction`}function SO(e){return e.type===`replay_event`}function CO(e){return e.type===`feedback`}function wO(e){return(t,n)=>{if(!e.isEnabled()||!bO(t)&&!xO(t))return;let r=n.statusCode;if(!(!r||r<200||r>=300)){if(xO(t)){TO(e,t);return}EO(e,t)}}}function TO(e,t){let n=e.getContext();t.contexts?.trace?.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function EO(e,t){let n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!==`buffer`||!t.tags?.replayId)return;let{beforeErrorSampling:r}=e.getOptions();typeof r==`function`&&!r(t)||mx(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}function DO(e){return t=>{!e.isEnabled()||!bO(t)||OO(e,t)}}function OO(e,t){let n=t.exception?.values?.[0]?.value;typeof n==`string`&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&XE(e,hD({category:`replay.hydrate-error`,data:{url:ih()}}))}function kO(e){let t=A();t&&t.on(`beforeAddBreadcrumb`,t=>AO(e,t))}function AO(e,t){if(!e.isEnabled()||!NO(t))return;let n=jO(t);n&&XE(e,n)}function jO(e){return!NO(e)||[`fetch`,`xhr`,`sentry.event`,`sentry.transaction`].includes(e.category)||e.category.startsWith(`ui.`)?null:e.category===`console`?MO(e):hD(e)}function MO(e){let t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return hD(e);let n=!1,r=t.map(e=>{if(!e)return e;if(typeof e==`string`)return e.length>WC?(n=!0,`${e.slice(0,WC)}\u2026`):e;if(typeof e==`object`)try{let t=Xe(e,7);return JSON.stringify(t).length>WC?(n=!0,`${JSON.stringify(t,null,2).slice(0,WC)}\u2026`):t}catch{}return e});return hD({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:[`CONSOLE_ARG_TRUNCATED`]}}:{}}})}function NO(e){return!!e.category}function PO(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function FO(){let e=k().getPropagationContext().dsc;e&&delete e.replay_id;let t=I();if(t){let e=Xr(t);delete e.replay_id}}function IO(e){let t=k().getPropagationContext().dsc;t&&(t.replay_id=e);let n=I();if(n){let t=Xr(n);t.replay_id=e}}function LO(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Y.Custom,timestamp:t.timestamp*1e3,data:{tag:`breadcrumb`,payload:{timestamp:t.timestamp,type:`default`,category:`sentry.feedback`,data:{feedbackId:t.event_id}}}}),!1):!0)}function RO(e,t){return e.recordingMode!==`buffer`||t.message===FC||!t.exception||t.type?!1:iO(e.getOptions().errorSampleRate)}function zO(e){return Object.assign((t,n)=>{if(e.session&&fO(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&FO(),!e.isEnabled()||e.isPaused())return t;if(SO(t))return delete t.breadcrumbs,t;if(!bO(t)&&!xO(t)&&!CO(t))return t;if(!e.checkAndHandleExpiredSession())return FO(),t;if(CO(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),LO(e,t),t;if(PO(t,n)&&!e.getOptions()._experiments.captureExceptions)return Q&&$.log(`Ignoring error from rrweb internals`,t),null;let r=RO(e,t);if((r||e.recordingMode===`session`)&&(t.tags={...t.tags,replayId:e.getSessionId()}),r&&e.recordingMode===`buffer`&&e.session?.sampled===`buffer`){let t=e.session;t.dirty=!0,e.getOptions().stickySession&&aO(t)}return t},{id:`Replay`})}function BO(e,t){return t.map(({type:t,start:n,end:r,name:i,data:a})=>{let o=e.throttledAddEvent({type:Y.Custom,timestamp:n,data:{tag:`performanceSpan`,payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:a}}});return typeof o==`string`?Promise.resolve(null):o})}function VO(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:`navigation.push`,start:r,end:r,name:n,data:{previous:t}}}function HO(e){return t=>{if(!e.isEnabled())return;let n=VO(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(BO(e,[n]),!1)))}}function UO(e,t){return Q&&e.getOptions()._experiments.traceInternals?!1:bc(t,A())}function WO(e,t){e.isEnabled()&&t!==null&&(UO(e,t.name)||e.addUpdate(()=>(BO(e,[t]),!0)))}function GO(e){if(!e)return;let t=new TextEncoder;try{if(typeof e==`string`)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let n=bx(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function KO(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function qO(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}function JO(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:i,method:a,statusCode:o,request:s,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:a,statusCode:o,request:s,response:c}}}function YO(e){return{headers:{},size:e,_meta:{warnings:[`URL_SKIPPED`]}}}function XO(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:i,warnings:a}=QO(n);return r.body=i,a?.length&&(r._meta={warnings:a}),r}function ZO(e,t){return Object.entries(e).reduce((n,[r,i])=>{let a=r.toLowerCase();return t.includes(a)&&e[r]&&(n[a]=i),n},{})}function QO(e){if(!e||typeof e!=`string`)return{body:e};let t=e.length>UC,n=$O(e);if(t){let t=e.slice(0,UC);return n?{body:t,warnings:[`MAYBE_JSON_TRUNCATED`]}:{body:`${t}\u2026`,warnings:[`TEXT_TRUNCATED`]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function $O(e){let t=e[0],n=e[e.length-1];return t===`[`&&n===`]`||t===`{`&&n===`}`}function ek(e,t){return ct(tk(e),t)}function tk(e,t=q.document.baseURI){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(q.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith(`/`)&&r.endsWith(`/`)?r.slice(0,-1):r}async function nk(e,t,n){try{let r=JO(`resource.fetch`,await ik(e,t,n));WO(n.replay,r)}catch(e){Q&&$.exception(e,`Failed to capture fetch breadcrumb`)}}function rk(e,t){let{input:n,response:r}=t,i=GO(n?Sx(n):void 0),a=r?KO(r.headers.get(`content-length`)):void 0;i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}async function ik(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r}=t,{url:o,method:s,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=ek(o,n.networkDetailAllowUrls)&&!ek(o,n.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:a,url:o,method:s,statusCode:c,request:d?ak(n,t.input,l):YO(l),response:await ok(d,n,t.response,u)}}function ak({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let i=n?uk(n,t):{};if(!e)return XO(i,r,void 0);let[a,o]=xx(Sx(n),$),s=XO(i,r,a);return o?qO(s,o):s}async function ok(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return YO(i);let a=r?lk(r.headers,n):{};if(!r||!t&&i!==void 0)return XO(a,i,void 0);let[o,s]=await ck(r),c=sk(o,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:a});return s?qO(c,s):c}function sk(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{let a=e?.length&&n===void 0?GO(e):n;return r?t?XO(i,a,e):XO(i,a,void 0):YO(a)}catch(e){return Q&&$.exception(e,`Failed to serialize response body`),XO(i,n,void 0)}}async function ck(e){let t=fk(e);if(!t)return[void 0,`BODY_PARSE_ERROR`];try{return[await pk(t)]}catch(e){return e instanceof Error&&e.message.indexOf(`Timeout`)>-1?(Q&&$.warn(`Parsing text body from response timed out`),[void 0,`BODY_PARSE_TIMEOUT`]):(Q&&$.exception(e,`Failed to get text body from response`),[void 0,`BODY_PARSE_ERROR`])}}function lk(e,t){let n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function uk(e,t){return e.length===1&&typeof e[0]!=`string`?dk(e[0],t):e.length===2?dk(e[1],t):{}}function dk(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?lk(n,t):Array.isArray(n)?{}:ZO(n,t):{}}function fk(e){try{return e.clone()}catch(e){Q&&$.exception(e,`Failed to clone response body`)}}function pk(e){return new Promise((t,n)=>{let r=mx(()=>n(Error(`Timeout while trying to read response body`)),500);mk(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}async function mk(e){return await e.text()}async function hk(e,t,n){try{let r=JO(`resource.xhr`,_k(e,t,n));WO(n.replay,r)}catch(e){Q&&$.exception(e,`Failed to capture xhr breadcrumb`)}}function gk(e,t){let{xhr:n,input:r}=t;if(!n)return;let i=GO(r),a=n.getResponseHeader(`content-length`)?KO(n.getResponseHeader(`content-length`)):bk(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}function _k(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r,input:o,xhr:s}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:f}=e.data;if(!c)return null;if(!s||!ek(c,n.networkDetailAllowUrls)||ek(c,n.networkDetailDenyUrls))return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:YO(d),response:YO(f)};let p=s[hx],m=p?ZO(p.request_headers,n.networkRequestHeaders):{},h=ZO(Cx(s),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?xx(o,$):[void 0],[v,y]=n.networkCaptureBodies?vk(s):[void 0],b=XO(m,d,g),x=XO(h,f,v);return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:_?qO(b,_):b,response:y?qO(x,y):x}}function vk(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return yk(e.response,e.responseType)}catch(e){t.push(e)}return Q&&$.warn(`Failed to get xhr response body`,...t),[void 0]}function yk(e,t){try{if(typeof e==`string`)return[e];if(e instanceof Document)return[e.body.outerHTML];if(t===`json`&&e&&typeof e==`object`)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return Q&&$.exception(t,`Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return Q&&$.log(`Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function bk(e,t){try{return GO(t===`json`&&e&&typeof e==`object`?JSON.stringify(e):e)}catch{return}}function xk(e){let t=A();try{let{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o}=e.getOptions(),s={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o};t&&t.on(`beforeAddBreadcrumb`,(e,t)=>Sk(s,e,t))}catch{}}function Sk(e,t,n){if(t.data)try{Ck(t)&&Tk(n)&&(gk(t,n),hk(t,n,e)),wk(t)&&Ek(n)&&(rk(t,n),nk(t,n,e))}catch(e){Q&&$.exception(e,`Error when enriching network breadcrumb`)}}function Ck(e){return e.category===`xhr`}function wk(e){return e.category===`fetch`}function Tk(e){return e?.xhr}function Ek(e){return e?.input!==void 0}function Dk(e){let t=A();tx(yD(e)),cx(HO(e)),kO(e),xk(e),So(zO(e)),t&&(t.on(`beforeSendEvent`,DO(e)),t.on(`afterSendEvent`,wO(e)),t.on(`createDsc`,t=>{let n=e.getSessionId();n&&e.isEnabled()&&e.recordingMode===`session`&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),t.on(`spanStart`,t=>{e.lastActiveSpan=t}),t.on(`spanEnd`,t=>{e.lastActiveSpan=t}),t.on(`beforeSendFeedback`,async(t,n)=>{let r=e.getSessionId();n?.includeReplay&&e.isEnabled()&&r&&t.contexts?.feedback&&(t.contexts.feedback.source===`api`&&await e.sendBufferedReplayOrFlush(),t.contexts.feedback.replay_id=r)}),t.on(`openFeedbackWidget`,async()=>{await e.sendBufferedReplayOrFlush()}))}async function Ok(e){try{return Promise.all(BO(e,[kk(q.performance.memory)]))}catch{return[]}}function kk(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:`memory`,name:`memory`,start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function Ak(e,t,n){return Mc(e,t,{...n,setTimeoutImpl:mx})}var jk=i.navigator;function Mk(){return/iPhone|iPad|iPod/i.test(jk?.userAgent??``)||/Macintosh/i.test(jk?.userAgent??``)&&jk?.maxTouchPoints&&jk?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function Nk(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession()){Q&&$.warn(`Received replay event after session expired.`);return}let i=r||!t;t=!0,Pk(n),e.clickDetector&&fD(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode===`buffer`&&i&&e.setInitialState(),!hO(e,n,i))return!0;if(!i)return!1;let t=e.session;if(Ik(e,i),e.recordingMode===`buffer`&&t&&e.eventBuffer&&!t.dirty){let n=e.eventBuffer.getEarliestTimestamp();n&&(Q&&$.log(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&aO(t))}return t?.previousSessionId||e.recordingMode===`session`&&e.flush(),!0})}}function Pk(e){let t=e.data;if(!(e.type!==Y.IncrementalSnapshot||!t||typeof t!=`object`||!(`source`in t)||t.source!==X.Mutation||!(`attributes`in t)||!Array.isArray(t.attributes)))for(let e of t.attributes){let t=HE.mirror.getNode(e.id),n=t&&HE.mirror.getMeta(t);if(n?.type===gD.Element)for(let[t,r]of Object.entries(e.attributes))r===null?delete n.attributes[t]:n.attributes[t]=r}}function Fk(e){let t=e.getOptions();return{type:Y.Custom,timestamp:Date.now(),data:{tag:`options`,payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type===`worker`:!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function Ik(e,t){!t||e.session?.segmentId!==0||hO(e,Fk(e),!1)}function Lk(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Rk(e,t,n,r){return ti(gi(e,hi(e),r,n),[[{type:`replay_event`},e],[{type:`replay_recording`,length:typeof t==`string`?new TextEncoder().encode(t).length:t.length},t]])}function zk({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)}
497
- `;if(typeof e==`string`)n=`${r}${e}`;else{let t=new TextEncoder().encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function Bk({client:e,scope:t,replayId:n,event:r}){let i={event_id:n,integrations:typeof e._integrations==`object`&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0};e.emit(`preprocessEvent`,r,i);let a=await Xa(e.getOptions(),r,i,t,e,un());if(!a)return null;e.emit(`postprocessEvent`,a,i),a.platform=a.platform||`javascript`;let{name:o,version:s,settings:c}=e.getSdkMetadata()?.sdk||{};return a.sdk={...a.sdk,name:o||`sentry.javascript.unknown`,version:s||`0.0.0`,settings:c},a}async function Vk({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:a}){let o=zk({recordingData:e,headers:{segment_id:n}}),{urls:s,errorIds:c,traceIds:l,initialTimestamp:u}=r,d=A(),f=k(),p=d?.getTransport(),m=d?.getDsn();if(!d||!p||!m||!a.sampled)return Promise.resolve({});let h=await Bk({scope:f,client:d,replayId:t,event:{type:PC,replay_start_timestamp:u/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,urls:s,replay_id:t,segment_id:n,replay_type:a.sampled}});if(!h)return d.recordDroppedEvent(`event_processor`,`replay`),Q&&$.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete h.sdkProcessingMetadata;let g=Rk(h,o,m,d.getOptions().tunnel),_;try{_=await p.send(g)}catch(e){let t=Error(FC);try{t.cause=e}catch{}throw t}let v=Ds({},_);if(Es(v,`replay`))throw new Uk(v);if(typeof _.statusCode==`number`&&(_.statusCode<200||_.statusCode>=300))throw new Hk(_.statusCode);return _}var Hk=class extends Error{constructor(e){super(`Transport returned status code ${e}`)}},Uk=class extends Error{constructor(e){super(`Rate limit hit`),this.rateLimits=e}},Wk=class extends Error{constructor(){super(`Session is too long, not sending replay`)}};async function Gk(e,t={count:0,interval:VC}){let{recordingData:n,onError:r}=e;if(n.length)try{return await Vk(e),!0}catch(n){if(n instanceof Hk||n instanceof Uk)throw n;if(lo(`Replays`,{_retryCount:t.count}),r&&r(n),t.count>=HC){let e=Error(`${FC} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{mx(async()=>{try{await Gk(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}var Kk=`__THROTTLED`,qk=`__SKIPPED`;function Jk(e,t,n){let r=new Map,i=e=>{let t=e-n;r.forEach((e,n)=>{n<t&&r.delete(n)})},a=()=>[...r.values()].reduce((e,t)=>e+t,0),o=!1;return(...n)=>{let s=Math.floor(Date.now()/1e3);if(i(s),a()>=t){let e=o;return o=!0,e?qk:Kk}o=!1;let c=r.get(s)||0;return r.set(s,c+1),e(...n)}}var Yk=class{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode=`session`,this.timeouts={sessionIdlePause:IC,sessionIdleExpire:LC},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:``},this._recordingOptions=t,this._options=e,this._debouncedFlush=Ak(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=Jk((e,t)=>gO(this,e,t),300,5);let{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(GC,n),timeout:n,scrollTimeout:KC,ignoreSelector:r?r.join(`,`):``}:void 0;if(i&&(this.clickDetector=new sD(this,i)),Q){let t=e._experiments;$.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{q.document.visibilityState===`visible`?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let e=hD({category:`ui.blur`});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{let e=hD({category:`ui.focus`});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{wD(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){Q&&$.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session){Q&&$.exception(Error(`Unable to initialize and create session`));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled===`buffer`&&this.session.segmentId===0?`buffer`:`session`,Q&&$.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode===`session`){Q&&$.log(`Recording is already in progress`);return}if(this._isEnabled&&this.recordingMode===`buffer`){Q&&$.log("Buffering is in progress, call `flush()` to save the replay");return}Q&&$.infoTick(`Starting replay in session mode`),this._updateUserActivity();let e=pO({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode=`session`,this._initializeRecording()}startBuffering(){if(this._isEnabled){Q&&$.log("Buffering is in progress, call `flush()` to save the replay");return}Q&&$.infoTick(`Starting replay in buffer mode`);let e=pO({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode=`buffer`,this._initializeRecording()}startRecording(){try{let e=this._canvas;this._stopRecording=HE({...this._recordingOptions,...this.recordingMode===`buffer`?{checkoutEveryNms:BC}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:Nk(this),...Mk(),onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&=(this._stopRecording(),void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode=`buffer`;let n=t??`manual`;A()?.emit(`replayEnd`,{sessionId:this.session?.id,reason:n});try{Q&&$.log(`Stopping Replay triggered by ${n}`),FO(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,nO(this)}catch(e){this.handleException(e)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Q&&$.log(`Pausing replay`))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),Q&&$.log(`Resuming replay`))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode===`session`)return this.flushImmediate();let t=Date.now();Q&&$.log(`Converting buffer to session`),await this.flushImmediate();let n=this.stopRecording();!e||!n||this.recordingMode!==`session`&&(this.recordingMode=`session`,this.session&&(this.session.dirty=!1,this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession(),IO(this.session.id)),this.startRecording())}addUpdate(e){let t=e();this.recordingMode===`buffer`||!this._isEnabled||t!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume();return}this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode===`buffer`?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(e){if(!(e&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&uO(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled===`session`){this.pause();return}return!!this._checkSession()}setInitialState(){let e=`${q.location.pathname}${q.location.hash}${q.location.search}`,t=`${q.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){let n=this._throttledAddEvent(e,t);if(n===Kk){let e=hD({category:`replay.throttled`});this.addUpdate(()=>!hO(this,{type:qE,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e,metric:!0}}))}return n}getCurrentRoute(){let e=this.lastActiveSpan||I(),t=e&&F(e),n=(t&&P(t).data||{})[j];if(!(!t||!n||![`route`,`custom`].includes(n)))return P(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=QD({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&A()?.emit(`replayStart`,{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode===`session`&&this.session&&IO(this.session.id)}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,n=pO({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;let e=this.session;return fO(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(e),!1):!0}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:`sessionExpired`}),this.initializeSampling(e.id))}_addListeners(){try{q.document.addEventListener(`visibilitychange`,this._handleVisibilityChange),q.addEventListener(`blur`,this._handleWindowBlur),q.addEventListener(`focus`,this._handleWindowFocus),q.addEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||=(Dk(this),!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=BD(this)}_removeListeners(){try{q.document.removeEventListener(`visibilitychange`,this._handleVisibilityChange),q.removeEventListener(`blur`,this._handleWindowBlur),q.removeEventListener(`focus`,this._handleWindowFocus),q.removeEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){if(this.session){if(fO(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){FO();return}e&&this._createCustomBreadcrumb(e),this.conditionalFlush()}}_doChangeToForegroundTasks(e){if(this.session){if(!this.checkAndHandleExpiredSession()){Q&&$.log(`Document has become active, but session has expired`);return}e&&this._createCustomBreadcrumb(e)}}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:Y.Custom,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e}})})}_addPerformanceEntries(){let e=kD(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(BO(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;let n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){let e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){let e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){Q&&$.error(`No session or eventBuffer found to flush.`);return}if(await this._addPerformanceEntries(),this.eventBuffer?.hasEvents&&(await Ok(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Wk;let n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await Gk({replayId:e,recordingData:await this.eventBuffer.finish(),segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:`sendError`});let t=A();if(t){let n;n=e instanceof Uk?`ratelimit_backoff`:e instanceof Wk?`invalid`:`send_error`,t.recordDroppedEvent(n,`replay`)}}}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){Q&&$.error(`Attempting to finish replay event after session expired.`);return}if(!this.session)return;let t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();let r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i){Q&&$.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?`short`:`long`}, not sending replay.`),r&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&Q&&$.log(`Flushing initial segment without checkout.`);let o=!!this._flushLock;this._flushLock||=this._runFlush();try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,o&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&aO(this.session)}_onMutationHandler(e){let{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(e=>{let n=Lk(e.target),r=t.join(`,`);return n?.matches(r)}))return!1;let n=e.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,a=r&&n>r;if(n>i||a){let e=hD({category:`replay.mutations`,data:{count:n,limit:a}});this._createCustomBreadcrumb(e)}return a?(this.stop({reason:`mutationLimit`,forceFlush:this.recordingMode===`session`}),!1):!0}};function Xk(e,t){return[...e,...t].join(`,`)}function Zk({mask:e,unmask:t,block:n,unblock:r,ignore:i}){return{maskTextSelector:Xk(e,[`.sentry-mask`,`[data-sentry-mask]`]),unmaskTextSelector:Xk(t,[]),blockSelector:Xk(n,[`.sentry-block`,`[data-sentry-block]`,`base`,`iframe[srcdoc]:not([src])`]),unblockSelector:Xk(r,[]),ignoreSelector:Xk(i,[`.sentry-ignore`,`[data-sentry-ignore]`,`input[type="file"]`])}}function Qk({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:a}){if(i.unmaskTextSelector&&e.matches(i.unmaskTextSelector))return a;let o=n.includes(t),s=r&&t===`value`&&e.tagName===`INPUT`&&[`submit`,`button`].includes(e.getAttribute(`type`)||``);return o||s?a.replace(/[\S]/g,`*`):a}var $k=`img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]`,eA=[`content-length`,`content-type`,`accept`],tA=Symbol.for(`sentry__originalRequestBody`),nA=!1,rA=!1;function iA(){if(typeof Request>`u`||rA)return;let e=Request;try{let t=function(t,n){let r=new e(t,n);return n?.body!=null&&(r[tA]=n.body),r};t.prototype=e.prototype,i.Request=t,rA=!0}catch{}}var aA=(e=>new oA(e)),oA=class{constructor({flushMinDelay:e=RC,flushMaxDelay:t=zC,minReplayDuration:n=JC,maxReplayDuration:r=XC,stickySession:i=!0,useCompression:a=!0,workerUrl:o,_experiments:s={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:f=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:h=[],networkDetailDenyUrls:g=[],networkCaptureBodies:_=!0,networkRequestHeaders:v=[],networkResponseHeaders:y=[],mask:b=[],maskAttributes:x=[`title`,`placeholder`,`aria-label`],unmask:S=[],block:C=[],unblock:w=[],ignore:T=[],maskFn:ee,beforeAddRecordingEvent:te,beforeErrorSampling:ne,onError:re,attachRawBodyFromRequest:ie=!1}={}){this.name=`Replay`;let ae=Zk({mask:b,unmask:S,block:C,unblock:w,ignore:T});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:ee,maskInputFn:ee,maskAttributeFn:(e,t,n)=>Qk({maskAttributes:x,maskAllText:c,privacyOptions:ae,key:e,value:t,el:n}),...ae,slimDOMOptions:`all`,inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!s.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,YC),maxReplayDuration:Math.min(r,XC),stickySession:i,useCompression:a,workerUrl:o,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:f,slowClickTimeout:p,slowClickIgnoreSelectors:m,networkDetailAllowUrls:h,networkDetailDenyUrls:g,networkCaptureBodies:_,networkRequestHeaders:cA(v),networkResponseHeaders:cA(y),beforeAddRecordingEvent:te,beforeErrorSampling:ne,onError:re,attachRawBodyFromRequest:ie,_experiments:s},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${$k}`:$k,this._recordingOptions.ignoreCSSAttributes=new Set([`background-image`])),this._isInitialized&&Jo())throw Error(`Multiple Sentry Session Replay instances are not supported`);this._isInitialized=!0}get _isInitialized(){return nA}set _isInitialized(e){nA=e}afterAllSetup(e){!Jo()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&iA(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:this._replay.recordingMode===`session`,reason:`manual`}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){if(this._replay?.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(e){let t=this.getReplayId(!0);t&&(Ea(e,{"sentry.replay_id":t}),this.getRecordingMode()===`buffer`&&Ea(e,{"sentry._internal.replay_is_buffering":!0}))}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){let t=sA(this._initialOptions,e);this._replay=new Yk({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{let t=e.getIntegrationByName(`ReplayCanvas`);if(!t)return;this._replay._canvas=t.getOptions()}catch{}}};function sA(e,t){let n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=ir(n.replaysSessionSampleRate),a=ir(n.replaysOnErrorSampleRate);return i==null&&a==null&&f(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),a!=null&&(r.errorSampleRate=a),r}function cA(e){return[...eA,...e.map(e=>e.toLowerCase())]}function lA(){return A()?.getIntegrationByName(`Replay`)}var uA=Object.defineProperty,dA=(e,t,n)=>t in e?uA(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,fA=(e,t,n)=>dA(e,typeof t==`symbol`?t:t+``,n),pA=class{constructor(){fA(this,`idNodeMap`,new Map),fA(this,`nodeMetaMap`,new WeakMap)}getId(e){return e?this.getMeta(e)?.id??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function mA(){return new pA}function hA(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function gA(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:gA(e.parentNode,t,n,r+1)}function _A(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if(hA(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}var vA=`Please stop import mirror directly. Instead of that,\r
498
- now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
499
- or you can use record.mirror to access the mirror instance during recording.`,yA={map:{},getId(){return console.error(vA),-1},getNode(){return console.error(vA),null},removeNodeFromMap(){console.error(vA)},has(){return console.error(vA),!1},reset(){console.error(vA)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(yA=new Proxy(yA,{get(e,t,n){return t===`map`&&console.error(vA),Reflect.get(e,t,n)}}));function bA(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){DA(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>bA(e,t,a||{},!0)}function xA(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function SA(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function CA(e,t,n,r,i){if(!e)return!1;let a=SA(e);if(!a)return!1;let o=_A(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=gA(a,o),c=-1;return s<0?!1:(r&&(c=gA(a,_A(null,r))),s>-1&&c<0?!0:s<c)}var wA={};function TA(e){let t=wA[e];if(t)return t;let n=window.document,r=window[e];if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t);let i=t.contentWindow;i&&i[e]&&(r=i[e]),n.head.removeChild(t)}catch{}return wA[e]=r.bind(window)}function EA(...e){return TA(`requestAnimationFrame`)(...e)}function DA(...e){return TA(`setTimeout`)(...e)}var OA=(e=>(e[e[`2D`]=0]=`2D`,e[e.WebGL=1]=`WebGL`,e[e.WebGL2=2]=`WebGL2`,e))(OA||{}),kA;function AA(e){kA=e}for(var jA=e=>kA?((...t)=>{try{return e(...t)}catch(e){if(kA&&kA(e)===!0)return()=>{};throw e}}):e,MA=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,NA=typeof Uint8Array>`u`?[]:new Uint8Array(256),PA=0;PA<MA.length;PA++)NA[MA.charCodeAt(PA)]=PA;var FA=function(e){var t=new Uint8Array(e),n,r=t.length,i=``;for(n=0;n<r;n+=3)i+=MA[t[n]>>2],i+=MA[(t[n]&3)<<4|t[n+1]>>4],i+=MA[(t[n+1]&15)<<2|t[n+2]>>6],i+=MA[t[n+2]&63];return r%3==2?i=i.substring(0,i.length-1)+`=`:r%3==1&&(i=i.substring(0,i.length-2)+`==`),i},IA=new Map;function LA(e,t){let n=IA.get(e);return n||(n=new Map,IA.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var RA=(e,t,n)=>{if(!e||!(VA(e,t)||typeof e==`object`))return;let r=e.constructor.name,i=LA(n,r),a=i.indexOf(e);return a===-1&&(a=i.length,i.push(e)),a};function zA(e,t,n){if(e instanceof Array)return e.map(e=>zA(e,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:FA(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[zA(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}else if(e instanceof HTMLCanvasElement)return{rr_type:`HTMLImageElement`,src:e.toDataURL()};else if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[zA(e.data,t,n),e.width,e.height]};else if(VA(e,t)||typeof e==`object`)return{rr_type:e.constructor.name,index:RA(e,t,n)};return e}var BA=(e,t,n)=>e.map(e=>zA(e,t,n)),VA=(e,t)=>!![`WebGLActiveInfo`,`WebGLBuffer`,`WebGLFramebuffer`,`WebGLProgram`,`WebGLRenderbuffer`,`WebGLShader`,`WebGLShaderPrecisionFormat`,`WebGLTexture`,`WebGLUniformLocation`,`WebGLVertexArrayObject`,`WebGLVertexArrayObjectOES`].filter(e=>typeof t[e]==`function`).find(n=>e instanceof t[n]);function HA(e,t,n,r,i){let a=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let s of o)try{if(typeof t.CanvasRenderingContext2D.prototype[s]!=`function`)continue;let o=xA(t.CanvasRenderingContext2D.prototype,s,function(a){return function(...o){return CA(this.canvas,n,r,i,!0)||DA(()=>{let n=BA(o,t,this);e(this.canvas,{type:OA[`2D`],property:s,args:n})},0),a.apply(this,o)}});a.push(o)}catch{let n=bA(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:OA[`2D`],property:s,args:[t],setter:!0})}});a.push(n)}return()=>{a.forEach(e=>e())}}function UA(e){return e===`experimental-webgl`?`webgl`:e}function WA(e,t,n,r,i){let a=[];try{let o=xA(e.HTMLCanvasElement.prototype,`getContext`,function(e){return function(a,...o){if(!CA(this,t,n,r,!0)){let e=UA(a);if(`__context`in this||(this.__context=e),i&&[`webgl`,`webgl2`].includes(e))if(o[0]&&typeof o[0]==`object`){let e=o[0];e.preserveDrawingBuffer||=!0}else o.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[a,...o])}});a.push(o)}catch{console.error(`failed to patch HTMLCanvasElement.prototype.getContext`)}return()=>{a.forEach(e=>e())}}function GA(e,t,n,r,i,a,o,s){let c=[],l=Object.getOwnPropertyNames(e);for(let o of l)if(![`isContextLost`,`canvas`,`drawingBufferWidth`,`drawingBufferHeight`].includes(o))try{if(typeof e[o]!=`function`)continue;let l=xA(e,o,function(e){return function(...c){let l=e.apply(this,c);if(RA(l,s,this),`tagName`in this.canvas&&!CA(this.canvas,r,i,a,!0)){let e={type:t,property:o,args:BA(c,s,this)};n(this.canvas,e)}return l}});c.push(l)}catch{let r=bA(e,o,{set(e){n(this.canvas,{type:t,property:o,args:[e],setter:!0})}});c.push(r)}return c}function KA(e,t,n,r,i,a){let o=[];return o.push(...GA(t.WebGLRenderingContext.prototype,OA.WebGL,e,n,r,i,a,t)),t.WebGL2RenderingContext!==void 0&&o.push(...GA(t.WebGL2RenderingContext.prototype,OA.WebGL2,e,n,r,i,a,t)),()=>{o.forEach(e=>e())}}var qA=`for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t="undefined"==typeof Uint8Array?[]:new Uint8Array(256),a=0;a<64;a++)t[e.charCodeAt(a)]=a;var n=function(t){var a,n=new Uint8Array(t),r=n.length,s="";for(a=0;a<r;a+=3)s+=e[n[a]>>2],s+=e[(3&n[a])<<4|n[a+1]>>4],s+=e[(15&n[a+1])<<2|n[a+2]>>6],s+=e[63&n[a+2]];return r%3==2?s=s.substring(0,s.length-1)+"=":r%3==1&&(s=s.substring(0,s.length-2)+"=="),s};const r=new Map,s=new Map;const i=self;i.onmessage=async function(e){if(!("OffscreenCanvas"in globalThis))return i.postMessage({id:e.data.id});{const{id:t,bitmap:a,width:o,height:f,maxCanvasSize:c,dataURLOptions:g}=e.data,u=async function(e,t,a){const r=e+"-"+t;if("OffscreenCanvas"in globalThis){if(s.has(r))return s.get(r);const i=new OffscreenCanvas(e,t);i.getContext("2d");const o=await i.convertToBlob(a),f=await o.arrayBuffer(),c=n(f);return s.set(r,c),c}return""}(o,f,g),[h,d]=function(e,t,a){if(!a)return[e,t];const[n,r]=a;if(e<=n&&t<=r)return[e,t];let s=e,i=t;return s>n&&(i=Math.floor(n*t/e),s=n),i>r&&(s=Math.floor(r*e/t),i=r),[s,i]}(o,f,c),l=new OffscreenCanvas(h,d),w=l.getContext("bitmaprenderer"),p=h===o&&d===f?a:await createImageBitmap(a,{resizeWidth:h,resizeHeight:d,resizeQuality:"low"});w?.transferFromImageBitmap(p),a.close();const y=await l.convertToBlob(g),v=y.type,b=await y.arrayBuffer(),m=n(b);if(p.close(),!r.has(t)&&await u===m)return r.set(t,m),i.postMessage({id:t});if(r.get(t)===m)return i.postMessage({id:t});i.postMessage({id:t,type:v,base64:m,width:o,height:f}),r.set(t,m)}};`;function JA(){let e=new Blob([qA]);return URL.createObjectURL(e)}var YA=class{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};let{enableManualSnapshot:t,sampling:n=`all`,win:r,recordCanvas:i,errorHandler:a}=e;e.sampling=n,this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,a&&AA(a),(i&&typeof n==`number`||t)&&(this.worker=this.initFPSWorker()),this.addWindow(r),!t&&jA(()=>{i&&n===`all`&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),i&&typeof n==`number`&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,this.worker?.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(e){let{sampling:t=`all`,blockClass:n,blockSelector:r,unblockSelector:i,recordCanvas:a,enableManualSnapshot:o}=this.options;if(!this.windowsSet.has(e)){if(o){this.windowsSet.add(e),this.windows.push(new WeakRef(e));return}jA(()=>{if(a&&t===`all`&&this.initCanvasMutationObserver(e,n,r,i),a&&typeof t==`number`){let t=WA(e,n,r,i,!0);this.restoreHandlers.push(()=>{t()})}})(),this.windowsSet.add(e),this.windows.push(new WeakRef(e))}}addShadowRoot(e){this.shadowDoms.add(new WeakRef(e))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(e,t){if(t?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,e);return}EA(t=>this.takeSnapshot(t,!0,e))}initFPSWorker(){let e=new Worker(JA());return e.onmessage=e=>{let t=e.data,{id:n}=t;if(this.snapshotInProgressMap.set(n,!1),!(`base64`in t))return;let{base64:r,type:i,width:a,height:o}=t;this.mutationCb({id:n,type:OA[`2D`],commands:[{property:`clearRect`,args:[0,0,a,o]},{property:`drawImage`,args:[{rr_type:`ImageBitmap`,args:[{rr_type:`Blob`,data:[{rr_type:`ArrayBuffer`,base64:r}],type:i}]},0,0,a,o]}]})},e}initCanvasFPSObserver(){let e;if(!this.windows.length&&!this.shadowDoms.size)return;let t=n=>{this.takeSnapshot(n,!1),e=EA(t)};e=EA(t),this.restoreHandlers.push(()=>{e&&cancelAnimationFrame(e)})}initCanvasMutationObserver(e,t,n,r){let i=WA(e,t,n,r,!1),a=HA(this.processMutation.bind(this),e,t,n,r),o=KA(this.processMutation.bind(this),e,t,n,r,this.mirror);this.restoreHandlers.push(()=>{i(),a(),o()})}getCanvasElements(e,t,n){let r=[],i=i=>{i.querySelectorAll(`canvas`).forEach(i=>{CA(i,e,t,n,!0)||r.push(i)})};for(let e of this.windows){let t=e.deref(),n;try{n=t&&t.document}catch{}n&&i(n)}for(let e of this.shadowDoms){let t=e.deref();t&&i(t)}return r}takeSnapshot(e,t,n){let{sampling:r,blockClass:i,blockSelector:a,unblockSelector:o,dataURLOptions:s,maxCanvasSize:c}=this.options,l=1e3/(r===`all`?2:r||2);return this.lastSnapshotTime&&e-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=e,(n?[n]:this.getCanvasElements(i,a,o)).forEach(e=>{let n=this.mirror.getId(e);if(!(!this.mirror.hasNode(e)||!e.width||!e.height||this.snapshotInProgressMap.get(n))){if(this.snapshotInProgressMap.set(n,!0),!t&&[`webgl`,`webgl2`].includes(e.__context)){let t=e.getContext(e.__context);t?.getContextAttributes()?.preserveDrawingBuffer===!1&&t.clear(t.COLOR_BUFFER_BIT)}createImageBitmap(e).then(t=>{this.worker?.postMessage({id:n,bitmap:t,width:e.width,height:e.height,dataURLOptions:s,maxCanvasSize:c},[t])}).catch(e=>{jA(()=>{throw this.snapshotInProgressMap.delete(n),e})()})}}),!0)}startPendingCanvasMutationFlusher(){EA(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,EA(e)};EA(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),EA(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let r=n.map(e=>{let{type:t,...n}=e;return n}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}};try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}mA();var XA;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(XA||={});var ZA={low:{sampling:{canvas:1},dataURLOptions:{type:`image/webp`,quality:.25}},medium:{sampling:{canvas:2},dataURLOptions:{type:`image/webp`,quality:.4}},high:{sampling:{canvas:4},dataURLOptions:{type:`image/webp`,quality:.5}}},QA=`ReplayCanvas`,$A=1280,ej=R(((e={})=>{let[t,n]=e.maxCanvasSize||[],r={quality:e.quality||`medium`,enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,$A):$A,n?Math.min(n,$A):$A]},i,a,o=new Promise(e=>a=e);return{name:QA,getOptions(){let{quality:e,enableManualSnapshot:t,maxCanvasSize:n}=r;return{enableManualSnapshot:t,recordCanvas:!0,getCanvasManager:e=>{let r=new YA({...e,enableManualSnapshot:t,maxCanvasSize:n,errorHandler:e=>{try{typeof e==`object`&&(e.__rrweb__=!0)}catch{}}});return i=r,a(r),r},...ZA[e]||ZA.medium}},async snapshot(e,t){(i||await o).snapshot(e,t)}}}));function tj(e){return e.split(`,`).some(e=>e.trim().startsWith(`sentry-`))}function nj(e){try{return new URL(e,U.location.origin).href}catch{return}}function rj(e){return e.entryType===`resource`&&`initiatorType`in e&&typeof e.nextHopProtocol==`string`&&(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)}function ij(e){try{return new Headers(e)}catch{return}}var aj={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function oj(e,t){let{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:a,tracePropagationTargets:o,onRequestSpanStart:s,onRequestSpanEnd:c}={...aj,...t},l=typeof i==`function`?i:e=>!0,u=e=>lj(e,o),d={},f=e.getOptions().propagateTraceparent;n&&Jm(t=>{let n=ju(t,l,u,d,{propagateTraceparent:f,onRequestSpanEnd:c});if(n){let r=nj(t.fetchData.url),i=r?ya(r).host:void 0;n.setAttributes({"http.url":r?Sa(r):void 0,"server.address":i}),a&&cj(n,e),s?.(n,{headers:t.headers})}}),r&&gx(t=>{let n=uj(t,l,u,d,f,c);n&&(a&&cj(n,e),s?.(n,{headers:ij(t.xhr.__sentry_xhr_v3__?.request_headers)}))})}var sj=300;function cj(e,t){let{url:n}=P(e).data;if(!n||typeof n!=`string`)return;let r=()=>void setTimeout(i);if(Ti(t)){let t=e.end.bind(e);e.end=e=>{let n=e??O(),a=!1,o=()=>{a||(a=!0,setTimeout(i),t(n),clearTimeout(s))};r=o;let s=setTimeout(o,sj)}}let i=ky(`resource`,({entries:t})=>{t.forEach(t=>{rj(t)&&t.name.endsWith(n)&&(e.setAttributes(rb(t)),r())})})}function lj(e,t){let n=ih();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}let a=r.origin===i;return t?ct(r.toString(),t)||a&&ct(r.pathname,t):a}else{let n=!!e.match(/^\/(?!\/)/);return t?ct(e,t):n}}function uj(e,t,n,r,i,a){let o=e.xhr,s=o?.[hx];if(!o||o.__sentry_own_request__||!s)return;let{url:c,method:l}=s,u=zr()&&t(c);if(e.endTimestamp){let t=o.__sentry_xhr_span_id__;if(!t)return;let n=r[t];n&&(u&&s.status_code!==void 0&&(Ln(n,s.status_code),n.end(),a?.(n,{headers:ij(Cx(o)),error:e.error})),delete r[t]);return}let d=nj(c),f=ya(d||c),p=Sa(ba(c)),m=A(),h=!!I()||!!m&&Ti(m),g=u&&h?Ri({name:`${l} ${p}`,attributes:{url:Sa(c),type:`xhr`,"http.method":l,"http.url":d?Sa(d):void 0,"server.address":f?.host,[N]:`auto.http.browser`,[M]:`http.client`,...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new Qr;return u&&!h&&m?.recordDroppedEvent(`no_parent_span`,`span`),o.__sentry_xhr_span_id__=g.spanContext().spanId,r[o.__sentry_xhr_span_id__]=g,n(c)&&dj(o,zr()&&h?g:void 0,i),m&&m.emit(`beforeOutgoingRequestSpan`,g,e),g}function dj(e,t,n){let{"sentry-trace":r,baggage:i,traceparent:a}=kc({span:t,propagateTraceparent:n});r&&fj(e,r,i,a)}function fj(e,t,n,r){let i=e.__sentry_xhr_v3__?.request_headers;if(!(i?.[`sentry-trace`]||!e.setRequestHeader))try{if(e.setRequestHeader(`sentry-trace`,t),r&&!i?.traceparent&&e.setRequestHeader(`traceparent`,r),n){let t=i?.baggage;(!t||!tj(t))&&e.setRequestHeader(`baggage`,n)}}catch{}}var pj=new WeakMap,mj=new WeakMap,hj=9e4,gj=[`text/event-stream`,`application/x-ndjson`,`application/stream+json`],_j=R(()=>({name:`FetchStreamPerformance`,setup(){Ym(e=>{if(e.response){let t=pj.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);let n=mj.get(e.response);n&&clearTimeout(n)}}}),Jm(e=>{if(e.endTimestamp&&e.response){let t=e.response.headers?.get(`content-type`)||``;if(e.response.headers?.get(`content-length`)||!gj.some(e=>t.startsWith(e)))return;let n=e.fetchData?.url||``,r=e.fetchData?.method||`GET`,i=_a(n),a=Ri({name:`${r} ${n.startsWith(`data:`)?Sa(n):i?va(i):n}`,startTime:e.endTimestamp,attributes:{url:Sa(n),"http.method":r,type:`fetch`,[M]:`http.client.stream`,[N]:`auto.http.browser.stream`}});pj.set(e.response,a);let o=setTimeout(()=>{a.isRecording()&&a.end()},hj);mj.set(e.response,o)}})}})),vj=`WebVitals`,yj=R((e={})=>{let t=new Set(e.ignore??[]);return{name:vj,setup(n){let r=Ti(n),{enableStandaloneClsSpans:i,enableStandaloneLcpSpans:a}=e._experiments??{},o=r||t.has(`cls`)?void 0:i||!1,s=r||t.has(`lcp`)?void 0:a||!1,c=ub({recordClsStandaloneSpans:o,recordLcpStandaloneSpans:s,client:n}),l=new WeakSet;n.on(`afterStartPageLoadSpan`,e=>{l.add(e)}),n.on(`spanEnd`,e=>{l.delete(e)&&(c(),yb(e,{recordClsOnPageloadSpan:o===!1,recordLcpOnPageloadSpan:s===!1,spanStreamingEnabled:r}))}),r?(t.has(`lcp`)||Gb(n),t.has(`cls`)||qb(n),t.has(`inp`)||Yb()):t.has(`inp`)||Rb()},afterAllSetup(){t.has(`inp`)||Ub()}}});function bj(){U.document?U.document.addEventListener(`visibilitychange`,()=>{let e=I();if(!e)return;let t=F(e);if(U.document.hidden&&t){let e=`cancelled`,{op:n,status:r}=P(t);K&&x.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r||t.setStatus({code:2,message:e}),t.setAttribute(`sentry.cancellation_reason`,`document.hidden`),t.end()}}):K&&x.warn(`[Tracing] Could not set up background tab detection due to lack of global document`)}var xj=`sentry_previous_trace`,Sj=`sentry.previous_trace`;function Cj(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t===`session-storage`,i=r?Ej():void 0;e.on(`spanStart`,e=>{if(F(e)!==e)return;let t=k().getPropagationContext();i=wj(i,e,t),r&&Tj(i)});let a=!0;n&&e.on(`beforeSampling`,e=>{if(!i)return;let t=k(),n=t.getPropagationContext();if(a&&n.parentSpanId){a=!1;return}t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(Dj(i.spanContext))},sampleRand:i.sampleRand}),e.parentSampled=Dj(i.spanContext),e.parentSampleRate=i.sampleRate,e.spanAttributes={...e.spanAttributes,[gn]:i.sampleRate}})}function wj(e,t,n){let r=P(t);function i(){try{let e=Number(r.data?.[`sentry.sample_rate`]??n.dsc?.sample_rate);return Number.isNaN(e)?0:e}catch{return 0}}let a={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return a;let o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&(K&&x.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:o,attributes:{[Pn]:`previous_trace`}}),t.setAttribute(Sj,`${o.traceId}-${o.spanId}-${+!!Dj(o)}`)),a)}function Tj(e){try{U.sessionStorage.setItem(xj,JSON.stringify(e))}catch(e){K&&x.warn(`Could not store previous trace in sessionStorage`,e)}}function Ej(){try{let e=U.sessionStorage?.getItem(xj);return JSON.parse(e)}catch{return}}function Dj(e){return e.traceFlags===1}var Oj=`BrowserTracing`,kj=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function Aj(){let e=U.navigator;return e?.userAgent?kj.test(e.userAgent):!1}var jj={...$i,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:`in-memory`,consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...aj},Mj=((e={})=>{`enableElementTiming`in e&&f(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let t={name:void 0,source:void 0},n=U.document,{enableInp:r,enableLongTask:a,enableLongAnimationFrame:o,_experiments:{enableInteractions:s,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:l},beforeStartSpan:u,idleTimeout:d,finalTimeout:p,childSpanTimeout:m,markBackgroundSpan:h,traceFetch:g,traceXHR:_,trackFetchStreamPerformance:v,shouldCreateSpanForRequest:y,enableHTTPTimings:b,ignoreResourceSpans:S,ignorePerformanceApiSpans:C,instrumentPageLoad:w,instrumentNavigation:T,detectRedirects:ee,linkPreviousTrace:te,consistentTraceSampling:ne,enableReportPageLoaded:re,onRequestSpanStart:ie,onRequestSpanEnd:ae}={...jj,...e},oe=Aj(),se,E;function ce(e,r,i=!0){let a=r.op===`pageload`,o=r.name,s=u?u(r):r,c=s.attributes||{};if(o!==s.name&&(c[j]=`custom`,s.attributes=c),!i){let e=xt();Ri({...s,startTime:e}).end(e);return}t.name=s.name,t.source=c[j];let l=ia(s,{idleTimeout:d,finalTimeout:p,childSpanTimeout:m,disableAutoFinish:a,beforeSpanEnd:t=>{vb(t,{ignoreResourceSpans:S,ignorePerformanceApiSpans:C,spanStreamingEnabled:Ti(e)}),Bj(e,void 0);let n=k(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:l.spanContext().traceId,sampled:Er(l),dsc:Xr(t)}),a&&(E=void 0)},trimIdleSpanEndTimestamp:!re});a&&re&&(E=l),Bj(e,l);function f(){n&&[`interactive`,`complete`].includes(n.readyState)&&e.emit(`idleSpanEnableAutoFinish`,l)}a&&!re&&n&&(n.addEventListener(`readystatechange`,()=>{f()}),f())}return{name:Oj,setup(e){if(oe){K&&x.log(`[Tracing] Skipping browserTracingIntegration setup for bot user agent.`);return}if(Rr(),o&&i.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes(`long-animation-frame`)?fb():a&&db(),s&&pb(),ee&&n){let e=()=>{se=O()};addEventListener(`click`,e,{capture:!0}),addEventListener(`keydown`,e,{capture:!0,passive:!0})}function t(){let t=zj(e);t&&!P(t).timestamp&&(K&&x.log(`[Tracing] Finishing current active span with op: ${P(t).op}`),t.setAttribute(_n,`cancelled`),t.end())}e.on(`startNavigationSpan`,(n,r)=>{if(A()!==e)return;if(r?.isRedirect){K&&x.warn(`[Tracing] Detected redirect, navigation span will not be the root span, but a child span.`),ce(e,{op:`navigation.redirect`,...n},!1);return}se=void 0,t(),un().setPropagationContext({traceId:Mt(),sampleRand:Math.random(),propagationSpanId:zr()?void 0:Nt()});let i=k();i.setPropagationContext({traceId:Mt(),sampleRand:Math.random(),propagationSpanId:zr()?void 0:Nt()}),i.setSDKProcessingMetadata({normalizedRequest:void 0}),ce(e,{op:`navigation`,...n,parentSpan:null,forceTransaction:!0})}),e.on(`startPageLoadSpan`,(n,r={})=>{if(A()!==e)return;t();let i=sr(r.sentryTrace||Fj(`sentry-trace`)||Ij(`sentry-trace`),r.baggage||Fj(`baggage`)||Ij(`baggage`)),a=k();a.setPropagationContext(i),zr()||(a.getPropagationContext().propagationSpanId=Nt()),a.setSDKProcessingMetadata({normalizedRequest:$_()}),ce(e,{op:`pageload`,...n})}),e.on(`endPageloadSpan`,()=>{re&&E&&(E.setAttribute(_n,`reportPageLoaded`),E.end())})},afterAllSetup(e){if(oe)return;e.addIntegration&&!e.getIntegrationByName?.(`WebVitals`)&&e.addIntegration(yj({ignore:r?[]:[`inp`],_experiments:{enableStandaloneClsSpans:c,enableStandaloneLcpSpans:l}}));let n=ih();if(te!==`off`&&Cj(e,{linkPreviousTrace:te,consistentTraceSampling:ne}),U.location){if(w){let t=Et();Nj(e,{name:U.location.pathname,startTime:t?t/1e3:void 0,attributes:{[j]:`url`,[N]:`auto.pageload.browser`}})}T&&cx(({to:t,from:r})=>{if(r===void 0&&n?.indexOf(t)!==-1){n=void 0;return}n=void 0;let i=_a(t),a=zj(e),o=a&&ee&&Hj(a,se);Pj(e,{name:i?.pathname||U.location.pathname,attributes:{[j]:`url`,[N]:`auto.navigation.browser`}},{url:t,isRedirect:o})})}h&&bj(),s&&Lj(e,d,p,m,t),oj(e,{traceFetch:g,traceXHR:_,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:y,enableHTTPTimings:b,onRequestSpanStart:ie,onRequestSpanEnd:ae}),v&&e.addIntegration(_j())}}});function Nj(e,t,n){e.emit(`startPageLoadSpan`,t,n),k().setTransactionName(t.name);let r=zj(e);return r&&e.emit(`afterStartPageLoadSpan`,r),r}function Pj(e,t,n){let{url:r,isRedirect:i}=n||{};e.emit(`beforeStartNavigationSpan`,t,{isRedirect:i}),e.emit(`startNavigationSpan`,t,{isRedirect:i});let a=k();return a.setTransactionName(t.name),r&&!i&&a.setSDKProcessingMetadata({normalizedRequest:{...$_(),url:r}}),zj(e)}function Fj(e){return(U.document?.querySelector(`meta[name=${e}]`))?.getAttribute(`content`)||void 0}function Ij(e){return(U.performance?.getEntriesByType?.(`navigation`)[0])?.serverTiming?.find(t=>t.name===e)?.description}function Lj(e,t,n,r,i){let a=U.document,o;a&&addEventListener(`click`,()=>{let a=`ui.action.click`,s=zj(e);if(s){let e=P(s).op;if([`navigation`,`pageload`].includes(e)){K&&x.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(o&&=(o.setAttribute(_n,`interactionInterrupted`),o.end(),void 0),!i.name){K&&x.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}o=ia({name:i.name,op:a,attributes:{[j]:i.source||`url`}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})},{capture:!0})}var Rj=`_sentry_idleSpan`;function zj(e){return e[Rj]}function Bj(e,t){Me(e,Rj,t)}var Vj=1.5;function Hj(e,t){let n=P(e),r=xt();return!(r-n.start_timestamp>Vj||t&&r-t<=Vj)}function Uj(e=A()){e?.emit(`endPageloadSpan`)}function Wj(e){let t=I();if(t===e)return;let n=k();e.end=new Proxy(e.end,{apply(e,r,i){return Lt(n,t),Reflect.apply(e,r,i)}}),Lt(n,e)}var Gj=R(()=>({name:`SpanStreaming`,beforeSetup(e){let t=e.getOptions();t.traceLifecycle||=(K&&x.log('[SpanStreaming] setting `traceLifecycle` to "stream"'),`stream`)},setup(e){let t=`SpanStreaming integration requires`,n=`Falling back to static trace lifecycle.`,r=e.getOptions();if(!Ti(e)){r.traceLifecycle=`static`,K&&x.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}let i=r.beforeSendSpan;if(i&&!ei(i)){r.traceLifecycle=`static`,K&&x.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}let a=new Bm(e);e.on(`afterSpanEnd`,t=>{Er(t)&&a.add(wa(t,e))}),e.on(`afterSegmentSpanEnd`,e=>{let t=e.spanContext().traceId;setTimeout(()=>{a.flush(t)},500)})}}));function Kj(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function qj(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=Kj(n);return e=>r.then(n=>e(n.transaction(t,`readwrite`).objectStore(t)))}function Jj(e){return Kj(e.getAllKeys())}function Yj(e,t,n){return e(e=>Jj(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.max(...r,0)+1),Kj(e.transaction)}))}function Xj(e,t,n){return e(e=>Jj(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.min(...r,0)-1),Kj(e.transaction)}))}function Zj(e){return e(e=>Jj(e).then(t=>{let n=t[0];if(n!=null)return Kj(e.get(n)).then(t=>(e.delete(n),Kj(e.transaction).then(()=>t)))}))}function Qj(e){let t;function n(){return t??=qj(e.dbName||`sentry-offline`,e.storeName||`queue`),t}return{push:async t=>{try{let r=si(t);await Yj(n(),r,e.maxQueueSize||30)}catch{}},unshift:async t=>{try{let r=si(t);await Xj(n(),r,e.maxQueueSize||30)}catch{}},shift:async()=>{try{let e=await Zj(n());if(e)return li(e)}catch{}}}}function $j(e){return t=>{let n=e({...t,createStore:Qj});return U.addEventListener(`online`,async e=>{await n.flush()}),n}}function eM(e=Ex){return $j(uc(e))}var tM=1e6,nM=`window`in i&&i.window===i&&typeof importScripts>`u`,rM=`0`,iM=nM?`main`:`worker`,aM=U.navigator,oM=``,sM=``,cM=``,lM=aM?.userAgent||``,uM=``,dM=aM?.language||aM?.languages?.[0]||``;function fM(e){return typeof e==`object`&&!!e&&`getHighEntropyValues`in e}var pM=aM?.userAgentData;fM(pM)&&pM.getHighEntropyValues([`architecture`,`model`,`platform`,`platformVersion`,`fullVersionList`]).then(e=>{if(oM=e.platform||``,cM=e.architecture||``,uM=e.model||``,sM=e.platformVersion||``,e.fullVersionList?.length){let t=e.fullVersionList[e.fullVersionList.length-1];lM=`${t.brand} ${t.version}`}}).catch(e=>void 0);function mM(e){return!(`thread_metadata`in e)}function hM(e){return mM(e)?SM(e):e}function gM(e){let t=e.contexts?.trace?.trace_id;return typeof t==`string`&&t.length!==32&&K&&x.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t==`string`?t:``}function _M(e,t,n,r){if(r.type!==`transaction`)throw TypeError(`Profiling events may only be attached to transactions, this should never occur.`);if(n==null)throw TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);let i=gM(r),a=hM(n),o=t||(typeof r.start_timestamp==`number`?r.start_timestamp*1e3:O()*1e3),s=typeof r.timestamp==`number`?r.timestamp*1e3:O()*1e3;return{event_id:e,timestamp:new Date(o).toISOString(),platform:`javascript`,version:`1`,release:r.release||``,environment:r.environment||`production`,runtime:{name:`javascript`,version:U.navigator.userAgent},os:{name:oM,version:sM,build_number:lM},device:{locale:dM,model:uM,manufacturer:lM,architecture:cM,is_emulator:!1},debug_meta:{images:TM(n.resources)},profile:a,transactions:[{name:r.transaction||``,id:r.event_id||ft(),trace_id:i,active_thread_id:rM,relative_start_ns:`0`,relative_end_ns:((s-o)*1e6).toFixed(0)}]}}function vM(e,t,n){if(e==null)throw TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);let r=bM(e),i=t.getOptions(),a=t.getSdkMetadata?.()?.sdk;return{chunk_id:ft(),client_sdk:{name:a?.name??`sentry.javascript.browser`,version:a?.version??`0.0.0`},profiler_id:n||ft(),platform:`javascript`,version:`2`,release:i.release??``,environment:i.environment??`production`,debug_meta:{images:TM(e.resources)},profile:r}}function yM(e){try{if(!e||typeof e!=`object`)return{reason:`chunk is not an object`};let t=e=>typeof e==`string`&&/^[a-f0-9]{32}$/.test(e);if(!t(e.profiler_id))return{reason:`missing or invalid profiler_id`};if(!t(e.chunk_id))return{reason:`missing or invalid chunk_id`};if(!e.client_sdk)return{reason:`missing client_sdk metadata`};let n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:`profile has no frames`}:!Array.isArray(n.stacks)||!n.stacks.length?{reason:`profile has no stacks`}:!Array.isArray(n.samples)||!n.samples.length?{reason:`profile has no samples`}:{valid:!0}:{reason:`missing profile data`}}catch(e){return{reason:`unknown validation error: ${e}`}}}function bM(e){let t=[];for(let n=0;n<e.frames.length;n++){let r=e.frames[n];r&&(t[n]={function:r.name,abs_path:typeof r.resourceId==`number`?e.resources[r.resourceId]:void 0,lineno:r.line,colno:r.column})}let n=[];for(let t=0;t<e.stacks.length;t++){let r=e.stacks[t];if(!r)continue;let i=[],a=r;for(;a;)i.push(a.frameId),a=a.parentId===void 0?void 0:e.stacks[a.parentId];n[t]=i}let r=Et(),i=typeof performance.timeOrigin==`number`?performance.timeOrigin:r||0,a=i-(r||i),o=[];for(let t=0;t<e.samples.length;t++){let n=e.samples[t];if(!n)continue;let r=(i+(n.timestamp-a))/1e3;o[t]={stack_id:n.stackId??0,thread_id:rM,timestamp:r}}return{frames:t,stacks:n,samples:o,thread_metadata:{[rM]:{name:iM}}}}function xM(e){return P(e).op===`pageload`}function SM(e){let t,n=0,r={samples:[],stacks:[],frames:[],thread_metadata:{[rM]:{name:iM}}},i=e.samples[0];if(!i)return r;let a=i.timestamp,o=Et(),s=typeof performance.timeOrigin==`number`?performance.timeOrigin:o||0,c=s-(o||s);return e.samples.forEach((i,o)=>{if(i.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[o]={elapsed_since_start_ns:((i.timestamp+c-a)*tM).toFixed(0),stack_id:t,thread_id:rM};return}let s=e.stacks[i.stackId],l=[];for(;s;){l.push(s.frameId);let t=e.frames[s.frameId];t&&r.frames[s.frameId]===void 0&&(r.frames[s.frameId]={function:t.name,abs_path:typeof t.resourceId==`number`?e.resources[t.resourceId]:void 0,lineno:t.line,colno:t.column}),s=s.parentId===void 0?void 0:e.stacks[s.parentId]}let u={elapsed_since_start_ns:((i.timestamp+c-a)*tM).toFixed(0),stack_id:n,thread_id:rM};r.stacks[n]=l,r.samples[o]=u,n++}),r}function CM(e,t){if(!t.length)return e;for(let n of t)e[1].push([{type:`profile`},n]);return e}function wM(e){let t=[];return ri(e,(e,n)=>{if(n===`transaction`)for(let n=1;n<e.length;n++)e[n]?.contexts?.profile?.profile_id&&t.push(e[n])}),t}function TM(e){let t=A()?.getOptions()?.stackParser;return t?Ya(t,e):[]}function EM(e){return typeof e!=`number`&&typeof e!=`boolean`||typeof e==`number`&&isNaN(e)?(K&&x.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(K&&x.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function DM(e){return e.samples.length<2?(K&&x.log(`[Profiling] Discarding profile because it contains less than 2 samples`),!1):e.frames.length?!0:(K&&x.log(`[Profiling] Discarding profile because it contains no frames`),!1)}var OM=!1,kM=3e4;function AM(e){return typeof e==`function`}function jM(){let e=U.Profiler;if(!AM(e)){K&&x.log(`[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.`);return}let t=Math.floor(kM/10);try{return new e({sampleInterval:10,maxBufferSize:t})}catch{K&&(x.log(`[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header.`),x.log(`[Profiling] Disabling profiling for current user session.`)),OM=!0}}function MM(e){if(OM)return K&&x.log(`[Profiling] Profiling has been disabled for the duration of the current user session.`),!1;if(!e.isRecording())return K&&x.log(`[Profiling] Discarding profile because root span was not sampled.`),!1;let t=A()?.getOptions();if(!t)return K&&x.log(`[Profiling] Profiling disabled, no options found.`),!1;let n=t.profilesSampleRate;return EM(n)?n?n===!0||Math.random()<n?!0:(K&&x.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(n)})`),!1):(K&&x.log(`[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0`),!1):(K&&x.warn(`[Profiling] Discarding profile because of invalid sample rate.`),!1)}function NM(e){if(OM)return K&&x.log(`[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started.`),!1;if(e.profileLifecycle!==`trace`&&e.profileLifecycle!==`manual`)return K&&x.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;let t=e.profileSessionSampleRate;return EM(t)?t?Math.random()<=t:(K&&x.log(`[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0`),!1):(K&&x.warn(`[Profiling] Discarding profile because of invalid profileSessionSampleRate.`),!1)}function PM(e){return e.profilesSampleRate!==void 0}function FM(e,t,n,r){return DM(n)?_M(e,t,n,r):null}var IM=new Map;function LM(){return IM.size}function RM(e){let t=IM.get(e);return t&&IM.delete(e),t}function zM(e,t){if(IM.set(e,t),IM.size>30){let e=IM.keys().next().value;e!==void 0&&IM.delete(e)}}var BM=new WeakSet;function VM(e){e.setAttribute(`thread.id`,rM),e.setAttribute(`thread.name`,iM)}function HM(e){let t;xM(e)&&(t=O()*1e3);let n=jM();if(!n)return;K&&x.log(`[Profiling] started profiling span: ${P(e).description}`);let r=ft(),i=null;k().setContext(`profile`,{profile_id:r,start_timestamp:t}),BM.add(e),VM(e);async function a(){if(e&&n){if(i){K&&x.log(`[Profiling] profile for:`,P(e).description,`already exists, returning early`);return}return n.stop().then(t=>{if(o&&=(U.clearTimeout(o),void 0),K&&x.log(`[Profiling] stopped profiling of span: ${P(e).description}`),!t){K&&x.log(`[Profiling] profiler returned null profile for: ${P(e).description}`,`this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started`);return}i=t,zM(r,t)}).catch(e=>{K&&x.log(`[Profiling] error while stopping profiler:`,e)})}}let o=U.setTimeout(()=>{K&&x.log(`[Profiling] max profile duration elapsed, stopping profiling for:`,P(e).description),a()},kM),s=e.end.bind(e);function c(){return e?(a().then(()=>{s()},()=>{s()}),e):s()}e.end=c}var UM=6e4,WM=3e5,GM=class{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(e){let t=e.getOptions().profileLifecycle,n=NM(e.getOptions());K&&x.log(`[Profiling] Initializing profiler (lifecycle='${t}').`),n||K&&x.log(`[Profiling] Session not sampled. Skipping lifecycle profiler initialization.`),this._profilerId=ft(),this._client=e,this._sessionSampled=n,this._lifecycleMode=t,t===`trace`&&this._setupTraceLifecycleListeners(e),e.on(`spanStart`,e=>{this._isRunning&&VM(e)})}start(){if(this._lifecycleMode===`trace`){K&&x.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){K&&x.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){K&&x.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode===`trace`){K&&x.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){K&&x.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(e){if(this._lifecycleMode!==`trace`||!this._sessionSampled)return;let t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);let n=this._activeRootSpanIds.size;n===1&&(K&&x.log(`[Profiling] Detected already active root span during setup. Active root spans now:`,n),this._beginProfiling()),this._isRunning&&VM(e)}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,K&&x.log(`[Profiling] Started profiling with profiler ID:`,this._profilerId),dn().setContext(`profile`,{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){K&&x.log(`[Profiling] Failed to start JS Profiler; stopping.`),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&=(clearTimeout(this._chunkTimer),void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(e=>{K&&x.error("[Profiling] Failed to collect current profile chunk on `stop()`:",e)}),this._lifecycleMode===`manual`&&dn().setContext(`profile`,{}))}_setupTraceLifecycleListeners(e){e.on(`spanStart`,e=>{if(!this._sessionSampled){K&&x.log(`[Profiling] Span not profiled because of negative sampling decision for user session.`);return}if(e!==F(e))return;if(!e.isRecording()){K&&x.log(`[Profiling] Discarding profile because root span was not sampled.`);return}let t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);let n=this._activeRootSpanIds.size;n===1&&(K&&x.log(`[Profiling] Root span ${t} started. Profiling active while there are active root spans (count=${n}).`),this._beginProfiling())}),e.on(`spanEnd`,e=>{if(!this._sessionSampled)return;let t=e.spanContext().spanId;if(!t||!this._activeRootSpanIds.has(t))return;this._activeRootSpanIds.delete(t);let n=this._activeRootSpanIds.size;K&&x.log(`[Profiling] Root span with ID ${t} ended. Will continue profiling for as long as there are active root spans (currently: ${n}).`),n===0&&(this._collectCurrentChunk().catch(e=>{K&&x.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",e)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,dn().setContext(`profile`,{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(e=>clearTimeout(e)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(e){this._activeRootSpanIds.add(e);let t=setTimeout(()=>this._onRootSpanTimeout(e),WM);this._rootSpanTimeouts.set(e,t)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;let e=jM();if(!e){K&&x.log(`[Profiling] Failed to start JS Profiler.`);return}this._profiler=e}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(e=>{K&&x.error(`[Profiling] Failed to collect current profile chunk during periodic chunking:`,e)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},UM))}_onRootSpanTimeout(e){this._rootSpanTimeouts.has(e)&&(this._rootSpanTimeouts.delete(e),this._activeRootSpanIds.has(e)&&(K&&x.log(`[Profiling] Reached 5-minute timeout for root span ${e}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(e),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){let e=this._profiler;if(this._profiler=void 0,e)try{let t=vM(await e.stop(),this._client,this._profilerId),n=yM(t);if(`reason`in n){K&&x.log(`[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):`,n.reason);return}this._sendProfileChunk(t),K&&x.log(`[Profiling] Collected browser profile chunk.`)}catch(e){K&&x.log(`[Profiling] Error while stopping JS Profiler for chunk:`,e)}}_sendProfileChunk(e){let t=this._client,n=hi(t.getSdkMetadata?.()),r=t.getDsn(),i=t.getOptions().tunnel,a=ti({event_id:ft(),sent_at:new Date().toISOString(),...n&&{sdk:n},...!!i&&r&&{dsn:Zn(r)}},[[{type:`profile_chunk`,platform:`javascript`},e]]);t.sendEnvelope(a).then(null,e=>{K&&x.error(`Error while sending profile chunk envelope:`,e)})}},KM=`BrowserProfiling`,qM=R((()=>({name:KM,setup(e){let t=e.getOptions(),n=new GM;if(!PM(t)&&!t.profileLifecycle&&(t.profileLifecycle=`manual`),PM(t)&&!t.profilesSampleRate){K&&x.log(`[Profiling] Profiling disabled, no profiling options found.`);return}let r=I(),i=r&&F(r);if(PM(t)&&t.profileSessionSampleRate!==void 0&&K&&x.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),PM(t))i&&xM(i)&&MM(i)&&HM(i),e.on(`spanStart`,e=>{let t=F(e);e===t?MM(e)&&HM(e):BM.has(t)&&VM(e)}),e.on(`beforeEnvelope`,e=>{if(!LM())return;let t=wM(e);if(!t.length)return;let n=[];for(let e of t){let t=e?.contexts,r=t?.profile?.profile_id,i=t?.profile?.start_timestamp;if(typeof r!=`string`){K&&x.log(`[Profiling] cannot find profile for a span without a profile context`);continue}if(!r){K&&x.log(`[Profiling] cannot find profile for a span without a profile context`);continue}t?.profile&&delete t.profile;let a=RM(r);if(!a){K&&x.log(`[Profiling] Could not retrieve profile for span: ${r}`);continue}let o=FM(r,i,a,e);o&&n.push(o)}CM(e,n)});else{let r=t.profileLifecycle;if(e.on(`startUIProfiler`,()=>n.start()),e.on(`stopUIProfiler`,()=>n.stop()),r===`manual`)n.initialize(e);else if(r===`trace`){if(!zr(t)){K&&x.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),i&&n.notifyRootSpanActive(i),U.setTimeout(()=>{let e=I(),t=e&&F(e);t&&n.notifyRootSpanActive(t)},0)}}}}))),JM=`SpotlightBrowser`,YM=[{op:`ui.interaction.click`,name:`#sentry-spotlight`}],XM=((e={})=>{let t=e.sidecarUrl||`http://localhost:8969/stream`;return{name:JM,setup:()=>{K&&x.log(`Using Sidecar URL`,t)},beforeSetup(e){let t=e.getOptions();t.ignoreSpans=[...t.ignoreSpans||[],...YM]},afterAllSetup:e=>{ZM(e,t)}}});function ZM(e,t){let n=fx(`fetch`),r=0;e.on(`beforeEnvelope`,e=>{if(r>3){x.warn(`[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:`,r);return}n(t,{method:`POST`,body:si(e),headers:{"Content-Type":`application/x-sentry-envelope`},mode:`cors`}).then(e=>{e.status>=200&&e.status<400&&(r=0)},e=>{r++,x.error(`Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/`,e)})})}var QM=R(XM),$M=R(()=>({name:`LaunchDarkly`,processEvent(e,t,n){return Su(e)}}));function eN(){return{name:`sentry-flag-auditor`,type:`flag-used`,synchronous:!0,method:(e,t,n)=>{Cu(e,t.value),Tu(e,t.value)}}}var tN=R(()=>({name:`OpenFeature`,processEvent(e,t,n){return Su(e)}})),nN=class{after(e,t){Cu(t.flagKey,t.value),Tu(t.flagKey,t.value)}error(e,t,n){Cu(e.flagKey,e.defaultValue),Tu(e.flagKey,e.defaultValue)}},rN=R(({featureFlagClientClass:e})=>({name:`Unleash`,setupOnce(){let t=e.prototype;je(t,`isEnabled`,iN)},processEvent(e,t,n){return Su(e)}}));function iN(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n==`string`&&typeof r==`boolean`?(Cu(n,r),Tu(n,r)):K&&x.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}var aN=(({growthbookClass:e})=>Du({growthbookClass:e})),oN=R(({featureFlagClient:e})=>({name:`Statsig`,setup(t){e.on(`gate_evaluation`,e=>{Cu(e.gate.name,e.gate.value),Tu(e.gate.name,e.gate.value)})},processEvent(e,t,n){return Su(e)}}));async function sN(){let e=A();if(!e)return`no-client-active`;if(!e.getDsn())return`no-dsn-configured`;let t=e.getOptions().tunnel||`https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7`;try{await Vi(()=>fetch(t,{body:`{}`,method:`POST`,mode:`cors`,credentials:`omit`}))}catch{return`sentry-unreachable`}}var cN=`WebWorker`,lN=R(({worker:e})=>({name:cN,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(e=>uN(e))},addWorker:e=>uN(e)}));function uN(e){e.addEventListener(`message`,e=>{if(pN(e.data)){if(e.stopImmediatePropagation(),e.data._sentryDebugIds&&(K&&x.log(`Sentry debugId web worker message received`,e.data),U._sentryDebugIds={...e.data._sentryDebugIds,...U._sentryDebugIds}),e.data._sentryModuleMetadata&&(K&&x.log(`Sentry module metadata web worker message received`,e.data),U._sentryModuleMetadata={...e.data._sentryModuleMetadata,...U._sentryModuleMetadata}),e.data._sentryWasmImages){K&&x.log(`Sentry WASM images web worker message received`,e.data);let t=U._sentryWasmImages||[],n=e.data._sentryWasmImages.filter(e=>Te(e)&&typeof e.code_file==`string`&&!t.some(t=>t.code_file===e.code_file));U._sentryWasmImages=[...t,...n]}e.data._sentryWorkerError&&(K&&x.log(`Sentry worker rejection message received`,e.data._sentryWorkerError),dN(e.data._sentryWorkerError))}})}function dN(e){let t=A();if(!t)return;let n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,i=e.reason,a=we(i)?kS(i):bv(n,i,void 0,r,!0);a.level=`error`,e.filename&&(a.contexts={...a.contexts,worker:{filename:e.filename}}),co(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.web_worker.onunhandledrejection`}}),K&&x.log(`Captured worker unhandled rejection`,i)}function fN({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener(`unhandledrejection`,t=>{let n={reason:OS(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:n}),K&&x.log(`[Sentry Worker] Forwarding unhandled rejection to parent`,n)}),K&&x.log(`[Sentry Worker] Registered worker with unhandled rejection handling`)}function pN(e){if(!Te(e)||e._sentryMessage!==!0)return!1;let t=`_sentryDebugIds`in e,n=`_sentryModuleMetadata`in e,r=`_sentryWorkerError`in e,i=`_sentryWasmImages`in e;return!(!t&&!n&&!r&&!i||t&&!(Te(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(Te(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!Te(e._sentryWorkerError)||i&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(e=>Te(e)&&typeof e.code_file==`string`)))}var mN=e(n());function hN(e){return Te(e)&&`nativeEvent`in e&&`preventDefault`in e&&`stopPropagation`in e}function gN(e){let t={...e};Oc(t,`react`),lo(`react`,{version:mN.version});let n=GS(t);return Ye(_N),n}function _N(e){return hN(e)?`[SyntheticEvent]`:BS(e)}function vN(e){let t=e.match(/^([^.]+)/);return t!==null&&parseInt(t[0])>=17}function yN(e,t){let n=new WeakSet;function r(e,t){if(!n.has(e)){if(e.cause)return n.add(e),r(e.cause,t);e.cause=t}}r(e,t)}function bN(e,{componentStack:t},n){if(vN(mN.version)&&ve(e)&&t){let n=Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,yN(e,n)}return L(e,n)}function xN(e){return(t,n)=>{let r=!!e,i=bN(t,n,{mechanism:{handled:r,type:`auto.function.react.error_handler`}});r&&e(t,n,i)}}var SN=`ui.react.render`,CN=`ui.react.update`,wN=`ui.react.mount`,TN={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},EN={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},DN={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ON={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},kN=Symbol.for(`react.forward_ref`),AN=Symbol.for(`react.memo`);function jN(e){return typeof e==`object`&&!!e&&e.$$typeof===AN}var MN={};MN[kN]=DN,MN[AN]=ON;function NN(e){if(jN(e))return ON;let t=e.$$typeof;return t&&MN[t]||TN}var PN=Object.defineProperty.bind(Object),FN=Object.getOwnPropertyNames.bind(Object),IN=Object.getOwnPropertySymbols?.bind(Object),LN=Object.getOwnPropertyDescriptor.bind(Object),RN=Object.getPrototypeOf.bind(Object),zN=Object.prototype;function BN(e,t,n){if(typeof t!=`string`){if(zN){let n=RN(t);n&&n!==zN&&BN(e,n)}let n=FN(t);IN&&(n=n.concat(IN(t)));let r=NN(e),i=NN(t);for(let a of n)if(!EN[a]&&!i?.[a]&&!r?.[a]&&!LN(e,a)){let n=LN(t,a);if(n)try{PN(e,a,n)}catch{}}}return e}var VN=class extends mN.Component{constructor(e){super(e);let{name:t,disabled:n=!1}=this.props;n||(this._mountSpan=Ri({name:`<${t}>`,onlyIfParent:!0,op:wN,attributes:{[N]:`auto.ui.react.profiler`,"ui.component_name":t}}))}componentDidMount(){this._mountSpan&&this._mountSpan.end()}shouldComponentUpdate({updateProps:e,includeUpdates:t=!0}){if(t&&this._mountSpan&&e!==this.props.updateProps){let t=Object.keys(e).filter(t=>e[t]!==this.props.updateProps[t]);if(t.length>0){let e=O();this._updateSpan=Bi(this._mountSpan,()=>Ri({name:`<${this.props.name}>`,onlyIfParent:!0,op:CN,startTime:e,attributes:{[N]:`auto.ui.react.profiler`,"ui.component_name":this.props.name,"ui.react.changed_props":t}}))}}return!0}componentDidUpdate(){this._updateSpan&&=(this._updateSpan.end(),void 0)}componentWillUnmount(){let e=O(),{name:t,includeRender:n=!0}=this.props;if(this._mountSpan&&n){let n=P(this._mountSpan).timestamp;Bi(this._mountSpan,()=>{let r=Ri({onlyIfParent:!0,name:`<${t}>`,op:SN,startTime:n,attributes:{[N]:`auto.ui.react.profiler`,"ui.component_name":t}});r&&r.end(e)})}}render(){return this.props.children}};Object.assign(VN,{defaultProps:{disabled:!1,includeRender:!0,includeUpdates:!0}});function HN(e,t){let n=t?.name||e.displayName||e.name||`unknown`,r=r=>mN.createElement(VN,{...t,name:n,updateProps:r},mN.createElement(e,{...r}));return r.displayName=`profiler(${n})`,BN(r,e),r}function UN(e,t={disabled:!1,hasRenderSpan:!0}){let[n]=mN.useState(()=>{if(!t?.disabled)return Ri({name:`<${e}>`,onlyIfParent:!0,op:wN,attributes:{[N]:`auto.ui.react.profiler`,"ui.component_name":e}})});mN.useEffect(()=>(n&&n.end(),()=>{if(n&&t.hasRenderSpan){let t=P(n).timestamp,r=O(),i=Ri({name:`<${e}>`,onlyIfParent:!0,op:SN,startTime:t,attributes:{[N]:`auto.ui.react.profiler`,"ui.component_name":e}});i&&i.end(r)}}),[])}var WN=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,GN={componentStack:null,error:null,eventId:null},KN=class extends mN.Component{constructor(e){super(e),this.state=GN,this._openFallbackReportDialog=!0;let t=A();t&&e.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=t.on(`afterSendEvent`,t=>{!t.type&&this._lastEventId&&t.event_id===this._lastEventId&&JS({...e.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(e,t){let{componentStack:n}=t,{beforeCapture:r,onError:i,showDialog:a,dialogOptions:o}=this.props;fn(s=>{r&&r(s,e,n);let c=bN(e,t,{mechanism:{handled:this.props.handled==null?!!this.props.fallback:this.props.handled,type:`auto.function.react.error_boundary`}});i&&i(e,n,c),a&&(this._lastEventId=c,this._openFallbackReportDialog&&JS({...o,eventId:c})),this.setState({error:e,componentStack:n,eventId:c})})}componentDidMount(){let{onMount:e}=this.props;e&&e()}componentWillUnmount(){let{error:e,componentStack:t,eventId:n}=this.state,{onUnmount:r}=this.props;r&&(this.state===GN?r(null,null,null):r(e,t,n)),this._cleanupHook&&=(this._cleanupHook(),void 0)}resetErrorBoundary(){let{onReset:e}=this.props,{error:t,componentStack:n,eventId:r}=this.state;e&&e(t,n,r),this.setState(GN)}render(){let{fallback:e,children:t}=this.props,n=this.state;if(n.componentStack===null)return typeof t==`function`?t():t;let r=typeof e==`function`?mN.createElement(e,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):e;return mN.isValidElement(r)?r:(e&&WN&&x.warn(`fallback did not produce a valid ReactElement`),null)}};function qN(e,t){let n=e.displayName||e.name||`unknown`,r=mN.memo(n=>mN.createElement(KN,{...t},mN.createElement(e,{...n})));return r.displayName=`errorBoundary(${n})`,BN(r,e),r}var JN=`redux.action`,YN=`info`,XN={attachReduxState:!0,actionTransformer:e=>e,stateTransformer:e=>e||null};function ZN(e){let t={...XN,...e};return e=>(n,r)=>{t.attachReduxState&&dn().addEventProcessor((e,t)=>{try{e.type===void 0&&e.contexts.state.state.type===`redux`&&(t.attachments=[...t.attachments||[],{filename:`redux_state.json`,data:JSON.stringify(e.contexts.state.state.value)}])}catch{}return e});function i(e){return(n,r)=>{let i=e(n,r),a=k(),o=t.actionTransformer(r);o!=null&&Pc({category:JN,data:o,type:YN});let s=t.stateTransformer(i);if(s!=null){let e=A()?.getOptions()?.normalizeDepth||3,t={state:{type:`redux`,value:s}};Ge(t,3+e),a.setContext(`state`,t)}else a.setContext(`state`,null);let{configureScopeWithState:c}=t;return typeof c==`function`&&c(a,i),i}}let a=e(i(n),r);return a.replaceReducer=new Proxy(a.replaceReducer,{apply:function(e,t,n){e.apply(t,[i(n[0])])}}),a}}function QN(e){let t=Mj({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,match:i,instrumentPageLoad:a=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(e){t.afterAllSetup(e),a&&U.location&&$N(r,U.location,i,(t,n=`url`)=>{Nj(e,{name:t,attributes:{[M]:`pageload`,[N]:`auto.pageload.react.reactrouter_v3`,[j]:n}})}),o&&n.listen&&n.listen(t=>{(t.action===`PUSH`||t.action===`POP`)&&$N(r,t,i,(t,n=`url`)=>{Pj(e,{name:t,attributes:{[M]:`navigation`,[N]:`auto.navigation.react.reactrouter_v3`,[j]:n}})})})}}}function $N(e,t,n,r){let i=t.pathname;n({location:t,routes:e},(e,t,n)=>{if(e||!n)return r(i);let a=eP(n.routes||[]);return a.length===0||a===`/*`?r(i):(i=a,r(i,`route`))})}function eP(e){if(!Array.isArray(e)||e.length===0)return``;let t=e.filter(e=>!!e.path),n=-1;for(let e=t.length-1;e>=0;e--)if(t[e].path?.startsWith(`/`)){n=e;break}return t.slice(n).reduce((e,{path:t})=>`${e}${e===`/`||e===``?t:`/${t}`}`,``)}function tP(e,t={}){let n=e,r=Mj({...t,instrumentNavigation:!1,instrumentPageLoad:!1}),{instrumentPageLoad:i=!0,instrumentNavigation:a=!0}=t;return{...r,afterAllSetup(e){r.afterAllSetup(e);let t=U.location;if(i&&t){let r=n.matchRoutes(t.pathname,n.options.parseSearch(t.search),{preload:!1,throwOnError:!1}),i=r[r.length-1],a=i?.routeId===`__root__`?void 0:i;Nj(e,{name:a?a.routeId:t.pathname,attributes:{[M]:`pageload`,[N]:`auto.pageload.react.tanstack_router`,[j]:a?`route`:`url`,...nP(a)}})}a&&n.subscribe(`onBeforeNavigate`,t=>{if(!t.fromLocation||t.toLocation.state===t.fromLocation.state)return;let r=n.matchRoutes(t.toLocation.pathname,t.toLocation.search,{preload:!1,throwOnError:!1}),i=r[r.length-1],a=i?.routeId===`__root__`?void 0:i,o=U.location,s=Pj(e,{name:a?a.routeId:o.pathname,attributes:{[M]:`navigation`,[N]:`auto.navigation.react.tanstack_router`,[j]:a?`route`:`url`}}),c=n.subscribe(`onResolved`,e=>{if(c(),s){let t=n.matchRoutes(e.toLocation.pathname,e.toLocation.search,{preload:!1,throwOnError:!1}),r=t[t.length-1],i=r?.routeId===`__root__`?void 0:r;i&&(s.updateName(i.routeId),s.setAttribute(j,`route`),s.setAttributes(nP(i)))}})})}}}function nP(e){if(!e)return{};let t={};return Object.entries(e.params).forEach(([e,n])=>{t[`url.path.params.${e}`]=n,t[`url.path.parameter.${e}`]=n,t[`params.${e}`]=n}),t}function rP(e){let t=Mj({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:i,instrumentPageLoad:a=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(e){t.afterAllSetup(e),aP(e,a,o,n,`reactrouter_v4`,r,i)}}}function iP(e){let t=Mj({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{history:n,routes:r,matchPath:i,instrumentPageLoad:a=!0,instrumentNavigation:o=!0}=e;return{...t,afterAllSetup(e){t.afterAllSetup(e),aP(e,a,o,n,`reactrouter_v5`,r,i)}}}function aP(e,t,n,r,i,a=[],o){function s(){if(r.location)return r.location.pathname;if(U.location)return U.location.pathname}function c(e){if(a.length===0||!o)return[e,`url`];let t=oP(a,e,o);for(let e of t)if(e.match.isExact)return[e.match.path,`route`];return[e,`url`]}if(t){let t=s();if(t){let[n,r]=c(t);Nj(e,{name:n,attributes:{[M]:`pageload`,[N]:`auto.pageload.react.${i}`,[j]:r}})}}n&&r.listen&&r.listen((t,n)=>{if(n&&(n===`PUSH`||n===`POP`)){let[n,r]=c(t.pathname);Pj(e,{name:n,attributes:{[M]:`navigation`,[N]:`auto.navigation.react.${i}`,[j]:r}})}})}function oP(e,t,n,r=[]){return e.some(e=>{let i=e.path?n(t,e):r.length?r[r.length-1].match:sP(t);return i&&(r.push({route:e,match:i}),e.routes&&oP(e.routes,t,n,r)),!!i}),r}function sP(e){return{path:`/`,url:`/`,params:{},isExact:e===`/`}}function cP(e){let t=e.displayName||e.name,n=t=>{if(t?.computedMatch?.isExact){let e=t.computedMatch.path,n=lP();k().setTransactionName(e),n&&(n.updateName(e),n.setAttribute(j,`route`))}return mN.createElement(e,{...t})};return n.displayName=`sentryRoute(${t})`,BN(n,e),n}function lP(){let e=I(),t=e&&F(e);if(!t)return;let n=P(t).op;return n===`navigation`||n===`pageload`?t:void 0}function uP(e,t){if(!t||t===`/`||!e.toLowerCase().startsWith(t.toLowerCase()))return e;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?e:e.slice(n)||`/`}var dP=new WeakMap;function fP(e,t,n){if(!e||!t?.length)return null;let r=n?uP(e,n):e,i=dP.get(t);i||(i=SP(t),dP.set(t,i),WN&&x.log(`[React Router] Sorted route manifest by specificity:`,i.length,`patterns`));for(let e of i)if(pP(r,e))return WN&&x.log(`[React Router] Matched pathname`,r,`to pattern`,e),e;return WN&&x.log(`[React Router] No manifest match found for pathname:`,r),null}function pP(e,t){if(t===`/`)return e===`/`||e===``;let n=hP(e),r=hP(t);if(r.length>0&&r[r.length-1]===`*`){let e=r.slice(0,-1);if(n.length<e.length)return!1;for(let[t,r]of e.entries())if(!mP(n[t],r))return!1;return!0}if(n.length!==r.length)return!1;for(let[e,t]of r.entries())if(!mP(n[e],t))return!1;return!0}function mP(e,t){return e===void 0||t===void 0?!1:gP.test(t)?!0:e===t}function hP(e){return e.split(`/`).filter(Boolean)}var gP=/^:[\w-]+$/,_P=10,vP=3,yP=1,bP=-2;function xP(e){let t=e.split(`/`),n=t.length;t.includes(`*`)&&(n+=bP);for(let e of t)if(e===`*`)continue;else gP.test(e)?n+=vP:e===``?n+=yP:n+=_P;return n}function SP(e){return[...e].sort((e,t)=>{let n=xP(e);return xP(t)-n})}var CP,wP=!1,TP=[],EP=10;function DP(e,t){let n={};return TP.length>=EP&&(WN&&x.warn(`[React Router] Navigation context stack overflow - removing oldest context`),TP.shift()),TP.push({token:n,targetPath:e,span:t}),n}function OP(e){TP[TP.length-1]?.token===e&&TP.pop()}function kP(){let e=TP.length;return e>0?TP[e-1]??null:null}function AP(e,t=!1){CP=e,wP=t}function jP(e){return NP(e.route.path||``)}function MP(e){return e.params[`*`]||``}function NP(e){return e[e.length-1]===`*`?e.slice(0,-1):e}function PP(e){return e[e.length-1]===`/`?e.slice(0,-1):e}function FP(e){return e.endsWith(`*`)}function IP(e){return e.includes(`/*`)||e.endsWith(`*`)}function LP(e,t){return FP(e)&&!!t.route.children?.length||!1}function RP(e){return!!(!e.children&&e.element&&e.path?.endsWith(`/*`))}function zP(e,t,n){let r=e&&e.length>0?e:wP?uP(t,n):t,i=r.slice(-2)===`/*`?r.slice(0,-2):r;return i.length>1&&i[i.length-1]===`/`&&(i=i.slice(0,-1)),[i,`route`]}function BP(e){return e.split(/\\?\//).filter(e=>e.length>0&&e!==`,`).length}function VP(e){return e[0]===`/`?e:`/${e}`}function HP(e,t){let n=CP(e,t);if(!n||n.length===0)return``;for(let r of n)if(r.route.path&&r.route.path!==`*`){let n=jP(r),i=uP(t.pathname,VP(r.pathnameBase));return t.pathname===i?PP(i):PP(PP(n||``)+VP(HP(e.filter(e=>e!==r.route),{pathname:i})))}return``}function UP(e,t){let n=CP(t,e);if(n){for(let e of n)if(RP(e.route)&&MP(e))return!0}return!1}function WP(e,t){return wP?uP(e.pathname,t):e.pathname||``}function GP(e,t,n,r=``){if(!e||e.length===0)return[wP?uP(t.pathname,r):t.pathname,`url`];if(!n)return[WP(t,r),`url`];let i=``;for(let e of n){let n=e.route;if(!n)continue;if(n.index)return zP(i,e.pathname,r);let a=n.path;if(!a||LP(a,e))continue;let o=a[0]===`/`||i[i.length-1]===`/`?a:`/${a}`;if(i=PP(i)+VP(o),PP(t.pathname)===PP(r+e.pathname))return BP(i)!==BP(e.pathname)&&!FP(i)?[(wP?``:r)+o,`route`]:(LP(i,e)&&(i=i.slice(0,-1)),[(wP?``:r)+i,`route`])}return[WP(t,r),`url`]}function KP(e,t,n,r,i=``,a,o){if(o&&a&&a.length>0){let t=fP(e.pathname,a,i);if(t)return[(wP?``:i)+t,`route`]}let s,c=`url`,l=UP(e,n);return l&&(s=VP(HP(n,e)),c=`route`),(!l||!s)&&([s,c]=GP(t,e,r,i)),[s||e.pathname,c]}function qP(){let e=I(),t=e?F(e):void 0;if(!t)return;let n=P(t).op;return n===`navigation`||n===`pageload`?t:void 0}function JP(){let e=kP();if(e)return e.targetPath?{pathname:e.targetPath,search:``,hash:``,state:null,key:`default`}:null;if(U!==void 0)try{let e=U.location;if(e)return{pathname:e.pathname,search:e.search||``,hash:e.hash||``,state:null,key:`default`}}catch{WN&&x.warn(`[React Router] Could not access window.location`)}return null}function YP(){let e=kP();return e?e.span:qP()}function XP(e,t,n,r){let i=new Proxy(e,{apply(e,i,a){let o=JP(),s=YP(),c=e.apply(i,a);return ZP(c,t,n,r,o,s),c}});return Me(i,`__sentry_proxied__`,!0),i}function ZP(e,t,n,r,i,a){Oe(e)?e.then(e=>{Array.isArray(e)&&r(e,t,i??void 0,a)}).catch(e=>{WN&&x.warn(`Error resolving async handler '${n}' for route`,t,e)}):Array.isArray(e)&&r(e,t,i??void 0,a)}function QP(e,t){if(e.handle&&typeof e.handle==`object`)for(let n of Object.keys(e.handle)){let r=e.handle[n];typeof r==`function`&&!r.__sentry_proxied__&&(e.handle[n]=XP(r,e,n,t))}if(Array.isArray(e.children))for(let n of e.children)QP(n,t)}var $P,eF,tF,nF,rF,iF=!1,aF=3e3,oF,sF=``,cF=new WeakSet,lF=U?.document?mN.useLayoutEffect:mN.useEffect,uF=new WeakMap,dF=new Set,fF=new WeakMap,pF=new WeakMap;function mF(e){return U?.requestAnimationFrame?U.requestAnimationFrame(e):setTimeout(e,0)}function hF(e){U?.cancelAnimationFrame?U.cancelAnimationFrame(e):clearTimeout(e)}function gF(e){return`${e.pathname}${e.search||``}${e.hash||``}`}function _F(e){return e.includes(`:`)||e.includes(`*`)}function vF(e,t,n,r){if(!e)return{skip:!1,shouldUpdate:!1};if(e.locationKey===t&&(e.isPlaceholder||!r)){let t=!!e.routeName&&IP(e.routeName),r=IP(n),i=!!e.routeName&&_F(e.routeName),a=_F(n),o=t&&!r,s=!i&&a,c=n!==e.routeName&&n.length>(e.routeName?.length||0)&&!r;return{skip:!0,shouldUpdate:!!(e.routeName&&(o||s||c))}}return{skip:!1,shouldUpdate:!1}}function yF(e,t){let n=t.children||[],r=e.filter(e=>!n.some(t=>t===e||e.path&&t.path===e.path||e.id&&t.id===e.id));r.length>0&&(t.children=[...n,...r])}function bF(e,t){let n=fF.get(e);n||(n=new Set,fF.set(e,n)),n.add(t),t.finally(()=>{let n=fF.get(e);n&&n.delete(t)})}function xF(e){bF(e,new Promise(t=>{pF.set(e,t)}))}function SF(e){let t=pF.get(e);t&&(t(),pF.delete(e),e.__sentry_may_have_lazy_routes__&&=!1)}function CF(e,t,n=null,r){e.forEach(e=>{dF.add(e),iF&&QP(e,CF)}),t&&yF(e,t);let i=r??qP();if(i){let e=P(i);if(e.timestamp){WN&&x.warn(`[React Router] Lazy handler resolved after span ended - skipping update`);return}let t=e.op,a=n;if(!a&&!r&&U!==void 0){let e=U.location;e?.pathname&&(a={pathname:e.pathname})}a&&(t===`pageload`?PF({activeRootSpan:i,location:{pathname:a.pathname},routes:Array.from(dF),allRoutes:Array.from(dF)}):t===`navigation`&&wF(i,a,Array.from(dF),!1,rF))}}function wF(e,t,n,r=!1,i){let a=P(e),o=a.description,s=e?.__sentry_navigation_name_set__,c=o&&IP(o);if((!s||r||c)&&!a.timestamp){let[r,l]=KP(t,n,n,i(n,t)||[],sF,oF,iF),u=a.data?.[j];r&&(!o||!s&&(u!==`route`||l===`route`)||u!==`route`&&l===`route`||u===`route`&&l===`route`&&c)&&(e.updateName(r),e.setAttribute(j,l),!IP(r)&&l===`route`&&Me(e,`__sentry_navigation_name_set__`,!0))}}function TF(e,t,n,r,i){let a=!1,o=!!i&&P(i).op===`pageload`,s=!1,c=null,l=null;e.subscribe(e=>{if(!a){let t=qP();t&&P(t).op===`pageload`?o=!0:o&&(e.historyAction===`POP`&&!s?s=!0:a=!0)}if(e.historyAction===`PUSH`||e.historyAction===`POP`&&a){let i=gF(e.location),a=()=>{l!==i&&(l=i,c=null,jF({location:e.location,routes:t,navigationType:e.historyAction,version:n,basename:r,allRoutes:Array.from(dF)}))};e.navigation.state===`idle`?(c!==null&&(hF(c),c=null),a()):(l!==i&&(l=null),c!==null&&hF(c),c=mF(a))}})}function EF(e,t){return!$P||!eF||!tF||!rF?(WN&&x.warn(`reactRouterV${t}Instrumentation was unable to wrap the \`createRouter\` function because of one or more missing parameters.`),e):function(n,r){if(MF(n),iF)for(let e of n)QP(e,CF);let i=qP();r&&`patchRoutesOnNavigation`in r&&typeof r.patchRoutesOnNavigation==`function`&&i&&(Me(i,`__sentry_may_have_lazy_routes__`,!0),xF(i));let a=e(n,AF(r,!1,i)),o=r?.basename;return a.state.historyAction===`POP`&&i&&PF({activeRootSpan:i,location:a.state.location,routes:n,basename:o,allRoutes:Array.from(dF)}),sF=o||``,TF(a,n,t,o,i),a}}function DF(e,t){return!$P||!eF||!tF||!rF?(WN&&x.warn(`reactRouterV${t}Instrumentation was unable to wrap the \`createMemoryRouter\` function because of one or more missing parameters.`),e):function(n,r){if(MF(n),iF)for(let e of n)QP(e,CF);let i=qP();r&&`patchRoutesOnNavigation`in r&&typeof r.patchRoutesOnNavigation==`function`&&i&&(Me(i,`__sentry_may_have_lazy_routes__`,!0),xF(i));let a=e(n,AF(r,!0,i)),o=r?.basename,s,c=r?.initialEntries,l=r?.initialIndex,u=c?.length===1,d=l!==void 0&&c?.[l];s=u?c[0]:d?c[l]:void 0;let f=s?typeof s==`string`?{pathname:s}:s:a.state.location,p=qP();return a.state.historyAction===`POP`&&p&&PF({activeRootSpan:p,location:f,routes:n,basename:o,allRoutes:Array.from(dF)}),sF=o||``,TF(a,n,t,o,p),a}}function OF(e,t){let n=Mj({...e,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:i,useNavigationType:a,createRoutesFromChildren:o,matchRoutes:s,stripBasename:c,enableAsyncRouteHandlers:l=!1,instrumentPageLoad:u=!0,instrumentNavigation:d=!0,lazyRouteTimeout:f,lazyRouteManifest:p}=e;return{...n,setup(t){n.setup(t);let u=e.finalTimeout??3e4,d=(e.idleTimeout??1e3)*3,m=f??d;m===1/0?(aF=u,WN&&x.log(`[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:`,u,`ms to prevent indefinite hangs`)):Number.isNaN(m)?(WN&&x.warn(`[React Router] lazyRouteTimeout must be a number, falling back to default:`,d),aF=d):m<0?(WN&&x.warn(`[React Router] lazyRouteTimeout must be non-negative or Infinity, got:`,m,`falling back to:`,d),aF=d):aF=m,$P=r,eF=i,tF=a,rF=s,nF=o,iF=l,oF=p,AP(s,c||!1)},afterAllSetup(e){n.afterAllSetup(e);let r=U.location?.pathname;u&&r&&Nj(e,{name:r,attributes:{[j]:`url`,[M]:`pageload`,[N]:`auto.pageload.react.reactrouter_v${t}`}}),d&&cF.add(e)}}}function kF(e,t){if(!$P||!eF||!tF||!rF)return WN&&x.warn("reactRouterV6Instrumentation was unable to wrap `useRoutes` because of one or more missing parameters."),e;let n=n=>{let r=mN.useRef(!0),{routes:i,locationArg:a}=n,o=e(i,a),s=eF(),c=tF(),l=typeof a==`string`||a?.pathname?a:s;return lF(()=>{let e=typeof l==`string`?{pathname:l}:l;r.current?(MF(i),PF({activeRootSpan:qP(),location:e,routes:i,allRoutes:Array.from(dF)}),r.current=!1):jF({location:e,routes:i,navigationType:c,version:t,allRoutes:Array.from(dF)})},[c,l]),o};return(e,t)=>mN.createElement(n,{routes:e,locationArg:t})}function AF(e,t=!1,n){if(!e||!(`patchRoutesOnNavigation`in e)||typeof e.patchRoutesOnNavigation!=`function`)return e||{};let r=e.patchRoutesOnNavigation;return{...e,patchRoutesOnNavigation:async e=>{let i=e?.path,a=qP()??n;if(!t){let t=e?.patch,n=e?.matches;t&&(e.patch=(e,r)=>{if(MF(r),n&&n.length>0){let t=n[n.length-1]?.route;if(t){let n=Array.from(dF).find(n=>{let r=n.id!==void 0&&n.id===e,i=n===t,a=n.path!==void 0&&t.path!==void 0&&n.path===t.path;return r||i||a});n&&yF(r,n)}}let o=a?P(a):void 0;return i&&a&&o&&!o.timestamp&&o.op===`navigation`&&wF(a,{pathname:i,search:``,hash:``,state:null,key:`default`},Array.from(dF),!0,rF),t(e,r)})}let o=(async()=>{let t=DP(i,a),n;try{n=await r(e)}finally{OP(t),a&&SF(a)}let o=a?P(a):void 0;if(a&&o&&!o.timestamp&&o.op===`navigation`){let e=i;e&&wF(a,{pathname:e,search:``,hash:``,state:null,key:`default`},Array.from(dF),!1,rF)}return n})();return a&&bF(a,o),o}}}function jF(e){let{location:t,routes:n,navigationType:r,version:i,matches:a,basename:o,allRoutes:s}=e,c=Array.isArray(a)?a:rF(s||n,t,o),l=A();if(!l||!cF.has(l))return;let u=qP();if(!(u&&P(u).op===`pageload`&&r===`POP`)&&(r===`PUSH`||r===`POP`)&&c){let[e,r]=KP(t,s||n,s||n,c,o,oF,iF),a=gF(t),u=uF.get(l),{skip:d,shouldUpdate:f}=vF(u,a,e,u&&!u.isPlaceholder?!!P(u.span).timestamp:!1);if(d){if(f&&u){let t=u.routeName;u.isPlaceholder?(u.routeName=e,WN&&x.log(`[Tracing] Updated placeholder navigation name from "${t}" to "${e}" (will apply to real span)`)):(u.span.updateName(e),u.span.setAttribute(j,r),Me(u.span,`__sentry_navigation_name_set__`,!0),u.routeName=e,WN&&x.log(`[Tracing] Updated navigation span name from "${t}" to "${e}"`))}else WN&&x.log(`[Tracing] Skipping duplicate navigation for location: ${a}`);return}let p={span:{end:()=>{}},routeName:e,pathname:t.pathname,locationKey:a,isPlaceholder:!0};uF.set(l,p);let m;try{m=Pj(l,{name:p.routeName,attributes:{[j]:r,[M]:`navigation`,[N]:`auto.navigation.react.reactrouter_v${i}`}})}catch(e){throw uF.delete(l),e}m?(uF.set(l,{span:m,routeName:p.routeName,pathname:t.pathname,locationKey:a}),LF(m,t,n,o,`navigation`)):uF.delete(l)}}function MF(e){e.forEach(e=>{NF(e).forEach(e=>{dF.add(e)})})}function NF(e,t=new Set){return t.has(e)||(t.add(e),e.children&&!e.index&&e.children.forEach(e=>{NF(e,t).forEach(e=>{t.add(e)})})),t}function PF({activeRootSpan:e,location:t,routes:n,matches:r,basename:i,allRoutes:a}){let o=Array.isArray(r)?r:rF(a||n,t,i);if(o){let[r,s]=KP(t,a||n,a||n,o,i,oF,iF);k().setTransactionName(r||`/`),e&&(e.updateName(r),e.setAttribute(j,s),LF(e,t,n,i,`pageload`))}else e&&LF(e,t,n,i,`pageload`)}function FF(e,t,n,r,i=!1){return n?!!(!e&&i||e&&IP(e)&&r===`route`&&!IP(n)||t!==`route`&&r===`route`):!1}function IF(e,t,n,r,i,a,o,s){try{let c=t.data?.[j];if(c===`route`&&n&&!IP(n))return;let l=Array.from(s),u=l.length>0?l:i,d=rF(u,r,a);if(!d)return;let[f,p]=KP(r,u,u,d,a,oF,iF),m=FF(n,c,f,p,!0),h=o===`pageload`||!t.timestamp;m&&h&&(e.updateName(f),e.setAttribute(j,p))}catch(e){WN&&x.warn(`Error updating span details before ending: ${e}`)}}function LF(e,t,n,r,i){let a=`__sentry_${i}_end_patched__`;if(e?.[a]||!e.end)return;let o=e.end.bind(e),s=!1;e.end=function(...a){if(s)return;s=!0;let c=a.length>0?a[0]:Date.now()/1e3,l=P(e),u=l.description,d=l.data?.[j],f=()=>{let t=A();if(t&&i===`navigation`){let n=uF.get(t);n&&n.span===e&&uF.delete(t)}},p=fF.get(e),m=e.__sentry_may_have_lazy_routes__;if((p&&p.size>0||m)&&u&&(IP(u)||d!==`route`)){if(aF===0){IF(e,l,u,t,n,r,i,dF),f(),o(c);return}let a=new Promise(e=>setTimeout(e,aF)),s;if(p&&p.size>0){let e=Promise.allSettled(p).then(()=>{});s=aF===1/0?e:Promise.race([e,a])}else s=a;s.then(()=>{let a=P(e);IF(e,a,a.description,t,n,r,i,dF),f(),o(c)}).catch(()=>{f(),o(c)});return}IF(e,l,u,t,n,r,i,dF),f(),o(c)},Me(e,a,!0)}function RF(e,t){if(!$P||!eF||!tF||!nF||!rF)return WN&&x.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.
500
- useEffect: ${$P}. useLocation: ${eF}. useNavigationType: ${tF}.
501
- createRoutesFromChildren: ${nF}. matchRoutes: ${rF}.`),e;let n=n=>{let r=mN.useRef(!0),i=eF(),a=tF();return lF(()=>{let e=nF(n.children);r.current?(MF(e),PF({activeRootSpan:qP(),location:i,routes:e,allRoutes:Array.from(dF)}),r.current=!1):jF({location:i,routes:e,navigationType:a,version:t,allRoutes:Array.from(dF)})},[i,a]),mN.createElement(e,{...n})};return BN(n,e),n}function zF(e){return OF(e,`6`)}function BF(e){return kF(e,`6`)}function VF(e){return EF(e,`6`)}function HF(e){return DF(e,`6`)}function UF(e){return RF(e,`6`)}function WF(e){return OF(e,`7`)}function GF(e){return RF(e,`7`)}function KF(e){return EF(e,`7`)}function qF(e){return DF(e,`7`)}function JF(e){return kF(e,`7`)}var YF=t({BrowserClient:()=>Tv,ErrorBoundary:()=>KN,MULTIPLEXED_TRANSPORT_EXTRA_KEY:()=>dc,OpenFeatureIntegrationHook:()=>nN,Profiler:()=>VN,SDK_VERSION:()=>a,SEMANTIC_ATTRIBUTE_SENTRY_OP:()=>M,SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN:()=>N,SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE:()=>hn,SEMANTIC_ATTRIBUTE_SENTRY_SOURCE:()=>j,Scope:()=>Bt,WINDOW:()=>U,addBreadcrumb:()=>Pc,addEventProcessor:()=>So,addIntegration:()=>Ro,breadcrumbsIntegration:()=>rS,browserApiErrorsIntegration:()=>pS,browserProfilingIntegration:()=>qM,browserSessionIntegration:()=>bS,browserTracingIntegration:()=>Mj,buildLaunchDarklyFlagUsedHandler:()=>eN,captureConsoleIntegration:()=>_l,captureEvent:()=>co,captureException:()=>L,captureFeedback:()=>Bu,captureMessage:()=>so,captureReactException:()=>bN,captureSession:()=>Eo,chromeStackLineParser:()=>Bx,close:()=>yo,consoleLoggingIntegration:()=>td,contextLinesIntegration:()=>_C,continueTrace:()=>zi,createConsolaReporter:()=>cd,createLangChainCallbackHandler:()=>ym,createReduxEnhancer:()=>ZN,createTransport:()=>Os,createUserFeedbackEnvelope:()=>$x,cultureContextIntegration:()=>SS,dedupeIntegration:()=>bl,defaultRequestInstrumentationOptions:()=>aj,defaultStackLineParsers:()=>Xx,defaultStackParser:()=>Zx,diagnoseSdkConnectivity:()=>sN,elementTimingIntegration:()=>Pb,endSession:()=>wo,eventFiltersIntegration:()=>Vc,eventFromException:()=>vv,eventFromMessage:()=>yv,exceptionFromError:()=>cv,extraErrorDataIntegration:()=>Ol,featureFlagsIntegration:()=>Eu,feedbackAsyncIntegration:()=>ov,feedbackIntegration:()=>sv,feedbackSyncIntegration:()=>sv,fetchStreamPerformanceIntegration:()=>_j,flush:()=>vo,forceLoad:()=>KS,functionToStringIntegration:()=>Rc,geckoStackLineParser:()=>Ux,getActiveSpan:()=>I,getClient:()=>A,getCurrentScope:()=>k,getDefaultIntegrations:()=>WS,getFeedback:()=>rg,getGlobalScope:()=>dn,getIsolationScope:()=>un,getReplay:()=>lA,getRootSpan:()=>F,getSpanDescendants:()=>Nr,getSpanStatusFromHttpCode:()=>In,getTraceData:()=>kc,globalHandlersIntegration:()=>TS,graphqlClientIntegration:()=>jC,growthbookIntegration:()=>aN,httpClientIntegration:()=>eC,httpContextIntegration:()=>PS,inboundFiltersIntegration:()=>Hc,init:()=>gN,instrumentAnthropicAiClient:()=>Np,instrumentCreateReactAgent:()=>Nm,instrumentGoogleGenAIClient:()=>Yp,instrumentLangChainEmbeddings:()=>lh,instrumentLangGraph:()=>Pm,instrumentOpenAiClient:()=>lp,instrumentOutgoingRequests:()=>oj,instrumentSupabaseClient:()=>nu,isBotUserAgent:()=>Aj,isEnabled:()=>xo,isInitialized:()=>bo,lastEventId:()=>_o,launchDarklyIntegration:()=>$M,lazyLoadIntegration:()=>iv,linkedErrorsIntegration:()=>RS,logger:()=>Vu,makeBrowserOfflineTransport:()=>eM,makeFetchTransport:()=>Ex,makeMultiplexedTransport:()=>hc,metrics:()=>nd,moduleMetadataIntegration:()=>dl,normalizeStringifyValue:()=>BS,onLoad:()=>qS,openFeatureIntegration:()=>tN,opera10StackLineParser:()=>qx,opera11StackLineParser:()=>Yx,parameterize:()=>Tc,reactErrorHandler:()=>xN,reactRouterV3BrowserTracingIntegration:()=>QN,reactRouterV4BrowserTracingIntegration:()=>rP,reactRouterV5BrowserTracingIntegration:()=>iP,reactRouterV6BrowserTracingIntegration:()=>zF,reactRouterV7BrowserTracingIntegration:()=>WF,registerSpanErrorInstrumentation:()=>Rr,registerWebWorker:()=>fN,replayCanvasIntegration:()=>ej,replayIntegration:()=>aA,reportPageLoaded:()=>Uj,reportingObserverIntegration:()=>QS,rewriteFramesIntegration:()=>zl,sendFeedback:()=>Vh,setActiveSpanInBrowser:()=>Wj,setContext:()=>lo,setConversationId:()=>go,setCurrentClient:()=>sc,setExtra:()=>fo,setExtras:()=>uo,setHttpStatus:()=>Ln,setMeasurement:()=>Ci,setTag:()=>mo,setTags:()=>po,setUser:()=>ho,showReportDialog:()=>JS,spanStreamingIntegration:()=>Gj,spanToBaggageHeader:()=>Zr,spanToJSON:()=>P,spanToTraceHeader:()=>hr,spotlightBrowserIntegration:()=>QM,startBrowserTracingNavigationSpan:()=>Pj,startBrowserTracingPageLoadSpan:()=>Nj,startInactiveSpan:()=>Ri,startNewTrace:()=>Hi,startSession:()=>Co,startSpan:()=>Ii,startSpanManual:()=>Li,statsigIntegration:()=>oN,supabaseIntegration:()=>au,suppressTracing:()=>Vi,tanstackRouterBrowserTracingIntegration:()=>tP,thirdPartyErrorFilterIntegration:()=>mu,uiProfiler:()=>kx,unleashIntegration:()=>rN,updateSpanName:()=>Ir,useProfiler:()=>UN,viewHierarchyIntegration:()=>MC,webVitalsIntegration:()=>yj,webWorkerIntegration:()=>lN,winjsStackLineParser:()=>Gx,withActiveSpan:()=>Bi,withErrorBoundary:()=>qN,withIsolationScope:()=>pn,withProfiler:()=>HN,withScope:()=>fn,withSentryReactRouterV6Routing:()=>UF,withSentryReactRouterV7Routing:()=>GF,withSentryRouting:()=>cP,withStreamedSpan:()=>$r,wrapCreateBrowserRouterV6:()=>VF,wrapCreateBrowserRouterV7:()=>KF,wrapCreateMemoryRouterV6:()=>HF,wrapCreateMemoryRouterV7:()=>qF,wrapUseRoutesV6:()=>BF,wrapUseRoutesV7:()=>JF,zodErrorsIntegration:()=>pu});export{YF as t};