PageSourceSearch

https://mana.live/assets/sentry-BCDxONKy.js

js mana.live collected 2026-09-24 14:03:53 UTC 168,884 bytes, 31 lines download raw bytes

vendor: 5,339 bytes, lines 1-9
1(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"fe3995d0dc306b0b65b2b3984367f87cf9fddeea"};var e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="5f049457-ead0-4023-9065-983bc755b7ff",t._sentryDebugIdIdentifier="sentry-dbid-5f049457-ead0-4023-9065-983bc755b7ff")}catch{}})();function yc(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in t)){const o=Object.getOwnPropertyDescriptor(r,s);o&&Object.defineProperty(t,s,o.get?o:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}function Ec(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ri={exports:{}},R={};/**
2 * @license React
3 * react.production.min.js
4 *
5 * Copyright (c) Facebook, Inc. and its affiliates.
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE file in the root directory of this source tree.
9 */var Qe=Symbol.for("react.element"),bc=Symbol.for("react.portal"),vc=Symbol.for("react.fragment"),Tc=Symbol.for("react.strict_mode"),Ic=Symbol.for("react.profiler"),Rc=Symbol.for("react.provider"),Ac=Symbol.for("react.context"),wc=Symbol.for("react.forward_ref"),Nc=Symbol.for("react.suspense"),Cc=Symbol.for("react.memo"),Pc=Symbol.for("react.lazy"),Rs=Symbol.iterator;function kc(t){return t===null||typeof t!="object"?null:(t=Rs&&t[Rs]||t["@@iterator"],typeof t=="function"?t:null)}var si={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},oi=Object.assign,ii={};function Te(t,e,n){this.props=t,this.context=e,this.refs=ii,this.updater=n||si}Te.prototype.isReactComponent={};Te.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Te.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function ai(){}ai.prototype=Te.prototype;function qr(t,e,n){this.props=t,this.context=e,this.refs=ii,this.updater=n||si}var zr=qr.prototype=new ai;zr.constructor=qr;oi(zr,Te.prototype);zr.isPureReactComponent=!0;var As=Array.isArray,ci=Object.prototype.hasOwnProperty,Gr={current:null},ui={key:!0,ref:!0,__self:!0,__source:!0};function fi(t,e,n){var r,s={},o=null,i=null;if(e!=null)for(r in e.ref!==void 0&&(i=e.ref),e.key!==void 0&&(o=""+e.key),e)ci.call(e,r)&&!ui.hasOwnProperty(r)&&(s[r]=e[r]);var c=arguments.length-2;if(c===1)s.children=n;else if(1<c){for(var a=Array(c),u=0;u<c;u++)a[u]=arguments[u+2];s.children=a}if(t&&t.defaultProps)for(r in c=t.defaultProps,c)s[r]===void 0&&(s[r]=c[r]);return{$$typeof:Qe,type:t,key:o,ref:i,props:s,_owner:Gr.current}}function Oc(t,e){return{$$typeof:Qe,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Vr(t){return typeof t=="object"&&t!==null&&t.$$typeof===Qe}function Lc(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var ws=/\/+/g;function sr(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Lc(""+t.key):e.toString(36)}function bn(t,e,n,r,s){var o=typeof t;(o==="undefined"||o==="boolean")&&(t=null);var i=!1;if(t===null)i=!0;else switch(o){case"string":case"number":i=!0;break;case"object":switch(t.$$typeof){case Qe:case bc:i=!0}}if(i)return i=t,s=s(i),t=r===""?"."+sr(i,0):r,As(s)?(n="",t!=null&&(n=t.replace(ws,"$&/")+"/"),bn(s,e,n,"",function(u){return u})):s!=null&&(Vr(s)&&(s=Oc(s,n+(!s.key||i&&i.key===s.key?"":(""+s.key).replace(ws,"$&/")+"/")+t)),e.push(s)),1;if(i=0,r=r===""?".":r+":",As(t))for(var c=0;c<t.length;c++){o=t[c];var a=r+sr(o,c);i+=bn(o,e,n,a,s)}else if(a=kc(t),typeof a=="function")for(t=a.call(t),c=0;!(o=t.next()).done;)o=o.value,a=r+sr(o,c++),i+=bn(o,e,n,a,s);else if(o==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return i}function pn(t,e,n){if(t==null)return t;var r=[],s=0;return bn(t,r,"","",function(o){return e.call(n,o,s++)}),r}function xc(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var J={current:null},vn={transition:null},Dc={ReactCurrentDispatcher:J,ReactCurrentBatchConfig:vn,ReactCurrentOwner:Gr};function di(){throw Error("act(...) is not supported in production builds of React.")}R.Children={map:pn,forEach:function(t,e,n){pn(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return pn(t,function(){e++}),e},toArray:function(t){return pn(t,function(e){return e})||[]},only:function(t){if(!Vr(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};R.Component=Te;R.Fragment=vc;R.Profiler=Ic;R.PureComponent=qr;R.StrictMode=Tc;R.Suspense=Nc;
9R.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Dc;R.act=di;R.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=oi({},t.props),s=t.key,o=t.ref,i=t._owner;if(e!=null){if(e.ref!==void 0&&(o=e.ref,i=Gr.current),e.key!==void 0&&(s=""+e.key),t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(a in e)ci.call(e,a)&&!ui.hasOwnProperty(a)&&(r[a]=e[a]===void 0&&c!==void 0?c[a]:e[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){c=Array(a);for(var u=0;u<a;u++)c[u]=arguments[u+2];r.children=c}return{$$typeof:Qe,type:t.type,key:s,ref:o,props:r,_owner:i}};R.createContext=function(t){return t={$$typeof:Ac,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:Rc,_context:t},t.Consumer=t};R.createElement=fi;R.createFactory=function(t){var e=fi.bind(null,t);return e.type=t,e};R.createRef=function(){return{current:null}};R.forwardRef=function(t){return{$$typeof:wc,render:t}};R.isValidElement=Vr;R.lazy=function(t){return{$$typeof:Pc,_payload:{_status:-1,_result:t},_init:xc}};R.memo=function(t,e){return{$$typeof:Cc,type:t,compare:e===void 0?null:e}};R.startTransition=function(t){var e=vn.transition;vn.transition={};try{t()}finally{vn.transition=e}};R.unstable_act=di;R.useCallback=function(t,e){return J.current.useCallback(t,e)};R.useContext=function(t){return J.current.useContext(t)};R.useDebugValue=function(){};R.useDeferredValue=function(t){return J.current.useDeferredValue(t)};R.useEffect=function(t,e){return J.current.useEffect(t,e)};R.useId=function(){return J.current.useId()};R.useImperativeHandle=function(t,e,n){return J.current.useImperativeHandle(t,e,n)};R.useInsertionEffect=function(t,e){return J.current.useInsertionEffect(t,e)};R.useLayoutEffect=function(t,e){return J.current.useLayoutEffect(t,e)};R.useMemo=function(t,e){return J.current.useMemo(t,e)};R.useReducer=function(t,e,n){return J.current.useReducer(t,e,n)};R.useRef=function(t){return J.current.useRef(t)};R.useState=function(t){return J.current.useState(t)};R.useSyncExternalStore=function(t,e,n){return J.current.useSyncExternalStore(t,e,n)};R.useTransition=function(){return J.current.useTransition()};R.version="18.3.1";ri.exports=R;var Ot=ri.exports;const Mc=Ec(Ot),zh=yc({__proto__:null,default:Mc},[Ot]),S=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,I=globalThis,Yt="10.70.0";function xt(){return Ze(I),I}function Ze(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||Yt,e[Yt]=e[Yt]||{}}function Ie(t,e,n=I){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[Yt]=r[Yt]||{};return s[t]||(s[t]=e())}const $c=["debug","info","warn","error","log","assert","trace"],Fc="Sentry Logger ",Ln={};function oe(t){if(!("console"in I))return t();const e=I.console,n={},r=Object.keys(Ln);r.forEach(s=>{const o=Ln[s];n[s]=e[s],e[s]=o});try{return t()}finally{r.forEach(s=>{e[s]=n[s]})}}function Hc(){Jr().enabled=!0}function Bc(){Jr().enabled=!1}function li(){return Jr().enabled}function Uc(...t){Yr("log",...t)}function jc(...t){Yr("warn",...t)}function Wc(...t){Yr("error",...t)}function Yr(t,...e){S&&li()&&oe(()=>{I.console[t](`${Fc}[${t}]:`,...e)})}function Jr(){return S?Ie("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const g={enable:Hc,disable:Bc,isEnabled:li,log:Uc,warn:jc,error:Wc},pi=50,ee="?",Ns=/\(error: (.*)\)/,Cs=/captureMessage|captureException/;function mi(...t){const e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const o=[],i=n.split(`
10`);for(let c=r;c<i.length;c++){let a=i[c];a.length>1024&&(a=a.slice(0,1024));const u=Ns.test(a)?a.replace(Ns,"$1"):a;if(!u.includes("Error: ")){for(const f of e){const d=f(u);if(d){o.push(d);break}}if(o.length>=pi+s)break}}return zc(o.slice(s))}}function qc(t){return Array.isArray(t)?mi(...t):t}function zc(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(mn(e).function||"")&&e.pop(),e.reverse(),Cs.test(mn(e).function||"")&&(e.pop(),Cs.test(mn(e).function||"")&&e.pop()),e.slice(0,pi).map(n=>({...n,filename:n.filename||mn(e).filename,function:n.function||ee}))}function mn(t){return t[t.length-1]||{}}const or="<anonymous>";function Tt(t){try{return!t||typeof t!="function"?or:t.name||or}catch{return or}}function Ps(t){const e=t.exception;if(e){const n=[];
10try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const He={},ks={};function Dt(t,e){return He[t]=He[t]||[],He[t].push(e),()=>{const n=He[t];if(n){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}}}function Mt(t,e){if(!ks[t]){ks[t]=!0;try{e()}catch(n){S&&g.error(`Error while instrumenting ${t}`,n)}}}function ot(t,e){const n=t&&He[t];if(n)for(const r of n)try{r(e)}catch(s){S&&g.error(`Error while triggering instrumentation handler.
11Type: ${t}
12Name: ${Tt(r)}
13Error:`,s)}}let ir=null;function gi(t){const e="error";Dt(e,t),Mt(e,Gc)}function Gc(){ir=I.onerror,I.onerror=function(t,e,n,r,s){return ot("error",{column:r,error:s,line:n,msg:t,url:e}),ir?ir.apply(this,arguments):!1},I.onerror.__SENTRY_INSTRUMENTED__=!0}let ar=null;function hi(t){const e="unhandledrejection";Dt(e,t),Mt(e,Vc)}function Vc(){ar=I.onunhandledrejection,I.onunhandledrejection=function(t){return ot("unhandledrejection",t),ar?ar.apply(this,arguments):!0},I.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const _i=Object.prototype.toString;function pt(t){switch(_i.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return qn(t,Error)}}function Re(t,e){return _i.call(t)===`[object ${e}]`}function Si(t){return Re(t,"ErrorEvent")}function Os(t){return Re(t,"DOMError")}function Yc(t){return Re(t,"DOMException")}function yt(t){return Re(t,"String")}function Xr(t){return typeof t=="object"&&t!==null&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function ne(t){return t===null||Xr(t)||typeof t!="object"&&typeof t!="function"}function We(t){return Re(t,"Object")}function jn(t){return typeof t=="object"&&t!==null}function Wn(t){return typeof Event<"u"&&qn(t,Event)}function Jc(t){return Re(t,"RegExp")}function tn(t){return!!(t!=null&&t.then&&typeof t.then=="function")}function qn(t,e){try{return t instanceof e}catch{return!1}}function Kr(t){return typeof Request<"u"&&qn(t,Request)}function tt(t,e,n){if(!(e in t))return;const r=t[e];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&yi(s,r);try{t[e]=s}catch{S&&g.log(`Failed to replace method "${e}" in object`,t)}}function H(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{S&&g.log(`Failed to add non-enumerable property "${String(e)}" to object`,t)}}function yi(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,H(t,"__sentry_original__",e)}catch{}}function Qr(t){return t.__sentry_original__}function Ei(t){if(pt(t))return{message:t.message,name:t.name,stack:t.stack,...Ls(t)};if(Wn(t)){const{type:e,target:n,currentTarget:r,detail:s}=t;return{type:e,target:n,currentTarget:r,...s?{detail:s}:{},...Ls(t)}}return t}function Ls(t){return jn(t)?Object.fromEntries(Object.entries(t)):{}}function Xc(t){const e=Object.keys(Ei(t));return e.sort(),e[0]?e.join(", "):"[object has no keys]"}let ce;function en(t){if(ce!==void 0)return ce?ce(t):t();const e=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=I;return e in n&&typeof n[e]=="function"?(ce=n[e],ce(t)):(ce=null,t())}function Pt(){return en(()=>Math.random())}function $t(){return en(()=>Date.now())}const Kc=Symbol.for("sentry.skipNormalization"),Qc=Symbol.for("sentry.overrideNormalizationDepth");function Zc(t){return!!t[Kc]}function tu(t){const e=t[Qc];return typeof e=="number"?e:void 0}let Er;function bi(t){Er=t}function St(t,e=100,n=1/0){try{return br("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function vi(t,e=3,n=100*1024){const r=St(t,e);return ru(r)>n?vi(t,e-1,n):r}function br(t,e,n=1/0,r=1/0,s=su()){const[o,i]=s;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;const c=Ti(t,e);if(!c.startsWith("[object "))return c;if(Zc(e))return e;const a=tu(e),u=a!==void 0?a:n;if(u===0)return c.replace("object ","");if(o(e))return"[Circular ~]";const f=e;if(f&&typeof f.toJSON=="function")try{const m=f.toJSON();return br("",m,u-1,r,s)}catch{}const d=Array.isArray(e)?[]:{};let p=0;const l=Ei(e);for(const m in l){if(!Object.prototype.hasOwnProperty.call(l,m))continue;if(p>=r){d[m]="[MaxProperties ~]";break}const h=l[m];d[m]=br(m,h,u-1,r,s),p++}return i(e),d}function Ti(t,e){try{if(Er){const r=Er(e);
13if(r)return r}return typeof global<"u"&&e===global?"[Global]":typeof e=="number"&&!Number.isFinite(e)?`[${e}]`:typeof e=="function"?`[Function: ${Tt(e)}]`:typeof e=="symbol"?`[${String(e)}]`:typeof e=="bigint"?`[BigInt: ${String(e)}]`:`[object ${eu(e)}]`}catch(n){return`**non-serializable** (${n})`}}function eu(t){const e=Object.getPrototypeOf(t);return e!=null&&e.constructor?e.constructor.name:"null prototype"}function nu(t){return~-encodeURI(t).split(/%..|./).length}function ru(t){return nu(JSON.stringify(t))}function su(){const t=new WeakSet;function e(r){return t.has(r)?!0:(t.add(r),!1)}function n(r){t.delete(r)}return[e,n]}function vr(t,e=0){return typeof t!="string"||e===0||t.length<=e?t:`${t.slice(0,e)}...`}function xs(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const s=t[r];ne(s)?n.push(String(s)):s instanceof Error?n.push(s.message?`${s.name}: ${s.message}`:s.name):n.push(Ti(void 0,s))}return n.join(e)}function Be(t,e,n=!1){return yt(t)?Jc(e)?e.test(t):yt(e)?n?t===e:t.includes(e):typeof e=="function"?e(t):!1:!1}function Et(t,e=[],n=!1){for(const r of e)if(Be(t,r,n))return!0;return!1}function ou(){const t=I;return t.crypto||t.msCrypto}let cr;function iu(){return Pt()*16}function it(t=ou()){try{if(t!=null&&t.randomUUID)return en(()=>t.randomUUID()).replace(/-/g,"")}catch{}return cr||(cr="10000000100040008000"+1e11),cr.replace(/[018]/g,e=>(e^(iu()&15)>>e/4).toString(16))}function Ii(t){var e,n;return(n=(e=t.exception)==null?void 0:e.values)==null?void 0:n[0]}function zt(t){const{message:e,event_id:n}=t;if(e)return e;const r=Ii(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Tr(t,e,n){const r=t.exception=t.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=e||""),o.type||(o.type="Error")}function Jt(t,e){const n=Ii(t);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...e},e&&"data"in e){const o={...s==null?void 0:s.data,...e.data};n.mechanism.data=o}}function Ds(t){if(au(t))return!0;try{H(t,"__sentry_captured__",!0)}catch{}return!1}function au(t){try{return t.__sentry_captured__}catch{}}const Ri=1e3;function ie(){return $t()/Ri}function cu(){const{performance:t}=I;if(!(t!=null&&t.now)||!t.timeOrigin)return ie;const e=t.timeOrigin;return()=>(e+en(()=>t.now()))/Ri}let Ms;function $(){return(Ms??(Ms=cu()))()}let ur=null;function uu(){var i;const{performance:t}=I;if(!(t!=null&&t.now))return;const e=3e5,n=en(()=>t.now()),r=$t(),s=t.timeOrigin;if(typeof s=="number"&&Math.abs(s+n-r)<e)return s;const o=(i=t.timing)==null?void 0:i.navigationStart;return typeof o=="number"&&Math.abs(o+n-r)<e?o:r-n}function q(){return ur===null&&(ur=uu()),ur}function fu(t){const e=$(),n={sid:it(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>lu(n)};return t&&me(n,t),n}function me(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||$(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:it()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function du(t,e){let n={};t.status==="ok"&&(n={status:"exited"}),me(t,n)}function lu(t){return{sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}function nn(t,e,n=2){if(!e||typeof e!="object"||n<=0)return e;if(t&&Object.keys(e).length===0)return t;const r={...t};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=nn(r[s],e[s],n-1));return r}function It(){return it()}function bt(){return it().substring(16)}function Ai(t){try{const e=I.WeakRef;if(typeof e=="function")return new e(t)}catch{}return t}function wi(t){if(t){if(typeof t=="object"&&"deref"in t&&typeof t.deref=="function")try{return t.deref()}catch{return}return t}}const Ir="_sentrySpan";function qe(t,e){e?H(t,Ir,Ai(e)):delete t[Ir]}function xn(t){return wi(t[Ir])}const pu=100;class mt{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:It(),sampleRand:Pt()}}clone(){const e=new mt;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._attributes={...this._attributes},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,e._conversationId=this._conversationId,qe(e,xn(this)),e}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&&me(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,n){return this.setTags({[e]:n})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,n){return this.setAttributes({[e]:n})}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,n){return this._extra={...this._extra,[e]:n},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,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n=typeof e=="function"?e(this):e,r=n instanceof mt?n.getScopeData():We(n)?e:void 0,{tags:s,attributes:o,extra:i,user:c,contexts:a,level:u,fingerprint:f=[],propagationContext:d,conversationId:p}=r||{};return this._tags={...this._tags,...s},this._attributes={...this._attributes,...o},this._extra={...this._extra,...i},this._contexts={...this._contexts,...a},c&&Object.keys(c).length&&(this._user=c),u&&(this._level=u),f.length&&(this._fingerprint=f),d&&(this._propagationContext=d),p&&(this._conversationId=p),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,qe(this,void 0),this._attachments=[],this.setPropagationContext({traceId:It(),sampleRand:Pt()}),this._notifyScopeListeners(),this}addBreadcrumb(e,n){var o;const r=typeof n=="number"?n:pu;if(r<=0)return this;const s={timestamp:ie(),...e,message:e.message?vr(e.message,2048):e.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),(o=this._client)==null||o.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:xn(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=nn(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const r=(n==null?void 0:n.event_id)||it();if(!this._client)return S&&g.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureMessage(e,n,r){const s=(r==null?void 0:r.event_id)||it();if(!this._client)return S&&g.warn("No client configured on scope - will not capture message!"),s;const o=(r==null?void 0:r.syntheticException)??new Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:o,...r,event_id:s},this),s}
13captureEvent(e,n){const r=e.event_id||(n==null?void 0:n.event_id)||it();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(S&&g.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}function mu(){return Ie("defaultCurrentScope",()=>new mt)}function gu(){return Ie("defaultIsolationScope",()=>new mt)}const $s=t=>t instanceof Promise&&!t[Ni],Ni=Symbol("chained PromiseLike"),hu=(t,e,n)=>{const r=t.then(s=>(e(s),s),s=>{throw n(s),s});return $s(r)&&$s(t)?r:_u(t,r)},_u=(t,e)=>{if(!e)return t;let n=!1;for(const r in t){if(r in e)continue;n=!0;const s=t[r];typeof s=="function"?Object.defineProperty(e,r,{value:(...o)=>s.apply(t,o),enumerable:!0,configurable:!0,writable:!0}):e[r]=s}return n&&Object.assign(e,{[Ni]:!0}),e};class Su{constructor(e,n){let r;e?r=e:r=new mt;let s;n?s=n:s=new mt,this._stack=[{scope:r}],this._isolationScope=s}withScope(e){const n=this._pushScope();let r;try{r=e(n)}catch(s){throw this._popScope(),s}return tn(r)?hu(r,()=>this._popScope(),()=>this._popScope()):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const 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 ge(){const t=xt(),e=Ze(t);return e.stack=e.stack||new Su(mu(),gu())}function yu(t){return ge().withScope(t)}function Eu(t,e){const n=ge();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function Fs(t){return ge().withScope(()=>t(ge().getIsolationScope()))}function bu(){return{withIsolationScope:Fs,withScope:yu,withSetScope:Eu,withSetIsolationScope:(t,e)=>Fs(e),getCurrentScope:()=>ge().getScope(),getIsolationScope:()=>ge().getIsolationScope()}}function Ae(t){const e=Ze(t);return e.acs?e.acs:bu()}function vu(t){return typeof t=="object"&&t!=null&&!Array.isArray(t)&&Object.keys(t).includes("value")}function Tu(t,e){const{value:n,unit:r}=vu(t)?t:{value:t,unit:void 0},s=Iu(n),o=r&&typeof r=="string"?{unit:r}:{};if(s)return{...s,...o};if(!e||e==="skip-undefined"&&n===void 0)return;let i="";try{i=JSON.stringify(n)??""}catch{}return{value:i,type:"string",...o}}function Hs(t,e=!1){const n={};for(const[r,s]of Object.entries(t??{})){const o=Tu(s,e);o&&(n[r]=o)}return n}function Iu(t){if(Array.isArray(t))return{value:t,type:"array"};const e=typeof t=="string"?"string":typeof t=="boolean"?"boolean":typeof t=="number"&&!Number.isNaN(t)?Number.isInteger(t)?"integer":"double":null;if(e)return{value:t,type:e}}function C(){const t=xt();return Ae(t).getCurrentScope()}function Q(){const t=xt();return Ae(t).getIsolationScope()}function Ru(){return Ie("globalScope",()=>new mt)}function Zr(...t){const e=xt(),n=Ae(e);if(t.length===2){const[r,s]=t;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(t[0])}function w(){return C().getClient()}function Au(t){const e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=e,o={trace_id:n,span_id:s||bt()};return r&&(o.parent_span_id=r),o}const U="sentry.source",ts="sentry.sample_rate",Ci="sentry.previous_trace_sample_rate",Y="sentry.op",O="sentry.origin",wu="sentry.status.message",ze="sentry.idle_span_finish_reason",rn="sentry.measurement_unit",sn="sentry.measurement_value",Bs="sentry.custom_span_name",es="sentry.profile_id",Ft="sentry.exclusive_time",Nu="sentry.link.type",Cu="gen_ai.conversation.id",Pi=0,zn=1,F=2;function Pu(t){if(t<400&&t>=100)return{code:zn};if(t>=400&&t<500)switch(t){case 401:return{code:F,message:"unauthenticated"};case 403:return{code:F,message:"permission_denied"};case 404:return{code:F,message:"not_found"};case 409:return{code:F,message:"already_exists"};case 413:return{code:F,message:"failed_precondition"};case 429:return{code:F,message:"resource_exhausted"};case 499:return{code:F,message:"cancelled"};default:return{code:F,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:F,message:"unimplemented"};case 503:return{code:F,message:"unavailable"};case 504:return{code:F,message:"deadline_exceeded"};default:return{code:F,message:"internal_error"}}return{code:F,message:"internal_error"}}function ki(t,e){t.setAttribute("http.response.status_code",e);const n=Pu(e);n.message!=="unknown_error"&&t.setStatus(n)}const Oi="_sentryScope",Li="_sentryIsolationScope",ku=Symbol.for("sentry.otelSourceInference"),Ou=Symbol.for("sentry.otelSourceExplicitlySet"),Lu=Symbol.for("sentry.tracerProviderSpan");function he(t,e,n){t&&(H(t,Li,Ai(n)),H(t,Oi,e))}function le(t){const e=t;return{scope:e[Oi],isolationScope:wi(e[Li])}}function Us(t){return t[ku]===!0}function xu(t){H(t,Ou,!0)}function js(t){return t[Lu]===!0}const Dn="sentry-",Du=8192;function xi(t){const e=$u(t);if(!e)return;const n=Object.entries(e).reduce((r,[s,o])=>{if(s.startsWith(Dn)){const i=s.slice(Dn.length);r[i]=o}return r},{});if(Object.keys(n).length>0)return n}function Mu(t){if(!t)return;const e=Object.entries(t).reduce((n,[r,s])=>(s&&(n[`${Dn}${r}`]=s),n),{});return Fu(e)}function $u(t){if(!(!t||!yt(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{const r=Ws(n);return Object.entries(r).forEach(([s,o])=>{e[s]=o}),e},{}):Ws(t)}function Ws(t){return t.split(",").map(e=>{const n=e.indexOf("=");if(n===-1)return[];const r=e.slice(0,n),s=e.slice(n+1);return[r,s].map(o=>{try{return decodeURIComponent(o.trim())}catch{return}})}).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function Fu(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[n,r],s)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=s===0?o:`${e},${o}`;return i.length>Du?(S&&g.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):i},"")}const Hu=/^o(\d+)\./,Bu=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Uu(t){return t==="http"||t==="https"}function we(t,e=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:c,publicKey:a}=t;return`${c}://${a}${e&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function ju(t){const e=Bu.exec(t);if(!e){oe(()=>{});return}const[n,r,s="",o="",i="",c=""]=e.slice(1);let a="",u=c;const f=u.split("/");if(f.length>1&&(a=f.slice(0,-1).join("/"),u=f.pop()),u){const d=u.match(/^\d+/);
13d&&(u=d[0])}return Di({host:o,pass:s,path:a,projectId:u,port:i,protocol:n,publicKey:r})}function Di(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Wu(t){if(!S)return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(i=>t[i]?!1:(g.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?Uu(r)?e&&isNaN(parseInt(e,10))?(g.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(g.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(g.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function qu(t){const e=t.match(Hu);return e==null?void 0:e[1]}function zu(t){const e=t.getOptions(),{host:n}=t.getDsn()||{};let r;return e.orgId?r=String(e.orgId):n&&(r=qu(n)),r}function Gu(t){const e=typeof t=="string"?ju(t):Di(t);if(!(!e||!Wu(e)))return e}function Ge(t){if(typeof t=="boolean")return Number(t);const e=typeof t=="string"?parseFloat(t):t;if(!(typeof e!="number"||isNaN(e)||e<0||e>1))return e}const Mi=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Vu(t){if(!t)return;const e=t.match(Mi);if(!e)return;let n;return e[3]==="1"?n=!0:e[3]==="0"&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}function Yu(t,e){const n=Vu(t),r=xi(e);if(!(n!=null&&n.traceId))return{traceId:It(),sampleRand:Pt()};const s=Ju(n,r);r&&(r.sample_rand=s.toString());const{traceId:o,parentSpanId:i,parentSampled:c}=n;return{traceId:o,parentSpanId:i,sampled:c,dsc:r||{},sampleRand:s}}function $i(t=It(),e=bt(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function Fi(t=It(),e=bt(),n){return`00-${t}-${e}-${n?"01":"00"}`}function Ju(t,e){const n=Ge(e==null?void 0:e.sample_rand);if(n!==void 0)return n;const r=Ge(e==null?void 0:e.sample_rate);return r&&(t==null?void 0:t.parentSampled)!==void 0?t.parentSampled?Pt()*r:r+Pt()*(1-r):Pt()}const Hi=0,Gn=1;let qs=!1;function Xu(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:o,status:i,origin:c,links:a}=T(t);return{parent_span_id:o,span_id:e,trace_id:n,data:r,op:s,status:i,origin:c,links:a}}function Ku(t){const{spanId:e,traceId:n,isRemote:r}=t.spanContext(),s=r?e:T(t).parent_span_id,o=le(t).scope,i=r?(o==null?void 0:o.getPropagationContext().propagationSpanId)||bt():e;return{parent_span_id:s,span_id:i,trace_id:n}}function Qu(t){const{traceId:e,spanId:n}=t.spanContext(),r=Ht(t);return $i(e,n,r)}function Zu(t){const{traceId:e,spanId:n}=t.spanContext(),r=Ht(t);return Fi(e,n,r)}function Bi(t){if(t&&t.length>0)return t.map(({context:{spanId:e,traceId:n,traceFlags:r,...s},attributes:o})=>({span_id:e,trace_id:n,sampled:r===Gn,attributes:o,...s}))}function Ui(t){if(t!=null&&t.length)return t.map(({context:{spanId:e,traceId:n,traceFlags:r},attributes:s})=>({span_id:e,trace_id:n,sampled:r===Gn,attributes:s}))}function vt(t){return typeof t=="number"?zs(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?zs(t.getTime()):$()}function zs(t){return t>9999999999?t/1e3:t}function T(t){if(zi(t))return t.getSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(qi(t)){const{attributes:r,startTime:s,name:o,endTime:i,status:c,links:a}=t;return{span_id:e,trace_id:n,data:r,description:o,parent_span_id:Wi(t),start_timestamp:vt(s),timestamp:vt(i)||void 0,status:Gi(c),op:r[Y],origin:r[O],links:Bi(a)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function ji(t){if(zi(t))return t.getStreamedSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(qi(t)){const{attributes:r,startTime:s,name:o,endTime:i,status:c,links:a}=t;return{name:o,span_id:e,trace_id:n,parent_span_id:Wi(t),start_timestamp:vt(s),end_timestamp:vt(i),is_segment:t===Ar(t),status:ns(c),attributes:Vi(r,c),links:Ui(a)}}return{span_id:e,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:t===Ar(t)}}function Wi(t){var e;return"parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?(e=t.parentSpanContext)==null?void 0:e.spanId:void 0}function tf(t){var e;return{...t,attributes:Hs(t.attributes),links:(e=t.links)==null?void 0:e.map(n=>({...n,attributes:Hs(n.attributes)}))}}function qi(t){const e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function zi(t){return typeof t.getSpanJSON=="function"}function Ht(t){const{traceFlags:e}=t.spanContext();return e===Gn}function Gi(t){if(!(!t||t.code===Pi))return t.code===zn?"ok":t.message||"internal_error"}function ns(t){return!t||t.code===zn||t.code===Pi||t.message==="cancelled"?"ok":"error"}function Vi(t,e){const n=ns(e)==="error"?e==null?void 0:e.message:void 0;return{...n&&{[wu]:n},...t}}const Xt="_sentryChildSpans",Rr="_sentryRootSpan";function Tn(t,e){const n=t[Rr]||t;H(e,Rr,n),t[Xt]?t[Xt].add(e):H(t,Xt,new Set([e]))}function ef(t,e){t[Xt]&&t[Xt].delete(e)}function In(t){const e=new Set;function n(r){if(!e.has(r)&&Ht(r)){e.add(r);const s=r[Xt]?Array.from(r[Xt]):[];for(const o of s)n(o)}}return n(t),Array.from(e)}const j=Ar;function Ar(t){return t[Rr]||t}function Z(){const t=xt(),e=Ae(t);return e.getActiveSpan?e.getActiveSpan():xn(C())}function wr(){qs||(oe(()=>{}),qs=!0)}let Gs=!1;function nf(){if(Gs)return;function t(){const e=Z(),n=e&&j(e);if(n){const r="internal_error";S&&g.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:F,message:r})}}Gs=!0,gi(t),hi(t)}function et(t){var n;if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=t||((n=w())==null?void 0:n.getOptions());return!!e&&(e.tracesSampleRate!=null||!!e.tracesSampler)}function Vs(t){g.log(`Ignoring span ${t.op} - ${t.description} because it matches \`ignoreSpans\`.`)}function Ve(t,e){if(!(e!=null&&e.length))return!1;
13for(const n of e){if(of(n)){if(t.description&&Be(t.description,n))return S&&Vs(t),!0;continue}const r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;const s=n.name?t.description&&Be(t.description,n.name):!0,o=n.op?t.op&&Be(t.op,n.op):!0,i=n.attributes?Object.entries(n.attributes).every(([c,a])=>{var u;return rf((u=t.attributes)==null?void 0:u[c],a)}):!0;if(s&&o&&i)return S&&Vs(t),!0}return!1}function rf(t,e){return typeof t=="string"&&(typeof e=="string"||e instanceof RegExp)?Be(t,e):Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((n,r)=>n===e[r]):t===e}function sf(t,e){const n=e.parent_span_id,r=e.span_id;if(n)for(const s of t)s.parent_span_id===r&&(s.parent_span_id=n)}function of(t){return typeof t=="string"||t instanceof RegExp}const Yi=Symbol.for("sentry.nonRecordingSpan");class re{constructor(e={}){this._traceId=e.traceId||It(),this._spanId=e.spanId||bt(),this.dropReason=e.dropReason,H(this,Yi,!0)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Hi}}end(e){}setAttribute(e,n){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,n,r){return this}addLink(e){return this}addLinks(e){return this}recordException(e,n){}}function _e(t){return!!t&&t[Yi]===!0}const rs="production",Ji="_frozenDsc";function Ys(t,e){H(t,Ji,e)}function Xi(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},s={environment:n.environment||rs,release:n.release,public_key:r,trace_id:t,org_id:zu(e)};return e.emit("createDsc",s),s}function ss(t,e){const n=e.getPropagationContext();return n.dsc||Xi(n.traceId,t)}function Ne(t){var _;const e=w();if(!e)return{};const n=j(t),r=T(n),s=r.data,o=n.spanContext().traceState,i=(o==null?void 0:o.get("sentry.sample_rate"))??s[ts]??s[Ci];function c(b){return(typeof i=="number"||typeof i=="string")&&(b.sample_rate=`${i}`),b}const a=n[Ji];if(a)return c(a);const u=_e(n),f=u&&n.dropReason==="ignored";if(u&&(!et(e.getOptions())||f)){const b=le(n).scope;if(b){const L={...ss(e,b)};return f&&(L.sampled="false"),c(L)}}const d=o==null?void 0:o.get("sentry.dsc"),p=d&&xi(d);if(p)return c(p);const l=Xi(t.spanContext().traceId,e),m=s[U]??s["sentry.segment.name.source"],h=r.description;return m!=="url"&&h&&(l.transaction=h),et()&&(l.sampled=String(Ht(n)),l.sample_rand=(o==null?void 0:o.get("sentry.sample_rand"))??((_=le(n).scope)==null?void 0:_.getPropagationContext().sampleRand.toString())),c(l),e.emit("createDsc",l,n),l}function Ki(t){return!!t&&typeof t=="function"&&"_streamed"in t&&!!t._streamed}function ae(t,e=[]){return[t,e]}function Js(t,e){const[n,r]=t;return[n,[...r,e]]}function Nr(t,e){const n=t[1];for(const r of n){const s=r[0].type;if(e(r,s))return!0}return!1}function af(t,e){return Nr(t,(n,r)=>e.includes(r))}function Cr(t){const e=Ze(I);return e.encodePolyfill?e.encodePolyfill(t):new TextEncoder().encode(t)}function cf(t){const[e,n]=t;let r=JSON.stringify(e);function s(o){typeof r=="string"?r=typeof o=="string"?r+o:[Cr(r),o]:r.push(typeof o=="string"?Cr(o):o)}for(const o of n){const[i,c]=o;if(s(`
14${JSON.stringify(i)}
15`),typeof c=="string"||c instanceof Uint8Array)s(c);else{let a;try{a=JSON.stringify(c)}catch{a=JSON.stringify(St(c))}s(a)}}return typeof r=="string"?r:uf(r)}function uf(t){const e=t.reduce((s,o)=>s+o.length,0),n=new Uint8Array(e);let r=0;for(const s of t)n.set(s,r),r+=s.length;return n}function ff(t){return[{type:"span"},t]}function df(t){const e=typeof t.data=="string"?Cr(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}const Qi={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function lf(t){return t in Qi}function Xs(t){return lf(t)?Qi[t]:t}function Zi(t){if(!(t!=null&&t.sdk))return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function pf(t,e,n,r){var o;const s=(o=t.sdkProcessingMetadata)==null?void 0:o.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date($t()).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:we(r)},...s&&{trace:s}}}function mf(t,e){var r,s,o,i;if(!e)return t;const n=t.sdk||{};return t.sdk={...n,name:n.name||e.name,version:n.version||e.version,integrations:[...((r=t.sdk)==null?void 0:r.integrations)||[],...e.integrations||[]],packages:[...((s=t.sdk)==null?void 0:s.packages)||[],...e.packages||[]],settings:(o=t.sdk)!=null&&o.settings||e.settings?{...(i=t.sdk)==null?void 0:i.settings,...e.settings}:void 0},t}function gf(t,e,n,r){const s=Zi(n),o={sent_at:new Date($t()).toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:we(e)}},i="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return ae(o,[i])}function hf(t,e,n,r){const s=Zi(n),o=t.type&&t.type!=="replay_event"?t.type:"event";mf(t,n==null?void 0:n.sdk);const i=pf(t,s,r,e);return delete t.sdkProcessingMetadata,ae(i,[[{type:o},t]])}function _f(t,e){function n(l){return!!l.trace_id&&!!l.public_key}const r=Ne(t[0]),s=e==null?void 0:e.getDsn(),o=e==null?void 0:e.getOptions().tunnel,i={sent_at:new Date($t()).toISOString(),...n(r)&&{trace:r},...!!o&&s&&{dsn:we(s)}},{beforeSendSpan:c,ignoreSpans:a}=(e==null?void 0:e.getOptions())||{},u=a!=null&&a.length?t.filter(l=>{const m=T(l);return!Ve({description:m.description,op:m.op,attributes:m.data},a)}):t,f=t.length-u.length;f&&(e==null||e.recordDroppedEvent("before_send","span",f));const d=c?l=>{const m=T(l),h=Ki(c)?m:c(m);return h||(wr(),m)}:T,p=[];for(const l of u){const m=d(l);m&&p.push(ff(m))}return ae(i,p)}function Sf(t){if(!S)return;const{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:r}=T(t),{spanId:s}=t.spanContext(),o=Ht(t),i=j(t),c=i===t,a=`[Tracing] Starting ${o?"sampled":"unsampled"} ${c?"root ":""}span`,u=[`op: ${n}`,`name: ${e}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!c){const{op:f,description:d}=T(i);u.push(`root ID: ${i.spanContext().spanId}`),f&&u.push(`root op: ${f}`),d&&u.push(`root description: ${d}`)}g.log(`${a}
16  ${u.join(`
17  `)}`)}function yf(t){if(!S)return;const{description:e="< unknown name >",op:n="< unknown op >"}=T(t),{spanId:r}=t.spanContext(),o=j(t)===t,i=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${e}" with ID ${r}`;g.log(i)}function ta(t,e,n,r=Z()){const s=r&&j(r);s&&(S&&g.log(`[Measurement] Setting measurement on root span: ${t} = ${e} ${n}`),s.addEvent(t,{[sn]:e,[rn]:n}))}function Ks(t){if(!t||t.length===0)return;const e={};return t.forEach(n=>{const r=n.attributes||{},s=r[rn],o=r[sn];typeof s=="string"&&typeof o=="number"&&(e[n.name]={value:o,unit:s})}),e}function Qs(){return Ze(xt()).segmentSpanCaptureStrategy}function gt(t){return t.getOptions().traceLifecycle==="stream"}const Zs=1e3;class Vn{constructor(e={}){this._traceId=e.traceId||It(),this._spanId=e.spanId||bt(),this._startTime=e.startTimestamp||$(),this._links=e.links,this._attributes={},this.setAttributes({[O]:"manual",[Y]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}
17addLink(e){return this._frozen?this:(this._links?this._links.push(e):this._links=[e],this)}addLinks(e){return this._frozen?this:(this._links?this._links.push(...e):this._links=e,this)}recordException(e,n){}spanContext(){const{_spanId:e,_traceId:n,_sampled:r}=this;return{spanId:e,traceId:n,traceFlags:r?Gn:Hi}}setAttribute(e,n){return this._frozen?this:(n===void 0?delete this._attributes[e]:this._attributes[e]=n,e===U&&n!==void 0&&Us(this)&&xu(this),this)}setAttributes(e){return Object.keys(e).forEach(n=>this.setAttribute(n,e[n])),this}updateStartTime(e){this._frozen||(this._startTime=vt(e))}setStatus(e){return this._frozen?this:(this._status=e,this)}updateName(e){return this._frozen?this:(this._name=e,Us(this)||this.setAttribute(U,"custom"),this)}end(e){if(this._endTime){this._frozen=js(this);return}this._endTime=vt(e),yf(this),this._onSpanEnded(),this._frozen=js(this)}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[Y],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Gi(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[O],profile_id:this._attributes[es],exclusive_time:this._attributes[Ft],measurements:Ks(this._events),is_segment:this._isStandaloneSpan&&j(this)===this||void 0,segment_id:this._isStandaloneSpan?j(this).spanContext().spanId:void 0,links:Bi(this._links)}}getStreamedSpanJSON(){return{name:this._name??"",span_id:this._spanId,trace_id:this._traceId,parent_span_id:this._parentSpanId,start_timestamp:this._startTime,end_timestamp:this._endTime??this._startTime,is_segment:this._isStandaloneSpan||this===j(this),status:ns(this._status),attributes:Vi(this._attributes,this._status),links:Ui(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){if(this._frozen)return this;S&&g.log("[Tracing] Adding an event to span:",e);const s=to(n)?n:r||$(),o=to(n)?{}:n||{},i={name:e,time:vt(s),attributes:o};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=w();e&&(e.emit("spanEnd",this),this._isStandaloneSpan||e.emit("afterSpanEnd",this));const n=j(this),r=this._isStandaloneSpan||this===n;if(this._isStandaloneSpan){this._sampled?bf(_f([this],e)):(S&&g.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}if(!r){const i=Qs();if(i){const c=le(this).scope||C();i.onChildSpanEnded(this,n,a=>this._convertSpanToTransaction(a),c)}return}if(e&&gt(e)){e.emit("afterSegmentSpanEnd",this);return}const s=le(this).scope||C(),o=Qs();if(o)o.onSegmentSpanEnded(i=>this._convertSpanToTransaction(i),s);else{const i=this._convertSpanToTransaction();i&&s.captureEvent(i)}}_convertSpanToTransaction(e={}){var d,p,l,m;if(!eo(T(this)))return;this._name||(S&&g.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:n,isolationScope:r}=le(this),s=(d=n==null?void 0:n.getScopeData().sdkProcessingMetadata)==null?void 0:d.normalizedRequest;if(this._sampled!==!0)return;(p=e.onSpanCaptured)==null||p.call(e,this);const o=[];for(const h of In(this)){if(h===this||Ef(h)||(l=e.isSpanAlreadyCaptured)!=null&&l.call(e,h))continue;const _=T(h);eo(_)&&((m=e.onSpanCaptured)==null||m.call(e,h),o.push(_))}const i=this._attributes[U];delete this._attributes[Bs];let c=!1;o.forEach(h=>{var _;delete h.data[Bs],(_=h.op)!=null&&_.startsWith("gen_ai.")&&(c=!0)});const a={contexts:{trace:Xu(this)},spans:o.length>Zs?o.sort((h,_)=>h.start_timestamp-_.start_timestamp).slice(0,Zs):o,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:n,capturedSpanIsolationScope:r,dynamicSamplingContext:Ne(this),hasGenAiSpans:c},request:s,...i&&{transaction_info:{source:i}}},u=Ks(this._events);return u&&Object.keys(u).length&&(S&&g.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),a.measurements=u),a}}function to(t){return t&&typeof t=="number"||t instanceof Date||Array.isArray(t)}function eo(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}function Ef(t){return t instanceof Vn&&t.isStandaloneSpan()}function bf(t){const e=w();if(!e)return;const n=t[1];if(!n||n.length===0){e.recordDroppedEvent("before_send","span");return}e.sendEnvelope(t)}function vf(t,e,n){if(!et(t))return[!1];let r,s;typeof t.tracesSampler=="function"?(s=t.tracesSampler({...e,inheritOrSampleWith:c=>typeof e.parentSampleRate=="number"?e.parentSampleRate:typeof e.parentSampled=="boolean"?Number(e.parentSampled):c}),r=!0):e.parentSampled!==void 0?s=e.parentSampled:typeof t.tracesSampleRate<"u"&&(s=t.tracesSampleRate,r=!0);const o=Ge(s);if(o===void 0)return S&&g.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!o)return S&&g.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,o,r];const i=n<o;return i||S&&g.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[i,o,r]}
17const Tf="__SENTRY_SUPPRESS_TRACING__";function Bt(t){const e=is();return e.startInactiveSpan?e.startInactiveSpan(t):If(t)}function If(t){const e=wf(t),{forceTransaction:n,parentSpan:r}=t;return(t.scope?o=>Zr(t.scope,o):r!==void 0?o=>ea(r,o):o=>o())(()=>{const o=C(),i=Cf(o,r),c=w();return t.onlyIfParent&&!i?Rf(o,c):Af({parentSpan:i,spanArguments:e,forceTransaction:n,scope:o})})}function ea(t,e){const n=is();return n.withActiveSpan?n.withActiveSpan(t,e):Zr(r=>(qe(r,t||void 0),e(r)))}function os(t=C()){const e=is();return e.isTracingSuppressed?e.isTracingSuppressed(t):t.getScopeData().sdkProcessingMetadata[Tf]===!0}function Rf(t,e){e==null||e.recordDroppedEvent("no_parent_span","span");const n=new re({traceId:t.getPropagationContext().traceId});return he(n,t,Q()),n}function Af({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){const s=Q();if(!et()){const c={...s.getPropagationContext(),...r.getPropagationContext()},a=t?t.spanContext().traceId:c.traceId,u=new re({traceId:a});return t&&!n&&Tn(t,u),he(u,r,s),u}const o=w();if(Pf(o,e)){os(r)||o==null||o.recordDroppedEvent("ignored","span");const c=new re({dropReason:"ignored",traceId:(t==null?void 0:t.spanContext().traceId)??r.getPropagationContext().traceId});return t&&!n&&Tn(t,c),he(c,r,s),c}let i;if(t&&!n)i=Nf(t,r,e,s),Tn(t,i);else if(t){const c=Ne(t),{traceId:a,spanId:u}=t.spanContext(),f=Ht(t);i=no({traceId:a,parentSpanId:u,...e},r,s,f),Ys(i,c)}else{const{traceId:c,dsc:a,parentSpanId:u,sampled:f}={...s.getPropagationContext(),...r.getPropagationContext()};i=no({traceId:c,parentSpanId:u,...e},r,s,f),a&&Ys(i,a)}return Sf(i),i}function wf(t){const n={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const r={...n};return r.startTimestamp=vt(t.startTime),delete r.startTime,r}return n}function is(){const t=xt();return Ae(t)}function no(t,e,n,r){var _;const s=w(),o=(s==null?void 0:s.getOptions())||{},{name:i=""}=t,c={spanAttributes:{...t.attributes},spanName:i,parentSampled:r};s==null||s.emit("beforeSampling",c,{decision:!1});const a=c.parentSampled??r,u=c.spanAttributes,f=e.getPropagationContext(),d=os(e),[p,l,m]=d?[!1]:vf(o,{name:i,parentSampled:a,attributes:u,normalizedRequest:n.getScopeData().sdkProcessingMetadata.normalizedRequest,parentSampleRate:Ge((_=f.dsc)==null?void 0:_.sample_rate)},f.sampleRand),h=new Vn({...t,attributes:{[U]:"custom",[ts]:l!==void 0&&m?l:void 0,...u},sampled:p});return!p&&s&&!d&&(S&&g.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),s.recordDroppedEvent("sample_rate",gt(s)?"span":"transaction")),he(h,e,n),s&&s.emit("spanStart",h),h}function Nf(t,e,n,r){const{spanId:s,traceId:o}=t.spanContext(),i=os(e),c=i?!1:Ht(t),a=c?new Vn({...n,parentSpanId:s,traceId:o,sampled:c}):new re({traceId:o});Tn(t,a),he(a,e,r);const u=w();return u&&(gt(u)&&_e(a)&&(_e(t)&&t.dropReason?(a.dropReason=t.dropReason,u.recordDroppedEvent(t.dropReason,"span")):i||(a.dropReason="sample_rate",u.recordDroppedEvent("sample_rate","span"))),u.emit("spanStart",a),n.endTimestamp&&(u.emit("spanEnd",a),u.emit("afterSpanEnd",a))),a}function Cf(t,e){if(e)return e;if(e===null)return;const n=xn(t);if(!n)return;const r=w();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?j(n):n}function Pf(t,e){var r;const n=t==null?void 0:t.getOptions().ignoreSpans;return!t||!gt(t)||!(n!=null&&n.length)?!1:Ve({description:e.name||"",op:((r=e.attributes)==null?void 0:r[Y])||e.op,attributes:e.attributes},n)}function na(t){return _e(t)&&t.dropReason==="ignored"}const Rn={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},kf="heartbeatFailed",Of="idleTimeout",Lf="finalTimeout",xf="externalFinish";function ra(t,e={}){const n=new Map;let r=!1,s,o=xf,i=!e.disableAutoFinish;const c=[],{idleTimeout:a=Rn.idleTimeout,finalTimeout:u=Rn.finalTimeout,childSpanTimeout:f=Rn.childSpanTimeout,beforeSpanEnd:d,trimIdleSpanEndTimestamp:p=!0}=e,l=w(),m=C();if(!l||!et()){const v=new re({traceId:m.getPropagationContext().traceId});return he(v,m,Q()),v}const h=Z(),_=Df(t);_.end=new Proxy(_.end,{apply(v,z,xe){if(d&&d(_),_e(z))return;const[Ut,...jt]=xe,De=Ut||$(),lt=vt(De),D=In(_).filter(N=>N!==_),ht=T(_);if(!D.length||!p)return at(lt),Reflect.apply(v,z,[lt,...jt]);const At=l.getOptions().ignoreSpans,A=D==null?void 0:D.reduce((N,k
17)=>{const B=T(k);return!B.timestamp||At&&Ve({description:B.description,op:B.op,attributes:B.data},At)?N:N?Math.max(N,B.timestamp):B.timestamp},void 0),M=ht.start_timestamp,rt=Math.min(M?M+u/1e3:1/0,Math.max(M||-1/0,Math.min(lt,A||1/0)));return at(rt),Reflect.apply(v,z,[rt,...jt])}});function b(){s&&(clearTimeout(s),s=void 0)}function L(v){b(),s=setTimeout(()=>{!r&&n.size===0&&i&&(o=Of,_.end(v))},a)}function G(v){s=setTimeout(()=>{!r&&i&&(o=kf,_.end(v))},f)}function V(v){b(),n.set(v,!0);const z=$();G(z+f/1e3)}function x(v){if(n.has(v)&&n.delete(v),n.size===0){const z=$();L(z+a/1e3)}}function at(v){r=!0,n.clear(),c.forEach(D=>D()),qe(m,h);const z=T(_),{start_timestamp:xe}=z;if(!xe)return;z.data[ze]||_.setAttribute(ze,o);const jt=z.status;(!jt||jt==="unknown")&&_.setStatus({code:zn}),g.log(`[Tracing] Idle span "${z.op}" finished`);const De=In(_).filter(D=>D!==_);let lt=0;De.forEach(D=>{D.isRecording()&&(D.setStatus({code:F,message:"cancelled"}),D.end(v),S&&g.log("[Tracing] Cancelling span since span ended early",JSON.stringify(D,void 0,2)));const ht=T(D),{timestamp:At=0,start_timestamp:A=0}=ht,M=A<=v,rt=(u+a)/1e3,N=At-A<=rt;if(S){const k=JSON.stringify(D,void 0,2);M?N||g.log("[Tracing] Discarding span since it finished after idle span final timeout",k):g.log("[Tracing] Discarding span since it happened after idle span was finished",k)}(!N||!M)&&(ef(_,D),lt++)}),lt>0&&_.setAttribute("sentry.idle_span_discarded_spans",lt)}return c.push(l.on("spanStart",v=>{if(r||v===_||T(v).timestamp||v instanceof Vn&&v.isStandaloneSpan())return;In(_).includes(v)&&V(v.spanContext().spanId)})),c.push(l.on("spanEnd",v=>{r||x(v.spanContext().spanId)})),c.push(l.on("idleSpanEnableAutoFinish",v=>{v===_&&(i=!0,L(),n.size&&G())})),e.disableAutoFinish||L(),setTimeout(()=>{r||(_.setStatus({code:F,message:"deadline_exceeded"}),o=Lf,_.end())},u),_}function Df(t){const e=Bt(t);return qe(C(),e),S&&g.log("[Tracing] Started span is an idle span"),e}function Mf(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=e;$f(t,e),r&&Bf(t,r),Uf(t,n),Ff(t,s),Hf(t,o)}function ro(t,e){const{extra:n,tags:r,attributes:s,user:o,contexts:i,level:c,sdkProcessingMetadata:a,breadcrumbs:u,fingerprint:f,eventProcessors:d,attachments:p,propagationContext:l,transactionName:m,span:h}=e;Fe(t,"extra",n),Fe(t,"tags",r),Fe(t,"attributes",s),Fe(t,"user",o),Fe(t,"contexts",i),t.sdkProcessingMetadata=nn(t.sdkProcessingMetadata,a,2),c&&(t.level=c),m&&(t.transactionName=m),h&&(t.span=h),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),f.length&&(t.fingerprint=[...t.fingerprint,...f]),d.length&&(t.eventProcessors=[...t.eventProcessors,...d]),p.length&&(t.attachments=[...t.attachments,...p]),t.propagationContext={...t.propagationContext,...l}}function Fe(t,e,n){t[e]=nn(t[e],n,1)}function sa(t,e){const n=Ru().getScopeData();return t&&ro(n,t.getScopeData()),e&&ro(n,e.getScopeData()),n}function $f(t,e){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:c}=e;Object.keys(n).length&&(t.extra={...n,...t.extra}),Object.keys(r).length&&(t.tags={...r,...t.tags}),Object.keys(s).length&&(t.user={...s,...t.user}),Object.keys(o).length&&(t.contexts={...o,...t.contexts}),i&&(t.level=i),c&&t.type!=="transaction"&&(t.transaction=c)}function Ff(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function Hf(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function Bf(t,e){t.contexts={trace:Ku(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Ne(e),...t.sdkProcessingMetadata};const n=j(e),r=T(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function Uf(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint.length||delete t.fingerprint}const oa="http.url",ia="sentry.segment.name",aa="sentry.transaction",Ce="url.full",jf="url.path",Mn="url.template";function ca(t,e){const n=t.attributes??(t.attributes={});Object.entries(e).forEach(([r,s])=>{s!=null&&!(r in n)&&(n[r]=s)})}const fr=0,so=1,oo=2;function on(t){return new Ye(e=>{e(t)})}function ua(t){return new Ye((e,n)=>{n(t)})}class Ye{constructor(e){this._state=fr,this._handlers=[],this._runExecutor(e)}then(e,n){return new Ye((r,s)=>{this._handlers.push([!1,o=>{if(!e)r(o);else try{r(e(o))}catch(i){s(i)}},o=>{if(!n)s(o);else try{r(n(o))}catch(i){s(i)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new Ye((n,r)=>{let s,o;return this.then(i=>{o=!1,s=i,e&&e()},i=>{o=!0,s=i,e&&e()}).then(()=>
17{if(o){r(s);return}n(s)})})}_executeHandlers(){if(this._state===fr)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===so&&n[1](this._value),this._state===oo&&n[2](this._value),n[0]=!0)})}_runExecutor(e){const n=(o,i)=>{if(this._state===fr){if(tn(i)){i.then(r,s);return}this._state=o,this._value=i,this._executeHandlers()}},r=o=>{n(so,o)},s=o=>{n(oo,o)};try{e(r,s)}catch(o){s(o)}}}function Wf(t,e,n,r=0){try{const s=Pr(e,n,t,r);return tn(s)?s:on(s)}catch(s){return ua(s)}}function Pr(t,e,n,r){const s=n[r];if(!t||!s)return t;const o=s({...t},e);return S&&o===null&&g.log(`Event processor "${s.id||"?"}" dropped event`),tn(o)?o.then(i=>Pr(i,e,n,r+1)):Pr(o,e,n,r+1)}let _t,io,ao,wt;function qf(t){const e=I._sentryDebugIds,n=I._debugIds;if(!e&&!n)return{};const r=e?Object.keys(e):[],s=n?Object.keys(n):[];if(wt&&r.length===io&&s.length===ao)return wt;io=r.length,ao=s.length,wt={},_t||(_t={});const o=(i,c)=>{for(const a of i){const u=c[a],f=_t==null?void 0:_t[a];if(f&&wt&&u)wt[f[0]]=u,_t&&(_t[a]=[f[0],u]);else if(u){const d=t(a);for(let p=d.length-1;p>=0;p--){const l=d[p],m=l==null?void 0:l.filename;if(m&&wt&&_t){wt[m]=u,_t[a]=[m,u];break}}}}};return e&&o(r,e),n&&o(s,n),wt}function zf(t,e,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:c=1e3}=t,a={...e,event_id:e.event_id||n.event_id||it(),timestamp:e.timestamp||ie()},u=n.integrations||t.integrations.map(b=>b.name);Gf(a,t),Jf(a,u),s&&s.emit("applyFrameMetadata",e),e.type===void 0&&Vf(a,t.stackParser);const f=Kf(r,n.captureContext);n.mechanism&&Jt(a,n.mechanism);const d=s?s.getEventProcessors():[],p=sa(o,f),l=[...n.attachments||[],...p.attachments];l.length&&(n.attachments=l),Mf(a,p);const m=[...d,...p.eventProcessors];return(n.data&&n.data.__sentry__===!0?on(a):Wf(m,a,n)).then(b=>(b&&Yf(b),typeof i=="number"&&i>0?Xf(b,i,c):b))}function Gf(t,e){var c,a;const{environment:n,release:r,dist:s,maxValueLength:o}=e;t.environment=t.environment||n||rs,!t.release&&r&&(t.release=r),!t.dist&&s&&(t.dist=s);const i=t.request;i!=null&&i.url&&o&&(i.url=vr(i.url,o)),o&&((a=(c=t.exception)==null?void 0:c.values)==null||a.forEach(u=>{u.value&&(u.value=vr(u.value,o))}))}function Vf(t,e){var r,s;const n=qf(e);(s=(r=t.exception)==null?void 0:r.values)==null||s.forEach(o=>{var i,c;(c=(i=o.stacktrace)==null?void 0:i.frames)==null||c.forEach(a=>{a.filename&&(a.debug_id=n[a.filename])})})}function Yf(t){var r,s;const e={};if((s=(r=t.exception)==null?void 0:r.values)==null||s.forEach(o=>{var i,c;(c=(i=o.stacktrace)==null?void 0:i.frames)==null||c.forEach(a=>{a.debug_id&&(a.abs_path?e[a.abs_path]=a.debug_id:a.filename&&(e[a.filename]=a.debug_id),delete a.debug_id)})}),Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.entries(e).forEach(([o,i])=>{n.push({type:"sourcemap",code_file:o,debug_id:i})})}function Jf(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function Xf(t,e,n){var s,o;if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(i=>({...i,...i.data&&{data:St(i.data,e,n)}}))},...t.user&&{user:St(t.user,e,n)},...t.contexts&&{contexts:St(t.contexts,e,n)},...t.extra&&{extra:St(t.extra,e,n)}};return(s=t.contexts)!=null&&s.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=St(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(i=>({...i,...i.data&&{data:St(i.data,e,n)}}))),(o=t.contexts)!=null&&o.flags&&r.contexts&&(r.contexts.flags=St(t.contexts.flags,3,n)),r}function Kf(t,e){if(!e)return t;const n=t?t.clone():new mt;return n.update(e),n}function Qf(t){if(t)return Zf(t)?{captureContext:t}:ed(t)?{captureContext:t}:t}function Zf(t){return t instanceof mt||typeof t=="function"}const td=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function ed(t){return Object.keys(t).some(e=>td.includes(e))}function fa(t,e){return C().captureException(t,Qf(e))}function da(t,e){return C().captureEvent(t,e)}function nd(t,e){Q().setContext(t,e)}function Gh(t,e){Q().setTag(t,e)}function Vh(t){Q().setUser(t)}function rd(){const t=w();return(t==null?void 0:t.getOptions().enabled)!==!1&&!!(t!=null&&t.getTransport())}function co(t){const e=Q(),{user:n}=sa(e,C()),{userAgent:r}=I.navigator||{},s=fu({user:n,...r&&{userAgent:r},...t}),o=e.getSession();return(o==null?void 0:o.status)==="ok"&&me(o,{status:"exited"}),la(),e.setSession(s),s}function la(){const t=Q(),n=C().getSession()||t.getSession();n&&du(n),pa(),t.setSession()}function pa(){const t=Q(),e=w(),n=t.getSession();n&&e&&e.captureSession(n)}function dr(t=!1){if(t){la();return}pa()}function ma(t){return typeof t=="object"&&typeof t.unref=="function"&&t.unref(),t}const sd="7";function od(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function id(t){return`${od(t)}${t.projectId}/envelope/`}function ad(t,e){const n={sentry_version:sd};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}function cd(t,e,n){return e||`${id(t)}?${ad(t,n)}`}const uo=[];function ud(t){const e={};return t.forEach(n=>{const{name:r}=n,s=e[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(e[r]=n)}),Object.values(e)}function fd(t){const e=t.defaultIntegrations||[],n=t.integrations;e.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...e,...n];else if(typeof n=="function"){const s=n(e);r=Array.isArray(s)?s:[s]}else r=e;return ud(r)}function dd(t,e){const n={};return e.forEach(r=>{r!=null&&r.beforeSetup&&r.beforeSetup(t)}),e.forEach(r=>{r&&ga(t,r,n)}),n}function fo(t,e){for(const n of e)n!=null&&n.afterAllSetup&&n.afterAllSetup(t)}function ga(t,e,n){if(n[e.name]){S&&g.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,!uo.includes(e.name)&&typeof e.setupOnce=="function"&&(e.setupOnce(),uo.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(s,o)=>r(s,o,t))}if(typeof e.processEvent=="function"){const r=e.processEvent.bind(e),s=Object.assign((o,i)=>r(o,i,t),{id:e.name});t.addEventProcessor(s)}["processSpan","processSegmentSpan"].forEach(r=>{const s=e[r];typeof s=="function"&&t.on(r,o=>s.call(e,o,t))}),S&&g.log(`Integration installed: ${e.name}`)}function ld(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function pd(){/*! __SENTRY_SDK_SOURCE__ */return"npm"}function md(){return!ld()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Yn(){return typeof window<"u"&&(!md()||gd())}function gd(){const t=I.process;return(t==null?void 0:t.type)==="renderer"}function hd(t,e){const n=e?"auto":"never";return[{type:"log",item_count:t.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...Yn()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:t}]}function _d(t,e,n,r,s){const o={};return e!=null&&e.sdk&&(o.sdk={name:e.sdk.name,version:e.sdk.version}
17),n&&r&&(o.dsn=we(r)),ae(o,[hd(t,s)])}function Sd(t,e){const n=e??yd(t)??[];if(n.length===0)return;const r=t.getOptions(),s=_d(n,r._metadata,r.tunnel,t.getDsn(),t.getDataCollectionOptions().userInfo);ha().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(s)}function yd(t){return ha().get(t)}function ha(){return Ie("clientToLogBufferMap",()=>new WeakMap)}function Ed(t,e){const n=e?"auto":"never";return[{type:"trace_metric",item_count:t.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{version:2,...Yn()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:t}]}function bd(t,e,n,r,s){const o={};return e!=null&&e.sdk&&(o.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(o.dsn=we(r)),ae(o,[Ed(t,s)])}function vd(t,e){const n=e??Td(t)??[];if(n.length===0)return;const r=t.getOptions(),s=bd(n,r._metadata,r.tunnel,t.getDsn(),t.getDataCollectionOptions().userInfo);_a().set(t,[]),t.emit("flushMetrics"),t.sendEnvelope(s)}function Td(t){return _a().get(t)}function _a(){return Ie("clientToMetricBufferMap",()=>new WeakMap)}function Id(t){const e={trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,name:t.description||"",start_timestamp:t.start_timestamp,end_timestamp:t.timestamp||t.start_timestamp,status:!t.status||t.status==="ok"||t.status==="cancelled"?"ok":"error",is_segment:!1,attributes:{...t.data},links:t.links};return tf(e)}function Rd(t,e){var o,i,c;if(t.type!=="transaction"||!((o=t.spans)!=null&&o.length)||!((i=t.sdkProcessingMetadata)!=null&&i.hasGenAiSpans)||e.getOptions().streamGenAiSpans===!1||gt(e))return;const n=[],r=[];for(const a of t.spans)(c=a.op)!=null&&c.startsWith("gen_ai.")?n.push(Id(a)):r.push(a);if(n.length===0)return;t.spans=r;const s=e.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...Yn()&&{ingest_settings:{infer_ip:s,infer_user_agent:s}},items:n}]}const as=Symbol.for("SentryBufferFullError");function cs(t=100){const e=new Set;function n(){return e.size<t}function r(i){e.delete(i)}function s(i){if(!n())return ua(as);const c=i();return e.add(c),c.then(()=>r(c),()=>r(c)),c}function o(i){if(!e.size)return on(!0);const c=Promise.allSettled(Array.from(e)).then(()=>!0);if(!i)return c;const a=[c,new Promise(u=>ma(setTimeout(()=>u(!1),i)))];return Promise.race(a)}return{get $(){return Array.from(e)},add:s,drain:o}}const Ad=60*1e3;function wd(t,e=$t()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${t}`);return isNaN(r)?Ad:r-e}function Nd(t,e){return t[e]||t.all||0}function Cd(t,e,n=$t()){return Nd(t,e)>n}function Pd(t,{statusCode:e,headers:n},r=$t()){const s={...t},o=n==null?void 0:n["x-sentry-rate-limits"],i=n==null?void 0:n["retry-after"];if(o)for(const c of o.trim().split(",")){const[a,u,,,f]=c.split(":",5),d=parseInt(a,10),p=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+p;else for(const l of u.split(";"))l==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(s[l]=r+p):s[l]=r+p}else i?s.all=r+wd(i,r):e===429&&(s.all=r+60*1e3);return s}const Sa=64;function kd(t,e,n=cs(t.bufferSize||Sa)){let r={};const s=i=>n.drain(i);function o(i){const c=[];if(Nr(i,(d,p)=>{const l=Xs(p);Cd(r,l)?t.recordDroppedEvent("ratelimit_backoff",l):c.push(d)}),c.length===0)return Promise.resolve({});const a=ae(i[0],c),u=d=>{if(af(a,["client_report"])){S&&g.warn(`Dropping client report. Will not send outcomes (reason: ${d}).`);return}Nr(a,(p,l)=>{t.recordDroppedEvent(d,Xs(l))})},f=()=>e({body:cf(a)}).then(d=>d.statusCode===413?(S&&g.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),d):(S&&d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&g.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Pd(r,d),d),d=>{throw u("network_error"),S&&g.error("Encountered error running transport request:",d),d});return n.add(f).then(d=>d,d=>{if(d===as)return S&&g.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw d})}return{send:o,flush:s}}function Od(t,e,n){const r=[{type:"client_report"},{timestamp:ie(),discarded_events:t}];return ae(e?{dsn:e}:{},[r])}function ya(t){const e=[];t.message&&e.push(t.message);try{const n=t.exception.values[t.exception.values.length-1];n!=null&&n.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch{}return e}function Ld(t){var a;const{trace_id:e,parent_span_id:n,span_id:r,status:s,origin:o,data:i,op:c}=((a=t.contexts)==null?void 0:a.trace)??{};return{data:i??{},description:t.transaction,op:c,parent_span_id:n,span_id:r??"",start_timestamp:t.start_timestamp??0,status:s,timestamp:t.timestamp,trace_id:e??"",origin:o,profile_id:i==null?void 0:i[es],exclusive_time:i==null?void 0:i[Ft],measurements:t.measurements,is_segment:!0}}function xd(t){return{type:"transaction",timestamp:t.timestamp,start_timestamp:t.start_timestamp,transaction:t.description,contexts:{trace:{trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,op:t.op,status:t.status,origin:t.origin,data:{...t.data,...t.profile_id&&{[es]:t.profile_id},...t.exclusive_time&&{[Ft]:t.exclusive_time}}}},measurements:t.measurements}}const gn=["forwarded","-ip","remote-","via","-user"];function Dd(t){return t===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0}
17,databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:gn},httpHeaders:{request:{deny:gn},response:{deny:gn}},httpBodies:[],urlQueryParams:{deny:gn},graphQL:{document:!0,variables:!0},genAI:{inputs:!1,outputs:!1},databaseQueryData:!1,stackFrameVariables:!0,frameContextLines:7}}const Md={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},databaseQueryData:!0,stackFrameVariables:!0,frameContextLines:5};function $d(t){var r,s,o,i,c,a;const e=t.dataCollection!=null?Md:Dd(t.sendDefaultPii),n=t.dataCollection??{};return{userInfo:n.userInfo??e.userInfo,cookies:n.cookies??e.cookies,httpHeaders:{request:((r=n.httpHeaders)==null?void 0:r.request)??e.httpHeaders.request,response:((s=n.httpHeaders)==null?void 0:s.response)??e.httpHeaders.response},httpBodies:n.httpBodies??e.httpBodies,urlQueryParams:n.urlQueryParams??n.queryParams??e.urlQueryParams,graphQL:{document:((o=n.graphQL)==null?void 0:o.document)??e.graphQL.document,variables:((i=n.graphQL)==null?void 0:i.variables)??e.graphQL.variables},genAI:{inputs:((c=n.genAI)==null?void 0:c.inputs)??e.genAI.inputs,outputs:((a=n.genAI)==null?void 0:a.outputs)??e.genAI.outputs},databaseQueryData:n.databaseQueryData??e.databaseQueryData,stackFrameVariables:n.stackFrameVariables??e.stackFrame
17Variables,frameContextLines:n.frameContextLines??e.frameContextLines}}const lo="Not capturing exception because it's already been captured.",po="Discarded session because of missing or non-string release",Ea=Symbol.for("SentryInternalError"),ba=Symbol.for("SentryDoNotSendEventError"),Fd=5e3;function An(t){return{message:t,[Ea]:!0}}function lr(t){return{message:t,[ba]:!0}}function mo(t){return jn(t)&&Ea in t}function go(t){return jn(t)&&ba in t}function ho(t,e,n,r,s){let o=0,i,c=!1;t.on(n,()=>{o=0,clearTimeout(i),c=!1}),t.on(e,a=>{if(o+=r(a),o>=8e5)s(t);else if(!c){const u=t.getOptions()._flushInterval??Fd;u>0&&(c=!0,i=ma(setTimeout(()=>{s(t)},u)))}}),t.on("flush",()=>{s(t)})}class Hd{constructor(e){var r,s,o;if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=cs(((r=e.transportOptions)==null?void 0:r.bufferSize)??Sa),this._dataCollection=$d(e),e.dsn?this._dsn=Gu(e.dsn):S&&g.warn("No DSN provided, client will not send events."),this._dsn){const i=cd(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:i})}this._options.enableLogs=this._options.enableLogs??((s=this._options._experiments)==null?void 0:s.enableLogs),this._options.enableLogs&&ho(this,"afterCaptureLog","flushLogs",Wd,Sd),(this._options.enableMetrics??((o=this._options._experiments)==null?void 0:o.enableMetrics)??!0)&&ho(this,"afterCaptureMetric","flushMetrics",jd,vd)}captureException(e,n,r){const s=it();if(Ds(e))return S&&g.log(lo),s;const o={event_id:s,...n};return this._process(()=>this.eventFromException(e,o).then(i=>this._captureEvent(i,o,r)).then(i=>i),"error"),o.event_id}captureMessage(e,n,r,s){const o={event_id:it(),...r},i=Xr(e)?e:String(e),c=ne(e),a=c?this.eventFromMessage(i,n,o):this.eventFromException(e,o);return this._process(()=>a.then(u=>this._captureEvent(u,o,s)),c?"unknown":"error"),o.event_id}captureEvent(e,n,r){const s=it();if(n!=null&&n.originalException&&Ds(n.originalException))return S&&g.log(lo),s;const o={event_id:s,...n},i=e.sdkProcessingMetadata||{},c=i.capturedSpanScope,a=i.capturedSpanIsolationScope,u=_o(e.type);return this._process(()=>this._captureEvent(e,o,c||r,a),u),o.event_id}captureSession(e){this.sendSession(e),me(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getDataCollectionOptions(){return this._dataCollection}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(e){const n=this._transport;if(this.emit("flush"),!n)return!0;const r=await this._isClientDoneProcessing(e),s=await n.flush(e);return r&&s}async close(e){const n=await this.flush(e);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(e){const n=this._integrations[e.name];!n&&e.beforeSetup&&e.beforeSetup(this),ga(this,e,this._integrations),n||fo(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);const r=Rd(e,this);let s=hf(e,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])s=Js(s,df(o));r&&(s=Js(s,r)),this.sendEnvelope(s).then(o=>
17this.emit("afterSendEvent",e,o))}sendSession(e){const{release:n,environment:r=rs}=this._options;if("aggregates"in e){const o=e.attrs||{};if(!o.release&&!n){S&&g.warn(po);return}o.release=o.release||n,o.environment=o.environment||r,e.attrs=o}else{if(!e.release&&!n){S&&g.warn(po);return}e.release=e.release||n,e.environment=e.environment||r}this.emit("beforeSendSession",e);const s=gf(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(e,n,r=1){if(this._options.sendClientReports){const s=`${e}:${n}`;S&&g.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(e,n){const r=this._hooks[e]=this._hooks[e]||new Set,s=(...o)=>n(...o);return r.add(s),()=>{r.delete(s)}}emit(e,...n){const r=this._hooks[e];r&&r.forEach(s=>s(...n))}async sendEnvelope(e){if(this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(n){return S&&g.error("Error while sending envelope:",n),{}}return S&&g.error("Transport disabled"),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=dd(this,e),fo(this,e)}_updateSessionFromEvent(e,n){var a,u;let r=n.level==="fatal",s=!1;const o=(a=n.exception)==null?void 0:a.values;if(o){s=!0,r=!1;for(const f of o)if(((u=f.mechanism)==null?void 0:u.handled)===!1){r=!0;break}}const i=e.status==="ok";(i&&e.errors===0||i&&r)&&(me(e,{...r&&{status:"crashed"},errors:e.errors||Number(s||r)}),this.captureSession(e))}async _isClientDoneProcessing(e){let n=0;for(;!e||n<e;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,s){const o=this.getOptions(),i=this.getIntegrationNames();return!n.integrations&&i.length&&(n.integrations=i),this.emit("preprocessEvent",e,n),e.type||s.setLastEventId(e.event_id||n.event_id),zf(o,e,n,r,this,s).then(c=>{var u;if(c===null)return c;this.emit("postprocessEvent",c,n),c.contexts={trace:{...(u=c.contexts)==null?void 0:u.trace,...Au(r)},...c.contexts};const a=ss(this,r);return c.sdkProcessingMetadata={dynamicSamplingContext:a,...c.sdkProcessingMetadata},c})}_captureEvent(e,n={},r=C(),s=Q()){return S&&kr(e)&&g.log(`Captured error event \`${ya(e)[0]||"<unknown>"}\``),this._processEvent(e,n,r,s).then(o=>o.event_id,o=>{S&&(go(o)?g.log(o.message):mo(o)?g.warn(o.message):g.warn(o))})}_processEvent(e,n,r,s){const o=this.getOptions(),{sampleRate:i}=o,c=va(e),a=kr(e),f=`before send for type \`${e.type||"error"}\``,d=typeof i>"u"?void 0:Ge(i),p=_o(e.type);return this._prepareEvent(e,n,r,s).then(l=>{var _;if(l===null)throw this.recordDroppedEvent("event_processor",p),lr("An event processor returned `null`, will not send event.");if(((_=n.data)==null?void 0:_.__sentry__)===!0)return l;const h=Ud(this,o,l,n);return Bd(h,f)}).then(l=>{var _;if(l===null){if(this.recordDroppedEvent("before_send",p),c){const L=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",L)}throw lr(`${f} returned \`null\`, will not send event.`)}const m=r.getSession()||s.getSession();if(a&&m&&this._updateSessionFromEvent(m,l),a&&typeof d=="number"&&Pt()>d)throw this.recordDroppedEvent("sample_rate","error"),lr(`Discarding event because it's not included in the random sample (sampling rate = ${i})`);if(c){const b=((_=l.sdkProcessingMetadata)==null?void 0:_.spanCountBeforeProcessing)||0,L=l.spans?l.spans.length:0,G=b-L;G>0&&this.recordDroppedEvent("before_send","span",G)}const h=l.transaction_info;if(c&&h&&l.transaction!==e.transaction){const b="custom";l.transaction_info={...h,source:b}}return this.sendEvent(l,n),l}).then(null,l=>{throw go(l)||mo(l)?l:(this.captureException(l,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:l}),An(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
18Reason: ${l}`))})}_process(e,n){this._numProcessing++,this._promiseBuffer.add(e).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===as&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,r])=>{const[s,o]=n.split(":");return{reason:s,category:o,quantity:r}})}_flushOutcomes(){S&&g.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0){S&&g.log("No outcomes to send");return}if(!this._dsn){S&&g.log("No dsn provided, will not send outcomes");return}S&&g.log("Sending outcomes:",e);const n=Od(e,this._options.tunnel&&we(this._dsn));this.sendEnvelope(n)}}function _o(t){return t==="replay_event"?"replay":t||"error"}function Bd(t,e){const n=`${e} must return \`null\` or a valid event.`;if(tn(t))return t.then(r=>{if(!We(r)&&r!==null)throw An(n);return r},r=>{throw An(`${e} rejected with ${r}`)});if(!We(t)&&t!==null)throw An(n);return t}function Ud(t,e,n,r){const{beforeSend:s,beforeSendTransaction:o,ignoreSpans:i}=e,c=!Ki(e.beforeSendSpan)&&e.beforeSendSpan;let a=n;if(kr(a)&&s)return s(a,r);if(va(a)){if(c||i){const u=Ld(a);if(i!=null&&i.length&&Ve({description:u.description,op:u.op,attributes:u.data},i))return null;if(c){const f=c(u);f?a=nn(n,xd(f)):wr()}if(a.spans){const f=[],d=a.spans;for(const l of d){if(i!=null&&i.length&&Ve({description:l.description,op:l.op,attributes:l.data},i)){sf(d,l);continue}if(c){const m=c(l);
18m?f.push(m):(wr(),f.push(l))}else f.push(l)}const p=a.spans.length-f.length;p&&t.recordDroppedEvent("before_send","span",p),a.spans=f}}if(o){if(a.spans){const u=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return o(a,r)}}return a}function kr(t){return t.type===void 0}function va(t){return t.type==="transaction"}function jd(t){let e=0;return t.name&&(e+=t.name.length*2),e+=8,e+Ta(t.attributes)}function Wd(t){let e=0;return t.message&&(e+=t.message.length*2),e+Ta(t.attributes)}function Ta(t){if(!t)return 0;let e=0;return Object.values(t).forEach(n=>{Array.isArray(n)?e+=n.length*So(n[0]):ne(n)?e+=So(n):e+=100}),e}function So(t){return typeof t=="string"?t.length*2:typeof t=="number"?8:typeof t=="boolean"?4:0}function qd(t,e){e.debug===!0&&(S?g.enable():oe(()=>{})),C().update(e.initialScope);const r=new t(e);return zd(r),r.init(),r}function zd(t){C().setClient(t)}const Gd="thismessage:/";function us(t){return"isRelative"in t}function $n(t,e){const n=t.indexOf("://")<=0&&t.indexOf("//")!==0,r=n?Gd:void 0;try{if("canParse"in URL&&!URL.canParse(t,r))return;const s=new URL(t,r);return n?{isRelative:n,pathname:s.pathname,search:s.search,hash:s.hash}:s}catch{}}function Ia(t){if(us(t))return t.pathname;const e=new URL(t);return e.search="",e.hash="",["80","443"].includes(e.port)&&(e.port=""),e.password&&(e.password="%filtered%"),e.username&&(e.username="%filtered%"),e.toString()}function Kt(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function Vd(t){return t.split(/[?#]/,1)[0]}function ft(t,e=!0){if(t.startsWith("data:")){const n=t.match(/^data:([^;,]+)/),r=n?n[1]:"text/plain",s=t.includes(";base64,"),o=t.indexOf(",");let i="";if(e&&o!==-1){const c=t.slice(o+1);i=c.length>10?`${c.slice(0,10)}... [truncated]`:c}return`data:${r}${s?",base64":""}${i?`,${i}`:""}`}return t}function Yd(t){var e;"aggregates"in t?((e=t.attrs)==null?void 0:e.ip_address)===void 0&&(t.attrs={...t.attrs,ip_address:"{{auto}}"}):t.ipAddress===void 0&&(t.ipAddress="{{auto}}")}function Ra(t,e,n=[e],r="npm"){const s=(t._metadata=t._metadata||{}).sdk=t._metadata.sdk||{};s.name||(s.name=`sentry.javascript.${e}`,s.packages=n.map(o=>({name:`${r}:@sentry/${o}`,version:Yt})),s.version=Yt)}function Aa(t={}){const e=t.client||w();if(!rd()||!e)return{};const n=xt(),r=Ae(n);if(r.getTraceData)return r.getTraceData(t);const s=t.scope||C(),o=t.span||Z(),i=_e(o)&&!et(e.getOptions()),c=o&&!i?Qu(o):Jd(s),a=o?Ne(o):ss(e,s),u=Mu(a);if(!Mi.test(c))return g.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const d={"sentry-trace":c,baggage:u};return t.propagateTraceparent&&(d.traceparent=o&&!i?Zu(o):Xd(s)),d}function Jd(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return $i(e,r,n)}function Xd(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return Fi(e,r,n)}const Kd=100;function se(t,e){const n=w(),r=Q();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=Kd}=n.getOptions();if(o<=0)return;const c={timestamp:ie(),...t},a=s?oe(()=>s(c,e)):c;a!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",a,e),r.addBreadcrumb(a,o))}const Qd="FunctionToString",yo=new WeakMap,Zd=()=>({name:Qd,setupOnce(){const t=Function.prototype.toString;try{Function.prototype.toString=function(...e){const n=Qr(this);let r;try{yo.has(w())&&n!==void 0&&(r=n)}catch{}return t.apply(r??this,e)}}catch{}},setup(t){yo.set(t,!0)}}),tl=Zd,el=[/^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$/],nl="EventFilters",rl=(t={})=>{let e;return{name:nl,setup(n){const r=n.getOptions();e=Eo(t,r)},processEvent(n,r,s){if(!e){const o=s.getOptions();e=Eo(t,o)}return ol(n,e)?null:n}}},sl=(t={})=>({...rl(t),name:"InboundFilters"});function Eo(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:el],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function ol(t,e){if(t.type){if(t.type==="transaction"&&al(t,e.ignoreTransactions))return S&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
19Event: ${zt(t)}`),!0}else{if(il(t,e.ignoreErrors))return S&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
20Event: ${zt(t)}`),!0;if(dl(t))return S&&g.warn(`Event dropped due to not having an error message, error type or stacktrace.
21Event: ${zt(t)}`),!0;if(cl(t,e.denyUrls))return S&&g.warn(`Event dropped due to being matched by \`denyUrls\` option.
22Event: ${zt(t)}.
23Url: ${Fn(t)}`),!0;if(!ul(t,e.allowUrls))return S&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option.
24Event: ${zt(t)}.
25Url: ${Fn(t)}`),!0}return!1}function il(t,e){return e!=null&&e.length?ya(t).some(n=>Et(n,e)):!1}function al(t,e){if(!(e!=null&&e.length))return!1;const n=t.transaction;return n?Et(n,e):!1}function cl(t,e){if(!(e!=null&&e.length))return!1;const n=Fn(t);return n?Et(n,e):!1}function ul(t,e){if(!(e!=null&&e.length))return!0;const n=Fn(t);return n?Et(n,e):!0}function fl(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function Fn(t){var e,n;try{const r=[...((e=t.exception)==null?void 0:e.values)??[]].reverse().find(o=>{var i,c,a;return((i=o.mechanism)==null?void 0:i.parent_id)===void 0&&((a=(c=o.stacktrace)==null?void 0:c.frames)==null?void 0:a.length)}),s=(n=r==null?void 0:r.stacktrace)==null?void 0:n.frames;return s?fl(s):null}catch{return S&&g.error(`Cannot extract url for event ${zt(t)}`),null}}function dl(t){var e,n;return(n=(e=t.exception)==null?void 0:e.values)!=null&&n.length?!t.message&&!t.exception.values.some(r=>r.stacktrace||r.type&&r.type!=="Error"||r.value):!1}function ll(t,e,n,r,s,o){var c;if(!((c=s.exception)!=null&&c.values)||!o||!pt(o.originalException))return;const i=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;i&&(s.exception.values=Or(t,e,r,o.originalException,n,s.exception.values,i,0
25))}function Or(t,e,n,r,s,o,i,c){if(o.length>=n+1)return o;let a=[...o];if(pt(r[s])){bo(i,c,r);const u=t(e,r[s]),f=a.length;vo(u,s,f,c),a=Or(t,e,n,r[s],s,[u,...a],u,f)}return wa(r)&&r.errors.forEach((u,f)=>{if(pt(u)){bo(i,c,r);const d=t(e,u),p=a.length;vo(d,`errors[${f}]`,p,c),a=Or(t,e,n,u,s,[d,...a],d,p)}}),a}function wa(t){return Array.isArray(t.errors)}function bo(t,e,n){t.mechanism={handled:!0,type:"auto.core.linked_errors",...wa(n)&&{is_exception_group:!0},...t.mechanism,exception_id:e}}function vo(t,e,n,r){t.mechanism={handled:!0,...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function pl(t){return pt(t)&&"__sentry_fetch_url_host__"in t&&typeof t.__sentry_fetch_url_host__=="string"}function To(t){return pl(t)?`${t.message} (${t.__sentry_fetch_url_host__})`:t.message}const Io=new Set([]);function ml(t){const e="console",n=Dt(e,t);return Mt(e,gl),n}const Ro=new Set;function gl(){"console"in I&&$c.forEach(function(t){Ro.has(t)||!(t in I.console)||(Ro.add(t),tt(I.console,t,function(e){return Ln[t]=e,function(...n){const r=n[0],s=Ln[t],o=Io.size&&typeof r=="string"&&Et(r,Io);o||ot("console",{args:n,level:t}),(!o||S&&g.isEnabled())&&(s==null||s.apply(I.console,n))}}))})}function hl(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const _l="Dedupe",Sl=()=>{let t;return{name:_l,processEvent(e){if(e.type)return e;try{if(El(e,t))return S&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},yl=Sl;function El(t,e){return e?!!(bl(t,e)||vl(t,e)):!1}function bl(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Ca(t,e)||!Na(t,e))}function vl(t,e){const n=Ao(e),r=Ao(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Ca(t,e)||!Na(t,e))}function Na(t,e){let n=Ps(t),r=Ps(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const o=r[s],i=n[s];if(o.filename!==i.filename||o.lineno!==i.lineno||o.colno!==i.colno||o.function!==i.function)return!1}return!0}function Ca(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Ao(t){var e,n;return(n=(e=t.exception)==null?void 0:e.values)==null?void 0:n[0]}const Tl="ConversationId",Il=()=>({name:Tl,setup(t){t.on("spanStart",e=>{const n=C().getScopeData(),r=Q().getScopeData(),s=n.conversationId||r.conversationId;if(s){const{op:o,data:i,description:c}=T(e);if(!(o!=null&&o.startsWith("gen_ai."))&&!i["ai.operationId"]&&!(c!=null&&c.startsWith("ai.")))return;e.setAttribute(Cu,s)}})}}),Rl=Il;function Al(t,e,n,r,s){if(!t.fetchData)return;const{method:o,url:i}=t.fetchData,c=et()&&e(i);if(t.endTimestamp){const h=t.fetchData.__span;if(!h)return;const _=r[h];_&&(c&&(Cl(_,t),wl(_,t,s)),delete r[h]);return}const{spanOrigin:a="auto.http.browser",propagateTraceparent:u=!1}=typeof s=="object"?s:{spanOrigin:s},f=w(),d=!!Z(),p=d||!!f&&gt(f),l=c&&p?Bt(Ol(i,o,a)):new re,m=na(l)&&d?void 0:l;if(c&&!p&&(f==null||f.recordDroppedEvent("no_parent_span","span")),t.fetchData.__span=l.spanContext().spanId,r[l.spanContext().spanId]=l,n(t.fetchData.url)){const h=t.args[0],_={...t.args[1]||{}},b=Nl(h,_,et()&&p?m:void 0,u);b&&(t.args[1]=_,_.headers=b)}if(f){const h={input:t.args,response:t.response,startTimestamp:t.startTimestamp,endTimestamp:t.endTimestamp};f.emit("beforeOutgoingRequestSpan",l,h)}return l}function wl(t,e,n){var s;const r=typeof n=="object"&&n!==null?n.onRequestSpanEnd:void 0;r==null||r(t,{headers:(s=e.response)==null?void 0:s.headers,error:e.error})}function Nl(t,e,n,r){const s=Aa({span:n,propagateTraceparent:r}),o=s["sentry-trace"],i=s.baggage,c=s.traceparent;if(!o)return;const a=e.headers||(Kr(t)?t.headers:void 0);if(a)if(Pl(a)){const u=new Headers(a);if(u.get("sentry-trace")||u.set("sentry-trace",o),r&&c&&!u.get("traceparent")&&u.set("traceparent",c),i){const f=u.get("baggage");f?hn(f)||u.set("baggage",`${f},${i}`):u.set("baggage",i)}return u}else if(kl(a)){const u=[...a];u.find(d=>d[0]==="sentry-trace")||u.push(["sentry-trace",o]),r&&c&&!u.find(d=>d[0]==="traceparent")&&u.push(["traceparent",c]);const f=a.find(d=>d[0]==="baggage"&&typeof d[1]=="string"&&hn(d[1]));return i&&!f&&u.push(["baggage",i]),u}else{const u="sentry-trace"in a?a["sentry-trace"]:void 0,f="traceparent"in a?a.traceparent:void 0,d="baggage"in a?a.baggage:void 0,p=d?Array.isArray(d)?[...d]:[d]:[],l=d&&(Array.isArray(d)?d.find(h=>hn(h)):hn(d));i&&!l&&p.push(i);const m=Object.assign({},a,{"sentry-trace":u??o,...p.length>0&&{baggage:p.join(",")}});return r&&c&&!f&&(m.traceparent=c),m}else return{"sentry-trace":o,...i&&{baggage:i},...c&&{traceparent:c}}}function Cl(t,e){var n,r;if(e.response){ki(t,e.response.status);const s=(r=(n=e.response)==null?void 0:n.headers)==null?void 0:r.get("content-length");if(s){const o=parseInt(s);o>0&&t.setAttribute("http.response_content_length",o)}}else e.error&&t.setStatus({code:F,message:"internal_error"});t.end()}function hn(t){return typeof t!="string"?!1:t.split(",").some(e=>e.trim().startsWith(Dn))}function Pl(t){return typeof Headers<"u"&&qn(t,Headers)}function kl(t){return Array.isArray(t)?t.every(e=>Array.isArray(e)&&e.length===2&&typeof e[0]=="string"):!1}function Ol(t,e,n){if(t.startsWith("data:")){const o=ft(t);return{name:`${e} ${o}`,attributes:wo(t,void 0,e,n)}}const r=$n(t),s=r?Ia(r):t;return{name:`${e} ${s}`,attributes:wo(t,r,e,n)}}
25function wo(t,e,n,r){const s={url:ft(t),type:"fetch","http.method":n,[O]:r,[Y]:"http.client"};return e&&(us(e)||(s[oa]=ft(e.href),s[Ce]=ft(e.href),s["server.address"]=e.host),e.search&&(s["http.query"]=e.search),e.hash&&(s["http.fragment"]=e.hash)),s}function Pa(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}const Je=I;function Ll(){return"history"in Je&&!!Je.history}function xl(){if(!("fetch"in Je))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Lr(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Dl(){var n;if(typeof EdgeRuntime=="string")return!0;if(!xl())return!1;if(Lr(Je.fetch))return!0;let t=!1;const e=Je.document;if(e&&typeof e.createElement=="function")try{const r=e.createElement("iframe");r.hidden=!0,e.head.appendChild(r),(n=r.contentWindow)!=null&&n.fetch&&(t=Lr(r.contentWindow.fetch)),e.head.removeChild(r)}catch(r){S&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return t}function fs(t,e){const n="fetch",r=Dt(n,t);return Mt(n,()=>ka(void 0,e)),r}function Ml(t){const e="fetch-body-resolved",n=Dt(e,t);return Mt(e,()=>ka(Fl)),n}function ka(t,e=!1){e&&!Dl()||tt(I,"fetch",function(n){return function(...r){const s=new Error,{method:o,url:i}=Hl(r),c={args:r,fetchData:{method:o,url:i},startTimestamp:$()*1e3,virtualError:s,headers:Bl(r)};return t||ot("fetch",{...c}),n.apply(I,r).then(async a=>(t?t(a):ot("fetch",{...c,endTimestamp:$()*1e3,response:a}),a),a=>{ot("fetch",{...c,endTimestamp:$()*1e3,error:a}),pt(a)&&a.stack===void 0&&(a.stack=s.stack,H(a,"framesToPop",1));const u=w(),f=(u==null?void 0:u.getOptions().enhanceFetchErrorMessages)??"always";if(f!==!1&&pt(a)&&a.name==="TypeError"&&(a.message==="Failed to fetch"||a.message==="Load failed"||a.message==="NetworkError when attempting to fetch resource."))try{const l=new URL(c.fetchData.url).host;f==="always"?a.message=`${a.message} (${l})`:H(a,"__sentry_fetch_url_host__",l)}catch{}throw a})}})}async function $l(t,e){if(t!=null&&t.body){const n=t.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let o=!0;for(;o;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:c}=await r.read();clearTimeout(i),c&&(e(),o=!1)}catch{o=!1}finally{clearTimeout(i)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function Fl(t){let e;try{e=t.clone()}catch{return}$l(e,()=>{ot("fetch-body-resolved",{endTimestamp:$()*1e3,response:t})})}function wn(t,e){return jn(t)&&!!t[e]}function No(t){return typeof t=="string"?t:t?wn(t,"url")?t.url:t.toString?t.toString():"":""}function Hl(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:No(n),method:wn(r,"method")?String(r.method).toUpperCase():Kr(n)&&wn(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:No(e),method:wn(e,"method")?String(e.method).toUpperCase():"GET"}}function Bl(t){const[e,n]=t;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(Kr(e))return new Headers(e.headers)}catch{}}const Oa=I;function Se(){try{return Oa.document.location.href}catch{return""}}function La(t,e=5){if(!Oa.HTMLElement)return null;let n=t;for(let r=0;r<e;r++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}const E=I;let xr=0;function xa(){return xr>0}function Ul(){xr++,setTimeout(()=>{xr--})}function ye(t,e={}){function n(s){return typeof s=="function"}if(!n(t))return t;try{if(Object.prototype.hasOwnProperty.call(t,"__sentry_wrapped__")){const o=t.__sentry_wrapped__;return typeof o=="function"?o:t}if(Qr(t))return t}catch{return t}const r=function(...s){I._sentryWrappedDepth=(I._sentryWrappedDepth||0)+1;try{const o=s.map(i=>ye(i,e));return t.apply(this,o)}catch(o){throw Ul(),Zr(i=>{i.addEventProcessor(c=>(e.mechanism&&(Tr(c,void 0),Jt(c,e.mechanism)),c.extra={...c.extra,arguments:s},c)),fa(o)}),o}finally{I._sentryWrappedDepth=(I._sentryWrappedDepth||0)-1}};try{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}catch{}yi(r,t),H(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function Hn(){const t=Se(),{referrer:e}=E.document||{},{userAgent:n}=E.navigator||{},r={...e&&{Referer:e},...n&&{"User-Agent":n}};return{url:t,headers:r}}function ds(t,e){const n=Jn(t,e),r={type:Gl(e),value:Vl(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function jl(t,e,n,r){const s=w(),o=s==null?void 0:s.getOptions().normalizeDepth,i=Ql(e),c={__serialized__:vi(e,o)};if(i)return{exception:{values:[ds(t,i)]},extra:c};const a={exception:{values:[{type:Wn(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Xl(e,{isUnhandledRejection:r})}]},extra:c};if(n){const u=Jn(t,n);u.length&&(a.exception.values[0].stacktrace={frames:u})}return a}function pr(t,e){return{exception:{values:[ds(t,e)]}}}function Jn(t,e){const n=e.stacktrace||e.stack||"",r=ql(e),s=zl(e);try{return t(n,r,s)}catch{}return[]}const Wl=/Minified React error #\d+;/i;function ql(t){return t&&Wl.test(t.message)?1:0}function zl(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function Da(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function Gl(t){const e=t==null?void 0:t.name;return!e&&Da(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Vl(t){const e=t==null?void 0:t.message;return Da(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?To(e.error):To(t):"No error message"}function Yl(t,e,n,r){const s=(n==null?void 0:n.syntheticException)||void 0,o=ls(t,e,s,r);return Jt(o),o.level="error",n!=null&&n.event_id&&(o.event_id=n.event_id),on(o)}function Jl(t,e,n="info",r,s){const o=(r==null?void 0:r.syntheticException)||void 0,i=Dr(t,e,o,s);return i.level=n,r!=null&&r.event_id&&(i.event_id=r.event_id),on(i)}function ls(t,e,n,r,s){var i,c;let o;if(Si(e)&&e.error)return pr(t,e.error);if(Os(e)||Yc(e)){const a=e;if("stack"in e){o=pr(t,e);const u=(c=(i=o.exception)==null?void 0:i.values)==null?void 0:c[0];if(r&&n&&u&&!u.stacktrace){const f=Jn(t,n);f.length&&(u.stacktrace={frames:f},Jt(o,{synthetic:!0}))}}else{const u=a.name||(Os(a)?"DOMError":"DOMException"),f=a.message?`${u}: ${a.message}`:u;o=Dr(t,f,n,r),Tr(o,f)}return"code"in a&&(o.tags={...o.tags,"DOMException.code":`${a.code}`}),o}return pt(e)?pr(t,e):We(e)||Wn(e)?(o=jl(t,e,n,s),Jt(o,{synthetic:!0}),o):(o=Dr(t,e,n,r),Tr(o,`${e}`),Jt(o,{synthetic:!0}),o)}function Dr(t,e,n,r){const s={};if(r&&n){const o=Jn(t,n);o.length&&(s.exception={values:[{value:e,stacktrace:{frames:o}}]}),Jt(s,{synthetic:!0})}
25if(Xr(e)){const{__sentry_template_string__:o,__sentry_template_values__:i}=e;return s.logentry={message:o,params:i},s}return s.message=e,s}function Xl(t,{isUnhandledRejection:e}){const n=Xc(t),r=e?"promise rejection":"exception";return Si(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:Wn(t)?`Event \`${Kl(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Kl(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function Ql(t){return Object.values(t).find(pt)}class Zl extends Hd{constructor(e){var i;const n=tp(e),r=E.SENTRY_SDK_SOURCE||pd();Ra(n,"browser",["browser"],r),super(n);const{userInfo:s}=this.getDataCollectionOptions();(i=n._metadata)!=null&&i.sdk&&(n._metadata.sdk.settings={infer_ip:s?"auto":"never",...n._metadata.sdk.settings});const{sendClientReports:o}=this._options;E.document&&E.document.addEventListener("visibilitychange",()=>{E.document.visibilityState==="hidden"&&(o&&this._flushOutcomes(),queueMicrotask(()=>{this.flush()}))}),s&&this.on("beforeSendSession",Yd)}eventFromException(e,n){return Yl(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Jl(this._options.stackParser,e,n,r,this._options.attachStacktrace)}_prepareEvent(e,n,r,s){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r,s)}}function tp(t){var e;return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:(e=E.SENTRY_RELEASE)==null?void 0:e.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...t}}const Rt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,y=I,ep=(t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good",an=(t,e,n,r)=>{let s,o;return i=>{e.value>=0&&(i||r)&&(o=e.value-(s??0),(o||s===void 0)&&(s=e.value,e.delta=o,e.rating=ep(e.value,n),t(e)))}},cn=(t=!0)=>{var n,r;const e=(r=(n=y.performance)==null?void 0:n.getEntriesByType)==null?void 0:r.call(n,"navigation")[0];if(!t||e&&e.responseStart>0&&e.responseStart<performance.now())return e},Pe=()=>{const t=cn();return(t==null?void 0:t.activationStart)??0};function kt(t,e,n){y.document&&y.addEventListener(t,e,n)}function Bn(t,e,n){y.document&&y.removeEventListener(t,e,n)}let pe=-1;const Ma=new Set,np=()=>{var t,e;return((t=y.document)==null?void 0:t.visibilityState)==="hidden"&&!((e=y.document)!=null&&e.prerendering)?0:1/0},Nn=t=>{if(rp(t)&&pe>-1){if(t.type==="visibilitychange"||t.type==="pagehide")for(const e of Ma)e();isFinite(pe)||(pe=t.type==="visibilitychange"?t.timeStamp:0,Bn("prerenderingchange",Nn,!0))}},un=()=>{var t;if(y.document&&pe<0){const e=Pe();pe=(y.document.prerendering||(t=globalThis.performance.getEntriesByType("visibility-state").filter(r=>r.name==="hidden"&&r.startTime>e)[0])==null?void 0:t.startTime)??np(),kt("visibilitychange",Nn,!0),kt("pagehide",Nn,!0),kt("prerenderingchange",Nn,!0)}return{get firstHiddenTime(){return pe},onHidden(e){Ma.add(e)}}};function rp(t){var e;return t.type==="pagehide"||((e=y.document)==null?void 0:e.visibilityState)==="hidden"}const sp=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,fn=(t,e=-1)=>{var o,i;const n=cn();let r="navigate";return n&&((o=y.document)!=null&&o.prerendering||Pe()>0?r="prerender":(i=y.document)!=null&&i.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:t,value:e,rating:"good",delta:0,entries:[],id:sp(),navigationType:r}},mr=new WeakMap;function ps(t,e){try{return mr.get(t)||mr.set(t,new e),mr.get(t)}catch{return new e}}class op{constructor(){this._sessionValue=0,this._sessionEntries=[]}_processEntry(e){var s;if(e.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&e.startTime-r.startTime<1e3&&e.startTime-n.startTime<5e3?(this._sessionValue+=e.value,this._sessionEntries.push(e)):(this._sessionValue=e.value,this._sessionEntries=[e]),(s=this._onAfterProcessingUnexpectedShift)==null||s.call(this,e)}}const ke=(t,e,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{e(s.getEntries())})});return r.observe({type:t,buffered:!0,...n}),r}}catch{}},ms=t=>{let e=!1;return()=>{e||(t(),e=!0)}},Xn=t=>{var e;(e=y.document)!=null&&e.prerendering?addEventListener("prerenderingchange",()=>t(),!0):t()},ip=[1800,3e3],ap=(t,e={})=>{Xn(()=>{const n=un(),r=fn("FCP");let s;const i=ke("paint",c=>{for(const a of c)a.name==="first-contentful-paint"&&(i.disconnect(),a.startTime<n.firstHiddenTime&&(r.value=Math.max(a.startTime-Pe(),0),r.entries.push(a),s(!0)))});i&&(s=an(t,r,ip,e.reportAllChanges))})},cp=[.1,.25],up=(t,e={})=>{ap(ms(()=>{var a;const n=fn("CLS",0);let r;const s=un(),o=ps(e,op),i=u=>{for(const f of u)o._processEntry(f);o._sessionValue>
25n.value&&(n.value=o._sessionValue,n.entries=o._sessionEntries,r())},c=ke("layout-shift",i);c&&(r=an(t,n,cp,e.reportAllChanges),s.onHidden(()=>{i(c.takeRecords()),r(!0)}),(a=y==null?void 0:y.setTimeout)==null||a.call(y,r))}))};let $a=0,gr=1/0,_n=0;const fp=t=>{t.forEach(e=>{e.interactionId&&(gr=Math.min(gr,e.interactionId),_n=Math.max(_n,e.interactionId),$a=_n?(_n-gr)/7+1:0)})};let Mr;const Fa=()=>Mr?$a:performance.interactionCount||0,dp=()=>{"interactionCount"in performance||Mr||(Mr=ke("event",fp,{type:"event",buffered:!0,durationThreshold:0}))},hr=10;let Ha=0;const lp=()=>Fa()-Ha;class pp{constructor(){this._longestInteractionList=[],this._longestInteractionMap=new Map}_resetInteractions(){Ha=Fa(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const e=Math.min(this._longestInteractionList.length-1,Math.floor(lp()/50));return this._longestInteractionList[e]}_processEntry(e){var s,o;if((s=this._onBeforeProcessingEntry)==null||s.call(this,e),!(e.interactionId||e.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(e.interactionId);if(r||this._longestInteractionList.length<hr||e.duration>n._latency){if(r?e.duration>r._latency?(r.entries=[e],r._latency=e.duration):e.duration===r._latency&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],_latency:e.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((i,c)=>c._latency-i._latency),this._longestInteractionList.length>hr){const i=this._longestInteractionList.splice(hr);for(const c of i)this._longestInteractionMap.delete(c.id)}(o=this._onAfterProcessingINPCandidate)==null||o.call(this,r)}}}const gs=t=>{var n;const e=y.requestIdleCallback||y.setTimeout;((n=y.document)==null?void 0:n.visibilityState)==="hidden"?t():(t=ms(t),kt("visibilitychange",t,{once:!0,capture:!0}),kt("pagehide",t,{once:!0,capture:!0}),e(()=>{t(),Bn("visibilitychange",t,{capture:!0}),Bn("pagehide",t,{capture:!0})}))},mp=[200,500],gp=40,hp=(t,e={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=un();Xn(()=>{dp();const r=fn("INP");let s;const o=ps(e,pp),i=a=>{gs(()=>{for(const f of a)o._processEntry(f);const u=o._estimateP98LongestInteraction();u&&u._latency!==r.value&&(r.value=u._latency,r.entries=u.entries,s())})},c=ke("event",i,{durationThreshold:e.durationThreshold??gp});s=an(t,r,mp,e.reportAllChanges),c&&(c.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{i(c.takeRecords()),s(!0)}))})};class _p{_processEntry(e){var n;(n=this._onBeforeProcessingEntry)==null||n.call(this,e)}}const Sp=[2500,4e3],yp=(t,e={})=>{Xn(()=>{const n=un(),r=fn("LCP");let s;const o=ps(e,_p),i=a=>{e.reportAllChanges||(a=a.slice(-1));for(const u of a)o._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-Pe(),0),r.entries=[u],s())},c=ke("largest-contentful-paint",i);if(c){s=an(t,r,Sp,e.reportAllChanges);const a=ms(()=>{i(c.takeRecords()),c.disconnect(),s(!0)}),u=f=>{f.isTrusted&&(gs(a),Bn(f.type,u,{capture:!0}))};for(const f of["keydown","click","visibilitychange"])kt(f,u,{capture:!0})}})},Ep=[800,1800],$r=t=>{var e,n;(e=y.document)!=null&&e.prerendering?Xn(()=>$r(t)):((n=y.document)==null?void 0:n.readyState)!=="complete"?addEventListener("load",()=>$r(t),!0):setTimeout(t)},bp=(t,e={})=>{const n=fn("TTFB"),r=an(t,n,Ep,e.reportAllChanges);$r(()=>{const s=cn();s&&(n.value=Math.max(s.responseStart-Pe(),0),n.entries=[s],r(!0))})},Ue={},Un={};let Ba,Ua,ja,Wa;function hs(t,e=!1){return Kn("cls",t,Tp,Ba,e)}function _s(t,e=!1){return Kn("lcp",t,Ip,Ua,e)}function vp(t){return Kn("ttfb",t,Rp,ja)}function qa(t){return Kn("inp",t,Ap,Wa)}function Ee(t,e){return za(t,e),Un[t]||(wp(t),Un[t]=!0),Ga(t,e)}function dn(t,e){const n=Ue[t];if(n!=null&&n.length)for(const r of n)try{r(e)}catch(s){Rt&&g.error(`Error while triggering instrumentation handler.
26Type: ${t}
27Name: ${Tt(r)}
28Error:`,s)}}function Tp(){return up(t=>{dn("cls",{metric:t}),Ba=t},{reportAllChanges:!0})}function Ip(){return yp(t=>{dn("lcp",{metric:t}),Ua=t},{reportAllChanges:!0})}function Rp(){return bp(t=>{dn("ttfb",{metric:t}),ja=t})}function Ap(){return hp(t=>{dn("inp",{metric:t}),Wa=t})}function Kn(t,e,n,r,s=!1){za(t,e);let o;return Un[t]||(o=n(),Un[t]=!0),r&&e({metric:r}),Ga(t,e,s?o:void 0)}function wp(t){const e={};t==="event"&&(e.durationThreshold=0),ke(t,n=>
28{dn(t,{entries:n})},e)}function za(t,e){Ue[t]=Ue[t]||[],Ue[t].push(e)}function Ga(t,e,n){return()=>{n&&n();const r=Ue[t];if(!r)return;const s=r.indexOf(e);s!==-1&&r.splice(s,1)}}function Np(t){return"duration"in t}const Cp=80,qt={};try{typeof Node<"u"&&(qt.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),typeof Element<"u"&&(qt.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,qt.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,qt.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,qt.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<"u"&&(qt.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function Nt(t,e,n){const r=qt[e];if(r)try{return r.call(t,n)}catch{}const s=t[e];return typeof s=="function"?s.call(t,n):s}function W(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,s=[];let o=0,i=0;const c=" > ",a=c.length;let u;const f=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||Cp;for(;n&&o++<r&&(u=Pp(n,f),!(u==="html"||o>1&&i+s.length*a+u.length>=d));)s.push(u),i+=u.length,n=Nt(n,"parentNode");return s.reverse().join(c)}catch{return"<unknown>"}}function Pp(t,e){const n=[],r=Nt(t,"tagName");if(!r)return"";if(typeof HTMLElement<"u"&&t instanceof HTMLElement){const o=Nt(t,"dataset");if(o){if(o.sentryComponent)return o.sentryComponent;if(o.sentryElement)return o.sentryElement}}n.push(r.toLowerCase());const s=e!=null&&e.length?e.filter(o=>Nt(t,"getAttribute",o)).map(o=>[o,Nt(t,"getAttribute",o)]):null;if(s!=null&&s.length)s.forEach(o=>{n.push(`[${o[0]}="${o[1]}"]`)});else{const o=Nt(t,"id");o&&n.push(`#${o}`);const i=Nt(t,"className");if(i&&yt(i)){const c=i.split(/\s+/);for(const a of c)n.push(`.${a}`)}}for(const o of["aria-label","type","name","title","alt"]){const i=Nt(t,"getAttribute",o);i&&n.push(`[${o}="${i}"]`)}return n.join("")}const kp=t=>{const e=n=>{var r;(n.type==="pagehide"||((r=y.document)==null?void 0:r.visibilityState)==="hidden")&&t(n)};kt("visibilitychange",e,{capture:!0,once:!0}),kt("pagehide",e,{capture:!0,once:!0})};function _r(t){return typeof t=="number"&&isFinite(t)}function Lt(t,e,n,{...r}){const s=T(t).start_timestamp;return s&&s>e&&typeof t.updateStartTime=="function"&&t.updateStartTime(e),ea(t,()=>{const o=Bt({startTime:e,...r});return o&&o.end(n),o})}function Ss(t){var _;const e=w();if(!e)return;const{name:n,transaction:r,attributes:s,startTime:o}=t,{release:i,environment:c}=e.getOptions(),{userInfo:a}=e.getDataCollectionOptions(),u=e.getIntegrationByName("Replay"),f=u==null?void 0:u.getReplayId(),d=C(),p=d.getUser(),l=p!==void 0?p.email||p.id||p.ip_address:void 0;let m;try{m=d.getScopeData().contexts.profile.profile_id}catch{}const h={release:i,environment:c,user:l||void 0,profile_id:m||void 0,replay_id:f||void 0,transaction:r,"user_agent.original":(_=y.navigator)==null?void 0:_.userAgent,"client.address":a?"{{auto}}":void 0,...s};return Bt({name:n,attributes:h,startTime:o,experimental:{standalone:!0}})}function Oe(){return y.addEventListener&&y.performance}function P(t){return t/1e3}function Op(t){let e="unknown",n="unknown",r="";for(const s of t){if(s==="/"){[e,n]=t.split("/");break}if(!isNaN(Number(s))){e=r==="h"?"http":r,n=t.split(r)[1];break}r+=s}return r===t&&(e=r),{name:e,version:n}}function Qn(t){try{return PerformanceObserver.supportedEntryTypes.includes(t)}catch{return!1}}function Zn(t,e){let n,r=!1;function s(c){!r&&n&&e(c,n.spanContext().spanId,n),r=!0}kp(()=>{s("pagehide")});const o=t.on("beforeStartNavigationSpan",(c,a)=>{a!=null&&a.isRedirect||(s("navigation"),o(),i())}),i=t.on("afterStartPageLoadSpan",c=>{n=c,i()})}function Lp(t){let e=0,n;if(!Qn("layout-shift"))return;const r=hs(({metric:s})=>{const o=s.entries[s.entries.length-1];
28o&&(e=s.value,n=o)},!0);Zn(t,(s,o)=>{xp(e,n,o,s),r()})}function xp(t,e,n,r){var u;Rt&&g.log(`Sending CLS span (${t})`);const s=e?P((q()||0)+e.startTime):$(),o=C().getScopeData().transactionName,i=e?W((u=e.sources[0])==null?void 0:u.node):"Layout shift",c={[O]:"auto.http.browser.cls",[Y]:"ui.webvital.cls",[Ft]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};e!=null&&e.sources&&e.sources.forEach((f,d)=>{c[`cls.source.${d+1}`]=W(f.node)});const a=Ss({name:i,transaction:o,attributes:c,startTime:s});a&&(a.addEvent("cls",{[rn]:"",[sn]:t}),a.end(s))}const Dp=6e4;function ln(t){return t!=null&&t>0&&t<=Dp}function Mp(t){let e=0,n;if(!Qn("largest-contentful-paint"))return;const r=_s(({metric:s})=>{const o=s.entries[s.entries.length-1];!o||!ln(s.value)||(e=s.value,n=o)},!0);Zn(t,(s,o)=>{$p(e,n,o,s),r()})}function $p(t,e,n,r){if(!ln(t))return;Rt&&g.log(`Sending LCP span (${t})`);const s=P((q()||0)+((e==null?void 0:e.startTime)||0)),o=C().getScopeData().transactionName,i=e?W(e.element):"Largest contentful paint",c={[O]:"auto.http.browser.lcp",[Y]:"ui.webvital.lcp",[Ft]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};e&&(e.element&&(c["lcp.element"]=W(e.element)),e.id&&(c["lcp.id"]=e.id),e.url&&(c["lcp.url"]=e.url),e.loadTime!=null&&(c["lcp.loadTime"]=e.loadTime),e.renderTime!=null&&(c["lcp.renderTime"]=e.renderTime),e.size!=null&&(c["lcp.size"]=e.size));const a=Ss({name:i,transaction:o,attributes:c,startTime:s});a&&(a.addEvent("lcp",{[rn]:"millisecond",[sn]:t}),a.end(s))}function st(t){return t&&((q()||performance.timeOrigin)+t)/1e3}function Va(t){var n;const e={};if(t.nextHopProtocol!=null){const{name:r,version:s}=Op(t.nextHopProtocol);e["network.protocol.version"]=s,e["network.protocol.name"]=r}return q()||(n=Oe())!=null&&n.timeOrigin?Fp({...e,"http.request.redirect_start":st(t.redirectStart),"http.request.redirect_end":st(t.redirectEnd),"http.request.worker_start":st(t.workerStart),"http.request.fetch_start":st(t.fetchStart),"http.request.domain_lookup_start":st(t.domainLookupStart),"http.request.domain_lookup_end":st(t.domainLookupEnd),"http.request.connect_start":st(t.connectStart),"http.request.secure_connection_start":st(t.secureConnectionStart),"http.request.connection_end":st(t.connectEnd),"http.request.request_start":st(t.requestStart),"http.request.response_start":st(t.responseStart),"http.request.response_end":st(t.responseEnd),"http.request.time_to_first_byte":t.responseStart!=null?t.responseStart/1e3:void 0}):e}function Fp(t){return Object.fromEntries(Object.entries(t).filter(([,e])=>e!=null))}const Hp=2147483647;let Co=0,K={},X,fe;function Bp({recordClsStandaloneSpans:t,recordLcpStandaloneSpans:e,client:n}){const r=Oe();if(r&&q()){r.mark&&y.performance.mark("sentry-tracing-init");const s=e?Mp(n):e===!1?zp():void 0,o=t?Lp(n):t===!1?qp():void 0,i=Gp(),c=Vp();return()=>{i(),c(),s==null||s(),o==null||o()}}return()=>{}}function Up(){Ee("longtask",({entries:t})=>{const e=Z();if(!e)return;const{op:n,start_timestamp:r}=T(e);for(const s of t){const o=P(q()+s.startTime),i=P(s.duration);n==="navigation"&&r&&o<r||Lt(e,o,o+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[O]:"auto.ui.browser.metrics"}})}})}function jp(){new PerformanceObserver(e=>{const n=Z();if(n)for(const r of e.getEntries()){if(!r.scripts[0])continue;const s=P(q()+r.startTime),{start_timestamp:o,op:i}=T(n);if(i==="navigation"&&o&&s<o)continue;const c=P(r.duration),a={[O]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:f,invokerType:d,sourceURL:p,sourceFunctionName:l,sourceCharPosition:m}=u;a["browser.script.invoker"]=f,a["browser.script.invoker_type"]=d,p&&(a["code.filepath"]=p),l&&(a["code.function"]=l),m!==-1&&(a["browser.script.source_char_position"]=m),Lt(n,s,s+c,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:a})}}).observe({type:"long-animation-frame",buffered:!0})}function Wp(){Ee("event",({entries:t})=>{const e=Z();if(e){for(const n of t)if(n.name==="click"){const r=P(q()+n.startTime),s=P(n.duration),o={name:W(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[O]:"auto.ui.browser.metrics"}},i=La(n.target);
28i&&(o.attributes["ui.component_name"]=i),Lt(e,r,r+s,o)}}})}function qp(){return hs(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(K.cls={value:t.value,unit:""},fe=e)},!0)}function zp(){return _s(({metric:t})=>{const e=t.entries[t.entries.length-1];!e||!ln(t.value)||(K.lcp={value:t.value,unit:"millisecond"},X=e)},!0)}function Gp(){return vp(({metric:t})=>{t.entries[t.entries.length-1]&&(K.ttfb={value:t.value,unit:"millisecond"})})}function Vp(){return Ee("paint",({entries:t})=>{const e=un();for(const n of t){const r=n.startTime<e.firstHiddenTime;n.name==="first-paint"&&r&&(K.fp={value:n.startTime,unit:"millisecond"}),n.name==="first-contentful-paint"&&r&&(K.fcp={value:n.startTime,unit:"millisecond"})}})}function Yp(t,e){const n=Oe(),r=q();if(!(n!=null&&n.getEntries)||!r)return;const{spanStreamingEnabled:s,ignorePerformanceApiSpans:o,ignoreResourceSpans:i}=e,c=P(r),a=n.getEntries(),{op:u,start_timestamp:f}=T(t);a.slice(Co).forEach(d=>{const p=P(d.startTime),l=P(Math.max(0,d.duration));if(!(u==="navigation"&&f&&c+p<f))switch(d.entryType){case"navigation":{Zp(t,d,c);break}case"mark":case"paint":case"measure":{Kp(t,d,p,l,c,o);break}case"resource":{nm(t,d,d.name,p,l,c,i);break}}}),Co=Math.max(a.length-1,0),rm(t,s)}function Jp(t,e){var c;const n=q();if(!((c=Oe())!=null&&c.getEntries)||!n){Po();return}const{spanStreamingEnabled:r,recordClsOnPageloadSpan:s,recordLcpOnPageloadSpan:o}=e,i=P(n);if(T(t).op==="pageload"){if(im(K),r){const a=(u,f,d)=>{const p=d??`browser.web_vital.${u}.value`;t.setAttribute(p,f),Rt&&g.log("Setting web vital attribute",{[p]:f},"on pageload span")};["ttfb","fp","fcp"].forEach(u=>{K[u]&&a(u,K[u].value)}),K["ttfb.requestTime"]&&a("ttfb.requestTime",K["ttfb.requestTime"].value,"browser.web_vital.ttfb.request_time")}
28else s||delete K.cls,o||delete K.lcp,Object.entries(K).forEach(([a,u])=>{ta(a,u.value,u.unit,t)}),sm(t,e);t.setAttribute(r?"browser.performance.time_origin":"performance.timeOrigin",i),t.setAttribute(r?"browser.performance.navigation.activation_start":"performance.activationStart",Pe())}Po()}function Po(){X=void 0,fe=void 0,K={}}function Xp(t){if((t==null?void 0:t.entryType)==="measure")try{return t.detail.devtools.track==="Components ⚛"}catch{return}}function Kp(t,e,n,r,s,o){if(Xp(e)||["mark","measure"].includes(e.entryType)&&Et(e.name,o))return;const i=cn(!1),c=P(i?i.requestStart:0),a=s+Math.max(n,c),u=s+n,f=u+r,d={[O]:"auto.resource.browser.metrics"};a!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=a),Qp(d,e),a<=f&&Lt(t,a,f,{name:e.name,op:e.entryType,attributes:d})}function Qp(t,e){try{const n=e.detail;if(!n)return;if(typeof n=="object"){for(const[r,s]of Object.entries(n))if(s&&ne(s))t[`sentry.browser.measure.detail.${r}`]=s;else if(s!==void 0)try{t[`sentry.browser.measure.detail.${r}`]=JSON.stringify(s)}catch{}return}if(ne(n)){t["sentry.browser.measure.detail"]=n;return}try{t["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function Zp(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Sn(t,e,r,n)}),Sn(t,e,"secureConnection",n,"TLS/SSL"),Sn(t,e,"fetch",n,"cache"),Sn(t,e,"domainLookup",n,"DNS"),em(t,e,n)}function Sn(t,e,n,r,s=n){const o=tm(n),i=e[o],c=e[`${n}Start`];!c||!i||Lt(t,r+P(c),r+P(i),{op:`browser.${s}`,name:e.name,attributes:{[O]:"auto.ui.browser.metrics",...n==="redirect"&&e.redirectCount!=null?{"http.redirect_count":e.redirectCount}:{}}})}function tm(t){return t==="secureConnection"?"connectEnd":t==="fetch"?"domainLookupStart":`${t}End`}function em(t,e,n){const r=n+P(e.requestStart),s=n+P(e.responseEnd),o=n+P(e.responseStart);e.responseEnd&&(Lt(t,r,s,{op:"browser.request",name:e.name,attributes:{[O]:"auto.ui.browser.metrics"}}),Lt(t,o,s,{op:"browser.response",name:e.name,attributes:{[O]:"auto.ui.browser.metrics"}}))}function nm(t,e,n,r,s,o,i){if(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")return;const c=e.initiatorType?`resource.${e.initiatorType}`:"resource.other";if(i!=null&&i.includes(c))return;const a={[O]:"auto.resource.browser.metrics"},u=Kt(n);u.protocol&&(a["url.scheme"]=u.protocol.split(":").pop()),u.host&&(a["server.address"]=u.host),a["url.same_origin"]=n.includes(y.location.origin),a[Ce]=n,om(e,a,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const f={...a,...Va(e)},d=o+r,p=d+s;Lt(t,d,p,{name:n.replace(y.location.origin,""),op:c,attributes:f})}function rm(t,e){const n=y.navigator;if(!n)return;const r=n.connection;r&&(r.effectiveType&&t.setAttribute(e?"network.connection.effective_type":"effectiveConnectionType",r.effectiveType),r.type&&t.setAttribute(e?"network.connection.type":"connectionType",r.type),_r(r.rtt)&&(e?t.setAttribute("network.connection.rtt",r.rtt):T(t).op==="pageload"&&ta("connection.rtt",r.rtt,"millisecond"))),_r(n.deviceMemory)&&(e?t.setAttribute("device.memory.estimated_capacity",n.deviceMemory):t.setAttribute("deviceMemory",`${n.deviceMemory} GB`)),_r(n.hardwareConcurrency)&&(e?t.setAttribute("device.processor_count",n.hardwareConcurrency):t.setAttribute("hardwareConcurrency",String(n.hardwareConcurrency)))}function sm(t,e){X&&e.recordLcpOnPageloadSpan&&(X.element&&t.setAttribute("lcp.element",W(X.element)),X.id&&t.setAttribute("lcp.id",X.id),X.url&&t.setAttribute("lcp.url",X.url.trim().slice(0,200)),X.loadTime!=null&&t.setAttribute("lcp.loadTime",X.loadTime),X.renderTime!=null&&t.setAttribute("lcp.renderTime",X.renderTime),t.setAttribute("lcp.size",X.size)),fe!=null&&fe.sources&&e.recordClsOnPageloadSpan&&fe.sources.forEach((n,r)=>t.setAttribute(`cls.source.${r+1}`,W(n.node)))}
28function om(t,e,n){n.forEach(([r,s])=>{const o=t[r];o!=null&&(typeof o=="number"&&o<Hp||typeof o=="string")&&(e[s]=o)})}function im(t){const e=cn(!1);if(!e)return;const{responseStart:n,requestStart:r}=e;r<=n&&(t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}const Sr=[],je=new Map,ue=new Map,Ya=60;function am(){if(Oe()&&q()){const e=cm();return()=>{e()}}return()=>{}}const Xe={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 cm(){return qa(um)}const um=({metric:t})=>{if(t.value==null)return;const e=P(t.value);if(e>Ya)return;const n=t.entries.find(m=>m.duration===t.value&&Xe[m.name]);if(!n)return;const{interactionId:r}=n,s=Xe[n.name],o=P(q()+n.startTime),i=Z(),c=i?j(i):void 0,a=r!=null?je.get(r):void 0,u=(a==null?void 0:a.span)||c,f=u?T(u).description:C().getScopeData().transactionName,d=(a==null?void 0:a.elementName)||W(n.target),p={[O]:"auto.http.browser.inp",[Y]:`ui.interaction.${s}`,[Ft]:n.duration},l=Ss({name:d,transaction:f,attributes:p,startTime:o});l&&(l.addEvent("inp",{[rn]:"millisecond",[sn]:t.value}),l.end(o+e))};function fm(t){return t!=null?je.get(t):void 0}function dm(){const t=Object.keys(Xe);Yn()&&t.forEach(s=>{y.addEventListener(s,e,{capture:!0,passive:!0})});function e(s){const o=s.target;if(!o)return;const i=W(o),c=Math.round(s.timeStamp);if(ue.set(c,i),ue.size>50){const a=ue.keys().next().value;a!==void 0&&ue.delete(a)}}function n(s){const o=Math.round(s.startTime);let i=ue.get(o);if(!i)for(let c=-5;c<=5;c++){const a=ue.get(o+c);if(a){i=a;break}}return i||"<unknown>"}const r=({entries:s})=>{const o=Z(),i=o&&j(o);s.forEach(c=>{if(!Np(c))return;const a=c.interactionId;if(a==null||je.has(a))return;const u=c.target?W(c.target):n(c);if(Sr.length>10){const f=Sr.shift();je.delete(f)}Sr.push(a),je.set(a,{span:i,elementName:u})})};Ee("event",r),Ee("first-input",r)}function ys(t){var m,h;const{name:e,op:n,origin:r,metricName:s,value:o,attributes:i,parentSpan:c,reportEvent:a,startTime:u,endTime:f}=t,d=C().getScopeData().transactionName,p={[O]:r,[Y]:n,[Ft]:0,[`browser.web_vital.${s}.value`]:o,[aa]:d,[ia]:d,"user_agent.original":(m=y.navigator)==null?void 0:m.userAgent,...i};c&&((h=ji(c).attributes)==null?void 0:h[Y])==="pageload"&&(p["sentry.pageload.span_id"]=c.spanContext().spanId),a&&(p[`browser.web_vital.${s}.report_event`]=a);const l=Bt({name:e,attributes:p,startTime:u,parentSpan:c});l&&l.end(f??u)}function lm(t){let e=0,n;if(!Qn("largest-contentful-paint"))return;const r=_s(({metric:s})=>{const o=s.entries[s.entries.length-1];
28!o||!ln(s.value)||(e=s.value,n=o)},!0);Zn(t,(s,o,i)=>{pm(e,n,i,s),r()})}function pm(t,e,n,r){if(!ln(t))return;Rt&&g.log(`Sending LCP span (${t})`);const s=q()||0,o=P(s),i=P(s+((e==null?void 0:e.startTime)||0)),c=e?W(e.element):"Largest contentful paint",a={};e!=null&&e.element&&(a["browser.web_vital.lcp.element"]=W(e.element)),e!=null&&e.id&&(a["browser.web_vital.lcp.id"]=e.id),e!=null&&e.url&&(a["browser.web_vital.lcp.url"]=e.url),(e==null?void 0:e.loadTime)!=null&&(a["browser.web_vital.lcp.load_time"]=e.loadTime),(e==null?void 0:e.renderTime)!=null&&(a["browser.web_vital.lcp.render_time"]=e.renderTime),(e==null?void 0:e.size)!=null&&(a["browser.web_vital.lcp.size"]=e.size),ys({name:c,op:"ui.webvital.lcp",origin:"auto.http.browser.lcp",metricName:"lcp",value:t,attributes:a,parentSpan:n,reportEvent:r,startTime:o,endTime:i})}function mm(t){let e=0,n;if(!Qn("layout-shift"))return;const r=hs(({metric:s})=>{const o=s.entries[s.entries.length-1];o&&(e=s.value,n=o)},!0);Zn(t,(s,o,i)=>{gm(e,n,i,s),r()})}function gm(t,e,n,r){var c;Rt&&g.log(`Sending CLS span (${t})`);const s=e?P((q()||0)+e.startTime):$(),o=e?W((c=e.sources[0])==null?void 0:c.node):"Layout shift",i={};e!=null&&e.sources&&e.sources.forEach((a,u)=>{i[`browser.web_vital.cls.source.${u+1}`]=W(a.node)}),ys({name:o,op:"ui.webvital.cls",origin:"auto.http.browser.cls",metricName:"cls",value:t,attributes:i,parentSpan:n,reportEvent:r,startTime:s})}function hm(){if(!Oe()||!q())return;qa(({metric:n})=>{if(n.value==null||P(n.value)>Ya)return;const s=n.entries.find(o=>o.duration===n.value&&Xe[o.name]);s&&_m(n.value,s)})}function _m(t,e){Rt&&g.log(`Sending INP span (${t})`);const n=P(q()+e.startTime),r=P(t),s=Xe[e.name],o=fm(e.interactionId),i=Z(),c=i?j(i):void 0,a=(o==null?void 0:o.span)||c,u=a?ji(a).name:C().getScopeData().transactionName,f=(o==null?void 0:o.elementName)||W(e.target);ys({name:f,op:`ui.interaction.${s}`,origin:"auto.http.browser.inp",metricName:"inp",value:t,attributes:{[Ft]:e.duration,[aa]:u,[ia]:u},startTime:n,endTime:n+r,parentSpan:a})}const Sm=1e3;let ko,Fr,Hr;function ym(t){const e="dom";Dt(e,t),Mt(e,Em)}function Em(){if(!y.document)return;const t=ot.bind(null,"dom"),e=Oo(t,!0);y.document.addEventListener("click",e,!1),y.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(n=>{var o,i;const s=(o=y[n])==null?void 0:o.prototype;(i=s==null?void 0:s.hasOwnProperty)!=null&&i.call(s,"addEventListener")&&(tt(s,"addEventListener",function(c){return function(a,u,f){if(a==="click"||a=="keypress")try{const d=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},p=d[a]=d[a]||{refCount:0};if(!p.handler){const l=Oo(t);p.handler=l,c.call(this,a,l,f)}p.refCount++}catch{}return c.call(this,a,u,f)}}),tt(s,"removeEventListener",function(c){return function(a,u,f){if(a==="click"||a=="keypress")try{const d=this.__sentry_instrumentation_handlers__||{},p=d[a];p&&(p.refCount--,p.refCount<=0&&(c.call(this,a,p.handler,f),p.handler=void 0,delete d[a]),Object.keys(d).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return c.call(this,a,u,f)}}))})}function bm(t){if(t.type!==Fr)return!1;try{if(!t.target||t.target._sentryId!==Hr)return!1}catch{}return!0}function vm(t,e){return t!=="keypress"?!1:e!=null&&e.tagName?!(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable):!0}function Oo(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Tm(n);if(vm(n.type,r))return;H(n,"_sentryCaptured",!0),r&&!r._sentryId&&H(r,"_sentryId",it());
28const s=n.type==="keypress"?"input":n.type;bm(n)||(t({event:n,name:s,global:e}),Fr=n.type,Hr=r?r._sentryId:void 0),clearTimeout(ko),ko=y.setTimeout(()=>{Hr=void 0,Fr=void 0},Sm)}}function Tm(t){try{return t.target}catch{return null}}let yn;function Es(t){const e="history";Dt(e,t),Mt(e,Im)}function Im(){if(y.addEventListener("popstate",()=>{const e=y.location.href,n=yn;if(yn=e,n===e)return;ot("history",{from:n,to:e})}),!Ll())return;function t(e){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=yn,o=Rm(String(r));if(yn=o,s===o)return e.apply(this,n);ot("history",{from:s,to:o})}return e.apply(this,n)}}tt(y.history,"pushState",t),tt(y.history,"replaceState",t)}function Rm(t){try{return new URL(t,y.location.origin).toString()}catch{return t}}const Cn={};function Am(t){const e=Cn[t];if(e)return e;let n=y[t];if(Lr(n))return Cn[t]=n.bind(y);const r=y.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const o=s.contentWindow;o!=null&&o[t]&&(n=o[t]),r.head.removeChild(s)}catch(s){Rt&&g.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,s)}return n&&(Cn[t]=n.bind(y))}function wm(t){Cn[t]=void 0}const de="__sentry_xhr_v3__";function Ja(t){const e="xhr";Dt(e,t),Mt(e,Nm)}function Nm(){if(!y.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(e,n,r){const s=new Error,o=$()*1e3,i=yt(r[0])?r[0].toUpperCase():void 0,c=Cm(r[1]);if(!i||!c)return e.apply(n,r);n[de]={method:i,url:c,request_headers:{}},i==="POST"&&c.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=()=>{const u=n[de];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const f={endTimestamp:$()*1e3,startTimestamp:o,xhr:n,virtualError:s};ot("xhr",f),n.removeEventListener("readystatechange",a)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,f,d){return a(),u.apply(f,d)}}):n.addEventListener("readystatechange",a),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,f,d){const[p,l]=d,m=f[de];return m&&yt(p)&&yt(l)&&(m.request_headers[p.toLowerCase()]=l),u.apply(f,d)}}),e.apply(n,r)}}),t.send=new Proxy(t.send,{apply(e,n,r){const s=n[de];if(!s)return e.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const o={startTimestamp:$()*1e3,xhr:n};return ot("xhr",o),e.apply(n,r)}})}function Cm(t){if(yt(t))return t;try{return t.toString()}catch{}}function Pm(t){let e;try{e=t.getAllResponseHeaders()}catch(n){return Rt&&g.error(n,"Failed to get xhr response headers",t),{}}return e?e.split(`\r
29`).reduce((n,r)=>{const[s,o]=r.split(": ");return o&&(n[s.toLowerCase()]=o),n},{}):{}}function km(t){if(typeof Element>"u")return!1;try{return t instanceof Element}catch{return!1}}const Om=40;function Lm(t,e=Am("fetch")){let n=0,r=0;async function s(o){const i=o.body.length;n+=i,r++;const c={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{const a=await e(t.url,c);return{statusCode:a.status,headers:{"x-sentry-rate-limits":a.headers.get("X-Sentry-Rate-Limits"),"retry-after":a.headers.get("Retry-After")}}}catch(a){throw wm("fetch"),a}finally{n-=i,r--}}return kd(t,s,cs(t.bufferSize||Om))}const nt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,xm=30,Dm=50;function Br(t,e,n,r){const s={filename:t,function:e==="<anonymous>"?ee:e,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Mm=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,$m=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Fm=/\((\S*)(?::(\d+))(?::(\d+))\)/,Hm=/at (.+?) ?\(data:(.+?),/,Bm=t=>{var s;const e=t.match(Hm);if(e)return{filename:`<data:${e[2]}>`,function:e[1]};const n=Mm.exec(t);if(n){const[,o,i,c]=n;return Br(o,ee,+i,+c)}const r=$m.exec(t);if(r){if(((s=r[2])==null?void 0:s.indexOf("eval"))===0){const a=Fm.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[i,c]=Xa(r[1]||ee,r[2]);return Br(c,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},Um=[xm,Bm],jm=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Wm=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,qm=t=>{const e=jm.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const o=Wm.exec(e[3]);o&&(e[1]=e[1]||"eval",e[3]=o[1],e[4]=o[2],e[5]="")}let r=e[3],s=e[1]||ee;return[s,r]=Xa(s,r),Br(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},zm=[Dm,qm],Gm=[Um,zm],Vm=mi(...Gm),Xa=(t,e)=>{const n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:ee,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},En=1024,Ym="Breadcrumbs",Jm=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:Ym,setup(n){e.console&&ml(Zm(n)),e.dom&&ym(Qm(n,e.dom)),e.xhr&&Ja(tg(n)),e.fetch&&fs(eg(n)),e.history&&Es(ng(n)),e.sentry&&n.on("beforeSendEvent",Km(n))}}},Xm=Jm;function Km(t){return function(n){w()===t&&se({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:zt(n)},{event:n})}}function Qm(t,e){return function(r){if(w()!==t)return;let s,o,i=typeof e=="object"?e.serializeAttribute:void 0,c=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;c&&c>En&&(nt&&g.warn(`\`dom.maxStringLength\` cannot exceed ${En}, but a value of ${c} was configured. Sentry will use ${En} instead.`),c=En),typeof i=="string"&&(i=[i]);try{const u=r.event,f=rg(u)?u.target:u;s=W(f,{keyAttrs:i,maxStringLength:c}),o=La(f)}catch{s="<unknown>"}if(s.length===0)return;const a={category:`ui.${r.name}`,message:s};o&&(a.data={"ui.component_name":o}),se(a,{event:r.event,name:r.name,global:r.global})}}function Zm(t){return function(n){if(w()!==t)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:hl(n.level),message:xs(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${xs(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;se(r,{input:n.args,level:n.level})}}function tg(t){return function(n){if(w()!==t)return;const{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[de];if(!r||!s||!o)return;const{method:i,url:c,status_code:a,body:u}=o,f={method:i,url:c,status_code:a},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},p={category:"xhr",data:f,type:"http",level:Pa(a)};t.emit("beforeOutgoingRequestBreadcrumb",p,d),se(p,d)}}function eg(t){return function(n){if(w()!==t)return;const{startTimestamp:r,endTimestamp:s}=n;
29if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},i={category:"fetch",data:n.fetchData,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",i,o),se(i,o)}else{const o=n.response,i={...n.fetchData,status_code:o==null?void 0:o.status},c={input:n.args,response:o,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:i,type:"http",level:Pa(i.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",a,c),se(a,c)}}}function ng(t){return function(n){if(w()!==t)return;let r=n.from,s=n.to;const o=Kt(E.location.href);let i=r?Kt(r):void 0;const c=Kt(s);i!=null&&i.path||(i=o),o.protocol===c.protocol&&o.host===c.host&&(s=c.relative),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),se({category:"navigation",data:{from:r,to:s}})}}function rg(t){return!!t&&!!t.target}const sg="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(","),og="BrowserApiErrors",ig=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...t};return{name:og,setupOnce(){e.setTimeout&&tt(E,"setTimeout",Lo),e.setInterval&&tt(E,"setInterval",Lo),e.requestAnimationFrame&&tt(E,"requestAnimationFrame",cg),e.XMLHttpRequest&&"XMLHttpRequest"in E&&tt(XMLHttpRequest.prototype,"send",ug);const n=e.eventTarget;n&&(Array.isArray(n)?n:sg).forEach(s=>fg(s,e))}}},ag=ig;function Lo(t){return function(...e){const n=e[0];return e[0]=ye(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${Tt(t)}`}}),t.apply(this,e)}}function cg(t){return function(e){return t.apply(this,[ye(e,{mechanism:{data:{handler:Tt(t)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function ug(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&tt(n,s,function(o){const i={mechanism:{data:{handler:Tt(o)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},c=Qr(o);return c&&(i.mechanism.data.handler=Tt(c)),ye(o,i)})}),t.apply(this,e)}}function fg(t,e){var s,o;const r=(s=E[t])==null?void 0:s.prototype;(o=r==null?void 0:r.hasOwnProperty)!=null&&o.call(r,"addEventListener")&&(tt(r,"addEventListener",function(i){return function(c,a,u){try{dg(a)&&(a.handleEvent=ye(a.handleEvent,{mechanism:{data:{handler:Tt(a),target:t},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return e.unregisterOriginalCallbacks&&lg(this,c,a),i.apply(this,[c,ye(a,{mechanism:{data:{handler:Tt(a),target:t},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),u])}}),tt(r,"removeEventListener",function(i){return function(c,a,u){try{if(Object.prototype.hasOwnProperty.call(a,"__sentry_wrapped__")){const f=a.__sentry_wrapped__;f&&i.call(this,c,f,u)}}catch{}return i.call(this,c,a,u)}}))}function dg(t){return typeof t.handleEvent=="function"}function lg(t,e,n){t&&typeof t=="object"&&"removeEventListener"in t&&typeof t.removeEventListener=="function"&&t.removeEventListener(e,n)}const pg=(t={})=>{const e=t.lifecycle??"route";return{name:"BrowserSession",setupOnce(){if(typeof E.document>"u"){nt&&g.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}co({ignoreDuration:!0});let n=!1;gs(()=>{n||(dr(),n=!0)});const r=Q();let s=r.getUser();r.addScopeListener(o=>{const i=o.getUser();((s==null?void 0:s.id)!==(i==null?void 0:i.id)||(s==null?void 0:s.ip_address)!==(i==null?void 0:i.ip_address))&&(s=i,n&&dr())}),e==="route"&&Es(({from:o,to:i})=>{o!==i&&(co({ignoreDuration:!0}),dr(),n=!0)})}}},mg="CultureContext",gg=()=>({name:mg,preprocessEvent(t){var n;const e=xo();e&&(t.contexts={...t.contexts,culture:{...e,...(n=t.contexts)==null?void 0:n.culture}})},processSegmentSpan(t){const e=xo();e&&ca(t,{"culture.locale":e.locale,"culture.timezone":e.timezone,"culture.calendar":e.calendar})}}),hg=gg;function xo(){try{const t=E.Intl;if(!t)return;const e=t.DateTimeFormat().resolvedOptions();return{locale:e.locale,timezone:e.timeZone,calendar:e.calendar}}catch{return}}const _g="GlobalHandlers",Sg=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:_g,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(Eg(n),Do("onerror")),e.onunhandledrejection&&(bg(n),Do("onunhandledrejection"))}}},yg=Sg;function Eg(t){gi(e=>{const{stackParser:n,attachStacktrace:r}=Ka();if(w()!==t||xa())return;const{msg:s,url:o,line:i,column:c,error:a}=e,u=Ig(ls(n,a||s,void 0,r,!1),o,i,c);u.level="error",da(u,{originalException:a,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function bg(t){hi(e=>{const{stackParser:n,attachStacktrace:r}=Ka();if(w()!==t||xa())return;const s=vg(e),o=ne(s)?Tg(s):ls(n,s,void 0,r,!0);o.level="error",da(o,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function vg(t){if(ne(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function Tg(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Ig(t,e,n,r){const s=t.exception=t.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},c=i.stacktrace=i.stacktrace||{},a=c.frames=c.frames||[];return a.length===0&&a.push({colno:r,lineno:n,filename:Rg(e)??Se(),function:ee,in_app:!0}),t}function Do(t){nt&&g.log(`Global Handler attached: ${t}`)}function Ka(){const t=w();return(t==null?void 0:t.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}function Rg(t){if(!(!yt(t)||t.length===0))return t.startsWith("data:")?`<${ft(t,!1)}>`:t}const Ag=()=>({name:"HttpContext",preprocessEvent(t){var r;if(!E.navigator&&!E.location&&!E.document)return;const e=Hn(),n={...e.headers,...(r=t.request)==null?void 0:r.headers};t.request={...e,...t.request,headers:n}},processSegmentSpan(t){var r;const e=(r=t.attributes)==null?void 0:r[Y];if(!E.navigator&&!E.location&&!E.document)return;const n=Hn();ca(t,{[Ce]:e!=="http.client"?n.url:void 0,"http.request.header.user_agent":n.headers["User-Agent"],"http.request.header.referer":n.headers.Referer})}}),wg="cause",Ng=5,Cg="LinkedErrors",Pg=(t={})=>{const e=t.limit||Ng,n=t.key||wg;return{name:Cg,preprocessEvent(r,s,o){const i=o.getOptions();ll(ds,i.stackParser,n,e,r,s)}}},kg=Pg,Og=/^HTML(\w*)Element$/;function Qa(t){if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(km(t)){const e=Lg(t);if(Og.test(e))return`[HTMLElement: ${W(t)}]`}}function Lg(t){const e=Object.getPrototypeOf(t);return e!=null&&e.constructor?e.constructor.name:"null prototype"}function xg(){return Dg()?(nt&&oe(()=>{}),!0):!1}function Dg(){var s;if(typeof E.window>"u")return!1;const t=E;if(t.nw)return!1;const e=t.chrome||t.browser;if(!((s=e==null?void 0:e.runtime)!=null&&s.id))return!1;const n=Se();return!(E===E.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(n))}
29function Mg(t){return[sl(),tl(),Rl(),ag(),Xm(),yg(),kg(),yl(),Ag(),hg(),pg()]}function $g(t={}){const e=!t.skipBrowserExtensionCheck&&xg();let n=t.defaultIntegrations==null?Mg():t.defaultIntegrations;const r={...t,enabled:e?!1:t.enabled,stackParser:qc(t.stackParser||Vm),integrations:fd({integrations:t.integrations,defaultIntegrations:n}),transport:t.transport||Lm};return bi(Qa),qd(Zl,r)}function Fg(t){return t.split(",").some(e=>e.trim().startsWith("sentry-"))}function Za(t){try{return new URL(t,E.location.origin).href}catch{return}}function Hg(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function tc(t){try{return new Headers(t)}catch{return}}const ec={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Bg(t,e){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:s,enableHTTPTimings:o,tracePropagationTargets:i,onRequestSpanStart:c,onRequestSpanEnd:a}={...ec,...e},u=typeof s=="function"?s:l=>!0,f=l=>jg(l,i),d={},p=t.getOptions().propagateTraceparent;n&&fs(l=>{const m=Al(l,u,f,d,{propagateTraceparent:p,onRequestSpanEnd:a});if(m){const h=Za(l.fetchData.url),_=h?Kt(h).host:void 0,b=h?ft(h):void 0;m.setAttributes({[oa]:b,[Ce]:b,"server.address":_}),o&&Mo(m,t),c==null||c(m,{headers:l.headers})}}),r&&Ja(l=>{var h;const m=Wg(l,u,f,d,p,a);m&&(o&&Mo(m,t),c==null||c(m,{headers:tc((h=l.xhr.__sentry_xhr_v3__)==null?void 0:h.request_headers)}))})}const Ug=300;function Mo(t,e){const{url:n}=T(t).data;if(!n||typeof n!="string")return;let r=()=>void setTimeout(s);if(gt(e)){const o=t.end.bind(t);t.end=i=>{const c=i??$();let a=!1;const u=()=>{a||(a=!0,setTimeout(s),o(c),clearTimeout(f))};r=u;const f=setTimeout(u,Ug)}}const s=Ee("resource",({entries:o})=>{o.forEach(i=>{Hg(i)&&i.name.endsWith(n)&&(t.setAttributes(Va(i)),r())})})}function jg(t,e){const n=Se();if(n){let r,s;try{r=new URL(t,n),s=new URL(n).origin}catch{return!1}const o=r.origin===s;return e?Et(r.toString(),e)||o&&Et(r.pathname,e):o}else{const r=!!t.match(/^\/(?!\/)/);return e?Et(t,e):r}}function Wg(t,e,n,r,s,o){const i=t.xhr,c=i==null?void 0:i[de];if(!i||i.__sentry_own_request__||!c)return;const{url:a,method:u}=c,f=et()&&e(a);if(t.endTimestamp){const V=i.__sentry_xhr_span_id__;if(!V)return;const x=r[V];x&&(f&&c.status_code!==void 0&&(ki(x,c.status_code),x.end(),o==null||o(x,{headers:tc(Pm(i)),error:t.error})),delete r[V]);return}const d=Za(a),p=Kt(d||a),l=d?ft(d):void 0,m=ft(Vd(a)),h=w(),_=!!Z(),b=_||!!h&&gt(h),L=f&&b?Bt({name:`${u} ${m}`,attributes:{url:ft(a),type:"xhr","http.method":u,"http.url":l,[Ce]:l,"server.address":p==null?void 0:p.host,[O]:"auto.http.browser",[Y]:"http.client",...(p==null?void 0:p.search)&&{"http.query":p==null?void 0:p.search},...(p==null?void 0:p.hash)&&{"http.fragment":p==null?void 0:p.hash}}}):new re,G=na(L)&&_?void 0:L;return f&&!b&&(h==null||h.recordDroppedEvent("no_parent_span","span")),i.__sentry_xhr_span_id__=L.spanContext().spanId,r[i.__sentry_xhr_span_id__]=L,n(a)&&qg(i,et()&&b?G:void 0,s),h&&h.emit("beforeOutgoingRequestSpan",L,t),L}function qg(t,e,n){const{"sentry-trace":r,baggage:s,traceparent:o}=Aa({span:e,propagateTraceparent:n});r&&zg(t,r,s,o)}function zg(t,e,n,r){var o;const s=(o=t.__sentry_xhr_v3__)==null?void 0:o.request_headers;if(!(s!=null&&s["sentry-trace"]||!t.setRequestHeader))try{if(t.setRequestHeader("sentry-trace",e),r&&!(s!=null&&s.traceparent)&&t.setRequestHeader("traceparent",r),n){const i=s==null?void 0:s.baggage;(!i||!Fg(i))&&t.setRequestHeader("baggage",n)}}catch{}}const $o=new WeakMap,Fo=new WeakMap,Gg=9e4,Vg=["text/event-stream","application/x-ndjson","application/stream+json"],Yg=()=>({name:"FetchStreamPerformance",setup(){Ml(t=>{if(t.response){const e=$o.get(t.response);if(e&&t.endTimestamp){e.end(t.endTimestamp);const n=Fo.get(t.response);n&&clearTimeout(n)}}}),fs(t=>{var e,n,r,s;if(t.endTimestamp&&t.response){const o=((e=t.response.headers)==null?void 0:e.get("
29content-type"))||"";if((n=t.response.headers)!=null&&n.get("content-length")||!Vg.some(p=>o.startsWith(p)))return;const i=((r=t.fetchData)==null?void 0:r.url)||"",c=((s=t.fetchData)==null?void 0:s.method)||"GET",a=$n(i),u=i.startsWith("data:")?ft(i):a?Ia(a):i,f=Bt({name:`${c} ${u}`,startTime:t.endTimestamp,attributes:{url:ft(i),"http.method":c,type:"fetch",[Y]:"http.client.stream",[O]:"auto.http.browser.stream"}});$o.set(t.response,f);const d=setTimeout(()=>{f.isRecording()&&f.end()},Gg);Fo.set(t.response,d)}})}}),nc="WebVitals",Jg=(t={})=>{const e=new Set(t.ignore??[]);return{name:nc,setup(n){const r=gt(n),{enableStandaloneClsSpans:s,enableStandaloneLcpSpans:o}=t._experiments??{},i=r||e.has("cls")?void 0:s||!1,c=r||e.has("lcp")?void 0:o||!1,a=Bp({recordClsStandaloneSpans:i,recordLcpStandaloneSpans:c,client:n}),u=new WeakSet;n.on("afterStartPageLoadSpan",f=>{u.add(f)}),n.on("spanEnd",f=>{u.delete(f)&&(a(),Jp(f,{recordClsOnPageloadSpan:i===!1,recordLcpOnPageloadSpan:c===!1,spanStreamingEnabled:r}))}),r?(e.has("lcp")||lm(n),e.has("cls")||mm(n),e.has("inp")||hm()):e.has("inp")||am()},afterAllSetup(){e.has("inp")||dm()}}};function Xg(){E.document?E.document.addEventListener("visibilitychange",()=>{const t=Z();if(!t)return;const e=j(t);if(E.document.hidden&&e){const n="cancelled",{op:r,status:s}=T(e);nt&&g.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||e.setStatus({code:F,message:n}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}}):nt&&g.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Kg=3600,rc="sentry_previous_trace",Qg="sentry.previous_trace";function Zg(t,{linkPreviousTrace:e,consistentTraceSampling:n}){const r=e==="session-storage";let s=r?nh():void 0;t.on("spanStart",i=>{if(j(i)!==i)return;const c=C().getPropagationContext();s=th(s,i,c),r&&eh(s)});let o=!0;n&&t.on("beforeSampling",i=>{if(!s)return;const c=C(),a=c.getPropagationContext();if(o&&a.parentSpanId){o=!1;return}c.setPropagationContext({...a,dsc:{...a.dsc,sample_rate:String(s.sampleRate),sampled:String(Ur(s.spanContext))},sampleRand:s.sampleRand}
29),i.parentSampled=Ur(s.spanContext),i.parentSampleRate=s.sampleRate,i.spanAttributes={...i.spanAttributes,[Ci]:s.sampleRate}})}function th(t,e,n){const r=T(e);function s(){var c,a;try{const u=Number(((c=r.data)==null?void 0:c[ts])??((a=n.dsc)==null?void 0:a.sample_rate));return Number.isNaN(u)?0:u}catch{return 0}}const o={spanContext:e.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!t)return o;const i=t.spanContext;return i.traceId===r.trace_id?t:(Date.now()/1e3-t.startTimestamp<=Kg&&(nt&&g.log(`Adding previous_trace \`${JSON.stringify(i)}\` link to span \`${JSON.stringify({op:r.op,...e.spanContext()})}\``),e.addLink({context:i,attributes:{[Nu]:"previous_trace"}}),e.setAttribute(Qg,`${i.traceId}-${i.spanId}-${Ur(i)?1:0}`)),o)}function eh(t){try{E.sessionStorage.setItem(rc,JSON.stringify(t))}catch(e){nt&&g.warn("Could not store previous trace in sessionStorage",e)}}function nh(){var t;try{const e=(t=E.sessionStorage)==null?void 0:t.getItem(rc);return JSON.parse(e)}catch{return}}function Ur(t){return t.traceFlags===1}const rh="BrowserTracing",sh=/Googlebot|Google-InspectionTool|Storebot-Google|Bingbot|Slurp|DuckDuckBot|Baiduspider|YandexBot|Facebot|facebookexternalhit|LinkedInBot|Twitterbot|Applebot/i;function oh(){const t=E.navigator;return t!=null&&t.userAgent?sh.test(t.userAgent):!1}const ih={...Rn,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...ec},ah=(t={})=>{"enableElementTiming"in t&&oe(()=>{});const e={name:void 0,source:void 0},n=E.document,{enableInp:r,enableLongTask:s,enableLongAnimationFrame:o,_experiments:{enableInteractions:i,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:a},beforeStartSpan:u,idleTimeout:f,finalTimeout:d,childSpanTimeout:p,markBackgroundSpan:l,traceFetch:m,traceXHR:h,trackFetchStreamPerformance:_,shouldCreateSpanForRequest:b,enableHTTPTimings:L,ignoreResourceSpans:G,ignorePerformanceApiSpans:V,instrumentPageLoad:x,instrumentNavigation:at,detectRedirects:v,linkPreviousTrace:z,consistentTraceSampling:xe,enableReportPageLoaded:Ut,onRequestSpanStart:jt,onRequestSpanEnd:De}={...ih,...t},lt=oh();let D,ht;function At(A,M,rt=!0,N){const k=M.op==="pageload",B=M.name,ct=u?u(M):M,ut=$n(N||Se()),Wt={...(ut==null?void 0:ut.pathname)&&{[jf]:ut.pathname},...ut&&!us(ut)&&{[Ce]:ut.href},...ct.attributes};if(B!==ct.name&&(Wt[U]="custom"),ct.attributes=Wt,!rt){const $e=ie();Bt({...ct,startTime:$e}).end($e);return}e.name=ct.name,e.source=Wt[U];const Me=ra(ct,{idleTimeout:f,finalTimeout:d,childSpanTimeout:p,disableAutoFinish:k,beforeSpanEnd:$e=>{Yp($e,{ignoreResourceSpans:G,ignorePerformanceApiSpans:V,spanStreamingEnabled:gt(A)}),Uo(A,void 0);const Is=C(),Sc=Is.getPropagationContext();Is.setPropagationContext({...Sc,traceId:Me.spanContext().traceId,sampled:Ht(Me),dsc:Ne($e)}),k&&(ht=void 0)},trimIdleSpanEndTimestamp:!Ut});k&&Ut&&(ht=Me),Uo(A,Me);function rr(){n&&["interactive","complete"].includes(n.readyState)&&(A.emit("idleSpanEnableAutoFinish",Me),n.removeEventListener("readystatechange",rr))}k&&!Ut&&n&&(n.addEventListener("readystatechange",rr),rr())}return{name:rh,setup(A){var rt;if(lt){nt&&g.log("[Tracing] Skipping browserTracingIntegration setup for bot user agent.");return}if(nf(),o&&I.PerformanceObserver&&((rt=PerformanceObserver.supportedEntryTypes)!=null&&rt.includes("long-animation-frame"))?jp():s&&Up(),i&&Wp(),v&&n){const N=()=>{D=$()};addEventListener("click",N,{capture:!0}),addEventListener("keydown",N,{capture:!0,passive:!0})}function M(){const N=Ke(A);N&&!T(N).timestamp&&(nt&&g.log(`[Tracing] Finishing current active span with op: ${T(N).op}`),N.setAttribute(ze,"cancelled"),N.end())}A.on("startNavigationSpan",(N,k)=>{if(w()!==A)return;if(k!=null&&k.isRedirect){nt&&g.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),At(A,{op:"navigation.redirect",...N},!1,k.url);return}D=void 0,M(),Q().setPropagationContext({traceId:It(),sampleRand:Math.random(),propagationSpanId:et()?void 0:bt()});const B=C();B.setPropagationContext({traceId:It(),sampleRand:Math.random(),propagationSpanId:et()?void 0:bt()}),B.setSDKProcessingMetadata({normalizedRequest:void 0}),At(A,{op:"navigation",...N,parentSpan:null,forceTransaction:!0},!0,k==null?void 0:k.url)}),A.on("startPageLoadSpan",(N,k={})=>
29{if(w()!==A)return;M();const B=k.sentryTrace||Ho("sentry-trace")||Bo("sentry-trace"),ct=k.baggage||Ho("baggage")||Bo("baggage"),ut=Yu(B,ct),Wt=C();Wt.setPropagationContext(ut),et()||(Wt.getPropagationContext().propagationSpanId=bt()),Wt.setSDKProcessingMetadata({normalizedRequest:Hn()}),At(A,{op:"pageload",...N})}),A.on("endPageloadSpan",()=>{Ut&&ht&&(ht.setAttribute(ze,"reportPageLoaded"),ht.end())})},afterAllSetup(A){var rt;if(lt)return;A.addIntegration&&!((rt=A.getIntegrationByName)!=null&&rt.call(A,nc))&&A.addIntegration(Jg({ignore:r?[]:["inp"],_experiments:{enableStandaloneClsSpans:c,enableStandaloneLcpSpans:a}}));let M=Se();if(z!=="off"&&Zg(A,{linkPreviousTrace:z,consistentTraceSampling:xe}),E.location){if(x){const N=q();sc(A,{name:E.location.pathname,startTime:N?N/1e3:void 0,attributes:{[U]:"url",[O]:"auto.pageload.browser"}})}at&&Es(({to:N,from:k})=>{if(k===void 0&&(M==null?void 0:M.indexOf(N))!==-1){M=void 0;return}M=void 0;const B=$n(N),ct=Ke(A),ut=ct&&v&&uh(ct,D);oc(A,{name:(B==null?void 0:B.pathname)||E.location.pathname,attributes:{[U]:"url",[O]:"auto.navigation.browser"}},{url:N,isRedirect:ut})})}l&&Xg(),i&&ch(A,f,d,p,e),Bg(A,{traceFetch:m,traceXHR:h,tracePropagationTargets:A.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:b,enableHTTPTimings:L,onRequestSpanStart:jt,onRequestSpanEnd:De}),_&&A.addIntegration(Yg())}}};function sc(t,e,n){t.emit("startPageLoadSpan",e,n),C().setTransactionName(e.name);const r=Ke(t);return r&&t.emit("afterStartPageLoadSpan",r),r}function oc(t,e,n){const{url:r,isRedirect:s}=n||{};t.emit("beforeStartNavigationSpan",e,{isRedirect:s,url:r}),t.emit("startNavigationSpan",e,{isRedirect:s,url:r});const o=C();return o.setTransactionName(e.name),r&&!s&&o.setSDKProcessingMetadata({normalizedRequest:{...Hn(),url:r}}),Ke(t)}function Ho(t){const e=E.document,n=e==null?void 0:e.querySelector(`meta[name=${t}]`);return(n==null?void 0:n.getAttribute("content"))||void 0}function Bo(t){var r,s,o;const e=(s=(r=E.performance)==null?void 0:r.getEntriesByType)==null?void 0:s.call(r,"navigation")[0],n=(o=e==null?void 0:e.serverTiming)==null?void 0:o.find(i=>i.name===t);return n==null?void 0:n.description}function ch(t,e,n,r,s){const o=E.document;let i;const c=()=>{const a="ui.action.click",u=Ke(t);if(u){const f=T(u).op;if(["navigation","pageload"].includes(f)){nt&&g.warn(`[Tracing] Did not create ${a} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(ze,"interactionInterrupted"),i.end(),i=void 0),!s.name){nt&&g.warn(`[Tracing] Did not create ${a} transaction because _latestRouteName is missing.`);return}i=ra({name:s.name,op:a,attributes:{[U]:s.source||"url"}},{idleTimeout:e,finalTimeout:n,childSpanTimeout:r})};o&&addEventListener("click",c,{capture:!0})}const ic="_sentry_idleSpan";function Ke(t){return t[ic]}function Uo(t,e){H(t,ic,e)}const jo=1.5;function uh(t,e){const n=T(t),r=ie(),s=n.start_timestamp;return!(r-s>jo||e&&r-e<=jo)}function fh(t){return We(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function Yh(t){const e={...t};Ra(e,"react"),nd("react",{version:Ot.version});const n=$g(e);return bi(dh),n}function dh(t){return fh(t)?"[SyntheticEvent]":Qa(t)}function lh(t){const e=t.match(/^([^.]+)/);return e!==null&&parseInt(e[0])>=17}function ph(t,e){const n=new WeakSet;function r(s,o){if(!n.has(s)){if(s.cause)return n.add(s),r(s.cause,o);s.cause=o}}r(t,e)}function Jh(t,{componentStack:e},n){if(lh(Ot.version)&&pt(t)&&e){const r=new Error(t.message);r.name=`React ErrorBoundary ${t.name}`,r.stack=e,ph(t,r)}return fa(t,n)}const mh={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},gh={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},hh={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},ac={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},_h=Symbol.for("react.forward_ref"),cc=Symbol.for("react.memo");function Sh(t){return typeof t=="object"&&t!==null&&t.$$typeof===cc}const bs={};bs[_h]=hh;bs[cc]=ac;function Wo(t){if(Sh(t))return ac;const e=t.$$typeof;return e&&bs[e]||mh}const yh=Object.defineProperty.bind(Object),Eh=Object.getOwnPropertyNames.bind(Object);var ni;const qo=(ni=Object.getOwnPropertySymbols)==null?void 0:ni.bind(Object),zo=Object.getOwnPropertyDescriptor.bind(Object),bh=Object.getPrototypeOf.bind(Object),Go=Object.prototype;function uc(t,e,n){if(typeof e!="string"){if(Go){const i=bh(e);i&&i!==Go&&uc(t,i)}let r=Eh(e);qo&&(r=r.concat(qo(e)));const s=Wo(t),o=Wo(e);for(const i of r)if(!gh[i]&&!(o!=null&&o[i])&&!(s!=null&&s[i])&&!zo(t,i)){const c=zo(e,i);if(c)try{yh(t,i,c)}catch{}}}return t}const dt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Le(t,e){if(!e||e==="/"||!t.toLowerCase().startsWith(e.toLowerCase()))return t;const n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?t:t.slice(n)||"/"}const Vo=new WeakMap;function vh(t,e,n){if(!t||!(e!=null&&e.length))return null;const r=n?Le(t,n):t;let s=Vo.get(e);s||(s=Nh(e),Vo.set(e,s),dt&&g.log("[React Router] Sorted route manifest by specificity:",s.length,"patterns"));for(const o of s)if(Th(r,o))return dt&&g.log("[React Router] Matched pathname",r,"to pattern",o),o;return dt&&g.log("[React Router] No manifest match found for pathname:",r),null}function Th(t,e){if(e==="/")return t==="/"||t==="";const n=Jo(t),r=Jo(e);if(r.length>0&&r[r.length-1]==="*"){const o=r.slice(0,-1);if(n.length<o.length)return!1;for(const[i,c]of o.entries())if(!Yo(n[i],c))return!1;return!0}if(n.length!==r.length)return!1;for(const[o,i]of r.entries())if(!Yo(n[o],i))return!1;return!0}function Yo(t,e){return t===void 0||e===void 0?!1:fc.test(e)?!0:t===e}
29function Jo(t){return t.split("/").filter(Boolean)}const fc=/^:[\w-]+$/,Ih=10,Rh=3,Ah=1,wh=-2;function Xo(t){const e=t.split("/");let n=e.length;e.includes("*")&&(n+=wh);for(const r of e)r!=="*"&&(fc.test(r)?n+=Rh:r===""?n+=Ah:n+=Ih);return n}function Nh(t){return[...t].sort((e,n)=>{const r=Xo(e);return Xo(n)-r})}let tr,Qt=!1;function Ch(t,e=!1){tr=t,Qt=e}function Ph(t){return lc(t.route.path||"")}function dc(t){return t.params["*"]||""}function lc(t){return t[t.length-1]==="*"?t.slice(0,-1):t}function Zt(t){return t[t.length-1]==="/"?t.slice(0,-1):t}function pc(t){return t.endsWith("*")}function be(t){return t.includes("/*")||t.endsWith("*")}function Ko(t,e){var n;return pc(t)&&!!((n=e.route.children)!=null&&n.length)||!1}function mc(t){var e;return!!(!t.children&&t.element&&((e=t.path)!=null&&e.endsWith("/*")))}function kh(t,e,n){const r=t&&t.length>0?t:Qt?Le(e,n):e;let s=r.slice(-2)==="/*"?r.slice(0,-2):r;return s.length>1&&s[s.length-1]==="/"&&(s=s.slice(0,-1)),[s,"route"]}function Qo(t){return t.split(/\\?\//).filter(e=>e.length>0&&e!==",").length}function Ct(t){return t[0]==="/"?t:`/${t}`}function vs(t,e){const n=tr(t,e);if(!n||n.length===0)return"";for(const r of n)if(r.route.path&&r.route.path!=="*"){const s=Ph(r),o=Le(e.pathname,Ct(r.pathnameBase));return e.pathname===o?Zt(o):Zt(Zt(s||"")+Ct(vs(t.filter(i=>i!==r.route),{pathname:o})))}return""}function Oh(t,e,n){const r=e.filter(mc);if(!r.length)return;const s=tr(r,t),o=s==null?void 0:s[s.length-1];if(!o||!dc(o))return;const i=Zt(lc(o.route.path||""));if(!i)return;const c=Ct(i),a=i.split("/")[0],u=(a==null?void 0:a.startsWith(":"))&&(n==null?void 0:n.split("/").includes(a));if(n===c||n!=null&&n.startsWith(`${c}/`)||u)return;const f=Le(t.pathname,Ct(o.pathnameBase))||"/",d=vs(e.filter(p=>p!==o.route),{pathname:f});return d?Ct(`${i}${Ct(d)}`):void 0}function Lh(t,e){const n=tr(e,t);if(n){for(const r of n)if(mc(r.route)&&dc(r))return!0}return!1}function Zo(t,e){return Qt?Le(t.pathname,e):t.pathname||""}function xh(t,e,n,r=""){if(!t||t.length===0)return[Qt?Le(e.pathname,r):e.pathname,"url"];if(!n)return[Zo(e,r),"url"];let s="";for(const o of n){const i=o.route;if(!i)continue;if(i.index)return kh(s,o.pathname,r);const c=i.path;if(!c||Ko(c,o))continue;const a=c[0]==="/"||s[s.length-1]==="/"?c:`/${c}`;if(s=Zt(s)+Ct(a),Zt(e.pathname)===Zt(r+o.pathname))return Qo(s)!==Qo(o.pathname)&&!pc(s)?[(Qt?"":r)+a,"route"]:(Ko(s,o)&&(s=s.slice(0,-1)),[(Qt?"":r)+s,"route"])}return[Zo(e,r),"url"]}function Ts(t,e,n,r,s="",o,i){if(i&&o&&o.length>0){const d=vh(t.pathname,o,s);if(d)return[(Qt?"":s)+d,"route"]}let c,a="url";
29const u=Lh(t,n);u&&(c=Ct(vs(n,t)),a="route"),(!u||!c)&&([c,a]=xh(e,t,r,s));const f=Oh(t,n,c);return f?[f,"route"]:[c||t.pathname,a]}function gc(){const t=Z(),e=t?j(t):void 0;if(!e)return;const n=T(e).op;return n==="navigation"||n==="pageload"?e:void 0}let jr,Pn,kn,On,ve,er=!1,Vt=3e3,nr;const hc=new WeakSet,ti=E!=null&&E.document?Ot.useLayoutEffect:Ot.useEffect,Gt=new WeakMap,te=new Set,Dh=new WeakMap;function Mh(t){return`${t.pathname}${t.search||""}${t.hash||""}`}function ei(t){return t.includes(":")||t.includes("*")}function $h(t,e,n,r){var o;if(!t)return{skip:!1,shouldUpdate:!1};if(t.locationKey===e&&(t.isPlaceholder||!r)){const i=!!t.routeName&&be(t.routeName),c=be(n),a=!!t.routeName&&ei(t.routeName),u=ei(n),f=i&&!c,d=!a&&u,p=n!==t.routeName&&n.length>(((o=t.routeName)==null?void 0:o.length)||0)&&!c;return{skip:!0,shouldUpdate:!!(t.routeName&&(f||d||p))}}return{skip:!1,shouldUpdate:!1}}function Fh(t,e){const n=ah({...t,instrumentPageLoad:!1,instrumentNavigation:!1}),{useEffect:r,useLocation:s,useNavigationType:o,createRoutesFromChildren:i,matchRoutes:c,stripBasename:a,enableAsyncRouteHandlers:u=!1,instrumentPageLoad:f=!0,instrumentNavigation:d=!0,lazyRouteTimeout:p,lazyRouteManifest:l}=t;return{...n,setup(m){n.setup(m);const h=t.finalTimeout??3e4,_=(t.idleTimeout??1e3)*3,b=p??_;b===1/0?(Vt=h,dt&&g.log("[React Router] lazyRouteTimeout set to Infinity, capping at finalTimeout:",h,"ms to prevent indefinite hangs")):Number.isNaN(b)?(dt&&g.warn("[React Router] lazyRouteTimeout must be a number, falling back to default:",_),Vt=_):b<0?(dt&&g.warn("[React Router] lazyRouteTimeout must be non-negative or Infinity, got:",b,"falling back to:",_),Vt=_):Vt=b,jr=r,Pn=s,kn=o,ve=c,On=i,er=u,nr=l,Ch(c,a||!1)},afterAllSetup(m){var _;n.afterAllSetup(m);const h=(_=E.location)==null?void 0:_.pathname;f&&h&&sc(m,{name:h,attributes:{[U]:"url",[Y]:"pageload",[O]:`auto.pageload.react.reactrouter${`_v${e}`}`}}),d&&hc.add(m)}}}function Hh(t){const{location:e,routes:n,navigationType:r,version:s,matches:o,basename:i,allRoutes:c}=t,a=Array.isArray(o)?o:ve(c||n,e,i),u=w();if(!u||!hc.has(u))return;const f=gc();if(!(f&&T(f).op==="pageload"&&r==="POP")&&(r==="PUSH"||r==="POP")&&a){const[d,p]=Ts(e,c||n,c||n,a,i,nr,er),l=Mh(e),m=Gt.get(u),h=m&&!m.isPlaceholder?!!T(m.span).timestamp:!1,{skip:_,shouldUpdate:b}=$h(m,l,d,h);if(_){if(b&&m){const x=m.routeName;m.isPlaceholder?(m.routeName=d,dt&&g.log(`[Tracing] Updated placeholder navigation name from "${x}" to "${d}" (will apply to real span)`)):(m.span.updateName(d),m.span.setAttribute(U,p),p==="route"&&m.span.setAttribute(Mn,d),H(m.span,"__sentry_navigation_name_set__",!0),m.routeName=d,dt&&g.log(`[Tracing] Updated navigation span name from "${x}" to "${d}"`))}else dt&&g.log(`[Tracing] Skipping duplicate navigation for location: ${l}`);return}const G={span:{end:()=>{}},routeName:d,pathname:e.pathname,locationKey:l,isPlaceholder:!0};Gt.set(u,G);let V;try{V=oc(u,{name:G.routeName,attributes:{[U]:p,[Y]:"navigation",[O]:`auto.navigation.react.reactrouter${s?`_v${s}`:""}`,...p==="route"&&{[Mn]:G.routeName}}})}catch(x){throw Gt.delete(u),x}V?(Gt.set(u,{span:V,routeName:G.routeName,pathname:e.pathname,locationKey:l}),Wr(V,e,n,i,"navigation")):Gt.delete(u)}}function Bh(t){const e=[];return t.forEach(n=>{_c(n).forEach(s=>{te.add(s),e.push(s)})}),e}function Uh(t){t.forEach(e=>{te.delete(e)})}function _c(t,e=new Set){return e.has(t)||(e.add(t),t.children&&!t.index&&t.children.forEach(n=>{_c(n,e).forEach(s=>{e.add(s)})})),e}function jh({activeRootSpan:t,location:e,routes:n,matches:r,basename:s,allRoutes:o}){const i=Array.isArray(r)?r:ve(o||n,e,s);if(i){const[c,a]=Ts(e,o||n,o||n,i,s,nr,er);C().setTransactionName(c||"/"),t&&(t.updateName(c),t.setAttribute(U,a),a==="route"&&t.setAttribute(Mn,c),Wr(t,e,n,s,"pageload"))}else t&&Wr(t,e,n,s,"pageload")}function Wh(t,e,n,r,s=!1){return n?!!(!t&&s||t&&be(t)&&r==="route"&&!be(n)||e!=="route"&&r==="route"):!1}function yr(t,e,n,r,s,o,i,c){var a;try{const u=(a=e.data)==null?void 0:a[U];if(u==="route"&&n&&!be(n))return;const f=Array.from(c),d=f.length>0?f:s,p=ve(d,r,o);if(!p)return;const[l,m]=Ts(r,d,d,p,o,nr,er),h=Wh(n,u,l,m,!0),_=i==="pageload"||!e.timestamp;h&&_&&(t.updateName(l),t.setAttribute(U,m),m==="route"&&t.setAttribute(Mn,l))}catch(u){dt&&g.warn(`Error updating span details before ending: ${u}`)}}function Wr(t,e,n,r,s){const o=`__sentry_${s}_end_patched__`;if((t==null?void 0:t[o])||!t.end)return;const c=t.end.bind(t);let a=!1;t.end=function(...f){var V;if(a)return;a=!0;const d=f.length>0?f[0]:Date.now()/1e3,p=T(t),l=p.description,m=(V=p.data)==null?void 0:V[U],h=()=>{const x=w();if(x&&s==="navigation"){const at=Gt.get(x);at&&at.span===t&&Gt.delete(x)}},_=Dh.get(t),b=t.__sentry_may_have_lazy_routes__;if((_&&_.size>0||b)&&l&&(be(l)||m!=="route")){if(Vt===0){yr(t,p,l,e,n,r,s,te),h(),c(d);return}const x=new Promise(v=>setTimeout(v,Vt));let at;if(_&&_.size>0){const v=Promise.allSettled(_).then(()=>{});at=Vt===1/0?v:Promise.race([v,x])}else at=x;at.then(()=>{const v=T(t);
29yr(t,v,v.description,e,n,r,s,te),h(),c(d)}).catch(()=>{h(),c(d)});return}yr(t,p,l,e,n,r,s,te),h(),c(d)},H(t,o,!0)}function qh(t,e){if(!jr||!Pn||!kn||!On||!ve)return dt&&g.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.
30      useEffect: ${jr}. useLocation: ${Pn}. useNavigationType: ${kn}.
31      createRoutesFromChildren: ${On}. matchRoutes: ${ve}.`),t;const n=r=>{const s=Ot.useRef(!0),o=Pn(),i=kn(),c=On(r.children);return ti(()=>{const a=Bh(c);return()=>Uh(a)}),ti(()=>{s.current?(jh({activeRootSpan:gc(),location:o,routes:c,allRoutes:Array.from(te)}),s.current=!1):Hh({location:o,routes:c,navigationType:i,version:e,allRoutes:Array.from(te)})},[o,i]),Ot.createElement(t,{...r})};return uc(n,t),n}function Xh(t){return Fh(t,"6")}function Kh(t){return qh(t,"6")}export{zh as R,Mc as a,Xh as b,fa as c,Gh as d,Jh as e,Ec as g,Yh as i,Ot as r,Vh as s,Kh as w};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.