@tickernelz/paperclip-pro-ui 2026.925.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 (424) hide show
  1. package/README.md +30 -0
  2. package/dist/android-chrome-192x192.png +0 -0
  3. package/dist/android-chrome-512x512.png +0 -0
  4. package/dist/announcement-preview.svg +11 -0
  5. package/dist/apple-touch-icon.png +0 -0
  6. package/dist/assets/AgentAvatar-BR1Z_L_Z.js +1 -0
  7. package/dist/assets/AgentIdentity-BgihkjQU.js +1 -0
  8. package/dist/assets/Agents.production-BsKiBknO.js +2 -0
  9. package/dist/assets/CompanyActivity.production-Bp4gxpq3.js +1 -0
  10. package/dist/assets/CompanyExport-BvUhFYBr.js +4 -0
  11. package/dist/assets/CompanySkills.production-htb9HH0N.js +10 -0
  12. package/dist/assets/Costs.production-CzulNW6Y.js +1 -0
  13. package/dist/assets/EmptyState-DOb3I5aU.js +1 -0
  14. package/dist/assets/MarkdownBody-AdwNLx7A.js +16 -0
  15. package/dist/assets/MarkdownEditor-B3NYD32f.js +85 -0
  16. package/dist/assets/OrgChart.production-DbBigpMZ.js +1 -0
  17. package/dist/assets/PageSkeleton-C-C3Xlc_.js +1 -0
  18. package/dist/assets/RoutineDetail.production-DJn3YZiR.js +1 -0
  19. package/dist/assets/RoutineRunVariablesDialog-BkLLbP3a.js +5 -0
  20. package/dist/assets/Routines.production-BBDkh1yN.js +1 -0
  21. package/dist/assets/SidebarContext-9UFQ2Pex.js +1 -0
  22. package/dist/assets/StatusIcon-DMDp_WJw.js +1 -0
  23. package/dist/assets/abnfDiagram-VCTEODGH-wiE_K2ku.js +1 -0
  24. package/dist/assets/agents-DrLpWAcm.js +1 -0
  25. package/dist/assets/apl-MHzTCvfx.js +1 -0
  26. package/dist/assets/arc-BQ55EiX2.js +1 -0
  27. package/dist/assets/architecture-7GRP2DOG-B-bRgmfI.js +1 -0
  28. package/dist/assets/architectureDiagram-5GKGNRK7-BkhBoP5_.js +36 -0
  29. package/dist/assets/array-CL5Tisss.js +1 -0
  30. package/dist/assets/asciiarmor-DFLNSgns.js +1 -0
  31. package/dist/assets/asn1-CfPVWRYE.js +1 -0
  32. package/dist/assets/asterisk-CJ4OeA7Y.js +1 -0
  33. package/dist/assets/badge-BLr1M3ne.js +1 -0
  34. package/dist/assets/blockDiagram-I7D4REHJ-fyVn7r-9.js +129 -0
  35. package/dist/assets/bot-CET4VfU-.js +1 -0
  36. package/dist/assets/brainfuck-NEHkmXMc.js +1 -0
  37. package/dist/assets/button-DCI8NFig.js +1 -0
  38. package/dist/assets/c4Diagram-7LVT6UL2-BqC3qTZS.js +38 -0
  39. package/dist/assets/card-BD8MkPAL.js +1 -0
  40. package/dist/assets/channel-0B5iAV5A.js +1 -0
  41. package/dist/assets/character-CguPM7IG.js +1 -0
  42. package/dist/assets/check-C6myARng.js +1 -0
  43. package/dist/assets/checkbox-CmYq-YMP.js +1 -0
  44. package/dist/assets/chevron-down-D2wNtbQf.js +1 -0
  45. package/dist/assets/chevron-right-CU6xIk8W.js +1 -0
  46. package/dist/assets/chunk-2Q5K7J3B-CkPHWFj-.js +1 -0
  47. package/dist/assets/chunk-4HAMMTFA-CGGd_Pxz.js +62 -0
  48. package/dist/assets/chunk-5VM5RSS4-2H3r6wq0.js +15 -0
  49. package/dist/assets/chunk-75Z2AOVW-BaPl5WA6.js +2 -0
  50. package/dist/assets/chunk-DU6HZSFF-2P5iNHqg.js +127 -0
  51. package/dist/assets/chunk-F27PBJKO-Ci7GmRgM.js +1 -0
  52. package/dist/assets/chunk-FOHPRMQF-7Ogwfo6e.js +153 -0
  53. package/dist/assets/chunk-GMAD6QVW-BfvaaEBW.js +70 -0
  54. package/dist/assets/chunk-GVQU2GXP-Cwp_Wpj2.js +1 -0
  55. package/dist/assets/chunk-IMKFNOWR-BjXu-u1C.js +231 -0
  56. package/dist/assets/chunk-JWPE2WC7--HEGjv3t.js +1 -0
  57. package/dist/assets/chunk-L3NEJ4N5-JUd1UqX1.js +1 -0
  58. package/dist/assets/chunk-OSK3NFVY-DlrxddG-.js +10 -0
  59. package/dist/assets/chunk-P2QGCYS3-CjqEi3mx.js +1 -0
  60. package/dist/assets/chunk-POPQ4Y6H-BytmIqFc.js +1 -0
  61. package/dist/assets/chunk-PWAF6VOD-CR3rNBNB.js +1 -0
  62. package/dist/assets/chunk-SHT3W25Y-B1Klag0Z.js +168 -0
  63. package/dist/assets/chunk-SVP7TREG-A4BO1_5v.js +88 -0
  64. package/dist/assets/chunk-TICWLB2K-B4lRXha0.js +206 -0
  65. package/dist/assets/chunk-XXDRQBXY-BhrH-9FX.js +1 -0
  66. package/dist/assets/chunk-Y2CYZVJY-OvsAdhaO.js +1 -0
  67. package/dist/assets/classDiagram-ZZMXUADV-icHQAbF4.js +1 -0
  68. package/dist/assets/classDiagram-v2-VYDZK3BY-icHQAbF4.js +1 -0
  69. package/dist/assets/clike-CIx9nZSv.js +1 -0
  70. package/dist/assets/clipboard-BZT4l65i.js +1 -0
  71. package/dist/assets/clojure-DFaIEz5O.js +1 -0
  72. package/dist/assets/cmake-koz-qBlo.js +1 -0
  73. package/dist/assets/cobol-Bo8Zw9gB.js +1 -0
  74. package/dist/assets/coffeescript-CXYzYf-Y.js +1 -0
  75. package/dist/assets/commonlisp-C4OOCwkD.js +1 -0
  76. package/dist/assets/company-members-C1IoXITE.js +1 -0
  77. package/dist/assets/cose-bilkent-JH36ORCC-ShY6JvWh.js +1 -0
  78. package/dist/assets/createLucideIcon-D-iIM3hK.js +92 -0
  79. package/dist/assets/crystal-BlJXQDvy.js +1 -0
  80. package/dist/assets/css-DEZwfVpY.js +1 -0
  81. package/dist/assets/cynefin-OW5HDTMX-SmJ8tLYh.js +1 -0
  82. package/dist/assets/cynefinDiagram-5FMLGOSQ-Qp2NNXUx.js +62 -0
  83. package/dist/assets/cypher-z2oFsVv2.js +1 -0
  84. package/dist/assets/cytoscape.esm-B68Piqei.js +321 -0
  85. package/dist/assets/d-Dkt6y7AQ.js +1 -0
  86. package/dist/assets/dagre-Bnei_7lW.js +1 -0
  87. package/dist/assets/dagre-GXQ25YYZ-C1bu-Sbk.js +4 -0
  88. package/dist/assets/defaultLocale-C2Bpu8Ih.js +1 -0
  89. package/dist/assets/definition-qmfin__X.js +1 -0
  90. package/dist/assets/diagram-S7CK7UJ4-D0cqRe3j.js +30 -0
  91. package/dist/assets/diagram-UQ7AKVKN-DdEgR6LR.js +41 -0
  92. package/dist/assets/diagram-VSXAHHWV-B_APewr5.js +3 -0
  93. package/dist/assets/diagram-VX7I27RA-B2quR8-z.js +24 -0
  94. package/dist/assets/diagram-Z3DM3KII-BpQRCt5N.js +24 -0
  95. package/dist/assets/diff-C60bAYOU.js +1 -0
  96. package/dist/assets/dist-B0TRtKS8.js +1 -0
  97. package/dist/assets/dist-B3Uu-urE.js +1 -0
  98. package/dist/assets/dist-BRrJTSwu.js +1 -0
  99. package/dist/assets/dist-BX-OCtve.js +7 -0
  100. package/dist/assets/dist-BXoB5t8y.js +1 -0
  101. package/dist/assets/dist-BeN6V24C.js +1 -0
  102. package/dist/assets/dist-Bs8B1orN.js +1 -0
  103. package/dist/assets/dist-BuzarGBs.js +1 -0
  104. package/dist/assets/dist-C2jegCUe.js +2 -0
  105. package/dist/assets/dist-C8CoeHVO.js +6 -0
  106. package/dist/assets/dist-CBo4NvFW.js +1 -0
  107. package/dist/assets/dist-CSbL7rtN.js +1 -0
  108. package/dist/assets/dist-CWrRKmYk.js +1 -0
  109. package/dist/assets/dist-CXeuJs-w.js +1 -0
  110. package/dist/assets/dist-Cc3Bt6H4.js +1 -0
  111. package/dist/assets/dist-Cj4C2HPs.js +1 -0
  112. package/dist/assets/dist-DCJXgQu0.js +13 -0
  113. package/dist/assets/dist-DKJ0FdKS.js +1 -0
  114. package/dist/assets/dist-DZgNtG8a.js +1 -0
  115. package/dist/assets/dist-DoBOMP6Y.js +1 -0
  116. package/dist/assets/dist-DpmnjHX9.js +1 -0
  117. package/dist/assets/dist-DsLYqWnM.js +1 -0
  118. package/dist/assets/dist-DyyIM2uF.js +3 -0
  119. package/dist/assets/dist-YH7EZ8d1.js +1 -0
  120. package/dist/assets/dist-oQmcCiSD.js +1 -0
  121. package/dist/assets/dist-sLIQSVjm.js +13 -0
  122. package/dist/assets/dist-xQwUswee.js +1 -0
  123. package/dist/assets/dockerfile-BttNdtK0.js +1 -0
  124. package/dist/assets/dtd-CCVZU5Da.js +1 -0
  125. package/dist/assets/dylan-3pmV5wzs.js +1 -0
  126. package/dist/assets/ebnf-bm-I2WIh.js +1 -0
  127. package/dist/assets/ebnfDiagram-PWID7BFC-C9x73jSZ.js +1 -0
  128. package/dist/assets/ecl-BIv3PrZb.js +1 -0
  129. package/dist/assets/eiffel-DuLnr4-r.js +1 -0
  130. package/dist/assets/elm-njbaCU-L.js +1 -0
  131. package/dist/assets/environments-Cd-g_MmN.js +1 -0
  132. package/dist/assets/erDiagram-RLTQ6QDP-Dkp7z94L.js +99 -0
  133. package/dist/assets/erlang-CuhOC2I8.js +1 -0
  134. package/dist/assets/eventmodeling-NTZA5JFV-CCSRuDgA.js +1 -0
  135. package/dist/assets/external-link-BKz-OKDG.js +1 -0
  136. package/dist/assets/factor-CM3-9V3b.js +1 -0
  137. package/dist/assets/fcl-nWsMJ92o.js +1 -0
  138. package/dist/assets/file-text-DXa-cUrm.js +1 -0
  139. package/dist/assets/flowDiagram-HODETNUW-CDvpIOlT.js +1 -0
  140. package/dist/assets/forth-BQ9HrCVY.js +1 -0
  141. package/dist/assets/fortran-DHJe28ev.js +1 -0
  142. package/dist/assets/ganttDiagram-EL5Y4UJY-CJs7mNJX.js +292 -0
  143. package/dist/assets/gas-ByO0qYMr.js +1 -0
  144. package/dist/assets/gherkin-CwOmHL5K.js +1 -0
  145. package/dist/assets/gitGraph-4MIJSDKK-SUTvd_QT.js +1 -0
  146. package/dist/assets/gitGraphDiagram-WWUBYQGX-ByeD7NPE.js +106 -0
  147. package/dist/assets/graphlib-DHhK3saS.js +1 -0
  148. package/dist/assets/groovy-ByXGF8cx.js +1 -0
  149. package/dist/assets/haskell-CHSpCNOy.js +1 -0
  150. package/dist/assets/haxe-P2jh68ck.js +1 -0
  151. package/dist/assets/health-Dc13TJNg.js +1 -0
  152. package/dist/assets/heartbeats-CY77VTM_.js +1 -0
  153. package/dist/assets/http-0jwMmfWP.js +1 -0
  154. package/dist/assets/idl-DTVVj6r5.js +1 -0
  155. package/dist/assets/index-CWuperHN.css +1 -0
  156. package/dist/assets/index-ZrmXLuMX.js +733 -0
  157. package/dist/assets/info-A6RAGUB7-DP8pqSDg.js +1 -0
  158. package/dist/assets/infoDiagram-27XIBGKW-B6sR9qVK.js +2 -0
  159. package/dist/assets/init-BXPE0p7i.js +1 -0
  160. package/dist/assets/input-BkGpMopE.js +1 -0
  161. package/dist/assets/ishikawaDiagram-5VMMS53U-HFQ3gYGN.js +70 -0
  162. package/dist/assets/javascript-Cblpdx44.js +1 -0
  163. package/dist/assets/journeyDiagram-3NMN7TZE-BtoNErTz.js +139 -0
  164. package/dist/assets/julia-KVJvUu_F.js +1 -0
  165. package/dist/assets/kanban-definition-UXKFOSKX-Y55yoRj4.js +89 -0
  166. package/dist/assets/katex-Du_FPwxl.js +257 -0
  167. package/dist/assets/label-C-aWneNy.js +5 -0
  168. package/dist/assets/line-CJEZO7lL.js +1 -0
  169. package/dist/assets/linear-s0r5e4qh.js +1 -0
  170. package/dist/assets/livescript-DSHsJPcD.js +1 -0
  171. package/dist/assets/loader-circle-DwlcG9aS.js +1 -0
  172. package/dist/assets/lua-Vher-70I.js +1 -0
  173. package/dist/assets/mathematica-CE9SaVsW.js +1 -0
  174. package/dist/assets/mbox-JGl1Fgvq.js +1 -0
  175. package/dist/assets/mention-chips-pBjlxGok.js +17 -0
  176. package/dist/assets/mermaid-parser.core-CHJSk6z0.js +7 -0
  177. package/dist/assets/mermaid.core-G_BSi0G0.js +42 -0
  178. package/dist/assets/mindmap-definition-YA3MSWOX-BnlANYwV.js +96 -0
  179. package/dist/assets/mirc-BGWbO906.js +1 -0
  180. package/dist/assets/mllike-DuNQsEw8.js +1 -0
  181. package/dist/assets/model-DL5biheO.js +1 -0
  182. package/dist/assets/modelica-5XCgKQt8.js +1 -0
  183. package/dist/assets/mscgen-mVFg19ri.js +1 -0
  184. package/dist/assets/mumps-C7oS353s.js +1 -0
  185. package/dist/assets/nginx-DXVlpyCz.js +1 -0
  186. package/dist/assets/nsis-KFC6hioG.js +1 -0
  187. package/dist/assets/ntriples-5ckCopnn.js +1 -0
  188. package/dist/assets/octagon-alert-CTp78pR9.js +1 -0
  189. package/dist/assets/octave-D1J2QQNt.js +1 -0
  190. package/dist/assets/ordinal-BJyFM1v8.js +1 -0
  191. package/dist/assets/oz-CPsllMDD.js +1 -0
  192. package/dist/assets/packet-AYTQ26CC-DHxu-C4z.js +1 -0
  193. package/dist/assets/pascal-B-I6JP0Y.js +1 -0
  194. package/dist/assets/path-D6mommQw.js +1 -0
  195. package/dist/assets/pegDiagram-XKGWAZYB-CHhCzuLt.js +1 -0
  196. package/dist/assets/perl-CI8WIWBi.js +1 -0
  197. package/dist/assets/pie-WAS4IAKB-CP_gIBKD.js +1 -0
  198. package/dist/assets/pieDiagram-E7YTZNPT-CEGI1j0Q.js +39 -0
  199. package/dist/assets/pig-FQI0W3S3.js +1 -0
  200. package/dist/assets/powershell-BAu6x78A.js +1 -0
  201. package/dist/assets/preload-helper-CceJXRIF.js +1 -0
  202. package/dist/assets/prod-COP_vZWu.js +495 -0
  203. package/dist/assets/properties-BKTTDgau.js +1 -0
  204. package/dist/assets/protobuf-UWh8gh_j.js +1 -0
  205. package/dist/assets/pug-C20tNwmy.js +1 -0
  206. package/dist/assets/puppet-BAHVzCkO.js +1 -0
  207. package/dist/assets/python-C2DOnsac.js +1 -0
  208. package/dist/assets/q-Cooe-Nh8.js +1 -0
  209. package/dist/assets/quadrantDiagram-AXDQQJYC-BfVC-A1t.js +7 -0
  210. package/dist/assets/r-CktBKya9.js +1 -0
  211. package/dist/assets/radar-RG4KPBEZ-DbvKbV6l.js +1 -0
  212. package/dist/assets/railroad-74A4TZTK-BPHjMWIu.js +1 -0
  213. package/dist/assets/railroad-abnf-HS5TGJTU-DKY8xCGL.js +1 -0
  214. package/dist/assets/railroad-ebnf-LZEXJU2U-DK75GN4x.js +1 -0
  215. package/dist/assets/railroad-peg-WCYAUIDC-0bHp9JB9.js +1 -0
  216. package/dist/assets/railroadDiagram-O6MQD6OU-Bwh6snZb.js +1 -0
  217. package/dist/assets/requirementDiagram-BXWQKSXE-NEvTOdsw.js +84 -0
  218. package/dist/assets/rolldown-runtime-ZpX3ckPj.js +1 -0
  219. package/dist/assets/rotate-ccw-BhopZISX.js +1 -0
  220. package/dist/assets/rough.esm-DnC5Tr1g.js +1 -0
  221. package/dist/assets/router-BxwR1PwE.js +15 -0
  222. package/dist/assets/rpm-Csj9nLHl.js +1 -0
  223. package/dist/assets/ruby-bGx9eo-K.js +1 -0
  224. package/dist/assets/runtime-IAg0vdY9.js +4137 -0
  225. package/dist/assets/sankeyDiagram-P5KCCOFB-AvKb1lr-.js +40 -0
  226. package/dist/assets/sas-Drou_EQ9.js +1 -0
  227. package/dist/assets/save-D5KpMLil.js +1 -0
  228. package/dist/assets/scheme-DcjG9bAf.js +1 -0
  229. package/dist/assets/select-BqqjvKLd.js +1 -0
  230. package/dist/assets/sequenceDiagram-WJ2MYXX4-BP0QZnHN.js +162 -0
  231. package/dist/assets/sheet-Z4n6AEBA.js +1 -0
  232. package/dist/assets/shell-BSKClwid.js +1 -0
  233. package/dist/assets/sieve-CcvsXPZo.js +1 -0
  234. package/dist/assets/simple-mode-B79cVo-x.js +1 -0
  235. package/dist/assets/sizeCapture-INFHLROL-XURNLuv_.js +1 -0
  236. package/dist/assets/skeleton-BxD7FB8M.js +1 -0
  237. package/dist/assets/smalltalk-Cmg-4mjQ.js +1 -0
  238. package/dist/assets/solr-Dj8ahEwG.js +1 -0
  239. package/dist/assets/sparql-LAJYmgfk.js +1 -0
  240. package/dist/assets/spreadsheet-B8doD_pL.js +1 -0
  241. package/dist/assets/sql-C3kWxFGw.js +1 -0
  242. package/dist/assets/src-Bssc388C.js +1 -0
  243. package/dist/assets/stateDiagram-D77RDMKH-Ce0Wj7yz.js +1 -0
  244. package/dist/assets/stateDiagram-v2-MP3YSRHH-CREL-f_f.js +1 -0
  245. package/dist/assets/stex-CW6K5Nmu.js +1 -0
  246. package/dist/assets/stylus-BS-Ienrc.js +1 -0
  247. package/dist/assets/swift-BD82LMDK.js +1 -0
  248. package/dist/assets/swimlanes-42K2YHIH-CX7zPtNU.js +1 -0
  249. package/dist/assets/swimlanesDiagram-VR7AAH4N-B22pD4D6.js +8 -0
  250. package/dist/assets/tabs-Dqn3cNzC.js +1 -0
  251. package/dist/assets/tcl-RZa1cqc-.js +1 -0
  252. package/dist/assets/textile-C-BY_OGF.js +1 -0
  253. package/dist/assets/tiddlywiki-C9bm_Oju.js +1 -0
  254. package/dist/assets/tiki-DJOT-rFT.js +1 -0
  255. package/dist/assets/timeline-definition-24CTP7MA-Bw21rjHm.js +120 -0
  256. package/dist/assets/toml-Civ2fTsu.js +1 -0
  257. package/dist/assets/treeView-Q6P3EWNA-CzxfDhvq.js +1 -0
  258. package/dist/assets/treemap-WGGIJYW6-DNWYF4zd.js +1 -0
  259. package/dist/assets/triangle-alert-DOta-xfM.js +1 -0
  260. package/dist/assets/troff-Lns35Xcq.js +1 -0
  261. package/dist/assets/ttcn-7vlxVTUK.js +1 -0
  262. package/dist/assets/ttcn-cfg-B8qhhp6o.js +1 -0
  263. package/dist/assets/turtle-DTIS1YQ7.js +1 -0
  264. package/dist/assets/use-adapter-capabilities-0-4PhK9y.js +1 -0
  265. package/dist/assets/useHiddenSettings-D9d6LOsg.js +1 -0
  266. package/dist/assets/vb-BO8UacKu.js +1 -0
  267. package/dist/assets/vbscript-DWLru3lT.js +1 -0
  268. package/dist/assets/velocity-BIIn-Nl2.js +1 -0
  269. package/dist/assets/vennDiagram-4TSXK5OY-BuncstTm.js +34 -0
  270. package/dist/assets/verilog-BVYlmXGg.js +1 -0
  271. package/dist/assets/vhdl-Cn8cC8Yb.js +1 -0
  272. package/dist/assets/wardley-WFR3VGLG-C18JBEVS.js +1 -0
  273. package/dist/assets/wardleyDiagram-VM6X3IG4-DOHY7xcd.js +78 -0
  274. package/dist/assets/webidl-ChvzbZ5-.js +1 -0
  275. package/dist/assets/xquery-BKN7qEbU.js +1 -0
  276. package/dist/assets/xychartDiagram-S5SC5T6Z-qOWxoNte.js +7 -0
  277. package/dist/assets/yacas-BG9ha7tU.js +1 -0
  278. package/dist/assets/z80-CB2cGLew.js +1 -0
  279. package/dist/assets/zap-gf6Ev631.js +41 -0
  280. package/dist/brands/adapters/LICENSE +21 -0
  281. package/dist/brands/adapters/README.md +7 -0
  282. package/dist/brands/adapters/cursor-dark.svg +1 -0
  283. package/dist/brands/adapters/cursor.svg +1 -0
  284. package/dist/brands/adapters/gemini-color.svg +1 -0
  285. package/dist/brands/adapters/grok-dark.svg +1 -0
  286. package/dist/brands/adapters/grok.svg +1 -0
  287. package/dist/brands/adapters/hermesagent-dark.svg +1 -0
  288. package/dist/brands/adapters/hermesagent.svg +1 -0
  289. package/dist/brands/adapters/kimi-color-light.svg +1 -0
  290. package/dist/brands/adapters/kimi-color.svg +1 -0
  291. package/dist/brands/adapters/pi-dark.svg +1 -0
  292. package/dist/brands/adapters/pi.svg +1 -0
  293. package/dist/brands/apps/LOBE-LICENSE +21 -0
  294. package/dist/brands/apps/agentmail-dark.svg +16 -0
  295. package/dist/brands/apps/agentmail.svg +17 -0
  296. package/dist/brands/apps/airtable.svg +1 -0
  297. package/dist/brands/apps/anthropic-dark.svg +1 -0
  298. package/dist/brands/apps/anthropic.svg +1 -0
  299. package/dist/brands/apps/api-key-generic.svg +1 -0
  300. package/dist/brands/apps/arcade.png +0 -0
  301. package/dist/brands/apps/asana.svg +12 -0
  302. package/dist/brands/apps/beehiiv.png +0 -0
  303. package/dist/brands/apps/bitly.svg +1 -0
  304. package/dist/brands/apps/box.svg +1 -0
  305. package/dist/brands/apps/brex-dark.svg +1 -0
  306. package/dist/brands/apps/brex.svg +1 -0
  307. package/dist/brands/apps/candid.png +0 -0
  308. package/dist/brands/apps/clickhouse-dark.svg +1 -0
  309. package/dist/brands/apps/clickhouse.svg +1 -0
  310. package/dist/brands/apps/cloudflare.svg +1 -0
  311. package/dist/brands/apps/cloudinary-dark.svg +1 -0
  312. package/dist/brands/apps/cloudinary.svg +3 -0
  313. package/dist/brands/apps/coda.svg +1 -0
  314. package/dist/brands/apps/composio-dark.svg +11 -0
  315. package/dist/brands/apps/composio.svg +16 -0
  316. package/dist/brands/apps/context7-dark.svg +8 -0
  317. package/dist/brands/apps/context7.svg +8 -0
  318. package/dist/brands/apps/discord-dark.svg +1 -0
  319. package/dist/brands/apps/discord.svg +1 -0
  320. package/dist/brands/apps/egnyte.svg +1 -0
  321. package/dist/brands/apps/embat.svg +1 -0
  322. package/dist/brands/apps/executor.png +0 -0
  323. package/dist/brands/apps/fireflies.svg +76 -0
  324. package/dist/brands/apps/github-dark.svg +10 -0
  325. package/dist/brands/apps/github.svg +10 -0
  326. package/dist/brands/apps/gmail.svg +1 -0
  327. package/dist/brands/apps/google-calendar.svg +1 -0
  328. package/dist/brands/apps/google-chat.svg +1 -0
  329. package/dist/brands/apps/google-docs.svg +1 -0
  330. package/dist/brands/apps/google-drive.svg +1 -0
  331. package/dist/brands/apps/google-people.svg +1 -0
  332. package/dist/brands/apps/google-sheets.svg +1 -0
  333. package/dist/brands/apps/google-slides.svg +1 -0
  334. package/dist/brands/apps/google-workspace-search.svg +1 -0
  335. package/dist/brands/apps/hugging-face.svg +8 -0
  336. package/dist/brands/apps/imessage-photon.png +0 -0
  337. package/dist/brands/apps/jam-dev-dark.svg +1 -0
  338. package/dist/brands/apps/jam-dev.svg +1 -0
  339. package/dist/brands/apps/jira-dark.svg +1 -0
  340. package/dist/brands/apps/jira.svg +4 -0
  341. package/dist/brands/apps/kernel.svg +3 -0
  342. package/dist/brands/apps/linear-dark.svg +5 -0
  343. package/dist/brands/apps/linear.svg +5 -0
  344. package/dist/brands/apps/local-falcon.png +0 -0
  345. package/dist/brands/apps/make-dark.svg +1 -0
  346. package/dist/brands/apps/make.svg +1 -0
  347. package/dist/brands/apps/manifest.json +496 -0
  348. package/dist/brands/apps/manufact-dark.svg +6 -0
  349. package/dist/brands/apps/manufact.svg +5 -0
  350. package/dist/brands/apps/mem0.svg +1 -0
  351. package/dist/brands/apps/microsoft-teams.svg +68 -0
  352. package/dist/brands/apps/miro-dark.svg +1 -0
  353. package/dist/brands/apps/miro.svg +4 -0
  354. package/dist/brands/apps/mixpanel-dark.svg +1 -0
  355. package/dist/brands/apps/mixpanel.svg +1 -0
  356. package/dist/brands/apps/netlify-dark.svg +1 -0
  357. package/dist/brands/apps/netlify.svg +16 -0
  358. package/dist/brands/apps/notion-dark.svg +1 -0
  359. package/dist/brands/apps/notion.svg +1 -0
  360. package/dist/brands/apps/oauth-generic.svg +1 -0
  361. package/dist/brands/apps/openai-dark.svg +1 -0
  362. package/dist/brands/apps/openai.svg +1 -0
  363. package/dist/brands/apps/openrouter-dark.svg +3 -0
  364. package/dist/brands/apps/openrouter.svg +3 -0
  365. package/dist/brands/apps/oreilly.svg +1 -0
  366. package/dist/brands/apps/pagerduty.svg +4 -0
  367. package/dist/brands/apps/planetscale-dark.svg +1 -0
  368. package/dist/brands/apps/planetscale.svg +1 -0
  369. package/dist/brands/apps/posthog-dark.svg +1 -0
  370. package/dist/brands/apps/posthog.svg +1 -0
  371. package/dist/brands/apps/postman.svg +1 -0
  372. package/dist/brands/apps/railway-dark.svg +1 -0
  373. package/dist/brands/apps/railway.svg +1 -0
  374. package/dist/brands/apps/razorpay-dark.svg +1 -0
  375. package/dist/brands/apps/razorpay.svg +1 -0
  376. package/dist/brands/apps/resend-dark.svg +1 -0
  377. package/dist/brands/apps/resend.svg +1 -0
  378. package/dist/brands/apps/sanity-dark.svg +1 -0
  379. package/dist/brands/apps/sanity.svg +1 -0
  380. package/dist/brands/apps/sentry-dark.svg +1 -0
  381. package/dist/brands/apps/sentry.svg +1 -0
  382. package/dist/brands/apps/shopify.svg +24 -0
  383. package/dist/brands/apps/similarweb-dark.svg +1 -0
  384. package/dist/brands/apps/similarweb.svg +1 -0
  385. package/dist/brands/apps/slack.png +0 -0
  386. package/dist/brands/apps/slack.svg +17 -0
  387. package/dist/brands/apps/stripe.svg +11 -0
  388. package/dist/brands/apps/supabase.svg +15 -0
  389. package/dist/brands/apps/telegram.svg +12 -0
  390. package/dist/brands/apps/ticket-tailor-dark.svg +1 -0
  391. package/dist/brands/apps/ticket-tailor.svg +1 -0
  392. package/dist/brands/apps/ticktick.svg +1 -0
  393. package/dist/brands/apps/todoist.svg +1 -0
  394. package/dist/brands/apps/vercel-dark.svg +1 -0
  395. package/dist/brands/apps/vercel.svg +1 -0
  396. package/dist/brands/apps/webflow.svg +1 -0
  397. package/dist/brands/apps/wix-dark.svg +12 -0
  398. package/dist/brands/apps/wix.svg +12 -0
  399. package/dist/brands/apps/xai-dark.svg +1 -0
  400. package/dist/brands/apps/xai.svg +1 -0
  401. package/dist/brands/apps/xero.svg +1 -0
  402. package/dist/brands/apps/youcom-dark.svg +13 -0
  403. package/dist/brands/apps/youcom.svg +13 -0
  404. package/dist/brands/apps/zapier.svg +1 -0
  405. package/dist/brands/claude-color.svg +17 -0
  406. package/dist/brands/codex-color.svg +17 -0
  407. package/dist/brands/opencode-logo-dark-square.svg +18 -0
  408. package/dist/brands/opencode-logo-light-square.svg +18 -0
  409. package/dist/favicon-16x16.png +0 -0
  410. package/dist/favicon-32x32.png +0 -0
  411. package/dist/favicon.ico +0 -0
  412. package/dist/favicon.svg +9 -0
  413. package/dist/fonts/InterVariable-Italic.woff2 +0 -0
  414. package/dist/fonts/InterVariable.woff2 +0 -0
  415. package/dist/fonts/NOTICE.md +17 -0
  416. package/dist/index.html +97 -0
  417. package/dist/paperclip-thinking.svg +17 -0
  418. package/dist/site.webmanifest +30 -0
  419. package/dist/sw.js +85 -0
  420. package/dist/worktree-favicon-16x16.png +0 -0
  421. package/dist/worktree-favicon-32x32.png +0 -0
  422. package/dist/worktree-favicon.ico +0 -0
  423. package/dist/worktree-favicon.svg +9 -0
  424. package/package.json +22 -0
@@ -0,0 +1,495 @@
1
+ var mg=Object.defineProperty;var o=(e,t)=>mg(e,"name",{value:t,configurable:!0});import{n as rf}from"./rolldown-runtime-ZpX3ckPj.js";var I=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,$=globalThis,qr="10.71.0";function _t(){return yr($),$}o(_t,"getMainCarrier");function yr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||"10.71.0",t[qr]=t["10.71.0"]||{}}o(yr,"getSentryCarrier");function vr(e,t,n=$){const r=n.__SENTRY__=n.__SENTRY__||{},i=r[qr]=r["10.71.0"]||{};return i[e]||(i[e]=t())}o(vr,"getGlobalSingleton");var tc=["debug","info","warn","error","log","assert","trace"],gg="Sentry Logger ",po={};function Dt(e){if(!("console"in $))return e();const t=$.console,n={},r=Object.keys(po);r.forEach(i=>{const s=po[i];n[i]=t[i],t[i]=s});try{return e()}finally{r.forEach(i=>{t[i]=n[i]})}}o(Dt,"consoleSandbox");function _g(){rc().enabled=!0}o(_g,"enable");function yg(){rc().enabled=!1}o(yg,"disable");function of(){return rc().enabled}o(of,"isEnabled$1");function vg(...e){nc("log",...e)}o(vg,"log");function Sg(...e){nc("warn",...e)}o(Sg,"warn$1");function bg(...e){nc("error",...e)}o(bg,"error$1");function nc(e,...t){I&&of()&&Dt(()=>{$.console[e](`${gg}[${e}]:`,...t)})}o(nc,"_maybeLog");function rc(){return I?vr("loggerSettings",()=>({enabled:!1})):{enabled:!1}}o(rc,"_getLoggerSettings");var g={enable:_g,disable:yg,isEnabled:of,log:vg,warn:Sg,error:bg},sf=50;var fu=/\(error: (.*)\)/,pu=/captureMessage|captureException/;function af(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,i=0)=>{const s=[],a=n.split(`
2
+ `);for(let c=r;c<a.length;c++){let u=a[c];u.length>1024&&(u=u.slice(0,1024));const l=fu.test(u)?u.replace(fu,"$1"):u;if(!l.includes("Error: ")){for(const f of t){const d=f(l);if(d){s.push(d);break}}if(s.length>=sf+i)break}}return Tg(s.slice(i))}}o(af,"createStackParser");function Eg(e){return Array.isArray(e)?af(...e):e}o(Eg,"stackParserFromStackParserOptions");function Tg(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Mi(t).function||"")&&t.pop(),t.reverse(),pu.test(Mi(t).function||"")&&(t.pop(),pu.test(Mi(t).function||"")&&t.pop()),t.slice(0,sf).map(n=>({...n,filename:n.filename||Mi(t).filename,function:n.function||"?"}))}o(Tg,"stripSentryFramesAndReverse");function Mi(e){return e[e.length-1]||{}}o(Mi,"getLastStackFrame");var Os="<anonymous>";function xt(e){try{return!e||typeof e!="function"?Os:e.name||Os}catch{return Os}}o(xt,"getFunctionName");function da(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}o(da,"getFramesFromEvent");function Ig(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}o(Ig,"normalizeStackTracePath");var xr={},hu={};function Zt(e,t){return xr[e]=xr[e]||[],xr[e].push(t),()=>{const n=xr[e];if(n){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}o(Zt,"addHandler$1");function en(e,t){if(!hu[e]){hu[e]=!0;try{t()}catch(n){I&&g.error(`Error while instrumenting ${e}`,n)}}}o(en,"maybeInstrument");function Ge(e,t){const n=e&&xr[e];if(n)for(const r of n)try{r(t)}catch(i){I&&g.error(`Error while triggering instrumentation handler.
3
+ Type: ${e}
4
+ Name: ${xt(r)}
5
+ Error:`,i)}}o(Ge,"triggerHandlers$1");var Ls=null;function cf(e){const t="error";Zt(t,e),en(t,wg)}o(cf,"addGlobalErrorInstrumentationHandler");function wg(){Ls=$.onerror,$.onerror=function(e,t,n,r,i){return Ge("error",{column:r,error:i,line:n,msg:e,url:t}),Ls?Ls.apply(this,arguments):!1},$.onerror.__SENTRY_INSTRUMENTED__=!0}o(wg,"instrumentError");var Ps=null;function uf(e){const t="unhandledrejection";Zt(t,e),en(t,kg)}o(uf,"addGlobalUnhandledRejectionInstrumentationHandler");function kg(){Ps=$.onunhandledrejection,$.onunhandledrejection=function(e){return Ge("unhandledrejection",e),Ps?Ps.apply(this,arguments):!0},$.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}o(kg,"instrumentUnhandledRejection");var lf=Object.prototype.toString;function De(e){switch(lf.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Jo(e,Error)}}o(De,"isError");function Sr(e,t){return lf.call(e)===`[object ${t}]`}o(Sr,"isBuiltin");function df(e){return Sr(e,"ErrorEvent")}o(df,"isErrorEvent$3");function mu(e){return Sr(e,"DOMError")}o(mu,"isDOMError");function Rg(e){return Sr(e,"DOMException")}o(Rg,"isDOMException");function it(e){return Sr(e,"String")}o(it,"isString");function Vo(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}o(Vo,"isParameterizedString");function ht(e){return e===null||Vo(e)||typeof e!="object"&&typeof e!="function"}o(ht,"isPrimitive");function Pe(e){return Sr(e,"Object")}o(Pe,"isPlainObject");function Ve(e){return typeof e=="object"&&e!==null}o(Ve,"isObjectLike");function Yo(e){return typeof Event<"u"&&Jo(e,Event)}o(Yo,"isEvent");function Cg(e){return Sr(e,"RegExp")}o(Cg,"isRegExp");function Mn(e){return!!(e?.then&&typeof e.then=="function")}o(Mn,"isThenable");function Jo(e,t){try{return e instanceof t}catch{return!1}}o(Jo,"isInstanceOf");function ic(e){return typeof Request<"u"&&Jo(e,Request)}o(ic,"isRequest");function Ae(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const i=n(r);typeof i=="function"&&ff(i,r);try{e[t]=i}catch{I&&g.log(`Failed to replace method "${t}" in object`,e)}}o(Ae,"fill");function Ce(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{I&&g.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}o(Ce,"addNonEnumerableProperty");function ff(e,t){try{e.prototype=t.prototype=t.prototype||{},Ce(e,"__sentry_original__",t)}catch{}}o(ff,"markFunctionWrapped");function oc(e){return e.__sentry_original__}o(oc,"getOriginalFunction");function pf(e){if(De(e))return{message:e.message,name:e.name,stack:e.stack,...gu(e)};if(Yo(e)){const{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...gu(e)}}return e}o(pf,"convertToPlainObject");function gu(e){return Ve(e)?Object.fromEntries(Object.entries(e)):{}}o(gu,"getOwnProperties");function Ag(e){const t=Object.keys(pf(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}o(Ag,"extractExceptionKeysForMessage");var Un;function ii(e){if(Un!==void 0)return Un?Un(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=$;return t in n&&typeof n[t]=="function"?(Un=n[t],Un(e)):(Un=null,e())}o(ii,"withRandomSafeContext");function Ct(){return ii(()=>Math.random())}o(Ct,"safeMathRandom");function yt(){return ii(()=>Date.now())}o(yt,"safeDateNow");var hf=Symbol.for("sentry.skipNormalization"),Mg=Symbol.for("sentry.overrideNormalizationDepth");function Ng(e){Ce(e,hf,!0)}o(Ng,"setSkipNormalizationHint");function xg(e){return!!e[hf]}o(xg,"hasSkipNormalizationHint");function Og(e){const t=e[Mg];return typeof t=="number"?t:void 0}o(Og,"getNormalizationDepthOverrideHint");var fa;function Lg(e){fa=e}o(Lg,"setNormalizeStringifier");function we(e,t=100,n=1/0){try{return pa("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}o(we,"normalize");function mf(e,t=3,n=102400){const r=we(e,t);return Fg(r)>n?mf(e,t-1,n):r}o(mf,"normalizeToSize");function pa(e,t,n=1/0,r=1/0,i=$g()){const[s,a]=i;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const c=gf(e,t);if(!c.startsWith("[object "))return c;if(xg(t))return t;const u=Og(t),l=u!==void 0?u:n;if(l===0)return c.replace("object ","");if(s(t))return"[Circular ~]";const f=t;if(f&&typeof f.toJSON=="function")try{return pa("",f.toJSON(),l-1,r,i)}catch{}const d=Array.isArray(t)?[]:{};let p=0;const h=pf(t);for(const m in h){if(!Object.prototype.hasOwnProperty.call(h,m))continue;if(p>=r){d[m]="[MaxProperties ~]";break}const _=h[m];d[m]=pa(m,_,l-1,r,i),p++}return a(t),d}o(pa,"visit");function gf(e,t){try{if(fa){const n=fa(t);if(n)return n}return typeof global<"u"&&t===global?"[Global]":typeof t=="number"&&!Number.isFinite(t)?`[${t}]`:typeof t=="function"?`[Function: ${xt(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${Pg(t)}]`}catch(n){return`**non-serializable** (${n})`}}o(gf,"stringifyValue");function Pg(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}o(Pg,"getConstructorName$1");function Dg(e){return~-encodeURI(e).split(/%..|./).length}o(Dg,"utf8Length");function Fg(e){return Dg(JSON.stringify(e))}o(Fg,"jsonSize");function $g(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}o(t,"memoize");function n(r){e.delete(r)}return o(n,"unmemoize"),[t,n]}o($g,"memoBuilder");function We(e,t="[unserializable]"){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return typeof t=="function"?t(e):t}}o(We,"stringify");function zr(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}o(zr,"truncate");function Ds(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let s=Math.min(i+140,r);return s>r-5&&(s=r),s===r&&(i=Math.max(s-140,0)),n=n.slice(i,s),i>0&&(n=`'{snip} ${n}`),s<r&&(n+=" {snip}"),n}o(Ds,"snipLine");function ho(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const i=e[r];ht(i)?n.push(String(i)):i instanceof Error?n.push(i.message?`${i.name}: ${i.message}`:i.name):n.push(gf(void 0,i))}return n.join(t)}o(ho,"safeJoin");function Dr(e,t,n=!1){return it(e)?Cg(t)?t.test(e):it(t)?n?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}o(Dr,"isMatchingPattern");function Ye(e,t=[],n=!1){for(const r of t)if(Dr(e,r,n))return!0;return!1}o(Ye,"stringMatchesSomePattern");function Bg(){const e=$;return e.crypto||e.msCrypto}o(Bg,"getCrypto");var Fs;function Ug(){return Ct()*16}o(Ug,"getRandomByte");function ke(e=Bg()){try{if(e?.randomUUID)return ii(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Fs||(Fs="10000000100040008000100000000000"),Fs.replace(/[018]/g,t=>(t^(Ug()&15)>>t/4).toString(16))}o(ke,"uuid4");function _f(e){return e.exception?.values?.[0]}o(_f,"getFirstException");function dn(e){const{message:t,event_id:n}=e;if(t)return t;const r=_f(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}o(dn,"getEventDescription");function ha(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}o(ha,"addExceptionTypeValue");function pt(e,t){const n=_f(e);if(!n)return;const r={type:"generic",handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&"data"in t){const s={...i?.data,...t.data};n.mechanism.data=s}}o(pt,"addExceptionMechanism");function Hg(e,t,n=5){if(t.lineno===void 0)return;const 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(a=>Ds(a,0));const s=Math.min(r-1,i);t.context_line=Ds(e[s],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(a=>Ds(a,0))}o(Hg,"addContextToFrame");function _u(e){if(Wg(e))return!0;try{Ce(e,"__sentry_captured__",!0)}catch{}return!1}o(_u,"checkOrSetAlreadyCaught");function Wg(e){try{return e.__sentry_captured__}catch{}}o(Wg,"isAlreadyCaptured");var yf=1e3;function Nn(){return yt()/yf}o(Nn,"dateTimestampInSeconds");function jg(){const{performance:e}=$;if(!e?.now||!e.timeOrigin)return Nn;const t=e.timeOrigin;return()=>(t+ii(()=>e.now()))/yf}o(jg,"createUnixTimestampInSecondsFunc");var yu;function ge(){return(yu??(yu=jg()))()}o(ge,"timestampInSeconds");var $s=null;function qg(){const{performance:e}=$;if(!e?.now)return;const t=3e5,n=ii(()=>e.now()),r=yt(),i=e.timeOrigin;if(typeof i=="number"&&Math.abs(i+n-r)<t)return i;const s=e.timing?.navigationStart;return typeof s=="number"&&Math.abs(s+n-r)<t?s:r-n}o(qg,"getBrowserTimeOrigin");function Ee(){return $s===null&&($s=qg()),$s}o(Ee,"browserPerformanceTimeOrigin");function zg(e){const t=ge(),n={sid:ke(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:o(()=>Vg(n),"toJSON")};return e&&nr(n,e),n}o(zg,"makeSession$1");function nr(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||ge(),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:ke()),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{const n=e.timestamp-e.started;e.duration=n>=0?n: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)}o(nr,"updateSession");function Gg(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),nr(e,n)}o(Gg,"closeSession");function Vg(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}}}o(Vg,"sessionToJSON");function oi(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=oi(r[i],t[i],n-1));return r}o(oi,"merge");function mt(){return ke()}o(mt,"generateTraceId");function At(){return ke().substring(16)}o(At,"generateSpanId");function vf(e){try{const t=$.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}o(vf,"makeWeakRef");function Sf(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}o(Sf,"derefWeakRef");var ma="_sentrySpan";function gt(e,t){t?Ce(e,ma,vf(t)):delete e[ma]}o(gt,"_setSpanForScope");function rr(e){return Sf(e[ma])}o(rr,"_getSpanForScope");var Yg=100,Sn=class ga{static{o(this,"Scope")}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:Ct()}}clone(){const t=new ga;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,gt(t,rr(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&nr(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,{tags:r,attributes:i,extra:s,user:a,contexts:c,level:u,fingerprint:l=[],propagationContext:f,conversationId:d}=(n instanceof ga?n.getScopeData():Pe(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...s},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),l.length&&(this._fingerprint=l),f&&(this._propagationContext=f),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,gt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:mt(),sampleRand:Ct()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Yg;if(r<=0)return this;const i={timestamp:Nn(),...t,message:t.message?zr(t.message,2048):t.message};return this._breadcrumbs.push(i),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),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(t){return this._attachments.push(t),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:rr(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=oi(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||ke();if(!this._client)return I&&g.warn("No client configured on scope - will not capture exception!"),r;const i=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:i,...n,event_id:r},this),r}captureMessage(t,n,r){const i=r?.event_id||ke();if(!this._client)return I&&g.warn("No client configured on scope - will not capture message!"),i;const s=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:i},this),i}captureEvent(t,n){const r=t.event_id||n?.event_id||ke();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(I&&g.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function Jg(){return vr("defaultCurrentScope",()=>new Sn)}o(Jg,"getDefaultCurrentScope");function Kg(){return vr("defaultIsolationScope",()=>new Sn)}o(Kg,"getDefaultIsolationScope");var vu=o(e=>e instanceof Promise&&!e[bf],"isActualPromise"),bf=Symbol("chained PromiseLike"),Ef=o((e,t,n)=>{const r=e.then(i=>(t(i),i),i=>{throw n(i),i});return vu(r)&&vu(e)?r:Xg(e,r)},"chainAndCopyPromiseLike"),Xg=o((e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const i=e[r];typeof i=="function"?Object.defineProperty(t,r,{value:o((...s)=>i.apply(e,s),"value"),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[bf]:!0}),t},"copyProps"),Qg=class{static{o(this,"AsyncContextStack")}constructor(e,t){let n;e?n=e:n=new Sn;let r;t?r=t:r=new Sn,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(r){throw this._popScope(),r}return Mn(n)?Ef(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(){const 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 ir(){const e=_t(),t=yr(e);return t.stack=t.stack||new Qg(Jg(),Kg())}o(ir,"getAsyncContextStack");function Zg(e){return ir().withScope(e)}o(Zg,"withScope$1");function e_(e,t){const n=ir();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}o(e_,"withSetScope");function Su(e){return ir().withScope(()=>e(ir().getIsolationScope()))}o(Su,"withIsolationScope$1");function t_(){return{withIsolationScope:Su,withScope:Zg,withSetScope:e_,withSetIsolationScope:o((e,t)=>Su(t),"withSetIsolationScope"),getCurrentScope:o(()=>ir().getScope(),"getCurrentScope"),getIsolationScope:o(()=>ir().getIsolationScope(),"getIsolationScope")}}o(t_,"getStackAsyncContextStrategy");function tn(e){const t=yr(e);return t.acs?t.acs:t_()}o(tn,"getAsyncContextStrategy");function n_(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}o(n_,"isAttributeObject");function r_(e,t){const{value:n,unit:r}=n_(e)?e:{value:e,unit:void 0},i=i_(n),s=r&&typeof r=="string"?{unit:r}:{};if(i)return{...i,...s};if(!t||t==="skip-undefined"&&n===void 0)return;let a="";try{a=JSON.stringify(n)??""}catch{}return{value:a,type:"string",...s}}o(r_,"attributeValueToTypedAttributeValue");function or(e,t=!1){const n={};for(const[r,i]of Object.entries(e??{})){const s=r_(i,t);s&&(n[r]=s)}return n}o(or,"serializeAttributes");function bu(e){if(!e)return 0;let t=0;for(const[n,r]of Object.entries(e)){t+=n.length*2,t+=r.type.length*2,t+=(r.unit?.length??0)*2;const i=r.value;Array.isArray(i)?t+=Eu(i[0])*i.length:ht(i)?t+=Eu(i):t+=100}return t}o(bu,"estimateTypedAttributesSizeInBytes");function Eu(e){return typeof e=="string"?e.length*2:typeof e=="boolean"?4:typeof e=="number"?8:0}o(Eu,"estimatePrimitiveSizeInBytes$1");function i_(e){if(Array.isArray(e))return{value:e,type:"array"};const 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}}o(i_,"getTypedAttributeValue");var Tf;function o_(){return Tf?.()}o(o_,"getExternalPropagationContext");function s_(){return Tf!==void 0}o(s_,"hasExternalPropagationContext");function q(){const e=_t();return tn(e).getCurrentScope()}o(q,"getCurrentScope");function he(){const e=_t();return tn(e).getIsolationScope()}o(he,"getIsolationScope");function Fr(){return vr("globalScope",()=>new Sn)}o(Fr,"getGlobalScope");function Ke(...e){const t=_t(),n=tn(t);if(e.length===2){const[r,i]=e;return r?n.withSetScope(r,i):n.withScope(i)}return n.withScope(e[0])}o(Ke,"withScope");function ux(...e){const t=_t(),n=tn(t);if(e.length===2){const[r,i]=e;return r?n.withSetIsolationScope(r,i):n.withIsolationScope(i)}return n.withIsolationScope(e[0])}o(ux,"withIsolationScope");function R(){return q().getClient()}o(R,"getClient");function If(e){const t=o_();if(t)return{trace_id:t.traceId,span_id:t.spanId};const{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),s={trace_id:n,span_id:i||At()};return r&&(s.parent_span_id=r),s}o(If,"getTraceContextFromScope");var rt="sentry.source",a_="sentry.sample_rate",c_="sentry.previous_trace_sample_rate",ve="sentry.op",re="sentry.origin";var mo="sentry.idle_span_finish_reason",si="sentry.measurement_unit",ai="sentry.measurement_value",u_="sentry.release",l_="sentry.environment",d_="sentry.sdk.integrations",f_="user.id",p_="user.email",h_="user.ip_address",m_="user.name",_a="sentry.custom_span_name",wf="sentry.profile_id",xn="sentry.exclusive_time";var g_="sentry.link.type",__="gen_ai.conversation.id";function y_(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"}}o(y_,"getSpanStatusFromHttpCode");function go(e,t){e.setAttribute("http.response.status_code",t);const n=y_(t);n.message!=="unknown_error"&&e.setStatus(n)}o(go,"setHttpStatus");var kf="_sentryScope",Rf="_sentryIsolationScope",v_=Symbol.for("sentry.otelSourceInference"),S_=Symbol.for("sentry.otelSourceExplicitlySet"),b_=Symbol.for("sentry.tracerProviderSpan");function sr(e,t,n){e&&(Ce(e,Rf,vf(n)),Ce(e,kf,t))}o(sr,"setCapturedScopesOnSpan");function gn(e){const t=e;return{scope:t[kf],isolationScope:Sf(t[Rf])}}o(gn,"getCapturedScopesOnSpan");function Tu(e){return e[v_]===!0}o(Tu,"spanShouldInferOtelSource");function E_(e){Ce(e,S_,!0)}o(E_,"markSpanSourceAsExplicit");function Iu(e){return e[b_]===!0}o(Iu,"spanIsTracerProviderSpan");var Cf="sentry-";function sc(e){const t=T_(e);if(!t)return;const n=Object.entries(t).reduce((r,[i,s])=>{if(i.startsWith("sentry-")){const a=i.slice(7);r[a]=s}return r},{});if(Object.keys(n).length>0)return n}o(sc,"baggageHeaderToDynamicSamplingContext");function Af(e){if(e)return I_(Object.entries(e).reduce((t,[n,r])=>(r&&(t[`${Cf}${n}`]=r),t),{}))}o(Af,"dynamicSamplingContextToSentryBaggageHeader");function T_(e){if(!(!e||!it(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=wu(n);return Object.entries(r).forEach(([i,s])=>{t[i]=s}),t},{}):wu(e)}o(T_,"parseBaggageHeader");function wu(e){return e.split(",").map(t=>{const n=t.indexOf("=");return n===-1?[]:[t.slice(0,n),t.slice(n+1)].map(r=>{try{return decodeURIComponent(r.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}o(wu,"baggageHeaderToObject");function I_(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],i)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,a=i===0?s:`${t},${s}`;return a.length>8192?(I&&g.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):a},"")}o(I_,"objectToBaggageHeader");var w_=/^o(\d+)\./,k_=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function R_(e){return e==="http"||e==="https"}o(R_,"isValidProtocol");function vt(e,t=!1){const{host:n,path:r,pass:i,port:s,projectId:a,protocol:c,publicKey:u}=e;return`${c}://${u}${t&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${a}`}o(vt,"dsnToString");function Mf(e){const t=k_.exec(e);if(!t){Dt(()=>{});return}const[n,r,i="",s="",a="",c=""]=t.slice(1);let u="",l=c;const f=l.split("/");if(f.length>1&&(u=f.slice(0,-1).join("/"),l=f.pop()),l){const d=l.match(/^\d+/);d&&(l=d[0])}return Nf({host:s,pass:i,path:u,projectId:l,port:a,protocol:n,publicKey:r})}o(Mf,"dsnFromString");function Nf(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}o(Nf,"dsnFromComponents");function C_(e){if(!I)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(g.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?R_(r)?t&&isNaN(parseInt(t,10))?(g.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(g.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(g.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}o(C_,"validateDsn");function A_(e){return e.match(w_)?.[1]}o(A_,"extractOrgIdFromDsnHost");function xf(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=A_(n)),r}o(xf,"extractOrgIdFromClient");function Of(e){const t=typeof e=="string"?Mf(e):Nf(e);if(!(!t||!C_(t)))return t}o(Of,"makeDsn");function bn(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}o(bn,"parseSampleRate");var Lf=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function M_(e){if(!e)return;const t=e.match(Lf);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}o(M_,"extractTraceparentData");function Pf(e,t){const n=M_(e),r=sc(t);if(!n?.traceId)return{traceId:mt(),sampleRand:Ct()};const i=N_(n,r);r&&(r.sample_rand=i.toString());const{traceId:s,parentSpanId:a,parentSampled:c}=n;return{traceId:s,parentSpanId:a,sampled:c,dsc:r||{},sampleRand:i}}o(Pf,"propagationContextFromHeaders");function Df(e=mt(),t=At(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}o(Df,"generateSentryTraceHeader");function Ff(e=mt(),t=At(),n){return`00-${e}-${t}-${n?"01":"00"}`}o(Ff,"generateTraceparentHeader");function N_(e,t){const n=bn(t?.sample_rand);if(n!==void 0)return n;const r=bn(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Ct()*r:r+Ct()*(1-r):Ct()}o(N_,"getSampleRandFromTraceparentAndDsc");function x_(e,t){const n=xf(e);return t&&n&&t!==n?(g.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)?(g.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}o(x_,"shouldContinueTrace");var ku=!1;function O_(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:s,status:a,origin:c,links:u}=V(e);return{parent_span_id:s,span_id:t,trace_id:n,data:r,op:i,status:a,origin:c,links:u}}o(O_,"spanToTransactionTraceContext");function $f(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:V(e).parent_span_id,s=gn(e).scope;return{parent_span_id:i,span_id:r?s?.getPropagationContext().propagationSpanId||At():t,trace_id:n}}o($f,"spanToTraceContext");function L_(e){const{traceId:t,spanId:n}=e.spanContext(),r=St(e);return Df(t,n,r)}o(L_,"spanToTraceHeader");function P_(e){const{traceId:t,spanId:n}=e.spanContext(),r=St(e);return Ff(t,n,r)}o(P_,"spanToTraceparentHeader");function Bf(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...i},attributes:s})=>({span_id:t,trace_id:n,sampled:r===1,attributes:s,...i}))}o(Bf,"convertSpanLinksForEnvelope");function Uf(e){if(e?.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:r},attributes:i})=>({span_id:t,trace_id:n,sampled:r===1,attributes:i}))}o(Uf,"getStreamedSpanLinks");function Mt(e){return typeof e=="number"?Ru(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Ru(e.getTime()):ge()}o(Mt,"spanTimeInputToSeconds");function Ru(e){return e>9999999999?e/1e3:e}o(Ru,"ensureTimestampInSeconds");function V(e){if(qf(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(jf(e)){const{attributes:r,startTime:i,name:s,endTime:a,status:c,links:u}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:Hf(e),start_timestamp:Mt(i),timestamp:Mt(a)||void 0,status:zf(c),op:r[ve],origin:r[re],links:Bf(u)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}o(V,"spanToJSON");function _o(e){if(qf(e))return e.getStreamedSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(jf(e)){const{attributes:r,startTime:i,name:s,endTime:a,status:c,links:u}=e;return{name:s,span_id:t,trace_id:n,parent_span_id:Hf(e),start_timestamp:Mt(i),end_timestamp:Mt(a),is_segment:e===yo(e),status:ac(c),attributes:Gf(r,c),links:Uf(u)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===yo(e)}}o(_o,"spanToStreamedSpanJSON");function Hf(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}o(Hf,"getOtelParentSpanId");function Wf(e){return{...e,attributes:or(e.attributes),links:e.links?.map(t=>({...t,attributes:or(t.attributes)}))}}o(Wf,"streamedSpanJsonToSerializedSpan");function jf(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}o(jf,"spanIsOpenTelemetrySdkTraceBaseSpan");function qf(e){return typeof e.getSpanJSON=="function"}o(qf,"spanIsSentrySpan");function St(e){const{traceFlags:t}=e.spanContext();return t===1}o(St,"spanIsSampled");function zf(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}o(zf,"getStatusMessage");function ac(e){return!e||e.code===1||e.code===0||e.message==="cancelled"?"ok":"error"}o(ac,"getSimpleStatus");function Gf(e,t){const n=ac(t)==="error"?t?.message:void 0;return{...n&&{"sentry.status.message":n},...e}}o(Gf,"addStatusMessageAttribute");var _n="_sentryChildSpans",ya="_sentryRootSpan";function Ji(e,t){const n=e[ya]||e;Ce(t,ya,n),St(e)&&(!e.isRecording()&&!n.isRecording()||(e[_n]?e[_n].add(t):Ce(e,_n,new Set([t]))))}o(Ji,"addChildSpanToSpan");function D_(e,t){e[_n]&&e[_n].delete(t)}o(D_,"removeChildSpanFromSpan");function Ki(e){const t=new Set;function n(r){if(!t.has(r)&&St(r)){t.add(r);const i=r[_n]?Array.from(r[_n]):[];for(const s of i)n(s)}}return o(n,"addSpanChildren"),n(e),Array.from(t)}o(Ki,"getSpanDescendants");var Se=yo;function yo(e){return e[ya]||e}o(yo,"INTERNAL_getSegmentSpan");function be(){const e=_t(),t=tn(e);return t.getActiveSpan?t.getActiveSpan():rr(q())}o(be,"getActiveSpan");function vo(){ku||(Dt(()=>{}),ku=!0)}o(vo,"showSpanDropWarning");function lx(e,t){e.updateName(t),e.setAttributes({[rt]:"custom",[_a]:t})}o(lx,"updateSpanName");var Cu=!1;function F_(){if(Cu)return;function e(){const t=be(),n=t&&Se(t);if(n){const r="internal_error";I&&g.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:2,message:r})}}o(e,"errorCallback"),Cu=!0,cf(e),uf(e)}o(F_,"registerSpanErrorInstrumentation");function Fe(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||R()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}o(Fe,"hasSpansEnabled");function Au(e){g.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}o(Au,"logIgnoredSpan");function Gr(e,t){if(!t?.length)return!1;for(const n of t){if(U_(n)){if(e.description&&Dr(e.description,n))return I&&Au(e),!0;continue}const r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;const i=n.name?e.description&&Dr(e.description,n.name):!0,s=n.op?e.op&&Dr(e.op,n.op):!0,a=n.attributes?Object.entries(n.attributes).every(([c,u])=>$_(e.attributes?.[c],u)):!0;if(i&&s&&a)return I&&Au(e),!0}return!1}o(Gr,"shouldIgnoreSpan");function $_(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?Dr(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}o($_,"_matchesAttributeValue");function B_(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const i of e)i.parent_span_id===r&&(i.parent_span_id=n)}o(B_,"reparentChildSpans");function U_(e){return typeof e=="string"||e instanceof RegExp}o(U_,"isStringOrRegExp");var Vf=Symbol.for("sentry.nonRecordingSpan"),En=class{static{o(this,"SentryNonRecordingSpan")}constructor(e={}){this._traceId=e.traceId||mt(),this._spanId=e.spanId||At(),this.dropReason=e.dropReason,Ce(this,Vf,!0)}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 ar(e){return!!e&&e[Vf]===!0}o(ar,"spanIsNonRecordingSpan");var H_="production",Yf="_frozenDsc";function Mu(e,t){Ce(e,Yf,t)}o(Mu,"freezeDscOnSpan");function Jf(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||"production",release:n.release,public_key:r,trace_id:e,org_id:xf(t)};return t.emit("createDsc",i),i}o(Jf,"getDynamicSamplingContextFromClient");function Ko(e,t){const n=t.getPropagationContext();return n.dsc||Jf(n.traceId,e)}o(Ko,"getDynamicSamplingContextFromScope");function ut(e){const t=R();if(!t)return{};const n=Se(e),r=V(n),i=r.data,s=n.spanContext().traceState,a=s?.get("sentry.sample_rate")??i["sentry.sample_rate"]??i["sentry.previous_trace_sample_rate"];function c(y){return(typeof a=="number"||typeof a=="string")&&(y.sample_rate=`${a}`),y}o(c,"applyLocalSampleRateToDsc");const u=n[Yf];if(u)return c(u);const l=ar(n),f=l&&n.dropReason==="ignored";if(l&&(!Fe(t.getOptions())||f)){const y=gn(n).scope;if(y){const v={...Ko(t,y)};return f&&(v.sampled="false"),c(v)}}const d=s?.get("sentry.dsc"),p=d&&sc(d);if(p)return c(p);const h=Jf(e.spanContext().traceId,t),m=i["sentry.source"]??i["sentry.segment.name.source"],_=r.description;return m!=="url"&&_&&(h.transaction=_),Fe()&&(h.sampled=String(St(n)),h.sample_rand=s?.get("sentry.sample_rand")??gn(n).scope?.getPropagationContext().sampleRand.toString()),c(h),t.emit("createDsc",h,n),h}o(ut,"getDynamicSamplingContextFromSpan");function dx(e){const t=ut(e);return Af(t)}o(dx,"spanToBaggageHeader");function fx(e){return Ce(e,"_streamed",!0),e}o(fx,"withStreamedSpan");function Xo(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}o(Xo,"isStreamedBeforeSendSpanCallback");function Xe(e,t=[]){return[e,t]}o(Xe,"createEnvelope");function Nu(e,t){const[n,r]=e;return[n,[...r,t]]}o(Nu,"addItemToEnvelope");function Tn(e,t){const n=e[1];for(const r of n){const i=r[0].type;if(t(r,i))return!0}return!1}o(Tn,"forEachEnvelopeItem");function va(e,t){return Tn(e,(n,r)=>t.includes(r))}o(va,"envelopeContainsItemType");function So(e){const t=yr($);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}o(So,"encodeUTF8");function W_(e){const t=yr($);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}o(W_,"decodeUTF8");function bo(e){const[t,n]=e;let r=JSON.stringify(t);function i(s){typeof r=="string"?r=typeof s=="string"?r+s:[So(r),s]:r.push(typeof s=="string"?So(s):s)}o(i,"append");for(const s of n){const[a,c]=s;if(i(`
6
+ ${JSON.stringify(a)}
7
+ `),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(we(c))}i(u)}}return typeof r=="string"?r:j_(r)}o(bo,"serializeEnvelope");function j_(e){const t=e.reduce((i,s)=>i+s.length,0),n=new Uint8Array(t);let r=0;for(const i of e)n.set(i,r),r+=i.length;return n}o(j_,"concatBuffers");function q_(e){let t=typeof e=="string"?So(e):e;function n(a){const c=t.subarray(0,a);return t=t.subarray(a+1),c}o(n,"readBinary");function r(){let a=t.indexOf(10);return a<0&&(a=t.length),JSON.parse(W_(n(a)))}o(r,"readJson");const i=r(),s=[];for(;t.length;){const a=r(),c=typeof a.length=="number"?a.length:void 0;s.push([a,c?n(c):r()])}return[i,s]}o(q_,"parseEnvelope");function z_(e){return[{type:"span"},e]}o(z_,"createSpanEnvelopeItem");function G_(e){const t=typeof e.data=="string"?So(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}o(G_,"createAttachmentEnvelopeItem");var Kf={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 V_(e){return e in Kf}o(V_,"_isOverriddenType");function xu(e){return V_(e)?Kf[e]:e}o(xu,"envelopeItemTypeToDataCategory");function ci(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}o(ci,"getSdkMetadataForEnvelopeHeader");function Xf(e,t,n,r){const i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(yt()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:vt(r)},...i&&{trace:i}}}o(Xf,"createEventEnvelopeHeaders");function Y_(e,t){if(!t)return e;const 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}o(Y_,"_enhanceEventWithSdkInfo");function J_(e,t,n,r){const i=ci(n),s={sent_at:new Date(yt()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:vt(t)}},a="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Xe(s,[a])}o(J_,"createSessionEnvelope");function K_(e,t,n,r){const i=ci(n),s=e.type&&e.type!=="replay_event"?e.type:"event";Y_(e,n?.sdk);const a=Xf(e,i,r,t);return delete e.sdkProcessingMetadata,Xe(a,[[{type:s},e]])}o(K_,"createEventEnvelope");function X_(e,t){function n(h){return!!h.trace_id&&!!h.public_key}o(n,"dscHasRequiredProps");const r=ut(e[0]),i=t?.getDsn(),s=t?.getOptions().tunnel,a={sent_at:new Date(yt()).toISOString(),...n(r)&&{trace:r},...!!s&&i&&{dsn:vt(i)}},{beforeSendSpan:c,ignoreSpans:u}=t?.getOptions()||{},l=u?.length?e.filter(h=>{const m=V(h);return!Gr({description:m.description,op:m.op,attributes:m.data},u)}):e,f=e.length-l.length;f&&t?.recordDroppedEvent("before_send","span",f);const d=c?h=>{const m=V(h),_=Xo(c)?m:c(m);return _||(vo(),m)}:V,p=[];for(const h of l){const m=d(h);m&&p.push(z_(m))}return Xe(a,p)}o(X_,"createSpanEnvelope");function Q_(e){if(!I)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=V(e),{spanId:i}=e.spanContext(),s=St(e),a=Se(e),c=a===e,u=`[Tracing] Starting ${s?"sampled":"unsampled"} ${c?"root ":""}span`,l=[`op: ${n}`,`name: ${t}`,`ID: ${i}`];if(r&&l.push(`parent ID: ${r}`),!c){const{op:f,description:d}=V(a);l.push(`root ID: ${a.spanContext().spanId}`),f&&l.push(`root op: ${f}`),d&&l.push(`root description: ${d}`)}g.log(`${u}
8
+ ${l.join(`
9
+ `)}`)}o(Q_,"logSpanStart");function Z_(e){if(!I)return;const{description:t="< unknown name >",op:n="< unknown op >"}=V(e),{spanId:r}=e.spanContext(),i=`[Tracing] Finishing "${n}" ${Se(e)===e?"root ":""}span "${t}" with ID ${r}`;g.log(i)}o(Z_,"logSpanEnd");function Qf(e,t,n,r=be()){const i=r&&Se(r);i&&(I&&g.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),i.addEvent(e,{[ai]:t,[si]:n}))}o(Qf,"setMeasurement");function Ou(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},i=r[si],s=r[ai];typeof i=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:i})}),t}o(Ou,"timedEventsToMeasurements");function Lu(){return yr(_t()).segmentSpanCaptureStrategy}o(Lu,"getSegmentSpanCaptureStrategy");function Qe(e){return e.getOptions().traceLifecycle==="stream"}o(Qe,"hasSpanStreamingEnabled");var Pu=1e3,Qo=class{static{o(this,"SentrySpan")}constructor(e={}){this._traceId=e.traceId||mt(),this._spanId=e.spanId||At(),this._startTime=e.startTimestamp||ge(),this._links=e.links,this._attributes={},this.setAttributes({[re]:"manual",[ve]: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._frozen?this:(this._links?this._links.push(e):this._links=[e],this)}addLinks(e){return this._frozen?this:(this._links?this._links.push(...e):this._links=e,this)}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?1:0}}setAttribute(e,t){return this._frozen?this:(t===void 0?delete this._attributes[e]:this._attributes[e]=t,e==="sentry.source"&&t!==void 0&&Tu(this)&&E_(this),this)}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._frozen||(this._startTime=Mt(e))}setStatus(e){return this._frozen?this:(this._status=e,this)}updateName(e){return this._frozen?this:(this._name=e,Tu(this)||this.setAttribute(rt,"custom"),this)}end(e){if(this._endTime){this._frozen=Iu(this);return}this._endTime=Mt(e),Z_(this),this._onSpanEnded(),this._frozen=Iu(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[ve],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:zf(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[re],profile_id:this._attributes[wf],exclusive_time:this._attributes[xn],measurements:Ou(this._events),is_segment:this._isStandaloneSpan&&Se(this)===this||void 0,segment_id:this._isStandaloneSpan?Se(this).spanContext().spanId:void 0,links:Bf(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===Se(this),status:ac(this._status),attributes:Gf(this._attributes,this._status),links:Uf(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,n){if(this._frozen)return this;I&&g.log("[Tracing] Adding an event to span:",e);const r=Du(t)?t:n||ge(),i=Du(t)?{}:t||{},s={name:e,time:Mt(r),attributes:i};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=R();e&&(e.emit("spanEnd",this),this._isStandaloneSpan||e.emit("afterSpanEnd",this));const t=Se(this),n=this._isStandaloneSpan||this===t;if(this._isStandaloneSpan){this._sampled?ty(X_([this],e)):(I&&g.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}if(!n){const s=Lu();if(s){const a=gn(this).scope||q();s.onChildSpanEnded(this,t,c=>this._convertSpanToTransaction(c),a)}return}if(e&&Qe(e)){e.emit("afterSegmentSpanEnd",this);return}const r=gn(this).scope||q(),i=Lu();if(i)i.onSegmentSpanEnded(s=>this._convertSpanToTransaction(s),r);else{const s=this._convertSpanToTransaction();s&&r.captureEvent(s)}}_convertSpanToTransaction(e={}){if(!Fu(V(this)))return;this._name||(I&&g.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=gn(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;e.onSpanCaptured?.(this);const i=[];for(const l of Ki(this)){if(l===this||ey(l)||e.isSpanAlreadyCaptured?.(l))continue;const f=V(l);Fu(f)&&(e.onSpanCaptured?.(l),i.push(f))}const s=this._attributes[rt];delete this._attributes[_a];let a=!1;i.forEach(l=>{delete l.data[_a],l.op?.startsWith("gen_ai.")&&(a=!0)});const c={contexts:{trace:O_(this)},spans:i.length>Pu?i.sort((l,f)=>l.start_timestamp-f.start_timestamp).slice(0,Pu):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:ut(this),hasGenAiSpans:a},request:r,...s&&{transaction_info:{source:s}}},u=Ou(this._events);return u&&Object.keys(u).length&&(I&&g.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),c.measurements=u),c}};function Du(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}o(Du,"isSpanTimeInput");function Fu(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}o(Fu,"isFullFinishedSpan");function ey(e){return e instanceof Qo&&e.isStandaloneSpan()}o(ey,"isStandaloneSpan");function ty(e){const t=R();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}o(ty,"sendSpanEnvelope");function cc(e,t,n=()=>{},r=()=>{}){let i;try{i=e()}catch(s){throw t(s),n(),s}return ny(i,t,n,r)}o(cc,"handleCallbackErrors");function ny(e,t,n,r){return Mn(e)?Ef(e,i=>{n(),r(i)},i=>{t(i),n()}):(n(),r(e),e)}o(ny,"maybeHandlePromiseRejection");function ry(e,t,n){if(!Fe(e))return[!1];let r,i;typeof e.tracesSampler=="function"?(i=e.tracesSampler({...t,inheritOrSampleWith:o(c=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):c,"inheritOrSampleWith")}),r=!0):t.parentSampled!==void 0?i=t.parentSampled:typeof e.tracesSampleRate<"u"&&(i=e.tracesSampleRate,r=!0);const s=bn(i);if(s===void 0)return I&&g.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(i)} of type ${JSON.stringify(typeof i)}.`),[!1];if(!s)return I&&g.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,s,r];const a=n<s;return a||I&&g.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(i)})`),[a,s,r]}o(ry,"sampleSpan");var Sa="__SENTRY_SUPPRESS_TRACING__";function Ft(e,t){const n=On();if(n.startSpan)return n.startSpan(e,t);const r=fc(e),{forceTransaction:i,parentSpan:s,scope:a}=e,c=a?.clone();return Ke(c,()=>Zf(s)(()=>{const u=q(),l=pc(u,s),f=R(),d=e.onlyIfParent&&!l?lc(u,f):dc({parentSpan:l,spanArguments:r,forceTransaction:i,scope:u});return(!es(d)||!l)&&gt(u,d),cc(()=>t(d),()=>{const{status:p}=V(d);d.isRecording()&&(!p||p==="ok")&&d.setStatus({code:2,message:"internal_error"})},()=>{d.end()})}))}o(Ft,"startSpan");function jt(e,t){const n=On();if(n.startSpanManual)return n.startSpanManual(e,t);const r=fc(e),{forceTransaction:i,parentSpan:s,scope:a}=e,c=a?.clone();return Ke(c,()=>Zf(s)(()=>{const u=q(),l=pc(u,s),f=e.onlyIfParent&&!l?lc(u,R()):dc({parentSpan:l,spanArguments:r,forceTransaction:i,scope:u});return(!es(f)||!l)&&gt(u,f),cc(()=>t(f,()=>f.end()),()=>{const{status:d}=V(f);f.isRecording()&&(!d||d==="ok")&&f.setStatus({code:2,message:"internal_error"})})}))}o(jt,"startSpanManual");function nn(e){const t=On();return t.startInactiveSpan?t.startInactiveSpan(e):iy(e)}o(nn,"startInactiveSpan");function iy(e){const t=fc(e),{forceTransaction:n,parentSpan:r}=e;return(e.scope?i=>Ke(e.scope,i):r!==void 0?i=>Zo(r,i):i=>i())(()=>{const i=q(),s=pc(i,r),a=R();return e.onlyIfParent&&!s?lc(i,a):dc({parentSpan:s,spanArguments:t,forceTransaction:n,scope:i})})}o(iy,"_startInactiveSpanImpl");var px=o((e,t)=>{const n=_t(),r=tn(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:i,baggage:s}=e,a=R(),c=sc(s);return a&&!x_(a,c?.org_id)?sy(t):Ke(u=>{const l=Pf(i,s);return u.setPropagationContext(l),gt(u,void 0),t()})},"continueTrace");function Zo(e,t){const n=On();return n.withActiveSpan?n.withActiveSpan(e,t):Ke(r=>(gt(r,e||void 0),t(r)))}o(Zo,"withActiveSpan");function oy(e){const t=On();return t.suppressTracing?t.suppressTracing(e):Ke(n=>{n.setSDKProcessingMetadata({[Sa]:!0});const r=e();return n.setSDKProcessingMetadata({[Sa]:void 0}),r})}o(oy,"suppressTracing");function uc(e=q()){const t=On();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[Sa]===!0}o(uc,"isTracingSuppressed");function sy(e){const t=On();return t.startNewTrace?t.startNewTrace(e):Ke(n=>(n.setPropagationContext({traceId:mt(),sampleRand:Ct()}),I&&g.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),Zo(null,e)))}o(sy,"startNewTrace");function lc(e,t){t?.recordDroppedEvent("no_parent_span","span");const n=new En({traceId:e.getPropagationContext().traceId});return sr(n,e,he()),n}o(lc,"startMissingRequiredParentSpan");function dc({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){const i=he();if(!Fe()){const c={...i.getPropagationContext(),...r.getPropagationContext()},u=e?e.spanContext().traceId:c.traceId,l=new En({traceId:u});return e&&!n&&Ji(e,l),sr(l,r,i),l}const s=R();if(cy(s,t)){uc(r)||s?.recordDroppedEvent("ignored","span");const c=new En({dropReason:"ignored",traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});return e&&!n&&Ji(e,c),sr(c,r,i),c}let a;if(e&&!n)a=ay(e,r,t,i),Ji(e,a);else if(e){const c=ut(e),{traceId:u,spanId:l}=e.spanContext(),f=St(e);a=$u({traceId:u,parentSpanId:l,...t},r,i,f),Mu(a,c)}else{const{traceId:c,dsc:u,parentSpanId:l,sampled:f}={...i.getPropagationContext(),...r.getPropagationContext()};a=$u({traceId:c,parentSpanId:l,...t},r,i,f),u&&Mu(a,u)}return Q_(a),a}o(dc,"createChildOrRootSpan");function fc(e){const t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...t};return n.startTimestamp=Mt(e.startTime),delete n.startTime,n}return t}o(fc,"parseSentrySpanArguments");function On(){const e=_t();return tn(e)}o(On,"getAcs");function $u(e,t,n,r){const i=R(),s=i?.getOptions()||{},{name:a=""}=e,c={spanAttributes:{...e.attributes},spanName:a,parentSampled:r};i?.emit("beforeSampling",c,{decision:!1});const u=c.parentSampled??r,l=c.spanAttributes,f=t.getPropagationContext(),d=uc(t),[p,h,m]=d?[!1]:ry(s,{name:a,parentSampled:u,attributes:l,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:bn(f.dsc?.sample_rate)},f.sampleRand),_=new Qo({...e,attributes:{[rt]:"custom",[a_]:h!==void 0&&m?h:void 0,...l},sampled:p});return!p&&i&&!d&&(I&&g.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),i.recordDroppedEvent("sample_rate",Qe(i)?"span":"transaction")),sr(_,t,n),i&&i.emit("spanStart",_),_}o($u,"_startRootSpan");function ay(e,t,n,r){const{spanId:i,traceId:s}=e.spanContext(),a=uc(t),c=a?!1:St(e),u=c?new Qo({...n,parentSpanId:i,traceId:s,sampled:c}):new En({traceId:s});Ji(e,u),sr(u,t,r);const l=R();return l&&(Qe(l)&&ar(u)&&(ar(e)&&e.dropReason?(u.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,"span")):a||(u.dropReason="sample_rate",l.recordDroppedEvent("sample_rate","span"))),l.emit("spanStart",u),n.endTimestamp&&(l.emit("spanEnd",u),l.emit("afterSpanEnd",u))),u}o(ay,"_startChildSpan");function pc(e,t){if(t)return t;if(t===null)return;const n=rr(e);if(!n)return;const r=R();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Se(n):n}o(pc,"getParentSpan");function Zf(e){return e!==void 0?t=>Zo(e,t):t=>t()}o(Zf,"getActiveSpanWrapper");function cy(e,t){const n=e?.getOptions().ignoreSpans;return!e||!Qe(e)||!n?.length?!1:Gr({description:t.name||"",op:t.attributes?.["sentry.op"]||t.op,attributes:t.attributes},n)}o(cy,"_shouldIgnoreStreamedSpan");function es(e){return ar(e)&&e.dropReason==="ignored"}o(es,"spanIsIgnored");var Xi={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},uy="heartbeatFailed",ly="idleTimeout",dy="finalTimeout",fy="externalFinish";function ep(e,t={}){const n=new Map;let r=!1,i,s=fy,a=!t.disableAutoFinish;const c=[],{idleTimeout:u=Xi.idleTimeout,finalTimeout:l=Xi.finalTimeout,childSpanTimeout:f=Xi.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:p=!0}=t,h=R(),m=q();if(!h||!Fe()){const b=new En({traceId:m.getPropagationContext().traceId});return sr(b,m,he()),b}const _=be(),y=py(e);y.end=new Proxy(y.end,{apply(b,H,B){if(d&&d(y),ar(H))return;const[E,...O]=B,M=E||ge(),A=Mt(M),K=Ki(y).filter(F=>F!==y),Q=V(y);if(!K.length||!p)return C(A),Reflect.apply(b,H,[A,...O]);const ee=h.getOptions().ignoreSpans,U=K?.reduce((F,ie)=>{const ne=V(ie);return!ne.timestamp||ee&&Gr({description:ne.description,op:ne.op,attributes:ne.data},ee)?F:F?Math.max(F,ne.timestamp):ne.timestamp},void 0),N=Q.start_timestamp,D=Math.min(N?N+l/1e3:1/0,Math.max(N||-1/0,Math.min(A,U||1/0)));return C(D),Reflect.apply(b,H,[D,...O])}});function v(){i&&(clearTimeout(i),i=void 0)}o(v,"_cancelIdleTimeout");function S(b){v(),i=setTimeout(()=>{!r&&n.size===0&&a&&(s=ly,y.end(b))},u)}o(S,"_restartIdleTimeout");function k(b){i=setTimeout(()=>{!r&&a&&(s=uy,y.end(b))},f)}o(k,"_restartChildSpanTimeout");function w(b){v(),n.set(b,!0),k(ge()+f/1e3)}o(w,"_pushActivity");function x(b){n.has(b)&&n.delete(b),n.size===0&&S(ge()+u/1e3)}o(x,"_popActivity");function C(b){r=!0,n.clear(),c.forEach(A=>A()),gt(m,_);const H=V(y),{start_timestamp:B}=H;if(!B)return;H.data["sentry.idle_span_finish_reason"]||y.setAttribute(mo,s);const E=H.status;(!E||E==="unknown")&&y.setStatus({code:1}),g.log(`[Tracing] Idle span "${H.op}" finished`);const O=Ki(y).filter(A=>A!==y);let M=0;O.forEach(A=>{A.isRecording()&&(A.setStatus({code:2,message:"cancelled"}),A.end(b),I&&g.log("[Tracing] Cancelling span since span ended early",JSON.stringify(A,void 0,2)));const{timestamp:K=0,start_timestamp:Q=0}=V(A),ee=Q<=b,U=(l+u)/1e3,N=K-Q<=U;if(I){const D=JSON.stringify(A,void 0,2);ee?N||g.log("[Tracing] Discarding span since it finished after idle span final timeout",D):g.log("[Tracing] Discarding span since it happened after idle span was finished",D)}(!N||!ee)&&(D_(y,A),M++)}),M>0&&y.setAttribute("sentry.idle_span_discarded_spans",M)}return o(C,"onIdleSpanEnded"),c.push(h.on("spanStart",b=>{r||b===y||V(b).timestamp||b instanceof Qo&&b.isStandaloneSpan()||Ki(y).includes(b)&&w(b.spanContext().spanId)})),c.push(h.on("spanEnd",b=>{r||x(b.spanContext().spanId)})),c.push(h.on("idleSpanEnableAutoFinish",b=>{b===y&&(a=!0,S(),n.size&&k())})),t.disableAutoFinish||S(),setTimeout(()=>{r||(y.setStatus({code:2,message:"deadline_exceeded"}),s=dy,y.end())},l),y}o(ep,"startIdleSpan");function py(e){const t=nn(e);return gt(q(),t),I&&g.log("[Tracing] Started span is an idle span"),t}o(py,"_startIdleSpan");function hy(e,t,n){let r,i,s;const a=n?.maxWait?Math.max(n.maxWait,t):0,c=n?.setTimeoutImpl||setTimeout;function u(){return l(),r=e(),r}o(u,"invokeFunc");function l(){i!==void 0&&clearTimeout(i),s!==void 0&&clearTimeout(s),i=s=void 0}o(l,"cancelTimers");function f(){return i!==void 0||s!==void 0?u():r}o(f,"flush");function d(){return i&&clearTimeout(i),i=c(u,t),a&&s===void 0&&(s=c(u,a)),r}return o(d,"debounced"),d.cancel=l,d.flush=f,d}o(hy,"debounce$1");var my=["addListener","on","once","prependListener","prependOnceListener","addEventListener"],gy=["removeListener","off","removeEventListener"],tp=Symbol("SentryScopeBoundListeners"),Qn;function _y(e){return Qn!==void 0&&(e===Qn||e.listener===Qn)}o(_y,"isReentrantWrapperRegistration");function hx(e,t=q()){const n=e;if(ts(n))return e;hc(n);for(const r of my)typeof n[r]=="function"&&(n[r]=vy(n,n[r],t));for(const r of gy)typeof n[r]=="function"&&(n[r]=Sy(n,n[r]));return typeof n.removeAllListeners=="function"&&(n.removeAllListeners=by(n,n.removeAllListeners)),e}o(hx,"bindScopeToEmitter");function yy(e,t){return function(...n){return Ke(t,()=>e.apply(this,n))}}o(yy,"bindListenerToScope");function np(e){return typeof e=="function"}o(np,"isBoundListener");function vy(e,t,n){return function(...r){const i=r[0],s=r[1],a=r.slice(2);if(!np(s)||_y(s))return t.apply(this,r);const c=ts(e)||hc(e);let u=c.get(i);u||(u=new WeakMap,c.set(i,u));let l=u.get(s);l||(l=yy(s,n),u.set(s,l));const f=Qn;Qn=l;try{return t.call(this,i,l,...a)}finally{Qn=f}}}o(vy,"patchAddListener");function Sy(e,t){return function(...n){const r=n[0],i=n[1],s=n.slice(2),a=np(i)?ts(e)?.get(r)?.get(i):void 0;return a?t.call(this,r,a,...s):t.apply(this,n)}}o(Sy,"patchRemoveListener");function by(e,t){return function(...n){const r=ts(e);if(r)if(n.length===0)hc(e);else{const i=n[0];r.delete(i)}return t.apply(this,n)}}o(by,"patchRemoveAllListeners");function hc(e){const t=new Map;return e[tp]=t,t}o(hc,"createPatchMap");function ts(e){return e[tp]}o(ts,"getPatchMap");function Ey(e,t){const{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:s}=t;Ty(e,t),r&&ky(e,r),Ry(e,n),Iy(e,i),wy(e,s)}o(Ey,"applyScopeDataToEvent");function Bu(e,t){const{extra:n,tags:r,attributes:i,user:s,contexts:a,level:c,sdkProcessingMetadata:u,breadcrumbs:l,fingerprint:f,eventProcessors:d,attachments:p,propagationContext:h,transactionName:m,span:_}=t;Cr(e,"extra",n),Cr(e,"tags",r),Cr(e,"attributes",i),Cr(e,"user",s),Cr(e,"contexts",a),e.sdkProcessingMetadata=oi(e.sdkProcessingMetadata,u,2),c&&(e.level=c),m&&(e.transactionName=m),_&&(e.span=_),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),f.length&&(e.fingerprint=[...e.fingerprint,...f]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...h}}o(Bu,"mergeScopeData");function Cr(e,t,n){e[t]=oi(e[t],n,1)}o(Cr,"mergeAndOverwriteScopeData");function ui(e,t){const n=Fr().getScopeData();return e&&Bu(n,e.getScopeData()),t&&Bu(n,t.getScopeData()),n}o(ui,"getCombinedScopeData");function Ty(e,t){const{extra:n,tags:r,user:i,contexts:s,level:a,transactionName:c}=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(s).length&&(e.contexts={...s,...e.contexts}),a&&(e.level=a),c&&e.type!=="transaction"&&(e.transaction=c)}o(Ty,"applyDataToEvent");function Iy(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}o(Iy,"applyBreadcrumbsToEvent");function wy(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}o(wy,"applySdkMetadataToEvent");function ky(e,t){e.contexts={trace:$f(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:ut(t),...e.sdkProcessingMetadata};const n=Se(t),r=V(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}o(ky,"applySpanToEvent");function Ry(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}o(Ry,"applyFingerprintToEvent");function Cy(e){const t={},{response:n,profile:r,cloud_resource:i,culture:s,state:a}=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(const[l,f]of Object.entries(i))f!=null&&(t[l]=f);s&&(s.locale&&(t["culture.locale"]=s.locale),s.timezone&&(t["culture.timezone"]=s.timezone)),a?.state&&typeof a.state.type=="string"&&(t["state.type"]=a.state.type);const c=e.angular;if(c){const l=c.version;(typeof l=="string"||typeof l=="number")&&(t["angular.version"]=l)}const u=e.react;if(u){const l=u.version;(typeof l=="string"||typeof l=="number")&&(t["react.version"]=l)}return t}o(Cy,"scopeContextsToSpanAttributes");var rp="graphql.document",ip="http.url",Ay="sentry.sdk.name",My="sentry.sdk.version",Ny="sentry.segment.id",mc="sentry.segment.name",xy="sentry.trace_lifecycle",op="sentry.transaction",li="url.full";function Oy(e,t){const n=_o(e),r=yo(e),i=_o(r),{isolationScope:s,scope:a}=gn(e),c=ui(s,a);Dy(n,i,t,c);const u=e.kind;t.emit("preprocessSpan",n,{spanKind:u}),n.is_segment&&(Ly(n,c),Py(n,t),t.emit("processSegmentSpan",n)),t.emit("processSpan",n);const{beforeSendSpan:l}=t.getOptions(),f=l&&Xo(l)?Fy(n,l):n,d=f.attributes?.[rt];return n.is_segment&&d&&Vt(f,{"sentry.segment.name.source":d}),{...Wf(f),_segmentSpan:r}}o(Oy,"captureSpan");function Ly(e,t){Vt(e,Cy(t.contexts))}o(Ly,"applyScopeToSegmentSpan");function Vt(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,i])=>{i!=null&&!(r in n)&&(n[r]=i)})}o(Vt,"safeSetSpanJSONAttributes");function Py(e,t){const n=t.getIntegrationNames();n.length&&Vt(e,{[d_]:n})}o(Py,"applySdkMetadataToSegmentSpan");function Dy(e,t,n,r){const i=n.getSdkMetadata(),{release:s,environment:a}=n.getOptions();Vt(e,{[xy]:"stream",[mc]:t.name,[Ny]:t.span_id,[Ay]:i?.sdk?.name,[My]:i?.sdk?.version,[u_]:s,[l_]:a||"production",[f_]:r.user?.id,[p_]:r.user?.email,[h_]:r.user?.ip_address,[m_]:r.user?.username,...r.attributes})}o(Dy,"applyCommonSpanAttributes");function Fy(e,t){const n=t(e);return n||(vo(),e)}o(Fy,"applyBeforeSendSpanCallback");var Bs=0,Uu=1,Hu=2;function di(e){return new ap(t=>{t(e)})}o(di,"resolvedSyncPromise");function sp(e){return new ap((t,n)=>{n(e)})}o(sp,"rejectedSyncPromise");var ap=class ba{static{o(this,"SyncPromise")}constructor(t){this._state=Bs,this._handlers=[],this._runExecutor(t)}then(t,n){return new ba((r,i)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(a){i(a)}},s=>{if(!n)i(s);else try{r(n(s))}catch(a){i(a)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new ba((n,r)=>{let i,s;return this.then(a=>{s=!1,i=a,t&&t()},a=>{s=!0,i=a,t&&t()}).then(()=>{if(s){r(i);return}n(i)})})}_executeHandlers(){if(this._state===Bs)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Uu&&n[1](this._value),this._state===Hu&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=o((s,a)=>{if(this._state===Bs){if(Mn(a)){a.then(r,i);return}this._state=s,this._value=a,this._executeHandlers()}},"setResult"),r=o(s=>{n(Uu,s)},"resolve"),i=o(s=>{n(Hu,s)},"reject");try{t(r,i)}catch(s){i(s)}}};function $y(e,t,n,r=0){try{const i=Ea(t,n,e,r);return Mn(i)?i:di(i)}catch(i){return sp(i)}}o($y,"notifyEventProcessors");function Ea(e,t,n,r){const i=n[r];if(!e||!i)return e;const s=i({...e},t);return I&&s===null&&g.log(`Event processor "${i.id||"?"}" dropped event`),Mn(s)?s.then(a=>Ea(a,t,n,r+1)):Ea(s,t,n,r+1)}o(Ea,"_notifyEventProcessors");var cn,Wu,ju,$t;function cp(e){const t=$._sentryDebugIds,n=$._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],i=n?Object.keys(n):[];if($t&&r.length===Wu&&i.length===ju)return $t;Wu=r.length,ju=i.length,$t={},cn||(cn={});const s=o((a,c)=>{for(const u of a){const l=c[u],f=cn?.[u];if(f&&$t&&l)$t[f[0]]=l,cn&&(cn[u]=[f[0],l]);else if(l){const d=e(u);for(let p=d.length-1;p>=0;p--){const h=d[p]?.filename;if(h&&$t&&cn){$t[h]=l,cn[u]=[h,l];break}}}}},"processDebugIds");return t&&s(r,t),n&&s(i,n),$t}o(cp,"getFilenameToDebugIdMap");function By(e,t){const n=cp(e);if(!n)return[];const r=[];for(const i of t){const s=Ig(i);s&&n[s]&&r.push({type:"sourcemap",code_file:i,debug_id:n[s]})}return r}o(By,"getDebugImagesForResources");function up(e,t,n,r,i,s){const{normalizeDepth:a=3,normalizeMaxBreadth:c=1e3}=e,u={...t,event_id:t.event_id||n.event_id||ke(),timestamp:t.timestamp||Nn()},l=n.integrations||e.integrations.map(_=>_.name);Uy(u,e),jy(u,l),i&&i.emit("applyFrameMetadata",t),t.type===void 0&&Hy(u,e.stackParser);const f=zy(r,n.captureContext);n.mechanism&&pt(u,n.mechanism);const d=i?i.getEventProcessors():[],p=ui(s,f),h=[...n.attachments||[],...p.attachments];h.length&&(n.attachments=h),Ey(u,p);const m=[...d,...p.eventProcessors];return(n.data&&n.data.__sentry__===!0?di(u):$y(m,u,n)).then(_=>(_&&Wy(_),typeof a=="number"&&a>0?qy(_,a,c):_))}o(up,"prepareEvent");function Uy(e,t){const{environment:n,release:r,dist:i,maxValueLength:s}=t;e.environment=e.environment||n||"production",!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);const a=e.request;a?.url&&s&&(a.url=zr(a.url,s)),s&&e.exception?.values?.forEach(c=>{c.value&&(c.value=zr(c.value,s))})}o(Uy,"applyClientOptions");function Hy(e,t){const n=cp(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.filename&&(i.debug_id=n[i.filename])})})}o(Hy,"applyDebugIds");function Wy(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(i=>{i.debug_id&&(i.abs_path?t[i.abs_path]=i.debug_id:i.filename&&(t[i.filename]=i.debug_id),delete i.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,i])=>{n.push({type:"sourcemap",code_file:r,debug_id:i})})}o(Wy,"applyDebugMeta");function jy(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}o(jy,"applyIntegrationsMetadata");function qy(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(i=>({...i,...i.data&&{data:we(i.data,t,n)}}))},...e.user&&{user:we(e.user,t,n)},...e.contexts&&{contexts:we(e.contexts,t,n)},...e.extra&&{extra:we(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=we(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(i=>({...i,...i.data&&{data:we(i.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=we(e.contexts.flags,3,n)),r}o(qy,"normalizeEvent");function zy(e,t){if(!t)return e;const n=e?e.clone():new Sn;return n.update(t),n}o(zy,"getFinalScope");function Gy(e){if(e)return Vy(e)?{captureContext:e}:Jy(e)?{captureContext:e}:e}o(Gy,"parseEventHintOrCaptureContext");function Vy(e){return e instanceof Sn||typeof e=="function"}o(Vy,"hintIsScopeOrFunction");var Yy=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Jy(e){return Object.keys(e).some(t=>Yy.includes(t))}o(Jy,"hintIsScopeContext");function me(e,t){return q().captureException(e,Gy(t))}o(me,"captureException");function Ky(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return q().captureMessage(e,n,r)}o(Ky,"captureMessage");function fi(e,t){return q().captureEvent(e,t)}o(fi,"captureEvent");function Xy(e,t){he().setContext(e,t)}o(Xy,"setContext");function mx(e){he().setExtras(e)}o(mx,"setExtras");function gx(e,t){he().setExtra(e,t)}o(gx,"setExtra");function _x(e){he().setTags(e)}o(_x,"setTags");function yx(e,t){he().setTag(e,t)}o(yx,"setTag");function vx(e){he().setAttributes(e)}o(vx,"setAttributes");function Sx(e,t){he().setAttribute(e,t)}o(Sx,"setAttribute");function bx(e){he().setUser(e)}o(bx,"setUser");function Ex(e){he().setConversationId(e)}o(Ex,"setConversationId");function Qy(){return he().lastEventId()}o(Qy,"lastEventId");async function Tx(e){const t=R();return t?t.flush(e):(I&&g.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}o(Tx,"flush");async function Ix(e){const t=R();return t?t.close(e):(I&&g.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}o(Ix,"close");function wx(){return!!R()}o(wx,"isInitialized");function Zy(){const e=R();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}o(Zy,"isEnabled");function ev(e){he().addEventProcessor(e)}o(ev,"addEventProcessor");function qu(e){const t=he(),{user:n}=ui(t,q()),{userAgent:r}=$.navigator||{},i=zg({user:n,...r&&{userAgent:r},...e}),s=t.getSession();return s?.status==="ok"&&nr(s,{status:"exited"}),lp(),t.setSession(i),i}o(qu,"startSession");function lp(){const e=he(),t=q().getSession()||e.getSession();t&&Gg(t),dp(),e.setSession()}o(lp,"endSession");function dp(){const e=he(),t=R(),n=e.getSession();n&&t&&t.captureSession(n)}o(dp,"_sendSessionUpdate");function Us(e=!1){if(e){lp();return}dp()}o(Us,"captureSession");function ns(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}o(ns,"safeUnref");function fp(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}o(fp,"getBaseApiEndpoint");function tv(e){return`${fp(e)}${e.projectId}/envelope/`}o(tv,"_getIngestEndpoint");function nv(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}o(nv,"_encodedAuth");function pp(e,t,n){return t||`${tv(e)}?${nv(e,n)}`}o(pp,"getEnvelopeEndpointWithUrlEncodedAuth");function rv(e,t){const n=Of(e);if(!n)return"";const r=`${fp(n)}embed/error-page/`;let i=`dsn=${vt(n)}`;for(const s in t)if(s!=="dsn"&&s!=="onClose")if(s==="user"){const a=t.user;if(!a)continue;a.name&&(i+=`&name=${encodeURIComponent(a.name)}`),a.email&&(i+=`&email=${encodeURIComponent(a.email)}`)}else i+=`&${encodeURIComponent(s)}=${encodeURIComponent(t[s])}`;return`${r}?${i}`}o(rv,"getReportDialogEndpoint");var zu=[];function iv(e){const t={};return e.forEach(n=>{const{name:r}=n,i=t[r];i&&!i.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}o(iv,"filterDuplicates");function ov(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const i=n(t);r=Array.isArray(i)?i:[i]}else r=t;return iv(r)}o(ov,"getIntegrationsToSetup");function sv(e,t){const n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&hp(e,r,n)}),n}o(sv,"setupIntegrations");function Gu(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}o(Gu,"afterSetupIntegrations");function hp(e,t,n){if(n[t.name]){I&&g.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!zu.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),zu.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(i,s)=>r(i,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),i=Object.assign((s,a)=>r(s,a,e),{id:t.name});e.addEventProcessor(i)}["processSpan","processSegmentSpan"].forEach(r=>{const i=t[r];typeof i=="function"&&e.on(r,s=>i.call(t,s,e))}),I&&g.log(`Integration installed: ${t.name}`)}o(hp,"setupIntegration");function Vu(e){const t=R();if(!t){I&&g.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}o(Vu,"addIntegration");var av="sentry.timestamp.sequence",Hs=0,Ws;function mp(e){const t=Math.floor(e*1e3);Ws!==void 0&&t!==Ws&&(Hs=0);const n=Hs;return Hs++,Ws=t,{key:av,value:{value:n,type:"integer"}}}o(mp,"getSequenceAttribute");function gp(e,t){return t?Ke(t,()=>{const n=be(),r=n?$f(n):If(t);return[n?ut(n):Ko(e,t),r]}):[void 0,void 0]}o(gp,"_getTraceInfoFromScope");var cv={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function uv(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}o(uv,"isBrowserBundle");function lv(){return"npm"}o(lv,"getSDKSource");function dv(){return!uv()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}o(dv,"isNodeEnv");function Yt(){return typeof window<"u"&&(!dv()||fv())}o(Yt,"isBrowser");function fv(){return $.process?.type==="renderer"}o(fv,"isElectronNodeRenderer");function pv(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...Yt()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}o(pv,"createLogContainerEnvelopeItem");function hv(e,t,n,r,i){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=vt(r)),Xe(s,[pv(e,i)])}o(hv,"createLogEnvelope");var mv=100;function dt(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}o(dt,"setLogAttribute");function gv(e,t){const n=gc(),r=yp(e);r===void 0?n.set(e,[t]):r.length>=mv?(_p(e,r),n.set(e,[t])):n.set(e,[...r,t])}o(gv,"_INTERNAL_captureSerializedLog");function Eo(e,t=q(),n=gv){const r=t?.getClient()??R();if(!r){I&&g.warn("No client available to capture log.");return}const{release:i,environment:s,enableLogs:a=!0,beforeSendLog:c}=r.getOptions();if(!a){I&&g.warn("logging option not enabled, log will not be captured.");return}const[,u]=gp(r,t),l={...e.attributes},{user:{id:f,email:d,username:p},attributes:h={}}=ui(he(),t);dt(l,"user.id",f,!1),dt(l,"user.email",d,!1),dt(l,"user.name",p,!1),dt(l,"sentry.release",i),dt(l,"sentry.environment",s);const{name:m,version:_}=r.getSdkMetadata()?.sdk??{};dt(l,"sentry.sdk.name",m),dt(l,"sentry.sdk.version",_);const y=r.getIntegrationByName("Replay"),v=y?.getReplayId(!0);dt(l,"sentry.replay_id",v),v&&y?.getRecordingMode()==="buffer"&&dt(l,"sentry._internal.replay_is_buffering",!0);const S=e.message;if(Vo(S)){const{__sentry_template_string__:O,__sentry_template_values__:M=[]}=S;M?.length&&(l["sentry.message.template"]=O),M.forEach((A,K)=>{l[`sentry.message.parameter.${K}`]=A})}dt(l,"sentry.trace.parent_span_id",rr(t)?.spanContext().spanId);const k={...e,attributes:l};r.emit("beforeCaptureLog",k);const w=c?Dt(()=>c(k)):k;if(!w){r.recordDroppedEvent("before_send","log_item",1),I&&g.warn("beforeSendLog returned null, log will not be captured.");return}const{level:x,message:C,attributes:b={},severityNumber:H}=w,B=ge(),E=mp(B);n(r,{timestamp:B,level:x,body:Ta(String(C)),trace_id:u?.trace_id,severity_number:H??cv[x],attributes:_v({...or(h),...or(b,!0),[E.key]:E.value})}),r.emit("afterCaptureLog",w)}o(Eo,"_INTERNAL_captureLog");function _p(e,t){const n=t??yp(e)??[];if(n.length===0)return;const r=e.getOptions(),i=hv(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);gc().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(i)}o(_p,"_INTERNAL_flushLogsBuffer");function yp(e){return gc().get(e)}o(yp,"_INTERNAL_getLogBuffer");function gc(){return vr("clientToLogBufferMap",()=>new WeakMap)}o(gc,"_getBufferMap$1");function _v(e){const t={};for(const[n,r]of Object.entries(e)){const i=Ta(n);r.type==="string"?t[i]={...r,value:Ta(r.value)}:t[i]=r}return t}o(_v,"sanitizeLogAttributes");function Ta(e){const t=Object(e),n=t.isWellFormed,r=t.toWellFormed;return typeof n=="function"&&typeof r=="function"?n.call(e)?e:r.call(e):e}o(Ta,"_removeLoneSurrogates");function yv(e,t){const n=t?"auto":"never";return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...Yt()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}o(yv,"createMetricContainerEnvelopeItem");function vv(e,t,n,r,i){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=vt(r)),Xe(s,[yv(e,i)])}o(vv,"createMetricEnvelope");var Sv=1e3;function wt(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}o(wt,"setMetricAttribute");function bv(e,t){const n=_c(),r=Sp(e);r===void 0?n.set(e,[t]):r.length>=Sv?(vp(e,r),n.set(e,[t])):n.set(e,[...r,t])}o(bv,"_INTERNAL_captureSerializedMetric");function Ev(e,t,n){const{release:r,environment:i}=t.getOptions(),s={...e.attributes};wt(s,"user.id",n.id,!1),wt(s,"user.email",n.email,!1),wt(s,"user.name",n.username,!1),wt(s,"sentry.release",r),wt(s,"sentry.environment",i);const{name:a,version:c}=t.getSdkMetadata()?.sdk??{};wt(s,"sentry.sdk.name",a),wt(s,"sentry.sdk.version",c);const u=t.getIntegrationByName("Replay"),l=u?.getReplayId(!0);return wt(s,"sentry.replay_id",l),l&&u?.getRecordingMode()==="buffer"&&wt(s,"sentry._internal.replay_is_buffering",!0),{...e,attributes:s}}o(Ev,"_enrichMetricAttributes");function Tv(e,t,n,r){const[,i]=gp(t,n),s=rr(n),a=s?s.spanContext().traceId:i?.trace_id,c=s?s.spanContext().spanId:void 0,u=ge(),l=mp(u);return{timestamp:u,trace_id:a??"",span_id:c,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...or(r),...or(e.attributes,"skip-undefined"),[l.key]:l.value}}}o(Tv,"_buildSerializedMetric");function Iv(e,t){const n=t?.scope??q(),r=t?.captureSerializedMetric??bv,i=n?.getClient()??R();if(!i){I&&g.warn("No client available to capture metric.");return}const{_experiments:s,enableMetrics:a,beforeSendMetric:c}=i.getOptions();if(!(a??s?.enableMetrics??!0)){I&&g.warn("metrics option not enabled, metric will not be captured.");return}const{user:u,attributes:l}=ui(he(),n),f=Ev(e,i,u);i.emit("processMetric",f);const d=c||s?.beforeSendMetric,p=d?d(f):f;if(!p){I&&g.log("`beforeSendMetric` returned `null`, will not send metric.");return}const h=Tv(p,i,n,l);I&&g.log("[Metric]",h),r(i,h),i.emit("afterCaptureMetric",p)}o(Iv,"_INTERNAL_captureMetric");function vp(e,t){const n=t??Sp(e)??[];if(n.length===0)return;const r=e.getOptions(),i=vv(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);_c().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(i)}o(vp,"_INTERNAL_flushMetricsBuffer");function Sp(e){return _c().get(e)}o(Sp,"_INTERNAL_getMetricBuffer");function _c(){return vr("clientToMetricBufferMap",()=>new WeakMap)}o(_c,"_getBufferMap");function wv(e){const t={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};return Wf(t)}o(wv,"spanJsonToSerializedStreamedSpan");function kv(e,t){if(e.type!=="transaction"||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||t.getOptions().streamGenAiSpans===!1||Qe(t))return;const n=[],r=[];for(const s of e.spans)s.op?.startsWith("gen_ai.")?n.push(wv(s)):r.push(s);if(n.length===0)return;e.spans=r;const i=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Yt()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}o(kv,"extractGenAiSpansFromEvent");var yc=Symbol.for("SentryBufferFullError");function vc(e=100){const t=new Set;function n(){return t.size<e}o(n,"isReady");function r(a){t.delete(a)}o(r,"remove");function i(a){if(!n())return sp(yc);const c=a();return t.add(c),c.then(()=>r(c),()=>r(c)),c}o(i,"add");function s(a){if(!t.size)return di(!0);const c=Promise.allSettled(Array.from(t)).then(()=>!0);if(!a)return c;const u=[c,new Promise(l=>ns(setTimeout(()=>l(!1),a)))];return Promise.race(u)}return o(s,"drain"),{get $(){return Array.from(t)},add:i,drain:s}}o(vc,"makePromiseBuffer");var Rv=6e4;function bp(e,t=yt()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Rv:r-t}o(bp,"parseRetryAfterHeader");function Cv(e,t){return e[t]||e.all||0}o(Cv,"disabledUntil");function Ep(e,t,n=yt()){return Cv(e,t)>n}o(Ep,"isRateLimited");function Tp(e,{statusCode:t,headers:n},r=yt()){const i={...e},s=n?.["x-sentry-rate-limits"],a=n?.["retry-after"];if(s)for(const c of s.trim().split(",")){const[u,l,,,f]=c.split(":",5),d=parseInt(u,10),p=(isNaN(d)?60:d)*1e3;if(!l)i.all=r+p;else for(const h of l.split(";"))h==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(i[h]=r+p):i[h]=r+p}else a?i.all=r+bp(a,r):t===429&&(i.all=r+6e4);return i}o(Tp,"updateRateLimits");function Av(e,t,n=vc(e.bufferSize||64)){let r={};const i=o(a=>n.drain(a),"flush");function s(a){const c=[];if(Tn(a,(d,p)=>{const h=xu(p);Ep(r,h)?e.recordDroppedEvent("ratelimit_backoff",h):c.push(d)}),c.length===0)return Promise.resolve({});const u=Xe(a[0],c),l=o(d=>{if(va(u,["client_report"])){I&&g.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}Tn(u,(p,h)=>{e.recordDroppedEvent(d,xu(h))})},"recordEnvelopeLoss"),f=o(()=>t({body:bo(u)}).then(d=>d.statusCode===413?(I&&g.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),l("send_error"),d):(I&&d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&g.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Tp(r,d),d),d=>{throw l("network_error"),I&&g.error("Encountered error running transport request:",d),d}),"requestTask");return n.add(f).then(d=>d,d=>{if(d===yc)return I&&g.error("Skipped sending event because buffer is full."),l("queue_overflow"),Promise.resolve({});throw d})}return o(s,"send"),{send:s,flush:i}}o(Av,"createTransport");function Mv(e,t,n){const r=[{type:"client_report"},{timestamp:n||Nn(),discarded_events:e}];return Xe(t?{dsn:t}:{},[r])}o(Mv,"createClientReportEnvelope");function Ip(e){const t=[];e.message&&t.push(e.message);try{const 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}o(Ip,"getPossibleEventMessages");function Nv(e){const{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:s,data:a,op:c}=e.contexts?.trace??{};return{data:a??{},description:e.transaction,op:c,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:a?.[wf],exclusive_time:a?.[xn],measurements:e.measurements,is_segment:!0}}o(Nv,"convertTransactionEventToSpanJson");function xv(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}}o(xv,"convertSpanJsonToTransactionEvent");var Or="[Filtered]",Ni=["forwarded","-ip","remote-","via","-user"],Yu=["auth","token","secret","session","password","passwd","pwd","key","jwt","bearer","sso","saml","csrf","xsrf","credentials","sid","identity","set-cookie","cookie"],Ov=[".sid","sessid","remember","oidc","pkce","nonce","__secure-","__host-","awsalb","awselb","akamai","__stripe","cognito","firebase","supabase","sb-","mfa","2fa"];function Lv(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:Ni},httpHeaders:{request:{deny:Ni},response:{deny:Ni}},httpBodies:[],urlQueryParams:{deny:Ni},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7}}o(Lv,"defaultPiiToCollectionOptions");var Pv={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function Dv(e){const t=e.dataCollection!=null?Pv:Lv(e.sendDefaultPii),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,urlQueryParams:n.urlQueryParams??n.queryParams??t.urlQueryParams,graphQL:{document:n.graphQL?.document??t.graphQL.document,variables:n.graphQL?.variables??t.graphQL.variables},genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},databaseQueryData:n.databaseQueryData??t.databaseQueryData,stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}o(Dv,"resolveDataCollectionOptions");var Ju="Not capturing exception because it's already been captured.",Ku="Discarded session because of missing or non-string release",wp=Symbol.for("SentryInternalError"),kp=Symbol.for("SentryDoNotSendEventError"),Fv=5e3;function Qi(e){return{message:e,[wp]:!0}}o(Qi,"_makeInternalError");function js(e){return{message:e,[kp]:!0}}o(js,"_makeDoNotSendEventError");function Xu(e){return Ve(e)&&wp in e}o(Xu,"_isInternalError");function Qu(e){return Ve(e)&&kp in e}o(Qu,"_isDoNotSendEventError");function Zu(e,t,n,r,i){let s=0,a,c=!1;e.on(n,()=>{s=0,clearTimeout(a),c=!1}),e.on(t,u=>{if(s+=r(u),s>=8e5)i(e);else if(!c){const l=e.getOptions()._flushInterval??Fv;l>0&&(c=!0,a=ns(setTimeout(()=>{i(e)},l)))}}),e.on("flush",()=>{i(e)})}o(Zu,"setupWeightBasedFlushing");var $v=class{static{o(this,"Client")}constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=vc(e.transportOptions?.bufferSize??64),this._dataCollection=Dv(e),e.dsn?this._dsn=Of(e.dsn):I&&g.warn("No DSN provided, client will not send events."),this._dsn){const t=pp(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??!0,this._options.enableLogs&&Zu(this,"afterCaptureLog","flushLogs",Wv,_p),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Zu(this,"afterCaptureMetric","flushMetrics",Hv,vp)}captureException(e,t,n){const r=ke();if(_u(e))return I&&g.log(Ju),r;const i={event_id:r,...t};return this._process(()=>this.eventFromException(e,i).then(s=>this._captureEvent(s,i,n)).then(s=>s),"error"),i.event_id}captureMessage(e,t,n,r){const i={event_id:ke(),...n},s=Vo(e)?e:String(e),a=ht(e),c=a?this.eventFromMessage(s,t,i):this.eventFromException(e,i);return this._process(()=>c.then(u=>this._captureEvent(u,i,r)),a?"unknown":"error"),i.event_id}captureEvent(e,t,n){const r=ke();if(t?.originalException&&_u(t.originalException))return I&&g.log(Ju),r;const i={event_id:r,...t},s=e.sdkProcessingMetadata||{},a=s.capturedSpanScope,c=s.capturedSpanIsolationScope,u=el(e.type);return this._process(()=>this._captureEvent(e,i,a||n,c),u),i.event_id}captureSession(e){this.sendSession(e),nr(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){const t=this._transport;if(this.emit("flush"),!t)return!0;const n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){const 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){const t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),hp(this,e,this._integrations),t||Gu(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);const n=kv(e,this);let r=K_(e,this._dsn,this._options._metadata,this._options.tunnel);for(const i of t.attachments||[])r=Nu(r,G_(i));n&&(r=Nu(r,n)),this.sendEnvelope(r).then(i=>this.emit("afterSendEvent",e,i))}sendSession(e){const{release:t,environment:n=H_}=this._options;if("aggregates"in e){const i=e.attrs||{};if(!i.release&&!t){I&&g.warn(Ku);return}i.release=i.release||t,i.environment=i.environment||n,e.attrs=i}else{if(!e.release&&!t){I&&g.warn(Ku);return}e.release=e.release||t,e.environment=e.environment||n}this.emit("beforeSendSession",e);const r=J_(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){const r=`${e}:${t}`;I&&g.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){const n=this._hooks[e]=this._hooks[e]||new Set,r=o((...i)=>t(...i),"uniqueCallback");return n.add(r),()=>{n.delete(r)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach(r=>r(...t))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(t){return I&&g.error("Error while sending envelope:",t),{}}return I&&g.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=sv(this,e),Gu(this,e)}_updateSessionFromEvent(e,t){let n=t.level==="fatal",r=!1;const i=t.exception?.values;if(i){r=!0,n=!1;for(const a of i)if(a.mechanism?.handled===!1){n=!0;break}}const s=e.status==="ok";(s&&e.errors===0||s&&n)&&(nr(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(n=>setTimeout(n,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){const i=this.getOptions(),s=this.getIntegrationNames();return!t.integrations&&s.length&&(t.integrations=s),this.emit("preprocessEvent",e,t),e.type||r.setLastEventId(e.event_id||t.event_id),up(i,e,t,n,this,r).then(a=>(a===null||(this.emit("postprocessEvent",a,t),a.contexts={trace:{...a.contexts?.trace,...If(n)},...a.contexts},a.sdkProcessingMetadata={dynamicSamplingContext:Ko(this,n),...a.sdkProcessingMetadata}),a))}_captureEvent(e,t={},n=q(),r=he()){return I&&Ia(e)&&g.log(`Captured error event \`${Ip(e)[0]||"<unknown>"}\``),this._processEvent(e,t,n,r).then(i=>i.event_id,i=>{I&&(Qu(i)?g.log(i.message):Xu(i)?g.warn(i.message):g.warn(i))})}_processEvent(e,t,n,r){const i=this.getOptions(),{sampleRate:s}=i,a=Rp(e),c=Ia(e),u=`before send for type \`${e.type||"error"}\``,l=typeof s>"u"?void 0:bn(s),f=el(e.type);return this._prepareEvent(e,t,n,r).then(d=>{if(d===null)throw this.recordDroppedEvent("event_processor",f),js("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?d:Bv(Uv(this,i,d,t),u)}).then(d=>{if(d===null){if(this.recordDroppedEvent("before_send",f),a){const m=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",m)}throw js(`${u} returned \`null\`, will not send event.`)}const p=n.getSession()||r.getSession();if(c&&p&&this._updateSessionFromEvent(p,d),c&&typeof l=="number"&&Ct()>l)throw this.recordDroppedEvent("sample_rate","error"),js(`Discarding event because it's not included in the random sample (sampling rate = ${s})`);if(a){const m=(d.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(d.spans?d.spans.length:0);m>0&&this.recordDroppedEvent("before_send","span",m)}const h=d.transaction_info;if(a&&h&&d.transaction!==e.transaction){const m="custom";d.transaction_info={...h,source:m}}return this.sendEvent(d,t),d}).then(null,d=>{throw Qu(d)||Xu(d)?d:(this.captureException(d,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:d}),Qi(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
10
+ Reason: ${d}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n===yc&&this.recordDroppedEvent("queue_overflow",t),n))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([t,n])=>{const[r,i]=t.split(":");return{reason:r,category:i,quantity:n}})}_flushOutcomes(){I&&g.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0){I&&g.log("No outcomes to send");return}if(!this._dsn){I&&g.log("No dsn provided, will not send outcomes");return}I&&g.log("Sending outcomes:",e);const t=Mv(e,this._options.tunnel&&vt(this._dsn));this.sendEnvelope(t)}};function el(e){return e==="replay_event"?"replay":e||"error"}o(el,"getDataCategoryByType");function Bv(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Mn(e))return e.then(r=>{if(!Pe(r)&&r!==null)throw Qi(n);return r},r=>{throw Qi(`${t} rejected with ${r}`)});if(!Pe(e)&&e!==null)throw Qi(n);return e}o(Bv,"_validateBeforeSendResult");function Uv(e,t,n,r){const{beforeSend:i,beforeSendTransaction:s,ignoreSpans:a}=t,c=!Xo(t.beforeSendSpan)&&t.beforeSendSpan;let u=n;if(Ia(u)&&i)return i(u,r);if(Rp(u)){if(c||a){const l=Nv(u);if(a?.length&&Gr({description:l.description,op:l.op,attributes:l.data},a))return null;if(c){const f=c(l);f?u=oi(n,xv(f)):vo()}if(u.spans){const f=[],d=u.spans;for(const h of d){if(a?.length&&Gr({description:h.description,op:h.op,attributes:h.data},a)){B_(d,h);continue}if(c){const m=c(h);m?f.push(m):(vo(),f.push(h))}else f.push(h)}const p=u.spans.length-f.length;p&&e.recordDroppedEvent("before_send","span",p),u.spans=f}}if(s){if(u.spans){const l=u.spans.length;u.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:l}}return s(u,r)}}return u}o(Uv,"processBeforeSend");function Ia(e){return e.type===void 0}o(Ia,"isErrorEvent$2");function Rp(e){return e.type==="transaction"}o(Rp,"isTransactionEvent$1");function Hv(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Cp(e.attributes)}o(Hv,"estimateMetricSizeInBytes");function Wv(e){let t=0;return e.message&&(t+=e.message.length*2),t+Cp(e.attributes)}o(Wv,"estimateLogSizeInBytes");function Cp(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*tl(n[0]):ht(n)?t+=tl(n):t+=100}),t}o(Cp,"estimateAttributesSizeInBytes");function tl(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}o(tl,"estimatePrimitiveSizeInBytes");function jv(e,t){t.debug===!0&&(I?g.enable():Dt(()=>{})),q().update(t.initialScope);const n=new e(t);return qv(n),n.init(),n}o(jv,"initAndBind");function qv(e){q().setClient(e)}o(qv,"setCurrentClient");var qs=5e3,zv=36e5;function Gv(e){function t(...n){I&&g.log("[Offline]:",...n)}return o(t,"log"),n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const i=n.createStore(n);let s=qs,a;function c(d,p,h){return va(d,["client_report"])?!1:n.shouldStore?n.shouldStore(d,p,h):!0}o(c,"shouldQueue");function u(d){a&&clearTimeout(a),a=ns(setTimeout(async()=>{a=void 0;const p=await i.shift();p&&(t("Attempting to send previously queued event"),p[0].sent_at=new Date(yt()).toISOString(),f(p,!0).catch(h=>{t("Failed to retry sending",h)}))},d))}o(u,"flushIn");function l(){a||(u(s),s=Math.min(s*2,zv))}o(l,"flushWithBackOff");async function f(d,p=!1){if(!p&&va(d,["replay_event","replay_recording"]))return await i.push(d),u(100),{};try{if(n.shouldSend&&await n.shouldSend(d)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const h=await r.send(d);let m=100;if(h){if(h.headers?.["retry-after"])m=bp(h.headers["retry-after"]);else if(h.headers?.["x-sentry-rate-limits"])m=6e4;else if((h.statusCode||0)>=400)return h}return u(m),s=qs,h}catch(h){if(await c(d,h,s))return p?await i.unshift(d):await i.push(d),l(),t("Error sending. Event queued.",h),{};throw h}}return o(f,"send"),n.flushAtStartup&&l(),{send:f,flush:o(d=>(d===void 0&&(s=qs,u(100)),r.flush(d)),"flush")}}}o(Gv,"makeOfflineTransport");var kx="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function Ap(e,t){let n;return Tn(e,(r,i)=>(t.includes(i)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}o(Ap,"eventFromEnvelope");function Vv(e,t){return n=>{const r=e(n);return{...r,send:o(async i=>{const s=Ap(i,["event","transaction","profile","replay_event"]);return s&&(s.release=t),r.send(i)},"send")}}}o(Vv,"makeOverrideReleaseTransport");function Yv(e,t){return Xe(t?{...e[0],dsn:t}:e[0],e[1])}o(Yv,"overrideDsn");function Rx(e,t){return n=>{const r=e(n),i=new Map,s=t||(l=>{const f=l.getEvent();return f?.extra?.MULTIPLEXED_TRANSPORT_EXTRA_KEY&&Array.isArray(f.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY)?f.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY:[]});function a(l,f){const d=f?`${l}:${f}`:l;let p=i.get(d);if(!p){const h=Mf(l);if(!h)return;const m=pp(h,n.tunnel);p=f?Vv(e,f)({...n,url:m}):e({...n,url:m}),i.set(d,p)}return[l,p]}o(a,"getTransport");async function c(l){function f(h){return Ap(l,h?.length?h:["event"])}o(f,"getEvent");const d=s({envelope:l,getEvent:f}).map(h=>typeof h=="string"?a(h,void 0):a(h.dsn,h.release)).filter(h=>!!h),p=d.length?d:[["",r]];return(await Promise.all(p.map(([h,m])=>m.send(Yv(l,h)))))[0]}o(c,"send");async function u(l){const f=[...i.values(),r];return(await Promise.all(f.map(d=>d.flush(l)))).every(d=>d)}return o(u,"flush"),{send:c,flush:u}}}o(Rx,"makeMultiplexedTransport");function zs(e,t){return t.some(n=>e.includes(n))}o(zs,"isSensitiveKey");function Vr(e,t,n){if(t===!1)return{};const r=n!=null?[...Yu,...n]:Yu,i={};if(t===!0){for(const a of Object.keys(e))i[a]=zs(a.toLowerCase(),r)?Or:e[a];return i}if("deny"in t){const a=t.deny.map(c=>c.toLowerCase());for(const c of Object.keys(e)){const u=c.toLowerCase();i[c]=zs(u,r)||a.some(l=>u.includes(l))?Or:e[c]}return i}const s=t.allow.map(a=>a.toLowerCase());for(const a of Object.keys(e)){const c=a.toLowerCase();zs(c,r)?i[a]=Or:i[a]=s.some(u=>c.includes(u))?e[a]:Or}return i}o(Vr,"filterKeyValueData");function Jv(e){const t={};let n=0;for(;n<e.length;){const 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}const s=e.slice(n,r).trim();if(t[s]===void 0){let a=e.slice(r+1,i).trim();a.charCodeAt(0)===34&&(a=a.slice(1,-1));try{t[s]=a.indexOf("%")!==-1?decodeURIComponent(a):a}catch{t[s]=a}}n=i+1}return t}o(Jv,"parseCookie");function wa(e,t){if(t===!1)return{};try{const n=Jv(e);return Object.keys(n).length===0?{}:Vr(n,t,Ov)}catch{return Or}}o(wa,"filterCookies");var Kv="thismessage:/";function rs(e){return"isRelative"in e}o(rs,"isURLObjectRelative");function Yr(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=t??(n?Kv:void 0);try{if("canParse"in URL&&!URL.canParse(e,r))return;const i=new URL(e,r);return n?{isRelative:n,pathname:i.pathname,search:i.search,hash:i.hash}:i}catch{}}o(Yr,"parseStringToURLObject");function Mp(e){if(rs(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}o(Mp,"getSanitizedUrlStringFromUrlObject");function yn(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const 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}}o(yn,"parseUrl");function Np(e){return e.split(/[?#]/,1)[0]}o(Np,"stripUrlQueryAndFragment");function ot(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",i=e.includes(";base64,"),s=e.indexOf(",");let a="";if(t&&s!==-1){const c=e.slice(s+1);a=c.length>10?`${c.slice(0,10)}... [truncated]`:c}return`data:${r}${i?",base64":""}${a?`,${a}`:""}`}return e}o(ot,"stripDataUrlContent");function xp(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return Qv(e,n)||Xv(e,r)}o(xp,"isSentryRequestUrl");function Xv(e,t){return t?nl(e)===nl(t):!1}o(Xv,"checkTunnel");function Qv(e,t){const n=Yr(e);return!n||rs(n)||!t?!1:Zv(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}o(Qv,"checkDsn");function Zv(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}o(Zv,"hostnameMatchesDsnHost");function nl(e){return e[e.length-1]==="/"?e.slice(0,-1):e}o(nl,"removeTrailingSlash");function eS(e,...t){const 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}o(eS,"parameterize");var tS=eS;function nS(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}o(nS,"addAutoIpAddressToSession");function rS(e,t,n=[t],r="npm"){const i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(s=>({name:`${r}:@sentry/${s}`,version:qr})),i.version=qr)}o(rS,"applySdkMetadata");function Op(e={}){const t=e.client||R();if(!Zy()||!t)return{};const n=_t(),r=tn(n);if(r.getTraceData)return r.getTraceData(e);const i=e.scope||q(),s=e.span||be(),a=ar(s)&&!Fe(t.getOptions());if(!s&&s_())return{};const c=s&&!a?L_(s):iS(i),u=s?ut(s):Ko(t,i),l=Af(u);if(!Lf.test(c))return g.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const f={"sentry-trace":c,baggage:l};return e.propagateTraceparent&&(f.traceparent=s&&!a?P_(s):oS(i)),f}o(Op,"getTraceData");function iS(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Df(t,r,n)}o(iS,"scopeToTraceHeader");function oS(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return Ff(t,r,n)}o(oS,"scopeToTraceparentHeader");var sS=100;function Ot(e,t){const n=R(),r=he();if(!n)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=sS}=n.getOptions();if(s<=0)return;const a={timestamp:Nn(),...e},c=i?Dt(()=>i(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}o(Ot,"addBreadcrumb");var aS="FunctionToString",rl=new WeakMap,cS=o((()=>({name:aS,setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=oc(this);let r;try{rl.has(R())&&n!==void 0&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){rl.set(e,!0)}})),"_functionToStringIntegration"),uS=cS,lS=[/^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$/],dS="EventFilters",fS=(e={})=>{let t;return{name:dS,setup(n){t=il(e,n.getOptions())},processEvent(n,r,i){return t||(t=il(e,i.getOptions())),hS(n,t)?null:n}}},pS=((e={})=>({...fS(e),name:"InboundFilters"}));function il(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:lS],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}o(il,"_mergeOptions");function hS(e,t){if(e.type){if(e.type==="transaction"&&gS(e,t.ignoreTransactions))return I&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
11
+ Event: ${dn(e)}`),!0}else{if(mS(e,t.ignoreErrors))return I&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
12
+ Event: ${dn(e)}`),!0;if(SS(e))return I&&g.warn(`Event dropped due to not having an error message, error type or stacktrace.
13
+ Event: ${dn(e)}`),!0;if(_S(e,t.denyUrls))return I&&g.warn(`Event dropped due to being matched by \`denyUrls\` option.
14
+ Event: ${dn(e)}.
15
+ Url: ${To(e)}`),!0;if(!yS(e,t.allowUrls))return I&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option.
16
+ Event: ${dn(e)}.
17
+ Url: ${To(e)}`),!0}return!1}o(hS,"_shouldDropEvent$1");function mS(e,t){return t?.length?Ip(e).some(n=>Ye(n,t)):!1}o(mS,"_isIgnoredError");function gS(e,t){if(!t?.length)return!1;const n=e.transaction;return n?Ye(n,t):!1}o(gS,"_isIgnoredTransaction");function _S(e,t){if(!t?.length)return!1;const n=To(e);return n?Ye(n,t):!1}o(_S,"_isDeniedUrl");function yS(e,t){if(!t?.length)return!0;const n=To(e);return n?Ye(n,t):!0}o(yS,"_isAllowedUrl");function vS(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}o(vS,"_getLastValidUrl");function To(e){try{const t=[...e.exception?.values??[]].reverse().find(n=>n.mechanism?.parent_id===void 0&&n.stacktrace?.frames?.length)?.stacktrace?.frames;return t?vS(t):null}catch{return I&&g.error(`Cannot extract url for event ${dn(e)}`),null}}o(To,"_getEventFilterUrl");function SS(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}o(SS,"_isUselessError");function bS(e,t,n,r,i,s){if(!i.exception?.values||!s||!De(s.originalException))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=ka(e,t,r,s.originalException,n,i.exception.values,a,0))}o(bS,"applyAggregateErrorsToEvent");function ka(e,t,n,r,i,s,a,c){if(s.length>=n+1)return s;let u=[...s];if(De(r[i])){ol(a,c,r);const l=e(t,r[i]),f=u.length;sl(l,i,f,c),u=ka(e,t,n,r[i],i,[l,...u],l,f)}return Lp(r)&&r.errors.forEach((l,f)=>{if(De(l)){ol(a,c,r);const d=e(t,l),p=u.length;sl(d,`errors[${f}]`,p,c),u=ka(e,t,n,l,i,[d,...u],d,p)}}),u}o(ka,"aggregateExceptionsFromError");function Lp(e){return Array.isArray(e.errors)}o(Lp,"isExceptionGroup");function ol(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Lp(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}o(ol,"applyExceptionGroupFieldsForParentException");function sl(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}o(sl,"applyExceptionGroupFieldsForChildException");function ES(e){return De(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}o(ES,"hasSentryFetchUrlHost");function al(e){return ES(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}o(al,"_enhanceErrorWithSentryInfo");var Pp=new Map,cl=new Set;function TS(e){if($._sentryModuleMetadata)for(const t of Object.keys($._sentryModuleMetadata)){const n=$._sentryModuleMetadata[t];if(cl.has(t))continue;cl.add(t);const r=e(t);for(const i of r.reverse())if(i.filename){Pp.set(i.filename,n);break}}}o(TS,"ensureMetadataStacksAreParsed");function IS(e,t){return TS(e),Pp.get(t)}o(IS,"getMetadataForUrl");function Dp(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;const i=IS(e,r.filename);i&&(r.module_metadata=i)})})}o(Dp,"addMetadataToStackFrames");function Fp(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}o(Fp,"stripMetadataFromStackFrames");var Cx=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{Tn(t,(n,r)=>{if(r==="event"){const i=Array.isArray(n)?n[1]:void 0;i&&(Fp(i),n[1]=i)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;Dp(n,t)})}}),ul=new Set([]);function Sc(e){const t="console",n=Zt(t,e);return en(t,wS),n}o(Sc,"addConsoleInstrumentationHandler");var ll=new Set;function wS(){"console"in $&&tc.forEach(function(e){ll.has(e)||!(e in $.console)||(ll.add(e),Ae($.console,e,function(t){return po[e]=t,function(...n){const r=n[0],i=po[e],s=ul.size&&typeof r=="string"&&Ye(r,ul);s||Ge("console",{args:n,level:e}),(!s||I&&g.isEnabled())&&i?.apply($.console,n)}}))})}o(wS,"instrumentConsole");function Io(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}o(Io,"severityLevelFromString");var kS="CaptureConsole",RS=o(((e={})=>{const t=e.levels||tc,n=e.handled??!0;return{name:kS,setup(r){"console"in $&&Sc(({args:i,level:s})=>{R()!==r||!t.includes(s)||CS(i,s,n)})}}}),"_captureConsoleIntegration"),Ax=RS;function CS(e,t,n){const r=Io(t),i=new Error,s={level:Io(t),extra:{arguments:e}};Ke(a=>{if(a.addEventProcessor(l=>(l.logger="console",pt(l,{handled:n,type:"auto.core.capture_console"}),l)),t==="assert"){if(!e[0]){const l=`Assertion failed: ${ho(e.slice(1)," ")||"console.assert"}`;a.setExtra("arguments",e.slice(1)),a.captureMessage(l,r,{captureContext:s,syntheticException:i})}return}const c=e.find(l=>l instanceof Error);if(c){me(c,s);return}const u=ho(e," ");a.captureMessage(u,r,{captureContext:s,syntheticException:i})})}o(CS,"consoleHandler");var AS="Dedupe",MS=o((()=>{let e;return{name:AS,processEvent(t){if(t.type)return t;try{if(xS(t,e))return I&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),"_dedupeIntegration"),NS=MS;function xS(e,t){return t?!!(OS(e,t)||LS(e,t)):!1}o(xS,"_shouldDropEvent");function OS(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Bp(e,t)||!$p(e,t))}o(OS,"_isSameMessageEvent");function LS(e,t){const n=dl(t),r=dl(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Bp(e,t)||!$p(e,t))}o(LS,"_isSameExceptionEvent");function $p(e,t){let n=da(e),r=da(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let i=0;i<r.length;i++){const s=r[i],a=n[i];if(s.filename!==a.filename||s.lineno!==a.lineno||s.colno!==a.colno||s.function!==a.function)return!1}return!0}o($p,"_isSameStacktrace");function Bp(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}}o(Bp,"_isSameFingerprint");function dl(e){return e.exception?.values?.[0]}o(dl,"_getExceptionFromEvent");var PS="ExtraErrorData",DS=o(((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:PS,processEvent(r,i,s){const{maxValueLength:a}=s.getOptions();return FS(r,i,t,n,a)}}}),"_extraErrorDataIntegration"),Mx=DS;function FS(e,t={},n,r,i){if(!t.originalException||!De(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,a=Up(t.originalException,r,i);if(a){const c={...e.contexts},u=we(a,n);return Pe(u)&&(Ng(u),c[s]=u),{...e,contexts:c}}return e}o(FS,"_enhanceEventWithErrorData");function Up(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],i={};for(const s of Object.keys(e)){if(r.indexOf(s)!==-1)continue;const a=e[s];i[s]=De(a)||typeof a=="string"?n?zr(`${a}`,n):`${a}`:a}if(t&&e.cause!==void 0&&(De(e.cause)?i.cause={[e.cause.name||e.cause.constructor.name]:Up(e.cause,!1,n)}:i.cause=e.cause),typeof e.toJSON=="function"){const s=e.toJSON();for(const a of Object.keys(s)){const c=s[a];i[a]=De(c)?c.toString():c}}return i}catch(r){I&&g.error("Unable to extract extra data from the Error object:",r)}return null}o(Up,"_extractErrorData");function $S(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const i=e[r];i==="."?e.splice(r,1):i===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;)e.unshift("..");return e}o($S,"normalizeArray");var BS=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function US(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=BS.exec(t);return n?n.slice(1):[]}o(US,"splitPath");function fl(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:"/";i&&(t=`${i}/${t}`,n=i.charAt(0)==="/")}return t=$S(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}o(fl,"resolve");function pl(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)}o(pl,"trim");function HS(e,t){e=fl(e).slice(1),t=fl(t).slice(1);const n=pl(e.split("/")),r=pl(t.split("/")),i=Math.min(n.length,r.length);let s=i;for(let c=0;c<i;c++)if(n[c]!==r[c]){s=c;break}let a=[];for(let c=s;c<n.length;c++)a.push("..");return a=a.concat(r.slice(s)),a.join("/")}o(HS,"relative");function WS(e,t){let n=US(e)[2]||"";return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}o(WS,"basename");var jS="RewriteFrames",Nx=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in $&&!!$.window,i=e.iteratee||qS({isBrowser:r,root:t,prefix:n});function s(c){try{return{...c,exception:{...c.exception,values:c.exception.values.map(u=>({...u,...u.stacktrace&&{stacktrace:a(u.stacktrace)}}))}}}catch{return c}}o(s,"_processExceptionsEvent");function a(c){return{...c,frames:c?.frames?.map(u=>i(u))}}return o(a,"_processStacktrace"),{name:jS,processEvent(c){let u=c;return c.exception&&Array.isArray(c.exception.values)&&(u=s(u)),u}}};function qS({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),s=/^\//.test(r.filename);if(e){if(t){const a=r.filename;a.indexOf(t)===0&&(r.filename=a.replace(t,n))}}else if(i||s){const a=i?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename;r.filename=`${n}${t?HS(t,a):WS(a)}`}return r}}o(qS,"generateIteratee");var zS=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],GS=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],VS={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"},Hp=["select","insert","upsert","update","delete"];function is(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}o(is,"markAsInstrumented");function os(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}o(os,"isInstrumented");function Wp(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}o(Wp,"getMutationBodyPayloadForTelemetry");function YS(e,t){return Wp(e,t)!==void 0}o(YS,"hasMutationBodyForDescription");function jp(e,t){if(!e)return;if(typeof e.get=="function")return e.get(t)??void 0;const n=e,r=t.toLowerCase(),i=Object.keys(n).find(s=>s.toLowerCase()===r);return i!==void 0?n[i]:void 0}o(jp,"getHeader");function JS(e,t={}){switch(e){case"GET":return"select";case"POST":return jp(t,"Prefer")?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}o(JS,"extractOperation");function KS(e,t){if(t===""||t==="*")return"select(*)";if(e==="select")return`select(${t})`;if(e==="or"||e.endsWith(".or"))return`${e}${t}`;const[n,...r]=t.split(".");let i;return n?.startsWith("fts")?i="textSearch":n?.startsWith("plfts")?i="textSearch[plain]":n?.startsWith("phfts")?i="textSearch[phrase]":n?.startsWith("wfts")?i="textSearch[websearch]":i=n&&VS[n]||"filter",`${i}(${e}, ${r.join(".")})`}o(KS,"translateFiltersIntoMethods");function hl(e,t=!1){return new Proxy(e,{apply(n,r,i){return Ft({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[re]:"auto.db.supabase",[ve]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},s=>Reflect.apply(n,r,i).then(a=>(Ve(a)&&"error"in a&&a.error?(s.setStatus({code:2}),me(a.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):s.setStatus({code:1}),s.end(),a)).catch(a=>{throw s.setStatus({code:2}),s.end(),me(a,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),a}).then(...i))}})}o(hl,"instrumentAuthOperation");function XS(e){const t=e.auth;if(!(!t||os(e.auth))){for(const n of zS){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=hl(r))}for(const n of GS){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=hl(r,!0))}is(e.auth)}}o(XS,"instrumentSupabaseAuthClient");function QS(e,t){os(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(n,r,i){const s=Reflect.apply(n,r,i),a=s.constructor;return eb(a,t),s}}),is(e.prototype.from))}o(QS,"instrumentSupabaseClientConstructor");function ZS(e,t){os(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(n,r,i){const s=Hp,a=r,c=JS(a.method,a.headers);if(!s.includes(c)||!a?.url?.pathname||typeof a.url.pathname!="string")return Reflect.apply(n,r,i);const u=a.url.pathname.split("/"),l=u.length>0?u[u.length-1]:"",f=[];for(const[w,x]of a.url.searchParams.entries())f.push(KS(w,x));const d=Object.create(null);if(Pe(a.body))for(const[w,x]of Object.entries(a.body))d[w]=x;const p=R(),h=t.sendOperationData??p?.getDataCollectionOptions().databaseQueryData===!0,m=Wp(a.body,d),_=c==="select"?"":`${c}${YS(a.body,d)?"(...) ":""}`,y=h?f.join(" "):f.length>0?"[redacted]":"",v=[_.trimEnd(),y].filter(Boolean).join(" "),S=v?`${v} from(${l})`:`from(${l})`,k={"db.table":l,"db.schema":a.schema,"db.url":a.url.origin,"db.sdk":jp(a.headers,"X-Client-Info"),"db.system":"postgresql","db.operation":c,[re]:"auto.db.supabase",[ve]:"db"};return f.length&&h&&(k["db.query"]=f),m!==void 0&&h&&(k["db.body"]=m),Ft({name:S,attributes:k},w=>Reflect.apply(n,r,[]).then(x=>{if(w&&(x&&typeof x=="object"&&"status"in x&&go(w,x.status||500),w.end()),x?.error){const H=new Error(x.error.message);x.error.code&&(H.code=x.error.code),x.error.details&&(H.details=x.error.details);const B={};f.length&&h&&(B.query=f),m!==void 0&&h&&(B.body=m),me(H,E=>(E.addEventProcessor(O=>(pt(O,{handled:!1,type:"auto.db.supabase.postgres"}),O)),E.setContext("supabase",B),E))}const C={type:"supabase",category:`db.${c}`,message:S},b={};return f.length&&h&&(b.query=f),m!==void 0&&h&&(b.body=m),Object.keys(b).length&&(C.data=b),Ot(C),x},x=>{throw w&&(go(w,500),w.end()),x}).then(...i))}}),is(e.prototype.then))}o(ZS,"instrumentPostgRESTFilterBuilder");function eb(e,t){for(const n of Hp)os(e.prototype[n])||(e.prototype[n]=new Proxy(e.prototype[n],{apply(r,i,s){const a=Reflect.apply(r,i,s),c=a.constructor;return I&&g.log(`Instrumenting ${n} operation's PostgRESTFilterBuilder`),ZS(c,t),a}}),is(e.prototype[n]))}o(eb,"instrumentPostgRESTQueryBuilder");var tb=o((e,t={})=>{if(!e){I&&g.warn("Supabase integration was not installed because no Supabase client was provided.");return}QS(e.constructor===Function?e:e.constructor,t),XS(e)},"instrumentSupabaseClient"),nb="Supabase",rb=o(((e,t)=>({setupOnce(){tb(e,t)},name:nb})),"_supabaseIntegration"),xx=e=>rb(e.supabaseClient,{sendOperationData:e.sendOperationData}),ib=10,ob="ZodErrors";function sb(e){return De(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}o(sb,"originalExceptionIsZodError");function ab(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}}o(ab,"flattenIssue");function cb(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}o(cb,"flattenIssuePath");function ub(e){const t=new Set;for(const r of e.issues){const i=cb(r.path);i.length>0&&t.add(i)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const i=e.issues[0];i!==void 0&&"expected"in i&&typeof i.expected=="string"&&(r=i.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${zr(n.join(", "),100)}`}o(ub,"formatIssueMessage");function lb(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!sb(r.originalException)||r.originalException.issues.length===0)return n;try{const i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(ab);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:ub(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":i.slice(0,e)}}}catch(i){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:i instanceof Error?`${i.name}: ${i.message}
18
+ ${i.stack}`:"unknown"}}}}}o(lb,"applyZodErrorsToEvent");var db=o(((e={})=>{const t=e.limit??ib;return{name:ob,processEvent(n,r){return lb(t,e.saveZodIssuesAsAttachment,n,r)}}}),"_zodErrorsIntegration"),Ox=db,Lx=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{Tn(n,(r,i)=>{if(i==="event"){const s=Array.isArray(r)?r[1]:void 0;s&&(Fp(s),r[1]=s)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;Dp(r,n)})},preprocessEvent(t){e.ignoreSentryInternalFrames&&($._sentryWrappedDepth??0)>0&&(t.sdkProcessingMetadata={...t.sdkProcessingMetadata,insideSentryWrapped:!0})},processEvent(t){const n=e.ignoreSentryInternalFrames?t.sdkProcessingMetadata?.insideSentryWrapped===!0&&t.exception?.values?.length===1:!1,r=pb(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"](i=>!i.some(s=>e.filterKeys.includes(s)))){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 fb(e,t,n){if(t!==0)return!1;if(n&&hb(e)||e.function==="sentryWrapped")return!0;if(!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(gb))return!1;if(e.pre_context){const r=e.pre_context.length;for(let i=0;i<r;i++)if(e.pre_context[i]?.includes(mb))return!0}return!1}o(fb,"isSentryInternalFrame");function pb(e,t,n){const r=da(e);if(r)return r.filter((i,s)=>!i.filename||i.lineno==null&&i.colno==null&&i.instruction_addr==null?!1:!t||!fb(i,s,!!n)).map(i=>i.module_metadata?Object.keys(i.module_metadata).filter(s=>s.startsWith(ml)).map(s=>s.slice(ml.length)):[])}o(pb,"getBundleKeysForAllFramesWithFilenames");function hb(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}o(hb,"isLikelyMinifiedSentryWrappedFrame");var ml="_sentryBundlerPluginAppKey:",mb="Attempt to invoke user-land function",gb="fn.apply(this, wrappedArguments)";var xi="flag.evaluation.";function br(e){if(e.type)return e;const t=q().getScopeData().contexts.flags,n=t?t.values:[];return n.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...n]}),e}o(br,"_INTERNAL_copyFlagsFromScopeToEvent");function In(e,t,n=100){const r=q().getScopeData().contexts;r.flags||(r.flags={values:[]});const i=r.flags.values;_b(i,e,t,n)}o(In,"_INTERNAL_insertFlagToScope");function _b(e,t,n,r){if(typeof n!="boolean")return;if(e.length>r){I&&g.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${r}`);return}const i=e.findIndex(s=>s.flag===t);i!==-1&&e.splice(i,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}o(_b,"_INTERNAL_insertToFlagBuffer");function wn(e,t,n=10){if(typeof t!="boolean")return;const r=be();if(!r)return;const i=V(r).data;if(`${xi}${e}`in i){r.setAttribute(`${xi}${e}`,t);return}Object.keys(i).filter(s=>s.startsWith(xi)).length<n&&r.setAttribute(`${xi}${e}`,t)}o(wn,"_INTERNAL_addFeatureFlagToActiveSpan");var Px=()=>({name:"FeatureFlags",processEvent(e,t,n){return br(e)},addFeatureFlag(e,t){In(e,t),wn(e,t)}}),yb=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&Ae(t,"isOn",gl),typeof t.getFeatureValue=="function"&&Ae(t,"getFeatureValue",gl)},processEvent(t,n,r){return br(t)}});function gl(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(In(n,r),wn(n,r)),r}}o(gl,"_wrapAndCaptureBooleanResult");var vb="ConversationId",Sb=o((()=>({name:vb,setup(e){e.on("spanStart",t=>{const n=q().getScopeData(),r=he().getScopeData(),i=n.conversationId||r.conversationId;if(i){const{op:s,data:a,description:c}=V(t);if(!s?.startsWith("gen_ai.")&&!a["ai.operationId"]&&!c?.startsWith("ai."))return;t.setAttribute(__,i)}})}})),"_conversationIdIntegration"),bb=Sb;function Eb(e,t,n,r,i){if(!e.fetchData)return;const{method:s,url:a}=e.fetchData,c=Fe()&&t(a);if(e.endTimestamp){const _=e.fetchData.__span;if(!_)return;const y=r[_];y&&(c&&(wb(y,e),Tb(y,e,i)),delete r[_]);return}const{spanOrigin:u="auto.http.browser",propagateTraceparent:l=!1}=typeof i=="object"?i:{spanOrigin:i},f=R(),d=!!be(),p=d||!!f&&Qe(f),h=c&&p?nn(Cb(a,s,u)):new En,m=es(h)&&d?void 0:h;if(c&&!p&&f?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h,n(e.fetchData.url)){const _=e.args[0],y={...e.args[1]||{}},v=Ib(_,y,Fe()&&p?m:void 0,l);v&&(e.args[1]=y,y.headers=v)}if(f){const _={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};f.emit("beforeOutgoingRequestSpan",h,_)}return h}o(Eb,"instrumentFetchRequest");function Tb(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}o(Tb,"_callOnRequestSpanEnd");function Ib(e,t,n,r){const i=Op({span:n,propagateTraceparent:r}),s=i["sentry-trace"],a=i.baggage,c=i.traceparent;if(!s)return;const u=t.headers||(ic(e)?e.headers:void 0);if(u)if(kb(u)){const l=new Headers(u);if(l.get("sentry-trace")||l.set("sentry-trace",s),r&&c&&!l.get("traceparent")&&l.set("traceparent",c),a){const f=l.get("baggage");f?Oi(f)||l.set("baggage",`${f},${a}`):l.set("baggage",a)}return l}else if(Rb(u)){const l=[...u];l.find(d=>d[0]==="sentry-trace")||l.push(["sentry-trace",s]),r&&c&&!l.find(d=>d[0]==="traceparent")&&l.push(["traceparent",c]);const f=u.find(d=>d[0]==="baggage"&&typeof d[1]=="string"&&Oi(d[1]));return a&&!f&&l.push(["baggage",a]),l}else{const l="sentry-trace"in u?u["sentry-trace"]:void 0,f="traceparent"in u?u.traceparent:void 0,d="baggage"in u?u.baggage:void 0,p=d?Array.isArray(d)?[...d]:[d]:[],h=d&&(Array.isArray(d)?d.find(_=>Oi(_)):Oi(d));a&&!h&&p.push(a);const m=Object.assign({},u,{"sentry-trace":l??s,...p.length>0&&{baggage:p.join(",")}});return r&&c&&!f&&(m.traceparent=c),m}else return{"sentry-trace":s,...a&&{baggage:a},...c&&{traceparent:c}}}o(Ib,"_INTERNAL_getTracingHeadersForFetchRequest");function wb(e,t){if(t.response){go(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:2,message:"internal_error"});e.end()}o(wb,"endSpan");function Oi(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(Cf))}o(Oi,"baggageHeaderHasSentryBaggageValues");function kb(e){return typeof Headers<"u"&&Jo(e,Headers)}o(kb,"isHeaders");function Rb(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}o(Rb,"isHeadersInitTupleArray");function Cb(e,t,n){if(e.startsWith("data:"))return{name:`${t} ${ot(e)}`,attributes:_l(e,void 0,t,n)};const r=Yr(e);return{name:`${t} ${r?Mp(r):e}`,attributes:_l(e,r,t,n)}}o(Cb,"getSpanStartOptions");function _l(e,t,n,r){const i={url:ot(e),type:"fetch","http.method":n,[re]:r,[ve]:"http.client"};return t&&(rs(t)||(i[ip]=ot(t.href),i[li]=ot(t.href),i["server.address"]=t.host),t.search&&(i["http.query"]=t.search),t.hash&&(i["http.fragment"]=t.hash)),i}o(_l,"getFetchSpanAttributes");function Ab(e,t={},n=q()){const{message:r,name:i,email:s,url:a,source:c,associatedEventId:u,tags:l}=e,f={contexts:{feedback:{contact_email:s,name:i,message:r,url:a,source:c,associated_event_id:u}},type:"feedback",level:"info",tags:l},d=n?.getClient()||R();return d&&d.emit("beforeSendFeedback",f,t),n.captureEvent(f,t)}o(Ab,"captureFeedback");var Dx=rf({debug:o(()=>Nb,"debug"),error:o(()=>Lb,"error"),fatal:o(()=>Pb,"fatal"),fmt:o(()=>tS,"fmt"),info:o(()=>xb,"info"),trace:o(()=>Mb,"trace"),warn:o(()=>Ob,"warn")});function Er(e,t,n,r,i){Eo({level:e,message:t,attributes:n,severityNumber:i},r)}o(Er,"captureLog");function Mb(e,t,{scope:n}={}){Er("trace",e,t,n)}o(Mb,"trace");function Nb(e,t,{scope:n}={}){Er("debug",e,t,n)}o(Nb,"debug$1");function xb(e,t,{scope:n}={}){Er("info",e,t,n)}o(xb,"info");function Ob(e,t,{scope:n}={}){Er("warn",e,t,n)}o(Ob,"warn");function Lb(e,t,{scope:n}={}){Er("error",e,t,n)}o(Lb,"error");function Pb(e,t,{scope:n}={}){Er("fatal",e,t,n)}o(Pb,"fatal");function wo(e,t,n){return"util"in $&&typeof $.util.format=="function"?$.util.format(...e):Db(e,t,n)}o(wo,"formatConsoleArgs");function Db(e,t,n){return e.map(r=>ht(r)?String(r):JSON.stringify(we(r,t,n))).join(" ")}o(Db,"safeJoinConsoleArgs");function qp(e){return/%[sdifocO]/.test(e)}o(qp,"hasConsoleSubstitutions");function zp(e,t){const n={};return n["sentry.message.template"]=`${e} ${new Array(t.length).fill("{}").join(" ")}`,t.forEach((r,i)=>{n[`sentry.message.parameter.${i}`]=r}),n}o(zp,"createConsoleTemplateAttributes");var Fb="ConsoleLogs",yl={[re]:"auto.log.console"},$b=o(((e={})=>{const t=e.levels||tc;return{name:Fb,setup(n){const{enableLogs:r,normalizeDepth:i=3,normalizeMaxBreadth:s=1e3}=n.getOptions();if(!r){I&&g.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}const a=Sc(({args:c,level:u})=>{if(R()!==n||!t.includes(u))return;const l=c[0],f=c.slice(1);if(u==="assert"){if(!l){const h=f.length>0?`Assertion failed: ${wo(f,i,s)}`:"Assertion failed";Eo({level:"error",message:h,attributes:yl})}return}const d=u==="log",p={...yl};if(Pe(l)){Object.assign(p,we(l,i,s));const h=typeof c[1]=="string"?2:1;c.slice(h).forEach((m,_)=>{p[`sentry.message.parameter.${_}`]=we(m,i,s)})}else if(f.length>0&&typeof l=="string"&&!qp(l)){const h=zp(l,f);for(const[m,_]of Object.entries(h))p[m]=m.startsWith("sentry.message.parameter.")?we(_,i,s):_}Eo({level:d?"info":u,message:wo(c,i,s),severityNumber:d?10:void 0,attributes:p})});n.registerCleanup(a)}}}),"_consoleLoggingIntegration"),Fx=$b,$x=rf({count:o(()=>Bb,"count"),distribution:o(()=>Ra,"distribution"),gauge:o(()=>Ub,"gauge")});function bc(e,t,n,r){Iv({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}o(bc,"captureMetric");function Bb(e,t=1,n){bc("counter",e,t,n)}o(Bb,"count");function Ub(e,t,n){bc("gauge",e,t,n)}o(Ub,"gauge");function Ra(e,t,n){bc("distribution",e,t,n)}o(Ra,"distribution");var Hb=["trace","debug","info","warn","error","fatal"];function Bx(e={}){const t=new Set(e.levels??Hb),n=e.client;return{log(r){const{type:i,level:s,message:a,args:c,tag:u,date:l,...f}=r,d=n||R();if(!d)return;const p=qb(i,s);if(!t.has(p))return;const{normalizeDepth:h=3,normalizeMaxBreadth:m=1e3}=d.getOptions(),_={};for(const[v,S]of Object.entries(f))_[v]=we(S,h,m);_["sentry.origin"]="auto.log.consola",u&&(_["consola.tag"]=u),i&&(_["consola.type"]=i),s!=null&&typeof s=="number"&&(_["consola.level"]=s);const y=Gb(zb(c,h,m),h,m);y?.attributes&&Object.assign(_,y.attributes),Eo({level:p,message:y?.message||a||c&&wo(c,h,m)||"",attributes:_})}}}o(Bx,"createConsolaReporter");var Wb={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"},jb={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function qb(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=Wb[e];if(n)return n}if(typeof t=="number"){const n=jb[t];if(n)return n}return"info"}o(qb,"getLogSeverityLevel");function zb(e,t,n){if(!e?.length)return{message:""};const r=wo(e,t,n),i=e[0];if(Pe(i)){const s=typeof e[1]=="string"?2:1;return{message:r,attributes:i,messageParameters:e.slice(s)}}else{const s=e.slice(1),a=s.length>0&&typeof i=="string"&&!qp(i);return{message:r,messageTemplate:a?i:void 0,messageParameters:a?s:void 0}}}o(zb,"defaultExtractAttributes");function Gb(e,t,n){const{message:r,attributes:i,messageTemplate:s,messageParameters:a}=e,c={};if(s&&a){const u=zp(s,a);for(const[l,f]of Object.entries(u))c[l]=l.startsWith("sentry.message.parameter.")?we(f,t,n):f}else a&&a.length>0&&a.forEach((u,l)=>{c[`sentry.message.parameter.${l}`]=we(u,t,n)});return{message:r,attributes:{...we(i,t,n),...c}}}o(Gb,"processExtractedAttributes");var Vb="gen_ai.prompt",pi="gen_ai.system",Je="gen_ai.request.model",Ec="gen_ai.request.stream",ss="gen_ai.request.temperature",Tc="gen_ai.request.max_tokens",as="gen_ai.request.frequency_penalty",Ic="gen_ai.request.presence_penalty",cs="gen_ai.request.top_p",Gp="gen_ai.request.top_k",Vp="gen_ai.request.encoding_format",Yp="gen_ai.request.dimensions",Jr="gen_ai.response.finish_reasons",Tr="gen_ai.response.model",us="gen_ai.response.id",Yb="gen_ai.response.stop_reason",kn="gen_ai.usage.input_tokens",Rn="gen_ai.usage.output_tokens",Jt="gen_ai.usage.total_tokens",st="gen_ai.operation.name",Cn="sentry.sdk_meta.gen_ai.input.messages.original_length",Ir="gen_ai.input.messages",hi="gen_ai.system_instructions",Nt="gen_ai.response.text",mi="gen_ai.request.available_tools",Jb="gen_ai.response.streaming",An="gen_ai.response.tool_calls",gi="gen_ai.agent.name",Kb="gen_ai.pipeline.name",wc="gen_ai.conversation.id",Xb="gen_ai.usage.cache_creation_input_tokens",Qb="gen_ai.usage.cache_read_input_tokens",Zb="gen_ai.invoke_agent",kc="gen_ai.embeddings.input",Jp="gen_ai.embeddings",vl="gen_ai.execute_tool",Kp="gen_ai.tool.name",eE="gen_ai.tool.call.id",tE="gen_ai.tool.type",Xp="gen_ai.tool.input",Qp="gen_ai.tool.output",nE="gen_ai.tool.description";function Zn(e){return!e||typeof e!="object"?!1:iE(e)||eh(e)||rE(e)||th(e)||nh(e)||oE(e)||sE(e)||aE(e)||cE(e)||uE(e)||lE(e)||dE(e)}o(Zn,"isContentMedia");function rE(e){return"image_url"in e?typeof e.image_url=="string"?e.image_url.startsWith("data:"):Zp(e):!1}o(rE,"hasImageUrl");function Zp(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:")}o(Zp,"hasNestedImageUrl");function iE(e){return"type"in e&&typeof e.type=="string"&&"source"in e&&Zn(e.source)}o(iE,"isContentMediaSource");function eh(e){return"inlineData"in e&&!!e.inlineData&&typeof e.inlineData=="object"&&"data"in e.inlineData&&typeof e.inlineData.data=="string"}o(eh,"hasInlineData");function th(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"}o(th,"hasInputAudio");function nh(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"}o(nh,"hasFileData");function oE(e){return"media_type"in e&&typeof e.media_type=="string"&&"data"in e}o(oE,"hasMediaTypeData");function sE(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://")}o(sE,"hasVercelFileData");function aE(e){return"type"in e&&e.type==="image"&&"image"in e&&typeof e.image=="string"&&!e.image.startsWith("http://")&&!e.image.startsWith("https://")}o(aE,"hasVercelImageData");function cE(e){return"type"in e&&(e.type==="blob"||e.type==="base64")}o(cE,"hasBlobOrBase64Type");function uE(e){return"b64_json"in e}o(uE,"hasB64Json");function lE(e){return"type"in e&&"result"in e&&e.type==="image_generation"}o(lE,"hasImageGenerationResult");function dE(e){return"uri"in e&&typeof e.uri=="string"&&e.uri.startsWith("data:")}o(dE,"hasDataUri");var Ar="[Blob substitute]",fE=["image_url","data","content","b64_json","result","uri","image"];function $r(e){const t={...e};Zn(t.source)&&(t.source=$r(t.source)),eh(e)&&(t.inlineData={...e.inlineData,data:Ar}),Zp(e)&&(t.image_url={...e.image_url,url:Ar}),th(e)&&(t.input_audio={...e.input_audio,data:Ar}),nh(e)&&(t.file={...e.file,file_data:Ar});for(const n of fE)typeof t[n]=="string"&&(t[n]=Ar);return t}o($r,"stripInlineMediaFromSingleMessage");var rh=2e4,ko=o(e=>new TextEncoder().encode(e).length,"utf8Bytes"),Rc=o(e=>ko(JSON.stringify(e)),"jsonBytes");function ls(e,t){if(ko(e)<=t)return e;let n=0,r=e.length,i="";for(;n<=r;){const s=Math.floor((n+r)/2),a=e.slice(0,s);ko(a)<=t?(i=a,n=s+1):r=s-1}return i}o(ls,"truncateTextByBytes");function pE(e){return typeof e=="string"?e:"text"in e&&typeof e.text=="string"?e.text:""}o(pE,"getItemText");function Sl(e,t){return typeof e=="string"?t:{...e,text:t}}o(Sl,"withItemText");function hE(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}o(hE,"isContentMessage");function ih(e){return e!==null&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)}o(ih,"isContentArrayMessage");function oh(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}o(oh,"isPartsMessage");function mE(e,t){const n={...e,content:""},r=t-Rc(n);if(r<=0)return[];const i=ls(e.content,r);return[{...e,content:i}]}o(mE,"truncateContentMessage");function gE(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:[]}}o(gE,"getArrayItems");function _E(e,t){const{key:n,items:r}=gE(e);if(n===null||r.length===0)return[];const i=r.map(c=>Sl(c,""));let s=t-Rc({...e,[n]:i});if(s<=0)return[];const a=[];for(const c of r){const u=pE(c),l=ko(u);if(l<=s)a.push(c),s-=l;else if(a.length===0){const f=ls(u,s);f&&a.push(Sl(c,f));break}else break}return a.length<=0?[]:[{...e,[n]:a}]}o(_E,"truncateArrayMessage");function yE(e,t){if(!e)return[];if(typeof e=="string"){const n=ls(e,t);return n?[n]:[]}return typeof e!="object"?[]:hE(e)?mE(e,t):ih(e)||oh(e)?_E(e,t):[]}o(yE,"truncateSingleMessage");function Ca(e){return e.map(t=>{let n;return t&&typeof t=="object"&&(ih(t)?n={...t,content:Ca(t.content)}:"content"in t&&Zn(t.content)&&(n={...t,content:$r(t.content)}),oh(t)&&(n={...n??t,parts:Ca(t.parts)}),Zn(n)?n=$r(n):Zn(t)&&(n=$r(t))),n??t})}o(Ca,"stripInlineMediaFromMessages");function vE(e,t){if(!Array.isArray(e)||e.length===0)return e;const n=t-2,r=e[e.length-1],i=Ca([r]),s=i[0];return Rc(s)<=n?i:yE(s,n)}o(vE,"truncateMessagesByBytes");function SE(e){return vE(e,rh)}o(SE,"truncateGenAiMessages");function bE(e){return ls(e,rh)}o(bE,"truncateGenAiStringInput");function Ln(e){const t=R()?.getDataCollectionOptions().genAI;return{...e,recordInputs:e?.recordInputs??t?.inputs??!1,recordOutputs:e?.recordOutputs??t?.outputs??!1}}o(Ln,"resolveAIRecordingOptions");function Lt(e){if(e!==void 0)return e;const t=R();return t?!Qe(t)&&t.getOptions().streamGenAiSpans===!1:!0}o(Lt,"shouldEnableTruncation");function sh(e,t){return e?`${e}.${t}`:t}o(sh,"buildMethodPath");function EE(e,t,n,r,i){if(t!==void 0&&e.setAttributes({[kn]:t}),n!==void 0&&e.setAttributes({[Rn]:n}),t!==void 0||n!==void 0||r!==void 0||i!==void 0){const s=(t??0)+(n??0)+(r??0)+(i??0);e.setAttributes({[Jt]:s})}}o(EE,"setTokenUsageAttributes");function ds(e,t,n){if(!e.isRecording())return;const r={[Jb]:!0};t.responseId&&(r[us]=t.responseId),t.responseModel&&(r[Tr]=t.responseModel),t.promptTokens!==void 0&&(r[kn]=t.promptTokens),t.completionTokens!==void 0&&(r[Rn]=t.completionTokens),t.totalTokens!==void 0?r[Jt]=t.totalTokens:(t.promptTokens!==void 0||t.completionTokens!==void 0||t.cacheCreationInputTokens!==void 0||t.cacheReadInputTokens!==void 0)&&(r[Jt]=(t.promptTokens??0)+(t.completionTokens??0)+(t.cacheCreationInputTokens??0)+(t.cacheReadInputTokens??0)),t.finishReasons.length&&(r[Jr]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(r[Nt]=t.responseTexts.join("")),n&&t.toolCalls.length&&(r[An]=JSON.stringify(t.toolCalls)),e.setAttributes(r),e.end()}o(ds,"endStreamSpan");function wr(e){if(typeof e=="string")return bE(e);try{return JSON.stringify(Array.isArray(e)?SE(e):e)}catch{return"[unserializable]"}}o(wr,"getTruncatedJsonString");function _i(e){if(!Array.isArray(e))return{systemInstructions:void 0,filteredMessages:e};const t=e.findIndex(i=>i&&typeof i=="object"&&"role"in i&&i.role==="system");if(t===-1)return{systemInstructions:void 0,filteredMessages:e};const n=e[t],r=typeof n.content=="string"?n.content:n.content!==void 0?JSON.stringify(n.content):void 0;return r?{systemInstructions:JSON.stringify([{type:"text",content:r}]),filteredMessages:[...e.slice(0,t),...e.slice(t+1)]}:{systemInstructions:void 0,filteredMessages:e}}o(_i,"extractSystemInstructions");async function TE(e,t,n){const r=e.catch(a=>{throw me(a,{mechanism:{handled:!1,type:n}}),a}),i=await t,s=await r;return s&&typeof s=="object"&&"data"in s?{...s,data:i}:i}o(TE,"createWithResponseWrapper");function Ro(e,t,n){return Mn(e)?new Proxy(e,{get(r,i){const s=i in Promise.prototype||i===Symbol.toStringTag?t:r,a=Reflect.get(s,i);return i==="withResponse"&&typeof a=="function"?o(function(){return TE(a.call(r),t,n)},"wrappedWithResponse"):typeof a=="function"?a.bind(s):a}}):t}o(Ro,"wrapPromiseWithMethods");var IE={"responses.create":{operation:"chat"},"chat.completions.create":{operation:"chat"},"embeddings.create":{operation:"embeddings"},"conversations.create":{operation:"chat"}},wE=["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"],kE=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...wE];function RE(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}o(RE,"isResponsesApiStreamEvent");function CE(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}o(CE,"isChatCompletionChunk");function AE(e,t,n){if(!t||typeof t!="object")return;const r=t,i={};if(typeof r.id=="string"&&(i[us]=r.id),typeof r.model=="string"&&(i[Tr]=r.model),r.object==="conversation"&&typeof r.id=="string"&&(i[wc]=r.id),r.usage&&typeof r.usage=="object"){const s=r.usage,a=s.prompt_tokens??s.input_tokens;typeof a=="number"&&(i[kn]=a);const c=s.completion_tokens??s.output_tokens;typeof c=="number"&&(i[Rn]=c),typeof s.total_tokens=="number"&&(i[Jt]=s.total_tokens)}if(Array.isArray(r.choices)){const s=r.choices,a=s.map(c=>c.finish_reason).filter(c=>typeof c=="string");if(a.length>0&&(i[Jr]=JSON.stringify(a)),n){const c=s.map(l=>l.message?.content||"");i[Nt]=JSON.stringify(c);const u=s.map(l=>l.message?.tool_calls).filter(l=>Array.isArray(l)&&l.length>0).flat();u.length>0&&(i[An]=JSON.stringify(u))}}if(typeof r.status=="string"&&(i["gen_ai.response.finish_reasons"]||(i[Jr]=JSON.stringify([r.status]))),n&&(typeof r.output_text=="string"&&!i["gen_ai.response.text"]&&(i[Nt]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!i["gen_ai.response.tool_calls"])){const s=r.output.filter(a=>a?.type==="function_call");s.length>0&&(i[An]=JSON.stringify(s))}e.setAttributes(i)}o(AE,"addResponseAttributes$2");function ME(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}o(ME,"extractConversationId");function NE(e){const t={[Je]:e.model??"unknown"};"temperature"in e&&(t[ss]=e.temperature),"top_p"in e&&(t[cs]=e.top_p),"frequency_penalty"in e&&(t[as]=e.frequency_penalty),"presence_penalty"in e&&(t[Ic]=e.presence_penalty),"stream"in e&&(t[Ec]=e.stream),"encoding_format"in e&&(t[Vp]=e.encoding_format),"dimensions"in e&&(t[Yp]=e.dimensions);const n=ME(e);return n&&(t[wc]=n),t}o(NE,"extractRequestParameters");function xE(e,t){for(const n of e){const r=n.index;if(!(r===void 0||!n.function))if(!(r in t.chatCompletionToolCalls))t.chatCompletionToolCalls[r]={...n,function:{name:n.function.name,arguments:n.function.arguments||""}};else{const i=t.chatCompletionToolCalls[r];n.function.arguments&&i?.function&&(i.function.arguments+=n.function.arguments)}}}o(xE,"processChatCompletionToolCalls");function OE(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(const r of e.choices??[])n&&(r.delta?.content&&t.responseTexts.push(r.delta.content),r.delta?.tool_calls&&xE(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}o(OE,"processChatCompletionChunk");function LE(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"}),me(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;const i=e;if(!kE.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){const{response:s}=i;t.responseId=s.id??t.responseId,t.responseModel=s.model??t.responseModel,s.usage&&(t.promptTokens=s.usage.input_tokens,t.completionTokens=s.usage.output_tokens,t.totalTokens=s.usage.total_tokens),s.status&&t.finishReasons.push(s.status),n&&s.output_text&&t.responseTexts.push(s.output_text)}}o(LE,"processResponsesApiEvent");async function*PE(e,t,n){const r={eventTypes:[],responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,totalTokens:void 0,chatCompletionToolCalls:{},responsesApiToolCalls:[]};try{for await(const i of e)CE(i)?OE(i,r,n):RE(i)&&LE(i,r,n,t),yield i}finally{const i=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];ds(t,{...r,toolCalls:i},n)}}o(PE,"instrumentStream$1");function DE(e){const 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}]:[],r=[...t,...n];if(r.length!==0)try{return JSON.stringify(r)}catch(i){I&&g.error("Failed to serialize OpenAI tools:",i);return}}o(DE,"extractAvailableTools");function FE(e,t){const n={[pi]:"openai",[st]:t,[re]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0],i=DE(r);i&&(n[mi]=i),Object.assign(n,NE(r))}else n[Je]="unknown";return n}o(FE,"extractRequestAttributes$2");function bl(e,t,n,r){if(n==="embeddings"&&"input"in t){const c=t.input;if(c==null||typeof c=="string"&&c.length===0||Array.isArray(c)&&c.length===0)return;e.setAttribute(kc,typeof c=="string"?c:JSON.stringify(c));return}const i="input"in t?t.input:"messages"in t?t.messages:void 0;if(!i||Array.isArray(i)&&i.length===0)return;const{systemInstructions:s,filteredMessages:a}=_i(i);s&&e.setAttribute(hi,s),e.setAttribute(Ir,r?wr(a):We(a)),Array.isArray(a)?e.setAttribute(Cn,a.length):e.setAttribute(Cn,1)}o(bl,"addRequestAttributes");function $E(e,t,n,r,i){return o(function(...a){const c=n.operation||"unknown",u=FE(a,c),l=u["gen_ai.request.model"]||"unknown",f=a[0],d=f&&typeof f=="object"&&f.stream===!0,p={name:`${c} ${l}`,op:`gen_ai.${c}`,attributes:u};if(d){let _;const y=jt(p,v=>(_=e.apply(r,a),i.recordInputs&&f&&bl(v,f,c,Lt(i.enableTruncation)),(async()=>{try{const S=await _;return PE(S,v,i.recordOutputs??!1)}catch(S){throw v.setStatus({code:2,message:"internal_error"}),me(S,{mechanism:{handled:!1,type:"auto.ai.openai.stream",data:{function:t}}}),v.end(),S}})()));return Ro(_,y,"auto.ai.openai")}let h;const m=Ft(p,_=>(h=e.apply(r,a),i.recordInputs&&f&&bl(_,f,c,Lt(i.enableTruncation)),h.then(y=>(AE(_,y,i.recordOutputs),y),y=>{throw me(y,{mechanism:{handled:!1,type:"auto.ai.openai",data:{function:t}}}),y})));return Ro(h,m,"auto.ai.openai")},"instrumentedCall")}o($E,"instrumentMethod$2");function ah(e,t="",n){return new Proxy(e,{get(r,i){const s=r[i],a=sh(t,String(i)),c=IE[a];return typeof s=="function"&&c?$E(s,a,c,r,n):typeof s=="function"?s.bind(r):s&&typeof s=="object"?ah(s,a,n):s}})}o(ah,"createDeepProxy$1");function Ux(e,t){return ah(e,"",Ln(t))}o(Ux,"instrumentOpenAiClient");var El={"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 BE(e,t,n){if(Array.isArray(t)&&t.length===0)return;const{systemInstructions:r,filteredMessages:i}=_i(t);r&&e.setAttributes({[hi]:r});const s=Array.isArray(i)?i.length:1;e.setAttributes({[Ir]:n?wr(i):We(i),[Cn]:s})}o(BE,"setMessagesAttribute");var UE={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 ch(e){return e&&UE[e]||"internal_error"}o(ch,"mapAnthropicErrorToStatusMessage");function HE(e,t){t.error&&(e.setStatus({code:2,message:ch(t.error.type)}),me(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}o(HE,"handleResponseError");function WE(e){const{system:t,messages:n,input:r}=e,i=typeof t=="string"?[{role:"system",content:e.system}]:[],s=(Array.isArray(r)?r:r!=null?[r]:void 0)??(Array.isArray(n)?n:n!=null?[n]:[]);return[...i,...s]}o(WE,"messagesFromParams");function jE(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:2,message:ch(e.error?.type)}),me(e.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}),!0):!1}o(jE,"isErrorEvent$1");function qE(e,t){if(e.type==="message_delta"&&(e.usage&&typeof e.usage.output_tokens=="number"&&(t.completionTokens=e.usage.output_tokens),e.delta?.stop_reason&&t.finishReasons.push(e.delta.stop_reason)),e.message){const n=e.message;n.id&&(t.responseId=n.id),n.model&&(t.responseModel=n.model),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))}}o(qE,"handleMessageMetadata");function zE(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:[]})}o(zE,"handleContentBlockStart");function GE(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"){const r=t.activeToolBlocks[e.index];r&&r.inputJsonParts.push(e.delta.partial_json)}n&&typeof e.delta.text=="string"&&t.responseTexts.push(e.delta.text)}}o(GE,"handleContentBlockDelta");function VE(e,t){if(e.type!=="content_block_stop"||typeof e.index!="number")return;const n=t.activeToolBlocks[e.index];if(!n)return;const r=n.inputJsonParts.join("");let 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]}o(VE,"handleContentBlockStop");function uh(e,t,n,r){e&&typeof e=="object"&&(jE(e,r)||(qE(e,t),zE(e,t),GE(e,t,n),VE(e,t)))}o(uh,"processEvent");async function*YE(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};try{for await(const i of e)uh(i,r,n,t),yield i}finally{ds(t,r,n)}}o(YE,"instrumentAsyncIterableStream");function JE(e,t,n){const r={responseTexts:[],finishReasons:[],responseId:"",responseModel:"",promptTokens:void 0,completionTokens:void 0,cacheCreationInputTokens:void 0,cacheReadInputTokens:void 0,toolCalls:[],activeToolBlocks:{}};return e.on("streamEvent",i=>{uh(i,r,n,t)}),e.on("message",()=>{ds(t,r,n)}),e.on("error",i=>{me(i,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:2,message:"internal_error"}),t.end())}),e}o(JE,"instrumentMessageStream");var Zi=!1,Tl=new WeakSet;function KE(e,t,n){const r={[pi]:"anthropic",[st]:n,[re]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const i=e[0];i.tools&&Array.isArray(i.tools)&&(r[mi]=JSON.stringify(i.tools)),r[Je]=i.model??"unknown","temperature"in i&&(r[ss]=i.temperature),"top_p"in i&&(r[cs]=i.top_p),"stream"in i&&(r[Ec]=i.stream),"top_k"in i&&(r[Gp]=i.top_k),"frequency_penalty"in i&&(r[as]=i.frequency_penalty),"max_tokens"in i&&(r[Tc]=i.max_tokens)}else t==="models.retrieve"||t==="models.get"?r[Je]=e[0]:r[Je]="unknown";return r}o(KE,"extractRequestAttributes$1");function Aa(e,t,n){const r=WE(t);BE(e,r,n),"prompt"in t&&e.setAttributes({[Vb]:JSON.stringify(t.prompt)})}o(Aa,"addPrivateRequestAttributes$1");function XE(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[Nt]:t.content.map(r=>r.text).filter(r=>!!r).join("")});const n=[];for(const r of t.content)(r.type==="tool_use"||r.type==="server_tool_use")&&n.push(r);n.length>0&&e.setAttributes({[An]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[Nt]:t.completion}),"input_tokens"in t&&e.setAttributes({[Nt]:JSON.stringify(t.input_tokens)})}o(XE,"addContentAttributes");function QE(e,t){"id"in t&&"model"in t&&(e.setAttributes({[us]:t.id,[Tr]:t.model}),"usage"in t&&t.usage&&EE(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}o(QE,"addMetadataAttributes");function ZE(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){HE(e,t);return}n&&XE(e,t),QE(e,t)}}o(ZE,"addResponseAttributes$1");function Il(e,t,n){throw me(e,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:n}}}),t.isRecording()&&(t.setStatus({code:2,message:"internal_error"}),t.end()),e}o(Il,"handleStreamingError");function eT(e,t,n,r,i,s,a,c,u,l){const f={name:`${i} ${r["gen_ai.request.model"]??"unknown"}`,op:`gen_ai.${i}`,attributes:r};if(u&&!l){let d;const p=jt(f,h=>(d=e.apply(t,n),c.recordInputs&&a&&Aa(h,a,Lt(c.enableTruncation)),(async()=>{try{const m=await d;return YE(m,h,c.recordOutputs??!1)}catch(m){return Il(m,h,s)}})()));return Ro(d,p,"auto.ai.anthropic")}else return jt(f,d=>{try{c.recordInputs&&a&&Aa(d,a,Lt(c.enableTruncation)),Zi=!0;const p=e.apply(t,n);return Zi=!1,JE(p,d,c.recordOutputs??!1)}catch(p){return Zi=!1,Il(p,d,s)}})}o(eT,"handleStreamingRequest");function tT(e,t,n,r,i){return new Proxy(e,{apply(s,a,c){const u=a!==void 0?a:r,l=n.streaming===!0;if(!l&&Zi)return s.apply(u,c);const f=n.operation||"unknown",d=KE(c,t,f),p=d["gen_ai.request.model"]??"unknown",h=typeof c[0]=="object"?c[0]:void 0,m=!!h?.stream;if(m||l)return eT(s,u,c,d,f,t,h,i,m,l);let _;const y=Ft({name:`${f} ${p}`,op:`gen_ai.${f}`,attributes:d},v=>(_=s.apply(u,c),i.recordInputs&&h&&Aa(v,h,Lt(i.enableTruncation)),_.then(S=>(ZE(v,S,i.recordOutputs),S),S=>{throw me(S,{mechanism:{handled:!1,type:"auto.ai.anthropic",data:{function:t}}}),S})));return Ro(_,y,"auto.ai.anthropic")}})}o(tT,"instrumentMethod$1");function nT(e,t){for(const n of Object.keys(El)){const r=n.split("."),i=r.pop();let s=e;for(const u of r)s=s?.[u];if(!s||typeof s[i]!="function")continue;const a=s[i];if(Tl.has(a))continue;const c=tT(a,n,El[n],s,t);Tl.add(c),s[i]=c}return e}o(nT,"instrumentClientInPlace");function Hx(e,t){return nT(e,Ln(t))}o(Hx,"instrumentAnthropicAiClient");var rT={"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}},iT="google_genai";function oT(e,t){const n=e?.promptFeedback;if(n?.blockReason){const r=n.blockReasonMessage??n.blockReason;return t.setStatus({code:2,message:"internal_error"}),me(`Content blocked: ${r}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}o(oT,"isErrorChunk");function sT(e,t){typeof e.responseId=="string"&&(t.responseId=e.responseId),typeof e.modelVersion=="string"&&(t.responseModel=e.modelVersion);const 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))}o(sT,"handleResponseMetadata");function aT(e,t,n){Array.isArray(e.functionCalls)&&t.toolCalls.push(...e.functionCalls);for(const r of e.candidates??[]){r?.finishReason&&!t.finishReasons.includes(r.finishReason)&&t.finishReasons.push(r.finishReason);for(const i of r?.content?.parts??[])n&&i.text&&t.responseTexts.push(i.text),i.functionCall&&t.toolCalls.push({type:"function",id:i.functionCall.id,name:i.functionCall.name,arguments:i.functionCall.args})}}o(aT,"handleCandidateContent");function cT(e,t,n,r){!e||oT(e,r)||(sT(e,t),aT(e,t,n))}o(cT,"processChunk");async function*uT(e,t,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(const i of e)cT(i,r,n,t),yield i}finally{ds(t,r,n)}}o(uT,"instrumentStream");function Lr(e,t="user"){return typeof e=="string"?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(n=>Lr(n,t)):typeof e!="object"||!e?[]:"role"in e&&typeof e.role=="string"?[e]:"parts"in e?[{...e,role:t}]:[{role:t,content:e}]}o(Lr,"contentUnionToMessages");function wl(e,t){if("model"in e&&typeof e.model=="string")return e.model;if(t&&typeof t=="object"){const n=t;if("model"in n&&typeof n.model=="string")return n.model;if("modelVersion"in n&&typeof n.modelVersion=="string")return n.modelVersion}return"unknown"}o(wl,"extractModel");function lT(e){const t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[ss]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[cs]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[Gp]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[Tc]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[as]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[Ic]=e.presencePenalty),t}o(lT,"extractConfigAttributes");function dT(e,t,n){const r={[pi]:iT,[st]:e,[re]:"auto.ai.google_genai"};if(t){if(r[Je]=wl(t,n),"config"in t&&typeof t.config=="object"&&t.config){const i=t.config;if(Object.assign(r,lT(i)),"tools"in i&&Array.isArray(i.tools)){const s=i.tools.flatMap(a=>a.functionDeclarations);r[mi]=JSON.stringify(s)}}}else r[Je]=wl({},n);return r}o(dT,"extractRequestAttributes");function kl(e,t,n,r){if(n==="embeddings"){const s=t.contents;s!=null&&e.setAttribute(kc,typeof s=="string"?s:JSON.stringify(s));return}const i=[];if("config"in t&&t.config&&typeof t.config=="object"&&"systemInstruction"in t.config&&t.config.systemInstruction&&i.push(...Lr(t.config.systemInstruction,"system")),"history"in t&&i.push(...Lr(t.history,"user")),"contents"in t&&i.push(...Lr(t.contents,"user")),"message"in t&&i.push(...Lr(t.message,"user")),Array.isArray(i)&&i.length){const{systemInstructions:s,filteredMessages:a}=_i(i);s&&e.setAttribute(hi,s);const c=Array.isArray(a)?a.length:0;e.setAttributes({[Cn]:c,[Ir]:r?wr(a):We(a)})}}o(kl,"addPrivateRequestAttributes");function fT(e,t,n){if(!(!t||typeof t!="object")){if(t.modelVersion&&e.setAttribute(Tr,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata=="object"){const r=t.usageMetadata;typeof r.promptTokenCount=="number"&&e.setAttributes({[kn]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[Rn]:r.candidatesTokenCount}),typeof r.totalTokenCount=="number"&&e.setAttributes({[Jt]:r.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){const r=t.candidates.map(i=>i.content?.parts&&Array.isArray(i.content.parts)?i.content.parts.map(s=>typeof s.text=="string"?s.text:"").filter(s=>s.length>0).join(""):"").filter(i=>i.length>0);r.length>0&&e.setAttributes({[Nt]:r.join("")})}if(n&&t.functionCalls){const r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[An]:JSON.stringify(r)})}}}o(fT,"addResponseAttributes");function pT(e,t,n,r,i){const s=n.operation==="embeddings";return new Proxy(e,{apply(a,c,u){const l=n.operation||"unknown",f=u[0],d=dT(l,f,r),p=d["gen_ai.request.model"]??"unknown";return n.streaming?jt({name:`${l} ${p}`,op:`gen_ai.${l}`,attributes:d},async h=>{try{i.recordInputs&&f&&kl(h,f,l,Lt(i.enableTruncation));const m=await a.apply(r,u);return uT(m,h,!!i.recordOutputs)}catch(m){throw h.setStatus({code:2,message:"internal_error"}),me(m,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}}),h.end(),m}}):Ft({name:`${l} ${p}`,op:`gen_ai.${l}`,attributes:d},h=>(i.recordInputs&&f&&kl(h,f,l,Lt(i.enableTruncation)),cc(()=>a.apply(r,u),m=>{me(m,{mechanism:{handled:!1,type:"auto.ai.google_genai",data:{function:t}}})},()=>{},m=>{s||fT(h,m,i.recordOutputs)})))}})}o(pT,"instrumentMethod");function Ma(e,t="",n){return new Proxy(e,{get:o((r,i,s)=>{const a=Reflect.get(r,i,s),c=sh(t,String(i)),u=rT[c];if(typeof a=="function"&&u){const l=u.operation?pT(a,c,u,r,n):a.bind(r);return u.proxyResultPath?function(...f){const d=l(...f);return d&&typeof d=="object"?Ma(d,u.proxyResultPath,n):d}:l}return typeof a=="function"?a.bind(r):a&&typeof a=="object"?Ma(a,c,n):a},"get")})}o(Ma,"createDeepProxy");function Wx(e,t){return Ma(e,"",Ln(t))}o(Wx,"instrumentGoogleGenAIClient");var Gn="auto.ai.langchain",hT={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"},ze=o((e,t,n)=>{n!=null&&(e[t]=n)},"setIfDefined"),Be=o((e,t,n)=>{const r=Number(n);Number.isNaN(r)||(e[t]=r)},"setNumberIfDefined");function Hn(e){if(Array.isArray(e))try{const t=e.map(n=>n&&typeof n=="object"&&Zn(n)?$r(n):n);return JSON.stringify(t)}catch{return String(e)}return We(e,String)}o(Hn,"normalizeContent");function Mr(e){const t=e.toLowerCase();return hT[t]??t}o(Mr,"normalizeMessageRole");function Rl(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"}o(Rl,"normalizeRoleNameFromCtor");function Cl(e){if(!(!e||Array.isArray(e)))return e.invocation_params}o(Cl,"getInvocationParams");function Cc(e){return e.map(t=>{const n=t._getType;if(typeof n=="function")return{role:Mr(n.call(t)),content:Hn(t.content)};if(t.lc===1&&t.kwargs){const i=t.id,s=Array.isArray(i)&&i.length>0?i[i.length-1]:"";return{role:Mr(typeof s=="string"?Rl(s):"user"),content:Hn(t.kwargs?.content)}}if(t.type)return{role:Mr(String(t.type).toLowerCase()),content:Hn(t.content)};if(t.role)return{role:Mr(String(t.role)),content:Hn(t.content)};const r=t.constructor?.name;return r&&r!=="Object"?{role:Mr(Rl(r)),content:Hn(t.content)}:{role:"user",content:Hn(t.content)}})}o(Cc,"normalizeLangChainMessages");function mT(e,t,n){const r={},i="kwargs"in e?e.kwargs:void 0,s=t?.temperature??n?.ls_temperature??i?.temperature;Be(r,ss,s);const a=t?.max_tokens??n?.ls_max_tokens??i?.max_tokens;Be(r,Tc,a);const c=t?.top_p??i?.top_p;Be(r,cs,c);const u=t?.frequency_penalty;Be(r,as,u);const l=t?.presence_penalty;return Be(r,Ic,l),t&&"stream"in t&&ze(r,Ec,!!t.stream),r}o(mT,"extractCommonRequestAttributes");function lh(e,t,n,r,i){return{[pi]:We(e??"langchain",String),[st]:"chat",[Je]:We(t,String),[re]:Gn,...mT(n,r,i)}}o(lh,"baseRequestAttributes");function gT(e,t,n,r,i,s){const a=s?.ls_provider,c=lh(a,i?.model??s?.ls_model_name??"unknown",e,i,s);if(n&&Array.isArray(t)&&t.length>0){ze(c,Cn,t.length);const u=t.map(l=>({role:"user",content:l}));ze(c,Ir,r?wr(u):We(u))}return c}o(gT,"extractLLMRequestAttributes");function _T(e,t,n,r,i,s){const a=lh(s?.ls_provider??e.id?.[2],i?.model??s?.ls_model_name??"unknown",e,i,s);if(n&&Array.isArray(t)&&t.length>0){const c=Cc(t.flat()),{systemInstructions:u,filteredMessages:l}=_i(c);u&&ze(a,hi,u);const f=Array.isArray(l)?l.length:0;ze(a,Cn,f),ze(a,Ir,r?wr(l):We(l))}return a}o(_T,"extractChatModelRequestAttributes");function yT(e,t){const n=[],r=e.flat();for(const i of r){const s=i.message?.tool_calls;if(Array.isArray(s)&&s.length>0)n.push(...s);else{const a=i.message?.content;if(Array.isArray(a))for(const c of a){const u=c;u.type==="tool_use"&&n.push(u)}}}n.length>0&&ze(t,An,We(n,String))}o(yT,"addToolCallsAttributes");function vT(e,t){if(!e)return;const n=e.tokenUsage,r=e.usage;if(n)Be(t,kn,n.promptTokens),Be(t,Rn,n.completionTokens),Be(t,Jt,n.totalTokens);else if(r){Be(t,kn,r.input_tokens),Be(t,Rn,r.output_tokens);const i=Number(r.input_tokens),s=Number(r.output_tokens),a=(Number.isNaN(i)?0:i)+(Number.isNaN(s)?0:s);a>0&&Be(t,Jt,a),r.cache_creation_input_tokens!==void 0&&Be(t,Xb,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&Be(t,Qb,r.cache_read_input_tokens)}}o(vT,"addTokenUsageAttributes");function ST(e,t){if(!e)return;const n={};if(Array.isArray(e.generations)){const u=e.generations.flat().map(l=>l.generationInfo?.finish_reason?l.generationInfo.finish_reason:l.generation_info?.finish_reason?l.generation_info.finish_reason:null).filter(l=>typeof l=="string");if(u.length>0&&ze(n,Jr,We(u,String)),yT(e.generations,n),t){const l=e.generations.flat().map(f=>f.text??f.message?.content).filter(f=>typeof f=="string");l.length>0&&ze(n,Nt,We(l,String))}}vT(e.llmOutput,n);const r=e.llmOutput,i=e.generations?.[0]?.[0]?.message,s=r?.model_name??r?.model??i?.response_metadata?.model_name;s&&ze(n,Tr,s);const a=r?.id??i?.id;a&&ze(n,us,a);const c=r?.stop_reason??i?.response_metadata?.finish_reason;return c&&ze(n,Yb,We(c,String)),n}o(ST,"extractLlmResponseAttributes");function Gs(e){const t={},n=e?.lc_agent_name;return typeof n=="string"&&(t[gi]=n),t}o(Gs,"getAgentNameFromMetadata");function bT(e){const t=e?.invocation_params?.tools??e?.options?.tools;if(!Array.isArray(t)||t.length===0)return;const n=t.map(r=>{const i=r.function;return{type:"function",name:r.name??i?.name??"",description:r.description??i?.description}});return JSON.stringify(n)}o(bT,"extractToolDefinitions");function ET(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.addHandler=="function"&&typeof t.copy=="function"}o(ET,"isCallbackManager");function TT(e){return typeof e=="object"&&e?.name==="SentryCallbackHandler"}o(TT,"isSentryHandler");function Al(e){return e.some(TT)}o(Al,"containsSentryHandler");function IT(e,t){if(!e)return[t];if(ET(e)){if(Al(e.handlers??[]))return e;const r=e.copy();return r.addHandler(t,!0),r}const n=Array.isArray(e)?e:[e];return Al(n)?e:[...n,t]}o(IT,"_INTERNAL_mergeLangChainCallbackHandler");function dh(e={}){const{recordInputs:t,recordOutputs:n}=Ln(e),r=Lt(e.enableTruncation),i=new Map,s=o(c=>{const u=i.get(c);u?.isRecording()&&(u.end(),i.delete(c))},"exitSpan"),a={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(c,u,l,f,d,p,h,m){const _=Cl(p),y=gT(c,u,t,r,_,h),v=y[Je],S=y[st];jt({name:`${S} ${v}`,op:"gen_ai.chat",attributes:{...Gs(h),...y,[ve]:"gen_ai.chat"}},k=>(i.set(l,k),k))},handleChatModelStart(c,u,l,f,d,p,h,m){const _=Cl(p),y=_T(c,u,t,r,_,h),v=bT(d);v&&(y[mi]=v);const S=y[Je],k=y[st];jt({name:`${k} ${S}`,op:"gen_ai.chat",attributes:{...Gs(h),...y,[ve]:"gen_ai.chat"}},w=>(i.set(l,w),w))},handleLLMEnd(c,u,l,f,d){const p=i.get(u);if(p?.isRecording()){const h=ST(c,n);h&&p.setAttributes(h),s(u)}},handleLLMError(c,u){const l=i.get(u);l?.isRecording()&&(l.setStatus({code:2,message:"internal_error"}),s(u)),me(c,{mechanism:{handled:!1,type:`${Gn}.llm_error_handler`}})},handleChainStart(c,u,l,f,d,p,h,m){if(p?.__sentry_langgraph__)return;const _=m||c.name||"unknown_chain",y={[re]:"auto.ai.langchain","langchain.chain.name":_};t&&(y["langchain.chain.inputs"]=JSON.stringify(u)),jt({name:`chain ${_}`,op:"gen_ai.invoke_agent",attributes:{...y,[ve]:"gen_ai.invoke_agent"}},v=>(i.set(l,v),v))},handleChainEnd(c,u){const l=i.get(u);l?.isRecording()&&(n&&l.setAttributes({"langchain.chain.outputs":JSON.stringify(c)}),s(u))},handleChainError(c,u){const l=i.get(u);l?.isRecording()&&(l.setStatus({code:2,message:"internal_error"}),s(u)),me(c,{mechanism:{handled:!1,type:`${Gn}.chain_error_handler`}})},handleToolStart(c,u,l,f,d,p,h){if(p?.__sentry_langgraph__)return;const m=h||c.name||"unknown_tool",_={...Gs(p),[re]:Gn,[st]:"execute_tool",[Kp]:m};t&&(_[Xp]=u),jt({name:`execute_tool ${m}`,op:"gen_ai.execute_tool",attributes:{..._,[ve]:"gen_ai.execute_tool"}},y=>(i.set(l,y),y))},handleToolEnd(c,u){const l=i.get(u);if(l?.isRecording()){if(n){const f=c,d=f&&typeof f=="object"&&"content"in f?f.content:c;l.setAttributes({[Qp]:typeof d=="string"?d:JSON.stringify(d)})}s(u)}},handleToolError(c,u){const l=i.get(u);l?.isRecording()&&(l.setStatus({code:2,message:"internal_error"}),s(u)),me(c,{mechanism:{handled:!1,type:`${Gn}.tool_error_handler`}})},copy(){return a},toJSON(){return{lc:1,type:"not_implemented",id:a.lc_id}},toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:a.lc_id}}};return a}o(dh,"createLangChainCallbackHandler");function wT(e){const 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"}o(wT,"inferSystemFromInstance");function kT(e){const t=e??{},n={[re]:Gn,[ve]:Jp,[st]:"embeddings",[Je]:t.model??"unknown"};return n[pi]=wT(t),"dimensions"in t&&(n[Yp]=t.dimensions),"encodingFormat"in t&&(n[Vp]=t.encodingFormat),n}o(kT,"extractEmbeddingAttributes");function RT(e,t,n={}){const{recordInputs:r}=Ln(n),i=kT(e),s=i["gen_ai.request.model"]||"unknown";return r&&t!=null&&(i[kc]=typeof t=="string"?t:JSON.stringify(t)),{name:`embeddings ${s}`,op:Jp,attributes:i}}o(RT,"_INTERNAL_getLangChainEmbeddingsSpanOptions");function Ml(e,t={}){return new Proxy(e,{apply(n,r,i){return Ft(RT(r,i[0],t),()=>Reflect.apply(n,r,i).then(void 0,s=>{throw me(s,{mechanism:{handled:!1,type:"auto.ai.langchain"}}),s}))}})}o(Ml,"instrumentEmbeddingMethod");function jx(e,t){const n=e;return typeof n.embedQuery=="function"&&(n.embedQuery=Ml(n.embedQuery,t)),typeof n.embedDocuments=="function"&&(n.embedDocuments=Ml(n.embedDocuments,t)),e}o(jx,"instrumentLangChainEmbeddings");var Ac="auto.ai.langgraph";function CT(e){const t=e[0];if(typeof t!="object"||!t||!("llm"in t)||!t.llm||typeof t.llm!="object")return null;const n=t.llm;return typeof n.modelName!="string"&&typeof n.model!="string"?null:n}o(CT,"extractLLMFromParams");function AT(e){const t=e[0];return typeof t=="object"&&t&&"name"in t&&typeof t.name=="string"?t.name:null}o(AT,"extractAgentNameFromParams");function MT(e,t,n){const r="__sentry_tool_wrapped__";for(const i of e){if(!i||typeof i!="object")continue;const s=i,a=s.invoke;if(typeof a!="function"||Object.prototype.hasOwnProperty.call(s,r))continue;const c=typeof s.name=="string"?s.name:"unknown_tool",u=typeof s.description=="string"?s.description:void 0;s.invoke=new Proxy(a,{apply(l,f,d){const p={[re]:Ac,[ve]:vl,[st]:"execute_tool",[Kp]:c,[tE]:"function"},h=d[1]?.metadata?.lc_agent_name??n;typeof h=="string"&&(p[gi]=h),u&&(p[nE]=u);const m=d[0];if(typeof m=="object"&&m&&("id"in m&&typeof m.id=="string"&&(p[eE]=m.id),t.recordInputs)){const _="args"in m&&typeof m.args=="object"?m.args:m;try{p[Xp]=JSON.stringify(_)}catch{}}return Ft({op:vl,name:`execute_tool ${c}`,attributes:p},async _=>{try{const y=await Reflect.apply(l,f,d);if(t.recordOutputs)try{const v=y,S=v&&typeof v=="object"&&"content"in v?v.content:y;_.setAttribute(Qp,typeof S=="string"?S:JSON.stringify(S))}catch{}return y}catch(y){throw _.setStatus({code:2,message:"internal_error"}),me(y,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),y}})}}),Object.defineProperty(s,r,{value:!0,enumerable:!1})}return e}o(MT,"wrapToolsWithSpans");function NT(e){if(!e||e.length===0)return null;const t=[];for(const n of e)if(n&&typeof n=="object"){const r=n.tool_calls;r&&Array.isArray(r)&&t.push(...r)}return t.length>0?t:null}o(NT,"extractToolCalls");function xT(e){const t=e;let n=0,r=0,i=0;if(t.usage_metadata&&typeof t.usage_metadata=="object"){const s=t.usage_metadata;return typeof s.input_tokens=="number"&&(n=s.input_tokens),typeof s.output_tokens=="number"&&(r=s.output_tokens),typeof s.total_tokens=="number"&&(i=s.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:i}}if(t.response_metadata&&typeof t.response_metadata=="object"){const s=t.response_metadata;if(s.tokenUsage&&typeof s.tokenUsage=="object"){const a=s.tokenUsage;typeof a.promptTokens=="number"&&(n=a.promptTokens),typeof a.completionTokens=="number"&&(r=a.completionTokens),typeof a.totalTokens=="number"&&(i=a.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:i}}o(xT,"extractTokenUsageFromMessage");function OT(e,t){const n=t;if(n.response_metadata&&typeof n.response_metadata=="object"){const r=n.response_metadata;r.model_name&&typeof r.model_name=="string"&&e.setAttribute(Tr,r.model_name),r.finish_reason&&typeof r.finish_reason=="string"&&e.setAttribute(Jr,[r.finish_reason])}}o(OT,"extractModelMetadata");function LT(e){if(!e.builder?.nodes?.tools?.runnable?.tools)return null;const t=e.builder?.nodes?.tools?.runnable?.tools;return!t||!Array.isArray(t)||t.length===0?null:t.map(n=>({name:n.lc_kwargs?.name,description:n.lc_kwargs?.description,schema:n.lc_kwargs?.schema}))}o(LT,"extractToolsFromCompiledGraph");function PT(e,t,n){const r=n?.messages;if(!r||!Array.isArray(r))return;const i=t?.length??0,s=r.length>i?r.slice(i):[];if(s.length===0)return;const a=NT(s);a&&e.setAttribute(An,JSON.stringify(a));const c=Cc(s);e.setAttribute(Nt,JSON.stringify(c));let u=0,l=0,f=0;for(const d of s){const p=xT(d);u+=p.inputTokens,l+=p.outputTokens,f+=p.totalTokens,OT(e,d)}u>0&&e.setAttribute(kn,u),l>0&&e.setAttribute(Rn,l),f>0&&e.setAttribute(Jt,f)}o(PT,"setResponseAttributes");var Na=!1,Co="__sentry_patched__";function DT(e){const t={[re]:Ac,[ve]:"gen_ai.create_agent",[st]:"create_agent"};return e&&(t[gi]=e),{op:"gen_ai.create_agent",name:e?`create_agent ${e}`:"create_agent",attributes:t}}o(DT,"_INTERNAL_getLangGraphCreateAgentSpanOptions");function FT(e,t){if(Object.prototype.hasOwnProperty.call(e,Co))return e;const n=dh(t),r=new Proxy(e,{apply(i,s,a){return Na?Reflect.apply(i,s,a):Ft(DT(),c=>{try{const u=Reflect.apply(i,s,a),l=a.length>0?a[0]:{};l?.name&&typeof l.name=="string"&&(c.setAttribute(gi,l.name),c.updateName(`create_agent ${l.name}`));const f=u.invoke;return f&&typeof f=="function"&&(u.invoke=fh(f.bind(u),u,l,t,void 0,n)),u}catch(u){throw c.setStatus({code:2,message:"internal_error"}),me(u,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),u}})}});return Object.defineProperty(r,Co,{value:!0,enumerable:!1}),r}o(FT,"instrumentStateGraphCompile");function fh(e,t,n,r,i,s){return new Proxy(e,{apply(a,c,u){const l=i?.modelName??i?.model;return Ft({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[re]:Ac,[ve]:Zb,[st]:"invoke_agent"}},async f=>{try{const d=n?.name;d&&typeof d=="string"&&(f.setAttribute(Kb,d),f.setAttribute(gi,d),f.updateName(`invoke_agent ${d}`)),l&&f.setAttribute(Je,l);const p=(u.length>1?u[1]:void 0)?.configurable?.thread_id;if(p&&typeof p=="string"&&f.setAttribute(wc,p),s){const S=u[1]??{};u[1]=S,S.metadata={...S.metadata??{},__sentry_langgraph__:!0,...typeof d=="string"?{lc_agent_name:d}:{}},S.callbacks=IT(S.callbacks,s)}const h=LT(t);h&&f.setAttribute(mi,JSON.stringify(h));const m=r.recordInputs,_=r.recordOutputs,y=u.length>0?u[0]?.messages??[]:[];if(y&&m){const S=Cc(y),{systemInstructions:k,filteredMessages:w}=_i(S);k&&f.setAttribute(hi,k);const x=Lt(r.enableTruncation),C=Array.isArray(w)?w.length:0;f.setAttributes({[Ir]:x?wr(w):We(w),[Cn]:C})}const v=await Reflect.apply(a,c,u);return _&&PT(f,y??null,v),v}catch(d){throw f.setStatus({code:2,message:"internal_error"}),me(d,{mechanism:{handled:!1,type:"auto.ai.langgraph.error"}}),d}})}})}o(fh,"instrumentCompiledGraphInvoke");function qx(e,t){if(Object.prototype.hasOwnProperty.call(e,Co))return e;const n=Ln(t),r=dh(n),i=new Proxy(e,{apply(s,a,c){const u=CT(c),l=AT(c),f=c[0];f&&Array.isArray(f.tools)&&f.tools.length>0&&MT(f.tools,n,l??void 0),Na=!0;let d;try{d=Reflect.apply(s,a,c)}finally{Na=!1}const p=d.invoke;if(p&&typeof p=="function"){const h={};l&&(h.name=l),d.invoke=fh(p.bind(d),d,h,n,u,r)}return d}});return Object.defineProperty(i,Co,{value:!0,enumerable:!1}),i}o(qx,"instrumentCreateReactAgent");function $T(e,t){return e.compile=FT(e.compile,Ln(t)),e}o($T,"instrumentStateGraph");var zx=$T;function BT(e,t,n){const r=n.getOptions(),i=n.getDsn(),s=r.tunnel,a=ci(r._metadata),c={sent_at:new Date(yt()).toISOString(),...UT(t)&&{trace:t},...a&&{sdk:a},...!!s&&i&&{dsn:vt(i)}},u=n.getDataCollectionOptions().userInfo?"auto":"never",l=[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Yt()&&{ingest_settings:{infer_ip:u,infer_user_agent:u}},items:e}];return Xe(c,[l])}o(BT,"createStreamedSpanEnvelope");function UT(e){return!!e.trace_id&&!!e.public_key}o(UT,"dscHasRequiredProps");function HT(e){let t=156;if(t+=e.name.length*2,t+=bu(e.attributes),e.links&&e.links.length>0){const n=e.links[0]?.attributes,r=100+(n?bu(n):0);t+=r*e.links.length}return t}o(HT,"estimateSerializedSpanSizeInBytes");var Nl=1e3,WT=5e6,jT=class{static{o(this,"SpanBuffer")}constructor(e,t){this._traceBuckets=new Map,this._client=e;const{maxSpanLimit:n,flushInterval:r,maxTraceWeightInBytes:i}=t??{};this._maxSpanLimit=n&&n>0&&n<=Nl?n:Nl,this._flushInterval=r&&r>0?r:5e3,this._maxTraceWeight=i&&i>0?i:WT,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(s=>{clearTimeout(s.timeout)}),this._traceBuckets.clear()})}add(e){const t=e.trace_id;let n=this._traceBuckets.get(t);n||(n={spans:new Set,size:0,timeout:ns(setTimeout(()=>{this.flush(t)},this._flushInterval))},this._traceBuckets.set(t,n)),n.spans.add(e),n.size+=HT(e),(n.spans.size>=this._maxSpanLimit||n.size>=this._maxTraceWeight)&&this.flush(t)}drain(){this._traceBuckets.size&&(I&&g.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((e,t)=>{this.flush(t)}))}flush(e){const t=this._traceBuckets.get(e);if(!t)return;if(!t.spans.size){this._removeTrace(e);return}const n=Array.from(t.spans),r=n[0]?._segmentSpan;if(!r){I&&g.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(e);return}const i=ut(r),s=n.map(c=>{const{_segmentSpan:u,...l}=c;return l}),a=BT(s,i,this._client);I&&g.log(`Sending span envelope for trace ${e} with ${s.length} spans`),this._client.sendEnvelope(a).then(null,c=>{I&&g.error("Error while sending streamed span envelope:",c)}),this._removeTrace(e)}_removeTrace(e){const t=this._traceBuckets.get(e);t&&clearTimeout(t.timeout),this._traceBuckets.delete(e)}};function ph(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}o(ph,"getBreadcrumbLogLevelFromHttpStatusCode");var cr=$;function qT(){return"history"in cr&&!!cr.history}o(qT,"supportsHistory");function zT(){if(!("fetch"in cr))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}o(zT,"_isFetchSupported");function xa(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}o(xa,"isNativeFunction");function hh(){if(typeof EdgeRuntime=="string")return!0;if(!zT())return!1;if(xa(cr.fetch))return!0;let e=!1;const t=cr.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=xa(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){I&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}o(hh,"supportsNativeFetch");function GT(){return"ReportingObserver"in cr}o(GT,"supportsReportingObserver");function fs(e,t){const n="fetch",r=Zt(n,e);return en(n,()=>mh(void 0,t)),r}o(fs,"addFetchInstrumentationHandler");function VT(e){const t="fetch-body-resolved",n=Zt(t,e);return en(t,()=>mh(JT)),n}o(VT,"addFetchEndInstrumentationHandler");function mh(e,t=!1){t&&!hh()||Ae($,"fetch",function(n){return function(...r){const i=new Error,{method:s,url:a}=KT(r),c={args:r,fetchData:{method:s,url:a},startTimestamp:ge()*1e3,virtualError:i,headers:XT(r)};return e||Ge("fetch",{...c}),n.apply($,r).then(async u=>(e?e(u):Ge("fetch",{...c,endTimestamp:ge()*1e3,response:u}),u),u=>{Ge("fetch",{...c,endTimestamp:ge()*1e3,error:u}),De(u)&&u.stack===void 0&&(u.stack=i.stack,Ce(u,"framesToPop",1));const l=R()?.getOptions().enhanceFetchErrorMessages??"always";if(l!==!1&&De(u)&&u.name==="TypeError"&&(u.message==="Failed to fetch"||u.message==="Load failed"||u.message==="NetworkError when attempting to fetch resource."))try{const f=new URL(c.fetchData.url).host;l==="always"?u.message=`${u.message} (${f})`:Ce(u,"__sentry_fetch_url_host__",f)}catch{}throw u})}})}o(mh,"instrumentFetch");async function YT(e,t){if(e?.body){const n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let s=!0;for(;s;){let a;try{a=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:c}=await r.read();clearTimeout(a),c&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(a)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}o(YT,"resolveResponse");function JT(e){let t;try{t=e.clone()}catch{return}YT(t,()=>{Ge("fetch-body-resolved",{endTimestamp:ge()*1e3,response:e})})}o(JT,"streamHandler");function eo(e,t){return Ve(e)&&!!e[t]}o(eo,"hasProp");function xl(e){return typeof e=="string"?e:e?eo(e,"url")?e.url:e.toString?e.toString():"":""}o(xl,"getUrlFromResource");function KT(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:xl(n),method:eo(r,"method")?String(r.method).toUpperCase():ic(n)&&eo(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:xl(t),method:eo(t,"method")?String(t.method).toUpperCase():"GET"}}o(KT,"parseFetchArgs");function XT(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(ic(t))return new Headers(t.headers)}catch{}}o(XT,"getHeadersFromFetchArgs");var gh=$;function Kt(){try{return gh.document.location.href}catch{return""}}o(Kt,"getLocationHref");function Mc(e,t=5){if(!gh.HTMLElement)return null;let n=e;for(let r=0;r<t;r++){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}o(Mc,"getComponentName");var nt=$,ce=nt.document,Pr=nt.navigator,_h="Report a Bug",QT="Cancel",ZT="Send Bug Report",eI="Confirm",tI="Report a Bug",nI="your.email@example.org",rI="Email",iI="What's the bug? What did you expect?",oI="Description",sI="Your Name",aI="Name",cI="Thank you for your report!",uI="(required)",lI="Add a screenshot",dI="Remove screenshot",fI="Highlight",pI="Hide",hI="Remove",yh="Unable to submit feedback with empty message",vh="No client setup, cannot send feedback.",Sh="Unable to determine if Feedback was correctly sent.",bh="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",Eh="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",mI="widget",gI="api",_I=5e3,yI={ERROR_EMPTY_MESSAGE:yh,ERROR_NO_CLIENT:vh,ERROR_TIMEOUT:Sh,ERROR_FORBIDDEN:bh,ERROR_GENERIC:Eh};function to(e,t){return t?.[e]??yI[e]}o(to,"resolveFeedbackErrorMessage");function Ol(e,t){return new Error(to(e,t))}o(Ol,"createFeedbackError");var vI=o((e,t={includeReplay:!0})=>{const n=t.errorMessages;if(!e.message)throw Ol("ERROR_EMPTY_MESSAGE",n);const r=R();if(!r)throw Ol("ERROR_NO_CLIENT",n);e.tags&&Object.keys(e.tags).length&&q().setTags(e.tags);const i=Ab({source:gI,url:Kt(),...e},t);return new Promise((s,a)=>{const c=setTimeout(()=>{u(),a(to("ERROR_TIMEOUT",n))},3e4),u=r.on("afterSendEvent",(l,f)=>{if(l.event_id===i)return clearTimeout(c),u(),f?.statusCode&&f.statusCode>=200&&f.statusCode<300?s(i):f?.statusCode===403?a(to("ERROR_FORBIDDEN",n)):a(to("ERROR_GENERIC",n))})})},"sendFeedback"),no=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function SI(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Pr.userAgent)||/Macintosh/i.test(Pr.userAgent)&&Pr.maxTouchPoints&&Pr.maxTouchPoints>1||!isSecureContext)}o(SI,"isScreenshotSupported");function Li(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:o(()=>{t.onFormOpen?.(),e.onFormOpen?.()},"onFormOpen"),onFormClose:o(()=>{t.onFormClose?.(),e.onFormClose?.()},"onFormClose"),onSubmitSuccess:o((n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},"onSubmitSuccess"),onSubmitError:o(n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},"onSubmitError"),onFormSubmitted:o(()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},"onFormSubmitted"),themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}o(Li,"mergeOptions");function bI(e){const t=ce.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}o(bI,"createActorStyles");function He(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}o(He,"setAttributesNS");var Wn=20,EI="http://www.w3.org/2000/svg";function TI(){const e=o(c=>nt.document.createElementNS(EI,c),"createElementNS"),t=He(e("svg"),{width:`${Wn}`,height:`${Wn}`,viewBox:`0 0 ${Wn} ${Wn}`,fill:"var(--actor-color, var(--foreground))"}),n=He(e("g"),{clipPath:"url(#clip0_57_80)"}),r=He(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);const i=e("defs"),s=He(e("clipPath"),{id:"clip0_57_80"}),a=He(e("rect"),{width:`${Wn}`,height:`${Wn}`,fill:"white"});return s.appendChild(a),i.appendChild(s),t.appendChild(i).appendChild(s).appendChild(a),t}o(TI,"FeedbackIcon");function II({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const i=ce.createElement("button");if(i.type="button",i.className="widget__actor",i.ariaHidden="false",i.ariaLabel=t||e||_h,i.appendChild(TI()),e){const a=ce.createElement("span");a.appendChild(ce.createTextNode(e)),i.appendChild(a)}const s=bI(r);return{el:i,appendToDom(){n.appendChild(s),n.appendChild(i)},removeFromDom(){i.remove(),s.remove()},show(){i.ariaHidden="false"},hide(){i.ariaHidden="true"}}}o(II,"Actor");var Th="rgba(88, 74, 192, 1)",wI={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Th,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%)"},Ll={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:Th,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 Pl(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
+ `}o(Pl,"getThemedCssVariables");function Dl({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const i=ce.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
+ ${Pl(e==="dark"?{...Ll,...t}:{...wI,...n})}
96
+ }
97
+
98
+ ${e==="system"?`
99
+ @media (prefers-color-scheme: dark) {
100
+ :host {
101
+ color-scheme: only dark;
102
+
103
+ ${Pl({...Ll,...t})}
104
+ }
105
+ }`:""}
106
+ `,r&&i.setAttribute("nonce",r),i}o(Dl,"createMainStyles");var Ih=o(({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>o((({id:i="sentry-feedback",autoInject:s=!0,showBranding:a=!0,isEmailRequired:c=!1,isNameRequired:u=!1,showEmail:l=!0,showName:f=!0,enableScreenshot:d=!0,useSentryUser:p={email:"email",name:"username"},tags:h,styleNonce:m,scriptNonce:_,colorScheme:y="system",themeLight:v={},themeDark:S={},addScreenshotButtonLabel:k=lI,cancelButtonLabel:w=QT,confirmButtonLabel:x=eI,emailLabel:C=rI,emailPlaceholder:b=nI,formTitle:H=tI,isRequiredLabel:B=uI,messageLabel:E=oI,messagePlaceholder:O=iI,nameLabel:M=aI,namePlaceholder:A=sI,removeScreenshotButtonLabel:K=dI,submitButtonLabel:Q=ZT,successMessageText:ee=cI,triggerLabel:U=_h,triggerAriaLabel:N="",highlightToolText:D=fI,hideToolText:F=pI,removeHighlightText:ie=hI,errorEmptyMessageText:ne=yh,errorNoClientText:ae=vh,errorTimeoutText:Te=Sh,errorForbiddenText:bt=bh,errorGenericText:Ze=Eh,onFormOpen:Et,onFormClose:et,onSubmitSuccess:rn,onSubmitError:Tt,onFormSubmitted:Ai}={})=>{const It={id:i,autoInject:s,showBranding:a,isEmailRequired:c,isNameRequired:u,showEmail:l,showName:f,enableScreenshot:d,useSentryUser:p,tags:h,styleNonce:m,scriptNonce:_,colorScheme:y,themeDark:S,themeLight:v,triggerLabel:U,triggerAriaLabel:N,cancelButtonLabel:w,submitButtonLabel:Q,confirmButtonLabel:x,formTitle:H,emailLabel:C,emailPlaceholder:b,messageLabel:E,messagePlaceholder:O,nameLabel:M,namePlaceholder:A,successMessageText:ee,isRequiredLabel:B,addScreenshotButtonLabel:k,removeScreenshotButtonLabel:K,highlightToolText:D,hideToolText:F,removeHighlightText:ie,errorEmptyMessageText:ne,errorNoClientText:ae,errorTimeoutText:Te,errorForbiddenText:bt,errorGenericText:Ze,onFormClose:et,onFormOpen:Et,onSubmitError:Tt,onSubmitSuccess:rn,onFormSubmitted:Ai};let je=null,xe=null,$e=[];const Fn=o(P=>{if(!je){const oe=ce.createElement("div");oe.id=String(P.id),ce.body.appendChild(oe),je=oe.attachShadow({mode:"open"}),xe=Dl(P),je.appendChild(xe)}return je},"_createShadow"),$n=o(async P=>{const oe=P.enableScreenshot&&SI();let Y,se;try{Y=(t?t():await e("feedbackModalIntegration",_))(),Vu(Y)}catch{throw no&&g.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),new Error("[Feedback] Missing feedback modal integration!")}try{const Bn=oe?n?n():await e("feedbackScreenshotIntegration",_):void 0;Bn&&(se=Bn(),Vu(se))}catch{no&&g.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const J={ERROR_EMPTY_MESSAGE:P.errorEmptyMessageText,ERROR_NO_CLIENT:P.errorNoClientText,ERROR_TIMEOUT:P.errorTimeoutText,ERROR_FORBIDDEN:P.errorForbiddenText,ERROR_GENERIC:P.errorGenericText},lt=o((Bn,hg)=>vI(Bn,{includeReplay:!0,...hg,errorMessages:J}),"wrappedSendFeedback"),an=Y.createDialog({options:{...P,onFormClose:o(()=>{an?.close(),P.onFormClose?.()},"onFormClose"),onFormSubmitted:o(()=>{an?.close(),P.onFormSubmitted?.()},"onFormSubmitted")},screenshotIntegration:se,sendFeedback:lt,shadow:Fn(P)});return an},"_loadAndRenderDialog"),on=o((P,oe={})=>{const Y=Li(It,oe),se=typeof P=="string"?ce.querySelector(P):typeof P.addEventListener=="function"?P:null;if(!se)throw no&&g.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let J=null;const lt=o(async()=>{J||(J=await $n({...Y,onFormSubmitted:o(()=>{J?.removeFromDom(),Y.onFormSubmitted?.()},"onFormSubmitted")})),J.appendToDom(),J.open()},"handleClick");se.addEventListener("click",lt);const an=o(()=>{$e=$e.filter(Bn=>Bn!==an),J?.removeFromDom(),J=null,se.removeEventListener("click",lt)},"unsubscribe");return $e.push(an),an},"_attachTo"),sn=o((P={})=>{const oe=Li(It,P),Y=Fn(oe),se=II({triggerLabel:oe.triggerLabel,triggerAriaLabel:oe.triggerAriaLabel,shadow:Y,styleNonce:m});return on(se.el,{...oe,onFormOpen(){se.hide()},onFormClose(){se.show()},onFormSubmitted(){se.show()}}),se},"_createActor");return{name:"Feedback",setupOnce(){!Yt()||!It.autoInject||(ce.readyState==="loading"?ce.addEventListener("DOMContentLoaded",()=>sn().appendToDom()):sn().appendToDom())},attachTo:on,createWidget(P={}){const oe=sn(Li(It,P));return oe.appendToDom(),oe},async createForm(P={}){return $n(Li(It,P))},setTheme(P){if(It.colorScheme=P,je){const oe=Dl(It);xe?je.replaceChild(oe,xe):je.prepend(oe),xe=oe}},remove(){je&&(je.parentElement?.remove(),je=null,xe=null),$e.forEach(P=>P()),$e=[]}}}),"feedbackIntegration"),"buildFeedbackIntegration");function Gx(){return R()?.getIntegrationByName("Feedback")}o(Gx,"getFeedback");var ps,le,wh,fn,Fl,kh,Oa,Kr={},Nc=[],kI=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,xc=Array.isArray;function qt(e,t){for(var n in t)e[n]=t[n];return e}o(qt,"v$1");function Rh(e){var t=e.parentNode;t&&t.removeChild(e)}o(Rh,"p$1");function Z(e,t,n){var r,i,s,a={};for(s in t)s=="key"?r=t[s]:s=="ref"?i=t[s]:a[s]=t[s];if(arguments.length>2&&(a.children=arguments.length>3?ps.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)a[s]===void 0&&(a[s]=e.defaultProps[s]);return ro(e,a,r,i,null)}o(Z,"y$1");function ro(e,t,n,r,i){var s={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??++wh,__i:-1,__u:0};return i==null&&le.vnode!=null&&le.vnode(s),s}o(ro,"d$1");function yi(e){return e.children}o(yi,"g$1");function io(e,t){this.props=e,this.context=t}o(io,"b$1");function ur(e,t){if(t==null)return e.__?ur(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"?ur(e):null}o(ur,"m$1");function RI(e,t,n){var r,i=e.__v,s=i.__e,a=e.__P;if(a)return(r=qt({},i)).__v=i.__v+1,le.vnode&&le.vnode(r),Oc(a,r,i,e.__n,a.ownerSVGElement!==void 0,32&i.__u?[s]:null,t,s??ur(i),!!(32&i.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=s&&Ch(r),r}o(RI,"w$1");function Ch(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 Ch(e)}}o(Ch,"k$1");function $l(e){(!e.__d&&(e.__d=!0)&&fn.push(e)&&!Ao.__r++||Fl!==le.debounceRendering)&&((Fl=le.debounceRendering)||kh)(Ao)}o($l,"x$1");function Ao(){var e,t,n,r=[],i=[];for(fn.sort(Oa);e=fn.shift();)e.__d&&(n=fn.length,t=RI(e,r,i)||t,n===0||fn.length>n?(La(r,t,i),i.length=r.length=0,t=void 0,fn.sort(Oa)):t&&le.__c&&le.__c(t,Nc));t&&La(r,t,i),Ao.__r=0}o(Ao,"C$1");function Ah(e,t,n,r,i,s,a,c,u,l,f){var d,p,h,m,_,y=r&&r.__k||Nc,v=t.length;for(n.__d=u,CI(n,t,y),u=n.__d,d=0;d<v;d++)(h=n.__k[d])!=null&&typeof h!="boolean"&&typeof h!="function"&&(p=h.__i===-1?Kr:y[h.__i]||Kr,h.__i=d,Oc(e,h,p,i,s,a,c,u,l,f),m=h.__e,h.ref&&p.ref!=h.ref&&(p.ref&&Lc(p.ref,null,h),f.push(h.ref,h.__c||m,h)),_==null&&m!=null&&(_=m),65536&h.__u||p.__k===h.__k?u=Mh(h,u,e):typeof h.type=="function"&&h.__d!==void 0?u=h.__d:m&&(u=m.nextSibling),h.__d=void 0,h.__u&=-196609);n.__d=u,n.__e=_}o(Ah,"P$1");function CI(e,t,n){var r,i,s,a,c,u=t.length,l=n.length,f=l,d=0;for(e.__k=[],r=0;r<u;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?ro(null,i,null,null,i):xc(i)?ro(yi,{children:i},null,null,null):i.constructor===void 0&&i.__b>0?ro(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)!=null?(i.__=e,i.__b=e.__b+1,c=AI(i,n,a=r+d,f),i.__i=c,s=null,c!==-1&&(f--,(s=n[c])&&(s.__u|=131072)),s==null||s.__v===null?(c==-1&&d--,typeof i.type!="function"&&(i.__u|=65536)):c!==a&&(c===a+1?d++:c>a?f>u-a?d+=c-a:d--:d=c<a&&c==a-1?c-a:0,c!==r+d&&(i.__u|=65536))):(s=n[r])&&s.key==null&&s.__e&&(s.__e==e.__d&&(e.__d=ur(s)),Pa(s,s,!1),n[r]=null,f--);if(f)for(r=0;r<l;r++)(s=n[r])!=null&&(131072&s.__u)==0&&(s.__e==e.__d&&(e.__d=ur(s)),Pa(s,s))}o(CI,"S");function Mh(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=Mh(r[i],t,n));return t}e.__e!=t&&(n.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}o(Mh,"$");function AI(e,t,n,r){var i=e.key,s=e.type,a=n-1,c=n+1,u=t[n];if(u===null||u&&i==u.key&&s===u.type)return n;if(r>(u!=null&&(131072&u.__u)==0?1:0))for(;a>=0||c<t.length;){if(a>=0){if((u=t[a])&&(131072&u.__u)==0&&i==u.key&&s===u.type)return a;a--}if(c<t.length){if((u=t[c])&&(131072&u.__u)==0&&i==u.key&&s===u.type)return c;c++}}return-1}o(AI,"I");function Bl(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||kI.test(t)?n:n+"px"}o(Bl,"T$1");function Pi(e,t,n,r,i){var s;e: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||Bl(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Bl(e.style,t,n[t])}else if(t[0]==="o"&&t[1]==="n")s=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+s]=n,n?r?n.u=r.u:(n.u=Date.now(),e.addEventListener(t,s?Hl:Ul,s)):e.removeEventListener(t,s?Hl:Ul,s);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 e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,n))}}o(Pi,"A$1");function Ul(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(le.event?le.event(e):e)}}o(Ul,"D$1");function Hl(e){if(this.l)return this.l[e.type+!0](le.event?le.event(e):e)}o(Hl,"L");function Oc(e,t,n,r,i,s,a,c,u,l){var f,d,p,h,m,_,y,v,S,k,w,x,C,b,H,B=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(u=!!(32&n.__u),s=[c=t.__e=n.__e]),(f=le.__b)&&f(t);e:if(typeof B=="function")try{if(v=t.props,S=(f=B.contextType)&&r[f.__c],k=f?S?S.props.value:f.__:r,n.__c?y=(d=t.__c=n.__c).__=d.__E:("prototype"in B&&B.prototype.render?t.__c=d=new B(v,k):(t.__c=d=new io(v,k),d.constructor=B,d.render=NI),S&&S.sub(d),d.props=v,d.state||(d.state={}),d.context=k,d.__n=r,p=d.__d=!0,d.__h=[],d._sb=[]),d.__s??(d.__s=d.state),B.getDerivedStateFromProps!=null&&(d.__s==d.state&&(d.__s=qt({},d.__s)),qt(d.__s,B.getDerivedStateFromProps(v,d.__s))),h=d.props,m=d.state,d.__v=t,p)B.getDerivedStateFromProps==null&&d.componentWillMount!=null&&d.componentWillMount(),d.componentDidMount!=null&&d.__h.push(d.componentDidMount);else{if(B.getDerivedStateFromProps==null&&v!==h&&d.componentWillReceiveProps!=null&&d.componentWillReceiveProps(v,k),!d.__e&&(d.shouldComponentUpdate!=null&&d.shouldComponentUpdate(v,d.__s,k)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(d.props=v,d.state=d.__s,d.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(E){E&&(E.__=t)}),w=0;w<d._sb.length;w++)d.__h.push(d._sb[w]);d._sb=[],d.__h.length&&a.push(d);break e}d.componentWillUpdate!=null&&d.componentWillUpdate(v,d.__s,k),d.componentDidUpdate!=null&&d.__h.push(function(){d.componentDidUpdate(h,m,_)})}if(d.context=k,d.props=v,d.__P=e,d.__e=!1,x=le.__r,C=0,"prototype"in B&&B.prototype.render){for(d.state=d.__s,d.__d=!1,x&&x(t),f=d.render(d.props,d.state,d.context),b=0;b<d._sb.length;b++)d.__h.push(d._sb[b]);d._sb=[]}else do d.__d=!1,x&&x(t),f=d.render(d.props,d.state,d.context),d.state=d.__s;while(d.__d&&++C<25);d.state=d.__s,d.getChildContext!=null&&(r=qt(qt({},r),d.getChildContext())),p||d.getSnapshotBeforeUpdate==null||(_=d.getSnapshotBeforeUpdate(h,m)),Ah(e,xc(H=f!=null&&f.type===yi&&f.key==null?f.props.children:f)?H:[H],t,n,r,i,s,a,c,u,l),d.base=t.__e,t.__u&=-161,d.__h.length&&a.push(d),y&&(d.__E=d.__=null)}catch(E){t.__v=null,u||s!=null?(t.__e=c,t.__u|=u?160:32,s[s.indexOf(c)]=null):(t.__e=n.__e,t.__k=n.__k),le.__e(E,t,n)}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=MI(n.__e,t,n,r,i,s,a,u,l);(f=le.diffed)&&f(t)}o(Oc,"M");function La(e,t,n){for(var r=0;r<n.length;r++)Lc(n[r],n[++r],n[++r]);le.__c&&le.__c(t,e),e.some(function(i){try{e=i.__h,i.__h=[],e.some(function(s){s.call(i)})}catch(s){le.__e(s,i.__v)}})}o(La,"j$1");function MI(e,t,n,r,i,s,a,c,u){var l,f,d,p,h,m,_,y=n.props,v=t.props,S=t.type;if(S==="svg"&&(i=!0),s!=null){for(l=0;l<s.length;l++)if((h=s[l])&&"setAttribute"in h==!!S&&(S?h.localName===S:h.nodeType===3)){e=h,s[l]=null;break}}if(e==null){if(S===null)return document.createTextNode(v);e=i?document.createElementNS("http://www.w3.org/2000/svg",S):document.createElement(S,v.is&&v),s=null,c=!1}if(S===null)y===v||c&&e.data===v||(e.data=v);else{if(s=s&&ps.call(e.childNodes),y=n.props||Kr,!c&&s!=null)for(y={},l=0;l<e.attributes.length;l++)y[(h=e.attributes[l]).name]=h.value;for(l in y)h=y[l],l=="children"||(l=="dangerouslySetInnerHTML"?d=h:l==="key"||l in v||Pi(e,l,null,h,i));for(l in v)h=v[l],l=="children"?p=h:l=="dangerouslySetInnerHTML"?f=h:l=="value"?m=h:l=="checked"?_=h:l==="key"||c&&typeof h!="function"||y[l]===h||Pi(e,l,h,y[l],i);if(f)c||d&&(f.__html===d.__html||f.__html===e.innerHTML)||(e.innerHTML=f.__html),t.__k=[];else if(d&&(e.innerHTML=""),Ah(e,xc(p)?p:[p],t,n,r,i&&S!=="foreignObject",s,a,s?s[0]:n.__k&&ur(n,0),c,u),s!=null)for(l=s.length;l--;)s[l]!=null&&Rh(s[l]);c||(l="value",m!==void 0&&(m!==e[l]||S==="progress"&&!m||S==="option"&&m!==y[l])&&Pi(e,l,m,y[l],!1),l="checked",_!==void 0&&_!==e[l]&&Pi(e,l,_,y[l],!1))}return e}o(MI,"z$1");function Lc(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){le.__e(r,n)}}o(Lc,"N");function Pa(e,t,n){var r,i;if(le.unmount&&le.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||Lc(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){le.__e(s,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&Pa(r[i],t,n||typeof e.type!="function");n||e.__e==null||Rh(e.__e),e.__=e.__e=e.__d=void 0}o(Pa,"O");function NI(e,t,n){return this.constructor(e,n)}o(NI,"q$1");function xI(e,t,n){var r,i,s,a;le.__&&le.__(e,t),i=(r=!1)?null:t.__k,s=[],a=[],Oc(t,e=t.__k=Z(yi,null,[e]),i||Kr,Kr,t.ownerSVGElement!==void 0,i?null:t.firstChild?ps.call(t.childNodes):null,s,i?i.__e:t.firstChild,r,a),e.__d=void 0,La(s,e,a)}o(xI,"B$1");ps=Nc.slice,le={__e:o(function(e,t,n,r){for(var i,s,a;t=t.__;)if((i=t.__c)&&!i.__)try{if((s=i.constructor)&&s.getDerivedStateFromError!=null&&(i.setState(s.getDerivedStateFromError(e)),a=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),a=i.__d),a)return i.__E=i}catch(c){e=c}throw e},"__e")},wh=0,io.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=qt({},this.state);typeof e=="function"&&(e=e(qt({},n),this.props)),e&&qt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),$l(this))},io.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),$l(this))},io.prototype.render=yi,fn=[],kh=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Oa=o(function(e,t){return e.__v.__b-t.__v.__b},"f$1"),Ao.__r=0;var Pt,ue,Vs,Wl,lr=0,Nh=[],oo=[],_e=le,jl=_e.__b,ql=_e.__r,zl=_e.diffed,Gl=_e.__c,Vl=_e.unmount,Yl=_e.__;function Pn(e,t){_e.__h&&_e.__h(ue,e,lr||t),lr=0;var n=ue.__H||(ue.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:oo}),n.__[e]}o(Pn,"h");function pn(e){return lr=1,xh(Lh,e)}o(pn,"p");function xh(e,t,n){var r=Pn(Pt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Lh(void 0,t),function(c){var u=r.__N?r.__N[0]:r.__[0],l=r.t(u,c);u!==l&&(r.__N=[l,r.__[1]],r.__c.setState({}))}],r.__c=ue,!ue.u)){var i=o(function(c,u,l){if(!r.__c.__H)return!0;var f=r.__c.__H.__.filter(function(p){return!!p.__c});if(f.every(function(p){return!p.__N}))return!s||s.call(this,c,u,l);var d=!1;return f.forEach(function(p){if(p.__N){var h=p.__[0];p.__=p.__N,p.__N=void 0,h!==p.__[0]&&(d=!0)}}),!(!d&&r.__c.props===c)&&(!s||s.call(this,c,u,l))},"f");ue.u=!0;var s=ue.shouldComponentUpdate,a=ue.componentWillUpdate;ue.componentWillUpdate=function(c,u,l){if(this.__e){var f=s;s=void 0,i(c,u,l),s=f}a&&a.call(this,c,u,l)},ue.shouldComponentUpdate=i}return r.__N||r.__}o(xh,"y");function OI(e,t){var n=Pn(Pt++,3);!_e.__s&&Pc(n.__H,t)&&(n.__=e,n.i=t,ue.__H.__h.push(n))}o(OI,"_");function Oh(e,t){var n=Pn(Pt++,4);!_e.__s&&Pc(n.__H,t)&&(n.__=e,n.i=t,ue.__h.push(n))}o(Oh,"A");function LI(e){return lr=5,vi(function(){return{current:e}},[])}o(LI,"F");function PI(e,t,n){lr=6,Oh(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))}o(PI,"T");function vi(e,t){var n=Pn(Pt++,7);return Pc(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}o(vi,"q");function er(e,t){return lr=8,vi(function(){return e},t)}o(er,"x");function DI(e){var t=ue.context[e.__c],n=Pn(Pt++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(ue)),t.props.value):e.__}o(DI,"P");function FI(e,t){_e.useDebugValue&&_e.useDebugValue(t?t(e):e)}o(FI,"V");function $I(e){var t=Pn(Pt++,10),n=pn();return t.__=e,ue.componentDidCatch||(ue.componentDidCatch=function(r,i){t.__&&t.__(r,i),n[1](r)}),[n[0],function(){n[1](void 0)}]}o($I,"b");function BI(){var e=Pn(Pt++,11);if(!e.__){for(var t=ue.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}o(BI,"g");function UI(){for(var e;e=Nh.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(so),e.__H.__h.forEach(Da),e.__H.__h=[]}catch(t){e.__H.__h=[],_e.__e(t,e.__v)}}o(UI,"j");_e.__b=function(e){ue=null,jl&&jl(e)},_e.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Yl&&Yl(e,t)},_e.__r=function(e){ql&&ql(e),Pt=0;var t=(ue=e.__c).__H;t&&(Vs===ue?(t.__h=[],ue.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=oo,n.__N=n.i=void 0})):(t.__h.forEach(so),t.__h.forEach(Da),t.__h=[],Pt=0)),Vs=ue},_e.diffed=function(e){zl&&zl(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Nh.push(t)!==1&&Wl===_e.requestAnimationFrame||((Wl=_e.requestAnimationFrame)||HI)(UI)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==oo&&(n.__=n.__V),n.i=void 0,n.__V=oo})),Vs=ue=null},_e.__c=function(e,t){t.some(function(n){try{n.__h.forEach(so),n.__h=n.__h.filter(function(r){return!r.__||Da(r)})}catch(r){t.some(function(i){i.__h&&(i.__h=[])}),t=[],_e.__e(r,n.__v)}}),Gl&&Gl(e,t)},_e.unmount=function(e){Vl&&Vl(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{so(r)}catch(i){t=i}}),n.__H=void 0,t&&_e.__e(t,n.__v))};var Jl=typeof requestAnimationFrame=="function";function HI(e){var t,n=o(function(){clearTimeout(r),Jl&&cancelAnimationFrame(t),setTimeout(e)},"r"),r=setTimeout(n,100);Jl&&(t=requestAnimationFrame(n))}o(HI,"w");function so(e){var t=ue,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),ue=t}o(so,"z");function Da(e){var t=ue;e.__c=e.__(),ue=t}o(Da,"B");function Pc(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}o(Pc,"C");function Lh(e,t){return typeof t=="function"?t(e):t}o(Lh,"D");var WI=Object.defineProperty({__proto__:null,useCallback:er,useContext:DI,useDebugValue:FI,useEffect:OI,useErrorBoundary:$I,useId:BI,useImperativeHandle:PI,useLayoutEffect:Oh,useMemo:vi,useReducer:xh,useRef:LI,useState:pn},Symbol.toStringTag,{value:"Module"}),jI="http://www.w3.org/2000/svg";function qI(){const e=o(r=>ce.createElementNS(jI,r),"createElementNS"),t=He(e("svg"),{width:"32",height:"30",viewBox:"0 0 72 66",fill:"inherit"}),n=He(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}o(qI,"SentryLogo");function zI({options:e}){const t=vi(()=>({__html:qI().outerHTML}),[]);return Z("h2",{class:"dialog__header"},Z("span",{class:"dialog__title"},e.formTitle),e.showBranding?Z("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}o(zI,"DialogHeader");function GI(e,t){const 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}o(GI,"getMissingFields");function Ys(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}o(Ys,"retrieveStringValue");function VI({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:s,onSubmitError:a,showEmail:c,showName:u,screenshotInput:l}){const{tags:f,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:p,cancelButtonLabel:h,emailLabel:m,emailPlaceholder:_,isEmailRequired:y,isNameRequired:v,messageLabel:S,messagePlaceholder:k,nameLabel:w,namePlaceholder:x,submitButtonLabel:C,isRequiredLabel:b}=e,[H,B]=pn(!1),[E,O]=pn(null),[M,A]=pn(!1),K=l?.input,[Q,ee]=pn(null),U=er(D=>{ee(D),A(!1)},[]),N=er(D=>{const F=GI(D,{emailLabel:m,isEmailRequired:y,isNameRequired:v,messageLabel:S,nameLabel:w});return F.length>0?O(`Please enter in the following required fields: ${F.join(", ")}`):O(null),F.length===0},[m,y,v,S,w]);return Z("form",{class:"form",onSubmit:er(async D=>{B(!0);try{if(D.preventDefault(),!(D.target instanceof HTMLFormElement))return;const F=new FormData(D.target),ie=await(l&&M?l.value():void 0),ne={name:Ys(F,"name"),email:Ys(F,"email"),message:Ys(F,"message"),attachments:ie?[ie]:void 0};if(!N(ne))return;try{s(ne,await i({name:ne.name,email:ne.email,message:ne.message,source:mI,tags:f},{attachments:ne.attachments}))}catch(ae){no&&g.error(ae);const Te=ae instanceof Error?ae:new Error(String(ae));O(Te.message),a(Te)}}finally{B(!1)}},[l&&M,s,a])},K&&M?Z(K,{onError:U}):null,Z("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:H},Z("div",{class:"form__top"},E?Z("div",{class:"form__error-container"},E):null,u?Z("label",{for:"name",class:"form__label"},Z(Js,{label:w,isRequiredLabel:b,isRequired:v}),Z("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:x,required:v,type:"text"})):Z("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),c?Z("label",{for:"email",class:"form__label"},Z(Js,{label:m,isRequiredLabel:b,isRequired:y}),Z("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:_,required:y,type:"email"})):Z("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),Z("label",{for:"message",class:"form__label"},Z(Js,{label:S,isRequiredLabel:b,isRequired:!0}),Z("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:k,required:!0,rows:5})),K?Z("label",{for:"screenshot",class:"form__label"},Z("button",{class:"btn btn--default",disabled:H,type:"button",onClick:o(()=>{ee(null),A(D=>!D)},"onClick")},M?p:d),Q?Z("div",{class:"form__error-container"},Q.message):null):null),Z("div",{class:"btn-group"},Z("button",{class:"btn btn--primary",disabled:H,type:"submit"},C),Z("button",{class:"btn btn--default",disabled:H,type:"button",onClick:r},h))))}o(VI,"Form");function Js({label:e,isRequired:t,isRequiredLabel:n}){return Z("span",{class:"form__label__text"},e,t&&Z("span",{class:"form__label__text--required"},n))}o(Js,"LabelText");var Di=16,Kl=17,YI="http://www.w3.org/2000/svg";function JI(){const e=o(u=>nt.document.createElementNS(YI,u),"createElementNS"),t=He(e("svg"),{width:`${Di}`,height:`${Kl}`,viewBox:`0 0 ${Di} ${Kl}`,fill:"inherit"}),n=He(e("g"),{clipPath:"url(#clip0_57_156)"}),r=He(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=He(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);const s=e("defs"),a=He(e("clipPath"),{id:"clip0_57_156"}),c=He(e("rect"),{width:`${Di}`,height:`${Di}`,fill:"white",transform:"translate(0 0.5)"});return a.appendChild(c),s.appendChild(a),t.appendChild(s).appendChild(a).appendChild(c),t}o(JI,"SuccessIcon");function KI({open:e,onFormSubmitted:t,...n}){const r=n.options,i=vi(()=>({__html:JI().outerHTML}),[]),[s,a]=pn(null),c=er(()=>{s&&(clearTimeout(s),a(null)),t()},[s]),u=er((l,f)=>{n.onSubmitSuccess(l,f),a(setTimeout(()=>{t(),a(null)},_I))},[t]);return Z(yi,null,s?Z("div",{class:"success__position",onClick:c},Z("div",{class:"success__content"},r.successMessageText,Z("span",{class:"success__icon",dangerouslySetInnerHTML:i}))):Z("dialog",{class:"dialog",onClick:r.onFormClose,open:e},Z("div",{class:"dialog__position"},Z("div",{class:"dialog__content",onClick:o(l=>{l.stopPropagation()},"onClick")},Z(zI,{options:r}),Z(VI,{...n,onSubmitSuccess:u})))))}o(KI,"Dialog");var XI=`
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
+ `,QI=`
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
+ `,ZI=`
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
+ `,e0=`
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
+ `,t0=`
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 n0(e){const t=ce.createElement("style");return t.textContent=`
387
+ :host {
388
+ --dialog-inset: var(--inset);
389
+ }
390
+
391
+ ${XI}
392
+ ${QI}
393
+ ${ZI}
394
+ ${e0}
395
+ ${t0}
396
+ `,e&&t.setAttribute("nonce",e),t}o(n0,"createDialogStyles");function r0(){const e=q().getUser(),t=he().getUser(),n=Fr().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}o(r0,"getUser");var i0=o((()=>({name:"FeedbackModal",setupOnce(){},createDialog:o(({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const i=r,s=e.useSentryUser,a=r0(),c=ce.createElement("div"),u=n0(e.styleNonce);let l="";const f={get el(){return c},appendToDom(){!i.contains(u)&&!i.contains(c)&&(i.appendChild(u),i.appendChild(c))},removeFromDom(){c.remove(),u.remove(),ce.body.style.overflow=l},open(){p(!0),e.onFormOpen?.(),R()?.emit("openFeedbackWidget"),l=ce.body.style.overflow,ce.body.style.overflow="hidden"},close(){p(!1),ce.body.style.overflow=l}},d=t?.createInput({h:Z,hooks:WI,dialog:f,options:e}),p=o(h=>{xI(Z(KI,{options:e,screenshotInput:d,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(s&&a?.[s.name]||""),defaultEmail:String(s&&a?.[s.email]||""),onFormClose:o(()=>{p(!1),e.onFormClose?.()},"onFormClose"),onSubmit:n,onSubmitSuccess:o((m,_)=>{p(!1),e.onSubmitSuccess?.(m,_)},"onSubmitSuccess"),onSubmitError:o(m=>{e.onSubmitError?.(m)},"onSubmitError"),onFormSubmitted:o(()=>{e.onFormSubmitted?.()},"onFormSubmitted"),open:h}),c)},"renderContent");return f},"createDialog")})),"feedbackModalIntegration");function o0({h:e}){return o(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"}))},"IconClose")}o(o0,"IconCloseFactory");function s0(e){const t=ce.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}o(s0,"createScreenshotInputStyles");function a0({h:e}){return o(function({action:n,setAction:r,options:i}){return e("div",{class:"editor__tool-container"},e("div",{class:"editor__tool-bar"},e("button",{type:"button",class:`editor__tool ${n==="highlight"?"editor__tool--active":""}`,onClick:o(()=>{r(n==="highlight"?"":"highlight")},"onClick")},i.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:o(()=>{r(n==="hide"?"":"hide")},"onClick")},i.hideToolText)))},"Toolbar")}o(a0,"ToolbarFactory");function c0({hooks:e}){function t(){const[n,r]=e.useState(nt.devicePixelRatio??1);return e.useEffect(()=>{const i=o(()=>{r(nt.devicePixelRatio)},"onChange"),s=matchMedia(`(resolution: ${nt.devicePixelRatio}dppx)`);return s.addEventListener("change",i),()=>{s.removeEventListener("change",i)}},[]),n}return o(t,"useDpi"),o(function({onBeforeScreenshot:r,onScreenshot:i,onAfterScreenshot:s,onError:a}){const c=t();e.useEffect(()=>{o(async()=>{r();const l=await Pr.mediaDevices.getDisplayMedia({video:{width:nt.innerWidth*c,height:nt.innerHeight*c},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),f=ce.createElement("video");await new Promise((d,p)=>{f.srcObject=l,f.onloadedmetadata=()=>{i(f,c),l.getTracks().forEach(h=>h.stop()),d()},f.play().catch(p)}),s()},"takeScreenshot")().catch(a)},[])},"useTakeScreenshot")}o(c0,"useTakeScreenshotFactory");function u0(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)}}o(u0,"drawRect");function Ut(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}o(Ut,"with2dContext");function Ks(e,t){Ut(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}o(Ks,"paintImage");function Xs(e,t,n){Ut(e,{alpha:!0},(r,i)=>{n.length&&(i.fillStyle="rgba(0, 0, 0, 0.25)",i.fillRect(0,0,r.width,r.height)),n.forEach(s=>{u0(s,i,t)})})}o(Xs,"paintForeground");function l0({h:e,hooks:t,outputBuffer:n,dialog:r,options:i}){const s=c0({hooks:t}),a=a0({h:e}),c=o0({h:e}),u={__html:s0(i.styleNonce).innerText},l=r.el.style,f=o(({screenshot:d})=>{const[p,h]=t.useState("highlight"),[m,_]=t.useState([]),y=t.useRef(null),v=t.useRef(null),S=t.useRef(null),k=t.useRef(null),[w,x]=t.useState(1),C=t.useMemo(()=>{const M=ce.getElementById(i.id);if(!M)return"white";const A=getComputedStyle(M);return A.getPropertyValue("--button-primary-background")||A.getPropertyValue("--accent-background")},[i.id]);t.useLayoutEffect(()=>{const M=o(()=>{const A=y.current;A&&(Ut(d.canvas,{alpha:!1},K=>{const Q=Math.min(A.clientWidth/K.width,A.clientHeight/K.height);x(Q)}),(A.clientHeight===0||A.clientWidth===0)&&setTimeout(M,0))},"handleResize");return M(),nt.addEventListener("resize",M),()=>{nt.removeEventListener("resize",M)}},[d]);const b=t.useCallback((M,A)=>{Ut(M,{alpha:!0},(K,Q)=>{Q.scale(A,A),K.width=d.canvas.width,K.height=d.canvas.height})},[d]);t.useEffect(()=>{b(v.current,d.dpi),Ks(v.current,d.canvas)},[d]),t.useEffect(()=>{b(S.current,d.dpi),Ut(S.current,{alpha:!0},(M,A)=>{A.clearRect(0,0,M.width,M.height)}),Xs(S.current,C,m)},[m,C]),t.useEffect(()=>{b(n,d.dpi),Ks(n,d.canvas),Ut(ce.createElement("canvas"),{alpha:!0},(M,A)=>{A.scale(d.dpi,d.dpi),M.width=d.canvas.width,M.height=d.canvas.height,Xs(M,C,m),Ks(n,M)})},[m,d,C]);const H=o(M=>{if(!p||!k.current)return;const A=k.current.getBoundingClientRect(),K={type:p,x:M.offsetX/w,y:M.offsetY/w},Q=o((N,D)=>{const F=(D.clientX-A.x)/w,ie=(D.clientY-A.y)/w;return{type:N.type,x:Math.min(N.x,F),y:Math.min(N.y,ie),w:Math.abs(F-N.x),h:Math.abs(ie-N.y)}},"getDrawCommand"),ee=o(N=>{Ut(S.current,{alpha:!0},(D,F)=>{F.clearRect(0,0,D.width,D.height)}),Xs(S.current,C,[...m,Q(K,N)])},"handleMouseMove"),U=o(N=>{const D=Q(K,N);D.w*w>=1&&D.h*w>=1&&_(F=>[...F,D]),ce.removeEventListener("mousemove",ee),ce.removeEventListener("mouseup",U)},"handleMouseUp");ce.addEventListener("mousemove",ee),ce.addEventListener("mouseup",U)},"handleMouseDown"),B=t.useCallback(M=>A=>{A.preventDefault(),A.stopPropagation(),_(K=>{const Q=[...K];return Q.splice(M,1),Q})},[]),E={width:`${d.canvas.width*w}px`,height:`${d.canvas.height*w}px`},O=o(M=>{M.stopPropagation()},"handleStopPropagation");return e("div",{class:"editor"},e("style",{nonce:i.styleNonce,dangerouslySetInnerHTML:u}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:y},e("canvas",{ref:v,id:"background",style:E}),e("canvas",{ref:S,id:"foreground",style:E}),e("div",{ref:k,onMouseDown:H,style:E},m.map((M,A)=>e("div",{key:A,class:"editor__rect",style:{top:`${M.y*w}px`,left:`${M.x*w}px`,width:`${M.w*w}px`,height:`${M.h*w}px`}},e("button",{"aria-label":i.removeHighlightText,onClick:B(A),onMouseDown:O,onMouseUp:O,type:"button"},e(c,null))))))),e(a,{options:i,action:p,setAction:h}))},"ScreenshotEditor");return o(function({onError:p}){const[h,m]=t.useState();return s({onBeforeScreenshot:t.useCallback(()=>{l.display="none"},[]),onScreenshot:t.useCallback((_,y)=>{Ut(ce.createElement("canvas"),{alpha:!1},(v,S)=>{S.scale(y,y),v.width=_.videoWidth,v.height=_.videoHeight,S.drawImage(_,0,0,v.width,v.height),m({canvas:v,dpi:y})}),n.width=_.videoWidth,n.height=_.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{l.display="block"},[]),onError:t.useCallback(_=>{l.display="block",p(_)},[])}),h?e(f,{screenshot:h}):e("div",null)},"Wrapper")}o(l0,"ScreenshotEditorFactory");var d0=o((()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:o(({h:e,hooks:t,dialog:n,options:r})=>{const i=ce.createElement("canvas");return{input:l0({h:e,hooks:t,outputBuffer:i,dialog:n,options:r}),value:o(async()=>{const s=await new Promise(a=>{i.toBlob(a,"image/png")});if(s)return{data:new Uint8Array(await s.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}},"value")}},"createInput")})),"feedbackScreenshotIntegration"),L=$,Fa=0;function Ph(){return Fa>0}o(Ph,"shouldIgnoreOnError");function f0(){Fa++,setTimeout(()=>{Fa--})}o(f0,"ignoreNextOnError");function dr(e,t={}){function n(i){return typeof i=="function"}if(o(n,"isFunction"),!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const i=e.__sentry_wrapped__;return typeof i=="function"?i:e}if(oc(e))return e}catch{return e}const r=o(function(...i){$._sentryWrappedDepth=($._sentryWrappedDepth||0)+1;try{const s=i.map(a=>dr(a,t));return e.apply(this,s)}catch(s){throw f0(),Ke(a=>{a.addEventProcessor(c=>(t.mechanism&&(ha(c,void 0,void 0),pt(c,t.mechanism)),c.extra={...c.extra,arguments:i},c)),me(s)}),s}finally{$._sentryWrappedDepth=($._sentryWrappedDepth||0)-1}},"sentryWrapped");try{for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i])}catch{}ff(r,e),Ce(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}o(dr,"wrap");function Mo(){const e=Kt(),{referrer:t}=L.document||{},{userAgent:n}=L.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}o(Mo,"getHttpRequestData");var p0=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","moduleMetadataIntegration","instrumentAnthropicAiClient","instrumentOpenAiClient","instrumentGoogleGenAIClient","instrumentStateGraph","instrumentLangGraph","createLangChainCallbackHandler","instrumentLangChainEmbeddings"],h0={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};function m0(e){return h0[e]||e.replace("Integration","").toLowerCase()}o(m0,"getBundleName");var Xl=L;async function g0(e,t){const n=p0.includes(e)?m0(e):void 0,r=Xl.Sentry=Xl.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const i=r[e];if(typeof i=="function"&&!("_isShim"in i))return i;const s=_0(n),a=L.document.createElement("script");a.src=s,a.crossOrigin="anonymous",a.referrerPolicy="strict-origin",t&&a.setAttribute("nonce",t);const c=new Promise((d,p)=>{a.addEventListener("load",()=>d()),a.addEventListener("error",p)}),u=L.document.currentScript,l=L.document.body||L.document.head||u?.parentElement;if(l)l.appendChild(a);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await c}catch{throw new Error(`Error when loading integration: ${e}`)}const f=r[e];if(typeof f!="function")throw new Error(`Could not load integration: ${e}`);return f}o(g0,"lazyLoadIntegration");function _0(e){const t=R()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${qr}/${e}.min.js`,t).toString()}o(_0,"getScriptURL");var Vx=Ih({lazyLoadIntegration:g0}),Yx=Ih({getModalIntegration:o(()=>i0,"getModalIntegration"),getScreenshotIntegration:o(()=>d0,"getScreenshotIntegration")});function Dc(e,t){const n=hs(e,t),r={type:E0(t),value:T0(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}o(Dc,"exceptionFromError");function y0(e,t,n,r){const i=R()?.getOptions().normalizeDepth,s=C0(t),a={__serialized__:mf(t,i)};if(s)return{exception:{values:[Dc(e,s)]},extra:a};const c={exception:{values:[{type:Yo(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:k0(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=hs(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}o(y0,"eventFromPlainObject");function Qs(e,t){return{exception:{values:[Dc(e,t)]}}}o(Qs,"eventFromError");function hs(e,t){const n=t.stacktrace||t.stack||"",r=S0(t),i=b0(t);try{return e(n,r,i)}catch{}return[]}o(hs,"parseStackFrames");var v0=/Minified React error #\d+;/i;function S0(e){return e&&v0.test(e.message)?1:0}o(S0,"getSkipFirstStackStringLines");function b0(e){return typeof e.framesToPop=="number"?e.framesToPop:0}o(b0,"getPopFirstTopFrames");function Dh(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}o(Dh,"isWebAssemblyException");function E0(e){const t=e?.name;return!t&&Dh(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}o(E0,"extractType");function T0(e){const t=e?.message;return Dh(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?al(t.error):al(e):"No error message"}o(T0,"extractMessage");function I0(e,t,n,r){const i=ms(e,t,n?.syntheticException||void 0,r);return pt(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),di(i)}o(I0,"eventFromException");function w0(e,t,n="info",r,i){const s=$a(e,t,r?.syntheticException||void 0,i);return s.level=n,r?.event_id&&(s.event_id=r.event_id),di(s)}o(w0,"eventFromMessage");function ms(e,t,n,r,i){let s;if(df(t)&&t.error)return Qs(e,t.error);if(mu(t)||Rg(t)){const a=t;if("stack"in t){s=Qs(e,t);const c=s.exception?.values?.[0];if(r&&n&&c&&!c.stacktrace){const u=hs(e,n);u.length&&(c.stacktrace={frames:u},pt(s,{synthetic:!0}))}}else{const c=a.name||(mu(a)?"DOMError":"DOMException"),u=a.message?`${c}: ${a.message}`:c;s=$a(e,u,n,r),ha(s,u)}return"code"in a&&(s.tags={...s.tags,"DOMException.code":`${a.code}`}),s}return De(t)?Qs(e,t):Pe(t)||Yo(t)?(s=y0(e,t,n,i),pt(s,{synthetic:!0}),s):(s=$a(e,t,n,r),ha(s,`${t}`,void 0),pt(s,{synthetic:!0}),s)}o(ms,"eventFromUnknownInput");function $a(e,t,n,r){const i={};if(r&&n){const s=hs(e,n);s.length&&(i.exception={values:[{value:t,stacktrace:{frames:s}}]}),pt(i,{synthetic:!0})}if(Vo(t)){const{__sentry_template_string__:s,__sentry_template_values__:a}=t;return i.logentry={message:s,params:a},i}return i.message=t,i}o($a,"eventFromString");function k0(e,{isUnhandledRejection:t}){const n=Ag(e),r=t?"promise rejection":"exception";return df(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Yo(e)?`Event \`${R0(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}o(k0,"getNonErrorObjectExceptionValue");function R0(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}o(R0,"getObjectClassName");function C0(e){return Object.values(e).find(De)}o(C0,"getErrorPropertyFromObject");var A0=class extends $v{static{o(this,"BrowserClient")}constructor(e){const t=M0(e),n=L.SENTRY_SDK_SOURCE||lv();rS(t,"browser",["browser"],n),super(t);const{userInfo:r}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:r?"auto":"never",...t._metadata.sdk.settings});const{sendClientReports:i}=this._options;L.document&&L.document.addEventListener("visibilitychange",()=>{L.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),r&&this.on("beforeSendSession",nS)}eventFromException(e,t){return I0(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return w0(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 M0(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:L.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}o(M0,"applyDefaultOptions");var ct=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,G=$,N0=o((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good","getRating"),Si=o((e,t,n,r)=>{let i,s;return a=>{t.value>=0&&(a||r)&&(s=t.value-(i??0),(s||i===void 0)&&(i=t.value,t.delta=s,t.rating=N0(t.value,n),e(t)))}},"bindReporter"),bi=o((e=!0)=>{const t=G.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},"getNavigationEntry"),kr=o(()=>bi()?.activationStart??0,"getActivationStart");function zt(e,t,n){G.document&&G.addEventListener(e,t,n)}o(zt,"addPageListener");function No(e,t,n){G.document&&G.removeEventListener(e,t,n)}o(No,"removePageListener");var tr=-1,Fh=new Set,x0=o(()=>G.document?.visibilityState==="hidden"&&!G.document?.prerendering?0:1/0,"initHiddenTime"),ao=o(e=>{if(O0(e)&&tr>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of Fh)t();isFinite(tr)||(tr=e.type==="visibilitychange"?e.timeStamp:0,No("prerenderingchange",ao,!0))}},"onVisibilityUpdate"),Ei=o(()=>{if(G.document&&tr<0){const e=kr();tr=(G.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>t.name==="hidden"&&t.startTime>e)[0]?.startTime)??x0(),zt("visibilitychange",ao,!0),zt("pagehide",ao,!0),zt("prerenderingchange",ao,!0)}return{get firstHiddenTime(){return tr},onHidden(e){Fh.add(e)}}},"getVisibilityWatcher");function O0(e){return e.type==="pagehide"||G.document?.visibilityState==="hidden"}o(O0,"isPageHidden");var L0=o(()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,"generateUniqueID"),Ti=o((e,t=-1)=>{const n=bi();let r="navigate";return n&&(G.document?.prerendering||kr()>0?r="prerender":G.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:L0(),navigationType:r}},"initMetric"),Zs=new WeakMap;function Fc(e,t){try{return Zs.get(e)||Zs.set(e,new t),Zs.get(e)}catch{return new t}}o(Fc,"initUnique");var P0=class{static{o(this,"LayoutShiftManager")}constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(e){if(e.hadRecentInput)return;const 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)}},Rr=o((e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(i=>{Promise.resolve().then(()=>{t(i.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},"observe"),$c=o(e=>{let t=!1;return()=>{t||(e(),t=!0)}},"runOnce"),gs=o(e=>{G.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},"whenActivated"),D0=[1800,3e3],F0=o((e,t={})=>{gs(()=>{const n=Ei(),r=Ti("FCP");let i;const a=Rr("paint",o(c=>{for(const u of c)u.name==="first-contentful-paint"&&(a.disconnect(),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-kr(),0),r.entries.push(u),i(!0)))},"handleEntries"));a&&(i=Si(e,r,D0,t.reportAllChanges))})},"onFCP"),$0=[.1,.25],B0=o((e,t={})=>{F0($c(()=>{const n=Ti("CLS",0);let r;const i=Ei(),s=Fc(t,P0),a=o(u=>{for(const l of u)s._processEntry(l);s._sessionValue>n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},"handleEntries"),c=Rr("layout-shift",a);c&&(r=Si(e,n,$0,t.reportAllChanges),i.onHidden(()=>{a(c.takeRecords()),r(!0)}),G?.setTimeout?.(r))}))},"onCLS"),$h=0,ea=1/0,Fi=0,U0=o(e=>{e.forEach(t=>{t.interactionId&&(ea=Math.min(ea,t.interactionId),Fi=Math.max(Fi,t.interactionId),$h=Fi?(Fi-ea)/7+1:0)})},"updateEstimate"),Ba,Bh=o(()=>Ba?$h:performance.interactionCount||0,"getInteractionCount"),H0=o(()=>{"interactionCount"in performance||Ba||(Ba=Rr("event",U0,{type:"event",buffered:!0,durationThreshold:0}))},"initInteractionCountPolyfill"),ta=10,Uh=0,W0=o(()=>Bh()-Uh,"getInteractionCountForNavigation"),j0=class{static{o(this,"InteractionManager")}constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){Uh=Bh(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const e=Math.min(this._longestInteractionList.length-1,Math.floor(W0()/50));return this._longestInteractionList[e]}_processEntry(e){if(this._onBeforeProcessingEntry?.(e),!(e.interactionId||e.entryType==="first-input"))return;const t=this._longestInteractionList.at(-1);let n=this._longestInteractionMap.get(e.interactionId);if(n||this._longestInteractionList.length<ta||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((r,i)=>i._latency-r._latency),this._longestInteractionList.length>ta){const r=this._longestInteractionList.splice(ta);for(const i of r)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(n)}}},Bc=o(e=>{const t=G.requestIdleCallback||G.setTimeout;G.document?.visibilityState==="hidden"?e():(e=$c(e),zt("visibilitychange",e,{once:!0,capture:!0}),zt("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),No("visibilitychange",e,{capture:!0}),No("pagehide",e,{capture:!0})}))},"whenIdleOrHidden"),q0=[200,500],z0=40,G0=o((e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=Ei();gs(()=>{H0();const r=Ti("INP");let i;const s=Fc(t,j0),a=o(u=>{Bc(()=>{for(const f of u)s._processEntry(f);const l=s._estimateP98LongestInteraction();l&&l._latency!==r.value&&(r.value=l._latency,r.entries=l.entries,i())})},"handleEntries"),c=Rr("event",a,{durationThreshold:t.durationThreshold??z0});i=Si(e,r,q0,t.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{a(c.takeRecords()),i(!0)}))})},"onINP"),V0=class{static{o(this,"LCPEntryManager")}_processEntry(e){this._onBeforeProcessingEntry?.(e)}},Y0=[2500,4e3],J0=o((e,t={})=>{gs(()=>{const n=Ei(),r=Ti("LCP");let i;const s=Fc(t,V0),a=o(u=>{t.reportAllChanges||(u=u.slice(-1));for(const l of u)s._processEntry(l),l.startTime<n.firstHiddenTime&&(r.value=Math.max(l.startTime-kr(),0),r.entries=[l],i())},"handleEntries"),c=Rr("largest-contentful-paint",a);if(c){i=Si(e,r,Y0,t.reportAllChanges);const u=$c(()=>{a(c.takeRecords()),c.disconnect(),i(!0)}),l=o(f=>{f.isTrusted&&(Bc(u),No(f.type,l,{capture:!0}))},"stopListeningWrapper");for(const f of["keydown","click","visibilitychange"])zt(f,l,{capture:!0})}})},"onLCP"),K0=[800,1800],Ua=o(e=>{G.document?.prerendering?gs(()=>Ua(e)):G.document?.readyState!=="complete"?addEventListener("load",()=>Ua(e),!0):setTimeout(e)},"whenReady"),X0=o((e,t={})=>{const n=Ti("TTFB"),r=Si(e,n,K0,t.reportAllChanges);Ua(()=>{const i=bi();i&&(n.value=Math.max(i.responseStart-kr(),0),n.entries=[i],r(!0))})},"onTTFB"),Br={},xo={},Hh,Wh,jh,qh;function _s(e,t=!1){return vs("cls",e,Z0,Hh,t)}o(_s,"addClsInstrumentationHandler");function ys(e,t=!1){return vs("lcp",e,ew,Wh,t)}o(ys,"addLcpInstrumentationHandler");function Q0(e){return vs("ttfb",e,tw,jh)}o(Q0,"addTtfbInstrumentationHandler");function Uc(e){return vs("inp",e,nw,qh)}o(Uc,"addInpInstrumentationHandler");function Xt(e,t){return zh(e,t),xo[e]||(rw(e),xo[e]=!0),Gh(e,t)}o(Xt,"addPerformanceInstrumentationHandler");function Ii(e,t){const n=Br[e];if(n?.length)for(const r of n)try{r(t)}catch(i){ct&&g.error(`Error while triggering instrumentation handler.
489
+ Type: ${e}
490
+ Name: ${xt(r)}
491
+ Error:`,i)}}o(Ii,"triggerHandlers");function Z0(){return B0(e=>{Ii("cls",{metric:e}),Hh=e},{reportAllChanges:!0})}o(Z0,"instrumentCls");function ew(){return J0(e=>{Ii("lcp",{metric:e}),Wh=e},{reportAllChanges:!0})}o(ew,"instrumentLcp");function tw(){return X0(e=>{Ii("ttfb",{metric:e}),jh=e})}o(tw,"instrumentTtfb");function nw(){return G0(e=>{Ii("inp",{metric:e}),qh=e})}o(nw,"instrumentInp");function vs(e,t,n,r,i=!1){zh(e,t);let s;return xo[e]||(s=n(),xo[e]=!0),r&&t({metric:r}),Gh(e,t,i?s:void 0)}o(vs,"addMetricObserver");function rw(e){const t={};e==="event"&&(t.durationThreshold=0),Rr(e,n=>{Ii(e,{entries:n})},t)}o(rw,"instrumentPerformanceObserver");function zh(e,t){Br[e]=Br[e]||[],Br[e].push(t)}o(zh,"addHandler");function Gh(e,t,n){return()=>{n&&n();const r=Br[e];if(!r)return;const i=r.indexOf(t);i!==-1&&r.splice(i,1)}}o(Gh,"getCleanupCallback");function iw(e){return"duration"in e}o(iw,"isPerformanceEventTiming");var ow=80,ln={};try{typeof Node<"u"&&(ln.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),typeof Element<"u"&&(ln.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,ln.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,ln.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,ln.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<"u"&&(ln.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function Bt(e,t,n){const r=ln[t];if(r)try{return r.call(e,n)}catch{}const i=e[t];return typeof i=="function"?i.call(e,n):i}o(Bt,"_safeRead");function Re(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,i=[];let s=0,a=0;const c=" > ",u=3;let l;const f=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||ow;for(;n&&s++<r&&(l=sw(n,f),!(l==="html"||s>1&&a+i.length*u+l.length>=d));)i.push(l),a+=l.length,n=Bt(n,"parentNode");return i.reverse().join(c)}catch{return"<unknown>"}}o(Re,"htmlTreeAsString");function sw(e,t){const n=[],r=Bt(e,"tagName");if(!r)return"";if(typeof HTMLElement<"u"&&e instanceof HTMLElement){const s=Bt(e,"dataset");if(s){if(s.sentryComponent)return s.sentryComponent;if(s.sentryElement)return s.sentryElement}}n.push(r.toLowerCase());const i=t?.length?t.filter(s=>Bt(e,"getAttribute",s)).map(s=>[s,Bt(e,"getAttribute",s)]):null;if(i?.length)i.forEach(s=>{n.push(`[${s[0]}="${s[1]}"]`)});else{const s=Bt(e,"id");s&&n.push(`#${s}`);const a=Bt(e,"className");if(a&&it(a)){const c=a.split(/\s+/);for(const u of c)n.push(`.${u}`)}}for(const s of["aria-label","type","name","title","alt"]){const a=Bt(e,"getAttribute",s);a&&n.push(`[${s}="${a}"]`)}return n.join("")}o(sw,"_htmlElementAsString");var aw=o(e=>{const t=o(n=>{(n.type==="pagehide"||G.document?.visibilityState==="hidden")&&e(n)},"onHiddenOrPageHide");zt("visibilitychange",t,{capture:!0,once:!0}),zt("pagehide",t,{capture:!0,once:!0})},"onHidden");function na(e){return typeof e=="number"&&isFinite(e)}o(na,"isMeasurementValue");function Qt(e,t,n,{...r}){const i=V(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),Zo(e,()=>{const s=nn({startTime:t,...r});return s&&s.end(n),s})}o(Qt,"startAndEndSpan");function Hc(e){const t=R();if(!t)return;const{name:n,transaction:r,attributes:i,startTime:s}=e,{release:a,environment:c}=t.getOptions(),{userInfo:u}=t.getDataCollectionOptions(),l=t.getIntegrationByName("Replay")?.getReplayId(),f=q(),d=f.getUser(),p=d!==void 0?d.email||d.id||d.ip_address:void 0;let h;try{h=f.getScopeData().contexts.profile.profile_id}catch{}const m={release:a,environment:c,user:p||void 0,profile_id:h||void 0,replay_id:l||void 0,transaction:r,"user_agent.original":G.navigator?.userAgent,"client.address":u?"{{auto}}":void 0,...i};return nn({name:n,attributes:m,startTime:s,experimental:{standalone:!0}})}o(Hc,"startStandaloneWebVitalSpan");function Dn(){return G.addEventListener&&G.performance}o(Dn,"getBrowserPerformanceAPI");function pe(e){return e/1e3}o(pe,"msToSec");function cw(e){let t="unknown",n="unknown",r="";for(const 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}}o(cw,"extractNetworkProtocol");function Ss(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}o(Ss,"supportsWebVital");function bs(e,t){let n,r=!1;function i(c){!r&&n&&t(c,n.spanContext().spanId,n),r=!0}o(i,"_runCollectorCallbackOnce"),aw(()=>{i("pagehide")});const s=e.on("beforeStartNavigationSpan",(c,u)=>{u?.isRedirect||(i("navigation"),s(),a())}),a=e.on("afterStartPageLoadSpan",c=>{n=c,a()})}o(bs,"listenForWebVitalReportEvents");function uw(e){let t=0,n;if(!Ss("layout-shift"))return;const r=_s(({metric:i})=>{const s=i.entries[i.entries.length-1];s&&(t=i.value,n=s)},!0);bs(e,(i,s)=>{lw(t,n,s,i),r()})}o(uw,"trackClsAsStandaloneSpan");function lw(e,t,n,r){ct&&g.log(`Sending CLS span (${e})`);const i=t?pe((Ee()||0)+t.startTime):ge(),s=q().getScopeData().transactionName,a=t?Re(t.sources[0]?.node):"Layout shift",c={[re]:"auto.http.browser.cls",[ve]:"ui.webvital.cls",[xn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((l,f)=>{c[`cls.source.${f+1}`]=Re(l.node)});const u=Hc({name:a,transaction:s,attributes:c,startTime:i});u&&(u.addEvent("cls",{[si]:"",[ai]:e}),u.end(i))}o(lw,"_sendStandaloneClsSpan");function wi(e){return e!=null&&e>0&&e<=6e4}o(wi,"isValidLcpMetric");function dw(e){let t=0,n;if(!Ss("largest-contentful-paint"))return;const r=ys(({metric:i})=>{const s=i.entries[i.entries.length-1];!s||!wi(i.value)||(t=i.value,n=s)},!0);bs(e,(i,s)=>{fw(t,n,s,i),r()})}o(dw,"trackLcpAsStandaloneSpan");function fw(e,t,n,r){if(!wi(e))return;ct&&g.log(`Sending LCP span (${e})`);const i=pe((Ee()||0)+(t?.startTime||0)),s=q().getScopeData().transactionName,a=t?Re(t.element):"Largest contentful paint",c={[re]:"auto.http.browser.lcp",[ve]:"ui.webvital.lcp",[xn]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(c["lcp.element"]=Re(t.element)),t.id&&(c["lcp.id"]=t.id),t.url&&(c["lcp.url"]=t.url),t.loadTime!=null&&(c["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(c["lcp.renderTime"]=t.renderTime),t.size!=null&&(c["lcp.size"]=t.size));const u=Hc({name:a,transaction:s,attributes:c,startTime:i});u&&(u.addEvent("lcp",{[si]:"millisecond",[ai]:e}),u.end(i))}o(fw,"_sendStandaloneLcpSpan");function qe(e){return e&&((Ee()||performance.timeOrigin)+e)/1e3}o(qe,"getAbsoluteTime$1");function Vh(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=cw(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return Ee()||Dn()?.timeOrigin?pw({...t,"http.request.redirect_start":qe(e.redirectStart),"http.request.redirect_end":qe(e.redirectEnd),"http.request.worker_start":qe(e.workerStart),"http.request.fetch_start":qe(e.fetchStart),"http.request.domain_lookup_start":qe(e.domainLookupStart),"http.request.domain_lookup_end":qe(e.domainLookupEnd),"http.request.connect_start":qe(e.connectStart),"http.request.secure_connection_start":qe(e.secureConnectionStart),"http.request.connection_end":qe(e.connectEnd),"http.request.request_start":qe(e.requestStart),"http.request.response_start":qe(e.responseStart),"http.request.response_end":qe(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}o(Vh,"resourceTimingToSpanAttributes");function pw(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}o(pw,"dropUndefinedKeysFromObject");var hw=2147483647,Ql=0,Le={},Oe,Oo;function mw({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Dn();if(r&&Ee()){r.mark&&G.performance.mark("sentry-tracing-init");const i=t?dw(n):t===!1?Sw():void 0,s=e?uw(n):e===!1?vw():void 0,a=bw(),c=Ew();return()=>{a(),c(),i?.(),s?.()}}return()=>{}}o(mw,"startTrackingWebVitals");function gw(){Xt("longtask",({entries:e})=>{const t=be();if(!t)return;const{op:n,start_timestamp:r}=V(t);for(const i of e){const s=pe(Ee()+i.startTime),a=pe(i.duration);n==="navigation"&&r&&s<r||Qt(t,s,s+a,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[re]:"auto.ui.browser.metrics"}})}})}o(gw,"startTrackingLongTasks");function _w(){new PerformanceObserver(e=>{const t=be();if(t)for(const n of e.getEntries()){if(!n.scripts[0])continue;const r=pe(Ee()+n.startTime),{start_timestamp:i,op:s}=V(t);if(s==="navigation"&&i&&r<i)continue;const a=pe(n.duration),c={[re]:"auto.ui.browser.metrics"},{invoker:u,invokerType:l,sourceURL:f,sourceFunctionName:d,sourceCharPosition:p}=n.scripts[0];c["browser.script.invoker"]=u,c["browser.script.invoker_type"]=l,f&&(c["code.filepath"]=f),d&&(c["code.function"]=d),p!==-1&&(c["browser.script.source_char_position"]=p),Qt(t,r,r+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}o(_w,"startTrackingLongAnimationFrames");function yw(){Xt("event",({entries:e})=>{const t=be();if(t){for(const n of e)if(n.name==="click"){const r=pe(Ee()+n.startTime),i=pe(n.duration),s={name:Re(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[re]:"auto.ui.browser.metrics"}},a=Mc(n.target);a&&(s.attributes["ui.component_name"]=a),Qt(t,r,r+i,s)}}})}o(yw,"startTrackingInteractions");function vw(){return _s(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Le.cls={value:e.value,unit:""},Oo=t)},!0)}o(vw,"_trackCLS");function Sw(){return ys(({metric:e})=>{const t=e.entries[e.entries.length-1];!t||!wi(e.value)||(Le.lcp={value:e.value,unit:"millisecond"},Oe=t)},!0)}o(Sw,"_trackLCP");function bw(){return Q0(({metric:e})=>{e.entries[e.entries.length-1]&&(Le.ttfb={value:e.value,unit:"millisecond"})})}o(bw,"_trackTtfb");function Ew(){return Xt("paint",({entries:e})=>{const t=Ei();for(const n of e){const r=n.startTime<t.firstHiddenTime;n.name==="first-paint"&&r&&(Le.fp={value:n.startTime,unit:"millisecond"}),n.name==="first-contentful-paint"&&r&&(Le.fcp={value:n.startTime,unit:"millisecond"})}})}o(Ew,"_trackFpFcp");function Tw(e,t){const n=Dn(),r=Ee();if(!n?.getEntries||!r)return;const{spanStreamingEnabled:i,ignorePerformanceApiSpans:s,ignoreResourceSpans:a}=t,c=pe(r),u=n.getEntries(),{op:l,start_timestamp:f}=V(e);u.slice(Ql).forEach(d=>{const p=pe(d.startTime),h=pe(Math.max(0,d.duration));if(!(l==="navigation"&&f&&c+p<f))switch(d.entryType){case"navigation":Cw(e,d,c);break;case"mark":case"paint":case"measure":kw(e,d,p,h,c,s);break;case"resource":Nw(e,d,d.name,p,h,c,a)}}),Ql=Math.max(u.length-1,0),xw(e,i)}o(Tw,"addPerformanceEntries");function Iw(e,t){const n=Ee();if(!Dn()?.getEntries||!n){Zl();return}const{spanStreamingEnabled:r,recordClsOnPageloadSpan:i,recordLcpOnPageloadSpan:s}=t,a=pe(n);if(V(e).op==="pageload"){if(Pw(Le),r){const c=o((u,l,f)=>{const d=f??`browser.web_vital.${u}.value`;e.setAttribute(d,l),ct&&g.log("Setting web vital attribute",{[d]:l},"on pageload span")},"setAttr");["ttfb","fp","fcp"].forEach(u=>{Le[u]&&c(u,Le[u].value)}),Le["ttfb.requestTime"]&&c("ttfb.requestTime",Le["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else i||delete Le.cls,s||delete Le.lcp,Object.entries(Le).forEach(([c,u])=>{Qf(c,u.value,u.unit,e)}),Ow(e,t);e.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",a),e.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",kr())}Zl()}o(Iw,"addWebVitalsToSpan");function Zl(){Oe=void 0,Oo=void 0,Le={}}o(Zl,"resetWebVitalState");function ww(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}o(ww,"isReact19MeasureEntry");function kw(e,t,n,r,i,s){if(ww(t)||["mark","measure"].includes(t.entryType)&&Ye(t.name,s))return;const a=bi(!1),c=pe(a?a.requestStart:0),u=i+Math.max(n,c),l=i+n,f=l+r,d={[re]:"auto.resource.browser.metrics"};u!==l&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=u),Rw(d,t),u<=f&&Qt(e,u,f,{name:t.name,op:t.entryType,attributes:d})}o(kw,"_addMeasureSpans");function Rw(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,i]of Object.entries(n))if(i&&ht(i))e[`sentry.browser.measure.detail.${r}`]=i;else if(i!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(i)}catch{}return}if(ht(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}o(Rw,"_addDetailToSpanAttributes");function Cw(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{$i(e,t,r,n)}),$i(e,t,"secureConnection",n,"TLS/SSL"),$i(e,t,"fetch",n,"cache"),$i(e,t,"domainLookup",n,"DNS"),Mw(e,t,n)}o(Cw,"_addNavigationSpans");function $i(e,t,n,r,i=n){const s=t[Aw(n)],a=t[`${n}Start`];!a||!s||Qt(e,r+pe(a),r+pe(s),{op:`browser.${i}`,name:t.name,attributes:{[re]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}o($i,"_addPerformanceNavigationTiming");function Aw(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}o(Aw,"_getEndPropertyNameForNavigationTiming");function Mw(e,t,n){const r=n+pe(t.requestStart),i=n+pe(t.responseEnd),s=n+pe(t.responseStart);t.responseEnd&&(Qt(e,r,i,{op:"browser.request",name:t.name,attributes:{[re]:"auto.ui.browser.metrics"}}),Qt(e,s,i,{op:"browser.response",name:t.name,attributes:{[re]:"auto.ui.browser.metrics"}}))}o(Mw,"_addRequest");function Nw(e,t,n,r,i,s,a){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const c=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(a?.includes(c))return;const u={[re]:"auto.resource.browser.metrics"},l=yn(n);l.protocol&&(u["url.scheme"]=l.protocol.split(":").pop()),l.host&&(u["server.address"]=l.host),u["url.same_origin"]=n.includes(G.location.origin),u[li]=n,Lw(t,u,[["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"]]);const f={...u,...Vh(t)},d=s+r,p=d+i;Qt(e,d,p,{name:n.replace(G.location.origin,""),op:c,attributes:f})}o(Nw,"_addResourceSpans");function xw(e,t){const n=G.navigator;if(!n)return;const 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),na(r.rtt)&&(t?e.setAttribute("network.connection.rtt",r.rtt):V(e).op==="pageload"&&Qf("connection.rtt",r.rtt,"millisecond"))),na(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),na(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}o(xw,"_trackNavigator");function Ow(e,t){Oe&&t.recordLcpOnPageloadSpan&&(Oe.element&&e.setAttribute("lcp.element",Re(Oe.element)),Oe.id&&e.setAttribute("lcp.id",Oe.id),Oe.url&&e.setAttribute("lcp.url",Oe.url.trim().slice(0,200)),Oe.loadTime!=null&&e.setAttribute("lcp.loadTime",Oe.loadTime),Oe.renderTime!=null&&e.setAttribute("lcp.renderTime",Oe.renderTime),e.setAttribute("lcp.size",Oe.size)),Oo?.sources&&t.recordClsOnPageloadSpan&&Oo.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,Re(n.node)))}o(Ow,"_setWebVitalAttributes");function Lw(e,t,n){n.forEach(([r,i])=>{const s=e[r];s!=null&&(typeof s=="number"&&s<hw||typeof s=="string")&&(t[i]=s)})}o(Lw,"_setResourceRequestAttributes");function Pw(e){const t=bi(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}o(Pw,"_addTtfbRequestTimeToMeasurements");var Dw="ElementTiming",Fw=o((()=>({name:Dw,setup(){!Dn()||!Ee()||Xt("element",({entries:e})=>{for(const t of e){const n=t;if(!n.identifier)continue;const r=n.identifier,i=n.name,s=n.renderTime,a=n.loadTime,c={"sentry.origin":"auto.ui.browser.element_timing","ui.element.identifier":r};i&&(c["ui.element.paint_type"]=i),n.id&&(c["ui.element.id"]=n.id),n.element&&(c["ui.element.type"]=n.element.tagName.toLowerCase()),n.url&&(c["ui.element.url"]=n.url),n.naturalWidth&&(c["ui.element.width"]=n.naturalWidth),n.naturalHeight&&(c["ui.element.height"]=n.naturalHeight),s>0&&Ra("ui.element.render_time",s,{unit:"millisecond",attributes:c}),a>0&&Ra("ui.element.load_time",a,{unit:"millisecond",attributes:c})}})}})),"_elementTimingIntegration"),Jx=Fw,ra=[],Ur=new Map,jn=new Map;function $w(){if(Dn()&&Ee()){const e=Bw();return()=>{e()}}return()=>{}}o($w,"startTrackingINP");var Xr={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 Bw(){return Uc(Uw)}o(Bw,"_trackINP");var Uw=o(({metric:e})=>{if(e.value==null)return;const t=pe(e.value);if(t>60)return;const n=e.entries.find(m=>m.duration===e.value&&Xr[m.name]);if(!n)return;const{interactionId:r}=n,i=Xr[n.name],s=pe(Ee()+n.startTime),a=be(),c=a?Se(a):void 0,u=r!=null?Ur.get(r):void 0,l=u?.span||c,f=l?V(l).description:q().getScopeData().transactionName,d=u?.elementName||Re(n.target),p={[re]:"auto.http.browser.inp",[ve]:`ui.interaction.${i}`,[xn]:n.duration},h=Hc({name:d,transaction:f,attributes:p,startTime:s});h&&(h.addEvent("inp",{[si]:"millisecond",[ai]:e.value}),h.end(s+t))},"_onInp");function Hw(e){return e!=null?Ur.get(e):void 0}o(Hw,"getCachedInteractionContext");function Ww(){const e=Object.keys(Xr);Yt()&&e.forEach(i=>{G.addEventListener(i,t,{capture:!0,passive:!0})});function t(i){const s=i.target;if(!s)return;const a=Re(s),c=Math.round(i.timeStamp);if(jn.set(c,a),jn.size>50){const u=jn.keys().next().value;u!==void 0&&jn.delete(u)}}o(t,"captureElementFromEvent");function n(i){const s=Math.round(i.startTime);let a=jn.get(s);if(!a)for(let c=-5;c<=5;c++){const u=jn.get(s+c);if(u){a=u;break}}return a||"<unknown>"}o(n,"resolveElementNameFromEntry");const r=o(({entries:i})=>{const s=be(),a=s&&Se(s);i.forEach(c=>{if(!iw(c))return;const u=c.interactionId;if(u==null||Ur.has(u))return;const l=c.target?Re(c.target):n(c);if(ra.length>10){const f=ra.shift();Ur.delete(f)}ra.push(u),Ur.set(u,{span:a,elementName:l})})},"handleEntries");Xt("event",r),Xt("first-input",r)}o(Ww,"registerInpInteractionListener");function Wc(e){const{name:t,op:n,origin:r,metricName:i,value:s,attributes:a,parentSpan:c,reportEvent:u,startTime:l,endTime:f}=e,d=q().getScopeData().transactionName,p={[re]:r,[ve]:n,[xn]:0,[`browser.web_vital.${i}.value`]:s,[op]:d,[mc]:d,"user_agent.original":G.navigator?.userAgent,...a};c&&_o(c).attributes?.["sentry.op"]==="pageload"&&(p["sentry.pageload.span_id"]=c.spanContext().spanId),u&&(p[`browser.web_vital.${i}.report_event`]=u);const h=nn({name:t,attributes:p,startTime:l,parentSpan:c});h&&h.end(f??l)}o(Wc,"_emitWebVitalSpan");function jw(e){let t=0,n;if(!Ss("largest-contentful-paint"))return;const r=ys(({metric:i})=>{const s=i.entries[i.entries.length-1];!s||!wi(i.value)||(t=i.value,n=s)},!0);bs(e,(i,s,a)=>{qw(t,n,a,i),r()})}o(jw,"trackLcpAsSpan");function qw(e,t,n,r){if(!wi(e))return;ct&&g.log(`Sending LCP span (${e})`);const i=Ee()||0,s=pe(i),a=pe(i+(t?.startTime||0)),c=t?Re(t.element):"Largest contentful paint",u={};t?.element&&(u["browser.web_vital.lcp.element"]=Re(t.element)),t?.id&&(u["browser.web_vital.lcp.id"]=t.id),t?.url&&(u["browser.web_vital.lcp.url"]=t.url),t?.loadTime!=null&&(u["browser.web_vital.lcp.load_time"]=t.loadTime),t?.renderTime!=null&&(u["browser.web_vital.lcp.render_time"]=t.renderTime),t?.size!=null&&(u["browser.web_vital.lcp.size"]=t.size),Wc({name:c,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:u,parentSpan:n,reportEvent:r,startTime:s,endTime:a})}o(qw,"_sendLcpSpan");function zw(e){let t=0,n;if(!Ss("layout-shift"))return;const r=_s(({metric:i})=>{const s=i.entries[i.entries.length-1];s&&(t=i.value,n=s)},!0);bs(e,(i,s,a)=>{Gw(t,n,a,i),r()})}o(zw,"trackClsAsSpan");function Gw(e,t,n,r){ct&&g.log(`Sending CLS span (${e})`);const i=t?pe((Ee()||0)+t.startTime):ge(),s=t?Re(t.sources[0]?.node):"Layout shift",a={};t?.sources&&t.sources.forEach((c,u)=>{a[`browser.web_vital.cls.source.${u+1}`]=Re(c.node)}),Wc({name:s,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:a,parentSpan:n,reportEvent:r,startTime:i})}o(Gw,"_sendClsSpan");function Vw(){if(!Dn()||!Ee())return;Uc(o(({metric:t})=>{if(t.value==null||pe(t.value)>60)return;const n=t.entries.find(r=>r.duration===t.value&&Xr[r.name]);n&&Yw(t.value,n)},"onInp"))}o(Vw,"trackInpAsSpan");function Yw(e,t){ct&&g.log(`Sending INP span (${e})`);const n=pe(Ee()+t.startTime),r=pe(e),i=Xr[t.name],s=Hw(t.interactionId),a=be(),c=a?Se(a):void 0,u=s?.span||c,l=u?_o(u).name:q().getScopeData().transactionName;Wc({name:s?.elementName||Re(t.target),op:`ui.interaction.${i}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[xn]:t.duration,[op]:l,[mc]:l},startTime:n,endTime:n+r,parentSpan:u})}o(Yw,"_sendInpSpan");var Jw=1e3,ed,Ha,Wa;function Yh(e){Zt("dom",e),en("dom",Kw)}o(Yh,"addClickKeypressInstrumentationHandler");function Kw(){if(!G.document)return;const e=Ge.bind(null,"dom"),t=td(e,!0);G.document.addEventListener("click",t,!1),G.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=G[n]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Ae(r,"addEventListener",function(i){return function(s,a,c){if(s==="click"||s=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},l=u[s]=u[s]||{refCount:0};if(!l.handler){const f=td(e);l.handler=f,i.call(this,s,f,c)}l.refCount++}catch{}return i.call(this,s,a,c)}}),Ae(r,"removeEventListener",function(i){return function(s,a,c){if(s==="click"||s=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},l=u[s];l&&(l.refCount--,l.refCount<=0&&(i.call(this,s,l.handler,c),l.handler=void 0,delete u[s]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,a,c)}}))})}o(Kw,"instrumentDOM");function Xw(e){if(e.type!==Ha)return!1;try{if(!e.target||e.target._sentryId!==Wa)return!1}catch{}return!0}o(Xw,"isSimilarToLastCapturedEvent");function Qw(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}o(Qw,"shouldSkipDOMEvent");function td(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Zw(n);if(Qw(n.type,r))return;Ce(n,"_sentryCaptured",!0),r&&!r._sentryId&&Ce(r,"_sentryId",ke());const i=n.type==="keypress"?"input":n.type;Xw(n)||(e({event:n,name:i,global:t}),Ha=n.type,Wa=r?r._sentryId:void 0),clearTimeout(ed),ed=G.setTimeout(()=>{Wa=void 0,Ha=void 0},Jw)}}o(td,"makeDOMEventHandler");function Zw(e){try{return e.target}catch{return null}}o(Zw,"getEventTarget$1");var Bi;function Es(e){const t="history";Zt(t,e),en(t,ek)}o(Es,"addHistoryInstrumentationHandler");function ek(){if(G.addEventListener("popstate",()=>{const t=G.location.href,n=Bi;Bi=t,n!==t&&Ge("history",{from:n,to:t})}),!qT())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const i=Bi,s=tk(String(r));if(Bi=s,i===s)return t.apply(this,n);Ge("history",{from:i,to:s})}return t.apply(this,n)}}o(e,"historyReplacementFunction"),Ae(G.history,"pushState",e),Ae(G.history,"replaceState",e)}o(ek,"instrumentHistory");function tk(e){try{return new URL(e,G.location.origin).toString()}catch{return e}}o(tk,"getAbsoluteUrl$1");var co={};function jc(e){const t=co[e];if(t)return t;let n=G[e];if(xa(n))return co[e]=n.bind(G);const r=G.document;if(r&&typeof r.createElement=="function")try{const i=r.createElement("iframe");i.hidden=!0,r.head.appendChild(i);const s=i.contentWindow;s?.[e]&&(n=s[e]),r.head.removeChild(i)}catch(i){ct&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,i)}return n&&(co[e]=n.bind(G))}o(jc,"getNativeImplementation");function nk(e){co[e]=void 0}o(nk,"clearCachedImplementation");function ki(...e){return jc("setTimeout")(...e)}o(ki,"setTimeout$3");var Rt="__sentry_xhr_v3__";function qc(e){Zt("xhr",e),en("xhr",rk)}o(qc,"addXhrInstrumentationHandler");function rk(){if(!G.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const i=new Error,s=ge()*1e3,a=it(r[0])?r[0].toUpperCase():void 0,c=ik(r[1]);if(!a||!c)return t.apply(n,r);n[Rt]={method:a,url:c,request_headers:{}},a==="POST"&&c.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const u=o(()=>{const l=n[Rt];if(l&&n.readyState===4){try{l.status_code=n.status}catch{}const f={endTimestamp:ge()*1e3,startTimestamp:s,xhr:n,virtualError:i};Ge("xhr",f),n.removeEventListener("readystatechange",u)}},"onreadystatechangeHandler");return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(l,f,d){return u(),l.apply(f,d)}}):n.addEventListener("readystatechange",u),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(l,f,d){const[p,h]=d,m=f[Rt];return m&&it(p)&&it(h)&&(m.request_headers[p.toLowerCase()]=h),l.apply(f,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const i=n[Rt];if(!i)return t.apply(n,r);r[0]!==void 0&&(i.body=r[0]);const s={startTimestamp:ge()*1e3,xhr:n};return Ge("xhr",s),t.apply(n,r)}})}o(rk,"instrumentXHR");function ik(e){if(it(e))return e;try{return e.toString()}catch{}}o(ik,"parseXhrUrlArg");var ok=Symbol.for("sentry__originalRequestBody");function Jh(e){return new URLSearchParams(e).toString()}o(Jh,"serializeFormData");function Lo(e,t=g){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[Jh(e)];if(!e)return[void 0]}catch(n){return ct&&t.error(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return ct&&t.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}o(Lo,"getBodyString");function zc(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){const t=e[0][ok];return t!==void 0?t:void 0}}o(zc,"getFetchRequestArgBody");function Kh(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return ct&&g.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r
492
+ `).reduce((n,r)=>{const[i,s]=r.split(": ");return s&&(n[i.toLowerCase()]=s),n},{}):{}}o(Kh,"parseXhrResponseHeaders");function sk(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch{return!1}}o(sk,"isElement$2");function Kx(e){try{return new URL(e,G.location.origin).toString()}catch{return e}}o(Kx,"getAbsoluteUrl");var ak=40;function Xh(e,t=jc("fetch")){let n=0,r=0;async function i(s){const a=s.body.length;n+=a,r++;const c={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const u=await t(e.url,c);return{statusCode:u.status,headers:{"x-sentry-rate-limits":u.headers.get("X-Sentry-Rate-Limits"),"retry-after":u.headers.get("Retry-After")}}}catch(u){throw nk("fetch"),u}finally{n-=a,r--}}return o(i,"makeRequest"),Av(e,i,vc(e.bufferSize||ak))}o(Xh,"makeFetchTransport");var T=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function ck(){const e=R();if(!e){T&&g.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){T&&g.warn("BrowserProfiling integration is not available");return}e.emit("startUIProfiler")}o(ck,"startProfiler");function uk(){const e=R();if(!e){T&&g.warn("No Sentry client available, profiling is not started");return}if(!e.getIntegrationByName("BrowserProfiling")){T&&g.warn("ProfilingIntegration is not available");return}e.emit("stopUIProfiler")}o(uk,"stopProfiler");var Xx={startProfiler:ck,stopProfiler:uk},lk=10,dk=20,fk=30,pk=40,hk=50;function fr(e,t,n,r){const i={filename:e,function:t==="<anonymous>"?"?":t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}o(fr,"createFrame");var mk=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,gk=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,_k=/\((\S*)(?::(\d+))(?::(\d+))\)/,yk=/at (.+?) ?\(data:(.+?),/,vk=o(e=>{const t=e.match(yk);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=mk.exec(e);if(n){const[,i,s,a]=n;return fr(i,"?",+s,+a)}const r=gk.exec(e);if(r){if(r[2]?.indexOf("eval")===0){const a=_k.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[i,s]=Qh(r[1]||"?",r[2]);return fr(s,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},"chromeStackParserFn"),Sk=[fk,vk],bk=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ek=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Tk=o(e=>{const t=bk.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=Ek.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let n=t[3],r=t[1]||"?";return[r,n]=Qh(r,n),fr(n,r,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},"gecko"),Ik=[hk,Tk],wk=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,kk=o(e=>{const t=wk.exec(e);return t?fr(t[2],t[1]||"?",+t[3],t[4]?+t[4]:void 0):void 0},"winjs"),Qx=[pk,kk],Rk=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,Ck=o(e=>{const t=Rk.exec(e);return t?fr(t[2],t[3]||"?",+t[1]):void 0},"opera10"),Zx=[lk,Ck],Ak=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,Mk=o(e=>{const t=Ak.exec(e);return t?fr(t[5],t[3]||t[4]||"?",+t[1],+t[2]):void 0},"opera11"),eO=[dk,Mk],Nk=[Sk,Ik],xk=af(...Nk),Qh=o((e,t)=>{const 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]},"extractSafariExtensionDetails");function tO(e,{metadata:t,tunnel:n,dsn:r}){const i={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:vt(r)}},s=Ok(e);return Xe(i,[s])}o(tO,"createUserFeedbackEnvelope");function Ok(e){return[{type:"user_report"},e]}o(Ok,"createUserFeedbackEnvelopeItem");var Ui=1024,Lk="Breadcrumbs",Pk=o(((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Lk,setup(n){t.console&&Sc(Bk(n)),t.dom&&Yh($k(n,t.dom)),t.xhr&&qc(Uk(n)),t.fetch&&fs(Hk(n)),t.history&&Es(Wk(n)),t.sentry&&n.on("beforeSendEvent",Fk(n))}}}),"_breadcrumbsIntegration"),Dk=Pk;function Fk(e){return o(function(n){R()===e&&Ot({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:dn(n)},{event:n})},"addSentryBreadcrumb")}o(Fk,"_getSentryBreadcrumbHandler");function $k(e,t){return o(function(r){if(R()!==e)return;let i,s,a=typeof t=="object"?t.serializeAttribute:void 0,c=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;c&&c>Ui&&(T&&g.warn(`\`dom.maxStringLength\` cannot exceed ${Ui}, but a value of ${c} was configured. Sentry will use ${Ui} instead.`),c=Ui),typeof a=="string"&&(a=[a]);try{const l=r.event,f=jk(l)?l.target:l;i=Re(f,{keyAttrs:a,maxStringLength:c}),s=Mc(f)}catch{i="<unknown>"}if(i.length===0)return;const u={category:`ui.${r.name}`,message:i};s&&(u.data={"ui.component_name":s}),Ot(u,{event:r.event,name:r.name,global:r.global})},"_innerDomBreadcrumb")}o($k,"_getDomBreadcrumbHandler");function Bk(e){return o(function(n){if(R()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:Io(n.level),message:ho(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${ho(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Ot(r,{input:n.args,level:n.level})},"_consoleBreadcrumb")}o(Bk,"_getConsoleBreadcrumbHandler");function Uk(e){return o(function(n){if(R()!==e)return;const{startTimestamp:r,endTimestamp:i}=n,s=n.xhr[Rt];if(!r||!i||!s)return;const{method:a,url:c,status_code:u,body:l}=s,f={method:a,url:c,status_code:u},d={xhr:n.xhr,input:l,startTimestamp:r,endTimestamp:i},p={category:"xhr",data:f,type:"http",level:ph(u)};e.emit("beforeOutgoingRequestBreadcrumb",p,d),Ot(p,d)},"_xhrBreadcrumb")}o(Uk,"_getXhrBreadcrumbHandler");function Hk(e){return o(function(n){if(R()!==e)return;const{startTimestamp:r,endTimestamp:i}=n;if(i&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:i},a={category:"fetch",data:n.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,s),Ot(a,s)}else{const s=n.response,a={...n.fetchData,status_code:s?.status},c={input:n.args,response:s,startTimestamp:r,endTimestamp:i},u={category:"fetch",data:a,type:"http",level:ph(a.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",u,c),Ot(u,c)}},"_fetchBreadcrumb")}o(Hk,"_getFetchBreadcrumbHandler");function Wk(e){return o(function(n){if(R()!==e)return;let r=n.from,i=n.to;const s=yn(L.location.href);let a=r?yn(r):void 0;const c=yn(i);a?.path||(a=s),s.protocol===c.protocol&&s.host===c.host&&(i=c.relative),s.protocol===a.protocol&&s.host===a.host&&(r=a.relative),Ot({category:"navigation",data:{from:r,to:i}})},"_historyBreadcrumb")}o(Wk,"_getHistoryBreadcrumbHandler");function jk(e){return!!e&&!!e.target}o(jk,"_isEvent");var qk="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(","),zk="BrowserApiErrors",Gk=o(((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:zk,setupOnce(){t.setTimeout&&Ae(L,"setTimeout",nd),t.setInterval&&Ae(L,"setInterval",nd),t.requestAnimationFrame&&Ae(L,"requestAnimationFrame",Yk),t.XMLHttpRequest&&"XMLHttpRequest"in L&&Ae(XMLHttpRequest.prototype,"send",Jk);const n=t.eventTarget;n&&(Array.isArray(n)?n:qk).forEach(r=>Kk(r,t))}}}),"_browserApiErrorsIntegration"),Vk=Gk;function nd(e){return function(...t){const n=t[0];return t[0]=dr(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${xt(e)}`}}),e.apply(this,t)}}o(nd,"_wrapTimeFunction");function Yk(e){return function(t){return e.apply(this,[dr(t,{mechanism:{data:{handler:xt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}o(Yk,"_wrapRAF");function Jk(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(r=>{r in n&&typeof n[r]=="function"&&Ae(n,r,function(i){const s={mechanism:{data:{handler:xt(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${r}`}},a=oc(i);return a&&(s.mechanism.data.handler=xt(a)),dr(i,s)})}),e.apply(this,t)}}o(Jk,"_wrapXHR$1");function Kk(e,t){const n=L[e]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(Ae(n,"addEventListener",function(r){return function(i,s,a){try{Xk(s)&&(s.handleEvent=dr(s.handleEvent,{mechanism:{data:{handler:xt(s),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&Qk(this,i,s),r.apply(this,[i,dr(s,{mechanism:{data:{handler:xt(s),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Ae(n,"removeEventListener",function(r){return function(i,s,a){try{if(Object.prototype.hasOwnProperty.call(s,"__sentry_wrapped__")){const c=s.__sentry_wrapped__;c&&r.call(this,i,c,a)}}catch{}return r.call(this,i,s,a)}}))}o(Kk,"_wrapEventTarget");function Xk(e){return typeof e.handleEvent=="function"}o(Xk,"isEventListenerObject");function Qk(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}o(Qk,"unregisterOriginalCallback");var Zk=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof L.document>"u"){T&&g.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}qu({ignoreDuration:!0});let n=!1;Bc(()=>{n||(Us(),n=!0)});const r=he();let i=r.getUser();r.addScopeListener(s=>{const a=s.getUser();(i?.id!==a?.id||i?.ip_address!==a?.ip_address)&&(i=a,n&&Us())}),t==="route"&&Es(({from:s,to:a})=>{s!==a&&(qu({ignoreDuration:!0}),Us(),n=!0)})}}},eR="CultureContext",tR=o((()=>({name:eR,preprocessEvent(e){const t=rd();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=rd();t&&Vt(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})),"_cultureContextIntegration"),nR=tR;function rd(){try{const e=L.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}o(rd,"getCultureContext");var rR="GlobalHandlers",iR=o(((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:rR,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(sR(n),id("onerror")),t.onunhandledrejection&&(aR(n),id("onunhandledrejection"))}}}),"_globalHandlersIntegration"),oR=iR;function sR(e){cf(t=>{const{stackParser:n,attachStacktrace:r}=tm();if(R()!==e||Ph())return;const{msg:i,url:s,line:a,column:c,error:u}=t,l=cR(ms(n,u||i,void 0,r,!1),s,a,c);l.level="error",fi(l,{originalException:u,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}o(sR,"_installGlobalOnErrorHandler");function aR(e){uf(t=>{const{stackParser:n,attachStacktrace:r}=tm();if(R()!==e||Ph())return;const i=Zh(t),s=ht(i)?em(i):ms(n,i,void 0,r,!0);s.level="error",fi(s,{originalException:i,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}o(aR,"_installGlobalOnUnhandledRejectionHandler");function Zh(e){if(ht(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}o(Zh,"_getUnhandledRejectionError");function em(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}o(em,"_eventFromRejectionWithPrimitive");function cR(e,t,n,r){const i=e.exception=e.exception||{},s=i.values=i.values||[],a=s[0]=s[0]||{},c=a.stacktrace=a.stacktrace||{},u=c.frames=c.frames||[];return u.length===0&&u.push({colno:r,lineno:n,filename:uR(t)??Kt(),function:"?",in_app:!0}),e}o(cR,"_enhanceEventWithInitialFrame");function id(e){T&&g.log(`Global Handler attached: ${e}`)}o(id,"globalHandlerLog");function tm(){return R()?.getOptions()||{stackParser:o(()=>[],"stackParser"),attachStacktrace:!1}}o(tm,"getOptions");function uR(e){if(!(!it(e)||e.length===0))return e.startsWith("data:")?`<${ot(e,!1)}>`:e}o(uR,"getFilenameFromUrl");var lR=()=>({name:"HttpContext",preprocessEvent(e){if(!L.navigator&&!L.location&&!L.document)return;const t=Mo(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){const t=e.attributes?.[ve];if(!L.navigator&&!L.location&&!L.document)return;const n=Mo();Vt(e,{[li]:t!=="http.client"?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}}),dR="cause",fR=5,pR="LinkedErrors",hR=o(((e={})=>{const t=e.limit||fR,n=e.key||dR;return{name:pR,preprocessEvent(r,i,s){const a=s.getOptions();bS(Dc,a.stackParser,n,t,r,i)}}}),"_linkedErrorsIntegration"),mR=hR,gR=/^HTML(\w*)Element$/;function _R(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(sk(e)){const t=yR(e);if(gR.test(t))return`[HTMLElement: ${Re(e)}]`}}o(_R,"normalizeStringifyValue");function yR(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}o(yR,"getConstructorName");function vR(){return SR()?(T&&Dt(()=>{}),!0):!1}o(vR,"checkAndWarnIfIsEmbeddedBrowserExtension");function SR(){if(typeof L.window>"u")return!1;const e=L;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const t=Kt();return!(L===L.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}o(SR,"_isEmbeddedBrowserExtension");function bR(e){return[pS(),uS(),bb(),Vk(),Dk(),oR(),mR(),NS(),lR(),nR(),Zk()]}o(bR,"getDefaultIntegrations");function nO(e={}){const t=!e.skipBrowserExtensionCheck&&vR();let n=e.defaultIntegrations==null?bR():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:Eg(e.stackParser||xk),integrations:ov({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Xh};return Lg(_R),jv(A0,r)}o(nO,"init");function rO(){}o(rO,"forceLoad");function iO(e){e()}o(iO,"onLoad");function oO(e={}){const t=L.document,n=t?.head||t?.body;if(!n){T&&g.error("[showReportDialog] Global document not defined");return}const r=q(),i=R()?.getDsn();if(!i){T&&g.error("[showReportDialog] DSN not configured");return}const s={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||Qy()},a=L.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=rv(i,s);const{onLoad:c,onClose:u}=s;if(c&&(a.onload=c),u){const l=o(f=>{if(f.data==="__sentry_reportdialog_closed__")try{u()}finally{L.removeEventListener("message",l)}},"reportDialogClosedMessageHandler");L.addEventListener("message",l)}n.appendChild(a)}o(oO,"showReportDialog");var ER=$,TR="ReportingObserver",od=new WeakMap,IR=o(((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(od.has(R()))for(const i of r)Ke(s=>{s.setExtra("url",i.url);const a=`ReportingObserver [${i.type}]`;let c="No details available";if(i.body){const u={};for(const l in i.body)u[l]=i.body[l];if(s.setExtra("body",u),i.type==="crash"){const l=i.body;c=[l.crashId||"",l.reason||""].join(" ").trim()||c}else c=i.body.message||c}Ky(`${a}: ${c}`)})}return o(n,"handler"),{name:TR,setupOnce(){GT()&&new ER.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){od.set(r,!0)}}}),"_reportingObserverIntegration"),sO=IR,wR="HttpClient",kR=o(((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:wR,setup(n){OR(n,t),LR(n,t)}}}),"_httpClientIntegration"),aO=kR;function RR(e,t,n,r,i){if(nm(e,n.status,n.url)){const s=PR(t,r);let a,c,u,l;const f=im();if(f.requestHeaders!==!1&&(a=Vr(sd(s.headers),f.requestHeaders)),f.responseHeaders!==!1&&(c=Vr(sd(n.headers),f.responseHeaders)),f.cookies!==!1){const p=s.headers.get("Cookie")||void 0;if(p){const m=wa(p,f.cookies);typeof m=="object"&&(u=m)}const h=n.headers.get("Set-Cookie")||void 0;if(h){const m=wa(h,f.cookies);typeof m=="object"&&(l=m)}}const d=rm({url:s.url,method:s.method,status:n.status,requestHeaders:a,responseHeaders:c,requestCookies:u,responseCookies:l,error:i,type:"fetch"});fi(d)}}o(RR,"_fetchResponseHandler");function CR(e,t,n,r,i){if(nm(e,t.status,t.responseURL)){let s,a,c;const u=im();if(u.cookies!==!1)try{const f=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;if(f){const d=wa(f,u.cookies);typeof d=="object"&&(a=d)}}catch{}if(u.responseHeaders!==!1)try{c=Vr(MR(t),u.responseHeaders)}catch{}u.requestHeaders!==!1&&(s=Vr(r,u.requestHeaders));const l=rm({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:c,responseCookies:a,error:i,type:"xhr"});fi(l)}}o(CR,"_xhrResponseHandler");function AR(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}o(AR,"_getResponseSizeFromHeaders");function sd(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}o(sd,"_extractFetchHeaders");function MR(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
493
+ `).reduce((n,r)=>{const[i,s]=r.split(": ");return i&&s&&(n[i]=s),n},{}):{}}o(MR,"_getXHRResponseHeaders");function NR(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}o(NR,"_isInGivenRequestTargets");function xR(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}o(xR,"_isInGivenStatusRanges");function OR(e,t){hh()&&fs(n=>{if(R()!==e)return;const{response:r,args:i,error:s,virtualError:a}=n,[c,u]=i;r&&RR(t,c,r,u,s||a)},!1)}o(OR,"_wrapFetch");function LR(e,t){"XMLHttpRequest"in $&&qc(n=>{if(R()!==e)return;const{error:r,virtualError:i}=n,s=n.xhr,a=s[Rt];if(!a)return;const{method:c,request_headers:u}=a;try{CR(t,s,c,u,r||i)}catch(l){T&&g.warn("Error while extracting response event form XHR response",l)}})}o(LR,"_wrapXHR");function nm(e,t,n){return xR(e.failedRequestStatusCodes,t)&&NR(e.failedRequestTargets,n)&&!xp(n,R())}o(nm,"_shouldCaptureResponse");function rm(e){const t=R(),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}`,s={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:AR(e.responseHeaders)}}};return pt(s,{type:`auto.http.client.${e.type}`,handled:!1}),s}o(rm,"_createEvent");function PR(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}o(PR,"_getRequest");function im(){const e=R();if(!e)return{cookies:!1,requestHeaders:!1,responseHeaders:!1};const t=e.getOptions();if(t.dataCollection==null){const i=!!t.sendDefaultPii;return{cookies:i,requestHeaders:i,responseHeaders:i}}const{cookies:n,httpHeaders:r}=e.getDataCollectionOptions();return{cookies:n,requestHeaders:r.request,responseHeaders:r.response}}o(im,"_getDataCollectionSettings");var ia=$,DR=7,FR="ContextLines",$R=o(((e={})=>({name:FR,processEvent(t,n,r){return BR(t,e.frameContextLines??r?.getDataCollectionOptions().frameContextLines??DR)}})),"_contextLinesIntegration"),cO=$R;function BR(e,t){const n=ia.document,r=ia.location&&Np(ia.location.href);if(!n||!r)return e;const i=e.exception?.values;if(!i?.length)return e;const s=n.documentElement.innerHTML;if(!s)return e;const a=["<!DOCTYPE html>","<html>",...s.split(`
494
+ `),"</html>"];return i.forEach(c=>{const u=c.stacktrace;u?.frames&&(u.frames=u.frames.map(l=>UR(l,a,r,t)))}),e}o(BR,"addSourceContext");function UR(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Hg(t,e,r),e}o(UR,"applySourceContextToFrame");var HR="GraphQLClient",WR=o((e=>({name:HR,setup(t){jR(t,e),qR(t,e)}})),"_graphqlClientIntegration");function jR(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const i=V(n).data||{};if(i["sentry.op"]!=="http.client")return;const s=i["url.full"]||i["http.url"]||i.url,a=i["http.request.method"]||i["http.method"];if(!it(s)||!it(a))return;const{endpoints:c}=t,u=Ye(s,c),l=sm(r);if(u&&l){const f=am(l);if(f){const d=om(f);n.updateName(`${a} ${s} (${d})`),Ts(f)&&e.getDataCollectionOptions().graphQL.document===!0&&n.setAttribute(rp,f.query),Is(f)&&(n.setAttribute("graphql.persisted_query.hash.sha256",f.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",f.extensions.persistedQuery.version))}}})}o(jR,"_updateSpanWithGraphQLData");function qR(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:i,type:s,data:a}=n;if(s==="http"&&(i==="fetch"||i==="xhr")){const c=a?.url,{endpoints:u}=t,l=Ye(c,u),f=sm(r);if(l&&a&&f){const d=am(f);!a.graphql&&d&&(a["graphql.operation"]=om(d),Ts(d)&&e.getDataCollectionOptions().graphQL.document===!0&&(a[rp]=d.query),Is(d)&&(a["graphql.persisted_query.hash.sha256"]=d.extensions.persistedQuery.sha256Hash,a["graphql.persisted_query.version"]=d.extensions.persistedQuery.version))}}})}o(qR,"_updateBreadcrumbWithGraphQLData");function om(e){if(Is(e))return`persisted ${e.operationName}`;if(Ts(e)){const{query:t,operationName:n}=e,{operationName:r=n,operationType:i}=zR(t);return r?`${i} ${r}`:`${i}`}return"unknown"}o(om,"_getGraphQLOperation");function sm(e){const t="xhr"in e;let n;if(t){const r=e.xhr[Rt];n=r&&Lo(r.body)[0]}else{const r=zc(e.input);n=Lo(r)[0]}return n}o(sm,"getRequestPayloadXhrOrFetch");function zR(e){const 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]};const i=e.match(n);return i?{operationType:i[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}o(zR,"parseGraphQLQuery");function Ts(e){return Ve(e)&&typeof e.query=="string"}o(Ts,"isStandardRequest");function Is(e){return Ve(e)&&typeof e.operationName=="string"&&Ve(e.extensions)&&Ve(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}o(Is,"isPersistedRequest");function am(e){try{const t=JSON.parse(e);return Ts(t)||Is(t)?t:void 0}catch{return}}o(am,"getGraphQLRequestPayload");var uO=WR,lO=(e={})=>{const t=["script"];function n(r,i,s=0){if(!r)return;const a="shadowRoot"in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(const c of a){if(!(c instanceof HTMLElement))continue;const u=Mc(c,1)||void 0,l=c.tagName.toLowerCase();if(t.includes(l))continue;const f=e.onElement?.({element:c,componentName:u,tagName:l,depth:s})||{};if(f==="skip")continue;if(f==="children"){n(c,i,s+1);continue}const{x:d,y:p,width:h,height:m}=c.getBoundingClientRect(),_={identifier:c.id||void 0,type:u||l,visible:!0,alpha:1,height:m,width:h,x:d,y:p,...f};_.children=[],n(c,_.children,s+1),i.push(_)}}return o(n,"walk"),{name:"ViewHierarchy",processEvent:o((r,i)=>{if(r.type!==void 0||e.shouldAttach?.(r,i)===!1)return r;const s={rendering_system:"DOM",positioning:"absolute",windows:[]};n(e.rootElement?.()||L.document.body,s.windows);const a={filename:"view-hierarchy.json",attachmentType:"event.view_hierarchy",contentType:"application/json",data:JSON.stringify(s)};return i.attachments=i.attachments||[],i.attachments.push(a),r},"processEvent")}},fe=$,Gc="sentryReplaySession",GR="replay_event",Vc="Unable to send Replay",VR=3e5,YR=9e5,JR=5e3,KR=5500,XR=6e4,QR=5e3,ZR=3,ad=15e4,Hi=5e3,eC=3e3,tC=300,Yc=2e7,nC=4999,rC=5e4,cd=36e5,iC=Object.defineProperty,oC=o((e,t,n)=>t in e?iC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,"__defNormalProp$1"),ud=o((e,t,n)=>oC(e,typeof t!="symbol"?t+"":t,n),"__publicField$1"),Ie=(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))(Ie||{});function sC(e){return e.nodeType===e.ELEMENT_NODE}o(sC,"isElement$1");function Hr(e){return e?.host?.shadowRoot===e}o(Hr,"isShadowRoot");function Wr(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}o(Wr,"isNativeShadowDom");function aC(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}o(aC,"fixBrowserCompatibilityIssuesInCSS");function cC(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const 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(" ")+";"}o(cC,"escapeImportStatement");function Po(e){try{const t=e.rules||e.cssRules;return t?aC(Array.from(t,cm).join("")):null}catch{return null}}o(Po,"stringifyStylesheet");function uC(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,i=r[n],s=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${s?" !important":""};`}return`${e.selectorText} { ${t} }`}o(uC,"fixAllCssProperty");function cm(e){let t;if(dC(e))try{t=Po(e.styleSheet)||cC(e)}catch{}else if(fC(e)){let n=e.cssText;const r=e.selectorText.includes(":"),i=typeof e.style.all=="string"&&e.style.all;if(i&&(n=uC(e)),r&&(n=lC(n)),r||i)return n}return t||e.cssText}o(cm,"stringifyRule");function lC(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}o(lC,"fixSafariColons");function dC(e){return"styleSheet"in e}o(dC,"isCSSImportRule");function fC(e){return"selectorText"in e}o(fC,"isCSSStyleRule");var um=class{static{o(this,"Mirror$1")}constructor(){ud(this,"idNodeMap",new Map),ud(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){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function pC(){return new um}o(pC,"createMirror$1");function ws({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}o(ws,"shouldMaskInput");function Qr({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||"";return e?(r&&(i=r(i,t)),"*".repeat(i.length)):i}o(Qr,"maskInputValue");function pr(e){return e.toLowerCase()}o(pr,"toLowerCase");function ja(e){return e.toUpperCase()}o(ja,"toUpperCase");var ld="__rrweb_original__";function hC(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let i=0;i<e.height;i+=n){const s=t.getImageData,a=ld in s?s[ld]:s;if(new Uint32Array(a.call(t,r,i,Math.min(n,e.width-r),Math.min(n,e.height-i)).data.buffer).some(c=>c!==0))return!1}return!0}o(hC,"is2DCanvasBlank");function Jc(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?pr(t):null}o(Jc,"getInputType");function Do(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}o(Do,"getInputValue");function lm(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}o(lm,"extractFileExtension");var dd={};function dm(e){const t=dd[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const s=i.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(i)}catch{}return dd[e]=r.bind(window)}o(dm,"getImplementation$1");function qa(...e){return dm("setTimeout")(...e)}o(qa,"setTimeout$1$1");function fm(...e){return dm("clearTimeout")(...e)}o(fm,"clearTimeout$1");function pm(e){try{return e.contentDocument}catch{}}o(pm,"getIFrameContentDocument$1");function mC(e){try{return e.contentWindow}catch{}}o(mC,"getIFrameContentWindow$1");var gC=1,_C=new RegExp("[^a-z0-9-_:]"),Zr=-2;function Kc(){return gC++}o(Kc,"genId");function yC(e){if(e instanceof HTMLFormElement)return"form";const t=pr(e.tagName);return _C.test(t)?"div":t}o(yC,"getValidTagName");function vC(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}o(vC,"extractOrigin");var qn,fd,SC=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,bC=/^(?:[a-z+]+:)?\/\//i,EC=/^www\..*/i,TC=/^(data:)([^,]*),(.*)/i;function IC(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let i of n){if(i=i.trim(),!i)continue;const s=i.indexOf(":");if(s===-1){r.push(i);continue}const a=i.slice(0,s).trim();t.has(a)||r.push(i)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch{return e}}o(IC,"filterCSSPropertiesFromInlineStyle");function Fo(e,t){return(e||"").replace(SC,(n,r,i,s,a,c)=>{const u=i||a||c,l=r||s||"";if(!u)return n;if(bC.test(u)||EC.test(u))return`url(${l}${u}${l})`;if(TC.test(u))return`url(${l}${u}${l})`;if(u[0]==="/")return`url(${l}${vC(t)+u}${l})`;const f=t.split("/"),d=u.split("/");f.pop();for(const p of d)p!=="."&&(p===".."?f.pop():f.push(p));return`url(${l}${f.join("/")}${l})`})}o(Fo,"absoluteToStylesheet");var wC=/^[^ \t\n\r\u000c]+/,kC=/^[, \t\n\r\u000c]+/;function RC(e,t){if(t.trim()==="")return t;let n=0;function r(s){let a;const c=s.exec(t.substring(n));return c?(a=c[0],n+=a.length,a):""}o(r,"collectCharacters");const i=[];for(;r(kC),!(n>=t.length);){let s=r(wC);if(s.slice(-1)===",")s=Vn(e,s.substring(0,s.length-1)),i.push(s);else{let a="";s=Vn(e,s);let c=!1;for(;;){const u=t.charAt(n);if(u===""){i.push((s+a).trim());break}else if(c)u===")"&&(c=!1);else if(u===","){n+=1,i.push((s+a).trim());break}else u==="("&&(c=!0);a+=u,n+=1}}}return i.join(", ")}o(RC,"getAbsoluteSrcsetString");var pd=new WeakMap;function Vn(e,t){return!t||t.trim()===""?t:ks(e,t)}o(Vn,"absoluteToDoc");function CC(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}o(CC,"isSVGElement");function ks(e,t){let n=pd.get(e);if(n||(n=e.createElement("a"),pd.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}o(ks,"getHref");function hm(e,t,n,r,i,s,a){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return Vn(e,r);if(n==="xlink:href"&&r[0]!=="#")return Vn(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return Vn(e,r);if(n==="srcset")return RC(e,r);if(n==="style"){let c=Fo(r,ks(e));return a&&a.size>0&&(c=IC(c,a)),c}else if(t==="object"&&n==="data")return Vn(e,r);return typeof s=="function"?s(n,r,i):r}o(hm,"transformAttribute");function mm(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}o(mm,"ignoreAttribute");function AC(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 i=e.classList.length;i--;){const s=e.classList[i];if(t.test(s))return!0}if(n)return e.matches(n)}catch{}return!1}o(AC,"_isBlockedElement");function MC(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}o(MC,"elementClassMatchesRegex$1");function hn(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:hn(e.parentNode,t,n,r+1)}o(hn,"distanceToMatch$1");function Yn(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(MC(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}o(Yn,"createMatchPredicate$1");function hr(e,t,n,r,i,s){try{const a=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(a===null)return!1;if(a.tagName==="INPUT"){const l=a.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(l))return!0}let c=-1,u=-1;if(s){if(u=hn(a,Yn(r,i)),u<0)return!0;c=hn(a,Yn(t,n),u>=0?u:1/0)}else{if(c=hn(a,Yn(t,n)),c<0)return!1;u=hn(a,Yn(r,i),c>=0?c:1/0)}return c>=0?u>=0?c<=u:!0:u>=0?!1:!!s}catch{}return!!s}o(hr,"needMaskingText");function NC(e,t,n){const r=mC(e);if(!r)return;let i=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const c=qa(()=>{i||(t(),i=!0)},n);e.addEventListener("load",()=>{fm(c),i=!0,t()});return}const a="about:blank";if(r.location.href!==a||e.src===a||e.src==="")return qa(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}o(NC,"onceIframeLoaded");function xC(e,t,n){let r=!1,i;try{i=e.sheet}catch{i=null}if(i)return;const s=qa(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{fm(s),r=!0,t()})}o(xC,"onceStylesheetLoaded");function OC(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:a,maskAllText:c,maskAttributeFn:u,maskTextClass:l,unmaskTextClass:f,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:m={},maskTextFn:_,maskInputFn:y,dataURLOptions:v={},inlineImages:S,recordCanvas:k,keepIframeSrcFn:w,newlyAddedElement:x=!1,ignoreCSSAttributes:C}=t,b=LC(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Ie.Document,childNodes:[],compatMode:e.compatMode}:{type:Ie.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ie.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:b};case e.ELEMENT_NODE:return DC(e,{doc:n,blockClass:i,blockSelector:s,unblockSelector:a,inlineStylesheet:h,maskAttributeFn:u,maskInputOptions:m,maskInputFn:y,dataURLOptions:v,inlineImages:S,recordCanvas:k,keepIframeSrcFn:w,newlyAddedElement:x,rootId:b,maskTextClass:l,unmaskTextClass:f,maskTextSelector:d,unmaskTextSelector:p,ignoreCSSAttributes:C});case e.TEXT_NODE:return PC(e,{doc:n,maskAllText:c,maskTextClass:l,unmaskTextClass:f,maskTextSelector:d,unmaskTextSelector:p,maskTextFn:_,maskInputOptions:m,maskInputFn:y,rootId:b});case e.CDATA_SECTION_NODE:return{type:Ie.CDATA,textContent:"",rootId:b};case e.COMMENT_NODE:return{type:Ie.Comment,textContent:e.textContent||"",rootId:b};default:return!1}}o(OC,"serializeNode");function LC(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}o(LC,"getRootId");function PC(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:s,unmaskTextSelector:a,maskTextFn:c,maskInputOptions:u,maskInputFn:l,rootId:f}=t,d=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const h=d==="STYLE"?!0:void 0,m=d==="SCRIPT"?!0:void 0,_=d==="TEXTAREA"?!0:void 0;if(h&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=Po(e.parentNode.sheet))}catch{}p=Fo(p,ks(t.doc))}m&&(p="SCRIPT_PLACEHOLDER");const y=hr(e,r,s,i,a,n);return!h&&!m&&!_&&p&&y&&(p=c?c(p,e.parentElement):p.replace(/[\S]/g,"*")),_&&p&&(u.textarea||y)&&(p=l?l(p,e.parentNode):p.replace(/[\S]/g,"*")),d==="OPTION"&&p&&(p=Qr({isMasked:hr(e,r,s,i,a,ws({type:null,tagName:d,maskInputOptions:u})),element:e,value:p,maskInputFn:l})),{type:Ie.Text,textContent:p||"",isStyle:h,rootId:f}}o(PC,"serializeTextNode");function DC(e,t){const{doc:n,blockClass:r,blockSelector:i,unblockSelector:s,inlineStylesheet:a,maskInputOptions:c={},maskAttributeFn:u,maskInputFn:l,dataURLOptions:f={},inlineImages:d,recordCanvas:p,keepIframeSrcFn:h,newlyAddedElement:m=!1,rootId:_,maskTextClass:y,unmaskTextClass:v,maskTextSelector:S,unmaskTextSelector:k,ignoreCSSAttributes:w}=t,x=AC(e,r,i,s),C=yC(e);let b={};const H=e.attributes.length;for(let E=0;E<H;E++){const O=e.attributes[E];O.name&&!mm(C,O.name,O.value)&&(b[O.name]=hm(n,C,pr(O.name),O.value,e,u,w))}if(C==="link"&&a){const E=Array.from(n.styleSheets).find(M=>M.href===e.href);let O=null;E&&(O=Po(E)),O&&(b.rel=null,b.href=null,b.crossorigin=null,b._cssText=Fo(O,E.href))}if(C==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const E=Po(e.sheet);E&&(b._cssText=Fo(E,ks(n)))}if(C==="input"||C==="textarea"||C==="select"||C==="option"){const E=e,O=Jc(E),M=Do(E,ja(C),O),A=E.checked;if(O!=="submit"&&O!=="button"&&M){const K=hr(E,y,S,v,k,ws({type:O,tagName:ja(C),maskInputOptions:c}));b.value=Qr({isMasked:K,element:E,value:M,maskInputFn:l})}A&&(b.checked=A)}if(C==="option"&&(e.selected&&!c.select?b.selected=!0:delete b.selected),C==="canvas"&&p){if(e.__context==="2d")hC(e)||(b.rr_dataURL=e.toDataURL(f.type,f.quality));else if(!("__context"in e)){const E=e.toDataURL(f.type,f.quality),O=n.createElement("canvas");O.width=e.width,O.height=e.height,E!==O.toDataURL(f.type,f.quality)&&(b.rr_dataURL=E)}}if(C==="img"&&d){qn||(qn=n.createElement("canvas"),fd=qn.getContext("2d"));const E=e,O=E.currentSrc||E.getAttribute("src")||"<unknown-src>",M=E.crossOrigin,A=o(()=>{E.removeEventListener("load",A);try{qn.width=E.naturalWidth,qn.height=E.naturalHeight,fd.drawImage(E,0,0),b.rr_dataURL=qn.toDataURL(f.type,f.quality)}catch{if(E.crossOrigin!=="anonymous"){E.crossOrigin="anonymous",E.complete&&E.naturalWidth!==0?A():E.addEventListener("load",A);return}}E.crossOrigin==="anonymous"&&(M?b.crossOrigin=M:E.removeAttribute("crossorigin"))},"recordInlineImage");E.complete&&E.naturalWidth!==0?A():E.addEventListener("load",A)}if((C==="audio"||C==="video")&&(b.rr_mediaState=e.paused?"paused":"played",b.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(b.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(b.rr_scrollTop=e.scrollTop)),x){const{width:E,height:O}=e.getBoundingClientRect();b={class:b.class,rr_width:`${E}px`,rr_height:`${O}px`}}C==="iframe"&&!h(b.src)&&(!x&&!pm(e)&&(b.rr_src=b.src),delete b.src);let B;try{customElements.get(C)&&(B=!0)}catch{}return{type:Ie.Element,tagName:C,attributes:b,childNodes:[],isSVG:CC(e)||void 0,needBlock:x,rootId:_,isCustom:B}}o(DC,"serializeElementNode");function de(e){return e==null?"":e.toLowerCase()}o(de,"lowerIfExists");function FC(e,t){if(t.comment&&e.type===Ie.Comment)return!0;if(e.type===Ie.Element){if(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"&&lm(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(de(e.attributes.name).match(/^msapplication-tile(image|color)$/)||de(e.attributes.name)==="application-name"||de(e.attributes.rel)==="icon"||de(e.attributes.rel)==="apple-touch-icon"||de(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&de(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(de(e.attributes.property).match(/^(og|twitter|fb):/)||de(e.attributes.name).match(/^(og|twitter):/)||de(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(de(e.attributes.name)==="robots"||de(e.attributes.name)==="googlebot"||de(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(de(e.attributes.name)==="author"||de(e.attributes.name)==="generator"||de(e.attributes.name)==="framework"||de(e.attributes.name)==="publisher"||de(e.attributes.name)==="progid"||de(e.attributes.property).match(/^article:/)||de(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(de(e.attributes.name)==="google-site-verification"||de(e.attributes.name)==="yandex-verification"||de(e.attributes.name)==="csrf-token"||de(e.attributes.name)==="p:domain_verify"||de(e.attributes.name)==="verify-v1"||de(e.attributes.name)==="verification"||de(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}o(FC,"slimDOMExcluded");function Jn(e,t){const{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:a,maskAllText:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:d,skipChild:p=!1,inlineStylesheet:h=!0,maskInputOptions:m={},maskAttributeFn:_,maskTextFn:y,maskInputFn:v,slimDOMOptions:S,dataURLOptions:k={},inlineImages:w=!1,recordCanvas:x=!1,onSerialize:C,onIframeLoad:b,iframeLoadTimeout:H=5e3,onBlockedImageLoad:B,onStylesheetLoad:E,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:M=o(()=>!1,"keepIframeSrcFn"),newlyAddedElement:A=!1,ignoreCSSAttributes:K}=t;let{preserveWhiteSpace:Q=!0}=t;const ee=OC(e,{doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:c,unblockSelector:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:d,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:_,maskTextFn:y,maskInputFn:v,dataURLOptions:k,inlineImages:w,recordCanvas:x,keepIframeSrcFn:M,newlyAddedElement:A,ignoreCSSAttributes:K});if(!ee)return null;let U;r.hasNode(e)?U=r.getId(e):FC(ee,S)||!Q&&ee.type===Ie.Text&&!ee.isStyle&&!ee.textContent.trim().length?U=Zr:U=Kc();const N=Object.assign(ee,{id:U});if(r.add(e,N),U===Zr)return null;C&&C(e);let D=!p;if(N.type===Ie.Element){D=D&&!N.needBlock;const F=e.shadowRoot;F&&Wr(F)&&(N.isShadowHost=!0)}if((N.type===Ie.Document||N.type===Ie.Element)&&D){S.headWhitespace&&N.type===Ie.Element&&N.tagName==="head"&&(Q=!1);const F={doc:n,mirror:r,blockClass:i,blockSelector:s,maskAllText:c,unblockSelector:a,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:d,skipChild:p,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:_,maskTextFn:y,maskInputFn:v,slimDOMOptions:S,dataURLOptions:k,inlineImages:w,recordCanvas:x,preserveWhiteSpace:Q,onSerialize:C,onIframeLoad:b,iframeLoadTimeout:H,onBlockedImageLoad:B,onStylesheetLoad:E,stylesheetLoadTimeout:O,keepIframeSrcFn:M,ignoreCSSAttributes:K},ie=e.childNodes?Array.from(e.childNodes):[];for(const ne of ie){const ae=Jn(ne,F);ae&&N.childNodes.push(ae)}if(sC(e)&&e.shadowRoot)for(const ne of Array.from(e.shadowRoot.childNodes)){const ae=Jn(ne,F);ae&&(Wr(e.shadowRoot)&&(ae.isShadow=!0),N.childNodes.push(ae))}}if(e.parentNode&&Hr(e.parentNode)&&Wr(e.parentNode)&&(N.isShadow=!0),N.type===Ie.Element&&N.tagName==="iframe"&&!N.needBlock&&NC(e,()=>{const F=pm(e);if(F&&b){const ie=Jn(F,{doc:F,mirror:r,blockClass:i,blockSelector:s,unblockSelector:a,maskAllText:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:_,maskTextFn:y,maskInputFn:v,slimDOMOptions:S,dataURLOptions:k,inlineImages:w,recordCanvas:x,preserveWhiteSpace:Q,onSerialize:C,onIframeLoad:b,iframeLoadTimeout:H,onStylesheetLoad:E,stylesheetLoadTimeout:O,keepIframeSrcFn:M,ignoreCSSAttributes:K});ie&&b(e,ie)}},H),N.type===Ie.Element&&N.tagName==="img"&&!e.complete&&N.needBlock){const F=e,ie=o(()=>{if(F.isConnected&&!F.complete&&B)try{const ne=F.getBoundingClientRect();ne.width>0&&ne.height>0&&B(F,N,ne)}catch{}F.removeEventListener("load",ie)},"updateImageDimensions");F.isConnected&&F.addEventListener("load",ie)}return N.type===Ie.Element&&N.tagName==="link"&&typeof N.attributes.rel=="string"&&(N.attributes.rel==="stylesheet"||N.attributes.rel==="preload"&&typeof N.attributes.href=="string"&&lm(N.attributes.href)==="css")&&xC(e,()=>{if(E){const F=Jn(e,{doc:n,mirror:r,blockClass:i,blockSelector:s,unblockSelector:a,maskAllText:c,maskTextClass:u,unmaskTextClass:l,maskTextSelector:f,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:h,maskInputOptions:m,maskAttributeFn:_,maskTextFn:y,maskInputFn:v,slimDOMOptions:S,dataURLOptions:k,inlineImages:w,recordCanvas:x,preserveWhiteSpace:Q,onSerialize:C,onIframeLoad:b,iframeLoadTimeout:H,onStylesheetLoad:E,stylesheetLoadTimeout:O,keepIframeSrcFn:M,ignoreCSSAttributes:K});F&&E(e,F)}},O),N.type===Ie.Element&&delete N.needBlock,N}o(Jn,"serializeNodeWithId");function $C(e,t){const{mirror:n=new um,blockClass:r="rr-block",blockSelector:i=null,unblockSelector:s=null,maskAllText:a=!1,maskTextClass:c="rr-mask",unmaskTextClass:u=null,maskTextSelector:l=null,unmaskTextSelector:f=null,inlineStylesheet:d=!0,inlineImages:p=!1,recordCanvas:h=!1,maskAllInputs:m=!1,maskAttributeFn:_,maskTextFn:y,maskInputFn:v,slimDOM:S=!1,dataURLOptions:k,preserveWhiteSpace:w,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:b,onBlockedImageLoad:H,onStylesheetLoad:B,stylesheetLoadTimeout:E,keepIframeSrcFn:O=o(()=>!1,"keepIframeSrcFn"),ignoreCSSAttributes:M=new Set([])}=t||{};return Jn(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:l,unmaskTextSelector:f,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:_,maskTextFn:y,maskInputFn:v,slimDOMOptions:S===!0||S==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:S==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:S===!1?{}:S,dataURLOptions:k,inlineImages:p,recordCanvas:h,preserveWhiteSpace:w,onSerialize:x,onIframeLoad:C,iframeLoadTimeout:b,onBlockedImageLoad:H,onStylesheetLoad:B,stylesheetLoadTimeout:E,keepIframeSrcFn:O,newlyAddedElement:!1,ignoreCSSAttributes:M})}o($C,"snapshot");function Ne(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}o(Ne,"on");var hd={map:{},getId(){return-1},getNode(){return null},removeNodeFromMap(){},has(){return!1},reset(){}};typeof window<"u"&&window.Proxy&&window.Reflect&&(hd=new Proxy(hd,{get(e,t,n){return Reflect.get(e,t,n)}}));function ei(e,t,n={}){let r=null,i=0;return function(...s){const a=Date.now();!i&&n.leading===!1&&(i=a);const c=t-(a-i),u=this;c<=0||c>t?(r&&(zC(r),r=null),i=a,e.apply(u,s)):!r&&n.trailing!==!1&&(r=Rs(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(u,s)},c))}}o(ei,"throttle$1");function gm(e,t,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(a){Rs(()=>{n.set.call(this,a)},0),s&&s.set&&s.set.call(this,a)}}),()=>gm(e,t,s||{},!0)}o(gm,"hookSetter$1");function Xc(e,t,n){try{if(!(t in e))return()=>{};const 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()=>{}}}o(Xc,"patch$1");var $o=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||($o=o(()=>new Date().getTime(),"nowTimestamp"));function _m(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:t?.documentElement.scrollLeft||t?.body?.parentElement?.scrollLeft||t?.body?.scrollLeft||0,top:t.scrollingElement?t.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:t?.documentElement.scrollTop||t?.body?.parentElement?.scrollTop||t?.body?.scrollTop||0}}o(_m,"getWindowScroll");function ym(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}o(ym,"getWindowHeight");function vm(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}o(vm,"getWindowWidth");function Sm(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}o(Sm,"closestElementOfNode$1");function Ue(e,t,n,r,i){if(!e)return!1;const s=Sm(e);if(!s)return!1;const a=Yn(t,n);if(!i){const l=r&&s.matches(r);return a(s)&&!l}const c=hn(s,a);let u=-1;return c<0?!1:(r&&(u=hn(s,Yn(null,r))),c>-1&&u<0?!0:c<u)}o(Ue,"isBlocked$1");function BC(e,t){return t.getId(e)!==-1}o(BC,"isSerialized");function oa(e,t){return t.getId(e)===Zr}o(oa,"isIgnored");function bm(e,t){if(Hr(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?bm(e.parentNode,t):!0:!0}o(bm,"isAncestorRemoved");function za(e){return!!e.changedTouches}o(za,"legacy_isTouchEvent");function UC(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=(...t)=>{let n=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===n)return!0;while(n=n&&n.parentNode);return!1})}o(UC,"polyfill");function Em(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}o(Em,"isSerializedIframe");function Tm(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}o(Tm,"isSerializedStylesheet");function Ga(e){return!!e?.shadowRoot}o(Ga,"hasShadowRoot");var HC=class{static{o(this,"StyleSheetMirror")}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 t===void 0?n=this.id++:n=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 Im(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}o(Im,"getShadowHost");function WC(e){let t=e,n;for(;n=Im(t);)t=n;return t}o(WC,"getRootShadowHost");function jC(e){const t=e.ownerDocument;if(!t)return!1;const n=WC(e);return t.contains(n)}o(jC,"shadowHostInDom");function wm(e){const t=e.ownerDocument;return t?t.contains(e)||jC(e):!1}o(wm,"inDom");var md={};function Qc(e){const t=md[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const s=i.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(i)}catch{}return md[e]=r.bind(window)}o(Qc,"getImplementation$2");function qC(...e){return Qc("requestAnimationFrame")(...e)}o(qC,"onRequestAnimationFrame$1");function Rs(...e){return Qc("setTimeout")(...e)}o(Rs,"setTimeout$2");function zC(...e){return Qc("clearTimeout")(...e)}o(zC,"clearTimeout$2");var X=(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))(X||{}),z=(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))(z||{}),Me=(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))(Me||{}),kt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(kt||{}),zn=(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))(zn||{}),jr;function GC(e){jr=e}o(GC,"registerErrorHandler$1");function VC(){jr=void 0}o(VC,"unregisterErrorHandler");var te=o(e=>jr?o(((...n)=>{try{return e(...n)}catch(r){if(jr&&jr(r)===!0)return()=>{};throw r}}),"rrwebWrapped"):e,"callbackWrapper$1"),gd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",YC=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Wi=0;Wi<gd.length;Wi++)YC[gd.charCodeAt(Wi)]=Wi;var _d=class{static{o(this,"CanvasManagerNoop")}reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}};function Zc(e){try{return e.contentDocument}catch{}}o(Zc,"getIFrameContentDocument");function ti(e){try{return e.contentWindow}catch{}}o(ti,"getIFrameContentWindow");var JC=class{static{o(this,"StyleDeclarationParser")}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{const t=new CSSStyleSheet;t.replaceSync(`x { ${e} }`);const n=t.cssRules[0];return!n||n.type!==CSSRule.STYLE_RULE?null:n.style}catch{return null}}parseWithDetachedElement(e){const 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 yd(e){return"__ln"in e}o(yd,"isNodeInLinkedList");var KC=class{static{o(this,"DoubleLinkedList")}constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new 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){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&yd(e.previousSibling)){const 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&&yd(e.nextSibling)&&e.nextSibling.__ln.previous){const 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){const 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--)}},vd=o((e,t)=>`${e}@${t}`,"moveKey"),XC=class{static{o(this,"MutationBuffer")}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;const e=[],t=new Set,n=new KC,r=o(c=>{let u=c,l=Zr;for(;l===Zr;)u=u&&u.nextSibling,l=u&&this.mirror.getId(u);return l},"getNextId"),i=o(c=>{if(!c.parentNode||!wm(c))return;const u=Hr(c.parentNode)?this.mirror.getId(Im(c)):this.mirror.getId(c.parentNode),l=r(c);if(u===-1||l===-1)return n.addNode(c);const f=Jn(c,{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:o(d=>{Em(d,this.mirror)&&!Ue(d,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(d),Tm(d,this.mirror)&&this.stylesheetManager.trackLinkElement(d),Ga(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},"onSerialize"),onIframeLoad:o((d,p)=>{if(Ue(d,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(d,p);const h=ti(d);h&&this.canvasManager.addWindow(h),this.shadowDomManager.observeAttachShadow(d)},"onIframeLoad"),onStylesheetLoad:o((d,p)=>{this.stylesheetManager.attachLinkElement(d,p)},"onStylesheetLoad"),onBlockedImageLoad:o((d,p,{width:h,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:p.id,attributes:{style:{width:`${h}px`,height:`${m}px`}}}]})},"onBlockedImageLoad"),ignoreCSSAttributes:this.ignoreCSSAttributes});f&&(e.push({parentId:u,nextId:l,node:f}),t.add(f.id))},"pushAdd");for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)Sd(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||i(c);for(const c of this.addedSet)!bd(this.droppedSet,c)&&!Sd(this.removes,c,this.mirror)||bd(this.movedSet,c)?i(c):this.droppedSet.add(c);let s=null;for(;n.length;){let c=null;if(s){const u=this.mirror.getId(s.value.parentNode),l=r(s.value);u!==-1&&l!==-1&&(c=s)}if(!c){let u=n.tail;for(;u;){const l=u;if(u=u.previous,l){const f=this.mirror.getId(l.value.parentNode);if(r(l.value)===-1)continue;if(f!==-1){c=l;break}else{const d=l.value;if(d.parentNode&&d.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const p=d.parentNode.host;if(this.mirror.getId(p)!==-1){c=l;break}}}}}}if(!c){for(;n.head;)n.removeNode(n.head.value);break}s=c.previous,n.removeNode(c.value),i(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!t.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:u}=c;if(typeof u.style=="string"){const l=JSON.stringify(c.styleDiff),f=JSON.stringify(c._unchangedStyles);l.length<u.style.length&&(l+f).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!t.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:e};!a.texts.length&&!a.attributes.length&&!a.removes.length&&!a.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(a))},this.processMutation=e=>{if(!oa(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;!Ue(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:hr(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,Sm(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if(n==="value"){const s=Jc(t),a=t.tagName;r=Do(t,a,s);const c=ws({maskInputOptions:this.maskInputOptions,tagName:a,type:s});r=Qr({isMasked:hr(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c),element:t,value:r,maskInputFn:this.maskInputFn})}if(Ue(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(!Zc(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"),!mm(t.tagName,n)&&(i.attributes[n]=hm(this.doc,pr(t.tagName),pr(n),r,t,this.maskAttributeFn),n==="style")){const s=e.oldValue?this.styleDeclarationParser.parse(e.oldValue):null;for(const a of Array.from(t.style)){const c=t.style.getPropertyValue(a),u=t.style.getPropertyPriority(a);c!==(s?.getPropertyValue(a)||"")||u!==(s?.getPropertyPriority(a)||"")?u===""?i.styleDiff[a]=c:i.styleDiff[a]=[c,u]:i._unchangedStyles[a]=[c,u]}if(s)for(const a of Array.from(s))t.style.getPropertyValue(a)===""&&(i.styleDiff[a]=!1)}break}case"childList":if(Ue(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const n=this.mirror.getId(t),r=Hr(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Ue(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||oa(t,this.mirror)||!BC(t,this.mirror)||(this.addedSet.has(t)?(Va(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||bm(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[vd(n,r)]?Va(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:Hr(e.target)&&Wr(e.target)?!0:void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if(oa(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[vd(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ue(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(n=>this.genAdds(n)),Ga(e)&&e.shadowRoot.childNodes.forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,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"].forEach(t=>{this[t]=e[t]}),this.styleDeclarationParser=new JC(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 Va(e,t){e.delete(t),t.childNodes?.forEach(n=>Va(e,n))}o(Va,"deepDelete");function Sd(e,t,n){return e.length===0?!1:QC(e,t,n)}o(Sd,"isParentRemoved");function QC(e,t,n){let r=t.parentNode;for(;r;){const i=n.getId(r);if(e.some(s=>s.id===i))return!0;r=r.parentNode}return!1}o(QC,"_isParentRemoved");function bd(e,t){return e.size===0?!1:km(e,t)}o(bd,"isAncestorInSet");function km(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:km(e,n):!1}o(km,"_isAncestorInSet");var Kn=[];function Ri(e){try{if("composedPath"in e){const 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}o(Ri,"getEventTarget");function Rm(e,t){const n=new XC;Kn.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const i=window?.Zone?.__symbol__?.("MutationObserver");i&&window[i]&&(r=window[i]);const s=new r(te(a=>{e.onMutation&&e.onMutation(a)===!1||n.processMutations.bind(n)(a)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}o(Rm,"initMutationObserver");function ZC({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const i=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let a=[],c;const u=ei(te(d=>{const p=Date.now()-c;e(a.map(h=>(h.timeOffset-=p,h)),d),a=[],c=null}),s),l=te(ei(te(d=>{const p=Ri(d),{clientX:h,clientY:m}=za(d)?d.changedTouches[0]:d;c||(c=$o()),a.push({x:h,y:m,id:r.getId(p),timeOffset:$o()-c}),u(typeof DragEvent<"u"&&d instanceof DragEvent?z.Drag:d instanceof MouseEvent?z.MouseMove:z.TouchMove)}),i,{trailing:!1})),f=[Ne("mousemove",l,n),Ne("touchmove",l,n),Ne("drag",l,n)];return te(()=>{f.forEach(d=>d())})}o(ZC,"initMoveObserver");function eA({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:a}){if(a.mouseInteraction===!1)return()=>{};const c=a.mouseInteraction===!0||a.mouseInteraction===void 0?{}:a.mouseInteraction,u=[];let l=null;const f=o(d=>p=>{const h=Ri(p);if(Ue(h,r,i,s,!0))return;let m=null,_=d;if("pointerType"in p){switch(p.pointerType){case"mouse":m=kt.Mouse;break;case"touch":m=kt.Touch;break;case"pen":m=kt.Pen}m===kt.Touch?Me[d]===Me.MouseDown?_="TouchStart":Me[d]===Me.MouseUp&&(_="TouchEnd"):kt.Pen}else za(p)&&(m=kt.Touch);m!==null?(l=m,(_.startsWith("Touch")&&m===kt.Touch||_.startsWith("Mouse")&&m===kt.Mouse)&&(m=null)):Me[d]===Me.Click&&(m=l,l=null);const y=za(p)?p.changedTouches[0]:p;if(!y)return;const v=n.getId(h),{clientX:S,clientY:k}=y;te(e)({type:Me[_],id:v,x:S,y:k,...m!==null&&{pointerType:m}})},"getHandler");return Object.keys(Me).filter(d=>Number.isNaN(Number(d))&&!d.endsWith("_Departed")&&c[d]!==!1).forEach(d=>{let p=pr(d);const h=f(d);if(window.PointerEvent)switch(Me[d]){case Me.MouseDown:case Me.MouseUp:p=p.replace("mouse","pointer");break;case Me.TouchStart:case Me.TouchEnd:return}u.push(Ne(p,h,t))}),te(()=>{u.forEach(d=>d())})}o(eA,"initMouseInteractionObserver");function Cm({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:a}){return Ne("scroll",te(ei(te(c=>{const u=Ri(c);if(!u||Ue(u,r,i,s,!0))return;const l=n.getId(u);if(u===t&&t.defaultView){const f=_m(t.defaultView);e({id:l,x:f.left,y:f.top})}else e({id:l,x:u.scrollLeft,y:u.scrollTop})}),a.scroll||100)),t)}o(Cm,"initScrollObserver");function tA({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return Ne("resize",te(ei(te(()=>{const i=ym(),s=vm();(n!==i||r!==s)&&(e({width:Number(s),height:Number(i)}),n=i,r=s)}),200)),t)}o(tA,"initViewportResizeObserver");var nA=["INPUT","TEXTAREA","SELECT"],Ed=new WeakMap;function rA({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:a,ignoreSelector:c,maskInputOptions:u,maskInputFn:l,sampling:f,userTriggeredOnInput:d,maskTextClass:p,unmaskTextClass:h,maskTextSelector:m,unmaskTextSelector:_}){function y(C){let b=Ri(C);const H=C.isTrusted,B=b&&ja(b.tagName);if(B==="OPTION"&&(b=b.parentElement),!b||!B||nA.indexOf(B)<0||Ue(b,r,i,s,!0))return;const E=b;if(E.classList.contains(a)||c&&E.matches(c))return;const O=Jc(b);let M=Do(E,B,O),A=!1;const K=ws({maskInputOptions:u,tagName:B,type:O}),Q=hr(b,p,m,h,_,K);(O==="radio"||O==="checkbox")&&(A=b.checked),M=Qr({isMasked:Q,element:b,value:M,maskInputFn:l}),v(b,d?{text:M,isChecked:A,userTriggered:H}:{text:M,isChecked:A});const ee=b.name;O==="radio"&&ee&&A&&t.querySelectorAll(`input[type="radio"][name="${ee}"]`).forEach(U=>{if(U!==b){const N=Qr({isMasked:Q,element:U,value:Do(U,B,O),maskInputFn:l});v(U,d?{text:N,isChecked:!A,userTriggered:!1}:{text:N,isChecked:!A})}})}o(y,"eventHandler");function v(C,b){const H=Ed.get(C);if(!H||H.text!==b.text||H.isChecked!==b.isChecked){Ed.set(C,b);const B=n.getId(C);te(e)({...b,id:B})}}o(v,"cbWithDedup");const S=(f.input==="last"?["change"]:["input","change"]).map(C=>Ne(C,te(y),t)),k=t.defaultView;if(!k)return()=>{S.forEach(C=>C())};const w=k.Object.getOwnPropertyDescriptor(k.HTMLInputElement.prototype,"value"),x=[[k.HTMLInputElement.prototype,"value"],[k.HTMLInputElement.prototype,"checked"],[k.HTMLSelectElement.prototype,"value"],[k.HTMLTextAreaElement.prototype,"value"],[k.HTMLSelectElement.prototype,"selectedIndex"],[k.HTMLOptionElement.prototype,"selected"]];return w&&w.set&&S.push(...x.map(C=>gm(C[0],C[1],{set(){te(y)({target:this,isTrusted:!1})}},!1,k))),te(()=>{S.forEach(C=>C())})}o(rA,"initInputObserver");function Bo(e){const t=[];function n(r,i){if(ji("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||ji("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||ji("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||ji("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const s=Array.from(r.parentRule.cssRules).indexOf(r);i.unshift(s)}else if(r.parentStyleSheet){const s=Array.from(r.parentStyleSheet.cssRules).indexOf(r);i.unshift(s)}return i}return o(n,"recurse"),n(e,t)}o(Bo,"getNestedCSSRulePositions");function Ht(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}o(Ht,"getIdAndStyleId");function iA({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:te((f,d,p)=>{const[h,m]=p,{id:_,styleId:y}=Ht(d,t,n.styleMirror);return(_&&_!==-1||y&&y!==-1)&&e({id:_,styleId:y,adds:[{rule:h,index:m}]}),f.apply(d,p)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:te((f,d,p)=>{const[h]=p,{id:m,styleId:_}=Ht(d,t,n.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,removes:[{index:h}]}),f.apply(d,p)})});let a;r.CSSStyleSheet.prototype.replace&&(a=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:te((f,d,p)=>{const[h]=p,{id:m,styleId:_}=Ht(d,t,n.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,replace:h}),f.apply(d,p)})}));let c;r.CSSStyleSheet.prototype.replaceSync&&(c=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(c,{apply:te((f,d,p)=>{const[h]=p,{id:m,styleId:_}=Ht(d,t,n.styleMirror);return(m&&m!==-1||_&&_!==-1)&&e({id:m,styleId:_,replaceSync:h}),f.apply(d,p)})}));const u={};qi("CSSGroupingRule")?u.CSSGroupingRule=r.CSSGroupingRule:(qi("CSSMediaRule")&&(u.CSSMediaRule=r.CSSMediaRule),qi("CSSConditionRule")&&(u.CSSConditionRule=r.CSSConditionRule),qi("CSSSupportsRule")&&(u.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(u).forEach(([f,d])=>{l[f]={insertRule:d.prototype.insertRule,deleteRule:d.prototype.deleteRule},d.prototype.insertRule=new Proxy(l[f].insertRule,{apply:te((p,h,m)=>{const[_,y]=m,{id:v,styleId:S}=Ht(h.parentStyleSheet,t,n.styleMirror);return(v&&v!==-1||S&&S!==-1)&&e({id:v,styleId:S,adds:[{rule:_,index:[...Bo(h),y||0]}]}),p.apply(h,m)})}),d.prototype.deleteRule=new Proxy(l[f].deleteRule,{apply:te((p,h,m)=>{const[_]=m,{id:y,styleId:v}=Ht(h.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||v&&v!==-1)&&e({id:y,styleId:v,removes:[{index:[...Bo(h),_]}]}),p.apply(h,m)})})}),te(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=s,a&&(r.CSSStyleSheet.prototype.replace=a),c&&(r.CSSStyleSheet.prototype.replaceSync=c),Object.entries(u).forEach(([f,d])=>{d.prototype.insertRule=l[f].insertRule,d.prototype.deleteRule=l[f].deleteRule})})}o(iA,"initStyleSheetObserver");function Am({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const i=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=i?.prototype?Object.getOwnPropertyDescriptor(i?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!i||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(a){const c=s.set?.call(this,a);if(r!==null&&r!==-1)try{t.adoptStyleSheets(a,r)}catch{}return c}}),te(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}o(Am,"initAdoptedStyleSheetObserver");function oA({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){const s=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:te((c,u,l)=>{const[f,d,p]=l;if(n.has(f))return s.apply(u,[f,d,p]);const{id:h,styleId:m}=Ht(u.parentRule?.parentStyleSheet,t,r.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,set:{property:f,value:d,priority:p},index:Bo(u.parentRule)}),c.apply(u,l)})});const a=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:te((c,u,l)=>{const[f]=l;if(n.has(f))return a.apply(u,[f]);const{id:d,styleId:p}=Ht(u.parentRule?.parentStyleSheet,t,r.styleMirror);return(d&&d!==-1||p&&p!==-1)&&e({id:d,styleId:p,remove:{property:f},index:Bo(u.parentRule)}),c.apply(u,l)})}),te(()=>{i.CSSStyleDeclaration.prototype.setProperty=s,i.CSSStyleDeclaration.prototype.removeProperty=a})}o(oA,"initStyleDeclarationObserver");function sA({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:s,doc:a}){const c=te(l=>ei(te(f=>{const d=Ri(f);if(!d||Ue(d,t,n,r,!0))return;const{currentTime:p,volume:h,muted:m,playbackRate:_}=d;e({type:l,id:i.getId(d),currentTime:p,volume:h,muted:m,playbackRate:_})}),s.media||500)),u=[Ne("play",c(zn.Play),a),Ne("pause",c(zn.Pause),a),Ne("seeked",c(zn.Seeked),a),Ne("volumechange",c(zn.VolumeChange),a),Ne("ratechange",c(zn.RateChange),a)];return te(()=>{u.forEach(l=>l())})}o(sA,"initMediaInteractionObserver");function aA({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,s=n.FontFace;n.FontFace=o(function(u,l,f){const d=new s(u,l,f);return i.set(d,{family:u,buffer:typeof l!="string",descriptors:f,fontSource:typeof l=="string"?l:JSON.stringify(Array.from(new Uint8Array(l)))}),d},"FontFace2");const a=Xc(t.fonts,"add",function(c){return function(u){return Rs(te(()=>{const l=i.get(u);l&&(e(l),i.delete(u))}),0),c.apply(this,[u])}});return r.push(()=>{n.FontFace=s}),r.push(a),te(()=>{r.forEach(c=>c())})}o(aA,"initFontObserver");function cA(e){const{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,selectionCb:a}=e;let c=!0;const u=te(()=>{const l=t.getSelection();if(!l||c&&l?.isCollapsed)return;c=l.isCollapsed||!1;const f=[],d=l.rangeCount||0;for(let p=0;p<d;p++){const{startContainer:h,startOffset:m,endContainer:_,endOffset:y}=l.getRangeAt(p);Ue(h,r,i,s,!0)||Ue(_,r,i,s,!0)||f.push({start:n.getId(h),startOffset:m,end:n.getId(_),endOffset:y})}a({ranges:f})});return u(),Ne("selectionchange",u)}o(cA,"initSelectionObserver");function uA({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:Xc(n.customElements,"define",function(r){return function(i,s,a){try{t({define:{name:i}})}catch{}return r.apply(this,[i,s,a])}})}o(uA,"initCustomElementObserver");function lA(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Rm(e,e.doc));const i=ZC(e),s=eA(e),a=Cm(e),c=tA(e,{win:n}),u=rA(e),l=sA(e);let f=o(()=>{},"styleSheetObserver"),d=o(()=>{},"adoptedStyleSheetObserver"),p=o(()=>{},"styleDeclarationObserver"),h=o(()=>{},"fontObserver");e.recordDOM&&(f=iA(e,{win:n}),d=Am(e,e.doc),p=oA(e,{win:n}),e.collectFonts&&(h=aA(e)));const m=cA(e),_=uA(e),y=[];for(const v of e.plugins)y.push(v.observer(v.callback,n,v.options));return te(()=>{Kn.forEach(v=>v.reset()),r?.disconnect(),i(),s(),a(),c(),u(),l(),f(),d(),p(),h(),m(),_(),y.forEach(v=>v())})}o(lA,"initObservers");function ji(e){return typeof window[e]<"u"}o(ji,"hasNestedCSSRule");function qi(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}o(qi,"canMonkeyPatchNestedCSSRule");var Ya=class{static{o(this,"CrossOriginIframeMirror")}constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const i=n||this.getIdToRemoteIdMap(e),s=r||this.getRemoteIdToIdMap(e);let a=i.get(t);return a||(a=this.generateIdFn(),i.set(t,a),s.set(a,t)),a}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(i=>this.getId(e,i,n,r))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if(typeof t!="number")return t;const i=r.get(t);return i||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map(r=>this.getRemoteId(e,r,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}},dA=class{static{o(this,"IframeManagerNoop")}constructor(){this.crossOriginIframeMirror=new Ya(Kc),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},fA=class{static{o(this,"IframeManager")}constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Ya(Kc),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Ya(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);const t=ti(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&&ti(e)?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(e);const n=Zc(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if(t.data.type!=="rrweb"||t.origin!==t.data.origin||!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case X.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:X.IncrementalSnapshot,data:{source:z.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case X.Meta:case X.Load:case X.DomContentLoaded:return!1;case X.Plugin:return t;case X.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case X.IncrementalSnapshot:switch(t.data.source){case z.Mutation:return t.data.adds.forEach(n=>{this.replaceIds(n,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(n.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(n.node,r)}),t.data.removes.forEach(n=>{this.replaceIds(n,e,["parentId","id"])}),t.data.attributes.forEach(n=>{this.replaceIds(n,e,["id"])}),t.data.texts.forEach(n=>{this.replaceIds(n,e,["id"])}),t;case z.Drag:case z.TouchMove:case z.MouseMove:return t.data.positions.forEach(n=>{this.replaceIds(n,e,["id"])}),t;case z.ViewportResize:return!1;case z.MediaInteraction:case z.MouseInteraction:case z.Scroll:case z.CanvasMutation:case z.Input:return this.replaceIds(t.data,e,["id"]),t;case z.StyleSheetRule:case z.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case z.Font:return t;case z.Selection:return t.data.ranges.forEach(n=>{this.replaceIds(n,e,["start","end"])}),t;case z.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),t.data.styles?.forEach(n=>{this.replaceStyleIds(n,e,["styleId"])}),t}}return!1}replace(e,t,n,r){for(const 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(n=>{this.replaceIdOnNode(n,t)})}patchRootIdOnNode(e,t){e.type!==Ie.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(n=>{this.patchRootIdOnNode(n,t)})}},pA=class{static{o(this,"ShadowDomManagerNoop")}init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}},hA=class{static{o(this,"ShadowDomManager")}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(!Wr(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=Rm({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(Cm({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),Rs(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(Am({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){const t=Zc(e),n=ti(e);!t||!n||this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(Xc(e.prototype,"attachShadow",function(r){return function(i){const s=r.call(this,i);return this.shadowRoot&&wm(this)&&n.addShadowRoot(this.shadowRoot,t),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},mA=class{static{o(this,"StylesheetManager")}constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new HC,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;const n={id:t,styleIds:[]},r=[];for(const i of e){let s;this.styleMirror.has(i)?s=this.styleMirror.getId(i):(s=this.styleMirror.add(i),r.push({styleId:s,rules:Array.from(i.rules||CSSRule,(a,c)=>({rule:cm(a),index:c}))})),n.styleIds.push(s)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},gA=class{static{o(this,"ProcessedNodeManager")}constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some(r=>r!==t)}add(e,t){this.active||(this.active=!0,qC(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},ye,Uo;try{if(Array.from([1],e=>e*2)[0]!==2){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch{}var tt=pC();function at(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:a=null,ignoreClass:c="rr-ignore",ignoreSelector:u=null,maskAllText:l=!1,maskTextClass:f="rr-mask",unmaskTextClass:d=null,maskTextSelector:p=null,unmaskTextSelector:h=null,inlineStylesheet:m=!0,maskAllInputs:_,maskInputOptions:y,slimDOMOptions:v,maskAttributeFn:S,maskInputFn:k,maskTextFn:w,maxCanvasSize:x=null,packFn:C,sampling:b={},dataURLOptions:H={},mousemoveWait:B,recordDOM:E=!0,recordCanvas:O=!1,recordCrossOriginIframes:M=!1,recordAfter:A=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:K=!1,collectFonts:Q=!1,inlineImages:ee=!1,plugins:U,keepIframeSrcFn:N=o(()=>!1,"keepIframeSrcFn"),ignoreCSSAttributes:D=new Set([]),errorHandler:F,onMutation:ie,getCanvasManager:ne}=e;GC(F);const ae=M?window.parent===window:!0;let Te=!1;if(!ae)try{window.parent.document&&(Te=!1)}catch{Te=!0}if(ae&&!t)throw new Error("emit function is required");if(!ae&&!Te)return()=>{};B!==void 0&&b.mousemove===void 0&&(b.mousemove=B),tt.reset();const bt=_===!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}:y!==void 0?y:{},Ze=v===!0||v==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:v==="all",headMetaDescKeywords:v==="all"}:v||{};UC();let Et,et=0;const rn=o(P=>{for(const oe of U||[])oe.eventProcessor&&(P=oe.eventProcessor(P));return C&&!Te&&(P=C(P)),P},"eventProcessor");ye=o((P,oe)=>{const Y=P;if(Y.timestamp=$o(),Kn[0]?.isFrozen()&&Y.type!==X.FullSnapshot&&!(Y.type===X.IncrementalSnapshot&&Y.data.source===z.Mutation)&&Kn.forEach(se=>se.unfreeze()),ae)t?.(rn(Y),oe);else if(Te){const se={type:"rrweb",event:rn(Y),origin:window.location.origin,isCheckout:oe};window.parent.postMessage(se,"*")}if(Y.type===X.FullSnapshot)Et=Y,et=0;else if(Y.type===X.IncrementalSnapshot){if(Y.data.source===z.Mutation&&Y.data.isAttachIframe)return;et++;const se=r&&et>=r,J=n&&Et&&Y.timestamp-Et.timestamp>n;(se||J)&&sn(!0)}},"wrappedEmit");const Tt=o(P=>{ye({type:X.IncrementalSnapshot,data:{source:z.Mutation,...P}})},"wrappedMutationEmit"),Ai=o(P=>ye({type:X.IncrementalSnapshot,data:{source:z.Scroll,...P}}),"wrappedScrollEmit"),It=o(P=>ye({type:X.IncrementalSnapshot,data:{source:z.CanvasMutation,...P}}),"wrappedCanvasMutationEmit"),je=o(P=>ye({type:X.IncrementalSnapshot,data:{source:z.AdoptedStyleSheet,...P}}),"wrappedAdoptedStyleSheetEmit"),xe=new mA({mutationCb:Tt,adoptedStyleSheetCb:je}),$e=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new dA:new fA({mirror:tt,mutationCb:Tt,stylesheetManager:xe,recordCrossOriginIframes:M,wrappedEmit:ye});for(const P of U||[])P.getMirror&&P.getMirror({nodeMirror:tt,crossOriginIframeMirror:$e.crossOriginIframeMirror,crossOriginIframeStyleMirror:$e.crossOriginIframeStyleMirror});const Fn=new gA,$n=yA(ne,{mirror:tt,win:window,mutationCb:o(P=>ye({type:X.IncrementalSnapshot,data:{source:z.CanvasMutation,...P}}),"mutationCb"),recordCanvas:O,blockClass:i,blockSelector:s,unblockSelector:a,maxCanvasSize:x,sampling:b.canvas,dataURLOptions:H,errorHandler:F}),on=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new pA:new hA({mutationCb:Tt,scrollCb:Ai,bypassOptions:{onMutation:ie,blockClass:i,blockSelector:s,unblockSelector:a,maskAllText:l,maskTextClass:f,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskInputOptions:bt,dataURLOptions:H,maskAttributeFn:S,maskTextFn:w,maskInputFn:k,recordCanvas:O,inlineImages:ee,sampling:b,slimDOMOptions:Ze,iframeManager:$e,stylesheetManager:xe,canvasManager:$n,keepIframeSrcFn:N,processedNodeManager:Fn,ignoreCSSAttributes:D},mirror:tt}),sn=o((P=!1)=>{if(!E)return;ye({type:X.Meta,data:{href:window.location.href,width:vm(),height:ym()}},P),xe.reset(),on.init(),Kn.forEach(Y=>Y.lock());const oe=$C(document,{mirror:tt,blockClass:i,blockSelector:s,unblockSelector:a,maskAllText:l,maskTextClass:f,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,inlineStylesheet:m,maskAllInputs:bt,maskAttributeFn:S,maskInputFn:k,maskTextFn:w,slimDOM:Ze,dataURLOptions:H,recordCanvas:O,inlineImages:ee,onSerialize:o(Y=>{Em(Y,tt)&&$e.addIframe(Y),Tm(Y,tt)&&xe.trackLinkElement(Y),Ga(Y)&&on.addShadowRoot(Y.shadowRoot,document)},"onSerialize"),onIframeLoad:o((Y,se)=>{$e.attachIframe(Y,se);const J=ti(Y);J&&$n.addWindow(J),on.observeAttachShadow(Y)},"onIframeLoad"),onStylesheetLoad:o((Y,se)=>{xe.attachLinkElement(Y,se)},"onStylesheetLoad"),onBlockedImageLoad:o((Y,se,{width:J,height:lt})=>{Tt({adds:[],removes:[],texts:[],attributes:[{id:se.id,attributes:{style:{width:`${J}px`,height:`${lt}px`}}}]})},"onBlockedImageLoad"),keepIframeSrcFn:N,ignoreCSSAttributes:D});oe&&(ye({type:X.FullSnapshot,data:{node:oe,initialOffset:_m(window)}}),Kn.forEach(Y=>Y.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&xe.adoptStyleSheets(document.adoptedStyleSheets,tt.getId(document)))},"takeFullSnapshot2");Uo=sn;try{const P=[],oe=o(se=>te(lA)({onMutation:ie,mutationCb:Tt,mousemoveCb:o((J,lt)=>ye({type:X.IncrementalSnapshot,data:{source:lt,positions:J}}),"mousemoveCb"),mouseInteractionCb:o(J=>ye({type:X.IncrementalSnapshot,data:{source:z.MouseInteraction,...J}}),"mouseInteractionCb"),scrollCb:Ai,viewportResizeCb:o(J=>ye({type:X.IncrementalSnapshot,data:{source:z.ViewportResize,...J}}),"viewportResizeCb"),inputCb:o(J=>ye({type:X.IncrementalSnapshot,data:{source:z.Input,...J}}),"inputCb"),mediaInteractionCb:o(J=>ye({type:X.IncrementalSnapshot,data:{source:z.MediaInteraction,...J}}),"mediaInteractionCb"),styleSheetRuleCb:o(J=>ye({type:X.IncrementalSnapshot,data:{source:z.StyleSheetRule,...J}}),"styleSheetRuleCb"),styleDeclarationCb:o(J=>ye({type:X.IncrementalSnapshot,data:{source:z.StyleDeclaration,...J}}),"styleDeclarationCb"),canvasMutationCb:It,fontCb:o(J=>ye({type:X.IncrementalSnapshot,data:{source:z.Font,...J}}),"fontCb"),selectionCb:o(J=>{ye({type:X.IncrementalSnapshot,data:{source:z.Selection,...J}})},"selectionCb"),customElementCb:o(J=>{ye({type:X.IncrementalSnapshot,data:{source:z.CustomElement,...J}})},"customElementCb"),blockClass:i,ignoreClass:c,ignoreSelector:u,maskAllText:l,maskTextClass:f,unmaskTextClass:d,maskTextSelector:p,unmaskTextSelector:h,maskInputOptions:bt,inlineStylesheet:m,sampling:b,recordDOM:E,recordCanvas:O,inlineImages:ee,userTriggeredOnInput:K,collectFonts:Q,doc:se,maskAttributeFn:S,maskInputFn:k,maskTextFn:w,keepIframeSrcFn:N,blockSelector:s,unblockSelector:a,slimDOMOptions:Ze,dataURLOptions:H,mirror:tt,iframeManager:$e,stylesheetManager:xe,shadowDomManager:on,processedNodeManager:Fn,canvasManager:$n,ignoreCSSAttributes:D,plugins:U?.filter(J=>J.observer)?.map(J=>({observer:J.observer,options:J.options,callback:o(lt=>ye({type:X.Plugin,data:{plugin:J.name,payload:lt}}),"callback")}))||[]},{}),"observe");$e.addLoadListener(se=>{try{P.push(oe(se.contentDocument))}catch{}});const Y=o(()=>{sn(),P.push(oe(document))},"init");return document.readyState==="interactive"||document.readyState==="complete"?Y():(P.push(Ne("DOMContentLoaded",()=>{ye({type:X.DomContentLoaded,data:{}}),A==="DOMContentLoaded"&&Y()})),P.push(Ne("load",()=>{ye({type:X.Load,data:{}}),A==="load"&&Y()},window))),()=>{P.forEach(se=>se()),Fn.destroy(),Uo=void 0,VC()}}catch{}}o(at,"record");function _A(e){if(!Uo)throw new Error("please take full snapshot after start recording");Uo(e)}o(_A,"takeFullSnapshot");at.mirror=tt;at.takeFullSnapshot=_A;function yA(e,t){try{return e?e(t):new _d}catch{return new _d}}o(yA,"_getCanvasManager");var Td;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Td||(Td={}));var vA=3,SA=5;function eu(e){return e>9999999999?e:e*1e3}o(eu,"timestampToMs");function sa(e){return e>9999999999?e/1e3:e}o(sa,"timestampToS");function Ci(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:X.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:we(t,10,1e3)}}),t.category==="console")))}o(Ci,"addBreadcrumbEvent");var bA="button,a";function Mm(e){return e.closest(bA)||e}o(Mm,"getClosestInteractive");function Nm(e){const t=xm(e);return!t||!(t instanceof Element)?t:Mm(t)}o(Nm,"getClickTargetNode");function xm(e){return EA(e)?e.target:e}o(xm,"getTargetNode");function EA(e){return Ve(e)&&"target"in e}o(EA,"isEventWithTarget");var Wt;function TA(e){return Wt||(Wt=[],IA()),Wt.push(e),()=>{const t=Wt?Wt.indexOf(e):-1;t>-1&&Wt.splice(t,1)}}o(TA,"onWindowOpen");function IA(){Ae(fe,"open",function(e){return function(...t){if(Wt)try{Wt.forEach(n=>n())}catch{}return e.apply(fe,t)}})}o(IA,"monkeyPatchWindowOpen");var wA=new Set([z.Mutation,z.StyleSheetRule,z.StyleDeclaration,z.AdoptedStyleSheet,z.CanvasMutation,z.Selection,z.MediaInteraction]);function kA(e,t,n){e.handleClick(t,n)}o(kA,"handleClick");var RA=class{static{o(this,"ClickDetector")}constructor(e,t,n=Ci){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(){const e=TA(()=>{this._lastMutation=Id()});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(AA(t,this._ignoreSelector)||!MA(e))return;const n={timestamp:sa(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(r=>r.node===n.node&&Math.abs(r.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=sa(e)}registerScroll(e=Date.now()){this._lastScroll=sa(e)}registerClick(e){const t=Mm(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(t=>{t.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){const e=[],t=Id();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(const n of e){const r=this._clicks.indexOf(n);r>-1&&(this._generateBreadcrumbs(n),this._clicks.splice(r,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,i=!n&&!r,{clickCount:s,clickBreadcrumb:a}=e;if(i){const c=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",l={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:fe.location.href,route:t.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:s||1}};this._addBreadcrumbEvent(t,l);return}if(s>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:fe.location.href,route:t.getCurrentRoute(),clickCount:s,metric:!0}};this._addBreadcrumbEvent(t,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=ki(()=>this._checkClicks(),1e3)}},CA=["A","BUTTON","INPUT"];function AA(e,t){return!!(!CA.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))}o(AA,"ignoreElement");function MA(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}o(MA,"isClickBreadcrumb");function Id(){return Date.now()/1e3}o(Id,"nowInSeconds");function NA(e,t){try{if(!xA(t))return;const{source:n}=t.data;if(wA.has(n)&&e.registerMutation(t.timestamp),n===z.Scroll&&e.registerScroll(t.timestamp),OA(t)){const{type:r,id:i}=t.data,s=at.mirror.getNode(i);s instanceof HTMLElement&&r===Me.Click&&e.registerClick(s)}}catch{}}o(NA,"updateClickDetectorForRecordingEvent");function xA(e){return e.type===vA}o(xA,"isIncrementalEvent");function OA(e){return e.data.source===z.MouseInteraction}o(OA,"isIncrementalMouseInteraction");function ft(e){return{timestamp:Date.now()/1e3,type:"default",...e}}o(ft,"createBreadcrumb");var Cs=(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))(Cs||{}),LA=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function PA(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(LA.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}o(PA,"getAttributesToRecord");var DA=o(e=>t=>{if(!e.isEnabled())return;const n=FA(t);if(!n)return;const r=t.name==="click",i=r?t.event:void 0;r&&e.clickDetector&&i?.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&kA(e.clickDetector,n,Nm(t.event)),Ci(e,n)},"handleDomListener");function Om(e,t){const n=at.mirror.getId(e),r=n&&at.mirror.getNode(n),i=r&&at.mirror.getMeta(r),s=i&&BA(i)?i:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(a=>a.type===Cs.Text&&a.textContent).filter(Boolean).map(a=>a.trim()).join(""),attributes:PA(s.attributes)}}:{}}}o(Om,"getBaseDomBreadcrumb");function FA(e){const{target:t,message:n}=$A(e);return ft({category:`ui.${e.name}`,...Om(t,n)})}o(FA,"handleDom");function $A(e){const t=e.name==="click";let n,r=null;try{r=t?Nm(e.event):xm(e.event),n=Re(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}o($A,"getDomTarget");function BA(e){return e.type===Cs.Element}o(BA,"isElement");function UA(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=HA(t);n&&Ci(e,n)}o(UA,"handleKeyboardEvent");function HA(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:s,target:a}=e;if(!a||WA(a)||!s)return null;const c=t||r||i,u=s.length===1;if(!c&&u)return null;const l=Re(a,{maxStringLength:200})||"<unknown>";return ft({category:"ui.keyDown",message:l,data:{...Om(a,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:i,key:s}})}o(HA,"getKeyboardBreadcrumb");function WA(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}o(WA,"isInputElement");var jA={resource:YA,paint:GA,navigation:VA};function aa(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}o(aa,"webVitalHandler");function qA(e){return e.map(zA).filter(Boolean)}o(qA,"createPerformanceEntries");function zA(e){const t=jA[e.entryType];return t?t(e):null}o(zA,"createPerformanceEntry");function mr(e){return((Ee()||fe.performance.timeOrigin)+e)/1e3}o(mr,"getAbsoluteTime");function GA(e){const{duration:t,entryType:n,name:r,startTime:i}=e,s=mr(i);return{type:n,name:r,start:s,end:s+t,data:void 0}}o(GA,"createPaintEntry");function VA(e){const{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:a,domContentLoadedEventStart:c,domContentLoadedEventEnd:u,domInteractive:l,loadEventStart:f,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:m,type:_}=e;return i===0?null:{type:`${t}.${_}`,start:mr(h),end:mr(s),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:a,duration:i,domInteractive:l,domContentLoadedEventStart:c,domContentLoadedEventEnd:u,loadEventStart:f,loadEventEnd:d,domComplete:s,redirectCount:p}}}o(VA,"createNavigationEntry");function YA(e){const{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:s,decodedBodySize:a,encodedBodySize:c,responseStatus:u,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:mr(s),end:mr(i),name:r,data:{size:l,statusCode:u,decodedBodySize:a,encodedBodySize:c}}}o(YA,"createResourceEntry");function JA(e){const t=e.entries[e.entries.length-1];return tu(e,"largest-contentful-paint",t?.element?[t.element]:void 0)}o(JA,"getLargestContentfulPaint");function KA(e){return e.sources!==void 0}o(KA,"isLayoutShift");function XA(e){const t=[],n=[];for(const r of e.entries)if(KA(r)){const i=[];for(const s of r.sources)if(s.node){n.push(s.node);const a=at.mirror.getId(s.node);a&&i.push(a)}t.push({value:r.value,nodeIds:i.length?i:void 0})}return tu(e,"cumulative-layout-shift",n,t)}o(XA,"getCumulativeLayoutShift");function QA(e){const t=e.entries[e.entries.length-1];return tu(e,"interaction-to-next-paint",t?.target?[t.target]:void 0)}o(QA,"getInteractionToNextPaint");function tu(e,t,n,r){const i=e.value,s=e.rating,a=mr(i);return{type:"web-vital",name:t,start:a,end:a,data:{value:i,size:i,rating:s,nodeIds:n?n.map(c=>at.mirror.getId(c)):void 0,attributions:r}}}o(tu,"getWebVital");function ZA(e){function t(i){e.performanceEntries.includes(i)||e.performanceEntries.push(i)}o(t,"addPerformanceEntry");function n({entries:i}){i.forEach(t)}o(n,"onEntries");const r=[];return["navigation","paint","resource"].forEach(i=>{r.push(Xt(i,n))}),r.push(ys(aa(JA,e)),_s(aa(XA,e)),Uc(aa(QA,e))),()=>{r.forEach(i=>i())}}o(ZA,"setupPerformanceObserver");var W=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,e1='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 t1(){const e=new Blob([e1],{type:"text/javascript"});return URL.createObjectURL(e)}o(t1,"e");var wd=["log","warn","error"],uo="[Replay] ";function ca(e,t="info"){Ot({category:"console",data:{logger:"replay"},level:t,message:`${uo}${e}`},{level:t})}o(ca,"_addBreadcrumb");function n1(){let e=!1,t=!1;const n={exception:o(()=>{},"exception"),infoTick:o(()=>{},"infoTick"),setConfig:o(r=>{e=!!r.captureExceptions,t=!!r.traceInternals},"setConfig")};return W?(wd.forEach(r=>{n[r]=(...i)=>{g[r](uo,...i),t&&ca(i.join(""),Io(r))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),g.error(uo,r),e?me(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&ca(r,"error")},n.infoTick=(...r)=>{g.log(uo,...r),t&&setTimeout(()=>ca(r[0]),0)}):wd.forEach(r=>{n[r]=()=>{}}),n}o(n1,"makeReplayDebugLogger");var j=n1(),nu=class extends Error{static{o(this,"EventBufferSizeExceededError")}constructor(){super(`Event buffer exceeded maximum size of ${Yc}.`)}},Lm=class{static{o(this,"EventBufferArray")}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){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>Yc)throw new nu;this.events.push(e)}finish(){return new Promise(e=>{const t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=null;for(const{timestamp:t}of this.events)(e===null||t<e)&&(e=t);return e===null?e:eu(e)}},r1=class{static{o(this,"WorkerHandler")}constructor(e){this._onMessage=({data:t})=>{const n=t;if(typeof n.id!="number")return;const r=this._pending.get(n.id);if(!(!r||r.method!==n.method)){if(this._pending.delete(n.id),!n.success){W&&j.error("Error in compression worker: ",n.response),r.reject(new Error("Error in compression worker"));return}r.resolve(n.response)}},this._worker=e,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((e,t)=>{this._worker.addEventListener("message",({data:n})=>{n.success?e():(W&&j.warn("Received worker message with unsuccessful status",n),t(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",n=>{W&&j.warn("Failed to load Replay compression worker",n),t(new Error(`Failed to load Replay compression worker: ${n instanceof ErrorEvent&&n.message?n.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(){W&&j.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(e=>e.reject(new Error("Worker destroyed"))),this._pending.clear(),this._worker.terminate()}postMessage(e,t){const 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(s){this._pending.delete(n),i(s)}})}_getAndIncrementId(){return this._id++}},i1=class{static{o(this,"EventBufferCompressionWorker")}constructor(e){this._worker=new r1(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){const t=eu(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>Yc?Promise.reject(new nu):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,e=>{W&&j.exception(e,'Sending "clear" message to worker failed',e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}},o1=class{static{o(this,"EventBufferProxy")}constructor(e){this._fallback=new Lm,this._compression=new i1(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){W&&j.exception(e,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const i of e)r.push(this._compression.addEvent(i));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(i){W&&j.exception(i,"Failed to add events when switching buffers.")}}};function s1({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=a1(t);if(n)return n}return W&&j.log("Using simple buffer"),new Lm}o(s1,"createEventBuffer");function a1(e){try{const t=e||c1();if(!t)return;W&&j.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new o1(n)}catch(t){W&&j.exception(t,"Failed to create compression worker")}}o(a1,"_loadWorker");function c1(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?t1():""}o(c1,"_getWorkerUrl");function ru(){try{return"sessionStorage"in fe&&!!fe.sessionStorage}catch{return!1}}o(ru,"hasSessionStorage");function u1(e){l1(),e.session=void 0}o(u1,"clearSession");function l1(){if(ru())try{fe.sessionStorage.removeItem(Gc)}catch{}}o(l1,"deleteSession");function Pm(e){return e===void 0?!1:Math.random()<e}o(Pm,"isSampled");function As(e){if(ru())try{fe.sessionStorage.setItem(Gc,JSON.stringify(e))}catch{}}o(As,"saveSession");function Dm(e){const t=Date.now();return{id:e.id||ke(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}o(Dm,"makeSession");function d1(e,t){return Pm(e)?"session":t?"buffer":!1}o(d1,"getSessionSampleType");function kd({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const i=Dm({sampled:d1(e,t),previousSessionId:r});return n&&As(i),i}o(kd,"createSession");function f1(){if(!ru())return null;try{const e=fe.sessionStorage.getItem(Gc);if(!e)return null;const t=JSON.parse(e);return W&&j.infoTick("Loading existing session"),Dm(t)}catch{return null}}o(f1,"fetchSession");function Ja(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}o(Ja,"isExpired");function p1(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Ja(e.started,t,r)||Ja(e.lastActivity,n,r)}o(p1,"isSessionExpired");function Ho(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!p1(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}o(Ho,"shouldRefreshSession");function ua({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const i=r.stickySession&&f1();return i?Ho(i,{sessionIdleExpire:e,maxReplayDuration:t})?(W&&j.infoTick("Session in sessionStorage is expired, creating new one..."),kd(r,{previousSessionId:i.id})):i:(W&&j.infoTick("Creating new session"),kd(r,{previousSessionId:n}))}o(ua,"loadOrCreateSession");function h1(e){return e.type===X.Custom}o(h1,"isCustomEvent");function iu(e,t,n){return $m(e,t)?(Fm(e,t,n),!0):!1}o(iu,"addEventSync");function m1(e,t,n){return $m(e,t)?Fm(e,t,n):Promise.resolve(null)}o(m1,"addEvent");async function Fm(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const i=e.recordingMode==="buffer";try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const s=g1(t,e.getOptions().beforeAddRecordingEvent);return s?await r.addEvent(s):void 0}catch(s){if(!e.isEnabled())return e.handleException(s),null;const a=s&&s instanceof nu,c=a?"eventBufferOverflow":"eventBufferError",u=R();if(u){const l=a?"buffer_overflow":"internal_sdk_error";u.recordDroppedEvent(l,"replay")}if(a&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(s),await e.stop({reason:c})}}o(Fm,"_addEvent");function $m(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=eu(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(W&&j.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}o($m,"shouldAddEvent");function g1(e,t){try{if(typeof t=="function"&&h1(e))return t(e)}catch(n){return W&&j.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}o(g1,"maybeApplyCallback");var Rd=100;function Bm(e,t,n){const r=e.getContext();t&&r.traceIds.size<Rd&&r.traceIds.add(t),n&&r.segmentNames.size<Rd&&r.segmentNames.add(n)}o(Bm,"addSegmentDetailsToContext");function _1(e){return t=>{e.isEnabled()&&Bm(e,t.trace_id,t.name||void 0)}}o(_1,"handleProcessSegmentSpan");function ou(e){return!e.type}o(ou,"isErrorEvent");function Ka(e){return e.type==="transaction"}o(Ka,"isTransactionEvent");function y1(e){return e.type==="replay_event"}o(y1,"isReplayEvent");function Cd(e){return e.type==="feedback"}o(Cd,"isFeedbackEvent");function v1(e){return(t,n)=>{if(!e.isEnabled()||!ou(t)&&!Ka(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(Ka(t)){S1(e,t);return}b1(e,t)}}}o(v1,"handleAfterSendEvent");function S1(e,t){Bm(e,t.contexts?.trace?.trace_id,t.transaction)}o(S1,"handleTransactionEvent");function b1(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),e.recordingMode!=="buffer"||!t.tags?.replayId)return;const{beforeErrorSampling:r}=e.getOptions();typeof r=="function"&&!r(t)||ki(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(i){e.handleException(i)}})}o(b1,"handleErrorEvent");function E1(e){return t=>{!e.isEnabled()||!ou(t)||T1(e,t)}}o(E1,"handleBeforeSendEvent");function T1(e,t){const 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))&&Ci(e,ft({category:"replay.hydrate-error",data:{url:Kt()}}))}o(T1,"handleHydrationError");function I1(e){const t=R();t&&t.on("beforeAddBreadcrumb",n=>w1(e,n))}o(I1,"handleBreadcrumbs");function w1(e,t){if(!e.isEnabled()||!Um(t))return;const n=k1(t);n&&Ci(e,n)}o(w1,"beforeAddBreadcrumb");function k1(e){return!Um(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?R1(e):ft(e)}o(k1,"normalizeBreadcrumb");function R1(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return ft(e);let n=!1;const r=t.map(i=>{if(!i)return i;if(typeof i=="string")return i.length>Hi?(n=!0,`${i.slice(0,Hi)}…`):i;if(typeof i=="object")try{const s=we(i,7);return JSON.stringify(s).length>Hi?(n=!0,`${JSON.stringify(s,null,2).slice(0,Hi)}…`):s}catch{}return i});return ft({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}o(R1,"normalizeConsoleBreadcrumb");function Um(e){return!!e.category}o(Um,"isBreadcrumbWithCategory");function C1(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}o(C1,"isRrwebError");function Wo(){const e=q().getPropagationContext().dsc;e&&delete e.replay_id;const t=be();if(t){const n=ut(t);delete n.replay_id}}o(Wo,"resetReplayIdOnDynamicSamplingContext");function Ad(e){const t=q().getPropagationContext().dsc;t&&(t.replay_id=e);const n=be();if(n){const r=ut(n);r.replay_id=e}}o(Ad,"setReplayIdOnDynamicSamplingContext");function A1(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:X.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}o(A1,"addFeedbackBreadcrumb");function M1(e,t){return e.recordingMode!=="buffer"||t.message===Vc||!t.exception||t.type?!1:Pm(e.getOptions().errorSampleRate)}o(M1,"shouldSampleForBufferEvent");function N1(e){return Object.assign((t,n)=>{if(e.session&&Ho(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&Wo(),!e.isEnabled()||e.isPaused())return t;if(y1(t))return delete t.breadcrumbs,t;if(!ou(t)&&!Ka(t)&&!Cd(t))return t;if(!e.checkAndHandleExpiredSession())return Wo(),t;if(Cd(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),A1(e,t),t;if(C1(t,n)&&!e.getOptions()._experiments.captureExceptions)return W&&j.log("Ignoring error from rrweb internals",t),null;const r=M1(e,t);if((r||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),r&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const i=e.session;i.dirty=!0,e.getOptions().stickySession&&As(i)}return t},{id:"Replay"})}o(N1,"handleGlobalEventListener");function Ms(e,t){return t.map(({type:n,start:r,end:i,name:s,data:a})=>{const c=e.throttledAddEvent({type:X.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:i,data:a}}});return typeof c=="string"?Promise.resolve(null):c})}o(Ms,"createPerformanceSpans");function x1(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}o(x1,"handleHistory");function O1(e){return t=>{if(!e.isEnabled())return;const n=x1(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Ms(e,[n]),!1)))}}o(O1,"handleHistorySpanListener");function L1(e,t){return W&&e.getOptions()._experiments.traceInternals?!1:xp(t,R())}o(L1,"shouldFilterRequest");function Hm(e,t){e.isEnabled()&&t!==null&&(L1(e,t.name)||e.addUpdate(()=>(Ms(e,[t]),!0)))}o(Hm,"addNetworkBreadcrumb");function Ns(e){if(!e)return;const 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){const n=Jh(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}o(Ns,"getBodySize");function Wm(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}o(Wm,"parseContentLengthHeader");function jo(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}o(jo,"mergeWarning");function jm(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:s,statusCode:a,request:c,response:u}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:s,statusCode:a,request:c,response:u}}}o(jm,"makeNetworkReplayBreadcrumb");function ni(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}o(ni,"buildSkippedNetworkRequestOrResponse");function Gt(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:i,warnings:s}=P1(n);return r.body=i,s?.length&&(r._meta={warnings:s}),r}o(Gt,"buildNetworkRequestOrResponse");function Xa(e,t){return Object.entries(e).reduce((n,[r,i])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=i),n},{})}o(Xa,"getAllowedHeaders");function P1(e){if(!e||typeof e!="string")return{body:e};const t=e.length>ad,n=D1(e);if(t){const r=e.slice(0,ad);return n?{body:r,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${r}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}o(P1,"normalizeNetworkBody");function D1(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}o(D1,"_strIsProbablyJson");function qo(e,t){const n=F1(e);return Ye(n,t)}o(qo,"urlMatches");function F1(e,t=fe.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(fe.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}o(F1,"getFullUrl");async function $1(e,t,n){try{const r=jm("resource.fetch",await U1(e,t,n));Hm(n.replay,r)}catch(r){W&&j.exception(r,"Failed to capture fetch breadcrumb")}}o($1,"captureFetchBreadcrumbToReplay");function B1(e,t){const{input:n,response:r}=t,i=Ns(n?zc(n):void 0),s=r?Wm(r.headers.get("content-length")):void 0;i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}o(B1,"enrichFetchBreadcrumb");async function U1(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r}=t,{url:a,method:c,status_code:u=0,request_body_size:l,response_body_size:f}=e.data,d=qo(a,n.networkDetailAllowUrls)&&!qo(a,n.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:s,url:a,method:c,statusCode:u,request:d?H1(n,t.input,l):ni(l),response:await W1(d,n,t.response,f)}}o(U1,"_prepareFetchData");function H1({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const i=n?z1(n,t):{};if(!e)return Gt(i,r,void 0);const s=zc(n),[a,c]=Lo(s,j),u=Gt(i,r,a);return c?jo(u,c):u}o(H1,"_getRequestInfo");async function W1(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return ni(i);const s=r?qm(r.headers,n):{};if(!r||!t&&i!==void 0)return Gt(s,i,void 0);const[a,c]=await q1(r),u=j1(a,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:s});return c?jo(u,c):u}o(W1,"_getResponseInfo");function j1(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{const s=e?.length&&n===void 0?Ns(e):n;return r?t?Gt(i,s,e):Gt(i,s,void 0):ni(s)}catch(s){return W&&j.exception(s,"Failed to serialize response body"),Gt(i,n,void 0)}}o(j1,"getResponseData");async function q1(e){const t=G1(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await V1(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(W&&j.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(W&&j.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}o(q1,"_parseFetchResponseBody");function qm(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}o(qm,"getAllHeaders");function z1(e,t){return e.length===1&&typeof e[0]!="string"?Md(e[0],t):e.length===2?Md(e[1],t):{}}o(z1,"getRequestHeaders");function Md(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?qm(n,t):Array.isArray(n)?{}:Xa(n,t):{}}o(Md,"getHeadersFromOptions");function G1(e){try{return e.clone()}catch(t){W&&j.exception(t,"Failed to clone response body")}}o(G1,"_tryCloneResponse");function V1(e){return new Promise((t,n)=>{const r=ki(()=>n(new Error("Timeout while trying to read response body")),500);Y1(e).then(i=>t(i),i=>n(i)).finally(()=>clearTimeout(r))})}o(V1,"_tryGetResponseText");async function Y1(e){return await e.text()}o(Y1,"_getResponseText");async function J1(e,t,n){try{const r=jm("resource.xhr",X1(e,t,n));Hm(n.replay,r)}catch(r){W&&j.exception(r,"Failed to capture xhr breadcrumb")}}o(J1,"captureXhrBreadcrumbToReplay");function K1(e,t){const{xhr:n,input:r}=t;if(!n)return;const i=Ns(r),s=n.getResponseHeader("content-length")?Wm(n.getResponseHeader("content-length")):eM(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),s!==void 0&&(e.data.response_body_size=s)}o(K1,"enrichXhrBreadcrumb");function X1(e,t,n){const r=Date.now(),{startTimestamp:i=r,endTimestamp:s=r,input:a,xhr:c}=t,{url:u,method:l,status_code:f=0,request_body_size:d,response_body_size:p}=e.data;if(!u)return null;if(!c||!qo(u,n.networkDetailAllowUrls)||qo(u,n.networkDetailDenyUrls))return{startTimestamp:i,endTimestamp:s,url:u,method:l,statusCode:f,request:ni(d),response:ni(p)};const h=c[Rt],m=h?Xa(h.request_headers,n.networkRequestHeaders):{},_=Xa(Kh(c),n.networkResponseHeaders),[y,v]=n.networkCaptureBodies?Lo(a,j):[void 0],[S,k]=n.networkCaptureBodies?Q1(c):[void 0],w=Gt(m,d,y),x=Gt(_,p,S);return{startTimestamp:i,endTimestamp:s,url:u,method:l,statusCode:f,request:v?jo(w,v):w,response:k?jo(x,k):x}}o(X1,"_prepareXhrData");function Q1(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return Z1(e.response,e.responseType)}catch(n){t.push(n)}return W&&j.warn("Failed to get xhr response body",...t),[void 0]}o(Q1,"_getXhrResponseBody");function Z1(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&Ve(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return W&&j.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return W&&j.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}o(Z1,"_parseXhrResponse");function eM(e,t){try{return Ns(t==="json"&&Ve(e)?JSON.stringify(e):e)}catch{return}}o(eM,"_getBodySize");function tM(e){const t=R();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:a}=e.getOptions(),c={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:s,networkResponseHeaders:a};t&&t.on("beforeAddBreadcrumb",(u,l)=>nM(c,u,l))}catch{}}o(tM,"handleNetworkBreadcrumbs");function nM(e,t,n){if(t.data)try{rM(t)&&oM(n)&&(K1(t,n),J1(t,n,e)),iM(t)&&sM(n)&&(B1(t,n),$1(t,n,e))}catch(r){W&&j.exception(r,"Error when enriching network breadcrumb")}}o(nM,"beforeAddNetworkBreadcrumb");function rM(e){return e.category==="xhr"}o(rM,"_isXhrBreadcrumb");function iM(e){return e.category==="fetch"}o(iM,"_isFetchBreadcrumb");function oM(e){return e?.xhr}o(oM,"_isXhrHint");function sM(e){return e?.input!==void 0}o(sM,"_isFetchHint");function aM(e){const t=R();Yh(DA(e)),Es(O1(e)),I1(e),tM(e);const n=N1(e);ev(n),t&&(t.on("beforeSendEvent",E1(e)),t.on("afterSendEvent",v1(e)),t.on("createDsc",r=>{const i=e.getSessionId();i&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=i)}),t.on("processSegmentSpan",_1(e)),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,i)=>{const s=e.getSessionId();i?.includeReplay&&e.isEnabled()&&s&&r.contexts?.feedback&&(r.contexts.feedback.source==="api"&&await e.sendBufferedReplayOrFlush(),r.contexts.feedback.replay_id=s)}),t.on("openFeedbackWidget",async()=>{await e.sendBufferedReplayOrFlush()}))}o(aM,"addGlobalListeners");async function cM(e){try{return Promise.all(Ms(e,[uM(fe.performance.memory)]))}catch{return[]}}o(cM,"addMemoryEntry");function uM(e){const{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}}}}o(uM,"createMemoryEntry");function lM(e,t,n){return hy(e,t,{...n,setTimeoutImpl:ki})}o(lM,"debounce");var zi=$.navigator;function dM(){return/iPhone|iPad|iPod/i.test(zi?.userAgent??"")||/Macintosh/i.test(zi?.userAgent??"")&&zi?.maxTouchPoints&&zi?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}o(dM,"getRecordingSamplingOptions");function fM(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession()){W&&j.warn("Received replay event after session expired.");return}const i=r||!t;t=!0,pM(n),e.clickDetector&&NA(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&i&&e.setInitialState(),!iu(e,n,i))return!0;if(!i)return!1;const s=e.session;if(mM(e,i),e.recordingMode==="buffer"&&s&&e.eventBuffer&&!s.dirty){const a=e.eventBuffer.getEarliestTimestamp();a&&(W&&j.log(`Updating session start time to earliest event in buffer to ${new Date(a)}`),s.started=a,e.getOptions().stickySession&&As(s))}return s?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}catch(i){e.handleException(i)}}}o(fM,"getHandleRecordingEmit");function pM(e){const t=e.data;if(!(e.type!==X.IncrementalSnapshot||!t||typeof t!="object"||!("source"in t)||t.source!==z.Mutation||!("attributes"in t)||!Array.isArray(t.attributes)))for(const n of t.attributes){const r=at.mirror.getNode(n.id),i=r&&at.mirror.getMeta(r);if(i?.type===Cs.Element)for(const[s,a]of Object.entries(n.attributes))a===null?delete i.attributes[s]:i.attributes[s]=a}}o(pM,"syncMirrorAttributesFromMutationEvent");function hM(e){const t=e.getOptions();return{type:X.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}}}}o(hM,"createOptionsEvent");function mM(e,t){!t||e.session?.segmentId!==0||iu(e,hM(e),!1)}o(mM,"addSettingsEvent");function gM(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}o(gM,"closestElementOfNode$2");function _M(e,t,n,r){return Xe(Xf(e,ci(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}o(_M,"createReplayEnvelope");function yM({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
495
+ `;if(typeof e=="string")n=`${r}${e}`;else{const i=new TextEncoder().encode(r);n=new Uint8Array(i.length+e.length),n.set(i),n.set(e,i.length)}return n}o(yM,"prepareRecordingData");async function vM({client:e,scope:t,replayId:n,event:r}){const 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);const s=await up(e.getOptions(),r,i,t,e,he());if(!s)return null;e.emit("postprocessEvent",s,i),s.platform=s.platform||"javascript";const{name:a,version:c,settings:u}=e.getSdkMetadata()?.sdk||{};return s.sdk={...s.sdk,name:a||"sentry.javascript.unknown",version:c||"0.0.0",settings:u},s}o(vM,"prepareReplayEvent");async function SM({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:s}){const a=yM({recordingData:e,headers:{segment_id:n}}),{urls:c,errorIds:u,traceIds:l,segmentNames:f,initialTimestamp:d}=r,p=R(),h=q(),m=p?.getTransport(),_=p?.getDsn();if(!p||!m||!_||!s.sampled)return Promise.resolve({});const y=await vM({scope:h,client:p,replayId:t,event:{type:GR,replay_start_timestamp:d/1e3,timestamp:i/1e3,error_ids:u,trace_ids:l,segment_names:f,urls:c,replay_id:t,segment_id:n,replay_type:s.sampled}});if(!y)return p.recordDroppedEvent("event_processor","replay"),W&&j.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete y.sdkProcessingMetadata;const v=_M(y,a,_,p.getOptions().tunnel);let S;try{S=await m.send(v)}catch(w){const x=new Error(Vc);try{x.cause=w}catch{}throw x}const k=Tp({},S);if(Ep(k,"replay"))throw new su(k);if(typeof S.statusCode=="number"&&(S.statusCode<200||S.statusCode>=300))throw new zm(S.statusCode);return S}o(SM,"sendReplayRequest");var zm=class extends Error{static{o(this,"TransportStatusCodeError")}constructor(e){super(`Transport returned status code ${e}`)}},su=class extends Error{static{o(this,"RateLimitError")}constructor(e){super("Rate limit hit"),this.rateLimits=e}},Nd=class extends Error{static{o(this,"ReplayDurationLimitError")}constructor(){super("Session is too long, not sending replay")}};async function Gm(e,t={count:0,interval:QR}){const{recordingData:n,onError:r}=e;if(n.length)try{return await SM(e),!0}catch(i){if(i instanceof zm||i instanceof su)throw i;if(Xy("Replays",{_retryCount:t.count}),r&&r(i),t.count>=ZR){const s=new Error(`${Vc} - max retries exceeded`);try{s.cause=i}catch{}throw s}return t.interval*=++t.count,new Promise((s,a)=>{ki(async()=>{try{await Gm(e,t),s(!0)}catch(c){a(c)}},t.interval)})}}o(Gm,"sendReplay");var Vm="__THROTTLED",bM="__SKIPPED";function EM(e,t,n){const r=new Map,i=o(c=>{const u=c-n;r.forEach((l,f)=>{f<u&&r.delete(f)})},"_cleanup"),s=o(()=>[...r.values()].reduce((c,u)=>c+u,0),"_getTotalCount");let a=!1;return(...c)=>{const u=Math.floor(Date.now()/1e3);if(i(u),s()>=t){const f=a;return a=!0,f?bM:Vm}a=!1;const l=r.get(u)||0;return r.set(u,l+1),e(...c)}}o(EM,"throttle");var TM=class{static{o(this,"ReplayContainer")}constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:VR,sessionIdleExpire:YR},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,segmentNames:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=lM(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=EM((s,a)=>m1(this,s,a),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(eC,n),timeout:n,scrollTimeout:tC,ignoreSelector:r?r.join(","):""}:void 0;if(i&&(this.clickDetector=new RA(this,i)),W){const s=e._experiments;j.setConfig({captureExceptions:!!s.captureExceptions,traceInternals:!!s.traceInternals})}this._handleVisibilityChange=()=>{fe.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const s=ft({category:"ui.blur"});this._doChangeToBackgroundTasks(s)},this._handleWindowFocus=()=>{const s=ft({category:"ui.focus"});this._doChangeToForegroundTasks(s)},this._handleKeyboardEvent=s=>{UA(this,s)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){W&&j.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session){W&&j.exception(new Error("Unable to initialize and create session"));return}this.session.sampled!==!1&&(this.recordingMode=this.session.sampled==="buffer"&&this.session.segmentId===0?"buffer":"session",W&&j.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){W&&j.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){W&&j.log("Buffering is in progress, call `flush()` to save the replay");return}W&&j.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=ua({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){W&&j.log("Buffering is in progress, call `flush()` to save the replay");return}W&&j.infoTick("Starting replay in buffer mode");const e=ua({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{const e=this._canvas;this._stopRecording=at({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:XR}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:fM(this),...dM(),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(),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";const n=t??"manual";R()?.emit("replayEnd",{sessionId:this.session?.id,reason:n});try{W&&j.log(`Stopping Replay triggered by ${n}`),Wo(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,u1(this)}catch(r){this.handleException(r)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),W&&j.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),W&&j.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const t=Date.now();W&&j.log("Converting buffer to session"),await this.flushImmediate();const 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(),Ad(this.session.id)),this.startRecording())}addUpdate(e){const 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&&Ja(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const e=`${fe.location.pathname}${fe.location.hash}${fe.location.search}`,t=`${fe.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){const n=this._throttledAddEvent(e,t);if(n===Vm){const r=ft({category:"replay.throttled"});this.addUpdate(()=>!iu(this,{type:SA,timestamp:r.timestamp||0,data:{tag:"breadcrumb",payload:r,metric:!0}}))}return n}getCurrentRoute(){const e=this.lastActiveSpan||be(),t=e&&Se(e),n=(t&&V(t).data||{})[rt];if(!(!t||!n||!["route","custom"].includes(n)))return V(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=s1({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session&&R()?.emit("replayStart",{sessionId:this.session.id,recordingMode:this.recordingMode}),this.startRecording(),this.recordingMode==="session"&&this.session&&Ad(this.session.id)}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=ua({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;const e=this.session;return Ho(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{fe.document.addEventListener("visibilitychange",this._handleVisibilityChange),fe.addEventListener("blur",this._handleWindowBlur),fe.addEventListener("focus",this._handleWindowFocus),fe.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(aM(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=ZA(this)}_removeListeners(){try{fe.document.removeEventListener("visibilitychange",this._handleVisibilityChange),fe.removeEventListener("blur",this._handleWindowBlur),fe.removeEventListener("focus",this._handleWindowFocus),fe.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){if(this.session){if(Ho(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){Wo();return}e&&this._createCustomBreadcrumb(e),this.conditionalFlush()}}_doChangeToForegroundTasks(e){if(this.session){if(!this.checkAndHandleExpiredSession()){W&&j.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:X.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})})}_addPerformanceEntries(){let e=qA(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter(n=>n.start>=t)}return Promise.all(Ms(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),segmentNames:Array.from(this._context.segmentNames),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(!this.session||!this.eventBuffer||!e){W&&j.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await cM(this),!!this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Nd;const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await Gm({replayId:e,recordingData:await this.eventBuffer.finish(),segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:o(i=>this.handleException(i),"onError")})}catch(t){this.handleException(t),this.stop({reason:"sendError"});const n=R();if(n){let r;t instanceof su?r="ratelimit_backoff":t instanceof Nd?r="invalid":r="send_error",n.recordDroppedEvent(r,"replay")}}}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){W&&j.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i){W&&j.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),r&&this._debouncedFlush();return}const s=this.eventBuffer;s&&this.session.segmentId===0&&!s.hasCheckout&&W&&j.log("Flushing initial segment without checkout.");const a=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(c){this.handleException(c)}finally{this._flushLock=void 0,a&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&As(this.session)}_onMutationHandler(e){const{ignoreMutations:t}=this._options._experiments;if(t?.length&&e.some(a=>{const c=gM(a.target),u=t.join(",");return c?.matches(u)}))return!1;const n=e.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,s=r&&n>r;if(n>i||s){const a=ft({category:"replay.mutations",data:{count:n,limit:s}});this._createCustomBreadcrumb(a)}return s?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}};function Nr(e,t){return[...e,...t].join(",")}o(Nr,"getOption");function IM({mask:e,unmask:t,block:n,unblock:r,ignore:i}){return{maskTextSelector:Nr(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:Nr(t,[]),blockSelector:Nr(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:Nr(r,[]),ignoreSelector:Nr(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}o(IM,"getPrivacyOptions");function wM({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:s}){if(i.unmaskTextSelector&&e.matches(i.unmaskTextSelector))return s;const a=n.includes(t),c=r&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return a||c?s.replace(/[\S]/g,"*"):s}o(wM,"maskAttribute");var xd='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',kM=["content-length","content-type","accept"],RM=Symbol.for("sentry__originalRequestBody"),Od=!1,Ld=!1;function CM(){if(typeof Request>"u"||Ld)return;const e=Request;try{const t=o(function(n,r){const i=new e(n,r);return r?.body!=null&&(i[RM]=r.body),i},"SentryRequest");t.prototype=e.prototype,$.Request=t,Ld=!0}catch{}}o(CM,"_INTERNAL_instrumentRequestInterface");var dO=o((e=>new AM(e)),"replayIntegration"),AM=class{static{o(this,"Replay")}constructor({flushMinDelay:e=JR,flushMaxDelay:t=KR,minReplayDuration:n=nC,maxReplayDuration:r=cd,stickySession:i=!0,useCompression:s=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:l=!0,blockAllMedia:f=!0,mutationBreadcrumbLimit:d=750,mutationLimit:p=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:_=[],networkDetailDenyUrls:y=[],networkCaptureBodies:v=!0,networkRequestHeaders:S=[],networkResponseHeaders:k=[],mask:w=[],maskAttributes:x=["title","placeholder","aria-label"],unmask:C=[],block:b=[],unblock:H=[],ignore:B=[],maskFn:E,beforeAddRecordingEvent:O,beforeErrorSampling:M,onError:A,attachRawBodyFromRequest:K=!1}={}){this.name="Replay";const Q=IM({mask:w,unmask:C,block:b,unblock:H,ignore:B});if(this._recordingOptions={maskAllInputs:l,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:E,maskInputFn:E,maskAttributeFn:o((ee,U,N)=>wM({maskAttributes:x,maskAllText:u,privacyOptions:Q,key:ee,value:U,el:N}),"maskAttributeFn"),...Q,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:o(ee=>{try{ee.__rrweb__=!0}catch{}},"errorHandler"),recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,rC),maxReplayDuration:Math.min(r,cd),stickySession:i,useCompression:s,workerUrl:a,blockAllMedia:f,maskAllInputs:l,maskAllText:u,mutationBreadcrumbLimit:d,mutationLimit:p,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:_,networkDetailDenyUrls:y,networkCaptureBodies:v,networkRequestHeaders:Pd(S),networkResponseHeaders:Pd(k),beforeAddRecordingEvent:O,beforeErrorSampling:M,onError:A,attachRawBodyFromRequest:K,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${xd}`:xd,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&Yt())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Od}set _isInitialized(e){Od=e}afterAllSetup(e){!Yt()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&CM(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(e){return this._replay?this._replay.stop({forceFlush:e?.flush??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){const t=this.getReplayId(!0);t&&(Vt(e,{"sentry.replay_id":t}),this.getRecordingMode()==="buffer"&&Vt(e,{"sentry._internal.replay_is_buffering":!0}))}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=MM(this._initialOptions,e);this._replay=new TM({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}};function MM(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=bn(n.replaysSessionSampleRate),s=bn(n.replaysOnErrorSampleRate);return i==null&&s==null&&Dt(()=>{}),i!=null&&(r.sessionSampleRate=i),s!=null&&(r.errorSampleRate=s),r}o(MM,"loadReplayOptionsFromClient");function Pd(e){return[...kM,...e.map(t=>t.toLowerCase())]}o(Pd,"_getMergedNetworkHeaders");function fO(){return R()?.getIntegrationByName("Replay")}o(fO,"getReplay");var NM=Object.defineProperty,xM=o((e,t,n)=>t in e?NM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,"__defNormalProp"),Dd=o((e,t,n)=>xM(e,typeof t!="symbol"?t+"":t,n),"__publicField"),OM=class{static{o(this,"Mirror")}constructor(){Dd(this,"idNodeMap",new Map),Dd(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){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const r=this.nodeMetaMap.get(n);r&&this.nodeMetaMap.set(t,r)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function LM(){return new OM}o(LM,"createMirror");function PM(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}o(PM,"elementClassMatchesRegex");function Qa(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:Qa(e.parentNode,t,n,r+1)}o(Qa,"distanceToMatch");function Fd(e,t){return n=>{const r=n;if(r===null)return!1;try{if(e){if(typeof e=="string"){if(r.matches(`.${e}`))return!0}else if(PM(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}o(Fd,"createMatchPredicate");var $d={map:{},getId(){return-1},getNode(){return null},removeNodeFromMap(){},has(){return!1},reset(){}};typeof window<"u"&&window.Proxy&&window.Reflect&&($d=new Proxy($d,{get(e,t,n){return Reflect.get(e,t,n)}}));function au(e,t,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(a){Jm(()=>{n.set.call(this,a)},0),s&&s.set&&s.set.call(this,a)}}),()=>au(e,t,s||{},!0)}o(au,"hookSetter");function cu(e,t,n){try{if(!(t in e))return()=>{};const 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()=>{}}}o(cu,"patch");Date.now().toString();function DM(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}o(DM,"closestElementOfNode");function xs(e,t,n,r,i){if(!e)return!1;const s=DM(e);if(!s)return!1;const a=Fd(t,n);if(!i){const l=r&&s.matches(r);return a(s)&&!l}const c=Qa(s,a);let u=-1;return c<0?!1:(r&&(u=Qa(s,Fd(null,r))),c>-1&&u<0?!0:c<u)}o(xs,"isBlocked");var Bd={};function Ym(e){const t=Bd[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const i=n.createElement("iframe");i.hidden=!0,n.head.appendChild(i);const s=i.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(i)}catch{}return Bd[e]=r.bind(window)}o(Ym,"getImplementation");function un(...e){return Ym("requestAnimationFrame")(...e)}o(un,"onRequestAnimationFrame");function Jm(...e){return Ym("setTimeout")(...e)}o(Jm,"setTimeout$1");var gr=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(gr||{}),lo;function FM(e){lo=e}o(FM,"registerErrorHandler");var la=o(e=>lo?o(((...n)=>{try{return e(...n)}catch(r){if(lo&&lo(r)===!0)return()=>{};throw r}}),"rrwebWrapped"):e,"callbackWrapper"),Xn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",$M=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Gi=0;Gi<Xn.length;Gi++)$M[Xn.charCodeAt(Gi)]=Gi;var BM=o(function(e){var t=new Uint8Array(e),n,r=t.length,i="";for(n=0;n<r;n+=3)i+=Xn[t[n]>>2],i+=Xn[(t[n]&3)<<4|t[n+1]>>4],i+=Xn[(t[n+1]&15)<<2|t[n+2]>>6],i+=Xn[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},"encode"),Ud=new Map;function UM(e,t){let n=Ud.get(e);return n||(n=new Map,Ud.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}o(UM,"variableListFor");var Km=o((e,t,n)=>{if(!e||!(Qm(e,t)||typeof e=="object"))return;const r=e.constructor.name,i=UM(n,r);let s=i.indexOf(e);return s===-1&&(s=i.length,i.push(e)),s},"saveWebGLVar");function fo(e,t,n){if(e instanceof Array)return e.map(r=>fo(r,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:BM(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[fo(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:i}=e;return{rr_type:r,src:i}}else{if(e instanceof HTMLCanvasElement)return{rr_type:"HTMLImageElement",src:e.toDataURL()};if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[fo(e.data,t,n),e.width,e.height]};if(Qm(e,t)||typeof e=="object")return{rr_type:e.constructor.name,index:Km(e,t,n)}}return e}o(fo,"serializeArg");var Xm=o((e,t,n)=>e.map(r=>fo(r,t,n)),"serializeArgs"),Qm=o((e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(r=>typeof t[r]=="function").find(r=>e instanceof t[r]),"isInstanceOfWebGLObject");function HM(e,t,n,r,i){const s=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const c of a)try{if(typeof t.CanvasRenderingContext2D.prototype[c]!="function")continue;const u=cu(t.CanvasRenderingContext2D.prototype,c,function(l){return function(...f){return xs(this.canvas,n,r,i,!0)||Jm(()=>{const d=Xm(f,t,this);e(this.canvas,{type:gr["2D"],property:c,args:d})},0),l.apply(this,f)}});s.push(u)}catch{const u=au(t.CanvasRenderingContext2D.prototype,c,{set(l){e(this.canvas,{type:gr["2D"],property:c,args:[l],setter:!0})}});s.push(u)}return()=>{s.forEach(c=>c())}}o(HM,"initCanvas2DMutationObserver");function WM(e){return e==="experimental-webgl"?"webgl":e}o(WM,"getNormalizedContextName");function Hd(e,t,n,r,i){const s=[];try{const a=cu(e.HTMLCanvasElement.prototype,"getContext",function(c){return function(u,...l){if(!xs(this,t,n,r,!0)){const f=WM(u);if("__context"in this||(this.__context=f),i&&["webgl","webgl2"].includes(f))if(l[0]&&typeof l[0]=="object"){const d=l[0];d.preserveDrawingBuffer||(d.preserveDrawingBuffer=!0)}else l.splice(0,1,{preserveDrawingBuffer:!0})}return c.apply(this,[u,...l])}});s.push(a)}catch{}return()=>{s.forEach(a=>a())}}o(Hd,"initCanvasContextObserver");function Wd(e,t,n,r,i,s,a,c){const u=[],l=Object.getOwnPropertyNames(e);for(const f of l)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof e[f]!="function")continue;const d=cu(e,f,function(p){return function(...h){const m=p.apply(this,h);if(Km(m,c,this),"tagName"in this.canvas&&!xs(this.canvas,r,i,s,!0)){const _=Xm(h,c,this),y={type:t,property:f,args:_};n(this.canvas,y)}return m}});u.push(d)}catch{const d=au(e,f,{set(p){n(this.canvas,{type:t,property:f,args:[p],setter:!0})}});u.push(d)}return u}o(Wd,"patchGLPrototype");function jM(e,t,n,r,i,s){const a=[];return a.push(...Wd(t.WebGLRenderingContext.prototype,gr.WebGL,e,n,r,i,s,t)),typeof t.WebGL2RenderingContext<"u"&&a.push(...Wd(t.WebGL2RenderingContext.prototype,gr.WebGL2,e,n,r,i,s,t)),()=>{a.forEach(c=>c())}}o(jM,"initCanvasWebGLMutationObserver");var qM='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 zM(){const e=new Blob([qM]);return URL.createObjectURL(e)}o(zM,"t");var GM=class{static{o(this,"CanvasManager")}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=(a,c)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(a)||this.pendingCanvasMutations.set(a,[]),this.pendingCanvasMutations.get(a).push(c)};const{enableManualSnapshot:t,sampling:n="all",win:r,recordCanvas:i,errorHandler:s}=e;e.sampling=n,this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,s&&FM(s),(i&&typeof n=="number"||t)&&(this.worker=this.initFPSWorker()),this.addWindow(r),!t&&la(()=>{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){const{sampling:t="all",blockClass:n,blockSelector:r,unblockSelector:i,recordCanvas:s,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(e)){if(a){this.windowsSet.add(e),this.windows.push(new WeakRef(e));return}la(()=>{if(s&&t==="all"&&this.initCanvasMutationObserver(e,n,r,i),s&&typeof t=="number"){const c=Hd(e,n,r,i,!0);this.restoreHandlers.push(()=>{c()})}})(),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}un(n=>this.takeSnapshot(n,!0,e))}initFPSWorker(){const e=new Worker(zM());return e.onmessage=t=>{const n=t.data,{id:r}=n;if(this.snapshotInProgressMap.set(r,!1),!("base64"in n))return;const{base64:i,type:s,width:a,height:c}=n;this.mutationCb({id:r,type:gr["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:i}],type:s}]},0,0,a,c]}]})},e}initCanvasFPSObserver(){let e;if(!this.windows.length&&!this.shadowDoms.size)return;const t=o(n=>{this.takeSnapshot(n,!1),e=un(t)},"rafCallback");e=un(t),this.restoreHandlers.push(()=>{e&&cancelAnimationFrame(e)})}initCanvasMutationObserver(e,t,n,r){const i=Hd(e,t,n,r,!1),s=HM(this.processMutation.bind(this),e,t,n,r),a=jM(this.processMutation.bind(this),e,t,n,r,this.mirror);this.restoreHandlers.push(()=>{i(),s(),a()})}getCanvasElements(e,t,n){const r=[],i=o(s=>{s.querySelectorAll("canvas").forEach(a=>{xs(a,e,t,n,!0)||r.push(a)})},"searchCanvas");for(const s of this.windows){const a=s.deref();let c;try{c=a&&a.document}catch{}c&&i(c)}for(const s of this.shadowDoms){const a=s.deref();a&&i(a)}return r}takeSnapshot(e,t,n){const{sampling:r,blockClass:i,blockSelector:s,unblockSelector:a,dataURLOptions:c,maxCanvasSize:u}=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,s,a)).forEach(f=>{const d=this.mirror.getId(f);if(!(!this.mirror.hasNode(f)||!f.width||!f.height||this.snapshotInProgressMap.get(d))){if(this.snapshotInProgressMap.set(d,!0),!t&&["webgl","webgl2"].includes(f.__context)){const p=f.getContext(f.__context);p?.getContextAttributes()?.preserveDrawingBuffer===!1&&p.clear(p.COLOR_BUFFER_BIT)}createImageBitmap(f).then(p=>{this.worker?.postMessage({id:d,bitmap:p,width:f.width,height:f.height,dataURLOptions:c,maxCanvasSize:u},[p])}).catch(p=>{la(()=>{throw this.snapshotInProgressMap.delete(d),p})()})}}),!0)}startPendingCanvasMutationFlusher(){un(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=o(t=>{this.rafStamps.latestId=t,un(e)},"setLatestRAFTimestamp");un(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),un(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;const r=n.map(s=>{const{type:a,...c}=s;return c}),{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){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=e.contentWindow?.Array.from||Array.from,document.body.removeChild(e)}}catch{}LM();var jd;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(jd||(jd={}));var qd={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}}},VM="ReplayCanvas",Vi=1280,YM=o(((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Vi):Vi,n?Math.min(n,Vi):Vi]};let i,s;const a=new Promise(c=>s=c);return{name:VM,getOptions(){const{quality:c,enableManualSnapshot:u,maxCanvasSize:l}=r;return{enableManualSnapshot:u,recordCanvas:!0,getCanvasManager:o(f=>{const d=new GM({...f,enableManualSnapshot:u,maxCanvasSize:l,errorHandler:o(p=>{try{typeof p=="object"&&(p.__rrweb__=!0)}catch{}},"errorHandler")});return i=d,s(d),d},"getCanvasManager"),...qd[c]||qd.medium}},async snapshot(c,u){(i||await a).snapshot(c,u)}}}),"_replayCanvasIntegration"),pO=YM;function JM(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}o(JM,"baggageHeaderHasSentryValues");function Zm(e){try{return new URL(e,L.location.origin).href}catch{return}}o(Zm,"getFullURL");function KM(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}o(KM,"isPerformanceResourceTiming");function eg(e){try{return new Headers(e)}catch{return}}o(eg,"createHeadersSafely");var tg={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function XM(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:s,tracePropagationTargets:a,onRequestSpanStart:c,onRequestSpanEnd:u}={...tg,...t},l=typeof i=="function"?i:h=>!0,f=o(h=>ZM(h,a),"shouldAttachHeadersWithTargets"),d={},p=e.getOptions().propagateTraceparent;n&&fs(h=>{const m=Eb(h,l,f,d,{propagateTraceparent:p,onRequestSpanEnd:u});if(m){const _=Zm(h.fetchData.url),y=_?yn(_).host:void 0,v=_?ot(_):void 0;m.setAttributes({[ip]:v,[li]:v,"server.address":y}),s&&zd(m,e),c?.(m,{headers:h.headers})}}),r&&qc(h=>{const m=eN(h,l,f,d,p,u);m&&(s&&zd(m,e),c?.(m,{headers:eg(h.xhr.__sentry_xhr_v3__?.request_headers)}))})}o(XM,"instrumentOutgoingRequests");var QM=300;function zd(e,t){const{url:n}=V(e).data;if(!n||typeof n!="string")return;let r=o(()=>{setTimeout(i)},"onEntryFound");if(Qe(t)){const s=e.end.bind(e);e.end=a=>{const c=a??ge();let u=!1;const l=o(()=>{u||(u=!0,setTimeout(i),s(c),clearTimeout(f))},"endSpanAndCleanup");r=l;const f=setTimeout(l,QM)}}const i=Xt("resource",({entries:s})=>{s.forEach(a=>{KM(a)&&a.name.endsWith(n)&&(e.setAttributes(Vh(a)),r())})})}o(zd,"addHTTPTimings");function ZM(e,t){const n=Kt();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}const s=r.origin===i;return t?Ye(r.toString(),t)||s&&Ye(r.pathname,t):s}else{const r=!!e.match(/^\/(?!\/)/);return t?Ye(e,t):r}}o(ZM,"shouldAttachHeaders");function eN(e,t,n,r,i,s){const a=e.xhr,c=a?.[Rt];if(!a||a.__sentry_own_request__||!c)return;const{url:u,method:l}=c,f=Fe()&&t(u);if(e.endTimestamp){const w=a.__sentry_xhr_span_id__;if(!w)return;const x=r[w];x&&(f&&c.status_code!==void 0&&(go(x,c.status_code),x.end(),s?.(x,{headers:eg(Kh(a)),error:e.error})),delete r[w]);return}const d=Zm(u),p=yn(d||u),h=d?ot(d):void 0,m=ot(Np(u)),_=R(),y=!!be(),v=y||!!_&&Qe(_),S=f&&v?nn({name:`${l} ${m}`,attributes:{url:ot(u),type:"xhr","http.method":l,"http.url":h,[li]:h,"server.address":p?.host,[re]:"auto.http.browser",[ve]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new En,k=es(S)&&y?void 0:S;return f&&!v&&_?.recordDroppedEvent("no_parent_span","span"),a.__sentry_xhr_span_id__=S.spanContext().spanId,r[a.__sentry_xhr_span_id__]=S,n(u)&&tN(a,Fe()&&v?k:void 0,i),_&&_.emit("beforeOutgoingRequestSpan",S,e),S}o(eN,"xhrCallback");function tN(e,t,n){const{"sentry-trace":r,baggage:i,traceparent:s}=Op({span:t,propagateTraceparent:n});r&&nN(e,r,i,s)}o(tN,"addTracingHeadersToXhrRequest");function nN(e,t,n,r){const 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){const s=i?.baggage;(!s||!JM(s))&&e.setRequestHeader("baggage",n)}}catch{}}o(nN,"setHeaderOnXhr");var Gd=new WeakMap,Vd=new WeakMap,rN=9e4,iN=["text/event-stream","application/x-ndjson","application/stream+json"],oN=()=>({name:"FetchStreamPerformance",setup(){VT(e=>{if(e.response){const t=Gd.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);const n=Vd.get(e.response);n&&clearTimeout(n)}}}),fs(e=>{if(e.endTimestamp&&e.response){const t=e.response.headers?.get("content-type")||"";if(e.response.headers?.get("content-length")||!iN.some(u=>t.startsWith(u)))return;const n=e.fetchData?.url||"",r=e.fetchData?.method||"GET",i=Yr(n),s=n.startsWith("data:")?ot(n):i?Mp(i):n,a=nn({name:`${r} ${s}`,startTime:e.endTimestamp,attributes:{url:ot(n),"http.method":r,type:"fetch",[ve]:"http.client.stream",[re]:"auto.http.browser.stream"}});Gd.set(e.response,a);const c=setTimeout(()=>{a.isRecording()&&a.end()},rN);Vd.set(e.response,c)}})}}),sN="WebVitals",aN=(e={})=>{const t=new Set(e.ignore??[]);return{name:sN,setup(n){const r=Qe(n),{enableStandaloneClsSpans:i,enableStandaloneLcpSpans:s}=e._experiments??{},a=r||t.has("cls")?void 0:i||!1,c=r||t.has("lcp")?void 0:s||!1,u=mw({recordClsStandaloneSpans:a,recordLcpStandaloneSpans:c,client:n}),l=new WeakSet;n.on("afterStartPageLoadSpan",f=>{l.add(f)}),n.on("spanEnd",f=>{l.delete(f)&&(u(),Iw(f,{recordClsOnPageloadSpan:a===!1,recordLcpOnPageloadSpan:c===!1,spanStreamingEnabled:r}))}),r?(t.has("lcp")||jw(n),t.has("cls")||zw(n),t.has("inp")||Vw()):t.has("inp")||$w()},afterAllSetup(){t.has("inp")||Ww()}}};function cN(){L.document?L.document.addEventListener("visibilitychange",()=>{const e=be();if(!e)return;const t=Se(e);if(L.document.hidden&&t){const n="cancelled",{op:r,status:i}=V(t);T&&g.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),i||t.setStatus({code:2,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):T&&g.warn("[Tracing] Could not set up background tab detection due to lack of global document")}o(cN,"registerBackgroundTabDetection");var ng="sentry_previous_trace",uN="sentry.previous_trace";function lN(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let i=r?pN():void 0;e.on("spanStart",a=>{if(Se(a)!==a)return;const c=q().getPropagationContext();i=dN(i,a,c),r&&fN(i)});let s=!0;n&&e.on("beforeSampling",a=>{if(!i)return;const c=q(),u=c.getPropagationContext();if(s&&u.parentSpanId){s=!1;return}c.setPropagationContext({...u,dsc:{...u.dsc,sample_rate:String(i.sampleRate),sampled:String(Za(i.spanContext))},sampleRand:i.sampleRand}),a.parentSampled=Za(i.spanContext),a.parentSampleRate=i.sampleRate,a.spanAttributes={...a.spanAttributes,[c_]:i.sampleRate}})}o(lN,"linkTraces");function dN(e,t,n){const r=V(t);function i(){try{const c=Number(r.data?.["sentry.sample_rate"]??n.dsc?.sample_rate);return Number.isNaN(c)?0:c}catch{return 0}}o(i,"getSampleRate");const s={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return s;const a=e.spanContext;return a.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&(T&&g.log(`Adding previous_trace \`${JSON.stringify(a)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:a,attributes:{[g_]:"previous_trace"}}),t.setAttribute(uN,`${a.traceId}-${a.spanId}-${Za(a)?1:0}`)),s)}o(dN,"addPreviousTraceSpanLink");function fN(e){try{L.sessionStorage.setItem(ng,JSON.stringify(e))}catch(t){T&&g.warn("Could not store previous trace in sessionStorage",t)}}o(fN,"storePreviousTraceInSessionStorage");function pN(){try{const e=L.sessionStorage?.getItem(ng);return JSON.parse(e)}catch{return}}o(pN,"getPreviousTraceFromSessionStorage");function Za(e){return e.traceFlags===1}o(Za,"spanContextSampled");var hN="BrowserTracing",mN=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function gN(){const e=L.navigator;return e?.userAgent?mN.test(e.userAgent):!1}o(gN,"isBotUserAgent");var _N={...Xi,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...tg},hO=o(((e={})=>{"enableElementTiming"in e&&Dt(()=>{});const t={name:void 0,source:void 0},n=L.document,{enableInp:r,enableLongTask:i,enableLongAnimationFrame:s,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:l,idleTimeout:f,finalTimeout:d,childSpanTimeout:p,markBackgroundSpan:h,traceFetch:m,traceXHR:_,trackFetchStreamPerformance:y,shouldCreateSpanForRequest:v,enableHTTPTimings:S,ignoreResourceSpans:k,ignorePerformanceApiSpans:w,instrumentPageLoad:x,instrumentNavigation:C,detectRedirects:b,linkPreviousTrace:H,consistentTraceSampling:B,enableReportPageLoaded:E,onRequestSpanStart:O,onRequestSpanEnd:M}={..._N,...e},A=gN();let K,Q;function ee(U,N,D=!0,F){const ie=N.op==="pageload",ne=N.name,ae=l?l(N):N,Te=Yr(F||Kt()),bt={...Te?.pathname&&{"url.path":Te.pathname},...Te&&!rs(Te)&&{"url.full":Te.href},...ae.attributes};if(ne!==ae.name&&(bt[rt]="custom"),ae.attributes=bt,!D){const et=Nn();nn({...ae,startTime:et}).end(et);return}t.name=ae.name,t.source=bt[rt];const Ze=ep(ae,{idleTimeout:f,finalTimeout:d,childSpanTimeout:p,disableAutoFinish:ie,beforeSpanEnd:o(et=>{Tw(et,{ignoreResourceSpans:k,ignorePerformanceApiSpans:w,spanStreamingEnabled:Qe(U)}),Kd(U,void 0);const rn=q(),Tt=rn.getPropagationContext();rn.setPropagationContext({...Tt,traceId:Ze.spanContext().traceId,sampled:St(Ze),dsc:ut(et)}),ie&&(Q=void 0)},"beforeSpanEnd"),trimIdleSpanEndTimestamp:!E});ie&&E&&(Q=Ze),Kd(U,Ze);function Et(){n&&["interactive","complete"].includes(n.readyState)&&(U.emit("idleSpanEnableAutoFinish",Ze),n.removeEventListener("readystatechange",Et))}o(Et,"emitFinish"),ie&&!E&&n&&(n.addEventListener("readystatechange",Et),Et())}return o(ee,"_createRouteSpan"),{name:hN,setup(U){if(A){T&&g.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}if(F_(),s&&$.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?_w():i&&gw(),a&&yw(),b&&n){const D=o(()=>{K=ge()},"interactionHandler");addEventListener("click",D,{capture:!0}),addEventListener("keydown",D,{capture:!0,passive:!0})}function N(){const D=ri(U);D&&!V(D).timestamp&&(T&&g.log(`[Tracing] Finishing current active span with op: ${V(D).op}`),D.setAttribute(mo,"cancelled"),D.end())}o(N,"maybeEndActiveSpan"),U.on("startNavigationSpan",(D,F)=>{if(R()!==U)return;if(F?.isRedirect){T&&g.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),ee(U,{op:"navigation.redirect",...D},!1,F.url);return}K=void 0,N(),he().setPropagationContext({traceId:mt(),sampleRand:Math.random(),propagationSpanId:Fe()?void 0:At()});const ie=q();ie.setPropagationContext({traceId:mt(),sampleRand:Math.random(),propagationSpanId:Fe()?void 0:At()}),ie.setSDKProcessingMetadata({normalizedRequest:void 0}),ee(U,{op:"navigation",...D,parentSpan:null,forceTransaction:!0},!0,F?.url)}),U.on("startPageLoadSpan",(D,F={})=>{if(R()!==U)return;N();const ie=F.sentryTrace||Yd("sentry-trace")||Jd("sentry-trace"),ne=F.baggage||Yd("baggage")||Jd("baggage"),ae=Pf(ie,ne),Te=q();Te.setPropagationContext(ae),Fe()||(Te.getPropagationContext().propagationSpanId=At()),Te.setSDKProcessingMetadata({normalizedRequest:Mo()}),ee(U,{op:"pageload",...D})}),U.on("endPageloadSpan",()=>{E&&Q&&(Q.setAttribute(mo,"reportPageLoaded"),Q.end())})},afterAllSetup(U){if(A)return;U.addIntegration&&!U.getIntegrationByName?.("WebVitals")&&U.addIntegration(aN({ignore:r?[]:["inp"],_experiments:{enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u}}));let N=Kt();if(H!=="off"&&lN(U,{linkPreviousTrace:H,consistentTraceSampling:B}),L.location){if(x){const D=Ee();yN(U,{name:L.location.pathname,startTime:D?D/1e3:void 0,attributes:{[rt]:"url",[re]:"auto.pageload.browser"}})}C&&Es(({to:D,from:F})=>{if(F===void 0&&N?.indexOf(D)!==-1){N=void 0;return}N=void 0;const ie=Yr(D),ne=ri(U),ae=ne&&b&&bN(ne,K);vN(U,{name:ie?.pathname||L.location.pathname,attributes:{[rt]:"url",[re]:"auto.navigation.browser"}},{url:D,isRedirect:ae})})}h&&cN(),a&&SN(U,f,d,p,t),XM(U,{traceFetch:m,traceXHR:_,tracePropagationTargets:U.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:v,enableHTTPTimings:S,onRequestSpanStart:O,onRequestSpanEnd:M}),y&&U.addIntegration(oN())}}}),"browserTracingIntegration");function yN(e,t,n){e.emit("startPageLoadSpan",t,n),q().setTransactionName(t.name);const r=ri(e);return r&&e.emit("afterStartPageLoadSpan",r),r}o(yN,"startBrowserTracingPageLoadSpan");function vN(e,t,n){const{url:r,isRedirect:i}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:i,url:r}),e.emit("startNavigationSpan",t,{isRedirect:i,url:r});const s=q();return s.setTransactionName(t.name),r&&!i&&s.setSDKProcessingMetadata({normalizedRequest:{...Mo(),url:r}}),ri(e)}o(vN,"startBrowserTracingNavigationSpan");function Yd(e){return L.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}o(Yd,"getMetaContent");function Jd(e){return L.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(t=>t.name===e)?.description}o(Jd,"getServerTiming");function SN(e,t,n,r,i){const s=L.document;let a;const c=o(()=>{const u="ui.action.click",l=ri(e);if(l){const f=V(l).op;if(["navigation","pageload"].includes(f)){T&&g.warn(`[Tracing] Did not create ${u} span because a pageload or navigation span is in progress.`);return}}if(a&&(a.setAttribute(mo,"interactionInterrupted"),a.end(),a=void 0),!i.name){T&&g.warn(`[Tracing] Did not create ${u} transaction because _latestRouteName is missing.`);return}a=ep({name:i.name,op:u,attributes:{[rt]:i.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})},"registerInteractionTransaction");s&&addEventListener("click",c,{capture:!0})}o(SN,"registerInteractionListener");var rg="_sentry_idleSpan";function ri(e){return e[rg]}o(ri,"getActiveIdleSpan");function Kd(e,t){Ce(e,rg,t)}o(Kd,"setActiveIdleSpan");var Xd=1.5;function bN(e,t){const n=V(e),r=Nn();return!(r-n.start_timestamp>Xd||t&&r-t<=Xd)}o(bN,"isRedirect");function mO(e=R()){e?.emit("endPageloadSpan")}o(mO,"reportPageLoaded");function gO(e){const t=be();if(t===e)return;const n=q();e.end=new Proxy(e.end,{apply(r,i,s){return gt(n,t),Reflect.apply(r,i,s)}}),gt(n,e)}o(gO,"setActiveSpanInBrowser");var _O=()=>({name:"SpanStreaming",beforeSetup(e){const t=e.getOptions();t.traceLifecycle||(T&&g.log('[SpanStreaming] setting `traceLifecycle` to "stream"'),t.traceLifecycle="stream")},setup(e){const t="SpanStreaming integration requires",n="Falling back to static trace lifecycle.",r=e.getOptions();if(!Qe(e)){r.traceLifecycle="static",T&&g.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}const i=r.beforeSendSpan;if(i&&!Xo(i)){r.traceLifecycle="static",T&&g.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}const s=new jT(e);e.on("afterSpanEnd",a=>{St(a)&&s.add(Oy(a,e))}),e.on("afterSegmentSpanEnd",a=>{const c=a.spanContext().traceId;setTimeout(()=>{s.flush(c)},500)})}});function _r(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}o(_r,"promisifyRequest");function EN(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=_r(n);return i=>r.then(s=>i(s.transaction(t,"readwrite").objectStore(t)))}o(EN,"createStore");function uu(e){return _r(e.getAllKeys())}o(uu,"keys");function TN(e,t,n){return e(r=>uu(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.max(...i,0)+1),_r(r.transaction)}))}o(TN,"push");function IN(e,t,n){return e(r=>uu(r).then(i=>{if(!(i.length>=n))return r.put(t,Math.min(...i,0)-1),_r(r.transaction)}))}o(IN,"unshift");function wN(e){return e(t=>uu(t).then(n=>{const r=n[0];if(r!=null)return _r(t.get(r)).then(i=>(t.delete(r),_r(t.transaction).then(()=>i)))}))}o(wN,"shift");function kN(e){let t;function n(){return t==null&&(t=EN(e.dbName||"sentry-offline",e.storeName||"queue")),t}return o(n,"getStore"),{push:o(async r=>{try{const i=bo(r);await TN(n(),i,e.maxQueueSize||30)}catch{}},"push"),unshift:o(async r=>{try{const i=bo(r);await IN(n(),i,e.maxQueueSize||30)}catch{}},"unshift"),shift:o(async()=>{try{const r=await wN(n());if(r)return q_(r)}catch{}},"shift")}}o(kN,"createIndexedDbStore");function RN(e){return t=>{const n=e({...t,createStore:kN});return L.addEventListener("online",async r=>{await n.flush()}),n}}o(RN,"makeIndexedDbOfflineTransport");function yO(e=Xh){return RN(Gv(e))}o(yO,"makeBrowserOfflineTransport");var Qd=1e6,CN="window"in $&&$.window===$&&typeof importScripts>"u",vn=String(0),lu=CN?"main":"worker",zo=L.navigator,ig="",og="",sg="",ec=zo?.userAgent||"",ag="",AN=zo?.language||zo?.languages?.[0]||"";function MN(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}o(MN,"isUserAgentData");var Zd=zo?.userAgentData;MN(Zd)&&Zd.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(ig=e.platform||"",sg=e.architecture||"",ag=e.model||"",og=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];ec=`${t.brand} ${t.version}`}}).catch(e=>{});function NN(e){return!("thread_metadata"in e)}o(NN,"isProcessedJSSelfProfile");function xN(e){return NN(e)?$N(e):e}o(xN,"enrichWithThreadInformation");function ON(e){const t=e.contexts?.trace?.trace_id;return typeof t=="string"&&t.length!==32&&T&&g.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}o(ON,"getTraceId");function LN(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);const i=ON(r),s=xN(n),a=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:ge()*1e3),c=typeof r.timestamp=="number"?r.timestamp*1e3:ge()*1e3;return{event_id:e,timestamp:new Date(a).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||"production",runtime:{name:"javascript",version:L.navigator.userAgent},os:{name:ig,version:og,build_number:ec},device:{locale:AN,model:ag,manufacturer:ec,architecture:sg,is_emulator:!1},debug_meta:{images:ug(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||ke(),trace_id:i,active_thread_id:vn,relative_start_ns:"0",relative_end_ns:((c-a)*1e6).toFixed(0)}]}}o(LN,"createProfilePayload");function PN(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=FN(e),i=t.getOptions(),s=t.getSdkMetadata?.()?.sdk;return{chunk_id:ke(),client_sdk:{name:s?.name??"sentry.javascript.browser",version:s?.version??"0.0.0"},profiler_id:n||ke(),platform:"javascript",version:"2",release:i.release??"",environment:i.environment??"production",debug_meta:{images:ug(e.resources)},profile:r}}o(PN,"createProfileChunkPayload");function DN(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};const t=o(r=>typeof r=="string"&&/^[a-f0-9]{32}$/.test(r),"isHex32");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"};const 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(t){return{reason:`unknown validation error: ${t}`}}}o(DN,"validateProfileChunk");function FN(e){const t=[];for(let c=0;c<e.frames.length;c++){const u=e.frames[c];u&&(t[c]={function:u.name,abs_path:typeof u.resourceId=="number"?e.resources[u.resourceId]:void 0,lineno:u.line,colno:u.column})}const n=[];for(let c=0;c<e.stacks.length;c++){const u=e.stacks[c];if(!u)continue;const l=[];let f=u;for(;f;)l.push(f.frameId),f=f.parentId===void 0?void 0:e.stacks[f.parentId];n[c]=l}const r=Ee(),i=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,s=i-(r||i),a=[];for(let c=0;c<e.samples.length;c++){const u=e.samples[c];if(!u)continue;const l=(i+(u.timestamp-s))/1e3;a[c]={stack_id:u.stackId??0,thread_id:vn,timestamp:l}}return{frames:t,stacks:n,samples:a,thread_metadata:{[vn]:{name:lu}}}}o(FN,"convertToContinuousProfile");function cg(e){return V(e).op==="pageload"}o(cg,"isAutomatedPageLoadSpan");function $N(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[vn]:{name:lu}}},i=e.samples[0];if(!i)return r;const s=i.timestamp,a=Ee(),c=typeof performance.timeOrigin=="number"?performance.timeOrigin:a||0,u=c-(a||c);return e.samples.forEach((l,f)=>{if(l.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[f]={elapsed_since_start_ns:((l.timestamp+u-s)*Qd).toFixed(0),stack_id:t,thread_id:vn};return}let d=e.stacks[l.stackId];const p=[];for(;d;){p.push(d.frameId);const m=e.frames[d.frameId];m&&r.frames[d.frameId]===void 0&&(r.frames[d.frameId]={function:m.name,abs_path:typeof m.resourceId=="number"?e.resources[m.resourceId]:void 0,lineno:m.line,colno:m.column}),d=d.parentId===void 0?void 0:e.stacks[d.parentId]}const h={elapsed_since_start_ns:((l.timestamp+u-s)*Qd).toFixed(0),stack_id:n,thread_id:vn};r.stacks[n]=p,r.samples[f]=h,n++}),r}o($N,"convertJSSelfProfileToSampledFormat");function BN(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}o(BN,"addProfilesToEnvelope");function UN(e){const t=[];return Tn(e,(n,r)=>{if(r==="transaction")for(let i=1;i<n.length;i++)n[i]?.contexts?.profile?.profile_id&&t.push(n[i])}),t}o(UN,"findProfiledTransactionsFromEnvelope");function ug(e){const t=R()?.getOptions()?.stackParser;return t?By(t,e):[]}o(ug,"applyDebugMetadata");function lg(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(T&&g.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?(T&&g.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}o(lg,"isValidSampleRate");function HN(e){return e.samples.length<2?(T&&g.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(T&&g.log("[Profiling] Discarding profile because it contains no frames"),!1)}o(HN,"isValidProfile");var du=!1,dg=3e4;function WN(e){return typeof e=="function"}o(WN,"isJSProfilerSupported");function fg(){const e=L.Profiler;if(!WN(e)){T&&g.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}const t=10,n=Math.floor(dg/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{T&&(g.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),g.log("[Profiling] Disabling profiling for current user session.")),du=!0}}o(fg,"startJSSelfProfile");function ef(e){if(du)return T&&g.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return T&&g.log("[Profiling] Discarding profile because root span was not sampled."),!1;const t=R()?.getOptions();if(!t)return T&&g.log("[Profiling] Profiling disabled, no options found."),!1;const n=t.profilesSampleRate;return lg(n)?n?n===!0||Math.random()<n?!0:(T&&g.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(n)})`),!1):(T&&g.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(T&&g.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}o(ef,"shouldProfileSpanLegacy");function jN(e){if(du)return T&&g.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 T&&g.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;const t=e.profileSessionSampleRate;return lg(t)?t?Math.random()<=t:(T&&g.log("[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0"),!1):(T&&g.warn("[Profiling] Discarding profile because of invalid profileSessionSampleRate."),!1)}o(jN,"shouldProfileSession");function Yi(e){return typeof e.profilesSampleRate<"u"}o(Yi,"hasLegacyProfiling");function qN(e,t,n,r){return HN(n)?LN(e,t,n,r):null}o(qN,"createProfilingEvent");var mn=new Map;function zN(){return mn.size}o(zN,"getActiveProfilesCount");function GN(e){const t=mn.get(e);return t&&mn.delete(e),t}o(GN,"takeProfileFromGlobalCache");function VN(e,t){if(mn.set(e,t),mn.size>30){const n=mn.keys().next().value;n!==void 0&&mn.delete(n)}}o(VN,"addProfileToGlobalCache");var pg=new WeakSet;function Go(e){e.setAttribute("thread.id",vn),e.setAttribute("thread.name",lu)}o(Go,"setThreadAttributes");function tf(e){let t;cg(e)&&(t=ge()*1e3);const n=fg();if(!n)return;T&&g.log(`[Profiling] started profiling span: ${V(e).description}`);const r=ke();let i=null;q().setContext("profile",{profile_id:r,start_timestamp:t}),pg.add(e),Go(e);async function s(){if(e&&n){if(i){T&&g.log("[Profiling] profile for:",V(e).description,"already exists, returning early");return}return n.stop().then(l=>{if(a&&(L.clearTimeout(a),a=void 0),T&&g.log(`[Profiling] stopped profiling of span: ${V(e).description}`),!l){T&&g.log(`[Profiling] profiler returned null profile for: ${V(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}i=l,VN(r,l)}).catch(l=>{T&&g.log("[Profiling] error while stopping profiler:",l)})}}o(s,"onProfileHandler");let a=L.setTimeout(()=>{T&&g.log("[Profiling] max profile duration elapsed, stopping profiling for:",V(e).description),s()},dg);const c=e.end.bind(e);function u(){return e?(s().then(()=>{c()},()=>{c()}),e):c()}o(u,"profilingWrappedSpanEnd"),e.end=u}o(tf,"startProfileForSpan");var YN=6e4,JN=3e5,KN=class{static{o(this,"UIProfiler")}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){const t=e.getOptions().profileLifecycle,n=jN(e.getOptions());T&&g.log(`[Profiling] Initializing profiler (lifecycle='${t}').`),n||T&&g.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=ke(),this._client=e,this._sessionSampled=n,this._lifecycleMode=t,t==="trace"&&this._setupTraceLifecycleListeners(e),e.on("spanStart",r=>{this._isRunning&&Go(r)})}start(){if(this._lifecycleMode==="trace"){T&&g.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.');return}if(this._isRunning){T&&g.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op.");return}if(!this._sessionSampled){T&&g.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.");return}this._beginProfiling()}stop(){if(this._lifecycleMode==="trace"){T&&g.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.');return}if(!this._isRunning){T&&g.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.");return}this._endProfiling()}notifyRootSpanActive(e){if(this._lifecycleMode!=="trace"||!this._sessionSampled)return;const t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);const n=this._activeRootSpanIds.size;n===1&&(T&&g.log("[Profiling] Detected already active root span during setup. Active root spans now:",n),this._beginProfiling()),this._isRunning&&Go(e)}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,T&&g.log("[Profiling] Started profiling with profiler ID:",this._profilerId),Fr().setContext("profile",{profiler_id:this._profilerId}),this._startProfilerInstance(),!this._profiler){T&&g.log("[Profiling] Failed to start JS Profiler; stopping."),this._resetProfilerInfo();return}this._startPeriodicChunking()}}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&(clearTimeout(this._chunkTimer),this._chunkTimer=void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(e=>{T&&g.error("[Profiling] Failed to collect current profile chunk on `stop()`:",e)}),this._lifecycleMode==="manual"&&Fr().setContext("profile",{}))}_setupTraceLifecycleListeners(e){e.on("spanStart",t=>{if(!this._sessionSampled){T&&g.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(t!==Se(t))return;if(!t.isRecording()){T&&g.log("[Profiling] Discarding profile because root span was not sampled.");return}const n=t.spanContext().spanId;if(!n||this._activeRootSpanIds.has(n))return;this._registerTraceRootSpan(n);const r=this._activeRootSpanIds.size;r===1&&(T&&g.log(`[Profiling] Root span ${n} started. Profiling active while there are active root spans (count=${r}).`),this._beginProfiling())}),e.on("spanEnd",t=>{if(!this._sessionSampled)return;const n=t.spanContext().spanId;if(!n||!this._activeRootSpanIds.has(n))return;this._activeRootSpanIds.delete(n);const r=this._activeRootSpanIds.size;T&&g.log(`[Profiling] Root span with ID ${n} ended. Will continue profiling for as long as there are active root spans (currently: ${r}).`),r===0&&(this._collectCurrentChunk().catch(i=>{T&&g.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",i)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,Fr().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(e=>clearTimeout(e)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(e){this._activeRootSpanIds.add(e);const t=setTimeout(()=>this._onRootSpanTimeout(e),JN);this._rootSpanTimeouts.set(e,t)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const e=fg();if(!e){T&&g.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=e}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(e=>{T&&g.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",e)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},YN))}_onRootSpanTimeout(e){this._rootSpanTimeouts.has(e)&&(this._rootSpanTimeouts.delete(e),this._activeRootSpanIds.has(e)&&(T&&g.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(){const e=this._profiler;if(this._profiler=void 0,!!e)try{const t=await e.stop(),n=PN(t,this._client,this._profilerId),r=DN(n);if("reason"in r){T&&g.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",r.reason);return}this._sendProfileChunk(n),T&&g.log("[Profiling] Collected browser profile chunk.")}catch(t){T&&g.log("[Profiling] Error while stopping JS Profiler for chunk:",t)}}_sendProfileChunk(e){const t=this._client,n=ci(t.getSdkMetadata?.()),r=t.getDsn(),i=t.getOptions().tunnel,s=Xe({event_id:ke(),sent_at:new Date().toISOString(),...n&&{sdk:n},...!!i&&r&&{dsn:vt(r)}},[[{type:"profile_chunk",platform:"javascript"},e]]);t.sendEnvelope(s).then(null,a=>{T&&g.error("Error while sending profile chunk envelope:",a)})}},XN="BrowserProfiling",QN=o((()=>({name:XN,setup(e){const t=e.getOptions(),n=new KN;if(!Yi(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),Yi(t)&&!t.profilesSampleRate){T&&g.log("[Profiling] Profiling disabled, no profiling options found.");return}const r=be(),i=r&&Se(r);if(Yi(t)&&t.profileSessionSampleRate!==void 0&&T&&g.warn("[Profiling] Both legacy profiling (`profilesSampleRate`) and UI profiling settings are defined. `profileSessionSampleRate` has no effect when legacy profiling is enabled."),Yi(t))i&&cg(i)&&ef(i)&&tf(i),e.on("spanStart",s=>{const a=Se(s);s===a?ef(s)&&tf(s):pg.has(a)&&Go(s)}),e.on("beforeEnvelope",s=>{if(!zN())return;const a=UN(s);if(!a.length)return;const c=[];for(const u of a){const l=u?.contexts,f=l?.profile?.profile_id,d=l?.profile?.start_timestamp;if(typeof f!="string"){T&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!f){T&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}l?.profile&&delete l.profile;const p=GN(f);if(!p){T&&g.log(`[Profiling] Could not retrieve profile for span: ${f}`);continue}const h=qN(f,d,p,u);h&&c.push(h)}BN(s,c)});else{const s=t.profileLifecycle;if(e.on("startUIProfiler",()=>n.start()),e.on("stopUIProfiler",()=>n.stop()),s==="manual")n.initialize(e);else if(s==="trace"){if(!Fe(t)){T&&g.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),L.setTimeout(()=>{const a=be(),c=a&&Se(a);c&&n.notifyRootSpanActive(c)},0)}}}})),"_browserProfilingIntegration"),vO=QN,ZN="SpotlightBrowser",ex=[{op:"ui.interaction.click",name:"#sentry-spotlight"}],tx=o(((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:ZN,setup:o(()=>{T&&g.log("Using Sidecar URL",t)},"setup"),beforeSetup(n){const r=n.getOptions();r.ignoreSpans=[...r.ignoreSpans||[],...ex]},afterAllSetup:o(n=>{nx(n,t)},"afterAllSetup")}}),"_spotlightIntegration");function nx(e,t){const n=jc("fetch");let r=0;e.on("beforeEnvelope",i=>{if(r>3){g.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:bo(i),headers:{"Content-Type":"application/x-sentry-envelope"},mode:"cors"}).then(s=>{s.status>=200&&s.status<400&&(r=0)},s=>{r++,g.error("Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/",s)})})}o(nx,"setupSidecarForwarding");var SO=tx,bO=()=>({name:"LaunchDarkly",processEvent(e,t,n){return br(e)}});function EO(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:o((e,t,n)=>{In(e,t.value),wn(e,t.value)},"method")}}o(EO,"buildLaunchDarklyFlagUsedHandler");var TO=()=>({name:"OpenFeature",processEvent(e,t,n){return br(e)}}),IO=class{static{o(this,"OpenFeatureIntegrationHook")}after(e,t){In(t.flagKey,t.value),wn(t.flagKey,t.value)}error(e,t,n){In(e.flagKey,e.defaultValue),wn(e.flagKey,e.defaultValue)}},wO=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Ae(t,"isEnabled",rx)},processEvent(t,n,r){return br(t)}});function rx(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(In(n,r),wn(n,r)):T&&g.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}o(rx,"_wrappedIsEnabled");var kO=o((({growthbookClass:e})=>yb({growthbookClass:e})),"growthbookIntegration"),RO=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{In(n.gate.name,n.gate.value),wn(n.gate.name,n.gate.value)})},processEvent(t,n,r){return br(t)}});async function CO(){const e=R();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";const 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 oy(()=>fetch(t,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}o(CO,"diagnoseSdkConnectivity");var ix="WebWorker",AO=({worker:e})=>({name:ix,setupOnce:o(()=>{(Array.isArray(e)?e:[e]).forEach(t=>nf(t))},"setupOnce"),addWorker:o(t=>nf(t),"addWorker")});function nf(e){e.addEventListener("message",t=>{if(sx(t.data)){if(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(T&&g.log("Sentry debugId web worker message received",t.data),L._sentryDebugIds={...t.data._sentryDebugIds,...L._sentryDebugIds}),t.data._sentryModuleMetadata&&(T&&g.log("Sentry module metadata web worker message received",t.data),L._sentryModuleMetadata={...t.data._sentryModuleMetadata,...L._sentryModuleMetadata}),t.data._sentryWasmImages){T&&g.log("Sentry WASM images web worker message received",t.data);const n=L._sentryWasmImages||[],r=t.data._sentryWasmImages.filter(i=>Pe(i)&&typeof i.code_file=="string"&&!n.some(s=>s.code_file===i.code_file));L._sentryWasmImages=[...n,...r]}t.data._sentryWorkerError&&(T&&g.log("Sentry worker rejection message received",t.data._sentryWorkerError),ox(t.data._sentryWorkerError))}})}o(nf,"listenForSentryMessages");function ox(e){const t=R();if(!t)return;const n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,i=e.reason,s=ht(i)?em(i):ms(n,i,void 0,r,!0);s.level="error",e.filename&&(s.contexts={...s.contexts,worker:{filename:e.filename}}),fi(s,{originalException:i,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),T&&g.log("Captured worker unhandled rejection",i)}o(ox,"handleForwardedWorkerRejection");function MO({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener("unhandledrejection",t=>{const n={reason:Zh(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:n}),T&&g.log("[Sentry Worker] Forwarding unhandled rejection to parent",n)}),T&&g.log("[Sentry Worker] Registered worker with unhandled rejection handling")}o(MO,"registerWebWorker");function sx(e){if(!Pe(e)||e._sentryMessage!==!0)return!1;const t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,i="_sentryWasmImages"in e;return!(!t&&!n&&!r&&!i||t&&!(Pe(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(Pe(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!Pe(e._sentryWorkerError)||i&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(s=>Pe(s)&&typeof s.code_file=="string")))}o(sx,"isSentryMessage");export{A0 as BrowserClient,kx as MULTIPLEXED_TRANSPORT_EXTRA_KEY,IO as OpenFeatureIntegrationHook,qr as SDK_VERSION,ve as SEMANTIC_ATTRIBUTE_SENTRY_OP,re as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,a_ as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,rt as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,Sn as Scope,L as WINDOW,Ot as addBreadcrumb,ev as addEventProcessor,Vu as addIntegration,hx as bindScopeToEmitter,Dk as breadcrumbsIntegration,Vk as browserApiErrorsIntegration,vO as browserProfilingIntegration,Zk as browserSessionIntegration,hO as browserTracingIntegration,EO as buildLaunchDarklyFlagUsedHandler,Ax as captureConsoleIntegration,fi as captureEvent,me as captureException,Ab as captureFeedback,Ky as captureMessage,Us as captureSession,Sk as chromeStackLineParser,Ix as close,Fx as consoleLoggingIntegration,cO as contextLinesIntegration,px as continueTrace,Bx as createConsolaReporter,dh as createLangChainCallbackHandler,Av as createTransport,tO as createUserFeedbackEnvelope,nR as cultureContextIntegration,NS as dedupeIntegration,tg as defaultRequestInstrumentationOptions,Nk as defaultStackLineParsers,xk as defaultStackParser,CO as diagnoseSdkConnectivity,Jx as elementTimingIntegration,lp as endSession,fS as eventFiltersIntegration,I0 as eventFromException,w0 as eventFromMessage,Dc as exceptionFromError,Mx as extraErrorDataIntegration,Px as featureFlagsIntegration,Vx as feedbackAsyncIntegration,Yx as feedbackIntegration,Yx as feedbackSyncIntegration,oN as fetchStreamPerformanceIntegration,Tx as flush,rO as forceLoad,uS as functionToStringIntegration,Ik as geckoStackLineParser,Kx as getAbsoluteUrl,be as getActiveSpan,R as getClient,q as getCurrentScope,bR as getDefaultIntegrations,Gx as getFeedback,Fr as getGlobalScope,he as getIsolationScope,fO as getReplay,Se as getRootSpan,Ki as getSpanDescendants,y_ as getSpanStatusFromHttpCode,Op as getTraceData,oR as globalHandlersIntegration,uO as graphqlClientIntegration,kO as growthbookIntegration,aO as httpClientIntegration,lR as httpContextIntegration,pS as inboundFiltersIntegration,nO as init,Hx as instrumentAnthropicAiClient,qx as instrumentCreateReactAgent,Wx as instrumentGoogleGenAIClient,jx as instrumentLangChainEmbeddings,zx as instrumentLangGraph,Ux as instrumentOpenAiClient,XM as instrumentOutgoingRequests,$T as instrumentStateGraph,tb as instrumentSupabaseClient,gN as isBotUserAgent,Zy as isEnabled,wx as isInitialized,Qy as lastEventId,bO as launchDarklyIntegration,g0 as lazyLoadIntegration,mR as linkedErrorsIntegration,Dx as logger,yO as makeBrowserOfflineTransport,Xh as makeFetchTransport,Rx as makeMultiplexedTransport,$x as metrics,Cx as moduleMetadataIntegration,_R as normalizeStringifyValue,iO as onLoad,TO as openFeatureIntegration,Zx as opera10StackLineParser,eO as opera11StackLineParser,eS as parameterize,F_ as registerSpanErrorInstrumentation,MO as registerWebWorker,pO as replayCanvasIntegration,dO as replayIntegration,mO as reportPageLoaded,sO as reportingObserverIntegration,Nx as rewriteFramesIntegration,vI as sendFeedback,gO as setActiveSpanInBrowser,Sx as setAttribute,vx as setAttributes,Xy as setContext,Ex as setConversationId,qv as setCurrentClient,gx as setExtra,mx as setExtras,go as setHttpStatus,Qf as setMeasurement,yx as setTag,_x as setTags,bx as setUser,oO as showReportDialog,_O as spanStreamingIntegration,dx as spanToBaggageHeader,V as spanToJSON,L_ as spanToTraceHeader,SO as spotlightBrowserIntegration,vN as startBrowserTracingNavigationSpan,yN as startBrowserTracingPageLoadSpan,nn as startInactiveSpan,sy as startNewTrace,qu as startSession,Ft as startSpan,jt as startSpanManual,RO as statsigIntegration,xx as supabaseIntegration,oy as suppressTracing,Lx as thirdPartyErrorFilterIntegration,Xx as uiProfiler,wO as unleashIntegration,lx as updateSpanName,lO as viewHierarchyIntegration,aN as webVitalsIntegration,AO as webWorkerIntegration,Qx as winjsStackLineParser,Zo as withActiveSpan,ux as withIsolationScope,Ke as withScope,fx as withStreamedSpan,Ox as zodErrorsIntegration};