app/observability.py starts sentry-sdk for the API and the worker when SENTRY_DSN_API is set, with send_default_pii off and a scrub that strips cookies, tokens, bodies, CPF/CNPJ and e-mails. The browser loads the official Sentry bundle from our own origin (web/vendor, provenance in its README) and starts with SENTRY_DSN_WEB from /api/session or /api/operator/me; every failed API answer the customer or the team gets is reported with its path, status and message, never the request body. The CSP allows Blyzer's Sentry ingest host. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
4 lines
91 KiB
JavaScript
4 lines
91 KiB
JavaScript
/*! @sentry/browser 11.12.0 (8bebd29) | https://github.com/getsentry/sentry-javascript */
|
|
var Sentry=function(t){t=window.Sentry||{};const n=globalThis,e="11.12.0";function r(){return o(n),n}function o(t){const n=t.__SENTRY__=t.__SENTRY__||{};return n.version=n.version||e,n[e]=n[e]||{}}function i(t,r,o=n){const i=o.__SENTRY__=o.__SENTRY__||{},s=i[e]=i[e]||{};return s[t]||(s[t]=r())}const s=["debug","info","warn","error","log","assert","trace"],c={};function u(t){if(!("console"in n))return t();const e=n.console,r={},o=Object.keys(c);o.forEach(t=>{const n=c[t];r[t]=e[t],e[t]=n});try{return t()}finally{o.forEach(t=>{e[t]=r[t]})}}const a="?",f=/\(error: (.*)\)/,l=/captureMessage|captureException/;function d(...t){const n=t.sort((t,n)=>t[0]-n[0]).map(t=>t[1]);return(t,e=0,r=0)=>{const o=[],i=t.split("\n");for(let t=e;t<i.length;t++){let e=i[t];e.length>1024&&(e=e.slice(0,1024));const s=f.test(e)?e.replace(f,"$1"):e;if(!s.includes("Error: ")){for(const t of n){const n=t(s);if(n){o.push(n);break}}if(o.length>=50+r)break}}return function(t){if(!t.length)return[];const n=Array.from(t);/sentryWrapped/.test(p(n).function||"")&&n.pop();n.reverse(),l.test(p(n).function||"")&&(n.pop(),l.test(p(n).function||"")&&n.pop());return n.slice(0,50).map(t=>({...t,filename:t.filename||p(n).filename,function:t.function||a}))}(o.slice(r))}}function p(t){return t[t.length-1]||{}}const h="<anonymous>";function m(t){try{return t&&"function"==typeof t&&t.name||h}catch{return h}}function y(t){const n=t.exception;if(n){const t=[];try{return n.values.forEach(n=>{n.stacktrace.frames&&t.push(...n.stacktrace.frames)}),t}catch{return}}}const g={},v={};function b(t,n){return g[t]=g[t]||[],g[t].push(n),()=>{const e=g[t];if(e){const t=e.indexOf(n);-1!==t&&e.splice(t,1)}}}function _(t,n){if(!v[t]){v[t]=!0;try{n()}catch(t){}}}function w(t,n){const e=t&&g[t];if(e)for(const t of e)try{t(n)}catch(t){}}let S=null;function E(){S=n.onerror,n.onerror=function(t,n,e,r,o){return w("error",{column:r,error:o,line:e,msg:t,url:n}),!!S&&S.apply(this,arguments)},n.onerror.__SENTRY_INSTRUMENTED__=!0}let $=null;function k(){$=n.onunhandledrejection,n.onunhandledrejection=function(t){return w("unhandledrejection",t),!$||$.apply(this,arguments)},n.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const x=Object.prototype.toString;function I(t){switch(x.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return D(t,Error)}}function j(t,n){return x.call(t)===`[object ${n}]`}function O(t){return j(t,"ErrorEvent")}function T(t){return j(t,"DOMError")}function R(t){return j(t,"String")}function C(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function A(t){return null===t||C(t)||"object"!=typeof t&&"function"!=typeof t}function N(t){return j(t,"Object")}function P(t){return"object"==typeof t&&null!==t}function L(t){return"undefined"!=typeof Event&&D(t,Event)}function M(t){return Boolean(t?.then&&"function"==typeof t.then)}function D(t,n){try{return t instanceof n}catch{return!1}}function F(t){return"undefined"!=typeof Request&&D(t,Request)}function U(t,n,e){if(!(n in t))return;const r=t[n];if("function"!=typeof r)return;const o=e(r);"function"==typeof o&&B(o,r);try{t[n]=o}catch{}}function q(t,n,e){try{Object.defineProperty(t,n,{value:e,writable:!0,configurable:!0})}catch{}}function B(t,n){try{const e=n.prototype||{};t.prototype=n.prototype=e,q(t,"__sentry_original__",n)}catch{}}function H(t){return t.__sentry_original__}function W(t){if(I(t))return{message:t.message,name:t.name,stack:t.stack,...z(t)};if(L(t)){const{type:n,target:e,currentTarget:r,detail:o}=t;return{type:n,target:e,currentTarget:r,...o?{detail:o}:{},...z(t)}}return t}function z(t){return P(t)?Object.fromEntries(Object.entries(t)):{}}let Y;function J(t){if(void 0!==Y)return Y?Y(t):t();const e=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),r=n;return e in r&&"function"==typeof r[e]?(Y=r[e],Y(t)):(Y=null,t())}function G(){return J(()=>Math.random())}function X(){return J(()=>Date.now())}const K=Symbol.for("sentry.skipNormalization"),Q=Symbol.for("sentry.overrideNormalizationDepth");let V,Z;function tt(t,n=100,e=1/0){try{return rt("",t,n,e)}catch(t){return{ERROR:`**non-serializable** (${nt(t)})`}}}function nt(t){try{return String(t)}catch{return"unknown error"}}function et(t,n=3,e=102400){const r=tt(t,n);return o=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(o))>e?et(t,n-1,e):r;var o}function rt(t,n,e=1/0,r=1/0,o=function(){const t=new WeakSet;function n(n){return!!t.has(n)||(t.add(n),!1)}function e(n){t.delete(n)}return[n,e]}()){const[i,s]=o;if(null==n||["boolean","string"].includes(typeof n)||"number"==typeof n&&Number.isFinite(n))return n;const c=ot(t,n);if(!c.startsWith("[object "))return c;if(function(t){return Boolean(t[K])}(n))return n;const u=function(t){const n=t[Q];return"number"==typeof n?n:void 0}(n),a=void 0!==u?u:e;if(0===a)return c.replace("object ","");if(i(n))return"[Circular ~]";const f=n;if(f&&"function"==typeof f.toJSON)try{return rt("",f.toJSON(),a-1,r,o)}catch{}const l=Array.isArray(n)?[]:{};let d=0;const p=W(n);for(const t in p){if(!Object.prototype.hasOwnProperty.call(p,t))continue;if(d>=r){l[t]="[MaxProperties ~]";break}const n=p[t];l[t]=rt(t,n,a-1,r,o),d++}return s(n),l}function ot(t,n){try{if(V){const t=V(n);if(t)return t}if("undefined"!=typeof global&&n===global)return"[Global]";if("number"==typeof n&&!Number.isFinite(n))return`[${n}]`;if("function"==typeof n)return`[Function: ${m(n)}]`;if("symbol"==typeof n)return`[${String(n)}]`;if("bigint"==typeof n)return`[BigInt: ${String(n)}]`;const t=function(t){const n=Object.getPrototypeOf(t);return n?.constructor?n.constructor.name:"null prototype"}(n);return`[object ${t}]`}catch(t){return`**non-serializable** (${nt(t)})`}}function it(t,n=0){return"string"!=typeof t||0===n||t.length<=n?t:`${t.slice(0,n)}...`}function st(t,n,e=!1){return!!R(t)&&(j(n,"RegExp")?n.test(t):R(n)?e?t===n:t.includes(n):"function"==typeof n&&n(t))}function ct(t,n=[],e=!1){for(const r of n)if(st(t,r,e))return!0;return!1}function ut(t=function(){const t=n;return t.crypto||t.msCrypto}()){try{if(t?.randomUUID)return J(()=>t.randomUUID()).replace(/-/g,"")}catch{}return Z||(Z="10000000100040008000100000000000"),Z.replace(/[018]/g,t=>(t^(16*G()&15)>>t/4).toString(16))}function at(t){return t.exception?.values?.[0]}function ft(t){const{message:n,event_id:e}=t;if(n)return n;const r=at(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||e||"<unknown>":e||"<unknown>"}function lt(t,n,e){const r=t.exception=t.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=n||""),i.type||(i.type="Error")}function dt(t,n){const e=at(t);e&&pt(e,n)}function pt(t,n){const e=t.mechanism;t.mechanism={type:"generic",handled:!0,...e,...n},n&&"data"in n&&(t.mechanism.data={...e?.data,...n.data})}function ht(t){if(function(t){try{return t.__sentry_captured__}catch{}}(t))return!0;try{q(t,"__sentry_captured__",!0)}catch{}return!1}function mt(){return X()/1e3}let yt,gt=[];function vt(){return(yt??(yt=function(){const{performance:t}=n;if(!t?.now||!t.timeOrigin)return t?.now&&(gt=[{from:0,origin:X()-J(()=>t.now())}]),mt;let e=t.timeOrigin;gt=[{from:0,origin:e}];let r=!0,o=0;return()=>J(()=>{const n=t.now(),i=Date.now();return Math.abs(e+n-i)>1e3&&(e=i-n,r?gt=[{from:0,origin:e}]:(gt.push({from:o,origin:e}),gt.length>100&>.splice(1,1))),r=!1,o=n,(e+n)/1e3})}()))()}function bt(t){const n=vt(),e={sid:ut(),init:!0,timestamp:n,started:n,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}}}(e)};return t&&_t(e,t),e}function _t(t,n={}){if(n.user&&(!t.ipAddress&&n.user.ip_address&&(t.ipAddress=n.user.ip_address),t.did||n.did||(t.did=n.user.id||n.user.email||n.user.username)),t.timestamp=n.timestamp||vt(),n.abnormal_mechanism&&(t.abnormal_mechanism=n.abnormal_mechanism),n.ignoreDuration&&(t.ignoreDuration=n.ignoreDuration),n.sid&&(t.sid=32===n.sid.length?n.sid:ut()),void 0!==n.init&&(t.init=n.init),!t.did&&n.did&&(t.did=`${n.did}`),"number"==typeof n.started&&(t.started=n.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof n.duration)t.duration=n.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}n.release&&(t.release=n.release),n.environment&&(t.environment=n.environment),!t.ipAddress&&n.ipAddress&&(t.ipAddress=n.ipAddress),!t.userAgent&&n.userAgent&&(t.userAgent=n.userAgent),"number"==typeof n.errors&&(t.errors=n.errors),n.status&&(t.status=n.status)}function wt(t,n,e=2){if(!n||"object"!=typeof n||e<=0)return n;if(t&&0===Object.keys(n).length)return t;const r={...t};for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=wt(r[t],n[t],e-1));return r}function St(){return ut()}function Et(){return ut().substring(16)}class $t{constructor(){this.t=!1,this.o=[],this.i=[],this.u=[],this.l=[],this.p={},this.h={},this.m={},this.v={},this._={},this.S={},q(this,"refs",{}),this.k={traceId:St(),sampleRand:G()}}clone(){const t=new $t;return t.u=[...this.u],t.h={...this.h},t.m={...this.m},t.v={...this.v},t._={...this._},this._.flags&&(t._.flags={values:[...this._.flags.values]}),t.p=this.p,t.I=this.I,t.j=this.j,t.O=this.O,t.T=this.T,t.i=[...this.i],t.l=[...this.l],t.S={...this.S},t.k={...this.k},t.R=this.R,t.C=this.C,t.A=this.A,t.refs={...this.refs},t}setClient(t){this.R=t}setLastEventId(t){this.C=t}getClient(){return this.R}lastEventId(){return this.C}addScopeListener(t){this.o.push(t)}addEventProcessor(t){return this.i.push(t),this}setUser(t){return this.p=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.j&&_t(this.j,{user:t}),this.N(),this}getUser(){return this.p}setConversationId(t){return this.A=t||void 0,this.N(),this}setTags(t){return this.h={...this.h,...t},this.N(),this}setTag(t,n){return this.setTags({[t]:n})}setAttributes(t){return this.m={...this.m,...t},this.N(),this}setAttribute(t,n){return this.setAttributes({[t]:n})}removeAttribute(t){return t in this.m&&(delete this.m[t],this.N()),this}setExtras(t){return this.v={...this.v,...t},this.N(),this}setExtra(t,n){return this.v={...this.v,[t]:n},this.N(),this}setFingerprint(t){return this.T=t,this.N(),this}setLevel(t){return this.I=t,this.N(),this}setTransactionName(t){return this.O=t,this.N(),this}setContext(t,n){return null===n?delete this._[t]:this._[t]=n,this.N(),this}setSession(t){return t?this.j=t:delete this.j,this.N(),this}getSession(){return this.j}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,e=n instanceof $t?n.getScopeData():N(n)?t:void 0,{tags:r,attributes:o,extra:i,user:s,contexts:c,level:u,fingerprint:a=[],propagationContext:f,conversationId:l}=e||{};return this.h={...this.h,...r},this.m={...this.m,...o},this.v={...this.v,...i},this._={...this._,...c},s&&Object.keys(s).length&&(this.p=s),u&&(this.I=u),a.length&&(this.T=a),f&&(this.k=f),l&&(this.A=l),this}addBreadcrumb(t,n){const e="number"==typeof n?n:100;if(e<=0)return this;const r={timestamp:mt(),...t,message:t.message?it(t.message,2048):t.message};return this.u.push(r),this.u.length>e&&(this.u=this.u.slice(-e)),this.N(),this}getLastBreadcrumb(){return this.u[this.u.length-1]}clearBreadcrumbs(){return this.u=[],this.N(),this}addAttachment(t){return this.l.push(t),this}clearAttachments(){return this.l=[],this}getScopeData(){return{breadcrumbs:this.u,attachments:this.l,contexts:this._,tags:this.h,attributes:this.m,extra:this.v,user:this.p,level:this.I,fingerprint:this.T||[],eventProcessors:this.i,propagationContext:this.k,sdkProcessingMetadata:this.S,transactionName:this.O,conversationId:this.A}}setSDKProcessingMetadata(t){return this.S=wt(this.S,t,2),this}setPropagationContext(t){return this.k=t,this}getPropagationContext(){return this.k}captureException(t,n){const e=n?.event_id||ut();if(!this.R)return e;const r=new Error("Sentry syntheticException");return this.R.captureException(t,{originalException:t,syntheticException:r,...n,event_id:e},this),e}captureMessage(t,n,e){const r=e?.event_id||ut();if(!this.R)return r;const o=e?.syntheticException??new Error(t);return this.R.captureMessage(t,n,{originalException:t,syntheticException:o,...e,event_id:r},this),r}captureEvent(t,n){const e=t.event_id||n?.event_id||ut();return this.R?(this.R.captureEvent(t,{...n,event_id:e},this),e):e}N(){this.t||(this.t=!0,this.o.forEach(t=>{t(this)}),this.t=!1)}}const kt="__SENTRY_SUPPRESS_TRACING__",xt=t=>t instanceof Promise&&!t[It],It=Symbol("chained PromiseLike"),jt=(t,n)=>{if(!n)return t;let e=!1;for(const r in t){if(r in n)continue;e=!0;const o=t[r];"function"==typeof o?Object.defineProperty(n,r,{value:(...n)=>o.apply(t,n),enumerable:!0,configurable:!0,writable:!0}):n[r]=o}return e&&Object.assign(n,{[It]:!0}),n};class Ot{constructor(t,n){let e,r;e=t||new $t,r=n||new $t,this.P=[{scope:e}],this.L=r}withScope(t){const n=this.M();let e;try{e=t(n)}catch(t){throw this.D(),t}return M(e)?((t,n,e)=>{const r=t.then(t=>(n(t),t),t=>{throw e(t),t});return xt(r)&&xt(t)?r:jt(t,r)})(e,()=>this.D(),()=>this.D()):(this.D(),e)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.L}getStackTop(){return this.P[this.P.length-1]}M(){const t=this.getScope().clone();return this.P.push({client:this.getClient(),scope:t}),t}D(){return!(this.P.length<=1)&&!!this.P.pop()}}function Tt(){const t=o(r());return t.stack=t.stack||new Ot(i("defaultCurrentScope",()=>new $t),i("defaultIsolationScope",()=>new $t))}function Rt(t){return Tt().withScope(t)}function Ct(t,n){const e=Tt();return e.withScope(()=>(e.getStackTop().scope=t,n(t)))}function At(t){return Tt().withScope(()=>t(Tt().getIsolationScope()))}function Nt(t){return Rt(n=>{n.setSDKProcessingMetadata({[kt]:!0});const e=t();return n.setSDKProcessingMetadata({[kt]:void 0}),e})}function Pt(t){const n=o(t);return n.acs?n.acs:{suppressTracing:Nt,withIsolationScope:At,withScope:Rt,withSetScope:Ct,withSetIsolationScope:(t,n)=>At(n),getCurrentScope:()=>Tt().getScope(),getIsolationScope:()=>Tt().getIsolationScope()}}function Lt(t,n){const{value:e,unit:r}="object"==typeof(o=t)&&null!=o&&!Array.isArray(o)&&Object.keys(o).includes("value")?t:{value:t,unit:void 0};var o;const i=function(t){if(Array.isArray(t))return{value:t,type:"array"};const n="string"==typeof t?"string":"boolean"==typeof t?"boolean":"number"!=typeof t||Number.isNaN(t)?null:Number.isInteger(t)?"integer":"double";if(n)return{value:t,type:n}}(e),s=r&&"string"==typeof r?{unit:r}:{};if(i)return{...i,...s};if(!n||"skip-undefined"===n&&void 0===e)return;let c="";try{c=JSON.stringify(e)??""}catch{}return{value:c,type:"string",...s}}function Mt(t,n=!1){const e={};for(const[r,o]of Object.entries(t??{})){const t=Lt(o,n);t&&(e[r]=t)}return e}function Dt(){return o(r()).externalPropagationContextProvider?.()}function Ft(){return Pt(r()).getCurrentScope()}function Ut(){return Pt(r()).getIsolationScope()}function qt(){return i("globalScope",()=>new $t)}function Bt(...t){const n=Pt(r());if(2===t.length){const[e,r]=t;return e?n.withSetScope(e,r):n.withScope(r)}return n.withScope(t[0])}function Ht(){return Ft().getClient()}function Wt(t){const n=Dt();if(n)return{trace_id:n.traceId,span_id:n.spanId};const e=t.getPropagationContext(),{traceId:r,parentSpanId:o,propagationSpanId:i}=e,s={trace_id:r,span_id:i||Et()};return o&&(s.parent_span_id=o),s}const zt="culture.calendar",Yt="culture.locale",Jt="culture.timezone",Gt="sentry.exclusive_time",Xt="sentry.is_localhost",Kt="sentry.op",Qt="sentry.profile_id",Vt="sentry.segment.name.source",Zt="sentry.status.message",tn="url.full",nn="user_agent.original",en="sentry.sample_rate",rn="sentry.custom_span_name",on=["ok","deadline_exceeded","unauthenticated","permission_denied","not_found","resource_exhausted","invalid_argument","unimplemented","unavailable","internal_error","unknown_error","cancelled","already_exists","failed_precondition","aborted","out_of_range","data_loss"];function sn(t){if(t){if("object"==typeof t&&"deref"in t&&"function"==typeof t.deref)try{return t.deref()}catch{return}return t}}function cn(t){const n=t;return{scope:n._sentryScope,isolationScope:sn(n._sentryIsolationScope)}}const un="sentry-";function an(t){const n=function(t){if(!t||!R(t)&&!Array.isArray(t))return;if(Array.isArray(t))return t.reduce((t,n)=>{const e=ln(n);return Object.entries(e).forEach(([n,e])=>{t[n]=e}),t},{});return ln(t)}(t);if(!n)return;const e=Object.entries(n).reduce((t,[n,e])=>{if(n.startsWith(un)){t[n.slice(7)]=e}return t},{});return Object.keys(e).length>0?e:void 0}function fn(t){if(!t)return;return function(t){if(0===Object.keys(t).length)return;return Object.entries(t).reduce((t,[n,e],r)=>{const o=`${encodeURIComponent(n)}=${encodeURIComponent(e)}`,i=0===r?o:`${t},${o}`;return i.length>8192?t:i},"")}(Object.entries(t).reduce((t,[n,e])=>(e&&(t[`${un}${n}`]=e),t),{}))}function ln(t){return t.split(",").map(t=>{const n=t.indexOf("=");if(-1===n)return[];return[t.slice(0,n),t.slice(n+1)].map(t=>{try{return decodeURIComponent(t.trim())}catch{return}})}).reduce((t,[n,e])=>(n&&e&&(t[n]=e),t),{})}const dn=/^o(\d+)\./,pn=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;function hn(t,n=!1){const{host:e,path:r,pass:o,port:i,projectId:s,protocol:c,publicKey:u}=t;return`${c}://${u}${n&&o?`:${o}`:""}@${e}${i?`:${i}`:""}/${r?`${r}/`:r}${s}`}function mn(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function yn(t){const n=t.getOptions(),{host:e}=t.getDsn()||{};let r;return n.orgId?r=String(n.orgId):e&&(r=function(t){const n=t.match(dn);return n?.[1]}(e)),r}function gn(t){const n="string"==typeof t?function(t){const n=pn.exec(t);if(!n)return void u(()=>{console.error(`Invalid Sentry Dsn: ${t}`)});const[e,r,o="",i="",s="",c=""]=n.slice(1);let a="",f=c;const l=f.split("/");if(l.length>1&&(a=l.slice(0,-1).join("/"),f=l.pop()),f){const t=f.match(/^\d+/);t&&(f=t[0])}return mn({host:i,pass:o,path:a,projectId:f,port:s,protocol:e,publicKey:r})}(t):mn(t);if(n)return n}function vn(t){if("boolean"==typeof t)return Number(t);const n="string"==typeof t?parseFloat(t):t;return"number"!=typeof n||isNaN(n)||n<0||n>1?void 0:n}const bn=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function _n(t,n){const e=function(t){if(!t)return;const n=t.match(bn);if(!n)return;let e;return"1"===n[3]?e=!0:"0"===n[3]&&(e=!1),{traceId:n[1],parentSampled:e,parentSpanId:n[2]}}(t),r=an(n);if(!e?.traceId)return{traceId:St(),sampleRand:G()};const o=function(t,n){const e=vn(n?.sample_rand);if(void 0!==e)return e;const r=vn(n?.sample_rate);return r&&void 0!==t?.parentSampled?t.parentSampled?G()*r:r+G()*(1-r):G()}(e,r);r&&(r.sample_rand=o.toString());const{traceId:i,parentSpanId:s,parentSampled:c}=e;return{traceId:i,parentSpanId:s,sampled:c,dsc:r||{},sampleRand:o}}function wn(t=St(),n=Et(),e){let r="";return void 0!==e&&(r=e?"-1":"-0"),`${t}-${n}${r}`}function Sn(t=St(),n=Et(),e){return`00-${t}-${n}-${e?"01":"00"}`}const En="span";function $n(t){const{spanId:n,traceId:e,isRemote:r}=t.spanContext(),o=r?n:Tn(t).parent_span_id,i=cn(t).scope;return{parent_span_id:o,span_id:r?i?.getPropagationContext().propagationSpanId||Et():n,trace_id:e}}function kn(t){const{traceId:n,spanId:e}=t.spanContext();return wn(n,e,Nn(t))}function xn(t){return t&&t.length>0?t.map(({context:{spanId:t,traceId:n,traceFlags:e,...r},attributes:o})=>({span_id:t,trace_id:n,sampled:1===e,attributes:o,...r})):void 0}function In(t){return t?.length?t.map(({context:{spanId:t,traceId:n,traceFlags:e},attributes:r})=>({span_id:t,trace_id:n,sampled:1===e,attributes:r})):void 0}function jn(t){return"number"==typeof t?On(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?On(t.getTime()):vt()}function On(t){return t>9999999999?t/1e3:t}function Tn(t){if(An(t))return t.getStaticSpanJSON();const{spanId:n,traceId:e}=t.spanContext();if(Cn(t)){const{attributes:r,startTime:o,name:i,endTime:s,status:c,links:u}=t;return{span_id:n,trace_id:e,data:r,description:i,parent_span_id:Rn(t),start_timestamp:jn(o),timestamp:jn(s)||void 0,status:Pn(c),op:r[Kt],origin:r["sentry.origin"],links:xn(u)}}return{span_id:n,trace_id:e,start_timestamp:0,status:"ok",data:{}}}function Rn(t){return"parentSpanId"in t?t.parentSpanId:"parentSpanContext"in t?t.parentSpanContext?.spanId:void 0}function Cn(t){const n=t;return!!(n.attributes&&n.startTime&&n.name&&n.endTime&&n.status)}function An(t){return"function"==typeof t.getSpanJSON}function Nn(t){const{traceFlags:n}=t.spanContext();return 1===n}function Pn(t){return t&&0!==t.code?1===t.code?"ok":t.message&&("ok"!==(n=t.message)&&on.includes(n))?t.message:"internal_error":"ok";var n}function Ln(t){return t&&1!==t.code&&0!==t.code&&"cancelled"!==t.message?"error":"ok"}function Mn(t,n){const e="error"===Ln(n)?n?.message:void 0;return{...e&&{[Zt]:e},...t}}const Dn="_sentryRootSpan",Fn=Un;function Un(t){return t[Dn]||t}function qn(t){return t===Un(t)}function Bn(t){const n=Pt(r());return n.getActiveSpan?n.getActiveSpan(t):function(t){return sn(t.refs[En])}(t||Ft())}function Hn(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const n=t||Ht()?.getOptions();return!(!n||null==n.tracesSampleRate&&!n.tracesSampler)}function Wn(t,n){if(!n?.length)return!1;for(const e of n){if(Jn(e)){if(t.description&&st(t.description,e))return!0;continue}const n=!!e.attributes&&Object.keys(e.attributes).length>0;if(!e.name&&!e.op&&!n)continue;const r=!e.name||t.description&&st(t.description,e.name),o=!e.op||t.op&&st(t.op,e.op),i=!e.attributes||Object.entries(e.attributes).every(([n,e])=>zn(t.attributes?.[n],e));if(r&&o&&i)return!0}return!1}function zn(t,n){return"string"==typeof t&&("string"==typeof n||n instanceof RegExp)?st(t,n):Array.isArray(t)&&Array.isArray(n)?t.length===n.length&&t.every((t,e)=>t===n[e]):t===n}function Yn(t,n){const e=n.parent_span_id,r=n.span_id;if(e)for(const n of t)n.parent_span_id===r&&(n.parent_span_id=e)}function Jn(t){return"string"==typeof t||t instanceof RegExp}const Gn=[];function Xn(t){const n=t.defaultIntegrations||[],e=t.integrations;let r;if(n.forEach(t=>{t.isDefaultInstance=!0}),Array.isArray(e))r=[...n,...e];else if("function"==typeof e){const t=e(n);r=Array.isArray(t)?t:[t]}else r=n;return function(t){const n={};return t.forEach(t=>{const{name:e}=t,r=n[e];r&&!r.isDefaultInstance&&t.isDefaultInstance||(n[e]=t)}),Object.values(n)}(r)}function Kn(t,n){for(const e of n)e?.afterAllSetup&&e.afterAllSetup(t)}function Qn(t,n,e){if(!e[n.name]){if(e[n.name]=n,Gn.includes(n.name)||"function"!=typeof n.setupOnce||(n.setupOnce(),Gn.push(n.name)),n.setup&&"function"==typeof n.setup&&n.setup(t),"function"==typeof n.preprocessEvent){const e=n.preprocessEvent.bind(n);t.on("preprocessEvent",(n,r)=>e(n,r,t))}if("function"==typeof n.processEvent){const e=n.processEvent.bind(n),r=Object.assign((n,r)=>e(n,r,t),{id:n.name});t.addEventProcessor(r)}["processSpan","processSegmentSpan"].forEach(e=>{const r=n[e];"function"==typeof r&&t.on(e,e=>r.call(n,e,t))})}}const Vn="production",Zn=Symbol.for("sentry.nonRecordingSpan");function te(t){return!!t&&!0===t[Zn]}function ne(t,n){const e=n.getOptions(),{publicKey:r}=n.getDsn()||{},o={environment:e.environment||Vn,release:e.release,public_key:r,trace_id:t,org_id:yn(n)};return n.emit("createDsc",o),o}function ee(t,n){if(Dt())return;const e=n.getPropagationContext();return e.dsc||ne(e.traceId,t)}function re(t){const n=Ht();if(!n)return{};const e=Fn(t),r=Tn(e),o=r.data,i=e.spanContext().traceState,s=i?.get("sentry.sample_rate")??o[en]??o["sentry.previous_trace_sample_rate"];function c(t){return"number"!=typeof s&&"string"!=typeof s||(t.sample_rate=`${s}`),t}const u=e._frozenDsc;if(u)return c(u);const a=te(e),f=a&&"ignored"===e.dropReason;if(a&&(!Hn(n.getOptions())||f)){const t=cn(e).scope,r=t&&ee(n,t);if(r){const t={...r};return f&&(t.sampled="false"),c(t)}}const l=i?.get("sentry.dsc"),d=l&&an(l);if(d)return c(d);const p=ne(t.spanContext().traceId,n),h=o[Vt],m=r.description;return"url"!==h&&m&&(p.transaction=m),Hn()&&(p.sampled=String(Nn(e)),p.sample_rand=i?.get("sentry.sample_rand")??cn(e).scope?.getPropagationContext().sampleRand.toString()),c(p),n.emit("createDsc",p,e),p}function oe(t,n){const{fingerprint:e,breadcrumbs:r,sdkProcessingMetadata:o}=n;!function(t,n){const{extra:e,tags:r,user:o,contexts:i,level:s,transactionName:c}=n;Object.keys(e).length&&(t.extra={...e,...t.extra});Object.keys(r).length&&(t.tags={...r,...t.tags});Object.keys(o).length&&(t.user={...o,...t.user});Object.keys(i).length&&(t.contexts={...i,...t.contexts});s&&(t.level=s);c&&"transaction"!==t.type&&(t.transaction=c)}(t,n),function(t,n){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],n&&(t.fingerprint=t.fingerprint.concat(n));t.fingerprint.length||delete t.fingerprint}(t,e),function(t,n){const e=[...t.breadcrumbs||[],...n];t.breadcrumbs=e.length?e:void 0}(t,r),function(t,n){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...n}}(t,o)}function ie(t,n){const{extra:e,tags:r,attributes:o,user:i,contexts:s,level:c,sdkProcessingMetadata:u,breadcrumbs:a,fingerprint:f,eventProcessors:l,attachments:d,propagationContext:p,transactionName:h}=n;se(t,"extra",e),se(t,"tags",r),se(t,"attributes",o),se(t,"user",i),se(t,"contexts",s),t.sdkProcessingMetadata=wt(t.sdkProcessingMetadata,u,2),c&&(t.level=c),h&&(t.transactionName=h),a.length&&(t.breadcrumbs=[...t.breadcrumbs,...a]),f.length&&(t.fingerprint=[...t.fingerprint,...f]),l.length&&(t.eventProcessors=[...t.eventProcessors,...l]),d.length&&(t.attachments=[...t.attachments,...d]),t.propagationContext={...t.propagationContext,...p}}function se(t,n,e){t[n]=wt(t[n],e,1)}function ce(t,n){const e=qt().getScopeData();return t&&ie(e,t.getScopeData()),n&&ie(e,n.getScopeData()),e}function ue(t,n,e){let r;try{r=n()}catch(n){return ae(t,n,e)}return M(r)?r.then(void 0,n=>ae(t,n,e)):r}function ae(t,n,e){return e(n)}function fe(t,n){return ue("",()=>n(t),()=>t)||t}function le(t){const n={trace_id:t.trace_id,span_id:t.span_id,parent_span_id:t.parent_span_id,name:t.description||"",start_timestamp:t.start_timestamp,end_timestamp:t.timestamp,status:t.status&&"ok"!==t.status&&"cancelled"!==t.status?"error":"ok",is_segment:!1,attributes:{...t.data},links:t.links};return e=n,{...e,end_timestamp:e.end_timestamp??e.start_timestamp,attributes:Mt(e.attributes),links:e.links?.map(t=>({...t,attributes:Mt(t.attributes)}))};var e}function de(t,n){const e=t.attributes??(t.attributes={});Object.entries(n).forEach(([t,n])=>{null==n||t in e||(e[t]=n)})}function pe(t,n=[]){return[t,n]}function he(t,n){const[e,r]=t;return[e,[...r,n]]}function me(t,n){const e=t[1];for(const t of e){if(n(t,t[0].type))return!0}return!1}function ye(t){const e=o(n);return e.encodePolyfill?e.encodePolyfill(t):(new TextEncoder).encode(t)}function ge(t){const[n,e]=t;let r=JSON.stringify(n);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[ye(r),t]:r.push("string"==typeof t?ye(t):t)}for(const t of e){const[n,e]=t;if(o(`\n${JSON.stringify(n)}\n`),"string"==typeof e||e instanceof Uint8Array)o(e);else{let t;try{t=JSON.stringify(e)}catch{t=JSON.stringify(tt(e))}o(t)}}return"string"==typeof r?r:function(t){const n=t.reduce((t,n)=>t+n.length,0),e=new Uint8Array(n);let r=0;for(const n of t)e.set(n,r),r+=n.length;return e}(r)}function ve(t){const n="string"==typeof t.data?ye(t.data):t.data;return[{type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType},n]}const be={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",metric:"trace_metric"};function _e(t){return function(t){return t in be}(t)?be[t]:t}function we(t){if(!t?.sdk)return;const{name:n,version:e}=t.sdk;return{name:n,version:e}}function Se(t){return"replay_event"===t?"replay":t||"error"}function Ee(){return"undefined"!=typeof window&&!0}const $e=new WeakMap;function ke(t,n,e){const r=A(o=n.originalException)?void 0:o;var o;const i=r&&$e.get(r);if(!i)return;const s=t.contexts?.trace;(s?.trace_id??(e&&Wt(e).trace_id))===i.trace_id&&(t.contexts={...t.contexts,trace:{...s,...i}})}function xe(t,n){const e=Ie();return e.withActiveSpan?e.withActiveSpan(t,n):Bt(t=>(function(t){delete t.refs[En]}(t),n(t)))}function Ie(){return Pt(r())}function je(t,n,e,r){const o=we(e),i=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,n){if(!n)return t;const e=t.sdk||{};t.sdk={...e,name:e.name||n.name,version:e.version||n.version,integrations:[...t.sdk?.integrations||[],...n.integrations||[]],packages:[...t.sdk?.packages||[],...n.packages||[]],settings:t.sdk?.settings||n.settings?{...t.sdk?.settings,...n.settings}:void 0}}(t,e?.sdk);const s=function(t,n,e,r){const o=t.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date(X()).toISOString(),...n&&{sdk:n},...!!e&&r&&{dsn:hn(r)},...o&&{trace:o}}}(t,o,r,n);delete t.sdkProcessingMetadata;return pe(s,[[{type:i},t]])}const Oe="[Filtered]",Te=["auth","token","secret","session","password","passwd","pwd","key","jwt","bearer","sso","saml","csrf","xsrf","credentials","sid","identity","set-cookie","cookie"];function Re(t,n,e){if(!1===n)return!0;const r=t.toLowerCase();if(function(t,n){return n.some(n=>t.includes(n))}(r,Te))return!0;if(!0===n)return!1;const o=("deny"in n?n.deny:n.allow).some(t=>r.includes(t.toLowerCase()));return"deny"in n?o:!o}function Ce(t,n,e){if(!1===n)return{};const r={};for(const e of Object.keys(t))r[e]=Re(e,n)?Oe:t[e];return r}function Ae(t){return new Pe(n=>{n(t)})}function Ne(t){return new Pe((n,e)=>{e(t)})}class Pe{constructor(t){this.F=0,this.U=[],this.q(t)}then(t,n){return new Pe((e,r)=>{this.U.push([!1,n=>{if(t)try{e(t(n))}catch(t){r(t)}else e(n)},t=>{if(n)try{e(n(t))}catch(t){r(t)}else r(t)}]),this.B()})}catch(t){return this.then(t=>t,t)}finally(t){return new Pe((n,e)=>{let r,o;return this.then(n=>{o=!1,r=n,t&&t()},n=>{o=!0,r=n,t&&t()}).then(()=>{o?e(r):n(r)})})}B(){if(0===this.F)return;const t=this.U.slice();this.U=[],t.forEach(t=>{t[0]||(1===this.F&&t[1](this.H),2===this.F&&t[2](this.H),t[0]=!0)})}q(t){const n=(t,n)=>{0===this.F&&(M(n)?n.then(e,r):(this.F=t,this.H=n,this.B()))},e=t=>{n(1,t)},r=t=>{n(2,t)};try{t(e,r)}catch(t){r(t)}}}function Le(t,n,e,r=0,o){try{const i=Me(n,e,t,r,o);return M(i)?i:Ae(i)}catch(t){return Ne(t)}}function Me(t,n,e,r,o){const i=e[r];if(!t||!i)return t;let s=!1;const c=ue("",()=>i({...t},n),()=>(s=!0,null));return M(c)?c.then(t=>t?Me(t,n,e,r+1,o):(o?.(s?"callback_error":"event_processor"),null)):c?Me(c,n,e,r+1,o):(o?.(s?"callback_error":"event_processor"),null)}let De,Fe,Ue,qe;function Be(t){return!0===t.data?.__sentry__}function He(t,e,r,o,i,s){const{normalizeDepth:c=3,normalizeMaxBreadth:u=1e3}=t,a={...e,event_id:e.event_id||r.event_id||ut(),timestamp:e.timestamp||mt()},f=r.integrations||t.integrations.map(t=>t.name);!function(t,n){const{environment:e,release:r,dist:o,maxValueLength:i}=n;t.environment=t.environment||e||Vn,!t.release&&r&&(t.release=r);!t.dist&&o&&(t.dist=o);const s=t.request;s?.url&&i&&(s.url=it(s.url,i));i&&t.exception?.values?.forEach(t=>{t.value&&(t.value=it(t.value,i))})}(a,t),function(t,n){n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...n])}(a,f),i&&i.emit("applyFrameMetadata",e),void 0===e.type&&function(t,e){const r=function(t){const e=n._sentryDebugIds,r=n.W;if(!e&&!r)return{};const o=e?Object.keys(e):[],i=r?Object.keys(r):[];if(qe&&o.length===Fe&&i.length===Ue)return qe;Fe=o.length,Ue=i.length,qe={},De||(De={});const s=(n,e)=>{for(const r of n){const n=e[r],o=De?.[r];if(o&&qe&&n)qe[o[0]]=n,De&&(De[r]=[o[0],n]);else if(n){const e=t(r);for(let t=e.length-1;t>=0;t--){const o=e[t],i=o?.filename;if(i&&qe&&De){qe[i]=n,De[r]=[i,n];break}}}}};return e&&s(o,e),r&&s(i,r),qe}(e);t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{t.filename&&(t.debug_id=r[t.filename])})})}(a,t.stackParser);const l=function(t,n){if(!n)return t;const e=t?t.clone():new $t;return e.update(n),e}(o,r.captureContext);r.mechanism&&function(t,n){const e=t.exception?.values,r=e?.find(t=>0===t.mechanism?.exception_id)??e?.[0];r&&pt(r,n)}(a,r.mechanism);const d=i?i.getEventProcessors():[],p=ce(s,l),h=[...r.attachments||[],...p.attachments];h.length&&(r.attachments=h),oe(a,p);const m=Bn(l);m&&function(t,n){t.contexts={trace:$n(n),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:re(n),...t.sdkProcessingMetadata};const e=Tn(Fn(n)).description;e&&!t.transaction&&"transaction"===t.type&&(t.transaction=e)}(a,m),ke(a,r,l);const y=[...d,...p.eventProcessors],g="transaction"===e.type,v=e.spans?.length||0;return(Be(r)?Ae(a):Le(y,a,r,0,t=>{i&&(i.recordDroppedEvent(t,Se(e.type)),g&&i.recordDroppedEvent(t,"span",1+v))})).then(t=>{if(!t)return null;if(g&&i){const n=v-(t.spans?.length||0);n>0&&i.recordDroppedEvent("event_processor","span",n)}return function(t){const n={};if(t.exception?.values?.forEach(t=>{t.stacktrace?.frames?.forEach(t=>{t.debug_id&&(t.abs_path?n[t.abs_path]=t.debug_id:t.filename&&(n[t.filename]=t.debug_id),delete t.debug_id)})}),0===Object.keys(n).length)return;t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const e=t.debug_meta.images;Object.entries(n).forEach(([t,n])=>{e.push({type:"sourcemap",code_file:t,debug_id:n})})}(t),"number"==typeof c&&c>0?function(t,n,e){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>({...t,...t.data&&{data:tt(t.data,n,e)}}))},...t.user&&{user:tt(t.user,n,e)},...t.contexts&&{contexts:tt(t.contexts,n,e)},...t.extra&&{extra:tt(t.extra,n,e)}};t.contexts?.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=tt(t.contexts.trace.data,n,e)));t.spans&&(r.spans=t.spans.map(t=>({...t,...t.data&&{data:tt(t.data,n,e)}})));t.contexts?.flags&&r.contexts&&(r.contexts.flags=tt(t.contexts.flags,3,e));return r}(t,c,u):t})}function We(t){if(t)return function(t){return t instanceof $t||"function"==typeof t}(t)||function(t){return Object.keys(t).some(t=>ze.includes(t))}(t)?{captureContext:t}:t}const ze=["user","level","extra","contexts","tags","fingerprint","propagationContext"];function captureException(t,n){return Ft().captureException(t,We(n))}function Ye(t,n){return Ft().captureEvent(t,n)}function Je(){return Ut().lastEventId()}function Ge(){const t=Ht();return!1!==t?.getOptions().enabled&&!!t?.getTransport()}function Xe(t){const e=Ut(),{user:r}=ce(e,Ft());let o=n.navigator?.userAgent;if(o){o=Ce({"User-Agent":o},Ht()?.getDataCollectionOptions().httpHeaders.request??!0)["User-Agent"]}const i=bt({user:r,userAgent:o,...t}),s=e.getSession();return"ok"===s?.status&&_t(s,{status:"exited"}),Ke(),e.setSession(i),i}function Ke(){const t=Ut(),n=Ft().getSession()||t.getSession();n&&function(t){let n={};"ok"===t.status&&(n={status:"exited"}),_t(t,n)}(n),Qe(),t.setSession()}function Qe(){const t=Ut(),n=Ht(),e=t.getSession();e&&n&&n.captureSession(e)}function Ve(t=!1){t?Ke():Qe()}function Ze(t){const n=t.protocol?`${t.protocol}:`:"",e=t.port?`:${t.port}`:"";return`${n}//${t.host}${e}${t.path?`/${t.path}`:""}/api/`}function tr(t,n,e){return n||`${function(t){return`${Ze(t)}${t.projectId}/envelope/`}(t)}?${function(t,n){const e={sentry_version:"7"};return t.publicKey&&(e.sentry_key=t.publicKey),n&&(e.sentry_client=`${n.name}/${n.version}`),new URLSearchParams(e).toString()}(t,e)}`}function nr(t,n){if("transaction"!==t.type||!t.spans?.length||!t.sdkProcessingMetadata?.hasGenAiSpans||function(t){return"stream"===t.getOptions().traceLifecycle}(n))return;const e=[],r=[];for(const n of t.spans)n.op?.startsWith("gen_ai.")?e.push(le(n)):r.push(n);return 0!==e.length?(t.spans=r,function(t,n){const e=n.getDataCollectionOptions().userInfo?"auto":"never";return[{type:"span",item_count:t.length,content_type:"application/vnd.sentry.items.span.v2+json"},{version:2,ingest_settings:Ee()?{infer_ip:e,infer_user_agent:e}:void 0,items:t}]}(e,n)):void 0}const er=Symbol.for("SentryBufferFullError");function rr(t=100){const n=new Set;function e(t){n.delete(t)}return{get $(){return Array.from(n)},add:function(r){if(!(n.size<t))return Ne(er);const o=r();return n.add(o),o.then(()=>e(o),()=>e(o)),o},drain:function(t){if(!n.size)return Ae(!0);const e=Promise.allSettled(Array.from(n)).then(()=>!0);if(!t)return e;const r=[e,new Promise(n=>{return"object"==typeof(e=setTimeout(()=>n(!1),t))&&"function"==typeof e.unref&&e.unref(),e;var e})];return Promise.race(r)}}}function or(t,{statusCode:n,headers:e},r=X()){const o={...t},i=e?.["x-sentry-rate-limits"],s=e?.["retry-after"];if(i)for(const t of i.trim().split(",")){const[n,e,,,i]=t.split(":",5),s=parseInt(n,10),c=1e3*(isNaN(s)?60:s);if(e)for(const t of e.split(";"))"metric_bucket"===t&&i&&!i.split(";").includes("custom")||(o[t]=r+c);else o.all=r+c}else s?o.all=r+function(t,n=X()){const e=parseInt(`${t}`,10);if(!isNaN(e))return 1e3*e;const r=Date.parse(`${t}`);return isNaN(r)?6e4:r-n}(s,r):429===n&&(o.all=r+6e4);return o}function ir(t,n,e=rr(t.bufferSize||64)){let r={};function o(n,[e,r],o){const i=_e(o);"transaction"===o&&t.recordDroppedEvent(n,"span",(r.spans?.length??0)+1),t.recordDroppedEvent(n,i,"number"==typeof e.item_count?e.item_count:1)}return{send:function(t){const i=[];if(me(t,(t,n)=>{!function(t,n,e=X()){return function(t,n){return t[n]||t.all||0}(t,n)>e}(r,_e(n))?i.push(t):o("ratelimit_backoff",t,n)}),0===i.length)return Promise.resolve({});const s=pe(t[0],i),c=t=>{(function(t,n){return me(t,(t,e)=>n.includes(e))})(s,["client_report"])||me(s,(n,e)=>{o(t,n,e)})};return e.add(()=>n({body:ge(s)}).then(t=>413===t.statusCode?(c("send_error"),t):(r=or(r,t),t),t=>{throw c("network_error"),t})).then(t=>t,t=>{if(t===er)return c("queue_overflow"),Promise.resolve({});throw t})},flush:t=>e.drain(t)}}const sr={userInfo:!0,cookies:!0,httpHeaders:{request:!0,response:!0},httpBodies:["incomingRequest","outgoingRequest","incomingResponse","outgoingResponse"],urlQueryParams:!0,graphQL:{document:!0,variables:!0},genAI:{inputs:!0,outputs:!0},mcp:{inputs:!0,outputs:!0},databaseQueryData:!0,queues:!0,stackFrameVariables:!0,frameContextLines:5};const cr=Symbol.for("SentryInternalError"),ur=Symbol.for("SentryDoNotSendEventError"),ar=Symbol.for("SentryClosedClient");function fr(t){return{message:t,[cr]:!0}}function lr(t){return{message:t,[ur]:!0}}function dr(t){return lr(`Discarding event because it's not included in the random sample (sampling rate = ${t})`)}class pr{constructor(t){if(this.Y={attachStacktrace:!0,...t,traceLifecycle:"static"===t.traceLifecycle?"static":"stream"},this._integrations={},this.J=0,this.G={},this.X={},this.i=[],this.K=rr(t.transportOptions?.bufferSize??64),this.V=function(t){const n=t.dataCollection??{};return{userInfo:n.userInfo??sr.userInfo,cookies:n.cookies??sr.cookies,httpHeaders:(e=n.httpHeaders,void 0===e?{...sr.httpHeaders}:"boolean"==typeof(r=e)||"allow"in r||"deny"in r?{request:e,response:e}:{request:e.request??sr.httpHeaders.request,response:e.response??sr.httpHeaders.response}),httpBodies:n.httpBodies??sr.httpBodies,urlQueryParams:n.urlQueryParams??sr.urlQueryParams,graphQL:{document:n.graphQL?.document??sr.graphQL.document,variables:n.graphQL?.variables??sr.graphQL.variables},genAI:{inputs:n.genAI?.inputs??sr.genAI.inputs,outputs:n.genAI?.outputs??sr.genAI.outputs},mcp:{inputs:n.mcp?.inputs??sr.mcp.inputs,outputs:n.mcp?.outputs??sr.mcp.outputs},databaseQueryData:n.databaseQueryData??sr.databaseQueryData,queues:n.queues??sr.queues,stackFrameVariables:n.stackFrameVariables??sr.stackFrameVariables,frameContextLines:n.frameContextLines??sr.frameContextLines};var e,r}(t),this.Z="crashed",this.tt=void 0===t.attachStacktrace,t.dsn&&(this.nt=gn(t.dsn)),this.nt){const n=tr(this.nt,t.tunnel,t._metadata?t._metadata.sdk:void 0);this.et=t.transport({tunnel:this.Y.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,e){const r=ut();if(ht(t))return r;const o={event_id:r,...n};return this.rt(()=>this.eventFromException(t,o).then(t=>this.ot(t,o,e)).then(t=>t),"error"),o.event_id}captureMessage(t,n,e,r){const o={event_id:ut(),...e},i=C(t)?t:String(t),s=A(t),c=s?this.eventFromMessage(i,n,o).then(t=>(t.exception&&this.tt&&(t.sdkProcessingMetadata={...t.sdkProcessingMetadata,hasDefaultSyntheticStacktrace:!0}),t)):this.eventFromException(t,o);return this.rt(()=>c.then(t=>this.ot(t,o,r)),s?"unknown":"error"),o.event_id}captureEvent(t,n,e){const r=ut();if(n?.originalException&&ht(n.originalException))return r;const o={event_id:r,...n},i=t.sdkProcessingMetadata||{},s=i.capturedSpanScope,c=i.capturedSpanIsolationScope,u=Se(t.type);return this.rt(()=>this.ot(t,o,s||e,c),u),o.event_id}captureSession(t){this.sendSession(t),_t(t,{init:!1})}getDsn(){return this.nt}getOptions(){return this.Y}getDataCollectionOptions(){return this.V}getSdkMetadata(){return this.Y._metadata}getTransport(){return this.et}async flush(t){const n=this.et;if(this.emit("flush"),!n)return!0;const e=await this.it(t),r=await n.flush(t);return e&&r}async close(t){Object.defineProperty(this,ar,{value:!0});const n=await this.flush(t);return this.getOptions().enabled=!1,this.emit("close"),n}getEventProcessors(){return this.i}addEventProcessor(t){this.i.push(t)}init(){var t;(this.st()||this.Y.integrations.some(({name:t})=>t.startsWith("Spotlight")))&&(this.ct(),"stream"===(t=this.Y).traceLifecycle&&(t.beforeSendTransaction||t.ignoreTransactions?.length)&&u(()=>{console.warn("[Sentry] `beforeSendTransaction` and `ignoreTransactions` are ignored with `traceLifecycle: 'stream'` (enabled by default). Use `beforeSendSpan` and `ignoreSpans` instead, or set `traceLifecycle: 'static'`.")}))}getIntegrationByName(t){return this._integrations[t]}getIntegrationNames(){return Object.keys(this._integrations)}addIntegration(t){const n=this._integrations[t.name];!n&&t.beforeSetup&&t.beforeSetup(this),Qn(this,t,this._integrations),n||Kn(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);const e=nr(t,this);let r=je(t,this.nt,this.Y._metadata,this.Y.tunnel);if(!Be(n))for(const t of n.attachments||[])r=he(r,ve(t));e&&(r=he(r,e)),this.sendEnvelope(r).then(n=>this.emit("afterSendEvent",t,n))}sendSession(t){const{release:n,environment:e=Vn}=this.Y;if("aggregates"in t){const r=t.attrs||{};if(!r.release&&!n)return;r.release=r.release||n,r.environment=r.environment||e,t.attrs=r}else{if(!t.release&&!n)return;t.release=t.release||n,t.environment=t.environment||e}this.emit("beforeSendSession",t);const r=function(t,n,e,r){const o=we(e);return pe({sent_at:new Date(X()).toISOString(),...o&&{sdk:o},...!!r&&n&&{dsn:hn(n)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this.nt,this.Y._metadata,this.Y.tunnel);this.sendEnvelope(r)}recordDroppedEvent(t,n,e=1){if(this.Y.sendClientReports){const r=`${t}:${n}`;this.G[r]=(this.G[r]||0)+e}}on(t,n){const e=this.X[t]=this.X[t]||new Set,r=(...t)=>n(...t);return e.add(r),()=>{e.delete(r)}}emit(t,...n){const e=this.X[t];e&&e.forEach(t=>t(...n))}async sendEnvelope(t){if(this.emit("beforeEnvelope",t),this.st()&&this.et)try{const n=await this.et.send(t);return this.emit("afterEnvelope",t),n}catch(t){return{}}return{}}registerCleanup(t){}dispose(){}ct(){const{integrations:t}=this.Y;this._integrations=function(t,n){const e={};return n.forEach(n=>{n?.beforeSetup&&n.beforeSetup(t)}),n.forEach(n=>{n&&Qn(t,n,e)}),e}(this,t),Kn(this,t)}ut(t,n){let e="fatal"===n.level,r=!1;const o=n.exception?.values;if(o){r=!0,e=!1;for(const t of o)if(!1===t.mechanism?.handled){e=!0;break}}const i="ok"===t.status;(i&&0===t.errors||i&&e)&&(_t(t,{...e&&{status:this.Z},errors:t.errors||Number(r||e)}),this.captureSession(t))}async it(t){let n=0;for(;!t||n<t;){if(await new Promise(t=>setTimeout(t,1)),!this.J)return!0;n++}return!1}st(){return!1!==this.getOptions().enabled&&void 0!==this.et}ft(t,n,e,r){const o=this.getOptions(),i=this.getIntegrationNames();return!n.integrations&&i.length&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||r.setLastEventId(t.event_id||n.event_id),He(o,t,n,e,this,r).then(t=>{if(null===t)return t;this.emit("postprocessEvent",t,n),t.contexts={trace:{...t.contexts?.trace,...Wt(e)},...t.contexts};const r=ee(this,e);return t.sdkProcessingMetadata={dynamicSamplingContext:r,...t.sdkProcessingMetadata},t})}ot(t,n={},e=Ft(),r=Ut()){return this.lt(t,n,e,r).then(t=>t.event_id,t=>{})}lt(t,n,e,r){const o=this.getOptions(),{sampleRate:i}=o,s=mr(t),c=hr(t),u=`before send for type \`${t.type||"error"}\``;let a="before_send",f=0;const l=void 0===i?void 0:vn(i),d=c&&"number"==typeof l&&G()>l,p=Se(t.type);let h=0;const m=e.getSession()||r.getSession();return d&&"ok"!==m?.status?(this.recordDroppedEvent("sample_rate","error"),Ne(dr(i))):this.ft(t,n,e,r).then(t=>{if(null===t)throw lr("An event processor returned `null`, will not send event.");return h=t.spans?.length||0,Be(n)?t:function(t,n,e,r,o){const{beforeSend:i,ignoreSpans:s,beforeSendTransaction:c}=t,u=(a=t.beforeSendSpan,!!a&&"function"==typeof a&&"_static"in a&&!!a._static&&t.beforeSendSpan);var a;let f=n;if(hr(f)&&i){const t=f;return ue("",()=>i(t,e),()=>(r("callback_error"),null))}if(mr(f)){if(u||s){const t=function(t){const{trace_id:n,parent_span_id:e,span_id:r,status:o,origin:i,data:s,op:c,links:u}=t.contexts?.trace??{};return{data:s??{},description:t.transaction,op:c,parent_span_id:e,span_id:r??"",start_timestamp:t.start_timestamp??0,status:o??"ok",timestamp:t.timestamp,trace_id:n??"",origin:i,links:u,profile_id:s?.[Qt],exclusive_time:s?.[Gt],measurements:t.measurements,is_segment:!0}}(f);if(s?.length&&Wn({description:t.description,op:t.op,attributes:t.data},s))return r("ignored"),null;if(u){const e=fe(t,u);f=wt(n,{type:"transaction",timestamp:(l=e).timestamp,start_timestamp:l.start_timestamp,transaction:l.description,contexts:{trace:{trace_id:l.trace_id,span_id:l.span_id,parent_span_id:l.parent_span_id,op:l.op,status:l.status,origin:l.origin,links:l.links,data:{...l.data,...l.profile_id&&{[Qt]:l.profile_id},...l.exclusive_time&&{[Gt]:l.exclusive_time}}}},measurements:l.measurements})}if(f.spans){const t=[],n=f.spans;for(const e of n)s?.length&&Wn({description:e.description,op:e.op,attributes:e.data},s)?Yn(n,e):u?t.push(fe(e,u)):t.push(e);o(n.length-t.length),f.spans=t}}if(c)return ue("",()=>c(f,e),()=>(r("callback_error"),null))}var l;return f}(o,t,n,t=>{a=t},t=>{f=t})}).then(e=>{f&&this.recordDroppedEvent("ignored","span",f);if(!N(e)||null===e){if(this.recordDroppedEvent(a,p),s&&this.recordDroppedEvent(a,"span",1+h-f),null!==e)throw fr(`${u} must return \`null\` or a valid event.`);throw lr(`${"ignored"===a?"Transaction matched `ignoreSpans`":`${u} ${"callback_error"===a?"threw an error":"returned `null`"}`}, will not send event.`)}if(c&&m&&this.ut(m,e),d)throw this.recordDroppedEvent("sample_rate","error"),dr(i);if(s){const t=h-f-(e.spans?.length||0);t>0&&this.recordDroppedEvent("before_send","span",t)}const r=e.transaction_info;if(s&&r&&e.transaction!==t.transaction){const t="custom";e.transaction_info={...r,source:t}}return this.sendEvent(e,n),e}).then(null,t=>{if(P(n=t)&&ur in n||function(t){return P(t)&&cr in t}(t))throw t;var n;throw this.captureException(t,{mechanism:{handled:!1,type:"internal"},data:{__sentry__:!0},originalException:t}),fr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})}rt(t,n){this.J++,this.K.add(t).then(t=>(this.J--,t),t=>(this.J--,t===er&&this.recordDroppedEvent("queue_overflow",n),t))}dt(){const t=this.G;return this.G={},Object.entries(t).map(([t,n])=>{const[e,r]=t.split(":");return{reason:e,category:r,quantity:n}})}ht(){const t=this.dt();if(0===t.length)return;if(!this.nt)return;const n=(e=t,pe((r=this.Y.tunnel&&hn(this.nt))?{dsn:r}:{},[[{type:"client_report"},{timestamp:mt(),discarded_events:e}]]));var e,r;this.sendEnvelope(n)}}function hr(t){return void 0===t.type}function mr(t){return"transaction"===t.type}function yr(t,n){!0===n.debug&&u(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}),function(){const t=Ht();return t&&!function(t){return ar in t}(t)?t:void 0}()&&u(()=>{console.warn("[Sentry] `Sentry.init()` was called more than once. The new client replaces the active client, but the active client is not closed, so state from both can mix. Call `Sentry.init()` only once, or call `await Sentry.close()` before you call it again.")});Ft().update(n.initialScope);const e=new t(n);return gr(e),e.init(),e}function gr(t){Ft().setClient(t)}function vr(t,n){const e=t.indexOf("#"),r=-1===e?t.length:e,o=t.indexOf("?");if(-1===o||o>r)return t;const i=t.slice(0,o),s=t.slice(o+1,r),c=t.slice(r),u=function(t,n){if(t&&!1!==n)return t.split("&").map(t=>{const e=t.indexOf("="),r=-1===e?t:t.slice(0,e),o=new URLSearchParams(`${r}=`).keys().next().value;return void 0!==o&&Re(o,n)?`${r}=${Oe}`:t}).join("&")}(s,n);return u?`${i}?${u}${c}`:`${i}${c}`}function br(t,n){return void 0===t?void 0:vr(t,function(t){return(t??Ht())?.getDataCollectionOptions().urlQueryParams??!0}(n))}function _r(t){if(!t)return{};const n=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!n)return{};const e=n[6]||"",r=n[8]||"";return{host:n[4],path:n[5],protocol:n[2],search:e,hash:r,relative:n[5]+e+r}}function wr(t){const n=t?gn(t):Ht()?.getDsn();return n?`/${function(t){let n=2166136261;for(let e=0;e<t.length;e++)n^=t.charCodeAt(e),n=Math.imul(n,16777619);return n>>>0}(hn(n)).toString(36)}`:void 0}function Sr(t){"aggregates"in t?void 0===t.attrs?.ip_address&&(t.attrs={...t.attrs,ip_address:"{{auto}}"}):void 0===t.ipAddress&&(t.ipAddress="{{auto}}")}const Er=100;function $r(t,n){const e=Ht(),r=Ut();if(!e)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=Er}=e.getOptions();if(i<=0)return;const s={timestamp:mt(),...t},c=o?ue("",()=>u(()=>o(s,n)),()=>null):s;null!==c&&(e.emit&&e.emit("beforeAddBreadcrumb",c,n),r.addBreadcrumb(c,i))}const kr=new WeakMap,xr=()=>({name:"FunctionToString",setupOnce(){const t=Function.prototype.toString,n=Function.prototype.call.bind(t),e=Function.prototype.call.bind(Object.prototype.hasOwnProperty);try{Function.prototype.toString=function(){let t;try{kr.has(Ht())&&e(this,"__sentry_original__")&&(t=H(this))}catch{}return n(t??this)}}catch{}},setup(t){kr.set(t,!0)}}),Ir=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,/^Can't find variable: gmo$/,/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/,/can't redefine non-configurable property "solana"/,/vv\(\)\.getRestrictions is not a function/,/Can't find variable: _AutofillCallbackHandler/,/Object Not Found Matching Id:\d+, MethodName:simulateEvent/,/Java exception was raised during method invocation$/,/Java object is gone$/],jr=(t={})=>{let n;return{name:"EventFilters",setup(e){const r=e.getOptions();n=Or(t,r)},processEvent(e,r,o){if(!n){const e=o.getOptions();n=Or(t,e)}return function(t,n){if(t.type){if("transaction"===t.type&&function(t,n){if(!n?.length)return!1;const e=t.transaction;return!!e&&ct(e,n)}(t,n.ignoreTransactions))return!0}else{if(function(t,n){if(!n?.length)return!1;return function(t){const n=[];t.message&&n.push(t.message);try{const e=t.exception.values[t.exception.values.length-1];e?.value&&(n.push(e.value),e.type&&n.push(`${e.type}: ${e.value}`))}catch{}return n}(t).some(t=>ct(t,n))}(t,n.ignoreErrors))return!0;if(function(t){if(!t.exception?.values?.length)return!1;return!t.message&&!t.exception.values.some(t=>t.stacktrace||t.type&&"Error"!==t.type||t.value)}(t))return!0;if(function(t,n){if(!n?.length)return!1;const e=Tr(t);return!!e&&ct(e,n)}(t,n.denyUrls))return!0;if(!function(t,n){if(!n?.length)return!0;const e=Tr(t);return!e||ct(e,n)}(t,n.allowUrls))return!0}return!1}(e,n)?null:e}}};function Or(t={},n={}){return{allowUrls:[...t.allowUrls||[],...n.allowUrls||[]],denyUrls:[...t.denyUrls||[],...n.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...n.ignoreErrors||[],...t.disableErrorDefaults?[]:Ir],ignoreTransactions:[...t.ignoreTransactions||[],...n.ignoreTransactions||[]]}}function Tr(t){try{const n=[...t.exception?.values??[]].reverse().find(t=>void 0===t.mechanism?.parent_id&&t.stacktrace?.frames?.length),e=n?.stacktrace?.frames;return e?function(t=[]){for(let n=t.length-1;n>=0;n--){const e=t[n];if(e&&"<anonymous>"!==e.filename&&"[native code]"!==e.filename)return e.filename||null}return null}(e):null}catch{return null}}function Rr(t,n,e,r,o,i){if(!o.exception?.values||!i||!I(i.originalException))return;const s=o.exception.values.length>0?o.exception.values[o.exception.values.length-1]:void 0;s&&(o.exception.values=Cr(t,n,r,i.originalException,e,o.exception.values,s,0))}function Cr(t,n,e,r,o,i,s,c){if(i.length>=e+1)return i;let u=[...i];if(I(r[o])){Nr(s,c,r);const i=t(n,r[o]),a=u.length;Pr(i,o,a,c),u=Cr(t,n,e,r[o],o,[i,...u],i,a)}return Ar(r)&&r.errors.forEach((i,a)=>{if(u.length<e+1&&I(i)){Nr(s,c,r);const f=t(n,i),l=u.length;Pr(f,`errors[${a}]`,l,c),u=Cr(t,n,e,i,o,[f,...u],f,l)}}),function(t){return"error"in t&&"suppressed"in t}(r)&&["error","suppressed"].forEach(i=>{const a=r[i];if(u.length<e+1&&I(a)){Nr(s,c,r);const f=t(n,a),l=u.length;Pr(f,i,l,c),u=Cr(t,n,e,a,o,[f,...u],f,l)}}),u}function Ar(t){return Array.isArray(t.errors)}function Nr(t,n,e){t.mechanism={handled:!0,type:"auto.core.linked_errors",...Ar(e)&&{is_exception_group:!0},...t.mechanism,exception_id:n}}function Pr(t,n,e,r){t.mechanism={handled:!0,...t.mechanism,type:"chained",source:n,exception_id:e,parent_id:r}}function Lr(t){return function(t){return I(t)&&"__sentry_fetch_url_host__"in t&&"string"==typeof t.__sentry_fetch_url_host__}(t)?`${t.message} (${t.__sentry_fetch_url_host__})`:t.message}const Mr=new Set([]);const Dr=new Set;function Fr(){"console"in n&&s.forEach(function(t){!Dr.has(t)&&t in n.console&&(Dr.add(t),U(n.console,t,function(e){return c[t]=e,function(...e){const r=e[0],o=c[t],i=Mr.size&&"string"==typeof r&&ct(r,Mr);i||w("console",{args:e,level:t}),i||o?.apply(n.console,e)}}))})}function Ur(t){return"warn"===t?"warning":["fatal","error","warning","log","info","debug"].includes(t)?t:"log"}const qr=()=>{let t;return{name:"Dedupe",processEvent(n){if(n.type)return n;try{if(function(t,n){if(!n)return!1;if(function(t,n){const e=t.message,r=n.message;if(!e&&!r)return!1;if(e&&!r||!e&&r)return!1;if(e!==r)return!1;if(!Hr(t,n))return!1;if(!Br(t,n))return!1;return!0}(t,n))return!0;if(function(t,n){const e=Wr(n),r=Wr(t);if(!e||!r)return!1;if(e.type!==r.type||e.value!==r.value)return!1;if(!Hr(t,n))return!1;if(!Br(t,n))return!1;return!0}(t,n))return!0;return!1}(n,t))return null}catch{}return t=n}}};function Br(t,n){const e=y(t),r=y(n);if(!e||!r)return!e&&!r;if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++){const n=r[t],o=e[t];if(n.filename!==o.filename||n.lineno!==o.lineno||n.colno!==o.colno||n.function!==o.function)return!1}return!0}function Hr(t,n){const e=t.fingerprint,r=n.fingerprint;if(!e||!r)return!e&&!r;try{return!(e.join("")!==r.join(""))}catch{return!1}}function Wr(t){return t.exception?.values?.[0]}const zr=(t={})=>{const n=new Set(t.levels||s);return{name:"Console",setup(e){const r=function(t){const n="console",e=b(n,t);return _(n,Fr),e}(({args:t,level:r})=>{Ht()===e&&n.has(r)&&function(t,n){const e={category:"console",data:{arguments:n,logger:"console"},level:Ur(t),message:Yr(n)};if("assert"===t){if(!1!==n[0])return;{const t=n.slice(1);e.message=t.length>0?`Assertion failed: ${Yr(t)}`:"Assertion failed",e.data.arguments=t}}$r(e,{input:n,level:t})}(r,t)});if(e.registerCleanup(r),t.filter){const n=function(t){for(const n of t)Mr.add(n);return()=>{for(const n of t)Mr.delete(n)}}(t.filter);e.registerCleanup(n)}}}};function Yr(t){return"util"in n&&"function"==typeof n.util.format?n.util.format(...t):function(t,n){if(!Array.isArray(t))return"";const e=[];for(let n=0;n<t.length;n++){const r=t[n];A(r)?e.push(String(r)):r instanceof Error?e.push(r.message?`${r.name}: ${r.message}`:r.name):e.push(ot(0,r))}return e.join(n)}(t," ")}const Jr=()=>({name:"ConversationId",setup(t){t.on("spanStart",t=>{const n=Ft().getScopeData(),e=Ut().getScopeData(),r=n.conversationId||e.conversationId;if(r){const{op:n,data:e,description:o}=Tn(t);if(!n?.startsWith("gen_ai.")&&!e["ai.operationId"]&&!o?.startsWith("ai."))return;t.setAttribute("gen_ai.conversation.id",r)}})}}),Gr=n;function Xr(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Kr(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in Gr))return!1;try{return new Headers,new Request("data:,"),new Response,!0}catch{return!1}}())return!1;if(Xr(Gr.fetch))return!0;let t=!1;const n=Gr.document;if(n&&"function"==typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e),e.contentWindow?.fetch&&(t=Xr(e.contentWindow.fetch)),n.head.removeChild(e)}catch(t){}return t}function Qr(t){const e="fetch",r=b(e,t);return _(e,()=>function(){if(Ee()&&!Kr())return;U(n,"fetch",function(t){return new Proxy(t,{apply(t,e,r){const o=new Error,{method:i,url:s}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[n,e]=t;return{url:Zr(n),method:Vr(e,"method")?String(e.method).toUpperCase():F(n)&&Vr(n,"method")?String(n.method).toUpperCase():"GET"}}const n=t[0];return{url:Zr(n),method:Vr(n,"method")?String(n.method).toUpperCase():"GET"}}(r),c={args:r,fetchData:{method:i,url:s},startTimestamp:1e3*vt(),virtualError:o,headers:to(r)};return w("fetch",{...c}),Reflect.apply(t,n,r).then(async t=>(w("fetch",{...c,endTimestamp:1e3*vt(),response:t}),t),t=>{w("fetch",{...c,endTimestamp:1e3*vt(),error:t}),I(t)&&void 0===t.stack&&(t.stack=o.stack,q(t,"framesToPop",1));const e=Ht(),r=e?.getOptions().enhanceFetchErrorMessages??"always";if(!1!==r&&I(t)&&"TypeError"===t.name&&("Failed to fetch"===t.message||"Load failed"===t.message||"NetworkError when attempting to fetch resource."===t.message))try{const e=new URL(c.fetchData.url,n.location?.href).host;e&&("always"===r?t.message=`${t.message} (${e})`:q(t,"__sentry_fetch_url_host__",e))}catch{}throw t})}})})}()),r}function Vr(t,n){return P(t)&&!!t[n]}function Zr(t){return"string"==typeof t?t:t?Vr(t,"url")?t.url:t.toString?t.toString():"":""}function to(t){const[n,e]=t;try{if("object"==typeof e&&null!==e&&"headers"in e&&e.headers)return new Headers(e.headers);if(F(n))return new Headers(n.headers)}catch{}}function no(t){return void 0===t?void 0:t>=400&&t<500?"warning":t>=500?"error":void 0}const eo=()=>{},ro=["attachTo","createForm","createWidget","remove"],oo=Object.assign(t=>(u(()=>{console.warn("You are using feedbackIntegration() even though this bundle does not include feedback.")}),{name:"Feedback",...ro.reduce((t,n)=>(t[n]=eo,t),{})}),{_isShim:!0}),io=["start","stop","flush"];const so=t=>(u(()=>{console.warn("You are using browserTracingIntegration() even though this bundle does not include tracing.")}),{name:"BrowserTracing"}),co=()=>(u(()=>{console.warn("You are using elementTimingIntegration() even though this bundle does not include element timing.")}),{name:"ElementTiming"});function uo(t,n){}const ao={trace:uo,debug:uo,info:uo,warn:uo,error:uo,fatal:uo,fmt:function(t,...n){return""}},fo=t=>({name:"ConsoleLogs",setup:eo});function lo(t,n,e){}const po={count:lo,gauge:lo,distribution:lo},ho=()=>(u(()=>{console.warn("You are using spanStreamingIntegration() even though this bundle does not include tracing.")}),{name:"SpanStreaming"}),mo=()=>(u(()=>{console.warn("You are using fetchStreamPerformanceIntegration() even though this bundle does not include tracing.")}),{name:"FetchStreamPerformance"}),yo=n,go={};try{"undefined"!=typeof Node&&(go.parentNode=Object.getOwnPropertyDescriptor(Node.prototype,"parentNode").get),"undefined"!=typeof Element&&(go.tagName=Object.getOwnPropertyDescriptor(Element.prototype,"tagName").get,go.id=Object.getOwnPropertyDescriptor(Element.prototype,"id").get,go.className=Object.getOwnPropertyDescriptor(Element.prototype,"className").get,go.getAttribute=Element.prototype.getAttribute),"undefined"!=typeof HTMLElement&&(go.dataset=Object.getOwnPropertyDescriptor(HTMLElement.prototype,"dataset").get)}catch{}function vo(t,n,e){const r=go[n];if(r)try{return r.call(t,e)}catch{}const o=t[n];return"function"==typeof o?o.call(t,e):o}function bo(t,n={}){if(!t)return"<unknown>";try{let e=t;const r=5,o=[];let i=0,s=0;const c=" > ",u=c.length;let a;const f=Array.isArray(n)?n:n.keyAttrs,l=Array.isArray(n)?void 0:n.maskAttributeFn,d=!Array.isArray(n)&&n.maxStringLength||80;for(;e&&i++<r&&(a=_o(e,f,l),!("html"===a||i>1&&s+o.length*u+a.length>=d));)o.push(a),s+=a.length,e=vo(e,"parentNode");return o.reverse().join(c)}catch{return"<unknown>"}}function _o(t,n,e){const r=[],o=vo(t,"tagName");if(!o)return"";if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement){const n=vo(t,"dataset");if(n){if(n.sentryComponent)return e?e("data-sentry-component",n.sentryComponent,t):n.sentryComponent;if(n.sentryElement)return e?e("data-sentry-element",n.sentryElement,t):n.sentryElement}}r.push(o.toLowerCase());const i=n?.length?n.filter(n=>vo(t,"getAttribute",n)).map(n=>[n,vo(t,"getAttribute",n)]):null;if(i?.length)i.forEach(([n,o])=>{r.push(`[${n}="${e&&o?e(n,o,t):o}"]`)});else{const n=vo(t,"id");n&&r.push(`#${e?e("id",n,t):n}`);const o=vo(t,"className");if(o&&R(o)){const n=(e?e("class",o,t):o).split(/\s+/);for(const t of n)r.push(`.${t}`)}}for(const n of["aria-label","type","name","title","alt"]){const o=vo(t,"getAttribute",n);o&&r.push(`[${n}="${e?e(n,o,t):o}"]`)}return r.join("")}const wo=t=>{const n=yo.requestIdleCallback||yo.setTimeout;if("hidden"===yo.document?.visibilityState)t();else{let i=!1;const s=()=>{i||(t(),i=!0)};e="visibilitychange",r=s,o={once:!0,capture:!0},yo.document&&yo.addEventListener(e,r,o),n(()=>{s(),function(t,n,e){yo.document&&yo.removeEventListener(t,n,e)}("visibilitychange",s,{capture:!0})})}var e,r,o};function So(){try{return yo.document?.location.href??""}catch{return""}}const Eo=new WeakMap;let $o,ko,xo,Io;function jo(t){return"boolean"==typeof t?t:!!t?.capture}function Oo(){if(!yo.document)return;const t=w.bind(null,"dom"),n=To(t,!0);yo.document.addEventListener("click",n,!1),yo.document.addEventListener("keypress",n,!1),["EventTarget","Node"].forEach(n=>{const e=yo,r=e[n]?.prototype;r?.hasOwnProperty?.("addEventListener")&&(U(r,"addEventListener",function(n){return function(e,r,o){if(("click"===e||"keypress"==e)&&r)try{const i=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},s=i[e]=i[e]||{captureListeners:new WeakSet,bubbleListeners:new WeakSet,listenerCount:0},c=jo(o);if(!s.handler){const r=To(t);s.handler=r,s.capture=c,n.call(this,e,r,s.capture)}const u=s[c?"captureListeners":"bubbleListeners"];u.has(r)||("object"==typeof o&&(o?.once||o?.signal)?s.sticky=!0:(u.add(r),s.listenerCount++))}catch{}return n.call(this,e,r,o)}}),U(r,"removeEventListener",function(t){return function(n,e,r){if(("click"===n||"keypress"==n)&&e)try{const o=this.__sentry_instrumentation_handlers__||{},i=o[n];i?.[jo(r)?"captureListeners":"bubbleListeners"].delete(e)&&(--i.listenerCount||i.sticky||(t.call(this,n,i.handler,i.capture),i.handler=void 0,delete o[n]),0===Object.keys(o).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return t.call(this,n,e,r)}}))})}function To(t,n=!1){return e=>{if(!e||e._sentryCaptured)return;const r=function(t){try{return t.target}catch{return null}}(e);if(function(t,n){return"keypress"===t&&(!n?.tagName||"INPUT"!==n.tagName&&"TEXTAREA"!==n.tagName&&!n.isContentEditable)}(e.type,r))return;q(e,"_sentryCaptured",!0),r&&!r._sentryId&&q(r,"_sentryId",ut());const o="keypress"===e.type?"input":e.type;if(!function(t){if(t.type!==ko)return!1;try{if(!t.target||t.target._sentryId!==xo)return!1}catch{}return!0}(e)){t({event:e,name:o,global:n}),ko=e.type,xo=r?r._sentryId:void 0}clearTimeout($o),$o=yo.setTimeout(()=>{xo=void 0,ko=void 0},1e3)}}function Ro(t){const n="history";b(n,t),_(n,Co)}function Co(){function t(t){return function(...n){const e=n.length>2?n[2]:void 0;if(e){const r=Io,o=function(t){try{return new URL(t,yo.location.origin).toString()}catch{return t}}(String(e));if(Io=o,r===o)return t.apply(this,n);w("history",{from:r,to:o})}return t.apply(this,n)}}yo.addEventListener("popstate",()=>{const t=yo.location.href,n=Io;if(Io=t,n===t)return;w("history",{from:n,to:t})}),"history"in yo&&yo.history&&(U(yo.history,"pushState",t),U(yo.history,"replaceState",t))}const Ao={};const No="__sentry_xhr_v3__";function Po(){if(!yo.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(t,n,e){let r=new Error;const o=1e3*vt(),i=R(e[0])?e[0].toUpperCase():void 0,s=function(t){if(R(t))return t;try{return t.toString()}catch{}return}(e[1]);if(!i||!s)return t.apply(n,e);n[No]={method:i,url:s,request_headers:{}},"POST"===i&&s.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const t=n[No];if(t&&4===n.readyState){try{t.status_code=n.status}catch{}w("xhr",{endTimestamp:1e3*vt(),startTimestamp:o,xhr:n,virtualError:r}),r=void 0,n.removeEventListener("readystatechange",c)}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?n.onreadystatechange=new Proxy(n.onreadystatechange,{apply:(t,n,e)=>(c(),t.apply(n,e))}):n.addEventListener("readystatechange",c),n.setRequestHeader=new Proxy(n.setRequestHeader,{apply(t,n,e){const[r,o]=e,i=n[No];return i&&R(r)&&R(o)&&(i.request_headers[r.toLowerCase()]=o),t.apply(n,e)}}),t.apply(n,e)}}),t.send=new Proxy(t.send,{apply(t,n,e){const r=n[No];if(!r)return t.apply(n,e);void 0!==e[0]&&(r.body=e[0]);return w("xhr",{startTimestamp:1e3*vt(),xhr:n}),t.apply(n,e)}})}const Lo=n;let Mo=0;const Do=[];function Fo(t){if(Mo>0)return!0;const n=t?Do.findIndex(n=>{return r=t,(e=n).msg===r.msg&&e.url===r.url&&e.line===r.line&&e.column===r.column;var e,r}):-1;return-1!==n&&(Do.splice(n,1),!0)}function Uo(t,e={}){if("function"!=typeof t)return t;try{if(Object.prototype.hasOwnProperty.call(t,"__sentry_wrapped__")){const n=t.__sentry_wrapped__;return"function"==typeof n?n:t}if(H(t))return t}catch{return t}const sentryWrapped=function(...r){n.yt=(n.yt||0)+1;try{const n=r.map(t=>Uo(t,e));return t.apply(this,n)}catch(t){throw Mo++,setTimeout(()=>{Mo--}),Bt(n=>{n.addEventProcessor(t=>(e.mechanism&&(lt(t,void 0),dt(t,e.mechanism)),t.extra={...t.extra,arguments:r},t)),captureException(t)}),t}finally{n.yt=(n.yt||0)-1}};try{for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(sentryWrapped[n]=t[n])}catch{}B(sentryWrapped,t),q(t,"__sentry_wrapped__",sentryWrapped);try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch{}return sentryWrapped}function qo(t){const n=So(),{referrer:e}=Lo.document||{},{userAgent:r}=Lo.navigator||{};return{url:n,headers:{...e&&{Referer:br(e,t)},...r&&{"User-Agent":r}}}}function Bo(t,n){const e=zo(t,n),r={type:Go(n),value:Xo(n)};return e.length&&(r.stacktrace={frames:e}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Ho(t,n,e,r){const o=Ht(),i=o?.getOptions().normalizeDepth,s=(c=n,Object.values(c).find(I));var c;const u={__serialized__:et(n,i)};if(s)return{exception:{values:[Bo(t,s)]},extra:u};const a={exception:{values:[{type:L(n)?n.constructor.name:r?"UnhandledRejection":"Error",value:ti(n,{isUnhandledRejection:r})}]},extra:u};if(e){const n=zo(t,e);n.length&&(a.exception.values[0].stacktrace={frames:n})}return a}function Wo(t,n){return{exception:{values:[Bo(t,n)]}}}function zo(t,n){const e=n.stacktrace||n.stack||"",r=function(t){if(t&&Yo.test(t.message))return 1;return 0}(n),o=function(t){if("number"==typeof t.framesToPop)return t.framesToPop;return 0}(n);try{return t(e,r,o)}catch{}return[]}const Yo=/Minified React error #\d+;/i;function Jo(t){return"undefined"!=typeof WebAssembly&&void 0!==WebAssembly.Exception&&t instanceof WebAssembly.Exception}function Go(t){const n=t?.name;if(!n&&Jo(t)){return t.message&&Array.isArray(t.message)&&2==t.message.length?t.message[0]:"WebAssembly.Exception"}return n}function Xo(t){const n=t?.message;return Jo(t)?Array.isArray(t.message)&&2==t.message.length?t.message[1]:"wasm exception":n?n.error&&"string"==typeof n.error.message?Lr(n.error):Lr(t):"No error message"}function Ko(t,n,e,r){const o=Vo(t,n,e?.syntheticException||void 0,r);return dt(o),o.level="error",e?.event_id&&(o.event_id=e.event_id),Ae(o)}function Qo(t,n,e="info",r,o){const i=Zo(t,n,r?.syntheticException||void 0,o);return i.level=e,r?.event_id&&(i.event_id=r.event_id),Ae(i)}function Vo(t,n,e,r,o){let i;if(O(n)&&n.error){return Wo(t,n.error)}if(T(n)||j(n,"DOMException")){const o=n;if("stack"in n){i=Wo(t,n);const o=i.exception?.values?.[0];if(r&&e&&o&&!o.stacktrace){const n=zo(t,e);n.length&&(o.stacktrace={frames:n},dt(i,{synthetic:!0}))}}else{const n=o.name||(T(o)?"DOMError":"DOMException"),s=o.message?`${n}: ${o.message}`:n;i=Zo(t,s,e,r),lt(i,s)}return i}if(I(n))return Wo(t,n);if(N(n)||L(n)){return i=Ho(t,n,e,o),dt(i,{synthetic:!0}),i}const s=String(n);return i=Zo(t,s,e,r),lt(i,s),dt(i,{synthetic:!0}),i}function Zo(t,n,e,r){const o={};if(r&&e){const r=zo(t,e);r.length&&(o.exception={values:[{value:n,stacktrace:{frames:r}}]}),dt(o,{synthetic:!0})}if(C(n)){const{__sentry_template_string__:t,__sentry_template_values__:e}=n;return o.logentry={message:t,params:e},o}return o.message=n,o}function ti(t,{isUnhandledRejection:n}){const e=function(t){const n=Object.keys(W(t));return n.sort(),n[0]?n.join(", "):"[object has no keys]"}(t),r=n?"promise rejection":"exception";if(O(t))return`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``;if(L(t)){return`Event \`${function(t){try{const n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch{}}(t)}\` (type=${t.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${e}`}class ni extends pr{constructor(t){const n=(r=t,{release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Lo.SENTRY_RELEASE?.id,sendClientReports:!0,parentSpanIsAlwaysRootSpan:!0,...r});var r;!function(t,n,r=[n],o="npm"){const i=(t._metadata=t._metadata||{}).sdk=t._metadata.sdk||{};i.name||(i.name=`sentry.javascript.${n}`,i.packages=r.map(t=>({name:`${o}:@sentry/${t}`,version:e})),i.version=e)}(n,"browser",["browser"],Lo.SENTRY_SDK_SOURCE||"cdn"),super(n),n.routeProvider&&function(t,n=Ht()){n&&Eo.set(n,t)}(n.routeProvider,this),this.Z="unhandled";const{userInfo:o}=this.getDataCollectionOptions();n._metadata?.sdk&&(n._metadata.sdk.settings={infer_ip:o?"auto":"never",...n._metadata.sdk.settings});const{sendClientReports:i}=this.Y,s=()=>{vt()},c=[[Lo.document,"visibilitychange",()=>{s(),"hidden"===Lo.document.visibilityState&&(i&&this.ht(),queueMicrotask(()=>{this.flush()}))}],[Lo.document,"freeze",s],[Lo.document,"resume",s],[Lo,"pagehide",s],[Lo,"pageshow",s]];c.forEach(([t,n,e])=>t?.addEventListener?.(n,e)),this.on("close",()=>c.forEach(([t,n,e])=>t?.removeEventListener?.(n,e))),o&&this.on("beforeSendSession",Sr)}eventFromException(t,n){return Ko(this.Y.stackParser,t,n,this.Y.attachStacktrace)}eventFromMessage(t,n="info",e){return Qo(this.Y.stackParser,t,n,e,this.Y.attachStacktrace)}ft(t,n,e,r){return t.platform=t.platform||"javascript",super.ft(t,n,e,r)}}function ei(t,n=function(t){const n=Ao[t];if(n)return n;let e=yo[t];if(Xr(e))return Ao[t]=e.bind(yo);const r=yo.document;if(r&&"function"==typeof r.createElement)try{const n=r.createElement("iframe");n.hidden=!0,r.head.appendChild(n);const o=n.contentWindow;o?.[t]&&(e=o[t]),r.head.removeChild(n)}catch(t){}return e?Ao[t]=e.bind(yo):e}("fetch")){let e=0,r=0;return ir(t,async function(o){const i=o.body.length;e+=i,r++;const s={body:o.body,method:"POST",referrerPolicy:"strict-origin",headers:t.headers,keepalive:e<=6e4&&r<15,...t.fetchOptions};try{const e=await n(t.url,s);return{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}}catch(t){throw Ao["fetch"]=void 0,t}finally{e-=i,r--}},rr(t.bufferSize||40))}const ri={startProfiler:function(){const t=Ht();if(!t)return;t.getIntegrationByName("BrowserProfiling")&&t.emit("startUIProfiler")},stopProfiler:function(){const t=Ht();if(!t)return;t.getIntegrationByName("BrowserProfiling")&&t.emit("stopUIProfiler")}};function oi(t,n,e,r){const o={filename:t,function:"<anonymous>"===n?a:n,in_app:!0};return void 0!==e&&(o.lineno=e),void 0!==r&&(o.colno=r),o}const ii=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,si=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,ci=/\((\S*)(?::(\d+))(?::(\d+))\)/,ui=/at (.+?) ?\(data:(.+?),/,ai=[30,t=>{const n=t.match(ui);if(n)return{filename:`<data:${n[2]}>`,function:n[1]};const e=ii.exec(t);if(e){const[,t,n,r]=e;return oi(t,a,+n,+r)}const r=si.exec(t);if(r){if(0===r[2]?.indexOf("eval")){const t=ci.exec(r[2]);t&&(r[2]=t[1],r[3]=t[2],r[4]=t[3])}const[t,n]=wi(r[1]||a,r[2]);return oi(n,t,r[3]?+r[3]:void 0,r[4]?+r[4]:void 0)}}],fi=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,li=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,di=[50,t=>{const n=fi.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){const t=li.exec(n[3]);t&&(n[1]=n[1]||"eval",n[3]=t[1],n[4]=t[2],n[5]="")}let t=n[3],e=n[1]||a;return[e,t]=wi(e,t),oi(t,e,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}}],pi=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,hi=[40,t=>{const n=pi.exec(t);return n?oi(n[2],n[1]||a,+n[3],n[4]?+n[4]:void 0):void 0}],mi=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,yi=[10,t=>{const n=mi.exec(t);return n?oi(n[2],n[3]||a,+n[1]):void 0}],gi=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,vi=[20,t=>{const n=gi.exec(t);return n?oi(n[5],n[3]||n[4]||a,+n[1],+n[2]):void 0}],bi=[ai,di],_i=d(...bi),wi=(t,n)=>{const e=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return e||r?[-1!==t.indexOf("@")?t.split("@")[0]:a,e?`safari-extension:${n}`:`safari-web-extension:${n}`]:[t,n]};const Si=1024,Ei=(t={})=>{const e={dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:"Breadcrumbs",setup(t){var r;e.dom&&(r=function(t,e){return function(r){if(Ht()!==t)return;let o,i,s="object"==typeof e?e.serializeAttribute:void 0,c="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;c&&c>Si&&(c=Si),"string"==typeof s&&(s=[s]);try{const t=r.event,e=function(t){return!!t&&!!t.target}(t)?t.target:t;o=bo(e,{keyAttrs:s,maxStringLength:c}),i=function(t,e=5){if(!n.HTMLElement)return null;let r=t;for(let t=0;t<e;t++){if(!r)return null;if(r instanceof HTMLElement){if(r.dataset.sentryComponent)return r.dataset.sentryComponent;if(r.dataset.sentryElement)return r.dataset.sentryElement}r=r.parentNode}return null}(e)}catch{o="<unknown>"}if(0===o.length)return;const u={category:`ui.${r.name}`,message:o};i&&(u.data={"ui.component_name":i}),$r(u,{event:r.event,name:r.name,global:r.global})}}(t,e.dom),b("dom",r),_("dom",Oo)),e.xhr&&function(t){b("xhr",t),_("xhr",Po)}(function(t){return function(n){if(Ht()!==t)return;const{startTimestamp:e,endTimestamp:r}=n,o=n.xhr[No];if(!e||!r||!o)return;const{method:i,url:s,status_code:c,body:u}=o,a={method:i,url:br(s),status_code:c},f={xhr:n.xhr,input:u,startTimestamp:e,endTimestamp:r},l={category:"xhr",data:a,type:"http",level:no(c)};t.emit("beforeOutgoingRequestBreadcrumb",l,f),$r(l,f)}}(t)),e.fetch&&Qr(function(t){return function(n){if(Ht()!==t)return;const{startTimestamp:e,endTimestamp:r}=n;if(r&&(!n.fetchData.url.match(/sentry_key/)||"POST"!==n.fetchData.method))if(n.error){const o={data:n.error,input:n.args,startTimestamp:e,endTimestamp:r},i={category:"fetch",data:{...n.fetchData,url:br(n.fetchData.url)},level:"error",type:"http"};t.emit("beforeOutgoingRequestBreadcrumb",i,o),$r(i,o)}else{const o=n.response,i={...n.fetchData,url:br(n.fetchData.url),status_code:o?.status},s={input:n.args,response:o,startTimestamp:e,endTimestamp:r},c={category:"fetch",data:i,type:"http",level:no(i.status_code)};t.emit("beforeOutgoingRequestBreadcrumb",c,s),$r(c,s)}}}(t)),e.history&&Ro(function(t){return function(n){if(Ht()!==t)return;let e=n.from,r=n.to;const o=_r(Lo.location.href);let i=e?_r(e):void 0;const s=_r(r);i?.path||(i=o),o.protocol===s.protocol&&o.host===s.host&&(r=s.relative),o.protocol===i.protocol&&o.host===i.host&&(e=i.relative),$r({category:"navigation",data:{from:br(e),to:br(r)}})}}(t)),e.sentry&&t.on("beforeSendEvent",function(t){return function(n){Ht()===t&&$r({category:"sentry."+("transaction"===n.type?"transaction":"event"),event_id:n.event_id,level:n.level,message:ft(n)},{event:n})}}(t))}}};const $i="EventTarget,Window,Node,ApplicationCache,AudioTrackList,BroadcastChannel,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(","),ki=(t={})=>{const n={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,unregisterOriginalCallbacks:!1,...t};return{name:"BrowserApiErrors",setupOnce(){n.setTimeout&&U(Lo,"setTimeout",xi),n.setInterval&&U(Lo,"setInterval",xi),n.requestAnimationFrame&&U(Lo,"requestAnimationFrame",Ii),n.XMLHttpRequest&&"XMLHttpRequest"in Lo&&U(XMLHttpRequest.prototype,"send",ji);const t=n.eventTarget;if(t){(Array.isArray(t)?t:$i).forEach(t=>function(t,n){const e=Lo,r=e[t]?.prototype;if(!r?.hasOwnProperty?.("addEventListener"))return;U(r,"addEventListener",function(e){return function(r,o,i){try{"function"==typeof o.handleEvent&&(o.handleEvent=Uo(o.handleEvent,{mechanism:{data:{handler:m(o),target:t},handled:!1,type:"auto.browser.browserapierrors.handleEvent"}}))}catch{}return n.unregisterOriginalCallbacks&&function(t,n,e){t&&"object"==typeof t&&"removeEventListener"in t&&"function"==typeof t.removeEventListener&&t.removeEventListener(n,e)}(this,r,o),e.apply(this,[r,Uo(o,{mechanism:{data:{handler:m(o),target:t},handled:!1,type:"auto.browser.browserapierrors.addEventListener"}}),i])}}),U(r,"removeEventListener",function(t){return function(n,e,r){try{if(Object.prototype.hasOwnProperty.call(e,"__sentry_wrapped__")){const o=e.__sentry_wrapped__;o&&t.call(this,n,o,r)}}catch{}return t.call(this,n,e,r)}})}(t,n))}}}};function xi(t){return function(...n){const e=n[0];return n[0]=Uo(e,{mechanism:{handled:!1,type:`auto.browser.browserapierrors.${m(t)}`}}),t.apply(this,n)}}function Ii(t){return function(n){return t.apply(this,[Uo(n,{mechanism:{data:{handler:m(t)},handled:!1,type:"auto.browser.browserapierrors.requestAnimationFrame"}})])}}function ji(t){return function(...n){const e=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in e&&"function"==typeof e[t]&&U(e,t,function(n){const e={mechanism:{data:{handler:m(n)},handled:!1,type:`auto.browser.browserapierrors.xhr.${t}`}},r=H(n);return r&&(e.mechanism.data.handler=m(r)),Uo(n,e)})}),t.apply(this,n)}}const Oi=(t={})=>{const n=t.lifecycle??"page";return{name:"BrowserSession",setupOnce(){if(void 0===Lo.document)return;Xe({ignoreDuration:!0});let t=!1;wo(()=>{t||(Ve(),t=!0)});const e=Ut();let r=e.getUser();e.addScopeListener(n=>{const e=n.getUser();r?.id===e?.id&&r?.ip_address===e?.ip_address||(r=e,t&&Ve())}),"route"===n&&Ro(({from:n,to:e})=>{n!==e&&(Xe({ignoreDuration:!0}),Ve(),t=!0)})}}},Ti=()=>({name:"CultureContext",preprocessEvent(t){const n=Ri();n&&(t.contexts={...t.contexts,culture:{...n,...t.contexts?.culture}})},processSegmentSpan(t){const n=Ri();n&&de(t,{[Yt]:n.locale,[Jt]:n.timezone,[zt]:n.calendar})}});function Ri(){try{const t=Lo.Intl;if(!t)return;const n=t.DateTimeFormat().resolvedOptions();return{locale:n.locale,timezone:n.timeZone,calendar:n.calendar}}catch{return}}const Ci=(t={})=>{const n={onerror:!0,onunhandledrejection:!0,...t};return{name:"GlobalHandlers",setupOnce(){Error.stackTraceLimit=50},setup(t){n.onerror&&function(t){!function(t){const n="error";b(n,t),_(n,E)}(n=>{const{stackParser:e,attachStacktrace:r}=Ai();if(Ht()!==t||Fo(n))return;const{msg:o,url:i,line:s,column:c,error:u}=n,f=function(t,n,e,r){const o=t.exception=t.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},c=s.stacktrace=s.stacktrace||{},u=c.frames=c.frames||[];0===u.length&&u.push({colno:r,lineno:e,filename:Ni(n)??So(),function:a,in_app:!0});return t}(Vo(e,u||o,void 0,r,!1),i,s,c);f.level="error",Ye(f,{originalException:u,mechanism:{handled:!1,type:"auto.browser.global_handlers.onerror"}})})}(t),n.onunhandledrejection&&function(t){!function(t){const n="unhandledrejection";b(n,t),_(n,k)}(n=>{const{stackParser:e,attachStacktrace:r}=Ai();if(Ht()!==t||Fo())return;const o=function(t){if(A(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}(n),i=A(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:Vo(e,o,void 0,r,!0);i.level="error",Ye(i,{originalException:o,mechanism:{handled:!1,type:"auto.browser.global_handlers.onunhandledrejection"}})})}(t)}}};function Ai(){const t=Ht();return t?.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}function Ni(t){if(R(t)&&0!==t.length)return t.startsWith("data:")?`<${function(t,n=!0){if(t.startsWith("data:")){const e=t.match(/^data:([^;,]+)/),r=e?e[1]:"text/plain",o=t.includes(";base64,"),i=t.indexOf(",");let s="";if(n&&-1!==i){const n=t.slice(i+1);s=n.length>10?`${n.slice(0,10)}... [truncated]`:n}return`data:${r}${o?",base64":""}${s?`,${s}`:""}`}return t}(t,!1)}>`:t}const Pi=()=>({name:"HttpContext",preprocessEvent(t,n,e){if(!Lo.navigator&&!Lo.location&&!Lo.document)return;const{url:r,headers:o}=qo(e),i=e.getDataCollectionOptions().httpHeaders.request,s=Object.entries(t.request?.headers??{}).filter(([t])=>!(t in o)),c={...Ce(o,i),...Object.fromEntries(s)};t.request={url:br(r,e),...t.request,...Object.keys(c).length>0?{headers:c}:{headers:void 0}}},processSpan(t,n){if(!Lo.navigator&&!Lo.location&&!Lo.document)return;const e=qo(n),r=Ce(e.headers,n.getDataCollectionOptions().httpHeaders.request),o=r.Referer,{hostname:i,protocol:s}=Lo.location||{};de(t,{[nn]:r["User-Agent"],[Xt]:"file:"===s||"localhost"===i||"127.0.0.1"===i||"[::1]"===i||!!i?.endsWith(".localhost"),...t.is_segment&&{[tn]:"http.client"!==t.attributes?.[Kt]?br(e.url):void 0,"http.request.header.referer":o?[o]:void 0}})}}),Li=(t={})=>{const n=t.limit||5,e=t.key||"cause";return{name:"LinkedErrors",preprocessEvent(t,r,o){Rr(Bo,o.getOptions().stackParser,e,n,t,r)}}},Mi=/^HTML(\w*)Element$/;function Di(t){if("undefined"!=typeof window&&t===window)return"[Window]";if("undefined"!=typeof document&&t===document)return"[Document]";if(function(t){if("undefined"==typeof Element)return!1;try{return t instanceof Element}catch{return!1}}(t)){const n=function(t){const n=Object.getPrototypeOf(t);return n?.constructor?n.constructor.name:"null prototype"}(t);if(Mi.test(n))return`[HTMLElement: ${bo(t)}]`}}function Fi(){return!!function(){if(void 0===Lo.window)return!1;const t=Lo;if(t.nw)return!1;const n=t.chrome||t.browser;if(!n?.runtime?.id)return!1;const e=So();return!(Lo===Lo.top&&/^(?:chrome-extension|moz-extension|ms-browser-extension|safari-web-extension):\/\//.test(e))}()}function Ui(t){const{tunnel:n,dsn:e,transportOptions:r}=t;if(!n||"string"==typeof n)return{tunnel:n,transportOptions:r};const o=!0===n?{}:n,i=e&&gn(e),s=o.path??(i&&wr(i));if(!s)return{tunnel:void 0,transportOptions:r};return{tunnel:`${function(t){const n=(t?.startsWith("./")?t.slice(1):t??"").replace(/\/$/,"");return!n||n.startsWith("/")?n:`/${n}`}(o.basePath)}${s}${o.trailingSlash?"/":""}`,transportOptions:{...r,headers:{"Content-Type":"application/x-sentry-envelope",...r?.headers}}}}function qi(t){return[jr(),xr(),Jr(),ki(),Ei(),zr(),Ci(),Li(),qr(),Pi(),Ti(),Oi()]}const Bi=["replayIntegration","replayCanvasIntegration","feedbackIntegration","feedbackModalIntegration","feedbackScreenshotIntegration","captureConsoleIntegration","contextLinesIntegration","linkedErrorsIntegration","dedupeIntegration","extraErrorDataIntegration","graphqlClientIntegration","httpClientIntegration","reportingObserverIntegration","rewriteFramesIntegration","browserProfilingIntegration","userTimingIntegration","interactionsIntegration","moduleMetadataIntegration"],Hi={replayCanvasIntegration:"replay-canvas",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot"};const Wi=Lo;return t.BrowserClient=ni,t.SDK_VERSION=e,t.SEMANTIC_ATTRIBUTE_SENTRY_OP="sentry.op",t.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN="sentry.origin",t.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE=en,t.Scope=$t,t.WINDOW=Lo,t.addBreadcrumb=$r,t.addEventProcessor=function(t){Ut().addEventProcessor(t)},t.addIntegration=function(t){const n=Ht();n&&n.addIntegration(t)},t.breadcrumbsIntegration=Ei,t.browserApiErrorsIntegration=ki,t.browserSessionIntegration=Oi,t.browserTracingIntegration=so,t.captureEvent=Ye,t.captureException=captureException,t.captureFeedback=function(t,n={},e=Ft()){const{message:r,name:o,email:i,url:s,source:c,associatedEventId:u,tags:a}=t,f={contexts:{feedback:{contact_email:i,name:o,message:r,url:s,source:c,associated_event_id:u}},type:"feedback",level:"info",tags:a},l=e?.getClient()||Ht();return l&&l.emit("beforeSendFeedback",f,n),e.captureEvent(f,n)},t.captureMessage=function(t,n){const e="string"==typeof n?n:void 0,r="string"!=typeof n?{captureContext:n}:void 0;return Ft().captureMessage(t,e,r)},t.captureSession=Ve,t.chromeStackLineParser=ai,t.close=async function(t){const n=Ft(),e=n.getClient();if(e){const r=await e.close(t);return n.getClient()===e&&n.setClient(void 0),r}return Promise.resolve(!1)},t.consoleIntegration=zr,t.consoleLoggingIntegration=fo,t.continueTrace=(t,n)=>{const e=Pt(r());if(e.continueTrace)return e.continueTrace(t,n);const{sentryTrace:o,baggage:i}=t,s=Ht(),c=an(i);return s&&!function(t,n){const e=yn(t);return(!n||!e||n===e)&&(!t.getOptions().strictTraceContinuation||!(n&&!e||!n&&e))}(s,c?.org_id)?function(t){const n=Ie();if(n.startNewTrace)return n.startNewTrace(t);return xe(null,()=>Bt(n=>(n.setPropagationContext({traceId:St(),sampleRand:G()}),t())))}(n):Bt(t=>{const e=_n(o,i);return t.setPropagationContext(e),xe(null,n)})},t.createTransport=ir,t.createUserFeedbackEnvelope=function(t,{metadata:n,tunnel:e,dsn:r}){const o={event_id:t.event_id,sent_at:(new Date).toISOString(),...n?.sdk&&{sdk:{name:n.sdk.name,version:n.sdk.version}},...!!e&&!!r&&{dsn:hn(r)}},i=function(t){return[{type:"user_report"},t]}(t);return pe(o,[i])},t.dedupeIntegration=qr,t.defaultStackLineParsers=bi,t.defaultStackParser=_i,t.elementTimingIntegration=co,t.endSession=Ke,t.eventFiltersIntegration=jr,t.eventFromException=Ko,t.eventFromMessage=Qo,t.exceptionFromError=Bo,t.feedbackAsyncIntegration=oo,t.feedbackIntegration=oo,t.fetchStreamPerformanceIntegration=mo,t.flush=async function(t){const n=Ht();return n?n.flush(t):Promise.resolve(!1)},t.forceLoad=function(){},t.functionToStringIntegration=xr,t.geckoStackLineParser=di,t.getClient=Ht,t.getCurrentScope=Ft,t.getDefaultIntegrations=qi,t.getGlobalScope=qt,t.getIsolationScope=Ut,t.getTraceData=function(t={}){const n=t.client||Ht();if(!Ge()||!n)return{};const e=Pt(r());if(e.getTraceData)return e.getTraceData(t);const i=t.scope||Ft(),s=t.span||Bn(),c=te(s)&&!Hn(n.getOptions());if(!s&&void 0!==o(r()).externalPropagationContextProvider)return{};const u=s&&!c?kn(s):function(t){const{traceId:n,sampled:e,propagationSpanId:r}=t.getPropagationContext();return wn(n,r,e)}(i),a=fn(s?re(s):ee(n,i));if(!bn.test(u))return{};const f={"sentry-trace":u,baggage:a};return t.propagateTraceparent&&(f.traceparent=s&&!c?function(t){const{traceId:n,spanId:e}=t.spanContext();return Sn(n,e,Nn(t))}(s):function(t){const{traceId:n,sampled:e,propagationSpanId:r}=t.getPropagationContext();return Sn(n,r,e)}(i)),f},t.globalHandlersIntegration=Ci,t.httpContextIntegration=Pi,t.init=function(t={}){const n=!t.skipBrowserExtensionCheck&&Fi();let e=null==t.defaultIntegrations?qi():t.defaultIntegrations;const r=Xn({integrations:t.integrations,defaultIntegrations:e}),o={...t,...Ui(t),enabled:!n&&t.enabled,stackParser:(i=t.stackParser||_i,Array.isArray(i)?d(...i):i),integrations:r,transport:t.transport||ei};var i;return V=Di,yr(ni,o)},t.isEnabled=Ge,t.isInitialized=function(){return!!Ht()},t.lastEventId=Je,t.lazyLoadIntegration=async function(t,n){const r=Bi.includes(t)?function(t){return Hi[t]||t.replace("Integration","").toLowerCase()}(t):void 0,o=Wi.Sentry=Wi.Sentry||{};if(!r)throw new Error(`Cannot lazy load integration: ${t}`);const i=o[t];if("function"==typeof i&&!("_isShim"in i))return i;const s=function(t){const n=Ht(),r=n?.getOptions()?.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${e}/${t}.min.js`,r).toString()}(r),c=Lo.document.createElement("script");c.src=s,c.crossOrigin="anonymous",c.referrerPolicy="strict-origin",n&&c.setAttribute("nonce",n);const u=new Promise((t,n)=>{c.addEventListener("load",()=>t()),c.addEventListener("error",n)}),a=Lo.document.currentScript,f=Lo.document.body||Lo.document.head||a?.parentElement;if(!f)throw new Error(`Could not find parent element to insert lazy-loaded ${t} script`);f.appendChild(c);try{await u}catch{throw new Error(`Error when loading integration: ${t}`)}const l=o[t];if("function"!=typeof l)throw new Error(`Could not load integration: ${t}`);return l},t.linkedErrorsIntegration=Li,t.logger=ao,t.makeFetchTransport=ei,t.metrics=po,t.onLoad=function(t){t()},t.opera10StackLineParser=yi,t.opera11StackLineParser=vi,t.parameterize=function(t,...n){const e=t.map((n,e)=>n??t.raw[e]),r=new String(String.raw({raw:e},...n));return r.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),r.__sentry_template_values__=n,r},t.replayIntegration=function(t){return u(()=>{console.warn("You are using replayIntegration() even though this bundle does not include replay.")}),{name:"Replay",...io.reduce((t,n)=>(t[n]=eo,t),{})}},t.setAttribute=function(t,n){Ut().setAttribute(t,n)},t.setAttributes=function(t){Ut().setAttributes(t)},t.setContext=function(t,n){Ut().setContext(t,n)},t.setConversationId=function(t){Ut().setConversationId(t)},t.setCurrentClient=gr,t.setExtra=function(t,n){Ut().setExtra(t,n)},t.setExtras=function(t){Ut().setExtras(t)},t.setTag=function(t,n){Ut().setTag(t,n)},t.setTags=function(t){Ut().setTags(t)},t.setUser=function(t){Ut().setUser(t)},t.showReportDialog=function(t={}){const n=Lo.document,e=n?.head||n?.body;if(!e)return;const r=Ft(),o=Ht(),i=o?.getDsn();if(!i)return;const s={...t,user:{...r.getUser(),...t.user},eventId:t.eventId||Je()},{onLoad:c,onClose:u,onError:a}=s;if(!s.eventId)return void a?.(new Error("No event ID to show the report dialog for"));const f=Lo.document.createElement("script");if(f.async=!0,f.crossOrigin="anonymous",f.src=function(t,n){const e=gn(t);if(!e)return"";const r=`${Ze(e)}embed/error-page/`;let o=`dsn=${hn(e)}`;for(const t in n)if("dsn"!==t&&"onClose"!==t&&"onError"!==t)if("user"===t){const t=n.user;if(!t)continue;t.name&&(o+=`&name=${encodeURIComponent(t.name)}`),t.email&&(o+=`&email=${encodeURIComponent(t.email)}`)}else o+=`&${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`;return`${r}?${o}`}(i,s),c&&(f.onload=c),a&&(f.onerror=()=>{a(new Error("Failed to load the report dialog script"))}),u){const t=n=>{if("__sentry_reportdialog_closed__"===n.data)try{u()}finally{Lo.removeEventListener("message",t)}};Lo.addEventListener("message",t),f.addEventListener("error",()=>{Lo.removeEventListener("message",t)})}e.appendChild(f)},t.spanStreamingIntegration=ho,t.spanToBaggageHeader=function(t){return fn(re(t))},t.spanToJSON=function(t){if(An(t))return t.getSpanJSON();const{spanId:n,traceId:e}=t.spanContext();if(Cn(t)){const{attributes:r,startTime:o,name:i,endTime:s,status:c,links:u}=t;return{name:i,span_id:n,trace_id:e,parent_span_id:Rn(t),start_timestamp:jn(o),end_timestamp:jn(s)||void 0,is_segment:qn(t),status:Ln(c),attributes:Mn(r,c),links:In(u)}}return{span_id:n,trace_id:e,start_timestamp:0,name:"",status:"ok",is_segment:qn(t),attributes:{}}},t.spanToStaticSpanJSON=Tn,t.spanToTraceHeader=kn,t.startSession=Xe,t.suppressTracing=function(t){const n=Ie();return n.suppressTracing?n.suppressTracing(t):Bt(n=>(n.setSDKProcessingMetadata({[kt]:!0}),t()))},t.uiProfiler=ri,t.updateSpanName=function(t,n){t.updateName(n),t.setAttributes({[rn]:n}),function(t,n){qn(t)&&t.setAttribute(Vt,n)}(t,"custom")},t.winjsStackLineParser=hi,t.withIsolationScope=function(...t){const n=Pt(r());if(2===t.length){const[e,r]=t;return e?n.withSetIsolationScope(e,r):n.withIsolationScope(r)}return n.withIsolationScope(t[0])},t.withScope=Bt,t.withStaticSpan=function(t){return q(t,"_static",!0),t},t.withStreamedSpan=function(t){return t},t}({});
|
|
//# sourceMappingURL=bundle.min.js.map
|