import"./_commonjsHelpers.DLRdUVbD.js";import{u as ro}from"./_baseToString.BF64sBRd.js";import{g as so}from"./device-id-helpers.B2Idniwd.js";import"./v4.BUi6ZNk5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="173a43ce-5eda-4d8e-86a4-1424bac7941a",e._sentryDebugIdIdentifier="sentry-dbid-173a43ce-5eda-4d8e-86a4-1424bac7941a")}catch{}})();const jr=Object.prototype.toString;function ye(e){switch(jr.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ie(e,Error)}}function je(e,t){return jr.call(e)===`[object ${t}]`}function qr(e){return je(e,"ErrorEvent")}function Gn(e){return je(e,"DOMError")}function oo(e){return je(e,"DOMException")}function oe(e){return je(e,"String")}function kn(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Rn(e){return e===null||kn(e)||typeof e!="object"&&typeof e!="function"}function Re(e){return je(e,"Object")}function Lt(e){return typeof Event<"u"&&ie(e,Event)}function io(e){return typeof Element<"u"&&ie(e,Element)}function ao(e){return je(e,"RegExp")}function $t(e){return!!(e&&e.then&&typeof e.then=="function")}function co(e){return Re(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ie(e,t){try{return e instanceof t}catch{return!1}}function Gr(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function Ee(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function wt(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;ruo(e,r,n))}function fo(e,t,n=250,r,s,o,i){if(!o.exception||!o.exception.values||!i||!ie(i.originalException,Error))return;const a=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;a&&(o.exception.values=lo(en(e,t,s,i.originalException,r,o.exception.values,a,0),n))}function en(e,t,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(ie(r[s],Error)){Wn(i,a);const u=e(t,r[s]),d=c.length;Yn(u,s,d,a),c=en(e,t,n,r[s],s,[u,...c],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(ie(u,Error)){Wn(i,a);const f=e(t,u),p=c.length;Yn(f,`errors[${d}]`,p,a),c=en(e,t,n,u,s,[f,...c],f,p)}}),c}function Wn(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function Yn(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function lo(e,t){return e.map(n=>(n.value&&(n.value=Ee(n.value,t)),n))}const Te="8.30.0",E=globalThis;function Ft(e,t,n){const r=E,s=r.__SENTRY__=r.__SENTRY__||{},o=s[Te]=s[Te]||{};return o[e]||(o[e]=t())}const $e=E,po=80;function we(e,t={}){if(!e)return"";try{let n=e;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||po;for(;n&&o++1&&i+s.length*c+u.length>=f));)s.push(u),i+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return""}}function mo(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if($e.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t&&t.length?t.filter(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(s&&s.length)s.forEach(i=>{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const i=n.className;if(i&&oe(i)){const a=i.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const o=["aria-label","type","name","title","alt"];for(const i of o){const a=n.getAttribute(i);a&&r.push(`[${i}="${a}"]`)}return r.join("")}function ho(){try{return $e.document.location.href}catch{return""}}function go(e){return $e.document&&$e.document.querySelector?$e.document.querySelector(e):null}function Wr(e){if(!$e.HTMLElement)return null;let t=e;const n=5;for(let r=0;r"u"||__SENTRY_DEBUG__,_o="Sentry Logger ",Nt=["debug","info","warn","error","log","assert","trace"],Ct={};function nt(e){if(!("console"in E))return e();const t=E.console,n={},r=Object.keys(Ct);r.forEach(s=>{const o=Ct[s];n[s]=t[s],t[s]=o});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function So(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return qe?Nt.forEach(n=>{t[n]=(...r)=>{e&&nt(()=>{E.console[n](`${_o}[${n}]:`,...r)})}}):Nt.forEach(n=>{t[n]=()=>{}}),t}const l=Ft("logger",So),yo=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Eo(e){return e==="http"||e==="https"}function rt(e,t=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function bo(e){const t=yo.exec(e);if(!t){nt(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",o="",i="",a=""]=t.slice(1);let c="",u=a;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const f=u.match(/^\d+/);f&&(u=f[0])}return Yr({host:o,pass:s,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Yr(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function To(e){if(!qe)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(l.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?Eo(r)?t&&isNaN(parseInt(t,10))?(l.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(l.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(l.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Io(e){const t=typeof e=="string"?bo(e):Yr(e);if(!(!t||!To(t)))return t}class Q extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function q(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);typeof s=="function"&&zr(s,r),e[t]=s}function W(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{qe&&l.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function zr(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,W(e,"__sentry_original__",t)}catch{}}function wn(e){return e.__sentry_original__}function vo(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function Xr(e){if(ye(e))return{message:e.message,name:e.name,stack:e.stack,...Xn(e)};if(Lt(e)){const t={type:e.type,target:zn(e.target),currentTarget:zn(e.currentTarget),...Xn(e)};return typeof CustomEvent<"u"&&ie(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function zn(e){try{return io(e)?we(e):Object.prototype.toString.call(e)}catch{return""}}function Xn(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function ko(e,t=40){const n=Object.keys(Xr(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return Ee(r,t);for(let s=n.length;s>0;s--){const o=n.slice(0,s).join(", ");if(!(o.length>t))return s===n.length?o:Ee(o,t)}return""}function P(e){return tn(e,new Map)}function tn(e,t){if(Ro(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const s of Object.keys(e))typeof e[s]<"u"&&(r[s]=tn(e[s],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(s=>{r.push(tn(s,t))}),r}return e}function Ro(e){if(!Re(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const Jr=50,Ne="?",Jn=/\(error: (.*)\)/,Kn=/captureMessage|captureException/;function Kr(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const o=[],i=n.split(` `);for(let a=r;a1024)continue;const u=Jn.test(c)?c.replace(Jn,"$1"):c;if(!u.match(/\S*Error: /)){for(const d of t){const f=d(u);if(f){o.push(f);break}}if(o.length>=Jr+s)break}}return No(o.slice(s))}}function wo(e){return Array.isArray(e)?Kr(...e):e}function No(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(mt(t).function||"")&&t.pop(),t.reverse(),Kn.test(mt(t).function||"")&&(t.pop(),Kn.test(mt(t).function||"")&&t.pop()),t.slice(0,Jr).map(n=>({...n,filename:n.filename||mt(t).filename,function:n.function||Ne}))}function mt(e){return e[e.length-1]||{}}const Yt="";function ae(e){try{return!e||typeof e!="function"?Yt:e.name||Yt}catch{return Yt}}function Vn(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const Tt={},Zn={};function me(e,t){Tt[e]=Tt[e]||[],Tt[e].push(t)}function he(e,t){Zn[e]||(t(),Zn[e]=!0)}function z(e,t){const n=e&&Tt[e];if(n)for(const r of n)try{r(t)}catch(s){qe&&l.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${ae(r)} Error:`,s)}}function Vr(e){const t="console";me(t,e),he(t,Co)}function Co(){"console"in E&&Nt.forEach(function(e){e in E.console&&q(E.console,e,function(t){return Ct[e]=t,function(...n){z("console",{args:n,level:e});const s=Ct[e];s&&s.apply(E.console,n)}})})}const nn=E;function Zr(){if(!("fetch"in nn))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function rn(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Qr(){if(typeof EdgeRuntime=="string")return!0;if(!Zr())return!1;if(rn(nn.fetch))return!0;let e=!1;const t=nn.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=rn(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){qe&&l.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}const es=1e3;function st(){return Date.now()/es}function Ao(){const{performance:e}=E;if(!e||!e.now)return st;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/es}const F=Ao(),j=(()=>{const{performance:e}=E;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=sts(void 0,t))}function xo(e){const t="fetch-body-resolved";me(t,e),he(t,()=>ts(Po))}function ts(e,t=!1){t&&!Qr()||q(E,"fetch",function(n){return function(...r){const{method:s,url:o}=Do(r),i={args:r,fetchData:{method:s,url:o},startTimestamp:F()*1e3};e||z("fetch",{...i});const a=new Error().stack;return n.apply(E,r).then(async c=>(e?e(c):z("fetch",{...i,endTimestamp:F()*1e3,response:c}),c),c=>{throw z("fetch",{...i,endTimestamp:F()*1e3,error:c}),ye(c)&&c.stack===void 0&&(c.stack=a,W(c,"framesToPop",1)),c})}})}async function Oo(e,t){if(e&&e.body&&e.body.getReader){const n=e.body.getReader();async function r({done:s}){if(s)return Promise.resolve();try{const o=await Promise.race([n.read(),new Promise(i=>{setTimeout(()=>{i({done:!0})},5e3)})]);await r(o)}catch{}}return n.read().then(r).then(t).catch(()=>{})}}async function Po(e){let t;try{t=e.clone()}catch{return}await Oo(t,()=>{z("fetch-body-resolved",{endTimestamp:F()*1e3,response:e})})}function sn(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Qn(e){return typeof e=="string"?e:e?sn(e,"url")?e.url:e.toString?e.toString():"":""}function Do(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Qn(n),method:sn(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Qn(t),method:sn(t,"method")?String(t.method).toUpperCase():"GET"}}let ht=null;function ns(e){const t="error";me(t,e),he(t,Mo)}function Mo(){ht=E.onerror,E.onerror=function(e,t,n,r,s){return z("error",{column:r,error:s,line:n,msg:e,url:t}),ht&&!ht.__SENTRY_LOADER__?ht.apply(this,arguments):!1},E.onerror.__SENTRY_INSTRUMENTED__=!0}let gt=null;function rs(e){const t="unhandledrejection";me(t,e),he(t,Lo)}function Lo(){gt=E.onunhandledrejection,E.onunhandledrejection=function(e){return z("unhandledrejection",e),gt&&!gt.__SENTRY_LOADER__?gt.apply(this,arguments):!0},E.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function $o(){return"npm"}function Fo(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(s){if(e)return t.has(s)?!0:(t.add(s),!1);for(let o=0;oMath.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function ss(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function de(e){const{message:t,event_id:n}=e;if(t)return t;const r=ss(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function on(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=t||""),o.type||(o.type="Error")}function Ce(e,t){const n=ss(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const o={...s&&s.data,...t.data};n.mechanism.data=o}}function er(e){if(e&&e.__sentry_captured__)return!0;try{W(e,"__sentry_captured__",!0)}catch{}return!1}function os(e){return Array.isArray(e)?e:[e]}function ne(e,t=100,n=1/0){try{return an("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function is(e,t=3,n=100*1024){const r=ne(e,t);return jo(r)>n?is(e,t-1,n):r}function an(e,t,n=1/0,r=1/0,s=Fo()){const[o,i]=s;if(t==null||["number","boolean","string"].includes(typeof t)&&!Number.isNaN(t))return t;const a=Ho(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(o(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const m=u.toJSON();return an("",m,c-1,r,s)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const p=Xr(t);for(const m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(f>=r){d[m]="[MaxProperties ~]";break}const h=p[m];d[m]=an(m,h,c-1,r,s),f++}return i(t),d}function Ho(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Gr(t))return"[VueViewModel]";if(co(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${ae(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=Uo(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Uo(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Bo(e){return~-encodeURI(e).split(/%..|./).length}function jo(e){return Bo(JSON.stringify(e))}var te;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(te||(te={}));function Ae(e){return new Y(t=>{t(e)})}function At(e){return new Y((t,n)=>{n(e)})}class Y{constructor(t){Y.prototype.__init.call(this),Y.prototype.__init2.call(this),Y.prototype.__init3.call(this),Y.prototype.__init4.call(this),this._state=te.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new Y((r,s)=>{this._handlers.push([!1,o=>{if(!t)r(o);else try{r(t(o))}catch(i){s(i)}},o=>{if(!n)s(o);else try{r(n(o))}catch(i){s(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new Y((n,r)=>{let s,o;return this.then(i=>{o=!1,s=i,t&&t()},i=>{o=!0,s=i,t&&t()}).then(()=>{if(o){r(s);return}n(s)})})}__init(){this._resolve=t=>{this._setResult(te.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(te.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===te.PENDING){if($t(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===te.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===te.RESOLVED&&n[1](this._value),this._state===te.REJECTED&&n[2](this._value),n[0]=!0)})}}}function qo(e){const t=[];function n(){return e===void 0||t.lengthr(a)).then(null,()=>r(a).then(null,()=>{})),a}function o(i){return new Y((a,c)=>{let u=t.length;if(!u)return a(!0);const d=setTimeout(()=>{i&&i>0&&a(!1)},i);t.forEach(f=>{Ae(f).then(()=>{--u||(clearTimeout(d),a(!0))},c)})})}return{$:t,add:s,drain:o}}function Ie(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const Go=["fatal","error","warning","log","info","debug"];function as(e){return e==="warn"?"warning":Go.includes(e)?e:"log"}const cn="baggage",cs="sentry-",Wo=/^sentry-/,Yo=8192;function us(e){const t=zo(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,o])=>{if(s.match(Wo)){const i=s.slice(cs.length);r[i]=o}return r},{});if(Object.keys(n).length>0)return n}function ds(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${cs}${r}`]=s),n),{});return Xo(t)}function zo(e){if(!(!e||!oe(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=tr(n);return Object.entries(r).forEach(([s,o])=>{t[s]=o}),t},{}):tr(e)}function tr(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Xo(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,i=s===0?o:`${t},${o}`;return i.length>Yo?(qe&&l.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):i},"")}const Jo=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Ko(e){if(!e)return;const t=e.match(Jo);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function Vo(e,t){const n=Ko(e),r=us(t),{traceId:s,parentSpanId:o,parentSampled:i}=n||{};return n?{traceId:s||R(),parentSpanId:o||R().substring(16),spanId:R().substring(16),sampled:i,dsc:r||{}}:{traceId:s||R(),spanId:R().substring(16)}}function Cn(e=R(),t=R().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function Ge(e,t=[]){return[e,t]}function Zo(e,t){const[n,r]=e;return[n,[...r,t]]}function nr(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function un(e){return E.__SENTRY__&&E.__SENTRY__.encodePolyfill?E.__SENTRY__.encodePolyfill(e):new TextEncoder().encode(e)}function Qo(e){const[t,n]=e;let r=JSON.stringify(t);function s(o){typeof r=="string"?r=typeof o=="string"?r+o:[un(r),o]:r.push(typeof o=="string"?un(o):o)}for(const o of n){const[i,a]=o;if(s(` ${JSON.stringify(i)} `),typeof a=="string"||a instanceof Uint8Array)s(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(ne(a))}s(c)}}return typeof r=="string"?r:ei(r)}function ei(e){const t=e.reduce((s,o)=>s+o.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function ti(e){return[{type:"span"},e]}function ni(e){const t=typeof e.data=="string"?un(e.data):e.data;return[P({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]}const ri={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function rr(e){return ri[e]}function fs(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function si(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:rt(r)},...s&&{trace:P({...s})}}}function oi(e,t,n){const r=[{type:"client_report"},{timestamp:st(),discarded_events:e}];return Ge(t?{dsn:t}:{},[r])}const ii=60*1e3;function ai(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?ii:r-t}function ci(e,t){return e[t]||e.all||0}function ui(e,t,n=Date.now()){return ci(e,t)>n}function di(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},o=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(o)for(const a of o.trim().split(",")){const[c,u,,,d]=a.split(":",5),f=parseInt(c,10),p=(isNaN(f)?60:f)*1e3;if(!u)s.all=r+p;else for(const m of u.split(";"))m==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(s[m]=r+p):s[m]=r+p}else i?s.all=r+ai(i,r):t===429&&(s.all=r+60*1e3);return s}function se(e){let t,n=e[0],r=1;for(;rn.call(t,...i)),t=void 0)}return n}function xt(){return{traceId:R(),spanId:R().substring(16)}}const _t=E;function fi(){const e=_t.chrome,t=e&&e.app&&e.app.runtime,n="history"in _t&&!!_t.history.pushState&&!!_t.history.replaceState;return!t&&n}const _=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function We(){return An(E),E}function An(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Te,t[Te]=t[Te]||{}}function li(e){const t=F(),n={sid:R(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>mi(n)};return e&&Fe(n,e),n}function Fe(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||F(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:R()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function pi(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),Fe(e,n)}function mi(e){return P({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const dn="_sentrySpan";function Qe(e,t){t?W(e,dn,t):delete e[dn]}function Ot(e){return e[dn]}const hi=100;class xn{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=xt()}clone(){const t=new xn;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,Qe(t,Ot(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Fe(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,[r,s]=n instanceof le?[n.getScopeData(),n.getRequestSession()]:Re(n)?[t,t.requestSession]:[],{tags:o,extra:i,user:a,contexts:c,level:u,fingerprint:d=[],propagationContext:f}=r||{};return this._tags={...this._tags,...o},this._extra={...this._extra,...i},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),d.length&&(this._fingerprint=d),f&&(this._propagationContext=f),s&&(this._requestSession=s),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,Qe(this,void 0),this._attachments=[],this._propagationContext=xt(),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:hi;if(r<=0)return this;const s={timestamp:st(),...t},o=this._breadcrumbs;return o.push(s),this._breadcrumbs=o.length>r?o.slice(-r):o,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,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:Ot(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:R();if(!this._client)return l.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=r&&r.event_id?r.event_id:R();if(!this._client)return l.warn("No client configured on scope - will not capture message!"),s;const o=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:o,...r,event_id:s},this),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:R();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(l.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}const le=xn;function gi(){return Ft("defaultCurrentScope",()=>new le)}function _i(){return Ft("defaultIsolationScope",()=>new le)}class Si{constructor(t,n){let r;t?r=t:r=new le;let s;n?s=n:s=new le,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return $t(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function He(){const e=We(),t=An(e);return t.stack=t.stack||new Si(gi(),_i())}function yi(e){return He().withScope(e)}function Ei(e,t){const n=He();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function sr(e){return He().withScope(()=>e(He().getIsolationScope()))}function bi(){return{withIsolationScope:sr,withScope:yi,withSetScope:Ei,withSetIsolationScope:(e,t)=>sr(t),getCurrentScope:()=>He().getScope(),getIsolationScope:()=>He().getIsolationScope()}}function ot(e){const t=An(e);return t.acs?t.acs:bi()}function k(){const e=We();return ot(e).getCurrentScope()}function ce(){const e=We();return ot(e).getIsolationScope()}function Ti(){return Ft("globalScope",()=>new le)}function Ht(...e){const t=We(),n=ot(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function b(){return k().getClient()}const Ii="_sentryMetrics";function fn(e){const t=e[Ii];if(!t)return;const n={};for(const[,[r,s]]of t)(n[r]||(n[r]=[])).push(P(s));return n}const fe="sentry.source",ls="sentry.sample_rate",xe="sentry.op",x="sentry.origin",ln="sentry.idle_span_finish_reason",Ut="sentry.measurement_unit",Bt="sentry.measurement_value",vi="sentry.profile_id",On="sentry.exclusive_time",ki=0,ps=1,A=2;function Ri(e){if(e<400&&e>=100)return{code:ps};if(e>=400&&e<500)switch(e){case 401:return{code:A,message:"unauthenticated"};case 403:return{code:A,message:"permission_denied"};case 404:return{code:A,message:"not_found"};case 409:return{code:A,message:"already_exists"};case 413:return{code:A,message:"failed_precondition"};case 429:return{code:A,message:"resource_exhausted"};case 499:return{code:A,message:"cancelled"};default:return{code:A,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:A,message:"unimplemented"};case 503:return{code:A,message:"unavailable"};case 504:return{code:A,message:"deadline_exceeded"};default:return{code:A,message:"internal_error"}}return{code:A,message:"unknown_error"}}function ms(e,t){e.setAttribute("http.response.status_code",t);const n=Ri(t);n.message!=="unknown_error"&&e.setStatus(n)}const hs=0,gs=1;function wi(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:o,status:i,origin:a}=I(e);return P({parent_span_id:o,span_id:t,trace_id:n,data:r,op:s,status:i,origin:a})}function Ni(e){const{spanId:t,traceId:n}=e.spanContext(),{parent_span_id:r}=I(e);return P({parent_span_id:r,span_id:t,trace_id:n})}function _s(e){const{traceId:t,spanId:n}=e.spanContext(),r=Pe(e);return Cn(t,n,r)}function ve(e){return typeof e=="number"?or(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?or(e.getTime()):F()}function or(e){return e>9999999999?e/1e3:e}function I(e){if(Ai(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(Ci(e)){const{attributes:r,startTime:s,name:o,endTime:i,parentSpanId:a,status:c}=e;return P({span_id:t,trace_id:n,data:r,description:o,parent_span_id:a,start_timestamp:ve(s),timestamp:ve(i)||void 0,status:Ss(c),op:r[xe],origin:r[x],_metrics_summary:fn(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function Ci(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Ai(e){return typeof e.getSpanJSON=="function"}function Pe(e){const{traceFlags:t}=e.spanContext();return t===gs}function Ss(e){if(!(!e||e.code===ki))return e.code===ps?"ok":e.message||"unknown_error"}const ke="_sentryChildSpans",pn="_sentryRootSpan";function ys(e,t){const n=e[pn]||e;W(t,pn,n),e[ke]?e[ke].add(t):W(e,ke,new Set([t]))}function xi(e,t){e[ke]&&e[ke].delete(t)}function It(e){const t=new Set;function n(r){if(!t.has(r)&&Pe(r)){t.add(r);const s=r[ke]?Array.from(r[ke]):[];for(const o of s)n(o)}}return n(e),Array.from(t)}function M(e){return e[pn]||e}function U(){const e=We(),t=ot(e);return t.getActiveSpan?t.getActiveSpan():Ot(k())}let ir=!1;function Oi(){ir||(ir=!0,ns(mn),rs(mn))}function mn(){const e=U(),t=e&&M(e);if(t){const n="internal_error";_&&l.log(`[Tracing] Root span: ${n} -> Global error occured`),t.setStatus({code:A,message:n})}}mn.tag="sentry_tracingErrorCallback";const Es="_sentryScope",bs="_sentryIsolationScope";function Pi(e,t,n){e&&(W(e,bs,n),W(e,Es,t))}function ar(e){return{scope:e[Es],isolationScope:e[bs]}}function pe(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=b(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}class Ye{constructor(t={}){this._traceId=t.traceId||R(),this._spanId=t.spanId||R().substring(16)}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:hs}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}const Pn="production",Ts="_frozenDsc";function cr(e,t){W(e,Ts,t)}function jt(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s=P({environment:n.environment||Pn,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",s),s}function De(e){const t=b();if(!t)return{};const n=jt(I(e).trace_id||"",t),r=M(e),s=r[Ts];if(s)return s;const o=r.spanContext().traceState,i=o&&o.get("sentry.dsc"),a=i&&us(i);if(a)return a;const c=I(r),u=c.data||{},d=u[ls];d!=null&&(n.sample_rate=`${d}`);const f=u[fe],p=c.description;return f!=="url"&&p&&(n.transaction=p),n.sampled=String(Pe(r)),t.emit("createDsc",n,r),n}function Di(e){if(!_)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=I(e),{spanId:s}=e.spanContext(),o=Pe(e),i=M(e),a=i===e,c=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:d,description:f}=I(i);u.push(`root ID: ${i.spanContext().spanId}`),d&&u.push(`root op: ${d}`),f&&u.push(`root description: ${f}`)}l.log(`${c} ${u.join(` `)}`)}function Mi(e){if(!_)return;const{description:t="< unknown name >",op:n="< unknown op >"}=I(e),{spanId:r}=e.spanContext(),o=M(e)===e,i=`[Tracing] Finishing "${n}" ${o?"root ":""}span "${t}" with ID ${r}`;l.log(i)}function Is(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(typeof t!="number"||isNaN(t)||t<0||t>1){_&&l.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`);return}return t}function Li(e,t){if(!pe(e))return[!1];let n;typeof e.tracesSampler=="function"?n=e.tracesSampler(t):t.parentSampled!==void 0?n=t.parentSampled:typeof e.tracesSampleRate<"u"?n=e.tracesSampleRate:n=1;const r=Is(n);return r===void 0?(_&&l.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):r?Math.random()a(I(d)):d=>I(d),u=[];for(const d of e){const f=c(d);f&&u.push(ti(f))}return Ge(i,u)}function Bi(e,t,n,r=U()){const s=r&&M(r);s&&s.addEvent(e,{[Bt]:t,[Ut]:n})}function ur(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[Ut],o=r[Bt];typeof s=="string"&&typeof o=="number"&&(t[n.name]={value:o,unit:s})}),t}const dr=1e3;class Dn{constructor(t={}){this._traceId=t.traceId||R(),this._spanId=t.spanId||R().substring(16),this._startTime=t.startTimestamp||F(),this._attributes={},this.setAttributes({[x]:"manual",[xe]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}addLink(t){return this}addLinks(t){return this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?gs:hs}}setAttribute(t,n){return n===void 0?delete this._attributes[t]:this._attributes[t]=n,this}setAttributes(t){return Object.keys(t).forEach(n=>this.setAttribute(n,t[n])),this}updateStartTime(t){this._startTime=ve(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this}end(t){this._endTime||(this._endTime=ve(t),Mi(this),this._onSpanEnded())}getSpanJSON(){return P({data:this._attributes,description:this._name,op:this._attributes[xe],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:Ss(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[x],_metrics_summary:fn(this),profile_id:this._attributes[vi],exclusive_time:this._attributes[On],measurements:ur(this._events),is_segment:this._isStandaloneSpan&&M(this)===this||void 0,segment_id:this._isStandaloneSpan?M(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){_&&l.log("[Tracing] Adding an event to span:",t);const s=fr(n)?n:r||F(),o=fr(n)?{}:n||{},i={name:t,time:ve(s),attributes:o};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=b();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===M(this)))return;if(this._isStandaloneSpan){this._sampled?qi(Ui([this],t)):(_&&l.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(ar(this).scope||k()).captureEvent(r)}_convertSpanToTransaction(){if(!lr(I(this)))return;this._name||(_&&l.warn("Transaction has no name, falling back to ``."),this._name="");const{scope:t,isolationScope:n}=ar(this),s=(t||k()).getClient()||b();if(this._sampled!==!0){_&&l.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),s&&s.recordDroppedEvent("sample_rate","transaction");return}const i=It(this).filter(f=>f!==this&&!ji(f)).map(f=>I(f)).filter(lr),a=this._attributes[fe],c={contexts:{trace:wi(this)},spans:i.length>dr?i.sort((f,p)=>f.start_timestamp-p.start_timestamp).slice(0,dr):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,...P({dynamicSamplingContext:De(this)})},_metrics_summary:fn(this),...a&&{transaction_info:{source:a}}},u=ur(this._events);return u&&Object.keys(u).length&&(_&&l.log("[Measurements] Adding measurements to transaction event",JSON.stringify(u,void 0,2)),c.measurements=u),c}}function fr(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function lr(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function ji(e){return e instanceof Dn&&e.isStandaloneSpan()}function qi(e){const t=b();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}const r=t.getTransport();r&&r.send(e).then(null,s=>{_&&l.error("Error while sending span:",s)})}const vs="__SENTRY_SUPPRESS_TRACING__";function ge(e){const t=Rs();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Wi(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?i=>Ht(e.scope,i):s!==void 0?i=>ks(s,i):i=>i())(()=>{const i=k(),a=zi(i);return e.onlyIfParent&&!a?new Ye:Gi({parentSpan:a,spanArguments:n,forceTransaction:r,scope:i})})}function ks(e,t){const n=Rs();return n.withActiveSpan?n.withActiveSpan(e,t):Ht(r=>(Qe(r,e||void 0),t(r)))}function Gi({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!pe())return new Ye;const s=ce();let o;if(e&&!n)o=Yi(e,r,t),ys(e,o);else if(e){const i=De(e),{traceId:a,spanId:c}=e.spanContext(),u=Pe(e);o=pr({traceId:a,parentSpanId:c,...t},r,u),cr(o,i)}else{const{traceId:i,dsc:a,parentSpanId:c,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};o=pr({traceId:i,parentSpanId:c,...t},r,u),a&&cr(o,a)}return Di(o),Pi(o,r,s),o}function Wi(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=ve(e.startTime),delete r.startTime,r}return n}function Rs(){const e=We();return ot(e)}function pr(e,t,n){const r=b(),s=r&&r.getOptions()||{},{name:o="",attributes:i}=e,[a,c]=t.getScopeData().sdkProcessingMetadata[vs]?[!1]:Li(s,{name:o,parentSampled:n,attributes:i,transactionContext:{name:o,parentSampled:n}}),u=new Dn({...e,attributes:{[fe]:"custom",...e.attributes},sampled:a});return c!==void 0&&u.setAttribute(ls,c),r&&r.emit("spanStart",u),u}function Yi(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),o=t.getScopeData().sdkProcessingMetadata[vs]?!1:Pe(e),i=o?new Dn({...n,parentSpanId:r,traceId:s,sampled:o}):new Ye({traceId:s});ys(e,i);const a=b();return a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i)),i}function zi(e){const t=Ot(e);if(!t)return;const n=b();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?M(t):t}const vt={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Xi="heartbeatFailed",Ji="idleTimeout",Ki="finalTimeout",Vi="externalFinish";function ws(e,t={}){const n=new Map;let r=!1,s,o=Vi,i=!t.disableAutoFinish;const a=[],{idleTimeout:c=vt.idleTimeout,finalTimeout:u=vt.finalTimeout,childSpanTimeout:d=vt.childSpanTimeout,beforeSpanEnd:f}=t,p=b();if(!p||!pe())return new Ye;const m=k(),h=U(),y=Zi(e);y.end=new Proxy(y.end,{apply(T,v,D){f&&f(y);const[K,...B]=D,ee=K||F(),$=ve(ee),dt=It(y).filter(ue=>ue!==y);if(!dt.length)return C($),Reflect.apply(T,v,[$,...B]);const ft=dt.map(ue=>I(ue).timestamp).filter(ue=>!!ue),lt=ft.length?Math.max(...ft):void 0,Le=I(y).start_timestamp,pt=Math.min(Le?Le+u/1e3:1/0,Math.max(Le||-1/0,Math.min($,lt||1/0)));return C(pt),Reflect.apply(T,v,[pt,...B])}});function N(){s&&(clearTimeout(s),s=void 0)}function X(T){N(),s=setTimeout(()=>{!r&&n.size===0&&i&&(o=Ji,y.end(T))},c)}function J(T){s=setTimeout(()=>{!r&&i&&(o=Xi,y.end(T))},d)}function _e(T){N(),n.set(T,!0);const v=F();J(v+d/1e3)}function L(T){if(n.has(T)&&n.delete(T),n.size===0){const v=F();X(v+c/1e3)}}function C(T){r=!0,n.clear(),a.forEach($=>$()),Qe(m,h);const v=I(y),{start_timestamp:D}=v;if(!D)return;(v.data||{})[ln]||y.setAttribute(ln,o),l.log(`[Tracing] Idle span "${v.op}" finished`);const B=It(y).filter($=>$!==y);let ee=0;B.forEach($=>{$.isRecording()&&($.setStatus({code:A,message:"cancelled"}),$.end(T),_&&l.log("[Tracing] Cancelling span since span ended early",JSON.stringify($,void 0,2)));const dt=I($),{timestamp:ft=0,start_timestamp:lt=0}=dt,Le=lt<=T,pt=(u+c)/1e3,ue=ft-lt<=pt;if(_){const qn=JSON.stringify($,void 0,2);Le?ue||l.log("[Tracing] Discarding span since it finished after idle span final timeout",qn):l.log("[Tracing] Discarding span since it happened after idle span was finished",qn)}(!ue||!Le)&&(xi(y,$),ee++)}),ee>0&&y.setAttribute("sentry.idle_span_discarded_spans",ee)}return a.push(p.on("spanStart",T=>{if(r||T===y||I(T).timestamp)return;It(y).includes(T)&&_e(T.spanContext().spanId)})),a.push(p.on("spanEnd",T=>{r||L(T.spanContext().spanId)})),a.push(p.on("idleSpanEnableAutoFinish",T=>{T===y&&(i=!0,X(),n.size&&J())})),t.disableAutoFinish||X(),setTimeout(()=>{r||(y.setStatus({code:A,message:"deadline_exceeded"}),o=Ki,y.end())},u),y}function Zi(e){const t=ge(e);return Qe(k(),t),_&&l.log("[Tracing] Started span is an idle span"),t}function hn(e,t,n,r=0){return new Y((s,o)=>{const i=e[r];if(t===null||typeof i!="function")s(t);else{const a=i({...t},n);_&&i.id&&a===null&&l.log(`Event processor "${i.id}" dropped event`),$t(a)?a.then(c=>hn(e,c,n,r+1).then(s)).then(null,o):hn(e,a,n,r+1).then(s).then(null,o)}})}function Qi(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=t;ea(e,t),r&&ra(e,r),sa(e,n),ta(e,s),na(e,o)}function mr(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:h}=t;Ke(e,"extra",n),Ke(e,"tags",r),Ke(e,"user",s),Ke(e,"contexts",o),Ke(e,"sdkProcessingMetadata",a),i&&(e.level=i),m&&(e.transactionName=m),h&&(e.span=h),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function Ke(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function ea(e,t){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=t,c=P(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const u=P(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});const d=P(s);d&&Object.keys(d).length&&(e.user={...d,...e.user});const f=P(o);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function ta(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function na(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function ra(e,t){e.contexts={trace:Ni(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:De(t),...e.sdkProcessingMetadata};const n=M(t),r=I(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function sa(e,t){e.fingerprint=e.fingerprint?os(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function oa(e,t,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||R(),timestamp:t.timestamp||st()},u=n.integrations||e.integrations.map(N=>N.name);ia(c,e),ua(c,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&aa(c,e.stackParser);const d=fa(r,n.captureContext);n.mechanism&&Ce(c,n.mechanism);const f=s?s.getEventProcessors():[],p=Ti().getScopeData();if(o){const N=o.getScopeData();mr(p,N)}if(d){const N=d.getScopeData();mr(p,N)}const m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),Qi(c,p);const h=[...f,...p.eventProcessors];return hn(h,c,n).then(N=>(N&&ca(N),typeof i=="number"&&i>0?da(N,i,a):N))}function ia(e,t){const{environment:n,release:r,dist:s,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:Pn),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&s!==void 0&&(e.dist=s),e.message&&(e.message=Ee(e.message,o));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=Ee(i.value,o));const a=e.request;a&&a.url&&(a.url=Ee(a.url,o))}const hr=new WeakMap;function aa(e,t){const n=E._sentryDebugIds;if(!n)return;let r;const s=hr.get(t);s?r=s:(r=new Map,hr.set(t,r));const o=Object.entries(n).reduce((i,[a,c])=>{let u;const d=r.get(a);d?u=d:(u=t(a),r.set(a,u));for(let f=u.length-1;f>=0;f--){const p=u[f];if(p.filename){i[p.filename]=c;break}}return i},{});try{e.exception.values.forEach(i=>{i.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=o[a.filename])})})}catch{}}function ca(e){const t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,s])=>{n.push({type:"sourcemap",code_file:r,debug_id:s})})}function ua(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function da(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:ne(s.data,t,n)}}))},...e.user&&{user:ne(e.user,t,n)},...e.contexts&&{contexts:ne(e.contexts,t,n)},...e.extra&&{extra:ne(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=ne(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>({...s,...s.data&&{data:ne(s.data,t,n)}}))),r}function fa(e,t){if(!t)return e;const n=e?e.clone():new le;return n.update(t),n}function la(e){if(e)return pa(e)?{captureContext:e}:ha(e)?{captureContext:e}:e}function pa(e){return e instanceof le||typeof e=="function"}const ma=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function ha(e){return Object.keys(e).some(t=>ma.includes(t))}function Ns(e,t){return k().captureException(e,la(t))}function gr(e,t){const n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return k().captureMessage(e,n,r)}function qt(e,t){return k().captureEvent(e,t)}function _r(e){const t=b(),n=ce(),r=k(),{release:s,environment:o=Pn}=t&&t.getOptions()||{},{userAgent:i}=E.navigator||{},a=li({release:s,environment:o,user:r.getUser()||n.getUser(),...i&&{userAgent:i},...e}),c=n.getSession();return c&&c.status==="ok"&&Fe(c,{status:"exited"}),Cs(),n.setSession(a),r.setSession(a),a}function Cs(){const e=ce(),t=k(),n=t.getSession()||e.getSession();n&&pi(n),As(),e.setSession(),t.setSession()}function As(){const e=ce(),t=k(),n=b(),r=t.getSession()||e.getSession();r&&n&&n.captureSession(r)}function Sr(e=!1){if(e){Cs();return}As()}const ga="7";function _a(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Sa(e){return`${_a(e)}${e.projectId}/envelope/`}function ya(e,t){return vo({sentry_key:e.publicKey,sentry_version:ga,...t&&{sentry_client:`${t.name}/${t.version}`}})}function Ea(e,t,n){return t||`${Sa(e)}?${ya(e,n)}`}const yr=[];function ba(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Ta(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(i=>{i.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=os(n(t)):r=t;const s=ba(r),o=s.findIndex(i=>i.name==="Debug");if(o>-1){const[i]=s.splice(o,1);s.push(i)}return s}function Ia(e,t){const n={};return t.forEach(r=>{r&&xs(e,r,n)}),n}function Er(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function xs(e,t,n){if(n[t.name]){_&&l.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,yr.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),yr.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,o)=>r(s,o,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((o,i)=>r(o,i,e),{id:t.name});e.addEventProcessor(s)}_&&l.log(`Integration installed: ${t.name}`)}const br="Not capturing exception because it's already been captured.";class va{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Io(t.dsn):_&&l.warn("No DSN provided, client will not send events."),this._dsn){const n=Ea(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){const s=R();if(er(t))return _&&l.log(br),s;const o={event_id:s,...n};return this._process(this.eventFromException(t,o).then(i=>this._captureEvent(i,o,r))),o.event_id}captureMessage(t,n,r,s){const o={event_id:R(),...r},i=kn(t)?t:String(t),a=Rn(t)?this.eventFromMessage(i,n,o):this.eventFromException(t,o);return this._process(a.then(c=>this._captureEvent(c,o,s))),o.event_id}captureEvent(t,n,r){const s=R();if(n&&n.originalException&&er(n.originalException))return _&&l.log(br),s;const o={event_id:s,...n},a=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,o,a||r)),o.event_id}captureSession(t){typeof t.release!="string"?_&&l.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Fe(t,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):Ae(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];xs(this,t,this._integrations),n||Er(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Hi(t,this._dsn,this._options._metadata,this._options.tunnel);for(const o of n.attachments||[])r=Zo(r,ni(o));const s=this.sendEnvelope(r);s&&s.then(o=>this.emit("afterSendEvent",t,o),null)}sendSession(t){const n=Fi(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const s=typeof r=="number"?r:1,o=`${t}:${n}`;_&&l.log(`Recording outcome: "${o}"${s>1?` (${s} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+s}}on(t,n){const r=this._hooks[t]=this._hooks[t]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,n=>(_&&l.error("Error while sending event:",n),n)):(_&&l.error("Transport disabled"),Ae({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Ia(this,t),Er(this,t)}_updateSessionFromEvent(t,n){let r=!1,s=!1;const o=n.exception&&n.exception.values;if(o){s=!0;for(const c of o){const u=c.mechanism;if(u&&u.handled===!1){r=!0;break}}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(Fe(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Y(n=>{let r=0;const s=1,o=setInterval(()=>{this._numProcessing==0?(clearInterval(o),n(!0)):(r+=s,t&&r>=t&&(clearInterval(o),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s=ce()){const o=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i.length>0&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),oa(o,t,n,r,this,s).then(a=>{if(a===null)return a;const c={...s.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&c){const{traceId:d,spanId:f,parentSpanId:p,dsc:m}=c;a.contexts={trace:P({trace_id:d,span_id:f,parent_span_id:p}),...a.contexts};const h=m||jt(d,this);a.sdkProcessingMetadata={dynamicSamplingContext:h,...a.sdkProcessingMetadata}}return a})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{if(_){const o=s;o.logLevel==="log"?l.log(o.message):l.warn(o)}})}_processEvent(t,n,r){const s=this.getOptions(),{sampleRate:o}=s,i=Ps(t),a=Os(t),c=t.type||"error",u=`before send for type \`${c}\``,d=typeof o>"u"?void 0:Is(o);if(a&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error",t),At(new Q(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const f=c==="replay_event"?"replay":c,m=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,m).then(h=>{if(h===null)throw this.recordDroppedEvent("event_processor",f,t),new Q("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return h;const N=Ra(this,s,h,n);return ka(N,u)}).then(h=>{if(h===null){if(this.recordDroppedEvent("before_send",f,t),i){const J=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",J)}throw new Q(`${u} returned \`null\`, will not send event.`,"log")}const y=r&&r.getSession();if(!i&&y&&this._updateSessionFromEvent(y,h),i){const X=h.sdkProcessingMetadata&&h.sdkProcessingMetadata.spanCountBeforeProcessing||0,J=h.spans?h.spans.length:0,_e=X-J;_e>0&&this.recordDroppedEvent("before_send","span",_e)}const N=h.transaction_info;if(i&&N&&h.transaction!==t.transaction){const X="custom";h.transaction_info={...N,source:X}}return this.sendEvent(h,n),h}).then(null,h=>{throw h instanceof Q?h:(this.captureException(h,{data:{__sentry__:!0},originalException:h}),new Q(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${h}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,o]=n.split(":");return{reason:s,category:o,quantity:r}})}_flushOutcomes(){_&&l.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){_&&l.log("No outcomes to send");return}if(!this._dsn){_&&l.log("No dsn provided, will not send outcomes");return}_&&l.log("Sending outcomes:",t);const n=oi(t,this._options.tunnel&&rt(this._dsn));this.sendEnvelope(n)}}function ka(e,t){const n=`${t} must return \`null\` or a valid event.`;if($t(e))return e.then(r=>{if(!Re(r)&&r!==null)throw new Q(n);return r},r=>{throw new Q(`${t} rejected with ${r}`)});if(!Re(e)&&e!==null)throw new Q(n);return e}function Ra(e,t,n,r){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:i}=t;if(Os(n)&&s)return s(n,r);if(Ps(n)){if(n.spans&&i){const a=[];for(const c of n.spans){const u=i(c);u?a.push(u):e.recordDroppedEvent("before_send","span")}n.spans=a}if(o){if(n.spans){const a=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:a}}return o(n,r)}}return n}function Os(e){return e.type===void 0}function Ps(e){return e.type==="transaction"}function wa(e,t){t.debug===!0&&(_?l.enable():nt(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),k().update(t.initialScope);const r=new e(t);return Na(r),r.init(),r}function Na(e){k().setClient(e)}const Ca=64;function Aa(e,t,n=qo(e.bufferSize||Ca)){let r={};const s=i=>n.drain(i);function o(i){const a=[];if(nr(i,(f,p)=>{const m=rr(p);if(ui(r,m)){const h=Tr(f,p);e.recordDroppedEvent("ratelimit_backoff",m,h)}else a.push(f)}),a.length===0)return Ae({});const c=Ge(i[0],a),u=f=>{nr(c,(p,m)=>{const h=Tr(p,m);e.recordDroppedEvent(f,rr(m),h)})},d=()=>t({body:Qo(c)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&_&&l.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),r=di(r,f),f),f=>{throw u("network_error"),f});return n.add(d).then(f=>f,f=>{if(f instanceof Q)return _&&l.error("Skipped sending event because buffer is full."),u("queue_overflow"),Ae({});throw f})}return{send:o,flush:s}}function Tr(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function xa(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return Pa(e,n)||Oa(e,r)}function Oa(e,t){return t?Ir(e)===Ir(t):!1}function Pa(e,t){return t?e.includes(t.host):!1}function Ir(e){return e[e.length-1]==="/"?e.slice(0,-1):e}function Ds(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(o=>({name:`${r}:@sentry/${o}`,version:Te})),version:Te}),e._metadata=s}const Da=100;function Oe(e,t){const n=b(),r=ce();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=Da}=n.getOptions();if(o<=0)return;const a={timestamp:st(),...e},c=s?nt(()=>s(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,o))}let vr;const Ma="FunctionToString",kr=new WeakMap,La=()=>({name:Ma,setupOnce(){vr=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=wn(this),n=kr.has(b())&&t!==void 0?t:this;return vr.apply(n,e)}}catch{}},setup(e){kr.set(e,!0)}}),$a=La,Fa=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],Ha="InboundFilters",Ua=(e={})=>({name:Ha,processEvent(t,n,r){const s=r.getOptions(),o=ja(e,s);return qa(t,o)?null:t}}),Ba=Ua;function ja(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Fa],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function qa(e,t){return t.ignoreInternal&&Ja(e)?(_&&l.warn(`Event dropped due to being internal Sentry Error. Event: ${de(e)}`),!0):Ga(e,t.ignoreErrors)?(_&&l.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${de(e)}`),!0):Va(e)?(_&&l.warn(`Event dropped due to not having an error message, error type or stacktrace. Event: ${de(e)}`),!0):Wa(e,t.ignoreTransactions)?(_&&l.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. Event: ${de(e)}`),!0):Ya(e,t.denyUrls)?(_&&l.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${de(e)}. Url: ${Pt(e)}`),!0):za(e,t.allowUrls)?!1:(_&&l.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${de(e)}. Url: ${Pt(e)}`),!0)}function Ga(e,t){return e.type||!t||!t.length?!1:Xa(e).some(n=>be(n,t))}function Wa(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?be(n,t):!1}function Ya(e,t){if(!t||!t.length)return!1;const n=Pt(e);return n?be(n,t):!1}function za(e,t){if(!t||!t.length)return!0;const n=Pt(e);return n?be(n,t):!0}function Xa(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function Ja(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function Ka(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function Pt(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?Ka(t):null}catch{return _&&l.error(`Cannot extract url for event ${de(e)}`),null}}function Va(e){return e.type||!e.exception||!e.exception.values||e.exception.values.length===0?!1:!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value)}const Za="CaptureConsole",Qa=(e={})=>{const t=e.levels||Nt;return{name:Za,setup(n){"console"in E&&Vr(({args:r,level:s})=>{b()!==n||!t.includes(s)||tc(r,s)})}}},ec=Qa;function tc(e,t){const n={level:as(t),extra:{arguments:e}};Ht(r=>{if(r.addEventProcessor(i=>(i.logger="console",Ce(i,{handled:!1,type:"console"}),i)),t==="assert"){if(!e[0]){const i=`Assertion failed: ${wt(e.slice(1)," ")||"console.assert"}`;r.setExtra("arguments",e.slice(1)),gr(i,n)}return}const s=e.find(i=>i instanceof Error);if(s){Ns(s,n);return}const o=wt(e," ");gr(o,n)})}const nc="Dedupe",rc=()=>{let e;return{name:nc,processEvent(t){if(t.type)return t;try{if(oc(t,e))return _&&l.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},sc=rc;function oc(e,t){return t?!!(ic(e,t)||ac(e,t)):!1}function ic(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Ls(e,t)||!Ms(e,t))}function ac(e,t){const n=Rr(t),r=Rr(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Ls(e,t)||!Ms(e,t))}function Ms(e,t){let n=Vn(e),r=Vn(t);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{const{depth:t=3,captureErrorCause:n=!0}=e;return{name:cc,processEvent(r,s,o){const{maxValueLength:i=250}=o.getOptions();return fc(r,s,t,n,i)}}},dc=uc;function fc(e,t={},n,r,s){if(!t.originalException||!ye(t.originalException))return e;const o=t.originalException.name||t.originalException.constructor.name,i=lc(t.originalException,r,s);if(i){const a={...e.contexts},c=ne(i,n);return Re(c)&&(W(c,"__sentry_skip_normalization__",!0),a[o]=c),{...e,contexts:a}}return e}function lc(e,t,n){try{const r=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],s={};for(const o of Object.keys(e)){if(r.indexOf(o)!==-1)continue;const i=e[o];s[o]=ye(i)||typeof i=="string"?Ee(`${i}`,n):i}if(t&&e.cause!==void 0&&(s.cause=ye(e.cause)?e.cause.toString():e.cause),typeof e.toJSON=="function"){const o=e.toJSON();for(const i of Object.keys(o)){const a=o[i];s[i]=ye(a)?a.toString():a}}return s}catch(r){_&&l.error("Unable to extract extra data from the Error object:",r)}return null}function pc(e,t,n,r,s="auto.http.browser"){if(!e.fetchData)return;const o=pe()&&t(e.fetchData.url);if(e.endTimestamp&&o){const h=e.fetchData.__span;if(!h)return;const y=r[h];y&&(gc(y,e),delete r[h]);return}const i=k(),a=b(),{method:c,url:u}=e.fetchData,d=hc(u),f=d?Ie(d).host:void 0,p=!!U(),m=o&&p?ge({name:`${c} ${u}`,attributes:{url:u,type:"fetch","http.method":c,"http.url":d,"server.address":f,[x]:s,[xe]:"http.client"}}):new Ye;if(e.fetchData.__span=m.spanContext().spanId,r[m.spanContext().spanId]=m,n(e.fetchData.url)&&a){const h=e.args[0];e.args[1]=e.args[1]||{};const y=e.args[1];y.headers=mc(h,a,i,y,pe()&&p?m:void 0)}return m}function mc(e,t,n,r,s){const o=ce(),{traceId:i,spanId:a,sampled:c,dsc:u}={...o.getPropagationContext(),...n.getPropagationContext()},d=s?_s(s):Cn(i,a,c),f=ds(u||(s?De(s):jt(i,t))),p=r.headers||(typeof Request<"u"&&ie(e,Request)?e.headers:void 0);if(p)if(typeof Headers<"u"&&ie(p,Headers)){const m=new Headers(p);return m.append("sentry-trace",d),f&&m.append(cn,f),m}else if(Array.isArray(p)){const m=[...p,["sentry-trace",d]];return f&&m.push([cn,f]),m}else{const m="baggage"in p?p.baggage:void 0,h=[];return Array.isArray(m)?h.push(...m):m&&h.push(m),f&&h.push(f),{...p,"sentry-trace":d,baggage:h.length>0?h.join(","):void 0}}else return{"sentry-trace":d,baggage:f}}function hc(e){try{return new URL(e).href}catch{return}}function gc(e,t){if(t.response){ms(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:A,message:"internal_error"});e.end()}const S=E;let gn=0;function $s(){return gn>0}function _c(){gn++,setTimeout(()=>{gn--})}function Ue(e,t={},n){if(typeof e!="function")return e;try{const s=e.__sentry_wrapped__;if(s)return s;if(wn(e))return e}catch{return e}const r=function(){const s=Array.prototype.slice.call(arguments);try{const o=s.map(i=>Ue(i,t));return e.apply(this,o)}catch(o){throw _c(),Ht(i=>{i.addEventProcessor(a=>(t.mechanism&&(on(a,void 0),Ce(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),Ns(o)}),o}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}zr(r,e),W(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const H=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Mn(e,t){const n=Ln(e,t),r={type:t&&t.name,value:Tc(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Sc(e,t,n,r){const s=b(),o=s&&s.getOptions().normalizeDepth,i=wc(t),a={__serialized__:is(t,o)};if(i)return{exception:{values:[Mn(e,i)]},extra:a};const c={exception:{values:[{type:Lt(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:kc(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=Ln(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function zt(e,t){return{exception:{values:[Mn(e,t)]}}}function Ln(e,t){const n=t.stacktrace||t.stack||"",r=Ec(t),s=bc(t);try{return e(n,r,s)}catch{}return[]}const yc=/Minified React error #\d+;/i;function Ec(e){return e&&yc.test(e.message)?1:0}function bc(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Tc(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Ic(e,t,n,r){const s=n&&n.syntheticException||void 0,o=$n(e,t,s,r);return Ce(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Ae(o)}function vc(e,t,n="info",r,s){const o=r&&r.syntheticException||void 0,i=_n(e,t,o,s);return i.level=n,r&&r.event_id&&(i.event_id=r.event_id),Ae(i)}function $n(e,t,n,r,s){let o;if(qr(t)&&t.error)return zt(e,t.error);if(Gn(t)||oo(t)){const i=t;if("stack"in t)o=zt(e,t);else{const a=i.name||(Gn(i)?"DOMError":"DOMException"),c=i.message?`${a}: ${i.message}`:a;o=_n(e,c,n,r),on(o,c)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":`${i.code}`}),o}return ye(t)?zt(e,t):Re(t)||Lt(t)?(o=Sc(e,t,n,s),Ce(o,{synthetic:!0}),o):(o=_n(e,t,n,r),on(o,`${t}`),Ce(o,{synthetic:!0}),o)}function _n(e,t,n,r){const s={};if(r&&n){const o=Ln(e,n);o.length&&(s.exception={values:[{value:t,stacktrace:{frames:o}}]})}if(kn(t)){const{__sentry_template_string__:o,__sentry_template_values__:i}=t;return s.logentry={message:o,params:i},s}return s.message=t,s}function kc(e,{isUnhandledRejection:t}){const n=ko(e),r=t?"promise rejection":"exception";return qr(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Lt(e)?`Event \`${Rc(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Rc(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function wc(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}function Nc(e,{metadata:t,tunnel:n,dsn:r}){const s={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:rt(r)}},o=Cc(e);return Ge(s,[o])}function Cc(e){return[{type:"user_report"},e]}class Ac extends va{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t},r=S.SENTRY_SDK_SOURCE||$o();Ds(n,"browser",["browser"],r),super(n),n.sendClientReports&&S.document&&S.document.addEventListener("visibilitychange",()=>{S.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return Ic(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return vc(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled()){H&&l.warn("SDK not enabled, will not capture user feedback.");return}const n=Nc(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}}const G=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,xc=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",ze=(e,t,n,r)=>{let s,o;return i=>{t.value>=0&&(i||r)&&(o=t.value-(s||0),(o||s===void 0)&&(s=t.value,t.delta=o,t.rating=xc(t.value,n),e(t)))}},g=E,Oc=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,it=()=>g.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Gt=()=>{const e=it();return e&&e.activationStart||0},Xe=(e,t)=>{const n=it();let r="navigate";return n&&(g.document&&g.document.prerendering||Gt()>0?r="prerender":g.document&&g.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Oc(),navigationType:r}},Me=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},at=e=>{const t=n=>{(n.type==="pagehide"||g.document&&g.document.visibilityState==="hidden")&&e(n)};g.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Fn=e=>{let t=!1;return n=>{t||(e(n),t=!0)}};let et=-1;const Pc=()=>{et=g.document.visibilityState==="hidden"&&!g.document.prerendering?0:1/0},Dt=e=>{g.document.visibilityState==="hidden"&&et>-1&&(et=e.type==="visibilitychange"?e.timeStamp:0,removeEventListener("visibilitychange",Dt,!0),removeEventListener("prerenderingchange",Dt,!0))},Dc=()=>{addEventListener("visibilitychange",Dt,!0),addEventListener("prerenderingchange",Dt,!0)},Wt=()=>(g.document&&et<0&&(Pc(),Dc()),{get firstHiddenTime(){return et}}),ct=e=>{g.document&&g.document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},Mc=[1800,3e3],Lc=(e,t={})=>{ct(()=>{const n=Wt(),r=Xe("FCP");let s;const i=Me("paint",a=>{a.forEach(c=>{c.name==="first-contentful-paint"&&(i.disconnect(),c.startTime{Lc(Fn(()=>{const n=Xe("CLS",0);let r,s=0,o=[];const i=c=>{c.forEach(u=>{if(!u.hadRecentInput){const d=o[0],f=o[o.length-1];s&&d&&f&&u.startTime-f.startTime<1e3&&u.startTime-d.startTime<5e3?(s+=u.value,o.push(u)):(s=u.value,o=[u])}}),s>n.value&&(n.value=s,n.entries=o,r())},a=Me("layout-shift",i);a&&(r=ze(e,n,$c,t.reportAllChanges),at(()=>{i(a.takeRecords()),r(!0)}),setTimeout(r,0))}))},Hc=[100,300],Uc=(e,t={})=>{ct(()=>{const n=Wt(),r=Xe("FID");let s;const o=c=>{c.startTime{c.forEach(o)},a=Me("first-input",i);s=ze(e,r,Hc,t.reportAllChanges),a&&at(Fn(()=>{i(a.takeRecords()),a.disconnect()}))})};let Fs=0,Xt=1/0,St=0;const Bc=e=>{e.forEach(t=>{t.interactionId&&(Xt=Math.min(Xt,t.interactionId),St=Math.max(St,t.interactionId),Fs=St?(St-Xt)/7+1:0)})};let Sn;const jc=()=>Sn?Fs:performance.interactionCount||0,qc=()=>{"interactionCount"in performance||Sn||(Sn=Me("event",Bc,{type:"event",buffered:!0,durationThreshold:0}))},Gc=[200,500],Wc=0,Hs=()=>jc()-Wc,wr=10,re=[],Jt={},Nr=e=>{const t=re[re.length-1],n=Jt[e.interactionId];if(n||re.lengtht.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{const r={id:e.interactionId,latency:e.duration,entries:[e]};Jt[r.id]=r,re.push(r)}re.sort((r,s)=>s.latency-r.latency),re.splice(wr).forEach(r=>{delete Jt[r.id]})}},Yc=()=>{const e=Math.min(re.length-1,Math.floor(Hs()/50));return re[e]},zc=(e,t={})=>{ct(()=>{qc();const n=Xe("INP");let r;const s=i=>{i.forEach(c=>{c.interactionId&&Nr(c),c.entryType==="first-input"&&!re.some(d=>d.entries.some(f=>c.duration===f.duration&&c.startTime===f.startTime))&&Nr(c)});const a=Yc();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())},o=Me("event",s,{durationThreshold:t.durationThreshold!=null?t.durationThreshold:40});r=ze(e,n,Gc,t.reportAllChanges),o&&("PerformanceEventTiming"in g&&"interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),at(()=>{s(o.takeRecords()),n.value<0&&Hs()>0&&(n.value=0,n.entries=[]),r(!0)}))})},Xc=[2500,4e3],Cr={},Jc=(e,t={})=>{ct(()=>{const n=Wt(),r=Xe("LCP");let s;const o=a=>{const c=a[a.length-1];c&&c.startTime{Cr[r.id]||(o(i.takeRecords()),i.disconnect(),Cr[r.id]=!0,s(!0))});["keydown","click"].forEach(c=>{g.document&&addEventListener(c,()=>setTimeout(a,0),!0)}),at(a)}})},Kc=[800,1800],yn=e=>{g.document&&g.document.prerendering?ct(()=>yn(e)):g.document&&g.document.readyState!=="complete"?addEventListener("load",()=>yn(e),!0):setTimeout(e,0)},Vc=(e,t={})=>{const n=Xe("TTFB"),r=ze(e,n,Kc,t.reportAllChanges);yn(()=>{const s=it();if(s){const o=s.responseStart;if(o<=0||o>performance.now())return;n.value=Math.max(o-Gt(),0),n.entries=[s],r(!0)}})},Ve={},Mt={};let Us,Bs,js,qs,Gs;function Ws(e,t=!1){return ut("cls",e,nu,Us,t)}function Zc(e,t=!1){return ut("lcp",e,su,js,t)}function Qc(e){return ut("fid",e,ru,Bs)}function eu(e){return ut("ttfb",e,ou,qs)}function tu(e){return ut("inp",e,iu,Gs)}function tt(e,t){return Ys(e,t),Mt[e]||(au(e),Mt[e]=!0),zs(e,t)}function Je(e,t){const n=Ve[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch(s){G&&l.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${ae(r)} Error:`,s)}}function nu(){return Fc(e=>{Je("cls",{metric:e}),Us=e},{reportAllChanges:!0})}function ru(){return Uc(e=>{Je("fid",{metric:e}),Bs=e})}function su(){return Jc(e=>{Je("lcp",{metric:e}),js=e},{reportAllChanges:!0})}function ou(){return Vc(e=>{Je("ttfb",{metric:e}),qs=e})}function iu(){return zc(e=>{Je("inp",{metric:e}),Gs=e})}function ut(e,t,n,r,s=!1){Ys(e,t);let o;return Mt[e]||(o=n(),Mt[e]=!0),r&&t({metric:r}),zs(e,t,s?o:void 0)}function au(e){const t={};e==="event"&&(t.durationThreshold=0),Me(e,n=>{Je(e,{entries:n})},t)}function Ys(e,t){Ve[e]=Ve[e]||[],Ve[e].push(t)}function zs(e,t,n){return()=>{n&&n();const r=Ve[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function cu(e){return"duration"in e}function Kt(e){return typeof e=="number"&&isFinite(e)}function Be(e,t,n,{...r}){const s=I(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),ks(e,()=>{const o=ge({startTime:t,...r});return o&&o.end(n),o})}function Xs(e){const t=b();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:o}=e,{release:i,environment:a}=t.getOptions(),c=t.getIntegrationByName("Replay"),u=c&&c.getReplayId(),d=k(),f=d.getUser(),p=f!==void 0?f.email||f.id||f.ip_address:void 0;let m;try{m=d.getScopeData().contexts.profile.profile_id}catch{}const h={release:i,environment:a,user:p||void 0,profile_id:m||void 0,replay_id:u||void 0,transaction:r,"user_agent.original":g.navigator&&g.navigator.userAgent,...s};return ge({name:n,attributes:h,startTime:o,experimental:{standalone:!0}})}function Hn(){return g&&g.addEventListener&&g.performance}function w(e){return e/1e3}function uu(){let e=0,t,n;if(!fu())return;let r=!1;function s(){r||(r=!0,n&&du(e,t,n),o())}const o=Ws(({metric:i})=>{const a=i.entries[i.entries.length-1];a&&(e=i.value,t=a)},!0);at(()=>{s()}),setTimeout(()=>{const i=b(),a=se([i,"optionalAccess",f=>f.on,"call",f=>f("startNavigationSpan",()=>{s(),a&&a()})]),c=U(),u=c&&M(c),d=u&&I(u);d&&d.op==="pageload"&&(n=u.spanContext().spanId)},0)}function du(e,t,n){G&&l.log(`Sending CLS span (${e})`);const r=w((j||0)+(se([t,"optionalAccess",c=>c.startTime])||0)),s=k().getScopeData().transactionName,o=t?we(se([t,"access",c=>c.sources,"access",c=>c[0],"optionalAccess",c=>c.node])):"Layout shift",i=P({[x]:"auto.http.browser.cls",[xe]:"ui.webvital.cls",[On]:se([t,"optionalAccess",c=>c.duration])||0,"sentry.pageload.span_id":n}),a=Xs({name:o,transaction:s,attributes:i,startTime:r});se([a,"optionalAccess",c=>c.addEvent,"call",c=>c("cls",{[Ut]:"",[Bt]:e})]),se([a,"optionalAccess",c=>c.end,"call",c=>c(r)])}function fu(){try{return se([PerformanceObserver,"access",e=>e.supportedEntryTypes,"optionalAccess",e=>e.includes,"call",e=>e("layout-shift")])}catch{return!1}}const lu=2147483647;let Ar=0,O={},Z,Ze;function pu({recordClsStandaloneSpans:e}){const t=Hn();if(t&&j){t.mark&&g.performance.mark("sentry-tracing-init");const n=yu(),r=Su(),s=Eu(),o=e?uu():_u();return()=>{n(),r(),s(),o&&o()}}return()=>{}}function mu(){tt("longtask",({entries:e})=>{if(U())for(const t of e){const n=w(j+t.startTime),r=w(t.duration),s=ge({name:"Main UI thread blocked",op:"ui.long-task",startTime:n,attributes:{[x]:"auto.ui.browser.metrics"}});s&&s.end(n+r)}})}function hu(){new PerformanceObserver(t=>{if(U())for(const n of t.getEntries()){if(!n.scripts[0])continue;const r=w(j+n.startTime),s=w(n.duration),o={[x]:"auto.ui.browser.metrics"},i=n.scripts[0],{invoker:a,invokerType:c,sourceURL:u,sourceFunctionName:d,sourceCharPosition:f}=i;o["browser.script.invoker"]=a,o["browser.script.invoker_type"]=c,u&&(o["code.filepath"]=u),d&&(o["code.function"]=d),f!==-1&&(o["browser.script.source_char_position"]=f);const p=ge({name:"Main UI thread blocked",op:"ui.long-animation-frame",startTime:r,attributes:o});p&&p.end(r+s)}}).observe({type:"long-animation-frame",buffered:!0})}function gu(){tt("event",({entries:e})=>{if(U()){for(const t of e)if(t.name==="click"){const n=w(j+t.startTime),r=w(t.duration),s={name:we(t.target),op:`ui.interaction.${t.name}`,startTime:n,attributes:{[x]:"auto.ui.browser.metrics"}},o=Wr(t.target);o&&(s.attributes["ui.component_name"]=o);const i=ge(s);i&&i.end(n+r)}}})}function _u(){return Ws(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(G&&l.log(`[Measurements] Adding CLS ${e.value}`),O.cls={value:e.value,unit:""},Ze=t)},!0)}function Su(){return Zc(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(G&&l.log("[Measurements] Adding LCP"),O.lcp={value:e.value,unit:"millisecond"},Z=t)},!0)}function yu(){return Qc(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=w(j),r=w(t.startTime);G&&l.log("[Measurements] Adding FID"),O.fid={value:e.value,unit:"millisecond"},O["mark.fid"]={value:n+r,unit:"second"}})}function Eu(){return eu(({metric:e})=>{e.entries[e.entries.length-1]&&(G&&l.log("[Measurements] Adding TTFB"),O.ttfb={value:e.value,unit:"millisecond"})})}function bu(e,t){const n=Hn();if(!n||!g.performance.getEntries||!j)return;G&&l.log("[Tracing] Adding & adjusting spans using Performance API");const r=w(j),s=n.getEntries(),{op:o,start_timestamp:i}=I(e);if(s.slice(Ar).forEach(a=>{const c=w(a.startTime),u=w(Math.max(0,a.duration));if(!(o==="navigation"&&i&&r+c{Bi(c,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",r),wu(e)}Z=void 0,Ze=void 0,O={}}function Tu(e,t,n,r,s){const o=it(),i=w(o?o.requestStart:0),a=s+Math.max(n,i),c=s+n,u=c+r,d={[x]:"auto.resource.browser.metrics"};return a!==c&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=a),Be(e,a,u,{name:t.name,op:t.entryType,attributes:d}),a}function Iu(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{yt(e,t,r,n)}),yt(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),yt(e,t,"fetch",n,"cache","domainLookupStart"),yt(e,t,"domainLookup",n,"DNS"),vu(e,t,n)}function yt(e,t,n,r,s,o){const i=o?t[o]:t[`${n}End`],a=t[`${n}Start`];!a||!i||Be(e,r+w(a),r+w(i),{op:"browser",name:s||n,attributes:{[x]:"auto.ui.browser.metrics"}})}function vu(e,t,n){const r=n+w(t.requestStart),s=n+w(t.responseEnd),o=n+w(t.responseStart);t.responseEnd&&(Be(e,r,s,{op:"browser",name:"request",attributes:{[x]:"auto.ui.browser.metrics"}}),Be(e,o,s,{op:"browser",name:"response",attributes:{[x]:"auto.ui.browser.metrics"}}))}function ku(e,t,n,r,s,o){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const i=Ie(n),a={[x]:"auto.resource.browser.metrics"};Vt(a,t,"transferSize","http.response_transfer_size"),Vt(a,t,"encodedBodySize","http.response_content_length"),Vt(a,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus),i.protocol&&(a["url.scheme"]=i.protocol.split(":").pop()),i.host&&(a["server.address"]=i.host),a["url.same_origin"]=n.includes(g.location.origin);const c=o+r,u=c+s;Be(e,c,u,{name:n.replace(g.location.origin,""),op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",attributes:a})}function Ru(e){const t=g.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Kt(n.rtt)&&(O["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Kt(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Kt(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function wu(e){Z&&(G&&l.log("[Measurements] Adding LCP Data"),Z.element&&e.setAttribute("lcp.element",we(Z.element)),Z.id&&e.setAttribute("lcp.id",Z.id),Z.url&&e.setAttribute("lcp.url",Z.url.trim().slice(0,200)),e.setAttribute("lcp.size",Z.size)),Ze&&Ze.sources&&(G&&l.log("[Measurements] Adding CLS Data"),Ze.sources.forEach((t,n)=>e.setAttribute(`cls.source.${n+1}`,we(t.node))))}function Vt(e,t,n,r){const s=t[n];s!=null&&s{const r=g[n]&&g[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(q(r,"addEventListener",function(s){return function(o,i,a){if(o==="click"||o=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},d=u[o]=u[o]||{refCount:0};if(!d.handler){const f=Or(e);d.handler=f,s.call(this,o,f,a)}d.refCount++}catch{}return s.call(this,o,i,a)}}),q(r,"removeEventListener",function(s){return function(o,i,a){if(o==="click"||o=="keypress")try{const c=this,u=c.__sentry_instrumentation_handlers__||{},d=u[o];d&&(d.refCount--,d.refCount<=0&&(s.call(this,o,d.handler,a),d.handler=void 0,delete u[o]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return s.call(this,o,i,a)}}))})}function Ou(e){if(e.type!==En)return!1;try{if(!e.target||e.target._sentryId!==bn)return!1}catch{}return!0}function Pu(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function Or(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=Du(n);if(Pu(n.type,r))return;W(n,"_sentryCaptured",!0),r&&!r._sentryId&&W(r,"_sentryId",R());const s=n.type==="keypress"?"input":n.type;Ou(n)||(e({event:n,name:s,global:t}),En=n.type,bn=r?r._sentryId:void 0),clearTimeout(xr),xr=g.setTimeout(()=>{bn=void 0,En=void 0},Cu)}}function Du(e){try{return e.target}catch{return null}}let Et;function Un(e){const t="history";me(t,e),he(t,Mu)}function Mu(){if(!fi())return;const e=g.onpopstate;g.onpopstate=function(...n){const r=g.location.href,s=Et;if(Et=r,z("history",{from:s,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const o=Et,i=String(s);Et=i,z("history",{from:o,to:i})}return n.apply(this,r)}}q(g.history,"pushState",t),q(g.history,"replaceState",t)}const kt={};function Lu(e){const t=kt[e];if(t)return t;let n=g[e];if(rn(n))return kt[e]=n.bind(g);const r=g.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&&o[e]&&(n=o[e]),r.head.removeChild(s)}catch(s){G&&l.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(kt[e]=n.bind(g))}function Pr(e){kt[e]=void 0}const Se="__sentry_xhr_v3__";function Bn(e){const t="xhr";me(t,e),he(t,$u)}function $u(){if(!g.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=F()*1e3,o=oe(r[0])?r[0].toUpperCase():void 0,i=Fu(r[1]);if(!o||!i)return t.apply(n,r);n[Se]={method:o,url:i,request_headers:{}},o==="POST"&&i.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=()=>{const c=n[Se];if(c&&n.readyState===4){try{c.status_code=n.status}catch{}const u={endTimestamp:F()*1e3,startTimestamp:s,xhr:n};z("xhr",u)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(c,u,d){return a(),c.apply(u,d)}}):n.addEventListener("readystatechange",a),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(c,u,d){const[f,p]=d,m=u[Se];return m&&oe(f)&&oe(p)&&(m.request_headers[f.toLowerCase()]=p),c.apply(u,d)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[Se];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const o={startTimestamp:F()*1e3,xhr:n};return z("xhr",o),t.apply(n,r)}})}function Fu(e){if(oe(e))return e;try{return e.toString()}catch{}}const Zt=[],Rt=new Map;function Hu(){if(Hn()&&j){const t=Uu();return()=>{t()}}return()=>{}}const Dr={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 Uu(){return tu(({metric:e})=>{if(e.value==null)return;const t=e.entries.find(h=>h.duration===e.value&&Dr[h.name]);if(!t)return;const{interactionId:n}=t,r=Dr[t.name],s=w(j+t.startTime),o=w(e.value),i=U(),a=i?M(i):void 0,u=(n!=null?Rt.get(n):void 0)||a,d=u?I(u).description:k().getScopeData().transactionName,f=we(t.target),p=P({[x]:"auto.http.browser.inp",[xe]:`ui.interaction.${r}`,[On]:t.duration}),m=Xs({name:f,transaction:d,attributes:p,startTime:s});se([m,"optionalAccess",h=>h.addEvent,"call",h=>h("inp",{[Ut]:"millisecond",[Bt]:e.value})]),se([m,"optionalAccess",h=>h.end,"call",h=>h(s+o)])})}function Bu(e){const t=({entries:n})=>{const r=U(),s=r&&M(r);n.forEach(o=>{if(!cu(o)||!s)return;const i=o.interactionId;if(i!=null&&!Rt.has(i)){if(Zt.length>10){const a=Zt.shift();Rt.delete(a)}Zt.push(i),Rt.set(i,s)}})};tt("event",t),tt("first-input",t)}function ju(e,t=Lu("fetch")){let n=0,r=0;function s(o){const i=o.body.length;n+=i,r++;const a={body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return Pr("fetch"),At("No fetch implementation available");try{return t(e.url,a).then(c=>(n-=i,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return Pr("fetch"),n-=i,r--,At(c)}}return Aa(e,s)}const qu=30,Gu=50;function Tn(e,t,n,r){const s={filename:e,function:t===""?Ne:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Wu=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Yu=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,zu=/\((\S*)(?::(\d+))(?::(\d+))\)/,Xu=e=>{const t=Wu.exec(e);if(t){const[,r,s,o]=t;return Tn(r,Ne,+s,+o)}const n=Yu.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const i=zu.exec(n[2]);i&&(n[2]=i[1],n[3]=i[2],n[4]=i[3])}const[s,o]=Js(n[1]||Ne,n[2]);return Tn(o,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},Ju=[qu,Xu],Ku=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Vu=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Zu=e=>{const t=Ku.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const o=Vu.exec(t[3]);o&&(t[1]=t[1]||"eval",t[3]=o[1],t[4]=o[2],t[5]="")}let r=t[3],s=t[1]||Ne;return[s,r]=Js(s,r),Tn(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Qu=[Gu,Zu],ed=[Ju,Qu],td=Kr(...ed),Js=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:Ne,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},bt=1024,nd="Breadcrumbs",rd=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:nd,setup(n){t.console&&Vr(ad(n)),t.dom&&Au(id(n,t.dom)),t.xhr&&Bn(cd(n)),t.fetch&&Nn(ud(n)),t.history&&Un(dd(n)),t.sentry&&n.on("beforeSendEvent",od(n))}}},sd=rd;function od(e){return function(n){b()===e&&Oe({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:de(n)},{event:n})}}function id(e,t){return function(r){if(b()!==e)return;let s,o,i=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>bt&&(H&&l.warn(`\`dom.maxStringLength\` cannot exceed ${bt}, but a value of ${a} was configured. Sentry will use ${bt} instead.`),a=bt),typeof i=="string"&&(i=[i]);try{const u=r.event,d=fd(u)?u.target:u;s=we(d,{keyAttrs:i,maxStringLength:a}),o=Wr(d)}catch{s=""}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};o&&(c.data={"ui.component_name":o}),Oe(c,{event:r.event,name:r.name,global:r.global})}}function ad(e){return function(n){if(b()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:as(n.level),message:wt(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${wt(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Oe(r,{input:n.args,level:n.level})}}function cd(e){return function(n){if(b()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,o=n.xhr[Se];if(!r||!s||!o)return;const{method:i,url:a,status_code:c,body:u}=o,d={method:i,url:a,status_code:c},f={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s};Oe({category:"xhr",data:d,type:"http"},f)}}function ud(e){return function(n){if(b()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const o=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};Oe({category:"fetch",data:o,level:"error",type:"http"},i)}else{const o=n.response,i={...n.fetchData,status_code:o&&o.status},a={input:n.args,response:o,startTimestamp:r,endTimestamp:s};Oe({category:"fetch",data:i,type:"http"},a)}}}function dd(e){return function(n){if(b()!==e)return;let r=n.from,s=n.to;const o=Ie(S.location.href);let i=r?Ie(r):void 0;const a=Ie(s);(!i||!i.path)&&(i=o),o.protocol===a.protocol&&o.host===a.host&&(s=a.relative),o.protocol===i.protocol&&o.host===i.host&&(r=i.relative),Oe({category:"navigation",data:{from:r,to:s}})}}function fd(e){return!!e&&!!e.target}const ld=["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"],pd="BrowserApiErrors",md=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:pd,setupOnce(){t.setTimeout&&q(S,"setTimeout",Mr),t.setInterval&&q(S,"setInterval",Mr),t.requestAnimationFrame&&q(S,"requestAnimationFrame",gd),t.XMLHttpRequest&&"XMLHttpRequest"in S&&q(XMLHttpRequest.prototype,"send",_d);const n=t.eventTarget;n&&(Array.isArray(n)?n:ld).forEach(Sd)}}},hd=md;function Mr(e){return function(...t){const n=t[0];return t[0]=Ue(n,{mechanism:{data:{function:ae(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function gd(e){return function(t){return e.apply(this,[Ue(t,{mechanism:{data:{function:"requestAnimationFrame",handler:ae(e)},handled:!1,type:"instrument"}})])}}function _d(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&q(n,s,function(o){const i={mechanism:{data:{function:s,handler:ae(o)},handled:!1,type:"instrument"}},a=wn(o);return a&&(i.mechanism.data.handler=ae(a)),Ue(o,i)})}),e.apply(this,t)}}function Sd(e){const t=S,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(q(n,"addEventListener",function(r){return function(s,o,i){try{typeof o.handleEvent=="function"&&(o.handleEvent=Ue(o.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ae(o),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,Ue(o,{mechanism:{data:{function:"addEventListener",handler:ae(o),target:e},handled:!1,type:"instrument"}}),i])}}),q(n,"removeEventListener",function(r){return function(s,o,i){const a=o;try{const c=a&&a.__sentry_wrapped__;c&&r.call(this,s,c,i)}catch{}return r.call(this,s,a,i)}}))}const yd="GlobalHandlers",Ed=(e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:yd,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(Td(n),Lr("onerror")),t.onunhandledrejection&&(Id(n),Lr("onunhandledrejection"))}}},bd=Ed;function Td(e){ns(t=>{const{stackParser:n,attachStacktrace:r}=Ks();if(b()!==e||$s())return;const{msg:s,url:o,line:i,column:a,error:c}=t,u=Rd($n(n,c||s,void 0,r,!1),o,i,a);u.level="error",qt(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function Id(e){rs(t=>{const{stackParser:n,attachStacktrace:r}=Ks();if(b()!==e||$s())return;const s=vd(t),o=Rn(s)?kd(s):$n(n,s,void 0,r,!0);o.level="error",qt(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function vd(e){if(Rn(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function kd(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Rd(e,t,n,r){const s=e.exception=e.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,f=oe(t)&&t.length>0?t:ho();return c.length===0&&c.push({colno:u,filename:f,function:Ne,in_app:!0,lineno:d}),e}function Lr(e){H&&l.log(`Global Handler attached: ${e}`)}function Ks(){const e=b();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const wd=()=>({name:"HttpContext",preprocessEvent(e){if(!S.navigator&&!S.location&&!S.document)return;const t=e.request&&e.request.url||S.location&&S.location.href,{referrer:n}=S.document||{},{userAgent:r}=S.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},o={...e.request,...t&&{url:t},headers:s};e.request=o}}),Nd="cause",Cd=5,Ad="LinkedErrors",xd=(e={})=>{const t=e.limit||Cd,n=e.key||Nd;return{name:Ad,preprocessEvent(r,s,o){const i=o.getOptions();fo(Mn,i.stackParser,i.maxValueLength,n,t,r,s)}}},Od=xd;function In(e){return[Ba(),$a(),hd(),sd(),bd(),Od(),sc(),wd()]}function Pd(e={}){const t={defaultIntegrations:In(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:S.SENTRY_RELEASE&&S.SENTRY_RELEASE.id?S.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return e.defaultIntegrations==null&&delete e.defaultIntegrations,{...t,...e}}function Dd(){const e=typeof S.window<"u"&&S;if(!e)return!1;const t=e.chrome?"chrome":"browser",n=e[t],r=n&&n.runtime&&n.runtime.id,s=S.location&&S.location.href||"",o=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],i=!!r&&S===S.top&&o.some(c=>s.startsWith(`${c}//`)),a=typeof e.nw<"u";return!!r&&!i&&!a}function Md(e={}){const t=Pd(e);if(Dd()){nt(()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")});return}H&&(Zr()||l.warn("No Fetch API detected. The Sentry SDK requires a Fetch API compatible environment to send events. Please add a Fetch API polyfill."));const n={...t,stackParser:wo(t.stackParser||td),integrations:Ta(t),transport:t.transport||ju},r=wa(Ac,n);return t.autoSessionTracking&&Ld(),r}function Ld(){if(typeof S.document>"u"){H&&l.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}_r({ignoreDuration:!0}),Sr(),Un(({from:e,to:t})=>{e!==void 0&&e!==t&&(_r({ignoreDuration:!0}),Sr())})}const $d="HttpClient",Fd=(e={})=>{const t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:$d,setup(n){zd(n,t),Xd(n,t)}}},Hd=Fd;function Ud(e,t,n,r){if(Zs(e,n.status,n.url)){const s=Jd(t,r);let o,i,a,c;eo()&&([o,a]=$r("Cookie",s),[i,c]=$r("Set-Cookie",n));const u=Qs({url:s.url,method:s.method,status:n.status,requestHeaders:o,responseHeaders:i,requestCookies:a,responseCookies:c});qt(u)}}function $r(e,t){const n=qd(t.headers);let r;try{const s=n[e]||n[e.toLowerCase()]||void 0;s&&(r=Vs(s))}catch{H&&l.log(`Could not extract cookies from header ${e}`)}return[n,r]}function Bd(e,t,n,r){if(Zs(e,t.status,t.responseURL)){let s,o,i;if(eo()){try{const c=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;c&&(o=Vs(c))}catch{H&&l.log("Could not extract cookies from response headers")}try{i=Gd(t)}catch{H&&l.log("Could not extract headers from response")}s=r}const a=Qs({url:t.responseURL,method:n,status:t.status,requestHeaders:s,responseHeaders:i,responseCookies:o});qt(a)}}function jd(e){if(e){const t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Vs(e){return e.split("; ").reduce((t,n)=>{const[r,s]=n.split("=");return r&&s&&(t[r]=s),t},{})}function qd(e){const t={};return e.forEach((n,r)=>{t[r]=n}),t}function Gd(e){const t=e.getAllResponseHeaders();return t?t.split(`\r `).reduce((n,r)=>{const[s,o]=r.split(": ");return s&&o&&(n[s]=o),n},{}):{}}function Wd(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function Yd(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function zd(e,t){Qr()&&Nn(n=>{if(b()!==e)return;const{response:r,args:s}=n,[o,i]=s;r&&Ud(t,o,r,i)})}function Xd(e,t){"XMLHttpRequest"in E&&Bn(n=>{if(b()!==e)return;const r=n.xhr,s=r[Se];if(!s)return;const{method:o,request_headers:i}=s;try{Bd(t,r,o,i)}catch(a){H&&l.warn("Error while extracting response event form XHR response",a)}})}function Zs(e,t,n){return Yd(e.failedRequestStatusCodes,t)&&Wd(e.failedRequestTargets,n)&&!xa(n,b())}function Qs(e){const t=`HTTP Client Error with status code: ${e.status}`,n={message:t,exception:{values:[{type:"Error",value:t}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:jd(e.responseHeaders)}}};return Ce(n,{type:"http.client",handled:!1}),n}function Jd(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function eo(){const e=b();return e?!!e.getOptions().sendDefaultPii:!1}const Fr=new WeakMap,Qt=new Map,vn={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0};function Kd(e,t){const{traceFetch:n,traceXHR:r,shouldCreateSpanForRequest:s,enableHTTPTimings:o,tracePropagationTargets:i}={traceFetch:vn.traceFetch,traceXHR:vn.traceXHR,...t},a=typeof s=="function"?s:d=>!0,c=d=>ef(d,i),u={};n&&(e.addEventProcessor(d=>(d.type==="transaction"&&d.spans&&d.spans.forEach(f=>{if(f.op==="http.client"){const p=Qt.get(f.span_id);p&&(f.timestamp=p/1e3,Qt.delete(f.span_id))}}),d)),xo(d=>{if(d.response){const f=Fr.get(d.response);f&&d.endTimestamp&&Qt.set(f,d.endTimestamp)}}),Nn(d=>{const f=pc(d,a,c,u);if(d.response&&d.fetchData.__span&&Fr.set(d.response,d.fetchData.__span),f){const p=to(d.fetchData.url),m=p?Ie(p).host:void 0;f.setAttributes({"http.url":p,"server.address":m})}o&&f&&Hr(f)})),r&&Bn(d=>{const f=tf(d,a,c,u);o&&f&&Hr(f)})}function Vd(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Hr(e){const{url:t}=I(e).data||{};if(!t||typeof t!="string")return;const n=tt("resource",({entries:r})=>{r.forEach(s=>{Vd(s)&&s.name.endsWith(t)&&(Qd(s).forEach(i=>e.setAttribute(...i)),setTimeout(n))})})}function Zd(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function V(e=0){return((j||performance.timeOrigin)+e)/1e3}function Qd(e){const{name:t,version:n}=Zd(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),j?[...r,["http.request.redirect_start",V(e.redirectStart)],["http.request.fetch_start",V(e.fetchStart)],["http.request.domain_lookup_start",V(e.domainLookupStart)],["http.request.domain_lookup_end",V(e.domainLookupEnd)],["http.request.connect_start",V(e.connectStart)],["http.request.secure_connection_start",V(e.secureConnectionStart)],["http.request.connection_end",V(e.connectEnd)],["http.request.request_start",V(e.requestStart)],["http.request.response_start",V(e.responseStart)],["http.request.response_end",V(e.responseEnd)]]:r}function ef(e,t){const n=S.location&&S.location.href;if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const o=r.origin===s;return t?be(r.toString(),t)||o&&be(r.pathname,t):o}else{const r=!!e.match(/^\/(?!\/)/);return t?be(e,t):r}}function tf(e,t,n,r){const s=e.xhr,o=s&&s[Se];if(!s||s.__sentry_own_request__||!o)return;const i=pe()&&t(o.url);if(e.endTimestamp&&i){const p=s.__sentry_xhr_span_id__;if(!p)return;const m=r[p];m&&o.status_code!==void 0&&(ms(m,o.status_code),m.end(),delete r[p]);return}const a=to(o.url),c=a?Ie(a).host:void 0,u=!!U(),d=i&&u?ge({name:`${o.method} ${o.url}`,attributes:{type:"xhr","http.method":o.method,"http.url":a,url:o.url,"server.address":c,[x]:"auto.http.browser",[xe]:"http.client"}}):new Ye;s.__sentry_xhr_span_id__=d.spanContext().spanId,r[s.__sentry_xhr_span_id__]=d;const f=b();return s.setRequestHeader&&n(o.url)&&f&&nf(s,f,pe()&&u?d:void 0),d}function nf(e,t,n){const r=k(),s=ce(),{traceId:o,spanId:i,sampled:a,dsc:c}={...s.getPropagationContext(),...r.getPropagationContext()},u=n&&pe()?_s(n):Cn(o,i,a),d=ds(c||(n?De(n):jt(o,t)));rf(e,u,d)}function rf(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(cn,n)}catch{}}function to(e){try{return new URL(e,S.location.origin).href}catch{return}}function sf(){S&&S.document?S.document.addEventListener("visibilitychange",()=>{const e=U();if(!e)return;const t=M(e);if(S.document.hidden&&t){const n="cancelled",{op:r,status:s}=I(t);H&&l.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:A,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):H&&l.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const of="BrowserTracing",af={...vt,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,_experiments:{},...vn},cf=(e={})=>{Oi();const{enableInp:t,enableLongTask:n,enableLongAnimationFrame:r,_experiments:{enableInteractions:s,enableStandaloneClsSpans:o},beforeStartSpan:i,idleTimeout:a,finalTimeout:c,childSpanTimeout:u,markBackgroundSpan:d,traceFetch:f,traceXHR:p,shouldCreateSpanForRequest:m,enableHTTPTimings:h,instrumentPageLoad:y,instrumentNavigation:N}={...af,...e},X=pu({recordClsStandaloneSpans:o||!1});t&&Hu(),r&&E.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?hu():n&&mu(),s&&gu();const J={name:void 0,source:void 0};function _e(L,C){const T=C.op==="pageload",v=i?i(C):C,D=v.attributes||{};C.name!==v.name&&(D[fe]="custom",v.attributes=D),J.name=v.name,J.source=D[fe];const K=ws(v,{idleTimeout:a,finalTimeout:c,childSpanTimeout:u,disableAutoFinish:T,beforeSpanEnd:ee=>{X(),bu(ee,{recordClsOnPageloadSpan:!o})}});function B(){["interactive","complete"].includes(S.document.readyState)&&L.emit("idleSpanEnableAutoFinish",K)}return T&&S.document&&(S.document.addEventListener("readystatechange",()=>{B()}),B()),K}return{name:of,afterAllSetup(L){let C,T=S.location&&S.location.href;L.on("startNavigationSpan",v=>{b()===L&&(C&&!I(C).timestamp&&(H&&l.log(`[Tracing] Finishing current root span with op: ${I(C).op}`),C.end()),C=_e(L,{op:"navigation",...v}))}),L.on("startPageLoadSpan",(v,D={})=>{if(b()!==L)return;C&&!I(C).timestamp&&(H&&l.log(`[Tracing] Finishing current root span with op: ${I(C).op}`),C.end());const K=D.sentryTrace||Ur("sentry-trace"),B=D.baggage||Ur("baggage"),ee=Vo(K,B);k().setPropagationContext(ee),C=_e(L,{op:"pageload",...v})}),L.on("spanEnd",v=>{const D=I(v).op;if(v!==M(v)||D!=="navigation"&&D!=="pageload")return;const K=k(),B=K.getPropagationContext();K.setPropagationContext({...B,sampled:B.sampled!==void 0?B.sampled:Pe(v),dsc:B.dsc||De(v)})}),S.location&&(y&&uf(L,{name:S.location.pathname,startTime:j?j/1e3:void 0,attributes:{[fe]:"url",[x]:"auto.pageload.browser"}}),N&&Un(({to:v,from:D})=>{if(D===void 0&&T&&T.indexOf(v)!==-1){T=void 0;return}D!==v&&(T=void 0,df(L,{name:S.location.pathname,attributes:{[fe]:"url",[x]:"auto.navigation.browser"}}))})),d&&sf(),s&&ff(a,c,u,J),t&&Bu(),Kd(L,{traceFetch:f,traceXHR:p,tracePropagationTargets:L.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:m,enableHTTPTimings:h})}}};function uf(e,t,n){e.emit("startPageLoadSpan",t,n),k().setTransactionName(t.name);const r=U();return(r&&I(r).op)==="pageload"?r:void 0}function df(e,t){ce().setPropagationContext(xt()),k().setPropagationContext(xt()),e.emit("startNavigationSpan",t),k().setTransactionName(t.name);const n=U();return(n&&I(n).op)==="navigation"?n:void 0}function Ur(e){const t=go(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function ff(e,t,n,r){let s;const o=()=>{const i="ui.action.click",a=U(),c=a&&M(a);if(c){const u=I(c).op;if(["navigation","pageload"].includes(u)){H&&l.warn(`[Tracing] Did not create ${i} span because a pageload or navigation span is in progress.`);return}}if(s&&(s.setAttribute(ln,"interactionInterrupted"),s.end(),s=void 0),!r.name){H&&l.warn(`[Tracing] Did not create ${i} transaction because _latestRouteName is missing.`);return}s=ws({name:r.name,op:i,attributes:{[fe]:r.source||"url"}},{idleTimeout:e,finalTimeout:t,childSpanTimeout:n})};S.document&&addEventListener("click",o,{once:!1,capture:!0})}function lf(e){const t={defaultIntegrations:pf(),...e};return Ds(t,"astro",["astro","browser"]),Md(t)}function pf(e){return typeof __SENTRY_TRACING__>"u"||__SENTRY_TRACING__?[...In(),cf()]:In()}lf({dsn:"https://[email protected]/4506859598970880",sampleRate:.1,environment:"prod",debug:!1,sendClientReports:!1,autoSessionTracking:!1,integrations:[ec({levels:["warn","error"]}),dc(),Hd()],ignoreErrors:[/Failed to retrieve hasPrivateToken response. Exceeded the number-of-issuers limit/],beforeSend:(e,t)=>/^(undefined|null|Failed to send JSON. See console logs)$/.test(t?.originalException?.message)?null:e});const Br=so(),no=ro(),jn=k();jn.setExtras(no);jn.setTag("language",no.language);Br&&jn.setUser({id:Br});

Светлая Пасха: главные запреты на этот день Вести. Кировская область. В "Театре на Спасской" по-новому расскажут историю из романа Тургенева "Отцы и дети" Не поворот на Запад, а диверсификация. Где Армения ищет поддержку после предательства России "Факел" нанес поражение ЦСКА в серии пенальти Таисия Повалий - Сердце - дом для любви Текст песни