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