PageSourceSearch

https://vo.dev/_astro/page.Bm8nvw0p.js

js vo.dev collected 2026-10-04 13:33:27 UTC 147,570 bytes, 21 lines download raw bytes

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

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