-
Notifications
You must be signed in to change notification settings - Fork 21
/
sentry.js
3 lines (3 loc) · 70.8 KB
/
sentry.js
1
2
3
/*! @sentry/browser 8.33.1 (606cc3a) | https://github.com/getsentry/sentry-javascript */
var Sentry=function(t){t=window.Sentry||{};const n=Object.prototype.toString;function e(t){switch(n.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return l(t,Error)}}function r(t,e){return n.call(t)===`[object ${e}]`}function o(t){return r(t,"ErrorEvent")}function i(t){return r(t,"DOMError")}function s(t){return r(t,"String")}function c(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}function u(t){return null===t||c(t)||"object"!=typeof t&&"function"!=typeof t}function a(t){return r(t,"Object")}function f(t){return"undefined"!=typeof Event&&l(t,Event)}function h(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function l(t,n){try{return t instanceof n}catch(t){return!1}}function d(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t.t)}function p(t,n=0){return"string"!=typeof t||0===n||t.length<=n?t:`${t.slice(0,n)}...`}function m(t,n){if(!Array.isArray(t))return"";const e=[];for(let n=0;n<t.length;n++){const r=t[n];try{d(r)?e.push("[VueViewModel]"):e.push(String(r))}catch(t){e.push("[value cannot be serialized]")}}return e.join(n)}function y(t,n,e=!1){return!!s(t)&&(r(n,"RegExp")?n.test(t):!!s(n)&&(e?t===n:t.includes(n)))}function g(t,n=[],e=!1){return n.some((n=>y(t,n,e)))}function v(t,n,e=250,r,o,i,s){if(!(i.exception&&i.exception.values&&s&&l(s.originalException,Error)))return;const c=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;var u,a;c&&(i.exception.values=(u=b(t,n,o,s.originalException,r,i.exception.values,c,0),a=e,u.map((t=>(t.value&&(t.value=p(t.value,a)),t)))))}function b(t,n,e,r,o,i,s,c){if(i.length>=e+1)return i;let u=[...i];if(l(r[o],Error)){_(s,c);const i=t(n,r[o]),a=u.length;w(i,o,a,c),u=b(t,n,e,r[o],o,[i,...u],i,a)}return Array.isArray(r.errors)&&r.errors.forEach(((r,i)=>{if(l(r,Error)){_(s,c);const a=t(n,r),f=u.length;w(a,`errors[${i}]`,f,c),u=b(t,n,e,r,o,[a,...u],a,f)}})),u}function _(t,n){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,..."AggregateError"===t.type&&{is_exception_group:!0},exception_id:n}}function w(t,n,e,r){t.mechanism=t.mechanism||{type:"generic",handled:!0},t.mechanism={...t.mechanism,type:"chained",source:n,exception_id:e,parent_id:r}}function E(t){return void 0===t?void 0:t>=400&&t<500?"warning":t>=500?"error":void 0}const S="8.33.1",$=globalThis;function x(t,n,e){const r=e||$,o=r.__SENTRY__=r.__SENTRY__||{},i=o[S]=o[S]||{};return i[t]||(i[t]=n())}const k=$,I=80;function j(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,h=!Array.isArray(n)&&n.maxStringLength||I;for(;e&&i++<r&&(a=T(e,f),!("html"===a||i>1&&s+o.length*u+a.length>=h));)o.push(a),s+=a.length,e=e.parentNode;return o.reverse().join(c)}catch(t){return"<unknown>"}}function T(t,n){const e=t,r=[];if(!e||!e.tagName)return"";if(k.HTMLElement&&e instanceof HTMLElement&&e.dataset){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}r.push(e.tagName.toLowerCase());const o=n&&n.length?n.filter((t=>e.getAttribute(t))).map((t=>[t,e.getAttribute(t)])):null;if(o&&o.length)o.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else{e.id&&r.push(`#${e.id}`);const t=e.className;if(t&&s(t)){const n=t.split(/\s+/);for(const t of n)r.push(`.${t}`)}}const i=["aria-label","type","name","title","alt"];for(const t of i){const n=e.getAttribute(t);n&&r.push(`[${t}="${n}"]`)}return r.join("")}const O=["debug","info","warn","error","log","assert","trace"],C={};function R(t){if(!("console"in $))return t();const n=$.console,e={},r=Object.keys(C);r.forEach((t=>{const r=C[t];e[t]=n[t],n[t]=r}));try{return t()}finally{r.forEach((t=>{n[t]=e[t]}))}}const D=x("logger",(function(){let t=!1;const n={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return O.forEach((t=>{n[t]=()=>{}})),n})),M=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function N(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 A(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function P(t){const n="string"==typeof t?function(t){const n=M.exec(t);if(!n)return void R((()=>{console.error(`Invalid Sentry Dsn: ${t}`)}));const[e,r,o="",i="",s="",c=""]=n.slice(1);let u="",a=c;const f=a.split("/");if(f.length>1&&(u=f.slice(0,-1).join("/"),a=f.pop()),a){const t=a.match(/^\d+/);t&&(a=t[0])}return A({host:i,pass:o,path:u,projectId:a,port:s,protocol:e,publicKey:r})}(t):A(t);if(n)return n}class L extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function U(t,n,e){if(!(n in t))return;const r=t[n],o=e(r);"function"==typeof o&&B(o,r),t[n]=o}function F(t,n,e){try{Object.defineProperty(t,n,{value:e,writable:!0,configurable:!0})}catch(t){}}function B(t,n){try{const e=n.prototype||{};t.prototype=n.prototype=e,F(t,"__sentry_original__",n)}catch(t){}}function q(t){return t.__sentry_original__}function H(t){if(e(t))return{message:t.message,name:t.name,stack:t.stack,...W(t)};if(f(t)){const n={type:t.type,target:z(t.target),currentTarget:z(t.currentTarget),...W(t)};return"undefined"!=typeof CustomEvent&&l(t,CustomEvent)&&(n.detail=t.detail),n}return t}function z(t){try{return n=t,"undefined"!=typeof Element&&l(n,Element)?j(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}var n}function W(t){if("object"==typeof t&&null!==t){const n={};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}return{}}function G(t){return X(t,new Map)}function X(t,n){if(function(t){if(!a(t))return!1;try{const n=Object.getPrototypeOf(t).constructor.name;return!n||"Object"===n}catch(t){return!0}}(t)){const e=n.get(t);if(void 0!==e)return e;const r={};n.set(t,r);for(const e of Object.getOwnPropertyNames(t))void 0!==t[e]&&(r[e]=X(t[e],n));return r}if(Array.isArray(t)){const e=n.get(t);if(void 0!==e)return e;const r=[];return n.set(t,r),t.forEach((t=>{r.push(X(t,n))})),r}return t}const Y=50,J="?",K=/\(error: (.*)\)/,V=/captureMessage|captureException/;function Q(...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++){const e=i[t];if(e.length>1024)continue;const s=K.test(e)?e.replace(K,"$1"):e;if(!s.match(/\S*Error: /)){for(const t of n){const n=t(s);if(n){o.push(n);break}}if(o.length>=Y+r)break}}return function(t){if(!t.length)return[];const n=Array.from(t);/sentryWrapped/.test(Z(n).function||"")&&n.pop();n.reverse(),V.test(Z(n).function||"")&&(n.pop(),V.test(Z(n).function||"")&&n.pop());return n.slice(0,Y).map((t=>({...t,filename:t.filename||Z(n).filename,function:t.function||J})))}(o.slice(r))}}function Z(t){return t[t.length-1]||{}}const tt="<anonymous>";function nt(t){try{return t&&"function"==typeof t&&t.name||tt}catch(t){return tt}}function et(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(t){return}}}const rt={},ot={};function it(t,n){rt[t]=rt[t]||[],rt[t].push(n)}function st(t,n){ot[t]||(n(),ot[t]=!0)}function ct(t,n){const e=t&&rt[t];if(e)for(const t of e)try{t(n)}catch(t){}}function ut(){"console"in $&&O.forEach((function(t){t in $.console&&U($.console,t,(function(n){return C[t]=n,function(...n){ct("console",{args:n,level:t});const e=C[t];e&&e.apply($.console,n)}}))}))}const at=$;function ft(t){return t&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function ht(){if("string"==typeof EdgeRuntime)return!0;if(!function(){if(!("fetch"in at))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}())return!1;if(ft(at.fetch))return!0;let t=!1;const n=at.document;if(n&&"function"==typeof n.createElement)try{const e=n.createElement("iframe");e.hidden=!0,n.head.appendChild(e),e.contentWindow&&e.contentWindow.fetch&&(t=ft(e.contentWindow.fetch)),n.head.removeChild(e)}catch(t){}return t}const lt=1e3;function dt(){return Date.now()/lt}const pt=function(){const{performance:t}=$;if(!t||!t.now)return dt;const n=Date.now()-t.now(),e=null==t.timeOrigin?n:t.timeOrigin;return()=>(e+t.now())/lt}();function mt(t,n){const r="fetch";it(r,t),st(r,(()=>function(t,n=!1){if(n&&!ht())return;U($,"fetch",(function(n){return function(...r){const{method:o,url:i}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[n,e]=t;return{url:gt(n),method:yt(e,"method")?String(e.method).toUpperCase():"GET"}}const n=t[0];return{url:gt(n),method:yt(n,"method")?String(n.method).toUpperCase():"GET"}}(r),s={args:r,fetchData:{method:o,url:i},startTimestamp:1e3*pt()};t||ct("fetch",{...s});const c=(new Error).stack;return n.apply($,r).then((async n=>(t?t(n):ct("fetch",{...s,endTimestamp:1e3*pt(),response:n}),n)),(t=>{throw ct("fetch",{...s,endTimestamp:1e3*pt(),error:t}),e(t)&&void 0===t.stack&&(t.stack=c,F(t,"framesToPop",1)),t}))}}))}(void 0,n)))}function yt(t,n){return!!t&&"object"==typeof t&&!!t[n]}function gt(t){return"string"==typeof t?t:t?yt(t,"url")?t.url:t.toString?t.toString():"":""}(()=>{const{performance:t}=$;if(!t||!t.now)return;const n=36e5,e=t.now(),r=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+e-r):n,i=o<n,s=t.timing&&t.timing.navigationStart,c="number"==typeof s?Math.abs(s+e-r):n;(i||c<n)&&(o<=c&&t.timeOrigin)})();let vt=null;function bt(){vt=$.onerror,$.onerror=function(t,n,e,r,o){return ct("error",{column:r,error:o,line:e,msg:t,url:n}),!(!vt||vt.__SENTRY_LOADER__)&&vt.apply(this,arguments)},$.onerror.__SENTRY_INSTRUMENTED__=!0}let _t=null;function wt(){_t=$.onunhandledrejection,$.onunhandledrejection=function(t){return ct("unhandledrejection",t),!(_t&&!_t.__SENTRY_LOADER__)||_t.apply(this,arguments)},$.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function Et(){const t=$,n=t.crypto||t.msCrypto;let e=()=>16*Math.random();try{if(n&&n.randomUUID)return n.randomUUID().replace(/-/g,"");n&&n.getRandomValues&&(e=()=>{const t=new Uint8Array(1);return n.getRandomValues(t),t[0]})}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&e())>>t/4).toString(16)))}function St(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function $t(t){const{message:n,event_id:e}=t;if(n)return n;const r=St(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||e||"<unknown>":e||"<unknown>"}function xt(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=e||"Error")}function kt(t,n){const e=St(t);if(!e)return;const r=e.mechanism;if(e.mechanism={type:"generic",handled:!0,...r,...n},n&&"data"in n){const t={...r&&r.data,...n.data};e.mechanism.data=t}}function It(t){if(t&&t.__sentry_captured__)return!0;try{F(t,"__sentry_captured__",!0)}catch(t){}return!1}function jt(t){return Array.isArray(t)?t:[t]}function Tt(t,n=100,e=1/0){try{return Ct("",t,n,e)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function Ot(t,n=3,e=102400){const r=Tt(t,n);return o=r,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(o))>e?Ot(t,n-1,e):r;var o}function Ct(t,n,e=1/0,r=1/0,o=function(){const t="function"==typeof WeakSet,n=t?new WeakSet:[];return[function(e){if(t)return!!n.has(e)||(n.add(e),!1);for(let t=0;t<n.length;t++)if(n[t]===e)return!0;return n.push(e),!1},function(e){if(t)n.delete(e);else for(let t=0;t<n.length;t++)if(n[t]===e){n.splice(t,1);break}}]}()){const[i,s]=o;if(null==n||["boolean","string"].includes(typeof n)||"number"==typeof n&&Number.isFinite(n))return n;const c=function(t,n){try{if("domain"===t&&n&&"object"==typeof n&&n.o)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&n===global)return"[Global]";if("undefined"!=typeof window&&n===window)return"[Window]";if("undefined"!=typeof document&&n===document)return"[Document]";if(d(n))return"[VueViewModel]";if(a(e=n)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e)return"[SyntheticEvent]";if("number"==typeof n&&!Number.isFinite(n))return`[${n}]`;if("function"==typeof n)return`[Function: ${nt(n)}]`;if("symbol"==typeof n)return`[${String(n)}]`;if("bigint"==typeof n)return`[BigInt: ${String(n)}]`;const r=function(t){const n=Object.getPrototypeOf(t);return n?n.constructor.name:"null prototype"}(n);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var e}(t,n);if(!c.startsWith("[object "))return c;if(n.__sentry_skip_normalization__)return n;const u="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:e;if(0===u)return c.replace("object ","");if(i(n))return"[Circular ~]";const f=n;if(f&&"function"==typeof f.toJSON)try{return Ct("",f.toJSON(),u-1,r,o)}catch(t){}const h=Array.isArray(n)?[]:{};let l=0;const p=H(n);for(const t in p){if(!Object.prototype.hasOwnProperty.call(p,t))continue;if(l>=r){h[t]="[MaxProperties ~]";break}const n=p[t];h[t]=Ct(t,n,u-1,r,o),l++}return s(n),h}var Rt;function Dt(t){return new Nt((n=>{n(t)}))}function Mt(t){return new Nt(((n,e)=>{e(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(Rt||(Rt={}));class Nt{constructor(t){Nt.prototype.__init.call(this),Nt.prototype.__init2.call(this),Nt.prototype.__init3.call(this),Nt.prototype.__init4.call(this),this.i=Rt.PENDING,this.u=[];try{t(this.h,this.l)}catch(t){this.l(t)}}then(t,n){return new Nt(((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.p()}))}catch(t){return this.then((t=>t),t)}finally(t){return new Nt(((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)}))}))}__init(){this.h=t=>{this.m(Rt.RESOLVED,t)}}__init2(){this.l=t=>{this.m(Rt.REJECTED,t)}}__init3(){this.m=(t,n)=>{this.i===Rt.PENDING&&(h(n)?n.then(this.h,this.l):(this.i=t,this.v=n,this.p()))}}__init4(){this.p=()=>{if(this.i===Rt.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.i===Rt.RESOLVED&&t[1](this.v),this.i===Rt.REJECTED&&t[2](this.v),t[0]=!0)}))}}}function At(t){const n=[];function e(t){return n.splice(n.indexOf(t),1)[0]||Promise.resolve(void 0)}return{$:n,add:function(r){if(!(void 0===t||n.length<t))return Mt(new L("Not adding Promise because buffer limit was reached."));const o=r();return-1===n.indexOf(o)&&n.push(o),o.then((()=>e(o))).then(null,(()=>e(o).then(null,(()=>{})))),o},drain:function(t){return new Nt(((e,r)=>{let o=n.length;if(!o)return e(!0);const i=setTimeout((()=>{t&&t>0&&e(!1)}),t);n.forEach((t=>{Dt(t).then((()=>{--o||(clearTimeout(i),e(!0))}),r)}))}))}}}function Pt(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}}const Lt=["fatal","error","warning","log","info","debug"];function Ut(t){return"warn"===t?"warning":Lt.includes(t)?t:"log"}const Ft="sentry-",Bt=/^sentry-/,qt=8192;function Ht(t){const n=function(t){if(!t||!s(t)&&!Array.isArray(t))return;if(Array.isArray(t))return t.reduce(((t,n)=>{const e=Wt(n);return Object.entries(e).forEach((([n,e])=>{t[n]=e})),t}),{});return Wt(t)}(t);if(!n)return;const e=Object.entries(n).reduce(((t,[n,e])=>{if(n.match(Bt)){t[n.slice(Ft.length)]=e}return t}),{});return Object.keys(e).length>0?e:void 0}function zt(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>qt?t:i}),"")}(Object.entries(t).reduce(((t,[n,e])=>(e&&(t[`${Ft}${n}`]=e),t)),{}))}function Wt(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[n,e])=>(n&&e&&(t[n]=e),t)),{})}const Gt=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Xt(t,n){const e=function(t){if(!t)return;const n=t.match(Gt);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=Ht(n),{traceId:o,parentSpanId:i,parentSampled:s}=e||{};return e?{traceId:o||Et(),parentSpanId:i||Et().substring(16),spanId:Et().substring(16),sampled:s,dsc:r||{}}:{traceId:o||Et(),spanId:Et().substring(16)}}function Yt(t,n=[]){return[t,n]}function Jt(t,n){const[e,r]=t;return[e,[...r,n]]}function Kt(t,n){const e=t[1];for(const t of e){if(n(t,t[0].type))return!0}return!1}function Vt(t){return $.__SENTRY__&&$.__SENTRY__.encodePolyfill?$.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function Qt(t){const[n,e]=t;let r=JSON.stringify(n);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[Vt(r),t]:r.push("string"==typeof t?Vt(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(n){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 Zt(t){const n="string"==typeof t.data?Vt(t.data):t.data;return[G({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const tn={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function nn(t){return tn[t]}function en(t){if(!t||!t.sdk)return;const{name:n,version:e}=t.sdk;return{name:n,version:e}}const rn=6e4;function on(t,{statusCode:n,headers:e},r=Date.now()){const o={...t},i=e&&e["x-sentry-rate-limits"],s=e&&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=Date.now()){const e=parseInt(`${t}`,10);if(!isNaN(e))return 1e3*e;const r=Date.parse(`${t}`);return isNaN(r)?rn:r-n}(s,r):429===n&&(o.all=r+6e4);return o}function sn(){return{traceId:Et(),spanId:Et().substring(16)}}const cn=$;const un=()=>{},an=["attachTo","createForm","createWidget","remove"],fn=Object.assign((t=>(R((()=>{console.warn("You are using feedbackIntegration() even though this bundle does not include feedback.")})),{name:"Feedback",...an.reduce(((t,n)=>(t[n]=un,t)),{})})),{_isShim:!0}),hn=["start","stop","flush"];function ln(){return dn($),$}function dn(t){const n=t.__SENTRY__=t.__SENTRY__||{};return n.version=n.version||S,n[S]=n[S]||{}}function pn(t){const n=pt(),e={sid:Et(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return G({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&&mn(e,t),e}function mn(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||pt(),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:Et()),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)}const yn="_sentrySpan";function gn(t,n){n?F(t,yn,n):delete t[yn]}function vn(t){return t[yn]}class bn{constructor(){this._=!1,this.S=[],this.k=[],this.I=[],this.j=[],this.T={},this.O={},this.C={},this.R={},this.D={},this.M=sn()}clone(){const t=new bn;return t.I=[...this.I],t.O={...this.O},t.C={...this.C},t.R={...this.R},t.T=this.T,t.N=this.N,t.A=this.A,t.P=this.P,t.L=this.L,t.k=[...this.k],t.U=this.U,t.j=[...this.j],t.D={...this.D},t.M={...this.M},t.F=this.F,t.B=this.B,gn(t,vn(this)),t}setClient(t){this.F=t}setLastEventId(t){this.B=t}getClient(){return this.F}lastEventId(){return this.B}addScopeListener(t){this.S.push(t)}addEventProcessor(t){return this.k.push(t),this}setUser(t){return this.T=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.A&&mn(this.A,{user:t}),this.q(),this}getUser(){return this.T}getRequestSession(){return this.U}setRequestSession(t){return this.U=t,this}setTags(t){return this.O={...this.O,...t},this.q(),this}setTag(t,n){return this.O={...this.O,[t]:n},this.q(),this}setExtras(t){return this.C={...this.C,...t},this.q(),this}setExtra(t,n){return this.C={...this.C,[t]:n},this.q(),this}setFingerprint(t){return this.L=t,this.q(),this}setLevel(t){return this.N=t,this.q(),this}setTransactionName(t){return this.P=t,this.q(),this}setContext(t,n){return null===n?delete this.R[t]:this.R[t]=n,this.q(),this}setSession(t){return t?this.A=t:delete this.A,this.q(),this}getSession(){return this.A}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,[e,r]=n instanceof _n?[n.getScopeData(),n.getRequestSession()]:a(n)?[t,t.requestSession]:[],{tags:o,extra:i,user:s,contexts:c,level:u,fingerprint:f=[],propagationContext:h}=e||{};return this.O={...this.O,...o},this.C={...this.C,...i},this.R={...this.R,...c},s&&Object.keys(s).length&&(this.T=s),u&&(this.N=u),f.length&&(this.L=f),h&&(this.M=h),r&&(this.U=r),this}clear(){return this.I=[],this.O={},this.C={},this.T={},this.R={},this.N=void 0,this.P=void 0,this.L=void 0,this.U=void 0,this.A=void 0,gn(this,void 0),this.j=[],this.M=sn(),this.q(),this}addBreadcrumb(t,n){const e="number"==typeof n?n:100;if(e<=0)return this;const r={timestamp:dt(),...t},o=this.I;return o.push(r),this.I=o.length>e?o.slice(-e):o,this.q(),this}getLastBreadcrumb(){return this.I[this.I.length-1]}clearBreadcrumbs(){return this.I=[],this.q(),this}addAttachment(t){return this.j.push(t),this}clearAttachments(){return this.j=[],this}getScopeData(){return{breadcrumbs:this.I,attachments:this.j,contexts:this.R,tags:this.O,extra:this.C,user:this.T,level:this.N,fingerprint:this.L||[],eventProcessors:this.k,propagationContext:this.M,sdkProcessingMetadata:this.D,transactionName:this.P,span:vn(this)}}setSDKProcessingMetadata(t){return this.D={...this.D,...t},this}setPropagationContext(t){return this.M=t,this}getPropagationContext(){return this.M}captureException(t,n){const e=n&&n.event_id?n.event_id:Et();if(!this.F)return D.warn("No client configured on scope - will not capture exception!"),e;const r=new Error("Sentry syntheticException");return this.F.captureException(t,{originalException:t,syntheticException:r,...n,event_id:e},this),e}captureMessage(t,n,e){const r=e&&e.event_id?e.event_id:Et();if(!this.F)return D.warn("No client configured on scope - will not capture message!"),r;const o=new Error(t);return this.F.captureMessage(t,n,{originalException:t,syntheticException:o,...e,event_id:r},this),r}captureEvent(t,n){const e=n&&n.event_id?n.event_id:Et();return this.F?(this.F.captureEvent(t,{...n,event_id:e},this),e):(D.warn("No client configured on scope - will not capture event!"),e)}q(){this._||(this._=!0,this.S.forEach((t=>{t(this)})),this._=!1)}}const _n=bn;class wn{constructor(t,n){let e,r;e=t||new _n,r=n||new _n,this.H=[{scope:e}],this.W=r}withScope(t){const n=this.G();let e;try{e=t(n)}catch(t){throw this.X(),t}return h(e)?e.then((t=>(this.X(),t)),(t=>{throw this.X(),t})):(this.X(),e)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.W}getStackTop(){return this.H[this.H.length-1]}G(){const t=this.getScope().clone();return this.H.push({client:this.getClient(),scope:t}),t}X(){return!(this.H.length<=1)&&!!this.H.pop()}}function En(){const t=dn(ln());return t.stack=t.stack||new wn(x("defaultCurrentScope",(()=>new _n)),x("defaultIsolationScope",(()=>new _n)))}function Sn(t){return En().withScope(t)}function $n(t,n){const e=En();return e.withScope((()=>(e.getStackTop().scope=t,n(t))))}function xn(t){return En().withScope((()=>t(En().getIsolationScope())))}function kn(t){const n=dn(t);return n.acs?n.acs:{withIsolationScope:xn,withScope:Sn,withSetScope:$n,withSetIsolationScope:(t,n)=>xn(n),getCurrentScope:()=>En().getScope(),getIsolationScope:()=>En().getIsolationScope()}}function In(){return kn(ln()).getCurrentScope()}function jn(){return kn(ln()).getIsolationScope()}function Tn(){return x("globalScope",(()=>new _n))}function On(...t){const n=kn(ln());if(2===t.length){const[e,r]=t;return e?n.withSetScope(e,r):n.withScope(r)}return n.withScope(t[0])}function Cn(){return In().getClient()}const Rn="_sentryMetrics";function Dn(t){const n=t[Rn];if(!n)return;const e={};for(const[,[t,r]]of n){(e[t]||(e[t]=[])).push(G(r))}return e}const Mn="sentry.source",Nn="sentry.sample_rate",An="sentry.op",Pn="sentry.origin",Ln=0,Un=1,Fn=1;function Bn(t){const{spanId:n,traceId:e}=t.spanContext(),{parent_span_id:r}=zn(t);return G({parent_span_id:r,span_id:n,trace_id:e})}function qn(t){return"number"==typeof t?Hn(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Hn(t.getTime()):pt()}function Hn(t){return t>9999999999?t/1e3:t}function zn(t){if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();try{const{spanId:n,traceId:e}=t.spanContext();if(function(t){const n=t;return!!(n.attributes&&n.startTime&&n.name&&n.endTime&&n.status)}(t)){const{attributes:r,startTime:o,name:i,endTime:s,parentSpanId:c,status:u}=t;return G({span_id:n,trace_id:e,data:r,description:i,parent_span_id:c,start_timestamp:qn(o),timestamp:qn(s)||void 0,status:Gn(u),op:r[An],origin:r[Pn],_metrics_summary:Dn(t)})}return{span_id:n,trace_id:e}}catch(t){return{}}}function Wn(t){const{traceFlags:n}=t.spanContext();return n===Fn}function Gn(t){if(t&&t.code!==Ln)return t.code===Un?"ok":t.message||"unknown_error"}const Xn="_sentryRootSpan";function Yn(t){return t[Xn]||t}const Jn="production",Kn="_frozenDsc";function Vn(t,n){const e=n.getOptions(),{publicKey:r}=n.getDsn()||{},o=G({environment:e.environment||Jn,release:e.release,public_key:r,trace_id:t});return n.emit("createDsc",o),o}function Qn(t){const n=Cn();if(!n)return{};const e=Vn(zn(t).trace_id||"",n),r=Yn(t),o=r[Kn];if(o)return o;const i=r.spanContext().traceState,s=i&&i.get("sentry.dsc"),c=s&&Ht(s);if(c)return c;const u=zn(r),a=u.data||{},f=a[Nn];null!=f&&(e.sample_rate=`${f}`);const h=a[Mn],l=u.description;return"url"!==h&&l&&(e.transaction=l),function(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const n=Cn(),e=t||n&&n.getOptions();return!!e&&(e.enableTracing||"tracesSampleRate"in e||"tracesSampler"in e)}()&&(e.sampled=String(Wn(r))),n.emit("createDsc",e,r),e}function Zn(t,n,e,r){const o=en(e),i=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,n){n&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||n.name,t.sdk.version=t.sdk.version||n.version,t.sdk.integrations=[...t.sdk.integrations||[],...n.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...n.packages||[]])}(t,e&&e.sdk);const s=function(t,n,e,r){const o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...n&&{sdk:n},...!!e&&r&&{dsn:N(r)},...o&&{trace:G({...o})}}}(t,o,r,n);delete t.sdkProcessingMetadata;return Yt(s,[[{type:i},t]])}function te(t,n,e,r=0){return new Nt(((o,i)=>{const s=t[r];if(null===n||"function"!=typeof s)o(n);else{const c=s({...n},e);h(c)?c.then((n=>te(t,n,e,r+1).then(o))).then(null,i):te(t,c,e,r+1).then(o).then(null,i)}}))}function ne(t,n){const{fingerprint:e,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=n;!function(t,n){const{extra:e,tags:r,user:o,contexts:i,level:s,transactionName:c}=n,u=G(e);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const a=G(r);a&&Object.keys(a).length&&(t.tags={...a,...t.tags});const f=G(o);f&&Object.keys(f).length&&(t.user={...f,...t.user});const h=G(i);h&&Object.keys(h).length&&(t.contexts={...h,...t.contexts});s&&(t.level=s);c&&"transaction"!==t.type&&(t.transaction=c)}(t,n),r&&function(t,n){t.contexts={trace:Bn(n),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Qn(n),...t.sdkProcessingMetadata};const e=Yn(n),r=zn(e).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,n){t.fingerprint=t.fingerprint?jt(t.fingerprint):[],n&&(t.fingerprint=t.fingerprint.concat(n));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,e),function(t,n){const e=[...t.breadcrumbs||[],...n];t.breadcrumbs=e.length?e:void 0}(t,o),function(t,n){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...n}}(t,i)}function ee(t,n){const{extra:e,tags:r,user:o,contexts:i,level:s,sdkProcessingMetadata:c,breadcrumbs:u,fingerprint:a,eventProcessors:f,attachments:h,propagationContext:l,transactionName:d,span:p}=n;re(t,"extra",e),re(t,"tags",r),re(t,"user",o),re(t,"contexts",i),re(t,"sdkProcessingMetadata",c),s&&(t.level=s),d&&(t.transactionName=d),p&&(t.span=p),u.length&&(t.breadcrumbs=[...t.breadcrumbs,...u]),a.length&&(t.fingerprint=[...t.fingerprint,...a]),f.length&&(t.eventProcessors=[...t.eventProcessors,...f]),h.length&&(t.attachments=[...t.attachments,...h]),t.propagationContext={...t.propagationContext,...l}}function re(t,n,e){if(e&&Object.keys(e).length){t[n]={...t[n]};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[n][r]=e[r])}}function oe(t,n,e,r,o,i){const{normalizeDepth:s=3,normalizeMaxBreadth:c=1e3}=t,u={...n,event_id:n.event_id||e.event_id||Et(),timestamp:n.timestamp||dt()},a=e.integrations||t.integrations.map((t=>t.name));!function(t,n){const{environment:e,release:r,dist:o,maxValueLength:i=250}=n;"environment"in t||(t.environment="environment"in n?e:Jn);void 0===t.release&&void 0!==r&&(t.release=r);void 0===t.dist&&void 0!==o&&(t.dist=o);t.message&&(t.message=p(t.message,i));const s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=p(s.value,i));const c=t.request;c&&c.url&&(c.url=p(c.url,i))}(u,t),function(t,n){n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...n])}(u,a),o&&o.emit("applyFrameMetadata",n),void 0===n.type&&function(t,n){const e=$._sentryDebugIds;if(!e)return;let r;const o=ie.get(n);o?r=o:(r=new Map,ie.set(n,r));const i=Object.entries(e).reduce(((t,[e,o])=>{let i;const s=r.get(e);s?i=s:(i=n(e),r.set(e,i));for(let n=i.length-1;n>=0;n--){const e=i[n];if(e.filename){t[e.filename]=o;break}}return t}),{});try{t.exception.values.forEach((t=>{t.stacktrace.frames.forEach((t=>{t.filename&&(t.debug_id=i[t.filename])}))}))}catch(t){}}(u,t.stackParser);const f=function(t,n){if(!n)return t;const e=t?t.clone():new _n;return e.update(n),e}(r,e.captureContext);e.mechanism&&kt(u,e.mechanism);const h=o?o.getEventProcessors():[],l=Tn().getScopeData();if(i){ee(l,i.getScopeData())}if(f){ee(l,f.getScopeData())}const d=[...e.attachments||[],...l.attachments];d.length&&(e.attachments=d),ne(u,l);return te([...h,...l.eventProcessors],u,e).then((t=>(t&&function(t){const n={};try{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)}))}))}catch(t){}if(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 s&&s>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&&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)}}))));return r}(t,s,c):t)))}const ie=new WeakMap;function se(t){if(t)return function(t){return t instanceof _n||"function"==typeof t}(t)||function(t){return Object.keys(t).some((t=>ce.includes(t)))}(t)?{captureContext:t}:t}const ce=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function captureException(t,n){return In().captureException(t,se(n))}function ue(t,n){return In().captureEvent(t,n)}function ae(t,n){jn().setContext(t,n)}function fe(t){jn().setExtras(t)}function he(t,n){jn().setExtra(t,n)}function le(t){jn().setTags(t)}function de(t,n){jn().setTag(t,n)}function pe(t){jn().setUser(t)}function me(){return jn().lastEventId()}function ye(t){const n=Cn(),e=jn(),r=In(),{release:o,environment:i=Jn}=n&&n.getOptions()||{},{userAgent:s}=$.navigator||{},c=pn({release:o,environment:i,user:r.getUser()||e.getUser(),...s&&{userAgent:s},...t}),u=e.getSession();return u&&"ok"===u.status&&mn(u,{status:"exited"}),ge(),e.setSession(c),r.setSession(c),c}function ge(){const t=jn(),n=In(),e=n.getSession()||t.getSession();e&&function(t,n){let e={};n?e={status:n}:"ok"===t.status&&(e={status:"exited"}),mn(t,e)}(e),ve(),t.setSession(),n.setSession()}function ve(){const t=jn(),n=In(),e=Cn(),r=n.getSession()||t.getSession();r&&e&&e.captureSession(r)}function be(t=!1){t?ge():ve()}const _e="7";function we(t){const n=t.protocol?`${t.protocol}:`:"",e=t.port?`:${t.port}`:"";return`${n}//${t.host}${e}${t.path?`/${t.path}`:""}/api/`}function Ee(t,n){return e={sentry_key:t.publicKey,sentry_version:_e,...n&&{sentry_client:`${n.name}/${n.version}`}},Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&");var e}function Se(t,n,e){return n||`${function(t){return`${we(t)}${t.projectId}/envelope/`}(t)}?${Ee(t,e)}`}const $e=[];function xe(t){const n=t.defaultIntegrations||[],e=t.integrations;let r;n.forEach((t=>{t.isDefaultInstance=!0})),r=Array.isArray(e)?[...n,...e]:"function"==typeof e?jt(e(n)):n;const o=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),i=o.findIndex((t=>"Debug"===t.name));if(i>-1){const[t]=o.splice(i,1);o.push(t)}return o}function ke(t,n){for(const e of n)e&&e.afterAllSetup&&e.afterAllSetup(t)}function Ie(t,n,e){if(!e[n.name]){if(e[n.name]=n,-1===$e.indexOf(n.name)&&"function"==typeof n.setupOnce&&(n.setupOnce(),$e.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)}}}class je{constructor(t){if(this.Y=t,this._integrations={},this.J=0,this.K={},this.V={},this.k=[],t.dsn&&(this.Z=P(t.dsn)),this.Z){const n=Se(this.Z,t.tunnel,t._metadata?t._metadata.sdk:void 0);this.tt=t.transport({tunnel:this.Y.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,e){const r=Et();if(It(t))return r;const o={event_id:r,...n};return this.nt(this.eventFromException(t,o).then((t=>this.et(t,o,e)))),o.event_id}captureMessage(t,n,e,r){const o={event_id:Et(),...e},i=c(t)?t:String(t),s=u(t)?this.eventFromMessage(i,n,o):this.eventFromException(t,o);return this.nt(s.then((t=>this.et(t,o,r)))),o.event_id}captureEvent(t,n,e){const r=Et();if(n&&n.originalException&&It(n.originalException))return r;const o={event_id:r,...n},i=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this.nt(this.et(t,o,i||e)),o.event_id}captureSession(t){"string"!=typeof t.release||(this.sendSession(t),mn(t,{init:!1}))}getDsn(){return this.Z}getOptions(){return this.Y}getSdkMetadata(){return this.Y._metadata}getTransport(){return this.tt}flush(t){const n=this.tt;return n?(this.emit("flush"),this.rt(t).then((e=>n.flush(t).then((t=>e&&t))))):Dt(!0)}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,this.emit("close"),t)))}getEventProcessors(){return this.k}addEventProcessor(t){this.k.push(t)}init(){(this.ot()||this.Y.integrations.some((({name:t})=>t.startsWith("Spotlight"))))&&this.it()}getIntegrationByName(t){return this._integrations[t]}addIntegration(t){const n=this._integrations[t.name];Ie(this,t,this._integrations),n||ke(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let e=Zn(t,this.Z,this.Y._metadata,this.Y.tunnel);for(const t of n.attachments||[])e=Jt(e,Zt(t));const r=this.sendEnvelope(e);r&&r.then((n=>this.emit("afterSendEvent",t,n)),null)}sendSession(t){const n=function(t,n,e,r){const o=en(e);return Yt({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&n&&{dsn:N(n)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(t,this.Z,this.Y._metadata,this.Y.tunnel);this.sendEnvelope(n)}recordDroppedEvent(t,n,e){if(this.Y.sendClientReports){const r="number"==typeof e?e:1,o=`${t}:${n}`;this.K[o]=(this.K[o]||0)+r}}on(t,n){const e=this.V[t]=this.V[t]||[];return e.push(n),()=>{const t=e.indexOf(n);t>-1&&e.splice(t,1)}}emit(t,...n){const e=this.V[t];e&&e.forEach((t=>t(...n)))}sendEnvelope(t){return this.emit("beforeEnvelope",t),this.ot()&&this.tt?this.tt.send(t).then(null,(t=>t)):Dt({})}it(){const{integrations:t}=this.Y;this._integrations=function(t,n){const e={};return n.forEach((n=>{n&&Ie(t,n,e)})),e}(this,t),ke(this,t)}st(t,n){let e=!1,r=!1;const o=n.exception&&n.exception.values;if(o){r=!0;for(const t of o){const n=t.mechanism;if(n&&!1===n.handled){e=!0;break}}}const i="ok"===t.status;(i&&0===t.errors||i&&e)&&(mn(t,{...e&&{status:"crashed"},errors:t.errors||Number(r||e)}),this.captureSession(t))}rt(t){return new Nt((n=>{let e=0;const r=setInterval((()=>{0==this.J?(clearInterval(r),n(!0)):(e+=1,t&&e>=t&&(clearInterval(r),n(!1)))}),1)}))}ot(){return!1!==this.getOptions().enabled&&void 0!==this.tt}ct(t,n,e,r=jn()){const o=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i.length>0&&(n.integrations=i),this.emit("preprocessEvent",t,n),t.type||r.setLastEventId(t.event_id||n.event_id),oe(o,t,n,e,this,r).then((t=>{if(null===t)return t;const n={...r.getPropagationContext(),...e?e.getPropagationContext():void 0};if(!(t.contexts&&t.contexts.trace)&&n){const{traceId:e,spanId:r,parentSpanId:o,dsc:i}=n;t.contexts={trace:G({trace_id:e,span_id:r,parent_span_id:o}),...t.contexts};const s=i||Vn(e,this);t.sdkProcessingMetadata={dynamicSamplingContext:s,...t.sdkProcessingMetadata}}return t}))}et(t,n={},e){return this.ut(t,n,e).then((t=>t.event_id),(t=>{}))}ut(t,n,e){const r=this.getOptions(),{sampleRate:o}=r,i=Oe(t),s=Te(t),c=t.type||"error",u=`before send for type \`${c}\``,f=void 0===o?void 0:function(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}(o);if(s&&"number"==typeof f&&Math.random()>f)return this.recordDroppedEvent("sample_rate","error",t),Mt(new L(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const l="replay_event"===c?"replay":c,d=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this.ct(t,n,e,d).then((e=>{if(null===e)throw this.recordDroppedEvent("event_processor",l,t),new L("An event processor returned `null`, will not send event.","log");if(n.data&&!0===n.data.__sentry__)return e;const o=function(t,n,e,r){const{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:s}=n;if(Te(e)&&o)return o(e,r);if(Oe(e)){if(e.spans&&s){const n=[];for(const r of e.spans){const e=s(r);e?n.push(e):t.recordDroppedEvent("before_send","span")}e.spans=n}if(i){if(e.spans){const t=e.spans.length;e.sdkProcessingMetadata={...e.sdkProcessingMetadata,spanCountBeforeProcessing:t}}return i(e,r)}}return e}(this,r,e,n);return function(t,n){const e=`${n} must return \`null\` or a valid event.`;if(h(t))return t.then((t=>{if(!a(t)&&null!==t)throw new L(e);return t}),(t=>{throw new L(`${n} rejected with ${t}`)}));if(!a(t)&&null!==t)throw new L(e);return t}(o,u)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",l,t),i){const n=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",n)}throw new L(`${u} returned \`null\`, will not send event.`,"log")}const o=e&&e.getSession();if(!i&&o&&this.st(o,r),i){const t=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);t>0&&this.recordDroppedEvent("before_send","span",t)}const s=r.transaction_info;if(i&&s&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...s,source:t}}return this.sendEvent(r,n),r})).then(null,(t=>{if(t instanceof L)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new L(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}nt(t){this.J++,t.then((t=>(this.J--,t)),(t=>(this.J--,t)))}ft(){const t=this.K;return this.K={},Object.entries(t).map((([t,n])=>{const[e,r]=t.split(":");return{reason:e,category:r,quantity:n}}))}ht(){const t=this.ft();if(0===t.length)return;if(!this.Z)return;const n=(e=t,Yt((r=this.Y.tunnel&&N(this.Z))?{dsn:r}:{},[[{type:"client_report"},{timestamp:o||dt(),discarded_events:e}]]));var e,r,o;this.sendEnvelope(n)}}function Te(t){return void 0===t.type}function Oe(t){return"transaction"===t.type}function Ce(t){In().setClient(t)}const Re=64;function De(t,n,e=At(t.bufferSize||Re)){let r={};return{send:function(o){const i=[];if(Kt(o,((n,e)=>{const o=nn(e);if(function(t,n,e=Date.now()){return function(t,n){return t[n]||t.all||0}(t,n)>e}(r,o)){const r=Me(n,e);t.recordDroppedEvent("ratelimit_backoff",o,r)}else i.push(n)})),0===i.length)return Dt({});const s=Yt(o[0],i),c=n=>{Kt(s,((e,r)=>{const o=Me(e,r);t.recordDroppedEvent(n,nn(r),o)}))};return e.add((()=>n({body:Qt(s)}).then((t=>(r=on(r,t),t)),(t=>{throw c("network_error"),t})))).then((t=>t),(t=>{if(t instanceof L)return c("queue_overflow"),Dt({});throw t}))},flush:t=>e.drain(t)}}function Me(t,n){if("event"===n||"transaction"===n)return Array.isArray(t)?t[1]:void 0}const Ne=100;function Ae(t,n){const e=Cn(),r=jn();if(!e)return;const{beforeBreadcrumb:o=null,maxBreadcrumbs:i=Ne}=e.getOptions();if(i<=0)return;const s={timestamp:dt(),...t},c=o?R((()=>o(s,n))):s;null!==c&&(e.emit&&e.emit("beforeAddBreadcrumb",c,n),r.addBreadcrumb(c,i))}let Pe;const Le=new WeakMap,Ue=()=>({name:"FunctionToString",setupOnce(){Pe=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=q(this),e=Le.has(Cn())&&void 0!==n?n:this;return Pe.apply(e,t)}}catch(t){}},setup(t){Le.set(t,!0)}}),Fe=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler"],Be=(t={})=>({name:"InboundFilters",processEvent(n,e,r){const o=r.getOptions(),i=function(t={},n={}){return{allowUrls:[...t.allowUrls||[],...n.allowUrls||[]],denyUrls:[...t.denyUrls||[],...n.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...n.ignoreErrors||[],...t.disableErrorDefaults?[]:Fe],ignoreTransactions:[...t.ignoreTransactions||[],...n.ignoreTransactions||[]],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(t,o);return function(t,n){if(n.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}(t))return!0;if(function(t,n){if(t.type||!n||!n.length)return!1;return function(t){const n=[];t.message&&n.push(t.message);let e;try{e=t.exception.values[t.exception.values.length-1]}catch(t){}e&&e.value&&(n.push(e.value),e.type&&n.push(`${e.type}: ${e.value}`));return n}(t).some((t=>g(t,n)))}(t,n.ignoreErrors))return!0;if(function(t){if(t.type)return!1;if(!t.exception||!t.exception.values||0===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("transaction"!==t.type||!n||!n.length)return!1;const e=t.transaction;return!!e&&g(e,n)}(t,n.ignoreTransactions))return!0;if(function(t,n){if(!n||!n.length)return!1;const e=qe(t);return!!e&&g(e,n)}(t,n.denyUrls))return!0;if(!function(t,n){if(!n||!n.length)return!0;const e=qe(t);return!e||g(e,n)}(t,n.allowUrls))return!0;return!1}(n,i)?null:n}});function qe(t){try{let n;try{n=t.exception.values[0].stacktrace.frames}catch(t){}return n?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}(n):null}catch(t){return null}}const He=()=>{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(!We(t,n))return!1;if(!ze(t,n))return!1;return!0}(t,n))return!0;if(function(t,n){const e=Ge(n),r=Ge(t);if(!e||!r)return!1;if(e.type!==r.type||e.value!==r.value)return!1;if(!We(t,n))return!1;if(!ze(t,n))return!1;return!0}(t,n))return!0;return!1}(n,t))return null}catch(t){}return t=n}}};function ze(t,n){let e=et(t),r=et(n);if(!e&&!r)return!0;if(e&&!r||!e&&r)return!1;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 We(t,n){let e=t.fingerprint,r=n.fingerprint;if(!e&&!r)return!0;if(e&&!r||!e&&r)return!1;try{return!(e.join("")!==r.join(""))}catch(t){return!1}}function Ge(t){return t.exception&&t.exception.values&&t.exception.values[0]}const Xe=function(){return{bindClient(t){In().setClient(t)},withScope:On,getClient:()=>Cn(),getScope:In,getIsolationScope:jn,captureException:(t,n)=>In().captureException(t,n),captureMessage:(t,n,e)=>In().captureMessage(t,n,e),captureEvent:ue,addBreadcrumb:Ae,setUser:pe,setTags:le,setTag:de,setExtra:he,setExtras:fe,setContext:ae,getIntegration(t){const n=Cn();return n&&n.getIntegrationByName(t.id)||null},startSession:ye,endSession:ge,captureSession(t){if(t)return ge();!function(){const t=In(),n=Cn(),e=t.getSession();n&&e&&n.captureSession(e)}()}}};const Ye=t=>(R((()=>{console.warn("You are using browserTracingIntegration() even though this bundle does not include tracing.")})),{name:"BrowserTracing"});function Je(){R((()=>{console.warn("You are using metrics even though this bundle does not include tracing.")}))}const Ke={increment:Je,distribution:Je,set:Je,gauge:Je,timing:(t,n)=>{if(Je(),"function"==typeof n)return n()}},Ve=$;let Qe=0;function Ze(){return Qe>0}function tr(t,n={},e){if("function"!=typeof t)return t;try{const n=t.__sentry_wrapped__;if(n)return"function"==typeof n?n:t;if(q(t))return t}catch(n){return t}const sentryWrapped=function(){const r=Array.prototype.slice.call(arguments);try{e&&"function"==typeof e&&e.apply(this,arguments);const o=r.map((t=>tr(t,n)));return t.apply(this,o)}catch(t){throw Qe++,setTimeout((()=>{Qe--})),On((e=>{e.addEventProcessor((t=>(n.mechanism&&(xt(t,void 0,void 0),kt(t,n.mechanism)),t.extra={...t.extra,arguments:r},t))),captureException(t)})),t}};try{for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(sentryWrapped[n]=t[n])}catch(t){}B(sentryWrapped,t),F(t,"__sentry_wrapped__",sentryWrapped);try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function nr(t,n){const e=or(t,n),r={type:n&&n.name,value:sr(n)};return e.length&&(r.stacktrace={frames:e}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function er(t,n,e,r){const o=Cn(),i=o&&o.getOptions().normalizeDepth,s=function(t){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const e=t[n];if(e instanceof Error)return e}return}(n),c={__serialized__:Ot(n,i)};if(s)return{exception:{values:[nr(t,s)]},extra:c};const u={exception:{values:[{type:f(n)?n.constructor.name:r?"UnhandledRejection":"Error",value:hr(n,{isUnhandledRejection:r})}]},extra:c};if(e){const n=or(t,e);n.length&&(u.exception.values[0].stacktrace={frames:n})}return u}function rr(t,n){return{exception:{values:[nr(t,n)]}}}function or(t,n){const e=n.stacktrace||n.stack||"",r=function(t){if(t&&ir.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(t){}return[]}const ir=/Minified React error #\d+;/i;function sr(t){const n=t&&t.message;return n?n.error&&"string"==typeof n.error.message?n.error.message:n:"No error message"}function cr(t,n,e,r){const o=ar(t,n,e&&e.syntheticException||void 0,r);return kt(o),o.level="error",e&&e.event_id&&(o.event_id=e.event_id),Dt(o)}function ur(t,n,e="info",r,o){const i=fr(t,n,r&&r.syntheticException||void 0,o);return i.level=e,r&&r.event_id&&(i.event_id=r.event_id),Dt(i)}function ar(t,n,s,c,u){let h;if(o(n)&&n.error){return rr(t,n.error)}if(i(n)||r(n,"DOMException")){const e=n;if("stack"in n)h=rr(t,n);else{const n=e.name||(i(e)?"DOMError":"DOMException"),r=e.message?`${n}: ${e.message}`:n;h=fr(t,r,s,c),xt(h,r)}return"code"in e&&(h.tags={...h.tags,"DOMException.code":`${e.code}`}),h}if(e(n))return rr(t,n);if(a(n)||f(n)){return h=er(t,n,s,u),kt(h,{synthetic:!0}),h}return h=fr(t,n,s,c),xt(h,`${n}`,void 0),kt(h,{synthetic:!0}),h}function fr(t,n,e,r){const o={};if(r&&e){const r=or(t,e);r.length&&(o.exception={values:[{value:n,stacktrace:{frames:r}}]})}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 hr(t,{isUnhandledRejection:n}){const e=function(t,n=40){const e=Object.keys(H(t));e.sort();const r=e[0];if(!r)return"[object has no keys]";if(r.length>=n)return p(r,n);for(let t=e.length;t>0;t--){const r=e.slice(0,t).join(", ");if(!(r.length>n))return t===e.length?r:p(r,n)}return""}(t),r=n?"promise rejection":"exception";if(o(t))return`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``;if(f(t)){return`Event \`${function(t){try{const n=Object.getPrototypeOf(t);return n?n.constructor.name:void 0}catch(t){}}(t)}\` (type=${t.type}) captured as ${r}`}return`Object captured as ${r} with keys: ${e}`}function lr(t,{metadata:n,tunnel:e,dsn:r}){const o={event_id:t.event_id,sent_at:(new Date).toISOString(),...n&&n.sdk&&{sdk:{name:n.sdk.name,version:n.sdk.version}},...!!e&&!!r&&{dsn:N(r)}},i=function(t){return[{type:"user_report"},t]}(t);return Yt(o,[i])}class dr extends je{constructor(t){const n={parentSpanIsAlwaysRootSpan:!0,...t};!function(t,n,e=[n],r="npm"){const o=t._metadata||{};o.sdk||(o.sdk={name:`sentry.javascript.${n}`,packages:e.map((t=>({name:`${r}:@sentry/${t}`,version:S}))),version:S}),t._metadata=o}(n,"browser",["browser"],Ve.SENTRY_SDK_SOURCE||"cdn"),super(n),n.sendClientReports&&Ve.document&&Ve.document.addEventListener("visibilitychange",(()=>{"hidden"===Ve.document.visibilityState&&this.ht()}))}eventFromException(t,n){return cr(this.Y.stackParser,t,n,this.Y.attachStacktrace)}eventFromMessage(t,n="info",e){return ur(this.Y.stackParser,t,n,e,this.Y.attachStacktrace)}captureUserFeedback(t){if(!this.ot())return;const n=lr(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this.sendEnvelope(n)}ct(t,n,e){return t.platform=t.platform||"javascript",super.ct(t,n,e)}}const pr=$,mr=1e3;let yr,gr,vr,br;function _r(){if(!pr.document)return;const t=ct.bind(null,"dom"),n=wr(t,!0);pr.document.addEventListener("click",n,!1),pr.document.addEventListener("keypress",n,!1),["EventTarget","Node"].forEach((n=>{const e=pr[n]&&pr[n].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(U(e,"addEventListener",(function(n){return function(e,r,o){if("click"===e||"keypress"==e)try{const r=this,i=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},s=i[e]=i[e]||{refCount:0};if(!s.handler){const r=wr(t);s.handler=r,n.call(this,e,r,o)}s.refCount++}catch(t){}return n.call(this,e,r,o)}})),U(e,"removeEventListener",(function(t){return function(n,e,r){if("click"===n||"keypress"==n)try{const e=this,o=e.__sentry_instrumentation_handlers__||{},i=o[n];i&&(i.refCount--,i.refCount<=0&&(t.call(this,n,i.handler,r),i.handler=void 0,delete o[n]),0===Object.keys(o).length&&delete e.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,n,e,r)}})))}))}function wr(t,n=!1){return e=>{if(!e||e._sentryCaptured)return;const r=function(t){try{return t.target}catch(t){return null}}(e);if(function(t,n){return"keypress"===t&&(!n||!n.tagName||"INPUT"!==n.tagName&&"TEXTAREA"!==n.tagName&&!n.isContentEditable)}(e.type,r))return;F(e,"_sentryCaptured",!0),r&&!r._sentryId&&F(r,"_sentryId",Et());const o="keypress"===e.type?"input":e.type;if(!function(t){if(t.type!==gr)return!1;try{if(!t.target||t.target._sentryId!==vr)return!1}catch(t){}return!0}(e)){t({event:e,name:o,global:n}),gr=e.type,vr=r?r._sentryId:void 0}clearTimeout(yr),yr=pr.setTimeout((()=>{vr=void 0,gr=void 0}),mr)}}function Er(t){const n="history";it(n,t),st(n,Sr)}function Sr(){if(!function(){const t=cn.chrome,n=t&&t.app&&t.app.runtime,e="history"in cn&&!!cn.history.pushState&&!!cn.history.replaceState;return!n&&e}())return;const t=pr.onpopstate;function n(t){return function(...n){const e=n.length>2?n[2]:void 0;if(e){const t=br,n=String(e);br=n;ct("history",{from:t,to:n})}return t.apply(this,n)}}pr.onpopstate=function(...n){const e=pr.location.href,r=br;br=e;if(ct("history",{from:r,to:e}),t)try{return t.apply(this,n)}catch(t){}},U(pr.history,"pushState",n),U(pr.history,"replaceState",n)}const $r={};function xr(t){$r[t]=void 0}const kr="__sentry_xhr_v3__";function Ir(){if(!pr.XMLHttpRequest)return;const t=XMLHttpRequest.prototype;t.open=new Proxy(t.open,{apply(t,n,e){const r=1e3*pt(),o=s(e[0])?e[0].toUpperCase():void 0,i=function(t){if(s(t))return t;try{return t.toString()}catch(t){}return}(e[1]);if(!o||!i)return t.apply(n,e);n[kr]={method:o,url:i,request_headers:{}},"POST"===o&&i.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const c=()=>{const t=n[kr];if(t&&4===n.readyState){try{t.status_code=n.status}catch(t){}ct("xhr",{endTimestamp:1e3*pt(),startTimestamp:r,xhr:n})}};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[kr];return i&&s(r)&&s(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[kr];if(!r)return t.apply(n,e);void 0!==e[0]&&(r.body=e[0]);return ct("xhr",{startTimestamp:1e3*pt(),xhr:n}),t.apply(n,e)}})}function jr(t,n=function(t){const n=$r[t];if(n)return n;let e=pr[t];if(ft(e))return $r[t]=e.bind(pr);const r=pr.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&&o[t]&&(e=o[t]),r.head.removeChild(n)}catch(t){}return e?$r[t]=e.bind(pr):e}("fetch")){let e=0,r=0;return De(t,(function(o){const i=o.body.length;e+=i,r++;const s={body:o.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:e<=6e4&&r<15,...t.fetchOptions};if(!n)return xr("fetch"),Mt("No fetch implementation available");try{return n(t.url,s).then((t=>(e-=i,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}})))}catch(t){return xr("fetch"),e-=i,r--,Mt(t)}}))}function Tr(t,n,e,r){const o={filename:t,function:"<anonymous>"===n?J:n,in_app:!0};return void 0!==e&&(o.lineno=e),void 0!==r&&(o.colno=r),o}const Or=/^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,Cr=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Rr=/\((\S*)(?::(\d+))(?::(\d+))\)/,Dr=[30,t=>{const n=Or.exec(t);if(n){const[,t,e,r]=n;return Tr(t,J,+e,+r)}const e=Cr.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=Rr.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=Wr(e[1]||J,e[2]);return Tr(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],Mr=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Nr=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Ar=[50,t=>{const n=Mr.exec(t);if(n){if(n[3]&&n[3].indexOf(" > eval")>-1){const t=Nr.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]||J;return[e,t]=Wr(e,t),Tr(t,e,n[4]?+n[4]:void 0,n[5]?+n[5]:void 0)}}],Pr=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Lr=[40,t=>{const n=Pr.exec(t);return n?Tr(n[2],n[1]||J,+n[3],n[4]?+n[4]:void 0):void 0}],Ur=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,Fr=[10,t=>{const n=Ur.exec(t);return n?Tr(n[2],n[3]||J,+n[1]):void 0}],Br=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,qr=[20,t=>{const n=Br.exec(t);return n?Tr(n[5],n[3]||n[4]||J,+n[1],+n[2]):void 0}],Hr=[Dr,Ar],zr=Q(...Hr),Wr=(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]:J,e?`safari-extension:${n}`:`safari-web-extension:${n}`]:[t,n]},Gr=1024,Xr=(t={})=>{const n={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t};return{name:"Breadcrumbs",setup(t){var e;n.console&&function(t){const n="console";it(n,t),st(n,ut)}(function(t){return function(n){if(Cn()!==t)return;const e={category:"console",data:{arguments:n.args,logger:"console"},level:Ut(n.level),message:m(n.args," ")};if("assert"===n.level){if(!1!==n.args[0])return;e.message=`Assertion failed: ${m(n.args.slice(1)," ")||"console.assert"}`,e.data.arguments=n.args.slice(1)}Ae(e,{input:n.args,level:n.level})}}(t)),n.dom&&(e=function(t,n){return function(e){if(Cn()!==t)return;let r,o,i="object"==typeof n?n.serializeAttribute:void 0,s="object"==typeof n&&"number"==typeof n.maxStringLength?n.maxStringLength:void 0;s&&s>Gr&&(s=Gr),"string"==typeof i&&(i=[i]);try{const t=e.event,n=function(t){return!!t&&!!t.target}(t)?t.target:t;r=j(n,{keyAttrs:i,maxStringLength:s}),o=function(t){if(!k.HTMLElement)return null;let n=t;for(let t=0;t<5;t++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null}(n)}catch(t){r="<unknown>"}if(0===r.length)return;const c={category:`ui.${e.name}`,message:r};o&&(c.data={"ui.component_name":o}),Ae(c,{event:e.event,name:e.name,global:e.global})}}(t,n.dom),it("dom",e),st("dom",_r)),n.xhr&&function(t){it("xhr",t),st("xhr",Ir)}(function(t){return function(n){if(Cn()!==t)return;const{startTimestamp:e,endTimestamp:r}=n,o=n.xhr[kr];if(!e||!r||!o)return;const{method:i,url:s,status_code:c,body:u}=o,a={method:i,url:s,status_code:c},f={xhr:n.xhr,input:u,startTimestamp:e,endTimestamp:r};Ae({category:"xhr",data:a,type:"http",level:E(c)},f)}}(t)),n.fetch&&mt(function(t){return function(n){if(Cn()!==t)return;const{startTimestamp:e,endTimestamp:r}=n;if(r&&(!n.fetchData.url.match(/sentry_key/)||"POST"!==n.fetchData.method))if(n.error){Ae({category:"fetch",data:n.fetchData,level:"error",type:"http"},{data:n.error,input:n.args,startTimestamp:e,endTimestamp:r})}else{const t=n.response,o={...n.fetchData,status_code:t&&t.status},i={input:n.args,response:t,startTimestamp:e,endTimestamp:r};Ae({category:"fetch",data:o,type:"http",level:E(o.status_code)},i)}}}(t)),n.history&&Er(function(t){return function(n){if(Cn()!==t)return;let e=n.from,r=n.to;const o=Pt(Ve.location.href);let i=e?Pt(e):void 0;const s=Pt(r);i&&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),Ae({category:"navigation",data:{from:e,to:r}})}}(t)),n.sentry&&t.on("beforeSendEvent",function(t){return function(n){Cn()===t&&Ae({category:"sentry."+("transaction"===n.type?"transaction":"event"),event_id:n.event_id,level:n.level,message:$t(n)},{event:n})}}(t))}}};const Yr=["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"],Jr=(t={})=>{const n={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t};return{name:"BrowserApiErrors",setupOnce(){n.setTimeout&&U(Ve,"setTimeout",Kr),n.setInterval&&U(Ve,"setInterval",Kr),n.requestAnimationFrame&&U(Ve,"requestAnimationFrame",Vr),n.XMLHttpRequest&&"XMLHttpRequest"in Ve&&U(XMLHttpRequest.prototype,"send",Qr);const t=n.eventTarget;if(t){(Array.isArray(t)?t:Yr).forEach(Zr)}}}};function Kr(t){return function(...n){const e=n[0];return n[0]=tr(e,{mechanism:{data:{function:nt(t)},handled:!1,type:"instrument"}}),t.apply(this,n)}}function Vr(t){return function(n){return t.apply(this,[tr(n,{mechanism:{data:{function:"requestAnimationFrame",handler:nt(t)},handled:!1,type:"instrument"}})])}}function Qr(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:{function:t,handler:nt(n)},handled:!1,type:"instrument"}},r=q(n);return r&&(e.mechanism.data.handler=nt(r)),tr(n,e)}))})),t.apply(this,n)}}function Zr(t){const n=Ve,e=n[t]&&n[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(U(e,"addEventListener",(function(n){return function(e,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=tr(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:nt(r),target:t},handled:!1,type:"instrument"}}))}catch(t){}return n.apply(this,[e,tr(r,{mechanism:{data:{function:"addEventListener",handler:nt(r),target:t},handled:!1,type:"instrument"}}),o])}})),U(e,"removeEventListener",(function(t){return function(n,e,r){const o=e;try{const e=o&&o.__sentry_wrapped__;e&&t.call(this,n,e,r)}catch(t){}return t.call(this,n,o,r)}})))}const to=(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";it(n,t),st(n,bt)}((n=>{const{stackParser:e,attachStacktrace:r}=no();if(Cn()!==t||Ze())return;const{msg:o,url:i,line:c,column:u,error:a}=n,f=function(t,n,e,r){const o=t.exception=t.exception||{},i=o.values=o.values||[],c=i[0]=i[0]||{},u=c.stacktrace=c.stacktrace||{},a=u.frames=u.frames||[],f=isNaN(parseInt(r,10))?void 0:r,h=isNaN(parseInt(e,10))?void 0:e,l=s(n)&&n.length>0?n:function(){try{return k.document.location.href}catch(t){return""}}();0===a.length&&a.push({colno:f,filename:l,function:J,in_app:!0,lineno:h});return t}(ar(e,a||o,void 0,r,!1),i,c,u);f.level="error",ue(f,{originalException:a,mechanism:{handled:!1,type:"onerror"}})}))}(t),n.onunhandledrejection&&function(t){!function(t){const n="unhandledrejection";it(n,t),st(n,wt)}((n=>{const{stackParser:e,attachStacktrace:r}=no();if(Cn()!==t||Ze())return;const o=function(t){if(u(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch(t){}return t}(n),i=u(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:ar(e,o,void 0,r,!0);i.level="error",ue(i,{originalException:o,mechanism:{handled:!1,type:"onunhandledrejection"}})}))}(t)}}};function no(){const t=Cn();return t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const eo=()=>({name:"HttpContext",preprocessEvent(t){if(!Ve.navigator&&!Ve.location&&!Ve.document)return;const n=t.request&&t.request.url||Ve.location&&Ve.location.href,{referrer:e}=Ve.document||{},{userAgent:r}=Ve.navigator||{},o={...t.request&&t.request.headers,...e&&{Referer:e},...r&&{"User-Agent":r}},i={...t.request,...n&&{url:n},headers:o};t.request=i}}),ro=(t={})=>{const n=t.limit||5,e=t.key||"cause";return{name:"LinkedErrors",preprocessEvent(t,r,o){const i=o.getOptions();v(nr,i.stackParser,i.maxValueLength,e,n,t,r)}}};function oo(t){return[Be(),Ue(),Jr(),Xr(),to(),ro(),He(),eo()]}const io={replayIntegration:"replay",replayCanvasIntegration:"replay-canvas",feedbackIntegration:"feedback",feedbackModalIntegration:"feedback-modal",feedbackScreenshotIntegration:"feedback-screenshot",captureConsoleIntegration:"captureconsole",contextLinesIntegration:"contextlines",linkedErrorsIntegration:"linkederrors",debugIntegration:"debug",dedupeIntegration:"dedupe",extraErrorDataIntegration:"extraerrordata",httpClientIntegration:"httpclient",reportingObserverIntegration:"reportingobserver",rewriteFramesIntegration:"rewriteframes",sessionTimingIntegration:"sessiontiming",browserProfilingIntegration:"browserprofiling"},so=Ve;return t.BrowserClient=dr,t.SDK_VERSION=S,t.SEMANTIC_ATTRIBUTE_SENTRY_OP=An,t.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN=Pn,t.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE=Nn,t.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE=Mn,t.Scope=_n,t.WINDOW=Ve,t.addBreadcrumb=Ae,t.addEventProcessor=function(t){jn().addEventProcessor(t)},t.addIntegration=function(t){const n=Cn();n&&n.addIntegration(t)},t.breadcrumbsIntegration=Xr,t.browserApiErrorsIntegration=Jr,t.browserTracingIntegration=Ye,t.captureEvent=ue,t.captureException=captureException,t.captureMessage=function(t,n){const e="string"==typeof n?n:void 0,r="string"!=typeof n?{captureContext:n}:void 0;return In().captureMessage(t,e,r)},t.captureSession=be,t.captureUserFeedback=function(t){const n=Cn();n&&n.captureUserFeedback(t)},t.chromeStackLineParser=Dr,t.close=async function(t){const n=Cn();return n?n.close(t):Promise.resolve(!1)},t.continueTrace=({sentryTrace:t,baggage:n},e)=>On((r=>{const o=Xt(t,n);return r.setPropagationContext(o),e()})),t.createTransport=De,t.createUserFeedbackEnvelope=lr,t.dedupeIntegration=He,t.defaultStackLineParsers=Hr,t.defaultStackParser=zr,t.endSession=ge,t.eventFromException=cr,t.eventFromMessage=ur,t.exceptionFromError=nr,t.feedbackAsyncIntegration=fn,t.feedbackIntegration=fn,t.flush=async function(t){const n=Cn();return n?n.flush(t):Promise.resolve(!1)},t.forceLoad=function(){},t.functionToStringIntegration=Ue,t.geckoStackLineParser=Ar,t.getClient=Cn,t.getCurrentHub=Xe,t.getCurrentScope=In,t.getDefaultIntegrations=oo,t.getGlobalScope=Tn,t.getIsolationScope=jn,t.globalHandlersIntegration=to,t.httpContextIntegration=eo,t.inboundFiltersIntegration=Be,t.init=function(t={}){const n=function(t={}){const n={defaultIntegrations:oo(),release:"string"==typeof __SENTRY_RELEASE__?__SENTRY_RELEASE__:Ve.SENTRY_RELEASE&&Ve.SENTRY_RELEASE.id?Ve.SENTRY_RELEASE.id:void 0,autoSessionTracking:!0,sendClientReports:!0};return null==t.defaultIntegrations&&delete t.defaultIntegrations,{...n,...t}}(t);if(function(){const t=void 0!==Ve.window&&Ve;if(!t)return!1;const n=t[t.chrome?"chrome":"browser"],e=n&&n.runtime&&n.runtime.id,r=Ve.location&&Ve.location.href||"",o=!!e&&Ve===Ve.top&&["chrome-extension:","moz-extension:","ms-browser-extension:","safari-web-extension:"].some((t=>r.startsWith(`${t}//`))),i=void 0!==t.nw;return!!e&&!o&&!i}())return void R((()=>{console.error("[Sentry] You cannot run Sentry this way in a browser extension, check: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/")}));const e={...n,stackParser:(r=n.stackParser||zr,Array.isArray(r)?Q(...r):r),integrations:xe(n),transport:n.transport||jr};var r;const o=function(t,n){!0===n.debug&&R((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")})),In().update(n.initialScope);const e=new t(n);return Ce(e),e.init(),e}(dr,e);return n.autoSessionTracking&&function(){if(void 0===Ve.document)return;ye({ignoreDuration:!0}),be(),Er((({from:t,to:n})=>{void 0!==t&&t!==n&&(ye({ignoreDuration:!0}),be())}))}(),o},t.isInitialized=function(){return!!Cn()},t.lastEventId=me,t.lazyLoadIntegration=async function(t,n){const e=io[t],r=so.Sentry=so.Sentry||{};if(!e)throw new Error(`Cannot lazy load integration: ${t}`);const o=r[t];if("function"==typeof o&&!("_isShim"in o))return o;const i=function(t){const n=Cn(),e=n&&n.getOptions(),r=e&&e.cdnBaseUrl||"https://browser.sentry-cdn.com";return new URL(`/${S}/${t}.min.js`,r).toString()}(e),s=Ve.document.createElement("script");s.src=i,s.crossOrigin="anonymous",s.referrerPolicy="origin",n&&s.setAttribute("nonce",n);const c=new Promise(((t,n)=>{s.addEventListener("load",(()=>t())),s.addEventListener("error",n)})),u=Ve.document.currentScript,a=Ve.document.body||Ve.document.head||u&&u.parentElement;if(!a)throw new Error(`Could not find parent element to insert lazy-loaded ${t} script`);a.appendChild(s);try{await c}catch(n){throw new Error(`Error when loading integration: ${t}`)}const f=r[t];if("function"!=typeof f)throw new Error(`Could not load integration: ${t}`);return f},t.linkedErrorsIntegration=ro,t.makeFetchTransport=jr,t.metrics=Ke,t.onLoad=function(t){t()},t.opera10StackLineParser=Fr,t.opera11StackLineParser=qr,t.parameterize=function(t,...n){const e=new String(String.raw(t,...n));return e.__sentry_template_string__=t.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),e.__sentry_template_values__=n,e},t.replayIntegration=function(t){return R((()=>{console.warn("You are using replayIntegration() even though this bundle does not include replay.")})),{name:"Replay",...hn.reduce(((t,n)=>(t[n]=un,t)),{})}},t.setContext=ae,t.setCurrentClient=Ce,t.setExtra=he,t.setExtras=fe,t.setTag=de,t.setTags=le,t.setUser=pe,t.showReportDialog=function(t={}){if(!Ve.document)return;const n=In(),e=n.getClient(),r=e&&e.getDsn();if(!r)return;if(n&&(t.user={...n.getUser(),...t.user}),!t.eventId){const n=me();n&&(t.eventId=n)}const o=Ve.document.createElement("script");o.async=!0,o.crossOrigin="anonymous",o.src=function(t,n){const e=P(t);if(!e)return"";const r=`${we(e)}embed/error-page/`;let o=`dsn=${N(e)}`;for(const t in n)if("dsn"!==t&&"onClose"!==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}`}(r,t),t.onLoad&&(o.onload=t.onLoad);const{onClose:i}=t;if(i){const t=n=>{if("__sentry_reportdialog_closed__"===n.data)try{i()}finally{Ve.removeEventListener("message",t)}};Ve.addEventListener("message",t)}const s=Ve.document.head||Ve.document.body;s&&s.appendChild(o)},t.spanToBaggageHeader=function(t){return zt(Qn(t))},t.spanToJSON=zn,t.spanToTraceHeader=function(t){const{traceId:n,spanId:e}=t.spanContext();return function(t=Et(),n=Et().substring(16),e){let r="";return void 0!==e&&(r=e?"-1":"-0"),`${t}-${n}${r}`}(n,e,Wn(t))},t.startSession=ye,t.winjsStackLineParser=Lr,t.withIsolationScope=function(...t){const n=kn(ln());if(2===t.length){const[e,r]=t;return e?n.withSetIsolationScope(e,r):n.withIsolationScope(r)}return n.withIsolationScope(t[0])},t.withScope=On,t}({});
//# sourceMappingURL=bundle.min.js.map