iobroker.telegram 6.5.0 → 6.6.1
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.
- package/README.md +7 -8
- package/admin/custom/assets/Components-BxQBXyi8.js +1 -0
- package/admin/custom/assets/TelegramComponent-kUuYxq_e.js +1 -0
- package/admin/custom/assets/_virtual_mf-localSharedImportMap___mfe_internal__ConfigCustomTelegramSet__mf_owner__1-BLXbEN9Y.js +1 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomTelegramSet__mf_owner__250812422112340__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-Dsb6nMjt.js +1 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomTelegramSet__mf_owner__250812422112340__loadShare___mf_0_emotion_mf_1_styled__loadShare__.js-CIrCYe33.js +1 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomTelegramSet__mf_owner__250812422112340__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-BwJM2Nka.js +1525 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomTelegramSet__mf_owner__250812422112340__loadShare__shared-B8JhHwvg.js +2 -0
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomTelegramSet__mf_owner__250812422112340__prebuild___mf_0_iobroker_mf_1_json_mf_2_config__prebuild__-CNFjPAhY.js +122 -0
- package/admin/custom/assets/{_virtual_mf___mfe_internal__ConfigCustomTelegramSet__mf_owner__228362784883620__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__-M61rjtmp.js → _virtual_mf___mfe_internal__ConfigCustomTelegramSet__mf_owner__250812422112340__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__-BWTOCVCn.js} +1 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomTelegramSet__mf_owner__250812422112340__prebuild__react_mf_2_dom_mf_1_client__prebuild__-Eu5n_vNV.js +9 -0
- package/admin/custom/assets/{dist-ClWhWsnT.js → dist-itgOCD0a.js} +1 -1
- package/admin/custom/assets/helpers-CRGg5hBG.js +1 -0
- package/admin/custom/assets/hostInit-DL9jkVLC.js +1 -0
- package/admin/custom/assets/{index-DASuFkWw.js → index-BDbXGntR.js} +1 -1
- package/admin/custom/assets/lib-Dot6K-9A.js +3 -0
- package/admin/custom/assets/{mf-entry-bootstrap-0-153fe003.js → mf-entry-bootstrap-0-1e2ac2d0.js} +3 -3
- package/admin/custom/assets/pendingShares-BMi7HIpR.js +2 -0
- package/admin/custom/assets/prod-O8z2QZqI.js +502 -0
- package/admin/custom/assets/rolldown-runtime-9C0vUP4u.js +1 -0
- package/admin/custom/assets/utils-BX87WXyF.js +4 -0
- package/admin/custom/assets/vite-preload-helper-nldAWQd6.js +1 -0
- package/admin/custom/customComponents.js +2 -2
- package/admin/i18n/de.json +1 -1
- package/admin/i18n/en.json +1 -1
- package/admin/i18n/es.json +1 -1
- package/admin/i18n/fr.json +1 -1
- package/admin/i18n/it.json +1 -1
- package/admin/i18n/nl.json +1 -1
- package/admin/i18n/pl.json +1 -1
- package/admin/i18n/pt.json +1 -1
- package/admin/i18n/ru.json +1 -1
- package/admin/i18n/uk.json +1 -1
- package/admin/i18n/zh-cn.json +1 -1
- package/admin/jsonConfig.json +1 -1
- package/admin/rules/@mf-types.zip +0 -0
- package/admin/rules/assets/{ActionTelegram-DYcZv36t.js → ActionTelegram-CDyhq_aB.js} +1 -1
- package/admin/rules/assets/_virtual_mf-localSharedImportMap___mfe_internal__ActionTelegram__mf_owner__1-DCXMQDP3.js +1 -0
- package/admin/rules/assets/_virtual_mf___mfe_internal__ActionTelegram__mf_owner__261476461279401__loadShare__shared-BcIcXFUS.js +2 -0
- package/admin/rules/assets/_virtual_mf___mfe_internal__ActionTelegram__mf_owner__261476461279401__prebuild___mf_0_iobroker_mf_1_gui_mf_2_components__prebuild__-Dx4VBqsJ.js +1497 -0
- package/admin/rules/assets/{_virtual_mf___mfe_internal__ActionTelegram__mf_owner__34670834521048__prebuild__prop_mf_2_types__prebuild__-B1D0xwSZ.js → _virtual_mf___mfe_internal__ActionTelegram__mf_owner__261476461279401__prebuild__prop_mf_2_types__prebuild__-2kioMbvq.js} +1 -1
- package/admin/rules/assets/{_virtual_mf___mfe_internal__ActionTelegram__mf_owner__34670834521048__prebuild__react__prebuild__-CCVlBWKm.js → _virtual_mf___mfe_internal__ActionTelegram__mf_owner__261476461279401__prebuild__react__prebuild__-B-SIhDba.js} +1 -1
- package/admin/rules/assets/{_virtual_mf___mfe_internal__ActionTelegram__mf_owner__34670834521048__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__-lLn5ruiO.js → _virtual_mf___mfe_internal__ActionTelegram__mf_owner__261476461279401__prebuild__react_mf_1_jsx_mf_2_runtime__prebuild__-CfH_gZot.js} +1 -1
- package/admin/rules/assets/{_virtual_mf___mfe_internal__ActionTelegram__mf_owner__34670834521048__prebuild__react_mf_2_dom__prebuild__-h_a0kZzS.js → _virtual_mf___mfe_internal__ActionTelegram__mf_owner__261476461279401__prebuild__react_mf_2_dom__prebuild__-DD0MU7dk.js} +1 -1
- package/admin/rules/assets/_virtual_mf___mfe_internal__ActionTelegram__mf_owner__261476461279401__prebuild__react_mf_2_dom_mf_1_client__prebuild__-BX4lpaox.js +9 -0
- package/admin/rules/assets/bootstrap-zxyBJHv-.js +1 -0
- package/admin/rules/assets/defineProperty-D36W847_.js +1 -0
- package/admin/rules/assets/{dist-CWBlVvfj.js → dist-BLCoKonB.js} +1 -1
- package/admin/rules/assets/helpers-0sLOC81v.js +1 -0
- package/admin/rules/assets/hostInit-CJ2rOvyx.js +1 -0
- package/admin/rules/assets/{index-ClFbFt3x.js → index-DZAxSKQe.js} +2 -2
- package/admin/rules/assets/{mf-entry-bootstrap-0-6b56715e.js → mf-entry-bootstrap-0-0822313d.js} +3 -3
- package/admin/rules/assets/pendingShares-BABc9N4u.js +2 -0
- package/admin/rules/assets/prod-COGwLD5C.js +502 -0
- package/admin/rules/assets/{react-BZk3575t.js → react-DFmRXFOZ.js} +1 -1
- package/admin/rules/assets/{react-dom-1nogLxXJ.js → react-dom-DW4Kp2Eg.js} +1 -1
- package/admin/rules/assets/rolldown-runtime-BLXQ4ufn.js +1 -0
- package/admin/rules/assets/utils-B0R_RCuD.js +4 -0
- package/admin/rules/assets/vite-preload-helper-nldAWQd6.js +1 -0
- package/admin/rules/customRuleBlocks.js +2 -2
- package/admin/rules/index.html +3 -3
- package/admin/rules/mf-manifest.json +1 -1
- package/admin/rules/mf-stats.json +1 -1
- package/build/help.d.ts +1 -1
- package/build/help.js +6 -4
- package/build/help.js.map +1 -1
- package/build/main.js +22 -8
- package/build/main.js.map +1 -1
- package/build/types.d.ts +1 -1
- package/io-package.json +27 -27
- package/package.json +9 -9
- package/admin/custom/assets/Components-joLukTKa.js +0 -1
- package/admin/custom/assets/TelegramComponent-C3-GtI7c.js +0 -1
- package/admin/custom/assets/_virtual_mf-localSharedImportMap___mfe_internal__ConfigCustomTelegramSet__mf_owner__1-DJIdwwyD.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomTelegramSet__mf_owner__228362784883620__loadShare___mf_0_emotion_mf_1_react__loadShare__.js-BqNtIUwy.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomTelegramSet__mf_owner__228362784883620__loadShare___mf_0_emotion_mf_1_styled__loadShare__.js-_NCgGj0v.js +0 -1
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomTelegramSet__mf_owner__228362784883620__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-xkznT_KX.js +0 -1386
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomTelegramSet__mf_owner__228362784883620__loadShare__shared-AcdRJ9g1.js +0 -2
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomTelegramSet__mf_owner__228362784883620__prebuild___mf_0_iobroker_mf_1_json_mf_2_config__prebuild__-CzaA27i4.js +0 -122
- package/admin/custom/assets/_virtual_mf___mfe_internal__ConfigCustomTelegramSet__mf_owner__228362784883620__prebuild__react_mf_2_dom_mf_1_client__prebuild__-OUz4TPLO.js +0 -9
- package/admin/custom/assets/helpers-DYkm0lQU.js +0 -1
- package/admin/custom/assets/hostInit-CR7X3BVU.js +0 -1
- package/admin/custom/assets/lib-Bo8s9r0H.js +0 -3
- package/admin/custom/assets/pendingShares-BLi3_Mzu.js +0 -2
- package/admin/custom/assets/prod-B1LT4e-j.js +0 -502
- package/admin/custom/assets/rolldown-runtime-COiEfhsA.js +0 -1
- package/admin/custom/assets/utils-BLvN1RVq.js +0 -4
- package/admin/custom/assets/vite-preload-helper-BbbETgeG.js +0 -1
- package/admin/rules/assets/_virtual_mf-localSharedImportMap___mfe_internal__ActionTelegram__mf_owner__1-BsHXqCvo.js +0 -1
- package/admin/rules/assets/_virtual_mf___mfe_internal__ActionTelegram__mf_owner__34670834521048__loadShare__shared-BIBHA1kT.js +0 -2
- package/admin/rules/assets/_virtual_mf___mfe_internal__ActionTelegram__mf_owner__34670834521048__prebuild___mf_0_iobroker_mf_1_gui_mf_2_components__prebuild__-DpkR8IYJ.js +0 -1358
- package/admin/rules/assets/_virtual_mf___mfe_internal__ActionTelegram__mf_owner__34670834521048__prebuild__react_mf_2_dom_mf_1_client__prebuild__-BRmB6rdf.js +0 -9
- package/admin/rules/assets/bootstrap-770dTuCT.js +0 -1
- package/admin/rules/assets/defineProperty-BbfpZ9Tg.js +0 -1
- package/admin/rules/assets/helpers-BtFDi3IY.js +0 -1
- package/admin/rules/assets/hostInit-DHMkrH3X.js +0 -1
- package/admin/rules/assets/pendingShares-qfYu7oWw.js +0 -2
- package/admin/rules/assets/prod-CbyVAouU.js +0 -502
- package/admin/rules/assets/rolldown-runtime-XKyaHtl9.js +0 -1
- package/admin/rules/assets/utils-BQKOadwq.js +0 -4
- package/admin/rules/assets/vite-preload-helper-BbbETgeG.js +0 -1
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
import{n as e}from"./rolldown-runtime-9C0vUP4u.js";import{mr as t}from"./_virtual_mf___mfe_internal__ConfigCustomTelegramSet__mf_owner__250812422112340__loadShare___mf_0_iobroker_mf_1_gui_mf_2_components__loadShare__.js-BwJM2Nka.js";var n=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,r=globalThis,i=`11.10.0`;function a(){return o(r),r}function o(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`11.10.0`,t[i]=t[`11.10.0`]||{}}function s(e,t,n=r){let a=n.__SENTRY__=n.__SENTRY__||{},o=a[i]=a[`11.10.0`]||{};return o[e]||(o[e]=t())}var c=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],l=`Sentry Logger `,u={};function d(e){if(!(`console`in r))return e();let t=r.console,n={},i=Object.keys(u);i.forEach(e=>{let r=u[e];n[e]=t[e],t[e]=r});try{return e()}finally{i.forEach(e=>{t[e]=n[e]})}}function f(){y().enabled=!0}function p(){y().enabled=!1}function m(){return y().enabled}function h(...e){v(`log`,...e)}function g(...e){v(`warn`,...e)}function _(...e){v(`error`,...e)}function v(e,...t){n&&m()&&d(()=>{r.console[e](`${l}[${e}]:`,...t)})}function y(){return n?s(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var b={enable:f,disable:p,isEnabled:m,log:h,warn:g,error:_},x=50,S=/\(error: (.*)\)/,C=/captureMessage|captureException/;function w(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
|
|
2
|
+
`);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=S.test(n)?n.replace(S,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=x+r)break}}return E(i.slice(r))}}function T(e){return Array.isArray(e)?w(...e):e}function E(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(ee(t).function||``)&&t.pop(),t.reverse(),C.test(ee(t).function||``)&&(t.pop(),C.test(ee(t).function||``)&&t.pop()),t.slice(0,x).map(e=>({...e,filename:e.filename||ee(t).filename,function:e.function||`?`}))}function ee(e){return e[e.length-1]||{}}var te=`<anonymous>`;function D(e){try{return!e||typeof e!=`function`?te:e.name||te}catch{return te}}function ne(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}function re(e){let t=e!=null&&e.startsWith(`file://`)?e.slice(7):e;return t!=null&&t.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var ie={},ae={};function O(e,t){return ie[e]=ie[e]||[],ie[e].push(t),()=>{let n=ie[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function oe(e,t){if(!ae[e]){ae[e]=!0;try{t()}catch(t){n&&b.error(`Error while instrumenting ${e}`,t)}}}function se(e,t){let r=e&&ie[e];if(r)for(let i of r)try{i(t)}catch(t){n&&b.error(`Error while triggering instrumentation handler.
|
|
3
|
+
Type: ${e}
|
|
4
|
+
Name: ${D(i)}
|
|
5
|
+
Error:`,t)}}var ce=null;function le(e){let t=`error`;O(t,e),oe(t,ue)}function ue(){ce=r.onerror,r.onerror=function(e,t,n,r,i){return se(`error`,{column:r,error:i,line:n,msg:e,url:t}),ce?ce.apply(this,arguments):!1},r.onerror.__SENTRY_INSTRUMENTED__=!0}var de=null;function fe(e){let t=`unhandledrejection`;O(t,e),oe(t,pe)}function pe(){de=r.onunhandledrejection,r.onunhandledrejection=function(e){return se(`unhandledrejection`,e),!de||de.apply(this,arguments)},r.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var me=Object.prototype.toString;function k(e){switch(me.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return De(e,Error)}}function he(e,t){return me.call(e)===`[object ${t}]`}function ge(e){return he(e,`ErrorEvent`)}function _e(e){return he(e,`DOMError`)}function ve(e){return he(e,`DOMException`)}function ye(e){return he(e,`String`)}function be(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function xe(e){return e===null||be(e)||typeof e!=`object`&&typeof e!=`function`}function Se(e){return he(e,`Object`)}function Ce(e){return typeof e==`object`&&!!e}function we(e){return typeof Event<`u`&&De(e,Event)}function Te(e){return he(e,`RegExp`)}function Ee(e){return!!(e!=null&&e.then&&typeof e.then==`function`)}function De(e,t){try{return e instanceof t}catch{return!1}}function Oe(e){return typeof Request<`u`&&De(e,Request)}function ke(e,t,r){if(!(t in e))return;let i=e[t];if(typeof i!=`function`)return;let a=r(i);typeof a==`function`&&je(a,i);try{e[t]=a}catch{n&&b.log(`Failed to replace method "${t}" in object`,e)}}function Ae(e,t,r){try{Object.defineProperty(e,t,{value:r,writable:!0,configurable:!0})}catch{n&&b.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function je(e,t){try{e.prototype=t.prototype=t.prototype||{},Ae(e,`__sentry_original__`,t)}catch{}}function Me(e){return e.__sentry_original__}function Ne(e){if(k(e))return{message:e.message,name:e.name,stack:e.stack,...Pe(e)};if(we(e)){let{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...Pe(e)}}return e}function Pe(e){return Ce(e)?Object.fromEntries(Object.entries(e)):{}}function Fe(e){let t=Object.keys(Ne(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var Ie;function Le(e){if(Ie!==void 0)return Ie?Ie(e):e();let t=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),n=r;return t in n&&typeof n[t]==`function`?(Ie=n[t],Ie(e)):(Ie=null,e())}function Re(){return Le(()=>Math.random())}function ze(){return Le(()=>Date.now())}var Be=Symbol.for(`sentry.skipNormalization`),Ve=Symbol.for(`sentry.overrideNormalizationDepth`);function He(e){Ae(e,Be,!0)}function Ue(e){return!!e[Be]}function We(e){let t=e[Ve];return typeof t==`number`?t:void 0}var Ge;function Ke(e){Ge=e}function qe(e,t=100,n=1/0){try{return Ye(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Je(e,t=3,n=102400){let r=qe(e,t);return $e(r)>n?Je(e,t-1,n):r}function Ye(e,t,n=1/0,r=1/0,i=et()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=Xe(e,t);if(!s.startsWith(`[object `))return s;if(Ue(t))return t;let c=We(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return Ye(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=Ne(t);for(let e in p)if(Object.prototype.hasOwnProperty.call(p,e)){if(f>=r){d[e]=`[MaxProperties ~]`;break}d[e]=Ye(e,p[e],l-1,r,i),f++}return o(t),d}function Xe(e,t){try{if(Ge){let e=Ge(t);if(e)return e}return typeof global<`u`&&t===global?`[Global]`:typeof t==`number`&&!Number.isFinite(t)?`[${t}]`:typeof t==`function`?`[Function: ${D(t)}]`:typeof t==`symbol`?`[${String(t)}]`:typeof t==`bigint`?`[BigInt: ${String(t)}]`:`[object ${Ze(t)}]`}catch(e){return`**non-serializable** (${e})`}}function Ze(e){let t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:`null prototype`}function Qe(e){return~-encodeURI(e).split(/%..|./).length}function $e(e){return Qe(JSON.stringify(e))}function et(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function tt(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function nt(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let a=Math.min(i+140,r);return a>r-5&&(a=r),a===r&&(i=Math.max(a-140,0)),n=n.slice(i,a),i>0&&(n=`'{snip} ${n}`),a<r&&(n+=` {snip}`),n}function rt(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];xe(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push(Xe(void 0,r))}return n.join(t)}function it(e,t,n=!1){return ye(e)?Te(t)?t.test(e):ye(t)?n?e===t:e.includes(t):typeof t==`function`&&t(e):!1}function at(e,t=[],n=!1){for(let r of t)if(it(e,r,n))return!0;return!1}function ot(){let e=r;return e.crypto||e.msCrypto}var st;function ct(){return Re()*16}function lt(e=ot()){try{if(e!=null&&e.randomUUID)return Le(()=>e.randomUUID()).replace(/-/g,``)}catch{}return st||=`10000000100040008000100000000000`,st.replace(/[018]/g,e=>(e^(ct()&15)>>e/4).toString(16))}function ut(e){var t;return(t=e.exception)==null||(t=t.values)==null?void 0:t[0]}function dt(e){let{message:t,event_id:n}=e;if(t)return t;let r=ut(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function ft(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function pt(e,t){let n=ut(e);n&&ht(n,t)}function mt(e,t){var n;let r=(n=e.exception)==null?void 0:n.values,i=(r==null?void 0:r.find(e=>{var t;return((t=e.mechanism)==null?void 0:t.exception_id)===0}))??(r==null?void 0:r[0]);i&&ht(i,t)}function ht(e,t){let n={type:`generic`,handled:!0},r=e.mechanism;e.mechanism={...n,...r,...t},t&&`data`in t&&(e.mechanism.data={...r==null?void 0:r.data,...t.data})}function gt(e,t,n=5){if(t.lineno===void 0)return;let r=e.length,i=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,i-n),i).map(e=>nt(e,0)),t.context_line=nt(e[Math.min(r-1,i)],t.colno||0),t.post_context=e.slice(Math.min(i+1,r),i+1+n).map(e=>nt(e,0))}function _t(e){if(vt(e))return!0;try{Ae(e,`__sentry_captured__`,!0)}catch{}return!1}function vt(e){try{return e.__sentry_captured__}catch{}}var yt=1e3,bt=1e3,xt=100;function St(){return ze()/yt}var Ct=[];function wt(){let{performance:e}=r;if(!(e!=null&&e.now)||!e.timeOrigin)return e!=null&&e.now&&(Ct=[{from:0,origin:ze()-Le(()=>e.now())}]),St;let t=e.timeOrigin;Ct=[{from:0,origin:t}];let n=!0,i=0;return()=>Le(()=>{let r=e.now(),a=Date.now();return Math.abs(t+r-a)>bt&&(t=a-r,n?Ct=[{from:0,origin:t}]:(Ct.push({from:i,origin:t}),Ct.length>xt&&Ct.splice(1,1))),n=!1,i=r,(t+r)/yt})}function Tt(){let{performance:e}=r;return e!=null&&e.now?Le(()=>e.now()):void 0}var Et,Dt=!1;function Ot(e,t=e){let n=At(t);return n==null?void 0:(n+e)/yt}function kt(){return(Et??=wt())()}function At(e=0){Dt||(Dt=!0,Promise.resolve().then(()=>{Dt=!1}),kt());let t;for(let n of Ct){if(t&&n.from>e)break;t=n}return t==null?void 0:t.origin}function jt(e){let t=kt(),n={sid:lt(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>Pt(n)};return e&&Mt(n,e),n}function Mt(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||kt(),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:lt()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Nt(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),Mt(e,n)}function Pt(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 Ft(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Ft(r[e],t[e],n-1));return r}function It(){return lt()}function Lt(){return lt().substring(16)}var Rt=100,zt=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},Ae(this,`refs`,{}),this._propagationContext={traceId:It(),sampleRand:Re()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,t.refs={...this.refs},t}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Mt(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(e){return this._conversationId=e||void 0,this._notifyScopeListeners(),this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}removeAttribute(e){return e in this._attributes&&(delete this._attributes[e],this._notifyScopeListeners()),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof e?n.getScopeData():Se(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:Rt;if(n<=0)return this;let r={timestamp:St(),...e,message:e.message?tt(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n)),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Ft(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let r=(t==null?void 0:t.event_id)||lt();if(!this._client)return n&&b.warn(`No client configured on scope - will not capture exception!`),r;let i=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:i,...t,event_id:r},this),r}captureMessage(e,t,r){let i=(r==null?void 0:r.event_id)||lt();if(!this._client)return n&&b.warn(`No client configured on scope - will not capture message!`),i;let a=(r==null?void 0:r.syntheticException)??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:a,...r,event_id:i},this),i}captureEvent(e,t){let r=e.event_id||(t==null?void 0:t.event_id)||lt();return this._client?(this._client.captureEvent(e,{...t,event_id:r},this),r):(n&&b.warn(`No client configured on scope - will not capture event!`),r)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function Bt(){return s(`defaultCurrentScope`,()=>new zt)}function Vt(){return s(`defaultIsolationScope`,()=>new zt)}var Ht=`__SENTRY_SUPPRESS_TRACING__`,Ut=e=>e instanceof Promise&&!e[Wt],Wt=Symbol(`chained PromiseLike`),Gt=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return Ut(r)&&Ut(e)?r:Kt(e,r)},Kt=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Wt]:!0}),t},qt=class{constructor(e,t){let n;n=e||new zt;let r;r=t||new zt,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return Ee(n)?Gt(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Jt(){let e=o(a());return e.stack=e.stack||new qt(Bt(),Vt())}function Yt(e){return Jt().withScope(e)}function Xt(e,t){let n=Jt();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Zt(e){return Jt().withScope(()=>e(Jt().getIsolationScope()))}function Qt(){return{suppressTracing:$t,withIsolationScope:Zt,withScope:Yt,withSetScope:Xt,withSetIsolationScope:(e,t)=>Zt(t),getCurrentScope:()=>Jt().getScope(),getIsolationScope:()=>Jt().getIsolationScope()}}function $t(e){return Yt(t=>{t.setSDKProcessingMetadata({[Ht]:!0});let n=e();return t.setSDKProcessingMetadata({[Ht]:void 0}),n})}function en(e){let t=o(e);return t.acs?t.acs:Qt()}function tn(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function nn(e,t){let{value:n,unit:r}=tn(e)?e:{value:e,unit:void 0},i=sn(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function rn(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=nn(i,t);e&&(n[r]=e)}return n}function an(e){if(!e)return 0;let t=0;for(let[r,i]of Object.entries(e)){var n;t+=r.length*2,t+=i.type.length*2,t+=(((n=i.unit)==null?void 0:n.length)??0)*2;let e=i.value;Array.isArray(e)?t+=on(e[0])*e.length:xe(e)?t+=on(e):t+=100}return t}function on(e){return typeof e==`string`?e.length*2:typeof e==`boolean`?4:typeof e==`number`?8:0}function sn(e){if(Array.isArray(e))return{value:e,type:`array`};let t=typeof e==`string`?`string`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?Number.isInteger(e)?`integer`:`double`:null;if(t)return{value:e,type:t}}function cn(){var e,t;return(e=(t=o(a())).externalPropagationContextProvider)==null?void 0:e.call(t)}function ln(){return o(a()).externalPropagationContextProvider!==void 0}function A(){return en(a()).getCurrentScope()}function j(){return en(a()).getIsolationScope()}function un(){return s(`globalScope`,()=>new zt)}function dn(...e){let t=en(a());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function fn(...e){let t=en(a());if(e.length===2){let[n,r]=e;return n?t.withSetIsolationScope(n,r):t.withIsolationScope(r)}return t.withIsolationScope(e[0])}function M(){return A().getClient()}function pn(e){let t=cn();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||Lt()};return r&&(a.parent_span_id=r),a}var mn=`browser.bfcache.frame`,hn=`browser.bfcache.not_restored_reason_count`,gn=`browser.bfcache.outcome`,_n=`browser.bfcache.reason`,vn=`browser.navigation.id`,yn=`browser.navigation.type`,bn=`browser.paint.type`,xn=`browser.web_vital.inp.target`,Sn=`code.file.path`,Cn=`code.function.name`,wn=`db.operation.name`,Tn=`db.system.name`,En=`gen_ai.conversation.id`,Dn=`graphql.document`,On=`graphql.operation.name`,kn=`graphql.operation.type`,An=`http.request.method`,jn=`http.request.same_origin`,Mn=`http.response.body.size`,Nn=`http.response.size`,Pn=`http.response.status_code`,Fn=`http.route`,In=`network.connection.effective_type`,Ln=`network.connection.rtt`,Rn=`network.connection.type`,zn=`router.navigation.route.id`,Bn=`sentry.environment`,Vn=`sentry.exclusive_time`,Hn=`sentry.idle_span_finish_reason`,Un=`sentry.is_localhost`,Wn=`sentry.link.type`,Gn=`sentry.op`,N=`sentry.origin`,Kn=`sentry.profile_id`,qn=`sentry.release`,Jn=`sentry.replay_id`,Yn=`sentry.sdk.integrations`,Xn=`sentry.sdk.name`,Zn=`sentry.sdk.version`,Qn=`sentry.segment.id`,$n=`sentry.segment.name`,er=`sentry.segment.name.source`,tr=`sentry.trace_lifecycle`,nr=`sentry.transaction`,rr=`server.address`,ir=`server.port`,ar=`ui.component_name`,or=`url.domain`,sr=`url.fragment`,cr=`url.full`,lr=`url.path`,ur=`url.query`,dr=`url.scheme`,fr=`url.template`,pr=`user_agent.original`,mr=`user.email`,hr=`user.id`,gr=`user.ip_address`,_r=`user.name`,vr=`sentry.sample_rate`,yr=`sentry.previous_trace_sample_rate`,br=`sentry.op`,xr=`sentry.origin`,Sr=`sentry.measurement_unit`,Cr=`sentry.measurement_value`,wr=`sentry.custom_span_name`,Tr=[`ok`,`deadline_exceeded`,`unauthenticated`,`permission_denied`,`not_found`,`resource_exhausted`,`invalid_argument`,`unimplemented`,`unavailable`,`internal_error`,`unknown_error`,`cancelled`,`already_exists`,`failed_precondition`,`aborted`,`out_of_range`,`data_loss`];function Er(e){return e!==`ok`&&Tr.includes(e)}function Dr(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:`unauthenticated`};case 403:return{code:2,message:`permission_denied`};case 404:return{code:2,message:`not_found`};case 409:return{code:2,message:`already_exists`};case 413:return{code:2,message:`failed_precondition`};case 429:return{code:2,message:`resource_exhausted`};case 499:return{code:2,message:`cancelled`};default:return{code:2,message:`invalid_argument`}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:`unimplemented`};case 503:return{code:2,message:`unavailable`};case 504:return{code:2,message:`deadline_exceeded`};default:return{code:2,message:`internal_error`}}return{code:2,message:`internal_error`}}function Or(e,t){e.setAttribute(`http.response.status_code`,t);let n=Dr(t);n.message!==`unknown_error`&&e.setStatus(n)}function kr(e){try{let t=r.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function Ar(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var jr=`_sentryScope`,Mr=`_sentryIsolationScope`,Nr=Symbol.for(`sentry.tracerProviderSpan`);function Pr(e,t,n){e&&(Ae(e,Mr,kr(n)),Ae(e,jr,t))}function Fr(e){let t=e;return{scope:t[jr],isolationScope:Ar(t[Mr])}}function Ir(e){return e[Nr]===!0}var Lr=`sentry-`;function Rr(e){let t=Br(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function zr(e){if(e)return Hr(Object.entries(e).reduce((e,[t,n])=>(n&&(e[`${Lr}${t}`]=n),e),{}))}function Br(e){if(e&&(ye(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=Vr(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Vr(e)}function Vr(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}function Hr(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((e,[t,r],i)=>{let a=`${encodeURIComponent(t)}=${encodeURIComponent(r)}`,o=i===0?a:`${e},${a}`;return o.length>8192?(n&&b.warn(`Not adding key: ${t} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):o},``)}var Ur=/^o(\d+)\./,Wr=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Gr(e){return e===`http`||e===`https`}function Kr(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function qr(e){let t=Wr.exec(e);if(!t){d(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return Jr({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function Jr(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function Yr(e){if(!n)return!0;let{port:t,projectId:r,protocol:i}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>!e[t]&&(b.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:r.match(/^\d+$/)?Gr(i)?t&&isNaN(parseInt(t,10))?(b.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(b.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(b.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function Xr(e){let t=e.match(Ur);return t==null?void 0:t[1]}function Zr(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=Xr(n)),r}function Qr(e){let t=typeof e==`string`?qr(e):Jr(e);if(t&&Yr(t))return t}function $r(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var ei=RegExp(`^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$`);function ti(e){if(!e)return;let t=e.match(ei);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 ni(e,t){let n=ti(e),r=Rr(t);if(!(n!=null&&n.traceId))return{traceId:It(),sampleRand:Re()};let i=ai(n,r);r&&(r.sample_rand=i.toString());let{traceId:a,parentSpanId:o,parentSampled:s}=n;return{traceId:a,parentSpanId:o,sampled:s,dsc:r||{},sampleRand:i}}function ri(e=It(),t=Lt(),n){let r=``;return n!==void 0&&(r=n?`-1`:`-0`),`${e}-${t}${r}`}function ii(e=It(),t=Lt(),n){return`00-${e}-${t}-${n?`01`:`00`}`}function ai(e,t){let n=$r(t==null?void 0:t.sample_rand);if(n!==void 0)return n;let r=$r(t==null?void 0:t.sample_rate);return r&&(e==null?void 0:e.parentSampled)!==void 0?e.parentSampled?Re()*r:r+Re()*(1-r):Re()}function oi(e,t){let n=Zr(e);return t&&n&&t!==n?(b.log(`Won't continue trace because org IDs don't match (incoming baggage: ${t}, SDK options: ${n})`),!1):e.getOptions().strictTraceContinuation&&(t&&!n||!t&&n)?(b.log(`Starting a new trace because strict trace continuation is enabled but one org ID is missing (incoming baggage: ${t}, Sentry client: ${n})`),!1):!0}var si=`span`;function ci(e,t){t?e.refs[si]=kr(t):delete e.refs[si]}function li(e){return Ar(e.refs[si])}function ui(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:i,parent_span_id:a,status:o,origin:s,links:c}=yi(e);return{parent_span_id:a,span_id:t,trace_id:n,data:r,op:i,status:o,origin:s,links:c}}function di(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:yi(e).parent_span_id,a=Fr(e).scope;return{parent_span_id:i,span_id:r?(a==null?void 0:a.getPropagationContext().propagationSpanId)||Lt():t,trace_id:n}}function fi(e){let{traceId:t,spanId:n}=e.spanContext();return ri(t,n,wi(e))}function pi(e){let{traceId:t,spanId:n}=e.spanContext();return ii(t,n,wi(e))}function mi(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function hi(e){if(e!=null&&e.length)return e.map(({context:{spanId:e,traceId:t,traceFlags:n},attributes:r})=>({span_id:e,trace_id:t,sampled:n===1,attributes:r}))}function gi(e){return typeof e==`number`?_i(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?_i(e.getTime()):kt()}function _i(e){return e>9999999999?e/1e3:e}function vi(e){return typeof e==`number`?e<1e12?Ot(e)??kt():e/1e3:gi(e)}function yi(e){if(Ci(e))return e.getStaticSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Si(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:bi(e),start_timestamp:gi(i),timestamp:gi(o)||void 0,status:Ti(s),op:r[Gn],origin:r[N],links:mi(c)}}return{span_id:t,trace_id:n,start_timestamp:0,status:`ok`,data:{}}}function P(e){if(Ci(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Si(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{name:a,span_id:t,trace_id:n,parent_span_id:bi(e),start_timestamp:gi(i),end_timestamp:gi(o)||void 0,is_segment:Fi(e),status:Ei(s),attributes:Di(r,s),links:hi(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:``,status:`ok`,is_segment:Fi(e),attributes:{}}}function bi(e){var t;return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?(t=e.parentSpanContext)==null?void 0:t.spanId:void 0}function xi(e){var t;return{...e,end_timestamp:e.end_timestamp??e.start_timestamp,attributes:rn(e.attributes),links:(t=e.links)==null?void 0:t.map(e=>({...e,attributes:rn(e.attributes)}))}}function Si(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Ci(e){return typeof e.getSpanJSON==`function`}function wi(e){let{traceFlags:t}=e.spanContext();return t===1}function Ti(e){return!e||e.code===0||e.code===1?`ok`:e.message&&Er(e.message)?e.message:`internal_error`}function Ei(e){return!e||e.code===1||e.code===0||e.message===`cancelled`?`ok`:`error`}function Di(e,t){let n=Ei(t)===`error`?t==null?void 0:t.message:void 0;return{...n&&{"sentry.status.message":n},...e}}var Oi=`_sentryChildSpans`,ki=`_sentryRootSpan`;function Ai(e,t){let n=e[ki]||e;Ae(t,ki,n),t.setAttribute(er,void 0),wi(e)&&(e.isRecording()||n.isRecording())&&(e[Oi]?e[Oi].add(t):Ae(e,Oi,new Set([t])))}function ji(e,t){e[Oi]&&e[Oi].delete(t)}function Mi(e){let t=new Set;function n(e){if(!t.has(e)&&wi(e)){t.add(e);let r=e[Oi]?Array.from(e[Oi]):[];for(let e of r)n(e)}}return n(e),Array.from(t)}var Ni=Pi;function Pi(e){return e[ki]||e}function Fi(e){return e===Pi(e)}function F(e){let t=en(a());return t.getActiveSpan?t.getActiveSpan(e):li(e||A())}function Ii(e,t){e.updateName(t),e.setAttributes({[wr]:t}),Li(e,`custom`)}function Li(e,t){Fi(e)&&e.setAttribute(er,t)}var Ri=!1;function zi(){if(Ri)return;function e(){let e=F(),t=e&&Ni(e);if(t){let e=`internal_error`;n&&b.log(`[Tracing] Root span: ${e} -> Global error occurred`),t.setStatus({code:2,message:e})}}Ri=!0,le(e),fe(e)}function Bi(e){var t;if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let n=e||((t=M())==null?void 0:t.getOptions());return!!n&&(n.tracesSampleRate!=null||!!n.tracesSampler)}function Vi(e){b.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Hi(e,t){if(!(t!=null&&t.length))return!1;for(let r of t){if(Gi(r)){if(e.description&&it(e.description,r))return n&&Vi(e),!0;continue}let t=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!t)continue;let i=!r.name||e.description&&it(e.description,r.name),a=!r.op||e.op&&it(e.op,r.op),o=!r.attributes||Object.entries(r.attributes).every(([t,n])=>{var r;return Ui((r=e.attributes)==null?void 0:r[t],n)});if(i&&a&&o)return n&&Vi(e),!0}return!1}function Ui(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?it(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function Wi(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function Gi(e){return typeof e==`string`||e instanceof RegExp}var Ki=[];function qi(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function Ji(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return qi(r)}function Yi(e,t){let n={};return t.forEach(t=>{t!=null&&t.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&Zi(e,t,n)}),n}function Xi(e,t){for(let n of t)n!=null&&n.afterAllSetup&&n.afterAllSetup(e)}function Zi(e,t,r){if(r[t.name])n&&b.log(`Integration skipped because it was already installed: ${t.name}`);else{if(r[t.name]=t,!Ki.includes(t.name)&&typeof t.setupOnce==`function`&&(t.setupOnce(),Ki.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(n=>{let r=t[n];typeof r==`function`&&e.on(n,n=>r.call(t,n,e))}),n&&b.log(`Integration installed: ${t.name}`)}}function Qi(e){let t=M();t?t.addIntegration(e):n&&b.warn(`Cannot add integration "${e.name}" because no SDK Client is available.`)}function I(e){return e}var $i=`production`,ea=Symbol.for(`sentry.nonRecordingSpan`),ta=class{constructor(e={}){this._traceId=e.traceId||It(),this._spanId=e.spanId||Lt(),this.dropReason=e.dropReason,Ae(this,ea,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}};function na(e){return!!e&&e[ea]===!0}var ra=`_frozenDsc`;function ia(e,t){Ae(e,ra,t)}function aa(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:Zr(t)};return t.emit(`createDsc`,i),i}function oa(e,t){if(cn())return;let n=t.getPropagationContext();return n.dsc||aa(n.traceId,e)}function sa(e){let t=M();if(!t)return{};let n=Ni(e),r=yi(n),i=r.data,a=n.spanContext().traceState,o=(a==null?void 0:a.get(`sentry.sample_rate`))??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[ra];if(c)return s(c);let l=na(n),u=l&&n.dropReason===`ignored`;if(l&&(!Bi(t.getOptions())||u)){let e=Fr(n).scope,r=e&&oa(t,e);if(r){let e={...r};return u&&(e.sampled=`false`),s(e)}}let d=a==null?void 0:a.get(`sentry.dsc`),f=d&&Rr(d);if(f)return s(f);let p=aa(e.spanContext().traceId,t),m=i[er],h=r.description;if(m!==`url`&&h&&(p.transaction=h),Bi()){var g;p.sampled=String(wi(n)),p.sample_rand=(a==null?void 0:a.get(`sentry.sample_rand`))??((g=Fr(n).scope)==null?void 0:g.getPropagationContext().sampleRand.toString())}return s(p),t.emit(`createDsc`,p,n),p}function ca(e){return zr(sa(e))}function la(e,t){let{fingerprint:n,breadcrumbs:r,sdkProcessingMetadata:i}=t;pa(e,t),_a(e,n),ma(e,r),ha(e,i)}function ua(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m}=t;da(e,`extra`,n),da(e,`tags`,r),da(e,`attributes`,i),da(e,`user`,a),da(e,`contexts`,o),e.sdkProcessingMetadata=Ft(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function da(e,t,n){e[t]=Ft(e[t],n,1)}function fa(e,t){let n=un().getScopeData();return e&&ua(n,e.getScopeData()),t&&ua(n,t.getScopeData()),n}function pa(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function ma(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ha(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function ga(e,t){e.contexts={trace:di(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:sa(t),...e.sdkProcessingMetadata};let n=yi(Ni(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function _a(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}var va=Symbol.for(`SentryCallbackError`);function ya(e,t,n){let r;try{r=t()}catch(t){return ba(e,t,n)}return Ee(r)?r.then(void 0,t=>ba(e,t,n)):r}function ba(e,t,r){return n&&b.error(e,t),r(t)}function xa(e){return Ae(e,`_static`,!0),e}function Sa(e){return e}function Ca(e){return!!e&&typeof e==`function`&&`_static`in e&&!!e._static}function wa(e,t){return ya(n?"The `beforeSendSpan` callback threw an error, sending the span unmodified:":``,()=>t(e),()=>e)||e}function Ta(e){return xi({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,status:!e.status||e.status===`ok`||e.status===`cancelled`?`ok`:`error`,is_segment:!1,attributes:{...e.data},links:e.links})}function Ea(e){let t={},{response:n,profile:r,cloud_resource:i,culture:a,state:o}=e;if(n&&(n.status_code!=null&&(t[`http.response.status_code`]=n.status_code),n.body_size!=null&&(t[`http.response.body.size`]=n.body_size)),r&&(r.profile_id&&(t[`sentry.profile_id`]=r.profile_id),r.profiler_id&&(t[`sentry.profiler_id`]=r.profiler_id)),i)for(let[e,n]of Object.entries(i))n!=null&&(t[e]=n);a&&(a.locale&&(t[`culture.locale`]=a.locale),a.timezone&&(t[`culture.timezone`]=a.timezone)),o!=null&&o.state&&typeof o.state.type==`string`&&(t[`state.type`]=o.state.type);let s=e.angular;if(s){let e=s.version;(typeof e==`string`||typeof e==`number`)&&(t[`angular.version`]=e)}let c=e.react;if(c){let e=c.version;(typeof e==`string`||typeof e==`number`)&&(t[`react.version`]=e)}return t}function Da(e,t){let n=P(e);n.attributes&&delete n.attributes[wr];let r=Pi(e),i=P(r),{isolationScope:a,scope:o}=Fr(e),s=fa(a,o);Ma(n,i,t,s),t.emit(`preprocessSpan`,n),n.is_segment&&(Oa(n,s),Aa(n,t),t.emit(`processSegmentSpan`,n)),t.emit(`processSpan`,n);let{beforeSendSpan:c,traceLifecycle:l}=t.getOptions();return{...xi(l!==`static`&&c&&!Ca(c)?wa(n,c):n),_segmentSpan:r}}function Oa(e,t){ka(e,Ea(t.contexts))}function ka(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}function Aa(e,t){let n=t.getIntegrationNames();n.length&&ka(e,{[Yn]:n})}function ja(e,t,n,r=!0){var i,a,o,s,c,l;let u=t.getSdkMetadata(),{release:d,environment:f}=t.getOptions();return{[tr]:`stream`,[$n]:e.name,[Qn]:e.span_id,[Xn]:u==null||(i=u.sdk)==null?void 0:i.name,[Zn]:u==null||(a=u.sdk)==null?void 0:a.version,[qn]:d,[Bn]:f||`production`,[hr]:(o=n.user)==null?void 0:o.id,[mr]:(s=n.user)==null?void 0:s.email,[gr]:(c=n.user)==null?void 0:c.ip_address,[_r]:(l=n.user)==null?void 0:l.username,...r?n.attributes:void 0}}function Ma(e,t,n,r){ka(e,ja(t,n,r))}function Na(e,t,n){let r=yi(e),i=P(Pi(e)),{isolationScope:a,scope:o}=Fr(e),s=ja(i,t,fa(a,o),!1);return Object.entries(s).forEach(([e,t])=>{t!=null&&!(e in r.data)&&(r.data[e]=t)}),Ta(wa(r,n))}function L(e){return e.getOptions().traceLifecycle===`stream`}function Pa(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}function Fa(e,t=[]){return[e,t]}function Ia(e,t){let[n,r]=e;return[n,[...r,t]]}function La(e,t){let n=e[1];for(let e of n)if(t(e,e[0].type))return!0;return!1}function Ra(e,t){return La(e,(e,n)=>t.includes(n))}function za(e){let t=o(r);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Ba(e){let t=o(r);return t.decodePolyfill?t.decodePolyfill(e):new TextDecoder().decode(e)}function Va(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[za(r),e]:r.push(typeof e==`string`?za(e):e)}for(let e of n){let[t,n]=e;if(i(`
|
|
6
|
+
${JSON.stringify(t)}
|
|
7
|
+
`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(qe(n))}i(e)}}return typeof r==`string`?r:Ha(r)}function Ha(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Ua(e){let t=typeof e==`string`?za(e):e;function n(e){let n=t.subarray(0,e);return t=t.subarray(e+1),n}function r(){let e=t.indexOf(10);return e<0&&(e=t.length),JSON.parse(Ba(n(e)))}let i=r(),a=[];for(;t.length;){let e=r(),t=typeof e.length==`number`?e.length:void 0;a.push([e,t?n(t):r()])}return[i,a]}function Wa(e){let t=typeof e.data==`string`?za(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Ga={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`,metric:`trace_metric`};function Ka(e){return e in Ga}function qa(e){return Ka(e)?Ga[e]:e}function Ja(e){if(!(e!=null&&e.sdk))return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ya(e,t,n,r){var i;let a=(i=e.sdkProcessingMetadata)==null?void 0:i.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(ze()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Kr(r)},...a&&{trace:a}}}function Xa(e){return e===`replay_event`?`replay`:e||`error`}function Za(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function Qa(){return`npm`}function $a(){return!Za()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function eo(){return typeof window<`u`&&(!$a()||to())}function to(){let e=r.process;return(e==null?void 0:e.type)===`renderer`}function no(e,t,n){let r=n.getOptions(),i=n.getDsn(),a=r.tunnel,o=Ja(r._metadata);return Fa({sent_at:new Date(ze()).toISOString(),...io(t)&&{trace:t},...o&&{sdk:o},...!!a&&i&&{dsn:Kr(i)}},[ro(e,n)])}function ro(e,t){let n=t.getDataCollectionOptions().userInfo?`auto`:`never`;return[{type:`span`,item_count:e.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,ingest_settings:eo()?{infer_ip:n,infer_user_agent:n}:void 0,items:e}]}function io(e){return!!e.trace_id&&!!e.public_key}function ao(e){let t=156;if(t+=e.name.length*2,t+=an(e.attributes),e.links&&e.links.length>0){let n=e.links[0],r=n==null?void 0:n.attributes,i=100+(r?an(r):0);t+=i*e.links.length}return t}var oo=1e3,so=5e6,co=class{constructor(e,t){this._traceBuckets=new Map,this._client=e;let{maxSpanLimit:n,flushInterval:r,maxTraceWeightInBytes:i}=t??{};this._maxSpanLimit=n&&n>0&&n<=oo?n:oo,this._flushInterval=r&&r>0?r:5e3,this._maxTraceWeight=i&&i>0?i:so,this._client.on(`flush`,()=>{this.drain()}),this._client.on(`close`,()=>{this._traceBuckets.forEach(e=>{clearTimeout(e.timeout)}),this._traceBuckets.clear()})}add(e){let t=e.trace_id,n=this._traceBuckets.get(t);n||(n={spans:new Set,size:0,timeout:Pa(setTimeout(()=>{this.flush(t)},this._flushInterval))},this._traceBuckets.set(t,n)),n.spans.add(e),n.size+=ao(e),(n.spans.size>=this._maxSpanLimit||n.size>=this._maxTraceWeight)&&this.flush(t)}drain(){this._traceBuckets.size&&(n&&b.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((e,t)=>{this.flush(t)}))}flush(e){var t;let r=this._traceBuckets.get(e);if(!r)return;if(!r.spans.size){this._removeTrace(e);return}let i=Array.from(r.spans),a=(t=i[0])==null?void 0:t._segmentSpan;if(!a){n&&b.warn(`No segment span reference found on span JSON, cannot compute DSC`),this._removeTrace(e);return}let o=sa(a),s=i.map(e=>{let{_segmentSpan:t,...n}=e;return n}),c=no(s,o,this._client);n&&b.log(`Sending span envelope for trace ${e} with ${s.length} spans`),this._client.sendEnvelope(c).then(null,e=>{n&&b.error(`Error while sending streamed span envelope:`,e)}),this._removeTrace(e)}_removeTrace(e){let t=this._traceBuckets.get(e);t&&clearTimeout(t.timeout),this._traceBuckets.delete(e)}},lo=`SpanStreaming`,uo=I((e={})=>{let t=e.flushOnSegmentEnd??!0;return{name:lo,setup(e){if(!L(e)){n&&b.log('[SpanStreaming] `traceLifecycle` is "static", skipping setup.');return}let r=new co(e);e.on(`afterSpanEnd`,t=>{wi(t)&&r.add(Da(t,e))}),e.on(`flushTraceSpans`,e=>{r.flush(e)}),t&&e.on(`afterSegmentSpanEnd`,e=>{let t=e.spanContext().traceId;Pa(setTimeout(()=>{r.flush(t)},500))})}}});function fo(e,t,n=()=>{},r=()=>{}){let i;try{i=e()}catch(e){throw t(e),n(),e}return po(i,t,n,r)}function po(e,t,n,r){return Ee(e)?Gt(e,e=>{n(),r(e)},e=>{t(e),n()}):(n(),r(e),e)}var mo=new WeakMap;function ho(e){return xe(e)?void 0:e}function go(e,t){let n=ho(e);n&&wi(t)&&!mo.has(n)&&mo.set(n,di(t))}function _o(e,t,n){var r;let i=ho(t.originalException),a=i&&mo.get(i);if(!a)return;let o=(r=e.contexts)==null?void 0:r.trace;((o==null?void 0:o.trace_id)??(n&&pn(n).trace_id))===a.trace_id&&(e.contexts={...e.contexts,trace:{...o,...a}})}function vo(e){if(!n)return;let{description:t=`< unknown name >`,op:r=`< unknown op >`,parent_span_id:i}=yi(e),{spanId:a}=e.spanContext(),o=wi(e),s=Ni(e),c=s===e,l=`[Tracing] Starting ${o?`sampled`:`unsampled`} ${c?`root `:``}span`,u=[`op: ${r}`,`name: ${t}`,`ID: ${a}`];if(i&&u.push(`parent ID: ${i}`),!c){let{op:e,description:t}=yi(s);u.push(`root ID: ${s.spanContext().spanId}`),e&&u.push(`root op: ${e}`),t&&u.push(`root description: ${t}`)}b.log(`${l}
|
|
8
|
+
${u.join(`
|
|
9
|
+
`)}`)}function yo(e){if(!n)return;let{description:t=`< unknown name >`,op:r=`< unknown op >`}=yi(e),{spanId:i}=e.spanContext(),a=`[Tracing] Finishing "${r}" ${Ni(e)===e?`root `:``}span "${t}" with ID ${i}`;b.log(a)}function bo(e,t,r){if(!Bi(e))return[!1];let i=xo(e,t);if(!i)return[!1,void 0,void 0,`callback_error`];let[a,o]=i,s=$r(a);if(s===void 0)return n&&b.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(a)} of type ${JSON.stringify(typeof a)}.`),[!1];if(!s)return n&&b.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,o];let c=r<s;return c||n&&b.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(a)})`),[c,s,o]}function xo(e,t){let{tracesSampler:r,tracesSampleRate:i}=e;if(typeof r==`function`){let e=ya(n?"The `tracesSampler` callback threw an error, falling back to the parent sampling decision or `tracesSampleRate`:":``,()=>[r({...t,inheritOrSampleWith:e=>typeof t.parentSampleRate==`number`?t.parentSampleRate:typeof t.parentSampled==`boolean`?Number(t.parentSampled):e}),!0],()=>void 0);if(e)return e}if(t.parentSampled!==void 0)return[t.parentSampled];if(i!==void 0)return[i,!0]}function So(e,t,r,i=F()){let a=i&&Ni(i);a&&(n&&b.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${r}`),a.addEvent(e,{[Cr]:t,[Sr]:r}))}function Co(e){if(!e||e.length===0)return;let t={};return e.forEach(e=>{let n=e.attributes||{},r=n[Sr],i=n[Cr];typeof r==`string`&&typeof i==`number`&&(t[e.name]={value:i,unit:r})}),t}function wo(){return o(a()).segmentSpanCaptureStrategy}var To=1e3,Eo=class{constructor(e={}){this._traceId=e.traceId||It(),this._spanId=e.spanId||Lt(),e.startTimestamp?this._startTime=e.startTimestamp:(this._startTime=kt(),this._startPerformanceNow=Tt()),this._links=e.links,this._attributes={},this.setAttributes({[N]:`manual`,[Gn]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),`sampled`in e&&(this._sampled=e.sampled),this._events=[],this._isStandaloneSpan=e.isStandalone}addLink(e){return this._frozen||(this._links?this._links.push(e):this._links=[e]),this}addLinks(e){return this._frozen||(this._links?this._links.push(...e):this._links=e),this}recordException(e,t){}spanContext(){let{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:+!!n}}setAttribute(e,t){return this._frozen?this:e===`sentry.segment.name.source`&&t!==void 0&&!Fi(this)?(n&&b.warn(`[Tracing] Ignoring name source on a child span: this attribute is only valid on the root span.`),this):(t===void 0?delete this._attributes[e]:this._attributes[e]=t,this)}setAttributes(e){return Object.keys(e).forEach(t=>this.setAttribute(t,e[t])),this}updateStartTime(e){this._frozen||(this._startTime=Do(this,e),this._startPerformanceNow=void 0)}setStatus(e){return this._frozen||(this._status=e),this}updateName(e){return this._frozen||(this._name=e,Li(this,`custom`)),this}end(e){this._endTime||(this._endTime=e==null?this._getEndTimeFromDuration():Do(this,e),yo(this),this._onSpanEnded(),this._frozen=Ir(this))}getStaticSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Gn],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Ti(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[N],profile_id:this._attributes[Kn],exclusive_time:this._attributes[Vn],measurements:Co(this._events),links:mi(this._links)}}getSpanJSON(){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,is_segment:Fi(this),status:Ei(this._status),attributes:Di(this._attributes,this._status),links:hi(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,t,r){if(this._frozen)return this;n&&b.log(`[Tracing] Adding an event to span:`,e);let i=Oo(t)?t:r||void 0,a=Oo(t)?{}:t||{},o={name:e,time:Do(this,i),attributes:a};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_getEndTimeFromDuration(){let e=Tt();return this._startPerformanceNow==null||e==null?kt():this._startTime+(e-this._startPerformanceNow)/1e3}_onSpanEnded(){let e=M();if(e==null||e.emit(`spanEnd`,this),this._isStandaloneSpan){if(!e)return;if(this._sampled){jo(this,e);return}n&&b.log(`[Tracing] Discarding standalone span because its trace was not chosen to be sampled.`);return}e==null||e.emit(`afterSpanEnd`,this);let t=Ni(this);if(t!==this){let e=wo();if(e){let n=Fr(this).scope||A();e.onChildSpanEnded(this,t,e=>this._convertSpanToTransaction(e),n)}return}if(e&&L(e)){e.emit(`afterSegmentSpanEnd`,this);return}let r=Fr(this).scope||A(),i=wo();if(i)i.onSegmentSpanEnded(e=>this._convertSpanToTransaction(e),r);else{let e=this._convertSpanToTransaction();e&&r.captureEvent(e)}}_convertSpanToTransaction(e={}){var t,r;if(!ko(yi(this)))return;this._name||=(n&&b.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),`<unlabeled transaction>`);let{scope:i,isolationScope:a}=Fr(this),o=i==null||(t=i.getScopeData().sdkProcessingMetadata)==null?void 0:t.normalizedRequest;if(this._sampled!==!0)return;(r=e.onSpanCaptured)==null||r.call(e,this);let s=[],c=0;for(let t of Mi(this)){var l,u;if(t===this||Ao(t)||(l=e.isSpanAlreadyCaptured)!=null&&l.call(e,t))continue;let n=yi(t);ko(n)?((u=e.onSpanCaptured)==null||u.call(e,t),s.push(n)):e.onSpanCaptured||c++}let d=(i==null?void 0:i.getClient())||M();c&&(d==null||d.recordDroppedEvent(`invalid`,`span`,c)),s.length>To&&(d==null||d.recordDroppedEvent(`buffer_overflow`,`span`,s.length-To));let f=this._attributes[er];delete this._attributes[wr];let p=!1;s.forEach(e=>{var t;delete e.data[wr],(t=e.op)!=null&&t.startsWith(`gen_ai.`)&&(p=!0)});let m={contexts:{trace:ui(this)},spans:s.length>To?s.sort((e,t)=>e.start_timestamp-t.start_timestamp).slice(0,To):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:`transaction`,sdkProcessingMetadata:{capturedSpanScope:i,capturedSpanIsolationScope:a,dynamicSamplingContext:sa(this),hasGenAiSpans:p},request:o,...f&&{transaction_info:{source:f}}},h=Co(this._events);return h&&Object.keys(h).length&&(n&&b.log(`[Measurements] Adding measurements to transaction event`,JSON.stringify(h,void 0,2)),m.measurements=h),m}};function Do(e,t){return Ir(e)?vi(t):gi(t)}function Oo(e){return e&&typeof e==`number`||e instanceof Date||Array.isArray(e)}function ko(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Ao(e){return e instanceof Eo&&e.isStandaloneSpan()}function jo(e,t){let{beforeSendSpan:n,traceLifecycle:r}=t.getOptions();if(r===`static`&&Ca(n)){let r=Na(e,t,n),i=sa(e);t.sendEnvelope(no([r],i,t));return}let{_segmentSpan:i,...a}=Da(e,t),o=sa(i);t.sendEnvelope(no([a],o,t))}function Mo(e,t){let n=Ho(e),{forceTransaction:r,parentSpan:i,scope:a}=e;return dn(a==null?void 0:a.clone(),()=>qo(i)(()=>{let o=A(),s=Ko(a??o,i),c=M(),l=e.onlyIfParent&&!s?Bo(o,c):Vo({parentSpan:s,spanArguments:n,forceTransaction:r,scope:o});return Xo(l,!Yo(l)||!s,()=>t(l),()=>l.end())}))}function No(e,t){let n=Ho(e),{forceTransaction:r,parentSpan:i,scope:a}=e;return dn(a==null?void 0:a.clone(),()=>qo(i)(()=>{let o=A(),s=Ko(a??o,i),c=e.onlyIfParent&&!s?Bo(o,M()):Vo({parentSpan:s,spanArguments:n,forceTransaction:r,scope:o});return Xo(c,!Yo(c)||!s,()=>t(c,()=>c.end()))}))}function Po(e){let t=Ho(e),{forceTransaction:n,parentSpan:r,scope:i}=e;return(i?e=>dn(i,e):r===void 0?e=>e():e=>Io(r,e))(()=>{let a=A(),o=Ko(i??a,r),s=M();return e.onlyIfParent&&!o?Bo(a,s):Vo({parentSpan:o,spanArguments:t,forceTransaction:n,scope:a})})}var Fo=(e,t)=>{let n=en(a());if(n.continueTrace)return n.continueTrace(e,t);let{sentryTrace:r,baggage:i}=e,o=M(),s=Rr(i);return o&&!oi(o,s==null?void 0:s.org_id)?zo(t):dn(e=>{let n=ni(r,i);return e.setPropagationContext(n),Io(null,t)})};function Io(e,t){let n=Uo();return n.withActiveSpan?n.withActiveSpan(e,t):dn(n=>(ci(n,e||void 0),t(n)))}function Lo(e){let t=Uo();return t.suppressTracing?t.suppressTracing(e):dn(t=>(t.setSDKProcessingMetadata({[Ht]:!0}),e()))}function Ro(e=A()){let t=Uo();return t.isTracingSuppressed?t.isTracingSuppressed(e):e.getScopeData().sdkProcessingMetadata[Ht]===!0}function zo(e){let t=Uo();return t.startNewTrace?t.startNewTrace(e):Io(null,()=>dn(t=>(t.setPropagationContext({traceId:It(),sampleRand:Re()}),n&&b.log(`Starting a new trace with id ${t.getPropagationContext().traceId}`),e())))}function Bo(e,t){t==null||t.recordDroppedEvent(`no_parent_span`,`span`);let n=new ta({dropReason:`no_parent_span`,traceId:e.getPropagationContext().traceId});return Pr(n,e,j()),n}function Vo({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){var i;let a=j(),o={scope:r,parentSpan:e};(i=M())==null||i.emit(`prepareSpanScope`,o);let{scope:s,parentSpan:c}=o;if(!Bi()){let e=s.getPropagationContext(),t=new ta({traceId:c?c.spanContext().traceId:e.traceId});return c&&!n&&Ai(c,t),Pr(t,s,a),t}let l=M();if(Jo(l,t)){Ro(s)||l==null||l.recordDroppedEvent(`ignored`,`span`);let e=new ta({dropReason:`ignored`,traceId:(c==null?void 0:c.spanContext().traceId)??s.getPropagationContext().traceId});return c&&!n&&Ai(c,e),Pr(e,s,a),e}let u;if(c&&!n)u=Go(c,s,t,a),Ai(c,u);else if(c){let e=sa(c),{traceId:n,spanId:r}=c.spanContext(),i=wi(c);u=Wo({traceId:n,parentSpanId:r,...t},s,a,i),ia(u,e)}else{let{traceId:e,dsc:n,parentSpanId:r,sampled:i,sampleRand:o}=s.getPropagationContext();if(u=Wo({traceId:e,parentSpanId:r,...t},s,a,i),n){let e=Object.keys(n).length===0&&o!==void 0?{sample_rand:o.toString()}:n;ia(u,e)}}return vo(u),u}function Ho(e){var t;let n={isStandalone:(t=e.experimental)==null?void 0:t.standalone,...e};if(e.op&&(n.attributes={[Gn]:e.op,...e.attributes}),e.startTime){let t={...n};return t.startTimestamp=gi(e.startTime),delete t.startTime,t}return n}function Uo(){return en(a())}function Wo(e,t,r,i){var a;let o=M(),s=(o==null?void 0:o.getOptions())||{},{name:c=``}=e,l={spanAttributes:{...e.attributes},spanName:c,parentSampled:i};o==null||o.emit(`beforeSampling`,l,{decision:!1});let u=l.parentSampled??i,d=l.spanAttributes,f=t.getPropagationContext(),p=Ro(t),[m,h,g,_]=p?[!1]:bo(s,{name:c,parentSampled:u,attributes:d,normalizedRequest:r.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:$r((a=f.dsc)==null?void 0:a.sample_rate)},f.sampleRand),v=new Eo({...e,attributes:{[er]:`custom`,[vr]:h!==void 0&&g?h:void 0,...d},sampled:m});if(!m&&o&&!p){n&&b.log(`[Tracing] Discarding root span because its trace was not chosen to be sampled.`);let t=_||`sample_rate`;!L(o)&&!e.isStandalone&&o.recordDroppedEvent(t,`transaction`),o.recordDroppedEvent(t,`span`)}return Pr(v,t,r),o&&o.emit(`spanStart`,v),v}function Go(e,t,n,r){let{spanId:i,traceId:a}=e.spanContext(),o=Ro(t),s=!o&&wi(e),c=s?new Eo({...n,parentSpanId:i,traceId:a,sampled:s}):new ta({traceId:a});Ai(e,c),Pr(c,t,r);let l=M();return l&&(na(c)&&(na(e)&&e.dropReason?(c.dropReason=e.dropReason,l.recordDroppedEvent(e.dropReason,`span`)):o||(c.dropReason=`sample_rate`,l.recordDroppedEvent(`sample_rate`,`span`))),l.emit(`spanStart`,c)),c}function Ko(e,t){if(t)return t;if(t===null)return;let n=F(e);if(!n)return;let r=M();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Ni(n):n}function qo(e){return e===void 0?e=>e():t=>Io(e,t)}function Jo(e,t){var n;let r=e==null?void 0:e.getOptions().ignoreSpans;return!e||!L(e)||!(r!=null&&r.length)?!1:Hi({description:t.name||``,op:((n=t.attributes)==null?void 0:n[`sentry.op`])||t.op,attributes:t.attributes},r)}function Yo(e){return na(e)&&e.dropReason===`ignored`}function Xo(e,t,n,r){return(t?t=>Io(e,()=>{let n=A(),r=Fr(e).scope;return r&&n.setPropagationContext(r.getPropagationContext()),Pr(e,n,j()),t()}):e=>e())(()=>fo(()=>n(),t=>{go(t,e);let{status:n}=yi(e);e.isRecording()&&n===`ok`&&e.setStatus({code:2,message:`internal_error`})},r))}var Zo=new WeakSet;function Qo(e=M()){e&&!Zo.has(e)&&L(e)&&(Zo.add(e),e.addIntegration(uo()))}function $o(e,t){return Qo(),Mo(e,t)}function es(e,t){return Qo(),No(e,t)}function ts(e){return Qo(),Po(e)}var ns={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},rs=`heartbeatFailed`,is=`idleTimeout`,as=`finalTimeout`,os=`externalFinish`;function ss(e,t={}){let r=M();Qo(r);let i=new Map,a=!1,o,s,c=os,l=!t.disableAutoFinish,u=[],{idleTimeout:d=ns.idleTimeout,finalTimeout:f=ns.finalTimeout,childSpanTimeout:p=ns.childSpanTimeout,trimIdleSpanEndTimestamp:m=!0}=t,h=A();if(!r||!Bi()){let e=new ta({traceId:h.getPropagationContext().traceId});return Pr(e,h,j()),e}let g=F(),_=Po(e);ci(A(),_),n&&b.log(`[Tracing] Started span is an idle span`),_.end=new Proxy(_.end,{apply(e,t,n){if(r.emit(`beforeIdleSpanEnd`,_),na(t))return;let[i,...a]=n,o=gi(i||kt()),s=Mi(_).filter(e=>e!==_),c=yi(_);if(!s.length||!m)return T(o),Reflect.apply(e,t,[o,...a]);let l=r.getOptions().ignoreSpans,u=s==null?void 0:s.reduce((e,t)=>{let n=yi(t);return!n.timestamp||l&&Hi({description:n.description,op:n.op,attributes:n.data},l)?e:e?Math.max(e,n.timestamp):n.timestamp},void 0),d=c.start_timestamp,p=Math.min(d?d+f/1e3:1/0,Math.max(d||-1/0,Math.min(o,u||1/0)));return T(p),Reflect.apply(e,t,[p,...a])}});function v(){o&&=(clearTimeout(o),void 0)}function y(){s&&=(clearTimeout(s),void 0)}function x(e){v(),o=setTimeout(()=>{!a&&i.size===0&&l&&(c=is,_.end(e))},d)}function S(e){y(),s=setTimeout(()=>{!a&&l&&(c=rs,_.end(e))},p)}function C(e){v(),i.set(e,!0),S(kt()+p/1e3)}function w(e){i.has(e)&&i.delete(e),i.size===0&&(x(kt()+d/1e3),y())}function T(e){a=!0,i.clear(),u.forEach(e=>e()),ci(h,g);let t=yi(_),{start_timestamp:r}=t;if(!r)return;t.data[`sentry.idle_span_finish_reason`]||_.setAttribute(Hn,c);let o=t.status;o&&o!==`unknown`||_.setStatus({code:1}),b.log(`[Tracing] Idle span "${t.op}" finished`);let s=Mi(_).filter(e=>e!==_),l=0;s.forEach(t=>{t.isRecording()&&(t.setStatus({code:2,message:`cancelled`}),t.end(e),n&&b.log(`[Tracing] Cancelling span since span ended early`,JSON.stringify(t,void 0,2)));let{timestamp:r=0,start_timestamp:i=0}=yi(t),a=i<=e,o=(f+d)/1e3,s=r-i<=o;if(n){let e=JSON.stringify(t,void 0,2);a?s||b.log(`[Tracing] Discarding span since it finished after idle span final timeout`,e):b.log(`[Tracing] Discarding span since it happened after idle span was finished`,e)}s&&a||(ji(_,t),l++)}),l>0&&_.setAttribute(`sentry.idle_span_discarded_spans`,l)}return u.push(r.on(`spanStart`,e=>{a||e===_||P(e).end_timestamp||e instanceof Eo&&e.isStandaloneSpan()||Mi(_).includes(e)&&C(e.spanContext().spanId)})),u.push(r.on(`spanEnd`,e=>{a||w(e.spanContext().spanId)})),u.push(r.on(`idleSpanEnableAutoFinish`,e=>{e===_&&(l=!0,x(),i.size&&S())})),t.disableAutoFinish||x(),setTimeout(()=>{a||(_.setStatus({code:2,message:`deadline_exceeded`}),c=as,_.end())},f),_}function cs(e,t,n){let r,i,a,o=n!=null&&n.maxWait?Math.max(n.maxWait,t):0,s=(n==null?void 0:n.setTimeoutImpl)||setTimeout;function c(){return l(),r=e(),r}function l(){i!==void 0&&clearTimeout(i),a!==void 0&&clearTimeout(a),i=a=void 0}function u(){return i&&clearTimeout(i),i=s(c,t),o&&a===void 0&&(a=s(c,o)),r}return u.cancel=l,u.flush=function(){return i!==void 0||a!==void 0?c():r},u}var ls=[`addListener`,`on`,`once`,`prependListener`,`prependOnceListener`,`addEventListener`],us=[`removeListener`,`off`,`removeEventListener`],ds=Symbol(`SentryScopeBoundListeners`),fs;function ps(e){return fs!==void 0&&(e===fs||e.listener===fs)}function ms(e,t=A()){let n=e;if(xs(n))return e;bs(n);for(let e of ls)typeof n[e]==`function`&&(n[e]=_s(n,n[e],t));for(let e of us)typeof n[e]==`function`&&(n[e]=vs(n,n[e]));return typeof n.removeAllListeners==`function`&&(n.removeAllListeners=ys(n,n.removeAllListeners)),e}function hs(e,t){return function(...n){return dn(t,()=>e.apply(this,n))}}function gs(e){return typeof e==`function`}function _s(e,t,n){return function(...r){let i=r[0],a=r[1],o=r.slice(2);if(!gs(a)||ps(a))return t.apply(this,r);let s=xs(e)||bs(e),c=s.get(i);c||(c=new WeakMap,s.set(i,c));let l=c.get(a);l||(l=hs(a,n),c.set(a,l));let u=fs;fs=l;try{return t.call(this,i,l,...o)}finally{fs=u}}}function vs(e,t){return function(...n){var r;let i=n[0],a=n[1],o=n.slice(2),s=gs(a)?(r=xs(e))==null||(r=r.get(i))==null?void 0:r.get(a):void 0;return s?t.call(this,i,s,...o):t.apply(this,n)}}function ys(e,t){return function(...n){let r=xs(e);if(r){if(n.length===0)bs(e);else{let e=n[0];r.delete(e)}}return t.apply(this,n)}}function bs(e){let t=new Map;return e[ds]=t,t}function xs(e){return e[ds]}var Ss=`pageload`,Cs=`navigation`,ws=`navigation.redirect`,Ts=`resource.other`,Es=`browser.paint`,Ds=`browser.unload_event`,Os=`browser.redirect`,ks=`browser.dom_content_loaded_event`,As=`browser.load_event`,js=`browser.connect`,Ms=`browser.tls_ssl`,Ns=`browser.cache`,Ps=`browser.dns`,Fs=`browser.request`,Is=`browser.response`,Ls=`ui.long_task`,Rs=`ui.long_animation_frame`,zs=`ui.interaction.click`,Bs=`ui.interaction.hover`,Vs=`ui.interaction.drag`,Hs=`ui.interaction.press`,Us=`ui.webvital.lcp`,Ws=`ui.webvital.cls`,Gs=`ui.action.click`,Ks=`http.client`,qs=`http.client.stream`,Js=`Pageload`,Ys=`Navigation`,Xs=`Main UI thread blocked`,Zs=`Click`,Qs=`Hover`,$s=`Drag`,ec=`Key press`,tc={[Ns]:`Cache lookup`,[Ps]:`DNS lookup`,[js]:`Connect`,[Ms]:`TLS handshake`,[Os]:`Redirect`,[Fs]:`Request`,[Is]:`Response`,[Ds]:`Unload event`,[ks]:`DOMContentLoaded event`,[As]:`Load event`};function nc(e,t){var n,r,i,a;if(!t)return e;let o=e.sdk||{};return e.sdk={...o,name:o.name||t.name,version:o.version||t.version,integrations:[...((n=e.sdk)==null?void 0:n.integrations)||[],...t.integrations||[]],packages:[...((r=e.sdk)==null?void 0:r.packages)||[],...t.packages||[]],settings:(i=e.sdk)!=null&&i.settings||t.settings?{...(a=e.sdk)==null?void 0:a.settings,...t.settings}:void 0},e}function rc(e,t,n,r){let i=Ja(n);return Fa({sent_at:new Date(ze()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:Kr(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function ic(e,t,n,r){let i=Ja(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;nc(e,n==null?void 0:n.sdk);let o=Ya(e,i,r,t);return delete e.sdkProcessingMetadata,Fa(o,[[{type:a},e]])}var ac=0,oc=1,sc=2;function cc(e){return new uc(t=>{t(e)})}function lc(e){return new uc((t,n)=>{n(e)})}var uc=class e{constructor(e){this._state=ac,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}_executeHandlers(){if(this._state===ac)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===oc&&e[1](this._value),this._state===sc&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{this._state===ac&&(Ee(t)?t.then(n,r):(this._state=e,this._value=t,this._executeHandlers()))},n=e=>{t(oc,e)},r=e=>{t(sc,e)};try{e(n,r)}catch(e){r(e)}}};function dc(e,t,n,r=0,i){try{let a=fc(t,n,e,r,i);return Ee(a)?a:cc(a)}catch(e){return lc(e)}}function fc(e,t,r,i,a){let o=r[i];if(!e||!o)return e;let s=`Event processor "${o.id||`?`}"`,c=!1,l=ya(n?`${s} threw an error, dropping event:`:``,()=>o({...e},t),()=>(c=!0,null));return n&&l===null&&b.log(`${s} dropped event`),Ee(l)?l.then(e=>e?fc(e,t,r,i+1,a):(a==null||a(c?`callback_error`:`event_processor`),null)):l?fc(l,t,r,i+1,a):(a==null||a(c?`callback_error`:`event_processor`),null)}var pc,mc,hc,gc;function _c(e){let t=r._sentryDebugIds,n=r._debugIds;if(!t&&!n)return{};let i=t?Object.keys(t):[],a=n?Object.keys(n):[];if(gc&&i.length===mc&&a.length===hc)return gc;mc=i.length,hc=a.length,gc={},pc||={};let o=(t,n)=>{for(let r of t){let t=n[r],i=pc==null?void 0:pc[r];if(i&&gc&&t)gc[i[0]]=t,pc&&(pc[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e],a=i==null?void 0:i.filename;if(a&&gc&&pc){gc[a]=t,pc[r]=[a,t];break}}}}};return t&&o(i,t),n&&o(a,n),gc}function vc(e,t){let n=_c(e);if(!n)return[];let r=[];for(let e of t){let t=re(e);t&&n[t]&&r.push({type:`sourcemap`,code_file:e,debug_id:n[t]})}return r}function yc(e){var t;return((t=e.data)==null?void 0:t.__sentry__)===!0}function bc(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n!=null&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function xc(e,t,n,r,i,a){var o;let{normalizeDepth:s=3,normalizeMaxBreadth:c=1e3}=e,l={...t,event_id:t.event_id||n.event_id||lt(),timestamp:t.timestamp||St()},u=n.integrations||e.integrations.map(e=>e.name);Sc(l,e),Tc(l,u),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&Cc(l,e.stackParser);let d=Dc(r,n.captureContext);n.mechanism&&mt(l,n.mechanism);let f=i?i.getEventProcessors():[],p=fa(a,d),m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),la(l,p);let h=F(d);h&&ga(l,h),_o(l,n,d);let g=[...f,...p.eventProcessors],_=t.type===`transaction`,v=((o=t.spans)==null?void 0:o.length)||0;return(yc(n)?cc(l):dc(g,l,n,0,e=>{i&&(i.recordDroppedEvent(e,Xa(t.type)),_&&i.recordDroppedEvent(e,`span`,1+v))})).then(e=>{if(!e)return null;if(_&&i){var t;let n=v-(((t=e.spans)==null?void 0:t.length)||0);n>0&&i.recordDroppedEvent(`event_processor`,`span`,n)}return wc(e),typeof s==`number`&&s>0?Ec(e,s,c):e})}function Sc(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;if(o!=null&&o.url&&a&&(o.url=tt(o.url,a)),a){var s;(s=e.exception)==null||(s=s.values)==null||s.forEach(e=>{e.value&&=tt(e.value,a)})}}function Cc(e,t){var n;let r=_c(t);(n=e.exception)==null||(n=n.values)==null||n.forEach(e=>{var t;(t=e.stacktrace)==null||(t=t.frames)==null||t.forEach(e=>{e.filename&&(e.debug_id=r[e.filename])})})}function wc(e){var t;let n={};if((t=e.exception)==null||(t=t.values)==null||t.forEach(e=>{var t;(t=e.stacktrace)==null||(t=t.frames)==null||t.forEach(e=>{e.debug_id&&(e.abs_path?n[e.abs_path]=e.debug_id:e.filename&&(n[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(n).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let r=e.debug_meta.images;Object.entries(n).forEach(([e,t])=>{r.push({type:`sourcemap`,code_file:e,debug_id:t})})}function Tc(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Ec(e,t,n){var r,i;if(!e)return null;let a={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:qe(e.data,t,n)}}))},...e.user&&{user:qe(e.user,t,n)},...e.contexts&&{contexts:qe(e.contexts,t,n)},...e.extra&&{extra:qe(e.extra,t,n)}};return(r=e.contexts)!=null&&r.trace&&a.contexts&&(a.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(a.contexts.trace.data=qe(e.contexts.trace.data,t,n))),e.spans&&(a.spans=e.spans.map(e=>({...e,...e.data&&{data:qe(e.data,t,n)}}))),(i=e.contexts)!=null&&i.flags&&a.contexts&&(a.contexts.flags=qe(e.contexts.flags,3,n)),a}function Dc(e,t){if(!t)return e;let n=e?e.clone():new zt;return n.update(t),n}function Oc(e){if(e)return kc(e)||jc(e)?{captureContext:e}:e}function kc(e){return e instanceof zt||typeof e==`function`}var Ac=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function jc(e){return Object.keys(e).some(e=>Ac.includes(e))}function Mc(e,t){return A().captureException(e,Oc(t))}function Nc(e,t){let n=typeof t==`string`?t:void 0,r=typeof t==`string`?void 0:{captureContext:t};return A().captureMessage(e,n,r)}function Pc(e,t){return A().captureEvent(e,t)}function Fc(e,t){j().setContext(e,t)}function Ic(e){j().setExtras(e)}function Lc(e,t){j().setExtra(e,t)}function Rc(e){j().setTags(e)}function zc(e,t){j().setTag(e,t)}function Bc(e){j().setAttributes(e)}function Vc(e,t){j().setAttribute(e,t)}function Hc(e){j().setUser(e)}function Uc(e){j().setConversationId(e)}function Wc(){return j().lastEventId()}async function Gc(e){let t=M();return t?t.flush(e):(n&&b.warn(`Cannot flush events. No client defined.`),Promise.resolve(!1))}async function Kc(e){let t=A(),r=t.getClient();if(r){let n=await r.close(e);return t.getClient()===r&&t.setClient(void 0),n}return n&&b.warn(`Cannot flush events and disable SDK. No client defined.`),Promise.resolve(!1)}function qc(){return!!M()}function Jc(){let e=M();return(e==null?void 0:e.getOptions().enabled)!==!1&&!!(e!=null&&e.getTransport())}function Yc(e){j().addEventProcessor(e)}function Xc(e){let t=j(),{user:n}=fa(t,A()),{userAgent:i}=r.navigator||{},a=jt({user:n,...i&&{userAgent:i},...e}),o=t.getSession();return(o==null?void 0:o.status)===`ok`&&Mt(o,{status:`exited`}),Zc(),t.setSession(a),a}function Zc(){let e=j(),t=A().getSession()||e.getSession();t&&Nt(t),Qc(),e.setSession()}function Qc(){let e=j(),t=M(),n=e.getSession();n&&t&&t.captureSession(n)}function $c(e=!1){e?Zc():Qc()}function el(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function tl(e){return`${el(e)}${e.projectId}/envelope/`}function nl(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function rl(e,t,n){return t||`${tl(e)}?${nl(e,n)}`}function il(e,t){let n=Qr(e);if(!n)return``;let r=`${el(n)}embed/error-page/`,i=`dsn=${Kr(n)}`;for(let e in t)if(e!==`dsn`&&e!==`onClose`&&e!==`onError`){if(e===`user`){let e=t.user;if(!e)continue;e.name&&(i+=`&name=${encodeURIComponent(e.name)}`),e.email&&(i+=`&email=${encodeURIComponent(e.email)}`)}else i+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`}return`${r}?${i}`}var al=`sentry.timestamp.sequence`,ol=0,sl;function cl(e){let t=Math.floor(e*1e3);sl!==void 0&&t!==sl&&(ol=0);let n=ol;return ol++,sl=t,{key:al,value:{value:n,type:`integer`}}}function ll(e,t){return t?dn(t,()=>{let n=F(),r=n?di(n):pn(t);return[n?sa(n):oa(e,t),r]}):[void 0,void 0]}var ul={trace:1,debug:5,info:9,warn:13,error:17,fatal:21};function dl(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...eo()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function fl(e,t,n,r,i){let a={};return t!=null&&t.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=Kr(r)),Fa(a,[dl(e,i)])}var pl=100;function ml(e,t,n,r=!0){n&&(!e[t]||r)&&(e[t]=n)}function hl(e,t){let n=yl(),r=vl(e);r===void 0?n.set(e,[t]):r.length>=pl?(_l(e,r),n.set(e,[t])):n.set(e,[...r,t])}function gl(e,t=A(),r=hl){var i;let a=(t==null?void 0:t.getClient())??M();if(!a){n&&b.warn(`No client available to capture log.`);return}let{release:o,environment:s,beforeSendLog:c}=a.getOptions(),[,l]=ll(a,t),u={...e.attributes},{user:{id:f,email:p,username:m},attributes:h}=fa(j(),t);ml(u,`user.id`,f,!1),ml(u,`user.email`,p,!1),ml(u,`user.name`,m,!1),ml(u,`sentry.release`,o),ml(u,`sentry.environment`,s);let{name:g,version:_}=((i=a.getSdkMetadata())==null?void 0:i.sdk)??{};ml(u,`sentry.sdk.name`,g),ml(u,`sentry.sdk.version`,_);let v=a.getIntegrationByName(`Replay`),y=v==null?void 0:v.getReplayId(!0);ml(u,`sentry.replay_id`,y),y&&(v==null?void 0:v.getRecordingMode())===`buffer`&&ml(u,`sentry._internal.replay_is_buffering`,!0);let x=e.message;if(be(x)){let{__sentry_template_string__:e,__sentry_template_values__:t=[]}=x;t!=null&&t.length&&(u[`sentry.message.template`]=e),t.forEach((e,t)=>{u[`sentry.message.parameter.${t}`]=e})}let S=F(t);ml(u,`sentry.trace.parent_span_id`,S==null?void 0:S.spanContext().spanId);let C={...e,attributes:u};a.emit(`beforeCaptureLog`,C);let w=c?ya(n?"The `beforeSendLog` callback threw an error, dropping the log:":``,()=>d(()=>c(C)),()=>va):C;if(w===va){a.recordDroppedEvent(`callback_error`,`log_item`,1);return}if(!w){a.recordDroppedEvent(`before_send`,`log_item`,1),n&&b.warn(`beforeSendLog returned null, log will not be captured.`);return}let{level:T,message:E,attributes:ee={},severityNumber:te}=w,D=kt(),ne=cl(D);r(a,{timestamp:D,level:T,body:xl(String(E)),trace_id:l==null?void 0:l.trace_id,severity_number:te??ul[T],attributes:bl({...rn(h),...rn(ee,!0),[ne.key]:ne.value})}),a.emit(`afterCaptureLog`,w)}function _l(e,t){let n=t??vl(e)??[];if(n.length===0)return;let r=e.getOptions(),i=fl(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);yl().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function vl(e){return yl().get(e)}function yl(){return s(`clientToLogBufferMap`,()=>new WeakMap)}function bl(e){let t={};for(let[n,r]of Object.entries(e)){let e=xl(n);t[e]=r.type===`string`?{...r,value:xl(r.value)}:r}return t}function xl(e){let t=Object(e),n=t.isWellFormed,r=t.toWellFormed;return typeof n==`function`&&typeof r==`function`?n.call(e)?e:r.call(e):e}function Sl(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...eo()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Cl(e,t,n,r,i){let a={};return t!=null&&t.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=Kr(r)),Fa(a,[Sl(e,i)])}var wl=1e3;function Tl(e,t,n,r=!0){n&&(r||!(t in e))&&(e[t]=n)}function El(e,t){let n=Ml(),r=jl(e);r===void 0?n.set(e,[t]):r.length>=wl?(Al(e,r),n.set(e,[t])):n.set(e,[...r,t])}function Dl(e,t,n){var r;let{release:i,environment:a}=t.getOptions(),o={...e.attributes};Tl(o,`user.id`,n.id,!1),Tl(o,`user.email`,n.email,!1),Tl(o,`user.name`,n.username,!1),Tl(o,`sentry.release`,i),Tl(o,`sentry.environment`,a);let{name:s,version:c}=((r=t.getSdkMetadata())==null?void 0:r.sdk)??{};Tl(o,`sentry.sdk.name`,s),Tl(o,`sentry.sdk.version`,c);let l=t.getIntegrationByName(`Replay`),u=l==null?void 0:l.getReplayId(!0);return Tl(o,`sentry.replay_id`,u),u&&(l==null?void 0:l.getRecordingMode())===`buffer`&&Tl(o,`sentry._internal.replay_is_buffering`,!0),{...e,attributes:o}}function Ol(e,t,n,r){let[,i]=ll(t,n),a=F(n),o=a?a.spanContext().traceId:i==null?void 0:i.trace_id,s=a?a.spanContext().spanId:void 0,c=kt(),l=cl(c);return{timestamp:c,trace_id:o??``,span_id:s,name:e.name,type:e.type,unit:e.unit,value:e.value,attributes:{...rn(r),...rn(e.attributes,`skip-undefined`),[l.key]:l.value}}}function kl(e,t){let r=(t==null?void 0:t.scope)??A(),i=(t==null?void 0:t.captureSerializedMetric)??El,a=(r==null?void 0:r.getClient())??M();if(!a){n&&b.warn(`No client available to capture metric.`);return}let{beforeSendMetric:o}=a.getOptions(),{user:s,attributes:c}=fa(j(),r),l=Dl(e,a,s);a.emit(`processMetric`,l);let u=o?ya(n?"The `beforeSendMetric` callback threw an error, dropping the metric:":``,()=>o(l),()=>va):l;if(u===va){a.recordDroppedEvent(`callback_error`,`trace_metric`,1);return}if(!u){a.recordDroppedEvent(`before_send`,`trace_metric`,1),n&&b.log("`beforeSendMetric` returned `null`, will not send metric.");return}let d=Ol(u,a,r,c);n&&b.log(`[Metric]`,d),i(a,d),a.emit(`afterCaptureMetric`,u)}function Al(e,t){let n=t??jl(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Cl(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Ml().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function jl(e){return Ml().get(e)}function Ml(){return s(`clientToMetricBufferMap`,()=>new WeakMap)}function Nl(e,t){var n,r;if(e.type!==`transaction`||!((n=e.spans)!=null&&n.length)||!((r=e.sdkProcessingMetadata)!=null&&r.hasGenAiSpans)||L(t))return;let i=[],a=[];for(let t of e.spans){var o;(o=t.op)!=null&&o.startsWith(`gen_ai.`)?i.push(Ta(t)):a.push(t)}if(i.length!==0)return e.spans=a,ro(i,t)}var Pl=Symbol.for(`SentryBufferFullError`);function Fl(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return lc(Pl);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return cc(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>Pa(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var Il=6e4;function Ll(e,t=ze()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?Il:r-t}function Rl(e,t){return e[t]||e.all||0}function zl(e,t,n=ze()){return Rl(e,t)>n}function Bl(e,{statusCode:t,headers:n},r=ze()){let i={...e},a=n==null?void 0:n[`x-sentry-rate-limits`],o=n==null?void 0:n[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+Ll(o,r):t===429&&(i.all=r+6e4);return i}function Vl(e,t,r=Fl(e.bufferSize||64)){let i={},a=e=>r.drain(e);function o(t,[n,r],i){let a=qa(i);if(i===`transaction`){var o;e.recordDroppedEvent(t,`span`,(((o=r.spans)==null?void 0:o.length)??0)+1)}e.recordDroppedEvent(t,a,typeof n.item_count==`number`?n.item_count:1)}function s(e){let a=[];if(La(e,(e,t)=>{zl(i,qa(t))?o(`ratelimit_backoff`,e,t):a.push(e)}),a.length===0)return Promise.resolve({});let s=Fa(e[0],a),c=e=>{Ra(s,[`client_report`])?n&&b.warn(`Dropping client report. Will not send outcomes (reason: ${e}).`):La(s,(t,n)=>{o(e,t,n)})};return r.add(()=>t({body:Va(s)}).then(e=>e.statusCode===413?(n&&b.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),c(`send_error`),e):(n&&e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&b.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),i=Bl(i,e),e),e=>{throw c(`network_error`),n&&b.error(`Encountered error running transport request:`,e),e})).then(e=>e,e=>{if(e===Pl)return n&&b.error(`Skipped sending event because buffer is full.`),c(`queue_overflow`),Promise.resolve({});throw e})}return{send:s,flush:a}}function Hl(e,t,n){let r=[{type:`client_report`},{timestamp:n||St(),discarded_events:e}];return Fa(t?{dsn:t}:{},[r])}function Ul(e){var t;let{trace_id:n,parent_span_id:r,span_id:i,status:a,origin:o,data:s,op:c}=((t=e.contexts)==null?void 0:t.trace)??{};return{data:s??{},description:e.transaction,op:c,parent_span_id:r,span_id:i??``,start_timestamp:e.start_timestamp??0,status:a??`ok`,timestamp:e.timestamp,trace_id:n??``,origin:o,profile_id:s==null?void 0:s[Kn],exclusive_time:s==null?void 0:s[Vn],measurements:e.measurements,is_segment:!0}}function Wl(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}function Gl(e){var t;e.traceLifecycle===`stream`&&(e.beforeSendTransaction||(t=e.ignoreTransactions)!=null&&t.length)&&d(()=>{console.warn("[Sentry] `beforeSendTransaction` and `ignoreTransactions` are ignored with `traceLifecycle: 'stream'` (enabled by default). Use `beforeSendSpan` and `ignoreSpans` instead, or set `traceLifecycle: 'static'`.")})}var Kl={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},mcp:{inputs:!0,outputs:!0},databaseQueryData:!0,queues:!0,stackFrameVariables:!0,frameContextLines:5};function ql(e){return typeof e==`boolean`||`allow`in e||`deny`in e}function Jl(e){return e===void 0?{...Kl.httpHeaders}:ql(e)?{request:e,response:e}:{request:e.request??Kl.httpHeaders.request,response:e.response??Kl.httpHeaders.response}}function Yl(e){var t,n,r,i,a,o;let s=e.dataCollection??{};return{userInfo:s.userInfo??Kl.userInfo,cookies:s.cookies??Kl.cookies,httpHeaders:Jl(s.httpHeaders),httpBodies:s.httpBodies??Kl.httpBodies,urlQueryParams:s.urlQueryParams??Kl.urlQueryParams,graphQL:{document:((t=s.graphQL)==null?void 0:t.document)??Kl.graphQL.document,variables:((n=s.graphQL)==null?void 0:n.variables)??Kl.graphQL.variables},genAI:{inputs:((r=s.genAI)==null?void 0:r.inputs)??Kl.genAI.inputs,outputs:((i=s.genAI)==null?void 0:i.outputs)??Kl.genAI.outputs},mcp:{inputs:((a=s.mcp)==null?void 0:a.inputs)??Kl.mcp.inputs,outputs:((o=s.mcp)==null?void 0:o.outputs)??Kl.mcp.outputs},databaseQueryData:s.databaseQueryData??Kl.databaseQueryData,queues:s.queues??Kl.queues,stackFrameVariables:s.stackFrameVariables??Kl.stackFrameVariables,frameContextLines:s.frameContextLines??Kl.frameContextLines}}var Xl=`Not capturing exception because it's already been captured.`,Zl=`Discarded session because of missing or non-string release`,Ql=Symbol.for(`SentryInternalError`),$l=Symbol.for(`SentryDoNotSendEventError`),eu=5e3,tu=Symbol.for(`SentryClosedClient`);function nu(e){return tu in e}function ru(e){return{message:e,[Ql]:!0}}function iu(e){return{message:e,[$l]:!0}}function au(e){return iu(`Discarding event because it's not included in the random sample (sampling rate = ${e})`)}function ou(e){return Ce(e)&&Ql in e}function su(e){return Ce(e)&&$l in e}function cu(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)i(e);else if(!s){let t=e.getOptions()._flushInterval??eu;t>0&&(s=!0,o=Pa(setTimeout(()=>{i(e)},t)))}}),e.on(`flush`,()=>{i(e)})}var lu=class{constructor(e){var t;this._options={attachStacktrace:!0,...e,traceLifecycle:e.traceLifecycle===`static`?`static`:`stream`},this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Fl(((t=e.transportOptions)==null?void 0:t.bufferSize)??64),this._dataCollection=Yl(e),this._unhandledSessionStatus=`crashed`,e.dsn?this._dsn=Qr(e.dsn):n&&b.warn(`No DSN provided, client will not send events.`);let{beforeSendSpan:r,traceLifecycle:i}=this._options;if(n&&r&&Ca(r)!==(i===`static`)&&d(()=>{console.warn(`Ignoring \`beforeSendSpan\`: ${i===`static`?`wrap it with`:`remove`} \`Sentry.withStaticSpan\` to use it with \`traceLifecycle: "${i}"\`.`)}),this._dsn){let t=rl(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}cu(this,`afterCaptureLog`,`flushLogs`,mu,_l),cu(this,`afterCaptureMetric`,`flushMetrics`,pu,Al)}captureException(e,t,r){let i=lt();if(_t(e))return n&&b.log(Xl),i;let a={event_id:i,...t};return this._process(()=>this.eventFromException(e,a).then(e=>this._captureEvent(e,a,r)).then(e=>e),`error`),a.event_id}captureMessage(e,t,n,r){let i={event_id:lt(),...n},a=be(e)?e:String(e),o=xe(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,t,r){let i=lt();if(t!=null&&t.originalException&&_t(t.originalException))return n&&b.log(Xl),i;let a={event_id:i,...t},o=e.sdkProcessingMetadata||{},s=o.capturedSpanScope,c=o.capturedSpanIsolationScope,l=Xa(e.type);return this._process(()=>this._captureEvent(e,a,s||r,c),l),a.event_id}captureSession(e){this.sendSession(e),Mt(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){Object.defineProperty(this,tu,{value:!0});let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith(`Spotlight`)))&&(this._setupIntegrations(),Gl(this._options))}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),Zi(this,e,this._integrations),t||Xi(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=Nl(e,this),r=ic(e,this._dsn,this._options._metadata,this._options.tunnel);if(!yc(t))for(let e of t.attachments||[])r=Ia(r,Wa(e));n&&(r=Ia(r,n)),this.sendEnvelope(r).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:t,environment:r=$i}=this._options;if(`aggregates`in e){let i=e.attrs||{};if(!i.release&&!t){n&&b.warn(Zl);return}i.release=i.release||t,i.environment=i.environment||r,e.attrs=i}else{if(!e.release&&!t){n&&b.warn(Zl);return}e.release=e.release||t,e.environment=e.environment||r}this.emit(`beforeSendSession`,e);let i=rc(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(e,t,r=1){if(this._options.sendClientReports){let i=`${e}:${t}`;n&&b.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)try{let t=await this._transport.send(e);return this.emit(`afterEnvelope`,e),t}catch(e){return n&&b.error(`Error while sending envelope:`,e),{}}return n&&b.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=Yi(this,e),Xi(this,e)}_updateSessionFromEvent(e,t){var n;let r=t.level===`fatal`,i=!1,a=(n=t.exception)==null?void 0:n.values;if(a){i=!0,r=!1;for(let e of a){var o;if(((o=e.mechanism)==null?void 0:o.handled)===!1){r=!0;break}}}let s=e.status===`ok`;(s&&e.errors===0||s&&r)&&(Mt(e,{...r&&{status:this._unhandledSessionStatus},errors:e.errors||Number(i||r)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),xc(i,e,t,n,this,r).then(e=>{var r;return e===null||(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...(r=e.contexts)==null?void 0:r.trace,...pn(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:oa(this,n),...e.sdkProcessingMetadata}),e})}_captureEvent(e,t={},r=A(),i=j()){return n&&du(e)&&b.log(`Captured error event \`${bc(e)[0]||`<unknown>`}\``),this._processEvent(e,t,r,i).then(e=>e.event_id,e=>{n&&(su(e)?b.log(e.message):ou(e)?b.warn(e.message):b.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=fu(e),s=du(e),c=`before send for type \`${e.type||`error`}\``,l=`before_send`,u=0,d=a===void 0?void 0:$r(a),f=s&&typeof d==`number`&&Re()>d,p=Xa(e.type),m=0,h=n.getSession()||r.getSession();return f&&(h==null?void 0:h.status)!==`ok`?(this.recordDroppedEvent(`sample_rate`,`error`),lc(au(a))):this._prepareEvent(e,t,n,r).then(e=>{var n;if(e===null)throw iu("An event processor returned `null`, will not send event.");return m=((n=e.spans)==null?void 0:n.length)||0,yc(t)?e:uu(i,e,t,e=>{l=e},e=>{u=e})}).then(n=>{if(u&&this.recordDroppedEvent(`ignored`,`span`,u),!Se(n)||n===null)throw this.recordDroppedEvent(l,p),o&&this.recordDroppedEvent(l,`span`,1+m-u),n===null?iu(`${l===`ignored`?"Transaction matched `ignoreSpans`":`${c} ${l===`callback_error`?`threw an error`:"returned `null`"}`}, will not send event.`):ru(`${c} must return \`null\` or a valid event.`);if(s&&h&&this._updateSessionFromEvent(h,n),f)throw this.recordDroppedEvent(`sample_rate`,`error`),au(a);if(o){var r;let e=m-u-(((r=n.spans)==null?void 0:r.length)||0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let i=n.transaction_info;return o&&i&&n.transaction!==e.transaction&&(n.transaction_info={...i,source:`custom`}),this.sendEvent(n,t),n}).then(null,e=>{throw su(e)||ou(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),ru(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
10
|
+
Reason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===Pl&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){n&&b.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0){n&&b.log(`No outcomes to send`);return}if(!this._dsn){n&&b.log(`No dsn provided, will not send outcomes`);return}n&&b.log(`Sending outcomes:`,e);let t=Hl(e,this._options.tunnel&&Kr(this._dsn));this.sendEnvelope(t)}};function uu(e,t,r,i,a){let{beforeSend:o,ignoreSpans:s,beforeSendTransaction:c}=e,l=Ca(e.beforeSendSpan)&&e.beforeSendSpan,u=t;if(du(u)&&o){let e=u;return ya(n?"The `beforeSend` callback threw an error, dropping the event:":``,()=>o(e,r),()=>(i(`callback_error`),null))}if(fu(u)){if(l||s){let e=Ul(u);if(s!=null&&s.length&&Hi({description:e.description,op:e.op,attributes:e.data},s))return i(`ignored`),null;if(l&&(u=Ft(t,Wl(wa(e,l)))),u.spans){let e=[],t=u.spans;for(let n of t)s!=null&&s.length&&Hi({description:n.description,op:n.op,attributes:n.data},s)?Wi(t,n):l?e.push(wa(n,l)):e.push(n);a(t.length-e.length),u.spans=e}}if(c)return ya(n?"The `beforeSendTransaction` callback threw an error, dropping the event:":``,()=>c(u,r),()=>(i(`callback_error`),null))}return u}function du(e){return e.type===void 0}function fu(e){return e.type===`transaction`}function pu(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+hu(e.attributes)}function mu(e){let t=0;return e.message&&(t+=e.message.length*2),t+hu(e.attributes)}function hu(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*gu(e[0]):xe(e)?t+=gu(e):t+=100}),t}function gu(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function _u(e,t){t.debug===!0&&(n?b.enable():d(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),yu(),A().update(t.initialScope);let r=new e(t);return bu(r),r.init(),r}function vu(){let e=M();return e&&!nu(e)?e:void 0}function yu(){vu()&&d(()=>{console.warn("[Sentry] `Sentry.init()` was called more than once. The new client replaces the active client, but the active client is not closed, so state from both can mix. Call `Sentry.init()` only once, or call `await Sentry.close()` before you call it again.")})}function bu(e){A().setClient(e)}var xu=5e3,Su=36e5;function Cu(e){function t(...e){n&&b.log(`[Offline]:`,...e)}return n=>{let r=e(n);if(!n.createStore)throw Error("No `createStore` function was provided");let i=n.createStore(n),a=xu,o;function s(e,t,r){return Ra(e,[`client_report`])?!1:!n.shouldStore||n.shouldStore(e,t,r)}function c(e){o&&clearTimeout(o),o=Pa(setTimeout(async()=>{o=void 0;let e=await i.shift();e&&(t(`Attempting to send previously queued event`),e[0].sent_at=new Date(ze()).toISOString(),u(e,!0).catch(e=>{t(`Failed to retry sending`,e)}))},e))}function l(){o||(c(a),a=Math.min(a*2,Su))}async function u(e,o=!1){if(!o&&Ra(e,[`replay_event`,`replay_recording`]))return await i.push(e),c(100),{};try{if(n.shouldSend){let t=n.shouldSend(e);if((Ee(t)?await t:t)===!1)throw Error("Envelope not sent because `shouldSend` callback returned false")}let t=await r.send(e),i=100;if(t){var u,d;if((u=t.headers)!=null&&u[`retry-after`])i=Ll(t.headers[`retry-after`]);else if((d=t.headers)!=null&&d[`x-sentry-rate-limits`])i=6e4;else if((t.statusCode||0)>=400)return t}return c(i),a=xu,t}catch(n){let r=s(e,n,a);if(Ee(r)?await r:r)return o?await i.unshift(e):await i.push(e),l(),t(`Error sending. Event queued.`,n),{};throw n}}return n.flushAtStartup&&l(),{send:u,flush:e=>(e===void 0&&(a=xu,c(100)),r.flush(e))}}}var wu=`MULTIPLEXED_TRANSPORT_EXTRA_KEY`;function Tu(e,t){let n;return La(e,(e,r)=>(t.includes(r)&&(n=Array.isArray(e)?e[1]:void 0),!!n)),n}function Eu(e,t){return n=>{let r=e(n);return{...r,send:async e=>{let n=Tu(e,[`event`,`transaction`,`profile`,`replay_event`]);return n&&(n.release=t),r.send(e)}}}}function Du(e,t){return Fa(t?{...e[0],dsn:t}:e[0],e[1])}function Ou(e,t){return n=>{let r=e(n),i=new Map,a=t||(e=>{var t;let n=e.getEvent();return n!=null&&(t=n.extra)!=null&&t.MULTIPLEXED_TRANSPORT_EXTRA_KEY&&Array.isArray(n.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY)?n.extra.MULTIPLEXED_TRANSPORT_EXTRA_KEY:[]});function o(t,r){let a=r?`${t}:${r}`:t,o=i.get(a);if(!o){let s=qr(t);if(!s)return;let c=rl(s,n.tunnel);o=r?Eu(e,r)({...n,url:c}):e({...n,url:c}),i.set(a,o)}return[t,o]}async function s(e){function t(t){return Tu(e,t!=null&&t.length?t:[`event`])}let n=a({envelope:e,getEvent:t}).map(e=>typeof e==`string`?o(e,void 0):o(e.dsn,e.release)).filter(e=>!!e),i=n.length?n:[[``,r]];return(await Promise.all(i.map(([t,n])=>n.send(Du(e,t)))))[0]}async function c(e){let t=[...i.values(),r];return(await Promise.all(t.map(t=>t.flush(e)))).every(e=>e)}return{send:s,flush:c}}}var ku=`[Filtered]`,Au=[`auth`,`token`,`secret`,`session`,`password`,`passwd`,`pwd`,`key`,`jwt`,`bearer`,`sso`,`saml`,`csrf`,`xsrf`,`credentials`,`sid`,`identity`,`set-cookie`,`cookie`],ju=[`.sid`,`sessid`,`remember`,`oidc`,`pkce`,`nonce`,`__secure-`,`__host-`,`awsalb`,`awselb`,`akamai`,`__stripe`,`cognito`,`firebase`,`supabase`,`sb-`,`mfa`,`2fa`];function Mu(e,t){return t.some(t=>e.includes(t))}function Nu(e,t,n){if(t===!1)return!0;let r=e.toLowerCase();if(Mu(r,n==null?Au:[...Au,...n]))return!0;if(t===!0)return!1;let i=(`deny`in t?t.deny:t.allow).some(e=>r.includes(e.toLowerCase()));return`deny`in t?i:!i}function Pu(e,t,n){if(t===!1)return{};let r={};for(let i of Object.keys(e))r[i]=Nu(i,t,n)?ku:e[i];return r}function Fu(e,t){return(Array.isArray(e)?e:[e]).flatMap(e=>typeof e==`string`?t===`set-cookie`?Iu(e).map(e=>e.split(`;`)[0]):e.split(`;`):[]).map(e=>e.trim()).filter(e=>e!==``&&e!==`=`).map(e=>{let t=e.indexOf(`=`);return t===-1?[``,e]:[e.slice(0,t).trim(),e.slice(t+1).trim()]})}function Iu(e){return e.split(/,(?=[^;=,]*=)/)}function Lu(e){let t={};for(let[n,r]of e)t[n]===void 0&&(t[n]=n===``?ku:Ru(r));return t}function Ru(e){let t=e.length>1&&e.startsWith(`"`)&&e.endsWith(`"`)?e.slice(1,-1):e;try{return t.indexOf(`%`)===-1?t:decodeURIComponent(t)}catch{return t}}function zu(e,t,n){return t===!1?{}:Pu(Lu(Fu(e,n)),t,ju)}function Bu(e,t){if(e&&t!==!1)return e.split(`&`).map(e=>{let n=e.indexOf(`=`),r=n===-1?e:e.slice(0,n),i=new URLSearchParams(`${r}=`).keys().next().value;return i!==void 0&&Nu(i,t)?`${r}=${ku}`:e}).join(`&`)}function Vu(e,t){let n=e.indexOf(`#`),r=n===-1?e.length:n,i=e.indexOf(`?`);if(i===-1||i>r)return e;let a=e.slice(0,i),o=e.slice(i+1,r),s=e.slice(r),c=Bu(o,t);return c?`${a}?${c}${s}`:`${a}${s}`}function Hu(e){var t;return((t=e??M())==null?void 0:t.getDataCollectionOptions().urlQueryParams)??!0}function R(e,t){return e===void 0?void 0:Vu(e,Hu(t))}function Uu(e,t){return e?Bu(e,Hu(t)):void 0}var Wu=`thismessage:/`;function Gu(e){return`isRelative`in e}function Ku(e,t){let n=e.indexOf(`://`)<=0&&e.indexOf(`//`)!==0,r=t??(n?Wu:void 0);try{if(`canParse`in URL&&!URL.canParse(e,r))return;let t=new URL(e,r);return n?{isRelative:n,pathname:t.pathname,search:t.search,hash:t.hash}:t}catch{}}function qu(e){if(Gu(e))return e.pathname;let t=new URL(e);return t.search=``,t.hash=``,[`80`,`443`].includes(t.port)&&(t.port=``),t.password&&=`%filtered%`,t.username&&=`%filtered%`,t.toString()}function Ju(e){return(e==null?void 0:e.replace(/^\?/,``))||void 0}function Yu(e){return(e==null?void 0:e.replace(/^#/,``))||void 0}function Xu(e,t){try{return new URL(e,t).hostname||void 0}catch{return}}function Zu(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Qu(e){return e.split(/[?#]/,1)[0]}function $u(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function ed(e,t){let n=t==null?void 0:t.getDsn(),r=t==null?void 0:t.getOptions().tunnel;return nd(e,n)||td(e,r)}function td(e,t){return t?id(e)===id(t):!1}function nd(e,t){let n=Ku(e);return!n||Gu(n)||!t?!1:rd(n.hostname,t.host)&&/(^|&|\?)sentry_key=/.test(n.search)}function rd(e,t){return e===t||t.length>0&&e.endsWith(`.${t}`)}function id(e){return e[e.length-1]===`/`?e.slice(0,-1):e}function ad(e,...t){let n=e.map((t,n)=>t??e.raw[n]),r=new String(String.raw({raw:n},...t));return r.__sentry_template_string__=n.join(`\0`).replace(/%/g,`%%`).replace(/\0/g,`%s`),r.__sentry_template_values__=t,r}var od=ad;function sd(e){var t;let n=e?Qr(e):(t=M())==null?void 0:t.getDsn();return n?`/${ld(Kr(n)).toString(36)}`:void 0}function cd(e){let t=(e!=null&&e.startsWith(`./`)?e.slice(1):e??``).replace(/\/$/,``);return!t||t.startsWith(`/`)?t:`/${t}`}function ld(e){let t=0x811c9dc5;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function ud(e){if(`aggregates`in e){var t;((t=e.attrs)==null?void 0:t.ip_address)===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`})}else e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function dd(e,t,n=[t],r=`npm`){let a=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};a.name||(a.name=`sentry.javascript.${t}`,a.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:i})),a.version=i)}function fd(e={}){let t=e.client||M();if(!Jc()||!t)return{};let n=en(a());if(n.getTraceData)return n.getTraceData(e);let r=e.scope||A(),i=e.span||F(),o=na(i)&&!Bi(t.getOptions());if(!i&&ln())return{};let s=i&&!o?fi(i):pd(r),c=zr(i?sa(i):oa(t,r));if(!ei.test(s))return b.warn(`Invalid sentry-trace data. Cannot generate trace data`),{};let l={"sentry-trace":s,baggage:c};return e.propagateTraceparent&&(l.traceparent=i&&!o?pi(i):md(r)),l}function pd(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return ri(t,r,n)}function md(e){let{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return ii(t,r,n)}var hd=new WeakMap;function gd(e){let t=`${e.flags.replace(/[gy]/g,``)}${e.ignoreCase?``:`i`}`;if(t===e.flags)return e;let n=hd.get(e);if(n)return n;let r=new RegExp(e.source,t);return hd.set(e,r),r}function _d(e,t,n=!1){let r=e.toLowerCase();for(let i of t)if(ye(i)){let e=i.toLowerCase();if(n?r===e:r.includes(e))return!0}else if(Te(i)&&gd(i).test(e))return!0;return!1}var vd=100;function yd(e,t){let r=M(),i=j();if(!r)return;let{beforeBreadcrumb:a=null,maxBreadcrumbs:o=vd}=r.getOptions();if(o<=0)return;let s={timestamp:St(),...e},c=a?ya(n?"The `beforeBreadcrumb` callback threw an error, dropping the breadcrumb:":``,()=>d(()=>a(s,t)),()=>null):s;c!==null&&(r.emit&&r.emit(`beforeAddBreadcrumb`,c,t),i.addBreadcrumb(c,o))}var bd=`FunctionToString`,xd=new WeakMap,Sd=I((()=>({name:bd,setupOnce(){let e=Function.prototype.toString;try{Function.prototype.toString=function(...t){let n=Me(this),r;try{xd.has(M())&&n!==void 0&&(r=n)}catch{}return e.apply(r??this,t)}}catch{}},setup(e){xd.set(e,!0)}}))),Cd=[/^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$/,/Java object is gone$/],wd=`EventFilters`,Td=I((e={})=>{let t;return{name:wd,setup(n){t=Ed(e,n.getOptions())},processEvent(n,r,i){return t||=Ed(e,i.getOptions()),Dd(n,t)?null:n}}});function Ed(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Cd],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Dd(e,t){if(!e.type){if(Od(e,t.ignoreErrors))return n&&b.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
11
|
+
Event: ${dt(e)}`),!0;if(Pd(e))return n&&b.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
12
|
+
Event: ${dt(e)}`),!0;if(Ad(e,t.denyUrls))return n&&b.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
13
|
+
Event: ${dt(e)}.
|
|
14
|
+
Url: ${Nd(e)}`),!0;if(!jd(e,t.allowUrls))return n&&b.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
15
|
+
Event: ${dt(e)}.
|
|
16
|
+
Url: ${Nd(e)}`),!0}else if(e.type===`transaction`&&kd(e,t.ignoreTransactions))return n&&b.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
17
|
+
Event: ${dt(e)}`),!0;return!1}function Od(e,t){return t!=null&&t.length?bc(e).some(e=>at(e,t)):!1}function kd(e,t){if(!(t!=null&&t.length))return!1;let n=e.transaction;return n?at(n,t):!1}function Ad(e,t){if(!(t!=null&&t.length))return!1;let n=Nd(e);return n?at(n,t):!1}function jd(e,t){if(!(t!=null&&t.length))return!0;let n=Nd(e);return!n||at(n,t)}function Md(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function Nd(e){try{var t,r;let n=[...((t=e.exception)==null?void 0:t.values)??[]].reverse().find(e=>{var t,n;return((t=e.mechanism)==null?void 0:t.parent_id)===void 0&&((n=e.stacktrace)==null||(n=n.frames)==null?void 0:n.length)}),i=n==null||(r=n.stacktrace)==null?void 0:r.frames;return i?Md(i):null}catch{return n&&b.error(`Cannot extract url for event ${dt(e)}`),null}}function Pd(e){var t;return(t=e.exception)!=null&&(t=t.values)!=null&&t.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function Fd(e,t,n,r,i,a){var o;if(!((o=i.exception)!=null&&o.values)||!a||!k(a.originalException))return;let s=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;s&&(i.exception.values=Id(e,t,r,a.originalException,n,i.exception.values,s,0))}function Id(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(k(r[i])){zd(o,s,r);let a=e(t,r[i]),l=c.length;Bd(a,i,l,s),c=Id(e,t,n,r[i],i,[a,...c],a,l)}return Ld(r)&&r.errors.forEach((a,l)=>{if(k(a)){zd(o,s,r);let u=e(t,a),d=c.length;Bd(u,`errors[${l}]`,d,s),c=Id(e,t,n,a,i,[u,...c],u,d)}}),Rd(r)&&[`error`,`suppressed`].forEach(a=>{let l=r[a];if(k(l)){zd(o,s,r);let u=e(t,l),d=c.length;Bd(u,a,d,s),c=Id(e,t,n,l,i,[u,...c],u,d)}}),c}function Ld(e){return Array.isArray(e.errors)}function Rd(e){return`error`in e&&`suppressed`in e}function zd(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...Ld(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Bd(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function Vd(e){return k(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function Hd(e){return Vd(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var Ud=new Map,Wd=new Set;function Gd(e){if(r._sentryModuleMetadata)for(let t of Object.keys(r._sentryModuleMetadata)){let n=r._sentryModuleMetadata[t];if(Wd.has(t))continue;Wd.add(t);let i=e(t);for(let e of i.reverse())if(e.filename){Ud.set(e.filename,n);break}}}function Kd(e,t){return Gd(e),Ud.get(t)}function qd(e,t){var n;(n=t.exception)==null||(n=n.values)==null||n.forEach(t=>{var n;(n=t.stacktrace)==null||(n=n.frames)==null||n.forEach(t=>{if(!t.filename||t.module_metadata)return;let n=Kd(e,t.filename);n&&(t.module_metadata=n)})})}function Jd(e){var t;(t=e.exception)==null||(t=t.values)==null||t.forEach(e=>{var t;(t=e.stacktrace)==null||(t=t.frames)==null||t.forEach(e=>{delete e.module_metadata})})}var Yd=I(()=>({name:`ModuleMetadata`,setup(e){e.on(`beforeEnvelope`,e=>{La(e,(e,t)=>{if(t===`event`){let t=Array.isArray(e)?e[1]:void 0;t&&(Jd(t),e[1]=t)}})}),e.on(`applyFrameMetadata`,t=>{t.type||qd(e.getOptions().stackParser,t)})}})),Xd=new Set([]);function Zd(e){let t=`console`,n=O(t,e);return oe(t,ef),n}function Qd(e){for(let t of e)Xd.add(t);return()=>{for(let t of e)Xd.delete(t)}}var $d=new Set;function ef(){`console`in r&&c.forEach(function(e){!$d.has(e)&&e in r.console&&($d.add(e),ke(r.console,e,function(t){return u[e]=t,function(...t){let i=t[0],a=u[e],o=Xd.size&&typeof i==`string`&&at(i,Xd);o||se(`console`,{args:t,level:e}),(!o||n&&b.isEnabled())&&(a==null||a.apply(r.console,t))}}))})}function tf(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var nf=`CaptureConsole`,rf=I(((e={})=>{let t=e.levels||c,n=e.handled??!0;return{name:nf,setup(e){`console`in r&&Zd(({args:r,level:i})=>{M()===e&&t.includes(i)&&af(r,i,n)})}}}));function af(e,t,n){let r=tf(t),i=Error(),a={level:tf(t),extra:{arguments:e}};dn(o=>{if(o.addEventProcessor(e=>(e.logger=`console`,pt(e,{handled:n,type:`auto.core.capture_console`}),e)),t===`assert`){if(!e[0]){let t=`Assertion failed: ${rt(e.slice(1),` `)||`console.assert`}`;o.setExtra(`arguments`,e.slice(1)),o.captureMessage(t,r,{captureContext:a,syntheticException:i})}return}let s=e.find(e=>e instanceof Error);if(s){Mc(s,a);return}let c=rt(e,` `);o.captureMessage(c,r,{captureContext:a,syntheticException:i})})}var of=`Dedupe`,sf=I((()=>{let e;return{name:of,processEvent(t){if(t.type)return t;try{if(cf(t,e))return n&&b.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}));function cf(e,t){return t?!!(lf(e,t)||uf(e,t)):!1}function lf(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!ff(e,t)||!df(e,t))}function uf(e,t){let n=pf(t),r=pf(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!ff(e,t)||!df(e,t))}function df(e,t){let n=ne(e),r=ne(t);if(!n||!r)return!n&&!r;if(r.length!==n.length)return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function ff(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n||!r)return!n&&!r;try{return n.join(``)===r.join(``)}catch{return!1}}function pf(e){var t;return(t=e.exception)==null||(t=t.values)==null?void 0:t[0]}var mf=`ExtraErrorData`,hf=I(((e={})=>{let{depth:t=3,captureErrorCause:n=!0}=e;return{name:mf,processEvent(e,r,i){let{maxValueLength:a}=i.getOptions();return gf(e,r,t,n,a)}}}));function gf(e,t={},n,r,i){if(!t.originalException||!k(t.originalException))return e;let a=t.originalException.name||t.originalException.constructor.name,o=_f(t.originalException,r,i);if(o){let t={...e.contexts},r=qe(o,n);return Se(r)&&(He(r),t[a]=r),{...e,contexts:t}}return e}function _f(e,t,r){try{let n=[`name`,`message`,`stack`,`line`,`column`,`fileName`,`lineNumber`,`columnNumber`,`toJSON`],i={};for(let t of Object.keys(e)){if(n.indexOf(t)!==-1)continue;let a=e[t];i[t]=k(a)||typeof a==`string`?r?tt(`${a}`,r):`${a}`:a}if(t&&e.cause!==void 0&&(i.cause=k(e.cause)?{[e.cause.name||e.cause.constructor.name]:_f(e.cause,!1,r)}:e.cause),typeof e.toJSON==`function`){let t=e.toJSON();for(let e of Object.keys(t)){let n=t[e];i[e]=k(n)?n.toString():n}}return i}catch(e){n&&b.error(`Unable to extract extra data from the Error object:`,e)}return null}function vf(e,t){let n=0;for(let t=e.length-1;t>=0;t--){let r=e[t];r===`.`?e.splice(t,1):r===`..`?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;)e.unshift(`..`);return e}var yf=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function bf(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=yf.exec(t);return n?n.slice(1):[]}function xf(...e){let t=``,n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let i=r>=0?e[r]:`/`;i&&(t=`${i}/${t}`,n=i.charAt(0)===`/`)}return t=vf(t.split(`/`).filter(e=>!!e),!n).join(`/`),(n?`/`:``)+t||`.`}function Sf(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 Cf(e,t){e=xf(e).slice(1),t=xf(t).slice(1);let n=Sf(e.split(`/`)),r=Sf(t.split(`/`)),i=Math.min(n.length,r.length),a=i;for(let e=0;e<i;e++)if(n[e]!==r[e]){a=e;break}let o=[];for(let e=a;e<n.length;e++)o.push(`..`);return o=o.concat(r.slice(a)),o.join(`/`)}function wf(e,t){let n=bf(e)[2]||``;return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}var Tf=`RewriteFrames`,Ef=I((e={})=>{let t=e.root,n=e.prefix||`app:///`,i=`window`in r&&!!r.window,a=e.iteratee||Df({isBrowser:i,root:t,prefix:n});function o(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map(e=>({...e,...e.stacktrace&&{stacktrace:s(e.stacktrace)}}))}}}catch{return e}}function s(e){var t;return{...e,frames:e==null||(t=e.frames)==null?void 0:t.map(e=>a(e))}}return{name:Tf,processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=o(t)),t}}});function Df({isBrowser:e,root:t,prefix:n}){return r=>{if(!r.filename)return r;let i=/^[a-zA-Z]:\\/.test(r.filename)||r.filename.includes(`\\`)&&!r.filename.includes(`/`),a=/^\//.test(r.filename);if(e){if(t){let e=r.filename;e.indexOf(t)===0&&(r.filename=e.replace(t,n))}}else if(i||a){let e=i?r.filename.replace(/^[a-zA-Z]:/,``).replace(/\\/g,`/`):r.filename;r.filename=`${n}${t?Cf(t,e):wf(e)}`}return r}}var Of=[`reauthenticate`,`signInAnonymously`,`signInWithOAuth`,`signInWithIdToken`,`signInWithOtp`,`signInWithPassword`,`signInWithSSO`,`signOut`,`signUp`,`verifyOtp`],kf=[`createUser`,`deleteUser`,`listUsers`,`getUserById`,`updateUserById`,`inviteUserByEmail`],Af={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`},jf=[`select`,`insert`,`upsert`,`update`,`delete`];function Mf(e){try{e.__SENTRY_INSTRUMENTED__=!0}catch{}}function Nf(e){try{return e.__SENTRY_INSTRUMENTED__}catch{return!1}}function Pf(e,t){if(Object.keys(t).length>0)return t;if(Array.isArray(e)&&e.length>0)return e}function Ff(e,t){return Pf(e,t)!==void 0}function If(e,t){if(!e)return;if(typeof e.get==`function`)return e.get(t)??void 0;let n=e,r=t.toLowerCase(),i=Object.keys(n).find(e=>e.toLowerCase()===r);return i===void 0?void 0:n[i]}function Lf(e,t={}){switch(e){case`GET`:case`QUERY`:return`select`;case`POST`:var n;return(n=If(t,`Prefer`))!=null&&n.includes(`resolution=`)?`upsert`:`insert`;case`PATCH`:return`update`;case`DELETE`:return`delete`;default:return`<unknown-op>`}}function Rf(e,t){if(t===``||t===`*`)return`select(*)`;if(e===`select`)return`select(${t})`;if(e===`or`||e.endsWith(`.or`))return`${e}${t}`;let[n,...r]=t.split(`.`),i;return i=n!=null&&n.startsWith(`fts`)?`textSearch`:n!=null&&n.startsWith(`plfts`)?`textSearch[plain]`:n!=null&&n.startsWith(`phfts`)?`textSearch[phrase]`:n!=null&&n.startsWith(`wfts`)?`textSearch[websearch]`:n&&Af[n]||`filter`,`${i}(${e}, ${r.join(`.`)})`}function zf(e,t=!1){return new Proxy(e,{apply(n,r,i){let a=`auth${t?`.admin`:``}.${e.name}`,o=M();return No({name:o&&L(o)?a:`auth ${t?`(admin) `:``}${e.name}`,attributes:{[N]:`auto.db.supabase`,[Gn]:`db`,[Tn]:`postgresql`,[wn]:a}},e=>Reflect.apply(n,r,i).then(t=>(Ce(t)&&`error`in t&&t.error?(e.setStatus({code:2}),Mc(t.error,{mechanism:{handled:!1,type:`auto.db.supabase.auth`}})):e.setStatus({code:1}),e.end(),t)).catch(t=>{throw e.setStatus({code:2}),e.end(),Mc(t,{mechanism:{handled:!1,type:`auto.db.supabase.auth`}}),t}).then(...i))}})}function Bf(e){let t=e.auth;if(t&&!Nf(e.auth)){for(let n of Of){let r=t[n];r&&typeof e.auth[n]==`function`&&(e.auth[n]=zf(r))}for(let n of kf){let r=t.admin[n];r&&typeof e.auth.admin[n]==`function`&&(e.auth.admin[n]=zf(r,!0))}Mf(e.auth)}}function Vf(e,t){Nf(e.prototype.from)||(e.prototype.from=new Proxy(e.prototype.from,{apply(e,n,r){let i=Reflect.apply(e,n,r);return Uf(i.constructor,t),i}}),Mf(e.prototype.from))}function Hf(e,t){Nf(e.prototype.then)||(e.prototype.then=new Proxy(e.prototype.then,{apply(e,n,r){var i;let a=jf,o=n,s=Lf(o.method,o.headers);if(!a.includes(s)||!(o!=null&&(i=o.url)!=null&&i.pathname)||typeof o.url.pathname!=`string`)return Reflect.apply(e,n,r);let c=o.url.pathname.split(`/`),l=c.length>0?c[c.length-1]:``,u=[];for(let[e,t]of o.url.searchParams.entries())u.push(Rf(e,t));let d=Object.create(null);if(Se(o.body))for(let[e,t]of Object.entries(o.body))d[e]=t;let f=M(),p=t.sendOperationData??(f==null?void 0:f.getDataCollectionOptions().databaseQueryData)===!0,m=Pf(o.body,d),h=s===`select`?``:`${s}${Ff(o.body,d)?`(...) `:``}`,g=p?u.join(` `):u.length>0?`[redacted]`:``,_=[h.trimEnd(),g].filter(Boolean).join(` `),v=_?`${_} from(${l})`:`from(${l})`,y=f&&L(f)?`${s}${l?` ${l}`:``}`:v,b={"db.table":l,"db.schema":o.schema,"db.url":o.url.origin,"db.sdk":If(o.headers,`X-Client-Info`),[Tn]:`postgresql`,[wn]:s,[N]:`auto.db.supabase`,[Gn]:`db`};return u.length&&p&&(b[`db.query`]=u),m!==void 0&&p&&(b[`db.body`]=m),No({name:y,attributes:b},t=>Reflect.apply(e,n,[]).then(e=>{if(t&&(e&&typeof e==`object`&&`status`in e&&Or(t,e.status||500),t.end()),e!=null&&e.error){let t=Error(e.error.message);e.error.code&&(t.code=e.error.code),e.error.details&&(t.details=e.error.details);let n={};u.length&&p&&(n.query=u),m!==void 0&&p&&(n.body=m),Mc(t,e=>(e.addEventProcessor(e=>(pt(e,{handled:!1,type:`auto.db.supabase.postgres`}),e)),e.setContext(`supabase`,n),e))}let n={type:`supabase`,category:`db.${s}`,message:v},r={};return u.length&&p&&(r.query=u),m!==void 0&&p&&(r.body=m),Object.keys(r).length&&(n.data=r),yd(n),e},e=>{throw t&&(Or(t,500),t.end()),e}).then(...r))}}),Mf(e.prototype.then))}function Uf(e,t){for(let r of jf)Nf(e.prototype[r])||(e.prototype[r]=new Proxy(e.prototype[r],{apply(e,i,a){let o=Reflect.apply(e,i,a),s=o.constructor;return n&&b.log(`Instrumenting ${r} operation's PostgRESTFilterBuilder`),Hf(s,t),o}}),Mf(e.prototype[r]))}var Wf=(e,t={})=>{e?(Vf(e.constructor===Function?e:e.constructor,t),Bf(e)):n&&b.warn(`Supabase integration was not installed because no Supabase client was provided.`)},Gf=`Supabase`,Kf=((e,t)=>({setupOnce(){Wf(e,t)},name:Gf})),qf=I(e=>Kf(e.supabaseClient,{sendOperationData:e.sendOperationData})),Jf=10,Yf=`ZodErrors`;function Xf(e){return k(e)&&e.name===`ZodError`&&Array.isArray(e.issues)}function Zf(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 Qf(e){return e.map(e=>typeof e==`number`?`<array>`:e).join(`.`)}function $f(e){let t=new Set;for(let n of e.issues){let e=Qf(n.path);e.length>0&&t.add(e)}let n=Array.from(t);if(n.length===0){let t=`variable`;if(e.issues.length>0){let n=e.issues[0];n!==void 0&&`expected`in n&&typeof n.expected==`string`&&(t=n.expected)}return`Failed to validate ${t}`}return`Failed to validate keys: ${tt(n.join(`, `),100)}`}function ep(e,t=!1,n,r){var i;if(!((i=n.exception)!=null&&i.values)||!r.originalException||!Xf(r.originalException)||r.originalException.issues.length===0)return n;try{let i=(t?r.originalException.issues:r.originalException.issues.slice(0,e)).map(Zf);return t&&(Array.isArray(r.attachments)||(r.attachments=[]),r.attachments.push({filename:`zod_issues.json`,data:JSON.stringify({issues:i})})),{...n,exception:{...n.exception,values:[{...n.exception.values[0],value:$f(r.originalException)},...n.exception.values.slice(1)]},extra:{...n.extra,"zoderror.issues":i.slice(0,e)}}}catch(e){return{...n,extra:{...n.extra,"zoderrors sentry integration parse error":{message:`an exception was thrown while processing ZodError within applyZodErrorsToEvent()`,error:e instanceof Error?`${e.name}: ${e.message}
|
|
18
|
+
${e.stack}`:`unknown`}}}}}var tp=I(((e={})=>{let t=e.limit??Jf;return{name:Yf,processEvent(n,r){return ep(t,e.saveZodIssuesAsAttachment,n,r)}}})),np=I(e=>{let t=e.ignoreSentryInternalFrames??!1;return{name:`ThirdPartyErrorsFilter`,setup(e){e.on(`beforeEnvelope`,e=>{La(e,(e,t)=>{if(t===`event`){let t=Array.isArray(e)?e[1]:void 0;t&&(Jd(t),e[1]=t)}})}),e.on(`applyFrameMetadata`,t=>{t.type||qd(e.getOptions().stackParser,t)})},preprocessEvent(e){t&&(r._sentryWrappedDepth??0)>0&&(e.sdkProcessingMetadata={...e.sdkProcessingMetadata,insideSentryWrapped:!0})},processEvent(n){var r,i;let a=t?((r=n.sdkProcessingMetadata)==null?void 0:r.insideSentryWrapped)===!0&&((i=n.exception)==null||(i=i.values)==null?void 0:i.length)===1:!1,o=ip(n,t,a);if(o&&o[e.behaviour===`drop-error-if-contains-third-party-frames`||e.behaviour===`apply-tag-if-contains-third-party-frames`?`some`:`every`](t=>!t.some(t=>e.filterKeys.includes(t)))){if(e.behaviour===`drop-error-if-contains-third-party-frames`||e.behaviour===`drop-error-if-exclusively-contains-third-party-frames`)return null;n.tags={...n.tags,third_party_code:!0}}return n}}});function rp(e,t,n){if(t!==0)return!1;if(n&&ap(e)||e.function===`sentryWrapped`)return!0;if(!e.context_line||!e.filename||!e.filename.includes(`sentry`)||!e.filename.includes(`helpers`)||!e.context_line.includes(cp))return!1;if(e.pre_context){let t=e.pre_context.length;for(let n=0;n<t;n++){var r;if((r=e.pre_context[n])!=null&&r.includes(sp))return!0}}return!1}function ip(e,t,n){let r=ne(e);if(r)return r.filter((e,r)=>!e.filename||e.lineno==null&&e.colno==null&&e.instruction_addr==null?!1:!t||!rp(e,r,!!n)).map(e=>e.module_metadata?Object.keys(e.module_metadata).filter(e=>e.startsWith(op)).map(e=>e.slice(op.length)):[])}function ap(e){return!e.context_line&&!e.pre_context&&!!e.function&&e.function.length<=2}var op=`_sentryBundlerPluginAppKey:`,sp=`Attempt to invoke user-land function`,cp=`fn.apply(this, wrappedArguments)`,lp=`Console`,up=I((e={})=>{let t=new Set(e.levels||c);return{name:lp,setup(n){let r=Zd(({args:e,level:r})=>{M()===n&&t.has(r)&&dp(r,e)});if(n.registerCleanup(r),e.filter){let t=Qd(e.filter);n.registerCleanup(t)}}}});function dp(e,t){let n={category:`console`,data:{arguments:t,logger:`console`},level:tf(e),message:fp(t)};if(e===`assert`){if(t[0]===!1){let e=t.slice(1);n.message=e.length>0?`Assertion failed: ${fp(e)}`:`Assertion failed`,n.data.arguments=e}else return}yd(n,{input:t,level:e})}function fp(e){return`util`in r&&typeof r.util.format==`function`?r.util.format(...e):rt(e,` `)}var pp=`flag.evaluation.`;function mp(e){if(e.type)return e;let t=A().getScopeData().contexts.flags,n=t?t.values:[];return n.length&&(e.contexts===void 0&&(e.contexts={}),e.contexts.flags={values:[...n]}),e}function hp(e,t,n=100){let r=A().getScopeData().contexts;r.flags||={values:[]},gp(r.flags.values,e,t,n)}function gp(e,t,r,i){if(typeof r!=`boolean`)return;if(e.length>i){n&&b.error(`[Feature Flags] insertToFlagBuffer called on a buffer larger than maxSize=${i}`);return}let a=e.findIndex(e=>e.flag===t);a!==-1&&e.splice(a,1),e.length===i&&e.shift(),e.push({flag:t,result:r})}function _p(e,t,n=10){if(typeof t!=`boolean`)return;let r=F();if(!r)return;let i=yi(r).data;(`${pp}${e}`in i||Object.keys(i).filter(e=>e.startsWith(pp)).length<n)&&r.setAttribute(`${pp}${e}`,t)}var vp=I(()=>({name:`FeatureFlags`,processEvent(e,t,n){return mp(e)},addFeatureFlag(e,t){hp(e,t),_p(e,t)}})),yp=I(({growthbookClass:e})=>({name:`GrowthBook`,setupOnce(){let t=e.prototype;typeof t.isOn==`function`&&ke(t,`isOn`,bp),typeof t.getFeatureValue==`function`&&ke(t,`getFeatureValue`,bp)},processEvent(e,t,n){return mp(e)}}));function bp(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n==`string`&&typeof r==`boolean`&&(hp(n,r),_p(n,r)),r}}var xp=`ConversationId`,Sp=I((()=>({name:xp,setup(e){e.on(`spanStart`,e=>{let t=A().getScopeData(),n=j().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=yi(e);if(!(t!=null&&t.startsWith(`gen_ai.`))&&!n[`ai.operationId`]&&!(i!=null&&i.startsWith(`ai.`)))return;e.setAttribute(En,r)}})}})));function Cp(e,t,n,r,i){if(!e.fetchData)return;let{method:a,url:o}=e.fetchData,s=Bi()&&t(o);if(e.endTimestamp){let t=e.fetchData.__span;if(!t)return;let n=r[t];n&&(s&&(Ep(n,e),wp(n,e,i)),delete r[t]);return}let{spanOrigin:c=`auto.http.browser`,propagateTraceparent:l=!1,urlBase:u}=i??{},d=M(),f=!!F(),p=f||!!d&&L(d),m=s&&p?Po(Ap(o,a,c,d,u)):new ta,h=Yo(m)&&f?void 0:m;if(s&&!p&&(d==null||d.recordDroppedEvent(`no_parent_span`,`span`)),e.fetchData.__span=m.spanContext().spanId,r[m.spanContext().spanId]=m,n(e.fetchData.url)){let t=e.args[0],n={...e.args[1]||{}},r=Tp(t,n,Bi()&&p?h:void 0,l);r&&(e.args[1]=n,n.headers=r)}if(d){let t={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};d.emit(`beforeOutgoingRequestSpan`,m,t)}return m}function wp(e,t,n){var r,i;n==null||(r=n.onRequestSpanEnd)==null||r.call(n,e,{headers:(i=t.response)==null?void 0:i.headers,error:t.error})}function Tp(e,t,n,r){let i=fd({span:n,propagateTraceparent:r}),a=i[`sentry-trace`],o=i.baggage,s=i.traceparent;if(!a)return;let c=t.headers||(Oe(e)?e.headers:void 0);if(!c)return{"sentry-trace":a,...o&&{baggage:o},...s&&{traceparent:s}};if(Op(c)){let e=new Headers(c);if(e.get(`sentry-trace`)||e.set(`sentry-trace`,a),r&&s&&!e.get(`traceparent`)&&e.set(`traceparent`,s),o){let t=e.get(`baggage`);t?Dp(t)||e.set(`baggage`,`${t},${o}`):e.set(`baggage`,o)}return e}if(kp(c)){let e=[...c];e.find(e=>e[0]===`sentry-trace`)||e.push([`sentry-trace`,a]),r&&s&&!e.find(e=>e[0]===`traceparent`)&&e.push([`traceparent`,s]);let t=c.find(e=>e[0]===`baggage`&&typeof e[1]==`string`&&Dp(e[1]));return o&&!t&&e.push([`baggage`,o]),e}{let e=`sentry-trace`in c?c[`sentry-trace`]:void 0,t=`traceparent`in c?c.traceparent:void 0,n=`baggage`in c?c.baggage:void 0,i=n?Array.isArray(n)?[...n]:[n]:[],l=n&&(Array.isArray(n)?n.find(e=>Dp(e)):Dp(n));o&&!l&&i.push(o);let u=Object.assign({},c,{"sentry-trace":e??a,...i.length>0&&{baggage:i.join(`,`)}});return r&&s&&!t&&(u.traceparent=s),u}}function Ep(e,t){if(t.response){var n;Or(e,t.response.status);let r=(n=t.response)==null||(n=n.headers)==null?void 0:n.get(`content-length`);if(r){let t=parseInt(r);t>0&&e.setAttribute(Mn,t)}}else t.error&&e.setStatus({code:2,message:`internal_error`});e.end()}function Dp(e){return typeof e==`string`&&e.split(`,`).some(e=>e.trim().startsWith(Lr))}function Op(e){return typeof Headers<`u`&&De(e,Headers)}function kp(e){return Array.isArray(e)?e.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]==`string`):!1}function Ap(e,t,n,r,i){let a=!!r&&L(r),o=Xu(e,i);if(e.startsWith(`data:`)){let i=$u(e);return{name:a?t:`${t} ${i}`,attributes:jp(e,void 0,t,n,r,o)}}let s=Ku(e),c=s?qu(s):e;return{name:a?o?`${t} ${o}`:t:`${t} ${c}`,attributes:jp(e,s,t,n,r,o)}}function jp(e,t,n,r,i,a){let o={[cr]:R($u(e),i),type:`fetch`,[An]:n,[N]:r,[Gn]:Ks,[or]:a};return t&&(Gu(t)||(o[cr]=R($u(t.href),i),o[rr]=t.hostname,o[ir]=t.port?Number(t.port):void 0),o[ur]=Uu(Ju(t.search),i),o[sr]=Yu(t.hash)),o}var Mp=r;function Np(){if(!(`fetch`in Mp))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function Pp(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Fp(){if(typeof EdgeRuntime==`string`)return!0;if(!Np())return!1;if(Pp(Mp.fetch))return!0;let e=!1,t=Mp.document;if(t&&typeof t.createElement==`function`)try{var r;let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),(r=n.contentWindow)!=null&&r.fetch&&(e=Pp(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){n&&b.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function Ip(e){let t=`fetch`,n=O(t,e);return oe(t,()=>Rp()),n}function Lp(e){let t=`fetch-body-resolved`,n=O(t,e);return oe(t,()=>Rp(Bp)),n}function Rp(e){(!eo()||Fp())&&ke(r,`fetch`,function(t){return new Proxy(t,{apply(t,n,i){let a=Error(),{method:o,url:s}=Up(i),c={args:i,fetchData:{method:o,url:s},startTimestamp:kt()*1e3,virtualError:a,headers:Wp(i)};return e||se(`fetch`,{...c}),Reflect.apply(t,r,i).then(async t=>(e?e(t):se(`fetch`,{...c,endTimestamp:kt()*1e3,response:t}),t),e=>{se(`fetch`,{...c,endTimestamp:kt()*1e3,error:e}),k(e)&&e.stack===void 0&&(e.stack=a.stack,Ae(e,`framesToPop`,1));let t=M(),n=(t==null?void 0:t.getOptions().enhanceFetchErrorMessages)??`always`;if(n!==!1&&k(e)&&e.name===`TypeError`&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{var i;let t=new URL(c.fetchData.url,(i=r.location)==null?void 0:i.href).host;t&&(n===`always`?e.message=`${e.message} (${t})`:Ae(e,`__sentry_fetch_url_host__`,t))}catch{}throw e})}})})}async function zp(e,t){if(e!=null&&e.body){let n=e.body,r=n.getReader(),i=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4),a=!0;for(;a;){let e;try{e=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);let{done:i}=await r.read();clearTimeout(e),i&&(t(),a=!1)}catch{a=!1}finally{clearTimeout(e)}}clearTimeout(i),r.releaseLock(),n.cancel().then(null,()=>{})}}function Bp(e){let t;try{t=e.clone()}catch{return}zp(t,()=>{se(`fetch-body-resolved`,{endTimestamp:kt()*1e3,response:e})})}function Vp(e,t){return Ce(e)&&!!e[t]}function Hp(e){return typeof e==`string`?e:e?Vp(e,`url`)?e.url:e.toString?e.toString():``:``}function Up(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:Hp(t),method:Vp(n,`method`)?String(n.method).toUpperCase():Oe(t)&&Vp(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:Hp(t),method:Vp(t,`method`)?String(t.method).toUpperCase():`GET`}}function Wp(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(Oe(t))return new Headers(t.headers)}catch{}}function Gp(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var Kp=class{constructor(e){this._maxSize=e,this._cache=new Map}get size(){return this._cache.size}get(e){let t=this._cache.get(e);if(t!==void 0)return this._cache.delete(e),this._cache.set(e,t),t}set(e,t){if(this._cache.delete(e),this._cache.size>=this._maxSize){let e=this._cache.keys().next().value;this._cache.delete(e)}this._cache.set(e,t)}remove(e){let t=this._cache.get(e);return t&&this._cache.delete(e),t}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){let e=[];return this._cache.forEach(t=>e.push(t)),e}};function qp(e,t={},n=A()){let{message:r,name:i,email:a,url:o,source:s,associatedEventId:c,tags:l}=e,u={contexts:{feedback:{contact_email:a,name:i,message:r,url:o,source:s,associated_event_id:c}},type:`feedback`,level:`info`,tags:l},d=(n==null?void 0:n.getClient())||M();return d&&d.emit(`beforeSendFeedback`,u,t),n.captureEvent(u,t)}var Jp=e({debug:()=>Zp,error:()=>em,fatal:()=>tm,fmt:()=>od,info:()=>Qp,trace:()=>Xp,warn:()=>$p});function Yp(e,t,n,r,i){gl({level:e,message:t,attributes:n,severityNumber:i},r)}function Xp(e,t,{scope:n}={}){Yp(`trace`,e,t,n)}function Zp(e,t,{scope:n}={}){Yp(`debug`,e,t,n)}function Qp(e,t,{scope:n}={}){Yp(`info`,e,t,n)}function $p(e,t,{scope:n}={}){Yp(`warn`,e,t,n)}function em(e,t,{scope:n}={}){Yp(`error`,e,t,n)}function tm(e,t,{scope:n}={}){Yp(`fatal`,e,t,n)}function nm(e,t,n){return`util`in r&&typeof r.util.format==`function`?r.util.format(...e):rm(e,t,n)}function rm(e,t,n){return e.map(e=>xe(e)?String(e):JSON.stringify(qe(e,t,n))).join(` `)}function im(e){return/%[sdifocO]/.test(e)}function am(e,t){let n={};return n[`sentry.message.template`]=`${e} ${Array(t.length).fill(`{}`).join(` `)}`,t.forEach((e,t)=>{n[`sentry.message.parameter.${t}`]=e}),n}var om=`ConsoleLogs`,sm={[N]:`auto.log.console`},cm=I(((e={})=>{let t=e.levels||c;return{name:om,setup(e){let{normalizeDepth:n=3,normalizeMaxBreadth:r=1e3}=e.getOptions(),i=Zd(({args:i,level:a})=>{if(M()!==e||!t.includes(a))return;let o=i[0],s=i.slice(1);if(a===`assert`){o||gl({level:`error`,message:s.length>0?`Assertion failed: ${nm(s,n,r)}`:`Assertion failed`,attributes:sm});return}let c=a===`log`,l={...sm};if(Se(o)){Object.assign(l,qe(o,n,r));let e=typeof i[1]==`string`?2:1;i.slice(e).forEach((e,t)=>{l[`sentry.message.parameter.${t}`]=qe(e,n,r)})}else if(s.length>0&&typeof o==`string`&&!im(o)){let e=am(o,s);for(let[t,i]of Object.entries(e))l[t]=t.startsWith(`sentry.message.parameter.`)?qe(i,n,r):i}gl({level:c?`info`:a,message:nm(i,n,r),severityNumber:c?10:void 0,attributes:l})});e.registerCleanup(i)}}})),lm=e({count:()=>dm,distribution:()=>pm,gauge:()=>fm});function um(e,t,n,r){kl({type:e,name:t,value:n,unit:r==null?void 0:r.unit,attributes:r==null?void 0:r.attributes},{scope:r==null?void 0:r.scope})}function dm(e,t=1,n){um(`counter`,e,t,n)}function fm(e,t,n){um(`gauge`,e,t,n)}function pm(e,t,n){um(`distribution`,e,t,n)}var mm=[`trace`,`debug`,`info`,`warn`,`error`,`fatal`];function hm(e={}){let t=new Set(e.levels??mm),n=e.client;return{log(e){let{type:r,level:i,message:a,args:o,tag:s,date:c,...l}=e,u=n||M();if(!u)return;let d=vm(r,i);if(!t.has(d))return;let{normalizeDepth:f=3,normalizeMaxBreadth:p=1e3}=u.getOptions(),m={};for(let[e,t]of Object.entries(l))m[e]=qe(t,f,p);m[`sentry.origin`]=`auto.log.consola`,s&&(m[`consola.tag`]=s),r&&(m[`consola.type`]=r),i!=null&&typeof i==`number`&&(m[`consola.level`]=i);let h=bm(ym(o,f,p),f,p);h!=null&&h.attributes&&Object.assign(m,h.attributes),gl({level:d,message:(h==null?void 0:h.message)||a||o&&nm(o,f,p)||``,attributes:m})}}}var gm={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`},_m={0:`fatal`,1:`warn`,2:`info`,3:`info`,4:`debug`,5:`trace`};function vm(e,t){if(e===`verbose`)return`debug`;if(e===`silent`)return`trace`;if(e){let t=gm[e];if(t)return t}if(typeof t==`number`){let e=_m[t];if(e)return e}return`info`}function ym(e,t,n){if(!(e!=null&&e.length))return{message:``};let r=nm(e,t,n),i=e[0];if(Se(i)){let t=typeof e[1]==`string`?2:1;return{message:r,attributes:i,messageParameters:e.slice(t)}}{let t=e.slice(1),n=t.length>0&&typeof i==`string`&&!im(i);return{message:r,messageTemplate:n?i:void 0,messageParameters:n?t:void 0}}}function bm(e,t,n){let{message:r,attributes:i,messageTemplate:a,messageParameters:o}=e,s={};if(a&&o){let e=am(a,o);for(let[r,i]of Object.entries(e))s[r]=r.startsWith(`sentry.message.parameter.`)?qe(i,t,n):i}else o&&o.length>0&&o.forEach((e,r)=>{s[`sentry.message.parameter.${r}`]=qe(e,t,n)});return{message:r,attributes:{...qe(i,t,n),...s}}}var xm=r,z=xm.document,Sm=xm.navigator,Cm=`Report a Bug`,wm=`Cancel`,Tm=`Send Bug Report`,Em=`Confirm`,Dm=`Report a Bug`,Om=`your.email@example.org`,km=`Email`,Am=`What's the bug? What did you expect?`,jm=`Description`,Mm=`Your Name`,Nm=`Name`,Pm=`Thank you for your report!`,Fm=`(required)`,Im=`Add a screenshot`,Lm=`Remove screenshot`,Rm=`Highlight`,zm=`Hide`,Bm=`Remove`,Vm=`Unable to submit feedback with empty message`,Hm=`No client setup, cannot send feedback.`,Um=`Unable to determine if Feedback was correctly sent.`,Wm=`Unable to send feedback. This could be because this domain is not in your list of allowed domains.`,Gm=`Unable to send feedback. This could be because of network issues, or because you are using an ad-blocker.`,Km=`widget`,qm=`api`,Jm=5e3,Ym={ERROR_EMPTY_MESSAGE:Vm,ERROR_NO_CLIENT:Hm,ERROR_TIMEOUT:Um,ERROR_FORBIDDEN:Wm,ERROR_GENERIC:Gm};function Xm(e,t){return(t==null?void 0:t[e])??Ym[e]}function Zm(e,t){return Error(Xm(e,t))}var Qm=(e,t={includeReplay:!0})=>{let n=t.errorMessages;if(!e.message)throw Zm(`ERROR_EMPTY_MESSAGE`,n);let r=M();if(!r)throw Zm(`ERROR_NO_CLIENT`,n);e.tags&&Object.keys(e.tags).length&&A().setTags(e.tags);let i=qp({source:qm,url:$m(),...e},t);return new Promise((e,t)=>{let a=setTimeout(()=>{o(),t(Zm(`ERROR_TIMEOUT`,n))},3e4),o=r.on(`afterSendEvent`,(r,s)=>{if(r.event_id===i)return clearTimeout(a),o(),s!=null&&s.statusCode&&s.statusCode>=200&&s.statusCode<300?e(i):(s==null?void 0:s.statusCode)===403?t(Zm(`ERROR_FORBIDDEN`,n)):t(Zm(`ERROR_GENERIC`,n))})})};function $m(){try{return xm.document.location.href}catch{return``}}var eh=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function th(){return!(/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(Sm.userAgent)||/Macintosh/i.test(Sm.userAgent)&&Sm.maxTouchPoints&&Sm.maxTouchPoints>1||!isSecureContext)}function nh(e,t){return{...e,...t,tags:{...e.tags,...t.tags},onFormOpen:()=>{var n,r;(n=t.onFormOpen)==null||n.call(t),(r=e.onFormOpen)==null||r.call(e)},onFormClose:()=>{var n,r;(n=t.onFormClose)==null||n.call(t),(r=e.onFormClose)==null||r.call(e)},onSubmitSuccess:(n,r)=>{var i,a;(i=t.onSubmitSuccess)==null||i.call(t,n,r),(a=e.onSubmitSuccess)==null||a.call(e,n,r)},onSubmitError:n=>{var r,i;(r=t.onSubmitError)==null||r.call(t,n),(i=e.onSubmitError)==null||i.call(e,n)},onFormSubmitted:()=>{var n,r;(n=t.onFormSubmitted)==null||n.call(t),(r=e.onFormSubmitted)==null||r.call(e)},themeDark:{...e.themeDark,...t.themeDark},themeLight:{...e.themeLight,...t.themeLight}}}function rh(e){let t=z.createElement(`style`);return t.textContent=`
|
|
19
|
+
.widget__actor {
|
|
20
|
+
position: fixed;
|
|
21
|
+
z-index: var(--z-index);
|
|
22
|
+
margin: var(--page-margin);
|
|
23
|
+
inset: var(--actor-inset);
|
|
24
|
+
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: 8px;
|
|
28
|
+
padding: 16px;
|
|
29
|
+
|
|
30
|
+
font-family: inherit;
|
|
31
|
+
font-size: var(--font-size);
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
line-height: 1.14em;
|
|
34
|
+
text-decoration: none;
|
|
35
|
+
|
|
36
|
+
background: var(--actor-background, var(--background));
|
|
37
|
+
border-radius: var(--actor-border-radius, 1.7em/50%);
|
|
38
|
+
border: var(--actor-border, var(--border));
|
|
39
|
+
box-shadow: var(--actor-box-shadow, var(--box-shadow));
|
|
40
|
+
color: var(--actor-color, var(--foreground));
|
|
41
|
+
fill: var(--actor-color, var(--foreground));
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
opacity: 1;
|
|
44
|
+
transition: transform 0.2s ease-in-out;
|
|
45
|
+
transform: translate(0, 0) scale(1);
|
|
46
|
+
}
|
|
47
|
+
.widget__actor[aria-hidden="true"] {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
visibility: hidden;
|
|
51
|
+
transform: translate(0, 16px) scale(0.98);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.widget__actor:hover {
|
|
55
|
+
background: var(--actor-hover-background, var(--background));
|
|
56
|
+
filter: var(--interactive-filter);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.widget__actor svg {
|
|
60
|
+
width: 1.14em;
|
|
61
|
+
height: 1.14em;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@media (max-width: 600px) {
|
|
65
|
+
.widget__actor span {
|
|
66
|
+
display: none;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`,e&&t.setAttribute(`nonce`,e),t}function ih(e,t){return Object.entries(t).forEach(([t,n])=>{e.setAttributeNS(null,t,n)}),e}var ah=20,oh=`http://www.w3.org/2000/svg`;function sh(){let e=e=>xm.document.createElementNS(oh,e),t=ih(e(`svg`),{width:`${ah}`,height:`${ah}`,viewBox:`0 0 ${ah} ${ah}`,fill:`var(--actor-color, var(--foreground))`}),n=ih(e(`g`),{clipPath:`url(#clip0_57_80)`}),r=ih(e(`path`),{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M15.6622 15H12.3997C12.2129 14.9959 12.031 14.9396 11.8747 14.8375L8.04965 12.2H7.49956V19.1C7.4875 19.3348 7.3888 19.5568 7.22256 19.723C7.05632 19.8892 6.83435 19.9879 6.59956 20H2.04956C1.80193 19.9968 1.56535 19.8969 1.39023 19.7218C1.21511 19.5467 1.1153 19.3101 1.11206 19.0625V12.2H0.949652C0.824431 12.2017 0.700142 12.1783 0.584123 12.1311C0.468104 12.084 0.362708 12.014 0.274155 11.9255C0.185602 11.8369 0.115689 11.7315 0.0685419 11.6155C0.0213952 11.4995 -0.00202913 11.3752 -0.00034808 11.25V3.75C-0.00900498 3.62067 0.0092504 3.49095 0.0532651 3.36904C0.0972798 3.24712 0.166097 3.13566 0.255372 3.04168C0.344646 2.94771 0.452437 2.87327 0.571937 2.82307C0.691437 2.77286 0.82005 2.74798 0.949652 2.75H8.04965L11.8747 0.1625C12.031 0.0603649 12.2129 0.00407221 12.3997 0H15.6622C15.9098 0.00323746 16.1464 0.103049 16.3215 0.278167C16.4966 0.453286 16.5964 0.689866 16.5997 0.9375V3.25269C17.3969 3.42959 18.1345 3.83026 18.7211 4.41679C19.5322 5.22788 19.9878 6.32796 19.9878 7.47502C19.9878 8.62209 19.5322 9.72217 18.7211 10.5333C18.1345 11.1198 17.3969 11.5205 16.5997 11.6974V14.0125C16.6047 14.1393 16.5842 14.2659 16.5395 14.3847C16.4948 14.5035 16.4268 14.6121 16.3394 14.7042C16.252 14.7962 16.147 14.8698 16.0307 14.9206C15.9144 14.9714 15.7891 14.9984 15.6622 15ZM1.89695 10.325H1.88715V4.625H8.33715C8.52423 4.62301 8.70666 4.56654 8.86215 4.4625L12.6872 1.875H14.7247V13.125H12.6872L8.86215 10.4875C8.70666 10.3835 8.52423 10.327 8.33715 10.325H2.20217C2.15205 10.3167 2.10102 10.3125 2.04956 10.3125C1.9981 10.3125 1.94708 10.3167 1.89695 10.325ZM2.98706 12.2V18.1625H5.66206V12.2H2.98706ZM16.5997 9.93612V5.01393C16.6536 5.02355 16.7072 5.03495 16.7605 5.04814C17.1202 5.13709 17.4556 5.30487 17.7425 5.53934C18.0293 5.77381 18.2605 6.06912 18.4192 6.40389C18.578 6.73866 18.6603 7.10452 18.6603 7.47502C18.6603 7.84552 18.578 8.21139 18.4192 8.54616C18.2605 8.88093 18.0293 9.17624 17.7425 9.41071C17.4556 9.64518 17.1202 9.81296 16.7605 9.90191C16.7072 9.91509 16.6536 9.9265 16.5997 9.93612Z`});t.appendChild(n).appendChild(r);let i=e(`defs`),a=ih(e(`clipPath`),{id:`clip0_57_80`}),o=ih(e(`rect`),{width:`${ah}`,height:`${ah}`,fill:`white`});return a.appendChild(o),i.appendChild(a),t.appendChild(i).appendChild(a).appendChild(o),t}function ch({triggerLabel:e,triggerAriaLabel:t,shadow:n,styleNonce:r}){let i=z.createElement(`button`);if(i.type=`button`,i.className=`widget__actor`,i.ariaHidden=`false`,i.ariaLabel=t||e||Cm,i.appendChild(sh()),e){let t=z.createElement(`span`);t.appendChild(z.createTextNode(e)),i.appendChild(t)}let a=rh(r);return{el:i,appendToDom(){n.appendChild(a),n.appendChild(i)},removeFromDom(){i.remove(),a.remove()},show(){i.ariaHidden=`false`},hide(){i.ariaHidden=`true`}}}var lh=`rgba(88, 74, 192, 1)`,uh={foreground:`#2b2233`,background:`#ffffff`,accentForeground:`white`,accentBackground:lh,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%)`},dh={foreground:`#ebe6ef`,background:`#29232f`,accentForeground:`white`,accentBackground:lh,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 fh(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 ph({colorScheme:e,themeDark:t,themeLight:n,styleNonce:r}){let i=z.createElement(`style`);return i.textContent=`
|
|
81
|
+
:host {
|
|
82
|
+
--font-family: system-ui, 'Helvetica Neue', Arial, sans-serif;
|
|
83
|
+
--font-size: 14px;
|
|
84
|
+
--z-index: 100000;
|
|
85
|
+
|
|
86
|
+
--page-margin: 16px;
|
|
87
|
+
--inset: auto 0 0 auto;
|
|
88
|
+
--actor-inset: var(--inset);
|
|
89
|
+
|
|
90
|
+
font-family: var(--font-family);
|
|
91
|
+
font-size: var(--font-size);
|
|
92
|
+
|
|
93
|
+
${e===`system`?``:`color-scheme: only ${e};`}
|
|
94
|
+
|
|
95
|
+
${fh(e===`dark`?{...dh,...t}:{...uh,...n})}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
${e===`system`?`
|
|
99
|
+
@media (prefers-color-scheme: dark) {
|
|
100
|
+
:host {
|
|
101
|
+
color-scheme: only dark;
|
|
102
|
+
|
|
103
|
+
${fh({...dh,...t})}
|
|
104
|
+
}
|
|
105
|
+
}`:``}
|
|
106
|
+
`,r&&i.setAttribute(`nonce`,r),i}var mh=({lazyLoadIntegration:e,getModalIntegration:t,getScreenshotIntegration:n})=>(({id:r=`sentry-feedback`,autoInject:i=!0,showBranding:a=!0,isEmailRequired:o=!1,isNameRequired:s=!1,showEmail:c=!0,showName:l=!0,enableScreenshot:u=!0,useSentryUser:d={email:`email`,name:`username`},tags:f,styleNonce:p,scriptNonce:m,colorScheme:h=`system`,themeLight:g={},themeDark:_={},addScreenshotButtonLabel:v=Im,cancelButtonLabel:y=wm,confirmButtonLabel:x=Em,emailLabel:S=km,emailPlaceholder:C=Om,formTitle:w=Dm,isRequiredLabel:T=Fm,messageLabel:E=jm,messagePlaceholder:ee=Am,nameLabel:te=Nm,namePlaceholder:D=Mm,removeScreenshotButtonLabel:ne=Lm,submitButtonLabel:re=Tm,successMessageText:ie=Pm,triggerLabel:ae=Cm,triggerAriaLabel:O=``,highlightToolText:oe=Rm,hideToolText:se=zm,removeHighlightText:ce=Bm,errorEmptyMessageText:le=Vm,errorNoClientText:ue=Hm,errorTimeoutText:de=Um,errorForbiddenText:fe=Wm,errorGenericText:pe=Gm,onFormOpen:me,onFormClose:k,onSubmitSuccess:he,onSubmitError:ge,onFormSubmitted:_e}={})=>{let ve={id:r,autoInject:i,showBranding:a,isEmailRequired:o,isNameRequired:s,showEmail:c,showName:l,enableScreenshot:u,useSentryUser:d,tags:f,styleNonce:p,scriptNonce:m,colorScheme:h,themeDark:_,themeLight:g,triggerLabel:ae,triggerAriaLabel:O,cancelButtonLabel:y,submitButtonLabel:re,confirmButtonLabel:x,formTitle:w,emailLabel:S,emailPlaceholder:C,messageLabel:E,messagePlaceholder:ee,nameLabel:te,namePlaceholder:D,successMessageText:ie,isRequiredLabel:T,addScreenshotButtonLabel:v,removeScreenshotButtonLabel:ne,highlightToolText:oe,hideToolText:se,removeHighlightText:ce,errorEmptyMessageText:le,errorNoClientText:ue,errorTimeoutText:de,errorForbiddenText:fe,errorGenericText:pe,onFormClose:k,onFormOpen:me,onSubmitError:ge,onSubmitSuccess:he,onFormSubmitted:_e},ye=null,be=null,xe=[],Se=e=>{if(!ye){let t=z.createElement(`div`);t.id=String(e.id),z.body.appendChild(t),ye=t.attachShadow({mode:`open`}),be=ph(e),ye.appendChild(be)}return ye},Ce=async r=>{let i=r.enableScreenshot&&th(),a,o;try{a=(t?t():await e(`feedbackModalIntegration`,m))(),Qi(a)}catch{throw eh&&b.error("[Feedback] Error when trying to load feedback integrations. Try using `feedbackSyncIntegration` in your `Sentry.init`."),Error(`[Feedback] Missing feedback modal integration!`)}try{let t=i?n?n():await e(`feedbackScreenshotIntegration`,m):void 0;t&&(o=t(),Qi(o))}catch{eh&&b.error(`[Feedback] Missing feedback screenshot integration. Proceeding without screenshots.`)}let s={ERROR_EMPTY_MESSAGE:r.errorEmptyMessageText,ERROR_NO_CLIENT:r.errorNoClientText,ERROR_TIMEOUT:r.errorTimeoutText,ERROR_FORBIDDEN:r.errorForbiddenText,ERROR_GENERIC:r.errorGenericText},c=(e,t)=>Qm(e,{includeReplay:!0,...t,errorMessages:s}),l=a.createDialog({options:{...r,onFormClose:()=>{var e;l==null||l.close(),(e=r.onFormClose)==null||e.call(r)},onFormSubmitted:()=>{var e;l==null||l.close(),(e=r.onFormSubmitted)==null||e.call(r)}},screenshotIntegration:o,sendFeedback:c,shadow:Se(r)});return l},we=(e,t={})=>{let n=nh(ve,t),r=typeof e==`string`?z.querySelector(e):typeof e.addEventListener==`function`?e:null;if(!r)throw eh&&b.error(`[Feedback] Unable to attach to target element`),Error(`Unable to attach to target element`);let i=null,a=async()=>{i||=await Ce({...n,onFormSubmitted:()=>{var e;i==null||i.removeFromDom(),(e=n.onFormSubmitted)==null||e.call(n)}}),i.appendToDom(),i.open()};r.addEventListener(`click`,a);let o=()=>{xe=xe.filter(e=>e!==o),i==null||i.removeFromDom(),i=null,r.removeEventListener(`click`,a)};return xe.push(o),o},Te=(e={})=>{let t=nh(ve,e),n=Se(t),r=ch({triggerLabel:t.triggerLabel,triggerAriaLabel:t.triggerAriaLabel,shadow:n,styleNonce:p});return we(r.el,{...t,onFormOpen(){r.hide()},onFormClose(){r.show()},onFormSubmitted(){r.show()}}),r};return{name:`Feedback`,setupOnce(){eo()&&ve.autoInject&&(z.readyState===`loading`?z.addEventListener(`DOMContentLoaded`,()=>Te().appendToDom()):Te().appendToDom())},attachTo:we,createWidget(e={}){let t=Te(nh(ve,e));return t.appendToDom(),t},async createForm(e={}){return Ce(nh(ve,e))},setTheme(e){if(ve.colorScheme=e,ye){let e=ph(ve);be?ye.replaceChild(e,be):ye.prepend(e),be=e}},remove(){if(ye){var e;(e=ye.parentElement)==null||e.remove(),ye=null,be=null}xe.forEach(e=>e()),xe=[]}}});function hh(){let e=M();return e==null?void 0:e.getIntegrationByName(`Feedback`)}var gh,B,_h,vh,yh,bh,xh,Sh,Ch,wh,Th,Eh,Dh,Oh,kh={},Ah=[],jh=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Mh=Array.isArray;function Nh(e,t){for(var n in t)e[n]=t[n];return e}function Ph(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function V(e,t,n){var r,i,a,o={};for(a in t)a==`key`?r=t[a]:a==`ref`?i=t[a]:o[a]=t[a];if(arguments.length>2&&(o.children=arguments.length>3?gh.call(arguments,2):n),typeof e==`function`&&e.defaultProps!=null)for(a in e.defaultProps)o[a]===void 0&&(o[a]=e.defaultProps[a]);return Fh(e,o,r,i,null)}function Fh(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++_h,__i:-1,__u:0};return i==null&&B.vnode!=null&&B.vnode(a),a}function Ih(e){return e.children}function Lh(e,t){this.props=e,this.context=t}function Rh(e,t){if(t==null)return e.__?Rh(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`?Rh(e):null}function zh(e){if(e.__P&&e.__d){var t=e.__v,n=t.__e,r=[],i=[],a=Nh({},t);a.__v=t.__v+1,B.vnode&&B.vnode(a),Xh(e.__P,a,t,e.__n,e.__P.namespaceURI,32&t.__u?[n]:null,r,n??Rh(t),!!(32&t.__u),i),a.__v=t.__v,a.__.__k[a.__i]=a,Qh(r,a,i),t.__e=t.__=null,a.__e!=n&&Bh(a)}}function Bh(e){if((e=e.__)!=null&&e.__c!=null)return e.__e=e.__c.base=null,e.__k.some(function(t){if(t!=null&&t.__e!=null)return e.__e=e.__c.base=t.__e}),Bh(e)}function Vh(e){(!e.__d&&(e.__d=!0)&&vh.push(e)&&!Hh.__r++||yh!=B.debounceRendering)&&((yh=B.debounceRendering)||bh)(Hh)}function Hh(){try{for(var e,t=1;vh.length;)vh.length>t&&vh.sort(xh),e=vh.shift(),t=vh.length,zh(e)}finally{vh.length=Hh.__r=0}}function Uh(e,t,n,r,i,a,o,s,c,l,u){var d,f,p,m,h,g,_=r&&r.__k||Ah,v=t.length;for(c=Wh(n,t,_,c,v),d=0;d<v;d++)(p=n.__k[d])!=null&&(f=p.__i!=-1&&_[p.__i]||kh,p.__i=d,g=Xh(e,p,f,i,a,o,s,c,l,u),m=p.__e,p.ref&&f.ref!=p.ref&&(f.ref&&tg(f.ref,null,p),u.push(p.ref,p.__c||m,p)),h==null&&m!=null&&(h=m),4&p.__u?(c=Gh(p,c,e),f.__e&&(f.__e=null)):typeof p.type==`function`&&g!==void 0?c=g:m&&(c=m.nextSibling),p.__u&=-7);return n.__e=h,c}function Wh(e,t,n,r,i){var a,o,s,c,l,u=n.length,d=u,f=0;for(e.__k=Array(i),a=0;a<i;a++)(o=t[a])!=null&&typeof o!=`boolean`&&typeof o!=`function`?(typeof o==`string`||typeof o==`number`||typeof o==`bigint`||o.constructor==String?o=e.__k[a]=Fh(null,o,null,null,null):Mh(o)?o=e.__k[a]=Fh(Ih,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?o=e.__k[a]=Fh(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):e.__k[a]=o,c=a+f,o.__=e,o.__b=e.__b+1,s=null,(l=o.__i=Kh(o,n,c,d))!=-1&&(d--,(s=n[l])&&(s.__u|=2)),s==null||s.__v==null?(l==-1&&(i>u?f--:i<u&&f++),typeof o.type!=`function`&&(o.__u|=4)):l!=c&&(l==c-1?f--:l==c+1?f++:(l>c?f--:f++,o.__u|=4))):e.__k[a]=null;if(d)for(a=0;a<u;a++)(s=n[a])!=null&&!(2&s.__u)&&(s.__e==r&&(r=Rh(s)),ng(s,s));return r}function Gh(e,t,n){var r,i;if(typeof e.type==`function`){for(r=e.__k,i=0;r&&i<r.length;i++)r[i]&&(r[i].__=e,t=Gh(r[i],t,n));return t}e.__e!=t&&(t&&e.type&&!t.parentNode&&(t=Rh(e)),t=n.insertBefore(e.__e,t||null));do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function Kh(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&s==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function qh(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n==null?``:typeof n!=`number`||jh.test(t)?n:n+`px`}function Jh(e,t,n,r,i){var a,o;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||qh(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||qh(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(Th,`$1`)),o=t.toLowerCase(),t=o in e||t==`onFocusOut`||t==`onFocusIn`?o.slice(2):t.slice(2),e.l||={},e.l[t+a]=n,n?r?n[wh]=r[wh]:(n[wh]=Eh,e.addEventListener(t,a?Oh:Dh,a)):e.removeEventListener(t,a?Oh:Dh,a);else{if(i==`http://www.w3.org/2000/svg`)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!=`popover`&&t in e)try{e[t]=n??``;break e}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function Yh(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t[Ch]==null)t[Ch]=Eh++;else if(t[Ch]<n[wh])return;return n(B.event?B.event(t):t)}}}function Xh(e,t,n,r,i,a,o,s,c,l){var u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(c=!!(32&n.__u),a=[s=t.__e=n.__e]),(u=B.__b)&&u(t);e:if(typeof E==`function`){d=o.length;try{if(v=t.props,y=E.prototype&&E.prototype.render,b=(u=E.contextType)&&r[u.__c],x=u?b?b.props.value:u.__:r,n.__c?_=(f=t.__c=n.__c).__=f.__E:(y?t.__c=f=new E(v,x):(t.__c=f=new Lh(v,x),f.constructor=E,f.render=rg),b&&b.sub(f),f.state||(f.state={}),f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),y&&f.__s==null&&(f.__s=f.state),y&&E.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=Nh({},f.__s)),Nh(f.__s,E.getDerivedStateFromProps(v,f.__s))),m=f.props,h=f.state,f.__v=t,p)y&&E.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),y&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(y&&E.getDerivedStateFromProps==null&&v!==m&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(v,x),t.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&!1===f.shouldComponentUpdate(v,f.__s,x)){t.__v!=n.__v&&(f.props=v,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),Ah.push.apply(f.__h,f._sb),f._sb=[],f.__h.length&&o.push(f),s=Rh(n);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(v,f.__s,x),y&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(m,h,g)})}if(f.context=x,f.props=v,f.__P=e,f.__e=!1,S=B.__r,C=0,y)f.state=f.__s,f.__d=!1,S&&S(t),u=f.render(f.props,f.state,f.context),Ah.push.apply(f.__h,f._sb),f._sb=[];else do f.__d=!1,S&&S(t),u=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++C<25);f.state=f.__s,f.getChildContext!=null&&(r=Nh(Nh({},r),f.getChildContext())),y&&!p&&f.getSnapshotBeforeUpdate!=null&&(g=f.getSnapshotBeforeUpdate(m,h)),w=u!=null&&u.type===Ih&&u.key==null?$h(u.props.children):u,s=Uh(e,Mh(w)?w:[w],t,n,r,i,a,o,s,c,l),f.base=t.__e,t.__u&=-161,f.__h.length&&o.push(f),_&&(f.__E=f.__=null)}catch(e){if(o.length=d,t.__v=null,c||a!=null){if(e.then){for(t.__u|=c?160:128;s&&s.nodeType==8&&s.nextSibling;)s=s.nextSibling;a!=null&&(a[a.indexOf(s)]=null),t.__e=s}else if(a!=null)for(T=a.length;T--;)Ph(a[T])}else t.__e=n.__e;t.__k??=n.__k||[],e.then||Zh(t),B.__e(e,t,n)}}else a==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):s=t.__e=eg(n.__e,t,n,r,i,a,o,c,l);return(u=B.diffed)&&u(t),128&t.__u?void 0:s}function Zh(e){e&&(e.__c&&(e.__c.__e=!0),e.__k&&e.__k.some(Zh))}function Qh(e,t,n){for(var r=0;r<n.length;r++)tg(n[r],n[++r],n[++r]);B.__c&&B.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){B.__e(e,t.__v)}})}function $h(e){return typeof e!=`object`||!e||e.__b>0?e:Mh(e)?e.map($h):e.constructor===void 0?Nh({},e):null}function eg(e,t,n,r,i,a,o,s,c){var l,u,d,f,p,m,h,g=n.props||kh,_=t.props,v=t.type;if(v==`svg`?i=`http://www.w3.org/2000/svg`:v==`math`?i=`http://www.w3.org/1998/Math/MathML`:i||=`http://www.w3.org/1999/xhtml`,a!=null){for(l=0;l<a.length;l++)if((p=a[l])&&`setAttribute`in p==!!v&&(v?p.localName==v:p.nodeType==3)){e=p,a[l]=null;break}}if(e==null){if(v==null)return document.createTextNode(_);e=document.createElementNS(i,v,_.is&&_),s&&=(B.__m&&B.__m(t,a),!1),a=null}if(v==null)g===_||s&&e.data==_||(e.data=_);else{if(a=v==`textarea`&&_.defaultValue!=null?null:a&&gh.call(e.childNodes),!s&&a!=null)for(g={},l=0;l<e.attributes.length;l++)g[(p=e.attributes[l]).name]=p.value;for(l in g)p=g[l],l==`dangerouslySetInnerHTML`?d=p:l==`children`||l in _||l==`value`&&`defaultValue`in _||l==`checked`&&`defaultChecked`in _||Jh(e,l,null,p,i);for(l in _)p=_[l],l==`children`?f=p:l==`dangerouslySetInnerHTML`?u=p:l==`value`?m=p:l==`checked`?h=p:s&&typeof p!=`function`||g[l]===p||Jh(e,l,p,g[l],i);if(u)s||d&&(u.__html==d.__html||u.__html==e.innerHTML)||(e.innerHTML=u.__html),t.__k=[];else if(d&&(e.innerHTML=``),Uh(t.type==`template`?e.content:e,Mh(f)?f:[f],t,n,r,v==`foreignObject`?`http://www.w3.org/1999/xhtml`:i,a,o,a?a[0]:n.__k&&Rh(n,0),s,c),a!=null)for(l=a.length;l--;)Ph(a[l]);s&&v!=`textarea`||(l=`value`,v==`progress`&&m==null?e.removeAttribute(`value`):m!=null&&(m!==e[l]||v==`progress`&&!m||v==`option`&&m!=g[l])&&Jh(e,l,m,g[l],i),l=`checked`,h!=null&&h!=e[l]&&Jh(e,l,h,g[l],i))}return e}function tg(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){B.__e(e,n)}}function ng(e,t,n){var r,i;if(B.unmount&&B.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||tg(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(e){B.__e(e,t)}r.base=r.__P=r.__n=null}if(r=e.__k)for(i=0;i<r.length;i++)r[i]&&ng(r[i],t,n||typeof e.type!=`function`);n||Ph(e.__e),e.__c=e.__=e.__e=void 0}function rg(e,t,n){return this.constructor(e,n)}function ig(e,t,n){var r,i,a,o;t==document&&(t=document.documentElement),B.__&&B.__(e,t),i=(r=!1)?null:t.__k,a=[],o=[],Xh(t,e=t.__k=V(Ih,null,[e]),i||kh,kh,t.namespaceURI,i?null:t.firstChild?gh.call(t.childNodes):null,a,i?i.__e:t.firstChild,r,o),Qh(a,e,o),e.props.children=null}gh=Ah.slice,B={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!i.__)try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=i.__d),o)return i.__E=i}catch(t){e=t}throw e}},_h=0,Lh.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=Nh({},this.state);typeof e==`function`&&(e=e(Nh({},n),this.props)),e&&Nh(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),Vh(this))},Lh.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),Vh(this))},Lh.prototype.render=Ih,vh=[],bh=typeof Promise==`function`?Promise.prototype.then.bind(Promise.resolve()):setTimeout,xh=function(e,t){return e.__v.__b-t.__v.__b},Hh.__r=0,Sh=Math.random().toString(8),Ch=`__d`+Sh,wh=`__a`+Sh,Th=/(PointerCapture)$|Capture$/i,Eh=0,Dh=Yh(!1),Oh=Yh(!0);var ag,H,og,sg,cg=0,lg=[],U=B,ug=U.__b,dg=U.__r,fg=U.diffed,pg=U.__c,mg=U.unmount,hg=U.__;function gg(e,t){U.__h&&U.__h(H,e,cg||t),cg=0;var n=H.__H||(H.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function _g(e){return cg=1,vg(Fg,e)}function vg(e,t,n){var r=gg(ag++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Fg(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=H,!H.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=!1,o=r.__c.props!==e;if(r.__c.__H.__.some(function(e){if(e.__N){i=!0;var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(o=!0)}}),a){var s=a.call(this,e,t,n);return i?s||o:s}return!i||o};H.__f=!0;var a=H.shouldComponentUpdate,o=H.componentWillUpdate;H.componentWillUpdate=function(e,t,n){if(this.__e){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},H.shouldComponentUpdate=i}return r.__N||r.__}function yg(e,t){var n=gg(ag++,3);!U.__s&&Pg(n.__H,t)&&(n.__=e,n.u=t,H.__H.__h.push(n))}function bg(e,t){var n=gg(ag++,4);!U.__s&&Pg(n.__H,t)&&(n.__=e,n.u=t,H.__h.push(n))}function xg(e){return cg=5,Cg(function(){return{current:e}},[])}function Sg(e,t,n){cg=6,bg(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function Cg(e,t){var n=gg(ag++,7);return Pg(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function wg(e,t){return cg=8,Cg(function(){return e},t)}function Tg(e){var t=H.context[e.__c],n=gg(ag++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(H)),t.props.value):e.__}function Eg(e,t){U.useDebugValue&&U.useDebugValue(t?t(e):e)}function Dg(e){var t=gg(ag++,10),n=_g();return t.__=e,H.componentDidCatch||(H.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function Og(){var e=gg(ag++,11);if(!e.__){for(var t=H.__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 kg(){for(var e;e=lg.shift();){var t=e.__H;if(e.__P&&t)try{t.__h.some(Mg),t.__h.some(Ng),t.__h=[]}catch(n){t.__h=[],U.__e(n,e.__v)}}}U.__b=function(e){H=null,ug&&ug(e)},U.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),hg&&hg(e,t)},U.__r=function(e){dg&&dg(e),ag=0;var t=(H=e.__c).__H;t&&(og===H?(t.__h=[],H.__h=[],t.__.some(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.some(Mg),t.__h.some(Ng),t.__h=[],ag=0)),og=H},U.diffed=function(e){fg&&fg(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(lg.push(t)!==1&&sg===U.requestAnimationFrame||((sg=U.requestAnimationFrame)||jg)(kg)),t.__H.__.some(function(e){e.u&&=(e.__H=e.u,void 0)})),og=H=null},U.__c=function(e,t){t.some(function(e){try{e.__h.some(Mg),e.__h=e.__h.filter(function(e){return!e.__||Ng(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],U.__e(n,e.__v)}}),pg&&pg(e,t)},U.unmount=function(e){mg&&mg(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.some(function(e){try{Mg(e)}catch(e){t=e}}),n.__H=void 0,t&&U.__e(t,n.__v))};var Ag=typeof requestAnimationFrame==`function`;function jg(e){var t,n=function(){clearTimeout(r),Ag&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Ag&&(t=requestAnimationFrame(n))}function Mg(e){var t=H,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),H=t}function Ng(e){var t=H;e.__c=e.__(),H=t}function Pg(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function Fg(e,t){return typeof t==`function`?t(e):t}var Ig=Object.defineProperty({__proto__:null,useCallback:wg,useContext:Tg,useDebugValue:Eg,useEffect:yg,useErrorBoundary:Dg,useId:Og,useImperativeHandle:Sg,useLayoutEffect:bg,useMemo:Cg,useReducer:vg,useRef:xg,useState:_g},Symbol.toStringTag,{value:`Module`}),Lg=`http://www.w3.org/2000/svg`;function Rg(){let e=e=>z.createElementNS(Lg,e),t=ih(e(`svg`),{width:`32`,height:`30`,viewBox:`0 0 72 66`,fill:`inherit`}),n=ih(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 zg({options:e}){let t=Cg(()=>({__html:Rg().outerHTML}),[]);return V(`h2`,{class:`dialog__header`},V(`span`,{class:`dialog__title`},e.formTitle),e.showBranding?V(`a`,{class:`brand-link`,target:`_blank`,href:`https://sentry.io/welcome/`,title:`Powered by Sentry`,rel:`noopener noreferrer`,dangerouslySetInnerHTML:t}):null)}function Bg(e,t){let n=[];return t.isNameRequired&&!e.name&&n.push(t.nameLabel),t.isEmailRequired&&!e.email&&n.push(t.emailLabel),e.message||n.push(t.messageLabel),n}function Vg(e,t){let n=e.get(t);return typeof n==`string`?n.trim():``}function Hg({options:e,defaultEmail:t,defaultName:n,onFormClose:r,onSubmit:i,onSubmitSuccess:a,onSubmitError:o,showEmail:s,showName:c,screenshotInput:l}){let{tags:u,addScreenshotButtonLabel:d,removeScreenshotButtonLabel:f,cancelButtonLabel:p,emailLabel:m,emailPlaceholder:h,isEmailRequired:g,isNameRequired:_,messageLabel:v,messagePlaceholder:y,nameLabel:x,namePlaceholder:S,submitButtonLabel:C,isRequiredLabel:w}=e,[T,E]=_g(!1),[ee,te]=_g(null),[D,ne]=_g(!1),re=l==null?void 0:l.input,[ie,ae]=_g(null),O=wg(e=>{ae(e),ne(!1)},[]),oe=wg(e=>{let t=Bg(e,{emailLabel:m,isEmailRequired:g,isNameRequired:_,messageLabel:v,nameLabel:x});return t.length>0?te(`Please enter in the following required fields: ${t.join(`, `)}`):te(null),t.length===0},[m,g,_,v,x]);return V(`form`,{class:`form`,onSubmit:wg(async e=>{E(!0);try{if(e.preventDefault(),!(e.target instanceof HTMLFormElement))return;let t=new FormData(e.target),n=await(l&&D?l.value():void 0),r={name:Vg(t,`name`),email:Vg(t,`email`),message:Vg(t,`message`),attachments:n?[n]:void 0};if(!oe(r))return;try{a(r,await i({name:r.name,email:r.email,message:r.message,source:Km,tags:u},{attachments:r.attachments}))}catch(e){eh&&b.error(e);let t=e;te(t.message),o(t)}}finally{E(!1)}},[l&&D,a,o])},re&&D?V(re,{onError:O}):null,V(`fieldset`,{class:`form__right`,"data-sentry-feedback":!0,disabled:T},V(`div`,{class:`form__top`},ee?V(`div`,{class:`form__error-container`},ee):null,c?V(`label`,{for:`name`,class:`form__label`},V(Ug,{label:x,isRequiredLabel:w,isRequired:_}),V(`input`,{class:`form__input`,defaultValue:n,id:`name`,name:`name`,placeholder:S,required:_,type:`text`})):V(`input`,{"aria-hidden":!0,value:n,name:`name`,type:`hidden`}),s?V(`label`,{for:`email`,class:`form__label`},V(Ug,{label:m,isRequiredLabel:w,isRequired:g}),V(`input`,{class:`form__input`,defaultValue:t,id:`email`,name:`email`,placeholder:h,required:g,type:`email`})):V(`input`,{"aria-hidden":!0,value:t,name:`email`,type:`hidden`}),V(`label`,{for:`message`,class:`form__label`},V(Ug,{label:v,isRequiredLabel:w,isRequired:!0}),V(`textarea`,{autoFocus:!0,class:`form__input form__input--textarea`,id:`message`,name:`message`,placeholder:y,required:!0,rows:5})),re?V(`label`,{for:`screenshot`,class:`form__label`},V(`button`,{class:`btn btn--default`,disabled:T,type:`button`,onClick:()=>{ae(null),ne(e=>!e)}},D?f:d),ie?V(`div`,{class:`form__error-container`},ie.message):null):null),V(`div`,{class:`btn-group`},V(`button`,{class:`btn btn--primary`,disabled:T,type:`submit`},C),V(`button`,{class:`btn btn--default`,disabled:T,type:`button`,onClick:r},p))))}function Ug({label:e,isRequired:t,isRequiredLabel:n}){return V(`span`,{class:`form__label__text`},e,t&&V(`span`,{class:`form__label__text--required`},n))}var Wg=16,Gg=17,Kg=`http://www.w3.org/2000/svg`;function qg(){let e=e=>xm.document.createElementNS(Kg,e),t=ih(e(`svg`),{width:`${Wg}`,height:`${Gg}`,viewBox:`0 0 ${Wg} ${Gg}`,fill:`inherit`}),n=ih(e(`g`),{clipPath:`url(#clip0_57_156)`}),r=ih(e(`path`),{"fill-rule":`evenodd`,"clip-rule":`evenodd`,d:`M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z`}),i=ih(e(`path`),{d:`M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z`});t.appendChild(n).append(i,r);let a=e(`defs`),o=ih(e(`clipPath`),{id:`clip0_57_156`}),s=ih(e(`rect`),{width:`${Wg}`,height:`${Wg}`,fill:`white`,transform:`translate(0 0.5)`});return o.appendChild(s),a.appendChild(o),t.appendChild(a).appendChild(o).appendChild(s),t}function Jg({open:e,onFormSubmitted:t,...n}){let r=n.options,i=Cg(()=>({__html:qg().outerHTML}),[]),[a,o]=_g(null),s=wg(()=>{a&&(clearTimeout(a),o(null)),t()},[a]),c=wg((e,r)=>{n.onSubmitSuccess(e,r),o(setTimeout(()=>{t(),o(null)},Jm))},[t]);return V(Ih,null,a?V(`div`,{class:`success__position`,onClick:s},V(`div`,{class:`success__content`},r.successMessageText,V(`span`,{class:`success__icon`,dangerouslySetInnerHTML:i}))):V(`dialog`,{class:`dialog`,onClick:r.onFormClose,open:e},V(`div`,{class:`dialog__position`},V(`div`,{class:`dialog__content`,onClick:e=>{e.stopPropagation()}},V(zg,{options:r}),V(Hg,{...n,onSubmitSuccess:c})))))}var Yg=`
|
|
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
|
+
`,Xg=`
|
|
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
|
+
`,Zg=`
|
|
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
|
+
width: 0;
|
|
247
|
+
min-width: 100%;
|
|
248
|
+
overflow-wrap: break-word;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.form__label {
|
|
252
|
+
display: flex;
|
|
253
|
+
flex-direction: column;
|
|
254
|
+
gap: 4px;
|
|
255
|
+
margin: 0px;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
.form__label__text {
|
|
259
|
+
display: flex;
|
|
260
|
+
gap: 4px;
|
|
261
|
+
align-items: center;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.form__label__text--required {
|
|
265
|
+
font-size: 0.85em;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.form__input {
|
|
269
|
+
font-family: inherit;
|
|
270
|
+
line-height: inherit;
|
|
271
|
+
background: transparent;
|
|
272
|
+
box-sizing: border-box;
|
|
273
|
+
border: var(--input-border, var(--border));
|
|
274
|
+
border-radius: var(--input-border-radius, 6px);
|
|
275
|
+
color: var(--input-color, inherit);
|
|
276
|
+
fill: var(--input-color, inherit);
|
|
277
|
+
font-size: var(--input-font-size, inherit);
|
|
278
|
+
font-weight: var(--input-font-weight, 500);
|
|
279
|
+
padding: 6px 12px;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.form__input::placeholder {
|
|
283
|
+
opacity: 0.65;
|
|
284
|
+
color: var(--input-placeholder-color, inherit);
|
|
285
|
+
filter: var(--interactive-filter);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.form__input:focus-visible {
|
|
289
|
+
outline: var(--input-focus-outline, var(--outline));
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.form__input--textarea {
|
|
293
|
+
font-family: inherit;
|
|
294
|
+
resize: vertical;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.error {
|
|
298
|
+
color: var(--error-color);
|
|
299
|
+
fill: var(--error-color);
|
|
300
|
+
}
|
|
301
|
+
`,Qg=`
|
|
302
|
+
.btn-group {
|
|
303
|
+
display: grid;
|
|
304
|
+
gap: 8px;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
.btn {
|
|
308
|
+
line-height: inherit;
|
|
309
|
+
border: var(--button-border, var(--border));
|
|
310
|
+
border-radius: var(--button-border-radius, 6px);
|
|
311
|
+
cursor: pointer;
|
|
312
|
+
font-family: inherit;
|
|
313
|
+
font-size: var(--button-font-size, inherit);
|
|
314
|
+
font-weight: var(--button-font-weight, 600);
|
|
315
|
+
padding: var(--button-padding, 6px 16px);
|
|
316
|
+
}
|
|
317
|
+
.btn[disabled] {
|
|
318
|
+
opacity: 0.6;
|
|
319
|
+
pointer-events: none;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.btn--primary {
|
|
323
|
+
color: var(--button-primary-color, var(--accent-foreground));
|
|
324
|
+
fill: var(--button-primary-color, var(--accent-foreground));
|
|
325
|
+
background: var(--button-primary-background, var(--accent-background));
|
|
326
|
+
border: var(--button-primary-border, var(--border));
|
|
327
|
+
border-radius: var(--button-primary-border-radius, 6px);
|
|
328
|
+
font-weight: var(--button-primary-font-weight, 500);
|
|
329
|
+
}
|
|
330
|
+
.btn--primary:hover {
|
|
331
|
+
color: var(--button-primary-hover-color, var(--accent-foreground));
|
|
332
|
+
fill: var(--button-primary-hover-color, var(--accent-foreground));
|
|
333
|
+
background: var(--button-primary-hover-background, var(--accent-background));
|
|
334
|
+
filter: var(--interactive-filter);
|
|
335
|
+
}
|
|
336
|
+
.btn--primary:focus-visible {
|
|
337
|
+
background: var(--button-primary-hover-background, var(--accent-background));
|
|
338
|
+
filter: var(--interactive-filter);
|
|
339
|
+
outline: var(--button-primary-focus-outline, var(--outline));
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.btn--default {
|
|
343
|
+
color: var(--button-color, var(--foreground));
|
|
344
|
+
fill: var(--button-color, var(--foreground));
|
|
345
|
+
background: var(--button-background, var(--background));
|
|
346
|
+
border: var(--button-border, var(--border));
|
|
347
|
+
border-radius: var(--button-border-radius, 6px);
|
|
348
|
+
font-weight: var(--button-font-weight, 500);
|
|
349
|
+
}
|
|
350
|
+
.btn--default:hover {
|
|
351
|
+
color: var(--button-color, var(--foreground));
|
|
352
|
+
fill: var(--button-color, var(--foreground));
|
|
353
|
+
background: var(--button-hover-background, var(--background));
|
|
354
|
+
filter: var(--interactive-filter);
|
|
355
|
+
}
|
|
356
|
+
.btn--default:focus-visible {
|
|
357
|
+
background: var(--button-hover-background, var(--background));
|
|
358
|
+
filter: var(--interactive-filter);
|
|
359
|
+
outline: var(--button-focus-outline, var(--outline));
|
|
360
|
+
}
|
|
361
|
+
`,$g=`
|
|
362
|
+
.success__position {
|
|
363
|
+
position: fixed;
|
|
364
|
+
inset: var(--dialog-inset);
|
|
365
|
+
padding: var(--page-margin);
|
|
366
|
+
z-index: var(--z-index);
|
|
367
|
+
}
|
|
368
|
+
.success__content {
|
|
369
|
+
background: var(--success-background, var(--background));
|
|
370
|
+
border: var(--success-border, var(--border));
|
|
371
|
+
border-radius: var(--success-border-radius, 1.7em/50%);
|
|
372
|
+
box-shadow: var(--success-box-shadow, var(--box-shadow));
|
|
373
|
+
font-weight: var(--success-font-weight, 600);
|
|
374
|
+
color: var(--success-color);
|
|
375
|
+
fill: var(--success-color);
|
|
376
|
+
padding: 12px 24px;
|
|
377
|
+
line-height: 1.75em;
|
|
378
|
+
|
|
379
|
+
display: grid;
|
|
380
|
+
align-items: center;
|
|
381
|
+
grid-auto-flow: column;
|
|
382
|
+
gap: 6px;
|
|
383
|
+
cursor: default;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.success__icon {
|
|
387
|
+
display: flex;
|
|
388
|
+
}
|
|
389
|
+
`;function e_(e){let t=z.createElement(`style`);return t.textContent=`
|
|
390
|
+
:host {
|
|
391
|
+
--dialog-inset: var(--inset);
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
${Yg}
|
|
395
|
+
${Xg}
|
|
396
|
+
${Zg}
|
|
397
|
+
${Qg}
|
|
398
|
+
${$g}
|
|
399
|
+
`,e&&t.setAttribute(`nonce`,e),t}function t_(){let e=A().getUser(),t=j().getUser(),n=un().getUser();return e&&Object.keys(e).length?e:t&&Object.keys(t).length?t:n}var n_=(()=>({name:`FeedbackModal`,setupOnce(){},createDialog:({options:e,screenshotIntegration:t,sendFeedback:n,shadow:r})=>{let i=r,a=e.useSentryUser,o=t_(),s=z.createElement(`div`),c=e_(e.styleNonce),l=``,u={get el(){return s},appendToDom(){!i.contains(c)&&!i.contains(s)&&(i.appendChild(c),i.appendChild(s))},removeFromDom(){s.remove(),c.remove(),z.body.style.overflow=l},open(){var t,n;f(!0),(t=e.onFormOpen)==null||t.call(e),(n=M())==null||n.emit(`openFeedbackWidget`),l=z.body.style.overflow,z.body.style.overflow=`hidden`},close(){f(!1),z.body.style.overflow=l}},d=t==null?void 0:t.createInput({h:V,hooks:Ig,dialog:u,options:e}),f=t=>{ig(V(Jg,{options:e,screenshotInput:d,showName:e.showName||e.isNameRequired,showEmail:e.showEmail||e.isEmailRequired,defaultName:String(a&&(o==null?void 0:o[a.name])||``),defaultEmail:String(a&&(o==null?void 0:o[a.email])||``),onFormClose:()=>{var t;f(!1),(t=e.onFormClose)==null||t.call(e)},onSubmit:n,onSubmitSuccess:(t,n)=>{var r;f(!1),(r=e.onSubmitSuccess)==null||r.call(e,t,n)},onSubmitError:t=>{var n;(n=e.onSubmitError)==null||n.call(e,t)},onFormSubmitted:()=>{var t;(t=e.onFormSubmitted)==null||t.call(e)},open:t}),s)};return u}}));function r_({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 i_(e){let t=z.createElement(`style`),n=`#1A141F`,r=`#302735`;return t.textContent=`
|
|
400
|
+
.editor {
|
|
401
|
+
display: flex;
|
|
402
|
+
flex-grow: 1;
|
|
403
|
+
flex-direction: column;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.editor__image-container {
|
|
407
|
+
justify-items: center;
|
|
408
|
+
padding: 15px;
|
|
409
|
+
position: relative;
|
|
410
|
+
height: 100%;
|
|
411
|
+
border-radius: var(--menu-border-radius, 6px);
|
|
412
|
+
|
|
413
|
+
background-color: ${n};
|
|
414
|
+
background-image: repeating-linear-gradient(
|
|
415
|
+
-145deg,
|
|
416
|
+
transparent,
|
|
417
|
+
transparent 8px,
|
|
418
|
+
${n} 8px,
|
|
419
|
+
${n} 11px
|
|
420
|
+
),
|
|
421
|
+
repeating-linear-gradient(
|
|
422
|
+
-45deg,
|
|
423
|
+
transparent,
|
|
424
|
+
transparent 15px,
|
|
425
|
+
${r} 15px,
|
|
426
|
+
${r} 16px
|
|
427
|
+
);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.editor__canvas-container {
|
|
431
|
+
width: 100%;
|
|
432
|
+
height: 100%;
|
|
433
|
+
position: relative;
|
|
434
|
+
display: flex;
|
|
435
|
+
align-items: center;
|
|
436
|
+
justify-content: center;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.editor__canvas-container > * {
|
|
440
|
+
object-fit: contain;
|
|
441
|
+
position: absolute;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.editor__tool-container {
|
|
445
|
+
padding-top: 8px;
|
|
446
|
+
display: flex;
|
|
447
|
+
justify-content: center;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.editor__tool-bar {
|
|
451
|
+
display: flex;
|
|
452
|
+
gap: 8px;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
.editor__tool {
|
|
456
|
+
display: flex;
|
|
457
|
+
padding: 8px 12px;
|
|
458
|
+
justify-content: center;
|
|
459
|
+
align-items: center;
|
|
460
|
+
border: var(--button-border, var(--border));
|
|
461
|
+
border-radius: var(--button-border-radius, 6px);
|
|
462
|
+
background: var(--button-background, var(--background));
|
|
463
|
+
color: var(--button-color, var(--foreground));
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
.editor__tool--active {
|
|
467
|
+
background: var(--button-primary-background, var(--accent-background));
|
|
468
|
+
color: var(--button-primary-color, var(--accent-foreground));
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.editor__rect {
|
|
472
|
+
position: absolute;
|
|
473
|
+
z-index: 2;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
.editor__rect button {
|
|
477
|
+
opacity: 0;
|
|
478
|
+
position: absolute;
|
|
479
|
+
top: -12px;
|
|
480
|
+
right: -12px;
|
|
481
|
+
cursor: pointer;
|
|
482
|
+
padding: 0;
|
|
483
|
+
z-index: 3;
|
|
484
|
+
border: none;
|
|
485
|
+
background: none;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.editor__rect:hover button {
|
|
489
|
+
opacity: 1;
|
|
490
|
+
}
|
|
491
|
+
`,e&&t.setAttribute(`nonce`,e),t}function a_({h:e}){return function({action:t,setAction:n,options:r}){return e(`div`,{class:`editor__tool-container`},e(`div`,{class:`editor__tool-bar`},e(`button`,{type:`button`,class:`editor__tool ${t===`highlight`?`editor__tool--active`:``}`,onClick:()=>{n(t===`highlight`?``:`highlight`)}},r.highlightToolText),e(`button`,{type:`button`,class:`editor__tool ${t===`hide`?`editor__tool--active`:``}`,onClick:()=>{n(t===`hide`?``:`hide`)}},r.hideToolText)))}}var o_=2,s_=300;function c_(e,t){return new Promise(n=>{let r=setTimeout(n,t),i=e,a=()=>{--i,i>0?xm.requestAnimationFrame(a):(clearTimeout(r),n())};xm.requestAnimationFrame(a)})}function l_({hooks:e}){function t(){let[t,n]=e.useState(xm.devicePixelRatio??1);return e.useEffect(()=>{let e=()=>{n(xm.devicePixelRatio)},t=matchMedia(`(resolution: ${xm.devicePixelRatio}dppx)`);return t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)}},[]),t}return function({onBeforeScreenshot:n,onScreenshot:r,onAfterScreenshot:i,onError:a}){let o=t();e.useEffect(()=>{(async()=>{n(),await c_(o_,s_);let e=await Sm.mediaDevices.getDisplayMedia({video:{width:xm.innerWidth*o,height:xm.innerHeight*o},audio:!1,monitorTypeSurfaces:`exclude`,preferCurrentTab:!0,selfBrowserSurface:`include`,surfaceSwitching:`exclude`}),t=z.createElement(`video`);await new Promise((n,i)=>{t.srcObject=e,t.onloadedmetadata=()=>{r(t,o),e.getTracks().forEach(e=>e.stop()),n()},t.play().catch(i)}),i()})().catch(a)},[])}}function u_(e,t,n){switch(e.type){case`highlight`:t.save(),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),t.restore();break;case`hide`:t.fillStyle=`rgb(0, 0, 0)`,t.fillRect(e.x,e.y,e.w,e.h)}}function d_(e,t,n){if(!e)return;let r=e.getContext(`2d`,t);r&&n(e,r)}function f_(e,t){d_(e,{alpha:!0},(e,n)=>{n.drawImage(t,0,0,t.width,t.height,0,0,e.width,e.height)})}function p_(e,t,n){d_(e,{alpha:!0},(e,r)=>{n.length&&(r.fillStyle=`rgba(0, 0, 0, 0.25)`,r.fillRect(0,0,e.width,e.height)),n.forEach(e=>{u_(e,r,t)})})}function m_({h:e,hooks:t,outputBuffer:n,dialog:r,options:i}){let a=l_({hooks:t}),o=a_({h:e}),s=r_({h:e}),c={__html:i_(i.styleNonce).innerText},l=r.el.style,u=({screenshot:r})=>{let[a,l]=t.useState(`highlight`),[u,d]=t.useState([]),f=t.useRef(null),p=t.useRef(null),m=t.useRef(null),h=t.useRef(null),[g,_]=t.useState(1),v=t.useMemo(()=>{let e=z.getElementById(i.id);if(!e)return`white`;let t=getComputedStyle(e);return t.getPropertyValue(`--button-primary-background`)||t.getPropertyValue(`--accent-background`)},[i.id]);t.useLayoutEffect(()=>{let e=()=>{let t=f.current;t&&(d_(r.canvas,{alpha:!1},e=>{let n=Math.min(t.clientWidth/e.width,t.clientHeight/e.height);_(n)}),(t.clientHeight===0||t.clientWidth===0)&&setTimeout(e,0))};return e(),xm.addEventListener(`resize`,e),()=>{xm.removeEventListener(`resize`,e)}},[r]);let y=t.useCallback((e,t)=>{d_(e,{alpha:!0},(e,n)=>{n.scale(t,t),e.width=r.canvas.width,e.height=r.canvas.height})},[r]);t.useEffect(()=>{y(p.current,r.dpi),f_(p.current,r.canvas)},[r]),t.useEffect(()=>{y(m.current,r.dpi),d_(m.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),p_(m.current,v,u)},[u,v]),t.useEffect(()=>{y(n,r.dpi),f_(n,r.canvas),d_(z.createElement(`canvas`),{alpha:!0},(e,t)=>{t.scale(r.dpi,r.dpi),e.width=r.canvas.width,e.height=r.canvas.height,p_(e,v,u),f_(n,e)})},[u,r,v]);let b=e=>{if(!a||!h.current)return;let t=h.current.getBoundingClientRect(),n={type:a,x:(e.clientX-t.x)/g,y:(e.clientY-t.y)/g},r=(e,n)=>{let r=(n.clientX-t.x)/g,i=(n.clientY-t.y)/g;return{type:e.type,x:Math.min(e.x,r),y:Math.min(e.y,i),w:Math.abs(r-e.x),h:Math.abs(i-e.y)}},i=e=>{d_(m.current,{alpha:!0},(e,t)=>{t.clearRect(0,0,e.width,e.height)}),p_(m.current,v,[...u,r(n,e)])},o=e=>{let t=r(n,e);t.w*g>=1&&t.h*g>=1&&d(e=>[...e,t]),z.removeEventListener(`mousemove`,i),z.removeEventListener(`mouseup`,o)};z.addEventListener(`mousemove`,i),z.addEventListener(`mouseup`,o)},x=t.useCallback(e=>t=>{t.preventDefault(),t.stopPropagation(),d(t=>{let n=[...t];return n.splice(e,1),n})},[]),S={width:`${r.canvas.width*g}px`,height:`${r.canvas.height*g}px`},C=e=>{e.stopPropagation()};return e(`div`,{class:`editor`},e(`style`,{nonce:i.styleNonce,dangerouslySetInnerHTML:c}),e(`div`,{class:`editor__image-container`},e(`div`,{class:`editor__canvas-container`,ref:f},e(`canvas`,{ref:p,id:`background`,style:S}),e(`canvas`,{ref:m,id:`foreground`,style:S}),e(`div`,{ref:h,onMouseDown:b,style:S},u.map((t,n)=>e(`div`,{key:n,class:`editor__rect`,style:{top:`${t.y*g}px`,left:`${t.x*g}px`,width:`${t.w*g}px`,height:`${t.h*g}px`}},e(`button`,{"aria-label":i.removeHighlightText,onClick:x(n),onMouseDown:C,onMouseUp:C,type:`button`},e(s,null))))))),e(o,{options:i,action:a,setAction:l}))};return function({onError:r}){let[i,o]=t.useState();return a({onBeforeScreenshot:t.useCallback(()=>{l.display=`none`},[]),onScreenshot:t.useCallback((e,t)=>{d_(z.createElement(`canvas`),{alpha:!1},(n,r)=>{r.scale(t,t),n.width=e.videoWidth,n.height=e.videoHeight,r.drawImage(e,0,0,n.width,n.height),o({canvas:n,dpi:t})}),n.width=e.videoWidth,n.height=e.videoHeight},[]),onAfterScreenshot:t.useCallback(()=>{l.display=`block`},[]),onError:t.useCallback(e=>{l.display=`block`,r(e)},[])}),i?e(u,{screenshot:i}):e(`div`,null)}}var h_=(()=>({name:`FeedbackScreenshot`,setupOnce(){},createInput:({h:e,hooks:t,dialog:n,options:r})=>{let i=z.createElement(`canvas`);return{input:m_({h:e,hooks:t,outputBuffer:i,dialog:n,options:r}),value:async()=>{let e=await new Promise(e=>{i.toBlob(e,`image/png`)});if(e)return{data:new Uint8Array(await e.arrayBuffer()),filename:`screenshot.png`,contentType:`application/png`}}}}})),g_=-1,__=()=>g_,v_=e=>{addEventListener(`pageshow`,t=>{t.persisted&&(g_=t.timeStamp,e(t))},!0)},y_=(e,t,n,r)=>{let i,a;return o=>{t.value>=0&&(o||r)&&(a=t.value-(i??0),(a||i===void 0)&&(i=t.value,t.delta=a,t.rating=((e,t)=>e>t[1]?`poor`:e>t[0]?`needs-improvement`:`good`)(t.value,n),e(t)))}},b_=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},x_=()=>{let e=performance.getEntriesByType(`navigation`)[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},S_=()=>{var e;return((e=x_())==null?void 0:e.activationStart)??0},C_=-1,w_=new Set,T_=()=>document.visibilityState!==`hidden`||document.prerendering?1/0:0,E_=e=>{if(document.visibilityState===`hidden`){if(e.type===`visibilitychange`)for(let e of w_)e();isFinite(C_)||(C_=e.type===`visibilitychange`?e.timeStamp:0,removeEventListener(`prerenderingchange`,E_,!0))}},D_=(e=!1)=>{if(e&&(C_=1/0),C_<0){var t;let e=S_();C_=(document.prerendering||(t=globalThis.performance.getEntriesByType(`visibility-state`).find(t=>t.name===`hidden`&&t.startTime>=e))==null?void 0:t.startTime)??T_(),addEventListener(`visibilitychange`,E_,!0),addEventListener(`prerenderingchange`,E_,!0),v_(()=>{setTimeout(()=>{C_=T_()})})}return{get firstHiddenTime(){return C_},onHidden(e){w_.add(e)}}},O_=(e,t=-1,n,r=0,i,a,o)=>{let s=x_(),c=(s==null?void 0:s.navigationId)||0,l=`navigate`;return n?l=n:__()>=0?l=`back-forward-cache`:s&&(document.prerendering||S_()>0?l=`prerender`:document.wasDiscarded?l=`restore`:s.type&&(l=s.type.replace(/_/g,`-`))),{name:e,value:t,rating:`good`,delta:0,entries:[],id:`v6-${Date.now()}-${Math.floor(0x82f79cd8fff*Math.random())+1e12}`,navigationType:l,navigationId:r||c,navigationInteractionId:i,navigationURL:a||(s==null?void 0:s.name),navigationStartTime:o||0}},k_=new WeakMap;function A_(e,t){let n=k_.get(t);return n||(n=new WeakMap,k_.set(t,n)),n.get(e)||n.set(e,new t),n.get(e)}var j_=class{constructor(){t(this,`t`,void 0),t(this,`i`,0),t(this,`o`,[])}h(e){var t;if(e.hadRecentInput)return;let n=this.o[0],r=this.o.at(-1);this.i&&n&&r&&e.startTime-r.startTime<1e3&&e.startTime-n.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),(t=this.t)==null||t.call(this,e)}},M_=(e,t,n={})=>{try{let r=e.filter(e=>PerformanceObserver.supportedEntryTypes.includes(e));if(r.length>0){let e=new PerformanceObserver(e=>{queueMicrotask(()=>{let n=e.getEntries();r.length>1&&n.sort((e,t)=>e.startTime+e.duration-(t.startTime+t.duration)),t(n)})});for(let t of r)e.observe({type:t,buffered:!0,...n});return e}}catch{}},N_=e=>{var t,n;return((t=globalThis.PerformanceObserver)==null||(t=t.supportedEntryTypes)==null?void 0:t.includes(`soft-navigation`))&&typeof((n=globalThis.PerformanceSoftNavigation)==null||(n=n.prototype)==null?void 0:n.getLargestInteractionContentfulPaint)==`function`&&e&&e.reportSoftNavs},P_=(e,t)=>{if(e.set(t.navigationId,t),e.size>2){let t=e.keys().next().value;t!==void 0&&e.delete(t)}},F_=e=>{let t=!1;return()=>{t||=(e(),!0)}},I_=class{constructor(){t(this,`l`,void 0)}},L_=e=>{document.prerendering?addEventListener(`prerenderingchange`,e,!0):e()},R_=[1800,3e3],z_=(e,t={})=>{let n=N_(t);L_(()=>{let r=A_(t,I_),i=D_(),a,o=O_(`FCP`),s=M_([`paint`],e=>{for(let t of e)t.name===`first-contentful-paint`&&(s.disconnect(),t.startTime<i.firstHiddenTime&&(o.value=Math.max(t.startTime-S_(),0),o.entries.push(t),o.navigationId=t.navigationId||o.navigationId,a(!0)))});s&&(a=y_(e,o,R_,t.reportAllChanges),v_(n=>{o=O_(`FCP`,-1,`back-forward-cache`,o.navigationId,o.navigationInteractionId,o.navigationURL,__()),a=y_(e,o,R_,t.reportAllChanges),b_(()=>{o.value=performance.now()-n.timeStamp,a(!0)})})),n&&M_([`soft-navigation`],n=>{n.forEach(n=>{r.l&&n.navigationId&&P_(r.l,n),o=O_(`FCP`,Math.max((n.presentationTime||n.paintTime||0)-n.startTime,0),`soft-navigation`,n.navigationId,n.interactionId,n.name,n.startTime),a=y_(e,o,R_,t.reportAllChanges),a(!0)})},t)})},B_=[.1,.25],V_=(e,t={})=>{let n=D_();z_(F_(()=>{let r,i=O_(`CLS`,0),a=A_(t,j_),o=(n,o,s,c,l)=>{i=O_(`CLS`,0,n,o,s,c,l),a.i=0,r=y_(e,i,B_,t.reportAllChanges)},s=(e=!1)=>{a.i>i.value&&(i.value=a.i,i.entries=a.o),r(e)},c=e=>{s(!0),o(`soft-navigation`,e.navigationId,e.interactionId,e.name,e.startTime)},l=e=>{for(let t of e)t.entryType===`soft-navigation`?c(t):a.h(t);s()},u=[`layout-shift`];N_(t)&&u.push(`soft-navigation`);let d=M_(u,l);d&&(r=y_(e,i,B_,t.reportAllChanges),n.onHidden(()=>{l(d.takeRecords()),r(!0)}),v_(()=>{o(`back-forward-cache`,i.navigationId,i.navigationInteractionId,i.navigationURL,__()),b_(r)}),setTimeout(r))}))},H_=0,U_=1/0,W_=0,G_=e=>{for(let t of e)t.interactionId&&(U_=Math.min(U_,t.interactionId),W_=Math.max(W_,t.interactionId),H_=W_?(W_-U_)/7+1:0)},K_,q_=()=>K_?H_:performance.interactionCount??0,J_=()=>{`interactionCount`in performance||K_||(K_=M_([`event`],G_,{durationThreshold:0}))},Y_=class{constructor(){t(this,`u`,0),t(this,`v`,[]),t(this,`m`,new Map),t(this,`p`,void 0),t(this,`T`,void 0)}_(){return q_()-this.u}M(){this.u=q_(),this.v.length=0,this.m.clear()}L(e){let t=this._(),n=Math.min(this.v.length-1,Math.floor(t/50));return!t||n!==-1||e!==`soft-navigation`&&e!==`back-forward-cache`?this.v[n]:{P:8,id:-1,entries:[]}}h(e){var t;if((t=this.p)==null||t.call(this,e),!e.interactionId)return;let n=this.v.at(-1),r=this.m.get(e.interactionId);if(r||this.v.length<10||e.duration>n.P){var i;if(r?e.duration>r.P?(r.entries=[e],r.P=e.duration):e.duration===r.P&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],P:e.duration},this.m.set(r.id,r),this.v.push(r)),this.v.sort((e,t)=>t.P-e.P),this.v.length>10){let e=this.v.splice(10);for(let t of e)this.m.delete(t.id)}(i=this.T)==null||i.call(this,r)}}},X_=e=>{let t=`requestIdleCallback`in globalThis?1e3:0,n=globalThis.requestIdleCallback||setTimeout,r=globalThis.cancelIdleCallback||clearTimeout;if(document.visibilityState===`hidden`)e();else{let i=F_(e),a=-1,o=()=>{r(a),i()};addEventListener(`visibilitychange`,o,{once:!0,capture:!0}),a=n(()=>{removeEventListener(`visibilitychange`,o,{capture:!0}),i()},{timeout:t})}},Z_=[200,500],Q_=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!(`interactionId`in PerformanceEventTiming.prototype))return;let n=D_();L_(()=>{J_();let r,i=O_(`INP`),a=A_(t,Y_),o=(n,o,s,c,l)=>{a.M(),i=O_(`INP`,-1,n,o,s,c,l),r=y_(e,i,Z_,t.reportAllChanges)},s=()=>{let e=a.L(i.navigationType);e&&e.P!==i.value&&(i.value=e.P,i.entries=e.entries,r())},c=e=>{s(),r(!0),o(`soft-navigation`,e.navigationId,e.interactionId,e.name,e.startTime)},l=(e,t=!1)=>{X_(()=>{for(let t of e)t.entryType===`soft-navigation`?c(t):a.h(t);s(),t&&r(!0)})},u=[`event`,`first-input`];N_(t)&&u.push(`soft-navigation`);let d=M_(u,l,{...t,durationThreshold:t.durationThreshold??40});r=y_(e,i,Z_,t.reportAllChanges),d&&(n.onHidden(()=>{l(d.takeRecords(),!0)}),v_(()=>{o(`back-forward-cache`,i.navigationId,i.navigationInteractionId,i.navigationURL,__())}))})},$_=class{constructor(){t(this,`p`,void 0),t(this,`l`,void 0)}h(e){var t;(t=this.p)==null||t.call(this,e)}},e1=[2500,4e3],t1=(e,t={})=>{let n=!1,r=N_(t);L_(()=>{let i,a=D_(),o=O_(`LCP`),s=A_(t,$_),c=(r,s,c,l,u)=>{o=O_(`LCP`,-1,r,s,c,l,u),i=y_(e,o,e1,t.reportAllChanges),n=!1,r===`soft-navigation`&&(a=D_(!0))},l=e=>{var t;s.l&&e.navigationId&&P_(s.l,e),n||i(!0),c(`soft-navigation`,e.navigationId,e.interactionId,e.name,e.startTime);let r=(t=e.getLargestInteractionContentfulPaint)==null?void 0:t.call(e);r&&u([r])},u=e=>{t.reportAllChanges||r||(e=e.slice(-1));for(let t of e){if(!t)continue;if(t.entryType===`soft-navigation`){l(t);continue}let e=0,r=[],c=t.startTime;if(t.entryType===`largest-contentful-paint`)e=Math.max(t.startTime-S_(),0),s.h(t),r=[t];else if(t.entryType===`interaction-contentful-paint`){var n;let i=t;if(!o.navigationId||`interactionId`in i&&i.interactionId!=o.navigationInteractionId)continue;c=((n=i.largestContentfulPaint)==null?void 0:n.renderTime)||0,e=Math.max(c-t.startTime,0),i.largestContentfulPaint&&(s.h(i.largestContentfulPaint),r=[i.largestContentfulPaint])}c<a.firstHiddenTime&&(o.value=e,o.entries=r,i())}},d=[`largest-contentful-paint`];r&&d.push(`interaction-contentful-paint`,`soft-navigation`);let f=M_(d,u);if(f){i=y_(e,o,e1,t.reportAllChanges);let a=[`keydown`,`click`,`visibilitychange`],s=e=>{if(e.isTrusted&&!n){let e=o.id;X_(()=>{if(!n){if(!r){f.disconnect();for(let e of a)removeEventListener(e,s,{capture:!0})}e===o.id&&(n=!0,i(!0))}})}};for(let e of a)addEventListener(e,s,{capture:!0});v_(r=>{c(`back-forward-cache`,o.navigationId,o.navigationInteractionId,o.navigationURL,__()),i=y_(e,o,e1,t.reportAllChanges),b_(()=>{o.value=performance.now()-r.timeStamp,n=!0,i(!0)})})}})},n1=[800,1800],r1=e=>{document.prerendering?L_(()=>r1(e)):document.readyState===`complete`?setTimeout(e):addEventListener(`load`,()=>r1(e),!0)},i1=(e,t={})=>{let n=N_(t),r=O_(`TTFB`),i=y_(e,r,n1,t.reportAllChanges);r1(()=>{let a=x_();if(a){let o=a.responseStart;r.value=Math.max(o-S_(),0),r.entries=[a],i(!0),v_(()=>{r=O_(`TTFB`,0,`back-forward-cache`,r.navigationId,r.navigationInteractionId,r.navigationURL,__()),i=y_(e,r,n1,t.reportAllChanges),i(!0)}),n&&M_([`soft-navigation`],n=>{n.forEach(n=>{n.navigationId&&(r=O_(`TTFB`,0,`soft-navigation`,n.navigationId,n.interactionId,n.name,n.startTime),r.entries=[n],i=y_(e,r,n1,t.reportAllChanges),i(!0))})},t)}})},a1=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,o1={},s1={},c1,l1,u1,d1,f1,p1={},m1=!1,h1=!1;function g1(){m1=!0}function _1(){h1=!0}function v1(e,t=!1){return j1(`cls`,e,E1,c1,t)}function y1(e,t=!1){return j1(`lcp`,e,D1,l1,t)}function b1(e){return j1(`ttfb`,e,O1,u1)}function x1(e){return j1(`fcp`,e,k1,f1)}function S1(e){return j1(`inp`,e,A1,d1)}function C1(e,t){return N1(e,t),s1[e]||(M1(e),s1[e]=!0),P1(e,t)}function w1(e,t){let n=o1[e];if(n!=null&&n.length)for(let r of n)try{r(t)}catch(t){a1&&b.error(`Error while triggering instrumentation handler.
|
|
492
|
+
Type: ${e}
|
|
493
|
+
Name: ${D(r)}
|
|
494
|
+
Error:`,t)}}function T1(e){return t=>{(h1||t.navigationType!==`back-forward-cache`)&&e(t)}}function E1(){return V_(T1(e=>{w1(`cls`,{metric:e}),c1=e}),{reportAllChanges:!m1&&!h1,reportSoftNavs:m1})}function D1(){return t1(T1(e=>{w1(`lcp`,{metric:e}),l1=e}),{reportAllChanges:!m1&&!h1,reportSoftNavs:m1})}function O1(){return i1(T1(e=>{w1(`ttfb`,{metric:e}),u1=e}))}function k1(){return z_(T1(e=>{w1(`fcp`,{metric:e}),f1=e}))}function A1(){return Q_(T1(e=>{w1(`inp`,{metric:e}),d1=e}),{reportSoftNavs:m1})}function j1(e,t,n,r,i=!1){return N1(e,t),s1[e]||(s1[e]=!0,Promise.resolve().then(()=>{p1[e]=n()})),r&&t({metric:r}),P1(e,t,i)}function M1(e){let t={type:e,buffered:!0};e===`event`&&(t.durationThreshold=0);try{PerformanceObserver.supportedEntryTypes.includes(e)&&new PerformanceObserver(t=>{Promise.resolve().then(()=>{w1(e,{entries:t.getEntries()})})}).observe(t)}catch{}}function N1(e,t){o1[e]=o1[e]||[],o1[e].push(t)}function P1(e,t,n=!1){return()=>{if(n){var r;(r=p1[e])==null||r.call(p1)}let i=o1[e];if(!i)return;let a=i.indexOf(t);a!==-1&&i.splice(a,1)}}function F1(e){return`duration`in e}var W=r,I1=5,L1=5,R1,z1,B1,V1=new Kp(I1),H1=new Kp(I1),U1=!1;function W1(e,t){return Math.abs(e-t)<=L1}function G1(){try{var e;return PerformanceObserver.supportedEntryTypes.includes(`soft-navigation`)&&typeof((e=W.PerformanceSoftNavigation)==null||(e=e.prototype)==null?void 0:e.getLargestInteractionContentfulPaint)==`function`}catch{return!1}}function K1(e){if(U1||!G1())return;U1=!0;let t=e=>{e.isTrusted&&(B1=e.timeStamp)};W.addEventListener(`click`,t,{capture:!0,passive:!0}),W.addEventListener(`keydown`,t,{capture:!0,passive:!0}),e.on(`spanStart`,e=>{var t;if(((t=P(e).attributes)==null?void 0:t[`sentry.op`])!==`navigation`)return;R1=void 0;let n=B1;n!=null&&((z1==null?void 0:z1.interactionTimestamp)===n?(V1.set(z1.interactionId,e),z1=void 0):R1={span:e,interactionTimestamp:n})});let n=({entries:e})=>{for(let t of e){if(!F1(t)||!t.interactionId)continue;let e=R1;e&&W1(t.startTime,e.interactionTimestamp)?(V1.set(t.interactionId,e.span),R1=void 0):V1.get(t.interactionId)||B1!=null&&W1(t.startTime,B1)&&(z1={interactionId:t.interactionId,interactionTimestamp:B1})}};C1(`event`,n),C1(`first-input`,n),C1(`soft-navigation`,({entries:e})=>{for(let t of e){let e=V1.get(t.interactionId);e?(H1.set(t.navigationId,e),e.setAttribute(vn,t.navigationId)):a1&&b.log(`[SoftNav] No navigation span found for soft navigation ${t.navigationId}`,t)}})}function q1(e){return e.navigationType===`soft-navigation`?H1.get(e.navigationId)||(e.navigationInteractionId==null?void 0:V1.get(e.navigationInteractionId)):void 0}function J1(e){return typeof e==`number`&&isFinite(e)}function Y1(e,t,n,{...r}){let i=yi(e).start_timestamp;return i&&i>t&&typeof e.updateStartTime==`function`&&e.updateStartTime(t),Io(e,()=>{let e=ts({startTime:t,...r});return e&&e.end(n),e})}function X1(){return W.addEventListener&&W.performance}function Z1(e){return e/1e3}function Q1(e){let t=`unknown`,n=`unknown`,r=``;for(let i of e){if(i===`/`){[t,n]=e.split(`/`);break}if(!isNaN(Number(i))){t=r===`h`?`http`:r,n=e.split(r)[1];break}r+=i}return r===e&&(t=r),{name:t,version:n}}function $1(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function e0(e){let t={};if(e.nextHopProtocol!=null){let{name:n,version:r}=Q1(e.nextHopProtocol);t[`network.protocol.version`]=r,t[`network.protocol.name`]=n}if(Ot(e.startTime)===void 0)return t;let n=t=>t&&Ot(t,e.startTime);return t0({...t,"http.request.redirect_start":n(e.redirectStart),"http.request.redirect_end":n(e.redirectEnd),"http.request.worker_start":n(e.workerStart),"http.request.fetch_start":n(e.fetchStart),"http.request.domain_lookup_start":n(e.domainLookupStart),"http.request.domain_lookup_end":n(e.domainLookupEnd),"http.request.connect_start":n(e.connectStart),"http.request.secure_connection_start":n(e.secureConnectionStart),"http.request.connection_end":n(e.connectEnd),"http.request.request_start":n(e.requestStart),"http.request.response_start":n(e.responseStart),"http.request.response_end":n(e.responseEnd),"http.request.time_to_first_byte":e.responseStart==null?void 0:Z1(e.responseStart)})}function t0(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!=null))}var n0=0x7fffffff,r0=0;function i0(){C1(`longtask`,({entries:e})=>{let t=F();if(!t)return;let{attributes:n,start_timestamp:r}=P(t);for(let i of e){let e=Ot(i.startTime);if(!e)continue;let a=Z1(i.duration);n[`sentry.op`]===`navigation`&&r&&e<r||Y1(t,e,e+a,{name:Xs,op:Ls,attributes:{[N]:`auto.ui.browser.metrics`}})}})}function a0(){new PerformanceObserver(e=>{let t=F();if(t)for(let n of e.getEntries()){let e=Ot(n.startTime);if(!e||!n.scripts[0])continue;let{start_timestamp:r,attributes:{[Gn]:i}}=P(t);if(i===`navigation`&&r&&e<r)continue;let a=Z1(n.duration),o={[N]:`auto.ui.browser.metrics`},{invoker:s,invokerType:c,sourceURL:l,sourceFunctionName:u,sourceCharPosition:d}=n.scripts[0];o[`browser.script.invoker`]=s,o[`browser.script.invoker_type`]=c,l&&(o[Sn]=l),u&&(o[Cn]=u),d!==-1&&(o[`browser.script.source_char_position`]=d),Y1(t,e,e+a,{name:Xs,op:Rs,attributes:o})}}).observe({type:`long-animation-frame`,buffered:!0})}function o0(e,t){let n=X1();if(!(n!=null&&n.getEntries))return;let{spanStreamingEnabled:r,ignoreResourceSpans:i}=t,a=n.getEntries(),{attributes:o,start_timestamp:s}=P(e);a.slice(r0).forEach(t=>{let n=Ot(t.startTime);if(!n)return;let a=Z1(Math.max(0,t.duration));if(!(o[`sentry.op`]===`navigation`&&s&&n<s))switch(t.entryType){case`navigation`:c0(e,t,r);break;case`paint`:s0(e,t,n,a);break;case`resource`:m0(e,t,t.name,n,a,i,r)}}),r0=Math.max(a.length-1,0),h0(e,r)}function s0(e,t,n,r){Y1(e,n,n+r,{name:t.name,attributes:{[Gn]:Es,[N]:`auto.resource.browser.metrics`,[bn]:t.name}})}function c0(e,t,n){d0(e,t,`unloadEvent`,n),d0(e,t,`redirect`,n),d0(e,t,`domContentLoadedEvent`,n),d0(e,t,`loadEvent`,n),d0(e,t,`connect`,n),d0(e,t,`secureConnection`,n),d0(e,t,`fetch`,n),d0(e,t,`domainLookup`,n),p0(e,t,n)}function l0(e,t){return Ot(t,e.startTime)}var u0={secureConnection:Ms,fetch:Ns,domainLookup:Ps,unloadEvent:Ds,redirect:Os,connect:js,domContentLoadedEvent:ks,loadEvent:As};function d0(e,t,n,r){let i=t[f0(n)],a=t[`${n}Start`];if(!a||!i)return;let o=u0[n],s=R(t.name);Y1(e,l0(t,a),l0(t,i),{name:r?tc[o]:s,attributes:{[Gn]:o,[N]:`auto.ui.browser.metrics`,[cr]:s,...n===`redirect`&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function f0(e){return e===`secureConnection`?`connectEnd`:e===`fetch`?`domainLookupStart`:`${e}End`}function p0(e,t,n){let r=l0(t,t.requestStart),i=l0(t,t.responseEnd),a=l0(t,t.responseStart);if(t.responseEnd){let o=R(t.name);Y1(e,r,i,{name:n?tc[Fs]:o,attributes:{[Gn]:Fs,[N]:`auto.ui.browser.metrics`,[cr]:o}}),Y1(e,a,i,{name:n?tc[Is]:o,attributes:{[Gn]:Is,[N]:`auto.ui.browser.metrics`,[cr]:o}})}}function m0(e,t,n,r,i,a,o){var s;if(t.initiatorType===`xmlhttprequest`||t.initiatorType===`fetch`)return;let c=t.initiatorType?`resource.${t.initiatorType}`:Ts;if(a!=null&&a.includes(c))return;let l={[N]:`auto.resource.browser.metrics`},u=Zu(n);u.protocol&&(l[dr]=u.protocol.split(`:`).pop());let d=(s=u.host)==null?void 0:s.replace(/^.*@/,``);d&&(l[rr]=d);let f=d==null?void 0:d.replace(/:\d+$/,``);f&&(l[or]=f),l[jn]=n.includes(W.location.origin);let p=R(n);l[cr]=p,g0(t,l,[[`responseStatus`,Pn],[`transferSize`,Nn],[`encodedBodySize`,Mn],[`decodedBodySize`,`http.response.body.decoded_size`],[`renderBlockingStatus`,`resource.render_blocking_status`],[`deliveryType`,`http.response_delivery_type`]]);let m={...l,...e0(t)};Y1(e,r,r+i,{name:o?f||`Resource`:p.replace(W.location.origin,``),op:c,attributes:m})}function h0(e,t){let n=W.navigator;if(!n)return;let r=n.connection;r&&(r.effectiveType&&e.setAttribute(t?In:`effectiveConnectionType`,r.effectiveType),r.type&&e.setAttribute(t?Rn:`connectionType`,r.type),J1(r.rtt)&&(t?e.setAttribute(Ln,r.rtt):P(e).attributes[`sentry.op`]===`pageload`&&So(`connection.rtt`,r.rtt,`millisecond`))),J1(n.deviceMemory)&&(t?e.setAttribute(`device.memory.estimated_capacity`,n.deviceMemory):e.setAttribute(`deviceMemory`,`${n.deviceMemory} GB`)),J1(n.hardwareConcurrency)&&(t?e.setAttribute(`device.processor_count`,n.hardwareConcurrency):e.setAttribute(`hardwareConcurrency`,String(n.hardwareConcurrency)))}function g0(e,t,n){n.forEach(([n,r])=>{let i=e[n];i!=null&&(typeof i==`number`&&i<n0||typeof i==`string`)&&(t[r]=i)})}var _0=80,v0={};try{typeof Node<`u`&&(v0.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,`parentNode`).get),typeof Element<`u`&&(v0.tagName=Object.getOwnPropertyDescriptor(Element.prototype,`tagName`).get,v0.id=Object.getOwnPropertyDescriptor(Element.prototype,`id`).get,v0.className=Object.getOwnPropertyDescriptor(Element.prototype,`className`).get,v0.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<`u`&&(v0.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,`dataset`).get)}catch{}function y0(e,t,n){let r=v0[t];if(r)try{return r.call(e,n)}catch{}let i=e[t];return typeof i==`function`?i.call(e,n):i}function b0(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=Array.isArray(t)?void 0:t.maskAttributeFn,l=!Array.isArray(t)&&t.maxStringLength||_0;for(;n&&i++<5&&(o=x0(n,s,c),!(o===`html`||i>1&&a+r.length*3+o.length>=l));)r.push(o),a+=o.length,n=y0(n,`parentNode`);return r.reverse().join(` > `)}catch{return`<unknown>`}}function x0(e,t,n){let r=[],i=y0(e,`tagName`);if(!i)return``;if(typeof HTMLElement<`u`&&e instanceof HTMLElement){let t=y0(e,`dataset`);if(t){if(t.sentryComponent)return n?n(`data-sentry-component`,t.sentryComponent,e):t.sentryComponent;if(t.sentryElement)return n?n(`data-sentry-element`,t.sentryElement,e):t.sentryElement}}r.push(i.toLowerCase());let a=t!=null&&t.length?t.filter(t=>y0(e,`getAttribute`,t)).map(t=>[t,y0(e,`getAttribute`,t)]):null;if(a!=null&&a.length)a.forEach(([t,i])=>{r.push(`[${t}="${n&&i?n(t,i,e):i}"]`)});else{let t=y0(e,`id`);t&&r.push(`#${n?n(`id`,t,e):t}`);let i=y0(e,`className`);if(i&&ye(i)){let t=(n?n(`class`,i,e):i).split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let t of[`aria-label`,`type`,`name`,`title`,`alt`]){let i=y0(e,`getAttribute`,t);i&&r.push(`[${t}="${n?n(t,i,e):i}"]`)}return r.join(``)}function S0(e){return e!=null&&e>0&&e<=6e4}function C0(e,t,n){W.document&&W.addEventListener(e,t,n)}function w0(e,t,n){W.document&&W.removeEventListener(e,t,n)}var T0=(e=!0)=>{var t,n;let r=(t=W.performance)==null||(n=t.getEntriesByType)==null?void 0:n.call(t,`navigation`)[0];if(!e||r&&r.responseStart>0&&r.responseStart<performance.now())return r},E0=()=>{let e=T0();return(e==null?void 0:e.activationStart)??0},D0=e=>{C0(`visibilitychange`,t=>{var n;((n=W.document)==null?void 0:n.visibilityState)===`hidden`&&e(t)},{capture:!0})},O0=-1,k0=new Set,A0=()=>{var e,t;return((e=W.document)==null?void 0:e.visibilityState)===`hidden`&&!((t=W.document)!=null&&t.prerendering)?0:1/0},j0=e=>{var t;if(((t=W.document)==null?void 0:t.visibilityState)===`hidden`&&O0>-1){if(e.type===`visibilitychange`)for(let e of k0)e();isFinite(O0)||(O0=e.type===`visibilitychange`?e.timeStamp:0,w0(`prerenderingchange`,j0,!0))}},M0=()=>{if(W.document&&O0<0){var e;let t=E0();O0=(W.document.prerendering||(e=globalThis.performance.getEntriesByType(`visibility-state`).filter(e=>e.name===`hidden`&&e.startTime>t)[0])==null?void 0:e.startTime)??A0(),C0(`visibilitychange`,j0,!0),C0(`prerenderingchange`,j0,!0)}return{get firstHiddenTime(){return O0},onHidden(e){k0.add(e)}}},N0=e=>{var t;let n=W.requestIdleCallback||W.setTimeout;if(((t=W.document)==null?void 0:t.visibilityState)===`hidden`)e();else{let t=!1,r=()=>{t||=(e(),!0)};C0(`visibilitychange`,r,{once:!0,capture:!0}),n(()=>{r(),w0(`visibilitychange`,r,{capture:!0})})}},P0={},F0,I0,L0;function R0({trackCls:e,trackLcp:t}){if(X1()&&At()){let n=t?B0():void 0,r=e?z0():void 0,i=V0(),a=H0(),o=U0();return()=>{i(),a(),o(),n==null||n(),r==null||r()}}return()=>void 0}function z0(){return v1(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&(P0.cls={value:e.value,unit:``},I0=t)},!0)}function B0(){return y1(({metric:e})=>{let t=e.entries[e.entries.length-1];t&&S0(e.value)&&(P0.lcp={value:e.value,unit:`millisecond`},F0=t)},!0)}function V0(){return b1(({metric:e})=>{L0=e.navigationType,e.entries[e.entries.length-1]&&(P0.ttfb={value:e.value,unit:`millisecond`})})}function H0(){return x1(({metric:e})=>{L0=e.navigationType,P0.fcp={value:e.value,unit:`millisecond`}})}function U0(){return C1(`paint`,({entries:e})=>{let t=M0();for(let n of e)n.name===`first-paint`&&n.startTime<t.firstHiddenTime&&(P0.fp={value:n.startTime,unit:`millisecond`})})}function W0(e,t){var n;let r=At();if(!((n=X1())!=null&&n.getEntries)||!r){G0();return}let{spanStreamingEnabled:i,recordClsOnPageloadSpan:a,recordLcpOnPageloadSpan:o}=t,s=Z1(r);if(P(e).attributes[`sentry.op`]===`pageload`){if(J0(P0),q0(P0),i){let t=(t,n,r)=>{let i=r??`browser.web_vital.${t}.value`;e.setAttribute(i,n),a1&&b.log(`Setting web vital attribute`,{[i]:n},`on pageload span`)};[`ttfb`,`fp`,`fcp`].forEach(e=>{P0[e]&&t(e,P0[e].value)}),P0[`ttfb.requestTime`]&&t(`ttfb.requestTime`,P0[`ttfb.requestTime`].value,`browser.web_vital.ttfb.request_time`)}else a||delete P0.cls,o||delete P0.lcp,Object.entries(P0).forEach(([t,n])=>{So(t,n.value,n.unit,e)}),K0(e,t);L0&&e.setAttribute(yn,L0),e.setAttribute(i?`browser.performance.time_origin`:`performance.timeOrigin`,s),e.setAttribute(i?`browser.performance.navigation.activation_start`:`performance.activationStart`,E0())}G0()}function G0(){F0=void 0,I0=void 0,L0=void 0,P0={}}function K0(e,t){F0&&t.recordLcpOnPageloadSpan&&(F0.element&&e.setAttribute(`lcp.element`,b0(F0.element)),F0.id&&e.setAttribute(`lcp.id`,F0.id),F0.url&&e.setAttribute(`lcp.url`,R(F0.url.trim()).slice(0,200)),F0.loadTime!=null&&e.setAttribute(`lcp.loadTime`,F0.loadTime),F0.renderTime!=null&&e.setAttribute(`lcp.renderTime`,F0.renderTime),e.setAttribute(`lcp.size`,F0.size)),I0!=null&&I0.sources&&t.recordClsOnPageloadSpan&&I0.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,b0(t.node)))}function q0(e){let t=e.fp;t&&(t.value=Math.max(t.value-E0(),0))}function J0(e){let t=T0(!1);if(!t)return;let{responseStart:n,requestStart:r}=t;r<=n&&(e[`ttfb.requestTime`]={value:n-r,unit:`millisecond`})}var Y0=`ElementTiming`,X0=I((()=>({name:Y0,setup(){X1()&&At()&&C1(`element`,({entries:e})=>{for(let t of e){let e=t;if(!e.identifier)continue;let n=e.identifier,r=e.name,i=e.renderTime,a=e.loadTime,o={"sentry.origin":`auto.ui.browser.element_timing`,"ui.element.identifier":n};r&&(o[`ui.element.paint_type`]=r),e.id&&(o[`ui.element.id`]=e.id),e.element&&(o[`ui.element.type`]=e.element.tagName.toLowerCase()),e.url&&(o[`ui.element.url`]=R(e.url)),e.naturalWidth&&(o[`ui.element.width`]=e.naturalWidth),e.naturalHeight&&(o[`ui.element.height`]=e.naturalHeight),i>0&&pm(`ui.element.render_time`,i,{unit:`millisecond`,attributes:o}),a>0&&pm(`ui.element.load_time`,a,{unit:`millisecond`,attributes:o})}})}}))),Z0=[],Q0=new Map,$0=new Map,ev={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 tv(e){return e==null?void 0:Q0.get(e)}function nv(){let e=Object.keys(ev);eo()&&e.forEach(e=>{W.addEventListener(e,t,{capture:!0,passive:!0})});function t(e){let t=e.target;if(!t)return;let n=b0(t),r=Math.round(e.timeStamp);if(n&&n!==`<unknown>`&&!$0.has(r)&&($0.set(r,n),$0.size>50)){let e=$0.keys().next().value;e!==void 0&&$0.delete(e)}}function n(e){let t=Math.round(e.startTime),n=$0.get(t);if(!n)for(let e=-5;e<=5;e++){let r=$0.get(t+e);if(r){n=r;break}}return n||`<unknown>`}let r=({entries:e})=>{let t=F(),r=t&&Ni(t);e.forEach(e=>{if(!F1(e))return;let t=e.interactionId;if(t==null||Q0.has(t))return;let i=e.target?b0(e.target):n(e);if(Z0.length>10){let e=Z0.shift();Q0.delete(e)}Z0.push(t),Q0.set(t,{span:r,elementName:i})})};C1(`event`,r),C1(`first-input`,r)}var rv=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function iv(){let e=W.navigator;return e!=null&&e.userAgent?rv.test(e.userAgent):!1}function av(e,t=5){if(!r.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}var ov=`Interactions`,sv=I(((e={})=>({name:ov,setup(t){if(iv())return;let n={name:void 0,source:void 0,routeId:void 0,urlTemplate:void 0,httpRoute:void 0,urlPath:void 0,urlFull:void 0},r;function i(e){let{name:t,attributes:r}=P(e);n.name=t,n.source=r[`sentry.source`]||r[`sentry.segment.name.source`],n.routeId=r[zn],n.urlTemplate=r[fr],n.httpRoute=r[Fn],n.urlPath=r[lr],n.urlFull=r[cr]}t.on(`spanStart`,e=>{cv(e)&&(r=e,i(e))}),t.on(`spanEnd`,e=>{e===r&&(r=void 0,i(e))}),lv(t,n,()=>r,e),uv(t)}})));function cv(e){if(Ni(e)!==e)return!1;let t=P(e).attributes[Gn];return t===`pageload`||t===`navigation`}function lv(e,t,n,r){if(!W.document)return;let i;addEventListener(`click`,()=>{if(n()){a1&&b.warn(`[Tracing] Did not create ui.action.click span because a pageload or navigation span is in progress.`);return}if(i&&=(i.setAttribute(Hn,`interactionInterrupted`),i.end(),void 0),!t.name){a1&&b.warn(`[Tracing] Did not create ui.action.click span because the latest route name is missing.`);return}let a=L(e),o=t.routeId||t.urlTemplate||t.httpRoute,s=o||`Click`,c=!o||t.routeId?`custom`:`route`;i=ss({name:a?s:t.name,attributes:{[Gn]:Gs,[er]:a?c:t.source||`url`,[N]:`auto.browser.interactions`,...a&&{"sentry.segment.name":s},...t.routeId&&{"router.navigation.route.id":t.routeId},...t.urlTemplate&&{"url.template":t.urlTemplate},...t.httpRoute&&{"http.route":t.httpRoute},...t.urlPath&&{"url.path":t.urlPath},...t.urlFull&&{"url.full":R(t.urlFull)}}},r)},{capture:!0})}function uv(e){C1(`event`,({entries:t})=>{let n=F();if(n){for(let r of t)if(r.name===`click`){let t=Ot(r.startTime);if(!t)continue;let i=Z1(r.duration),a=b0(r.target),o=av(r.target),s={name:L(e)?o||`Click`:a,startTime:t,attributes:{[Gn]:zs,[N]:`auto.browser.interactions`,...a&&a!==`<unknown>`&&{"browser.web_vital.inp.target":a}}};o&&(s.attributes[ar]=o),Y1(n,t,t+i,s)}}})}function dv(){try{var e;return((e=W.document)==null?void 0:e.location.href)??``}catch{return``}}var fv=new WeakMap;function pv(e,t=M()){t?(a1&&mv(t)&&b.warn(`A route provider is already registered for this client and will be replaced. Routes only the previous provider knows about will no longer resolve.`),fv.set(t,e)):a1&&b.warn(`Cannot set a route provider without a client.`)}function mv(e=M()){return e&&fv.get(e)}function hv(e,t=M()){let n=mv(t);if(!n)return;let r=typeof e==`string`?yv(e):e;if(r)return ya(a1?`Route provider threw while resolving a route:`:``,()=>n.resolveRoute(r)||void 0,()=>void 0)}function gv(e=M()){let t=mv(e);return ya(a1?`Route provider threw while resolving a route:`:``,()=>(t==null?void 0:t.resolveCurrentRoute())||void 0,()=>void 0)}function _v(e){return{resolveRoute:e,resolveCurrentRoute:()=>{let t=yv(dv());return t&&e(t)}}}function vv(e=50){let t=new Kp(e);return{..._v(e=>t.get(e.pathname)),record(e,n){e&&n&&t.set(e,n)}}}function yv(e){return e?Ku(e,dv()||void 0):void 0}var bv=`UserTiming`,xv=I(((e={})=>({name:bv,setup(t){let n=X1();if(!(n!=null&&n.getEntries))return;let r=0;t.on(`beforeIdleSpanEnd`,t=>{var i;let{attributes:a,start_timestamp:o}=P(t),s=a[Gn];if(s!==`pageload`&&s!==`navigation`)return;let c=((i=T0(!1))==null?void 0:i.requestStart)??0,l=n.getEntries();for(let n of l.slice(r)){if(n.entryType!==`mark`&&n.entryType!==`measure`)continue;let r=Ot(n.startTime);r&&(s===`navigation`&&o&&r<o||Sv(t,n,r,Ot(n.startTime+Math.max(0,n.duration),n.startTime),Ot(c,n.startTime),e.ignore??[]))}r=l.length})}})));function Sv(e,t,n,r,i,a){if(Cv(t)||at(t.name,a))return;let o=Math.max(n,i),s={[N]:`auto.browser.user_timing.${t.entryType}`};o!==n&&(s[`sentry.browser.measure_happened_before_request`]=!0,s[`sentry.browser.measure_start_time`]=o),wv(s,t),o<=r&&Y1(e,o,r,{name:t.name,op:t.entryType,attributes:s})}function Cv(e){if(e.entryType===`measure`)try{return e.detail.devtools.track===`Components ⚛`}catch{return}}function wv(e,t){try{let n=t.detail;if(!n)return;if(typeof n==`object`){for(let[t,r]of Object.entries(n))if(r&&xe(r))e[`sentry.browser.measure.detail.${t}`]=r;else if(r!==void 0)try{e[`sentry.browser.measure.detail.${t}`]=JSON.stringify(r)}catch{}return}if(xe(n)){e[`sentry.browser.measure.detail`]=n;return}try{e[`sentry.browser.measure.detail`]=JSON.stringify(n)}catch{}}catch{}}function Tv(e){var t;let{name:n,op:r,origin:i,metricName:a,value:o,attributes:s,parentSpan:c,startTime:l,endTime:u,standalone:d,softNavigationId:f,navigationType:p}=e,m=c&&Ni(c),h=m?P(m).name:A().getScopeData().transactionName,g={[N]:i,[Gn]:r,[Vn]:0,[`browser.web_vital.${a}.value`]:o,[nr]:h,[$n]:h,[pr]:(t=W.navigator)==null?void 0:t.userAgent,...s};c&&P(c).attributes[`sentry.op`]===`pageload`&&(g[`sentry.pageload.span_id`]=c.spanContext().spanId),f!=null&&(g[vn]=f),p&&(g[yn]=p),d&&Object.assign(g,Ev());let _=ts({name:n,attributes:g,startTime:l,parentSpan:c,experimental:d?{standalone:!0}:void 0});_&&_.end(u??l)}function Ev(){var e;let t=(e=M())==null?void 0:e.getIntegrationByName(`Replay`),n=t==null?void 0:t.getReplayId(!0);return n?{[Jn]:n,"sentry._internal.replay_is_buffering":t.getRecordingMode()===`buffer`||void 0}:{}}function Dv(e,t){let n,r=!1;function i(){!r&&n&&t(n),r=!0}D0(()=>{i()});let a=e.on(`beforeStartNavigationSpan`,(e,t)=>{t!=null&&t.isRedirect||(i(),a(),o())}),o=e.on(`afterStartPageLoadSpan`,e=>{n=e,o()})}var Ov={click:zs,hover:Bs,drag:Vs,press:Hs},kv={click:Zs,hover:Qs,drag:$s,press:ec};function Av(e,t,n){let r;e.on(`afterStartPageLoadSpan`,e=>{r=e});let i;e.on(`spanStart`,e=>{let t=P(e).attributes;(t==null?void 0:t[`sentry.op`])===`navigation`&&t[`browser.navigation.type`]===`back-forward-cache`&&(i=e)}),t(({metric:e})=>{let t=q1(e);e.navigationType===`soft-navigation`?t?n(e,t,e.navigationId):a1&&b.log(`[SoftNav] Dropping ${e.name} for uncorrelated soft navigation ${e.navigationId}`):e.navigationType===`back-forward-cache`?n(e,i,void 0):n(e,r,void 0)})}function jv(e,t=!1){if(!$1(`largest-contentful-paint`))return;if(t){Av(e,y1,(e,t,n)=>{let r=e.entries[e.entries.length-1];Mv(e.value,r,t,n,e.navigationType,e.navigationStartTime)});return}let n=0,r,i,a=y1(({metric:e})=>{i=e.navigationType;let t=e.entries[e.entries.length-1];t&&S0(e.value)&&(n=e.value,r=t)},!0);Dv(e,e=>{Mv(n,r,e,void 0,i),a()})}function Mv(e,t,n,r,i,a){if(!S0(e))return;a1&&b.log(`Sending LCP span (${e})`);let o=a||0,s=Ot(o)??Z1(o),c=t?Ot(t.startTime,o)??Z1(t.startTime):s+Z1(e),l=t?b0(t.element):void 0,u=t!=null&&t.element?av(t.element):null,d=M(),f=d&&L(d)?u||`Largest contentful paint`:l??`Largest contentful paint`,p={};l&&(p[`browser.web_vital.lcp.element`]=l),u&&(p[ar]=u),t!=null&&t.id&&(p[`browser.web_vital.lcp.id`]=t.id),t!=null&&t.url&&(p[`browser.web_vital.lcp.url`]=R(t.url,d)),(t==null?void 0:t.loadTime)!=null&&(p[`browser.web_vital.lcp.load_time`]=t.loadTime),(t==null?void 0:t.renderTime)!=null&&(p[`browser.web_vital.lcp.render_time`]=t.renderTime),(t==null?void 0:t.size)!=null&&(p[`browser.web_vital.lcp.size`]=t.size),Tv({name:f,op:Us,origin:`auto.ui.browser.lcp`,metricName:`lcp`,value:e,attributes:p,parentSpan:n,startTime:s,endTime:c,softNavigationId:r,navigationType:i})}function Nv(e,t=!1){if(!$1(`layout-shift`))return;if(t){Av(e,v1,(e,t,n)=>{let r=e.entries[e.entries.length-1];Pv(e.value,r,t,n,e.navigationType,e.navigationStartTime)});return}let n=0,r,i,a=v1(({metric:e})=>{i=e.navigationType;let t=e.entries[e.entries.length-1];t&&(n=e.value,r=t)},!0);Dv(e,e=>{Pv(n,r,e,void 0,i),a()})}function Pv(e,t,n,r,i,a){var o;a1&&b.log(`Sending CLS span (${e})`);let s=Ot((t==null?void 0:t.startTime)??a??0)??kt(),c=t==null||(o=t.sources[0])==null?void 0:o.node,l=t?b0(c):void 0,u=c?av(c):null,d=M(),f=d&&L(d)?u||`Layout shift`:l??`Layout shift`,p={};u&&(p[ar]=u),t!=null&&t.sources&&t.sources.forEach((e,t)=>{p[`browser.web_vital.cls.source.${t+1}`]=b0(e.node)}),Tv({name:f,op:Ws,origin:`auto.ui.browser.cls`,metricName:`cls`,value:e,attributes:p,parentSpan:n,startTime:s,softNavigationId:r,navigationType:i})}function Fv(e,t=!1){if(!X1()||!At())return;let n=!L(e);t?Av(e,S1,(e,t,r)=>{Iv(e)&&Rv(e.value,Lv(e),n,t,r,e)}):S1(({metric:e})=>{Iv(e)&&Rv(e.value,Lv(e),n,void 0,void 0,e)})}function Iv(e){return e.value!=null&&Z1(e.value)<=60}function Lv(e){return e.entries.find(t=>t.duration===e.value&&ev[t.name])}function Rv(e,t,n=!1,r,i,a){a1&&b.log(`Sending INP span (${e})`);let o=Ot((t==null?void 0:t.startTime)??(a==null?void 0:a.navigationStartTime)??0);if(!o)return;let s=Z1(e),c=t&&ev[t.name],l=c||`click`,u=t&&tv(t.interactionId),d=F(),f=d?Ni(d):void 0,p=r||(u==null?void 0:u.span)||f,m=(u==null?void 0:u.elementName)||(t?b0(t.target):void 0),h=t!=null&&t.target?av(t.target):null,g=M(),_=!!g&&L(g),v=kv[l],y=_?h||v:m??`Interaction to next paint`,x={[Vn]:(t==null?void 0:t.duration)??e};m&&m!==`<unknown>`&&(x[`browser.web_vital.inp.target`]=m),c&&(x[`browser.web_vital.inp.interaction_type`]=c),h&&(x[ar]=h),Tv({name:y,op:Ov[l],origin:`auto.ui.browser.inp`,metricName:`inp`,value:e,attributes:x,startTime:o,endTime:o+s,navigationType:a==null?void 0:a.navigationType,parentSpan:p,standalone:n,softNavigationId:i})}var zv=1e3,Bv,Vv,Hv;function Uv(e){return typeof e==`boolean`?e:!!(e!=null&&e.capture)}function Wv(e){O(`dom`,e),oe(`dom`,Gv)}function Gv(){if(!W.document)return;let e=se.bind(null,`dom`),t=Jv(e,!0);W.document.addEventListener(`click`,t,!1),W.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{var n,r;let i=(n=W[t])==null?void 0:n.prototype;i!=null&&(r=i.hasOwnProperty)!=null&&r.call(i,`addEventListener`)&&(ke(i,`addEventListener`,function(t){return function(n,r,i){if((n===`click`||n==`keypress`)&&r)try{let a=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=a[n]=a[n]||{captureListeners:new WeakSet,bubbleListeners:new WeakSet,listenerCount:0},s=Uv(i);if(!o.handler){let r=Jv(e);o.handler=r,o.capture=s,t.call(this,n,r,o.capture)}let c=o[s?`captureListeners`:`bubbleListeners`];c.has(r)||(typeof i==`object`&&(i!=null&&i.once||i!=null&&i.signal)?o.sticky=!0:(c.add(r),o.listenerCount++))}catch{}return t.call(this,n,r,i)}}),ke(i,`removeEventListener`,function(e){return function(t,n,r){if((t===`click`||t==`keypress`)&&n)try{let i=this.__sentry_instrumentation_handlers__||{},a=i[t];a!=null&&a[Uv(r)?`captureListeners`:`bubbleListeners`].delete(n)&&(!--a.listenerCount&&!a.sticky&&(e.call(this,t,a.handler,a.capture),a.handler=void 0,delete i[t]),Object.keys(i).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Kv(e){if(e.type!==Vv)return!1;try{if(!e.target||e.target._sentryId!==Hv)return!1}catch{}return!0}function qv(e,t){return e===`keypress`?t!=null&&t.tagName?!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!0:!1}function Jv(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=Yv(n);if(qv(n.type,r))return;Ae(n,`_sentryCaptured`,!0),r&&!r._sentryId&&Ae(r,`_sentryId`,lt());let i=n.type===`keypress`?`input`:n.type;Kv(n)||(e({event:n,name:i,global:t}),Vv=n.type,Hv=r?r._sentryId:void 0),clearTimeout(Bv),Bv=W.setTimeout(()=>{Hv=void 0,Vv=void 0},zv)}}function Yv(e){try{return e.target}catch{return null}}var Xv;function Zv(){return`history`in W&&!!W.history}function Qv(e){let t=`history`;O(t,e),oe(t,$v)}function $v(){if(W.addEventListener(`popstate`,()=>{let e=W.location.href,t=Xv;Xv=e,t!==e&&se(`history`,{from:t,to:e})}),!Zv())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=Xv,i=ey(String(n));if(Xv=i,r===i)return e.apply(this,t);se(`history`,{from:r,to:i})}return e.apply(this,t)}}ke(W.history,`pushState`,e),ke(W.history,`replaceState`,e)}function ey(e){try{return new URL(e,W.location.origin).toString()}catch{return e}}var ty={};function ny(e){let t=ty[e];if(t)return t;let n=W[e];if(Pp(n))return ty[e]=n.bind(W);let r=W.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i!=null&&i[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){a1&&b.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(ty[e]=n.bind(W))}function ry(e){ty[e]=void 0}function iy(...e){try{return ny(`setTimeout`)(...e)}catch(t){a1&&b.warn(`Could not use native setTimeout implementation, falling back to window.setTimeout: `,t);let n=W.setTimeout.bind(W);return ty.setTimeout=n,n(...e)}}var ay=`__sentry_xhr_v3__`;function oy(e){O(`xhr`,e),oe(`xhr`,sy)}function sy(){if(!W.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=kt()*1e3,a=ye(n[0])?n[0].toUpperCase():void 0,o=cy(n[1]);if(!a||!o)return e.apply(t,n);t[ay]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[ay];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}se(`xhr`,{endTimestamp:kt()*1e3,startTimestamp:i,xhr:t,virtualError:r}),r=void 0,t.removeEventListener(`readystatechange`,s)}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[ay];return a&&ye(r)&&ye(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[ay];return r&&(n[0]!==void 0&&(r.body=n[0]),se(`xhr`,{startTimestamp:kt()*1e3,xhr:t})),e.apply(t,n)}})}function cy(e){if(ye(e))return e;try{return e.toString()}catch{}}var ly=Symbol.for(`sentry__originalRequestBody`);function uy(e){return new URLSearchParams(e).toString()}function dy(e,t=b){try{if(typeof e==`string`)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[uy(e)];if(!e)return[void 0]}catch(n){return a1&&t.error(n,`Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return a1&&t.log(`Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function fy(e=[]){if(e.length>=2&&e[1]&&typeof e[1]==`object`&&`body`in e[1])return e[1].body;if(e.length>=1&&e[0]instanceof Request){let t=e[0][ly];return t===void 0?void 0:t}}function py(e){let t;try{t=e.getAllResponseHeaders()}catch(t){return a1&&b.error(t,`Failed to get xhr response headers`,e),{}}return t?t.split(`\r
|
|
495
|
+
`).reduce((e,t)=>{let[n,r]=t.split(`: `);return r&&(e[n.toLowerCase()]=r),e},{}):{}}function my(e){if(typeof Element>`u`)return!1;try{return e instanceof Element}catch{return!1}}function hy(e){try{return new URL(e,W.location.origin).toString()}catch{return e}}var G=r,gy=0,_y=[];function vy(e){if(gy>0)return!0;let t=e?_y.findIndex(t=>by(t,e)):-1;return t!==-1&&(_y.splice(t,1),!0)}function yy(e){_y.push(e),setTimeout(()=>{let t=_y.indexOf(e);t!==-1&&_y.splice(t,1)})}function by(e,t){return e.msg===t.msg&&e.url===t.url&&e.line===t.line&&e.column===t.column}function xy(){gy++,setTimeout(()=>{gy--})}function Sy(e,t={}){function n(e){return typeof e==`function`}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,`__sentry_wrapped__`)){let t=e.__sentry_wrapped__;return typeof t==`function`?t:e}if(Me(e))return e}catch{return e}let i=function(...n){r._sentryWrappedDepth=(r._sentryWrappedDepth||0)+1;try{let r=n.map(e=>Sy(e,t));return e.apply(this,r)}catch(e){throw xy(),dn(r=>{r.addEventProcessor(e=>(t.mechanism&&(ft(e,void 0,void 0),pt(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),Mc(e)}),e}finally{r._sentryWrappedDepth=(r._sentryWrappedDepth||0)-1}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}catch{}je(i,e),Ae(e,`__sentry_wrapped__`,i);try{Object.getOwnPropertyDescriptor(i,`name`).configurable&&Object.defineProperty(i,"name",{get(){return e.name}})}catch{}return i}function Cy(e){let t=dv(),{referrer:n}=G.document||{},{userAgent:r}=G.navigator||{};return{url:t,headers:{...n&&{Referer:R(n,e)},...r&&{"User-Agent":r}}}}var wy=[`replayIntegration`,`replayCanvasIntegration`,`feedbackIntegration`,`feedbackModalIntegration`,`feedbackScreenshotIntegration`,`captureConsoleIntegration`,`contextLinesIntegration`,`linkedErrorsIntegration`,`dedupeIntegration`,`extraErrorDataIntegration`,`graphqlClientIntegration`,`httpClientIntegration`,`reportingObserverIntegration`,`rewriteFramesIntegration`,`browserProfilingIntegration`,`userTimingIntegration`,`interactionsIntegration`,`moduleMetadataIntegration`],Ty={replayCanvasIntegration:`replay-canvas`,feedbackModalIntegration:`feedback-modal`,feedbackScreenshotIntegration:`feedback-screenshot`};function Ey(e){return Ty[e]||e.replace(`Integration`,``).toLowerCase()}var Dy=G;async function Oy(e,t){let n=wy.includes(e)?Ey(e):void 0,r=Dy.Sentry=Dy.Sentry||{};if(!n)throw Error(`Cannot lazy load integration: ${e}`);let i=r[e];if(typeof i==`function`&&!(`_isShim`in i))return i;let a=ky(n),o=G.document.createElement(`script`);o.src=a,o.crossOrigin=`anonymous`,o.referrerPolicy=`strict-origin`,t&&o.setAttribute(`nonce`,t);let s=new Promise((e,t)=>{o.addEventListener(`load`,()=>e()),o.addEventListener(`error`,t)}),c=G.document.currentScript,l=G.document.body||G.document.head||(c==null?void 0:c.parentElement);if(l)l.appendChild(o);else throw Error(`Could not find parent element to insert lazy-loaded ${e} script`);try{await s}catch{throw Error(`Error when loading integration: ${e}`)}let u=r[e];if(typeof u!=`function`)throw Error(`Could not load integration: ${e}`);return u}function ky(e){var t;let n=M(),r=(n==null||(t=n.getOptions())==null?void 0:t.cdnBaseUrl)||`https://browser.sentry-cdn.com`;return new URL(`/${i}/${e}.min.js`,r).toString()}var Ay=mh({lazyLoadIntegration:Oy}),jy=mh({getModalIntegration:()=>n_,getScreenshotIntegration:()=>h_});function My(e,t){let n=Fy(e,t),r={type:By(t),value:Vy(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function Ny(e,t,n,r){let i=M(),a=i==null?void 0:i.getOptions().normalizeDepth,o=Jy(t),s={__serialized__:Je(t,a)};if(o)return{exception:{values:[My(e,o)]},extra:s};let c={exception:{values:[{type:we(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:Ky(t,{isUnhandledRejection:r})}]},extra:s};if(n){let t=Fy(e,n);t.length&&(c.exception.values[0].stacktrace={frames:t})}return c}function Py(e,t){return{exception:{values:[My(e,t)]}}}function Fy(e,t){let n=t.stacktrace||t.stack||``,r=Ly(t),i=Ry(t);try{return e(n,r,i)}catch{}return[]}var Iy=/Minified React error #\d+;/i;function Ly(e){return e&&Iy.test(e.message)?1:0}function Ry(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function zy(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0&&e instanceof WebAssembly.Exception}function By(e){let t=e==null?void 0:e.name;return!t&&zy(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function Vy(e){let t=e==null?void 0:e.message;return zy(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?Hd(t.error):Hd(e):`No error message`}function Hy(e,t,n,r){let i=Wy(e,t,(n==null?void 0:n.syntheticException)||void 0,r);return pt(i),i.level=`error`,n!=null&&n.event_id&&(i.event_id=n.event_id),cc(i)}function Uy(e,t,n=`info`,r,i){let a=Gy(e,t,(r==null?void 0:r.syntheticException)||void 0,i);return a.level=n,r!=null&&r.event_id&&(a.event_id=r.event_id),cc(a)}function Wy(e,t,n,r,i){let a;if(ge(t)&&t.error)return Py(e,t.error);if(_e(t)||ve(t)){let i=t;if(`stack`in t){var o;a=Py(e,t);let i=(o=a.exception)==null||(o=o.values)==null?void 0:o[0];if(r&&n&&i&&!i.stacktrace){let t=Fy(e,n);t.length&&(i.stacktrace={frames:t},pt(a,{synthetic:!0}))}}else{let t=i.name||(_e(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=Gy(e,o,n,r),ft(a,o)}return a}if(k(t))return Py(e,t);if(Se(t)||we(t))return a=Ny(e,t,n,i),pt(a,{synthetic:!0}),a;let s=String(t);return a=Gy(e,s,n,r),ft(a,s,void 0),pt(a,{synthetic:!0}),a}function Gy(e,t,n,r){let i={};if(r&&n){let r=Fy(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),pt(i,{synthetic:!0})}if(be(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function Ky(e,{isUnhandledRejection:t}){let n=Fe(e),r=t?`promise rejection`:`exception`;return ge(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:we(e)?`Event \`${qy(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function qy(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Jy(e){return Object.values(e).find(k)}var Yy=class extends lu{constructor(e){var t;let n=Xy(e);dd(n,`browser`,[`browser`],G.SENTRY_SDK_SOURCE||Qa()),super(n),n.routeProvider&&pv(n.routeProvider,this),this._unhandledSessionStatus=`unhandled`;let{userInfo:r}=this.getDataCollectionOptions();(t=n._metadata)!=null&&t.sdk&&(n._metadata.sdk.settings={infer_ip:r?`auto`:`never`,...n._metadata.sdk.settings});let{sendClientReports:i}=this._options,a=()=>{kt()},o=[[G.document,`visibilitychange`,()=>{a(),G.document.visibilityState===`hidden`&&(i&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}],[G.document,`freeze`,a],[G.document,`resume`,a],[G,`pagehide`,a],[G,`pageshow`,a]];o.forEach(([e,t,n])=>{var r;return e==null||(r=e.addEventListener)==null?void 0:r.call(e,t,n)}),this.on(`close`,()=>o.forEach(([e,t,n])=>{var r;return e==null||(r=e.removeEventListener)==null?void 0:r.call(e,t,n)})),r&&this.on(`beforeSendSession`,ud)}eventFromException(e,t){return Hy(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return Uy(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n,r)}};function Xy(e){var t;return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:(t=G.SENTRY_RELEASE)==null?void 0:t.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var Zy=40;function Qy(e,t=ny(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw ry(`fetch`),e}finally{n-=a,r--}}return Vl(e,i,Fl(e.bufferSize||Zy))}var K=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__;function $y(){let e=M();e?e.getIntegrationByName(`BrowserProfiling`)?e.emit(`startUIProfiler`):K&&b.warn(`BrowserProfiling integration is not available`):K&&b.warn(`No Sentry client available, profiling is not started`)}function e2(){let e=M();e?e.getIntegrationByName(`BrowserProfiling`)?e.emit(`stopUIProfiler`):K&&b.warn(`ProfilingIntegration is not available`):K&&b.warn(`No Sentry client available, profiling is not started`)}var t2={startProfiler:$y,stopProfiler:e2},n2=10,r2=20,i2=30,a2=40,o2=50;function s2(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var c2=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,l2=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,u2=/\((\S*)(?::(\d+))(?::(\d+))\)/,d2=/at (.+?) ?\(data:(.+?),/,f2=[i2,e=>{let t=e.match(d2);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=c2.exec(e);if(n){let[,e,t,r]=n;return s2(e,`?`,+t,+r)}let r=l2.exec(e);if(r){var i;if(((i=r[2])==null?void 0:i.indexOf(`eval`))===0){let e=u2.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=w2(r[1]||`?`,r[2]);return s2(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],p2=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,m2=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,h2=[o2,e=>{let t=p2.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=m2.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=w2(n,e),s2(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],g2=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,_2=[a2,e=>{let t=g2.exec(e);return t?s2(t[2],t[1]||`?`,+t[3],t[4]?+t[4]:void 0):void 0}],v2=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,y2=[n2,e=>{let t=v2.exec(e);return t?s2(t[2],t[3]||`?`,+t[1]):void 0}],b2=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,x2=[r2,e=>{let t=b2.exec(e);return t?s2(t[5],t[3]||t[4]||`?`,+t[1],+t[2]):void 0}],S2=[f2,h2],C2=w(...S2),w2=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};function T2(e,{metadata:t,tunnel:n,dsn:r}){return Fa({event_id:e.event_id,sent_at:new Date().toISOString(),...(t==null?void 0:t.sdk)&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Kr(r)}},[E2(e)])}function E2(e){return[{type:`user_report`},e]}var D2=1024,O2=`Breadcrumbs`,k2=I(((e={})=>{let t={dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:O2,setup(e){t.dom&&Wv(j2(e,t.dom)),t.xhr&&oy(M2(e)),t.fetch&&Ip(N2(e)),t.history&&Qv(P2(e)),t.sentry&&e.on(`beforeSendEvent`,A2(e))}}}));function A2(e){return function(t){M()===e&&yd({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:dt(t)},{event:t})}}function j2(e,t){return function(n){if(M()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>D2&&(K&&b.warn(`\`dom.maxStringLength\` cannot exceed ${D2}, but a value of ${o} was configured. Sentry will use ${D2} instead.`),o=D2),typeof a==`string`&&(a=[a]);try{let e=n.event,t=F2(e)?e.target:e;r=b0(t,{keyAttrs:a,maxStringLength:o}),i=av(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),yd(s,{event:n.event,name:n.name,global:n.global})}}function M2(e){return function(t){if(M()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[ay];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:R(o),status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:Gp(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),yd(d,u)}}function N2(e){return function(t){if(M()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`)){if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:{...t.fetchData,url:R(t.fetchData.url)},level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),yd(a,i)}else{let i=t.response,a={...t.fetchData,url:R(t.fetchData.url),status_code:i==null?void 0:i.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:Gp(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),yd(s,o)}}}}function P2(e){return function(t){if(M()!==e)return;let n=t.from,r=t.to,i=Zu(G.location.href),a=n?Zu(n):void 0,o=Zu(r);a!=null&&a.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),yd({category:`navigation`,data:{from:R(n),to:R(r)}})}}function F2(e){return!!e&&!!e.target}var I2=`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(`,`),L2=`BrowserApiErrors`,R2=I(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:L2,setupOnce(){t.setTimeout&&ke(G,`setTimeout`,z2),t.setInterval&&ke(G,`setInterval`,z2),t.requestAnimationFrame&&ke(G,`requestAnimationFrame`,B2),t.XMLHttpRequest&&`XMLHttpRequest`in G&&ke(XMLHttpRequest.prototype,`send`,V2);let e=t.eventTarget;e&&(Array.isArray(e)?e:I2).forEach(e=>H2(e,t))}}}));function z2(e){return function(...t){return t[0]=Sy(t[0],{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${D(e)}`}}),e.apply(this,t)}}function B2(e){return function(t){return e.apply(this,[Sy(t,{mechanism:{data:{handler:D(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function V2(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&ke(n,e,function(t){let n={mechanism:{data:{handler:D(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Me(t);return r&&(n.mechanism.data.handler=D(r)),Sy(t,n)})}),e.apply(this,t)}}function H2(e,t){var n,r;let i=(n=G[e])==null?void 0:n.prototype;i!=null&&(r=i.hasOwnProperty)!=null&&r.call(i,`addEventListener`)&&(ke(i,`addEventListener`,function(n){return function(r,i,a){try{U2(i)&&(i.handleEvent=Sy(i.handleEvent,{mechanism:{data:{handler:D(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&W2(this,r,i),n.apply(this,[r,Sy(i,{mechanism:{data:{handler:D(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),ke(i,`removeEventListener`,function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,`__sentry_wrapped__`)){let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}}))}function U2(e){return typeof e.handleEvent==`function`}function W2(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var G2=I((e={})=>{let t=e.lifecycle??`page`;return{name:`BrowserSession`,setupOnce(){if(G.document===void 0){K&&b.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Xc({ignoreDuration:!0});let e=!1;N0(()=>{e||=($c(),!0)});let n=j(),r=n.getUser();n.addScopeListener(t=>{let n=t.getUser();((r==null?void 0:r.id)!==(n==null?void 0:n.id)||(r==null?void 0:r.ip_address)!==(n==null?void 0:n.ip_address))&&(r=n,e&&$c())}),t===`route`&&Qv(({from:t,to:n})=>{t!==n&&(Xc({ignoreDuration:!0}),$c(),e=!0)})}}}),K2=`CultureContext`,q2=I((()=>({name:K2,preprocessEvent(e){let t=J2();if(t){var n;e.contexts={...e.contexts,culture:{...t,...(n=e.contexts)==null?void 0:n.culture}}}},processSegmentSpan(e){let t=J2();t&&ka(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function J2(){try{let e=G.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var Y2=`GlobalHandlers`,X2=I(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:Y2,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(Z2(e),n4(`onerror`)),t.onunhandledrejection&&(Q2(e),n4(`onunhandledrejection`))}}}));function Z2(e){le(t=>{let{stackParser:n,attachStacktrace:r}=r4();if(M()!==e||vy(t))return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=t4(Wy(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,Pc(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function Q2(e){fe(t=>{let{stackParser:n,attachStacktrace:r}=r4();if(M()!==e||vy())return;let i=$2(t),a=xe(i)?e4(i):Wy(n,i,void 0,r,!0);a.level=`error`,Pc(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function $2(e){if(xe(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 e4(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function t4(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:i4(t)??dv(),function:`?`,in_app:!0}),e}function n4(e){K&&b.log(`Global Handler attached: ${e}`)}function r4(){let e=M();return(e==null?void 0:e.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function i4(e){if(ye(e)&&e.length!==0)return e.startsWith(`data:`)?`<${$u(e,!1)}>`:e}var a4=I(()=>({name:`HttpContext`,preprocessEvent(e,t,n){var r;if(!G.navigator&&!G.location&&!G.document)return;let{url:i,headers:a}=Cy(n),o=n.getDataCollectionOptions().httpHeaders.request,s=Object.entries(((r=e.request)==null?void 0:r.headers)??{}).filter(([e])=>!(e in a)),c={...Pu(a,o),...Object.fromEntries(s)};e.request={url:R(i,n),...e.request,...Object.keys(c).length>0?{headers:c}:{headers:void 0}}},processSpan(e,t){var n;if(!G.navigator&&!G.location&&!G.document)return;let r=Cy(t),i=Pu(r.headers,t.getDataCollectionOptions().httpHeaders.request),a=i.Referer,{hostname:o,protocol:s}=G.location||{};ka(e,{[pr]:i[`User-Agent`],[Un]:s===`file:`||o===`localhost`||o===`127.0.0.1`||o===`[::1]`||!!(o!=null&&o.endsWith(`.localhost`)),...e.is_segment&&{"url.full":((n=e.attributes)==null?void 0:n[`sentry.op`])===`http.client`?void 0:R(r.url),"http.request.header.referer":a?[a]:void 0}})}})),o4=`cause`,s4=5,c4=`LinkedErrors`,l4=I(((e={})=>{let t=e.limit||s4,n=e.key||o4;return{name:c4,preprocessEvent(e,r,i){Fd(My,i.getOptions().stackParser,n,t,e,r)}}})),u4=/^HTML(\w*)Element$/;function d4(e){if(typeof window<`u`&&e===window)return`[Window]`;if(typeof document<`u`&&e===document)return`[Document]`;if(my(e)){let t=f4(e);if(u4.test(t))return`[HTMLElement: ${b0(e)}]`}}function f4(e){let t=Object.getPrototypeOf(e);return t!=null&&t.constructor?t.constructor.name:`null prototype`}function p4(){return m4()?(K&&d(()=>{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 m4(){var e;if(G.window===void 0)return!1;let t=G;if(t.nw)return!1;let n=t.chrome||t.browser;if(!(n!=null&&(e=n.runtime)!=null&&e.id))return!1;let r=dv();return!(G===G.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(r))}function h4(e){let{tunnel:t,dsn:n,transportOptions:r}=e;if(!t||typeof t==`string`)return{tunnel:t,transportOptions:r};let i=t===!0?{}:t,a=n&&Qr(n),o=i.path??(a&&sd(a));if(!o)return{tunnel:void 0,transportOptions:r};let s=`${cd(i.basePath)}${o}${i.trailingSlash?`/`:``}`;return K&&b.log(`Tunneling events to "${s}"`),{tunnel:s,transportOptions:{...r,headers:{"Content-Type":`application/x-sentry-envelope`,...r==null?void 0:r.headers}}}}function g4(e){return[Td(),Sd(),Sp(),R2(),k2(),up(),X2(),l4(),sf(),a4(),q2(),G2()]}function _4(e={}){let t=!e.skipBrowserExtensionCheck&&p4(),n=e.defaultIntegrations==null?g4():e.defaultIntegrations,r=Ji({integrations:e.integrations,defaultIntegrations:n}),i={...e,...h4(e),enabled:!t&&e.enabled,stackParser:T(e.stackParser||C2),integrations:r,transport:e.transport||Qy};return Ke(d4),_u(Yy,i)}function v4(){}function y4(e){e()}function b4(e={}){let t=G.document,n=(t==null?void 0:t.head)||(t==null?void 0:t.body);if(!n){K&&b.error(`[showReportDialog] Global document not defined`);return}let r=A(),i=M(),a=i==null?void 0:i.getDsn();if(!a){K&&b.error(`[showReportDialog] DSN not configured`);return}let o={...e,user:{...r.getUser(),...e.user},eventId:e.eventId||Wc()},{onLoad:s,onClose:c,onError:l}=o;if(!o.eventId){K&&b.error(`[showReportDialog] No event ID`),l==null||l(Error(`No event ID to show the report dialog for`));return}let u=G.document.createElement(`script`);if(u.async=!0,u.crossOrigin=`anonymous`,u.src=il(a,o),s&&(u.onload=s),l&&(u.onerror=()=>{l(Error(`Failed to load the report dialog script`))}),c){let e=t=>{if(t.data===`__sentry_reportdialog_closed__`)try{c()}finally{G.removeEventListener(`message`,e)}};G.addEventListener(`message`,e),u.addEventListener(`error`,()=>{G.removeEventListener(`message`,e)})}n.appendChild(u)}var x4=r;function S4(){return`ReportingObserver`in x4}var C4=`ReportingObserver`,w4=new WeakMap,T4=I(((e={})=>{let t=e.types||[`crash`,`deprecation`,`intervention`];function n(e){if(w4.has(M()))for(let t of e)dn(e=>{e.setExtra(`url`,t.url);let n=`ReportingObserver [${t.type}]`,r=`No details available`;if(t.body){let n={};for(let e in t.body)n[e]=t.body[e];if(e.setExtra(`body`,n),t.type===`crash`){let e=t.body;r=[e.crashId||``,e.reason||``].join(` `).trim()||r}else r=t.body.message||r}Nc(`${n}: ${r}`)})}return{name:C4,setupOnce(){S4()&&new x4.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(e){w4.set(e,!0)}}})),E4=`HttpClient`,D4=I(((e={})=>{let t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:E4,setup(e){F4(e,t),I4(e,t)}}}));function O4(e,t,n,r,i){if(L4(e,n.status,n.url)){let e=z4(t,r),a,o,s,c,l=B4();if(l.requestHeaders!==!1&&(a=Pu(j4(e.headers),l.requestHeaders)),l.responseHeaders!==!1&&(o=Pu(j4(n.headers),l.responseHeaders)),l.cookies!==!1){let t=e.headers.get(`Cookie`)||void 0;t&&(s=zu(t,l.cookies,`cookie`));let r=n.headers.get(`Set-Cookie`)||void 0;r&&(c=zu(r,l.cookies,`set-cookie`))}Pc(R4({url:e.url,method:e.method,status:n.status,requestHeaders:a,responseHeaders:o,requestCookies:s,responseCookies:c,error:i,type:`fetch`}))}}function k4(e,t,n,r,i){if(L4(e,t.status,t.responseURL)){let e,a,o,s=B4();if(s.cookies!==!1)try{let e=t.getResponseHeader(`Set-Cookie`)||t.getResponseHeader(`set-cookie`)||void 0;e&&(a=zu(e,s.cookies,`set-cookie`))}catch{}if(s.responseHeaders!==!1)try{o=Pu(M4(t),s.responseHeaders)}catch{}s.requestHeaders!==!1&&(e=Pu(r,s.requestHeaders)),Pc(R4({url:t.responseURL,method:n,status:t.status,requestHeaders:e,responseHeaders:o,responseCookies:a,error:i,type:`xhr`}))}}function A4(e){if(e){let t=e[`Content-Length`]||e[`content-length`];if(t)return parseInt(t,10)}}function j4(e){let t={};return e.forEach((e,n)=>{t[n]=e}),t}function M4(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
496
|
+
`).reduce((e,t)=>{let[n,r]=t.split(`: `);return n&&r&&(e[n]=r),e},{}):{}}function N4(e,t){return e.some(e=>typeof e==`string`?t.includes(e):e.test(t))}function P4(e,t){return e.some(e=>typeof e==`number`?e===t:t>=e[0]&&t<=e[1])}function F4(e,t){Ip(n=>{if(M()!==e)return;let{response:r,args:i,error:a,virtualError:o}=n,[s,c]=i;r&&O4(t,s,r,c,a||o)})}function I4(e,t){`XMLHttpRequest`in r&&oy(n=>{if(M()!==e)return;let{error:r,virtualError:i}=n,a=n.xhr,o=a[ay];if(!o)return;let{method:s,request_headers:c}=o;try{k4(t,a,s,c,r||i)}catch(e){K&&b.warn(`Error while extracting response event form XHR response`,e)}})}function L4(e,t,n){return P4(e.failedRequestStatusCodes,t)&&N4(e.failedRequestTargets,n)&&!ed(n,M())}function R4(e){let t=M(),n=t&&e.error&&e.error instanceof Error?e.error.stack:void 0,r=n&&t?t.getOptions().stackParser(n,0,1):void 0,i=`HTTP Client Error with status code: ${e.status}`,a={message:i,exception:{values:[{type:`Error`,value:i,stacktrace:r?{frames:r}:void 0}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:A4(e.responseHeaders)}}};return pt(a,{type:`auto.http.client.${e.type}`,handled:!1}),a}function z4(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function B4(){let e=M();if(!e)return{cookies:!1,requestHeaders:!1,responseHeaders:!1};let{cookies:t,httpHeaders:n}=e.getDataCollectionOptions();return{cookies:t,requestHeaders:n.request,responseHeaders:n.response}}var V4=r,H4=5,U4=`ContextLines`,W4=I(((e={})=>({name:U4,processEvent(t,n,r){return G4(t,e.frameContextLines??(r==null?void 0:r.getDataCollectionOptions().frameContextLines)??H4)}})));function G4(e,t){var n;let r=V4.document,i=V4.location&&Qu(V4.location.href);if(!r||!i)return e;let a=(n=e.exception)==null?void 0:n.values;if(!(a!=null&&a.length))return e;let o=r.documentElement.innerHTML;if(!o)return e;let s=[`<!DOCTYPE html>`,`<html>`,...o.split(`
|
|
497
|
+
`),`</html>`];return a.forEach(e=>{let n=e.stacktrace;n!=null&&n.frames&&(n.frames=n.frames.map(e=>K4(e,s,i,t)))}),e}function K4(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||gt(t,e,r),e}var q4=`GraphQLClient`,J4=(e=>({name:q4,setup(t){Y4(t,e),X4(t,e)}}));function Y4(e,t){e.on(`beforeOutgoingRequestSpan`,(n,r)=>{let i=P(n).attributes;if(i[`sentry.op`]!==`http.client`)return;let a=i[cr],o=i[`http.request.method`]||i[`http.method`];if(!ye(a)||!ye(o))return;let{endpoints:s}=t,c=at(a,s),l=$4(r);if(c&&l){let t=r3(l);if(t){L(e)||n.updateName(`${o} ${a} (${Q4(t)})`);let{operationName:r,operationType:i}=Z4(t);n.setAttribute(On,r),n.setAttribute(kn,i),t3(t)&&e.getDataCollectionOptions().graphQL.document===!0&&n.setAttribute(Dn,t.query),n3(t)&&(n.setAttribute(`graphql.persisted_query.hash.sha256`,t.extensions.persistedQuery.sha256Hash),n.setAttribute(`graphql.persisted_query.version`,t.extensions.persistedQuery.version))}}})}function X4(e,t){e.on(`beforeOutgoingRequestBreadcrumb`,(n,r)=>{let{category:i,type:a,data:o}=n;if(a===`http`&&(i===`fetch`||i===`xhr`)){let n=o==null?void 0:o.url,{endpoints:i}=t,a=at(n,i),s=$4(r);if(a&&o&&s){let t=r3(s);!o.graphql&&t&&(o[`graphql.operation`]=Q4(t),t3(t)&&e.getDataCollectionOptions().graphQL.document===!0&&(o[Dn]=t.query),n3(t)&&(o[`graphql.persisted_query.hash.sha256`]=t.extensions.persistedQuery.sha256Hash,o[`graphql.persisted_query.version`]=t.extensions.persistedQuery.version))}}})}function Z4(e){if(n3(e))return{operationName:e.operationName,operationType:void 0};if(t3(e)){let{query:t,operationName:n}=e,{operationName:r=n,operationType:i}=e3(t);return{operationName:r,operationType:i}}return{operationName:void 0,operationType:void 0}}function Q4(e){if(n3(e))return`persisted ${e.operationName}`;if(t3(e)){let{operationName:t,operationType:n}=Z4(e);return t?`${n} ${t}`:`${n}`}return`unknown`}function $4(e){let t=`xhr`in e,n;if(t){let t=e.xhr[ay];n=t&&dy(t.body)[0]}else n=dy(fy(e.input))[0];return n}function e3(e){let t=/^(?:\s*)(query|mutation|subscription)(?:\s*)(\w+)(?:\s*)[{(]/,n=/^(?:\s*)(query|mutation|subscription)(?:\s*)[{(]/,r=e.match(t);if(r)return{operationType:r[1],operationName:r[2]};let i=e.match(n);return i?{operationType:i[1],operationName:void 0}:{operationType:void 0,operationName:void 0}}function t3(e){return Ce(e)&&typeof e.query==`string`}function n3(e){return Ce(e)&&typeof e.operationName==`string`&&Ce(e.extensions)&&Ce(e.extensions.persistedQuery)&&typeof e.extensions.persistedQuery.sha256Hash==`string`&&typeof e.extensions.persistedQuery.version==`number`}function r3(e){try{let t=JSON.parse(e);return t3(t)||n3(t)?t:void 0}catch{return}}var i3=I(J4),a3=I((e={})=>{let t=[`script`];function n(r,i,a=0){if(!r)return;let o=`shadowRoot`in r&&r.shadowRoot?r.shadowRoot.children:r.children;for(let r of o){var s;if(!(r instanceof HTMLElement))continue;let o=av(r,1)||void 0,c=r.tagName.toLowerCase();if(t.includes(c))continue;let l=((s=e.onElement)==null?void 0:s.call(e,{element:r,componentName:o,tagName:c,depth:a}))||{};if(l===`skip`)continue;if(l===`children`){n(r,i,a+1);continue}let{x:u,y:d,width:f,height:p}=r.getBoundingClientRect(),m={identifier:r.id||void 0,type:o||c,visible:!0,alpha:1,height:p,width:f,x:u,y:d,...l};m.children=[],n(r,m.children,a+1),i.push(m)}}return{name:`ViewHierarchy`,processEvent:(t,r)=>{var i,a;if(t.type!==void 0||((i=e.shouldAttach)==null?void 0:i.call(e,t,r))===!1)return t;let o={rendering_system:`DOM`,positioning:`absolute`,windows:[]};n(((a=e.rootElement)==null?void 0:a.call(e))||G.document.body,o.windows);let s={filename:`view-hierarchy.json`,attachmentType:`event.view_hierarchy`,contentType:`application/json`,data:JSON.stringify(o)};return r.attachments=r.attachments||[],r.attachments.push(s),t}}}),q=r,o3=`sentryReplaySession`,s3=`replay_event`,c3=`Unable to send Replay`,l3=3e5,u3=9e5,d3=5e3,f3=5500,p3=6e4,m3=5e3,h3=3,g3=15e4,_3=5e3,v3=3e3,y3=300,b3=2e7,x3=4999,S3=5e4,C3=36e5,w3=`sentry.segment.name.source`,T3=Object.defineProperty,E3=(e,t,n)=>t in e?T3(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,D3=(e,t,n)=>E3(e,typeof t==`symbol`?t:t+``,n),O3=(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))(O3||{});function k3(e){return e.nodeType===e.ELEMENT_NODE}function A3(e){let t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function j3(e){return Object.prototype.toString.call(e)===`[object ShadowRoot]`}function M3(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 N3(e){let{cssText:t}=e;if(t.split(`"`).length<3)return t;let n=[`@import`,`url(${JSON.stringify(e.href)})`];return e.layerName===``?n.push(`layer`):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(` `)+`;`}function P3(e){try{let t=e.rules||e.cssRules;return t?M3(Array.from(t,I3).join(``)):null}catch{return null}}function F3(e){let t=``;for(let n=0;n<e.style.length;n++){let r=e.style,i=r[n],a=r.getPropertyPriority(i);t+=`${i}:${r.getPropertyValue(i)}${a?` !important`:``};`}return`${e.selectorText} { ${t} }`}function I3(e){let t;if(R3(e))try{t=P3(e.styleSheet)||N3(e)}catch{}else if(z3(e)){let t=e.cssText,n=e.selectorText.includes(`:`),r=typeof e.style.all==`string`&&e.style.all;if(r&&(t=F3(e)),n&&(t=L3(t)),n||r)return t}return t||e.cssText}function L3(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,`$1\\$2`)}function R3(e){return`styleSheet`in e}function z3(e){return`selectorText`in e}var B3=class{constructor(){D3(this,`idNodeMap`,new Map),D3(this,`nodeMetaMap`,new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e)),k3(e)&&e.shadowRoot&&this.removeNodeFromMap(e.shadowRoot)}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function V3(){return new B3}function H3({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 U3({isMasked:e,element:t,value:n,maskInputFn:r}){let i=n||``;return e?(r&&(i=r(i,t)),`*`.repeat(i.length)):i}function W3(e){return e.toLowerCase()}function G3(e){return e.toUpperCase()}var K3=`__rrweb_original__`;function q3(e){let t=e.getContext(`2d`);if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){let i=t.getImageData,a=K3 in i?i[K3]:i;if(new Uint32Array(a.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some(e=>e!==0))return!1}return!0}function J3(e){let t=e.type;return e.hasAttribute(`data-rr-is-password`)?`password`:t?W3(t):null}function Y3(e,t,n){return t===`INPUT`&&(n===`radio`||n===`checkbox`)?e.getAttribute(`value`)||``:e.value}function X3(e,t){let n;try{n=new URL(e,t??window.location.href)}catch{return null}let r=n.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(r==null?void 0:r[1])??null}var Z3={};function Q3(e){let t=Z3[e];if(t)return t;let n=window[e].bind(window),r=n,i=window.document;if(i&&typeof i.createElement==`function`)try{let t=i.createElement(`iframe`);t.hidden=!0,i.head.appendChild(t);let a=t.contentWindow;if(a&&a[e]){let t=a[e].bind(window);r=(...r)=>{try{return t(...r)}catch{return Z3[e]=n,n(...r)}}}i.head.removeChild(t)}catch{}return Z3[e]=r}function $3(...e){return Q3(`setTimeout`)(...e)}function e6(...e){return Q3(`clearTimeout`)(...e)}function t6(e){try{return e.contentDocument}catch{}}function n6(e){try{return e.contentWindow}catch{}}var r6=1,i6=RegExp(`[^a-z0-9-_:]`),a6=-2;function o6(){return r6++}function s6(e){if(e instanceof HTMLFormElement)return`form`;let t=W3(e.tagName);return i6.test(t)?`div`:t}function c6(e){let t=``;return t=e.indexOf(`//`)>-1?e.split(`/`).slice(0,3).join(`/`):e.split(`/`)[0],t=t.split(`?`)[0],t}var l6,u6,d6=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,f6=/^(?:[a-z+]+:)?\/\//i,p6=/^www\..*/i,m6=/^(data:)([^,]*),(.*)/i;function h6(e,t){if(!e||t.size===0)return e;try{let n=e.split(`;`),r=[];for(let e of n){if(e=e.trim(),!e)continue;let n=e.indexOf(`:`);if(n===-1){r.push(e);continue}let i=e.slice(0,n).trim();t.has(i)||r.push(e)}return r.join(`; `)+(r.length>0&&e.endsWith(`;`)?`;`:``)}catch(t){return console.warn(`Error filtering CSS properties:`,t),e}}function g6(e,t){return(e||``).replace(d6,(e,n,r,i,a,o)=>{let s=r||a||o,c=n||i||``;if(!s)return e;if(f6.test(s)||p6.test(s)||m6.test(s))return`url(${c}${s}${c})`;if(s[0]===`/`)return`url(${c}${c6(t)+s}${c})`;let l=t.split(`/`),u=s.split(`/`);l.pop();for(let e of u)if(e===`.`)continue;else e===`..`?l.pop():l.push(e);return`url(${c}${l.join(`/`)}${c})`})}var _6=/^[^ \t\n\r\u000c]+/,v6=/^[, \t\n\r\u000c]+/;function y6(e,t){if(t.trim()===``)return t;let n=0;function r(e){let r,i=e.exec(t.substring(n));return i?(r=i[0],n+=r.length,r):``}let i=[];for(;r(v6),!(n>=t.length);){let a=r(_6);if(a.slice(-1)===`,`)a=x6(e,a.substring(0,a.length-1)),i.push(a);else{let r=``;a=x6(e,a);let o=!1;for(;;){let e=t.charAt(n);if(e===``){i.push((a+r).trim());break}if(o)e===`)`&&(o=!1);else{if(e===`,`){n+=1,i.push((a+r).trim());break}e===`(`&&(o=!0)}r+=e,n+=1}}}return i.join(`, `)}var b6=new WeakMap;function x6(e,t){return!t||t.trim()===``?t:C6(e,t)}function S6(e){return!!(e.tagName===`svg`||e.ownerSVGElement)}function C6(e,t){let n=b6.get(e);if(n||(n=e.createElement(`a`),b6.set(e,n)),!t)t=``;else if(t.startsWith(`blob:`)||t.startsWith(`data:`))return t;return n.setAttribute(`href`,t),n.href}function w6(e,t,n,r,i,a,o){if(!r)return r;if(n===`src`||n===`href`&&(t!==`use`||r[0]!==`#`)||n===`xlink:href`&&r[0]!==`#`||n===`background`&&(t===`table`||t===`td`||t===`th`))return x6(e,r);if(n===`srcset`)return y6(e,r);if(n===`style`){let t=g6(r,C6(e));return o&&o.size>0&&(t=h6(t,o)),t}return t===`object`&&n===`data`?x6(e,r):typeof a==`function`?a(n,r,i):r}function T6(e,t,n){return(e===`video`||e===`audio`)&&t===`autoplay`}function E6(e,t,n,r){try{if(r&&e.matches(r))return!1;if(typeof t==`string`){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function D6(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function O6(e,t,n=1/0,r=0){return e?A3(e)?O6(e.host,t,n,r+1):e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:O6(e.parentNode,t,n,r+1):-1}function k6(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if(D6(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}function A6(e,t,n,r,i,a){try{let o=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(o===null)return!1;if(o.tagName===`INPUT`){let e=o.getAttribute(`autocomplete`);if([`current-password`,`new-password`,`cc-number`,`cc-exp`,`cc-exp-month`,`cc-exp-year`,`cc-csc`].includes(e))return!0}let s=-1,c=-1;if(a){if(c=O6(o,k6(r,i)),c<0)return!0;s=O6(o,k6(t,n),c>=0?c:1/0)}else{if(s=O6(o,k6(t,n)),s<0)return!1;c=O6(o,k6(r,i),s>=0?s:1/0)}return s>=0?c>=0?s<=c:!0:c>=0?!1:!!a}catch{}return!!a}function j6(e,t,n){let r=n6(e);if(!r)return;let i=!1,a;try{a=r.document.readyState}catch{return}if(a!==`complete`){let r=$3(()=>{i||=(t(),!0)},n);e.addEventListener(`load`,()=>{e6(r),i=!0,t()});return}let o=`about:blank`;if(r.location.href!==o||e.src===o||e.src===``)return $3(t,0),e.addEventListener(`load`,t);e.addEventListener(`load`,t)}function M6(e,t,n){let r=!1,i;try{i=e.sheet}catch{i=null}if(i)return;let a=$3(()=>{r||=(t(),!0)},n);e.addEventListener(`load`,()=>{e6(a),r=!0,t()})}function N6(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:m={},maskTextFn:h,maskInputFn:g,dataURLOptions:_={},inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x=!1,ignoreCSSAttributes:S}=t,C=P6(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode===`CSS1Compat`?{type:O3.Document,childNodes:[]}:{type:O3.Document,childNodes:[],compatMode:e.compatMode};case e.DOCUMENT_TYPE_NODE:return{type:O3.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:C};case e.ELEMENT_NODE:return I6(e,{doc:n,blockClass:i,blockSelector:a,unblockSelector:o,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:m,maskInputFn:g,dataURLOptions:_,inlineImages:v,recordCanvas:y,keepIframeSrcFn:b,newlyAddedElement:x,rootId:C,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,ignoreCSSAttributes:S});case e.TEXT_NODE:return F6(e,{doc:n,maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:d,unmaskTextSelector:f,maskTextFn:h,maskInputOptions:m,maskInputFn:g,rootId:C});case e.CDATA_SECTION_NODE:return{type:O3.CDATA,textContent:``,rootId:C};case e.COMMENT_NODE:return{type:O3.Comment,textContent:e.textContent||``,rootId:C};default:return!1}}function P6(e,t){if(!t.hasNode(e))return;let n=t.getId(e);return n===1?void 0:n}function F6(e,t){let{maskAllText:n,maskTextClass:r,unmaskTextClass:i,maskTextSelector:a,unmaskTextSelector:o,maskTextFn:s,maskInputOptions:c,maskInputFn:l,rootId:u}=t,d=e.parentNode&&e.parentNode.tagName,f=e.textContent,p=d===`STYLE`||void 0,m=d===`SCRIPT`||void 0,h=d===`TEXTAREA`||void 0;if(p&&f){try{var g;e.nextSibling||e.previousSibling||(g=e.parentNode.sheet)!=null&&g.cssRules&&(f=P3(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}f=g6(f,C6(t.doc))}m&&(f=`SCRIPT_PLACEHOLDER`);let _=A6(e,r,a,i,o,n);return!p&&!m&&!h&&f&&_&&(f=s?s(f,e.parentElement):f.replace(/[\S]/g,`*`)),h&&f&&(c.textarea||_)&&(f=l?l(f,e.parentNode):f.replace(/[\S]/g,`*`)),d===`OPTION`&&f&&(f=U3({isMasked:A6(e,r,a,i,o,H3({type:null,tagName:d,maskInputOptions:c})),element:e,value:f,maskInputFn:l})),{type:O3.Text,textContent:f||``,isStyle:p,rootId:u}}function I6(e,t){let{doc:n,blockClass:r,blockSelector:i,unblockSelector:a,inlineStylesheet:o,maskInputOptions:s={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:d,recordCanvas:f,keepIframeSrcFn:p,newlyAddedElement:m=!1,rootId:h,maskTextClass:g,unmaskTextClass:_,maskTextSelector:v,unmaskTextSelector:y,ignoreCSSAttributes:b}=t,x=E6(e,r,i,a),S=s6(e),C={},w=e.attributes.length;for(let t=0;t<w;t++){let r=e.attributes[t];r.name&&!T6(S,r.name,r.value)&&(C[r.name]=w6(n,S,W3(r.name),r.value,e,c,b))}if(S===`link`&&o){let t=Array.from(n.styleSheets).find(t=>t.href===e.href),r=null;t&&(r=P3(t)),r&&(C.rel=null,C.href=null,C.crossorigin=null,C._cssText=g6(r,t.href))}if(S===`style`&&e.sheet&&!(e.innerText||e.textContent||``).trim().length){let t=P3(e.sheet);t&&(C._cssText=g6(t,C6(n)))}if(S===`input`||S===`textarea`||S===`select`||S===`option`){let t=e,n=J3(t),r=Y3(t,G3(S),n),i=t.checked;if(n!==`submit`&&n!==`button`&&r){let e=A6(t,g,v,_,y,H3({type:n,tagName:G3(S),maskInputOptions:s}));C.value=U3({isMasked:e,element:t,value:r,maskInputFn:l})}i&&(C.checked=i)}if(S===`option`&&(e.selected&&!s.select?C.selected=!0:delete C.selected),S===`canvas`&&f){if(e.__context===`2d`)q3(e)||(C.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!(`__context`in e)){let t=e.toDataURL(u.type,u.quality),r=n.createElement(`canvas`);r.width=e.width,r.height=e.height,t!==r.toDataURL(u.type,u.quality)&&(C.rr_dataURL=t)}}if(S===`img`&&d){l6||(l6=n.createElement(`canvas`),u6=l6.getContext(`2d`));let t=e,r=t.currentSrc||t.getAttribute(`src`)||`<unknown-src>`,i=t.crossOrigin,a=()=>{t.removeEventListener(`load`,a);try{l6.width=t.naturalWidth,l6.height=t.naturalHeight,u6.drawImage(t,0,0),C.rr_dataURL=l6.toDataURL(u.type,u.quality)}catch(e){if(t.crossOrigin!==`anonymous`){t.crossOrigin=`anonymous`,t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a);return}console.warn(`Cannot inline img src=${r}! Error: ${e}`)}t.crossOrigin===`anonymous`&&(i?C.crossOrigin=i:t.removeAttribute(`crossorigin`))};t.complete&&t.naturalWidth!==0?a():t.addEventListener(`load`,a)}if((S===`audio`||S===`video`)&&(C.rr_mediaState=e.paused?`paused`:`played`,C.rr_mediaCurrentTime=e.currentTime),m||(e.scrollLeft&&(C.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(C.rr_scrollTop=e.scrollTop)),x){let{width:t,height:n}=e.getBoundingClientRect();C={class:C.class,rr_width:`${t}px`,rr_height:`${n}px`}}S===`iframe`&&!p(C.src)&&(!x&&!t6(e)&&(C.rr_src=C.src),delete C.src);let T;try{customElements.get(S)&&(T=!0)}catch{}return{type:O3.Element,tagName:S,attributes:C,childNodes:[],isSVG:S6(e)||void 0,needBlock:x,rootId:h,isCustom:T}}function J(e){return e==null?``:e.toLowerCase()}function L6(e,t){return!!(t.comment&&e.type===O3.Comment||e.type===O3.Element&&(t.script&&(e.tagName===`script`||e.tagName===`link`&&(e.attributes.rel===`preload`||e.attributes.rel===`modulepreload`)||e.tagName===`link`&&e.attributes.rel===`prefetch`&&typeof e.attributes.href==`string`&&X3(e.attributes.href)===`js`)||t.headFavicon&&(e.tagName===`link`&&e.attributes.rel===`shortcut icon`||e.tagName===`meta`&&(J(e.attributes.name).match(/^msapplication-tile(image|color)$/)||J(e.attributes.name)===`application-name`||J(e.attributes.rel)===`icon`||J(e.attributes.rel)===`apple-touch-icon`||J(e.attributes.rel)===`shortcut icon`))||e.tagName===`meta`&&(t.headMetaDescKeywords&&J(e.attributes.name).match(/^description|keywords$/)||t.headMetaSocial&&(J(e.attributes.property).match(/^(og|twitter|fb):/)||J(e.attributes.name).match(/^(og|twitter):/)||J(e.attributes.name)===`pinterest`)||t.headMetaRobots&&(J(e.attributes.name)===`robots`||J(e.attributes.name)===`googlebot`||J(e.attributes.name)===`bingbot`)||t.headMetaHttpEquiv&&e.attributes[`http-equiv`]!==void 0||t.headMetaAuthorship&&(J(e.attributes.name)===`author`||J(e.attributes.name)===`generator`||J(e.attributes.name)===`framework`||J(e.attributes.name)===`publisher`||J(e.attributes.name)===`progid`||J(e.attributes.property).match(/^article:/)||J(e.attributes.property).match(/^product:/))||t.headMetaVerification&&(J(e.attributes.name)===`google-site-verification`||J(e.attributes.name)===`yandex-verification`||J(e.attributes.name)===`csrf-token`||J(e.attributes.name)===`p:domain_verify`||J(e.attributes.name)===`verify-v1`||J(e.attributes.name)===`verification`||J(e.attributes.name)===`shopify-checkout-api-token`))))}function R6(e,t){let{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f=!1,inlineStylesheet:p=!0,maskInputOptions:m={},maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y={},inlineImages:b=!1,recordCanvas:x=!1,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w=5e3,onBlockedImageLoad:T,onStylesheetLoad:E,stylesheetLoadTimeout:ee=5e3,keepIframeSrcFn:te=()=>!1,newlyAddedElement:D=!1,ignoreCSSAttributes:ne}=t,{preserveWhiteSpace:re=!0}=t,ie=N6(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,dataURLOptions:y,inlineImages:b,recordCanvas:x,keepIframeSrcFn:te,newlyAddedElement:D,ignoreCSSAttributes:ne});if(!ie)return console.warn(e,`not serialized`),null;let ae;ae=r.hasNode(e)?r.getId(e):L6(ie,v)||!re&&ie.type===O3.Text&&!ie.isStyle&&!ie.textContent.trim().length?a6:o6();let O=Object.assign(ie,{id:ae});if(r.add(e,O),ae===a6)return null;S&&S(e);let oe=!f;if(O.type===O3.Element){oe&&=!O.needBlock;let t=e.shadowRoot;t&&j3(t)&&(O.isShadowHost=!0)}if((O.type===O3.Document||O.type===O3.Element)&&oe){v.headWhitespace&&O.type===O3.Element&&O.tagName===`head`&&(re=!1);let t={doc:n,mirror:r,blockClass:i,blockSelector:a,maskAllText:s,unblockSelector:o,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:f,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:re,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onBlockedImageLoad:T,onStylesheetLoad:E,stylesheetLoadTimeout:ee,keepIframeSrcFn:te,ignoreCSSAttributes:ne},D=e.childNodes?Array.from(e.childNodes):[];for(let e of D){let n=R6(e,t);n&&O.childNodes.push(n)}if(k3(e)&&e.shadowRoot)for(let n of Array.from(e.shadowRoot.childNodes)){let r=R6(n,t);r&&(j3(e.shadowRoot)&&(r.isShadow=!0),O.childNodes.push(r))}}if(e.parentNode&&A3(e.parentNode)&&j3(e.parentNode)&&(O.isShadow=!0),O.type===O3.Element&&O.tagName===`iframe`&&!O.needBlock&&j6(e,()=>{let t=t6(e);if(t&&C){let n=R6(t,{doc:t,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:re,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:E,stylesheetLoadTimeout:ee,keepIframeSrcFn:te,ignoreCSSAttributes:ne});n&&C(e,n)}},w),O.type===O3.Element&&O.tagName===`img`&&!e.complete&&O.needBlock){let t=e,n=()=>{if(t.isConnected&&!t.complete&&T)try{let e=t.getBoundingClientRect();e.width>0&&e.height>0&&T(t,O,e)}catch{}t.removeEventListener(`load`,n)};t.isConnected&&t.addEventListener(`load`,n)}return O.type===O3.Element&&O.tagName===`link`&&typeof O.attributes.rel==`string`&&(O.attributes.rel===`stylesheet`||O.attributes.rel===`preload`&&typeof O.attributes.href==`string`&&X3(O.attributes.href)===`css`)&&M6(e,()=>{if(E){let t=R6(e,{doc:n,mirror:r,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:d,skipChild:!1,inlineStylesheet:p,maskInputOptions:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v,dataURLOptions:y,inlineImages:b,recordCanvas:x,preserveWhiteSpace:re,onSerialize:S,onIframeLoad:C,iframeLoadTimeout:w,onStylesheetLoad:E,stylesheetLoadTimeout:ee,keepIframeSrcFn:te,ignoreCSSAttributes:ne});t&&E(e,t)}},ee),O.type===O3.Element&&delete O.needBlock,O}function z6(e,t){let{mirror:n=new B3,blockClass:r=`rr-block`,blockSelector:i=null,unblockSelector:a=null,maskAllText:o=!1,maskTextClass:s=`rr-mask`,unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:d=!0,inlineImages:f=!1,recordCanvas:p=!1,maskAllInputs:m=!1,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOM:v=!1,dataURLOptions:y,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:ee=()=>!1,ignoreCSSAttributes:te=new Set([])}=t||{};return R6(e,{doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,maskAllText:o,maskTextClass:s,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:d,maskInputOptions:m===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,hidden:!0,textarea:!0,select:!0}:m===!1?{}:m,maskAttributeFn:h,maskTextFn:g,maskInputFn:_,slimDOMOptions:v===!0||v===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v===`all`,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:y,inlineImages:f,recordCanvas:p,preserveWhiteSpace:b,onSerialize:x,onIframeLoad:S,iframeLoadTimeout:C,onBlockedImageLoad:w,onStylesheetLoad:T,stylesheetLoadTimeout:E,keepIframeSrcFn:ee,newlyAddedElement:!1,ignoreCSSAttributes:te})}function B6(e,t,n=document){let r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}var V6=`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.`,H6={map:{},getId(){return console.error(V6),-1},getNode(){return console.error(V6),null},removeNodeFromMap(){console.error(V6)},has(){return console.error(V6),!1},reset(){console.error(V6)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(H6=new Proxy(H6,{get(e,t,n){return t===`map`&&console.error(V6),Reflect.get(e,t,n)}}));function U6(e,t,n={}){let r=null,i=0;return function(...a){let o=Date.now();!i&&n.leading===!1&&(i=o);let s=t-(o-i),c=this;s<=0||s>t?(r&&=(hb(r),null),i=o,e.apply(c,a)):!r&&n.trailing!==!1&&(r=mb(()=>{i=n.leading===!1?0:Date.now(),r=null,e.apply(c,a)},s))}}function W6(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){mb(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>W6(e,t,a||{},!0)}function G6(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}var K6=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(K6=()=>new Date().getTime());function q6(e){var t,n,r,i;let a=e.document;return{left:a.scrollingElement?a.scrollingElement.scrollLeft:e.pageXOffset===void 0?(a==null?void 0:a.documentElement.scrollLeft)||(a==null||(t=a.body)==null||(t=t.parentElement)==null?void 0:t.scrollLeft)||(a==null||(n=a.body)==null?void 0:n.scrollLeft)||0:e.pageXOffset,top:a.scrollingElement?a.scrollingElement.scrollTop:e.pageYOffset===void 0?(a==null?void 0:a.documentElement.scrollTop)||(a==null||(r=a.body)==null||(r=r.parentElement)==null?void 0:r.scrollTop)||(a==null||(i=a.body)==null?void 0:i.scrollTop)||0:e.pageYOffset}}function J6(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Y6(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function X6(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function Z6(e,t,n,r,i){if(!e)return!1;let a=X6(e);if(!a)return!1;let o=k6(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=O6(a,o),c=-1;return s<0?!1:(r&&(c=O6(a,k6(null,r))),s>-1&&c<0||s<c)}function Q6(e,t){return t.getId(e)!==-1}function $6(e,t){return t.getId(e)===a6}function eb(e,t){if(A3(e))return!1;let n=t.getId(e);return t.has(n)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:!e.parentNode||eb(e.parentNode,t):!0}function tb(e){return!!e.changedTouches}function nb(e=window){`NodeList`in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),`DOMTokenList`in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw TypeError(`1 argument is required`);do if(this===t)return!0;while(t&&=t.parentNode);return!1})}function rb(e,t){return!!(e.nodeName===`IFRAME`&&t.getMeta(e))}function ib(e,t){return!!(e.nodeName===`LINK`&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute(`rel`)===`stylesheet`&&t.getMeta(e))}function ab(e){return!!(e!=null&&e.shadowRoot)}var ob=class{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=t===void 0?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}};function sb(e){var t;let n=null;return((t=e.getRootNode)==null||(t=t.call(e))==null?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(n=e.getRootNode().host),n}function cb(e){let t=e,n;for(;n=sb(t);)t=n;return t}function lb(e){let t=e.ownerDocument;if(!t)return!1;let n=cb(e);return t.contains(n)}function ub(e){let t=e.ownerDocument;return t?t.contains(e)||lb(e):!1}var db={};function fb(e){let t=db[e];if(t)return t;let n=window[e].bind(window),r=n,i=window.document;if(i&&typeof i.createElement==`function`)try{let t=i.createElement(`iframe`);t.hidden=!0,i.head.appendChild(t);let a=t.contentWindow;if(a&&a[e]){let t=a[e].bind(window);r=(...r)=>{try{return t(...r)}catch{return db[e]=n,n(...r)}}}i.head.removeChild(t)}catch{}return db[e]=r}function pb(...e){return fb(`requestAnimationFrame`)(...e)}function mb(...e){return fb(`setTimeout`)(...e)}function hb(...e){return fb(`clearTimeout`)(...e)}var Y=(e=>(e[e.DomContentLoaded=0]=`DomContentLoaded`,e[e.Load=1]=`Load`,e[e.FullSnapshot=2]=`FullSnapshot`,e[e.IncrementalSnapshot=3]=`IncrementalSnapshot`,e[e.Meta=4]=`Meta`,e[e.Custom=5]=`Custom`,e[e.Plugin=6]=`Plugin`,e))(Y||{}),X=(e=>(e[e.Mutation=0]=`Mutation`,e[e.MouseMove=1]=`MouseMove`,e[e.MouseInteraction=2]=`MouseInteraction`,e[e.Scroll=3]=`Scroll`,e[e.ViewportResize=4]=`ViewportResize`,e[e.Input=5]=`Input`,e[e.TouchMove=6]=`TouchMove`,e[e.MediaInteraction=7]=`MediaInteraction`,e[e.StyleSheetRule=8]=`StyleSheetRule`,e[e.CanvasMutation=9]=`CanvasMutation`,e[e.Font=10]=`Font`,e[e.Log=11]=`Log`,e[e.Drag=12]=`Drag`,e[e.StyleDeclaration=13]=`StyleDeclaration`,e[e.Selection=14]=`Selection`,e[e.AdoptedStyleSheet=15]=`AdoptedStyleSheet`,e[e.CustomElement=16]=`CustomElement`,e))(X||{}),gb=(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))(gb||{}),_b=(e=>(e[e.Mouse=0]=`Mouse`,e[e.Pen=1]=`Pen`,e[e.Touch=2]=`Touch`,e))(_b||{}),vb=(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))(vb||{}),yb;function bb(e){yb=e}function xb(){yb=void 0}for(var Z=e=>yb?((...t)=>{try{return e(...t)}catch(e){if(yb&&yb(e)===!0)return()=>{};throw e}}):e,Sb=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Cb=typeof Uint8Array>`u`?[]:new Uint8Array(256),wb=0;wb<Sb.length;wb++)Cb[Sb.charCodeAt(wb)]=wb;var Tb=class{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}};function Eb(e){try{return e.contentDocument}catch{}}function Db(e){try{return e.contentWindow}catch{}}var Ob=class{constructor(e){this.doc=e,this.unattachedDoc=null}parse(e){return this.parseWithConstructableStylesheet(e)||this.parseWithDetachedElement(e)}parseWithConstructableStylesheet(e){if(typeof CSSStyleSheet>`u`||typeof CSSStyleSheet.prototype.replaceSync!=`function`)return null;try{let t=new CSSStyleSheet;t.replaceSync(`x { ${e} }`);let n=t.cssRules[0];return!n||n.type!==CSSRule.STYLE_RULE?null:n.style}catch{return null}}parseWithDetachedElement(e){let t=this.getUnattachedDoc().createElement(`span`);return t.setAttribute(`style`,e),t.style}getUnattachedDoc(){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}return this.unattachedDoc}};function kb(e){return`__ln`in e}var Ab=class{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw Error(`Position outside of list range`);let t=this.head;for(let n=0;n<e;n++)t=(t==null?void 0:t.next)||null;return t}addNode(e){let t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&kb(e.previousSibling)){let n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&kb(e.nextSibling)&&e.nextSibling.__ln.previous){let n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;t.next===null&&(this.tail=t),this.length++}removeNode(e){let t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}},jb=(e,t)=>`${e}@${t}`,Mb=class{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;let e=[],t=new Set,n=new Ab,r=e=>{let t=e,n=a6;for(;n===a6;)t&&=t.nextSibling,n=t&&this.mirror.getId(t);return n},i=i=>{if(!i.parentNode||!ub(i))return;let a=A3(i.parentNode)?this.mirror.getId(sb(i)):this.mirror.getId(i.parentNode),o=r(i);if(a===-1||o===-1)return n.addNode(i);let s=R6(i,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{rb(e,this.mirror)&&!Z6(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),ib(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),ab(i)&&this.shadowDomManager.addShadowRoot(i.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{if(Z6(e,this.blockClass,this.blockSelector,this.unblockSelector,!1))return;this.iframeManager.attachIframe(e,t);let n=Db(e);n&&this.canvasManager.addWindow(n),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},ignoreCSSAttributes:this.ignoreCSSAttributes});s&&(e.push({parentId:a,nextId:o,node:s}),t.add(s.id))};for(;this.mapRemoves.length;){let e=this.mapRemoves.shift();this.mirror.removeNodeFromMap(e),this.shadowDomManager.removeShadowRootsFor(e)}for(let e of this.movedSet)(!Pb(this.removes,e,this.mirror)||this.movedSet.has(e.parentNode))&&i(e);for(let e of this.addedSet)!Ib(this.droppedSet,e)&&!Pb(this.removes,e,this.mirror)||Ib(this.movedSet,e)?i(e):this.droppedSet.add(e);let a=null;for(;n.length;){let e=null;if(a){let t=this.mirror.getId(a.value.parentNode),n=r(a.value);t!==-1&&n!==-1&&(e=a)}if(!e){let t=n.tail;for(;t;){let n=t;if(t=t.previous,n){let t=this.mirror.getId(n.value.parentNode);if(r(n.value)===-1)continue;if(t!==-1){e=n;break}{let t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){let r=t.parentNode.host;if(this.mirror.getId(r)!==-1){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}a=e.previous,n.removeNode(e.value),i(e.value)}let o={texts:this.texts.map(e=>({id:this.mirror.getId(e.node),value:e.value})).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{let{attributes:t}=e;if(typeof t.style==`string`){let n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split(`var(`).length===t.style.split(`var(`).length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(o.texts.length||o.attributes.length||o.removes.length||o.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(o))},this.processMutation=e=>{if(!$6(e.target,this.mirror))switch(e.type){case`characterData`:{let t=e.target.textContent;!Z6(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:A6(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,X6(e.target)):t.replace(/[\S]/g,`*`):t,node:e.target});break}case`attributes`:{let t=e.target,n=e.attributeName,r=e.target.getAttribute(n);if(n===`value`){let n=J3(t),i=t.tagName;r=Y3(t,i,n);let a=H3({maskInputOptions:this.maskInputOptions,tagName:i,type:n});r=U3({isMasked:A6(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,a),element:t,value:r,maskInputFn:this.maskInputFn})}if(Z6(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let i=this.attributeMap.get(e.target);if(t.tagName===`IFRAME`&&n===`src`&&!this.keepIframeSrcFn(r)){if(!Eb(t))n=`rr_src`;else return}if(i||(i={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(i),this.attributeMap.set(e.target,i)),n===`type`&&t.tagName===`INPUT`&&(e.oldValue||``).toLowerCase()===`password`&&t.setAttribute(`data-rr-is-password`,`true`),!T6(t.tagName,n)&&(i.attributes[n]=w6(this.doc,W3(t.tagName),W3(n),r,t,this.maskAttributeFn),n===`style`)){let n=e.oldValue?this.styleDeclarationParser.parse(e.oldValue):null;for(let e of Array.from(t.style)){let r=t.style.getPropertyValue(e),a=t.style.getPropertyPriority(e);r!==((n==null?void 0:n.getPropertyValue(e))||``)||a!==((n==null?void 0:n.getPropertyPriority(e))||``)?a===``?i.styleDiff[e]=r:i.styleDiff[e]=[r,a]:i._unchangedStyles[e]=[r,a]}if(n)for(let e of Array.from(n))t.style.getPropertyValue(e)===``&&(i.styleDiff[e]=!1)}break}case`childList`:if(Z6(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{let n=this.mirror.getId(t),r=A3(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);Z6(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||$6(t,this.mirror)||!Q6(t,this.mirror)||(this.addedSet.has(t)?(Nb(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&n===-1||eb(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[jb(n,r)]?Nb(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:A3(e.target)&&j3(e.target)?!0:void 0})),this.mapRemoves.push(t))})}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!(this.addedSet.has(e)||this.movedSet.has(e))){if(this.mirror.hasNode(e)){if($6(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&n!==-1&&(this.movedMap[jb(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Z6(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes&&e.childNodes.forEach(e=>this.genAdds(e)),ab(e)&&e.shadowRoot.childNodes.forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}}}init(e){`mutationCb.blockClass.blockSelector.unblockSelector.maskAllText.maskTextClass.unmaskTextClass.maskTextSelector.unmaskTextSelector.inlineStylesheet.maskInputOptions.maskAttributeFn.maskTextFn.maskInputFn.keepIframeSrcFn.recordCanvas.inlineImages.slimDOMOptions.dataURLOptions.doc.mirror.iframeManager.stylesheetManager.shadowDomManager.canvasManager.processedNodeManager.ignoreCSSAttributes`.split(`.`).forEach(t=>{this[t]=e[t]}),this.styleDeclarationParser=new Ob(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()}release(e){for(e.forEach(e=>{e.type===`childList`&&e.removedNodes.forEach(e=>this.mapRemoves.push(e))});this.mapRemoves.length;){let e=this.mapRemoves.shift();ub(e)||(this.mirror.removeNodeFromMap(e),this.shadowDomManager.removeShadowRootsFor(e))}}};function Nb(e,t){var n;e.delete(t),(n=t.childNodes)==null||n.forEach(t=>Nb(e,t))}function Pb(e,t,n){return e.length!==0&&Fb(e,t,n)}function Fb(e,t,n){let r=t.parentNode;for(;r;){let t=n.getId(r);if(e.some(e=>e.id===t))return!0;r=r.parentNode}return!1}function Ib(e,t){return e.size!==0&&Lb(e,t)}function Lb(e,t){let{parentNode:n}=t;return n?e.has(n)?!0:Lb(e,n):!1}var Rb=[];function zb(e){[...Rb].forEach(e)}var Bb=new WeakMap;function Vb(e){try{if(`composedPath`in e){let t=e.composedPath();if(t.length)return t[0]}else if(`path`in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function Hb(e,t){var n,r;let i=new Mb;Rb.push(i),i.init(e);let a=window.MutationObserver||window.__rrMutationObserver,o=(n=window)==null||(n=n.Zone)==null||(r=n.__symbol__)==null?void 0:r.call(n,`MutationObserver`);o&&window[o]&&(a=window[o]);let{onMutation:s,blockClass:c,blockSelector:l,unblockSelector:u}=e,d={isBlocked:e=>Z6(e,c,l,u,!0)},f=new a(Z(e=>{let t=e;if(s){let n=s(e,d);if(n===!1)return;Array.isArray(n)&&(t=n)}i.processMutations(t)}));return f.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),Bb.set(f,i),f}function Ub(e){let t=e.takeRecords();e.disconnect();let n=Bb.get(e);if(n){n.release(t);let r=Rb.indexOf(n);r!==-1&&Rb.splice(r,1),Bb.delete(e)}}function Wb({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(t.mousemove===!1)return()=>{};let i=typeof t.mousemove==`number`?t.mousemove:50,a=typeof t.mousemoveCallback==`number`?t.mousemoveCallback:500,o=[],s,c=U6(Z(t=>{let n=Date.now()-s;e(o.map(e=>(e.timeOffset-=n,e)),t),o=[],s=null}),a),l=Z(U6(Z(e=>{let t=Vb(e),{clientX:n,clientY:i}=tb(e)?e.changedTouches[0]:e;s||=K6(),o.push({x:n,y:i,id:r.getId(t),timeOffset:K6()-s}),c(typeof DragEvent<`u`&&e instanceof DragEvent?X.Drag:e instanceof MouseEvent?X.MouseMove:X.TouchMove)}),i,{trailing:!1})),u=[B6(`mousemove`,l,n),B6(`touchmove`,l,n),B6(`drag`,l,n)];return Z(()=>{u.forEach(e=>e())})}function Gb({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){if(o.mouseInteraction===!1)return()=>{};let s=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,c=[],l=null,u=t=>o=>{let s=Vb(o);if(Z6(s,r,i,a,!0))return;let c=null,u=t;if(`pointerType`in o){switch(o.pointerType){case`mouse`:c=_b.Mouse;break;case`touch`:c=_b.Touch;break;case`pen`:c=_b.Pen}c===_b.Touch?gb[t]===gb.MouseDown?u=`TouchStart`:gb[t]===gb.MouseUp&&(u=`TouchEnd`):_b.Pen}else tb(o)&&(c=_b.Touch);c===null?gb[t]===gb.Click&&(c=l,l=null):(l=c,(u.startsWith(`Touch`)&&c===_b.Touch||u.startsWith(`Mouse`)&&c===_b.Mouse)&&(c=null));let d=tb(o)?o.changedTouches[0]:o;if(!d)return;let f=n.getId(s),{clientX:p,clientY:m}=d;Z(e)({type:gb[u],id:f,x:p,y:m,...c!==null&&{pointerType:c}})};return Object.keys(gb).filter(e=>Number.isNaN(Number(e))&&!e.endsWith(`_Departed`)&&s[e]!==!1).forEach(e=>{let n=W3(e),r=u(e);if(window.PointerEvent)switch(gb[e]){case gb.MouseDown:case gb.MouseUp:n=n.replace(`mouse`,`pointer`);break;case gb.TouchStart:case gb.TouchEnd:return}c.push(B6(n,r,t))}),Z(()=>{c.forEach(e=>e())})}function Kb({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,sampling:o}){return B6(`scroll`,Z(U6(Z(o=>{let s=Vb(o);if(!s||Z6(s,r,i,a,!0))return;let c=n.getId(s);if(s===t&&t.defaultView){let n=q6(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:s.scrollLeft,y:s.scrollTop})}),o.scroll||100)),t)}function qb({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return B6(`resize`,Z(U6(Z(()=>{let t=J6(),i=Y6();(n!==t||r!==i)&&(e({width:Number(i),height:Number(t)}),n=t,r=i)}),200)),t)}var Jb=[`INPUT`,`TEXTAREA`,`SELECT`],Yb=new WeakMap;function Xb({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,ignoreClass:o,ignoreSelector:s,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:d,maskTextClass:f,unmaskTextClass:p,maskTextSelector:m,unmaskTextSelector:h}){function g(e){let n=Vb(e),u=e.isTrusted,g=n&&G3(n.tagName);if(g===`OPTION`&&(n=n.parentElement),!n||!g||Jb.indexOf(g)<0||Z6(n,r,i,a,!0))return;let v=n;if(v.classList.contains(o)||s&&v.matches(s))return;let y=J3(n),b=Y3(v,g,y),x=!1,S=H3({maskInputOptions:c,tagName:g,type:y}),C=A6(n,f,m,p,h,S);(y===`radio`||y===`checkbox`)&&(x=n.checked),b=U3({isMasked:C,element:n,value:b,maskInputFn:l}),_(n,d?{text:b,isChecked:x,userTriggered:u}:{text:b,isChecked:x});let w=n.name;y===`radio`&&w&&x&&t.querySelectorAll(`input[type="radio"][name="${w}"]`).forEach(e=>{if(e!==n){let t=U3({isMasked:C,element:e,value:Y3(e,g,y),maskInputFn:l});_(e,d?{text:t,isChecked:!x,userTriggered:!1}:{text:t,isChecked:!x})}})}function _(t,r){let i=Yb.get(t);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){Yb.set(t,r);let i=n.getId(t);Z(e)({...r,id:i})}}let v=(u.input===`last`?[`change`]:[`input`,`change`]).map(e=>B6(e,Z(g),t)),y=t.defaultView;if(!y)return()=>{v.forEach(e=>e())};let b=y.Object.getOwnPropertyDescriptor(y.HTMLInputElement.prototype,`value`),x=[[y.HTMLInputElement.prototype,`value`],[y.HTMLInputElement.prototype,`checked`],[y.HTMLSelectElement.prototype,`value`],[y.HTMLTextAreaElement.prototype,`value`],[y.HTMLSelectElement.prototype,`selectedIndex`],[y.HTMLOptionElement.prototype,`selected`]];return b&&b.set&&v.push(...x.map(e=>W6(e[0],e[1],{set(){Z(g)({target:this,isTrusted:!1})}},!1,y))),Z(()=>{v.forEach(e=>e())})}function Zb(e){let t=[];function n(e,t){if(s8(`CSSGroupingRule`)&&e.parentRule instanceof CSSGroupingRule||s8(`CSSMediaRule`)&&e.parentRule instanceof CSSMediaRule||s8(`CSSSupportsRule`)&&e.parentRule instanceof CSSSupportsRule||s8(`CSSConditionRule`)&&e.parentRule instanceof CSSConditionRule){let n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){let n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}return n(e,t)}function Qb(e,t,n){let r,i;return e?(e.ownerNode?r=t.getId(e.ownerNode):i=n.getId(e),{styleId:i,id:r}):{}}function $b({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};let i=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(i,{apply:Z((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=Qb(i,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:s}]}),r.apply(i,a)})});let a=r.CSSStyleSheet.prototype.deleteRule;r.CSSStyleSheet.prototype.deleteRule=new Proxy(a,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Qb(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:o}]}),r.apply(i,a)})});let o;r.CSSStyleSheet.prototype.replace&&(o=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(o,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Qb(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replace:o}),r.apply(i,a)})}));let s;r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Qb(i,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,replaceSync:o}),r.apply(i,a)})}));let c={};c8(`CSSGroupingRule`)?c.CSSGroupingRule=r.CSSGroupingRule:(c8(`CSSMediaRule`)&&(c.CSSMediaRule=r.CSSMediaRule),c8(`CSSConditionRule`)&&(c.CSSConditionRule=r.CSSConditionRule),c8(`CSSSupportsRule`)&&(c.CSSSupportsRule=r.CSSSupportsRule));let l={};return Object.entries(c).forEach(([r,i])=>{l[r]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=new Proxy(l[r].insertRule,{apply:Z((r,i,a)=>{let[o,s]=a,{id:c,styleId:l}=Qb(i.parentStyleSheet,t,n.styleMirror);return(c&&c!==-1||l&&l!==-1)&&e({id:c,styleId:l,adds:[{rule:o,index:[...Zb(i),s||0]}]}),r.apply(i,a)})}),i.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:Z((r,i,a)=>{let[o]=a,{id:s,styleId:c}=Qb(i.parentStyleSheet,t,n.styleMirror);return(s&&s!==-1||c&&c!==-1)&&e({id:s,styleId:c,removes:[{index:[...Zb(i),o]}]}),r.apply(i,a)})})}),Z(()=>{r.CSSStyleSheet.prototype.insertRule=i,r.CSSStyleSheet.prototype.deleteRule=a,o&&(r.CSSStyleSheet.prototype.replace=o),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach(([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule})})}function e8({mirror:e,stylesheetManager:t},n){var r,i;let a=null;a=n.nodeName===`#document`?e.getId(n):e.getId(n.host);let o=n.nodeName===`#document`?(r=n.defaultView)==null?void 0:r.Document:(i=n.ownerDocument)==null||(i=i.defaultView)==null?void 0:i.ShadowRoot,s=o!=null&&o.prototype?Object.getOwnPropertyDescriptor(o==null?void 0:o.prototype,`adoptedStyleSheets`):void 0;return a===null||a===-1||!o||!s?()=>{}:(Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get(){var e;return(e=s.get)==null?void 0:e.call(this)},set(e){var n;let r=(n=s.set)==null?void 0:n.call(this,e);if(a!==null&&a!==-1)try{t.adoptStyleSheets(e,a)}catch{}return r}}),Z(()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:s.configurable,enumerable:s.enumerable,get:s.get,set:s.set})}))}function t8({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:i}){let a=i.CSSStyleDeclaration.prototype.setProperty;i.CSSStyleDeclaration.prototype.setProperty=new Proxy(a,{apply:Z((i,o,s)=>{var c;let[l,u,d]=s;if(n.has(l))return a.apply(o,[l,u,d]);let{id:f,styleId:p}=Qb((c=o.parentRule)==null?void 0:c.parentStyleSheet,t,r.styleMirror);return(f&&f!==-1||p&&p!==-1)&&e({id:f,styleId:p,set:{property:l,value:u,priority:d},index:Zb(o.parentRule)}),i.apply(o,s)})});let o=i.CSSStyleDeclaration.prototype.removeProperty;return i.CSSStyleDeclaration.prototype.removeProperty=new Proxy(o,{apply:Z((i,a,s)=>{var c;let[l]=s;if(n.has(l))return o.apply(a,[l]);let{id:u,styleId:d}=Qb((c=a.parentRule)==null?void 0:c.parentStyleSheet,t,r.styleMirror);return(u&&u!==-1||d&&d!==-1)&&e({id:u,styleId:d,remove:{property:l},index:Zb(a.parentRule)}),i.apply(a,s)})}),Z(()=>{i.CSSStyleDeclaration.prototype.setProperty=a,i.CSSStyleDeclaration.prototype.removeProperty=o})}function n8({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:i,sampling:a,doc:o}){let s=Z(o=>U6(Z(a=>{let s=Vb(a);if(!s||Z6(s,t,n,r,!0))return;let{currentTime:c,volume:l,muted:u,playbackRate:d}=s;e({type:o,id:i.getId(s),currentTime:c,volume:l,muted:u,playbackRate:d})}),a.media||500)),c=[B6(`play`,s(vb.Play),o),B6(`pause`,s(vb.Pause),o),B6(`seeked`,s(vb.Seeked),o),B6(`volumechange`,s(vb.VolumeChange),o),B6(`ratechange`,s(vb.RateChange),o)];return Z(()=>{c.forEach(e=>e())})}function r8({fontCb:e,doc:t}){let n=t.defaultView;if(!n)return()=>{};let r=[],i=new WeakMap,a=n.FontFace;n.FontFace=function(e,t,n){let r=new a(e,t,n);return i.set(r,{family:e,buffer:typeof t!=`string`,descriptors:n,fontSource:typeof t==`string`?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};let o=G6(t.fonts,`add`,function(t){return function(n){return mb(Z(()=>{let t=i.get(n);t&&(e(t),i.delete(n))}),0),t.apply(this,[n])}});return r.push(()=>{n.FontFace=a}),r.push(o),Z(()=>{r.forEach(e=>e())})}function i8(e){let{doc:t,mirror:n,blockClass:r,blockSelector:i,unblockSelector:a,selectionCb:o}=e,s=!0,c=Z(()=>{let e=t.getSelection();if(!e||s&&e!=null&&e.isCollapsed)return;s=e.isCollapsed||!1;let c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){let{startContainer:o,startOffset:s,endContainer:l,endOffset:u}=e.getRangeAt(t);Z6(o,r,i,a,!0)||Z6(l,r,i,a,!0)||c.push({start:n.getId(o),startOffset:s,end:n.getId(l),endOffset:u})}o({ranges:c})});return c(),B6(`selectionchange`,c)}function a8({doc:e,customElementCb:t}){let n=e.defaultView;return!n||!n.customElements?()=>{}:G6(n.customElements,`define`,function(e){return function(n,r,i){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,i])}})}function o8(e,t={}){let n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=Hb(e,e.doc));let i=Wb(e),a=Gb(e),o=Kb(e),s=qb(e,{win:n}),c=Xb(e),l=n8(e),u=()=>{},d=()=>{},f=()=>{},p=()=>{};e.recordDOM&&(u=$b(e,{win:n}),d=e8(e,e.doc),f=t8(e,{win:n}),e.collectFonts&&(p=r8(e)));let m=i8(e),h=a8(e),g=[];for(let t of e.plugins)g.push(t.observer(t.callback,n,t.options));return Z(()=>{zb(e=>e.reset()),r==null||r.disconnect(),i(),a(),o(),s(),c(),l(),u(),d(),f(),p(),m(),h(),g.forEach(e=>e())})}function s8(e){return window[e]!==void 0}function c8(e){return!!(window[e]!==void 0&&window[e].prototype&&`insertRule`in window[e].prototype&&`deleteRule`in window[e].prototype)}var l8=class{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){let i=n||this.getIdToRemoteIdMap(e),a=r||this.getRemoteIdToIdMap(e),o=i.get(t);return o||(o=this.generateIdFn(),i.set(t,o),a.set(o,t)),o}getIds(e,t){let n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,n,r))}getRemoteId(e,t,n){let r=n||this.getRemoteIdToIdMap(e);return typeof t==`number`?r.get(t)||-1:t}getRemoteIds(e,t){let n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,n))}reset(e){e?(this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)):(this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}},u8=class{constructor(){this.crossOriginIframeMirror=new l8(o6),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}},d8=class{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new l8(o6),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new l8(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener(`message`,this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0);let t=Db(e);t&&this.crossOriginIframeMap.set(t,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var n;if(this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes){var r;(r=Db(e))==null||r.addEventListener(`message`,this.handleMessage.bind(this))}(n=this.loadListener)==null||n.call(this,e);let i=Eb(e);i&&i.adoptedStyleSheets&&i.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(i.adoptedStyleSheets,this.mirror.getId(i))}handleMessage(e){let t=e;if(t.data.type!==`rrweb`||t.origin!==t.data.origin||!e.source)return;let n=this.crossOriginIframeMap.get(e.source);if(!n)return;let r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case Y.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);let n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Y.IncrementalSnapshot,data:{source:X.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Y.Meta:case Y.Load:case Y.DomContentLoaded:return!1;case Y.Plugin:return t;case Y.Custom:return this.replaceIds(t.data.payload,e,[`id`,`parentId`,`previousId`,`nextId`]),t;case Y.IncrementalSnapshot:switch(t.data.source){case X.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,[`parentId`,`nextId`,`previousId`]),this.replaceIdOnNode(t.node,e);let n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,[`parentId`,`id`])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,[`id`])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case X.Drag:case X.TouchMove:case X.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,[`id`])}),t;case X.ViewportResize:return!1;case X.MediaInteraction:case X.MouseInteraction:case X.Scroll:case X.CanvasMutation:case X.Input:return this.replaceIds(t.data,e,[`id`]),t;case X.StyleSheetRule:case X.StyleDeclaration:return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleId`]),t;case X.Font:return t;case X.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,[`start`,`end`])}),t;case X.AdoptedStyleSheet:var n;return this.replaceIds(t.data,e,[`id`]),this.replaceStyleIds(t.data,e,[`styleIds`]),(n=t.data.styles)==null||n.forEach(t=>{this.replaceStyleIds(t,e,[`styleId`])}),t}}return!1}replace(e,t,n,r){for(let i of r)(Array.isArray(t[i])||typeof t[i]==`number`)&&(t[i]=Array.isArray(t[i])?e.getIds(n,t[i]):e.getId(n,t[i]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,[`id`,`rootId`]),`childNodes`in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type!==O3.Document&&!e.rootId&&(e.rootId=t),`childNodes`in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}},f8=class{init(){}addShadowRoot(){}observeAttachShadow(){}removeShadowRootsFor(){}reset(){}},p8=class{constructor(e){this.shadowDoms=new WeakSet,this.shadowRootTeardowns=new Map,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!j3(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e);let n=[];this.shadowRootTeardowns.set(e,n),this.bypassOptions.canvasManager.addShadowRoot(e);let r=Hb({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);n.push(()=>Ub(r)),n.push(Kb({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),mb(()=>{this.shadowRootTeardowns.get(e)===n&&(e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),n.push(e8({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e)))},0)}removeShadowRoot(e){let t=this.shadowRootTeardowns.get(e);t&&(t.forEach(e=>{try{e()}catch{}}),this.shadowRootTeardowns.delete(e)),this.shadowDoms.delete(e)}removeShadowRootsFor(e){var t;if(this.shadowRootTeardowns.size!==0){if(ab(e)){let t=e.shadowRoot;this.shadowDoms.has(t)&&!ub(e)&&this.removeShadowRoot(t),this.removeShadowRootsFor(t)}(t=e.childNodes)==null||t.forEach(e=>this.removeShadowRootsFor(e))}}observeAttachShadow(e){let t=Eb(e),n=Db(e);if(!t||!n)return;let r;try{r=n.Element}catch{return}r&&this.patchAttachShadow(r,t)}patchAttachShadow(e,t){let n=this;this.restoreHandlers.push(G6(e.prototype,`attachShadow`,function(e){return function(r){let i=e.call(this,r);return this.shadowRoot&&ub(this)&&n.addShadowRoot(this.shadowRoot,t),i}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.shadowRootTeardowns.forEach(e=>{e.forEach(e=>{try{e()}catch{}})}),this.shadowRootTeardowns=new Map,this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}},m8=class{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new ob,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){`_cssText`in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(e.length===0)return;let n={id:t,styleIds:[]},r=[];for(let t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,(e,t)=>({rule:I3(e),index:t}))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}},h8=class{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){let n=this.nodeMap.get(e);return n&&Array.from(n).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,pb(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}},g8,_8;try{if(Array.from([1],e=>e*2)[0]!==2){var v8;let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=((v8=e.contentWindow)==null?void 0:v8.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}var y8=V3();function b8(e={}){let{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i=`rr-block`,blockSelector:a=null,unblockSelector:o=null,ignoreClass:s=`rr-ignore`,ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u=`rr-mask`,unmaskTextClass:d=null,maskTextSelector:f=null,unmaskTextSelector:p=null,inlineStylesheet:m=!0,maskAllInputs:h,maskInputOptions:g,slimDOMOptions:_,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,maxCanvasSize:x=null,packFn:S,sampling:C={},dataURLOptions:w={},mousemoveWait:T,recordDOM:E=!0,recordCanvas:ee=!1,recordCrossOriginIframes:te=!1,recordAfter:D=e.recordAfter===`DOMContentLoaded`?e.recordAfter:`load`,userTriggeredOnInput:ne=!1,collectFonts:re=!1,inlineImages:ie=!1,plugins:ae,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:oe=new Set([]),errorHandler:se,onMutation:ce,getCanvasManager:le}=e;bb(se);let ue=!te||window.parent===window,de=!1;if(!ue)try{window.parent.document&&(de=!1)}catch{de=!0}if(ue&&!t)throw Error(`emit function is required`);if(!ue&&!de)return()=>{};T!==void 0&&C.mousemove===void 0&&(C.mousemove=T),y8.reset();let fe=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,hidden:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:g===void 0?{}:g,pe=_===!0||_===`all`?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:_===`all`,headMetaDescKeywords:_===`all`}:_||{};nb();let me=0,k=0,he=0,ge=e=>{for(let t of ae||[])t.eventProcessor&&(e=t.eventProcessor(e));return S&&!de&&(e=S(e)),e};g8=(e,i)=>{var a;let o=e;if(o.timestamp=K6(),(a=Rb[0])!=null&&a.isFrozen()&&o.type!==Y.FullSnapshot&&(o.type!==Y.IncrementalSnapshot||o.data.source!==X.Mutation)&&zb(e=>e.unfreeze()),ue)t==null||t(ge(o),i);else if(de){let e={type:`rrweb`,event:ge(o),origin:window.location.origin,isCheckout:i};window.parent.postMessage(e,`*`)}if(o.type===Y.FullSnapshot)me=o.timestamp,k=0,he=0;else if(o.type===Y.IncrementalSnapshot){if(o.data.source===X.Mutation&&o.data.isAttachIframe)return;k++;let e=r&&k>=r,t=n&&me&&o.timestamp-me>n;(e||t)&&Te(!0)}};let _e=e=>{g8({type:Y.IncrementalSnapshot,data:{source:X.Mutation,...e}})},ve=e=>g8({type:Y.IncrementalSnapshot,data:{source:X.Scroll,...e}}),ye=e=>g8({type:Y.IncrementalSnapshot,data:{source:X.CanvasMutation,...e}}),be=new m8({mutationCb:_e,adoptedStyleSheetCb:e=>g8({type:Y.IncrementalSnapshot,data:{source:X.AdoptedStyleSheet,...e}})}),xe=typeof __RRWEB_EXCLUDE_IFRAME__==`boolean`&&__RRWEB_EXCLUDE_IFRAME__?new u8:new d8({mirror:y8,mutationCb:_e,stylesheetManager:be,recordCrossOriginIframes:te,wrappedEmit:g8});for(let e of ae||[])e.getMirror&&e.getMirror({nodeMirror:y8,crossOriginIframeMirror:xe.crossOriginIframeMirror,crossOriginIframeStyleMirror:xe.crossOriginIframeStyleMirror});let Se=new h8,Ce=x8(le,{mirror:y8,win:window,mutationCb:e=>g8({type:Y.IncrementalSnapshot,data:{source:X.CanvasMutation,...e}}),recordCanvas:ee,blockClass:i,blockSelector:a,unblockSelector:o,maxCanvasSize:x,sampling:C.canvas,dataURLOptions:w,errorHandler:se}),we=typeof __RRWEB_EXCLUDE_SHADOW_DOM__==`boolean`&&__RRWEB_EXCLUDE_SHADOW_DOM__?new f8:new p8({mutationCb:_e,scrollCb:ve,bypassOptions:{onMutation:ce,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskInputOptions:fe,dataURLOptions:w,maskAttributeFn:v,maskTextFn:b,maskInputFn:y,recordCanvas:ee,inlineImages:ie,sampling:C,slimDOMOptions:pe,iframeManager:xe,stylesheetManager:be,canvasManager:Ce,keepIframeSrcFn:O,processedNodeManager:Se,ignoreCSSAttributes:oe},mirror:y8}),Te=(e=!1)=>{if(!E)return;g8({type:Y.Meta,data:{href:window.location.href,width:Y6(),height:J6()}},e),be.reset(),we.init(),zb(e=>e.lock());let t=!1;try{let e=z6(document,{mirror:y8,blockClass:i,blockSelector:a,unblockSelector:o,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,inlineStylesheet:m,maskAllInputs:fe,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,slimDOM:pe,dataURLOptions:w,recordCanvas:ee,inlineImages:ie,onSerialize:e=>{rb(e,y8)&&xe.addIframe(e),ib(e,y8)&&be.trackLinkElement(e),ab(e)&&we.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{xe.attachIframe(e,t);let n=Db(e);n&&Ce.addWindow(n),we.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{be.attachLinkElement(e,t)},onBlockedImageLoad:(e,t,{width:n,height:r})=>{_e({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:{style:{width:`${n}px`,height:`${r}px`}}}]})},keepIframeSrcFn:O,ignoreCSSAttributes:oe});if(!e)return console.warn(`Failed to snapshot the document`);g8({type:Y.FullSnapshot,data:{node:e,initialOffset:q6(window)}}),t=!0}finally{if(!t){if(he++,n){let e=Math.min(1e3*2**(he-1),n);me=K6()-n+e}k=0}zb(e=>e.unlock())}document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&be.adoptStyleSheets(document.adoptedStyleSheets,y8.getId(document))};_8=Te;try{let e=[],t=e=>{var t;return Z(o8)({onMutation:ce,mutationCb:_e,mousemoveCb:(e,t)=>g8({type:Y.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>g8({type:Y.IncrementalSnapshot,data:{source:X.MouseInteraction,...e}}),scrollCb:ve,viewportResizeCb:e=>g8({type:Y.IncrementalSnapshot,data:{source:X.ViewportResize,...e}}),inputCb:e=>g8({type:Y.IncrementalSnapshot,data:{source:X.Input,...e}}),mediaInteractionCb:e=>g8({type:Y.IncrementalSnapshot,data:{source:X.MediaInteraction,...e}}),styleSheetRuleCb:e=>g8({type:Y.IncrementalSnapshot,data:{source:X.StyleSheetRule,...e}}),styleDeclarationCb:e=>g8({type:Y.IncrementalSnapshot,data:{source:X.StyleDeclaration,...e}}),canvasMutationCb:ye,fontCb:e=>g8({type:Y.IncrementalSnapshot,data:{source:X.Font,...e}}),selectionCb:e=>{g8({type:Y.IncrementalSnapshot,data:{source:X.Selection,...e}})},customElementCb:e=>{g8({type:Y.IncrementalSnapshot,data:{source:X.CustomElement,...e}})},blockClass:i,ignoreClass:s,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:d,maskTextSelector:f,unmaskTextSelector:p,maskInputOptions:fe,inlineStylesheet:m,sampling:C,recordDOM:E,recordCanvas:ee,inlineImages:ie,userTriggeredOnInput:ne,collectFonts:re,doc:e,maskAttributeFn:v,maskInputFn:y,maskTextFn:b,keepIframeSrcFn:O,blockSelector:a,unblockSelector:o,slimDOMOptions:pe,dataURLOptions:w,mirror:y8,iframeManager:xe,stylesheetManager:be,shadowDomManager:we,processedNodeManager:Se,canvasManager:Ce,ignoreCSSAttributes:oe,plugins:(ae==null||(t=ae.filter(e=>e.observer))==null?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>g8({type:Y.Plugin,data:{plugin:e.name,payload:t}})})))||[]},{})};xe.addLoadListener(n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}});let n=()=>{Te(),e.push(t(document))};return document.readyState===`interactive`||document.readyState===`complete`?n():(e.push(B6(`DOMContentLoaded`,()=>{g8({type:Y.DomContentLoaded,data:{}}),D===`DOMContentLoaded`&&n()})),e.push(B6(`load`,()=>{g8({type:Y.Load,data:{}}),D===`load`&&n()},window))),()=>{e.forEach(e=>e()),Se.destroy(),_8=void 0,xb()}}catch(e){console.warn(e)}}b8.mirror=y8,b8.takeFullSnapshot=function(e){if(!_8)throw Error(`please take full snapshot after start recording`);_8(e)};function x8(e,t){try{return e?e(t):new Tb}catch{return console.warn(`Unable to initialize CanvasManager`),new Tb}}var S8;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(S8||={});var C8=3,w8=5;function T8(e){return e>9999999999?e:e*1e3}function E8(e){return e>9999999999?e/1e3:e}function D8(e,t){t.category!==`sentry.transaction`&&([`ui.click`,`ui.input`].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate(()=>(e.throttledAddEvent({type:Y.Custom,timestamp:(t.timestamp||0)*1e3,data:{tag:`breadcrumb`,payload:qe(t,10,1e3)}}),t.category===`console`)))}var O8=`button,a`;function k8(e){return e.closest(O8)||e}function A8(e){let t=j8(e);return!t||!(t instanceof Element)?t:k8(t)}function j8(e){return M8(e)?e.target:e}function M8(e){return Ce(e)&&`target`in e}var N8;function P8(e){return N8||(N8=[],F8()),N8.push(e),()=>{let t=N8?N8.indexOf(e):-1;t>-1&&N8.splice(t,1)}}function F8(){ke(q,`open`,function(e){return function(...t){if(N8)try{N8.forEach(e=>e())}catch{}return e.apply(q,t)}})}var I8=new Set([X.Mutation,X.StyleSheetRule,X.StyleDeclaration,X.AdoptedStyleSheet,X.CanvasMutation,X.Selection,X.MediaInteraction]);function L8(e,t,n){e.handleClick(t,n)}var R8=class{constructor(e,t,n=D8){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){let e=P8(()=>{this._lastMutation=H8()});this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(B8(t,this._ignoreSelector)||!V8(e))return;let n={timestamp:E8(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some(e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1)||(this._clicks.push(n),this._clicks.length===1&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=E8(e)}registerScroll(e=Date.now()){this._lastScroll=E8(e)}registerClick(e){let t=k8(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach(e=>{e.clickCount++})}_getClicks(e){return this._clicks.filter(t=>t.node===e)}_checkClicks(){let e=[],t=H8();this._clicks.forEach(n=>{n.mutationAfter===void 0&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),n.scrollAfter===void 0&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)});for(let t of e){let e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){let t=this._replay,n=e.scrollAfter!==void 0&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter!==void 0&&e.mutationAfter<=this._threshold,i=!n&&!r,{clickCount:a,clickBreadcrumb:o}=e;if(i){let n=Math.min(e.mutationAfter||this._timeout,this._timeout)*1e3,r=n<this._timeout*1e3?`mutation`:`timeout`,i={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.slowClickDetected`,data:{...o.data,url:q.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:a||1}};this._addBreadcrumbEvent(t,i)}else if(a>1){let e={type:`default`,message:o.message,timestamp:o.timestamp,category:`ui.multiClick`,data:{...o.data,url:q.location.href,route:t.getCurrentRoute(),clickCount:a,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=iy(()=>this._checkClicks(),1e3)}},z8=[`A`,`BUTTON`,`INPUT`];function B8(e,t){return!!(!z8.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 V8(e){return!!(e.data&&typeof e.data.nodeId==`number`&&e.timestamp)}function H8(){return Date.now()/1e3}function U8(e,t){try{if(!W8(t))return;let{source:n}=t.data;if(I8.has(n)&&e.registerMutation(t.timestamp),n===X.Scroll&&e.registerScroll(t.timestamp),G8(t)){let{type:n,id:r}=t.data,i=b8.mirror.getNode(r);i instanceof HTMLElement&&n===gb.Click&&e.registerClick(i)}}catch{}}function W8(e){return e.type===C8}function G8(e){return e.data.source===X.MouseInteraction}function K8(e){return{timestamp:Date.now()/1e3,type:`default`,...e}}var q8=(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))(q8||{}),J8=new Set([`id`,`class`,`aria-label`,`role`,`name`,`alt`,`title`,`data-test-id`,`data-testid`,`disabled`,`aria-disabled`,`data-sentry-component`]),Y8=new Set([...J8,`data-sentry-element`]);function X8(e){let t={};for(let n in e)if(J8.has(n)){let r=n;(n===`data-testid`||n===`data-test-id`)&&(r=`testId`),t[r]=e[n]}return!t[`data-sentry-component`]&&e[`data-sentry-element`]&&(t[`data-sentry-component`]=e[`data-sentry-element`]),t}var Z8=e=>t=>{if(!e.isEnabled())return;let n=$8(t,e.getMaskAttributeFn());if(!n)return;let r=t.name===`click`,i=r?t.event:void 0;r&&e.clickDetector&&i!=null&&i.target&&!i.altKey&&!i.metaKey&&!i.ctrlKey&&!i.shiftKey&&L8(e.clickDetector,n,A8(t.event)),D8(e,n)};function Q8(e,t){let n=b8.mirror.getId(e),r=n&&b8.mirror.getNode(n),i=r&&b8.mirror.getMeta(r),a=i&&tx(i)?i:null;return{message:t,data:a?{nodeId:n,node:{id:n,tagName:a.tagName,textContent:Array.from(a.childNodes).map(e=>e.type===q8.Text&&e.textContent).filter(Boolean).map(e=>e.trim()).join(``),attributes:X8(a.attributes)}}:{}}}function $8(e,t){let{target:n,message:r}=ex(e,t);return K8({category:`ui.${e.name}`,...Q8(n,r)})}function ex(e,t){let n=e.name===`click`,r,i=null;try{i=n?A8(e.event):j8(e.event),r=b0(i,{maxStringLength:200,maskAttributeFn:t})||`<unknown>`}catch{r=`<unknown>`}return{target:i,message:r}}function tx(e){return e.type===q8.Element}function nx(e,t){if(!e.isEnabled())return;e.updateUserActivity();let n=rx(t,e.getMaskAttributeFn());n&&D8(e,n)}function rx(e,t){let{metaKey:n,shiftKey:r,ctrlKey:i,altKey:a,key:o,target:s}=e;if(!s||ix(s)||!o)return null;let c=n||i||a,l=o.length===1;if(!c&&l)return null;let u=b0(s,{maxStringLength:200,maskAttributeFn:t})||`<unknown>`;return K8({category:`ui.keyDown`,message:u,data:{...Q8(s,u).data,metaKey:n,shiftKey:r,ctrlKey:i,altKey:a,key:o}})}function ix(e){return e.tagName===`INPUT`||e.tagName===`TEXTAREA`||e.isContentEditable}var ax={resource:fx,paint:ux,navigation:dx};function ox(e,t){return({metric:n})=>void t.replayPerformanceEntries.push(e(n))}function sx(e){return e.map(cx).filter(Boolean)}function cx(e){let t=ax[e.entryType];return t?t(e):null}function lx(e,t=e){return Ot(e,t)}function ux(e){let{duration:t,entryType:n,name:r,startTime:i}=e,a=lx(i);return{type:n,name:r,start:a,end:a+t,data:void 0}}function dx(e){let{entryType:t,name:n,decodedBodySize:r,duration:i,domComplete:a,encodedBodySize:o,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:f,startTime:p,transferSize:m,type:h}=e;return i===0?null:{type:`${t}.${h}`,start:lx(p),end:lx(a,p),name:n,data:{size:m,decodedBodySize:r,encodedBodySize:o,duration:i,domInteractive:l,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:a,redirectCount:f}}}function fx(e){let{entryType:t,initiatorType:n,name:r,responseEnd:i,startTime:a,decodedBodySize:o,encodedBodySize:s,responseStatus:c,transferSize:l}=e;return[`fetch`,`xmlhttprequest`].includes(n)?null:{type:`${t}.${n}`,start:lx(a),end:lx(i,a),name:r,data:{size:l,statusCode:c,decodedBodySize:o,encodedBodySize:s}}}function px(e){let t=e.entries[e.entries.length-1];return _x(e,`largest-contentful-paint`,t!=null&&t.element?[t.element]:void 0)}function mx(e){return e.sources!==void 0}function hx(e){let t=[],n=[];for(let r of e.entries)if(mx(r)){let e=[];for(let t of r.sources)if(t.node){n.push(t.node);let r=b8.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return _x(e,`cumulative-layout-shift`,n,t)}function gx(e){let t=e.entries[e.entries.length-1];return _x(e,`interaction-to-next-paint`,t!=null&&t.target?[t.target]:void 0)}function _x(e,t,n,r){let i=e.value,a=e.rating,o=e.entries[e.entries.length-1],s=lx((o==null?void 0:o.startTime)??(e.navigationStartTime??0)+i);return{type:`web-vital`,name:t,start:s,end:s,data:{value:i,size:i,rating:a,nodeIds:n?n.map(e=>b8.mirror.getId(e)):void 0,attributions:r}}}function vx(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}let r=[];return[`navigation`,`paint`,`resource`].forEach(e=>{r.push(C1(e,n))}),r.push(y1(ox(px,e)),v1(ox(hx,e)),S1(ox(gx,e))),()=>{r.forEach(e=>e())}}var Q=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,yx=`var t=Uint8Array,r=Uint16Array,n=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 r(31),s=0;s<31;++s)i[s]=e+=1<<t[s-1];var a=new n(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 r(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,n,e){for(var i=t.length,s=0,a=new r(n);s<i;++s)t[s]&&++a[t[s]-1];var o,h=new r(n);for(s=1;s<n;++s)h[s]=h[s-1]+a[s-1]<<1;if(e){o=new r(1<<n);var f=15-n;for(s=0;s<i;++s)if(t[s])for(var l=s<<4|t[s],c=n-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 r(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(r,n,e){return(null==e||e>r.length)&&(e=r.length),new t(r.subarray(n,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,r,n){var e=new Error(r||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!n)throw e;return e},z=function(t,r,n){n<<=7&r;var e=r/8|0;t[e]|=n,t[e+1]|=n>>8},_=function(t,r,n){n<<=7&r;var e=r/8|0;t[e]|=n,t[e+1]|=n>>8,t[e+2]|=n>>16},x=function(n,e){for(var i=[],s=0;s<n.length;++s)n[s]&&i.push({s:s,f:n[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,r){return t.f-r.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 r(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,r){return p[r.s]-p[t.s]||t.f-r.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,r,n){return-1==t.s?Math.max(A(t.l,r,n+1),A(t.r,r,n+1)):r[t.s]=n},D=function(t){for(var n=t.length;n&&!t[--n];);for(var e=new r(++n),i=0,s=t[0],a=1,o=function(t){e[i++]=t},h=1;h<=n;++h)if(t[h]==s&&h!=n)++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:n}},T=function(t,r){for(var n=0,e=0;e<r.length;++e)n+=t[e]*r[e];return n},k=function(t,r,n){var e=n.length,i=m(r+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]=n[s];return 8*(i+4+e)},U=function(t,n,a,o,h,f,l,u,c,v,m){z(n,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 r(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(n,m,t.subarray(c,c+v));if(z(n,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(n,m,S-257),z(n,m+5,j-1),z(n,m+10,K-4),m+=14;for(B=0;B<K;++B)z(n,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 rt=31&tt[B];z(n,m,Y[rt]),m+=H[rt],rt>15&&(z(n,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 nt=o[B];if(nt>255){_(n,m,N[(rt=nt>>18&31)+257]),m+=P[rt+257],rt>7&&(z(n,m,nt>>23&31),m+=e[rt]);var et=31&nt;_(n,m,Q[et]),m+=R[et],et>3&&(_(n,m,nt>>5&8191),m+=i[et])}else _(n,m,N[nt]),m+=P[nt]}return _(n,m,N[256]),m+P[256]},C=new n([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),r=0;r<256;++r){for(var n=r,e=9;--e;)n=(1&n&&-306674912)^n>>>1;t[r]=n}return t}(),S=function(){var t=1,r=0;return{p:function(n){for(var e=t,i=r,s=0|n.length,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=e+=n[a];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,r=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(r%=65521))<<8|r>>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 r(32768),x=c.h||new r(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 n(25e3),I=new r(288),S=new r(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),rt=0;for(P=0;P<tt;++P){var nt=j-W+P&32767,et=nt-_[nt]&32767;et>rt&&(rt=et,K=nt)}}}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,r,n){for(;n;++r)t[r]=n,n>>>=8},j=function(){function r(r,n){if("function"==typeof r&&(n=r,r={}),this.ondata=n,this.o=r||{},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 r.prototype.p=function(t,r){this.ondata(L(t,this.o,0,0,this.s),r)},r.prototype.push=function(r,n){this.ondata||E(5),this.s.l&&E(4);var e=r.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(r.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(r.subarray(s),32768),this.s.z=r.length-s+32768,this.s.i=32766,this.s.w=32768}else this.b.set(r,this.s.z),this.s.z+=r.length;this.s.l=1&n,(this.s.z>this.s.w+8191||n)&&(this.p(this.b,n||!1),this.s.w=this.s.i,this.s.i-=2),n&&(this.s=this.o={},this.b=F)},r.prototype.flush=function(r){if(this.ondata||E(5),this.s.l&&E(4),this.p(this.b,!1),this.s.w=this.s.i,this.s.i-=2,r){var n=new t(6);n[0]=this.s.r>>3;var e=k(n,this.s.r,F);this.s.r=0,this.ondata(n.subarray(0,e>>3),!1)}},r}();function q(t,r){r||(r={});var n=function(){var t=-1;return{p:function(r){for(var n=t,e=0;e<r.length;++e)n=I[255&n^r[e]]^n>>>8;t=n},d:function(){return~t}}}(),e=t.length;n.p(t);var i,s=L(t,r,10+((i=r).filename?i.filename.length+1:0),8),a=s.length;return function(t,r){var n=r.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=r.level<2?4:9==r.level?2:0,t[9]=3,0!=r.mtime&&O(t,4,Math.floor(new Date(r.mtime||Date.now())/1e3)),n){t[3]=8;for(var e=0;e<=n.length;++e)t[e+10]=n.charCodeAt(e)}}(s,r),O(s,a-8,n.d()),O(s,a-4,e),s}var B=function(){function t(t,r){this.c=S(),this.v=1,j.call(this,t,r)}return t.prototype.push=function(t,r){this.c.p(t),j.prototype.push.call(this,t,r)},t.prototype.p=function(t,r){var n=L(t,this.o,this.v&&(this.o.dictionary?6:2),r&&4,this.s);this.v&&(function(t,r){var n=r.level,e=0==n?0:n<6?1:9==n?3:2;if(t[0]=120,t[1]=e<<6|(r.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,r.dictionary){var i=S();i.p(r.dictionary),O(t,2,i.d())}}(n,this.o),this.v=0),r&&O(n,n.length-4,this.c.d()),this.ondata(n,r)},t.prototype.flush=function(t){j.prototype.flush.call(this,t)},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,r){this.ondata||E(5),this.d&&E(4),this.ondata(K(t),this.d=r||!1)},t}();function K(r,n){if(G)return G.encode(r);for(var e=r.length,i=new t(r.length+(r.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=r.charCodeAt(o);f<128||n?a(f):f<2048?(a(192|f>>6),a(128|63&f)):f>55295&&f<57344?(a(240|(f=65536+(1047552&f)|1023&r.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 r=this._hasEvents?",":"";this.stream.push(r+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let r=0;for(const n of t)r+=n.length;const n=new Uint8Array(r);for(let r=0,e=0,i=t.length;r<i;r++){const i=t[r];n.set(i,e),e+=i.length}return n}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new B,this.deflate.ondata=(t,r)=>{this._deflatedData.push(t)},this.stream=new J((t,r)=>{this.deflate.push(t,r)}),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 r=t.data.method,n=t.data.id,e=t.data.arg;if(r in P&&"function"==typeof P[r])try{const t=P[r](e);postMessage({id:n,method:r,success:!0,response:t})}catch(t){postMessage({id:n,method:r,success:!1,response:t.message}),console.error(t)}}),postMessage({id:void 0,method:"init",success:!0,response:void 0});`;function bx(){let e=new Blob([yx],{type:`text/javascript`});return URL.createObjectURL(e)}var xx=[`log`,`warn`,`error`],Sx=`[Replay] `;function Cx(e,t=`info`){yd({category:`console`,data:{logger:`replay`},level:t,message:`${Sx}${e}`},{level:t})}function wx(){let e=!1,t=!1,n={exception:()=>void 0,infoTick:()=>void 0,setConfig:n=>{e=!!n.captureExceptions,t=!!n.traceInternals}};return Q?(xx.forEach(e=>{n[e]=(...n)=>{b[e](Sx,...n),t&&Cx(n.join(``),tf(e))}}),n.exception=(r,...i)=>{i.length&&n.error&&n.error(...i),b.error(Sx,r),e?Mc(r,{mechanism:{handled:!0,type:`auto.function.replay.debug`}}):t&&Cx(r,`error`)},n.infoTick=(...e)=>{b.log(Sx,...e),t&&setTimeout(()=>Cx(e[0]),0)}):xx.forEach(e=>{n[e]=()=>void 0}),n}var $=wx(),Tx=class extends Error{constructor(){super(`Event buffer exceeded maximum size of ${b3}.`)}},Ex=class extends Error{constructor(){super(`Worker destroyed`)}},Dx=class{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return`sync`}destroy(){this.events=[]}async addEvent(e){let t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>b3)throw new Tx;this.events.push(e)}finish(){return new Promise(e=>{let t=this.events;this.clear(),e(JSON.stringify(t))})}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){let e=null;for(let{timestamp:t}of this.events)(e===null||t<e)&&(e=t);return e===null?e:T8(e)}},Ox=class{constructor(e){this._onMessage=({data:e})=>{let t=e;if(typeof t.id!=`number`)return;let n=this._pending.get(t.id);n&&n.method===t.method&&(this._pending.delete(t.id),t.success?n.resolve(t.response):(Q&&$.error(`Error in compression worker: `,t.response),n.reject(Error(`Error in compression worker`))))},this._worker=e,this._id=0,this._pending=new Map,this._worker.addEventListener(`message`,this._onMessage)}ensureReady(){return this._ensureReadyPromise||=new Promise((e,t)=>{this._worker.addEventListener(`message`,({data:n})=>{n.success?e():(Q&&$.warn(`Received worker message with unsuccessful status`,n),t(Error(`Received worker message with unsuccessful status`)))},{once:!0}),this._worker.addEventListener(`error`,e=>{Q&&$.warn(`Failed to load Replay compression worker`,e),t(Error(`Failed to load Replay compression worker: ${e instanceof ErrorEvent&&e.message?e.message:`Unknown error. This can happen due to CSP policy restrictions, network issues, or the worker script failing to load.`}`))},{once:!0})}),this._ensureReadyPromise}destroy(){Q&&$.log(`Destroying compression worker`),this._worker.removeEventListener(`message`,this._onMessage),this._pending.forEach(e=>e.reject(new Ex)),this._pending.clear(),this._worker.terminate()}postMessage(e,t){let n=this._getAndIncrementId();return new Promise((r,i)=>{this._pending.set(n,{method:e,resolve:r,reject:i});try{this._worker.postMessage({id:n,method:e,arg:t})}catch(e){this._pending.delete(n),i(e)}})}_getAndIncrementId(){return this._id++}},kx=class{constructor(e){this._worker=new Ox(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return`worker`}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){let t=T8(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);let n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>b3?Promise.reject(new Tx):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage(`clear`).then(null,e=>{Q&&$.exception(e,`Sending "clear" message to worker failed`,e)})}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage(`addEvent`,e)}async _finishRequest(){let e=await this._worker.postMessage(`finish`);return this._earliestTimestamp=null,this._totalSize=0,e}},Ax=class{constructor(e){this._fallback=new Dx,this._compression=new kx(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){Q&&$.exception(e,`Failed to load the compression worker, falling back to simple buffer`);return}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){let{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(let t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){if(e instanceof Ex)return;Q&&$.exception(e,`Failed to add events when switching buffers.`)}}};function jx({useCompression:e,workerUrl:t}){if(e&&window.Worker){let e=Mx(t);if(e)return e}return Q&&$.log(`Using simple buffer`),new Dx}function Mx(e){try{let t=e||Nx();return t?(Q&&$.log(`Using compression worker${e?` from ${e}`:``}`),new Ax(new Worker(t))):void 0}catch(e){Q&&$.exception(e,`Failed to create compression worker`)}}function Nx(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>`u`||!__SENTRY_EXCLUDE_REPLAY_WORKER__?bx():``}function Px(){try{return`sessionStorage`in q&&!!q.sessionStorage}catch{return!1}}function Fx(e){Ix(),e.session=void 0}function Ix(){if(Px())try{q.sessionStorage.removeItem(o3)}catch{}}function Lx(e){return e!==void 0&&Math.random()<e}function Rx(e){if(Px())try{q.sessionStorage.setItem(o3,JSON.stringify(e))}catch{}}function zx(e){let t=Date.now();return{id:e.id||lt(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId,dirty:e.dirty||!1}}function Bx(e,t){return Lx(e)?`session`:t?`buffer`:!1}function Vx({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){let i=zx({sampled:Bx(e,t),previousSessionId:r});return n&&Rx(i),i}function Hx(){if(!Px())return null;try{let e=q.sessionStorage.getItem(o3);if(!e)return null;let t=JSON.parse(e);return Q&&$.infoTick(`Loading existing session`),zx(t)}catch{return null}}function Ux(e,t,n=+new Date){return e===null||t===void 0||t<0||t!==0&&e+t<=n}function Wx(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return Ux(e.started,t,r)||Ux(e.lastActivity,n,r)}function Gx(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!Wx(e,{sessionIdleExpire:t,maxReplayDuration:n})||e.sampled===`buffer`&&e.segmentId===0)}function Kx({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){let i=r.stickySession&&Hx();return i?Gx(i,{sessionIdleExpire:e,maxReplayDuration:t})?(Q&&$.infoTick(`Session in sessionStorage is expired, creating new one...`),Vx(r,{previousSessionId:i.id})):i:(Q&&$.infoTick(`Creating new session`),Vx(r,{previousSessionId:n}))}function qx(e){return e.type===Y.Custom}function Jx(e,t,n){return Zx(e,t)?(Xx(e,t,n),!0):!1}function Yx(e,t,n){return Zx(e,t)?Xx(e,t,n):Promise.resolve(null)}async function Xx(e,t,n){let{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;let i=e.recordingMode===`buffer`;try{n&&i&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);let a=Qx(t,e.getOptions().beforeAddRecordingEvent);return a?await r.addEvent(a):void 0}catch(t){if(!e.isEnabled())return e.handleException(t),null;let n=t&&t instanceof Tx,a=n?`eventBufferOverflow`:`eventBufferError`,o=M();if(o){let e=n?`buffer_overflow`:`internal_sdk_error`;o.recordDroppedEvent(e,`replay`)}if(n&&i)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:a})}}function Zx(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;let n=T8(t.timestamp);return n+e.timeouts.sessionIdlePause<Date.now()?!1:n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration?(Q&&$.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1):!0}function Qx(e,t){try{if(typeof t==`function`&&qx(e))return t(e)}catch(e){return Q&&$.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}var $x=100;function e5(e,t,n){let r=e.getContext();t&&r.traceIds.size<$x&&r.traceIds.add(t),n&&r.segmentNames.size<$x&&r.segmentNames.add(n)}function t5(e){return t=>{e.isEnabled()&&e5(e,t.trace_id,t.name||void 0)}}function n5(e){return!e.type}function r5(e){return e.type===`transaction`}function i5(e){return e.type===`replay_event`}function a5(e){return e.type===`feedback`}function o5(e){return(t,n)=>{if(!e.isEnabled()||!n5(t)&&!r5(t))return;let r=n.statusCode;!r||r<200||r>=300||(r5(t)?s5(e,t):c5(e,t))}}function s5(e,t){var n;e5(e,(n=t.contexts)==null||(n=n.trace)==null?void 0:n.trace_id,t.transaction)}function c5(e,t){var n;let r=e.getContext();if(t.event_id&&r.errorIds.size<100&&r.errorIds.add(t.event_id),e.recordingMode!==`buffer`||!((n=t.tags)!=null&&n.replayId))return;let{beforeErrorSampling:i}=e.getOptions();(typeof i!=`function`||i(t))&&iy(async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}})}function l5(e){return t=>{e.isEnabled()&&n5(t)&&u5(e,t)}}function u5(e,t){var n;let r=(n=t.exception)==null||(n=n.values)==null||(n=n[0])==null?void 0:n.value;typeof r==`string`&&(r.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||r.match(/(does not match server-rendered HTML|Hydration failed because)/i))&&D8(e,K8({category:`replay.hydrate-error`,data:{url:dv()}}))}function d5(e){let t=M();t&&t.on(`beforeAddBreadcrumb`,t=>f5(e,t))}function f5(e,t){if(!e.isEnabled()||!h5(t))return;let n=p5(t);n&&D8(e,n)}function p5(e){return!h5(e)||[`fetch`,`xhr`,`sentry.event`,`sentry.transaction`].includes(e.category)||e.category.startsWith(`ui.`)?null:e.category===`console`?m5(e):K8(e)}function m5(e){var t;let n=(t=e.data)==null?void 0:t.arguments;if(!Array.isArray(n)||n.length===0)return K8(e);let r=!1,i=n.map(e=>{if(!e)return e;if(typeof e==`string`)return e.length>_3?(r=!0,`${e.slice(0,_3)}\u2026`):e;if(typeof e==`object`)try{let t=qe(e,7);return JSON.stringify(t).length>_3?(r=!0,`${JSON.stringify(t,null,2).slice(0,_3)}\u2026`):t}catch{}return e});return K8({...e,data:{...e.data,arguments:i,...r?{_meta:{warnings:[`CONSOLE_ARG_TRUNCATED`]}}:{}}})}function h5(e){return!!e.category}function g5(e,t){var n,r;return e.type||!((n=e.exception)!=null&&(n=n.values)!=null&&n.length)?!1:!!((r=t.originalException)!=null&&r.__rrweb__)}function _5(){let e=A().getPropagationContext().dsc;e&&delete e.replay_id;let t=F();if(t){let e=sa(t);delete e.replay_id}}function v5(e){let t=A().getPropagationContext().dsc;t&&(t.replay_id=e);let n=F();if(n){let t=sa(n);t.replay_id=e}}function y5(e,t){e.triggerUserActivity(),e.addUpdate(()=>!t.timestamp||(e.throttledAddEvent({type:Y.Custom,timestamp:t.timestamp*1e3,data:{tag:`breadcrumb`,payload:{timestamp:t.timestamp,type:`default`,category:`sentry.feedback`,data:{feedbackId:t.event_id}}}}),!1))}function b5(e,t){return e.recordingMode!==`buffer`||t.message===c3||!t.exception||t.type?!1:Lx(e.getOptions().errorSampleRate)}function x5(e){return Object.assign((t,n)=>{var r;if(e.session&&Gx(e.session,{maxReplayDuration:e.getOptions().maxReplayDuration,sessionIdleExpire:e.timeouts.sessionIdleExpire})&&_5(),!e.isEnabled()||e.isPaused())return t;if(i5(t))return delete t.breadcrumbs,t;if(!n5(t)&&!r5(t)&&!a5(t))return t;if(!e.checkAndHandleExpiredSession())return _5(),t;if(a5(t)){let n=e.getSessionId(),r=t.contexts.feedback.replay_id;return r&&r!==n||(e.flush(),t.contexts.feedback.replay_id=n,y5(e,t)),t}if(g5(t,n)&&!e.getOptions()._experiments.captureExceptions)return Q&&$.log(`Ignoring error from rrweb internals`,t),null;let i=b5(e,t);if((i||e.recordingMode===`session`)&&(t.tags={...t.tags,replayId:e.getSessionId()}),i&&e.recordingMode===`buffer`&&((r=e.session)==null?void 0:r.sampled)===`buffer`){let t=e.session;t.dirty=!0,e.getOptions().stickySession&&Rx(t)}return t},{id:`Replay`})}function S5(e,t){return t.map(({type:t,start:n,end:r,name:i,data:a})=>{let o=e.throttledAddEvent({type:Y.Custom,timestamp:n,data:{tag:`performanceSpan`,payload:{op:t,description:i,startTimestamp:n,endTimestamp:r,data:a}}});return typeof o==`string`?Promise.resolve(null):o})}function C5(e){let{from:t,to:n}=e,r=Date.now()/1e3;return{type:`navigation.push`,start:r,end:r,name:n,data:{previous:t}}}function w5(e){return t=>{if(!e.isEnabled())return;let n=C5(t);n!==null&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate(()=>(S5(e,[n]),!1)))}}function T5(e,t){return Q&&e.getOptions()._experiments.traceInternals?!1:ed(t,M())}function E5(e,t){e.isEnabled()&&t!==null&&(T5(e,t.name)||e.addUpdate(()=>(S5(e,[t]),!0)))}function D5(e){if(!e)return;let t=new TextEncoder;try{if(typeof e==`string`)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){let n=uy(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function O5(e){if(!e)return;let t=parseInt(e,10);return isNaN(t)?void 0:t}function k5(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};let n={...e._meta};return n.warnings=[...n.warnings||[],t],e._meta=n,e}function A5(e,t){if(!t)return null;let{startTimestamp:n,endTimestamp:r,url:i,method:a,statusCode:o,request:s,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:i,data:{method:a,statusCode:o,request:s,response:c}}}function j5(e){return{headers:{},size:e,_meta:{warnings:[`URL_SKIPPED`]}}}function M5(e,t,n){if(!t&&Object.keys(e).length===0)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};let r={headers:e,size:t},{body:i,warnings:a}=P5(n);return r.body=i,a!=null&&a.length&&(r._meta={warnings:a}),r}function N5(e,t){return Object.entries(e).reduce((n,[r,i])=>{let a=r.toLowerCase();return t.includes(a)&&e[r]&&(n[a]=i),n},{})}function P5(e){if(!e||typeof e!=`string`)return{body:e};let t=e.length>g3,n=F5(e);if(t){let t=e.slice(0,g3);return n?{body:t,warnings:[`MAYBE_JSON_TRUNCATED`]}:{body:`${t}\u2026`,warnings:[`TEXT_TRUNCATED`]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function F5(e){let t=e[0],n=e[e.length-1];return t===`[`&&n===`]`||t===`{`&&n===`}`}function I5(e,t){return at(L5(e),t)}function L5(e,t=q.document.baseURI){if(e.startsWith(`http://`)||e.startsWith(`https://`)||e.startsWith(q.location.origin))return e;let n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;let r=n.href;return!e.endsWith(`/`)&&r.endsWith(`/`)?r.slice(0,-1):r}async function R5(e,t,n){try{let r=A5(`resource.fetch`,await B5(e,t,n));E5(n.replay,r)}catch(e){Q&&$.exception(e,`Failed to capture fetch breadcrumb`)}}function z5(e,t){let{input:n,response:r}=t,i=D5(n?fy(n):void 0),a=r?O5(r.headers.get(`content-length`)):void 0;i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}async function B5(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r}=t,{url:o,method:s,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,d=I5(o,n.networkDetailAllowUrls)&&!I5(o,n.networkDetailDenyUrls);return{startTimestamp:i,endTimestamp:a,url:o,method:s,statusCode:c,request:d?V5(n,t.input,l):j5(l),response:await H5(d,n,t.response,u)}}function V5({networkCaptureBodies:e,networkRequestHeaders:t},n,r){let i=n?K5(n,t):{};if(!e)return M5(i,r,void 0);let[a,o]=dy(fy(n),$),s=M5(i,r,a);return o?k5(s,o):s}async function H5(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,i){if(!e&&i!==void 0)return j5(i);let a=r?G5(r.headers,n):{};if(!r||!t&&i!==void 0)return M5(a,i,void 0);let[o,s]=await W5(r),c=U5(o,{networkCaptureBodies:t,responseBodySize:i,captureDetails:e,headers:a});return s?k5(c,s):c}function U5(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:i}){try{let a=e!=null&&e.length&&n===void 0?D5(e):n;return r?t?M5(i,a,e):M5(i,a,void 0):j5(a)}catch(e){return Q&&$.exception(e,`Failed to serialize response body`),M5(i,n,void 0)}}async function W5(e){let t=J5(e);if(!t)return[void 0,`BODY_PARSE_ERROR`];try{return[await Y5(t)]}catch(e){return e instanceof Error&&e.message.indexOf(`Timeout`)>-1?(Q&&$.warn(`Parsing text body from response timed out`),[void 0,`BODY_PARSE_TIMEOUT`]):(Q&&$.exception(e,`Failed to get text body from response`),[void 0,`BODY_PARSE_ERROR`])}}function G5(e,t){let n={};return t.forEach(t=>{e.get(t)&&(n[t]=e.get(t))}),n}function K5(e,t){return e.length===1&&typeof e[0]!=`string`?q5(e[0],t):e.length===2?q5(e[1],t):{}}function q5(e,t){if(!e)return{};let n=e.headers;return n?n instanceof Headers?G5(n,t):Array.isArray(n)?{}:N5(n,t):{}}function J5(e){try{return e.clone()}catch(e){Q&&$.exception(e,`Failed to clone response body`)}}function Y5(e){return new Promise((t,n)=>{let r=iy(()=>n(Error(`Timeout while trying to read response body`)),500);X5(e).then(e=>t(e),e=>n(e)).finally(()=>clearTimeout(r))})}async function X5(e){return e.text()}async function Z5(e,t,n){try{let r=A5(`resource.xhr`,$5(e,t,n));E5(n.replay,r)}catch(e){Q&&$.exception(e,`Failed to capture xhr breadcrumb`)}}function Q5(e,t){let{xhr:n,input:r}=t;if(!n)return;let i=D5(r),a=n.getResponseHeader(`content-length`)?O5(n.getResponseHeader(`content-length`)):n7(n.response,n.responseType);i!==void 0&&(e.data.request_body_size=i),a!==void 0&&(e.data.response_body_size=a)}function $5(e,t,n){let r=Date.now(),{startTimestamp:i=r,endTimestamp:a=r,input:o,xhr:s}=t,{url:c,method:l,status_code:u=0,request_body_size:d,response_body_size:f}=e.data;if(!c)return null;if(!s||!I5(c,n.networkDetailAllowUrls)||I5(c,n.networkDetailDenyUrls))return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:j5(d),response:j5(f)};let p=s[ay],m=p?N5(p.request_headers,n.networkRequestHeaders):{},h=N5(py(s),n.networkResponseHeaders),[g,_]=n.networkCaptureBodies?dy(o,$):[void 0],[v,y]=n.networkCaptureBodies?e7(s):[void 0],b=M5(m,d,g),x=M5(h,f,v);return{startTimestamp:i,endTimestamp:a,url:c,method:l,statusCode:u,request:_?k5(b,_):b,response:y?k5(x,y):x}}function e7(e){let t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return t7(e.response,e.responseType)}catch(e){t.push(e)}return Q&&$.warn(`Failed to get xhr response body`,...t),[void 0]}function t7(e,t){try{if(typeof e==`string`)return[e];if(e instanceof Document)return[e.body.outerHTML];if(t===`json`&&Ce(e))return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return Q&&$.exception(t,`Failed to serialize body`,e),[void 0,`BODY_PARSE_ERROR`]}return Q&&$.log(`Skipping network body because of body type`,e),[void 0,`UNPARSEABLE_BODY_TYPE`]}function n7(e,t){try{return D5(t===`json`&&Ce(e)?JSON.stringify(e):e)}catch{return}}function r7(e){let t=M();try{let{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o}=e.getOptions(),s={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:i,networkRequestHeaders:a,networkResponseHeaders:o};t&&t.on(`beforeAddBreadcrumb`,(e,t)=>i7(s,e,t))}catch{}}function i7(e,t,n){if(t.data)try{a7(t)&&s7(n)&&(Q5(t,n),Z5(t,n,e)),o7(t)&&c7(n)&&(z5(t,n),R5(t,n,e))}catch(e){Q&&$.exception(e,`Error when enriching network breadcrumb`)}}function a7(e){return e.category===`xhr`}function o7(e){return e.category===`fetch`}function s7(e){return e==null?void 0:e.xhr}function c7(e){return(e==null?void 0:e.input)!==void 0}function l7(e){let t=M();if(Wv(Z8(e)),Qv(w5(e)),d5(e),r7(e),Yc(x5(e)),t){t.on(`beforeSendEvent`,l5(e)),t.on(`afterSendEvent`,o5(e)),t.on(`createDsc`,t=>{let n=e.getSessionId();n&&e.isEnabled()&&e.recordingMode===`session`&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)}),t.on(`processSegmentSpan`,t5(e)),t.on(`spanStart`,t=>{e.lastActiveSpan=t}),t.on(`spanEnd`,t=>{e.lastActiveSpan=t});let n;t.on(`beforeSendFeedback`,async(t,r)=>{var i;let a=(i=t.contexts)==null?void 0:i.feedback;if(!(r!=null&&r.includeReplay)||!a)return;if(a.source===`widget`&&n){a.replay_id=n,n=void 0;return}let o=e.getSessionId();e.isEnabled()&&o&&(a.source===`api`&&await e.sendBufferedReplayOrFlush(),a.replay_id=o)}),t.on(`openFeedbackWidget`,async()=>{n=void 0,await e.sendBufferedReplayOrFlush(),n=e.isEnabled()?e.getSessionId():void 0})}}async function u7(e){try{return await Promise.all(S5(e,[d7(q.performance.memory)]))}catch{return[]}}function d7(e){let{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,i=Date.now()/1e3;return{type:`memory`,name:`memory`,start:i,end:i,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function f7(e,t,n){return cs(e,t,{...n,setTimeoutImpl:iy})}var p7=r.navigator;function m7(){return/iPhone|iPad|iPod/i.test((p7==null?void 0:p7.userAgent)??``)||/Macintosh/i.test((p7==null?void 0:p7.userAgent)??``)&&p7!=null&&p7.maxTouchPoints&&(p7==null?void 0:p7.maxTouchPoints)>1?{sampling:{mousemove:!1}}:{}}function h7(e){let t=!1;return(n,r)=>{try{if(!e.checkAndHandleExpiredSession()){Q&&$.warn(`Received replay event after session expired.`);return}let i=r||!t;t=!0,g7(n),e.clickDetector&&U8(e.clickDetector,n),e.addUpdate(()=>{if(e.recordingMode===`buffer`&&i&&e.setInitialState(),!Jx(e,n,i))return!0;if(!i)return!1;let t=e.session;if(v7(e,i),e.recordingMode===`buffer`&&t&&e.eventBuffer&&!t.dirty){let n=e.eventBuffer.getEarliestTimestamp();n&&(Q&&$.log(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&Rx(t))}return t!=null&&t.previousSessionId||e.recordingMode===`session`&&e.flush(),!0})}catch(t){e.handleException(t)}}}function g7(e){let t=e.data;if(e.type===Y.IncrementalSnapshot&&t&&typeof t==`object`&&`source`in t&&t.source===X.Mutation&&`attributes`in t&&Array.isArray(t.attributes))for(let e of t.attributes){let t=b8.mirror.getNode(e.id),n=t&&b8.mirror.getMeta(t);if(!t||(n==null?void 0:n.type)!==q8.Element)continue;let r={...n.attributes},i=!1;for(let[t,n]of Object.entries(e.attributes))Y8.has(t)&&(n===null?delete r[t]:r[t]=n,i=!0);i&&b8.mirror.add(t,{...n,attributes:r})}}function _7(e){let t=e.getOptions();return{type:Y.Custom,timestamp:Date.now(),data:{tag:`options`,payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:e.eventBuffer?e.eventBuffer.type===`worker`:!1,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function v7(e,t){var n;t&&((n=e.session)==null?void 0:n.segmentId)===0&&Jx(e,_7(e),!1)}function y7(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function b7(e,t,n,r){return Fa(Ya(e,Ja(e),r,n),[[{type:`replay_event`},e],[{type:`replay_recording`,length:typeof t==`string`?new TextEncoder().encode(t).length:t.length},t]])}function x7({recordingData:e,headers:t}){let n,r=`${JSON.stringify(t)}
|
|
500
|
+
`;if(typeof e==`string`)n=`${r}${e}`;else{let t=new TextEncoder().encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function S7({client:e,scope:t,replayId:n,event:r}){let i={event_id:n,integrations:typeof e._integrations==`object`&&e._integrations!==null&&!Array.isArray(e._integrations)?Object.keys(e._integrations):void 0};e.emit(`preprocessEvent`,r,i);let a=await xc(e.getOptions(),r,i,t,e,j());if(!a)return null;e.emit(`postprocessEvent`,a,i),a.platform=a.platform||`javascript`;let o=e.getSdkMetadata(),{name:s,version:c,settings:l}=(o==null?void 0:o.sdk)||{};return a.sdk={...a.sdk,name:s||`sentry.javascript.unknown`,version:c||`0.0.0`,settings:l},a}async function C7({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:i,session:a}){let o=x7({recordingData:e,headers:{segment_id:n}}),{urls:s,errorIds:c,traceIds:l,segmentNames:u,initialTimestamp:d}=r,f=M(),p=A(),m=f==null?void 0:f.getTransport(),h=f==null?void 0:f.getDsn();if(!f||!m||!h||!a.sampled)return Promise.resolve({});let g=await S7({scope:p,client:f,replayId:t,event:{type:s3,replay_start_timestamp:d/1e3,timestamp:i/1e3,error_ids:c,trace_ids:l,segment_names:u,urls:s,replay_id:t,segment_id:n,replay_type:a.sampled}});if(!g)return Q&&$.log("An event processor returned `null`, will not send event."),Promise.resolve({});delete g.sdkProcessingMetadata;let _=b7(g,o,h,f.getOptions().tunnel),v;try{v=await m.send(_)}catch(e){let t=Error(c3);try{t.cause=e}catch{}throw t}let y=Bl({},v);if(zl(y,`replay`))throw new T7(y);if(typeof v.statusCode==`number`&&(v.statusCode<200||v.statusCode>=300))throw new w7(v.statusCode);return v}var w7=class extends Error{constructor(e){super(`Transport returned status code ${e}`)}},T7=class extends Error{constructor(e){super(`Rate limit hit`),this.rateLimits=e}},E7=class extends Error{constructor(){super(`Session is too long, not sending replay`)}};async function D7(e,t={count:0,interval:m3}){let{recordingData:n,onError:r}=e;if(n.length)try{return await C7(e),!0}catch(n){if(n instanceof w7||n instanceof T7)throw n;if(Fc(`Replays`,{_retryCount:t.count}),r&&r(n),t.count>=h3){let e=Error(`${c3} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise((n,r)=>{iy(async()=>{try{await D7(e,t),n(!0)}catch(e){r(e)}},t.interval)})}}var O7=`__THROTTLED`,k7=`__SKIPPED`;function A7(e,t,n){let r=new Map,i=e=>{let t=e-n;r.forEach((e,n)=>{n<t&&r.delete(n)})},a=()=>[...r.values()].reduce((e,t)=>e+t,0),o=!1;return(...n)=>{let s=Math.floor(Date.now()/1e3);if(i(s),a()>=t){let e=o;return o=!0,e?k7:O7}o=!1;let c=r.get(s)||0;return r.set(s,c+1),e(...n)}}var j7=class{constructor({options:e,recordingOptions:t}){this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode=`session`,this.timeouts={sessionIdlePause:l3,sessionIdleExpire:u3},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,segmentNames:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:``},this._recordingOptions=t,this._options=e,this._debouncedFlush=f7(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=A7((e,t)=>Yx(this,e,t),300,5);let{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),i=n?{threshold:Math.min(v3,n),timeout:n,scrollTimeout:y3,ignoreSelector:r?r.join(`,`):``}:void 0;if(i&&(this.clickDetector=new R8(this,i)),Q){let t=e._experiments;$.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}this._handleVisibilityChange=()=>{q.document.visibilityState===`visible`?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()},this._handleWindowBlur=()=>{let e=K8({category:`ui.blur`});this._doChangeToBackgroundTasks(e)},this._handleWindowFocus=()=>{let e=K8({category:`ui.focus`});this._doChangeToForegroundTasks(e)},this._handleKeyboardEvent=e=>{nx(this,e)}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}getMaskAttributeFn(){return this._recordingOptions.maskAttributeFn}handleException(e){Q&&$.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){let{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;this._requiresManualStart=r,r||(this._initializeSessionForSampling(e),this.session?this.session.sampled!==!1&&(this.recordingMode=this.session.sampled===`buffer`&&this.session.segmentId===0?`buffer`:`session`,Q&&$.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording()):Q&&$.exception(Error(`Unable to initialize and create session`)))}start(){if(this._isEnabled&&this.recordingMode===`session`){Q&&$.log(`Recording is already in progress`);return}if(this._isEnabled&&this.recordingMode===`buffer`){Q&&$.log("Buffering is in progress, call `flush()` to save the replay");return}Q&&$.infoTick(`Starting replay in session mode`),this._updateUserActivity();let e=Kx({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this.recordingMode=`session`,this._initializeRecording()}startBuffering(){if(this._isEnabled){Q&&$.log("Buffering is in progress, call `flush()` to save the replay");return}Q&&$.infoTick(`Starting replay in buffer mode`);let e=Kx({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode=`buffer`,this._initializeRecording()}startRecording(){try{let e=this._canvas;this._stopRecording=b8({...this._recordingOptions,...this.recordingMode===`buffer`?{checkoutEveryNms:p3}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:h7(this),...m7(),onMutation:this._onMutationHandler.bind(this),...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&=(this._stopRecording(),void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){var n,r;if(!this._isEnabled)return;this._isEnabled=!1,this.recordingMode=`buffer`;let i=t??`manual`;(n=M())==null||n.emit(`replayEnd`,{sessionId:(r=this.session)==null?void 0:r.id,reason:i});try{var a;Q&&$.log(`Stopping Replay triggered by ${i}`),_5(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),(a=this.eventBuffer)==null||a.destroy(),this.eventBuffer=null,Fx(this)}catch(e){this.handleException(e)}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),Q&&$.log(`Pausing replay`))}resume(){this._isPaused&&this._checkSession()&&(this._isPaused=!1,this.startRecording(),Q&&$.log(`Resuming replay`))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if(this.recordingMode===`session`)return this.flushImmediate();let t=Date.now();Q&&$.log(`Converting buffer to session`),await this.flushImmediate();let n=this.stopRecording();e&&n&&this.recordingMode!==`session`&&(this.recordingMode=`session`,this.session&&(this.session.dirty=!1,this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession(),v5(this.session.id)),this.startRecording())}addUpdate(e){let t=e();this.recordingMode!==`buffer`&&this._isEnabled&&t!==!0&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),!this._stopRecording){if(!this._checkSession())return;this.resume()}else this.checkAndHandleExpiredSession(),this._updateSessionActivity()}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return this.recordingMode===`buffer`?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(e){var t,n;if(!(e&&((t=this.session)==null?void 0:t.sampled)===!1))return(n=this.session)==null?void 0:n.id}checkAndHandleExpiredSession(){var e;if(this._lastActivity&&Ux(this._lastActivity,this.timeouts.sessionIdlePause)&&((e=this.session)==null?void 0:e.sampled)===`session`)this.pause();else return!!this._checkSession()}setInitialState(){let e=`${q.location.pathname}${q.location.hash}${q.location.search}`,t=`${q.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){let n=this._throttledAddEvent(e,t);if(n===O7){let e=K8({category:`replay.throttled`});this.addUpdate(()=>!Jx(this,{type:w8,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e,metric:!0}}))}return n}getCurrentRoute(){let e=this.lastActiveSpan||F(),t=e&&Ni(e);if(!t)return;let n=P(t),r=n.attributes[w3];if(r&&[`route`,`custom`].includes(r))return n.name}_initializeRecording(){if(this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=jx({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.session){var e;(e=M())==null||e.emit(`replayStart`,{sessionId:this.session.id,recordingMode:this.recordingMode})}this.startRecording(),this.recordingMode===`session`&&this.session&&v5(this.session.id)}_initializeSessionForSampling(e){let t=this._options.errorSampleRate>0,n=Kx({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;let e=this.session;return!Gx(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:`sessionExpired`}),this.initializeSampling(e.id))}_addListeners(){try{q.document.addEventListener(`visibilitychange`,this._handleVisibilityChange),q.addEventListener(`blur`,this._handleWindowBlur),q.addEventListener(`focus`,this._handleWindowFocus),q.addEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||=(l7(this),!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=vx(this)}_removeListeners(){try{q.document.removeEventListener(`visibilitychange`,this._handleVisibilityChange),q.removeEventListener(`blur`,this._handleWindowBlur),q.removeEventListener(`focus`,this._handleWindowFocus),q.removeEventListener(`keydown`,this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}_doChangeToBackgroundTasks(e){this.session&&(Gx(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})?_5():(e&&this._createCustomBreadcrumb(e),this.conditionalFlush()))}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):Q&&$.log(`Document has become active, but session has expired`))}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate(()=>{this.throttledAddEvent({type:Y.Custom,timestamp:e.timestamp||0,data:{tag:`breadcrumb`,payload:e}})})}_addPerformanceEntries(){let e=sx(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){let t=this._context.initialTimestamp/1e3;e=e.filter(e=>e.start>=t)}return Promise.all(S5(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.segmentNames.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){let{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;let n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){let e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),segmentNames:Array.from(this._context.segmentNames),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){var e;let t=this.getSessionId();if(!this.session||!this.eventBuffer||!t)Q&&$.error(`No session or eventBuffer found to flush.`);else if(await this._addPerformanceEntries(),(e=this.eventBuffer)!=null&&e.hasEvents&&(await u7(this),this.eventBuffer&&t===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();let e=Date.now();if(e-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new E7;let n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await D7({replayId:t,recordingData:await this.eventBuffer.finish(),segmentId:r,eventContext:n,session:this.session,timestamp:e,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:`sendError`});let t=M();if(t){let n;n=e instanceof T7?`ratelimit_backoff`:e instanceof E7?`invalid`:`send_error`,t.recordDroppedEvent(n,`replay`)}}}async _flush({force:e=!1}={}){if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession()){Q&&$.error(`Attempting to finish replay event after session expired.`);return}if(!this.session)return;let t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();let r=n<this._options.minReplayDuration,i=n>this._options.maxReplayDuration+5e3;if(r||i){Q&&$.log(`Session duration (${Math.floor(n/1e3)}s) is too ${r?`short`:`long`}, not sending replay.`),r&&this._debouncedFlush();return}let a=this.eventBuffer;a&&this.session.segmentId===0&&!a.hasCheckout&&Q&&$.log(`Flushing initial segment without checkout.`);let o=!!this._flushLock;this._flushLock||=this._runFlush();try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,o&&this._debouncedFlush()}}_maybeSaveSession(){this.session&&this._options.stickySession&&Rx(this.session)}_onMutationHandler(e){let{ignoreMutations:t}=this._options._experiments;if(t!=null&&t.length&&e.some(e=>{let n=y7(e.target),r=t.join(`,`);return n==null?void 0:n.matches(r)}))return!1;let n=e.length,r=this._options.mutationLimit,i=this._options.mutationBreadcrumbLimit,a=r&&n>r;if(n>i||a){let e=K8({category:`replay.mutations`,data:{count:n,limit:a}});this._createCustomBreadcrumb(e)}return!a||(this.stop({reason:`mutationLimit`,forceFlush:this.recordingMode===`session`}),!1)}};function M7(e,t){return[...e,...t].join(`,`)}function N7({mask:e,unmask:t,block:n,unblock:r,ignore:i}){return{maskTextSelector:M7(e,[`.sentry-mask`,`[data-sentry-mask]`]),unmaskTextSelector:M7(t,[]),blockSelector:M7(n,[`.sentry-block`,`[data-sentry-block]`,`base`,`iframe[srcdoc]:not([src])`]),unblockSelector:M7(r,[]),ignoreSelector:M7(i,[`.sentry-ignore`,`[data-sentry-ignore]`,`input[type="file"]`])}}function P7({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:i,value:a}){if(i.unmaskTextSelector&&e.matches(i.unmaskTextSelector))return a;let o=n.includes(t),s=r&&t===`value`&&e.tagName===`INPUT`&&[`submit`,`button`].includes(e.getAttribute(`type`)||``);return o||s?a.replace(/[\S]/g,`*`):a}var F7=`img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]`,I7=[`content-length`,`content-type`,`accept`],L7=Symbol.for(`sentry__originalRequestBody`),R7=!1,z7=!1;function B7(){if(typeof Request>`u`||z7)return;let e=Request;try{let t=function(t,n){let r=new e(t,n);return(n==null?void 0:n.body)!=null&&(r[L7]=n.body),r};t.prototype=e.prototype,r.Request=t,z7=!0}catch{}}var V7=(e=>new H7(e)),H7=class{constructor({flushMinDelay:e=d3,flushMaxDelay:t=f3,minReplayDuration:n=x3,maxReplayDuration:r=C3,stickySession:i=!0,useCompression:a=!0,workerUrl:o,_experiments:s={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:d=750,mutationLimit:f=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:m=[],networkDetailAllowUrls:h=[],networkDetailDenyUrls:g=[],networkCaptureBodies:_=!0,networkRequestHeaders:v=[],networkResponseHeaders:y=[],mask:b=[],maskAttributes:x=[`title`,`placeholder`,`aria-label`],unmask:S=[],block:C=[],unblock:w=[],ignore:T=[],maskFn:E,beforeAddRecordingEvent:ee,beforeErrorSampling:te,onError:D,attachRawBodyFromRequest:ne=!1}={}){this.name=`Replay`;let re=N7({mask:b,unmask:S,block:C,unblock:w,ignore:T});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:E,maskInputFn:E,maskAttributeFn:(e,t,n)=>P7({maskAttributes:x,maskAllText:c,privacyOptions:re,key:e,value:t,el:n}),...re,slimDOMOptions:`all`,inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}},recordCrossOriginIframes:!!s.recordCrossOriginIframes},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,S3),maxReplayDuration:Math.min(r,C3),stickySession:i,useCompression:a,workerUrl:o,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:d,mutationLimit:f,slowClickTimeout:p,slowClickIgnoreSelectors:m,networkDetailAllowUrls:h,networkDetailDenyUrls:g,networkCaptureBodies:_,networkRequestHeaders:W7(v),networkResponseHeaders:W7(y),beforeAddRecordingEvent:ee,beforeErrorSampling:te,onError:D,attachRawBodyFromRequest:ne,_experiments:s},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${F7}`:F7,this._recordingOptions.ignoreCSSAttributes=new Set([`background-image`])),this._isInitialized&&eo())throw Error(`Multiple Sentry Session Replay instances are not supported`);this._isInitialized=!0}get _isInitialized(){return R7}set _isInitialized(e){R7=e}afterAllSetup(e){eo()&&!this._replay&&(this._initialOptions.attachRawBodyFromRequest&&B7(),this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(e){return this._replay?this._replay.stop({forceFlush:(e==null?void 0:e.flush)??this._replay.recordingMode===`session`,reason:`manual`}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(e){var t;if((t=this._replay)!=null&&t.isEnabled())return this._replay.getSessionId(e)}getRecordingMode(){var e;if((e=this._replay)!=null&&e.isEnabled())return this._replay.recordingMode}processSpan(e){let t=this.getReplayId(!0);t&&(ka(e,{"sentry.replay_id":t}),this.getRecordingMode()===`buffer`&&ka(e,{"sentry._internal.replay_is_buffering":!0}))}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){let t=U7(this._initialOptions,e);this._replay=new j7({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{let t=e.getIntegrationByName(`ReplayCanvas`);if(!t)return;this._replay._canvas=t.getOptions()}catch{}}};function U7(e,t){let n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...e},i=$r(n.replaysSessionSampleRate),a=$r(n.replaysOnErrorSampleRate);return i==null&&a==null&&d(()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")}),i!=null&&(r.sessionSampleRate=i),a!=null&&(r.errorSampleRate=a),r}function W7(e){return[...I7,...e.map(e=>e.toLowerCase())]}function G7(){let e=M();return e==null?void 0:e.getIntegrationByName(`Replay`)}var K7=Object.defineProperty,q7=(e,t,n)=>t in e?K7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J7=(e,t,n)=>q7(e,typeof t==`symbol`?t:t+``,n);function Y7(e){return e.nodeType===e.ELEMENT_NODE}function X7(e){let t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}var Z7=class{constructor(){J7(this,`idNodeMap`,new Map),J7(this,`nodeMetaMap`,new WeakMap)}getId(e){var t;return e?((t=this.getMeta(e))==null?void 0:t.id)??-1:-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){let t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e)),Y7(e)&&e.shadowRoot&&this.removeNodeFromMap(e.shadowRoot)}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){let n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){let n=this.getNode(e);if(n){let e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Q7(){return new Z7}function $7(e,t){for(let n=e.classList.length;n--;){let r=e.classList[n];if(t.test(r))return!0}return!1}function e9(e,t,n=1/0,r=0){return e?X7(e)?e9(e.host,t,n,r+1):e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:e9(e.parentNode,t,n,r+1):-1}function t9(e,t){return n=>{let r=n;if(r===null)return!1;try{if(e){if(typeof e==`string`){if(r.matches(`.${e}`))return!0}else if($7(r,e))return!0}return!!(t&&r.matches(t))}catch{return!1}}}var n9=`Please stop import mirror directly. Instead of that,\r
|
|
501
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
502
|
+
or you can use record.mirror to access the mirror instance during recording.`,r9={map:{},getId(){return console.error(n9),-1},getNode(){return console.error(n9),null},removeNodeFromMap(){console.error(n9)},has(){return console.error(n9),!1},reset(){console.error(n9)}};typeof window<`u`&&window.Proxy&&window.Reflect&&(r9=new Proxy(r9,{get(e,t,n){return t===`map`&&console.error(n9),Reflect.get(e,t,n)}}));function i9(e,t,n,r,i=window){let a=i.Object.getOwnPropertyDescriptor(e,t);return i.Object.defineProperty(e,t,r?n:{set(e){d9(()=>{n.set.call(this,e)},0),a&&a.set&&a.set.call(this,e)}}),()=>i9(e,t,a||{},!0)}function a9(e,t,n){try{if(!(t in e))return()=>{};let r=e[t],i=n(r);return typeof i==`function`&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=i,()=>{e[t]=r}}catch{return()=>{}}}Date.now().toString();function o9(e){if(!e)return null;try{return e.nodeType===e.ELEMENT_NODE?e:e.parentElement}catch{return null}}function s9(e,t,n,r,i){if(!e)return!1;let a=o9(e);if(!a)return!1;let o=t9(t,n);if(!i){let e=r&&a.matches(r);return o(a)&&!e}let s=e9(a,o),c=-1;return s<0?!1:(r&&(c=e9(a,t9(null,r))),s>-1&&c<0||s<c)}var c9={};function l9(e){let t=c9[e];if(t)return t;let n=window[e].bind(window),r=n,i=window.document;if(i&&typeof i.createElement==`function`)try{let t=i.createElement(`iframe`);t.hidden=!0,i.head.appendChild(t);let a=t.contentWindow;if(a&&a[e]){let t=a[e].bind(window);r=(...r)=>{try{return t(...r)}catch{return c9[e]=n,n(...r)}}}i.head.removeChild(t)}catch{}return c9[e]=r}function u9(...e){return l9(`requestAnimationFrame`)(...e)}function d9(...e){return l9(`setTimeout`)(...e)}var f9=(e=>(e[e[`2D`]=0]=`2D`,e[e.WebGL=1]=`WebGL`,e[e.WebGL2=2]=`WebGL2`,e))(f9||{}),p9;function m9(e){p9=e}for(var h9=e=>p9?((...t)=>{try{return e(...t)}catch(e){if(p9&&p9(e)===!0)return()=>{};throw e}}):e,g9=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,_9=typeof Uint8Array>`u`?[]:new Uint8Array(256),v9=0;v9<g9.length;v9++)_9[g9.charCodeAt(v9)]=v9;var y9=function(e){var t=new Uint8Array(e),n,r=t.length,i=``;for(n=0;n<r;n+=3)i+=g9[t[n]>>2],i+=g9[(t[n]&3)<<4|t[n+1]>>4],i+=g9[(t[n+1]&15)<<2|t[n+2]>>6],i+=g9[t[n+2]&63];return r%3==2?i=i.substring(0,i.length-1)+`=`:r%3==1&&(i=i.substring(0,i.length-2)+`==`),i},b9=new Map;function x9(e,t){let n=b9.get(e);return n||(n=new Map,b9.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}var S9=(e,t,n)=>{if(!e||!(T9(e,t)||typeof e==`object`))return;let r=x9(n,e.constructor.name),i=r.indexOf(e);return i===-1&&(i=r.length,r.push(e)),i};function C9(e,t,n){if(e instanceof Array)return e.map(e=>C9(e,t,n));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer)return{rr_type:e.constructor.name,base64:y9(e)};if(e instanceof DataView)return{rr_type:e.constructor.name,args:[C9(e.buffer,t,n),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){let t=e.constructor.name,{src:n}=e;return{rr_type:t,src:n}}return e instanceof HTMLCanvasElement?{rr_type:`HTMLImageElement`,src:e.toDataURL()}:e instanceof ImageData?{rr_type:e.constructor.name,args:[C9(e.data,t,n),e.width,e.height]}:T9(e,t)||typeof e==`object`?{rr_type:e.constructor.name,index:S9(e,t,n)}:e}var w9=(e,t,n)=>e.map(e=>C9(e,t,n)),T9=(e,t)=>!![`WebGLActiveInfo`,`WebGLBuffer`,`WebGLFramebuffer`,`WebGLProgram`,`WebGLRenderbuffer`,`WebGLShader`,`WebGLShaderPrecisionFormat`,`WebGLTexture`,`WebGLUniformLocation`,`WebGLVertexArrayObject`,`WebGLVertexArrayObjectOES`].filter(e=>typeof t[e]==`function`).find(n=>e instanceof t[n]);function E9(e,t,n,r,i){let a=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(let s of o)try{if(typeof t.CanvasRenderingContext2D.prototype[s]!=`function`)continue;let o=a9(t.CanvasRenderingContext2D.prototype,s,function(a){return function(...o){return s9(this.canvas,n,r,i,!0)||d9(()=>{let n=w9(o,t,this);e(this.canvas,{type:f9[`2D`],property:s,args:n})},0),a.apply(this,o)}});a.push(o)}catch{let n=i9(t.CanvasRenderingContext2D.prototype,s,{set(t){e(this.canvas,{type:f9[`2D`],property:s,args:[t],setter:!0})}});a.push(n)}return()=>{a.forEach(e=>e())}}function D9(e){return e===`experimental-webgl`?`webgl`:e}function O9(e,t,n,r,i){let a=[];try{let o=a9(e.HTMLCanvasElement.prototype,`getContext`,function(e){return function(a,...o){if(!s9(this,t,n,r,!0)){let e=D9(a);if(`__context`in this||(this.__context=e),i&&[`webgl`,`webgl2`].includes(e)){if(o[0]&&typeof o[0]==`object`){let e=o[0];e.preserveDrawingBuffer||=!0}else o.splice(0,1,{preserveDrawingBuffer:!0})}}return e.apply(this,[a,...o])}});a.push(o)}catch{console.error(`failed to patch HTMLCanvasElement.prototype.getContext`)}return()=>{a.forEach(e=>e())}}function k9(e,t,n,r,i,a,o,s){let c=[],l=Object.getOwnPropertyNames(e);for(let o of l)if(![`isContextLost`,`canvas`,`drawingBufferWidth`,`drawingBufferHeight`].includes(o))try{if(typeof e[o]!=`function`)continue;let l=a9(e,o,function(e){return function(...c){let l=e.apply(this,c);if(S9(l,s,this),`tagName`in this.canvas&&!s9(this.canvas,r,i,a,!0)){let e=w9(c,s,this),r={type:t,property:o,args:e};n(this.canvas,r)}return l}});c.push(l)}catch{let r=i9(e,o,{set(e){n(this.canvas,{type:t,property:o,args:[e],setter:!0})}});c.push(r)}return c}function A9(e,t,n,r,i,a){let o=[];return o.push(...k9(t.WebGLRenderingContext.prototype,f9.WebGL,e,n,r,i,a,t)),t.WebGL2RenderingContext!==void 0&&o.push(...k9(t.WebGL2RenderingContext.prototype,f9.WebGL2,e,n,r,i,a,t)),()=>{o.forEach(e=>e())}}var j9=`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 M9(){let e=new Blob([j9]);return URL.createObjectURL(e)}var N9=class{constructor(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.shadowDoms=new Set,this.windowsSet=new WeakSet,this.windows=[],this.restoreHandlers=[],this.frozen=!1,this.locked=!1,this.snapshotInProgressMap=new Map,this.worker=null,this.lastSnapshotTime=0,this.processMutation=(e,t)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)};let{enableManualSnapshot:t,sampling:n=`all`,win:r,recordCanvas:i,errorHandler:a}=e;e.sampling=n,this.mutationCb=e.mutationCb,this.mirror=e.mirror,this.options=e,a&&m9(a),(i&&typeof n==`number`||t)&&(this.worker=this.initFPSWorker()),this.addWindow(r),t||h9(()=>{i&&n===`all`&&(this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher()),i&&typeof n==`number`&&this.initCanvasFPSObserver()})()}reset(){var e;this.pendingCanvasMutations.clear(),this.restoreHandlers.forEach(e=>{try{e()}catch{}}),this.restoreHandlers=[],this.windowsSet=new WeakSet,this.windows=[],this.shadowDoms=new Set,(e=this.worker)==null||e.terminate(),this.worker=null,this.snapshotInProgressMap=new Map}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}addWindow(e){let{sampling:t=`all`,blockClass:n,blockSelector:r,unblockSelector:i,recordCanvas:a,enableManualSnapshot:o}=this.options;this.windowsSet.has(e)||(o?(this.windowsSet.add(e),this.windows.push(new WeakRef(e))):(h9(()=>{if(a&&t===`all`&&this.initCanvasMutationObserver(e,n,r,i),a&&typeof t==`number`){let t=O9(e,n,r,i,!0);this.restoreHandlers.push(()=>{t()})}})(),this.windowsSet.add(e),this.windows.push(new WeakRef(e))))}addShadowRoot(e){this.shadowDoms.add(new WeakRef(e))}resetShadowRoots(){this.shadowDoms=new Set}snapshot(e,t){t!=null&&t.skipRequestAnimationFrame?this.takeSnapshot(performance.now(),e):u9(t=>this.takeSnapshot(t,e))}initFPSWorker(){let e=new Worker(M9());return e.onmessage=e=>{let t=e.data,{id:n}=t;if(this.snapshotInProgressMap.set(n,!1),!(`base64`in t))return;let{base64:r,type:i,width:a,height:o}=t;this.mutationCb({id:n,type:f9[`2D`],commands:[{property:`clearRect`,args:[0,0,a,o]},{property:`drawImage`,args:[{rr_type:`ImageBitmap`,args:[{rr_type:`Blob`,data:[{rr_type:`ArrayBuffer`,base64:r}],type:i}]},0,0,a,o]}]})},e}initCanvasFPSObserver(){let e;if(!this.windows.length&&!this.shadowDoms.size)return;let t=n=>{this.takeSnapshot(n),e=u9(t)};e=u9(t),this.restoreHandlers.push(()=>{e&&cancelAnimationFrame(e)})}initCanvasMutationObserver(e,t,n,r){let i=O9(e,t,n,r,!1),a=E9(this.processMutation.bind(this),e,t,n,r),o=A9(this.processMutation.bind(this),e,t,n,r,this.mirror);this.restoreHandlers.push(()=>{i(),a(),o()})}getCanvasElements(e,t,n){let r=[],i=i=>{i.querySelectorAll(`canvas`).forEach(i=>{s9(i,e,t,n,!0)||r.push(i)})};for(let e of this.windows){let t=e.deref(),n;try{n=t&&t.document}catch{}n&&i(n)}for(let e of this.shadowDoms){let t=e.deref();t&&i(t)}return r}takeSnapshot(e,t){let{sampling:n,blockClass:r,blockSelector:i,unblockSelector:a,dataURLOptions:o,maxCanvasSize:s}=this.options,c=1e3/(n===`all`?2:n||2);return this.lastSnapshotTime&&e-this.lastSnapshotTime<c?!1:(this.lastSnapshotTime=e,(t?[t]:this.getCanvasElements(r,i,a)).forEach(e=>{let t=this.mirror.getId(e);this.mirror.hasNode(e)&&e.width&&e.height&&!this.snapshotInProgressMap.get(t)&&(this.snapshotInProgressMap.set(t,!0),createImageBitmap(e).then(n=>{var r;(r=this.worker)==null||r.postMessage({id:t,bitmap:n,width:e.width,height:e.height,dataURLOptions:o,maxCanvasSize:s},[n])}).catch(e=>{h9(()=>{throw this.snapshotInProgressMap.delete(t),e})()}))}),!0)}startPendingCanvasMutationFlusher(){u9(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){let e=t=>{this.rafStamps.latestId=t,u9(e)};u9(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{let n=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,n)}),u9(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;let n=this.pendingCanvasMutations.get(e);if(!n||t===-1)return;let r=n.map(e=>{let{type:t,...n}=e;return n}),{type:i}=n[0];this.mutationCb({id:t,type:i,commands:r}),this.pendingCanvasMutations.delete(e)}};try{if(Array.from([1],e=>e*2)[0]!==2){var P9;let e=document.createElement(`iframe`);document.body.appendChild(e),Array.from=((P9=e.contentWindow)==null?void 0:P9.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug(`Unable to override Array.from`,e)}Q7();var F9;(function(e){e[e.NotStarted=0]=`NotStarted`,e[e.Running=1]=`Running`,e[e.Stopped=2]=`Stopped`})(F9||={});var I9={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}}},L9=`ReplayCanvas`,R9=1280,z9=I(((e={})=>{let[t,n]=e.maxCanvasSize||[],r={quality:e.quality||`medium`,enableManualSnapshot:e.enableManualSnapshot,maxCanvasSize:[t?Math.min(t,R9):R9,n?Math.min(n,R9):R9]},i,a,o=new Promise(e=>a=e);return{name:L9,getOptions(){let{quality:e,enableManualSnapshot:t,maxCanvasSize:n}=r;return{enableManualSnapshot:t,recordCanvas:!0,getCanvasManager:e=>{let r=new N9({...e,enableManualSnapshot:t,maxCanvasSize:n,errorHandler:e=>{try{typeof e==`object`&&(e.__rrweb__=!0)}catch{}}});return i=r,a(r),r},...I9[e]||I9.medium}},async snapshot(e,t){(i||await o).snapshot(e,t)}}}));function B9(e){return e.split(`,`).some(e=>e.trim().startsWith(`sentry-`))}function V9(e){try{var t;return new URL(e,(t=G.location)==null?void 0:t.href).href}catch{return}}function H9(e){return e.entryType===`resource`&&`initiatorType`in e&&typeof e.nextHopProtocol==`string`&&(e.initiatorType===`fetch`||e.initiatorType===`xmlhttprequest`)}function U9(e){try{return new Headers(e)}catch{return}}var W9={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function G9(e,t){let{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:i,enableHTTPTimings:a,tracePropagationTargets:o,onRequestSpanStart:s,onRequestSpanEnd:c}={...W9,...t},l=typeof i==`function`?i:e=>!0,u=e=>J9(e,o),d={},f=e.getOptions().propagateTraceparent;n&&Ip(t=>{var n;let r=Cp(t,l,u,d,{propagateTraceparent:f,onRequestSpanEnd:c,urlBase:(n=G.location)==null?void 0:n.href});if(r){var i;let n=V9(t.fetchData.url),o=n?(i=Zu(n).host)==null?void 0:i.replace(/^.*@/,``):void 0,c=n?$u(n):void 0;r.setAttributes({[cr]:R(c),[rr]:o}),a&&q9(r,e),s==null||s(r,{headers:t.headers})}}),r&&oy(t=>{let n=Y9(t,l,u,d,f,c);if(n){var r;a&&q9(n,e),s==null||s(n,{headers:U9((r=t.xhr.__sentry_xhr_v3__)==null?void 0:r.request_headers)})}})}var K9=300;function q9(e,t){let n=P(e).attributes[cr];if(!n||typeof n!=`string`)return;let r=()=>void setTimeout(i);if(L(t)){let t=e.end.bind(e);e.end=e=>{let n=e??kt(),a=!1,o=()=>{a||(a=!0,setTimeout(i),t(n),clearTimeout(s))};r=o;let s=setTimeout(o,K9)}}let i=C1(`resource`,({entries:t})=>{t.forEach(t=>{H9(t)&&t.name.endsWith(n)&&(e.setAttributes(e0(t)),r())})})}function J9(e,t){let n=dv();if(n){let r,i;try{r=new URL(e,n),i=new URL(n).origin}catch{return!1}let a=r.origin===i;return t?_d(r.toString(),t)||a&&_d(r.pathname,t):a}{let n=!!e.match(/^\/(?!\/)/);return t?_d(e,t):n}}function Y9(e,t,n,r,i,a){var o;let s=e.xhr,c=s==null?void 0:s[ay];if(!s||s.__sentry_own_request__||!c)return;let{url:l,method:u}=c,d=Bi()&&t(l);if(e.endTimestamp){let t=s.__sentry_xhr_span_id__;if(!t)return;let n=r[t];n&&(d&&c.status_code!==void 0&&(Or(n,c.status_code),n.end(),a==null||a(n,{headers:U9(py(s)),error:e.error})),delete r[t]);return}let f=V9(l),p=Zu(f||l),m=f?$u(f):void 0,h=$u(Qu(l)),g=M(),_=!!F(),v=_||!!g&&L(g),y=p==null||(o=p.host)==null?void 0:o.replace(/^.*@/,``),b=Xu(f||l),x=b?`${u} ${b}`:u,S=d&&v?ts({name:g&&L(g)?x:`${u} ${h}`,attributes:{type:`xhr`,[An]:u,[cr]:R(m),[rr]:y,[or]:b,[N]:`auto.http.browser`,[Gn]:Ks,[ur]:Uu(Ju(p==null?void 0:p.search)),[sr]:Yu(p==null?void 0:p.hash)}}):new ta,C=Yo(S)&&_?void 0:S;return d&&!v&&(g==null||g.recordDroppedEvent(`no_parent_span`,`span`)),s.__sentry_xhr_span_id__=S.spanContext().spanId,r[s.__sentry_xhr_span_id__]=S,n(l)&&X9(s,Bi()&&v?C:void 0,i),g&&g.emit(`beforeOutgoingRequestSpan`,S,e),S}function X9(e,t,n){let{"sentry-trace":r,baggage:i,traceparent:a}=fd({span:t,propagateTraceparent:n});r&&Z9(e,r,i,a)}function Z9(e,t,n,r){var i;let a=(i=e.__sentry_xhr_v3__)==null?void 0:i.request_headers;if(!(a!=null&&a[`sentry-trace`]||!e.setRequestHeader))try{if(e.setRequestHeader(`sentry-trace`,t),r&&!(a!=null&&a.traceparent)&&e.setRequestHeader(`traceparent`,r),n){let t=a==null?void 0:a.baggage;t&&B9(t)||e.setRequestHeader(`baggage`,n)}}catch{}}var Q9=`WebVitals`,$9=I((e={})=>{let{ignore:t=[],softNavigations:n=!0,bfcacheNavigations:r=!0}=e,i=new Set(t);return{name:Q9,setup(e){let t=L(e),a=n&&t&&G1(),o=r&&t,s=a||o;a&&(g1(),K1(e)),o&&_1();let c=!t&&!i.has(`cls`),l=!t&&!i.has(`lcp`),u=R0({trackCls:c,trackLcp:l,client:e}),d=new WeakSet;e.on(`afterStartPageLoadSpan`,e=>{d.add(e)}),e.on(`spanEnd`,e=>{d.delete(e)&&(u(),W0(e,{recordClsOnPageloadSpan:c,recordLcpOnPageloadSpan:l,spanStreamingEnabled:t}))}),t&&(i.has(`lcp`)||jv(e,s),i.has(`cls`)||Nv(e,s)),i.has(`inp`)||Fv(e,s)},afterAllSetup(){i.has(`inp`)||nv()}}});function eS(){G.document?G.document.addEventListener(`visibilitychange`,()=>{let e=F();if(!e)return;let t=Ni(e);if(G.document.hidden&&t){let e=`cancelled`,{attributes:{[Gn]:n},status:r}=P(t);K&&b.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${n}`),r===`ok`&&t.setStatus({code:2,message:e}),t.setAttribute(`sentry.cancellation_reason`,`document.hidden`),t.end()}}):K&&b.warn(`[Tracing] Could not set up background tab detection due to lack of global document`)}var tS=`sentry_previous_trace`,nS=`sentry.previous_trace`;function rS(e,{linkPreviousTrace:t,consistentTraceSampling:n}){let r=t===`session-storage`,i=r?oS():void 0;e.on(`spanStart`,e=>{if(Ni(e)!==e)return;let t=A().getPropagationContext();i=iS(i,e,t),r&&aS(i)});let a=!0;n&&e.on(`beforeSampling`,e=>{if(!i)return;let t=A(),n=t.getPropagationContext();a&&n.parentSpanId?a=!1:(t.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(i.sampleRate),sampled:String(sS(i.spanContext))},sampleRand:i.sampleRand}),e.parentSampled=sS(i.spanContext),e.parentSampleRate=i.sampleRate,e.spanAttributes={...e.spanAttributes,[yr]:i.sampleRate})})}function iS(e,t,n){let r=P(t);function i(){try{var e;let t=Number(r.attributes[`sentry.sample_rate`]??((e=n.dsc)==null?void 0:e.sample_rate));return Number.isNaN(t)?0:t}catch{return 0}}let a={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:i(),sampleRand:n.sampleRand};if(!e)return a;let o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=3600&&(K&&b.log(`Adding previous_trace \`${JSON.stringify(o)}\` link to span \`${JSON.stringify({op:r.attributes[Gn],...t.spanContext()})}\``),t.addLink({context:o,attributes:{[Wn]:`previous_trace`}}),t.setAttribute(nS,`${o.traceId}-${o.spanId}-${+!!sS(o)}`)),a)}function aS(e){try{G.sessionStorage.setItem(tS,JSON.stringify(e))}catch(e){K&&b.warn(`Could not store previous trace in sessionStorage`,e)}}function oS(){try{var e;let t=(e=G.sessionStorage)==null?void 0:e.getItem(tS);return JSON.parse(t)}catch{return}}function sS(e){return e.traceFlags===1}var cS=`BrowserTracing`,lS={...ns,instrumentNavigation:!0,instrumentBfcacheRestore:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],detectRedirects:!0,linkPreviousTrace:`in-memory`,consistentTraceSampling:!1,enableReportPageLoaded:!1,...W9},uS=((e={})=>{`enableElementTiming`in e&&d(()=>{console.warn("[Sentry] `enableElementTiming` is deprecated and no longer has any effect. Use the standalone `elementTimingIntegration` instead.")});let t=G.document,{enableInp:n,enableLongTask:i,enableLongAnimationFrame:a,webVitals:o,beforeStartSpan:s,idleTimeout:c,finalTimeout:l,childSpanTimeout:u,markBackgroundSpan:f,traceFetch:p,traceXHR:m,shouldCreateSpanForRequest:h,enableHTTPTimings:g,ignoreResourceSpans:_,instrumentPageLoad:v,instrumentNavigation:y,instrumentBfcacheRestore:x,detectRedirects:S,linkPreviousTrace:C,consistentTraceSampling:w,enableReportPageLoaded:T,onRequestSpanStart:E,onRequestSpanEnd:ee}={...lS,...e},te=iv(),D,ne;function re(e,n,r=!0,i){let a=n.op===`pageload`,o=n.name,d=s?s(n):n,f=Ku(i||dv()),p={...(f==null?void 0:f.pathname)&&{"url.path":f.pathname},...f&&!Gu(f)&&{"url.full":R(f.href)},...d.attributes};if(o!==d.name&&(p[er]=`custom`),d.attributes=p,!r){let e=St();ts({...d,startTime:e}).end(e);return}let m=ss(d,{idleTimeout:c,finalTimeout:l,childSpanTimeout:u,disableAutoFinish:a,trimIdleSpanEndTimestamp:!T});a&&T&&(ne=m),_S(e,m);function h(){t&&[`interactive`,`complete`].includes(t.readyState)&&(e.emit(`idleSpanEnableAutoFinish`,m),t.removeEventListener(`readystatechange`,h))}a&&!T&&t&&(t.addEventListener(`readystatechange`,h),h())}return{name:cS,setup(e){var n,o;if(te){K&&b.log(`[Tracing] Skipping browserTracingIntegration setup for bot user agent.`);return}if(zi(),a&&r.PerformanceObserver&&(n=PerformanceObserver.supportedEntryTypes)!=null&&n.includes(`long-animation-frame`)?a0():i&&i0(),S&&t){let e=()=>{D=kt()};addEventListener(`click`,e,{capture:!0}),addEventListener(`keydown`,e,{capture:!0,passive:!0})}function s(){let t=gS(e);t&&!P(t).end_timestamp&&(K&&b.log(`[Tracing] Finishing current active span with op: ${P(t).attributes[`sentry.op`]}`),t.setAttribute(Hn,`cancelled`),t.end())}e.on(`beforeIdleSpanEnd`,t=>{if(gS(e)!==t)return;o0(t,{ignoreResourceSpans:_,spanStreamingEnabled:L(e)}),_S(e,void 0);let n=A(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:t.spanContext().traceId,sampled:wi(t),dsc:sa(t)}),ne===t&&(ne=void 0)}),e.on(`startNavigationSpan`,(t,n)=>{if(M()!==e)return;if(n!=null&&n.isRedirect){K&&b.warn(`[Tracing] Detected redirect, navigation span will not be the root span, but a child span.`),re(e,{op:ws,...t},!1,n.url);return}D=void 0,s();let r=A();r.setPropagationContext({traceId:It(),sampleRand:Math.random(),propagationSpanId:Bi()?void 0:Lt()}),r.setSDKProcessingMetadata({normalizedRequest:void 0}),re(e,{op:Cs,...t,parentSpan:null},!0,n==null?void 0:n.url)}),e.on(`startPageLoadSpan`,(t,n={})=>{if(M()!==e)return;s();let r=ni(n.sentryTrace||pS(`sentry-trace`)||mS(`sentry-trace`),n.baggage||pS(`baggage`)||mS(`baggage`)),i=A();i.setPropagationContext(r),Bi()||(i.getPropagationContext().propagationSpanId=Lt());let a=Cy(e);i.setSDKProcessingMetadata({normalizedRequest:{...a,url:R(a.url,e)}}),re(e,{op:Ss,...t})}),e.on(`endPageloadSpan`,()=>{T&&ne&&(ne.setAttribute(Hn,`reportPageLoaded`),ne.end())}),(o=G.addEventListener)==null||o.call(G,`pagehide`,()=>{let t=gS(e);t&&!P(t).end_timestamp&&(t.setAttribute(`sentry.idle_span_finish_reason`,`documentHidden`),t.end()),e.flush()})},afterAllSetup(e){var t;if(te)return;if(Qo(e),e.addIntegration&&!((t=e.getIntegrationByName)!=null&&t.call(e,`WebVitals`))){let t=(o==null?void 0:o.ignore)??[];e.addIntegration($9({...o,ignore:n||t.includes(`inp`)?t:[...t,`inp`]}))}let r=dv();if(C!==`off`&&rS(e,{linkPreviousTrace:C,consistentTraceSampling:w}),G.location&&(v&&dS(e,{name:L(e)?Js:G.location.pathname,attributes:{[er]:`url`,[N]:`auto.pageload.browser`}}),y&&Qv(({to:t,from:n})=>{if(n===void 0&&r!==void 0&&r.indexOf(t)!==-1){r=void 0;return}r=void 0;let i=Ku(t),a=gS(e),o=a&&S&&yS(a,D);fS(e,{name:L(e)?Ys:(i==null?void 0:i.pathname)||G.location.pathname,attributes:{[er]:`url`,[N]:`auto.navigation.browser`}},{url:t,isRedirect:o})}),x)){var i;(i=G.addEventListener)==null||i.call(G,`pageshow`,t=>{var n,i;t.persisted&&(r=void 0,fS(e,{name:L(e)?`Navigation`:((n=G.location)==null?void 0:n.pathname)||`/`,attributes:{"sentry.segment.name.source":`url`,"sentry.origin":`auto.navigation.browser.bfcache`,"browser.navigation.type":`back-forward-cache`}},{url:(i=G.location)==null?void 0:i.href}))})}f&&eS(),G9(e,{traceFetch:p,traceXHR:m,tracePropagationTargets:e.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:h,enableHTTPTimings:g,onRequestSpanStart:E,onRequestSpanEnd:ee})}}});function dS(e,t,n){var r;let i=t.name===Js;A().setTransactionName(i?(r=G.location)==null?void 0:r.pathname:t.name);let a=At(),o={...t,startTime:t.startTime??(a?a/1e3:void 0)};e.emit(`startPageLoadSpan`,o,n);let s=gS(e);return s&&e.emit(`afterStartPageLoadSpan`,s),s}function fS(e,t,n){var r,i;let{url:a,isRedirect:o}=n||{};e.emit(`beforeStartNavigationSpan`,t,{isRedirect:o,url:a}),e.emit(`startNavigationSpan`,t,{isRedirect:o,url:a});let s=A(),c=t.name===Ys;return s.setTransactionName(c?a&&((r=Ku(a))==null?void 0:r.pathname)||((i=G.location)==null?void 0:i.pathname):t.name),a&&!o&&s.setSDKProcessingMetadata({normalizedRequest:{...Cy(e),url:R(a,e)}}),gS(e)}function pS(e){let t=G.document,n=t==null?void 0:t.querySelector(`meta[name=${e}]`);return(n==null?void 0:n.getAttribute(`content`))||void 0}function mS(e){var t,n,r;let i=(t=G.performance)==null||(n=t.getEntriesByType)==null?void 0:n.call(t,`navigation`)[0],a=i==null||(r=i.serverTiming)==null?void 0:r.find(t=>t.name===e);return a==null?void 0:a.description}var hS=`_sentry_idleSpan`;function gS(e){return e[hS]}function _S(e,t){Ae(e,hS,t)}var vS=1.5;function yS(e,t){let n=P(e),r=St();return!(r-n.start_timestamp>vS||t&&r-t<=vS)}function bS(e=M()){e==null||e.emit(`endPageloadSpan`)}function xS(e){let t=F();if(t===e)return;let n=A();e.end=new Proxy(e.end,{apply(e,r,i){return ci(n,t),Reflect.apply(e,r,i)}}),ci(n,e)}var SS=new WeakMap,CS=new WeakMap,wS=9e4,TS=[`text/event-stream`,`application/x-ndjson`,`application/stream+json`],ES=I(()=>({name:`FetchStreamPerformance`,setup(e){Lp(e=>{if(e.response){let t=SS.get(e.response);if(t&&e.endTimestamp){t.end(e.endTimestamp);let n=CS.get(e.response);n&&clearTimeout(n)}}}),Ip(t=>{if(t.endTimestamp&&t.response){var n,r,i,a,o;let s=((n=t.response.headers)==null?void 0:n.get(`content-type`))||``;if((r=t.response.headers)!=null&&r.get(`content-length`)||!TS.some(e=>s.startsWith(e)))return;let c=((i=t.fetchData)==null?void 0:i.url)||``,l=((a=t.fetchData)==null?void 0:a.method)||`GET`,u=Ku(c),d=c.startsWith(`data:`)?$u(c):u?qu(u):c,f=Xu(c,(o=G.location)==null?void 0:o.href),p=f?`${l} ${f}`:l,m=ts({name:L(e)?p:`${l} ${d}`,startTime:t.endTimestamp,attributes:{[cr]:R($u(c)),[or]:f,[An]:l,type:`fetch`,[Gn]:qs,[N]:`auto.http.browser.stream`}});SS.set(t.response,m);let h=setTimeout(()=>{m.isRecording()&&m.end()},wS);CS.set(t.response,h)}})}})),DS=`BfcacheMetrics`,OS=I((e={})=>{let t=MS(e.maxReasons);return{name:DS,setupOnce(){var e;if(!G.addEventListener||!((e=G.performance)!=null&&e.getEntriesByType)){K&&b.log(`[${DS}] Browser APIs unavailable, skipping instrumentation.`);return}function n(e){let n=jS();if(e.persisted){kS(`hit`,0,n);return}let r=G.performance.getEntriesByType(`navigation`)[0];if((r==null?void 0:r.type)!==`back_forward`)return;let i=NS(r.notRestoredReasons,t);kS(`miss`,i.length,n),typeof r.duration==`number`&&r.duration>0&&pm(`browser.bfcache.reload.duration`,r.duration,{unit:`millisecond`,attributes:FS({[$n]:n})}),i.forEach(e=>AS(e,n))}G.addEventListener(`pageshow`,n,!0)}}});function kS(e,t,n){dm(`browser.bfcache.navigation`,1,{attributes:FS({[gn]:e,[hn]:t||void 0,[$n]:n})})}function AS({reason:e,frame:t},n){dm(`browser.bfcache.not_restored`,1,{attributes:FS({[_n]:e,[mn]:t,[$n]:n})})}function jS(){var e;return gv()||A().getScopeData().transactionName||((e=G.location)==null?void 0:e.pathname)}function MS(e){return e==null?1/0:e<1?(K&&b.warn(`[${DS}] \`maxReasons\` must be at least 1, got ${e}. Using 1 instead.`),1):e}function NS(e,t){let n=[];return!e||t<=0||PS(e,`top`,n,t),n}function PS(e,t,n,r){var i,a;n.length>=r||((i=e.reasons)==null||i.forEach(e=>{if(n.length>=r)return;let i=typeof e==`string`?e:e.reason;i&&n.push({reason:i,frame:t})}),(a=e.children)==null||a.forEach(e=>{PS(e,`child`,n,r)}))}function FS(e){return e[N]=`auto.browser.bfcache`,e}function IS(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function LS(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=IS(n);return e=>r.then(n=>e(n.transaction(t,`readwrite`).objectStore(t)))}function RS(e){return IS(e.getAllKeys())}function zS(e,t,n){return e(e=>RS(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.max(...r,0)+1),IS(e.transaction)}))}function BS(e,t,n){return e(e=>RS(e).then(r=>{if(!(r.length>=n))return e.put(t,Math.min(...r,0)-1),IS(e.transaction)}))}function VS(e){return e(e=>RS(e).then(t=>{let n=t[0];if(n!=null)return IS(e.get(n)).then(t=>(e.delete(n),IS(e.transaction).then(()=>t)))}))}function HS(e){let t;function n(){return t??=LS(e.dbName||`sentry-offline`,e.storeName||`queue`),t}return{push:async t=>{try{let r=Va(t);await zS(n(),r,e.maxQueueSize||30)}catch{}},unshift:async t=>{try{let r=Va(t);await BS(n(),r,e.maxQueueSize||30)}catch{}},shift:async()=>{try{let e=await VS(n());if(e)return Ua(e)}catch{}}}}function US(e){return t=>{let n=e({...t,createStore:HS});return G.addEventListener(`online`,async e=>{await n.flush()}),n}}function WS(e=Qy){return US(Cu(e))}var GS=`window`in r&&r.window===r&&typeof importScripts>`u`,KS=`0`,qS=GS?`main`:`worker`;function JS(e,t,n){var r;if(e==null)throw TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${e} instead.`);let i=XS(e),a=t.getOptions(),o=(r=t.getSdkMetadata)==null||(r=r.call(t))==null?void 0:r.sdk;return{chunk_id:lt(),client_sdk:{name:(o==null?void 0:o.name)??`sentry.javascript.browser`,version:(o==null?void 0:o.version)??`0.0.0`},profiler_id:n||lt(),platform:`javascript`,version:`2`,release:a.release??``,environment:a.environment??`production`,debug_meta:{images:ZS(e.resources)},profile:i}}function YS(e){try{if(!e||typeof e!=`object`)return{reason:`chunk is not an object`};let t=e=>typeof e==`string`&&/^[a-f0-9]{32}$/.test(e);if(!t(e.profiler_id))return{reason:`missing or invalid profiler_id`};if(!t(e.chunk_id))return{reason:`missing or invalid chunk_id`};if(!e.client_sdk)return{reason:`missing client_sdk metadata`};let n=e.profile;return n?!Array.isArray(n.frames)||!n.frames.length?{reason:`profile has no frames`}:!Array.isArray(n.stacks)||!n.stacks.length?{reason:`profile has no stacks`}:!Array.isArray(n.samples)||!n.samples.length?{reason:`profile has no samples`}:{valid:!0}:{reason:`missing profile data`}}catch(e){return{reason:`unknown validation error: ${e}`}}}function XS(e){let t=[];for(let n=0;n<e.frames.length;n++){let r=e.frames[n];r&&(t[n]={function:r.name,abs_path:typeof r.resourceId==`number`?e.resources[r.resourceId]:void 0,lineno:r.line,colno:r.column})}let n=[];for(let t=0;t<e.stacks.length;t++){let r=e.stacks[t];if(!r)continue;let i=[],a=r;for(;a;)i.push(a.frameId),a=a.parentId===void 0?void 0:e.stacks[a.parentId];n[t]=i}let r=e.stacks.length,i=[];for(let t=0;t<e.samples.length;t++){let a=e.samples[t];if(!a)continue;let o=a.stackId??r;o===r&&(n[r]??(n[r]=[]));let s=Ot(a.timestamp);i[t]={stack_id:o,thread_id:KS,timestamp:s}}return{frames:t,stacks:n,samples:i,thread_metadata:{[KS]:{name:qS}}}}function ZS(e){let t=M(),n=t==null?void 0:t.getOptions(),r=n==null?void 0:n.stackParser;return r?vc(r,e):[]}function QS(e){return typeof e!=`number`&&typeof e!=`boolean`||typeof e==`number`&&isNaN(e)?(K&&b.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(K&&b.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}var $S=!1,eC=3e4;function tC(e){return typeof e==`function`}function nC(){let e=G.Profiler;if(!tC(e)){K&&b.log(`[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.`);return}let t=Math.floor(eC/10);try{return new e({sampleInterval:10,maxBufferSize:t})}catch{K&&(b.log(`[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header.`),b.log(`[Profiling] Disabling profiling for current user session.`)),$S=!0}}function rC(e){if($S)return K&&b.log(`[Profiling] Profiling has been disabled for the duration of the current user session as the JS Profiler could not be started.`),!1;if(e.profileLifecycle!==`trace`&&e.profileLifecycle!==`manual`)return K&&b.warn("[Profiling] Session not sampled. Invalid `profileLifecycle` option."),!1;let t=e.profileSessionSampleRate;return QS(t)?t?Math.random()<=t:(K&&b.log(`[Profiling] Discarding profile because profileSessionSampleRate is not defined or set to 0`),!1):(K&&b.warn(`[Profiling] Discarding profile because of invalid profileSessionSampleRate.`),!1)}function iC(e){e.setAttribute(`thread.id`,KS),e.setAttribute(`thread.name`,qS)}var aC=6e4,oC=3e5,sC=class{constructor(){this._client=void 0,this._profiler=void 0,this._chunkTimer=void 0,this._profilerId=void 0,this._isRunning=!1,this._sessionSampled=!1,this._lifecycleMode=void 0,this._activeRootSpanIds=new Set,this._rootSpanTimeouts=new Map}initialize(e){let t=e.getOptions().profileLifecycle,n=rC(e.getOptions());K&&b.log(`[Profiling] Initializing profiler (lifecycle='${t}').`),n||K&&b.log(`[Profiling] Session not sampled. Skipping lifecycle profiler initialization.`),this._profilerId=lt(),this._client=e,this._sessionSampled=n,this._lifecycleMode=t,t===`trace`&&this._setupTraceLifecycleListeners(e),e.on(`spanStart`,e=>{this._isRunning&&iC(e)})}start(){this._lifecycleMode===`trace`?K&&b.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.start()` are ignored in trace mode.'):this._isRunning?K&&b.warn("[Profiling] Profile session is already running, `uiProfiler.start()` is a no-op."):this._sessionSampled?this._beginProfiling():K&&b.warn("[Profiling] Session is not sampled, `uiProfiler.start()` is a no-op.")}stop(){this._lifecycleMode===`trace`?K&&b.warn('[Profiling] `profileLifecycle` is set to "trace". Calls to `uiProfiler.stop()` are ignored in trace mode.'):this._isRunning?this._endProfiling():K&&b.warn("[Profiling] Profiler is not running, `uiProfiler.stop()` is a no-op.")}notifyRootSpanActive(e){if(this._lifecycleMode!==`trace`||!this._sessionSampled||!e.isRecording())return;let t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);let n=this._activeRootSpanIds.size;n===1&&(K&&b.log(`[Profiling] Detected already active root span during setup. Active root spans now:`,n),this._beginProfiling()),this._isRunning&&iC(e)}_beginProfiling(){this._isRunning||(this._isRunning=!0,K&&b.log(`[Profiling] Started profiling with profiler ID:`,this._profilerId),un().setContext(`profile`,{profiler_id:this._profilerId}),this._startProfilerInstance(),this._profiler?this._startPeriodicChunking():(K&&b.log(`[Profiling] Failed to start JS Profiler; stopping.`),this._resetProfilerInfo()))}_endProfiling(){this._isRunning&&(this._isRunning=!1,this._chunkTimer&&=(clearTimeout(this._chunkTimer),void 0),this._clearAllRootSpanTimeouts(),this._collectCurrentChunk().catch(e=>{K&&b.error("[Profiling] Failed to collect current profile chunk on `stop()`:",e)}),this._lifecycleMode===`manual`&&un().setContext(`profile`,{}))}_setupTraceLifecycleListeners(e){e.on(`spanStart`,e=>{if(!this._sessionSampled){K&&b.log(`[Profiling] Span not profiled because of negative sampling decision for user session.`);return}if(e!==Ni(e))return;if(!e.isRecording()){K&&b.log(`[Profiling] Discarding profile because root span was not sampled.`);return}let t=e.spanContext().spanId;if(!t||this._activeRootSpanIds.has(t))return;this._registerTraceRootSpan(t);let n=this._activeRootSpanIds.size;n===1&&(K&&b.log(`[Profiling] Root span ${t} started. Profiling active while there are active root spans (count=${n}).`),this._beginProfiling())}),e.on(`spanEnd`,e=>{if(!this._sessionSampled)return;let t=e.spanContext().spanId;if(!t||!this._activeRootSpanIds.has(t))return;this._activeRootSpanIds.delete(t);let n=this._activeRootSpanIds.size;K&&b.log(`[Profiling] Root span with ID ${t} ended. Will continue profiling for as long as there are active root spans (currently: ${n}).`),n===0&&(this._collectCurrentChunk().catch(e=>{K&&b.error("[Profiling] Failed to collect current profile chunk on last `spanEnd`:",e)}),this._endProfiling())})}_resetProfilerInfo(){this._isRunning=!1,un().setContext(`profile`,{})}_clearAllRootSpanTimeouts(){this._rootSpanTimeouts.forEach(e=>clearTimeout(e)),this._rootSpanTimeouts.clear()}_registerTraceRootSpan(e){this._activeRootSpanIds.add(e);let t=setTimeout(()=>this._onRootSpanTimeout(e),oC);this._rootSpanTimeouts.set(e,t)}_startProfilerInstance(){var e;if(((e=this._profiler)==null?void 0:e.stopped)===!1)return;let t=nC();t?this._profiler=t:K&&b.log(`[Profiling] Failed to start JS Profiler.`)}_startPeriodicChunking(){this._isRunning&&(this._chunkTimer=setTimeout(()=>{if(this._collectCurrentChunk().catch(e=>{K&&b.error(`[Profiling] Failed to collect current profile chunk during periodic chunking:`,e)}),this._isRunning){if(this._startProfilerInstance(),!this._profiler){this._resetProfilerInfo();return}this._startPeriodicChunking()}},aC))}_onRootSpanTimeout(e){this._rootSpanTimeouts.has(e)&&(this._rootSpanTimeouts.delete(e),this._activeRootSpanIds.has(e)&&(K&&b.log(`[Profiling] Reached 5-minute timeout for root span ${e}. You likely started a manual root span that never called \`.end()\`.`),this._activeRootSpanIds.delete(e),this._activeRootSpanIds.size===0&&this._endProfiling()))}async _collectCurrentChunk(){let e=this._profiler;if(this._profiler=void 0,e)try{let t=JS(await e.stop(),this._client,this._profilerId),n=YS(t);if(`reason`in n){K&&b.log(`[Profiling] Discarding invalid profile chunk (this is probably a bug in the SDK):`,n.reason);return}this._sendProfileChunk(t),K&&b.log(`[Profiling] Collected browser profile chunk.`)}catch(e){K&&b.log(`[Profiling] Error while stopping JS Profiler for chunk:`,e)}}_sendProfileChunk(e){var t;let n=this._client,r=Ja((t=n.getSdkMetadata)==null?void 0:t.call(n)),i=n.getDsn(),a=n.getOptions().tunnel,o=Fa({event_id:lt(),sent_at:new Date().toISOString(),...r&&{sdk:r},...!!a&&i&&{dsn:Kr(i)}},[[{type:`profile_chunk`,platform:`javascript`},e]]);n.sendEnvelope(o).then(null,e=>{K&&b.error(`Error while sending profile chunk envelope:`,e)})}},cC=`BrowserProfiling`,lC=I((()=>({name:cC,setup(e){let t=e.getOptions(),n=new sC;t.profileLifecycle||=`manual`;let r=F(),i=r&&Ni(r),a=t.profileLifecycle;if(e.on(`startUIProfiler`,()=>n.start()),e.on(`stopUIProfiler`,()=>n.stop()),a===`manual`)n.initialize(e);else if(a===`trace`){if(!Bi(t)){K&&b.warn("[Profiling] `profileLifecycle` is 'trace' but tracing is disabled. Set a `tracesSampleRate` or `tracesSampler` to enable span tracing.");return}n.initialize(e),i&&n.notifyRootSpanActive(i),G.setTimeout(()=>{let e=F(),t=e&&Ni(e);t&&n.notifyRootSpanActive(t)},0)}}}))),uC=`SpotlightBrowser`,dC=[{op:zs,name:`#sentry-spotlight`},{op:zs,attributes:{[xn]:`#sentry-spotlight`}}],fC=((e={})=>{let t=e.sidecarUrl||`http://localhost:8969/stream`;return{name:uC,setup:()=>{K&&b.log(`Using Sidecar URL`,t)},beforeSetup(e){let t=e.getOptions();t.ignoreSpans=[...t.ignoreSpans||[],...dC]},afterAllSetup:e=>{pC(e,t)}}});function pC(e,t){let n=ny(`fetch`),r=0;e.on(`beforeEnvelope`,e=>{r>3?b.warn(`[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests:`,r):n(t,{method:`POST`,body:Va(e),headers:{"Content-Type":`application/x-sentry-envelope`},mode:`cors`}).then(e=>{e.status>=200&&e.status<400&&(r=0)},e=>{r++,b.error(`Sentry SDK can't connect to Sidecar is it running? See: https://spotlightjs.com/sidecar/npx/`,e)})})}var mC=I(fC),hC=I(()=>({name:`LaunchDarkly`,processEvent(e,t,n){return mp(e)}}));function gC(){return{name:`sentry-flag-auditor`,type:`flag-used`,synchronous:!0,method:(e,t,n)=>{hp(e,t.value),_p(e,t.value)}}}var _C=I(()=>({name:`OpenFeature`,processEvent(e,t,n){return mp(e)}})),vC=class{after(e,t){hp(t.flagKey,t.value),_p(t.flagKey,t.value)}error(e,t,n){hp(e.flagKey,e.defaultValue),_p(e.flagKey,e.defaultValue)}},yC=I(({featureFlagClientClass:e})=>({name:`Unleash`,setupOnce(){ke(e.prototype,`isEnabled`,bC)},processEvent(e,t,n){return mp(e)}}));function bC(e){return function(...t){let n=t[0],r=e.apply(this,t);return typeof n==`string`&&typeof r==`boolean`?(hp(n,r),_p(n,r)):K&&b.error(`[Feature Flags] UnleashClient.isEnabled does not match expected signature. arg0: ${n} (${typeof n}), result: ${r} (${typeof r})`),r}}var xC=(({growthbookClass:e})=>yp({growthbookClass:e})),SC=I(({featureFlagClient:e})=>({name:`Statsig`,setup(t){e.on(`gate_evaluation`,e=>{hp(e.gate.name,e.gate.value),_p(e.gate.name,e.gate.value)})},processEvent(e,t,n){return mp(e)}}));async function CC(){let e=M();if(!e)return`no-client-active`;if(!e.getDsn())return`no-dsn-configured`;let t=e.getOptions().tunnel||`https://o447951.ingest.sentry.io/api/4509632503087104/envelope/?sentry_version=7&sentry_key=c1dfb07d783ad5325c245c1fd3725390&sentry_client=sentry.javascript.browser%2F1.33.7`;try{await Lo(()=>fetch(t,{body:`{}`,method:`POST`,mode:`cors`,credentials:`omit`}))}catch{return`sentry-unreachable`}}var wC=`WebWorker`,TC=20,EC=I(({worker:e})=>({name:wC,setupOnce:()=>{(Array.isArray(e)?e:[e]).forEach(e=>DC(e))},addWorker:e=>DC(e)}));function DC(e){let t=[];e.addEventListener(`error`,({message:e,filename:n,lineno:r,colno:i})=>{let a=t.findIndex(t=>t.message===e&&t.url===n&&t.lineno===r&&t.colno===i);a!==-1&&(t.splice(0,a+1),yy({msg:e,url:n,line:r,column:i}))}),e.addEventListener(`message`,e=>{if(MC(e.data)){if(e.stopImmediatePropagation(),e.data._sentryDebugIds&&(K&&b.log(`Sentry debugId web worker message received`,e.data),G._sentryDebugIds={...e.data._sentryDebugIds,...G._sentryDebugIds}),e.data._sentryModuleMetadata&&(K&&b.log(`Sentry module metadata web worker message received`,e.data),G._sentryModuleMetadata={...e.data._sentryModuleMetadata,...G._sentryModuleMetadata}),e.data._sentryWasmImages){K&&b.log(`Sentry WASM images web worker message received`,e.data);let t=G._sentryWasmImages||[],n=e.data._sentryWasmImages.filter(e=>Se(e)&&typeof e.code_file==`string`&&!t.some(t=>t.code_file===e.code_file));G._sentryWasmImages=[...t,...n]}if(e.data._sentryWorkerError){K&&b.log(`Sentry worker error message received`,e.data._sentryWorkerError);let{kind:n,message:r,url:i,lineno:a,colno:o}=e.data._sentryWorkerError;n===`error`&&t.push({message:r,url:i,lineno:a,colno:o})>TC&&t.shift(),OC(e.data._sentryWorkerError)}}})}function OC(e){let{reason:t,kind:n,name:r,filename:i,url:a,lineno:o,colno:s,plainError:c}=e,l=n!==`error`,u=c&&Se(t)?jC(t):t;r&&k(u)&&u.name!==r&&Ae(u,`name`,r);let d=M();if(!d)return;let{stackParser:f,attachStacktrace:p}=d.getOptions(),m=l&&xe(u)?e4(u):Wy(f,u,void 0,p,l);l||t4(m,a||i,o,s),m.level=`error`,i&&(m.contexts={...m.contexts,worker:{filename:i}}),Pc(m,{originalException:u,mechanism:{handled:!1,type:l?`auto.browser.web_worker.onunhandledrejection`:`auto.browser.web_worker.onerror`}}),K&&b.log(`Captured worker ${l?`unhandled rejection`:`error`}`,u)}function kC({self:e}){Error.stackTraceLimit=50,e.postMessage({_sentryMessage:!0,_sentryDebugIds:e._sentryDebugIds??void 0,_sentryModuleMetadata:e._sentryModuleMetadata??void 0});let t=t=>{var n;let{reason:r}=t;K&&b.log(`[Sentry Worker] Forwarding ${t.kind} to parent`,t),AC(e,{...t,filename:(n=e.location)==null?void 0:n.href,name:k(r)?By(r):void 0})};e.addEventListener(`error`,e=>{let{error:n,message:r,filename:i,lineno:a,colno:o}=e;t({kind:`error`,reason:n??r,message:r,url:i,lineno:a,colno:o})}),e.addEventListener(`unhandledrejection`,e=>{t({kind:`unhandledrejection`,reason:$2(e)})}),K&&b.log(`[Sentry Worker] Registered worker with error and unhandled rejection handling`)}function AC(e,t){try{e.postMessage({_sentryMessage:!0,_sentryWorkerError:t});return}catch{}let{reason:n}=t,r=k(n),i=r?{message:Vy(n),stack:n.stack}:qe(n);try{e.postMessage({_sentryMessage:!0,_sentryWorkerError:{...t,reason:i,plainError:r}})}catch{}}function jC(e){let t=Error(String(e.message));return t.stack=typeof e.stack==`string`?e.stack:void 0,t}function MC(e){if(!Se(e)||e._sentryMessage!==!0)return!1;let t=`_sentryDebugIds`in e,n=`_sentryModuleMetadata`in e,r=`_sentryWorkerError`in e,i=`_sentryWasmImages`in e;return!(!t&&!n&&!r&&!i||t&&!(Se(e._sentryDebugIds)||e._sentryDebugIds===void 0)||n&&!(Se(e._sentryModuleMetadata)||e._sentryModuleMetadata===void 0)||r&&!Se(e._sentryWorkerError)||i&&(!Array.isArray(e._sentryWasmImages)||!e._sentryWasmImages.every(e=>Se(e)&&typeof e.code_file==`string`)))}export{Yy as BrowserClient,wu as MULTIPLEXED_TRANSPORT_EXTRA_KEY,vC as OpenFeatureIntegrationHook,i as SDK_VERSION,br as SEMANTIC_ATTRIBUTE_SENTRY_OP,xr as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,vr as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,zt as Scope,G as WINDOW,yd as addBreadcrumb,Yc as addEventProcessor,Qi as addIntegration,OS as bfcacheMetricsIntegration,ms as bindScopeToEmitter,k2 as breadcrumbsIntegration,R2 as browserApiErrorsIntegration,lC as browserProfilingIntegration,G2 as browserSessionIntegration,uS as browserTracingIntegration,gC as buildLaunchDarklyFlagUsedHandler,rf as captureConsoleIntegration,Pc as captureEvent,Mc as captureException,qp as captureFeedback,Nc as captureMessage,$c as captureSession,f2 as chromeStackLineParser,Kc as close,up as consoleIntegration,cm as consoleLoggingIntegration,W4 as contextLinesIntegration,Fo as continueTrace,vv as createCachedRouteProvider,hm as createConsolaReporter,Vl as createTransport,_v as createUrlRouteProvider,T2 as createUserFeedbackEnvelope,q2 as cultureContextIntegration,sf as dedupeIntegration,W9 as defaultRequestInstrumentationOptions,S2 as defaultStackLineParsers,C2 as defaultStackParser,CC as diagnoseSdkConnectivity,X0 as elementTimingIntegration,Zc as endSession,Td as eventFiltersIntegration,Hy as eventFromException,Uy as eventFromMessage,My as exceptionFromError,hf as extraErrorDataIntegration,vp as featureFlagsIntegration,Ay as feedbackAsyncIntegration,jy as feedbackIntegration,jy as feedbackSyncIntegration,ES as fetchStreamPerformanceIntegration,Gc as flush,v4 as forceLoad,Sd as functionToStringIntegration,h2 as geckoStackLineParser,hy as getAbsoluteUrl,F as getActiveSpan,M as getClient,A as getCurrentScope,g4 as getDefaultIntegrations,hh as getFeedback,un as getGlobalScope,j as getIsolationScope,G7 as getReplay,Ni as getRootSpan,mv as getRouteProvider,Mi as getSpanDescendants,Dr as getSpanStatusFromHttpCode,fd as getTraceData,X2 as globalHandlersIntegration,i3 as graphqlClientIntegration,xC as growthbookIntegration,D4 as httpClientIntegration,a4 as httpContextIntegration,_4 as init,G9 as instrumentOutgoingRequests,Wf as instrumentSupabaseClient,sv as interactionsIntegration,iv as isBotUserAgent,Jc as isEnabled,qc as isInitialized,Wc as lastEventId,hC as launchDarklyIntegration,Oy as lazyLoadIntegration,l4 as linkedErrorsIntegration,Jp as logger,WS as makeBrowserOfflineTransport,Qy as makeFetchTransport,Ou as makeMultiplexedTransport,lm as metrics,Yd as moduleMetadataIntegration,d4 as normalizeStringifyValue,y4 as onLoad,_C as openFeatureIntegration,y2 as opera10StackLineParser,x2 as opera11StackLineParser,ad as parameterize,zi as registerSpanErrorInstrumentation,kC as registerWebWorker,z9 as replayCanvasIntegration,V7 as replayIntegration,bS as reportPageLoaded,T4 as reportingObserverIntegration,gv as resolveCurrentRoute,hv as resolveRoute,Ef as rewriteFramesIntegration,Qm as sendFeedback,xS as setActiveSpanInBrowser,Vc as setAttribute,Bc as setAttributes,Fc as setContext,Uc as setConversationId,bu as setCurrentClient,Lc as setExtra,Ic as setExtras,Or as setHttpStatus,So as setMeasurement,pv as setRouteProvider,zc as setTag,Rc as setTags,Hc as setUser,b4 as showReportDialog,uo as spanStreamingIntegration,ca as spanToBaggageHeader,P as spanToJSON,yi as spanToStaticSpanJSON,fi as spanToTraceHeader,mC as spotlightBrowserIntegration,fS as startBrowserTracingNavigationSpan,dS as startBrowserTracingPageLoadSpan,ts as startInactiveSpan,zo as startNewTrace,Xc as startSession,$o as startSpan,es as startSpanManual,SC as statsigIntegration,qf as supabaseIntegration,Lo as suppressTracing,np as thirdPartyErrorFilterIntegration,t2 as uiProfiler,yC as unleashIntegration,Ii as updateSpanName,xv as userTimingIntegration,a3 as viewHierarchyIntegration,$9 as webVitalsIntegration,EC as webWorkerIntegration,_2 as winjsStackLineParser,Io as withActiveSpan,fn as withIsolationScope,dn as withScope,xa as withStaticSpan,Sa as withStreamedSpan,tp as zodErrorsIntegration};
|