(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"529ca88e6fb77ef939b82f3f435f6458b92e7f56"}}catch{}})();try{(function(){var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e99db90b-f96c-466e-90d1-bf89bc7697b9",e._sentryDebugIdIdentifier="sentry-dbid-e99db90b-f96c-466e-90d1-bf89bc7697b9")})()}catch{}const h=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,T=globalThis,Re="10.28.0";function Le(){return Kt(T),T}function Kt(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Re,t[Re]=t[Re]||{}}function Ve(e,t,n=T){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[Re]=r[Re]||{};return s[e]||(s[e]=t())}const ro=["debug","info","warn","error","log","assert","trace"],so="Sentry Logger ",jt={};function Ye(e){if(!("console"in T))return e();const t=T.console,n={},r=Object.keys(jt);r.forEach(s=>{const i=jt[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function io(){Wn().enabled=!0}function oo(){Wn().enabled=!1}function Es(){return Wn().enabled}function ao(...e){qn("log",...e)}function co(...e){qn("warn",...e)}function uo(...e){qn("error",...e)}function qn(e,...t){h&&Es()&&Ye(()=>{T.console[e](`${so}[${e}]:`,...t)})}function Wn(){return h?Ve("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const g={enable:io,disable:oo,isEnabled:Es,log:ao,warn:co,error:uo},bs=50,Ce="?",_r=/\(error: (.*)\)/,Sr=/captureMessage|captureException/;function Ts(...e){const t=e.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&&(c=c.slice(0,1024));const u=_r.test(c)?c.replace(_r,"$1"):c;if(!u.match(/\S*Error: /)){for(const d of t){const f=d(u);if(f){i.push(f);break}}if(i.length>=bs+s)break}}return lo(i.slice(s))}}function fo(e){return Array.isArray(e)?Ts(...e):e}function lo(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(wt(t).function||"")&&t.pop(),t.reverse(),Sr.test(wt(t).function||"")&&(t.pop(),Sr.test(wt(t).function||"")&&t.pop()),t.slice(0,bs).map(n=>({...n,filename:n.filename||wt(t).filename,function:n.function||Ce}))}function wt(e){return e[e.length-1]||{}}const an="";function ae(e){try{return!e||typeof e!="function"?an:e.name||an}catch{return an}}function yr(e){const t=e.exception;if(t){const n=[];try{return t.values.forEach(r=>{r.stacktrace.frames&&n.push(...r.stacktrace.frames)}),n}catch{return}}}function Is(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}const Ot={},Er={};function Se(e,t){Ot[e]=Ot[e]||[],Ot[e].push(t)}function ye(e,t){if(!Er[e]){Er[e]=!0;try{t()}catch(n){h&&g.error(`Error while instrumenting ${e}`,n)}}}function z(e,t){const n=e&&Ot[e];if(n)for(const r of n)try{r(t)}catch(s){h&&g.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${ae(r)} Error:`,s)}}let cn=null;function vs(e){const t="error";Se(t,e),ye(t,po)}function po(){cn=T.onerror,T.onerror=function(e,t,n,r,s){return z("error",{column:r,error:s,line:n,msg:e,url:t}),cn?cn.apply(this,arguments):!1},T.onerror.__SENTRY_INSTRUMENTED__=!0}let un=null;function Rs(e){const t="unhandledrejection";Se(t,e),ye(t,mo)}function mo(){un=T.onunhandledrejection,T.onunhandledrejection=function(e){return z("unhandledrejection",e),un?un.apply(this,arguments):!0},T.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const ws=Object.prototype.toString;function Gn(e){switch(ws.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return ce(e,Error)}}function Xe(e,t){return ws.call(e)===`[object ${t}]`}function As(e){return Xe(e,"ErrorEvent")}function br(e){return Xe(e,"DOMError")}function go(e){return Xe(e,"DOMException")}function ie(e){return Xe(e,"String")}function zn(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function Ue(e){return e===null||zn(e)||typeof e!="object"&&typeof e!="function"}function ot(e){return Xe(e,"Object")}function Zt(e){return typeof Event<"u"&&ce(e,Event)}function ho(e){return typeof Element<"u"&&ce(e,Element)}function _o(e){return Xe(e,"RegExp")}function Je(e){return!!(e?.then&&typeof e.then=="function")}function So(e){return ot(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function ce(e,t){try{return e instanceof t}catch{return!1}}function Ns(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}function ks(e){return typeof Request<"u"&&ce(e,Request)}const Vn=T,yo=80;function Y(e,t={}){if(!e)return"";try{let n=e;const r=5,s=[];let i=0,o=0;const a=" > ",c=a.length;let u;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||yo;for(;n&&i++1&&o+s.length*c+u.length>=f));)s.push(u),o+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return""}}function Eo(e,t){const n=e,r=[];if(!n?.tagName)return"";if(Vn.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const s=t?.length?t.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&&ie(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 lt(){try{return Vn.document.location.href}catch{return""}}function Cs(e){if(!Vn.HTMLElement)return null;let t=e;const n=5;for(let r=0;r"}}function Ir(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function bo(e){const t=Object.keys(Ls(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}function bn(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function vr(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;rxt(e,r,n))}function To(){const e=T;return e.crypto||e.msCrypto}let dn;function Io(){return Math.random()*16}function V(e=To()){try{if(e?.randomUUID)return e.randomUUID().replace(/-/g,"")}catch{}return dn||(dn="10000000100040008000"+1e11),dn.replace(/[018]/g,t=>(t^(Io()&15)>>t/4).toString(16))}function Os(e){return e.exception?.values?.[0]}function ve(e){const{message:t,event_id:n}=e;if(t)return t;const r=Os(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function Tn(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=t||""),i.type||(i.type="Error")}function Be(e,t){const n=Os(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const i={...s?.data,...t.data};n.mechanism.data=i}}function Rr(e){if(vo(e))return!0;try{q(e,"__sentry_captured__",!0)}catch{}return!1}function vo(e){try{return e.__sentry_captured__}catch{}}const xs=1e3;function Oe(){return Date.now()/xs}function Ro(){const{performance:e}=T;if(!e?.now||!e.timeOrigin)return Oe;const t=e.timeOrigin;return()=>(t+e.now())/xs}let wr;function L(){return(wr??(wr=Ro()))()}let fn;function wo(){const{performance:e}=T;if(!e?.now)return[void 0,"none"];const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=sko(n)};return e&&je(n,e),n}function je(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||L(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:V()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function No(e,t){let n={};e.status==="ok"&&(n={status:"exited"}),je(e,n)}function ko(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function pt(e,t,n=2){if(!t||typeof t!="object"||n<=0)return t;if(e&&Object.keys(t).length===0)return e;const r={...e};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=pt(r[s],t[s],n-1));return r}function ue(){return V()}function oe(){return V().substring(16)}const In="_sentrySpan";function qe(e,t){t?q(e,In,t):delete e[In]}function qt(e){return e[In]}const Co=100;class de{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:ue(),sampleRand:Math.random()}}clone(){const t=new de;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,qe(t,qt(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&je(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;const n=typeof t=="function"?t(this):t,r=n instanceof de?n.getScopeData():ot(n)?t:void 0,{tags:s,attributes:i,extra:o,user:a,contexts:c,level:u,fingerprint:d=[],propagationContext:f}=r||{};return this._tags={...this._tags,...s},this._attributes={...this._attributes,...i},this._extra={...this._extra,...o},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),d.length&&(this._fingerprint=d),f&&(this._propagationContext=f),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,qe(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ue(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Co;if(r<=0)return this;const s={timestamp:Oe(),...t,message:t.message?bn(t.message,2048):t.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(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:qt(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=pt(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n?.event_id||V();if(!this._client)return h&&g.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=r?.event_id||V();if(!this._client)return h&&g.warn("No client configured on scope - will not capture message!"),s;const i=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s},this),s}captureEvent(t,n){const r=n?.event_id||V();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(h&&g.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function Po(){return Ve("defaultCurrentScope",()=>new de)}function Lo(){return Ve("defaultIsolationScope",()=>new de)}class Oo{constructor(t,n){let r;t?r=t:r=new de;let s;n?s=n:s=new de,this._stack=[{scope:r}],this._isolationScope=s}withScope(t){const n=this._pushScope();let r;try{r=t(n)}catch(s){throw this._popScope(),s}return Je(r)?r.then(s=>(this._popScope(),s),s=>{throw this._popScope(),s}):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}}function We(){const e=Le(),t=Kt(e);return t.stack=t.stack||new Oo(Po(),Lo())}function xo(e){return We().withScope(e)}function Mo(e,t){const n=We();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Ar(e){return We().withScope(()=>e(We().getIsolationScope()))}function Do(){return{withIsolationScope:Ar,withScope:xo,withSetScope:Mo,withSetIsolationScope:(e,t)=>Ar(t),getCurrentScope:()=>We().getScope(),getIsolationScope:()=>We().getIsolationScope()}}function Ke(e){const t=Kt(e);return t.acs?t.acs:Do()}function A(){const e=Le();return Ke(e).getCurrentScope()}function xe(){const e=Le();return Ke(e).getIsolationScope()}function $o(){return Ve("globalScope",()=>new de)}function Qt(...e){const t=Le(),n=Ke(t);if(e.length===2){const[r,s]=e;return r?n.withSetScope(r,s):n.withScope(s)}return n.withScope(e[0])}function w(){return A().getClient()}function Fo(e){const t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=t,i={trace_id:n,span_id:s||oe()};return r&&(i.parent_span_id=r),i}const Z="sentry.source",Xn="sentry.sample_rate",Ms="sentry.previous_trace_sample_rate",fe="sentry.op",k="sentry.origin",at="sentry.idle_span_finish_reason",mt="sentry.measurement_unit",gt="sentry.measurement_value",Nr="sentry.custom_span_name",Jn="sentry.profile_id",Ze="sentry.exclusive_time",Ho="sentry.link.type",Uo=0,Kn=1,C=2;function Bo(e){if(e<400&&e>=100)return{code:Kn};if(e>=400&&e<500)switch(e){case 401:return{code:C,message:"unauthenticated"};case 403:return{code:C,message:"permission_denied"};case 404:return{code:C,message:"not_found"};case 409:return{code:C,message:"already_exists"};case 413:return{code:C,message:"failed_precondition"};case 429:return{code:C,message:"resource_exhausted"};case 499:return{code:C,message:"cancelled"};default:return{code:C,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:C,message:"unimplemented"};case 503:return{code:C,message:"unavailable"};case 504:return{code:C,message:"deadline_exceeded"};default:return{code:C,message:"internal_error"}}return{code:C,message:"internal_error"}}function Ds(e,t){e.setAttribute("http.response.status_code",t);const n=Bo(t);n.message!=="unknown_error"&&e.setStatus(n)}const $s="_sentryScope",Fs="_sentryIsolationScope";function jo(e){try{const t=T.WeakRef;if(typeof t=="function")return new t(e)}catch{}return e}function qo(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function Wo(e,t,n){e&&(q(e,Fs,jo(n)),q(e,$s,t))}function Wt(e){const t=e;return{scope:t[$s],isolationScope:qo(t[Fs])}}const Zn="sentry-",Go=/^sentry-/,zo=8192;function Hs(e){const t=Yo(e);if(!t)return;const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(Go)){const o=s.slice(Zn.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function Vo(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${Zn}${r}`]=s),n),{});return Xo(t)}function Yo(e){if(!(!e||!ie(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{const r=kr(n);return Object.entries(r).forEach(([s,i])=>{t[s]=i}),t},{}):kr(e)}function kr(e){return e.split(",").map(t=>{const n=t.indexOf("=");if(n===-1)return[];const r=t.slice(0,n),s=t.slice(n+1);return[r,s].map(i=>{try{return decodeURIComponent(i.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}function Xo(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=s===0?i:`${t},${i}`;return o.length>zo?(h&&g.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):o},"")}const Jo=/^o(\d+)\./,Ko=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function Zo(e){return e==="http"||e==="https"}function Qe(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function Qo(e){const t=Ko.exec(e);if(!t){Ye(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i="",o="",a=""]=t.slice(1);let c="",u=a;const d=u.split("/");if(d.length>1&&(c=d.slice(0,-1).join("/"),u=d.pop()),u){const f=u.match(/^\d+/);f&&(u=f[0])}return Us({host:i,pass:s,path:c,projectId:u,port:o,protocol:n,publicKey:r})}function Us(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function ea(e){if(!h)return!0;const{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(o=>e[o]?!1:(g.error(`Invalid Sentry Dsn: ${o} missing`),!0))?!1:n.match(/^\d+$/)?Zo(r)?t&&isNaN(parseInt(t,10))?(g.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(g.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(g.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function ta(e){return e.match(Jo)?.[1]}function na(e){const t=e.getOptions(),{host:n}=e.getDsn()||{};let r;return t.orgId?r=String(t.orgId):n&&(r=ta(n)),r}function ra(e){const t=typeof e=="string"?Qo(e):Us(e);if(!(!t||!ea(t)))return t}function ct(e){if(typeof e=="boolean")return Number(e);const t=typeof e=="string"?parseFloat(e):e;if(!(typeof t!="number"||isNaN(t)||t<0||t>1))return t}const Bs=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function sa(e){if(!e)return;const t=e.match(Bs);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function ia(e,t){const n=sa(e),r=Hs(t);if(!n?.traceId)return{traceId:ue(),sampleRand:Math.random()};const s=oa(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 js(e=ue(),t=oe(),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function qs(e=ue(),t=oe(),n){return`00-${e}-${t}-${n?"01":"00"}`}function oa(e,t){const n=ct(t?.sample_rand);if(n!==void 0)return n;const r=ct(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}const Ws=0,Qn=1;let Cr=!1;function aa(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,origin:a,links:c}=v(e);return{parent_span_id:i,span_id:t,trace_id:n,data:r,op:s,status:o,origin:a,links:c}}function ca(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),s=r?t:v(e).parent_span_id,i=Wt(e).scope,o=r?i?.getPropagationContext().propagationSpanId||oe():t;return{parent_span_id:s,span_id:o,trace_id:n}}function ua(e){const{traceId:t,spanId:n}=e.spanContext(),r=Ee(e);return js(t,n,r)}function da(e){const{traceId:t,spanId:n}=e.spanContext(),r=Ee(e);return qs(t,n,r)}function Gs(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...s},attributes:i})=>({span_id:t,trace_id:n,sampled:r===Qn,attributes:i,...s}))}function we(e){return typeof e=="number"?Pr(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Pr(e.getTime()):L()}function Pr(e){return e>9999999999?e/1e3:e}function v(e){if(la(e))return e.getSpanJSON();const{spanId:t,traceId:n}=e.spanContext();if(fa(e)){const{attributes:r,startTime:s,name:i,endTime:o,status:a,links:c}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:i,parent_span_id:u,start_timestamp:we(s),timestamp:we(o)||void 0,status:zs(a),op:r[fe],origin:r[k],links:Gs(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function fa(e){const t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function la(e){return typeof e.getSpanJSON=="function"}function Ee(e){const{traceFlags:t}=e.spanContext();return t===Qn}function zs(e){if(!(!e||e.code===Uo))return e.code===Kn?"ok":e.message||"internal_error"}const Ae="_sentryChildSpans",vn="_sentryRootSpan";function Vs(e,t){const n=e[vn]||e;q(t,vn,n),e[Ae]?e[Ae].add(t):q(e,Ae,new Set([t]))}function pa(e,t){e[Ae]&&e[Ae].delete(t)}function Mt(e){const t=new Set;function n(r){if(!t.has(r)&&Ee(r)){t.add(r);const s=r[Ae]?Array.from(r[Ae]):[];for(const i of s)n(i)}}return n(e),Array.from(t)}function D(e){return e[vn]||e}function W(){const e=Le(),t=Ke(e);return t.getActiveSpan?t.getActiveSpan():qt(A())}function Rn(){Cr||(Ye(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Cr=!0)}let Lr=!1;function ma(){if(Lr)return;function e(){const t=W(),n=t&&D(t);if(n){const r="internal_error";h&&g.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:C,message:r})}}e.tag="sentry_tracingErrorCallback",Lr=!0,vs(e),Rs(e)}function Q(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=e||w()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Or(e){g.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Gt(e,t){if(!t?.length||!e.description)return!1;for(const n of t){if(ha(n)){if(xt(e.description,n))return h&&Or(e),!0;continue}if(!n.name&&!n.op)continue;const r=n.name?xt(e.description,n.name):!0,s=n.op?e.op&&xt(e.op,n.op):!0;if(r&&s)return h&&Or(e),!0}return!1}function ga(e,t){const n=t.parent_span_id,r=t.span_id;if(n)for(const s of e)s.parent_span_id===r&&(s.parent_span_id=n)}function ha(e){return typeof e=="string"||e instanceof RegExp}const er="production",Ys="_frozenDsc";function Dt(e,t){q(e,Ys,t)}function Xs(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},s={environment:n.environment||er,release:n.release,public_key:r,trace_id:e,org_id:na(t)};return t.emit("createDsc",s),s}function Js(e,t){const n=t.getPropagationContext();return n.dsc||Xs(n.traceId,e)}function ge(e){const t=w();if(!t)return{};const n=D(e),r=v(n),s=r.data,i=n.spanContext().traceState,o=i?.get("sentry.sample_rate")??s[Xn]??s[Ms];function a(m){return(typeof o=="number"||typeof o=="string")&&(m.sample_rate=`${o}`),m}const c=n[Ys];if(c)return a(c);const u=i?.get("sentry.dsc"),d=u&&Hs(u);if(d)return a(d);const f=Xs(e.spanContext().traceId,t),p=s[Z],l=r.description;return p!=="url"&&l&&(f.transaction=l),Q()&&(f.sampled=String(Ee(n)),f.sample_rand=i?.get("sentry.sample_rand")??Wt(n).scope?.getPropagationContext().sampleRand.toString()),a(f),t.emit("createDsc",f,n),f}class he{constructor(t={}){this._traceId=t.traceId||ue(),this._spanId=t.spanId||oe()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:Ws}}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 se(e,t=100,n=1/0){try{return wn("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Ks(e,t=3,n=100*1024){const r=se(e,t);return Ea(r)>n?Ks(e,t-1,n):r}function wn(e,t,n=1/0,r=1/0,s=ba()){const[i,o]=s;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;const a=_a(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";const u=t;if(u&&typeof u.toJSON=="function")try{const l=u.toJSON();return wn("",l,c-1,r,s)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const p=Ls(t);for(const l in p){if(!Object.prototype.hasOwnProperty.call(p,l))continue;if(f>=r){d[l]="[MaxProperties ~]";break}const m=p[l];d[l]=wn(l,m,c-1,r,s),f++}return o(t),d}function _a(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Ns(t))return Is(t);if(So(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${ae(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=Sa(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Sa(e){const t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function ya(e){return~-encodeURI(e).split(/%..|./).length}function Ea(e){return ya(JSON.stringify(e))}function ba(){const e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function Me(e,t=[]){return[e,t]}function Ta(e,t){const[n,r]=e;return[n,[...r,t]]}function xr(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 An(e){const t=Kt(T);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Ia(e){const[t,n]=e;let r=JSON.stringify(t);function s(i){typeof r=="string"?r=typeof i=="string"?r+i:[An(r),i]:r.push(typeof i=="string"?An(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(se(a))}s(c)}}return typeof r=="string"?r:va(r)}function va(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function Ra(e){return[{type:"span"},e]}function wa(e){const t=typeof e.data=="string"?An(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}const Aa={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",metric:"metric",trace_metric:"metric"};function Mr(e){return Aa[e]}function Zs(e){if(!e?.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Na(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:Qe(r)},...s&&{trace:s}}}function ka(e,t){if(!t)return e;const n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function Ca(e,t,n,r){const s=Zs(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:Qe(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Me(i,[o])}function Pa(e,t,n,r){const s=Zs(n),i=e.type&&e.type!=="replay_event"?e.type:"event";ka(e,n?.sdk);const o=Na(e,s,r,t);return delete e.sdkProcessingMetadata,Me(o,[[{type:i},e]])}function La(e,t){function n(l){return!!l.trace_id&&!!l.public_key}const r=ge(e[0]),s=t?.getDsn(),i=t?.getOptions().tunnel,o={sent_at:new Date().toISOString(),...n(r)&&{trace:r},...!!i&&s&&{dsn:Qe(s)}},{beforeSendSpan:a,ignoreSpans:c}=t?.getOptions()||{},u=c?.length?e.filter(l=>!Gt(v(l),c)):e,d=e.length-u.length;d&&t?.recordDroppedEvent("before_send","span",d);const f=a?l=>{const m=v(l),y=a(m);return y||(Rn(),m)}:v,p=[];for(const l of u){const m=f(l);m&&p.push(Ra(m))}return Me(o,p)}function Oa(e){if(!h)return;const{description:t="< unknown name >",op:n="< unknown op >",parent_span_id:r}=v(e),{spanId:s}=e.spanContext(),i=Ee(e),o=D(e),a=o===e,c=`[Tracing] Starting ${i?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${t}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}`),!a){const{op:d,description:f}=v(o);u.push(`root ID: ${o.spanContext().spanId}`),d&&u.push(`root op: ${d}`),f&&u.push(`root description: ${f}`)}g.log(`${c} ${u.join(` `)}`)}function xa(e){if(!h)return;const{description:t="< unknown name >",op:n="< unknown op >"}=v(e),{spanId:r}=e.spanContext(),i=D(e)===e,o=`[Tracing] Finishing "${n}" ${i?"root ":""}span "${t}" with ID ${r}`;g.log(o)}function Ma(e,t,n,r=W()){const s=r&&D(r);s&&(h&&g.log(`[Measurement] Setting measurement on root span: ${e} = ${t} ${n}`),s.addEvent(e,{[gt]:t,[mt]:n}))}function Dr(e){if(!e||e.length===0)return;const t={};return e.forEach(n=>{const r=n.attributes||{},s=r[mt],i=r[gt];typeof s=="string"&&typeof i=="number"&&(t[n.name]={value:i,unit:s})}),t}const $r=1e3;class en{constructor(t={}){this._traceId=t.traceId||ue(),this._spanId=t.spanId||oe(),this._startTime=t.startTimestamp||L(),this._links=t.links,this._attributes={},this.setAttributes({[k]:"manual",[fe]: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?Qn:Ws}}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=we(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(Z,"custom"),this}end(t){this._endTime||(this._endTime=we(t),xa(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[fe],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:zs(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[k],profile_id:this._attributes[Jn],exclusive_time:this._attributes[Ze],measurements:Dr(this._events),is_segment:this._isStandaloneSpan&&D(this)===this||void 0,segment_id:this._isStandaloneSpan?D(this).spanContext().spanId:void 0,links:Gs(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,n,r){h&&g.log("[Tracing] Adding an event to span:",t);const s=Fr(n)?n:r||L(),i=Fr(n)?{}:n||{},o={name:t,time:we(s),attributes:i};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=w();if(t&&t.emit("spanEnd",this),!(this._isStandaloneSpan||this===D(this)))return;if(this._isStandaloneSpan){this._sampled?$a(La([this],t)):(h&&g.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&&(Wt(this).scope||A()).captureEvent(r)}_convertSpanToTransaction(){if(!Hr(v(this)))return;this._name||(h&&g.warn("Transaction has no name, falling back to ``."),this._name="");const{scope:t,isolationScope:n}=Wt(this),r=t?.getScopeData().sdkProcessingMetadata?.normalizedRequest;if(this._sampled!==!0)return;const i=Mt(this).filter(d=>d!==this&&!Da(d)).map(d=>v(d)).filter(Hr),o=this._attributes[Z];delete this._attributes[Nr],i.forEach(d=>{delete d.data[Nr]});const a={contexts:{trace:aa(this)},spans:i.length>$r?i.sort((d,f)=>d.start_timestamp-f.start_timestamp).slice(0,$r):i,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:t,capturedSpanIsolationScope:n,dynamicSamplingContext:ge(this)},request:r,...o&&{transaction_info:{source:o}}},c=Dr(this._events);return c&&Object.keys(c).length&&(h&&g.log("[Measurements] Adding measurements to transaction event",JSON.stringify(c,void 0,2)),a.measurements=c),a}}function Fr(e){return e&&typeof e=="number"||e instanceof Date||Array.isArray(e)}function Hr(e){return!!e.start_timestamp&&!!e.timestamp&&!!e.span_id&&!!e.trace_id}function Da(e){return e instanceof en&&e.isStandaloneSpan()}function $a(e){const t=w();if(!t)return;const n=e[1];if(!n||n.length===0){t.recordDroppedEvent("before_send","span");return}t.sendEnvelope(e)}function Fa(e,t,n=()=>{},r=()=>{}){let s;try{s=e()}catch(i){throw t(i),n(),i}return Ha(s,t,n,r)}function Ha(e,t,n,r){return Je(e)?e.then(s=>(n(),r(s),s),s=>{throw t(s),n(),s}):(n(),r(e),e)}function Ua(e,t,n){if(!Q(e))return[!1];let r,s;typeof e.tracesSampler=="function"?(s=e.tracesSampler({...t,inheritOrSampleWith:a=>typeof t.parentSampleRate=="number"?t.parentSampleRate:typeof t.parentSampled=="boolean"?Number(t.parentSampled):a}),r=!0):t.parentSampled!==void 0?s=t.parentSampled:typeof e.tracesSampleRate<"u"&&(s=e.tracesSampleRate,r=!0);const i=ct(s);if(i===void 0)return h&&g.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!i)return h&&g.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,i,r];const o=nqa(i)(()=>{const u=A(),d=ni(u,i),p=e.onlyIfParent&&!d?new he:ei({parentSpan:d,spanArguments:r,forceTransaction:s,scope:u});return qe(u,p),Fa(()=>t(p),()=>{const{status:l}=v(p);p.isRecording()&&(!l||l==="ok")&&p.setStatus({code:C,message:"internal_error"})},()=>{p.end()})}))}function et(e){const t=nr();if(t.startInactiveSpan)return t.startInactiveSpan(e);const n=ti(e),{forceTransaction:r,parentSpan:s}=e;return(e.scope?o=>Qt(e.scope,o):s!==void 0?o=>tr(s,o):o=>o())(()=>{const o=A(),a=ni(o,s);return e.onlyIfParent&&!a?new he:ei({parentSpan:a,spanArguments:n,forceTransaction:r,scope:o})})}function tr(e,t){const n=nr();return n.withActiveSpan?n.withActiveSpan(e,t):Qt(r=>(qe(r,e||void 0),t(r)))}function ei({parentSpan:e,spanArguments:t,forceTransaction:n,scope:r}){if(!Q()){const o=new he;if(n||!e){const a={sampled:"false",sample_rate:"0",transaction:t.name,...ge(o)};Dt(o,a)}return o}const s=xe();let i;if(e&&!n)i=ja(e,r,t),Vs(e,i);else if(e){const o=ge(e),{traceId:a,spanId:c}=e.spanContext(),u=Ee(e);i=Ur({traceId:a,parentSpanId:c,...t},r,u),Dt(i,o)}else{const{traceId:o,dsc:a,parentSpanId:c,sampled:u}={...s.getPropagationContext(),...r.getPropagationContext()};i=Ur({traceId:o,parentSpanId:c,...t},r,u),a&&Dt(i,a)}return Oa(i),Wo(i,r,s),i}function ti(e){const n={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const r={...n};return r.startTimestamp=we(e.startTime),delete r.startTime,r}return n}function nr(){const e=Le();return Ke(e)}function Ur(e,t,n){const r=w(),s=r?.getOptions()||{},{name:i=""}=e,o={spanAttributes:{...e.attributes},spanName:i,parentSampled:n};r?.emit("beforeSampling",o,{decision:!1});const a=o.parentSampled??n,c=o.spanAttributes,u=t.getPropagationContext(),[d,f,p]=t.getScopeData().sdkProcessingMetadata[Qs]?[!1]:Ua(s,{name:i,parentSampled:a,attributes:c,parentSampleRate:ct(u.dsc?.sample_rate)},u.sampleRand),l=new en({...e,attributes:{[Z]:"custom",[Xn]:f!==void 0&&p?f:void 0,...c},sampled:d});return!d&&r&&(h&&g.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),r.recordDroppedEvent("sample_rate","transaction")),r&&r.emit("spanStart",l),l}function ja(e,t,n){const{spanId:r,traceId:s}=e.spanContext(),i=t.getScopeData().sdkProcessingMetadata[Qs]?!1:Ee(e),o=i?new en({...n,parentSpanId:r,traceId:s,sampled:i}):new he({traceId:s});Vs(e,o);const a=w();return a&&(a.emit("spanStart",o),n.endTimestamp&&a.emit("spanEnd",o)),o}function ni(e,t){if(t)return t;if(t===null)return;const n=qt(e);if(!n)return;const r=w();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?D(n):n}function qa(e){return e!==void 0?t=>tr(e,t):t=>t()}const $t={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3},Wa="heartbeatFailed",Ga="idleTimeout",za="finalTimeout",Va="externalFinish";function ri(e,t={}){const n=new Map;let r=!1,s,i=Va,o=!t.disableAutoFinish;const a=[],{idleTimeout:c=$t.idleTimeout,finalTimeout:u=$t.finalTimeout,childSpanTimeout:d=$t.childSpanTimeout,beforeSpanEnd:f,trimIdleSpanEndTimestamp:p=!0}=t,l=w();if(!l||!Q()){const I=new he,P={sample_rate:"0",sampled:"false",...ge(I)};return Dt(I,P),I}const m=A(),y=W(),_=Ya(e);_.end=new Proxy(_.end,{apply(I,P,De){if(f&&f(_),P instanceof he)return;const[Rt,...ee]=De,rt=Rt||L(),ne=we(rt),O=Mt(_).filter(b=>b!==_),be=v(_);if(!O.length||!p)return vt(ne),Reflect.apply(I,P,[ne,...ee]);const te=l.getOptions().ignoreSpans,le=O?.reduce((b,M)=>{const B=v(M);return!B.timestamp||te&&Gt(B,te)?b:b?Math.max(b,B.timestamp):B.timestamp},void 0),R=be.start_timestamp,x=Math.min(R?R+u/1e3:1/0,Math.max(R||-1/0,Math.min(ne,le||1/0)));return vt(x),Reflect.apply(I,P,[x,...ee])}});function $(){s&&(clearTimeout(s),s=void 0)}function U(I){$(),s=setTimeout(()=>{!r&&n.size===0&&o&&(i=Ga,_.end(I))},c)}function It(I){s=setTimeout(()=>{!r&&o&&(i=Wa,_.end(I))},d)}function sn(I){$(),n.set(I,!0);const P=L();It(P+d/1e3)}function on(I){if(n.has(I)&&n.delete(I),n.size===0){const P=L();U(P+c/1e3)}}function vt(I){r=!0,n.clear(),a.forEach(O=>O()),qe(m,y);const P=v(_),{start_timestamp:De}=P;if(!De)return;P.data[at]||_.setAttribute(at,i);const ee=P.status;(!ee||ee==="unknown")&&_.setStatus({code:Kn}),g.log(`[Tracing] Idle span "${P.op}" finished`);const rt=Mt(_).filter(O=>O!==_);let ne=0;rt.forEach(O=>{O.isRecording()&&(O.setStatus({code:C,message:"cancelled"}),O.end(I),h&&g.log("[Tracing] Cancelling span since span ended early",JSON.stringify(O,void 0,2)));const be=v(O),{timestamp:te=0,start_timestamp:le=0}=be,R=le<=I,x=(u+c)/1e3,b=te-le<=x;if(h){const M=JSON.stringify(O,void 0,2);R?b||g.log("[Tracing] Discarding span since it finished after idle span final timeout",M):g.log("[Tracing] Discarding span since it happened after idle span was finished",M)}(!b||!R)&&(pa(_,O),ne++)}),ne>0&&_.setAttribute("sentry.idle_span_discarded_spans",ne)}return a.push(l.on("spanStart",I=>{if(r||I===_||v(I).timestamp||I instanceof en&&I.isStandaloneSpan())return;Mt(_).includes(I)&&sn(I.spanContext().spanId)})),a.push(l.on("spanEnd",I=>{r||on(I.spanContext().spanId)})),a.push(l.on("idleSpanEnableAutoFinish",I=>{I===_&&(o=!0,U(),n.size&&It())})),t.disableAutoFinish||U(),setTimeout(()=>{r||(_.setStatus({code:C,message:"deadline_exceeded"}),i=za,_.end())},u),_}function Ya(e){const t=et(e);return qe(A(),t),h&&g.log("[Tracing] Started span is an idle span"),t}const ln=0,Br=1,jr=2;function tn(e){return new ut(t=>{t(e)})}function rr(e){return new ut((t,n)=>{n(e)})}class ut{constructor(t){this._state=ln,this._handlers=[],this._runExecutor(t)}then(t,n){return new ut((r,s)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new ut((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,t&&t()},o=>{i=!0,s=o,t&&t()}).then(()=>{if(i){r(s);return}n(s)})})}_executeHandlers(){if(this._state===ln)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Br&&n[1](this._value),this._state===jr&&n[2](this._value),n[0]=!0)})}_runExecutor(t){const n=(i,o)=>{if(this._state===ln){if(Je(o)){o.then(r,s);return}this._state=i,this._value=o,this._executeHandlers()}},r=i=>{n(Br,i)},s=i=>{n(jr,i)};try{t(r,s)}catch(i){s(i)}}}function Xa(e,t,n,r=0){try{const s=Nn(t,n,e,r);return Je(s)?s:tn(s)}catch(s){return rr(s)}}function Nn(e,t,n,r){const s=n[r];if(!e||!s)return e;const i=s({...e},t);return h&&i===null&&g.log(`Event processor "${s.id||"?"}" dropped event`),Je(i)?i.then(o=>Nn(o,t,n,r+1)):Nn(i,t,n,r+1)}function Ja(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;Ka(e,t),r&&ec(e,r),tc(e,n),Za(e,s),Qa(e,i)}function qr(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:l,span:m}=t;At(e,"extra",n),At(e,"tags",r),At(e,"user",s),At(e,"contexts",i),e.sdkProcessingMetadata=pt(e.sdkProcessingMetadata,a,2),o&&(e.level=o),l&&(e.transactionName=l),m&&(e.span=m),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function At(e,t,n){e[t]=pt(e[t],n,1)}function Ka(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(s).length&&(e.user={...s,...e.user}),Object.keys(i).length&&(e.contexts={...i,...e.contexts}),o&&(e.level=o),a&&e.type!=="transaction"&&(e.transaction=a)}function Za(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Qa(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function ec(e,t){e.contexts={trace:ca(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:ge(t),...e.sdkProcessingMetadata};const n=D(t),r=v(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function tc(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}let Ie,Wr,Gr,pe;function nc(e){const t=T._sentryDebugIds,n=T._debugIds;if(!t&&!n)return{};const r=t?Object.keys(t):[],s=n?Object.keys(n):[];if(pe&&r.length===Wr&&s.length===Gr)return pe;Wr=r.length,Gr=s.length,pe={},Ie||(Ie={});const i=(o,a)=>{for(const c of o){const u=a[c],d=Ie?.[c];if(d&&pe&&u)pe[d[0]]=u,Ie&&(Ie[c]=[d[0],u]);else if(u){const f=e(c);for(let p=f.length-1;p>=0;p--){const m=f[p]?.filename;if(m&&pe&&Ie){pe[m]=u,Ie[c]=[m,u];break}}}}};return t&&i(r,t),n&&i(s,n),pe}function rc(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||V(),timestamp:t.timestamp||Oe()},u=n.integrations||e.integrations.map(_=>_.name);sc(c,e),ac(c,u),s&&s.emit("applyFrameMetadata",t),t.type===void 0&&ic(c,e.stackParser);const d=uc(r,n.captureContext);n.mechanism&&Be(c,n.mechanism);const f=s?s.getEventProcessors():[],p=$o().getScopeData();if(i){const _=i.getScopeData();qr(p,_)}if(d){const _=d.getScopeData();qr(p,_)}const l=[...n.attachments||[],...p.attachments];l.length&&(n.attachments=l),Ja(c,p);const m=[...f,...p.eventProcessors];return Xa(m,c,n).then(_=>(_&&oc(_),typeof o=="number"&&o>0?cc(_,o,a):_))}function sc(e,t){const{environment:n,release:r,dist:s,maxValueLength:i}=t;e.environment=e.environment||n||er,!e.release&&r&&(e.release=r),!e.dist&&s&&(e.dist=s);const o=e.request;o?.url&&i&&(o.url=bn(o.url,i)),i&&e.exception?.values?.forEach(a=>{a.value&&(a.value=bn(a.value,i))})}function ic(e,t){const n=nc(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.filename&&(s.debug_id=n[s.filename])})})}function oc(e){const t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach(([r,s])=>{n.push({type:"sourcemap",code_file:r,debug_id:s})})}function ac(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function cc(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:se(s.data,t,n)}}))},...e.user&&{user:se(e.user,t,n)},...e.contexts&&{contexts:se(e.contexts,t,n)},...e.extra&&{extra:se(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=se(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>({...s,...s.data&&{data:se(s.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=se(e.contexts.flags,3,n)),r}function uc(e,t){if(!t)return e;const n=e?e.clone():new de;return n.update(t),n}function dc(e,t){return A().captureException(e,void 0)}function si(e,t){return A().captureEvent(e,t)}function fc(){const e=w();return e?.getOptions().enabled!==!1&&!!e?.getTransport()}function zr(e){const t=xe(),n=A(),{userAgent:r}=T.navigator||{},s=Ao({user:n.getUser()||t.getUser(),...r&&{userAgent:r},...e}),i=t.getSession();return i?.status==="ok"&&je(i,{status:"exited"}),ii(),t.setSession(s),s}function ii(){const e=xe(),n=A().getSession()||e.getSession();n&&No(n),oi(),e.setSession()}function oi(){const e=xe(),t=w(),n=e.getSession();n&&t&&t.captureSession(n)}function Vr(e=!1){if(e){ii();return}oi()}const lc="7";function pc(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function mc(e){return`${pc(e)}${e.projectId}/envelope/`}function gc(e,t){const n={sentry_version:lc};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function hc(e,t,n){return t||`${mc(e)}?${gc(e,n)}`}const Yr=[];function _c(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 Sc(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 _c(r)}function yc(e,t){const n={};return t.forEach(r=>{r&&ai(e,r,n)}),n}function Xr(e,t){for(const n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function ai(e,t,n){if(n[t.name]){h&&g.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Yr.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),Yr.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=Object.assign((i,o)=>r(i,o,e),{id:t.name});e.addEventProcessor(s)}h&&g.log(`Integration installed: ${t.name}`)}function Ec(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function bc(e,t,n,r){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Qe(r)),Me(s,[Ec(e)])}function ci(e,t){const n=t??Tc(e)??[];if(n.length===0)return;const r=e.getOptions(),s=bc(n,r._metadata,r.tunnel,e.getDsn());ui().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(s)}function Tc(e){return ui().get(e)}function ui(){return Ve("clientToLogBufferMap",()=>new WeakMap)}function Ic(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function vc(e,t,n,r){const s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=Qe(r)),Me(s,[Ic(e)])}function di(e,t){const n=t??Rc(e)??[];if(n.length===0)return;const r=e.getOptions(),s=vc(n,r._metadata,r.tunnel,e.getDsn());fi().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(s)}function Rc(e){return fi().get(e)}function fi(){return Ve("clientToMetricBufferMap",()=>new WeakMap)}const sr=Symbol.for("SentryBufferFullError");function ir(e=100){const t=new Set;function n(){return t.sizer(a),()=>r(a)),a}function i(o){if(!t.size)return tn(!0);const a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!o)return a;const c=[a,new Promise(u=>setTimeout(()=>u(!1),o))];return Promise.race(c)}return{get $(){return Array.from(t)},add:s,drain:i}}const wc=60*1e3;function Ac(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?wc:r-t}function Nc(e,t){return e[t]||e.all||0}function kc(e,t,n=Date.now()){return Nc(e,t)>n}function Cc(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n?.["x-sentry-rate-limits"],o=n?.["retry-after"];if(i)for(const a of i.trim().split(",")){const[c,u,,,d]=a.split(":",5),f=parseInt(c,10),p=(isNaN(f)?60:f)*1e3;if(!u)s.all=r+p;else for(const l of u.split(";"))l==="metric_bucket"?(!d||d.split(";").includes("custom"))&&(s[l]=r+p):s[l]=r+p}else o?s.all=r+Ac(o,r):t===429&&(s.all=r+60*1e3);return s}const li=64;function Pc(e,t,n=ir(e.bufferSize||li)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(xr(o,(f,p)=>{const l=Mr(p);kc(r,l)?e.recordDroppedEvent("ratelimit_backoff",l):a.push(f)}),a.length===0)return Promise.resolve({});const c=Me(o[0],a),u=f=>{xr(c,(p,l)=>{e.recordDroppedEvent(f,Mr(l))})},d=()=>t({body:Ia(c)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&h&&g.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),r=Cc(r,f),f),f=>{throw u("network_error"),h&&g.error("Encountered error running transport request:",f),f});return n.add(d).then(f=>f,f=>{if(f===sr)return h&&g.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw f})}return{send:i,flush:s}}function Lc(e,t,n){const r=[{type:"client_report"},{timestamp:Oe(),discarded_events:e}];return Me(t?{dsn:t}:{},[r])}function pi(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 Oc(e){const{trace_id:t,parent_span_id:n,span_id:r,status:s,origin:i,data:o,op:a}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:s,timestamp:e.timestamp,trace_id:t??"",origin:i,profile_id:o?.[Jn],exclusive_time:o?.[Ze],measurements:e.measurements,is_segment:!0}}function xc(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&&{[Jn]:e.profile_id},...e.exclusive_time&&{[Ze]:e.exclusive_time}}}},measurements:e.measurements}}const Jr="Not capturing exception because it's already been captured.",Kr="Discarded session because of missing or non-string release",mi=Symbol.for("SentryInternalError"),gi=Symbol.for("SentryDoNotSendEventError"),Mc=5e3;function Ft(e){return{message:e,[mi]:!0}}function pn(e){return{message:e,[gi]:!0}}function Zr(e){return!!e&&typeof e=="object"&&mi in e}function Qr(e){return!!e&&typeof e=="object"&&gi in e}function es(e,t,n,r,s){let i=0,o,a=!1;e.on(n,()=>{i=0,clearTimeout(o),a=!1}),e.on(t,c=>{i+=r(c),i>=8e5?s(e):a||(a=!0,o=setTimeout(()=>{s(e)},Mc))}),e.on("flush",()=>{s(e)})}class Dc{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=ir(t.transportOptions?.bufferSize??li),t.dsn?this._dsn=ra(t.dsn):h&&g.warn("No DSN provided, client will not send events."),this._dsn){const r=hc(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:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&es(this,"afterCaptureLog","flushLogs",Uc,ci),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&es(this,"afterCaptureMetric","flushMetrics",Hc,di)}captureException(t,n,r){const s=V();if(Rr(t))return h&&g.log(Jr),s;const i={event_id:s,...n};return this._process(()=>this.eventFromException(t,i).then(o=>this._captureEvent(o,i,r)).then(o=>o),"error"),i.event_id}captureMessage(t,n,r,s){const i={event_id:V(),...r},o=zn(t)?t:String(t),a=Ue(t),c=a?this.eventFromMessage(o,n,i):this.eventFromException(t,i);return this._process(()=>c.then(u=>this._captureEvent(u,i,s)),a?"unknown":"error"),i.event_id}captureEvent(t,n,r){const s=V();if(n?.originalException&&Rr(n.originalException))return h&&g.log(Jr),s;const i={event_id:s,...n},o=t.sdkProcessingMetadata||{},a=o.capturedSpanScope,c=o.capturedSpanIsolationScope,u=ts(t.type);return this._process(()=>this._captureEvent(t,i,a||r,c),u),i.event_id}captureSession(t){this.sendSession(t),je(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){const n=this._transport;if(!n)return!0;this.emit("flush");const r=await this._isClientDoneProcessing(t),s=await n.flush(t);return r&&s}async close(t){const n=await this.flush(t);return 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];ai(this,t,this._integrations),n||Xr(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Pa(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of n.attachments||[])r=Ta(r,wa(s));this.sendEnvelope(r).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){const{release:n,environment:r=er}=this._options;if("aggregates"in t){const i=t.attrs||{};if(!i.release&&!n){h&&g.warn(Kr);return}i.release=i.release||n,i.environment=i.environment||r,t.attrs=i}else{if(!t.release&&!n){h&&g.warn(Kr);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);const s=Ca(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&&g.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]||new Set,s=(...i)=>n(...i);return r.add(s),()=>{r.delete(s)}}emit(t,...n){const r=this._hooks[t];r&&r.forEach(s=>s(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return h&&g.error("Error while sending envelope:",n),{}}return h&&g.error("Transport disabled"),{}}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=yc(this,t),Xr(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",s=!1;const i=n.exception?.values;if(i){s=!0,r=!1;for(const c of i)if(c.mechanism?.handled===!1){r=!0;break}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(je(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||nsetTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,s){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o?.length&&(n.integrations=o),this.emit("preprocessEvent",t,n),t.type||s.setLastEventId(t.event_id||n.event_id),rc(i,t,n,r,this,s).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:Fo(r),...a.contexts};const c=Js(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=A(),s=xe()){return h&&kn(t)&&g.log(`Captured error event \`${pi(t)[0]||""}\``),this._processEvent(t,n,r,s).then(i=>i.event_id,i=>{h&&(Qr(i)?g.log(i.message):Zr(i)?g.warn(i.message):g.warn(i))})}_processEvent(t,n,r,s){const i=this.getOptions(),{sampleRate:o}=i,a=hi(t),c=kn(t),d=`before send for type \`${t.type||"error"}\``,f=typeof o>"u"?void 0:ct(o);if(c&&typeof f=="number"&&Math.random()>f)return this.recordDroppedEvent("sample_rate","error"),rr(pn(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const p=ts(t.type);return this._prepareEvent(t,n,r,s).then(l=>{if(l===null)throw this.recordDroppedEvent("event_processor",p),pn("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return l;const y=Fc(this,i,l,n);return $c(y,d)}).then(l=>{if(l===null){if(this.recordDroppedEvent("before_send",p),a){const $=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",$)}throw pn(`${d} returned \`null\`, will not send event.`)}const m=r.getSession()||s.getSession();if(c&&m&&this._updateSessionFromEvent(m,l),a){const _=l.sdkProcessingMetadata?.spanCountBeforeProcessing||0,$=l.spans?l.spans.length:0,U=_-$;U>0&&this.recordDroppedEvent("before_send","span",U)}const y=l.transaction_info;if(a&&y&&l.transaction!==t.transaction){const _="custom";l.transaction_info={...y,source:_}}return this.sendEvent(l,n),l}).then(null,l=>{throw Qr(l)||Zr(l)?l:(this.captureException(l,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:l}),Ft(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${l}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===sr&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{const[s,i]=n.split(":");return{reason:s,category:i,quantity:r}})}_flushOutcomes(){h&&g.log("Flushing outcomes...");const t=this._clearOutcomes();if(t.length===0){h&&g.log("No outcomes to send");return}if(!this._dsn){h&&g.log("No dsn provided, will not send outcomes");return}h&&g.log("Sending outcomes:",t);const n=Lc(t,this._options.tunnel&&Qe(this._dsn));this.sendEnvelope(n)}}function ts(e){return e==="replay_event"?"replay":e||"error"}function $c(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Je(e))return e.then(r=>{if(!ot(r)&&r!==null)throw Ft(n);return r},r=>{throw Ft(`${t} rejected with ${r}`)});if(!ot(e)&&e!==null)throw Ft(n);return e}function Fc(e,t,n,r){const{beforeSend:s,beforeSendTransaction:i,beforeSendSpan:o,ignoreSpans:a}=t;let c=n;if(kn(c)&&s)return s(c,r);if(hi(c)){if(o||a){const u=Oc(c);if(a?.length&&Gt(u,a))return null;if(o){const d=o(u);d?c=pt(n,xc(d)):Rn()}if(c.spans){const d=[],f=c.spans;for(const l of f){if(a?.length&&Gt(l,a)){ga(f,l);continue}if(o){const m=o(l);m?d.push(m):(Rn(),d.push(l))}else d.push(l)}const p=c.spans.length-d.length;p&&e.recordDroppedEvent("before_send","span",p),c.spans=d}}if(i){if(c.spans){const u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return i(c,r)}}return c}function kn(e){return e.type===void 0}function hi(e){return e.type==="transaction"}function Hc(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+_i(e.attributes)}function Uc(e){let t=0;return e.message&&(t+=e.message.length*2),t+_i(e.attributes)}function _i(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*ns(n[0]):Ue(n)?t+=ns(n):t+=100}),t}function ns(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function Bc(e,t){t.debug===!0&&(h?g.enable():Ye(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),A().update(t.initialScope);const r=new e(t);return jc(r),r.init(),r}function jc(e){A().setClient(e)}const qc="thismessage:/";function Si(e){return"isRelative"in e}function yi(e,t){const n=e.indexOf("://")<=0&&e.indexOf("//")!==0,r=n?qc: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 Wc(e){if(Si(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 Ne(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 Gc(e){return e.split(/[?#]/,1)[0]}function zc(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 Ei(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:Re})),version:Re}),e._metadata=s}function bi(e={}){const t=e.client||w();if(!fc()||!t)return{};const n=Le(),r=Ke(n);if(r.getTraceData)return r.getTraceData(e);const s=e.scope||A(),i=e.span||W(),o=i?ua(i):Vc(s),a=i?ge(i):Js(t,s),c=Vo(a);if(!Bs.test(o))return g.warn("Invalid sentry-trace data. Cannot generate trace data"),{};const d={"sentry-trace":o,baggage:c};if(e.propagateTraceparent){const f=i?da(i):Yc(s);f&&(d.traceparent=f)}return d}function Vc(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return js(t,r,n)}function Yc(e){const{traceId:t,sampled:n,propagationSpanId:r}=e.getPropagationContext();return qs(t,r,n)}const Xc=100;function Pe(e,t){const n=w(),r=xe();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:i=Xc}=n.getOptions();if(i<=0)return;const a={timestamp:Oe(),...e},c=s?Ye(()=>s(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,i))}let rs;const Jc="FunctionToString",ss=new WeakMap,Kc=(()=>({name:Jc,setupOnce(){rs=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Yn(this),n=ss.has(w())&&t!==void 0?t:this;return rs.apply(n,e)}}catch{}},setup(e){ss.set(e,!0)}})),Zc=Kc,Qc=[/^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$/],eu="EventFilters",tu=(e={})=>{let t;return{name:eu,setup(n){const r=n.getOptions();t=is(e,r)},processEvent(n,r,s){if(!t){const i=s.getOptions();t=is(e,i)}return ru(n,t)?null:n}}},nu=((e={})=>({...tu(e),name:"InboundFilters"}));function is(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Qc],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function ru(e,t){if(e.type){if(e.type==="transaction"&&iu(e,t.ignoreTransactions))return h&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option. Event: ${ve(e)}`),!0}else{if(su(e,t.ignoreErrors))return h&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option. Event: ${ve(e)}`),!0;if(uu(e))return h&&g.warn(`Event dropped due to not having an error message, error type or stacktrace. Event: ${ve(e)}`),!0;if(ou(e,t.denyUrls))return h&&g.warn(`Event dropped due to being matched by \`denyUrls\` option. Event: ${ve(e)}. Url: ${zt(e)}`),!0;if(!au(e,t.allowUrls))return h&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option. Event: ${ve(e)}. Url: ${zt(e)}`),!0}return!1}function su(e,t){return t?.length?pi(e).some(n=>me(n,t)):!1}function iu(e,t){if(!t?.length)return!1;const n=e.transaction;return n?me(n,t):!1}function ou(e,t){if(!t?.length)return!1;const n=zt(e);return n?me(n,t):!1}function au(e,t){if(!t?.length)return!0;const n=zt(e);return n?me(n,t):!0}function cu(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function zt(e){try{const n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?cu(n):null}catch{return h&&g.error(`Cannot extract url for event ${ve(e)}`),null}}function uu(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function du(e,t,n,r,s,i){if(!s.exception?.values||!i||!ce(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=Cn(e,t,r,i.originalException,n,s.exception.values,o,0))}function Cn(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let c=[...i];if(ce(r[s],Error)){os(o,a);const u=e(t,r[s]),d=c.length;as(u,s,d,a),c=Cn(e,t,n,r[s],s,[u,...c],u,d)}return Array.isArray(r.errors)&&r.errors.forEach((u,d)=>{if(ce(u,Error)){os(o,a);const f=e(t,u),p=c.length;as(f,`errors[${d}]`,p,a),c=Cn(e,t,n,u,s,[f,...c],f,p)}}),c}function os(e,t){e.mechanism={handled:!0,type:"auto.core.linked_errors",...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function as(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function fu(e){const t="console";Se(t,e),ye(t,lu)}function lu(){"console"in T&&ro.forEach(function(e){e in T.console&&j(T.console,e,function(t){return jt[e]=t,function(...n){z("console",{args:n,level:e}),jt[e]?.apply(T.console,n)}})})}function pu(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const mu="Dedupe",gu=(()=>{let e;return{name:mu,processEvent(t){if(t.type)return t;try{if(_u(t,e))return h&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}}),hu=gu;function _u(e,t){return t?!!(Su(e,t)||yu(e,t)):!1}function Su(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Ii(e,t)||!Ti(e,t))}function yu(e,t){const n=cs(t),r=cs(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Ii(e,t)||!Ti(e,t))}function Ti(e,t){let n=yr(e),r=yr(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;sf[0]==="sentry-trace")||u.push(["sentry-trace",i]),r&&a&&!c.find(f=>f[0]==="traceparent")&&u.push(["traceparent",a]);const d=c.find(f=>f[0]==="baggage"&&Nt(f[1]));return o&&!d&&u.push(["baggage",o]),u}else{const u="sentry-trace"in c?c["sentry-trace"]:void 0,d="traceparent"in c?c.traceparent:void 0,f="baggage"in c?c.baggage:void 0,p=f?Array.isArray(f)?[...f]:[f]:[],l=f&&(Array.isArray(f)?f.find(y=>Nt(y)):Nt(f));o&&!l&&p.push(o);const m={...c,"sentry-trace":u??i,baggage:p.length>0?p.join(","):void 0};return r&&a&&!d&&(m.traceparent=a),m}else return{...s}}function Iu(e,t){if(t.response){Ds(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:C,message:"internal_error"});e.end()}function Nt(e){return e.split(",").some(t=>t.trim().startsWith(Zn))}function vu(e){return typeof Headers<"u"&&ce(e,Headers)}function Ru(e,t,n){const r=yi(e);return{name:r?`${t} ${Wc(r)}`:t,attributes:wu(e,r,t,n)}}function wu(e,t,n,r){const s={url:e,type:"fetch","http.method":n,[k]:r,[fe]:"http.client"};return t&&(Si(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 vi(e){if(e!==void 0)return e>=400&&e<500?"warning":e>=500?"error":void 0}const dt=T;function Au(){return"history"in dt&&!!dt.history}function Nu(){if(!("fetch"in dt))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}function Pn(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function ku(){if(typeof EdgeRuntime=="string")return!0;if(!Nu())return!1;if(Pn(dt.fetch))return!0;let e=!1;const t=dt.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Pn(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){h&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Ri(e,t){const n="fetch";Se(n,e),ye(n,()=>wi(void 0,t))}function Cu(e){const t="fetch-body-resolved";Se(t,e),ye(t,()=>wi(Lu))}function wi(e,t=!1){t&&!ku()||j(T,"fetch",function(n){return function(...r){const s=new Error,{method:i,url:o}=Ou(r),a={args:r,fetchData:{method:i,url:o},startTimestamp:L()*1e3,virtualError:s,headers:xu(r)};return e||z("fetch",{...a}),n.apply(T,r).then(async c=>(e?e(c):z("fetch",{...a,endTimestamp:L()*1e3,response:c}),c),c=>{if(z("fetch",{...a,endTimestamp:L()*1e3,error:c}),Gn(c)&&c.stack===void 0&&(c.stack=s.stack,q(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 Pu(e,t){if(e?.body){const n=e.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&&(t(),i=!1)}catch{i=!1}finally{clearTimeout(o)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}function Lu(e){let t;try{t=e.clone()}catch{return}Pu(t,()=>{z("fetch-body-resolved",{endTimestamp:L()*1e3,response:e})})}function Ln(e,t){return!!e&&typeof e=="object"&&!!e[t]}function us(e){return typeof e=="string"?e:e?Ln(e,"url")?e.url:e.toString?e.toString():"":""}function Ou(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:us(n),method:Ln(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:us(t),method:Ln(t,"method")?String(t.method).toUpperCase():"GET"}}function xu(e){const[t,n]=e;try{if(typeof n=="object"&&n!==null&&"headers"in n&&n.headers)return new Headers(n.headers);if(ks(t))return new Headers(t.headers)}catch{}}function Mu(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Du(){return"npm"}function $u(){return!Mu()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function Fu(){return typeof window<"u"&&(!$u()||Hu())}function Hu(){return T.process?.type==="renderer"}const E=T;let On=0;function Ai(){return On>0}function Uu(){On++,setTimeout(()=>{On--})}function Ge(e,t={}){function n(s){return typeof s=="function"}if(!n(e))return e;try{const s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if(Yn(e))return e}catch{return e}const r=function(...s){try{const i=s.map(o=>Ge(o,t));return e.apply(this,i)}catch(i){throw Uu(),Qt(o=>{o.addEventProcessor(a=>(t.mechanism&&(Tn(a,void 0),Be(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),dc(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}Ps(r,e),q(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function or(){const e=lt(),{referrer:t}=E.document||{},{userAgent:n}=E.navigator||{},r={...t&&{Referer:t},...n&&{"User-Agent":n}};return{url:e,headers:r}}function ar(e,t){const n=cr(e,t),r={type:Gu(t),value:zu(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function Bu(e,t,n,r){const i=w()?.getOptions().normalizeDepth,o=Ku(t),a={__serialized__:Ks(t,i)};if(o)return{exception:{values:[ar(e,o)]},extra:a};const c={exception:{values:[{type:Zt(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:Xu(t,{isUnhandledRejection:r})}]},extra:a};if(n){const u=cr(e,n);u.length&&(c.exception.values[0].stacktrace={frames:u})}return c}function mn(e,t){return{exception:{values:[ar(e,t)]}}}function cr(e,t){const n=t.stacktrace||t.stack||"",r=qu(t),s=Wu(t);try{return e(n,r,s)}catch{}return[]}const ju=/Minified React error #\d+;/i;function qu(e){return e&&ju.test(e.message)?1:0}function Wu(e){return typeof e.framesToPop=="number"?e.framesToPop:0}function Ni(e){return typeof WebAssembly<"u"&&typeof WebAssembly.Exception<"u"?e instanceof WebAssembly.Exception:!1}function Gu(e){const t=e?.name;return!t&&Ni(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:"WebAssembly.Exception":t}function zu(e){const t=e?.message;return Ni(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 Vu(e,t,n,r){const s=n?.syntheticException||void 0,i=ur(e,t,s,r);return Be(i),i.level="error",n?.event_id&&(i.event_id=n.event_id),tn(i)}function Yu(e,t,n="info",r,s){const i=r?.syntheticException||void 0,o=xn(e,t,i,s);return o.level=n,r?.event_id&&(o.event_id=r.event_id),tn(o)}function ur(e,t,n,r,s){let i;if(As(t)&&t.error)return mn(e,t.error);if(br(t)||go(t)){const o=t;if("stack"in t)i=mn(e,t);else{const a=o.name||(br(o)?"DOMError":"DOMException"),c=o.message?`${a}: ${o.message}`:a;i=xn(e,c,n,r),Tn(i,c)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return Gn(t)?mn(e,t):ot(t)||Zt(t)?(i=Bu(e,t,n,s),Be(i,{synthetic:!0}),i):(i=xn(e,t,n,r),Tn(i,`${t}`),Be(i,{synthetic:!0}),i)}function xn(e,t,n,r){const s={};if(r&&n){const i=cr(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]}),Be(s,{synthetic:!0})}if(zn(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function Xu(e,{isUnhandledRejection:t}){const n=bo(e),r=t?"promise rejection":"exception";return As(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Zt(e)?`Event \`${Ju(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function Ju(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Ku(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}class Zu extends Dc{constructor(t){const n=Qu(t),r=E.SENTRY_SDK_SOURCE||Du();Ei(n,"browser",["browser"],r),n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:n.sendDefaultPii?"auto":"never",...n._metadata.sdk.settings}),super(n);const{sendDefaultPii:s,sendClientReports:i,enableLogs:o,_experiments:a,enableMetrics:c}=this._options,u=c??a?.enableMetrics??!0;E.document&&(i||o||u)&&E.document.addEventListener("visibilitychange",()=>{E.document.visibilityState==="hidden"&&(i&&this._flushOutcomes(),o&&ci(this),u&&di(this))}),s&&this.on("beforeSendSession",zc)}eventFromException(t,n){return Vu(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return Yu(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 Qu(e){return{release:typeof __SENTRY_RELEASE__=="string"?__SENTRY_RELEASE__:E.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}const ht=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,S=T,ed=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",_t=(e,t,n,r)=>{let s,i;return o=>{t.value>=0&&(o||r)&&(i=t.value-(s??0),(i||s===void 0)&&(s=t.value,t.delta=i,t.rating=ed(t.value,n),e(t)))}},St=(e=!0)=>{const t=S.performance?.getEntriesByType?.("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStartSt()?.activationStart??0;function ke(e,t,n){S.document&&S.addEventListener(e,t,n)}function dr(e,t,n){S.document&&S.removeEventListener(e,t,n)}let He=-1;const ki=new Set,td=()=>S.document?.visibilityState==="hidden"&&!S.document?.prerendering?0:1/0,Ht=e=>{if(nd(e)&&He>-1){if(e.type==="visibilitychange"||e.type==="pagehide")for(const t of ki)t();isFinite(He)||(He=e.type==="visibilitychange"?e.timeStamp:0,dr("prerenderingchange",Ht,!0))}},yt=()=>{if(S.document&&He<0){const e=tt();He=(S.document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(n=>n.name==="hidden"&&n.startTime>e)[0]?.startTime)??td(),ke("visibilitychange",Ht,!0),ke("pagehide",Ht,!0),ke("prerenderingchange",Ht,!0)}return{get firstHiddenTime(){return He},onHidden(e){ki.add(e)}}};function nd(e){return e.type==="pagehide"||S.document?.visibilityState==="hidden"}const rd=()=>`v5-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,Et=(e,t=-1)=>{const n=St();let r="navigate";return n&&(S.document?.prerendering||tt()>0?r="prerender":S.document?.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:rd(),navigationType:r}},gn=new WeakMap;function fr(e,t){return gn.get(e)||gn.set(e,new t),gn.get(e)}class Vt{constructor(){Vt.prototype.__init.call(this),Vt.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 nt=(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{}},lr=e=>{let t=!1;return()=>{t||(e(),t=!0)}},nn=e=>{S.document?.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},sd=[1800,3e3],id=(e,t={})=>{nn(()=>{const n=yt(),r=Et("FCP");let s;const o=nt("paint",a=>{for(const c of a)c.name==="first-contentful-paint"&&(o.disconnect(),c.startTime{id(lr(()=>{const n=Et("CLS",0);let r;const s=yt(),i=fr(t,Vt),o=c=>{for(const u of c)i._processEntry(u);i._sessionValue>n.value&&(n.value=i._sessionValue,n.entries=i._sessionEntries,r())},a=nt("layout-shift",o);a&&(r=_t(e,n,od,t.reportAllChanges),s.onHidden(()=>{o(a.takeRecords()),r(!0)}),S?.setTimeout?.(r))}))};let Ci=0,hn=1/0,kt=0;const cd=e=>{e.forEach(t=>{t.interactionId&&(hn=Math.min(hn,t.interactionId),kt=Math.max(kt,t.interactionId),Ci=kt?(kt-hn)/7+1:0)})};let Mn;const Pi=()=>Mn?Ci:performance.interactionCount||0,ud=()=>{"interactionCount"in performance||Mn||(Mn=nt("event",cd,{type:"event",buffered:!0,durationThreshold:0}))},_n=10;let Li=0;const dd=()=>Pi()-Li;class Yt{constructor(){Yt.prototype.__init.call(this),Yt.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){Li=Pi(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor(dd()/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<_n||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,i)=>i._latency-s._latency),this._longestInteractionList.length>_n){const s=this._longestInteractionList.splice(_n);for(const i of s)this._longestInteractionMap.delete(i.id)}this._onAfterProcessingINPCandidate?.(r)}}}const Oi=e=>{const t=n=>{(n.type==="pagehide"||S.document?.visibilityState==="hidden")&&e(n)};ke("visibilitychange",t,!0),ke("pagehide",t,!0)},xi=e=>{const t=S.requestIdleCallback||S.setTimeout;S.document?.visibilityState==="hidden"?e():(e=lr(e),ke("visibilitychange",e,{once:!0,capture:!0}),t(()=>{e(),dr("visibilitychange",e,{capture:!0})}),Oi(e))},fd=[200,500],ld=40,pd=(e,t={})=>{if(!(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return;const n=yt();nn(()=>{ud();const r=Et("INP");let s;const i=fr(t,Yt),o=c=>{xi(()=>{for(const d of c)i._processEntry(d);const u=i._estimateP98LongestInteraction();u&&u._latency!==r.value&&(r.value=u._latency,r.entries=u.entries,s())})},a=nt("event",o,{durationThreshold:t.durationThreshold??ld});s=_t(e,r,fd,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{o(a.takeRecords()),s(!0)}))})};class md{_processEntry(t){this._onBeforeProcessingEntry?.(t)}}const gd=[2500,4e3],hd=(e,t={})=>{nn(()=>{const n=yt(),r=Et("LCP");let s;const i=fr(t,md),o=c=>{t.reportAllChanges||(c=c.slice(-1));for(const u of c)i._processEntry(u),u.startTime{o(a.takeRecords()),a.disconnect(),s(!0)}),u=d=>{d.isTrusted&&(xi(c),dr(d.type,u,{capture:!0}))};for(const d of["keydown","click","visibilitychange"])ke(d,u,{capture:!0})}})},_d=[800,1800],Dn=e=>{S.document?.prerendering?nn(()=>Dn(e)):S.document?.readyState!=="complete"?addEventListener("load",()=>Dn(e),!0):setTimeout(e)},Sd=(e,t={})=>{const n=Et("TTFB"),r=_t(e,n,_d,t.reportAllChanges);Dn(()=>{const s=St();s&&(n.value=Math.max(s.responseStart-tt(),0),n.entries=[s],r(!0))})},it={},Xt={};let Mi,Di,$i,Fi;function Hi(e,t=!1){return rn("cls",e,bd,Mi,t)}function Ui(e,t=!1){return rn("lcp",e,Td,Di,t)}function yd(e){return rn("ttfb",e,Id,$i)}function Ed(e){return rn("inp",e,vd,Fi)}function ze(e,t){return Bi(e,t),Xt[e]||(Rd(e),Xt[e]=!0),ji(e,t)}function bt(e,t){const n=it[e];if(n?.length)for(const r of n)try{r(t)}catch(s){ht&&g.error(`Error while triggering instrumentation handler. Type: ${e} Name: ${ae(r)} Error:`,s)}}function bd(){return ad(e=>{bt("cls",{metric:e}),Mi=e},{reportAllChanges:!0})}function Td(){return hd(e=>{bt("lcp",{metric:e}),Di=e},{reportAllChanges:!0})}function Id(){return Sd(e=>{bt("ttfb",{metric:e}),$i=e})}function vd(){return pd(e=>{bt("inp",{metric:e}),Fi=e})}function rn(e,t,n,r,s=!1){Bi(e,t);let i;return Xt[e]||(i=n(),Xt[e]=!0),r&&t({metric:r}),ji(e,t,s?i:void 0)}function Rd(e){const t={};e==="event"&&(t.durationThreshold=0),nt(e,n=>{bt(e,{entries:n})},t)}function Bi(e,t){it[e]=it[e]||[],it[e].push(t)}function ji(e,t,n){return()=>{n&&n();const r=it[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function wd(e){return"duration"in e}function Sn(e){return typeof e=="number"&&isFinite(e)}function _e(e,t,n,{...r}){const s=v(e).start_timestamp;return s&&s>t&&typeof e.updateStartTime=="function"&&e.updateStartTime(t),tr(e,()=>{const i=et({startTime:t,...r});return i&&i.end(n),i})}function pr(e){const t=w();if(!t)return;const{name:n,transaction:r,attributes:s,startTime:i}=e,{release:o,environment:a,sendDefaultPii:c}=t.getOptions(),d=t.getIntegrationByName("Replay")?.getReplayId(),f=A(),p=f.getUser(),l=p!==void 0?p.email||p.id||p.ip_address:void 0;let m;try{m=f.getScopeData().contexts.profile.profile_id}catch{}const y={release:o,environment:a,user:l||void 0,profile_id:m||void 0,replay_id:d||void 0,transaction:r,"user_agent.original":S.navigator?.userAgent,"client.address":c?"{{auto}}":void 0,...s};return et({name:n,attributes:y,startTime:i,experimental:{standalone:!0}})}function Tt(){return S.addEventListener&&S.performance}function N(e){return e/1e3}function Ad(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 qi(e){try{return PerformanceObserver.supportedEntryTypes.includes(e)}catch{return!1}}function Wi(e,t){let n,r=!1;function s(a){!r&&n&&t(a,n),r=!0}Oi(()=>{s("pagehide")});const i=e.on("beforeStartNavigationSpan",(a,c)=>{c?.isRedirect||(s("navigation"),i(),o())}),o=e.on("afterStartPageLoadSpan",a=>{n=a.spanContext().spanId,o()})}function Nd(e){let t=0,n;if(!qi("layout-shift"))return;const r=Hi(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(t=s.value,n=i)},!0);Wi(e,(s,i)=>{kd(t,n,i,s),r()})}function kd(e,t,n,r){ht&&g.log(`Sending CLS span (${e})`);const s=t?N((H()||0)+t.startTime):L(),i=A().getScopeData().transactionName,o=t?Y(t.sources[0]?.node):"Layout shift",a={[k]:"auto.http.browser.cls",[fe]:"ui.webvital.cls",[Ze]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t?.sources&&t.sources.forEach((u,d)=>{a[`cls.source.${d+1}`]=Y(u.node)});const c=pr({name:o,transaction:i,attributes:a,startTime:s});c&&(c.addEvent("cls",{[mt]:"",[gt]:e}),c.end(s))}function Cd(e){let t=0,n;if(!qi("largest-contentful-paint"))return;const r=Ui(({metric:s})=>{const i=s.entries[s.entries.length-1];i&&(t=s.value,n=i)},!0);Wi(e,(s,i)=>{Pd(t,n,i,s),r()})}function Pd(e,t,n,r){ht&&g.log(`Sending LCP span (${e})`);const s=N((H()||0)+(t?.startTime||0)),i=A().getScopeData().transactionName,o=t?Y(t.element):"Largest contentful paint",a={[k]:"auto.http.browser.lcp",[fe]:"ui.webvital.lcp",[Ze]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};t&&(t.element&&(a["lcp.element"]=Y(t.element)),t.id&&(a["lcp.id"]=t.id),t.url&&(a["lcp.url"]=t.url),t.loadTime!=null&&(a["lcp.loadTime"]=t.loadTime),t.renderTime!=null&&(a["lcp.renderTime"]=t.renderTime),t.size!=null&&(a["lcp.size"]=t.size));const c=pr({name:o,transaction:i,attributes:a,startTime:s});c&&(c.addEvent("lcp",{[mt]:"millisecond",[gt]:e}),c.end(s))}function G(e){return e&&((H()||performance.timeOrigin)+e)/1e3}function Gi(e){const t={};if(e.nextHopProtocol!=null){const{name:n,version:r}=Ad(e.nextHopProtocol);t["network.protocol.version"]=r,t["network.protocol.name"]=n}return H()||Tt()?.timeOrigin?Ld({...t,"http.request.redirect_start":G(e.redirectStart),"http.request.redirect_end":G(e.redirectEnd),"http.request.worker_start":G(e.workerStart),"http.request.fetch_start":G(e.fetchStart),"http.request.domain_lookup_start":G(e.domainLookupStart),"http.request.domain_lookup_end":G(e.domainLookupEnd),"http.request.connect_start":G(e.connectStart),"http.request.secure_connection_start":G(e.secureConnectionStart),"http.request.connection_end":G(e.connectEnd),"http.request.request_start":G(e.requestStart),"http.request.response_start":G(e.responseStart),"http.request.response_end":G(e.responseEnd),"http.request.time_to_first_byte":e.responseStart!=null?e.responseStart/1e3:void 0}):t}function Ld(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}const Od=2147483647;let ds=0,K={},F,Jt;function xd({recordClsStandaloneSpans:e,recordLcpStandaloneSpans:t,client:n}){const r=Tt();if(r&&H()){r.mark&&S.performance.mark("sentry-tracing-init");const s=t?Cd(n):Hd(),i=Ud(),o=e?Nd(n):Fd();return()=>{s?.(),i(),o?.()}}return()=>{}}function Md(){ze("longtask",({entries:e})=>{const t=W();if(!t)return;const{op:n,start_timestamp:r}=v(t);for(const s of e){const i=N(H()+s.startTime),o=N(s.duration);n==="navigation"&&r&&i{const n=W();if(n)for(const r of t.getEntries()){if(!r.scripts[0])continue;const s=N(H()+r.startTime),{start_timestamp:i,op:o}=v(n);if(o==="navigation"&&i&&s{const t=W();if(t){for(const n of e)if(n.name==="click"){const r=N(H()+n.startTime),s=N(n.duration),i={name:Y(n.target),op:`ui.interaction.${n.name}`,startTime:r,attributes:{[k]:"auto.ui.browser.metrics"}},o=Cs(n.target);o&&(i.attributes["ui.component_name"]=o),_e(t,r,r+s,i)}}})}function Fd(){return Hi(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(K.cls={value:e.value,unit:""},Jt=t)},!0)}function Hd(){return Ui(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(K.lcp={value:e.value,unit:"millisecond"},F=t)},!0)}function Ud(){return yd(({metric:e})=>{e.entries[e.entries.length-1]&&(K.ttfb={value:e.value,unit:"millisecond"})})}function Bd(e,t){const n=Tt(),r=H();if(!n?.getEntries||!r)return;const s=N(r),i=n.getEntries(),{op:o,start_timestamp:a}=v(e);i.slice(ds).forEach(c=>{const u=N(c.startTime),d=N(Math.max(0,c.duration));if(!(o==="navigation"&&a&&s+u{Ma(c,u.value,u.unit)}),e.setAttribute("performance.timeOrigin",s),e.setAttribute("performance.activationStart",tt()),Jd(e,t)),F=void 0,Jt=void 0,K={}}function jd(e){if(e?.entryType==="measure")try{return e.detail.devtools.track==="Components ⚛"}catch{return}}function qd(e,t,n,r,s,i){if(jd(t)||["mark","measure"].includes(t.entryType)&&me(t.name,i))return;const o=St(!1),a=N(o?o.requestStart:0),c=s+Math.max(n,a),u=s+n,d=u+r,f={[k]:"auto.resource.browser.metrics"};c!==u&&(f["sentry.browser.measure_happened_before_request"]=!0,f["sentry.browser.measure_start_time"]=c),Wd(f,t),c<=d&&_e(e,c,d,{name:t.name,op:t.entryType,attributes:f})}function Wd(e,t){try{const n=t.detail;if(!n)return;if(typeof n=="object"){for(const[r,s]of Object.entries(n))if(s&&Ue(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(Ue(n)){e["sentry.browser.measure.detail"]=n;return}try{e["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}}function Gd(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Ct(e,t,r,n)}),Ct(e,t,"secureConnection",n,"TLS/SSL"),Ct(e,t,"fetch",n,"cache"),Ct(e,t,"domainLookup",n,"DNS"),Vd(e,t,n)}function Ct(e,t,n,r,s=n){const i=zd(n),o=t[i],a=t[`${n}Start`];!a||!o||_e(e,r+N(a),r+N(o),{op:`browser.${s}`,name:t.name,attributes:{[k]:"auto.ui.browser.metrics",...n==="redirect"&&t.redirectCount!=null?{"http.redirect_count":t.redirectCount}:{}}})}function zd(e){return e==="secureConnection"?"connectEnd":e==="fetch"?"domainLookupStart":`${e}End`}function Vd(e,t,n){const r=n+N(t.requestStart),s=n+N(t.responseEnd),i=n+N(t.responseStart);t.responseEnd&&(_e(e,r,s,{op:"browser.request",name:t.name,attributes:{[k]:"auto.ui.browser.metrics"}}),_e(e,i,s,{op:"browser.response",name:t.name,attributes:{[k]:"auto.ui.browser.metrics"}}))}function Yd(e,t,n,r,s,i,o){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const a=t.initiatorType?`resource.${t.initiatorType}`:"resource.other";if(o?.includes(a))return;const c={[k]:"auto.resource.browser.metrics"},u=Ne(n);u.protocol&&(c["url.scheme"]=u.protocol.split(":").pop()),u.host&&(c["server.address"]=u.host),c["url.same_origin"]=n.includes(S.location.origin),Kd(t,c,[["responseStatus","http.response.status_code"],["transferSize","http.response_transfer_size"],["encodedBodySize","http.response_content_length"],["decodedBodySize","http.decoded_response_content_length"],["renderBlockingStatus","resource.render_blocking_status"],["deliveryType","http.response_delivery_type"]]);const d={...c,...Gi(t)},f=i+r,p=f+s;_e(e,f,p,{name:n.replace(S.location.origin,""),op:a,attributes:d})}function Xd(e){const t=S.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&e.setAttribute("connectionType",n.type),Sn(n.rtt)&&(K["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Sn(t.deviceMemory)&&e.setAttribute("deviceMemory",`${t.deviceMemory} GB`),Sn(t.hardwareConcurrency)&&e.setAttribute("hardwareConcurrency",String(t.hardwareConcurrency))}function Jd(e,t){F&&t.recordLcpOnPageloadSpan&&(F.element&&e.setAttribute("lcp.element",Y(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)),Jt?.sources&&t.recordClsOnPageloadSpan&&Jt.sources.forEach((n,r)=>e.setAttribute(`cls.source.${r+1}`,Y(n.node)))}function Kd(e,t,n){n.forEach(([r,s])=>{const i=e[r];i!=null&&(typeof i=="number"&&i{}}const ef=({entries:e})=>{const t=W(),n=t?D(t):void 0,r=n?v(n).description:A().getScopeData().transactionName;e.forEach(s=>{const i=s;if(!i.identifier)return;const o=i.name,a=i.renderTime,c=i.loadTime,[u,d]=c?[N(c),"load-time"]:a?[N(a),"render-time"]:[L(),"entry-emission"],f=o==="image-paint"?N(Math.max(0,(a??0)-(c??0))):0,p={[k]:"auto.ui.browser.elementtiming",[fe]:"ui.elementtiming",[Z]:"component","sentry.span_start_time_source":d,"sentry.transaction_name":r,"element.id":i.id,"element.type":i.element?.tagName?.toLowerCase()||"unknown","element.size":i.naturalWidth&&i.naturalHeight?`${i.naturalWidth}x${i.naturalHeight}`:void 0,"element.render_time":a,"element.load_time":c,"element.url":i.url||void 0,"element.identifier":i.identifier,"element.paint_type":o};Ba({name:`element[${i.identifier}]`,attributes:p,startTime:u,onlyIfParent:!0},l=>{l.end(u+f)})})},tf=1e3;let fs,$n,Fn;function nf(e){Se("dom",e),ye("dom",rf)}function rf(){if(!S.document)return;const e=z.bind(null,"dom"),t=ls(e,!0);S.document.addEventListener("click",t,!1),S.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const s=S[n]?.prototype;s?.hasOwnProperty?.("addEventListener")&&(j(s,"addEventListener",function(i){return function(o,a,c){if(o==="click"||o=="keypress")try{const u=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},d=u[o]=u[o]||{refCount:0};if(!d.handler){const f=ls(e);d.handler=f,i.call(this,o,f,c)}d.refCount++}catch{}return i.call(this,o,a,c)}}),j(s,"removeEventListener",function(i){return function(o,a,c){if(o==="click"||o=="keypress")try{const u=this.__sentry_instrumentation_handlers__||{},d=u[o];d&&(d.refCount--,d.refCount<=0&&(i.call(this,o,d.handler,c),d.handler=void 0,delete u[o]),Object.keys(u).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return i.call(this,o,a,c)}}))})}function sf(e){if(e.type!==$n)return!1;try{if(!e.target||e.target._sentryId!==Fn)return!1}catch{}return!0}function of(e,t){return e!=="keypress"?!1:t?.tagName?!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable):!0}function ls(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=af(n);if(of(n.type,r))return;q(n,"_sentryCaptured",!0),r&&!r._sentryId&&q(r,"_sentryId",V());const s=n.type==="keypress"?"input":n.type;sf(n)||(e({event:n,name:s,global:t}),$n=n.type,Fn=r?r._sentryId:void 0),clearTimeout(fs),fs=S.setTimeout(()=>{Fn=void 0,$n=void 0},tf)}}function af(e){try{return e.target}catch{return null}}let Pt;function mr(e){const t="history";Se(t,e),ye(t,cf)}function cf(){if(S.addEventListener("popstate",()=>{const t=S.location.href,n=Pt;if(Pt=t,n===t)return;z("history",{from:n,to:t})}),!Au())return;function e(t){return function(...n){const r=n.length>2?n[2]:void 0;if(r){const s=Pt,i=uf(String(r));if(Pt=i,s===i)return t.apply(this,n);z("history",{from:s,to:i})}return t.apply(this,n)}}j(S.history,"pushState",e),j(S.history,"replaceState",e)}function uf(e){try{return new URL(e,S.location.origin).toString()}catch{return e}}const Ut={};function df(e){const t=Ut[e];if(t)return t;let n=S[e];if(Pn(n))return Ut[e]=n.bind(S);const r=S.document;if(r&&typeof r.createElement=="function")try{const s=r.createElement("iframe");s.hidden=!0,r.head.appendChild(s);const i=s.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(s)}catch(s){ht&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,s)}return n&&(Ut[e]=n.bind(S))}function ff(e){Ut[e]=void 0}const Fe="__sentry_xhr_v3__";function zi(e){Se("xhr",e),ye("xhr",lf)}function lf(){if(!S.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(t,n,r){const s=new Error,i=L()*1e3,o=ie(r[0])?r[0].toUpperCase():void 0,a=pf(r[1]);if(!o||!a)return t.apply(n,r);n[Fe]={method:o,url:a,request_headers:{}},o==="POST"&&a.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const u=n[Fe];if(u&&n.readyState===4){try{u.status_code=n.status}catch{}const d={endTimestamp:L()*1e3,startTimestamp:i,xhr:n,virtualError:s};z("xhr",d)}};return"onreadystatechange"in n&&typeof n.onreadystatechange=="function"?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply(u,d,f){return c(),u.apply(d,f)}}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(u,d,f){const[p,l]=f,m=d[Fe];return m&&ie(p)&&ie(l)&&(m.request_headers[p.toLowerCase()]=l),u.apply(d,f)}}),t.apply(n,r)}}),e.send=new Proxy(e.send,{apply(t,n,r){const s=n[Fe];if(!s)return t.apply(n,r);r[0]!==void 0&&(s.body=r[0]);const i={startTimestamp:L()*1e3,xhr:n};return z("xhr",i),t.apply(n,r)}})}function pf(e){if(ie(e))return e;try{return e.toString()}catch{}}function mf(e){let t;try{t=e.getAllResponseHeaders()}catch(n){return ht&&g.error(n,"Failed to get xhr response headers",e),{}}return t?t.split(`\r `).reduce((n,r)=>{const[s,i]=r.split(": ");return i&&(n[s.toLowerCase()]=i),n},{}):{}}const yn=[],Bt=new Map,$e=new Map,gf=60;function hf(){if(Tt()&&H()){const t=_f();return()=>{t()}}return()=>{}}const Hn={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 _f(){return Ed(Sf)}const Sf=({metric:e})=>{if(e.value==null)return;const t=N(e.value);if(t>gf)return;const n=e.entries.find(m=>m.duration===e.value&&Hn[m.name]);if(!n)return;const{interactionId:r}=n,s=Hn[n.name],i=N(H()+n.startTime),o=W(),a=o?D(o):void 0,c=r!=null?Bt.get(r):void 0,u=c?.span||a,d=u?v(u).description:A().getScopeData().transactionName,f=c?.elementName||Y(n.target),p={[k]:"auto.http.browser.inp",[fe]:`ui.interaction.${s}`,[Ze]:n.duration},l=pr({name:f,transaction:d,attributes:p,startTime:i});l&&(l.addEvent("inp",{[mt]:"millisecond",[gt]:e.value}),l.end(i+t))};function yf(){const e=Object.keys(Hn);Fu()&&e.forEach(s=>{S.addEventListener(s,t,{capture:!0,passive:!0})});function t(s){const i=s.target;if(!i)return;const o=Y(i),a=Math.round(s.timeStamp);if($e.set(a,o),$e.size>50){const c=$e.keys().next().value;c!==void 0&&$e.delete(c)}}function n(s){const i=Math.round(s.startTime);let o=$e.get(i);if(!o)for(let a=-5;a<=5;a++){const c=$e.get(i+a);if(c){o=c;break}}return o||""}const r=({entries:s})=>{const i=W(),o=i&&D(i);s.forEach(a=>{if(!wd(a))return;const c=a.interactionId;if(c==null||Bt.has(c))return;const u=a.target?Y(a.target):n(a);if(yn.length>10){const d=yn.shift();Bt.delete(d)}yn.push(c),Bt.set(c,{span:o,elementName:u})})};ze("event",r),ze("first-input",r)}const Ef=40;function bf(e,t=df("fetch")){let n=0,r=0;async function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"strict-origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{const c=await t(e.url,a);return{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}}catch(c){throw ff("fetch"),c}finally{n-=o,r--}}return Pc(e,s,ir(e.bufferSize||Ef))}const X=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Tf=30,If=50;function Un(e,t,n,r){const s={filename:e,function:t===""?Ce:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const vf=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Rf=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,wf=/\((\S*)(?::(\d+))(?::(\d+))\)/,Af=/at (.+?) ?\(data:(.+?),/,Nf=e=>{const t=e.match(Af);if(t)return{filename:``,function:t[1]};const n=vf.exec(e);if(n){const[,s,i,o]=n;return Un(s,Ce,+i,+o)}const r=Rf.exec(e);if(r){if(r[2]&&r[2].indexOf("eval")===0){const a=wf.exec(r[2]);a&&(r[2]=a[1],r[3]=a[2],r[4]=a[3])}const[i,o]=Vi(r[1]||Ce,r[2]);return Un(o,i,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}},kf=[Tf,Nf],Cf=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Pf=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Lf=e=>{const t=Cf.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=Pf.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||Ce;return[s,r]=Vi(s,r),Un(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},Of=[If,Lf],xf=[kf,Of],Mf=Ts(...xf),Vi=(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]:Ce,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Lt=1024,Df="Breadcrumbs",$f=((e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:Df,setup(n){t.console&&fu(Bf(n)),t.dom&&nf(Uf(n,t.dom)),t.xhr&&zi(jf(n)),t.fetch&&Ri(qf(n)),t.history&&mr(Wf(n)),t.sentry&&n.on("beforeSendEvent",Hf(n))}}}),Ff=$f;function Hf(e){return function(n){w()===e&&Pe({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:ve(n)},{event:n})}}function Uf(e,t){return function(r){if(w()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>Lt&&(X&&g.warn(`\`dom.maxStringLength\` cannot exceed ${Lt}, but a value of ${a} was configured. Sentry will use ${Lt} instead.`),a=Lt),typeof o=="string"&&(o=[o]);try{const u=r.event,d=Gf(u)?u.target:u;s=Y(d,{keyAttrs:o,maxStringLength:a}),i=Cs(d)}catch{s=""}if(s.length===0)return;const c={category:`ui.${r.name}`,message:s};i&&(c.data={"ui.component_name":i}),Pe(c,{event:r.event,name:r.name,global:r.global})}}function Bf(e){return function(n){if(w()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:pu(n.level),message:vr(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${vr(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;Pe(r,{input:n.args,level:n.level})}}function jf(e){return function(n){if(w()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[Fe];if(!r||!s||!i)return;const{method:o,url:a,status_code:c,body:u}=i,d={method:o,url:a,status_code:c},f={xhr:n.xhr,input:u,startTimestamp:r,endTimestamp:s},p={category:"xhr",data:d,type:"http",level:vi(c)};e.emit("beforeOutgoingRequestBreadcrumb",p,f),Pe(p,f)}}function qf(e){return function(n){if(w()!==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 i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s},a={category:"fetch",data:i,level:"error",type:"http"};e.emit("beforeOutgoingRequestBreadcrumb",a,o),Pe(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:vi(o.status_code)};e.emit("beforeOutgoingRequestBreadcrumb",c,a),Pe(c,a)}}}function Wf(e){return function(n){if(w()!==e)return;let r=n.from,s=n.to;const i=Ne(E.location.href);let o=r?Ne(r):void 0;const a=Ne(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),Pe({category:"navigation",data:{from:r,to:s}})}}function Gf(e){return!!e&&!!e.target}const zf=["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"],Vf="BrowserApiErrors",Yf=((e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:Vf,setupOnce(){t.setTimeout&&j(E,"setTimeout",ps),t.setInterval&&j(E,"setInterval",ps),t.requestAnimationFrame&&j(E,"requestAnimationFrame",Jf),t.XMLHttpRequest&&"XMLHttpRequest"in E&&j(XMLHttpRequest.prototype,"send",Kf);const n=t.eventTarget;n&&(Array.isArray(n)?n:zf).forEach(s=>Zf(s,t))}}}),Xf=Yf;function ps(e){return function(...t){const n=t[0];return t[0]=Ge(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${ae(e)}`}}),e.apply(this,t)}}function Jf(e){return function(t){return e.apply(this,[Ge(t,{mechanism:{data:{handler:ae(e)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function Kf(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&j(n,s,function(i){const o={mechanism:{data:{handler:ae(i)},handled:!1,type:`auto.browser.browserapierrors.xhr.${s}`}},a=Yn(i);return a&&(o.mechanism.data.handler=ae(a)),Ge(i,o)})}),e.apply(this,t)}}function Zf(e,t){const r=E[e]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(j(r,"addEventListener",function(s){return function(i,o,a){try{Qf(o)&&(o.handleEvent=Ge(o.handleEvent,{mechanism:{data:{handler:ae(o),target:e},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return t.unregisterOriginalCallbacks&&el(this,i,o),s.apply(this,[i,Ge(o,{mechanism:{data:{handler:ae(o),target:e},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),a])}}),j(r,"removeEventListener",function(s){return function(i,o,a){try{const c=o.__sentry_wrapped__;c&&s.call(this,i,c,a)}catch{}return s.call(this,i,o,a)}}))}function Qf(e){return typeof e.handleEvent=="function"}function el(e,t,n){e&&typeof e=="object"&&"removeEventListener"in e&&typeof e.removeEventListener=="function"&&e.removeEventListener(t,n)}const tl=()=>({name:"BrowserSession",setupOnce(){if(typeof E.document>"u"){X&&g.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}zr({ignoreDuration:!0}),Vr(),mr(({from:e,to:t})=>{e!==void 0&&e!==t&&(zr({ignoreDuration:!0}),Vr())})}}),nl="GlobalHandlers",rl=((e={})=>{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:nl,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&(il(n),ms("onerror")),t.onunhandledrejection&&(ol(n),ms("onunhandledrejection"))}}}),sl=rl;function il(e){vs(t=>{const{stackParser:n,attachStacktrace:r}=Yi();if(w()!==e||Ai())return;const{msg:s,url:i,line:o,column:a,error:c}=t,u=ul(ur(n,c||s,void 0,r,!1),i,o,a);u.level="error",si(u,{originalException:c,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}function ol(e){Rs(t=>{const{stackParser:n,attachStacktrace:r}=Yi();if(w()!==e||Ai())return;const s=al(t),i=Ue(s)?cl(s):ur(n,s,void 0,r,!0);i.level="error",si(i,{originalException:s,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}function al(e){if(Ue(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 cl(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function ul(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},c=a.frames=a.frames||[],u=r,d=n,f=dl(t)??lt();return c.length===0&&c.push({colno:u,filename:f,function:Ce,in_app:!0,lineno:d}),e}function ms(e){X&&g.log(`Global Handler attached: ${e}`)}function Yi(){return w()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function dl(e){if(!(!ie(e)||e.length===0)){if(e.startsWith("data:")){const t=e.match(/^data:([^;]+)/),n=t?t[1]:"text/javascript",r=e.includes("base64,");return``}return e}}const fl=()=>({name:"HttpContext",preprocessEvent(e){if(!E.navigator&&!E.location&&!E.document)return;const t=or(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}}}),ll="cause",pl=5,ml="LinkedErrors",gl=((e={})=>{const t=e.limit||pl,n=e.key||ll;return{name:ml,preprocessEvent(r,s,i){const o=i.getOptions();du(ar,o.stackParser,n,t,r,s)}}}),hl=gl;function _l(){return Sl()?(X&&Ye(()=>{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 Sl(){if(typeof E.window>"u")return!1;const e=E;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;const n=lt(),r=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(E===E.top&&r.some(i=>n.startsWith(`${i}://`)))}function Bn(e){return[nu(),Zc(),Xf(),Ff(),sl(),hl(),hu(),fl(),tl()]}function yl(e={}){const t=!e.skipBrowserExtensionCheck&&_l();let n=e.defaultIntegrations==null?Bn():e.defaultIntegrations;const r={...e,enabled:t?!1:e.enabled,stackParser:fo(e.stackParser||Mf),integrations:Sc({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||bf};return Bc(Zu,r)}function El(e){return e.split(",").some(t=>t.trim().startsWith("sentry-"))}function Xi(e){try{return new URL(e,E.location.origin).href}catch{return}}function bl(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function Ji(e){try{return new Headers(e)}catch{return}}const gs=new WeakMap,En=new Map,Ki={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Tl(e,t){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o,tracePropagationTargets:a,onRequestSpanStart:c,onRequestSpanEnd:u}={...Ki,...t},d=typeof i=="function"?i:m=>!0,f=m=>Il(m,a),p={},l=e.getOptions().propagateTraceparent;n&&(e.addEventProcessor(m=>(m.type==="transaction"&&m.spans&&m.spans.forEach(y=>{if(y.op==="http.client"){const _=En.get(y.span_id);_&&(y.timestamp=_/1e3,En.delete(y.span_id))}}),m)),s&&Cu(m=>{if(m.response){const y=gs.get(m.response);y&&m.endTimestamp&&En.set(y,m.endTimestamp)}}),Ri(m=>{const y=Eu(m,d,f,p,{propagateTraceparent:l,onRequestSpanEnd:u});if(m.response&&m.fetchData.__span&&gs.set(m.response,m.fetchData.__span),y){const _=Xi(m.fetchData.url),$=_?Ne(_).host:void 0;y.setAttributes({"http.url":_,"server.address":$}),o&&hs(y),c?.(y,{headers:m.headers})}})),r&&zi(m=>{const y=vl(m,d,f,p,l,u);y&&(o&&hs(y),c?.(y,{headers:Ji(m.xhr.__sentry_xhr_v3__?.request_headers)}))})}function hs(e){const{url:t}=v(e).data;if(!t||typeof t!="string")return;const n=ze("resource",({entries:r})=>{r.forEach(s=>{bl(s)&&s.name.endsWith(t)&&(e.setAttributes(Gi(s)),setTimeout(n))})})}function Il(e,t){const n=lt();if(n){let r,s;try{r=new URL(e,n),s=new URL(n).origin}catch{return!1}const i=r.origin===s;return t?me(r.toString(),t)||i&&me(r.pathname,t):i}else{const r=!!e.match(/^\/(?!\/)/);return t?me(e,t):r}}function vl(e,t,n,r,s,i){const o=e.xhr,a=o?.[Fe];if(!o||o.__sentry_own_request__||!a)return;const{url:c,method:u}=a,d=Q()&&t(c);if(e.endTimestamp&&d){const $=o.__sentry_xhr_span_id__;if(!$)return;const U=r[$];U&&a.status_code!==void 0&&(Ds(U,a.status_code),U.end(),i?.(U,{headers:Ji(mf(o)),error:e.error}),delete r[$]);return}const f=Xi(c),p=Ne(f||c),l=Gc(c),m=!!W(),y=d&&m?et({name:`${u} ${l}`,attributes:{url:c,type:"xhr","http.method":u,"http.url":f,"server.address":p?.host,[k]:"auto.http.browser",[fe]:"http.client",...p?.search&&{"http.query":p?.search},...p?.hash&&{"http.fragment":p?.hash}}}):new he;o.__sentry_xhr_span_id__=y.spanContext().spanId,r[o.__sentry_xhr_span_id__]=y,n(c)&&Rl(o,Q()&&m?y:void 0,s);const _=w();return _&&_.emit("beforeOutgoingRequestSpan",y,e),y}function Rl(e,t,n){const{"sentry-trace":r,baggage:s,traceparent:i}=bi({span:t,propagateTraceparent:n});r&&wl(e,r,s,i)}function wl(e,t,n,r){const s=e.__sentry_xhr_v3__?.request_headers;if(!(s?.["sentry-trace"]||!e.setRequestHeader))try{if(e.setRequestHeader("sentry-trace",t),r&&!s?.traceparent&&e.setRequestHeader("traceparent",r),n){const i=s?.baggage;(!i||!El(i))&&e.setRequestHeader("baggage",n)}}catch{}}function Al(){E.document?E.document.addEventListener("visibilitychange",()=>{const e=W();if(!e)return;const t=D(e);if(E.document.hidden&&t){const n="cancelled",{op:r,status:s}=v(t);X&&g.log(`[Tracing] Transaction: ${n} -> since tab moved to the background, op: ${r}`),s||t.setStatus({code:C,message:n}),t.setAttribute("sentry.cancellation_reason","document.hidden"),t.end()}}):X&&g.warn("[Tracing] Could not set up background tab detection due to lack of global document")}const Nl=3600,Zi="sentry_previous_trace",kl="sentry.previous_trace";function Cl(e,{linkPreviousTrace:t,consistentTraceSampling:n}){const r=t==="session-storage";let s=r?Ol():void 0;e.on("spanStart",o=>{if(D(o)!==o)return;const a=A().getPropagationContext();s=Pl(s,o,a),r&&Ll(s)});let i=!0;n&&e.on("beforeSampling",o=>{if(!s)return;const a=A(),c=a.getPropagationContext();if(i&&c.parentSpanId){i=!1;return}a.setPropagationContext({...c,dsc:{...c.dsc,sample_rate:String(s.sampleRate),sampled:String(jn(s.spanContext))},sampleRand:s.sampleRand}),o.parentSampled=jn(s.spanContext),o.parentSampleRate=s.sampleRate,o.spanAttributes={...o.spanAttributes,[Ms]:s.sampleRate}})}function Pl(e,t,n){const r=v(t);function s(){try{return Number(n.dsc?.sample_rate)??Number(r.data?.[Xn])}catch{return 0}}const i={spanContext:t.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!e)return i;const o=e.spanContext;return o.traceId===r.trace_id?e:(Date.now()/1e3-e.startTimestamp<=Nl&&(X&&g.log(`Adding previous_trace ${o} link to span ${{op:r.op,...t.spanContext()}}`),t.addLink({context:o,attributes:{[Ho]:"previous_trace"}}),t.setAttribute(kl,`${o.traceId}-${o.spanId}-${jn(o)?1:0}`)),i)}function Ll(e){try{E.sessionStorage.setItem(Zi,JSON.stringify(e))}catch(t){X&&g.warn("Could not store previous trace in sessionStorage",t)}}function Ol(){try{const e=E.sessionStorage?.getItem(Zi);return JSON.parse(e)}catch{return}}function jn(e){return e.traceFlags===1}const xl="BrowserTracing",Ml={...$t,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,enableReportPageLoaded:!1,_experiments:{},...Ki},Dl=((e={})=>{const t={name:void 0,source:void 0},n=E.document,{enableInp:r,enableElementTiming:s,enableLongTask:i,enableLongAnimationFrame:o,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:d,idleTimeout:f,finalTimeout:p,childSpanTimeout:l,markBackgroundSpan:m,traceFetch:y,traceXHR:_,trackFetchStreamPerformance:$,shouldCreateSpanForRequest:U,enableHTTPTimings:It,ignoreResourceSpans:sn,ignorePerformanceApiSpans:on,instrumentPageLoad:vt,instrumentNavigation:I,detectRedirects:P,linkPreviousTrace:De,consistentTraceSampling:Rt,enableReportPageLoaded:ee,onRequestSpanStart:rt,onRequestSpanEnd:ne}={...Ml,...e};let O,be,te;function le(R,x,b=!0){const M=x.op==="pageload",B=x.name,J=d?d(x):x,Te=J.attributes||{};if(B!==J.name&&(Te[Z]="custom",J.attributes=Te),!b){const st=Oe();et({...J,startTime:st}).end(st);return}t.name=J.name,t.source=Te[Z];const re=ri(J,{idleTimeout:f,finalTimeout:p,childSpanTimeout:l,disableAutoFinish:M,beforeSpanEnd:st=>{O?.(),Bd(st,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:sn,ignorePerformanceApiSpans:on}),Ss(R,void 0);const hr=A(),no=hr.getPropagationContext();hr.setPropagationContext({...no,traceId:re.spanContext().traceId,sampled:Ee(re),dsc:ge(st)}),M&&(te=void 0)},trimIdleSpanEndTimestamp:!ee});M&&ee&&(te=re),Ss(R,re);function gr(){n&&["interactive","complete"].includes(n.readyState)&&R.emit("idleSpanEnableAutoFinish",re)}M&&!ee&&n&&(n.addEventListener("readystatechange",()=>{gr()}),gr())}return{name:xl,setup(R){if(ma(),O=xd({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:R}),r&&hf(),s&&Qd(),o&&T.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?Dd():i&&Md(),a&&$d(),P&&n){const b=()=>{be=L()};addEventListener("click",b,{capture:!0}),addEventListener("keydown",b,{capture:!0,passive:!0})}function x(){const b=ft(R);b&&!v(b).timestamp&&(X&&g.log(`[Tracing] Finishing current active span with op: ${v(b).op}`),b.setAttribute(at,"cancelled"),b.end())}R.on("startNavigationSpan",(b,M)=>{if(w()!==R)return;if(M?.isRedirect){X&&g.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),le(R,{op:"navigation.redirect",...b},!1);return}be=void 0,x(),xe().setPropagationContext({traceId:ue(),sampleRand:Math.random(),propagationSpanId:Q()?void 0:oe()});const B=A();B.setPropagationContext({traceId:ue(),sampleRand:Math.random(),propagationSpanId:Q()?void 0:oe()}),B.setSDKProcessingMetadata({normalizedRequest:void 0}),le(R,{op:"navigation",...b,parentSpan:null,forceTransaction:!0})}),R.on("startPageLoadSpan",(b,M={})=>{if(w()!==R)return;x();const B=M.sentryTrace||_s("sentry-trace"),J=M.baggage||_s("baggage"),Te=ia(B,J),re=A();re.setPropagationContext(Te),Q()||(re.getPropagationContext().propagationSpanId=oe()),re.setSDKProcessingMetadata({normalizedRequest:or()}),le(R,{op:"pageload",...b})}),R.on("endPageloadSpan",()=>{ee&&te&&(te.setAttribute(at,"reportPageLoaded"),te.end())})},afterAllSetup(R){let x=lt();if(De!=="off"&&Cl(R,{linkPreviousTrace:De,consistentTraceSampling:Rt}),E.location){if(vt){const b=H();Qi(R,{name:E.location.pathname,startTime:b?b/1e3:void 0,attributes:{[Z]:"url",[k]:"auto.pageload.browser"}})}I&&mr(({to:b,from:M})=>{if(M===void 0&&x?.indexOf(b)!==-1){x=void 0;return}x=void 0;const B=yi(b),J=ft(R),Te=J&&P&&Hl(J,be);$l(R,{name:B?.pathname||E.location.pathname,attributes:{[Z]:"url",[k]:"auto.navigation.browser"}},{url:b,isRedirect:Te})})}m&&Al(),a&&Fl(R,f,p,l,t),r&&yf(),Tl(R,{traceFetch:y,traceXHR:_,trackFetchStreamPerformance:$,tracePropagationTargets:R.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:U,enableHTTPTimings:It,onRequestSpanStart:rt,onRequestSpanEnd:ne})}}});function Qi(e,t,n){e.emit("startPageLoadSpan",t,n),A().setTransactionName(t.name);const r=ft(e);return r&&e.emit("afterStartPageLoadSpan",r),r}function $l(e,t,n){const{url:r,isRedirect:s}=n||{};e.emit("beforeStartNavigationSpan",t,{isRedirect:s}),e.emit("startNavigationSpan",t,{isRedirect:s});const i=A();return i.setTransactionName(t.name),r&&!s&&i.setSDKProcessingMetadata({normalizedRequest:{...or(),url:r}}),ft(e)}function _s(e){return E.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function Fl(e,t,n,r,s){const i=E.document;let o;const a=()=>{const c="ui.action.click",u=ft(e);if(u){const d=v(u).op;if(["navigation","pageload"].includes(d)){X&&g.warn(`[Tracing] Did not create ${c} span because a pageload or navigation span is in progress.`);return}}if(o&&(o.setAttribute(at,"interactionInterrupted"),o.end(),o=void 0),!s.name){X&&g.warn(`[Tracing] Did not create ${c} transaction because _latestRouteName is missing.`);return}o=ri({name:s.name,op:c,attributes:{[Z]:s.source||"url"}},{idleTimeout:t,finalTimeout:n,childSpanTimeout:r})};i&&addEventListener("click",a,{capture:!0})}const eo="_sentry_idleSpan";function ft(e){return e[eo]}function Ss(e,t){q(e,eo,t)}const ys=1.5;function Hl(e,t){const n=v(e),r=Oe(),s=n.start_timestamp;return!(r-s>ys||t&&r-t<=ys)}const Ul=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;function Bl(e){return E.document?.querySelector(`meta[name=${e}]`)?.getAttribute("content")||void 0}function to(e={}){const t=Dl({...e,instrumentPageLoad:!1});return{...t,afterAllSetup(n){if(t.afterAllSetup?.(n),E.location&&e.instrumentPageLoad!=!1){const r=H(),{name:s,source:i}=jl();Qi(n,{name:s,startTime:r?r/1e3:void 0,attributes:{[Z]:i,[k]:"auto.pageload.astro"}})}}}}function jl(){try{const e=Bl("sentry-route-name");if(e){const t=decodeURIComponent(e);return Ul&&g.log(`[Tracing] Using route name from Sentry HTML meta-tag: ${t}`),{name:t,source:"route"}}}catch{}return{name:E.location.pathname,source:"url"}}function ql(e){const t={defaultIntegrations:Wl(),...e};return Ei(t,"astro",["astro","browser"]),yl(t)}function Wl(e){return typeof __SENTRY_TRACING__>"u"||__SENTRY_TRACING__?[...Bn(),to()]:Bn()}ql({dsn:"https://df5aecd08ea9449f9a96a8f4e0a3a433@o1.ingest.us.sentry.io/162676",sendDefaultPii:!0,integrations:[to()],enableLogs:!0,tracesSampleRate:1});