PageSourceSearch

https://050r.bet/releases/4.19.30/js/sentry.42a8c683.js

js 050r.bet collected 2026-10-09 04:41:15 UTC 126,127 bytes, 2 lines download raw bytes

1import{r as t}from"./vendor.b083bec7.js";var e={exports:{}},n={},r="function"==typeof Symbol&&Symbol.for,s=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,i=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,c=r?Symbol.for("react.profiler"):60114,u=r?Symbol.for("react.provider"):60109,l=r?Symbol.for("react.context"):60110,d=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,f=r?Symbol.for("react.forward_ref"):60112,m=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,_=r?Symbol.for("react.lazy"):60116,v=r?Symbol.for("react.block"):60121,y=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,S=r?Symbol.for("react.scope"):60119;function E(t){if("object"==typeof t&&null!==t){var e=t.$$typeof;switch(e){case s:switch(t=t.type){case d:case p:case i:case c:case a:case m:return t;default:switch(t=t&&t.$$typeof){case l:case f:case _:case g:case u:return t;default:return e}}case o:return e}}}function T(t){return E(t)===p}n.AsyncMode=d,n.ConcurrentMode=p,n.ContextConsumer=l,n.ContextProvider=u,n.Element=s,n.ForwardRef=f,n.Fragment=i,n.Lazy=_,n.Memo=g,n.Portal=o,n.Profiler=c,n.StrictMode=a,n.Suspense=m,n.isAsyncMode=function(t){return T(t)||E(t)===d},n.isConcurrentMode=T,n.isContextConsumer=function(t){return E(t)===l},n.isContextProvider=function(t){return E(t)===u},n.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===s},n.isForwardRef=function(t){return E(t)===f},n.isFragment=function(t){return E(t)===i},n.isLazy=function(t){return E(t)===_},n.isMemo=function(t){return E(t)===g},n.isPortal=function(t){return E(t)===o},n.isProfiler=function(t){return E(t)===c},n.isStrictMode=function(t){return E(t)===a},n.isSuspense=function(t){return E(t)===m},n.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===p||t===c||t===a||t===m||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===_||t.$$typeof===g||t.$$typeof===u||t.$$typeof===l||t.$$typeof===f||t.$$typeof===y||t.$$typeof===b||t.$$typeof===S||t.$$typeof===v)},n.typeOf=E,e.exports=n;var x=e.exports,w={};w[x.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},w[x.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};const k="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,I=globalThis,$="9.47.1";function C(){return P(I),I}function P(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||$,e[$]=e[$]||{}}function A(t,e,n=I){const r=n.__SENTRY__=n.__SENTRY__||{},s=r[$]=r[$]||{};return s[t]||(s[t]=e())}const R=["debug","info","warn","error","log","assert","trace"],O={};function L(t){if(!("console"in I))return t();const e=I.console,n={},r=Object.keys(O);r.forEach(t=>{const r=O[t];n[t]=e[t],e[t]=r});try{return t()}finally{r.forEach(t=>{e[t]=n[t]})}}function D(){return M().enabled}function N(t,...e){k&&D()&&L(()=>{I.console[t](`Sentry Logger [${t}]:`,...e)})}function M(){return k?A("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const j={enable:function(){M().enabled=!0},disable:function(){M().enabled=!1},isEnabled:D,log:function(...t){N("log",...t)},warn:function(...t){N("warn",...t)},error:function(...t){N("error",...t)}},q="?",F=/\(error: (.*)\)/,U=/captureMessage|captureException/;function H(...t){const e=t.sort((t,e)=>t[0]-e[0]).map(t=>t[1]);return(t,n=0,r=0)=>{const s=[],o=t.split("\n");for(let i=n;i<o.length;i++){const t=o[i];if(t.length>1024)continue;const n=F.test(t)?t.replace(F,"$1"):t;if(!n.match(/\S*Error: /)){for(const t of e){const e=t(n);if(e){s.push(e);break}}if(s.length>=50+r)break}}return function(t){if(!t.length)return[];const e=Array.from(t);/sentryWrapped/.test(B(e).function||"")&&e.pop();e.reverse(),U.test(B(e).function||"")&&(e.pop(),U.test(B(e).function||"")&&e.pop());return e.slice(0,50).map(t=>({...t,filename:t.filename||B(e).filename,function:t.function||q}))}(s.slice(r))}}function B(t){return t[t.length-1]||{}}const z="<anonymous>";function W(t){try{return t&&"function"==typeof t&&t.name||z}catch{return z}}function J(t){const e=t.exception;if(e){const t=[];
1try{return e.values.forEach(e=>{e.stacktrace.frames&&t.push(...e.stacktrace.frames)}),t}catch{return}}}const G={},Y={};function V(t,e){G[t]=G[t]||[],G[t].push(e)}function X(t,e){if(!Y[t]){Y[t]=!0;try{e()}catch(n){k&&j.error(`Error while instrumenting ${t}`,n)}}}function K(t,e){const n=t&&G[t];if(n)for(const s of n)try{s(e)}catch(r){k&&j.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${W(s)}\nError:`,r)}}let Z=null;function Q(t){const e="error";V(e,t),X(e,tt)}function tt(){Z=I.onerror,I.onerror=function(t,e,n,r,s){return K("error",{column:r,error:s,line:n,msg:t,url:e}),!!Z&&Z.apply(this,arguments)},I.onerror.__SENTRY_INSTRUMENTED__=!0}let et=null;function nt(t){const e="unhandledrejection";V(e,t),X(e,rt)}function rt(){et=I.onunhandledrejection,I.onunhandledrejection=function(t){return K("unhandledrejection",t),!et||et.apply(this,arguments)},I.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const st=Object.prototype.toString;function ot(t){switch(st.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return ht(t,Error)}}function it(t,e){return st.call(t)===`[object ${e}]`}function at(t){return it(t,"ErrorEvent")}function ct(t){return it(t,"DOMError")}function ut(t){return it(t,"String")}function lt(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function dt(t){return null===t||lt(t)||"object"!=typeof t&&"function"!=typeof t}function pt(t){return it(t,"Object")}function ft(t){return"undefined"!=typeof Event&&ht(t,Event)}function mt(t){return Boolean((null==t?void 0:t.then)&&"function"==typeof t.then)}function ht(t,e){try{return t instanceof e}catch{return!1}}function gt(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t._isVue)}function _t(t){return"undefined"!=typeof Request&&ht(t,Request)}const vt=I;function yt(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,s=[];let o=0,i=0;const a=" > ",c=a.length;let u;const l=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||80;for(;n&&o++<r&&(u=bt(n,l),!("html"===u||o>1&&i+s.length*c+u.length>=d));)s.push(u),i+=u.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function bt(t,e){const n=t,r=[];if(!(null==n?void 0:n.tagName))return"";if(vt.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());const s=(null==e?void 0:e.length)?e.filter(t=>n.getAttribute(t)).map(t=>[t,n.getAttribute(t)]):null;if(null==s?void 0:s.length)s.forEach(t=>{r.push(`[${t[0]}="${t[1]}"]`)});else{n.id&&r.push(`#${n.id}`);const t=n.className;if(t&&ut(t)){const e=t.split(/\s+/);for(const t of e)r.push(`.${t}`)}}const o=["aria-label","type","name","title","alt"];for(const i of o){const t=n.getAttribute(i);t&&r.push(`[${i}="${t}"]`)}return r.join("")}function St(){try{return vt.document.location.href}catch{return""}}function Et(t){if(!vt.HTMLElement)return null;let e=t;for(let n=0;n<5;n++){if(!e)return null;if(e instanceof HTMLElement){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}e=e.parentNode}return null}function Tt(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function xt(t,e){if(!Array.isArray(t))return"";const n=[];for(let r=0;r<t.length;r++){const e=t[r];try{gt(e)?n.push("[VueViewModel]"):n.push(String(e))}catch{n.push("[value cannot be serialized]")}}return n.join(e)}function wt(t,e,n=!1){return!!ut(t)&&(it(e,"RegExp")?e.test(t):!!ut(e)&&(n?t===e:t.includes(e)))}function kt(t,e=[],n=!1){return e.some(e=>wt(t,e,n))}function It(t,e,n){if(!(e in t))return;const r=t[e];if("function"!=typeof r)return;const s=n(r);"function"==typeof s&&Ct(s,r);try{t[e]=s}catch{k&&j.log(`Failed to replace method "${e}" in object`,t)}}function $t(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{k&&j.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function Ct(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,$t(t,"__sentry_original__",e)}catch{}}function Pt(t){return t.__sentry_original__}function At(t){if(ot(t))return{message:t.message,name:t.name,stack:t.stack,...Ot(t)};if(ft(t)){const e={type:t.type,target:Rt(t.target),currentTarget:Rt(t.currentTarget),...Ot(t)};return"undefined"!=typeof CustomEvent&&ht(t,CustomEvent)&&(e.detail=t.detail),e}return t}function Rt(t){try{return e=t,"undefined"!=typeof Element&&ht(e,Element)?yt(t):Object.prototype.toString.call(t)}catch{return"<unknown>"}var e}function Ot(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function Lt(t=function(){const t=I;return t.crypto||t.msCrypto}()){let e=()=>16*Math.random();try{if(null==t?void 0:t.randomUUID)return t.randomUUID().replace(/-/g,"");(null==t?void 0:t.getRandomValues)&&(e=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(15&e())>>t/4).toString(16))}function Dt(t){var e,n;return null==(n=null==(e=t.exception)?void 0:e.values)?void 0:n[0]}function Nt(t){const{message:e,event_id:n}=t;if(e)return e;const r=Dt(t);return r?r.type&&r.value?`${r.type}: ${r.value}
1`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Mt(t,e,n){const r=t.exception=t.exception||{},s=r.values=r.values||[],o=s[0]=s[0]||{};o.value||(o.value=e||""),o.type||(o.type=n||"Error")}function jt(t,e){const n=Dt(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...null==r?void 0:r.data,...e.data};n.mechanism.data=t}}function qt(t){if(function(t){try{return t.__sentry_captured__}catch{}}(t))return!0;try{$t(t,"__sentry_captured__",!0)}catch{}return!1}function Ft(){return Date.now()/1e3}let Ut,Ht;function Bt(){return(Ut??(Ut=function(){const{performance:t}=I;if(!(null==t?void 0:t.now)||!t.timeOrigin)return Ft;const e=t.timeOrigin;return()=>(e+t.now())/1e3}()))()}function zt(){return Ht||(Ht=function(){var t;const{performance:e}=I;if(!(null==e?void 0:e.now))return[void 0,"none"];const n=36e5,r=e.now(),s=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+r-s):n,i=o<n,a=null==(t=e.timing)?void 0:t.navigationStart,c="number"==typeof a?Math.abs(a+r-s):n;return i||c<n?o<=c?[e.timeOrigin,"timeOrigin"]:[a,"navigationStart"]:[s,"dateNow"]}()),Ht[0]}function Wt(t){const e=Bt(),n={sid:Lt(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return{sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}(n)};return t&&Jt(n,t),n}function Jt(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Bt(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:Lt()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}function Gt(t,e,n=2){if(!e||"object"!=typeof e||n<=0)return e;if(t&&0===Object.keys(e).length)return t;const r={...t};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Gt(r[s],e[s],n-1));return r}function Yt(){return Lt()}function Vt(){return Lt().substring(16)}const Xt="_sentrySpan";function Kt(t,e){e?$t(t,Xt,e):delete t[Xt]}function Zt(t){return t[Xt]}class Qt{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:Yt(),sampleRand:Math.random()}}clone(){const t=new Qt;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},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,Kt(t,Zt(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&&Jt(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},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,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,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;const e="function"==typeof t?t(this):t,n=e instanceof Qt?e.getScopeData():pt(e)?t:void 0,{tags:r,extra:s,user:o,contexts:i,level:a,fingerprint:c=[],propagationContext:u}=n||{};return this._tags={...this._tags,...r},this._extra={...this._extra,...s},this._contexts={...this._contexts,...i},o&&Object.keys(o).length&&(this._user=o),a&&(this._level=a),c.length&&(this._fingerprint=c),u&&(this._propagationContext=u),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._session=void 0,Kt(this,void 0),this._attachments=[],this.setPropagationContext({traceId:Yt(),sampleRand:Math.random()}),this._notifyScopeListeners(),this}addBreadcrumb(t,e){var n;const r="number"==typeof e?e:100;if(r<=0)return this;const s={timestamp:Ft(),...t,message:t.message?Tt(t.message,2048):t.message};return this._breadcrumbs.push(s),this._breadcrumbs.length>r&&(this._breadcrumbs=this._breadcrumbs.slice(-r),null==(n=this._client)||n.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,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:Zt(this)}}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata=Gt(this._sdkProcessingMetadata,t,2),this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,e){const n=(null==e?void 0:e.event_id)||Lt();if(!this._client)return k&&j.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this),n}captureMessage(t,e,n){const r=(null==n?void 0:n.event_id)||Lt();if(!this._client)return k&&j.warn("No client configured on scope - will not capture message!"),r;const s=new Error(t);return this._client.captureMessage(t,e,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureEvent(t,e){const n=(null==e?void 0:e.event_id)||Lt();return this._client?(this._client.captureEvent(t,{...e,event_id:n},this),n):(k&&j.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEac
1h(t=>{t(this)}),this._notifyingListeners=!1)}}class te{constructor(t,e){let n,r;n=t||new Qt,r=e||new Qt,this._stack=[{scope:n}],this._isolationScope=r}withScope(t){const e=this._pushScope();let n;try{n=t(e)}catch(r){throw this._popScope(),r}return mt(n)?n.then(t=>(this._popScope(),t),t=>{throw this._popScope(),t}):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const t=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:t}),t}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function ee(){const t=P(C());return t.stack=t.stack||new te(A("defaultCurrentScope",()=>new Qt),A("defaultIsolationScope",()=>new Qt))}function ne(t){return ee().withScope(t)}function re(t,e){const n=ee();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function se(t){return ee().withScope(()=>t(ee().getIsolationScope()))}function oe(t){const e=P(t);return e.acs?e.acs:{withIsolationScope:se,withScope:ne,withSetScope:re,withSetIsolationScope:(t,e)=>se(e),getCurrentScope:()=>ee().getScope(),getIsolationScope:()=>ee().getIsolationScope()}}function ie(){return oe(C()).getCurrentScope()}function ae(){return oe(C()).getIsolationScope()}function ce(...t){const e=oe(C());if(2===t.length){const[n,r]=t;return n?e.withSetScope(n,r):e.withScope(r)}return e.withScope(t[0])}function ue(){return ie().getClient()}function le(t){const e=t.getPropagationContext(),{traceId:n,parentSpanId:r,propagationSpanId:s}=e,o={trace_id:n,span_id:s||Vt()};return r&&(o.parent_span_id=r),o}const de="sentry.source",pe="sentry.sample_rate",fe="sentry.previous_trace_sample_rate",me="sentry.op",he="sentry.origin",ge="sentry.idle_span_finish_reason",_e="sentry.measurement_unit",ve="sentry.measurement_value",ye="sentry.custom_span_name",be="sentry.profile_id",Se="sentry.exclusive_time",Ee="sentry.link.type";function Te(t,e){t.setAttribute("http.response.status_code",e);const n=function(t){if(t<400&&t>=100)return{code:1};if(t>=400&&t<500)switch(t){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(t>=500&&t<600)switch(t){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"unknown_error"}}(e);"unknown_error"!==n.message&&t.setStatus(n)}const xe="_sentryScope",we="_sentryIsolationScope";function ke(t){return{scope:t[xe],isolationScope:t[we]}}const Ie="sentry-",$e=/^sentry-/;function Ce(t){const e=function(t){if(!t||!ut(t)&&!Array.isArray(t))return;if(Array.isArray(t))return t.reduce((t,e)=>{const n=Ae(e);return Object.entries(n).forEach(([e,n])=>{t[e]=n}),t},{});return Ae(t)}(t);if(!e)return;const n=Object.entries(e).reduce((t,[e,n])=>{if(e.match($e)){t[e.slice(7)]=n}return t},{});return Object.keys(n).length>0?n:void 0}function Pe(t){if(!t)return;return function(t){if(0===Object.keys(t).length)return;return Object.entries(t).reduce((t,[e,n],r)=>{const s=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`,o=0===r?s:`${t},${s}`;return o.length>8192?(k&&j.warn(`Not adding key: ${e} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):o},"")}(Object.entries(t).reduce((t,[e,n])=>(n&&(t[`${Ie}${e}`]=n),t),{}))}function Ae(t){return t.split(",").map(t=>t.split("=").map(t=>{try{return decodeURIComponent(t.trim())}catch{return}})).reduce((t,[e,n])=>(e&&n&&(t[e]=n),t),{})}function Re(t){if("boolean"==typeof t)return Number(t);const e="string"==typeof t?parseFloat(t):t;return"number"!=typeof e||isNaN(e)||e<0||e>1?void 0:e}const Oe=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Le(t,e){const n=function(t){if(!t)return;const e=t.match(Oe);if(!e)return;let n;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}(t),r=Ce(e);if(!(null==n?void 0:n.traceId))return{traceId:Yt(),sampleRand:Math.random()};const s=function(t,e){const n=Re(null==e?void 0:e.sample_rand);if(void 0!==n)return n;const r=Re(null==e?void 0:e.sample_rate);return r&&void 0!==(null==t?void 0:t.parentSampled)?t.parentSampled?Math.random()*r:r+Math.random()*(1-r):Math.random()}(n,r);r&&(r.sample_rand=s.toString());const{traceId:o,parentSpanId:i,parentSampled:a}=n;return{traceId:o,parentSpanId:i,sampled:a,dsc:r||{},sampleRand:s}}function De(t=Yt(),e=Vt(),n){let r="";return void 0!==n&&(r=n?"-1":"-0"),`${t}-${e}${r}`}let Ne=!1;function Me(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:o,status:i,origin:a,links:c}=He(t);return{parent_span_id:o,span_id:e,trace_id:n,data:r,op:s,status:i,origin:a,links:c}}function je(t){const{spanId:e,traceId:n,isRemote:r}=t.spanContext(),s=r?e:He(t).parent_span_id,o=ke(t).scope;return{parent_span_id:s,span_id:r?(null==o?void 0:o.getPropagationContext().propagationSpanId)||Vt():e,trace_id:n}}function qe(t){return t&&t.length>0?t.map(({context:{spanId:t,traceId:e,traceFlags:n,...r},attributes:s})=>({span_id:t,trace_id:e,sampled:1===n,attributes:s,...r})):void 0}function Fe(t){return"number"==typeof t?Ue(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Ue(t.getTime()):Bt()}function Ue(t){return t>9999999999?t/1e3:t}function He(t){var e;if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();const{spanId:n,traceId:r}=t.spanContext();if(function(t){const e=t;return!!(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status)}(t)){const{attributes:s,startTime:o,name:i,endTime:a,status:c,links:u}=t;return{span_id:n,trace_id:r,data:s,description:i,parent_span_id:"parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?null==(e=t.parentSpanContext)?void 0:e.spanId:void 0,start_timestamp:Fe(o),timestamp:Fe(a)||void 0,status:ze(c),op:s[me],origin:s[he],links:qe(u)}}return{span_id:n,trace_id:r,start_timestamp:0,data:{}}}function Be(t){const{traceFlags:e}=t.spanContext();return 1===e}function ze(t){if(t&&0!==t.code)return 1===t.code?"ok":t.message||"unknown_error"}const We="_sentryChildSpans",Je="_sentryRootSpan";function Ge(t,e){const n=t[Je]||t;$t(e,Je,n),t[We]?t[We].add(e):$t(t,We,new Set([e]))}function Ye(t){const e=new Set;return function t(n){if(!e.has(n)&&Be(n)){e.add(n);const r=n[We]?Array.from(n[We]):[];for(const e of r)t(e)}}(t),Array.from(e)}function Ve(t){return t[Je]||t}function Xe(){const t=oe(C());return t.getActiveSpan?t.getActiveSpan():Zt(ie())}function Ke(){Ne||(L(()=>{}),Ne=!0)}let Ze=!1;function Qe(t){var e;if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const n=t||(null==(e=ue())?void 0:e.getOptions());return!(!n||null==n.tracesSampleRate&&!n.tracesSampler)}const tn="production",en=/^o(\d+)\./,nn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function rn(t,e=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:a,publicKey:c}=t;return`${a}://${c}${e&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${r?`${r}/`:r}${i}`}function sn(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function on(t){const e="string"==typeof t?function(t){const e=nn.exec(t);if(!e)return void L(()=>{});const[n,r,s="",o="",i="",a=""]=e.slice(1);let c="",u=a;const l=u.split("/");if(l.length>1&&(c=l.slice(0,-1).join("/"),u=l.pop()),u){const t=u.match(/^\d+/);t&&(u=t[0])}return sn({host:o,pass:s,path:c,projectId:u,port:i,protocol:n,publicKey:r})}(t):sn(t);if(e&&function(t){if(!k)return!0;const{port:e,projectId:n,protocol:r}=t;return!(["protocol","publicKey","host","projectId"].find(e=>!t[e]&&(j.error(`Invalid Sentry Dsn: ${e} missing`),!0))||(n.match(/^\d+$/)?function(t){return"http"===t||"https"===t}(r)?e&&isNaN(parseInt(e,10))&&(j.error(`Invalid Sentry Dsn: Invalid port ${e}`),1):(j.error(`Invalid Sentry Dsn: Invalid protocol ${r}`),1):(j.error(`Invalid Sentry Dsn: Invalid projectId ${n}`),1)))}(e))return e}const an="_frozenDsc";function cn(t,e){$t(t,an,e)}function un(t,e){const n=e.getOptions(),{publicKey:r,host:s}=e.getDsn()||{};let o;n.orgId?o=String(n.orgId):s&&(o=function(t){const e=t.match(en);return null==e?void 0:e[1]}(s));const i={environment:n.environment||tn,release:n.release,public_key:r,trace_id:t,org_id:o};return e.emit("createDsc",i),i}function ln(t,e){const n=e.getPropagationContext();return n.dsc||un(n.traceId,t)}function dn(t){var e;
1const n=ue();if(!n)return{};const r=Ve(t),s=He(r),o=s.data,i=r.spanContext().traceState,a=(null==i?void 0:i.get("sentry.sample_rate"))??o[pe]??o[fe];function c(t){return"number"!=typeof a&&"string"!=typeof a||(t.sample_rate=`${a}`),t}const u=r[an];if(u)return c(u);const l=null==i?void 0:i.get("sentry.dsc"),d=l&&Ce(l);if(d)return c(d);const p=un(t.spanContext().traceId,n),f=o[de],m=s.description;return"url"!==f&&m&&(p.transaction=m),Qe()&&(p.sampled=String(Be(r)),p.sample_rand=(null==i?void 0:i.get("sentry.sample_rand"))??(null==(e=ke(r).scope)?void 0:e.getPropagationContext().sampleRand.toString())),c(p),n.emit("createDsc",p,r),p}class pn{constructor(t={}){this._traceId=t.traceId||Yt(),this._spanId=t.spanId||Vt()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:0}}end(t){}setAttribute(t,e){return this}setAttributes(t){return this}setStatus(t){return this}updateName(t){return this}isRecording(){return!1}addEvent(t,e,n){return this}addLink(t){return this}addLinks(t){return this}recordException(t,e){}}function fn(t,e=100,n=1/0){try{return hn("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function mn(t,e=3,n=102400){const r=fn(t,e);return s=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(s))>n?mn(t,e-1,n):r;var s}function hn(t,e,n=1/0,r=1/0,s=function(){const t=new WeakSet;function e(e){return!!t.has(e)||(t.add(e),!1)}function n(e){t.delete(e)}return[e,n]}()){const[o,i]=s;if(null==e||["boolean","string"].includes(typeof e)||"number"==typeof e&&Number.isFinite(e))return e;const a=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&e===global)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(gt(e))return"[VueViewModel]";if(pt(n=e)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof e&&!Number.isFinite(e))return`[${e}]`;if("function"==typeof e)return`[Function: ${W(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const r=function(t){const e=Object.getPrototypeOf(t);return(null==e?void 0:e.constructor)?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(r){return`**non-serializable** (${r})`}var n}(t,e);if(!a.startsWith("[object "))return a;if(e.__sentry_skip_normalization__)return e;const c="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:n;if(0===c)return a.replace("object ","");if(o(e))return"[Circular ~]";const u=e;if(u&&"function"==typeof u.toJSON)try{return hn("",u.toJSON(),c-1,r,s)}catch{}const l=Array.isArray(e)?[]:{};let d=0;const p=At(e);for(const f in p){if(!Object.prototype.hasOwnProperty.call(p,f))continue;if(d>=r){l[f]="[MaxProperties ~]";break}const t=p[f];l[f]=hn(f,t,c-1,r,s),d++}return i(e),l}function gn(t,e=[]){return[t,e]}function _n(t,e){const[n,r]=t;return[n,[...r,e]]}function vn(t,e){const n=t[1];for(const r of n){if(e(r,r[0].type))return!0}return!1}function yn(t){const e=P(I);return e.encodePolyfill?e.encodePolyfill(t):(new TextEncoder).encode(t)}function bn(t){const[e,n]=t;let r=JSON.stringify(e);function s(t){"string"==typeof r?r="string"==typeof t?r+t:[yn(r),t]:r.push("string"==typeof t?yn(t):t)}for(const o of n){const[t,e]=o;if(s(`\n${JSON.stringify(t)}\n`),"string"==typeof e||e instanceof Uint8Array)s(e);else{let t;try{t=JSON.stringify(e)}catch{t=JSON.stringify(fn(e))}s(t)}}return"string"==typeof r?r:function(t){const e=t.reduce((t,e)=>t+e.length,0),n=new Uint8Array(e);let r=0;for(const s of t)n.set(s,r),r+=s.length;return n}(r)}function Sn(t){return[{type:"span"},t]}function En(t){const e="string"==typeof t.data?yn(t.data):t.data;return[{type:"attachment",length:e.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},e]}const Tn={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"};function xn(t){return Tn[t]}function wn(t){if(!(null==t?void 0:t.sdk))return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function kn(t,e,n,r){const s=wn(n),o=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,null==n?void 0:n.sdk);const i=function(t,e,n,r){var s;const o=null==(s=t.sdkProcessingMetadata)?void 0:s.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:rn(r)},...o&&{trace:o}}}(t,s,r,e);delete t.sdkProcessingMetadata;return gn(i,[[{type:o},t]])}function In(t){if(!t||0===t.length)return;const e={};return t.forEach(t=>{const n=t.attributes||{},r=n[_e],s=n[ve];"string"==typeof r&&"number"==typeof s&&(e[t.name]={value:s,unit:r})}),e}class $n{constructor(t={}){this._traceId=t.traceId||Yt(),this._spanId=t.spanId||Vt(),this._startTime=t.startTimestamp||Bt(),this._links=t.links,this._attributes={},this.setAttributes({[he]:"manual",[me]:t.op,...t.attributes}),this._name=t.name,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.endTimestamp&&(this._endTime=t.endTimestamp),this._events=[],this._isStandaloneSpan=t.isStandalone,this._endTime&&this._onSpanEnded()}
1addLink(t){return this._links?this._links.push(t):this._links=[t],this}addLinks(t){return this._links?this._links.push(...t):this._links=t,this}recordException(t,e){}spanContext(){const{_spanId:t,_traceId:e,_sampled:n}=this;return{spanId:t,traceId:e,traceFlags:n?1:0}}setAttribute(t,e){return void 0===e?delete this._attributes[t]:this._attributes[t]=e,this}setAttributes(t){return Object.keys(t).forEach(e=>this.setAttribute(e,t[e])),this}updateStartTime(t){this._startTime=Fe(t)}setStatus(t){return this._status=t,this}updateName(t){return this._name=t,this.setAttribute(de,"custom"),this}end(t){this._endTime||(this._endTime=Fe(t),function(t){if(!k)return;const{description:e="< unknown name >",op:n="< unknown op >"}=He(t),{spanId:r}=t.spanContext(),s=`[Tracing] Finishing "${n}" ${Ve(t)===t?"root ":""}span "${e}" with ID ${r}`;j.log(s)}(this),this._onSpanEnded())}getSpanJSON(){return{data:this._attributes,description:this._name,op:this._attributes[me],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:ze(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[he],profile_id:this._attributes[be],exclusive_time:this._attributes[Se],measurements:In(this._events),is_segment:this._isStandaloneSpan&&Ve(this)===this||void 0,segment_id:this._isStandaloneSpan?Ve(this).spanContext().spanId:void 0,links:qe(this._links)}}isRecording(){return!this._endTime&&!!this._sampled}addEvent(t,e,n){k&&j.log("[Tracing] Adding an event to span:",t);const r=Cn(e)?e:n||Bt(),s=Cn(e)?{}:e||{},o={name:t,time:Fe(r),attributes:s};return this._events.push(o),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const t=ue();t&&t.emit("spanEnd",this);if(!(this._isStandaloneSpan||this===Ve(this)))return;if(this._isStandaloneSpan)return void(this._sampled?function(t){const e=ue();if(!e)return;const n=t[1];if(!n||0===n.length)return void e.recordDroppedEvent("before_send","span");e.sendEnvelope(t)}(function(t,e){const n=dn(t[0]),r=null==e?void 0:e.getDsn(),s=null==e?void 0:e.getOptions().tunnel,o={sent_at:(new Date).toISOString(),...(i=n,!!i.trace_id&&!!i.public_key&&{trace:n}),...!!s&&r&&{dsn:rn(r)}};var i;const a=null==e?void 0:e.getOptions().beforeSendSpan,c=a?t=>{const e=He(t);return a(e)||(Ke(),e)}:He,u=[];for(const l of t){const t=c(l);t&&u.push(Sn(t))}return gn(o,u)}([this],t)):(k&&j.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),t&&t.recordDroppedEvent("sample_rate","span")));const e=this._convertSpanToTransaction();if(e){(ke(this).scope||ie()).captureEvent(e)}}_convertSpanToTransaction(){var t;if(!Pn(He(this)))return;this._name||(k&&j.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:e,isolationScope:n}=ke(this),r=null==(t=null==e?void 0:e.getScopeData().sdkProcessingMetadata)?void 0:t.normalizedRequest;if(!0!==this._sampled)return;const s=Ye(this).filter(t=>t!==this&&!function(t){return t instanceof $n&&t.isStandaloneSpan()}(t)).map(t=>He(t)).filter(Pn),o=this._attributes[de];delete this._attributes[ye],s.forEach(t=>{delete t.data[ye]});const i={contexts:{trace:Me(this)},spans:s.length>1e3?s.sort((t,e)=>t.start_timestamp-e.start_timestamp).slice(0,1e3):s,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:e,capturedSpanIsolationScope:n,dynamicSamplingContext:dn(this)},request:r,...o&&{transaction_info:{source:o}}},a=In(this._events);return a&&Object.keys(a).length&&(k&&j.log("[Measurements] Adding measurements to transaction event",JSON.stringify(a,void 0,2)),i.measurements=a),i}}function Cn(t){return t&&"number"==typeof t||t instanceof Date||Array.isArray(t)}function Pn(t){return!!(t.start_timestamp&&t.timestamp&&t.span_id&&t.trace_id)}function An(t,e,n=()=>{}){let r;try{r=t()}catch(s){throw e(s),n(),s}return function(t,e,n){if(mt(t))return t.then(t=>(n(),t),t=>{throw e(t),n(),t});return n(),t}(r,e,n)}const Rn="__SENTRY_SUPPRESS_TRACING__";function On(t,e){const n=jn();if(n.startSpan)return n.startSpan(t,e);const r=Mn(t),{forceTransaction:s,parentSpan:o,scope:i}=t;return ce(null==i?void 0:i.clone(),()=>{const n=void 0!==(i=o)?t=>Dn(i,t):t=>t();var i;return n(()=>{const n=ie(),i=Fn(n,o),a=t.onlyIfParent&&!i?new pn:Nn({parentSpan:i,spanArguments:r,forceTransaction:s,scope:n});return Kt(n,a),An(()=>e(a),()=>{const{status:t}=He(a);!a.isRecording()||t&&"ok"!==t||a.setStatus({code:2,message:"internal_error"})},()=>{a.end()})})})}function Ln(t){const e=jn();if(e.startInactiveSpan)return e.startInactiveSpan(t);const n=Mn(t),{forceTransaction:r,parentSpan:s}=t;return(t.scope?e=>ce(t.scope,e):void 0!==s?t=>Dn(s,t):t=>t())(()=>{const e=ie(),o=Fn(e,s);return t.onlyIfParent&&!o?new pn:Nn({parentSpan:o,spanArguments:n,forceTransaction:r,scope:e})})}function Dn(t,e){const n=jn();return n.withActiveSpan?n.withActiveSpan(t,e):ce(n=>(Kt(n,t||void 0),e(n)))}function Nn({parentSpan:t,spanArguments:e,forceTransaction:n,scope:r}){if(!Qe()){const r=new pn;if(n||!t){cn(r,{sampled:"false",sample_rate:"0",transaction:e.name,...dn(r)})}return r}const s=ae();let o;if(t&&!n)o=function(t,e,n){const{spanId:r,traceId:s}=t.spanContext(),o=!e.getScopeData().sdkProcessingMetadata[Rn]&&Be(t),i=o?new $n({...n,parentSpanId:r,traceId:s,sampled:o}):new pn({traceId:s});Ge(t,i);const a=ue();a&&(a.emit("spanStart",i),n.endTimestamp&&a.emit("spanEnd",i));return i}(t,r,e),Ge(t,o);else if(t){const n=dn(t),{traceId:s,spanId:i}=t.spanContext(),a=Be(t);o=qn({traceId:s,parentSpanId:i,...e},r,a),cn(o,n)}else{const{traceId:t,dsc:n,parentSpanId:i,sampled:a}={...s.getPropagationContext(),...r.getPropagationContext()};o=qn({traceId:t,parentSpanId:i,...e},r,a),n&&cn(o,n)}return function(t){if(!k)return;const{description:e="< unknown name >",op:n="< unknown op >",parent_span_id:r}=He(t),{spanId:s}=t.spanContext(),o=Be(t),i=Ve(t),a=i===t,c=`[Tracing] Starting ${o?"sampled":"unsampled"} ${a?"root ":""}span`,u=[`op: ${n}`,`name: ${e}`,`ID: ${s}`];if(r&&u.push(`parent ID: ${r}
1`),!a){const{op:t,description:e}=He(i);u.push(`root ID: ${i.spanContext().spanId}`),t&&u.push(`root op: ${t}`),e&&u.push(`root description: ${e}`)}j.log(`${c}\n  ${u.join("\n  ")}`)}(o),function(t,e,n){t&&($t(t,we,n),$t(t,xe,e))}(o,r,s),o}function Mn(t){const e={isStandalone:(t.experimental||{}).standalone,...t};if(t.startTime){const n={...e};return n.startTimestamp=Fe(t.startTime),delete n.startTime,n}return e}function jn(){return oe(C())}function qn(t,e,n){var r;const s=ue(),o=(null==s?void 0:s.getOptions())||{},{name:i=""}=t,a={spanAttributes:{...t.attributes},spanName:i,parentSampled:n};null==s||s.emit("beforeSampling",a,{decision:!1});const c=a.parentSampled??n,u=a.spanAttributes,l=e.getPropagationContext(),[d,p,f]=e.getScopeData().sdkProcessingMetadata[Rn]?[!1]:function(t,e,n){if(!Qe(t))return[!1];let r,s;"function"==typeof t.tracesSampler?(s=t.tracesSampler({...e,inheritOrSampleWith:t=>"number"==typeof e.parentSampleRate?e.parentSampleRate:"boolean"==typeof e.parentSampled?Number(e.parentSampled):t}),r=!0):void 0!==e.parentSampled?s=e.parentSampled:void 0!==t.tracesSampleRate&&(s=t.tracesSampleRate,r=!0);const o=Re(s);if(void 0===o)return k&&j.warn(`[Tracing] Discarding root span because of invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(s)} of type ${JSON.stringify(typeof s)}.`),[!1];if(!o)return k&&j.log("[Tracing] Discarding transaction because "+("function"==typeof t.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,o,r];const i=n<o;return i||k&&j.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(s)})`),[i,o,r]}(o,{name:i,parentSampled:c,attributes:u,parentSampleRate:Re(null==(r=l.dsc)?void 0:r.sample_rate)},l.sampleRand),m=new $n({...t,attributes:{[de]:"custom",[pe]:void 0!==p&&f?p:void 0,...u},sampled:d});return!d&&s&&(k&&j.log("[Tracing] Discarding root span because its trace was not chosen to be sampled."),s.recordDroppedEvent("sample_rate","transaction")),s&&s.emit("spanStart",m),m}function Fn(t,e){if(e)return e;if(null===e)return;const n=Zt(t);if(!n)return;const r=ue();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?Ve(n):n}const Un={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};function Hn(t,e={}){const n=new Map;let r,s=!1,o="externalFinish",i=!e.disableAutoFinish;const a=[],{idleTimeout:c=Un.idleTimeout,finalTimeout:u=Un.finalTimeout,childSpanTimeout:l=Un.childSpanTimeout,beforeSpanEnd:d}=e,p=ue();if(!p||!Qe()){const t=new pn;return cn(t,{sample_rate:"0",sampled:"false",...dn(t)}),t}const f=ie(),m=Xe(),h=function(t){const e=Ln(t);return Kt(ie(),e),k&&j.log("[Tracing] Started span is an idle span"),e}(t);function g(){r&&(clearTimeout(r),r=void 0)}function _(t){g(),r=setTimeout(()=>{!s&&0===n.size&&i&&(o="idleTimeout",h.end(t))},c)}function v(t){r=setTimeout(()=>{!s&&i&&(o="heartbeatFailed",h.end(t))},l)}function y(t){s=!0,n.clear(),a.forEach(t=>t()),Kt(f,m);const e=He(h),{start_timestamp:r}=e;if(!r)return;e.data[ge]||h.setAttribute(ge,o),j.log(`[Tracing] Idle span "${e.op}" finished`);const i=Ye(h).filter(t=>t!==h);let l=0;i.forEach(e=>{e.isRecording()&&(e.setStatus({code:2,message:"cancelled"}),e.end(t),k&&j.log("[Tracing] Cancelling span since span ended early",JSON.stringify(e,void 0,2)));const n=He(e),{timestamp:r=0,start_timestamp:s=0}=n,o=s<=t,i=r-s<=(u+c)/1e3;if(k){const t=JSON.stringify(e,void 0,2);o?i||j.log("[Tracing] Discarding span since it finished after idle span final timeout",t):j.log("[Tracing] Discarding span since it happened after idle span was finished",t)}i&&o||(!function(t,e){t[We]&&t[We].delete(e)}(h,e),l++)}),l>0&&h.setAttribute("sentry.idle_span_discarded_spans",l)}return h.end=new Proxy(h.end,{apply(t,e,n){if(d&&d(h),e instanceof pn)return;const[r,...s]=n,o=Fe(r||Bt()),i=Ye(h).filter(t=>t!==h);if(!i.length)return y(o),Reflect.apply(t,e,[o,...s]);const a=i.map(t=>He(t).timestamp).filter(t=>!!t),c=a.length?Math.max(...a):void 0,l=He(h).start_timestamp,p=Math.min(l?l+u/1e3:1/0,Math.max(l||-1/0,Math.min(o,c||1/0)));return y(p),Reflect.apply(t,e,[p,...s])}}),a.push(p.on("spanStart",t=>{if(s||t===h||He(t).timestamp||t instanceof $n&&t.isStandaloneSpan())return;var e;Ye(h).includes(t)&&(e=t.spanContext().spanId,g(),n.set(e,!0),v(Bt()+l/1e3))})),a.push(p.on("spanEnd",t=>{var e;s||(e=t.spanContext().spanId,n.has(e)&&n.delete(e),0===n.size&&_(Bt()+c/1e3))})),a.push(p.on("idleSpanEnableAutoFinish",t=>
1{t===h&&(i=!0,_(),n.size&&v())})),e.disableAutoFinish||_(),setTimeout(()=>{s||(h.setStatus({code:2,message:"deadline_exceeded"}),o="finalTimeout",h.end())},u),h}function Bn(t){return new Wn(e=>{e(t)})}function zn(t){return new Wn((e,n)=>{n(t)})}class Wn{constructor(t){this._state=0,this._handlers=[],this._runExecutor(t)}then(t,e){return new Wn((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(s){r(s)}else n(e)},t=>{if(e)try{n(e(t))}catch(s){r(s)}else r(t)}]),this._executeHandlers()})}catch(t){return this.then(t=>t,t)}finally(t){return new Wn((e,n)=>{let r,s;return this.then(e=>{s=!1,r=e,t&&t()},e=>{s=!0,r=e,t&&t()}).then(()=>{s?n(r):e(r)})})}_executeHandlers(){if(0===this._state)return;const t=this._handlers.slice();this._handlers=[],t.forEach(t=>{t[0]||(1===this._state&&t[1](this._value),2===this._state&&t[2](this._value),t[0]=!0)})}_runExecutor(t){const e=(t,e)=>{0===this._state&&(mt(e)?e.then(n,r):(this._state=t,this._value=e,this._executeHandlers()))},n=t=>{e(1,t)},r=t=>{e(2,t)};try{t(n,r)}catch(s){r(s)}}}function Jn(t,e,n,r=0){return new Wn((s,o)=>{const i=t[r];if(null===e||"function"!=typeof i)s(e);else{const a=i({...e},n);k&&i.id&&null===a&&j.log(`Event processor "${i.id}" dropped event`),mt(a)?a.then(e=>Jn(t,e,n,r+1).then(s)).then(null,o):Jn(t,a,n,r+1).then(s).then(null,o)}})}function Gn(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=e;!function(t,e){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:a}=e;Object.keys(n).length&&(t.extra={...n,...t.extra});Object.keys(r).length&&(t.tags={...r,...t.tags});Object.keys(s).length&&(t.user={...s,...t.user});Object.keys(o).length&&(t.contexts={...o,...t.contexts});i&&(t.level=i);a&&"transaction"!==t.type&&(t.transaction=a)}(t,e),r&&function(t,e){t.contexts={trace:je(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:dn(e),...t.sdkProcessingMetadata};const n=Ve(e),r=He(n).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e));t.fingerprint.length||delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,s),function(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}(t,o)}function Yn(t,e){const{extra:n,tags:r,user:s,contexts:o,level:i,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:p,transactionName:f,span:m}=e;Vn(t,"extra",n),Vn(t,"tags",r),Vn(t,"user",s),Vn(t,"contexts",o),t.sdkProcessingMetadata=Gt(t.sdkProcessingMetadata,a,2),i&&(t.level=i),f&&(t.transactionName=f),m&&(t.span=m),c.length&&(t.breadcrumbs=[...t.breadcrumbs,...c]),u.length&&(t.fingerprint=[...t.fingerprint,...u]),l.length&&(t.eventProcessors=[...t.eventProcessors,...l]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext={...t.propagationContext,...p}}function Vn(t,e,n){t[e]=Gt(t[e],n,1)}let Xn,Kn,Zn;function Qn(t,e,n,r,s,o){const{normalizeDepth:i=3,normalizeMaxBreadth:a=1e3}=t,c={...e,event_id:e.event_id||n.event_id||Lt(),timestamp:e.timestamp||Ft()},u=n.integrations||t.integrations.map(t=>t.name);!function(t,e){const{environment:n,release:r,dist:s,maxValueLength:o=250}=e;t.environment=t.environment||n||tn,!t.release&&r&&(t.release=r);!t.dist&&s&&(t.dist=s);const i=t.request;(null==i?void 0:i.url)&&(i.url=Tt(i.url,o))}(c,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(c,u),s&&s.emit("applyFrameMetadata",e),void 0===e.type&&function(t,e){var n,r;const s=function(t){const e=I._sentryDebugIds;if(!e)return{};const n=Object.keys(e);return Zn&&n.length===Kn||(Kn=n.length,Zn=n.reduce((n,r)=>{Xn||(Xn={});const s=Xn[r];if(s)n[s[0]]=s[1];else{const s=t(r);for(let t=s.length-1;t>=0;t--){const o=s[t],i=null==o?void 0:o.filename,a=e[r];if(i&&a){n[i]=a,Xn[r]=[i,a];break}}}return n},{})),Zn}(e);null==(r=null==(n=t.exception)?void 0:n.values)||r.forEach(t=>{var e,n;
1null==(n=null==(e=t.stacktrace)?void 0:e.frames)||n.forEach(t=>{t.filename&&(t.debug_id=s[t.filename])})})}(c,t.stackParser);const l=function(t,e){if(!e)return t;const n=t?t.clone():new Qt;return n.update(e),n}(r,n.captureContext);n.mechanism&&jt(c,n.mechanism);const d=s?s.getEventProcessors():[],p=A("globalScope",()=>new Qt).getScopeData();if(o){Yn(p,o.getScopeData())}if(l){Yn(p,l.getScopeData())}const f=[...n.attachments||[],...p.attachments];f.length&&(n.attachments=f),Gn(c,p);return Jn([...d,...p.eventProcessors],c,n).then(t=>(t&&function(t){var e,n;const r={};if(null==(n=null==(e=t.exception)?void 0:e.values)||n.forEach(t=>{var e,n;null==(n=null==(e=t.stacktrace)?void 0:e.frames)||n.forEach(t=>{t.debug_id&&(t.abs_path?r[t.abs_path]=t.debug_id:t.filename&&(r[t.filename]=t.debug_id),delete t.debug_id)})}),0===Object.keys(r).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const s=t.debug_meta.images;Object.entries(r).forEach(([t,e])=>{s.push({type:"sourcemap",code_file:t,debug_id:e})})}(t),"number"==typeof i&&i>0?function(t,e,n){var r,s;if(!t)return null;const o={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>({...t,...t.data&&{data:fn(t.data,e,n)}}))},...t.user&&{user:fn(t.user,e,n)},...t.contexts&&{contexts:fn(t.contexts,e,n)},...t.extra&&{extra:fn(t.extra,e,n)}};(null==(r=t.contexts)?void 0:r.trace)&&o.contexts&&(o.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(o.contexts.trace.data=fn(t.contexts.trace.data,e,n)));t.spans&&(o.spans=t.spans.map(t=>({...t,...t.data&&{data:fn(t.data,e,n)}})));(null==(s=t.contexts)?void 0:s.flags)&&o.contexts&&(o.contexts.flags=fn(t.contexts.flags,3,n));return o}(t,i,a):t))}function tr(t){if(t)return function(t){return t instanceof Qt||"function"==typeof t}(t)||function(t){return Object.keys(t).some(t=>er.includes(t))}(t)?{captureContext:t}:t}const er=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function nr(t,e){return ie().captureException(t,tr(e))}function rr(t,e){return ie().captureEvent(t,e)}function sr(t){const e=ae(),n=ie(),{userAgent:r}=I.navigator||{},s=Wt({user:n.getUser()||e.getUser(),...r&&{userAgent:r},...t}),o=e.getSession();return"ok"===(null==o?void 0:o.status)&&Jt(o,{status:"exited"}),or(),e.setSession(s),s}function or(){const t=ae(),e=ie().getSession()||t.getSession();e&&function(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),Jt(t,n)}(e),ir(),t.setSession()}function ir(){const t=ae(),e=ue(),n=t.getSession();n&&e&&e.captureSession(n)}function ar(t=!1){t?or():ir()}function cr(t,e,n){return e||`${function(t){return`${function(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}(t)}${t.projectId}/envelope/`}(t)}?${function(t,e){const n={sentry_version:"7"};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}(t,n)}`}const ur=[];function lr(t){const e=t.defaultIntegrations||[],n=t.integrations;let r;if(e.forEach(t=>{t.isDefaultInstance=!0}),Array.isArray(n))r=[...e,...n];else if("function"==typeof n){const t=n(e);r=Array.isArray(t)?t:[t]}else r=e;return function(t){const e={};return t.forEach(t=>{const{name:n}=t,r=e[n];r&&!r.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)}),Object.values(e)}(r)}function dr(t,e){for(const n of e)(null==n?void 0:n.afterAllSetup)&&n.afterAllSetup(t)}function pr(t,e,n){if(n[e.name])k&&j.log(`Integration skipped because it was already installed: ${e.name}`);else{if(n[e.name]=e,-1===ur.indexOf(e.name)&&"function"==typeof e.setupOnce&&(e.setupOnce(),ur.push(e.name)),e.setup&&"function"==typeof e.setup&&e.setup(t),"function"==typeof e.preprocessEvent){const n=e.preprocessEvent.bind(e);t.on("preprocessEvent",(e,r)=>n(e,r,t))}if("function"==typeof e.processEvent){const n=e.processEvent.bind(e),r=Object.assign((e,r)=>n(e,r,t),{id:e.name});t.addEventProcessor(r)}k&&j.log(`Integration installed: ${e.name}`)}}function fr(t){const e=[];t.message&&e.push(t.message);try{const n=t.exception.values[t.exception.values.length-1];(null==n?void 0:n.value)&&(e.push(n.value),n.type&&e.push(`${n.type}: ${n.value}`))}catch{}return e}const mr="Not capturing exception because it's already been captured.",hr="Discarded session because of missing or non-string release",gr=Symbol.for("SentryInternalError"),_r=Symbol.for("SentryDoNotSendEventError");function vr(t){return{message:t,[gr]:!0}}function yr(t){return{message:t,[_r]:!0}}function br(t){return!!t&&"object"==typeof t&&gr in t}function Sr(t){return!!t&&"object"==typeof t&&_r in t}class Er{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=on(t.dsn):k&&j.warn("No DSN provided, client will not send events."),this._dsn){const e=cr(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}}captureException(t,e,n){const r=Lt();if(qt(t))return k&&j.log(mr),r;const s={event_id:r,...e};return this._process(this.eventFromException(t,s).then(t=>this._captureEvent(t,s,n))),s.event_id}captureMessage(t,e,n,r){const s={event_id:Lt(),...n},o=lt(t)?t:String(t),i=dt(t)?this.eventFromMessage(o,e,s):this.eventFromException(t,s);return this._process(i.then(t=>this._captureEvent(t,s,r))),s.event_id}captureEvent(t,e,n){const r=Lt();if((null==e?void 0:e.originalException)&&qt(e.originalException))return k&&j.log(mr),r;const s={event_id:r,...e},o=t.sdkProcessingMetadata||{},i=o.capturedSpanScope,a=o.capturedSpanIsolationScope;return this._process(this._captureEvent(t,s,i||n,a)),s.event_id}captureSession(t){this.sendSession(t),Jt(t,{init:!1})}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const e=this._transport;
1return e?(this.emit("flush"),this._isClientDoneProcessing(t).then(n=>e.flush(t).then(t=>n&&t))):Bn(!0)}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,this.emit("close"),t))}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){const e=this._integrations[t.name];pr(this,t,this._integrations),e||dr(this,[t])}sendEvent(t,e={}){this.emit("beforeSendEvent",t,e);let n=kn(t,this._dsn,this._options._metadata,this._options.tunnel);for(const s of e.attachments||[])n=_n(n,En(s));const r=this.sendEnvelope(n);r&&r.then(e=>this.emit("afterSendEvent",t,e),null)}sendSession(t){const{release:e,environment:n=tn}=this._options;if("aggregates"in t){const r=t.attrs||{};if(!r.release&&!e)return void(k&&j.warn(hr));r.release=r.release||e,r.environment=r.environment||n,t.attrs=r}else{if(!t.release&&!e)return void(k&&j.warn(hr));t.release=t.release||e,t.environment=t.environment||n}this.emit("beforeSendSession",t);const r=function(t,e,n,r){const s=wn(n);return gn({sent_at:(new Date).toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:rn(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(r)}recordDroppedEvent(t,e,n=1){if(this._options.sendClientReports){const r=`${t}:${e}`;k&&j.log(`Recording outcome: "${r}"${n>1?` (${n} times)`:""}`),this._outcomes[r]=(this._outcomes[r]||0)+n}}on(t,e){const n=this._hooks[t]=this._hooks[t]||[];return n.push(e),()=>{const t=n.indexOf(e);t>-1&&n.splice(t,1)}}emit(t,...e){const n=this._hooks[t];n&&n.forEach(t=>t(...e))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport?this._transport.send(t).then(null,t=>(k&&j.error("Error while sending envelope:",t),t)):(k&&j.error("Transport disabled"),Bn({}))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=function(t,e){const n={};return e.forEach(e=>{e&&pr(t,e,n)}),n}(this,t),dr(this,t)}_updateSessionFromEvent(t,e){var n;let r="fatal"===e.level,s=!1;const o=null==(n=e.exception)?void 0:n.values;if(o){s=!0;for(const t of o){const e=t.mechanism;if(!1===(null==e?void 0:e.handled)){r=!0;break}}}const i="ok"===t.status;(i&&0===t.errors||i&&r)&&(Jt(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new Wn(e=>{let n=0;const r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(t,e,n,r){const s=this.getOptions(),o=Object.keys(this._integrations);return!e.integrations&&(null==o?void 0:o.length)&&(e.integrations=o),this.emit("preprocessEvent",t,e),t.type||r.setLastEventId(t.event_id||e.event_id),Qn(s,t,e,n,this,r).then(t=>{if(null===t)return t;this.emit("postprocessEvent",t,e),t.contexts={trace:le(n),...t.contexts};const r=ln(this,n);return t.sdkProcessingMetadata={dynamicSamplingContext:r,...t.sdkProcessingMetadata},t})}_captureEvent(t,e={},n=ie(),r=ae()){return k&&Tr(t)&&j.log(`Captured error event \`${fr(t)[0]||"<unknown>"}\``),this._processEvent(t,e,n,r).then(t=>t.event_id,t=>{k&&(Sr(t)?j.log(t.message):br(t)?j.warn(t.message):j.warn(t))})}_processEvent(t,e,n,r){const s=this.getOptions(),{sampleRate:o}=s,i=xr(t),a=Tr(t),c=t.type||"error",u=`before send for type \`${c}\``,l=void 0===o?void 0:Re(o);if(a&&"number"==typeof l&&Math.random()>l)return this.recordDroppedEvent("sample_rate","error"),zn(yr(`Discarding event because it's not included in the random sample (sampling rate = ${o})`));const d="replay_event"===c?"replay":c;return this._prepareEvent(t,e,n,r).then(t=>{if(null===t)throw this.recordDroppedEvent("event_processor",d),yr("An event processor returned `null`, will not send event.");if(e.data&&!0===e.data.__sentry__)return t;const n=function(t,e,n,r){const{beforeSend:s,beforeSendTransaction:o,beforeSendSpan:i}=e;let a=n;if(Tr(a)&&s)return s(a,r);if(xr(a)){if(i){const t=i(function(t){var e;const{trace_id:n,parent_span_id:r,span_id:s,status:o,origin:i,data:a,op:c}=(null==(e=t.contexts)?void 0:e.trace)??{};return{data:a??{},description:t.transaction,op:c,parent_span_id:r,span_id:s??"",start_timestamp:t.start_timestamp??0,status:o,timestamp:t.timestamp,trace_id:n??"",origin:i,profile_id:null==a?void 0:a[be],exclusive_time:null==a?void 0:a[Se],measurements:t.measurements,is_segment:!0}}(a));if(t?a=Gt(n,{type:"transaction",timestamp:(c=t).timestamp,start_timestamp:c.start_timestamp,transaction:c.description,contexts:{trace:{trace_id:c.trace_id,span_id:c.span_id,parent_span_id:c.parent_span_id,op:c.op,status:c.status,origin:c.origin,data:{...c.data,...c.profile_id&&{[be]:c.profile_id},...c.exclusive_time&&{[Se]:c.exclusive_time}}}},measurements:c.measurements}):Ke(),a.spans){const t=[];for(const e of a.spans){const n=i(e);
1n?t.push(n):(Ke(),t.push(e))}a.spans=t}}if(o){if(a.spans){const t=a.spans.length;a.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:t}}return o(a,r)}}var c;return a}(0,s,t,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if(mt(t))return t.then(t=>{if(!pt(t)&&null!==t)throw vr(n);return t},t=>{throw vr(`${e} rejected with ${t}`)});if(!pt(t)&&null!==t)throw vr(n);return t}(n,u)}).then(s=>{var o;if(null===s){if(this.recordDroppedEvent("before_send",d),i){const e=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",e)}throw yr(`${u} returned \`null\`, will not send event.`)}const c=n.getSession()||r.getSession();if(a&&c&&this._updateSessionFromEvent(c,s),i){const t=((null==(o=s.sdkProcessingMetadata)?void 0:o.spanCountBeforeProcessing)||0)-(s.spans?s.spans.length:0);t>0&&this.recordDroppedEvent("before_send","span",t)}const l=s.transaction_info;if(i&&l&&s.transaction!==t.transaction){const t="custom";s.transaction_info={...l,source:t}}return this.sendEvent(s,e),s}).then(null,t=>{if(Sr(t)||br(t))throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),vr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})}_process(t){this._numProcessing++,t.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.entries(t).map(([t,e])=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e}})}_flushOutcomes(){k&&j.log("Flushing outcomes...");const t=this._clearOutcomes();if(0===t.length)return void(k&&j.log("No outcomes to send"));if(!this._dsn)return void(k&&j.log("No dsn provided, will not send outcomes"));k&&j.log("Sending outcomes:",t);const e=(n=t,gn((r=this._options.tunnel&&rn(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:s||Ft(),discarded_events:n}]]));var n,r,s;this.sendEnvelope(e)}}function Tr(t){return void 0===t.type}function xr(t){return"transaction"===t.type}function wr(t,e){const n=e??function(t){return kr().get(t)}(t)??[];if(0===n.length)return;const r=t.getOptions(),s=function(t,e,n,r){const s={};return(null==e?void 0:e.sdk)&&(s.sdk={name:e.sdk.name,version:e.sdk.version}),n&&r&&(s.dsn=rn(r)),gn(s,[(o=t,[{type:"log",item_count:o.length,content_type:"application/vnd.sentry.items.log+json"},{items:o}])]);var o}(n,r._metadata,r.tunnel,t.getDsn());kr().set(t,[]),t.emit("flushLogs"),t.sendEnvelope(s)}function kr(){return A("clientToLogBufferMap",()=>new WeakMap)}function Ir(t,e){!0===e.debug&&(k?j.enable():L(()=>{}));ie().update(e.initialScope);const n=new t(e);return function(t){ie().setClient(t)}(n),n.init(),n}const $r=Symbol.for("SentryBufferFullError");function Cr(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]||Promise.resolve(void 0)}return{$:e,add:function(r){if(!(void 0===t||e.length<t))return zn($r);const s=r();return-1===e.indexOf(s)&&e.push(s),s.then(()=>n(s)).then(null,()=>n(s).then(null,()=>{})),s},drain:function(t){return new Wn((n,r)=>{let s=e.length;if(!s)return n(!0);const o=setTimeout(()=>{t&&t>0&&n(!1)},t);e.forEach(t=>{Bn(t).then(()=>{--s||(clearTimeout(o),n(!0))},r)})})}}}function Pr(t,{statusCode:e,headers:n},r=Date.now()){const s={...t},o=null==n?void 0:n["x-sentry-rate-limits"],i=null==n?void 0:n["retry-after"];if(o)for(const a of o.trim().split(",")){const[t,e,,,n]=a.split(":",5),o=parseInt(t,10),i=1e3*(isNaN(o)?60:o);if(e)for(const a of e.split(";"))"metric_bucket"===a&&n&&!n.split(";").includes("custom")||(s[a]=r+i);else s.all=r+i}else i?s.all=r+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}(i,r):429===e&&(s.all=r+6e4);return s}function Ar(t,e,n=Cr(t.bufferSize||64)){let r={};return{send:function(s){const o=[];if(vn(s,(e,n)=>{const s=xn(n);!function(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}(r,s)?o.push(e):t.recordDroppedEvent("ratelimit_backoff",s)}),0===o.length)return Bn({});const i=gn(s[0],o),a=e=>{vn(i,(n,r)=>{t.recordDroppedEvent(e,xn(r))})};return n.add(()=>e({body:bn(i)}).then(t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&k&&j.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=Pr(r,t),t),t=>{throw a("network_error"),k&&j.error("Encountered error running transport request:",t),t})).then(t=>t,t=>{if(t===$r)return k&&j.error("Skipped sending event because buffer is full."),a("queue_overflow"),Bn({});throw t})},flush:t=>n.drain(t)}}function Rr(t){var e;void 0===(null==(e=t.user)?void 0:e.ip_address)&&(t.user={...t.user,ip_address:"{{auto}}"})}function Or(t){var e;"aggregates"in t?void 0===(null==(e=t.attrs)?void 0:e.ip_address)&&(t.attrs={...t.attrs,ip_address:"{{auto}}"}):void 0===t.ipAddress&&(t.ipAddress="{{auto}}")}function Lr(t,e,n=[e],r="npm"){const s=t._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${e}`,packages:n.map(t=>({name:`${r}:@sentry/${t}`,version:$})),version:$}),t._metadata=s}function Dr(t={}){const e=t.client||ue();if(!function(){const t=ue();return!1!==(null==t?void 0:t.getOptions().enabled)&&!!(null==t?void 0:t.getTransport())}()||!e)return{};const n=oe(C());if(n.getTraceData)return n.getTraceData(t);const r=t.scope||ie(),s=t.span||Xe(),o=s?function(t){const{traceId:e,spanId:n}=t.spanContext();return De(e,n,Be(t))}(s):function(t){const{traceId:e,sampled:n,propagationSpanId:r}=t.getPropagationContext();return De(e,r,n)}(r),i=Pe(s?dn(s):ln(e,r));return Oe.test(o)?{"sentry-trace":o,baggage:i}:(j.warn("Invalid sentry-trace data. Cannot generate trace data"),{})}const Nr=100;
1function Mr(t,e){const n=ue(),r=ae();if(!n)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:o=Nr}=n.getOptions();if(o<=0)return;const i={timestamp:Ft(),...t},a=s?L(()=>s(i,e)):i;null!==a&&(n.emit&&n.emit("beforeAddBreadcrumb",a,e),r.addBreadcrumb(a,o))}let jr;const qr=new WeakMap,Fr=()=>({name:"FunctionToString",setupOnce(){jr=Function.prototype.toString;try{Function.prototype.toString=function(...t){const e=Pt(this),n=qr.has(ue())&&void 0!==e?e:this;return jr.apply(n,t)}}catch{}},setup(t){qr.set(t,!0)}}),Ur=[/^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$/],Hr=(t={})=>{let e;return{name:"EventFilters",setup(n){const r=n.getOptions();e=zr(t,r)},processEvent(n,r,s){if(!e){const n=s.getOptions();e=zr(t,n)}return function(t,e){if(t.type){if("transaction"===t.type&&function(t,e){if(!(null==e?void 0:e.length))return!1;const n=t.transaction;return!!n&&kt(n,e)}(t,e.ignoreTransactions))return k&&j.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${Nt(t)}`),!0}else{if(function(t,e){if(!(null==e?void 0:e.length))return!1;return fr(t).some(t=>kt(t,e))}(t,e.ignoreErrors))return k&&j.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${Nt(t)}`),!0;if(function(t){var e,n;if(!(null==(n=null==(e=t.exception)?void 0:e.values)?void 0:n.length))return!1;return!t.message&&!t.exception.values.some(t=>t.stacktrace||t.type&&"Error"!==t.type||t.value)}(t))return k&&j.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${Nt(t)}`),!0;if(function(t,e){if(!(null==e?void 0:e.length))return!1;const n=Wr(t);return!!n&&kt(n,e)}(t,e.denyUrls))return k&&j.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${Nt(t)}.\nUrl: ${Wr(t)}`),!0;if(!function(t,e){if(!(null==e?void 0:e.length))return!0;const n=Wr(t);return!n||kt(n,e)}(t,e.allowUrls))return k&&j.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${Nt(t)}.\nUrl: ${Wr(t)}`),!0}return!1}(n,e)?null:n}}},Br=(t={})=>({...Hr(t),name:"InboundFilters"});function zr(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...t.disableErrorDefaults?[]:Ur],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]]}}function Wr(t){var e,n;try{const r=[...(null==(e=t.exception)?void 0:e.values)??[]].reverse().find(t=>{var e,n,r;return void 0===(null==(e=t.mechanism)?void 0:e.parent_id)&&(null==(r=null==(n=t.stacktrace)?void 0:n.frames)?void 0:r.length)}),s=null==(n=null==r?void 0:r.stacktrace)?void 0:n.frames;return s?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(s):null}catch{return k&&j.error(`Cannot extract url for event ${Nt(t)}`),null}}function Jr(t,e,n,r,s,o){var i;if(!(null==(i=s.exception)?void 0:i.values)||!o||!ht(o.originalException,Error))return;const a=s.exception.values.length>0?s.exception.values[s.exception.values.length-1]:void 0;a&&(s.exception.values=Gr(t,e,r,o.originalException,n,s.exception.values,a,0))}function Gr(t,e,n,r,s,o,i,a){if(o.length>=n+1)return o;let c=[...o];if(ht(r[s],Error)){Yr(i,a);const o=t(e,r[s]),u=c.length;Vr(o,s,u,a),c=Gr(t,e,n,r[s],s,[o,...c],o,u)}return Array.isArray(r.errors)&&r.errors.forEach((r,o)=>{if(ht(r,Error)){Yr(i,a);const u=t(e,r),l=c.length;Vr(u,`errors[${o}]`,l,a),c=Gr(t,e,n,r,s,[u,...c],u,l)}}),c}function Yr(t,e){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,..."AggregateError"===t.type&&{is_exception_group:!0}
1,exception_id:e}}function Vr(t,e,n,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:e,exception_id:n,parent_id:r}}function Xr(){"console"in I&&R.forEach(function(t){t in I.console&&It(I.console,t,function(e){return O[t]=e,function(...e){K("console",{args:e,level:t});const n=O[t];null==n||n.apply(I.console,e)}})})}function Kr(t){return"warn"===t?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const Zr=()=>{let t;return{name:"Dedupe",processEvent(e){if(e.type)return e;try{if(function(t,e){if(!e)return!1;if(function(t,e){const n=t.message,r=e.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!ts(t,e))return!1;if(!Qr(t,e))return!1;return!0}(t,e))return!0;if(function(t,e){const n=es(e),r=es(t);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!ts(t,e))return!1;if(!Qr(t,e))return!1;return!0}(t,e))return!0;return!1}(e,t))return k&&j.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return t=e}}};function Qr(t,e){let n=J(t),r=J(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let s=0;s<r.length;s++){const t=r[s],e=n[s];if(t.filename!==e.filename||t.lineno!==e.lineno||t.colno!==e.colno||t.function!==e.function)return!1}return!0}function ts(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch{return!1}}function es(t){var e,n;return null==(n=null==(e=t.exception)?void 0:e.values)?void 0:n[0]}function ns(t){return"isRelative"in t}function rs(t,e){const n=t.indexOf("://")<=0&&0!==t.indexOf("//"),r=e??(n?"thismessage:/":void 0);try{if("canParse"in URL&&!URL.canParse(t,r))return;const e=new URL(t,r);return n?{isRelative:n,pathname:e.pathname,search:e.search,hash:e.hash}:e}catch{}}function ss(t){if(ns(t))return t.pathname;const e=new URL(t);return e.search="",e.hash="",["80","443"].includes(e.port)&&(e.port=""),e.password&&(e.password="%filtered%"),e.username&&(e.username="%filtered%"),e.toString()}function os(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function is(t,e,n,r,s="auto.http.browser"){if(!t.fetchData)return;const{method:o,url:i}=t.fetchData,a=Qe()&&e(i);if(t.endTimestamp&&a){const e=t.fetchData.__span;if(!e)return;const n=r[e];return void(n&&(!function(t,e){var n,r;if(e.response){Te(t,e.response.status);const s=null==(r=null==(n=e.response)?void 0:n.headers)?void 0:r.get("content-length");if(s){const e=parseInt(s);e>0&&t.setAttribute("http.response_content_length",e)}}else e.error&&t.setStatus({code:2,message:"internal_error"});t.end()}(n,t),delete r[e]))}const c=!!Xe(),u=a&&c?Ln(function(t,e,n){const r=rs(t);return{name:r?`${e} ${ss(r)}`:e,attributes:cs(t,r,e,n)}}(i,o,s)):new pn;if(t.fetchData.__span=u.spanContext().spanId,r[u.spanContext().spanId]=u,n(t.fetchData.url)){const e=t.args[0],n=t.args[1]||{},r=function(t,e,n){const r=Dr({span:n}),s=r["sentry-trace"],o=r.baggage;if(!s)return;const i=e.headers||(_t(t)?t.headers:void 0);if(i){if(function(t){return"undefined"!=typeof Headers&&ht(t,Headers)}(i)){const t=new Headers(i);if(t.get("sentry-trace")||t.set("sentry-trace",s),o){const e=t.get("baggage");e?as(e)||t.set("baggage",`${e},${o}`):t.set("baggage",o)}return t}if(Array.isArray(i)){const t=[...i];i.find(t=>"sentry-trace"===t[0])||t.push(["sentry-trace",s]);const e=i.find(t=>"baggage"===t[0]&&as(t[1]));return o&&!e&&t.push(["baggage",o]),t}{const t="sentry-trace"in i?i["sentry-trace"]:void 0,e="baggage"in i?i.baggage:void 0,n=e?Array.isArray(e)?[...e]:[e]:[],r=e&&(Array.isArray(e)?e.find(t=>as(t)):as(e));return o&&!r&&n.push(o),{...i,"sentry-trace":t??s,baggage:n.length>0?n.join(","):void 0}}}return{...r}}(e,n,Qe()&&c?u:void 0);r&&(t.args[1]=n,n.headers=r)}const l=ue();if(l){const e={input:t.args,response:t.response,startTimestamp:t.startTimestamp,endTimestamp:t.endTimestamp};l.emit("beforeOutgoingRequestSpan",u,e)}return u}function as(t){return t.split(",").some(t=>t.trim().startsWith(Ie))}function cs(t,e,n,r){const s={url:t,type:"fetch","http.method":n,[he]:r,[me]:"http.client"};return e&&(ns(e)||(s["http.url"]=e.href,s["server.address"]=e.host),e.search&&(s["http.query"]=e.search),e.hash&&(s["http.fragment"]=e.hash)),s}function us(t){return void 0===t?void 0:t>=400&&t<500?"warning":t>=500?"error":void 0}const ls=I;function ds(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function ps(){var t;if("string"==typeof EdgeRuntime)return!0;
1if(!function(){if(!("fetch"in ls))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}())return!1;if(ds(ls.fetch))return!0;let e=!1;const n=ls.document;if(n&&"function"==typeof n.createElement)try{const r=n.createElement("iframe");r.hidden=!0,n.head.appendChild(r),(null==(t=r.contentWindow)?void 0:t.fetch)&&(e=ds(r.contentWindow.fetch)),n.head.removeChild(r)}catch(r){k&&j.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",r)}return e}function fs(t,e){const n="fetch";V(n,t),X(n,()=>ms(void 0,e))}function ms(t,e=!1){e&&!ps()||It(I,"fetch",function(e){return function(...n){const r=new Error,{method:s,url:o}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:_s(e),method:gs(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:_s(e),method:gs(e,"method")?String(e.method).toUpperCase():"GET"}}(n),i={args:n,fetchData:{method:s,url:o},startTimestamp:1e3*Bt(),virtualError:r,headers:vs(n)};return t||K("fetch",{...i}),e.apply(I,n).then(async e=>(t?t(e):K("fetch",{...i,endTimestamp:1e3*Bt(),response:e}),e),t=>{if(K("fetch",{...i,endTimestamp:1e3*Bt(),error:t}),ot(t)&&void 0===t.stack&&(t.stack=r.stack,$t(t,"framesToPop",1)),t instanceof TypeError&&("Failed to fetch"===t.message||"Load failed"===t.message||"NetworkError when attempting to fetch resource."===t.message))try{const e=new URL(i.fetchData.url);t.message=`${t.message} (${e.host})`}catch{}throw t})}})}function hs(t){let e;try{e=t.clone()}catch{return}!async function(t,e){if(null==t?void 0:t.body){const n=t.body,r=n.getReader(),s=setTimeout(()=>{n.cancel().then(null,()=>{})},9e4);let o=!0;for(;o;){let t;try{t=setTimeout(()=>{n.cancel().then(null,()=>{})},5e3);const{done:s}=await r.read();clearTimeout(t),s&&(e(),o=!1)}catch{o=!1}finally{clearTimeout(t)}}clearTimeout(s),r.releaseLock(),n.cancel().then(null,()=>{})}}(e,()=>{K("fetch-body-resolved",{endTimestamp:1e3*Bt(),response:t})})}function gs(t,e){return!!t&&"object"==typeof t&&!!t[e]}function _s(t){return"string"==typeof t?t:t?gs(t,"url")?t.url:t.toString?t.toString():"":""}function vs(t){const[e,n]=t;try{if("object"==typeof n&&null!==n&&"headers"in n&&n.headers)return new Headers(n.headers);if(_t(e))return new Headers(e.headers)}catch{}}const ys=I;let bs=0;function Ss(){return bs>0}function Es(t,e={}){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return"function"==typeof e?e:t;if(Pt(t))return t}catch{return t}const n=function(...n){try{const r=n.map(t=>Es(t,e));return t.apply(this,r)}catch(r){throw bs++,setTimeout(()=>{bs--}),ce(t=>{t.addEventProcessor(t=>(e.mechanism&&(Mt(t,void 0,void 0),jt(t,e.mechanism)),t.extra={...t.extra,arguments:n},t)),nr(r)}),r}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])}catch{}Ct(n,t),$t(t,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>t.name})}catch{}return n}function Ts(){const t=St(),{referrer:e}=ys.document||{},{userAgent:n}=ys.navigator||{};return{url:t,headers:{...e&&{Referer:e},...n&&{"User-Agent":n}}}}function xs(t,e){const n=Is(t,e),r={type:Ps(e),value:As(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function ws(t,e,n,r){const s=ue(),o=null==s?void 0:s.getOptions().normalizeDepth,i=function(t){for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e)){const n=t[e];if(n instanceof Error)return n}return}(e),a={__serialized__:mn(e,o)};if(i)return{exception:{values:[xs(t,i)]},extra:a};const c={exception:{values:[{type:ft(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Ls(e,{isUnhandledRejection:r})}]},extra:a};if(n){const e=Is(t,n);e.length&&(c.exception.values[0].stacktrace={frames:e})}return c}function ks(t,e){return{exception:{values:[xs(t,e)]}}}function Is(t,e){const n=e.stacktrace||e.stack||"",r=function(t){if(t&&$s.test(t.message))return 1;return 0}(e),s=function(t){if("number"==typeof t.framesToPop)return t.framesToPop;return 0}(e);try{return t(n,r,s)}catch{}return[]}const $s=/Minified React error #\d+;/i;function Cs(t){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&t instanceof WebAssembly.Exception}function Ps(t){const e=null==t?void 0:t.name;if(!e&&Cs(t)){return t.message&&Array.isArray(t.message)&&2==t.message.length?t.message[0]:"WebAssembly.Exception"}return e}function As(t){const e=null==t?void 0:t.message;return Cs(t)?Array.isArray(t.message)&&2==t.message.length?t.message[1]:"wasm exception":e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function Rs(t,e,n,r,s){let o;if(at(e)&&e.error){return ks(t,e.error)}if(ct(e)||it(e,"DOMException")){const s=e;if("stack"in e)o=ks(t,e);else{const e=s.name||(ct(s)?"DOMError":"DOMException"),i=s.message?`${e}: ${s.message}`:e;o=Os(t,i,n,r),Mt(o,i)}return"code"in s&&(o.tags={...o.tags,"DOMException.code":`${s.code}`}),o}if(ot(e))return ks(t,e);if(pt(e)||ft(e)){return o=ws(t,e,n,s),jt(o,{synthetic:!0}),o}return o=Os(t,e,n,r),Mt(o,`${e}`,void 0),jt(o,{synthetic:!0}),o}function Os(t,e,n,r){const s={};if(r&&n){const r=Is(t,n);r.length&&(s.exception={values:[{value:e,stacktrace:{frames:r}}]}),jt(s,{synthetic:!0})}
1if(lt(e)){const{__sentry_template_string__:t,__sentry_template_values__:n}=e;return s.logentry={message:t,params:n},s}return s.message=e,s}function Ls(t,{isUnhandledRejection:e}){const n=function(t,e=40){const n=Object.keys(At(t));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=e)return Tt(r,e);for(let s=n.length;s>0;s--){const t=n.slice(0,s).join(", ");if(!(t.length>e))return s===n.length?t:Tt(t,e)}return""}(t),r=e?"promise rejection":"exception";if(at(t))return`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``;if(ft(t)){return`Event \`${function(t){try{const e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}(t)}\` (type=${t.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${n}`}class Ds extends Er{constructor(t){const e=(n=t,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:null==(r=ys.SENTRY_RELEASE)?void 0:r.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...n});var n,r;Lr(e,"browser",["browser"],ys.SENTRY_SDK_SOURCE||"npm"),super(e);const{sendDefaultPii:s,sendClientReports:o,enableLogs:i,_experiments:a}=this._options,c=i??(null==a?void 0:a.enableLogs);ys.document&&(o||c)&&ys.document.addEventListener("visibilitychange",()=>{"hidden"===ys.document.visibilityState&&(o&&this._flushOutcomes(),c&&wr(this))}),c&&(this.on("flush",()=>{wr(this)}),this.on("afterCaptureLog",()=>{this._logFlushIdleTimeout&&clearTimeout(this._logFlushIdleTimeout),this._logFlushIdleTimeout=setTimeout(()=>{wr(this)},5e3)})),s&&(this.on("postprocessEvent",Rr),this.on("beforeSendSession",Or))}eventFromException(t,e){return function(t,e,n,r){const s=Rs(t,e,(null==n?void 0:n.syntheticException)||void 0,r);return jt(s),s.level="error",(null==n?void 0:n.event_id)&&(s.event_id=n.event_id),Bn(s)}(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return function(t,e,n="info",r,s){const o=Os(t,e,(null==r?void 0:r.syntheticException)||void 0,s);return o.level=n,(null==r?void 0:r.event_id)&&(o.event_id=r.event_id),Bn(o)}(this._options.stackParser,t,e,n,this._options.attachStacktrace)}_prepareEvent(t,e,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n,r)}}const Ns="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ms=I,js=(t,e,n,r)=>{let s,o;return i=>{e.value>=0&&(i||r)&&(o=e.value-(s??0),(o||void 0===s)&&(s=e.value,e.delta=o,e.rating=((t,e)=>t>e[1]?"poor":t>e[0]?"needs-improvement":"good")(e.value,n),t(e)))}},qs=(t=!0)=>{var e,n;const r=null==(n=null==(e=Ms.performance)?void 0:e.getEntriesByType)?void 0:n.call(e,"navigation")[0];if(!t||r&&r.responseStart>0&&r.responseStart<performance.now())return r},Fs=()=>{const t=qs();return(null==t?void 0:t.activationStart)??0},Us=(t,e=-1)=>{var n,r;const s=qs();let o="navigate";s&&((null==(n=Ms.document)?void 0:n.prerendering)||Fs()>0?o="prerender":(null==(r=Ms.document)?void 0:r.wasDiscarded)?o="restore":s.type&&(o=s.type.replace(/_/g,"-")));return{name:t,value:e,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:o}},Hs=new WeakMap;function Bs(t,e){return Hs.get(t)||Hs.set(t,new e),Hs.get(t)}class zs{constructor(){zs.prototype.__init.call(this),zs.prototype.__init2.call(this)}__init(){this._sessionValue=0}__init2(){this._sessionEntries=[]}_processEntry(t){var e;if(t.hadRecentInput)return;const n=this._sessionEntries[0],r=this._sessionEntries[this._sessionEntries.length-1];this._sessionValue&&n&&r&&t.startTime-r.startTime<1e3&&t.startTime-n.startTime<5e3?(this._sessionValue+=t.value,this._sessionEntries.push(t)):(this._sessionValue=t.value,this._sessionEntries=[t]),null==(e=this._onAfterProcessingUnexpectedShift)||e.call(this,t)}}const Ws=(t,e,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(t=>{Promise.resolve().then(()=>{e(t.getEntries())})});return r.observe({type:t,buffered:!0,...n}),r}}catch{}},Js=t=>{let e=!1;return()=>{e||(t(),e=!0)}};let Gs=-1;const Ys=t=>{"hidden"===Ms.document.visibilityState&&Gs>-1&&(Gs="visibilitychange"===t.type?t.timeStamp:0,Vs())},Vs=()=>{removeEventListener("visibilitychange",Ys,!0),removeEventListener("prerenderingchange",Ys,!0)},Xs=()=>{var t;if(Ms.document&&Gs<0){const e=Fs(),n=Ms.document.prerendering||null==(t=globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0])?void 0:t.startTime;Gs=n??(()=>{var t,e;return"hidden"!==(null==(t=Ms.document)?void 0:t.visibilityState)||(null==(e=Ms.document)?void 0:e.prerendering)?1/0:0})(),addEventListener("visibilitychange",Ys,!0),addEventListener("prerenderingchange",Ys,!0)}return{get firstHiddenTime(){return Gs}}},Ks=t=>{var e;(null==(e=Ms.document)?void 0:e.prerendering)?addEventListener("prerenderingchange",()=>t(),!0):t()},Zs=[1800,3e3],Qs=[.1,.25],to=(t,e={})=>{((t,e={})=>{Ks(()=>{const n=Xs(),r=Us("FCP");let s;const o=Ws("paint",t=>{for(const e of t)"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-Fs(),0),r.entries.push(e),s(!0)))});o&&(s=js(t,r,Zs,e.reportAllChanges))})})(Js(()=>{var n,r;const s=Us("CLS",0);let o;const i=Bs(e,zs),a=t=>{for(const e of t)i._processEntry(e);i._sessionValue>
1s.value&&(s.value=i._sessionValue,s.entries=i._sessionEntries,o())},c=Ws("layout-shift",a);c&&(o=js(t,s,Qs,e.reportAllChanges),null==(n=Ms.document)||n.addEventListener("visibilitychange",()=>{var t;"hidden"===(null==(t=Ms.document)?void 0:t.visibilityState)&&(a(c.takeRecords()),o(!0))}),null==(r=null==Ms?void 0:Ms.setTimeout)||r.call(Ms,o))}))},eo=t=>{const e=e=>{var n;"pagehide"!==e.type&&"hidden"!==(null==(n=Ms.document)?void 0:n.visibilityState)||t(e)};Ms.document&&(addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0))},no=[100,300];let ro=0,so=1/0,oo=0;const io=t=>{t.forEach(t=>{t.interactionId&&(so=Math.min(so,t.interactionId),oo=Math.max(oo,t.interactionId),ro=oo?(oo-so)/7+1:0)})};let ao;const co=()=>ao?ro:performance.interactionCount||0;let uo=0;class lo{constructor(){lo.prototype.__init.call(this),lo.prototype.__init2.call(this)}__init(){this._longestInteractionList=[]}__init2(){this._longestInteractionMap=new Map}_resetInteractions(){uo=co(),this._longestInteractionList.length=0,this._longestInteractionMap.clear()}_estimateP98LongestInteraction(){const t=Math.min(this._longestInteractionList.length-1,Math.floor((co()-uo)/50));return this._longestInteractionList[t]}_processEntry(t){var e,n;if(null==(e=this._onBeforeProcessingEntry)||e.call(this,t),!t.interactionId&&"first-input"!==t.entryType)return;const r=this._longestInteractionList.at(-1);let s=this._longestInteractionMap.get(t.interactionId);if(s||this._longestInteractionList.length<10||t.duration>r._latency){if(s?t.duration>s._latency?(s.entries=[t],s._latency=t.duration):t.duration===s._latency&&t.startTime===s.entries[0].startTime&&s.entries.push(t):(s={id:t.interactionId,entries:[t],_latency:t.duration},this._longestInteractionMap.set(s.id,s),this._longestInteractionList.push(s)),this._longestInteractionList.sort((t,e)=>e._latency-t._latency),this._longestInteractionList.length>10){const t=this._longestInteractionList.splice(10);for(const e of t)this._longestInteractionMap.delete(e.id)}null==(n=this._onAfterProcessingINPCandidate)||n.call(this,s)}}}const po=t=>{var e;const n=Ms.requestIdleCallback||Ms.setTimeout;"hidden"===(null==(e=Ms.document)?void 0:e.visibilityState)?t():(n(t=Js(t)),eo(t))},fo=[200,500],mo=(t,e={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Ks(()=>{"interactionCount"in performance||ao||(ao=Ws("event",io,{type:"event",buffered:!0,durationThreshold:0}));const n=Us("INP");let r;const s=Bs(e,lo),o=t=>{po(()=>{for(const n of t)s._processEntry(n);const e=s._estimateP98LongestInteraction();e&&e._latency!==n.value&&(n.value=e._latency,n.entries=e.entries,r())})},i=Ws("event",o,{durationThreshold:e.durationThreshold??40});r=js(t,n,fo,e.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),eo(()=>{o(i.takeRecords()),r(!0)}))})};class ho{_processEntry(t){var e;null==(e=this._onBeforeProcessingEntry)||e.call(this,t)}}const go=[2500,4e3],_o=[800,1800],vo=t=>{var e,n;(null==(e=Ms.document)?void 0:e.prerendering)?Ks(()=>vo(t)):"complete"!==(null==(n=Ms.document)?void 0:n.readyState)?addEventListener("load",()=>vo(t),!0):setTimeout(t)},yo={},bo={};let So,Eo,To,xo,wo;function ko(t,e=!1){return Do("cls",t,Po,So,e)}function Io(t,e=!1){return Do("lcp",t,Ro,To,e)}function $o(t,e){return No(t,e),bo[t]||(!function(t){const e={};"event"===t&&(e.durationThreshold=0);Ws(t,e=>{Co(t,{entries:e})},e)}(t),bo[t]=!0),Mo(t,e)}function Co(t,e){const n=yo[t];if(null==n?void 0:n.length)for(const s of n)try{s(e)}catch(r){Ns&&j.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${W(s)}\nError:`,r)}}function Po(){return to(t=>{Co("cls",{metric:t}),So=t},{reportAllChanges:!0})}function Ao(){return((t,e={})=>{Ks(()=>{const n=Xs(),r=Us("FID");let s;const o=t=>{t.startTime<n.firstHiddenTime&&(r.value=t.processingStart-t.startTime,r.entries.push(t),s(!0))},i=t=>{t.forEach(o)},a=Ws("first-input",i);s=js(t,r,no,e.reportAllChanges),a&&eo(Js(()=>{i(a.takeRecords()),a.disconnect()}))})})(t=>{Co("fid",{metric:t}),Eo=t})}function Ro(){return((t,e={})=>{Ks(()=>{const n=Xs(),r=Us("LCP");let s;const o=Bs(e,ho),i=t=>{e.reportAllChanges||(t=t.slice(-1));for(const e of t)o._processEntry(e),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-Fs(),0),r.entries=[e],s())},a=Ws("largest-contentful-paint",i);if(a){s=js(t,r,go,e.reportAllChanges);const n=Js(()=>{i(a.takeRecords()),a.disconnect(),s(!0)});for(const t of["keydown","click","visibilitychange"])Ms.document&&addEventListener(t,()=>po(n),{capture:!0,once:!0})}})})(t=>{Co("lcp",{metric:t}),To=t},{reportAllChanges:!0})}function Oo(){return((t,e={})=>{const n=Us("TTFB"),r=js(t,n,_o,e.reportAllChanges);vo(()=>{const t=qs();t&&(n.value=Math.max(t.responseStart-Fs(),0),n.entries=[t],r(!0))})})(t=>{Co("ttfb",{metric:t}),xo=t})}function Lo(){return mo(t=>{Co("inp",{metric:t}),wo=t})}function Do(t,e,n,r,s=!1){let o;return No(t,e),bo[t]||(o=n(),bo[t]=!0),r&&e({metric:r}),Mo(t,e,s?o:void 0)}function No(t,e){yo[t]=yo[t]||[],yo[t].push(e)}function Mo(t,e,n){return()=>{n&&n();const r=yo[t];if(!r)return;const s=r.indexOf(e);-1!==s&&r.splice(s,1)}}function jo(t){return"number"==typeof t&&isFinite(t)}
1function qo(t,e,n,{...r}){const s=He(t).start_timestamp;return s&&s>e&&"function"==typeof t.updateStartTime&&t.updateStartTime(e),Dn(t,()=>{const t=Ln({startTime:e,...r});return t&&t.end(n),t})}function Fo(t){var e;const n=ue();if(!n)return;const{name:r,transaction:s,attributes:o,startTime:i}=t,{release:a,environment:c,sendDefaultPii:u}=n.getOptions(),l=n.getIntegrationByName("Replay"),d=null==l?void 0:l.getReplayId(),p=ie(),f=p.getUser(),m=void 0!==f?f.email||f.id||f.ip_address:void 0;let h;try{h=p.getScopeData().contexts.profile.profile_id}catch{}return Ln({name:r,attributes:{release:a,environment:c,user:m||void 0,profile_id:h||void 0,replay_id:d||void 0,transaction:s,"user_agent.original":null==(e=Ms.navigator)?void 0:e.userAgent,"client.address":u?"{{auto}}":void 0,...o},startTime:i,experimental:{standalone:!0}})}function Uo(){return Ms.addEventListener&&Ms.performance}function Ho(t){return t/1e3}function Bo(t){let e="unknown",n="unknown",r="";for(const s of t){if("/"===s){[e,n]=t.split("/");break}if(!isNaN(Number(s))){e="h"===r?"http":r,n=t.split(r)[1];break}r+=s}return r===t&&(e=r),{name:e,version:n}}function zo(t){try{return PerformanceObserver.supportedEntryTypes.includes(t)}catch{return!1}}function Wo(t,e){let n,r=!1;function s(t){!r&&n&&e(t,n),r=!0}eo(()=>{s("pagehide")});const o=t.on("beforeStartNavigationSpan",(t,e)=>{(null==e?void 0:e.isRedirect)||(s("navigation"),null==o||o(),null==i||i())}),i=t.on("afterStartPageLoadSpan",t=>{n=t.spanContext().spanId,null==i||i()})}function Jo(t){let e,n=0;if(!zo("layout-shift"))return;const r=ko(({metric:t})=>{const r=t.entries[t.entries.length-1];r&&(n=t.value,e=r)},!0);Wo(t,(t,s)=>{!function(t,e,n,r){var s;Ns&&j.log(`Sending CLS span (${t})`);const o=Ho((zt()||0)+((null==e?void 0:e.startTime)||0)),i=ie().getScopeData().transactionName,a=e?yt(null==(s=e.sources[0])?void 0:s.node):"Layout shift",c={[he]:"auto.http.browser.cls",[me]:"ui.webvital.cls",[Se]:(null==e?void 0:e.duration)||0,"sentry.pageload.span_id":n,"sentry.report_event":r};(null==e?void 0:e.sources)&&e.sources.forEach((t,e)=>{c[`cls.source.${e+1}`]=yt(t.node)});const u=Fo({name:a,transaction:i,attributes:c,startTime:o});u&&(u.addEvent("cls",{[_e]:"",[ve]:t}),u.end(o))}(n,e,s,t),r()})}function Go(t){let e,n=0;if(!zo("largest-contentful-paint"))return;const r=Io(({metric:t})=>{const r=t.entries[t.entries.length-1];r&&(n=t.value,e=r)},!0);Wo(t,(t,s)=>{!function(t,e,n,r){Ns&&j.log(`Sending LCP span (${t})`);const s=Ho((zt()||0)+((null==e?void 0:e.startTime)||0)),o=ie().getScopeData().transactionName,i=e?yt(e.element):"Largest contentful paint",a={[he]:"auto.http.browser.lcp",[me]:"ui.webvital.lcp",[Se]:0,"sentry.pageload.span_id":n,"sentry.report_event":r};e&&(e.element&&(a["lcp.element"]=yt(e.element)),e.id&&(a["lcp.id"]=e.id),e.url&&(a["lcp.url"]=e.url.trim().slice(0,200)),null!=e.loadTime&&(a["lcp.loadTime"]=e.loadTime),null!=e.renderTime&&(a["lcp.renderTime"]=e.renderTime),null!=e.size&&(a["lcp.size"]=e.size));const c=Fo({name:i,transaction:o,attributes:a,startTime:s});c&&(c.addEvent("lcp",{[_e]:"millisecond",[ve]:t}),c.end(s))}(n,e,s,t),r()})}let Yo,Vo,Xo=0,Ko={};function Zo({recordClsStandaloneSpans:t,recordLcpStandaloneSpans:e,client:n}){const r=Uo();if(r&&zt()){r.mark&&Ms.performance.mark("sentry-tracing-init");const s=Do("fid",({metric:t})=>{const e=t.entries[t.entries.length-1];if(!e)return;const n=Ho(zt()),r=Ho(e.startTime);Ko.fid={value:t.value,unit:"millisecond"},Ko["mark.fid"]={value:n+r,unit:"second"}},Ao,Eo),o=e?Go(n):Io(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(Ko.lcp={value:t.value,unit:"millisecond"},Yo=e)},!0),i=function(t){return Do("ttfb",t,Oo,xo)}(({metric:t})=>{t.entries[t.entries.length-1]&&(Ko.ttfb={value:t.value,unit:"millisecond"})}),a=t?Jo(n):ko(({metric:t})=>{const e=t.entries[t.entries.length-1];e&&(Ko.cls={value:t.value,unit:""},Vo=e)},!0);return()=>{s(),null==o||o(),i(),null==a||a()}}return()=>{}}function Qo(t,e){const n=Uo(),r=zt();if(!(null==n?void 0:n.getEntries)||!r)return;const s=Ho(r),o=n.getEntries(),{op:i,start_timestamp:a}=He(t);if(o.slice(Xo).forEach(n=>{const r=Ho(n.startTime),o=Ho(Math.max(0,n.duration));if(!("navigation"===i&&a&&s+r<a))switch(n.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{ti(t,e,r,n)}),ti(t,e,"secureConnection",n,"TLS/SSL"),ti(t,e,"fetch",n,"cache"),ti(t,e,"domainLookup",n,"DNS"),function(t,e,n){const r=n+Ho(e.requestStart),s=n+Ho(e.responseEnd),o=n+Ho(e.responseStart);e.responseEnd&&(qo(t,r,s,{op:"browser.request",name:e.name,attributes:{[he]:"auto.ui.browser.metrics"}}),qo(t,o,s,{op:"browser.response",name:e.name,attributes:{[he]:"auto.ui.browser.metrics"}}))}(t,e,n)}(t,n,s);break;case"mark":case"paint":case"measure":{!function(t,e,n,r,s,o){if(["mark","measure"].includes(e.entryType)&&kt(e.name,o))return;const i=qs(!1),a=Ho(i?i.requestStart:0),c=s+Math.max(n,a),u=s+n,l=u+r,d={[he]:"auto.resource.browser.metrics"};c!==u&&(d["sentry.browser.measure_happened_before_request"]=!0,d["sentry.browser.measure_start_time"]=c);(function(t,e){try{const n=e.detail;if(!n)return;if("object"==typeof n){for(const[e,r]of Object.entries(n))if(r&&dt(r))t[`sentry.browser.measure.detail.${e}`]=r;else if(void 0!==r)try{t[`sentry.browser.measure.detail.${e}`]=JSON.stringify(r)}catch{}return}if(dt(n))return void(t["sentry.browser.measure.detail"]=n);try{t["sentry.browser.measure.detail"]=JSON.stringify(n)}catch{}}catch{}})(d,e),c<=l&&qo(t,c,l,{name:e.name,op:e.entryType,attributes:d})}
1(t,n,r,o,s,e.ignorePerformanceApiSpans);const i=Xs(),a=n.startTime<i.firstHiddenTime;"first-paint"===n.name&&a&&(Ko.fp={value:n.startTime,unit:"millisecond"}),"first-contentful-paint"===n.name&&a&&(Ko.fcp={value:n.startTime,unit:"millisecond"});break}case"resource":!function(t,e,n,r,s,o,i){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return;const a=e.initiatorType?`resource.${e.initiatorType}`:"resource.other";if(null==i?void 0:i.includes(a))return;const c=os(n),u={[he]:"auto.resource.browser.metrics"};ei(u,e,"transferSize","http.response_transfer_size"),ei(u,e,"encodedBodySize","http.response_content_length"),ei(u,e,"decodedBodySize","http.decoded_response_content_length");const l=e.deliveryType;null!=l&&(u["http.response_delivery_type"]=l);const d=e.renderBlockingStatus;d&&(u["resource.render_blocking_status"]=d);c.protocol&&(u["url.scheme"]=c.protocol.split(":").pop());c.host&&(u["server.address"]=c.host);if(u["url.same_origin"]=n.includes(Ms.location.origin),null!=e.nextHopProtocol){const{name:t,version:n}=Bo(e.nextHopProtocol);u["network.protocol.name"]=t,u["network.protocol.version"]=n}const p=o+r,f=p+s;qo(t,p,f,{name:n.replace(Ms.location.origin,""),op:a,attributes:u})}(t,n,n.name,r,o,s,e.ignoreResourceSpans)}}),Xo=Math.max(o.length-1,0),function(t){const e=Ms.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setAttribute("effectiveConnectionType",n.effectiveType),n.type&&t.setAttribute("connectionType",n.type),jo(n.rtt)&&(Ko["connection.rtt"]={value:n.rtt,unit:"millisecond"}));jo(e.deviceMemory)&&t.setAttribute("deviceMemory",`${e.deviceMemory} GB`);jo(e.hardwareConcurrency)&&t.setAttribute("hardwareConcurrency",String(e.hardwareConcurrency))}(t),"pageload"===i){!function(t){const e=qs(!1);if(!e)return;const{responseStart:n,requestStart:r}=e;r<=n&&(t["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}(Ko);const n=Ko["mark.fid"];n&&Ko.fid&&(qo(t,n.value,n.value+Ho(Ko.fid.value),{name:"first input delay",op:"ui.action",attributes:{[he]:"auto.ui.browser.metrics"}}),delete Ko["mark.fid"]),e.recordClsOnPageloadSpan||delete Ko.cls,e.recordLcpOnPageloadSpan||delete Ko.lcp,Object.entries(Ko).forEach(([t,e])=>{!function(t,e,n,r=Xe()){const s=r&&Ve(r);s&&(k&&j.log(`[Measurement] Setting measurement on root span: ${t} = ${e} ${n}`),s.addEvent(t,{[ve]:e,[_e]:n}))}(t,e.value,e.unit)}),t.setAttribute("performance.timeOrigin",s),t.setAttribute("performance.activationStart",Fs()),function(t,e){Yo&&e.recordLcpOnPageloadSpan&&(Yo.element&&t.setAttribute("lcp.element",yt(Yo.element)),Yo.id&&t.setAttribute("lcp.id",Yo.id),Yo.url&&t.setAttribute("lcp.url",Yo.url.trim().slice(0,200)),null!=Yo.loadTime&&t.setAttribute("lcp.loadTime",Yo.loadTime),null!=Yo.renderTime&&t.setAttribute("lcp.renderTime",Yo.renderTime),t.setAttribute("lcp.size",Yo.size));(null==Vo?void 0:Vo.sources)&&e.recordClsOnPageloadSpan&&Vo.sources.forEach((e,n)=>t.setAttribute(`cls.source.${n+1}`,yt(e.node)))}(t,e)}Yo=void 0,Vo=void 0,Ko={}}function ti(t,e,n,r,s=n){const o=function(t){if("secureConnection"===t)return"connectEnd";if("fetch"===t)return"domainLookupStart";return`${t}End`}(n),i=e[o],a=e[`${n}Start`];a&&i&&qo(t,r+Ho(a),r+Ho(i),{op:`browser.${s}`,name:e.name,attributes:{[he]:"auto.ui.browser.metrics",..."redirect"===n&&null!=e.redirectCount?{"http.redirect_count":e.redirectCount}:{}}})}function ei(t,e,n,r){const s=e[n];null!=s&&s<2147483647&&(t[r]=s)}const ni=({entries:t})=>{const e=Xe(),n=e?Ve(e):void 0,r=n?He(n).description:ie().getScopeData().transactionName;t.forEach(t=>{var e,n;const s=t;if(!s.identifier)return;const o=s.name,i=s.renderTime,a=s.loadTime,[c,u]=a?[Ho(a),"load-time"]:i?[Ho(i),"render-time"]:[Bt(),"entry-emission"],l="image-paint"===o?Ho(Math.max(0,(i??0)-(a??0))):0,d={[he]:"auto.ui.browser.elementtiming",[me]:"ui.elementtiming",[de]:"component","sentry.span_start_time_source":u,"sentry.transaction_name":r,"element.id":s.id,"element.type":(null==(n=null==(e=s.element)?void 0:e.tagName)?void 0:n.toLowerCase())||"unknown","element.size":s.naturalWidth&&s.naturalHeight?`${s.naturalWidth}x${s.naturalHeight}`:void 0,"element.render_time":i,"element.load_time":a,"element.url":s.url||void 0,"element.i
1dentifier":s.identifier,"element.paint_type":o};On({name:`element[${s.identifier}]`,attributes:d,startTime:c,onlyIfParent:!0},t=>{t.end(c+l)})})};let ri,si,oi,ii;function ai(){if(!Ms.document)return;const t=K.bind(null,"dom"),e=ci(t,!0);Ms.document.addEventListener("click",e,!1),Ms.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(e=>{var n,r;const s=null==(n=Ms[e])?void 0:n.prototype;(null==(r=null==s?void 0:s.hasOwnProperty)?void 0:r.call(s,"addEventListener"))&&(It(s,"addEventListener",function(e){return function(n,r,s){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=r[n]=r[n]||{refCount:0};if(!o.handler){const r=ci(t);o.handler=r,e.call(this,n,r,s)}o.refCount++}catch{}return e.call(this,n,r,s)}}),It(s,"removeEventListener",function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this.__sentry_instrumentation_handlers__||{},s=n[e];s&&(s.refCount--,s.refCount<=0&&(t.call(this,e,s.handler,r),s.handler=void 0,delete n[e]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return t.call(this,e,n,r)}}))})}function ci(t,e=!1){return n=>{if(!n||n._sentryCaptured)return;const r=function(t){try{return t.target}catch{return null}}(n);if(function(t,e){return"keypress"===t&&(!(null==e?void 0:e.tagName)||"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName&&!e.isContentEditable)}(n.type,r))return;$t(n,"_sentryCaptured",!0),r&&!r._sentryId&&$t(r,"_sentryId",Lt());const s="keypress"===n.type?"input":n.type;if(!function(t){if(t.type!==si)return!1;try{if(!t.target||t.target._sentryId!==oi)return!1}catch{}return!0}(n)){t({event:n,name:s,global:e}),si=n.type,oi=r?r._sentryId:void 0}clearTimeout(ri),ri=Ms.setTimeout(()=>{oi=void 0,si=void 0},1e3)}}function ui(t){const e="history";V(e,t),X(e,li)}function li(){function t(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const r=ii,s=function(t){try{return new URL(t,Ms.location.origin).toString()}catch{return t}}(String(n));if(ii=s,r===s)return t.apply(this,e);K("history",{from:r,to:s})}return t.apply(this,e)}}Ms.addEventListener("popstate",()=>{const t=Ms.location.href,e=ii;if(ii=t,e===t)return;K("history",{from:e,to:t})}),"history"in ls&&ls.history&&(It(Ms.history,"pushState",t),It(Ms.history,"replaceState",t))}const di={};function pi(t){di[t]=void 0}const fi="__sentry_xhr_v3__";function mi(t){V("xhr",t),X("xhr",hi)}function hi(){if(!Ms.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(t,e,n){const r=new Error,s=1e3*Bt(),o=ut(n[0])?n[0].toUpperCase():void 0,i=function(t){if(ut(t))return t;try{return t.toString()}catch{}return}(n[1]);if(!o||!i)return t.apply(e,n);e[fi]={method:o,url:i,request_headers:{}},"POST"===o&&i.match(/sentry_key/)&&(e.__sentry_own_request__=!0);const a=()=>{const t=e[fi];if(t&&4===e.readyState){try{t.status_code=e.status}catch{}K("xhr",{endTimestamp:1e3*Bt(),startTimestamp:s,xhr:e,virtualError:r})}};return"onreadystatechange"in e&&"function"==typeof e.onreadystatechange?e.onreadystatechange=new Proxy(e.onreadystatechange,{apply:(t,e,n)=>(a(),t.apply(e,n))}):e.addEventListener("readystatechange",a),e.setRequestHeader=new Proxy(e.setRequestHeader,{apply(t,e,n){const[r,s]=n,o=e[fi];return o&&ut(r)&&ut(s)&&(o.request_headers[r.toLowerCase()]=s),t.apply(e,n)}}),t.apply(e,n)}}),t.send=new Proxy(t.send,{apply(t,e,n){const r=e[fi];if(!r)return t.apply(e,n);void 0!==n[0]&&(r.body=n[0]);return K("xhr",{startTimestamp:1e3*Bt(),xhr:e}),t.apply(e,n)}})}const gi=[],_i=new Map;function vi(){if(Uo()&&zt()){const t=Do("inp",bi,Lo,wo);return()=>{t()}}return()=>{}}const yi={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};const bi=({metric:t})=>{if(null==t.value)return;const e=Ho(t.value);if(e>60)return;const n=t.entries.find(e=>e.duration===t.value&&yi[e.name]);if(!n)return;const{interactionId:r}=n,s=yi[n.name],o=Ho(zt()+n.startTime),i=Xe(),a=i?Ve(i):void 0,c=(null!=r?_i.get(r):void 0)||a,u=c?He(c).description:ie().getScopeData().transactionName,l=Fo({name:yt(n.target),transaction:u,attributes:{[he]:"auto.http.browser.inp",[me]:`ui.interaction.${s}`,[Se]:n.duration},startTime:o});l&&(l.addEvent("inp",{[_e]:"millisecond",[ve]:t.value}),l.end(o+e))};function Si(t,e=function(t){const e=di[t];if(e)return e;let n=Ms[t];if(ds(n))return di[t]=n.bind(Ms);const r=Ms.document;if(r&&"function"==typeof r.createElement)try{const e=r.createElement("iframe");e.hidden=!0,r.head.appendChild(e);const s=e.contentWindow;(null==s?void 0:s[t])&&(n=s[t]),r.head.removeChild(e)}catch(s){Ns&&j.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `,s)}return n?di[t]=n.bind(Ms):n}("fetch")){let n=0,r=0;return Ar(t,function(s){const o=s.body.length;n+=o,r++;
1const i={body:s.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};if(!e)return pi("fetch"),zn("No fetch implementation available");try{return e(t.url,i).then(t=>(n-=o,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}}))}catch(a){return pi("fetch"),n-=o,r--,zn(a)}})}function Ei(t,e,n,r){const s={filename:t,function:"<anonymous>"===e?q:e,in_app:!0};return void 0!==n&&(s.lineno=n),void 0!==r&&(s.colno=r),s}const Ti=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,xi=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,wi=/\((\S*)(?::(\d+))(?::(\d+))\)/,ki=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ii=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,$i=H(...[[30,t=>{const e=Ti.exec(t);if(e){const[,t,n,r]=e;return Ei(t,q,+n,+r)}const n=xi.exec(t);if(n){if(n[2]&&0===n[2].indexOf("eval")){const t=wi.exec(n[2]);t&&(n[2]=t[1],n[3]=t[2],n[4]=t[3])}const[t,e]=Ci(n[1]||q,n[2]);return Ei(e,t,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],[50,t=>{const e=ki.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=Ii.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||q;return[n,t]=Ci(n,t),Ei(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}]]),Ci=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:q,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]},Pi="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,Ai=1024,Ri=(t={})=>{const e={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:"Breadcrumbs",setup(t){var n;e.console&&function(t){const e="console";V(e,t),X(e,Xr)}(function(t){return function(e){if(ue()!==t)return;const n={category:"console",data:{arguments:e.args,logger:"console"},level:Kr(e.level),message:xt(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${xt(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}Mr(n,{input:e.args,level:e.level})}}(t)),e.dom&&(n=function(t,e){return function(n){if(ue()!==t)return;let r,s,o="object"==typeof e?e.serializeAttribute:void 0,i="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;i&&i>Ai&&(Pi&&j.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=Ai),"string"==typeof o&&(o=[o]);try{const t=n.event,e=function(t){return!!t&&!!t.target}(t)?t.target:t;r=yt(e,{keyAttrs:o,maxStringLength:i}),s=Et(e)}catch{r="<unknown>"}if(0===r.length)return;const a={category:`ui.${n.name}`,message:r};s&&(a.data={"ui.component_name":s}),Mr(a,{event:n.event,name:n.name,global:n.global})}}(t,e.dom),V("dom",n),X("dom",ai)),e.xhr&&mi(function(t){return function(e){if(ue()!==t)return;const{startTimestamp:n,endTimestamp:r}=e,s=e.xhr[fi];if(!n||!r||!s)return;const{method:o,url:i,status_code:a,body:c}=s,u={method:o,url:i,status_code:a},l={xhr:e.xhr,input:c,startTimestamp:n,endTimestamp:r},d={category:"xhr",data:u,type:"http",level:us(a)};t.emit("beforeOutgoingRequestBreadcrumb",d,l),Mr(d,l)}}(t)),e.fetch&&fs(function(t){return function(e){if(ue()!==t)return;const{startTimestamp:n,endTimestamp:r}=e;if(r&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.fetchData.method,e.fetchData.url,e.error){const s=e.fetchData,o={data:e.error,input:e.args,startTimestamp:n,endTimestamp:r},i={category:"fetch",data:s,level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",i,o),Mr(i,o)}else{const s=e.response,o={...e.fetchData,status_code:null==s?void 0:s.status};e.fetchData.request_body_size,e.fetchData.response_body_size,null==s||s.status;const i={input:e.args,response:s,startTimestamp:n,endTimestamp:r},a={category:"fetch",data:o,type:"http",level:us(o.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",a,i),Mr(a,i)}}}(t)),e.history&&ui(function(t){return function(e){if(ue()!==t)return;let n=e.from,r=e.to;const s=os(ys.location.href);let o=n?os(n):void 0;const i=os(r);(null==o?void 0:o.path)||(o=s),s.protocol===i.protocol&&s.host===i.host&&(r=i.relative),s.protocol===o.protocol&&s.host===o.host&&(n=o.relative),Mr({category:"navigation",data:{from:n,to:r}})}}(t)),e.sentry&&t.on("beforeSendEvent",function(t){return function(e){ue()===t&&Mr({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:Nt(e)},{event:e})}}(t))}}};const Oi=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Li=(t={})=>{const e={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...t};return{name:"BrowserApiErrors",setupOnce(){e.setTimeout&&It(ys,"setTimeout",Di),e.setInterval&&It(ys,"setInterval",Di),e.requestAnimationFrame&&It(ys,"requestAnimationFrame",Ni),e.XMLHttpRequest&&"XMLHttpRequest"in ys&&It(XMLHttpRequest.prototype,"send",Mi);const t=e.eventTarget;
1if(t){(Array.isArray(t)?t:Oi).forEach(t=>function(t,e){var n,r;const s=null==(n=ys[t])?void 0:n.prototype;if(!(null==(r=null==s?void 0:s.hasOwnProperty)?void 0:r.call(s,"addEventListener")))return;It(s,"addEventListener",function(n){return function(r,s,o){try{"function"==typeof s.handleEvent&&(s.handleEvent=Es(s.handleEvent,{mechanism:{data:{function:"handleEvent",handler:W(s),target:t},handled:!1,type:"instrument"}}))}catch{}return e.unregisterOriginalCallbacks&&function(t,e,n){t&&"object"==typeof t&&"removeEventListener"in t&&"function"==typeof t.removeEventListener&&t.removeEventListener(e,n)}(this,r,s),n.apply(this,[r,Es(s,{mechanism:{data:{function:"addEventListener",handler:W(s),target:t},handled:!1,type:"instrument"}}),o])}}),It(s,"removeEventListener",function(t){return function(e,n,r){try{const s=n.__sentry_wrapped__;s&&t.call(this,e,s,r)}catch{}return t.call(this,e,n,r)}})}(t,e))}}}};function Di(t){return function(...e){const n=e[0];return e[0]=Es(n,{mechanism:{data:{function:W(t)},handled:!1,type:"instrument"}}),t.apply(this,e)}}function Ni(t){return function(e){return t.apply(this,[Es(e,{mechanism:{data:{function:"requestAnimationFrame",handler:W(t)},handled:!1,type:"instrument"}})])}}function Mi(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&It(n,t,function(e){const n={mechanism:{data:{function:t,handler:W(e)},handled:!1,type:"instrument"}},r=Pt(e);return r&&(n.mechanism.data.handler=W(r)),Es(e,n)})}),t.apply(this,e)}}const ji=()=>({name:"BrowserSession",setupOnce(){void 0!==ys.document?(sr({ignoreDuration:!0}),ar(),ui(({from:t,to:e})=>{void 0!==t&&t!==e&&(sr({ignoreDuration:!0}),ar())})):Pi&&j.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.")}}),qi=(t={})=>{const e={onerror:!0,onunhandledrejection:!0,...t};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(t){e.onerror&&(!function(t){Q(e=>{const{stackParser:n,attachStacktrace:r}=Ui();if(ue()!==t||Ss())return;const{msg:s,url:o,line:i,column:a,error:c}=e,u=function(t,e,n,r){const s=t.exception=t.exception||{},o=s.values=s.values||[],i=o[0]=o[0]||{},a=i.stacktrace=i.stacktrace||{},c=a.frames=a.frames||[],u=r,l=n,d=ut(e)&&e.length>0?e:St();0===c.length&&c.push({colno:u,filename:d,function:q,in_app:!0,lineno:l});return t}(Rs(n,c||s,void 0,r,!1),o,i,a);u.level="error",rr(u,{originalException:c,mechanism:{handled:!1,type:"onerror"}})})}(t),Fi("onerror")),e.onunhandledrejection&&(!function(t){nt(e=>{const{stackParser:n,attachStacktrace:r}=Ui();if(ue()!==t||Ss())return;const s=function(t){if(dt(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}(e),o=dt(s)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(s)}`}]}}:Rs(n,s,void 0,r,!0);o.level="error",rr(o,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}(t),Fi("onunhandledrejection"))}}};function Fi(t){Pi&&j.log(`Global Handler attached: ${t}`)}function Ui(){const t=ue();return(null==t?void 0:t.getOptions())||{stackParser:()=>[],attachStacktrace:!1}}const Hi=()=>({name:"HttpContext",preprocessEvent(t){var e;if(!ys.navigator&&!ys.location&&!ys.document)return;const n=Ts(),r={...n.headers,...null==(e=t.request)?void 0:e.headers};t.request={...n,...t.request,headers:r}}}),Bi=(t={})=>{const e=t.limit||5,n=t.key||"cause";return{name:"LinkedErrors",preprocessEvent(t,r,s){Jr(xs,s.getOptions().stackParser,n,e,t,r)}}};function zi(){return!!function(){var t;if(void 0===ys.window)return!1;const e=ys;if(e.nw)return!1;const n=e.chrome||e.browser;if(!(null==(t=null==n?void 0:n.runtime)?void 0:t.id))return!1;const r=St(),s=["chrome-extension","moz-extension","ms-browser-extension","safari-web-extension"];return!(ys===ys.top&&s.some(t=>r.startsWith(`${t}://`)))}()&&(Pi&&L(()=>{}),!0)}function Wi(t=0){return((zt()||performance.timeOrigin)+t)/1e3}const Ji=new WeakMap,Gi=new Map,Yi={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,trackFetchStreamPerformance:!1};function Vi(t,e){const{traceFetch:n,traceXHR:r,trackFetchStreamPerformance:s,shouldCreateSpanForRequest:o,enableHTTPTimings:i,tracePropagationTargets:a,onRequestSpanStart:c}={...Yi,...e},u="function"==typeof o?o:t=>!0,l=t=>function(t,e){const n=St();if(n){let r,s;try{r=new URL(t,n),s=new URL(n).origin}catch{return!1}const o=r.origin===s;return e?kt(r.toString(),e)||o&&kt(r.pathname,e):o}{const n=!!t.match(/^\/(?!\/)/);return e?kt(t,e):n}}(t,a),d={};n&&(t.addEventProcessor(t=>("transaction"===t.type&&t.spans&&t.spans.forEach(t=>{if("http.client"===t.op){const e=Gi.get(t.span_id);e&&(t.timestamp=e/1e3,Gi.delete(t.span_id))}}),t)),s&&function(t){const e="fetch-body-resolved";V(e,t),X(e,()=>ms(hs))}(t=>{if(t.response){const e=Ji.get(t.response);e&&t.endTimestamp&&Gi.set(e,t.endTimestamp)}}),fs(t=>{const e=is(t,u,l,d);if(t.response&&t.fetchData.__span&&Ji.set(t.response,t.fetchData.__span),e){const n=Ki(t.fetchData.url),r=n?os(n).host:void 0;e.setAttributes({"http.url":n,"server.address":r}),i&&Xi(e),null==c||c(e,{headers:t.headers})}})),r&&mi(t=>{var e;const n=function(t,e,n,r){const s=t.xhr,o=null==s?void 0:s[fi];if(!s||s.__sentry_own_request__||!o)return;const{url:i,method:a}=o,c=Qe()&&e(i);if(t.endTimestamp&&c){const t=s.__sentry_xhr_span_id__;if(!t)return;const e=r[t];return void(e&&void 0!==o.status_code&&(Te(e,o.status_code),e.end(),delete r[t]))}const u=Ki(i),l=os(u||i),d=(m=i,m.split(/[?#]/,1)[0]),p=!!Xe(),f=c&&p?Ln({name:`${a} ${d}`,attributes:{url:i,type:"xhr","http.method":a,"http.url":u,"server.address":null==l?void 0:l.host,[he]:"auto.http.browser",[me]:"http.client",...(null==l?void 0:l.search)&&{"http.query":null==l?void 0:l.search},...(null==l?void 0:l.hash)&&{"http.fragment":null==l?void 0:l.hash}}}):new pn;var m;s.__sentry_xhr_span_id__=f.spanContext().spanId,r[s.__sentry_xhr_span_id__]=f,n(i)&&function(t,e){const{"sentry-trace":n,baggage:r}=Dr({span:e});n&&function(t,e,n){var r;const s=null==(r=t.__sentry_xhr_v3__)?void 0:r.request_headers;if(null==s?void 0:s["sentry-trace"])return;try{if(t.setRequestHeader("sentry-trace",e),n){const e=null==s?void 0:s.baggage;e&&e.split(",").some(t=>t.trim().startsWith("sentry-"))||t.setRequestHeader("baggage",n)}}catch{}}(t,n,r)}(s,Qe()&&p?f:void 0);const h=ue();h&&h.emit("beforeOutgoingRequestSpan",f,t);return f}(t,u,l,d);if(n){let r;i&&Xi(n);try{r=new Headers(null==(e=t.xhr.__sentry_xhr_v3__)?void 0:e.request_headers)}catch{}null==c||c(n,{headers:r})}})}function Xi(t){const{url:e}=He(t).data;if(!e||"string"!=typeof e)return;const n=$o("resource",({entries:r})=>{r.forEach(r=>{if(function(t){return"resource"===t.entryType&&"initiatorType"in t&&"string"==typeof t.nextHopProtocol&&("fetch"===t.initiatorType||"xmlhttprequest"===t.initiatorType)}(r)&&r.name.endsWith(e)){(function(t){const e=[];
1if(null!=t.nextHopProtocol){const{name:n,version:r}=Bo(t.nextHopProtocol);e.push(["network.protocol.version",r],["network.protocol.name",n])}return zt()?[...e,["http.request.redirect_start",Wi(t.redirectStart)],["http.request.fetch_start",Wi(t.fetchStart)],["http.request.domain_lookup_start",Wi(t.domainLookupStart)],["http.request.domain_lookup_end",Wi(t.domainLookupEnd)],["http.request.connect_start",Wi(t.connectStart)],["http.request.secure_connection_start",Wi(t.secureConnectionStart)],["http.request.connection_end",Wi(t.connectEnd)],["http.request.request_start",Wi(t.requestStart)],["http.request.response_start",Wi(t.responseStart)],["http.request.response_end",Wi(t.responseEnd)]]:e})(r).forEach(e=>t.setAttribute(...e)),setTimeout(n)}})})}function Ki(t){try{return new URL(t,ys.location.origin).href}catch{return}}const Zi="sentry_previous_trace",Qi="sentry.previous_trace";function ta(t,{linkPreviousTrace:e,consistentTraceSampling:n}){const r="session-storage"===e;let s=r?function(){var t;try{const e=null==(t=ys.sessionStorage)?void 0:t.getItem(Zi);return JSON.parse(e)}catch{return}}():void 0;t.on("spanStart",t=>{if(Ve(t)!==t)return;const e=ie().getPropagationContext();s=function(t,e,n){const r=He(e);function s(){var t,e;try{return Number(null==(t=n.dsc)?void 0:t.sample_rate)??Number(null==(e=r.data)?void 0:e[pe])}catch{return 0}}const o={spanContext:e.spanContext(),startTimestamp:r.start_timestamp,sampleRate:s(),sampleRand:n.sampleRand};if(!t)return o;const i=t.spanContext;if(i.traceId===r.trace_id)return t;Date.now()/1e3-t.startTimestamp<=3600&&(Pi&&j.log(`Adding previous_trace ${i} link to span ${{op:r.op,...e.spanContext()}}`),e.addLink({context:i,attributes:{[Ee]:"previous_trace"}}),e.setAttribute(Qi,`${i.traceId}-${i.spanId}-${ea(i)?1:0}`));return o}(s,t,e),r&&function(t){try{ys.sessionStorage.setItem(Zi,JSON.stringify(t))}catch(e){Pi&&j.warn("Could not store previous trace in sessionStorage",e)}}(s)});let o=!0;n&&t.on("beforeSampling",t=>{if(!s)return;const e=ie(),n=e.getPropagationContext();o&&n.parentSpanId?o=!1:(e.setPropagationContext({...n,dsc:{...n.dsc,sample_rate:String(s.sampleRate),sampled:String(ea(s.spanContext))},sampleRand:s.sampleRand}),t.parentSampled=ea(s.spanContext),t.parentSampleRate=s.sampleRate,t.spanAttributes={...t.spanAttributes,[fe]:s.sampleRate})})}function ea(t){return 1===t.traceFlags}const na={...Un,instrumentNavigation:!0,instrumentPageLoad:!0,markBackgroundSpan:!0,enableLongTask:!0,enableLongAnimationFrame:!0,enableInp:!0,enableElementTiming:!0,ignoreResourceSpans:[],ignorePerformanceApiSpans:[],detectRedirects:!0,linkPreviousTrace:"in-memory",consistentTraceSampling:!1,_experiments:{},...Yi},ra=(t={})=>{const e={name:void 0,source:void 0},n=ys.document,{enableInp:r,enableElementTiming:s,enableLongTask:o,enableLongAnimationFrame:i,_experiments:{enableInteractions:a,enableStandaloneClsSpans:c,enableStandaloneLcpSpans:u},beforeStartSpan:l,idleTimeout:d,finalTimeout:p,childSpanTimeout:f,markBackgroundSpan:m,traceFetch:h,traceXHR:g,trackFetchStreamPerformance:_,shouldCreateSpanForRequest:v,enableHTTPTimings:y,ignoreResourceSpans:b,ignorePerformanceApiSpans:S,instrumentPageLoad:E,instrumentNavigation:T,detectRedirects:x,linkPreviousTrace:w,consistentTraceSampling:$,onRequestSpanStart:C}={...na,...t};let P,A;function R(t,r,s=!0){const o="pageload"===r.op,i=l?l(r):r,a=i.attributes||{};if(r.name!==i.name&&(a[de]="custom",i.attributes=a),!s){const t=Ft();return void Ln({...i,startTime:t}).end(t)}e.name=i.name,e.source=a[de];const m=Hn(i,{idleTimeout:d,finalTimeout:p,childSpanTimeout:f,disableAutoFinish:o,beforeSpanEnd:e=>{null==P||P(),Qo(e,{recordClsOnPageloadSpan:!c,recordLcpOnPageloadSpan:!u,ignoreResourceSpans:b,ignorePerformanceApiSpans:S}),aa(t,void 0);const n=ie(),r=n.getPropagationContext();n.setPropagationContext({...r,traceId:m.spanContext().traceId,sampled:Be(m),dsc:dn(e)})}});function h(){n&&["interactive","complete"].includes(n.readyState)&&t.emit("idleSpanEnableAutoFinish",m)}aa(t,m),o&&n&&(n.addEventListener("readystatechange",()=>{h()}),h())}return{name:"BrowserTracing",setup(t){if(function(){function t(){const t=Xe(),e=t&&Ve(t);if(e){const t="internal_error";k&&j.log(`[Tracing] Root span: ${t} -> Global error occurred`),e.setStatus({code:2,message:t})}}Ze||(t.tag="sentry_tracingErrorCallback",Ze=!0,Q(t),nt(t))}(),P=Zo({recordClsStandaloneSpans:c||!1,recordLcpStandaloneSpans:u||!1,client:t}),r&&vi(),s&&Uo()&&zt()&&$o("element",ni),i&&I.PerformanceObserver&&PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes("long-animation-frame")?new PerformanceObserver(t=>{const e=Xe();if(e)for(const n of t.getEntries()){if(!n.scripts[0])continue;const t=Ho(zt()+n.startTime),{start_timestamp:r,op:s}=He(e);if("navigation"===s&&r&&t<r)continue;const o=Ho(n.duration),i={[he]:"auto.ui.browser.metrics"},a=n.scripts[0],{invoker:c,invokerType:u,sourceURL:l,sourceFunctionName:d,sourceCharPosition:p}=a;i["browser.script.invoker"]=c,i["browser.script.invoker_type"]=u,l&&(i["code.filepath"]=l),d&&(i["code.function"]=d),-1!==p&&(i["browser.script.source_char_position"]=p),qo(e,t,t+o,{name:"Main UI thread blocked",op:"ui.long-animation-frame",attributes:i})}}).observe({type:"long-animation-frame",buffered:!0}):o&&$o("longtask",({entries:t})=>{const e=Xe();if(!e)return;const{op:n,start_timestamp:r}=He(e);for(const s of t){const t=Ho(zt()+s.startTime),o=Ho(s.duration);"navigation"===n&&r&&t<r||qo(e,t,t+o,{name:"Main UI thread blocked",op:"ui.long-task",attributes:{[he]:"auto.ui.browser.metrics"}})}}),a&&$o("event",({entries:t})=>{const e=Xe();if(e)for(const n of t)if("click"===n.name){const t=Ho(zt()+n.startTime),r=Ho(n.duration),s={name:yt(n.target),op:`ui.interaction.${n.name}`,startTime:t,attributes:{[he]:"auto.ui.browser.metrics"}},o=Et(n.target);o&&(s.attributes["ui.component_name"]=o),qo(e,t,t+r,s)}}),x&&n){const t=()=>{A=Bt()};addEventListener("click",t,{capture:!0}),addEventListener("keydown",t,{capture:!0,passive:!0})}function e(){const e=ia(t);e&&!He(e).timestamp&&(Pi&&j.log(`[Tracing] Finishing current active span with op: ${He(e).op}`),e.setAttribute(ge,"cancelled"),e.end())}t.on("startNavigationSpan",(n,r)=>{if(ue()!==t)return;if(null==r?void 0:r.isRedirect)return Pi&&j.warn("[Tracing] Detected redirect, navigation span will not be the root span, but a child span."),void R(t,{op:"navigation.redirect",...n},!1);e(),ae().setPropagationContext({traceId:Yt(),sampleRand:Math.random()});const s=ie();s.setPropagationContext({traceId:Yt(),sampleRand:Math.random()}),s.setSDKProcessingMetadata({normalizedRequest:void 0}),R(t,{op:"navigation",...n})}),t.on("startPageLoadSpan",(n,r={})=>
1{if(ue()!==t)return;e();const s=Le(r.sentryTrace||sa("sentry-trace"),r.baggage||sa("baggage")),o=ie();o.setPropagationContext(s),o.setSDKProcessingMetadata({normalizedRequest:Ts()}),R(t,{op:"pageload",...n})})},afterAllSetup(t){let n=St();if("off"!==w&&ta(t,{linkPreviousTrace:w,consistentTraceSampling:$}),ys.location){if(E){const e=zt();!function(t,e,n){t.emit("startPageLoadSpan",e,n),ie().setTransactionName(e.name);const r=ia(t);r&&t.emit("afterStartPageLoadSpan",r)}(t,{name:ys.location.pathname,startTime:e?e/1e3:void 0,attributes:{[de]:"url",[he]:"auto.pageload.browser"}})}T&&ui(({to:e,from:r})=>{if(void 0===r&&-1!==(null==n?void 0:n.indexOf(e)))return void(n=void 0);n=void 0;const s=rs(e),o=ia(t),i=o&&x&&function(t,e){const n=He(t),r=Ft(),s=n.start_timestamp;if(r-s>ca)return!1;if(e&&r-e<=ca)return!1;return!0}(o,A);!function(t,e,n){const{url:r,isRedirect:s}=n||{};t.emit("beforeStartNavigationSpan",e,{isRedirect:s}),t.emit("startNavigationSpan",e,{isRedirect:s});const o=ie();o.setTransactionName(e.name),r&&!s&&o.setSDKProcessingMetadata({normalizedRequest:{...Ts(),url:r}});ia(t)}(t,{name:(null==s?void 0:s.pathname)||ys.location.pathname,attributes:{[de]:"url",[he]:"auto.navigation.browser"}},{url:e,isRedirect:i})})}m&&(ys.document?ys.document.addEventListener("visibilitychange",()=>{const t=Xe();if(!t)return;const e=Ve(t);if(ys.document.hidden&&e){const t="cancelled",{op:n,status:r}=He(e);Pi&&j.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${n}`),r||e.setStatus({code:2,message:t}),e.setAttribute("sentry.cancellation_reason","document.hidden"),e.end()}}):Pi&&j.warn("[Tracing] Could not set up background tab detection due to lack of global document")),a&&function(t,e,n,r,s){const o=ys.document;let i;const a=()=>{const o="ui.action.click",a=ia(t);if(a){const t=He(a).op;if(["navigation","pageload"].includes(t))return void(Pi&&j.warn(`[Tracing] Did not create ${o} span because a pageload or navigation span is in progress.`))}i&&(i.setAttribute(ge,"interactionInterrupted"),i.end(),i=void 0),s.name?i=Hn({name:s.name,op:o,attributes:{[de]:s.source||"url"}},{idleTimeout:e,finalTimeout:n,childSpanTimeout:r}):Pi&&j.warn(`[Tracing] Did not create ${o} transaction because _latestRouteName is missing.`)};o&&addEventListener("click",a,{capture:!0})}(t,d,p,f,e),r&&function(){const t=({entries:t})=>{const e=Xe(),n=e&&Ve(e);t.forEach(t=>{if(!function(t){return"duration"in t}(t)||!n)return;const e=t.interactionId;if(null!=e&&!_i.has(e)){if(gi.length>10){const t=gi.shift();_i.delete(t)}gi.push(e),_i.set(e,n)}})};$o("event",t),$o("first-input",t)}(),Vi(t,{traceFetch:h,traceXHR:g,trackFetchStreamPerformance:_,tracePropagationTargets:t.getOptions().tracePropagationTargets,shouldCreateSpanForRequest:v,enableHTTPTimings:y,onRequestSpanStart:C})}}};function sa(t){const e=ys.document,n=null==e?void 0:e.querySelector(`meta[name=${t}]`);return(null==n?void 0:n.getAttribute("content"))||void 0}const oa="_sentry_idleSpan";function ia(t){return t[oa]}function aa(t,e){$t(t,oa,e)}const ca=.3;function ua(e){const n={...e};var r,s;return Lr(n,"react"),r="react",s={version:t.version},ae().setContext(r,s),function(t={}){const e=!t.skipBrowserExtensionCheck&&zi(),n={...t,enabled:!e&&t.enabled,stackParser:(r=t.stackParser||$i,Array.isArray(r)?H(...r):r),integrations:lr({integrations:t.integrations,defaultIntegrations:null==t.defaultIntegrations?[Br(),Fr(),Li(),Ri(),qi(),Bi(),Zr(),Hi(),ji()]:t.defaultIntegrations}),transport:t.transport||Si};var r;return Ir(Ds,n)}(n)}export{ra as b,nr as c,ua as i};
2//# sourceMappingURL=sentry.42a8c683.js.map

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