@drenso/homey-log 10.5300.0 → 10.5301.0

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.
package/build/index.js CHANGED
@@ -1,10 +1,10 @@
1
- "use strict";var ji=Object.create;var yt=Object.defineProperty;var zi=Object.getOwnPropertyDescriptor;var Zi=Object.getOwnPropertyNames;var Ji=Object.getPrototypeOf,Xi=Object.prototype.hasOwnProperty;var Ki=(e,t)=>{for(var n in t)yt(e,n,{get:t[n],enumerable:!0})},Mr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Zi(t))!Xi.call(e,o)&&o!==n&&yt(e,o,{get:()=>t[o],enumerable:!(r=zi(t,o))||r.enumerable});return e};var U=(e,t,n)=>(n=e!=null?ji(Ji(e)):{},Mr(t||!e||!e.__esModule?yt(n,"default",{value:e,enumerable:!0}):n,e)),qi=e=>Mr(yt({},"__esModule",{value:!0}),e);var af={};Ki(af,{Log:()=>Ar});module.exports=qi(af);var Wi=U(require("node:os"),1);var ii=U(require("node:os"),1);var g=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var h=globalThis;var Y="10.53.0";function P(){return te(h),h}function te(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Y,t[Y]=t[Y]||{}}function w(e,t,n=h){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[Y]=r[Y]||{};return o[e]||(o[e]=t())}var le=["debug","info","warn","error","log","assert","trace"],Qi="Sentry Logger ",F={};function x(e){if(!("console"in h))return e();let t=h.console,n={},r=Object.keys(F);r.forEach(o=>{let s=F[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function ea(){_n().enabled=!0}function ta(){_n().enabled=!1}function Ur(){return _n().enabled}function na(...e){gn("log",...e)}function ra(...e){gn("warn",...e)}function oa(...e){gn("error",...e)}function gn(e,...t){g&&Ur()&&x(()=>{h.console[e](`${Qi}[${e}]:`,...t)})}function _n(){return g?w("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var d={enable:ea,disable:ta,isEnabled:Ur,log:na,warn:ra,error:oa};var kr=/\(error: (.*)\)/,Pr=/captureMessage|captureException/;function xt(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{let s=[],i=n.split(`
1
+ "use strict";var ji=Object.create;var yt=Object.defineProperty;var zi=Object.getOwnPropertyDescriptor;var Zi=Object.getOwnPropertyNames;var Ji=Object.getPrototypeOf,Xi=Object.prototype.hasOwnProperty;var Ki=(e,t)=>{for(var n in t)yt(e,n,{get:t[n],enumerable:!0})},Mr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Zi(t))!Xi.call(e,o)&&o!==n&&yt(e,o,{get:()=>t[o],enumerable:!(r=zi(t,o))||r.enumerable});return e};var U=(e,t,n)=>(n=e!=null?ji(Ji(e)):{},Mr(t||!e||!e.__esModule?yt(n,"default",{value:e,enumerable:!0}):n,e)),qi=e=>Mr(yt({},"__esModule",{value:!0}),e);var af={};Ki(af,{Log:()=>Ar});module.exports=qi(af);var Wi=U(require("node:os"),1);var ii=U(require("node:os"),1);var g=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var h=globalThis;var Y="10.53.1";function P(){return te(h),h}function te(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Y,t[Y]=t[Y]||{}}function w(e,t,n=h){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[Y]=r[Y]||{};return o[e]||(o[e]=t())}var le=["debug","info","warn","error","log","assert","trace"],Qi="Sentry Logger ",F={};function x(e){if(!("console"in h))return e();let t=h.console,n={},r=Object.keys(F);r.forEach(o=>{let s=F[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function ea(){_n().enabled=!0}function ta(){_n().enabled=!1}function Ur(){return _n().enabled}function na(...e){gn("log",...e)}function ra(...e){gn("warn",...e)}function oa(...e){gn("error",...e)}function gn(e,...t){g&&Ur()&&x(()=>{h.console[e](`${Qi}[${e}]:`,...t)})}function _n(){return g?w("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var d={enable:ea,disable:ta,isEnabled:Ur,log:na,warn:ra,error:oa};var kr=/\(error: (.*)\)/,Pr=/captureMessage|captureException/;function xt(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{let s=[],i=n.split(`
2
2
  `);for(let a=r;a<i.length;a++){let c=i[a];c.length>1024&&(c=c.slice(0,1024));let u=kr.test(c)?c.replace(kr,"$1"):c;if(!u.includes("Error: ")){for(let p of t){let f=p(u);if(f){s.push(f);break}}if(s.length>=50+o)break}}return Dr(s.slice(o))}}function Sn(e){return Array.isArray(e)?xt(...e):e}function Dr(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(bt(t).function||"")&&t.pop(),t.reverse(),Pr.test(bt(t).function||"")&&(t.pop(),Pr.test(bt(t).function||"")&&t.pop()),t.slice(0,50).map(n=>({...n,filename:n.filename||bt(t).filename,function:n.function||"?"}))}function bt(e){return e[e.length-1]||{}}var hn="<anonymous>";function $e(e){try{return!e||typeof e!="function"?hn:e.name||hn}catch{return hn}}function Nt(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function wr(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var Ve={},Fr={};function me(e,t){return Ve[e]=Ve[e]||[],Ve[e].push(t),()=>{let n=Ve[e];if(n){let r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}function J(e,t){if(!Fr[e]){Fr[e]=!0;try{t()}catch(n){g&&d.error(`Error while instrumenting ${e}`,n)}}}function W(e,t){let n=e&&Ve[e];if(n)for(let r of n)try{r(t)}catch(o){g&&d.error(`Error while triggering instrumentation handler.
3
3
  Type: ${e}
4
4
  Name: ${$e(r)}
5
5
  Error:`,o)}}var En=null;function Br(e){let t="error";me(t,e),J(t,sa)}function sa(){En=h.onerror,h.onerror=function(e,t,n,r,o){return W("error",{column:r,error:o,line:n,msg:e,url:t}),En?En.apply(this,arguments):!1},h.onerror.__SENTRY_INSTRUMENTED__=!0}var Tn=null;function Gr(e){let t="unhandledrejection";me(t,e),J(t,ia)}function ia(){Tn=h.onunhandledrejection,h.onunhandledrejection=function(e){return W("unhandledrejection",e),Tn?Tn.apply(this,arguments):!0},h.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var Hr=Object.prototype.toString;function je(e){switch(Hr.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return K(e,Error)}}function Rt(e,t){return Hr.call(e)===`[object ${t}]`}function Yr(e){return Rt(e,"ErrorEvent")}function ge(e){return Rt(e,"String")}function ze(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function be(e){return e===null||ze(e)||typeof e!="object"&&typeof e!="function"}function ne(e){return Rt(e,"Object")}function Wr(e){return typeof Event<"u"&&K(e,Event)}function $r(e){return typeof Element<"u"&&K(e,Element)}function Vr(e){return Rt(e,"RegExp")}function X(e){return!!(e?.then&&typeof e.then=="function")}function jr(e){return ne(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function K(e,t){try{return e instanceof t}catch{return!1}}function At(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}var aa=h,ca=80;function zr(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,o=[],s=0,i=0,a=" > ",c=a.length,u,p=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||ca;for(;n&&s++<r&&(u=ua(n,p),!(u==="html"||s>1&&i+o.length*c+u.length>=f));)o.push(u),i+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function ua(e,t){let n=e,r=[];if(!n?.tagName)return"";if(aa.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let o=t?.length?t.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(o?.length)o.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&ge(s)){let i=s.split(/\s+/);for(let a of i)r.push(`.${a}`)}}for(let s of["aria-label","type","name","title","alt"]){let i=n.getAttribute(s);i&&r.push(`[${s}="${i}"]`)}return r.join("")}function Ze(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!="function")return;let o=n(r);typeof o=="function"&&Ct(o,r);try{e[t]=o}catch{g&&d.log(`Failed to replace method "${t}" in object`,e)}}function xe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{g&&d.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Ct(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,xe(e,"__sentry_original__",t)}catch{}}function In(e){return e.__sentry_original__}function vt(e){if(je(e))return{message:e.message,name:e.name,stack:e.stack,...Jr(e)};if(Wr(e)){let t={type:e.type,target:Zr(e.target),currentTarget:Zr(e.currentTarget),...Jr(e)};return typeof CustomEvent<"u"&&K(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Zr(e){try{return $r(e)?zr(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Jr(e){return typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e)):{}}function yn(e){let t=Object.keys(vt(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}var Ne;function Re(e){if(Ne!==void 0)return Ne?Ne(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=h;return t in n&&typeof n[t]=="function"?(Ne=n[t],Ne(e)):(Ne=null,e())}function D(){return Re(()=>Math.random())}function Ae(){return Re(()=>Date.now())}function Ce(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function bn(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let s=Math.min(o+140,r);return s>r-5&&(s=r),s===r&&(o=Math.max(s-140,0)),n=n.slice(o,s),o>0&&(n=`'{snip} ${n}`),s<r&&(n+=" {snip}"),n}function xn(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let o=e[r];try{At(o)?n.push(Nt(o)):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function $(e,t,n=!1){return ge(e)?Vr(t)?t.test(e):ge(t)?n?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function re(e,t=[],n=!1){for(let r of t)if($(e,r,n))return!0;return!1}function pa(){let e=h;return e.crypto||e.msCrypto}var Nn;function fa(){return D()*16}function b(e=pa()){try{if(e?.randomUUID)return Re(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Nn||(Nn="10000000100040008000"+1e11),Nn.replace(/[018]/g,t=>(t^(fa()&15)>>t/4).toString(16))}function Xr(e){return e.exception?.values?.[0]}function oe(e){let{message:t,event_id:n}=e;if(t)return t;let r=Xr(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function An(e,t,n){let r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}function ve(e,t){let n=Xr(e);if(!n)return;let r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism={...r,...o,...t},t&&"data"in t){let s={...o?.data,...t.data};n.mechanism.data=s}}var da=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;function Rn(e){return parseInt(e||"",10)}function Cn(e){let t=e.match(da)||[],n=Rn(t[1]),r=Rn(t[2]),o=Rn(t[3]);return{buildmetadata:t[5],major:isNaN(n)?void 0:n,minor:isNaN(r)?void 0:r,patch:isNaN(o)?void 0:o,prerelease:t[4]}}function Ot(e){if(Kr(e))return!0;try{xe(e,"__sentry_captured__",!0)}catch{}return!1}function Kr(e){try{return e.__sentry_captured__}catch{}}var Qr=1e3;function q(){return Ae()/Qr}function la(){let{performance:e}=h;if(!e?.now||!e.timeOrigin)return q;let t=e.timeOrigin;return()=>(t+Re(()=>e.now()))/Qr}var qr;function Lt(){return(qr??(qr=la()))()}function Je(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Lt(),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:b()),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 n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function se(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 o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=se(r[o],t[o],n-1));return r}function Xe(){return b()}function Ke(){return b().substring(16)}var vn="_sentrySpan";function qe(e,t){t?xe(e,vn,t):delete e[vn]}function Oe(e){return e[vn]}var ma=100,O=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Xe(),sampleRand:D()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,qe(t,Oe(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Je(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t=="function"?t(this):t,r=n instanceof e?n.getScopeData():ne(n)?t:void 0,{tags:o,attributes:s,extra:i,user:a,contexts:c,level:u,fingerprint:p=[],propagationContext:f,conversationId:l}=r||{};return this._tags={...this._tags,...o},this._attributes={...this._attributes,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),p.length&&(this._fingerprint=p),f&&(this._propagationContext=f),l&&(this._conversationId=l),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,qe(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Xe(),sampleRand:D()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:ma;if(r<=0)return this;let o={timestamp:q(),...t,message:t.message?Ce(t.message,2048):t.message};return this._breadcrumbs.push(o),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:Oe(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=se(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n?.event_id||b();if(!this._client)return g&&d.warn("No client configured on scope - will not capture exception!"),r;let o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){let o=r?.event_id||b();if(!this._client)return g&&d.warn("No client configured on scope - will not capture message!"),o;let s=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:o},this),o}captureEvent(t,n){let r=t.event_id||n?.event_id||b();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(g&&d.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function Qe(){return w("defaultCurrentScope",()=>new O)}function et(){return w("defaultIsolationScope",()=>new O)}var eo=e=>e instanceof Promise&&!e[to],to=Symbol("chained PromiseLike"),no=(e,t,n)=>{let r=e.then(o=>(t(o),o),o=>{throw n(o),o});return eo(r)&&eo(e)?r:ga(e,r)},ga=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let o=e[r];typeof o=="function"?Object.defineProperty(t,r,{value:(...s)=>o.apply(e,s),enumerable:!0,configurable:!0,writable:!0}):t[r]=o}return n&&Object.assign(t,{[to]:!0}),t};var On=class{constructor(t,n){let r;t?r=t:r=new O;let o;n?o=n:o=new O,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){let n=this._pushScope(),r;try{r=t(n)}catch(o){throw this._popScope(),o}return X(r)?no(r,()=>this._popScope(),()=>this._popScope()):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Le(){let e=P(),t=te(e);return t.stack=t.stack||new On(Qe(),et())}function _a(e){return Le().withScope(e)}function ha(e,t){let n=Le();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function ro(e){return Le().withScope(()=>e(Le().getIsolationScope()))}function oo(){return{withIsolationScope:ro,withScope:_a,withSetScope:ha,withSetIsolationScope:(e,t)=>ro(t),getCurrentScope:()=>Le().getScope(),getIsolationScope:()=>Le().getIsolationScope()}}function Ln(e){let t=P(),n=te(t);n.acs=e}function ie(e){let t=te(e);return t.acs?t.acs:oo()}function Sa(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function Ea(e,t){let{value:n,unit:r}=Sa(e)?e:{value:e,unit:void 0},o=Ta(n),s=r&&typeof r=="string"?{unit:r}:{};if(o)return{...o,...s};if(!t||t==="skip-undefined"&&n===void 0)return;let i="";try{i=JSON.stringify(n)??""}catch{}return{value:i,type:"string",...s}}function Mn(e,t=!1){let n={};for(let[r,o]of Object.entries(e??{})){let s=Ea(o,t);s&&(n[r]=s)}return n}function Un(e){if(!e)return 0;let t=0;for(let[n,r]of Object.entries(e)){t+=n.length*2,t+=r.type.length*2,t+=(r.unit?.length??0)*2;let o=r.value;Array.isArray(o)?t+=so(o[0])*o.length:be(o)?t+=so(o):t+=100}return t}function so(e){return typeof e=="string"?e.length*2:typeof e=="boolean"?4:typeof e=="number"?8:0}function Ta(e){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 Ia;function io(){return Ia?.()}function v(){let e=P();return ie(e).getCurrentScope()}function L(){let e=P();return ie(e).getIsolationScope()}function Mt(){return w("globalScope",()=>new O)}function _e(...e){let t=P(),n=ie(t);if(e.length===2){let[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function T(){return v().getClient()}function tt(e){let t=io();if(t)return{trace_id:t.traceId,span_id:t.spanId};let n=e.getPropagationContext(),{traceId:r,parentSpanId:o,propagationSpanId:s}=n,i={trace_id:r,span_id:s||Ke()};return o&&(i.parent_span_id=o),i}var B="sentry.source",kn="sentry.sample_rate",ao="sentry.previous_trace_sample_rate",G="sentry.op",Pn="sentry.origin";var co="sentry.release",uo="sentry.environment",po="sentry.segment.name",fo="sentry.segment.id",lo="sentry.sdk.name",mo="sentry.sdk.version",go="user.id",_o="user.email",Ut="user.ip_address",ho="user.name",kt="sentry.custom_span_name",Dn="sentry.profile_id",wn="sentry.exclusive_time";function So(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}var ya="_sentryScope",ba="_sentryIsolationScope";function Me(e){let t=e;return{scope:t[ya],isolationScope:So(t[ba])}}var Eo="sentry-";function Pt(e){let t=xa(e);if(!t)return;let n=Object.entries(t).reduce((r,[o,s])=>{if(o.startsWith(Eo)){let i=o.slice(Eo.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function xa(e){if(!(!e||!ge(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=To(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):To(e)}function To(e){return e.split(",").map(t=>{let n=t.indexOf("=");if(n===-1)return[];let r=t.slice(0,n),o=t.slice(n+1);return[r,o].map(s=>{try{return decodeURIComponent(s.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}var Na=/^o(\d+)\./,Ra=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function Aa(e){return e==="http"||e==="https"}function M(e,t=!1){let{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${i}`}function Ca(e){let t=Ra.exec(e);if(!t){x(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,o="",s="",i="",a=""]=t.slice(1),c="",u=a,p=u.split("/");if(p.length>1&&(c=p.slice(0,-1).join("/"),u=p.pop()),u){let f=u.match(/^\d+/);f&&(u=f[0])}return Io({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Io(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function va(e){if(!g)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(d.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?Aa(r)?t&&isNaN(parseInt(t,10))?(d.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(d.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(d.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Oa(e){return e.match(Na)?.[1]}function yo(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=Oa(n)),r}function bo(e){let t=typeof e=="string"?Ca(e):Io(e);if(!(!t||!va(t)))return t}function nt(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 xo=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function No(e){if(!e)return;let t=e.match(xo);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function Fn(e,t){let n=No(e),r=Pt(t);if(!n?.traceId)return{traceId:Xe(),sampleRand:D()};let o=La(n,r);r&&(r.sample_rand=o.toString());let{traceId:s,parentSpanId:i,parentSampled:a}=n;return{traceId:s,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:o}}function La(e,t){let n=nt(t?.sample_rand);if(n!==void 0)return n;let r=nt(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?D()*r:r+D()*(1-r):D()}var Bn=1,Ro=!1;function wt(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:Ue(e).parent_span_id,s=Me(e).scope,i=r?s?.getPropagationContext().propagationSpanId||Ke():t;return{parent_span_id:o,span_id:i,trace_id:n}}function ka(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...o},attributes:s})=>({span_id:t,trace_id:n,sampled:r===Bn,attributes:s,...o}))}function Pa(e){if(e?.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:r},attributes:o})=>({span_id:t,trace_id:n,sampled:r===Bn,attributes:o}))}function Dt(e){return typeof e=="number"?Ao(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Ao(e.getTime()):Lt()}function Ao(e){return e>9999999999?e/1e3:e}function Ue(e){if(Oo(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(vo(e)){let{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:Co(e),start_timestamp:Dt(o),timestamp:Dt(i)||void 0,status:Da(a),op:r[G],origin:r[Pn],links:ka(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Gn(e){if(Oo(e))return e.getStreamedSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(vo(e)){let{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{name:s,span_id:t,trace_id:n,parent_span_id:Co(e),start_timestamp:Dt(o),end_timestamp:Dt(i),is_segment:e===rt(e),status:wa(a),attributes:r,links:Pa(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===rt(e)}}function Co(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function Ft(e){return{...e,attributes:Mn(e.attributes),links:e.links?.map(t=>({...t,attributes:Mn(t.attributes)}))}}function vo(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function Oo(e){return typeof e.getSpanJSON=="function"}function Bt(e){let{traceFlags:t}=e.spanContext();return t===Bn}function Da(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}function wa(e){return!e||e.code===1||e.code===0||e.message==="cancelled"?"ok":"error"}var Fa="_sentryRootSpan";var he=rt;function rt(e){return e[Fa]||e}function ot(){let e=P(),t=ie(e);return t.getActiveSpan?t.getActiveSpan():Oe(v())}function st(){Ro||(x(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Ro=!0)}var Lo=!1;function Mo(){if(Lo)return;function e(){let t=ot(),n=t&&he(t);if(n){let r="internal_error";g&&d.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:2,message:r})}}e.tag="sentry_tracingErrorCallback",Lo=!0,Br(e),Gr(e)}function Uo(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||T()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function ko(e){d.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Hn(e,t){if(!t?.length)return!1;for(let n of t){if(Ga(n)){if(e.description&&$(e.description,n))return g&&ko(e),!0;continue}let r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;let o=n.name?e.description&&$(e.description,n.name):!0,s=n.op?e.op&&$(e.op,n.op):!0,i=n.attributes?Object.entries(n.attributes).every(([a,c])=>Ba(e.attributes?.[a],c)):!0;if(o&&s&&i)return g&&ko(e),!0}return!1}function Ba(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?$(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}function Po(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let o of e)o.parent_span_id===r&&(o.parent_span_id=n)}function Ga(e){return typeof e=="string"||e instanceof RegExp}var ke="production";var Ha="_frozenDsc";function Do(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||ke,release:n.release,public_key:r,trace_id:e,org_id:yo(t)};return t.emit("createDsc",o),o}function Gt(e,t){let n=t.getPropagationContext();return n.dsc||Do(n.traceId,e)}function Pe(e){let t=T();if(!t)return{};let n=he(e),r=Ue(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[kn]??o[ao];function a(_){return(typeof i=="number"||typeof i=="string")&&(_.sample_rate=`${i}`),_}let c=n[Ha];if(c)return a(c);let u=s?.get("sentry.dsc"),p=u&&Pt(u);if(p)return a(p);let f=Do(e.spanContext().traceId,t),l=o[B]??o["sentry.span.source"],m=r.description;return l!=="url"&&m&&(f.transaction=m),Uo()&&(f.sampled=String(Bt(n)),f.sample_rand=s?.get("sentry.sample_rand")??Me(n).scope?.getPropagationContext().sampleRand.toString()),a(f),t.emit("createDsc",f,n),f}function De(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}var Ya=Symbol.for("sentry.skipNormalization"),Wa=Symbol.for("sentry.overrideNormalizationDepth");function wo(e){return!!e[Ya]}function Fo(e){let t=e[Wa];return typeof t=="number"?t:void 0}function H(e,t=100,n=1/0){try{return Yn("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Wn(e,t=3,n=100*1024){let r=H(e,t);return za(r)>n?Wn(e,t-1,n):r}function Yn(e,t,n=1/0,r=1/0,o=Za()){let[s,i]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let a=$a(e,t);if(!a.startsWith("[object "))return a;if(wo(t))return t;let c=Fo(t),u=c!==void 0?c:n;if(u===0)return a.replace("object ","");if(s(t))return"[Circular ~]";let p=t;if(p&&typeof p.toJSON=="function")try{let _=p.toJSON();return Yn("",_,u-1,r,o)}catch{}let f=Array.isArray(t)?[]:{},l=0,m=vt(t);for(let _ in m){if(!Object.prototype.hasOwnProperty.call(m,_))continue;if(l>=r){f[_]="[MaxProperties ~]";break}let S=m[_];f[_]=Yn(_,S,u-1,r,o),l++}return i(t),f}function $a(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(At(t))return Nt(t);if(jr(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${$e(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=Va(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Va(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function ja(e){return~-encodeURI(e).split(/%..|./).length}function za(e){return ja(JSON.stringify(e))}function Za(){let e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function R(e,t=[]){return[e,t]}function Ht(e,t){let[n,r]=e;return[n,[...r,t]]}function it(e,t){let n=e[1];for(let r of n){let o=r[0].type;if(t(r,o))return!0}return!1}function Vn(e,t){return it(e,(n,r)=>t.includes(r))}function $n(e){let t=te(h);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function at(e){let[t,n]=e,r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[$n(r),s]:r.push(typeof s=="string"?$n(s):s)}for(let s of n){let[i,a]=s;if(o(`
6
6
  ${JSON.stringify(i)}
7
- `),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(H(a))}o(c)}}return typeof r=="string"?r:Ja(r)}function Ja(e){let t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t),r=0;for(let o of e)n.set(o,r),r+=o.length;return n}function jn(e){let t=typeof e.data=="string"?$n(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Bo={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 Xa(e){return e in Bo}function Yt(e){return Xa(e)?Bo[e]:e}function we(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function zn(e,t,n,r){let o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:M(r)},...o&&{trace:o}}}function qa(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 Go(e,t,n,r){let o=we(n),s={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:M(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return R(s,[i])}function Ho(e,t,n,r){let o=we(n),s=e.type&&e.type!=="replay_event"?e.type:"event";qa(e,n?.sdk);let i=zn(e,o,r,t);return delete e.sdkProcessingMetadata,R(i,[[{type:s},e]])}function Wt(e){return e.getOptions().traceLifecycle==="stream"}var ct="__SENTRY_SUPPRESS_TRACING__";function $t(e,t){let n=Yo();return n.withActiveSpan?n.withActiveSpan(e,t):_e(r=>(qe(r,e||void 0),t(r)))}function Fe(e){let t=Yo();return t.suppressTracing?t.suppressTracing(e):_e(n=>{n.setSDKProcessingMetadata({[ct]:!0});let r=e();return n.setSDKProcessingMetadata({[ct]:void 0}),r})}function Yo(){let e=P();return ie(e)}function $o(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;Qa(e,t),r&&nc(e,r),rc(e,n),ec(e,o),tc(e,s)}function Wo(e,t){let{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:p,eventProcessors:f,attachments:l,propagationContext:m,transactionName:_,span:S}=t;ut(e,"extra",n),ut(e,"tags",r),ut(e,"attributes",o),ut(e,"user",s),ut(e,"contexts",i),e.sdkProcessingMetadata=se(e.sdkProcessingMetadata,c,2),a&&(e.level=a),_&&(e.transactionName=_),S&&(e.span=S),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),p.length&&(e.fingerprint=[...e.fingerprint,...p]),f.length&&(e.eventProcessors=[...e.eventProcessors,...f]),l.length&&(e.attachments=[...e.attachments,...l]),e.propagationContext={...e.propagationContext,...m}}function ut(e,t,n){e[t]=se(e[t],n,1)}function Vt(e,t){let n=Mt().getScopeData();return e&&Wo(n,e.getScopeData()),t&&Wo(n,t.getScopeData()),n}function Qa(e,t){let{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(s).length&&(e.contexts={...s,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function ec(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function tc(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function nc(e,t){e.contexts={trace:wt(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Pe(t),...e.sdkProcessingMetadata};let n=he(t),r=Ue(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function rc(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function Vo(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 Zn(e){return e.split(/[?#]/,1)[0]}function jo(e){let{protocol:t,host:n,path:r}=e,o=n?.replace(/^.*@/,"[filtered]:[filtered]@").replace(/(:80)$/,"").replace(/(:443)$/,"")||"";return`${t?`${t}://`:""}${o}${r}`}function Xn(e,t){let n=Gn(e),r=rt(e),o=Gn(r),{isolationScope:s,scope:i}=Me(e),a=Vt(s,i);oc(n,o,t,a);let c=e.kind;ic(n,c),n.is_segment&&t.emit("processSegmentSpan",n),t.emit("processSpan",n);let{beforeSendSpan:u}=t.getOptions(),p=u&&De(u)?sc(n,u):n,f=p.attributes?.[B];return f&&I(p,{"sentry.span.source":f}),{...Ft(p),_segmentSpan:r}}function I(e,t){let n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,o])=>{o!=null&&!(r in n)&&(n[r]=o)})}function oc(e,t,n,r){let o=n.getSdkMetadata(),{release:s,environment:i,sendDefaultPii:a}=n.getOptions();I(e,{[co]:s,[uo]:i,[po]:t.name,[fo]:t.span_id,[lo]:o?.sdk?.name,[mo]:o?.sdk?.version,...a?{[go]:r.user?.id,[_o]:r.user?.email,[Ut]:r.user?.ip_address,[ho]:r.user?.username}:{},...r.attributes})}function sc(e,t){let n=t(e);return n||(st(),e)}var Jn=1,zo=2;function ic(e,t){let n=e.attributes;if(!n)return;let r=n["http.request.method"]||n["http.method"];if(r){ac(e,n,t,r);return}let o=n["db.system.name"]||n["db.system"],s=typeof n[G]=="string"&&`${n[G]}`.startsWith("cache.");if(o&&!s){uc(e,n);return}if(n["rpc.service"]){I(e,{[G]:"rpc"});return}if(n["messaging.system"]){I(e,{[G]:"message"});return}let i=n["faas.trigger"];i&&I(e,{[G]:`${i}`})}function ac(e,t,n,r){let o=["http"];n===zo?o.push("client"):n===Jn&&o.push("server"),t["sentry.http.prefetch"]&&o.push("prefetch"),I(e,{[G]:o.join(".")});let s=t[kt];if(typeof s=="string"){e.name=s;return}if(t[B]==="custom")return;let i=t["http.route"];if(typeof i=="string")e.name=`${r} ${i}`,I(e,{[B]:"route"});else{if(n===zo||n===Jn){let a=cc(t,n);a&&(e.name=`${r} ${a}`)}I(e,{[B]:"url"})}}function cc(e,t){let n=e["http.url"]||e["url.full"],r=e["http.target"],o=typeof n=="string"?Vo(n):void 0,s=o?jo(o):void 0;if(t===Jn&&typeof r=="string")return Zn(r);if(s)return s;if(typeof r=="string")return Zn(r)}function uc(e,t){I(e,{[G]:"db"});let n=t[kt];if(typeof n=="string"){e.name=n;return}if(t[B]==="custom")return;let r=t["db.statement"];r&&(e.name=`${r}`,I(e,{[B]:"task"}))}var Kn=0,Zo=1,Jo=2;function Q(e){return new jt(t=>{t(e)})}function Be(e){return new jt((t,n)=>{n(e)})}var jt=class e{constructor(t){this._state=Kn,this._handlers=[],this._runExecutor(t)}then(t,n){return new e((r,o)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(i){o(i)}},s=>{if(!n)o(s);else try{r(n(s))}catch(i){o(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let o,s;return this.then(i=>{s=!1,o=i,t&&t()},i=>{s=!0,o=i,t&&t()}).then(()=>{if(s){r(o);return}n(o)})})}_executeHandlers(){if(this._state===Kn)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Zo&&n[1](this._value),this._state===Jo&&n[2](this._value),n[0]=!0)})}_runExecutor(t){let n=(s,i)=>{if(this._state===Kn){if(X(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(Zo,s)},o=s=>{n(Jo,s)};try{t(r,o)}catch(s){o(s)}}};function Xo(e,t,n,r=0){try{let o=qn(t,n,e,r);return X(o)?o:Q(o)}catch(o){return Be(o)}}function qn(e,t,n,r){let o=n[r];if(!e||!o)return e;let s=o({...e},t);return g&&s===null&&d.log(`Event processor "${o.id||"?"}" dropped event`),X(s)?s.then(i=>qn(i,t,n,r+1)):qn(s,t,n,r+1)}var Se,Ko,qo,ae;function Qo(e){let t=h._sentryDebugIds,n=h._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(ae&&r.length===Ko&&o.length===qo)return ae;Ko=r.length,qo=o.length,ae={},Se||(Se={});let s=(i,a)=>{for(let c of i){let u=a[c],p=Se?.[c];if(p&&ae&&u)ae[p[0]]=u,Se&&(Se[c]=[p[0],u]);else if(u){let f=e(c);for(let l=f.length-1;l>=0;l--){let _=f[l]?.filename;if(_&&ae&&Se){ae[_]=u,Se[c]=[_,u];break}}}}};return t&&s(r,t),n&&s(o,n),ae}function es(e,t,n,r,o,s){let{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||b(),timestamp:t.timestamp||q()},u=n.integrations||e.integrations.map(N=>N.name);pc(c,e),lc(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&fc(c,e.stackParser);let p=gc(r,n.captureContext);n.mechanism&&ve(c,n.mechanism);let f=o?o.getEventProcessors():[],l=Vt(s,p),m=[...n.attachments||[],...l.attachments];m.length&&(n.attachments=m),$o(c,l);let _=[...f,...l.eventProcessors];return(n.data&&n.data.__sentry__===!0?Q(c):Xo(_,c,n)).then(N=>(N&&dc(N),typeof i=="number"&&i>0?mc(N,i,a):N))}function pc(e,t){let{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||ke,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);let i=e.request;i?.url&&s&&(i.url=Ce(i.url,s)),s&&e.exception?.values?.forEach(a=>{a.value&&(a.value=Ce(a.value,s))})}function fc(e,t){let n=Qo(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function dc(e){let t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.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(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function lc(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function mc(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:H(o.data,t,n)}}))},...e.user&&{user:H(e.user,t,n)},...e.contexts&&{contexts:H(e.contexts,t,n)},...e.extra&&{extra:H(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=H(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:H(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=H(e.contexts.flags,3,n)),r}function gc(e,t){if(!t)return e;let n=e?e.clone():new O;return n.update(t),n}function ts(e){if(e)return _c(e)?{captureContext:e}:Sc(e)?{captureContext:e}:e}function _c(e){return e instanceof O||typeof e=="function"}var hc=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Sc(e){return Object.keys(e).some(t=>hc.includes(t))}function ce(e,t){return v().captureException(e,ts(t))}function zt(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return v().captureMessage(e,n,r)}function Zt(e){L().setTags(e)}function Jt(e){L().setUser(e)}var Ec="7";function Tc(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Ic(e){return`${Tc(e)}${e.projectId}/envelope/`}function yc(e,t){let n={sentry_version:Ec};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function rs(e,t,n){return t||`${Ic(e)}?${yc(e,n)}`}var Qn=[];function bc(e){let t={};return e.forEach(n=>{let{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function er(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){let o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return bc(r)}function os(e,t){let n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&nr(e,r,n)}),n}function tr(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function nr(e,t,n){if(n[t.name]){g&&d.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Qn.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),Qn.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,s)=>r(o,s,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),o=Object.assign((s,i)=>r(s,i,e),{id:t.name});e.addEventProcessor(o)}["processSpan","processSegmentSpan"].forEach(r=>{let o=t[r];typeof o=="function"&&e.on(r,s=>o.call(t,s,e))}),g&&d.log(`Integration installed: ${t.name}`)}function ss(e,t){return t?_e(t,()=>{let n=ot(),r=n?wt(n):tt(t);return[n?Pe(n):Gt(e,t),r]}):[void 0,void 0]}function is(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function as(){return!is()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ue(){return typeof window<"u"&&(!as()||xc())}function xc(){return h.process?.type==="renderer"}function Nc(e,t){let n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...ue()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function cs(e,t,n,r,o){let s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=M(r)),R(s,[Nc(e,o)])}function Ge(e,t){let n=t??Rc(e)??[];if(n.length===0)return;let r=e.getOptions(),o=cs(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);us().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function Rc(e){return us().get(e)}function us(){return w("clientToLogBufferMap",()=>new WeakMap)}function Ac(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,...ue()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function ps(e,t,n,r,o){let s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=M(r)),R(s,[Ac(e,o)])}function fs(e,t){let n=t??Cc(e)??[];if(n.length===0)return;let r=e.getOptions(),o=ps(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);ds().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function Cc(e){return ds().get(e)}function ds(){return w("clientToMetricBufferMap",()=>new WeakMap)}function ls(e){let t={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};return Ft(t)}function ms(e,t){if(e.type!=="transaction"||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!t.getOptions().streamGenAiSpans||Wt(t))return;let n=[],r=[];for(let s of e.spans)s.op?.startsWith("gen_ai.")?n.push(ls(s)):r.push(s);if(n.length===0)return;e.spans=r;let o=t.getOptions().sendDefaultPii?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...ue()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:n}]}function He(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var pt=Symbol.for("SentryBufferFullError");function Ye(e=100){let t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return Be(pt);let a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return Q(!0);let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;let c=[a,new Promise(u=>He(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}var vc=60*1e3;function Oc(e,t=Ae()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?vc:r-t}function Lc(e,t){return e[t]||e.all||0}function gs(e,t,n=Ae()){return Lc(e,t)>n}function _s(e,{statusCode:t,headers:n},r=Ae()){let o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(let a of s.trim().split(",")){let[c,u,,,p]=a.split(":",5),f=parseInt(c,10),l=(isNaN(f)?60:f)*1e3;if(!u)o.all=r+l;else for(let m of u.split(";"))m==="metric_bucket"?(!p||p.split(";").includes("custom"))&&(o[m]=r+l):o[m]=r+l}else i?o.all=r+Oc(i,r):t===429&&(o.all=r+60*1e3);return o}var ft=64;function dt(e,t,n=Ye(e.bufferSize||ft)){let r={},o=i=>n.drain(i);function s(i){let a=[];if(it(i,(f,l)=>{let m=Yt(l);gs(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):a.push(f)}),a.length===0)return Promise.resolve({});let c=R(i[0],a),u=f=>{if(Vn(c,["client_report"])){g&&d.warn(`Dropping client report. Will not send outcomes (reason: ${f}).`);return}it(c,(l,m)=>{e.recordDroppedEvent(f,Yt(m))})},p=()=>t({body:at(c)}).then(f=>f.statusCode===413?(g&&d.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),f):(g&&f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&d.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),r=_s(r,f),f),f=>{throw u("network_error"),g&&d.error("Encountered error running transport request:",f),f});return n.add(p).then(f=>f,f=>{if(f===pt)return g&&d.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw f})}return{send:s,flush:o}}function hs(e,t,n){let r=[{type:"client_report"},{timestamp:n||q(),discarded_events:e}];return R(t?{dsn:t}:{},[r])}function Xt(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 Ss(e){let{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.[Dn],exclusive_time:i?.[wn],measurements:e.measurements,is_segment:!0}}function Es(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&&{[Dn]:e.profile_id},...e.exclusive_time&&{[wn]:e.exclusive_time}}}},measurements:e.measurements}}var Ts="Not capturing exception because it's already been captured.",Is="Discarded session because of missing or non-string release",As=Symbol.for("SentryInternalError"),Cs=Symbol.for("SentryDoNotSendEventError"),Mc=5e3;function Kt(e){return{message:e,[As]:!0}}function rr(e){return{message:e,[Cs]:!0}}function ys(e){return!!e&&typeof e=="object"&&As in e}function bs(e){return!!e&&typeof e=="object"&&Cs in e}function xs(e,t,n,r,o){let s=0,i,a=!1;e.on(n,()=>{s=0,clearTimeout(i),a=!1}),e.on(t,c=>{s+=r(c),s>=8e5?o(e):a||(a=!0,i=He(setTimeout(()=>{o(e)},Mc)))}),e.on("flush",()=>{o(e)})}var qt=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Ye(t.transportOptions?.bufferSize??ft),t.dsn?this._dsn=bo(t.dsn):g&&d.warn("No DSN provided, client will not send events."),this._dsn){let r=rs(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&xs(this,"afterCaptureLog","flushLogs",Dc,Ge),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&xs(this,"afterCaptureMetric","flushMetrics",Pc,fs)}captureException(t,n,r){let o=b();if(Ot(t))return g&&d.log(Ts),o;let s={event_id:o,...n};return this._process(()=>this.eventFromException(t,s).then(i=>this._captureEvent(i,s,r)).then(i=>i),"error"),s.event_id}captureMessage(t,n,r,o){let s={event_id:b(),...r},i=ze(t)?t:String(t),a=be(t),c=a?this.eventFromMessage(i,n,s):this.eventFromException(t,s);return this._process(()=>c.then(u=>this._captureEvent(u,s,o)),a?"unknown":"error"),s.event_id}captureEvent(t,n,r){let o=b();if(n?.originalException&&Ot(n.originalException))return g&&d.log(Ts),o;let s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=Ns(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),Je(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){let n=this._transport;if(this.emit("flush"),!n)return!0;let r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){Ge(this);let n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){let n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),nr(this,t,this._integrations),n||tr(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=ms(t,this),o=Ho(t,this._dsn,this._options._metadata,this._options.tunnel);for(let s of n.attachments||[])o=Ht(o,jn(s));r&&(o=Ht(o,r)),this.sendEnvelope(o).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){let{release:n,environment:r=ke}=this._options;if("aggregates"in t){let s=t.attrs||{};if(!s.release&&!n){g&&d.warn(Is);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){g&&d.warn(Is);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);let o=Go(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){let o=`${t}:${n}`;g&&d.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){let r=this._hooks[t]=this._hooks[t]||new Set,o=(...s)=>n(...s);return r.add(o),()=>{r.delete(o)}}emit(t,...n){let r=this._hooks[t];r&&r.forEach(o=>o(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return g&&d.error("Error while sending envelope:",n),{}}return g&&d.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=os(this,t),tr(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1,s=n.exception?.values;if(s){o=!0,r=!1;for(let c of s)if(c.mechanism?.handled===!1){r=!0;break}}let i=t.status==="ok";(i&&t.errors===0||i&&r)&&(Je(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){let s=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i?.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),es(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...a.contexts?.trace,...tt(r)},...a.contexts};let c=Gt(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=v(),o=L()){return g&&or(t)&&d.log(`Captured error event \`${Xt(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{g&&(bs(s)?d.log(s.message):ys(s)?d.warn(s.message):d.warn(s))})}_processEvent(t,n,r,o){let s=this.getOptions(),{sampleRate:i}=s,a=vs(t),c=or(t),p=`before send for type \`${t.type||"error"}\``,f=typeof i>"u"?void 0:nt(i);if(c&&typeof f=="number"&&D()>f)return this.recordDroppedEvent("sample_rate","error"),Be(rr(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));let l=Ns(t.type);return this._prepareEvent(t,n,r,o).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",l),rr("An event processor returned `null`, will not send event.");if(n.data?.__sentry__===!0)return m;let S=kc(this,s,m,n);return Uc(S,p)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",l),a){let N=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",N)}throw rr(`${p} returned \`null\`, will not send event.`)}let _=r.getSession()||o.getSession();if(c&&_&&this._updateSessionFromEvent(_,m),a){let E=m.sdkProcessingMetadata?.spanCountBeforeProcessing||0,N=m.spans?m.spans.length:0,C=E-N;C>0&&this.recordDroppedEvent("before_send","span",C)}let S=m.transaction_info;if(a&&S&&m.transaction!==t.transaction){let E="custom";m.transaction_info={...S,source:E}}return this.sendEvent(m,n),m}).then(null,m=>{throw bs(m)||ys(m)?m:(this.captureException(m,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:m}),Kt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
7
+ `),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(H(a))}o(c)}}return typeof r=="string"?r:Ja(r)}function Ja(e){let t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t),r=0;for(let o of e)n.set(o,r),r+=o.length;return n}function jn(e){let t=typeof e.data=="string"?$n(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Bo={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 Xa(e){return e in Bo}function Yt(e){return Xa(e)?Bo[e]:e}function we(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function zn(e,t,n,r){let o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:M(r)},...o&&{trace:o}}}function qa(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 Go(e,t,n,r){let o=we(n),s={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:M(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return R(s,[i])}function Ho(e,t,n,r){let o=we(n),s=e.type&&e.type!=="replay_event"?e.type:"event";qa(e,n?.sdk);let i=zn(e,o,r,t);return delete e.sdkProcessingMetadata,R(i,[[{type:s},e]])}function Wt(e){return e.getOptions().traceLifecycle==="stream"}var ct="__SENTRY_SUPPRESS_TRACING__";function $t(e,t){let n=Yo();return n.withActiveSpan?n.withActiveSpan(e,t):_e(r=>(qe(r,e||void 0),t(r)))}function Fe(e){let t=Yo();return t.suppressTracing?t.suppressTracing(e):_e(n=>{n.setSDKProcessingMetadata({[ct]:!0});let r=e();return n.setSDKProcessingMetadata({[ct]:void 0}),r})}function Yo(){let e=P();return ie(e)}function $o(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;Qa(e,t),r&&nc(e,r),rc(e,n),ec(e,o),tc(e,s)}function Wo(e,t){let{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:p,eventProcessors:f,attachments:l,propagationContext:m,transactionName:_,span:S}=t;ut(e,"extra",n),ut(e,"tags",r),ut(e,"attributes",o),ut(e,"user",s),ut(e,"contexts",i),e.sdkProcessingMetadata=se(e.sdkProcessingMetadata,c,2),a&&(e.level=a),_&&(e.transactionName=_),S&&(e.span=S),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),p.length&&(e.fingerprint=[...e.fingerprint,...p]),f.length&&(e.eventProcessors=[...e.eventProcessors,...f]),l.length&&(e.attachments=[...e.attachments,...l]),e.propagationContext={...e.propagationContext,...m}}function ut(e,t,n){e[t]=se(e[t],n,1)}function Vt(e,t){let n=Mt().getScopeData();return e&&Wo(n,e.getScopeData()),t&&Wo(n,t.getScopeData()),n}function Qa(e,t){let{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(s).length&&(e.contexts={...s,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function ec(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function tc(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function nc(e,t){e.contexts={trace:wt(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:Pe(t),...e.sdkProcessingMetadata};let n=he(t),r=Ue(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function rc(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function Vo(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 Zn(e){return e.split(/[?#]/,1)[0]}function jo(e){let{protocol:t,host:n,path:r}=e,o=n?.replace(/^.*@/,"[filtered]:[filtered]@").replace(/(:80)$/,"").replace(/(:443)$/,"")||"";return`${t?`${t}://`:""}${o}${r}`}function Xn(e,t){let n=Gn(e),r=rt(e),o=Gn(r),{isolationScope:s,scope:i}=Me(e),a=Vt(s,i);oc(n,o,t,a);let c=e.kind;ic(n,c),n.is_segment&&t.emit("processSegmentSpan",n),t.emit("processSpan",n);let{beforeSendSpan:u}=t.getOptions(),p=u&&De(u)?sc(n,u):n,f=p.attributes?.[B];return f&&I(p,{"sentry.span.source":f}),{...Ft(p),_segmentSpan:r}}function I(e,t){let n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,o])=>{o!=null&&!(r in n)&&(n[r]=o)})}function oc(e,t,n,r){let o=n.getSdkMetadata(),{release:s,environment:i}=n.getOptions();I(e,{[co]:s,[uo]:i,[po]:t.name,[fo]:t.span_id,[lo]:o?.sdk?.name,[mo]:o?.sdk?.version,[go]:r.user?.id,[_o]:r.user?.email,[Ut]:r.user?.ip_address,[ho]:r.user?.username,...r.attributes})}function sc(e,t){let n=t(e);return n||(st(),e)}var Jn=1,zo=2;function ic(e,t){let n=e.attributes;if(!n)return;let r=n["http.request.method"]||n["http.method"];if(r){ac(e,n,t,r);return}let o=n["db.system.name"]||n["db.system"],s=typeof n[G]=="string"&&`${n[G]}`.startsWith("cache.");if(o&&!s){uc(e,n);return}if(n["rpc.service"]){I(e,{[G]:"rpc"});return}if(n["messaging.system"]){I(e,{[G]:"message"});return}let i=n["faas.trigger"];i&&I(e,{[G]:`${i}`})}function ac(e,t,n,r){let o=["http"];n===zo?o.push("client"):n===Jn&&o.push("server"),t["sentry.http.prefetch"]&&o.push("prefetch"),I(e,{[G]:o.join(".")});let s=t[kt];if(typeof s=="string"){e.name=s;return}if(t[B]==="custom")return;let i=t["http.route"];if(typeof i=="string")e.name=`${r} ${i}`,I(e,{[B]:"route"});else{if(n===zo||n===Jn){let a=cc(t,n);a&&(e.name=`${r} ${a}`)}I(e,{[B]:"url"})}}function cc(e,t){let n=e["http.url"]||e["url.full"],r=e["http.target"],o=typeof n=="string"?Vo(n):void 0,s=o?jo(o):void 0;if(t===Jn&&typeof r=="string")return Zn(r);if(s)return s;if(typeof r=="string")return Zn(r)}function uc(e,t){I(e,{[G]:"db"});let n=t[kt];if(typeof n=="string"){e.name=n;return}if(t[B]==="custom")return;let r=t["db.statement"];r&&(e.name=`${r}`,I(e,{[B]:"task"}))}var Kn=0,Zo=1,Jo=2;function Q(e){return new jt(t=>{t(e)})}function Be(e){return new jt((t,n)=>{n(e)})}var jt=class e{constructor(t){this._state=Kn,this._handlers=[],this._runExecutor(t)}then(t,n){return new e((r,o)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(i){o(i)}},s=>{if(!n)o(s);else try{r(n(s))}catch(i){o(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let o,s;return this.then(i=>{s=!1,o=i,t&&t()},i=>{s=!0,o=i,t&&t()}).then(()=>{if(s){r(o);return}n(o)})})}_executeHandlers(){if(this._state===Kn)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Zo&&n[1](this._value),this._state===Jo&&n[2](this._value),n[0]=!0)})}_runExecutor(t){let n=(s,i)=>{if(this._state===Kn){if(X(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(Zo,s)},o=s=>{n(Jo,s)};try{t(r,o)}catch(s){o(s)}}};function Xo(e,t,n,r=0){try{let o=qn(t,n,e,r);return X(o)?o:Q(o)}catch(o){return Be(o)}}function qn(e,t,n,r){let o=n[r];if(!e||!o)return e;let s=o({...e},t);return g&&s===null&&d.log(`Event processor "${o.id||"?"}" dropped event`),X(s)?s.then(i=>qn(i,t,n,r+1)):qn(s,t,n,r+1)}var Se,Ko,qo,ae;function Qo(e){let t=h._sentryDebugIds,n=h._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(ae&&r.length===Ko&&o.length===qo)return ae;Ko=r.length,qo=o.length,ae={},Se||(Se={});let s=(i,a)=>{for(let c of i){let u=a[c],p=Se?.[c];if(p&&ae&&u)ae[p[0]]=u,Se&&(Se[c]=[p[0],u]);else if(u){let f=e(c);for(let l=f.length-1;l>=0;l--){let _=f[l]?.filename;if(_&&ae&&Se){ae[_]=u,Se[c]=[_,u];break}}}}};return t&&s(r,t),n&&s(o,n),ae}function es(e,t,n,r,o,s){let{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||b(),timestamp:t.timestamp||q()},u=n.integrations||e.integrations.map(N=>N.name);pc(c,e),lc(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&fc(c,e.stackParser);let p=gc(r,n.captureContext);n.mechanism&&ve(c,n.mechanism);let f=o?o.getEventProcessors():[],l=Vt(s,p),m=[...n.attachments||[],...l.attachments];m.length&&(n.attachments=m),$o(c,l);let _=[...f,...l.eventProcessors];return(n.data&&n.data.__sentry__===!0?Q(c):Xo(_,c,n)).then(N=>(N&&dc(N),typeof i=="number"&&i>0?mc(N,i,a):N))}function pc(e,t){let{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||ke,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);let i=e.request;i?.url&&s&&(i.url=Ce(i.url,s)),s&&e.exception?.values?.forEach(a=>{a.value&&(a.value=Ce(a.value,s))})}function fc(e,t){let n=Qo(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function dc(e){let t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.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(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function lc(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function mc(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:H(o.data,t,n)}}))},...e.user&&{user:H(e.user,t,n)},...e.contexts&&{contexts:H(e.contexts,t,n)},...e.extra&&{extra:H(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=H(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:H(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=H(e.contexts.flags,3,n)),r}function gc(e,t){if(!t)return e;let n=e?e.clone():new O;return n.update(t),n}function ts(e){if(e)return _c(e)?{captureContext:e}:Sc(e)?{captureContext:e}:e}function _c(e){return e instanceof O||typeof e=="function"}var hc=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Sc(e){return Object.keys(e).some(t=>hc.includes(t))}function ce(e,t){return v().captureException(e,ts(t))}function zt(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return v().captureMessage(e,n,r)}function Zt(e){L().setTags(e)}function Jt(e){L().setUser(e)}var Ec="7";function Tc(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Ic(e){return`${Tc(e)}${e.projectId}/envelope/`}function yc(e,t){let n={sentry_version:Ec};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function rs(e,t,n){return t||`${Ic(e)}?${yc(e,n)}`}var Qn=[];function bc(e){let t={};return e.forEach(n=>{let{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function er(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){let o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return bc(r)}function os(e,t){let n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&nr(e,r,n)}),n}function tr(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function nr(e,t,n){if(n[t.name]){g&&d.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Qn.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),Qn.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,s)=>r(o,s,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),o=Object.assign((s,i)=>r(s,i,e),{id:t.name});e.addEventProcessor(o)}["processSpan","processSegmentSpan"].forEach(r=>{let o=t[r];typeof o=="function"&&e.on(r,s=>o.call(t,s,e))}),g&&d.log(`Integration installed: ${t.name}`)}function ss(e,t){return t?_e(t,()=>{let n=ot(),r=n?wt(n):tt(t);return[n?Pe(n):Gt(e,t),r]}):[void 0,void 0]}function is(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function as(){return!is()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ue(){return typeof window<"u"&&(!as()||xc())}function xc(){return h.process?.type==="renderer"}function Nc(e,t){let n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...ue()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function cs(e,t,n,r,o){let s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=M(r)),R(s,[Nc(e,o)])}function Ge(e,t){let n=t??Rc(e)??[];if(n.length===0)return;let r=e.getOptions(),o=cs(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);us().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function Rc(e){return us().get(e)}function us(){return w("clientToLogBufferMap",()=>new WeakMap)}function Ac(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,...ue()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function ps(e,t,n,r,o){let s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=M(r)),R(s,[Ac(e,o)])}function fs(e,t){let n=t??Cc(e)??[];if(n.length===0)return;let r=e.getOptions(),o=ps(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);ds().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function Cc(e){return ds().get(e)}function ds(){return w("clientToMetricBufferMap",()=>new WeakMap)}function ls(e){let t={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};return Ft(t)}function ms(e,t){if(e.type!=="transaction"||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!t.getOptions().streamGenAiSpans||Wt(t))return;let n=[],r=[];for(let s of e.spans)s.op?.startsWith("gen_ai.")?n.push(ls(s)):r.push(s);if(n.length===0)return;e.spans=r;let o=t.getOptions().sendDefaultPii?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...ue()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:n}]}function He(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var pt=Symbol.for("SentryBufferFullError");function Ye(e=100){let t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return Be(pt);let a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return Q(!0);let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;let c=[a,new Promise(u=>He(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}var vc=60*1e3;function Oc(e,t=Ae()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?vc:r-t}function Lc(e,t){return e[t]||e.all||0}function gs(e,t,n=Ae()){return Lc(e,t)>n}function _s(e,{statusCode:t,headers:n},r=Ae()){let o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(let a of s.trim().split(",")){let[c,u,,,p]=a.split(":",5),f=parseInt(c,10),l=(isNaN(f)?60:f)*1e3;if(!u)o.all=r+l;else for(let m of u.split(";"))m==="metric_bucket"?(!p||p.split(";").includes("custom"))&&(o[m]=r+l):o[m]=r+l}else i?o.all=r+Oc(i,r):t===429&&(o.all=r+60*1e3);return o}var ft=64;function dt(e,t,n=Ye(e.bufferSize||ft)){let r={},o=i=>n.drain(i);function s(i){let a=[];if(it(i,(f,l)=>{let m=Yt(l);gs(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):a.push(f)}),a.length===0)return Promise.resolve({});let c=R(i[0],a),u=f=>{if(Vn(c,["client_report"])){g&&d.warn(`Dropping client report. Will not send outcomes (reason: ${f}).`);return}it(c,(l,m)=>{e.recordDroppedEvent(f,Yt(m))})},p=()=>t({body:at(c)}).then(f=>f.statusCode===413?(g&&d.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),f):(g&&f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&d.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),r=_s(r,f),f),f=>{throw u("network_error"),g&&d.error("Encountered error running transport request:",f),f});return n.add(p).then(f=>f,f=>{if(f===pt)return g&&d.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw f})}return{send:s,flush:o}}function hs(e,t,n){let r=[{type:"client_report"},{timestamp:n||q(),discarded_events:e}];return R(t?{dsn:t}:{},[r])}function Xt(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 Ss(e){let{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.[Dn],exclusive_time:i?.[wn],measurements:e.measurements,is_segment:!0}}function Es(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&&{[Dn]:e.profile_id},...e.exclusive_time&&{[wn]:e.exclusive_time}}}},measurements:e.measurements}}var Ts="Not capturing exception because it's already been captured.",Is="Discarded session because of missing or non-string release",As=Symbol.for("SentryInternalError"),Cs=Symbol.for("SentryDoNotSendEventError"),Mc=5e3;function Kt(e){return{message:e,[As]:!0}}function rr(e){return{message:e,[Cs]:!0}}function ys(e){return!!e&&typeof e=="object"&&As in e}function bs(e){return!!e&&typeof e=="object"&&Cs in e}function xs(e,t,n,r,o){let s=0,i,a=!1;e.on(n,()=>{s=0,clearTimeout(i),a=!1}),e.on(t,c=>{s+=r(c),s>=8e5?o(e):a||(a=!0,i=He(setTimeout(()=>{o(e)},Mc)))}),e.on("flush",()=>{o(e)})}var qt=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Ye(t.transportOptions?.bufferSize??ft),t.dsn?this._dsn=bo(t.dsn):g&&d.warn("No DSN provided, client will not send events."),this._dsn){let r=rs(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&xs(this,"afterCaptureLog","flushLogs",Dc,Ge),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&xs(this,"afterCaptureMetric","flushMetrics",Pc,fs)}captureException(t,n,r){let o=b();if(Ot(t))return g&&d.log(Ts),o;let s={event_id:o,...n};return this._process(()=>this.eventFromException(t,s).then(i=>this._captureEvent(i,s,r)).then(i=>i),"error"),s.event_id}captureMessage(t,n,r,o){let s={event_id:b(),...r},i=ze(t)?t:String(t),a=be(t),c=a?this.eventFromMessage(i,n,s):this.eventFromException(t,s);return this._process(()=>c.then(u=>this._captureEvent(u,s,o)),a?"unknown":"error"),s.event_id}captureEvent(t,n,r){let o=b();if(n?.originalException&&Ot(n.originalException))return g&&d.log(Ts),o;let s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=Ns(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),Je(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){let n=this._transport;if(this.emit("flush"),!n)return!0;let r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){Ge(this);let n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){let n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),nr(this,t,this._integrations),n||tr(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=ms(t,this),o=Ho(t,this._dsn,this._options._metadata,this._options.tunnel);for(let s of n.attachments||[])o=Ht(o,jn(s));r&&(o=Ht(o,r)),this.sendEnvelope(o).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){let{release:n,environment:r=ke}=this._options;if("aggregates"in t){let s=t.attrs||{};if(!s.release&&!n){g&&d.warn(Is);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){g&&d.warn(Is);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);let o=Go(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){let o=`${t}:${n}`;g&&d.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){let r=this._hooks[t]=this._hooks[t]||new Set,o=(...s)=>n(...s);return r.add(o),()=>{r.delete(o)}}emit(t,...n){let r=this._hooks[t];r&&r.forEach(o=>o(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return g&&d.error("Error while sending envelope:",n),{}}return g&&d.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=os(this,t),tr(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1,s=n.exception?.values;if(s){o=!0,r=!1;for(let c of s)if(c.mechanism?.handled===!1){r=!0;break}}let i=t.status==="ok";(i&&t.errors===0||i&&r)&&(Je(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){let s=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i?.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),es(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...a.contexts?.trace,...tt(r)},...a.contexts};let c=Gt(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=v(),o=L()){return g&&or(t)&&d.log(`Captured error event \`${Xt(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{g&&(bs(s)?d.log(s.message):ys(s)?d.warn(s.message):d.warn(s))})}_processEvent(t,n,r,o){let s=this.getOptions(),{sampleRate:i}=s,a=vs(t),c=or(t),p=`before send for type \`${t.type||"error"}\``,f=typeof i>"u"?void 0:nt(i);if(c&&typeof f=="number"&&D()>f)return this.recordDroppedEvent("sample_rate","error"),Be(rr(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));let l=Ns(t.type);return this._prepareEvent(t,n,r,o).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",l),rr("An event processor returned `null`, will not send event.");if(n.data?.__sentry__===!0)return m;let S=kc(this,s,m,n);return Uc(S,p)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",l),a){let N=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",N)}throw rr(`${p} returned \`null\`, will not send event.`)}let _=r.getSession()||o.getSession();if(c&&_&&this._updateSessionFromEvent(_,m),a){let E=m.sdkProcessingMetadata?.spanCountBeforeProcessing||0,N=m.spans?m.spans.length:0,C=E-N;C>0&&this.recordDroppedEvent("before_send","span",C)}let S=m.transaction_info;if(a&&S&&m.transaction!==t.transaction){let E="custom";m.transaction_info={...S,source:E}}return this.sendEvent(m,n),m}).then(null,m=>{throw bs(m)||ys(m)?m:(this.captureException(m,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:m}),Kt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
8
  Reason: ${m}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===pt&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{let[o,s]=n.split(":");return{reason:o,category:s,quantity:r}})}_flushOutcomes(){g&&d.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){g&&d.log("No outcomes to send");return}if(!this._dsn){g&&d.log("No dsn provided, will not send outcomes");return}g&&d.log("Sending outcomes:",t);let n=hs(t,this._options.tunnel&&M(this._dsn));this.sendEnvelope(n)}};function Ns(e){return e==="replay_event"?"replay":e||"error"}function Uc(e,t){let n=`${t} must return \`null\` or a valid event.`;if(X(e))return e.then(r=>{if(!ne(r)&&r!==null)throw Kt(n);return r},r=>{throw Kt(`${t} rejected with ${r}`)});if(!ne(e)&&e!==null)throw Kt(n);return e}function kc(e,t,n,r){let{beforeSend:o,beforeSendTransaction:s,ignoreSpans:i}=t,a=!De(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(or(c)&&o)return o(c,r);if(vs(c)){if(a||i){let u=Ss(c);if(i?.length&&Hn({description:u.description,op:u.op,attributes:u.data},i))return null;if(a){let p=a(u);p?c=se(n,Es(p)):st()}if(c.spans){let p=[],f=c.spans;for(let m of f){if(i?.length&&Hn({description:m.description,op:m.op,attributes:m.data},i)){Po(f,m);continue}if(a){let _=a(m);_?p.push(_):(st(),p.push(m))}else p.push(m)}let l=c.spans.length-p.length;l&&e.recordDroppedEvent("before_send","span",l),c.spans=p}}if(s){if(c.spans){let u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return s(c,r)}}return c}function or(e){return e.type===void 0}function vs(e){return e.type==="transaction"}function Pc(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Os(e.attributes)}function Dc(e){let t=0;return e.message&&(t+=e.message.length*2),t+Os(e.attributes)}function Os(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*Rs(n[0]):be(n)?t+=Rs(n):t+=100}),t}function Rs(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}var wc=new Set(["false","f","n","no","off","0"]),Fc=new Set(["true","t","y","yes","on","1"]);function Ee(e,t){let n=String(e).toLowerCase();return wc.has(n)?!1:Fc.has(n)?!0:t?.strict?null:!!e}function Ls(e,t,n,r,o){let s={sent_at:new Date().toISOString()};n?.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&o&&(s.dsn=M(o)),t&&(s.trace=t);let i=Bc(e);return R(s,[i])}function Bc(e){return[{type:"check_in"},e]}function lt(e,t,n=[t],r="npm"){let o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(s=>({name:`${r}:@sentry/${s}`,version:Y})),o.version=Y)}var S_=1024*1024;var Ms=["auth","token","secret","session","password","passwd","pwd","key","jwt","bearer","sso","saml","csrf","xsrf","credentials","set-cookie","cookie"],Gc=[".sid","sessid","remember","oidc","pkce","nonce","__secure-","__host-","awsalb","awselb","akamai","__stripe","cognito","firebase","supabase","sb-","mfa","2fa"],Hc=["x-forwarded-","-user"];function sr(e,t=!1,n="request"){let r={};try{Object.entries(e).forEach(([o,s])=>{if(s==null)return;let i=o.toLowerCase();if((i==="cookie"||i==="set-cookie")&&typeof s=="string"&&s!==""){let c=i==="set-cookie",u=s.indexOf(";"),p=c&&u!==-1?s.substring(0,u):s,f=c?[p]:p.split("; ");for(let l of f){let m=l.indexOf("="),_=m!==-1?l.substring(0,m):l,S=m!==-1?l.substring(m+1):"",E=_.toLowerCase();ks({spanAttributes:r,headerKey:i,cookieKey:E,value:S,sendDefaultPii:t,lifecycle:n})}}else ks({spanAttributes:r,headerKey:i,value:s,sendDefaultPii:t,lifecycle:n})})}catch{}return r}function Us(e){return e.replace(/-/g,"_")}function ks({spanAttributes:e,headerKey:t,cookieKey:n,value:r,sendDefaultPii:o,lifecycle:s}){let c=Yc(n||t,r,o,!!n);if(c==null)return;let u=`http.${s}.header.${Us(t)}${n?`.${Us(n)}`:""}`;e[u]=c}function Yc(e,t,n,r=!1){let o=r?[...Ms,...Gc]:Ms;if(n?o.some(i=>e.includes(i)):[...Hc,...o].some(i=>e.includes(i)))return"[Filtered]";if(Array.isArray(t))return t.map(i=>i!=null?String(i):i).join(";");if(typeof t=="string")return t}var Wc=100;function ir(e,t){let n=T(),r=L();if(!n)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:s=Wc}=n.getOptions();if(s<=0)return;let a={timestamp:q(),...e},c=o?x(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}var Ps,$c="FunctionToString",Ds=new WeakMap,Vc=(()=>({name:$c,setupOnce(){Ps=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=In(this),n=Ds.has(T())&&t!==void 0?t:this;return Ps.apply(n,e)}}catch{}},setup(e){Ds.set(e,!0)}})),mt=Vc;var jc=[/^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$/],zc="EventFilters",We=(e={})=>{let t;return{name:zc,setup(n){let r=n.getOptions();t=ws(e,r)},processEvent(n,r,o){if(!t){let s=o.getOptions();t=ws(e,s)}return Jc(n,t)?null:n}}},Zc=((e={})=>({...We(e),name:"InboundFilters"}));function ws(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:jc],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Jc(e,t){if(e.type){if(e.type==="transaction"&&Kc(e,t.ignoreTransactions))return g&&d.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
9
9
  Event: ${oe(e)}`),!0}else{if(Xc(e,t.ignoreErrors))return g&&d.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
10
10
  Event: ${oe(e)}`),!0;if(tu(e))return g&&d.warn(`Event dropped due to not having an error message, error type or stacktrace.
@@ -12,7 +12,7 @@ Event: ${oe(e)}`),!0;if(qc(e,t.denyUrls))return g&&d.warn(`Event dropped due to
12
12
  Event: ${oe(e)}.
13
13
  Url: ${Qt(e)}`),!0;if(!Qc(e,t.allowUrls))return g&&d.warn(`Event dropped due to not being matched by \`allowUrls\` option.
14
14
  Event: ${oe(e)}.
15
- Url: ${Qt(e)}`),!0}return!1}function Xc(e,t){return t?.length?Xt(e).some(n=>re(n,t)):!1}function Kc(e,t){if(!t?.length)return!1;let n=e.transaction;return n?re(n,t):!1}function qc(e,t){if(!t?.length)return!1;let n=Qt(e);return n?re(n,t):!1}function Qc(e,t){if(!t?.length)return!0;let n=Qt(e);return n?re(n,t):!0}function eu(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 Qt(e){try{let n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?eu(n):null}catch{return g&&d.error(`Cannot extract url for event ${oe(e)}`),null}}function tu(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Gs(e,t,n,r,o,s){if(!o.exception?.values||!s||!K(s.originalException,Error))return;let i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=ar(e,t,r,s.originalException,n,o.exception.values,i,0))}function ar(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(K(r[o],Error)){Fs(i,a,r);let u=e(t,r[o]),p=c.length;Bs(u,o,p,a),c=ar(e,t,n,r[o],o,[u,...c],u,p)}return Hs(r)&&r.errors.forEach((u,p)=>{if(K(u,Error)){Fs(i,a,r);let f=e(t,u),l=c.length;Bs(f,`errors[${p}]`,l,a),c=ar(e,t,n,u,o,[f,...c],f,l)}}),c}function Hs(e){return Array.isArray(e.errors)}function Fs(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Hs(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Bs(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Ys(e,t){return e(t.stack||"",1)}function nu(e){return je(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function ru(e){return nu(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function cr(e,t){let n={type:t.name||t.constructor.name,value:ru(t)},r=Ys(e,t);return r.length&&(n.stacktrace={frames:r}),n}function ou(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function su(e){if("name"in e&&typeof e.name=="string"){let r=`'${e.name}' captured as exception`;return"message"in e&&typeof e.message=="string"&&(r+=` with message '${e.message}'`),r}else if("message"in e&&typeof e.message=="string")return e.message;let t=yn(e);if(Yr(e))return`Event \`ErrorEvent\` captured as exception with message \`${e.message}\``;let n=iu(e);return`${n&&n!=="Object"?`'${n}'`:"Object"} captured as exception with keys: ${t}`}function iu(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function au(e,t,n,r){if(je(n))return[n,void 0];if(t.synthetic=!0,ne(n)){let s=e?.getOptions().normalizeDepth,i={__serialized__:Wn(n,s)},a=ou(n);if(a)return[a,i];let c=su(n),u=r?.syntheticException||new Error(c);return u.message=c,[u,i]}let o=r?.syntheticException||new Error(n);return o.message=`${n}`,[o,void 0]}function Ws(e,t,n,r){let s=r?.data&&r.data.mechanism||{handled:!0,type:"generic"},[i,a]=au(e,s,n,r),c={exception:{values:[cr(t,i)]}};return a&&(c.extra=a),An(c,void 0,void 0),ve(c,s),{...c,event_id:r?.event_id}}function $s(e,t,n="info",r,o){let s={event_id:r?.event_id,level:n};if(o&&r?.syntheticException){let i=Ys(e,r.syntheticException);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]},ve(s,{synthetic:!0}))}if(ze(t)){let{__sentry_template_string__:i,__sentry_template_values__:a}=t;return s.logentry={message:i,params:a},s}return s.message=t,s}var cu="cause",uu=5,pu="LinkedErrors",fu=((e={})=>{let t=e.limit||uu,n=e.key||cu;return{name:pu,preprocessEvent(r,o,s){let i=s.getOptions();Gs(cr,i.stackParser,n,t,r,o)}}}),gt=fu;function Vs(e){let t={},n=0;for(;n<e.length;){let r=e.indexOf("=",n);if(r===-1)break;let o=e.indexOf(";",n);if(o===-1)o=e.length;else if(o<r){n=e.lastIndexOf(";",r-1)+1;continue}let s=e.slice(n,r).trim();if(t[s]===void 0){let i=e.slice(r+1,o).trim();i.charCodeAt(0)===34&&(i=i.slice(1,-1));try{t[s]=i.indexOf("%")!==-1?decodeURIComponent(i):i}catch{t[s]=i}}n=o+1}return t}var ur=["X-Client-IP","X-Forwarded-For","Fly-Client-IP","CF-Connecting-IP","Fastly-Client-Ip","True-Client-Ip","X-Real-IP","X-Cluster-Client-IP","X-Forwarded","Forwarded-For","Forwarded","X-Vercel-Forwarded-For"];function pr(e){let t={};for(let s of Object.keys(e))t[s.toLowerCase()]=e[s];return ur.map(s=>{let i=t[s.toLowerCase()],a=Array.isArray(i)?i.join(";"):i;return s==="Forwarded"?du(a):a?.split(",").map(c=>c.trim())}).reduce((s,i)=>i?s.concat(i):s,[]).find(s=>s!==null&&lu(s))||null}function du(e){if(!e)return null;for(let t of e.split(";"))if(t.startsWith("for="))return t.slice(4);return null}function lu(e){return/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/.test(e)}var mu={cookies:!0,data:!0,headers:!0,query_string:!0,url:!0},gu="RequestData",_u=((e={})=>{let t={...mu,...e.include};return{name:gu,processEvent(n,r,o){let{sdkProcessingMetadata:s={}}=n,{normalizedRequest:i,ipAddress:a}=s,c={...t,ip:t.ip??o.getOptions().sendDefaultPii};return i&&hu(n,i,{ipAddress:a},c),n},processSegmentSpan(n,r){let{sdkProcessingMetadata:o={}}=L().getScopeData(),{normalizedRequest:s,ipAddress:i}=o;if(!s)return;let{sendDefaultPii:a}=r.getOptions(),c={...t,ip:t.ip??a};Su(n,s,i,c,a)}}}),_t=_u;function hu(e,t,n,r){if(e.request={...e.request,...js(t,r)},r.ip){let o=t.headers&&pr(t.headers)||n.ipAddress;o&&(e.user={...e.user,ip_address:o})}}function Su(e,t,n,r,o){let s=js(t,r),i={};if(s.url&&(i["url.full"]=s.url),s.method&&(i["http.request.method"]=s.method),s.query_string&&(i["url.query"]=Eu(s.query_string)),I(e,i),s.cookies&&Object.keys(s.cookies).length>0){let a=Object.entries(s.cookies).map(([u,p])=>`${u}=${p}`).join("; "),c=sr({cookie:a},o??!1,"request");I(e,c)}if(s.headers){let a=sr(s.headers,o??!1,"request");I(e,a)}if(s.data!=null){let a=typeof s.data=="string"?s.data:JSON.stringify(s.data);a&&I(e,{"http.request.body.data":a})}if(r.ip){let a=t.headers&&pr(t.headers)||n||void 0;a&&I(e,{[Ut]:a})}}function js(e,t){let n={},r={...e.headers};if(t.headers&&(n.headers=r,t.cookies||delete r.cookie,!t.ip)){let o=new Set(ur.map(s=>s.toLowerCase()));for(let s of Object.keys(r))o.has(s.toLowerCase())&&delete r[s]}if(n.method=e.method,t.url&&(n.url=e.url),t.cookies){let o=e.cookies||(r?.cookie?Vs(r.cookie):void 0);n.cookies=o||{}}return t.query_string&&(n.query_string=e.query_string),t.data&&(n.data=e.data),n}function Eu(e){return typeof e=="string"?e||void 0:(Array.isArray(e)?e:Object.entries(e)).map(([r,o])=>`${r}=${o}`).join("&")||void 0}var en=new Set([]);function zs(e){let t="console",n=me(t,e);return J(t,Tu),n}function Zs(e){for(let t of e)en.add(t);return()=>{for(let t of e)en.delete(t)}}function Tu(){"console"in h&&le.forEach(function(e){e in h.console&&Ze(h.console,e,function(t){return F[e]=t,function(...n){let r=n[0],o=F[e],s=en.size&&typeof r=="string"&&re(r,en);s||W("console",{args:n,level:e}),(!s||g&&d.isEnabled())&&o?.apply(h.console,n)}})})}function Js(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var Iu=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function yu(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Iu.exec(t);return n?n.slice(1):[]}function fr(e){let t=yu(e),n=t[0]||"",r=t[1];return!n&&!r?".":(r&&(r=r.slice(0,r.length-1)),n+r)}var bu="Console",dr=(e={})=>{let t=new Set(e.levels||le);return{name:bu,setup(n){let r=zs(({args:o,level:s})=>{T()!==n||!t.has(s)||xu(s,o)});if(n.registerCleanup(r),e.filter){let o=Zs(e.filter);n.registerCleanup(o)}}}};function xu(e,t){let n={category:"console",data:{arguments:t,logger:"console"},level:Js(e),message:Xs(t)};if(e==="assert")if(t[0]===!1){let r=t.slice(1);n.message=r.length>0?`Assertion failed: ${Xs(r)}`:"Assertion failed",n.data.arguments=r}else return;ir(n,{input:t,level:e})}function Xs(e){return"util"in h&&typeof h.util.format=="function"?h.util.format(...e):xn(e," ")}function Ks(e,t,n){let r=n.getOptions(),o=n.getDsn(),s=r.tunnel,i=we(r._metadata),a={sent_at:new Date().toISOString(),...Nu(t)&&{trace:t},...i&&{sdk:i},...!!s&&o&&{dsn:M(o)}},c=r.sendDefaultPii?"auto":"never",u=[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...ue()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}];return R(a,[u])}function Nu(e){return!!e.trace_id&&!!e.public_key}function qs(e){let t=156;if(t+=e.name.length*2,t+=Un(e.attributes),e.links&&e.links.length>0){let r=e.links[0]?.attributes,o=100+(r?Un(r):0);t+=o*e.links.length}return t}var Qs=1e3,Ru=5e6,tn=class{constructor(t,n){this._traceBuckets=new Map,this._client=t;let{maxSpanLimit:r,flushInterval:o,maxTraceWeightInBytes:s}=n??{};this._maxSpanLimit=r&&r>0&&r<=Qs?r:Qs,this._flushInterval=o&&o>0?o:5e3,this._maxTraceWeight=s&&s>0?s:Ru,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(i=>{clearTimeout(i.timeout)}),this._traceBuckets.clear()})}add(t){let n=t.trace_id,r=this._traceBuckets.get(n);r||(r={spans:new Set,size:0,timeout:He(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,r)),r.spans.add(t),r.size+=qs(t),(r.spans.size>=this._maxSpanLimit||r.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(g&&d.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){let n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}let r=Array.from(n.spans),o=r[0]?._segmentSpan;if(!o){g&&d.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}let s=Pe(o),i=r.map(c=>{let{_segmentSpan:u,...p}=c;return p}),a=Ks(i,s,this._client);g&&d.log(`Sending span envelope for trace ${t} with ${i.length} spans`),this._client.sendEnvelope(a).then(null,c=>{g&&d.error("Error while sending streamed span envelope:",c)}),this._removeTrace(t)}_removeTrace(t){let n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}};var nn=()=>({name:"SpanStreaming",setup(e){let t="SpanStreaming integration requires",n="Falling back to static trace lifecycle.",r=e.getOptions();if(!Wt(e)){r.traceLifecycle="static",g&&d.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}let o=r.beforeSendSpan;if(o&&!De(o)){r.traceLifecycle="static",g&&d.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}let s=new tn(e);e.on("afterSpanEnd",i=>{Bt(i)&&s.add(Xn(i,e))})}});var pe=class{constructor(t){this._maxSize=t,this._cache=new Map}get size(){return this._cache.size}get(t){let n=this._cache.get(t);if(n!==void 0)return this._cache.delete(t),this._cache.set(t,n),n}set(t,n){if(this._cache.size>=this._maxSize){let r=this._cache.keys().next().value;this._cache.delete(r)}this._cache.set(t,n)}remove(t){let n=this._cache.get(t);return n&&this._cache.delete(t),n}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){let t=[];return this._cache.forEach(n=>t.push(n)),t}};function ei(e){let t=e._metadata?.sdk,n=t?.name&&t?.version?`${t?.name}/${t?.version}`:void 0;e.transportOptions={...e.transportOptions,headers:{...n&&{"user-agent":n},...e.transportOptions?.headers}}}var ht=class e extends qt{__init(){this._disposeCallbacks=[]}constructor(t){Mo(),ei(t),super(t),e.prototype.__init.call(this),this._setUpMetricsProcessing()}eventFromException(t,n){let r=Ws(this,this._options.stackParser,t,n);return r.level="error",Q(r)}eventFromMessage(t,n="info",r){return Q($s(this._options.stackParser,t,n,r,this._options.attachStacktrace))}captureException(t,n,r){return ti(n),super.captureException(t,n,r)}captureEvent(t,n,r){return!t.type&&t.exception?.values&&t.exception.values.length>0&&ti(n),super.captureEvent(t,n,r)}captureCheckIn(t,n,r){let o="checkInId"in t&&t.checkInId?t.checkInId:b();if(!this._isEnabled())return g&&d.warn("SDK not enabled, will not capture check-in."),o;let s=this.getOptions(),{release:i,environment:a,tunnel:c}=s,u={check_in_id:o,monitor_slug:t.monitorSlug,status:t.status,release:i,environment:a};"duration"in t&&(u.duration=t.duration),n&&(u.monitor_config={schedule:n.schedule,checkin_margin:n.checkinMargin,max_runtime:n.maxRuntime,timezone:n.timezone,failure_issue_threshold:n.failureIssueThreshold,recovery_threshold:n.recoveryThreshold});let[p,f]=ss(this,r);f&&(u.contexts={trace:f});let l=Ls(u,p,this.getSdkMetadata(),c,this.getDsn());return g&&d.log("Sending checkin:",t.monitorSlug,t.status),this.sendEnvelope(l),o}registerCleanup(t){this._disposeCallbacks.push(t)}dispose(){g&&d.log("Disposing client...");for(let t of this._disposeCallbacks)try{t()}catch{}this._disposeCallbacks.length=0;for(let t of Object.keys(this._hooks))this._hooks[t]?.clear();this._hooks={},this._eventProcessors.length=0,this._integrations={},this._outcomes={},this._transport=void 0,this._promiseBuffer=Ye(ft)}_prepareEvent(t,n,r,o){return this._options.platform&&(t.platform=t.platform||this._options.platform),this._options.runtime&&(t.contexts={...t.contexts,runtime:t.contexts?.runtime||this._options.runtime}),this._options.serverName&&(t.server_name=t.server_name||this._options.serverName),super._prepareEvent(t,n,r,o)}_setUpMetricsProcessing(){this.on("processMetric",t=>{this._options.serverName&&(t.attributes={"server.address":this._options.serverName,...t.attributes})})}};function ti(e){let t=L().getScopeData().sdkProcessingMetadata.requestSession;if(t){let n=e?.mechanism?.handled??!0;n&&t.status!=="crashed"?t.status="errored":n||(t.status="crashed")}}function oi(e,t=!1){return!(t||e&&!e.startsWith("/")&&!e.match(/^[A-Z]:/)&&!e.startsWith(".")&&!e.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&e!==void 0&&!e.includes("node_modules/")}function si(e){let t=/^\s*[-]{4,}$/,n=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/,r=/at (?:async )?(.+?) \(data:(.*?),/;return o=>{let s=o.match(r);if(s)return{filename:`<data:${s[2]}>`,function:s[1]};let i=o.match(n);if(i){let a,c,u,p,f;if(i[1]){u=i[1];let S=u.lastIndexOf(".");if(u[S-1]==="."&&S--,S>0){a=u.slice(0,S),c=u.slice(S+1);let E=a.indexOf(".Module");E>0&&(u=u.slice(E+1),a=a.slice(0,E))}p=void 0}c&&(p=a,f=c),c==="<anonymous>"&&(f=void 0,u=void 0),u===void 0&&(f=f||"?",u=p?`${p}.${f}`:f);let l=wr(i[2]),m=i[5]==="native";!l&&i[5]&&!m&&(l=i[5]);let _=l?Au(l):void 0;return{filename:_??l,module:_&&e?.(_),function:u,lineno:ni(i[3]),colno:ni(i[4]),in_app:oi(l||"",m)}}if(o.match(t))return{filename:o}}}function lr(e){return[90,si(e)]}function ni(e){return parseInt(e||"",10)||void 0}function Au(e){try{return decodeURI(e)}catch{return}}var on=require("worker_threads");var A=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Xu=6e4,rn=class extends ht{constructor(t){let n=t.includeServerName===!1?void 0:t.serverName||global.process.env.SENTRY_NAME||ii.hostname(),r={...t,platform:"node",runtime:{name:"node",version:global.process.version},serverName:n};lt(r,"node-light",["node-core"]),d.log(`Initializing Sentry: process: ${process.pid}, thread: ${on.isMainThread?"main":`worker-${on.threadId}`}.`),super(r),this.getOptions().enableLogs&&(this._logOnExitFlushListener=()=>{Ge(this)},n&&this.on("beforeCaptureLog",o=>{o.attributes={...o.attributes,"server.address":n}}),process.on("beforeExit",this._logOnExitFlushListener))}async flush(t){return this.getOptions().sendClientReports&&this._flushOutcomes(),super.flush(t)}async close(t){return this._clientReportInterval&&clearInterval(this._clientReportInterval),this._clientReportOnExitFlushListener&&process.off("beforeExit",this._clientReportOnExitFlushListener),this._logOnExitFlushListener&&process.off("beforeExit",this._logOnExitFlushListener),super.close(t)}startClientReportTracking(){let t=this.getOptions();t.sendClientReports&&(this._clientReportOnExitFlushListener=()=>{this._flushOutcomes()},this._clientReportInterval=setInterval(()=>{A&&d.log("Flushing client reports based on interval."),this._flushOutcomes()},t.clientReportFlushInterval??Xu).unref(),process.on("beforeExit",this._clientReportOnExitFlushListener))}};var ui=require("node:child_process"),sn=require("node:fs"),y=U(require("node:os"),1),pi=require("node:path"),mr=require("node:util");var Ku=(0,mr.promisify)(sn.readFile),qu=(0,mr.promisify)(sn.readdir),Qu="Context",ep=((e={})=>{let t={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0,...e},n=t.app?sp():void 0,r=t.device?ip(t.device):void 0,o=t.culture?op():void 0,s=t.cloudResource?dp():void 0,i=t.os?rp():void 0,a={"process.runtime.engine.name":"v8","process.runtime.engine.version":process.versions.v8,...ai({app:n,device:r,culture:o,cloud_resource:s})};i&&i.then(p=>Object.assign(a,ai({os:p}))).catch(()=>{});let c=(async()=>{let p={};return i&&(p.os=await i),n&&(p.app=n),r&&(p.device=r),o&&(p.culture=o),s&&(p.cloud_resource=s),p})();async function u(p){let f=tp(await c);return p.contexts={...p.contexts,app:{...f.app,...p.contexts?.app},os:{...f.os,...p.contexts?.os},device:{...f.device,...p.contexts?.device},culture:{...f.culture,...p.contexts?.culture},cloud_resource:{...f.cloud_resource,...p.contexts?.cloud_resource}},p}return{name:Qu,processEvent(p){return u(p)},processSegmentSpan(p){I(p,a),I(p,np(n,r))}}}),gr=ep;function tp(e){if(e.app?.app_memory&&(e.app.app_memory=process.memoryUsage().rss),e.app?.free_memory&&typeof process.availableMemory=="function"){let t=process.availableMemory?.();t!=null&&(e.app.free_memory=t)}return e.device?.free_memory&&(e.device.free_memory=y.freemem()),e}function ai(e){let t={},{app:n,device:r,os:o,culture:s,cloud_resource:i}=e;if(n&&n.app_start_time&&(t["app.start_time"]=n.app_start_time),r&&(r.arch&&(t["device.archs"]=[r.arch]),r.boot_time&&(t["device.boot_time"]=r.boot_time),r.memory_size!=null&&(t["device.memory_size"]=r.memory_size),r.processor_count!=null&&(t["device.processor_count"]=r.processor_count),r.cpu_description&&(t["device.cpu_description"]=r.cpu_description),r.processor_frequency!=null&&(t["device.processor_frequency"]=r.processor_frequency)),o&&(o.name&&(t["os.name"]=o.name),o.version&&(t["os.version"]=o.version),o.kernel_version&&(t["os.kernel_version"]=o.kernel_version),o.build&&(t["os.build"]=o.build)),s&&(s.locale&&(t["culture.locale"]=s.locale),s.timezone&&(t["culture.timezone"]=s.timezone)),i)for(let[a,c]of Object.entries(i))c!=null&&(t[a]=c);return t}function np(e,t){let n={};if(e&&(n["app.memory"]=process.memoryUsage().rss,typeof process.availableMemory=="function")){let r=process.availableMemory?.();r!=null&&(n["app.free_memory"]=r)}return t?.free_memory!=null&&(n["device.free_memory"]=y.freemem()),n}async function rp(){let e=y.platform();switch(e){case"darwin":return pp();case"linux":return fp();default:return{name:ap[e]||e,version:y.release()}}}function op(){try{if(typeof process.versions.icu!="string")return;let e=new Date(9e8);if(new Intl.DateTimeFormat("es",{month:"long"}).format(e)==="enero"){let n=Intl.DateTimeFormat().resolvedOptions();return{locale:n.locale,timezone:n.timeZone}}}catch{}}function sp(){let e=process.memoryUsage().rss,n={app_start_time:new Date(Date.now()-process.uptime()*1e3).toISOString(),app_memory:e};if(typeof process.availableMemory=="function"){let r=process.availableMemory?.();r!=null&&(n.free_memory=r)}return n}function ip(e){let t={},n;try{n=y.uptime()}catch{}if(typeof n=="number"&&(t.boot_time=new Date(Date.now()-n*1e3).toISOString()),t.arch=y.arch(),(e===!0||e.memory)&&(t.memory_size=y.totalmem(),t.free_memory=y.freemem()),e===!0||e.cpu){let r=y.cpus(),o=r?.[0];o&&(t.processor_count=r.length,t.cpu_description=o.model,t.processor_frequency=o.speed)}return t}var ap={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows",ohos:"OpenHarmony",android:"Android"},cp=[{name:"fedora-release",distros:["Fedora"]},{name:"redhat-release",distros:["Red Hat Linux","Centos"]},{name:"redhat_version",distros:["Red Hat Linux"]},{name:"SuSE-release",distros:["SUSE Linux"]},{name:"lsb-release",distros:["Ubuntu Linux","Arch Linux"]},{name:"debian_version",distros:["Debian"]},{name:"debian_release",distros:["Debian"]},{name:"arch-release",distros:["Arch Linux"]},{name:"gentoo-release",distros:["Gentoo Linux"]},{name:"novell-release",distros:["SUSE Linux"]},{name:"alpine-release",distros:["Alpine Linux"]}],up={alpine:e=>e,arch:e=>V(/distrib_release=(.*)/,e),centos:e=>V(/release ([^ ]+)/,e),debian:e=>e,fedora:e=>V(/release (..)/,e),mint:e=>V(/distrib_release=(.*)/,e),red:e=>V(/release ([^ ]+)/,e),suse:e=>V(/VERSION = (.*)\n/,e),ubuntu:e=>V(/distrib_release=(.*)/,e)};function V(e,t){let n=e.exec(t);return n?n[1]:void 0}async function pp(){let e={kernel_version:y.release(),name:"Mac OS X",version:`10.${Number(y.release().split(".")[0])-4}`};try{let t=await new Promise((n,r)=>{(0,ui.execFile)("/usr/bin/sw_vers",(o,s)=>{if(o){r(o);return}n(s)})});e.name=V(/^ProductName:\s+(.*)$/m,t),e.version=V(/^ProductVersion:\s+(.*)$/m,t),e.build=V(/^BuildVersion:\s+(.*)$/m,t)}catch{}return e}function ci(e){return e.split(" ")[0].toLowerCase()}async function fp(){let e={kernel_version:y.release(),name:"Linux"};try{let t=await qu("/etc"),n=cp.find(a=>t.includes(a.name));if(!n)return e;let r=(0,pi.join)("/etc",n.name),o=(await Ku(r,{encoding:"utf-8"})).toLowerCase(),{distros:s}=n;e.name=s.find(a=>o.indexOf(ci(a))>=0)||s[0];let i=ci(e.name);e.version=up[i]?.(o)}catch{}return e}function dp(){return process.env.VERCEL?{"cloud.provider":"vercel","cloud.region":process.env.VERCEL_REGION}:process.env.AWS_REGION?{"cloud.provider":"aws","cloud.region":process.env.AWS_REGION,"cloud.platform":process.env.AWS_EXECUTION_ENV}:process.env.GCP_PROJECT?{"cloud.provider":"gcp"}:process.env.ALIYUN_REGION_ID?{"cloud.provider":"alibaba_cloud","cloud.region":process.env.ALIYUN_REGION_ID}:process.env.WEBSITE_SITE_NAME&&process.env.REGION_NAME?{"cloud.provider":"azure","cloud.region":process.env.REGION_NAME}:process.env.IBM_CLOUD_REGION?{"cloud.provider":"ibm_cloud","cloud.region":process.env.IBM_CLOUD_REGION}:process.env.TENCENTCLOUD_REGION?{"cloud.provider":"tencent_cloud","cloud.region":process.env.TENCENTCLOUD_REGION,"cloud.account.id":process.env.TENCENTCLOUD_APPID,"cloud.availability_zone":process.env.TENCENTCLOUD_ZONE}:process.env.NETLIFY?{"cloud.provider":"netlify"}:process.env.FLY_REGION?{"cloud.provider":"fly.io","cloud.region":process.env.FLY_REGION}:process.env.DYNO?{"cloud.provider":"heroku"}:void 0}var li=require("node:fs"),mi=require("node:readline");var _r=new pe(10),gi=new pe(20),lp=7,mp="ContextLines",gp=1e3,_p=1e4;function hp(e,t,n){let r=e.get(t);return r===void 0?(e.set(t,n),n):r}function Sp(e){return!!(e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:"))}function Ep(e){return e.lineno!==void 0&&e.lineno>_p||e.colno!==void 0&&e.colno>gp}function Tp(e,t){let n=_r.get(e);if(n===void 0)return!1;for(let r=t[0];r<=t[1];r++)if(n[r]===void 0)return!1;return!0}function Ip(e,t){if(!e.length)return[];let n=0,r=e[0];if(typeof r!="number")return[];let o=di(r,t),s=[];for(;;){if(n===e.length-1){s.push(o);break}let i=e[n+1];if(typeof i!="number")break;i<=o[1]?o[1]=i+t:(s.push(o),o=di(i,t)),n++}return s}function yp(e,t,n){return new Promise((r,o)=>{let s=(0,li.createReadStream)(e),i=(0,mi.createInterface)({input:s});function a(){s.destroy(),r()}let c=0,u=0,p=t[u];if(p===void 0){a();return}let f=p[0],l=p[1];function m(_){gi.set(e,1),A&&d.error(`Failed to read file: ${e}. Error: ${_}`),i.close(),i.removeAllListeners(),a()}s.on("error",m),i.on("error",m),i.on("close",a),i.on("line",_=>{if(c++,!(c<f)&&(n[c]=bn(_,0),c>=l)){if(u===t.length-1){i.close(),i.removeAllListeners();return}u++;let S=t[u];if(S===void 0){i.close(),i.removeAllListeners();return}f=S[0],l=S[1]}})})}async function bp(e,t){let n={};if(t>0&&e.exception?.values){for(let s of e.exception.values)if(s.stacktrace?.frames?.length)for(let i=s.stacktrace.frames.length-1;i>=0;i--){let a=s.stacktrace.frames[i],c=a?.filename;if(!a||typeof c!="string"||typeof a.lineno!="number"||Sp(c)||Ep(a))continue;n[c]||(n[c]=[]),n[c].push(a.lineno)}}let r=Object.keys(n);if(r.length==0)return e;let o=[];for(let s of r){if(gi.get(s))continue;let i=n[s];if(!i)continue;i.sort((u,p)=>u-p);let a=Ip(i,t);if(a.every(u=>Tp(s,u)))continue;let c=hp(_r,s,{});o.push(yp(s,a,c))}if(await Promise.all(o).catch(()=>{A&&d.log("Failed to read one or more source files and resolve context lines")}),t>0&&e.exception?.values)for(let s of e.exception.values)s.stacktrace?.frames&&s.stacktrace.frames.length>0&&xp(s.stacktrace.frames,t,_r);return e}function xp(e,t,n){for(let r of e)if(r.filename&&r.context_line===void 0&&typeof r.lineno=="number"){let o=n.get(r.filename);if(o===void 0)continue;Np(r.lineno,r,t,o)}}function fi(e){delete e.pre_context,delete e.context_line,delete e.post_context}function Np(e,t,n,r){if(t.lineno===void 0||r===void 0){A&&d.error("Cannot resolve context for frame with no lineno or file contents");return}t.pre_context=[];for(let s=_i(e,n);s<e;s++){let i=r[s];if(i===void 0){fi(t),A&&d.error(`Could not find line ${s} in file ${t.filename}`);return}t.pre_context.push(i)}if(r[e]===void 0){fi(t),A&&d.error(`Could not find line ${e} in file ${t.filename}`);return}t.context_line=r[e];let o=hi(e,n);t.post_context=[];for(let s=e+1;s<=o;s++){let i=r[s];if(i===void 0)break;t.post_context.push(i)}}function _i(e,t){return Math.max(1,e-t)}function hi(e,t){return e+t}function di(e,t){return[_i(e,t),hi(e,t)]}var Rp=((e={})=>{let t=e.frameContextLines!==void 0?e.frameContextLines:lp;return{name:mp,processEvent(n){return bp(n,t)}}}),hr=Rp;var an=Cn(process.versions.node),Si=an.major,aE=an.minor;var yi=require("node:worker_threads");var cn;async function un(){if(cn===void 0)try{cn=!!(await import("node:inspector")).url()}catch{cn=!1}return cn}var St="__SENTRY_ERROR_LOCAL_VARIABLES__";function Ti(e,t,n){let r=0,o=5,s=0;return setInterval(()=>{s===0?r>e&&(o*=2,n(o),o>86400&&(o=86400),s=o):(s-=1,s===0&&t()),r=0},1e3).unref(),()=>{r+=1}}function Ei(e){return e!==void 0&&(e.length===0||e==="?"||e==="<anonymous>")}function pn(e,t){return e===t||`Object.${e}`===t||e===`Object.${t}`||Ei(e)&&Ei(t)}var Ap="LyohIEBzZW50cnkvbm9kZS1jb3JlIDEwLjUzLjAgKDA1NDg5YjgpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPWdsb2JhbFRoaXMsaT17fTtjb25zdCBvPSJfX1NFTlRSWV9FUlJPUl9MT0NBTF9WQVJJQUJMRVNfXyI7Y29uc3QgYT10O2Z1bmN0aW9uIHMoLi4uZSl7YS5kZWJ1ZyYmZnVuY3Rpb24oZSl7aWYoISgiY29uc29sZSJpbiBuKSlyZXR1cm4gZSgpO2NvbnN0IHQ9bi5jb25zb2xlLG89e30sYT1PYmplY3Qua2V5cyhpKTthLmZvckVhY2goZT0+e2NvbnN0IG49aVtlXTtvW2VdPXRbZV0sdFtlXT1ufSk7dHJ5e3JldHVybiBlKCl9ZmluYWxseXthLmZvckVhY2goZT0+e3RbZV09b1tlXX0pfX0oKCk9PmNvbnNvbGUubG9nKCJbTG9jYWxWYXJpYWJsZXMgV29ya2VyXSIsLi4uZSkpfWFzeW5jIGZ1bmN0aW9uIGMoZSx0LG4saSl7Y29uc3Qgbz1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pO2lbbl09by5yZXN1bHQuZmlsdGVyKGU9PiJsZW5ndGgiIT09ZS5uYW1lJiYhaXNOYU4ocGFyc2VJbnQoZS5uYW1lLDEwKSkpLnNvcnQoKGUsdCk9PnBhcnNlSW50KGUubmFtZSwxMCktcGFyc2VJbnQodC5uYW1lLDEwKSkubWFwKGU9PmUudmFsdWU/LnZhbHVlKX1hc3luYyBmdW5jdGlvbiByKGUsdCxuLGkpe2NvbnN0IG89YXdhaXQgZS5wb3N0KCJSdW50aW1lLmdldFByb3BlcnRpZXMiLHtvYmplY3RJZDp0LG93blByb3BlcnRpZXM6ITB9KTtpW25dPW8ucmVzdWx0Lm1hcChlPT5bZS5uYW1lLGUudmFsdWU/LnZhbHVlXSkucmVkdWNlKChlLFt0LG5dKT0+KGVbdF09bixlKSx7fSl9ZnVuY3Rpb24gdShlLHQpe2UudmFsdWUmJigidmFsdWUiaW4gZS52YWx1ZT92b2lkIDA9PT1lLnZhbHVlLnZhbHVlfHxudWxsPT09ZS52YWx1ZS52YWx1ZT90W2UubmFtZV09YDwke2UudmFsdWUudmFsdWV9PmA6dFtlLm5hbWVdPWUudmFsdWUudmFsdWU6ImRlc2NyaXB0aW9uImluIGUudmFsdWUmJiJmdW5jdGlvbiIhPT1lLnZhbHVlLnR5cGU/dFtlLm5hbWVdPWA8JHtlLnZhbHVlLmRlc2NyaXB0aW9ufT5gOiJ1bmRlZmluZWQiPT09ZS52YWx1ZS50eXBlJiYodFtlLm5hbWVdPSI8dW5kZWZpbmVkPiIpKX1hc3luYyBmdW5jdGlvbiBsKGUsdCl7Y29uc3Qgbj1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pLGk9e307Zm9yKGNvbnN0IHQgb2Ygbi5yZXN1bHQpaWYodC52YWx1ZT8ub2JqZWN0SWQmJiJBcnJheSI9PT10LnZhbHVlLmNsYXNzTmFtZSl7Y29uc3Qgbj10LnZhbHVlLm9iamVjdElkO2F3YWl0IGMoZSxuLHQubmFtZSxpKX1lbHNlIGlmKHQudmFsdWU/Lm9iamVjdElkJiYiT2JqZWN0Ij09PXQudmFsdWUuY2xhc3NOYW1lKXtjb25zdCBuPXQudmFsdWUub2JqZWN0SWQ7YXdhaXQgcihlLG4sdC5uYW1lLGkpfWVsc2UgdC52YWx1ZSYmdSh0LGkpO3JldHVybiBpfWxldCBmOyhhc3luYyBmdW5jdGlvbigpe2NvbnN0IHQ9bmV3IGU7dC5jb25uZWN0VG9NYWluVGhyZWFkKCkscygiQ29ubmVjdGVkIHRvIG1haW4gdGhyZWFkIik7bGV0IG49ITE7dC5vbigiRGVidWdnZXIucmVzdW1lZCIsKCk9PntuPSExfSksdC5vbigiRGVidWdnZXIucGF1c2VkIixlPT57bj0hMCxhc3luYyBmdW5jdGlvbihlLHtyZWFzb246dCxkYXRhOntvYmplY3RJZDpufSxjYWxsRnJhbWVzOml9KXtpZigiZXhjZXB0aW9uIiE9PXQmJiJwcm9taXNlUmVqZWN0aW9uIiE9PXQpcmV0dXJuO2lmKGY/LigpLG51bGw9PW4pcmV0dXJuO2NvbnN0IGE9W107Zm9yKGxldCB0PTA7dDxpLmxlbmd0aDt0Kyspe2NvbnN0e3Njb3BlQ2hhaW46bixmdW5jdGlvbk5hbWU6byx0aGlzOnN9PWlbdF0sYz1uLmZpbmQoZT0+ImxvY2FsIj09PWUudHlwZSkscj0iZ2xvYmFsIiE9PXMuY2xhc3NOYW1lJiZzLmNsYXNzTmFtZT9gJHtzLmNsYXNzTmFtZX0uJHtvfWA6bztpZih2b2lkIDA9PT1jPy5vYmplY3Qub2JqZWN0SWQpYVt0XT17ZnVuY3Rpb246cn07ZWxzZXtjb25zdCBuPWF3YWl0IGwoZSxjLm9iamVjdC5vYmplY3RJZCk7YVt0XT17ZnVuY3Rpb246cix2YXJzOm59fX1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuY2FsbEZ1bmN0aW9uT24iLHtmdW5jdGlvbkRlY2xhcmF0aW9uOmBmdW5jdGlvbigpIHsgdGhpcy4ke299ID0gdGhpcy4ke299IHx8ICR7SlNPTi5zdHJpbmdpZnkoYSl9OyB9YCxzaWxlbnQ6ITAsb2JqZWN0SWQ6bn0pLGF3YWl0IGUucG9zdCgiUnVudGltZS5yZWxlYXNlT2JqZWN0Iix7b2JqZWN0SWQ6bn0pfSh0LGUucGFyYW1zKS50aGVuKGFzeW5jKCk9PntuJiZhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpfSxhc3luYyBlPT57biYmYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5yZXN1bWUiKX0pfSksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5lbmFibGUiKTtjb25zdCBpPSExIT09YS5jYXB0dXJlQWxsRXhjZXB0aW9ucztpZihhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6aT8iYWxsIjoidW5jYXVnaHQifSksaSl7Y29uc3QgZT1hLm1heEV4Y2VwdGlvbnNQZXJTZWNvbmR8fDUwO2Y9ZnVuY3Rpb24oZSx0LG4pe2xldCBpPTAsbz01LGE9MDtyZXR1cm4gc2V0SW50ZXJ2YWwoKCk9PnswPT09YT9pPmUmJihvKj0yLG4obyksbz44NjQwMCYmKG89ODY0MDApLGE9byk6KGEtPTEsMD09PWEmJnQoKSksaT0wfSwxZTMpLnVucmVmKCksKCk9PntpKz0xfX0oZSxhc3luYygpPT57cygiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9LGFzeW5jIGU9PntzKGBSYXRlLWxpbWl0IGV4Y2VlZGVkLiBEaXNhYmxpbmcgY2FwdHVyaW5nIG9mIGNhdWdodCBleGNlcHRpb25zIGZvciAke2V9IHNlY29uZHMuYCksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJ1bmNhdWdodCJ9KX0pfX0pKCkuY2F0Y2goZT0+e3MoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSxzZXRJbnRlcnZhbCgoKT0+e30sMWU0KTs=";function Ii(...e){d.log("[LocalVariables]",...e)}var bi=((e={})=>{function t(s,i){let a=(s.stacktrace?.frames||[]).filter(c=>c.function!=="new Promise");for(let c=0;c<a.length;c++){let u=a.length-c-1,p=i[c],f=a[u];if(!f||!p)break;p.vars===void 0||f.in_app===!1&&e.includeOutOfAppFrames!==!0||!pn(f.function,p.function)||(f.vars=p.vars)}}function n(s,i){if(i.originalException&&typeof i.originalException=="object"&&St in i.originalException&&Array.isArray(i.originalException[St])){for(let a of s.exception?.values||[])t(a,i.originalException[St]);i.originalException[St]=void 0}return s}async function r(){let s=await import("node:inspector");s.url()||s.open(0)}function o(s){let i=new yi.Worker(new URL(`data:application/javascript;base64,${Ap}`),{workerData:s,execArgv:[],env:{...process.env,NODE_OPTIONS:void 0}});process.on("exit",()=>{i.terminate()}),i.once("error",a=>{Ii("Worker error",a)}),i.once("exit",a=>{Ii("Worker exit",a)}),i.unref()}return{name:"LocalVariablesAsync",async setup(s){if(!s.getOptions().includeLocalVariables)return;if(await un()){d.warn("Local variables capture has been disabled because the debugger was already enabled");return}let a={...e,debug:d.isEnabled()};r().then(()=>{try{o(a)}catch(c){d.error("Failed to start worker",c)}},c=>{d.error("Failed to start inspector",c)})},processEvent(s,i){return n(s,i)}}});function xi(e){if(e!==void 0)return e.slice(-10).reduce((t,n)=>`${t},${n.function},${n.lineno},${n.colno}`,"")}function Cp(e,t){if(t!==void 0)return xi(e(t,1))}function Ni(e){let t=[],n=!1;function r(i){t=[],!n&&(n=!0,e(i))}t.push(r);function o(i){t.push(i)}function s(i){let a=t.pop()||r;try{a(i)}catch{r(i)}}return{add:o,next:s}}var Sr=class e{constructor(t){this._session=t}static async create(t){if(t)return t;let n=await import("node:inspector");return new e(new n.Session)}configureAndConnect(t,n){this._session.connect(),this._session.on("Debugger.paused",r=>{t(r,()=>{this._session.post("Debugger.resume")})}),this._session.post("Debugger.enable"),this._session.post("Debugger.setPauseOnExceptions",{state:n?"all":"uncaught"})}setPauseOnExceptions(t){this._session.post("Debugger.setPauseOnExceptions",{state:t?"all":"uncaught"})}getLocalVariables(t,n){this._getProperties(t,r=>{let{add:o,next:s}=Ni(n);for(let i of r)if(i.value?.objectId&&i.value.className==="Array"){let a=i.value.objectId;o(c=>this._unrollArray(a,i.name,c,s))}else if(i.value?.objectId&&i.value.className==="Object"){let a=i.value.objectId;o(c=>this._unrollObject(a,i.name,c,s))}else i.value&&o(a=>this._unrollOther(i,a,s));s({})})}_getProperties(t,n){this._session.post("Runtime.getProperties",{objectId:t,ownProperties:!0},(r,o)=>{n(r?[]:o.result)})}_unrollArray(t,n,r,o){this._getProperties(t,s=>{r[n]=s.filter(i=>i.name!=="length"&&!isNaN(parseInt(i.name,10))).sort((i,a)=>parseInt(i.name,10)-parseInt(a.name,10)).map(i=>i.value?.value),o(r)})}_unrollObject(t,n,r,o){this._getProperties(t,s=>{r[n]=s.map(i=>[i.name,i.value?.value]).reduce((i,[a,c])=>(i[a]=c,i),{}),o(r)})}_unrollOther(t,n,r){t.value&&("value"in t.value?t.value.value===void 0||t.value.value===null?n[t.name]=`<${t.value.value}>`:n[t.name]=t.value.value:"description"in t.value&&t.value.type!=="function"?n[t.name]=`<${t.value.description}>`:t.value.type==="undefined"&&(n[t.name]="<undefined>")),r(n)}},vp="LocalVariables",Op=((e={},t)=>{let n=new pe(20),r,o=!1;function s(u){let p=xi(u.stacktrace?.frames);if(p===void 0)return;let f=n.remove(p);if(f===void 0)return;let l=(u.stacktrace?.frames||[]).filter(m=>m.function!=="new Promise");for(let m=0;m<l.length;m++){let _=l.length-m-1,S=f[m],E=l[_];if(!E||!S)break;S.vars===void 0||E.in_app===!1&&e.includeOutOfAppFrames!==!0||!pn(E.function,S.function)||(E.vars=S.vars)}}function i(u){for(let p of u.exception?.values||[])s(p);return u}let a;async function c(){let p=T()?.getOptions();if(!p?.includeLocalVariables)return;if(Si<18){d.log("The `LocalVariables` integration is only supported on Node >= v18.");return}if(await un()){d.warn("Local variables capture has been disabled because the debugger was already enabled");return}try{let l=await Sr.create(t),m=(S,{params:{reason:E,data:N,callFrames:C}},Z)=>{if(E!=="exception"&&E!=="promiseRejection"){Z();return}r?.();let Te=Cp(S,N.description);if(Te==null){Z();return}let{add:Ie,next:de}=Ni(k=>{n.set(Te,k),Z()});for(let k=0;k<Math.min(C.length,5);k++){let{scopeChain:$i,functionName:Cr,this:mn}=C[k],vr=$i.find(ye=>ye.type==="local"),Or=mn.className==="global"||!mn.className?Cr:`${mn.className}.${Cr}`;if(vr?.object.objectId===void 0)Ie(ye=>{ye[k]={function:Or},de(ye)});else{let ye=vr.object.objectId;Ie(Lr=>l.getLocalVariables(ye,Vi=>{Lr[k]={function:Or,vars:Vi},de(Lr)}))}}de([])},_=e.captureAllExceptions!==!1;if(l.configureAndConnect((S,E)=>m(p.stackParser,S,E),_),_){let S=e.maxExceptionsPerSecond||50;r=Ti(S,()=>{d.log("Local variables rate-limit lifted."),l.setPauseOnExceptions(!0)},E=>{d.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${E} seconds.`),l.setPauseOnExceptions(!1)})}o=!0}catch(l){d.log("The `LocalVariables` integration failed to start.",l)}}return{name:vp,setupOnce(){a=c()},async processEvent(u){return await a,o?i(u):u},_getCachedFramesCount(){return n.size},_getFirstCachedFrame(){return n.values()[0]}}}),Ri=Op;var Er=(e={})=>an.major<19?Ri(e):bi(e);function Ai(){try{return typeof module<"u"&&typeof module.exports<"u"}catch{return!1}}var Ci=require("worker_threads");var Lp=2e3;function Et(e){x(()=>{console.error(e)});let t=T();if(t===void 0){A&&d.warn("No NodeClient was defined, we are exiting the process now."),global.process.exit(1);return}let n=t.getOptions(),r=n?.shutdownTimeout&&n.shutdownTimeout>0?n.shutdownTimeout:Lp;t.close(r).then(o=>{o||A&&d.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},o=>{A&&d.error(o)})}var Mp="OnUncaughtException",Tr=(e={})=>{let t={exitEvenIfOtherHandlersAreRegistered:!1,...e};return{name:Mp,setup(n){Ci.isMainThread&&global.process.on("uncaughtException",Up(n,t))}}};function Up(e,t){let r=!1,o=!1,s=!1,i,a=e.getOptions();return Object.assign(c=>{let u=Et;t.onFatalError?u=t.onFatalError:a.onFatalError&&(u=a.onFatalError);let f=global.process.listeners("uncaughtException").filter(m=>m.name!=="domainUncaughtExceptionClear"&&m.tag!=="sentry_tracingErrorCallback"&&m._errorHandler!==!0).length===0,l=t.exitEvenIfOtherHandlersAreRegistered||f;r?l&&(s?(A&&d.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),Et(c)):o||(o=!0,setTimeout(()=>{s||(s=!0,u(i,c))},2e3))):(i=c,r=!0,T()===e&&ce(c,{originalException:c,captureContext:{level:"fatal"},mechanism:{handled:!1,type:"auto.node.onuncaughtexception"}}),!s&&l&&(s=!0,u(c)))},{_errorHandler:!0})}var kp="OnUnhandledRejection",Pp=[{name:"AI_NoOutputGeneratedError"},{name:"AbortError"}],Dp=((e={})=>{let t={mode:e.mode??"warn",ignore:[...Pp,...e.ignore??[]]};return{name:kp,setup(n){global.process.on("unhandledRejection",Gp(n,t))}}}),Ir=Dp;function wp(e){if(typeof e!="object"||e===null)return{name:"",message:String(e??"")};let t=e,n=typeof t.name=="string"?t.name:"",r=typeof t.message=="string"?t.message:String(e);return{name:n,message:r}}function Fp(e,t){let n=e.name===void 0||$(t.name,e.name,!0),r=e.message===void 0||$(t.message,e.message);return n&&r}function Bp(e,t){let n=wp(t);return e.some(r=>Fp(r,n))}function Gp(e,t){return function(r,o){if(T()!==e||Bp(t.ignore??[],r))return;let s=t.mode==="strict"?"fatal":"error",i=r&&typeof r=="object"?r._sentry_active_span:void 0;(i?c=>$t(i,c):c=>c())(()=>{ce(r,{originalException:r,captureContext:{extra:{unhandledPromiseRejection:!0},level:s},mechanism:{handled:!1,type:"auto.node.onunhandledrejection"}})}),Hp(r,t.mode)}}function Hp(e,t){let n="This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:";t==="warn"?x(()=>{console.warn(n),console.error(e&&typeof e=="object"&&"stack"in e?e.stack:e)}):t==="strict"&&(x(()=>{console.warn(n)}),Et(e))}var vi=U(require("node:http"),1);var yr="Spotlight",Yp=((e={})=>{let t={sidecarUrl:e.sidecarUrl||"http://localhost:8969/stream"};return{name:yr,setup(n){try{process.env.NODE_ENV&&process.env.NODE_ENV!=="development"&&d.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?")}catch{}Wp(n,t)}}}),Oi=Yp;function Wp(e,t){let n=$p(t.sidecarUrl);if(!n)return;let r=0;e.on("beforeEnvelope",o=>{if(r>3){d.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests");return}let s=at(o);Fe(()=>{let i=vi.request({method:"POST",path:n.pathname,hostname:n.hostname,port:n.port,headers:{"Content-Type":"application/x-sentry-envelope"}},a=>{a.statusCode&&a.statusCode>=200&&a.statusCode<400&&(r=0),a.on("data",()=>{}),a.on("end",()=>{}),a.setEncoding("utf8")});i.on("error",()=>{r++,d.warn("[Spotlight] Failed to send envelope to Spotlight Sidecar")}),i.write(s),i.end()})})}function $p(e){try{return new URL(`${e}`)}catch{d.warn(`[Spotlight] Invalid sidecar URL: ${e}`);return}}var br=(e={})=>({name:"Console",setup(t){process.env.LAMBDA_TASK_ROOT&&J("console",Vp),dr({...e,filter:[...e.filter||[],"[DEP0205] DeprecationWarning"]}).setup?.(t)}});function Vp(){let e=h?.console;e&&le.forEach(t=>{t in e&&jp(e,t)})}function jp(e,t){let n=e[t];F[t]=n;let r=n,o,s=!1,i=function(...c){if(s){n.apply(e,c);return}s=!0;try{W("console",{args:c,level:t}),r.apply(e,c)}finally{s=!1}};Ct(i,n);let a=n.bind(e);F[t]=a;try{let c=i;Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){return c},set(u){u===i?(o!==void 0&&(r=o,o=void 0),c=i):u===a?(o=r,c=a):typeof u=="function"&&!u.__sentry_original__?(r=u,c=i):c=u}})}catch{Ze(e,t,function(c){return F[t]=c,function(...u){W("console",{args:u,level:t}),F[t]?.apply(this,u)}})}}var fn=require("node:path");function Li(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function Mi(e=process.argv[1]?fr(process.argv[1]):process.cwd(),t=fn.sep==="\\"){let n=t?Li(e):e;return r=>{if(!r)return;let o=t?Li(r):r,{dir:s,base:i,ext:a}=fn.posix.parse(o);(a===".js"||a===".mjs"||a===".cjs")&&(i=i.slice(0,a.length*-1));let c=decodeURIComponent(i);s||(s=".");let u=s.lastIndexOf("/node_modules");if(u>-1)return`${s.slice(u+14).replace(/\//g,".")}:${c}`;if(s.startsWith(n)){let p=s.slice(n.length+1).replace(/\//g,".");return p?`${p}:${c}`:c}return c}}function Ui(e){if(process.env.SENTRY_RELEASE)return process.env.SENTRY_RELEASE;if(h.SENTRY_RELEASE?.id)return h.SENTRY_RELEASE.id;let t=process.env.GITHUB_SHA||process.env.CI_MERGE_REQUEST_SOURCE_BRANCH_SHA||process.env.CI_BUILD_REF||process.env.CI_COMMIT_SHA||process.env.BITBUCKET_COMMIT,n=process.env.APPVEYOR_PULL_REQUEST_HEAD_COMMIT||process.env.APPVEYOR_REPO_COMMIT||process.env.CODEBUILD_RESOLVED_SOURCE_VERSION||process.env.AWS_COMMIT_ID||process.env.BUILD_SOURCEVERSION||process.env.GIT_CLONE_COMMIT_HASH||process.env.BUDDY_EXECUTION_REVISION||process.env.BUILDKITE_COMMIT||process.env.CIRCLE_SHA1||process.env.CIRRUS_CHANGE_IN_REPO||process.env.CF_REVISION||process.env.CM_COMMIT||process.env.CF_PAGES_COMMIT_SHA||process.env.DRONE_COMMIT_SHA||process.env.FC_GIT_COMMIT_SHA||process.env.HEROKU_TEST_RUN_COMMIT_VERSION||process.env.HEROKU_BUILD_COMMIT||process.env.HEROKU_SLUG_COMMIT||process.env.RAILWAY_GIT_COMMIT_SHA||process.env.RENDER_GIT_COMMIT||process.env.SEMAPHORE_GIT_SHA||process.env.TRAVIS_PULL_REQUEST_SHA||process.env.VERCEL_GIT_COMMIT_SHA||process.env.VERCEL_GITHUB_COMMIT_SHA||process.env.VERCEL_GITLAB_COMMIT_SHA||process.env.VERCEL_BITBUCKET_COMMIT_SHA||process.env.ZEIT_GITHUB_COMMIT_SHA||process.env.ZEIT_GITLAB_COMMIT_SHA||process.env.ZEIT_BITBUCKET_COMMIT_SHA,r=process.env.CI_COMMIT_ID||process.env.SOURCE_COMMIT||process.env.SOURCE_VERSION||process.env.GIT_COMMIT||process.env.COMMIT_REF||process.env.BUILD_VCS_NUMBER||process.env.CI_COMMIT_SHA;return t||n||r||e}var ki=xt(lr(Mi()));var Zp=U(require("node:http"),1),Jp=U(require("node:https"),1),wi=require("node:stream"),Fi=require("node:zlib");var ee=U(require("node:net"),1),Nr=U(require("node:tls"),1);var xr=U(require("node:http"),1);var j=Symbol("AgentBaseInternalState"),dn=class extends xr.Agent{constructor(t){super(t),this[j]={}}isSecureEndpoint(t){if(t){if(typeof t.secureEndpoint=="boolean")return t.secureEndpoint;if(typeof t.protocol=="string")return t.protocol==="https:"}let{stack:n}=new Error;return typeof n!="string"?!1:n.split(`
15
+ Url: ${Qt(e)}`),!0}return!1}function Xc(e,t){return t?.length?Xt(e).some(n=>re(n,t)):!1}function Kc(e,t){if(!t?.length)return!1;let n=e.transaction;return n?re(n,t):!1}function qc(e,t){if(!t?.length)return!1;let n=Qt(e);return n?re(n,t):!1}function Qc(e,t){if(!t?.length)return!0;let n=Qt(e);return n?re(n,t):!0}function eu(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 Qt(e){try{let n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?eu(n):null}catch{return g&&d.error(`Cannot extract url for event ${oe(e)}`),null}}function tu(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Gs(e,t,n,r,o,s){if(!o.exception?.values||!s||!K(s.originalException,Error))return;let i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=ar(e,t,r,s.originalException,n,o.exception.values,i,0))}function ar(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(K(r[o],Error)){Fs(i,a,r);let u=e(t,r[o]),p=c.length;Bs(u,o,p,a),c=ar(e,t,n,r[o],o,[u,...c],u,p)}return Hs(r)&&r.errors.forEach((u,p)=>{if(K(u,Error)){Fs(i,a,r);let f=e(t,u),l=c.length;Bs(f,`errors[${p}]`,l,a),c=ar(e,t,n,u,o,[f,...c],f,l)}}),c}function Hs(e){return Array.isArray(e.errors)}function Fs(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Hs(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Bs(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function Ys(e,t){return e(t.stack||"",1)}function nu(e){return je(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function ru(e){return nu(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function cr(e,t){let n={type:t.name||t.constructor.name,value:ru(t)},r=Ys(e,t);return r.length&&(n.stacktrace={frames:r}),n}function ou(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function su(e){if("name"in e&&typeof e.name=="string"){let r=`'${e.name}' captured as exception`;return"message"in e&&typeof e.message=="string"&&(r+=` with message '${e.message}'`),r}else if("message"in e&&typeof e.message=="string")return e.message;let t=yn(e);if(Yr(e))return`Event \`ErrorEvent\` captured as exception with message \`${e.message}\``;let n=iu(e);return`${n&&n!=="Object"?`'${n}'`:"Object"} captured as exception with keys: ${t}`}function iu(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function au(e,t,n,r){if(je(n))return[n,void 0];if(t.synthetic=!0,ne(n)){let s=e?.getOptions().normalizeDepth,i={__serialized__:Wn(n,s)},a=ou(n);if(a)return[a,i];let c=su(n),u=r?.syntheticException||new Error(c);return u.message=c,[u,i]}let o=r?.syntheticException||new Error(n);return o.message=`${n}`,[o,void 0]}function Ws(e,t,n,r){let s=r?.data&&r.data.mechanism||{handled:!0,type:"generic"},[i,a]=au(e,s,n,r),c={exception:{values:[cr(t,i)]}};return a&&(c.extra=a),An(c,void 0,void 0),ve(c,s),{...c,event_id:r?.event_id}}function $s(e,t,n="info",r,o){let s={event_id:r?.event_id,level:n};if(o&&r?.syntheticException){let i=Ys(e,r.syntheticException);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]},ve(s,{synthetic:!0}))}if(ze(t)){let{__sentry_template_string__:i,__sentry_template_values__:a}=t;return s.logentry={message:i,params:a},s}return s.message=t,s}var cu="cause",uu=5,pu="LinkedErrors",fu=((e={})=>{let t=e.limit||uu,n=e.key||cu;return{name:pu,preprocessEvent(r,o,s){let i=s.getOptions();Gs(cr,i.stackParser,n,t,r,o)}}}),gt=fu;function Vs(e){let t={},n=0;for(;n<e.length;){let r=e.indexOf("=",n);if(r===-1)break;let o=e.indexOf(";",n);if(o===-1)o=e.length;else if(o<r){n=e.lastIndexOf(";",r-1)+1;continue}let s=e.slice(n,r).trim();if(t[s]===void 0){let i=e.slice(r+1,o).trim();i.charCodeAt(0)===34&&(i=i.slice(1,-1));try{t[s]=i.indexOf("%")!==-1?decodeURIComponent(i):i}catch{t[s]=i}}n=o+1}return t}var ur=["X-Client-IP","X-Forwarded-For","Fly-Client-IP","CF-Connecting-IP","Fastly-Client-Ip","True-Client-Ip","X-Real-IP","X-Cluster-Client-IP","X-Forwarded","Forwarded-For","Forwarded","X-Vercel-Forwarded-For"];function pr(e){let t={};for(let s of Object.keys(e))t[s.toLowerCase()]=e[s];return ur.map(s=>{let i=t[s.toLowerCase()],a=Array.isArray(i)?i.join(";"):i;return s==="Forwarded"?du(a):a?.split(",").map(c=>c.trim())}).reduce((s,i)=>i?s.concat(i):s,[]).find(s=>s!==null&&lu(s))||null}function du(e){if(!e)return null;for(let t of e.split(";"))if(t.startsWith("for="))return t.slice(4);return null}function lu(e){return/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/.test(e)}var mu={cookies:!0,data:!0,headers:!0,query_string:!0,url:!0},gu="RequestData",_u=((e={})=>{let t={...mu,...e.include};return{name:gu,processEvent(n,r,o){let{sdkProcessingMetadata:s={}}=n,{normalizedRequest:i,ipAddress:a}=s,c={...t,ip:t.ip??o.getOptions().sendDefaultPii};return i&&hu(n,i,{ipAddress:a},c),n},processSegmentSpan(n,r){let{sdkProcessingMetadata:o={}}=L().getScopeData(),{normalizedRequest:s,ipAddress:i}=o;if(!s)return;let{sendDefaultPii:a}=r.getOptions(),c={...t,ip:t.ip??a};Su(n,s,i,c,a)}}}),_t=_u;function hu(e,t,n,r){if(e.request={...e.request,...js(t,r)},r.ip){let o=t.headers&&pr(t.headers)||n.ipAddress;o&&(e.user={...e.user,ip_address:o})}}function Su(e,t,n,r,o){let s=js(t,r),i={};if(s.url&&(i["url.full"]=s.url),s.method&&(i["http.request.method"]=s.method),s.query_string&&(i["url.query"]=Eu(s.query_string)),I(e,i),s.cookies&&Object.keys(s.cookies).length>0){let a=Object.entries(s.cookies).map(([u,p])=>`${u}=${p}`).join("; "),c=sr({cookie:a},o??!1,"request");I(e,c)}if(s.headers){let a=sr(s.headers,o??!1,"request");I(e,a)}if(s.data!=null){let a=typeof s.data=="string"?s.data:JSON.stringify(s.data);a&&I(e,{"http.request.body.data":a})}if(r.ip){let a=t.headers&&pr(t.headers)||n||void 0;a&&I(e,{[Ut]:a})}}function js(e,t){let n={},r={...e.headers};if(t.headers&&(n.headers=r,t.cookies||delete r.cookie,!t.ip)){let o=new Set(ur.map(s=>s.toLowerCase()));for(let s of Object.keys(r))o.has(s.toLowerCase())&&delete r[s]}if(n.method=e.method,t.url&&(n.url=e.url),t.cookies){let o=e.cookies||(r?.cookie?Vs(r.cookie):void 0);n.cookies=o||{}}return t.query_string&&(n.query_string=e.query_string),t.data&&(n.data=e.data),n}function Eu(e){return typeof e=="string"?e||void 0:(Array.isArray(e)?e:Object.entries(e)).map(([r,o])=>`${r}=${o}`).join("&")||void 0}var en=new Set([]);function zs(e){let t="console",n=me(t,e);return J(t,Tu),n}function Zs(e){for(let t of e)en.add(t);return()=>{for(let t of e)en.delete(t)}}function Tu(){"console"in h&&le.forEach(function(e){e in h.console&&Ze(h.console,e,function(t){return F[e]=t,function(...n){let r=n[0],o=F[e],s=en.size&&typeof r=="string"&&re(r,en);s||W("console",{args:n,level:e}),(!s||g&&d.isEnabled())&&o?.apply(h.console,n)}})})}function Js(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var Iu=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function yu(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Iu.exec(t);return n?n.slice(1):[]}function fr(e){let t=yu(e),n=t[0]||"",r=t[1];return!n&&!r?".":(r&&(r=r.slice(0,r.length-1)),n+r)}var bu="Console",dr=(e={})=>{let t=new Set(e.levels||le);return{name:bu,setup(n){let r=zs(({args:o,level:s})=>{T()!==n||!t.has(s)||xu(s,o)});if(n.registerCleanup(r),e.filter){let o=Zs(e.filter);n.registerCleanup(o)}}}};function xu(e,t){let n={category:"console",data:{arguments:t,logger:"console"},level:Js(e),message:Xs(t)};if(e==="assert")if(t[0]===!1){let r=t.slice(1);n.message=r.length>0?`Assertion failed: ${Xs(r)}`:"Assertion failed",n.data.arguments=r}else return;ir(n,{input:t,level:e})}function Xs(e){return"util"in h&&typeof h.util.format=="function"?h.util.format(...e):xn(e," ")}function Ks(e,t,n){let r=n.getOptions(),o=n.getDsn(),s=r.tunnel,i=we(r._metadata),a={sent_at:new Date().toISOString(),...Nu(t)&&{trace:t},...i&&{sdk:i},...!!s&&o&&{dsn:M(o)}},c=r.sendDefaultPii?"auto":"never",u=[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...ue()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}];return R(a,[u])}function Nu(e){return!!e.trace_id&&!!e.public_key}function qs(e){let t=156;if(t+=e.name.length*2,t+=Un(e.attributes),e.links&&e.links.length>0){let r=e.links[0]?.attributes,o=100+(r?Un(r):0);t+=o*e.links.length}return t}var Qs=1e3,Ru=5e6,tn=class{constructor(t,n){this._traceBuckets=new Map,this._client=t;let{maxSpanLimit:r,flushInterval:o,maxTraceWeightInBytes:s}=n??{};this._maxSpanLimit=r&&r>0&&r<=Qs?r:Qs,this._flushInterval=o&&o>0?o:5e3,this._maxTraceWeight=s&&s>0?s:Ru,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(i=>{clearTimeout(i.timeout)}),this._traceBuckets.clear()})}add(t){let n=t.trace_id,r=this._traceBuckets.get(n);r||(r={spans:new Set,size:0,timeout:He(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,r)),r.spans.add(t),r.size+=qs(t),(r.spans.size>=this._maxSpanLimit||r.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(g&&d.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){let n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}let r=Array.from(n.spans),o=r[0]?._segmentSpan;if(!o){g&&d.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}let s=Pe(o),i=r.map(c=>{let{_segmentSpan:u,...p}=c;return p}),a=Ks(i,s,this._client);g&&d.log(`Sending span envelope for trace ${t} with ${i.length} spans`),this._client.sendEnvelope(a).then(null,c=>{g&&d.error("Error while sending streamed span envelope:",c)}),this._removeTrace(t)}_removeTrace(t){let n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}};var nn=()=>({name:"SpanStreaming",setup(e){let t="SpanStreaming integration requires",n="Falling back to static trace lifecycle.",r=e.getOptions();if(!Wt(e)){r.traceLifecycle="static",g&&d.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}let o=r.beforeSendSpan;if(o&&!De(o)){r.traceLifecycle="static",g&&d.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}let s=new tn(e);e.on("afterSpanEnd",i=>{Bt(i)&&s.add(Xn(i,e))})}});var pe=class{constructor(t){this._maxSize=t,this._cache=new Map}get size(){return this._cache.size}get(t){let n=this._cache.get(t);if(n!==void 0)return this._cache.delete(t),this._cache.set(t,n),n}set(t,n){if(this._cache.size>=this._maxSize){let r=this._cache.keys().next().value;this._cache.delete(r)}this._cache.set(t,n)}remove(t){let n=this._cache.get(t);return n&&this._cache.delete(t),n}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){let t=[];return this._cache.forEach(n=>t.push(n)),t}};function ei(e){let t=e._metadata?.sdk,n=t?.name&&t?.version?`${t?.name}/${t?.version}`:void 0;e.transportOptions={...e.transportOptions,headers:{...n&&{"user-agent":n},...e.transportOptions?.headers}}}var ht=class e extends qt{__init(){this._disposeCallbacks=[]}constructor(t){Mo(),ei(t),super(t),e.prototype.__init.call(this),this._setUpMetricsProcessing()}eventFromException(t,n){let r=Ws(this,this._options.stackParser,t,n);return r.level="error",Q(r)}eventFromMessage(t,n="info",r){return Q($s(this._options.stackParser,t,n,r,this._options.attachStacktrace))}captureException(t,n,r){return ti(n),super.captureException(t,n,r)}captureEvent(t,n,r){return!t.type&&t.exception?.values&&t.exception.values.length>0&&ti(n),super.captureEvent(t,n,r)}captureCheckIn(t,n,r){let o="checkInId"in t&&t.checkInId?t.checkInId:b();if(!this._isEnabled())return g&&d.warn("SDK not enabled, will not capture check-in."),o;let s=this.getOptions(),{release:i,environment:a,tunnel:c}=s,u={check_in_id:o,monitor_slug:t.monitorSlug,status:t.status,release:i,environment:a};"duration"in t&&(u.duration=t.duration),n&&(u.monitor_config={schedule:n.schedule,checkin_margin:n.checkinMargin,max_runtime:n.maxRuntime,timezone:n.timezone,failure_issue_threshold:n.failureIssueThreshold,recovery_threshold:n.recoveryThreshold});let[p,f]=ss(this,r);f&&(u.contexts={trace:f});let l=Ls(u,p,this.getSdkMetadata(),c,this.getDsn());return g&&d.log("Sending checkin:",t.monitorSlug,t.status),this.sendEnvelope(l),o}registerCleanup(t){this._disposeCallbacks.push(t)}dispose(){g&&d.log("Disposing client...");for(let t of this._disposeCallbacks)try{t()}catch{}this._disposeCallbacks.length=0;for(let t of Object.keys(this._hooks))this._hooks[t]?.clear();this._hooks={},this._eventProcessors.length=0,this._integrations={},this._outcomes={},this._transport=void 0,this._promiseBuffer=Ye(ft)}_prepareEvent(t,n,r,o){return this._options.platform&&(t.platform=t.platform||this._options.platform),this._options.runtime&&(t.contexts={...t.contexts,runtime:t.contexts?.runtime||this._options.runtime}),this._options.serverName&&(t.server_name=t.server_name||this._options.serverName),super._prepareEvent(t,n,r,o)}_setUpMetricsProcessing(){this.on("processMetric",t=>{this._options.serverName&&(t.attributes={"server.address":this._options.serverName,...t.attributes})})}};function ti(e){let t=L().getScopeData().sdkProcessingMetadata.requestSession;if(t){let n=e?.mechanism?.handled??!0;n&&t.status!=="crashed"?t.status="errored":n||(t.status="crashed")}}function oi(e,t=!1){return!(t||e&&!e.startsWith("/")&&!e.match(/^[A-Z]:/)&&!e.startsWith(".")&&!e.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&e!==void 0&&!e.includes("node_modules/")}function si(e){let t=/^\s*[-]{4,}$/,n=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/,r=/at (?:async )?(.+?) \(data:(.*?),/;return o=>{let s=o.match(r);if(s)return{filename:`<data:${s[2]}>`,function:s[1]};let i=o.match(n);if(i){let a,c,u,p,f;if(i[1]){u=i[1];let S=u.lastIndexOf(".");if(u[S-1]==="."&&S--,S>0){a=u.slice(0,S),c=u.slice(S+1);let E=a.indexOf(".Module");E>0&&(u=u.slice(E+1),a=a.slice(0,E))}p=void 0}c&&(p=a,f=c),c==="<anonymous>"&&(f=void 0,u=void 0),u===void 0&&(f=f||"?",u=p?`${p}.${f}`:f);let l=wr(i[2]),m=i[5]==="native";!l&&i[5]&&!m&&(l=i[5]);let _=l?Au(l):void 0;return{filename:_??l,module:_&&e?.(_),function:u,lineno:ni(i[3]),colno:ni(i[4]),in_app:oi(l||"",m)}}if(o.match(t))return{filename:o}}}function lr(e){return[90,si(e)]}function ni(e){return parseInt(e||"",10)||void 0}function Au(e){try{return decodeURI(e)}catch{return}}var on=require("worker_threads");var A=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Xu=6e4,rn=class extends ht{constructor(t){let n=t.includeServerName===!1?void 0:t.serverName||global.process.env.SENTRY_NAME||ii.hostname(),r={...t,platform:"node",runtime:{name:"node",version:global.process.version},serverName:n};lt(r,"node-light",["node-core"]),d.log(`Initializing Sentry: process: ${process.pid}, thread: ${on.isMainThread?"main":`worker-${on.threadId}`}.`),super(r),this.getOptions().enableLogs&&(this._logOnExitFlushListener=()=>{Ge(this)},n&&this.on("beforeCaptureLog",o=>{o.attributes={...o.attributes,"server.address":n}}),process.on("beforeExit",this._logOnExitFlushListener))}async flush(t){return this.getOptions().sendClientReports&&this._flushOutcomes(),super.flush(t)}async close(t){return this._clientReportInterval&&clearInterval(this._clientReportInterval),this._clientReportOnExitFlushListener&&process.off("beforeExit",this._clientReportOnExitFlushListener),this._logOnExitFlushListener&&process.off("beforeExit",this._logOnExitFlushListener),super.close(t)}startClientReportTracking(){let t=this.getOptions();t.sendClientReports&&(this._clientReportOnExitFlushListener=()=>{this._flushOutcomes()},this._clientReportInterval=setInterval(()=>{A&&d.log("Flushing client reports based on interval."),this._flushOutcomes()},t.clientReportFlushInterval??Xu).unref(),process.on("beforeExit",this._clientReportOnExitFlushListener))}};var ui=require("node:child_process"),sn=require("node:fs"),y=U(require("node:os"),1),pi=require("node:path"),mr=require("node:util");var Ku=(0,mr.promisify)(sn.readFile),qu=(0,mr.promisify)(sn.readdir),Qu="Context",ep=((e={})=>{let t={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0,...e},n=t.app?sp():void 0,r=t.device?ip(t.device):void 0,o=t.culture?op():void 0,s=t.cloudResource?dp():void 0,i=t.os?rp():void 0,a={"process.runtime.engine.name":"v8","process.runtime.engine.version":process.versions.v8,...ai({app:n,device:r,culture:o,cloud_resource:s})};i&&i.then(p=>Object.assign(a,ai({os:p}))).catch(()=>{});let c=(async()=>{let p={};return i&&(p.os=await i),n&&(p.app=n),r&&(p.device=r),o&&(p.culture=o),s&&(p.cloud_resource=s),p})();async function u(p){let f=tp(await c);return p.contexts={...p.contexts,app:{...f.app,...p.contexts?.app},os:{...f.os,...p.contexts?.os},device:{...f.device,...p.contexts?.device},culture:{...f.culture,...p.contexts?.culture},cloud_resource:{...f.cloud_resource,...p.contexts?.cloud_resource}},p}return{name:Qu,processEvent(p){return u(p)},processSegmentSpan(p){I(p,a),I(p,np(n,r))}}}),gr=ep;function tp(e){if(e.app?.app_memory&&(e.app.app_memory=process.memoryUsage().rss),e.app?.free_memory&&typeof process.availableMemory=="function"){let t=process.availableMemory?.();t!=null&&(e.app.free_memory=t)}return e.device?.free_memory&&(e.device.free_memory=y.freemem()),e}function ai(e){let t={},{app:n,device:r,os:o,culture:s,cloud_resource:i}=e;if(n&&n.app_start_time&&(t["app.start_time"]=n.app_start_time),r&&(r.arch&&(t["device.archs"]=[r.arch]),r.boot_time&&(t["device.boot_time"]=r.boot_time),r.memory_size!=null&&(t["device.memory_size"]=r.memory_size),r.processor_count!=null&&(t["device.processor_count"]=r.processor_count),r.cpu_description&&(t["device.cpu_description"]=r.cpu_description),r.processor_frequency!=null&&(t["device.processor_frequency"]=r.processor_frequency)),o&&(o.name&&(t["os.name"]=o.name),o.version&&(t["os.version"]=o.version),o.kernel_version&&(t["os.kernel_version"]=o.kernel_version),o.build&&(t["os.build"]=o.build)),s&&(s.locale&&(t["culture.locale"]=s.locale),s.timezone&&(t["culture.timezone"]=s.timezone)),i)for(let[a,c]of Object.entries(i))c!=null&&(t[a]=c);return t}function np(e,t){let n={};if(e&&(n["app.memory"]=process.memoryUsage().rss,typeof process.availableMemory=="function")){let r=process.availableMemory?.();r!=null&&(n["app.free_memory"]=r)}return t?.free_memory!=null&&(n["device.free_memory"]=y.freemem()),n}async function rp(){let e=y.platform();switch(e){case"darwin":return pp();case"linux":return fp();default:return{name:ap[e]||e,version:y.release()}}}function op(){try{if(typeof process.versions.icu!="string")return;let e=new Date(9e8);if(new Intl.DateTimeFormat("es",{month:"long"}).format(e)==="enero"){let n=Intl.DateTimeFormat().resolvedOptions();return{locale:n.locale,timezone:n.timeZone}}}catch{}}function sp(){let e=process.memoryUsage().rss,n={app_start_time:new Date(Date.now()-process.uptime()*1e3).toISOString(),app_memory:e};if(typeof process.availableMemory=="function"){let r=process.availableMemory?.();r!=null&&(n.free_memory=r)}return n}function ip(e){let t={},n;try{n=y.uptime()}catch{}if(typeof n=="number"&&(t.boot_time=new Date(Date.now()-n*1e3).toISOString()),t.arch=y.arch(),(e===!0||e.memory)&&(t.memory_size=y.totalmem(),t.free_memory=y.freemem()),e===!0||e.cpu){let r=y.cpus(),o=r?.[0];o&&(t.processor_count=r.length,t.cpu_description=o.model,t.processor_frequency=o.speed)}return t}var ap={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows",ohos:"OpenHarmony",android:"Android"},cp=[{name:"fedora-release",distros:["Fedora"]},{name:"redhat-release",distros:["Red Hat Linux","Centos"]},{name:"redhat_version",distros:["Red Hat Linux"]},{name:"SuSE-release",distros:["SUSE Linux"]},{name:"lsb-release",distros:["Ubuntu Linux","Arch Linux"]},{name:"debian_version",distros:["Debian"]},{name:"debian_release",distros:["Debian"]},{name:"arch-release",distros:["Arch Linux"]},{name:"gentoo-release",distros:["Gentoo Linux"]},{name:"novell-release",distros:["SUSE Linux"]},{name:"alpine-release",distros:["Alpine Linux"]}],up={alpine:e=>e,arch:e=>V(/distrib_release=(.*)/,e),centos:e=>V(/release ([^ ]+)/,e),debian:e=>e,fedora:e=>V(/release (..)/,e),mint:e=>V(/distrib_release=(.*)/,e),red:e=>V(/release ([^ ]+)/,e),suse:e=>V(/VERSION = (.*)\n/,e),ubuntu:e=>V(/distrib_release=(.*)/,e)};function V(e,t){let n=e.exec(t);return n?n[1]:void 0}async function pp(){let e={kernel_version:y.release(),name:"Mac OS X",version:`10.${Number(y.release().split(".")[0])-4}`};try{let t=await new Promise((n,r)=>{(0,ui.execFile)("/usr/bin/sw_vers",(o,s)=>{if(o){r(o);return}n(s)})});e.name=V(/^ProductName:\s+(.*)$/m,t),e.version=V(/^ProductVersion:\s+(.*)$/m,t),e.build=V(/^BuildVersion:\s+(.*)$/m,t)}catch{}return e}function ci(e){return e.split(" ")[0].toLowerCase()}async function fp(){let e={kernel_version:y.release(),name:"Linux"};try{let t=await qu("/etc"),n=cp.find(a=>t.includes(a.name));if(!n)return e;let r=(0,pi.join)("/etc",n.name),o=(await Ku(r,{encoding:"utf-8"})).toLowerCase(),{distros:s}=n;e.name=s.find(a=>o.indexOf(ci(a))>=0)||s[0];let i=ci(e.name);e.version=up[i]?.(o)}catch{}return e}function dp(){return process.env.VERCEL?{"cloud.provider":"vercel","cloud.region":process.env.VERCEL_REGION}:process.env.AWS_REGION?{"cloud.provider":"aws","cloud.region":process.env.AWS_REGION,"cloud.platform":process.env.AWS_EXECUTION_ENV}:process.env.GCP_PROJECT?{"cloud.provider":"gcp"}:process.env.ALIYUN_REGION_ID?{"cloud.provider":"alibaba_cloud","cloud.region":process.env.ALIYUN_REGION_ID}:process.env.WEBSITE_SITE_NAME&&process.env.REGION_NAME?{"cloud.provider":"azure","cloud.region":process.env.REGION_NAME}:process.env.IBM_CLOUD_REGION?{"cloud.provider":"ibm_cloud","cloud.region":process.env.IBM_CLOUD_REGION}:process.env.TENCENTCLOUD_REGION?{"cloud.provider":"tencent_cloud","cloud.region":process.env.TENCENTCLOUD_REGION,"cloud.account.id":process.env.TENCENTCLOUD_APPID,"cloud.availability_zone":process.env.TENCENTCLOUD_ZONE}:process.env.NETLIFY?{"cloud.provider":"netlify"}:process.env.FLY_REGION?{"cloud.provider":"fly.io","cloud.region":process.env.FLY_REGION}:process.env.DYNO?{"cloud.provider":"heroku"}:void 0}var li=require("node:fs"),mi=require("node:readline");var _r=new pe(10),gi=new pe(20),lp=7,mp="ContextLines",gp=1e3,_p=1e4;function hp(e,t,n){let r=e.get(t);return r===void 0?(e.set(t,n),n):r}function Sp(e){return!!(e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:"))}function Ep(e){return e.lineno!==void 0&&e.lineno>_p||e.colno!==void 0&&e.colno>gp}function Tp(e,t){let n=_r.get(e);if(n===void 0)return!1;for(let r=t[0];r<=t[1];r++)if(n[r]===void 0)return!1;return!0}function Ip(e,t){if(!e.length)return[];let n=0,r=e[0];if(typeof r!="number")return[];let o=di(r,t),s=[];for(;;){if(n===e.length-1){s.push(o);break}let i=e[n+1];if(typeof i!="number")break;i<=o[1]?o[1]=i+t:(s.push(o),o=di(i,t)),n++}return s}function yp(e,t,n){return new Promise((r,o)=>{let s=(0,li.createReadStream)(e),i=(0,mi.createInterface)({input:s});function a(){s.destroy(),r()}let c=0,u=0,p=t[u];if(p===void 0){a();return}let f=p[0],l=p[1];function m(_){gi.set(e,1),A&&d.error(`Failed to read file: ${e}. Error: ${_}`),i.close(),i.removeAllListeners(),a()}s.on("error",m),i.on("error",m),i.on("close",a),i.on("line",_=>{if(c++,!(c<f)&&(n[c]=bn(_,0),c>=l)){if(u===t.length-1){i.close(),i.removeAllListeners();return}u++;let S=t[u];if(S===void 0){i.close(),i.removeAllListeners();return}f=S[0],l=S[1]}})})}async function bp(e,t){let n={};if(t>0&&e.exception?.values){for(let s of e.exception.values)if(s.stacktrace?.frames?.length)for(let i=s.stacktrace.frames.length-1;i>=0;i--){let a=s.stacktrace.frames[i],c=a?.filename;if(!a||typeof c!="string"||typeof a.lineno!="number"||Sp(c)||Ep(a))continue;n[c]||(n[c]=[]),n[c].push(a.lineno)}}let r=Object.keys(n);if(r.length==0)return e;let o=[];for(let s of r){if(gi.get(s))continue;let i=n[s];if(!i)continue;i.sort((u,p)=>u-p);let a=Ip(i,t);if(a.every(u=>Tp(s,u)))continue;let c=hp(_r,s,{});o.push(yp(s,a,c))}if(await Promise.all(o).catch(()=>{A&&d.log("Failed to read one or more source files and resolve context lines")}),t>0&&e.exception?.values)for(let s of e.exception.values)s.stacktrace?.frames&&s.stacktrace.frames.length>0&&xp(s.stacktrace.frames,t,_r);return e}function xp(e,t,n){for(let r of e)if(r.filename&&r.context_line===void 0&&typeof r.lineno=="number"){let o=n.get(r.filename);if(o===void 0)continue;Np(r.lineno,r,t,o)}}function fi(e){delete e.pre_context,delete e.context_line,delete e.post_context}function Np(e,t,n,r){if(t.lineno===void 0||r===void 0){A&&d.error("Cannot resolve context for frame with no lineno or file contents");return}t.pre_context=[];for(let s=_i(e,n);s<e;s++){let i=r[s];if(i===void 0){fi(t),A&&d.error(`Could not find line ${s} in file ${t.filename}`);return}t.pre_context.push(i)}if(r[e]===void 0){fi(t),A&&d.error(`Could not find line ${e} in file ${t.filename}`);return}t.context_line=r[e];let o=hi(e,n);t.post_context=[];for(let s=e+1;s<=o;s++){let i=r[s];if(i===void 0)break;t.post_context.push(i)}}function _i(e,t){return Math.max(1,e-t)}function hi(e,t){return e+t}function di(e,t){return[_i(e,t),hi(e,t)]}var Rp=((e={})=>{let t=e.frameContextLines!==void 0?e.frameContextLines:lp;return{name:mp,processEvent(n){return bp(n,t)}}}),hr=Rp;var an=Cn(process.versions.node),Si=an.major,aE=an.minor;var yi=require("node:worker_threads");var cn;async function un(){if(cn===void 0)try{cn=!!(await import("node:inspector")).url()}catch{cn=!1}return cn}var St="__SENTRY_ERROR_LOCAL_VARIABLES__";function Ti(e,t,n){let r=0,o=5,s=0;return setInterval(()=>{s===0?r>e&&(o*=2,n(o),o>86400&&(o=86400),s=o):(s-=1,s===0&&t()),r=0},1e3).unref(),()=>{r+=1}}function Ei(e){return e!==void 0&&(e.length===0||e==="?"||e==="<anonymous>")}function pn(e,t){return e===t||`Object.${e}`===t||e===`Object.${t}`||Ei(e)&&Ei(t)}var Ap="LyohIEBzZW50cnkvbm9kZS1jb3JlIDEwLjUzLjEgKGNkOTc0MDgpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPWdsb2JhbFRoaXMsaT17fTtjb25zdCBvPSJfX1NFTlRSWV9FUlJPUl9MT0NBTF9WQVJJQUJMRVNfXyI7Y29uc3QgYT10O2Z1bmN0aW9uIHMoLi4uZSl7YS5kZWJ1ZyYmZnVuY3Rpb24oZSl7aWYoISgiY29uc29sZSJpbiBuKSlyZXR1cm4gZSgpO2NvbnN0IHQ9bi5jb25zb2xlLG89e30sYT1PYmplY3Qua2V5cyhpKTthLmZvckVhY2goZT0+e2NvbnN0IG49aVtlXTtvW2VdPXRbZV0sdFtlXT1ufSk7dHJ5e3JldHVybiBlKCl9ZmluYWxseXthLmZvckVhY2goZT0+e3RbZV09b1tlXX0pfX0oKCk9PmNvbnNvbGUubG9nKCJbTG9jYWxWYXJpYWJsZXMgV29ya2VyXSIsLi4uZSkpfWFzeW5jIGZ1bmN0aW9uIGMoZSx0LG4saSl7Y29uc3Qgbz1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pO2lbbl09by5yZXN1bHQuZmlsdGVyKGU9PiJsZW5ndGgiIT09ZS5uYW1lJiYhaXNOYU4ocGFyc2VJbnQoZS5uYW1lLDEwKSkpLnNvcnQoKGUsdCk9PnBhcnNlSW50KGUubmFtZSwxMCktcGFyc2VJbnQodC5uYW1lLDEwKSkubWFwKGU9PmUudmFsdWU/LnZhbHVlKX1hc3luYyBmdW5jdGlvbiByKGUsdCxuLGkpe2NvbnN0IG89YXdhaXQgZS5wb3N0KCJSdW50aW1lLmdldFByb3BlcnRpZXMiLHtvYmplY3RJZDp0LG93blByb3BlcnRpZXM6ITB9KTtpW25dPW8ucmVzdWx0Lm1hcChlPT5bZS5uYW1lLGUudmFsdWU/LnZhbHVlXSkucmVkdWNlKChlLFt0LG5dKT0+KGVbdF09bixlKSx7fSl9ZnVuY3Rpb24gdShlLHQpe2UudmFsdWUmJigidmFsdWUiaW4gZS52YWx1ZT92b2lkIDA9PT1lLnZhbHVlLnZhbHVlfHxudWxsPT09ZS52YWx1ZS52YWx1ZT90W2UubmFtZV09YDwke2UudmFsdWUudmFsdWV9PmA6dFtlLm5hbWVdPWUudmFsdWUudmFsdWU6ImRlc2NyaXB0aW9uImluIGUudmFsdWUmJiJmdW5jdGlvbiIhPT1lLnZhbHVlLnR5cGU/dFtlLm5hbWVdPWA8JHtlLnZhbHVlLmRlc2NyaXB0aW9ufT5gOiJ1bmRlZmluZWQiPT09ZS52YWx1ZS50eXBlJiYodFtlLm5hbWVdPSI8dW5kZWZpbmVkPiIpKX1hc3luYyBmdW5jdGlvbiBsKGUsdCl7Y29uc3Qgbj1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pLGk9e307Zm9yKGNvbnN0IHQgb2Ygbi5yZXN1bHQpaWYodC52YWx1ZT8ub2JqZWN0SWQmJiJBcnJheSI9PT10LnZhbHVlLmNsYXNzTmFtZSl7Y29uc3Qgbj10LnZhbHVlLm9iamVjdElkO2F3YWl0IGMoZSxuLHQubmFtZSxpKX1lbHNlIGlmKHQudmFsdWU/Lm9iamVjdElkJiYiT2JqZWN0Ij09PXQudmFsdWUuY2xhc3NOYW1lKXtjb25zdCBuPXQudmFsdWUub2JqZWN0SWQ7YXdhaXQgcihlLG4sdC5uYW1lLGkpfWVsc2UgdC52YWx1ZSYmdSh0LGkpO3JldHVybiBpfWxldCBmOyhhc3luYyBmdW5jdGlvbigpe2NvbnN0IHQ9bmV3IGU7dC5jb25uZWN0VG9NYWluVGhyZWFkKCkscygiQ29ubmVjdGVkIHRvIG1haW4gdGhyZWFkIik7bGV0IG49ITE7dC5vbigiRGVidWdnZXIucmVzdW1lZCIsKCk9PntuPSExfSksdC5vbigiRGVidWdnZXIucGF1c2VkIixlPT57bj0hMCxhc3luYyBmdW5jdGlvbihlLHtyZWFzb246dCxkYXRhOntvYmplY3RJZDpufSxjYWxsRnJhbWVzOml9KXtpZigiZXhjZXB0aW9uIiE9PXQmJiJwcm9taXNlUmVqZWN0aW9uIiE9PXQpcmV0dXJuO2lmKGY/LigpLG51bGw9PW4pcmV0dXJuO2NvbnN0IGE9W107Zm9yKGxldCB0PTA7dDxpLmxlbmd0aDt0Kyspe2NvbnN0e3Njb3BlQ2hhaW46bixmdW5jdGlvbk5hbWU6byx0aGlzOnN9PWlbdF0sYz1uLmZpbmQoZT0+ImxvY2FsIj09PWUudHlwZSkscj0iZ2xvYmFsIiE9PXMuY2xhc3NOYW1lJiZzLmNsYXNzTmFtZT9gJHtzLmNsYXNzTmFtZX0uJHtvfWA6bztpZih2b2lkIDA9PT1jPy5vYmplY3Qub2JqZWN0SWQpYVt0XT17ZnVuY3Rpb246cn07ZWxzZXtjb25zdCBuPWF3YWl0IGwoZSxjLm9iamVjdC5vYmplY3RJZCk7YVt0XT17ZnVuY3Rpb246cix2YXJzOm59fX1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuY2FsbEZ1bmN0aW9uT24iLHtmdW5jdGlvbkRlY2xhcmF0aW9uOmBmdW5jdGlvbigpIHsgdGhpcy4ke299ID0gdGhpcy4ke299IHx8ICR7SlNPTi5zdHJpbmdpZnkoYSl9OyB9YCxzaWxlbnQ6ITAsb2JqZWN0SWQ6bn0pLGF3YWl0IGUucG9zdCgiUnVudGltZS5yZWxlYXNlT2JqZWN0Iix7b2JqZWN0SWQ6bn0pfSh0LGUucGFyYW1zKS50aGVuKGFzeW5jKCk9PntuJiZhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpfSxhc3luYyBlPT57biYmYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5yZXN1bWUiKX0pfSksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5lbmFibGUiKTtjb25zdCBpPSExIT09YS5jYXB0dXJlQWxsRXhjZXB0aW9ucztpZihhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6aT8iYWxsIjoidW5jYXVnaHQifSksaSl7Y29uc3QgZT1hLm1heEV4Y2VwdGlvbnNQZXJTZWNvbmR8fDUwO2Y9ZnVuY3Rpb24oZSx0LG4pe2xldCBpPTAsbz01LGE9MDtyZXR1cm4gc2V0SW50ZXJ2YWwoKCk9PnswPT09YT9pPmUmJihvKj0yLG4obyksbz44NjQwMCYmKG89ODY0MDApLGE9byk6KGEtPTEsMD09PWEmJnQoKSksaT0wfSwxZTMpLnVucmVmKCksKCk9PntpKz0xfX0oZSxhc3luYygpPT57cygiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9LGFzeW5jIGU9PntzKGBSYXRlLWxpbWl0IGV4Y2VlZGVkLiBEaXNhYmxpbmcgY2FwdHVyaW5nIG9mIGNhdWdodCBleGNlcHRpb25zIGZvciAke2V9IHNlY29uZHMuYCksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJ1bmNhdWdodCJ9KX0pfX0pKCkuY2F0Y2goZT0+e3MoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSxzZXRJbnRlcnZhbCgoKT0+e30sMWU0KTs=";function Ii(...e){d.log("[LocalVariables]",...e)}var bi=((e={})=>{function t(s,i){let a=(s.stacktrace?.frames||[]).filter(c=>c.function!=="new Promise");for(let c=0;c<a.length;c++){let u=a.length-c-1,p=i[c],f=a[u];if(!f||!p)break;p.vars===void 0||f.in_app===!1&&e.includeOutOfAppFrames!==!0||!pn(f.function,p.function)||(f.vars=p.vars)}}function n(s,i){if(i.originalException&&typeof i.originalException=="object"&&St in i.originalException&&Array.isArray(i.originalException[St])){for(let a of s.exception?.values||[])t(a,i.originalException[St]);i.originalException[St]=void 0}return s}async function r(){let s=await import("node:inspector");s.url()||s.open(0)}function o(s){let i=new yi.Worker(new URL(`data:application/javascript;base64,${Ap}`),{workerData:s,execArgv:[],env:{...process.env,NODE_OPTIONS:void 0}});process.on("exit",()=>{i.terminate()}),i.once("error",a=>{Ii("Worker error",a)}),i.once("exit",a=>{Ii("Worker exit",a)}),i.unref()}return{name:"LocalVariablesAsync",async setup(s){if(!s.getOptions().includeLocalVariables)return;if(await un()){d.warn("Local variables capture has been disabled because the debugger was already enabled");return}let a={...e,debug:d.isEnabled()};r().then(()=>{try{o(a)}catch(c){d.error("Failed to start worker",c)}},c=>{d.error("Failed to start inspector",c)})},processEvent(s,i){return n(s,i)}}});function xi(e){if(e!==void 0)return e.slice(-10).reduce((t,n)=>`${t},${n.function},${n.lineno},${n.colno}`,"")}function Cp(e,t){if(t!==void 0)return xi(e(t,1))}function Ni(e){let t=[],n=!1;function r(i){t=[],!n&&(n=!0,e(i))}t.push(r);function o(i){t.push(i)}function s(i){let a=t.pop()||r;try{a(i)}catch{r(i)}}return{add:o,next:s}}var Sr=class e{constructor(t){this._session=t}static async create(t){if(t)return t;let n=await import("node:inspector");return new e(new n.Session)}configureAndConnect(t,n){this._session.connect(),this._session.on("Debugger.paused",r=>{t(r,()=>{this._session.post("Debugger.resume")})}),this._session.post("Debugger.enable"),this._session.post("Debugger.setPauseOnExceptions",{state:n?"all":"uncaught"})}setPauseOnExceptions(t){this._session.post("Debugger.setPauseOnExceptions",{state:t?"all":"uncaught"})}getLocalVariables(t,n){this._getProperties(t,r=>{let{add:o,next:s}=Ni(n);for(let i of r)if(i.value?.objectId&&i.value.className==="Array"){let a=i.value.objectId;o(c=>this._unrollArray(a,i.name,c,s))}else if(i.value?.objectId&&i.value.className==="Object"){let a=i.value.objectId;o(c=>this._unrollObject(a,i.name,c,s))}else i.value&&o(a=>this._unrollOther(i,a,s));s({})})}_getProperties(t,n){this._session.post("Runtime.getProperties",{objectId:t,ownProperties:!0},(r,o)=>{n(r?[]:o.result)})}_unrollArray(t,n,r,o){this._getProperties(t,s=>{r[n]=s.filter(i=>i.name!=="length"&&!isNaN(parseInt(i.name,10))).sort((i,a)=>parseInt(i.name,10)-parseInt(a.name,10)).map(i=>i.value?.value),o(r)})}_unrollObject(t,n,r,o){this._getProperties(t,s=>{r[n]=s.map(i=>[i.name,i.value?.value]).reduce((i,[a,c])=>(i[a]=c,i),{}),o(r)})}_unrollOther(t,n,r){t.value&&("value"in t.value?t.value.value===void 0||t.value.value===null?n[t.name]=`<${t.value.value}>`:n[t.name]=t.value.value:"description"in t.value&&t.value.type!=="function"?n[t.name]=`<${t.value.description}>`:t.value.type==="undefined"&&(n[t.name]="<undefined>")),r(n)}},vp="LocalVariables",Op=((e={},t)=>{let n=new pe(20),r,o=!1;function s(u){let p=xi(u.stacktrace?.frames);if(p===void 0)return;let f=n.remove(p);if(f===void 0)return;let l=(u.stacktrace?.frames||[]).filter(m=>m.function!=="new Promise");for(let m=0;m<l.length;m++){let _=l.length-m-1,S=f[m],E=l[_];if(!E||!S)break;S.vars===void 0||E.in_app===!1&&e.includeOutOfAppFrames!==!0||!pn(E.function,S.function)||(E.vars=S.vars)}}function i(u){for(let p of u.exception?.values||[])s(p);return u}let a;async function c(){let p=T()?.getOptions();if(!p?.includeLocalVariables)return;if(Si<18){d.log("The `LocalVariables` integration is only supported on Node >= v18.");return}if(await un()){d.warn("Local variables capture has been disabled because the debugger was already enabled");return}try{let l=await Sr.create(t),m=(S,{params:{reason:E,data:N,callFrames:C}},Z)=>{if(E!=="exception"&&E!=="promiseRejection"){Z();return}r?.();let Te=Cp(S,N.description);if(Te==null){Z();return}let{add:Ie,next:de}=Ni(k=>{n.set(Te,k),Z()});for(let k=0;k<Math.min(C.length,5);k++){let{scopeChain:$i,functionName:Cr,this:mn}=C[k],vr=$i.find(ye=>ye.type==="local"),Or=mn.className==="global"||!mn.className?Cr:`${mn.className}.${Cr}`;if(vr?.object.objectId===void 0)Ie(ye=>{ye[k]={function:Or},de(ye)});else{let ye=vr.object.objectId;Ie(Lr=>l.getLocalVariables(ye,Vi=>{Lr[k]={function:Or,vars:Vi},de(Lr)}))}}de([])},_=e.captureAllExceptions!==!1;if(l.configureAndConnect((S,E)=>m(p.stackParser,S,E),_),_){let S=e.maxExceptionsPerSecond||50;r=Ti(S,()=>{d.log("Local variables rate-limit lifted."),l.setPauseOnExceptions(!0)},E=>{d.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${E} seconds.`),l.setPauseOnExceptions(!1)})}o=!0}catch(l){d.log("The `LocalVariables` integration failed to start.",l)}}return{name:vp,setupOnce(){a=c()},async processEvent(u){return await a,o?i(u):u},_getCachedFramesCount(){return n.size},_getFirstCachedFrame(){return n.values()[0]}}}),Ri=Op;var Er=(e={})=>an.major<19?Ri(e):bi(e);function Ai(){try{return typeof module<"u"&&typeof module.exports<"u"}catch{return!1}}var Ci=require("worker_threads");var Lp=2e3;function Et(e){x(()=>{console.error(e)});let t=T();if(t===void 0){A&&d.warn("No NodeClient was defined, we are exiting the process now."),global.process.exit(1);return}let n=t.getOptions(),r=n?.shutdownTimeout&&n.shutdownTimeout>0?n.shutdownTimeout:Lp;t.close(r).then(o=>{o||A&&d.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},o=>{A&&d.error(o)})}var Mp="OnUncaughtException",Tr=(e={})=>{let t={exitEvenIfOtherHandlersAreRegistered:!1,...e};return{name:Mp,setup(n){Ci.isMainThread&&global.process.on("uncaughtException",Up(n,t))}}};function Up(e,t){let r=!1,o=!1,s=!1,i,a=e.getOptions();return Object.assign(c=>{let u=Et;t.onFatalError?u=t.onFatalError:a.onFatalError&&(u=a.onFatalError);let f=global.process.listeners("uncaughtException").filter(m=>m.name!=="domainUncaughtExceptionClear"&&m.tag!=="sentry_tracingErrorCallback"&&m._errorHandler!==!0).length===0,l=t.exitEvenIfOtherHandlersAreRegistered||f;r?l&&(s?(A&&d.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),Et(c)):o||(o=!0,setTimeout(()=>{s||(s=!0,u(i,c))},2e3))):(i=c,r=!0,T()===e&&ce(c,{originalException:c,captureContext:{level:"fatal"},mechanism:{handled:!1,type:"auto.node.onuncaughtexception"}}),!s&&l&&(s=!0,u(c)))},{_errorHandler:!0})}var kp="OnUnhandledRejection",Pp=[{name:"AI_NoOutputGeneratedError"},{name:"AbortError"}],Dp=((e={})=>{let t={mode:e.mode??"warn",ignore:[...Pp,...e.ignore??[]]};return{name:kp,setup(n){global.process.on("unhandledRejection",Gp(n,t))}}}),Ir=Dp;function wp(e){if(typeof e!="object"||e===null)return{name:"",message:String(e??"")};let t=e,n=typeof t.name=="string"?t.name:"",r=typeof t.message=="string"?t.message:String(e);return{name:n,message:r}}function Fp(e,t){let n=e.name===void 0||$(t.name,e.name,!0),r=e.message===void 0||$(t.message,e.message);return n&&r}function Bp(e,t){let n=wp(t);return e.some(r=>Fp(r,n))}function Gp(e,t){return function(r,o){if(T()!==e||Bp(t.ignore??[],r))return;let s=t.mode==="strict"?"fatal":"error",i=r&&typeof r=="object"?r._sentry_active_span:void 0;(i?c=>$t(i,c):c=>c())(()=>{ce(r,{originalException:r,captureContext:{extra:{unhandledPromiseRejection:!0},level:s},mechanism:{handled:!1,type:"auto.node.onunhandledrejection"}})}),Hp(r,t.mode)}}function Hp(e,t){let n="This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:";t==="warn"?x(()=>{console.warn(n),console.error(e&&typeof e=="object"&&"stack"in e?e.stack:e)}):t==="strict"&&(x(()=>{console.warn(n)}),Et(e))}var vi=U(require("node:http"),1);var yr="Spotlight",Yp=((e={})=>{let t={sidecarUrl:e.sidecarUrl||"http://localhost:8969/stream"};return{name:yr,setup(n){try{process.env.NODE_ENV&&process.env.NODE_ENV!=="development"&&d.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?")}catch{}Wp(n,t)}}}),Oi=Yp;function Wp(e,t){let n=$p(t.sidecarUrl);if(!n)return;let r=0;e.on("beforeEnvelope",o=>{if(r>3){d.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests");return}let s=at(o);Fe(()=>{let i=vi.request({method:"POST",path:n.pathname,hostname:n.hostname,port:n.port,headers:{"Content-Type":"application/x-sentry-envelope"}},a=>{a.statusCode&&a.statusCode>=200&&a.statusCode<400&&(r=0),a.on("data",()=>{}),a.on("end",()=>{}),a.setEncoding("utf8")});i.on("error",()=>{r++,d.warn("[Spotlight] Failed to send envelope to Spotlight Sidecar")}),i.write(s),i.end()})})}function $p(e){try{return new URL(`${e}`)}catch{d.warn(`[Spotlight] Invalid sidecar URL: ${e}`);return}}var br=(e={})=>({name:"Console",setup(t){process.env.LAMBDA_TASK_ROOT&&J("console",Vp),dr({...e,filter:[...e.filter||[],"[DEP0205] DeprecationWarning"]}).setup?.(t)}});function Vp(){let e=h?.console;e&&le.forEach(t=>{t in e&&jp(e,t)})}function jp(e,t){let n=e[t];F[t]=n;let r=n,o,s=!1,i=function(...c){if(s){n.apply(e,c);return}s=!0;try{W("console",{args:c,level:t}),r.apply(e,c)}finally{s=!1}};Ct(i,n);let a=n.bind(e);F[t]=a;try{let c=i;Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){return c},set(u){u===i?(o!==void 0&&(r=o,o=void 0),c=i):u===a?(o=r,c=a):typeof u=="function"&&!u.__sentry_original__?(r=u,c=i):c=u}})}catch{Ze(e,t,function(c){return F[t]=c,function(...u){W("console",{args:u,level:t}),F[t]?.apply(this,u)}})}}var fn=require("node:path");function Li(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function Mi(e=process.argv[1]?fr(process.argv[1]):process.cwd(),t=fn.sep==="\\"){let n=t?Li(e):e;return r=>{if(!r)return;let o=t?Li(r):r,{dir:s,base:i,ext:a}=fn.posix.parse(o);(a===".js"||a===".mjs"||a===".cjs")&&(i=i.slice(0,a.length*-1));let c=decodeURIComponent(i);s||(s=".");let u=s.lastIndexOf("/node_modules");if(u>-1)return`${s.slice(u+14).replace(/\//g,".")}:${c}`;if(s.startsWith(n)){let p=s.slice(n.length+1).replace(/\//g,".");return p?`${p}:${c}`:c}return c}}function Ui(e){if(process.env.SENTRY_RELEASE)return process.env.SENTRY_RELEASE;if(h.SENTRY_RELEASE?.id)return h.SENTRY_RELEASE.id;let t=process.env.GITHUB_SHA||process.env.CI_MERGE_REQUEST_SOURCE_BRANCH_SHA||process.env.CI_BUILD_REF||process.env.CI_COMMIT_SHA||process.env.BITBUCKET_COMMIT,n=process.env.APPVEYOR_PULL_REQUEST_HEAD_COMMIT||process.env.APPVEYOR_REPO_COMMIT||process.env.CODEBUILD_RESOLVED_SOURCE_VERSION||process.env.AWS_COMMIT_ID||process.env.BUILD_SOURCEVERSION||process.env.GIT_CLONE_COMMIT_HASH||process.env.BUDDY_EXECUTION_REVISION||process.env.BUILDKITE_COMMIT||process.env.CIRCLE_SHA1||process.env.CIRRUS_CHANGE_IN_REPO||process.env.CF_REVISION||process.env.CM_COMMIT||process.env.CF_PAGES_COMMIT_SHA||process.env.DRONE_COMMIT_SHA||process.env.FC_GIT_COMMIT_SHA||process.env.HEROKU_TEST_RUN_COMMIT_VERSION||process.env.HEROKU_BUILD_COMMIT||process.env.HEROKU_SLUG_COMMIT||process.env.RAILWAY_GIT_COMMIT_SHA||process.env.RENDER_GIT_COMMIT||process.env.SEMAPHORE_GIT_SHA||process.env.TRAVIS_PULL_REQUEST_SHA||process.env.VERCEL_GIT_COMMIT_SHA||process.env.VERCEL_GITHUB_COMMIT_SHA||process.env.VERCEL_GITLAB_COMMIT_SHA||process.env.VERCEL_BITBUCKET_COMMIT_SHA||process.env.ZEIT_GITHUB_COMMIT_SHA||process.env.ZEIT_GITLAB_COMMIT_SHA||process.env.ZEIT_BITBUCKET_COMMIT_SHA,r=process.env.CI_COMMIT_ID||process.env.SOURCE_COMMIT||process.env.SOURCE_VERSION||process.env.GIT_COMMIT||process.env.COMMIT_REF||process.env.BUILD_VCS_NUMBER||process.env.CI_COMMIT_SHA;return t||n||r||e}var ki=xt(lr(Mi()));var Zp=U(require("node:http"),1),Jp=U(require("node:https"),1),wi=require("node:stream"),Fi=require("node:zlib");var ee=U(require("node:net"),1),Nr=U(require("node:tls"),1);var xr=U(require("node:http"),1);var j=Symbol("AgentBaseInternalState"),dn=class extends xr.Agent{constructor(t){super(t),this[j]={}}isSecureEndpoint(t){if(t){if(typeof t.secureEndpoint=="boolean")return t.secureEndpoint;if(typeof t.protocol=="string")return t.protocol==="https:"}let{stack:n}=new Error;return typeof n!="string"?!1:n.split(`
16
16
  `).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}createSocket(t,n,r){let o={...n,secureEndpoint:this.isSecureEndpoint(n)};Promise.resolve().then(()=>this.connect(t,o)).then(s=>{if(s instanceof xr.Agent)return s.addRequest(t,o);this[j].currentSocket=s,super.createSocket(t,n,r)},r)}createConnection(){let t=this[j].currentSocket;if(this[j].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[j].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){this[j]&&(this[j].defaultPort=t)}get protocol(){return this[j].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[j]&&(this[j].protocol=t)}};function ln(...e){d.log("[https-proxy-agent:parse-proxy-response]",...e)}function Pi(e){return new Promise((t,n)=>{let r=0,o=[];function s(){let p=e.read();p?u(p):e.once("readable",s)}function i(){e.removeListener("end",a),e.removeListener("error",c),e.removeListener("readable",s)}function a(){i(),ln("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function c(p){i(),ln("onerror %o",p),n(p)}function u(p){o.push(p),r+=p.length;let f=Buffer.concat(o,r),l=f.indexOf(`\r
17
17
  \r
18
18
  `);if(l===-1){ln("have not received end of HTTP headers yet..."),s();return}let m=f.subarray(0,l).toString("ascii").split(`\r
package/build/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
- import qp from"node:os";import*as qs from"node:os";var g=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var h=globalThis;var H="10.53.0";function k(){return ee(h),h}function ee(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||H,t[H]=t[H]||{}}function D(e,t,n=h){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[H]=r[H]||{};return o[e]||(o[e]=t())}var de=["debug","info","warn","error","log","assert","trace"],Oi="Sentry Logger ",w={};function x(e){if(!("console"in h))return e();let t=h.console,n={},r=Object.keys(w);r.forEach(o=>{let s=w[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Li(){fn().enabled=!0}function Mi(){fn().enabled=!1}function Nr(){return fn().enabled}function Ui(...e){pn("log",...e)}function ki(...e){pn("warn",...e)}function Pi(...e){pn("error",...e)}function pn(e,...t){g&&Nr()&&x(()=>{h.console[e](`${Oi}[${e}]:`,...t)})}function fn(){return g?D("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var d={enable:Li,disable:Mi,isEnabled:Nr,log:Ui,warn:ki,error:Pi};var Rr=/\(error: (.*)\)/,Ar=/captureMessage|captureException/;function yt(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{let s=[],i=n.split(`
1
+ import qp from"node:os";import*as qs from"node:os";var g=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var h=globalThis;var H="10.53.1";function k(){return ee(h),h}function ee(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||H,t[H]=t[H]||{}}function D(e,t,n=h){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[H]=r[H]||{};return o[e]||(o[e]=t())}var de=["debug","info","warn","error","log","assert","trace"],Oi="Sentry Logger ",w={};function x(e){if(!("console"in h))return e();let t=h.console,n={},r=Object.keys(w);r.forEach(o=>{let s=w[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Li(){fn().enabled=!0}function Mi(){fn().enabled=!1}function Nr(){return fn().enabled}function Ui(...e){pn("log",...e)}function ki(...e){pn("warn",...e)}function Pi(...e){pn("error",...e)}function pn(e,...t){g&&Nr()&&x(()=>{h.console[e](`${Oi}[${e}]:`,...t)})}function fn(){return g?D("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var d={enable:Li,disable:Mi,isEnabled:Nr,log:Ui,warn:ki,error:Pi};var Rr=/\(error: (.*)\)/,Ar=/captureMessage|captureException/;function yt(...e){let t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0,o=0)=>{let s=[],i=n.split(`
2
2
  `);for(let a=r;a<i.length;a++){let c=i[a];c.length>1024&&(c=c.slice(0,1024));let u=Rr.test(c)?c.replace(Rr,"$1"):c;if(!u.includes("Error: ")){for(let p of t){let f=p(u);if(f){s.push(f);break}}if(s.length>=50+o)break}}return Cr(s.slice(o))}}function ln(e){return Array.isArray(e)?yt(...e):e}function Cr(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(It(t).function||"")&&t.pop(),t.reverse(),Ar.test(It(t).function||"")&&(t.pop(),Ar.test(It(t).function||"")&&t.pop()),t.slice(0,50).map(n=>({...n,filename:n.filename||It(t).filename,function:n.function||"?"}))}function It(e){return e[e.length-1]||{}}var dn="<anonymous>";function We(e){try{return!e||typeof e!="function"?dn:e.name||dn}catch{return dn}}function bt(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function vr(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var $e={},Or={};function le(e,t){return $e[e]=$e[e]||[],$e[e].push(t),()=>{let n=$e[e];if(n){let r=n.indexOf(t);r!==-1&&n.splice(r,1)}}}function z(e,t){if(!Or[e]){Or[e]=!0;try{t()}catch(n){g&&d.error(`Error while instrumenting ${e}`,n)}}}function Y(e,t){let n=e&&$e[e];if(n)for(let r of n)try{r(t)}catch(o){g&&d.error(`Error while triggering instrumentation handler.
3
3
  Type: ${e}
4
4
  Name: ${We(r)}
5
5
  Error:`,o)}}var mn=null;function Lr(e){let t="error";le(t,e),z(t,Di)}function Di(){mn=h.onerror,h.onerror=function(e,t,n,r,o){return Y("error",{column:r,error:o,line:n,msg:e,url:t}),mn?mn.apply(this,arguments):!1},h.onerror.__SENTRY_INSTRUMENTED__=!0}var gn=null;function Mr(e){let t="unhandledrejection";le(t,e),z(t,wi)}function wi(){gn=h.onunhandledrejection,h.onunhandledrejection=function(e){return Y("unhandledrejection",e),gn?gn.apply(this,arguments):!0},h.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var Ur=Object.prototype.toString;function Ve(e){switch(Ur.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return J(e,Error)}}function xt(e,t){return Ur.call(e)===`[object ${t}]`}function kr(e){return xt(e,"ErrorEvent")}function me(e){return xt(e,"String")}function je(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ye(e){return e===null||je(e)||typeof e!="object"&&typeof e!="function"}function te(e){return xt(e,"Object")}function Pr(e){return typeof Event<"u"&&J(e,Event)}function Dr(e){return typeof Element<"u"&&J(e,Element)}function wr(e){return xt(e,"RegExp")}function Z(e){return!!(e?.then&&typeof e.then=="function")}function Fr(e){return te(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function J(e,t){try{return e instanceof t}catch{return!1}}function Nt(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}var Fi=h,Bi=80;function Br(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,o=[],s=0,i=0,a=" > ",c=a.length,u,p=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||Bi;for(;n&&s++<r&&(u=Gi(n,p),!(u==="html"||s>1&&i+o.length*c+u.length>=f));)o.push(u),i+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function Gi(e,t){let n=e,r=[];if(!n?.tagName)return"";if(Fi.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());let o=t?.length?t.filter(s=>n.getAttribute(s)).map(s=>[s,n.getAttribute(s)]):null;if(o?.length)o.forEach(s=>{r.push(`[${s[0]}="${s[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let s=n.className;if(s&&me(s)){let i=s.split(/\s+/);for(let a of i)r.push(`.${a}`)}}for(let s of["aria-label","type","name","title","alt"]){let i=n.getAttribute(s);i&&r.push(`[${s}="${i}"]`)}return r.join("")}function ze(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!="function")return;let o=n(r);typeof o=="function"&&Rt(o,r);try{e[t]=o}catch{g&&d.log(`Failed to replace method "${t}" in object`,e)}}function be(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{g&&d.log(`Failed to add non-enumerable property "${String(t)}" to object`,e)}}function Rt(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,be(e,"__sentry_original__",t)}catch{}}function _n(e){return e.__sentry_original__}function At(e){if(Ve(e))return{message:e.message,name:e.name,stack:e.stack,...Hr(e)};if(Pr(e)){let t={type:e.type,target:Gr(e.target),currentTarget:Gr(e.currentTarget),...Hr(e)};return typeof CustomEvent<"u"&&J(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Gr(e){try{return Dr(e)?Br(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Hr(e){return typeof e=="object"&&e!==null?Object.fromEntries(Object.entries(e)):{}}function hn(e){let t=Object.keys(At(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}var xe;function Ne(e){if(xe!==void 0)return xe?xe(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=h;return t in n&&typeof n[t]=="function"?(xe=n[t],xe(e)):(xe=null,e())}function P(){return Ne(()=>Math.random())}function Re(){return Ne(()=>Date.now())}function Ae(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Sn(e,t){let n=e,r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let s=Math.min(o+140,r);return s>r-5&&(s=r),s===r&&(o=Math.max(s-140,0)),n=n.slice(o,s),o>0&&(n=`'{snip} ${n}`),s<r&&(n+=" {snip}"),n}function En(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let o=e[r];try{Nt(o)?n.push(bt(o)):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function W(e,t,n=!1){return me(e)?wr(t)?t.test(e):me(t)?n?e===t:e.includes(t):typeof t=="function"?t(e):!1:!1}function ne(e,t=[],n=!1){for(let r of t)if(W(e,r,n))return!0;return!1}function Hi(){let e=h;return e.crypto||e.msCrypto}var Tn;function Yi(){return P()*16}function b(e=Hi()){try{if(e?.randomUUID)return Ne(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Tn||(Tn="10000000100040008000"+1e11),Tn.replace(/[018]/g,t=>(t^(Yi()&15)>>t/4).toString(16))}function Yr(e){return e.exception?.values?.[0]}function re(e){let{message:t,event_id:n}=e;if(t)return t;let r=Yr(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function yn(e,t,n){let r=e.exception=e.exception||{},o=r.values=r.values||[],s=o[0]=o[0]||{};s.value||(s.value=t||""),s.type||(s.type=n||"Error")}function Ce(e,t){let n=Yr(e);if(!n)return;let r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism={...r,...o,...t},t&&"data"in t){let s={...o?.data,...t.data};n.mechanism.data=s}}var Wi=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;function In(e){return parseInt(e||"",10)}function bn(e){let t=e.match(Wi)||[],n=In(t[1]),r=In(t[2]),o=In(t[3]);return{buildmetadata:t[5],major:isNaN(n)?void 0:n,minor:isNaN(r)?void 0:r,patch:isNaN(o)?void 0:o,prerelease:t[4]}}function Ct(e){if(Wr(e))return!0;try{be(e,"__sentry_captured__",!0)}catch{}return!1}function Wr(e){try{return e.__sentry_captured__}catch{}}var Vr=1e3;function X(){return Re()/Vr}function $i(){let{performance:e}=h;if(!e?.now||!e.timeOrigin)return X;let t=e.timeOrigin;return()=>(t+Ne(()=>e.now()))/Vr}var $r;function vt(){return($r??($r=$i()))()}function Ze(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||vt(),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:b()),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 n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function oe(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 o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=oe(r[o],t[o],n-1));return r}function Je(){return b()}function Xe(){return b().substring(16)}var xn="_sentrySpan";function Ke(e,t){t?be(e,xn,t):delete e[xn]}function ve(e){return e[xn]}var Vi=100,O=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._attributes={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Je(),sampleRand:P()}}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._attributes={...this._attributes},t._extra={...this._extra},t._contexts={...this._contexts},this._contexts.flags&&(t._contexts.flags={values:[...this._contexts.flags.values]}),t._user=this._user,t._level=this._level,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t._lastEventId=this._lastEventId,t._conversationId=this._conversationId,Ke(t,ve(this)),t}setClient(t){this._client=t}setLastEventId(t){this._lastEventId=t}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&Ze(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setConversationId(t){return this._conversationId=t||void 0,this._notifyScopeListeners(),this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this._attributes={...this._attributes,...t},this._notifyScopeListeners(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this._attributes&&(delete this._attributes[t],this._notifyScopeListeners()),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;let n=typeof t=="function"?t(this):t,r=n instanceof e?n.getScopeData():te(n)?t:void 0,{tags:o,attributes:s,extra:i,user:a,contexts:c,level:u,fingerprint:p=[],propagationContext:f,conversationId:l}=r||{};return this._tags={...this._tags,...o},this._attributes={...this._attributes,...s},this._extra={...this._extra,...i},this._contexts={...this._contexts,...c},a&&Object.keys(a).length&&(this._user=a),u&&(this._level=u),p.length&&(this._fingerprint=p),f&&(this._propagationContext=f),l&&(this._conversationId=l),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Ke(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Je(),sampleRand:P()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:Vi;if(r<=0)return this;let o={timestamp:X(),...t,message:t.message?Ae(t.message,2048):t.message};return this._breadcrumbs.push(o),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),this._client?.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,attributes:this._attributes,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:ve(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=oe(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n?.event_id||b();if(!this._client)return g&&d.warn("No client configured on scope - will not capture exception!"),r;let o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){let o=r?.event_id||b();if(!this._client)return g&&d.warn("No client configured on scope - will not capture message!"),o;let s=r?.syntheticException??new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:s,...r,event_id:o},this),o}captureEvent(t,n){let r=t.event_id||n?.event_id||b();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(g&&d.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function qe(){return D("defaultCurrentScope",()=>new O)}function Qe(){return D("defaultIsolationScope",()=>new O)}var jr=e=>e instanceof Promise&&!e[zr],zr=Symbol("chained PromiseLike"),Zr=(e,t,n)=>{let r=e.then(o=>(t(o),o),o=>{throw n(o),o});return jr(r)&&jr(e)?r:ji(e,r)},ji=(e,t)=>{if(!t)return e;let n=!1;for(let r in e){if(r in t)continue;n=!0;let o=e[r];typeof o=="function"?Object.defineProperty(t,r,{value:(...s)=>o.apply(e,s),enumerable:!0,configurable:!0,writable:!0}):t[r]=o}return n&&Object.assign(t,{[zr]:!0}),t};var Nn=class{constructor(t,n){let r;t?r=t:r=new O;let o;n?o=n:o=new O,this._stack=[{scope:r}],this._isolationScope=o}withScope(t){let n=this._pushScope(),r;try{r=t(n)}catch(o){throw this._popScope(),o}return Z(r)?Zr(r,()=>this._popScope(),()=>this._popScope()):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){let t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return this._stack.length<=1?!1:!!this._stack.pop()}};function Oe(){let e=k(),t=ee(e);return t.stack=t.stack||new Nn(qe(),Qe())}function zi(e){return Oe().withScope(e)}function Zi(e,t){let n=Oe();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Jr(e){return Oe().withScope(()=>e(Oe().getIsolationScope()))}function Xr(){return{withIsolationScope:Jr,withScope:zi,withSetScope:Zi,withSetIsolationScope:(e,t)=>Jr(t),getCurrentScope:()=>Oe().getScope(),getIsolationScope:()=>Oe().getIsolationScope()}}function Rn(e){let t=k(),n=ee(t);n.acs=e}function se(e){let t=ee(e);return t.acs?t.acs:Xr()}function Ji(e){return typeof e=="object"&&e!=null&&!Array.isArray(e)&&Object.keys(e).includes("value")}function Xi(e,t){let{value:n,unit:r}=Ji(e)?e:{value:e,unit:void 0},o=Ki(n),s=r&&typeof r=="string"?{unit:r}:{};if(o)return{...o,...s};if(!t||t==="skip-undefined"&&n===void 0)return;let i="";try{i=JSON.stringify(n)??""}catch{}return{value:i,type:"string",...s}}function An(e,t=!1){let n={};for(let[r,o]of Object.entries(e??{})){let s=Xi(o,t);s&&(n[r]=s)}return n}function Cn(e){if(!e)return 0;let t=0;for(let[n,r]of Object.entries(e)){t+=n.length*2,t+=r.type.length*2,t+=(r.unit?.length??0)*2;let o=r.value;Array.isArray(o)?t+=Kr(o[0])*o.length:ye(o)?t+=Kr(o):t+=100}return t}function Kr(e){return typeof e=="string"?e.length*2:typeof e=="boolean"?4:typeof e=="number"?8:0}function Ki(e){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 qi;function qr(){return qi?.()}function v(){let e=k();return se(e).getCurrentScope()}function L(){let e=k();return se(e).getIsolationScope()}function Ot(){return D("globalScope",()=>new O)}function ge(...e){let t=k(),n=se(t);if(e.length===2){let[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function T(){return v().getClient()}function et(e){let t=qr();if(t)return{trace_id:t.traceId,span_id:t.spanId};let n=e.getPropagationContext(),{traceId:r,parentSpanId:o,propagationSpanId:s}=n,i={trace_id:r,span_id:s||Xe()};return o&&(i.parent_span_id=o),i}var F="sentry.source",vn="sentry.sample_rate",Qr="sentry.previous_trace_sample_rate",B="sentry.op",On="sentry.origin";var eo="sentry.release",to="sentry.environment",no="sentry.segment.name",ro="sentry.segment.id",oo="sentry.sdk.name",so="sentry.sdk.version",io="user.id",ao="user.email",Lt="user.ip_address",co="user.name",Mt="sentry.custom_span_name",Ln="sentry.profile_id",Mn="sentry.exclusive_time";function uo(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}var Qi="_sentryScope",ea="_sentryIsolationScope";function Le(e){let t=e;return{scope:t[Qi],isolationScope:uo(t[ea])}}var po="sentry-";function Ut(e){let t=ta(e);if(!t)return;let n=Object.entries(t).reduce((r,[o,s])=>{if(o.startsWith(po)){let i=o.slice(po.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function ta(e){if(!(!e||!me(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=fo(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):fo(e)}function fo(e){return e.split(",").map(t=>{let n=t.indexOf("=");if(n===-1)return[];let r=t.slice(0,n),o=t.slice(n+1);return[r,o].map(s=>{try{return decodeURIComponent(s.trim())}catch{return}})}).reduce((t,[n,r])=>(n&&r&&(t[n]=r),t),{})}var na=/^o(\d+)\./,ra=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function oa(e){return e==="http"||e==="https"}function M(e,t=!1){let{host:n,path:r,pass:o,port:s,projectId:i,protocol:a,publicKey:c}=e;return`${a}://${c}${t&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r&&`${r}/`}${i}`}function sa(e){let t=ra.exec(e);if(!t){x(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,o="",s="",i="",a=""]=t.slice(1),c="",u=a,p=u.split("/");if(p.length>1&&(c=p.slice(0,-1).join("/"),u=p.pop()),u){let f=u.match(/^\d+/);f&&(u=f[0])}return lo({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function lo(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function ia(e){if(!g)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(d.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?oa(r)?t&&isNaN(parseInt(t,10))?(d.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(d.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(d.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function aa(e){return e.match(na)?.[1]}function mo(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=aa(n)),r}function go(e){let t=typeof e=="string"?sa(e):lo(e);if(!(!t||!ia(t)))return t}function tt(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 _o=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ho(e){if(!e)return;let t=e.match(_o);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function Un(e,t){let n=ho(e),r=Ut(t);if(!n?.traceId)return{traceId:Je(),sampleRand:P()};let o=ca(n,r);r&&(r.sample_rand=o.toString());let{traceId:s,parentSpanId:i,parentSampled:a}=n;return{traceId:s,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:o}}function ca(e,t){let n=tt(t?.sample_rand);if(n!==void 0)return n;let r=tt(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?P()*r:r+P()*(1-r):P()}var kn=1,So=!1;function Pt(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:Me(e).parent_span_id,s=Le(e).scope,i=r?s?.getPropagationContext().propagationSpanId||Xe():t;return{parent_span_id:o,span_id:i,trace_id:n}}function fa(e){if(e&&e.length>0)return e.map(({context:{spanId:t,traceId:n,traceFlags:r,...o},attributes:s})=>({span_id:t,trace_id:n,sampled:r===kn,attributes:s,...o}))}function da(e){if(e?.length)return e.map(({context:{spanId:t,traceId:n,traceFlags:r},attributes:o})=>({span_id:t,trace_id:n,sampled:r===kn,attributes:o}))}function kt(e){return typeof e=="number"?Eo(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Eo(e.getTime()):vt()}function Eo(e){return e>9999999999?e/1e3:e}function Me(e){if(yo(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Io(e)){let{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:To(e),start_timestamp:kt(o),timestamp:kt(i)||void 0,status:la(a),op:r[B],origin:r[On],links:fa(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Pn(e){if(yo(e))return e.getStreamedSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Io(e)){let{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e;return{name:s,span_id:t,trace_id:n,parent_span_id:To(e),start_timestamp:kt(o),end_timestamp:kt(i),is_segment:e===nt(e),status:ma(a),attributes:r,links:da(c)}}return{span_id:t,trace_id:n,start_timestamp:0,name:"",end_timestamp:0,status:"ok",is_segment:e===nt(e)}}function To(e){return"parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0}function Dt(e){return{...e,attributes:An(e.attributes),links:e.links?.map(t=>({...t,attributes:An(t.attributes)}))}}function Io(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function yo(e){return typeof e.getSpanJSON=="function"}function wt(e){let{traceFlags:t}=e.spanContext();return t===kn}function la(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}function ma(e){return!e||e.code===1||e.code===0||e.message==="cancelled"?"ok":"error"}var ga="_sentryRootSpan";var _e=nt;function nt(e){return e[ga]||e}function rt(){let e=k(),t=se(e);return t.getActiveSpan?t.getActiveSpan():ve(v())}function ot(){So||(x(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),So=!0)}var bo=!1;function xo(){if(bo)return;function e(){let t=rt(),n=t&&_e(t);if(n){let r="internal_error";g&&d.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:2,message:r})}}e.tag="sentry_tracingErrorCallback",bo=!0,Lr(e),Mr(e)}function No(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||T()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Ro(e){d.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function Dn(e,t){if(!t?.length)return!1;for(let n of t){if(ha(n)){if(e.description&&W(e.description,n))return g&&Ro(e),!0;continue}let r=!!n.attributes&&Object.keys(n.attributes).length>0;if(!n.name&&!n.op&&!r)continue;let o=n.name?e.description&&W(e.description,n.name):!0,s=n.op?e.op&&W(e.op,n.op):!0,i=n.attributes?Object.entries(n.attributes).every(([a,c])=>_a(e.attributes?.[a],c)):!0;if(o&&s&&i)return g&&Ro(e),!0}return!1}function _a(e,t){return typeof e=="string"&&(typeof t=="string"||t instanceof RegExp)?W(e,t):Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((n,r)=>n===t[r]):e===t}function Ao(e,t){let n=t.parent_span_id,r=t.span_id;if(n)for(let o of e)o.parent_span_id===r&&(o.parent_span_id=n)}function ha(e){return typeof e=="string"||e instanceof RegExp}var Ue="production";var Sa="_frozenDsc";function Co(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||Ue,release:n.release,public_key:r,trace_id:e,org_id:mo(t)};return t.emit("createDsc",o),o}function Ft(e,t){let n=t.getPropagationContext();return n.dsc||Co(n.traceId,e)}function ke(e){let t=T();if(!t)return{};let n=_e(e),r=Me(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[vn]??o[Qr];function a(_){return(typeof i=="number"||typeof i=="string")&&(_.sample_rate=`${i}`),_}let c=n[Sa];if(c)return a(c);let u=s?.get("sentry.dsc"),p=u&&Ut(u);if(p)return a(p);let f=Co(e.spanContext().traceId,t),l=o[F]??o["sentry.span.source"],m=r.description;return l!=="url"&&m&&(f.transaction=m),No()&&(f.sampled=String(wt(n)),f.sample_rand=s?.get("sentry.sample_rand")??Le(n).scope?.getPropagationContext().sampleRand.toString()),a(f),t.emit("createDsc",f,n),f}function Pe(e){return!!e&&typeof e=="function"&&"_streamed"in e&&!!e._streamed}var Ea=Symbol.for("sentry.skipNormalization"),Ta=Symbol.for("sentry.overrideNormalizationDepth");function vo(e){return!!e[Ea]}function Oo(e){let t=e[Ta];return typeof t=="number"?t:void 0}function G(e,t=100,n=1/0){try{return wn("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Fn(e,t=3,n=100*1024){let r=G(e,t);return xa(r)>n?Fn(e,t-1,n):r}function wn(e,t,n=1/0,r=1/0,o=Na()){let[s,i]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let a=Ia(e,t);if(!a.startsWith("[object "))return a;if(vo(t))return t;let c=Oo(t),u=c!==void 0?c:n;if(u===0)return a.replace("object ","");if(s(t))return"[Circular ~]";let p=t;if(p&&typeof p.toJSON=="function")try{let _=p.toJSON();return wn("",_,u-1,r,o)}catch{}let f=Array.isArray(t)?[]:{},l=0,m=At(t);for(let _ in m){if(!Object.prototype.hasOwnProperty.call(m,_))continue;if(l>=r){f[_]="[MaxProperties ~]";break}let S=m[_];f[_]=wn(_,S,u-1,r,o),l++}return i(t),f}function Ia(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(Nt(t))return bt(t);if(Fr(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${We(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=ya(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function ya(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function ba(e){return~-encodeURI(e).split(/%..|./).length}function xa(e){return ba(JSON.stringify(e))}function Na(){let e=new WeakSet;function t(r){return e.has(r)?!0:(e.add(r),!1)}function n(r){e.delete(r)}return[t,n]}function R(e,t=[]){return[e,t]}function Bt(e,t){let[n,r]=e;return[n,[...r,t]]}function st(e,t){let n=e[1];for(let r of n){let o=r[0].type;if(t(r,o))return!0}return!1}function Gn(e,t){return st(e,(n,r)=>t.includes(r))}function Bn(e){let t=ee(h);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function it(e){let[t,n]=e,r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[Bn(r),s]:r.push(typeof s=="string"?Bn(s):s)}for(let s of n){let[i,a]=s;if(o(`
6
6
  ${JSON.stringify(i)}
7
- `),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(G(a))}o(c)}}return typeof r=="string"?r:Ra(r)}function Ra(e){let t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t),r=0;for(let o of e)n.set(o,r),r+=o.length;return n}function Hn(e){let t=typeof e.data=="string"?Bn(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Lo={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 Aa(e){return e in Lo}function Gt(e){return Aa(e)?Lo[e]:e}function De(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Yn(e,t,n,r){let o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:M(r)},...o&&{trace:o}}}function va(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 Mo(e,t,n,r){let o=De(n),s={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:M(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return R(s,[i])}function Uo(e,t,n,r){let o=De(n),s=e.type&&e.type!=="replay_event"?e.type:"event";va(e,n?.sdk);let i=Yn(e,o,r,t);return delete e.sdkProcessingMetadata,R(i,[[{type:s},e]])}function Ht(e){return e.getOptions().traceLifecycle==="stream"}var at="__SENTRY_SUPPRESS_TRACING__";function Yt(e,t){let n=ko();return n.withActiveSpan?n.withActiveSpan(e,t):ge(r=>(Ke(r,e||void 0),t(r)))}function we(e){let t=ko();return t.suppressTracing?t.suppressTracing(e):ge(n=>{n.setSDKProcessingMetadata({[at]:!0});let r=e();return n.setSDKProcessingMetadata({[at]:void 0}),r})}function ko(){let e=k();return se(e)}function Do(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;Oa(e,t),r&&Ua(e,r),ka(e,n),La(e,o),Ma(e,s)}function Po(e,t){let{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:p,eventProcessors:f,attachments:l,propagationContext:m,transactionName:_,span:S}=t;ct(e,"extra",n),ct(e,"tags",r),ct(e,"attributes",o),ct(e,"user",s),ct(e,"contexts",i),e.sdkProcessingMetadata=oe(e.sdkProcessingMetadata,c,2),a&&(e.level=a),_&&(e.transactionName=_),S&&(e.span=S),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),p.length&&(e.fingerprint=[...e.fingerprint,...p]),f.length&&(e.eventProcessors=[...e.eventProcessors,...f]),l.length&&(e.attachments=[...e.attachments,...l]),e.propagationContext={...e.propagationContext,...m}}function ct(e,t,n){e[t]=oe(e[t],n,1)}function Wt(e,t){let n=Ot().getScopeData();return e&&Po(n,e.getScopeData()),t&&Po(n,t.getScopeData()),n}function Oa(e,t){let{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(s).length&&(e.contexts={...s,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function La(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Ma(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Ua(e,t){e.contexts={trace:Pt(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:ke(t),...e.sdkProcessingMetadata};let n=_e(t),r=Me(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function ka(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function wo(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 Wn(e){return e.split(/[?#]/,1)[0]}function Fo(e){let{protocol:t,host:n,path:r}=e,o=n?.replace(/^.*@/,"[filtered]:[filtered]@").replace(/(:80)$/,"").replace(/(:443)$/,"")||"";return`${t?`${t}://`:""}${o}${r}`}function Vn(e,t){let n=Pn(e),r=nt(e),o=Pn(r),{isolationScope:s,scope:i}=Le(e),a=Wt(s,i);Pa(n,o,t,a);let c=e.kind;wa(n,c),n.is_segment&&t.emit("processSegmentSpan",n),t.emit("processSpan",n);let{beforeSendSpan:u}=t.getOptions(),p=u&&Pe(u)?Da(n,u):n,f=p.attributes?.[F];return f&&I(p,{"sentry.span.source":f}),{...Dt(p),_segmentSpan:r}}function I(e,t){let n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,o])=>{o!=null&&!(r in n)&&(n[r]=o)})}function Pa(e,t,n,r){let o=n.getSdkMetadata(),{release:s,environment:i,sendDefaultPii:a}=n.getOptions();I(e,{[eo]:s,[to]:i,[no]:t.name,[ro]:t.span_id,[oo]:o?.sdk?.name,[so]:o?.sdk?.version,...a?{[io]:r.user?.id,[ao]:r.user?.email,[Lt]:r.user?.ip_address,[co]:r.user?.username}:{},...r.attributes})}function Da(e,t){let n=t(e);return n||(ot(),e)}var $n=1,Bo=2;function wa(e,t){let n=e.attributes;if(!n)return;let r=n["http.request.method"]||n["http.method"];if(r){Fa(e,n,t,r);return}let o=n["db.system.name"]||n["db.system"],s=typeof n[B]=="string"&&`${n[B]}`.startsWith("cache.");if(o&&!s){Ga(e,n);return}if(n["rpc.service"]){I(e,{[B]:"rpc"});return}if(n["messaging.system"]){I(e,{[B]:"message"});return}let i=n["faas.trigger"];i&&I(e,{[B]:`${i}`})}function Fa(e,t,n,r){let o=["http"];n===Bo?o.push("client"):n===$n&&o.push("server"),t["sentry.http.prefetch"]&&o.push("prefetch"),I(e,{[B]:o.join(".")});let s=t[Mt];if(typeof s=="string"){e.name=s;return}if(t[F]==="custom")return;let i=t["http.route"];if(typeof i=="string")e.name=`${r} ${i}`,I(e,{[F]:"route"});else{if(n===Bo||n===$n){let a=Ba(t,n);a&&(e.name=`${r} ${a}`)}I(e,{[F]:"url"})}}function Ba(e,t){let n=e["http.url"]||e["url.full"],r=e["http.target"],o=typeof n=="string"?wo(n):void 0,s=o?Fo(o):void 0;if(t===$n&&typeof r=="string")return Wn(r);if(s)return s;if(typeof r=="string")return Wn(r)}function Ga(e,t){I(e,{[B]:"db"});let n=t[Mt];if(typeof n=="string"){e.name=n;return}if(t[F]==="custom")return;let r=t["db.statement"];r&&(e.name=`${r}`,I(e,{[F]:"task"}))}var jn=0,Go=1,Ho=2;function K(e){return new $t(t=>{t(e)})}function Fe(e){return new $t((t,n)=>{n(e)})}var $t=class e{constructor(t){this._state=jn,this._handlers=[],this._runExecutor(t)}then(t,n){return new e((r,o)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(i){o(i)}},s=>{if(!n)o(s);else try{r(n(s))}catch(i){o(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let o,s;return this.then(i=>{s=!1,o=i,t&&t()},i=>{s=!0,o=i,t&&t()}).then(()=>{if(s){r(o);return}n(o)})})}_executeHandlers(){if(this._state===jn)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Go&&n[1](this._value),this._state===Ho&&n[2](this._value),n[0]=!0)})}_runExecutor(t){let n=(s,i)=>{if(this._state===jn){if(Z(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(Go,s)},o=s=>{n(Ho,s)};try{t(r,o)}catch(s){o(s)}}};function Yo(e,t,n,r=0){try{let o=zn(t,n,e,r);return Z(o)?o:K(o)}catch(o){return Fe(o)}}function zn(e,t,n,r){let o=n[r];if(!e||!o)return e;let s=o({...e},t);return g&&s===null&&d.log(`Event processor "${o.id||"?"}" dropped event`),Z(s)?s.then(i=>zn(i,t,n,r+1)):zn(s,t,n,r+1)}var he,Wo,$o,ie;function Vo(e){let t=h._sentryDebugIds,n=h._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(ie&&r.length===Wo&&o.length===$o)return ie;Wo=r.length,$o=o.length,ie={},he||(he={});let s=(i,a)=>{for(let c of i){let u=a[c],p=he?.[c];if(p&&ie&&u)ie[p[0]]=u,he&&(he[c]=[p[0],u]);else if(u){let f=e(c);for(let l=f.length-1;l>=0;l--){let _=f[l]?.filename;if(_&&ie&&he){ie[_]=u,he[c]=[_,u];break}}}}};return t&&s(r,t),n&&s(o,n),ie}function jo(e,t,n,r,o,s){let{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||b(),timestamp:t.timestamp||X()},u=n.integrations||e.integrations.map(N=>N.name);Ha(c,e),$a(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Ya(c,e.stackParser);let p=ja(r,n.captureContext);n.mechanism&&Ce(c,n.mechanism);let f=o?o.getEventProcessors():[],l=Wt(s,p),m=[...n.attachments||[],...l.attachments];m.length&&(n.attachments=m),Do(c,l);let _=[...f,...l.eventProcessors];return(n.data&&n.data.__sentry__===!0?K(c):Yo(_,c,n)).then(N=>(N&&Wa(N),typeof i=="number"&&i>0?Va(N,i,a):N))}function Ha(e,t){let{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||Ue,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);let i=e.request;i?.url&&s&&(i.url=Ae(i.url,s)),s&&e.exception?.values?.forEach(a=>{a.value&&(a.value=Ae(a.value,s))})}function Ya(e,t){let n=Vo(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function Wa(e){let t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.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(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function $a(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Va(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:G(o.data,t,n)}}))},...e.user&&{user:G(e.user,t,n)},...e.contexts&&{contexts:G(e.contexts,t,n)},...e.extra&&{extra:G(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=G(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:G(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=G(e.contexts.flags,3,n)),r}function ja(e,t){if(!t)return e;let n=e?e.clone():new O;return n.update(t),n}function zo(e){if(e)return za(e)?{captureContext:e}:Ja(e)?{captureContext:e}:e}function za(e){return e instanceof O||typeof e=="function"}var Za=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Ja(e){return Object.keys(e).some(t=>Za.includes(t))}function ae(e,t){return v().captureException(e,zo(t))}function Vt(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return v().captureMessage(e,n,r)}function jt(e){L().setTags(e)}function zt(e){L().setUser(e)}var Xa="7";function Ka(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function qa(e){return`${Ka(e)}${e.projectId}/envelope/`}function Qa(e,t){let n={sentry_version:Xa};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Jo(e,t,n){return t||`${qa(e)}?${Qa(e,n)}`}var Zn=[];function ec(e){let t={};return e.forEach(n=>{let{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Jn(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){let o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return ec(r)}function Xo(e,t){let n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&Kn(e,r,n)}),n}function Xn(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Kn(e,t,n){if(n[t.name]){g&&d.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Zn.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),Zn.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,s)=>r(o,s,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),o=Object.assign((s,i)=>r(s,i,e),{id:t.name});e.addEventProcessor(o)}["processSpan","processSegmentSpan"].forEach(r=>{let o=t[r];typeof o=="function"&&e.on(r,s=>o.call(t,s,e))}),g&&d.log(`Integration installed: ${t.name}`)}function Ko(e,t){return t?ge(t,()=>{let n=rt(),r=n?Pt(n):et(t);return[n?ke(n):Ft(e,t),r]}):[void 0,void 0]}function qo(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Qo(){return!qo()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ce(){return typeof window<"u"&&(!Qo()||tc())}function tc(){return h.process?.type==="renderer"}function nc(e,t){let n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...ce()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function es(e,t,n,r,o){let s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=M(r)),R(s,[nc(e,o)])}function Be(e,t){let n=t??rc(e)??[];if(n.length===0)return;let r=e.getOptions(),o=es(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);ts().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function rc(e){return ts().get(e)}function ts(){return D("clientToLogBufferMap",()=>new WeakMap)}function oc(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,...ce()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function ns(e,t,n,r,o){let s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=M(r)),R(s,[oc(e,o)])}function rs(e,t){let n=t??sc(e)??[];if(n.length===0)return;let r=e.getOptions(),o=ns(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);os().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function sc(e){return os().get(e)}function os(){return D("clientToMetricBufferMap",()=>new WeakMap)}function ss(e){let t={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};return Dt(t)}function is(e,t){if(e.type!=="transaction"||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!t.getOptions().streamGenAiSpans||Ht(t))return;let n=[],r=[];for(let s of e.spans)s.op?.startsWith("gen_ai.")?n.push(ss(s)):r.push(s);if(n.length===0)return;e.spans=r;let o=t.getOptions().sendDefaultPii?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...ce()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:n}]}function Ge(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var ut=Symbol.for("SentryBufferFullError");function He(e=100){let t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return Fe(ut);let a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return K(!0);let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;let c=[a,new Promise(u=>Ge(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}var ic=60*1e3;function ac(e,t=Re()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?ic:r-t}function cc(e,t){return e[t]||e.all||0}function as(e,t,n=Re()){return cc(e,t)>n}function cs(e,{statusCode:t,headers:n},r=Re()){let o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(let a of s.trim().split(",")){let[c,u,,,p]=a.split(":",5),f=parseInt(c,10),l=(isNaN(f)?60:f)*1e3;if(!u)o.all=r+l;else for(let m of u.split(";"))m==="metric_bucket"?(!p||p.split(";").includes("custom"))&&(o[m]=r+l):o[m]=r+l}else i?o.all=r+ac(i,r):t===429&&(o.all=r+60*1e3);return o}var pt=64;function ft(e,t,n=He(e.bufferSize||pt)){let r={},o=i=>n.drain(i);function s(i){let a=[];if(st(i,(f,l)=>{let m=Gt(l);as(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):a.push(f)}),a.length===0)return Promise.resolve({});let c=R(i[0],a),u=f=>{if(Gn(c,["client_report"])){g&&d.warn(`Dropping client report. Will not send outcomes (reason: ${f}).`);return}st(c,(l,m)=>{e.recordDroppedEvent(f,Gt(m))})},p=()=>t({body:it(c)}).then(f=>f.statusCode===413?(g&&d.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),f):(g&&f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&d.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),r=cs(r,f),f),f=>{throw u("network_error"),g&&d.error("Encountered error running transport request:",f),f});return n.add(p).then(f=>f,f=>{if(f===ut)return g&&d.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw f})}return{send:s,flush:o}}function us(e,t,n){let r=[{type:"client_report"},{timestamp:n||X(),discarded_events:e}];return R(t?{dsn:t}:{},[r])}function Zt(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 ps(e){let{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.[Ln],exclusive_time:i?.[Mn],measurements:e.measurements,is_segment:!0}}function fs(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&&{[Ln]:e.profile_id},...e.exclusive_time&&{[Mn]:e.exclusive_time}}}},measurements:e.measurements}}var ds="Not capturing exception because it's already been captured.",ls="Discarded session because of missing or non-string release",Es=Symbol.for("SentryInternalError"),Ts=Symbol.for("SentryDoNotSendEventError"),uc=5e3;function Jt(e){return{message:e,[Es]:!0}}function qn(e){return{message:e,[Ts]:!0}}function ms(e){return!!e&&typeof e=="object"&&Es in e}function gs(e){return!!e&&typeof e=="object"&&Ts in e}function _s(e,t,n,r,o){let s=0,i,a=!1;e.on(n,()=>{s=0,clearTimeout(i),a=!1}),e.on(t,c=>{s+=r(c),s>=8e5?o(e):a||(a=!0,i=Ge(setTimeout(()=>{o(e)},uc)))}),e.on("flush",()=>{o(e)})}var Xt=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=He(t.transportOptions?.bufferSize??pt),t.dsn?this._dsn=go(t.dsn):g&&d.warn("No DSN provided, client will not send events."),this._dsn){let r=Jo(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&_s(this,"afterCaptureLog","flushLogs",lc,Be),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&_s(this,"afterCaptureMetric","flushMetrics",dc,rs)}captureException(t,n,r){let o=b();if(Ct(t))return g&&d.log(ds),o;let s={event_id:o,...n};return this._process(()=>this.eventFromException(t,s).then(i=>this._captureEvent(i,s,r)).then(i=>i),"error"),s.event_id}captureMessage(t,n,r,o){let s={event_id:b(),...r},i=je(t)?t:String(t),a=ye(t),c=a?this.eventFromMessage(i,n,s):this.eventFromException(t,s);return this._process(()=>c.then(u=>this._captureEvent(u,s,o)),a?"unknown":"error"),s.event_id}captureEvent(t,n,r){let o=b();if(n?.originalException&&Ct(n.originalException))return g&&d.log(ds),o;let s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=hs(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),Ze(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){let n=this._transport;if(this.emit("flush"),!n)return!0;let r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){Be(this);let n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){let n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),Kn(this,t,this._integrations),n||Xn(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=is(t,this),o=Uo(t,this._dsn,this._options._metadata,this._options.tunnel);for(let s of n.attachments||[])o=Bt(o,Hn(s));r&&(o=Bt(o,r)),this.sendEnvelope(o).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){let{release:n,environment:r=Ue}=this._options;if("aggregates"in t){let s=t.attrs||{};if(!s.release&&!n){g&&d.warn(ls);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){g&&d.warn(ls);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);let o=Mo(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){let o=`${t}:${n}`;g&&d.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){let r=this._hooks[t]=this._hooks[t]||new Set,o=(...s)=>n(...s);return r.add(o),()=>{r.delete(o)}}emit(t,...n){let r=this._hooks[t];r&&r.forEach(o=>o(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return g&&d.error("Error while sending envelope:",n),{}}return g&&d.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=Xo(this,t),Xn(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1,s=n.exception?.values;if(s){o=!0,r=!1;for(let c of s)if(c.mechanism?.handled===!1){r=!0;break}}let i=t.status==="ok";(i&&t.errors===0||i&&r)&&(Ze(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){let s=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i?.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),jo(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...a.contexts?.trace,...et(r)},...a.contexts};let c=Ft(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=v(),o=L()){return g&&Qn(t)&&d.log(`Captured error event \`${Zt(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{g&&(gs(s)?d.log(s.message):ms(s)?d.warn(s.message):d.warn(s))})}_processEvent(t,n,r,o){let s=this.getOptions(),{sampleRate:i}=s,a=Is(t),c=Qn(t),p=`before send for type \`${t.type||"error"}\``,f=typeof i>"u"?void 0:tt(i);if(c&&typeof f=="number"&&P()>f)return this.recordDroppedEvent("sample_rate","error"),Fe(qn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));let l=hs(t.type);return this._prepareEvent(t,n,r,o).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",l),qn("An event processor returned `null`, will not send event.");if(n.data?.__sentry__===!0)return m;let S=fc(this,s,m,n);return pc(S,p)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",l),a){let N=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",N)}throw qn(`${p} returned \`null\`, will not send event.`)}let _=r.getSession()||o.getSession();if(c&&_&&this._updateSessionFromEvent(_,m),a){let E=m.sdkProcessingMetadata?.spanCountBeforeProcessing||0,N=m.spans?m.spans.length:0,C=E-N;C>0&&this.recordDroppedEvent("before_send","span",C)}let S=m.transaction_info;if(a&&S&&m.transaction!==t.transaction){let E="custom";m.transaction_info={...S,source:E}}return this.sendEvent(m,n),m}).then(null,m=>{throw gs(m)||ms(m)?m:(this.captureException(m,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:m}),Jt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
7
+ `),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(G(a))}o(c)}}return typeof r=="string"?r:Ra(r)}function Ra(e){let t=e.reduce((o,s)=>o+s.length,0),n=new Uint8Array(t),r=0;for(let o of e)n.set(o,r),r+=o.length;return n}function Hn(e){let t=typeof e.data=="string"?Bn(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Lo={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 Aa(e){return e in Lo}function Gt(e){return Aa(e)?Lo[e]:e}function De(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Yn(e,t,n,r){let o=e.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:M(r)},...o&&{trace:o}}}function va(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 Mo(e,t,n,r){let o=De(n),s={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:M(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return R(s,[i])}function Uo(e,t,n,r){let o=De(n),s=e.type&&e.type!=="replay_event"?e.type:"event";va(e,n?.sdk);let i=Yn(e,o,r,t);return delete e.sdkProcessingMetadata,R(i,[[{type:s},e]])}function Ht(e){return e.getOptions().traceLifecycle==="stream"}var at="__SENTRY_SUPPRESS_TRACING__";function Yt(e,t){let n=ko();return n.withActiveSpan?n.withActiveSpan(e,t):ge(r=>(Ke(r,e||void 0),t(r)))}function we(e){let t=ko();return t.suppressTracing?t.suppressTracing(e):ge(n=>{n.setSDKProcessingMetadata({[at]:!0});let r=e();return n.setSDKProcessingMetadata({[at]:void 0}),r})}function ko(){let e=k();return se(e)}function Do(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;Oa(e,t),r&&Ua(e,r),ka(e,n),La(e,o),Ma(e,s)}function Po(e,t){let{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:p,eventProcessors:f,attachments:l,propagationContext:m,transactionName:_,span:S}=t;ct(e,"extra",n),ct(e,"tags",r),ct(e,"attributes",o),ct(e,"user",s),ct(e,"contexts",i),e.sdkProcessingMetadata=oe(e.sdkProcessingMetadata,c,2),a&&(e.level=a),_&&(e.transactionName=_),S&&(e.span=S),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),p.length&&(e.fingerprint=[...e.fingerprint,...p]),f.length&&(e.eventProcessors=[...e.eventProcessors,...f]),l.length&&(e.attachments=[...e.attachments,...l]),e.propagationContext={...e.propagationContext,...m}}function ct(e,t,n){e[t]=oe(e[t],n,1)}function Wt(e,t){let n=Ot().getScopeData();return e&&Po(n,e.getScopeData()),t&&Po(n,t.getScopeData()),n}function Oa(e,t){let{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:a}=t;Object.keys(n).length&&(e.extra={...n,...e.extra}),Object.keys(r).length&&(e.tags={...r,...e.tags}),Object.keys(o).length&&(e.user={...o,...e.user}),Object.keys(s).length&&(e.contexts={...s,...e.contexts}),i&&(e.level=i),a&&e.type!=="transaction"&&(e.transaction=a)}function La(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Ma(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function Ua(e,t){e.contexts={trace:Pt(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:ke(t),...e.sdkProcessingMetadata};let n=_e(t),r=Me(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function ka(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint.length||delete e.fingerprint}function wo(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 Wn(e){return e.split(/[?#]/,1)[0]}function Fo(e){let{protocol:t,host:n,path:r}=e,o=n?.replace(/^.*@/,"[filtered]:[filtered]@").replace(/(:80)$/,"").replace(/(:443)$/,"")||"";return`${t?`${t}://`:""}${o}${r}`}function Vn(e,t){let n=Pn(e),r=nt(e),o=Pn(r),{isolationScope:s,scope:i}=Le(e),a=Wt(s,i);Pa(n,o,t,a);let c=e.kind;wa(n,c),n.is_segment&&t.emit("processSegmentSpan",n),t.emit("processSpan",n);let{beforeSendSpan:u}=t.getOptions(),p=u&&Pe(u)?Da(n,u):n,f=p.attributes?.[F];return f&&I(p,{"sentry.span.source":f}),{...Dt(p),_segmentSpan:r}}function I(e,t){let n=e.attributes??(e.attributes={});Object.entries(t).forEach(([r,o])=>{o!=null&&!(r in n)&&(n[r]=o)})}function Pa(e,t,n,r){let o=n.getSdkMetadata(),{release:s,environment:i}=n.getOptions();I(e,{[eo]:s,[to]:i,[no]:t.name,[ro]:t.span_id,[oo]:o?.sdk?.name,[so]:o?.sdk?.version,[io]:r.user?.id,[ao]:r.user?.email,[Lt]:r.user?.ip_address,[co]:r.user?.username,...r.attributes})}function Da(e,t){let n=t(e);return n||(ot(),e)}var $n=1,Bo=2;function wa(e,t){let n=e.attributes;if(!n)return;let r=n["http.request.method"]||n["http.method"];if(r){Fa(e,n,t,r);return}let o=n["db.system.name"]||n["db.system"],s=typeof n[B]=="string"&&`${n[B]}`.startsWith("cache.");if(o&&!s){Ga(e,n);return}if(n["rpc.service"]){I(e,{[B]:"rpc"});return}if(n["messaging.system"]){I(e,{[B]:"message"});return}let i=n["faas.trigger"];i&&I(e,{[B]:`${i}`})}function Fa(e,t,n,r){let o=["http"];n===Bo?o.push("client"):n===$n&&o.push("server"),t["sentry.http.prefetch"]&&o.push("prefetch"),I(e,{[B]:o.join(".")});let s=t[Mt];if(typeof s=="string"){e.name=s;return}if(t[F]==="custom")return;let i=t["http.route"];if(typeof i=="string")e.name=`${r} ${i}`,I(e,{[F]:"route"});else{if(n===Bo||n===$n){let a=Ba(t,n);a&&(e.name=`${r} ${a}`)}I(e,{[F]:"url"})}}function Ba(e,t){let n=e["http.url"]||e["url.full"],r=e["http.target"],o=typeof n=="string"?wo(n):void 0,s=o?Fo(o):void 0;if(t===$n&&typeof r=="string")return Wn(r);if(s)return s;if(typeof r=="string")return Wn(r)}function Ga(e,t){I(e,{[B]:"db"});let n=t[Mt];if(typeof n=="string"){e.name=n;return}if(t[F]==="custom")return;let r=t["db.statement"];r&&(e.name=`${r}`,I(e,{[F]:"task"}))}var jn=0,Go=1,Ho=2;function K(e){return new $t(t=>{t(e)})}function Fe(e){return new $t((t,n)=>{n(e)})}var $t=class e{constructor(t){this._state=jn,this._handlers=[],this._runExecutor(t)}then(t,n){return new e((r,o)=>{this._handlers.push([!1,s=>{if(!t)r(s);else try{r(t(s))}catch(i){o(i)}},s=>{if(!n)o(s);else try{r(n(s))}catch(i){o(i)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let o,s;return this.then(i=>{s=!1,o=i,t&&t()},i=>{s=!0,o=i,t&&t()}).then(()=>{if(s){r(o);return}n(o)})})}_executeHandlers(){if(this._state===jn)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Go&&n[1](this._value),this._state===Ho&&n[2](this._value),n[0]=!0)})}_runExecutor(t){let n=(s,i)=>{if(this._state===jn){if(Z(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(Go,s)},o=s=>{n(Ho,s)};try{t(r,o)}catch(s){o(s)}}};function Yo(e,t,n,r=0){try{let o=zn(t,n,e,r);return Z(o)?o:K(o)}catch(o){return Fe(o)}}function zn(e,t,n,r){let o=n[r];if(!e||!o)return e;let s=o({...e},t);return g&&s===null&&d.log(`Event processor "${o.id||"?"}" dropped event`),Z(s)?s.then(i=>zn(i,t,n,r+1)):zn(s,t,n,r+1)}var he,Wo,$o,ie;function Vo(e){let t=h._sentryDebugIds,n=h._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(ie&&r.length===Wo&&o.length===$o)return ie;Wo=r.length,$o=o.length,ie={},he||(he={});let s=(i,a)=>{for(let c of i){let u=a[c],p=he?.[c];if(p&&ie&&u)ie[p[0]]=u,he&&(he[c]=[p[0],u]);else if(u){let f=e(c);for(let l=f.length-1;l>=0;l--){let _=f[l]?.filename;if(_&&ie&&he){ie[_]=u,he[c]=[_,u];break}}}}};return t&&s(r,t),n&&s(o,n),ie}function jo(e,t,n,r,o,s){let{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||b(),timestamp:t.timestamp||X()},u=n.integrations||e.integrations.map(N=>N.name);Ha(c,e),$a(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Ya(c,e.stackParser);let p=ja(r,n.captureContext);n.mechanism&&Ce(c,n.mechanism);let f=o?o.getEventProcessors():[],l=Wt(s,p),m=[...n.attachments||[],...l.attachments];m.length&&(n.attachments=m),Do(c,l);let _=[...f,...l.eventProcessors];return(n.data&&n.data.__sentry__===!0?K(c):Yo(_,c,n)).then(N=>(N&&Wa(N),typeof i=="number"&&i>0?Va(N,i,a):N))}function Ha(e,t){let{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||Ue,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);let i=e.request;i?.url&&s&&(i.url=Ae(i.url,s)),s&&e.exception?.values?.forEach(a=>{a.value&&(a.value=Ae(a.value,s))})}function Ya(e,t){let n=Vo(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function Wa(e){let t={};if(e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.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(([r,o])=>{n.push({type:"sourcemap",code_file:r,debug_id:o})})}function $a(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Va(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:G(o.data,t,n)}}))},...e.user&&{user:G(e.user,t,n)},...e.contexts&&{contexts:G(e.contexts,t,n)},...e.extra&&{extra:G(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=G(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:G(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=G(e.contexts.flags,3,n)),r}function ja(e,t){if(!t)return e;let n=e?e.clone():new O;return n.update(t),n}function zo(e){if(e)return za(e)?{captureContext:e}:Ja(e)?{captureContext:e}:e}function za(e){return e instanceof O||typeof e=="function"}var Za=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Ja(e){return Object.keys(e).some(t=>Za.includes(t))}function ae(e,t){return v().captureException(e,zo(t))}function Vt(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return v().captureMessage(e,n,r)}function jt(e){L().setTags(e)}function zt(e){L().setUser(e)}var Xa="7";function Ka(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function qa(e){return`${Ka(e)}${e.projectId}/envelope/`}function Qa(e,t){let n={sentry_version:Xa};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function Jo(e,t,n){return t||`${qa(e)}?${Qa(e,n)}`}var Zn=[];function ec(e){let t={};return e.forEach(n=>{let{name:r}=n,o=t[r];o&&!o.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.values(t)}function Jn(e){let t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;if(Array.isArray(n))r=[...t,...n];else if(typeof n=="function"){let o=n(t);r=Array.isArray(o)?o:[o]}else r=t;return ec(r)}function Xo(e,t){let n={};return t.forEach(r=>{r?.beforeSetup&&r.beforeSetup(e)}),t.forEach(r=>{r&&Kn(e,r,n)}),n}function Xn(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Kn(e,t,n){if(n[t.name]){g&&d.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Zn.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),Zn.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),typeof t.preprocessEvent=="function"){let r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(o,s)=>r(o,s,e))}if(typeof t.processEvent=="function"){let r=t.processEvent.bind(t),o=Object.assign((s,i)=>r(s,i,e),{id:t.name});e.addEventProcessor(o)}["processSpan","processSegmentSpan"].forEach(r=>{let o=t[r];typeof o=="function"&&e.on(r,s=>o.call(t,s,e))}),g&&d.log(`Integration installed: ${t.name}`)}function Ko(e,t){return t?ge(t,()=>{let n=rt(),r=n?Pt(n):et(t);return[n?ke(n):Ft(e,t),r]}):[void 0,void 0]}function qo(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Qo(){return!qo()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function ce(){return typeof window<"u"&&(!Qo()||tc())}function tc(){return h.process?.type==="renderer"}function nc(e,t){let n=t?"auto":"never";return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{version:2,...ce()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function es(e,t,n,r,o){let s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=M(r)),R(s,[nc(e,o)])}function Be(e,t){let n=t??rc(e)??[];if(n.length===0)return;let r=e.getOptions(),o=es(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);ts().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function rc(e){return ts().get(e)}function ts(){return D("clientToLogBufferMap",()=>new WeakMap)}function oc(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,...ce()&&{ingest_settings:{infer_ip:n,infer_user_agent:n}},items:e}]}function ns(e,t,n,r,o){let s={};return t?.sdk&&(s.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(s.dsn=M(r)),R(s,[oc(e,o)])}function rs(e,t){let n=t??sc(e)??[];if(n.length===0)return;let r=e.getOptions(),o=ns(n,r._metadata,r.tunnel,e.getDsn(),r.sendDefaultPii);os().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function sc(e){return os().get(e)}function os(){return D("clientToMetricBufferMap",()=>new WeakMap)}function ss(e){let t={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};return Dt(t)}function is(e,t){if(e.type!=="transaction"||!e.spans?.length||!e.sdkProcessingMetadata?.hasGenAiSpans||!t.getOptions().streamGenAiSpans||Ht(t))return;let n=[],r=[];for(let s of e.spans)s.op?.startsWith("gen_ai.")?n.push(ss(s)):r.push(s);if(n.length===0)return;e.spans=r;let o=t.getOptions().sendDefaultPii?"auto":"never";return[{type:"span",item_count:n.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...ce()&&{ingest_settings:{infer_ip:o,infer_user_agent:o}},items:n}]}function Ge(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var ut=Symbol.for("SentryBufferFullError");function He(e=100){let t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return Fe(ut);let a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return K(!0);let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;let c=[a,new Promise(u=>Ge(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}var ic=60*1e3;function ac(e,t=Re()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?ic:r-t}function cc(e,t){return e[t]||e.all||0}function as(e,t,n=Re()){return cc(e,t)>n}function cs(e,{statusCode:t,headers:n},r=Re()){let o={...e},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(let a of s.trim().split(",")){let[c,u,,,p]=a.split(":",5),f=parseInt(c,10),l=(isNaN(f)?60:f)*1e3;if(!u)o.all=r+l;else for(let m of u.split(";"))m==="metric_bucket"?(!p||p.split(";").includes("custom"))&&(o[m]=r+l):o[m]=r+l}else i?o.all=r+ac(i,r):t===429&&(o.all=r+60*1e3);return o}var pt=64;function ft(e,t,n=He(e.bufferSize||pt)){let r={},o=i=>n.drain(i);function s(i){let a=[];if(st(i,(f,l)=>{let m=Gt(l);as(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):a.push(f)}),a.length===0)return Promise.resolve({});let c=R(i[0],a),u=f=>{if(Gn(c,["client_report"])){g&&d.warn(`Dropping client report. Will not send outcomes (reason: ${f}).`);return}st(c,(l,m)=>{e.recordDroppedEvent(f,Gt(m))})},p=()=>t({body:it(c)}).then(f=>f.statusCode===413?(g&&d.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),f):(g&&f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300)&&d.warn(`Sentry responded with status code ${f.statusCode} to sent event.`),r=cs(r,f),f),f=>{throw u("network_error"),g&&d.error("Encountered error running transport request:",f),f});return n.add(p).then(f=>f,f=>{if(f===ut)return g&&d.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw f})}return{send:s,flush:o}}function us(e,t,n){let r=[{type:"client_report"},{timestamp:n||X(),discarded_events:e}];return R(t?{dsn:t}:{},[r])}function Zt(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 ps(e){let{trace_id:t,parent_span_id:n,span_id:r,status:o,origin:s,data:i,op:a}=e.contexts?.trace??{};return{data:i??{},description:e.transaction,op:a,parent_span_id:n,span_id:r??"",start_timestamp:e.start_timestamp??0,status:o,timestamp:e.timestamp,trace_id:t??"",origin:s,profile_id:i?.[Ln],exclusive_time:i?.[Mn],measurements:e.measurements,is_segment:!0}}function fs(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&&{[Ln]:e.profile_id},...e.exclusive_time&&{[Mn]:e.exclusive_time}}}},measurements:e.measurements}}var ds="Not capturing exception because it's already been captured.",ls="Discarded session because of missing or non-string release",Es=Symbol.for("SentryInternalError"),Ts=Symbol.for("SentryDoNotSendEventError"),uc=5e3;function Jt(e){return{message:e,[Es]:!0}}function qn(e){return{message:e,[Ts]:!0}}function ms(e){return!!e&&typeof e=="object"&&Es in e}function gs(e){return!!e&&typeof e=="object"&&Ts in e}function _s(e,t,n,r,o){let s=0,i,a=!1;e.on(n,()=>{s=0,clearTimeout(i),a=!1}),e.on(t,c=>{s+=r(c),s>=8e5?o(e):a||(a=!0,i=Ge(setTimeout(()=>{o(e)},uc)))}),e.on("flush",()=>{o(e)})}var Xt=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=He(t.transportOptions?.bufferSize??pt),t.dsn?this._dsn=go(t.dsn):g&&d.warn("No DSN provided, client will not send events."),this._dsn){let r=Jo(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:r})}this._options.enableLogs=this._options.enableLogs??this._options._experiments?.enableLogs,this._options.enableLogs&&_s(this,"afterCaptureLog","flushLogs",lc,Be),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&_s(this,"afterCaptureMetric","flushMetrics",dc,rs)}captureException(t,n,r){let o=b();if(Ct(t))return g&&d.log(ds),o;let s={event_id:o,...n};return this._process(()=>this.eventFromException(t,s).then(i=>this._captureEvent(i,s,r)).then(i=>i),"error"),s.event_id}captureMessage(t,n,r,o){let s={event_id:b(),...r},i=je(t)?t:String(t),a=ye(t),c=a?this.eventFromMessage(i,n,s):this.eventFromException(t,s);return this._process(()=>c.then(u=>this._captureEvent(u,s,o)),a?"unknown":"error"),s.event_id}captureEvent(t,n,r){let o=b();if(n?.originalException&&Ct(n.originalException))return g&&d.log(ds),o;let s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=hs(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),Ze(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}async flush(t){let n=this._transport;if(this.emit("flush"),!n)return!0;let r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){Be(this);let n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}init(){(this._isEnabled()||this._options.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&this._setupIntegrations()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){let n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),Kn(this,t,this._integrations),n||Xn(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=is(t,this),o=Uo(t,this._dsn,this._options._metadata,this._options.tunnel);for(let s of n.attachments||[])o=Bt(o,Hn(s));r&&(o=Bt(o,r)),this.sendEnvelope(o).then(s=>this.emit("afterSendEvent",t,s))}sendSession(t){let{release:n,environment:r=Ue}=this._options;if("aggregates"in t){let s=t.attrs||{};if(!s.release&&!n){g&&d.warn(ls);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){g&&d.warn(ls);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);let o=Mo(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(o)}recordDroppedEvent(t,n,r=1){if(this._options.sendClientReports){let o=`${t}:${n}`;g&&d.log(`Recording outcome: "${o}"${r>1?` (${r} times)`:""}`),this._outcomes[o]=(this._outcomes[o]||0)+r}}on(t,n){let r=this._hooks[t]=this._hooks[t]||new Set,o=(...s)=>n(...s);return r.add(o),()=>{r.delete(o)}}emit(t,...n){let r=this._hooks[t];r&&r.forEach(o=>o(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)try{return await this._transport.send(t)}catch(n){return g&&d.error("Error while sending envelope:",n),{}}return g&&d.error("Transport disabled"),{}}registerCleanup(t){}dispose(){}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=Xo(this,t),Xn(this,t)}_updateSessionFromEvent(t,n){let r=n.level==="fatal",o=!1,s=n.exception?.values;if(s){o=!0,r=!1;for(let c of s)if(c.mechanism?.handled===!1){r=!0;break}}let i=t.status==="ok";(i&&t.errors===0||i&&r)&&(Ze(t,{...r&&{status:"crashed"},errors:t.errors||Number(o||r)}),this.captureSession(t))}async _isClientDoneProcessing(t){let n=0;for(;!t||n<t;){if(await new Promise(r=>setTimeout(r,1)),!this._numProcessing)return!0;n++}return!1}_isEnabled(){return this.getOptions().enabled!==!1&&this._transport!==void 0}_prepareEvent(t,n,r,o){let s=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i?.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||o.setLastEventId(t.event_id||n.event_id),jo(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:{...a.contexts?.trace,...et(r)},...a.contexts};let c=Ft(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=v(),o=L()){return g&&Qn(t)&&d.log(`Captured error event \`${Zt(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{g&&(gs(s)?d.log(s.message):ms(s)?d.warn(s.message):d.warn(s))})}_processEvent(t,n,r,o){let s=this.getOptions(),{sampleRate:i}=s,a=Is(t),c=Qn(t),p=`before send for type \`${t.type||"error"}\``,f=typeof i>"u"?void 0:tt(i);if(c&&typeof f=="number"&&P()>f)return this.recordDroppedEvent("sample_rate","error"),Fe(qn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));let l=hs(t.type);return this._prepareEvent(t,n,r,o).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",l),qn("An event processor returned `null`, will not send event.");if(n.data?.__sentry__===!0)return m;let S=fc(this,s,m,n);return pc(S,p)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",l),a){let N=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",N)}throw qn(`${p} returned \`null\`, will not send event.`)}let _=r.getSession()||o.getSession();if(c&&_&&this._updateSessionFromEvent(_,m),a){let E=m.sdkProcessingMetadata?.spanCountBeforeProcessing||0,N=m.spans?m.spans.length:0,C=E-N;C>0&&this.recordDroppedEvent("before_send","span",C)}let S=m.transaction_info;if(a&&S&&m.transaction!==t.transaction){let E="custom";m.transaction_info={...S,source:E}}return this.sendEvent(m,n),m}).then(null,m=>{throw gs(m)||ms(m)?m:(this.captureException(m,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:m}),Jt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
8
  Reason: ${m}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===ut&&this.recordDroppedEvent("queue_overflow",n),r))}_clearOutcomes(){let t=this._outcomes;return this._outcomes={},Object.entries(t).map(([n,r])=>{let[o,s]=n.split(":");return{reason:o,category:s,quantity:r}})}_flushOutcomes(){g&&d.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){g&&d.log("No outcomes to send");return}if(!this._dsn){g&&d.log("No dsn provided, will not send outcomes");return}g&&d.log("Sending outcomes:",t);let n=us(t,this._options.tunnel&&M(this._dsn));this.sendEnvelope(n)}};function hs(e){return e==="replay_event"?"replay":e||"error"}function pc(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Z(e))return e.then(r=>{if(!te(r)&&r!==null)throw Jt(n);return r},r=>{throw Jt(`${t} rejected with ${r}`)});if(!te(e)&&e!==null)throw Jt(n);return e}function fc(e,t,n,r){let{beforeSend:o,beforeSendTransaction:s,ignoreSpans:i}=t,a=!Pe(t.beforeSendSpan)&&t.beforeSendSpan,c=n;if(Qn(c)&&o)return o(c,r);if(Is(c)){if(a||i){let u=ps(c);if(i?.length&&Dn({description:u.description,op:u.op,attributes:u.data},i))return null;if(a){let p=a(u);p?c=oe(n,fs(p)):ot()}if(c.spans){let p=[],f=c.spans;for(let m of f){if(i?.length&&Dn({description:m.description,op:m.op,attributes:m.data},i)){Ao(f,m);continue}if(a){let _=a(m);_?p.push(_):(ot(),p.push(m))}else p.push(m)}let l=c.spans.length-p.length;l&&e.recordDroppedEvent("before_send","span",l),c.spans=p}}if(s){if(c.spans){let u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return s(c,r)}}return c}function Qn(e){return e.type===void 0}function Is(e){return e.type==="transaction"}function dc(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+ys(e.attributes)}function lc(e){let t=0;return e.message&&(t+=e.message.length*2),t+ys(e.attributes)}function ys(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*Ss(n[0]):ye(n)?t+=Ss(n):t+=100}),t}function Ss(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}var mc=new Set(["false","f","n","no","off","0"]),gc=new Set(["true","t","y","yes","on","1"]);function Se(e,t){let n=String(e).toLowerCase();return mc.has(n)?!1:gc.has(n)?!0:t?.strict?null:!!e}function bs(e,t,n,r,o){let s={sent_at:new Date().toISOString()};n?.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&o&&(s.dsn=M(o)),t&&(s.trace=t);let i=_c(e);return R(s,[i])}function _c(e){return[{type:"check_in"},e]}function dt(e,t,n=[t],r="npm"){let o=(e._metadata=e._metadata||{}).sdk=e._metadata.sdk||{};o.name||(o.name=`sentry.javascript.${t}`,o.packages=n.map(s=>({name:`${r}:@sentry/${s}`,version:H})),o.version=H)}var u_=1024*1024;var xs=["auth","token","secret","session","password","passwd","pwd","key","jwt","bearer","sso","saml","csrf","xsrf","credentials","set-cookie","cookie"],hc=[".sid","sessid","remember","oidc","pkce","nonce","__secure-","__host-","awsalb","awselb","akamai","__stripe","cognito","firebase","supabase","sb-","mfa","2fa"],Sc=["x-forwarded-","-user"];function er(e,t=!1,n="request"){let r={};try{Object.entries(e).forEach(([o,s])=>{if(s==null)return;let i=o.toLowerCase();if((i==="cookie"||i==="set-cookie")&&typeof s=="string"&&s!==""){let c=i==="set-cookie",u=s.indexOf(";"),p=c&&u!==-1?s.substring(0,u):s,f=c?[p]:p.split("; ");for(let l of f){let m=l.indexOf("="),_=m!==-1?l.substring(0,m):l,S=m!==-1?l.substring(m+1):"",E=_.toLowerCase();Rs({spanAttributes:r,headerKey:i,cookieKey:E,value:S,sendDefaultPii:t,lifecycle:n})}}else Rs({spanAttributes:r,headerKey:i,value:s,sendDefaultPii:t,lifecycle:n})})}catch{}return r}function Ns(e){return e.replace(/-/g,"_")}function Rs({spanAttributes:e,headerKey:t,cookieKey:n,value:r,sendDefaultPii:o,lifecycle:s}){let c=Ec(n||t,r,o,!!n);if(c==null)return;let u=`http.${s}.header.${Ns(t)}${n?`.${Ns(n)}`:""}`;e[u]=c}function Ec(e,t,n,r=!1){let o=r?[...xs,...hc]:xs;if(n?o.some(i=>e.includes(i)):[...Sc,...o].some(i=>e.includes(i)))return"[Filtered]";if(Array.isArray(t))return t.map(i=>i!=null?String(i):i).join(";");if(typeof t=="string")return t}var Tc=100;function tr(e,t){let n=T(),r=L();if(!n)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:s=Tc}=n.getOptions();if(s<=0)return;let a={timestamp:X(),...e},c=o?x(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}var As,Ic="FunctionToString",Cs=new WeakMap,yc=(()=>({name:Ic,setupOnce(){As=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=_n(this),n=Cs.has(T())&&t!==void 0?t:this;return As.apply(n,e)}}catch{}},setup(e){Cs.set(e,!0)}})),lt=yc;var bc=[/^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$/],xc="EventFilters",Ye=(e={})=>{let t;return{name:xc,setup(n){let r=n.getOptions();t=vs(e,r)},processEvent(n,r,o){if(!t){let s=o.getOptions();t=vs(e,s)}return Rc(n,t)?null:n}}},Nc=((e={})=>({...Ye(e),name:"InboundFilters"}));function vs(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:bc],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Rc(e,t){if(e.type){if(e.type==="transaction"&&Cc(e,t.ignoreTransactions))return g&&d.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
9
9
  Event: ${re(e)}`),!0}else{if(Ac(e,t.ignoreErrors))return g&&d.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
10
10
  Event: ${re(e)}`),!0;if(Mc(e))return g&&d.warn(`Event dropped due to not having an error message, error type or stacktrace.
@@ -12,7 +12,7 @@ Event: ${re(e)}`),!0;if(vc(e,t.denyUrls))return g&&d.warn(`Event dropped due to
12
12
  Event: ${re(e)}.
13
13
  Url: ${Kt(e)}`),!0;if(!Oc(e,t.allowUrls))return g&&d.warn(`Event dropped due to not being matched by \`allowUrls\` option.
14
14
  Event: ${re(e)}.
15
- Url: ${Kt(e)}`),!0}return!1}function Ac(e,t){return t?.length?Zt(e).some(n=>ne(n,t)):!1}function Cc(e,t){if(!t?.length)return!1;let n=e.transaction;return n?ne(n,t):!1}function vc(e,t){if(!t?.length)return!1;let n=Kt(e);return n?ne(n,t):!1}function Oc(e,t){if(!t?.length)return!0;let n=Kt(e);return n?ne(n,t):!0}function Lc(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 Kt(e){try{let n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?Lc(n):null}catch{return g&&d.error(`Cannot extract url for event ${re(e)}`),null}}function Mc(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Ms(e,t,n,r,o,s){if(!o.exception?.values||!s||!J(s.originalException,Error))return;let i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=nr(e,t,r,s.originalException,n,o.exception.values,i,0))}function nr(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(J(r[o],Error)){Os(i,a,r);let u=e(t,r[o]),p=c.length;Ls(u,o,p,a),c=nr(e,t,n,r[o],o,[u,...c],u,p)}return Us(r)&&r.errors.forEach((u,p)=>{if(J(u,Error)){Os(i,a,r);let f=e(t,u),l=c.length;Ls(f,`errors[${p}]`,l,a),c=nr(e,t,n,u,o,[f,...c],f,l)}}),c}function Us(e){return Array.isArray(e.errors)}function Os(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Us(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Ls(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function ks(e,t){return e(t.stack||"",1)}function Uc(e){return Ve(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function kc(e){return Uc(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function rr(e,t){let n={type:t.name||t.constructor.name,value:kc(t)},r=ks(e,t);return r.length&&(n.stacktrace={frames:r}),n}function Pc(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function Dc(e){if("name"in e&&typeof e.name=="string"){let r=`'${e.name}' captured as exception`;return"message"in e&&typeof e.message=="string"&&(r+=` with message '${e.message}'`),r}else if("message"in e&&typeof e.message=="string")return e.message;let t=hn(e);if(kr(e))return`Event \`ErrorEvent\` captured as exception with message \`${e.message}\``;let n=wc(e);return`${n&&n!=="Object"?`'${n}'`:"Object"} captured as exception with keys: ${t}`}function wc(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Fc(e,t,n,r){if(Ve(n))return[n,void 0];if(t.synthetic=!0,te(n)){let s=e?.getOptions().normalizeDepth,i={__serialized__:Fn(n,s)},a=Pc(n);if(a)return[a,i];let c=Dc(n),u=r?.syntheticException||new Error(c);return u.message=c,[u,i]}let o=r?.syntheticException||new Error(n);return o.message=`${n}`,[o,void 0]}function Ps(e,t,n,r){let s=r?.data&&r.data.mechanism||{handled:!0,type:"generic"},[i,a]=Fc(e,s,n,r),c={exception:{values:[rr(t,i)]}};return a&&(c.extra=a),yn(c,void 0,void 0),Ce(c,s),{...c,event_id:r?.event_id}}function Ds(e,t,n="info",r,o){let s={event_id:r?.event_id,level:n};if(o&&r?.syntheticException){let i=ks(e,r.syntheticException);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]},Ce(s,{synthetic:!0}))}if(je(t)){let{__sentry_template_string__:i,__sentry_template_values__:a}=t;return s.logentry={message:i,params:a},s}return s.message=t,s}var Bc="cause",Gc=5,Hc="LinkedErrors",Yc=((e={})=>{let t=e.limit||Gc,n=e.key||Bc;return{name:Hc,preprocessEvent(r,o,s){let i=s.getOptions();Ms(rr,i.stackParser,n,t,r,o)}}}),mt=Yc;function ws(e){let t={},n=0;for(;n<e.length;){let r=e.indexOf("=",n);if(r===-1)break;let o=e.indexOf(";",n);if(o===-1)o=e.length;else if(o<r){n=e.lastIndexOf(";",r-1)+1;continue}let s=e.slice(n,r).trim();if(t[s]===void 0){let i=e.slice(r+1,o).trim();i.charCodeAt(0)===34&&(i=i.slice(1,-1));try{t[s]=i.indexOf("%")!==-1?decodeURIComponent(i):i}catch{t[s]=i}}n=o+1}return t}var or=["X-Client-IP","X-Forwarded-For","Fly-Client-IP","CF-Connecting-IP","Fastly-Client-Ip","True-Client-Ip","X-Real-IP","X-Cluster-Client-IP","X-Forwarded","Forwarded-For","Forwarded","X-Vercel-Forwarded-For"];function sr(e){let t={};for(let s of Object.keys(e))t[s.toLowerCase()]=e[s];return or.map(s=>{let i=t[s.toLowerCase()],a=Array.isArray(i)?i.join(";"):i;return s==="Forwarded"?Wc(a):a?.split(",").map(c=>c.trim())}).reduce((s,i)=>i?s.concat(i):s,[]).find(s=>s!==null&&$c(s))||null}function Wc(e){if(!e)return null;for(let t of e.split(";"))if(t.startsWith("for="))return t.slice(4);return null}function $c(e){return/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/.test(e)}var Vc={cookies:!0,data:!0,headers:!0,query_string:!0,url:!0},jc="RequestData",zc=((e={})=>{let t={...Vc,...e.include};return{name:jc,processEvent(n,r,o){let{sdkProcessingMetadata:s={}}=n,{normalizedRequest:i,ipAddress:a}=s,c={...t,ip:t.ip??o.getOptions().sendDefaultPii};return i&&Zc(n,i,{ipAddress:a},c),n},processSegmentSpan(n,r){let{sdkProcessingMetadata:o={}}=L().getScopeData(),{normalizedRequest:s,ipAddress:i}=o;if(!s)return;let{sendDefaultPii:a}=r.getOptions(),c={...t,ip:t.ip??a};Jc(n,s,i,c,a)}}}),gt=zc;function Zc(e,t,n,r){if(e.request={...e.request,...Fs(t,r)},r.ip){let o=t.headers&&sr(t.headers)||n.ipAddress;o&&(e.user={...e.user,ip_address:o})}}function Jc(e,t,n,r,o){let s=Fs(t,r),i={};if(s.url&&(i["url.full"]=s.url),s.method&&(i["http.request.method"]=s.method),s.query_string&&(i["url.query"]=Xc(s.query_string)),I(e,i),s.cookies&&Object.keys(s.cookies).length>0){let a=Object.entries(s.cookies).map(([u,p])=>`${u}=${p}`).join("; "),c=er({cookie:a},o??!1,"request");I(e,c)}if(s.headers){let a=er(s.headers,o??!1,"request");I(e,a)}if(s.data!=null){let a=typeof s.data=="string"?s.data:JSON.stringify(s.data);a&&I(e,{"http.request.body.data":a})}if(r.ip){let a=t.headers&&sr(t.headers)||n||void 0;a&&I(e,{[Lt]:a})}}function Fs(e,t){let n={},r={...e.headers};if(t.headers&&(n.headers=r,t.cookies||delete r.cookie,!t.ip)){let o=new Set(or.map(s=>s.toLowerCase()));for(let s of Object.keys(r))o.has(s.toLowerCase())&&delete r[s]}if(n.method=e.method,t.url&&(n.url=e.url),t.cookies){let o=e.cookies||(r?.cookie?ws(r.cookie):void 0);n.cookies=o||{}}return t.query_string&&(n.query_string=e.query_string),t.data&&(n.data=e.data),n}function Xc(e){return typeof e=="string"?e||void 0:(Array.isArray(e)?e:Object.entries(e)).map(([r,o])=>`${r}=${o}`).join("&")||void 0}var qt=new Set([]);function Bs(e){let t="console",n=le(t,e);return z(t,Kc),n}function Gs(e){for(let t of e)qt.add(t);return()=>{for(let t of e)qt.delete(t)}}function Kc(){"console"in h&&de.forEach(function(e){e in h.console&&ze(h.console,e,function(t){return w[e]=t,function(...n){let r=n[0],o=w[e],s=qt.size&&typeof r=="string"&&ne(r,qt);s||Y("console",{args:n,level:e}),(!s||g&&d.isEnabled())&&o?.apply(h.console,n)}})})}function Hs(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var qc=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Qc(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=qc.exec(t);return n?n.slice(1):[]}function ir(e){let t=Qc(e),n=t[0]||"",r=t[1];return!n&&!r?".":(r&&(r=r.slice(0,r.length-1)),n+r)}var eu="Console",ar=(e={})=>{let t=new Set(e.levels||de);return{name:eu,setup(n){let r=Bs(({args:o,level:s})=>{T()!==n||!t.has(s)||tu(s,o)});if(n.registerCleanup(r),e.filter){let o=Gs(e.filter);n.registerCleanup(o)}}}};function tu(e,t){let n={category:"console",data:{arguments:t,logger:"console"},level:Hs(e),message:Ys(t)};if(e==="assert")if(t[0]===!1){let r=t.slice(1);n.message=r.length>0?`Assertion failed: ${Ys(r)}`:"Assertion failed",n.data.arguments=r}else return;tr(n,{input:t,level:e})}function Ys(e){return"util"in h&&typeof h.util.format=="function"?h.util.format(...e):En(e," ")}function Ws(e,t,n){let r=n.getOptions(),o=n.getDsn(),s=r.tunnel,i=De(r._metadata),a={sent_at:new Date().toISOString(),...nu(t)&&{trace:t},...i&&{sdk:i},...!!s&&o&&{dsn:M(o)}},c=r.sendDefaultPii?"auto":"never",u=[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...ce()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}];return R(a,[u])}function nu(e){return!!e.trace_id&&!!e.public_key}function $s(e){let t=156;if(t+=e.name.length*2,t+=Cn(e.attributes),e.links&&e.links.length>0){let r=e.links[0]?.attributes,o=100+(r?Cn(r):0);t+=o*e.links.length}return t}var Vs=1e3,ru=5e6,Qt=class{constructor(t,n){this._traceBuckets=new Map,this._client=t;let{maxSpanLimit:r,flushInterval:o,maxTraceWeightInBytes:s}=n??{};this._maxSpanLimit=r&&r>0&&r<=Vs?r:Vs,this._flushInterval=o&&o>0?o:5e3,this._maxTraceWeight=s&&s>0?s:ru,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(i=>{clearTimeout(i.timeout)}),this._traceBuckets.clear()})}add(t){let n=t.trace_id,r=this._traceBuckets.get(n);r||(r={spans:new Set,size:0,timeout:Ge(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,r)),r.spans.add(t),r.size+=$s(t),(r.spans.size>=this._maxSpanLimit||r.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(g&&d.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){let n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}let r=Array.from(n.spans),o=r[0]?._segmentSpan;if(!o){g&&d.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}let s=ke(o),i=r.map(c=>{let{_segmentSpan:u,...p}=c;return p}),a=Ws(i,s,this._client);g&&d.log(`Sending span envelope for trace ${t} with ${i.length} spans`),this._client.sendEnvelope(a).then(null,c=>{g&&d.error("Error while sending streamed span envelope:",c)}),this._removeTrace(t)}_removeTrace(t){let n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}};var en=()=>({name:"SpanStreaming",setup(e){let t="SpanStreaming integration requires",n="Falling back to static trace lifecycle.",r=e.getOptions();if(!Ht(e)){r.traceLifecycle="static",g&&d.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}let o=r.beforeSendSpan;if(o&&!Pe(o)){r.traceLifecycle="static",g&&d.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}let s=new Qt(e);e.on("afterSpanEnd",i=>{wt(i)&&s.add(Vn(i,e))})}});var ue=class{constructor(t){this._maxSize=t,this._cache=new Map}get size(){return this._cache.size}get(t){let n=this._cache.get(t);if(n!==void 0)return this._cache.delete(t),this._cache.set(t,n),n}set(t,n){if(this._cache.size>=this._maxSize){let r=this._cache.keys().next().value;this._cache.delete(r)}this._cache.set(t,n)}remove(t){let n=this._cache.get(t);return n&&this._cache.delete(t),n}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){let t=[];return this._cache.forEach(n=>t.push(n)),t}};function js(e){let t=e._metadata?.sdk,n=t?.name&&t?.version?`${t?.name}/${t?.version}`:void 0;e.transportOptions={...e.transportOptions,headers:{...n&&{"user-agent":n},...e.transportOptions?.headers}}}var _t=class e extends Xt{__init(){this._disposeCallbacks=[]}constructor(t){xo(),js(t),super(t),e.prototype.__init.call(this),this._setUpMetricsProcessing()}eventFromException(t,n){let r=Ps(this,this._options.stackParser,t,n);return r.level="error",K(r)}eventFromMessage(t,n="info",r){return K(Ds(this._options.stackParser,t,n,r,this._options.attachStacktrace))}captureException(t,n,r){return zs(n),super.captureException(t,n,r)}captureEvent(t,n,r){return!t.type&&t.exception?.values&&t.exception.values.length>0&&zs(n),super.captureEvent(t,n,r)}captureCheckIn(t,n,r){let o="checkInId"in t&&t.checkInId?t.checkInId:b();if(!this._isEnabled())return g&&d.warn("SDK not enabled, will not capture check-in."),o;let s=this.getOptions(),{release:i,environment:a,tunnel:c}=s,u={check_in_id:o,monitor_slug:t.monitorSlug,status:t.status,release:i,environment:a};"duration"in t&&(u.duration=t.duration),n&&(u.monitor_config={schedule:n.schedule,checkin_margin:n.checkinMargin,max_runtime:n.maxRuntime,timezone:n.timezone,failure_issue_threshold:n.failureIssueThreshold,recovery_threshold:n.recoveryThreshold});let[p,f]=Ko(this,r);f&&(u.contexts={trace:f});let l=bs(u,p,this.getSdkMetadata(),c,this.getDsn());return g&&d.log("Sending checkin:",t.monitorSlug,t.status),this.sendEnvelope(l),o}registerCleanup(t){this._disposeCallbacks.push(t)}dispose(){g&&d.log("Disposing client...");for(let t of this._disposeCallbacks)try{t()}catch{}this._disposeCallbacks.length=0;for(let t of Object.keys(this._hooks))this._hooks[t]?.clear();this._hooks={},this._eventProcessors.length=0,this._integrations={},this._outcomes={},this._transport=void 0,this._promiseBuffer=He(pt)}_prepareEvent(t,n,r,o){return this._options.platform&&(t.platform=t.platform||this._options.platform),this._options.runtime&&(t.contexts={...t.contexts,runtime:t.contexts?.runtime||this._options.runtime}),this._options.serverName&&(t.server_name=t.server_name||this._options.serverName),super._prepareEvent(t,n,r,o)}_setUpMetricsProcessing(){this.on("processMetric",t=>{this._options.serverName&&(t.attributes={"server.address":this._options.serverName,...t.attributes})})}};function zs(e){let t=L().getScopeData().sdkProcessingMetadata.requestSession;if(t){let n=e?.mechanism?.handled??!0;n&&t.status!=="crashed"?t.status="errored":n||(t.status="crashed")}}function Xs(e,t=!1){return!(t||e&&!e.startsWith("/")&&!e.match(/^[A-Z]:/)&&!e.startsWith(".")&&!e.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&e!==void 0&&!e.includes("node_modules/")}function Ks(e){let t=/^\s*[-]{4,}$/,n=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/,r=/at (?:async )?(.+?) \(data:(.*?),/;return o=>{let s=o.match(r);if(s)return{filename:`<data:${s[2]}>`,function:s[1]};let i=o.match(n);if(i){let a,c,u,p,f;if(i[1]){u=i[1];let S=u.lastIndexOf(".");if(u[S-1]==="."&&S--,S>0){a=u.slice(0,S),c=u.slice(S+1);let E=a.indexOf(".Module");E>0&&(u=u.slice(E+1),a=a.slice(0,E))}p=void 0}c&&(p=a,f=c),c==="<anonymous>"&&(f=void 0,u=void 0),u===void 0&&(f=f||"?",u=p?`${p}.${f}`:f);let l=vr(i[2]),m=i[5]==="native";!l&&i[5]&&!m&&(l=i[5]);let _=l?ou(l):void 0;return{filename:_??l,module:_&&e?.(_),function:u,lineno:Zs(i[3]),colno:Zs(i[4]),in_app:Xs(l||"",m)}}if(o.match(t))return{filename:o}}}function cr(e){return[90,Ks(e)]}function Zs(e){return parseInt(e||"",10)||void 0}function ou(e){try{return decodeURI(e)}catch{return}}import{threadId as Au,isMainThread as Cu}from"worker_threads";var A=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var vu=6e4,tn=class extends _t{constructor(t){let n=t.includeServerName===!1?void 0:t.serverName||global.process.env.SENTRY_NAME||qs.hostname(),r={...t,platform:"node",runtime:{name:"node",version:global.process.version},serverName:n};dt(r,"node-light",["node-core"]),d.log(`Initializing Sentry: process: ${process.pid}, thread: ${Cu?"main":`worker-${Au}`}.`),super(r),this.getOptions().enableLogs&&(this._logOnExitFlushListener=()=>{Be(this)},n&&this.on("beforeCaptureLog",o=>{o.attributes={...o.attributes,"server.address":n}}),process.on("beforeExit",this._logOnExitFlushListener))}async flush(t){return this.getOptions().sendClientReports&&this._flushOutcomes(),super.flush(t)}async close(t){return this._clientReportInterval&&clearInterval(this._clientReportInterval),this._clientReportOnExitFlushListener&&process.off("beforeExit",this._clientReportOnExitFlushListener),this._logOnExitFlushListener&&process.off("beforeExit",this._logOnExitFlushListener),super.close(t)}startClientReportTracking(){let t=this.getOptions();t.sendClientReports&&(this._clientReportOnExitFlushListener=()=>{this._flushOutcomes()},this._clientReportInterval=setInterval(()=>{A&&d.log("Flushing client reports based on interval."),this._flushOutcomes()},t.clientReportFlushInterval??vu).unref(),process.on("beforeExit",this._clientReportOnExitFlushListener))}};import{execFile as Ou}from"node:child_process";import{readFile as Lu,readdir as Mu}from"node:fs";import*as y from"node:os";import{join as Uu}from"node:path";import{promisify as ti}from"node:util";var ku=ti(Lu),Pu=ti(Mu),Du="Context",wu=((e={})=>{let t={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0,...e},n=t.app?Yu():void 0,r=t.device?Wu(t.device):void 0,o=t.culture?Hu():void 0,s=t.cloudResource?Ju():void 0,i=t.os?Gu():void 0,a={"process.runtime.engine.name":"v8","process.runtime.engine.version":process.versions.v8,...Qs({app:n,device:r,culture:o,cloud_resource:s})};i&&i.then(p=>Object.assign(a,Qs({os:p}))).catch(()=>{});let c=(async()=>{let p={};return i&&(p.os=await i),n&&(p.app=n),r&&(p.device=r),o&&(p.culture=o),s&&(p.cloud_resource=s),p})();async function u(p){let f=Fu(await c);return p.contexts={...p.contexts,app:{...f.app,...p.contexts?.app},os:{...f.os,...p.contexts?.os},device:{...f.device,...p.contexts?.device},culture:{...f.culture,...p.contexts?.culture},cloud_resource:{...f.cloud_resource,...p.contexts?.cloud_resource}},p}return{name:Du,processEvent(p){return u(p)},processSegmentSpan(p){I(p,a),I(p,Bu(n,r))}}}),ur=wu;function Fu(e){if(e.app?.app_memory&&(e.app.app_memory=process.memoryUsage().rss),e.app?.free_memory&&typeof process.availableMemory=="function"){let t=process.availableMemory?.();t!=null&&(e.app.free_memory=t)}return e.device?.free_memory&&(e.device.free_memory=y.freemem()),e}function Qs(e){let t={},{app:n,device:r,os:o,culture:s,cloud_resource:i}=e;if(n&&n.app_start_time&&(t["app.start_time"]=n.app_start_time),r&&(r.arch&&(t["device.archs"]=[r.arch]),r.boot_time&&(t["device.boot_time"]=r.boot_time),r.memory_size!=null&&(t["device.memory_size"]=r.memory_size),r.processor_count!=null&&(t["device.processor_count"]=r.processor_count),r.cpu_description&&(t["device.cpu_description"]=r.cpu_description),r.processor_frequency!=null&&(t["device.processor_frequency"]=r.processor_frequency)),o&&(o.name&&(t["os.name"]=o.name),o.version&&(t["os.version"]=o.version),o.kernel_version&&(t["os.kernel_version"]=o.kernel_version),o.build&&(t["os.build"]=o.build)),s&&(s.locale&&(t["culture.locale"]=s.locale),s.timezone&&(t["culture.timezone"]=s.timezone)),i)for(let[a,c]of Object.entries(i))c!=null&&(t[a]=c);return t}function Bu(e,t){let n={};if(e&&(n["app.memory"]=process.memoryUsage().rss,typeof process.availableMemory=="function")){let r=process.availableMemory?.();r!=null&&(n["app.free_memory"]=r)}return t?.free_memory!=null&&(n["device.free_memory"]=y.freemem()),n}async function Gu(){let e=y.platform();switch(e){case"darwin":return zu();case"linux":return Zu();default:return{name:$u[e]||e,version:y.release()}}}function Hu(){try{if(typeof process.versions.icu!="string")return;let e=new Date(9e8);if(new Intl.DateTimeFormat("es",{month:"long"}).format(e)==="enero"){let n=Intl.DateTimeFormat().resolvedOptions();return{locale:n.locale,timezone:n.timeZone}}}catch{}}function Yu(){let e=process.memoryUsage().rss,n={app_start_time:new Date(Date.now()-process.uptime()*1e3).toISOString(),app_memory:e};if(typeof process.availableMemory=="function"){let r=process.availableMemory?.();r!=null&&(n.free_memory=r)}return n}function Wu(e){let t={},n;try{n=y.uptime()}catch{}if(typeof n=="number"&&(t.boot_time=new Date(Date.now()-n*1e3).toISOString()),t.arch=y.arch(),(e===!0||e.memory)&&(t.memory_size=y.totalmem(),t.free_memory=y.freemem()),e===!0||e.cpu){let r=y.cpus(),o=r?.[0];o&&(t.processor_count=r.length,t.cpu_description=o.model,t.processor_frequency=o.speed)}return t}var $u={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows",ohos:"OpenHarmony",android:"Android"},Vu=[{name:"fedora-release",distros:["Fedora"]},{name:"redhat-release",distros:["Red Hat Linux","Centos"]},{name:"redhat_version",distros:["Red Hat Linux"]},{name:"SuSE-release",distros:["SUSE Linux"]},{name:"lsb-release",distros:["Ubuntu Linux","Arch Linux"]},{name:"debian_version",distros:["Debian"]},{name:"debian_release",distros:["Debian"]},{name:"arch-release",distros:["Arch Linux"]},{name:"gentoo-release",distros:["Gentoo Linux"]},{name:"novell-release",distros:["SUSE Linux"]},{name:"alpine-release",distros:["Alpine Linux"]}],ju={alpine:e=>e,arch:e=>$(/distrib_release=(.*)/,e),centos:e=>$(/release ([^ ]+)/,e),debian:e=>e,fedora:e=>$(/release (..)/,e),mint:e=>$(/distrib_release=(.*)/,e),red:e=>$(/release ([^ ]+)/,e),suse:e=>$(/VERSION = (.*)\n/,e),ubuntu:e=>$(/distrib_release=(.*)/,e)};function $(e,t){let n=e.exec(t);return n?n[1]:void 0}async function zu(){let e={kernel_version:y.release(),name:"Mac OS X",version:`10.${Number(y.release().split(".")[0])-4}`};try{let t=await new Promise((n,r)=>{Ou("/usr/bin/sw_vers",(o,s)=>{if(o){r(o);return}n(s)})});e.name=$(/^ProductName:\s+(.*)$/m,t),e.version=$(/^ProductVersion:\s+(.*)$/m,t),e.build=$(/^BuildVersion:\s+(.*)$/m,t)}catch{}return e}function ei(e){return e.split(" ")[0].toLowerCase()}async function Zu(){let e={kernel_version:y.release(),name:"Linux"};try{let t=await Pu("/etc"),n=Vu.find(a=>t.includes(a.name));if(!n)return e;let r=Uu("/etc",n.name),o=(await ku(r,{encoding:"utf-8"})).toLowerCase(),{distros:s}=n;e.name=s.find(a=>o.indexOf(ei(a))>=0)||s[0];let i=ei(e.name);e.version=ju[i]?.(o)}catch{}return e}function Ju(){return process.env.VERCEL?{"cloud.provider":"vercel","cloud.region":process.env.VERCEL_REGION}:process.env.AWS_REGION?{"cloud.provider":"aws","cloud.region":process.env.AWS_REGION,"cloud.platform":process.env.AWS_EXECUTION_ENV}:process.env.GCP_PROJECT?{"cloud.provider":"gcp"}:process.env.ALIYUN_REGION_ID?{"cloud.provider":"alibaba_cloud","cloud.region":process.env.ALIYUN_REGION_ID}:process.env.WEBSITE_SITE_NAME&&process.env.REGION_NAME?{"cloud.provider":"azure","cloud.region":process.env.REGION_NAME}:process.env.IBM_CLOUD_REGION?{"cloud.provider":"ibm_cloud","cloud.region":process.env.IBM_CLOUD_REGION}:process.env.TENCENTCLOUD_REGION?{"cloud.provider":"tencent_cloud","cloud.region":process.env.TENCENTCLOUD_REGION,"cloud.account.id":process.env.TENCENTCLOUD_APPID,"cloud.availability_zone":process.env.TENCENTCLOUD_ZONE}:process.env.NETLIFY?{"cloud.provider":"netlify"}:process.env.FLY_REGION?{"cloud.provider":"fly.io","cloud.region":process.env.FLY_REGION}:process.env.DYNO?{"cloud.provider":"heroku"}:void 0}import{createReadStream as Xu}from"node:fs";import{createInterface as Ku}from"node:readline";var pr=new ue(10),oi=new ue(20),qu=7,Qu="ContextLines",ep=1e3,tp=1e4;function np(e,t,n){let r=e.get(t);return r===void 0?(e.set(t,n),n):r}function rp(e){return!!(e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:"))}function op(e){return e.lineno!==void 0&&e.lineno>tp||e.colno!==void 0&&e.colno>ep}function sp(e,t){let n=pr.get(e);if(n===void 0)return!1;for(let r=t[0];r<=t[1];r++)if(n[r]===void 0)return!1;return!0}function ip(e,t){if(!e.length)return[];let n=0,r=e[0];if(typeof r!="number")return[];let o=ri(r,t),s=[];for(;;){if(n===e.length-1){s.push(o);break}let i=e[n+1];if(typeof i!="number")break;i<=o[1]?o[1]=i+t:(s.push(o),o=ri(i,t)),n++}return s}function ap(e,t,n){return new Promise((r,o)=>{let s=Xu(e),i=Ku({input:s});function a(){s.destroy(),r()}let c=0,u=0,p=t[u];if(p===void 0){a();return}let f=p[0],l=p[1];function m(_){oi.set(e,1),A&&d.error(`Failed to read file: ${e}. Error: ${_}`),i.close(),i.removeAllListeners(),a()}s.on("error",m),i.on("error",m),i.on("close",a),i.on("line",_=>{if(c++,!(c<f)&&(n[c]=Sn(_,0),c>=l)){if(u===t.length-1){i.close(),i.removeAllListeners();return}u++;let S=t[u];if(S===void 0){i.close(),i.removeAllListeners();return}f=S[0],l=S[1]}})})}async function cp(e,t){let n={};if(t>0&&e.exception?.values){for(let s of e.exception.values)if(s.stacktrace?.frames?.length)for(let i=s.stacktrace.frames.length-1;i>=0;i--){let a=s.stacktrace.frames[i],c=a?.filename;if(!a||typeof c!="string"||typeof a.lineno!="number"||rp(c)||op(a))continue;n[c]||(n[c]=[]),n[c].push(a.lineno)}}let r=Object.keys(n);if(r.length==0)return e;let o=[];for(let s of r){if(oi.get(s))continue;let i=n[s];if(!i)continue;i.sort((u,p)=>u-p);let a=ip(i,t);if(a.every(u=>sp(s,u)))continue;let c=np(pr,s,{});o.push(ap(s,a,c))}if(await Promise.all(o).catch(()=>{A&&d.log("Failed to read one or more source files and resolve context lines")}),t>0&&e.exception?.values)for(let s of e.exception.values)s.stacktrace?.frames&&s.stacktrace.frames.length>0&&up(s.stacktrace.frames,t,pr);return e}function up(e,t,n){for(let r of e)if(r.filename&&r.context_line===void 0&&typeof r.lineno=="number"){let o=n.get(r.filename);if(o===void 0)continue;pp(r.lineno,r,t,o)}}function ni(e){delete e.pre_context,delete e.context_line,delete e.post_context}function pp(e,t,n,r){if(t.lineno===void 0||r===void 0){A&&d.error("Cannot resolve context for frame with no lineno or file contents");return}t.pre_context=[];for(let s=si(e,n);s<e;s++){let i=r[s];if(i===void 0){ni(t),A&&d.error(`Could not find line ${s} in file ${t.filename}`);return}t.pre_context.push(i)}if(r[e]===void 0){ni(t),A&&d.error(`Could not find line ${e} in file ${t.filename}`);return}t.context_line=r[e];let o=ii(e,n);t.post_context=[];for(let s=e+1;s<=o;s++){let i=r[s];if(i===void 0)break;t.post_context.push(i)}}function si(e,t){return Math.max(1,e-t)}function ii(e,t){return e+t}function ri(e,t){return[si(e,t),ii(e,t)]}var fp=((e={})=>{let t=e.frameContextLines!==void 0?e.frameContextLines:qu;return{name:Qu,processEvent(n){return cp(n,t)}}}),fr=fp;var nn=bn(process.versions.node),ai=nn.major,sE=nn.minor;import{Worker as dp}from"node:worker_threads";var rn;async function on(){if(rn===void 0)try{rn=!!(await import("node:inspector")).url()}catch{rn=!1}return rn}var ht="__SENTRY_ERROR_LOCAL_VARIABLES__";function ui(e,t,n){let r=0,o=5,s=0;return setInterval(()=>{s===0?r>e&&(o*=2,n(o),o>86400&&(o=86400),s=o):(s-=1,s===0&&t()),r=0},1e3).unref(),()=>{r+=1}}function ci(e){return e!==void 0&&(e.length===0||e==="?"||e==="<anonymous>")}function sn(e,t){return e===t||`Object.${e}`===t||e===`Object.${t}`||ci(e)&&ci(t)}var lp="LyohIEBzZW50cnkvbm9kZS1jb3JlIDEwLjUzLjAgKDA1NDg5YjgpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPWdsb2JhbFRoaXMsaT17fTtjb25zdCBvPSJfX1NFTlRSWV9FUlJPUl9MT0NBTF9WQVJJQUJMRVNfXyI7Y29uc3QgYT10O2Z1bmN0aW9uIHMoLi4uZSl7YS5kZWJ1ZyYmZnVuY3Rpb24oZSl7aWYoISgiY29uc29sZSJpbiBuKSlyZXR1cm4gZSgpO2NvbnN0IHQ9bi5jb25zb2xlLG89e30sYT1PYmplY3Qua2V5cyhpKTthLmZvckVhY2goZT0+e2NvbnN0IG49aVtlXTtvW2VdPXRbZV0sdFtlXT1ufSk7dHJ5e3JldHVybiBlKCl9ZmluYWxseXthLmZvckVhY2goZT0+e3RbZV09b1tlXX0pfX0oKCk9PmNvbnNvbGUubG9nKCJbTG9jYWxWYXJpYWJsZXMgV29ya2VyXSIsLi4uZSkpfWFzeW5jIGZ1bmN0aW9uIGMoZSx0LG4saSl7Y29uc3Qgbz1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pO2lbbl09by5yZXN1bHQuZmlsdGVyKGU9PiJsZW5ndGgiIT09ZS5uYW1lJiYhaXNOYU4ocGFyc2VJbnQoZS5uYW1lLDEwKSkpLnNvcnQoKGUsdCk9PnBhcnNlSW50KGUubmFtZSwxMCktcGFyc2VJbnQodC5uYW1lLDEwKSkubWFwKGU9PmUudmFsdWU/LnZhbHVlKX1hc3luYyBmdW5jdGlvbiByKGUsdCxuLGkpe2NvbnN0IG89YXdhaXQgZS5wb3N0KCJSdW50aW1lLmdldFByb3BlcnRpZXMiLHtvYmplY3RJZDp0LG93blByb3BlcnRpZXM6ITB9KTtpW25dPW8ucmVzdWx0Lm1hcChlPT5bZS5uYW1lLGUudmFsdWU/LnZhbHVlXSkucmVkdWNlKChlLFt0LG5dKT0+KGVbdF09bixlKSx7fSl9ZnVuY3Rpb24gdShlLHQpe2UudmFsdWUmJigidmFsdWUiaW4gZS52YWx1ZT92b2lkIDA9PT1lLnZhbHVlLnZhbHVlfHxudWxsPT09ZS52YWx1ZS52YWx1ZT90W2UubmFtZV09YDwke2UudmFsdWUudmFsdWV9PmA6dFtlLm5hbWVdPWUudmFsdWUudmFsdWU6ImRlc2NyaXB0aW9uImluIGUudmFsdWUmJiJmdW5jdGlvbiIhPT1lLnZhbHVlLnR5cGU/dFtlLm5hbWVdPWA8JHtlLnZhbHVlLmRlc2NyaXB0aW9ufT5gOiJ1bmRlZmluZWQiPT09ZS52YWx1ZS50eXBlJiYodFtlLm5hbWVdPSI8dW5kZWZpbmVkPiIpKX1hc3luYyBmdW5jdGlvbiBsKGUsdCl7Y29uc3Qgbj1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pLGk9e307Zm9yKGNvbnN0IHQgb2Ygbi5yZXN1bHQpaWYodC52YWx1ZT8ub2JqZWN0SWQmJiJBcnJheSI9PT10LnZhbHVlLmNsYXNzTmFtZSl7Y29uc3Qgbj10LnZhbHVlLm9iamVjdElkO2F3YWl0IGMoZSxuLHQubmFtZSxpKX1lbHNlIGlmKHQudmFsdWU/Lm9iamVjdElkJiYiT2JqZWN0Ij09PXQudmFsdWUuY2xhc3NOYW1lKXtjb25zdCBuPXQudmFsdWUub2JqZWN0SWQ7YXdhaXQgcihlLG4sdC5uYW1lLGkpfWVsc2UgdC52YWx1ZSYmdSh0LGkpO3JldHVybiBpfWxldCBmOyhhc3luYyBmdW5jdGlvbigpe2NvbnN0IHQ9bmV3IGU7dC5jb25uZWN0VG9NYWluVGhyZWFkKCkscygiQ29ubmVjdGVkIHRvIG1haW4gdGhyZWFkIik7bGV0IG49ITE7dC5vbigiRGVidWdnZXIucmVzdW1lZCIsKCk9PntuPSExfSksdC5vbigiRGVidWdnZXIucGF1c2VkIixlPT57bj0hMCxhc3luYyBmdW5jdGlvbihlLHtyZWFzb246dCxkYXRhOntvYmplY3RJZDpufSxjYWxsRnJhbWVzOml9KXtpZigiZXhjZXB0aW9uIiE9PXQmJiJwcm9taXNlUmVqZWN0aW9uIiE9PXQpcmV0dXJuO2lmKGY/LigpLG51bGw9PW4pcmV0dXJuO2NvbnN0IGE9W107Zm9yKGxldCB0PTA7dDxpLmxlbmd0aDt0Kyspe2NvbnN0e3Njb3BlQ2hhaW46bixmdW5jdGlvbk5hbWU6byx0aGlzOnN9PWlbdF0sYz1uLmZpbmQoZT0+ImxvY2FsIj09PWUudHlwZSkscj0iZ2xvYmFsIiE9PXMuY2xhc3NOYW1lJiZzLmNsYXNzTmFtZT9gJHtzLmNsYXNzTmFtZX0uJHtvfWA6bztpZih2b2lkIDA9PT1jPy5vYmplY3Qub2JqZWN0SWQpYVt0XT17ZnVuY3Rpb246cn07ZWxzZXtjb25zdCBuPWF3YWl0IGwoZSxjLm9iamVjdC5vYmplY3RJZCk7YVt0XT17ZnVuY3Rpb246cix2YXJzOm59fX1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuY2FsbEZ1bmN0aW9uT24iLHtmdW5jdGlvbkRlY2xhcmF0aW9uOmBmdW5jdGlvbigpIHsgdGhpcy4ke299ID0gdGhpcy4ke299IHx8ICR7SlNPTi5zdHJpbmdpZnkoYSl9OyB9YCxzaWxlbnQ6ITAsb2JqZWN0SWQ6bn0pLGF3YWl0IGUucG9zdCgiUnVudGltZS5yZWxlYXNlT2JqZWN0Iix7b2JqZWN0SWQ6bn0pfSh0LGUucGFyYW1zKS50aGVuKGFzeW5jKCk9PntuJiZhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpfSxhc3luYyBlPT57biYmYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5yZXN1bWUiKX0pfSksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5lbmFibGUiKTtjb25zdCBpPSExIT09YS5jYXB0dXJlQWxsRXhjZXB0aW9ucztpZihhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6aT8iYWxsIjoidW5jYXVnaHQifSksaSl7Y29uc3QgZT1hLm1heEV4Y2VwdGlvbnNQZXJTZWNvbmR8fDUwO2Y9ZnVuY3Rpb24oZSx0LG4pe2xldCBpPTAsbz01LGE9MDtyZXR1cm4gc2V0SW50ZXJ2YWwoKCk9PnswPT09YT9pPmUmJihvKj0yLG4obyksbz44NjQwMCYmKG89ODY0MDApLGE9byk6KGEtPTEsMD09PWEmJnQoKSksaT0wfSwxZTMpLnVucmVmKCksKCk9PntpKz0xfX0oZSxhc3luYygpPT57cygiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9LGFzeW5jIGU9PntzKGBSYXRlLWxpbWl0IGV4Y2VlZGVkLiBEaXNhYmxpbmcgY2FwdHVyaW5nIG9mIGNhdWdodCBleGNlcHRpb25zIGZvciAke2V9IHNlY29uZHMuYCksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJ1bmNhdWdodCJ9KX0pfX0pKCkuY2F0Y2goZT0+e3MoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSxzZXRJbnRlcnZhbCgoKT0+e30sMWU0KTs=";function pi(...e){d.log("[LocalVariables]",...e)}var fi=((e={})=>{function t(s,i){let a=(s.stacktrace?.frames||[]).filter(c=>c.function!=="new Promise");for(let c=0;c<a.length;c++){let u=a.length-c-1,p=i[c],f=a[u];if(!f||!p)break;p.vars===void 0||f.in_app===!1&&e.includeOutOfAppFrames!==!0||!sn(f.function,p.function)||(f.vars=p.vars)}}function n(s,i){if(i.originalException&&typeof i.originalException=="object"&&ht in i.originalException&&Array.isArray(i.originalException[ht])){for(let a of s.exception?.values||[])t(a,i.originalException[ht]);i.originalException[ht]=void 0}return s}async function r(){let s=await import("node:inspector");s.url()||s.open(0)}function o(s){let i=new dp(new URL(`data:application/javascript;base64,${lp}`),{workerData:s,execArgv:[],env:{...process.env,NODE_OPTIONS:void 0}});process.on("exit",()=>{i.terminate()}),i.once("error",a=>{pi("Worker error",a)}),i.once("exit",a=>{pi("Worker exit",a)}),i.unref()}return{name:"LocalVariablesAsync",async setup(s){if(!s.getOptions().includeLocalVariables)return;if(await on()){d.warn("Local variables capture has been disabled because the debugger was already enabled");return}let a={...e,debug:d.isEnabled()};r().then(()=>{try{o(a)}catch(c){d.error("Failed to start worker",c)}},c=>{d.error("Failed to start inspector",c)})},processEvent(s,i){return n(s,i)}}});function di(e){if(e!==void 0)return e.slice(-10).reduce((t,n)=>`${t},${n.function},${n.lineno},${n.colno}`,"")}function mp(e,t){if(t!==void 0)return di(e(t,1))}function li(e){let t=[],n=!1;function r(i){t=[],!n&&(n=!0,e(i))}t.push(r);function o(i){t.push(i)}function s(i){let a=t.pop()||r;try{a(i)}catch{r(i)}}return{add:o,next:s}}var dr=class e{constructor(t){this._session=t}static async create(t){if(t)return t;let n=await import("node:inspector");return new e(new n.Session)}configureAndConnect(t,n){this._session.connect(),this._session.on("Debugger.paused",r=>{t(r,()=>{this._session.post("Debugger.resume")})}),this._session.post("Debugger.enable"),this._session.post("Debugger.setPauseOnExceptions",{state:n?"all":"uncaught"})}setPauseOnExceptions(t){this._session.post("Debugger.setPauseOnExceptions",{state:t?"all":"uncaught"})}getLocalVariables(t,n){this._getProperties(t,r=>{let{add:o,next:s}=li(n);for(let i of r)if(i.value?.objectId&&i.value.className==="Array"){let a=i.value.objectId;o(c=>this._unrollArray(a,i.name,c,s))}else if(i.value?.objectId&&i.value.className==="Object"){let a=i.value.objectId;o(c=>this._unrollObject(a,i.name,c,s))}else i.value&&o(a=>this._unrollOther(i,a,s));s({})})}_getProperties(t,n){this._session.post("Runtime.getProperties",{objectId:t,ownProperties:!0},(r,o)=>{n(r?[]:o.result)})}_unrollArray(t,n,r,o){this._getProperties(t,s=>{r[n]=s.filter(i=>i.name!=="length"&&!isNaN(parseInt(i.name,10))).sort((i,a)=>parseInt(i.name,10)-parseInt(a.name,10)).map(i=>i.value?.value),o(r)})}_unrollObject(t,n,r,o){this._getProperties(t,s=>{r[n]=s.map(i=>[i.name,i.value?.value]).reduce((i,[a,c])=>(i[a]=c,i),{}),o(r)})}_unrollOther(t,n,r){t.value&&("value"in t.value?t.value.value===void 0||t.value.value===null?n[t.name]=`<${t.value.value}>`:n[t.name]=t.value.value:"description"in t.value&&t.value.type!=="function"?n[t.name]=`<${t.value.description}>`:t.value.type==="undefined"&&(n[t.name]="<undefined>")),r(n)}},gp="LocalVariables",_p=((e={},t)=>{let n=new ue(20),r,o=!1;function s(u){let p=di(u.stacktrace?.frames);if(p===void 0)return;let f=n.remove(p);if(f===void 0)return;let l=(u.stacktrace?.frames||[]).filter(m=>m.function!=="new Promise");for(let m=0;m<l.length;m++){let _=l.length-m-1,S=f[m],E=l[_];if(!E||!S)break;S.vars===void 0||E.in_app===!1&&e.includeOutOfAppFrames!==!0||!sn(E.function,S.function)||(E.vars=S.vars)}}function i(u){for(let p of u.exception?.values||[])s(p);return u}let a;async function c(){let p=T()?.getOptions();if(!p?.includeLocalVariables)return;if(ai<18){d.log("The `LocalVariables` integration is only supported on Node >= v18.");return}if(await on()){d.warn("Local variables capture has been disabled because the debugger was already enabled");return}try{let l=await dr.create(t),m=(S,{params:{reason:E,data:N,callFrames:C}},j)=>{if(E!=="exception"&&E!=="promiseRejection"){j();return}r?.();let Ee=mp(S,N.description);if(Ee==null){j();return}let{add:Te,next:fe}=li(U=>{n.set(Ee,U),j()});for(let U=0;U<Math.min(C.length,5);U++){let{scopeChain:Ci,functionName:Ir,this:un}=C[U],yr=Ci.find(Ie=>Ie.type==="local"),br=un.className==="global"||!un.className?Ir:`${un.className}.${Ir}`;if(yr?.object.objectId===void 0)Te(Ie=>{Ie[U]={function:br},fe(Ie)});else{let Ie=yr.object.objectId;Te(xr=>l.getLocalVariables(Ie,vi=>{xr[U]={function:br,vars:vi},fe(xr)}))}}fe([])},_=e.captureAllExceptions!==!1;if(l.configureAndConnect((S,E)=>m(p.stackParser,S,E),_),_){let S=e.maxExceptionsPerSecond||50;r=ui(S,()=>{d.log("Local variables rate-limit lifted."),l.setPauseOnExceptions(!0)},E=>{d.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${E} seconds.`),l.setPauseOnExceptions(!1)})}o=!0}catch(l){d.log("The `LocalVariables` integration failed to start.",l)}}return{name:gp,setupOnce(){a=c()},async processEvent(u){return await a,o?i(u):u},_getCachedFramesCount(){return n.size},_getFirstCachedFrame(){return n.values()[0]}}}),mi=_p;var lr=(e={})=>nn.major<19?mi(e):fi(e);function gi(){try{return typeof module<"u"&&typeof module.exports<"u"}catch{return!1}}import{isMainThread as Sp}from"worker_threads";var hp=2e3;function St(e){x(()=>{console.error(e)});let t=T();if(t===void 0){A&&d.warn("No NodeClient was defined, we are exiting the process now."),global.process.exit(1);return}let n=t.getOptions(),r=n?.shutdownTimeout&&n.shutdownTimeout>0?n.shutdownTimeout:hp;t.close(r).then(o=>{o||A&&d.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},o=>{A&&d.error(o)})}var Ep="OnUncaughtException",mr=(e={})=>{let t={exitEvenIfOtherHandlersAreRegistered:!1,...e};return{name:Ep,setup(n){Sp&&global.process.on("uncaughtException",Tp(n,t))}}};function Tp(e,t){let r=!1,o=!1,s=!1,i,a=e.getOptions();return Object.assign(c=>{let u=St;t.onFatalError?u=t.onFatalError:a.onFatalError&&(u=a.onFatalError);let f=global.process.listeners("uncaughtException").filter(m=>m.name!=="domainUncaughtExceptionClear"&&m.tag!=="sentry_tracingErrorCallback"&&m._errorHandler!==!0).length===0,l=t.exitEvenIfOtherHandlersAreRegistered||f;r?l&&(s?(A&&d.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),St(c)):o||(o=!0,setTimeout(()=>{s||(s=!0,u(i,c))},2e3))):(i=c,r=!0,T()===e&&ae(c,{originalException:c,captureContext:{level:"fatal"},mechanism:{handled:!1,type:"auto.node.onuncaughtexception"}}),!s&&l&&(s=!0,u(c)))},{_errorHandler:!0})}var Ip="OnUnhandledRejection",yp=[{name:"AI_NoOutputGeneratedError"},{name:"AbortError"}],bp=((e={})=>{let t={mode:e.mode??"warn",ignore:[...yp,...e.ignore??[]]};return{name:Ip,setup(n){global.process.on("unhandledRejection",Ap(n,t))}}}),gr=bp;function xp(e){if(typeof e!="object"||e===null)return{name:"",message:String(e??"")};let t=e,n=typeof t.name=="string"?t.name:"",r=typeof t.message=="string"?t.message:String(e);return{name:n,message:r}}function Np(e,t){let n=e.name===void 0||W(t.name,e.name,!0),r=e.message===void 0||W(t.message,e.message);return n&&r}function Rp(e,t){let n=xp(t);return e.some(r=>Np(r,n))}function Ap(e,t){return function(r,o){if(T()!==e||Rp(t.ignore??[],r))return;let s=t.mode==="strict"?"fatal":"error",i=r&&typeof r=="object"?r._sentry_active_span:void 0;(i?c=>Yt(i,c):c=>c())(()=>{ae(r,{originalException:r,captureContext:{extra:{unhandledPromiseRejection:!0},level:s},mechanism:{handled:!1,type:"auto.node.onunhandledrejection"}})}),Cp(r,t.mode)}}function Cp(e,t){let n="This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:";t==="warn"?x(()=>{console.warn(n),console.error(e&&typeof e=="object"&&"stack"in e?e.stack:e)}):t==="strict"&&(x(()=>{console.warn(n)}),St(e))}import*as _i from"node:http";var _r="Spotlight",vp=((e={})=>{let t={sidecarUrl:e.sidecarUrl||"http://localhost:8969/stream"};return{name:_r,setup(n){try{process.env.NODE_ENV&&process.env.NODE_ENV!=="development"&&d.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?")}catch{}Op(n,t)}}}),hi=vp;function Op(e,t){let n=Lp(t.sidecarUrl);if(!n)return;let r=0;e.on("beforeEnvelope",o=>{if(r>3){d.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests");return}let s=it(o);we(()=>{let i=_i.request({method:"POST",path:n.pathname,hostname:n.hostname,port:n.port,headers:{"Content-Type":"application/x-sentry-envelope"}},a=>{a.statusCode&&a.statusCode>=200&&a.statusCode<400&&(r=0),a.on("data",()=>{}),a.on("end",()=>{}),a.setEncoding("utf8")});i.on("error",()=>{r++,d.warn("[Spotlight] Failed to send envelope to Spotlight Sidecar")}),i.write(s),i.end()})})}function Lp(e){try{return new URL(`${e}`)}catch{d.warn(`[Spotlight] Invalid sidecar URL: ${e}`);return}}var hr=(e={})=>({name:"Console",setup(t){process.env.LAMBDA_TASK_ROOT&&z("console",Mp),ar({...e,filter:[...e.filter||[],"[DEP0205] DeprecationWarning"]}).setup?.(t)}});function Mp(){let e=h?.console;e&&de.forEach(t=>{t in e&&Up(e,t)})}function Up(e,t){let n=e[t];w[t]=n;let r=n,o,s=!1,i=function(...c){if(s){n.apply(e,c);return}s=!0;try{Y("console",{args:c,level:t}),r.apply(e,c)}finally{s=!1}};Rt(i,n);let a=n.bind(e);w[t]=a;try{let c=i;Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){return c},set(u){u===i?(o!==void 0&&(r=o,o=void 0),c=i):u===a?(o=r,c=a):typeof u=="function"&&!u.__sentry_original__?(r=u,c=i):c=u}})}catch{ze(e,t,function(c){return w[t]=c,function(...u){Y("console",{args:u,level:t}),w[t]?.apply(this,u)}})}}import{posix as kp,sep as Pp}from"node:path";function Si(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function Ei(e=process.argv[1]?ir(process.argv[1]):process.cwd(),t=Pp==="\\"){let n=t?Si(e):e;return r=>{if(!r)return;let o=t?Si(r):r,{dir:s,base:i,ext:a}=kp.parse(o);(a===".js"||a===".mjs"||a===".cjs")&&(i=i.slice(0,a.length*-1));let c=decodeURIComponent(i);s||(s=".");let u=s.lastIndexOf("/node_modules");if(u>-1)return`${s.slice(u+14).replace(/\//g,".")}:${c}`;if(s.startsWith(n)){let p=s.slice(n.length+1).replace(/\//g,".");return p?`${p}:${c}`:c}return c}}function Ti(e){if(process.env.SENTRY_RELEASE)return process.env.SENTRY_RELEASE;if(h.SENTRY_RELEASE?.id)return h.SENTRY_RELEASE.id;let t=process.env.GITHUB_SHA||process.env.CI_MERGE_REQUEST_SOURCE_BRANCH_SHA||process.env.CI_BUILD_REF||process.env.CI_COMMIT_SHA||process.env.BITBUCKET_COMMIT,n=process.env.APPVEYOR_PULL_REQUEST_HEAD_COMMIT||process.env.APPVEYOR_REPO_COMMIT||process.env.CODEBUILD_RESOLVED_SOURCE_VERSION||process.env.AWS_COMMIT_ID||process.env.BUILD_SOURCEVERSION||process.env.GIT_CLONE_COMMIT_HASH||process.env.BUDDY_EXECUTION_REVISION||process.env.BUILDKITE_COMMIT||process.env.CIRCLE_SHA1||process.env.CIRRUS_CHANGE_IN_REPO||process.env.CF_REVISION||process.env.CM_COMMIT||process.env.CF_PAGES_COMMIT_SHA||process.env.DRONE_COMMIT_SHA||process.env.FC_GIT_COMMIT_SHA||process.env.HEROKU_TEST_RUN_COMMIT_VERSION||process.env.HEROKU_BUILD_COMMIT||process.env.HEROKU_SLUG_COMMIT||process.env.RAILWAY_GIT_COMMIT_SHA||process.env.RENDER_GIT_COMMIT||process.env.SEMAPHORE_GIT_SHA||process.env.TRAVIS_PULL_REQUEST_SHA||process.env.VERCEL_GIT_COMMIT_SHA||process.env.VERCEL_GITHUB_COMMIT_SHA||process.env.VERCEL_GITLAB_COMMIT_SHA||process.env.VERCEL_BITBUCKET_COMMIT_SHA||process.env.ZEIT_GITHUB_COMMIT_SHA||process.env.ZEIT_GITLAB_COMMIT_SHA||process.env.ZEIT_BITBUCKET_COMMIT_SHA,r=process.env.CI_COMMIT_ID||process.env.SOURCE_COMMIT||process.env.SOURCE_VERSION||process.env.GIT_COMMIT||process.env.COMMIT_REF||process.env.BUILD_VCS_NUMBER||process.env.CI_COMMIT_SHA;return t||n||r||e}var Ii=yt(cr(Ei()));import*as wp from"node:http";import*as Fp from"node:https";import{Readable as Bp}from"node:stream";import{createGzip as Gp}from"node:zlib";import*as q from"node:net";import*as Er from"node:tls";import*as Sr from"node:http";var V=Symbol("AgentBaseInternalState"),an=class extends Sr.Agent{constructor(t){super(t),this[V]={}}isSecureEndpoint(t){if(t){if(typeof t.secureEndpoint=="boolean")return t.secureEndpoint;if(typeof t.protocol=="string")return t.protocol==="https:"}let{stack:n}=new Error;return typeof n!="string"?!1:n.split(`
15
+ Url: ${Kt(e)}`),!0}return!1}function Ac(e,t){return t?.length?Zt(e).some(n=>ne(n,t)):!1}function Cc(e,t){if(!t?.length)return!1;let n=e.transaction;return n?ne(n,t):!1}function vc(e,t){if(!t?.length)return!1;let n=Kt(e);return n?ne(n,t):!1}function Oc(e,t){if(!t?.length)return!0;let n=Kt(e);return n?ne(n,t):!0}function Lc(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 Kt(e){try{let n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?Lc(n):null}catch{return g&&d.error(`Cannot extract url for event ${re(e)}`),null}}function Mc(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function Ms(e,t,n,r,o,s){if(!o.exception?.values||!s||!J(s.originalException,Error))return;let i=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;i&&(o.exception.values=nr(e,t,r,s.originalException,n,o.exception.values,i,0))}function nr(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(J(r[o],Error)){Os(i,a,r);let u=e(t,r[o]),p=c.length;Ls(u,o,p,a),c=nr(e,t,n,r[o],o,[u,...c],u,p)}return Us(r)&&r.errors.forEach((u,p)=>{if(J(u,Error)){Os(i,a,r);let f=e(t,u),l=c.length;Ls(f,`errors[${p}]`,l,a),c=nr(e,t,n,u,o,[f,...c],f,l)}}),c}function Us(e){return Array.isArray(e.errors)}function Os(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Us(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Ls(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function ks(e,t){return e(t.stack||"",1)}function Uc(e){return Ve(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function kc(e){return Uc(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function rr(e,t){let n={type:t.name||t.constructor.name,value:kc(t)},r=ks(e,t);return r.length&&(n.stacktrace={frames:r}),n}function Pc(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function Dc(e){if("name"in e&&typeof e.name=="string"){let r=`'${e.name}' captured as exception`;return"message"in e&&typeof e.message=="string"&&(r+=` with message '${e.message}'`),r}else if("message"in e&&typeof e.message=="string")return e.message;let t=hn(e);if(kr(e))return`Event \`ErrorEvent\` captured as exception with message \`${e.message}\``;let n=wc(e);return`${n&&n!=="Object"?`'${n}'`:"Object"} captured as exception with keys: ${t}`}function wc(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Fc(e,t,n,r){if(Ve(n))return[n,void 0];if(t.synthetic=!0,te(n)){let s=e?.getOptions().normalizeDepth,i={__serialized__:Fn(n,s)},a=Pc(n);if(a)return[a,i];let c=Dc(n),u=r?.syntheticException||new Error(c);return u.message=c,[u,i]}let o=r?.syntheticException||new Error(n);return o.message=`${n}`,[o,void 0]}function Ps(e,t,n,r){let s=r?.data&&r.data.mechanism||{handled:!0,type:"generic"},[i,a]=Fc(e,s,n,r),c={exception:{values:[rr(t,i)]}};return a&&(c.extra=a),yn(c,void 0,void 0),Ce(c,s),{...c,event_id:r?.event_id}}function Ds(e,t,n="info",r,o){let s={event_id:r?.event_id,level:n};if(o&&r?.syntheticException){let i=ks(e,r.syntheticException);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]},Ce(s,{synthetic:!0}))}if(je(t)){let{__sentry_template_string__:i,__sentry_template_values__:a}=t;return s.logentry={message:i,params:a},s}return s.message=t,s}var Bc="cause",Gc=5,Hc="LinkedErrors",Yc=((e={})=>{let t=e.limit||Gc,n=e.key||Bc;return{name:Hc,preprocessEvent(r,o,s){let i=s.getOptions();Ms(rr,i.stackParser,n,t,r,o)}}}),mt=Yc;function ws(e){let t={},n=0;for(;n<e.length;){let r=e.indexOf("=",n);if(r===-1)break;let o=e.indexOf(";",n);if(o===-1)o=e.length;else if(o<r){n=e.lastIndexOf(";",r-1)+1;continue}let s=e.slice(n,r).trim();if(t[s]===void 0){let i=e.slice(r+1,o).trim();i.charCodeAt(0)===34&&(i=i.slice(1,-1));try{t[s]=i.indexOf("%")!==-1?decodeURIComponent(i):i}catch{t[s]=i}}n=o+1}return t}var or=["X-Client-IP","X-Forwarded-For","Fly-Client-IP","CF-Connecting-IP","Fastly-Client-Ip","True-Client-Ip","X-Real-IP","X-Cluster-Client-IP","X-Forwarded","Forwarded-For","Forwarded","X-Vercel-Forwarded-For"];function sr(e){let t={};for(let s of Object.keys(e))t[s.toLowerCase()]=e[s];return or.map(s=>{let i=t[s.toLowerCase()],a=Array.isArray(i)?i.join(";"):i;return s==="Forwarded"?Wc(a):a?.split(",").map(c=>c.trim())}).reduce((s,i)=>i?s.concat(i):s,[]).find(s=>s!==null&&$c(s))||null}function Wc(e){if(!e)return null;for(let t of e.split(";"))if(t.startsWith("for="))return t.slice(4);return null}function $c(e){return/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/.test(e)}var Vc={cookies:!0,data:!0,headers:!0,query_string:!0,url:!0},jc="RequestData",zc=((e={})=>{let t={...Vc,...e.include};return{name:jc,processEvent(n,r,o){let{sdkProcessingMetadata:s={}}=n,{normalizedRequest:i,ipAddress:a}=s,c={...t,ip:t.ip??o.getOptions().sendDefaultPii};return i&&Zc(n,i,{ipAddress:a},c),n},processSegmentSpan(n,r){let{sdkProcessingMetadata:o={}}=L().getScopeData(),{normalizedRequest:s,ipAddress:i}=o;if(!s)return;let{sendDefaultPii:a}=r.getOptions(),c={...t,ip:t.ip??a};Jc(n,s,i,c,a)}}}),gt=zc;function Zc(e,t,n,r){if(e.request={...e.request,...Fs(t,r)},r.ip){let o=t.headers&&sr(t.headers)||n.ipAddress;o&&(e.user={...e.user,ip_address:o})}}function Jc(e,t,n,r,o){let s=Fs(t,r),i={};if(s.url&&(i["url.full"]=s.url),s.method&&(i["http.request.method"]=s.method),s.query_string&&(i["url.query"]=Xc(s.query_string)),I(e,i),s.cookies&&Object.keys(s.cookies).length>0){let a=Object.entries(s.cookies).map(([u,p])=>`${u}=${p}`).join("; "),c=er({cookie:a},o??!1,"request");I(e,c)}if(s.headers){let a=er(s.headers,o??!1,"request");I(e,a)}if(s.data!=null){let a=typeof s.data=="string"?s.data:JSON.stringify(s.data);a&&I(e,{"http.request.body.data":a})}if(r.ip){let a=t.headers&&sr(t.headers)||n||void 0;a&&I(e,{[Lt]:a})}}function Fs(e,t){let n={},r={...e.headers};if(t.headers&&(n.headers=r,t.cookies||delete r.cookie,!t.ip)){let o=new Set(or.map(s=>s.toLowerCase()));for(let s of Object.keys(r))o.has(s.toLowerCase())&&delete r[s]}if(n.method=e.method,t.url&&(n.url=e.url),t.cookies){let o=e.cookies||(r?.cookie?ws(r.cookie):void 0);n.cookies=o||{}}return t.query_string&&(n.query_string=e.query_string),t.data&&(n.data=e.data),n}function Xc(e){return typeof e=="string"?e||void 0:(Array.isArray(e)?e:Object.entries(e)).map(([r,o])=>`${r}=${o}`).join("&")||void 0}var qt=new Set([]);function Bs(e){let t="console",n=le(t,e);return z(t,Kc),n}function Gs(e){for(let t of e)qt.add(t);return()=>{for(let t of e)qt.delete(t)}}function Kc(){"console"in h&&de.forEach(function(e){e in h.console&&ze(h.console,e,function(t){return w[e]=t,function(...n){let r=n[0],o=w[e],s=qt.size&&typeof r=="string"&&ne(r,qt);s||Y("console",{args:n,level:e}),(!s||g&&d.isEnabled())&&o?.apply(h.console,n)}})})}function Hs(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var qc=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Qc(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=qc.exec(t);return n?n.slice(1):[]}function ir(e){let t=Qc(e),n=t[0]||"",r=t[1];return!n&&!r?".":(r&&(r=r.slice(0,r.length-1)),n+r)}var eu="Console",ar=(e={})=>{let t=new Set(e.levels||de);return{name:eu,setup(n){let r=Bs(({args:o,level:s})=>{T()!==n||!t.has(s)||tu(s,o)});if(n.registerCleanup(r),e.filter){let o=Gs(e.filter);n.registerCleanup(o)}}}};function tu(e,t){let n={category:"console",data:{arguments:t,logger:"console"},level:Hs(e),message:Ys(t)};if(e==="assert")if(t[0]===!1){let r=t.slice(1);n.message=r.length>0?`Assertion failed: ${Ys(r)}`:"Assertion failed",n.data.arguments=r}else return;tr(n,{input:t,level:e})}function Ys(e){return"util"in h&&typeof h.util.format=="function"?h.util.format(...e):En(e," ")}function Ws(e,t,n){let r=n.getOptions(),o=n.getDsn(),s=r.tunnel,i=De(r._metadata),a={sent_at:new Date().toISOString(),...nu(t)&&{trace:t},...i&&{sdk:i},...!!s&&o&&{dsn:M(o)}},c=r.sendDefaultPii?"auto":"never",u=[{type:"span",item_count:e.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,...ce()&&{ingest_settings:{infer_ip:c,infer_user_agent:c}},items:e}];return R(a,[u])}function nu(e){return!!e.trace_id&&!!e.public_key}function $s(e){let t=156;if(t+=e.name.length*2,t+=Cn(e.attributes),e.links&&e.links.length>0){let r=e.links[0]?.attributes,o=100+(r?Cn(r):0);t+=o*e.links.length}return t}var Vs=1e3,ru=5e6,Qt=class{constructor(t,n){this._traceBuckets=new Map,this._client=t;let{maxSpanLimit:r,flushInterval:o,maxTraceWeightInBytes:s}=n??{};this._maxSpanLimit=r&&r>0&&r<=Vs?r:Vs,this._flushInterval=o&&o>0?o:5e3,this._maxTraceWeight=s&&s>0?s:ru,this._client.on("flush",()=>{this.drain()}),this._client.on("close",()=>{this._traceBuckets.forEach(i=>{clearTimeout(i.timeout)}),this._traceBuckets.clear()})}add(t){let n=t.trace_id,r=this._traceBuckets.get(n);r||(r={spans:new Set,size:0,timeout:Ge(setTimeout(()=>{this.flush(n)},this._flushInterval))},this._traceBuckets.set(n,r)),r.spans.add(t),r.size+=$s(t),(r.spans.size>=this._maxSpanLimit||r.size>=this._maxTraceWeight)&&this.flush(n)}drain(){this._traceBuckets.size&&(g&&d.log(`Flushing span tree map with ${this._traceBuckets.size} traces`),this._traceBuckets.forEach((t,n)=>{this.flush(n)}))}flush(t){let n=this._traceBuckets.get(t);if(!n)return;if(!n.spans.size){this._removeTrace(t);return}let r=Array.from(n.spans),o=r[0]?._segmentSpan;if(!o){g&&d.warn("No segment span reference found on span JSON, cannot compute DSC"),this._removeTrace(t);return}let s=ke(o),i=r.map(c=>{let{_segmentSpan:u,...p}=c;return p}),a=Ws(i,s,this._client);g&&d.log(`Sending span envelope for trace ${t} with ${i.length} spans`),this._client.sendEnvelope(a).then(null,c=>{g&&d.error("Error while sending streamed span envelope:",c)}),this._removeTrace(t)}_removeTrace(t){let n=this._traceBuckets.get(t);n&&clearTimeout(n.timeout),this._traceBuckets.delete(t)}};var en=()=>({name:"SpanStreaming",setup(e){let t="SpanStreaming integration requires",n="Falling back to static trace lifecycle.",r=e.getOptions();if(!Ht(e)){r.traceLifecycle="static",g&&d.warn(`${t} \`traceLifecycle\` to be set to "stream"! ${n}`);return}let o=r.beforeSendSpan;if(o&&!Pe(o)){r.traceLifecycle="static",g&&d.warn(`${t} a beforeSendSpan callback using \`withStreamedSpan\`! ${n}`);return}let s=new Qt(e);e.on("afterSpanEnd",i=>{wt(i)&&s.add(Vn(i,e))})}});var ue=class{constructor(t){this._maxSize=t,this._cache=new Map}get size(){return this._cache.size}get(t){let n=this._cache.get(t);if(n!==void 0)return this._cache.delete(t),this._cache.set(t,n),n}set(t,n){if(this._cache.size>=this._maxSize){let r=this._cache.keys().next().value;this._cache.delete(r)}this._cache.set(t,n)}remove(t){let n=this._cache.get(t);return n&&this._cache.delete(t),n}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){let t=[];return this._cache.forEach(n=>t.push(n)),t}};function js(e){let t=e._metadata?.sdk,n=t?.name&&t?.version?`${t?.name}/${t?.version}`:void 0;e.transportOptions={...e.transportOptions,headers:{...n&&{"user-agent":n},...e.transportOptions?.headers}}}var _t=class e extends Xt{__init(){this._disposeCallbacks=[]}constructor(t){xo(),js(t),super(t),e.prototype.__init.call(this),this._setUpMetricsProcessing()}eventFromException(t,n){let r=Ps(this,this._options.stackParser,t,n);return r.level="error",K(r)}eventFromMessage(t,n="info",r){return K(Ds(this._options.stackParser,t,n,r,this._options.attachStacktrace))}captureException(t,n,r){return zs(n),super.captureException(t,n,r)}captureEvent(t,n,r){return!t.type&&t.exception?.values&&t.exception.values.length>0&&zs(n),super.captureEvent(t,n,r)}captureCheckIn(t,n,r){let o="checkInId"in t&&t.checkInId?t.checkInId:b();if(!this._isEnabled())return g&&d.warn("SDK not enabled, will not capture check-in."),o;let s=this.getOptions(),{release:i,environment:a,tunnel:c}=s,u={check_in_id:o,monitor_slug:t.monitorSlug,status:t.status,release:i,environment:a};"duration"in t&&(u.duration=t.duration),n&&(u.monitor_config={schedule:n.schedule,checkin_margin:n.checkinMargin,max_runtime:n.maxRuntime,timezone:n.timezone,failure_issue_threshold:n.failureIssueThreshold,recovery_threshold:n.recoveryThreshold});let[p,f]=Ko(this,r);f&&(u.contexts={trace:f});let l=bs(u,p,this.getSdkMetadata(),c,this.getDsn());return g&&d.log("Sending checkin:",t.monitorSlug,t.status),this.sendEnvelope(l),o}registerCleanup(t){this._disposeCallbacks.push(t)}dispose(){g&&d.log("Disposing client...");for(let t of this._disposeCallbacks)try{t()}catch{}this._disposeCallbacks.length=0;for(let t of Object.keys(this._hooks))this._hooks[t]?.clear();this._hooks={},this._eventProcessors.length=0,this._integrations={},this._outcomes={},this._transport=void 0,this._promiseBuffer=He(pt)}_prepareEvent(t,n,r,o){return this._options.platform&&(t.platform=t.platform||this._options.platform),this._options.runtime&&(t.contexts={...t.contexts,runtime:t.contexts?.runtime||this._options.runtime}),this._options.serverName&&(t.server_name=t.server_name||this._options.serverName),super._prepareEvent(t,n,r,o)}_setUpMetricsProcessing(){this.on("processMetric",t=>{this._options.serverName&&(t.attributes={"server.address":this._options.serverName,...t.attributes})})}};function zs(e){let t=L().getScopeData().sdkProcessingMetadata.requestSession;if(t){let n=e?.mechanism?.handled??!0;n&&t.status!=="crashed"?t.status="errored":n||(t.status="crashed")}}function Xs(e,t=!1){return!(t||e&&!e.startsWith("/")&&!e.match(/^[A-Z]:/)&&!e.startsWith(".")&&!e.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&e!==void 0&&!e.includes("node_modules/")}function Ks(e){let t=/^\s*[-]{4,}$/,n=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/,r=/at (?:async )?(.+?) \(data:(.*?),/;return o=>{let s=o.match(r);if(s)return{filename:`<data:${s[2]}>`,function:s[1]};let i=o.match(n);if(i){let a,c,u,p,f;if(i[1]){u=i[1];let S=u.lastIndexOf(".");if(u[S-1]==="."&&S--,S>0){a=u.slice(0,S),c=u.slice(S+1);let E=a.indexOf(".Module");E>0&&(u=u.slice(E+1),a=a.slice(0,E))}p=void 0}c&&(p=a,f=c),c==="<anonymous>"&&(f=void 0,u=void 0),u===void 0&&(f=f||"?",u=p?`${p}.${f}`:f);let l=vr(i[2]),m=i[5]==="native";!l&&i[5]&&!m&&(l=i[5]);let _=l?ou(l):void 0;return{filename:_??l,module:_&&e?.(_),function:u,lineno:Zs(i[3]),colno:Zs(i[4]),in_app:Xs(l||"",m)}}if(o.match(t))return{filename:o}}}function cr(e){return[90,Ks(e)]}function Zs(e){return parseInt(e||"",10)||void 0}function ou(e){try{return decodeURI(e)}catch{return}}import{threadId as Au,isMainThread as Cu}from"worker_threads";var A=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var vu=6e4,tn=class extends _t{constructor(t){let n=t.includeServerName===!1?void 0:t.serverName||global.process.env.SENTRY_NAME||qs.hostname(),r={...t,platform:"node",runtime:{name:"node",version:global.process.version},serverName:n};dt(r,"node-light",["node-core"]),d.log(`Initializing Sentry: process: ${process.pid}, thread: ${Cu?"main":`worker-${Au}`}.`),super(r),this.getOptions().enableLogs&&(this._logOnExitFlushListener=()=>{Be(this)},n&&this.on("beforeCaptureLog",o=>{o.attributes={...o.attributes,"server.address":n}}),process.on("beforeExit",this._logOnExitFlushListener))}async flush(t){return this.getOptions().sendClientReports&&this._flushOutcomes(),super.flush(t)}async close(t){return this._clientReportInterval&&clearInterval(this._clientReportInterval),this._clientReportOnExitFlushListener&&process.off("beforeExit",this._clientReportOnExitFlushListener),this._logOnExitFlushListener&&process.off("beforeExit",this._logOnExitFlushListener),super.close(t)}startClientReportTracking(){let t=this.getOptions();t.sendClientReports&&(this._clientReportOnExitFlushListener=()=>{this._flushOutcomes()},this._clientReportInterval=setInterval(()=>{A&&d.log("Flushing client reports based on interval."),this._flushOutcomes()},t.clientReportFlushInterval??vu).unref(),process.on("beforeExit",this._clientReportOnExitFlushListener))}};import{execFile as Ou}from"node:child_process";import{readFile as Lu,readdir as Mu}from"node:fs";import*as y from"node:os";import{join as Uu}from"node:path";import{promisify as ti}from"node:util";var ku=ti(Lu),Pu=ti(Mu),Du="Context",wu=((e={})=>{let t={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0,...e},n=t.app?Yu():void 0,r=t.device?Wu(t.device):void 0,o=t.culture?Hu():void 0,s=t.cloudResource?Ju():void 0,i=t.os?Gu():void 0,a={"process.runtime.engine.name":"v8","process.runtime.engine.version":process.versions.v8,...Qs({app:n,device:r,culture:o,cloud_resource:s})};i&&i.then(p=>Object.assign(a,Qs({os:p}))).catch(()=>{});let c=(async()=>{let p={};return i&&(p.os=await i),n&&(p.app=n),r&&(p.device=r),o&&(p.culture=o),s&&(p.cloud_resource=s),p})();async function u(p){let f=Fu(await c);return p.contexts={...p.contexts,app:{...f.app,...p.contexts?.app},os:{...f.os,...p.contexts?.os},device:{...f.device,...p.contexts?.device},culture:{...f.culture,...p.contexts?.culture},cloud_resource:{...f.cloud_resource,...p.contexts?.cloud_resource}},p}return{name:Du,processEvent(p){return u(p)},processSegmentSpan(p){I(p,a),I(p,Bu(n,r))}}}),ur=wu;function Fu(e){if(e.app?.app_memory&&(e.app.app_memory=process.memoryUsage().rss),e.app?.free_memory&&typeof process.availableMemory=="function"){let t=process.availableMemory?.();t!=null&&(e.app.free_memory=t)}return e.device?.free_memory&&(e.device.free_memory=y.freemem()),e}function Qs(e){let t={},{app:n,device:r,os:o,culture:s,cloud_resource:i}=e;if(n&&n.app_start_time&&(t["app.start_time"]=n.app_start_time),r&&(r.arch&&(t["device.archs"]=[r.arch]),r.boot_time&&(t["device.boot_time"]=r.boot_time),r.memory_size!=null&&(t["device.memory_size"]=r.memory_size),r.processor_count!=null&&(t["device.processor_count"]=r.processor_count),r.cpu_description&&(t["device.cpu_description"]=r.cpu_description),r.processor_frequency!=null&&(t["device.processor_frequency"]=r.processor_frequency)),o&&(o.name&&(t["os.name"]=o.name),o.version&&(t["os.version"]=o.version),o.kernel_version&&(t["os.kernel_version"]=o.kernel_version),o.build&&(t["os.build"]=o.build)),s&&(s.locale&&(t["culture.locale"]=s.locale),s.timezone&&(t["culture.timezone"]=s.timezone)),i)for(let[a,c]of Object.entries(i))c!=null&&(t[a]=c);return t}function Bu(e,t){let n={};if(e&&(n["app.memory"]=process.memoryUsage().rss,typeof process.availableMemory=="function")){let r=process.availableMemory?.();r!=null&&(n["app.free_memory"]=r)}return t?.free_memory!=null&&(n["device.free_memory"]=y.freemem()),n}async function Gu(){let e=y.platform();switch(e){case"darwin":return zu();case"linux":return Zu();default:return{name:$u[e]||e,version:y.release()}}}function Hu(){try{if(typeof process.versions.icu!="string")return;let e=new Date(9e8);if(new Intl.DateTimeFormat("es",{month:"long"}).format(e)==="enero"){let n=Intl.DateTimeFormat().resolvedOptions();return{locale:n.locale,timezone:n.timeZone}}}catch{}}function Yu(){let e=process.memoryUsage().rss,n={app_start_time:new Date(Date.now()-process.uptime()*1e3).toISOString(),app_memory:e};if(typeof process.availableMemory=="function"){let r=process.availableMemory?.();r!=null&&(n.free_memory=r)}return n}function Wu(e){let t={},n;try{n=y.uptime()}catch{}if(typeof n=="number"&&(t.boot_time=new Date(Date.now()-n*1e3).toISOString()),t.arch=y.arch(),(e===!0||e.memory)&&(t.memory_size=y.totalmem(),t.free_memory=y.freemem()),e===!0||e.cpu){let r=y.cpus(),o=r?.[0];o&&(t.processor_count=r.length,t.cpu_description=o.model,t.processor_frequency=o.speed)}return t}var $u={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows",ohos:"OpenHarmony",android:"Android"},Vu=[{name:"fedora-release",distros:["Fedora"]},{name:"redhat-release",distros:["Red Hat Linux","Centos"]},{name:"redhat_version",distros:["Red Hat Linux"]},{name:"SuSE-release",distros:["SUSE Linux"]},{name:"lsb-release",distros:["Ubuntu Linux","Arch Linux"]},{name:"debian_version",distros:["Debian"]},{name:"debian_release",distros:["Debian"]},{name:"arch-release",distros:["Arch Linux"]},{name:"gentoo-release",distros:["Gentoo Linux"]},{name:"novell-release",distros:["SUSE Linux"]},{name:"alpine-release",distros:["Alpine Linux"]}],ju={alpine:e=>e,arch:e=>$(/distrib_release=(.*)/,e),centos:e=>$(/release ([^ ]+)/,e),debian:e=>e,fedora:e=>$(/release (..)/,e),mint:e=>$(/distrib_release=(.*)/,e),red:e=>$(/release ([^ ]+)/,e),suse:e=>$(/VERSION = (.*)\n/,e),ubuntu:e=>$(/distrib_release=(.*)/,e)};function $(e,t){let n=e.exec(t);return n?n[1]:void 0}async function zu(){let e={kernel_version:y.release(),name:"Mac OS X",version:`10.${Number(y.release().split(".")[0])-4}`};try{let t=await new Promise((n,r)=>{Ou("/usr/bin/sw_vers",(o,s)=>{if(o){r(o);return}n(s)})});e.name=$(/^ProductName:\s+(.*)$/m,t),e.version=$(/^ProductVersion:\s+(.*)$/m,t),e.build=$(/^BuildVersion:\s+(.*)$/m,t)}catch{}return e}function ei(e){return e.split(" ")[0].toLowerCase()}async function Zu(){let e={kernel_version:y.release(),name:"Linux"};try{let t=await Pu("/etc"),n=Vu.find(a=>t.includes(a.name));if(!n)return e;let r=Uu("/etc",n.name),o=(await ku(r,{encoding:"utf-8"})).toLowerCase(),{distros:s}=n;e.name=s.find(a=>o.indexOf(ei(a))>=0)||s[0];let i=ei(e.name);e.version=ju[i]?.(o)}catch{}return e}function Ju(){return process.env.VERCEL?{"cloud.provider":"vercel","cloud.region":process.env.VERCEL_REGION}:process.env.AWS_REGION?{"cloud.provider":"aws","cloud.region":process.env.AWS_REGION,"cloud.platform":process.env.AWS_EXECUTION_ENV}:process.env.GCP_PROJECT?{"cloud.provider":"gcp"}:process.env.ALIYUN_REGION_ID?{"cloud.provider":"alibaba_cloud","cloud.region":process.env.ALIYUN_REGION_ID}:process.env.WEBSITE_SITE_NAME&&process.env.REGION_NAME?{"cloud.provider":"azure","cloud.region":process.env.REGION_NAME}:process.env.IBM_CLOUD_REGION?{"cloud.provider":"ibm_cloud","cloud.region":process.env.IBM_CLOUD_REGION}:process.env.TENCENTCLOUD_REGION?{"cloud.provider":"tencent_cloud","cloud.region":process.env.TENCENTCLOUD_REGION,"cloud.account.id":process.env.TENCENTCLOUD_APPID,"cloud.availability_zone":process.env.TENCENTCLOUD_ZONE}:process.env.NETLIFY?{"cloud.provider":"netlify"}:process.env.FLY_REGION?{"cloud.provider":"fly.io","cloud.region":process.env.FLY_REGION}:process.env.DYNO?{"cloud.provider":"heroku"}:void 0}import{createReadStream as Xu}from"node:fs";import{createInterface as Ku}from"node:readline";var pr=new ue(10),oi=new ue(20),qu=7,Qu="ContextLines",ep=1e3,tp=1e4;function np(e,t,n){let r=e.get(t);return r===void 0?(e.set(t,n),n):r}function rp(e){return!!(e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:"))}function op(e){return e.lineno!==void 0&&e.lineno>tp||e.colno!==void 0&&e.colno>ep}function sp(e,t){let n=pr.get(e);if(n===void 0)return!1;for(let r=t[0];r<=t[1];r++)if(n[r]===void 0)return!1;return!0}function ip(e,t){if(!e.length)return[];let n=0,r=e[0];if(typeof r!="number")return[];let o=ri(r,t),s=[];for(;;){if(n===e.length-1){s.push(o);break}let i=e[n+1];if(typeof i!="number")break;i<=o[1]?o[1]=i+t:(s.push(o),o=ri(i,t)),n++}return s}function ap(e,t,n){return new Promise((r,o)=>{let s=Xu(e),i=Ku({input:s});function a(){s.destroy(),r()}let c=0,u=0,p=t[u];if(p===void 0){a();return}let f=p[0],l=p[1];function m(_){oi.set(e,1),A&&d.error(`Failed to read file: ${e}. Error: ${_}`),i.close(),i.removeAllListeners(),a()}s.on("error",m),i.on("error",m),i.on("close",a),i.on("line",_=>{if(c++,!(c<f)&&(n[c]=Sn(_,0),c>=l)){if(u===t.length-1){i.close(),i.removeAllListeners();return}u++;let S=t[u];if(S===void 0){i.close(),i.removeAllListeners();return}f=S[0],l=S[1]}})})}async function cp(e,t){let n={};if(t>0&&e.exception?.values){for(let s of e.exception.values)if(s.stacktrace?.frames?.length)for(let i=s.stacktrace.frames.length-1;i>=0;i--){let a=s.stacktrace.frames[i],c=a?.filename;if(!a||typeof c!="string"||typeof a.lineno!="number"||rp(c)||op(a))continue;n[c]||(n[c]=[]),n[c].push(a.lineno)}}let r=Object.keys(n);if(r.length==0)return e;let o=[];for(let s of r){if(oi.get(s))continue;let i=n[s];if(!i)continue;i.sort((u,p)=>u-p);let a=ip(i,t);if(a.every(u=>sp(s,u)))continue;let c=np(pr,s,{});o.push(ap(s,a,c))}if(await Promise.all(o).catch(()=>{A&&d.log("Failed to read one or more source files and resolve context lines")}),t>0&&e.exception?.values)for(let s of e.exception.values)s.stacktrace?.frames&&s.stacktrace.frames.length>0&&up(s.stacktrace.frames,t,pr);return e}function up(e,t,n){for(let r of e)if(r.filename&&r.context_line===void 0&&typeof r.lineno=="number"){let o=n.get(r.filename);if(o===void 0)continue;pp(r.lineno,r,t,o)}}function ni(e){delete e.pre_context,delete e.context_line,delete e.post_context}function pp(e,t,n,r){if(t.lineno===void 0||r===void 0){A&&d.error("Cannot resolve context for frame with no lineno or file contents");return}t.pre_context=[];for(let s=si(e,n);s<e;s++){let i=r[s];if(i===void 0){ni(t),A&&d.error(`Could not find line ${s} in file ${t.filename}`);return}t.pre_context.push(i)}if(r[e]===void 0){ni(t),A&&d.error(`Could not find line ${e} in file ${t.filename}`);return}t.context_line=r[e];let o=ii(e,n);t.post_context=[];for(let s=e+1;s<=o;s++){let i=r[s];if(i===void 0)break;t.post_context.push(i)}}function si(e,t){return Math.max(1,e-t)}function ii(e,t){return e+t}function ri(e,t){return[si(e,t),ii(e,t)]}var fp=((e={})=>{let t=e.frameContextLines!==void 0?e.frameContextLines:qu;return{name:Qu,processEvent(n){return cp(n,t)}}}),fr=fp;var nn=bn(process.versions.node),ai=nn.major,sE=nn.minor;import{Worker as dp}from"node:worker_threads";var rn;async function on(){if(rn===void 0)try{rn=!!(await import("node:inspector")).url()}catch{rn=!1}return rn}var ht="__SENTRY_ERROR_LOCAL_VARIABLES__";function ui(e,t,n){let r=0,o=5,s=0;return setInterval(()=>{s===0?r>e&&(o*=2,n(o),o>86400&&(o=86400),s=o):(s-=1,s===0&&t()),r=0},1e3).unref(),()=>{r+=1}}function ci(e){return e!==void 0&&(e.length===0||e==="?"||e==="<anonymous>")}function sn(e,t){return e===t||`Object.${e}`===t||e===`Object.${t}`||ci(e)&&ci(t)}var lp="LyohIEBzZW50cnkvbm9kZS1jb3JlIDEwLjUzLjEgKGNkOTc0MDgpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPWdsb2JhbFRoaXMsaT17fTtjb25zdCBvPSJfX1NFTlRSWV9FUlJPUl9MT0NBTF9WQVJJQUJMRVNfXyI7Y29uc3QgYT10O2Z1bmN0aW9uIHMoLi4uZSl7YS5kZWJ1ZyYmZnVuY3Rpb24oZSl7aWYoISgiY29uc29sZSJpbiBuKSlyZXR1cm4gZSgpO2NvbnN0IHQ9bi5jb25zb2xlLG89e30sYT1PYmplY3Qua2V5cyhpKTthLmZvckVhY2goZT0+e2NvbnN0IG49aVtlXTtvW2VdPXRbZV0sdFtlXT1ufSk7dHJ5e3JldHVybiBlKCl9ZmluYWxseXthLmZvckVhY2goZT0+e3RbZV09b1tlXX0pfX0oKCk9PmNvbnNvbGUubG9nKCJbTG9jYWxWYXJpYWJsZXMgV29ya2VyXSIsLi4uZSkpfWFzeW5jIGZ1bmN0aW9uIGMoZSx0LG4saSl7Y29uc3Qgbz1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pO2lbbl09by5yZXN1bHQuZmlsdGVyKGU9PiJsZW5ndGgiIT09ZS5uYW1lJiYhaXNOYU4ocGFyc2VJbnQoZS5uYW1lLDEwKSkpLnNvcnQoKGUsdCk9PnBhcnNlSW50KGUubmFtZSwxMCktcGFyc2VJbnQodC5uYW1lLDEwKSkubWFwKGU9PmUudmFsdWU/LnZhbHVlKX1hc3luYyBmdW5jdGlvbiByKGUsdCxuLGkpe2NvbnN0IG89YXdhaXQgZS5wb3N0KCJSdW50aW1lLmdldFByb3BlcnRpZXMiLHtvYmplY3RJZDp0LG93blByb3BlcnRpZXM6ITB9KTtpW25dPW8ucmVzdWx0Lm1hcChlPT5bZS5uYW1lLGUudmFsdWU/LnZhbHVlXSkucmVkdWNlKChlLFt0LG5dKT0+KGVbdF09bixlKSx7fSl9ZnVuY3Rpb24gdShlLHQpe2UudmFsdWUmJigidmFsdWUiaW4gZS52YWx1ZT92b2lkIDA9PT1lLnZhbHVlLnZhbHVlfHxudWxsPT09ZS52YWx1ZS52YWx1ZT90W2UubmFtZV09YDwke2UudmFsdWUudmFsdWV9PmA6dFtlLm5hbWVdPWUudmFsdWUudmFsdWU6ImRlc2NyaXB0aW9uImluIGUudmFsdWUmJiJmdW5jdGlvbiIhPT1lLnZhbHVlLnR5cGU/dFtlLm5hbWVdPWA8JHtlLnZhbHVlLmRlc2NyaXB0aW9ufT5gOiJ1bmRlZmluZWQiPT09ZS52YWx1ZS50eXBlJiYodFtlLm5hbWVdPSI8dW5kZWZpbmVkPiIpKX1hc3luYyBmdW5jdGlvbiBsKGUsdCl7Y29uc3Qgbj1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pLGk9e307Zm9yKGNvbnN0IHQgb2Ygbi5yZXN1bHQpaWYodC52YWx1ZT8ub2JqZWN0SWQmJiJBcnJheSI9PT10LnZhbHVlLmNsYXNzTmFtZSl7Y29uc3Qgbj10LnZhbHVlLm9iamVjdElkO2F3YWl0IGMoZSxuLHQubmFtZSxpKX1lbHNlIGlmKHQudmFsdWU/Lm9iamVjdElkJiYiT2JqZWN0Ij09PXQudmFsdWUuY2xhc3NOYW1lKXtjb25zdCBuPXQudmFsdWUub2JqZWN0SWQ7YXdhaXQgcihlLG4sdC5uYW1lLGkpfWVsc2UgdC52YWx1ZSYmdSh0LGkpO3JldHVybiBpfWxldCBmOyhhc3luYyBmdW5jdGlvbigpe2NvbnN0IHQ9bmV3IGU7dC5jb25uZWN0VG9NYWluVGhyZWFkKCkscygiQ29ubmVjdGVkIHRvIG1haW4gdGhyZWFkIik7bGV0IG49ITE7dC5vbigiRGVidWdnZXIucmVzdW1lZCIsKCk9PntuPSExfSksdC5vbigiRGVidWdnZXIucGF1c2VkIixlPT57bj0hMCxhc3luYyBmdW5jdGlvbihlLHtyZWFzb246dCxkYXRhOntvYmplY3RJZDpufSxjYWxsRnJhbWVzOml9KXtpZigiZXhjZXB0aW9uIiE9PXQmJiJwcm9taXNlUmVqZWN0aW9uIiE9PXQpcmV0dXJuO2lmKGY/LigpLG51bGw9PW4pcmV0dXJuO2NvbnN0IGE9W107Zm9yKGxldCB0PTA7dDxpLmxlbmd0aDt0Kyspe2NvbnN0e3Njb3BlQ2hhaW46bixmdW5jdGlvbk5hbWU6byx0aGlzOnN9PWlbdF0sYz1uLmZpbmQoZT0+ImxvY2FsIj09PWUudHlwZSkscj0iZ2xvYmFsIiE9PXMuY2xhc3NOYW1lJiZzLmNsYXNzTmFtZT9gJHtzLmNsYXNzTmFtZX0uJHtvfWA6bztpZih2b2lkIDA9PT1jPy5vYmplY3Qub2JqZWN0SWQpYVt0XT17ZnVuY3Rpb246cn07ZWxzZXtjb25zdCBuPWF3YWl0IGwoZSxjLm9iamVjdC5vYmplY3RJZCk7YVt0XT17ZnVuY3Rpb246cix2YXJzOm59fX1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuY2FsbEZ1bmN0aW9uT24iLHtmdW5jdGlvbkRlY2xhcmF0aW9uOmBmdW5jdGlvbigpIHsgdGhpcy4ke299ID0gdGhpcy4ke299IHx8ICR7SlNPTi5zdHJpbmdpZnkoYSl9OyB9YCxzaWxlbnQ6ITAsb2JqZWN0SWQ6bn0pLGF3YWl0IGUucG9zdCgiUnVudGltZS5yZWxlYXNlT2JqZWN0Iix7b2JqZWN0SWQ6bn0pfSh0LGUucGFyYW1zKS50aGVuKGFzeW5jKCk9PntuJiZhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpfSxhc3luYyBlPT57biYmYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5yZXN1bWUiKX0pfSksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5lbmFibGUiKTtjb25zdCBpPSExIT09YS5jYXB0dXJlQWxsRXhjZXB0aW9ucztpZihhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6aT8iYWxsIjoidW5jYXVnaHQifSksaSl7Y29uc3QgZT1hLm1heEV4Y2VwdGlvbnNQZXJTZWNvbmR8fDUwO2Y9ZnVuY3Rpb24oZSx0LG4pe2xldCBpPTAsbz01LGE9MDtyZXR1cm4gc2V0SW50ZXJ2YWwoKCk9PnswPT09YT9pPmUmJihvKj0yLG4obyksbz44NjQwMCYmKG89ODY0MDApLGE9byk6KGEtPTEsMD09PWEmJnQoKSksaT0wfSwxZTMpLnVucmVmKCksKCk9PntpKz0xfX0oZSxhc3luYygpPT57cygiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9LGFzeW5jIGU9PntzKGBSYXRlLWxpbWl0IGV4Y2VlZGVkLiBEaXNhYmxpbmcgY2FwdHVyaW5nIG9mIGNhdWdodCBleGNlcHRpb25zIGZvciAke2V9IHNlY29uZHMuYCksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJ1bmNhdWdodCJ9KX0pfX0pKCkuY2F0Y2goZT0+e3MoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSxzZXRJbnRlcnZhbCgoKT0+e30sMWU0KTs=";function pi(...e){d.log("[LocalVariables]",...e)}var fi=((e={})=>{function t(s,i){let a=(s.stacktrace?.frames||[]).filter(c=>c.function!=="new Promise");for(let c=0;c<a.length;c++){let u=a.length-c-1,p=i[c],f=a[u];if(!f||!p)break;p.vars===void 0||f.in_app===!1&&e.includeOutOfAppFrames!==!0||!sn(f.function,p.function)||(f.vars=p.vars)}}function n(s,i){if(i.originalException&&typeof i.originalException=="object"&&ht in i.originalException&&Array.isArray(i.originalException[ht])){for(let a of s.exception?.values||[])t(a,i.originalException[ht]);i.originalException[ht]=void 0}return s}async function r(){let s=await import("node:inspector");s.url()||s.open(0)}function o(s){let i=new dp(new URL(`data:application/javascript;base64,${lp}`),{workerData:s,execArgv:[],env:{...process.env,NODE_OPTIONS:void 0}});process.on("exit",()=>{i.terminate()}),i.once("error",a=>{pi("Worker error",a)}),i.once("exit",a=>{pi("Worker exit",a)}),i.unref()}return{name:"LocalVariablesAsync",async setup(s){if(!s.getOptions().includeLocalVariables)return;if(await on()){d.warn("Local variables capture has been disabled because the debugger was already enabled");return}let a={...e,debug:d.isEnabled()};r().then(()=>{try{o(a)}catch(c){d.error("Failed to start worker",c)}},c=>{d.error("Failed to start inspector",c)})},processEvent(s,i){return n(s,i)}}});function di(e){if(e!==void 0)return e.slice(-10).reduce((t,n)=>`${t},${n.function},${n.lineno},${n.colno}`,"")}function mp(e,t){if(t!==void 0)return di(e(t,1))}function li(e){let t=[],n=!1;function r(i){t=[],!n&&(n=!0,e(i))}t.push(r);function o(i){t.push(i)}function s(i){let a=t.pop()||r;try{a(i)}catch{r(i)}}return{add:o,next:s}}var dr=class e{constructor(t){this._session=t}static async create(t){if(t)return t;let n=await import("node:inspector");return new e(new n.Session)}configureAndConnect(t,n){this._session.connect(),this._session.on("Debugger.paused",r=>{t(r,()=>{this._session.post("Debugger.resume")})}),this._session.post("Debugger.enable"),this._session.post("Debugger.setPauseOnExceptions",{state:n?"all":"uncaught"})}setPauseOnExceptions(t){this._session.post("Debugger.setPauseOnExceptions",{state:t?"all":"uncaught"})}getLocalVariables(t,n){this._getProperties(t,r=>{let{add:o,next:s}=li(n);for(let i of r)if(i.value?.objectId&&i.value.className==="Array"){let a=i.value.objectId;o(c=>this._unrollArray(a,i.name,c,s))}else if(i.value?.objectId&&i.value.className==="Object"){let a=i.value.objectId;o(c=>this._unrollObject(a,i.name,c,s))}else i.value&&o(a=>this._unrollOther(i,a,s));s({})})}_getProperties(t,n){this._session.post("Runtime.getProperties",{objectId:t,ownProperties:!0},(r,o)=>{n(r?[]:o.result)})}_unrollArray(t,n,r,o){this._getProperties(t,s=>{r[n]=s.filter(i=>i.name!=="length"&&!isNaN(parseInt(i.name,10))).sort((i,a)=>parseInt(i.name,10)-parseInt(a.name,10)).map(i=>i.value?.value),o(r)})}_unrollObject(t,n,r,o){this._getProperties(t,s=>{r[n]=s.map(i=>[i.name,i.value?.value]).reduce((i,[a,c])=>(i[a]=c,i),{}),o(r)})}_unrollOther(t,n,r){t.value&&("value"in t.value?t.value.value===void 0||t.value.value===null?n[t.name]=`<${t.value.value}>`:n[t.name]=t.value.value:"description"in t.value&&t.value.type!=="function"?n[t.name]=`<${t.value.description}>`:t.value.type==="undefined"&&(n[t.name]="<undefined>")),r(n)}},gp="LocalVariables",_p=((e={},t)=>{let n=new ue(20),r,o=!1;function s(u){let p=di(u.stacktrace?.frames);if(p===void 0)return;let f=n.remove(p);if(f===void 0)return;let l=(u.stacktrace?.frames||[]).filter(m=>m.function!=="new Promise");for(let m=0;m<l.length;m++){let _=l.length-m-1,S=f[m],E=l[_];if(!E||!S)break;S.vars===void 0||E.in_app===!1&&e.includeOutOfAppFrames!==!0||!sn(E.function,S.function)||(E.vars=S.vars)}}function i(u){for(let p of u.exception?.values||[])s(p);return u}let a;async function c(){let p=T()?.getOptions();if(!p?.includeLocalVariables)return;if(ai<18){d.log("The `LocalVariables` integration is only supported on Node >= v18.");return}if(await on()){d.warn("Local variables capture has been disabled because the debugger was already enabled");return}try{let l=await dr.create(t),m=(S,{params:{reason:E,data:N,callFrames:C}},j)=>{if(E!=="exception"&&E!=="promiseRejection"){j();return}r?.();let Ee=mp(S,N.description);if(Ee==null){j();return}let{add:Te,next:fe}=li(U=>{n.set(Ee,U),j()});for(let U=0;U<Math.min(C.length,5);U++){let{scopeChain:Ci,functionName:Ir,this:un}=C[U],yr=Ci.find(Ie=>Ie.type==="local"),br=un.className==="global"||!un.className?Ir:`${un.className}.${Ir}`;if(yr?.object.objectId===void 0)Te(Ie=>{Ie[U]={function:br},fe(Ie)});else{let Ie=yr.object.objectId;Te(xr=>l.getLocalVariables(Ie,vi=>{xr[U]={function:br,vars:vi},fe(xr)}))}}fe([])},_=e.captureAllExceptions!==!1;if(l.configureAndConnect((S,E)=>m(p.stackParser,S,E),_),_){let S=e.maxExceptionsPerSecond||50;r=ui(S,()=>{d.log("Local variables rate-limit lifted."),l.setPauseOnExceptions(!0)},E=>{d.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${E} seconds.`),l.setPauseOnExceptions(!1)})}o=!0}catch(l){d.log("The `LocalVariables` integration failed to start.",l)}}return{name:gp,setupOnce(){a=c()},async processEvent(u){return await a,o?i(u):u},_getCachedFramesCount(){return n.size},_getFirstCachedFrame(){return n.values()[0]}}}),mi=_p;var lr=(e={})=>nn.major<19?mi(e):fi(e);function gi(){try{return typeof module<"u"&&typeof module.exports<"u"}catch{return!1}}import{isMainThread as Sp}from"worker_threads";var hp=2e3;function St(e){x(()=>{console.error(e)});let t=T();if(t===void 0){A&&d.warn("No NodeClient was defined, we are exiting the process now."),global.process.exit(1);return}let n=t.getOptions(),r=n?.shutdownTimeout&&n.shutdownTimeout>0?n.shutdownTimeout:hp;t.close(r).then(o=>{o||A&&d.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},o=>{A&&d.error(o)})}var Ep="OnUncaughtException",mr=(e={})=>{let t={exitEvenIfOtherHandlersAreRegistered:!1,...e};return{name:Ep,setup(n){Sp&&global.process.on("uncaughtException",Tp(n,t))}}};function Tp(e,t){let r=!1,o=!1,s=!1,i,a=e.getOptions();return Object.assign(c=>{let u=St;t.onFatalError?u=t.onFatalError:a.onFatalError&&(u=a.onFatalError);let f=global.process.listeners("uncaughtException").filter(m=>m.name!=="domainUncaughtExceptionClear"&&m.tag!=="sentry_tracingErrorCallback"&&m._errorHandler!==!0).length===0,l=t.exitEvenIfOtherHandlersAreRegistered||f;r?l&&(s?(A&&d.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),St(c)):o||(o=!0,setTimeout(()=>{s||(s=!0,u(i,c))},2e3))):(i=c,r=!0,T()===e&&ae(c,{originalException:c,captureContext:{level:"fatal"},mechanism:{handled:!1,type:"auto.node.onuncaughtexception"}}),!s&&l&&(s=!0,u(c)))},{_errorHandler:!0})}var Ip="OnUnhandledRejection",yp=[{name:"AI_NoOutputGeneratedError"},{name:"AbortError"}],bp=((e={})=>{let t={mode:e.mode??"warn",ignore:[...yp,...e.ignore??[]]};return{name:Ip,setup(n){global.process.on("unhandledRejection",Ap(n,t))}}}),gr=bp;function xp(e){if(typeof e!="object"||e===null)return{name:"",message:String(e??"")};let t=e,n=typeof t.name=="string"?t.name:"",r=typeof t.message=="string"?t.message:String(e);return{name:n,message:r}}function Np(e,t){let n=e.name===void 0||W(t.name,e.name,!0),r=e.message===void 0||W(t.message,e.message);return n&&r}function Rp(e,t){let n=xp(t);return e.some(r=>Np(r,n))}function Ap(e,t){return function(r,o){if(T()!==e||Rp(t.ignore??[],r))return;let s=t.mode==="strict"?"fatal":"error",i=r&&typeof r=="object"?r._sentry_active_span:void 0;(i?c=>Yt(i,c):c=>c())(()=>{ae(r,{originalException:r,captureContext:{extra:{unhandledPromiseRejection:!0},level:s},mechanism:{handled:!1,type:"auto.node.onunhandledrejection"}})}),Cp(r,t.mode)}}function Cp(e,t){let n="This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:";t==="warn"?x(()=>{console.warn(n),console.error(e&&typeof e=="object"&&"stack"in e?e.stack:e)}):t==="strict"&&(x(()=>{console.warn(n)}),St(e))}import*as _i from"node:http";var _r="Spotlight",vp=((e={})=>{let t={sidecarUrl:e.sidecarUrl||"http://localhost:8969/stream"};return{name:_r,setup(n){try{process.env.NODE_ENV&&process.env.NODE_ENV!=="development"&&d.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?")}catch{}Op(n,t)}}}),hi=vp;function Op(e,t){let n=Lp(t.sidecarUrl);if(!n)return;let r=0;e.on("beforeEnvelope",o=>{if(r>3){d.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests");return}let s=it(o);we(()=>{let i=_i.request({method:"POST",path:n.pathname,hostname:n.hostname,port:n.port,headers:{"Content-Type":"application/x-sentry-envelope"}},a=>{a.statusCode&&a.statusCode>=200&&a.statusCode<400&&(r=0),a.on("data",()=>{}),a.on("end",()=>{}),a.setEncoding("utf8")});i.on("error",()=>{r++,d.warn("[Spotlight] Failed to send envelope to Spotlight Sidecar")}),i.write(s),i.end()})})}function Lp(e){try{return new URL(`${e}`)}catch{d.warn(`[Spotlight] Invalid sidecar URL: ${e}`);return}}var hr=(e={})=>({name:"Console",setup(t){process.env.LAMBDA_TASK_ROOT&&z("console",Mp),ar({...e,filter:[...e.filter||[],"[DEP0205] DeprecationWarning"]}).setup?.(t)}});function Mp(){let e=h?.console;e&&de.forEach(t=>{t in e&&Up(e,t)})}function Up(e,t){let n=e[t];w[t]=n;let r=n,o,s=!1,i=function(...c){if(s){n.apply(e,c);return}s=!0;try{Y("console",{args:c,level:t}),r.apply(e,c)}finally{s=!1}};Rt(i,n);let a=n.bind(e);w[t]=a;try{let c=i;Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){return c},set(u){u===i?(o!==void 0&&(r=o,o=void 0),c=i):u===a?(o=r,c=a):typeof u=="function"&&!u.__sentry_original__?(r=u,c=i):c=u}})}catch{ze(e,t,function(c){return w[t]=c,function(...u){Y("console",{args:u,level:t}),w[t]?.apply(this,u)}})}}import{posix as kp,sep as Pp}from"node:path";function Si(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function Ei(e=process.argv[1]?ir(process.argv[1]):process.cwd(),t=Pp==="\\"){let n=t?Si(e):e;return r=>{if(!r)return;let o=t?Si(r):r,{dir:s,base:i,ext:a}=kp.parse(o);(a===".js"||a===".mjs"||a===".cjs")&&(i=i.slice(0,a.length*-1));let c=decodeURIComponent(i);s||(s=".");let u=s.lastIndexOf("/node_modules");if(u>-1)return`${s.slice(u+14).replace(/\//g,".")}:${c}`;if(s.startsWith(n)){let p=s.slice(n.length+1).replace(/\//g,".");return p?`${p}:${c}`:c}return c}}function Ti(e){if(process.env.SENTRY_RELEASE)return process.env.SENTRY_RELEASE;if(h.SENTRY_RELEASE?.id)return h.SENTRY_RELEASE.id;let t=process.env.GITHUB_SHA||process.env.CI_MERGE_REQUEST_SOURCE_BRANCH_SHA||process.env.CI_BUILD_REF||process.env.CI_COMMIT_SHA||process.env.BITBUCKET_COMMIT,n=process.env.APPVEYOR_PULL_REQUEST_HEAD_COMMIT||process.env.APPVEYOR_REPO_COMMIT||process.env.CODEBUILD_RESOLVED_SOURCE_VERSION||process.env.AWS_COMMIT_ID||process.env.BUILD_SOURCEVERSION||process.env.GIT_CLONE_COMMIT_HASH||process.env.BUDDY_EXECUTION_REVISION||process.env.BUILDKITE_COMMIT||process.env.CIRCLE_SHA1||process.env.CIRRUS_CHANGE_IN_REPO||process.env.CF_REVISION||process.env.CM_COMMIT||process.env.CF_PAGES_COMMIT_SHA||process.env.DRONE_COMMIT_SHA||process.env.FC_GIT_COMMIT_SHA||process.env.HEROKU_TEST_RUN_COMMIT_VERSION||process.env.HEROKU_BUILD_COMMIT||process.env.HEROKU_SLUG_COMMIT||process.env.RAILWAY_GIT_COMMIT_SHA||process.env.RENDER_GIT_COMMIT||process.env.SEMAPHORE_GIT_SHA||process.env.TRAVIS_PULL_REQUEST_SHA||process.env.VERCEL_GIT_COMMIT_SHA||process.env.VERCEL_GITHUB_COMMIT_SHA||process.env.VERCEL_GITLAB_COMMIT_SHA||process.env.VERCEL_BITBUCKET_COMMIT_SHA||process.env.ZEIT_GITHUB_COMMIT_SHA||process.env.ZEIT_GITLAB_COMMIT_SHA||process.env.ZEIT_BITBUCKET_COMMIT_SHA,r=process.env.CI_COMMIT_ID||process.env.SOURCE_COMMIT||process.env.SOURCE_VERSION||process.env.GIT_COMMIT||process.env.COMMIT_REF||process.env.BUILD_VCS_NUMBER||process.env.CI_COMMIT_SHA;return t||n||r||e}var Ii=yt(cr(Ei()));import*as wp from"node:http";import*as Fp from"node:https";import{Readable as Bp}from"node:stream";import{createGzip as Gp}from"node:zlib";import*as q from"node:net";import*as Er from"node:tls";import*as Sr from"node:http";var V=Symbol("AgentBaseInternalState"),an=class extends Sr.Agent{constructor(t){super(t),this[V]={}}isSecureEndpoint(t){if(t){if(typeof t.secureEndpoint=="boolean")return t.secureEndpoint;if(typeof t.protocol=="string")return t.protocol==="https:"}let{stack:n}=new Error;return typeof n!="string"?!1:n.split(`
16
16
  `).some(r=>r.indexOf("(https.js:")!==-1||r.indexOf("node:https:")!==-1)}createSocket(t,n,r){let o={...n,secureEndpoint:this.isSecureEndpoint(n)};Promise.resolve().then(()=>this.connect(t,o)).then(s=>{if(s instanceof Sr.Agent)return s.addRequest(t,o);this[V].currentSocket=s,super.createSocket(t,n,r)},r)}createConnection(){let t=this[V].currentSocket;if(this[V].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[V].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){this[V]&&(this[V].defaultPort=t)}get protocol(){return this[V].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[V]&&(this[V].protocol=t)}};function cn(...e){d.log("[https-proxy-agent:parse-proxy-response]",...e)}function yi(e){return new Promise((t,n)=>{let r=0,o=[];function s(){let p=e.read();p?u(p):e.once("readable",s)}function i(){e.removeListener("end",a),e.removeListener("error",c),e.removeListener("readable",s)}function a(){i(),cn("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function c(p){i(),cn("onerror %o",p),n(p)}function u(p){o.push(p),r+=p.length;let f=Buffer.concat(o,r),l=f.indexOf(`\r
17
17
  \r
18
18
  `);if(l===-1){cn("have not received end of HTTP headers yet..."),s();return}let m=f.subarray(0,l).toString("ascii").split(`\r
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drenso/homey-log",
3
- "version": "10.5300.0",
3
+ "version": "10.5301.0",
4
4
  "description": "Interface with Sentry for Homey",
5
5
  "main": "./build/index.js",
6
6
  "module": "./build/index.mjs",
@@ -32,7 +32,7 @@
32
32
  "homepage": "https://github.com/Drenso/homey-log#readme",
33
33
  "devDependencies": {
34
34
  "@eslint/js": "10.0.1",
35
- "@sentry/node-core": "10.53.0",
35
+ "@sentry/node-core": "10.53.1",
36
36
  "@types/homey": "npm:homey-apps-sdk-v3-types@0.3.12",
37
37
  "@types/node": "24.10.13",
38
38
  "esbuild": "0.28.0",