1import{M as h,E as m,N as Q,G as x,O as B,Q as U,S as _e,R as st,T as dr,U as lr,V as vs,W as Is,q as He,X as ue,Y as v,Z as qt,_ as gt,$ as $e,a0 as Ue,a1 as M,a2 as ee,a3 as k,a4 as Rs,a5 as Ce,a6 as V,a7 as ws,a8 as Te,a9 as nn,aa as ks,H as R,ab as Sn,F as w,ac as Je,ad as En,ae as As,af as fr,ag as de,ah as rn,z as sn,ai as _t,aj as pr,ak as mr,al as Ns,am as Ke,an as St,ao as hr,ap as Cs,aq as gr,ar as at,as as Ps,at as Et,p as Ls,au as Ze,av as Tn,aw as xe,ax as yn,ay as le,az as Os,aA as _r,aB as xs,aC as Fs,aD as Sr,aE as it,aF as Er,aG as Ms,aH as Wt,aI as Ds,aJ as an,aK as bn,aL as Hs,aM as $s,aN as Us,aO as Bs,aP as qs,w as Tr,aQ as oe,aR as Z,aS as ot,aT as Ws,aU as $,aV as vn,aW as In,aX as yr,aY as br,aZ as js,J as vr,y as ct,a_ as Ir,a$ as Rn,b0 as Gs,B as wn,b1 as on,C as ut,b2 as Vs,b3 as zs,b4 as D,b5 as z,b6 as Rr,b7 as Pe,b8 as Ys,b9 as Se,ba as kn,bb as An,bc as Nn,bd as wr,v as Tt,be as Xs,bf as Js,bg as Ks,bh as Zs,bi as Qs,bj as ea,m as Xu}from"./AuthProvider-Dxr9XcHq.js";import{r as ta}from"./chunk-KS7C4IRE-CDheynbW.js";import{g as na,W as T,D as W,w as Fe,s as kr,a as cn}from"./errorboundary-BbDZCRF2.js";import{E as rd}from"./errorboundary-BbDZCRF2.js";import{i as ad,a as id}from"./translation-safety-csNT0Zy6.js";import"./jsx-runtime-u17CrQMm.js";import"./browser-Dk4ssQwl.js";const Qe={},Cn={};function ne(e,t){Qe[e]=Qe[e]||[],Qe[e].push(t)}function re(e,t){if(!Cn[e]){Cn[e]=!0;try{t()}catch(n){h&&m.error(`Error while instrumenting ${e}`,n)}}}function q(e,t){const n=e&&Qe[e];if(n)for(const r of n)try{r(t)}catch(s){h&&m.error(`Error while triggering instrumentation handler. 2Type: ${e} 3Name: ${Q(r)} 4Error:`,s)}}let Nt=null;function Ar(e){const t="error";ne(t,e),re(t,ra)}function ra(){Nt=x.onerror,x.onerror=function(e,t,n,r,s){return q("error",{column:r,error:s,line:n,msg:e,url:t}),Nt?Nt.apply(this,arguments):!1},x.onerror.__SENTRY_INSTRUMENTED__=!0}let Ct=null;function Nr(e){const t="unhandledrejection";ne(t,e),re(t,sa)}function sa(){Ct=x.onunhandledrejection,x.onunhandledrejection=function(e){return q("unhandledrejection",e),Ct?Ct.apply(this,arguments):!0},x.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}let Pn=!1;function aa(){if(Pn)return;function e(){const t=B(),n=t&&U(t);if(n){const r="internal_error";h&&m.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:_e,message:r})}}e.tag="sentry_tracingErrorCallback",Pn=!0,Ar(e),Nr(e)}class te{constructor(t={}){this._traceId=t.traceId||st(),this._spanId=t.spanId||dr()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:lr}}end(t){}setAttribute(t,n){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,n,r){return this}addLink(t){return this}addLinks(t){return this}recordException(t,n){}}function ye(e,t=[]){return[e,t]}function ia(e,t){const[n,r]=e;return[n,[...r,t]]}function Ln(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 jt(e){const t=Is(x);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function oa(e){const[t,n]=e;let r=JSON.stringify(t);function s(a){typeof r=="string"?r=typeof a=="string"?r+a:[jt(r),a]:r.push(typeof a=="string"?jt(a):a)}for(const a of n){const[i,o]=a;if(s(` 5${JSON.stringify(i)} 6`),typeof o=="string"||o instanceof Uint8Array)s(o);else{let c;try{c=JSON.stringify(o)}catch{c=JSON.stringify(vs(o))}s(c)}}return typeof r=="string"?r:ca(r)}function ca(e){const t=e.reduce((s,a)=>s+a.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function ua(e){return[{type:"span"},e]}function da(e){const t=typeof e.data=="string"?jt(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const la={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",log:"log_item"};function On(e){return la[e]}function Cr(e){if(!e?.sdk)return;
6const{name:t,version:n}=e.sdk;return{name:t,version:n}}function fa(e,t,n,r){const s=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:He(r)},...s&&{trace:s}}}function pa(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function ma(e,t,n,r){const s=Cr(n),a={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:He(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return ye(a,[i])}function ha(e,t,n,r){const s=Cr(n),a=e.type&&e.type!=="replay_event"?e.type:"event";pa(e,n?.sdk);const i=fa(e,s,r,t);return delete e.sdkProcessingMetadata,ye(i,[[{type:a},e]])}function ga(e,t){function n(d){return!!d.trace_id&&!!d.public_key}const r=ue(e[0]),s=t?.getDsn(),a=t?.getOptions().tunnel,i={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!a&&s&&{dsn:He(s)}},o=t?.getOptions().beforeSendSpan,c=o?d=>{const l=v(d),f=o(l);return f||(qt(),l)}:v,u=[];for(const d of e){const l=c(d);l&&u.push(ua(l))}return ye(i,u)}function _a(e){if(!h)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=v(e),{spanId:s}=e.spanContext(),a=gt(e),i=U(e),o=i===e,c=`[Tracing] Starting ${a?"sampled":"unsampled"} ${o?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!o){const{op:d,description:l}=v(i);u.push(`root ID: ${i.spanContext().spanId}`),d&&u.push(`root op: ${d}`),l&&u.push(`root description: ${l}`)}m.log(`${c} 7 ${u.join(` 8 `)}`)}function Sa(e){if(!h)return;const{description:t="< unknown name >",op:n="< unknown op >"}=v(e),{spanId:r}=e.spanContext(),a=U(e)===e,i=`[Tracing] Finishing "${n}" ${a?"root ":""}span "${t}" with ID ${r}`;m.log(i)}function Ea(e,t,n,r=B()){const s=r&&U(r);s&&(h&&m.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[Ue]:t,[$e]:n}))}function xn(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[$e],a=r[Ue];typeof s=="string"&&typeof a=="number"&&(t[n.name]={value:a,unit:s})}),t}const Fn=1e3;class yt{constructor(t={}){this._traceId=t.traceId||st(),this._spanId=t.spanId||dr(),this._startTime=t.startTimestamp||M(),this._links=t.links,this._attributes={},this.setAttributes({[k]:"manual",[ee]: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._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,n){}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Rs:lr}}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=Ce(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(V,"custom"),this}end(t){this._endTime||(this._endTime=Ce(t),Sa(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[ee],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:ks(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[k],profile_id:this._attributes[nn],exclusive_time:this._attributes[Te],measurements:xn(this._events),is_segment:this._isStandaloneSpan&&U(this)===this||void 0,segment_id:this._isStandaloneSpan?U(this).spanContext().spanId:void 0,links:ws(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){h&&m.log("[Tracing] Adding an event to span:",t);const s=Mn(n)?n:r||M(),a=Mn(n)?{}:n||{},i={name:t,time:Ce(s),attributes:a};return this._events.push(i),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=R();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===U(this)))return;if(this._isStandaloneSpan){this._sampled?ya(ga([this],t)):(h&&m.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&&(Sn(this).scope||w()).captureEvent(r)}_convertSpanToTransaction(){if(!Dn(v(this)))return;this._name||(h&&m.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:t,isolationScope:n}=Sn(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const a=Je(this).filter(d=>d!==this&&!Ta(d)).map(d=>v(d)).filter(Dn),i=this._attributes[V];delete this._attributes[En],a.forEach(d=>{delete d.data[En]});const o={contexts:{trace:As(this)},spans:a.length>Fn?a.sort((d,l)=>d.start_timestamp-l.start_timestamp).slice(0,Fn):a,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:ue(this)},request:r,...i&&{transaction_info:{source:i}}},c=xn(this._events);return c&&Object.keys(c).length&&(h&&m.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),o.measurements=c),o}}function Mn(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Dn(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}
8function Ta(e){return e instanceof yt&&e.isStandaloneSpan()}function ya(e){const t=R();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function ba(e,t,n=()=>{}){let r;try{r=e()}catch(s){throw t(s),n(),s}return va(r,t,n)}function va(e,t,n){return fr(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}function Ia(e,t,n){if(!de(e))return[!1];let r,s;typeof e.tracesSampler=="function"?(s=e.tracesSampler({...t,inheritOrSampleWith:o=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):o}),r=!0):t.parentSampled!==void 0?s=t.parentSampled:typeof e.tracesSampleRate<"u"&&(s=e.tracesSampleRate,r=!0);const a=rn(s);if(a===void 0)return h&&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(!a)return h&&m.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),[!1,a,r];const i=n<a;return i||h&&m.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[i,a,r]}const Pr="__SENTRY_SUPPRESS_TRACING__";function Ra(e,t){const n=dn();if(n.startSpan)return n.startSpan(e,t);const r=Or(e),{forceTransaction:s,parentSpan:a,scope:i}=e,o=i?.clone();return sn(o,()=>ka(a)(()=>{const u=w(),d=xr(u,a),f=e.onlyIfParent&&!d?new te:Lr({parentSpan:d,spanArguments:r,forceTransaction:s,scope:u});return _t(u,f),ba(()=>t(f),()=>{const{status:p}=v(f);f.isRecording()&&(!p||p==="ok")&&f.setStatus({code:_e,message:"internal_error"})},()=>{f.end()})}))}function be(e){const t=dn();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=Or(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?i=>sn(e.scope,i):s!==void 0?i=>un(s,i):i=>i())(()=>{const i=w(),o=xr(i,s);return e.onlyIfParent&&!o?new te:Lr({parentSpan:o,spanArguments:n,forceTransaction:r,scope:i})})}function un(e,t){const n=dn();return n.withActiveSpan?n.withActiveSpan(e,t):sn(r=>(_t(r,e||void 0),t(r)))}function Lr({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!de()){const i=new te;if(n||!e){const o={sampled:"false",sample_rate:"0",transaction:t.name,...ue(i)};Ke(i,o)}return i}const s=St();let a;if(e&&!n)a=wa(e,r,t),hr(e,a);else if(e){const i=ue(e),{traceId:o,spanId:c}=e.spanContext(),u=gt(e);a=Hn({traceId:o,parentSpanId:c,...t},r,u),Ke(a,i)}else{const{traceId:i,dsc:o,parentSpanId:c,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};a=Hn({traceId:i,parentSpanId:c,...t},r,u),o&&Ke(a,o)}return _a(a),Cs(a,r,s),a}function Or(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=Ce(e.startTime),delete r.startTime,r}return n}function dn(){const e=pr();return mr(e)}function Hn(e,t,n){const r=R(),s=r?.getOptions()||{},{name:a=""}=e,i={spanAttributes:{...e.attributes},spanName:a,parentSampled:n};r?.emit("beforeSampling",i,{decision:!1});const o=i.parentSampled??n,c=i.spanAttributes,u=t.getPropagationContext(),[d,l,f]=t.getScopeData().sdkProcessingMetadata[Pr]?[!1]:Ia(s,{name:a,parentSampled:o,attributes:c,parentSampleRate:rn(u.dsc?.sample_rate)},u.sampleRand),p=new yt({...e,attributes:{[V]:"custom",[gr]:l!==void 0&&f?l:void 0,...c},sampled:d});return!d&&r&&(h&&m.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",p),p}function wa(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),a=t.getScopeData().sdkProcessingMetadata[Pr]?!1:gt(e),i=a?new yt({...n,parentSpanId:r,traceId:s,sampled:a}):new te({traceId:s});hr(e,i);const o=R();return o&&(o.emit("spanStart",i),n.endTimestamp&&o.emit("spanEnd",i)),i}function xr(e,t){if(t)return t;if(t===null)return;const n=Ns(e);if(!n)return;const r=R();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?U(n):n}function ka(e){return e!==void 0?t=>un(e,t):t=>t()}const et={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Aa="heartbeatFailed",Na="idleTimeout",Ca="finalTimeout",Pa="externalFinish";function Fr(e,t={}){const n=new Map;let r=!1,s,a=Pa,i=!t.disableAutoFinish;const o=[],{idleTimeout:c=et.idleTimeout,finalTimeout:u=et.finalTimeout,childSpanTimeout:d=et.childSpanTimeout,beforeSpanEnd:l}=t,f=R();if(!f||!de()){const E=new te,L={sample_rate:"0",sampled:"false",...ue(E)};return Ke(E,L),E}const p=w(),S=B(),_=La(e);_.end=new Proxy(_.end,{apply(E,L,me){if(l&&l(_),L instanceof te)return;const[ke,...he]=me,ae=ke||M(),A=Ce(ae),ie=Je(_).filter(C=>C!==_);if(!ie.length)return je(A),Reflect.apply(E,L,[A,...he]);const X=ie.map(C=>v(C).timestamp).filter(C=>!!C),b=X.length?Math.max(...X):void 0,N=v(_).start_timestamp,y=Math.min(N?N+u/1e3:1/0,Math.max(N||-1/0,Math.min(A,b||1/0)));return je(y),Reflect.apply(E,L,[y,...he])}});function H(){s&&(clearTimeout(s),s=void 0)}function G(E){H(),s=setTimeout(()=>{!r&&n.size===0&&i&&(a=Na,_.end(E))},c)}function se(E){s=setTimeout(()=>{!r&&i&&(a=Aa,_.end(E))},d)}function kt(E){H(),n.set(E,!0);const L=M();se(L+d/1e3)}function At(E){if(n.has(E)&&n.delete(E),n.size===0){const L=M();G(L+c/1e3)}}function je(E){r=!0,n.clear(),o.forEach(A=>A()),_t(p,S);const L=v(_),{start_timestamp:me}=L;if(!me)return;L.data[at]||_.setAttribute(at,a),m.log(`[Tracing] Idle span "${L.op}" finished`);const he=Je(_).filter(A=>A!==_);let ae=0;he.forEach(A=>{A.isRecording()&&(A.setStatus({code:_e,message:"cancelled"}),A.end(E),h&&m.log("[Tracing] Cancelling span since span ended early",JSON.stringify(A,void 0,2)));const ie=v(A),{timestamp:X=0,start_timestamp:b=0}=ie,N=b<=E,y=(u+c)/1e3,C=X-b<=y;if(h){const O=JSON.stringify(A,void 0,2);N?C||m.log("[Tracing] Discarding span since it finished after idle span final timeout",O):m.log("[Tracing] Discarding span since it happened after idle span was finished",O)}(!C||!N)&&(Ps(_,A),ae++)}),ae>0&&_.setAttribute("sentry.idle_span_discarded_spans",ae)}return o.push(f.on("spanStart",E=>{if(r||E===_||v(E).timestamp||E instanceof yt&&E.isStandaloneSpan())return;Je(_).includes(E)&&kt(E.spanContext().spanId)})),o.push(f.on("spanEnd",E=>{r||At(E.spanContext().spanId)})),o.push(f.on("idleSpanEnableAutoFinish",E=>{E===_&&(i=!0,G(),n.size&&se())})),t.disableAutoFinish||G(),setTimeout(()=>{r||(_.setStatus({code:_e,message:"deadline_exceeded"}),a=Ca,_.end())},u),_}function La(e){const t=be(e);
8return _t(w(),t),h&&m.log("[Tracing] Started span is an idle span"),t}const $n=[];function Oa(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 xa(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(s=>{s.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){const s=n(t);r=Array.isArray(s)?s:[s]}else r=t;return Oa(r)}function Fa(e,t){const n={};return t.forEach(r=>{r&&Mr(e,r,n)}),n}function Un(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Mr(e,t,n){if(n[t.name]){h&&m.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,$n.indexOf(t.name)===-1&&typeof t.setupOnce=="function"&&(t.setupOnce(),$n.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,a)=>r(s,a,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((a,i)=>r(a,i,e),{id:t.name});e.addEventProcessor(s)}h&&m.log(`Integration installed: ${t.name}`)}function Ma(e,t,n){const r=[{type:"client_report"},{timestamp:Et(),discarded_events:e}];return ye(t?{dsn:t}:{},[r])}function Dr(e){const t=[];e.message&&t.push(e.message);try{const n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Da(e){const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:a,data:i,op:o}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:o,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:a,profile_id:i?.[nn],exclusive_time:i?.[Te],measurements:e.measurements,is_segment:!0}}function Ha(e){return{type:"transaction",timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{[nn]:e.profile_id},...e.exclusive_time&&{[Te]:e.exclusive_time}}}},measurements:e.measurements}}const Bn="Not capturing exception because it's already been captured.",qn="Discarded session because of missing or non-string release",Hr=Symbol.for("SentryInternalError"),$r=Symbol.for("SentryDoNotSendEventError");function tt(e){return{message:e,[Hr]:!0}}function Pt(e){return{message:e,[$r]:!0}}function Wn(e){return!!e&&typeof e=="object"&&Hr in e}function jn(e){return!!e&&typeof e=="object"&&$r in e}class $a{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=Ls(t.dsn):h&&m.warn("No DSN provided, client will not send events."),this._dsn){const n=na(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=Ze();if(Tn(t))return h&&m.log(Bn),s;const a={event_id:s,...n};return this._process(this.eventFromException(t,a).then(i=>this._captureEvent(i,a,r))),a.event_id}captureMessage(t,n,r,s){const a={event_id:Ze(),...r},i=Er(t)?t:String(t),o=xe(t)?this.eventFromMessage(i,n,a):this.eventFromException(t,a);return this._process(o.then(c=>this._captureEvent(c,a,s))),a.event_id}captureEvent(t,n,r){const s=Ze();if(n?.originalException&&Tn(n.originalException))return h&&m.log(Bn),s;const a={event_id:s,...n},i=t.sdkProcessingMetadata||{},o=i.capturedSpanScope,c=i.capturedSpanIsolationScope;return this._process(this._captureEvent(t,a,o||r,c)),a.event_id}captureSession(t){this.sendSession(t),yn(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;
vendor: 8,018 bytes, lines 8-9
8return n?(this.emit("flush"),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):le(!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];Mr(this,t,this._integrations),n||Un(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=ha(t,this._dsn,this._options._metadata,this._options.tunnel);for(const a of n.attachments||[])r=ia(r,da(a));const s=this.sendEnvelope(r);s&&s.then(a=>this.emit("afterSendEvent",t,a),null)}sendSession(t){const{release:n,environment:r=Os}=this._options;if("aggregates"in t){const a=t.attrs||{};if(!a.release&&!n){h&&m.warn(qn);return}a.release=a.release||n,a.environment=a.environment||r,t.attrs=a}else{if(!t.release&&!n){h&&m.warn(qn);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=ma(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(s)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){const s=`${t}:${n}`;h&&m.log(`Recording outcome: "${s}"${r>1?` (${r} times)`:""}`),this._outcomes[s]=(this._outcomes[s]||0)+r}}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=>(h&&m.error("Error while sending envelope:",n),n)):(h&&m.error("Transport disabled"),le({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=Fa(this,t),Un(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",s=!1;const a=n.exception?.values;if(a){s=!0;for(const c of a)if(c.mechanism?.handled===!1){r=!0;break}}const i=t.status==="ok";(i&&t.errors===0||i&&r)&&(yn(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new _r(n=>{let r=0;const s=1,a=setInterval(()=>{this._numProcessing==0?(clearInterval(a),n(!0)):(r+=s,t&&r>=t&&(clearInterval(a),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const a=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i?.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),xs(a,t,n,r,this,s).then(o=>{if(o===null)return o;this.emit("postprocessEvent",o,n),o.contexts={trace:Fs(r),...o.contexts};const c=Sr(this,r);return o.sdkProcessingMetadata={dynamicSamplingContext:c,...o.sdkProcessingMetadata},o})}_captureEvent(t,n={},r=w(),s=St()){return h&&Gt(t)&&m.log(`Captured error event \`${Dr(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,s).then(a=>a.event_id,a=>{h&&(jn(a)?m.log(a.message):Wn(a)?m.warn(a.message):m.warn(a))})}_processEvent(t,n,r,s){const a=this.getOptions(),{sampleRate:i}=a,o=Ur(t),c=Gt(t),u=t.type||"error",d=`before send for type \`${u}\``,l=typeof i>"u"?void 0:rn(i);if(c&&typeof l=="number"&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error"),it(Pt(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));const f=u==="replay_event"?"replay":u;return this._prepareEvent(t,n,r,s).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",f),Pt("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return p;const _=Ba(this,a,p,n);return Ua(_,d)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",f),o){const G=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",G)}throw Pt(`${d} returned \`null\`, will not send event.`)}const S=r.getSession()||s.getSession();if(c&&S&&this._updateSessionFromEvent(S,p),o){const H=p.sdkProcessingMetadata?.spanCountBeforeProcessing||0,G=p.spans?p.spans.length:0,se=H-G;se>0&&this.recordDroppedEvent("before_send","span",se)}const _=p.transaction_info;if(o&&_&&p.transaction!==t.transaction){const H="custom";p.transaction_info={..._,source:H}}return this.sendEvent(p,n),p}).then(null,p=>{throw jn(p)||Wn(p)?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),tt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. 9Reason: ${p}`))})}_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,a]=n.split(":");return{reason:s,category:a,quantity:r}})}_flushOutcomes(){h&&m.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){h&&m.log("No outcomes to send");return}if(!this._dsn){h&&m.log("No dsn provided, will not send outcomes");return}h&&m.log("Sending outcomes:",t);const n=Ma(t,this._options.tunnel&&He(this._dsn));this.sendEnvelope(n)}}function Ua(e,t){const n=`${t} must return \`null\` or a valid event.`;if(fr(e))return e.then(r=>{if(!Wt(r)&&r!==null)throw tt(n);return r},r=>{throw tt(`${t} rejected with ${r}`)});if(!Wt(e)&&e!==null)throw tt(n);return e}function Ba(e,t,n,r){const{beforeSend:s,beforeSendTransaction:a,beforeSendSpan:i}=t;let o=n;if(Gt(o)&&s)return s(o,r);if(Ur(o)){if(i){const c=i(Da(o));if(c?o=Ms(n,Ha(c)):qt(),o.spans){const u=[];for(const d of o.spans){const l=i(d);l?u.push(l):(qt(),u.push(d))}o.spans=u}}if(a){if(o.spans){const c=o.spans.length;o.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:c}}return a(o,r)}}return o}function Gt(e){return e.type===void 0}function Ur(e){return e.type==="transaction"}function qa(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function Wa(e,t,n,r){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=He(r)),ye(s,[qa(e)])}function Lt(e,t){const n=ja(e)??[];if(n.length===0)return;const r=e.getOptions(),s=Wa(n,r._metadata,r.tunnel,e.getDsn());Br().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function ja(e){return Br().get(e)}function Br(){return Ds("clientToLogBufferMap",()=>new WeakMap)}function Ga(e,t){t.debug===!0&&(h?m.enable():an(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),w().update(t.initialScope);const r=new e(t);return Va(r),r.init(),r}function Va(e){w().setClient(e)}const qr=Symbol.for("SentryBufferFullError");function za(e){const t=[];function n(){return e===void 0||t.length<e}function r(i){return t.splice(t.indexOf(i),1)[0]||Promise.resolve(void 0)}function s(i){if(!n())return it(qr);const o=i();return t.indexOf(o)===-1&&t.push(o),o.then(()=>r(o)).then(null,()=>r(o).then(null,()=>{})),o}function a(i){return new _r((o,c)=>{let u=t.length;if(!u)return o(!0);const d=setTimeout(()=>{i&&i>0&&o(!1)},i);t.forEach(l=>{le(l).then(()=>{--u||(clearTimeout(d),o(!0))},c)})})}return{$:t,add:s,drain:a}}const Ya=60*1e3;function Xa(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?Ya:r-t}function Ja(e,t){return e[t]||e.all||0}function Ka(e,t,n=Date.now()){return Ja(e,t)>n}function Za(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},a=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(a)for(const o of a.trim().split(",")){const[c,u,,,d]=o.split(":",5),l=parseInt(c,10),f=(isNaN(l)?60:l)*1e3;if(!u)s.all=r+f;else for(const p of u.split(";"))p==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(s[p]=r+f):s[p]=r+f}else i?s.all=r+Xa(i,r):t===429&&(s.all=r+60*1e3);return s}const Qa=64;function ei(e,t,n=za(e.bufferSize||Qa)){let r={};const s=i=>n.drain(i);function a(i){const o=[];if(Ln(i,(l,f)=>{const p=On(f);
9Ka(r,p)?e.recordDroppedEvent("ratelimit_backoff",p):o.push(l)}),o.length===0)return le({});const c=ye(i[0],o),u=l=>{Ln(c,(f,p)=>{e.recordDroppedEvent(l,On(p))})},d=()=>t({body:oa(c)}).then(l=>(l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&h&&m.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=Za(r,l),l),l=>{throw u("network_error"),h&&m.error("Encountered error running transport request:",l),l});return n.add(d).then(l=>l,l=>{if(l===qr)return h&&m.error("Skipped sending event because buffer is full."),u("queue_overflow"),le({});throw l})}return{send:a,flush:s}}function ti(e){e.user?.ip_address===void 0&&(e.user={...e.user,ip_address:"{{auto}}"})}function ni(e){"aggregates"in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:"{{auto}}"}):e.ipAddress===void 0&&(e.ipAddress="{{auto}}")}function Wr(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(a=>({name:`${r}:@sentry/${a}`,version:bn})),version:bn}),e._metadata=s}function jr(e={}){const t=e.client||R();if(!Hs()||!t)return{};const n=pr(),r=mr(n);if(r.getTraceData)return r.getTraceData(e);const s=e.scope||w(),a=e.span||B(),i=a?$s(a):ri(s),o=a?ue(a):Sr(t,s),c=Us(o);return Bs.test(i)?{"sentry-trace":i,baggage:c}:(m.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}function ri(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return qs(t,r,n)}const si=100;function fe(e,t){const n=R(),r=St();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:a=si}=n.getOptions();if(a<=0)return;const o={timestamp:Et(),...e},c=s?an(()=>s(o,t)):o;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,a))}let Gn;const ai="FunctionToString",Vn=new WeakMap,ii=(()=>({name:ai,setupOnce(){Gn=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Tr(this),n=Vn.has(R())&&t!==void 0?t:this;return Gn.apply(n,e)}}catch{}},setup(e){Vn.set(e,!0)}})),oi=ii,ci=[/^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$/],ui="EventFilters",di=(e={})=>{let t;return{name:ui,setup(n){const r=n.getOptions();t=zn(e,r)},processEvent(n,r,s){if(!t){const a=s.getOptions();t=zn(e,a)}return fi(n,t)?null:n}}},li=((e={})=>({...di(e),name:"InboundFilters"}));function zn(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:ci],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function fi(e,t){if(e.type){if(e.type==="transaction"&&mi(e,t.ignoreTransactions))return h&&m.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. 10Event: ${oe(e)}`),!0}else{if(pi(e,t.ignoreErrors))return h&&m.warn(`Event dropped due to being matched by \`ignoreErrors\` option. 11Event: ${oe(e)}`),!0;if(Si(e))return h&&m.warn(`Event dropped due to not having an error message, error type or stacktrace. 12Event: ${oe(e)}`),!0;if(hi(e,t.denyUrls))return h&&m.warn(`Event dropped due to being matched by \`denyUrls\` option. 13Event: ${oe(e)}. 14Url: ${dt(e)}`),!0;if(!gi(e,t.allowUrls))return h&&m.warn(`Event dropped due to not being matched by \`allowUrls\` option. 15Event: ${oe(e)}. 16Url: ${dt(e)}`),!0}return!1}function pi(e,t){return t?.length?Dr(e).some(n=>Z(n,t)):!1}function mi(e,t){if(!t?.length)return!1;const n=e.transaction;return n?Z(n,t):!1}function hi(e,t){if(!t?.length)return!1;const n=dt(e);return n?Z(n,t):!1}function gi(e,t){if(!t?.length)return!0;const n=dt(e);return n?Z(n,t):!0}function _i(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function dt(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?_i(n):null}catch{return h&&m.error(`Cannot extract url for event ${oe(e)}`),null}}function Si(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Ei(e,t,n,r,s,a){if(!s.exception?.values||!a||!ot(a.originalException,Error))return;const i=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;i&&(s.exception.values=Vt(e,t,r,a.originalException,n,s.exception.values,i,0
16))}function Vt(e,t,n,r,s,a,i,o){if(a.length>=n+1)return a;let c=[...a];if(ot(r[s],Error)){Yn(i,o);const u=e(t,r[s]),d=c.length;Xn(u,s,d,o),c=Vt(e,t,n,r[s],s,[u,...c],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(ot(u,Error)){Yn(i,o);const l=e(t,u),f=c.length;Xn(l,`errors[${d}]`,f,o),c=Vt(e,t,n,u,s,[l,...c],l,f)}}),c}function Yn(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 Xn(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 Ti(e){const t="console";ne(t,e),re(t,yi)}function yi(){"console"in x&&Ws.forEach(function(e){e in x.console&&$(x.console,e,function(t){return vn[e]=t,function(...n){q("console",{args:n,level:e}),vn[e]?.apply(x.console,n)}})})}function bi(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const vi="Dedupe",Ii=(()=>{let e;return{name:vi,processEvent(t){if(t.type)return t;try{if(wi(t,e))return h&&m.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),Ri=Ii;function wi(e,t){return t?!!(ki(e,t)||Ai(e,t)):!1}function ki(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Vr(e,t)||!Gr(e,t))}function Ai(e,t){const n=Jn(t),r=Jn(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Vr(e,t)||!Gr(e,t))}function Gr(e,t){let n=In(e),r=In(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<r.length;s++){const a=r[s],i=n[s];if(a.filename!==i.filename||a.lineno!==i.lineno||a.colno!==i.colno||a.function!==i.function)return!1}return!0}function Vr(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Jn(e){return e.exception?.values?.[0]}const Ni="thismessage:/";function zr(e){return"isRelative"in e}function Yr(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?Ni:void 0;try{if("canParse"in URL&&!URL.canParse(e,r))return;const s=new URL(e,r);return n?{isRelative:n,pathname:s.pathname,search:s.search,hash:s.hash}:s}catch{}}function Ci(e){if(zr(e))return e.pathname;const t=new URL(e);return t.search="",t.hash="",["80","443"].includes(t.port)&&(t.port=""),t.password&&(t.password="%filtered%"),t.username&&(t.username="%filtered%"),t.toString()}function ce(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Pi(e){return e.split(/[?#]/,1)[0]}function Li(e,t,n,r,s="auto.http.browser"){if(!e.fetchData)return;const{method:a,url:i}=e.fetchData,o=de()&&t(i);if(e.endTimestamp&&o){const l=e.fetchData.__span;if(!l)return;const f=r[l];f&&(xi(f,e),delete r[l]);return}const c=!!B(),u=o&&c?be(Mi(i,a,s)):new te;if(e.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,n(e.fetchData.url)){const l=e.args[0],f=e.args[1]||{},p=Oi(l,f,de()&&c?u:void 0);p&&(e.args[1]=f,f.headers=p)}const d=R();if(d){const l={input:e.args,response:e.response,startTimestamp:e.startTimestamp,endTimestamp:e.endTimestamp};d.emit("beforeOutgoingRequestSpan",u,l)}return u}function Oi(e,t,n){const r=jr({span:n}),s=r["sentry-trace"],a=r.baggage;if(!s)return;const i=t.headers||(br(e)?e.headers:void 0);if(i)if(Fi(i)){const o=new Headers(i);if(o.get("sentry-trace")||o.set("sentry-trace",s),a){const c=o.get("baggage");c?Ge(c)||o.set("baggage",`${c},${a}`):o.set("baggage",a)}return o}else if(Array.isArray(i)){const o=[...i];i.find(u=>u[0]==="sentry-trace")||o.push(["sentry-trace",s]);const c=i.find(u=>u[0]==="baggage"&&Ge(u[1]));return a&&!c&&o.push(["baggage",a]),o}else{const o="sentry-trace"in i?i["sentry-trace"]:void 0,c="baggage"in i?i.baggage:void 0,u=c?Array.isArray(c)?[...c]:[c]:[],d=c&&(Array.isArray(c)?c.find(l=>Ge(l)):Ge(c));return a&&!d&&u.push(a),{...i,"sentry-trace":o??s,baggage:u.length>0?u.join(","):void 0}}else return{...r}}function xi(e,t){if(t.response){yr(e,t.response.status);const n=t.response?.headers?.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus({code:_e,message:"internal_error"});e.end()}function Ge(e){return e.split(",").some(t=>t.trim().startsWith(js))}function Fi(e){return typeof Headers<"u"&&ot(e,Headers)}function Mi(e,t,n){const r=Yr(e);return{name:r?`${t} ${Ci(r)}`:t,attributes:Di(e,r,t,n)}}function Di(e,t,n,r){const s={url:e,type:"fetch","http.method":n,[k]:r,[ee]:"http.client"};return t&&(zr(t)||(s["http.url"]=t.href,s["server.address"]=t.host),t.search&&(s["http.query"]=t.search),t.hash&&(s["http.fragment"]=t.hash)),s}function Xr(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const Me=x;function Hi(){return"history"in Me&&!!Me.history}
16function $i(){if(!("fetch"in Me))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function zt(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Ui(){if(typeof EdgeRuntime=="string")return!0;if(!$i())return!1;if(zt(Me.fetch))return!0;let e=!1;const t=Me.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=zt(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){h&&m.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Jr(e,t){const n="fetch";ne(n,e),re(n,()=>Kr(void 0,t))}function Bi(e){const t="fetch-body-resolved";ne(t,e),re(t,()=>Kr(Wi))}function Kr(e,t=!1){t&&!Ui()||$(x,"fetch",function(n){return function(...r){const s=new Error,{method:a,url:i}=ji(r),o={args:r,fetchData:{method:a,url:i},startTimestamp:M()*1e3,virtualError:s,headers:Gi(r)};return e||q("fetch",{...o}),n.apply(x,r).then(async c=>(e?e(c):q("fetch",{...o,endTimestamp:M()*1e3,response:c}),c),c=>{if(q("fetch",{...o,endTimestamp:M()*1e3,error:c}),vr(c)&&c.stack===void 0&&(c.stack=s.stack,ct(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(o.fetchData.url);c.message=`${c.message} (${u.host})`}catch{}throw c})}})}async function qi(e,t){if(e?.body){const n=e.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},90*1e3);let a=!0;for(;a;){let i;try{i=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:o}=await r.read();clearTimeout(i),o&&(t(),a=!1)}catch{a=!1}finally{clearTimeout(i)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function Wi(e){let t;try{t=e.clone()}catch{return}qi(t,()=>{q("fetch-body-resolved",{endTimestamp:M()*1e3,response:e})})}function Yt(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Kn(e){return typeof e=="string"?e:e?Yt(e,"url")?e.url:e.toString?e.toString():"":""}function ji(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Kn(n),method:Yt(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Kn(t),method:Yt(t,"method")?String(t.method).toUpperCase():"GET"}}function Gi(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(br(t))return new Headers(t.headers)}catch{}}function Vi(){return"npm"}function ln(e,t){const n=fn(e,t),r={type:Ki(t),value:Zi(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function zi(e,t,n,r){const a=R()?.getOptions().normalizeDepth,i=ro(t),o={__serialized__:Vs(t,a)};if(i)return{exception:{values:[ln(e,i)]},extra:o};const c={exception:{values:[{type:on(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:to(t,{isUnhandledRejection:r})}]},extra:o};if(n){const u=fn(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function Ot(e,t){return{exception:{values:[ln(e,t)]}}}function fn(e,t){const n=t.stacktrace||t.stack||"",r=Xi(t),s=Ji(t);try{return e(n,r,s)}catch{}return[]}const Yi=/Minified React error #\d+;/i;function Xi(e){return e&&Yi.test(e.message)?1:0}function Ji(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Zr(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Ki(e){const t=e?.name;return!t&&Zr(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function Zi(e){const t=e?.message;return Zr(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:"wasm exception":t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function Qi(e,t,n,r){const s=n?.syntheticException||void 0,a=pn(e,t,s,r);return ut(a),a.level="error",n?.event_id&&(a.event_id=n.event_id),le(a)}function eo(e,t,n="info",r,s){const a=r?.syntheticException||void 0,i=Xt(e,t,a,s);return i.level=n,r?.event_id&&(i.event_id=r.event_id),le(i)}
16function pn(e,t,n,r,s){let a;if(Ir(t)&&t.error)return Ot(e,t.error);if(Rn(t)||Gs(t)){const i=t;if("stack"in t)a=Ot(e,t);else{const o=i.name||(Rn(i)?"DOMError":"DOMException"),c=i.message?`${o}: ${i.message}`:o;a=Xt(e,c,n,r),wn(a,c)}return"code"in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return vr(t)?Ot(e,t):Wt(t)||on(t)?(a=zi(e,t,n,s),ut(a,{synthetic:!0}),a):(a=Xt(e,t,n,r),wn(a,`${t}`),ut(a,{synthetic:!0}),a)}function Xt(e,t,n,r){const s={};if(r&&n){const a=fn(e,n);a.length&&(s.exception={values:[{value:t,stacktrace:{frames:a}}]}),ut(s,{synthetic:!0})}if(Er(t)){const{__sentry_template_string__:a,__sentry_template_values__:i}=t;return s.logentry={message:a,params:i},s}return s.message=t,s}function to(e,{isUnhandledRejection:t}){const n=zs(e),r=t?"promise rejection":"exception";return Ir(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:on(e)?`Event \`${no(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function no(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ro(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}const so=5e3;class ao extends $a{constructor(t){const n=io(t),r=T.SENTRY_SDK_SOURCE||Vi();Wr(n,"browser",["browser"],r),super(n);const{sendDefaultPii:s,sendClientReports:a,enableLogs:i,_experiments:o}=this._options,c=i??o?.enableLogs;T.document&&(a||c)&&T.document.addEventListener("visibilitychange",()=>{T.document.visibilityState==="hidden"&&(a&&this._flushOutcomes(),c&&Lt(this))}),c&&(this.on("flush",()=>{Lt(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{Lt(this)},so)})),s&&(this.on("postprocessEvent",ti),this.on("beforeSendSession",ni))}eventFromException(t,n){return Qi(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return eo(this._options.stackParser,t,n,r,this._options.attachStacktrace)}_prepareEvent(t,n,r,s){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r,s)}}function io(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:T.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const bt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,g=x,oo=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",ve=(e,t,n,r)=>{let s,a;return i=>{t.value>=0&&(i||r)&&(a=t.value-(s??0),(a||s===void 0)&&(s=t.value,t.delta=a,t.rating=oo(t.value,n),e(t)))}},co=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Be=(e=!0)=>{const t=g.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},Ie=()=>Be()?.activationStart??0,Re=(e,t=-1)=>{const n=Be();let r="navigate";return n&&(g.document?.prerendering||Ie()>0?r="prerender":g.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:co(),navigationType:r}},xt=new WeakMap;function mn(e,t){return xt.get(e)||xt.set(e,new t),xt.get(e)}class lt{constructor(){lt.prototype.__init.call(this),lt.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),this._onAfterProcessingUnexpectedShift?.(t)}}const pe=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{Promise.resolve().then(()=>{t(s.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},vt=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Le=-1;const uo=()=>g.document?.visibilityState==="hidden"&&!g.document?.prerendering?0:1/0,ft=e=>{g.document.visibilityState==="hidden"&&Le>-1&&(Le=e.type==="visibilitychange"?e.timeStamp:0,fo())},lo=()=>{addEventListener("visibilitychange",ft,!0),addEventListener("prerenderingchange",ft,!0)},fo=()=>{removeEventListener("visibilitychange",ft,!0),removeEventListener("prerenderingchange",ft,!0)},It=()=>{if(g.document&&Le<0){const e=Ie();Le=(g.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??uo(),lo()}return{get firstHiddenTime(){return Le}}},qe=e=>{g.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},po=[1800,3e3],mo=(e,t={})=>{qe(()=>
16{const n=It(),r=Re("FCP");let s;const i=pe("paint",o=>{for(const c of o)c.name==="first-contentful-paint"&&(i.disconnect(),c.startTime<n.firstHiddenTime&&(r.value=Math.max(c.startTime-Ie(),0),r.entries.push(c),s(!0)))});i&&(s=ve(e,r,po,t.reportAllChanges))})},ho=[.1,.25],go=(e,t={})=>{mo(vt(()=>{const n=Re("CLS",0);let r;const s=mn(t,lt),a=o=>{for(const c of o)s._processEntry(c);s._sessionValue>n.value&&(n.value=s._sessionValue,n.entries=s._sessionEntries,r())},i=pe("layout-shift",a);i&&(r=ve(e,n,ho,t.reportAllChanges),g.document?.addEventListener("visibilitychange",()=>{g.document?.visibilityState==="hidden"&&(a(i.takeRecords()),r(!0))}),g?.setTimeout?.(r))}))},Rt=e=>{const t=n=>{(n.type==="pagehide"||g.document?.visibilityState==="hidden")&&e(n)};g.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},_o=[100,300],So=(e,t={})=>{qe(()=>{const n=It(),r=Re("FID");let s;const a=c=>{c.startTime<n.firstHiddenTime&&(r.value=c.processingStart-c.startTime,r.entries.push(c),s(!0))},i=c=>{c.forEach(a)},o=pe("first-input",i);s=ve(e,r,_o,t.reportAllChanges),o&&Rt(vt(()=>{i(o.takeRecords()),o.disconnect()}))})};let Qr=0,Ft=1/0,Ve=0;const Eo=e=>{e.forEach(t=>{t.interactionId&&(Ft=Math.min(Ft,t.interactionId),Ve=Math.max(Ve,t.interactionId),Qr=Ve?(Ve-Ft)/7+1:0)})};let Jt;const es=()=>Jt?Qr:performance.interactionCount||0,To=()=>{"interactionCount"in performance||Jt||(Jt=pe("event",Eo,{type:"event",buffered:!0,durationThreshold:0}))},Mt=10;let ts=0;const yo=()=>es()-ts;class pt{constructor(){pt.prototype.__init.call(this),pt.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){ts=es(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(yo()/50));return this._longestInteractionList[t]}_processEntry(t){if(this._onBeforeProcessingEntry?.(t),!(t.interactionId||t.entryType==="first-input"))return;const n=this._longestInteractionList.at(-1);let r=this._longestInteractionMap.get(t.interactionId);if(r||this._longestInteractionList.length<Mt||t.duration>n._latency){if(r?t.duration>r._latency?(r.entries=[t],r._latency=t.duration):t.duration===r._latency&&t.startTime===r.entries[0].startTime&&r.entries.push(t):(r={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(r.id,r),this._longestInteractionList.push(r)),this._longestInteractionList.sort((s,a)=>a._latency-s._latency),this._longestInteractionList.length>Mt){const s=this._longestInteractionList.splice(Mt);for(const a of s)this._longestInteractionMap.delete(a.id)}this._onAfterProcessingINPCandidate?.(r)}}}const ns=e=>{const t=g.requestIdleCallback||g.setTimeout;g.document?.visibilityState==="hidden"?e():(e=vt(e),t(e),Rt(e))},bo=[200,500],vo=40,Io=(e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&qe(()=>{To();const n=Re("INP");let r;const s=mn(t,pt),a=o=>{ns(()=>{for(const u of o)s._processEntry(u);const c=s._estimateP98LongestInteraction();c&&c._latency!==n.value&&(n.value=c._latency,n.entries=c.entries,r())})},i=pe("event",a,{durationThreshold:t.durationThreshold??vo});r=ve(e,n,bo,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),Rt(()=>{a(i.takeRecords()),r(!0)}))})};class Ro{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const wo=[2500,4e3],ko=(e,t={})=>{qe(()=>{const n=It(),r=Re("LCP");let s;const a=mn(t,Ro),i=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)a._processEntry(u),u.startTime<n.firstHiddenTime&&(r.value=Math.max(u.startTime-Ie(),0),r.entries=[u],s())},o=pe("largest-contentful-paint",i);if(o){s=ve(e,r,wo,t.reportAllChanges);const c=vt(()=>{i(o.takeRecords()),o.disconnect(),s(!0)});for(const u of["keydown","click","visibilitychange"])g.document&&addEventListener(u,()=>ns(c),{capture:!0,once:!0})}})},Ao=[800,1800],Kt=e=>{g.document?.prerendering?qe(()=>Kt(e)):g.document?.readyState!=="complete"?addEventListener("load",()=>Kt(e),!0):setTimeout(e)},No=(e,t={})=>{const n=Re("TTFB"),r=ve(e,n,Ao,t.reportAllChanges);Kt(()=>{const s=Be();s&&(n.value=Math.max(s.responseStart-Ie(),0),n.entries=[s],r(!0))})},Oe={},mt={};let rs,ss,as,is,os;function cs(e,t=!1){return We("cls",e,Oo,rs,t)}function us(e,t=!1){return We("lcp",e,Fo,as,t)}function Co(e){return We("fid",e,xo,ss)}function Po(e){return We("ttfb",e,Mo,is)}function Lo(e){return We("inp",e,Do,os)}function Ee(e,t){return ds(e,t),mt[e]||(Ho(e),mt[e]=!0),ls(e,t)}function we(e,t){const n=Oe[e];if(n?.length)for(const r of n)try{r(t)}catch(s){bt&&m.error(`Error while triggering instrumentation handler. 17Type: ${e} 18Name: ${Q(r)} 19Error:`,s)}}function Oo(){return go(e=>{we("cls",{metric:e}),rs=e},{reportAllChanges:!0})}function xo(){return So(e=>{we("fid",{metric:e}),ss=e})}function Fo(){return ko(e=>{we("lcp",{metric:e}),as=e},{reportAllChanges:!0})}function Mo(){return No(e=>{we("ttfb",{metric:e}),is=e})}function Do(){return Io(e=>{we("inp",{metric:e}),os=e})}function We(e,t,n,r,s=!1){ds(e,t);let a;return mt[e]||(a=n(),mt[e]=!0),r&&t({metric:r}),ls(e,t,s?a:void 0)}function Ho(e){const t={};e==="event"&&(t.durationThreshold=0),pe(e,n=>{we(e,{entries:n})},t)}function ds(e,t){Oe[e]=Oe[e]||[],Oe[e].push(t)}
19function ls(e,t,n){return()=>{n&&n();const r=Oe[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function $o(e){return"duration"in e}function Dt(e){return typeof e=="number"&&isFinite(e)}function Y(e,t,n,{...r}){const s=v(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),un(e,()=>{const a=be({startTime:t,...r});return a&&a.end(n),a})}function hn(e){const t=R();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:a}=e,{release:i,environment:o,sendDefaultPii:c}=t.getOptions(),d=t.getIntegrationByName("Replay")?.getReplayId(),l=w(),f=l.getUser(),p=f!==void 0?f.email||f.id||f.ip_address:void 0;let S;try{S=l.getScopeData().contexts.profile.profile_id}catch{}const _={release:i,environment:o,user:p||void 0,profile_id:S||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":g.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...s};return be({name:n,attributes:_,startTime:a,experimental:{standalone:!0}})}function wt(){return g.addEventListener&&g.performance}function I(e){return e/1e3}function fs(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 ps(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function ms(e,t){let n,r=!1;function s(o){!r&&n&&t(o,n),r=!0}Rt(()=>{s("pagehide")});const a=e.on("beforeStartNavigationSpan",(o,c)=>{c?.isRedirect||(s("navigation"),a?.(),i?.())}),i=e.on("afterStartPageLoadSpan",o=>{n=o.spanContext().spanId,i?.()})}function Uo(e){let t=0,n;if(!ps("layout-shift"))return;const r=cs(({metric:s})=>{const a=s.entries[s.entries.length-1];a&&(t=s.value,n=a)},!0);ms(e,(s,a)=>{Bo(t,n,a,s),r()})}function Bo(e,t,n,r){bt&&m.log(`Sending CLS span (${e})`);const s=I((D()||0)+(t?.startTime||0)),a=w().getScopeData().transactionName,i=t?z(t.sources[0]?.node):"Layout shift",o={[k]:"auto.http.browser.cls",[ee]:"ui.webvital.cls",[Te]:t?.duration||0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,d)=>{o[`cls.source.${d+1}`]=z(u.node)});const c=hn({name:i,transaction:a,attributes:o,startTime:s});c&&(c.addEvent("cls",{[$e]:"",[Ue]:e}),c.end(s))}function qo(e){let t=0,n;if(!ps("largest-contentful-paint"))return;const r=us(({metric:s})=>{const a=s.entries[s.entries.length-1];a&&(t=s.value,n=a)},!0);ms(e,(s,a)=>{Wo(t,n,a,s),r()})}function Wo(e,t,n,r){bt&&m.log(`Sending LCP span (${e})`);const s=I((D()||0)+(t?.startTime||0)),a=w().getScopeData().transactionName,i=t?z(t.element):"Largest contentful paint",o={[k]:"auto.http.browser.lcp",[ee]:"ui.webvital.lcp",[Te]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(o["lcp.element"]=z(t.element)),t.id&&(o["lcp.id"]=t.id),t.url&&(o["lcp.url"]=t.url.trim().slice(0,200)),t.loadTime!=null&&(o["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(o["lcp.renderTime"]=t.renderTime),t.size!=null&&(o["lcp.size"]=t.size));const c=hn({name:i,transaction:a,attributes:o,startTime:s});c&&(c.addEvent("lcp",{[$e]:"millisecond",[Ue]:e}),c.end(s))}const jo=2147483647;let Zn=0,P={},F,ht;function Go({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=wt();if(r&&D()){r.mark&&g.performance.mark("sentry-tracing-init");const s=Ko(),a=t?qo(n):Jo(),i=Zo(),o=e?Uo(n):Xo();return()=>{s(),a?.(),i(),o?.()}}return()=>{}}function Vo(){Ee("longtask",({entries:e})=>{const t=B();if(!t)return;const{op:n,start_timestamp:r}=v(t);for(const s of e){const a=I(D()+s.startTime),i=I(s.duration);n==="navigation"&&r&&a<r||Y(t,a,a+i,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[k]:"auto.ui.browser.metrics"}})}})}function zo(){new PerformanceObserver(t=>{const n=B();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const s=I(D()+r.startTime),{start_timestamp:a,op:i}=v(n);if(i==="navigation"&&a&&s<a)continue;const o=I(r.duration),c={[k]:"auto.ui.browser.metrics"},u=r.scripts[0],{invoker:d,invokerType:l,sourceURL:f,sourceFunctionName:p,sourceCharPosition:S}=u;c["browser.script.invoker"]=d,c["browser.script.invoker_type"]=l,f&&(c["code.filepath"]=f),p&&(c["code.function"]=p),S!==-1&&(c["browser.script.source_char_position"]=S),Y(n,s,s+o,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:c})}}).observe({type:"long-animation-frame",buffered:!0})}function Yo(){Ee("event",({entries:e})=>{const t=B();if(t){for(const n of e)if(n.name==="click"){const r=I(D()+n.startTime),s=I(n.duration),a={name:z(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[k]:"auto.ui.browser.metrics"}},i=Rr(n.target);i&&(a.attributes["ui.component_name"]=i),Y(t,r,r+s,a)}}})}function Xo(){return cs(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(P.cls={value:e.value,unit:""},ht=t)},!0)}function Jo(){return us(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(P.lcp={value:e.value,unit:"millisecond"},F=t)},!0)}function Ko(){return Co(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=I(D()),r=I(t.startTime);P.fid={value:e.value,unit:"millisecond"},P["mark.fid"]={value:n+r,unit:"second"}})}function Zo(){return Po(({metric:e})=>{e.entries[e.entries.length-1]&&(P.ttfb={value:e.value,unit:"millisecond"})})}function Qo(e,t){const n=wt(),r=D();if(!n?.getEntries||!r)return;const s=I(r),a=n.getEntries(),{op:i,start_timestamp:o}=v(e);
19if(a.slice(Zn).forEach(c=>{const u=I(c.startTime),d=I(Math.max(0,c.duration));if(!(i==="navigation"&&o&&s+u<o))switch(c.entryType){case"navigation":{nc(e,c,s);break}case"mark":case"paint":case"measure":{ec(e,c,u,d,s,t.ignorePerformanceApiSpans);const l=It(),f=c.startTime<l.firstHiddenTime;c.name==="first-paint"&&f&&(P.fp={value:c.startTime,unit:"millisecond"}),c.name==="first-contentful-paint"&&f&&(P.fcp={value:c.startTime,unit:"millisecond"});break}case"resource":{ac(e,c,c.name,u,d,s,t.ignoreResourceSpans);break}}}),Zn=Math.max(a.length-1,0),ic(e),i==="pageload"){cc(P);const c=P["mark.fid"];c&&P.fid&&(Y(e,c.value,c.value+I(P.fid.value),{name:"first input delay",op:"ui.action",attributes:{[k]:"auto.ui.browser.metrics"}}),delete P["mark.fid"]),t.recordClsOnPageloadSpan||delete P.cls,t.recordLcpOnPageloadSpan||delete P.lcp,Object.entries(P).forEach(([u,d])=>{Ea(u,d.value,d.unit)}),e.setAttribute("performance.timeOrigin",s),e.setAttribute("performance.activationStart",Ie()),oc(e,t)}F=void 0,ht=void 0,P={}}function ec(e,t,n,r,s,a){if(["mark","measure"].includes(t.entryType)&&Z(t.name,a))return;const i=Be(!1),o=I(i?i.requestStart:0),c=s+Math.max(n,o),u=s+n,d=u+r,l={[k]:"auto.resource.browser.metrics"};c!==u&&(l["sentry.browser.measure_happened_before_request"]=!0,l["sentry.browser.measure_start_time"]=c),tc(l,t),c<=d&&Y(e,c,d,{name:t.name,op:t.entryType,attributes:l})}function tc(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,s]of Object.entries(n))if(s&&xe(s))e[`sentry.browser.measure.detail.${r}`]=s;else if(s!==void 0)try{e[`sentry.browser.measure.detail.${r}`]=JSON.stringify(s)}catch{}return}if(xe(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function nc(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{ze(e,t,r,n)}),ze(e,t,"secureConnection",n,"TLS/SSL"),ze(e,t,"fetch",n,"cache"),ze(e,t,"domainLookup",n,"DNS"),sc(e,t,n)}function ze(e,t,n,r,s=n){const a=rc(n),i=t[a],o=t[`${n}Start`];!o||!i||Y(e,r+I(o),r+I(i),{op:`browser.${s}`,name:t.name,attributes:{[k]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function rc(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function sc(e,t,n){const r=n+I(t.requestStart),s=n+I(t.responseEnd),a=n+I(t.responseStart);t.responseEnd&&(Y(e,r,s,{op:"browser.request",name:t.name,attributes:{[k]:"auto.ui.browser.metrics"}}),Y(e,a,s,{op:"browser.response",name:t.name,attributes:{[k]:"auto.ui.browser.metrics"}}))}function ac(e,t,n,r,s,a,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(i?.includes(o))return;const c=ce(n),u={[k]:"auto.resource.browser.metrics"};Ht(u,t,"transferSize","http.response_transfer_size"),Ht(u,t,"encodedBodySize","http.response_content_length"),Ht(u,t,"decodedBodySize","http.decoded_response_content_length");const d=t.deliveryType;d!=null&&(u["http.response_delivery_type"]=d);const l=t.renderBlockingStatus;if(l&&(u["resource.render_blocking_status"]=l),c.protocol&&(u["url.scheme"]=c.protocol.split(":").pop()),c.host&&(u["server.address"]=c.host),u["url.same_origin"]=n.includes(g.location.origin),t.nextHopProtocol!=null){const{name:S,version:_}=fs(t.nextHopProtocol);u["network.protocol.name"]=S,u["network.protocol.version"]=_}const f=a+r,p=f+s;Y(e,f,p,{name:n.replace(g.location.origin,""),op:o,attributes:u})}function ic(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),Dt(n.rtt)&&(P["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Dt(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Dt(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function oc(e,t){F&&t.recordLcpOnPageloadSpan&&(F.element&&e.setAttribute("lcp.element",z(F.element)),F.id&&e.setAttribute("lcp.id",F.id),F.url&&e.setAttribute("lcp.url",F.url.trim().slice(0,200)),F.loadTime!=null&&e.setAttribute("lcp.loadTime",F.loadTime),F.renderTime!=null&&e.setAttribute("lcp.renderTime",F.renderTime),e.setAttribute("lcp.size",F.size)),ht?.sources&&t.recordClsOnPageloadSpan&&ht.sources.forEac
19h((n,r)=>e.setAttribute(`cls.source.${r+1}`,z(n.node)))}function Ht(e,t,n,r){const s=t[n];s!=null&&s<jo&&(e[r]=s)}function cc(e){const t=Be(!1);if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function uc(){return wt()&&D()?Ee("element",dc):()=>{}}const dc=({entries:e})=>{const t=B(),n=t?U(t):void 0,r=n?v(n).description:w().getScopeData().transactionName;e.forEach(s=>{const a=s;if(!a.identifier)return;const i=a.name,o=a.renderTime,c=a.loadTime,[u,d]=c?[I(c),"load-time"]:o?[I(o),"render-time"]:[M(),"entry-emission"],l=i==="image-paint"?I(Math.max(0,(o??0)-(c??0))):0,f={[k]:"auto.ui.browser.elementtiming",[ee]:"ui.elementtiming",[V]:"component","sentry.span_start_time_source":d,"sentry.transaction_name":r,"element.id":a.id,"element.type":a.element?.tagName?.toLowerCase()||"unknown","element.size":a.naturalWidth&&a.naturalHeight?`${a.naturalWidth}x${a.naturalHeight}`:void 0,"element.render_time":o,"element.load_time":c,"element.url":a.url||void 0,"element.identifier":a.identifier,"element.paint_type":i};Ra({name:`element[${a.identifier}]`,attributes:f,startTime:u,onlyIfParent:!0},p=>{p.end(u+l)})})},lc=1e3;let Qn,Zt,Qt;function fc(e){ne("dom",e),re("dom",pc)}function pc(){if(!g.document)return;const e=q.bind(null,"dom"),t=er(e,!0);g.document.addEventListener("click",t,!1),g.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const s=g[n]?.prototype;s?.hasOwnProperty?.("addEventListener")&&($(s,"addEventListener",function(a){return function(i,o,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=u[i]=u[i]||{refCount:0};if(!d.handler){const l=er(e);d.handler=l,a.call(this,i,l,c)}d.refCount++}catch{}return a.call(this,i,o,c)}}),$(s,"removeEventListener",function(a){return function(i,o,c){if(i==="click"||i=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},d=u[i];d&&(d.refCount--,d.refCount<=0&&(a.call(this,i,d.handler,c),d.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return a.call(this,i,o,c)}}))})}function mc(e){if(e.type!==Zt)return!1;try{if(!e.target||e.target._sentryId!==Qt)return!1}catch{}return!0}function hc(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function er(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=gc(n);if(hc(n.type,r))return;ct(n,"_sentryCaptured",!0),r&&!r._sentryId&&ct(r,"_sentryId",Ze());
19const s=n.type==="keypress"?"input":n.type;mc(n)||(e({event:n,name:s,global:t}),Zt=n.type,Qt=r?r._sentryId:void 0),clearTimeout(Qn),Qn=g.setTimeout(()=>{Qt=void 0,Zt=void 0},lc)}}function gc(e){try{return e.target}catch{return null}}let Ye;function gn(e){const t="history";ne(t,e),re(t,_c)}function _c(){if(g.addEventListener("popstate",()=>{const t=g.location.href,n=Ye;if(Ye=t,n===t)return;q("history",{from:n,to:t})}),!Hi())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=Ye,a=Sc(String(r));if(Ye=a,s===a)return t.apply(this,n);q("history",{from:s,to:a})}return t.apply(this,n)}}$(g.history,"pushState",e),$(g.history,"replaceState",e)}function Sc(e){try{return new URL(e,g.location.origin).toString()}catch{return e}}const nt={};function Ec(e){const t=nt[e];if(t)return t;let n=g[e];if(zt(n))return nt[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 a=s.contentWindow;a?.[e]&&(n=a[e]),r.head.removeChild(s)}catch(s){bt&&m.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(nt[e]=n.bind(g))}function tr(e){nt[e]=void 0}const ge="__sentry_xhr_v3__";function hs(e){ne("xhr",e),re("xhr",Tc)}function Tc(){if(!g.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=new Error,a=M()*1e3,i=Pe(r[0])?r[0].toUpperCase():void 0,o=yc(r[1]);if(!i||!o)return t.apply(n,r);n[ge]={method:i,url:o,request_headers:{}},i==="POST"&&o.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[ge];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:M()*1e3,startTimestamp:a,xhr:n,virtualError:s};q("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,l){return c(),u.apply(d,l)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,l){const[f,p]=l,S=d[ge];return S&&Pe(f)&&Pe(p)&&(S.request_headers[f.toLowerCase()]=p),u.apply(d,l)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[ge];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const a={startTimestamp:M()*1e3,xhr:n};return q("xhr",a),t.apply(n,r)}})}function yc(e){if(Pe(e))return e;try{return e.toString()}catch{}}const $t=[],rt=new Map,bc=60;function vc(){if(wt()&&D()){const t=Ic();return()=>{t()}}return()=>{}}const nr={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 Ic(){return Lo(Rc)}const Rc=({metric:e})=>{if(e.value==null)return;const t=I(e.value);if(t>bc)return;const n=e.entries.find(S=>S.duration===e.value&&nr[S.name]);if(!n)return;const{interactionId:r}=n,s=nr[n.name],a=I(D()+n.startTime),i=B(),o=i?U(i):void 0,u=(r!=null?rt.get(r):void 0)||o,d=u?v(u).description:w().getScopeData().transactionName,l=z(n.target),f={[k]:"auto.http.browser.inp",[ee]:`ui.interaction.${s}`,[Te]:n.duration},p=hn({name:l,transaction:d,attributes:f,startTime:a});p&&(p.addEvent("inp",{[$e]:"millisecond",[Ue]:e.value}),p.end(a+t))};function wc(){const e=({entries:t})=>{const n=B(),r=n&&U(n);t.forEach(s=>{if(!$o(s)||!r)return;const a=s.interactionId;if(a!=null&&!rt.has(a)){if($t.length>10){const i=$t.shift();rt.delete(i)}$t.push(a),rt.set(a,r)}})};Ee("event",e),Ee("first-input",e)}function kc(e,t=Ec("fetch")){let n=0,r=0;function s(a){const i=a.body.length;n+=i,r++;const o={body:a.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};if(!t)return tr("fetch"),it("No fetch implementation available");try{return t(e.url,o).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 tr("fetch"),n-=i,r--,it(c)}}return ei(e,s)}const Ac=30,Nc=50;function en(e,t,n,r){const s={filename:e,function:t==="<anonymous>"?Se:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}
vendor: 4,968 bytes, line 19
19const Cc=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Pc=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Lc=/\((\S*)(?::(\d+))(?::(\d+))\)/,Oc=e=>{const t=Cc.exec(e);if(t){const[,r,s,a]=t;return en(r,Se,+s,+a)}const n=Pc.exec(e);if(n){if(n[2]&&n[2].indexOf("eval")===0){const i=Lc.exec(n[2]);i&&(n[2]=i[1],n[3]=i[2],n[4]=i[3])}const[s,a]=gs(n[1]||Se,n[2]);return en(a,s,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}},xc=[Ac,Oc],Fc=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Mc=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Dc=e=>{const t=Fc.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const a=Mc.exec(t[3]);a&&(t[1]=t[1]||"eval",t[3]=a[1],t[4]=a[2],t[5]="")}let r=t[3],s=t[1]||Se;return[s,r]=gs(s,r),en(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Hc=[Nc,Dc],$c=[xc,Hc],Uc=Ys(...$c),gs=(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]:Se,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Xe=1024,Bc="Breadcrumbs",qc=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Bc,setup(n){t.console&&Ti(Vc(n)),t.dom&&fc(Gc(n,t.dom)),t.xhr&&hs(zc(n)),t.fetch&&Jr(Yc(n)),t.history&&gn(Xc(n)),t.sentry&&n.on("beforeSendEvent",jc(n))}}}),Wc=qc;function jc(e){return function(n){R()===e&&fe({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:oe(n)},{event:n})}}function Gc(e,t){return function(r){if(R()!==e)return;let s,a,i=typeof t=="object"?t.serializeAttribute:void 0,o=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;o&&o>Xe&&(W&&m.warn(`\`dom.maxStringLength\` cannot exceed ${Xe}, but a value of ${o} was configured. Sentry will use ${Xe} instead.`),o=Xe),typeof i=="string"&&(i=[i]);try{const u=r.event,d=Jc(u)?u.target:u;s=z(d,{keyAttrs:i,maxStringLength:o}),a=Rr(d)}catch{s="<unknown>"}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};a&&(c.data={"ui.component_name":a}),fe(c,{event:r.event,name:r.name,global:r.global})}}function Vc(e){return function(n){if(R()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:bi(n.level),message:kn(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${kn(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;fe(r,{input:n.args,level:n.level})}}function zc(e){return function(n){if(R()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,a=n.xhr[ge];if(!r||!s||!a)return;const{method:i,url:o,status_code:c,body:u}=a,d={method:i,url:o,status_code:c},l={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},f={category:"xhr",data:d,type:"http",level:Xr(c)};e.emit("beforeOutgoingRequestBreadcrumb",f,l),fe(f,l)}}function Yc(e){return function(n){if(R()!==e)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 a=n.fetchData,i={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},o={category:"fetch",data:a,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",o,i),fe(o,i)}else{const a=n.response,i={...n.fetchData,status_code:a?.status};n.fetchData.request_body_size,n.fetchData.response_body_size,a?.status;const o={input:n.args,response:a,startTimestamp:r,endTimestamp:s},c={category:"fetch",data:i,type:"http",level:Xr(i.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,o),fe(c,o)}}}function Xc(e){return function(n){if(R()!==e)return;let r=n.from,s=n.to;const a=ce(T.location.href);let i=r?ce(r):void 0;const o=ce(s);i?.path||(i=a),a.protocol===o.protocol&&a.host===o.host&&(s=o.relative),a.protocol===i.protocol&&a.host===i.host&&(r=i.relative),fe({category:"navigation",data:{from:r,to:s}})}}function Jc(e){return!!e&&!!e.target}const Kc=["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"],Zc="BrowserApiErrors",Qc=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Zc,setupOnce(){t.setTimeout&&$(T,"setTimeout",rr),t.setInterval&&$(T,"setInterval",rr),t.requestAnimationFrame&&$(T,"requestAnimationFrame",tu),t.XMLHttpRequest&&"XMLHttpRequest"in T&&$(XMLHttpRequest.prototype,"send",nu);const n=t.eventTarget;
19n&&(Array.isArray(n)?n:Kc).forEach(s=>ru(s,t))}}}),eu=Qc;function rr(e){return function(...t){const n=t[0];return t[0]=Fe(n,{mechanism:{data:{function:Q(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function tu(e){return function(t){return e.apply(this,[Fe(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Q(e)},handled:!1,type:"instrument"}})])}}function nu(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&$(n,s,function(a){const i={mechanism:{data:{function:s,handler:Q(a)},handled:!1,type:"instrument"}},o=Tr(a);return o&&(i.mechanism.data.handler=Q(o)),Fe(a,i)})}),e.apply(this,t)}}function ru(e,t){const r=T[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&($(r,"addEventListener",function(s){return function(a,i,o){try{su(i)&&(i.handleEvent=Fe(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Q(i),target:e},handled:!1,type:"instrument"}}))}catch{}return t.unregisterOriginalCallbacks&&au(this,a,i),s.apply(this,[a,Fe(i,{mechanism:{data:{function:"addEventListener",handler:Q(i),target:e},handled:!1,type:"instrument"}}),o])}}),$(r,"removeEventListener",function(s){return function(a,i,o){try{const c=i.__sentry_wrapped__;c&&s.call(this,a,c,o)}catch{}return s.call(this,a,i,o)}}))}function su(e){return typeof e.handleEvent=="function"}function au(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const iu=()=>({name:"BrowserSession",setupOnce(){if(typeof T.document>"u"){W&&m.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}An({ignoreDuration:!0}),Nn(),gn(({from:e,to:t})=>{e!==void 0&&e!==t&&(An({ignoreDuration:!0}),Nn())})}}),ou="GlobalHandlers",cu=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:ou,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(du(n),sr("onerror")),t.onunhandledrejection&&(lu(n),sr("onunhandledrejection"))}}}),uu=cu;function du(e){Ar(t=>{const{stackParser:n,attachStacktrace:r}=_s();if(R()!==e||kr())return;const{msg:s,url:a,line:i,column:o,error:c}=t,u=mu(pn(n,c||s,void 0,r,!1),a,i,o);u.level="error",wr(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}function lu(e){Nr(t=>{const{stackParser:n,attachStacktrace:r}=_s();if(R()!==e||kr())return;const s=fu(t),a=xe(s)?pu(s):pn(n,s,void 0,r,!0);a.level="error",wr(a,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function fu(e){if(xe(e))return e;try{if("reason"in e)return e.reason;if("detail"in e&&"reason"in e.detail)return e.detail.reason}catch{}return e}function pu(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function mu(e,t,n,r){const s=e.exception=e.exception||{},a=s.values=s.values||[],i=a[0]=a[0]||{},o=i.stacktrace=i.stacktrace||{},c=o.frames=o.frames||[],u=r,d=n,l=Pe(t)&&t.length>0?t:Tt();return c.length===0&&c.push({colno:u,filename:l,function:Se,in_app:!0,lineno:d}),e}function sr(e){W&&m.log(`Global Handler attached: ${e}`)}function _s(){return R()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const hu=()=>({name:"HttpContext",preprocessEvent(e){if(!T.navigator&&!T.location&&!T.document)return;const t=cn(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),gu="cause",_u=5,Su="LinkedErrors",Eu=((e={})=>{const t=e.limit||_u,n=e.key||gu;return{name:Su,preprocessEvent(r,s,a){const i=a.getOptions();Ei(ln,i.stackParser,n,t,r,s)}}}),Tu=Eu;function yu(){return bu()?(W&&an(()=>{console.error("[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}),!0):!1}function bu(){if(typeof T.window>"u")return!1;const e=T;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=Tt(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(T===T.top&&r.some(a=>n.startsWith(`${a}://`)))}
19function vu(e){return[li(),oi(),eu(),Wc(),uu(),Tu(),Ri(),hu(),iu()]}function Iu(e={}){const t=!e.skipBrowserExtensionCheck&&yu(),n={...e,enabled:t?!1:e.enabled,stackParser:Xs(e.stackParser||Uc),integrations:xa({integrations:e.integrations,defaultIntegrations:e.defaultIntegrations==null?vu():e.defaultIntegrations}),transport:e.transport||kc};return Ga(ao,n)}function j(e=0){return((D()||performance.timeOrigin)+e)/1e3}function Ru(e){const t=[];if(e.nextHopProtocol!=null){const{name:n,version:r}=fs(e.nextHopProtocol);t.push(["network.protocol.version",r],["network.protocol.name",n])}return D()?[...t,["http.request.redirect_start",j(e.redirectStart)],["http.request.fetch_start",j(e.fetchStart)],["http.request.domain_lookup_start",j(e.domainLookupStart)],["http.request.domain_lookup_end",j(e.domainLookupEnd)],["http.request.connect_start",j(e.connectStart)],["http.request.secure_connection_start",j(e.secureConnectionStart)],["http.request.connection_end",j(e.connectEnd)],["http.request.request_start",j(e.requestStart)],["http.request.response_start",j(e.responseStart)],["http.request.response_end",j(e.responseEnd)]]:t}const ar=new WeakMap,Ut=new Map,Ss={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function wu(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:a,enableHTTPTimings:i,tracePropagationTargets:o,onRequestSpanStart:c}={...Ss,...t},u=typeof a=="function"?a:f=>!0,d=f=>Au(f,o),l={};n&&(e.addEventProcessor(f=>(f.type==="transaction"&&f.spans&&f.spans.forEach(p=>{if(p.op==="http.client"){const S=Ut.get(p.span_id);S&&(p.timestamp=S/1e3,Ut.delete(p.span_id))}}),f)),s&&Bi(f=>{if(f.response){const p=ar.get(f.response);p&&f.endTimestamp&&Ut.set(p,f.endTimestamp)}}),Jr(f=>{const p=Li(f,u,d,l);if(f.response&&f.fetchData.__span&&ar.set(f.response,f.fetchData.__span),p){const S=Es(f.fetchData.url),_=S?ce(S).host:void 0;p.setAttributes({"http.url":S,"server.address":_}),i&&ir(p),c?.(p,{headers:f.headers})}})),r&&hs(f=>{const p=Nu(f,u,d,l);if(p){i&&ir(p);let S;try{S=new Headers(f.xhr.__sentry_xhr_v3__?.request_headers)}catch{}c?.(p,{headers:S})}})}function ku(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function ir(e){const{url:t}=v(e).data;if(!t||typeof t!="string")return;const n=Ee("resource",({entries:r})=>{r.forEach(s=>{ku(s)&&s.name.endsWith(t)&&(Ru(s).forEach(i=>e.setAttribute(...i)),setTimeout(n))})})}function Au(e,t){const n=Tt();if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const a=r.origin===s;return t?Z(r.toString(),t)||a&&Z(r.pathname,t):a}else{const r=!!e.match(/^\/(?!\/)/);return t?Z(e,t):r}}function Nu(e,t,n,r){const s=e.xhr,a=s?.[ge];if(!s||s.__sentry_own_request__||!a)return;const{url:i,method:o}=a,c=de()&&t(i);if(e.endTimestamp&&c){const _=s.__sentry_xhr_span_id__;if(!_)return;const H=r[_];H&&a.status_code!==void 0&&(yr(H,a.status_code),H.end(),delete r[_]);return}const u=Es(i),d=ce(u||i),l=Pi(i),f=!!B(),p=c&&f?be({name:`${o} ${l}`,attributes:{url:i,type:"xhr","http.method":o,"http.url":u,"server.address":d?.host,[k]:"auto.http.browser",[ee]:"http.client",...d?.search&&{"http.query":d?.search},...d?.hash&&{"http.fragment":d?.hash}}}):new te;s.__sentry_xhr_span_id__=p.spanContext().spanId,r[s.__sentry_xhr_span_id__]=p,n(i)&&Cu(s,de()&&f?p:void 0);const S=R();return S&&S.emit("beforeOutgoingRequestSpan",p,e),p}function Cu(e,t){const{"sentry-trace":n,baggage:r}=jr({span:t});n&&Pu(e,n,r)}function Pu(e,t,n){const r=e.__sentry_xhr_v3__?.request_headers;if(!r?.["sentry-trace"])try{if(e.setRequestHeader("sentry-trace",t),n){const s=r?.baggage;(!s||!Lu(s))&&e.setRequestHeader("baggage",n)}}catch{}}function Lu(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function Es(e){try{return new URL(e,T.location.origin).href}catch{return}}function Ou(){T.document?T.document.addEventListener("visibilitychange",()=>{const e=B();if(!e)return;const t=U(e);if(T.document.hidden&&t){const n="cancelled",{op:r,status:s}=v(t);W&&m.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:_e,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):W&&m.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const xu=3600,Ts="sentry_previous_trace",Fu="sentry.previous_trace";function Mu(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let s=r?$u():void 0;e.on("spanStart",i=>{if(U(i)!==i)return;const o=w().getPropagationContext();s=Du(s,i,o),r&&Hu(s)});let a=!0;n&&e.on("beforeSampling",i=>{if(!s)return;const o=w(),c=o.getPropagationContext();if(a&&c.parentSpanId){a=!1;return}o.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(s.sampleRate),sampled:String(tn(s.spanContext))},sampleRand:s.sampleRand}),i.parentSampled=tn(s.spanContext),i.parentSampleRate=s.sampleRate,i.spanAttributes={...i.spanAttributes,[Js]:s.sampleRate}})}function Du(e,t,n){const r=v(t);function s(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[gr])}catch{return 0}}const a={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!e)return a;const i=e.spanContext;return i.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=xu&&(W&&m.log(`Adding previous_trace ${i} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:i,attributes:{[Ks]:"previous_trace"}}),t.setAttribute(Fu,`${i.traceId}-${i.spanId}-${tn(i)?1:0}`)),a)}function Hu(e){try{T.sessionStorage.setItem(Ts,JSON.stringify(e))}catch(t){W&&m.warn("Could not store previous trace in sessionStorage",t)}}function $u(){try{const e=T.sessionStorage?.getItem(Ts);return JSON.parse(e)}catch{return}}function tn(e){return e.traceFlags===1}const Uu="BrowserTracing",Bu={...et,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroun
19dSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...Ss},qu=((e={})=>{const t={name:void 0,source:void 0},n=T.document,{enableInp:r,enableElementTiming:s,enableLongTask:a,enableLongAnimationFrame:i,_experiments:{enableInteractions:o,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:d,idleTimeout:l,finalTimeout:f,childSpanTimeout:p,markBackgroundSpan:S,traceFetch:_,traceXHR:H,trackFetchStreamPerformance:G,shouldCreateSpanForRequest:se,enableHTTPTimings:kt,ignoreResourceSpans:At,ignorePerformanceApiSpans:je,instrumentPageLoad:E,instrumentNavigation:L,detectRedirects:me,linkPreviousTrace:ke,consistentTraceSampling:he,onRequestSpanStart:ae}={...Bu,...e};let A,ie;function X(b,N,y=!0){const C=N.op==="pageload",O=d?d(N):N,J=O.attributes||{};if(N.name!==O.name&&(J[V]="custom",O.attributes=J),!y){const Ne=Et();be({...O,startTime:Ne}).end(Ne);return}t.name=O.name,t.source=J[V];const K=Fr(O,{idleTimeout:l,finalTimeout:f,childSpanTimeout:p,disableAutoFinish:C,beforeSpanEnd:Ne=>{A?.(),Qo(Ne,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:At,ignorePerformanceApiSpans:je}),cr(b,void 0);const _n=w(),bs=_n.getPropagationContext();_n.setPropagationContext({...bs,traceId:K.spanContext().traceId,sampled:gt(K),dsc:ue(Ne)})}});cr(b,K);function Ae(){n&&["interactive","complete"].includes(n.readyState)&&b.emit("idleSpanEnableAutoFinish",K)}C&&n&&(n.addEventListener("readystatechange",()=>{Ae()}),Ae())}return{name:Uu,setup(b){if(aa(),A=Go({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:b}),r&&vc(),s&&uc(),i&&x.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?zo():a&&Vo(),o&&Yo(),me&&n){const y=()=>{ie=M()};addEventListener("click",y,{capture:!0}),addEventListener("keydown",y,{capture:!0,passive:!0})}function N(){const y=De(b);y&&!v(y).timestamp&&(W&&m.log(`[Tracing] Finishing current active span with op: ${v(y).op}`),y.setAttribute(at,"cancelled"),y.end())}b.on("startNavigationSpan",(y,C)=>{if(R()!==b)return;if(C?.isRedirect){W&&m.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),X(b,{op:"navigation.redirect",...y},!1);return}N(),St().setPropagationContext({traceId:st(),sampleRand:Math.random()});const O=w();O.setPropagationContext({traceId:st(),sampleRand:Math.random()}),O.setSDKProcessingMetadata({normalizedRequest:void 0}),X(b,{op:"navigation",...y})}),b.on("startPageLoadSpan",(y,C={})=>{if(R()!==b)return;N();const O=C.sentryTrace||or("sentry-trace"),J=C.baggage||or("baggage"),K=Zs(O,J),Ae=w();Ae.setPropagationContext(K),Ae.setSDKProcessingMetadata({normalizedRequest:cn()}),X(b,{op:"pageload",...y})})},afterAllSetup(b){let N=Tt();if(ke!=="off"&&Mu(b,{linkPreviousTrace:ke,consistentTraceSampling:he}),T.location){if(E){const y=D();Wu(b,{name:T.location.pathname,startTime:y?y/1e3:void 0,attributes:{[V]:"url",[k]:"auto.pageload.browser"}})}L&&gn(({to:y,from:C})=>{if(C===void 0&&N?.indexOf(y)!==-1){N=void 0;return}N=void 0;const O=Yr(y),J=De(b),K=J&&me&&Vu(J,ie);ju(b,{name:O?.pathname||T.location.pathname,attributes:{[V]:"url",[k]:"auto.navigation.browser"}},{url:y,isRedirect:K})})}S&&Ou(),o&&Gu(b,l,f,p,t),r&&wc(),wu(b,{traceFetch:_,traceXHR:H,trackFetchStreamPerformance:G,tracePropagationTargets:b.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:se,enableHTTPTimings:kt,onRequestSpanStart:ae})}}});function Wu(e,t,n){e.emit("startPageLoadSpan",t,n),w().setTransactionName(t.name);const r=De(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function ju(e,t,n){const{url:r,isRedirect:s}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:s}),e.emit("startNavigationSpan",t,{isRedirect:s});const a=w();return a.setTransactionName(t.name),r&&!s&&a.setSDKProcessingMetadata({normalizedRequest:{...cn(),url:r}}),De(e)}function or(e){return T.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}
19function Gu(e,t,n,r,s){const a=T.document;let i;const o=()=>{const c="ui.action.click",u=De(e);if(u){const d=v(u).op;if(["navigation","pageload"].includes(d)){W&&m.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(i&&(i.setAttribute(at,"interactionInterrupted"),i.end(),i=void 0),!s.name){W&&m.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}i=Fr({name:s.name,op:c,attributes:{[V]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};a&&addEventListener("click",o,{capture:!0})}const ys="_sentry_idleSpan";function De(e){return e[ys]}function cr(e,t){ct(e,ys,t)}const ur=.3;function Vu(e,t){const n=v(e),r=Et(),s=n.start_timestamp;return!(r-s>ur||t&&r-t<=ur)}function zu(e){const t={...e};return Wr(t,"react"),Qs("react",{version:ta.version}),Iu(t)}function Bt(e){try{return ea(e)}catch{return null}}function ed(e){e.dsn&&e.environment!=="development"&&zu({dsn:e.dsn,environment:e.environment,release:e.release||void 0,integrations:[qu()],tracesSampleRate:e.environment==="production"?.1:1,ignoreErrors:[/window\.webkit\.messageHandlers/,/Could not compile (fragment|vertex) shader/,/Error invoking postMessage: Java /,/Object Not Found Matching Id:\d+, MethodName:\w+, ParamCount:\d+/],initialScope:{tags:{app:e.app}}
19,beforeSend(t){const n=Bt(t);return n?(n.request?.cookies&&delete n.request.cookies,n):null},beforeSendTransaction:t=>Bt(t),beforeBreadcrumb:t=>Bt(t)})}export{rd as ErrorBoundary,Xu as captureError,ed as initBrowserSentry,ad as initChunkErrorRecovery,id as initTranslationSafety};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.