@wildo-ai/application-creation-workbench 1.1.5

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 (562) hide show
  1. package/LICENSE +34 -0
  2. package/bin/companion-proxy.d.mts +10 -0
  3. package/bin/companion-proxy.mjs +92 -0
  4. package/bin/wildo-workbench-serve.mjs +76 -0
  5. package/bin/workbench-server.d.mts +9 -0
  6. package/bin/workbench-server.mjs +225 -0
  7. package/dist/.vite/manifest.json +4671 -0
  8. package/dist/assets/ApplicationLevel_Toolbar-BddtfgIS.js +1 -0
  9. package/dist/assets/ChartEmptyState-lsMuirLh.js +1 -0
  10. package/dist/assets/ChartView-BTIzMUoU.js +56 -0
  11. package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
  12. package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
  13. package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
  14. package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
  15. package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
  16. package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
  17. package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
  18. package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
  19. package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
  20. package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
  21. package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
  22. package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
  23. package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
  24. package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
  25. package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
  26. package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
  27. package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
  28. package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
  29. package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
  30. package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
  31. package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
  32. package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
  33. package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
  34. package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
  35. package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
  36. package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
  37. package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
  38. package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
  39. package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
  40. package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
  41. package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
  42. package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
  43. package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
  44. package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
  45. package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
  46. package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
  47. package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
  48. package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
  49. package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
  50. package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
  51. package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
  52. package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
  53. package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
  54. package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
  55. package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
  56. package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
  57. package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
  58. package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
  59. package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
  60. package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
  61. package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
  62. package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
  63. package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
  64. package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
  65. package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
  66. package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
  67. package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
  68. package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
  69. package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
  70. package/dist/assets/_basePickBy-Br6YuOAk.js +1 -0
  71. package/dist/assets/_baseUniq-K10bxMjs.js +1 -0
  72. package/dist/assets/abap-BdImnpbu.js +1 -0
  73. package/dist/assets/actionscript-3-CoDkCxhg.js +1 -0
  74. package/dist/assets/ada-bCR0ucgS.js +1 -0
  75. package/dist/assets/andromeeda-C4gqWexZ.js +1 -0
  76. package/dist/assets/angular-html-BibvgTKn.js +1 -0
  77. package/dist/assets/angular-ts-DSBE9URv.js +1 -0
  78. package/dist/assets/apache-lxgVPsR9.js +1 -0
  79. package/dist/assets/apex-D8_7TLub.js +1 -0
  80. package/dist/assets/apl-B4CMkyY2.js +1 -0
  81. package/dist/assets/apl-C1AdydMG.js +1 -0
  82. package/dist/assets/applescript-Co6uUVPk.js +1 -0
  83. package/dist/assets/ara-BRHolxvo.js +1 -0
  84. package/dist/assets/arc-hTvUi_Jd.js +1 -0
  85. package/dist/assets/architectureDiagram-VXUJARFQ-DTNeQb21.js +36 -0
  86. package/dist/assets/asciiarmor-Df11BRmG.js +1 -0
  87. package/dist/assets/asciidoc-Dv7Oe6Be.js +1 -0
  88. package/dist/assets/asm-D_Q5rh1f.js +1 -0
  89. package/dist/assets/asn1-EdZsLKOL.js +1 -0
  90. package/dist/assets/asterisk-B-8jnY81.js +1 -0
  91. package/dist/assets/astro-BfIczeRD.js +1 -0
  92. package/dist/assets/aurora-x-D-2ljcwZ.js +1 -0
  93. package/dist/assets/awk-DMzUqQB5.js +1 -0
  94. package/dist/assets/ayu-dark-CMjwMIkn.js +1 -0
  95. package/dist/assets/ayu-light-C47S-Tmv.js +1 -0
  96. package/dist/assets/ayu-mirage-CjoLj4QM.js +1 -0
  97. package/dist/assets/ballerina-BFfxhgS-.js +1 -0
  98. package/dist/assets/bat-BkioyH1T.js +1 -0
  99. package/dist/assets/beancount-k_qm7-4y.js +1 -0
  100. package/dist/assets/berry-uYugtg8r.js +1 -0
  101. package/dist/assets/bibtex-CHM0blh-.js +1 -0
  102. package/dist/assets/bicep-Bmn6On1c.js +1 -0
  103. package/dist/assets/blade-rVcPaKug.js +1 -0
  104. package/dist/assets/blockDiagram-VD42YOAC-CMGydNsH.js +122 -0
  105. package/dist/assets/brainfuck-C4LP7Hcl.js +1 -0
  106. package/dist/assets/bsl-BO_Y6i37.js +1 -0
  107. package/dist/assets/c-C1AIvcHK.js +1 -0
  108. package/dist/assets/c3-VCDPK7BO.js +1 -0
  109. package/dist/assets/c4Diagram-YG6GDRKO-CTiIMIz5.js +10 -0
  110. package/dist/assets/cadence-Bv_4Rxtq.js +1 -0
  111. package/dist/assets/cairo-Cm-xO6tP.js +1 -0
  112. package/dist/assets/catppuccin-frappe-DFWUc33u.js +1 -0
  113. package/dist/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
  114. package/dist/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
  115. package/dist/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
  116. package/dist/assets/channel-DlvOdQcG.js +1 -0
  117. package/dist/assets/chunk-4BX2VUAB-CBDMQNPS.js +1 -0
  118. package/dist/assets/chunk-55IACEB6-CEmaVN-l.js +1 -0
  119. package/dist/assets/chunk-B4BG7PRW-BuRJMfnQ.js +165 -0
  120. package/dist/assets/chunk-DI55MBZ5-DTEvZEyn.js +220 -0
  121. package/dist/assets/chunk-FMBD7UC4-CQL6IezS.js +15 -0
  122. package/dist/assets/chunk-QN33PNHL-DIt1i8tt.js +1 -0
  123. package/dist/assets/chunk-QZHKN3VN-C8CdhpgW.js +1 -0
  124. package/dist/assets/chunk-TZMSLE5B-2nOqyQPZ.js +1 -0
  125. package/dist/assets/clarity-D53aC0YG.js +1 -0
  126. package/dist/assets/classDiagram-2ON5EDUG-CJonpGbc.js +1 -0
  127. package/dist/assets/classDiagram-v2-WZHVMYZB-CJonpGbc.js +1 -0
  128. package/dist/assets/clike-B9uivgTg.js +1 -0
  129. package/dist/assets/clojure-BMjYHr_A.js +1 -0
  130. package/dist/assets/clojure-P80f7IUj.js +1 -0
  131. package/dist/assets/clone-B5BftoQk.js +1 -0
  132. package/dist/assets/cm6-editor-C1am2PUt.js +13 -0
  133. package/dist/assets/cmake-BQqOBYOt.js +1 -0
  134. package/dist/assets/cmake-D1j8_8rp.js +1 -0
  135. package/dist/assets/cobol-C7Z7w_7P.js +1 -0
  136. package/dist/assets/cobol-CWcv1MsR.js +1 -0
  137. package/dist/assets/code-block-IT6T5CEO-rvNI7Npg.js +3 -0
  138. package/dist/assets/codeowners-Bp6g37R7.js +1 -0
  139. package/dist/assets/codeql-DsOJ9woJ.js +1 -0
  140. package/dist/assets/coffee-EZ7qTA2h.js +1 -0
  141. package/dist/assets/coffeescript-S37ZYGWr.js +1 -0
  142. package/dist/assets/common-lisp-Cg-RD9OK.js +1 -0
  143. package/dist/assets/commonlisp-DBKNyK5s.js +1 -0
  144. package/dist/assets/context-CjDY9wk7.js +1 -0
  145. package/dist/assets/coq-DkFqJrB1.js +1 -0
  146. package/dist/assets/cose-bilkent-S5V4N54A-Bs72jpo-.js +1 -0
  147. package/dist/assets/cpp-Cw-Qy0wQ.js +1 -0
  148. package/dist/assets/crystal-B7GPGo2j.js +1 -0
  149. package/dist/assets/crystal-SjHAIU92.js +1 -0
  150. package/dist/assets/csharp-B4XBOl5S.js +1 -0
  151. package/dist/assets/css-2F-grhOV.js +1 -0
  152. package/dist/assets/css-BnMrqG3P.js +1 -0
  153. package/dist/assets/csv-fuZLfV_i.js +1 -0
  154. package/dist/assets/cue-D82EKSYY.js +1 -0
  155. package/dist/assets/cypher-COkxafJQ.js +1 -0
  156. package/dist/assets/cypher-C_CwsFkJ.js +1 -0
  157. package/dist/assets/cytoscape.esm-YEldwGKK.js +331 -0
  158. package/dist/assets/d-85-TOEBH.js +1 -0
  159. package/dist/assets/d-pRatUO7H.js +1 -0
  160. package/dist/assets/dagre-6UL2VRFP-e0N82ZeJ.js +4 -0
  161. package/dist/assets/dark-plus-C3mMm8J8.js +1 -0
  162. package/dist/assets/dart-CF10PKvl.js +1 -0
  163. package/dist/assets/dax-CEL-wOlO.js +1 -0
  164. package/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
  165. package/dist/assets/desktop-BmXAJ9_W.js +1 -0
  166. package/dist/assets/diagram-PSM6KHXK-Wp6Xds16.js +24 -0
  167. package/dist/assets/diagram-QEK2KX5R-DrkkEGhC.js +43 -0
  168. package/dist/assets/diagram-S2PKOQOG-C3M-VMYn.js +24 -0
  169. package/dist/assets/diff-D97Zzqfu.js +1 -0
  170. package/dist/assets/diff-DbItnlRl.js +1 -0
  171. package/dist/assets/docker-BCahEMMT.js +1 -0
  172. package/dist/assets/dockerfile-BKs6k2Af.js +1 -0
  173. package/dist/assets/dotenv-Da5cRb03.js +1 -0
  174. package/dist/assets/dracula-BzJJZx-M.js +1 -0
  175. package/dist/assets/dracula-soft-BXkSAIEj.js +1 -0
  176. package/dist/assets/dream-maker-BtqSS_iP.js +1 -0
  177. package/dist/assets/dropbox-picker-BcRq4q-0.js +1 -0
  178. package/dist/assets/dtd-DF_7sFjM.js +1 -0
  179. package/dist/assets/dylan-DwRh75JA.js +1 -0
  180. package/dist/assets/ebnf-CDyGwa7X.js +1 -0
  181. package/dist/assets/ecl-Cabwm37j.js +1 -0
  182. package/dist/assets/edge-D9RNxeM6.js +1 -0
  183. package/dist/assets/eiffel-CnydiIhH.js +1 -0
  184. package/dist/assets/elixir-DY-rJNf_.js +1 -0
  185. package/dist/assets/elm-BpNGpWvw.js +1 -0
  186. package/dist/assets/elm-vLlmbW-K.js +1 -0
  187. package/dist/assets/emacs-lisp-C9XAeP06.js +1 -0
  188. package/dist/assets/engine-compile-BvZd6IhL.js +152 -0
  189. package/dist/assets/erDiagram-Q2GNP2WA-Dg-rHIsN.js +60 -0
  190. package/dist/assets/erb-CCmIx0ZV.js +1 -0
  191. package/dist/assets/erlang-BNw1qcRV.js +1 -0
  192. package/dist/assets/erlang-DtoCRGpr.js +1 -0
  193. package/dist/assets/everforest-dark-BgDCqdQA.js +1 -0
  194. package/dist/assets/everforest-light-C8M2exoo.js +1 -0
  195. package/dist/assets/factor-kuTfRLto.js +1 -0
  196. package/dist/assets/fcl-Kvtd6kyn.js +1 -0
  197. package/dist/assets/fennel-BYunw83y.js +1 -0
  198. package/dist/assets/fish-BvzEVeQv.js +1 -0
  199. package/dist/assets/flowDiagram-NV44I4VS-BP-XXSqP.js +162 -0
  200. package/dist/assets/flows-actors-graph-runtime-C8pD81-m.js +1 -0
  201. package/dist/assets/fluent-C4IJs8-o.js +1 -0
  202. package/dist/assets/forth-Ffai-XNe.js +1 -0
  203. package/dist/assets/fortran-DYz_wnZ1.js +1 -0
  204. package/dist/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
  205. package/dist/assets/fortran-free-form-BxgE0vQu.js +1 -0
  206. package/dist/assets/fsharp-pDgLt1ed.js +1 -0
  207. package/dist/assets/ganttDiagram-JELNMOA3-CroPqWYF.js +267 -0
  208. package/dist/assets/gas-Bneqetm1.js +1 -0
  209. package/dist/assets/gdresource-BOOCDP_w.js +1 -0
  210. package/dist/assets/gdscript-C5YyOfLZ.js +1 -0
  211. package/dist/assets/gdshader-DkwncUOv.js +1 -0
  212. package/dist/assets/genie-D0YGMca9.js +1 -0
  213. package/dist/assets/gherkin-DyxjwDmM.js +1 -0
  214. package/dist/assets/gherkin-heZmZLOM.js +1 -0
  215. package/dist/assets/git-commit-F4YmCXRG.js +1 -0
  216. package/dist/assets/git-rebase-CXlyqdRO.js +1 -0
  217. package/dist/assets/gitGraphDiagram-V2S2FVAM-DC9FCbno.js +65 -0
  218. package/dist/assets/github-dark-default-Cuk6v7N8.js +1 -0
  219. package/dist/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
  220. package/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
  221. package/dist/assets/github-dark-nz1Ug7wa.js +1 -0
  222. package/dist/assets/github-light-default-D7oLnXFd.js +1 -0
  223. package/dist/assets/github-light-hIqfNsk6.js +1 -0
  224. package/dist/assets/github-light-high-contrast-6z6OUpro.js +1 -0
  225. package/dist/assets/gleam-BspZqrRM.js +1 -0
  226. package/dist/assets/glimmer-js-4PGhN-7r.js +1 -0
  227. package/dist/assets/glimmer-ts-kVLhaHhe.js +1 -0
  228. package/dist/assets/glsl-CX9owe7H.js +1 -0
  229. package/dist/assets/gn-n2N0HUVH.js +1 -0
  230. package/dist/assets/gnuplot-DdkO51Og.js +1 -0
  231. package/dist/assets/go-By8Zikic.js +1 -0
  232. package/dist/assets/google-drive-picker-B7-UtQYR.js +1 -0
  233. package/dist/assets/graph-C0dMcX0W.js +1 -0
  234. package/dist/assets/graph-runtime-BZV40eAE.css +1 -0
  235. package/dist/assets/graph-runtime-CWiE-wtz.js +1 -0
  236. package/dist/assets/graphql-Ezmk7T_o.js +1 -0
  237. package/dist/assets/groovy-D9Dt4D0W.js +1 -0
  238. package/dist/assets/groovy-gcz8RCvz.js +1 -0
  239. package/dist/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
  240. package/dist/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
  241. package/dist/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
  242. package/dist/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
  243. package/dist/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
  244. package/dist/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
  245. package/dist/assets/hack-maT9pS_L.js +1 -0
  246. package/dist/assets/haml-BrME_4GE.js +1 -0
  247. package/dist/assets/handlebars-iR92xn-S.js +1 -0
  248. package/dist/assets/haskell-Cw1EW3IL.js +1 -0
  249. package/dist/assets/haskell-Df6bDoY_.js +1 -0
  250. package/dist/assets/haxe-CzTSHFRz.js +1 -0
  251. package/dist/assets/haxe-H-WmDvRZ.js +1 -0
  252. package/dist/assets/hcl-BWvSN4gD.js +1 -0
  253. package/dist/assets/hjson-D5-asLiD.js +1 -0
  254. package/dist/assets/hlsl-D3lLCCz7.js +1 -0
  255. package/dist/assets/horizon-BUw7H-hv.js +1 -0
  256. package/dist/assets/houston-DnULxvSX.js +1 -0
  257. package/dist/assets/html-CGdhS0W0.js +1 -0
  258. package/dist/assets/html-derivative-BEJpVzmk.js +1 -0
  259. package/dist/assets/http-Bb_wsZIK.js +1 -0
  260. package/dist/assets/http-DBlCnlav.js +1 -0
  261. package/dist/assets/hurl-Crl3N93z.js +1 -0
  262. package/dist/assets/hxml-Bvhsp5Yf.js +1 -0
  263. package/dist/assets/hy-DFXneXwc.js +1 -0
  264. package/dist/assets/idl-BEugSyMb.js +1 -0
  265. package/dist/assets/imba-DGztddWO.js +1 -0
  266. package/dist/assets/index-9s27iSag.js +13 -0
  267. package/dist/assets/index-B4dr2goB.js +1 -0
  268. package/dist/assets/index-BOiBO34F.js +1 -0
  269. package/dist/assets/index-BOxxilol.js +1 -0
  270. package/dist/assets/index-Be7Kt732.js +1 -0
  271. package/dist/assets/index-Bgs_pC_Y.js +1 -0
  272. package/dist/assets/index-BkvM_lMh.js +1 -0
  273. package/dist/assets/index-COFqdHy-.js +7 -0
  274. package/dist/assets/index-Cey0RnOC.js +2 -0
  275. package/dist/assets/index-Cl_eCn7w.js +1 -0
  276. package/dist/assets/index-Cn1WDMib.js +1 -0
  277. package/dist/assets/index-D2Lcurso.js +994 -0
  278. package/dist/assets/index-D5kqp6s0.js +1 -0
  279. package/dist/assets/index-D7UJLb5I.js +1 -0
  280. package/dist/assets/index-D9v8TSci.js +1 -0
  281. package/dist/assets/index-DKCAweKx.js +1 -0
  282. package/dist/assets/index-DPnXh7rr.js +6 -0
  283. package/dist/assets/index-DPuqBa_G.js +499 -0
  284. package/dist/assets/index-DZopo5F6.js +1 -0
  285. package/dist/assets/index-Df0eJHBm.js +6 -0
  286. package/dist/assets/index-DlJDBjRm.js +1 -0
  287. package/dist/assets/index-Dq0jp-Om.js +1 -0
  288. package/dist/assets/index-Dq_EnMVo.js +1 -0
  289. package/dist/assets/index-DrKP8dhg.js +1 -0
  290. package/dist/assets/index-DvFC4HED.js +1 -0
  291. package/dist/assets/index-ZpEoSVCX.js +1 -0
  292. package/dist/assets/index-e-4cSkrt.js +1 -0
  293. package/dist/assets/index-nHF1ekZC.css +1 -0
  294. package/dist/assets/index-t42UNDS6.js +3 -0
  295. package/dist/assets/index-wtSklh0n.js +367 -0
  296. package/dist/assets/index.es-OTtV-Qaj.js +11 -0
  297. package/dist/assets/infoDiagram-HS3SLOUP-BumgayY_.js +2 -0
  298. package/dist/assets/ini-BEwlwnbL.js +1 -0
  299. package/dist/assets/init-Gi6I4Gst.js +1 -0
  300. package/dist/assets/java-B1ZIgn8J.js +1 -0
  301. package/dist/assets/javascript-DB3RxkHZ.js +1 -0
  302. package/dist/assets/javascript-iXu5QeM3.js +1 -0
  303. package/dist/assets/jinja-CExX7mQY.js +1 -0
  304. package/dist/assets/jison-ByLJaaPa.js +1 -0
  305. package/dist/assets/journeyDiagram-XKPGCS4Q-C5l-W_D3.js +139 -0
  306. package/dist/assets/json-BHNwtY8x.js +1 -0
  307. package/dist/assets/json5-C9tS-k6U.js +1 -0
  308. package/dist/assets/jsonc-Des-eS-w.js +1 -0
  309. package/dist/assets/jsonl-DcaNXYhu.js +1 -0
  310. package/dist/assets/jsonnet-DFQXde-d.js +1 -0
  311. package/dist/assets/jssm-C2t-YnRu.js +1 -0
  312. package/dist/assets/jsx-g9-lgVsj.js +1 -0
  313. package/dist/assets/julia-Cp2WDBBU.js +1 -0
  314. package/dist/assets/julia-DuME0IfC.js +1 -0
  315. package/dist/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
  316. package/dist/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
  317. package/dist/assets/kanagawa-wave-DWedfzmr.js +1 -0
  318. package/dist/assets/kanban-definition-3W4ZIXB7-B__BbWoq.js +89 -0
  319. package/dist/assets/katex-mBojCVha.css +1 -0
  320. package/dist/assets/kdl-DV7GczEv.js +1 -0
  321. package/dist/assets/kotlin-sgMXoC0-.js +1 -0
  322. package/dist/assets/kusto-DZf3V79B.js +1 -0
  323. package/dist/assets/laserwave-DUszq2jm.js +1 -0
  324. package/dist/assets/latex-DGMBWnxU.js +1 -0
  325. package/dist/assets/layout-Ct3mCMS9.js +1 -0
  326. package/dist/assets/lean-BZvkOJ9d.js +1 -0
  327. package/dist/assets/less-DdoiPXMy.js +1 -0
  328. package/dist/assets/light-plus-B7mTdjB0.js +1 -0
  329. package/dist/assets/linear-Dz3rN3XM.js +1 -0
  330. package/dist/assets/liquid-Bgq501XT.js +1 -0
  331. package/dist/assets/livescript-BwQOo05w.js +1 -0
  332. package/dist/assets/llvm-BtvRca6l.js +1 -0
  333. package/dist/assets/log-2UxHyX5q.js +1 -0
  334. package/dist/assets/logo-BtOb2qkB.js +1 -0
  335. package/dist/assets/lua-Bs6SvAw9.js +1 -0
  336. package/dist/assets/lua-VAEuO923.js +1 -0
  337. package/dist/assets/luau-C-HG3fhB.js +1 -0
  338. package/dist/assets/make-CHLpvVh8.js +1 -0
  339. package/dist/assets/markdown-Dt3v3XWf.js +1 -0
  340. package/dist/assets/marko-CKEO3SBW.js +1 -0
  341. package/dist/assets/material-theme-D5KoaKCx.js +1 -0
  342. package/dist/assets/material-theme-darker-BfHTSMKl.js +1 -0
  343. package/dist/assets/material-theme-lighter-B0m2ddpp.js +1 -0
  344. package/dist/assets/material-theme-ocean-CyktbL80.js +1 -0
  345. package/dist/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
  346. package/dist/assets/mathematica-DTrFuWx2.js +1 -0
  347. package/dist/assets/matlab-D7o27uSR.js +1 -0
  348. package/dist/assets/mbox-CNhZ1qSd.js +1 -0
  349. package/dist/assets/mdc-BCNxBr-G.js +1 -0
  350. package/dist/assets/mdx-Cmh6b_Ma.js +1 -0
  351. package/dist/assets/mermaid-VLURNSYL-C4UDY296.js +386 -0
  352. package/dist/assets/mermaid-mWjccvbQ.js +1 -0
  353. package/dist/assets/mermaid.core-CRNTw-K2.js +197 -0
  354. package/dist/assets/min-dark-CafNBF8u.js +1 -0
  355. package/dist/assets/min-light-CTRr51gU.js +1 -0
  356. package/dist/assets/mindmap-definition-VGOIOE7T-Dns6Jp-h.js +68 -0
  357. package/dist/assets/mipsasm-CKIfxQSi.js +1 -0
  358. package/dist/assets/mirc-CjQqDB4T.js +1 -0
  359. package/dist/assets/mllike-CXdrOF99.js +1 -0
  360. package/dist/assets/modelica-Dc1JOy9r.js +1 -0
  361. package/dist/assets/mojo-B93PlW-d.js +1 -0
  362. package/dist/assets/monokai-D4h5O-jR.js +1 -0
  363. package/dist/assets/moonbit-Ba13S78F.js +1 -0
  364. package/dist/assets/move-IF9eRakj.js +1 -0
  365. package/dist/assets/mscgen-BA5vi2Kp.js +1 -0
  366. package/dist/assets/mumps-BT43cFF4.js +1 -0
  367. package/dist/assets/narrat-DRg8JJMk.js +1 -0
  368. package/dist/assets/nextflow-BrzmwbiE.js +1 -0
  369. package/dist/assets/nginx-DMb6Hdes.js +1 -0
  370. package/dist/assets/nginx-DdIZxoE0.js +1 -0
  371. package/dist/assets/night-owl-C39BiMTA.js +1 -0
  372. package/dist/assets/night-owl-light-CMTm3GFP.js +1 -0
  373. package/dist/assets/nim-DIRWUau3.js +1 -0
  374. package/dist/assets/nix-CwoSXNpI.js +1 -0
  375. package/dist/assets/nord-Ddv68eIx.js +1 -0
  376. package/dist/assets/nsis-LdVXkNf5.js +1 -0
  377. package/dist/assets/ntriples-BfvgReVJ.js +1 -0
  378. package/dist/assets/nushell-C-sUppwS.js +1 -0
  379. package/dist/assets/objective-c-DXmwc3jG.js +1 -0
  380. package/dist/assets/objective-cpp-CLxacb5B.js +1 -0
  381. package/dist/assets/ocaml-C0hk2d4L.js +1 -0
  382. package/dist/assets/octave-Ck1zUtKM.js +1 -0
  383. package/dist/assets/odin-BBf5iR-q.js +1 -0
  384. package/dist/assets/one-dark-pro-D285M-o5.js +1 -0
  385. package/dist/assets/one-light-C3Wv6jpd.js +1 -0
  386. package/dist/assets/onedrive-picker-ClfxORZE.js +1 -0
  387. package/dist/assets/openscad-C4EeE6gA.js +1 -0
  388. package/dist/assets/ordinal-Cboi1Yqb.js +1 -0
  389. package/dist/assets/oz-BzwKVEFT.js +1 -0
  390. package/dist/assets/pascal--L3eBynH.js +1 -0
  391. package/dist/assets/pascal-D93ZcfNL.js +1 -0
  392. package/dist/assets/pdf-viewer-BSApg-uG.js +55 -0
  393. package/dist/assets/pdf-viewer-worker-jo3vTKcN.js +2 -0
  394. package/dist/assets/pdf-viewer-worker.vite-B-r9dkPE.js +1 -0
  395. package/dist/assets/pdf.worker.min-C2fI36uq.js +53 -0
  396. package/dist/assets/perl-CdXCOZ3F.js +1 -0
  397. package/dist/assets/perl-D3Vg76T_.js +1 -0
  398. package/dist/assets/php-DT7n7RcQ.js +1 -0
  399. package/dist/assets/pieDiagram-ADFJNKIX-B8Jsapz3.js +30 -0
  400. package/dist/assets/pig-CevX1Tat.js +1 -0
  401. package/dist/assets/pkl-u5AG7uiY.js +1 -0
  402. package/dist/assets/plastic-3e1v2bzS.js +1 -0
  403. package/dist/assets/plsql-ChMvpjG-.js +1 -0
  404. package/dist/assets/po-BTJTHyun.js +1 -0
  405. package/dist/assets/poimandres-CS3Unz2-.js +1 -0
  406. package/dist/assets/polar-C0HS_06l.js +1 -0
  407. package/dist/assets/postcss-CXtECtnM.js +1 -0
  408. package/dist/assets/powerquery-CEu0bR-o.js +1 -0
  409. package/dist/assets/powershell-CFHJl5sT.js +1 -0
  410. package/dist/assets/powershell-DBcoQAf-.js +1 -0
  411. package/dist/assets/prisma-Dd19v3D-.js +1 -0
  412. package/dist/assets/prolog-CbFg5uaA.js +1 -0
  413. package/dist/assets/properties-C78fOPTZ.js +1 -0
  414. package/dist/assets/proto-C7zT0LnQ.js +1 -0
  415. package/dist/assets/protobuf-ChK-085T.js +1 -0
  416. package/dist/assets/pug-DJeKe7bg.js +1 -0
  417. package/dist/assets/pug-DeIclll2.js +1 -0
  418. package/dist/assets/puppet-BMWR74SV.js +1 -0
  419. package/dist/assets/puppet-DMA9R1ak.js +1 -0
  420. package/dist/assets/purescript-CklMAg4u.js +1 -0
  421. package/dist/assets/python-BuPzkPfP.js +1 -0
  422. package/dist/assets/python-DWrqmXJp.js +1 -0
  423. package/dist/assets/q-pXgVlZs6.js +1 -0
  424. package/dist/assets/qml-BRuqEUvJ.js +1 -0
  425. package/dist/assets/qmldir-C8lEn-DE.js +1 -0
  426. package/dist/assets/qss-IeuSbFQv.js +1 -0
  427. package/dist/assets/quadrantDiagram-AYHSOK5B-C-kQhqve.js +7 -0
  428. package/dist/assets/r-B6wPVr8A.js +1 -0
  429. package/dist/assets/r-Dspwwk_N.js +1 -0
  430. package/dist/assets/racket-BqYA7rlc.js +1 -0
  431. package/dist/assets/raku-DXvB9xmW.js +1 -0
  432. package/dist/assets/razor-CzA984p4.js +1 -0
  433. package/dist/assets/red-bN70gL4F.js +1 -0
  434. package/dist/assets/reg-C-SQnVFl.js +1 -0
  435. package/dist/assets/regexp-CDVJQ6XC.js +1 -0
  436. package/dist/assets/rel-C3B-1QV4.js +1 -0
  437. package/dist/assets/requirementDiagram-UZGBJVZJ-CCFa12OF.js +64 -0
  438. package/dist/assets/riscv-BM1_JUlF.js +1 -0
  439. package/dist/assets/ron-BhRPY-oY.js +1 -0
  440. package/dist/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
  441. package/dist/assets/rose-pine-moon-D4_iv3hh.js +1 -0
  442. package/dist/assets/rose-pine-qdsjHGoJ.js +1 -0
  443. package/dist/assets/rosmsg-BJDFO7_C.js +1 -0
  444. package/dist/assets/rpm-CTu-6PCP.js +1 -0
  445. package/dist/assets/rst-2zNva11Y.js +1 -0
  446. package/dist/assets/ruby-B2Rjki9n.js +1 -0
  447. package/dist/assets/ruby-DmXPWWCu.js +1 -0
  448. package/dist/assets/rust-BBYK4zRa.js +1 -0
  449. package/dist/assets/sankeyDiagram-TZEHDZUN-COr9DFuT.js +10 -0
  450. package/dist/assets/sas-B4kiWyti.js +1 -0
  451. package/dist/assets/sas-DmZASBe0.js +1 -0
  452. package/dist/assets/sass-Cj5Yp3dK.js +1 -0
  453. package/dist/assets/scala-SE1iKWUP.js +1 -0
  454. package/dist/assets/scheme-C41bIUwD.js +1 -0
  455. package/dist/assets/scheme-C98Dy4si.js +1 -0
  456. package/dist/assets/scss-DsF9DJKc.js +1 -0
  457. package/dist/assets/sdbl-DVxCFoDh.js +1 -0
  458. package/dist/assets/sequenceDiagram-WL72ISMW-B6sTQliE.js +145 -0
  459. package/dist/assets/shaderlab-Dg9Lc6iA.js +1 -0
  460. package/dist/assets/shell-CjFT_Tl9.js +1 -0
  461. package/dist/assets/shellscript-SHvotRv0.js +1 -0
  462. package/dist/assets/shellsession-Dtw7k0Yt.js +1 -0
  463. package/dist/assets/shiki-highlighter-runtime-D7okHLco.js +2 -0
  464. package/dist/assets/sieve-C3Gn_uJK.js +1 -0
  465. package/dist/assets/simple-mode-GW_nhZxv.js +1 -0
  466. package/dist/assets/slack-dark-BthQWCQV.js +1 -0
  467. package/dist/assets/slack-ochin-DqwNpetd.js +1 -0
  468. package/dist/assets/smalltalk-BERRCDM3.js +1 -0
  469. package/dist/assets/smalltalk-CnHTOXQT.js +1 -0
  470. package/dist/assets/snazzy-light-Bw305WKR.js +1 -0
  471. package/dist/assets/solarized-dark-DXbdFlpD.js +1 -0
  472. package/dist/assets/solarized-light-L9t79GZl.js +1 -0
  473. package/dist/assets/solidity-rGO070M0.js +1 -0
  474. package/dist/assets/solr-DehyRSwq.js +1 -0
  475. package/dist/assets/soy-uR-UO2eq.js +1 -0
  476. package/dist/assets/sparql-DkYu6x3z.js +1 -0
  477. package/dist/assets/sparql-rVzFXLq3.js +1 -0
  478. package/dist/assets/splunk-BtCnVYZw.js +1 -0
  479. package/dist/assets/spreadsheet-BCZA_wO0.js +1 -0
  480. package/dist/assets/sql-CkNxgkeS.js +1 -0
  481. package/dist/assets/sql-D0XecflT.js +1 -0
  482. package/dist/assets/ssh-config-_ykCGR6B.js +1 -0
  483. package/dist/assets/stata-DVBxQR2G.js +1 -0
  484. package/dist/assets/stateDiagram-FKZM4ZOC-Dpg3xi0D.js +1 -0
  485. package/dist/assets/stateDiagram-v2-4FDKWEC3-CK1yFthu.js +1 -0
  486. package/dist/assets/stex-C3f8Ysf7.js +1 -0
  487. package/dist/assets/stylus-B533Al4x.js +1 -0
  488. package/dist/assets/stylus-BEDo0Tqx.js +1 -0
  489. package/dist/assets/surrealql-CId8jo-x.js +1 -0
  490. package/dist/assets/svelte-B5J3Hg63.js +1 -0
  491. package/dist/assets/swift-B0ofQ8RM.js +1 -0
  492. package/dist/assets/swift-BzpIVaGY.js +1 -0
  493. package/dist/assets/synthwave-84-CbfX1IO0.js +1 -0
  494. package/dist/assets/system-verilog-CnnmHF94.js +1 -0
  495. package/dist/assets/systemd-4A_iFExJ.js +1 -0
  496. package/dist/assets/talonscript-CkByrt1z.js +1 -0
  497. package/dist/assets/tasl-QIJgUcNo.js +1 -0
  498. package/dist/assets/tcl-DVfN8rqt.js +1 -0
  499. package/dist/assets/tcl-dwOrl1Do.js +1 -0
  500. package/dist/assets/templ--uRs7fp8.js +1 -0
  501. package/dist/assets/terraform-BETggiCN.js +1 -0
  502. package/dist/assets/tex-CvyZ59Mk.js +1 -0
  503. package/dist/assets/textile-CnDTJFAw.js +1 -0
  504. package/dist/assets/tiddlywiki-DO-Gjzrf.js +1 -0
  505. package/dist/assets/tiki-DGYXhP31.js +1 -0
  506. package/dist/assets/timeline-definition-IT6M3QCI-DZBb9YJX.js +61 -0
  507. package/dist/assets/tokyo-night-hegEt444.js +1 -0
  508. package/dist/assets/toml-Bm5Em-hy.js +1 -0
  509. package/dist/assets/toml-vGWfd6FD.js +1 -0
  510. package/dist/assets/treemap-GDKQZRPO-Oo1I1edJ.js +160 -0
  511. package/dist/assets/troff-wAsdV37c.js +1 -0
  512. package/dist/assets/ts-tags-D4tKSV7t.js +1 -0
  513. package/dist/assets/tsv-B_m7g4N7.js +1 -0
  514. package/dist/assets/tsx-COt5Ahok.js +1 -0
  515. package/dist/assets/ttcn-CfJYG6tj.js +1 -0
  516. package/dist/assets/ttcn-cfg-B9xdYoR4.js +1 -0
  517. package/dist/assets/turtle-B1tBg_DP.js +1 -0
  518. package/dist/assets/turtle-BsS91CYL.js +1 -0
  519. package/dist/assets/twig-BbcE4EvC.js +1 -0
  520. package/dist/assets/typescript-CCfADO3_.js +1 -0
  521. package/dist/assets/typespec-BGHnOYBU.js +1 -0
  522. package/dist/assets/typst-DHCkPAjA.js +1 -0
  523. package/dist/assets/v-BcVCzyr7.js +1 -0
  524. package/dist/assets/vala-CsfeWuGM.js +1 -0
  525. package/dist/assets/vb-CmGdzxic.js +1 -0
  526. package/dist/assets/vb-D17OF-Vu.js +1 -0
  527. package/dist/assets/vbscript-BuJXcnF6.js +1 -0
  528. package/dist/assets/velocity-D8B20fx6.js +1 -0
  529. package/dist/assets/verilog-BQ8w6xss.js +1 -0
  530. package/dist/assets/verilog-C6RDOZhf.js +1 -0
  531. package/dist/assets/vesper-DU1UobuO.js +1 -0
  532. package/dist/assets/vhdl-CeAyd5Ju.js +1 -0
  533. package/dist/assets/vhdl-lSbBsy5d.js +1 -0
  534. package/dist/assets/viml-CJc9bBzg.js +1 -0
  535. package/dist/assets/vitesse-black-Bkuqu6BP.js +1 -0
  536. package/dist/assets/vitesse-dark-D0r3Knsf.js +1 -0
  537. package/dist/assets/vitesse-light-CVO1_9PV.js +1 -0
  538. package/dist/assets/vue-_y7Uqjzm.js +1 -0
  539. package/dist/assets/vue-html-DwslK3cu.js +1 -0
  540. package/dist/assets/vue-vine-BZmWytvS.js +1 -0
  541. package/dist/assets/vyper-CDx5xZoG.js +1 -0
  542. package/dist/assets/wasm-CG6Dc4jp.js +1 -0
  543. package/dist/assets/wasm-MzD3tlZU.js +1 -0
  544. package/dist/assets/webidl-ZXfAyPTL.js +1 -0
  545. package/dist/assets/wenyan-BV7otONQ.js +1 -0
  546. package/dist/assets/wgsl-Dx-B1_4e.js +1 -0
  547. package/dist/assets/wikitext-BhOHFoWU.js +1 -0
  548. package/dist/assets/wit-5i3qLPDT.js +1 -0
  549. package/dist/assets/wolfram-lXgVvXCa.js +1 -0
  550. package/dist/assets/x-CHMqFUz-.js +21 -0
  551. package/dist/assets/xml-DF_Bs8cR.js +1 -0
  552. package/dist/assets/xquery-DzFWVndE.js +1 -0
  553. package/dist/assets/xsl-i061jk2d.js +1 -0
  554. package/dist/assets/xychartDiagram-PRI3JC2R-BhTbi7nd.js +7 -0
  555. package/dist/assets/yacas-BJ4BC0dw.js +1 -0
  556. package/dist/assets/yaml-DbVfSbck.js +1 -0
  557. package/dist/assets/z80-Hz9HOZM7.js +1 -0
  558. package/dist/assets/zenscript-DVFEvuxE.js +1 -0
  559. package/dist/assets/zig-VOosw3JB.js +1 -0
  560. package/dist/brand/wildo-symbol.png +0 -0
  561. package/dist/index.html +84 -0
  562. package/package.json +57 -0
@@ -0,0 +1,499 @@
1
+ const I=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,$=globalThis,Vt="10.73.0";function Et(){return Tr($),$}function Tr(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Vt,t[Vt]=t[Vt]||{}}function Ir(e,t,n=$){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[Vt]=r[Vt]||{};return o[e]||(o[e]=t())}const cc=["debug","info","warn","error","log","assert","trace"],Rg="Sentry Logger ",ys={};function $t(e){if(!("console"in $))return e();const t=$.console,n={},r=Object.keys(ys);r.forEach(o=>{const s=ys[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Cg(){lc().enabled=!0}function Ag(){lc().enabled=!1}function hf(){return lc().enabled}function Mg(...e){uc("log",...e)}function xg(...e){uc("warn",...e)}function Ng(...e){uc("error",...e)}function uc(e,...t){I&&hf()&&$t(()=>{$.console[e](`${Rg}[${e}]:`,...t)})}function lc(){return I?Ir("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const g={enable:Cg,disable:Ag,isEnabled:hf,log:Mg,warn:xg,error:Ng},mf=50,mt="?",vu=/\(error: (.*)\)/,Tu=/captureMessage|captureException/;function gf(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{const s=[],i=n.split(`
2
+ `);for(let a=r;a<i.length;a++){let c=i[a];c.length>1024&&(c=c.slice(0,1024));const u=vu.test(c)?c.replace(vu,"$1"):c;if(!u.includes("Error: ")){for(const d of t){const l=d(u);if(l){s.push(l);break}}if(s.length>=mf+o)break}}return Lg(s.slice(o))}}function Og(e){return Array.isArray(e)?gf(...e):e}function Lg(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(Do(t).function||"")&&t.pop(),t.reverse(),Tu.test(Do(t).function||"")&&(t.pop(),Tu.test(Do(t).function||"")&&t.pop()),t.slice(0,mf).map(n=>({...n,filename:n.filename||Do(t).filename,function:n.function||mt}))}function Do(e){return e[e.length-1]||{}}const Ui="<anonymous>";function Lt(e){try{return!e||typeof e!="function"?Ui:e.name||Ui}catch{return Ui}}function ba(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}}}function Pg(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}const Fr={},Iu={};function rn(e,t){return Fr[e]=Fr[e]||[],Fr[e].push(t),()=>{const n=Fr[e];if(n){const r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}function on(e,t){if(!Iu[e]){Iu[e]=!0;try{t()}catch(n){I&&g.error(`Error while instrumenting ${e}`,n)}}}function Ye(e,t){const n=e&&Fr[e];if(n)for(const r of n)try{r(t)}catch(o){I&&g.error(`Error while triggering instrumentation handler.
3
+ Type: ${e}
4
+ Name: ${Lt(r)}
5
+ Error:`,o)}}let Hi=null;function _f(e){const t="error";rn(t,e),on(t,Dg)}function Dg(){Hi=$.onerror,$.onerror=function(e,t,n,r,o){return Ye("error",{column:r,error:o,line:n,msg:e,url:t}),Hi?Hi.apply(this,arguments):!1},$.onerror.__SENTRY_INSTRUMENTED__=!0}let Wi=null;function yf(e){const t="unhandledrejection";rn(t,e),on(t,Fg)}function Fg(){Wi=$.onunhandledrejection,$.onunhandledrejection=function(e){return Ye("unhandledrejection",e),Wi?Wi.apply(this,arguments):!0},$.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Sf=Object.prototype.toString;function De(e){switch(Sf.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return ei(e,Error)}}function wr(e,t){return Sf.call(e)===`[object ${t}]`}function bf(e){return wr(e,"ErrorEvent")}function wu(e){return wr(e,"DOMError")}function $g(e){return wr(e,"DOMException")}function ot(e){return wr(e,"String")}function Qs(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function gt(e){return e===null||Qs(e)||typeof e!="object"&&typeof e!="function"}function Pe(e){return wr(e,"Object")}function Je(e){return typeof e=="object"&&e!==null}function Zs(e){return typeof Event<"u"&&ei(e,Event)}function Bg(e){return wr(e,"RegExp")}function Ln(e){return!!(e?.then&&typeof e.then=="function")}function ei(e,t){try{return e instanceof t}catch{return!1}}function dc(e){return typeof Request<"u"&&ei(e,Request)}function Ce(e,t,n){if(!(t in e))return;const r=e[t];if(typeof r!="function")return;const o=n(r);typeof o=="function"&&Ef(o,r);try{e[t]=o}catch{I&&g.log(`Failed to replace method "${t}" in object`,e)}}function Re(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)}}function Ef(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Re(e,"__sentry_original__",t)}catch{}}function fc(e){return e.__sentry_original__}function vf(e){if(De(e))return{message:e.message,name:e.name,stack:e.stack,...ku(e)};if(Zs(e)){const{type:t,target:n,currentTarget:r,detail:o}=e;return{type:t,target:n,currentTarget:r,...o?{detail:o}:{},...ku(e)}}return e}function ku(e){return Je(e)?Object.fromEntries(Object.entries(e)):{}}function Ug(e){const t=Object.keys(vf(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}let jn;function uo(e){if(jn!==void 0)return jn?jn(e):e();const t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=$;return t in n&&typeof n[t]=="function"?(jn=n[t],jn(e)):(jn=null,e())}function xt(){return uo(()=>Math.random())}function vt(){return uo(()=>Date.now())}const Tf=Symbol.for("sentry.skipNormalization"),Hg=Symbol.for("sentry.overrideNormalizationDepth");function Wg(e){Re(e,Tf,!0)}function jg(e){return!!e[Tf]}function qg(e){const t=e[Hg];return typeof t=="number"?t:void 0}let Ea;function zg(e){Ea=e}function Ie(e,t=100,n=1/0){try{return va("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function If(e,t=3,n=100*1024){const r=Ie(e,t);return Yg(r)>n?If(e,t-1,n):r}function va(e,t,n=1/0,r=1/0,o=Jg()){const[s,i]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=wf(e,t);if(!a.startsWith("[object "))return a;if(jg(t))return t;const c=qg(t),u=c!==void 0?c:n;if(u===0)return a.replace("object ","");if(s(t))return"[Circular ~]";const d=t;if(d&&typeof d.toJSON=="function")try{const h=d.toJSON();return va("",h,u-1,r,o)}catch{}const l=Array.isArray(t)?[]:{};let p=0;const f=vf(t);for(const h in f){if(!Object.prototype.hasOwnProperty.call(f,h))continue;if(p>=r){l[h]="[MaxProperties ~]";break}const m=f[h];l[h]=va(h,m,u-1,r,o),p++}return i(t),l}function wf(e,t){try{if(Ea){const r=Ea(t);if(r)return r}return typeof global<"u"&&t===global?"[Global]":typeof t=="number"&&!Number.isFinite(t)?`[${t}]`:typeof t=="function"?`[Function: ${Lt(t)}]`:typeof t=="symbol"?`[${String(t)}]`:typeof t=="bigint"?`[BigInt: ${String(t)}]`:`[object ${Gg(t)}]`}catch(n){return`**non-serializable** (${n})`}}function Gg(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Vg(e){return~-encodeURI(e).split(/%..|./).length}function Yg(e){return Vg(JSON.stringify(e))}function Jg(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function je(e,t="[unserializable]"){if(typeof e=="string")return e;try{return JSON.stringify(e)}catch{return typeof t=="function"?t(e):t}}function Jr(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function ji(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let s=Math.min(o+140,r);return s>r-5&&(s=r),s===r&&(o=Math.max(s-140,0)),n=n.slice(o,s),o>0&&(n=`'{snip} ${n}`),s<r&&(n+=" {snip}"),n}function Ss(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const o=e[r];gt(o)?n.push(String(o)):o instanceof Error?n.push(o.message?`${o.name}: ${o.message}`:o.name):n.push(wf(void 0,o))}return n.join(t)}function Hr(e,t,n=!1){return ot(e)?Bg(t)?t.test(e):ot(t)?n?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function Ke(e,t=[],n=!1){for(const r of t)if(Hr(e,r,n))return!0;return!1}function Kg(){const e=$;return e.crypto||e.msCrypto}let qi;function Xg(){return xt()*16}function we(e=Kg()){try{if(e?.randomUUID)return uo(()=>e.randomUUID()).replace(/-/g,"")}catch{}return qi||(qi="10000000100040008000"+1e11),qi.replace(/[018]/g,t=>(t^(Xg()&15)>>t/4).toString(16))}function kf(e){return e.exception?.values?.[0]}function _n(e){const{message:t,event_id:n}=e;if(t)return t;const r=kf(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Ta(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type="Error")}function pt(e,t){const n=kf(e);if(!n)return;const r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism={...r,...o,...t},t&&"data"in t){const s={...o?.data,...t.data};n.mechanism.data=s}}function Qg(e,t,n=5){if(t.lineno===void 0)return;const r=e.length,o=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map(i=>ji(i,0));const s=Math.min(r-1,o);t.context_line=ji(e[s],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(i=>ji(i,0))}function Ru(e){if(Zg(e))return!0;try{Re(e,"__sentry_captured__",!0)}catch{}return!1}function Zg(e){try{return e.__sentry_captured__}catch{}}const Rf=1e3;function Pn(){return vt()/Rf}function e_(){const{performance:e}=$;if(!e?.now||!e.timeOrigin)return Pn;const t=e.timeOrigin;return()=>(t+uo(()=>e.now()))/Rf}let Cu;function _e(){return(Cu??(Cu=e_()))()}let zi=null;function t_(){const{performance:e}=$;if(!e?.now)return;const t=3e5,n=uo(()=>e.now()),r=vt(),o=e.timeOrigin;if(typeof o=="number"&&Math.abs(o+n-r)<t)return o;const s=e.timing?.navigationStart;return typeof s=="number"&&Math.abs(s+n-r)<t?s:r-n}function ve(){return zi===null&&(zi=t_()),zi}function n_(e){const t=_e(),n={sid:we(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>o_(n)};return e&&ar(n,e),n}function ar(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||_e(),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:we()),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)}function r_(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),ar(e,n)}function o_(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function lo(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 o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=lo(r[o],t[o],n-1));return r}function _t(){return we()}function Nt(){return we().substring(16)}function Cf(e){try{const t=$.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function Af(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}const Ia="_sentrySpan";function yt(e,t){t?Re(e,Ia,Cf(t)):delete e[Ia]}function cr(e){return Af(e[Ia])}const s_=100;class St{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:_t(),sampleRand:xt()}}clone(){const t=new St;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,yt(t,cr(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&&ar(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,r=n instanceof St?n.getScopeData():Pe(n)?t:void 0,{tags:o,attributes:s,extra:i,user:a,contexts:c,level:u,fingerprint:d=[],propagationContext:l,conversationId:p}=r||{};return this._tags={...this._tags,...o},this._attributes={...this._attributes,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),d.length&&(this._fingerprint=d),l&&(this._propagationContext=l),p&&(this._conversationId=p),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,yt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:_t(),sampleRand:xt()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:s_;if(r<=0)return this;const o={timestamp:Pn(),...t,message:t.message?Jr(t.message,2048):t.message};return this._breadcrumbs.push(o),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:cr(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=lo(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||we();if(!this._client)return I&&g.warn("No client configured on scope - will not capture exception!"),r;const o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){const o=r?.event_id||we();if(!this._client)return I&&g.warn("No client configured on scope - will not capture message!"),o;const s=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:o},this),o}captureEvent(t,n){const r=t.event_id||n?.event_id||we();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 i_(){return Ir("defaultCurrentScope",()=>new St)}function a_(){return Ir("defaultIsolationScope",()=>new St)}const Au=e=>e instanceof Promise&&!e[Mf],Mf=Symbol("chained PromiseLike"),xf=(e,t,n)=>{const r=e.then(o=>(t(o),o),o=>{throw n(o),o});return Au(r)&&Au(e)?r:c_(e,r)},c_=(e,t)=>{if(!t)return e;let n=!1;for(const r in e){if(r in t)continue;n=!0;const o=e[r];typeof o=="function"?Object.defineProperty(t,r,{value:(...s)=>o.apply(e,s),enumerable:!0,configurable:!0,writable:!0}):t[r]=o}return n&&Object.assign(t,{[Mf]:!0}),t};class u_{constructor(t,n){let r;t?r=t:r=new St;let o;n?o=n:o=new St,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(o){throw this._popScope(),o}return Ln(r)?xf(r,()=>this._popScope(),()=>this._popScope()):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function ur(){const e=Et(),t=Tr(e);return t.stack=t.stack||new u_(i_(),a_())}function l_(e){return ur().withScope(e)}function d_(e,t){const n=ur();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Mu(e){return ur().withScope(()=>e(ur().getIsolationScope()))}function f_(){return{withIsolationScope:Mu,withScope:l_,withSetScope:d_,withSetIsolationScope:(e,t)=>Mu(t),getCurrentScope:()=>ur().getScope(),getIsolationScope:()=>ur().getIsolationScope()}}function sn(e){const t=Tr(e);return t.acs?t.acs:f_()}function p_(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function h_(e,t){const{value:n,unit:r}=p_(e)?e:{value:e,unit:void 0},o=m_(n),s=r&&typeof r=="string"?{unit:r}:{};if(o)return{...o,...s};if(!t||t==="skip-undefined"&&n===void 0)return;let i="";try{i=JSON.stringify(n)??""}catch{}return{value:i,type:"string",...s}}function lr(e,t=!1){const n={};for(const[r,o]of Object.entries(e??{})){const s=h_(o,t);s&&(n[r]=s)}return n}function xu(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 o=r.value;Array.isArray(o)?t+=Nu(o[0])*o.length:gt(o)?t+=Nu(o):t+=100}return t}function Nu(e){return typeof e=="string"?e.length*2:typeof e=="boolean"?4:typeof e=="number"?8:0}function m_(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}}function q(){const e=Et();return sn(e).getCurrentScope()}function me(){const e=Et();return sn(e).getIsolationScope()}function Wr(){return Ir("globalScope",()=>new St)}function Xe(...e){const t=Et(),n=sn(t);if(e.length===2){const[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function EN(...e){const t=Et(),n=sn(t);if(e.length===2){const[r,o]=e;return r?n.withSetIsolationScope(r,o):n.withIsolationScope(o)}return n.withIsolationScope(e[0])}function R(){return q().getClient()}function Nf(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,s={trace_id:n,span_id:o||Nt()};return r&&(s.parent_span_id=r),s}const We="sentry.source",pc="sentry.sample_rate",Of="sentry.previous_trace_sample_rate",ge="sentry.op",oe="sentry.origin",g_="sentry.status.message",Kr="sentry.idle_span_finish_reason",fo="sentry.measurement_unit",po="sentry.measurement_value",__="sentry.release",y_="sentry.environment",S_="sentry.sdk.integrations",b_="user.id",E_="user.email",v_="user.ip_address",T_="user.name",wa="sentry.custom_span_name",hc="sentry.profile_id",an="sentry.exclusive_time",I_="http.request.method",w_="sentry.link.type",k_="gen_ai.conversation.id",Lf=0,ho=1,ne=2;function R_(e){if(e<400&&e>=100)return{code:ho};if(e>=400&&e<500)switch(e){case 401:return{code:ne,message:"unauthenticated"};case 403:return{code:ne,message:"permission_denied"};case 404:return{code:ne,message:"not_found"};case 409:return{code:ne,message:"already_exists"};case 413:return{code:ne,message:"failed_precondition"};case 429:return{code:ne,message:"resource_exhausted"};case 499:return{code:ne,message:"cancelled"};default:return{code:ne,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:ne,message:"unimplemented"};case 503:return{code:ne,message:"unavailable"};case 504:return{code:ne,message:"deadline_exceeded"};default:return{code:ne,message:"internal_error"}}return{code:ne,message:"internal_error"}}function bs(e,t){e.setAttribute("http.response.status_code",t);const n=R_(t);n.message!=="unknown_error"&&e.setStatus(n)}const Pf="_sentryScope",Df="_sentryIsolationScope",C_=Symbol.for("sentry.otelSourceInference"),A_=Symbol.for("sentry.otelSourceExplicitlySet"),M_=Symbol.for("sentry.tracerProviderSpan");function dr(e,t,n){e&&(Re(e,Df,Cf(n)),Re(e,Pf,t))}function vn(e){const t=e;return{scope:t[Pf],isolationScope:Af(t[Df])}}function Ou(e){return e[C_]===!0}function x_(e){Re(e,A_,!0)}function Lu(e){return e[M_]===!0}const Es="sentry-",N_=8192;function mc(e){const t=O_(e);if(!t)return;const n=Object.entries(t).reduce((r,[o,s])=>{if(o.startsWith(Es)){const i=o.slice(Es.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function Ff(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,o])=>(o&&(n[`${Es}${r}`]=o),n),{});return L_(t)}function O_(e){if(!(!e||!ot(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=Pu(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):Pu(e)}function Pu(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),o=t.slice(n+1);return[r,o].map(s=>{try{return decodeURIComponent(s.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function L_(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],o)=>{const s=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=o===0?s:`${t},${s}`;return i.length>N_?(I&&g.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}const P_=/^o(\d+)\./,D_=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function F_(e){return e==="http"||e==="https"}function Tt(e,t=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${i}`}function $f(e){const t=D_.exec(e);if(!t){$t(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,o="",s="",i="",a=""]=t.slice(1);let c="",u=a;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const l=u.match(/^\d+/);l&&(u=l[0])}return Bf({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Bf(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function $_(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+$/)?F_(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)}function B_(e){return e.match(P_)?.[1]}function Uf(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=B_(n)),r}function Hf(e){const t=typeof e=="string"?$f(e):Bf(e);if(!(!t||!$_(t)))return t}function kn(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}const Wf=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function U_(e){if(!e)return;const t=e.match(Wf);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function jf(e,t){const n=U_(e),r=mc(t);if(!n?.traceId)return{traceId:_t(),sampleRand:xt()};const o=H_(n,r);r&&(r.sample_rand=o.toString());const{traceId:s,parentSpanId:i,parentSampled:a}=n;return{traceId:s,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:o}}function qf(e=_t(),t=Nt(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function zf(e=_t(),t=Nt(),n){return`00-${e}-${t}-${n?"01":"00"}`}function H_(e,t){const n=kn(t?.sample_rand);if(n!==void 0)return n;const r=kn(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?xt()*r:r+xt()*(1-r):xt()}function W_(e,t){const n=Uf(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||!1)&&(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}const Gf=0,ti=1;let Du=!1;function j_(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:a,links:c}=J(e);return{parent_span_id:s,span_id:t,trace_id:n,data:r,op:o,status:i,origin:a,links:c}}function Vf(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:J(e).parent_span_id,s=vn(e).scope,i=r?s?.getPropagationContext().propagationSpanId||Nt():t;return{parent_span_id:o,span_id:i,trace_id:n}}function q_(e){const{traceId:t,spanId:n}=e.spanContext(),r=It(e);return qf(t,n,r)}function z_(e){const{traceId:t,spanId:n}=e.spanContext(),r=It(e);return zf(t,n,r)}function Yf(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...o},attributes:s})=>({span_id:t,trace_id:n,sampled:r===ti,attributes:s,...o}))}function Jf(e){if(e?.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:r},attributes:o})=>({span_id:t,trace_id:n,sampled:r===ti,attributes:o}))}function Ot(e){return typeof e=="number"?Fu(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Fu(e.getTime()):_e()}function Fu(e){return e>9999999999?e/1e3:e}function J(e){if(Zf(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(Qf(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:Kf(e),start_timestamp:Ot(o),timestamp:Ot(i)||void 0,status:ep(a),op:r[ge],origin:r[oe],links:Yf(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function vs(e){if(Zf(e))return e.getStreamedSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(Qf(e)){const{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{name:s,span_id:t,trace_id:n,parent_span_id:Kf(e),start_timestamp:Ot(o),end_timestamp:Ot(i),is_segment:e===Ts(e),status:gc(a),attributes:tp(r,a),links:Jf(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===Ts(e)}}function Kf(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function Xf(e){return{...e,attributes:lr(e.attributes),links:e.links?.map(t=>({...t,attributes:lr(t.attributes)}))}}function Qf(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Zf(e){return typeof e.getSpanJSON=="function"}function It(e){const{traceFlags:t}=e.spanContext();return t===ti}function ep(e){if(!(!e||e.code===Lf))return e.code===ho?"ok":e.message||"internal_error"}function gc(e){return!e||e.code===ho||e.code===Lf||e.message==="cancelled"?"ok":"error"}function tp(e,t){const n=gc(t)==="error"?t?.message:void 0;return{...n&&{[g_]:n},...e}}const Tn="_sentryChildSpans",ka="_sentryRootSpan";function ts(e,t){const n=e[ka]||e;Re(t,ka,n),It(e)&&(!e.isRecording()&&!n.isRecording()||(e[Tn]?e[Tn].add(t):Re(e,Tn,new Set([t]))))}function G_(e,t){e[Tn]&&e[Tn].delete(t)}function ns(e){const t=new Set;function n(r){if(!t.has(r)&&It(r)){t.add(r);const o=r[Tn]?Array.from(r[Tn]):[];for(const s of o)n(s)}}return n(e),Array.from(t)}const be=Ts;function Ts(e){return e[ka]||e}function Ee(){const e=Et(),t=sn(e);return t.getActiveSpan?t.getActiveSpan():cr(q())}function Is(){Du||($t(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Du=!0)}function vN(e,t){e.updateName(t),e.setAttributes({[We]:"custom",[wa]:t})}let $u=!1;function V_(){if($u)return;function e(){const t=Ee(),n=t&&be(t);if(n){const r="internal_error";I&&g.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:ne,message:r})}}$u=!0,_f(e),yf(e)}function Fe(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||R()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Bu(e){g.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Xr(e,t){if(!t?.length)return!1;for(const n of t){if(K_(n)){if(e.description&&Hr(e.description,n))return I&&Bu(e),!0;continue}const r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;const o=n.name?e.description&&Hr(e.description,n.name):!0,s=n.op?e.op&&Hr(e.op,n.op):!0,i=n.attributes?Object.entries(n.attributes).every(([a,c])=>Y_(e.attributes?.[a],c)):!0;if(o&&s&&i)return I&&Bu(e),!0}return!1}function Y_(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?Hr(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}function J_(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const o of e)o.parent_span_id===r&&(o.parent_span_id=n)}function K_(e){return typeof e=="string"||e instanceof RegExp}const np=Symbol.for("sentry.nonRecordingSpan");class Rn{constructor(t={}){this._traceId=t.traceId||_t(),this._spanId=t.spanId||Nt(),this.dropReason=t.dropReason,Re(this,np,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Gf}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function fr(e){return!!e&&e[np]===!0}const mo="production",rp="_frozenDsc";function Uu(e,t){Re(e,rp,t)}function op(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||mo,release:n.release,public_key:r,trace_id:e,org_id:Uf(t)};return t.emit("createDsc",o),o}function ni(e,t){const n=t.getPropagationContext();return n.dsc||op(n.traceId,e)}function ut(e){const t=R();if(!t)return{};const n=be(e),r=J(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[pc]??o[Of];function a(y){return(typeof i=="number"||typeof i=="string")&&(y.sample_rate=`${i}`),y}const c=n[rp];if(c)return a(c);const u=fr(n),d=u&&n.dropReason==="ignored";if(u&&(!Fe(t.getOptions())||d)){const y=vn(n).scope;if(y){const _={...ni(t,y)};return d&&(_.sampled="false"),a(_)}}const l=s?.get("sentry.dsc"),p=l&&mc(l);if(p)return a(p);const f=op(e.spanContext().traceId,t),h=o[We]??o["sentry.segment.name.source"],m=r.description;return h!=="url"&&m&&(f.transaction=m),Fe()&&(f.sampled=String(It(n)),f.sample_rand=s?.get("sentry.sample_rand")??vn(n).scope?.getPropagationContext().sampleRand.toString()),a(f),t.emit("createDsc",f,n),f}function TN(e){const t=ut(e);return Ff(t)}function IN(e){return Re(e,"_streamed",!0),e}function ri(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}function Qe(e,t=[]){return[e,t]}function Hu(e,t){const[n,r]=e;return[n,[...r,t]]}function Cn(e,t){const n=e[1];for(const r of n){const o=r[0].type;if(t(r,o))return!0}return!1}function Ra(e,t){return Cn(e,(n,r)=>t.includes(r))}function ws(e){const t=Tr($);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function X_(e){const t=Tr($);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function ks(e){const[t,n]=e;let r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[ws(r),s]:r.push(typeof s=="string"?ws(s):s)}for(const s of n){const[i,a]=s;if(o(`
6
+ ${JSON.stringify(i)}
7
+ `),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(Ie(a))}o(c)}}return typeof r=="string"?r:Q_(r)}function Q_(e){const t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t);let r=0;for(const o of e)n.set(o,r),r+=o.length;return n}function Z_(e){let t=typeof e=="string"?ws(e):e;function n(i){const a=t.subarray(0,i);return t=t.subarray(i+1),a}function r(){let i=t.indexOf(10);return i<0&&(i=t.length),JSON.parse(X_(n(i)))}const o=r(),s=[];for(;t.length;){const i=r(),a=typeof i.length=="number"?i.length:void 0;s.push([i,a?n(a):r()])}return[o,s]}function ey(e){return[{type:"span"},e]}function ty(e){const t=typeof e.data=="string"?ws(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const sp={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 ny(e){return e in sp}function Wu(e){return ny(e)?sp[e]:e}function go(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function ip(e,t,n,r){const o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(vt()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Tt(r)},...o&&{trace:o}}}function ry(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}function oy(e,t,n,r){const o=go(n),s={sent_at:new Date(vt()).toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:Tt(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Qe(s,[i])}function sy(e,t,n,r){const o=go(n),s=e.type&&e.type!=="replay_event"?e.type:"event";ry(e,n?.sdk);const i=ip(e,o,r,t);return delete e.sdkProcessingMetadata,Qe(i,[[{type:s},e]])}function iy(e,t){function n(f){return!!f.trace_id&&!!f.public_key}const r=ut(e[0]),o=t?.getDsn(),s=t?.getOptions().tunnel,i={sent_at:new Date(vt()).toISOString(),...n(r)&&{trace:r},...!!s&&o&&{dsn:Tt(o)}},{beforeSendSpan:a,ignoreSpans:c}=t?.getOptions()||{},u=c?.length?e.filter(f=>{const h=J(f);return!Xr({description:h.description,op:h.op,attributes:h.data},c)}):e,d=e.length-u.length;d&&t?.recordDroppedEvent("before_send","span",d);const l=a?f=>{const h=J(f),m=ri(a)?h:a(h);return m||(Is(),h)}:J,p=[];for(const f of u){const h=l(f);h&&p.push(ey(h))}return Qe(i,p)}function ay(e){if(!I)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=J(e),{spanId:o}=e.spanContext(),s=It(e),i=be(e),a=i===e,c=`[Tracing] Starting ${s?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${o}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:d,description:l}=J(i);u.push(`root ID: ${i.spanContext().spanId}`),d&&u.push(`root op: ${d}`),l&&u.push(`root description: ${l}`)}g.log(`${c}
8
+ ${u.join(`
9
+ `)}`)}function cy(e){if(!I)return;const{description:t="< unknown name >",op:n="< unknown op >"}=J(e),{spanId:r}=e.spanContext(),s=be(e)===e,i=`[Tracing] Finishing "${n}" ${s?"root ":""}span "${t}" with ID ${r}`;g.log(i)}function ap(e,t,n,r=Ee()){const o=r&&be(r);o&&(I&&g.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),o.addEvent(e,{[po]:t,[fo]:n}))}function ju(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},o=r[fo],s=r[po];typeof o=="string"&&typeof s=="number"&&(t[n.name]={value:s,unit:o})}),t}function qu(){return Tr(Et()).segmentSpanCaptureStrategy}function Ze(e){return e.getOptions().traceLifecycle==="stream"}const zu=1e3;class oi{constructor(t={}){this._traceId=t.traceId||_t(),this._spanId=t.spanId||Nt(),this._startTime=t.startTimestamp||_e(),this._links=t.links,this._attributes={},this.setAttributes({[oe]:"manual",[ge]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this._frozen?this:(this._links?this._links.push(t):this._links=[t],this)}addLinks(t){return this._frozen?this:(this._links?this._links.push(...t):this._links=t,this)}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?ti:Gf}}setAttribute(t,n){return this._frozen?this:(n===void 0?delete this._attributes[t]:this._attributes[t]=n,t===We&&n!==void 0&&Ou(this)&&x_(this),this)}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._frozen||(this._startTime=Ot(t))}setStatus(t){return this._frozen?this:(this._status=t,this)}updateName(t){return this._frozen?this:(this._name=t,Ou(this)||this.setAttribute(We,"custom"),this)}end(t){if(this._endTime){this._frozen=Lu(this);return}this._endTime=Ot(t),cy(this),this._onSpanEnded(),this._frozen=Lu(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[ge],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:ep(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[oe],profile_id:this._attributes[hc],exclusive_time:this._attributes[an],measurements:ju(this._events),is_segment:this._isStandaloneSpan&&be(this)===this||void 0,segment_id:this._isStandaloneSpan?be(this).spanContext().spanId:void 0,links:Yf(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===be(this),status:gc(this._status),attributes:tp(this._attributes,this._status),links:Jf(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){if(this._frozen)return this;I&&g.log("[Tracing] Adding an event to span:",t);const o=Gu(n)?n:r||_e(),s=Gu(n)?{}:n||{},i={name:t,time:Ot(o),attributes:s};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=R();t&&(t.emit("spanEnd",this),this._isStandaloneSpan||t.emit("afterSpanEnd",this));const n=be(this),r=this._isStandaloneSpan||this===n;if(this._isStandaloneSpan){this._sampled?ly(iy([this],t)):(I&&g.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}if(!r){const i=qu();if(i){const a=vn(this).scope||q();i.onChildSpanEnded(this,n,c=>this._convertSpanToTransaction(c),a)}return}if(t&&Ze(t)){t.emit("afterSegmentSpanEnd",this);return}const o=vn(this).scope||q(),s=qu();if(s)s.onSegmentSpanEnded(i=>this._convertSpanToTransaction(i),o);else{const i=this._convertSpanToTransaction();i&&o.captureEvent(i)}}_convertSpanToTransaction(t={}){if(!Vu(J(this)))return;this._name||(I&&g.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:n,isolationScope:r}=vn(this),o=n?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;t.onSpanCaptured?.(this);const s=[];for(const l of ns(this)){if(l===this||uy(l)||t.isSpanAlreadyCaptured?.(l))continue;const p=J(l);Vu(p)&&(t.onSpanCaptured?.(l),s.push(p))}const i=this._attributes[We];delete this._attributes[wa];let a=!1;s.forEach(l=>{delete l.data[wa],l.op?.startsWith("gen_ai.")&&(a=!0)});const c={contexts:{trace:j_(this)},spans:s.length>zu?s.sort((l,p)=>l.start_timestamp-p.start_timestamp).slice(0,zu):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:n,capturedSpanIsolationScope:r,dynamicSamplingContext:ut(this),hasGenAiSpans:a},request:o,...i&&{transaction_info:{source:i}}},u=ju(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 Gu(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Vu(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function uy(e){return e instanceof oi&&e.isStandaloneSpan()}function ly(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)}function _c(e,t,n=()=>{},r=()=>{}){let o;try{o=e()}catch(s){throw t(s),n(),s}return dy(o,t,n,r)}function dy(e,t,n,r){return Ln(e)?xf(e,o=>{n(),r(o)},o=>{t(o),n()}):(n(),r(e),e)}function fy(e,t,n){if(!Fe(e))return[!1];let r,o;typeof e.tracesSampler=="function"?(o=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?o=t.parentSampled:typeof e.tracesSampleRate<"u"&&(o=e.tracesSampleRate,r=!0);const s=kn(o);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(o)} of type ${JSON.stringify(typeof o)}.`),[!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 i=n<s;return i||I&&g.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(o)})`),[i,s,r]}const Ca="__SENTRY_SUPPRESS_TRACING__";function Bt(e,t){const n=Dn();if(n.startSpan)return n.startSpan(e,t);const r=Ec(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return Xe(a,()=>cp(s)(()=>{const u=q(),d=vc(u,s),l=R(),f=e.onlyIfParent&&!d?Sc(u,l):bc({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return(!ii(f)||!d)&&yt(u,f),_c(()=>t(f),()=>{const{status:h}=J(f);f.isRecording()&&(!h||h==="ok")&&f.setStatus({code:ne,message:"internal_error"})},()=>{f.end()})}))}function zt(e,t){const n=Dn();if(n.startSpanManual)return n.startSpanManual(e,t);const r=Ec(e),{forceTransaction:o,parentSpan:s,scope:i}=e,a=i?.clone();return Xe(a,()=>cp(s)(()=>{const u=q(),d=vc(u,s),p=e.onlyIfParent&&!d?Sc(u,R()):bc({parentSpan:d,spanArguments:r,forceTransaction:o,scope:u});return(!ii(p)||!d)&&yt(u,p),_c(()=>t(p,()=>p.end()),()=>{const{status:f}=J(p);p.isRecording()&&(!f||f==="ok")&&p.setStatus({code:ne,message:"internal_error"})})}))}function cn(e){const t=Dn();return t.startInactiveSpan?t.startInactiveSpan(e):py(e)}function py(e){const t=Ec(e),{forceTransaction:n,parentSpan:r}=e;return(e.scope?s=>Xe(e.scope,s):r!==void 0?s=>si(r,s):s=>s())(()=>{const s=q(),i=vc(s,r),a=R();return e.onlyIfParent&&!i?Sc(s,a):bc({parentSpan:i,spanArguments:t,forceTransaction:n,scope:s})})}const wN=(e,t)=>{const n=Et(),r=sn(n);if(r.continueTrace)return r.continueTrace(e,t);const{sentryTrace:o,baggage:s}=e,i=R(),a=mc(s);return i&&!W_(i,a?.org_id)?my(t):Xe(c=>{const u=jf(o,s);return c.setPropagationContext(u),yt(c,void 0),t()})};function si(e,t){const n=Dn();return n.withActiveSpan?n.withActiveSpan(e,t):Xe(r=>(yt(r,e||void 0),t(r)))}function hy(e){const t=Dn();return t.suppressTracing?t.suppressTracing(e):Xe(n=>{n.setSDKProcessingMetadata({[Ca]:!0});const r=e();return n.setSDKProcessingMetadata({[Ca]:void 0}),r})}function yc(e=q()){const t=Dn();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[Ca]===!0}function my(e){const t=Dn();return t.startNewTrace?t.startNewTrace(e):Xe(n=>(n.setPropagationContext({traceId:_t(),sampleRand:xt()}),I&&g.log(`Starting a new trace with id ${n.getPropagationContext().traceId}`),si(null,e)))}function Sc(e,t){t?.recordDroppedEvent("no_parent_span","span");const n=new Rn({traceId:e.getPropagationContext().traceId});return dr(n,e,me()),n}function bc({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){const o=me();if(!Fe()){const a={...o.getPropagationContext(),...r.getPropagationContext()},c=e?e.spanContext().traceId:a.traceId,u=new Rn({traceId:c});return e&&!n&&ts(e,u),dr(u,r,o),u}const s=R();if(_y(s,t)){yc(r)||s?.recordDroppedEvent("ignored","span");const a=new Rn({dropReason:"ignored",traceId:e?.spanContext().traceId??r.getPropagationContext().traceId});return e&&!n&&ts(e,a),dr(a,r,o),a}let i;if(e&&!n)i=gy(e,r,t,o),ts(e,i);else if(e){const a=ut(e),{traceId:c,spanId:u}=e.spanContext(),d=It(e);i=Yu({traceId:c,parentSpanId:u,...t},r,o,d),Uu(i,a)}else{const{traceId:a,dsc:c,parentSpanId:u,sampled:d}={...o.getPropagationContext(),...r.getPropagationContext()};i=Yu({traceId:a,parentSpanId:u,...t},r,o,d),c&&Uu(i,c)}return ay(i),i}function Ec(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Ot(e.startTime),delete r.startTime,r}return n}function Dn(){const e=Et();return sn(e)}function Yu(e,t,n,r){const o=R(),s=o?.getOptions()||{},{name:i=""}=e,a={spanAttributes:{...e.attributes},spanName:i,parentSampled:r};o?.emit("beforeSampling",a,{decision:!1});const c=a.parentSampled??r,u=a.spanAttributes,d=t.getPropagationContext(),l=yc(t),[p,f,h]=l?[!1]:fy(s,{name:i,parentSampled:c,attributes:u,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:kn(d.dsc?.sample_rate)},d.sampleRand),m=new oi({...e,attributes:{[We]:"custom",[pc]:f!==void 0&&h?f:void 0,...u},sampled:p});return!p&&o&&!l&&(I&&g.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),o.recordDroppedEvent("sample_rate",Ze(o)?"span":"transaction")),dr(m,t,n),o&&o.emit("spanStart",m),m}function gy(e,t,n,r){const{spanId:o,traceId:s}=e.spanContext(),i=yc(t),a=i?!1:It(e),c=a?new oi({...n,parentSpanId:o,traceId:s,sampled:a}):new Rn({traceId:s});ts(e,c),dr(c,t,r);const u=R();return u&&(Ze(u)&&fr(c)&&(fr(e)&&e.dropReason?(c.dropReason=e.dropReason,u.recordDroppedEvent(e.dropReason,"span")):i||(c.dropReason="sample_rate",u.recordDroppedEvent("sample_rate","span"))),u.emit("spanStart",c),n.endTimestamp&&(u.emit("spanEnd",c),u.emit("afterSpanEnd",c))),c}function vc(e,t){if(t)return t;if(t===null)return;const n=cr(e);if(!n)return;const r=R();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?be(n):n}function cp(e){return e!==void 0?t=>si(e,t):t=>t()}function _y(e,t){const n=e?.getOptions().ignoreSpans;return!e||!Ze(e)||!n?.length?!1:Xr({description:t.name||"",op:t.attributes?.[ge]||t.op,attributes:t.attributes},n)}function ii(e){return fr(e)&&e.dropReason==="ignored"}const rs={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},yy="heartbeatFailed",Sy="idleTimeout",by="finalTimeout",Ey="externalFinish";function up(e,t={}){const n=new Map;let r=!1,o,s,i=Ey,a=!t.disableAutoFinish;const c=[],{idleTimeout:u=rs.idleTimeout,finalTimeout:d=rs.finalTimeout,childSpanTimeout:l=rs.childSpanTimeout,beforeSpanEnd:p,trimIdleSpanEndTimestamp:f=!0}=t,h=R(),m=q();if(!h||!Fe()){const k=new Rn({traceId:m.getPropagationContext().traceId});return dr(k,m,me()),k}const y=Ee(),_=vy(e);_.end=new Proxy(_.end,{apply(k,b,N){if(p&&p(_),fr(b))return;const[A,...L]=N,j=A||_e(),X=Ot(j),G=ns(_).filter(se=>se!==_),B=J(_);if(!G.length||!f)return O(X),Reflect.apply(k,b,[X,...L]);const M=h.getOptions().ignoreSpans,U=G?.reduce((se,te)=>{const ie=J(te);return!ie.timestamp||M&&Xr({description:ie.description,op:ie.op,attributes:ie.data},M)?se:se?Math.max(se,ie.timestamp):ie.timestamp},void 0),D=B.start_timestamp,Q=Math.min(D?D+d/1e3:1/0,Math.max(D||-1/0,Math.min(X,U||1/0)));return O(Q),Reflect.apply(k,b,[Q,...L])}});function S(){o&&(clearTimeout(o),o=void 0)}function w(){s&&(clearTimeout(s),s=void 0)}function E(k){S(),o=setTimeout(()=>{!r&&n.size===0&&a&&(i=Sy,_.end(k))},u)}function C(k){w(),s=setTimeout(()=>{!r&&a&&(i=yy,_.end(k))},l)}function x(k){S(),n.set(k,!0);const b=_e();C(b+l/1e3)}function v(k){if(n.has(k)&&n.delete(k),n.size===0){const b=_e();E(b+u/1e3),w()}}function O(k){r=!0,n.clear(),c.forEach(G=>G()),yt(m,y);const b=J(_),{start_timestamp:N}=b;if(!N)return;b.data[Kr]||_.setAttribute(Kr,i);const L=b.status;(!L||L==="unknown")&&_.setStatus({code:ho}),g.log(`[Tracing] Idle span "${b.op}" finished`);const j=ns(_).filter(G=>G!==_);let X=0;j.forEach(G=>{G.isRecording()&&(G.setStatus({code:ne,message:"cancelled"}),G.end(k),I&&g.log("[Tracing] Cancelling span since span ended early",JSON.stringify(G,void 0,2)));const B=J(G),{timestamp:M=0,start_timestamp:U=0}=B,D=U<=k,Q=(d+u)/1e3,se=M-U<=Q;if(I){const te=JSON.stringify(G,void 0,2);D?se||g.log("[Tracing] Discarding span since it finished after idle span final timeout",te):g.log("[Tracing] Discarding span since it happened after idle span was finished",te)}(!se||!D)&&(G_(_,G),X++)}),X>0&&_.setAttribute("sentry.idle_span_discarded_spans",X)}return c.push(h.on("spanStart",k=>{if(r||k===_||J(k).timestamp||k instanceof oi&&k.isStandaloneSpan())return;ns(_).includes(k)&&x(k.spanContext().spanId)})),c.push(h.on("spanEnd",k=>{r||v(k.spanContext().spanId)})),c.push(h.on("idleSpanEnableAutoFinish",k=>{k===_&&(a=!0,E(),n.size&&C())})),t.disableAutoFinish||E(),setTimeout(()=>{r||(_.setStatus({code:ne,message:"deadline_exceeded"}),i=by,_.end())},d),_}function vy(e){const t=cn(e);return yt(q(),t),I&&g.log("[Tracing] Started span is an idle span"),t}function Ty(e,t,n){let r,o,s;const i=n?.maxWait?Math.max(n.maxWait,t):0,a=n?.setTimeoutImpl||setTimeout;function c(){return u(),r=e(),r}function u(){o!==void 0&&clearTimeout(o),s!==void 0&&clearTimeout(s),o=s=void 0}function d(){return o!==void 0||s!==void 0?c():r}function l(){return o&&clearTimeout(o),o=a(c,t),i&&s===void 0&&(s=a(c,i)),r}return l.cancel=u,l.flush=d,l}const Iy=["addListener","on","once","prependListener","prependOnceListener","addEventListener"],wy=["removeListener","off","removeEventListener"],lp=Symbol("SentryScopeBoundListeners");let nr;function ky(e){return nr!==void 0&&(e===nr||e.listener===nr)}function kN(e,t=q()){const n=e;if(ai(n))return e;Tc(n);for(const r of Iy)typeof n[r]=="function"&&(n[r]=Cy(n,n[r],t));for(const r of wy)typeof n[r]=="function"&&(n[r]=Ay(n,n[r]));return typeof n.removeAllListeners=="function"&&(n.removeAllListeners=My(n,n.removeAllListeners)),e}function Ry(e,t){return function(...n){return Xe(t,()=>e.apply(this,n))}}function dp(e){return typeof e=="function"}function Cy(e,t,n){return function(...r){const o=r[0],s=r[1],i=r.slice(2);if(!dp(s)||ky(s))return t.apply(this,r);const a=ai(e)||Tc(e);let c=a.get(o);c||(c=new WeakMap,a.set(o,c));let u=c.get(s);u||(u=Ry(s,n),c.set(s,u));const d=nr;nr=u;try{return t.call(this,o,u,...i)}finally{nr=d}}}function Ay(e,t){return function(...n){const r=n[0],o=n[1],s=n.slice(2),i=dp(o)?ai(e)?.get(r)?.get(o):void 0;return i?t.call(this,r,i,...s):t.apply(this,n)}}function My(e,t){return function(...n){const r=ai(e);if(r)if(n.length===0)Tc(e);else{const o=n[0];r.delete(o)}return t.apply(this,n)}}function Tc(e){const t=new Map;return e[lp]=t,t}function ai(e){return e[lp]}function xy(e,t){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;Ny(e,t),r&&Py(e,r),Dy(e,n),Oy(e,o),Ly(e,s)}function Ju(e,t){const{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:d,eventProcessors:l,attachments:p,propagationContext:f,transactionName:h,span:m}=t;Or(e,"extra",n),Or(e,"tags",r),Or(e,"attributes",o),Or(e,"user",s),Or(e,"contexts",i),e.sdkProcessingMetadata=lo(e.sdkProcessingMetadata,c,2),a&&(e.level=a),h&&(e.transactionName=h),m&&(e.span=m),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),d.length&&(e.fingerprint=[...e.fingerprint,...d]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),p.length&&(e.attachments=[...e.attachments,...p]),e.propagationContext={...e.propagationContext,...f}}function Or(e,t,n){e[t]=lo(e[t],n,1)}function _o(e,t){const n=Wr().getScopeData();return e&&Ju(n,e.getScopeData()),t&&Ju(n,t.getScopeData()),n}function Ny(e,t){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(s).length&&(e.contexts={...s,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function Oy(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Ly(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Py(e,t){e.contexts={trace:Vf(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:ut(t),...e.sdkProcessingMetadata};const n=be(t),r=J(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Dy(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}function Fy(e){const t={},{response:n,profile:r,cloud_resource:o,culture:s,state:i}=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)),o)for(const[u,d]of Object.entries(o))d!=null&&(t[u]=d);s&&(s.locale&&(t["culture.locale"]=s.locale),s.timezone&&(t["culture.timezone"]=s.timezone)),i?.state&&typeof i.state.type=="string"&&(t["state.type"]=i.state.type);const a=e.angular;if(a){const u=a.version;(typeof u=="string"||typeof u=="number")&&(t["angular.version"]=u)}const c=e.react;if(c){const u=c.version;(typeof u=="string"||typeof u=="number")&&(t["react.version"]=u)}return t}const fp="graphql.document",pp="http.url",$y="sentry.sdk.name",By="sentry.sdk.version",Uy="sentry.segment.id",Ic="sentry.segment.name",Hy="sentry.trace_lifecycle",hp="sentry.transaction",Fn="url.full",Wy="url.path";function jy(e,t){const n=vs(e),r=Ts(e),o=vs(r),{isolationScope:s,scope:i}=vn(e),a=_o(s,i);Gy(n,o,t,a);const c=e.kind;t.emit("preprocessSpan",n,{spanKind:c}),n.is_segment&&(qy(n,a),zy(n,t),t.emit("processSegmentSpan",n)),t.emit("processSpan",n);const{beforeSendSpan:u}=t.getOptions(),d=u&&ri(u)?Vy(n,u):n,l=d.attributes?.[We];return n.is_segment&&l&&Xt(d,{"sentry.segment.name.source":l}),{...Xf(d),_segmentSpan:r}}function qy(e,t){const n=Fy(t.contexts);Xt(e,n)}function Xt(e,t){const n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,o])=>{o!=null&&!(r in n)&&(n[r]=o)})}function zy(e,t){const n=t.getIntegrationNames();n.length&&Xt(e,{[S_]:n})}function Gy(e,t,n,r){const o=n.getSdkMetadata(),{release:s,environment:i}=n.getOptions();Xt(e,{[Hy]:"stream",[Ic]:t.name,[Uy]:t.span_id,[$y]:o?.sdk?.name,[By]:o?.sdk?.version,[__]:s,[y_]:i||mo,[b_]:r.user?.id,[E_]:r.user?.email,[v_]:r.user?.ip_address,[T_]:r.user?.username,...r.attributes})}function Vy(e,t){const n=t(e);return n||(Is(),e)}const Gi=0,Ku=1,Xu=2;function yo(e){return new Qr(t=>{t(e)})}function mp(e){return new Qr((t,n)=>{n(e)})}class Qr{constructor(t){this._state=Gi,this._handlers=[],this._runExecutor(t)}then(t,n){return new Qr((r,o)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(i){o(i)}},s=>{if(!n)o(s);else try{r(n(s))}catch(i){o(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Qr((n,r)=>{let o,s;return this.then(i=>{s=!1,o=i,t&&t()},i=>{s=!0,o=i,t&&t()}).then(()=>{if(s){r(o);return}n(o)})})}_executeHandlers(){if(this._state===Gi)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Ku&&n[1](this._value),this._state===Xu&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(s,i)=>{if(this._state===Gi){if(Ln(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(Ku,s)},o=s=>{n(Xu,s)};try{t(r,o)}catch(s){o(s)}}}function Yy(e,t,n,r=0){try{const o=Aa(t,n,e,r);return Ln(o)?o:yo(o)}catch(o){return mp(o)}}function Aa(e,t,n,r){const o=n[r];if(!e||!o)return e;const s=o({...e},t);return I&&s===null&&g.log(`Event processor "${o.id||"?"}" dropped event`),Ln(s)?s.then(i=>Aa(i,t,n,r+1)):Aa(s,t,n,r+1)}let hn,Qu,Zu,Ut;function gp(e){const t=$._sentryDebugIds,n=$._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(Ut&&r.length===Qu&&o.length===Zu)return Ut;Qu=r.length,Zu=o.length,Ut={},hn||(hn={});const s=(i,a)=>{for(const c of i){const u=a[c],d=hn?.[c];if(d&&Ut&&u)Ut[d[0]]=u,hn&&(hn[c]=[d[0],u]);else if(u){const l=e(c);for(let p=l.length-1;p>=0;p--){const h=l[p]?.filename;if(h&&Ut&&hn){Ut[h]=u,hn[c]=[h,u];break}}}}};return t&&s(r,t),n&&s(o,n),Ut}function Jy(e,t){const n=gp(e);if(!n)return[];const r=[];for(const o of t){const s=Pg(o);s&&n[s]&&r.push({type:"sourcemap",code_file:o,debug_id:n[s]})}return r}function _p(e,t,n,r,o,s){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||we(),timestamp:t.timestamp||Pn()},u=n.integrations||e.integrations.map(_=>_.name);Ky(c,e),Zy(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Xy(c,e.stackParser);const d=tS(r,n.captureContext);n.mechanism&&pt(c,n.mechanism);const l=o?o.getEventProcessors():[],p=_o(s,d),f=[...n.attachments||[],...p.attachments];f.length&&(n.attachments=f),xy(c,p);const h=[...l,...p.eventProcessors];return(n.data&&n.data.__sentry__===!0?yo(c):Yy(h,c,n)).then(_=>(_&&Qy(_),typeof i=="number"&&i>0?eS(_,i,a):_))}function Ky(e,t){const{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||mo,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);const i=e.request;i?.url&&s&&(i.url=Jr(i.url,s)),s&&e.exception?.values?.forEach(a=>{a.value&&(a.value=Jr(a.value,s))})}function Xy(e,t){const n=gp(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function Qy(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.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,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function Zy(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function eS(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:Ie(o.data,t,n)}}))},...e.user&&{user:Ie(e.user,t,n)},...e.contexts&&{contexts:Ie(e.contexts,t,n)},...e.extra&&{extra:Ie(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Ie(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:Ie(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=Ie(e.contexts.flags,3,n)),r}function tS(e,t){if(!t)return e;const n=e?e.clone():new St;return n.update(t),n}function nS(e){if(e)return rS(e)?{captureContext:e}:sS(e)?{captureContext:e}:e}function rS(e){return e instanceof St||typeof e=="function"}const oS=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function sS(e){return Object.keys(e).some(t=>oS.includes(t))}function bt(e,t){return q().captureException(e,nS(t))}function iS(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return q().captureMessage(e,n,r)}function So(e,t){return q().captureEvent(e,t)}function aS(e,t){me().setContext(e,t)}function RN(e){me().setExtras(e)}function CN(e,t){me().setExtra(e,t)}function AN(e){me().setTags(e)}function MN(e,t){me().setTag(e,t)}function xN(e){me().setAttributes(e)}function NN(e,t){me().setAttribute(e,t)}function ON(e){me().setUser(e)}function LN(e){me().setConversationId(e)}function cS(){return me().lastEventId()}async function PN(e){const t=R();return t?t.flush(e):(I&&g.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function DN(e){const t=R();return t?t.close(e):(I&&g.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function FN(){return!!R()}function uS(){const e=R();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function lS(e){me().addEventProcessor(e)}function el(e){const t=me(),{user:n}=_o(t,q()),{userAgent:r}=$.navigator||{},o=n_({user:n,...r&&{userAgent:r},...e}),s=t.getSession();return s?.status==="ok"&&ar(s,{status:"exited"}),yp(),t.setSession(o),o}function yp(){const e=me(),n=q().getSession()||e.getSession();n&&r_(n),Sp(),e.setSession()}function Sp(){const e=me(),t=R(),n=e.getSession();n&&t&&t.captureSession(n)}function Vi(e=!1){if(e){yp();return}Sp()}function ci(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}const dS="7";function bp(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function fS(e){return`${bp(e)}${e.projectId}/envelope/`}function pS(e,t){const n={sentry_version:dS};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Ep(e,t,n){return t||`${fS(e)}?${pS(e,n)}`}function hS(e,t){const n=Hf(e);if(!n)return"";const r=`${bp(n)}embed/error-page/`;let o=`dsn=${Tt(n)}`;for(const s in t)if(s!=="dsn"&&s!=="onClose")if(s==="user"){const i=t.user;if(!i)continue;i.name&&(o+=`&name=${encodeURIComponent(i.name)}`),i.email&&(o+=`&email=${encodeURIComponent(i.email)}`)}else o+=`&${encodeURIComponent(s)}=${encodeURIComponent(t[s])}`;return`${r}?${o}`}const tl=[];function mS(e){const t={};return e.forEach(n=>{const{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function gS(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return mS(r)}function _S(e,t){const n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&vp(e,r,n)}),n}function nl(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function vp(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,!tl.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),tl.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",(o,s)=>r(o,s,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),o=Object.assign((s,i)=>r(s,i,e),{id:t.name});e.addEventProcessor(o)}["processSpan","processSegmentSpan"].forEach(r=>{const o=t[r];typeof o=="function"&&e.on(r,s=>o.call(t,s,e))}),I&&g.log(`Integration installed: ${t.name}`)}function rl(e){const t=R();if(!t){I&&g.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`);return}t.addIntegration(e)}const yS="sentry.timestamp.sequence";let Yi=0,Ji;function Tp(e){const t=Math.floor(e*1e3);Ji!==void 0&&t!==Ji&&(Yi=0);const n=Yi;return Yi++,Ji=t,{key:yS,value:{value:n,type:"integer"}}}function Ip(e,t){return t?Xe(t,()=>{const n=Ee(),r=n?Vf(n):Nf(t);return[n?ut(n):ni(e,t),r]}):[void 0,void 0]}const SS={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function bS(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function ES(){/*! __SENTRY_SDK_SOURCE__ */return"npm"}function vS(){return!bS()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Qt(){return typeof window<"u"&&(!vS()||TS())}function TS(){return $.process?.type==="renderer"}function IS(e,t){const n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...Qt()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function wS(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Tt(r)),Qe(s,[IS(e,o)])}const kS=100;function dt(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function RS(e,t){const n=wc(),r=kp(e);r===void 0?n.set(e,[t]):r.length>=kS?(wp(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Rs(e,t=q(),n=RS){const r=t?.getClient()??R();if(!r){I&&g.warn("No client available to capture log.");return}const{release:o,environment:s,enableLogs:i=!0,beforeSendLog:a}=r.getOptions();if(!i){I&&g.warn("logging option not enabled, log will not be captured.");return}const[,c]=Ip(r,t),u={...e.attributes},{user:{id:d,email:l,username:p},attributes:f={}}=_o(me(),t);dt(u,"user.id",d,!1),dt(u,"user.email",l,!1),dt(u,"user.name",p,!1),dt(u,"sentry.release",o),dt(u,"sentry.environment",s);const{name:h,version:m}=r.getSdkMetadata()?.sdk??{};dt(u,"sentry.sdk.name",h),dt(u,"sentry.sdk.version",m);const y=r.getIntegrationByName("Replay"),_=y?.getReplayId(!0);dt(u,"sentry.replay_id",_),_&&y?.getRecordingMode()==="buffer"&&dt(u,"sentry._internal.replay_is_buffering",!0);const S=e.message;if(Qs(S)){const{__sentry_template_string__:L,__sentry_template_values__:j=[]}=S;j?.length&&(u["sentry.message.template"]=L),j.forEach((X,G)=>{u[`sentry.message.parameter.${G}`]=X})}const w=cr(t);dt(u,"sentry.trace.parent_span_id",w?.spanContext().spanId);const E={...e,attributes:u};r.emit("beforeCaptureLog",E);const C=a?$t(()=>a(E)):E;if(!C){r.recordDroppedEvent("before_send","log_item",1),I&&g.warn("beforeSendLog returned null, log will not be captured.");return}const{level:x,message:v,attributes:O={},severityNumber:k}=C,b=_e(),N=Tp(b),A={timestamp:b,level:x,body:Ma(String(v)),trace_id:c?.trace_id,severity_number:k??SS[x],attributes:CS({...lr(f),...lr(O,!0),[N.key]:N.value})};n(r,A),r.emit("afterCaptureLog",C)}function wp(e,t){const n=t??kp(e)??[];if(n.length===0)return;const r=e.getOptions(),o=wS(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);wc().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function kp(e){return wc().get(e)}function wc(){return Ir("clientToLogBufferMap",()=>new WeakMap)}function CS(e){const t={};for(const[n,r]of Object.entries(e)){const o=Ma(n);r.type==="string"?t[o]={...r,value:Ma(r.value)}:t[o]=r}return t}function Ma(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}function AS(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,...Qt()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function MS(e,t,n,r,o){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Tt(r)),Qe(s,[AS(e,o)])}const xS=1e3;function Ct(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function NS(e,t){const n=kc(),r=Cp(e);r===void 0?n.set(e,[t]):r.length>=xS?(Rp(e,r),n.set(e,[t])):n.set(e,[...r,t])}function OS(e,t,n){const{release:r,environment:o}=t.getOptions(),s={...e.attributes};Ct(s,"user.id",n.id,!1),Ct(s,"user.email",n.email,!1),Ct(s,"user.name",n.username,!1),Ct(s,"sentry.release",r),Ct(s,"sentry.environment",o);const{name:i,version:a}=t.getSdkMetadata()?.sdk??{};Ct(s,"sentry.sdk.name",i),Ct(s,"sentry.sdk.version",a);const c=t.getIntegrationByName("Replay"),u=c?.getReplayId(!0);return Ct(s,"sentry.replay_id",u),u&&c?.getRecordingMode()==="buffer"&&Ct(s,"sentry._internal.replay_is_buffering",!0),{...e,attributes:s}}function LS(e,t,n,r){const[,o]=Ip(t,n),s=cr(n),i=s?s.spanContext().traceId:o?.trace_id,a=s?s.spanContext().spanId:void 0,c=_e(),u=Tp(c);return{timestamp:c,trace_id:i??"",span_id:a,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...lr(r),...lr(e.attributes,"skip-undefined"),[u.key]:u.value}}}function PS(e,t){const n=t?.scope??q(),r=t?.captureSerializedMetric??NS,o=n?.getClient()??R();if(!o){I&&g.warn("No client available to capture metric.");return}const{_experiments:s,enableMetrics:i,beforeSendMetric:a}=o.getOptions();if(!(i??s?.enableMetrics??!0)){I&&g.warn("metrics option not enabled, metric will not be captured.");return}const{user:u,attributes:d}=_o(me(),n),l=OS(e,o,u);o.emit("processMetric",l);const p=a||s?.beforeSendMetric,f=p?p(l):l;if(!f){I&&g.log("`beforeSendMetric` returned `null`, will not send metric.");return}const h=LS(f,o,n,d);I&&g.log("[Metric]",h),r(o,h),o.emit("afterCaptureMetric",f)}function Rp(e,t){const n=t??Cp(e)??[];if(n.length===0)return;const r=e.getOptions(),o=MS(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);kc().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function Cp(e){return kc().get(e)}function kc(){return Ir("clientToMetricBufferMap",()=>new WeakMap)}function DS(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 Xf(t)}function FS(e,t){if(e.type!=="transaction"||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||t.getOptions().streamGenAiSpans===!1||Ze(t))return;const n=[],r=[];for(const s of e.spans)s.op?.startsWith("gen_ai.")?n.push(DS(s)):r.push(s);if(n.length===0)return;e.spans=r;const o=t.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Qt()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:n}]}const Rc=Symbol.for("SentryBufferFullError");function Cc(e=100){const t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return mp(Rc);const a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return yo(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;const c=[a,new Promise(u=>ci(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}const $S=60*1e3;function Ap(e,t=vt()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?$S:r-t}function BS(e,t){return e[t]||e.all||0}function Mp(e,t,n=vt()){return BS(e,t)>n}function xp(e,{statusCode:t,headers:n},r=vt()){const o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const a of s.trim().split(",")){const[c,u,,,d]=a.split(":",5),l=parseInt(c,10),p=(isNaN(l)?60:l)*1e3;if(!u)o.all=r+p;else for(const f of u.split(";"))f==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(o[f]=r+p):o[f]=r+p}else i?o.all=r+Ap(i,r):t===429&&(o.all=r+60*1e3);return o}const Np=64;function US(e,t,n=Cc(e.bufferSize||Np)){let r={};const o=i=>n.drain(i);function s(i){const a=[];if(Cn(i,(l,p)=>{const f=Wu(p);Mp(r,f)?e.recordDroppedEvent("ratelimit_backoff",f):a.push(l)}),a.length===0)return Promise.resolve({});const c=Qe(i[0],a),u=l=>{if(Ra(c,["client_report"])){I&&g.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);return}Cn(c,(p,f)=>{e.recordDroppedEvent(l,Wu(f))})},d=()=>t({body:ks(c)}).then(l=>l.statusCode===413?(I&&g.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),l):(I&&l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&g.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=xp(r,l),l),l=>{throw u("network_error"),I&&g.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===Rc)return I&&g.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:s,flush:o}}function HS(e,t,n){const r=[{type:"client_report"},{timestamp:Pn(),discarded_events:e}];return Qe(t?{dsn:t}:{},[r])}function Op(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}function WS(e){const{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.[hc],exclusive_time:i?.[an],measurements:e.measurements,is_segment:!0}}function jS(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&&{[hc]:e.profile_id},...e.exclusive_time&&{[an]:e.exclusive_time}}}},measurements:e.measurements}}const $r="[Filtered]",Fo=["forwarded","-ip","remote-","via","-user"],ol=["auth","token","secret","session","password","passwd","pwd","key","jwt","bearer","sso","saml","csrf","xsrf","credentials","sid","identity","set-cookie","cookie"],qS=[".sid","sessid","remember","oidc","pkce","nonce","__secure-","__host-","awsalb","awselb","akamai","__stripe","cognito","firebase","supabase","sb-","mfa","2fa"];function zS(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:Fo},httpHeaders:{request:{deny:Fo},response:{deny:Fo}},httpBodies:[],urlQueryParams:{deny:Fo},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7}}const GS={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 VS(e){const t=e.dataCollection!=null?GS:zS(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}}const sl="Not capturing exception because it's already been captured.",il="Discarded session because of missing or non-string release",Lp=Symbol.for("SentryInternalError"),Pp=Symbol.for("SentryDoNotSendEventError"),YS=5e3;function os(e){return{message:e,[Lp]:!0}}function Ki(e){return{message:e,[Pp]:!0}}function al(e){return Je(e)&&Lp in e}function cl(e){return Je(e)&&Pp in e}function ul(e,t,n,r,o){let s=0,i,a=!1;e.on(n,()=>{s=0,clearTimeout(i),a=!1}),e.on(t,c=>{if(s+=r(c),s>=8e5)o(e);else if(!a){const u=e.getOptions()._flushInterval??YS;u>0&&(a=!0,i=ci(setTimeout(()=>{o(e)},u)))}}),e.on("flush",()=>{o(e)})}class JS{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Cc(t.transportOptions?.bufferSize??Np),this._dataCollection=VS(t),t.dsn?this._dsn=Hf(t.dsn):I&&g.warn("No DSN provided, client will not send events."),this._dsn){const r=Ep(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs??!0,this._options.enableLogs&&ul(this,"afterCaptureLog","flushLogs",ZS,wp),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&ul(this,"afterCaptureMetric","flushMetrics",QS,Rp)}captureException(t,n,r){const o=we();if(Ru(t))return I&&g.log(sl),o;const s={event_id:o,...n};return this._process(()=>this.eventFromException(t,s).then(i=>this._captureEvent(i,s,r)).then(i=>i),"error"),s.event_id}captureMessage(t,n,r,o){const s={event_id:we(),...r},i=Qs(t)?t:String(t),a=gt(t),c=a?this.eventFromMessage(i,n,s):this.eventFromException(t,s);return this._process(()=>c.then(u=>this._captureEvent(u,s,o)),a?"unknown":"error"),s.event_id}captureEvent(t,n,r){const o=we();if(n?.originalException&&Ru(n.originalException))return I&&g.log(sl),o;const s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=ll(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),ar(t,{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(t){const n=this._transport;if(this.emit("flush"),!n)return!0;const r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(t){const n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),vp(this,t,this._integrations),n||nl(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);const r=FS(t,this);let o=sy(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])o=Hu(o,ty(s));r&&(o=Hu(o,r)),this.sendEnvelope(o).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=mo}=this._options;if("aggregates"in t){const s=t.attrs||{};if(!s.release&&!n){I&&g.warn(il);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){I&&g.warn(il);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const o=oy(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const o=`${t}:${n}`;I&&g.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){const r=this._hooks[t]=this._hooks[t]||new Set,o=(...s)=>n(...s);return r.add(o),()=>{r.delete(o)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(o=>o(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return I&&g.error("Error while sending envelope:",n),{}}return I&&g.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=_S(this,t),nl(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1;const s=n.exception?.values;if(s){o=!0,r=!1;for(const c of s)if(c.mechanism?.handled===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(ar(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){const s=this.getOptions(),i=this.getIntegrationNames();return!n.integrations&&i.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),_p(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...a.contexts?.trace,...Nf(r)},...a.contexts};const c=ni(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=q(),o=me()){return I&&xa(t)&&g.log(`Captured error event \`${Op(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{I&&(cl(s)?g.log(s.message):al(s)?g.warn(s.message):g.warn(s))})}_processEvent(t,n,r,o){const s=this.getOptions(),{sampleRate:i}=s,a=Dp(t),c=xa(t),d=`before send for type \`${t.type||"error"}\``,l=typeof i>"u"?void 0:kn(i),p=ll(t.type);return this._prepareEvent(t,n,r,o).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",p),Ki("An event processor returned `null`, will not send event.");if(n.data?.__sentry__===!0)return f;const m=XS(this,s,f,n);return KS(m,d)}).then(f=>{if(f===null){if(this.recordDroppedEvent("before_send",p),a){const _=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",_)}throw Ki(`${d} returned \`null\`, will not send event.`)}const h=r.getSession()||o.getSession();if(c&&h&&this._updateSessionFromEvent(h,f),c&&typeof l=="number"&&xt()>l)throw this.recordDroppedEvent("sample_rate","error"),Ki(`Discarding event because it's not included in the random sample (sampling rate = ${i})`);if(a){const y=f.sdkProcessingMetadata?.spanCountBeforeProcessing||0,_=f.spans?f.spans.length:0,S=y-_;S>0&&this.recordDroppedEvent("before_send","span",S)}const m=f.transaction_info;if(a&&m&&f.transaction!==t.transaction){const y="custom";f.transaction_info={...m,source:y}}return this.sendEvent(f,n),f}).then(null,f=>{throw cl(f)||al(f)?f:(this.captureException(f,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:f}),os(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
10
+ Reason: ${f}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===Rc&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[o,s]=n.split(":");return{reason:o,category:s,quantity:r}})}_flushOutcomes(){I&&g.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.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:",t);const n=HS(t,this._options.tunnel&&Tt(this._dsn));this.sendEnvelope(n)}}function ll(e){return e==="replay_event"?"replay":e||"error"}function KS(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Ln(e))return e.then(r=>{if(!Pe(r)&&r!==null)throw os(n);return r},r=>{throw os(`${t} rejected with ${r}`)});if(!Pe(e)&&e!==null)throw os(n);return e}function XS(e,t,n,r){const{beforeSend:o,beforeSendTransaction:s,ignoreSpans:i}=t,a=!ri(t.beforeSendSpan)&&t.beforeSendSpan;let c=n;if(xa(c)&&o)return o(c,r);if(Dp(c)){if(a||i){const u=WS(c);if(i?.length&&Xr({description:u.description,op:u.op,attributes:u.data},i))return null;if(a){const d=a(u);d?c=lo(n,jS(d)):Is()}if(c.spans){const d=[],l=c.spans;for(const f of l){if(i?.length&&Xr({description:f.description,op:f.op,attributes:f.data},i)){J_(l,f);continue}if(a){const h=a(f);h?d.push(h):(Is(),d.push(f))}else d.push(f)}const p=c.spans.length-d.length;p&&e.recordDroppedEvent("before_send","span",p),c.spans=d}}if(s){if(c.spans){const u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return s(c,r)}}return c}function xa(e){return e.type===void 0}function Dp(e){return e.type==="transaction"}function QS(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Fp(e.attributes)}function ZS(e){let t=0;return e.message&&(t+=e.message.length*2),t+Fp(e.attributes)}function Fp(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*dl(n[0]):gt(n)?t+=dl(n):t+=100}),t}function dl(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function eb(e,t){t.debug===!0&&(I?g.enable():$t(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),q().update(t.initialScope);const r=new e(t);return tb(r),r.init(),r}function tb(e){q().setClient(e)}const Xi=100,Qi=5e3,nb=36e5;function rb(e){function t(...n){I&&g.log("[Offline]:",...n)}return n=>{const r=e(n);if(!n.createStore)throw new Error("No `createStore` function was provided");const o=n.createStore(n);let s=Qi,i;function a(l,p,f){return Ra(l,["client_report"])?!1:n.shouldStore?n.shouldStore(l,p,f):!0}function c(l){i&&clearTimeout(i),i=ci(setTimeout(async()=>{i=void 0;const p=await o.shift();p&&(t("Attempting to send previously queued event"),p[0].sent_at=new Date(vt()).toISOString(),d(p,!0).catch(f=>{t("Failed to retry sending",f)}))},l))}function u(){i||(c(s),s=Math.min(s*2,nb))}async function d(l,p=!1){if(!p&&Ra(l,["replay_event","replay_recording"]))return await o.push(l),c(Xi),{};try{if(n.shouldSend&&await n.shouldSend(l)===!1)throw new Error("Envelope not sent because `shouldSend` callback returned false");const f=await r.send(l);let h=Xi;if(f){if(f.headers?.["retry-after"])h=Ap(f.headers["retry-after"]);else if(f.headers?.["x-sentry-rate-limits"])h=6e4;else if((f.statusCode||0)>=400)return f}return c(h),s=Qi,f}catch(f){if(await a(l,f,s))return p?await o.unshift(l):await o.push(l),u(),t("Error sending. Event queued.",f),{};throw f}}return n.flushAtStartup&&u(),{send:d,flush:l=>(l===void 0&&(s=Qi,c(Xi)),r.flush(l))}}}const Zi="MULTIPLEXED_TRANSPORT_EXTRA_KEY";function $p(e,t){let n;return Cn(e,(r,o)=>(t.includes(o)&&(n=Array.isArray(r)?r[1]:void 0),!!n)),n}function ob(e,t){return n=>{const r=e(n);return{...r,send:async o=>{const s=$p(o,["event","transaction","profile","replay_event"]);return s&&(s.release=t),r.send(o)}}}}function sb(e,t){return Qe(t?{...e[0],dsn:t}:e[0],e[1])}function $N(e,t){return n=>{const r=e(n),o=new Map,s=t||(u=>{const d=u.getEvent();return d?.extra?.[Zi]&&Array.isArray(d.extra[Zi])?d.extra[Zi]:[]});function i(u,d){const l=d?`${u}:${d}`:u;let p=o.get(l);if(!p){const f=$f(u);if(!f)return;const h=Ep(f,n.tunnel);p=d?ob(e,d)({...n,url:h}):e({...n,url:h}),o.set(l,p)}return[u,p]}async function a(u){function d(h){const m=h?.length?h:["event"];return $p(u,m)}const l=s({envelope:u,getEvent:d}).map(h=>typeof h=="string"?i(h,void 0):i(h.dsn,h.release)).filter(h=>!!h),p=l.length?l:[["",r]];return(await Promise.all(p.map(([h,m])=>m.send(sb(u,h)))))[0]}async function c(u){const d=[...o.values(),r];return(await Promise.all(d.map(p=>p.flush(u)))).every(p=>p)}return{send:a,flush:c}}}function ea(e,t){return t.some(n=>e.includes(n))}function Zr(e,t,n){if(t===!1)return{};const r=n!=null?[...ol,...n]:ol,o={};if(t===!0){for(const i of Object.keys(e))o[i]=ea(i.toLowerCase(),r)?$r:e[i];return o}if("deny"in t){const i=t.deny.map(a=>a.toLowerCase());for(const a of Object.keys(e)){const c=a.toLowerCase(),u=ea(c,r)||i.some(d=>c.includes(d));o[a]=u?$r:e[a]}return o}const s=t.allow.map(i=>i.toLowerCase());for(const i of Object.keys(e)){const a=i.toLowerCase();if(ea(a,r))o[i]=$r;else{const c=s.some(u=>a.includes(u));o[i]=c?e[i]:$r}}return o}function ib(e){const t={};let n=0;for(;n<e.length;){const r=e.indexOf("=",n);if(r===-1)break;let o=e.indexOf(";",n);if(o===-1)o=e.length;else if(o<r){n=e.lastIndexOf(";",r-1)+1;continue}const s=e.slice(n,r).trim();if(t[s]===void 0){let i=e.slice(r+1,o).trim();i.charCodeAt(0)===34&&(i=i.slice(1,-1));try{t[s]=i.indexOf("%")!==-1?decodeURIComponent(i):i}catch{t[s]=i}}n=o+1}return t}function Na(e,t){if(t===!1)return{};try{const n=ib(e);return Object.keys(n).length===0?{}:Zr(n,t,qS)}catch{return $r}}const ab="thismessage:/";function ui(e){return"isRelative"in e}function eo(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?ab:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const o=new URL(e,r);return n?{isRelative:n,pathname:o.pathname,search:o.search,hash:o.hash}:o}catch{}}function Bp(e){if(ui(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()}function In(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}}function Up(e){return e.split(/[?#]/,1)[0]}function st(e,t=!0){if(e.startsWith("data:")){const n=e.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",o=e.includes(";base64,"),s=e.indexOf(",");let i="";if(t&&s!==-1){const a=e.slice(s+1);i=a.length>10?`${a.slice(0,10)}... [truncated]`:a}return`data:${r}${o?",base64":""}${i?`,${i}`:""}`}return e}function Hp(e,t){const n=t?.getDsn(),r=t?.getOptions().tunnel;return ub(e,n)||cb(e,r)}function cb(e,t){return t?fl(e)===fl(t):!1}function ub(e,t){const n=eo(e);return!n||ui(n)||!t?!1:lb(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function lb(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function fl(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function db(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}const fb=db;function pb(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function hb(e,t,n=[t],r="npm"){const o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(s=>({name:`${r}:@sentry/${s}`,version:Vt})),o.version=Vt)}function Wp(e={}){const t=e.client||R();if(!uS()||!t)return{};const n=Et(),r=sn(n);if(r.getTraceData)return r.getTraceData(e);const o=e.scope||q(),s=e.span||Ee(),i=fr(s)&&!Fe(t.getOptions()),a=s&&!i?q_(s):mb(o),c=s?ut(s):ni(t,o),u=Ff(c);if(!Wf.test(a))return g.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const l={"sentry-trace":a,baggage:u};return e.propagateTraceparent&&(l.traceparent=s&&!i?z_(s):gb(o)),l}function mb(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return qf(t,r,n)}function gb(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return zf(t,r,n)}const _b=100;function Pt(e,t){const n=R(),r=me();if(!n)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:s=_b}=n.getOptions();if(s<=0)return;const a={timestamp:Pn(),...e},c=o?$t(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}const yb="FunctionToString",pl=new WeakMap,Sb=(()=>({name:yb,setupOnce(){const e=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=fc(this);let r;try{pl.has(R())&&n!==void 0&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){pl.set(e,!0)}})),bb=Sb,Eb=[/^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$/],vb="EventFilters",Tb=(e={})=>{let t;return{name:vb,setup(n){const r=n.getOptions();t=hl(e,r)},processEvent(n,r,o){if(!t){const s=o.getOptions();t=hl(e,s)}return wb(n,t)?null:n}}},Ib=((e={})=>({...Tb(e),name:"InboundFilters"}));function hl(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Eb],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function wb(e,t){if(e.type){if(e.type==="transaction"&&Rb(e,t.ignoreTransactions))return I&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
11
+ Event: ${_n(e)}`),!0}else{if(kb(e,t.ignoreErrors))return I&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
12
+ Event: ${_n(e)}`),!0;if(xb(e))return I&&g.warn(`Event dropped due to not having an error message, error type or stacktrace.
13
+ Event: ${_n(e)}`),!0;if(Cb(e,t.denyUrls))return I&&g.warn(`Event dropped due to being matched by \`denyUrls\` option.
14
+ Event: ${_n(e)}.
15
+ Url: ${Cs(e)}`),!0;if(!Ab(e,t.allowUrls))return I&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option.
16
+ Event: ${_n(e)}.
17
+ Url: ${Cs(e)}`),!0}return!1}function kb(e,t){return t?.length?Op(e).some(n=>Ke(n,t)):!1}function Rb(e,t){if(!t?.length)return!1;const n=e.transaction;return n?Ke(n,t):!1}function Cb(e,t){if(!t?.length)return!1;const n=Cs(e);return n?Ke(n,t):!1}function Ab(e,t){if(!t?.length)return!0;const n=Cs(e);return n?Ke(n,t):!0}function Mb(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}function Cs(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?Mb(n):null}catch{return I&&g.error(`Cannot extract url for event ${_n(e)}`),null}}function xb(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Nb(e,t,n,r,o,s){if(!o.exception?.values||!s||!De(s.originalException))return;const i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=Oa(e,t,r,s.originalException,n,o.exception.values,i,0))}function Oa(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(De(r[o])){ml(i,a,r);const u=e(t,r[o]),d=c.length;gl(u,o,d,a),c=Oa(e,t,n,r[o],o,[u,...c],u,d)}return jp(r)&&r.errors.forEach((u,d)=>{if(De(u)){ml(i,a,r);const l=e(t,u),p=c.length;gl(l,`errors[${d}]`,p,a),c=Oa(e,t,n,u,o,[l,...c],l,p)}}),c}function jp(e){return Array.isArray(e.errors)}function ml(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...jp(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function gl(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Ob(e){return De(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function _l(e){return Ob(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}const qp=new Map,yl=new Set;function Lb(e){if($._sentryModuleMetadata)for(const t of Object.keys($._sentryModuleMetadata)){const n=$._sentryModuleMetadata[t];if(yl.has(t))continue;yl.add(t);const r=e(t);for(const o of r.reverse())if(o.filename){qp.set(o.filename,n);break}}}function Pb(e,t){return Lb(e),qp.get(t)}function zp(e,t){t.exception?.values?.forEach(n=>{n.stacktrace?.frames?.forEach(r=>{if(!r.filename||r.module_metadata)return;const o=Pb(e,r.filename);o&&(r.module_metadata=o)})})}function Gp(e){e.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(n=>{delete n.module_metadata})})}const BN=()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",t=>{Cn(t,(n,r)=>{if(r==="event"){const o=Array.isArray(n)?n[1]:void 0;o&&(Gp(o),n[1]=o)}})}),e.on("applyFrameMetadata",t=>{if(t.type)return;const n=e.getOptions().stackParser;zp(n,t)})}}),Sl=new Set([]);function Ac(e){const t="console",n=rn(t,e);return on(t,Db),n}const bl=new Set;function Db(){"console"in $&&cc.forEach(function(e){bl.has(e)||!(e in $.console)||(bl.add(e),Ce($.console,e,function(t){return ys[e]=t,function(...n){const r=n[0],o=ys[e],s=Sl.size&&typeof r=="string"&&Ke(r,Sl);s||Ye("console",{args:n,level:e}),(!s||I&&g.isEnabled())&&o?.apply($.console,n)}}))})}function As(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const Fb="CaptureConsole",$b=((e={})=>{const t=e.levels||cc,n=e.handled??!0;return{name:Fb,setup(r){"console"in $&&Ac(({args:o,level:s})=>{R()!==r||!t.includes(s)||Bb(o,s,n)})}}}),UN=$b;function Bb(e,t,n){const r=As(t),o=new Error,s={level:As(t),extra:{arguments:e}};Xe(i=>{if(i.addEventProcessor(u=>(u.logger="console",pt(u,{handled:n,type:"auto.core.capture_console"}),u)),t==="assert"){if(!e[0]){const u=`Assertion failed: ${Ss(e.slice(1)," ")||"console.assert"}`;i.setExtra("arguments",e.slice(1)),i.captureMessage(u,r,{captureContext:s,syntheticException:o})}return}const a=e.find(u=>u instanceof Error);if(a){bt(a,s);return}const c=Ss(e," ");i.captureMessage(c,r,{captureContext:s,syntheticException:o})})}const Ub="Dedupe",Hb=(()=>{let e;return{name:Ub,processEvent(t){if(t.type)return t;try{if(jb(t,e))return I&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),Wb=Hb;function jb(e,t){return t?!!(qb(e,t)||zb(e,t)):!1}function qb(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Yp(e,t)||!Vp(e,t))}function zb(e,t){const n=El(t),r=El(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Yp(e,t)||!Vp(e,t))}function Vp(e,t){let n=ba(e),r=ba(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){const s=r[o],i=n[o];if(s.filename!==i.filename||s.lineno!==i.lineno||s.colno!==i.colno||s.function!==i.function)return!1}return!0}function Yp(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function El(e){return e.exception?.values?.[0]}const Gb="ExtraErrorData",Vb=((e={})=>{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:Gb,processEvent(r,o,s){const{maxValueLength:i}=s.getOptions();return Yb(r,o,t,n,i)}}}),HN=Vb;function Yb(e,t={},n,r,o){if(!t.originalException||!De(t.originalException))return e;const s=t.originalException.name||t.originalException.constructor.name,i=Jp(t.originalException,r,o);if(i){const a={...e.contexts},c=Ie(i,n);return Pe(c)&&(Wg(c),a[s]=c),{...e,contexts:a}}return e}function Jp(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],o={};for(const s of Object.keys(e)){if(r.indexOf(s)!==-1)continue;const i=e[s];o[s]=De(i)||typeof i=="string"?n?Jr(`${i}`,n):`${i}`:i}if(t&&e.cause!==void 0)if(De(e.cause)){const s=e.cause.name||e.cause.constructor.name;o.cause={[s]:Jp(e.cause,!1,n)}}else o.cause=e.cause;if(typeof e.toJSON=="function"){const s=e.toJSON();for(const i of Object.keys(s)){const a=s[i];o[i]=De(a)?a.toString():a}}return o}catch(r){I&&g.error("Unable to extract extra data from the Error object:",r)}return null}function Jb(e,t){let n=0;for(let r=e.length-1;r>=0;r--){const o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}const Kb=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Xb(e){const t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Kb.exec(t);return n?n.slice(1):[]}function vl(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n=o.charAt(0)==="/")}return t=Jb(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function Tl(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function Qb(e,t){e=vl(e).slice(1),t=vl(t).slice(1);const n=Tl(e.split("/")),r=Tl(t.split("/")),o=Math.min(n.length,r.length);let s=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){s=a;break}let i=[];for(let a=s;a<n.length;a++)i.push("..");return i=i.concat(r.slice(s)),i.join("/")}function Zb(e,t){return Xb(e)[2]||""}const eE="RewriteFrames",WN=(e={})=>{const t=e.root,n=e.prefix||"app:///",r="window"in $&&!!$.window,o=e.iteratee||tE({isBrowser:r,root:t,prefix:n});function s(a){try{return{...a,exception:{...a.exception,values:a.exception.values.map(c=>({...c,...c.stacktrace&&{stacktrace:i(c.stacktrace)}}))}}}catch{return a}}function i(a){return{...a,frames:a?.frames?.map(c=>o(c))}}return{name:eE,processEvent(a){let c=a;return a.exception&&Array.isArray(a.exception.values)&&(c=s(c)),c}}};function tE({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;const o=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes("\\")&&!r.filename.includes("/"),s=/^\//.test(r.filename);if(e){if(t){const i=r.filename;i.indexOf(t)===0&&(r.filename=i.replace(t,n))}}else if(o||s){const i=o?r.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):r.filename,a=t?Qb(t,i):Zb(i);r.filename=`${n}${a}`}return r}}const nE=["reauthenticate","signInAnonymously","signInWithOAuth","signInWithIdToken","signInWithOtp","signInWithPassword","signInWithSSO","signOut","signUp","verifyOtp"],rE=["createUser","deleteUser","listUsers","getUserById","updateUserById","inviteUserByEmail"],oE={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"},Kp=["select","insert","upsert","update","delete"];function li(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function di(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function Xp(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function sE(e,t){return Xp(e,t)!==void 0}function Qp(e,t){if(!e)return;if(typeof e.get=="function")return e.get(t)??void 0;const n=e,r=t.toLowerCase(),o=Object.keys(n).find(s=>s.toLowerCase()===r);return o!==void 0?n[o]:void 0}function iE(e,t={}){switch(e){case"GET":return"select";case"POST":return Qp(t,"Prefer")?.includes("resolution=")?"upsert":"insert";case"PATCH":return"update";case"DELETE":return"delete";default:return"<unknown-op>"}}function aE(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 o;return n?.startsWith("fts")?o="textSearch":n?.startsWith("plfts")?o="textSearch[plain]":n?.startsWith("phfts")?o="textSearch[phrase]":n?.startsWith("wfts")?o="textSearch[websearch]":o=n&&oE[n]||"filter",`${o}(${e}, ${r.join(".")})`}function Il(e,t=!1){return new Proxy(e,{apply(n,r,o){return Bt({name:`auth ${t?"(admin) ":""}${e.name}`,attributes:{[oe]:"auto.db.supabase",[ge]:"db","db.system":"postgresql","db.operation":`auth.${t?"admin.":""}${e.name}`}},s=>Reflect.apply(n,r,o).then(i=>(Je(i)&&"error"in i&&i.error?(s.setStatus({code:ne}),bt(i.error,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}})):s.setStatus({code:ho}),s.end(),i)).catch(i=>{throw s.setStatus({code:ne}),s.end(),bt(i,{mechanism:{handled:!1,type:"auto.db.supabase.auth"}}),i}).then(...o))}})}function cE(e){const t=e.auth;if(!(!t||di(e.auth))){for(const n of nE){const r=t[n];r&&typeof e.auth[n]=="function"&&(e.auth[n]=Il(r))}for(const n of rE){const r=t.admin[n];r&&typeof e.auth.admin[n]=="function"&&(e.auth.admin[n]=Il(r,!0))}li(e.auth)}}function uE(e,t){di(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(n,r,o){const s=Reflect.apply(n,r,o),i=s.constructor;return dE(i,t),s}}),li(e.prototype.from))}function lE(e,t){di(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(n,r,o){const s=Kp,i=r,a=iE(i.method,i.headers);if(!s.includes(a)||!i?.url?.pathname||typeof i.url.pathname!="string")return Reflect.apply(n,r,o);const c=i.url.pathname.split("/"),u=c.length>0?c[c.length-1]:"",d=[];for(const[E,C]of i.url.searchParams.entries())d.push(aE(E,C));const l=Object.create(null);if(Pe(i.body))for(const[E,C]of Object.entries(i.body))l[E]=C;const p=R(),f=t.sendOperationData??p?.getDataCollectionOptions().databaseQueryData===!0,h=Xp(i.body,l),m=a==="select"?"":`${a}${sE(i.body,l)?"(...) ":""}`,y=f?d.join(" "):d.length>0?"[redacted]":"",_=[m.trimEnd(),y].filter(Boolean).join(" "),S=_?`${_} from(${u})`:`from(${u})`,w={"db.table":u,"db.schema":i.schema,"db.url":i.url.origin,"db.sdk":Qp(i.headers,"X-Client-Info"),"db.system":"postgresql","db.operation":a,[oe]:"auto.db.supabase",[ge]:"db"};return d.length&&f&&(w["db.query"]=d),h!==void 0&&f&&(w["db.body"]=h),Bt({name:S,attributes:w},E=>Reflect.apply(n,r,[]).then(C=>{if(E&&(C&&typeof C=="object"&&"status"in C&&bs(E,C.status||500),E.end()),C?.error){const O=new Error(C.error.message);C.error.code&&(O.code=C.error.code),C.error.details&&(O.details=C.error.details);const k={};d.length&&f&&(k.query=d),h!==void 0&&f&&(k.body=h),bt(O,b=>(b.addEventProcessor(N=>(pt(N,{handled:!1,type:"auto.db.supabase.postgres"}),N)),b.setContext("supabase",k),b))}const x={type:"supabase",category:`db.${a}`,message:S},v={};return d.length&&f&&(v.query=d),h!==void 0&&f&&(v.body=h),Object.keys(v).length&&(x.data=v),Pt(x),C},C=>{throw E&&(bs(E,500),E.end()),C}).then(...o))}}),li(e.prototype.then))}function dE(e,t){for(const n of Kp)di(e.prototype[n])||(e.prototype[n]=new Proxy(e.prototype[n],{apply(r,o,s){const i=Reflect.apply(r,o,s),a=i.constructor;return I&&g.log(`Instrumenting ${n} operation's PostgRESTFilterBuilder`),lE(a,t),i}}),li(e.prototype[n]))}const fE=(e,t={})=>{if(!e){I&&g.warn("Supabase integration was not installed because no Supabase client was provided.");return}const n=e.constructor===Function?e:e.constructor;uE(n,t),cE(e)},pE="Supabase",hE=((e,t)=>({setupOnce(){fE(e,t)},name:pE})),jN=e=>hE(e.supabaseClient,{sendOperationData:e.sendOperationData}),mE=10,gE="ZodErrors";function _E(e){return De(e)&&e.name==="ZodError"&&Array.isArray(e.issues)}function yE(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function SE(e){return e.map(t=>typeof t=="number"?"<array>":t).join(".")}function bE(e){const t=new Set;for(const r of e.issues){const o=SE(r.path);o.length>0&&t.add(o)}const n=Array.from(t);if(n.length===0){let r="variable";if(e.issues.length>0){const o=e.issues[0];o!==void 0&&"expected"in o&&typeof o.expected=="string"&&(r=o.expected)}return`Failed to validate ${r}`}return`Failed to validate keys: ${Jr(n.join(", "),100)}`}function EE(e,t=!1,n,r){if(!n.exception?.values||!r.originalException||!_E(r.originalException)||r.originalException.issues.length===0)return n;try{const s=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(yE);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:s})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:bE(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":s.slice(0,e)}}}catch(o){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:o instanceof Error?`${o.name}: ${o.message}
18
+ ${o.stack}`:"unknown"}}}}}const vE=((e={})=>{const t=e.limit??mE;return{name:gE,processEvent(n,r){return EE(t,e.saveZodIssuesAsAttachment,n,r)}}}),qN=vE,zN=e=>({name:"ThirdPartyErrorsFilter",setup(t){t.on("beforeEnvelope",n=>{Cn(n,(r,o)=>{if(o==="event"){const s=Array.isArray(r)?r[1]:void 0;s&&(Gp(s),r[1]=s)}})}),t.on("applyFrameMetadata",n=>{if(n.type)return;const r=t.getOptions().stackParser;zp(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=IE(t,e.ignoreSentryInternalFrames,n);if(r){const o=e.behaviour==="drop-error-if-contains-third-party-frames"||e.behaviour==="apply-tag-if-contains-third-party-frames"?"some":"every";if(r[o](i=>!i.some(a=>e.filterKeys.includes(a)))){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 TE(e,t,n){if(t!==0)return!1;if(n&&wE(e)||e.function==="sentryWrapped")return!0;if(!e.context_line||!e.filename||!e.filename.includes("sentry")||!e.filename.includes("helpers")||!e.context_line.includes(RE))return!1;if(e.pre_context){const r=e.pre_context.length;for(let o=0;o<r;o++)if(e.pre_context[o]?.includes(kE))return!0}return!1}function IE(e,t,n){const r=ba(e);if(r)return r.filter((o,s)=>!o.filename||o.lineno==null&&o.colno==null&&o.instruction_addr==null?!1:!t||!TE(o,s,!!n)).map(o=>o.module_metadata?Object.keys(o.module_metadata).filter(s=>s.startsWith(wl)).map(s=>s.slice(wl.length)):[])}function wE(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}const wl="_sentryBundlerPluginAppKey:",kE="Attempt to invoke user-land function",RE="fn.apply(this, wrappedArguments)",CE=100,AE=10,$o="flag.evaluation.";function kr(e){if(e.type)return e;const n=q().getScopeData().contexts.flags,r=n?n.values:[];return r.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...r]}),e}function An(e,t,n=CE){const r=q().getScopeData().contexts;r.flags||(r.flags={values:[]});const o=r.flags.values;ME(o,e,t,n)}function ME(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 o=e.findIndex(s=>s.flag===t);o!==-1&&e.splice(o,1),e.length===r&&e.shift(),e.push({flag:t,result:n})}function Mn(e,t,n=AE){if(typeof t!="boolean")return;const r=Ee();if(!r)return;const o=J(r).data;if(`${$o}${e}`in o){r.setAttribute(`${$o}${e}`,t);return}Object.keys(o).filter(i=>i.startsWith($o)).length<n&&r.setAttribute(`${$o}${e}`,t)}const GN=()=>({name:"FeatureFlags",processEvent(e,t,n){return kr(e)},addFeatureFlag(e,t){An(e,t),Mn(e,t)}}),xE=({growthbookClass:e})=>({name:"GrowthBook",setupOnce(){const t=e.prototype;typeof t.isOn=="function"&&Ce(t,"isOn",kl),typeof t.getFeatureValue=="function"&&Ce(t,"getFeatureValue",kl)},processEvent(t,n,r){return kr(t)}});function kl(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"&&(An(n,r),Mn(n,r)),r}}const NE="ConversationId",OE=(()=>({name:NE,setup(e){e.on("spanStart",t=>{const n=q().getScopeData(),r=me().getScopeData(),o=n.conversationId||r.conversationId;if(o){const{op:s,data:i,description:a}=J(t);if(!s?.startsWith("gen_ai.")&&!i["ai.operationId"]&&!a?.startsWith("ai."))return;t.setAttribute(k_,o)}})}})),LE=OE;function PE(e,t,n,r,o){if(!e.fetchData)return;const{method:s,url:i}=e.fetchData,a=Fe()&&t(i);if(e.endTimestamp){const m=e.fetchData.__span;if(!m)return;const y=r[m];y&&(a&&($E(y,e),DE(y,e,o)),delete r[m]);return}const{spanOrigin:c="auto.http.browser",propagateTraceparent:u=!1}=typeof o=="object"?o:{spanOrigin:o},d=R(),l=!!Ee(),p=l||!!d&&Ze(d),f=a&&p?cn(HE(i,s,c)):new Rn,h=ii(f)&&l?void 0:f;if(a&&!p&&d?.recordDroppedEvent("no_parent_span","span"),e.fetchData.__span=f.spanContext().spanId,r[f.spanContext().spanId]=f,n(e.fetchData.url)){const m=e.args[0],y={...e.args[1]||{}},_=FE(m,y,Fe()&&p?h:void 0,u);_&&(e.args[1]=y,y.headers=_)}if(d){const m={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};d.emit("beforeOutgoingRequestSpan",f,m)}return f}function DE(e,t,n){(typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0)?.(e,{headers:t.response?.headers,error:t.error})}function FE(e,t,n,r){const o=Wp({span:n,propagateTraceparent:r}),s=o["sentry-trace"],i=o.baggage,a=o.traceparent;if(!s)return;const c=t.headers||(dc(e)?e.headers:void 0);if(c)if(BE(c)){const u=new Headers(c);if(u.get("sentry-trace")||u.set("sentry-trace",s),r&&a&&!u.get("traceparent")&&u.set("traceparent",a),i){const d=u.get("baggage");d?Bo(d)||u.set("baggage",`${d},${i}`):u.set("baggage",i)}return u}else if(UE(c)){const u=[...c];u.find(l=>l[0]==="sentry-trace")||u.push(["sentry-trace",s]),r&&a&&!u.find(l=>l[0]==="traceparent")&&u.push(["traceparent",a]);const d=c.find(l=>l[0]==="baggage"&&typeof l[1]=="string"&&Bo(l[1]));return i&&!d&&u.push(["baggage",i]),u}else{const u="sentry-trace"in c?c["sentry-trace"]:void 0,d="traceparent"in c?c.traceparent:void 0,l="baggage"in c?c.baggage:void 0,p=l?Array.isArray(l)?[...l]:[l]:[],f=l&&(Array.isArray(l)?l.find(m=>Bo(m)):Bo(l));i&&!f&&p.push(i);const h=Object.assign({},c,{"sentry-trace":u??s,...p.length>0&&{baggage:p.join(",")}});return r&&a&&!d&&(h.traceparent=a),h}else return{"sentry-trace":s,...i&&{baggage:i},...a&&{traceparent:a}}}function $E(e,t){if(t.response){bs(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:ne,message:"internal_error"});e.end()}function Bo(e){return typeof e!="string"?!1:e.split(",").some(t=>t.trim().startsWith(Es))}function BE(e){return typeof Headers<"u"&&ei(e,Headers)}function UE(e){return Array.isArray(e)?e.every(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"):!1}function HE(e,t,n){if(e.startsWith("data:")){const s=st(e);return{name:`${t} ${s}`,attributes:Rl(e,void 0,t,n)}}const r=eo(e),o=r?Bp(r):e;return{name:`${t} ${o}`,attributes:Rl(e,r,t,n)}}function Rl(e,t,n,r){const o={url:st(e),type:"fetch","http.method":n,[oe]:r,[ge]:"http.client"};return t&&(ui(t)||(o[pp]=st(t.href),o[Fn]=st(t.href),o["server.address"]=t.host),t.search&&(o["http.query"]=t.search),t.hash&&(o["http.fragment"]=t.hash)),o}function WE(e,t={},n=q()){const{message:r,name:o,email:s,url:i,source:a,associatedEventId:c,tags:u}=e,d={contexts:{feedback:{contact_email:s,name:o,message:r,url:i,source:a,associated_event_id:c}},type:"feedback",level:"info",tags:u},l=n?.getClient()||R();return l&&l.emit("beforeSendFeedback",d,t),n.captureEvent(d,t)}function Rr(e,t,n,r,o){Rs({level:e,message:t,attributes:n,severityNumber:o},r)}function jE(e,t,{scope:n}={}){Rr("trace",e,t,n)}function qE(e,t,{scope:n}={}){Rr("debug",e,t,n)}function zE(e,t,{scope:n}={}){Rr("info",e,t,n)}function GE(e,t,{scope:n}={}){Rr("warn",e,t,n)}function VE(e,t,{scope:n}={}){Rr("error",e,t,n)}function YE(e,t,{scope:n}={}){Rr("fatal",e,t,n)}const VN=Object.freeze(Object.defineProperty({__proto__:null,debug:qE,error:VE,fatal:YE,fmt:fb,info:zE,trace:jE,warn:GE},Symbol.toStringTag,{value:"Module"}));function Ms(e,t,n){return"util"in $&&typeof $.util.format=="function"?$.util.format(...e):JE(e,t,n)}function JE(e,t,n){return e.map(r=>gt(r)?String(r):JSON.stringify(Ie(r,t,n))).join(" ")}function Zp(e){return/%[sdifocO]/.test(e)}function eh(e,t){const n={},r=new Array(t.length).fill("{}").join(" ");return n["sentry.message.template"]=`${e} ${r}`,t.forEach((o,s)=>{n[`sentry.message.parameter.${s}`]=o}),n}const KE="ConsoleLogs",Cl={[oe]:"auto.log.console"},XE=((e={})=>{const t=e.levels||cc;return{name:KE,setup(n){const{enableLogs:r,normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=n.getOptions();if(!r){I&&g.warn("`enableLogs` is not enabled, ConsoleLogs integration disabled");return}const i=Ac(({args:a,level:c})=>{if(R()!==n||!t.includes(c))return;const u=a[0],d=a.slice(1);if(c==="assert"){if(!u){const f=d.length>0?`Assertion failed: ${Ms(d,o,s)}`:"Assertion failed";Rs({level:"error",message:f,attributes:Cl})}return}const l=c==="log",p={...Cl};if(Pe(u)){Object.assign(p,Ie(u,o,s));const f=typeof a[1]=="string"?2:1;a.slice(f).forEach((m,y)=>{p[`sentry.message.parameter.${y}`]=Ie(m,o,s)})}else if(d.length>0&&typeof u=="string"&&!Zp(u)){const h=eh(u,d);for(const[m,y]of Object.entries(h))p[m]=m.startsWith("sentry.message.parameter.")?Ie(y,o,s):y}Rs({level:l?"info":c,message:Ms(a,o,s),severityNumber:l?10:void 0,attributes:p})});n.registerCleanup(i)}}}),YN=XE;function Mc(e,t,n,r){PS({type:e,name:t,value:n,unit:r?.unit,attributes:r?.attributes},{scope:r?.scope})}function QE(e,t=1,n){Mc("counter",e,t,n)}function ZE(e,t,n){Mc("gauge",e,t,n)}function La(e,t,n){Mc("distribution",e,t,n)}const JN=Object.freeze(Object.defineProperty({__proto__:null,count:QE,distribution:La,gauge:ZE},Symbol.toStringTag,{value:"Module"})),ev=["trace","debug","info","warn","error","fatal"];function KN(e={}){const t=new Set(e.levels??ev),n=e.client;return{log(r){const{type:o,level:s,message:i,args:a,tag:c,date:u,...d}=r,l=n||R();if(!l)return;const p=rv(o,s);if(!t.has(p))return;const{normalizeDepth:f=3,normalizeMaxBreadth:h=1e3}=l.getOptions(),m={};for(const[_,S]of Object.entries(d))m[_]=Ie(S,f,h);m["sentry.origin"]="auto.log.consola",c&&(m["consola.tag"]=c),o&&(m["consola.type"]=o),s!=null&&typeof s=="number"&&(m["consola.level"]=s);const y=sv(ov(a,f,h),f,h);y?.attributes&&Object.assign(m,y.attributes),Rs({level:p,message:y?.message||i||a&&Ms(a,f,h)||"",attributes:m})}}}const tv={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"},nv={0:"fatal",1:"warn",2:"info",3:"info",4:"debug",5:"trace"};function rv(e,t){if(e==="verbose")return"debug";if(e==="silent")return"trace";if(e){const n=tv[e];if(n)return n}if(typeof t=="number"){const n=nv[t];if(n)return n}return"info"}function ov(e,t,n){if(!e?.length)return{message:""};const r=Ms(e,t,n),o=e[0];if(Pe(o)){const s=typeof e[1]=="string"?2:1,i=e.slice(s);return{message:r,attributes:o,messageParameters:i}}else{const s=e.slice(1),i=s.length>0&&typeof o=="string"&&!Zp(o);return{message:r,messageTemplate:i?o:void 0,messageParameters:i?s:void 0}}}function sv(e,t,n){const{message:r,attributes:o,messageTemplate:s,messageParameters:i}=e,a={};if(s&&i){const c=eh(s,i);for(const[u,d]of Object.entries(c))a[u]=u.startsWith("sentry.message.parameter.")?Ie(d,t,n):d}else i&&i.length>0&&i.forEach((c,u)=>{a[`sentry.message.parameter.${u}`]=Ie(c,t,n)});return{message:r,attributes:{...Ie(o,t,n),...a}}}const iv="gen_ai.prompt",bo="gen_ai.system",Ae="gen_ai.request.model",xc="gen_ai.request.stream",fi="gen_ai.request.temperature",Nc="gen_ai.request.max_tokens",pi="gen_ai.request.frequency_penalty",Oc="gen_ai.request.presence_penalty",hi="gen_ai.request.top_p",th="gen_ai.request.top_k",nh="gen_ai.request.encoding_format",rh="gen_ai.request.dimensions",rr="gen_ai.response.finish_reasons",Cr="gen_ai.response.model",mi="gen_ai.response.id",av="gen_ai.response.stop_reason",xn="gen_ai.usage.input_tokens",Nn="gen_ai.usage.output_tokens",Zt="gen_ai.usage.total_tokens",it="gen_ai.operation.name",On="sentry.sdk_meta.gen_ai.input.messages.original_length",Ar="gen_ai.input.messages",Eo="gen_ai.system_instructions",ht="gen_ai.response.text",vo="gen_ai.request.available_tools",cv="gen_ai.response.streaming",Yt="gen_ai.response.tool_calls",gi="gen_ai.agent.name",uv="gen_ai.pipeline.name",Lc="gen_ai.conversation.id",lv="gen_ai.usage.cache_creation_input_tokens",dv="gen_ai.usage.cache_read_input_tokens",fv="gen_ai.invoke_agent",Pc="gen_ai.embeddings.input",oh="gen_ai.embeddings",Al="gen_ai.execute_tool",sh="gen_ai.tool.name",pv="gen_ai.tool.call.id",hv="gen_ai.tool.type",ih="gen_ai.tool.input",ah="gen_ai.tool.output",mv="gen_ai.tool.description";function or(e){return!e||typeof e!="object"?!1:_v(e)||uh(e)||gv(e)||lh(e)||dh(e)||yv(e)||Sv(e)||bv(e)||Ev(e)||vv(e)||Tv(e)||Iv(e)}function gv(e){return"image_url"in e?typeof e.image_url=="string"?e.image_url.startsWith("data:"):ch(e):!1}function ch(e){return"image_url"in e&&!!e.image_url&&typeof e.image_url=="object"&&"url"in e.image_url&&typeof e.image_url.url=="string"&&e.image_url.url.startsWith("data:")}function _v(e){return"type"in e&&typeof e.type=="string"&&"source"in e&&or(e.source)}function uh(e){return"inlineData"in e&&!!e.inlineData&&typeof e.inlineData=="object"&&"data"in e.inlineData&&typeof e.inlineData.data=="string"}function lh(e){return"type"in e&&e.type==="input_audio"&&"input_audio"in e&&!!e.input_audio&&typeof e.input_audio=="object"&&"data"in e.input_audio&&typeof e.input_audio.data=="string"}function dh(e){return"type"in e&&e.type==="file"&&"file"in e&&!!e.file&&typeof e.file=="object"&&"file_data"in e.file&&typeof e.file.file_data=="string"}function yv(e){return"media_type"in e&&typeof e.media_type=="string"&&"data"in e}function Sv(e){return"type"in e&&e.type==="file"&&"mediaType"in e&&typeof e.mediaType=="string"&&"data"in e&&typeof e.data=="string"&&!e.data.startsWith("http://")&&!e.data.startsWith("https://")}function bv(e){return"type"in e&&e.type==="image"&&"image"in e&&typeof e.image=="string"&&!e.image.startsWith("http://")&&!e.image.startsWith("https://")}function Ev(e){return"type"in e&&(e.type==="blob"||e.type==="base64")}function vv(e){return"b64_json"in e}function Tv(e){return"type"in e&&"result"in e&&e.type==="image_generation"}function Iv(e){return"uri"in e&&typeof e.uri=="string"&&e.uri.startsWith("data:")}const Lr="[Blob substitute]",wv=["image_url","data","content","b64_json","result","uri","image"];function jr(e){const t={...e};or(t.source)&&(t.source=jr(t.source)),uh(e)&&(t.inlineData={...e.inlineData,data:Lr}),ch(e)&&(t.image_url={...e.image_url,url:Lr}),lh(e)&&(t.input_audio={...e.input_audio,data:Lr}),dh(e)&&(t.file={...e.file,file_data:Lr});for(const n of wv)typeof t[n]=="string"&&(t[n]=Lr);return t}const fh=2e4,xs=e=>new TextEncoder().encode(e).length,Dc=e=>xs(JSON.stringify(e));function _i(e,t){if(xs(e)<=t)return e;let n=0,r=e.length,o="";for(;n<=r;){const s=Math.floor((n+r)/2),i=e.slice(0,s);xs(i)<=t?(o=i,n=s+1):r=s-1}return o}function kv(e){return typeof e=="string"?e:"text"in e&&typeof e.text=="string"?e.text:""}function Ml(e,t){return typeof e=="string"?t:{...e,text:t}}function Rv(e){return e!==null&&typeof e=="object"&&"content"in e&&typeof e.content=="string"}function ph(e){return e!==null&&typeof e=="object"&&"content"in e&&Array.isArray(e.content)}function hh(e){return e!==null&&typeof e=="object"&&"parts"in e&&Array.isArray(e.parts)&&e.parts.length>0}function Cv(e,t){const n={...e,content:""},r=Dc(n),o=t-r;if(o<=0)return[];const s=_i(e.content,o);return[{...e,content:s}]}function Av(e){return"parts"in e&&Array.isArray(e.parts)?{key:"parts",items:e.parts}:"content"in e&&Array.isArray(e.content)?{key:"content",items:e.content}:{key:null,items:[]}}function Mv(e,t){const{key:n,items:r}=Av(e);if(n===null||r.length===0)return[];const o=r.map(c=>Ml(c,"")),s=Dc({...e,[n]:o});let i=t-s;if(i<=0)return[];const a=[];for(const c of r){const u=kv(c),d=xs(u);if(d<=i)a.push(c),i-=d;else if(a.length===0){const l=_i(u,i);l&&a.push(Ml(c,l));break}else break}return a.length<=0?[]:[{...e,[n]:a}]}function xv(e,t){if(!e)return[];if(typeof e=="string"){const n=_i(e,t);return n?[n]:[]}return typeof e!="object"?[]:Rv(e)?Cv(e,t):ph(e)||hh(e)?Mv(e,t):[]}function Pa(e){return e.map(n=>{let r;return n&&typeof n=="object"&&(ph(n)?r={...n,content:Pa(n.content)}:"content"in n&&or(n.content)&&(r={...n,content:jr(n.content)}),hh(n)&&(r={...r??n,parts:Pa(n.parts)}),or(r)?r=jr(r):or(n)&&(r=jr(n))),r??n})}function Nv(e,t){if(!Array.isArray(e)||e.length===0)return e;const n=t-2,r=e[e.length-1],o=Pa([r]),s=o[0];return Dc(s)<=n?o:xv(s,n)}function Ov(e){return Nv(e,fh)}function Lv(e){return _i(e,fh)}function $n(e){const t=R()?.getDataCollectionOptions().genAI;return{...e,recordInputs:e?.recordInputs??t?.inputs??!1,recordOutputs:e?.recordOutputs??t?.outputs??!1}}function Dt(e){if(e!==void 0)return e;const t=R();return t?!Ze(t)&&t.getOptions().streamGenAiSpans===!1:!0}function mh(e,t){return e?`${e}.${t}`:t}function Pv(e,t,n,r,o){if(t!==void 0&&e.setAttributes({[xn]:t}),n!==void 0&&e.setAttributes({[Nn]:n}),t!==void 0||n!==void 0||r!==void 0||o!==void 0){const s=(t??0)+(n??0)+(r??0)+(o??0);e.setAttributes({[Zt]:s})}}function yi(e,t,n){if(!e.isRecording())return;const r={[cv]:!0};t.responseId&&(r[mi]=t.responseId),t.responseModel&&(r[Cr]=t.responseModel),t.promptTokens!==void 0&&(r[xn]=t.promptTokens),t.completionTokens!==void 0&&(r[Nn]=t.completionTokens),t.totalTokens!==void 0?r[Zt]=t.totalTokens:(t.promptTokens!==void 0||t.completionTokens!==void 0||t.cacheCreationInputTokens!==void 0||t.cacheReadInputTokens!==void 0)&&(r[Zt]=(t.promptTokens??0)+(t.completionTokens??0)+(t.cacheCreationInputTokens??0)+(t.cacheReadInputTokens??0)),t.finishReasons.length&&(r[rr]=JSON.stringify(t.finishReasons)),n&&t.responseTexts.length&&(r[ht]=t.responseTexts.join("")),n&&t.toolCalls.length&&(r[Yt]=JSON.stringify(t.toolCalls)),e.setAttributes(r),e.end()}function Mr(e){if(typeof e=="string")return Lv(e);try{return JSON.stringify(Array.isArray(e)?Ov(e):e)}catch{return"[unserializable]"}}function To(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;if(!r)return{systemInstructions:void 0,filteredMessages:e};const o=JSON.stringify([{type:"text",content:r}]),s=[...e.slice(0,t),...e.slice(t+1)];return{systemInstructions:o,filteredMessages:s}}async function Dv(e,t){const[n,r]=await Promise.all([t,e]);return r&&typeof r=="object"&&"data"in r?{...r,data:n}:n}function Ns(e,t){return Ln(e)?new Proxy(e,{get(n,r){const s=r in Promise.prototype||r===Symbol.toStringTag?t:n,i=Reflect.get(s,r);return r==="withResponse"&&typeof i=="function"?function(){const c=i.call(n);return Dv(c,t)}:typeof i=="function"?i.bind(s):i}}):t}const Fv={"responses.create":{operation:"chat"},"chat.completions.create":{operation:"chat"},"embeddings.create":{operation:"embeddings"},"conversations.create":{operation:"chat"}},$v=["response.output_item.added","response.function_call_arguments.delta","response.function_call_arguments.done","response.output_item.done"],Bv=["response.created","response.in_progress","response.failed","response.completed","response.incomplete","response.queued","response.output_text.delta",...$v];function Uv(e){return e!==null&&typeof e=="object"&&"type"in e&&typeof e.type=="string"&&e.type.startsWith("response.")}function Hv(e){return e!==null&&typeof e=="object"&&"object"in e&&e.object==="chat.completion.chunk"}function Wv(e,t,n){if(!t||typeof t!="object")return;const r=t,o={};if(typeof r.id=="string"&&(o[mi]=r.id),typeof r.model=="string"&&(o[Cr]=r.model),r.object==="conversation"&&typeof r.id=="string"&&(o[Lc]=r.id),r.usage&&typeof r.usage=="object"){const s=r.usage,i=s.prompt_tokens??s.input_tokens;typeof i=="number"&&(o[xn]=i);const a=s.completion_tokens??s.output_tokens;typeof a=="number"&&(o[Nn]=a),typeof s.total_tokens=="number"&&(o[Zt]=s.total_tokens)}if(Array.isArray(r.choices)){const s=r.choices,i=s.map(a=>a.finish_reason).filter(a=>typeof a=="string");if(i.length>0&&(o[rr]=JSON.stringify(i)),n){const a=s.map(u=>u.message?.content||"");o[ht]=JSON.stringify(a);const c=s.map(u=>u.message?.tool_calls).filter(u=>Array.isArray(u)&&u.length>0).flat();c.length>0&&(o[Yt]=JSON.stringify(c))}}if(typeof r.status=="string"&&(o[rr]||(o[rr]=JSON.stringify([r.status]))),n&&(typeof r.output_text=="string"&&!o[ht]&&(o[ht]=r.output_text),Array.isArray(r.output)&&r.output.length>0&&!o[Yt])){const s=r.output.filter(i=>i?.type==="function_call");s.length>0&&(o[Yt]=JSON.stringify(s))}e.setAttributes(o)}function jv(e){if("conversation"in e&&typeof e.conversation=="string")return e.conversation;if("previous_response_id"in e&&typeof e.previous_response_id=="string")return e.previous_response_id}function qv(e){const t={[Ae]:e.model??"unknown"};"temperature"in e&&(t[fi]=e.temperature),"top_p"in e&&(t[hi]=e.top_p),"frequency_penalty"in e&&(t[pi]=e.frequency_penalty),"presence_penalty"in e&&(t[Oc]=e.presence_penalty),"stream"in e&&(t[xc]=e.stream),"encoding_format"in e&&(t[nh]=e.encoding_format),"dimensions"in e&&(t[rh]=e.dimensions);const n=jv(e);return n&&(t[Lc]=n),t}function zv(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 o=t.chatCompletionToolCalls[r];n.function.arguments&&o?.function&&(o.function.arguments+=n.function.arguments)}}}function Gv(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&&zv(r.delta.tool_calls,t)),r.finish_reason&&t.finishReasons.push(r.finish_reason)}function Vv(e,t,n,r){if(!(e&&typeof e=="object")){t.eventTypes.push("unknown:non-object");return}if(e instanceof Error){r.setStatus({code:ne,message:"internal_error"}),bt(e,{mechanism:{handled:!1,type:"auto.ai.openai.stream-response"}});return}if(!("type"in e))return;const o=e;if(!Bv.includes(o.type)){t.eventTypes.push(o.type);return}if(n&&(o.type==="response.output_item.done"&&"item"in o&&t.responsesApiToolCalls.push(o.item),o.type==="response.output_text.delta"&&"delta"in o&&o.delta)){t.responseTexts.push(o.delta);return}if("response"in o){const{response:s}=o;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)}}async function*Yv(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 o of e)Hv(o)?Gv(o,r,n):Uv(o)&&Vv(o,r,n,t),yield o}finally{const o=[...Object.values(r.chatCompletionToolCalls),...r.responsesApiToolCalls];yi(t,{...r,toolCalls:o},n)}}function Jv(e){const t=Array.isArray(e.tools)?e.tools:[],r=e.web_search_options&&typeof e.web_search_options=="object"?[{type:"web_search_options",...e.web_search_options}]:[],o=[...t,...r];if(o.length!==0)try{return JSON.stringify(o)}catch(s){I&&g.error("Failed to serialize OpenAI tools:",s);return}}function Kv(e,t){const n={[bo]:"openai",[it]:t,[oe]:"auto.ai.openai"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const r=e[0],o=Jv(r);o&&(n[vo]=o),Object.assign(n,qv(r))}else n[Ae]="unknown";return n}function xl(e,t,n,r){if(n==="embeddings"&&"input"in t){const a=t.input;if(a==null||typeof a=="string"&&a.length===0||Array.isArray(a)&&a.length===0)return;e.setAttribute(Pc,typeof a=="string"?a:JSON.stringify(a));return}const o="input"in t?t.input:"messages"in t?t.messages:void 0;if(!o||Array.isArray(o)&&o.length===0)return;const{systemInstructions:s,filteredMessages:i}=To(o);s&&e.setAttribute(Eo,s),e.setAttribute(Ar,r?Mr(i):je(i)),Array.isArray(i)?e.setAttribute(On,i.length):e.setAttribute(On,1)}function Xv(e,t,n,r,o){return function(...i){const a=n.operation||"unknown",c=Kv(i,a),u=c[Ae]||"unknown",d=i[0],l=d&&typeof d=="object"&&d.stream===!0,p={name:`${a} ${u}`,op:`gen_ai.${a}`,attributes:c};if(l){let m;const y=zt(p,_=>(m=e.apply(r,i),o.recordInputs&&d&&xl(_,d,a,Dt(o.enableTruncation)),(async()=>{try{const S=await m;return Yv(S,_,o.recordOutputs??!1)}catch(S){throw _.setStatus({code:ne,message:"internal_error"}),_.end(),S}})()));return Ns(m,y)}let f;const h=Bt(p,m=>(f=e.apply(r,i),o.recordInputs&&d&&xl(m,d,a,Dt(o.enableTruncation)),f.then(y=>(Wv(m,y,o.recordOutputs),y))));return Ns(f,h)}}function gh(e,t="",n){return new Proxy(e,{get(r,o){const s=r[o],i=mh(t,String(o)),a=Fv[i];return typeof s=="function"&&a?Xv(s,i,a,r,n):typeof s=="function"?s.bind(r):s&&typeof s=="object"?gh(s,i,n):s}})}function XN(e,t){return gh(e,"",$n(t))}const Nl={"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 Qv(e,t,n){if(Array.isArray(t)&&t.length===0)return;const{systemInstructions:r,filteredMessages:o}=To(t);r&&e.setAttributes({[Eo]:r});const s=Array.isArray(o)?o.length:1;e.setAttributes({[Ar]:n?Mr(o):je(o),[On]:s})}const Zv={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 _h(e){return e&&Zv[e]||"internal_error"}function eT(e,t){t.error&&(e.setStatus({code:ne,message:_h(t.error.type)}),bt(t.error,{mechanism:{handled:!1,type:"auto.ai.anthropic.anthropic_error"}}))}function tT(e){const{system:t,messages:n,input:r}=e,o=typeof t=="string"?[{role:"system",content:e.system}]:[],s=Array.isArray(r)?r:r!=null?[r]:void 0,i=Array.isArray(n)?n:n!=null?[n]:[],a=s??i;return[...o,...a]}function nT(e,t){return"type"in e&&typeof e.type=="string"&&e.type==="error"?(t.setStatus({code:ne,message:_h(e.error?.type)}),!0):!1}function rT(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))}}function oT(e,t){e.type!=="content_block_start"||typeof e.index!="number"||!e.content_block||(e.content_block.type==="tool_use"||e.content_block.type==="server_tool_use")&&(t.activeToolBlocks[e.index]={id:e.content_block.id,name:e.content_block.name,inputJsonParts:[]})}function sT(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)}}function iT(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 o;try{o=r?JSON.parse(r):{}}catch{o={__unparsed:r}}t.toolCalls.push({type:"tool_use",id:n.id,name:n.name,input:o}),delete t.activeToolBlocks[e.index]}function yh(e,t,n,r){!(e&&typeof e=="object")||nT(e,r)||(rT(e,t),oT(e,t),sT(e,t,n),iT(e,t))}async function*aT(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 o of e)yh(o,r,n,t),yield o}finally{yi(t,r,n)}}function cT(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",o=>{yh(o,r,n,t)}),e.on("message",()=>{yi(t,r,n)}),e.on("error",o=>{bt(o,{mechanism:{handled:!1,type:"auto.ai.anthropic.stream_error"}}),t.isRecording()&&(t.setStatus({code:ne,message:"internal_error"}),t.end())}),e}let ss=!1;const Ol=new WeakSet;function uT(e,t,n){const r={[bo]:"anthropic",[it]:n,[oe]:"auto.ai.anthropic"};if(e.length>0&&typeof e[0]=="object"&&e[0]!==null){const o=e[0];o.tools&&Array.isArray(o.tools)&&(r[vo]=JSON.stringify(o.tools)),r[Ae]=o.model??"unknown","temperature"in o&&(r[fi]=o.temperature),"top_p"in o&&(r[hi]=o.top_p),"stream"in o&&(r[xc]=o.stream),"top_k"in o&&(r[th]=o.top_k),"frequency_penalty"in o&&(r[pi]=o.frequency_penalty),"max_tokens"in o&&(r[Nc]=o.max_tokens)}else t==="models.retrieve"||t==="models.get"?r[Ae]=e[0]:r[Ae]="unknown";return r}function Da(e,t,n){const r=tT(t);Qv(e,r,n),"prompt"in t&&e.setAttributes({[iv]:JSON.stringify(t.prompt)})}function lT(e,t){if("content"in t&&Array.isArray(t.content)){e.setAttributes({[ht]: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({[Yt]:JSON.stringify(n)})}"completion"in t&&e.setAttributes({[ht]:t.completion}),"input_tokens"in t&&e.setAttributes({[ht]:JSON.stringify(t.input_tokens)})}function dT(e,t){"id"in t&&"model"in t&&(e.setAttributes({[mi]:t.id,[Cr]:t.model}),"usage"in t&&t.usage&&Pv(e,t.usage.input_tokens,t.usage.output_tokens,t.usage.cache_creation_input_tokens,t.usage.cache_read_input_tokens))}function fT(e,t,n){if(!(!t||typeof t!="object")){if("type"in t&&t.type==="error"){eT(e,t);return}n&&lT(e,t),dT(e,t)}}function Ll(e,t){throw t.isRecording()&&(t.setStatus({code:ne,message:"internal_error"}),t.end()),e}function pT(e,t,n,r,o,s,i,a,c,u){const d=r[Ae]??"unknown",l={name:`${o} ${d}`,op:`gen_ai.${o}`,attributes:r};if(c&&!u){let p;const f=zt(l,h=>(p=e.apply(t,n),a.recordInputs&&i&&Da(h,i,Dt(a.enableTruncation)),(async()=>{try{const m=await p;return aT(m,h,a.recordOutputs??!1)}catch(m){return Ll(m,h)}})()));return Ns(p,f)}else return zt(l,p=>{try{a.recordInputs&&i&&Da(p,i,Dt(a.enableTruncation)),ss=!0;const f=e.apply(t,n);return ss=!1,cT(f,p,a.recordOutputs??!1)}catch(f){return ss=!1,Ll(f,p)}})}function hT(e,t,n,r,o){return new Proxy(e,{apply(s,i,a){const c=i!==void 0?i:r,u=n.streaming===!0;if(!u&&ss)return s.apply(c,a);const d=n.operation||"unknown",l=uT(a,t,d),p=l[Ae]??"unknown",f=typeof a[0]=="object"?a[0]:void 0,h=!!f?.stream;if(h||u)return pT(s,c,a,l,d,t,f,o,h,u);let m;const y=Bt({name:`${d} ${p}`,op:`gen_ai.${d}`,attributes:l},_=>(m=s.apply(c,a),o.recordInputs&&f&&Da(_,f,Dt(o.enableTruncation)),m.then(S=>(fT(_,S,o.recordOutputs),S))));return Ns(m,y)}})}function mT(e,t){for(const n of Object.keys(Nl)){const r=n.split("."),o=r.pop();let s=e;for(const c of r)s=s?.[c];if(!s||typeof s[o]!="function")continue;const i=s[o];if(Ol.has(i))continue;const a=hT(i,n,Nl[n],s,t);Ol.add(a),s[o]=a}return e}function QN(e,t){return mT(e,$n(t))}const gT={"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}},_T="google_genai";function yT(e,t){const n=e?.promptFeedback;if(n?.blockReason){const r=n.blockReasonMessage??n.blockReason;return t.setStatus({code:ne,message:"internal_error"}),bt(`Content blocked: ${r}`,{mechanism:{handled:!1,type:"auto.ai.google_genai"}}),!0}return!1}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))}function bT(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 o of r?.content?.parts??[])n&&o.text&&t.responseTexts.push(o.text),o.functionCall&&t.toolCalls.push({type:"function",id:o.functionCall.id,name:o.functionCall.name,arguments:o.functionCall.args})}}function ET(e,t,n,r){!e||yT(e,r)||(ST(e,t),bT(e,t,n))}async function*vT(e,t,n){const r={responseTexts:[],finishReasons:[],toolCalls:[]};try{for await(const o of e)ET(o,r,n,t),yield o}finally{yi(t,r,n)}}function Br(e,t="user"){return typeof e=="string"?[{role:t,content:e}]:Array.isArray(e)?e.flatMap(n=>Br(n,t)):typeof e!="object"||!e?[]:"role"in e&&typeof e.role=="string"?[e]:"parts"in e?[{...e,role:t}]:[{role:t,content:e}]}function Pl(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"}function TT(e){const t={};return"temperature"in e&&typeof e.temperature=="number"&&(t[fi]=e.temperature),"topP"in e&&typeof e.topP=="number"&&(t[hi]=e.topP),"topK"in e&&typeof e.topK=="number"&&(t[th]=e.topK),"maxOutputTokens"in e&&typeof e.maxOutputTokens=="number"&&(t[Nc]=e.maxOutputTokens),"frequencyPenalty"in e&&typeof e.frequencyPenalty=="number"&&(t[pi]=e.frequencyPenalty),"presencePenalty"in e&&typeof e.presencePenalty=="number"&&(t[Oc]=e.presencePenalty),t}function IT(e,t,n){const r={[bo]:_T,[it]:e,[oe]:"auto.ai.google_genai"};if(t){if(r[Ae]=Pl(t,n),"config"in t&&typeof t.config=="object"&&t.config){const o=t.config;if(Object.assign(r,TT(o)),"tools"in o&&Array.isArray(o.tools)){const s=o.tools.flatMap(i=>i.functionDeclarations);r[vo]=JSON.stringify(s)}}}else r[Ae]=Pl({},n);return r}function Dl(e,t,n,r){if(n==="embeddings"){const s=t.contents;s!=null&&e.setAttribute(Pc,typeof s=="string"?s:JSON.stringify(s));return}const o=[];if("config"in t&&t.config&&typeof t.config=="object"&&"systemInstruction"in t.config&&t.config.systemInstruction&&o.push(...Br(t.config.systemInstruction,"system")),"history"in t&&o.push(...Br(t.history,"user")),"contents"in t&&o.push(...Br(t.contents,"user")),"message"in t&&o.push(...Br(t.message,"user")),Array.isArray(o)&&o.length){const{systemInstructions:s,filteredMessages:i}=To(o);s&&e.setAttribute(Eo,s);const a=Array.isArray(i)?i.length:0;e.setAttributes({[On]:a,[Ar]:r?Mr(i):je(i)})}}function wT(e,t,n){if(!(!t||typeof t!="object")){if(t.modelVersion&&e.setAttribute(Cr,t.modelVersion),t.usageMetadata&&typeof t.usageMetadata=="object"){const r=t.usageMetadata;typeof r.promptTokenCount=="number"&&e.setAttributes({[xn]:r.promptTokenCount}),typeof r.candidatesTokenCount=="number"&&e.setAttributes({[Nn]:r.candidatesTokenCount}),typeof r.totalTokenCount=="number"&&e.setAttributes({[Zt]:r.totalTokenCount})}if(n&&Array.isArray(t.candidates)&&t.candidates.length>0){const r=t.candidates.map(o=>o.content?.parts&&Array.isArray(o.content.parts)?o.content.parts.map(s=>typeof s.text=="string"?s.text:"").filter(s=>s.length>0).join(""):"").filter(o=>o.length>0);r.length>0&&e.setAttributes({[ht]:r.join("")})}if(n&&t.functionCalls){const r=t.functionCalls;Array.isArray(r)&&r.length>0&&e.setAttributes({[Yt]:JSON.stringify(r)})}}}function kT(e,t,n,r,o){const s=n.operation==="embeddings";return new Proxy(e,{apply(i,a,c){const u=n.operation||"unknown",d=c[0],l=IT(u,d,r),p=l[Ae]??"unknown";return n.streaming?zt({name:`${u} ${p}`,op:`gen_ai.${u}`,attributes:l},async f=>{try{o.recordInputs&&d&&Dl(f,d,u,Dt(o.enableTruncation));const h=await i.apply(r,c);return vT(h,f,!!o.recordOutputs)}catch(h){throw f.setStatus({code:ne,message:"internal_error"}),f.end(),h}}):Bt({name:`${u} ${p}`,op:`gen_ai.${u}`,attributes:l},f=>(o.recordInputs&&d&&Dl(f,d,u,Dt(o.enableTruncation)),_c(()=>i.apply(r,c),()=>{},()=>{},h=>{s||wT(f,h,o.recordOutputs)})))}})}function Fa(e,t="",n){return new Proxy(e,{get:(r,o,s)=>{const i=Reflect.get(r,o,s),a=mh(t,String(o)),c=gT[a];if(typeof i=="function"&&c){const u=c.operation?kT(i,a,c,r,n):i.bind(r);return c.proxyResultPath?function(...d){const l=u(...d);return l&&typeof l=="object"?Fa(l,c.proxyResultPath,n):l}:u}return typeof i=="function"?i.bind(r):i&&typeof i=="object"?Fa(i,a,n):i}})}function ZN(e,t){return Fa(e,"",$n(t))}const Fc="auto.ai.langchain",RT={human:"user",ai:"assistant",assistant:"assistant",system:"system",function:"function",tool:"tool"},Ve=(e,t,n)=>{n!=null&&(e[t]=n)},Be=(e,t,n)=>{const r=Number(n);Number.isNaN(r)||(e[t]=r)};function qn(e){if(Array.isArray(e))try{const t=e.map(n=>n&&typeof n=="object"&&or(n)?jr(n):n);return JSON.stringify(t)}catch{return String(e)}return je(e,String)}function Pr(e){const t=e.toLowerCase();return RT[t]??t}function Fl(e){return e.includes("System")?"system":e.includes("Human")?"user":e.includes("AI")||e.includes("Assistant")?"assistant":e.includes("Function")?"function":e.includes("Tool")?"tool":"user"}function $l(e){if(!(!e||Array.isArray(e)))return e.invocation_params}function $c(e){return e.map(t=>{const n=t._getType;if(typeof n=="function"){const o=n.call(t);return{role:Pr(o),content:qn(t.content)}}if(t.lc===1&&t.kwargs){const o=t.id,s=Array.isArray(o)&&o.length>0?o[o.length-1]:"",i=typeof s=="string"?Fl(s):"user";return{role:Pr(i),content:qn(t.kwargs?.content)}}if(t.type){const o=String(t.type).toLowerCase();return{role:Pr(o),content:qn(t.content)}}if(t.role)return{role:Pr(String(t.role)),content:qn(t.content)};const r=t.constructor?.name;return r&&r!=="Object"?{role:Pr(Fl(r)),content:qn(t.content)}:{role:"user",content:qn(t.content)}})}function CT(e,t,n){const r={},o="kwargs"in e?e.kwargs:void 0,s=t?.temperature??n?.ls_temperature??o?.temperature;Be(r,fi,s);const i=t?.max_tokens??n?.ls_max_tokens??o?.max_tokens;Be(r,Nc,i);const a=t?.top_p??o?.top_p;Be(r,hi,a);const c=t?.frequency_penalty;Be(r,pi,c);const u=t?.presence_penalty;return Be(r,Oc,u),t&&"stream"in t&&Ve(r,xc,!!t.stream),r}function Sh(e,t,n,r,o){return{[bo]:je(e??"langchain",String),[it]:"chat",[Ae]:je(t,String),[oe]:Fc,...CT(n,r,o)}}function AT(e,t,n,r,o,s){const i=s?.ls_provider,a=o?.model??s?.ls_model_name??"unknown",c=Sh(i,a,e,o,s);if(n&&Array.isArray(t)&&t.length>0){Ve(c,On,t.length);const u=t.map(d=>({role:"user",content:d}));Ve(c,Ar,r?Mr(u):je(u))}return c}function MT(e,t,n,r,o,s){const i=s?.ls_provider??e.id?.[2],a=o?.model??s?.ls_model_name??"unknown",c=Sh(i,a,e,o,s);if(n&&Array.isArray(t)&&t.length>0){const u=$c(t.flat()),{systemInstructions:d,filteredMessages:l}=To(u);d&&Ve(c,Eo,d);const p=Array.isArray(l)?l.length:0;Ve(c,On,p),Ve(c,Ar,r?Mr(l):je(l))}return c}function xT(e,t){const n=[],r=e.flat();for(const o of r){const i=o.message?.tool_calls;if(Array.isArray(i)&&i.length>0)n.push(...i);else{const a=o.message?.content;if(Array.isArray(a))for(const c of a){const u=c;u.type==="tool_use"&&n.push(u)}}}n.length>0&&Ve(t,Yt,je(n,String))}function NT(e,t){if(!e)return;const n=e.tokenUsage,r=e.usage;if(n)Be(t,xn,n.promptTokens),Be(t,Nn,n.completionTokens),Be(t,Zt,n.totalTokens);else if(r){Be(t,xn,r.input_tokens),Be(t,Nn,r.output_tokens);const o=Number(r.input_tokens),s=Number(r.output_tokens),i=(Number.isNaN(o)?0:o)+(Number.isNaN(s)?0:s);i>0&&Be(t,Zt,i),r.cache_creation_input_tokens!==void 0&&Be(t,lv,r.cache_creation_input_tokens),r.cache_read_input_tokens!==void 0&&Be(t,dv,r.cache_read_input_tokens)}}function OT(e,t){if(!e)return;const n={};if(Array.isArray(e.generations)){const u=e.generations.flat().map(d=>d.generationInfo?.finish_reason?d.generationInfo.finish_reason:d.generation_info?.finish_reason?d.generation_info.finish_reason:null).filter(d=>typeof d=="string");if(u.length>0&&Ve(n,rr,je(u,String)),xT(e.generations,n),t){const d=e.generations.flat().map(l=>l.text??l.message?.content).filter(l=>typeof l=="string");d.length>0&&Ve(n,ht,je(d,String))}}NT(e.llmOutput,n);const r=e.llmOutput,s=e.generations?.[0]?.[0]?.message,i=r?.model_name??r?.model??s?.response_metadata?.model_name;i&&Ve(n,Cr,i);const a=r?.id??s?.id;a&&Ve(n,mi,a);const c=r?.stop_reason??s?.response_metadata?.finish_reason;return c&&Ve(n,av,je(c,String)),n}function ta(e){const t={},n=e?.lc_agent_name;return typeof n=="string"&&(t[gi]=n),t}function LT(e){const t=e?.invocation_params?.tools??e?.options?.tools;if(!Array.isArray(t)||t.length===0)return;const n=t.map(r=>{const o=r.function;return{type:"function",name:r.name??o?.name??"",description:r.description??o?.description}});return JSON.stringify(n)}function PT(e){if(!e||typeof e!="object")return!1;const t=e;return typeof t.addHandler=="function"&&typeof t.copy=="function"}function DT(e){return typeof e=="object"&&e?.name==="SentryCallbackHandler"}function Bl(e){return e.some(DT)}function FT(e,t){if(!e)return[t];if(PT(e)){if(Bl(e.handlers??[]))return e;const r=e.copy();return r.addHandler(t,!0),r}const n=Array.isArray(e)?e:[e];return Bl(n)?e:[...n,t]}function bh(e={}){const{recordInputs:t,recordOutputs:n}=$n(e),r=Dt(e.enableTruncation),o=new Map,s=a=>{const c=o.get(a);c?.isRecording()&&(c.end(),o.delete(a))},i={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(a,c,u,d,l,p,f,h){const m=$l(p),y=AT(a,c,t,r,m,f),_=y[Ae],S=y[it];zt({name:`${S} ${_}`,op:"gen_ai.chat",attributes:{...ta(f),...y,[ge]:"gen_ai.chat"}},w=>(o.set(u,w),w))},handleChatModelStart(a,c,u,d,l,p,f,h){const m=$l(p),y=MT(a,c,t,r,m,f),_=LT(l);_&&(y[vo]=_);const S=y[Ae],w=y[it];zt({name:`${w} ${S}`,op:"gen_ai.chat",attributes:{...ta(f),...y,[ge]:"gen_ai.chat"}},E=>(o.set(u,E),E))},handleLLMEnd(a,c,u,d,l){const p=o.get(c);if(p?.isRecording()){const f=OT(a,n);f&&p.setAttributes(f),s(c)}},handleLLMError(a,c){const u=o.get(c);u?.isRecording()&&(u.setStatus({code:ne,message:"internal_error"}),s(c))},handleChainStart(a,c,u,d,l,p,f,h){if(p?.__sentry_langgraph__)return;const m=h||a.name||"unknown_chain",y={[oe]:"auto.ai.langchain","langchain.chain.name":m};t&&(y["langchain.chain.inputs"]=JSON.stringify(c)),zt({name:`chain ${m}`,op:"gen_ai.invoke_agent",attributes:{...y,[ge]:"gen_ai.invoke_agent"}},_=>(o.set(u,_),_))},handleChainEnd(a,c){const u=o.get(c);u?.isRecording()&&(n&&u.setAttributes({"langchain.chain.outputs":JSON.stringify(a)}),s(c))},handleChainError(a,c){const u=o.get(c);u?.isRecording()&&(u.setStatus({code:ne,message:"internal_error"}),s(c))},handleToolStart(a,c,u,d,l,p,f){if(p?.__sentry_langgraph__)return;const h=f||a.name||"unknown_tool",m={...ta(p),[oe]:Fc,[it]:"execute_tool",[sh]:h};t&&(m[ih]=c),zt({name:`execute_tool ${h}`,op:"gen_ai.execute_tool",attributes:{...m,[ge]:"gen_ai.execute_tool"}},y=>(o.set(u,y),y))},handleToolEnd(a,c){const u=o.get(c);if(u?.isRecording()){if(n){const d=a,l=d&&typeof d=="object"&&"content"in d?d.content:a;u.setAttributes({[ah]:typeof l=="string"?l:JSON.stringify(l)})}s(c)}},handleToolError(a,c){const u=o.get(c);u?.isRecording()&&(u.setStatus({code:ne,message:"internal_error"}),s(c))},copy(){return i},toJSON(){return{lc:1,type:"not_implemented",id:i.lc_id}},toJSONNotImplemented(){return{lc:1,type:"not_implemented",id:i.lc_id}}};return i}function $T(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"}function BT(e){const t=e??{},n={[oe]:Fc,[ge]:oh,[it]:"embeddings",[Ae]:t.model??"unknown"};return n[bo]=$T(t),"dimensions"in t&&(n[rh]=t.dimensions),"encodingFormat"in t&&(n[nh]=t.encodingFormat),n}function UT(e,t,n={}){const{recordInputs:r}=$n(n),o=BT(e),s=o[Ae]||"unknown";return r&&t!=null&&(o[Pc]=typeof t=="string"?t:JSON.stringify(t)),{name:`embeddings ${s}`,op:oh,attributes:o}}function Ul(e,t={}){return new Proxy(e,{apply(n,r,o){return Bt(UT(r,o[0],t),()=>Reflect.apply(n,r,o))}})}function eO(e,t){const n=e;return typeof n.embedQuery=="function"&&(n.embedQuery=Ul(n.embedQuery,t)),typeof n.embedDocuments=="function"&&(n.embedDocuments=Ul(n.embedDocuments,t)),e}const Bc="auto.ai.langgraph";function HT(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}function WT(e){const t=e[0];return typeof t=="object"&&t&&"name"in t&&typeof t.name=="string"?t.name:null}function jT(e,t,n){const r="__sentry_tool_wrapped__";for(const o of e){if(!o||typeof o!="object")continue;const s=o,i=s.invoke;if(typeof i!="function"||Object.prototype.hasOwnProperty.call(s,r))continue;const a=typeof s.name=="string"?s.name:"unknown_tool",c=typeof s.description=="string"?s.description:void 0,u=new Proxy(i,{apply(d,l,p){const f={[oe]:Bc,[ge]:Al,[it]:"execute_tool",[sh]:a,[hv]:"function"},m=p[1]?.metadata?.lc_agent_name??n;typeof m=="string"&&(f[gi]=m),c&&(f[mv]=c);const y=p[0];if(typeof y=="object"&&y&&("id"in y&&typeof y.id=="string"&&(f[pv]=y.id),t.recordInputs)){const _="args"in y&&typeof y.args=="object"?y.args:y;try{f[ih]=JSON.stringify(_)}catch{}}return Bt({op:Al,name:`execute_tool ${a}`,attributes:f},async _=>{try{const S=await Reflect.apply(d,l,p);if(t.recordOutputs)try{const w=S,E=w&&typeof w=="object"&&"content"in w?w.content:S;_.setAttribute(ah,typeof E=="string"?E:JSON.stringify(E))}catch{}return S}catch(S){throw _.setStatus({code:ne,message:"internal_error"}),S}})}});s.invoke=u,Object.defineProperty(s,r,{value:!0,enumerable:!1})}return e}function qT(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}function zT(e){const t=e;let n=0,r=0,o=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"&&(o=s.total_tokens),{inputTokens:n,outputTokens:r,totalTokens:o}}if(t.response_metadata&&typeof t.response_metadata=="object"){const s=t.response_metadata;if(s.tokenUsage&&typeof s.tokenUsage=="object"){const i=s.tokenUsage;typeof i.promptTokens=="number"&&(n=i.promptTokens),typeof i.completionTokens=="number"&&(r=i.completionTokens),typeof i.totalTokens=="number"&&(o=i.totalTokens)}}return{inputTokens:n,outputTokens:r,totalTokens:o}}function GT(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(Cr,r.model_name),r.finish_reason&&typeof r.finish_reason=="string"&&e.setAttribute(rr,[r.finish_reason])}}function VT(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}))}function YT(e,t,n){const o=n?.messages;if(!o||!Array.isArray(o))return;const s=t?.length??0,i=o.length>s?o.slice(s):[];if(i.length===0)return;const a=qT(i);a&&e.setAttribute(Yt,JSON.stringify(a));const c=$c(i);e.setAttribute(ht,JSON.stringify(c));let u=0,d=0,l=0;for(const p of i){const f=zT(p);u+=f.inputTokens,d+=f.outputTokens,l+=f.totalTokens,GT(e,p)}u>0&&e.setAttribute(xn,u),d>0&&e.setAttribute(Nn,d),l>0&&e.setAttribute(Zt,l)}let $a=!1;const Os="__sentry_patched__";function JT(e){const t={[oe]:Bc,[ge]:"gen_ai.create_agent",[it]:"create_agent"};return{op:"gen_ai.create_agent",name:e?`create_agent ${e}`:"create_agent",attributes:t}}function KT(e,t){if(Object.prototype.hasOwnProperty.call(e,Os))return e;const n=bh(t),r=new Proxy(e,{apply(o,s,i){return $a?Reflect.apply(o,s,i):Bt(JT(),a=>{try{const c=Reflect.apply(o,s,i),u=i.length>0?i[0]:{};u?.name&&typeof u.name=="string"&&(a.setAttribute(gi,u.name),a.updateName(`create_agent ${u.name}`));const d=c.invoke;return d&&typeof d=="function"&&(c.invoke=Eh(d.bind(c),c,u,t,void 0,n)),c}catch(c){throw a.setStatus({code:ne,message:"internal_error"}),c}})}});return Object.defineProperty(r,Os,{value:!0,enumerable:!1}),r}function Eh(e,t,n,r,o,s){return new Proxy(e,{apply(i,a,c){const u=o?.modelName??o?.model;return Bt({op:"gen_ai.invoke_agent",name:"invoke_agent",attributes:{[oe]:Bc,[ge]:fv,[it]:"invoke_agent"}},async d=>{try{const l=n?.name;l&&typeof l=="string"&&(d.setAttribute(uv,l),d.setAttribute(gi,l),d.updateName(`invoke_agent ${l}`)),u&&d.setAttribute(Ae,u);const h=(c.length>1?c[1]:void 0)?.configurable?.thread_id;if(h&&typeof h=="string"&&d.setAttribute(Lc,h),s){const E=c[1]??{};c[1]=E;const C=E.metadata??{};E.metadata={...C,__sentry_langgraph__:!0,...typeof l=="string"?{lc_agent_name:l}:{}},E.callbacks=FT(E.callbacks,s)}const m=VT(t);m&&d.setAttribute(vo,JSON.stringify(m));const y=r.recordInputs,_=r.recordOutputs,S=c.length>0?c[0]?.messages??[]:[];if(S&&y){const E=$c(S),{systemInstructions:C,filteredMessages:x}=To(E);C&&d.setAttribute(Eo,C);const v=Dt(r.enableTruncation),O=Array.isArray(x)?x.length:0;d.setAttributes({[Ar]:v?Mr(x):je(x),[On]:O})}const w=await Reflect.apply(i,a,c);return _&&YT(d,S??null,w),w}catch(l){throw d.setStatus({code:ne,message:"internal_error"}),l}})}})}function tO(e,t){if(Object.prototype.hasOwnProperty.call(e,Os))return e;const n=$n(t),r=bh(n),o=new Proxy(e,{apply(s,i,a){const c=HT(a),u=WT(a),d=a[0];d&&Array.isArray(d.tools)&&d.tools.length>0&&jT(d.tools,n,u??void 0),$a=!0;let l;try{l=Reflect.apply(s,i,a)}finally{$a=!1}const p=l.invoke;if(p&&typeof p=="function"){const f={};u&&(f.name=u),l.invoke=Eh(p.bind(l),l,f,n,c,r)}return l}});return Object.defineProperty(o,Os,{value:!0,enumerable:!1}),o}function XT(e,t){return e.compile=KT(e.compile,$n(t)),e}const nO=XT;function QT(e,t,n){const r=n.getOptions(),o=n.getDsn(),s=r.tunnel,i=go(r._metadata),a={sent_at:new Date(vt()).toISOString(),...ZT(t)&&{trace:t},...i&&{sdk:i},...!!s&&o&&{dsn:Tt(o)}},c=n.getDataCollectionOptions().userInfo?"auto":"never",u=[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Qt()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}];return Qe(a,[u])}function ZT(e){return!!e.trace_id&&!!e.public_key}function eI(e){let t=156;if(t+=e.name.length*2,t+=xu(e.attributes),e.links&&e.links.length>0){const r=e.links[0]?.attributes,o=100+(r?xu(r):0);t+=o*e.links.length}return t}const Hl=1e3,tI=5e6;class nI{constructor(t,n){this._traceBuckets=new Map,this._client=t;const{maxSpanLimit:r,flushInterval:o,maxTraceWeightInBytes:s}=n??{};this._maxSpanLimit=r&&r>0&&r<=Hl?r:Hl,this._flushInterval=o&&o>0?o:5e3,this._maxTraceWeight=s&&s>0?s:tI,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(i=>{clearTimeout(i.timeout)}),this._traceBuckets.clear()})}add(t){const n=t.trace_id;let r=this._traceBuckets.get(n);r||(r={spans:new Set,size:0,timeout:ci(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,r)),r.spans.add(t),r.size+=eI(t),(r.spans.size>=this._maxSpanLimit||r.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(I&&g.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){const n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}const r=Array.from(n.spans),o=r[0]?._segmentSpan;if(!o){I&&g.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}const s=ut(o),i=r.map(c=>{const{_segmentSpan:u,...d}=c;return d}),a=QT(i,s,this._client);I&&g.log(`Sending span envelope for trace ${t} with ${i.length} spans`),this._client.sendEnvelope(a).then(null,c=>{I&&g.error("Error while sending streamed span envelope:",c)}),this._removeTrace(t)}_removeTrace(t){const n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}}function vh(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const pr=$;function rI(){return"history"in pr&&!!pr.history}function oI(){if(!("fetch"in pr))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Ba(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Th(){if(typeof EdgeRuntime=="string")return!0;if(!oI())return!1;if(Ba(pr.fetch))return!0;let e=!1;const t=pr.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Ba(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}function sI(){return"ReportingObserver"in pr}function Si(e,t){const n="fetch",r=rn(n,e);return on(n,()=>Ih(void 0,t)),r}function iI(e){const t="fetch-body-resolved",n=rn(t,e);return on(t,()=>Ih(cI)),n}function Ih(e,t=!1){t&&!Th()||Ce($,"fetch",function(n){return function(...r){const o=new Error,{method:s,url:i}=uI(r),a={args:r,fetchData:{method:s,url:i},startTimestamp:_e()*1e3,virtualError:o,headers:lI(r)};return e||Ye("fetch",{...a}),n.apply($,r).then(async c=>(e?e(c):Ye("fetch",{...a,endTimestamp:_e()*1e3,response:c}),c),c=>{Ye("fetch",{...a,endTimestamp:_e()*1e3,error:c}),De(c)&&c.stack===void 0&&(c.stack=o.stack,Re(c,"framesToPop",1));const d=R()?.getOptions().enhanceFetchErrorMessages??"always";if(d!==!1&&De(c)&&c.name==="TypeError"&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const f=new URL(a.fetchData.url).host;d==="always"?c.message=`${c.message} (${f})`:Re(c,"__sentry_fetch_url_host__",f)}catch{}throw c})}})}async function aI(e,t){if(e?.body){const n=e.body,r=n.getReader(),o=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let s=!0;for(;s;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(i),a&&(t(),s=!1)}catch{s=!1}finally{clearTimeout(i)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,()=>{})}}function cI(e){let t;try{t=e.clone()}catch{return}aI(t,()=>{Ye("fetch-body-resolved",{endTimestamp:_e()*1e3,response:e})})}function is(e,t){return Je(e)&&!!e[t]}function Wl(e){return typeof e=="string"?e:e?is(e,"url")?e.url:e.toString?e.toString():"":""}function uI(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Wl(n),method:is(r,"method")?String(r.method).toUpperCase():dc(n)&&is(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:Wl(t),method:is(t,"method")?String(t.method).toUpperCase():"GET"}}function lI(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(dc(t))return new Headers(t.headers)}catch{}}const wh=$;function en(){try{return wh.document.location.href}catch{return""}}function Uc(e,t=5){if(!wh.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}const rt=$,ue=rt.document,Ur=rt.navigator,kh="Report a Bug",dI="Cancel",fI="Send Bug Report",pI="Confirm",hI="Report a Bug",mI="your.email@example.org",gI="Email",_I="What's the bug? What did you expect?",yI="Description",SI="Your Name",bI="Name",EI="Thank you for your report!",vI="(required)",TI="Add a screenshot",II="Remove screenshot",wI="Highlight",kI="Hide",RI="Remove",Rh="Unable to submit feedback with empty message",Ch="No client setup, cannot send feedback.",Ah="Unable to determine if Feedback was correctly sent.",Mh="Unable to send feedback. This could be because this domain is not in your list of allowed domains.",xh="Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.",CI="widget",AI="api",MI=5e3,xI={ERROR_EMPTY_MESSAGE:Rh,ERROR_NO_CLIENT:Ch,ERROR_TIMEOUT:Ah,ERROR_FORBIDDEN:Mh,ERROR_GENERIC:xh};function as(e,t){return t?.[e]??xI[e]}function jl(e,t){return new Error(as(e,t))}const NI=(e,t={includeReplay:!0})=>{const n=t.errorMessages;if(!e.message)throw jl("ERROR_EMPTY_MESSAGE",n);const r=R();if(!r)throw jl("ERROR_NO_CLIENT",n);e.tags&&Object.keys(e.tags).length&&q().setTags(e.tags);const o=WE({source:AI,url:en(),...e},t);return new Promise((s,i)=>{const a=setTimeout(()=>{c(),i(as("ERROR_TIMEOUT",n))},3e4),c=r.on("afterSendEvent",(u,d)=>{if(u.event_id===o)return clearTimeout(a),c(),d?.statusCode&&d.statusCode>=200&&d.statusCode<300?s(o):d?.statusCode===403?i(as("ERROR_FORBIDDEN",n)):i(as("ERROR_GENERIC",n))})})},cs=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function OI(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Ur.userAgent)||/Macintosh/i.test(Ur.userAgent)&&Ur.maxTouchPoints&&Ur.maxTouchPoints>1||!isSecureContext)}function Uo(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{t.onFormOpen?.(),e.onFormOpen?.()},onFormClose:()=>{t.onFormClose?.(),e.onFormClose?.()},onSubmitSuccess:(n,r)=>{t.onSubmitSuccess?.(n,r),e.onSubmitSuccess?.(n,r)},onSubmitError:n=>{t.onSubmitError?.(n),e.onSubmitError?.(n)},onFormSubmitted:()=>{t.onFormSubmitted?.(),e.onFormSubmitted?.()},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function LI(e){const t=ue.createElement("style");return t.textContent=`
19
+ .widget__actor {
20
+ position: fixed;
21
+ z-index: var(--z-index);
22
+ margin: var(--page-margin);
23
+ inset: var(--actor-inset);
24
+
25
+ display: flex;
26
+ align-items: center;
27
+ gap: 8px;
28
+ padding: 16px;
29
+
30
+ font-family: inherit;
31
+ font-size: var(--font-size);
32
+ font-weight: 600;
33
+ line-height: 1.14em;
34
+ text-decoration: none;
35
+
36
+ background: var(--actor-background, var(--background));
37
+ border-radius: var(--actor-border-radius, 1.7em/50%);
38
+ border: var(--actor-border, var(--border));
39
+ box-shadow: var(--actor-box-shadow, var(--box-shadow));
40
+ color: var(--actor-color, var(--foreground));
41
+ fill: var(--actor-color, var(--foreground));
42
+ cursor: pointer;
43
+ opacity: 1;
44
+ transition: transform 0.2s ease-in-out;
45
+ transform: translate(0, 0) scale(1);
46
+ }
47
+ .widget__actor[aria-hidden="true"] {
48
+ opacity: 0;
49
+ pointer-events: none;
50
+ visibility: hidden;
51
+ transform: translate(0, 16px) scale(0.98);
52
+ }
53
+
54
+ .widget__actor:hover {
55
+ background: var(--actor-hover-background, var(--background));
56
+ filter: var(--interactive-filter);
57
+ }
58
+
59
+ .widget__actor svg {
60
+ width: 1.14em;
61
+ height: 1.14em;
62
+ }
63
+
64
+ @media (max-width: 600px) {
65
+ .widget__actor span {
66
+ display: none;
67
+ }
68
+ }
69
+ `,e&&t.setAttribute("nonce",e),t}function He(e,t){return Object.entries(t).forEach(([n,r])=>{e.setAttributeNS(null,n,r)}),e}const zn=20,PI="http://www.w3.org/2000/svg";function DI(){const e=a=>rt.document.createElementNS(PI,a),t=He(e("svg"),{width:`${zn}`,height:`${zn}`,viewBox:`0 0 ${zn} ${zn}`,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 o=e("defs"),s=He(e("clipPath"),{id:"clip0_57_80"}),i=He(e("rect"),{width:`${zn}`,height:`${zn}`,fill:"white"});return s.appendChild(i),o.appendChild(s),t.appendChild(o).appendChild(s).appendChild(i),t}function FI({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){const o=ue.createElement("button");if(o.type="button",o.className="widget__actor",o.ariaHidden="false",o.ariaLabel=t||e||kh,o.appendChild(DI()),e){const i=ue.createElement("span");i.appendChild(ue.createTextNode(e)),o.appendChild(i)}const s=LI(r);return{el:o,appendToDom(){n.appendChild(s),n.appendChild(o)},removeFromDom(){o.remove(),s.remove()},show(){o.ariaHidden="false"},hide(){o.ariaHidden="true"}}}const Nh="rgba(88, 74, 192, 1)",$I={foreground:"#2b2233",background:"#ffffff",accentForeground:"white",accentBackground:Nh,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%)"},ql={foreground:"#ebe6ef",background:"#29232f",accentForeground:"white",accentBackground:Nh,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 zl(e){return`
70
+ --foreground: ${e.foreground};
71
+ --background: ${e.background};
72
+ --accent-foreground: ${e.accentForeground};
73
+ --accent-background: ${e.accentBackground};
74
+ --success-color: ${e.successColor};
75
+ --error-color: ${e.errorColor};
76
+ --border: ${e.border};
77
+ --box-shadow: ${e.boxShadow};
78
+ --outline: ${e.outline};
79
+ --interactive-filter: ${e.interactiveFilter};
80
+ `}function Gl({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){const o=ue.createElement("style");return o.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
+ ${zl(e==="dark"?{...ql,...t}:{...$I,...n})}
96
+ }
97
+
98
+ ${e==="system"?`
99
+ @media (prefers-color-scheme: dark) {
100
+ :host {
101
+ color-scheme: only dark;
102
+
103
+ ${zl({...ql,...t})}
104
+ }
105
+ }`:""}
106
+ `,r&&o.setAttribute("nonce",r),o}const Oh=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:o="sentry-feedback",autoInject:s=!0,showBranding:i=!0,isEmailRequired:a=!1,isNameRequired:c=!1,showEmail:u=!0,showName:d=!0,enableScreenshot:l=!0,useSentryUser:p={email:"email",name:"username"},tags:f,styleNonce:h,scriptNonce:m,colorScheme:y="system",themeLight:_={},themeDark:S={},addScreenshotButtonLabel:w=TI,cancelButtonLabel:E=dI,confirmButtonLabel:C=pI,emailLabel:x=gI,emailPlaceholder:v=mI,formTitle:O=hI,isRequiredLabel:k=vI,messageLabel:b=yI,messagePlaceholder:N=_I,nameLabel:A=bI,namePlaceholder:L=SI,removeScreenshotButtonLabel:j=II,submitButtonLabel:X=fI,successMessageText:G=EI,triggerLabel:B=kh,triggerAriaLabel:M="",highlightToolText:U=wI,hideToolText:D=kI,removeHighlightText:Q=RI,errorEmptyMessageText:se=Rh,errorNoClientText:te=Ch,errorTimeoutText:ie=Ah,errorForbiddenText:qe=Mh,errorGenericText:et=xh,onFormOpen:wt,onFormClose:tt,onSubmitSuccess:un,onSubmitError:kt,onFormSubmitted:Po}={})=>{const Rt={id:o,autoInject:s,showBranding:i,isEmailRequired:a,isNameRequired:c,showEmail:u,showName:d,enableScreenshot:l,useSentryUser:p,tags:f,styleNonce:h,scriptNonce:m,colorScheme:y,themeDark:S,themeLight:_,triggerLabel:B,triggerAriaLabel:M,cancelButtonLabel:E,submitButtonLabel:X,confirmButtonLabel:C,formTitle:O,emailLabel:x,emailPlaceholder:v,messageLabel:b,messagePlaceholder:N,nameLabel:A,namePlaceholder:L,successMessageText:G,isRequiredLabel:k,addScreenshotButtonLabel:w,removeScreenshotButtonLabel:j,highlightToolText:U,hideToolText:D,removeHighlightText:Q,errorEmptyMessageText:se,errorNoClientText:te,errorTimeoutText:ie,errorForbiddenText:qe,errorGenericText:et,onFormClose:tt,onFormOpen:wt,onSubmitError:kt,onSubmitSuccess:un,onFormSubmitted:Po};let ze=null,Ne=null,$e=[];const Hn=F=>{if(!ze){const ae=ue.createElement("div");ae.id=String(F.id),ue.body.appendChild(ae),ze=ae.attachShadow({mode:"open"}),Ne=Gl(F),ze.appendChild(Ne)}return ze},Wn=async F=>{const ae=F.enableScreenshot&&OI();let K,ce;try{K=(t?t():await e("feedbackModalIntegration",m))(),rl(K)}catch{throw cs&&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 pn=ae?n?n():await e("feedbackScreenshotIntegration",m):void 0;pn&&(ce=pn(),rl(ce))}catch{cs&&g.error("[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.")}const Y={ERROR_EMPTY_MESSAGE:F.errorEmptyMessageText,ERROR_NO_CLIENT:F.errorNoClientText,ERROR_TIMEOUT:F.errorTimeoutText,ERROR_FORBIDDEN:F.errorForbiddenText,ERROR_GENERIC:F.errorGenericText},lt=(pn,kg)=>NI(pn,{includeReplay:!0,...kg,errorMessages:Y}),fn=K.createDialog({options:{...F,onFormClose:()=>{fn?.close(),F.onFormClose?.()},onFormSubmitted:()=>{fn?.close(),F.onFormSubmitted?.()}},screenshotIntegration:ce,sendFeedback:lt,shadow:Hn(F)});return fn},ln=(F,ae={})=>{const K=Uo(Rt,ae),ce=typeof F=="string"?ue.querySelector(F):typeof F.addEventListener=="function"?F:null;if(!ce)throw cs&&g.error("[Feedback] Unable to attach to target element"),new Error("Unable to attach to target element");let Y=null;const lt=async()=>{Y||(Y=await Wn({...K,onFormSubmitted:()=>{Y?.removeFromDom(),K.onFormSubmitted?.()}})),Y.appendToDom(),Y.open()};ce.addEventListener("click",lt);const fn=()=>{$e=$e.filter(pn=>pn!==fn),Y?.removeFromDom(),Y=null,ce.removeEventListener("click",lt)};return $e.push(fn),fn},dn=(F={})=>{const ae=Uo(Rt,F),K=Hn(ae),ce=FI({triggerLabel:ae.triggerLabel,triggerAriaLabel:ae.triggerAriaLabel,shadow:K,styleNonce:h});return ln(ce.el,{...ae,onFormOpen(){ce.hide()},onFormClose(){ce.show()},onFormSubmitted(){ce.show()}}),ce};return{name:"Feedback",setupOnce(){!Qt()||!Rt.autoInject||(ue.readyState==="loading"?ue.addEventListener("DOMContentLoaded",()=>dn().appendToDom()):dn().appendToDom())},attachTo:ln,createWidget(F={}){const ae=dn(Uo(Rt,F));return ae.appendToDom(),ae},async createForm(F={}){return Wn(Uo(Rt,F))},setTheme(F){if(Rt.colorScheme=F,ze){const ae=Gl(Rt);Ne?ze.replaceChild(ae,Ne):ze.prepend(ae),Ne=ae}},remove(){ze&&(ze.parentElement?.remove(),ze=null,Ne=null),$e.forEach(F=>F()),$e=[]}}});function rO(){return R()?.getIntegrationByName("Feedback")}var bi,de,Lh,yn,Vl,Ph,Ua,to={},Hc=[],BI=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Wc=Array.isArray;function Gt(e,t){for(var n in t)e[n]=t[n];return e}function Dh(e){var t=e.parentNode;t&&t.removeChild(e)}function ee(e,t,n){var r,o,s,i={};for(s in t)s=="key"?r=t[s]:s=="ref"?o=t[s]:i[s]=t[s];if(arguments.length>2&&(i.children=arguments.length>3?bi.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(s in e.defaultProps)i[s]===void 0&&(i[s]=e.defaultProps[s]);return us(e,i,r,o,null)}function us(e,t,n,r,o){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:o??++Lh,__i:-1,__u:0};return o==null&&de.vnode!=null&&de.vnode(s),s}function Io(e){return e.children}function ls(e,t){this.props=e,this.context=t}function hr(e,t){if(t==null)return e.__?hr(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"?hr(e):null}function UI(e,t,n){var r,o=e.__v,s=o.__e,i=e.__P;if(i)return(r=Gt({},o)).__v=o.__v+1,de.vnode&&de.vnode(r),jc(i,r,o,e.__n,i.ownerSVGElement!==void 0,32&o.__u?[s]:null,t,s??hr(o),!!(32&o.__u),n),r.__.__k[r.__i]=r,r.__d=void 0,r.__e!=s&&Fh(r),r}function Fh(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 Fh(e)}}function Yl(e){(!e.__d&&(e.__d=!0)&&yn.push(e)&&!Ls.__r++||Vl!==de.debounceRendering)&&((Vl=de.debounceRendering)||Ph)(Ls)}function Ls(){var e,t,n,r=[],o=[];for(yn.sort(Ua);e=yn.shift();)e.__d&&(n=yn.length,t=UI(e,r,o)||t,n===0||yn.length>n?(Ha(r,t,o),o.length=r.length=0,t=void 0,yn.sort(Ua)):t&&de.__c&&de.__c(t,Hc));t&&Ha(r,t,o),Ls.__r=0}function $h(e,t,n,r,o,s,i,a,c,u,d){var l,p,f,h,m,y=r&&r.__k||Hc,_=t.length;for(n.__d=c,HI(n,t,y),c=n.__d,l=0;l<_;l++)(f=n.__k[l])!=null&&typeof f!="boolean"&&typeof f!="function"&&(p=f.__i===-1?to:y[f.__i]||to,f.__i=l,jc(e,f,p,o,s,i,a,c,u,d),h=f.__e,f.ref&&p.ref!=f.ref&&(p.ref&&qc(p.ref,null,f),d.push(f.ref,f.__c||h,f)),m==null&&h!=null&&(m=h),65536&f.__u||p.__k===f.__k?c=Bh(f,c,e):typeof f.type=="function"&&f.__d!==void 0?c=f.__d:h&&(c=h.nextSibling),f.__d=void 0,f.__u&=-196609);n.__d=c,n.__e=m}function HI(e,t,n){var r,o,s,i,a,c=t.length,u=n.length,d=u,l=0;for(e.__k=[],r=0;r<c;r++)(o=e.__k[r]=(o=t[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?us(null,o,null,null,o):Wc(o)?us(Io,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?us(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=e,o.__b=e.__b+1,a=WI(o,n,i=r+l,d),o.__i=a,s=null,a!==-1&&(d--,(s=n[a])&&(s.__u|=131072)),s==null||s.__v===null?(a==-1&&l--,typeof o.type!="function"&&(o.__u|=65536)):a!==i&&(a===i+1?l++:a>i?d>c-i?l+=a-i:l--:l=a<i&&a==i-1?a-i:0,a!==r+l&&(o.__u|=65536))):(s=n[r])&&s.key==null&&s.__e&&(s.__e==e.__d&&(e.__d=hr(s)),Wa(s,s,!1),n[r]=null,d--);if(d)for(r=0;r<u;r++)(s=n[r])!=null&&(131072&s.__u)==0&&(s.__e==e.__d&&(e.__d=hr(s)),Wa(s,s))}function Bh(e,t,n){var r,o;if(typeof e.type=="function"){for(r=e.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=e,t=Bh(r[o],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}function WI(e,t,n,r){var o=e.key,s=e.type,i=n-1,a=n+1,c=t[n];if(c===null||c&&o==c.key&&s===c.type)return n;if(r>(c!=null&&(131072&c.__u)==0?1:0))for(;i>=0||a<t.length;){if(i>=0){if((c=t[i])&&(131072&c.__u)==0&&o==c.key&&s===c.type)return i;i--}if(a<t.length){if((c=t[a])&&(131072&c.__u)==0&&o==c.key&&s===c.type)return a;a++}}return-1}function Jl(e,t,n){t[0]==="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||BI.test(t)?n:n+"px"}function Ho(e,t,n,r,o){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||Jl(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||Jl(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?Xl:Kl,s)):e.removeEventListener(t,s?Xl:Kl,s);else{if(o)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))}}function Kl(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(de.event?de.event(e):e)}}function Xl(e){if(this.l)return this.l[e.type+!0](de.event?de.event(e):e)}function jc(e,t,n,r,o,s,i,a,c,u){var d,l,p,f,h,m,y,_,S,w,E,C,x,v,O,k=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),s=[a=t.__e=n.__e]),(d=de.__b)&&d(t);e:if(typeof k=="function")try{if(_=t.props,S=(d=k.contextType)&&r[d.__c],w=d?S?S.props.value:d.__:r,n.__c?y=(l=t.__c=n.__c).__=l.__E:("prototype"in k&&k.prototype.render?t.__c=l=new k(_,w):(t.__c=l=new ls(_,w),l.constructor=k,l.render=qI),S&&S.sub(l),l.props=_,l.state||(l.state={}),l.context=w,l.__n=r,p=l.__d=!0,l.__h=[],l._sb=[]),l.__s==null&&(l.__s=l.state),k.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=Gt({},l.__s)),Gt(l.__s,k.getDerivedStateFromProps(_,l.__s))),f=l.props,h=l.state,l.__v=t,p)k.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(k.getDerivedStateFromProps==null&&_!==f&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(_,w),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(_,l.__s,w)===!1||t.__v===n.__v)){for(t.__v!==n.__v&&(l.props=_,l.state=l.__s,l.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(b){b&&(b.__=t)}),E=0;E<l._sb.length;E++)l.__h.push(l._sb[E]);l._sb=[],l.__h.length&&i.push(l);break e}l.componentWillUpdate!=null&&l.componentWillUpdate(_,l.__s,w),l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(f,h,m)})}if(l.context=w,l.props=_,l.__P=e,l.__e=!1,C=de.__r,x=0,"prototype"in k&&k.prototype.render){for(l.state=l.__s,l.__d=!1,C&&C(t),d=l.render(l.props,l.state,l.context),v=0;v<l._sb.length;v++)l.__h.push(l._sb[v]);l._sb=[]}else do l.__d=!1,C&&C(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++x<25);l.state=l.__s,l.getChildContext!=null&&(r=Gt(Gt({},r),l.getChildContext())),p||l.getSnapshotBeforeUpdate==null||(m=l.getSnapshotBeforeUpdate(f,h)),$h(e,Wc(O=d!=null&&d.type===Io&&d.key==null?d.props.children:d)?O:[O],t,n,r,o,s,i,a,c,u),l.base=t.__e,t.__u&=-161,l.__h.length&&i.push(l),y&&(l.__E=l.__=null)}catch(b){t.__v=null,c||s!=null?(t.__e=a,t.__u|=c?160:32,s[s.indexOf(a)]=null):(t.__e=n.__e,t.__k=n.__k),de.__e(b,t,n)}else s==null&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=jI(n.__e,t,n,r,o,s,i,c,u);(d=de.diffed)&&d(t)}function Ha(e,t,n){for(var r=0;r<n.length;r++)qc(n[r],n[++r],n[++r]);de.__c&&de.__c(t,e),e.some(function(o){try{e=o.__h,o.__h=[],e.some(function(s){s.call(o)})}catch(s){de.__e(s,o.__v)}})}function jI(e,t,n,r,o,s,i,a,c){var u,d,l,p,f,h,m,y=n.props,_=t.props,S=t.type;if(S==="svg"&&(o=!0),s!=null){for(u=0;u<s.length;u++)if((f=s[u])&&"setAttribute"in f==!!S&&(S?f.localName===S:f.nodeType===3)){e=f,s[u]=null;break}}if(e==null){if(S===null)return document.createTextNode(_);e=o?document.createElementNS("http://www.w3.org/2000/svg",S):document.createElement(S,_.is&&_),s=null,a=!1}if(S===null)y===_||a&&e.data===_||(e.data=_);else{if(s=s&&bi.call(e.childNodes),y=n.props||to,!a&&s!=null)for(y={},u=0;u<e.attributes.length;u++)y[(f=e.attributes[u]).name]=f.value;for(u in y)f=y[u],u=="children"||(u=="dangerouslySetInnerHTML"?l=f:u==="key"||u in _||Ho(e,u,null,f,o));for(u in _)f=_[u],u=="children"?p=f:u=="dangerouslySetInnerHTML"?d=f:u=="value"?h=f:u=="checked"?m=f:u==="key"||a&&typeof f!="function"||y[u]===f||Ho(e,u,f,y[u],o);if(d)a||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),$h(e,Wc(p)?p:[p],t,n,r,o&&S!=="foreignObject",s,i,s?s[0]:n.__k&&hr(n,0),a,c),s!=null)for(u=s.length;u--;)s[u]!=null&&Dh(s[u]);a||(u="value",h!==void 0&&(h!==e[u]||S==="progress"&&!h||S==="option"&&h!==y[u])&&Ho(e,u,h,y[u],!1),u="checked",m!==void 0&&m!==e[u]&&Ho(e,u,m,y[u],!1))}return e}function qc(e,t,n){try{typeof e=="function"?e(t):e.current=t}catch(r){de.__e(r,n)}}function Wa(e,t,n){var r,o;if(de.unmount&&de.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||qc(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(s){de.__e(s,t)}r.base=r.__P=null,e.__c=void 0}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&Wa(r[o],t,n||typeof e.type!="function");n||e.__e==null||Dh(e.__e),e.__=e.__e=e.__d=void 0}function qI(e,t,n){return this.constructor(e,n)}function zI(e,t,n){var r,o,s,i;de.__&&de.__(e,t),o=(r=!1)?null:t.__k,s=[],i=[],jc(t,e=t.__k=ee(Io,null,[e]),o||to,to,t.ownerSVGElement!==void 0,o?null:t.firstChild?bi.call(t.childNodes):null,s,o?o.__e:t.firstChild,r,i),e.__d=void 0,Ha(s,e,i)}bi=Hc.slice,de={__e:function(e,t,n,r){for(var o,s,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((s=o.constructor)&&s.getDerivedStateFromError!=null&&(o.setState(s.getDerivedStateFromError(e)),i=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(a){e=a}throw e}},Lh=0,ls.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=Gt({},this.state),typeof e=="function"&&(e=e(Gt({},n),this.props)),e&&Gt(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Yl(this))},ls.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Yl(this))},ls.prototype.render=Io,yn=[],Ph=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Ua=function(e,t){return e.__v.__b-t.__v.__b},Ls.__r=0;var Ft,le,na,Ql,mr=0,Uh=[],ds=[],ye=de,Zl=ye.__b,ed=ye.__r,td=ye.diffed,nd=ye.__c,rd=ye.unmount,od=ye.__;function Bn(e,t){ye.__h&&ye.__h(le,e,mr||t),mr=0;var n=le.__H||(le.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:ds}),n.__[e]}function Sn(e){return mr=1,Hh(jh,e)}function Hh(e,t,n){var r=Bn(Ft++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):jh(void 0,t),function(a){var c=r.__N?r.__N[0]:r.__[0],u=r.t(c,a);c!==u&&(r.__N=[u,r.__[1]],r.__c.setState({}))}],r.__c=le,!le.u)){var o=function(a,c,u){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(p){return!!p.__c});if(d.every(function(p){return!p.__N}))return!s||s.call(this,a,c,u);var l=!1;return d.forEach(function(p){if(p.__N){var f=p.__[0];p.__=p.__N,p.__N=void 0,f!==p.__[0]&&(l=!0)}}),!(!l&&r.__c.props===a)&&(!s||s.call(this,a,c,u))};le.u=!0;var s=le.shouldComponentUpdate,i=le.componentWillUpdate;le.componentWillUpdate=function(a,c,u){if(this.__e){var d=s;s=void 0,o(a,c,u),s=d}i&&i.call(this,a,c,u)},le.shouldComponentUpdate=o}return r.__N||r.__}function GI(e,t){var n=Bn(Ft++,3);!ye.__s&&zc(n.__H,t)&&(n.__=e,n.i=t,le.__H.__h.push(n))}function Wh(e,t){var n=Bn(Ft++,4);!ye.__s&&zc(n.__H,t)&&(n.__=e,n.i=t,le.__h.push(n))}function VI(e){return mr=5,wo(function(){return{current:e}},[])}function YI(e,t,n){mr=6,Wh(function(){return typeof e=="function"?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},n==null?n:n.concat(e))}function wo(e,t){var n=Bn(Ft++,7);return zc(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function sr(e,t){return mr=8,wo(function(){return e},t)}function JI(e){var t=le.context[e.__c],n=Bn(Ft++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(le)),t.props.value):e.__}function KI(e,t){ye.useDebugValue&&ye.useDebugValue(t?t(e):e)}function XI(e){var t=Bn(Ft++,10),n=Sn();return t.__=e,le.componentDidCatch||(le.componentDidCatch=function(r,o){t.__&&t.__(r,o),n[1](r)}),[n[0],function(){n[1](void 0)}]}function QI(){var e=Bn(Ft++,11);if(!e.__){for(var t=le.__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.__}function ZI(){for(var e;e=Uh.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(fs),e.__H.__h.forEach(ja),e.__H.__h=[]}catch(t){e.__H.__h=[],ye.__e(t,e.__v)}}ye.__b=function(e){le=null,Zl&&Zl(e)},ye.__=function(e,t){t.__k&&t.__k.__m&&(e.__m=t.__k.__m),od&&od(e,t)},ye.__r=function(e){ed&&ed(e),Ft=0;var t=(le=e.__c).__H;t&&(na===le?(t.__h=[],le.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=ds,n.__N=n.i=void 0})):(t.__h.forEach(fs),t.__h.forEach(ja),t.__h=[],Ft=0)),na=le},ye.diffed=function(e){td&&td(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Uh.push(t)!==1&&Ql===ye.requestAnimationFrame||((Ql=ye.requestAnimationFrame)||e0)(ZI)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==ds&&(n.__=n.__V),n.i=void 0,n.__V=ds})),na=le=null},ye.__c=function(e,t){t.some(function(n){try{n.__h.forEach(fs),n.__h=n.__h.filter(function(r){return!r.__||ja(r)})}catch(r){t.some(function(o){o.__h&&(o.__h=[])}),t=[],ye.__e(r,n.__v)}}),nd&&nd(e,t)},ye.unmount=function(e){rd&&rd(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{fs(r)}catch(o){t=o}}),n.__H=void 0,t&&ye.__e(t,n.__v))};var sd=typeof requestAnimationFrame=="function";function e0(e){var t,n=function(){clearTimeout(r),sd&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);sd&&(t=requestAnimationFrame(n))}function fs(e){var t=le,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),le=t}function ja(e){var t=le;e.__c=e.__(),le=t}function zc(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function jh(e,t){return typeof t=="function"?t(e):t}const t0=Object.defineProperty({__proto__:null,useCallback:sr,useContext:JI,useDebugValue:KI,useEffect:GI,useErrorBoundary:XI,useId:QI,useImperativeHandle:YI,useLayoutEffect:Wh,useMemo:wo,useReducer:Hh,useRef:VI,useState:Sn},Symbol.toStringTag,{value:"Module"}),n0="http://www.w3.org/2000/svg";function r0(){const e=r=>ue.createElementNS(n0,r),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}function o0({options:e}){const t=wo(()=>({__html:r0().outerHTML}),[]);return ee("h2",{class:"dialog__header"},ee("span",{class:"dialog__title"},e.formTitle),e.showBranding?ee("a",{class:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer",dangerouslySetInnerHTML:t}):null)}function s0(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}function ra(e,t){const n=e.get(t);return typeof n=="string"?n.trim():""}function i0({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:o,onSubmitSuccess:s,onSubmitError:i,showEmail:a,showName:c,screenshotInput:u}){const{tags:d,addScreenshotButtonLabel:l,removeScreenshotButtonLabel:p,cancelButtonLabel:f,emailLabel:h,emailPlaceholder:m,isEmailRequired:y,isNameRequired:_,messageLabel:S,messagePlaceholder:w,nameLabel:E,namePlaceholder:C,submitButtonLabel:x,isRequiredLabel:v}=e,[O,k]=Sn(!1),[b,N]=Sn(null),[A,L]=Sn(!1),j=u?.input,[X,G]=Sn(null),B=sr(D=>{G(D),L(!1)},[]),M=sr(D=>{const Q=s0(D,{emailLabel:h,isEmailRequired:y,isNameRequired:_,messageLabel:S,nameLabel:E});return Q.length>0?N(`Please enter in the following required fields: ${Q.join(", ")}`):N(null),Q.length===0},[h,y,_,S,E]),U=sr(async D=>{k(!0);try{if(D.preventDefault(),!(D.target instanceof HTMLFormElement))return;const Q=new FormData(D.target),se=await(u&&A?u.value():void 0),te={name:ra(Q,"name"),email:ra(Q,"email"),message:ra(Q,"message"),attachments:se?[se]:void 0};if(!M(te))return;try{const ie=await o({name:te.name,email:te.email,message:te.message,source:CI,tags:d},{attachments:te.attachments});s(te,ie)}catch(ie){cs&&g.error(ie);const qe=ie instanceof Error?ie:new Error(String(ie));N(qe.message),i(qe)}}finally{k(!1)}},[u&&A,s,i]);return ee("form",{class:"form",onSubmit:U},j&&A?ee(j,{onError:B}):null,ee("fieldset",{class:"form__right","data-sentry-feedback":!0,disabled:O},ee("div",{class:"form__top"},b?ee("div",{class:"form__error-container"},b):null,c?ee("label",{for:"name",class:"form__label"},ee(oa,{label:E,isRequiredLabel:v,isRequired:_}),ee("input",{class:"form__input",defaultValue:n,id:"name",name:"name",placeholder:C,required:_,type:"text"})):ee("input",{"aria-hidden":!0,value:n,name:"name",type:"hidden"}),a?ee("label",{for:"email",class:"form__label"},ee(oa,{label:h,isRequiredLabel:v,isRequired:y}),ee("input",{class:"form__input",defaultValue:t,id:"email",name:"email",placeholder:m,required:y,type:"email"})):ee("input",{"aria-hidden":!0,value:t,name:"email",type:"hidden"}),ee("label",{for:"message",class:"form__label"},ee(oa,{label:S,isRequiredLabel:v,isRequired:!0}),ee("textarea",{autoFocus:!0,class:"form__input form__input--textarea",id:"message",name:"message",placeholder:w,required:!0,rows:5})),j?ee("label",{for:"screenshot",class:"form__label"},ee("button",{class:"btn btn--default",disabled:O,type:"button",onClick:()=>{G(null),L(D=>!D)}},A?p:l),X?ee("div",{class:"form__error-container"},X.message):null):null),ee("div",{class:"btn-group"},ee("button",{class:"btn btn--primary",disabled:O,type:"submit"},x),ee("button",{class:"btn btn--default",disabled:O,type:"button",onClick:r},f))))}function oa({label:e,isRequired:t,isRequiredLabel:n}){return ee("span",{class:"form__label__text"},e,t&&ee("span",{class:"form__label__text--required"},n))}const Wo=16,id=17,a0="http://www.w3.org/2000/svg";function c0(){const e=c=>rt.document.createElementNS(a0,c),t=He(e("svg"),{width:`${Wo}`,height:`${id}`,viewBox:`0 0 ${Wo} ${id}`,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"}),o=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(o,r);const s=e("defs"),i=He(e("clipPath"),{id:"clip0_57_156"}),a=He(e("rect"),{width:`${Wo}`,height:`${Wo}`,fill:"white",transform:"translate(0 0.5)"});return i.appendChild(a),s.appendChild(i),t.appendChild(s).appendChild(i).appendChild(a),t}function u0({open:e,onFormSubmitted:t,...n}){const r=n.options,o=wo(()=>({__html:c0().outerHTML}),[]),[s,i]=Sn(null),a=sr(()=>{s&&(clearTimeout(s),i(null)),t()},[s]),c=sr((u,d)=>{n.onSubmitSuccess(u,d),i(setTimeout(()=>{t(),i(null)},MI))},[t]);return ee(Io,null,s?ee("div",{class:"success__position",onClick:a},ee("div",{class:"success__content"},r.successMessageText,ee("span",{class:"success__icon",dangerouslySetInnerHTML:o}))):ee("dialog",{class:"dialog",onClick:r.onFormClose,open:e},ee("div",{class:"dialog__position"},ee("div",{class:"dialog__content",onClick:u=>{u.stopPropagation()}},ee(o0,{options:r}),ee(i0,{...n,onSubmitSuccess:c})))))}const l0=`
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
+ `,d0=`
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
+ `,f0=`
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
+ `,p0=`
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
+ `,h0=`
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 m0(e){const t=ue.createElement("style");return t.textContent=`
387
+ :host {
388
+ --dialog-inset: var(--inset);
389
+ }
390
+
391
+ ${l0}
392
+ ${d0}
393
+ ${f0}
394
+ ${p0}
395
+ ${h0}
396
+ `,e&&t.setAttribute("nonce",e),t}function g0(){const e=q().getUser(),t=me().getUser(),n=Wr().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}const _0=(()=>({name:"FeedbackModal",setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{const o=r,s=e.useSentryUser,i=g0(),a=ue.createElement("div"),c=m0(e.styleNonce);let u="";const d={get el(){return a},appendToDom(){!o.contains(c)&&!o.contains(a)&&(o.appendChild(c),o.appendChild(a))},removeFromDom(){a.remove(),c.remove(),ue.body.style.overflow=u},open(){p(!0),e.onFormOpen?.(),R()?.emit("openFeedbackWidget"),u=ue.body.style.overflow,ue.body.style.overflow="hidden"},close(){p(!1),ue.body.style.overflow=u}},l=t?.createInput({h:ee,hooks:t0,dialog:d,options:e}),p=f=>{zI(ee(u0,{options:e,screenshotInput:l,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(s&&i?.[s.name]||""),defaultEmail:String(s&&i?.[s.email]||""),onFormClose:()=>{p(!1),e.onFormClose?.()},onSubmit:n,onSubmitSuccess:(h,m)=>{p(!1),e.onSubmitSuccess?.(h,m)},onSubmitError:h=>{e.onSubmitError?.(h)},onFormSubmitted:()=>{e.onFormSubmitted?.()},open:f}),a)};return d}}));function y0({h:e}){return function(){return e("svg",{"data-test-id":"icon-close",viewBox:"0 0 16 16",fill:"#2B2233",height:"25px",width:"25px"},e("circle",{r:"7",cx:"8",cy:"8",fill:"white"}),e("path",{strokeWidth:"1.5",d:"M8,16a8,8,0,1,1,8-8A8,8,0,0,1,8,16ZM8,1.53A6.47,6.47,0,1,0,14.47,8,6.47,6.47,0,0,0,8,1.53Z"}),e("path",{strokeWidth:"1.5",d:"M5.34,11.41a.71.71,0,0,1-.53-.22.74.74,0,0,1,0-1.06l5.32-5.32a.75.75,0,0,1,1.06,1.06L5.87,11.19A.74.74,0,0,1,5.34,11.41Z"}),e("path",{strokeWidth:"1.5",d:"M10.66,11.41a.74.74,0,0,1-.53-.22L4.81,5.87A.75.75,0,0,1,5.87,4.81l5.32,5.32a.74.74,0,0,1,0,1.06A.71.71,0,0,1,10.66,11.41Z"}))}}function S0(e){const t=ue.createElement("style"),n="#1A141F",r="#302735";return t.textContent=`
397
+ .editor {
398
+ display: flex;
399
+ flex-grow: 1;
400
+ flex-direction: column;
401
+ }
402
+
403
+ .editor__image-container {
404
+ justify-items: center;
405
+ padding: 15px;
406
+ position: relative;
407
+ height: 100%;
408
+ border-radius: var(--menu-border-radius, 6px);
409
+
410
+ background-color: ${n};
411
+ background-image: repeating-linear-gradient(
412
+ -145deg,
413
+ transparent,
414
+ transparent 8px,
415
+ ${n} 8px,
416
+ ${n} 11px
417
+ ),
418
+ repeating-linear-gradient(
419
+ -45deg,
420
+ transparent,
421
+ transparent 15px,
422
+ ${r} 15px,
423
+ ${r} 16px
424
+ );
425
+ }
426
+
427
+ .editor__canvas-container {
428
+ width: 100%;
429
+ height: 100%;
430
+ position: relative;
431
+ display: flex;
432
+ align-items: center;
433
+ justify-content: center;
434
+ }
435
+
436
+ .editor__canvas-container > * {
437
+ object-fit: contain;
438
+ position: absolute;
439
+ }
440
+
441
+ .editor__tool-container {
442
+ padding-top: 8px;
443
+ display: flex;
444
+ justify-content: center;
445
+ }
446
+
447
+ .editor__tool-bar {
448
+ display: flex;
449
+ gap: 8px;
450
+ }
451
+
452
+ .editor__tool {
453
+ display: flex;
454
+ padding: 8px 12px;
455
+ justify-content: center;
456
+ align-items: center;
457
+ border: var(--button-border, var(--border));
458
+ border-radius: var(--button-border-radius, 6px);
459
+ background: var(--button-background, var(--background));
460
+ color: var(--button-color, var(--foreground));
461
+ }
462
+
463
+ .editor__tool--active {
464
+ background: var(--button-primary-background, var(--accent-background));
465
+ color: var(--button-primary-color, var(--accent-foreground));
466
+ }
467
+
468
+ .editor__rect {
469
+ position: absolute;
470
+ z-index: 2;
471
+ }
472
+
473
+ .editor__rect button {
474
+ opacity: 0;
475
+ position: absolute;
476
+ top: -12px;
477
+ right: -12px;
478
+ cursor: pointer;
479
+ padding: 0;
480
+ z-index: 3;
481
+ border: none;
482
+ background: none;
483
+ }
484
+
485
+ .editor__rect:hover button {
486
+ opacity: 1;
487
+ }
488
+ `,e&&t.setAttribute("nonce",e),t}function b0({h:e}){return function({action:n,setAction:r,options:o}){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:()=>{r(n==="highlight"?"":"highlight")}},o.highlightToolText),e("button",{type:"button",class:`editor__tool ${n==="hide"?"editor__tool--active":""}`,onClick:()=>{r(n==="hide"?"":"hide")}},o.hideToolText)))}}function E0({hooks:e}){function t(){const[n,r]=e.useState(rt.devicePixelRatio??1);return e.useEffect(()=>{const o=()=>{r(rt.devicePixelRatio)},s=matchMedia(`(resolution: ${rt.devicePixelRatio}dppx)`);return s.addEventListener("change",o),()=>{s.removeEventListener("change",o)}},[]),n}return function({onBeforeScreenshot:r,onScreenshot:o,onAfterScreenshot:s,onError:i}){const a=t();e.useEffect(()=>{(async()=>{r();const u=await Ur.mediaDevices.getDisplayMedia({video:{width:rt.innerWidth*a,height:rt.innerHeight*a},audio:!1,monitorTypeSurfaces:"exclude",preferCurrentTab:!0,selfBrowserSurface:"include",surfaceSwitching:"exclude"}),d=ue.createElement("video");await new Promise((l,p)=>{d.srcObject=u,d.onloadedmetadata=()=>{o(d,a),u.getTracks().forEach(f=>f.stop()),l()},d.play().catch(p)}),s()})().catch(i)},[])}}function v0(e,t,n){switch(e.type){case"highlight":{t.shadowColor="rgba(0, 0, 0, 0.7)",t.shadowBlur=50,t.fillStyle=n,t.fillRect(e.x-1,e.y-1,e.w+2,e.h+2),t.clearRect(e.x,e.y,e.w,e.h);break}case"hide":t.fillStyle="rgb(0, 0, 0)",t.fillRect(e.x,e.y,e.w,e.h);break}}function Wt(e,t,n){if(!e)return;const r=e.getContext("2d",t);r&&n(e,r)}function sa(e,t){Wt(e,{alpha:!0},(n,r)=>{r.drawImage(t,0,0,t.width,t.height,0,0,n.width,n.height)})}function ia(e,t,n){Wt(e,{alpha:!0},(r,o)=>{n.length&&(o.fillStyle="rgba(0, 0, 0, 0.25)",o.fillRect(0,0,r.width,r.height)),n.forEach(s=>{v0(s,o,t)})})}function T0({h:e,hooks:t,outputBuffer:n,dialog:r,options:o}){const s=E0({hooks:t}),i=b0({h:e}),a=y0({h:e}),c={__html:S0(o.styleNonce).innerText},u=r.el.style,d=({screenshot:l})=>{const[p,f]=t.useState("highlight"),[h,m]=t.useState([]),y=t.useRef(null),_=t.useRef(null),S=t.useRef(null),w=t.useRef(null),[E,C]=t.useState(1),x=t.useMemo(()=>{const A=ue.getElementById(o.id);if(!A)return"white";const L=getComputedStyle(A);return L.getPropertyValue("--button-primary-background")||L.getPropertyValue("--accent-background")},[o.id]);t.useLayoutEffect(()=>{const A=()=>{const L=y.current;L&&(Wt(l.canvas,{alpha:!1},j=>{const X=Math.min(L.clientWidth/j.width,L.clientHeight/j.height);C(X)}),(L.clientHeight===0||L.clientWidth===0)&&setTimeout(A,0))};return A(),rt.addEventListener("resize",A),()=>{rt.removeEventListener("resize",A)}},[l]);const v=t.useCallback((A,L)=>{Wt(A,{alpha:!0},(j,X)=>{X.scale(L,L),j.width=l.canvas.width,j.height=l.canvas.height})},[l]);t.useEffect(()=>{v(_.current,l.dpi),sa(_.current,l.canvas)},[l]),t.useEffect(()=>{v(S.current,l.dpi),Wt(S.current,{alpha:!0},(A,L)=>{L.clearRect(0,0,A.width,A.height)}),ia(S.current,x,h)},[h,x]),t.useEffect(()=>{v(n,l.dpi),sa(n,l.canvas),Wt(ue.createElement("canvas"),{alpha:!0},(A,L)=>{L.scale(l.dpi,l.dpi),A.width=l.canvas.width,A.height=l.canvas.height,ia(A,x,h),sa(n,A)})},[h,l,x]);const O=A=>{if(!p||!w.current)return;const L=w.current.getBoundingClientRect(),j={type:p,x:A.offsetX/E,y:A.offsetY/E},X=(M,U)=>{const D=(U.clientX-L.x)/E,Q=(U.clientY-L.y)/E;return{type:M.type,x:Math.min(M.x,D),y:Math.min(M.y,Q),w:Math.abs(D-M.x),h:Math.abs(Q-M.y)}},G=M=>{Wt(S.current,{alpha:!0},(U,D)=>{D.clearRect(0,0,U.width,U.height)}),ia(S.current,x,[...h,X(j,M)])},B=M=>{const U=X(j,M);U.w*E>=1&&U.h*E>=1&&m(D=>[...D,U]),ue.removeEventListener("mousemove",G),ue.removeEventListener("mouseup",B)};ue.addEventListener("mousemove",G),ue.addEventListener("mouseup",B)},k=t.useCallback(A=>L=>{L.preventDefault(),L.stopPropagation(),m(j=>{const X=[...j];return X.splice(A,1),X})},[]),b={width:`${l.canvas.width*E}px`,height:`${l.canvas.height*E}px`},N=A=>{A.stopPropagation()};return e("div",{class:"editor"},e("style",{nonce:o.styleNonce,dangerouslySetInnerHTML:c}),e("div",{class:"editor__image-container"},e("div",{class:"editor__canvas-container",ref:y},e("canvas",{ref:_,id:"background",style:b}),e("canvas",{ref:S,id:"foreground",style:b}),e("div",{ref:w,onMouseDown:O,style:b},h.map((A,L)=>e("div",{key:L,class:"editor__rect",style:{top:`${A.y*E}px`,left:`${A.x*E}px`,width:`${A.w*E}px`,height:`${A.h*E}px`}},e("button",{"aria-label":o.removeHighlightText,onClick:k(L),onMouseDown:N,onMouseUp:N,type:"button"},e(a,null))))))),e(i,{options:o,action:p,setAction:f}))};return function({onError:p}){const[f,h]=t.useState();return s({onBeforeScreenshot:t.useCallback(()=>{u.display="none"},[]),onScreenshot:t.useCallback((m,y)=>{Wt(ue.createElement("canvas"),{alpha:!1},(_,S)=>{S.scale(y,y),_.width=m.videoWidth,_.height=m.videoHeight,S.drawImage(m,0,0,_.width,_.height),h({canvas:_,dpi:y})}),n.width=m.videoWidth,n.height=m.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{u.display="block"},[]),onError:t.useCallback(m=>{u.display="block",p(m)},[])}),f?e(d,{screenshot:f}):e("div",null)}}const I0=(()=>({name:"FeedbackScreenshot",setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{const o=ue.createElement("canvas");return{input:T0({h:e,hooks:t,outputBuffer:o,dialog:n,options:r}),value:async()=>{const s=await new Promise(i=>{o.toBlob(i,"image/png")});if(s)return{data:new Uint8Array(await s.arrayBuffer()),filename:"screenshot.png",contentType:"application/png"}}}}})),P=$;let qa=0;function qh(){return qa>0}function w0(){qa++,setTimeout(()=>{qa--})}function gr(e,t={}){function n(o){return typeof o=="function"}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const s=e.__sentry_wrapped__;return typeof s=="function"?s:e}if(fc(e))return e}catch{return e}const r=function(...o){$._sentryWrappedDepth=($._sentryWrappedDepth||0)+1;try{const s=o.map(i=>gr(i,t));return e.apply(this,s)}catch(s){throw w0(),Xe(i=>{i.addEventProcessor(a=>(t.mechanism&&(Ta(a,void 0),pt(a,t.mechanism)),a.extra={...a.extra,arguments:o},a)),bt(s)}),s}finally{$._sentryWrappedDepth=($._sentryWrappedDepth||0)-1}};try{for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=e[o])}catch{}Ef(r,e),Re(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Ps(){const e=en(),{referrer:t}=P.document||{},{userAgent:n}=P.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}const k0=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","moduleMetadataIntegration","instrumentAnthropicAiClient","instrumentOpenAiClient","instrumentGoogleGenAIClient","instrumentStateGraph","instrumentLangGraph","createLangChainCallbackHandler","instrumentLangChainEmbeddings"],R0={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};function C0(e){return R0[e]||e.replace("Integration","").toLowerCase()}const ad=P;async function A0(e,t){const n=k0.includes(e)?C0(e):void 0,r=ad.Sentry=ad.Sentry||{};if(!n)throw new Error(`Cannot lazy load integration: ${e}`);const o=r[e];if(typeof o=="function"&&!("_isShim"in o))return o;const s=M0(n),i=P.document.createElement("script");i.src=s,i.crossOrigin="anonymous",i.referrerPolicy="strict-origin",t&&i.setAttribute("nonce",t);const a=new Promise((l,p)=>{i.addEventListener("load",()=>l()),i.addEventListener("error",p)}),c=P.document.currentScript,u=P.document.body||P.document.head||c?.parentElement;if(u)u.appendChild(i);else throw new Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await a}catch{throw new Error(`Error when loading integration: ${e}`)}const d=r[e];if(typeof d!="function")throw new Error(`Could not load integration: ${e}`);return d}function M0(e){const n=R()?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${Vt}/${e}.min.js`,n).toString()}const oO=Oh({lazyLoadIntegration:A0}),sO=Oh({getModalIntegration:()=>_0,getScreenshotIntegration:()=>I0});function Gc(e,t){const n=Ei(e,t),r={type:P0(t),value:D0(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function x0(e,t,n,r){const s=R()?.getOptions().normalizeDepth,i=H0(t),a={__serialized__:If(t,s)};if(i)return{exception:{values:[Gc(e,i)]},extra:a};const c={exception:{values:[{type:Zs(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:B0(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=Ei(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function aa(e,t){return{exception:{values:[Gc(e,t)]}}}function Ei(e,t){const n=t.stacktrace||t.stack||"",r=O0(t),o=L0(t);try{return e(n,r,o)}catch{}return[]}const N0=/Minified React error #\d+;/i;function O0(e){return e&&N0.test(e.message)?1:0}function L0(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function zh(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function P0(e){const t=e?.name;return!t&&zh(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function D0(e){const t=e?.message;return zh(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?_l(t.error):_l(e):"No error message"}function F0(e,t,n,r){const o=n?.syntheticException||void 0,s=vi(e,t,o,r);return pt(s),s.level="error",n?.event_id&&(s.event_id=n.event_id),yo(s)}function $0(e,t,n="info",r,o){const s=r?.syntheticException||void 0,i=za(e,t,s,o);return i.level=n,r?.event_id&&(i.event_id=r.event_id),yo(i)}function vi(e,t,n,r,o){let s;if(bf(t)&&t.error)return aa(e,t.error);if(wu(t)||$g(t)){const i=t;if("stack"in t){s=aa(e,t);const a=s.exception?.values?.[0];if(r&&n&&a&&!a.stacktrace){const c=Ei(e,n);c.length&&(a.stacktrace={frames:c},pt(s,{synthetic:!0}))}}else{const a=i.name||(wu(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;s=za(e,c,n,r),Ta(s,c)}return"code"in i&&(s.tags={...s.tags,"DOMException.code":`${i.code}`}),s}return De(t)?aa(e,t):Pe(t)||Zs(t)?(s=x0(e,t,n,o),pt(s,{synthetic:!0}),s):(s=za(e,t,n,r),Ta(s,`${t}`),pt(s,{synthetic:!0}),s)}function za(e,t,n,r){const o={};if(r&&n){const s=Ei(e,n);s.length&&(o.exception={values:[{value:t,stacktrace:{frames:s}}]}),pt(o,{synthetic:!0})}if(Qs(t)){const{__sentry_template_string__:s,__sentry_template_values__:i}=t;return o.logentry={message:s,params:i},o}return o.message=t,o}function B0(e,{isUnhandledRejection:t}){const n=Ug(e),r=t?"promise rejection":"exception";return bf(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Zs(e)?`Event \`${U0(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function U0(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function H0(e){return Object.values(e).find(De)}class W0 extends JS{constructor(t){const n=j0(t),r=P.SENTRY_SDK_SOURCE||ES();hb(n,"browser",["browser"],r),super(n);const{userInfo:o}=this.getDataCollectionOptions();n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:o?"auto":"never",...n._metadata.sdk.settings});const{sendClientReports:s}=this._options;P.document&&P.document.addEventListener("visibilitychange",()=>{P.document.visibilityState==="hidden"&&(s&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),o&&this.on("beforeSendSession",pb)}eventFromException(t,n){return F0(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return $0(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,o){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,o)}}function j0(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:P.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const ct=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,V=$,q0=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",ko=(e,t,n,r)=>{let o,s;return i=>{t.value>=0&&(i||r)&&(s=t.value-(o??0),(s||o===void 0)&&(o=t.value,t.delta=s,t.rating=q0(t.value,n),e(t)))}},Ro=(e=!0)=>{const t=V.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},xr=()=>Ro()?.activationStart??0;function Jt(e,t,n){V.document&&V.addEventListener(e,t,n)}function Ds(e,t,n){V.document&&V.removeEventListener(e,t,n)}let ir=-1;const Gh=new Set,z0=()=>V.document?.visibilityState==="hidden"&&!V.document?.prerendering?0:1/0,ps=e=>{if(G0(e)&&ir>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of Gh)t();isFinite(ir)||(ir=e.type==="visibilitychange"?e.timeStamp:0,Ds("prerenderingchange",ps,!0))}},Co=()=>{if(V.document&&ir<0){const e=xr();ir=(V.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??z0(),Jt("visibilitychange",ps,!0),Jt("pagehide",ps,!0),Jt("prerenderingchange",ps,!0)}return{get firstHiddenTime(){return ir},onHidden(e){Gh.add(e)}}};function G0(e){return e.type==="pagehide"||V.document?.visibilityState==="hidden"}const V0=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Ao=(e,t=-1)=>{const n=Ro();let r="navigate";return n&&(V.document?.prerendering||xr()>0?r="prerender":V.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:V0(),navigationType:r}},ca=new WeakMap;function Vc(e,t){try{return ca.get(e)||ca.set(e,new t),ca.get(e)}catch{return new t}}class Y0{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const Nr=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(o=>{Promise.resolve().then(()=>{t(o.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Yc=e=>{let t=!1;return()=>{t||(e(),t=!0)}},Ti=e=>{V.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},J0=[1800,3e3],K0=(e,t={})=>{Ti(()=>{const n=Co(),r=Ao("FCP");let o;const i=Nr("paint",a=>{for(const c of a)c.name==="first-contentful-paint"&&(i.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-xr(),0),r.entries.push(c),o(!0)))});i&&(o=ko(e,r,J0,t.reportAllChanges))})},X0=[.1,.25],Q0=(e,t={})=>{K0(Yc(()=>{const n=Ao("CLS",0);let r;const o=Co(),s=Vc(t,Y0),i=c=>{for(const u of c)s._processEntry(u);s._sessionValue>n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},a=Nr("layout-shift",i);a&&(r=ko(e,n,X0,t.reportAllChanges),o.onHidden(()=>{i(a.takeRecords()),r(!0)}),V?.setTimeout?.(r))}))};let Vh=0,ua=1/0,jo=0;const Z0=e=>{e.forEach(t=>{t.interactionId&&(ua=Math.min(ua,t.interactionId),jo=Math.max(jo,t.interactionId),Vh=jo?(jo-ua)/7+1:0)})};let Ga;const Yh=()=>Ga?Vh:performance.interactionCount||0,ew=()=>{"interactionCount"in performance||Ga||(Ga=Nr("event",Z0,{type:"event",buffered:!0,durationThreshold:0}))},la=10;let Jh=0;const tw=()=>Yh()-Jh;class nw{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){Jh=Yh(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(tw()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<la||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((o,s)=>s._latency-o._latency),this._longestInteractionList.length>la){const o=this._longestInteractionList.splice(la);for(const s of o)this._longestInteractionMap.delete(s.id)}this._onAfterProcessingINPCandidate?.(r)}}}const Jc=e=>{const t=V.requestIdleCallback||V.setTimeout;V.document?.visibilityState==="hidden"?e():(e=Yc(e),Jt("visibilitychange",e,{once:!0,capture:!0}),Jt("pagehide",e,{once:!0,capture:!0}),t(()=>{e(),Ds("visibilitychange",e,{capture:!0}),Ds("pagehide",e,{capture:!0})}))},rw=[200,500],ow=40,sw=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=Co();Ti(()=>{ew();const r=Ao("INP");let o;const s=Vc(t,nw),i=c=>{Jc(()=>{for(const d of c)s._processEntry(d);const u=s._estimateP98LongestInteraction();u&&u._latency!==r.value&&(r.value=u._latency,r.entries=u.entries,o())})},a=Nr("event",i,{durationThreshold:t.durationThreshold??ow});o=ko(e,r,rw,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{i(a.takeRecords()),o(!0)}))})};class iw{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const aw=[2500,4e3],cw=(e,t={})=>{Ti(()=>{const n=Co(),r=Ao("LCP");let o;const s=Vc(t,iw),i=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)s._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-xr(),0),r.entries=[u],o())},a=Nr("largest-contentful-paint",i);if(a){o=ko(e,r,aw,t.reportAllChanges);const c=Yc(()=>{i(a.takeRecords()),a.disconnect(),o(!0)}),u=d=>{d.isTrusted&&(Jc(c),Ds(d.type,u,{capture:!0}))};for(const d of["keydown","click","visibilitychange"])Jt(d,u,{capture:!0})}})},uw=[800,1800],Va=e=>{V.document?.prerendering?Ti(()=>Va(e)):V.document?.readyState!=="complete"?addEventListener("load",()=>Va(e),!0):setTimeout(e)},lw=(e,t={})=>{const n=Ao("TTFB"),r=ko(e,n,uw,t.reportAllChanges);Va(()=>{const o=Ro();o&&(n.value=Math.max(o.responseStart-xr(),0),n.entries=[o],r(!0))})},qr={},Fs={};let Kh,Xh,Qh,Zh;function Ii(e,t=!1){return ki("cls",e,fw,Kh,t)}function wi(e,t=!1){return ki("lcp",e,pw,Xh,t)}function dw(e){return ki("ttfb",e,hw,Qh)}function Kc(e){return ki("inp",e,mw,Zh)}function tn(e,t){return em(e,t),Fs[e]||(gw(e),Fs[e]=!0),tm(e,t)}function Mo(e,t){const n=qr[e];if(n?.length)for(const r of n)try{r(t)}catch(o){ct&&g.error(`Error while triggering instrumentation handler.
489
+ Type: ${e}
490
+ Name: ${Lt(r)}
491
+ Error:`,o)}}function fw(){return Q0(e=>{Mo("cls",{metric:e}),Kh=e},{reportAllChanges:!0})}function pw(){return cw(e=>{Mo("lcp",{metric:e}),Xh=e},{reportAllChanges:!0})}function hw(){return lw(e=>{Mo("ttfb",{metric:e}),Qh=e})}function mw(){return sw(e=>{Mo("inp",{metric:e}),Zh=e})}function ki(e,t,n,r,o=!1){em(e,t);let s;return Fs[e]||(s=n(),Fs[e]=!0),r&&t({metric:r}),tm(e,t,o?s:void 0)}function gw(e){const t={};e==="event"&&(t.durationThreshold=0),Nr(e,n=>{Mo(e,{entries:n})},t)}function em(e,t){qr[e]=qr[e]||[],qr[e].push(t)}function tm(e,t,n){return()=>{n&&n();const r=qr[e];if(!r)return;const o=r.indexOf(t);o!==-1&&r.splice(o,1)}}function _w(e){return"duration"in e}const yw=80,gn={};try{typeof Node<"u"&&(gn.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),typeof Element<"u"&&(gn.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,gn.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,gn.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,gn.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<"u"&&(gn.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function Ht(e,t,n){const r=gn[t];if(r)try{return r.call(e,n)}catch{}const o=e[t];return typeof o=="function"?o.call(e,n):o}function ke(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,o=[];let s=0,i=0;const a=" > ",c=a.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||yw;for(;n&&s++<r&&(u=Sw(n,d),!(u==="html"||s>1&&i+o.length*c+u.length>=l));)o.push(u),i+=u.length,n=Ht(n,"parentNode");return o.reverse().join(a)}catch{return"<unknown>"}}function Sw(e,t){const n=[],r=Ht(e,"tagName");if(!r)return"";if(typeof HTMLElement<"u"&&e instanceof HTMLElement){const s=Ht(e,"dataset");if(s){if(s.sentryComponent)return s.sentryComponent;if(s.sentryElement)return s.sentryElement}}n.push(r.toLowerCase());const o=t?.length?t.filter(s=>Ht(e,"getAttribute",s)).map(s=>[s,Ht(e,"getAttribute",s)]):null;if(o?.length)o.forEach(s=>{n.push(`[${s[0]}="${s[1]}"]`)});else{const s=Ht(e,"id");s&&n.push(`#${s}`);const i=Ht(e,"className");if(i&&ot(i)){const a=i.split(/\s+/);for(const c of a)n.push(`.${c}`)}}for(const s of["aria-label","type","name","title","alt"]){const i=Ht(e,"getAttribute",s);i&&n.push(`[${s}="${i}"]`)}return n.join("")}const bw=e=>{const t=n=>{(n.type==="pagehide"||V.document?.visibilityState==="hidden")&&e(n)};Jt("visibilitychange",t,{capture:!0,once:!0}),Jt("pagehide",t,{capture:!0,once:!0})};function da(e){return typeof e=="number"&&isFinite(e)}function nn(e,t,n,{...r}){const o=J(e).start_timestamp;return o&&o>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),si(e,()=>{const s=cn({startTime:t,...r});return s&&s.end(n),s})}function Xc(e){const t=R();if(!t)return;const{name:n,transaction:r,attributes:o,startTime:s}=e,{release:i,environment:a}=t.getOptions(),{userInfo:c}=t.getDataCollectionOptions(),d=t.getIntegrationByName("Replay")?.getReplayId(),l=q(),p=l.getUser(),f=p!==void 0?p.email||p.id||p.ip_address:void 0;let h;try{h=l.getScopeData().contexts.profile.profile_id}catch{}const m={release:i,environment:a,user:f||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":V.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...o};return cn({name:n,attributes:m,startTime:s,experimental:{standalone:!0}})}function Un(){return V.addEventListener&&V.performance}function he(e){return e/1e3}function Ew(e){let t="unknown",n="unknown",r="";for(const o of e){if(o==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(o))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=o}return r===e&&(t=r),{name:t,version:n}}function Ri(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Ci(e,t){let n,r=!1;function o(a){!r&&n&&t(a,n.spanContext().spanId,n),r=!0}bw(()=>{o("pagehide")});const s=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(o("navigation"),s(),i())}),i=e.on("afterStartPageLoadSpan",a=>{n=a,i()})}function vw(e){let t=0,n;if(!Ri("layout-shift"))return;const r=Ii(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);Ci(e,(o,s)=>{Tw(t,n,s,o),r()})}function Tw(e,t,n,r){ct&&g.log(`Sending CLS span (${e})`);const o=t?he((ve()||0)+t.startTime):_e(),s=q().getScopeData().transactionName,i=t?ke(t.sources[0]?.node):"Layout shift",a={[oe]:"auto.http.browser.cls",[ge]:"ui.webvital.cls",[an]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,d)=>{a[`cls.source.${d+1}`]=ke(u.node)});const c=Xc({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("cls",{[fo]:"",[po]:e}),c.end(o))}const Iw=6e4;function xo(e){return e!=null&&e>0&&e<=Iw}function ww(e){let t=0,n;if(!Ri("largest-contentful-paint"))return;const r=wi(({metric:o})=>{const s=o.entries[o.entries.length-1];!s||!xo(o.value)||(t=o.value,n=s)},!0);Ci(e,(o,s)=>{kw(t,n,s,o),r()})}function kw(e,t,n,r){if(!xo(e))return;ct&&g.log(`Sending LCP span (${e})`);const o=he((ve()||0)+(t?.startTime||0)),s=q().getScopeData().transactionName,i=t?ke(t.element):"Largest contentful paint",a={[oe]:"auto.http.browser.lcp",[ge]:"ui.webvital.lcp",[an]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=ke(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const c=Xc({name:i,transaction:s,attributes:a,startTime:o});c&&(c.addEvent("lcp",{[fo]:"millisecond",[po]:e}),c.end(o))}function Ge(e){return e&&((ve()||performance.timeOrigin)+e)/1e3}function nm(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=Ew(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return ve()||Un()?.timeOrigin?Rw({...t,"http.request.redirect_start":Ge(e.redirectStart),"http.request.redirect_end":Ge(e.redirectEnd),"http.request.worker_start":Ge(e.workerStart),"http.request.fetch_start":Ge(e.fetchStart),"http.request.domain_lookup_start":Ge(e.domainLookupStart),"http.request.domain_lookup_end":Ge(e.domainLookupEnd),"http.request.connect_start":Ge(e.connectStart),"http.request.secure_connection_start":Ge(e.secureConnectionStart),"http.request.connection_end":Ge(e.connectEnd),"http.request.request_start":Ge(e.requestStart),"http.request.response_start":Ge(e.responseStart),"http.request.response_end":Ge(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function Rw(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const Cw=2147483647;let cd=0,Le={},Oe,$s;function Aw({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Un();if(r&&ve()){r.mark&&V.performance.mark("sentry-tracing-init");const o=t?ww(n):t===!1?Lw():void 0,s=e?vw(n):e===!1?Ow():void 0,i=Pw(),a=Dw();return()=>{i(),a(),o?.(),s?.()}}return()=>{}}function Mw(){tn("longtask",({entries:e})=>{const t=Ee();if(!t)return;const{op:n,start_timestamp:r}=J(t);for(const o of e){const s=he(ve()+o.startTime),i=he(o.duration);n==="navigation"&&r&&s<r||nn(t,s,s+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[oe]:"auto.ui.browser.metrics"}})}})}function xw(){new PerformanceObserver(t=>{const n=Ee();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const o=he(ve()+r.startTime),{start_timestamp:s,op:i}=J(n);if(i==="navigation"&&s&&o<s)continue;const a=he(r.duration),c={[oe]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:d,invokerType:l,sourceURL:p,sourceFunctionName:f,sourceCharPosition:h}=u;c["browser.script.invoker"]=d,c["browser.script.invoker_type"]=l,p&&(c["code.filepath"]=p),f&&(c["code.function"]=f),h!==-1&&(c["browser.script.source_char_position"]=h),nn(n,o,o+a,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function Nw(){tn("event",({entries:e})=>{const t=Ee();if(t){for(const n of e)if(n.name==="click"){const r=he(ve()+n.startTime),o=he(n.duration),s={name:ke(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[oe]:"auto.ui.browser.metrics"}},i=Uc(n.target);i&&(s.attributes["ui.component_name"]=i),nn(t,r,r+o,s)}}})}function Ow(){return Ii(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Le.cls={value:e.value,unit:""},$s=t)},!0)}function Lw(){return wi(({metric:e})=>{const t=e.entries[e.entries.length-1];!t||!xo(e.value)||(Le.lcp={value:e.value,unit:"millisecond"},Oe=t)},!0)}function Pw(){return dw(({metric:e})=>{e.entries[e.entries.length-1]&&(Le.ttfb={value:e.value,unit:"millisecond"})})}function Dw(){return tn("paint",({entries:e})=>{const t=Co();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"})}})}function Fw(e,t){const n=Un(),r=ve();if(!n?.getEntries||!r)return;const{spanStreamingEnabled:o,ignorePerformanceApiSpans:s,ignoreResourceSpans:i}=t,a=he(r),c=n.getEntries(),{op:u,start_timestamp:d}=J(e);c.slice(cd).forEach(l=>{const p=he(l.startTime),f=he(Math.max(0,l.duration));if(!(u==="navigation"&&d&&a+p<d))switch(l.entryType){case"navigation":{Ww(e,l,a);break}case"mark":case"paint":case"measure":{Uw(e,l,p,f,a,s);break}case"resource":{zw(e,l,l.name,p,f,a,i);break}}}),cd=Math.max(c.length-1,0),Gw(e,o)}function $w(e,t){const n=ve();if(!Un()?.getEntries||!n){ud();return}const{spanStreamingEnabled:r,recordClsOnPageloadSpan:o,recordLcpOnPageloadSpan:s}=t,i=he(n);if(J(e).op==="pageload"){if(Jw(Le),r){const a=(c,u,d)=>{const l=d??`browser.web_vital.${c}.value`;e.setAttribute(l,u),ct&&g.log("Setting web vital attribute",{[l]:u},"on pageload span")};["ttfb","fp","fcp"].forEach(c=>{Le[c]&&a(c,Le[c].value)}),Le["ttfb.requestTime"]&&a("ttfb.requestTime",Le["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}else o||delete Le.cls,s||delete Le.lcp,Object.entries(Le).forEach(([a,c])=>{ap(a,c.value,c.unit,e)}),Vw(e,t);e.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",i),e.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",xr())}ud()}function ud(){Oe=void 0,$s=void 0,Le={}}function Bw(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function Uw(e,t,n,r,o,s){if(Bw(t)||["mark","measure"].includes(t.entryType)&&Ke(t.name,s))return;const i=Ro(!1),a=he(i?i.requestStart:0),c=o+Math.max(n,a),u=o+n,d=u+r,l={[oe]:"auto.resource.browser.metrics"};c!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=c),Hw(l,t),c<=d&&nn(e,c,d,{name:t.name,op:t.entryType,attributes:l})}function Hw(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,o]of Object.entries(n))if(o&&gt(o))e[`sentry.browser.measure.detail.${r}`]=o;else if(o!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(o)}catch{}return}if(gt(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function Ww(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{qo(e,t,r,n)}),qo(e,t,"secureConnection",n,"TLS/SSL"),qo(e,t,"fetch",n,"cache"),qo(e,t,"domainLookup",n,"DNS"),qw(e,t,n)}function qo(e,t,n,r,o=n){const s=jw(n),i=t[s],a=t[`${n}Start`];!a||!i||nn(e,r+he(a),r+he(i),{op:`browser.${o}`,name:t.name,attributes:{[oe]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function jw(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function qw(e,t,n){const r=n+he(t.requestStart),o=n+he(t.responseEnd),s=n+he(t.responseStart);t.responseEnd&&(nn(e,r,o,{op:"browser.request",name:t.name,attributes:{[oe]:"auto.ui.browser.metrics"}}),nn(e,s,o,{op:"browser.response",name:t.name,attributes:{[oe]:"auto.ui.browser.metrics"}}))}function zw(e,t,n,r,o,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(i?.includes(a))return;const c={[oe]:"auto.resource.browser.metrics"},u=In(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop()),u.host&&(c["server.address"]=u.host),c["url.same_origin"]=n.includes(V.location.origin),c[Fn]=n,Yw(t,c,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const d={...c,...nm(t)},l=s+r,p=l+o;nn(e,l,p,{name:n.replace(V.location.origin,""),op:a,attributes:d})}function Gw(e,t){const n=V.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),da(r.rtt)&&(t?e.setAttribute("network.connection.rtt",r.rtt):J(e).op==="pageload"&&ap("connection.rtt",r.rtt,"millisecond"))),da(n.deviceMemory)&&(t?e.setAttribute("device.memory.estimated_capacity",n.deviceMemory):e.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),da(n.hardwareConcurrency)&&(t?e.setAttribute("device.processor_count",n.hardwareConcurrency):e.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function Vw(e,t){Oe&&t.recordLcpOnPageloadSpan&&(Oe.element&&e.setAttribute("lcp.element",ke(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)),$s?.sources&&t.recordClsOnPageloadSpan&&$s.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,ke(n.node)))}function Yw(e,t,n){n.forEach(([r,o])=>{const s=e[r];s!=null&&(typeof s=="number"&&s<Cw||typeof s=="string")&&(t[o]=s)})}function Jw(e){const t=Ro(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const Kw="ElementTiming",Xw=(()=>({name:Kw,setup(){!Un()||!ve()||tn("element",({entries:t})=>{for(const n of t){const r=n;if(!r.identifier)continue;const o=r.identifier,s=r.name,i=r.renderTime,a=r.loadTime,c={"sentry.origin":"auto.ui.browser.element_timing","ui.element.identifier":o};s&&(c["ui.element.paint_type"]=s),r.id&&(c["ui.element.id"]=r.id),r.element&&(c["ui.element.type"]=r.element.tagName.toLowerCase()),r.url&&(c["ui.element.url"]=r.url),r.naturalWidth&&(c["ui.element.width"]=r.naturalWidth),r.naturalHeight&&(c["ui.element.height"]=r.naturalHeight),i>0&&La("ui.element.render_time",i,{unit:"millisecond",attributes:c}),a>0&&La("ui.element.load_time",a,{unit:"millisecond",attributes:c})}})}})),iO=Xw,fa=[],zr=new Map,Gn=new Map,rm=60;function Qw(){if(Un()&&ve()){const t=Zw();return()=>{t()}}return()=>{}}const no={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 Zw(){return Kc(ek)}const ek=({metric:e})=>{if(e.value==null)return;const t=he(e.value);if(t>rm)return;const n=e.entries.find(h=>h.duration===e.value&&no[h.name]);if(!n)return;const{interactionId:r}=n,o=no[n.name],s=he(ve()+n.startTime),i=Ee(),a=i?be(i):void 0,c=r!=null?zr.get(r):void 0,u=c?.span||a,d=u?J(u).description:q().getScopeData().transactionName,l=c?.elementName||ke(n.target),p={[oe]:"auto.http.browser.inp",[ge]:`ui.interaction.${o}`,[an]:n.duration},f=Xc({name:l,transaction:d,attributes:p,startTime:s});f&&(f.addEvent("inp",{[fo]:"millisecond",[po]:e.value}),f.end(s+t))};function tk(e){return e!=null?zr.get(e):void 0}function nk(){const e=Object.keys(no);Qt()&&e.forEach(o=>{V.addEventListener(o,t,{capture:!0,passive:!0})});function t(o){const s=o.target;if(!s)return;const i=ke(s),a=Math.round(o.timeStamp);if(Gn.set(a,i),Gn.size>50){const c=Gn.keys().next().value;c!==void 0&&Gn.delete(c)}}function n(o){const s=Math.round(o.startTime);let i=Gn.get(s);if(!i)for(let a=-5;a<=5;a++){const c=Gn.get(s+a);if(c){i=c;break}}return i||"<unknown>"}const r=({entries:o})=>{const s=Ee(),i=s&&be(s);o.forEach(a=>{if(!_w(a))return;const c=a.interactionId;if(c==null||zr.has(c))return;const u=a.target?ke(a.target):n(a);if(fa.length>10){const d=fa.shift();zr.delete(d)}fa.push(c),zr.set(c,{span:i,elementName:u})})};tn("event",r),tn("first-input",r)}function Qc(e){const{name:t,op:n,origin:r,metricName:o,value:s,attributes:i,parentSpan:a,reportEvent:c,startTime:u,endTime:d}=e,l=q().getScopeData().transactionName,p={[oe]:r,[ge]:n,[an]:0,[`browser.web_vital.${o}.value`]:s,[hp]:l,[Ic]:l,"user_agent.original":V.navigator?.userAgent,...i};a&&vs(a).attributes?.[ge]==="pageload"&&(p["sentry.pageload.span_id"]=a.spanContext().spanId),c&&(p[`browser.web_vital.${o}.report_event`]=c);const f=cn({name:t,attributes:p,startTime:u,parentSpan:a});f&&f.end(d??u)}function rk(e){let t=0,n;if(!Ri("largest-contentful-paint"))return;const r=wi(({metric:o})=>{const s=o.entries[o.entries.length-1];!s||!xo(o.value)||(t=o.value,n=s)},!0);Ci(e,(o,s,i)=>{ok(t,n,i,o),r()})}function ok(e,t,n,r){if(!xo(e))return;ct&&g.log(`Sending LCP span (${e})`);const o=ve()||0,s=he(o),i=he(o+(t?.startTime||0)),a=t?ke(t.element):"Largest contentful paint",c={};t?.element&&(c["browser.web_vital.lcp.element"]=ke(t.element)),t?.id&&(c["browser.web_vital.lcp.id"]=t.id),t?.url&&(c["browser.web_vital.lcp.url"]=t.url),t?.loadTime!=null&&(c["browser.web_vital.lcp.load_time"]=t.loadTime),t?.renderTime!=null&&(c["browser.web_vital.lcp.render_time"]=t.renderTime),t?.size!=null&&(c["browser.web_vital.lcp.size"]=t.size),Qc({name:a,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:e,attributes:c,parentSpan:n,reportEvent:r,startTime:s,endTime:i})}function sk(e){let t=0,n;if(!Ri("layout-shift"))return;const r=Ii(({metric:o})=>{const s=o.entries[o.entries.length-1];s&&(t=o.value,n=s)},!0);Ci(e,(o,s,i)=>{ik(t,n,i,o),r()})}function ik(e,t,n,r){ct&&g.log(`Sending CLS span (${e})`);const o=t?he((ve()||0)+t.startTime):_e(),s=t?ke(t.sources[0]?.node):"Layout shift",i={};t?.sources&&t.sources.forEach((a,c)=>{i[`browser.web_vital.cls.source.${c+1}`]=ke(a.node)}),Qc({name:s,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:e,attributes:i,parentSpan:n,reportEvent:r,startTime:o})}function ak(){if(!Un()||!ve())return;Kc(({metric:n})=>{if(n.value==null||he(n.value)>rm)return;const o=n.entries.find(s=>s.duration===n.value&&no[s.name]);o&&ck(n.value,o)})}function ck(e,t){ct&&g.log(`Sending INP span (${e})`);const n=he(ve()+t.startTime),r=he(e),o=no[t.name],s=tk(t.interactionId),i=Ee(),a=i?be(i):void 0,c=s?.span||a,u=c?vs(c).name:q().getScopeData().transactionName,d=s?.elementName||ke(t.target);Qc({name:d,op:`ui.interaction.${o}`,origin:"auto.http.browser.inp",metricName:"inp",value:e,attributes:{[an]:t.duration,[hp]:u,[Ic]:u},startTime:n,endTime:n+r,parentSpan:c})}const uk=1e3;let ld,Ya,Ja;function om(e){rn("dom",e),on("dom",lk)}function lk(){if(!V.document)return;const e=Ye.bind(null,"dom"),t=dd(e,!0);V.document.addEventListener("click",t,!1),V.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const o=V[n]?.prototype;o?.hasOwnProperty?.("addEventListener")&&(Ce(o,"addEventListener",function(s){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=u[i]=u[i]||{refCount:0};if(!d.handler){const l=dd(e);d.handler=l,s.call(this,i,l,c)}d.refCount++}catch{}return s.call(this,i,a,c)}}),Ce(o,"removeEventListener",function(s){return function(i,a,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},d=u[i];d&&(d.refCount--,d.refCount<=0&&(s.call(this,i,d.handler,c),d.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,a,c)}}))})}function dk(e){if(e.type!==Ya)return!1;try{if(!e.target||e.target._sentryId!==Ja)return!1}catch{}return!0}function fk(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function dd(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=pk(n);if(fk(n.type,r))return;Re(n,"_sentryCaptured",!0),r&&!r._sentryId&&Re(r,"_sentryId",we());const o=n.type==="keypress"?"input":n.type;dk(n)||(e({event:n,name:o,global:t}),Ya=n.type,Ja=r?r._sentryId:void 0),clearTimeout(ld),ld=V.setTimeout(()=>{Ja=void 0,Ya=void 0},uk)}}function pk(e){try{return e.target}catch{return null}}let zo;function Ai(e){const t="history";rn(t,e),on(t,hk)}function hk(){if(V.addEventListener("popstate",()=>{const t=V.location.href,n=zo;if(zo=t,n===t)return;Ye("history",{from:n,to:t})}),!rI())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const o=zo,s=mk(String(r));if(zo=s,o===s)return t.apply(this,n);Ye("history",{from:o,to:s})}return t.apply(this,n)}}Ce(V.history,"pushState",e),Ce(V.history,"replaceState",e)}function mk(e){try{return new URL(e,V.location.origin).toString()}catch{return e}}const hs={};function Zc(e){const t=hs[e];if(t)return t;let n=V[e];if(Ba(n))return hs[e]=n.bind(V);const r=V.document;if(r&&typeof r.createElement=="function")try{const o=r.createElement("iframe");o.hidden=!0,r.head.appendChild(o);const s=o.contentWindow;s?.[e]&&(n=s[e]),r.head.removeChild(o)}catch(o){ct&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,o)}return n&&(hs[e]=n.bind(V))}function gk(e){hs[e]=void 0}function No(...e){return Zc("setTimeout")(...e)}const Mt="__sentry_xhr_v3__";function eu(e){rn("xhr",e),on("xhr",_k)}function _k(){if(!V.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const o=new Error,s=_e()*1e3,i=ot(r[0])?r[0].toUpperCase():void 0,a=yk(r[1]);if(!i||!a)return t.apply(n,r);n[Mt]={method:i,url:a,request_headers:{}},i==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[Mt];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:_e()*1e3,startTimestamp:s,xhr:n,virtualError:o};Ye("xhr",d),n.removeEventListener("readystatechange",c)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,l){return c(),u.apply(d,l)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,l){const[p,f]=l,h=d[Mt];return h&&ot(p)&&ot(f)&&(h.request_headers[p.toLowerCase()]=f),u.apply(d,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const o=n[Mt];if(!o)return t.apply(n,r);r[0]!==void 0&&(o.body=r[0]);const s={startTimestamp:_e()*1e3,xhr:n};return Ye("xhr",s),t.apply(n,r)}})}function yk(e){if(ot(e))return e;try{return e.toString()}catch{}}const Sk=Symbol.for("sentry__originalRequestBody");function sm(e){return new URLSearchParams(e).toString()}function Bs(e,t=g){try{if(typeof e=="string")return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[sm(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"]}function tu(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 n=e[0][Sk];return n!==void 0?n:void 0}}function im(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[o,s]=r.split(": ");return s&&(n[o.toLowerCase()]=s),n},{}):{}}function bk(e){if(typeof Element>"u")return!1;try{return e instanceof Element}catch{return!1}}function aO(e){try{return new URL(e,V.location.origin).toString()}catch{return e}}const Ek=40;function am(e,t=Zc("fetch")){let n=0,r=0;async function o(s){const i=s.body.length;n+=i,r++;const a={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const c=await t(e.url,a);return{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}}catch(c){throw gk("fetch"),c}finally{n-=i,r--}}return US(e,o,Cc(e.bufferSize||Ek))}const T=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function vk(){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")}function Tk(){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")}const cO={startProfiler:vk,stopProfiler:Tk},Ik=10,wk=20,kk=30,Rk=40,Ck=50;function _r(e,t,n,r){const o={filename:e,function:t==="<anonymous>"?mt:t,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}const Ak=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Mk=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,xk=/\((\S*)(?::(\d+))(?::(\d+))\)/,Nk=/at (.+?) ?\(data:(.+?),/,Ok=e=>{const t=e.match(Nk);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};const n=Ak.exec(e);if(n){const[,o,s,i]=n;return _r(o,mt,+s,+i)}const r=Mk.exec(e);if(r){if(r[2]?.indexOf("eval")===0){const a=xk.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[s,i]=cm(r[1]||mt,r[2]);return _r(i,s,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},Lk=[kk,Ok],Pk=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Dk=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Fk=e=>{const t=Pk.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const s=Dk.exec(t[3]);s&&(t[1]=t[1]||"eval",t[3]=s[1],t[4]=s[2],t[5]="")}let r=t[3],o=t[1]||mt;return[o,r]=cm(o,r),_r(r,o,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},$k=[Ck,Fk],Bk=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Uk=e=>{const t=Bk.exec(e);return t?_r(t[2],t[1]||mt,+t[3],t[4]?+t[4]:void 0):void 0},uO=[Rk,Uk],Hk=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,Wk=e=>{const t=Hk.exec(e);return t?_r(t[2],t[3]||mt,+t[1]):void 0},lO=[Ik,Wk],jk=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,qk=e=>{const t=jk.exec(e);return t?_r(t[5],t[3]||t[4]||mt,+t[1],+t[2]):void 0},dO=[wk,qk],zk=[Lk,$k],Gk=gf(...zk),cm=(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]:mt,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function fO(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:new Date().toISOString(),...t?.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Tt(r)}},s=Vk(e);return Qe(o,[s])}function Vk(e){return[{type:"user_report"},e]}const Go=1024,Yk="Breadcrumbs",Jk=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Yk,setup(n){t.console&&Ac(Zk(n)),t.dom&&om(Qk(n,t.dom)),t.xhr&&eu(eR(n)),t.fetch&&Si(tR(n)),t.history&&Ai(nR(n)),t.sentry&&n.on("beforeSendEvent",Xk(n))}}}),Kk=Jk;function Xk(e){return function(n){R()===e&&Pt({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:_n(n)},{event:n})}}function Qk(e,t){return function(r){if(R()!==e)return;let o,s,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Go&&(T&&g.warn(`\`dom.maxStringLength\` cannot exceed ${Go}, but a value of ${a} was configured. Sentry will use ${Go} instead.`),a=Go),typeof i=="string"&&(i=[i]);try{const u=r.event,d=rR(u)?u.target:u;o=ke(d,{keyAttrs:i,maxStringLength:a}),s=Uc(d)}catch{o="<unknown>"}if(o.length===0)return;const c={category:`ui.${r.name}`,message:o};s&&(c.data={"ui.component_name":s}),Pt(c,{event:r.event,name:r.name,global:r.global})}}function Zk(e){return function(n){if(R()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:As(n.level),message:Ss(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${Ss(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Pt(r,{input:n.args,level:n.level})}}function eR(e){return function(n){if(R()!==e)return;const{startTimestamp:r,endTimestamp:o}=n,s=n.xhr[Mt];if(!r||!o||!s)return;const{method:i,url:a,status_code:c,body:u}=s,d={method:i,url:a,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:o},p={category:"xhr",data:d,type:"http",level:vh(c)};e.emit("beforeOutgoingRequestBreadcrumb",p,l),Pt(p,l)}}function tR(e){return function(n){if(R()!==e)return;const{startTimestamp:r,endTimestamp:o}=n;if(o&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const s={data:n.error,input:n.args,startTimestamp:r,endTimestamp:o},i={category:"fetch",data:n.fetchData,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",i,s),Pt(i,s)}else{const s=n.response,i={...n.fetchData,status_code:s?.status},a={input:n.args,response:s,startTimestamp:r,endTimestamp:o},c={category:"fetch",data:i,type:"http",level:vh(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),Pt(c,a)}}}function nR(e){return function(n){if(R()!==e)return;let r=n.from,o=n.to;const s=In(P.location.href);let i=r?In(r):void 0;const a=In(o);i?.path||(i=s),s.protocol===a.protocol&&s.host===a.host&&(o=a.relative),s.protocol===i.protocol&&s.host===i.host&&(r=i.relative),Pt({category:"navigation",data:{from:r,to:o}})}}function rR(e){return!!e&&!!e.target}const oR="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(","),sR="BrowserApiErrors",iR=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:sR,setupOnce(){t.setTimeout&&Ce(P,"setTimeout",fd),t.setInterval&&Ce(P,"setInterval",fd),t.requestAnimationFrame&&Ce(P,"requestAnimationFrame",cR),t.XMLHttpRequest&&"XMLHttpRequest"in P&&Ce(XMLHttpRequest.prototype,"send",uR);const n=t.eventTarget;n&&(Array.isArray(n)?n:oR).forEach(o=>lR(o,t))}}}),aR=iR;function fd(e){return function(...t){const n=t[0];return t[0]=gr(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Lt(e)}`}}),e.apply(this,t)}}function cR(e){return function(t){return e.apply(this,[gr(t,{mechanism:{data:{handler:Lt(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function uR(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&Ce(n,o,function(s){const i={mechanism:{data:{handler:Lt(s)},handled:!1,type:`auto.browser.browserapierrors.xhr.${o}`}},a=fc(s);return a&&(i.mechanism.data.handler=Lt(a)),gr(s,i)})}),e.apply(this,t)}}function lR(e,t){const r=P[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(Ce(r,"addEventListener",function(o){return function(s,i,a){try{dR(i)&&(i.handleEvent=gr(i.handleEvent,{mechanism:{data:{handler:Lt(i),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&fR(this,s,i),o.apply(this,[s,gr(i,{mechanism:{data:{handler:Lt(i),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),Ce(r,"removeEventListener",function(o){return function(s,i,a){try{if(Object.prototype.hasOwnProperty.call(i,"__sentry_wrapped__")){const c=i.__sentry_wrapped__;c&&o.call(this,s,c,a)}}catch{}return o.call(this,s,i,a)}}))}function dR(e){return typeof e.handleEvent=="function"}function fR(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const pR=(e={})=>{const t=e.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof P.document>"u"){T&&g.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}el({ignoreDuration:!0});let n=!1;Jc(()=>{n||(Vi(),n=!0)});const r=me();let o=r.getUser();r.addScopeListener(s=>{const i=s.getUser();(o?.id!==i?.id||o?.ip_address!==i?.ip_address)&&(o=i,n&&Vi())}),t==="route"&&Ai(({from:s,to:i})=>{s!==i&&(el({ignoreDuration:!0}),Vi(),n=!0)})}}},hR="CultureContext",mR=(()=>({name:hR,preprocessEvent(e){const t=pd();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){const t=pd();t&&Xt(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})),gR=mR;function pd(){try{const e=P.Intl;if(!e)return;const t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}const _R="GlobalHandlers",yR=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:_R,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(bR(n),hd("onerror")),t.onunhandledrejection&&(ER(n),hd("onunhandledrejection"))}}}),SR=yR;function bR(e){_f(t=>{const{stackParser:n,attachStacktrace:r}=dm();if(R()!==e||qh())return;const{msg:o,url:s,line:i,column:a,error:c}=t,u=vR(vi(n,c||o,void 0,r,!1),s,i,a);u.level="error",So(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function ER(e){yf(t=>{const{stackParser:n,attachStacktrace:r}=dm();if(R()!==e||qh())return;const o=um(t),s=gt(o)?lm(o):vi(n,o,void 0,r,!0);s.level="error",So(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function um(e){if(gt(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function lm(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function vR(e,t,n,r){const o=e.exception=e.exception||{},s=o.values=o.values||[],i=s[0]=s[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:TR(t)??en(),function:mt,in_app:!0}),e}function hd(e){T&&g.log(`Global Handler attached: ${e}`)}function dm(){return R()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function TR(e){if(!(!ot(e)||e.length===0))return e.startsWith("data:")?`<${st(e,!1)}>`:e}const IR=()=>({name:"HttpContext",preprocessEvent(e){if(!P.navigator&&!P.location&&!P.document)return;const t=Ps(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){const t=e.attributes?.[ge];if(!P.navigator&&!P.location&&!P.document)return;const n=Ps();Xt(e,{[Fn]:t!=="http.client"?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}}),wR="cause",kR=5,RR="LinkedErrors",CR=((e={})=>{const t=e.limit||kR,n=e.key||wR;return{name:RR,preprocessEvent(r,o,s){const i=s.getOptions();Nb(Gc,i.stackParser,n,t,r,o)}}}),AR=CR,MR=/^HTML(\w*)Element$/;function xR(e){if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(bk(e)){const t=NR(e);if(MR.test(t))return`[HTMLElement: ${ke(e)}]`}}function NR(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function OR(){return LR()?(T&&$t(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function LR(){if(typeof P.window>"u")return!1;const e=P;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=en();return!(P===P.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}function PR(e){return[Ib(),bb(),LE(),aR(),Kk(),SR(),AR(),Wb(),IR(),gR(),pR()]}function pO(e={}){const t=!e.skipBrowserExtensionCheck&&OR();let n=e.defaultIntegrations==null?PR():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:Og(e.stackParser||Gk),integrations:gS({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||am};return zg(xR),eb(W0,r)}function hO(){}function mO(e){e()}function gO(e={}){const t=P.document,n=t?.head||t?.body;if(!n){T&&g.error("[showReportDialog] Global document not defined");return}const r=q(),s=R()?.getDsn();if(!s){T&&g.error("[showReportDialog] DSN not configured");return}const i={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||cS()},a=P.document.createElement("script");a.async=!0,a.crossOrigin="anonymous",a.src=hS(s,i);const{onLoad:c,onClose:u}=i;if(c&&(a.onload=c),u){const d=l=>{if(l.data==="__sentry_reportdialog_closed__")try{u()}finally{P.removeEventListener("message",d)}};P.addEventListener("message",d)}n.appendChild(a)}const DR=$,FR="ReportingObserver",md=new WeakMap,$R=((e={})=>{const t=e.types||["crash","deprecation","intervention"];function n(r){if(md.has(R()))for(const o of r)Xe(s=>{s.setExtra("url",o.url);const i=`ReportingObserver [${o.type}]`;let a="No details available";if(o.body){const c={};for(const u in o.body)c[u]=o.body[u];if(s.setExtra("body",c),o.type==="crash"){const u=o.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=o.body.message||a}iS(`${i}: ${a}`)})}return{name:FR,setupOnce(){if(!sI())return;new DR.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){md.set(r,!0)}}}),_O=$R,BR="HttpClient",UR=((e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:BR,setup(n){VR(n,t),YR(n,t)}}}),yO=UR;function HR(e,t,n,r,o){if(fm(e,n.status,n.url)){const s=JR(t,r);let i,a,c,u;const d=hm();if(d.requestHeaders!==!1&&(i=Zr(gd(s.headers),d.requestHeaders)),d.responseHeaders!==!1&&(a=Zr(gd(n.headers),d.responseHeaders)),d.cookies!==!1){const p=s.headers.get("Cookie")||void 0;if(p){const h=Na(p,d.cookies);typeof h=="object"&&(c=h)}const f=n.headers.get("Set-Cookie")||void 0;if(f){const h=Na(f,d.cookies);typeof h=="object"&&(u=h)}}const l=pm({url:s.url,method:s.method,status:n.status,requestHeaders:i,responseHeaders:a,requestCookies:c,responseCookies:u,error:o,type:"fetch"});So(l)}}function WR(e,t,n,r,o){if(fm(e,t.status,t.responseURL)){let s,i,a;const c=hm();if(c.cookies!==!1)try{const d=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;if(d){const l=Na(d,c.cookies);typeof l=="object"&&(i=l)}}catch{}if(c.responseHeaders!==!1)try{a=Zr(qR(t),c.responseHeaders)}catch{}c.requestHeaders!==!1&&(s=Zr(r,c.requestHeaders));const u=pm({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:a,responseCookies:i,error:o,type:"xhr"});So(u)}}function jR(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function gd(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function qR(e){const t=e.getAllResponseHeaders();return t?t.split(`\r
493
+ `).reduce((n,r)=>{const[o,s]=r.split(": ");return o&&s&&(n[o]=s),n},{}):{}}function zR(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function GR(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function VR(e,t){Th()&&Si(n=>{if(R()!==e)return;const{response:r,args:o,error:s,virtualError:i}=n,[a,c]=o;r&&HR(t,a,r,c,s||i)},!1)}function YR(e,t){"XMLHttpRequest"in $&&eu(n=>{if(R()!==e)return;const{error:r,virtualError:o}=n,s=n.xhr,i=s[Mt];if(!i)return;const{method:a,request_headers:c}=i;try{WR(t,s,a,c,r||o)}catch(u){T&&g.warn("Error while extracting response event form XHR response",u)}})}function fm(e,t,n){return GR(e.failedRequestStatusCodes,t)&&zR(e.failedRequestTargets,n)&&!Hp(n,R())}function pm(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,o=`HTTP Client Error with status code: ${e.status}`,s={message:o,exception:{values:[{type:"Error",value:o,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:jR(e.responseHeaders)}}};return pt(s,{type:`auto.http.client.${e.type}`,handled:!1}),s}function JR(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function hm(){const e=R();if(!e)return{cookies:!1,requestHeaders:!1,responseHeaders:!1};const t=e.getOptions();if(t.dataCollection==null){const o=!!t.sendDefaultPii;return{cookies:o,requestHeaders:o,responseHeaders:o}}const{cookies:n,httpHeaders:r}=e.getDataCollectionOptions();return{cookies:n,requestHeaders:r.request,responseHeaders:r.response}}const pa=$,KR=7,XR="ContextLines",QR=((e={})=>({name:XR,processEvent(t,n,r){const o=e.frameContextLines??r?.getDataCollectionOptions().frameContextLines??KR;return ZR(t,o)}})),SO=QR;function ZR(e,t){const n=pa.document,r=pa.location&&Up(pa.location.href);if(!n||!r)return e;const o=e.exception?.values;if(!o?.length)return e;const s=n.documentElement.innerHTML;if(!s)return e;const i=["<!DOCTYPE html>","<html>",...s.split(`
494
+ `),"</html>"];return o.forEach(a=>{const c=a.stacktrace;c?.frames&&(c.frames=c.frames.map(u=>eC(u,i,r,t)))}),e}function eC(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Qg(t,e,r),e}const tC="GraphQLClient",nC=(e=>({name:tC,setup(t){rC(t,e),oC(t,e)}}));function rC(e,t){e.on("beforeOutgoingRequestSpan",(n,r)=>{const s=J(n).data||{};if(!(s[ge]==="http.client"))return;const c=s[Fn]||s["http.url"]||s.url,u=s[I_]||s["http.method"];if(!ot(c)||!ot(u))return;const{endpoints:d}=t,l=Ke(c,d),p=gm(r);if(l&&p){const f=_m(p);if(f){const h=mm(f);n.updateName(`${u} ${c} (${h})`),Mi(f)&&e.getDataCollectionOptions().graphQL.document===!0&&n.setAttribute(fp,f.query),xi(f)&&(n.setAttribute("graphql.persisted_query.hash.sha256",f.extensions.persistedQuery.sha256Hash),n.setAttribute("graphql.persisted_query.version",f.extensions.persistedQuery.version))}}})}function oC(e,t){e.on("beforeOutgoingRequestBreadcrumb",(n,r)=>{const{category:o,type:s,data:i}=n;if(s==="http"&&(o==="fetch"||o==="xhr")){const d=i?.url,{endpoints:l}=t,p=Ke(d,l),f=gm(r);if(p&&i&&f){const h=_m(f);if(!i.graphql&&h){const m=mm(h);i["graphql.operation"]=m,Mi(h)&&e.getDataCollectionOptions().graphQL.document===!0&&(i[fp]=h.query),xi(h)&&(i["graphql.persisted_query.hash.sha256"]=h.extensions.persistedQuery.sha256Hash,i["graphql.persisted_query.version"]=h.extensions.persistedQuery.version)}}}})}function mm(e){if(xi(e))return`persisted ${e.operationName}`;if(Mi(e)){const{query:t,operationName:n}=e,{operationName:r=n,operationType:o}=sC(t);return r?`${o} ${r}`:`${o}`}return"unknown"}function gm(e){const t="xhr"in e;let n;if(t){const r=e.xhr[Mt];n=r&&Bs(r.body)[0]}else{const r=tu(e.input);n=Bs(r)[0]}return n}function sC(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 o=e.match(n);return o?{operationType:o[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function Mi(e){return Je(e)&&typeof e.query=="string"}function xi(e){return Je(e)&&typeof e.operationName=="string"&&Je(e.extensions)&&Je(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash=="string"&&typeof e.extensions.persistedQuery.version=="number"}function _m(e){try{const t=JSON.parse(e);return Mi(t)||xi(t)?t:void 0}catch{return}}const bO=nC,EO=(e={})=>{const t=["script"];function n(r,o,s=0){if(!r)return;const i="shadowRoot"in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(const a of i){if(!(a instanceof HTMLElement))continue;const c=Uc(a,1)||void 0,u=a.tagName.toLowerCase();if(t.includes(u))continue;const d=e.onElement?.({element:a,componentName:c,tagName:u,depth:s})||{};if(d==="skip")continue;if(d==="children"){n(a,o,s+1);continue}const{x:l,y:p,width:f,height:h}=a.getBoundingClientRect(),m={identifier:a.id||void 0,type:c||u,visible:!0,alpha:1,height:h,width:f,x:l,y:p,...d},y=[];m.children=y,n(a,m.children,s+1),o.push(m)}}return{name:"ViewHierarchy",processEvent:(r,o)=>{if(r.type!==void 0||e.shouldAttach?.(r,o)===!1)return r;const s={rendering_system:"DOM",positioning:"absolute",windows:[]};n(e.rootElement?.()||P.document.body,s.windows);const i={filename:"view-hierarchy.json",attachmentType:"event.view_hierarchy",contentType:"application/json",data:JSON.stringify(s)};return o.attachments=o.attachments||[],o.attachments.push(i),r}}},pe=$,nu="sentryReplaySession",iC="replay_event",ru="Unable to send Replay",aC=3e5,cC=9e5,uC=5e3,lC=5500,dC=6e4,fC=5e3,pC=3,_d=15e4,Vo=5e3,hC=3e3,mC=300,ou=2e7,gC=4999,_C=5e4,yd=36e5;var yC=Object.defineProperty,SC=(e,t,n)=>t in e?yC(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sd=(e,t,n)=>SC(e,typeof t!="symbol"?t+"":t,n),Te=(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))(Te||{});function bC(e){return e.nodeType===e.ELEMENT_NODE}function Gr(e){return e?.host?.shadowRoot===e}function Vr(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function EC(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function vC(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(" ")+";"}function Us(e){try{const t=e.rules||e.cssRules;return t?EC(Array.from(t,ym).join("")):null}catch{return null}}function TC(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,o=r[n],s=r.getPropertyPriority(o);t+=`${o}:${r.getPropertyValue(o)}${s?" !important":""};`}return`${e.selectorText} { ${t} }`}function ym(e){let t;if(wC(e))try{t=Us(e.styleSheet)||vC(e)}catch{}else if(kC(e)){let n=e.cssText;const r=e.selectorText.includes(":"),o=typeof e.style.all=="string"&&e.style.all;if(o&&(n=TC(e)),r&&(n=IC(n)),r||o)return n}return t||e.cssText}function IC(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function wC(e){return"styleSheet"in e}function kC(e){return"selectorText"in e}let Sm=class{constructor(){Sd(this,"idNodeMap",new Map),Sd(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function RC(){return new Sm}function Ni({maskInputOptions:e,tagName:t,type:n}){return t==="OPTION"&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||n==="password"||t==="INPUT"&&!n&&e.text)}function ro({isMasked:e,element:t,value:n,maskInputFn:r}){let o=n||"";return e?(r&&(o=r(o,t)),"*".repeat(o.length)):o}function yr(e){return e.toLowerCase()}function Ka(e){return e.toUpperCase()}const bd="__rrweb_original__";function CC(e){const t=e.getContext("2d");if(!t)return!0;const n=50;for(let r=0;r<e.width;r+=n)for(let o=0;o<e.height;o+=n){const s=t.getImageData,i=bd in s?s[bd]:s;if(new Uint32Array(i.call(t,r,o,Math.min(n,e.width-r),Math.min(n,e.height-o)).data.buffer).some(c=>c!==0))return!1}return!0}function su(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?yr(t):null}function Hs(e,t,n){return t==="INPUT"&&(n==="radio"||n==="checkbox")?e.getAttribute("value")||"":e.value}function bm(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}const r=/\.([0-9a-z]+)(?:$)/i;return n.pathname.match(r)?.[1]??null}const Ed={};function Em(e){const t=Ed[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch{}return Ed[e]=r.bind(window)}function Xa(...e){return Em("setTimeout")(...e)}function vm(...e){return Em("clearTimeout")(...e)}function Tm(e){try{return e.contentDocument}catch{}}function AC(e){try{return e.contentWindow}catch{}}let MC=1;const xC=new RegExp("[^a-z0-9-_:]"),oo=-2;function iu(){return MC++}function NC(e){if(e instanceof HTMLFormElement)return"form";const t=yr(e.tagName);return xC.test(t)?"div":t}function OC(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let Vn,vd;const LC=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,PC=/^(?:[a-z+]+:)?\/\//i,DC=/^www\..*/i,FC=/^(data:)([^,]*),(.*)/i;function $C(e,t){if(!e||t.size===0)return e;try{const n=e.split(";"),r=[];for(let o of n){if(o=o.trim(),!o)continue;const s=o.indexOf(":");if(s===-1){r.push(o);continue}const i=o.slice(0,s).trim();t.has(i)||r.push(o)}return r.join("; ")+(r.length>0&&e.endsWith(";")?";":"")}catch(n){return console.warn("Error filtering CSS properties:",n),e}}function Ws(e,t){return(e||"").replace(LC,(n,r,o,s,i,a)=>{const c=o||i||a,u=r||s||"";if(!c)return n;if(PC.test(c)||DC.test(c))return`url(${u}${c}${u})`;if(FC.test(c))return`url(${u}${c}${u})`;if(c[0]==="/")return`url(${u}${OC(t)+c}${u})`;const d=t.split("/"),l=c.split("/");d.pop();for(const p of l)p!=="."&&(p===".."?d.pop():d.push(p));return`url(${u}${d.join("/")}${u})`})}const BC=/^[^ \t\n\r\u000c]+/,UC=/^[, \t\n\r\u000c]+/;function HC(e,t){if(t.trim()==="")return t;let n=0;function r(s){let i;const a=s.exec(t.substring(n));return a?(i=a[0],n+=i.length,i):""}const o=[];for(;r(UC),!(n>=t.length);){let s=r(BC);if(s.slice(-1)===",")s=Xn(e,s.substring(0,s.length-1)),o.push(s);else{let i="";s=Xn(e,s);let a=!1;for(;;){const c=t.charAt(n);if(c===""){o.push((s+i).trim());break}else if(a)c===")"&&(a=!1);else if(c===","){n+=1,o.push((s+i).trim());break}else c==="("&&(a=!0);i+=c,n+=1}}}return o.join(", ")}const Td=new WeakMap;function Xn(e,t){return!t||t.trim()===""?t:Oi(e,t)}function WC(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Oi(e,t){let n=Td.get(e);if(n||(n=e.createElement("a"),Td.set(e,n)),!t)t="";else if(t.startsWith("blob:")||t.startsWith("data:"))return t;return n.setAttribute("href",t),n.href}function Im(e,t,n,r,o,s,i){if(!r)return r;if(n==="src"||n==="href"&&!(t==="use"&&r[0]==="#"))return Xn(e,r);if(n==="xlink:href"&&r[0]!=="#")return Xn(e,r);if(n==="background"&&(t==="table"||t==="td"||t==="th"))return Xn(e,r);if(n==="srcset")return HC(e,r);if(n==="style"){let a=Ws(r,Oi(e));return i&&i.size>0&&(a=$C(a,i)),a}else if(t==="object"&&n==="data")return Xn(e,r);return typeof s=="function"?s(n,r,o):r}function wm(e,t,n){return(e==="video"||e==="audio")&&t==="autoplay"}function jC(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 o=e.classList.length;o--;){const s=e.classList[o];if(t.test(s))return!0}if(n)return e.matches(n)}catch{}return!1}function qC(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function bn(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:bn(e.parentNode,t,n,r+1)}function Qn(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(qC(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function Sr(e,t,n,r,o,s){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(i===null)return!1;if(i.tagName==="INPUT"){const u=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(u))return!0}let a=-1,c=-1;if(s){if(c=bn(i,Qn(r,o)),c<0)return!0;a=bn(i,Qn(t,n),c>=0?c:1/0)}else{if(a=bn(i,Qn(t,n)),a<0)return!1;c=bn(i,Qn(r,o),a>=0?a:1/0)}return a>=0?c>=0?a<=c:!0:c>=0?!1:!!s}catch{}return!!s}function zC(e,t,n){const r=AC(e);if(!r)return;let o=!1,s;try{s=r.document.readyState}catch{return}if(s!=="complete"){const a=Xa(()=>{o||(t(),o=!0)},n);e.addEventListener("load",()=>{vm(a),o=!0,t()});return}const i="about:blank";if(r.location.href!==i||e.src===i||e.src==="")return Xa(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function GC(e,t,n){let r=!1,o;try{o=e.sheet}catch{o=null}if(o)return;const s=Xa(()=>{r||(t(),r=!0)},n);e.addEventListener("load",()=>{vm(s),r=!0,t()})}function VC(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskAttributeFn:c,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,inlineStylesheet:f,maskInputOptions:h={},maskTextFn:m,maskInputFn:y,dataURLOptions:_={},inlineImages:S,recordCanvas:w,keepIframeSrcFn:E,newlyAddedElement:C=!1,ignoreCSSAttributes:x}=t,v=YC(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Te.Document,childNodes:[],compatMode:e.compatMode}:{type:Te.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Te.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:v};case e.ELEMENT_NODE:return KC(e,{doc:n,blockClass:o,blockSelector:s,unblockSelector:i,inlineStylesheet:f,maskAttributeFn:c,maskInputOptions:h,maskInputFn:y,dataURLOptions:_,inlineImages:S,recordCanvas:w,keepIframeSrcFn:E,newlyAddedElement:C,rootId:v,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,ignoreCSSAttributes:x});case e.TEXT_NODE:return JC(e,{doc:n,maskAllText:a,maskTextClass:u,unmaskTextClass:d,maskTextSelector:l,unmaskTextSelector:p,maskTextFn:m,maskInputOptions:h,maskInputFn:y,rootId:v});case e.CDATA_SECTION_NODE:return{type:Te.CDATA,textContent:"",rootId:v};case e.COMMENT_NODE:return{type:Te.Comment,textContent:e.textContent||"",rootId:v};default:return!1}}function YC(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return n===1?void 0:n}function JC(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:o,maskTextSelector:s,unmaskTextSelector:i,maskTextFn:a,maskInputOptions:c,maskInputFn:u,rootId:d}=t,l=e.parentNode&&e.parentNode.tagName;let p=e.textContent;const f=l==="STYLE"?!0:void 0,h=l==="SCRIPT"?!0:void 0,m=l==="TEXTAREA"?!0:void 0;if(f&&p){try{e.nextSibling||e.previousSibling||e.parentNode.sheet?.cssRules&&(p=Us(e.parentNode.sheet))}catch(_){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${_}`,e)}p=Ws(p,Oi(t.doc))}h&&(p="SCRIPT_PLACEHOLDER");const y=Sr(e,r,s,o,i,n);if(!f&&!h&&!m&&p&&y&&(p=a?a(p,e.parentElement):p.replace(/[\S]/g,"*")),m&&p&&(c.textarea||y)&&(p=u?u(p,e.parentNode):p.replace(/[\S]/g,"*")),l==="OPTION"&&p){const _=Ni({type:null,tagName:l,maskInputOptions:c});p=ro({isMasked:Sr(e,r,s,o,i,_),element:e,value:p,maskInputFn:u})}return{type:Te.Text,textContent:p||"",isStyle:f,rootId:d}}function KC(e,t){const{doc:n,blockClass:r,blockSelector:o,unblockSelector:s,inlineStylesheet:i,maskInputOptions:a={},maskAttributeFn:c,maskInputFn:u,dataURLOptions:d={},inlineImages:l,recordCanvas:p,keepIframeSrcFn:f,newlyAddedElement:h=!1,rootId:m,maskTextClass:y,unmaskTextClass:_,maskTextSelector:S,unmaskTextSelector:w,ignoreCSSAttributes:E}=t,C=jC(e,r,o,s),x=NC(e);let v={};const O=e.attributes.length;for(let b=0;b<O;b++){const N=e.attributes[b];N.name&&!wm(x,N.name,N.value)&&(v[N.name]=Im(n,x,yr(N.name),N.value,e,c,E))}if(x==="link"&&i){const b=Array.from(n.styleSheets).find(A=>A.href===e.href);let N=null;b&&(N=Us(b)),N&&(v.rel=null,v.href=null,v.crossorigin=null,v._cssText=Ws(N,b.href))}if(x==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const b=Us(e.sheet);b&&(v._cssText=Ws(b,Oi(n)))}if(x==="input"||x==="textarea"||x==="select"||x==="option"){const b=e,N=su(b),A=Hs(b,Ka(x),N),L=b.checked;if(N!=="submit"&&N!=="button"&&A){const j=Sr(b,y,S,_,w,Ni({type:N,tagName:Ka(x),maskInputOptions:a}));v.value=ro({isMasked:j,element:b,value:A,maskInputFn:u})}L&&(v.checked=L)}if(x==="option"&&(e.selected&&!a.select?v.selected=!0:delete v.selected),x==="canvas"&&p){if(e.__context==="2d")CC(e)||(v.rr_dataURL=e.toDataURL(d.type,d.quality));else if(!("__context"in e)){const b=e.toDataURL(d.type,d.quality),N=n.createElement("canvas");N.width=e.width,N.height=e.height;const A=N.toDataURL(d.type,d.quality);b!==A&&(v.rr_dataURL=b)}}if(x==="img"&&l){Vn||(Vn=n.createElement("canvas"),vd=Vn.getContext("2d"));const b=e,N=b.currentSrc||b.getAttribute("src")||"<unknown-src>",A=b.crossOrigin,L=()=>{b.removeEventListener("load",L);try{Vn.width=b.naturalWidth,Vn.height=b.naturalHeight,vd.drawImage(b,0,0),v.rr_dataURL=Vn.toDataURL(d.type,d.quality)}catch(j){if(b.crossOrigin!=="anonymous"){b.crossOrigin="anonymous",b.complete&&b.naturalWidth!==0?L():b.addEventListener("load",L);return}else console.warn(`Cannot inline img src=${N}! Error: ${j}`)}b.crossOrigin==="anonymous"&&(A?v.crossOrigin=A:b.removeAttribute("crossorigin"))};b.complete&&b.naturalWidth!==0?L():b.addEventListener("load",L)}if((x==="audio"||x==="video")&&(v.rr_mediaState=e.paused?"paused":"played",v.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(v.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(v.rr_scrollTop=e.scrollTop)),C){const{width:b,height:N}=e.getBoundingClientRect();v={class:v.class,rr_width:`${b}px`,rr_height:`${N}px`}}x==="iframe"&&!f(v.src)&&(!C&&!Tm(e)&&(v.rr_src=v.src),delete v.src);let k;try{customElements.get(x)&&(k=!0)}catch{}return{type:Te.Element,tagName:x,attributes:v,childNodes:[],isSVG:WC(e)||void 0,needBlock:C,rootId:m,isCustom:k}}function fe(e){return e==null?"":e.toLowerCase()}function XC(e,t){if(t.comment&&e.type===Te.Comment)return!0;if(e.type===Te.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"&&bm(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(fe(e.attributes.name).match(/^msapplication-tile(image|color)$/)||fe(e.attributes.name)==="application-name"||fe(e.attributes.rel)==="icon"||fe(e.attributes.rel)==="apple-touch-icon"||fe(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&fe(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(fe(e.attributes.property).match(/^(og|twitter|fb):/)||fe(e.attributes.name).match(/^(og|twitter):/)||fe(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(fe(e.attributes.name)==="robots"||fe(e.attributes.name)==="googlebot"||fe(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(fe(e.attributes.name)==="author"||fe(e.attributes.name)==="generator"||fe(e.attributes.name)==="framework"||fe(e.attributes.name)==="publisher"||fe(e.attributes.name)==="progid"||fe(e.attributes.property).match(/^article:/)||fe(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(fe(e.attributes.name)==="google-site-verification"||fe(e.attributes.name)==="yandex-verification"||fe(e.attributes.name)==="csrf-token"||fe(e.attributes.name)==="p:domain_verify"||fe(e.attributes.name)==="verify-v1"||fe(e.attributes.name)==="verification"||fe(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function Zn(e,t){const{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p=!1,inlineStylesheet:f=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:y,maskInputFn:_,slimDOMOptions:S,dataURLOptions:w={},inlineImages:E=!1,recordCanvas:C=!1,onSerialize:x,onIframeLoad:v,iframeLoadTimeout:O=5e3,onBlockedImageLoad:k,onStylesheetLoad:b,stylesheetLoadTimeout:N=5e3,keepIframeSrcFn:A=()=>!1,newlyAddedElement:L=!1,ignoreCSSAttributes:j}=t;let{preserveWhiteSpace:X=!0}=t;const G=VC(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:_,dataURLOptions:w,inlineImages:E,recordCanvas:C,keepIframeSrcFn:A,newlyAddedElement:L,ignoreCSSAttributes:j});if(!G)return console.warn(e,"not serialized"),null;let B;r.hasNode(e)?B=r.getId(e):XC(G,S)||!X&&G.type===Te.Text&&!G.isStyle&&!G.textContent.trim().length?B=oo:B=iu();const M=Object.assign(G,{id:B});if(r.add(e,M),B===oo)return null;x&&x(e);let U=!p;if(M.type===Te.Element){U=U&&!M.needBlock;const D=e.shadowRoot;D&&Vr(D)&&(M.isShadowHost=!0)}if((M.type===Te.Document||M.type===Te.Element)&&U){S.headWhitespace&&M.type===Te.Element&&M.tagName==="head"&&(X=!1);const D={doc:n,mirror:r,blockClass:o,blockSelector:s,maskAllText:a,unblockSelector:i,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:p,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:_,slimDOMOptions:S,dataURLOptions:w,inlineImages:E,recordCanvas:C,preserveWhiteSpace:X,onSerialize:x,onIframeLoad:v,iframeLoadTimeout:O,onBlockedImageLoad:k,onStylesheetLoad:b,stylesheetLoadTimeout:N,keepIframeSrcFn:A,ignoreCSSAttributes:j},Q=e.childNodes?Array.from(e.childNodes):[];for(const se of Q){const te=Zn(se,D);te&&M.childNodes.push(te)}if(bC(e)&&e.shadowRoot)for(const se of Array.from(e.shadowRoot.childNodes)){const te=Zn(se,D);te&&(Vr(e.shadowRoot)&&(te.isShadow=!0),M.childNodes.push(te))}}if(e.parentNode&&Gr(e.parentNode)&&Vr(e.parentNode)&&(M.isShadow=!0),M.type===Te.Element&&M.tagName==="iframe"&&!M.needBlock&&zC(e,()=>{const D=Tm(e);if(D&&v){const Q=Zn(D,{doc:D,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:_,slimDOMOptions:S,dataURLOptions:w,inlineImages:E,recordCanvas:C,preserveWhiteSpace:X,onSerialize:x,onIframeLoad:v,iframeLoadTimeout:O,onStylesheetLoad:b,stylesheetLoadTimeout:N,keepIframeSrcFn:A,ignoreCSSAttributes:j});Q&&v(e,Q)}},O),M.type===Te.Element&&M.tagName==="img"&&!e.complete&&M.needBlock){const D=e,Q=()=>{if(D.isConnected&&!D.complete&&k)try{const se=D.getBoundingClientRect();se.width>0&&se.height>0&&k(D,M,se)}catch{}D.removeEventListener("load",Q)};D.isConnected&&D.addEventListener("load",Q)}return M.type===Te.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&bm(M.attributes.href)==="css")&&GC(e,()=>{if(b){const D=Zn(e,{doc:n,mirror:r,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:a,maskTextClass:c,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:_,slimDOMOptions:S,dataURLOptions:w,inlineImages:E,recordCanvas:C,preserveWhiteSpace:X,onSerialize:x,onIframeLoad:v,iframeLoadTimeout:O,onStylesheetLoad:b,stylesheetLoadTimeout:N,keepIframeSrcFn:A,ignoreCSSAttributes:j});D&&b(e,D)}},N),M.type===Te.Element&&delete M.needBlock,M}function QC(e,t){const{mirror:n=new Sm,blockClass:r="rr-block",blockSelector:o=null,unblockSelector:s=null,maskAllText:i=!1,maskTextClass:a="rr-mask",unmaskTextClass:c=null,maskTextSelector:u=null,unmaskTextSelector:d=null,inlineStylesheet:l=!0,inlineImages:p=!1,recordCanvas:f=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:_,slimDOM:S=!1,dataURLOptions:w,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:x,iframeLoadTimeout:v,onBlockedImageLoad:O,onStylesheetLoad:k,stylesheetLoadTimeout:b,keepIframeSrcFn:N=()=>!1,ignoreCSSAttributes:A=new Set([])}=t||{};return Zn(e,{doc:e,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,maskAllText:i,maskTextClass:a,unmaskTextClass:c,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:l,maskInputOptions:h===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:h===!1?{}:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:_,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:w,inlineImages:p,recordCanvas:f,preserveWhiteSpace:E,onSerialize:C,onIframeLoad:x,iframeLoadTimeout:v,onBlockedImageLoad:O,onStylesheetLoad:k,stylesheetLoadTimeout:b,keepIframeSrcFn:N,newlyAddedElement:!1,ignoreCSSAttributes:A})}function xe(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const Yn=`Please stop import mirror directly. Instead of that,\r
495
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
496
+ or you can use record.mirror to access the mirror instance during recording.`;let Id={map:{},getId(){return console.error(Yn),-1},getNode(){return console.error(Yn),null},removeNodeFromMap(){console.error(Yn)},has(){return console.error(Yn),!1},reset(){console.error(Yn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Id=new Proxy(Id,{get(e,t,n){return t==="map"&&console.error(Yn),Reflect.get(e,t,n)}}));function so(e,t,n={}){let r=null,o=0;return function(...s){const i=Date.now();!o&&n.leading===!1&&(o=i);const a=t-(i-o),c=this;a<=0||a>t?(r&&(sA(r),r=null),o=i,e.apply(c,s)):!r&&n.trailing!==!1&&(r=Li(()=>{o=n.leading===!1?0:Date.now(),r=null,e.apply(c,s)},a))}}function km(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){Li(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>km(e,t,s||{},!0)}function au(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}let js=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(js=()=>new Date().getTime());function Rm(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}}function Cm(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Am(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Mm(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Ue(e,t,n,r,o){if(!e)return!1;const s=Mm(e);if(!s)return!1;const i=Qn(t,n);if(!o){const u=r&&s.matches(r);return i(s)&&!u}const a=bn(s,i);let c=-1;return a<0?!1:(r&&(c=bn(s,Qn(null,r))),a>-1&&c<0?!0:a<c)}function ZC(e,t){return t.getId(e)!==-1}function ha(e,t){return t.getId(e)===oo}function xm(e,t){if(Gr(e))return!1;const n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?xm(e.parentNode,t):!0:!0}function Qa(e){return!!e.changedTouches}function eA(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})}function Nm(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Om(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function Za(e){return!!e?.shadowRoot}class tA{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,n){if(this.has(t))return this.getId(t);let r;return n===void 0?r=this.id++:r=n,this.styleIDMap.set(t,r),this.idStyleMap.set(r,t),r}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Lm(e){let t=null;return e.getRootNode?.()?.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function nA(e){let t=e,n;for(;n=Lm(t);)t=n;return t}function rA(e){const t=e.ownerDocument;if(!t)return!1;const n=nA(e);return t.contains(n)}function Pm(e){const t=e.ownerDocument;return t?t.contains(e)||rA(e):!1}const wd={};function cu(e){const t=wd[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch{}return wd[e]=r.bind(window)}function oA(...e){return cu("requestAnimationFrame")(...e)}function Li(...e){return cu("setTimeout")(...e)}function sA(...e){return cu("clearTimeout")(...e)}var Z=(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))(Z||{}),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||{}),At=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(At||{}),Jn=(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))(Jn||{});let Yr;function iA(e){Yr=e}function aA(){Yr=void 0}const re=e=>Yr?((...n)=>{try{return e(...n)}catch(r){if(Yr&&Yr(r)===!0)return()=>{};throw r}}):e;var kd="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cA=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Yo=0;Yo<kd.length;Yo++)cA[kd.charCodeAt(Yo)]=Yo;class Rd{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}function uu(e){try{return e.contentDocument}catch{}}function io(e){try{return e.contentWindow}catch{}}class uA{constructor(t){this.doc=t,this.unattachedDoc=null}parse(t){return this.parseWithConstructableStylesheet(t)||this.parseWithDetachedElement(t)}parseWithConstructableStylesheet(t){if(typeof CSSStyleSheet>"u"||typeof CSSStyleSheet.prototype.replaceSync!="function")return null;try{const n=new CSSStyleSheet;n.replaceSync(`x { ${t} }`);const r=n.cssRules[0];return!r||r.type!==CSSRule.STYLE_RULE?null:r.style}catch{return null}}parseWithDetachedElement(t){const n=this.getUnattachedDoc().createElement("span");return n.setAttribute("style",t),n.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}}function Cd(e){return"__ln"in e}class lA{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let n=this.head;for(let r=0;r<t;r++)n=n?.next||null;return n}addNode(t){const n={value:t,previous:null,next:null};if(t.__ln=n,t.previousSibling&&Cd(t.previousSibling)){const r=t.previousSibling.__ln.next;n.next=r,n.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=n,r&&(r.previous=n)}else if(t.nextSibling&&Cd(t.nextSibling)&&t.nextSibling.__ln.previous){const r=t.nextSibling.__ln.previous;n.previous=r,n.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=n,r&&(r.next=n)}else this.head&&(this.head.previous=n),n.next=this.head,this.head=n;n.next===null&&(this.tail=n),this.length++}removeNode(t){const n=t.__ln;this.head&&(n.previous?(n.previous.next=n.next,n.next?n.next.previous=n.previous:this.tail=n.previous):(this.head=n.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Ad=(e,t)=>`${e}@${t}`;class dA{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=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],n=new Set,r=new lA,o=c=>{let u=c,d=oo;for(;d===oo;)u=u&&u.nextSibling,d=u&&this.mirror.getId(u);return d},s=c=>{if(!c.parentNode||!Pm(c))return;const u=Gr(c.parentNode)?this.mirror.getId(Lm(c)):this.mirror.getId(c.parentNode),d=o(c);if(u===-1||d===-1)return r.addNode(c);const l=Zn(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:p=>{Nm(p,this.mirror)&&!Ue(p,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(p),Om(p,this.mirror)&&this.stylesheetManager.trackLinkElement(p),Za(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(p,f)=>{if(Ue(p,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(p,f);const h=io(p);h&&this.canvasManager.addWindow(h),this.shadowDomManager.observeAttachShadow(p)},onStylesheetLoad:(p,f)=>{this.stylesheetManager.attachLinkElement(p,f)},onBlockedImageLoad:(p,f,{width:h,height:m})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:f.id,attributes:{style:{width:`${h}px`,height:`${m}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});l&&(t.push({parentId:u,nextId:d,node:l}),n.add(l.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)Md(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||s(c);for(const c of this.addedSet)!xd(this.droppedSet,c)&&!Md(this.removes,c,this.mirror)||xd(this.movedSet,c)?s(c):this.droppedSet.add(c);let i=null;for(;r.length;){let c=null;if(i){const u=this.mirror.getId(i.value.parentNode),d=o(i.value);u!==-1&&d!==-1&&(c=i)}if(!c){let u=r.tail;for(;u;){const d=u;if(u=u.previous,d){const l=this.mirror.getId(d.value.parentNode);if(o(d.value)===-1)continue;if(l!==-1){c=d;break}else{const f=d.value;if(f.parentNode&&f.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const h=f.parentNode.host;if(this.mirror.getId(h)!==-1){c=d;break}}}}}}if(!c){for(;r.head;)r.removeNode(r.head.value);break}i=c.previous,r.removeNode(c.value),s(c.value)}const a={texts:this.texts.map(c=>({id:this.mirror.getId(c.node),value:c.value})).filter(c=>!n.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 d=JSON.stringify(c.styleDiff),l=JSON.stringify(c._unchangedStyles);d.length<u.style.length&&(d+l).split("var(").length===u.style.split("var(").length&&(u.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:u}}).filter(c=>!n.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!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=t=>{if(!ha(t.target,this.mirror))switch(t.type){case"characterData":{const n=t.target.textContent;!Ue(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&n!==t.oldValue&&this.texts.push({value:Sr(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&n?this.maskTextFn?this.maskTextFn(n,Mm(t.target)):n.replace(/[\S]/g,"*"):n,node:t.target});break}case"attributes":{const n=t.target;let r=t.attributeName,o=t.target.getAttribute(r);if(r==="value"){const i=su(n),a=n.tagName;o=Hs(n,a,i);const c=Ni({maskInputOptions:this.maskInputOptions,tagName:a,type:i}),u=Sr(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,c);o=ro({isMasked:u,element:n,value:o,maskInputFn:this.maskInputFn})}if(Ue(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||o===t.oldValue)return;let s=this.attributeMap.get(t.target);if(n.tagName==="IFRAME"&&r==="src"&&!this.keepIframeSrcFn(o))if(!uu(n))r="rr_src";else return;if(s||(s={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(t.target,s)),r==="type"&&n.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&n.setAttribute("data-rr-is-password","true"),!wm(n.tagName,r)&&(s.attributes[r]=Im(this.doc,yr(n.tagName),yr(r),o,n,this.maskAttributeFn),r==="style")){const i=t.oldValue?this.styleDeclarationParser.parse(t.oldValue):null;for(const a of Array.from(n.style)){const c=n.style.getPropertyValue(a),u=n.style.getPropertyPriority(a);c!==(i?.getPropertyValue(a)||"")||u!==(i?.getPropertyPriority(a)||"")?u===""?s.styleDiff[a]=c:s.styleDiff[a]=[c,u]:s._unchangedStyles[a]=[c,u]}if(i)for(const a of Array.from(i))n.style.getPropertyValue(a)===""&&(s.styleDiff[a]=!1)}break}case"childList":{if(Ue(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;t.addedNodes.forEach(n=>this.genAdds(n,t.target)),t.removedNodes.forEach(n=>{const r=this.mirror.getId(n),o=Gr(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ue(t.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||ha(n,this.mirror)||!ZC(n,this.mirror)||(this.addedSet.has(n)?(ec(this.addedSet,n),this.droppedSet.add(n)):this.addedSet.has(t.target)&&r===-1||xm(t.target,this.mirror)||(this.movedSet.has(n)&&this.movedMap[Ad(r,o)]?ec(this.movedSet,n):this.removes.push({parentId:o,id:r,isShadow:Gr(t.target)&&Vr(t.target)?!0:void 0})),this.mapRemoves.push(n))});break}}},this.genAdds=(t,n)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(ha(t,this.mirror))return;this.movedSet.add(t);let r=null;n&&this.mirror.hasNode(n)&&(r=this.mirror.getId(n)),r&&r!==-1&&(this.movedMap[Ad(this.mirror.getId(t),r)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ue(t,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(t.childNodes&&t.childNodes.forEach(r=>this.genAdds(r)),Za(t)&&t.shadowRoot.childNodes.forEach(r=>{this.processedNodeManager.add(r,this),this.genAdds(r,t)}))}}}init(t){["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(n=>{this[n]=t[n]}),this.styleDeclarationParser=new uA(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 ec(e,t){e.delete(t),t.childNodes?.forEach(n=>ec(e,n))}function Md(e,t,n){return e.length===0?!1:fA(e,t,n)}function fA(e,t,n){let r=t.parentNode;for(;r;){const o=n.getId(r);if(e.some(s=>s.id===o))return!0;r=r.parentNode}return!1}function xd(e,t){return e.size===0?!1:Dm(e,t)}function Dm(e,t){const{parentNode:n}=t;return n?e.has(n)?!0:Dm(e,n):!1}const er=[];function Oo(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}function Fm(e,t){const n=new dA;er.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const o=window?.Zone?.__symbol__?.("MutationObserver");o&&window[o]&&(r=window[o]);const s=new r(re(i=>{e.onMutation&&e.onMutation(i)===!1||n.processMutations.bind(n)(i)}));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function pA({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};const o=typeof t.mousemove=="number"?t.mousemove:50,s=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let i=[],a;const c=so(re(l=>{const p=Date.now()-a;e(i.map(f=>(f.timeOffset-=p,f)),l),i=[],a=null}),s),u=re(so(re(l=>{const p=Oo(l),{clientX:f,clientY:h}=Qa(l)?l.changedTouches[0]:l;a||(a=js()),i.push({x:f,y:h,id:r.getId(p),timeOffset:js()-a}),c(typeof DragEvent<"u"&&l instanceof DragEvent?z.Drag:l instanceof MouseEvent?z.MouseMove:z.TouchMove)}),o,{trailing:!1})),d=[xe("mousemove",u,n),xe("touchmove",u,n),xe("drag",u,n)];return re(()=>{d.forEach(l=>l())})}function hA({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){if(i.mouseInteraction===!1)return()=>{};const a=i.mouseInteraction===!0||i.mouseInteraction===void 0?{}:i.mouseInteraction,c=[];let u=null;const d=l=>p=>{const f=Oo(p);if(Ue(f,r,o,s,!0))return;let h=null,m=l;if("pointerType"in p){switch(p.pointerType){case"mouse":h=At.Mouse;break;case"touch":h=At.Touch;break;case"pen":h=At.Pen;break}h===At.Touch?Me[l]===Me.MouseDown?m="TouchStart":Me[l]===Me.MouseUp&&(m="TouchEnd"):At.Pen}else Qa(p)&&(h=At.Touch);h!==null?(u=h,(m.startsWith("Touch")&&h===At.Touch||m.startsWith("Mouse")&&h===At.Mouse)&&(h=null)):Me[l]===Me.Click&&(h=u,u=null);const y=Qa(p)?p.changedTouches[0]:p;if(!y)return;const _=n.getId(f),{clientX:S,clientY:w}=y;re(e)({type:Me[m],id:_,x:S,y:w,...h!==null&&{pointerType:h}})};return Object.keys(Me).filter(l=>Number.isNaN(Number(l))&&!l.endsWith("_Departed")&&a[l]!==!1).forEach(l=>{let p=yr(l);const f=d(l);if(window.PointerEvent)switch(Me[l]){case Me.MouseDown:case Me.MouseUp:p=p.replace("mouse","pointer");break;case Me.TouchStart:case Me.TouchEnd:return}c.push(xe(p,f,t))}),re(()=>{c.forEach(l=>l())})}function $m({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,sampling:i}){const a=re(so(re(c=>{const u=Oo(c);if(!u||Ue(u,r,o,s,!0))return;const d=n.getId(u);if(u===t&&t.defaultView){const l=Rm(t.defaultView);e({id:d,x:l.left,y:l.top})}else e({id:d,x:u.scrollLeft,y:u.scrollTop})}),i.scroll||100));return xe("scroll",a,t)}function mA({viewportResizeCb:e},{win:t}){let n=-1,r=-1;const o=re(so(re(()=>{const s=Cm(),i=Am();(n!==s||r!==i)&&(e({width:Number(i),height:Number(s)}),n=s,r=i)}),200));return xe("resize",o,t)}const gA=["INPUT","TEXTAREA","SELECT"],Nd=new WeakMap;function _A({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,ignoreClass:i,ignoreSelector:a,maskInputOptions:c,maskInputFn:u,sampling:d,userTriggeredOnInput:l,maskTextClass:p,unmaskTextClass:f,maskTextSelector:h,unmaskTextSelector:m}){function y(v){let O=Oo(v);const k=v.isTrusted,b=O&&Ka(O.tagName);if(b==="OPTION"&&(O=O.parentElement),!O||!b||gA.indexOf(b)<0||Ue(O,r,o,s,!0))return;const N=O;if(N.classList.contains(i)||a&&N.matches(a))return;const A=su(O);let L=Hs(N,b,A),j=!1;const X=Ni({maskInputOptions:c,tagName:b,type:A}),G=Sr(O,p,h,f,m,X);(A==="radio"||A==="checkbox")&&(j=O.checked),L=ro({isMasked:G,element:O,value:L,maskInputFn:u}),_(O,l?{text:L,isChecked:j,userTriggered:k}:{text:L,isChecked:j});const B=O.name;A==="radio"&&B&&j&&t.querySelectorAll(`input[type="radio"][name="${B}"]`).forEach(M=>{if(M!==O){const U=ro({isMasked:G,element:M,value:Hs(M,b,A),maskInputFn:u});_(M,l?{text:U,isChecked:!j,userTriggered:!1}:{text:U,isChecked:!j})}})}function _(v,O){const k=Nd.get(v);if(!k||k.text!==O.text||k.isChecked!==O.isChecked){Nd.set(v,O);const b=n.getId(v);re(e)({...O,id:b})}}const w=(d.input==="last"?["change"]:["input","change"]).map(v=>xe(v,re(y),t)),E=t.defaultView;if(!E)return()=>{w.forEach(v=>v())};const C=E.Object.getOwnPropertyDescriptor(E.HTMLInputElement.prototype,"value"),x=[[E.HTMLInputElement.prototype,"value"],[E.HTMLInputElement.prototype,"checked"],[E.HTMLSelectElement.prototype,"value"],[E.HTMLTextAreaElement.prototype,"value"],[E.HTMLSelectElement.prototype,"selectedIndex"],[E.HTMLOptionElement.prototype,"selected"]];return C&&C.set&&w.push(...x.map(v=>km(v[0],v[1],{set(){re(y)({target:this,isTrusted:!1})}},!1,E))),re(()=>{w.forEach(v=>v())})}function qs(e){const t=[];function n(r,o){if(Jo("CSSGroupingRule")&&r.parentRule instanceof CSSGroupingRule||Jo("CSSMediaRule")&&r.parentRule instanceof CSSMediaRule||Jo("CSSSupportsRule")&&r.parentRule instanceof CSSSupportsRule||Jo("CSSConditionRule")&&r.parentRule instanceof CSSConditionRule){const i=Array.from(r.parentRule.cssRules).indexOf(r);o.unshift(i)}else if(r.parentStyleSheet){const i=Array.from(r.parentStyleSheet.cssRules).indexOf(r);o.unshift(i)}return o}return n(e,t)}function jt(e,t,n){let r,o;return e?(e.ownerNode?r=t.getId(e.ownerNode):o=n.getId(e),{styleId:o,id:r}):{}}function yA({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const o=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(o,{apply:re((d,l,p)=>{const[f,h]=p,{id:m,styleId:y}=jt(l,t,n.styleMirror);return(m&&m!==-1||y&&y!==-1)&&e({id:m,styleId:y,adds:[{rule:f,index:h}]}),d.apply(l,p)})});const s=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(s,{apply:re((d,l,p)=>{const[f]=p,{id:h,styleId:m}=jt(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,removes:[{index:f}]}),d.apply(l,p)})});let i;r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:re((d,l,p)=>{const[f]=p,{id:h,styleId:m}=jt(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replace:f}),d.apply(l,p)})}));let a;r.CSSStyleSheet.prototype.replaceSync&&(a=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:re((d,l,p)=>{const[f]=p,{id:h,styleId:m}=jt(l,t,n.styleMirror);return(h&&h!==-1||m&&m!==-1)&&e({id:h,styleId:m,replaceSync:f}),d.apply(l,p)})}));const c={};Ko("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(Ko("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),Ko("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),Ko("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const u={};return Object.entries(c).forEach(([d,l])=>{u[d]={insertRule:l.prototype.insertRule,deleteRule:l.prototype.deleteRule},l.prototype.insertRule=new Proxy(u[d].insertRule,{apply:re((p,f,h)=>{const[m,y]=h,{id:_,styleId:S}=jt(f.parentStyleSheet,t,n.styleMirror);return(_&&_!==-1||S&&S!==-1)&&e({id:_,styleId:S,adds:[{rule:m,index:[...qs(f),y||0]}]}),p.apply(f,h)})}),l.prototype.deleteRule=new Proxy(u[d].deleteRule,{apply:re((p,f,h)=>{const[m]=h,{id:y,styleId:_}=jt(f.parentStyleSheet,t,n.styleMirror);return(y&&y!==-1||_&&_!==-1)&&e({id:y,styleId:_,removes:[{index:[...qs(f),m]}]}),p.apply(f,h)})})}),re(()=>{r.CSSStyleSheet.prototype.insertRule=o,r.CSSStyleSheet.prototype.deleteRule=s,i&&(r.CSSStyleSheet.prototype.replace=i),a&&(r.CSSStyleSheet.prototype.replaceSync=a),Object.entries(c).forEach(([d,l])=>{l.prototype.insertRule=u[d].insertRule,l.prototype.deleteRule=u[d].deleteRule})})}function Bm({mirror:e,stylesheetManager:t},n){let r=null;n.nodeName==="#document"?r=e.getId(n):r=e.getId(n.host);const o=n.nodeName==="#document"?n.defaultView?.Document:n.ownerDocument?.defaultView?.ShadowRoot,s=o?.prototype?Object.getOwnPropertyDescriptor(o?.prototype,"adoptedStyleSheets"):void 0;return r===null||r===-1||!o||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){return s.get?.call(this)},set(i){const a=s.set?.call(this,i);if(r!==null&&r!==-1)try{t.adoptStyleSheets(i,r)}catch{}return a}}),re(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function SA({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:o}){const s=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=new Proxy(s,{apply:re((a,c,u)=>{const[d,l,p]=u;if(n.has(d))return s.apply(c,[d,l,p]);const{id:f,styleId:h}=jt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(f&&f!==-1||h&&h!==-1)&&e({id:f,styleId:h,set:{property:d,value:l,priority:p},index:qs(c.parentRule)}),a.apply(c,u)})});const i=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:re((a,c,u)=>{const[d]=u;if(n.has(d))return i.apply(c,[d]);const{id:l,styleId:p}=jt(c.parentRule?.parentStyleSheet,t,r.styleMirror);return(l&&l!==-1||p&&p!==-1)&&e({id:l,styleId:p,remove:{property:d},index:qs(c.parentRule)}),a.apply(c,u)})}),re(()=>{o.CSSStyleDeclaration.prototype.setProperty=s,o.CSSStyleDeclaration.prototype.removeProperty=i})}function bA({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:o,sampling:s,doc:i}){const a=re(u=>so(re(d=>{const l=Oo(d);if(!l||Ue(l,t,n,r,!0))return;const{currentTime:p,volume:f,muted:h,playbackRate:m}=l;e({type:u,id:o.getId(l),currentTime:p,volume:f,muted:h,playbackRate:m})}),s.media||500)),c=[xe("play",a(Jn.Play),i),xe("pause",a(Jn.Pause),i),xe("seeked",a(Jn.Seeked),i),xe("volumechange",a(Jn.VolumeChange),i),xe("ratechange",a(Jn.RateChange),i)];return re(()=>{c.forEach(u=>u())})}function EA({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],o=new WeakMap,s=n.FontFace;n.FontFace=function(c,u,d){const l=new s(c,u,d);return o.set(l,{family:c,buffer:typeof u!="string",descriptors:d,fontSource:typeof u=="string"?u:JSON.stringify(Array.from(new Uint8Array(u)))}),l};const i=au(t.fonts,"add",function(a){return function(c){return Li(re(()=>{const u=o.get(c);u&&(e(u),o.delete(c))}),0),a.apply(this,[c])}});return r.push(()=>{n.FontFace=s}),r.push(i),re(()=>{r.forEach(a=>a())})}function vA(e){const{doc:t,mirror:n,blockClass:r,blockSelector:o,unblockSelector:s,selectionCb:i}=e;let a=!0;const c=re(()=>{const u=t.getSelection();if(!u||a&&u?.isCollapsed)return;a=u.isCollapsed||!1;const d=[],l=u.rangeCount||0;for(let p=0;p<l;p++){const f=u.getRangeAt(p),{startContainer:h,startOffset:m,endContainer:y,endOffset:_}=f;Ue(h,r,o,s,!0)||Ue(y,r,o,s,!0)||d.push({start:n.getId(h),startOffset:m,end:n.getId(y),endOffset:_})}i({ranges:d})});return c(),xe("selectionchange",c)}function TA({doc:e,customElementCb:t}){const n=e.defaultView;return!n||!n.customElements?()=>{}:au(n.customElements,"define",function(o){return function(s,i,a){try{t({define:{name:s}})}catch{}return o.apply(this,[s,i,a])}})}function IA(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Fm(e,e.doc));const o=pA(e),s=hA(e),i=$m(e),a=mA(e,{win:n}),c=_A(e),u=bA(e);let d=()=>{},l=()=>{},p=()=>{},f=()=>{};e.recordDOM&&(d=yA(e,{win:n}),l=Bm(e,e.doc),p=SA(e,{win:n}),e.collectFonts&&(f=EA(e)));const h=vA(e),m=TA(e),y=[];for(const _ of e.plugins)y.push(_.observer(_.callback,n,_.options));return re(()=>{er.forEach(_=>_.reset()),r?.disconnect(),o(),s(),i(),a(),c(),u(),d(),l(),p(),f(),h(),m(),y.forEach(_=>_())})}function Jo(e){return typeof window[e]<"u"}function Ko(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class tc{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,n,r,o){const s=r||this.getIdToRemoteIdMap(t),i=o||this.getRemoteIdToIdMap(t);let a=s.get(n);return a||(a=this.generateIdFn(),s.set(n,a),i.set(a,n)),a}getIds(t,n){const r=this.getIdToRemoteIdMap(t),o=this.getRemoteIdToIdMap(t);return n.map(s=>this.getId(t,s,r,o))}getRemoteId(t,n,r){const o=r||this.getRemoteIdToIdMap(t);if(typeof n!="number")return n;const s=o.get(n);return s||-1}getRemoteIds(t,n){const r=this.getRemoteIdToIdMap(t);return n.map(o=>this.getRemoteId(t,o,r))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let n=this.iframeIdToRemoteIdMap.get(t);return n||(n=new Map,this.iframeIdToRemoteIdMap.set(t,n)),n}getRemoteIdToIdMap(t){let n=this.iframeRemoteIdToIdMap.get(t);return n||(n=new Map,this.iframeRemoteIdToIdMap.set(t,n)),n}}class wA{constructor(){this.crossOriginIframeMirror=new tc(iu),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class kA{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new tc(iu),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new tc(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0);const n=io(t);n&&this.crossOriginIframeMap.set(n,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,n){this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:n}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&io(t)?.addEventListener("message",this.handleMessage.bind(this)),this.loadListener?.(t);const r=uu(t);r&&r.adoptedStyleSheets&&r.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(r.adoptedStyleSheets,this.mirror.getId(r))}handleMessage(t){const n=t;if(n.data.type!=="rrweb"||n.origin!==n.data.origin||!t.source)return;const o=this.crossOriginIframeMap.get(t.source);if(!o)return;const s=this.transformCrossOriginEvent(o,n.data.event);s&&this.wrappedEmit(s,n.data.isCheckout)}transformCrossOriginEvent(t,n){switch(n.type){case Z.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(n.data.node,t);const r=n.data.node.id;return this.crossOriginIframeRootIdMap.set(t,r),this.patchRootIdOnNode(n.data.node,r),{timestamp:n.timestamp,type:Z.IncrementalSnapshot,data:{source:z.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:n.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Z.Meta:case Z.Load:case Z.DomContentLoaded:return!1;case Z.Plugin:return n;case Z.Custom:return this.replaceIds(n.data.payload,t,["id","parentId","previousId","nextId"]),n;case Z.IncrementalSnapshot:switch(n.data.source){case z.Mutation:return n.data.adds.forEach(r=>{this.replaceIds(r,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(r.node,t);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(r.node,o)}),n.data.removes.forEach(r=>{this.replaceIds(r,t,["parentId","id"])}),n.data.attributes.forEach(r=>{this.replaceIds(r,t,["id"])}),n.data.texts.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case z.Drag:case z.TouchMove:case z.MouseMove:return n.data.positions.forEach(r=>{this.replaceIds(r,t,["id"])}),n;case z.ViewportResize:return!1;case z.MediaInteraction:case z.MouseInteraction:case z.Scroll:case z.CanvasMutation:case z.Input:return this.replaceIds(n.data,t,["id"]),n;case z.StyleSheetRule:case z.StyleDeclaration:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleId"]),n;case z.Font:return n;case z.Selection:return n.data.ranges.forEach(r=>{this.replaceIds(r,t,["start","end"])}),n;case z.AdoptedStyleSheet:return this.replaceIds(n.data,t,["id"]),this.replaceStyleIds(n.data,t,["styleIds"]),n.data.styles?.forEach(r=>{this.replaceStyleIds(r,t,["styleId"])}),n}}return!1}replace(t,n,r,o){for(const s of o)!Array.isArray(n[s])&&typeof n[s]!="number"||(Array.isArray(n[s])?n[s]=t.getIds(r,n[s]):n[s]=t.getId(r,n[s]));return n}replaceIds(t,n,r){return this.replace(this.crossOriginIframeMirror,t,n,r)}replaceStyleIds(t,n,r){return this.replace(this.crossOriginIframeStyleMirror,t,n,r)}replaceIdOnNode(t,n){this.replaceIds(t,n,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(r=>{this.replaceIdOnNode(r,n)})}patchRootIdOnNode(t,n){t.type!==Te.Document&&!t.rootId&&(t.rootId=n),"childNodes"in t&&t.childNodes.forEach(r=>{this.patchRootIdOnNode(r,n)})}}class RA{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class CA{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,n){if(!Vr(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t),this.bypassOptions.canvasManager.addShadowRoot(t);const r=Fm({...this.bypassOptions,doc:n,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},t);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push($m({...this.bypassOptions,scrollCb:this.scrollCb,doc:t,mirror:this.mirror})),Li(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(Bm({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){const n=uu(t),r=io(t);!n||!r||this.patchAttachShadow(r.Element,n)}patchAttachShadow(t,n){const r=this;this.restoreHandlers.push(au(t.prototype,"attachShadow",function(o){return function(s){const i=o.call(this,s);return this.shadowRoot&&Pm(this)&&r.addShadowRoot(this.shadowRoot,n),i}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class AA{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new tA,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,n){"_cssText"in n.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:n.id,attributes:n.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,n){if(t.length===0)return;const r={id:n,styleIds:[]},o=[];for(const s of t){let i;this.styleMirror.has(s)?i=this.styleMirror.getId(s):(i=this.styleMirror.add(s),o.push({styleId:i,rules:Array.from(s.rules||CSSRule,(a,c)=>({rule:ym(a),index:c}))})),r.styleIds.push(i)}o.length>0&&(r.styles=o),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class MA{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(t,n){const r=this.nodeMap.get(t);return r&&Array.from(r).some(o=>o!==n)}add(t,n){this.active||(this.active=!0,oA(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(n))}destroy(){}}let Se,zs;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(e){console.debug("Unable to override Array.from",e)}const nt=RC();function at(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:o="rr-block",blockSelector:s=null,unblockSelector:i=null,ignoreClass:a="rr-ignore",ignoreSelector:c=null,maskAllText:u=!1,maskTextClass:d="rr-mask",unmaskTextClass:l=null,maskTextSelector:p=null,unmaskTextSelector:f=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:_,maskAttributeFn:S,maskInputFn:w,maskTextFn:E,maxCanvasSize:C=null,packFn:x,sampling:v={},dataURLOptions:O={},mousemoveWait:k,recordDOM:b=!0,recordCanvas:N=!1,recordCrossOriginIframes:A=!1,recordAfter:L=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:j=!1,collectFonts:X=!1,inlineImages:G=!1,plugins:B,keepIframeSrcFn:M=()=>!1,ignoreCSSAttributes:U=new Set([]),errorHandler:D,onMutation:Q,getCanvasManager:se}=e;iA(D);const te=A?window.parent===window:!0;let ie=!1;if(!te)try{window.parent.document&&(ie=!1)}catch{ie=!0}if(te&&!t)throw new Error("emit function is required");if(!te&&!ie)return()=>{};k!==void 0&&v.mousemove===void 0&&(v.mousemove=k),nt.reset();const qe=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,radio:!0,checkbox:!0}:y!==void 0?y:{},et=_===!0||_==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_==="all",headMetaDescKeywords:_==="all"}:_||{};eA();let wt,tt=0;const un=F=>{for(const ae of B||[])ae.eventProcessor&&(F=ae.eventProcessor(F));return x&&!ie&&(F=x(F)),F};Se=(F,ae)=>{const K=F;if(K.timestamp=js(),er[0]?.isFrozen()&&K.type!==Z.FullSnapshot&&!(K.type===Z.IncrementalSnapshot&&K.data.source===z.Mutation)&&er.forEach(ce=>ce.unfreeze()),te)t?.(un(K),ae);else if(ie){const ce={type:"rrweb",event:un(K),origin:window.location.origin,isCheckout:ae};window.parent.postMessage(ce,"*")}if(K.type===Z.FullSnapshot)wt=K,tt=0;else if(K.type===Z.IncrementalSnapshot){if(K.data.source===z.Mutation&&K.data.isAttachIframe)return;tt++;const ce=r&&tt>=r,Y=n&&wt&&K.timestamp-wt.timestamp>n;(ce||Y)&&dn(!0)}};const kt=F=>{Se({type:Z.IncrementalSnapshot,data:{source:z.Mutation,...F}})},Po=F=>Se({type:Z.IncrementalSnapshot,data:{source:z.Scroll,...F}}),Rt=F=>Se({type:Z.IncrementalSnapshot,data:{source:z.CanvasMutation,...F}}),ze=F=>Se({type:Z.IncrementalSnapshot,data:{source:z.AdoptedStyleSheet,...F}}),Ne=new AA({mutationCb:kt,adoptedStyleSheetCb:ze}),$e=typeof __RRWEB_EXCLUDE_IFRAME__=="boolean"&&__RRWEB_EXCLUDE_IFRAME__?new wA:new kA({mirror:nt,mutationCb:kt,stylesheetManager:Ne,recordCrossOriginIframes:A,wrappedEmit:Se});for(const F of B||[])F.getMirror&&F.getMirror({nodeMirror:nt,crossOriginIframeMirror:$e.crossOriginIframeMirror,crossOriginIframeStyleMirror:$e.crossOriginIframeStyleMirror});const Hn=new MA,Wn=NA(se,{mirror:nt,win:window,mutationCb:F=>Se({type:Z.IncrementalSnapshot,data:{source:z.CanvasMutation,...F}}),recordCanvas:N,blockClass:o,blockSelector:s,unblockSelector:i,maxCanvasSize:C,sampling:v.canvas,dataURLOptions:O,errorHandler:D}),ln=typeof __RRWEB_EXCLUDE_SHADOW_DOM__=="boolean"&&__RRWEB_EXCLUDE_SHADOW_DOM__?new RA:new CA({mutationCb:kt,scrollCb:Po,bypassOptions:{onMutation:Q,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskInputOptions:qe,dataURLOptions:O,maskAttributeFn:S,maskTextFn:E,maskInputFn:w,recordCanvas:N,inlineImages:G,sampling:v,slimDOMOptions:et,iframeManager:$e,stylesheetManager:Ne,canvasManager:Wn,keepIframeSrcFn:M,processedNodeManager:Hn,ignoreCSSAttributes:U},mirror:nt}),dn=(F=!1)=>{if(!b)return;Se({type:Z.Meta,data:{href:window.location.href,width:Am(),height:Cm()}},F),Ne.reset(),ln.init(),er.forEach(K=>K.lock());const ae=QC(document,{mirror:nt,blockClass:o,blockSelector:s,unblockSelector:i,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,inlineStylesheet:h,maskAllInputs:qe,maskAttributeFn:S,maskInputFn:w,maskTextFn:E,slimDOM:et,dataURLOptions:O,recordCanvas:N,inlineImages:G,onSerialize:K=>{Nm(K,nt)&&$e.addIframe(K),Om(K,nt)&&Ne.trackLinkElement(K),Za(K)&&ln.addShadowRoot(K.shadowRoot,document)},onIframeLoad:(K,ce)=>{$e.attachIframe(K,ce);const Y=io(K);Y&&Wn.addWindow(Y),ln.observeAttachShadow(K)},onStylesheetLoad:(K,ce)=>{Ne.attachLinkElement(K,ce)},onBlockedImageLoad:(K,ce,{width:Y,height:lt})=>{kt({adds:[],removes:[],texts:[],attributes:[{id:ce.id,attributes:{style:{width:`${Y}px`,height:`${lt}px`}}}]})},keepIframeSrcFn:M,ignoreCSSAttributes:U});if(!ae)return console.warn("Failed to snapshot the document");Se({type:Z.FullSnapshot,data:{node:ae,initialOffset:Rm(window)}}),er.forEach(K=>K.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&Ne.adoptStyleSheets(document.adoptedStyleSheets,nt.getId(document))};zs=dn;try{const F=[],ae=ce=>re(IA)({onMutation:Q,mutationCb:kt,mousemoveCb:(Y,lt)=>Se({type:Z.IncrementalSnapshot,data:{source:lt,positions:Y}}),mouseInteractionCb:Y=>Se({type:Z.IncrementalSnapshot,data:{source:z.MouseInteraction,...Y}}),scrollCb:Po,viewportResizeCb:Y=>Se({type:Z.IncrementalSnapshot,data:{source:z.ViewportResize,...Y}}),inputCb:Y=>Se({type:Z.IncrementalSnapshot,data:{source:z.Input,...Y}}),mediaInteractionCb:Y=>Se({type:Z.IncrementalSnapshot,data:{source:z.MediaInteraction,...Y}}),styleSheetRuleCb:Y=>Se({type:Z.IncrementalSnapshot,data:{source:z.StyleSheetRule,...Y}}),styleDeclarationCb:Y=>Se({type:Z.IncrementalSnapshot,data:{source:z.StyleDeclaration,...Y}}),canvasMutationCb:Rt,fontCb:Y=>Se({type:Z.IncrementalSnapshot,data:{source:z.Font,...Y}}),selectionCb:Y=>{Se({type:Z.IncrementalSnapshot,data:{source:z.Selection,...Y}})},customElementCb:Y=>{Se({type:Z.IncrementalSnapshot,data:{source:z.CustomElement,...Y}})},blockClass:o,ignoreClass:a,ignoreSelector:c,maskAllText:u,maskTextClass:d,unmaskTextClass:l,maskTextSelector:p,unmaskTextSelector:f,maskInputOptions:qe,inlineStylesheet:h,sampling:v,recordDOM:b,recordCanvas:N,inlineImages:G,userTriggeredOnInput:j,collectFonts:X,doc:ce,maskAttributeFn:S,maskInputFn:w,maskTextFn:E,keepIframeSrcFn:M,blockSelector:s,unblockSelector:i,slimDOMOptions:et,dataURLOptions:O,mirror:nt,iframeManager:$e,stylesheetManager:Ne,shadowDomManager:ln,processedNodeManager:Hn,canvasManager:Wn,ignoreCSSAttributes:U,plugins:B?.filter(Y=>Y.observer)?.map(Y=>({observer:Y.observer,options:Y.options,callback:lt=>Se({type:Z.Plugin,data:{plugin:Y.name,payload:lt}})}))||[]},{});$e.addLoadListener(ce=>{try{F.push(ae(ce.contentDocument))}catch(Y){console.warn(Y)}});const K=()=>{dn(),F.push(ae(document))};return document.readyState==="interactive"||document.readyState==="complete"?K():(F.push(xe("DOMContentLoaded",()=>{Se({type:Z.DomContentLoaded,data:{}}),L==="DOMContentLoaded"&&K()})),F.push(xe("load",()=>{Se({type:Z.Load,data:{}}),L==="load"&&K()},window))),()=>{F.forEach(ce=>ce()),Hn.destroy(),zs=void 0,aA()}}catch(F){console.warn(F)}}function xA(e){if(!zs)throw new Error("please take full snapshot after start recording");zs(e)}at.mirror=nt;at.takeFullSnapshot=xA;function NA(e,t){try{return e?e(t):new Rd}catch{return console.warn("Unable to initialize CanvasManager"),new Rd}}var Od;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Od||(Od={}));const OA=3,LA=5;function lu(e){return e>9999999999?e:e*1e3}function ma(e){return e>9999999999?e/1e3:e}function Lo(e,t){t.category!=="sentry.transaction"&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Z.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:"breadcrumb",payload:Ie(t,10,1e3)}}),t.category==="console")))}const PA="button,a";function Um(e){return e.closest(PA)||e}function Hm(e){const t=Wm(e);return!t||!(t instanceof Element)?t:Um(t)}function Wm(e){return DA(e)?e.target:e}function DA(e){return Je(e)&&"target"in e}let qt;function FA(e){return qt||(qt=[],$A()),qt.push(e),()=>{const t=qt?qt.indexOf(e):-1;t>-1&&qt.splice(t,1)}}function $A(){Ce(pe,"open",function(e){return function(...t){if(qt)try{qt.forEach(n=>n())}catch{}return e.apply(pe,t)}})}const BA=new Set([z.Mutation,z.StyleSheetRule,z.StyleDeclaration,z.AdoptedStyleSheet,z.CanvasMutation,z.Selection,z.MediaInteraction]);function UA(e,t,n){e.handleClick(t,n)}class HA{constructor(t,n,r=Lo){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=n.timeout/1e3,this._threshold=n.threshold/1e3,this._scrollTimeout=n.scrollTimeout/1e3,this._replay=t,this._ignoreSelector=n.ignoreSelector,this._addBreadcrumbEvent=r}addListeners(){const t=FA(()=>{this._lastMutation=Ld()});this._teardown=()=>{t(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(t,n){if(jA(n,this._ignoreSelector)||!qA(t))return;const r={timestamp:ma(t.timestamp),clickBreadcrumb:t,clickCount:0,node:n};this._clicks.some(o=>o.node===r.node&&Math.abs(o.timestamp-r.timestamp)<1)||(this._clicks.push(r),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(t=Date.now()){this._lastMutation=ma(t)}registerScroll(t=Date.now()){this._lastScroll=ma(t)}registerClick(t){const n=Um(t);this._handleMultiClick(n)}_handleMultiClick(t){this._getClicks(t).forEach(n=>{n.clickCount++})}_getClicks(t){return this._clicks.filter(n=>n.node===t)}_checkClicks(){const t=[],n=Ld();this._clicks.forEach(r=>{!r.mutationAfter&&this._lastMutation&&(r.mutationAfter=r.timestamp<=this._lastMutation?this._lastMutation-r.timestamp:void 0),!r.scrollAfter&&this._lastScroll&&(r.scrollAfter=r.timestamp<=this._lastScroll?this._lastScroll-r.timestamp:void 0),r.timestamp+this._timeout<=n&&t.push(r)});for(const r of t){const o=this._clicks.indexOf(r);o>-1&&(this._generateBreadcrumbs(r),this._clicks.splice(o,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(t){const n=this._replay,r=t.scrollAfter&&t.scrollAfter<=this._scrollTimeout,o=t.mutationAfter&&t.mutationAfter<=this._threshold,s=!r&&!o,{clickCount:i,clickBreadcrumb:a}=t;if(s){const c=Math.min(t.mutationAfter||this._timeout,this._timeout)*1e3,u=c<this._timeout*1e3?"mutation":"timeout",d={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.slowClickDetected",data:{...a.data,url:pe.location.href,route:n.getCurrentRoute(),timeAfterClickMs:c,endReason:u,clickCount:i||1}};this._addBreadcrumbEvent(n,d);return}if(i>1){const c={type:"default",message:a.message,timestamp:a.timestamp,category:"ui.multiClick",data:{...a.data,url:pe.location.href,route:n.getCurrentRoute(),clickCount:i,metric:!0}};this._addBreadcrumbEvent(n,c)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=No(()=>this._checkClicks(),1e3)}}const WA=["A","BUTTON","INPUT"];function jA(e,t){return!!(!WA.includes(e.tagName)||e.tagName==="INPUT"&&!["submit","button"].includes(e.getAttribute("type")||"")||e.tagName==="A"&&(e.hasAttribute("download")||e.hasAttribute("target")&&e.getAttribute("target")!=="_self")||t&&e.matches(t))}function qA(e){return!!(e.data&&typeof e.data.nodeId=="number"&&e.timestamp)}function Ld(){return Date.now()/1e3}function zA(e,t){try{if(!GA(t))return;const{source:n}=t.data;if(BA.has(n)&&e.registerMutation(t.timestamp),n===z.Scroll&&e.registerScroll(t.timestamp),VA(t)){const{type:r,id:o}=t.data,s=at.mirror.getNode(o);s instanceof HTMLElement&&r===Me.Click&&e.registerClick(s)}}catch{}}function GA(e){return e.type===OA}function VA(e){return e.data.source===z.MouseInteraction}function ft(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Pi=(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))(Pi||{});const YA=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function JA(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(YA.has(n)){let r=n;(n==="data-testid"||n==="data-test-id")&&(r="testId"),t[r]=e[n]}return t}const KA=e=>t=>{if(!e.isEnabled())return;const n=XA(t);if(!n)return;const r=t.name==="click",o=r?t.event:void 0;r&&e.clickDetector&&o?.target&&!o.altKey&&!o.metaKey&&!o.ctrlKey&&!o.shiftKey&&UA(e.clickDetector,n,Hm(t.event)),Lo(e,n)};function jm(e,t){const n=at.mirror.getId(e),r=n&&at.mirror.getNode(n),o=r&&at.mirror.getMeta(r),s=o&&ZA(o)?o:null;return{message:t,data:s?{nodeId:n,node:{id:n,tagName:s.tagName,textContent:Array.from(s.childNodes).map(i=>i.type===Pi.Text&&i.textContent).filter(Boolean).map(i=>i.trim()).join(""),attributes:JA(s.attributes)}}:{}}}function XA(e){const{target:t,message:n}=QA(e);return ft({category:`ui.${e.name}`,...jm(t,n)})}function QA(e){const t=e.name==="click";let n,r=null;try{r=t?Hm(e.event):Wm(e.event),n=ke(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function ZA(e){return e.type===Pi.Element}function e1(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=t1(t);n&&Lo(e,n)}function t1(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s,target:i}=e;if(!i||n1(i)||!s)return null;const a=t||r||o,c=s.length===1;if(!a&&c)return null;const u=ke(i,{maxStringLength:200})||"<unknown>",d=jm(i,u);return ft({category:"ui.keyDown",message:u,data:{...d.data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:o,key:s}})}function n1(e){return e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable}const r1={resource:c1,paint:i1,navigation:a1};function ga(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function o1(e){return e.map(s1).filter(Boolean)}function s1(e){const t=r1[e.entryType];return t?t(e):null}function br(e){return((ve()||pe.performance.timeOrigin)+e)/1e3}function i1(e){const{duration:t,entryType:n,name:r,startTime:o}=e,s=br(o);return{type:n,name:r,start:s,end:s+t,data:void 0}}function a1(e){const{entryType:t,name:n,decodedBodySize:r,duration:o,domComplete:s,encodedBodySize:i,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,domInteractive:u,loadEventStart:d,loadEventEnd:l,redirectCount:p,startTime:f,transferSize:h,type:m}=e;return o===0?null:{type:`${t}.${m}`,start:br(f),end:br(s),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:o,domInteractive:u,domContentLoadedEventStart:a,domContentLoadedEventEnd:c,loadEventStart:d,loadEventEnd:l,domComplete:s,redirectCount:p}}}function c1(e){const{entryType:t,initiatorType:n,name:r,responseEnd:o,startTime:s,decodedBodySize:i,encodedBodySize:a,responseStatus:c,transferSize:u}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:br(s),end:br(o),name:r,data:{size:u,statusCode:c,decodedBodySize:i,encodedBodySize:a}}}function u1(e){const t=e.entries[e.entries.length-1],n=t?.element?[t.element]:void 0;return du(e,"largest-contentful-paint",n)}function l1(e){return e.sources!==void 0}function d1(e){const t=[],n=[];for(const r of e.entries)if(l1(r)){const o=[];for(const s of r.sources)if(s.node){n.push(s.node);const i=at.mirror.getId(s.node);i&&o.push(i)}t.push({value:r.value,nodeIds:o.length?o:void 0})}return du(e,"cumulative-layout-shift",n,t)}function f1(e){const t=e.entries[e.entries.length-1],n=t?.target?[t.target]:void 0;return du(e,"interaction-to-next-paint",n)}function du(e,t,n,r){const o=e.value,s=e.rating,i=br(o);return{type:"web-vital",name:t,start:i,end:i,data:{value:o,size:o,rating:s,nodeIds:n?n.map(a=>at.mirror.getId(a)):void 0,attributions:r}}}function p1(e){function t(o){e.performanceEntries.includes(o)||e.performanceEntries.push(o)}function n({entries:o}){o.forEach(t)}const r=[];return["navigation","paint","resource"].forEach(o=>{r.push(tn(o,n))}),r.push(wi(ga(u1,e)),Ii(ga(d1,e)),Kc(ga(f1,e))),()=>{r.forEach(o=>o())}}const H=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,h1='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 m1(){const e=new Blob([h1],{type:"text/javascript"});return URL.createObjectURL(e)}const Pd=["log","warn","error"],ms="[Replay] ";function _a(e,t="info"){Pt({category:"console",data:{logger:"replay"},level:t,message:`${ms}${e}`},{level:t})}function g1(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:r=>{e=!!r.captureExceptions,t=!!r.traceInternals}};return H?(Pd.forEach(r=>{n[r]=(...o)=>{g[r](ms,...o),t&&_a(o.join(""),As(r))}}),n.exception=(r,...o)=>{o.length&&n.error&&n.error(...o),g.error(ms,r),e?bt(r,{mechanism:{handled:!0,type:"auto.function.replay.debug"}}):t&&_a(r,"error")},n.infoTick=(...r)=>{g.log(ms,...r),t&&setTimeout(()=>_a(r[0]),0)}):Pd.forEach(r=>{n[r]=()=>{}}),n}const W=g1();class fu extends Error{constructor(){super(`Event buffer exceeded maximum size of ${ou}.`)}}class qm extends Error{constructor(){super("Worker destroyed")}}class zm{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(t){const n=JSON.stringify(t).length;if(this._totalSize+=n,this._totalSize>ou)throw new fu;this.events.push(t)}finish(){return new Promise(t=>{const n=this.events;this.clear(),t(JSON.stringify(n))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let t=null;for(const{timestamp:n}of this.events)(t===null||n<t)&&(t=n);return t===null?t:lu(t)}}class _1{constructor(t){this._onMessage=({data:n})=>{const r=n;if(typeof r.id!="number")return;const o=this._pending.get(r.id);if(!(!o||o.method!==r.method)){if(this._pending.delete(r.id),!r.success){H&&W.error("Error in compression worker: ",r.response),o.reject(new Error("Error in compression worker"));return}o.resolve(r.response)}},this._worker=t,this._id=0,this._pending=new Map,this._worker.addEventListener("message",this._onMessage)}ensureReady(){return this._ensureReadyPromise?this._ensureReadyPromise:(this._ensureReadyPromise=new Promise((t,n)=>{this._worker.addEventListener("message",({data:r})=>{r.success?t():(H&&W.warn("Received worker message with unsuccessful status",r),n(new Error("Received worker message with unsuccessful status")))},{once:!0}),this._worker.addEventListener("error",r=>{H&&W.warn("Failed to load Replay compression worker",r),n(new Error(`Failed to load Replay compression worker: ${r instanceof ErrorEvent&&r.message?r.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(){H&&W.log("Destroying compression worker"),this._worker.removeEventListener("message",this._onMessage),this._pending.forEach(t=>t.reject(new qm)),this._pending.clear(),this._worker.terminate()}postMessage(t,n){const r=this._getAndIncrementId();return new Promise((o,s)=>{this._pending.set(r,{method:t,resolve:o,reject:s});try{this._worker.postMessage({id:r,method:t,arg:n})}catch(i){this._pending.delete(r),s(i)}})}_getAndIncrementId(){return this._id++}}class y1{constructor(t){this._worker=new _1(t),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(t){const n=lu(t.timestamp);(!this._earliestTimestamp||n<this._earliestTimestamp)&&(this._earliestTimestamp=n);const r=JSON.stringify(t);return this._totalSize+=r.length,this._totalSize>ou?Promise.reject(new fu):this._sendEventToWorker(r)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,t=>{H&&W.exception(t,'Sending "clear" message to worker failed',t)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(t){return this._worker.postMessage("addEvent",t)}async _finishRequest(){const t=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,t}}class S1{constructor(t){this._fallback=new zm,this._compression=new y1(t),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(t){this._used.hasCheckout=t}set waitForCheckout(t){this._used.waitForCheckout=t}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(t){return this._used.addEvent(t)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){H&&W.exception(t,"Failed to load the compression worker, falling back to simple buffer");return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t,hasCheckout:n,waitForCheckout:r}=this._fallback,o=[];for(const s of t)o.push(this._compression.addEvent(s));this._compression.hasCheckout=n,this._compression.waitForCheckout=r,this._used=this._compression;try{await Promise.all(o),this._fallback.clear()}catch(s){if(s instanceof qm)return;H&&W.exception(s,"Failed to add events when switching buffers.")}}}function b1({useCompression:e,workerUrl:t}){if(e&&window.Worker){const n=E1(t);if(n)return n}return H&&W.log("Using simple buffer"),new zm}function E1(e){try{const t=e||v1();if(!t)return;H&&W.log(`Using compression worker${e?` from ${e}`:""}`);const n=new Worker(t);return new S1(n)}catch(t){H&&W.exception(t,"Failed to create compression worker")}}function v1(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?m1():""}function pu(){try{return"sessionStorage"in pe&&!!pe.sessionStorage}catch{return!1}}function T1(e){I1(),e.session=void 0}function I1(){if(pu())try{pe.sessionStorage.removeItem(nu)}catch{}}function Gm(e){return e===void 0?!1:Math.random()<e}function Di(e){if(pu())try{pe.sessionStorage.setItem(nu,JSON.stringify(e))}catch{}}function Vm(e){const t=Date.now(),n=e.id||we(),r=e.started||t,o=e.lastActivity||t,s=e.segmentId||0,i=e.sampled,a=e.previousSessionId,c=e.dirty||!1;return{id:n,started:r,lastActivity:o,segmentId:s,sampled:i,previousSessionId:a,dirty:c}}function w1(e,t){return Gm(e)?"session":t?"buffer":!1}function Dd({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const o=w1(e,t),s=Vm({sampled:o,previousSessionId:r});return n&&Di(s),s}function k1(){if(!pu())return null;try{const e=pe.sessionStorage.getItem(nu);if(!e)return null;const t=JSON.parse(e);return H&&W.infoTick("Loading existing session"),Vm(t)}catch{return null}}function nc(e,t,n=+new Date){return e===null||t===void 0||t<0?!0:t===0?!1:e+t<=n}function R1(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return nc(e.started,t,r)||nc(e.lastActivity,n,r)}function Gs(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!R1(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled==="buffer"&&e.segmentId===0)}function ya({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const o=r.stickySession&&k1();return o?Gs(o,{sessionIdleExpire:e,maxReplayDuration:t})?(H&&W.infoTick("Session in sessionStorage is expired, creating new one..."),Dd(r,{previousSessionId:o.id})):o:(H&&W.infoTick("Creating new session"),Dd(r,{previousSessionId:n}))}function C1(e){return e.type===Z.Custom}function hu(e,t,n){return Jm(e,t)?(Ym(e,t,n),!0):!1}function A1(e,t,n){return Jm(e,t)?Ym(e,t,n):Promise.resolve(null)}async function Ym(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const o=e.recordingMode==="buffer";try{n&&o&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const s=e.getOptions(),i=M1(t,s.beforeAddRecordingEvent);return i?await r.addEvent(i):void 0}catch(s){if(!e.isEnabled())return e.handleException(s),null;const i=s&&s instanceof fu,a=i?"eventBufferOverflow":"eventBufferError",c=R();if(c){const u=i?"buffer_overflow":"internal_sdk_error";c.recordDroppedEvent(u,"replay")}if(i&&o)return r.clear(),r.waitForCheckout=!0,null;e.handleException(s),await e.stop({reason:a})}}function Jm(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=lu(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(H&&W.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function M1(e,t){try{if(typeof t=="function"&&C1(e))return t(e)}catch(n){return H&&W.exception(n,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}const Fd=100;function Km(e,t,n){const r=e.getContext();t&&r.traceIds.size<Fd&&r.traceIds.add(t),n&&r.segmentNames.size<Fd&&r.segmentNames.add(n)}function x1(e){return t=>{e.isEnabled()&&Km(e,t.trace_id,t.name||void 0)}}function mu(e){return!e.type}function rc(e){return e.type==="transaction"}function N1(e){return e.type==="replay_event"}function $d(e){return e.type==="feedback"}function O1(e){return(t,n)=>{if(!e.isEnabled()||!mu(t)&&!rc(t))return;const r=n.statusCode;if(!(!r||r<200||r>=300)){if(rc(t)){L1(e,t);return}P1(e,t)}}}function L1(e,t){Km(e,t.contexts?.trace?.trace_id,t.transaction)}function P1(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)||No(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(o){e.handleException(o)}})}function D1(e){return t=>{!e.isEnabled()||!mu(t)||F1(e,t)}}function F1(e,t){const n=t.exception?.values?.[0]?.value;if(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))){const r=ft({category:"replay.hydrate-error",data:{url:en()}});Lo(e,r)}}function $1(e){const t=R();t&&t.on("beforeAddBreadcrumb",n=>B1(e,n))}function B1(e,t){if(!e.isEnabled()||!Xm(t))return;const n=U1(t);n&&Lo(e,n)}function U1(e){return!Xm(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:e.category==="console"?H1(e):ft(e)}function H1(e){const t=e.data?.arguments;if(!Array.isArray(t)||t.length===0)return ft(e);let n=!1;const r=t.map(o=>{if(!o)return o;if(typeof o=="string")return o.length>Vo?(n=!0,`${o.slice(0,Vo)}…`):o;if(typeof o=="object")try{const s=Ie(o,7);return JSON.stringify(s).length>Vo?(n=!0,`${JSON.stringify(s,null,2).slice(0,Vo)}…`):s}catch{}return o});return ft({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function Xm(e){return!!e.category}function W1(e,t){return e.type||!e.exception?.values?.length?!1:!!t.originalException?.__rrweb__}function Vs(){const e=q().getPropagationContext().dsc;e&&delete e.replay_id;const t=Ee();if(t){const n=ut(t);delete n.replay_id}}function Bd(e){const t=q().getPropagationContext().dsc;t&&(t.replay_id=e);const n=Ee();if(n){const r=ut(n);r.replay_id=e}}function j1(e,t){e.triggerUserActivity(),e.addUpdate(()=>t.timestamp?(e.throttledAddEvent({type:Z.Custom,timestamp:t.timestamp*1e3,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1):!0)}function q1(e,t){return e.recordingMode!=="buffer"||t.message===ru||!t.exception||t.type?!1:Gm(e.getOptions().errorSampleRate)}function z1(e){return Object.assign((t,n)=>{if(e.session&&Gs(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&Vs(),!e.isEnabled()||e.isPaused())return t;if(N1(t))return delete t.breadcrumbs,t;if(!mu(t)&&!rc(t)&&!$d(t))return t;if(!e.checkAndHandleExpiredSession())return Vs(),t;if($d(t))return e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),j1(e,t),t;if(W1(t,n)&&!e.getOptions()._experiments.captureExceptions)return H&&W.log("Ignoring error from rrweb internals",t),null;const o=q1(e,t);if((o||e.recordingMode==="session")&&(t.tags={...t.tags,replayId:e.getSessionId()}),o&&e.recordingMode==="buffer"&&e.session?.sampled==="buffer"){const i=e.session;i.dirty=!0,e.getOptions().stickySession&&Di(i)}return t},{id:"Replay"})}function Fi(e,t){return t.map(({type:n,start:r,end:o,name:s,data:i})=>{const a=e.throttledAddEvent({type:Z.Custom,timestamp:r,data:{tag:"performanceSpan",payload:{op:n,description:s,startTimestamp:r,endTimestamp:o,data:i}}});return typeof a=="string"?Promise.resolve(null):a})}function G1(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function V1(e){return t=>{if(!e.isEnabled())return;const n=G1(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(Fi(e,[n]),!1)))}}function Y1(e,t){return H&&e.getOptions()._experiments.traceInternals?!1:Hp(t,R())}function Qm(e,t){e.isEnabled()&&t!==null&&(Y1(e,t.name)||e.addUpdate(()=>(Fi(e,[t]),!0)))}function $i(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=sm(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function Zm(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function Ys(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function eg(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:o,method:s,statusCode:i,request:a,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:o,data:{method:s,statusCode:i,request:a,response:c}}}function ao(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function Kt(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:o,warnings:s}=J1(n);return r.body=o,s?.length&&(r._meta={warnings:s}),r}function oc(e,t){return Object.entries(e).reduce((n,[r,o])=>{const s=r.toLowerCase();return t.includes(s)&&e[r]&&(n[s]=o),n},{})}function J1(e){if(!e||typeof e!="string")return{body:e};const t=e.length>_d,n=K1(e);if(t){const r=e.slice(0,_d);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}}function K1(e){const t=e[0],n=e[e.length-1];return t==="["&&n==="]"||t==="{"&&n==="}"}function Js(e,t){const n=X1(e);return Ke(n,t)}function X1(e,t=pe.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(pe.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}async function Q1(e,t,n){try{const r=await eM(e,t,n),o=eg("resource.fetch",r);Qm(n.replay,o)}catch(r){H&&W.exception(r,"Failed to capture fetch breadcrumb")}}function Z1(e,t){const{input:n,response:r}=t,o=n?tu(n):void 0,s=$i(o),i=r?Zm(r.headers.get("content-length")):void 0;s!==void 0&&(e.data.request_body_size=s),i!==void 0&&(e.data.response_body_size=i)}async function eM(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r}=t,{url:i,method:a,status_code:c=0,request_body_size:u,response_body_size:d}=e.data,l=Js(i,n.networkDetailAllowUrls)&&!Js(i,n.networkDetailDenyUrls),p=l?tM(n,t.input,u):ao(u),f=await nM(l,n,t.response,d);return{startTimestamp:o,endTimestamp:s,url:i,method:a,statusCode:c,request:p,response:f}}function tM({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const o=n?sM(n,t):{};if(!e)return Kt(o,r,void 0);const s=tu(n),[i,a]=Bs(s,W),c=Kt(o,r,i);return a?Ys(c,a):c}async function nM(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,o){if(!e&&o!==void 0)return ao(o);const s=r?tg(r.headers,n):{};if(!r||!t&&o!==void 0)return Kt(s,o,void 0);const[i,a]=await oM(r),c=rM(i,{networkCaptureBodies:t,responseBodySize:o,captureDetails:e,headers:s});return a?Ys(c,a):c}function rM(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:o}){try{const s=e?.length&&n===void 0?$i(e):n;return r?t?Kt(o,s,e):Kt(o,s,void 0):ao(s)}catch(s){return H&&W.exception(s,"Failed to serialize response body"),Kt(o,n,void 0)}}async function oM(e){const t=iM(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await aM(t)]}catch(n){return n instanceof Error&&n.message.indexOf("Timeout")>-1?(H&&W.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(H&&W.exception(n,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function tg(e,t){const n={};return t.forEach(r=>{e.get(r)&&(n[r]=e.get(r))}),n}function sM(e,t){return e.length===1&&typeof e[0]!="string"?Ud(e[0],t):e.length===2?Ud(e[1],t):{}}function Ud(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?tg(n,t):Array.isArray(n)?{}:oc(n,t):{}}function iM(e){try{return e.clone()}catch(t){H&&W.exception(t,"Failed to clone response body")}}function aM(e){return new Promise((t,n)=>{const r=No(()=>n(new Error("Timeout while trying to read response body")),500);cM(e).then(o=>t(o),o=>n(o)).finally(()=>clearTimeout(r))})}async function cM(e){return await e.text()}async function uM(e,t,n){try{const r=dM(e,t,n),o=eg("resource.xhr",r);Qm(n.replay,o)}catch(r){H&&W.exception(r,"Failed to capture xhr breadcrumb")}}function lM(e,t){const{xhr:n,input:r}=t;if(!n)return;const o=$i(r),s=n.getResponseHeader("content-length")?Zm(n.getResponseHeader("content-length")):hM(n.response,n.responseType);o!==void 0&&(e.data.request_body_size=o),s!==void 0&&(e.data.response_body_size=s)}function dM(e,t,n){const r=Date.now(),{startTimestamp:o=r,endTimestamp:s=r,input:i,xhr:a}=t,{url:c,method:u,status_code:d=0,request_body_size:l,response_body_size:p}=e.data;if(!c)return null;if(!a||!Js(c,n.networkDetailAllowUrls)||Js(c,n.networkDetailDenyUrls)){const x=ao(l),v=ao(p);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:d,request:x,response:v}}const f=a[Mt],h=f?oc(f.request_headers,n.networkRequestHeaders):{},m=oc(im(a),n.networkResponseHeaders),[y,_]=n.networkCaptureBodies?Bs(i,W):[void 0],[S,w]=n.networkCaptureBodies?fM(a):[void 0],E=Kt(h,l,y),C=Kt(m,p,S);return{startTimestamp:o,endTimestamp:s,url:c,method:u,statusCode:d,request:_?Ys(E,_):E,response:w?Ys(C,w):C}}function fM(e){const t=[];try{return[e.responseText]}catch(n){t.push(n)}try{return pM(e.response,e.responseType)}catch(n){t.push(n)}return H&&W.warn("Failed to get xhr response body",...t),[void 0]}function pM(e,t){try{if(typeof e=="string")return[e];if(e instanceof Document)return[e.body.outerHTML];if(t==="json"&&Je(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(n){return H&&W.exception(n,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return H&&W.log("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function hM(e,t){try{const n=t==="json"&&Je(e)?JSON.stringify(e):e;return $i(n)}catch{return}}function mM(e){const t=R();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i}=e.getOptions(),a={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:o,networkRequestHeaders:s,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",(c,u)=>gM(a,c,u))}catch{}}function gM(e,t,n){if(t.data)try{_M(t)&&SM(n)&&(lM(t,n),uM(t,n,e)),yM(t)&&bM(n)&&(Z1(t,n),Q1(t,n,e))}catch(r){H&&W.exception(r,"Error when enriching network breadcrumb")}}function _M(e){return e.category==="xhr"}function yM(e){return e.category==="fetch"}function SM(e){return e?.xhr}function bM(e){return e?.input!==void 0}function EM(e){const t=R();om(KA(e)),Ai(V1(e)),$1(e),mM(e);const n=z1(e);lS(n),t&&(t.on("beforeSendEvent",D1(e)),t.on("afterSendEvent",O1(e)),t.on("createDsc",r=>{const o=e.getSessionId();o&&e.isEnabled()&&e.recordingMode==="session"&&e.checkAndHandleExpiredSession()&&(r.replay_id=o)}),t.on("processSegmentSpan",x1(e)),t.on("spanStart",r=>{e.lastActiveSpan=r}),t.on("spanEnd",r=>{e.lastActiveSpan=r}),t.on("beforeSendFeedback",async(r,o)=>{const s=e.getSessionId();o?.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()}))}async function vM(e){try{return Promise.all(Fi(e,[TM(pe.performance.memory)]))}catch{return[]}}function TM(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,o=Date.now()/1e3;return{type:"memory",name:"memory",start:o,end:o,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function IM(e,t,n){return Ty(e,t,{...n,setTimeoutImpl:No})}const Xo=$.navigator;function wM(){return/iPhone|iPad|iPod/i.test(Xo?.userAgent??"")||/Macintosh/i.test(Xo?.userAgent??"")&&Xo?.maxTouchPoints&&Xo?.maxTouchPoints>1?{sampling:{mousemove:!1}}:{}}function kM(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession()){H&&W.warn("Received replay event after session expired.");return}const o=r||!t;t=!0,RM(n),e.clickDetector&&zA(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode==="buffer"&&o&&e.setInitialState(),!hu(e,n,o))return!0;if(!o)return!1;const s=e.session;if(AM(e,o),e.recordingMode==="buffer"&&s&&e.eventBuffer&&!s.dirty){const i=e.eventBuffer.getEarliestTimestamp();i&&(H&&W.log(`Updating session start time to earliest event in buffer to ${new Date(i)}`),s.started=i,e.getOptions().stickySession&&Di(s))}return s?.previousSessionId||e.recordingMode==="session"&&e.flush(),!0})}catch(o){e.handleException(o)}}}function RM(e){const t=e.data;if(!(e.type!==Z.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),o=r&&at.mirror.getMeta(r);if(o?.type===Pi.Element)for(const[s,i]of Object.entries(n.attributes))i===null?delete o.attributes[s]:o.attributes[s]=i}}function CM(e){const t=e.getOptions();return{type:Z.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type==="worker":!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function AM(e,t){!t||e.session?.segmentId!==0||hu(e,CM(e),!1)}function MM(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function xM(e,t,n,r){return Qe(ip(e,go(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:typeof t=="string"?new TextEncoder().encode(t).length:t.length},t]])}function NM({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}
497
+ `;if(typeof e=="string")n=`${r}${e}`;else{const s=new TextEncoder().encode(r);n=new Uint8Array(s.length+e.length),n.set(s),n.set(e,s.length)}return n}async function OM({client:e,scope:t,replayId:n,event:r}){const o=typeof e._integrations=="object"&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0,s={event_id:n,integrations:o};e.emit("preprocessEvent",r,s);const i=await _p(e.getOptions(),r,s,t,e,me());if(!i)return null;e.emit("postprocessEvent",i,s),i.platform=i.platform||"javascript";const a=e.getSdkMetadata(),{name:c,version:u,settings:d}=a?.sdk||{};return i.sdk={...i.sdk,name:c||"sentry.javascript.unknown",version:u||"0.0.0",settings:d},i}async function LM({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:o,session:s}){const i=NM({recordingData:e,headers:{segment_id:n}}),{urls:a,errorIds:c,traceIds:u,segmentNames:d,initialTimestamp:l}=r,p=R(),f=q(),h=p?.getTransport(),m=p?.getDsn();if(!p||!h||!m||!s.sampled)return Promise.resolve({});const y={type:iC,replay_start_timestamp:l/1e3,timestamp:o/1e3,error_ids:c,trace_ids:u,segment_names:d,urls:a,replay_id:t,segment_id:n,replay_type:s.sampled},_=await OM({scope:f,client:p,replayId:t,event:y});if(!_)return p.recordDroppedEvent("event_processor","replay"),H&&W.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete _.sdkProcessingMetadata;const S=xM(_,i,m,p.getOptions().tunnel);let w;try{w=await h.send(S)}catch(C){const x=new Error(ru);try{x.cause=C}catch{}throw x}const E=xp({},w);if(Mp(E,"replay"))throw new gu(E);if(typeof w.statusCode=="number"&&(w.statusCode<200||w.statusCode>=300))throw new ng(w.statusCode);return w}class ng extends Error{constructor(t){super(`Transport returned status code ${t}`)}}class gu extends Error{constructor(t){super("Rate limit hit"),this.rateLimits=t}}class Hd extends Error{constructor(){super("Session is too long, not sending replay")}}async function rg(e,t={count:0,interval:fC}){const{recordingData:n,onError:r}=e;if(n.length)try{return await LM(e),!0}catch(o){if(o instanceof ng||o instanceof gu)throw o;if(aS("Replays",{_retryCount:t.count}),r&&r(o),t.count>=pC){const s=new Error(`${ru} - max retries exceeded`);try{s.cause=o}catch{}throw s}return t.interval*=++t.count,new Promise((s,i)=>{No(async()=>{try{await rg(e,t),s(!0)}catch(a){i(a)}},t.interval)})}}const og="__THROTTLED",PM="__SKIPPED";function DM(e,t,n){const r=new Map,o=a=>{const c=a-n;r.forEach((u,d)=>{d<c&&r.delete(d)})},s=()=>[...r.values()].reduce((a,c)=>a+c,0);let i=!1;return(...a)=>{const c=Math.floor(Date.now()/1e3);if(o(c),s()>=t){const d=i;return i=!0,d?PM:og}i=!1;const u=r.get(c)||0;return r.set(c,u+1),e(...a)}}class FM{constructor({options:t,recordingOptions:n}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:aC,sessionIdleExpire:cC},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=n,this._options=t,this._debouncedFlush=IM(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=DM((i,a)=>A1(this,i,a),300,5);const{slowClickTimeout:r,slowClickIgnoreSelectors:o}=this.getOptions(),s=r?{threshold:Math.min(hC,r),timeout:r,scrollTimeout:mC,ignoreSelector:o?o.join(","):""}:void 0;if(s&&(this.clickDetector=new HA(this,s)),H){const i=t._experiments;W.setConfig({captureExceptions:!!i.captureExceptions,traceInternals:!!i.traceInternals})}this._handleVisibilityChange=()=>{pe.document.visibilityState==="visible"?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{const i=ft({category:"ui.blur"});this._doChangeToBackgroundTasks(i)},this._handleWindowFocus=()=>{const i=ft({category:"ui.focus"});this._doChangeToForegroundTasks(i)},this._handleKeyboardEvent=i=>{e1(this,i)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(t){H&&W.exception(t),this._options.onError&&this._options.onError(t)}initializeSampling(t){const{errorSampleRate:n,sessionSampleRate:r}=this._options,o=n<=0&&r<=0;if(this._requiresManualStart=o,!o){if(this._initializeSessionForSampling(t),!this.session){H&&W.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",H&&W.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&this.recordingMode==="session"){H&&W.log("Recording is already in progress");return}if(this._isEnabled&&this.recordingMode==="buffer"){H&&W.log("Buffering is in progress, call `flush()` to save the replay");return}H&&W.infoTick("Starting replay in session mode"),this._updateUserActivity();const t=ya({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=t,this.recordingMode="session",this._initializeRecording()}startBuffering(){if(this._isEnabled){H&&W.log("Buffering is in progress, call `flush()` to save the replay");return}H&&W.infoTick("Starting replay in buffer mode");const t=ya({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=t,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const t=this._canvas;this._stopRecording=at({...this._recordingOptions,...this.recordingMode==="buffer"?{checkoutEveryNms:dC}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:kM(this),...wM(),onMutation:this._onMutationHandler.bind(this),...t?{recordCanvas:t.recordCanvas,getCanvasManager:t.getCanvasManager,sampling:t.sampling,dataURLOptions:t.dataURLOptions}:{}})}catch(t){this.handleException(t)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(t){return this.handleException(t),!1}}async stop({forceFlush:t=!1,reason:n}={}){if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode="buffer";const r=n??"manual";R()?.emit("replayEnd",{sessionId:this.session?.id,reason:r});try{H&&W.log(`Stopping Replay triggered by ${r}`),Vs(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),t&&await this._flush({force:!0}),this.eventBuffer?.destroy(),this.eventBuffer=null,T1(this)}catch(o){this.handleException(o)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),H&&W.log("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),H&&W.log("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:t=!0}={}){if(this.recordingMode==="session")return this.flushImmediate();const n=Date.now();H&&W.log("Converting buffer to session"),await this.flushImmediate();const r=this.stopRecording();!t||!r||this.recordingMode!=="session"&&(this.recordingMode="session",this.session&&(this.session.dirty=!1,this._updateUserActivity(n),this._updateSessionActivity(n),this._maybeSaveSession(),Bd(this.session.id)),this.startRecording())}addUpdate(t){const n=t();this.recordingMode==="buffer"||!this._isEnabled||n!==!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(t){if(!(t&&this.session?.sampled===!1))return this.session?.id}checkAndHandleExpiredSession(){if(this._lastActivity&&nc(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session?.sampled==="session"){this.pause();return}return!!this._checkSession()}setInitialState(){const t=`${pe.location.pathname}${pe.location.hash}${pe.location.search}`,n=`${pe.location.origin}${t}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=n,this._context.initialTimestamp=Date.now(),this._context.urls.push(n)}throttledAddEvent(t,n){const r=this._throttledAddEvent(t,n);if(r===og){const o=ft({category:"replay.throttled"});this.addUpdate(()=>!hu(this,{type:LA,timestamp:o.timestamp||0,data:{tag:"breadcrumb",payload:o,metric:!0}}))}return r}getCurrentRoute(){const t=this.lastActiveSpan||Ee(),n=t&&be(t),o=(n&&J(n).data||{})[We];if(!(!n||!o||!["route","custom"].includes(o)))return J(n).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=b1({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&&Bd(this.session.id)}_initializeSessionForSampling(t){const n=this._options.errorSampleRate>0,r=ya({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:t},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:n});this.session=r}_checkSession(){if(!this.session)return!1;const t=this.session;return Gs(t,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})?(this._refreshSession(t),!1):!0}async _refreshSession(t){this._isEnabled&&(await this.stop({reason:"sessionExpired"}),this.initializeSampling(t.id))}_addListeners(){try{pe.document.addEventListener("visibilitychange",this._handleVisibilityChange),pe.addEventListener("blur",this._handleWindowBlur),pe.addEventListener("focus",this._handleWindowFocus),pe.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(EM(this),this._hasInitializedCoreListeners=!0)}catch(t){this.handleException(t)}this._performanceCleanupCallback=p1(this)}_removeListeners(){try{pe.document.removeEventListener("visibilitychange",this._handleVisibilityChange),pe.removeEventListener("blur",this._handleWindowBlur),pe.removeEventListener("focus",this._handleWindowFocus),pe.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(t){this.handleException(t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;if(Gs(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})){Vs();return}t&&this._createCustomBreadcrumb(t),this.conditionalFlush()}_doChangeToForegroundTasks(t){if(!this.session)return;if(!this.checkAndHandleExpiredSession()){H&&W.log("Document has become active, but session has expired");return}t&&this._createCustomBreadcrumb(t)}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{this.throttledAddEvent({type:Z.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){let t=o1(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const n=this._context.initialTimestamp/1e3;t=t.filter(r=>r.start>=n)}return Promise.all(Fi(this,t))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:t,eventBuffer:n}=this;if(!t||!n||this._requiresManualStart||t.segmentId)return;const r=n.getEarliestTimestamp();r&&r<this._context.initialTimestamp&&(this._context.initialTimestamp=r)}_popEventContext(){const t={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(),t}async _runFlush(){const t=this.getSessionId();if(!this.session||!this.eventBuffer||!t){H&&W.error("No session or eventBuffer found to flush.");return}if(await this._addPerformanceEntries(),!!this.eventBuffer?.hasEvents&&(await vM(this),!!this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const n=Date.now();if(n-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Hd;const r=this._popEventContext(),o=this.session.segmentId++;this._maybeSaveSession();const s=await this.eventBuffer.finish();await rg({replayId:t,recordingData:s,segmentId:o,eventContext:r,session:this.session,timestamp:n,onError:i=>this.handleException(i)})}catch(n){this.handleException(n),this.stop({reason:"sendError"});const r=R();if(r){let o;n instanceof gu?o="ratelimit_backoff":n instanceof Hd?o="invalid":o="send_error",r.recordDroppedEvent(o,"replay")}}}async _flush({force:t=!1}={}){if(!this._isEnabled&&!t)return;if(!this.checkAndHandleExpiredSession()){H&&W.error("Attempting to finish replay event after session expired.");return}if(!this.session)return;const n=this.session.started,o=Date.now()-n;this._debouncedFlush.cancel();const s=o<this._options.minReplayDuration,i=o>this._options.maxReplayDuration+5e3;if(s||i){H&&W.log(`Session duration (${Math.floor(o/1e3)}s) is too ${s?"short":"long"}, not sending replay.`),s&&this._debouncedFlush();return}const a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&H&&W.log("Flushing initial segment without checkout.");const c=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(u){this.handleException(u)}finally{this._flushLock=void 0,c&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Di(this.session)}_onMutationHandler(t){const{ignoreMutations:n}=this._options._experiments;if(n?.length&&t.some(a=>{const c=MM(a.target),u=n.join(",");return c?.matches(u)}))return!1;const r=t.length,o=this._options.mutationLimit,s=this._options.mutationBreadcrumbLimit,i=o&&r>o;if(r>s||i){const a=ft({category:"replay.mutations",data:{count:r,limit:i}});this._createCustomBreadcrumb(a)}return i?(this.stop({reason:"mutationLimit",forceFlush:this.recordingMode==="session"}),!1):!0}}function Dr(e,t){return[...e,...t].join(",")}function $M({mask:e,unmask:t,block:n,unblock:r,ignore:o}){const s=["base","iframe[srcdoc]:not([src])"],i=Dr(e,[".sentry-mask","[data-sentry-mask]"]),a=Dr(t,[]);return{maskTextSelector:i,unmaskTextSelector:a,blockSelector:Dr(n,[".sentry-block","[data-sentry-block]",...s]),unblockSelector:Dr(r,[]),ignoreSelector:Dr(o,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function BM({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:o,value:s}){if(o.unmaskTextSelector&&e.matches(o.unmaskTextSelector))return s;const i=n.includes(t),a=r&&t==="value"&&e.tagName==="INPUT"&&["submit","button"].includes(e.getAttribute("type")||"");return i||a?s.replace(/[\S]/g,"*"):s}const Wd='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',UM=["content-length","content-type","accept"],HM=Symbol.for("sentry__originalRequestBody");let jd=!1,qd=!1;function WM(){if(typeof Request>"u"||qd)return;const e=Request;try{const t=function(n,r){const o=new e(n,r);return r?.body!=null&&(o[HM]=r.body),o};t.prototype=e.prototype,$.Request=t,qd=!0}catch{}}const TO=(e=>new jM(e));class jM{constructor({flushMinDelay:t=uC,flushMaxDelay:n=lC,minReplayDuration:r=gC,maxReplayDuration:o=yd,stickySession:s=!0,useCompression:i=!0,workerUrl:a,_experiments:c={},maskAllText:u=!0,maskAllInputs:d=!0,blockAllMedia:l=!0,mutationBreadcrumbLimit:p=750,mutationLimit:f=1e4,slowClickTimeout:h=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:y=[],networkDetailDenyUrls:_=[],networkCaptureBodies:S=!0,networkRequestHeaders:w=[],networkResponseHeaders:E=[],mask:C=[],maskAttributes:x=["title","placeholder","aria-label"],unmask:v=[],block:O=[],unblock:k=[],ignore:b=[],maskFn:N,beforeAddRecordingEvent:A,beforeErrorSampling:L,onError:j,attachRawBodyFromRequest:X=!1}={}){this.name="Replay";const G=$M({mask:C,unmask:v,block:O,unblock:k,ignore:b});if(this._recordingOptions={maskAllInputs:d,maskAllText:u,maskInputOptions:{password:!0},maskTextFn:N,maskInputFn:N,maskAttributeFn:(B,M,U)=>BM({maskAttributes:x,maskAllText:u,privacyOptions:G,key:B,value:M,el:U}),...G,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:B=>{try{B.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!c.recordCrossOriginIframes},this._initialOptions={flushMinDelay:t,flushMaxDelay:n,minReplayDuration:Math.min(r,_C),maxReplayDuration:Math.min(o,yd),stickySession:s,useCompression:i,workerUrl:a,blockAllMedia:l,maskAllInputs:d,maskAllText:u,mutationBreadcrumbLimit:p,mutationLimit:f,slowClickTimeout:h,slowClickIgnoreSelectors:m,networkDetailAllowUrls:y,networkDetailDenyUrls:_,networkCaptureBodies:S,networkRequestHeaders:zd(w),networkResponseHeaders:zd(E),beforeAddRecordingEvent:A,beforeErrorSampling:L,onError:j,attachRawBodyFromRequest:X,_experiments:c},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Wd}`:Wd,this._recordingOptions.ignoreCSSAttributes=new Set(["background-image"])),this._isInitialized&&Qt())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return jd}set _isInitialized(t){jd=t}afterAllSetup(t){!Qt()||this._replay||(this._initialOptions.attachRawBodyFromRequest&&WM(),this._setup(t),this._initialize(t))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(t){return this._replay?this._replay.stop({forceFlush:t?.flush??this._replay.recordingMode==="session",reason:"manual"}):Promise.resolve()}flush(t){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(t):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(t){if(this._replay?.isEnabled())return this._replay.getSessionId(t)}getRecordingMode(){if(this._replay?.isEnabled())return this._replay.recordingMode}processSpan(t){const n=this.getReplayId(!0);n&&(Xt(t,{"sentry.replay_id":n}),this.getRecordingMode()==="buffer"&&Xt(t,{"sentry._internal.replay_is_buffering":!0}))}_initialize(t){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(t),this._replay.initializeSampling())}_setup(t){const n=qM(this._initialOptions,t);this._replay=new FM({options:n,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(t){try{const n=t.getIntegrationByName("ReplayCanvas");if(!n)return;this._replay._canvas=n.getOptions()}catch{}}}function qM(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},o=kn(n.replaysSessionSampleRate),s=kn(n.replaysOnErrorSampleRate);return o==null&&s==null&&$t(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),o!=null&&(r.sessionSampleRate=o),s!=null&&(r.errorSampleRate=s),r}function zd(e){return[...UM,...e.map(t=>t.toLowerCase())]}function IO(){return R()?.getIntegrationByName("Replay")}var zM=Object.defineProperty,GM=(e,t,n)=>t in e?zM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gd=(e,t,n)=>GM(e,typeof t!="symbol"?t+"":t,n);class VM{constructor(){Gd(this,"idNodeMap",new Map),Gd(this,"nodeMetaMap",new WeakMap)}getId(t){return t?this.getMeta(t)?.id??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const n=this.getId(t);this.idNodeMap.delete(n),t.childNodes&&t.childNodes.forEach(r=>this.removeNodeFromMap(r))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,n){const r=n.id;this.idNodeMap.set(r,t),this.nodeMetaMap.set(t,n)}replace(t,n){const r=this.getNode(t);if(r){const o=this.nodeMetaMap.get(r);o&&this.nodeMetaMap.set(n,o)}this.idNodeMap.set(t,n)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function YM(){return new VM}function JM(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function sc(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:sc(e.parentNode,t,n,r+1)}function Vd(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(JM(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}const Kn=`Please stop import mirror directly. Instead of that,\r
498
+ now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
499
+ or you can use record.mirror to access the mirror instance during recording.`;let Yd={map:{},getId(){return console.error(Kn),-1},getNode(){return console.error(Kn),null},removeNodeFromMap(){console.error(Kn)},has(){return console.error(Kn),!1},reset(){console.error(Kn)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Yd=new Proxy(Yd,{get(e,t,n){return t==="map"&&console.error(Kn),Reflect.get(e,t,n)}}));function _u(e,t,n,r,o=window){const s=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set(i){ig(()=>{n.set.call(this,i)},0),s&&s.set&&s.set.call(this,i)}}),()=>_u(e,t,s||{},!0)}function yu(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],o=n(r);return typeof o=="function"&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function KM(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Bi(e,t,n,r,o){if(!e)return!1;const s=KM(e);if(!s)return!1;const i=Vd(t,n),a=sc(s,i);let c=-1;return a<0?!1:(r&&(c=sc(s,Vd(null,r))),a>-1&&c<0?!0:a<c)}const Jd={};function sg(e){const t=Jd[e];if(t)return t;const n=window.document;let r=window[e];if(n&&typeof n.createElement=="function")try{const o=n.createElement("iframe");o.hidden=!0,n.head.appendChild(o);const s=o.contentWindow;s&&s[e]&&(r=s[e]),n.head.removeChild(o)}catch{}return Jd[e]=r.bind(window)}function mn(...e){return sg("requestAnimationFrame")(...e)}function ig(...e){return sg("setTimeout")(...e)}var Er=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Er||{});let gs;function XM(e){gs=e}const Sa=e=>gs?((...n)=>{try{return e(...n)}catch(r){if(gs&&gs(r)===!0)return()=>{};throw r}}):e;var tr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",QM=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Qo=0;Qo<tr.length;Qo++)QM[tr.charCodeAt(Qo)]=Qo;var ZM=function(e){var t=new Uint8Array(e),n,r=t.length,o="";for(n=0;n<r;n+=3)o+=tr[t[n]>>2],o+=tr[(t[n]&3)<<4|t[n+1]>>4],o+=tr[(t[n+1]&15)<<2|t[n+2]>>6],o+=tr[t[n+2]&63];return r%3===2?o=o.substring(0,o.length-1)+"=":r%3===1&&(o=o.substring(0,o.length-2)+"=="),o};const Kd=new Map;function ex(e,t){let n=Kd.get(e);return n||(n=new Map,Kd.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}const ag=(e,t,n)=>{if(!e||!(ug(e,t)||typeof e=="object"))return;const r=e.constructor.name,o=ex(n,r);let s=o.indexOf(e);return s===-1&&(s=o.length,o.push(e)),s};function _s(e,t,n){if(e instanceof Array)return e.map(r=>_s(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){const r=e.constructor.name,o=ZM(e);return{rr_type:r,base64:o}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[_s(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const r=e.constructor.name,{src:o}=e;return{rr_type:r,src:o}}else if(e instanceof HTMLCanvasElement){const r="HTMLImageElement",o=e.toDataURL();return{rr_type:r,src:o}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[_s(e.data,t,n),e.width,e.height]};if(ug(e,t)||typeof e=="object"){const r=e.constructor.name,o=ag(e,t,n);return{rr_type:r,index:o}}}}return e}const cg=(e,t,n)=>e.map(r=>_s(r,t,n)),ug=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(o=>typeof t[o]=="function").find(o=>e instanceof t[o]);function tx(e,t,n,r,o){const s=[],i=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of i)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const c=yu(t.CanvasRenderingContext2D.prototype,a,function(u){return function(...d){return Bi(this.canvas,n,r,o,!0)||ig(()=>{const l=cg(d,t,this);e(this.canvas,{type:Er["2D"],property:a,args:l})},0),u.apply(this,d)}});s.push(c)}catch{const c=_u(t.CanvasRenderingContext2D.prototype,a,{set(u){e(this.canvas,{type:Er["2D"],property:a,args:[u],setter:!0})}});s.push(c)}return()=>{s.forEach(a=>a())}}function nx(e){return e==="experimental-webgl"?"webgl":e}function Xd(e,t,n,r,o){const s=[];try{const i=yu(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(c,...u){if(!Bi(this,t,n,r,!0)){const d=nx(c);if("__context"in this||(this.__context=d),o&&["webgl","webgl2"].includes(d))if(u[0]&&typeof u[0]=="object"){const l=u[0];l.preserveDrawingBuffer||(l.preserveDrawingBuffer=!0)}else u.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[c,...u])}});s.push(i)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(i=>i())}}function Qd(e,t,n,r,o,s,i,a){const c=[],u=Object.getOwnPropertyNames(e);for(const d of u)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(d))try{if(typeof e[d]!="function")continue;const l=yu(e,d,function(p){return function(...f){const h=p.apply(this,f);if(ag(h,a,this),"tagName"in this.canvas&&!Bi(this.canvas,r,o,s,!0)){const m=cg(f,a,this),y={type:t,property:d,args:m};n(this.canvas,y)}return h}});c.push(l)}catch{const l=_u(e,d,{set(p){n(this.canvas,{type:t,property:d,args:[p],setter:!0})}});c.push(l)}return c}function rx(e,t,n,r,o,s){const i=[];return i.push(...Qd(t.WebGLRenderingContext.prototype,Er.WebGL,e,n,r,o,s,t)),typeof t.WebGL2RenderingContext<"u"&&i.push(...Qd(t.WebGL2RenderingContext.prototype,Er.WebGL2,e,n,r,o,s,t)),()=>{i.forEach(a=>a())}}const ox='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 sx(){const e=new Blob([ox]);return URL.createObjectURL(e)}class ix{constructor(t){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:n,sampling:r="all",win:o,recordCanvas:s,errorHandler:i}=t;t.sampling=r,this.mutationCb=t.mutationCb,this.mirror=t.mirror,this.options=t,i&&XM(i),(s&&typeof r=="number"||n)&&(this.worker=this.initFPSWorker()),this.addWindow(o),!n&&Sa(()=>{s&&r==="all"&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),s&&typeof r=="number"&&this.initCanvasFPSObserver()})()}reset(){this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(t=>{try{t()}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(t){const{sampling:n="all",blockClass:r,blockSelector:o,unblockSelector:s,recordCanvas:i,enableManualSnapshot:a}=this.options;if(!this.windowsSet.has(t)){if(a){this.windowsSet.add(t),this.windows.push(new WeakRef(t));return}Sa(()=>{if(i&&n==="all"&&this.initCanvasMutationObserver(t,r,o,s),i&&typeof n=="number"){const c=Xd(t,r,o,s,!0);this.restoreHandlers.push(()=>{c()})}})(),this.windowsSet.add(t),this.windows.push(new WeakRef(t))}}addShadowRoot(t){this.shadowDoms.add(new WeakRef(t))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(t,n){if(n?.skipRequestAnimationFrame){this.takeSnapshot(performance.now(),!0,t);return}mn(r=>this.takeSnapshot(r,!0,t))}initFPSWorker(){const t=new Worker(sx());return t.onmessage=n=>{const r=n.data,{id:o}=r;if(this.snapshotInProgressMap.set(o,!1),!("base64"in r))return;const{base64:s,type:i,width:a,height:c}=r;this.mutationCb({id:o,type:Er["2D"],commands:[{property:"clearRect",args:[0,0,a,c]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:s}],type:i}]},0,0,a,c]}]})},t}initCanvasFPSObserver(){let t;if(!this.windows.length&&!this.shadowDoms.size)return;const n=r=>{this.takeSnapshot(r,!1),t=mn(n)};t=mn(n),this.restoreHandlers.push(()=>{t&&cancelAnimationFrame(t)})}initCanvasMutationObserver(t,n,r,o){const s=Xd(t,n,r,o,!1),i=tx(this.processMutation.bind(this),t,n,r,o),a=rx(this.processMutation.bind(this),t,n,r,o,this.mirror);this.restoreHandlers.push(()=>{s(),i(),a()})}getCanvasElements(t,n,r){const o=[],s=i=>{i.querySelectorAll("canvas").forEach(a=>{Bi(a,t,n,r)||o.push(a)})};for(const i of this.windows){const a=i.deref();let c;try{c=a&&a.document}catch{}c&&s(c)}for(const i of this.shadowDoms){const a=i.deref();a&&s(a)}return o}takeSnapshot(t,n,r){const{sampling:o,blockClass:s,blockSelector:i,unblockSelector:a,dataURLOptions:c,maxCanvasSize:u}=this.options,l=1e3/(o==="all"?2:o||2);return this.lastSnapshotTime&&t-this.lastSnapshotTime<l?!1:(this.lastSnapshotTime=t,(r?[r]:this.getCanvasElements(s,i,a)).forEach(h=>{const m=this.mirror.getId(h);if(!(!this.mirror.hasNode(h)||!h.width||!h.height||this.snapshotInProgressMap.get(m))){if(this.snapshotInProgressMap.set(m,!0),!n&&["webgl","webgl2"].includes(h.__context)){const y=h.getContext(h.__context);y?.getContextAttributes()?.preserveDrawingBuffer===!1&&y.clear(y.COLOR_BUFFER_BIT)}createImageBitmap(h).then(y=>{this.worker?.postMessage({id:m,bitmap:y,width:h.width,height:h.height,dataURLOptions:c,maxCanvasSize:u},[y])}).catch(y=>{Sa(()=>{throw this.snapshotInProgressMap.delete(m),y})()})}}),!0)}startPendingCanvasMutationFlusher(){mn(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=n=>{this.rafStamps.latestId=n,mn(t)};mn(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,n)=>{const r=this.mirror.getId(n);this.flushPendingCanvasMutationFor(n,r)}),mn(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,n){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(t);if(!r||n===-1)return;const o=r.map(i=>{const{type:a,...c}=i;return c}),{type:s}=r[0];this.mutationCb({id:n,type:s,commands:o}),this.pendingCanvasMutations.delete(t)}}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(e){console.debug("Unable to override Array.from",e)}YM();var Zd;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(Zd||(Zd={}));const ef={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}}},ax="ReplayCanvas",Zo=1280,cx=((e={})=>{const[t,n]=e.maxCanvasSize||[],r={quality:e.quality||"medium",enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,Zo):Zo,n?Math.min(n,Zo):Zo]};let o,s;const i=new Promise(a=>s=a);return{name:ax,getOptions(){const{quality:a,enableManualSnapshot:c,maxCanvasSize:u}=r;return{enableManualSnapshot:c,recordCanvas:!0,getCanvasManager:d=>{const l=new ix({...d,enableManualSnapshot:c,maxCanvasSize:u,errorHandler:p=>{try{typeof p=="object"&&(p.__rrweb__=!0)}catch{}}});return o=l,s(l),l},...ef[a]||ef.medium}},async snapshot(a,c){(o||await i).snapshot(a,c)}}}),wO=cx;function ux(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function lg(e){try{return new URL(e,P.location.origin).href}catch{return}}function lx(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function dg(e){try{return new Headers(e)}catch{return}}const fg={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function dx(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:o,enableHTTPTimings:s,tracePropagationTargets:i,onRequestSpanStart:a,onRequestSpanEnd:c}={...fg,...t},u=typeof o=="function"?o:f=>!0,d=f=>px(f,i),l={},p=e.getOptions().propagateTraceparent;n&&Si(f=>{const h=PE(f,u,d,l,{propagateTraceparent:p,onRequestSpanEnd:c});if(h){const m=lg(f.fetchData.url),y=m?In(m).host:void 0,_=m?st(m):void 0;h.setAttributes({[pp]:_,[Fn]:_,"server.address":y}),s&&tf(h,e),a?.(h,{headers:f.headers})}}),r&&eu(f=>{const h=hx(f,u,d,l,p,c);h&&(s&&tf(h,e),a?.(h,{headers:dg(f.xhr.__sentry_xhr_v3__?.request_headers)}))})}const fx=300;function tf(e,t){const{url:n}=J(e).data;if(!n||typeof n!="string")return;let r=()=>{setTimeout(o)};if(Ze(t)){const s=e.end.bind(e);e.end=i=>{const a=i??_e();let c=!1;const u=()=>{c||(c=!0,setTimeout(o),s(a),clearTimeout(d))};r=u;const d=setTimeout(u,fx)}}const o=tn("resource",({entries:s})=>{s.forEach(i=>{lx(i)&&i.name.endsWith(n)&&(e.setAttributes(nm(i)),r())})})}function px(e,t){const n=en();if(n){let r,o;try{r=new URL(e,n),o=new URL(n).origin}catch{return!1}const s=r.origin===o;return t?Ke(r.toString(),t)||s&&Ke(r.pathname,t):s}else{const r=!!e.match(/^\/(?!\/)/);return t?Ke(e,t):r}}function hx(e,t,n,r,o,s){const i=e.xhr,a=i?.[Mt];if(!i||i.__sentry_own_request__||!a)return;const{url:c,method:u}=a,d=Fe()&&t(c);if(e.endTimestamp){const E=i.__sentry_xhr_span_id__;if(!E)return;const C=r[E];C&&(d&&a.status_code!==void 0&&(bs(C,a.status_code),C.end(),s?.(C,{headers:dg(im(i)),error:e.error})),delete r[E]);return}const l=lg(c),p=In(l||c),f=l?st(l):void 0,h=st(Up(c)),m=R(),y=!!Ee(),_=y||!!m&&Ze(m),S=d&&_?cn({name:`${u} ${h}`,attributes:{url:st(c),type:"xhr","http.method":u,"http.url":f,[Fn]:f,"server.address":p?.host,[oe]:"auto.http.browser",[ge]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new Rn,w=ii(S)&&y?void 0:S;return d&&!_&&m?.recordDroppedEvent("no_parent_span","span"),i.__sentry_xhr_span_id__=S.spanContext().spanId,r[i.__sentry_xhr_span_id__]=S,n(c)&&mx(i,Fe()&&_?w:void 0,o),m&&m.emit("beforeOutgoingRequestSpan",S,e),S}function mx(e,t,n){const{"sentry-trace":r,baggage:o,traceparent:s}=Wp({span:t,propagateTraceparent:n});r&&gx(e,r,o,s)}function gx(e,t,n,r){const o=e.__sentry_xhr_v3__?.request_headers;if(!(o?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!o?.traceparent&&e.setRequestHeader("traceparent",r),n){const s=o?.baggage;(!s||!ux(s))&&e.setRequestHeader("baggage",n)}}catch{}}const nf=new WeakMap,rf=new WeakMap,_x=9e4,yx=["text/event-stream","application/x-ndjson","application/stream+json"],Sx=()=>({name:"FetchStreamPerformance",setup(){iI(e=>{if(e.response){const t=nf.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);const n=rf.get(e.response);n&&clearTimeout(n)}}}),Si(e=>{if(e.endTimestamp&&e.response){const t=e.response.headers?.get("content-type")||"";if(e.response.headers?.get("content-length")||!yx.some(c=>t.startsWith(c)))return;const n=e.fetchData?.url||"",r=e.fetchData?.method||"GET",o=eo(n),s=n.startsWith("data:")?st(n):o?Bp(o):n,i=cn({name:`${r} ${s}`,startTime:e.endTimestamp,attributes:{url:st(n),"http.method":r,type:"fetch",[ge]:"http.client.stream",[oe]:"auto.http.browser.stream"}});nf.set(e.response,i);const a=setTimeout(()=>{i.isRecording()&&i.end()},_x);rf.set(e.response,a)}})}}),pg="WebVitals",bx=(e={})=>{const t=new Set(e.ignore??[]);return{name:pg,setup(n){const r=Ze(n),{enableStandaloneClsSpans:o,enableStandaloneLcpSpans:s}=e._experiments??{},i=r||t.has("cls")?void 0:o||!1,a=r||t.has("lcp")?void 0:s||!1,c=Aw({recordClsStandaloneSpans:i,recordLcpStandaloneSpans:a,client:n}),u=new WeakSet;n.on("afterStartPageLoadSpan",d=>{u.add(d)}),n.on("spanEnd",d=>{u.delete(d)&&(c(),$w(d,{recordClsOnPageloadSpan:i===!1,recordLcpOnPageloadSpan:a===!1,spanStreamingEnabled:r}))}),r?(t.has("lcp")||rk(n),t.has("cls")||sk(n),t.has("inp")||ak()):t.has("inp")||Qw()},afterAllSetup(){t.has("inp")||nk()}}};function Ex(){P.document?P.document.addEventListener("visibilitychange",()=>{const e=Ee();if(!e)return;const t=be(e);if(P.document.hidden&&t){const n="cancelled",{op:r,status:o}=J(t);T&&g.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),o||t.setStatus({code:ne,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")}const vx=3600,hg="sentry_previous_trace",Tx="sentry.previous_trace";function Ix(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let o=r?Rx():void 0;e.on("spanStart",i=>{if(be(i)!==i)return;const a=q().getPropagationContext();o=wx(o,i,a),r&&kx(o)});let s=!0;n&&e.on("beforeSampling",i=>{if(!o)return;const a=q(),c=a.getPropagationContext();if(s&&c.parentSpanId){s=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(o.sampleRate),sampled:String(ic(o.spanContext))},sampleRand:o.sampleRand}),i.parentSampled=ic(o.spanContext),i.parentSampleRate=o.sampleRate,i.spanAttributes={...i.spanAttributes,[Of]:o.sampleRate}})}function wx(e,t,n){const r=J(t);function o(){try{const a=Number(r.data?.[pc]??n.dsc?.sample_rate);return Number.isNaN(a)?0:a}catch{return 0}}const s={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:o(),sampleRand:n.sampleRand};if(!e)return s;const i=e.spanContext;return i.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=vx&&(T&&g.log(`Adding previous_trace \`${JSON.stringify(i)}\` link to span \`${JSON.stringify({op:r.op,...t.spanContext()})}\``),t.addLink({context:i,attributes:{[w_]:"previous_trace"}}),t.setAttribute(Tx,`${i.traceId}-${i.spanId}-${ic(i)?1:0}`)),s)}function kx(e){try{P.sessionStorage.setItem(hg,JSON.stringify(e))}catch(t){T&&g.warn("Could not store previous trace in sessionStorage",t)}}function Rx(){try{const e=P.sessionStorage?.getItem(hg);return JSON.parse(e)}catch{return}}function ic(e){return e.traceFlags===1}const Cx="BrowserTracing",Ax=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function Mx(){const e=P.navigator;return e?.userAgent?Ax.test(e.userAgent):!1}const xx={...rs,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...fg},kO=((e={})=>{"enableElementTiming"in e&&$t(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});const t={name:void 0,source:void 0},n=P.document,{enableInp:r,enableLongTask:o,enableLongAnimationFrame:s,_experiments:{enableInteractions:i,enableStandaloneClsSpans:a,enableStandaloneLcpSpans:c},beforeStartSpan:u,idleTimeout:d,finalTimeout:l,childSpanTimeout:p,markBackgroundSpan:f,traceFetch:h,traceXHR:m,trackFetchStreamPerformance:y,shouldCreateSpanForRequest:_,enableHTTPTimings:S,ignoreResourceSpans:w,ignorePerformanceApiSpans:E,instrumentPageLoad:C,instrumentNavigation:x,detectRedirects:v,linkPreviousTrace:O,consistentTraceSampling:k,enableReportPageLoaded:b,onRequestSpanStart:N,onRequestSpanEnd:A}={...xx,...e},L=Mx();let j,X;function G(B,M,U=!0,D){const Q=M.op==="pageload",se=M.name,te=u?u(M):M,ie=eo(D||en()),qe={...ie?.pathname&&{[Wy]:ie.pathname},...ie&&!ui(ie)&&{[Fn]:ie.href},...te.attributes};if(se!==te.name&&(qe[We]="custom"),te.attributes=qe,!U){const tt=Pn();cn({...te,startTime:tt}).end(tt);return}t.name=te.name,t.source=qe[We];const et=up(te,{idleTimeout:d,finalTimeout:l,childSpanTimeout:p,disableAutoFinish:Q,beforeSpanEnd:tt=>{Fw(tt,{ignoreResourceSpans:w,ignorePerformanceApiSpans:E,spanStreamingEnabled:Ze(B)}),af(B,void 0);const un=q(),kt=un.getPropagationContext();un.setPropagationContext({...kt,traceId:et.spanContext().traceId,sampled:It(et),dsc:ut(tt)}),Q&&(X=void 0)},trimIdleSpanEndTimestamp:!b});Q&&b&&(X=et),af(B,et);function wt(){n&&["interactive","complete"].includes(n.readyState)&&(B.emit("idleSpanEnableAutoFinish",et),n.removeEventListener("readystatechange",wt))}Q&&!b&&n&&(n.addEventListener("readystatechange",wt),wt())}return{name:Cx,setup(B){if(L){T&&g.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}if(V_(),s&&$.PerformanceObserver&&PerformanceObserver.supportedEntryTypes?.includes("long-animation-frame")?xw():o&&Mw(),i&&Nw(),v&&n){const U=()=>{j=_e()};addEventListener("click",U,{capture:!0}),addEventListener("keydown",U,{capture:!0,passive:!0})}function M(){const U=co(B);U&&!J(U).timestamp&&(T&&g.log(`[Tracing] Finishing current active span with op: ${J(U).op}`),U.setAttribute(Kr,"cancelled"),U.end())}B.on("startNavigationSpan",(U,D)=>{if(R()!==B)return;if(D?.isRedirect){T&&g.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),G(B,{op:"navigation.redirect",...U},!1,D.url);return}j=void 0,M(),me().setPropagationContext({traceId:_t(),sampleRand:Math.random(),propagationSpanId:Fe()?void 0:Nt()});const Q=q();Q.setPropagationContext({traceId:_t(),sampleRand:Math.random(),propagationSpanId:Fe()?void 0:Nt()}),Q.setSDKProcessingMetadata({normalizedRequest:void 0}),G(B,{op:"navigation",...U,parentSpan:null,forceTransaction:!0},!0,D?.url)}),B.on("startPageLoadSpan",(U,D={})=>{if(R()!==B)return;M();const Q=D.sentryTrace||of("sentry-trace")||sf("sentry-trace"),se=D.baggage||of("baggage")||sf("baggage"),te=jf(Q,se),ie=q();ie.setPropagationContext(te),Fe()||(ie.getPropagationContext().propagationSpanId=Nt()),ie.setSDKProcessingMetadata({normalizedRequest:Ps()}),G(B,{op:"pageload",...U})}),B.on("endPageloadSpan",()=>{b&&X&&(X.setAttribute(Kr,"reportPageLoaded"),X.end())})},afterAllSetup(B){if(L)return;B.addIntegration&&!B.getIntegrationByName?.(pg)&&B.addIntegration(bx({ignore:r?[]:["inp"],_experiments:{enableStandaloneClsSpans:a,enableStandaloneLcpSpans:c}}));let M=en();if(O!=="off"&&Ix(B,{linkPreviousTrace:O,consistentTraceSampling:k}),P.location){if(C){const U=ve();Nx(B,{name:P.location.pathname,startTime:U?U/1e3:void 0,attributes:{[We]:"url",[oe]:"auto.pageload.browser"}})}x&&Ai(({to:U,from:D})=>{if(D===void 0&&M?.indexOf(U)!==-1){M=void 0;return}M=void 0;const Q=eo(U),se=co(B),te=se&&v&&Px(se,j);Ox(B,{name:Q?.pathname||P.location.pathname,attributes:{[We]:"url",[oe]:"auto.navigation.browser"}},{url:U,isRedirect:te})})}f&&Ex(),i&&Lx(B,d,l,p,t),dx(B,{traceFetch:h,traceXHR:m,tracePropagationTargets:B.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:_,enableHTTPTimings:S,onRequestSpanStart:N,onRequestSpanEnd:A}),y&&B.addIntegration(Sx())}}});function Nx(e,t,n){e.emit("startPageLoadSpan",t,n),q().setTransactionName(t.name);const r=co(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function Ox(e,t,n){const{url:r,isRedirect:o}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:o,url:r}),e.emit("startNavigationSpan",t,{isRedirect:o,url:r});const s=q();return s.setTransactionName(t.name),r&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...Ps(),url:r}}),co(e)}function of(e){return P.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function sf(e){return P.performance?.getEntriesByType?.("navigation")[0]?.serverTiming?.find(r=>r.name===e)?.description}function Lx(e,t,n,r,o){const s=P.document;let i;const a=()=>{const c="ui.action.click",u=co(e);if(u){const d=J(u).op;if(["navigation","pageload"].includes(d)){T&&g.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(Kr,"interactionInterrupted"),i.end(),i=void 0),!o.name){T&&g.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}i=up({name:o.name,op:c,attributes:{[We]:o.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};s&&addEventListener("click",a,{capture:!0})}const mg="_sentry_idleSpan";function co(e){return e[mg]}function af(e,t){Re(e,mg,t)}const cf=1.5;function Px(e,t){const n=J(e),r=Pn(),o=n.start_timestamp;return!(r-o>cf||t&&r-t<=cf)}function RO(e=R()){e?.emit("endPageloadSpan")}function CO(e){const t=Ee();if(t===e)return;const n=q();e.end=new Proxy(e.end,{apply(r,o,s){return yt(n,t),Reflect.apply(r,o,s)}}),yt(n,e)}const AO=()=>({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(!Ze(e)){r.traceLifecycle="static",T&&g.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}const o=r.beforeSendSpan;if(o&&!ri(o)){r.traceLifecycle="static",T&&g.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}const s=new nI(e);e.on("afterSpanEnd",i=>{It(i)&&s.add(jy(i,e))}),e.on("afterSegmentSpanEnd",i=>{const a=i.spanContext().traceId;setTimeout(()=>{s.flush(a)},500)})}});function vr(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function Dx(e,t){const n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);const r=vr(n);return o=>r.then(s=>o(s.transaction(t,"readwrite").objectStore(t)))}function Su(e){return vr(e.getAllKeys())}function Fx(e,t,n){return e(r=>Su(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),vr(r.transaction)}))}function $x(e,t,n){return e(r=>Su(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.min(...o,0)-1),vr(r.transaction)}))}function Bx(e){return e(t=>Su(t).then(n=>{const r=n[0];if(r!=null)return vr(t.get(r)).then(o=>(t.delete(r),vr(t.transaction).then(()=>o)))}))}function Ux(e){let t;function n(){return t==null&&(t=Dx(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{push:async r=>{try{const o=ks(r);await Fx(n(),o,e.maxQueueSize||30)}catch{}},unshift:async r=>{try{const o=ks(r);await $x(n(),o,e.maxQueueSize||30)}catch{}},shift:async()=>{try{const r=await Bx(n());if(r)return Z_(r)}catch{}}}}function Hx(e){return t=>{const n=e({...t,createStore:Ux});return P.addEventListener("online",async r=>{await n.flush()}),n}}function MO(e=am){return Hx(rb(e))}const uf=1e6,Wx="window"in $&&$.window===$&&typeof importScripts>"u",wn=String(0),bu=Wx?"main":"worker",Ks=P.navigator;let gg="",_g="",yg="",ac=Ks?.userAgent||"",Sg="";const jx=Ks?.language||Ks?.languages?.[0]||"";function qx(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}const lf=Ks?.userAgentData;qx(lf)&&lf.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(gg=e.platform||"",yg=e.architecture||"",Sg=e.model||"",_g=e.platformVersion||"",e.fullVersionList?.length){const t=e.fullVersionList[e.fullVersionList.length-1];ac=`${t.brand} ${t.version}`}}).catch(e=>{});function zx(e){return!("thread_metadata"in e)}function Gx(e){return zx(e)?Qx(e):e}function Vx(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}function Yx(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 o=Vx(r),s=Gx(n),i=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:_e()*1e3),a=typeof r.timestamp=="number"?r.timestamp*1e3:_e()*1e3;return{event_id:e,timestamp:new Date(i).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||mo,runtime:{name:"javascript",version:P.navigator.userAgent},os:{name:gg,version:_g,build_number:ac},device:{locale:jx,model:Sg,manufacturer:ac,architecture:yg,is_emulator:!1},debug_meta:{images:Eg(n.resources)},profile:s,transactions:[{name:r.transaction||"",id:r.event_id||we(),trace_id:o,active_thread_id:wn,relative_start_ns:"0",relative_end_ns:((a-i)*1e6).toFixed(0)}]}}function Jx(e,t,n){if(e==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);const r=Xx(e),o=t.getOptions(),s=t.getSdkMetadata?.()?.sdk;return{chunk_id:we(),client_sdk:{name:s?.name??"sentry.javascript.browser",version:s?.version??"0.0.0"},profiler_id:n||we(),platform:"javascript",version:"2",release:o.release??"",environment:o.environment??"production",debug_meta:{images:Eg(e.resources)},profile:r}}function Kx(e){try{if(!e||typeof e!="object")return{reason:"chunk is not an object"};const t=r=>typeof r=="string"&&/^[a-f0-9]{32}$/.test(r);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}`}}}function Xx(e){const t=[];for(let a=0;a<e.frames.length;a++){const c=e.frames[a];c&&(t[a]={function:c.name,abs_path:typeof c.resourceId=="number"?e.resources[c.resourceId]:void 0,lineno:c.line,colno:c.column})}const n=[];for(let a=0;a<e.stacks.length;a++){const c=e.stacks[a];if(!c)continue;const u=[];let d=c;for(;d;)u.push(d.frameId),d=d.parentId===void 0?void 0:e.stacks[d.parentId];n[a]=u}const r=ve(),o=typeof performance.timeOrigin=="number"?performance.timeOrigin:r||0,s=o-(r||o),i=[];for(let a=0;a<e.samples.length;a++){const c=e.samples[a];if(!c)continue;const u=(o+(c.timestamp-s))/1e3;i[a]={stack_id:c.stackId??0,thread_id:wn,timestamp:u}}return{frames:t,stacks:n,samples:i,thread_metadata:{[wn]:{name:bu}}}}function bg(e){return J(e).op==="pageload"}function Qx(e){let t,n=0;const r={samples:[],stacks:[],frames:[],thread_metadata:{[wn]:{name:bu}}},o=e.samples[0];if(!o)return r;const s=o.timestamp,i=ve(),a=typeof performance.timeOrigin=="number"?performance.timeOrigin:i||0,c=a-(i||a);return e.samples.forEach((u,d)=>{if(u.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[d]={elapsed_since_start_ns:((u.timestamp+c-s)*uf).toFixed(0),stack_id:t,thread_id:wn};return}let l=e.stacks[u.stackId];const p=[];for(;l;){p.push(l.frameId);const h=e.frames[l.frameId];h&&r.frames[l.frameId]===void 0&&(r.frames[l.frameId]={function:h.name,abs_path:typeof h.resourceId=="number"?e.resources[h.resourceId]:void 0,lineno:h.line,colno:h.column}),l=l.parentId===void 0?void 0:e.stacks[l.parentId]}const f={elapsed_since_start_ns:((u.timestamp+c-s)*uf).toFixed(0),stack_id:n,thread_id:wn};r.stacks[n]=p,r.samples[d]=f,n++}),r}function Zx(e,t){if(!t.length)return e;for(const n of t)e[1].push([{type:"profile"},n]);return e}function eN(e){const t=[];return Cn(e,(n,r)=>{if(r==="transaction")for(let o=1;o<n.length;o++)n[o]?.contexts?.profile?.profile_id&&t.push(n[o])}),t}function Eg(e){const r=R()?.getOptions()?.stackParser;return r?Jy(r,e):[]}function vg(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}function tN(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)}let Eu=!1;const Tg=3e4;function nN(e){return typeof e=="function"}function Ig(){const e=P.Profiler;if(!nN(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(Tg/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.")),Eu=!0}}function df(e){if(Eu)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 n=R()?.getOptions();if(!n)return T&&g.log("[Profiling] Profiling disabled, no options found."),!1;const r=n.profilesSampleRate;return vg(r)?r?(r===!0?!0:Math.random()<r)?!0:(T&&g.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!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)}function rN(e){if(Eu)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 vg(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)}function es(e){return typeof e.profilesSampleRate<"u"}function oN(e,t,n,r){return tN(n)?Yx(e,t,n,r):null}const En=new Map;function sN(){return En.size}function iN(e){const t=En.get(e);return t&&En.delete(e),t}function aN(e,t){if(En.set(e,t),En.size>30){const n=En.keys().next().value;n!==void 0&&En.delete(n)}}const wg=new WeakSet;function Xs(e){e.setAttribute("thread.id",wn),e.setAttribute("thread.name",bu)}function ff(e){let t;bg(e)&&(t=_e()*1e3);const n=Ig();if(!n)return;T&&g.log(`[Profiling] started profiling span: ${J(e).description}`);const r=we();let o=null;q().setContext("profile",{profile_id:r,start_timestamp:t}),wg.add(e),Xs(e);async function s(){if(e&&n){if(o){T&&g.log("[Profiling] profile for:",J(e).description,"already exists, returning early");return}return n.stop().then(u=>{if(i&&(P.clearTimeout(i),i=void 0),T&&g.log(`[Profiling] stopped profiling of span: ${J(e).description}`),!u){T&&g.log(`[Profiling] profiler returned null profile for: ${J(e).description}`,"this may indicate an overlapping span or a call to stopProfiling with a profile title that was never started");return}o=u,aN(r,u)}).catch(u=>{T&&g.log("[Profiling] error while stopping profiler:",u)})}}let i=P.setTimeout(()=>{T&&g.log("[Profiling] max profile duration elapsed, stopping profiling for:",J(e).description),s()},Tg);const a=e.end.bind(e);function c(){return e?(s().then(()=>{a()},()=>{a()}),e):a()}e.end=c}const cN=6e4,uN=3e5;class lN{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(t){const n=t.getOptions().profileLifecycle,r=rN(t.getOptions());T&&g.log(`[Profiling] Initializing profiler (lifecycle='${n}').`),r||T&&g.log("[Profiling] Session not sampled. Skipping lifecycle profiler initialization."),this._profilerId=we(),this._client=t,this._sessionSampled=r,this._lifecycleMode=n,n==="trace"&&this._setupTraceLifecycleListeners(t),t.on("spanStart",o=>{this._isRunning&&Xs(o)})}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(t){if(this._lifecycleMode!=="trace"||!this._sessionSampled)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] Detected already active root span during setup. Active root spans now:",r),this._beginProfiling()),this._isRunning&&Xs(t)}_beginProfiling(){if(!this._isRunning){if(this._isRunning=!0,T&&g.log("[Profiling] Started profiling with profiler ID:",this._profilerId),Wr().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(t=>{T&&g.error("[Profiling] Failed to collect current profile chunk on `stop()`:",t)}),this._lifecycleMode==="manual"&&Wr().setContext("profile",{}))}_setupTraceLifecycleListeners(t){t.on("spanStart",n=>{if(!this._sessionSampled){T&&g.log("[Profiling] Span not profiled because of negative sampling decision for user session.");return}if(n!==be(n))return;if(!n.isRecording()){T&&g.log("[Profiling] Discarding profile because root span was not sampled.");return}const r=n.spanContext().spanId;if(!r||this._activeRootSpanIds.has(r))return;this._registerTraceRootSpan(r);const o=this._activeRootSpanIds.size;o===1&&(T&&g.log(`[Profiling] Root span ${r} started. Profiling active while there are active root spans (count=${o}).`),this._beginProfiling())}),t.on("spanEnd",n=>{if(!this._sessionSampled)return;const r=n.spanContext().spanId;if(!r||!this._activeRootSpanIds.has(r))return;this._activeRootSpanIds.delete(r);const o=this._activeRootSpanIds.size;T&&g.log(`[Profiling] Root span with ID ${r} ended. Will continue profiling for as long as there are active root spans (currently: ${o}).`),o===0&&(this._collectCurrentChunk().catch(s=>{T&&g.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",s)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,Wr().setContext("profile",{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(t=>clearTimeout(t)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(t){this._activeRootSpanIds.add(t);const n=setTimeout(()=>this._onRootSpanTimeout(t),uN);this._rootSpanTimeouts.set(t,n)}_startProfilerInstance(){if(this._profiler?.stopped===!1)return;const t=Ig();if(!t){T&&g.log("[Profiling] Failed to start JS Profiler.");return}this._profiler=t}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(t=>{T&&g.error("[Profiling] Failed to collect current profile chunk during periodic chunking:",t)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},cN))}_onRootSpanTimeout(t){this._rootSpanTimeouts.has(t)&&(this._rootSpanTimeouts.delete(t),this._activeRootSpanIds.has(t)&&(T&&g.log(`[Profiling] Reached 5-minute timeout for root span ${t}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(t),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){const t=this._profiler;if(this._profiler=void 0,!!t)try{const n=await t.stop(),r=Jx(n,this._client,this._profilerId),o=Kx(r);if("reason"in o){T&&g.log("[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):",o.reason);return}this._sendProfileChunk(r),T&&g.log("[Profiling] Collected browser profile chunk.")}catch(n){T&&g.log("[Profiling] Error while stopping JS Profiler for chunk:",n)}}_sendProfileChunk(t){const n=this._client,r=go(n.getSdkMetadata?.()),o=n.getDsn(),s=n.getOptions().tunnel,i=Qe({event_id:we(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!s&&o&&{dsn:Tt(o)}},[[{type:"profile_chunk",platform:"javascript"},t]]);n.sendEnvelope(i).then(null,a=>{T&&g.error("Error while sending profile chunk envelope:",a)})}}const dN="BrowserProfiling",fN=(()=>({name:dN,setup(e){const t=e.getOptions(),n=new lN;if(!es(t)&&!t.profileLifecycle&&(t.profileLifecycle="manual"),es(t)&&!t.profilesSampleRate){T&&g.log("[Profiling] Profiling disabled, no profiling options found.");return}const r=Ee(),o=r&&be(r);if(es(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."),es(t))o&&bg(o)&&df(o)&&ff(o),e.on("spanStart",s=>{const i=be(s);s===i?df(s)&&ff(s):wg.has(i)&&Xs(s)}),e.on("beforeEnvelope",s=>{if(!sN())return;const i=eN(s);if(!i.length)return;const a=[];for(const c of i){const u=c?.contexts,d=u?.profile?.profile_id,l=u?.profile?.start_timestamp;if(typeof d!="string"){T&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}if(!d){T&&g.log("[Profiling] cannot find profile for a span without a profile context");continue}u?.profile&&delete u.profile;const p=iN(d);if(!p){T&&g.log(`[Profiling] Could not retrieve profile for span: ${d}`);continue}const f=oN(d,l,p,c);f&&a.push(f)}Zx(s,a)});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),o&&n.notifyRootSpanActive(o),P.setTimeout(()=>{const i=Ee(),a=i&&be(i);a&&n.notifyRootSpanActive(a)},0)}}}})),xO=fN,pN="SpotlightBrowser",hN=[{op:"ui.interaction.click",name:"#sentry-spotlight"}],mN=((e={})=>{const t=e.sidecarUrl||"http://localhost:8969/stream";return{name:pN,setup:()=>{T&&g.log("Using Sidecar URL",t)},beforeSetup(n){const r=n.getOptions();r.ignoreSpans=[...r.ignoreSpans||[],...hN]},afterAllSetup:n=>{gN(n,t)}}});function gN(e,t){const n=Zc("fetch");let r=0;e.on("beforeEnvelope",o=>{if(r>3){g.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:",r);return}n(t,{method:"POST",body:ks(o),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)})})}const NO=mN,OO=()=>({name:"LaunchDarkly",processEvent(e,t,n){return kr(e)}});function LO(){return{name:"sentry-flag-auditor",type:"flag-used",synchronous:!0,method:(e,t,n)=>{An(e,t.value),Mn(e,t.value)}}}const PO=()=>({name:"OpenFeature",processEvent(e,t,n){return kr(e)}});class DO{after(t,n){An(n.flagKey,n.value),Mn(n.flagKey,n.value)}error(t,n,r){An(t.flagKey,t.defaultValue),Mn(t.flagKey,t.defaultValue)}}const FO=({featureFlagClientClass:e})=>({name:"Unleash",setupOnce(){const t=e.prototype;Ce(t,"isEnabled",_N)},processEvent(t,n,r){return kr(t)}});function _N(e){return function(...t){const n=t[0],r=e.apply(this,t);return typeof n=="string"&&typeof r=="boolean"?(An(n,r),Mn(n,r)):T&&g.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}const $O=(({growthbookClass:e})=>xE({growthbookClass:e})),BO=({featureFlagClient:e})=>({name:"Statsig",setup(t){e.on("gate_evaluation",n=>{An(n.gate.name,n.gate.value),Mn(n.gate.name,n.gate.value)})},processEvent(t,n,r){return kr(t)}});async function UO(){const e=R();if(!e)return"no-client-active";if(!e.getDsn())return"no-dsn-configured";const r=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 hy(()=>fetch(r,{body:"{}",method:"POST",mode:"cors",credentials:"omit"}))}catch{return"sentry-unreachable"}}const yN="WebWorker",HO=({worker:e})=>({name:yN,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(t=>pf(t))},addWorker:t=>pf(t)});function pf(e){e.addEventListener("message",t=>{if(bN(t.data)){if(t.stopImmediatePropagation(),t.data._sentryDebugIds&&(T&&g.log("Sentry debugId web worker message received",t.data),P._sentryDebugIds={...t.data._sentryDebugIds,...P._sentryDebugIds}),t.data._sentryModuleMetadata&&(T&&g.log("Sentry module metadata web worker message received",t.data),P._sentryModuleMetadata={...t.data._sentryModuleMetadata,...P._sentryModuleMetadata}),t.data._sentryWasmImages){T&&g.log("Sentry WASM images web worker message received",t.data);const n=P._sentryWasmImages||[],r=t.data._sentryWasmImages.filter(o=>Pe(o)&&typeof o.code_file=="string"&&!n.some(s=>s.code_file===o.code_file));P._sentryWasmImages=[...n,...r]}t.data._sentryWorkerError&&(T&&g.log("Sentry worker rejection message received",t.data._sentryWorkerError),SN(t.data._sentryWorkerError))}})}function SN(e){const t=R();if(!t)return;const n=t.getOptions().stackParser,r=t.getOptions().attachStacktrace,o=e.reason,s=gt(o)?lm(o):vi(n,o,void 0,r,!0);s.level="error",e.filename&&(s.contexts={...s.contexts,worker:{filename:e.filename}}),So(s,{originalException:o,mechanism:{handled:!1,type:"auto.browser.web_worker.onunhandledrejection"}}),T&&g.log("Captured worker unhandled rejection",o)}function WO({self:e}){e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0}),e.addEventListener("unhandledrejection",t=>{const r={reason:um(t),filename:e.location?.href};e.postMessage({_sentryMessage:!0,_sentryWorkerError:r}),T&&g.log("[Sentry Worker] Forwarding unhandled rejection to parent",r)}),T&&g.log("[Sentry Worker] Registered worker with unhandled rejection handling")}function bN(e){if(!Pe(e)||e._sentryMessage!==!0)return!1;const t="_sentryDebugIds"in e,n="_sentryModuleMetadata"in e,r="_sentryWorkerError"in e,o="_sentryWasmImages"in e;return!(!t&&!n&&!r&&!o||t&&!(Pe(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(Pe(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!Pe(e._sentryWorkerError)||o&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(s=>Pe(s)&&typeof s.code_file=="string")))}export{W0 as BrowserClient,Zi as MULTIPLEXED_TRANSPORT_EXTRA_KEY,DO as OpenFeatureIntegrationHook,Vt as SDK_VERSION,ge as SEMANTIC_ATTRIBUTE_SENTRY_OP,oe as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,pc as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,We as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,St as Scope,P as WINDOW,Pt as addBreadcrumb,lS as addEventProcessor,rl as addIntegration,kN as bindScopeToEmitter,Kk as breadcrumbsIntegration,aR as browserApiErrorsIntegration,xO as browserProfilingIntegration,pR as browserSessionIntegration,kO as browserTracingIntegration,LO as buildLaunchDarklyFlagUsedHandler,UN as captureConsoleIntegration,So as captureEvent,bt as captureException,WE as captureFeedback,iS as captureMessage,Vi as captureSession,Lk as chromeStackLineParser,DN as close,YN as consoleLoggingIntegration,SO as contextLinesIntegration,wN as continueTrace,KN as createConsolaReporter,bh as createLangChainCallbackHandler,US as createTransport,fO as createUserFeedbackEnvelope,gR as cultureContextIntegration,Wb as dedupeIntegration,fg as defaultRequestInstrumentationOptions,zk as defaultStackLineParsers,Gk as defaultStackParser,UO as diagnoseSdkConnectivity,iO as elementTimingIntegration,yp as endSession,Tb as eventFiltersIntegration,F0 as eventFromException,$0 as eventFromMessage,Gc as exceptionFromError,HN as extraErrorDataIntegration,GN as featureFlagsIntegration,oO as feedbackAsyncIntegration,sO as feedbackIntegration,sO as feedbackSyncIntegration,Sx as fetchStreamPerformanceIntegration,PN as flush,hO as forceLoad,bb as functionToStringIntegration,$k as geckoStackLineParser,aO as getAbsoluteUrl,Ee as getActiveSpan,R as getClient,q as getCurrentScope,PR as getDefaultIntegrations,rO as getFeedback,Wr as getGlobalScope,me as getIsolationScope,IO as getReplay,be as getRootSpan,ns as getSpanDescendants,R_ as getSpanStatusFromHttpCode,Wp as getTraceData,SR as globalHandlersIntegration,bO as graphqlClientIntegration,$O as growthbookIntegration,yO as httpClientIntegration,IR as httpContextIntegration,Ib as inboundFiltersIntegration,pO as init,QN as instrumentAnthropicAiClient,tO as instrumentCreateReactAgent,ZN as instrumentGoogleGenAIClient,eO as instrumentLangChainEmbeddings,nO as instrumentLangGraph,XN as instrumentOpenAiClient,dx as instrumentOutgoingRequests,XT as instrumentStateGraph,fE as instrumentSupabaseClient,Mx as isBotUserAgent,uS as isEnabled,FN as isInitialized,cS as lastEventId,OO as launchDarklyIntegration,A0 as lazyLoadIntegration,AR as linkedErrorsIntegration,VN as logger,MO as makeBrowserOfflineTransport,am as makeFetchTransport,$N as makeMultiplexedTransport,JN as metrics,BN as moduleMetadataIntegration,xR as normalizeStringifyValue,mO as onLoad,PO as openFeatureIntegration,lO as opera10StackLineParser,dO as opera11StackLineParser,db as parameterize,V_ as registerSpanErrorInstrumentation,WO as registerWebWorker,wO as replayCanvasIntegration,TO as replayIntegration,RO as reportPageLoaded,_O as reportingObserverIntegration,WN as rewriteFramesIntegration,NI as sendFeedback,CO as setActiveSpanInBrowser,NN as setAttribute,xN as setAttributes,aS as setContext,LN as setConversationId,tb as setCurrentClient,CN as setExtra,RN as setExtras,bs as setHttpStatus,ap as setMeasurement,MN as setTag,AN as setTags,ON as setUser,gO as showReportDialog,AO as spanStreamingIntegration,TN as spanToBaggageHeader,J as spanToJSON,q_ as spanToTraceHeader,NO as spotlightBrowserIntegration,Ox as startBrowserTracingNavigationSpan,Nx as startBrowserTracingPageLoadSpan,cn as startInactiveSpan,my as startNewTrace,el as startSession,Bt as startSpan,zt as startSpanManual,BO as statsigIntegration,jN as supabaseIntegration,hy as suppressTracing,zN as thirdPartyErrorFilterIntegration,cO as uiProfiler,FO as unleashIntegration,vN as updateSpanName,EO as viewHierarchyIntegration,bx as webVitalsIntegration,HO as webWorkerIntegration,uO as winjsStackLineParser,si as withActiveSpan,EN as withIsolationScope,Xe as withScope,IN as withStreamedSpan,qN as zodErrorsIntegration};