girder-sentry 5.0.11.dev31__tar.gz → 5.0.12.dev2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/PKG-INFO +1 -1
- girder_sentry-5.0.12.dev2/girder_sentry/web_client/dist/girder-plugin-sentry.umd.cjs +20 -0
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/girder_sentry.egg-info/PKG-INFO +1 -1
- girder_sentry-5.0.12.dev2/girder_sentry.egg-info/SOURCES.txt +18 -0
- girder_sentry-5.0.12.dev2/girder_sentry.egg-info/scm_file_list.json +21 -0
- girder_sentry-5.0.12.dev2/girder_sentry.egg-info/scm_version.json +8 -0
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/setup.py +1 -2
- girder_sentry-5.0.11.dev31/girder_sentry/web_client/dist/girder-plugin-sentry.umd.cjs +0 -20
- girder_sentry-5.0.11.dev31/girder_sentry.egg-info/SOURCES.txt +0 -1175
- girder_sentry-5.0.11.dev31/girder_sentry.egg-info/scm_file_list.json +0 -1178
- girder_sentry-5.0.11.dev31/girder_sentry.egg-info/scm_version.json +0 -8
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/MANIFEST.in +0 -0
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/girder_sentry/__init__.py +0 -0
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/girder_sentry/rest.py +0 -0
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/girder_sentry/settings.py +0 -0
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/girder_sentry/web_client/dist/style.css +0 -0
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/girder_sentry.egg-info/dependency_links.txt +0 -0
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/girder_sentry.egg-info/entry_points.txt +0 -0
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/girder_sentry.egg-info/not-zip-safe +0 -0
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/girder_sentry.egg-info/requires.txt +0 -0
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/girder_sentry.egg-info/top_level.txt +0 -0
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/plugin.cmake +0 -0
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/pyproject.toml +0 -0
- {girder_sentry-5.0.11.dev31 → girder_sentry-5.0.12.dev2}/setup.cfg +0 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
(function(e){typeof define==`function`&&define.amd?define([],e):e()})(function(){var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),t=`sentry.op`,n=`sentry.origin`,r=`sentry.profile_id`,i=`sentry.exclusive_time`,a=`gen_ai.conversation.id`,o=`10.60.0`,s=globalThis;function c(){return l(s),s}function l(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`10.60.0`,t[o]=t[`10.60.0`]||{}}function u(e,t,n=s){let r=n.__SENTRY__=n.__SENTRY__||{},i=r[o]=r[`10.60.0`]||{};return i[e]||(i[e]=t())}var d=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,f=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],p=`Sentry Logger `,m={};function h(e){if(!(`console`in s))return e();let t=s.console,n={},r=Object.keys(m);r.forEach(e=>{let r=m[e];n[e]=t[e],t[e]=r});try{return e()}finally{r.forEach(e=>{t[e]=n[e]})}}function ee(){se().enabled=!0}function te(){se().enabled=!1}function ne(){return se().enabled}function re(...e){oe(`log`,...e)}function ie(...e){oe(`warn`,...e)}function ae(...e){oe(`error`,...e)}function oe(e,...t){d&&ne()&&h(()=>{s.console[e](`${p}[${e}]:`,...t)})}function se(){return d?u(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var g={enable:ee,disable:te,isEnabled:ne,log:re,warn:ie,error:ae},ce=Object.prototype.toString;function le(e){switch(ce.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return y(e,Error)}}function _(e,t){return ce.call(e)===`[object ${t}]`}function ue(e){return _(e,`ErrorEvent`)}function de(e){return _(e,`DOMError`)}function fe(e){return _(e,`DOMException`)}function v(e){return _(e,`String`)}function pe(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function me(e){return e===null||pe(e)||typeof e!=`object`&&typeof e!=`function`}function he(e){return _(e,`Object`)}function ge(e){return typeof Event<`u`&&y(e,Event)}function _e(e){return _(e,`RegExp`)}function ve(e){return!!(e?.then&&typeof e.then==`function`)}function y(e,t){try{return e instanceof t}catch{return!1}}function ye(e){return typeof Request<`u`&&y(e,Request)}function b(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!=`function`)return;let i=n(r);typeof i==`function`&&be(i,r);try{e[t]=i}catch{d&&g.log(`Failed to replace method "${t}" in object`,e)}}function x(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{d&&g.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function be(e,t){try{e.prototype=t.prototype=t.prototype||{},x(e,`__sentry_original__`,t)}catch{}}function xe(e){return e.__sentry_original__}function Se(e){if(le(e))return{message:e.message,name:e.name,stack:e.stack,...Ce(e)};if(ge(e)){let{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...Ce(e)}}return e}function Ce(e){return typeof e==`object`&&e?Object.fromEntries(Object.entries(e)):{}}function we(e){let t=Object.keys(Se(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var S;function Te(e){if(S!==void 0)return S?S(e):e();let t=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),n=s;return t in n&&typeof n[t]==`function`?(S=n[t],S(e)):(S=null,e())}function Ee(){return Te(()=>Math.random())}function C(){return Te(()=>Date.now())}var De=Symbol.for(`sentry.skipNormalization`),Oe=Symbol.for(`sentry.overrideNormalizationDepth`);function ke(e){return!!e[De]}function Ae(e){let t=e[Oe];return typeof t==`number`?t:void 0}var je=50,Me=/\(error: (.*)\)/,Ne=/captureMessage|captureException/;function Pe(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
|
|
2
|
+
`);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=Me.test(n)?n.replace(Me,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=je+r)break}}return Ie(i.slice(r))}}function Fe(e){return Array.isArray(e)?Pe(...e):e}function Ie(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(Le(t).function||``)&&t.pop(),t.reverse(),Ne.test(Le(t).function||``)&&(t.pop(),Ne.test(Le(t).function||``)&&t.pop()),t.slice(0,je).map(e=>({...e,filename:e.filename||Le(t).filename,function:e.function||`?`}))}function Le(e){return e[e.length-1]||{}}var Re=`<anonymous>`;function w(e){try{return!e||typeof e!=`function`?Re:e.name||Re}catch{return Re}}function ze(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}var Be;function Ve(e){Be=e}function T(e,t=100,n=1/0){try{return Ue(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function He(e,t=3,n=100*1024){let r=T(e,t);return qe(r)>n?He(e,t-1,n):r}function Ue(e,t,n=1/0,r=1/0,i=Je()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=We(e,t);if(!s.startsWith(`[object `))return s;if(ke(t))return t;let c=Ae(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return Ue(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=Se(t);for(let e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(f>=r){d[e]=`[MaxProperties ~]`;break}let t=p[e];d[e]=Ue(e,t,l-1,r,i),f++}return o(t),d}function We(e,t){try{if(Be){let e=Be(t);if(e)return e}return typeof global<`u`&&t===global?`[Global]`:typeof t==`number`&&!Number.isFinite(t)?`[${t}]`:typeof t==`function`?`[Function: ${w(t)}]`:typeof t==`symbol`?`[${String(t)}]`:typeof t==`bigint`?`[BigInt: ${String(t)}]`:`[object ${Ge(t)}]`}catch(e){return`**non-serializable** (${e})`}}function Ge(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function Ke(e){return~-encodeURI(e).split(/%..|./).length}function qe(e){return Ke(JSON.stringify(e))}function Je(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function Ye(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Xe(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];me(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push(We(void 0,r))}return n.join(t)}function E(e,t,n=!1){return v(e)?_e(t)?t.test(e):v(t)?n?e===t:e.includes(t):typeof t==`function`?t(e):!1:!1}function Ze(e,t=[],n=!1){for(let r of t)if(E(e,r,n))return!0;return!1}function Qe(){let e=s;return e.crypto||e.msCrypto}var $e;function et(){return Ee()*16}function D(e=Qe()){try{if(e?.randomUUID)return Te(()=>e.randomUUID()).replace(/-/g,``)}catch{}return $e||=`10000000100040008000100000000000`,$e.replace(/[018]/g,e=>(e^(et()&15)>>e/4).toString(16))}function tt(e){return e.exception?.values?.[0]}function O(e){let{message:t,event_id:n}=e;if(t)return t;let r=tt(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function nt(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function k(e,t){let n=tt(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i?.data,...t.data};n.mechanism.data=e}}function rt(e){if(it(e))return!0;try{x(e,`__sentry_captured__`,!0)}catch{}return!1}function it(e){try{return e.__sentry_captured__}catch{}}var at=1e3;function A(){return C()/at}function ot(){let{performance:e}=s;if(!e?.now||!e.timeOrigin)return A;let t=e.timeOrigin;return()=>(t+Te(()=>e.now()))/at}var st;function j(){return(st??=ot())()}function ct(e){let t=j(),n={sid:D(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>ut(n)};return e&&M(n,e),n}function M(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||j(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:D()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function lt(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),M(e,n)}function ut(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function dt(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=dt(r[e],t[e],n-1));return r}function ft(){return D()}function pt(){return D().substring(16)}function mt(e){try{let t=s.WeakRef;if(typeof t==`function`)return new t(e)}catch{}return e}function ht(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var gt=`_sentrySpan`;function _t(e,t){t?x(e,gt,mt(t)):delete e[gt]}function vt(e){return ht(e[gt])}var yt=100,N=class e{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:ft(),sampleRand:Ee()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,_t(t,vt(this)),t}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&&M(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,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}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,t){return this._extra={...this._extra,[e]:t},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,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof e?n.getScopeData():he(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),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,_t(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ft(),sampleRand:Ee()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:yt;if(n<=0)return this;let r={timestamp:A(),...e,message:e.message?Ye(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),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:vt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=dt(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,t){let n=t?.event_id||D();if(!this._client)return d&&g.warn(`No client configured on scope - will not capture exception!`),n;let r=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){let r=n?.event_id||D();if(!this._client)return d&&g.warn(`No client configured on scope - will not capture message!`),r;let i=n?.syntheticException??Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureEvent(e,t){let n=e.event_id||t?.event_id||D();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(d&&g.warn(`No client configured on scope - will not capture event!`),n)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function bt(){return u(`defaultCurrentScope`,()=>new N)}function xt(){return u(`defaultIsolationScope`,()=>new N)}var St=e=>e instanceof Promise&&!e[Ct],Ct=Symbol(`chained PromiseLike`),wt=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return St(r)&&St(e)?r:Tt(e,r)},Tt=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Ct]:!0}),t},Et=class{constructor(e,t){let n;n=e||new N;let r;r=t||new N,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return ve(n)?wt(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let 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 P(){let e=l(c());return e.stack=e.stack||new Et(bt(),xt())}function Dt(e){return P().withScope(e)}function Ot(e,t){let n=P();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function kt(e){return P().withScope(()=>e(P().getIsolationScope()))}function At(){return{withIsolationScope:kt,withScope:Dt,withSetScope:Ot,withSetIsolationScope:(e,t)=>kt(t),getCurrentScope:()=>P().getScope(),getIsolationScope:()=>P().getIsolationScope()}}function jt(e){let t=l(e);return t.acs?t.acs:At()}var Mt;function Nt(){return Mt?.()}function F(){return jt(c()).getCurrentScope()}function I(){return jt(c()).getIsolationScope()}function Pt(){return u(`globalScope`,()=>new N)}function Ft(...e){let t=jt(c());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function L(){return F().getClient()}function It(e){let t=Nt();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||pt()};return r&&(a.parent_span_id=r),a}var Lt=`production`;function Rt(e){let t=zt(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function zt(e){if(!(!e||!v(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=Bt(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Bt(e)}function Bt(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var Vt=/^o(\d+)\./,Ht=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Ut(e){return e===`http`||e===`https`}function R(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function Wt(e){let t=Ht.exec(e);if(!t){h(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,u=l.split(`/`);if(u.length>1&&(c=u.slice(0,-1).join(`/`),l=u.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return Gt({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function Gt(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function Kt(e){if(!d)return!0;let{port:t,projectId:n,protocol:r}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>e[t]?!1:(g.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:n.match(/^\d+$/)?Ut(r)?t&&isNaN(parseInt(t,10))?(g.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(g.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(g.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function qt(e){return e.match(Vt)?.[1]}function Jt(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=qt(n)),r}function Yt(e){let t=typeof e==`string`?Wt(e):Gt(e);if(!(!t||!Kt(t)))return t}function Xt(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||L()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Zt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function Qt(e,t){let{value:n,unit:r}=Zt(e)?e:{value:e,unit:void 0},i=en(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function $t(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=Qt(i,t);e&&(n[r]=e)}return n}function en(e){if(Array.isArray(e))return{value:e,type:`array`};let t=typeof e==`string`?`string`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?Number.isInteger(e)?`integer`:`double`:null;if(t)return{value:e,type:t}}var tn=`_sentryScope`,nn=`_sentryIsolationScope`;function rn(e){let t=e;return{scope:t[tn],isolationScope:ht(t[nn])}}function an(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var on=!1;function sn(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:dn(e).parent_span_id,a=rn(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||pt():t,trace_id:n}}function cn(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function ln(e){return typeof e==`number`?un(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?un(e.getTime()):j()}function un(e){return e>9999999999?e/1e3:e}function dn(e){if(hn(e))return e.getSpanJSON();let{spanId:r,traceId:i}=e.spanContext();if(mn(e)){let{attributes:a,startTime:o,name:s,endTime:c,status:l,links:u}=e;return{span_id:r,trace_id:i,data:a,description:s,parent_span_id:fn(e),start_timestamp:ln(o),timestamp:ln(c)||void 0,status:_n(l),op:a[t],origin:a[n],links:cn(u)}}return{span_id:r,trace_id:i,start_timestamp:0,data:{}}}function fn(e){return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0}function pn(e){return{...e,attributes:$t(e.attributes),links:e.links?.map(e=>({...e,attributes:$t(e.attributes)}))}}function mn(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function hn(e){return typeof e.getSpanJSON==`function`}function gn(e){let{traceFlags:t}=e.spanContext();return t===1}function _n(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}var vn=`_sentryRootSpan`,yn=bn;function bn(e){return e[vn]||e}function xn(){on||=(h(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}var Sn=Symbol.for(`sentry.nonRecordingSpan`);function Cn(e){return!!e&&e[Sn]===!0}var wn=`_frozenDsc`;function Tn(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:Jt(t)};return t.emit(`createDsc`,i),i}function En(e,t){let n=t.getPropagationContext();return n.dsc||Tn(n.traceId,e)}function Dn(e){let t=L();if(!t)return{};let n=yn(e),r=dn(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[wn];if(c)return s(c);if(Cn(n)&&!Xt(t.getOptions())){let e=rn(n).scope;if(e)return s({...En(t,e)})}let l=a?.get(`sentry.dsc`),u=l&&Rt(l);if(u)return s(u);let d=Tn(e.spanContext().traceId,t),f=i[`sentry.source`]??i[`sentry.span.source`],p=r.description;return f!==`url`&&p&&(d.transaction=p),Xt()&&(d.sampled=String(gn(n)),d.sample_rand=a?.get(`sentry.sample_rand`)??rn(n).scope?.getPropagationContext().sampleRand.toString()),s(d),t.emit(`createDsc`,d,n),d}function On(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;jn(e,t),r&&Pn(e,r),Fn(e,n),Mn(e,i),Nn(e,a)}function kn(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:m,span:h}=t;z(e,`extra`,n),z(e,`tags`,r),z(e,`attributes`,i),z(e,`user`,a),z(e,`contexts`,o),e.sdkProcessingMetadata=dt(e.sdkProcessingMetadata,c,2),s&&(e.level=s),m&&(e.transactionName=m),h&&(e.span=h),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function z(e,t,n){e[t]=dt(e[t],n,1)}function An(e,t){let n=Pt().getScopeData();return e&&kn(n,e.getScopeData()),t&&kn(n,t.getScopeData()),n}function jn(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function Mn(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Nn(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Pn(e,t){e.contexts={trace:sn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Dn(t),...e.sdkProcessingMetadata};let n=dn(yn(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function Fn(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function In(e){return!!e&&typeof e==`function`&&`_streamed`in e&&!!e._streamed}function Ln(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}function Rn(e){g.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function zn(e,t){if(!t?.length)return!1;for(let n of t){if(Hn(n)){if(e.description&&E(e.description,n))return d&&Rn(e),!0;continue}let t=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!t)continue;let r=n.name?e.description&&E(e.description,n.name):!0,i=n.op?e.op&&E(e.op,n.op):!0,a=n.attributes?Object.entries(n.attributes).every(([t,n])=>Bn(e.attributes?.[t],n)):!0;if(r&&i&&a)return d&&Rn(e),!0}return!1}function Bn(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?E(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function Vn(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function Hn(e){return typeof e==`string`||e instanceof RegExp}function Un(e){return e.getOptions().traceLifecycle===`stream`}function B(e,t=[]){return[e,t]}function Wn(e,t){let[n,r]=e;return[n,[...r,t]]}function Gn(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function Kn(e,t){return Gn(e,(e,n)=>t.includes(n))}function qn(e){let t=l(s);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Jn(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[qn(r),e]:r.push(typeof e==`string`?qn(e):e)}for(let e of n){let[t,n]=e;if(i(`
|
|
3
|
+
${JSON.stringify(t)}
|
|
4
|
+
`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(T(n))}i(e)}}return typeof r==`string`?r:Yn(r)}function Yn(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Xn(e){let t=typeof e.data==`string`?qn(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Zn={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 Qn(e){return e in Zn}function $n(e){return Qn(e)?Zn[e]:e}function er(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function tr(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date(C()).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:R(r)},...i&&{trace:i}}}function nr(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function rr(e,t,n,r){let i=er(n);return B({sent_at:new Date(C()).toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:R(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function ir(e,t,n,r){let i=er(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;nr(e,n?.sdk);let o=tr(e,i,r,t);return delete e.sdkProcessingMetadata,B(o,[[{type:a},e]])}var ar=0,or=1,sr=2;function V(e){return new lr(t=>{t(e)})}function cr(e){return new lr((t,n)=>{n(e)})}var lr=class e{constructor(e){this._state=ar,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===ar)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===or&&e[1](this._value),this._state===sr&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===ar){if(ve(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(or,e)},r=e=>{t(sr,e)};try{e(n,r)}catch(e){r(e)}}};function ur(e,t,n,r=0){try{let i=dr(t,n,e,r);return ve(i)?i:V(i)}catch(e){return cr(e)}}function dr(e,t,n,r){let i=n[r];if(!e||!i)return e;let a=i({...e},t);return d&&a===null&&g.log(`Event processor "${i.id||`?`}" dropped event`),ve(a)?a.then(e=>dr(e,t,n,r+1)):dr(a,t,n,r+1)}var H,fr,pr,U;function mr(e){let t=s._sentryDebugIds,n=s._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],i=n?Object.keys(n):[];if(U&&r.length===fr&&i.length===pr)return U;fr=r.length,pr=i.length,U={},H||={};let a=(t,n)=>{for(let r of t){let t=n[r],i=H?.[r];if(i&&U&&t)U[i[0]]=t,H&&(H[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&U&&H){U[i]=t,H[r]=[i,t];break}}}}};return t&&a(r,t),n&&a(i,n),U}function hr(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||D(),timestamp:t.timestamp||A()},l=n.integrations||e.integrations.map(e=>e.name);gr(c,e),yr(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&_r(c,e.stackParser);let u=xr(r,n.captureContext);n.mechanism&&k(c,n.mechanism);let d=i?i.getEventProcessors():[],f=An(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),On(c,f);let m=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?V(c):ur(m,c,n)).then(e=>(e&&vr(e),typeof o==`number`&&o>0?br(e,o,s):e))}function gr(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=Ye(o.url,a)),a&&e.exception?.values?.forEach(e=>{e.value&&=Ye(e.value,a)})}function _r(e,t){let n=mr(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function vr(e){let t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function yr(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function br(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:T(e.data,t,n)}}))},...e.user&&{user:T(e.user,t,n)},...e.contexts&&{contexts:T(e.contexts,t,n)},...e.extra&&{extra:T(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=T(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:T(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=T(e.contexts.flags,3,n)),r}function xr(e,t){if(!t)return e;let n=e?e.clone():new N;return n.update(t),n}function Sr(e){if(e)return Cr(e)||Tr(e)?{captureContext:e}:e}function Cr(e){return e instanceof N||typeof e==`function`}var wr=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function Tr(e){return Object.keys(e).some(e=>wr.includes(e))}function Er(e,t){return F().captureException(e,Sr(t))}function Dr(e,t){return F().captureEvent(e,t)}function Or(e){let t=I(),{user:n}=An(t,F()),{userAgent:r}=s.navigator||{},i=ct({user:n,...r&&{userAgent:r},...e}),a=t.getSession();return a?.status===`ok`&&M(a,{status:`exited`}),kr(),t.setSession(i),i}function kr(){let e=I(),t=F().getSession()||e.getSession();t&<(t),Ar(),e.setSession()}function Ar(){let e=I(),t=L(),n=e.getSession();n&&t&&t.captureSession(n)}function jr(e=!1){if(e){kr();return}Ar()}function Mr(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function Nr(e){return`${Mr(e)}${e.projectId}/envelope/`}function Pr(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Fr(e,t,n){return t||`${Nr(e)}?${Pr(e,n)}`}var Ir=[];function Lr(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function Rr(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return Lr(r)}function zr(e,t){let n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&Vr(e,t,n)}),n}function Br(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Vr(e,t,n){if(n[t.name]){d&&g.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Ir.includes(t.name)&&typeof t.setupOnce==`function`&&(t.setupOnce(),Ir.push(t.name)),t.setup&&typeof t.setup==`function`&&t.setup(e),typeof t.preprocessEvent==`function`){let n=t.preprocessEvent.bind(t);e.on(`preprocessEvent`,(t,r)=>n(t,r,e))}if(typeof t.processEvent==`function`){let n=t.processEvent.bind(t),r=Object.assign((t,r)=>n(t,r,e),{id:t.name});e.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(n=>{let r=t[n];typeof r==`function`&&e.on(n,n=>r.call(t,n,e))}),d&&g.log(`Integration installed: ${t.name}`)}function W(e){return e}function Hr(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function Ur(){return`npm`}function Wr(){return!Hr()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function Gr(){return typeof window<`u`&&(!Wr()||Kr())}function Kr(){return s.process?.type===`renderer`}function qr(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...Gr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function Jr(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=R(r)),B(a,[qr(e,i)])}function Yr(e,t){let n=t??Xr(e)??[];if(n.length===0)return;let r=e.getOptions(),i=Jr(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);Zr().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function Xr(e){return Zr().get(e)}function Zr(){return u(`clientToLogBufferMap`,()=>new WeakMap)}function Qr(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...Gr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function $r(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=R(r)),B(a,[Qr(e,i)])}function ei(e,t){let n=t??ti(e)??[];if(n.length===0)return;let r=e.getOptions(),i=$r(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);ni().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function ti(e){return ni().get(e)}function ni(){return u(`clientToMetricBufferMap`,()=>new WeakMap)}function ri(e){return pn({trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||``,start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status===`ok`||e.status===`cancelled`?`ok`:`error`,is_segment:!1,attributes:{...e.data},links:e.links})}function ii(e,t){if(e.type!==`transaction`||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!t.getOptions().streamGenAiSpans||Un(t))return;let n=[],r=[];for(let t of e.spans)t.op?.startsWith(`gen_ai.`)?n.push(ri(t)):r.push(t);if(n.length===0)return;e.spans=r;let i=t.getDataCollectionOptions().userInfo?`auto`:`never`;return[{type:`span`,item_count:n.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,...Gr()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}function ai(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}var oi=Symbol.for(`SentryBufferFullError`);function si(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return cr(oi);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return V(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>ai(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var ci=60*1e3;function li(e,t=C()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?ci:r-t}function ui(e,t){return e[t]||e.all||0}function di(e,t,n=C()){return ui(e,t)>n}function fi(e,{statusCode:t,headers:n},r=C()){let i={...e},a=n?.[`x-sentry-rate-limits`],o=n?.[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+li(o,r):t===429&&(i.all=r+60*1e3);return i}function pi(e,t,n=si(e.bufferSize||64)){let r={},i=e=>n.drain(e);function a(i){let a=[];if(Gn(i,(t,n)=>{let i=$n(n);di(r,i)?e.recordDroppedEvent(`ratelimit_backoff`,i):a.push(t)}),a.length===0)return Promise.resolve({});let o=B(i[0],a),s=t=>{if(Kn(o,[`client_report`])){d&&g.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`);return}Gn(o,(n,r)=>{e.recordDroppedEvent(t,$n(r))})};return n.add(()=>t({body:Jn(o)}).then(e=>e.statusCode===413?(d&&g.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),s(`send_error`),e):(d&&e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&g.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=fi(r,e),e),e=>{throw s(`network_error`),d&&g.error(`Encountered error running transport request:`,e),e})).then(e=>e,e=>{if(e===oi)return d&&g.error(`Skipped sending event because buffer is full.`),s(`queue_overflow`),Promise.resolve({});throw e})}return{send:a,flush:i}}function mi(e,t,n){let r=[{type:`client_report`},{timestamp:n||A(),discarded_events:e}];return B(t?{dsn:t}:{},[r])}function hi(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function gi(e){let{trace_id:t,parent_span_id:n,span_id:a,status:o,origin:s,data:c,op:l}=e.contexts?.trace??{};return{data:c??{},description:e.transaction,op:l,parent_span_id:n,span_id:a??``,start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??``,origin:s,profile_id:c?.[r],exclusive_time:c?.[i],measurements:e.measurements,is_segment:!0}}function _i(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}var vi=[`forwarded`,`-ip`,`remote-`,`via`,`-user`];function yi(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:7}:{userInfo:!1,cookies:{deny:vi},httpHeaders:{request:{deny:vi},response:{deny:vi}},httpBodies:[],queryParams:{deny:vi},genAI:{inputs:!1,outputs:!1},stackFrameVariables:!0,frameContextLines:7}}var bi={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};function xi(e){let t=e.dataCollection==null?yi(e.sendDefaultPii):bi,n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,queryParams:n.queryParams??t.queryParams,genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}var Si=`Not capturing exception because it's already been captured.`,Ci=`Discarded session because of missing or non-string release`,wi=Symbol.for(`SentryInternalError`),Ti=Symbol.for(`SentryDoNotSendEventError`),Ei=5e3;function Di(e){return{message:e,[wi]:!0}}function Oi(e){return{message:e,[Ti]:!0}}function ki(e){return!!e&&typeof e==`object`&&wi in e}function Ai(e){return!!e&&typeof e==`object`&&Ti in e}function ji(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)i(e);else if(!s){let t=e.getOptions()._flushInterval??Ei;t>0&&(s=!0,o=ai(setTimeout(()=>{i(e)},t)))}}),e.on(`flush`,()=>{i(e)})}var Mi=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=si(e.transportOptions?.bufferSize??64),this._dataCollection=xi(e),e.dsn?this._dsn=Yt(e.dsn):d&&g.warn(`No DSN provided, client will not send events.`),this._dsn){let t=Fr(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:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&ji(this,`afterCaptureLog`,`flushLogs`,zi,Yr),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&ji(this,`afterCaptureMetric`,`flushMetrics`,Ri,ei)}captureException(e,t,n){let r=D();if(rt(e))return d&&g.log(Si),r;let i={event_id:r,...t};return this._process(()=>this.eventFromException(e,i).then(e=>this._captureEvent(e,i,n)).then(e=>e),`error`),i.event_id}captureMessage(e,t,n,r){let i={event_id:D(),...n},a=pe(e)?e:String(e),o=me(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,t,n){let r=D();if(t?.originalException&&rt(t.originalException))return d&&g.log(Si),r;let i={event_id:r,...t},a=e.sdkProcessingMetadata||{},o=a.capturedSpanScope,s=a.capturedSpanIsolationScope,c=Ni(e.type);return this._process(()=>this._captureEvent(e,i,o||n,s),c),i.event_id}captureSession(e){this.sendSession(e),M(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){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){Yr(this);let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}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){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),Vr(this,e,this._integrations),t||Br(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=ii(e,this),r=ir(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])r=Wn(r,Xn(e));n&&(r=Wn(r,n)),this.sendEnvelope(r).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:t,environment:n=Lt}=this._options;if(`aggregates`in e){let r=e.attrs||{};if(!r.release&&!t){d&&g.warn(Ci);return}r.release=r.release||t,r.environment=r.environment||n,e.attrs=r}else{if(!e.release&&!t){d&&g.warn(Ci);return}e.release=e.release||t,e.environment=e.environment||n}this.emit(`beforeSendSession`,e);let r=rr(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(e,t,n=1){if(this._options.sendClientReports){let r=`${e}:${t}`;d&&g.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:``}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return d&&g.error(`Error while sending envelope:`,e),{}}return d&&g.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=zr(this,e),Br(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception?.values;if(i){r=!0,n=!1;for(let e of i)if(e.mechanism?.handled===!1){n=!0;break}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(M(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),hr(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...e.contexts?.trace,...It(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:En(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,t={},n=F(),r=I()){return d&&Ii(e)&&g.log(`Captured error event \`${hi(e)[0]||`<unknown>`}\``),this._processEvent(e,t,n,r).then(e=>e.event_id,e=>{d&&(Ai(e)?g.log(e.message):ki(e)?g.warn(e.message):g.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=Li(e),s=Ii(e),c=`before send for type \`${e.type||`error`}\``,l=a===void 0?void 0:an(a);if(s&&typeof l==`number`&&Ee()>l)return this.recordDroppedEvent(`sample_rate`,`error`),cr(Oi(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));let u=Ni(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw this.recordDroppedEvent(`event_processor`,u),Oi("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?e:Pi(Fi(this,i,e,t),c)}).then(i=>{if(i===null){if(this.recordDroppedEvent(`before_send`,u),o){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw Oi(`${c} returned \`null\`, will not send event.`)}let a=n.getSession()||r.getSession();if(s&&a&&this._updateSessionFromEvent(a,i),o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let l=i.transaction_info;return o&&l&&i.transaction!==e.transaction&&(i.transaction_info={...l,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw Ai(e)||ki(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),Di(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
5
|
+
Reason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===oi&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){d&&g.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0){d&&g.log(`No outcomes to send`);return}if(!this._dsn){d&&g.log(`No dsn provided, will not send outcomes`);return}d&&g.log(`Sending outcomes:`,e);let t=mi(e,this._options.tunnel&&R(this._dsn));this.sendEnvelope(t)}};function Ni(e){return e===`replay_event`?`replay`:e||`error`}function Pi(e,t){let n=`${t} must return \`null\` or a valid event.`;if(ve(e))return e.then(e=>{if(!he(e)&&e!==null)throw Di(n);return e},e=>{throw Di(`${t} rejected with ${e}`)});if(!he(e)&&e!==null)throw Di(n);return e}function Fi(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,ignoreSpans:o}=t,s=!In(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(Ii(c)&&i)return i(c,r);if(Li(c)){if(s||o){let t=gi(c);if(o?.length&&zn({description:t.description,op:t.op,attributes:t.data},o))return null;if(s){let e=s(t);e?c=dt(n,_i(e)):xn()}if(c.spans){let t=[],n=c.spans;for(let e of n){if(o?.length&&zn({description:e.description,op:e.op,attributes:e.data},o)){Vn(n,e);continue}if(s){let n=s(e);n?t.push(n):(xn(),t.push(e))}else t.push(e)}let r=c.spans.length-t.length;r&&e.recordDroppedEvent(`before_send`,`span`,r),c.spans=t}}if(a){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(c,r)}}return c}function Ii(e){return e.type===void 0}function Li(e){return e.type===`transaction`}function Ri(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Bi(e.attributes)}function zi(e){let t=0;return e.message&&(t+=e.message.length*2),t+Bi(e.attributes)}function Bi(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*Vi(e[0]):me(e)?t+=Vi(e):t+=100}),t}function Vi(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function Hi(e,t){t.debug===!0&&(d?g.enable():h(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),F().update(t.initialScope);let n=new e(t);return Ui(n),n.init(),n}function Ui(e){F().setClient(e)}function Wi(e){`aggregates`in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`}):e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function Gi(e,t,n=[t],r=`npm`){let i=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${t}`,i.packages=n.map(e=>({name:`${r}:@sentry/${e}`,version:o})),i.version=o)}var Ki=100;function G(e,t){let n=L(),r=I();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Ki}=n.getOptions();if(a<=0)return;let o={timestamp:A(),...e},s=i?h(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var qi,Ji=`FunctionToString`,Yi=new WeakMap,Xi=W((()=>({name:Ji,setupOnce(){qi=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=xe(this),n=Yi.has(L())&&t!==void 0?t:this;return qi.apply(n,e)}}catch{}},setup(e){Yi.set(e,!0)}}))),Zi=[/^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$/],Qi=`EventFilters`,$i=W((e={})=>{let t;return{name:Qi,setup(n){t=ta(e,n.getOptions())},processEvent(n,r,i){return t||=ta(e,i.getOptions()),na(n,t)?null:n}}}),ea=W(((e={})=>({...$i(e),name:`InboundFilters`})));function ta(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Zi],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function na(e,t){if(!e.type){if(ra(e,t.ignoreErrors))return d&&g.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
6
|
+
Event: ${O(e)}`),!0;if(la(e))return d&&g.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
7
|
+
Event: ${O(e)}`),!0;if(aa(e,t.denyUrls))return d&&g.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
8
|
+
Event: ${O(e)}.
|
|
9
|
+
Url: ${ca(e)}`),!0;if(!oa(e,t.allowUrls))return d&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
10
|
+
Event: ${O(e)}.
|
|
11
|
+
Url: ${ca(e)}`),!0}else if(e.type===`transaction`&&ia(e,t.ignoreTransactions))return d&&g.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
12
|
+
Event: ${O(e)}`),!0;return!1}function ra(e,t){return t?.length?hi(e).some(e=>Ze(e,t)):!1}function ia(e,t){if(!t?.length)return!1;let n=e.transaction;return n?Ze(n,t):!1}function aa(e,t){if(!t?.length)return!1;let n=ca(e);return n?Ze(n,t):!1}function oa(e,t){if(!t?.length)return!0;let n=ca(e);return n?Ze(n,t):!0}function sa(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function ca(e){try{let t=[...e.exception?.values??[]].reverse().find(e=>e.mechanism?.parent_id===void 0&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return t?sa(t):null}catch{return d&&g.error(`Cannot extract url for event ${O(e)}`),null}}function la(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}var ua=`Dedupe`,da=W((()=>{let e;return{name:ua,processEvent(t){if(t.type)return t;try{if(fa(t,e))return d&&g.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=t}}}));function fa(e,t){return t?!!(pa(e,t)||ma(e,t)):!1}function pa(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!ga(e,t)||!ha(e,t))}function ma(e,t){let n=_a(t),r=_a(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!ga(e,t)||!ha(e,t))}function ha(e,t){let n=ze(e),r=ze(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function ga(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function _a(e){return e.exception?.values?.[0]}var va=`ConversationId`,ya=W((()=>({name:va,setup(e){e.on(`spanStart`,e=>{let t=F().getScopeData(),n=I().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=dn(e);if(!t?.startsWith(`gen_ai.`)&&!n[`ai.operationId`]&&!i?.startsWith(`ai.`))return;e.setAttribute(a,r)}})}})));function ba(e,t,n,r,i,a){if(!i.exception?.values||!a||!y(a.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=xa(e,t,r,a.originalException,n,i.exception.values,o,0))}function xa(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(y(r[i],Error)){Ca(o,s,r);let a=e(t,r[i]),l=c.length;wa(a,i,l,s),c=xa(e,t,n,r[i],i,[a,...c],a,l)}return Sa(r)&&r.errors.forEach((a,l)=>{if(y(a,Error)){Ca(o,s,r);let u=e(t,a),d=c.length;wa(u,`errors[${l}]`,d,s),c=xa(e,t,n,a,i,[u,...c],u,d)}}),c}function Sa(e){return Array.isArray(e.errors)}function Ca(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...Sa(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function wa(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function Ta(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var Ea={},Da={};function K(e,t){return Ea[e]=Ea[e]||[],Ea[e].push(t),()=>{let n=Ea[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function q(e,t){if(!Da[e]){Da[e]=!0;try{t()}catch(t){d&&g.error(`Error while instrumenting ${e}`,t)}}}function J(e,t){let n=e&&Ea[e];if(n)for(let r of n)try{r(t)}catch(t){d&&g.error(`Error while triggering instrumentation handler.
|
|
13
|
+
Type: ${e}
|
|
14
|
+
Name: ${w(r)}
|
|
15
|
+
Error:`,t)}}var Oa=new Set([]);function ka(e){let t=`console`,n=K(t,e);return q(t,Aa),n}function Aa(){`console`in s&&f.forEach(function(e){e in s.console&&b(s.console,e,function(t){return m[e]=t,function(...t){let n=t[0],r=m[e],i=Oa.size&&typeof n==`string`&&Ze(n,Oa);i||J(`console`,{args:t,level:e}),(!i||d&&g.isEnabled())&&r?.apply(s.console,t)}})})}var ja=s;function Ma(){return`history`in ja&&!!ja.history}function Na(){if(!(`fetch`in ja))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function Pa(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Fa(){if(typeof EdgeRuntime==`string`)return!0;if(!Na())return!1;if(Pa(ja.fetch))return!0;let e=!1,t=ja.document;if(t&&typeof t.createElement==`function`)try{let n=t.createElement(`iframe`);n.hidden=!0,t.head.appendChild(n),n.contentWindow?.fetch&&(e=Pa(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){d&&g.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function Ia(e,t){let n=`fetch`,r=K(n,e);return q(n,()=>La(void 0,t)),r}function La(e,t=!1){t&&!Fa()||b(s,`fetch`,function(t){return function(...n){let r=Error(),{method:i,url:a}=Ba(n),o={args:n,fetchData:{method:i,url:a},startTimestamp:j()*1e3,virtualError:r,headers:Va(n)};return e||J(`fetch`,{...o}),t.apply(s,n).then(async t=>(e?e(t):J(`fetch`,{...o,endTimestamp:j()*1e3,response:t}),t),e=>{J(`fetch`,{...o,endTimestamp:j()*1e3,error:e}),le(e)&&e.stack===void 0&&(e.stack=r.stack,x(e,`framesToPop`,1));let t=L()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&e instanceof TypeError&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(o.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:x(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})}function Ra(e,t){return!!e&&typeof e==`object`&&!!e[t]}function za(e){return typeof e==`string`?e:e?Ra(e,`url`)?e.url:e.toString?e.toString():``:``}function Ba(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:za(t),method:Ra(n,`method`)?String(n.method).toUpperCase():ye(t)&&Ra(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:za(t),method:Ra(t,`method`)?String(t.method).toUpperCase():`GET`}}function Va(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(ye(t))return new Headers(t.headers)}catch{}}var Ha=null;function Ua(e){let t=`error`;K(t,e),q(t,Wa)}function Wa(){Ha=s.onerror,s.onerror=function(e,t,n,r,i){return J(`error`,{column:r,error:i,line:n,msg:e,url:t}),Ha?Ha.apply(this,arguments):!1},s.onerror.__SENTRY_INSTRUMENTED__=!0}var Ga=null;function Ka(e){let t=`unhandledrejection`;K(t,e),q(t,qa)}function qa(){Ga=s.onunhandledrejection,s.onunhandledrejection=function(e){return J(`unhandledrejection`,e),Ga?Ga.apply(this,arguments):!0},s.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Ja(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}function Ya(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Xa(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function Za(e){return le(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function Qa(e){return Za(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var $a=s;function eo(){try{return $a.document.location.href}catch{return``}}function to(e,t=5){if(!$a.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){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}function no(e,t){let n=ao(e,t),r={type:uo(t),value:fo(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function ro(e,t,n,r){let i=L()?.getOptions().normalizeDepth,a=yo(t),o={__serialized__:He(t,i)};if(a)return{exception:{values:[no(e,a)]},extra:o};let s={exception:{values:[{type:ge(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:_o(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=ao(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function io(e,t){return{exception:{values:[no(e,t)]}}}function ao(e,t){let n=t.stacktrace||t.stack||``,r=so(t),i=co(t);try{return e(n,r,i)}catch{}return[]}var oo=/Minified React error #\d+;/i;function so(e){return e&&oo.test(e.message)?1:0}function co(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function lo(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0?e instanceof WebAssembly.Exception:!1}function uo(e){let t=e?.name;return!t&&lo(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function fo(e){let t=e?.message;return lo(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?Qa(t.error):Qa(e):`No error message`}function po(e,t,n,r){let i=ho(e,t,n?.syntheticException||void 0,r);return k(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),V(i)}function mo(e,t,n=`info`,r,i){let a=go(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),V(a)}function ho(e,t,n,r,i){let a;if(ue(t)&&t.error)return io(e,t.error);if(de(t)||fe(t)){let i=t;if(`stack`in t){a=io(e,t);let i=a.exception?.values?.[0];if(r&&n&&i&&!i.stacktrace){let t=ao(e,n);t.length&&(i.stacktrace={frames:t},k(a,{synthetic:!0}))}}else{let t=i.name||(de(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=go(e,o,n,r),nt(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return le(t)?io(e,t):he(t)||ge(t)?(a=ro(e,t,n,i),k(a,{synthetic:!0}),a):(a=go(e,t,n,r),nt(a,`${t}`,void 0),k(a,{synthetic:!0}),a)}function go(e,t,n,r){let i={};if(r&&n){let r=ao(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),k(i,{synthetic:!0})}if(pe(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function _o(e,{isUnhandledRejection:t}){let n=we(e),r=t?`promise rejection`:`exception`;return ue(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:ge(e)?`Event \`${vo(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function vo(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function yo(e){return Object.values(e).find(e=>e instanceof Error)}var Y=s,bo=0;function xo(){return bo>0}function So(){bo++,setTimeout(()=>{bo--})}function X(e,t={}){function n(e){return typeof e==`function`}if(!n(e))return e;try{if(Object.prototype.hasOwnProperty.call(e,`__sentry_wrapped__`)){let t=e.__sentry_wrapped__;return typeof t==`function`?t:e}if(xe(e))return e}catch{return e}let r=function(...n){s._sentryWrappedDepth=(s._sentryWrappedDepth||0)+1;try{let r=n.map(e=>X(e,t));return e.apply(this,r)}catch(e){throw So(),Ft(r=>{r.addEventProcessor(e=>(t.mechanism&&(nt(e,void 0,void 0),k(e,t.mechanism)),e.extra={...e.extra,arguments:n},e)),Er(e)}),e}finally{s._sentryWrappedDepth=(s._sentryWrappedDepth||0)-1}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch{}be(r,e),x(e,`__sentry_wrapped__`,r);try{Object.getOwnPropertyDescriptor(r,`name`).configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Co(){let e=eo(),{referrer:t}=Y.document||{},{userAgent:n}=Y.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}var wo=class extends Mi{constructor(e){let t=To(e);Gi(t,`browser`,[`browser`],Y.SENTRY_SDK_SOURCE||Ur()),super(t);let{userInfo:n}=this.getDataCollectionOptions();t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:n?`auto`:`never`,...t._metadata.sdk.settings});let{sendClientReports:r,enableLogs:i,_experiments:a,enableMetrics:o}=this._options,s=o??a?.enableMetrics??!0;Y.document&&(r||i||s)&&Y.document.addEventListener(`visibilitychange`,()=>{Y.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),i&&Yr(this),s&&ei(this))}),n&&this.on(`beforeSendSession`,Wi)}eventFromException(e,t){return po(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return mo(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n,r)}};function To(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:Y.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var Z=s,Eo=1e3,Do,Oo,ko;function Ao(e){K(`dom`,e),q(`dom`,jo)}function jo(){if(!Z.document)return;let e=J.bind(null,`dom`),t=Po(e,!0);Z.document.addEventListener(`click`,t,!1),Z.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=Z[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(b(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=Po(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),b(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function Mo(e){if(e.type!==Oo)return!1;try{if(!e.target||e.target._sentryId!==ko)return!1}catch{}return!0}function No(e,t){return e===`keypress`?t?.tagName?!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!0:!1}function Po(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=Fo(n);if(No(n.type,r))return;x(n,`_sentryCaptured`,!0),r&&!r._sentryId&&x(r,`_sentryId`,D());let i=n.type===`keypress`?`input`:n.type;Mo(n)||(e({event:n,name:i,global:t}),Oo=n.type,ko=r?r._sentryId:void 0),clearTimeout(Do),Do=Z.setTimeout(()=>{ko=void 0,Oo=void 0},Eo)}}function Fo(e){try{return e.target}catch{return null}}var Io;function Lo(e){let t=`history`;K(t,e),q(t,Ro)}function Ro(){if(Z.addEventListener(`popstate`,()=>{let e=Z.location.href,t=Io;Io=e,t!==e&&J(`history`,{from:t,to:e})}),!Ma())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=Io,i=zo(String(n));if(Io=i,r===i)return e.apply(this,t);J(`history`,{from:r,to:i})}return e.apply(this,t)}}b(Z.history,`pushState`,e),b(Z.history,`replaceState`,e)}function zo(e){try{return new URL(e,Z.location.origin).toString()}catch{return e}}var Bo=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Vo={};function Ho(e){let t=Vo[e];if(t)return t;let n=Z[e];if(Pa(n))return Vo[e]=n.bind(Z);let r=Z.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){Bo&&g.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(Vo[e]=n.bind(Z))}function Uo(e){Vo[e]=void 0}var Wo=`__sentry_xhr_v3__`;function Go(e){K(`xhr`,e),q(`xhr`,Ko)}function Ko(){if(!Z.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=j()*1e3,a=v(n[0])?n[0].toUpperCase():void 0,o=qo(n[1]);if(!a||!o)return e.apply(t,n);t[Wo]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[Wo];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}J(`xhr`,{endTimestamp:j()*1e3,startTimestamp:i,xhr:t,virtualError:r})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[Wo];return a&&v(r)&&v(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[Wo];return r?(n[0]!==void 0&&(r.body=n[0]),J(`xhr`,{startTimestamp:j()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function qo(e){if(v(e))return e;try{return e.toString()}catch{}}var Jo=80,Q={};try{typeof Node<`u`&&(Q.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,`parentNode`).get),typeof Element<`u`&&(Q.tagName=Object.getOwnPropertyDescriptor(Element.prototype,`tagName`).get,Q.id=Object.getOwnPropertyDescriptor(Element.prototype,`id`).get,Q.className=Object.getOwnPropertyDescriptor(Element.prototype,`className`).get,Q.getAttribute=Element.prototype.getAttribute),typeof HTMLElement<`u`&&(Q.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,`dataset`).get)}catch{}function $(e,t,n){let r=Q[t];if(r)try{return r.call(e,n)}catch{}let i=e[t];return typeof i==`function`?i.call(e,n):i}function Yo(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||Jo;for(;n&&i++<5&&(o=Xo(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=$(n,`parentNode`);return r.reverse().join(` > `)}catch{return`<unknown>`}}function Xo(e,t){let n=[],r=$(e,`tagName`);if(!r)return``;if(typeof HTMLElement<`u`&&e instanceof HTMLElement){let t=$(e,`dataset`);if(t){if(t.sentryComponent)return t.sentryComponent;if(t.sentryElement)return t.sentryElement}}n.push(r.toLowerCase());let i=t?.length?t.filter(t=>$(e,`getAttribute`,t)).map(t=>[t,$(e,`getAttribute`,t)]):null;if(i?.length)i.forEach(e=>{n.push(`[${e[0]}="${e[1]}"]`)});else{let t=$(e,`id`);t&&n.push(`#${t}`);let r=$(e,`className`);if(r&&v(r)){let e=r.split(/\s+/);for(let t of e)n.push(`.${t}`)}}for(let t of[`aria-label`,`type`,`name`,`title`,`alt`]){let r=$(e,`getAttribute`,t);r&&n.push(`[${t}="${r}"]`)}return n.join(``)}function Zo(e){if(typeof Element>`u`)return!1;try{return e instanceof Element}catch{return!1}}var Qo=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,$o=1024,es=`Breadcrumbs`,ts=W(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:es,setup(e){t.console&&ka(is(e)),t.dom&&Ao(rs(e,t.dom)),t.xhr&&Go(as(e)),t.fetch&&Ia(os(e)),t.history&&Lo(ss(e)),t.sentry&&e.on(`beforeSendEvent`,ns(e))}}}));function ns(e){return function(t){L()===e&&G({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:O(t)},{event:t})}}function rs(e,t){return function(n){if(L()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>$o&&(Qo&&g.warn(`\`dom.maxStringLength\` cannot exceed ${$o}, but a value of ${o} was configured. Sentry will use ${$o} instead.`),o=$o),typeof a==`string`&&(a=[a]);try{let e=n.event,t=cs(e)?e.target:e;r=Yo(t,{keyAttrs:a,maxStringLength:o}),i=to(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),G(s,{event:n.event,name:n.name,global:n.global})}}function is(e){return function(t){if(L()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:Ja(t.level),message:Xe(t.args,` `)};if(t.level===`assert`)if(t.args[0]===!1)n.message=`Assertion failed: ${Xe(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return;G(n,{input:t.args,level:t.level})}}function as(e){return function(t){if(L()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Wo];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:Ta(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),G(d,u)}}function os(e){return function(t){if(L()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:t.fetchData,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),G(a,i)}else{let i=t.response,a={...t.fetchData,status_code:i?.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:Ta(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),G(s,o)}}}function ss(e){return function(t){if(L()!==e)return;let n=t.from,r=t.to,i=Ya(Y.location.href),a=n?Ya(n):void 0,o=Ya(r);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),G({category:`navigation`,data:{from:n,to:r}})}}function cs(e){return!!e&&!!e.target}var ls=`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(`,`),us=`BrowserApiErrors`,ds=W(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:us,setupOnce(){t.setTimeout&&b(Y,`setTimeout`,fs),t.setInterval&&b(Y,`setInterval`,fs),t.requestAnimationFrame&&b(Y,`requestAnimationFrame`,ps),t.XMLHttpRequest&&`XMLHttpRequest`in Y&&b(XMLHttpRequest.prototype,`send`,ms);let e=t.eventTarget;e&&(Array.isArray(e)?e:ls).forEach(e=>hs(e,t))}}}));function fs(e){return function(...t){let n=t[0];return t[0]=X(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${w(e)}`}}),e.apply(this,t)}}function ps(e){return function(t){return e.apply(this,[X(t,{mechanism:{data:{handler:w(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function ms(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&b(n,e,function(t){let n={mechanism:{data:{handler:w(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=xe(t);return r&&(n.mechanism.data.handler=w(r)),X(t,n)})}),e.apply(this,t)}}function hs(e,t){let n=Y[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(b(n,`addEventListener`,function(n){return function(r,i,a){try{gs(i)&&(i.handleEvent=X(i.handleEvent,{mechanism:{data:{handler:w(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&_s(this,r,i),n.apply(this,[r,X(i,{mechanism:{data:{handler:w(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),b(n,`removeEventListener`,function(e){return function(t,n,r){try{if(Object.prototype.hasOwnProperty.call(n,`__sentry_wrapped__`)){let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}}catch{}return e.call(this,t,n,r)}}))}function gs(e){return typeof e.handleEvent==`function`}function _s(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var vs=W((e={})=>{let t=e.lifecycle??`route`;return{name:`BrowserSession`,setupOnce(){if(Y.document===void 0){Qo&&g.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Or({ignoreDuration:!0}),jr();let e=I(),n=e.getUser();e.addScopeListener(e=>{let t=e.getUser();(n?.id!==t?.id||n?.ip_address!==t?.ip_address)&&(jr(),n=t)}),t===`route`&&Lo(({from:e,to:t})=>{e!==t&&(Or({ignoreDuration:!0}),jr())})}}}),ys=`CultureContext`,bs=W((()=>({name:ys,preprocessEvent(e){let t=xs();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=xs();t&&Ln(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function xs(){try{let e=Y.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var Ss=`GlobalHandlers`,Cs=W(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:Ss,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(ws(e),ks(`onerror`)),t.onunhandledrejection&&(Ts(e),ks(`onunhandledrejection`))}}}));function ws(e){Ua(t=>{let{stackParser:n,attachStacktrace:r}=As();if(L()!==e||xo())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=Os(ho(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,Dr(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function Ts(e){Ka(t=>{let{stackParser:n,attachStacktrace:r}=As();if(L()!==e||xo())return;let i=Es(t),a=me(i)?Ds(i):ho(n,i,void 0,r,!0);a.level=`error`,Dr(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function Es(e){if(me(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}function Ds(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Os(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:js(t)??eo(),function:`?`,in_app:!0}),e}function ks(e){Qo&&g.log(`Global Handler attached: ${e}`)}function As(){return L()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function js(e){if(!(!v(e)||e.length===0))return e.startsWith(`data:`)?`<${Xa(e,!1)}>`:e}var Ms=W(()=>({name:`HttpContext`,preprocessEvent(e){if(!Y.navigator&&!Y.location&&!Y.document)return;let t=Co(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){let n=e.attributes?.[t];if(!Y.navigator&&!Y.location&&!Y.document)return;let r=Co();Ln(e,{"url.full":n===`http.client`?void 0:r.url,"http.request.header.user_agent":r.headers[`User-Agent`],"http.request.header.referer":r.headers.Referer})}})),Ns=`cause`,Ps=5,Fs=`LinkedErrors`,Is=W(((e={})=>{let t=e.limit||Ps,n=e.key||Ns;return{name:Fs,preprocessEvent(e,r,i){ba(no,i.getOptions().stackParser,n,t,e,r)}}})),Ls=30,Rs=50;function zs(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var Bs=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Vs=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Hs=/\((\S*)(?::(\d+))(?::(\d+))\)/,Us=/at (.+?) ?\(data:(.+?),/,Ws=[Ls,e=>{let t=e.match(Us);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=Bs.exec(e);if(n){let[,e,t,r]=n;return zs(e,`?`,+t,+r)}let r=Vs.exec(e);if(r){if(r[2]?.indexOf(`eval`)===0){let e=Hs.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=Js(r[1]||`?`,r[2]);return zs(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],Gs=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ks=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,qs=Pe(Ws,[Rs,e=>{let t=Gs.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=Ks.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=Js(n,e),zs(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),Js=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},Ys=40;function Xs(e,t=Ho(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw Uo(`fetch`),e}finally{n-=a,r--}}return pi(e,i,si(e.bufferSize||Ys))}var Zs=/^HTML(\w*)Element$/;function Qs(e){if(typeof window<`u`&&e===window)return`[Window]`;if(typeof document<`u`&&e===document)return`[Document]`;if(Zo(e)){let t=$s(e);if(Zs.test(t))return`[HTMLElement: ${Yo(e)}]`}}function $s(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function ec(){return tc()?(Qo&&h(()=>{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 tc(){if(Y.window===void 0)return!1;let e=Y;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let t=eo();return!(Y===Y.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}function nc(e){return[ea(),Xi(),ya(),ds(),ts(),Cs(),Is(),da(),Ms(),bs(),vs()]}function rc(e={}){let t=!e.skipBrowserExtensionCheck&&ec(),n=e.defaultIntegrations==null?nc():e.defaultIntegrations,r={...e,enabled:t?!1:e.enabled,stackParser:Fe(e.stackParser||qs),integrations:Rr({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Xs};return Ve(Qs),Hi(wo,r)}var ic=e(((e,t)=>{t.exports={}}));function ac(e,t,n,r){if(!(e instanceof Error))throw e;if(!(typeof window>`u`&&t||r))throw e.message+=` on line `+n,e;var i,a,o,s;try{r||=ic().readFileSync(t,{encoding:`utf8`}),i=3,a=r.split(`
|
|
16
|
+
`),o=Math.max(n-i,0),s=Math.min(a.length,n+i)}catch(r){e.message+=` - could not read from `+t+` (`+r.message+`)`,ac(e,null,n);return}i=a.slice(o,s).map(function(e,t){var r=t+o+1;return(r==n?` > `:` `)+r+`| `+e}).join(`
|
|
17
|
+
`),e.path=t;try{e.message=(t||`Pug`)+`:`+n+`
|
|
18
|
+
`+i+`
|
|
19
|
+
|
|
20
|
+
`+e.message}catch{}throw e}function oc(e){var t=``,n,r;try{r=1,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<div class="g-config-breadcrumb-container"></div>`,r=2,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<p class="g-sentry-description">`,r=3,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`To track errors in Sentry, enter your Sentry project DSNs here.</p>`,r=4,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<form id="g-sentry-server-form" role="form">`,r=5,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<div class="form-group">`,r=6,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<label class="control-label" for="g-sentry-server-dsn">`,r=6,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`Sentry Server DSN</label>`,r=7,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<input class="input-sm form-control" id="g-sentry-server-dsn" type="text" placeholder="Tracking ID"/></div>`,r=9,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<p class="g-validation-failed-message" id="g-sentry-server-error-message"></p>`,r=10,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<input class="btn btn-sm btn-primary" type="submit" value="Save"/></form>`,r=12,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<form id="g-sentry-client-form" role="form">`,r=13,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<div class="form-group">`,r=14,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<label class="control-label" for="g-sentry-client-dsn">`,r=14,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`Sentry Client DSN</label>`,r=15,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<input class="input-sm form-control" id="g-sentry-client-dsn" type="text" placeholder="Tracking ID"/></div>`,r=17,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<p class="g-validation-failed-message" id="g-sentry-client-error-message"></p>`,r=18,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<input class="btn btn-sm btn-primary" type="submit" value="Save"/></form>`}catch(e){ac(e,n,r)}return t}var sc=girder.views.widgets.PluginConfigBreadcrumbWidget,cc=girder.views.View,{restRequest:lc}=girder.rest,uc=girder.events,dc=cc.extend({events:{"submit #g-sentry-server-form":function(e){e.preventDefault(),this.$(`#g-sentry-server-error-message`).empty(),this._saveSettings([{key:`sentry.backend_dsn`,value:this.$(`#g-sentry-server-dsn`).val().trim()}],{errorTarget:`#g-sentry-server-error-message`})},"submit #g-sentry-client-form":function(e){e.preventDefault(),this.$(`#g-sentry-client-error-message`).empty(),this._saveSettings([{key:`sentry.frontend_dsn`,value:this.$(`#g-sentry-client-dsn`).val().trim()}],{errorTarget:`#g-sentry-client-error-message`})}},initialize:function(){lc({method:`GET`,url:`system/setting`,data:{list:JSON.stringify([`sentry.backend_dsn`,`sentry.frontend_dsn`])}}).done(e=>{this.render(),this.$(`#g-sentry-server-dsn`).val(e[`sentry.backend_dsn`]),this.$(`#g-sentry-client-dsn`).val(e[`sentry.frontend_dsn`])})},render:function(){return this.$el.html(oc()),this.breadcrumb||=new sc({pluginName:`Sentry`,el:this.$(`.g-config-breadcrumb-container`),parentView:this}).render(),this},_saveSettings:function(e,t){lc({method:`PUT`,url:`system/setting`,data:{list:JSON.stringify(e)},error:null}).done(()=>{uc.trigger(`g:alert`,{icon:`ok`,text:`Settings saved.`,type:`success`,timeout:4e3})}).fail(e=>{this.$(t.errorTarget).text(e.responseJSON.message)})}}),fc=girder.router,pc=girder.events,{exposePluginConfig:mc}=girder.utilities.PluginUtils;mc(`sentry`,`plugins/sentry/config`),fc.route(`plugins/sentry/config`,`SentryConfig`,function(){pc.trigger(`g:navigateTo`,dc)});var hc=girder.events,{restRequest:gc}=girder.rest;hc.on(`g:appload.after`,function(){gc({method:`GET`,url:`sentry/dsn`}).done(e=>{e.sentry_dsn&&rc({dsn:e.sentry_dsn})})})});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
MANIFEST.in
|
|
2
|
+
plugin.cmake
|
|
3
|
+
pyproject.toml
|
|
4
|
+
setup.py
|
|
5
|
+
girder_sentry/__init__.py
|
|
6
|
+
girder_sentry/rest.py
|
|
7
|
+
girder_sentry/settings.py
|
|
8
|
+
girder_sentry.egg-info/PKG-INFO
|
|
9
|
+
girder_sentry.egg-info/SOURCES.txt
|
|
10
|
+
girder_sentry.egg-info/dependency_links.txt
|
|
11
|
+
girder_sentry.egg-info/entry_points.txt
|
|
12
|
+
girder_sentry.egg-info/not-zip-safe
|
|
13
|
+
girder_sentry.egg-info/requires.txt
|
|
14
|
+
girder_sentry.egg-info/scm_file_list.json
|
|
15
|
+
girder_sentry.egg-info/scm_version.json
|
|
16
|
+
girder_sentry.egg-info/top_level.txt
|
|
17
|
+
girder_sentry/web_client/dist/girder-plugin-sentry.umd.cjs
|
|
18
|
+
girder_sentry/web_client/dist/style.css
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"files": [
|
|
3
|
+
"MANIFEST.in",
|
|
4
|
+
"plugin.cmake",
|
|
5
|
+
"pyproject.toml",
|
|
6
|
+
"setup.py",
|
|
7
|
+
"girder_sentry/__init__.py",
|
|
8
|
+
"girder_sentry/rest.py",
|
|
9
|
+
"girder_sentry/settings.py",
|
|
10
|
+
"girder_sentry/web_client/main.js",
|
|
11
|
+
"girder_sentry/web_client/package-lock.json",
|
|
12
|
+
"girder_sentry/web_client/package.json",
|
|
13
|
+
"girder_sentry/web_client/routes.js",
|
|
14
|
+
"girder_sentry/web_client/tsconfig.json",
|
|
15
|
+
"girder_sentry/web_client/vite-env.d.ts",
|
|
16
|
+
"girder_sentry/web_client/vite.config.ts",
|
|
17
|
+
"girder_sentry/web_client/stylesheets/configView.styl",
|
|
18
|
+
"girder_sentry/web_client/templates/configView.pug",
|
|
19
|
+
"girder_sentry/web_client/views/ConfigView.js"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
@@ -26,10 +26,9 @@ def prerelease_local_scheme(version):
|
|
|
26
26
|
# perform the install
|
|
27
27
|
setup(
|
|
28
28
|
name='girder-sentry',
|
|
29
|
-
use_scm_version={'
|
|
29
|
+
use_scm_version={'search_parent_directories': True, 'local_scheme': prerelease_local_scheme},
|
|
30
30
|
setup_requires=[
|
|
31
31
|
'setuptools-scm',
|
|
32
|
-
'setuptools-git',
|
|
33
32
|
],
|
|
34
33
|
description='Allow the automatic tracking of issues using Sentry.',
|
|
35
34
|
maintainer='Kitware, Inc.',
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
(function(e){typeof define==`function`&&define.amd?define([],e):e()})(function(){var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),t=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,n=globalThis,r=`10.55.0`;function i(){return a(n),n}function a(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||`10.55.0`,t[r]=t[`10.55.0`]||{}}function o(e,t,i=n){let a=i.__SENTRY__=i.__SENTRY__||{},o=a[r]=a[`10.55.0`]||{};return o[e]||(o[e]=t())}var s=[`debug`,`info`,`warn`,`error`,`log`,`assert`,`trace`],c=`Sentry Logger `,l={};function u(e){if(!(`console`in n))return e();let t=n.console,r={},i=Object.keys(l);i.forEach(e=>{let n=l[e];r[e]=t[e],t[e]=n});try{return e()}finally{i.forEach(e=>{t[e]=r[e]})}}function d(){ie().enabled=!0}function f(){ie().enabled=!1}function p(){return ie().enabled}function ee(...e){re(`log`,...e)}function te(...e){re(`warn`,...e)}function ne(...e){re(`error`,...e)}function re(e,...r){t&&p()&&u(()=>{n.console[e](`${c}[${e}]:`,...r)})}function ie(){return t?o(`loggerSettings`,()=>({enabled:!1})):{enabled:!1}}var m={enable:d,disable:f,isEnabled:p,log:ee,warn:te,error:ne},ae=50,oe=/\(error: (.*)\)/,se=/captureMessage|captureException/;function ce(...e){let t=e.sort((e,t)=>e[0]-t[0]).map(e=>e[1]);return(e,n=0,r=0)=>{let i=[],a=e.split(`
|
|
2
|
-
`);for(let e=n;e<a.length;e++){let n=a[e];n.length>1024&&(n=n.slice(0,1024));let o=oe.test(n)?n.replace(oe,`$1`):n;if(!o.includes(`Error: `)){for(let e of t){let t=e(o);if(t){i.push(t);break}}if(i.length>=ae+r)break}}return ue(i.slice(r))}}function le(e){return Array.isArray(e)?ce(...e):e}function ue(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(de(t).function||``)&&t.pop(),t.reverse(),se.test(de(t).function||``)&&(t.pop(),se.test(de(t).function||``)&&t.pop()),t.slice(0,ae).map(e=>({...e,filename:e.filename||de(t).filename,function:e.function||`?`}))}function de(e){return e[e.length-1]||{}}var fe=`<anonymous>`;function h(e){try{return!e||typeof e!=`function`?fe:e.name||fe}catch{return fe}}function pe(e){let t=e.exception;if(t){let e=[];try{return t.values.forEach(t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)}),e}catch{return}}}var g={},me={};function _(e,t){return g[e]=g[e]||[],g[e].push(t),()=>{let n=g[e];if(n){let e=n.indexOf(t);e!==-1&&n.splice(e,1)}}}function v(e,n){if(!me[e]){me[e]=!0;try{n()}catch(n){t&&m.error(`Error while instrumenting ${e}`,n)}}}function y(e,n){let r=e&&g[e];if(r)for(let i of r)try{i(n)}catch(n){t&&m.error(`Error while triggering instrumentation handler.
|
|
3
|
-
Type: ${e}
|
|
4
|
-
Name: ${h(i)}
|
|
5
|
-
Error:`,n)}}var he=null;function ge(e){let t=`error`;_(t,e),v(t,_e)}function _e(){he=n.onerror,n.onerror=function(e,t,n,r,i){return y(`error`,{column:r,error:i,line:n,msg:e,url:t}),he?he.apply(this,arguments):!1},n.onerror.__SENTRY_INSTRUMENTED__=!0}var ve=null;function ye(e){let t=`unhandledrejection`;_(t,e),v(t,be)}function be(){ve=n.onunhandledrejection,n.onunhandledrejection=function(e){return y(`unhandledrejection`,e),ve?ve.apply(this,arguments):!0},n.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var xe=Object.prototype.toString;function Se(e){switch(xe.call(e)){case`[object Error]`:case`[object Exception]`:case`[object DOMException]`:case`[object WebAssembly.Exception]`:return!0;default:return w(e,Error)}}function b(e,t){return xe.call(e)===`[object ${t}]`}function Ce(e){return b(e,`ErrorEvent`)}function we(e){return b(e,`DOMError`)}function Te(e){return b(e,`DOMException`)}function x(e){return b(e,`String`)}function Ee(e){return typeof e==`object`&&!!e&&`__sentry_template_string__`in e&&`__sentry_template_values__`in e}function S(e){return e===null||Ee(e)||typeof e!=`object`&&typeof e!=`function`}function De(e){return b(e,`Object`)}function Oe(e){return typeof Event<`u`&&w(e,Event)}function ke(e){return b(e,`RegExp`)}function C(e){return!!(e?.then&&typeof e.then==`function`)}function w(e,t){try{return e instanceof t}catch{return!1}}function Ae(e){return typeof Request<`u`&&w(e,Request)}function T(e,n,r){if(!(n in e))return;let i=e[n];if(typeof i!=`function`)return;let a=r(i);typeof a==`function`&&je(a,i);try{e[n]=a}catch{t&&m.log(`Failed to replace method "${n}" in object`,e)}}function E(e,n,r){try{Object.defineProperty(e,n,{value:r,writable:!0,configurable:!0})}catch{t&&m.log(`Failed to add non-enumerable property "${String(n)}" to object`,e)}}function je(e,t){try{e.prototype=t.prototype=t.prototype||{},E(e,`__sentry_original__`,t)}catch{}}function Me(e){return e.__sentry_original__}function Ne(e){if(Se(e))return{message:e.message,name:e.name,stack:e.stack,...Pe(e)};if(Oe(e)){let{type:t,target:n,currentTarget:r,detail:i}=e;return{type:t,target:n,currentTarget:r,...i?{detail:i}:{},...Pe(e)}}return e}function Pe(e){return typeof e==`object`&&e?Object.fromEntries(Object.entries(e)):{}}function Fe(e){let t=Object.keys(Ne(e));return t.sort(),t[0]?t.join(`, `):`[object has no keys]`}var D;function Ie(e){if(D!==void 0)return D?D(e):e();let t=Symbol.for(`__SENTRY_SAFE_RANDOM_ID_WRAPPER__`),r=n;return t in r&&typeof r[t]==`function`?(D=r[t],D(e)):(D=null,e())}function Le(){return Ie(()=>Math.random())}function Re(){return Ie(()=>Date.now())}var ze=Symbol.for(`sentry.skipNormalization`),Be=Symbol.for(`sentry.overrideNormalizationDepth`);function Ve(e){return!!e[ze]}function He(e){let t=e[Be];return typeof t==`number`?t:void 0}var Ue;function We(e){Ue=e}function O(e,t=100,n=1/0){try{return Ke(``,e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function Ge(e,t=3,n=100*1024){let r=O(e,t);return Xe(r)>n?Ge(e,t-1,n):r}function Ke(e,t,n=1/0,r=1/0,i=Ze()){let[a,o]=i;if(t==null||[`boolean`,`string`].includes(typeof t)||typeof t==`number`&&Number.isFinite(t))return t;let s=qe(e,t);if(!s.startsWith(`[object `))return s;if(Ve(t))return t;let c=He(t),l=c===void 0?n:c;if(l===0)return s.replace(`object `,``);if(a(t))return`[Circular ~]`;let u=t;if(u&&typeof u.toJSON==`function`)try{return Ke(``,u.toJSON(),l-1,r,i)}catch{}let d=Array.isArray(t)?[]:{},f=0,p=Ne(t);for(let e in p){if(!Object.prototype.hasOwnProperty.call(p,e))continue;if(f>=r){d[e]=`[MaxProperties ~]`;break}let t=p[e];d[e]=Ke(e,t,l-1,r,i),f++}return o(t),d}function qe(e,t){try{if(Ue){let e=Ue(t);if(e)return e}return typeof global<`u`&&t===global?`[Global]`:typeof t==`number`&&!Number.isFinite(t)?`[${t}]`:typeof t==`function`?`[Function: ${h(t)}]`:typeof t==`symbol`?`[${String(t)}]`:typeof t==`bigint`?`[BigInt: ${String(t)}]`:`[object ${Je(t)}]`}catch(e){return`**non-serializable** (${e})`}}function Je(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function Ye(e){return~-encodeURI(e).split(/%..|./).length}function Xe(e){return Ye(JSON.stringify(e))}function Ze(){let e=new WeakSet;function t(t){return e.has(t)?!0:(e.add(t),!1)}function n(t){e.delete(t)}return[t,n]}function Qe(e,t=0){return typeof e!=`string`||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function $e(e,t){if(!Array.isArray(e))return``;let n=[];for(let t=0;t<e.length;t++){let r=e[t];S(r)?n.push(String(r)):r instanceof Error?n.push(r.message?`${r.name}: ${r.message}`:r.name):n.push(qe(void 0,r))}return n.join(t)}function et(e,t,n=!1){return x(e)?ke(t)?t.test(e):x(t)?n?e===t:e.includes(t):typeof t==`function`?t(e):!1:!1}function k(e,t=[],n=!1){for(let r of t)if(et(e,r,n))return!0;return!1}function tt(){let e=n;return e.crypto||e.msCrypto}var nt;function rt(){return Le()*16}function A(e=tt()){try{if(e?.randomUUID)return Ie(()=>e.randomUUID()).replace(/-/g,``)}catch{}return nt||=`10000000100040008000100000000000`,nt.replace(/[018]/g,e=>(e^(rt()&15)>>e/4).toString(16))}function it(e){return e.exception?.values?.[0]}function j(e){let{message:t,event_id:n}=e;if(t)return t;let r=it(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||`<unknown>`:n||`<unknown>`}function at(e,t,n){let r=e.exception=e.exception||{},i=r.values=r.values||[],a=i[0]=i[0]||{};a.value||=t||``,a.type||=n||`Error`}function M(e,t){let n=it(e);if(!n)return;let r={type:`generic`,handled:!0},i=n.mechanism;if(n.mechanism={...r,...i,...t},t&&`data`in t){let e={...i?.data,...t.data};n.mechanism.data=e}}function ot(e){if(st(e))return!0;try{E(e,`__sentry_captured__`,!0)}catch{}return!1}function st(e){try{return e.__sentry_captured__}catch{}}var ct=1e3;function N(){return Re()/ct}function lt(){let{performance:e}=n;if(!e?.now||!e.timeOrigin)return N;let t=e.timeOrigin;return()=>(t+Ie(()=>e.now()))/ct}var ut;function P(){return(ut??=lt())()}function dt(e){let t=P(),n={sid:A(),init:!0,timestamp:t,started:t,duration:0,status:`ok`,errors:0,ignoreDuration:!1,toJSON:()=>pt(n)};return e&&F(n,e),n}function F(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||P(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:A()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started==`number`&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration==`number`)e.duration=t.duration;else{let t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors==`number`&&(e.errors=t.errors),t.status&&(e.status=t.status)}function ft(e,t){let n={};t?n={status:t}:e.status===`ok`&&(n={status:`exited`}),F(e,n)}function pt(e){return{sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did==`number`||typeof e.did==`string`?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}}}function I(e,t,n=2){if(!t||typeof t!=`object`||n<=0)return t;if(e&&Object.keys(t).length===0)return e;let r={...e};for(let e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=I(r[e],t[e],n-1));return r}function mt(){return A()}function ht(){return A().substring(16)}var gt=`_sentrySpan`;function _t(e,t){t?E(e,gt,t):delete e[gt]}function vt(e){return e[gt]}var yt=100,L=class e{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:Le()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,_t(t,vt(this)),t}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&&F(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,t){return this.setTags({[e]:t})}setAttributes(e){return this._attributes={...this._attributes,...e},this._notifyScopeListeners(),this}setAttribute(e,t){return this.setAttributes({[e]:t})}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,t){return this._extra={...this._extra,[e]:t},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,t){return t===null?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t==`function`?t(this):t,{tags:r,attributes:i,extra:a,user:o,contexts:s,level:c,fingerprint:l=[],propagationContext:u,conversationId:d}=(n instanceof e?n.getScopeData():De(n)?t:void 0)||{};return this._tags={...this._tags,...r},this._attributes={...this._attributes,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...s},o&&Object.keys(o).length&&(this._user=o),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),d&&(this._conversationId=d),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,_t(this,void 0),this._attachments=[],this.setPropagationContext({traceId:mt(),sampleRand:Le()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){let n=typeof t==`number`?t:yt;if(n<=0)return this;let r={timestamp:N(),...e,message:e.message?Qe(e.message,2048):e.message};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),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:vt(this),conversationId:this._conversationId}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=I(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext=e,this}getPropagationContext(){return this._propagationContext}captureException(e,n){let r=n?.event_id||A();if(!this._client)return t&&m.warn(`No client configured on scope - will not capture exception!`),r;let i=Error(`Sentry syntheticException`);return this._client.captureException(e,{originalException:e,syntheticException:i,...n,event_id:r},this),r}captureMessage(e,n,r){let i=r?.event_id||A();if(!this._client)return t&&m.warn(`No client configured on scope - will not capture message!`),i;let a=r?.syntheticException??Error(e);return this._client.captureMessage(e,n,{originalException:e,syntheticException:a,...r,event_id:i},this),i}captureEvent(e,n){let r=e.event_id||n?.event_id||A();return this._client?(this._client.captureEvent(e,{...n,event_id:r},this),r):(t&&m.warn(`No client configured on scope - will not capture event!`),r)}_notifyScopeListeners(){this._notifyingListeners||=(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),!1)}};function bt(){return o(`defaultCurrentScope`,()=>new L)}function xt(){return o(`defaultIsolationScope`,()=>new L)}var St=e=>e instanceof Promise&&!e[Ct],Ct=Symbol(`chained PromiseLike`),wt=(e,t,n)=>{let r=e.then(e=>(t(e),e),e=>{throw n(e),e});return St(r)&&St(e)?r:Tt(e,r)},Tt=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let i=e[r];typeof i==`function`?Object.defineProperty(t,r,{value:(...t)=>i.apply(e,t),enumerable:!0,configurable:!0,writable:!0}):t[r]=i}return n&&Object.assign(t,{[Ct]:!0}),t},Et=class{constructor(e,t){let n;n=e||new L;let r;r=t||new L,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){let t=this._pushScope(),n;try{n=e(t)}catch(e){throw this._popScope(),e}return C(n)?wt(n,()=>this._popScope(),()=>this._popScope()):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let 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 R(){let e=a(i());return e.stack=e.stack||new Et(bt(),xt())}function Dt(e){return R().withScope(e)}function Ot(e,t){let n=R();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function kt(e){return R().withScope(()=>e(R().getIsolationScope()))}function At(){return{withIsolationScope:kt,withScope:Dt,withSetScope:Ot,withSetIsolationScope:(e,t)=>kt(t),getCurrentScope:()=>R().getScope(),getIsolationScope:()=>R().getIsolationScope()}}function jt(e){let t=a(e);return t.acs?t.acs:At()}function Mt(e){return typeof e==`object`&&!!e&&!Array.isArray(e)&&Object.keys(e).includes(`value`)}function Nt(e,t){let{value:n,unit:r}=Mt(e)?e:{value:e,unit:void 0},i=Ft(n),a=r&&typeof r==`string`?{unit:r}:{};if(i)return{...i,...a};if(!t||t===`skip-undefined`&&n===void 0)return;let o=``;try{o=JSON.stringify(n)??``}catch{}return{value:o,type:`string`,...a}}function Pt(e,t=!1){let n={};for(let[r,i]of Object.entries(e??{})){let e=Nt(i,t);e&&(n[r]=e)}return n}function Ft(e){if(Array.isArray(e))return{value:e,type:`array`};let t=typeof e==`string`?`string`:typeof e==`boolean`?`boolean`:typeof e==`number`&&!Number.isNaN(e)?Number.isInteger(e)?`integer`:`double`:null;if(t)return{value:e,type:t}}var It;function Lt(){return It?.()}function z(){return jt(i()).getCurrentScope()}function B(){return jt(i()).getIsolationScope()}function Rt(){return o(`globalScope`,()=>new L)}function zt(...e){let t=jt(i());if(e.length===2){let[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function V(){return z().getClient()}function Bt(e){let t=Lt();if(t)return{trace_id:t.traceId,span_id:t.spanId};let{traceId:n,parentSpanId:r,propagationSpanId:i}=e.getPropagationContext(),a={trace_id:n,span_id:i||ht()};return r&&(a.parent_span_id=r),a}var Vt=`sentry.op`,Ht=`sentry.origin`,Ut=`sentry.profile_id`,Wt=`sentry.exclusive_time`,Gt=`gen_ai.conversation.id`;function Kt(e){if(e){if(typeof e==`object`&&`deref`in e&&typeof e.deref==`function`)try{return e.deref()}catch{return}return e}}var qt=`_sentryScope`,Jt=`_sentryIsolationScope`;function Yt(e){let t=e;return{scope:t[qt],isolationScope:Kt(t[Jt])}}function Xt(e){let t=Zt(e);if(!t)return;let n=Object.entries(t).reduce((e,[t,n])=>{if(t.startsWith(`sentry-`)){let r=t.slice(7);e[r]=n}return e},{});if(Object.keys(n).length>0)return n}function Zt(e){if(!(!e||!x(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((e,t)=>{let n=Qt(t);return Object.entries(n).forEach(([t,n])=>{e[t]=n}),e},{}):Qt(e)}function Qt(e){return e.split(`,`).map(e=>{let t=e.indexOf(`=`);return t===-1?[]:[e.slice(0,t),e.slice(t+1)].map(e=>{try{return decodeURIComponent(e.trim())}catch{return}})}).reduce((e,[t,n])=>(t&&n&&(e[t]=n),e),{})}var $t=/^o(\d+)\./,en=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function tn(e){return e===`http`||e===`https`}function H(e,t=!1){let{host:n,path:r,pass:i,port:a,projectId:o,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&i?`:${i}`:``}@${n}${a?`:${a}`:``}/${r&&`${r}/`}${o}`}function nn(e){let t=en.exec(e);if(!t){u(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,i=``,a=``,o=``,s=``]=t.slice(1),c=``,l=s,d=l.split(`/`);if(d.length>1&&(c=d.slice(0,-1).join(`/`),l=d.pop()),l){let e=l.match(/^\d+/);e&&(l=e[0])}return rn({host:a,pass:i,path:c,projectId:l,port:o,protocol:n,publicKey:r})}function rn(e){return{protocol:e.protocol,publicKey:e.publicKey||``,pass:e.pass||``,host:e.host,port:e.port||``,path:e.path||``,projectId:e.projectId}}function an(e){if(!t)return!0;let{port:n,projectId:r,protocol:i}=e;return[`protocol`,`publicKey`,`host`,`projectId`].find(t=>e[t]?!1:(m.error(`Invalid Sentry Dsn: ${t} missing`),!0))?!1:r.match(/^\d+$/)?tn(i)?n&&isNaN(parseInt(n,10))?(m.error(`Invalid Sentry Dsn: Invalid port ${n}`),!1):!0:(m.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),!1):(m.error(`Invalid Sentry Dsn: Invalid projectId ${r}`),!1)}function on(e){return e.match($t)?.[1]}function sn(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=on(n)),r}function cn(e){let t=typeof e==`string`?nn(e):rn(e);if(!(!t||!an(t)))return t}function ln(e){if(typeof e==`boolean`)return Number(e);let t=typeof e==`string`?parseFloat(e):e;if(!(typeof t!=`number`||isNaN(t)||t<0||t>1))return t}var un=!1;function dn(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),i=r?t:hn(e).parent_span_id,a=Yt(e).scope;return{parent_span_id:i,span_id:r?a?.getPropagationContext().propagationSpanId||ht():t,trace_id:n}}function fn(e){if(e&&e.length>0)return e.map(({context:{spanId:e,traceId:t,traceFlags:n,...r},attributes:i})=>({span_id:e,trace_id:t,sampled:n===1,attributes:i,...r}))}function pn(e){return typeof e==`number`?mn(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?mn(e.getTime()):P()}function mn(e){return e>9999999999?e/1e3:e}function hn(e){if(yn(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(vn(e)){let{attributes:r,startTime:i,name:a,endTime:o,status:s,links:c}=e;return{span_id:t,trace_id:n,data:r,description:a,parent_span_id:gn(e),start_timestamp:pn(i),timestamp:pn(o)||void 0,status:xn(s),op:r[Vt],origin:r[Ht],links:fn(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function gn(e){return`parentSpanId`in e?e.parentSpanId:`parentSpanContext`in e?e.parentSpanContext?.spanId:void 0}function _n(e){return{...e,attributes:Pt(e.attributes),links:e.links?.map(e=>({...e,attributes:Pt(e.attributes)}))}}function vn(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function yn(e){return typeof e.getSpanJSON==`function`}function bn(e){let{traceFlags:t}=e.spanContext();return t===1}function xn(e){if(!(!e||e.code===0))return e.code===1?`ok`:e.message||`internal_error`}var Sn=`_sentryRootSpan`,Cn=wn;function wn(e){return e[Sn]||e}function Tn(){un||=(u(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),!0)}function En(e){if(typeof __SENTRY_TRACING__==`boolean`&&!__SENTRY_TRACING__)return!1;let t=e||V()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Dn(e){m.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function On(e,n){if(!n?.length)return!1;for(let r of n){if(jn(r)){if(e.description&&et(e.description,r))return t&&Dn(e),!0;continue}let n=!!r.attributes&&Object.keys(r.attributes).length>0;if(!r.name&&!r.op&&!n)continue;let i=r.name?e.description&&et(e.description,r.name):!0,a=r.op?e.op&&et(e.op,r.op):!0,o=r.attributes?Object.entries(r.attributes).every(([t,n])=>kn(e.attributes?.[t],n)):!0;if(i&&a&&o)return t&&Dn(e),!0}return!1}function kn(e,t){return typeof e==`string`&&(typeof t==`string`||t instanceof RegExp)?et(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e===t}function An(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let t of e)t.parent_span_id===r&&(t.parent_span_id=n)}function jn(e){return typeof e==`string`||e instanceof RegExp}var Mn=`production`,Nn=`_frozenDsc`;function Pn(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},i={environment:n.environment||`production`,release:n.release,public_key:r,trace_id:e,org_id:sn(t)};return t.emit(`createDsc`,i),i}function Fn(e,t){let n=t.getPropagationContext();return n.dsc||Pn(n.traceId,e)}function In(e){let t=V();if(!t)return{};let n=Cn(e),r=hn(n),i=r.data,a=n.spanContext().traceState,o=a?.get(`sentry.sample_rate`)??i[`sentry.sample_rate`]??i[`sentry.previous_trace_sample_rate`];function s(e){return(typeof o==`number`||typeof o==`string`)&&(e.sample_rate=`${o}`),e}let c=n[Nn];if(c)return s(c);let l=a?.get(`sentry.dsc`),u=l&&Xt(l);if(u)return s(u);let d=Pn(e.spanContext().traceId,t),f=i[`sentry.source`]??i[`sentry.span.source`],p=r.description;return f!==`url`&&p&&(d.transaction=p),En()&&(d.sampled=String(bn(n)),d.sample_rand=a?.get(`sentry.sample_rand`)??Yt(n).scope?.getPropagationContext().sampleRand.toString()),s(d),t.emit(`createDsc`,d,n),d}function Ln(e){return!!e&&typeof e==`function`&&`_streamed`in e&&!!e._streamed}function U(e,t=[]){return[e,t]}function Rn(e,t){let[n,r]=e;return[n,[...r,t]]}function zn(e,t){let n=e[1];for(let e of n){let n=e[0].type;if(t(e,n))return!0}return!1}function Bn(e,t){return zn(e,(e,n)=>t.includes(n))}function Vn(e){let t=a(n);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Hn(e){let[t,n]=e,r=JSON.stringify(t);function i(e){typeof r==`string`?r=typeof e==`string`?r+e:[Vn(r),e]:r.push(typeof e==`string`?Vn(e):e)}for(let e of n){let[t,n]=e;if(i(`
|
|
6
|
-
${JSON.stringify(t)}
|
|
7
|
-
`),typeof n==`string`||n instanceof Uint8Array)i(n);else{let e;try{e=JSON.stringify(n)}catch{e=JSON.stringify(O(n))}i(e)}}return typeof r==`string`?r:Un(r)}function Un(e){let t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t),r=0;for(let t of e)n.set(t,r),r+=t.length;return n}function Wn(e){let t=typeof e.data==`string`?Vn(e.data):e.data;return[{type:`attachment`,length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Gn={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 Kn(e){return e in Gn}function qn(e){return Kn(e)?Gn[e]:e}function Jn(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Yn(e,t,n,r){let i=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:H(r)},...i&&{trace:i}}}function Xn(e,t){if(!t)return e;let n=e.sdk||{};return e.sdk={...n,name:n.name||t.name,version:n.version||t.version,integrations:[...e.sdk?.integrations||[],...t.integrations||[]],packages:[...e.sdk?.packages||[],...t.packages||[]],settings:e.sdk?.settings||t.settings?{...e.sdk?.settings,...t.settings}:void 0},e}function Zn(e,t,n,r){let i=Jn(n);return U({sent_at:new Date().toISOString(),...i&&{sdk:i},...!!r&&t&&{dsn:H(t)}},[`aggregates`in e?[{type:`sessions`},e]:[{type:`session`},e.toJSON()]])}function Qn(e,t,n,r){let i=Jn(n),a=e.type&&e.type!==`replay_event`?e.type:`event`;Xn(e,n?.sdk);let o=Yn(e,i,r,t);return delete e.sdkProcessingMetadata,U(o,[[{type:a},e]])}function $n(e){return e.getOptions().traceLifecycle===`stream`}function er(e,t){let{fingerprint:n,span:r,breadcrumbs:i,sdkProcessingMetadata:a}=t;rr(e,t),r&&or(e,r),sr(e,n),ir(e,i),ar(e,a)}function tr(e,t){let{extra:n,tags:r,attributes:i,user:a,contexts:o,level:s,sdkProcessingMetadata:c,breadcrumbs:l,fingerprint:u,eventProcessors:d,attachments:f,propagationContext:p,transactionName:ee,span:te}=t;W(e,`extra`,n),W(e,`tags`,r),W(e,`attributes`,i),W(e,`user`,a),W(e,`contexts`,o),e.sdkProcessingMetadata=I(e.sdkProcessingMetadata,c,2),s&&(e.level=s),ee&&(e.transactionName=ee),te&&(e.span=te),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...p}}function W(e,t,n){e[t]=I(e[t],n,1)}function nr(e,t){let n=Rt().getScopeData();return e&&tr(n,e.getScopeData()),t&&tr(n,t.getScopeData()),n}function rr(e,t){let{extra:n,tags:r,user:i,contexts:a,level:o,transactionName:s}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(i).length&&(e.user={...i,...e.user}),Object.keys(a).length&&(e.contexts={...a,...e.contexts}),o&&(e.level=o),s&&e.type!==`transaction`&&(e.transaction=s)}function ir(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ar(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function or(e,t){e.contexts={trace:dn(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:In(t),...e.sdkProcessingMetadata};let n=hn(Cn(t)).description;n&&!e.transaction&&e.type===`transaction`&&(e.transaction=n)}function sr(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function cr(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||``,r=t[8]||``;return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function lr(e,t=!0){if(e.startsWith(`data:`)){let n=e.match(/^data:([^;,]+)/),r=n?n[1]:`text/plain`,i=e.includes(`;base64,`),a=e.indexOf(`,`),o=``;if(t&&a!==-1){let t=e.slice(a+1);o=t.length>10?`${t.slice(0,10)}... [truncated]`:t}return`data:${r}${i?`,base64`:``}${o?`,${o}`:``}`}return e}function ur(e,t){let n=e.attributes??={};Object.entries(t).forEach(([e,t])=>{t!=null&&!(e in n)&&(n[e]=t)})}var dr=0,fr=1,pr=2;function G(e){return new hr(t=>{t(e)})}function mr(e){return new hr((t,n)=>{n(e)})}var hr=class e{constructor(e){this._state=dr,this._handlers=[],this._runExecutor(e)}then(t,n){return new e((e,r)=>{this._handlers.push([!1,n=>{if(!t)e(n);else try{e(t(n))}catch(e){r(e)}},t=>{if(!n)r(t);else try{e(n(t))}catch(e){r(e)}}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(t){return new e((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{if(i){n(r);return}e(r)})})}_executeHandlers(){if(this._state===dr)return;let e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||=(this._state===fr&&e[1](this._value),this._state===pr&&e[2](this._value),!0)})}_runExecutor(e){let t=(e,t)=>{if(this._state===dr){if(C(t)){t.then(n,r);return}this._state=e,this._value=t,this._executeHandlers()}},n=e=>{t(fr,e)},r=e=>{t(pr,e)};try{e(n,r)}catch(e){r(e)}}};function gr(e,t,n,r=0){try{let i=_r(t,n,e,r);return C(i)?i:G(i)}catch(e){return mr(e)}}function _r(e,n,r,i){let a=r[i];if(!e||!a)return e;let o=a({...e},n);return t&&o===null&&m.log(`Event processor "${a.id||`?`}" dropped event`),C(o)?o.then(e=>_r(e,n,r,i+1)):_r(o,n,r,i+1)}var K,vr,yr,q;function br(e){let t=n._sentryDebugIds,r=n._debugIds;if(!t&&!r)return{};let i=t?Object.keys(t):[],a=r?Object.keys(r):[];if(q&&i.length===vr&&a.length===yr)return q;vr=i.length,yr=a.length,q={},K||={};let o=(t,n)=>{for(let r of t){let t=n[r],i=K?.[r];if(i&&q&&t)q[i[0]]=t,K&&(K[r]=[i[0],t]);else if(t){let n=e(r);for(let e=n.length-1;e>=0;e--){let i=n[e]?.filename;if(i&&q&&K){q[i]=t,K[r]=[i,t];break}}}}};return t&&o(i,t),r&&o(a,r),q}function xr(e,t,n,r,i,a){let{normalizeDepth:o=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||A(),timestamp:t.timestamp||N()},l=n.integrations||e.integrations.map(e=>e.name);Sr(c,e),Tr(c,l),i&&i.emit(`applyFrameMetadata`,t),t.type===void 0&&Cr(c,e.stackParser);let u=Dr(r,n.captureContext);n.mechanism&&M(c,n.mechanism);let d=i?i.getEventProcessors():[],f=nr(a,u),p=[...n.attachments||[],...f.attachments];p.length&&(n.attachments=p),er(c,f);let ee=[...d,...f.eventProcessors];return(n.data&&n.data.__sentry__===!0?G(c):gr(ee,c,n)).then(e=>(e&&wr(e),typeof o==`number`&&o>0?Er(e,o,s):e))}function Sr(e,t){let{environment:n,release:r,dist:i,maxValueLength:a}=t;e.environment=e.environment||n||`production`,!e.release&&r&&(e.release=r),!e.dist&&i&&(e.dist=i);let o=e.request;o?.url&&a&&(o.url=Qe(o.url,a)),a&&e.exception?.values?.forEach(e=>{e.value&&=Qe(e.value,a)})}function Cr(e,t){let n=br(t);e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.filename&&(e.debug_id=n[e.filename])})})}function wr(e){let t={};if(e.exception?.values?.forEach(e=>{e.stacktrace?.frames?.forEach(e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)})}),Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.entries(t).forEach(([e,t])=>{n.push({type:`sourcemap`,code_file:e,debug_id:t})})}function Tr(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Er(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:O(e.data,t,n)}}))},...e.user&&{user:O(e.user,t,n)},...e.contexts&&{contexts:O(e.contexts,t,n)},...e.extra&&{extra:O(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=O(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>({...e,...e.data&&{data:O(e.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=O(e.contexts.flags,3,n)),r}function Dr(e,t){if(!t)return e;let n=e?e.clone():new L;return n.update(t),n}function Or(e){if(e)return kr(e)||jr(e)?{captureContext:e}:e}function kr(e){return e instanceof L||typeof e==`function`}var Ar=[`user`,`level`,`extra`,`contexts`,`tags`,`fingerprint`,`propagationContext`];function jr(e){return Object.keys(e).some(e=>Ar.includes(e))}function Mr(e,t){return z().captureException(e,Or(t))}function Nr(e,t){return z().captureEvent(e,t)}function Pr(e){let t=B(),{user:r}=nr(t,z()),{userAgent:i}=n.navigator||{},a=dt({user:r,...i&&{userAgent:i},...e}),o=t.getSession();return o?.status===`ok`&&F(o,{status:`exited`}),Fr(),t.setSession(a),a}function Fr(){let e=B(),t=z().getSession()||e.getSession();t&&ft(t),Ir(),e.setSession()}function Ir(){let e=B(),t=V(),n=e.getSession();n&&t&&t.captureSession(n)}function Lr(e=!1){if(e){Fr();return}Ir()}function Rr(e){let t=e.protocol?`${e.protocol}:`:``,n=e.port?`:${e.port}`:``;return`${t}//${e.host}${n}${e.path?`/${e.path}`:``}/api/`}function zr(e){return`${Rr(e)}${e.projectId}/envelope/`}function Br(e,t){let n={sentry_version:`7`};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Vr(e,t,n){return t||`${zr(e)}?${Br(e,n)}`}var Hr=[];function Ur(e){let t={};return e.forEach(e=>{let{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}function Wr(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(e=>{e.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n==`function`){let e=n(t);r=Array.isArray(e)?e:[e]}else r=t;return Ur(r)}function Gr(e,t){let n={};return t.forEach(t=>{t?.beforeSetup&&t.beforeSetup(e)}),t.forEach(t=>{t&&qr(e,t,n)}),n}function Kr(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function qr(e,n,r){if(r[n.name]){t&&m.log(`Integration skipped because it was already installed: ${n.name}`);return}if(r[n.name]=n,!Hr.includes(n.name)&&typeof n.setupOnce==`function`&&(n.setupOnce(),Hr.push(n.name)),n.setup&&typeof n.setup==`function`&&n.setup(e),typeof n.preprocessEvent==`function`){let t=n.preprocessEvent.bind(n);e.on(`preprocessEvent`,(n,r)=>t(n,r,e))}if(typeof n.processEvent==`function`){let t=n.processEvent.bind(n),r=Object.assign((n,r)=>t(n,r,e),{id:n.name});e.addEventProcessor(r)}[`processSpan`,`processSegmentSpan`].forEach(t=>{let r=n[t];typeof r==`function`&&e.on(t,t=>r.call(n,t,e))}),t&&m.log(`Integration installed: ${n.name}`)}function J(e){return e}function Jr(){return typeof __SENTRY_BROWSER_BUNDLE__<`u`&&!!__SENTRY_BROWSER_BUNDLE__}function Yr(){return`npm`}function Xr(){return!Jr()&&Object.prototype.toString.call(typeof process<`u`?process:0)===`[object process]`}function Zr(){return typeof window<`u`&&(!Xr()||Qr())}function Qr(){return n.process?.type===`renderer`}function $r(e,t){let n=t?`auto`:`never`;return[{type:`log`,item_count:e.length,content_type:`application/vnd.sentry.items.log+json`},{version:2,...Zr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function ei(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=H(r)),U(a,[$r(e,i)])}function ti(e,t){let n=t??ni(e)??[];if(n.length===0)return;let r=e.getOptions(),i=ei(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);ri().set(e,[]),e.emit(`flushLogs`),e.sendEnvelope(i)}function ni(e){return ri().get(e)}function ri(){return o(`clientToLogBufferMap`,()=>new WeakMap)}function ii(e,t){let n=t?`auto`:`never`;return[{type:`trace_metric`,item_count:e.length,content_type:`application/vnd.sentry.items.trace-metric+json`},{version:2,...Zr()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function ai(e,t,n,r,i){let a={};return t?.sdk&&(a.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(a.dsn=H(r)),U(a,[ii(e,i)])}function oi(e,t){let n=t??si(e)??[];if(n.length===0)return;let r=e.getOptions(),i=ai(n,r._metadata,r.tunnel,e.getDsn(),e.getDataCollectionOptions().userInfo);ci().set(e,[]),e.emit(`flushMetrics`),e.sendEnvelope(i)}function si(e){return ci().get(e)}function ci(){return o(`clientToMetricBufferMap`,()=>new WeakMap)}function li(e){return _n({trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,name:e.description||``,start_timestamp:e.start_timestamp,end_timestamp:e.timestamp||e.start_timestamp,status:!e.status||e.status===`ok`||e.status===`cancelled`?`ok`:`error`,is_segment:!1,attributes:{...e.data},links:e.links})}function ui(e,t){if(e.type!==`transaction`||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!t.getOptions().streamGenAiSpans||$n(t))return;let n=[],r=[];for(let t of e.spans)t.op?.startsWith(`gen_ai.`)?n.push(li(t)):r.push(t);if(n.length===0)return;e.spans=r;let i=t.getOptions().sendDefaultPii?`auto`:`never`;return[{type:`span`,item_count:n.length,content_type:`application/vnd.sentry.items.span.v2+json`},{version:2,...Zr()&&{ingest_settings:{infer_ip:i,infer_user_agent:i}},items:n}]}function di(e){return typeof e==`object`&&typeof e.unref==`function`&&e.unref(),e}var fi=Symbol.for(`SentryBufferFullError`);function pi(e=100){let t=new Set;function n(){return t.size<e}function r(e){t.delete(e)}function i(e){if(!n())return mr(fi);let i=e();return t.add(i),i.then(()=>r(i),()=>r(i)),i}function a(e){if(!t.size)return G(!0);let n=Promise.allSettled(Array.from(t)).then(()=>!0);if(!e)return n;let r=[n,new Promise(t=>di(setTimeout(()=>t(!1),e)))];return Promise.race(r)}return{get $(){return Array.from(t)},add:i,drain:a}}var mi=60*1e3;function hi(e,t=Re()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?mi:r-t}function gi(e,t){return e[t]||e.all||0}function _i(e,t,n=Re()){return gi(e,t)>n}function vi(e,{statusCode:t,headers:n},r=Re()){let i={...e},a=n?.[`x-sentry-rate-limits`],o=n?.[`retry-after`];if(a)for(let e of a.trim().split(`,`)){let[t,n,,,a]=e.split(`:`,5),o=parseInt(t,10),s=(isNaN(o)?60:o)*1e3;if(!n)i.all=r+s;else for(let e of n.split(`;`))e===`metric_bucket`?(!a||a.split(`;`).includes(`custom`))&&(i[e]=r+s):i[e]=r+s}else o?i.all=r+hi(o,r):t===429&&(i.all=r+60*1e3);return i}function yi(e,n,r=pi(e.bufferSize||64)){let i={},a=e=>r.drain(e);function o(a){let o=[];if(zn(a,(t,n)=>{let r=qn(n);_i(i,r)?e.recordDroppedEvent(`ratelimit_backoff`,r):o.push(t)}),o.length===0)return Promise.resolve({});let s=U(a[0],o),c=n=>{if(Bn(s,[`client_report`])){t&&m.warn(`Dropping client report. Will not send outcomes (reason: ${n}).`);return}zn(s,(t,r)=>{e.recordDroppedEvent(n,qn(r))})};return r.add(()=>n({body:Hn(s)}).then(e=>e.statusCode===413?(t&&m.error(`Sentry responded with status code 413. Envelope was discarded due to exceeding size limits.`),c(`send_error`),e):(t&&e.statusCode!==void 0&&(e.statusCode<200||e.statusCode>=300)&&m.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),i=vi(i,e),e),e=>{throw c(`network_error`),t&&m.error(`Encountered error running transport request:`,e),e})).then(e=>e,e=>{if(e===fi)return t&&m.error(`Skipped sending event because buffer is full.`),c(`queue_overflow`),Promise.resolve({});throw e})}return{send:o,flush:a}}function bi(e,t,n){let r=[{type:`client_report`},{timestamp:n||N(),discarded_events:e}];return U(t?{dsn:t}:{},[r])}function xi(e){let t=[];e.message&&t.push(e.message);try{let n=e.exception.values[e.exception.values.length-1];n?.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`))}catch{}return t}function Si(e){let{trace_id:t,parent_span_id:n,span_id:r,status:i,origin:a,data:o,op:s}=e.contexts?.trace??{};return{data:o??{},description:e.transaction,op:s,parent_span_id:n,span_id:r??``,start_timestamp:e.start_timestamp??0,status:i,timestamp:e.timestamp,trace_id:t??``,origin:a,profile_id:o?.[Ut],exclusive_time:o?.[Wt],measurements:e.measurements,is_segment:!0}}function Ci(e){return{type:`transaction`,timestamp:e.timestamp,start_timestamp:e.start_timestamp,transaction:e.description,contexts:{trace:{trace_id:e.trace_id,span_id:e.span_id,parent_span_id:e.parent_span_id,op:e.op,status:e.status,origin:e.origin,data:{...e.data,...e.profile_id&&{"sentry.profile_id":e.profile_id},...e.exclusive_time&&{"sentry.exclusive_time":e.exclusive_time}}}},measurements:e.measurements}}var wi=[`forwarded`,`-ip`,`remote-`,`via`,`-user`];function Ti(e){return e===!0?{userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[`incomingRequest`,`outgoingRequest`,`incomingResponse`,`outgoingResponse`],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5}:{userInfo:!1,cookies:{deny:wi},httpHeaders:{request:{deny:wi},response:{deny:wi}},httpBodies:[],queryParams:{deny:wi},genAI:{inputs:!1,outputs:!1},stackFrameVariables:!0,frameContextLines:5}}var Ei={userInfo:!1,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:[],queryParams:!0,genAI:{inputs:!0,outputs:!0},stackFrameVariables:!0,frameContextLines:5};function Di(e){let t=e.dataCollection==null?Ti(e.sendDefaultPii):Ei,n=e.dataCollection??{};return{userInfo:n.userInfo??t.userInfo,cookies:n.cookies??t.cookies,httpHeaders:{request:n.httpHeaders?.request??t.httpHeaders.request,response:n.httpHeaders?.response??t.httpHeaders.response},httpBodies:n.httpBodies??t.httpBodies,queryParams:n.queryParams??t.queryParams,genAI:{inputs:n.genAI?.inputs??t.genAI.inputs,outputs:n.genAI?.outputs??t.genAI.outputs},stackFrameVariables:n.stackFrameVariables??t.stackFrameVariables,frameContextLines:n.frameContextLines??t.frameContextLines}}var Oi=`Not capturing exception because it's already been captured.`,ki=`Discarded session because of missing or non-string release`,Ai=Symbol.for(`SentryInternalError`),ji=Symbol.for(`SentryDoNotSendEventError`),Mi=5e3;function Ni(e){return{message:e,[Ai]:!0}}function Pi(e){return{message:e,[ji]:!0}}function Fi(e){return!!e&&typeof e==`object`&&Ai in e}function Ii(e){return!!e&&typeof e==`object`&&ji in e}function Li(e,t,n,r,i){let a=0,o,s=!1;e.on(n,()=>{a=0,clearTimeout(o),s=!1}),e.on(t,t=>{if(a+=r(t),a>=8e5)i(e);else if(!s){let t=e.getOptions()._flushInterval??Mi;t>0&&(s=!0,o=di(setTimeout(()=>{i(e)},t)))}}),e.on(`flush`,()=>{i(e)})}var Ri=class{constructor(e){if(this._options=e,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=pi(e.transportOptions?.bufferSize??64),this._dataCollection=Di(e),e.dsn?this._dsn=cn(e.dsn):t&&m.warn(`No DSN provided, client will not send events.`),this._dsn){let t=Vr(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:t})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&Li(this,`afterCaptureLog`,`flushLogs`,Gi,ti),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Li(this,`afterCaptureMetric`,`flushMetrics`,Wi,oi)}captureException(e,n,r){let i=A();if(ot(e))return t&&m.log(Oi),i;let a={event_id:i,...n};return this._process(()=>this.eventFromException(e,a).then(e=>this._captureEvent(e,a,r)).then(e=>e),`error`),a.event_id}captureMessage(e,t,n,r){let i={event_id:A(),...n},a=Ee(e)?e:String(e),o=S(e),s=o?this.eventFromMessage(a,t,i):this.eventFromException(e,i);return this._process(()=>s.then(e=>this._captureEvent(e,i,r)),o?`unknown`:`error`),i.event_id}captureEvent(e,n,r){let i=A();if(n?.originalException&&ot(n.originalException))return t&&m.log(Oi),i;let a={event_id:i,...n},o=e.sdkProcessingMetadata||{},s=o.capturedSpanScope,c=o.capturedSpanIsolationScope,l=zi(e.type);return this._process(()=>this._captureEvent(e,a,s||r,c),l),a.event_id}captureSession(e){this.sendSession(e),F(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){let t=this._transport;if(this.emit(`flush`),!t)return!0;let n=await this._isClientDoneProcessing(e),r=await t.flush(e);return n&&r}async close(e){ti(this);let t=await this.flush(e);return this.getOptions().enabled=!1,this.emit(`close`),t}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){let t=this._integrations[e.name];!t&&e.beforeSetup&&e.beforeSetup(this),qr(this,e,this._integrations),t||Kr(this,[e])}sendEvent(e,t={}){this.emit(`beforeSendEvent`,e,t);let n=ui(e,this),r=Qn(e,this._dsn,this._options._metadata,this._options.tunnel);for(let e of t.attachments||[])r=Rn(r,Wn(e));n&&(r=Rn(r,n)),this.sendEnvelope(r).then(t=>this.emit(`afterSendEvent`,e,t))}sendSession(e){let{release:n,environment:r=Mn}=this._options;if(`aggregates`in e){let i=e.attrs||{};if(!i.release&&!n){t&&m.warn(ki);return}i.release=i.release||n,i.environment=i.environment||r,e.attrs=i}else{if(!e.release&&!n){t&&m.warn(ki);return}e.release=e.release||n,e.environment=e.environment||r}this.emit(`beforeSendSession`,e);let i=Zn(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(i)}recordDroppedEvent(e,n,r=1){if(this._options.sendClientReports){let i=`${e}:${n}`;t&&m.log(`Recording outcome: "${i}"${r>1?` (${r} times)`:``}`),this._outcomes[i]=(this._outcomes[i]||0)+r}}on(e,t){let n=this._hooks[e]=this._hooks[e]||new Set,r=(...e)=>t(...e);return n.add(r),()=>{n.delete(r)}}emit(e,...t){let n=this._hooks[e];n&&n.forEach(e=>e(...t))}async sendEnvelope(e){if(this.emit(`beforeEnvelope`,e),this._isEnabled()&&this._transport)try{return await this._transport.send(e)}catch(e){return t&&m.error(`Error while sending envelope:`,e),{}}return t&&m.error(`Transport disabled`),{}}registerCleanup(e){}dispose(){}_setupIntegrations(){let{integrations:e}=this._options;this._integrations=Gr(this,e),Kr(this,e)}_updateSessionFromEvent(e,t){let n=t.level===`fatal`,r=!1,i=t.exception?.values;if(i){r=!0,n=!1;for(let e of i)if(e.mechanism?.handled===!1){n=!0;break}}let a=e.status===`ok`;(a&&e.errors===0||a&&n)&&(F(e,{...n&&{status:`crashed`},errors:e.errors||Number(r||n)}),this.captureSession(e))}async _isClientDoneProcessing(e){let t=0;for(;!e||t<e;){if(await new Promise(e=>setTimeout(e,1)),!this._numProcessing)return!0;t++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(e,t,n,r){let i=this.getOptions(),a=this.getIntegrationNames();return!t.integrations&&a.length&&(t.integrations=a),this.emit(`preprocessEvent`,e,t),e.type||r.setLastEventId(e.event_id||t.event_id),xr(i,e,t,n,this,r).then(e=>e===null?e:(this.emit(`postprocessEvent`,e,t),e.contexts={trace:{...e.contexts?.trace,...Bt(n)},...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Fn(this,n),...e.sdkProcessingMetadata},e))}_captureEvent(e,n={},r=z(),i=B()){return t&&Hi(e)&&m.log(`Captured error event \`${xi(e)[0]||`<unknown>`}\``),this._processEvent(e,n,r,i).then(e=>e.event_id,e=>{t&&(Ii(e)?m.log(e.message):Fi(e)?m.warn(e.message):m.warn(e))})}_processEvent(e,t,n,r){let i=this.getOptions(),{sampleRate:a}=i,o=Ui(e),s=Hi(e),c=`before send for type \`${e.type||`error`}\``,l=a===void 0?void 0:ln(a);if(s&&typeof l==`number`&&Le()>l)return this.recordDroppedEvent(`sample_rate`,`error`),mr(Pi(`Discarding event because it's not included in the random sample (sampling rate = ${a})`));let u=zi(e.type);return this._prepareEvent(e,t,n,r).then(e=>{if(e===null)throw this.recordDroppedEvent(`event_processor`,u),Pi("An event processor returned `null`, will not send event.");return t.data?.__sentry__===!0?e:Bi(Vi(this,i,e,t),c)}).then(i=>{if(i===null){if(this.recordDroppedEvent(`before_send`,u),o){let t=1+(e.spans||[]).length;this.recordDroppedEvent(`before_send`,`span`,t)}throw Pi(`${c} returned \`null\`, will not send event.`)}let a=n.getSession()||r.getSession();if(s&&a&&this._updateSessionFromEvent(a,i),o){let e=(i.sdkProcessingMetadata?.spanCountBeforeProcessing||0)-(i.spans?i.spans.length:0);e>0&&this.recordDroppedEvent(`before_send`,`span`,e)}let l=i.transaction_info;return o&&l&&i.transaction!==e.transaction&&(i.transaction_info={...l,source:`custom`}),this.sendEvent(i,t),i}).then(null,e=>{throw Ii(e)||Fi(e)?e:(this.captureException(e,{mechanism:{handled:!1,type:`internal`},data:{__sentry__:!0},originalException:e}),Ni(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
8
|
-
Reason: ${e}`))})}_process(e,t){this._numProcessing++,this._promiseBuffer.add(e).then(e=>(this._numProcessing--,e),e=>(this._numProcessing--,e===fi&&this.recordDroppedEvent(`queue_overflow`,t),e))}_clearOutcomes(){let e=this._outcomes;return this._outcomes={},Object.entries(e).map(([e,t])=>{let[n,r]=e.split(`:`);return{reason:n,category:r,quantity:t}})}_flushOutcomes(){t&&m.log(`Flushing outcomes...`);let e=this._clearOutcomes();if(e.length===0){t&&m.log(`No outcomes to send`);return}if(!this._dsn){t&&m.log(`No dsn provided, will not send outcomes`);return}t&&m.log(`Sending outcomes:`,e);let n=bi(e,this._options.tunnel&&H(this._dsn));this.sendEnvelope(n)}};function zi(e){return e===`replay_event`?`replay`:e||`error`}function Bi(e,t){let n=`${t} must return \`null\` or a valid event.`;if(C(e))return e.then(e=>{if(!De(e)&&e!==null)throw Ni(n);return e},e=>{throw Ni(`${t} rejected with ${e}`)});if(!De(e)&&e!==null)throw Ni(n);return e}function Vi(e,t,n,r){let{beforeSend:i,beforeSendTransaction:a,ignoreSpans:o}=t,s=!Ln(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(Hi(c)&&i)return i(c,r);if(Ui(c)){if(s||o){let t=Si(c);if(o?.length&&On({description:t.description,op:t.op,attributes:t.data},o))return null;if(s){let e=s(t);e?c=I(n,Ci(e)):Tn()}if(c.spans){let t=[],n=c.spans;for(let e of n){if(o?.length&&On({description:e.description,op:e.op,attributes:e.data},o)){An(n,e);continue}if(s){let n=s(e);n?t.push(n):(Tn(),t.push(e))}else t.push(e)}let r=c.spans.length-t.length;r&&e.recordDroppedEvent(`before_send`,`span`,r),c.spans=t}}if(a){if(c.spans){let e=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return a(c,r)}}return c}function Hi(e){return e.type===void 0}function Ui(e){return e.type===`transaction`}function Wi(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Ki(e.attributes)}function Gi(e){let t=0;return e.message&&(t+=e.message.length*2),t+Ki(e.attributes)}function Ki(e){if(!e)return 0;let t=0;return Object.values(e).forEach(e=>{Array.isArray(e)?t+=e.length*qi(e[0]):S(e)?t+=qi(e):t+=100}),t}function qi(e){return typeof e==`string`?e.length*2:typeof e==`number`?8:typeof e==`boolean`?4:0}function Ji(e,n){n.debug===!0&&(t?m.enable():u(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),z().update(n.initialScope);let r=new e(n);return Yi(r),r.init(),r}function Yi(e){z().setClient(e)}function Xi(e){`aggregates`in e?e.attrs?.ip_address===void 0&&(e.attrs={...e.attrs,ip_address:`{{auto}}`}):e.ipAddress===void 0&&(e.ipAddress=`{{auto}}`)}function Zi(e,t,n=[t],i=`npm`){let a=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};a.name||(a.name=`sentry.javascript.${t}`,a.packages=n.map(e=>({name:`${i}:@sentry/${e}`,version:r})),a.version=r)}var Qi=100;function Y(e,t){let n=V(),r=B();if(!n)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:a=Qi}=n.getOptions();if(a<=0)return;let o={timestamp:N(),...e},s=i?u(()=>i(o,t)):o;s!==null&&(n.emit&&n.emit(`beforeAddBreadcrumb`,s,t),r.addBreadcrumb(s,a))}var $i,ea=`FunctionToString`,ta=new WeakMap,na=J((()=>({name:ea,setupOnce(){$i=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=Me(this),n=ta.has(V())&&t!==void 0?t:this;return $i.apply(n,e)}}catch{}},setup(e){ta.set(e,!0)}}))),ra=[/^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$/],ia=`EventFilters`,aa=J((e={})=>{let t;return{name:ia,setup(n){t=sa(e,n.getOptions())},processEvent(n,r,i){return t||=sa(e,i.getOptions()),ca(n,t)?null:n}}}),oa=J(((e={})=>({...aa(e),name:`InboundFilters`})));function sa(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:ra],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function ca(e,n){if(!e.type){if(la(e,n.ignoreErrors))return t&&m.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
9
|
-
Event: ${j(e)}`),!0;if(ha(e))return t&&m.warn(`Event dropped due to not having an error message, error type or stacktrace.
|
|
10
|
-
Event: ${j(e)}`),!0;if(da(e,n.denyUrls))return t&&m.warn(`Event dropped due to being matched by \`denyUrls\` option.
|
|
11
|
-
Event: ${j(e)}.
|
|
12
|
-
Url: ${ma(e)}`),!0;if(!fa(e,n.allowUrls))return t&&m.warn(`Event dropped due to not being matched by \`allowUrls\` option.
|
|
13
|
-
Event: ${j(e)}.
|
|
14
|
-
Url: ${ma(e)}`),!0}else if(e.type===`transaction`&&ua(e,n.ignoreTransactions))return t&&m.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
15
|
-
Event: ${j(e)}`),!0;return!1}function la(e,t){return t?.length?xi(e).some(e=>k(e,t)):!1}function ua(e,t){if(!t?.length)return!1;let n=e.transaction;return n?k(n,t):!1}function da(e,t){if(!t?.length)return!1;let n=ma(e);return n?k(n,t):!1}function fa(e,t){if(!t?.length)return!0;let n=ma(e);return n?k(n,t):!0}function pa(e=[]){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&n.filename!==`<anonymous>`&&n.filename!==`[native code]`)return n.filename||null}return null}function ma(e){try{let t=[...e.exception?.values??[]].reverse().find(e=>e.mechanism?.parent_id===void 0&&e.stacktrace?.frames?.length)?.stacktrace?.frames;return t?pa(t):null}catch{return t&&m.error(`Cannot extract url for event ${j(e)}`),null}}function ha(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(e=>e.stacktrace||e.type&&e.type!==`Error`||e.value):!1}function ga(e,t,n,r,i,a){if(!i.exception?.values||!a||!w(a.originalException,Error))return;let o=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;o&&(i.exception.values=_a(e,t,r,a.originalException,n,i.exception.values,o,0))}function _a(e,t,n,r,i,a,o,s){if(a.length>=n+1)return a;let c=[...a];if(w(r[i],Error)){ya(o,s,r);let a=e(t,r[i]),l=c.length;ba(a,i,l,s),c=_a(e,t,n,r[i],i,[a,...c],a,l)}return va(r)&&r.errors.forEach((a,l)=>{if(w(a,Error)){ya(o,s,r);let u=e(t,a),d=c.length;ba(u,`errors[${l}]`,d,s),c=_a(e,t,n,a,i,[u,...c],u,d)}}),c}function va(e){return Array.isArray(e.errors)}function ya(e,t,n){e.mechanism={handled:!0,type:`auto.core.linked_errors`,...va(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function ba(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:`chained`,source:t,exception_id:n,parent_id:r}}function xa(e){return Se(e)&&`__sentry_fetch_url_host__`in e&&typeof e.__sentry_fetch_url_host__==`string`}function Sa(e){return xa(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}var Ca=new Set([]);function wa(e){let t=`console`,n=_(t,e);return v(t,Ta),n}function Ta(){`console`in n&&s.forEach(function(e){e in n.console&&T(n.console,e,function(r){return l[e]=r,function(...r){let i=r[0],a=l[e],o=Ca.size&&typeof i==`string`&&k(i,Ca);o||y(`console`,{args:r,level:e}),(!o||t&&m.isEnabled())&&a?.apply(n.console,r)}})})}function Ea(e){return e===`warn`?`warning`:[`fatal`,`error`,`warning`,`log`,`info`,`debug`].includes(e)?e:`log`}var Da=`Dedupe`,Oa=J((()=>{let e;return{name:Da,processEvent(n){if(n.type)return n;try{if(ka(n,e))return t&&m.warn(`Event dropped due to being a duplicate of previously captured event.`),null}catch{}return e=n}}}));function ka(e,t){return t?!!(Aa(e,t)||ja(e,t)):!1}function Aa(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Na(e,t)||!Ma(e,t))}function ja(e,t){let n=Pa(t),r=Pa(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Na(e,t)||!Ma(e,t))}function Ma(e,t){let n=pe(e),r=pe(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let e=0;e<r.length;e++){let t=r[e],i=n[e];if(t.filename!==i.filename||t.lineno!==i.lineno||t.colno!==i.colno||t.function!==i.function)return!1}return!0}function Na(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join(``)===r.join(``)}catch{return!1}}function Pa(e){return e.exception?.values?.[0]}var Fa=`ConversationId`,Ia=J((()=>({name:Fa,setup(e){e.on(`spanStart`,e=>{let t=z().getScopeData(),n=B().getScopeData(),r=t.conversationId||n.conversationId;if(r){let{op:t,data:n,description:i}=hn(e);if(!t?.startsWith(`gen_ai.`)&&!n[`ai.operationId`]&&!i?.startsWith(`ai.`))return;e.setAttribute(Gt,r)}})}})));function La(e){if(e!==void 0){if(e>=400&&e<500)return`warning`;if(e>=500)return`error`}}var X=n;function Ra(){return`history`in X&&!!X.history}function za(){if(!(`fetch`in X))return!1;try{return new Headers,new Request(`data:,`),new Response,!0}catch{return!1}}function Ba(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Va(){if(typeof EdgeRuntime==`string`)return!0;if(!za())return!1;if(Ba(X.fetch))return!0;let e=!1,n=X.document;if(n&&typeof n.createElement==`function`)try{let t=n.createElement(`iframe`);t.hidden=!0,n.head.appendChild(t),t.contentWindow?.fetch&&(e=Ba(t.contentWindow.fetch)),n.head.removeChild(t)}catch(e){t&&m.warn(`Could not create sandbox iframe for pure fetch check, bailing to window.fetch: `,e)}return e}function Ha(e,t){let n=`fetch`,r=_(n,e);return v(n,()=>Ua(void 0,t)),r}function Ua(e,t=!1){t&&!Va()||T(n,`fetch`,function(t){return function(...r){let i=Error(),{method:a,url:o}=Ka(r),s={args:r,fetchData:{method:a,url:o},startTimestamp:P()*1e3,virtualError:i,headers:qa(r)};return e||y(`fetch`,{...s}),t.apply(n,r).then(async t=>(e?e(t):y(`fetch`,{...s,endTimestamp:P()*1e3,response:t}),t),e=>{y(`fetch`,{...s,endTimestamp:P()*1e3,error:e}),Se(e)&&e.stack===void 0&&(e.stack=i.stack,E(e,`framesToPop`,1));let t=V()?.getOptions().enhanceFetchErrorMessages??`always`;if(t!==!1&&e instanceof TypeError&&(e.message===`Failed to fetch`||e.message===`Load failed`||e.message===`NetworkError when attempting to fetch resource.`))try{let n=new URL(s.fetchData.url).host;t===`always`?e.message=`${e.message} (${n})`:E(e,`__sentry_fetch_url_host__`,n)}catch{}throw e})}})}function Wa(e,t){return!!e&&typeof e==`object`&&!!e[t]}function Ga(e){return typeof e==`string`?e:e?Wa(e,`url`)?e.url:e.toString?e.toString():``:``}function Ka(e){if(e.length===0)return{method:`GET`,url:``};if(e.length===2){let[t,n]=e;return{url:Ga(t),method:Wa(n,`method`)?String(n.method).toUpperCase():Ae(t)&&Wa(t,`method`)?String(t.method).toUpperCase():`GET`}}let t=e[0];return{url:Ga(t),method:Wa(t,`method`)?String(t.method).toUpperCase():`GET`}}function qa(e){let[t,n]=e;try{if(typeof n==`object`&&n&&`headers`in n&&n.headers)return new Headers(n.headers);if(Ae(t))return new Headers(t.headers)}catch{}}var Ja=n;function Ya(){try{return Ja.document.location.href}catch{return``}}function Xa(e,t=5){if(!Ja.HTMLElement)return null;let n=e;for(let e=0;e<t;e++){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}var Z=n,Za=0;function Qa(){return Za>0}function $a(){Za++,setTimeout(()=>{Za--})}function Q(e,t={}){function r(e){return typeof e==`function`}if(!r(e))return e;try{let t=e.__sentry_wrapped__;if(t)return typeof t==`function`?t:e;if(Me(e))return e}catch{return e}let i=function(...r){n._sentryWrappedDepth=(n._sentryWrappedDepth||0)+1;try{let n=r.map(e=>Q(e,t));return e.apply(this,n)}catch(e){throw $a(),zt(n=>{n.addEventProcessor(e=>(t.mechanism&&(at(e,void 0,void 0),M(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),Mr(e)}),e}finally{n._sentryWrappedDepth=(n._sentryWrappedDepth||0)-1}};try{for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(i[t]=e[t])}catch{}je(i,e),E(e,`__sentry_wrapped__`,i);try{Object.getOwnPropertyDescriptor(i,`name`).configurable&&Object.defineProperty(i,"name",{get(){return e.name}})}catch{}return i}function eo(){let e=Ya(),{referrer:t}=Z.document||{},{userAgent:n}=Z.navigator||{};return{url:e,headers:{...t&&{Referer:t},...n&&{"User-Agent":n}}}}function to(e,t){let n=io(e,t),r={type:lo(t),value:uo(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===``&&(r.value=`Unrecoverable error caught`),r}function no(e,t,n,r){let i=V()?.getOptions().normalizeDepth,a=vo(t),o={__serialized__:Ge(t,i)};if(a)return{exception:{values:[to(e,a)]},extra:o};let s={exception:{values:[{type:Oe(t)?t.constructor.name:r?`UnhandledRejection`:`Error`,value:go(t,{isUnhandledRejection:r})}]},extra:o};if(n){let t=io(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}function ro(e,t){return{exception:{values:[to(e,t)]}}}function io(e,t){let n=t.stacktrace||t.stack||``,r=oo(t),i=so(t);try{return e(n,r,i)}catch{}return[]}var ao=/Minified React error #\d+;/i;function oo(e){return e&&ao.test(e.message)?1:0}function so(e){return typeof e.framesToPop==`number`?e.framesToPop:0}function co(e){return typeof WebAssembly<`u`&&WebAssembly.Exception!==void 0?e instanceof WebAssembly.Exception:!1}function lo(e){let t=e?.name;return!t&&co(e)?e.message&&Array.isArray(e.message)&&e.message.length==2?e.message[0]:`WebAssembly.Exception`:t}function uo(e){let t=e?.message;return co(e)?Array.isArray(e.message)&&e.message.length==2?e.message[1]:`wasm exception`:t?t.error&&typeof t.error.message==`string`?Sa(t.error):Sa(e):`No error message`}function fo(e,t,n,r){let i=mo(e,t,n?.syntheticException||void 0,r);return M(i),i.level=`error`,n?.event_id&&(i.event_id=n.event_id),G(i)}function po(e,t,n=`info`,r,i){let a=ho(e,t,r?.syntheticException||void 0,i);return a.level=n,r?.event_id&&(a.event_id=r.event_id),G(a)}function mo(e,t,n,r,i){let a;if(Ce(t)&&t.error)return ro(e,t.error);if(we(t)||Te(t)){let i=t;if(`stack`in t){a=ro(e,t);let i=a.exception?.values?.[0];if(r&&n&&i&&!i.stacktrace){let t=io(e,n);t.length&&(i.stacktrace={frames:t},M(a,{synthetic:!0}))}}else{let t=i.name||(we(i)?`DOMError`:`DOMException`),o=i.message?`${t}: ${i.message}`:t;a=ho(e,o,n,r),at(a,o)}return`code`in i&&(a.tags={...a.tags,"DOMException.code":`${i.code}`}),a}return Se(t)?ro(e,t):De(t)||Oe(t)?(a=no(e,t,n,i),M(a,{synthetic:!0}),a):(a=ho(e,t,n,r),at(a,`${t}`,void 0),M(a,{synthetic:!0}),a)}function ho(e,t,n,r){let i={};if(r&&n){let r=io(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]}),M(i,{synthetic:!0})}if(Ee(t)){let{__sentry_template_string__:e,__sentry_template_values__:n}=t;return i.logentry={message:e,params:n},i}return i.message=t,i}function go(e,{isUnhandledRejection:t}){let n=Fe(e),r=t?`promise rejection`:`exception`;return Ce(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Oe(e)?`Event \`${_o(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function _o(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function vo(e){return Object.values(e).find(e=>e instanceof Error)}var yo=class extends Ri{constructor(e){let t=bo(e);Zi(t,`browser`,[`browser`],Z.SENTRY_SDK_SOURCE||Yr()),t._metadata?.sdk&&(t._metadata.sdk.settings={infer_ip:t.sendDefaultPii?`auto`:`never`,...t._metadata.sdk.settings}),super(t);let{sendDefaultPii:n,sendClientReports:r,enableLogs:i,_experiments:a,enableMetrics:o}=this._options,s=o??a?.enableMetrics??!0;Z.document&&(r||i||s)&&Z.document.addEventListener(`visibilitychange`,()=>{Z.document.visibilityState===`hidden`&&(r&&this._flushOutcomes(),i&&ti(this),s&&oi(this))}),n&&this.on(`beforeSendSession`,Xi)}eventFromException(e,t){return fo(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t=`info`,n){return po(this._options.stackParser,e,t,n,this._options.attachStacktrace)}_prepareEvent(e,t,n,r){return e.platform=e.platform||`javascript`,super._prepareEvent(e,t,n,r)}};function bo(e){return{release:typeof __SENTRY_RELEASE__==`string`?__SENTRY_RELEASE__:Z.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...e}}var xo=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,$=n,So=80;function Co(e,t={}){if(!e)return`<unknown>`;try{let n=e,r=[],i=0,a=0,o,s=Array.isArray(t)?t:t.keyAttrs,c=!Array.isArray(t)&&t.maxStringLength||So;for(;n&&i++<5&&(o=wo(n,s),!(o===`html`||i>1&&a+r.length*3+o.length>=c));)r.push(o),a+=o.length,n=n.parentNode;return r.reverse().join(` > `)}catch{return`<unknown>`}}function wo(e,t){let n=e,r=[];if(!n?.tagName)return``;if(typeof HTMLElement<`u`&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let i=t?.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(i?.length)i.forEach(e=>{r.push(`[${e[0]}="${e[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let e=n.className;if(e&&x(e)){let t=e.split(/\s+/);for(let e of t)r.push(`.${e}`)}}for(let e of[`aria-label`,`type`,`name`,`title`,`alt`]){let t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join(``)}var To=1e3,Eo,Do,Oo;function ko(e){_(`dom`,e),v(`dom`,Ao)}function Ao(){if(!$.document)return;let e=y.bind(null,`dom`),t=No(e,!0);$.document.addEventListener(`click`,t,!1),$.document.addEventListener(`keypress`,t,!1),[`EventTarget`,`Node`].forEach(t=>{let n=$[t]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(T(n,`addEventListener`,function(t){return function(n,r,i){if(n===`click`||n==`keypress`)try{let r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},a=r[n]=r[n]||{refCount:0};if(!a.handler){let r=No(e);a.handler=r,t.call(this,n,r,i)}a.refCount++}catch{}return t.call(this,n,r,i)}}),T(n,`removeEventListener`,function(e){return function(t,n,r){if(t===`click`||t==`keypress`)try{let n=this.__sentry_instrumentation_handlers__||{},i=n[t];i&&(i.refCount--,i.refCount<=0&&(e.call(this,t,i.handler,r),i.handler=void 0,delete n[t]),Object.keys(n).length===0&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}}))})}function jo(e){if(e.type!==Do)return!1;try{if(!e.target||e.target._sentryId!==Oo)return!1}catch{}return!0}function Mo(e,t){return e===`keypress`?t?.tagName?!(t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable):!0:!1}function No(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=Po(n);if(Mo(n.type,r))return;E(n,`_sentryCaptured`,!0),r&&!r._sentryId&&E(r,`_sentryId`,A());let i=n.type===`keypress`?`input`:n.type;jo(n)||(e({event:n,name:i,global:t}),Do=n.type,Oo=r?r._sentryId:void 0),clearTimeout(Eo),Eo=$.setTimeout(()=>{Oo=void 0,Do=void 0},To)}}function Po(e){try{return e.target}catch{return null}}var Fo;function Io(e){let t=`history`;_(t,e),v(t,Lo)}function Lo(){if($.addEventListener(`popstate`,()=>{let e=$.location.href,t=Fo;Fo=e,t!==e&&y(`history`,{from:t,to:e})}),!Ra())return;function e(e){return function(...t){let n=t.length>2?t[2]:void 0;if(n){let r=Fo,i=Ro(String(n));if(Fo=i,r===i)return e.apply(this,t);y(`history`,{from:r,to:i})}return e.apply(this,t)}}T($.history,`pushState`,e),T($.history,`replaceState`,e)}function Ro(e){try{return new URL(e,$.location.origin).toString()}catch{return e}}var zo={};function Bo(e){let t=zo[e];if(t)return t;let n=$[e];if(Ba(n))return zo[e]=n.bind($);let r=$.document;if(r&&typeof r.createElement==`function`)try{let t=r.createElement(`iframe`);t.hidden=!0,r.head.appendChild(t);let i=t.contentWindow;i?.[e]&&(n=i[e]),r.head.removeChild(t)}catch(t){xo&&m.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(zo[e]=n.bind($))}function Vo(e){zo[e]=void 0}var Ho=`__sentry_xhr_v3__`;function Uo(e){_(`xhr`,e),v(`xhr`,Wo)}function Wo(){if(!$.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;e.open=new Proxy(e.open,{apply(e,t,n){let r=Error(),i=P()*1e3,a=x(n[0])?n[0].toUpperCase():void 0,o=Go(n[1]);if(!a||!o)return e.apply(t,n);t[Ho]={method:a,url:o,request_headers:{}},a===`POST`&&o.match(/sentry_key/)&&(t.__sentry_own_request__=!0);let s=()=>{let e=t[Ho];if(e&&t.readyState===4){try{e.status_code=t.status}catch{}y(`xhr`,{endTimestamp:P()*1e3,startTimestamp:i,xhr:t,virtualError:r})}};return`onreadystatechange`in t&&typeof t.onreadystatechange==`function`?t.onreadystatechange=new Proxy(t.onreadystatechange,{apply(e,t,n){return s(),e.apply(t,n)}}):t.addEventListener(`readystatechange`,s),t.setRequestHeader=new Proxy(t.setRequestHeader,{apply(e,t,n){let[r,i]=n,a=t[Ho];return a&&x(r)&&x(i)&&(a.request_headers[r.toLowerCase()]=i),e.apply(t,n)}}),e.apply(t,n)}}),e.send=new Proxy(e.send,{apply(e,t,n){let r=t[Ho];return r?(n[0]!==void 0&&(r.body=n[0]),y(`xhr`,{startTimestamp:P()*1e3,xhr:t}),e.apply(t,n)):e.apply(t,n)}})}function Go(e){if(x(e))return e;try{return e.toString()}catch{}}function Ko(e){if(typeof Element>`u`)return!1;try{return e instanceof Element}catch{return!1}}var qo=40;function Jo(e,t=Bo(`fetch`)){let n=0,r=0;async function i(i){let a=i.body.length;n+=a,r++;let o={body:i.body,method:`POST`,referrerPolicy:`strict-origin`,headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{let n=await t(e.url,o);return{statusCode:n.status,headers:{"x-sentry-rate-limits":n.headers.get(`X-Sentry-Rate-Limits`),"retry-after":n.headers.get(`Retry-After`)}}}catch(e){throw Vo(`fetch`),e}finally{n-=a,r--}}return yi(e,i,pi(e.bufferSize||qo))}var Yo=typeof __SENTRY_DEBUG__>`u`||__SENTRY_DEBUG__,Xo=30,Zo=50;function Qo(e,t,n,r){let i={filename:e,function:t===`<anonymous>`?`?`:t,in_app:!0};return n!==void 0&&(i.lineno=n),r!==void 0&&(i.colno=r),i}var $o=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,es=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ts=/\((\S*)(?::(\d+))(?::(\d+))\)/,ns=/at (.+?) ?\(data:(.+?),/,rs=[Xo,e=>{let t=e.match(ns);if(t)return{filename:`<data:${t[2]}>`,function:t[1]};let n=$o.exec(e);if(n){let[,e,t,r]=n;return Qo(e,`?`,+t,+r)}let r=es.exec(e);if(r){if(r[2]?.indexOf(`eval`)===0){let e=ts.exec(r[2]);e&&(r[2]=e[1],r[3]=e[2],r[4]=e[3])}let[e,t]=ss(r[1]||`?`,r[2]);return Qo(t,e,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],is=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,as=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,os=ce(rs,[Zo,e=>{let t=is.exec(e);if(t){if(t[3]&&t[3].indexOf(` > eval`)>-1){let e=as.exec(t[3]);e&&(t[1]=t[1]||`eval`,t[3]=e[1],t[4]=e[2],t[5]=``)}let e=t[3],n=t[1]||`?`;return[n,e]=ss(n,e),Qo(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}]),ss=(e,t)=>{let n=e.indexOf(`safari-extension`)!==-1,r=e.indexOf(`safari-web-extension`)!==-1;return n||r?[e.indexOf(`@`)===-1?`?`:e.split(`@`)[0],n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},cs=1024,ls=`Breadcrumbs`,us=J(((e={})=>{let t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:ls,setup(e){t.console&&wa(ps(e)),t.dom&&ko(fs(e,t.dom)),t.xhr&&Uo(ms(e)),t.fetch&&Ha(hs(e)),t.history&&Io(gs(e)),t.sentry&&e.on(`beforeSendEvent`,ds(e))}}}));function ds(e){return function(t){V()===e&&Y({category:`sentry.${t.type===`transaction`?`transaction`:`event`}`,event_id:t.event_id,level:t.level,message:j(t)},{event:t})}}function fs(e,t){return function(n){if(V()!==e)return;let r,i,a=typeof t==`object`?t.serializeAttribute:void 0,o=typeof t==`object`&&typeof t.maxStringLength==`number`?t.maxStringLength:void 0;o&&o>cs&&(Yo&&m.warn(`\`dom.maxStringLength\` cannot exceed ${cs}, but a value of ${o} was configured. Sentry will use ${cs} instead.`),o=cs),typeof a==`string`&&(a=[a]);try{let e=n.event,t=_s(e)?e.target:e;r=Co(t,{keyAttrs:a,maxStringLength:o}),i=Xa(t)}catch{r=`<unknown>`}if(r.length===0)return;let s={category:`ui.${n.name}`,message:r};i&&(s.data={"ui.component_name":i}),Y(s,{event:n.event,name:n.name,global:n.global})}}function ps(e){return function(t){if(V()!==e)return;let n={category:`console`,data:{arguments:t.args,logger:`console`},level:Ea(t.level),message:$e(t.args,` `)};if(t.level===`assert`)if(t.args[0]===!1)n.message=`Assertion failed: ${$e(t.args.slice(1),` `)||`console.assert`}`,n.data.arguments=t.args.slice(1);else return;Y(n,{input:t.args,level:t.level})}}function ms(e){return function(t){if(V()!==e)return;let{startTimestamp:n,endTimestamp:r}=t,i=t.xhr[Ho];if(!n||!r||!i)return;let{method:a,url:o,status_code:s,body:c}=i,l={method:a,url:o,status_code:s},u={xhr:t.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:`xhr`,data:l,type:`http`,level:La(s)};e.emit(`beforeOutgoingRequestBreadcrumb`,d,u),Y(d,u)}}function hs(e){return function(t){if(V()!==e)return;let{startTimestamp:n,endTimestamp:r}=t;if(r&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method===`POST`))if(t.error){let i={data:t.error,input:t.args,startTimestamp:n,endTimestamp:r},a={category:`fetch`,data:t.fetchData,level:`error`,type:`http`};e.emit(`beforeOutgoingRequestBreadcrumb`,a,i),Y(a,i)}else{let i=t.response,a={...t.fetchData,status_code:i?.status},o={input:t.args,response:i,startTimestamp:n,endTimestamp:r},s={category:`fetch`,data:a,type:`http`,level:La(a.status_code)};e.emit(`beforeOutgoingRequestBreadcrumb`,s,o),Y(s,o)}}}function gs(e){return function(t){if(V()!==e)return;let n=t.from,r=t.to,i=cr(Z.location.href),a=n?cr(n):void 0,o=cr(r);a?.path||(a=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===a.protocol&&i.host===a.host&&(n=a.relative),Y({category:`navigation`,data:{from:n,to:r}})}}function _s(e){return!!e&&!!e.target}var vs=`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(`,`),ys=`BrowserApiErrors`,bs=J(((e={})=>{let t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...e};return{name:ys,setupOnce(){t.setTimeout&&T(Z,`setTimeout`,xs),t.setInterval&&T(Z,`setInterval`,xs),t.requestAnimationFrame&&T(Z,`requestAnimationFrame`,Ss),t.XMLHttpRequest&&`XMLHttpRequest`in Z&&T(XMLHttpRequest.prototype,`send`,Cs);let e=t.eventTarget;e&&(Array.isArray(e)?e:vs).forEach(e=>ws(e,t))}}}));function xs(e){return function(...t){let n=t[0];return t[0]=Q(n,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${h(e)}`}}),e.apply(this,t)}}function Ss(e){return function(t){return e.apply(this,[Q(t,{mechanism:{data:{handler:h(e)},handled:!1,type:`auto.browser.browserapierrors.requestAnimationFrame`}})])}}function Cs(e){return function(...t){let n=this;return[`onload`,`onerror`,`onprogress`,`onreadystatechange`].forEach(e=>{e in n&&typeof n[e]==`function`&&T(n,e,function(t){let n={mechanism:{data:{handler:h(t)},handled:!1,type:`auto.browser.browserapierrors.xhr.${e}`}},r=Me(t);return r&&(n.mechanism.data.handler=h(r)),Q(t,n)})}),e.apply(this,t)}}function ws(e,t){let n=Z[e]?.prototype;n?.hasOwnProperty?.(`addEventListener`)&&(T(n,`addEventListener`,function(n){return function(r,i,a){try{Ts(i)&&(i.handleEvent=Q(i.handleEvent,{mechanism:{data:{handler:h(i),target:e},handled:!1,type:`auto.browser.browserapierrors.handleEvent`}}))}catch{}return t.unregisterOriginalCallbacks&&Es(this,r,i),n.apply(this,[r,Q(i,{mechanism:{data:{handler:h(i),target:e},handled:!1,type:`auto.browser.browserapierrors.addEventListener`}}),a])}}),T(n,`removeEventListener`,function(e){return function(t,n,r){try{let i=n.__sentry_wrapped__;i&&e.call(this,t,i,r)}catch{}return e.call(this,t,n,r)}}))}function Ts(e){return typeof e.handleEvent==`function`}function Es(e,t,n){e&&typeof e==`object`&&`removeEventListener`in e&&typeof e.removeEventListener==`function`&&e.removeEventListener(t,n)}var Ds=J((e={})=>{let t=e.lifecycle??`route`;return{name:`BrowserSession`,setupOnce(){if(Z.document===void 0){Yo&&m.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");return}Pr({ignoreDuration:!0}),Lr();let e=B(),n=e.getUser();e.addScopeListener(e=>{let t=e.getUser();(n?.id!==t?.id||n?.ip_address!==t?.ip_address)&&(Lr(),n=t)}),t===`route`&&Io(({from:e,to:t})=>{e!==t&&(Pr({ignoreDuration:!0}),Lr())})}}}),Os=`CultureContext`,ks=J((()=>({name:Os,preprocessEvent(e){let t=As();t&&(e.contexts={...e.contexts,culture:{...t,...e.contexts?.culture}})},processSegmentSpan(e){let t=As();t&&ur(e,{"culture.locale":t.locale,"culture.timezone":t.timezone,"culture.calendar":t.calendar})}})));function As(){try{let e=Z.Intl;if(!e)return;let t=e.DateTimeFormat().resolvedOptions();return{locale:t.locale,timezone:t.timeZone,calendar:t.calendar}}catch{return}}var js=`GlobalHandlers`,Ms=J(((e={})=>{let t={onerror:!0,onunhandledrejection:!0,...e};return{name:js,setupOnce(){Error.stackTraceLimit=50},setup(e){t.onerror&&(Ns(e),Rs(`onerror`)),t.onunhandledrejection&&(Ps(e),Rs(`onunhandledrejection`))}}}));function Ns(e){ge(t=>{let{stackParser:n,attachStacktrace:r}=zs();if(V()!==e||Qa())return;let{msg:i,url:a,line:o,column:s,error:c}=t,l=Ls(mo(n,c||i,void 0,r,!1),a,o,s);l.level=`error`,Nr(l,{originalException:c,mechanism:{handled:!1,type:`auto.browser.global_handlers.onerror`}})})}function Ps(e){ye(t=>{let{stackParser:n,attachStacktrace:r}=zs();if(V()!==e||Qa())return;let i=Fs(t),a=S(i)?Is(i):mo(n,i,void 0,r,!0);a.level=`error`,Nr(a,{originalException:i,mechanism:{handled:!1,type:`auto.browser.global_handlers.onunhandledrejection`}})})}function Fs(e){if(S(e))return e;try{if(`reason`in e)return e.reason;if(`detail`in e&&`reason`in e.detail)return e.detail.reason}catch{}return e}function Is(e){return{exception:{values:[{type:`UnhandledRejection`,value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function Ls(e,t,n,r){let i=e.exception=e.exception||{},a=i.values=i.values||[],o=a[0]=a[0]||{},s=o.stacktrace=o.stacktrace||{},c=s.frames=s.frames||[];return c.length===0&&c.push({colno:r,lineno:n,filename:Bs(t)??Ya(),function:`?`,in_app:!0}),e}function Rs(e){Yo&&m.log(`Global Handler attached: ${e}`)}function zs(){return V()?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Bs(e){if(!(!x(e)||e.length===0))return e.startsWith(`data:`)?`<${lr(e,!1)}>`:e}var Vs=J(()=>({name:`HttpContext`,preprocessEvent(e){if(!Z.navigator&&!Z.location&&!Z.document)return;let t=eo(),n={...t.headers,...e.request?.headers};e.request={...t,...e.request,headers:n}},processSegmentSpan(e){if(!Z.navigator&&!Z.location&&!Z.document)return;let t=eo();ur(e,{"url.full":t.url||void 0,"http.request.header.user_agent":t.headers[`User-Agent`],"http.request.header.referer":t.headers.Referer})}})),Hs=`cause`,Us=5,Ws=`LinkedErrors`,Gs=J(((e={})=>{let t=e.limit||Us,n=e.key||Hs;return{name:Ws,preprocessEvent(e,r,i){ga(to,i.getOptions().stackParser,n,t,e,r)}}})),Ks=/^HTML(\w*)Element$/;function qs(e){if(typeof window<`u`&&e===window)return`[Window]`;if(typeof document<`u`&&e===document)return`[Document]`;if(Ko(e)){let t=Js(e);if(Ks.test(t))return`[HTMLElement: ${Co(e)}]`}}function Js(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:`null prototype`}function Ys(){return Xs()?(Yo&&u(()=>{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 Xs(){if(Z.window===void 0)return!1;let e=Z;if(e.nw||!(e.chrome||e.browser)?.runtime?.id)return!1;let t=Ya();return!(Z===Z.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(t))}function Zs(e){return[oa(),na(),Ia(),bs(),us(),Ms(),Gs(),Oa(),Vs(),ks(),Ds()]}function Qs(e={}){let t=!e.skipBrowserExtensionCheck&&Ys(),n=e.defaultIntegrations==null?Zs():e.defaultIntegrations,r={...e,enabled:t?!1:e.enabled,stackParser:le(e.stackParser||os),integrations:Wr({integrations:e.integrations,defaultIntegrations:n}),transport:e.transport||Jo};return We(qs),Ji(yo,r)}var $s=e(((e,t)=>{t.exports={}}));function ec(e,t,n,r){if(!(e instanceof Error))throw e;if(!(typeof window>`u`&&t||r))throw e.message+=` on line `+n,e;var i,a,o,s;try{r||=$s().readFileSync(t,{encoding:`utf8`}),i=3,a=r.split(`
|
|
16
|
-
`),o=Math.max(n-i,0),s=Math.min(a.length,n+i)}catch(r){e.message+=` - could not read from `+t+` (`+r.message+`)`,ec(e,null,n);return}i=a.slice(o,s).map(function(e,t){var r=t+o+1;return(r==n?` > `:` `)+r+`| `+e}).join(`
|
|
17
|
-
`),e.path=t;try{e.message=(t||`Pug`)+`:`+n+`
|
|
18
|
-
`+i+`
|
|
19
|
-
|
|
20
|
-
`+e.message}catch{}throw e}function tc(e){var t=``,n,r;try{r=1,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<div class="g-config-breadcrumb-container"></div>`,r=2,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<p class="g-sentry-description">`,r=3,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`To track errors in Sentry, enter your Sentry project DSNs here.</p>`,r=4,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<form id="g-sentry-server-form" role="form">`,r=5,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<div class="form-group">`,r=6,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<label class="control-label" for="g-sentry-server-dsn">`,r=6,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`Sentry Server DSN</label>`,r=7,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<input class="input-sm form-control" id="g-sentry-server-dsn" type="text" placeholder="Tracking ID"/></div>`,r=9,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<p class="g-validation-failed-message" id="g-sentry-server-error-message"></p>`,r=10,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<input class="btn btn-sm btn-primary" type="submit" value="Save"/></form>`,r=12,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<form id="g-sentry-client-form" role="form">`,r=13,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<div class="form-group">`,r=14,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<label class="control-label" for="g-sentry-client-dsn">`,r=14,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`Sentry Client DSN</label>`,r=15,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<input class="input-sm form-control" id="g-sentry-client-dsn" type="text" placeholder="Tracking ID"/></div>`,r=17,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<p class="g-validation-failed-message" id="g-sentry-client-error-message"></p>`,r=18,n=`/home/circleci/project/girder/plugins/sentry/girder_sentry/web_client/templates/configView.pug`,t+=`<input class="btn btn-sm btn-primary" type="submit" value="Save"/></form>`}catch(e){ec(e,n,r)}return t}var nc=girder.views.widgets.PluginConfigBreadcrumbWidget,rc=girder.views.View,{restRequest:ic}=girder.rest,ac=girder.events,oc=rc.extend({events:{"submit #g-sentry-server-form":function(e){e.preventDefault(),this.$(`#g-sentry-server-error-message`).empty(),this._saveSettings([{key:`sentry.backend_dsn`,value:this.$(`#g-sentry-server-dsn`).val().trim()}],{errorTarget:`#g-sentry-server-error-message`})},"submit #g-sentry-client-form":function(e){e.preventDefault(),this.$(`#g-sentry-client-error-message`).empty(),this._saveSettings([{key:`sentry.frontend_dsn`,value:this.$(`#g-sentry-client-dsn`).val().trim()}],{errorTarget:`#g-sentry-client-error-message`})}},initialize:function(){ic({method:`GET`,url:`system/setting`,data:{list:JSON.stringify([`sentry.backend_dsn`,`sentry.frontend_dsn`])}}).done(e=>{this.render(),this.$(`#g-sentry-server-dsn`).val(e[`sentry.backend_dsn`]),this.$(`#g-sentry-client-dsn`).val(e[`sentry.frontend_dsn`])})},render:function(){return this.$el.html(tc()),this.breadcrumb||=new nc({pluginName:`Sentry`,el:this.$(`.g-config-breadcrumb-container`),parentView:this}).render(),this},_saveSettings:function(e,t){ic({method:`PUT`,url:`system/setting`,data:{list:JSON.stringify(e)},error:null}).done(()=>{ac.trigger(`g:alert`,{icon:`ok`,text:`Settings saved.`,type:`success`,timeout:4e3})}).fail(e=>{this.$(t.errorTarget).text(e.responseJSON.message)})}}),sc=girder.router,cc=girder.events,{exposePluginConfig:lc}=girder.utilities.PluginUtils;lc(`sentry`,`plugins/sentry/config`),sc.route(`plugins/sentry/config`,`SentryConfig`,function(){cc.trigger(`g:navigateTo`,oc)});var uc=girder.events,{restRequest:dc}=girder.rest;uc.on(`g:appload.after`,function(){dc({method:`GET`,url:`sentry/dsn`}).done(e=>{e.sentry_dsn&&Qs({dsn:e.sentry_dsn})})})});
|