import{g as as,c as en,a as cs,b as Kn,d as Fe,S as Zn,e as us,f as ds,s as fs,h as ps,j as ls,k as ms,l as gs,r as hs,m as _s}from"./vendor-misc-bJru-SXh.js";import{r as Ss}from"./react-core-lkHtAB4F.js";const g=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,b=globalThis,et=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,it="9.13.0";function gt(){return oe(b),b}function oe(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||it,e[it]=e[it]||{}}function ae(t,e,n=b){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[it]=r[it]||{};return s[t]||(s[t]=e())}const Es="Sentry Logger ",ye=["debug","info","warn","error","log","assert","trace"],te={};function ht(t){if(!("console"in b))return t();const e=b.console,n={},r=Object.keys(te);r.forEach(s=>{const i=te[s];n[s]=e[s],e[s]=i});try{return t()}finally{r.forEach(s=>{e[s]=n[s]})}}function ys(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return et?ye.forEach(n=>{e[n]=(...r)=>{t&&ht(()=>{b.console[n](`${Es}[${n}]:`,...r)})}}):ye.forEach(n=>{e[n]=()=>{}}),e}const m=ae("logger",ys),Qn=50,dt="?",nn=/\(error: (.*)\)/,rn=/captureMessage|captureException/;function tr(...t){const e=t.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,s=0)=>{const i=[],o=n.split(` `);for(let a=r;a1024)continue;const u=nn.test(c)?c.replace(nn,"$1"):c;if(!u.match(/\S*Error: /)){for(const f of e){const d=f(u);if(d){i.push(d);break}}if(i.length>=Qn+s)break}}return bs(i.slice(s))}}function Ts(t){return Array.isArray(t)?tr(...t):t}function bs(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(Gt(e).function||"")&&e.pop(),e.reverse(),rn.test(Gt(e).function||"")&&(e.pop(),rn.test(Gt(e).function||"")&&e.pop()),e.slice(0,Qn).map(n=>({...n,filename:n.filename||Gt(e).filename,function:n.function||dt}))}function Gt(t){return t[t.length-1]||{}}const pe="";function X(t){try{return!t||typeof t!="function"?pe:t.name||pe}catch{return pe}}function sn(t){const e=t.exception;if(e){const n=[];try{return e.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}const Jt={},on={};function Dt(t,e){Jt[t]=Jt[t]||[],Jt[t].push(e)}function Lt(t,e){if(!on[t]){on[t]=!0;try{e()}catch(n){et&&m.error(`Error while instrumenting ${t}`,n)}}}function ot(t,e){const n=t&&Jt[t];if(n)for(const r of n)try{r(e)}catch(s){et&&m.error(`Error while triggering instrumentation handler. Type: ${t} Name: ${X(r)} Error:`,s)}}let le=null;function er(t){const e="error";Dt(e,t),Lt(e,Is)}function Is(){le=b.onerror,b.onerror=function(t,e,n,r,s){return ot("error",{column:r,error:s,line:n,msg:t,url:e}),le?le.apply(this,arguments):!1},b.onerror.__SENTRY_INSTRUMENTED__=!0}let me=null;function nr(t){const e="unhandledrejection";Dt(e,t),Lt(e,vs)}function vs(){me=b.onunhandledrejection,b.onunhandledrejection=function(t){return ot("unhandledrejection",t),me?me.apply(this,arguments):!0},b.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const rr=1e3;function Ft(){return Date.now()/rr}function Rs(){const{performance:t}=b;if(!t?.now)return Ft;const e=Date.now()-t.now(),n=t.timeOrigin==null?e:t.timeOrigin;return()=>(n+t.now())/rr}const x=Rs();let ge;function As(){const{performance:t}=b;if(!t?.now)return[void 0,"none"];const e=3600*1e3,n=t.now(),r=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,i=s";try{let n=t;const r=5,s=[];let i=0,o=0;const a=" > ",c=a.length;let u;const f=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||xs;for(;n&&i++1&&o+s.length*c+u.length>=d));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return""}}function Ps(t,e){const n=t,r=[];if(!n?.tagName)return"";if(Be.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=e?.length?e.filter(o=>n.getAttribute(o)).map(o=>[o,n.getAttribute(o)]):null;if(s?.length)s.forEach(o=>{r.push(`[${o[0]}="${o[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const o=n.className;if(o&&Nt(o)){const a=o.split(/\s+/);for(const c of a)r.push(`.${c}`)}}const i=["aria-label","type","name","title","alt"];for(const o of i){const a=n.getAttribute(o);a&&r.push(`[${o}="${a}"]`)}return r.join("")}function $t(){try{return Be.document.location.href}catch{return""}}function Cs(t){if(!Be.HTMLElement)return null;let e=t;const n=5;for(let r=0;rDs(t,r,n))}function W(t,e,n){if(!(e in t))return;const r=t[e];if(typeof r!="function")return;const s=n(r);typeof s=="function"&&ur(s,r);try{t[e]=s}catch{et&&m.log(`Failed to replace method "${e}" in object`,t)}}function F(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{et&&m.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function ur(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,F(t,"__sentry_original__",e)}catch{}}function je(t){return t.__sentry_original__}function dr(t){if(Me(t))return{message:t.message,name:t.name,stack:t.stack,...dn(t)};if(ce(t)){const e={type:t.type,target:un(t.target),currentTarget:un(t.currentTarget),...dn(t)};return typeof CustomEvent<"u"&&z(t,CustomEvent)&&(e.detail=t.detail),e}else return t}function un(t){try{return Ns(t)?cr(t):Object.prototype.toString.call(t)}catch{return""}}function dn(t){if(typeof t=="object"&&t!==null){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}else return{}}function Ls(t,e=40){const n=Object.keys(dr(t));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return ee(r,e);for(let s=n.length;s>0;s--){const i=n.slice(0,s).join(", ");if(!(i.length>e))return s===n.length?i:ee(i,e)}return""}function Fs(){const t=b;return t.crypto||t.msCrypto}function L(t=Fs()){let e=()=>Math.random()*16;try{if(t?.randomUUID)return t.randomUUID().replace(/-/g,"");t?.getRandomValues&&(e=()=>{const n=new Uint8Array(1);return t.getRandomValues(n),n[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,n=>(n^(e()&15)>>n/4).toString(16))}function fr(t){return t.exception?.values?.[0]}function st(t){const{message:e,event_id:n}=t;if(e)return e;const r=fr(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function Te(t,e,n){const r=t.exception=t.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=e||""),i.type||(i.type="Error")}function Tt(t,e){const n=fr(t);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...e},e&&"data"in e){const i={...s?.data,...e.data};n.mechanism.data=i}}function fn(t){if($s(t))return!0;try{F(t,"__sentry_captured__",!0)}catch{}return!1}function $s(t){try{return t.__sentry_captured__}catch{}}var G;(function(t){t[t.PENDING=0]="PENDING";const n=1;t[t.RESOLVED=n]="RESOLVED";const r=2;t[t.REJECTED=r]="REJECTED"})(G||(G={}));function ft(t){return new K(e=>{e(t)})}function ne(t){return new K((e,n)=>{n(t)})}class K{constructor(e){this._state=G.PENDING,this._handlers=[],this._runExecutor(e)}then(e,n){return new K((r,s)=>{this._handlers.push([!1,i=>{if(!e)r(i);else try{r(e(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(e){return this.then(n=>n,e)}finally(e){return new K((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,e&&e()},o=>{i=!0,s=o,e&&e()}).then(()=>{if(i){r(s);return}n(s)})})}_executeHandlers(){if(this._state===G.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(n=>{n[0]||(this._state===G.RESOLVED&&n[1](this._value),this._state===G.REJECTED&&n[2](this._value),n[0]=!0)})}_runExecutor(e){const n=(i,o)=>{if(this._state===G.PENDING){if(ue(o)){o.then(r,s);return}this._state=i,this._value=o,this._executeHandlers()}},r=i=>{n(G.RESOLVED,i)},s=i=>{n(G.REJECTED,i)};try{e(r,s)}catch(i){s(i)}}}function Ms(t){const e=x(),n={sid:L(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>Hs(n)};return t&&bt(n,t),n}function bt(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),!t.did&&!e.did&&(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||x(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=e.sid.length===32?e.sid:L()),e.init!==void 0&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),typeof e.started=="number"&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if(typeof e.duration=="number")t.duration=e.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),typeof e.errors=="number"&&(t.errors=e.errors),e.status&&(t.status=e.status)}function Us(t,e){let n={};t.status==="ok"&&(n={status:"exited"}),bt(t,n)}function Hs(t){return{sid:`${t.sid}`,init:t.init,started:new Date(t.started*1e3).toISOString(),timestamp:new Date(t.timestamp*1e3).toISOString(),status:t.status,errors:t.errors,did:typeof t.did=="number"||typeof t.did=="string"?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}function Z(){return L()}function Mt(){return L().substring(16)}function Ut(t,e,n=2){if(!e||typeof e!="object"||n<=0)return e;if(t&&Object.keys(e).length===0)return t;const r={...t};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Ut(r[s],e[s],n-1));return r}const be="_sentrySpan";function kt(t,e){e?F(t,be,e):delete t[be]}function re(t){return t[be]}const Bs=100;class V{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Z(),sampleRand:Math.random()}}clone(){const e=new V;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,kt(e,re(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&bt(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,n){return this._tags={...this._tags,[e]:n},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,n){return this._extra={...this._extra,[e]:n},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,n){return n===null?delete this._contexts[e]:this._contexts[e]=n,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n=typeof e=="function"?e(this):e,r=n instanceof V?n.getScopeData():Ot(n)?e:void 0,{tags:s,extra:i,user:o,contexts:a,level:c,fingerprint:u=[],propagationContext:f}=r||{};return this._tags={...this._tags,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...a},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),u.length&&(this._fingerprint=u),f&&(this._propagationContext=f),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._session=void 0,kt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Z(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(e,n){const r=typeof n=="number"?n:Bs;if(r<=0)return this;const s={timestamp:Ft(),...e,message:e.message?ee(e.message,2048):e.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,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:re(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Ut(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){const r=n?.event_id||L();if(!this._client)return m.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:s,...n,event_id:r},this),r}captureMessage(e,n,r){const s=r?.event_id||L();if(!this._client)return m.warn("No client configured on scope - will not capture message!"),s;const i=new Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:i,...r,event_id:s},this),s}captureEvent(e,n){const r=n?.event_id||L();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(m.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}}function js(){return ae("defaultCurrentScope",()=>new V)}function Gs(){return ae("defaultIsolationScope",()=>new V)}class qs{constructor(e,n){let r;e?r=e:r=new V;let s;n?s=n:s=new V,this._stack=[{scope:r}],this._isolationScope=s}withScope(e){const n=this._pushScope();let r;try{r=e(n)}catch(s){throw this._popScope(),s}return ue(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 e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function It(){const t=gt(),e=oe(t);return e.stack=e.stack||new qs(js(),Gs())}function Ws(t){return It().withScope(t)}function Ys(t,e){const n=It();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function pn(t){return It().withScope(()=>t(It().getIsolationScope()))}function zs(){return{withIsolationScope:pn,withScope:Ws,withSetScope:Ys,withSetIsolationScope:(t,e)=>pn(e),getCurrentScope:()=>It().getScope(),getIsolationScope:()=>It().getIsolationScope()}}function At(t){const e=oe(t);return e.acs?e.acs:zs()}function w(){const t=gt();return At(t).getCurrentScope()}function nt(){const t=gt();return At(t).getIsolationScope()}function Vs(){return ae("globalScope",()=>new V)}function Ge(...t){const e=gt(),n=At(e);if(t.length===2){const[r,s]=t;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(t[0])}function I(){return w().getClient()}function Js(t){const e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=e,i={trace_id:n,span_id:s||Mt()};return r&&(i.parent_span_id=r),i}const Y="sentry.source",pr="sentry.sample_rate",xt="sentry.op",pt="sentry.origin",Ie="sentry.idle_span_finish_reason",lr="sentry.measurement_unit",mr="sentry.measurement_value",ln="sentry.custom_span_name",qe="sentry.profile_id",We="sentry.exclusive_time",Xs="sentry.link.type",Ks=0,gr=1,N=2;function Zs(t){if(t<400&&t>=100)return{code:gr};if(t>=400&&t<500)switch(t){case 401:return{code:N,message:"unauthenticated"};case 403:return{code:N,message:"permission_denied"};case 404:return{code:N,message:"not_found"};case 409:return{code:N,message:"already_exists"};case 413:return{code:N,message:"failed_precondition"};case 429:return{code:N,message:"resource_exhausted"};case 499:return{code:N,message:"cancelled"};default:return{code:N,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:N,message:"unimplemented"};case 503:return{code:N,message:"unavailable"};case 504:return{code:N,message:"deadline_exceeded"};default:return{code:N,message:"internal_error"}}return{code:N,message:"unknown_error"}}function hr(t,e){t.setAttribute("http.response.status_code",e);const n=Zs(e);n.message!=="unknown_error"&&t.setStatus(n)}const _r="_sentryScope",Sr="_sentryIsolationScope";function Qs(t,e,n){t&&(F(t,Sr,n),F(t,_r,e))}function se(t){return{scope:t[_r],isolationScope:t[Sr]}}function Pt(t){if(typeof t=="boolean")return Number(t);const e=typeof t=="string"?parseFloat(t):t;if(!(typeof e!="number"||isNaN(e)||e<0||e>1))return e}const Ye="sentry-",ti=/^sentry-/,ei=8192;function Er(t){const e=ri(t);if(!e)return;const n=Object.entries(e).reduce((r,[s,i])=>{if(s.match(ti)){const o=s.slice(Ye.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function ni(t){if(!t)return;const e=Object.entries(t).reduce((n,[r,s])=>(s&&(n[`${Ye}${r}`]=s),n),{});return si(e)}function ri(t){if(!(!t||!Nt(t)&&!Array.isArray(t)))return Array.isArray(t)?t.reduce((e,n)=>{const r=mn(n);return Object.entries(r).forEach(([s,i])=>{e[s]=i}),e},{}):mn(t)}function mn(t){return t.split(",").map(e=>e.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((e,[n,r])=>(n&&r&&(e[n]=r),e),{})}function si(t){if(Object.keys(t).length!==0)return Object.entries(t).reduce((e,[n,r],s)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=s===0?i:`${e},${i}`;return o.length>ei?(et&&m.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),e):o},"")}const yr=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ii(t){if(!t)return;const e=t.match(yr);if(!e)return;let n;return e[3]==="1"?n=!0:e[3]==="0"&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}function oi(t,e){const n=ii(t),r=Er(e);if(!n?.traceId)return{traceId:Z(),sampleRand:Math.random()};const s=ai(n,r);r&&(r.sample_rand=s.toString());const{traceId:i,parentSpanId:o,parentSampled:a}=n;return{traceId:i,parentSpanId:o,sampled:a,dsc:r||{},sampleRand:s}}function Tr(t=Z(),e=Mt(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${t}-${e}${r}`}function ai(t,e){const n=Pt(e?.sample_rand);if(n!==void 0)return n;const r=Pt(e?.sample_rate);return r&&t?.parentSampled!==void 0?t.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const br=0,ze=1;let gn=!1;function ci(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:a,links:c}=R(t);return{parent_span_id:i,span_id:e,trace_id:n,data:r,op:s,status:o,origin:a,links:c}}function ui(t){const{spanId:e,traceId:n,isRemote:r}=t.spanContext(),s=r?e:R(t).parent_span_id,i=se(t).scope,o=r?i?.getPropagationContext().propagationSpanId||Mt():e;return{parent_span_id:s,span_id:o,trace_id:n}}function di(t){const{traceId:e,spanId:n}=t.spanContext(),r=_t(t);return Tr(e,n,r)}function Ir(t){if(t&&t.length>0)return t.map(({context:{spanId:e,traceId:n,traceFlags:r,...s},attributes:i})=>({span_id:e,trace_id:n,sampled:r===ze,attributes:i,...s}))}function ct(t){return typeof t=="number"?hn(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?hn(t.getTime()):x()}function hn(t){return t>9999999999?t/1e3:t}function R(t){if(pi(t))return t.getSpanJSON();const{spanId:e,traceId:n}=t.spanContext();if(fi(t)){const{attributes:r,startTime:s,name:i,endTime:o,parentSpanId:a,status:c,links:u}=t;return{span_id:e,trace_id:n,data:r,description:i,parent_span_id:a,start_timestamp:ct(s),timestamp:ct(o)||void 0,status:vr(c),op:r[xt],origin:r[pt],links:Ir(u)}}return{span_id:e,trace_id:n,start_timestamp:0,data:{}}}function fi(t){const e=t;return!!e.attributes&&!!e.startTime&&!!e.name&&!!e.endTime&&!!e.status}function pi(t){return typeof t.getSpanJSON=="function"}function _t(t){const{traceFlags:e}=t.spanContext();return e===ze}function vr(t){if(!(!t||t.code===Ks))return t.code===gr?"ok":t.message||"unknown_error"}const ut="_sentryChildSpans",ve="_sentryRootSpan";function Rr(t,e){const n=t[ve]||t;F(e,ve,n),t[ut]?t[ut].add(e):F(t,ut,new Set([e]))}function li(t,e){t[ut]&&t[ut].delete(e)}function Xt(t){const e=new Set;function n(r){if(!e.has(r)&&_t(r)){e.add(r);const s=r[ut]?Array.from(r[ut]):[];for(const i of s)n(i)}}return n(t),Array.from(e)}function P(t){return t[ve]||t}function St(){const t=gt(),e=At(t);return e.getActiveSpan?e.getActiveSpan():re(w())}function Re(){gn||(ht(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly.")}),gn=!0)}let _n=!1;function mi(){_n||(_n=!0,er(Ae),nr(Ae))}function Ae(){const t=St(),e=t&&P(t);if(e){const n="internal_error";g&&m.log(`[Tracing] Root span: ${n} -> Global error occurred`),e.setStatus({code:N,message:n})}}Ae.tag="sentry_tracingErrorCallback";function Q(t){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const e=t||I()?.getOptions();return!!e&&(e.tracesSampleRate!=null||!!e.tracesSampler)}const Ve="production",Ar="_frozenDsc";function Kt(t,e){F(t,Ar,e)}function wr(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},s={environment:n.environment||Ve,release:n.release,public_key:r,trace_id:t};return e.emit("createDsc",s),s}function Nr(t,e){const n=e.getPropagationContext();return n.dsc||wr(n.traceId,t)}function tt(t){const e=I();if(!e)return{};const n=P(t),r=R(n),s=r.data,i=n.spanContext().traceState,o=i?.get("sentry.sample_rate")??s[pr];function a(E){return(typeof o=="number"||typeof o=="string")&&(E.sample_rate=`${o}`),E}const c=n[Ar];if(c)return a(c);const u=i?.get("sentry.dsc"),f=u&&Er(u);if(f)return a(f);const d=wr(t.spanContext().traceId,e),l=s[Y],p=r.description;return l!=="url"&&p&&(d.transaction=p),Q()&&(d.sampled=String(_t(n)),d.sample_rand=i?.get("sentry.sample_rand")??se(n).scope?.getPropagationContext().sampleRand.toString()),a(d),e.emit("createDsc",d,n),d}class lt{constructor(e={}){this._traceId=e.traceId||Z(),this._spanId=e.spanId||Mt()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:br}}end(e){}setAttribute(e,n){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,n,r){return this}addLink(e){return this}addLinks(e){return this}recordException(e,n){}}function gi(t){if(!g)return;const{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:r}=R(t),{spanId:s}=t.spanContext(),i=_t(t),o=P(t),a=o===t,c=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${e}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:f,description:d}=R(o);u.push(`root ID: ${o.spanContext().spanId}`),f&&u.push(`root op: ${f}`),d&&u.push(`root description: ${d}`)}m.log(`${c} ${u.join(` `)}`)}function hi(t){if(!g)return;const{description:e="< unknown name >",op:n="< unknown op >"}=R(t),{spanId:r}=t.spanContext(),i=P(t)===t,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${e}" with ID ${r}`;m.log(o)}function _i(t,e,n){if(!Q(t))return[!1];let r,s;typeof t.tracesSampler=="function"?(s=t.tracesSampler({...e,inheritOrSampleWith:a=>typeof e.parentSampleRate=="number"?e.parentSampleRate:typeof e.parentSampled=="boolean"?Number(e.parentSampled):a}),r=!0):e.parentSampled!==void 0?s=e.parentSampled:typeof t.tracesSampleRate<"u"&&(s=t.tracesSampleRate,r=!0);const i=Pt(s);if(i===void 0)return g&&m.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!i)return g&&m.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,i,r];const o=n{console.error(`Invalid Sentry Dsn: ${t}`)});return}const[n,r,s="",i="",o="",a=""]=e.slice(1);let c="",u=a;const f=u.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),u=f.pop()),u){const d=u.match(/^\d+/);d&&(u=d[0])}return Or({host:i,pass:s,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function Or(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function Ti(t){if(!et)return!0;const{port:e,projectId:n,protocol:r}=t;return["protocol","publicKey","host","projectId"].find(o=>t[o]?!1:(m.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?Ei(r)?e&&isNaN(parseInt(e,10))?(m.error(`Invalid Sentry Dsn: Invalid port ${e}`),!1):!0:(m.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(m.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function bi(t){const e=typeof t=="string"?yi(t):Or(t);if(!(!e||!Ti(e)))return e}function q(t,e=100,n=1/0){try{return we("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function kr(t,e=3,n=100*1024){const r=q(t,e);return Ai(r)>n?kr(t,e-1,n):r}function we(t,e,n=1/0,r=1/0,s=wi()){const[i,o]=s;if(e==null||["boolean","string"].includes(typeof e)||typeof e=="number"&&Number.isFinite(e))return e;const a=Ii(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;const c=typeof e.__sentry_override_normalization_depth__=="number"?e.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(i(e))return"[Circular ~]";const u=e;if(u&&typeof u.toJSON=="function")try{const p=u.toJSON();return we("",p,c-1,r,s)}catch{}const f=Array.isArray(e)?[]:{};let d=0;const l=dr(e);for(const p in l){if(!Object.prototype.hasOwnProperty.call(l,p))continue;if(d>=r){f[p]="[MaxProperties ~]";break}const E=l[p];f[p]=we(p,E,c-1,r,s),d++}return o(e),f}function Ii(t,e){try{if(t==="domain"&&e&&typeof e=="object"&&e._events)return"[Domain]";if(t==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&e===global)return"[Global]";if(typeof window<"u"&&e===window)return"[Window]";if(typeof document<"u"&&e===document)return"[Document]";if(or(e))return"[VueViewModel]";if(ks(e))return"[SyntheticEvent]";if(typeof e=="number"&&!Number.isFinite(e))return`[${e}]`;if(typeof e=="function")return`[Function: ${X(e)}]`;if(typeof e=="symbol")return`[${String(e)}]`;if(typeof e=="bigint")return`[BigInt: ${String(e)}]`;const n=vi(e);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function vi(t){const e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}function Ri(t){return~-encodeURI(t).split(/%..|./).length}function Ai(t){return Ri(JSON.stringify(t))}function wi(){const t=new WeakSet;function e(r){return t.has(r)?!0:(t.add(r),!1)}function n(r){t.delete(r)}return[e,n]}function wt(t,e=[]){return[t,e]}function Ni(t,e){const[n,r]=t;return[n,[...r,e]]}function Sn(t,e){const n=t[1];for(const r of n){const s=r[0].type;if(e(r,s))return!0}return!1}function Ne(t){const e=oe(b);return e.encodePolyfill?e.encodePolyfill(t):new TextEncoder().encode(t)}function Oi(t){const[e,n]=t;let r=JSON.stringify(e);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[Ne(r),i]:r.push(typeof i=="string"?Ne(i):i)}for(const i of n){const[o,a]=i;if(s(` ${JSON.stringify(o)} `),typeof a=="string"||a instanceof Uint8Array)s(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(q(a))}s(c)}}return typeof r=="string"?r:ki(r)}function ki(t){const e=t.reduce((s,i)=>s+i.length,0),n=new Uint8Array(e);let r=0;for(const s of t)n.set(s,r),r+=s.length;return n}function xi(t){return[{type:"span"},t]}function Pi(t){const e=typeof t.data=="string"?Ne(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}const Ci={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",raw_security:"security",otel_log:"log_item"};function En(t){return Ci[t]}function xr(t){if(!t?.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function Di(t,e,n,r){const s=t.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date().toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:Ht(r)},...s&&{trace:s}}}function Li(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]]),t}function Fi(t,e,n,r){const s=xr(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:Ht(e)}},o="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()];return wt(i,[o])}function $i(t,e,n,r){const s=xr(n),i=t.type&&t.type!=="replay_event"?t.type:"event";Li(t,n?.sdk);const o=Di(t,s,r,e);return delete t.sdkProcessingMetadata,wt(o,[[{type:i},t]])}function Mi(t,e){function n(f){return!!f.trace_id&&!!f.public_key}const r=tt(t[0]),s=e?.getDsn(),i=e?.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:Ht(s)}},a=e?.getOptions().beforeSendSpan,c=a?f=>{const d=R(f),l=a(d);return l||(Re(),d)}:R,u=[];for(const f of t){const d=c(f);d&&u.push(xi(d))}return wt(o,u)}function du(t,e,n,r=St()){const s=r&&P(r);s&&(g&&m.log(`[Measurement] Setting measurement on root span: ${t} = ${e} ${n}`),s.addEvent(t,{[mr]:e,[lr]:n}))}function yn(t){if(!t||t.length===0)return;const e={};return t.forEach(n=>{const r=n.attributes||{},s=r[lr],i=r[mr];typeof s=="string"&&typeof i=="number"&&(e[n.name]={value:i,unit:s})}),e}const Tn=1e3;class Je{constructor(e={}){this._traceId=e.traceId||Z(),this._spanId=e.spanId||Mt(),this._startTime=e.startTimestamp||x(),this._links=e.links,this._attributes={},this.setAttributes({[pt]:"manual",[xt]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this._links?this._links.push(e):this._links=[e],this}addLinks(e){return this._links?this._links.push(...e):this._links=e,this}recordException(e,n){}spanContext(){const{_spanId:e,_traceId:n,_sampled:r}=this;return{spanId:e,traceId:n,traceFlags:r?ze:br}}setAttribute(e,n){return n===void 0?delete this._attributes[e]:this._attributes[e]=n,this}setAttributes(e){return Object.keys(e).forEach(n=>this.setAttribute(n,e[n])),this}updateStartTime(e){this._startTime=ct(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(Y,"custom"),this}end(e){this._endTime||(this._endTime=ct(e),hi(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[xt],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:vr(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[pt],profile_id:this._attributes[qe],exclusive_time:this._attributes[We],measurements:yn(this._events),is_segment:this._isStandaloneSpan&&P(this)===this||void 0,segment_id:this._isStandaloneSpan?P(this).spanContext().spanId:void 0,links:Ir(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){g&&m.log("[Tracing] Adding an event to span:",e);const s=bn(n)?n:r||x(),i=bn(n)?{}:n||{},o={name:e,time:ct(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const e=I();if(e&&e.emit("spanEnd",this),!(this._isStandaloneSpan||this===P(this)))return;if(this._isStandaloneSpan){this._sampled?Hi(Mi([this],e)):(g&&m.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),e&&e.recordDroppedEvent("sample_rate","span"));return}const r=this._convertSpanToTransaction();r&&(se(this).scope||w()).captureEvent(r)}_convertSpanToTransaction(){if(!In(R(this)))return;this._name||(g&&m.warn("Transaction has no name, falling back to ``."),this._name="");const{scope:e,isolationScope:n}=se(this);if(this._sampled!==!0)return;const s=Xt(this).filter(u=>u!==this&&!Ui(u)).map(u=>R(u)).filter(In),i=this._attributes[Y];delete this._attributes[ln],s.forEach(u=>{delete u.data[ln]});const o={contexts:{trace:ci(this)},spans:s.length>Tn?s.sort((u,f)=>u.start_timestamp-f.start_timestamp).slice(0,Tn):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:n,dynamicSamplingContext:tt(this)},...i&&{transaction_info:{source:i}}},a=yn(this._events);return a&&Object.keys(a).length&&(g&&m.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,void 0,2)),o.measurements=a),o}}function bn(t){return t&&typeof t=="number"||t instanceof Date||Array.isArray(t)}function In(t){return!!t.start_timestamp&&!!t.timestamp&&!!t.span_id&&!!t.trace_id}function Ui(t){return t instanceof Je&&t.isStandaloneSpan()}function Hi(t){const e=I();if(!e)return;const n=t[1];if(!n||n.length===0){e.recordDroppedEvent("before_send","span");return}e.sendEnvelope(t)}const Pr="__SENTRY_SUPPRESS_TRACING__";function Xe(t){const e=Cr();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=Gi(t),{forceTransaction:r,parentSpan:s}=t;return(t.scope?o=>Ge(t.scope,o):s!==void 0?o=>Bi(s,o):o=>o())(()=>{const o=w(),a=Wi(o);return t.onlyIfParent&&!a?new lt:ji({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function Bi(t,e){const n=Cr();return n.withActiveSpan?n.withActiveSpan(t,e):Ge(r=>(kt(r,t||void 0),e(r)))}function ji({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){if(!Q()){const o=new lt;if(n||!t){const a={sampled:"false",sample_rate:"0",transaction:e.name,...tt(o)};Kt(o,a)}return o}const s=nt();let i;if(t&&!n)i=qi(t,r,e),Rr(t,i);else if(t){const o=tt(t),{traceId:a,spanId:c}=t.spanContext(),u=_t(t);i=vn({traceId:a,parentSpanId:c,...e},r,u),Kt(i,o)}else{const{traceId:o,dsc:a,parentSpanId:c,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};i=vn({traceId:o,parentSpanId:c,...e},r,u),a&&Kt(i,a)}return gi(i),Qs(i,r,s),i}function Gi(t){const n={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const r={...n};return r.startTimestamp=ct(t.startTime),delete r.startTime,r}return n}function Cr(){const t=gt();return At(t)}function vn(t,e,n){const r=I(),s=r?.getOptions()||{},{name:i="",attributes:o}=t,a=e.getPropagationContext(),[c,u,f]=e.getScopeData().sdkProcessingMetadata[Pr]?[!1]:_i(s,{name:i,parentSampled:n,attributes:o,parentSampleRate:Pt(a.dsc?.sample_rate)},a.sampleRand),d=new Je({...t,attributes:{[Y]:"custom",[pr]:u!==void 0&&f?u:void 0,...t.attributes},sampled:c});return!c&&r&&(g&&m.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",d),d}function qi(t,e,n){const{spanId:r,traceId:s}=t.spanContext(),i=e.getScopeData().sdkProcessingMetadata[Pr]?!1:_t(t),o=i?new Je({...n,parentSpanId:r,traceId:s,sampled:i}):new lt({traceId:s});Rr(t,o);const a=I();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function Wi(t){const e=re(t);if(!e)return;const n=I();return(n?n.getOptions():{}).parentSpanIsAlwaysRootSpan?P(e):e}const Zt={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Yi="heartbeatFailed",zi="idleTimeout",Vi="finalTimeout",Ji="externalFinish";function Dr(t,e={}){const n=new Map;let r=!1,s,i=Ji,o=!e.disableAutoFinish;const a=[],{idleTimeout:c=Zt.idleTimeout,finalTimeout:u=Zt.finalTimeout,childSpanTimeout:f=Zt.childSpanTimeout,beforeSpanEnd:d}=e,l=I();if(!l||!Q()){const S=new lt,O={sample_rate:"0",sampled:"false",...tt(S)};return Kt(S,O),S}const p=w(),E=St(),h=Xi(t);h.end=new Proxy(h.end,{apply(S,O,A){if(d&&d(h),O instanceof lt)return;const[D,...$]=A,T=D||x(),y=ct(T),k=Xt(h).filter(J=>J!==h);if(!k.length)return jt(y),Reflect.apply(S,O,[y,...$]);const H=k.map(J=>R(J).timestamp).filter(J=>!!J),B=H.length?Math.max(...H):void 0,j=R(h).start_timestamp,Et=Math.min(j?j+u/1e3:1/0,Math.max(j||-1/0,Math.min(y,B||1/0)));return jt(Et),Reflect.apply(S,O,[Et,...$])}});function v(){s&&(clearTimeout(s),s=void 0)}function U(S){v(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=zi,h.end(S))},c)}function rt(S){s=setTimeout(()=>{!r&&o&&(i=Yi,h.end(S))},f)}function Bt(S){v(),n.set(S,!0);const O=x();rt(O+f/1e3)}function fe(S){if(n.has(S)&&n.delete(S),n.size===0){const O=x();U(O+c/1e3)}}function jt(S){r=!0,n.clear(),a.forEach(y=>y()),kt(p,E);const O=R(h),{start_timestamp:A}=O;if(!A)return;O.data[Ie]||h.setAttribute(Ie,i),m.log(`[Tracing] Idle span "${O.op}" finished`);const $=Xt(h).filter(y=>y!==h);let T=0;$.forEach(y=>{y.isRecording()&&(y.setStatus({code:N,message:"cancelled"}),y.end(S),g&&m.log("[Tracing] Cancelling span since span ended early",JSON.stringify(y,void 0,2)));const k=R(y),{timestamp:H=0,start_timestamp:B=0}=k,j=B<=S,Et=(u+c)/1e3,J=H-B<=Et;if(g){const tn=JSON.stringify(y,void 0,2);j?J||m.log("[Tracing] Discarding span since it finished after idle span final timeout",tn):m.log("[Tracing] Discarding span since it happened after idle span was finished",tn)}(!J||!j)&&(li(h,y),T++)}),T>0&&h.setAttribute("sentry.idle_span_discarded_spans",T)}return a.push(l.on("spanStart",S=>{if(r||S===h||R(S).timestamp)return;Xt(h).includes(S)&&Bt(S.spanContext().spanId)})),a.push(l.on("spanEnd",S=>{r||fe(S.spanContext().spanId)})),a.push(l.on("idleSpanEnableAutoFinish",S=>{S===h&&(o=!0,U(),n.size&&rt())})),e.disableAutoFinish||U(),setTimeout(()=>{r||(h.setStatus({code:N,message:"deadline_exceeded"}),i=Vi,h.end())},u),h}function Xi(t){const e=Xe(t);return kt(w(),e),g&&m.log("[Tracing] Started span is an idle span"),e}function Oe(t,e,n,r=0){return new K((s,i)=>{const o=t[r];if(e===null||typeof o!="function")s(e);else{const a=o({...e},n);g&&o.id&&a===null&&m.log(`Event processor "${o.id}" dropped event`),ue(a)?a.then(c=>Oe(t,c,n,r+1).then(s)).then(null,i):Oe(t,a,n,r+1).then(s).then(null,i)}})}let qt,Rn,Wt;function Ki(t){const e=b._sentryDebugIds;if(!e)return{};const n=Object.keys(e);return Wt&&n.length===Rn||(Rn=n.length,Wt=n.reduce((r,s)=>{qt||(qt={});const i=qt[s];if(i)r[i[0]]=i[1];else{const o=t(s);for(let a=o.length-1;a>=0;a--){const u=o[a]?.filename,f=e[s];if(u&&f){r[u]=f,qt[s]=[u,f];break}}}return r},{})),Wt}function Zi(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=e;Qi(t,e),r&&no(t,r),ro(t,n),to(t,s),eo(t,i)}function An(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:f,attachments:d,propagationContext:l,transactionName:p,span:E}=e;Yt(t,"extra",n),Yt(t,"tags",r),Yt(t,"user",s),Yt(t,"contexts",i),t.sdkProcessingMetadata=Ut(t.sdkProcessingMetadata,a,2),o&&(t.level=o),p&&(t.transactionName=p),E&&(t.span=E),c.length&&(t.breadcrumbs=[...t.breadcrumbs,...c]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),f.length&&(t.eventProcessors=[...t.eventProcessors,...f]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext={...t.propagationContext,...l}}function Yt(t,e,n){t[e]=Ut(t[e],n,1)}function Qi(t,e){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=e;Object.keys(n).length&&(t.extra={...n,...t.extra}),Object.keys(r).length&&(t.tags={...r,...t.tags}),Object.keys(s).length&&(t.user={...s,...t.user}),Object.keys(i).length&&(t.contexts={...i,...t.contexts}),o&&(t.level=o),a&&t.type!=="transaction"&&(t.transaction=a)}function to(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}function eo(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}function no(t,e){t.contexts={trace:ui(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:tt(e),...t.sdkProcessingMetadata};const n=P(e),r=R(n).description;r&&!t.transaction&&t.type==="transaction"&&(t.transaction=r)}function ro(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e)),t.fingerprint.length||delete t.fingerprint}function so(t,e,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=t,c={...e,event_id:e.event_id||n.event_id||L(),timestamp:e.timestamp||Ft()},u=n.integrations||t.integrations.map(v=>v.name);io(c,t),co(c,u),s&&s.emit("applyFrameMetadata",e),e.type===void 0&&oo(c,t.stackParser);const f=fo(r,n.captureContext);n.mechanism&&Tt(c,n.mechanism);const d=s?s.getEventProcessors():[],l=Vs().getScopeData();if(i){const v=i.getScopeData();An(l,v)}if(f){const v=f.getScopeData();An(l,v)}const p=[...n.attachments||[],...l.attachments];p.length&&(n.attachments=p),Zi(c,l);const E=[...d,...l.eventProcessors];return Oe(E,c,n).then(v=>(v&&ao(v),typeof o=="number"&&o>0?uo(v,o,a):v))}function io(t,e){const{environment:n,release:r,dist:s,maxValueLength:i=250}=e;t.environment=t.environment||n||Ve,!t.release&&r&&(t.release=r),!t.dist&&s&&(t.dist=s);const o=t.request;o?.url&&(o.url=ee(o.url,i))}function oo(t,e){const n=Ki(e);t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.filename&&(s.debug_id=n[s.filename])})})}function ao(t){const e={};if(t.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.debug_id&&(s.abs_path?e[s.abs_path]=s.debug_id:s.filename&&(e[s.filename]=s.debug_id),delete s.debug_id)})}),Object.keys(e).length===0)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const n=t.debug_meta.images;Object.entries(e).forEach(([r,s])=>{n.push({type:"sourcemap",code_file:r,debug_id:s})})}function co(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}function uo(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(s=>({...s,...s.data&&{data:q(s.data,e,n)}}))},...t.user&&{user:q(t.user,e,n)},...t.contexts&&{contexts:q(t.contexts,e,n)},...t.extra&&{extra:q(t.extra,e,n)}};return t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=q(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(s=>({...s,...s.data&&{data:q(s.data,e,n)}}))),t.contexts?.flags&&r.contexts&&(r.contexts.flags=q(t.contexts.flags,3,n)),r}function fo(t,e){if(!e)return t;const n=t?t.clone():new V;return n.update(e),n}function po(t,e){return w().captureException(t,void 0)}function Lr(t,e){return w().captureEvent(t,e)}function lo(t,e){nt().setContext(t,e)}function mo(){const t=I();return t?.getOptions().enabled!==!1&&!!t?.getTransport()}function wn(t){const e=nt(),n=w(),{userAgent:r}=b.navigator||{},s=Ms({user:n.getUser()||e.getUser(),...r&&{userAgent:r},...t}),i=e.getSession();return i?.status==="ok"&&bt(i,{status:"exited"}),Fr(),e.setSession(s),s}function Fr(){const t=nt(),n=w().getSession()||t.getSession();n&&Us(n),$r(),t.setSession()}function $r(){const t=nt(),e=I(),n=t.getSession();n&&e&&e.captureSession(n)}function Nn(t=!1){if(t){Fr();return}$r()}const go="7";function ho(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function _o(t){return`${ho(t)}${t.projectId}/envelope/`}function So(t,e){const n={sentry_version:go};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}function Eo(t,e,n){return e||`${_o(t)}?${So(t,n)}`}const On=[];function yo(t){const e={};return t.forEach(n=>{const{name:r}=n,s=e[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(e[r]=n)}),Object.values(e)}function To(t){const e=t.defaultIntegrations||[],n=t.integrations;e.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...e,...n];else if(typeof n=="function"){const s=n(e);r=Array.isArray(s)?s:[s]}else r=e;return yo(r)}function bo(t,e){const n={};return e.forEach(r=>{r&&Mr(t,r,n)}),n}function kn(t,e){for(const n of e)n?.afterAllSetup&&n.afterAllSetup(t)}function Mr(t,e,n){if(n[e.name]){g&&m.log(`Integration skipped because it was already installed: ${e.name}`);return}if(n[e.name]=e,On.indexOf(e.name)===-1&&typeof e.setupOnce=="function"&&(e.setupOnce(),On.push(e.name)),e.setup&&typeof e.setup=="function"&&e.setup(t),typeof e.preprocessEvent=="function"){const r=e.preprocessEvent.bind(e);t.on("preprocessEvent",(s,i)=>r(s,i,t))}if(typeof e.processEvent=="function"){const r=e.processEvent.bind(e),s=Object.assign((i,o)=>r(i,o,t),{id:e.name});t.addEventProcessor(s)}g&&m.log(`Integration installed: ${e.name}`)}function Io(t,e,n){const r=[{type:"client_report"},{timestamp:Ft(),discarded_events:t}];return wt(e?{dsn:e}:{},[r])}function Ur(t){const e=[];t.message&&e.push(t.message);try{const n=t.exception.values[t.exception.values.length-1];n?.value&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch{}return e}function vo(t){const{trace_id:e,parent_span_id:n,span_id:r,status:s,origin:i,data:o,op:a}=t.contexts?.trace??{};return{data:o??{},description:t.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:t.start_timestamp??0,status:s,timestamp:t.timestamp,trace_id:e??"",origin:i,profile_id:o?.[qe],exclusive_time:o?.[We],measurements:t.measurements,is_segment:!0}}function Ro(t){return{type:"transaction",timestamp:t.timestamp,start_timestamp:t.start_timestamp,transaction:t.description,contexts:{trace:{trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,op:t.op,status:t.status,origin:t.origin,data:{...t.data,...t.profile_id&&{[qe]:t.profile_id},...t.exclusive_time&&{[We]:t.exclusive_time}}}},measurements:t.measurements}}const xn="Not capturing exception because it's already been captured.",Pn="Discarded session because of missing or non-string release",Hr=Symbol.for("SentryInternalError"),Br=Symbol.for("SentryDoNotSendEventError");function Qt(t){return{message:t,[Hr]:!0}}function he(t){return{message:t,[Br]:!0}}function Cn(t){return!!t&&typeof t=="object"&&Hr in t}function Dn(t){return!!t&&typeof t=="object"&&Br in t}class Ao{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],e.dsn?this._dsn=bi(e.dsn):g&&m.warn("No DSN provided, client will not send events."),this._dsn){const n=Eo(this._dsn,e.tunnel,e._metadata?e._metadata.sdk:void 0);this._transport=e.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:n})}}captureException(e,n,r){const s=L();if(fn(e))return g&&m.log(xn),s;const i={event_id:s,...n};return this._process(this.eventFromException(e,i).then(o=>this._captureEvent(o,i,r))),i.event_id}captureMessage(e,n,r,s){const i={event_id:L(),...r},o=Ue(e)?e:String(e),a=He(e)?this.eventFromMessage(o,n,i):this.eventFromException(e,i);return this._process(a.then(c=>this._captureEvent(c,i,s))),i.event_id}captureEvent(e,n,r){const s=L();if(n?.originalException&&fn(n.originalException))return g&&m.log(xn),s;const i={event_id:s,...n},o=e.sdkProcessingMetadata||{},a=o.capturedSpanScope,c=o.capturedSpanIsolationScope;return this._process(this._captureEvent(e,i,a||r,c)),i.event_id}captureSession(e){this.sendSession(e),bt(e,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const n=this._transport;return n?(this.emit("flush"),this._isClientDoneProcessing(e).then(r=>n.flush(e).then(s=>r&&s))):ft(!0)}close(e){return this.flush(e).then(n=>(this.getOptions().enabled=!1,this.emit("close"),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some(({name:e})=>e.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const n=this._integrations[e.name];Mr(this,e,this._integrations),n||kn(this,[e])}sendEvent(e,n={}){this.emit("beforeSendEvent",e,n);let r=$i(e,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=Ni(r,Pi(i));const s=this.sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",e,i),null)}sendSession(e){const{release:n,environment:r=Ve}=this._options;if("aggregates"in e){const i=e.attrs||{};if(!i.release&&!n){g&&m.warn(Pn);return}i.release=i.release||n,i.environment=i.environment||r,e.attrs=i}else{if(!e.release&&!n){g&&m.warn(Pn);return}e.release=e.release||n,e.environment=e.environment||r}this.emit("beforeSendSession",e);const s=Fi(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(e,n,r=1){if(this._options.sendClientReports){const s=`${e}:${n}`;g&&m.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}on(e,n){const r=this._hooks[e]=this._hooks[e]||[];return r.push(n),()=>{const s=r.indexOf(n);s>-1&&r.splice(s,1)}}emit(e,...n){const r=this._hooks[e];r&&r.forEach(s=>s(...n))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,n=>(g&&m.error("Error while sending envelope:",n),n)):(g&&m.error("Transport disabled"),ft({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=bo(this,e),kn(this,e)}_updateSessionFromEvent(e,n){let r=n.level==="fatal",s=!1;const i=n.exception?.values;if(i){s=!0;for(const c of i)if(c.mechanism?.handled===!1){r=!0;break}}const o=e.status==="ok";(o&&e.errors===0||o&&r)&&(bt(e,{...r&&{status:"crashed"},errors:e.errors||Number(s||r)}),this.captureSession(e))}_isClientDoneProcessing(e){return new K(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,e&&r>=e&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,n,r,s){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o?.length&&(n.integrations=o),this.emit("preprocessEvent",e,n),e.type||s.setLastEventId(e.event_id||n.event_id),so(i,e,n,r,this,s).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:Js(r),...a.contexts};const c=Nr(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(e,n={},r=w(),s=nt()){return g&&ke(e)&&m.log(`Captured error event \`${Ur(e)[0]||""}\``),this._processEvent(e,n,r,s).then(i=>i.event_id,i=>{g&&(Dn(i)?m.log(i.message):Cn(i)?m.warn(i.message):m.warn(i))})}_processEvent(e,n,r,s){const i=this.getOptions(),{sampleRate:o}=i,a=jr(e),c=ke(e),u=e.type||"error",f=`before send for type \`${u}\``,d=typeof o>"u"?void 0:Pt(o);if(c&&typeof d=="number"&&Math.random()>d)return this.recordDroppedEvent("sample_rate","error"),ne(he(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const l=u==="replay_event"?"replay":u;return this._prepareEvent(e,n,r,s).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",l),he("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return p;const h=No(this,i,p,n);return wo(h,f)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",l),a){const U=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",U)}throw he(`${f} returned \`null\`, will not send event.`)}const E=r.getSession()||s.getSession();if(c&&E&&this._updateSessionFromEvent(E,p),a){const v=p.sdkProcessingMetadata?.spanCountBeforeProcessing||0,U=p.spans?p.spans.length:0,rt=v-U;rt>0&&this.recordDroppedEvent("before_send","span",rt)}const h=p.transaction_info;if(a&&h&&p.transaction!==e.transaction){const v="custom";p.transaction_info={...h,source:v}}return this.sendEvent(p,n),p}).then(null,p=>{throw Dn(p)||Cn(p)?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),Qt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${p}`))})}_process(e){this._numProcessing++,e.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map(([n,r])=>{const[s,i]=n.split(":");return{reason:s,category:i,quantity:r}})}_flushOutcomes(){g&&m.log("Flushing outcomes...");const e=this._clearOutcomes();if(e.length===0){g&&m.log("No outcomes to send");return}if(!this._dsn){g&&m.log("No dsn provided, will not send outcomes");return}g&&m.log("Sending outcomes:",e);const n=Io(e,this._options.tunnel&&Ht(this._dsn));this.sendEnvelope(n)}}function wo(t,e){const n=`${e} must return \`null\` or a valid event.`;if(ue(t))return t.then(r=>{if(!Ot(r)&&r!==null)throw Qt(n);return r},r=>{throw Qt(`${e} rejected with ${r}`)});if(!Ot(t)&&t!==null)throw Qt(n);return t}function No(t,e,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o}=e;let a=n;if(ke(a)&&s)return s(a,r);if(jr(a)){if(o){const c=o(vo(a));if(c?a=Ut(n,Ro(c)):Re(),a.spans){const u=[];for(const f of a.spans){const d=o(f);d?u.push(d):(Re(),u.push(f))}a.spans=u}}if(i){if(a.spans){const c=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return i(a,r)}}return a}function ke(t){return t.type===void 0}function jr(t){return t.type==="transaction"}function Oo(t){return[{type:"otel_log"},t]}function ko(t,e,n,r){const s={};return e?.sdk&&(s.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(s.dsn=Ht(r)),wt(s,t.map(Oo))}const xo=new WeakMap;function _e(t,e){const n=xo.get(t)??[];if(n.length===0)return;const r=t.getOptions(),s=ko(n,r._metadata,r.tunnel,t.getDsn());n.length=0,t.emit("flushLogs"),t.sendEnvelope(s)}function Po(t,e){e.debug===!0&&(g?m.enable():ht(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),w().update(e.initialScope);const r=new t(e);return Co(r),r.init(),r}function Co(t){w().setClient(t)}const Gr=Symbol.for("SentryBufferFullError");function Do(t){const e=[];function n(){return t===void 0||e.lengthr(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new K((a,c)=>{let u=e.length;if(!u)return a(!0);const f=setTimeout(()=>{o&&o>0&&a(!1)},o);e.forEach(d=>{ft(d).then(()=>{--u||(clearTimeout(f),a(!0))},c)})})}return{$:e,add:s,drain:i}}const Lo=60*1e3;function Fo(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${t}`);return isNaN(r)?Lo:r-e}function $o(t,e){return t[e]||t.all||0}function Mo(t,e,n=Date.now()){return $o(t,e)>n}function Uo(t,{statusCode:e,headers:n},r=Date.now()){const s={...t},i=n?.["x-sentry-rate-limits"],o=n?.["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,u,,,f]=a.split(":",5),d=parseInt(c,10),l=(isNaN(d)?60:d)*1e3;if(!u)s.all=r+l;else for(const p of u.split(";"))p==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(s[p]=r+l):s[p]=r+l}else o?s.all=r+Fo(o,r):e===429&&(s.all=r+60*1e3);return s}const Ho=64;function Bo(t,e,n=Do(t.bufferSize||Ho)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(Sn(o,(d,l)=>{const p=En(l);Mo(r,p)?t.recordDroppedEvent("ratelimit_backoff",p):a.push(d)}),a.length===0)return ft({});const c=wt(o[0],a),u=d=>{Sn(c,(l,p)=>{t.recordDroppedEvent(d,En(p))})},f=()=>e({body:Oi(c)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300)&&g&&m.warn(`Sentry responded with status code ${d.statusCode} to sent event.`),r=Uo(r,d),d),d=>{throw u("network_error"),g&&m.error("Encountered error running transport request:",d),d});return n.add(f).then(d=>d,d=>{if(d===Gr)return g&&m.error("Skipped sending event because buffer is full."),u("queue_overflow"),ft({});throw d})}return{send:i,flush:s}}function jo(t){t.user?.ip_address===void 0&&(t.user={...t.user,ip_address:"{{auto}}"})}function Go(t){"aggregates"in t?t.attrs?.ip_address===void 0&&(t.attrs={...t.attrs,ip_address:"{{auto}}"}):t.ipAddress===void 0&&(t.ipAddress="{{auto}}")}function qr(t,e,n=[e],r="npm"){const s=t._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:it})),version:it}),t._metadata=s}function Wr(t={}){const e=I();if(!mo()||!e)return{};const n=gt(),r=At(n);if(r.getTraceData)return r.getTraceData(t);const s=w(),i=t.span||St(),o=i?di(i):qo(s),a=i?tt(i):Nr(e,s),c=ni(a);return yr.test(o)?{"sentry-trace":o,baggage:c}:(m.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function qo(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return Tr(e,r,n)}const Wo=100;function mt(t,e){const n=I(),r=nt();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=Wo}=n.getOptions();if(i<=0)return;const a={timestamp:Ft(),...t},c=s?ht(()=>s(a,e)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,e),r.addBreadcrumb(c,i))}let Ln;const Yo="FunctionToString",Fn=new WeakMap,zo=()=>({name:Yo,setupOnce(){Ln=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=je(this),n=Fn.has(I())&&e!==void 0?e:this;return Ln.apply(n,t)}}catch{}},setup(t){Fn.set(t,!0)}}),Vo=zo,Jo=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],Xo="EventFilters",Ko=(t={})=>{let e;return{name:Xo,setup(n){const r=n.getOptions();e=$n(t,r)},processEvent(n,r,s){if(!e){const i=s.getOptions();e=$n(t,i)}return Qo(n,e)?null:n}}},Zo=(t={})=>({...Ko(t),name:"InboundFilters"});function $n(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Jo],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function Qo(t,e){if(t.type){if(t.type==="transaction"&&ea(t,e.ignoreTransactions))return g&&m.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. Event: ${st(t)}`),!0}else{if(ta(t,e.ignoreErrors))return g&&m.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${st(t)}`),!0;if(ia(t))return g&&m.warn(`Event dropped due to not having an error message, error type or stacktrace. Event: ${st(t)}`),!0;if(na(t,e.denyUrls))return g&&m.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${st(t)}. Url: ${ie(t)}`),!0;if(!ra(t,e.allowUrls))return g&&m.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${st(t)}. Url: ${ie(t)}`),!0}return!1}function ta(t,e){return e?.length?Ur(t).some(n=>at(n,e)):!1}function ea(t,e){if(!e?.length)return!1;const n=t.transaction;return n?at(n,e):!1}function na(t,e){if(!e?.length)return!1;const n=ie(t);return n?at(n,e):!1}function ra(t,e){if(!e?.length)return!0;const n=ie(t);return n?at(n,e):!0}function sa(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function ie(t){try{const n=[...t.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?sa(n):null}catch{return g&&m.error(`Cannot extract url for event ${st(t)}`),null}}function ia(t){return t.exception?.values?.length?!t.message&&!t.exception.values.some(e=>e.stacktrace||e.type&&e.type!=="Error"||e.value):!1}function oa(t,e,n,r,s,i){if(!s.exception?.values||!i||!z(i.originalException,Error))return;const o=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;o&&(s.exception.values=xe(t,e,r,i.originalException,n,s.exception.values,o,0))}function xe(t,e,n,r,s,i,o,a){if(i.length>=n+1)return i;let c=[...i];if(z(r[s],Error)){Mn(o,a);const u=t(e,r[s]),f=c.length;Un(u,s,f,a),c=xe(t,e,n,r[s],s,[u,...c],u,f)}return Array.isArray(r.errors)&&r.errors.forEach((u,f)=>{if(z(u,Error)){Mn(o,a);const d=t(e,u),l=c.length;Un(d,`errors[${f}]`,l,a),c=xe(t,e,n,u,s,[d,...c],d,l)}}),c}function Mn(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,...t.type==="AggregateError"&&{is_exception_group:!0},exception_id:e}}function Un(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function aa(t){const e="console";Dt(e,t),Lt(e,ca)}function ca(){"console"in b&&ye.forEach(function(t){t in b.console&&W(b.console,t,function(e){return te[t]=e,function(...n){ot("console",{args:n,level:t}),te[t]?.apply(b.console,n)}})})}function ua(t){return t==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const da="Dedupe",fa=()=>{let t;return{name:da,processEvent(e){if(e.type)return e;try{if(la(e,t))return g&&m.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}},pa=fa;function la(t,e){return e?!!(ma(t,e)||ga(t,e)):!1}function ma(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!zr(t,e)||!Yr(t,e))}function ga(t,e){const n=Hn(e),r=Hn(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!zr(t,e)||!Yr(t,e))}function Yr(t,e){let n=sn(t),r=sn(e);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s!(Array.isArray(c)&&c[0]==="sentry-trace")).map(c=>{if(Array.isArray(c)&&c[0]==="baggage"&&typeof c[1]=="string"){const[u,f,...d]=c;return[u,zt(f),...d]}else return c}),["sentry-trace",s]];return i&&a.push(["baggage",i]),a}else{const a="baggage"in o?o.baggage:void 0;let c=[];return Array.isArray(a)?c=a.map(u=>typeof u=="string"?zt(u):u).filter(u=>u===""):a&&c.push(zt(a)),i&&c.push(i),{...o,"sentry-trace":s,baggage:c.length>0?c.join(","):void 0}}else return{...r}}function ba(t,e){if(e.response){hr(t,e.response.status);const n=e.response?.headers&&e.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&t.setAttribute("http.response_content_length",r)}}else e.error&&t.setStatus({code:N,message:"internal_error"});t.end()}function zt(t){return t.split(",").filter(e=>!e.split("=")[0].startsWith(Ye)).join(",")}function Ia(t){return typeof Headers<"u"&&z(t,Headers)}function va(t,e,n){const r=_a(t);return{name:r?`${e} ${Sa(r)}`:e,attributes:Ra(t,r,e,n)}}function Ra(t,e,n,r){const s={url:t,type:"fetch","http.method":n,[pt]:r,[xt]:"http.client"};return e&&(Vr(e)||(s["http.url"]=e.href,s["server.address"]=e.host),e.search&&(s["http.query"]=e.search),e.hash&&(s["http.fragment"]=e.hash)),s}function Jr(t){if(t!==void 0)return t>=400&&t<500?"warning":t>=500?"error":void 0}const Ct=b;function fu(){return"history"in Ct&&!!Ct.history}function Xr(){if(!("fetch"in Ct))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Bn(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Aa(){if(typeof EdgeRuntime=="string")return!0;if(!Xr())return!1;if(Bn(Ct.fetch))return!0;let t=!1;const e=Ct.document;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow?.fetch&&(t=Bn(n.contentWindow.fetch)),e.head.removeChild(n)}catch(n){et&&m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return t}function Kr(t,e){const n="fetch";Dt(n,t),Lt(n,()=>Zr(void 0,e))}function wa(t){const e="fetch-body-resolved";Dt(e,t),Lt(e,()=>Zr(Oa))}function Zr(t,e=!1){e&&!Aa()||W(b,"fetch",function(n){return function(...r){const s=new Error,{method:i,url:o}=ka(r),a={args:r,fetchData:{method:i,url:o},startTimestamp:x()*1e3,virtualError:s,headers:xa(r)};return t||ot("fetch",{...a}),n.apply(b,r).then(async c=>(t?t(c):ot("fetch",{...a,endTimestamp:x()*1e3,response:c}),c),c=>{if(ot("fetch",{...a,endTimestamp:x()*1e3,error:c}),Me(c)&&c.stack===void 0&&(c.stack=s.stack,F(c,"framesToPop",1)),c instanceof TypeError&&(c.message==="Failed to fetch"||c.message==="Load failed"||c.message==="NetworkError when attempting to fetch resource."))try{const u=new URL(a.fetchData.url);c.message=`${c.message} (${u.host})`}catch{}throw c})}})}async function Na(t,e){if(t?.body){const n=t.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let i=!0;for(;i;){let o;try{o=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:a}=await r.read();clearTimeout(o),a&&(e(),i=!1)}catch{i=!1}finally{clearTimeout(o)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function Oa(t){let e;try{e=t.clone()}catch{return}Na(e,()=>{ot("fetch-body-resolved",{endTimestamp:x()*1e3,response:t})})}function Pe(t,e){return!!t&&typeof t=="object"&&!!t[e]}function jn(t){return typeof t=="string"?t:t?Pe(t,"url")?t.url:t.toString?t.toString():"":""}function ka(t){if(t.length===0)return{method:"GET",url:""};if(t.length===2){const[n,r]=t;return{url:jn(n),method:Pe(r,"method")?String(r.method).toUpperCase():"GET"}}const e=t[0];return{url:jn(e),method:Pe(e,"method")?String(e.method).toUpperCase():"GET"}}function xa(t){const[e,n]=t;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(ar(e))return new Headers(e.headers)}catch{}}function Pa(){return"npm"}const _=b;let Ce=0;function Qr(){return Ce>0}function Ca(){Ce++,setTimeout(()=>{Ce--})}function vt(t,e={}){function n(s){return typeof s=="function"}if(!n(t))return t;try{const s=t.__sentry_wrapped__;if(s)return typeof s=="function"?s:t;if(je(t))return t}catch{return t}const r=function(...s){try{const i=s.map(o=>vt(o,e));return t.apply(this,i)}catch(i){throw Ca(),Ge(o=>{o.addEventProcessor(a=>(e.mechanism&&(Te(a,void 0),Tt(a,e.mechanism)),a.extra={...a.extra,arguments:s},a)),po(i)}),i}};try{for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}catch{}ur(r,t),F(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function Ke(t,e){const n=Ze(t,e),r={type:Ma(e),value:Ua(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Da(t,e,n,r){const i=I()?.getOptions().normalizeDepth,o=qa(e),a={__serialized__:kr(e,i)};if(o)return{exception:{values:[Ke(t,o)]},extra:a};const c={exception:{values:[{type:ce(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:ja(e,{isUnhandledRejection:r})}]},extra:a};if(n){const u=Ze(t,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function Se(t,e){return{exception:{values:[Ke(t,e)]}}}function Ze(t,e){const n=e.stacktrace||e.stack||"",r=Fa(e),s=$a(e);try{return t(n,r,s)}catch{}return[]}const La=/Minified React error #\d+;/i;function Fa(t){return t&&La.test(t.message)?1:0}function $a(t){return typeof t.framesToPop=="number"?t.framesToPop:0}function ts(t){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?t instanceof WebAssembly.Exception:!1}function Ma(t){const e=t?.name;return!e&&ts(t)?t.message&&Array.isArray(t.message)&&t.message.length==2?t.message[0]:"WebAssembly.Exception":e}function Ua(t){const e=t?.message;return ts(t)?Array.isArray(t.message)&&t.message.length==2?t.message[1]:"wasm exception":e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Ha(t,e,n,r){const s=n?.syntheticException||void 0,i=Qe(t,e,s,r);return Tt(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),ft(i)}function Ba(t,e,n="info",r,s){const i=r?.syntheticException||void 0,o=De(t,e,i,s);return o.level=n,r?.event_id&&(o.event_id=r.event_id),ft(o)}function Qe(t,e,n,r,s){let i;if(ir(e)&&e.error)return Se(t,e.error);if(an(e)||ws(e)){const o=e;if("stack"in e)i=Se(t,e);else{const a=o.name||(an(o)?"DOMError":"DOMException"),c=o.message?`${a}: ${o.message}`:a;i=De(t,c,n,r),Te(i,c)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Me(e)?Se(t,e):Ot(e)||ce(e)?(i=Da(t,e,n,s),Tt(i,{synthetic:!0}),i):(i=De(t,e,n,r),Te(i,`${e}`),Tt(i,{synthetic:!0}),i)}function De(t,e,n,r){const s={};if(r&&n){const i=Ze(t,n);i.length&&(s.exception={values:[{value:e,stacktrace:{frames:i}}]}),Tt(s,{synthetic:!0})}if(Ue(e)){const{__sentry_template_string__:i,__sentry_template_values__:o}=e;return s.logentry={message:i,params:o},s}return s.message=e,s}function ja(t,{isUnhandledRejection:e}){const n=Ls(t),r=e?"promise rejection":"exception";return ir(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:ce(t)?`Event \`${Ga(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Ga(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}function qa(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];if(n instanceof Error)return n}}const Wa=5e3;class Ya extends Ao{constructor(e){const n={parentSpanIsAlwaysRootSpan:!0,...e},r=_.SENTRY_SDK_SOURCE||Pa();qr(n,"browser",["browser"],r),super(n);const s=this,{sendDefaultPii:i,_experiments:o}=s._options,a=o?.enableLogs;n.sendClientReports&&_.document&&_.document.addEventListener("visibilitychange",()=>{_.document.visibilityState==="hidden"&&(this._flushOutcomes(),a&&_e(s))}),a&&(s.on("flush",()=>{_e(s)}),s.on("afterCaptureLog",()=>{s._logFlushIdleTimeout&&clearTimeout(s._logFlushIdleTimeout),s._logFlushIdleTimeout=setTimeout(()=>{_e(s)},Wa)})),i&&(s.on("postprocessEvent",jo),s.on("beforeSendSession",Go))}eventFromException(e,n){return Ha(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Ba(this._options.stackParser,e,n,r,this._options.attachStacktrace)}_prepareEvent(e,n,r,s){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r,s)}}function za(t,e=as("fetch")){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};if(!e)return en("fetch"),ne("No fetch implementation available");try{return e(t.url,a).then(c=>(n-=o,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 en("fetch"),n-=o,r--,ne(c)}}return Bo(t,s)}const Va=30,Ja=50;function Le(t,e,n,r){const s={filename:t,function:e===""?dt:e,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Xa=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Ka=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Za=/\((\S*)(?::(\d+))(?::(\d+))\)/,Qa=t=>{const e=Xa.exec(t);if(e){const[,r,s,i]=e;return Le(r,dt,+s,+i)}const n=Ka.exec(t);if(n){if(n[2]&&n[2].indexOf("eval")===0){const o=Za.exec(n[2]);o&&(n[2]=o[1],n[3]=o[2],n[4]=o[3])}const[s,i]=es(n[1]||dt,n[2]);return Le(i,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},tc=[Va,Qa],ec=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,nc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,rc=t=>{const e=ec.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const i=nc.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],s=e[1]||dt;return[s,r]=es(s,r),Le(r,s,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},sc=[Ja,rc],ic=[tc,sc],oc=tr(...ic),es=(t,e)=>{const n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:dt,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},C=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Vt=1024,ac="Breadcrumbs",cc=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:ac,setup(n){e.console&&aa(pc(n)),e.dom&&cs(fc(n,e.dom)),e.xhr&&Kn(lc(n)),e.fetch&&Kr(mc(n)),e.history&&Fe(gc(n)),e.sentry&&n.on("beforeSendEvent",dc(n))}}},uc=cc;function dc(t){return function(n){I()===t&&mt({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:st(n)},{event:n})}}function fc(t,e){return function(r){if(I()!==t)return;let s,i,o=typeof e=="object"?e.serializeAttribute:void 0,a=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;a&&a>Vt&&(C&&m.warn(`\`dom.maxStringLength\` cannot exceed ${Vt}, but a value of ${a} was configured. Sentry will use ${Vt} instead.`),a=Vt),typeof o=="string"&&(o=[o]);try{const u=r.event,f=hc(u)?u.target:u;s=cr(f,{keyAttrs:o,maxStringLength:a}),i=Cs(f)}catch{s=""}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};i&&(c.data={"ui.component_name":i}),mt(c,{event:r.event,name:r.name,global:r.global})}}function pc(t){return function(n){if(I()!==t)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:ua(n.level),message:cn(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${cn(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;mt(r,{input:n.args,level:n.level})}}function lc(t){return function(n){if(I()!==t)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[Zn];if(!r||!s||!i)return;const{method:o,url:a,status_code:c,body:u}=i,f={method:o,url:a,status_code:c},d={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},l={category:"xhr",data:f,type:"http",level:Jr(c)};t.emit("beforeOutgoingRequestBreadcrumb",l,d),mt(l,d)}}function mc(t){return function(n){if(I()!==t)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.fetchData.method,n.fetchData.url,n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:i,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",a,o),mt(a,o)}else{const i=n.response,o={...n.fetchData,status_code:i?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,i?.status;const a={input:n.args,response:i,startTimestamp:r,endTimestamp:s},c={category:"fetch",data:o,type:"http",level:Jr(o.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",c,a),mt(c,a)}}}function gc(t){return function(n){if(I()!==t)return;let r=n.from,s=n.to;const i=yt(_.location.href);let o=r?yt(r):void 0;const a=yt(s);o?.path||(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),mt({category:"navigation",data:{from:r,to:s}})}}function hc(t){return!!t&&!!t.target}const _c=["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"],Sc="BrowserApiErrors",Ec=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:Sc,setupOnce(){e.setTimeout&&W(_,"setTimeout",Gn),e.setInterval&&W(_,"setInterval",Gn),e.requestAnimationFrame&&W(_,"requestAnimationFrame",Tc),e.XMLHttpRequest&&"XMLHttpRequest"in _&&W(XMLHttpRequest.prototype,"send",bc);const n=e.eventTarget;n&&(Array.isArray(n)?n:_c).forEach(Ic)}}},yc=Ec;function Gn(t){return function(...e){const n=e[0];return e[0]=vt(n,{mechanism:{data:{function:X(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Tc(t){return function(e){return t.apply(this,[vt(e,{mechanism:{data:{function:"requestAnimationFrame",handler:X(t)},handled:!1,type:"instrument"}})])}}function bc(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&W(n,s,function(i){const o={mechanism:{data:{function:s,handler:X(i)},handled:!1,type:"instrument"}},a=je(i);return a&&(o.mechanism.data.handler=X(a)),vt(i,o)})}),t.apply(this,e)}}function Ic(t){const n=_[t]?.prototype;n?.hasOwnProperty?.("addEventListener")&&(W(n,"addEventListener",function(r){return function(s,i,o){try{vc(i)&&(i.handleEvent=vt(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:X(i),target:t},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,vt(i,{mechanism:{data:{function:"addEventListener",handler:X(i),target:t},handled:!1,type:"instrument"}}),o])}}),W(n,"removeEventListener",function(r){return function(s,i,o){try{const a=i.__sentry_wrapped__;a&&r.call(this,s,a,o)}catch{}return r.call(this,s,i,o)}}))}function vc(t){return typeof t.handleEvent=="function"}const Rc=()=>({name:"BrowserSession",setupOnce(){if(typeof _.document>"u"){C&&m.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}wn({ignoreDuration:!0}),Nn(),Fe(({from:t,to:e})=>{t!==void 0&&t!==e&&(wn({ignoreDuration:!0}),Nn())})}}),Ac="GlobalHandlers",wc=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:Ac,setupOnce(){Error.stackTraceLimit=50},setup(n){e.onerror&&(Oc(n),qn("onerror")),e.onunhandledrejection&&(kc(n),qn("onunhandledrejection"))}}},Nc=wc;function Oc(t){er(e=>{const{stackParser:n,attachStacktrace:r}=ns();if(I()!==t||Qr())return;const{msg:s,url:i,line:o,column:a,error:c}=e,u=Cc(Qe(n,c||s,void 0,r,!1),i,o,a);u.level="error",Lr(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function kc(t){nr(e=>{const{stackParser:n,attachStacktrace:r}=ns();if(I()!==t||Qr())return;const s=xc(e),i=He(s)?Pc(s):Qe(n,s,void 0,r,!0);i.level="error",Lr(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function xc(t){if(He(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}function Pc(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function Cc(t,e,n,r){const s=t.exception=t.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},c=a.frames=a.frames||[],u=r,f=n,d=Nt(e)&&e.length>0?e:$t();return c.length===0&&c.push({colno:u,filename:d,function:dt,in_app:!0,lineno:f}),t}function qn(t){C&&m.log(`Global Handler attached: ${t}`)}function ns(){return I()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const Dc=()=>({name:"HttpContext",preprocessEvent(t){if(!_.navigator&&!_.location&&!_.document)return;const e=t.request?.url||$t(),{referrer:n}=_.document||{},{userAgent:r}=_.navigator||{},s={...t.request?.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...t.request,...e&&{url:e},headers:s};t.request=i}}),Lc="cause",Fc=5,$c="LinkedErrors",Mc=(t={})=>{const e=t.limit||Fc,n=t.key||Lc;return{name:$c,preprocessEvent(r,s,i){const o=i.getOptions();oa(Ke,o.stackParser,n,e,r,s)}}},Uc=Mc;function Hc(t){return[Zo(),Vo(),yc(),uc(),Nc(),Uc(),pa(),Dc(),Rc()]}function Bc(t={}){return{...{defaultIntegrations:Hc(),release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:_.SENTRY_RELEASE?.id,sendClientReports:!0},...jc(t)}}function jc(t){const e={};for(const n of Object.getOwnPropertyNames(t)){const r=n;t[r]!==void 0&&(e[r]=t[r])}return e}function Gc(){const t=typeof _.window<"u"&&_;if(!t)return!1;const e=t.chrome?"chrome":"browser",r=t[e]?.runtime?.id,s=$t()||"",i=["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"],o=!!r&&_===_.top&&i.some(c=>s.startsWith(`${c}//`)),a=typeof t.nw<"u";return!!r&&!o&&!a}function qc(t={}){const e=Bc(t);if(!e.skipBrowserExtensionCheck&&Gc()){C&&ht(()=>{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}C&&!Xr()&&m.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={...e,stackParser:Ts(e.stackParser||oc),integrations:To(e),transport:e.transport||za};return Po(Ya,n)}const Wn=new WeakMap,Ee=new Map,rs={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Wc(t,e){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o,tracePropagationTargets:a,onRequestSpanStart:c}={...rs,...e},u=typeof i=="function"?i:l=>!0,f=l=>Vc(l,a),d={};n&&(t.addEventProcessor(l=>(l.type==="transaction"&&l.spans&&l.spans.forEach(p=>{if(p.op==="http.client"){const E=Ee.get(p.span_id);E&&(p.timestamp=E/1e3,Ee.delete(p.span_id))}}),l)),s&&wa(l=>{if(l.response){const p=Wn.get(l.response);p&&l.endTimestamp&&Ee.set(p,l.endTimestamp)}}),Kr(l=>{const p=ya(l,u,f,d);if(l.response&&l.fetchData.__span&&Wn.set(l.response,l.fetchData.__span),p){const E=ss(l.fetchData.url),h=E?yt(E).host:void 0;p.setAttributes({"http.url":E,"server.address":h}),o&&Yn(p),c?.(p,{headers:l.headers})}})),r&&Kn(l=>{const p=Jc(l,u,f,d);if(p){o&&Yn(p);let E;try{E=new Headers(l.xhr.__sentry_xhr_v3__?.request_headers)}catch{}c?.(p,{headers:E})}})}function Yc(t){return t.entryType==="resource"&&"initiatorType"in t&&typeof t.nextHopProtocol=="string"&&(t.initiatorType==="fetch"||t.initiatorType==="xmlhttprequest")}function Yn(t){const{url:e}=R(t).data;if(!e||typeof e!="string")return;const n=us("resource",({entries:r})=>{r.forEach(s=>{Yc(s)&&s.name.endsWith(e)&&(zc(s).forEach(o=>t.setAttribute(...o)),setTimeout(n))})})}function M(t=0){return(($e()||performance.timeOrigin)+t)/1e3}function zc(t){const{name:e,version:n}=ds(t.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",e]),$e()?[...r,["http.request.redirect_start",M(t.redirectStart)],["http.request.fetch_start",M(t.fetchStart)],["http.request.domain_lookup_start",M(t.domainLookupStart)],["http.request.domain_lookup_end",M(t.domainLookupEnd)],["http.request.connect_start",M(t.connectStart)],["http.request.secure_connection_start",M(t.secureConnectionStart)],["http.request.connection_end",M(t.connectEnd)],["http.request.request_start",M(t.requestStart)],["http.request.response_start",M(t.responseStart)],["http.request.response_end",M(t.responseEnd)]]:r}function Vc(t,e){const n=$t();if(n){let r,s;try{r=new URL(t,n),s=new URL(n).origin}catch{return!1}const i=r.origin===s;return e?at(r.toString(),e)||i&&at(r.pathname,e):i}else{const r=!!t.match(/^\/(?!\/)/);return e?at(t,e):r}}function Jc(t,e,n,r){const s=t.xhr,i=s?.[Zn];if(!s||s.__sentry_own_request__||!i)return;const{url:o,method:a}=i,c=Q()&&e(o);if(t.endTimestamp&&c){const h=s.__sentry_xhr_span_id__;if(!h)return;const v=r[h];v&&i.status_code!==void 0&&(hr(v,i.status_code),v.end(),delete r[h]);return}const u=ss(o),f=yt(u||o),d=Ea(o),l=!!St(),p=c&&l?Xe({name:`${a} ${d}`,attributes:{url:o,type:"xhr","http.method":a,"http.url":u,"server.address":f?.host,[pt]:"auto.http.browser",[xt]:"http.client",...f?.search&&{"http.query":f?.search},...f?.hash&&{"http.fragment":f?.hash}}}):new lt;s.__sentry_xhr_span_id__=p.spanContext().spanId,r[s.__sentry_xhr_span_id__]=p,n(o)&&Xc(s,Q()&&l?p:void 0);const E=I();return E&&E.emit("beforeOutgoingRequestSpan",p,t),p}function Xc(t,e){const{"sentry-trace":n,baggage:r}=Wr({span:e});n&&Kc(t,n,r)}function Kc(t,e,n){try{t.setRequestHeader("sentry-trace",e),n&&t.setRequestHeader("baggage",n)}catch{}}function ss(t){try{return new URL(t,_.location.origin).href}catch{return}}function Zc(){_.document?_.document.addEventListener("visibilitychange",()=>{const t=St();if(!t)return;const e=P(t);if(_.document.hidden&&e){const n="cancelled",{op:r,status:s}=R(e);C&&m.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||e.setStatus({code:N,message:n}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}}):C&&m.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Qc=3600,is="sentry_previous_trace",tu="sentry.previous_trace";function zn(t,e){const n=R(e);if(!t)return{spanContext:e.spanContext(),startTimestamp:n.start_timestamp};const r=t.spanContext;return r.traceId===n.trace_id?t:(Date.now()/1e3-t.startTimestamp<=Qc&&(C&&m.info(`Adding previous_trace ${r} link to span ${{op:n.op,...e.spanContext()}}`),e.addLink({context:r,attributes:{[Xs]:"previous_trace"}}),e.setAttribute(tu,`${r.traceId}-${r.spanId}-${r.traceFlags===1?1:0}`)),{spanContext:e.spanContext(),startTimestamp:R(e).start_timestamp})}function eu(t){try{_.sessionStorage.setItem(is,JSON.stringify(t))}catch(e){C&&m.warn("Could not store previous trace in sessionStorage",e)}}function nu(){try{const t=_.sessionStorage?.getItem(is);return JSON.parse(t)}catch{return}}const ru="BrowserTracing",su={...Zt,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,linkPreviousTrace:"in-memory",_experiments:{},...rs};let Vn=!1;const pu=(t={})=>{Vn&&ht(()=>{console.warn("Multiple browserTracingIntegration instances are not supported.")}),Vn=!0;const e=_.document;mi();const{enableInp:n,enableLongTask:r,enableLongAnimationFrame:s,_experiments:{enableInteractions:i,enableStandaloneClsSpans:o},beforeStartSpan:a,idleTimeout:c,finalTimeout:u,childSpanTimeout:f,markBackgroundSpan:d,traceFetch:l,traceXHR:p,trackFetchStreamPerformance:E,shouldCreateSpanForRequest:h,enableHTTPTimings:v,instrumentPageLoad:U,instrumentNavigation:rt,linkPreviousTrace:Bt,onRequestSpanStart:fe}={...su,...t},jt=fs({recordClsStandaloneSpans:o||!1});n&&ps(),s&&b.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?ls():r&&ms(),i&&gs();const S={name:void 0,source:void 0};function O(A,D){const $=D.op==="pageload",T=a?a(D):D,y=T.attributes||{};D.name!==T.name&&(y[Y]="custom",T.attributes=y),S.name=T.name,S.source=y[Y];const k=Dr(T,{idleTimeout:c,finalTimeout:u,childSpanTimeout:f,disableAutoFinish:$,beforeSpanEnd:B=>{jt(),_s(B,{recordClsOnPageloadSpan:!o}),Xn(A,void 0);const j=w(),Et=j.getPropagationContext();j.setPropagationContext({...Et,traceId:k.spanContext().traceId,sampled:_t(k),dsc:tt(B)})}});Xn(A,k);function H(){e&&["interactive","complete"].includes(e.readyState)&&A.emit("idleSpanEnableAutoFinish",k)}$&&e&&(e.addEventListener("readystatechange",()=>{H()}),H())}return{name:ru,afterAllSetup(A){let D=$t();function $(){const T=de(A);T&&!R(T).timestamp&&(C&&m.log(`[Tracing] Finishing current active span with op: ${R(T).op}`),T.end())}if(A.on("startNavigationSpan",T=>{I()===A&&($(),nt().setPropagationContext({traceId:Z(),sampleRand:Math.random()}),w().setPropagationContext({traceId:Z(),sampleRand:Math.random()}),O(A,{op:"navigation",...T}))}),A.on("startPageLoadSpan",(T,y={})=>{if(I()!==A)return;$();const k=y.sentryTrace||Jn("sentry-trace"),H=y.baggage||Jn("baggage"),B=oi(k,H);w().setPropagationContext(B),O(A,{op:"pageload",...T})}),Bt!=="off"){let T;A.on("spanStart",y=>{if(P(y)===y)if(Bt==="session-storage"){const k=zn(nu(),y);eu(k)}else T=zn(T,y)})}if(_.location){if(U){const T=$e();iu(A,{name:_.location.pathname,startTime:T?T/1e3:void 0,attributes:{[Y]:"url",[pt]:"auto.pageload.browser"}})}rt&&Fe(({to:T,from:y})=>{if(y===void 0&&D?.indexOf(T)!==-1){D=void 0;return}y!==T&&(D=void 0,ou(A,{name:_.location.pathname,attributes:{[Y]:"url",[pt]:"auto.navigation.browser"}}))})}d&&Zc(),i&&au(A,c,u,f,S),n&&hs(),Wc(A,{traceFetch:l,traceXHR:p,trackFetchStreamPerformance:E,tracePropagationTargets:A.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:h,enableHTTPTimings:v,onRequestSpanStart:fe})}}};function iu(t,e,n){return t.emit("startPageLoadSpan",e,n),w().setTransactionName(e.name),de(t)}function ou(t,e){return t.emit("startNavigationSpan",e),w().setTransactionName(e.name),de(t)}function Jn(t){return _.document?.querySelector(`meta[name=${t}]`)?.getAttribute("content")||void 0}function au(t,e,n,r,s){const i=_.document;let o;const a=()=>{const c="ui.action.click",u=de(t);if(u){const f=R(u).op;if(["navigation","pageload"].includes(f)){C&&m.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(Ie,"interactionInterrupted"),o.end(),o=void 0),!s.name){C&&m.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}o=Dr({name:s.name,op:c,attributes:{[Y]:s.source||"url"}},{idleTimeout:e,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",a,{once:!1,capture:!0})}const os="_sentry_idleSpan";function de(t){return t[os]}function Xn(t,e){F(t,os,e)}function lu(t){const e={...t};return qr(e,"react"),lo("react",{version:Ss.version}),qc(e)}export{x as A,Nt as B,lu as C,pu as D,b as G,mr as S,I as a,w as b,Xe as c,St as d,P as e,$e as f,X as g,lr as h,cr as i,We as j,xt as k,m as l,pt as m,du as n,Cs as o,yt as p,Dt as q,Lt as r,R as s,ot as t,W as u,F as v,Bi as w,L as x,fu as y,Bn as z};