@drenso/homey-log 10.3900.0 → 10.4000.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,22 +1,22 @@
1
- "use strict";var Hs=Object.create;var it=Object.defineProperty;var Ws=Object.getOwnPropertyDescriptor;var Ys=Object.getOwnPropertyNames;var Vs=Object.getPrototypeOf,js=Object.prototype.hasOwnProperty;var $s=(e,t)=>{for(var n in t)it(e,n,{get:t[n],enumerable:!0})},rr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Ys(t))!js.call(e,o)&&o!==n&&it(e,o,{get:()=>t[o],enumerable:!(r=Ws(t,o))||r.enumerable});return e};var O=(e,t,n)=>(n=e!=null?Hs(Vs(e)):{},rr(t||!e||!e.__esModule?it(n,"default",{value:e,enumerable:!0}):n,e)),Zs=e=>rr(it({},"__esModule",{value:!0}),e);var Pu={};$s(Pu,{Log:()=>Qn});module.exports=Zs(Pu);var ws=O(require("node:os"),1);var ns=O(require("node:os"),1);var g=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var _=globalThis;var w="10.39.0";function M(){return J(_),_}function J(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||w,t[w]=t[w]||{}}function F(e,t,n=_){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[w]=r[w]||{};return o[e]||(o[e]=t())}var Oe=["debug","info","warn","error","log","assert","trace"],zs="Sentry Logger ",fe={};function b(e){if(!("console"in _))return e();let t=_.console,n={},r=Object.keys(fe);r.forEach(o=>{let s=fe[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Js(){zt().enabled=!0}function Xs(){zt().enabled=!1}function or(){return zt().enabled}function Ks(...e){Zt("log",...e)}function Qs(...e){Zt("warn",...e)}function qs(...e){Zt("error",...e)}function Zt(e,...t){g&&or()&&b(()=>{_.console[e](`${zs}[${e}]:`,...t)})}function zt(){return g?F("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var p={enable:Js,disable:Xs,isEnabled:or,log:Ks,warn:Qs,error:qs};var sr=/\(error: (.*)\)/,ir=/captureMessage|captureException/;function ct(...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
- `);for(let a=r;a<i.length;a++){let c=i[a];c.length>1024&&(c=c.slice(0,1024));let u=sr.test(c)?c.replace(sr,"$1"):c;if(!u.match(/\S*Error: /)){for(let f of t){let l=f(u);if(l){s.push(l);break}}if(s.length>=50+o)break}}return ar(s.slice(o))}}function Xt(e){return Array.isArray(e)?ct(...e):e}function ar(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(at(t).function||"")&&t.pop(),t.reverse(),ir.test(at(t).function||"")&&(t.pop(),ir.test(at(t).function||"")&&t.pop()),t.slice(0,50).map(n=>({...n,filename:n.filename||at(t).filename,function:n.function||"?"}))}function at(e){return e[e.length-1]||{}}var Jt="<anonymous>";function Le(e){try{return!e||typeof e!="function"?Jt:e.name||Jt}catch{return Jt}}function ut(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function cr(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var pt={},ur={};function de(e,t){pt[e]=pt[e]||[],pt[e].push(t)}function me(e,t){if(!ur[e]){ur[e]=!0;try{t()}catch(n){g&&p.error(`Error while instrumenting ${e}`,n)}}}function ge(e,t){let n=e&&pt[e];if(n)for(let r of n)try{r(t)}catch(o){g&&p.error(`Error while triggering instrumentation handler.
1
+ "use strict";var Ws=Object.create;var it=Object.defineProperty;var Ys=Object.getOwnPropertyDescriptor;var Vs=Object.getOwnPropertyNames;var $s=Object.getPrototypeOf,js=Object.prototype.hasOwnProperty;var Zs=(e,t)=>{for(var n in t)it(e,n,{get:t[n],enumerable:!0})},rr=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Vs(t))!js.call(e,o)&&o!==n&&it(e,o,{get:()=>t[o],enumerable:!(r=Ys(t,o))||r.enumerable});return e};var O=(e,t,n)=>(n=e!=null?Ws($s(e)):{},rr(t||!e||!e.__esModule?it(n,"default",{value:e,enumerable:!0}):n,e)),zs=e=>rr(it({},"__esModule",{value:!0}),e);var Du={};Zs(Du,{Log:()=>Qn});module.exports=zs(Du);var Bs=O(require("node:os"),1);var rs=O(require("node:os"),1);var g=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var _=globalThis;var w="10.40.0";function M(){return J(_),_}function J(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||w,t[w]=t[w]||{}}function F(e,t,n=_){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[w]=r[w]||{};return o[e]||(o[e]=t())}var Le=["debug","info","warn","error","log","assert","trace"],Js="Sentry Logger ",fe={};function b(e){if(!("console"in _))return e();let t=_.console,n={},r=Object.keys(fe);r.forEach(o=>{let s=fe[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Xs(){zt().enabled=!0}function Ks(){zt().enabled=!1}function or(){return zt().enabled}function Qs(...e){Zt("log",...e)}function qs(...e){Zt("warn",...e)}function ei(...e){Zt("error",...e)}function Zt(e,...t){g&&or()&&b(()=>{_.console[e](`${Js}[${e}]:`,...t)})}function zt(){return g?F("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var p={enable:Xs,disable:Ks,isEnabled:or,log:Qs,warn:qs,error:ei};var sr=/\(error: (.*)\)/,ir=/captureMessage|captureException/;function ct(...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
+ `);for(let a=r;a<i.length;a++){let c=i[a];c.length>1024&&(c=c.slice(0,1024));let u=sr.test(c)?c.replace(sr,"$1"):c;if(!u.match(/\S*Error: /)){for(let f of t){let l=f(u);if(l){s.push(l);break}}if(s.length>=50+o)break}}return ar(s.slice(o))}}function Xt(e){return Array.isArray(e)?ct(...e):e}function ar(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(at(t).function||"")&&t.pop(),t.reverse(),ir.test(at(t).function||"")&&(t.pop(),ir.test(at(t).function||"")&&t.pop()),t.slice(0,50).map(n=>({...n,filename:n.filename||at(t).filename,function:n.function||"?"}))}function at(e){return e[e.length-1]||{}}var Jt="<anonymous>";function Me(e){try{return!e||typeof e!="function"?Jt:e.name||Jt}catch{return Jt}}function ut(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function cr(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var pt={},ur={};function de(e,t){pt[e]=pt[e]||[],pt[e].push(t)}function me(e,t){if(!ur[e]){ur[e]=!0;try{t()}catch(n){g&&p.error(`Error while instrumenting ${e}`,n)}}}function ge(e,t){let n=e&&pt[e];if(n)for(let r of n)try{r(t)}catch(o){g&&p.error(`Error while triggering instrumentation handler.
3
3
  Type: ${e}
4
- Name: ${Le(r)}
5
- Error:`,o)}}var Kt=null;function pr(e){let t="error";de(t,e),me(t,ei)}function ei(){Kt=_.onerror,_.onerror=function(e,t,n,r,o){return ge("error",{column:r,error:o,line:n,msg:e,url:t}),Kt?Kt.apply(this,arguments):!1},_.onerror.__SENTRY_INSTRUMENTED__=!0}var Qt=null;function lr(e){let t="unhandledrejection";de(t,e),me(t,ti)}function ti(){Qt=_.onunhandledrejection,_.onunhandledrejection=function(e){return ge("unhandledrejection",e),Qt?Qt.apply(this,arguments):!0},_.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var fr=Object.prototype.toString;function Me(e){switch(fr.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return V(e,Error)}}function lt(e,t){return fr.call(e)===`[object ${t}]`}function dr(e){return lt(e,"ErrorEvent")}function oe(e){return lt(e,"String")}function Pe(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ft(e){return e===null||Pe(e)||typeof e!="object"&&typeof e!="function"}function X(e){return lt(e,"Object")}function mr(e){return typeof Event<"u"&&V(e,Event)}function gr(e){return typeof Element<"u"&&V(e,Element)}function _r(e){return lt(e,"RegExp")}function Y(e){return!!(e?.then&&typeof e.then=="function")}function hr(e){return X(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function V(e,t){try{return e instanceof t}catch{return!1}}function dt(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}var ni=_,ri=80;function Sr(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,o=[],s=0,i=0,a=" > ",c=a.length,u,f=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||ri;for(;n&&s++<r&&(u=oi(n,f),!(u==="html"||s>1&&i+o.length*c+u.length>=l));)o.push(u),i+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function oi(e,t){let n=e,r=[];if(!n?.tagName)return"";if(ni.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(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(o?.length)o.forEach(i=>{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let i=n.className;if(i&&oe(i)){let a=i.split(/\s+/);for(let c of a)r.push(`.${c}`)}}let s=["aria-label","type","name","title","alt"];for(let i of s){let a=n.getAttribute(i);a&&r.push(`[${i}="${a}"]`)}return r.join("")}function Tr(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!="function")return;let o=n(r);typeof o=="function"&&si(o,r);try{e[t]=o}catch{g&&p.log(`Failed to replace method "${t}" in object`,e)}}function De(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{g&&p.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function si(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,De(e,"__sentry_original__",t)}catch{}}function yr(e){return e.__sentry_original__}function qt(e){if(Me(e))return{message:e.message,name:e.name,stack:e.stack,...Ir(e)};if(mr(e)){let t={type:e.type,target:Er(e.target),currentTarget:Er(e.currentTarget),...Ir(e)};return typeof CustomEvent<"u"&&V(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Er(e){try{return gr(e)?Sr(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Ir(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function br(e){let t=Object.keys(qt(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}var _e;function he(e){if(_e!==void 0)return _e?_e(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=_;return t in n&&typeof n[t]=="function"?(_e=n[t],_e(e)):(_e=null,e())}function P(){return he(()=>Math.random())}function Se(){return he(()=>Date.now())}function Ee(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function en(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 tn(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let o=e[r];try{dt(o)?n.push(ut(o)):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function j(e,t,n=!1){return oe(e)?_r(t)?t.test(e):oe(t)?n?e===t:e.includes(t):!1:!1}function Ie(e,t=[],n=!1){return t.some(r=>j(e,r,n))}function ii(){let e=_;return e.crypto||e.msCrypto}var nn;function ai(){return P()*16}function T(e=ii()){try{if(e?.randomUUID)return he(()=>e.randomUUID()).replace(/-/g,"")}catch{}return nn||(nn="10000000100040008000"+1e11),nn.replace(/[018]/g,t=>(t^(ai()&15)>>t/4).toString(16))}function xr(e){return e.exception?.values?.[0]}function K(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 on(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 Te(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 ci=/^(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 sn(e){let t=e.match(ci)||[],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 mt(e){if(ui(e))return!0;try{De(e,"__sentry_captured__",!0)}catch{}return!1}function ui(e){try{return e.__sentry_captured__}catch{}}var Cr=1e3;function $(){return Se()/Cr}function pi(){let{performance:e}=_;if(!e?.now||!e.timeOrigin)return $;let t=e.timeOrigin;return()=>(t+he(()=>e.now()))/Cr}var Nr;function gt(){return(Nr??(Nr=pi()))()}function Ue(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||gt(),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:T()),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 Q(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]=Q(r[o],t[o],n-1));return r}function Fe(){return T()}function ke(){return T().substring(16)}var an="_sentrySpan";function we(e,t){t?De(e,an,t):delete e[an]}function ye(e){return e[an]}var li=100,A=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:Fe(),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,we(t,ye(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&&Ue(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():X(n)?t:void 0,{tags:o,attributes:s,extra:i,user:a,contexts:c,level:u,fingerprint:f=[],propagationContext:l,conversationId:d}=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),f.length&&(this._fingerprint=f),l&&(this._propagationContext=l),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,we(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Fe(),sampleRand:P()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:li;if(r<=0)return this;let o={timestamp:$(),...t,message:t.message?Ee(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:ye(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Q(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n?.event_id||T();if(!this._client)return g&&p.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||T();if(!this._client)return g&&p.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||T();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(g&&p.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 Be(){return F("defaultCurrentScope",()=>new A)}function Ge(){return F("defaultIsolationScope",()=>new A)}var cn=class{constructor(t,n){let r;t?r=t:r=new A;let o;n?o=n:o=new A,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 Y(r)?r.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(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 be(){let e=M(),t=J(e);return t.stack=t.stack||new cn(Be(),Ge())}function fi(e){return be().withScope(e)}function di(e,t){let n=be();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Rr(e){return be().withScope(()=>e(be().getIsolationScope()))}function Ar(){return{withIsolationScope:Rr,withScope:fi,withSetScope:di,withSetIsolationScope:(e,t)=>Rr(t),getCurrentScope:()=>be().getScope(),getIsolationScope:()=>be().getIsolationScope()}}function un(e){let t=M(),n=J(t);n.acs=e}function q(e){let t=J(e);return t.acs?t.acs:Ar()}function R(){let e=M();return q(e).getCurrentScope()}function D(){let e=M();return q(e).getIsolationScope()}function _t(){return F("globalScope",()=>new A)}function se(...e){let t=M(),n=q(t);if(e.length===2){let[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function I(){return R().getClient()}function He(e){let t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,s={trace_id:n,span_id:o||ke()};return r&&(s.parent_span_id=r),s}var ht="sentry.source",pn="sentry.sample_rate",vr="sentry.previous_trace_sample_rate",ln="sentry.op",fn="sentry.origin";var dn="sentry.profile_id",mn="sentry.exclusive_time";var mi="_sentryScope",gi="_sentryIsolationScope";function _i(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function St(e){let t=e;return{scope:t[mi],isolationScope:_i(t[gi])}}var hi="sentry-",Si=/^sentry-/;function Et(e){let t=Ei(e);if(!t)return;let n=Object.entries(t).reduce((r,[o,s])=>{if(o.match(Si)){let i=o.slice(hi.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function Ei(e){if(!(!e||!oe(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=Or(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):Or(e)}function Or(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 Ii=/^o(\d+)\./,Ti=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function yi(e){return e==="http"||e==="https"}function U(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 bi(e){let t=Ti.exec(e);if(!t){b(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,o="",s="",i="",a=""]=t.slice(1),c="",u=a,f=u.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),u=f.pop()),u){let l=u.match(/^\d+/);l&&(u=l[0])}return Lr({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Lr(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function xi(e){if(!g)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(p.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?yi(r)?t&&isNaN(parseInt(t,10))?(p.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(p.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(p.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Ni(e){return e.match(Ii)?.[1]}function Mr(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=Ni(n)),r}function Pr(e){let t=typeof e=="string"?bi(e):Lr(e);if(!(!t||!xi(t)))return t}function We(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 Dr=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Ur(e){if(!e)return;let t=e.match(Dr);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 gn(e,t){let n=Ur(e),r=Et(t);if(!n?.traceId)return{traceId:Fe(),sampleRand:P()};let o=Ci(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 Ci(e,t){let n=We(t?.sample_rand);if(n!==void 0)return n;let r=We(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?P()*r:r+P()*(1-r):P()}var Br=1,Fr=!1;function It(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:xe(e).parent_span_id,s=St(e).scope,i=r?s?.getPropagationContext().propagationSpanId||ke():t;return{parent_span_id:o,span_id:i,trace_id:n}}function Ri(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===Br,attributes:s,...o}))}function kr(e){return typeof e=="number"?wr(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?wr(e.getTime()):gt()}function wr(e){return e>9999999999?e/1e3:e}function xe(e){if(vi(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Ai(e)){let{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:u,start_timestamp:kr(o),timestamp:kr(i)||void 0,status:Oi(a),op:r[ln],origin:r[fn],links:Ri(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Ai(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function vi(e){return typeof e.getSpanJSON=="function"}function Gr(e){let{traceFlags:t}=e.spanContext();return t===Br}function Oi(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}var Li="_sentryRootSpan";function ie(e){return e[Li]||e}function Ye(){let e=M(),t=q(e);return t.getActiveSpan?t.getActiveSpan():ye(R())}function _n(){Fr||(b(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Fr=!0)}var Hr=!1;function Wr(){if(Hr)return;function e(){let t=Ye(),n=t&&ie(t);if(n){let r="internal_error";g&&p.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:2,message:r})}}e.tag="sentry_tracingErrorCallback",Hr=!0,pr(e),lr(e)}function Yr(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||I()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Vr(e){p.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function hn(e,t){if(!t?.length||!e.description)return!1;for(let n of t){if(Mi(n)){if(j(e.description,n))return g&&Vr(e),!0;continue}if(!n.name&&!n.op)continue;let r=n.name?j(e.description,n.name):!0,o=n.op?e.op&&j(e.op,n.op):!0;if(r&&o)return g&&Vr(e),!0}return!1}function jr(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 Mi(e){return typeof e=="string"||e instanceof RegExp}var Ne="production";var Pi="_frozenDsc";function $r(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||Ne,release:n.release,public_key:r,trace_id:e,org_id:Mr(t)};return t.emit("createDsc",o),o}function Tt(e,t){let n=t.getPropagationContext();return n.dsc||$r(n.traceId,e)}function yt(e){let t=I();if(!t)return{};let n=ie(e),r=xe(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[pn]??o[vr];function a(h){return(typeof i=="number"||typeof i=="string")&&(h.sample_rate=`${i}`),h}let c=n[Pi];if(c)return a(c);let u=s?.get("sentry.dsc"),f=u&&Et(u);if(f)return a(f);let l=$r(e.spanContext().traceId,t),d=o[ht],m=r.description;return d!=="url"&&m&&(l.transaction=m),Yr()&&(l.sampled=String(Gr(n)),l.sample_rand=s?.get("sentry.sample_rand")??St(n).scope?.getPropagationContext().sampleRand.toString()),a(l),t.emit("createDsc",l,n),l}function k(e,t=100,n=1/0){try{return Sn("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function En(e,t=3,n=100*1024){let r=k(e,t);return ki(r)>n?En(e,t-1,n):r}function Sn(e,t,n=1/0,r=1/0,o=wi()){let[s,i]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let a=Di(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(s(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let m=u.toJSON();return Sn("",m,c-1,r,o)}catch{}let f=Array.isArray(t)?[]:{},l=0,d=qt(t);for(let m in d){if(!Object.prototype.hasOwnProperty.call(d,m))continue;if(l>=r){f[m]="[MaxProperties ~]";break}let h=d[m];f[m]=Sn(m,h,c-1,r,o),l++}return i(t),f}function Di(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(dt(t))return ut(t);if(hr(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Le(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=Ui(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Ui(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Fi(e){return~-encodeURI(e).split(/%..|./).length}function ki(e){return Fi(JSON.stringify(e))}function wi(){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 v(e,t=[]){return[e,t]}function Tn(e,t){let[n,r]=e;return[n,[...r,t]]}function Ve(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 yn(e,t){return Ve(e,(n,r)=>t.includes(r))}function In(e){let t=J(_);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function je(e){let[t,n]=e,r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[In(r),s]:r.push(typeof s=="string"?In(s):s)}for(let s of n){let[i,a]=s;if(o(`
4
+ Name: ${Me(r)}
5
+ Error:`,o)}}var Kt=null;function pr(e){let t="error";de(t,e),me(t,ti)}function ti(){Kt=_.onerror,_.onerror=function(e,t,n,r,o){return ge("error",{column:r,error:o,line:n,msg:e,url:t}),Kt?Kt.apply(this,arguments):!1},_.onerror.__SENTRY_INSTRUMENTED__=!0}var Qt=null;function lr(e){let t="unhandledrejection";de(t,e),me(t,ni)}function ni(){Qt=_.onunhandledrejection,_.onunhandledrejection=function(e){return ge("unhandledrejection",e),Qt?Qt.apply(this,arguments):!0},_.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var fr=Object.prototype.toString;function Pe(e){switch(fr.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return V(e,Error)}}function lt(e,t){return fr.call(e)===`[object ${t}]`}function dr(e){return lt(e,"ErrorEvent")}function oe(e){return lt(e,"String")}function De(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ft(e){return e===null||De(e)||typeof e!="object"&&typeof e!="function"}function X(e){return lt(e,"Object")}function mr(e){return typeof Event<"u"&&V(e,Event)}function gr(e){return typeof Element<"u"&&V(e,Element)}function _r(e){return lt(e,"RegExp")}function Y(e){return!!(e?.then&&typeof e.then=="function")}function hr(e){return X(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function V(e,t){try{return e instanceof t}catch{return!1}}function dt(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}var ri=_,oi=80;function Sr(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,o=[],s=0,i=0,a=" > ",c=a.length,u,f=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||oi;for(;n&&s++<r&&(u=si(n,f),!(u==="html"||s>1&&i+o.length*c+u.length>=l));)o.push(u),i+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function si(e,t){let n=e,r=[];if(!n?.tagName)return"";if(ri.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(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(o?.length)o.forEach(i=>{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let i=n.className;if(i&&oe(i)){let a=i.split(/\s+/);for(let c of a)r.push(`.${c}`)}}let s=["aria-label","type","name","title","alt"];for(let i of s){let a=n.getAttribute(i);a&&r.push(`[${i}="${a}"]`)}return r.join("")}function Tr(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!="function")return;let o=n(r);typeof o=="function"&&ii(o,r);try{e[t]=o}catch{g&&p.log(`Failed to replace method "${t}" in object`,e)}}function Ue(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{g&&p.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function ii(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,Ue(e,"__sentry_original__",t)}catch{}}function yr(e){return e.__sentry_original__}function qt(e){if(Pe(e))return{message:e.message,name:e.name,stack:e.stack,...Ir(e)};if(mr(e)){let t={type:e.type,target:Er(e.target),currentTarget:Er(e.currentTarget),...Ir(e)};return typeof CustomEvent<"u"&&V(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Er(e){try{return gr(e)?Sr(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Ir(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function br(e){let t=Object.keys(qt(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}var _e;function he(e){if(_e!==void 0)return _e?_e(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=_;return t in n&&typeof n[t]=="function"?(_e=n[t],_e(e)):(_e=null,e())}function P(){return he(()=>Math.random())}function Se(){return he(()=>Date.now())}function Ee(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function en(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 tn(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let o=e[r];try{dt(o)?n.push(ut(o)):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function $(e,t,n=!1){return oe(e)?_r(t)?t.test(e):oe(t)?n?e===t:e.includes(t):!1:!1}function Ie(e,t=[],n=!1){return t.some(r=>$(e,r,n))}function ai(){let e=_;return e.crypto||e.msCrypto}var nn;function ci(){return P()*16}function T(e=ai()){try{if(e?.randomUUID)return he(()=>e.randomUUID()).replace(/-/g,"")}catch{}return nn||(nn="10000000100040008000"+1e11),nn.replace(/[018]/g,t=>(t^(ci()&15)>>t/4).toString(16))}function xr(e){return e.exception?.values?.[0]}function K(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 on(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 Te(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 ui=/^(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 sn(e){let t=e.match(ui)||[],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 mt(e){if(Nr(e))return!0;try{Ue(e,"__sentry_captured__",!0)}catch{}return!1}function Nr(e){try{return e.__sentry_captured__}catch{}}var Rr=1e3;function j(){return Se()/Rr}function pi(){let{performance:e}=_;if(!e?.now||!e.timeOrigin)return j;let t=e.timeOrigin;return()=>(t+he(()=>e.now()))/Rr}var Cr;function gt(){return(Cr??(Cr=pi()))()}function Fe(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||gt(),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:T()),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 Q(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]=Q(r[o],t[o],n-1));return r}function ke(){return T()}function we(){return T().substring(16)}var an="_sentrySpan";function Be(e,t){t?Ue(e,an,t):delete e[an]}function ye(e){return e[an]}var li=100,A=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:ke(),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,Be(t,ye(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&&Fe(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():X(n)?t:void 0,{tags:o,attributes:s,extra:i,user:a,contexts:c,level:u,fingerprint:f=[],propagationContext:l,conversationId:d}=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),f.length&&(this._fingerprint=f),l&&(this._propagationContext=l),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,Be(this,void 0),this._attachments=[],this.setPropagationContext({traceId:ke(),sampleRand:P()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:li;if(r<=0)return this;let o={timestamp:j(),...t,message:t.message?Ee(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:ye(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Q(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n?.event_id||T();if(!this._client)return g&&p.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||T();if(!this._client)return g&&p.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||T();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(g&&p.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 Ge(){return F("defaultCurrentScope",()=>new A)}function He(){return F("defaultIsolationScope",()=>new A)}var cn=class{constructor(t,n){let r;t?r=t:r=new A;let o;n?o=n:o=new A,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 Y(r)?r.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(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 be(){let e=M(),t=J(e);return t.stack=t.stack||new cn(Ge(),He())}function fi(e){return be().withScope(e)}function di(e,t){let n=be();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Ar(e){return be().withScope(()=>e(be().getIsolationScope()))}function vr(){return{withIsolationScope:Ar,withScope:fi,withSetScope:di,withSetIsolationScope:(e,t)=>Ar(t),getCurrentScope:()=>be().getScope(),getIsolationScope:()=>be().getIsolationScope()}}function un(e){let t=M(),n=J(t);n.acs=e}function q(e){let t=J(e);return t.acs?t.acs:vr()}function R(){let e=M();return q(e).getCurrentScope()}function D(){let e=M();return q(e).getIsolationScope()}function _t(){return F("globalScope",()=>new A)}function se(...e){let t=M(),n=q(t);if(e.length===2){let[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function I(){return R().getClient()}function We(e){let t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,s={trace_id:n,span_id:o||we()};return r&&(s.parent_span_id=r),s}var ht="sentry.source",pn="sentry.sample_rate",Or="sentry.previous_trace_sample_rate",ln="sentry.op",fn="sentry.origin";var dn="sentry.profile_id",mn="sentry.exclusive_time";var mi="_sentryScope",gi="_sentryIsolationScope";function _i(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function St(e){let t=e;return{scope:t[mi],isolationScope:_i(t[gi])}}var hi="sentry-",Si=/^sentry-/;function Et(e){let t=Ei(e);if(!t)return;let n=Object.entries(t).reduce((r,[o,s])=>{if(o.match(Si)){let i=o.slice(hi.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function Ei(e){if(!(!e||!oe(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=Lr(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):Lr(e)}function Lr(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 Ii=/^o(\d+)\./,Ti=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function yi(e){return e==="http"||e==="https"}function U(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 bi(e){let t=Ti.exec(e);if(!t){b(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,o="",s="",i="",a=""]=t.slice(1),c="",u=a,f=u.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),u=f.pop()),u){let l=u.match(/^\d+/);l&&(u=l[0])}return Mr({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function Mr(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function xi(e){if(!g)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(p.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?yi(r)?t&&isNaN(parseInt(t,10))?(p.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(p.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(p.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function Ni(e){return e.match(Ii)?.[1]}function Pr(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=Ni(n)),r}function Dr(e){let t=typeof e=="string"?bi(e):Mr(e);if(!(!t||!xi(t)))return t}function Ye(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 Ur=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Fr(e){if(!e)return;let t=e.match(Ur);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 gn(e,t){let n=Fr(e),r=Et(t);if(!n?.traceId)return{traceId:ke(),sampleRand:P()};let o=Ci(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 Ci(e,t){let n=Ye(t?.sample_rand);if(n!==void 0)return n;let r=Ye(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?P()*r:r+P()*(1-r):P()}var Gr=1,kr=!1;function It(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:xe(e).parent_span_id,s=St(e).scope,i=r?s?.getPropagationContext().propagationSpanId||we():t;return{parent_span_id:o,span_id:i,trace_id:n}}function Ri(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===Gr,attributes:s,...o}))}function wr(e){return typeof e=="number"?Br(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Br(e.getTime()):gt()}function Br(e){return e>9999999999?e/1e3:e}function xe(e){if(vi(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(Ai(e)){let{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:u,start_timestamp:wr(o),timestamp:wr(i)||void 0,status:Oi(a),op:r[ln],origin:r[fn],links:Ri(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function Ai(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function vi(e){return typeof e.getSpanJSON=="function"}function Hr(e){let{traceFlags:t}=e.spanContext();return t===Gr}function Oi(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}var Li="_sentryRootSpan";function ie(e){return e[Li]||e}function Ve(){let e=M(),t=q(e);return t.getActiveSpan?t.getActiveSpan():ye(R())}function _n(){kr||(b(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),kr=!0)}var Wr=!1;function Yr(){if(Wr)return;function e(){let t=Ve(),n=t&&ie(t);if(n){let r="internal_error";g&&p.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:2,message:r})}}e.tag="sentry_tracingErrorCallback",Wr=!0,pr(e),lr(e)}function Vr(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||I()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function $r(e){p.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function hn(e,t){if(!t?.length||!e.description)return!1;for(let n of t){if(Mi(n)){if($(e.description,n))return g&&$r(e),!0;continue}if(!n.name&&!n.op)continue;let r=n.name?$(e.description,n.name):!0,o=n.op?e.op&&$(e.op,n.op):!0;if(r&&o)return g&&$r(e),!0}return!1}function jr(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 Mi(e){return typeof e=="string"||e instanceof RegExp}var Ne="production";var Pi="_frozenDsc";function Zr(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||Ne,release:n.release,public_key:r,trace_id:e,org_id:Pr(t)};return t.emit("createDsc",o),o}function Tt(e,t){let n=t.getPropagationContext();return n.dsc||Zr(n.traceId,e)}function yt(e){let t=I();if(!t)return{};let n=ie(e),r=xe(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[pn]??o[Or];function a(h){return(typeof i=="number"||typeof i=="string")&&(h.sample_rate=`${i}`),h}let c=n[Pi];if(c)return a(c);let u=s?.get("sentry.dsc"),f=u&&Et(u);if(f)return a(f);let l=Zr(e.spanContext().traceId,t),d=o[ht],m=r.description;return d!=="url"&&m&&(l.transaction=m),Vr()&&(l.sampled=String(Hr(n)),l.sample_rand=s?.get("sentry.sample_rand")??St(n).scope?.getPropagationContext().sampleRand.toString()),a(l),t.emit("createDsc",l,n),l}function k(e,t=100,n=1/0){try{return Sn("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function En(e,t=3,n=100*1024){let r=k(e,t);return ki(r)>n?En(e,t-1,n):r}function Sn(e,t,n=1/0,r=1/0,o=wi()){let[s,i]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let a=Di(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(s(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let m=u.toJSON();return Sn("",m,c-1,r,o)}catch{}let f=Array.isArray(t)?[]:{},l=0,d=qt(t);for(let m in d){if(!Object.prototype.hasOwnProperty.call(d,m))continue;if(l>=r){f[m]="[MaxProperties ~]";break}let h=d[m];f[m]=Sn(m,h,c-1,r,o),l++}return i(t),f}function Di(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(dt(t))return ut(t);if(hr(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Me(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=Ui(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Ui(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function Fi(e){return~-encodeURI(e).split(/%..|./).length}function ki(e){return Fi(JSON.stringify(e))}function wi(){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 v(e,t=[]){return[e,t]}function Tn(e,t){let[n,r]=e;return[n,[...r,t]]}function $e(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 yn(e,t){return $e(e,(n,r)=>t.includes(r))}function In(e){let t=J(_);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function je(e){let[t,n]=e,r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[In(r),s]:r.push(typeof s=="string"?In(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(k(a))}o(c)}}return typeof r=="string"?r:Bi(r)}function Bi(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 bn(e){let t=typeof e.data=="string"?In(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Gi={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function bt(e){return Gi[e]}function xt(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function xn(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:U(r)},...o&&{trace:o}}}function Wi(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 Zr(e,t,n,r){let o=xt(n),s={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:U(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return v(s,[i])}function zr(e,t,n,r){let o=xt(n),s=e.type&&e.type!=="replay_event"?e.type:"event";Wi(e,n?.sdk);let i=xn(e,o,r,t);return delete e.sdkProcessingMetadata,v(i,[[{type:s},e]])}var Jr="__SENTRY_SUPPRESS_TRACING__";function Nt(e,t){let n=Xr();return n.withActiveSpan?n.withActiveSpan(e,t):se(r=>(we(r,e||void 0),t(r)))}function Ce(e){let t=Xr();return t.suppressTracing?t.suppressTracing(e):se(n=>{n.setSDKProcessingMetadata({[Jr]:!0});let r=e();return n.setSDKProcessingMetadata({[Jr]:void 0}),r})}function Xr(){let e=M();return q(e)}var Nn=0,Kr=1,Qr=2;function Z(e){return new Ct(t=>{t(e)})}function Re(e){return new Ct((t,n)=>{n(e)})}var Ct=class e{constructor(t){this._state=Nn,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===Nn)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Kr&&n[1](this._value),this._state===Qr&&n[2](this._value),n[0]=!0)})}_runExecutor(t){let n=(s,i)=>{if(this._state===Nn){if(Y(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(Kr,s)},o=s=>{n(Qr,s)};try{t(r,o)}catch(s){o(s)}}};function qr(e,t,n,r=0){try{let o=Cn(t,n,e,r);return Y(o)?o:Z(o)}catch(o){return Re(o)}}function Cn(e,t,n,r){let o=n[r];if(!e||!o)return e;let s=o({...e},t);return g&&s===null&&p.log(`Event processor "${o.id||"?"}" dropped event`),Y(s)?s.then(i=>Cn(i,t,n,r+1)):Cn(s,t,n,r+1)}var ae,eo,to,ee;function no(e){let t=_._sentryDebugIds,n=_._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(ee&&r.length===eo&&o.length===to)return ee;eo=r.length,to=o.length,ee={},ae||(ae={});let s=(i,a)=>{for(let c of i){let u=a[c],f=ae?.[c];if(f&&ee&&u)ee[f[0]]=u,ae&&(ae[c]=[f[0],u]);else if(u){let l=e(c);for(let d=l.length-1;d>=0;d--){let h=l[d]?.filename;if(h&&ee&&ae){ee[h]=u,ae[c]=[h,u];break}}}}};return t&&s(r,t),n&&s(o,n),ee}function oo(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;Yi(e,t),r&&$i(e,r),Zi(e,n),Vi(e,o),ji(e,s)}function ro(e,t){let{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:f,eventProcessors:l,attachments:d,propagationContext:m,transactionName:h,span:S}=t;$e(e,"extra",n),$e(e,"tags",r),$e(e,"attributes",o),$e(e,"user",s),$e(e,"contexts",i),e.sdkProcessingMetadata=Q(e.sdkProcessingMetadata,c,2),a&&(e.level=a),h&&(e.transactionName=h),S&&(e.span=S),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),f.length&&(e.fingerprint=[...e.fingerprint,...f]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...m}}function $e(e,t,n){e[t]=Q(e[t],n,1)}function so(e,t){let n=_t().getScopeData();return e&&ro(n,e.getScopeData()),t&&ro(n,t.getScopeData()),n}function Yi(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 Vi(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ji(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function $i(e,t){e.contexts={trace:It(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:yt(t),...e.sdkProcessingMetadata};let n=ie(t),r=xe(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Zi(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 io(e,t,n,r,o,s){let{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||T(),timestamp:t.timestamp||$()},u=n.integrations||e.integrations.map(x=>x.name);zi(c,e),Ki(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Ji(c,e.stackParser);let f=qi(r,n.captureContext);n.mechanism&&Te(c,n.mechanism);let l=o?o.getEventProcessors():[],d=so(s,f),m=[...n.attachments||[],...d.attachments];m.length&&(n.attachments=m),oo(c,d);let h=[...l,...d.eventProcessors];return(n.data&&n.data.__sentry__===!0?Z(c):qr(h,c,n)).then(x=>(x&&Xi(x),typeof i=="number"&&i>0?Qi(x,i,a):x))}function zi(e,t){let{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||Ne,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);let i=e.request;i?.url&&s&&(i.url=Ee(i.url,s)),s&&e.exception?.values?.forEach(a=>{a.value&&(a.value=Ee(a.value,s))})}function Ji(e,t){let n=no(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function Xi(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 Ki(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Qi(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:k(o.data,t,n)}}))},...e.user&&{user:k(e.user,t,n)},...e.contexts&&{contexts:k(e.contexts,t,n)},...e.extra&&{extra:k(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=k(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:k(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=k(e.contexts.flags,3,n)),r}function qi(e,t){if(!t)return e;let n=e?e.clone():new A;return n.update(t),n}function ao(e){if(e)return ea(e)?{captureContext:e}:na(e)?{captureContext:e}:e}function ea(e){return e instanceof A||typeof e=="function"}var ta=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function na(e){return Object.keys(e).some(t=>ta.includes(t))}function te(e,t){return R().captureException(e,ao(t))}function Rt(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return R().captureMessage(e,n,r)}function At(e){D().setTags(e)}function vt(e){D().setUser(e)}var ra="7";function oa(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function sa(e){return`${oa(e)}${e.projectId}/envelope/`}function ia(e,t){let n={sentry_version:ra};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function uo(e,t,n){return t||`${sa(e)}?${ia(e,n)}`}var Rn=[];function aa(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 An(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 aa(r)}function po(e,t){let n={};return t.forEach(r=>{r&&On(e,r,n)}),n}function vn(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function On(e,t,n){if(n[t.name]){g&&p.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Rn.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),Rn.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)}g&&p.log(`Integration installed: ${t.name}`)}function lo(e,t){return t?se(t,()=>{let n=Ye(),r=n?It(n):He(t);return[n?yt(n):Tt(e,t),r]}):[void 0,void 0]}function ca(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function fo(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=U(r)),v(o,[ca(e)])}function Ze(e,t){let n=t??ua(e)??[];if(n.length===0)return;let r=e.getOptions(),o=fo(n,r._metadata,r.tunnel,e.getDsn());mo().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function ua(e){return mo().get(e)}function mo(){return F("clientToLogBufferMap",()=>new WeakMap)}function pa(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function go(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=U(r)),v(o,[pa(e)])}function _o(e,t){let n=t??la(e)??[];if(n.length===0)return;let r=e.getOptions(),o=go(n,r._metadata,r.tunnel,e.getDsn());ho().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function la(e){return ho().get(e)}function ho(){return F("clientToMetricBufferMap",()=>new WeakMap)}function Ot(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var ze=Symbol.for("SentryBufferFullError");function Lt(e=100){let t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return Re(ze);let a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return Z(!0);let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;let c=[a,new Promise(u=>Ot(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}var fa=60*1e3;function da(e,t=Se()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?fa:r-t}function ma(e,t){return e[t]||e.all||0}function So(e,t,n=Se()){return ma(e,t)>n}function Eo(e,{statusCode:t,headers:n},r=Se()){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,,,f]=a.split(":",5),l=parseInt(c,10),d=(isNaN(l)?60:l)*1e3;if(!u)o.all=r+d;else for(let m of u.split(";"))m==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(o[m]=r+d):o[m]=r+d}else i?o.all=r+da(i,r):t===429&&(o.all=r+60*1e3);return o}var Ln=64;function Je(e,t,n=Lt(e.bufferSize||Ln)){let r={},o=i=>n.drain(i);function s(i){let a=[];if(Ve(i,(l,d)=>{let m=bt(d);So(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):a.push(l)}),a.length===0)return Promise.resolve({});let c=v(i[0],a),u=l=>{if(yn(c,["client_report"])){g&&p.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);return}Ve(c,(d,m)=>{e.recordDroppedEvent(l,bt(m))})},f=()=>t({body:je(c)}).then(l=>l.statusCode===413?(g&&p.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),l):(g&&l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&p.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=Eo(r,l),l),l=>{throw u("network_error"),g&&p.error("Encountered error running transport request:",l),l});return n.add(f).then(l=>l,l=>{if(l===ze)return g&&p.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:s,flush:o}}function Io(e,t,n){let r=[{type:"client_report"},{timestamp:n||$(),discarded_events:e}];return v(t?{dsn:t}:{},[r])}function Mt(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 To(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?.[mn],measurements:e.measurements,is_segment:!0}}function yo(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&&{[mn]:e.exclusive_time}}}},measurements:e.measurements}}var bo="Not capturing exception because it's already been captured.",xo="Discarded session because of missing or non-string release",Oo=Symbol.for("SentryInternalError"),Lo=Symbol.for("SentryDoNotSendEventError"),ga=5e3;function Pt(e){return{message:e,[Oo]:!0}}function Mn(e){return{message:e,[Lo]:!0}}function No(e){return!!e&&typeof e=="object"&&Oo in e}function Co(e){return!!e&&typeof e=="object"&&Lo in e}function Ro(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=Ot(setTimeout(()=>{o(e)},ga)))}),e.on("flush",()=>{o(e)})}var Dt=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Lt(t.transportOptions?.bufferSize??Ln),t.dsn?this._dsn=Pr(t.dsn):g&&p.warn("No DSN provided, client will not send events."),this._dsn){let r=uo(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&&Ro(this,"afterCaptureLog","flushLogs",Ea,Ze),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Ro(this,"afterCaptureMetric","flushMetrics",Sa,_o)}captureException(t,n,r){let o=T();if(mt(t))return g&&p.log(bo),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:T(),...r},i=Pe(t)?t:String(t),a=ft(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=T();if(n?.originalException&&mt(n.originalException))return g&&p.log(bo),o;let s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=Ao(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),Ue(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(!n)return!0;this.emit("flush");let r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){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];On(this,t,this._integrations),n||vn(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=zr(t,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=Tn(r,bn(o));this.sendEnvelope(r).then(o=>this.emit("afterSendEvent",t,o))}sendSession(t){let{release:n,environment:r=Ne}=this._options;if("aggregates"in t){let s=t.attrs||{};if(!s.release&&!n){g&&p.warn(xo);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){g&&p.warn(xo);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);let o=Zr(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&&p.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&&p.error("Error while sending envelope:",n),{}}return g&&p.error("Transport disabled"),{}}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=po(this,t),vn(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)&&(Ue(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),io(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:He(r),...a.contexts};let c=Tt(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=R(),o=D()){return g&&Pn(t)&&p.log(`Captured error event \`${Mt(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{g&&(Co(s)?p.log(s.message):No(s)?p.warn(s.message):p.warn(s))})}_processEvent(t,n,r,o){let s=this.getOptions(),{sampleRate:i}=s,a=Mo(t),c=Pn(t),f=`before send for type \`${t.type||"error"}\``,l=typeof i>"u"?void 0:We(i);if(c&&typeof l=="number"&&P()>l)return this.recordDroppedEvent("sample_rate","error"),Re(Mn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));let d=Ao(t.type);return this._prepareEvent(t,n,r,o).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",d),Mn("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return m;let S=ha(this,s,m,n);return _a(S,f)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",d),a){let x=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",x)}throw Mn(`${f} returned \`null\`, will not send event.`)}let h=r.getSession()||o.getSession();if(c&&h&&this._updateSessionFromEvent(h,m),a){let E=m.sdkProcessingMetadata?.spanCountBeforeProcessing||0,x=m.spans?m.spans.length:0,C=E-x;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 Co(m)||No(m)?m:(this.captureException(m,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:m}),Pt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
- Reason: ${m}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===ze&&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&&p.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){g&&p.log("No outcomes to send");return}if(!this._dsn){g&&p.log("No dsn provided, will not send outcomes");return}g&&p.log("Sending outcomes:",t);let n=Io(t,this._options.tunnel&&U(this._dsn));this.sendEnvelope(n)}};function Ao(e){return e==="replay_event"?"replay":e||"error"}function _a(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Y(e))return e.then(r=>{if(!X(r)&&r!==null)throw Pt(n);return r},r=>{throw Pt(`${t} rejected with ${r}`)});if(!X(e)&&e!==null)throw Pt(n);return e}function ha(e,t,n,r){let{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i,ignoreSpans:a}=t,c=n;if(Pn(c)&&o)return o(c,r);if(Mo(c)){if(i||a){let u=To(c);if(a?.length&&hn(u,a))return null;if(i){let f=i(u);f?c=Q(n,yo(f)):_n()}if(c.spans){let f=[],l=c.spans;for(let m of l){if(a?.length&&hn(m,a)){jr(l,m);continue}if(i){let h=i(m);h?f.push(h):(_n(),f.push(m))}else f.push(m)}let d=c.spans.length-f.length;d&&e.recordDroppedEvent("before_send","span",d),c.spans=f}}if(s){if(c.spans){let u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return s(c,r)}}return c}function Pn(e){return e.type===void 0}function Mo(e){return e.type==="transaction"}function Sa(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Po(e.attributes)}function Ea(e){let t=0;return e.message&&(t+=e.message.length*2),t+Po(e.attributes)}function Po(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*vo(n[0]):ft(n)?t+=vo(n):t+=100}),t}function vo(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function Do(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=U(o)),t&&(s.trace=t);let i=Ia(e);return v(s,[i])}function Ia(e){return[{type:"check_in"},e]}function Uo(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}}}function Fo(e,t){return e(t.stack||"",1)}function Ta(e){return Me(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function ya(e){return Ta(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function Dn(e,t){let n={type:t.name||t.constructor.name,value:ya(t)},r=Fo(e,t);return r.length&&(n.stacktrace={frames:r}),n}function ba(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function xa(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=br(e);if(dr(e))return`Event \`ErrorEvent\` captured as exception with message \`${e.message}\``;let n=Na(e);return`${n&&n!=="Object"?`'${n}'`:"Object"} captured as exception with keys: ${t}`}function Na(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Ca(e,t,n,r){if(Me(n))return[n,void 0];if(t.synthetic=!0,X(n)){let s=e?.getOptions().normalizeDepth,i={__serialized__:En(n,s)},a=ba(n);if(a)return[a,i];let c=xa(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 ko(e,t,n,r){let s=r?.data&&r.data.mechanism||{handled:!0,type:"generic"},[i,a]=Ca(e,s,n,r),c={exception:{values:[Dn(t,i)]}};return a&&(c.extra=a),on(c,void 0,void 0),Te(c,s),{...c,event_id:r?.event_id}}function wo(e,t,n="info",r,o){let s={event_id:r?.event_id,level:n};if(o&&r?.syntheticException){let i=Fo(e,r.syntheticException);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]},Te(s,{synthetic:!0}))}if(Pe(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 Xe=class extends Dt{constructor(t){Wr(),Uo(t),super(t),this._setUpMetricsProcessing()}eventFromException(t,n){let r=ko(this,this._options.stackParser,t,n);return r.level="error",Z(r)}eventFromMessage(t,n="info",r){return Z(wo(this._options.stackParser,t,n,r,this._options.attachStacktrace))}captureException(t,n,r){return Bo(n),super.captureException(t,n,r)}captureEvent(t,n,r){return!t.type&&t.exception?.values&&t.exception.values.length>0&&Bo(n),super.captureEvent(t,n,r)}captureCheckIn(t,n,r){let o="checkInId"in t&&t.checkInId?t.checkInId:T();if(!this._isEnabled())return g&&p.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[f,l]=lo(this,r);l&&(u.contexts={trace:l});let d=Do(u,f,this.getSdkMetadata(),c,this.getDsn());return g&&p.log("Sending checkin:",t.monitorSlug,t.status),this.sendEnvelope(d),o}_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 Bo(e){let t=D().getScopeData().sdkProcessingMetadata.requestSession;if(t){let n=e?.mechanism?.handled??!0;n&&t.status!=="crashed"?t.status="errored":n||(t.status="crashed")}}var Ra=new Set(["false","f","n","no","off","0"]),Aa=new Set(["true","t","y","yes","on","1"]);function ce(e,t){let n=String(e).toLowerCase();return Ra.has(n)?!1:Aa.has(n)?!0:t?.strict?null:!!e}function Ke(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:w})),o.version=w)}var va=100;function Un(e,t){let n=I(),r=D();if(!n)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:s=va}=n.getOptions();if(s<=0)return;let a={timestamp:$(),...e},c=o?b(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}var Go,Oa="FunctionToString",Ho=new WeakMap,La=(()=>({name:Oa,setupOnce(){Go=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=yr(this),n=Ho.has(I())&&t!==void 0?t:this;return Go.apply(n,e)}}catch{}},setup(e){Ho.set(e,!0)}})),Qe=La;var Ma=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],Pa="EventFilters",Ae=(e={})=>{let t;return{name:Pa,setup(n){let r=n.getOptions();t=Wo(e,r)},processEvent(n,r,o){if(!t){let s=o.getOptions();t=Wo(e,s)}return Ua(n,t)?null:n}}},Da=((e={})=>({...Ae(e),name:"InboundFilters"}));function Wo(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Ma],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Ua(e,t){if(e.type){if(e.type==="transaction"&&ka(e,t.ignoreTransactions))return g&&p.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
7
+ `),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(k(a))}o(c)}}return typeof r=="string"?r:Bi(r)}function Bi(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 bn(e){let t=typeof e.data=="string"?In(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var Gi={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function bt(e){return Gi[e]}function xt(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function xn(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:U(r)},...o&&{trace:o}}}function Wi(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 zr(e,t,n,r){let o=xt(n),s={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:U(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return v(s,[i])}function Jr(e,t,n,r){let o=xt(n),s=e.type&&e.type!=="replay_event"?e.type:"event";Wi(e,n?.sdk);let i=xn(e,o,r,t);return delete e.sdkProcessingMetadata,v(i,[[{type:s},e]])}var Xr="__SENTRY_SUPPRESS_TRACING__";function Nt(e,t){let n=Kr();return n.withActiveSpan?n.withActiveSpan(e,t):se(r=>(Be(r,e||void 0),t(r)))}function Ce(e){let t=Kr();return t.suppressTracing?t.suppressTracing(e):se(n=>{n.setSDKProcessingMetadata({[Xr]:!0});let r=e();return n.setSDKProcessingMetadata({[Xr]:void 0}),r})}function Kr(){let e=M();return q(e)}var Nn=0,Qr=1,qr=2;function Z(e){return new Ct(t=>{t(e)})}function Re(e){return new Ct((t,n)=>{n(e)})}var Ct=class e{constructor(t){this._state=Nn,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===Nn)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Qr&&n[1](this._value),this._state===qr&&n[2](this._value),n[0]=!0)})}_runExecutor(t){let n=(s,i)=>{if(this._state===Nn){if(Y(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(Qr,s)},o=s=>{n(qr,s)};try{t(r,o)}catch(s){o(s)}}};function eo(e,t,n,r=0){try{let o=Cn(t,n,e,r);return Y(o)?o:Z(o)}catch(o){return Re(o)}}function Cn(e,t,n,r){let o=n[r];if(!e||!o)return e;let s=o({...e},t);return g&&s===null&&p.log(`Event processor "${o.id||"?"}" dropped event`),Y(s)?s.then(i=>Cn(i,t,n,r+1)):Cn(s,t,n,r+1)}var ae,to,no,ee;function ro(e){let t=_._sentryDebugIds,n=_._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(ee&&r.length===to&&o.length===no)return ee;to=r.length,no=o.length,ee={},ae||(ae={});let s=(i,a)=>{for(let c of i){let u=a[c],f=ae?.[c];if(f&&ee&&u)ee[f[0]]=u,ae&&(ae[c]=[f[0],u]);else if(u){let l=e(c);for(let d=l.length-1;d>=0;d--){let h=l[d]?.filename;if(h&&ee&&ae){ee[h]=u,ae[c]=[h,u];break}}}}};return t&&s(r,t),n&&s(o,n),ee}function so(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;Yi(e,t),r&&ji(e,r),Zi(e,n),Vi(e,o),$i(e,s)}function oo(e,t){let{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:f,eventProcessors:l,attachments:d,propagationContext:m,transactionName:h,span:S}=t;Ze(e,"extra",n),Ze(e,"tags",r),Ze(e,"attributes",o),Ze(e,"user",s),Ze(e,"contexts",i),e.sdkProcessingMetadata=Q(e.sdkProcessingMetadata,c,2),a&&(e.level=a),h&&(e.transactionName=h),S&&(e.span=S),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),f.length&&(e.fingerprint=[...e.fingerprint,...f]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...m}}function Ze(e,t,n){e[t]=Q(e[t],n,1)}function io(e,t){let n=_t().getScopeData();return e&&oo(n,e.getScopeData()),t&&oo(n,t.getScopeData()),n}function Yi(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 Vi(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function $i(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function ji(e,t){e.contexts={trace:It(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:yt(t),...e.sdkProcessingMetadata};let n=ie(t),r=xe(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function Zi(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 ao(e,t,n,r,o,s){let{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||T(),timestamp:t.timestamp||j()},u=n.integrations||e.integrations.map(x=>x.name);zi(c,e),Ki(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Ji(c,e.stackParser);let f=qi(r,n.captureContext);n.mechanism&&Te(c,n.mechanism);let l=o?o.getEventProcessors():[],d=io(s,f),m=[...n.attachments||[],...d.attachments];m.length&&(n.attachments=m),so(c,d);let h=[...l,...d.eventProcessors];return(n.data&&n.data.__sentry__===!0?Z(c):eo(h,c,n)).then(x=>(x&&Xi(x),typeof i=="number"&&i>0?Qi(x,i,a):x))}function zi(e,t){let{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||Ne,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);let i=e.request;i?.url&&s&&(i.url=Ee(i.url,s)),s&&e.exception?.values?.forEach(a=>{a.value&&(a.value=Ee(a.value,s))})}function Ji(e,t){let n=ro(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function Xi(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 Ki(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Qi(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:k(o.data,t,n)}}))},...e.user&&{user:k(e.user,t,n)},...e.contexts&&{contexts:k(e.contexts,t,n)},...e.extra&&{extra:k(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=k(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:k(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=k(e.contexts.flags,3,n)),r}function qi(e,t){if(!t)return e;let n=e?e.clone():new A;return n.update(t),n}function co(e){if(e)return ea(e)?{captureContext:e}:na(e)?{captureContext:e}:e}function ea(e){return e instanceof A||typeof e=="function"}var ta=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function na(e){return Object.keys(e).some(t=>ta.includes(t))}function te(e,t){return R().captureException(e,co(t))}function Rt(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return R().captureMessage(e,n,r)}function At(e){D().setTags(e)}function vt(e){D().setUser(e)}var ra="7";function oa(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function sa(e){return`${oa(e)}${e.projectId}/envelope/`}function ia(e,t){let n={sentry_version:ra};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function po(e,t,n){return t||`${sa(e)}?${ia(e,n)}`}var Rn=[];function aa(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 An(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 aa(r)}function lo(e,t){let n={};return t.forEach(r=>{r&&On(e,r,n)}),n}function vn(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function On(e,t,n){if(n[t.name]){g&&p.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!Rn.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),Rn.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)}g&&p.log(`Integration installed: ${t.name}`)}function fo(e,t){return t?se(t,()=>{let n=Ve(),r=n?It(n):We(t);return[n?yt(n):Tt(e,t),r]}):[void 0,void 0]}function ca(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function mo(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=U(r)),v(o,[ca(e)])}function Ae(e,t){let n=t??ua(e)??[];if(n.length===0)return;let r=e.getOptions(),o=mo(n,r._metadata,r.tunnel,e.getDsn());go().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function ua(e){return go().get(e)}function go(){return F("clientToLogBufferMap",()=>new WeakMap)}function pa(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function _o(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=U(r)),v(o,[pa(e)])}function ho(e,t){let n=t??la(e)??[];if(n.length===0)return;let r=e.getOptions(),o=_o(n,r._metadata,r.tunnel,e.getDsn());So().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function la(e){return So().get(e)}function So(){return F("clientToMetricBufferMap",()=>new WeakMap)}function Ot(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var ze=Symbol.for("SentryBufferFullError");function Lt(e=100){let t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return Re(ze);let a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return Z(!0);let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;let c=[a,new Promise(u=>Ot(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}var fa=60*1e3;function da(e,t=Se()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?fa:r-t}function ma(e,t){return e[t]||e.all||0}function Eo(e,t,n=Se()){return ma(e,t)>n}function Io(e,{statusCode:t,headers:n},r=Se()){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,,,f]=a.split(":",5),l=parseInt(c,10),d=(isNaN(l)?60:l)*1e3;if(!u)o.all=r+d;else for(let m of u.split(";"))m==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(o[m]=r+d):o[m]=r+d}else i?o.all=r+da(i,r):t===429&&(o.all=r+60*1e3);return o}var Ln=64;function Je(e,t,n=Lt(e.bufferSize||Ln)){let r={},o=i=>n.drain(i);function s(i){let a=[];if($e(i,(l,d)=>{let m=bt(d);Eo(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):a.push(l)}),a.length===0)return Promise.resolve({});let c=v(i[0],a),u=l=>{if(yn(c,["client_report"])){g&&p.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);return}$e(c,(d,m)=>{e.recordDroppedEvent(l,bt(m))})},f=()=>t({body:je(c)}).then(l=>l.statusCode===413?(g&&p.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),l):(g&&l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&p.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=Io(r,l),l),l=>{throw u("network_error"),g&&p.error("Encountered error running transport request:",l),l});return n.add(f).then(l=>l,l=>{if(l===ze)return g&&p.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:s,flush:o}}function To(e,t,n){let r=[{type:"client_report"},{timestamp:n||j(),discarded_events:e}];return v(t?{dsn:t}:{},[r])}function Mt(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 yo(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?.[mn],measurements:e.measurements,is_segment:!0}}function bo(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&&{[mn]:e.exclusive_time}}}},measurements:e.measurements}}var xo="Not capturing exception because it's already been captured.",No="Discarded session because of missing or non-string release",Lo=Symbol.for("SentryInternalError"),Mo=Symbol.for("SentryDoNotSendEventError"),ga=5e3;function Pt(e){return{message:e,[Lo]:!0}}function Mn(e){return{message:e,[Mo]:!0}}function Co(e){return!!e&&typeof e=="object"&&Lo in e}function Ro(e){return!!e&&typeof e=="object"&&Mo in e}function Ao(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=Ot(setTimeout(()=>{o(e)},ga)))}),e.on("flush",()=>{o(e)})}var Dt=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=Lt(t.transportOptions?.bufferSize??Ln),t.dsn?this._dsn=Dr(t.dsn):g&&p.warn("No DSN provided, client will not send events."),this._dsn){let r=po(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&&Ao(this,"afterCaptureLog","flushLogs",Ea,Ae),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Ao(this,"afterCaptureMetric","flushMetrics",Sa,ho)}captureException(t,n,r){let o=T();if(mt(t))return g&&p.log(xo),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:T(),...r},i=De(t)?t:String(t),a=ft(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=T();if(n?.originalException&&mt(n.originalException))return g&&p.log(xo),o;let s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=vo(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),Fe(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(!n)return!0;this.emit("flush");let r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){Ae(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];On(this,t,this._integrations),n||vn(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Jr(t,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=Tn(r,bn(o));this.sendEnvelope(r).then(o=>this.emit("afterSendEvent",t,o))}sendSession(t){let{release:n,environment:r=Ne}=this._options;if("aggregates"in t){let s=t.attrs||{};if(!s.release&&!n){g&&p.warn(No);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){g&&p.warn(No);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);let o=zr(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&&p.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&&p.error("Error while sending envelope:",n),{}}return g&&p.error("Transport disabled"),{}}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=lo(this,t),vn(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)&&(Fe(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),ao(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:We(r),...a.contexts};let c=Tt(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=R(),o=D()){return g&&Pn(t)&&p.log(`Captured error event \`${Mt(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{g&&(Ro(s)?p.log(s.message):Co(s)?p.warn(s.message):p.warn(s))})}_processEvent(t,n,r,o){let s=this.getOptions(),{sampleRate:i}=s,a=Po(t),c=Pn(t),f=`before send for type \`${t.type||"error"}\``,l=typeof i>"u"?void 0:Ye(i);if(c&&typeof l=="number"&&P()>l)return this.recordDroppedEvent("sample_rate","error"),Re(Mn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));let d=vo(t.type);return this._prepareEvent(t,n,r,o).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",d),Mn("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return m;let S=ha(this,s,m,n);return _a(S,f)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",d),a){let x=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",x)}throw Mn(`${f} returned \`null\`, will not send event.`)}let h=r.getSession()||o.getSession();if(c&&h&&this._updateSessionFromEvent(h,m),a){let E=m.sdkProcessingMetadata?.spanCountBeforeProcessing||0,x=m.spans?m.spans.length:0,C=E-x;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 Ro(m)||Co(m)?m:(this.captureException(m,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:m}),Pt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
+ Reason: ${m}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===ze&&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&&p.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){g&&p.log("No outcomes to send");return}if(!this._dsn){g&&p.log("No dsn provided, will not send outcomes");return}g&&p.log("Sending outcomes:",t);let n=To(t,this._options.tunnel&&U(this._dsn));this.sendEnvelope(n)}};function vo(e){return e==="replay_event"?"replay":e||"error"}function _a(e,t){let n=`${t} must return \`null\` or a valid event.`;if(Y(e))return e.then(r=>{if(!X(r)&&r!==null)throw Pt(n);return r},r=>{throw Pt(`${t} rejected with ${r}`)});if(!X(e)&&e!==null)throw Pt(n);return e}function ha(e,t,n,r){let{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i,ignoreSpans:a}=t,c=n;if(Pn(c)&&o)return o(c,r);if(Po(c)){if(i||a){let u=yo(c);if(a?.length&&hn(u,a))return null;if(i){let f=i(u);f?c=Q(n,bo(f)):_n()}if(c.spans){let f=[],l=c.spans;for(let m of l){if(a?.length&&hn(m,a)){jr(l,m);continue}if(i){let h=i(m);h?f.push(h):(_n(),f.push(m))}else f.push(m)}let d=c.spans.length-f.length;d&&e.recordDroppedEvent("before_send","span",d),c.spans=f}}if(s){if(c.spans){let u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return s(c,r)}}return c}function Pn(e){return e.type===void 0}function Po(e){return e.type==="transaction"}function Sa(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Do(e.attributes)}function Ea(e){let t=0;return e.message&&(t+=e.message.length*2),t+Do(e.attributes)}function Do(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*Oo(n[0]):ft(n)?t+=Oo(n):t+=100}),t}function Oo(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function Uo(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=U(o)),t&&(s.trace=t);let i=Ia(e);return v(s,[i])}function Ia(e){return[{type:"check_in"},e]}function Fo(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}}}function ko(e,t){return e(t.stack||"",1)}function Ta(e){return Pe(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function ya(e){return Ta(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function Dn(e,t){let n={type:t.name||t.constructor.name,value:ya(t)},r=ko(e,t);return r.length&&(n.stacktrace={frames:r}),n}function ba(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function xa(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=br(e);if(dr(e))return`Event \`ErrorEvent\` captured as exception with message \`${e.message}\``;let n=Na(e);return`${n&&n!=="Object"?`'${n}'`:"Object"} captured as exception with keys: ${t}`}function Na(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function Ca(e,t,n,r){if(Pe(n))return[n,void 0];if(t.synthetic=!0,X(n)){let s=e?.getOptions().normalizeDepth,i={__serialized__:En(n,s)},a=ba(n);if(a)return[a,i];let c=xa(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 wo(e,t,n,r){let s=r?.data&&r.data.mechanism||{handled:!0,type:"generic"},[i,a]=Ca(e,s,n,r),c={exception:{values:[Dn(t,i)]}};return a&&(c.extra=a),on(c,void 0,void 0),Te(c,s),{...c,event_id:r?.event_id}}function Bo(e,t,n="info",r,o){let s={event_id:r?.event_id,level:n};if(o&&r?.syntheticException){let i=ko(e,r.syntheticException);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]},Te(s,{synthetic:!0}))}if(De(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 Xe=class extends Dt{constructor(t){Yr(),Fo(t),super(t),this._setUpMetricsProcessing()}eventFromException(t,n){let r=wo(this,this._options.stackParser,t,n);return r.level="error",Z(r)}eventFromMessage(t,n="info",r){return Z(Bo(this._options.stackParser,t,n,r,this._options.attachStacktrace))}captureException(t,n,r){return Go(n),super.captureException(t,n,r)}captureEvent(t,n,r){return!t.type&&t.exception?.values&&t.exception.values.length>0&&Go(n),super.captureEvent(t,n,r)}captureCheckIn(t,n,r){let o="checkInId"in t&&t.checkInId?t.checkInId:T();if(!this._isEnabled())return g&&p.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[f,l]=fo(this,r);l&&(u.contexts={trace:l});let d=Uo(u,f,this.getSdkMetadata(),c,this.getDsn());return g&&p.log("Sending checkin:",t.monitorSlug,t.status),this.sendEnvelope(d),o}_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 Go(e){let t=D().getScopeData().sdkProcessingMetadata.requestSession;if(t){let n=e?.mechanism?.handled??!0;n&&t.status!=="crashed"?t.status="errored":n||(t.status="crashed")}}var Ra=new Set(["false","f","n","no","off","0"]),Aa=new Set(["true","t","y","yes","on","1"]);function ce(e,t){let n=String(e).toLowerCase();return Ra.has(n)?!1:Aa.has(n)?!0:t?.strict?null:!!e}function Ke(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:w})),o.version=w)}var va=100;function Un(e,t){let n=I(),r=D();if(!n)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:s=va}=n.getOptions();if(s<=0)return;let a={timestamp:j(),...e},c=o?b(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}var Ho,Oa="FunctionToString",Wo=new WeakMap,La=(()=>({name:Oa,setupOnce(){Ho=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=yr(this),n=Wo.has(I())&&t!==void 0?t:this;return Ho.apply(n,e)}}catch{}},setup(e){Wo.set(e,!0)}})),Qe=La;var Ma=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],Pa="EventFilters",ve=(e={})=>{let t;return{name:Pa,setup(n){let r=n.getOptions();t=Yo(e,r)},processEvent(n,r,o){if(!t){let s=o.getOptions();t=Yo(e,s)}return Ua(n,t)?null:n}}},Da=((e={})=>({...ve(e),name:"InboundFilters"}));function Yo(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:Ma],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function Ua(e,t){if(e.type){if(e.type==="transaction"&&ka(e,t.ignoreTransactions))return g&&p.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
9
9
  Event: ${K(e)}`),!0}else{if(Fa(e,t.ignoreErrors))return g&&p.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
10
10
  Event: ${K(e)}`),!0;if(Ha(e))return g&&p.warn(`Event dropped due to not having an error message, error type or stacktrace.
11
11
  Event: ${K(e)}`),!0;if(wa(e,t.denyUrls))return g&&p.warn(`Event dropped due to being matched by \`denyUrls\` option.
12
12
  Event: ${K(e)}.
13
13
  Url: ${Ut(e)}`),!0;if(!Ba(e,t.allowUrls))return g&&p.warn(`Event dropped due to not being matched by \`allowUrls\` option.
14
14
  Event: ${K(e)}.
15
- Url: ${Ut(e)}`),!0}return!1}function Fa(e,t){return t?.length?Mt(e).some(n=>Ie(n,t)):!1}function ka(e,t){if(!t?.length)return!1;let n=e.transaction;return n?Ie(n,t):!1}function wa(e,t){if(!t?.length)return!1;let n=Ut(e);return n?Ie(n,t):!1}function Ba(e,t){if(!t?.length)return!0;let n=Ut(e);return n?Ie(n,t):!0}function Ga(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 Ut(e){try{let n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?Ga(n):null}catch{return g&&p.error(`Cannot extract url for event ${K(e)}`),null}}function Ha(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function jo(e,t,n,r,o,s){if(!o.exception?.values||!s||!V(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=Fn(e,t,r,s.originalException,n,o.exception.values,i,0))}function Fn(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(V(r[o],Error)){Yo(i,a,r);let u=e(t,r[o]),f=c.length;Vo(u,o,f,a),c=Fn(e,t,n,r[o],o,[u,...c],u,f)}return $o(r)&&r.errors.forEach((u,f)=>{if(V(u,Error)){Yo(i,a,r);let l=e(t,u),d=c.length;Vo(l,`errors[${f}]`,d,a),c=Fn(e,t,n,u,o,[l,...c],l,d)}}),c}function $o(e){return Array.isArray(e.errors)}function Yo(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...$o(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Vo(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}var Wa="cause",Ya=5,Va="LinkedErrors",ja=((e={})=>{let t=e.limit||Ya,n=e.key||Wa;return{name:Va,preprocessEvent(r,o,s){let i=s.getOptions();jo(Dn,i.stackParser,n,t,r,o)}}}),qe=ja;function Zo(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 kn=["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 zo(e){let t={};for(let s of Object.keys(e))t[s.toLowerCase()]=e[s];return kn.map(s=>{let i=t[s.toLowerCase()],a=Array.isArray(i)?i.join(";"):i;return s==="Forwarded"?$a(a):a?.split(",").map(c=>c.trim())}).reduce((s,i)=>i?s.concat(i):s,[]).find(s=>s!==null&&Za(s))||null}function $a(e){if(!e)return null;for(let t of e.split(";"))if(t.startsWith("for="))return t.slice(4);return null}function Za(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 za={cookies:!0,data:!0,headers:!0,query_string:!0,url:!0},Ja="RequestData",Xa=((e={})=>{let t={...za,...e.include};return{name:Ja,processEvent(n,r,o){let{sdkProcessingMetadata:s={}}=n,{normalizedRequest:i,ipAddress:a}=s,c={...t,ip:t.ip??o.getOptions().sendDefaultPii};return i&&Ka(n,i,{ipAddress:a},c),n}}}),et=Xa;function Ka(e,t,n,r){if(e.request={...e.request,...Qa(t,r)},r.ip){let o=t.headers&&zo(t.headers)||n.ipAddress;o&&(e.user={...e.user,ip_address:o})}}function Qa(e,t){let n={},r={...e.headers};if(t.headers&&(n.headers=r,t.cookies||delete r.cookie,t.ip||kn.forEach(o=>{delete r[o]})),n.method=e.method,t.url&&(n.url=e.url),t.cookies){let o=e.cookies||(r?.cookie?Zo(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 Jo(e){let t="console";de(t,e),me(t,qa)}function qa(){"console"in _&&Oe.forEach(function(e){e in _.console&&Tr(_.console,e,function(t){return fe[e]=t,function(...n){ge("console",{args:n,level:e}),fe[e]?.apply(_.console,n)}})})}function Xo(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var ec=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function tc(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=ec.exec(t);return n?n.slice(1):[]}function wn(e){let t=tc(e),n=t[0]||"",r=t[1];return!n&&!r?".":(r&&(r=r.slice(0,r.length-1)),n+r)}var nc="Console",tt=(e={})=>{let t=new Set(e.levels||Oe);return{name:nc,setup(n){Jo(({args:r,level:o})=>{I()!==n||!t.has(o)||rc(o,r)})}}};function rc(e,t){let n={category:"console",data:{arguments:t,logger:"console"},level:Xo(e),message:Ko(t)};if(e==="assert")if(t[0]===!1){let r=t.slice(1);n.message=r.length>0?`Assertion failed: ${Ko(r)}`:"Assertion failed",n.data.arguments=r}else return;Un(n,{input:t,level:e})}function Ko(e){return"util"in _&&typeof _.util.format=="function"?_.util.format(...e):tn(e," ")}function es(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 ts(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,f,l;if(i[1]){u=i[1];let h=u.lastIndexOf(".");if(u[h-1]==="."&&h--,h>0){a=u.slice(0,h),c=u.slice(h+1);let S=a.indexOf(".Module");S>0&&(u=u.slice(S+1),a=a.slice(0,S))}f=void 0}c&&(f=a,l=c),c==="<anonymous>"&&(l=void 0,u=void 0),u===void 0&&(l=l||"?",u=f?`${f}.${l}`:l);let d=cr(i[2]),m=i[5]==="native";return!d&&i[5]&&!m&&(d=i[5]),{filename:d?decodeURI(d):void 0,module:e?e(d):void 0,function:u,lineno:Qo(i[3]),colno:Qo(i[4]),in_app:es(d||"",m)}}if(o.match(t))return{filename:o}}}function Bn(e){return[90,ts(e)]}function Qo(e){return parseInt(e||"",10)||void 0}var ne=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}};var kt=require("worker_threads");var N=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Cc=6e4,Ft=class extends Xe{constructor(t){let n=t.includeServerName===!1?void 0:t.serverName||global.process.env.SENTRY_NAME||ns.hostname(),r={...t,platform:"node",runtime:{name:"node",version:global.process.version},serverName:n};Ke(r,"node-light",["node-core"]),p.log(`Initializing Sentry: process: ${process.pid}, thread: ${kt.isMainThread?"main":`worker-${kt.threadId}`}.`),super(r),this.getOptions().enableLogs&&(this._logOnExitFlushListener=()=>{Ze(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(()=>{N&&p.log("Flushing client reports based on interval."),this._flushOutcomes()},t.clientReportFlushInterval??Cc).unref(),process.on("beforeExit",this._clientReportOnExitFlushListener))}};var os=require("node:child_process"),wt=require("node:fs"),y=O(require("node:os"),1),ss=require("node:path"),Gn=require("node:util");var Rc=(0,Gn.promisify)(wt.readFile),Ac=(0,Gn.promisify)(wt.readdir),vc="Context",Oc=((e={})=>{let t,n={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0,...e};async function r(s){t===void 0&&(t=o());let i=Lc(await t);return s.contexts={...s.contexts,app:{...i.app,...s.contexts?.app},os:{...i.os,...s.contexts?.os},device:{...i.device,...s.contexts?.device},culture:{...i.culture,...s.contexts?.culture},cloud_resource:{...i.cloud_resource,...s.contexts?.cloud_resource}},s}async function o(){let s={};if(n.os&&(s.os=await Mc()),n.app&&(s.app=Dc()),n.device&&(s.device=Uc(n.device)),n.culture){let i=Pc();i&&(s.culture=i)}return n.cloudResource&&(s.cloud_resource=Hc()),s}return{name:vc,processEvent(s){return r(s)}}}),Hn=Oc;function Lc(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}async function Mc(){let e=y.platform();switch(e){case"darwin":return Bc();case"linux":return Gc();default:return{name:Fc[e]||e,version:y.release()}}}function Pc(){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 Dc(){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 Uc(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 Fc={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows",ohos:"OpenHarmony",android:"Android"},kc=[{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"]}],wc={alpine:e=>e,arch:e=>B(/distrib_release=(.*)/,e),centos:e=>B(/release ([^ ]+)/,e),debian:e=>e,fedora:e=>B(/release (..)/,e),mint:e=>B(/distrib_release=(.*)/,e),red:e=>B(/release ([^ ]+)/,e),suse:e=>B(/VERSION = (.*)\n/,e),ubuntu:e=>B(/distrib_release=(.*)/,e)};function B(e,t){let n=e.exec(t);return n?n[1]:void 0}async function Bc(){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,os.execFile)("/usr/bin/sw_vers",(o,s)=>{if(o){r(o);return}n(s)})});e.name=B(/^ProductName:\s+(.*)$/m,t),e.version=B(/^ProductVersion:\s+(.*)$/m,t),e.build=B(/^BuildVersion:\s+(.*)$/m,t)}catch{}return e}function rs(e){return e.split(" ")[0].toLowerCase()}async function Gc(){let e={kernel_version:y.release(),name:"Linux"};try{let t=await Ac("/etc"),n=kc.find(a=>t.includes(a.name));if(!n)return e;let r=(0,ss.join)("/etc",n.name),o=(await Rc(r,{encoding:"utf-8"})).toLowerCase(),{distros:s}=n;e.name=s.find(a=>o.indexOf(rs(a))>=0)||s[0];let i=rs(e.name);e.version=wc[i]?.(o)}catch{}return e}function Hc(){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 cs=require("node:fs"),us=require("node:readline");var Wn=new ne(10),ps=new ne(20),Wc=7,Yc="ContextLines",Vc=1e3,jc=1e4;function $c(e,t,n){let r=e.get(t);return r===void 0?(e.set(t,n),n):r}function Zc(e){return!!(e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:"))}function zc(e){return e.lineno!==void 0&&e.lineno>jc||e.colno!==void 0&&e.colno>Vc}function Jc(e,t){let n=Wn.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 Xc(e,t){if(!e.length)return[];let n=0,r=e[0];if(typeof r!="number")return[];let o=as(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=as(i,t)),n++}return s}function Kc(e,t,n){return new Promise((r,o)=>{let s=(0,cs.createReadStream)(e),i=(0,us.createInterface)({input:s});function a(){s.destroy(),r()}let c=0,u=0,f=t[u];if(f===void 0){a();return}let l=f[0],d=f[1];function m(h){ps.set(e,1),N&&p.error(`Failed to read file: ${e}. Error: ${h}`),i.close(),i.removeAllListeners(),a()}s.on("error",m),i.on("error",m),i.on("close",a),i.on("line",h=>{if(c++,!(c<l)&&(n[c]=en(h,0),c>=d)){if(u===t.length-1){i.close(),i.removeAllListeners();return}u++;let S=t[u];if(S===void 0){i.close(),i.removeAllListeners();return}l=S[0],d=S[1]}})})}async function Qc(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"||Zc(c)||zc(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(ps.get(s))continue;let i=n[s];if(!i)continue;i.sort((u,f)=>u-f);let a=Xc(i,t);if(a.every(u=>Jc(s,u)))continue;let c=$c(Wn,s,{});o.push(Kc(s,a,c))}if(await Promise.all(o).catch(()=>{N&&p.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&&qc(s.stacktrace.frames,t,Wn);return e}function qc(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;eu(r.lineno,r,t,o)}}function is(e){delete e.pre_context,delete e.context_line,delete e.post_context}function eu(e,t,n,r){if(t.lineno===void 0||r===void 0){N&&p.error("Cannot resolve context for frame with no lineno or file contents");return}t.pre_context=[];for(let s=ls(e,n);s<e;s++){let i=r[s];if(i===void 0){is(t),N&&p.error(`Could not find line ${s} in file ${t.filename}`);return}t.pre_context.push(i)}if(r[e]===void 0){is(t),N&&p.error(`Could not find line ${e} in file ${t.filename}`);return}t.context_line=r[e];let o=fs(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 ls(e,t){return Math.max(1,e-t)}function fs(e,t){return e+t}function as(e,t){return[ls(e,t),fs(e,t)]}var tu=((e={})=>{let t=e.frameContextLines!==void 0?e.frameContextLines:Wc;return{name:Yc,processEvent(n){return Qc(n,t)}}}),Yn=tu;var Bt=sn(process.versions.node),ds=Bt.major,m_=Bt.minor;var hs=require("node:worker_threads");var Gt;async function Ht(){if(Gt===void 0)try{Gt=!!(await import("node:inspector")).url()}catch{Gt=!1}return Gt}var nt="__SENTRY_ERROR_LOCAL_VARIABLES__";function gs(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 ms(e){return e!==void 0&&(e.length===0||e==="?"||e==="<anonymous>")}function Wt(e,t){return e===t||`Object.${e}`===t||e===`Object.${t}`||ms(e)&&ms(t)}var nu="LyohIEBzZW50cnkvbm9kZS1jb3JlIDEwLjM5LjAgKGFiNTRjNWMpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPWdsb2JhbFRoaXMsaT17fTtjb25zdCBvPSJfX1NFTlRSWV9FUlJPUl9MT0NBTF9WQVJJQUJMRVNfXyI7Y29uc3QgYT10O2Z1bmN0aW9uIHMoLi4uZSl7YS5kZWJ1ZyYmZnVuY3Rpb24oZSl7aWYoISgiY29uc29sZSJpbiBuKSlyZXR1cm4gZSgpO2NvbnN0IHQ9bi5jb25zb2xlLG89e30sYT1PYmplY3Qua2V5cyhpKTthLmZvckVhY2goZT0+e2NvbnN0IG49aVtlXTtvW2VdPXRbZV0sdFtlXT1ufSk7dHJ5e3JldHVybiBlKCl9ZmluYWxseXthLmZvckVhY2goZT0+e3RbZV09b1tlXX0pfX0oKCk9PmNvbnNvbGUubG9nKCJbTG9jYWxWYXJpYWJsZXMgV29ya2VyXSIsLi4uZSkpfWFzeW5jIGZ1bmN0aW9uIGMoZSx0LG4saSl7Y29uc3Qgbz1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pO2lbbl09by5yZXN1bHQuZmlsdGVyKGU9PiJsZW5ndGgiIT09ZS5uYW1lJiYhaXNOYU4ocGFyc2VJbnQoZS5uYW1lLDEwKSkpLnNvcnQoKGUsdCk9PnBhcnNlSW50KGUubmFtZSwxMCktcGFyc2VJbnQodC5uYW1lLDEwKSkubWFwKGU9PmUudmFsdWU/LnZhbHVlKX1hc3luYyBmdW5jdGlvbiByKGUsdCxuLGkpe2NvbnN0IG89YXdhaXQgZS5wb3N0KCJSdW50aW1lLmdldFByb3BlcnRpZXMiLHtvYmplY3RJZDp0LG93blByb3BlcnRpZXM6ITB9KTtpW25dPW8ucmVzdWx0Lm1hcChlPT5bZS5uYW1lLGUudmFsdWU/LnZhbHVlXSkucmVkdWNlKChlLFt0LG5dKT0+KGVbdF09bixlKSx7fSl9ZnVuY3Rpb24gdShlLHQpe2UudmFsdWUmJigidmFsdWUiaW4gZS52YWx1ZT92b2lkIDA9PT1lLnZhbHVlLnZhbHVlfHxudWxsPT09ZS52YWx1ZS52YWx1ZT90W2UubmFtZV09YDwke2UudmFsdWUudmFsdWV9PmA6dFtlLm5hbWVdPWUudmFsdWUudmFsdWU6ImRlc2NyaXB0aW9uImluIGUudmFsdWUmJiJmdW5jdGlvbiIhPT1lLnZhbHVlLnR5cGU/dFtlLm5hbWVdPWA8JHtlLnZhbHVlLmRlc2NyaXB0aW9ufT5gOiJ1bmRlZmluZWQiPT09ZS52YWx1ZS50eXBlJiYodFtlLm5hbWVdPSI8dW5kZWZpbmVkPiIpKX1hc3luYyBmdW5jdGlvbiBsKGUsdCl7Y29uc3Qgbj1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pLGk9e307Zm9yKGNvbnN0IHQgb2Ygbi5yZXN1bHQpaWYodC52YWx1ZT8ub2JqZWN0SWQmJiJBcnJheSI9PT10LnZhbHVlLmNsYXNzTmFtZSl7Y29uc3Qgbj10LnZhbHVlLm9iamVjdElkO2F3YWl0IGMoZSxuLHQubmFtZSxpKX1lbHNlIGlmKHQudmFsdWU/Lm9iamVjdElkJiYiT2JqZWN0Ij09PXQudmFsdWUuY2xhc3NOYW1lKXtjb25zdCBuPXQudmFsdWUub2JqZWN0SWQ7YXdhaXQgcihlLG4sdC5uYW1lLGkpfWVsc2UgdC52YWx1ZSYmdSh0LGkpO3JldHVybiBpfWxldCBmOyhhc3luYyBmdW5jdGlvbigpe2NvbnN0IHQ9bmV3IGU7dC5jb25uZWN0VG9NYWluVGhyZWFkKCkscygiQ29ubmVjdGVkIHRvIG1haW4gdGhyZWFkIik7bGV0IG49ITE7dC5vbigiRGVidWdnZXIucmVzdW1lZCIsKCk9PntuPSExfSksdC5vbigiRGVidWdnZXIucGF1c2VkIixlPT57bj0hMCxhc3luYyBmdW5jdGlvbihlLHtyZWFzb246dCxkYXRhOntvYmplY3RJZDpufSxjYWxsRnJhbWVzOml9KXtpZigiZXhjZXB0aW9uIiE9PXQmJiJwcm9taXNlUmVqZWN0aW9uIiE9PXQpcmV0dXJuO2lmKGY/LigpLG51bGw9PW4pcmV0dXJuO2NvbnN0IGE9W107Zm9yKGxldCB0PTA7dDxpLmxlbmd0aDt0Kyspe2NvbnN0e3Njb3BlQ2hhaW46bixmdW5jdGlvbk5hbWU6byx0aGlzOnN9PWlbdF0sYz1uLmZpbmQoZT0+ImxvY2FsIj09PWUudHlwZSkscj0iZ2xvYmFsIiE9PXMuY2xhc3NOYW1lJiZzLmNsYXNzTmFtZT9gJHtzLmNsYXNzTmFtZX0uJHtvfWA6bztpZih2b2lkIDA9PT1jPy5vYmplY3Qub2JqZWN0SWQpYVt0XT17ZnVuY3Rpb246cn07ZWxzZXtjb25zdCBuPWF3YWl0IGwoZSxjLm9iamVjdC5vYmplY3RJZCk7YVt0XT17ZnVuY3Rpb246cix2YXJzOm59fX1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuY2FsbEZ1bmN0aW9uT24iLHtmdW5jdGlvbkRlY2xhcmF0aW9uOmBmdW5jdGlvbigpIHsgdGhpcy4ke299ID0gdGhpcy4ke299IHx8ICR7SlNPTi5zdHJpbmdpZnkoYSl9OyB9YCxzaWxlbnQ6ITAsb2JqZWN0SWQ6bn0pLGF3YWl0IGUucG9zdCgiUnVudGltZS5yZWxlYXNlT2JqZWN0Iix7b2JqZWN0SWQ6bn0pfSh0LGUucGFyYW1zKS50aGVuKGFzeW5jKCk9PntuJiZhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpfSxhc3luYyBlPT57biYmYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5yZXN1bWUiKX0pfSksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5lbmFibGUiKTtjb25zdCBpPSExIT09YS5jYXB0dXJlQWxsRXhjZXB0aW9ucztpZihhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6aT8iYWxsIjoidW5jYXVnaHQifSksaSl7Y29uc3QgZT1hLm1heEV4Y2VwdGlvbnNQZXJTZWNvbmR8fDUwO2Y9ZnVuY3Rpb24oZSx0LG4pe2xldCBpPTAsbz01LGE9MDtyZXR1cm4gc2V0SW50ZXJ2YWwoKCk9PnswPT09YT9pPmUmJihvKj0yLG4obyksbz44NjQwMCYmKG89ODY0MDApLGE9byk6KGEtPTEsMD09PWEmJnQoKSksaT0wfSwxZTMpLnVucmVmKCksKCk9PntpKz0xfX0oZSxhc3luYygpPT57cygiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9LGFzeW5jIGU9PntzKGBSYXRlLWxpbWl0IGV4Y2VlZGVkLiBEaXNhYmxpbmcgY2FwdHVyaW5nIG9mIGNhdWdodCBleGNlcHRpb25zIGZvciAke2V9IHNlY29uZHMuYCksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJ1bmNhdWdodCJ9KX0pfX0pKCkuY2F0Y2goZT0+e3MoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSxzZXRJbnRlcnZhbCgoKT0+e30sMWU0KTs=";function _s(...e){p.log("[LocalVariables]",...e)}var Ss=((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,f=i[c],l=a[u];if(!l||!f)break;f.vars===void 0||l.in_app===!1&&e.includeOutOfAppFrames!==!0||!Wt(l.function,f.function)||(l.vars=f.vars)}}function n(s,i){if(i.originalException&&typeof i.originalException=="object"&&nt in i.originalException&&Array.isArray(i.originalException[nt])){for(let a of s.exception?.values||[])t(a,i.originalException[nt]);i.originalException[nt]=void 0}return s}async function r(){let s=await import("node:inspector");s.url()||s.open(0)}function o(s){let i=new hs.Worker(new URL(`data:application/javascript;base64,${nu}`),{workerData:s,execArgv:[],env:{...process.env,NODE_OPTIONS:void 0}});process.on("exit",()=>{i.terminate()}),i.once("error",a=>{_s("Worker error",a)}),i.once("exit",a=>{_s("Worker exit",a)}),i.unref()}return{name:"LocalVariablesAsync",async setup(s){if(!s.getOptions().includeLocalVariables)return;if(await Ht()){p.warn("Local variables capture has been disabled because the debugger was already enabled");return}let a={...e,debug:p.isEnabled()};r().then(()=>{try{o(a)}catch(c){p.error("Failed to start worker",c)}},c=>{p.error("Failed to start inspector",c)})},processEvent(s,i){return n(s,i)}}});function Es(e){if(e!==void 0)return e.slice(-10).reduce((t,n)=>`${t},${n.function},${n.lineno},${n.colno}`,"")}function ru(e,t){if(t!==void 0)return Es(e(t,1))}function Is(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 Vn=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}=Is(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)}},ou="LocalVariables",su=((e={},t)=>{let n=new ne(20),r,o=!1;function s(u){let f=Es(u.stacktrace?.frames);if(f===void 0)return;let l=n.remove(f);if(l===void 0)return;let d=(u.stacktrace?.frames||[]).filter(m=>m.function!=="new Promise");for(let m=0;m<d.length;m++){let h=d.length-m-1,S=l[m],E=d[h];if(!E||!S)break;S.vars===void 0||E.in_app===!1&&e.includeOutOfAppFrames!==!0||!Wt(E.function,S.function)||(E.vars=S.vars)}}function i(u){for(let f of u.exception?.values||[])s(f);return u}let a;async function c(){let f=I()?.getOptions();if(!f?.includeLocalVariables)return;if(ds<18){p.log("The `LocalVariables` integration is only supported on Node >= v18.");return}if(await Ht()){p.warn("Local variables capture has been disabled because the debugger was already enabled");return}try{let d=await Vn.create(t),m=(S,{params:{reason:E,data:x,callFrames:C}},W)=>{if(E!=="exception"&&E!=="promiseRejection"){W();return}r?.();let ue=ru(S,x.description);if(ue==null){W();return}let{add:pe,next:re}=Is(L=>{n.set(ue,L),W()});for(let L=0;L<Math.min(C.length,5);L++){let{scopeChain:Bs,functionName:qn,this:$t}=C[L],er=Bs.find(le=>le.type==="local"),tr=$t.className==="global"||!$t.className?qn:`${$t.className}.${qn}`;if(er?.object.objectId===void 0)pe(le=>{le[L]={function:tr},re(le)});else{let le=er.object.objectId;pe(nr=>d.getLocalVariables(le,Gs=>{nr[L]={function:tr,vars:Gs},re(nr)}))}}re([])},h=e.captureAllExceptions!==!1;if(d.configureAndConnect((S,E)=>m(f.stackParser,S,E),h),h){let S=e.maxExceptionsPerSecond||50;r=gs(S,()=>{p.log("Local variables rate-limit lifted."),d.setPauseOnExceptions(!0)},E=>{p.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${E} seconds.`),d.setPauseOnExceptions(!1)})}o=!0}catch(d){p.log("The `LocalVariables` integration failed to start.",d)}}return{name:ou,setupOnce(){a=c()},async processEvent(u){return await a,o?i(u):u},_getCachedFramesCount(){return n.size},_getFirstCachedFrame(){return n.values()[0]}}}),Ts=su;var jn=(e={})=>Bt.major<19?Ts(e):Ss(e);function ys(){try{return typeof module<"u"&&typeof module.exports<"u"}catch{return!1}}var bs=require("worker_threads");var iu=2e3;function rt(e){b(()=>{console.error(e)});let t=I();if(t===void 0){N&&p.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:iu;t.close(r).then(o=>{o||N&&p.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},o=>{N&&p.error(o)})}var au="OnUncaughtException",$n=(e={})=>{let t={exitEvenIfOtherHandlersAreRegistered:!1,...e};return{name:au,setup(n){bs.isMainThread&&global.process.on("uncaughtException",cu(n,t))}}};function cu(e,t){let r=!1,o=!1,s=!1,i,a=e.getOptions();return Object.assign(c=>{let u=rt;t.onFatalError?u=t.onFatalError:a.onFatalError&&(u=a.onFatalError);let l=global.process.listeners("uncaughtException").filter(m=>m.name!=="domainUncaughtExceptionClear"&&m.tag!=="sentry_tracingErrorCallback"&&m._errorHandler!==!0).length===0,d=t.exitEvenIfOtherHandlersAreRegistered||l;r?d&&(s?(N&&p.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),rt(c)):o||(o=!0,setTimeout(()=>{s||(s=!0,u(i,c))},2e3))):(i=c,r=!0,I()===e&&te(c,{originalException:c,captureContext:{level:"fatal"},mechanism:{handled:!1,type:"auto.node.onuncaughtexception"}}),!s&&d&&(s=!0,u(c)))},{_errorHandler:!0})}var uu="OnUnhandledRejection",pu=[{name:"AI_NoOutputGeneratedError"},{name:"AbortError"}],lu=((e={})=>{let t={mode:e.mode??"warn",ignore:[...pu,...e.ignore??[]]};return{name:uu,setup(n){global.process.on("unhandledRejection",gu(n,t))}}}),Zn=lu;function fu(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 du(e,t){let n=e.name===void 0||j(t.name,e.name,!0),r=e.message===void 0||j(t.message,e.message);return n&&r}function mu(e,t){let n=fu(t);return e.some(r=>du(r,n))}function gu(e,t){return function(r,o){if(I()!==e||mu(t.ignore??[],r))return;let s=t.mode==="strict"?"fatal":"error",i=r&&typeof r=="object"?r._sentry_active_span:void 0;(i?c=>Nt(i,c):c=>c())(()=>{te(r,{originalException:o,captureContext:{extra:{unhandledPromiseRejection:!0},level:s},mechanism:{handled:!1,type:"auto.node.onunhandledrejection"}})}),_u(r,t.mode)}}function _u(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"?b(()=>{console.warn(n),console.error(e&&typeof e=="object"&&"stack"in e?e.stack:e)}):t==="strict"&&(b(()=>{console.warn(n)}),rt(e))}var xs=O(require("node:http"),1);var zn="Spotlight",hu=((e={})=>{let t={sidecarUrl:e.sidecarUrl||"http://localhost:8969/stream"};return{name:zn,setup(n){try{process.env.NODE_ENV&&process.env.NODE_ENV!=="development"&&p.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?")}catch{}Su(n,t)}}}),Ns=hu;function Su(e,t){let n=Eu(t.sidecarUrl);if(!n)return;let r=0;e.on("beforeEnvelope",o=>{if(r>3){p.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests");return}let s=je(o);Ce(()=>{let i=xs.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++,p.warn("[Spotlight] Failed to send envelope to Spotlight Sidecar")}),i.write(s),i.end()})})}function Eu(e){try{return new URL(`${e}`)}catch{p.warn(`[Spotlight] Invalid sidecar URL: ${e}`);return}}var Yt=require("node:path");function Cs(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function Rs(e=process.argv[1]?wn(process.argv[1]):process.cwd(),t=Yt.sep==="\\"){let n=t?Cs(e):e;return r=>{if(!r)return;let o=t?Cs(r):r,{dir:s,base:i,ext:a}=Yt.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 f=s.slice(n.length+1).replace(/\//g,".");return f?`${f}:${c}`:c}return c}}function As(e){if(process.env.SENTRY_RELEASE)return process.env.SENTRY_RELEASE;if(_.SENTRY_RELEASE?.id)return _.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_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 vs=ct(Bn(Rs()));var Tu=O(require("node:http"),1),yu=O(require("node:https"),1),Ms=require("node:stream"),Ps=require("node:zlib");var z=O(require("node:net"),1),Xn=O(require("node:tls"),1);var Jn=O(require("node:http"),1);var G=Symbol("AgentBaseInternalState"),Vt=class extends Jn.Agent{constructor(t){super(t),this[G]={}}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
- `).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 Jn.Agent)return s.addRequest(t,o);this[G].currentSocket=s,super.createSocket(t,n,r)},r)}createConnection(){let t=this[G].currentSocket;if(this[G].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[G].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){this[G]&&(this[G].defaultPort=t)}get protocol(){return this[G].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[G]&&(this[G].protocol=t)}};function jt(...e){p.log("[https-proxy-agent:parse-proxy-response]",...e)}function Os(e){return new Promise((t,n)=>{let r=0,o=[];function s(){let f=e.read();f?u(f):e.once("readable",s)}function i(){e.removeListener("end",a),e.removeListener("error",c),e.removeListener("readable",s)}function a(){i(),jt("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function c(f){i(),jt("onerror %o",f),n(f)}function u(f){o.push(f),r+=f.length;let l=Buffer.concat(o,r),d=l.indexOf(`\r
15
+ Url: ${Ut(e)}`),!0}return!1}function Fa(e,t){return t?.length?Mt(e).some(n=>Ie(n,t)):!1}function ka(e,t){if(!t?.length)return!1;let n=e.transaction;return n?Ie(n,t):!1}function wa(e,t){if(!t?.length)return!1;let n=Ut(e);return n?Ie(n,t):!1}function Ba(e,t){if(!t?.length)return!0;let n=Ut(e);return n?Ie(n,t):!0}function Ga(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 Ut(e){try{let n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?Ga(n):null}catch{return g&&p.error(`Cannot extract url for event ${K(e)}`),null}}function Ha(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function jo(e,t,n,r,o,s){if(!o.exception?.values||!s||!V(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=Fn(e,t,r,s.originalException,n,o.exception.values,i,0))}function Fn(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(V(r[o],Error)){Vo(i,a,r);let u=e(t,r[o]),f=c.length;$o(u,o,f,a),c=Fn(e,t,n,r[o],o,[u,...c],u,f)}return Zo(r)&&r.errors.forEach((u,f)=>{if(V(u,Error)){Vo(i,a,r);let l=e(t,u),d=c.length;$o(l,`errors[${f}]`,d,a),c=Fn(e,t,n,u,o,[l,...c],l,d)}}),c}function Zo(e){return Array.isArray(e.errors)}function Vo(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Zo(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function $o(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}var Wa="cause",Ya=5,Va="LinkedErrors",$a=((e={})=>{let t=e.limit||Ya,n=e.key||Wa;return{name:Va,preprocessEvent(r,o,s){let i=s.getOptions();jo(Dn,i.stackParser,n,t,r,o)}}}),qe=$a;function zo(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 kn=["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 Jo(e){let t={};for(let s of Object.keys(e))t[s.toLowerCase()]=e[s];return kn.map(s=>{let i=t[s.toLowerCase()],a=Array.isArray(i)?i.join(";"):i;return s==="Forwarded"?ja(a):a?.split(",").map(c=>c.trim())}).reduce((s,i)=>i?s.concat(i):s,[]).find(s=>s!==null&&Za(s))||null}function ja(e){if(!e)return null;for(let t of e.split(";"))if(t.startsWith("for="))return t.slice(4);return null}function Za(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 za={cookies:!0,data:!0,headers:!0,query_string:!0,url:!0},Ja="RequestData",Xa=((e={})=>{let t={...za,...e.include};return{name:Ja,processEvent(n,r,o){let{sdkProcessingMetadata:s={}}=n,{normalizedRequest:i,ipAddress:a}=s,c={...t,ip:t.ip??o.getOptions().sendDefaultPii};return i&&Ka(n,i,{ipAddress:a},c),n}}}),et=Xa;function Ka(e,t,n,r){if(e.request={...e.request,...Qa(t,r)},r.ip){let o=t.headers&&Jo(t.headers)||n.ipAddress;o&&(e.user={...e.user,ip_address:o})}}function Qa(e,t){let n={},r={...e.headers};if(t.headers&&(n.headers=r,t.cookies||delete r.cookie,t.ip||kn.forEach(o=>{delete r[o]})),n.method=e.method,t.url&&(n.url=e.url),t.cookies){let o=e.cookies||(r?.cookie?zo(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 Xo(e){let t="console";de(t,e),me(t,qa)}function qa(){"console"in _&&Le.forEach(function(e){e in _.console&&Tr(_.console,e,function(t){return fe[e]=t,function(...n){ge("console",{args:n,level:e}),fe[e]?.apply(_.console,n)}})})}function Ko(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var ec=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function tc(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=ec.exec(t);return n?n.slice(1):[]}function wn(e){let t=tc(e),n=t[0]||"",r=t[1];return!n&&!r?".":(r&&(r=r.slice(0,r.length-1)),n+r)}var nc="Console",tt=(e={})=>{let t=new Set(e.levels||Le);return{name:nc,setup(n){Xo(({args:r,level:o})=>{I()!==n||!t.has(o)||rc(o,r)})}}};function rc(e,t){let n={category:"console",data:{arguments:t,logger:"console"},level:Ko(e),message:Qo(t)};if(e==="assert")if(t[0]===!1){let r=t.slice(1);n.message=r.length>0?`Assertion failed: ${Qo(r)}`:"Assertion failed",n.data.arguments=r}else return;Un(n,{input:t,level:e})}function Qo(e){return"util"in _&&typeof _.util.format=="function"?_.util.format(...e):tn(e," ")}function ts(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 ns(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,f,l;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))}f=void 0}c&&(f=a,l=c),c==="<anonymous>"&&(l=void 0,u=void 0),u===void 0&&(l=l||"?",u=f?`${f}.${l}`:l);let d=cr(i[2]),m=i[5]==="native";!d&&i[5]&&!m&&(d=i[5]);let h=d?oc(d):void 0;return{filename:h??d,module:h&&e?.(h),function:u,lineno:qo(i[3]),colno:qo(i[4]),in_app:ts(d||"",m)}}if(o.match(t))return{filename:o}}}function Bn(e){return[90,ns(e)]}function qo(e){return parseInt(e||"",10)||void 0}function oc(e){try{return decodeURI(e)}catch{return}}var ne=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}};var kt=require("worker_threads");var N=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var Rc=6e4,Ft=class extends Xe{constructor(t){let n=t.includeServerName===!1?void 0:t.serverName||global.process.env.SENTRY_NAME||rs.hostname(),r={...t,platform:"node",runtime:{name:"node",version:global.process.version},serverName:n};Ke(r,"node-light",["node-core"]),p.log(`Initializing Sentry: process: ${process.pid}, thread: ${kt.isMainThread?"main":`worker-${kt.threadId}`}.`),super(r),this.getOptions().enableLogs&&(this._logOnExitFlushListener=()=>{Ae(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(()=>{N&&p.log("Flushing client reports based on interval."),this._flushOutcomes()},t.clientReportFlushInterval??Rc).unref(),process.on("beforeExit",this._clientReportOnExitFlushListener))}};var ss=require("node:child_process"),wt=require("node:fs"),y=O(require("node:os"),1),is=require("node:path"),Gn=require("node:util");var Ac=(0,Gn.promisify)(wt.readFile),vc=(0,Gn.promisify)(wt.readdir),Oc="Context",Lc=((e={})=>{let t,n={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0,...e};async function r(s){t===void 0&&(t=o());let i=Mc(await t);return s.contexts={...s.contexts,app:{...i.app,...s.contexts?.app},os:{...i.os,...s.contexts?.os},device:{...i.device,...s.contexts?.device},culture:{...i.culture,...s.contexts?.culture},cloud_resource:{...i.cloud_resource,...s.contexts?.cloud_resource}},s}async function o(){let s={};if(n.os&&(s.os=await Pc()),n.app&&(s.app=Uc()),n.device&&(s.device=Fc(n.device)),n.culture){let i=Dc();i&&(s.culture=i)}return n.cloudResource&&(s.cloud_resource=Wc()),s}return{name:Oc,processEvent(s){return r(s)}}}),Hn=Lc;function Mc(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}async function Pc(){let e=y.platform();switch(e){case"darwin":return Gc();case"linux":return Hc();default:return{name:kc[e]||e,version:y.release()}}}function Dc(){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 Uc(){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 Fc(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 kc={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows",ohos:"OpenHarmony",android:"Android"},wc=[{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"]}],Bc={alpine:e=>e,arch:e=>B(/distrib_release=(.*)/,e),centos:e=>B(/release ([^ ]+)/,e),debian:e=>e,fedora:e=>B(/release (..)/,e),mint:e=>B(/distrib_release=(.*)/,e),red:e=>B(/release ([^ ]+)/,e),suse:e=>B(/VERSION = (.*)\n/,e),ubuntu:e=>B(/distrib_release=(.*)/,e)};function B(e,t){let n=e.exec(t);return n?n[1]:void 0}async function Gc(){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,ss.execFile)("/usr/bin/sw_vers",(o,s)=>{if(o){r(o);return}n(s)})});e.name=B(/^ProductName:\s+(.*)$/m,t),e.version=B(/^ProductVersion:\s+(.*)$/m,t),e.build=B(/^BuildVersion:\s+(.*)$/m,t)}catch{}return e}function os(e){return e.split(" ")[0].toLowerCase()}async function Hc(){let e={kernel_version:y.release(),name:"Linux"};try{let t=await vc("/etc"),n=wc.find(a=>t.includes(a.name));if(!n)return e;let r=(0,is.join)("/etc",n.name),o=(await Ac(r,{encoding:"utf-8"})).toLowerCase(),{distros:s}=n;e.name=s.find(a=>o.indexOf(os(a))>=0)||s[0];let i=os(e.name);e.version=Bc[i]?.(o)}catch{}return e}function Wc(){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 us=require("node:fs"),ps=require("node:readline");var Wn=new ne(10),ls=new ne(20),Yc=7,Vc="ContextLines",$c=1e3,jc=1e4;function Zc(e,t,n){let r=e.get(t);return r===void 0?(e.set(t,n),n):r}function zc(e){return!!(e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:"))}function Jc(e){return e.lineno!==void 0&&e.lineno>jc||e.colno!==void 0&&e.colno>$c}function Xc(e,t){let n=Wn.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 Kc(e,t){if(!e.length)return[];let n=0,r=e[0];if(typeof r!="number")return[];let o=cs(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=cs(i,t)),n++}return s}function Qc(e,t,n){return new Promise((r,o)=>{let s=(0,us.createReadStream)(e),i=(0,ps.createInterface)({input:s});function a(){s.destroy(),r()}let c=0,u=0,f=t[u];if(f===void 0){a();return}let l=f[0],d=f[1];function m(h){ls.set(e,1),N&&p.error(`Failed to read file: ${e}. Error: ${h}`),i.close(),i.removeAllListeners(),a()}s.on("error",m),i.on("error",m),i.on("close",a),i.on("line",h=>{if(c++,!(c<l)&&(n[c]=en(h,0),c>=d)){if(u===t.length-1){i.close(),i.removeAllListeners();return}u++;let S=t[u];if(S===void 0){i.close(),i.removeAllListeners();return}l=S[0],d=S[1]}})})}async function qc(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"||zc(c)||Jc(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(ls.get(s))continue;let i=n[s];if(!i)continue;i.sort((u,f)=>u-f);let a=Kc(i,t);if(a.every(u=>Xc(s,u)))continue;let c=Zc(Wn,s,{});o.push(Qc(s,a,c))}if(await Promise.all(o).catch(()=>{N&&p.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&&eu(s.stacktrace.frames,t,Wn);return e}function eu(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;tu(r.lineno,r,t,o)}}function as(e){delete e.pre_context,delete e.context_line,delete e.post_context}function tu(e,t,n,r){if(t.lineno===void 0||r===void 0){N&&p.error("Cannot resolve context for frame with no lineno or file contents");return}t.pre_context=[];for(let s=fs(e,n);s<e;s++){let i=r[s];if(i===void 0){as(t),N&&p.error(`Could not find line ${s} in file ${t.filename}`);return}t.pre_context.push(i)}if(r[e]===void 0){as(t),N&&p.error(`Could not find line ${e} in file ${t.filename}`);return}t.context_line=r[e];let o=ds(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 fs(e,t){return Math.max(1,e-t)}function ds(e,t){return e+t}function cs(e,t){return[fs(e,t),ds(e,t)]}var nu=((e={})=>{let t=e.frameContextLines!==void 0?e.frameContextLines:Yc;return{name:Vc,processEvent(n){return qc(n,t)}}}),Yn=nu;var Bt=sn(process.versions.node),ms=Bt.major,g_=Bt.minor;var Ss=require("node:worker_threads");var Gt;async function Ht(){if(Gt===void 0)try{Gt=!!(await import("node:inspector")).url()}catch{Gt=!1}return Gt}var nt="__SENTRY_ERROR_LOCAL_VARIABLES__";function _s(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 gs(e){return e!==void 0&&(e.length===0||e==="?"||e==="<anonymous>")}function Wt(e,t){return e===t||`Object.${e}`===t||e===`Object.${t}`||gs(e)&&gs(t)}var ru="LyohIEBzZW50cnkvbm9kZS1jb3JlIDEwLjQwLjAgKDY2M2ZkNWUpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPWdsb2JhbFRoaXMsaT17fTtjb25zdCBvPSJfX1NFTlRSWV9FUlJPUl9MT0NBTF9WQVJJQUJMRVNfXyI7Y29uc3QgYT10O2Z1bmN0aW9uIHMoLi4uZSl7YS5kZWJ1ZyYmZnVuY3Rpb24oZSl7aWYoISgiY29uc29sZSJpbiBuKSlyZXR1cm4gZSgpO2NvbnN0IHQ9bi5jb25zb2xlLG89e30sYT1PYmplY3Qua2V5cyhpKTthLmZvckVhY2goZT0+e2NvbnN0IG49aVtlXTtvW2VdPXRbZV0sdFtlXT1ufSk7dHJ5e3JldHVybiBlKCl9ZmluYWxseXthLmZvckVhY2goZT0+e3RbZV09b1tlXX0pfX0oKCk9PmNvbnNvbGUubG9nKCJbTG9jYWxWYXJpYWJsZXMgV29ya2VyXSIsLi4uZSkpfWFzeW5jIGZ1bmN0aW9uIGMoZSx0LG4saSl7Y29uc3Qgbz1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pO2lbbl09by5yZXN1bHQuZmlsdGVyKGU9PiJsZW5ndGgiIT09ZS5uYW1lJiYhaXNOYU4ocGFyc2VJbnQoZS5uYW1lLDEwKSkpLnNvcnQoKGUsdCk9PnBhcnNlSW50KGUubmFtZSwxMCktcGFyc2VJbnQodC5uYW1lLDEwKSkubWFwKGU9PmUudmFsdWU/LnZhbHVlKX1hc3luYyBmdW5jdGlvbiByKGUsdCxuLGkpe2NvbnN0IG89YXdhaXQgZS5wb3N0KCJSdW50aW1lLmdldFByb3BlcnRpZXMiLHtvYmplY3RJZDp0LG93blByb3BlcnRpZXM6ITB9KTtpW25dPW8ucmVzdWx0Lm1hcChlPT5bZS5uYW1lLGUudmFsdWU/LnZhbHVlXSkucmVkdWNlKChlLFt0LG5dKT0+KGVbdF09bixlKSx7fSl9ZnVuY3Rpb24gdShlLHQpe2UudmFsdWUmJigidmFsdWUiaW4gZS52YWx1ZT92b2lkIDA9PT1lLnZhbHVlLnZhbHVlfHxudWxsPT09ZS52YWx1ZS52YWx1ZT90W2UubmFtZV09YDwke2UudmFsdWUudmFsdWV9PmA6dFtlLm5hbWVdPWUudmFsdWUudmFsdWU6ImRlc2NyaXB0aW9uImluIGUudmFsdWUmJiJmdW5jdGlvbiIhPT1lLnZhbHVlLnR5cGU/dFtlLm5hbWVdPWA8JHtlLnZhbHVlLmRlc2NyaXB0aW9ufT5gOiJ1bmRlZmluZWQiPT09ZS52YWx1ZS50eXBlJiYodFtlLm5hbWVdPSI8dW5kZWZpbmVkPiIpKX1hc3luYyBmdW5jdGlvbiBsKGUsdCl7Y29uc3Qgbj1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pLGk9e307Zm9yKGNvbnN0IHQgb2Ygbi5yZXN1bHQpaWYodC52YWx1ZT8ub2JqZWN0SWQmJiJBcnJheSI9PT10LnZhbHVlLmNsYXNzTmFtZSl7Y29uc3Qgbj10LnZhbHVlLm9iamVjdElkO2F3YWl0IGMoZSxuLHQubmFtZSxpKX1lbHNlIGlmKHQudmFsdWU/Lm9iamVjdElkJiYiT2JqZWN0Ij09PXQudmFsdWUuY2xhc3NOYW1lKXtjb25zdCBuPXQudmFsdWUub2JqZWN0SWQ7YXdhaXQgcihlLG4sdC5uYW1lLGkpfWVsc2UgdC52YWx1ZSYmdSh0LGkpO3JldHVybiBpfWxldCBmOyhhc3luYyBmdW5jdGlvbigpe2NvbnN0IHQ9bmV3IGU7dC5jb25uZWN0VG9NYWluVGhyZWFkKCkscygiQ29ubmVjdGVkIHRvIG1haW4gdGhyZWFkIik7bGV0IG49ITE7dC5vbigiRGVidWdnZXIucmVzdW1lZCIsKCk9PntuPSExfSksdC5vbigiRGVidWdnZXIucGF1c2VkIixlPT57bj0hMCxhc3luYyBmdW5jdGlvbihlLHtyZWFzb246dCxkYXRhOntvYmplY3RJZDpufSxjYWxsRnJhbWVzOml9KXtpZigiZXhjZXB0aW9uIiE9PXQmJiJwcm9taXNlUmVqZWN0aW9uIiE9PXQpcmV0dXJuO2lmKGY/LigpLG51bGw9PW4pcmV0dXJuO2NvbnN0IGE9W107Zm9yKGxldCB0PTA7dDxpLmxlbmd0aDt0Kyspe2NvbnN0e3Njb3BlQ2hhaW46bixmdW5jdGlvbk5hbWU6byx0aGlzOnN9PWlbdF0sYz1uLmZpbmQoZT0+ImxvY2FsIj09PWUudHlwZSkscj0iZ2xvYmFsIiE9PXMuY2xhc3NOYW1lJiZzLmNsYXNzTmFtZT9gJHtzLmNsYXNzTmFtZX0uJHtvfWA6bztpZih2b2lkIDA9PT1jPy5vYmplY3Qub2JqZWN0SWQpYVt0XT17ZnVuY3Rpb246cn07ZWxzZXtjb25zdCBuPWF3YWl0IGwoZSxjLm9iamVjdC5vYmplY3RJZCk7YVt0XT17ZnVuY3Rpb246cix2YXJzOm59fX1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuY2FsbEZ1bmN0aW9uT24iLHtmdW5jdGlvbkRlY2xhcmF0aW9uOmBmdW5jdGlvbigpIHsgdGhpcy4ke299ID0gdGhpcy4ke299IHx8ICR7SlNPTi5zdHJpbmdpZnkoYSl9OyB9YCxzaWxlbnQ6ITAsb2JqZWN0SWQ6bn0pLGF3YWl0IGUucG9zdCgiUnVudGltZS5yZWxlYXNlT2JqZWN0Iix7b2JqZWN0SWQ6bn0pfSh0LGUucGFyYW1zKS50aGVuKGFzeW5jKCk9PntuJiZhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpfSxhc3luYyBlPT57biYmYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5yZXN1bWUiKX0pfSksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5lbmFibGUiKTtjb25zdCBpPSExIT09YS5jYXB0dXJlQWxsRXhjZXB0aW9ucztpZihhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6aT8iYWxsIjoidW5jYXVnaHQifSksaSl7Y29uc3QgZT1hLm1heEV4Y2VwdGlvbnNQZXJTZWNvbmR8fDUwO2Y9ZnVuY3Rpb24oZSx0LG4pe2xldCBpPTAsbz01LGE9MDtyZXR1cm4gc2V0SW50ZXJ2YWwoKCk9PnswPT09YT9pPmUmJihvKj0yLG4obyksbz44NjQwMCYmKG89ODY0MDApLGE9byk6KGEtPTEsMD09PWEmJnQoKSksaT0wfSwxZTMpLnVucmVmKCksKCk9PntpKz0xfX0oZSxhc3luYygpPT57cygiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9LGFzeW5jIGU9PntzKGBSYXRlLWxpbWl0IGV4Y2VlZGVkLiBEaXNhYmxpbmcgY2FwdHVyaW5nIG9mIGNhdWdodCBleGNlcHRpb25zIGZvciAke2V9IHNlY29uZHMuYCksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJ1bmNhdWdodCJ9KX0pfX0pKCkuY2F0Y2goZT0+e3MoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSxzZXRJbnRlcnZhbCgoKT0+e30sMWU0KTs=";function hs(...e){p.log("[LocalVariables]",...e)}var Es=((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,f=i[c],l=a[u];if(!l||!f)break;f.vars===void 0||l.in_app===!1&&e.includeOutOfAppFrames!==!0||!Wt(l.function,f.function)||(l.vars=f.vars)}}function n(s,i){if(i.originalException&&typeof i.originalException=="object"&&nt in i.originalException&&Array.isArray(i.originalException[nt])){for(let a of s.exception?.values||[])t(a,i.originalException[nt]);i.originalException[nt]=void 0}return s}async function r(){let s=await import("node:inspector");s.url()||s.open(0)}function o(s){let i=new Ss.Worker(new URL(`data:application/javascript;base64,${ru}`),{workerData:s,execArgv:[],env:{...process.env,NODE_OPTIONS:void 0}});process.on("exit",()=>{i.terminate()}),i.once("error",a=>{hs("Worker error",a)}),i.once("exit",a=>{hs("Worker exit",a)}),i.unref()}return{name:"LocalVariablesAsync",async setup(s){if(!s.getOptions().includeLocalVariables)return;if(await Ht()){p.warn("Local variables capture has been disabled because the debugger was already enabled");return}let a={...e,debug:p.isEnabled()};r().then(()=>{try{o(a)}catch(c){p.error("Failed to start worker",c)}},c=>{p.error("Failed to start inspector",c)})},processEvent(s,i){return n(s,i)}}});function Is(e){if(e!==void 0)return e.slice(-10).reduce((t,n)=>`${t},${n.function},${n.lineno},${n.colno}`,"")}function ou(e,t){if(t!==void 0)return Is(e(t,1))}function Ts(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 Vn=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}=Ts(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)}},su="LocalVariables",iu=((e={},t)=>{let n=new ne(20),r,o=!1;function s(u){let f=Is(u.stacktrace?.frames);if(f===void 0)return;let l=n.remove(f);if(l===void 0)return;let d=(u.stacktrace?.frames||[]).filter(m=>m.function!=="new Promise");for(let m=0;m<d.length;m++){let h=d.length-m-1,S=l[m],E=d[h];if(!E||!S)break;S.vars===void 0||E.in_app===!1&&e.includeOutOfAppFrames!==!0||!Wt(E.function,S.function)||(E.vars=S.vars)}}function i(u){for(let f of u.exception?.values||[])s(f);return u}let a;async function c(){let f=I()?.getOptions();if(!f?.includeLocalVariables)return;if(ms<18){p.log("The `LocalVariables` integration is only supported on Node >= v18.");return}if(await Ht()){p.warn("Local variables capture has been disabled because the debugger was already enabled");return}try{let d=await Vn.create(t),m=(S,{params:{reason:E,data:x,callFrames:C}},W)=>{if(E!=="exception"&&E!=="promiseRejection"){W();return}r?.();let ue=ou(S,x.description);if(ue==null){W();return}let{add:pe,next:re}=Ts(L=>{n.set(ue,L),W()});for(let L=0;L<Math.min(C.length,5);L++){let{scopeChain:Gs,functionName:qn,this:jt}=C[L],er=Gs.find(le=>le.type==="local"),tr=jt.className==="global"||!jt.className?qn:`${jt.className}.${qn}`;if(er?.object.objectId===void 0)pe(le=>{le[L]={function:tr},re(le)});else{let le=er.object.objectId;pe(nr=>d.getLocalVariables(le,Hs=>{nr[L]={function:tr,vars:Hs},re(nr)}))}}re([])},h=e.captureAllExceptions!==!1;if(d.configureAndConnect((S,E)=>m(f.stackParser,S,E),h),h){let S=e.maxExceptionsPerSecond||50;r=_s(S,()=>{p.log("Local variables rate-limit lifted."),d.setPauseOnExceptions(!0)},E=>{p.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${E} seconds.`),d.setPauseOnExceptions(!1)})}o=!0}catch(d){p.log("The `LocalVariables` integration failed to start.",d)}}return{name:su,setupOnce(){a=c()},async processEvent(u){return await a,o?i(u):u},_getCachedFramesCount(){return n.size},_getFirstCachedFrame(){return n.values()[0]}}}),ys=iu;var $n=(e={})=>Bt.major<19?ys(e):Es(e);function bs(){try{return typeof module<"u"&&typeof module.exports<"u"}catch{return!1}}var xs=require("worker_threads");var au=2e3;function rt(e){b(()=>{console.error(e)});let t=I();if(t===void 0){N&&p.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:au;t.close(r).then(o=>{o||N&&p.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},o=>{N&&p.error(o)})}var cu="OnUncaughtException",jn=(e={})=>{let t={exitEvenIfOtherHandlersAreRegistered:!1,...e};return{name:cu,setup(n){xs.isMainThread&&global.process.on("uncaughtException",uu(n,t))}}};function uu(e,t){let r=!1,o=!1,s=!1,i,a=e.getOptions();return Object.assign(c=>{let u=rt;t.onFatalError?u=t.onFatalError:a.onFatalError&&(u=a.onFatalError);let l=global.process.listeners("uncaughtException").filter(m=>m.name!=="domainUncaughtExceptionClear"&&m.tag!=="sentry_tracingErrorCallback"&&m._errorHandler!==!0).length===0,d=t.exitEvenIfOtherHandlersAreRegistered||l;r?d&&(s?(N&&p.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),rt(c)):o||(o=!0,setTimeout(()=>{s||(s=!0,u(i,c))},2e3))):(i=c,r=!0,I()===e&&te(c,{originalException:c,captureContext:{level:"fatal"},mechanism:{handled:!1,type:"auto.node.onuncaughtexception"}}),!s&&d&&(s=!0,u(c)))},{_errorHandler:!0})}var pu="OnUnhandledRejection",lu=[{name:"AI_NoOutputGeneratedError"},{name:"AbortError"}],fu=((e={})=>{let t={mode:e.mode??"warn",ignore:[...lu,...e.ignore??[]]};return{name:pu,setup(n){global.process.on("unhandledRejection",_u(n,t))}}}),Zn=fu;function du(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 mu(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 gu(e,t){let n=du(t);return e.some(r=>mu(r,n))}function _u(e,t){return function(r,o){if(I()!==e||gu(t.ignore??[],r))return;let s=t.mode==="strict"?"fatal":"error",i=r&&typeof r=="object"?r._sentry_active_span:void 0;(i?c=>Nt(i,c):c=>c())(()=>{te(r,{originalException:o,captureContext:{extra:{unhandledPromiseRejection:!0},level:s},mechanism:{handled:!1,type:"auto.node.onunhandledrejection"}})}),hu(r,t.mode)}}function hu(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"?b(()=>{console.warn(n),console.error(e&&typeof e=="object"&&"stack"in e?e.stack:e)}):t==="strict"&&(b(()=>{console.warn(n)}),rt(e))}var Ns=O(require("node:http"),1);var zn="Spotlight",Su=((e={})=>{let t={sidecarUrl:e.sidecarUrl||"http://localhost:8969/stream"};return{name:zn,setup(n){try{process.env.NODE_ENV&&process.env.NODE_ENV!=="development"&&p.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?")}catch{}Eu(n,t)}}}),Cs=Su;function Eu(e,t){let n=Iu(t.sidecarUrl);if(!n)return;let r=0;e.on("beforeEnvelope",o=>{if(r>3){p.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests");return}let s=je(o);Ce(()=>{let i=Ns.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++,p.warn("[Spotlight] Failed to send envelope to Spotlight Sidecar")}),i.write(s),i.end()})})}function Iu(e){try{return new URL(`${e}`)}catch{p.warn(`[Spotlight] Invalid sidecar URL: ${e}`);return}}var Yt=require("node:path");function Rs(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function As(e=process.argv[1]?wn(process.argv[1]):process.cwd(),t=Yt.sep==="\\"){let n=t?Rs(e):e;return r=>{if(!r)return;let o=t?Rs(r):r,{dir:s,base:i,ext:a}=Yt.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 f=s.slice(n.length+1).replace(/\//g,".");return f?`${f}:${c}`:c}return c}}function vs(e){if(process.env.SENTRY_RELEASE)return process.env.SENTRY_RELEASE;if(_.SENTRY_RELEASE?.id)return _.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_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 Os=ct(Bn(As()));var yu=O(require("node:http"),1),bu=O(require("node:https"),1),Ps=require("node:stream"),Ds=require("node:zlib");var z=O(require("node:net"),1),Xn=O(require("node:tls"),1);var Jn=O(require("node:http"),1);var G=Symbol("AgentBaseInternalState"),Vt=class extends Jn.Agent{constructor(t){super(t),this[G]={}}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
+ `).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 Jn.Agent)return s.addRequest(t,o);this[G].currentSocket=s,super.createSocket(t,n,r)},r)}createConnection(){let t=this[G].currentSocket;if(this[G].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[G].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){this[G]&&(this[G].defaultPort=t)}get protocol(){return this[G].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[G]&&(this[G].protocol=t)}};function $t(...e){p.log("[https-proxy-agent:parse-proxy-response]",...e)}function Ls(e){return new Promise((t,n)=>{let r=0,o=[];function s(){let f=e.read();f?u(f):e.once("readable",s)}function i(){e.removeListener("end",a),e.removeListener("error",c),e.removeListener("readable",s)}function a(){i(),$t("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function c(f){i(),$t("onerror %o",f),n(f)}function u(f){o.push(f),r+=f.length;let l=Buffer.concat(o,r),d=l.indexOf(`\r
17
17
  \r
18
- `);if(d===-1){jt("have not received end of HTTP headers yet..."),s();return}let m=l.subarray(0,d).toString("ascii").split(`\r
19
- `),h=m.shift();if(!h)return e.destroy(),n(new Error("No header received from proxy CONNECT response"));let S=h.split(" "),E=+(S[1]||0),x=S.slice(2).join(" "),C={};for(let W of m){if(!W)continue;let ue=W.indexOf(":");if(ue===-1)return e.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${W}"`));let pe=W.slice(0,ue).toLowerCase(),re=W.slice(ue+1).trimStart(),L=C[pe];typeof L=="string"?C[pe]=[L,re]:Array.isArray(L)?L.push(re):C[pe]=re}jt("got proxy server response: %o %o",h,C),i(),t({connect:{statusCode:E,statusText:x,headers:C},buffered:l})}e.on("error",c),e.on("end",a),s()})}function ot(...e){p.log("[https-proxy-agent]",...e)}var st=class extends Vt{static __initStatic(){this.protocols=["http","https"]}constructor(t,n){super(n),this.options={},this.proxy=typeof t=="string"?new URL(t):t,this.proxyHeaders=n?.headers??{},ot("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?Ls(n,"headers"):null,host:r,port:o}}async connect(t,n){let{proxy:r}=this;if(!n.host)throw new TypeError('No "host" provided');let o;if(r.protocol==="https:"){ot("Creating `tls.Socket`: %o",this.connectOpts);let d=this.connectOpts.servername||this.connectOpts.host;o=Xn.connect({...this.connectOpts,servername:d&&z.isIP(d)?void 0:d})}else ot("Creating `net.Socket`: %o",this.connectOpts),o=z.connect(this.connectOpts);let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},i=z.isIPv6(n.host)?`[${n.host}]`:n.host,a=`CONNECT ${i}:${n.port} HTTP/1.1\r
18
+ `);if(d===-1){$t("have not received end of HTTP headers yet..."),s();return}let m=l.subarray(0,d).toString("ascii").split(`\r
19
+ `),h=m.shift();if(!h)return e.destroy(),n(new Error("No header received from proxy CONNECT response"));let S=h.split(" "),E=+(S[1]||0),x=S.slice(2).join(" "),C={};for(let W of m){if(!W)continue;let ue=W.indexOf(":");if(ue===-1)return e.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${W}"`));let pe=W.slice(0,ue).toLowerCase(),re=W.slice(ue+1).trimStart(),L=C[pe];typeof L=="string"?C[pe]=[L,re]:Array.isArray(L)?L.push(re):C[pe]=re}$t("got proxy server response: %o %o",h,C),i(),t({connect:{statusCode:E,statusText:x,headers:C},buffered:l})}e.on("error",c),e.on("end",a),s()})}function ot(...e){p.log("[https-proxy-agent]",...e)}var st=class extends Vt{static __initStatic(){this.protocols=["http","https"]}constructor(t,n){super(n),this.options={},this.proxy=typeof t=="string"?new URL(t):t,this.proxyHeaders=n?.headers??{},ot("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?Ms(n,"headers"):null,host:r,port:o}}async connect(t,n){let{proxy:r}=this;if(!n.host)throw new TypeError('No "host" provided');let o;if(r.protocol==="https:"){ot("Creating `tls.Socket`: %o",this.connectOpts);let d=this.connectOpts.servername||this.connectOpts.host;o=Xn.connect({...this.connectOpts,servername:d&&z.isIP(d)?void 0:d})}else ot("Creating `net.Socket`: %o",this.connectOpts),o=z.connect(this.connectOpts);let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},i=z.isIPv6(n.host)?`[${n.host}]`:n.host,a=`CONNECT ${i}:${n.port} HTTP/1.1\r
20
20
  `;if(r.username||r.password){let d=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}s.Host=`${i}:${n.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(s))a+=`${d}: ${s[d]}\r
21
- `;let c=Os(o);o.write(`${a}\r
22
- `);let{connect:u,buffered:f}=await c;if(t.emit("proxyConnect",u),this.emit("proxyConnect",u,t),u.statusCode===200){if(t.once("socket",Iu),n.secureEndpoint){ot("Upgrading socket connection to TLS");let d=n.servername||n.host;return Xn.connect({...Ls(n,"host","path","port"),socket:o,servername:z.isIP(d)?void 0:d})}return o}o.destroy();let l=new z.Socket({writable:!1});return l.readable=!0,t.once("socket",d=>{ot("Replaying proxy buffer for failed request"),d.push(f),d.push(null)}),l}};st.__initStatic();function Iu(e){e.resume()}function Ls(e,...t){let n={},r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}var bu=1024*32;function xu(e){return new Ms.Readable({read(){this.push(e),this.push(null)}})}function Ds(e){let t;try{t=new URL(e.url)}catch{return b(()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")}),Je(e,()=>Promise.resolve({}))}let n=t.protocol==="https:",r=Nu(t,e.proxy||(n?process.env.https_proxy:void 0)||process.env.http_proxy),o=n?yu:Tu,s=e.keepAlive===void 0?!1:e.keepAlive,i=r?new st(r):new o.Agent({keepAlive:s,maxSockets:30,timeout:2e3}),a=Cu(e,e.httpModule??o,i);return Je(e,a)}function Nu(e,t){let{no_proxy:n}=process.env;if(!n?.split(",").some(o=>e.host.endsWith(o)||e.hostname.endsWith(o)))return t}function Cu(e,t,n){let{hostname:r,pathname:o,port:s,protocol:i,search:a}=new URL(e.url);return function(u){return new Promise((f,l)=>{Ce(()=>{let d=xu(u.body),m={...e.headers};u.body.length>bu&&(m["content-encoding"]="gzip",d=d.pipe((0,Ps.createGzip)()));let h=r.startsWith("["),S=t.request({method:"POST",agent:n,headers:m,hostname:h?r.slice(1,-1):r,path:`${o}${a}`,port:s,protocol:i,ca:e.caCerts},E=>{E.on("data",()=>{}),E.on("end",()=>{}),E.setEncoding("utf8");let x=E.headers["retry-after"]??null,C=E.headers["x-sentry-rate-limits"]??null;f({statusCode:E.statusCode,headers:{"retry-after":x,"x-sentry-rate-limits":Array.isArray(C)?C[0]||null:C}})});S.on("error",l),d.pipe(S)})})}}function Us(e){if(e===!1)return!1;if(typeof e=="string")return e;let t=ce(process.env.SENTRY_SPOTLIGHT,{strict:!0}),n=t===null&&process.env.SENTRY_SPOTLIGHT?process.env.SENTRY_SPOTLIGHT:void 0;return e===!0?n??!0:t??n}var Fs=require("node:async_hooks");function ks(){let e=new Fs.AsyncLocalStorage;function t(){let a=e.getStore();return a||{scope:Be(),isolationScope:Ge()}}function n(a){let c=t().scope.clone(),u=t().isolationScope;return e.run({scope:c,isolationScope:u},()=>a(c))}function r(a,c){let u=t().isolationScope.clone();return e.run({scope:a,isolationScope:u},()=>c(a))}function o(a){let c=t().scope.clone(),u=t().isolationScope.clone();return e.run({scope:c,isolationScope:u},()=>a(u))}function s(a,c){let u=t().scope.clone();return e.run({scope:u,isolationScope:a},()=>c(a))}function i(a){return n(c=>(c.setSDKProcessingMetadata({__SENTRY_SUPPRESS_TRACING__:!0}),a()))}un({suppressTracing:i,withScope:n,withSetScope:r,withIsolationScope:o,withSetIsolationScope:s,getCurrentScope:()=>t().scope,getIsolationScope:()=>t().isolationScope})}function Kn(e={}){return Ru(e,()=>[])}function Ru(e={},t){let n=Au(e,t);n.debug===!0&&(N?p.enable():b(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ks(),R().update(n.initialScope),n.spotlight&&!n.integrations.some(({name:s})=>s===zn)&&n.integrations.push(Ns({sidecarUrl:typeof n.spotlight=="string"?n.spotlight:void 0})),Ke(n,"node-light",["node-core"]);let o=new Ft(n);return R().setClient(o),o.init(),_._sentryInjectLoaderHookRegister?.(),p.log(`SDK initialized from ${ys()?"CommonJS":"ESM"} (light mode)`),o.startClientReportTracking(),Lu(),process.env.VERCEL&&process.on("SIGTERM",async()=>{await o.flush(200)}),o}function Au(e,t){let n=vu(e.release),r=Us(e.spotlight),o=Ou(e.tracesSampleRate),s={...e,dsn:e.dsn??process.env.SENTRY_DSN,environment:e.environment??process.env.SENTRY_ENVIRONMENT,sendClientReports:e.sendClientReports??!0,transport:e.transport??Ds,stackParser:Xt(e.stackParser||vs),release:n,tracesSampleRate:o,spotlight:r,debug:ce(e.debug??process.env.SENTRY_DEBUG)},i=e.integrations,a=e.defaultIntegrations??t(s);return{...s,integrations:An({defaultIntegrations:a,integrations:i})}}function vu(e){if(e!==void 0)return e;let t=As();if(t!==void 0)return t}function Ou(e){if(e!==void 0)return e;let t=process.env.SENTRY_TRACES_SAMPLE_RATE;if(!t)return;let n=parseFloat(t);return isFinite(n)?n:void 0}function Lu(){if(ce(process.env.SENTRY_USE_ENVIRONMENT)!==!1){let e=process.env.SENTRY_TRACE,t=process.env.SENTRY_BAGGAGE,n=gn(e,t);R().setPropagationContext(n)}}var H=O(require("homey"),1);process.env.HOME||(process.env.HOME=ws.default.tmpdir());var Qn=class e{_capturedMessages=[];_capturedExceptions=[];constructor({homey:t,options:n}){if(typeof t>"u")return e._error("Error: missing `homey` constructor parameter");if(!H.default.env)return e._error("Error: could not access `Homey.env`");if(typeof H.default.env.HOMEY_LOG_URL!="string")return e._error("Error: expected `HOMEY_LOG_URL` env variable, homey-log is disabled");let r=process.env.DEBUG==="1"&&!e._isLogForced();r&&e._log("App is running in debug mode, not enabling Sentry logging");let o;typeof H.default.env.HOMEY_LOG_SENTRY_PROJECT=="string"&&H.default.env.HOMEY_LOG_SENTRY_PROJECT.length>0&&(o=`${H.default.env.HOMEY_LOG_SENTRY_PROJECT}@${H.default.manifest.version}`),this._manifest=H.default.manifest,this._homeyVersion=t.version,this._managerCloud=t.cloud,this._homeyPlatform=t.platform,this._homeyPlatformVersion=t.platformVersion,this.init(H.default.env.HOMEY_LOG_URL,{enabled:!r,release:o,...n})}init(t,n){return Kn({dsn:t,integrations:[Ae(),Qe(),qe(),et(),tt(),$n(),Zn(),Yn(),jn(),Hn({app:!1,cloudResource:!1})],maxBreadcrumbs:5,enableMetrics:!1,...n}),this.setTags({appId:this._manifest.id,appVersion:this._manifest.version,homeyVersion:this._homeyVersion,homeyPlatform:this._homeyPlatform,homeyPlatformVersion:this._homeyPlatformVersion}),this._managerCloud.getHomeyId().then(r=>this.setTags({homeyId:r})).catch(r=>e._error("Error: could not get `homeyId`",r)),e._log(`App ${this._manifest.id} v${this._manifest.version} logging on Homey v${this._homeyVersion}...`),this}setTags(t){return At(t),this}setUser(t){return vt(t),this}async captureMessage(t){if(e._log("captureMessage:",t),this._capturedMessages.indexOf(t)>-1){e._log("Prevented sending a duplicate message");return}return this._capturedMessages.push(t),new Promise((n,r)=>{try{n(Rt(t))}catch(o){r(o)}})}async captureException(t){if(e._log("captureException:",t),this._capturedExceptions.indexOf(t)>-1){e._log("Prevented sending a duplicate log");return}return this._capturedExceptions.push(t),new Promise((n,r)=>{try{n(te(t))}catch(o){r(o)}})}static _log(){console.log.bind(null,e._logTime(),"[homey-log]").apply(null,arguments)}static _error(){console.error.bind(null,e._logTime(),"[homey-log]").apply(null,arguments)}static _logTime(){return`\x1B[35m${new Date().toISOString()}\x1B[0m`}static _isLogForced(){switch(H.default.env.HOMEY_LOG_FORCE){case"1":case"true":return!0;default:return!1}}};0&&(module.exports={Log});
21
+ `;let c=Ls(o);o.write(`${a}\r
22
+ `);let{connect:u,buffered:f}=await c;if(t.emit("proxyConnect",u),this.emit("proxyConnect",u,t),u.statusCode===200){if(t.once("socket",Tu),n.secureEndpoint){ot("Upgrading socket connection to TLS");let d=n.servername||n.host;return Xn.connect({...Ms(n,"host","path","port"),socket:o,servername:z.isIP(d)?void 0:d})}return o}o.destroy();let l=new z.Socket({writable:!1});return l.readable=!0,t.once("socket",d=>{ot("Replaying proxy buffer for failed request"),d.push(f),d.push(null)}),l}};st.__initStatic();function Tu(e){e.resume()}function Ms(e,...t){let n={},r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}var xu=1024*32;function Nu(e){return new Ps.Readable({read(){this.push(e),this.push(null)}})}function Us(e){let t;try{t=new URL(e.url)}catch{return b(()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")}),Je(e,()=>Promise.resolve({}))}let n=t.protocol==="https:",r=Cu(t,e.proxy||(n?process.env.https_proxy:void 0)||process.env.http_proxy),o=n?bu:yu,s=e.keepAlive===void 0?!1:e.keepAlive,i=r?new st(r):new o.Agent({keepAlive:s,maxSockets:30,timeout:2e3}),a=Ru(e,e.httpModule??o,i);return Je(e,a)}function Cu(e,t){let{no_proxy:n}=process.env;if(!n?.split(",").some(o=>e.host.endsWith(o)||e.hostname.endsWith(o)))return t}function Ru(e,t,n){let{hostname:r,pathname:o,port:s,protocol:i,search:a}=new URL(e.url);return function(u){return new Promise((f,l)=>{Ce(()=>{let d=Nu(u.body),m={...e.headers};u.body.length>xu&&(m["content-encoding"]="gzip",d=d.pipe((0,Ds.createGzip)()));let h=r.startsWith("["),S=t.request({method:"POST",agent:n,headers:m,hostname:h?r.slice(1,-1):r,path:`${o}${a}`,port:s,protocol:i,ca:e.caCerts},E=>{E.on("data",()=>{}),E.on("end",()=>{}),E.setEncoding("utf8");let x=E.headers["retry-after"]??null,C=E.headers["x-sentry-rate-limits"]??null;f({statusCode:E.statusCode,headers:{"retry-after":x,"x-sentry-rate-limits":Array.isArray(C)?C[0]||null:C}})});S.on("error",l),d.pipe(S)})})}}function Fs(e){if(e===!1)return!1;if(typeof e=="string")return e;let t=ce(process.env.SENTRY_SPOTLIGHT,{strict:!0}),n=t===null&&process.env.SENTRY_SPOTLIGHT?process.env.SENTRY_SPOTLIGHT:void 0;return e===!0?n??!0:t??n}var ks=require("node:async_hooks");function ws(){let e=new ks.AsyncLocalStorage;function t(){let a=e.getStore();return a||{scope:Ge(),isolationScope:He()}}function n(a){let c=t().scope.clone(),u=t().isolationScope;return e.run({scope:c,isolationScope:u},()=>a(c))}function r(a,c){let u=t().isolationScope.clone();return e.run({scope:a,isolationScope:u},()=>c(a))}function o(a){let c=t().scope.clone(),u=t().isolationScope.clone();return e.run({scope:c,isolationScope:u},()=>a(u))}function s(a,c){let u=t().scope.clone();return e.run({scope:u,isolationScope:a},()=>c(a))}function i(a){return n(c=>(c.setSDKProcessingMetadata({__SENTRY_SUPPRESS_TRACING__:!0}),a()))}un({suppressTracing:i,withScope:n,withSetScope:r,withIsolationScope:o,withSetIsolationScope:s,getCurrentScope:()=>t().scope,getIsolationScope:()=>t().isolationScope})}function Kn(e={}){return Au(e,()=>[])}function Au(e={},t){let n=vu(e,t);n.debug===!0&&(N?p.enable():b(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ws(),R().update(n.initialScope),n.spotlight&&!n.integrations.some(({name:s})=>s===zn)&&n.integrations.push(Cs({sidecarUrl:typeof n.spotlight=="string"?n.spotlight:void 0})),Ke(n,"node-light",["node-core"]);let o=new Ft(n);return R().setClient(o),o.init(),p.log(`SDK initialized from ${bs()?"CommonJS":"ESM"} (light mode)`),o.startClientReportTracking(),Mu(),process.env.VERCEL&&process.on("SIGTERM",async()=>{await o.flush(200)}),o}function vu(e,t){let n=Ou(e.release),r=Fs(e.spotlight),o=Lu(e.tracesSampleRate),s={...e,dsn:e.dsn??process.env.SENTRY_DSN,environment:e.environment??process.env.SENTRY_ENVIRONMENT,sendClientReports:e.sendClientReports??!0,transport:e.transport??Us,stackParser:Xt(e.stackParser||Os),release:n,tracesSampleRate:o,spotlight:r,debug:ce(e.debug??process.env.SENTRY_DEBUG)},i=e.integrations,a=e.defaultIntegrations??t(s);return{...s,integrations:An({defaultIntegrations:a,integrations:i})}}function Ou(e){if(e!==void 0)return e;let t=vs();if(t!==void 0)return t}function Lu(e){if(e!==void 0)return e;let t=process.env.SENTRY_TRACES_SAMPLE_RATE;if(!t)return;let n=parseFloat(t);return isFinite(n)?n:void 0}function Mu(){if(ce(process.env.SENTRY_USE_ENVIRONMENT)!==!1){let e=process.env.SENTRY_TRACE,t=process.env.SENTRY_BAGGAGE,n=gn(e,t);R().setPropagationContext(n)}}var H=O(require("homey"),1);process.env.HOME||(process.env.HOME=Bs.default.tmpdir());var Qn=class e{_capturedMessages=[];_capturedExceptions=[];constructor({homey:t,options:n}){if(typeof t>"u")return e._error("Error: missing `homey` constructor parameter");if(!H.default.env)return e._error("Error: could not access `Homey.env`");if(typeof H.default.env.HOMEY_LOG_URL!="string")return e._error("Error: expected `HOMEY_LOG_URL` env variable, homey-log is disabled");let r=process.env.DEBUG==="1"&&!e._isLogForced();r&&e._log("App is running in debug mode, not enabling Sentry logging");let o;typeof H.default.env.HOMEY_LOG_SENTRY_PROJECT=="string"&&H.default.env.HOMEY_LOG_SENTRY_PROJECT.length>0&&(o=`${H.default.env.HOMEY_LOG_SENTRY_PROJECT}@${H.default.manifest.version}`),this._manifest=H.default.manifest,this._homeyVersion=t.version,this._managerCloud=t.cloud,this._homeyPlatform=t.platform,this._homeyPlatformVersion=t.platformVersion,this.init(H.default.env.HOMEY_LOG_URL,{enabled:!r,release:o,...n})}init(t,n){return Kn({dsn:t,integrations:[ve(),Qe(),qe(),et(),tt(),jn(),Zn(),Yn(),$n(),Hn({app:!1,cloudResource:!1})],maxBreadcrumbs:5,enableMetrics:!1,...n}),this.setTags({appId:this._manifest.id,appVersion:this._manifest.version,homeyVersion:this._homeyVersion,homeyPlatform:this._homeyPlatform,homeyPlatformVersion:this._homeyPlatformVersion}),this._managerCloud.getHomeyId().then(r=>this.setTags({homeyId:r})).catch(r=>e._error("Error: could not get `homeyId`",r)),e._log(`App ${this._manifest.id} v${this._manifest.version} logging on Homey v${this._homeyVersion}...`),this}setTags(t){return At(t),this}setUser(t){return vt(t),this}async captureMessage(t){if(e._log("captureMessage:",t),this._capturedMessages.indexOf(t)>-1){e._log("Prevented sending a duplicate message");return}return this._capturedMessages.push(t),new Promise((n,r)=>{try{n(Rt(t))}catch(o){r(o)}})}async captureException(t){if(e._log("captureException:",t),this._capturedExceptions.indexOf(t)>-1){e._log("Prevented sending a duplicate log");return}return this._capturedExceptions.push(t),new Promise((n,r)=>{try{n(te(t))}catch(o){r(o)}})}static _log(){console.log.bind(null,e._logTime(),"[homey-log]").apply(null,arguments)}static _error(){console.error.bind(null,e._logTime(),"[homey-log]").apply(null,arguments)}static _logTime(){return`\x1B[35m${new Date().toISOString()}\x1B[0m`}static _isLogForced(){switch(H.default.env.HOMEY_LOG_FORCE){case"1":case"true":return!0;default:return!1}}};0&&(module.exports={Log});
package/build/index.mjs CHANGED
@@ -1,22 +1,22 @@
1
- import Nu from"node:os";import*as zo from"node:os";var g=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var _=globalThis;var k="10.39.0";function L(){return z(_),_}function z(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||k,t[k]=t[k]||{}}function U(e,t,n=_){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[k]=r[k]||{};return o[e]||(o[e]=t())}var ve=["debug","info","warn","error","log","assert","trace"],Ns="Sentry Logger ",le={};function b(e){if(!("console"in _))return e();let t=_.console,n={},r=Object.keys(le);r.forEach(o=>{let s=le[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Cs(){Yt().enabled=!0}function Rs(){Yt().enabled=!1}function Xn(){return Yt().enabled}function As(...e){Wt("log",...e)}function vs(...e){Wt("warn",...e)}function Os(...e){Wt("error",...e)}function Wt(e,...t){g&&Xn()&&b(()=>{_.console[e](`${Ns}[${e}]:`,...t)})}function Yt(){return g?U("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var p={enable:Cs,disable:Rs,isEnabled:Xn,log:As,warn:vs,error:Os};var Kn=/\(error: (.*)\)/,Qn=/captureMessage|captureException/;function it(...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
- `);for(let a=r;a<i.length;a++){let c=i[a];c.length>1024&&(c=c.slice(0,1024));let u=Kn.test(c)?c.replace(Kn,"$1"):c;if(!u.match(/\S*Error: /)){for(let f of t){let l=f(u);if(l){s.push(l);break}}if(s.length>=50+o)break}}return qn(s.slice(o))}}function jt(e){return Array.isArray(e)?it(...e):e}function qn(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(st(t).function||"")&&t.pop(),t.reverse(),Qn.test(st(t).function||"")&&(t.pop(),Qn.test(st(t).function||"")&&t.pop()),t.slice(0,50).map(n=>({...n,filename:n.filename||st(t).filename,function:n.function||"?"}))}function st(e){return e[e.length-1]||{}}var Vt="<anonymous>";function Oe(e){try{return!e||typeof e!="function"?Vt:e.name||Vt}catch{return Vt}}function at(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function er(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var ct={},tr={};function fe(e,t){ct[e]=ct[e]||[],ct[e].push(t)}function de(e,t){if(!tr[e]){tr[e]=!0;try{t()}catch(n){g&&p.error(`Error while instrumenting ${e}`,n)}}}function me(e,t){let n=e&&ct[e];if(n)for(let r of n)try{r(t)}catch(o){g&&p.error(`Error while triggering instrumentation handler.
1
+ import Cu from"node:os";import*as Jo from"node:os";var g=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var _=globalThis;var k="10.40.0";function L(){return z(_),_}function z(e){let t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||k,t[k]=t[k]||{}}function U(e,t,n=_){let r=n.__SENTRY__=n.__SENTRY__||{},o=r[k]=r[k]||{};return o[e]||(o[e]=t())}var Oe=["debug","info","warn","error","log","assert","trace"],Cs="Sentry Logger ",le={};function b(e){if(!("console"in _))return e();let t=_.console,n={},r=Object.keys(le);r.forEach(o=>{let s=le[o];n[o]=t[o],t[o]=s});try{return e()}finally{r.forEach(o=>{t[o]=n[o]})}}function Rs(){Yt().enabled=!0}function As(){Yt().enabled=!1}function Xn(){return Yt().enabled}function vs(...e){Wt("log",...e)}function Os(...e){Wt("warn",...e)}function Ls(...e){Wt("error",...e)}function Wt(e,...t){g&&Xn()&&b(()=>{_.console[e](`${Cs}[${e}]:`,...t)})}function Yt(){return g?U("loggerSettings",()=>({enabled:!1})):{enabled:!1}}var p={enable:Rs,disable:As,isEnabled:Xn,log:vs,warn:Os,error:Ls};var Kn=/\(error: (.*)\)/,Qn=/captureMessage|captureException/;function it(...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
+ `);for(let a=r;a<i.length;a++){let c=i[a];c.length>1024&&(c=c.slice(0,1024));let u=Kn.test(c)?c.replace(Kn,"$1"):c;if(!u.match(/\S*Error: /)){for(let f of t){let l=f(u);if(l){s.push(l);break}}if(s.length>=50+o)break}}return qn(s.slice(o))}}function $t(e){return Array.isArray(e)?it(...e):e}function qn(e){if(!e.length)return[];let t=Array.from(e);return/sentryWrapped/.test(st(t).function||"")&&t.pop(),t.reverse(),Qn.test(st(t).function||"")&&(t.pop(),Qn.test(st(t).function||"")&&t.pop()),t.slice(0,50).map(n=>({...n,filename:n.filename||st(t).filename,function:n.function||"?"}))}function st(e){return e[e.length-1]||{}}var Vt="<anonymous>";function Le(e){try{return!e||typeof e!="function"?Vt:e.name||Vt}catch{return Vt}}function at(e){return"__v_isVNode"in e&&e.__v_isVNode?"[VueVNode]":"[VueViewModel]"}function er(e){let t=e?.startsWith("file://")?e.slice(7):e;return t?.match(/\/[A-Z]:/)&&(t=t.slice(1)),t}var ct={},tr={};function fe(e,t){ct[e]=ct[e]||[],ct[e].push(t)}function de(e,t){if(!tr[e]){tr[e]=!0;try{t()}catch(n){g&&p.error(`Error while instrumenting ${e}`,n)}}}function me(e,t){let n=e&&ct[e];if(n)for(let r of n)try{r(t)}catch(o){g&&p.error(`Error while triggering instrumentation handler.
3
3
  Type: ${e}
4
- Name: ${Oe(r)}
5
- Error:`,o)}}var $t=null;function nr(e){let t="error";fe(t,e),de(t,Ls)}function Ls(){$t=_.onerror,_.onerror=function(e,t,n,r,o){return me("error",{column:r,error:o,line:n,msg:e,url:t}),$t?$t.apply(this,arguments):!1},_.onerror.__SENTRY_INSTRUMENTED__=!0}var Zt=null;function rr(e){let t="unhandledrejection";fe(t,e),de(t,Ms)}function Ms(){Zt=_.onunhandledrejection,_.onunhandledrejection=function(e){return me("unhandledrejection",e),Zt?Zt.apply(this,arguments):!0},_.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var or=Object.prototype.toString;function Le(e){switch(or.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return W(e,Error)}}function ut(e,t){return or.call(e)===`[object ${t}]`}function sr(e){return ut(e,"ErrorEvent")}function re(e){return ut(e,"String")}function Me(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function pt(e){return e===null||Me(e)||typeof e!="object"&&typeof e!="function"}function J(e){return ut(e,"Object")}function ir(e){return typeof Event<"u"&&W(e,Event)}function ar(e){return typeof Element<"u"&&W(e,Element)}function cr(e){return ut(e,"RegExp")}function H(e){return!!(e?.then&&typeof e.then=="function")}function ur(e){return J(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function W(e,t){try{return e instanceof t}catch{return!1}}function lt(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}var Ps=_,Ds=80;function pr(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,o=[],s=0,i=0,a=" > ",c=a.length,u,f=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||Ds;for(;n&&s++<r&&(u=Us(n,f),!(u==="html"||s>1&&i+o.length*c+u.length>=l));)o.push(u),i+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function Us(e,t){let n=e,r=[];if(!n?.tagName)return"";if(Ps.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(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(o?.length)o.forEach(i=>{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let i=n.className;if(i&&re(i)){let a=i.split(/\s+/);for(let c of a)r.push(`.${c}`)}}let s=["aria-label","type","name","title","alt"];for(let i of s){let a=n.getAttribute(i);a&&r.push(`[${i}="${a}"]`)}return r.join("")}function dr(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!="function")return;let o=n(r);typeof o=="function"&&Fs(o,r);try{e[t]=o}catch{g&&p.log(`Failed to replace method "${t}" in object`,e)}}function Pe(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{g&&p.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function Fs(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,Pe(e,"__sentry_original__",t)}catch{}}function mr(e){return e.__sentry_original__}function zt(e){if(Le(e))return{message:e.message,name:e.name,stack:e.stack,...fr(e)};if(ir(e)){let t={type:e.type,target:lr(e.target),currentTarget:lr(e.currentTarget),...fr(e)};return typeof CustomEvent<"u"&&W(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function lr(e){try{return ar(e)?pr(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function fr(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function gr(e){let t=Object.keys(zt(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}var ge;function _e(e){if(ge!==void 0)return ge?ge(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=_;return t in n&&typeof n[t]=="function"?(ge=n[t],ge(e)):(ge=null,e())}function M(){return _e(()=>Math.random())}function he(){return _e(()=>Date.now())}function Se(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Jt(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 Xt(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let o=e[r];try{lt(o)?n.push(at(o)):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Y(e,t,n=!1){return re(e)?cr(t)?t.test(e):re(t)?n?e===t:e.includes(t):!1:!1}function Ee(e,t=[],n=!1){return t.some(r=>Y(e,r,n))}function ks(){let e=_;return e.crypto||e.msCrypto}var Kt;function ws(){return M()*16}function T(e=ks()){try{if(e?.randomUUID)return _e(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Kt||(Kt="10000000100040008000"+1e11),Kt.replace(/[018]/g,t=>(t^(ws()&15)>>t/4).toString(16))}function _r(e){return e.exception?.values?.[0]}function X(e){let{message:t,event_id:n}=e;if(t)return t;let r=_r(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function qt(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 Ie(e,t){let n=_r(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 Bs=/^(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 Qt(e){return parseInt(e||"",10)}function en(e){let t=e.match(Bs)||[],n=Qt(t[1]),r=Qt(t[2]),o=Qt(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 ft(e){if(Gs(e))return!0;try{Pe(e,"__sentry_captured__",!0)}catch{}return!1}function Gs(e){try{return e.__sentry_captured__}catch{}}var Sr=1e3;function V(){return he()/Sr}function Hs(){let{performance:e}=_;if(!e?.now||!e.timeOrigin)return V;let t=e.timeOrigin;return()=>(t+_e(()=>e.now()))/Sr}var hr;function dt(){return(hr??(hr=Hs()))()}function De(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||dt(),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:T()),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 K(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]=K(r[o],t[o],n-1));return r}function Ue(){return T()}function Fe(){return T().substring(16)}var tn="_sentrySpan";function ke(e,t){t?Pe(e,tn,t):delete e[tn]}function Te(e){return e[tn]}var Ws=100,A=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:Ue(),sampleRand:M()}}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,Te(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&&De(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():J(n)?t:void 0,{tags:o,attributes:s,extra:i,user:a,contexts:c,level:u,fingerprint:f=[],propagationContext:l,conversationId:d}=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),f.length&&(this._fingerprint=f),l&&(this._propagationContext=l),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,ke(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Ue(),sampleRand:M()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:Ws;if(r<=0)return this;let o={timestamp:V(),...t,message:t.message?Se(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:Te(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=K(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n?.event_id||T();if(!this._client)return g&&p.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||T();if(!this._client)return g&&p.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||T();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(g&&p.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 we(){return U("defaultCurrentScope",()=>new A)}function Be(){return U("defaultIsolationScope",()=>new A)}var nn=class{constructor(t,n){let r;t?r=t:r=new A;let o;n?o=n:o=new A,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 H(r)?r.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(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 ye(){let e=L(),t=z(e);return t.stack=t.stack||new nn(we(),Be())}function Ys(e){return ye().withScope(e)}function Vs(e,t){let n=ye();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Er(e){return ye().withScope(()=>e(ye().getIsolationScope()))}function Ir(){return{withIsolationScope:Er,withScope:Ys,withSetScope:Vs,withSetIsolationScope:(e,t)=>Er(t),getCurrentScope:()=>ye().getScope(),getIsolationScope:()=>ye().getIsolationScope()}}function rn(e){let t=L(),n=z(t);n.acs=e}function Q(e){let t=z(e);return t.acs?t.acs:Ir()}function R(){let e=L();return Q(e).getCurrentScope()}function P(){let e=L();return Q(e).getIsolationScope()}function mt(){return U("globalScope",()=>new A)}function oe(...e){let t=L(),n=Q(t);if(e.length===2){let[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function I(){return R().getClient()}function Ge(e){let t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,s={trace_id:n,span_id:o||Fe()};return r&&(s.parent_span_id=r),s}var gt="sentry.source",on="sentry.sample_rate",Tr="sentry.previous_trace_sample_rate",sn="sentry.op",an="sentry.origin";var cn="sentry.profile_id",un="sentry.exclusive_time";var js="_sentryScope",$s="_sentryIsolationScope";function Zs(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function _t(e){let t=e;return{scope:t[js],isolationScope:Zs(t[$s])}}var zs="sentry-",Js=/^sentry-/;function ht(e){let t=Xs(e);if(!t)return;let n=Object.entries(t).reduce((r,[o,s])=>{if(o.match(Js)){let i=o.slice(zs.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function Xs(e){if(!(!e||!re(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=yr(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):yr(e)}function yr(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 Ks=/^o(\d+)\./,Qs=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function qs(e){return e==="http"||e==="https"}function D(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 ei(e){let t=Qs.exec(e);if(!t){b(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,o="",s="",i="",a=""]=t.slice(1),c="",u=a,f=u.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),u=f.pop()),u){let l=u.match(/^\d+/);l&&(u=l[0])}return br({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function br(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function ti(e){if(!g)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(p.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?qs(r)?t&&isNaN(parseInt(t,10))?(p.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(p.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(p.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function ni(e){return e.match(Ks)?.[1]}function xr(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=ni(n)),r}function Nr(e){let t=typeof e=="string"?ei(e):br(e);if(!(!t||!ti(t)))return t}function He(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 Cr=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Rr(e){if(!e)return;let t=e.match(Cr);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 pn(e,t){let n=Rr(e),r=ht(t);if(!n?.traceId)return{traceId:Ue(),sampleRand:M()};let o=ri(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 ri(e,t){let n=He(t?.sample_rand);if(n!==void 0)return n;let r=He(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?M()*r:r+M()*(1-r):M()}var Lr=1,Ar=!1;function St(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:be(e).parent_span_id,s=_t(e).scope,i=r?s?.getPropagationContext().propagationSpanId||Fe():t;return{parent_span_id:o,span_id:i,trace_id:n}}function oi(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===Lr,attributes:s,...o}))}function vr(e){return typeof e=="number"?Or(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Or(e.getTime()):dt()}function Or(e){return e>9999999999?e/1e3:e}function be(e){if(ii(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(si(e)){let{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:u,start_timestamp:vr(o),timestamp:vr(i)||void 0,status:ai(a),op:r[sn],origin:r[an],links:oi(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function si(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function ii(e){return typeof e.getSpanJSON=="function"}function Mr(e){let{traceFlags:t}=e.spanContext();return t===Lr}function ai(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}var ci="_sentryRootSpan";function se(e){return e[ci]||e}function We(){let e=L(),t=Q(e);return t.getActiveSpan?t.getActiveSpan():Te(R())}function ln(){Ar||(b(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),Ar=!0)}var Pr=!1;function Dr(){if(Pr)return;function e(){let t=We(),n=t&&se(t);if(n){let r="internal_error";g&&p.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:2,message:r})}}e.tag="sentry_tracingErrorCallback",Pr=!0,nr(e),rr(e)}function Ur(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||I()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function Fr(e){p.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function fn(e,t){if(!t?.length||!e.description)return!1;for(let n of t){if(ui(n)){if(Y(e.description,n))return g&&Fr(e),!0;continue}if(!n.name&&!n.op)continue;let r=n.name?Y(e.description,n.name):!0,o=n.op?e.op&&Y(e.op,n.op):!0;if(r&&o)return g&&Fr(e),!0}return!1}function kr(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 ui(e){return typeof e=="string"||e instanceof RegExp}var xe="production";var pi="_frozenDsc";function wr(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||xe,release:n.release,public_key:r,trace_id:e,org_id:xr(t)};return t.emit("createDsc",o),o}function Et(e,t){let n=t.getPropagationContext();return n.dsc||wr(n.traceId,e)}function It(e){let t=I();if(!t)return{};let n=se(e),r=be(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[on]??o[Tr];function a(h){return(typeof i=="number"||typeof i=="string")&&(h.sample_rate=`${i}`),h}let c=n[pi];if(c)return a(c);let u=s?.get("sentry.dsc"),f=u&&ht(u);if(f)return a(f);let l=wr(e.spanContext().traceId,t),d=o[gt],m=r.description;return d!=="url"&&m&&(l.transaction=m),Ur()&&(l.sampled=String(Mr(n)),l.sample_rand=s?.get("sentry.sample_rand")??_t(n).scope?.getPropagationContext().sampleRand.toString()),a(l),t.emit("createDsc",l,n),l}function F(e,t=100,n=1/0){try{return dn("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function mn(e,t=3,n=100*1024){let r=F(e,t);return mi(r)>n?mn(e,t-1,n):r}function dn(e,t,n=1/0,r=1/0,o=gi()){let[s,i]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let a=li(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(s(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let m=u.toJSON();return dn("",m,c-1,r,o)}catch{}let f=Array.isArray(t)?[]:{},l=0,d=zt(t);for(let m in d){if(!Object.prototype.hasOwnProperty.call(d,m))continue;if(l>=r){f[m]="[MaxProperties ~]";break}let h=d[m];f[m]=dn(m,h,c-1,r,o),l++}return i(t),f}function li(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(lt(t))return at(t);if(ur(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Oe(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=fi(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function fi(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function di(e){return~-encodeURI(e).split(/%..|./).length}function mi(e){return di(JSON.stringify(e))}function gi(){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 v(e,t=[]){return[e,t]}function _n(e,t){let[n,r]=e;return[n,[...r,t]]}function Ye(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 hn(e,t){return Ye(e,(n,r)=>t.includes(r))}function gn(e){let t=z(_);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function Ve(e){let[t,n]=e,r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[gn(r),s]:r.push(typeof s=="string"?gn(s):s)}for(let s of n){let[i,a]=s;if(o(`
4
+ Name: ${Le(r)}
5
+ Error:`,o)}}var jt=null;function nr(e){let t="error";fe(t,e),de(t,Ms)}function Ms(){jt=_.onerror,_.onerror=function(e,t,n,r,o){return me("error",{column:r,error:o,line:n,msg:e,url:t}),jt?jt.apply(this,arguments):!1},_.onerror.__SENTRY_INSTRUMENTED__=!0}var Zt=null;function rr(e){let t="unhandledrejection";fe(t,e),de(t,Ps)}function Ps(){Zt=_.onunhandledrejection,_.onunhandledrejection=function(e){return me("unhandledrejection",e),Zt?Zt.apply(this,arguments):!0},_.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}var or=Object.prototype.toString;function Me(e){switch(or.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return W(e,Error)}}function ut(e,t){return or.call(e)===`[object ${t}]`}function sr(e){return ut(e,"ErrorEvent")}function re(e){return ut(e,"String")}function Pe(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function pt(e){return e===null||Pe(e)||typeof e!="object"&&typeof e!="function"}function J(e){return ut(e,"Object")}function ir(e){return typeof Event<"u"&&W(e,Event)}function ar(e){return typeof Element<"u"&&W(e,Element)}function cr(e){return ut(e,"RegExp")}function H(e){return!!(e?.then&&typeof e.then=="function")}function ur(e){return J(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function W(e,t){try{return e instanceof t}catch{return!1}}function lt(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue||e.__v_isVNode))}var Ds=_,Us=80;function pr(e,t={}){if(!e)return"<unknown>";try{let n=e,r=5,o=[],s=0,i=0,a=" > ",c=a.length,u,f=Array.isArray(t)?t:t.keyAttrs,l=!Array.isArray(t)&&t.maxStringLength||Us;for(;n&&s++<r&&(u=Fs(n,f),!(u==="html"||s>1&&i+o.length*c+u.length>=l));)o.push(u),i+=u.length,n=n.parentNode;return o.reverse().join(a)}catch{return"<unknown>"}}function Fs(e,t){let n=e,r=[];if(!n?.tagName)return"";if(Ds.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(i=>n.getAttribute(i)).map(i=>[i,n.getAttribute(i)]):null;if(o?.length)o.forEach(i=>{r.push(`[${i[0]}="${i[1]}"]`)});else{n.id&&r.push(`#${n.id}`);let i=n.className;if(i&&re(i)){let a=i.split(/\s+/);for(let c of a)r.push(`.${c}`)}}let s=["aria-label","type","name","title","alt"];for(let i of s){let a=n.getAttribute(i);a&&r.push(`[${i}="${a}"]`)}return r.join("")}function dr(e,t,n){if(!(t in e))return;let r=e[t];if(typeof r!="function")return;let o=n(r);typeof o=="function"&&ks(o,r);try{e[t]=o}catch{g&&p.log(`Failed to replace method "${t}" in object`,e)}}function De(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{g&&p.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function ks(e,t){try{let n=t.prototype||{};e.prototype=t.prototype=n,De(e,"__sentry_original__",t)}catch{}}function mr(e){return e.__sentry_original__}function zt(e){if(Me(e))return{message:e.message,name:e.name,stack:e.stack,...fr(e)};if(ir(e)){let t={type:e.type,target:lr(e.target),currentTarget:lr(e.currentTarget),...fr(e)};return typeof CustomEvent<"u"&&W(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function lr(e){try{return ar(e)?pr(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function fr(e){if(typeof e=="object"&&e!==null){let t={};for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function gr(e){let t=Object.keys(zt(e));return t.sort(),t[0]?t.join(", "):"[object has no keys]"}var ge;function _e(e){if(ge!==void 0)return ge?ge(e):e();let t=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=_;return t in n&&typeof n[t]=="function"?(ge=n[t],ge(e)):(ge=null,e())}function M(){return _e(()=>Math.random())}function he(){return _e(()=>Date.now())}function Se(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Jt(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 Xt(e,t){if(!Array.isArray(e))return"";let n=[];for(let r=0;r<e.length;r++){let o=e[r];try{lt(o)?n.push(at(o)):n.push(String(o))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function Y(e,t,n=!1){return re(e)?cr(t)?t.test(e):re(t)?n?e===t:e.includes(t):!1:!1}function Ee(e,t=[],n=!1){return t.some(r=>Y(e,r,n))}function ws(){let e=_;return e.crypto||e.msCrypto}var Kt;function Bs(){return M()*16}function T(e=ws()){try{if(e?.randomUUID)return _e(()=>e.randomUUID()).replace(/-/g,"")}catch{}return Kt||(Kt="10000000100040008000"+1e11),Kt.replace(/[018]/g,t=>(t^(Bs()&15)>>t/4).toString(16))}function _r(e){return e.exception?.values?.[0]}function X(e){let{message:t,event_id:n}=e;if(t)return t;let r=_r(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function qt(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 Ie(e,t){let n=_r(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 Gs=/^(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 Qt(e){return parseInt(e||"",10)}function en(e){let t=e.match(Gs)||[],n=Qt(t[1]),r=Qt(t[2]),o=Qt(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 ft(e){if(hr(e))return!0;try{De(e,"__sentry_captured__",!0)}catch{}return!1}function hr(e){try{return e.__sentry_captured__}catch{}}var Er=1e3;function V(){return he()/Er}function Hs(){let{performance:e}=_;if(!e?.now||!e.timeOrigin)return V;let t=e.timeOrigin;return()=>(t+_e(()=>e.now()))/Er}var Sr;function dt(){return(Sr??(Sr=Hs()))()}function Ue(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||dt(),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:T()),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 K(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]=K(r[o],t[o],n-1));return r}function Fe(){return T()}function ke(){return T().substring(16)}var tn="_sentrySpan";function we(e,t){t?De(e,tn,t):delete e[tn]}function Te(e){return e[tn]}var Ws=100,A=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:Fe(),sampleRand:M()}}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,we(t,Te(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&&Ue(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():J(n)?t:void 0,{tags:o,attributes:s,extra:i,user:a,contexts:c,level:u,fingerprint:f=[],propagationContext:l,conversationId:d}=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),f.length&&(this._fingerprint=f),l&&(this._propagationContext=l),d&&(this._conversationId=d),this}clear(){return this._breadcrumbs=[],this._tags={},this._attributes={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,this._conversationId=void 0,we(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Fe(),sampleRand:M()}),this._notifyScopeListeners(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:Ws;if(r<=0)return this;let o={timestamp:V(),...t,message:t.message?Se(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:Te(this),conversationId:this._conversationId}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=K(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n?.event_id||T();if(!this._client)return g&&p.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||T();if(!this._client)return g&&p.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||T();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(g&&p.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 Be(){return U("defaultCurrentScope",()=>new A)}function Ge(){return U("defaultIsolationScope",()=>new A)}var nn=class{constructor(t,n){let r;t?r=t:r=new A;let o;n?o=n:o=new A,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 H(r)?r.then(o=>(this._popScope(),o),o=>{throw this._popScope(),o}):(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 ye(){let e=L(),t=z(e);return t.stack=t.stack||new nn(Be(),Ge())}function Ys(e){return ye().withScope(e)}function Vs(e,t){let n=ye();return n.withScope(()=>(n.getStackTop().scope=e,t(e)))}function Ir(e){return ye().withScope(()=>e(ye().getIsolationScope()))}function Tr(){return{withIsolationScope:Ir,withScope:Ys,withSetScope:Vs,withSetIsolationScope:(e,t)=>Ir(t),getCurrentScope:()=>ye().getScope(),getIsolationScope:()=>ye().getIsolationScope()}}function rn(e){let t=L(),n=z(t);n.acs=e}function Q(e){let t=z(e);return t.acs?t.acs:Tr()}function R(){let e=L();return Q(e).getCurrentScope()}function P(){let e=L();return Q(e).getIsolationScope()}function mt(){return U("globalScope",()=>new A)}function oe(...e){let t=L(),n=Q(t);if(e.length===2){let[r,o]=e;return r?n.withSetScope(r,o):n.withScope(o)}return n.withScope(e[0])}function I(){return R().getClient()}function He(e){let t=e.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:o}=t,s={trace_id:n,span_id:o||ke()};return r&&(s.parent_span_id=r),s}var gt="sentry.source",on="sentry.sample_rate",yr="sentry.previous_trace_sample_rate",sn="sentry.op",an="sentry.origin";var cn="sentry.profile_id",un="sentry.exclusive_time";var $s="_sentryScope",js="_sentryIsolationScope";function Zs(e){if(e){if(typeof e=="object"&&"deref"in e&&typeof e.deref=="function")try{return e.deref()}catch{return}return e}}function _t(e){let t=e;return{scope:t[$s],isolationScope:Zs(t[js])}}var zs="sentry-",Js=/^sentry-/;function ht(e){let t=Xs(e);if(!t)return;let n=Object.entries(t).reduce((r,[o,s])=>{if(o.match(Js)){let i=o.slice(zs.length);r[i]=s}return r},{});if(Object.keys(n).length>0)return n}function Xs(e){if(!(!e||!re(e)&&!Array.isArray(e)))return Array.isArray(e)?e.reduce((t,n)=>{let r=br(n);return Object.entries(r).forEach(([o,s])=>{t[o]=s}),t},{}):br(e)}function br(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 Ks=/^o(\d+)\./,Qs=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function qs(e){return e==="http"||e==="https"}function D(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 ei(e){let t=Qs.exec(e);if(!t){b(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}let[n,r,o="",s="",i="",a=""]=t.slice(1),c="",u=a,f=u.split("/");if(f.length>1&&(c=f.slice(0,-1).join("/"),u=f.pop()),u){let l=u.match(/^\d+/);l&&(u=l[0])}return xr({host:s,pass:o,path:c,projectId:u,port:i,protocol:n,publicKey:r})}function xr(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function ti(e){if(!g)return!0;let{port:t,projectId:n,protocol:r}=e;return["protocol","publicKey","host","projectId"].find(i=>e[i]?!1:(p.error(`Invalid Sentry Dsn: ${i} missing`),!0))?!1:n.match(/^\d+$/)?qs(r)?t&&isNaN(parseInt(t,10))?(p.error(`Invalid Sentry Dsn: Invalid port ${t}`),!1):!0:(p.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),!1):(p.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),!1)}function ni(e){return e.match(Ks)?.[1]}function Nr(e){let t=e.getOptions(),{host:n}=e.getDsn()||{},r;return t.orgId?r=String(t.orgId):n&&(r=ni(n)),r}function Cr(e){let t=typeof e=="string"?ei(e):xr(e);if(!(!t||!ti(t)))return t}function We(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 Rr=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Ar(e){if(!e)return;let t=e.match(Rr);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 pn(e,t){let n=Ar(e),r=ht(t);if(!n?.traceId)return{traceId:Fe(),sampleRand:M()};let o=ri(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 ri(e,t){let n=We(t?.sample_rand);if(n!==void 0)return n;let r=We(t?.sample_rate);return r&&e?.parentSampled!==void 0?e.parentSampled?M()*r:r+M()*(1-r):M()}var Mr=1,vr=!1;function St(e){let{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:be(e).parent_span_id,s=_t(e).scope,i=r?s?.getPropagationContext().propagationSpanId||ke():t;return{parent_span_id:o,span_id:i,trace_id:n}}function oi(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===Mr,attributes:s,...o}))}function Or(e){return typeof e=="number"?Lr(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?Lr(e.getTime()):dt()}function Lr(e){return e>9999999999?e/1e3:e}function be(e){if(ii(e))return e.getSpanJSON();let{spanId:t,traceId:n}=e.spanContext();if(si(e)){let{attributes:r,startTime:o,name:s,endTime:i,status:a,links:c}=e,u="parentSpanId"in e?e.parentSpanId:"parentSpanContext"in e?e.parentSpanContext?.spanId:void 0;return{span_id:t,trace_id:n,data:r,description:s,parent_span_id:u,start_timestamp:Or(o),timestamp:Or(i)||void 0,status:ai(a),op:r[sn],origin:r[an],links:oi(c)}}return{span_id:t,trace_id:n,start_timestamp:0,data:{}}}function si(e){let t=e;return!!t.attributes&&!!t.startTime&&!!t.name&&!!t.endTime&&!!t.status}function ii(e){return typeof e.getSpanJSON=="function"}function Pr(e){let{traceFlags:t}=e.spanContext();return t===Mr}function ai(e){if(!(!e||e.code===0))return e.code===1?"ok":e.message||"internal_error"}var ci="_sentryRootSpan";function se(e){return e[ci]||e}function Ye(){let e=L(),t=Q(e);return t.getActiveSpan?t.getActiveSpan():Te(R())}function ln(){vr||(b(()=>{console.warn("[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`.")}),vr=!0)}var Dr=!1;function Ur(){if(Dr)return;function e(){let t=Ye(),n=t&&se(t);if(n){let r="internal_error";g&&p.log(`[Tracing] Root span: ${r} -> Global error occurred`),n.setStatus({code:2,message:r})}}e.tag="sentry_tracingErrorCallback",Dr=!0,nr(e),rr(e)}function Fr(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=e||I()?.getOptions();return!!t&&(t.tracesSampleRate!=null||!!t.tracesSampler)}function kr(e){p.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`)}function fn(e,t){if(!t?.length||!e.description)return!1;for(let n of t){if(ui(n)){if(Y(e.description,n))return g&&kr(e),!0;continue}if(!n.name&&!n.op)continue;let r=n.name?Y(e.description,n.name):!0,o=n.op?e.op&&Y(e.op,n.op):!0;if(r&&o)return g&&kr(e),!0}return!1}function wr(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 ui(e){return typeof e=="string"||e instanceof RegExp}var xe="production";var pi="_frozenDsc";function Br(e,t){let n=t.getOptions(),{publicKey:r}=t.getDsn()||{},o={environment:n.environment||xe,release:n.release,public_key:r,trace_id:e,org_id:Nr(t)};return t.emit("createDsc",o),o}function Et(e,t){let n=t.getPropagationContext();return n.dsc||Br(n.traceId,e)}function It(e){let t=I();if(!t)return{};let n=se(e),r=be(n),o=r.data,s=n.spanContext().traceState,i=s?.get("sentry.sample_rate")??o[on]??o[yr];function a(h){return(typeof i=="number"||typeof i=="string")&&(h.sample_rate=`${i}`),h}let c=n[pi];if(c)return a(c);let u=s?.get("sentry.dsc"),f=u&&ht(u);if(f)return a(f);let l=Br(e.spanContext().traceId,t),d=o[gt],m=r.description;return d!=="url"&&m&&(l.transaction=m),Fr()&&(l.sampled=String(Pr(n)),l.sample_rand=s?.get("sentry.sample_rand")??_t(n).scope?.getPropagationContext().sampleRand.toString()),a(l),t.emit("createDsc",l,n),l}function F(e,t=100,n=1/0){try{return dn("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function mn(e,t=3,n=100*1024){let r=F(e,t);return mi(r)>n?mn(e,t-1,n):r}function dn(e,t,n=1/0,r=1/0,o=gi()){let[s,i]=o;if(t==null||["boolean","string"].includes(typeof t)||typeof t=="number"&&Number.isFinite(t))return t;let a=li(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(s(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let m=u.toJSON();return dn("",m,c-1,r,o)}catch{}let f=Array.isArray(t)?[]:{},l=0,d=zt(t);for(let m in d){if(!Object.prototype.hasOwnProperty.call(d,m))continue;if(l>=r){f[m]="[MaxProperties ~]";break}let h=d[m];f[m]=dn(m,h,c-1,r,o),l++}return i(t),f}function li(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(lt(t))return at(t);if(ur(t))return"[SyntheticEvent]";if(typeof t=="number"&&!Number.isFinite(t))return`[${t}]`;if(typeof t=="function")return`[Function: ${Le(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=fi(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function fi(e){let t=Object.getPrototypeOf(e);return t?.constructor?t.constructor.name:"null prototype"}function di(e){return~-encodeURI(e).split(/%..|./).length}function mi(e){return di(JSON.stringify(e))}function gi(){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 v(e,t=[]){return[e,t]}function _n(e,t){let[n,r]=e;return[n,[...r,t]]}function Ve(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 hn(e,t){return Ve(e,(n,r)=>t.includes(r))}function gn(e){let t=z(_);return t.encodePolyfill?t.encodePolyfill(e):new TextEncoder().encode(e)}function $e(e){let[t,n]=e,r=JSON.stringify(t);function o(s){typeof r=="string"?r=typeof s=="string"?r+s:[gn(r),s]:r.push(typeof s=="string"?gn(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(F(a))}o(c)}}return typeof r=="string"?r:_i(r)}function _i(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 Sn(e){let t=typeof e.data=="string"?gn(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var hi={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function Tt(e){return hi[e]}function yt(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function En(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:D(r)},...o&&{trace:o}}}function Ei(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 Br(e,t,n,r){let o=yt(n),s={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:D(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return v(s,[i])}function Gr(e,t,n,r){let o=yt(n),s=e.type&&e.type!=="replay_event"?e.type:"event";Ei(e,n?.sdk);let i=En(e,o,r,t);return delete e.sdkProcessingMetadata,v(i,[[{type:s},e]])}var Hr="__SENTRY_SUPPRESS_TRACING__";function bt(e,t){let n=Wr();return n.withActiveSpan?n.withActiveSpan(e,t):oe(r=>(ke(r,e||void 0),t(r)))}function Ne(e){let t=Wr();return t.suppressTracing?t.suppressTracing(e):oe(n=>{n.setSDKProcessingMetadata({[Hr]:!0});let r=e();return n.setSDKProcessingMetadata({[Hr]:void 0}),r})}function Wr(){let e=L();return Q(e)}var In=0,Yr=1,Vr=2;function j(e){return new xt(t=>{t(e)})}function Ce(e){return new xt((t,n)=>{n(e)})}var xt=class e{constructor(t){this._state=In,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===In)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Yr&&n[1](this._value),this._state===Vr&&n[2](this._value),n[0]=!0)})}_runExecutor(t){let n=(s,i)=>{if(this._state===In){if(H(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(Yr,s)},o=s=>{n(Vr,s)};try{t(r,o)}catch(s){o(s)}}};function jr(e,t,n,r=0){try{let o=Tn(t,n,e,r);return H(o)?o:j(o)}catch(o){return Ce(o)}}function Tn(e,t,n,r){let o=n[r];if(!e||!o)return e;let s=o({...e},t);return g&&s===null&&p.log(`Event processor "${o.id||"?"}" dropped event`),H(s)?s.then(i=>Tn(i,t,n,r+1)):Tn(s,t,n,r+1)}var ie,$r,Zr,q;function zr(e){let t=_._sentryDebugIds,n=_._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(q&&r.length===$r&&o.length===Zr)return q;$r=r.length,Zr=o.length,q={},ie||(ie={});let s=(i,a)=>{for(let c of i){let u=a[c],f=ie?.[c];if(f&&q&&u)q[f[0]]=u,ie&&(ie[c]=[f[0],u]);else if(u){let l=e(c);for(let d=l.length-1;d>=0;d--){let h=l[d]?.filename;if(h&&q&&ie){q[h]=u,ie[c]=[h,u];break}}}}};return t&&s(r,t),n&&s(o,n),q}function Xr(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;Ii(e,t),r&&bi(e,r),xi(e,n),Ti(e,o),yi(e,s)}function Jr(e,t){let{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:f,eventProcessors:l,attachments:d,propagationContext:m,transactionName:h,span:S}=t;je(e,"extra",n),je(e,"tags",r),je(e,"attributes",o),je(e,"user",s),je(e,"contexts",i),e.sdkProcessingMetadata=K(e.sdkProcessingMetadata,c,2),a&&(e.level=a),h&&(e.transactionName=h),S&&(e.span=S),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),f.length&&(e.fingerprint=[...e.fingerprint,...f]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...m}}function je(e,t,n){e[t]=K(e[t],n,1)}function Kr(e,t){let n=mt().getScopeData();return e&&Jr(n,e.getScopeData()),t&&Jr(n,t.getScopeData()),n}function Ii(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 Ti(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function yi(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function bi(e,t){e.contexts={trace:St(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:It(t),...e.sdkProcessingMetadata};let n=se(t),r=be(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function xi(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 Qr(e,t,n,r,o,s){let{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||T(),timestamp:t.timestamp||V()},u=n.integrations||e.integrations.map(x=>x.name);Ni(c,e),Ai(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Ci(c,e.stackParser);let f=Oi(r,n.captureContext);n.mechanism&&Ie(c,n.mechanism);let l=o?o.getEventProcessors():[],d=Kr(s,f),m=[...n.attachments||[],...d.attachments];m.length&&(n.attachments=m),Xr(c,d);let h=[...l,...d.eventProcessors];return(n.data&&n.data.__sentry__===!0?j(c):jr(h,c,n)).then(x=>(x&&Ri(x),typeof i=="number"&&i>0?vi(x,i,a):x))}function Ni(e,t){let{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||xe,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);let i=e.request;i?.url&&s&&(i.url=Se(i.url,s)),s&&e.exception?.values?.forEach(a=>{a.value&&(a.value=Se(a.value,s))})}function Ci(e,t){let n=zr(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function Ri(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 Ai(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function vi(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:F(o.data,t,n)}}))},...e.user&&{user:F(e.user,t,n)},...e.contexts&&{contexts:F(e.contexts,t,n)},...e.extra&&{extra:F(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=F(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:F(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=F(e.contexts.flags,3,n)),r}function Oi(e,t){if(!t)return e;let n=e?e.clone():new A;return n.update(t),n}function qr(e){if(e)return Li(e)?{captureContext:e}:Pi(e)?{captureContext:e}:e}function Li(e){return e instanceof A||typeof e=="function"}var Mi=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Pi(e){return Object.keys(e).some(t=>Mi.includes(t))}function ee(e,t){return R().captureException(e,qr(t))}function Nt(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return R().captureMessage(e,n,r)}function Ct(e){P().setTags(e)}function Rt(e){P().setUser(e)}var Di="7";function Ui(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Fi(e){return`${Ui(e)}${e.projectId}/envelope/`}function ki(e,t){let n={sentry_version:Di};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function to(e,t,n){return t||`${Fi(e)}?${ki(e,n)}`}var yn=[];function wi(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 bn(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 wi(r)}function no(e,t){let n={};return t.forEach(r=>{r&&Nn(e,r,n)}),n}function xn(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Nn(e,t,n){if(n[t.name]){g&&p.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!yn.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),yn.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)}g&&p.log(`Integration installed: ${t.name}`)}function ro(e,t){return t?oe(t,()=>{let n=We(),r=n?St(n):Ge(t);return[n?It(n):Et(e,t),r]}):[void 0,void 0]}function Bi(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function oo(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=D(r)),v(o,[Bi(e)])}function $e(e,t){let n=t??Gi(e)??[];if(n.length===0)return;let r=e.getOptions(),o=oo(n,r._metadata,r.tunnel,e.getDsn());so().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function Gi(e){return so().get(e)}function so(){return U("clientToLogBufferMap",()=>new WeakMap)}function Hi(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function io(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=D(r)),v(o,[Hi(e)])}function ao(e,t){let n=t??Wi(e)??[];if(n.length===0)return;let r=e.getOptions(),o=io(n,r._metadata,r.tunnel,e.getDsn());co().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function Wi(e){return co().get(e)}function co(){return U("clientToMetricBufferMap",()=>new WeakMap)}function At(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var Ze=Symbol.for("SentryBufferFullError");function vt(e=100){let t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return Ce(Ze);let a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return j(!0);let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;let c=[a,new Promise(u=>At(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}var Yi=60*1e3;function Vi(e,t=he()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?Yi:r-t}function ji(e,t){return e[t]||e.all||0}function uo(e,t,n=he()){return ji(e,t)>n}function po(e,{statusCode:t,headers:n},r=he()){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,,,f]=a.split(":",5),l=parseInt(c,10),d=(isNaN(l)?60:l)*1e3;if(!u)o.all=r+d;else for(let m of u.split(";"))m==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(o[m]=r+d):o[m]=r+d}else i?o.all=r+Vi(i,r):t===429&&(o.all=r+60*1e3);return o}var Cn=64;function ze(e,t,n=vt(e.bufferSize||Cn)){let r={},o=i=>n.drain(i);function s(i){let a=[];if(Ye(i,(l,d)=>{let m=Tt(d);uo(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):a.push(l)}),a.length===0)return Promise.resolve({});let c=v(i[0],a),u=l=>{if(hn(c,["client_report"])){g&&p.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);return}Ye(c,(d,m)=>{e.recordDroppedEvent(l,Tt(m))})},f=()=>t({body:Ve(c)}).then(l=>l.statusCode===413?(g&&p.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),l):(g&&l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&p.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=po(r,l),l),l=>{throw u("network_error"),g&&p.error("Encountered error running transport request:",l),l});return n.add(f).then(l=>l,l=>{if(l===Ze)return g&&p.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:s,flush:o}}function lo(e,t,n){let r=[{type:"client_report"},{timestamp:n||V(),discarded_events:e}];return v(t?{dsn:t}:{},[r])}function Ot(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 fo(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?.[cn],exclusive_time:i?.[un],measurements:e.measurements,is_segment:!0}}function mo(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&&{[cn]:e.profile_id},...e.exclusive_time&&{[un]:e.exclusive_time}}}},measurements:e.measurements}}var go="Not capturing exception because it's already been captured.",_o="Discarded session because of missing or non-string release",yo=Symbol.for("SentryInternalError"),bo=Symbol.for("SentryDoNotSendEventError"),$i=5e3;function Lt(e){return{message:e,[yo]:!0}}function Rn(e){return{message:e,[bo]:!0}}function ho(e){return!!e&&typeof e=="object"&&yo in e}function So(e){return!!e&&typeof e=="object"&&bo in e}function Eo(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=At(setTimeout(()=>{o(e)},$i)))}),e.on("flush",()=>{o(e)})}var Mt=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=vt(t.transportOptions?.bufferSize??Cn),t.dsn?this._dsn=Nr(t.dsn):g&&p.warn("No DSN provided, client will not send events."),this._dsn){let r=to(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&&Eo(this,"afterCaptureLog","flushLogs",Xi,$e),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Eo(this,"afterCaptureMetric","flushMetrics",Ji,ao)}captureException(t,n,r){let o=T();if(ft(t))return g&&p.log(go),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:T(),...r},i=Me(t)?t:String(t),a=pt(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=T();if(n?.originalException&&ft(n.originalException))return g&&p.log(go),o;let s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=Io(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),De(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(!n)return!0;this.emit("flush");let r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){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];Nn(this,t,this._integrations),n||xn(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Gr(t,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=_n(r,Sn(o));this.sendEnvelope(r).then(o=>this.emit("afterSendEvent",t,o))}sendSession(t){let{release:n,environment:r=xe}=this._options;if("aggregates"in t){let s=t.attrs||{};if(!s.release&&!n){g&&p.warn(_o);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){g&&p.warn(_o);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);let o=Br(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&&p.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&&p.error("Error while sending envelope:",n),{}}return g&&p.error("Transport disabled"),{}}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=no(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)&&(De(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),Qr(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:Ge(r),...a.contexts};let c=Et(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=R(),o=P()){return g&&An(t)&&p.log(`Captured error event \`${Ot(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{g&&(So(s)?p.log(s.message):ho(s)?p.warn(s.message):p.warn(s))})}_processEvent(t,n,r,o){let s=this.getOptions(),{sampleRate:i}=s,a=xo(t),c=An(t),f=`before send for type \`${t.type||"error"}\``,l=typeof i>"u"?void 0:He(i);if(c&&typeof l=="number"&&M()>l)return this.recordDroppedEvent("sample_rate","error"),Ce(Rn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));let d=Io(t.type);return this._prepareEvent(t,n,r,o).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",d),Rn("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return m;let S=zi(this,s,m,n);return Zi(S,f)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",d),a){let x=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",x)}throw Rn(`${f} returned \`null\`, will not send event.`)}let h=r.getSession()||o.getSession();if(c&&h&&this._updateSessionFromEvent(h,m),a){let E=m.sdkProcessingMetadata?.spanCountBeforeProcessing||0,x=m.spans?m.spans.length:0,C=E-x;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 So(m)||ho(m)?m:(this.captureException(m,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:m}),Lt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
- Reason: ${m}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===Ze&&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&&p.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){g&&p.log("No outcomes to send");return}if(!this._dsn){g&&p.log("No dsn provided, will not send outcomes");return}g&&p.log("Sending outcomes:",t);let n=lo(t,this._options.tunnel&&D(this._dsn));this.sendEnvelope(n)}};function Io(e){return e==="replay_event"?"replay":e||"error"}function Zi(e,t){let n=`${t} must return \`null\` or a valid event.`;if(H(e))return e.then(r=>{if(!J(r)&&r!==null)throw Lt(n);return r},r=>{throw Lt(`${t} rejected with ${r}`)});if(!J(e)&&e!==null)throw Lt(n);return e}function zi(e,t,n,r){let{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i,ignoreSpans:a}=t,c=n;if(An(c)&&o)return o(c,r);if(xo(c)){if(i||a){let u=fo(c);if(a?.length&&fn(u,a))return null;if(i){let f=i(u);f?c=K(n,mo(f)):ln()}if(c.spans){let f=[],l=c.spans;for(let m of l){if(a?.length&&fn(m,a)){kr(l,m);continue}if(i){let h=i(m);h?f.push(h):(ln(),f.push(m))}else f.push(m)}let d=c.spans.length-f.length;d&&e.recordDroppedEvent("before_send","span",d),c.spans=f}}if(s){if(c.spans){let u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return s(c,r)}}return c}function An(e){return e.type===void 0}function xo(e){return e.type==="transaction"}function Ji(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+No(e.attributes)}function Xi(e){let t=0;return e.message&&(t+=e.message.length*2),t+No(e.attributes)}function No(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*To(n[0]):pt(n)?t+=To(n):t+=100}),t}function To(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function Co(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=D(o)),t&&(s.trace=t);let i=Ki(e);return v(s,[i])}function Ki(e){return[{type:"check_in"},e]}function Ro(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}}}function Ao(e,t){return e(t.stack||"",1)}function Qi(e){return Le(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function qi(e){return Qi(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function vn(e,t){let n={type:t.name||t.constructor.name,value:qi(t)},r=Ao(e,t);return r.length&&(n.stacktrace={frames:r}),n}function ea(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function ta(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=gr(e);if(sr(e))return`Event \`ErrorEvent\` captured as exception with message \`${e.message}\``;let n=na(e);return`${n&&n!=="Object"?`'${n}'`:"Object"} captured as exception with keys: ${t}`}function na(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ra(e,t,n,r){if(Le(n))return[n,void 0];if(t.synthetic=!0,J(n)){let s=e?.getOptions().normalizeDepth,i={__serialized__:mn(n,s)},a=ea(n);if(a)return[a,i];let c=ta(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 vo(e,t,n,r){let s=r?.data&&r.data.mechanism||{handled:!0,type:"generic"},[i,a]=ra(e,s,n,r),c={exception:{values:[vn(t,i)]}};return a&&(c.extra=a),qt(c,void 0,void 0),Ie(c,s),{...c,event_id:r?.event_id}}function Oo(e,t,n="info",r,o){let s={event_id:r?.event_id,level:n};if(o&&r?.syntheticException){let i=Ao(e,r.syntheticException);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]},Ie(s,{synthetic:!0}))}if(Me(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 Je=class extends Mt{constructor(t){Dr(),Ro(t),super(t),this._setUpMetricsProcessing()}eventFromException(t,n){let r=vo(this,this._options.stackParser,t,n);return r.level="error",j(r)}eventFromMessage(t,n="info",r){return j(Oo(this._options.stackParser,t,n,r,this._options.attachStacktrace))}captureException(t,n,r){return Lo(n),super.captureException(t,n,r)}captureEvent(t,n,r){return!t.type&&t.exception?.values&&t.exception.values.length>0&&Lo(n),super.captureEvent(t,n,r)}captureCheckIn(t,n,r){let o="checkInId"in t&&t.checkInId?t.checkInId:T();if(!this._isEnabled())return g&&p.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[f,l]=ro(this,r);l&&(u.contexts={trace:l});let d=Co(u,f,this.getSdkMetadata(),c,this.getDsn());return g&&p.log("Sending checkin:",t.monitorSlug,t.status),this.sendEnvelope(d),o}_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 Lo(e){let t=P().getScopeData().sdkProcessingMetadata.requestSession;if(t){let n=e?.mechanism?.handled??!0;n&&t.status!=="crashed"?t.status="errored":n||(t.status="crashed")}}var oa=new Set(["false","f","n","no","off","0"]),sa=new Set(["true","t","y","yes","on","1"]);function ae(e,t){let n=String(e).toLowerCase();return oa.has(n)?!1:sa.has(n)?!0:t?.strict?null:!!e}function Xe(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:k})),o.version=k)}var ia=100;function On(e,t){let n=I(),r=P();if(!n)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:s=ia}=n.getOptions();if(s<=0)return;let a={timestamp:V(),...e},c=o?b(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}var Mo,aa="FunctionToString",Po=new WeakMap,ca=(()=>({name:aa,setupOnce(){Mo=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=mr(this),n=Po.has(I())&&t!==void 0?t:this;return Mo.apply(n,e)}}catch{}},setup(e){Po.set(e,!0)}})),Ke=ca;var ua=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],pa="EventFilters",Re=(e={})=>{let t;return{name:pa,setup(n){let r=n.getOptions();t=Do(e,r)},processEvent(n,r,o){if(!t){let s=o.getOptions();t=Do(e,s)}return fa(n,t)?null:n}}},la=((e={})=>({...Re(e),name:"InboundFilters"}));function Do(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:ua],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function fa(e,t){if(e.type){if(e.type==="transaction"&&ma(e,t.ignoreTransactions))return g&&p.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
7
+ `),typeof a=="string"||a instanceof Uint8Array)o(a);else{let c;try{c=JSON.stringify(a)}catch{c=JSON.stringify(F(a))}o(c)}}return typeof r=="string"?r:_i(r)}function _i(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 Sn(e){let t=typeof e.data=="string"?gn(e.data):e.data;return[{type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType},t]}var hi={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",raw_security:"security",log:"log_item",metric:"metric",trace_metric:"metric"};function Tt(e){return hi[e]}function yt(e){if(!e?.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function En(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:D(r)},...o&&{trace:o}}}function Ei(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 Gr(e,t,n,r){let o=yt(n),s={sent_at:new Date().toISOString(),...o&&{sdk:o},...!!r&&t&&{dsn:D(t)}},i="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return v(s,[i])}function Hr(e,t,n,r){let o=yt(n),s=e.type&&e.type!=="replay_event"?e.type:"event";Ei(e,n?.sdk);let i=En(e,o,r,t);return delete e.sdkProcessingMetadata,v(i,[[{type:s},e]])}var Wr="__SENTRY_SUPPRESS_TRACING__";function bt(e,t){let n=Yr();return n.withActiveSpan?n.withActiveSpan(e,t):oe(r=>(we(r,e||void 0),t(r)))}function Ne(e){let t=Yr();return t.suppressTracing?t.suppressTracing(e):oe(n=>{n.setSDKProcessingMetadata({[Wr]:!0});let r=e();return n.setSDKProcessingMetadata({[Wr]:void 0}),r})}function Yr(){let e=L();return Q(e)}var In=0,Vr=1,$r=2;function $(e){return new xt(t=>{t(e)})}function Ce(e){return new xt((t,n)=>{n(e)})}var xt=class e{constructor(t){this._state=In,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===In)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Vr&&n[1](this._value),this._state===$r&&n[2](this._value),n[0]=!0)})}_runExecutor(t){let n=(s,i)=>{if(this._state===In){if(H(i)){i.then(r,o);return}this._state=s,this._value=i,this._executeHandlers()}},r=s=>{n(Vr,s)},o=s=>{n($r,s)};try{t(r,o)}catch(s){o(s)}}};function jr(e,t,n,r=0){try{let o=Tn(t,n,e,r);return H(o)?o:$(o)}catch(o){return Ce(o)}}function Tn(e,t,n,r){let o=n[r];if(!e||!o)return e;let s=o({...e},t);return g&&s===null&&p.log(`Event processor "${o.id||"?"}" dropped event`),H(s)?s.then(i=>Tn(i,t,n,r+1)):Tn(s,t,n,r+1)}var ie,Zr,zr,q;function Jr(e){let t=_._sentryDebugIds,n=_._debugIds;if(!t&&!n)return{};let r=t?Object.keys(t):[],o=n?Object.keys(n):[];if(q&&r.length===Zr&&o.length===zr)return q;Zr=r.length,zr=o.length,q={},ie||(ie={});let s=(i,a)=>{for(let c of i){let u=a[c],f=ie?.[c];if(f&&q&&u)q[f[0]]=u,ie&&(ie[c]=[f[0],u]);else if(u){let l=e(c);for(let d=l.length-1;d>=0;d--){let h=l[d]?.filename;if(h&&q&&ie){q[h]=u,ie[c]=[h,u];break}}}}};return t&&s(r,t),n&&s(o,n),q}function Kr(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=t;Ii(e,t),r&&bi(e,r),xi(e,n),Ti(e,o),yi(e,s)}function Xr(e,t){let{extra:n,tags:r,attributes:o,user:s,contexts:i,level:a,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:f,eventProcessors:l,attachments:d,propagationContext:m,transactionName:h,span:S}=t;je(e,"extra",n),je(e,"tags",r),je(e,"attributes",o),je(e,"user",s),je(e,"contexts",i),e.sdkProcessingMetadata=K(e.sdkProcessingMetadata,c,2),a&&(e.level=a),h&&(e.transactionName=h),S&&(e.span=S),u.length&&(e.breadcrumbs=[...e.breadcrumbs,...u]),f.length&&(e.fingerprint=[...e.fingerprint,...f]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...m}}function je(e,t,n){e[t]=K(e[t],n,1)}function Qr(e,t){let n=mt().getScopeData();return e&&Xr(n,e.getScopeData()),t&&Xr(n,t.getScopeData()),n}function Ii(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 Ti(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function yi(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function bi(e,t){e.contexts={trace:St(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:It(t),...e.sdkProcessingMetadata};let n=se(t),r=be(n).description;r&&!e.transaction&&e.type==="transaction"&&(e.transaction=r)}function xi(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 qr(e,t,n,r,o,s){let{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||T(),timestamp:t.timestamp||V()},u=n.integrations||e.integrations.map(x=>x.name);Ni(c,e),Ai(c,u),o&&o.emit("applyFrameMetadata",t),t.type===void 0&&Ci(c,e.stackParser);let f=Oi(r,n.captureContext);n.mechanism&&Ie(c,n.mechanism);let l=o?o.getEventProcessors():[],d=Qr(s,f),m=[...n.attachments||[],...d.attachments];m.length&&(n.attachments=m),Kr(c,d);let h=[...l,...d.eventProcessors];return(n.data&&n.data.__sentry__===!0?$(c):jr(h,c,n)).then(x=>(x&&Ri(x),typeof i=="number"&&i>0?vi(x,i,a):x))}function Ni(e,t){let{environment:n,release:r,dist:o,maxValueLength:s}=t;e.environment=e.environment||n||xe,!e.release&&r&&(e.release=r),!e.dist&&o&&(e.dist=o);let i=e.request;i?.url&&s&&(i.url=Se(i.url,s)),s&&e.exception?.values?.forEach(a=>{a.value&&(a.value=Se(a.value,s))})}function Ci(e,t){let n=Jr(t);e.exception?.values?.forEach(r=>{r.stacktrace?.frames?.forEach(o=>{o.filename&&(o.debug_id=n[o.filename])})})}function Ri(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 Ai(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function vi(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:F(o.data,t,n)}}))},...e.user&&{user:F(e.user,t,n)},...e.contexts&&{contexts:F(e.contexts,t,n)},...e.extra&&{extra:F(e.extra,t,n)}};return e.contexts?.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=F(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>({...o,...o.data&&{data:F(o.data,t,n)}}))),e.contexts?.flags&&r.contexts&&(r.contexts.flags=F(e.contexts.flags,3,n)),r}function Oi(e,t){if(!t)return e;let n=e?e.clone():new A;return n.update(t),n}function eo(e){if(e)return Li(e)?{captureContext:e}:Pi(e)?{captureContext:e}:e}function Li(e){return e instanceof A||typeof e=="function"}var Mi=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function Pi(e){return Object.keys(e).some(t=>Mi.includes(t))}function ee(e,t){return R().captureException(e,eo(t))}function Nt(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return R().captureMessage(e,n,r)}function Ct(e){P().setTags(e)}function Rt(e){P().setUser(e)}var Di="7";function Ui(e){let t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function Fi(e){return`${Ui(e)}${e.projectId}/envelope/`}function ki(e,t){let n={sentry_version:Di};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}function no(e,t,n){return t||`${Fi(e)}?${ki(e,n)}`}var yn=[];function wi(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 bn(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 wi(r)}function ro(e,t){let n={};return t.forEach(r=>{r&&Nn(e,r,n)}),n}function xn(e,t){for(let n of t)n?.afterAllSetup&&n.afterAllSetup(e)}function Nn(e,t,n){if(n[t.name]){g&&p.log(`Integration skipped because it was already installed: ${t.name}`);return}if(n[t.name]=t,!yn.includes(t.name)&&typeof t.setupOnce=="function"&&(t.setupOnce(),yn.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)}g&&p.log(`Integration installed: ${t.name}`)}function oo(e,t){return t?oe(t,()=>{let n=Ye(),r=n?St(n):He(t);return[n?It(n):Et(e,t),r]}):[void 0,void 0]}function Bi(e){return[{type:"log",item_count:e.length,content_type:"application/vnd.sentry.items.log+json"},{items:e}]}function so(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=D(r)),v(o,[Bi(e)])}function Re(e,t){let n=t??Gi(e)??[];if(n.length===0)return;let r=e.getOptions(),o=so(n,r._metadata,r.tunnel,e.getDsn());io().set(e,[]),e.emit("flushLogs"),e.sendEnvelope(o)}function Gi(e){return io().get(e)}function io(){return U("clientToLogBufferMap",()=>new WeakMap)}function Hi(e){return[{type:"trace_metric",item_count:e.length,content_type:"application/vnd.sentry.items.trace-metric+json"},{items:e}]}function ao(e,t,n,r){let o={};return t?.sdk&&(o.sdk={name:t.sdk.name,version:t.sdk.version}),n&&r&&(o.dsn=D(r)),v(o,[Hi(e)])}function co(e,t){let n=t??Wi(e)??[];if(n.length===0)return;let r=e.getOptions(),o=ao(n,r._metadata,r.tunnel,e.getDsn());uo().set(e,[]),e.emit("flushMetrics"),e.sendEnvelope(o)}function Wi(e){return uo().get(e)}function uo(){return U("clientToMetricBufferMap",()=>new WeakMap)}function At(e){return typeof e=="object"&&typeof e.unref=="function"&&e.unref(),e}var Ze=Symbol.for("SentryBufferFullError");function vt(e=100){let t=new Set;function n(){return t.size<e}function r(i){t.delete(i)}function o(i){if(!n())return Ce(Ze);let a=i();return t.add(a),a.then(()=>r(a),()=>r(a)),a}function s(i){if(!t.size)return $(!0);let a=Promise.allSettled(Array.from(t)).then(()=>!0);if(!i)return a;let c=[a,new Promise(u=>At(setTimeout(()=>u(!1),i)))];return Promise.race(c)}return{get $(){return Array.from(t)},add:o,drain:s}}var Yi=60*1e3;function Vi(e,t=he()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?Yi:r-t}function $i(e,t){return e[t]||e.all||0}function po(e,t,n=he()){return $i(e,t)>n}function lo(e,{statusCode:t,headers:n},r=he()){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,,,f]=a.split(":",5),l=parseInt(c,10),d=(isNaN(l)?60:l)*1e3;if(!u)o.all=r+d;else for(let m of u.split(";"))m==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(o[m]=r+d):o[m]=r+d}else i?o.all=r+Vi(i,r):t===429&&(o.all=r+60*1e3);return o}var Cn=64;function ze(e,t,n=vt(e.bufferSize||Cn)){let r={},o=i=>n.drain(i);function s(i){let a=[];if(Ve(i,(l,d)=>{let m=Tt(d);po(r,m)?e.recordDroppedEvent("ratelimit_backoff",m):a.push(l)}),a.length===0)return Promise.resolve({});let c=v(i[0],a),u=l=>{if(hn(c,["client_report"])){g&&p.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);return}Ve(c,(d,m)=>{e.recordDroppedEvent(l,Tt(m))})},f=()=>t({body:$e(c)}).then(l=>l.statusCode===413?(g&&p.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),u("send_error"),l):(g&&l.statusCode!==void 0&&(l.statusCode<200||l.statusCode>=300)&&p.warn(`Sentry responded with status code ${l.statusCode} to sent event.`),r=lo(r,l),l),l=>{throw u("network_error"),g&&p.error("Encountered error running transport request:",l),l});return n.add(f).then(l=>l,l=>{if(l===Ze)return g&&p.error("Skipped sending event because buffer is full."),u("queue_overflow"),Promise.resolve({});throw l})}return{send:s,flush:o}}function fo(e,t,n){let r=[{type:"client_report"},{timestamp:n||V(),discarded_events:e}];return v(t?{dsn:t}:{},[r])}function Ot(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 mo(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?.[cn],exclusive_time:i?.[un],measurements:e.measurements,is_segment:!0}}function go(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&&{[cn]:e.profile_id},...e.exclusive_time&&{[un]:e.exclusive_time}}}},measurements:e.measurements}}var _o="Not capturing exception because it's already been captured.",ho="Discarded session because of missing or non-string release",bo=Symbol.for("SentryInternalError"),xo=Symbol.for("SentryDoNotSendEventError"),ji=5e3;function Lt(e){return{message:e,[bo]:!0}}function Rn(e){return{message:e,[xo]:!0}}function So(e){return!!e&&typeof e=="object"&&bo in e}function Eo(e){return!!e&&typeof e=="object"&&xo in e}function Io(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=At(setTimeout(()=>{o(e)},ji)))}),e.on("flush",()=>{o(e)})}var Mt=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],this._promiseBuffer=vt(t.transportOptions?.bufferSize??Cn),t.dsn?this._dsn=Cr(t.dsn):g&&p.warn("No DSN provided, client will not send events."),this._dsn){let r=no(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&&Io(this,"afterCaptureLog","flushLogs",Xi,Re),(this._options.enableMetrics??this._options._experiments?.enableMetrics??!0)&&Io(this,"afterCaptureMetric","flushMetrics",Ji,co)}captureException(t,n,r){let o=T();if(ft(t))return g&&p.log(_o),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:T(),...r},i=Pe(t)?t:String(t),a=pt(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=T();if(n?.originalException&&ft(n.originalException))return g&&p.log(_o),o;let s={event_id:o,...n},i=t.sdkProcessingMetadata||{},a=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=To(t.type);return this._process(()=>this._captureEvent(t,s,a||r,c),u),s.event_id}captureSession(t){this.sendSession(t),Ue(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(!n)return!0;this.emit("flush");let r=await this._isClientDoneProcessing(t),o=await n.flush(t);return r&&o}async close(t){Re(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];Nn(this,t,this._integrations),n||xn(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=Hr(t,this._dsn,this._options._metadata,this._options.tunnel);for(let o of n.attachments||[])r=_n(r,Sn(o));this.sendEnvelope(r).then(o=>this.emit("afterSendEvent",t,o))}sendSession(t){let{release:n,environment:r=xe}=this._options;if("aggregates"in t){let s=t.attrs||{};if(!s.release&&!n){g&&p.warn(ho);return}s.release=s.release||n,s.environment=s.environment||r,t.attrs=s}else{if(!t.release&&!n){g&&p.warn(ho);return}t.release=t.release||n,t.environment=t.environment||r}this.emit("beforeSendSession",t);let o=Gr(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&&p.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&&p.error("Error while sending envelope:",n),{}}return g&&p.error("Transport disabled"),{}}_setupIntegrations(){let{integrations:t}=this._options;this._integrations=ro(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)&&(Ue(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),qr(s,t,n,r,this,o).then(a=>{if(a===null)return a;this.emit("postprocessEvent",a,n),a.contexts={trace:He(r),...a.contexts};let c=Et(this,r);return a.sdkProcessingMetadata={dynamicSamplingContext:c,...a.sdkProcessingMetadata},a})}_captureEvent(t,n={},r=R(),o=P()){return g&&An(t)&&p.log(`Captured error event \`${Ot(t)[0]||"<unknown>"}\``),this._processEvent(t,n,r,o).then(s=>s.event_id,s=>{g&&(Eo(s)?p.log(s.message):So(s)?p.warn(s.message):p.warn(s))})}_processEvent(t,n,r,o){let s=this.getOptions(),{sampleRate:i}=s,a=No(t),c=An(t),f=`before send for type \`${t.type||"error"}\``,l=typeof i>"u"?void 0:We(i);if(c&&typeof l=="number"&&M()>l)return this.recordDroppedEvent("sample_rate","error"),Ce(Rn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`));let d=To(t.type);return this._prepareEvent(t,n,r,o).then(m=>{if(m===null)throw this.recordDroppedEvent("event_processor",d),Rn("An event processor returned `null`, will not send event.");if(n.data&&n.data.__sentry__===!0)return m;let S=zi(this,s,m,n);return Zi(S,f)}).then(m=>{if(m===null){if(this.recordDroppedEvent("before_send",d),a){let x=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",x)}throw Rn(`${f} returned \`null\`, will not send event.`)}let h=r.getSession()||o.getSession();if(c&&h&&this._updateSessionFromEvent(h,m),a){let E=m.sdkProcessingMetadata?.spanCountBeforeProcessing||0,x=m.spans?m.spans.length:0,C=E-x;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 Eo(m)||So(m)?m:(this.captureException(m,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:m}),Lt(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
8
+ Reason: ${m}`))})}_process(t,n){this._numProcessing++,this._promiseBuffer.add(t).then(r=>(this._numProcessing--,r),r=>(this._numProcessing--,r===Ze&&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&&p.log("Flushing outcomes...");let t=this._clearOutcomes();if(t.length===0){g&&p.log("No outcomes to send");return}if(!this._dsn){g&&p.log("No dsn provided, will not send outcomes");return}g&&p.log("Sending outcomes:",t);let n=fo(t,this._options.tunnel&&D(this._dsn));this.sendEnvelope(n)}};function To(e){return e==="replay_event"?"replay":e||"error"}function Zi(e,t){let n=`${t} must return \`null\` or a valid event.`;if(H(e))return e.then(r=>{if(!J(r)&&r!==null)throw Lt(n);return r},r=>{throw Lt(`${t} rejected with ${r}`)});if(!J(e)&&e!==null)throw Lt(n);return e}function zi(e,t,n,r){let{beforeSend:o,beforeSendTransaction:s,beforeSendSpan:i,ignoreSpans:a}=t,c=n;if(An(c)&&o)return o(c,r);if(No(c)){if(i||a){let u=mo(c);if(a?.length&&fn(u,a))return null;if(i){let f=i(u);f?c=K(n,go(f)):ln()}if(c.spans){let f=[],l=c.spans;for(let m of l){if(a?.length&&fn(m,a)){wr(l,m);continue}if(i){let h=i(m);h?f.push(h):(ln(),f.push(m))}else f.push(m)}let d=c.spans.length-f.length;d&&e.recordDroppedEvent("before_send","span",d),c.spans=f}}if(s){if(c.spans){let u=c.spans.length;c.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:u}}return s(c,r)}}return c}function An(e){return e.type===void 0}function No(e){return e.type==="transaction"}function Ji(e){let t=0;return e.name&&(t+=e.name.length*2),t+=8,t+Co(e.attributes)}function Xi(e){let t=0;return e.message&&(t+=e.message.length*2),t+Co(e.attributes)}function Co(e){if(!e)return 0;let t=0;return Object.values(e).forEach(n=>{Array.isArray(n)?t+=n.length*yo(n[0]):pt(n)?t+=yo(n):t+=100}),t}function yo(e){return typeof e=="string"?e.length*2:typeof e=="number"?8:typeof e=="boolean"?4:0}function Ro(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=D(o)),t&&(s.trace=t);let i=Ki(e);return v(s,[i])}function Ki(e){return[{type:"check_in"},e]}function Ao(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}}}function vo(e,t){return e(t.stack||"",1)}function Qi(e){return Me(e)&&"__sentry_fetch_url_host__"in e&&typeof e.__sentry_fetch_url_host__=="string"}function qi(e){return Qi(e)?`${e.message} (${e.__sentry_fetch_url_host__})`:e.message}function vn(e,t){let n={type:t.name||t.constructor.name,value:qi(t)},r=vo(e,t);return r.length&&(n.stacktrace={frames:r}),n}function ea(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n=e[t];if(n instanceof Error)return n}}function ta(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=gr(e);if(sr(e))return`Event \`ErrorEvent\` captured as exception with message \`${e.message}\``;let n=na(e);return`${n&&n!=="Object"?`'${n}'`:"Object"} captured as exception with keys: ${t}`}function na(e){try{let t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function ra(e,t,n,r){if(Me(n))return[n,void 0];if(t.synthetic=!0,J(n)){let s=e?.getOptions().normalizeDepth,i={__serialized__:mn(n,s)},a=ea(n);if(a)return[a,i];let c=ta(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 Oo(e,t,n,r){let s=r?.data&&r.data.mechanism||{handled:!0,type:"generic"},[i,a]=ra(e,s,n,r),c={exception:{values:[vn(t,i)]}};return a&&(c.extra=a),qt(c,void 0,void 0),Ie(c,s),{...c,event_id:r?.event_id}}function Lo(e,t,n="info",r,o){let s={event_id:r?.event_id,level:n};if(o&&r?.syntheticException){let i=vo(e,r.syntheticException);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]},Ie(s,{synthetic:!0}))}if(Pe(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 Je=class extends Mt{constructor(t){Ur(),Ao(t),super(t),this._setUpMetricsProcessing()}eventFromException(t,n){let r=Oo(this,this._options.stackParser,t,n);return r.level="error",$(r)}eventFromMessage(t,n="info",r){return $(Lo(this._options.stackParser,t,n,r,this._options.attachStacktrace))}captureException(t,n,r){return Mo(n),super.captureException(t,n,r)}captureEvent(t,n,r){return!t.type&&t.exception?.values&&t.exception.values.length>0&&Mo(n),super.captureEvent(t,n,r)}captureCheckIn(t,n,r){let o="checkInId"in t&&t.checkInId?t.checkInId:T();if(!this._isEnabled())return g&&p.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[f,l]=oo(this,r);l&&(u.contexts={trace:l});let d=Ro(u,f,this.getSdkMetadata(),c,this.getDsn());return g&&p.log("Sending checkin:",t.monitorSlug,t.status),this.sendEnvelope(d),o}_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 Mo(e){let t=P().getScopeData().sdkProcessingMetadata.requestSession;if(t){let n=e?.mechanism?.handled??!0;n&&t.status!=="crashed"?t.status="errored":n||(t.status="crashed")}}var oa=new Set(["false","f","n","no","off","0"]),sa=new Set(["true","t","y","yes","on","1"]);function ae(e,t){let n=String(e).toLowerCase();return oa.has(n)?!1:sa.has(n)?!0:t?.strict?null:!!e}function Xe(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:k})),o.version=k)}var ia=100;function On(e,t){let n=I(),r=P();if(!n)return;let{beforeBreadcrumb:o=null,maxBreadcrumbs:s=ia}=n.getOptions();if(s<=0)return;let a={timestamp:V(),...e},c=o?b(()=>o(a,t)):a;c!==null&&(n.emit&&n.emit("beforeAddBreadcrumb",c,t),r.addBreadcrumb(c,s))}var Po,aa="FunctionToString",Do=new WeakMap,ca=(()=>({name:aa,setupOnce(){Po=Function.prototype.toString;try{Function.prototype.toString=function(...e){let t=mr(this),n=Do.has(I())&&t!==void 0?t:this;return Po.apply(n,e)}}catch{}},setup(e){Do.set(e,!0)}})),Ke=ca;var ua=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,`can't redefine non-configurable property "solana"`,"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/,/^Java exception was raised during method invocation$/],pa="EventFilters",Ae=(e={})=>{let t;return{name:pa,setup(n){let r=n.getOptions();t=Uo(e,r)},processEvent(n,r,o){if(!t){let s=o.getOptions();t=Uo(e,s)}return fa(n,t)?null:n}}},la=((e={})=>({...Ae(e),name:"InboundFilters"}));function Uo(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:ua],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]]}}function fa(e,t){if(e.type){if(e.type==="transaction"&&ma(e,t.ignoreTransactions))return g&&p.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.
9
9
  Event: ${X(e)}`),!0}else{if(da(e,t.ignoreErrors))return g&&p.warn(`Event dropped due to being matched by \`ignoreErrors\` option.
10
10
  Event: ${X(e)}`),!0;if(Sa(e))return g&&p.warn(`Event dropped due to not having an error message, error type or stacktrace.
11
11
  Event: ${X(e)}`),!0;if(ga(e,t.denyUrls))return g&&p.warn(`Event dropped due to being matched by \`denyUrls\` option.
12
12
  Event: ${X(e)}.
13
13
  Url: ${Pt(e)}`),!0;if(!_a(e,t.allowUrls))return g&&p.warn(`Event dropped due to not being matched by \`allowUrls\` option.
14
14
  Event: ${X(e)}.
15
- Url: ${Pt(e)}`),!0}return!1}function da(e,t){return t?.length?Ot(e).some(n=>Ee(n,t)):!1}function ma(e,t){if(!t?.length)return!1;let n=e.transaction;return n?Ee(n,t):!1}function ga(e,t){if(!t?.length)return!1;let n=Pt(e);return n?Ee(n,t):!1}function _a(e,t){if(!t?.length)return!0;let n=Pt(e);return n?Ee(n,t):!0}function ha(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 Pt(e){try{let n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?ha(n):null}catch{return g&&p.error(`Cannot extract url for event ${X(e)}`),null}}function Sa(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function ko(e,t,n,r,o,s){if(!o.exception?.values||!s||!W(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=Ln(e,t,r,s.originalException,n,o.exception.values,i,0))}function Ln(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(W(r[o],Error)){Uo(i,a,r);let u=e(t,r[o]),f=c.length;Fo(u,o,f,a),c=Ln(e,t,n,r[o],o,[u,...c],u,f)}return wo(r)&&r.errors.forEach((u,f)=>{if(W(u,Error)){Uo(i,a,r);let l=e(t,u),d=c.length;Fo(l,`errors[${f}]`,d,a),c=Ln(e,t,n,u,o,[l,...c],l,d)}}),c}function wo(e){return Array.isArray(e.errors)}function Uo(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...wo(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function Fo(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}var Ea="cause",Ia=5,Ta="LinkedErrors",ya=((e={})=>{let t=e.limit||Ia,n=e.key||Ea;return{name:Ta,preprocessEvent(r,o,s){let i=s.getOptions();ko(vn,i.stackParser,n,t,r,o)}}}),Qe=ya;function Bo(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 Mn=["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 Go(e){let t={};for(let s of Object.keys(e))t[s.toLowerCase()]=e[s];return Mn.map(s=>{let i=t[s.toLowerCase()],a=Array.isArray(i)?i.join(";"):i;return s==="Forwarded"?ba(a):a?.split(",").map(c=>c.trim())}).reduce((s,i)=>i?s.concat(i):s,[]).find(s=>s!==null&&xa(s))||null}function ba(e){if(!e)return null;for(let t of e.split(";"))if(t.startsWith("for="))return t.slice(4);return null}function xa(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 Na={cookies:!0,data:!0,headers:!0,query_string:!0,url:!0},Ca="RequestData",Ra=((e={})=>{let t={...Na,...e.include};return{name:Ca,processEvent(n,r,o){let{sdkProcessingMetadata:s={}}=n,{normalizedRequest:i,ipAddress:a}=s,c={...t,ip:t.ip??o.getOptions().sendDefaultPii};return i&&Aa(n,i,{ipAddress:a},c),n}}}),qe=Ra;function Aa(e,t,n,r){if(e.request={...e.request,...va(t,r)},r.ip){let o=t.headers&&Go(t.headers)||n.ipAddress;o&&(e.user={...e.user,ip_address:o})}}function va(e,t){let n={},r={...e.headers};if(t.headers&&(n.headers=r,t.cookies||delete r.cookie,t.ip||Mn.forEach(o=>{delete r[o]})),n.method=e.method,t.url&&(n.url=e.url),t.cookies){let o=e.cookies||(r?.cookie?Bo(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 Ho(e){let t="console";fe(t,e),de(t,Oa)}function Oa(){"console"in _&&ve.forEach(function(e){e in _.console&&dr(_.console,e,function(t){return le[e]=t,function(...n){me("console",{args:n,level:e}),le[e]?.apply(_.console,n)}})})}function Wo(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var La=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Ma(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=La.exec(t);return n?n.slice(1):[]}function Pn(e){let t=Ma(e),n=t[0]||"",r=t[1];return!n&&!r?".":(r&&(r=r.slice(0,r.length-1)),n+r)}var Pa="Console",et=(e={})=>{let t=new Set(e.levels||ve);return{name:Pa,setup(n){Ho(({args:r,level:o})=>{I()!==n||!t.has(o)||Da(o,r)})}}};function Da(e,t){let n={category:"console",data:{arguments:t,logger:"console"},level:Wo(e),message:Yo(t)};if(e==="assert")if(t[0]===!1){let r=t.slice(1);n.message=r.length>0?`Assertion failed: ${Yo(r)}`:"Assertion failed",n.data.arguments=r}else return;On(n,{input:t,level:e})}function Yo(e){return"util"in _&&typeof _.util.format=="function"?_.util.format(...e):Xt(e," ")}function $o(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 Zo(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,f,l;if(i[1]){u=i[1];let h=u.lastIndexOf(".");if(u[h-1]==="."&&h--,h>0){a=u.slice(0,h),c=u.slice(h+1);let S=a.indexOf(".Module");S>0&&(u=u.slice(S+1),a=a.slice(0,S))}f=void 0}c&&(f=a,l=c),c==="<anonymous>"&&(l=void 0,u=void 0),u===void 0&&(l=l||"?",u=f?`${f}.${l}`:l);let d=er(i[2]),m=i[5]==="native";return!d&&i[5]&&!m&&(d=i[5]),{filename:d?decodeURI(d):void 0,module:e?e(d):void 0,function:u,lineno:Vo(i[3]),colno:Vo(i[4]),in_app:$o(d||"",m)}}if(o.match(t))return{filename:o}}}function Dn(e){return[90,Zo(e)]}function Vo(e){return parseInt(e||"",10)||void 0}var te=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}};import{threadId as rc,isMainThread as oc}from"worker_threads";var N=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var sc=6e4,Dt=class extends Je{constructor(t){let n=t.includeServerName===!1?void 0:t.serverName||global.process.env.SENTRY_NAME||zo.hostname(),r={...t,platform:"node",runtime:{name:"node",version:global.process.version},serverName:n};Xe(r,"node-light",["node-core"]),p.log(`Initializing Sentry: process: ${process.pid}, thread: ${oc?"main":`worker-${rc}`}.`),super(r),this.getOptions().enableLogs&&(this._logOnExitFlushListener=()=>{$e(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(()=>{N&&p.log("Flushing client reports based on interval."),this._flushOutcomes()},t.clientReportFlushInterval??sc).unref(),process.on("beforeExit",this._clientReportOnExitFlushListener))}};import{execFile as ic}from"node:child_process";import{readFile as ac,readdir as cc}from"node:fs";import*as y from"node:os";import{join as uc}from"node:path";import{promisify as Xo}from"node:util";var pc=Xo(ac),lc=Xo(cc),fc="Context",dc=((e={})=>{let t,n={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0,...e};async function r(s){t===void 0&&(t=o());let i=mc(await t);return s.contexts={...s.contexts,app:{...i.app,...s.contexts?.app},os:{...i.os,...s.contexts?.os},device:{...i.device,...s.contexts?.device},culture:{...i.culture,...s.contexts?.culture},cloud_resource:{...i.cloud_resource,...s.contexts?.cloud_resource}},s}async function o(){let s={};if(n.os&&(s.os=await gc()),n.app&&(s.app=hc()),n.device&&(s.device=Sc(n.device)),n.culture){let i=_c();i&&(s.culture=i)}return n.cloudResource&&(s.cloud_resource=xc()),s}return{name:fc,processEvent(s){return r(s)}}}),Un=dc;function mc(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}async function gc(){let e=y.platform();switch(e){case"darwin":return yc();case"linux":return bc();default:return{name:Ec[e]||e,version:y.release()}}}function _c(){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 hc(){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 Sc(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 Ec={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows",ohos:"OpenHarmony",android:"Android"},Ic=[{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"]}],Tc={alpine:e=>e,arch:e=>w(/distrib_release=(.*)/,e),centos:e=>w(/release ([^ ]+)/,e),debian:e=>e,fedora:e=>w(/release (..)/,e),mint:e=>w(/distrib_release=(.*)/,e),red:e=>w(/release ([^ ]+)/,e),suse:e=>w(/VERSION = (.*)\n/,e),ubuntu:e=>w(/distrib_release=(.*)/,e)};function w(e,t){let n=e.exec(t);return n?n[1]:void 0}async function yc(){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)=>{ic("/usr/bin/sw_vers",(o,s)=>{if(o){r(o);return}n(s)})});e.name=w(/^ProductName:\s+(.*)$/m,t),e.version=w(/^ProductVersion:\s+(.*)$/m,t),e.build=w(/^BuildVersion:\s+(.*)$/m,t)}catch{}return e}function Jo(e){return e.split(" ")[0].toLowerCase()}async function bc(){let e={kernel_version:y.release(),name:"Linux"};try{let t=await lc("/etc"),n=Ic.find(a=>t.includes(a.name));if(!n)return e;let r=uc("/etc",n.name),o=(await pc(r,{encoding:"utf-8"})).toLowerCase(),{distros:s}=n;e.name=s.find(a=>o.indexOf(Jo(a))>=0)||s[0];let i=Jo(e.name);e.version=Tc[i]?.(o)}catch{}return e}function xc(){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 Nc}from"node:fs";import{createInterface as Cc}from"node:readline";var Fn=new te(10),qo=new te(20),Rc=7,Ac="ContextLines",vc=1e3,Oc=1e4;function Lc(e,t,n){let r=e.get(t);return r===void 0?(e.set(t,n),n):r}function Mc(e){return!!(e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:"))}function Pc(e){return e.lineno!==void 0&&e.lineno>Oc||e.colno!==void 0&&e.colno>vc}function Dc(e,t){let n=Fn.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 Uc(e,t){if(!e.length)return[];let n=0,r=e[0];if(typeof r!="number")return[];let o=Qo(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=Qo(i,t)),n++}return s}function Fc(e,t,n){return new Promise((r,o)=>{let s=Nc(e),i=Cc({input:s});function a(){s.destroy(),r()}let c=0,u=0,f=t[u];if(f===void 0){a();return}let l=f[0],d=f[1];function m(h){qo.set(e,1),N&&p.error(`Failed to read file: ${e}. Error: ${h}`),i.close(),i.removeAllListeners(),a()}s.on("error",m),i.on("error",m),i.on("close",a),i.on("line",h=>{if(c++,!(c<l)&&(n[c]=Jt(h,0),c>=d)){if(u===t.length-1){i.close(),i.removeAllListeners();return}u++;let S=t[u];if(S===void 0){i.close(),i.removeAllListeners();return}l=S[0],d=S[1]}})})}async function kc(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"||Mc(c)||Pc(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(qo.get(s))continue;let i=n[s];if(!i)continue;i.sort((u,f)=>u-f);let a=Uc(i,t);if(a.every(u=>Dc(s,u)))continue;let c=Lc(Fn,s,{});o.push(Fc(s,a,c))}if(await Promise.all(o).catch(()=>{N&&p.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&&wc(s.stacktrace.frames,t,Fn);return e}function wc(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;Bc(r.lineno,r,t,o)}}function Ko(e){delete e.pre_context,delete e.context_line,delete e.post_context}function Bc(e,t,n,r){if(t.lineno===void 0||r===void 0){N&&p.error("Cannot resolve context for frame with no lineno or file contents");return}t.pre_context=[];for(let s=es(e,n);s<e;s++){let i=r[s];if(i===void 0){Ko(t),N&&p.error(`Could not find line ${s} in file ${t.filename}`);return}t.pre_context.push(i)}if(r[e]===void 0){Ko(t),N&&p.error(`Could not find line ${e} in file ${t.filename}`);return}t.context_line=r[e];let o=ts(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 es(e,t){return Math.max(1,e-t)}function ts(e,t){return e+t}function Qo(e,t){return[es(e,t),ts(e,t)]}var Gc=((e={})=>{let t=e.frameContextLines!==void 0?e.frameContextLines:Rc;return{name:Ac,processEvent(n){return kc(n,t)}}}),kn=Gc;var Ut=en(process.versions.node),ns=Ut.major,f_=Ut.minor;import{Worker as Hc}from"node:worker_threads";var Ft;async function kt(){if(Ft===void 0)try{Ft=!!(await import("node:inspector")).url()}catch{Ft=!1}return Ft}var tt="__SENTRY_ERROR_LOCAL_VARIABLES__";function os(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 rs(e){return e!==void 0&&(e.length===0||e==="?"||e==="<anonymous>")}function wt(e,t){return e===t||`Object.${e}`===t||e===`Object.${t}`||rs(e)&&rs(t)}var Wc="LyohIEBzZW50cnkvbm9kZS1jb3JlIDEwLjM5LjAgKGFiNTRjNWMpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPWdsb2JhbFRoaXMsaT17fTtjb25zdCBvPSJfX1NFTlRSWV9FUlJPUl9MT0NBTF9WQVJJQUJMRVNfXyI7Y29uc3QgYT10O2Z1bmN0aW9uIHMoLi4uZSl7YS5kZWJ1ZyYmZnVuY3Rpb24oZSl7aWYoISgiY29uc29sZSJpbiBuKSlyZXR1cm4gZSgpO2NvbnN0IHQ9bi5jb25zb2xlLG89e30sYT1PYmplY3Qua2V5cyhpKTthLmZvckVhY2goZT0+e2NvbnN0IG49aVtlXTtvW2VdPXRbZV0sdFtlXT1ufSk7dHJ5e3JldHVybiBlKCl9ZmluYWxseXthLmZvckVhY2goZT0+e3RbZV09b1tlXX0pfX0oKCk9PmNvbnNvbGUubG9nKCJbTG9jYWxWYXJpYWJsZXMgV29ya2VyXSIsLi4uZSkpfWFzeW5jIGZ1bmN0aW9uIGMoZSx0LG4saSl7Y29uc3Qgbz1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pO2lbbl09by5yZXN1bHQuZmlsdGVyKGU9PiJsZW5ndGgiIT09ZS5uYW1lJiYhaXNOYU4ocGFyc2VJbnQoZS5uYW1lLDEwKSkpLnNvcnQoKGUsdCk9PnBhcnNlSW50KGUubmFtZSwxMCktcGFyc2VJbnQodC5uYW1lLDEwKSkubWFwKGU9PmUudmFsdWU/LnZhbHVlKX1hc3luYyBmdW5jdGlvbiByKGUsdCxuLGkpe2NvbnN0IG89YXdhaXQgZS5wb3N0KCJSdW50aW1lLmdldFByb3BlcnRpZXMiLHtvYmplY3RJZDp0LG93blByb3BlcnRpZXM6ITB9KTtpW25dPW8ucmVzdWx0Lm1hcChlPT5bZS5uYW1lLGUudmFsdWU/LnZhbHVlXSkucmVkdWNlKChlLFt0LG5dKT0+KGVbdF09bixlKSx7fSl9ZnVuY3Rpb24gdShlLHQpe2UudmFsdWUmJigidmFsdWUiaW4gZS52YWx1ZT92b2lkIDA9PT1lLnZhbHVlLnZhbHVlfHxudWxsPT09ZS52YWx1ZS52YWx1ZT90W2UubmFtZV09YDwke2UudmFsdWUudmFsdWV9PmA6dFtlLm5hbWVdPWUudmFsdWUudmFsdWU6ImRlc2NyaXB0aW9uImluIGUudmFsdWUmJiJmdW5jdGlvbiIhPT1lLnZhbHVlLnR5cGU/dFtlLm5hbWVdPWA8JHtlLnZhbHVlLmRlc2NyaXB0aW9ufT5gOiJ1bmRlZmluZWQiPT09ZS52YWx1ZS50eXBlJiYodFtlLm5hbWVdPSI8dW5kZWZpbmVkPiIpKX1hc3luYyBmdW5jdGlvbiBsKGUsdCl7Y29uc3Qgbj1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pLGk9e307Zm9yKGNvbnN0IHQgb2Ygbi5yZXN1bHQpaWYodC52YWx1ZT8ub2JqZWN0SWQmJiJBcnJheSI9PT10LnZhbHVlLmNsYXNzTmFtZSl7Y29uc3Qgbj10LnZhbHVlLm9iamVjdElkO2F3YWl0IGMoZSxuLHQubmFtZSxpKX1lbHNlIGlmKHQudmFsdWU/Lm9iamVjdElkJiYiT2JqZWN0Ij09PXQudmFsdWUuY2xhc3NOYW1lKXtjb25zdCBuPXQudmFsdWUub2JqZWN0SWQ7YXdhaXQgcihlLG4sdC5uYW1lLGkpfWVsc2UgdC52YWx1ZSYmdSh0LGkpO3JldHVybiBpfWxldCBmOyhhc3luYyBmdW5jdGlvbigpe2NvbnN0IHQ9bmV3IGU7dC5jb25uZWN0VG9NYWluVGhyZWFkKCkscygiQ29ubmVjdGVkIHRvIG1haW4gdGhyZWFkIik7bGV0IG49ITE7dC5vbigiRGVidWdnZXIucmVzdW1lZCIsKCk9PntuPSExfSksdC5vbigiRGVidWdnZXIucGF1c2VkIixlPT57bj0hMCxhc3luYyBmdW5jdGlvbihlLHtyZWFzb246dCxkYXRhOntvYmplY3RJZDpufSxjYWxsRnJhbWVzOml9KXtpZigiZXhjZXB0aW9uIiE9PXQmJiJwcm9taXNlUmVqZWN0aW9uIiE9PXQpcmV0dXJuO2lmKGY/LigpLG51bGw9PW4pcmV0dXJuO2NvbnN0IGE9W107Zm9yKGxldCB0PTA7dDxpLmxlbmd0aDt0Kyspe2NvbnN0e3Njb3BlQ2hhaW46bixmdW5jdGlvbk5hbWU6byx0aGlzOnN9PWlbdF0sYz1uLmZpbmQoZT0+ImxvY2FsIj09PWUudHlwZSkscj0iZ2xvYmFsIiE9PXMuY2xhc3NOYW1lJiZzLmNsYXNzTmFtZT9gJHtzLmNsYXNzTmFtZX0uJHtvfWA6bztpZih2b2lkIDA9PT1jPy5vYmplY3Qub2JqZWN0SWQpYVt0XT17ZnVuY3Rpb246cn07ZWxzZXtjb25zdCBuPWF3YWl0IGwoZSxjLm9iamVjdC5vYmplY3RJZCk7YVt0XT17ZnVuY3Rpb246cix2YXJzOm59fX1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuY2FsbEZ1bmN0aW9uT24iLHtmdW5jdGlvbkRlY2xhcmF0aW9uOmBmdW5jdGlvbigpIHsgdGhpcy4ke299ID0gdGhpcy4ke299IHx8ICR7SlNPTi5zdHJpbmdpZnkoYSl9OyB9YCxzaWxlbnQ6ITAsb2JqZWN0SWQ6bn0pLGF3YWl0IGUucG9zdCgiUnVudGltZS5yZWxlYXNlT2JqZWN0Iix7b2JqZWN0SWQ6bn0pfSh0LGUucGFyYW1zKS50aGVuKGFzeW5jKCk9PntuJiZhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpfSxhc3luYyBlPT57biYmYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5yZXN1bWUiKX0pfSksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5lbmFibGUiKTtjb25zdCBpPSExIT09YS5jYXB0dXJlQWxsRXhjZXB0aW9ucztpZihhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6aT8iYWxsIjoidW5jYXVnaHQifSksaSl7Y29uc3QgZT1hLm1heEV4Y2VwdGlvbnNQZXJTZWNvbmR8fDUwO2Y9ZnVuY3Rpb24oZSx0LG4pe2xldCBpPTAsbz01LGE9MDtyZXR1cm4gc2V0SW50ZXJ2YWwoKCk9PnswPT09YT9pPmUmJihvKj0yLG4obyksbz44NjQwMCYmKG89ODY0MDApLGE9byk6KGEtPTEsMD09PWEmJnQoKSksaT0wfSwxZTMpLnVucmVmKCksKCk9PntpKz0xfX0oZSxhc3luYygpPT57cygiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9LGFzeW5jIGU9PntzKGBSYXRlLWxpbWl0IGV4Y2VlZGVkLiBEaXNhYmxpbmcgY2FwdHVyaW5nIG9mIGNhdWdodCBleGNlcHRpb25zIGZvciAke2V9IHNlY29uZHMuYCksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJ1bmNhdWdodCJ9KX0pfX0pKCkuY2F0Y2goZT0+e3MoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSxzZXRJbnRlcnZhbCgoKT0+e30sMWU0KTs=";function ss(...e){p.log("[LocalVariables]",...e)}var is=((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,f=i[c],l=a[u];if(!l||!f)break;f.vars===void 0||l.in_app===!1&&e.includeOutOfAppFrames!==!0||!wt(l.function,f.function)||(l.vars=f.vars)}}function n(s,i){if(i.originalException&&typeof i.originalException=="object"&&tt in i.originalException&&Array.isArray(i.originalException[tt])){for(let a of s.exception?.values||[])t(a,i.originalException[tt]);i.originalException[tt]=void 0}return s}async function r(){let s=await import("node:inspector");s.url()||s.open(0)}function o(s){let i=new Hc(new URL(`data:application/javascript;base64,${Wc}`),{workerData:s,execArgv:[],env:{...process.env,NODE_OPTIONS:void 0}});process.on("exit",()=>{i.terminate()}),i.once("error",a=>{ss("Worker error",a)}),i.once("exit",a=>{ss("Worker exit",a)}),i.unref()}return{name:"LocalVariablesAsync",async setup(s){if(!s.getOptions().includeLocalVariables)return;if(await kt()){p.warn("Local variables capture has been disabled because the debugger was already enabled");return}let a={...e,debug:p.isEnabled()};r().then(()=>{try{o(a)}catch(c){p.error("Failed to start worker",c)}},c=>{p.error("Failed to start inspector",c)})},processEvent(s,i){return n(s,i)}}});function as(e){if(e!==void 0)return e.slice(-10).reduce((t,n)=>`${t},${n.function},${n.lineno},${n.colno}`,"")}function Yc(e,t){if(t!==void 0)return as(e(t,1))}function cs(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 wn=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}=cs(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)}},Vc="LocalVariables",jc=((e={},t)=>{let n=new te(20),r,o=!1;function s(u){let f=as(u.stacktrace?.frames);if(f===void 0)return;let l=n.remove(f);if(l===void 0)return;let d=(u.stacktrace?.frames||[]).filter(m=>m.function!=="new Promise");for(let m=0;m<d.length;m++){let h=d.length-m-1,S=l[m],E=d[h];if(!E||!S)break;S.vars===void 0||E.in_app===!1&&e.includeOutOfAppFrames!==!0||!wt(E.function,S.function)||(E.vars=S.vars)}}function i(u){for(let f of u.exception?.values||[])s(f);return u}let a;async function c(){let f=I()?.getOptions();if(!f?.includeLocalVariables)return;if(ns<18){p.log("The `LocalVariables` integration is only supported on Node >= v18.");return}if(await kt()){p.warn("Local variables capture has been disabled because the debugger was already enabled");return}try{let d=await wn.create(t),m=(S,{params:{reason:E,data:x,callFrames:C}},G)=>{if(E!=="exception"&&E!=="promiseRejection"){G();return}r?.();let ce=Yc(S,x.description);if(ce==null){G();return}let{add:ue,next:ne}=cs(O=>{n.set(ce,O),G()});for(let O=0;O<Math.min(C.length,5);O++){let{scopeChain:bs,functionName:$n,this:Ht}=C[O],Zn=bs.find(pe=>pe.type==="local"),zn=Ht.className==="global"||!Ht.className?$n:`${Ht.className}.${$n}`;if(Zn?.object.objectId===void 0)ue(pe=>{pe[O]={function:zn},ne(pe)});else{let pe=Zn.object.objectId;ue(Jn=>d.getLocalVariables(pe,xs=>{Jn[O]={function:zn,vars:xs},ne(Jn)}))}}ne([])},h=e.captureAllExceptions!==!1;if(d.configureAndConnect((S,E)=>m(f.stackParser,S,E),h),h){let S=e.maxExceptionsPerSecond||50;r=os(S,()=>{p.log("Local variables rate-limit lifted."),d.setPauseOnExceptions(!0)},E=>{p.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${E} seconds.`),d.setPauseOnExceptions(!1)})}o=!0}catch(d){p.log("The `LocalVariables` integration failed to start.",d)}}return{name:Vc,setupOnce(){a=c()},async processEvent(u){return await a,o?i(u):u},_getCachedFramesCount(){return n.size},_getFirstCachedFrame(){return n.values()[0]}}}),us=jc;var Bn=(e={})=>Ut.major<19?us(e):is(e);function ps(){try{return typeof module<"u"&&typeof module.exports<"u"}catch{return!1}}import{isMainThread as Zc}from"worker_threads";var $c=2e3;function nt(e){b(()=>{console.error(e)});let t=I();if(t===void 0){N&&p.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:$c;t.close(r).then(o=>{o||N&&p.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},o=>{N&&p.error(o)})}var zc="OnUncaughtException",Gn=(e={})=>{let t={exitEvenIfOtherHandlersAreRegistered:!1,...e};return{name:zc,setup(n){Zc&&global.process.on("uncaughtException",Jc(n,t))}}};function Jc(e,t){let r=!1,o=!1,s=!1,i,a=e.getOptions();return Object.assign(c=>{let u=nt;t.onFatalError?u=t.onFatalError:a.onFatalError&&(u=a.onFatalError);let l=global.process.listeners("uncaughtException").filter(m=>m.name!=="domainUncaughtExceptionClear"&&m.tag!=="sentry_tracingErrorCallback"&&m._errorHandler!==!0).length===0,d=t.exitEvenIfOtherHandlersAreRegistered||l;r?d&&(s?(N&&p.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),nt(c)):o||(o=!0,setTimeout(()=>{s||(s=!0,u(i,c))},2e3))):(i=c,r=!0,I()===e&&ee(c,{originalException:c,captureContext:{level:"fatal"},mechanism:{handled:!1,type:"auto.node.onuncaughtexception"}}),!s&&d&&(s=!0,u(c)))},{_errorHandler:!0})}var Xc="OnUnhandledRejection",Kc=[{name:"AI_NoOutputGeneratedError"},{name:"AbortError"}],Qc=((e={})=>{let t={mode:e.mode??"warn",ignore:[...Kc,...e.ignore??[]]};return{name:Xc,setup(n){global.process.on("unhandledRejection",nu(n,t))}}}),Hn=Qc;function qc(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 eu(e,t){let n=e.name===void 0||Y(t.name,e.name,!0),r=e.message===void 0||Y(t.message,e.message);return n&&r}function tu(e,t){let n=qc(t);return e.some(r=>eu(r,n))}function nu(e,t){return function(r,o){if(I()!==e||tu(t.ignore??[],r))return;let s=t.mode==="strict"?"fatal":"error",i=r&&typeof r=="object"?r._sentry_active_span:void 0;(i?c=>bt(i,c):c=>c())(()=>{ee(r,{originalException:o,captureContext:{extra:{unhandledPromiseRejection:!0},level:s},mechanism:{handled:!1,type:"auto.node.onunhandledrejection"}})}),ru(r,t.mode)}}function ru(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"?b(()=>{console.warn(n),console.error(e&&typeof e=="object"&&"stack"in e?e.stack:e)}):t==="strict"&&(b(()=>{console.warn(n)}),nt(e))}import*as ls from"node:http";var Wn="Spotlight",ou=((e={})=>{let t={sidecarUrl:e.sidecarUrl||"http://localhost:8969/stream"};return{name:Wn,setup(n){try{process.env.NODE_ENV&&process.env.NODE_ENV!=="development"&&p.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?")}catch{}su(n,t)}}}),fs=ou;function su(e,t){let n=iu(t.sidecarUrl);if(!n)return;let r=0;e.on("beforeEnvelope",o=>{if(r>3){p.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests");return}let s=Ve(o);Ne(()=>{let i=ls.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++,p.warn("[Spotlight] Failed to send envelope to Spotlight Sidecar")}),i.write(s),i.end()})})}function iu(e){try{return new URL(`${e}`)}catch{p.warn(`[Spotlight] Invalid sidecar URL: ${e}`);return}}import{posix as au,sep as cu}from"node:path";function ds(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function ms(e=process.argv[1]?Pn(process.argv[1]):process.cwd(),t=cu==="\\"){let n=t?ds(e):e;return r=>{if(!r)return;let o=t?ds(r):r,{dir:s,base:i,ext:a}=au.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 f=s.slice(n.length+1).replace(/\//g,".");return f?`${f}:${c}`:c}return c}}function gs(e){if(process.env.SENTRY_RELEASE)return process.env.SENTRY_RELEASE;if(_.SENTRY_RELEASE?.id)return _.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_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 _s=it(Dn(ms()));import*as pu from"node:http";import*as lu from"node:https";import{Readable as fu}from"node:stream";import{createGzip as du}from"node:zlib";import*as $ from"node:net";import*as Vn from"node:tls";import*as Yn from"node:http";var B=Symbol("AgentBaseInternalState"),Bt=class extends Yn.Agent{constructor(t){super(t),this[B]={}}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
- `).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 Yn.Agent)return s.addRequest(t,o);this[B].currentSocket=s,super.createSocket(t,n,r)},r)}createConnection(){let t=this[B].currentSocket;if(this[B].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[B].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){this[B]&&(this[B].defaultPort=t)}get protocol(){return this[B].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[B]&&(this[B].protocol=t)}};function Gt(...e){p.log("[https-proxy-agent:parse-proxy-response]",...e)}function hs(e){return new Promise((t,n)=>{let r=0,o=[];function s(){let f=e.read();f?u(f):e.once("readable",s)}function i(){e.removeListener("end",a),e.removeListener("error",c),e.removeListener("readable",s)}function a(){i(),Gt("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function c(f){i(),Gt("onerror %o",f),n(f)}function u(f){o.push(f),r+=f.length;let l=Buffer.concat(o,r),d=l.indexOf(`\r
15
+ Url: ${Pt(e)}`),!0}return!1}function da(e,t){return t?.length?Ot(e).some(n=>Ee(n,t)):!1}function ma(e,t){if(!t?.length)return!1;let n=e.transaction;return n?Ee(n,t):!1}function ga(e,t){if(!t?.length)return!1;let n=Pt(e);return n?Ee(n,t):!1}function _a(e,t){if(!t?.length)return!0;let n=Pt(e);return n?Ee(n,t):!0}function ha(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 Pt(e){try{let n=[...e.exception?.values??[]].reverse().find(r=>r.mechanism?.parent_id===void 0&&r.stacktrace?.frames?.length)?.stacktrace?.frames;return n?ha(n):null}catch{return g&&p.error(`Cannot extract url for event ${X(e)}`),null}}function Sa(e){return e.exception?.values?.length?!e.message&&!e.exception.values.some(t=>t.stacktrace||t.type&&t.type!=="Error"||t.value):!1}function wo(e,t,n,r,o,s){if(!o.exception?.values||!s||!W(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=Ln(e,t,r,s.originalException,n,o.exception.values,i,0))}function Ln(e,t,n,r,o,s,i,a){if(s.length>=n+1)return s;let c=[...s];if(W(r[o],Error)){Fo(i,a,r);let u=e(t,r[o]),f=c.length;ko(u,o,f,a),c=Ln(e,t,n,r[o],o,[u,...c],u,f)}return Bo(r)&&r.errors.forEach((u,f)=>{if(W(u,Error)){Fo(i,a,r);let l=e(t,u),d=c.length;ko(l,`errors[${f}]`,d,a),c=Ln(e,t,n,u,o,[l,...c],l,d)}}),c}function Bo(e){return Array.isArray(e.errors)}function Fo(e,t,n){e.mechanism={handled:!0,type:"auto.core.linked_errors",...Bo(n)&&{is_exception_group:!0},...e.mechanism,exception_id:t}}function ko(e,t,n,r){e.mechanism={handled:!0,...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}var Ea="cause",Ia=5,Ta="LinkedErrors",ya=((e={})=>{let t=e.limit||Ia,n=e.key||Ea;return{name:Ta,preprocessEvent(r,o,s){let i=s.getOptions();wo(vn,i.stackParser,n,t,r,o)}}}),Qe=ya;function Go(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 Mn=["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 Ho(e){let t={};for(let s of Object.keys(e))t[s.toLowerCase()]=e[s];return Mn.map(s=>{let i=t[s.toLowerCase()],a=Array.isArray(i)?i.join(";"):i;return s==="Forwarded"?ba(a):a?.split(",").map(c=>c.trim())}).reduce((s,i)=>i?s.concat(i):s,[]).find(s=>s!==null&&xa(s))||null}function ba(e){if(!e)return null;for(let t of e.split(";"))if(t.startsWith("for="))return t.slice(4);return null}function xa(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 Na={cookies:!0,data:!0,headers:!0,query_string:!0,url:!0},Ca="RequestData",Ra=((e={})=>{let t={...Na,...e.include};return{name:Ca,processEvent(n,r,o){let{sdkProcessingMetadata:s={}}=n,{normalizedRequest:i,ipAddress:a}=s,c={...t,ip:t.ip??o.getOptions().sendDefaultPii};return i&&Aa(n,i,{ipAddress:a},c),n}}}),qe=Ra;function Aa(e,t,n,r){if(e.request={...e.request,...va(t,r)},r.ip){let o=t.headers&&Ho(t.headers)||n.ipAddress;o&&(e.user={...e.user,ip_address:o})}}function va(e,t){let n={},r={...e.headers};if(t.headers&&(n.headers=r,t.cookies||delete r.cookie,t.ip||Mn.forEach(o=>{delete r[o]})),n.method=e.method,t.url&&(n.url=e.url),t.cookies){let o=e.cookies||(r?.cookie?Go(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 Wo(e){let t="console";fe(t,e),de(t,Oa)}function Oa(){"console"in _&&Oe.forEach(function(e){e in _.console&&dr(_.console,e,function(t){return le[e]=t,function(...n){me("console",{args:n,level:e}),le[e]?.apply(_.console,n)}})})}function Yo(e){return e==="warn"?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}var La=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Ma(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=La.exec(t);return n?n.slice(1):[]}function Pn(e){let t=Ma(e),n=t[0]||"",r=t[1];return!n&&!r?".":(r&&(r=r.slice(0,r.length-1)),n+r)}var Pa="Console",et=(e={})=>{let t=new Set(e.levels||Oe);return{name:Pa,setup(n){Wo(({args:r,level:o})=>{I()!==n||!t.has(o)||Da(o,r)})}}};function Da(e,t){let n={category:"console",data:{arguments:t,logger:"console"},level:Yo(e),message:Vo(t)};if(e==="assert")if(t[0]===!1){let r=t.slice(1);n.message=r.length>0?`Assertion failed: ${Vo(r)}`:"Assertion failed",n.data.arguments=r}else return;On(n,{input:t,level:e})}function Vo(e){return"util"in _&&typeof _.util.format=="function"?_.util.format(...e):Xt(e," ")}function Zo(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 zo(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,f,l;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))}f=void 0}c&&(f=a,l=c),c==="<anonymous>"&&(l=void 0,u=void 0),u===void 0&&(l=l||"?",u=f?`${f}.${l}`:l);let d=er(i[2]),m=i[5]==="native";!d&&i[5]&&!m&&(d=i[5]);let h=d?Ua(d):void 0;return{filename:h??d,module:h&&e?.(h),function:u,lineno:$o(i[3]),colno:$o(i[4]),in_app:Zo(d||"",m)}}if(o.match(t))return{filename:o}}}function Dn(e){return[90,zo(e)]}function $o(e){return parseInt(e||"",10)||void 0}function Ua(e){try{return decodeURI(e)}catch{return}}var te=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}};import{threadId as oc,isMainThread as sc}from"worker_threads";var N=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var ic=6e4,Dt=class extends Je{constructor(t){let n=t.includeServerName===!1?void 0:t.serverName||global.process.env.SENTRY_NAME||Jo.hostname(),r={...t,platform:"node",runtime:{name:"node",version:global.process.version},serverName:n};Xe(r,"node-light",["node-core"]),p.log(`Initializing Sentry: process: ${process.pid}, thread: ${sc?"main":`worker-${oc}`}.`),super(r),this.getOptions().enableLogs&&(this._logOnExitFlushListener=()=>{Re(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(()=>{N&&p.log("Flushing client reports based on interval."),this._flushOutcomes()},t.clientReportFlushInterval??ic).unref(),process.on("beforeExit",this._clientReportOnExitFlushListener))}};import{execFile as ac}from"node:child_process";import{readFile as cc,readdir as uc}from"node:fs";import*as y from"node:os";import{join as pc}from"node:path";import{promisify as Ko}from"node:util";var lc=Ko(cc),fc=Ko(uc),dc="Context",mc=((e={})=>{let t,n={app:!0,os:!0,device:!0,culture:!0,cloudResource:!0,...e};async function r(s){t===void 0&&(t=o());let i=gc(await t);return s.contexts={...s.contexts,app:{...i.app,...s.contexts?.app},os:{...i.os,...s.contexts?.os},device:{...i.device,...s.contexts?.device},culture:{...i.culture,...s.contexts?.culture},cloud_resource:{...i.cloud_resource,...s.contexts?.cloud_resource}},s}async function o(){let s={};if(n.os&&(s.os=await _c()),n.app&&(s.app=Sc()),n.device&&(s.device=Ec(n.device)),n.culture){let i=hc();i&&(s.culture=i)}return n.cloudResource&&(s.cloud_resource=Nc()),s}return{name:dc,processEvent(s){return r(s)}}}),Un=mc;function gc(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}async function _c(){let e=y.platform();switch(e){case"darwin":return bc();case"linux":return xc();default:return{name:Ic[e]||e,version:y.release()}}}function hc(){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 Sc(){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 Ec(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 Ic={aix:"IBM AIX",freebsd:"FreeBSD",openbsd:"OpenBSD",sunos:"SunOS",win32:"Windows",ohos:"OpenHarmony",android:"Android"},Tc=[{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"]}],yc={alpine:e=>e,arch:e=>w(/distrib_release=(.*)/,e),centos:e=>w(/release ([^ ]+)/,e),debian:e=>e,fedora:e=>w(/release (..)/,e),mint:e=>w(/distrib_release=(.*)/,e),red:e=>w(/release ([^ ]+)/,e),suse:e=>w(/VERSION = (.*)\n/,e),ubuntu:e=>w(/distrib_release=(.*)/,e)};function w(e,t){let n=e.exec(t);return n?n[1]:void 0}async function bc(){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)=>{ac("/usr/bin/sw_vers",(o,s)=>{if(o){r(o);return}n(s)})});e.name=w(/^ProductName:\s+(.*)$/m,t),e.version=w(/^ProductVersion:\s+(.*)$/m,t),e.build=w(/^BuildVersion:\s+(.*)$/m,t)}catch{}return e}function Xo(e){return e.split(" ")[0].toLowerCase()}async function xc(){let e={kernel_version:y.release(),name:"Linux"};try{let t=await fc("/etc"),n=Tc.find(a=>t.includes(a.name));if(!n)return e;let r=pc("/etc",n.name),o=(await lc(r,{encoding:"utf-8"})).toLowerCase(),{distros:s}=n;e.name=s.find(a=>o.indexOf(Xo(a))>=0)||s[0];let i=Xo(e.name);e.version=yc[i]?.(o)}catch{}return e}function Nc(){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 Cc}from"node:fs";import{createInterface as Rc}from"node:readline";var Fn=new te(10),es=new te(20),Ac=7,vc="ContextLines",Oc=1e3,Lc=1e4;function Mc(e,t,n){let r=e.get(t);return r===void 0?(e.set(t,n),n):r}function Pc(e){return!!(e.startsWith("node:")||e.endsWith(".min.js")||e.endsWith(".min.cjs")||e.endsWith(".min.mjs")||e.startsWith("data:"))}function Dc(e){return e.lineno!==void 0&&e.lineno>Lc||e.colno!==void 0&&e.colno>Oc}function Uc(e,t){let n=Fn.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 Fc(e,t){if(!e.length)return[];let n=0,r=e[0];if(typeof r!="number")return[];let o=qo(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=qo(i,t)),n++}return s}function kc(e,t,n){return new Promise((r,o)=>{let s=Cc(e),i=Rc({input:s});function a(){s.destroy(),r()}let c=0,u=0,f=t[u];if(f===void 0){a();return}let l=f[0],d=f[1];function m(h){es.set(e,1),N&&p.error(`Failed to read file: ${e}. Error: ${h}`),i.close(),i.removeAllListeners(),a()}s.on("error",m),i.on("error",m),i.on("close",a),i.on("line",h=>{if(c++,!(c<l)&&(n[c]=Jt(h,0),c>=d)){if(u===t.length-1){i.close(),i.removeAllListeners();return}u++;let S=t[u];if(S===void 0){i.close(),i.removeAllListeners();return}l=S[0],d=S[1]}})})}async function wc(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"||Pc(c)||Dc(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(es.get(s))continue;let i=n[s];if(!i)continue;i.sort((u,f)=>u-f);let a=Fc(i,t);if(a.every(u=>Uc(s,u)))continue;let c=Mc(Fn,s,{});o.push(kc(s,a,c))}if(await Promise.all(o).catch(()=>{N&&p.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&&Bc(s.stacktrace.frames,t,Fn);return e}function Bc(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;Gc(r.lineno,r,t,o)}}function Qo(e){delete e.pre_context,delete e.context_line,delete e.post_context}function Gc(e,t,n,r){if(t.lineno===void 0||r===void 0){N&&p.error("Cannot resolve context for frame with no lineno or file contents");return}t.pre_context=[];for(let s=ts(e,n);s<e;s++){let i=r[s];if(i===void 0){Qo(t),N&&p.error(`Could not find line ${s} in file ${t.filename}`);return}t.pre_context.push(i)}if(r[e]===void 0){Qo(t),N&&p.error(`Could not find line ${e} in file ${t.filename}`);return}t.context_line=r[e];let o=ns(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 ts(e,t){return Math.max(1,e-t)}function ns(e,t){return e+t}function qo(e,t){return[ts(e,t),ns(e,t)]}var Hc=((e={})=>{let t=e.frameContextLines!==void 0?e.frameContextLines:Ac;return{name:vc,processEvent(n){return wc(n,t)}}}),kn=Hc;var Ut=en(process.versions.node),rs=Ut.major,d_=Ut.minor;import{Worker as Wc}from"node:worker_threads";var Ft;async function kt(){if(Ft===void 0)try{Ft=!!(await import("node:inspector")).url()}catch{Ft=!1}return Ft}var tt="__SENTRY_ERROR_LOCAL_VARIABLES__";function ss(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 os(e){return e!==void 0&&(e.length===0||e==="?"||e==="<anonymous>")}function wt(e,t){return e===t||`Object.${e}`===t||e===`Object.${t}`||os(e)&&os(t)}var Yc="LyohIEBzZW50cnkvbm9kZS1jb3JlIDEwLjQwLjAgKDY2M2ZkNWUpIHwgaHR0cHM6Ly9naXRodWIuY29tL2dldHNlbnRyeS9zZW50cnktamF2YXNjcmlwdCAqLwppbXBvcnR7U2Vzc2lvbiBhcyBlfWZyb20ibm9kZTppbnNwZWN0b3IvcHJvbWlzZXMiO2ltcG9ydHt3b3JrZXJEYXRhIGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtjb25zdCBuPWdsb2JhbFRoaXMsaT17fTtjb25zdCBvPSJfX1NFTlRSWV9FUlJPUl9MT0NBTF9WQVJJQUJMRVNfXyI7Y29uc3QgYT10O2Z1bmN0aW9uIHMoLi4uZSl7YS5kZWJ1ZyYmZnVuY3Rpb24oZSl7aWYoISgiY29uc29sZSJpbiBuKSlyZXR1cm4gZSgpO2NvbnN0IHQ9bi5jb25zb2xlLG89e30sYT1PYmplY3Qua2V5cyhpKTthLmZvckVhY2goZT0+e2NvbnN0IG49aVtlXTtvW2VdPXRbZV0sdFtlXT1ufSk7dHJ5e3JldHVybiBlKCl9ZmluYWxseXthLmZvckVhY2goZT0+e3RbZV09b1tlXX0pfX0oKCk9PmNvbnNvbGUubG9nKCJbTG9jYWxWYXJpYWJsZXMgV29ya2VyXSIsLi4uZSkpfWFzeW5jIGZ1bmN0aW9uIGMoZSx0LG4saSl7Y29uc3Qgbz1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pO2lbbl09by5yZXN1bHQuZmlsdGVyKGU9PiJsZW5ndGgiIT09ZS5uYW1lJiYhaXNOYU4ocGFyc2VJbnQoZS5uYW1lLDEwKSkpLnNvcnQoKGUsdCk9PnBhcnNlSW50KGUubmFtZSwxMCktcGFyc2VJbnQodC5uYW1lLDEwKSkubWFwKGU9PmUudmFsdWU/LnZhbHVlKX1hc3luYyBmdW5jdGlvbiByKGUsdCxuLGkpe2NvbnN0IG89YXdhaXQgZS5wb3N0KCJSdW50aW1lLmdldFByb3BlcnRpZXMiLHtvYmplY3RJZDp0LG93blByb3BlcnRpZXM6ITB9KTtpW25dPW8ucmVzdWx0Lm1hcChlPT5bZS5uYW1lLGUudmFsdWU/LnZhbHVlXSkucmVkdWNlKChlLFt0LG5dKT0+KGVbdF09bixlKSx7fSl9ZnVuY3Rpb24gdShlLHQpe2UudmFsdWUmJigidmFsdWUiaW4gZS52YWx1ZT92b2lkIDA9PT1lLnZhbHVlLnZhbHVlfHxudWxsPT09ZS52YWx1ZS52YWx1ZT90W2UubmFtZV09YDwke2UudmFsdWUudmFsdWV9PmA6dFtlLm5hbWVdPWUudmFsdWUudmFsdWU6ImRlc2NyaXB0aW9uImluIGUudmFsdWUmJiJmdW5jdGlvbiIhPT1lLnZhbHVlLnR5cGU/dFtlLm5hbWVdPWA8JHtlLnZhbHVlLmRlc2NyaXB0aW9ufT5gOiJ1bmRlZmluZWQiPT09ZS52YWx1ZS50eXBlJiYodFtlLm5hbWVdPSI8dW5kZWZpbmVkPiIpKX1hc3luYyBmdW5jdGlvbiBsKGUsdCl7Y29uc3Qgbj1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuZ2V0UHJvcGVydGllcyIse29iamVjdElkOnQsb3duUHJvcGVydGllczohMH0pLGk9e307Zm9yKGNvbnN0IHQgb2Ygbi5yZXN1bHQpaWYodC52YWx1ZT8ub2JqZWN0SWQmJiJBcnJheSI9PT10LnZhbHVlLmNsYXNzTmFtZSl7Y29uc3Qgbj10LnZhbHVlLm9iamVjdElkO2F3YWl0IGMoZSxuLHQubmFtZSxpKX1lbHNlIGlmKHQudmFsdWU/Lm9iamVjdElkJiYiT2JqZWN0Ij09PXQudmFsdWUuY2xhc3NOYW1lKXtjb25zdCBuPXQudmFsdWUub2JqZWN0SWQ7YXdhaXQgcihlLG4sdC5uYW1lLGkpfWVsc2UgdC52YWx1ZSYmdSh0LGkpO3JldHVybiBpfWxldCBmOyhhc3luYyBmdW5jdGlvbigpe2NvbnN0IHQ9bmV3IGU7dC5jb25uZWN0VG9NYWluVGhyZWFkKCkscygiQ29ubmVjdGVkIHRvIG1haW4gdGhyZWFkIik7bGV0IG49ITE7dC5vbigiRGVidWdnZXIucmVzdW1lZCIsKCk9PntuPSExfSksdC5vbigiRGVidWdnZXIucGF1c2VkIixlPT57bj0hMCxhc3luYyBmdW5jdGlvbihlLHtyZWFzb246dCxkYXRhOntvYmplY3RJZDpufSxjYWxsRnJhbWVzOml9KXtpZigiZXhjZXB0aW9uIiE9PXQmJiJwcm9taXNlUmVqZWN0aW9uIiE9PXQpcmV0dXJuO2lmKGY/LigpLG51bGw9PW4pcmV0dXJuO2NvbnN0IGE9W107Zm9yKGxldCB0PTA7dDxpLmxlbmd0aDt0Kyspe2NvbnN0e3Njb3BlQ2hhaW46bixmdW5jdGlvbk5hbWU6byx0aGlzOnN9PWlbdF0sYz1uLmZpbmQoZT0+ImxvY2FsIj09PWUudHlwZSkscj0iZ2xvYmFsIiE9PXMuY2xhc3NOYW1lJiZzLmNsYXNzTmFtZT9gJHtzLmNsYXNzTmFtZX0uJHtvfWA6bztpZih2b2lkIDA9PT1jPy5vYmplY3Qub2JqZWN0SWQpYVt0XT17ZnVuY3Rpb246cn07ZWxzZXtjb25zdCBuPWF3YWl0IGwoZSxjLm9iamVjdC5vYmplY3RJZCk7YVt0XT17ZnVuY3Rpb246cix2YXJzOm59fX1hd2FpdCBlLnBvc3QoIlJ1bnRpbWUuY2FsbEZ1bmN0aW9uT24iLHtmdW5jdGlvbkRlY2xhcmF0aW9uOmBmdW5jdGlvbigpIHsgdGhpcy4ke299ID0gdGhpcy4ke299IHx8ICR7SlNPTi5zdHJpbmdpZnkoYSl9OyB9YCxzaWxlbnQ6ITAsb2JqZWN0SWQ6bn0pLGF3YWl0IGUucG9zdCgiUnVudGltZS5yZWxlYXNlT2JqZWN0Iix7b2JqZWN0SWQ6bn0pfSh0LGUucGFyYW1zKS50aGVuKGFzeW5jKCk9PntuJiZhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnJlc3VtZSIpfSxhc3luYyBlPT57biYmYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5yZXN1bWUiKX0pfSksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5lbmFibGUiKTtjb25zdCBpPSExIT09YS5jYXB0dXJlQWxsRXhjZXB0aW9ucztpZihhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6aT8iYWxsIjoidW5jYXVnaHQifSksaSl7Y29uc3QgZT1hLm1heEV4Y2VwdGlvbnNQZXJTZWNvbmR8fDUwO2Y9ZnVuY3Rpb24oZSx0LG4pe2xldCBpPTAsbz01LGE9MDtyZXR1cm4gc2V0SW50ZXJ2YWwoKCk9PnswPT09YT9pPmUmJihvKj0yLG4obyksbz44NjQwMCYmKG89ODY0MDApLGE9byk6KGEtPTEsMD09PWEmJnQoKSksaT0wfSwxZTMpLnVucmVmKCksKCk9PntpKz0xfX0oZSxhc3luYygpPT57cygiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9LGFzeW5jIGU9PntzKGBSYXRlLWxpbWl0IGV4Y2VlZGVkLiBEaXNhYmxpbmcgY2FwdHVyaW5nIG9mIGNhdWdodCBleGNlcHRpb25zIGZvciAke2V9IHNlY29uZHMuYCksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJ1bmNhdWdodCJ9KX0pfX0pKCkuY2F0Y2goZT0+e3MoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSxzZXRJbnRlcnZhbCgoKT0+e30sMWU0KTs=";function is(...e){p.log("[LocalVariables]",...e)}var as=((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,f=i[c],l=a[u];if(!l||!f)break;f.vars===void 0||l.in_app===!1&&e.includeOutOfAppFrames!==!0||!wt(l.function,f.function)||(l.vars=f.vars)}}function n(s,i){if(i.originalException&&typeof i.originalException=="object"&&tt in i.originalException&&Array.isArray(i.originalException[tt])){for(let a of s.exception?.values||[])t(a,i.originalException[tt]);i.originalException[tt]=void 0}return s}async function r(){let s=await import("node:inspector");s.url()||s.open(0)}function o(s){let i=new Wc(new URL(`data:application/javascript;base64,${Yc}`),{workerData:s,execArgv:[],env:{...process.env,NODE_OPTIONS:void 0}});process.on("exit",()=>{i.terminate()}),i.once("error",a=>{is("Worker error",a)}),i.once("exit",a=>{is("Worker exit",a)}),i.unref()}return{name:"LocalVariablesAsync",async setup(s){if(!s.getOptions().includeLocalVariables)return;if(await kt()){p.warn("Local variables capture has been disabled because the debugger was already enabled");return}let a={...e,debug:p.isEnabled()};r().then(()=>{try{o(a)}catch(c){p.error("Failed to start worker",c)}},c=>{p.error("Failed to start inspector",c)})},processEvent(s,i){return n(s,i)}}});function cs(e){if(e!==void 0)return e.slice(-10).reduce((t,n)=>`${t},${n.function},${n.lineno},${n.colno}`,"")}function Vc(e,t){if(t!==void 0)return cs(e(t,1))}function us(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 wn=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}=us(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)}},$c="LocalVariables",jc=((e={},t)=>{let n=new te(20),r,o=!1;function s(u){let f=cs(u.stacktrace?.frames);if(f===void 0)return;let l=n.remove(f);if(l===void 0)return;let d=(u.stacktrace?.frames||[]).filter(m=>m.function!=="new Promise");for(let m=0;m<d.length;m++){let h=d.length-m-1,S=l[m],E=d[h];if(!E||!S)break;S.vars===void 0||E.in_app===!1&&e.includeOutOfAppFrames!==!0||!wt(E.function,S.function)||(E.vars=S.vars)}}function i(u){for(let f of u.exception?.values||[])s(f);return u}let a;async function c(){let f=I()?.getOptions();if(!f?.includeLocalVariables)return;if(rs<18){p.log("The `LocalVariables` integration is only supported on Node >= v18.");return}if(await kt()){p.warn("Local variables capture has been disabled because the debugger was already enabled");return}try{let d=await wn.create(t),m=(S,{params:{reason:E,data:x,callFrames:C}},G)=>{if(E!=="exception"&&E!=="promiseRejection"){G();return}r?.();let ce=Vc(S,x.description);if(ce==null){G();return}let{add:ue,next:ne}=us(O=>{n.set(ce,O),G()});for(let O=0;O<Math.min(C.length,5);O++){let{scopeChain:xs,functionName:jn,this:Ht}=C[O],Zn=xs.find(pe=>pe.type==="local"),zn=Ht.className==="global"||!Ht.className?jn:`${Ht.className}.${jn}`;if(Zn?.object.objectId===void 0)ue(pe=>{pe[O]={function:zn},ne(pe)});else{let pe=Zn.object.objectId;ue(Jn=>d.getLocalVariables(pe,Ns=>{Jn[O]={function:zn,vars:Ns},ne(Jn)}))}}ne([])},h=e.captureAllExceptions!==!1;if(d.configureAndConnect((S,E)=>m(f.stackParser,S,E),h),h){let S=e.maxExceptionsPerSecond||50;r=ss(S,()=>{p.log("Local variables rate-limit lifted."),d.setPauseOnExceptions(!0)},E=>{p.log(`Local variables rate-limit exceeded. Disabling capturing of caught exceptions for ${E} seconds.`),d.setPauseOnExceptions(!1)})}o=!0}catch(d){p.log("The `LocalVariables` integration failed to start.",d)}}return{name:$c,setupOnce(){a=c()},async processEvent(u){return await a,o?i(u):u},_getCachedFramesCount(){return n.size},_getFirstCachedFrame(){return n.values()[0]}}}),ps=jc;var Bn=(e={})=>Ut.major<19?ps(e):as(e);function ls(){try{return typeof module<"u"&&typeof module.exports<"u"}catch{return!1}}import{isMainThread as zc}from"worker_threads";var Zc=2e3;function nt(e){b(()=>{console.error(e)});let t=I();if(t===void 0){N&&p.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:Zc;t.close(r).then(o=>{o||N&&p.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)},o=>{N&&p.error(o)})}var Jc="OnUncaughtException",Gn=(e={})=>{let t={exitEvenIfOtherHandlersAreRegistered:!1,...e};return{name:Jc,setup(n){zc&&global.process.on("uncaughtException",Xc(n,t))}}};function Xc(e,t){let r=!1,o=!1,s=!1,i,a=e.getOptions();return Object.assign(c=>{let u=nt;t.onFatalError?u=t.onFatalError:a.onFatalError&&(u=a.onFatalError);let l=global.process.listeners("uncaughtException").filter(m=>m.name!=="domainUncaughtExceptionClear"&&m.tag!=="sentry_tracingErrorCallback"&&m._errorHandler!==!0).length===0,d=t.exitEvenIfOtherHandlersAreRegistered||l;r?d&&(s?(N&&p.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),nt(c)):o||(o=!0,setTimeout(()=>{s||(s=!0,u(i,c))},2e3))):(i=c,r=!0,I()===e&&ee(c,{originalException:c,captureContext:{level:"fatal"},mechanism:{handled:!1,type:"auto.node.onuncaughtexception"}}),!s&&d&&(s=!0,u(c)))},{_errorHandler:!0})}var Kc="OnUnhandledRejection",Qc=[{name:"AI_NoOutputGeneratedError"},{name:"AbortError"}],qc=((e={})=>{let t={mode:e.mode??"warn",ignore:[...Qc,...e.ignore??[]]};return{name:Kc,setup(n){global.process.on("unhandledRejection",ru(n,t))}}}),Hn=qc;function eu(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 tu(e,t){let n=e.name===void 0||Y(t.name,e.name,!0),r=e.message===void 0||Y(t.message,e.message);return n&&r}function nu(e,t){let n=eu(t);return e.some(r=>tu(r,n))}function ru(e,t){return function(r,o){if(I()!==e||nu(t.ignore??[],r))return;let s=t.mode==="strict"?"fatal":"error",i=r&&typeof r=="object"?r._sentry_active_span:void 0;(i?c=>bt(i,c):c=>c())(()=>{ee(r,{originalException:o,captureContext:{extra:{unhandledPromiseRejection:!0},level:s},mechanism:{handled:!1,type:"auto.node.onunhandledrejection"}})}),ou(r,t.mode)}}function ou(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"?b(()=>{console.warn(n),console.error(e&&typeof e=="object"&&"stack"in e?e.stack:e)}):t==="strict"&&(b(()=>{console.warn(n)}),nt(e))}import*as fs from"node:http";var Wn="Spotlight",su=((e={})=>{let t={sidecarUrl:e.sidecarUrl||"http://localhost:8969/stream"};return{name:Wn,setup(n){try{process.env.NODE_ENV&&process.env.NODE_ENV!=="development"&&p.warn("[Spotlight] It seems you're not in dev mode. Do you really want to have Spotlight enabled?")}catch{}iu(n,t)}}}),ds=su;function iu(e,t){let n=au(t.sidecarUrl);if(!n)return;let r=0;e.on("beforeEnvelope",o=>{if(r>3){p.warn("[Spotlight] Disabled Sentry -> Spotlight integration due to too many failed requests");return}let s=$e(o);Ne(()=>{let i=fs.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++,p.warn("[Spotlight] Failed to send envelope to Spotlight Sidecar")}),i.write(s),i.end()})})}function au(e){try{return new URL(`${e}`)}catch{p.warn(`[Spotlight] Invalid sidecar URL: ${e}`);return}}import{posix as cu,sep as uu}from"node:path";function ms(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function gs(e=process.argv[1]?Pn(process.argv[1]):process.cwd(),t=uu==="\\"){let n=t?ms(e):e;return r=>{if(!r)return;let o=t?ms(r):r,{dir:s,base:i,ext:a}=cu.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 f=s.slice(n.length+1).replace(/\//g,".");return f?`${f}:${c}`:c}return c}}function _s(e){if(process.env.SENTRY_RELEASE)return process.env.SENTRY_RELEASE;if(_.SENTRY_RELEASE?.id)return _.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_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 hs=it(Dn(gs()));import*as lu from"node:http";import*as fu from"node:https";import{Readable as du}from"node:stream";import{createGzip as mu}from"node:zlib";import*as j from"node:net";import*as Vn from"node:tls";import*as Yn from"node:http";var B=Symbol("AgentBaseInternalState"),Bt=class extends Yn.Agent{constructor(t){super(t),this[B]={}}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
+ `).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 Yn.Agent)return s.addRequest(t,o);this[B].currentSocket=s,super.createSocket(t,n,r)},r)}createConnection(){let t=this[B].currentSocket;if(this[B].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[B].defaultPort??(this.protocol==="https:"?443:80)}set defaultPort(t){this[B]&&(this[B].defaultPort=t)}get protocol(){return this[B].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[B]&&(this[B].protocol=t)}};function Gt(...e){p.log("[https-proxy-agent:parse-proxy-response]",...e)}function Ss(e){return new Promise((t,n)=>{let r=0,o=[];function s(){let f=e.read();f?u(f):e.once("readable",s)}function i(){e.removeListener("end",a),e.removeListener("error",c),e.removeListener("readable",s)}function a(){i(),Gt("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function c(f){i(),Gt("onerror %o",f),n(f)}function u(f){o.push(f),r+=f.length;let l=Buffer.concat(o,r),d=l.indexOf(`\r
17
17
  \r
18
18
  `);if(d===-1){Gt("have not received end of HTTP headers yet..."),s();return}let m=l.subarray(0,d).toString("ascii").split(`\r
19
- `),h=m.shift();if(!h)return e.destroy(),n(new Error("No header received from proxy CONNECT response"));let S=h.split(" "),E=+(S[1]||0),x=S.slice(2).join(" "),C={};for(let G of m){if(!G)continue;let ce=G.indexOf(":");if(ce===-1)return e.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${G}"`));let ue=G.slice(0,ce).toLowerCase(),ne=G.slice(ce+1).trimStart(),O=C[ue];typeof O=="string"?C[ue]=[O,ne]:Array.isArray(O)?O.push(ne):C[ue]=ne}Gt("got proxy server response: %o %o",h,C),i(),t({connect:{statusCode:E,statusText:x,headers:C},buffered:l})}e.on("error",c),e.on("end",a),s()})}function rt(...e){p.log("[https-proxy-agent]",...e)}var ot=class extends Bt{static __initStatic(){this.protocols=["http","https"]}constructor(t,n){super(n),this.options={},this.proxy=typeof t=="string"?new URL(t):t,this.proxyHeaders=n?.headers??{},rt("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?Ss(n,"headers"):null,host:r,port:o}}async connect(t,n){let{proxy:r}=this;if(!n.host)throw new TypeError('No "host" provided');let o;if(r.protocol==="https:"){rt("Creating `tls.Socket`: %o",this.connectOpts);let d=this.connectOpts.servername||this.connectOpts.host;o=Vn.connect({...this.connectOpts,servername:d&&$.isIP(d)?void 0:d})}else rt("Creating `net.Socket`: %o",this.connectOpts),o=$.connect(this.connectOpts);let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},i=$.isIPv6(n.host)?`[${n.host}]`:n.host,a=`CONNECT ${i}:${n.port} HTTP/1.1\r
19
+ `),h=m.shift();if(!h)return e.destroy(),n(new Error("No header received from proxy CONNECT response"));let S=h.split(" "),E=+(S[1]||0),x=S.slice(2).join(" "),C={};for(let G of m){if(!G)continue;let ce=G.indexOf(":");if(ce===-1)return e.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${G}"`));let ue=G.slice(0,ce).toLowerCase(),ne=G.slice(ce+1).trimStart(),O=C[ue];typeof O=="string"?C[ue]=[O,ne]:Array.isArray(O)?O.push(ne):C[ue]=ne}Gt("got proxy server response: %o %o",h,C),i(),t({connect:{statusCode:E,statusText:x,headers:C},buffered:l})}e.on("error",c),e.on("end",a),s()})}function rt(...e){p.log("[https-proxy-agent]",...e)}var ot=class extends Bt{static __initStatic(){this.protocols=["http","https"]}constructor(t,n){super(n),this.options={},this.proxy=typeof t=="string"?new URL(t):t,this.proxyHeaders=n?.headers??{},rt("Creating new HttpsProxyAgent instance: %o",this.proxy.href);let r=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):this.proxy.protocol==="https:"?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...n?Es(n,"headers"):null,host:r,port:o}}async connect(t,n){let{proxy:r}=this;if(!n.host)throw new TypeError('No "host" provided');let o;if(r.protocol==="https:"){rt("Creating `tls.Socket`: %o",this.connectOpts);let d=this.connectOpts.servername||this.connectOpts.host;o=Vn.connect({...this.connectOpts,servername:d&&j.isIP(d)?void 0:d})}else rt("Creating `net.Socket`: %o",this.connectOpts),o=j.connect(this.connectOpts);let s=typeof this.proxyHeaders=="function"?this.proxyHeaders():{...this.proxyHeaders},i=j.isIPv6(n.host)?`[${n.host}]`:n.host,a=`CONNECT ${i}:${n.port} HTTP/1.1\r
20
20
  `;if(r.username||r.password){let d=`${decodeURIComponent(r.username)}:${decodeURIComponent(r.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(d).toString("base64")}`}s.Host=`${i}:${n.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(let d of Object.keys(s))a+=`${d}: ${s[d]}\r
21
- `;let c=hs(o);o.write(`${a}\r
22
- `);let{connect:u,buffered:f}=await c;if(t.emit("proxyConnect",u),this.emit("proxyConnect",u,t),u.statusCode===200){if(t.once("socket",uu),n.secureEndpoint){rt("Upgrading socket connection to TLS");let d=n.servername||n.host;return Vn.connect({...Ss(n,"host","path","port"),socket:o,servername:$.isIP(d)?void 0:d})}return o}o.destroy();let l=new $.Socket({writable:!1});return l.readable=!0,t.once("socket",d=>{rt("Replaying proxy buffer for failed request"),d.push(f),d.push(null)}),l}};ot.__initStatic();function uu(e){e.resume()}function Ss(e,...t){let n={},r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}var mu=1024*32;function gu(e){return new fu({read(){this.push(e),this.push(null)}})}function Es(e){let t;try{t=new URL(e.url)}catch{return b(()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")}),ze(e,()=>Promise.resolve({}))}let n=t.protocol==="https:",r=_u(t,e.proxy||(n?process.env.https_proxy:void 0)||process.env.http_proxy),o=n?lu:pu,s=e.keepAlive===void 0?!1:e.keepAlive,i=r?new ot(r):new o.Agent({keepAlive:s,maxSockets:30,timeout:2e3}),a=hu(e,e.httpModule??o,i);return ze(e,a)}function _u(e,t){let{no_proxy:n}=process.env;if(!n?.split(",").some(o=>e.host.endsWith(o)||e.hostname.endsWith(o)))return t}function hu(e,t,n){let{hostname:r,pathname:o,port:s,protocol:i,search:a}=new URL(e.url);return function(u){return new Promise((f,l)=>{Ne(()=>{let d=gu(u.body),m={...e.headers};u.body.length>mu&&(m["content-encoding"]="gzip",d=d.pipe(du()));let h=r.startsWith("["),S=t.request({method:"POST",agent:n,headers:m,hostname:h?r.slice(1,-1):r,path:`${o}${a}`,port:s,protocol:i,ca:e.caCerts},E=>{E.on("data",()=>{}),E.on("end",()=>{}),E.setEncoding("utf8");let x=E.headers["retry-after"]??null,C=E.headers["x-sentry-rate-limits"]??null;f({statusCode:E.statusCode,headers:{"retry-after":x,"x-sentry-rate-limits":Array.isArray(C)?C[0]||null:C}})});S.on("error",l),d.pipe(S)})})}}function Is(e){if(e===!1)return!1;if(typeof e=="string")return e;let t=ae(process.env.SENTRY_SPOTLIGHT,{strict:!0}),n=t===null&&process.env.SENTRY_SPOTLIGHT?process.env.SENTRY_SPOTLIGHT:void 0;return e===!0?n??!0:t??n}import{AsyncLocalStorage as Su}from"node:async_hooks";function Ts(){let e=new Su;function t(){let a=e.getStore();return a||{scope:we(),isolationScope:Be()}}function n(a){let c=t().scope.clone(),u=t().isolationScope;return e.run({scope:c,isolationScope:u},()=>a(c))}function r(a,c){let u=t().isolationScope.clone();return e.run({scope:a,isolationScope:u},()=>c(a))}function o(a){let c=t().scope.clone(),u=t().isolationScope.clone();return e.run({scope:c,isolationScope:u},()=>a(u))}function s(a,c){let u=t().scope.clone();return e.run({scope:u,isolationScope:a},()=>c(a))}function i(a){return n(c=>(c.setSDKProcessingMetadata({__SENTRY_SUPPRESS_TRACING__:!0}),a()))}rn({suppressTracing:i,withScope:n,withSetScope:r,withIsolationScope:o,withSetIsolationScope:s,getCurrentScope:()=>t().scope,getIsolationScope:()=>t().isolationScope})}function jn(e={}){return Eu(e,()=>[])}function Eu(e={},t){let n=Iu(e,t);n.debug===!0&&(N?p.enable():b(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),Ts(),R().update(n.initialScope),n.spotlight&&!n.integrations.some(({name:s})=>s===Wn)&&n.integrations.push(fs({sidecarUrl:typeof n.spotlight=="string"?n.spotlight:void 0})),Xe(n,"node-light",["node-core"]);let o=new Dt(n);return R().setClient(o),o.init(),_._sentryInjectLoaderHookRegister?.(),p.log(`SDK initialized from ${ps()?"CommonJS":"ESM"} (light mode)`),o.startClientReportTracking(),bu(),process.env.VERCEL&&process.on("SIGTERM",async()=>{await o.flush(200)}),o}function Iu(e,t){let n=Tu(e.release),r=Is(e.spotlight),o=yu(e.tracesSampleRate),s={...e,dsn:e.dsn??process.env.SENTRY_DSN,environment:e.environment??process.env.SENTRY_ENVIRONMENT,sendClientReports:e.sendClientReports??!0,transport:e.transport??Es,stackParser:jt(e.stackParser||_s),release:n,tracesSampleRate:o,spotlight:r,debug:ae(e.debug??process.env.SENTRY_DEBUG)},i=e.integrations,a=e.defaultIntegrations??t(s);return{...s,integrations:bn({defaultIntegrations:a,integrations:i})}}function Tu(e){if(e!==void 0)return e;let t=gs();if(t!==void 0)return t}function yu(e){if(e!==void 0)return e;let t=process.env.SENTRY_TRACES_SAMPLE_RATE;if(!t)return;let n=parseFloat(t);return isFinite(n)?n:void 0}function bu(){if(ae(process.env.SENTRY_USE_ENVIRONMENT)!==!1){let e=process.env.SENTRY_TRACE,t=process.env.SENTRY_BAGGAGE,n=pn(e,t);R().setPropagationContext(n)}}import Z from"homey";process.env.HOME||(process.env.HOME=Nu.tmpdir());var ys=class e{_capturedMessages=[];_capturedExceptions=[];constructor({homey:t,options:n}){if(typeof t>"u")return e._error("Error: missing `homey` constructor parameter");if(!Z.env)return e._error("Error: could not access `Homey.env`");if(typeof Z.env.HOMEY_LOG_URL!="string")return e._error("Error: expected `HOMEY_LOG_URL` env variable, homey-log is disabled");let r=process.env.DEBUG==="1"&&!e._isLogForced();r&&e._log("App is running in debug mode, not enabling Sentry logging");let o;typeof Z.env.HOMEY_LOG_SENTRY_PROJECT=="string"&&Z.env.HOMEY_LOG_SENTRY_PROJECT.length>0&&(o=`${Z.env.HOMEY_LOG_SENTRY_PROJECT}@${Z.manifest.version}`),this._manifest=Z.manifest,this._homeyVersion=t.version,this._managerCloud=t.cloud,this._homeyPlatform=t.platform,this._homeyPlatformVersion=t.platformVersion,this.init(Z.env.HOMEY_LOG_URL,{enabled:!r,release:o,...n})}init(t,n){return jn({dsn:t,integrations:[Re(),Ke(),Qe(),qe(),et(),Gn(),Hn(),kn(),Bn(),Un({app:!1,cloudResource:!1})],maxBreadcrumbs:5,enableMetrics:!1,...n}),this.setTags({appId:this._manifest.id,appVersion:this._manifest.version,homeyVersion:this._homeyVersion,homeyPlatform:this._homeyPlatform,homeyPlatformVersion:this._homeyPlatformVersion}),this._managerCloud.getHomeyId().then(r=>this.setTags({homeyId:r})).catch(r=>e._error("Error: could not get `homeyId`",r)),e._log(`App ${this._manifest.id} v${this._manifest.version} logging on Homey v${this._homeyVersion}...`),this}setTags(t){return Ct(t),this}setUser(t){return Rt(t),this}async captureMessage(t){if(e._log("captureMessage:",t),this._capturedMessages.indexOf(t)>-1){e._log("Prevented sending a duplicate message");return}return this._capturedMessages.push(t),new Promise((n,r)=>{try{n(Nt(t))}catch(o){r(o)}})}async captureException(t){if(e._log("captureException:",t),this._capturedExceptions.indexOf(t)>-1){e._log("Prevented sending a duplicate log");return}return this._capturedExceptions.push(t),new Promise((n,r)=>{try{n(ee(t))}catch(o){r(o)}})}static _log(){console.log.bind(null,e._logTime(),"[homey-log]").apply(null,arguments)}static _error(){console.error.bind(null,e._logTime(),"[homey-log]").apply(null,arguments)}static _logTime(){return`\x1B[35m${new Date().toISOString()}\x1B[0m`}static _isLogForced(){switch(Z.env.HOMEY_LOG_FORCE){case"1":case"true":return!0;default:return!1}}};export{ys as Log};
21
+ `;let c=Ss(o);o.write(`${a}\r
22
+ `);let{connect:u,buffered:f}=await c;if(t.emit("proxyConnect",u),this.emit("proxyConnect",u,t),u.statusCode===200){if(t.once("socket",pu),n.secureEndpoint){rt("Upgrading socket connection to TLS");let d=n.servername||n.host;return Vn.connect({...Es(n,"host","path","port"),socket:o,servername:j.isIP(d)?void 0:d})}return o}o.destroy();let l=new j.Socket({writable:!1});return l.readable=!0,t.once("socket",d=>{rt("Replaying proxy buffer for failed request"),d.push(f),d.push(null)}),l}};ot.__initStatic();function pu(e){e.resume()}function Es(e,...t){let n={},r;for(r in e)t.includes(r)||(n[r]=e[r]);return n}var gu=1024*32;function _u(e){return new du({read(){this.push(e),this.push(null)}})}function Is(e){let t;try{t=new URL(e.url)}catch{return b(()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")}),ze(e,()=>Promise.resolve({}))}let n=t.protocol==="https:",r=hu(t,e.proxy||(n?process.env.https_proxy:void 0)||process.env.http_proxy),o=n?fu:lu,s=e.keepAlive===void 0?!1:e.keepAlive,i=r?new ot(r):new o.Agent({keepAlive:s,maxSockets:30,timeout:2e3}),a=Su(e,e.httpModule??o,i);return ze(e,a)}function hu(e,t){let{no_proxy:n}=process.env;if(!n?.split(",").some(o=>e.host.endsWith(o)||e.hostname.endsWith(o)))return t}function Su(e,t,n){let{hostname:r,pathname:o,port:s,protocol:i,search:a}=new URL(e.url);return function(u){return new Promise((f,l)=>{Ne(()=>{let d=_u(u.body),m={...e.headers};u.body.length>gu&&(m["content-encoding"]="gzip",d=d.pipe(mu()));let h=r.startsWith("["),S=t.request({method:"POST",agent:n,headers:m,hostname:h?r.slice(1,-1):r,path:`${o}${a}`,port:s,protocol:i,ca:e.caCerts},E=>{E.on("data",()=>{}),E.on("end",()=>{}),E.setEncoding("utf8");let x=E.headers["retry-after"]??null,C=E.headers["x-sentry-rate-limits"]??null;f({statusCode:E.statusCode,headers:{"retry-after":x,"x-sentry-rate-limits":Array.isArray(C)?C[0]||null:C}})});S.on("error",l),d.pipe(S)})})}}function Ts(e){if(e===!1)return!1;if(typeof e=="string")return e;let t=ae(process.env.SENTRY_SPOTLIGHT,{strict:!0}),n=t===null&&process.env.SENTRY_SPOTLIGHT?process.env.SENTRY_SPOTLIGHT:void 0;return e===!0?n??!0:t??n}import{AsyncLocalStorage as Eu}from"node:async_hooks";function ys(){let e=new Eu;function t(){let a=e.getStore();return a||{scope:Be(),isolationScope:Ge()}}function n(a){let c=t().scope.clone(),u=t().isolationScope;return e.run({scope:c,isolationScope:u},()=>a(c))}function r(a,c){let u=t().isolationScope.clone();return e.run({scope:a,isolationScope:u},()=>c(a))}function o(a){let c=t().scope.clone(),u=t().isolationScope.clone();return e.run({scope:c,isolationScope:u},()=>a(u))}function s(a,c){let u=t().scope.clone();return e.run({scope:u,isolationScope:a},()=>c(a))}function i(a){return n(c=>(c.setSDKProcessingMetadata({__SENTRY_SUPPRESS_TRACING__:!0}),a()))}rn({suppressTracing:i,withScope:n,withSetScope:r,withIsolationScope:o,withSetIsolationScope:s,getCurrentScope:()=>t().scope,getIsolationScope:()=>t().isolationScope})}function $n(e={}){return Iu(e,()=>[])}function Iu(e={},t){let n=Tu(e,t);n.debug===!0&&(N?p.enable():b(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),ys(),R().update(n.initialScope),n.spotlight&&!n.integrations.some(({name:s})=>s===Wn)&&n.integrations.push(ds({sidecarUrl:typeof n.spotlight=="string"?n.spotlight:void 0})),Xe(n,"node-light",["node-core"]);let o=new Dt(n);return R().setClient(o),o.init(),p.log(`SDK initialized from ${ls()?"CommonJS":"ESM"} (light mode)`),o.startClientReportTracking(),xu(),process.env.VERCEL&&process.on("SIGTERM",async()=>{await o.flush(200)}),o}function Tu(e,t){let n=yu(e.release),r=Ts(e.spotlight),o=bu(e.tracesSampleRate),s={...e,dsn:e.dsn??process.env.SENTRY_DSN,environment:e.environment??process.env.SENTRY_ENVIRONMENT,sendClientReports:e.sendClientReports??!0,transport:e.transport??Is,stackParser:$t(e.stackParser||hs),release:n,tracesSampleRate:o,spotlight:r,debug:ae(e.debug??process.env.SENTRY_DEBUG)},i=e.integrations,a=e.defaultIntegrations??t(s);return{...s,integrations:bn({defaultIntegrations:a,integrations:i})}}function yu(e){if(e!==void 0)return e;let t=_s();if(t!==void 0)return t}function bu(e){if(e!==void 0)return e;let t=process.env.SENTRY_TRACES_SAMPLE_RATE;if(!t)return;let n=parseFloat(t);return isFinite(n)?n:void 0}function xu(){if(ae(process.env.SENTRY_USE_ENVIRONMENT)!==!1){let e=process.env.SENTRY_TRACE,t=process.env.SENTRY_BAGGAGE,n=pn(e,t);R().setPropagationContext(n)}}import Z from"homey";process.env.HOME||(process.env.HOME=Cu.tmpdir());var bs=class e{_capturedMessages=[];_capturedExceptions=[];constructor({homey:t,options:n}){if(typeof t>"u")return e._error("Error: missing `homey` constructor parameter");if(!Z.env)return e._error("Error: could not access `Homey.env`");if(typeof Z.env.HOMEY_LOG_URL!="string")return e._error("Error: expected `HOMEY_LOG_URL` env variable, homey-log is disabled");let r=process.env.DEBUG==="1"&&!e._isLogForced();r&&e._log("App is running in debug mode, not enabling Sentry logging");let o;typeof Z.env.HOMEY_LOG_SENTRY_PROJECT=="string"&&Z.env.HOMEY_LOG_SENTRY_PROJECT.length>0&&(o=`${Z.env.HOMEY_LOG_SENTRY_PROJECT}@${Z.manifest.version}`),this._manifest=Z.manifest,this._homeyVersion=t.version,this._managerCloud=t.cloud,this._homeyPlatform=t.platform,this._homeyPlatformVersion=t.platformVersion,this.init(Z.env.HOMEY_LOG_URL,{enabled:!r,release:o,...n})}init(t,n){return $n({dsn:t,integrations:[Ae(),Ke(),Qe(),qe(),et(),Gn(),Hn(),kn(),Bn(),Un({app:!1,cloudResource:!1})],maxBreadcrumbs:5,enableMetrics:!1,...n}),this.setTags({appId:this._manifest.id,appVersion:this._manifest.version,homeyVersion:this._homeyVersion,homeyPlatform:this._homeyPlatform,homeyPlatformVersion:this._homeyPlatformVersion}),this._managerCloud.getHomeyId().then(r=>this.setTags({homeyId:r})).catch(r=>e._error("Error: could not get `homeyId`",r)),e._log(`App ${this._manifest.id} v${this._manifest.version} logging on Homey v${this._homeyVersion}...`),this}setTags(t){return Ct(t),this}setUser(t){return Rt(t),this}async captureMessage(t){if(e._log("captureMessage:",t),this._capturedMessages.indexOf(t)>-1){e._log("Prevented sending a duplicate message");return}return this._capturedMessages.push(t),new Promise((n,r)=>{try{n(Nt(t))}catch(o){r(o)}})}async captureException(t){if(e._log("captureException:",t),this._capturedExceptions.indexOf(t)>-1){e._log("Prevented sending a duplicate log");return}return this._capturedExceptions.push(t),new Promise((n,r)=>{try{n(ee(t))}catch(o){r(o)}})}static _log(){console.log.bind(null,e._logTime(),"[homey-log]").apply(null,arguments)}static _error(){console.error.bind(null,e._logTime(),"[homey-log]").apply(null,arguments)}static _logTime(){return`\x1B[35m${new Date().toISOString()}\x1B[0m`}static _isLogForced(){switch(Z.env.HOMEY_LOG_FORCE){case"1":case"true":return!0;default:return!1}}};export{bs as Log};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drenso/homey-log",
3
- "version": "10.3900.0",
3
+ "version": "10.4000.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.39.0",
35
+ "@sentry/node-core": "10.40.0",
36
36
  "@types/homey": "npm:homey-apps-sdk-v3-types@0.3.12",
37
37
  "@types/node": "24.10.13",
38
38
  "esbuild": "0.27.3",