@sentry/browser 5.24.2 → 5.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- /*! @sentry/browser 5.24.2 (8096d02) | https://github.com/getsentry/sentry-javascript */
2
- var Sentry=function(t){var e,n,r;function i(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return d(t,Error)}}function s(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function o(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function c(t){return"[object String]"===Object.prototype.toString.call(t)}function u(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function a(t){return"[object Object]"===Object.prototype.toString.call(t)}function h(t){return"undefined"!=typeof Event&&d(t,Event)}function l(t){return"undefined"!=typeof Element&&d(t,Element)}function f(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function d(t,e){try{return t instanceof e}catch(t){return!1}}function p(t){try{let e=t;const n=5,r=80,i=[];let s=0,o=0;const c=" > ",u=c.length;let a;for(;e&&s++<n&&!("html"===(a=b(e))||s>1&&o+i.length*u+a.length>=r);)i.push(a),o+=a.length,e=e.parentNode;return i.reverse().join(c)}catch(t){return"<unknown>"}}function b(t){const e=t,n=[];let r,i,s,o,u;if(!e||!e.tagName)return"";if(n.push(e.tagName.toLowerCase()),e.id&&n.push(`#${e.id}`),(r=e.className)&&c(r))for(i=r.split(/\s+/),u=0;u<i.length;u++)n.push(`.${i[u]}`);const a=["type","name","title","alt"];for(u=0;u<a.length;u++)s=a[u],(o=e.getAttribute(s))&&n.push(`[${s}="${o}"]`);return n.join("")}!function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Debug=2]="Debug",t[t.Verbose=3]="Verbose"}(e||(e={})),(n=t.Severity||(t.Severity={})).Fatal="fatal",n.Error="error",n.Warning="warning",n.Log="log",n.Info="info",n.Debug="debug",n.Critical="critical",function(t){t.fromString=function(e){switch(e){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}}(t.Severity||(t.Severity={})),(r=t.Status||(t.Status={})).Unknown="unknown",r.Skipped="skipped",r.Success="success",r.RateLimit="rate_limit",r.Invalid="invalid",r.Failed="failed",function(t){t.fromHttpCode=function(e){return e>=200&&e<300?t.Success:429===e?t.RateLimit:e>=400&&e<500?t.Invalid:e>=500?t.Failed:t.Unknown}}(t.Status||(t.Status={}));const v=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(const n in e)t.hasOwnProperty(n)||(t[n]=e[n]);return t});class y extends Error{constructor(t){super(t),this.message=t,this.name=new.target.prototype.constructor.name,v(this,new.target.prototype)}}const m=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,g="Invalid Dsn";class j{constructor(t){"string"==typeof t?this.t(t):this.i(t),this.s()}toString(t=!1){const{host:e,path:n,pass:r,port:i,projectId:s,protocol:o,user:c}=this;return`${o}://${c}${t&&r?`:${r}`:""}`+`@${e}${i?`:${i}`:""}/${n?`${n}/`:n}${s}`}t(t){const e=m.exec(t);if(!e)throw new y(g);const[n,r,i="",s,o="",c]=e.slice(1);let u="",a=c;const h=a.split("/");if(h.length>1&&(u=h.slice(0,-1).join("/"),a=h.pop()),a){const t=a.match(/^\d+/);t&&(a=t[0])}this.i({host:s,pass:i,path:u,projectId:a,port:o,protocol:n,user:r})}i(t){this.protocol=t.protocol,this.user=t.user,this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId}s(){if(["protocol","user","host","projectId"].forEach(t=>{if(!this[t])throw new y(`${g}: ${t} missing`)}),!this.projectId.match(/^\d+$/))throw new y(`${g}: Invalid projectId ${this.projectId}`);if("http"!==this.protocol&&"https"!==this.protocol)throw new y(`${g}: Invalid protocol ${this.protocol}`);if(this.port&&isNaN(parseInt(this.port,10)))throw new y(`${g}: Invalid port ${this.port}`)}}class E{constructor(){this.o="function"==typeof WeakSet,this.u=this.o?new WeakSet:[]}memoize(t){if(this.o)return!!this.u.has(t)||(this.u.add(t),!1);for(let e=0;e<this.u.length;e++){if(this.u[e]===t)return!0}return this.u.push(t),!1}unmemoize(t){if(this.o)this.u.delete(t);else for(let e=0;e<this.u.length;e++)if(this.u[e]===t){this.u.splice(e,1);break}}}const O="<anonymous>";function w(t){try{return t&&"function"==typeof t&&t.name||O}catch(t){return O}}function $(t,e=0){return"string"!=typeof t||0===e?t:t.length<=e?t:`${t.substr(0,e)}...`}function _(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;e<t.length;e++){const r=t[e];try{n.push(String(r))}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)}function x(t,e){return!!c(t)&&(n=e,"[object RegExp]"===Object.prototype.toString.call(n)?e.test(t):"string"==typeof e&&-1!==t.indexOf(e));var n}function S(t,e,n){if(!(e in t))return;const r=t[e],i=n(r);if("function"==typeof i)try{i.prototype=i.prototype||{},Object.defineProperties(i,{__sentry_original__:{enumerable:!1,value:r}})}catch(t){}t[e]=i}function k(t){if(i(t)){const e=t,n={message:e.message,name:e.name,stack:e.stack};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n}if(h(t)){const e=t,n={};n.type=e.type;try{n.target=l(e.target)?p(e.target):Object.prototype.toString.call(e.target)}catch(t){n.target="<unknown>"}try{n.currentTarget=l(e.currentTarget)?p(e.currentTarget):Object.prototype.toString.call(e.currentTarget)}catch(t){n.currentTarget="<unknown>"}"undefined"!=typeof CustomEvent&&d(t,CustomEvent)&&(n.detail=e.detail);for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e);return n}return t}function T(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function D(t,e=3,n=102400){const r=C(t,e);return T(r)>n?D(t,e-1,n):r}function R(t,e){return"domain"===e&&t&&"object"==typeof t&&t.h?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":a(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?`[Function: ${w(t)}]`:t;var n}function I(t,e,n=1/0,r=new E){if(0===n)return function(t){const e=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";const n=R(t);return u(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();const i=R(e,t);if(u(i))return i;const s=k(e),o=Array.isArray(e)?[]:{};if(r.memoize(e))return"[Circular ~]";for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&(o[t]=I(t,s[t],n-1,r));return r.unmemoize(e),o}function C(t,e){try{return JSON.parse(JSON.stringify(t,(t,n)=>I(t,n,e)))}catch(t){return"**non-serializable**"}}function N(t,e=40){const n=Object.keys(k(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return $(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:$(r,e)}return""}function M(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}const A={};function U(){return M()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:A}function L(){const t=U(),e=t.crypto||t.msCrypto;if(void 0!==e&&e.getRandomValues){const t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const n=t=>{let e=t.toString(16);for(;e.length<4;)e=`0${e}`;return e};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}function F(t){if(!t)return{};const e=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function q(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){const e=t.exception.values[0];return e.type&&e.value?`${e.type}: ${e.value}`:e.type||e.value||t.event_id||"<unknown>"}return t.event_id||"<unknown>"}function B(t){const e=U();if(!("console"in e))return t();const n=e.console,r={};["debug","info","warn","error","log","assert"].forEach(t=>{t in e.console&&n[t].__sentry_original__&&(r[t]=n[t],n[t]=n[t].__sentry_original__)});const i=t();return Object.keys(r).forEach(t=>{n[t]=r[t]}),i}function H(t,e,n){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||e||"",t.exception.values[0].type=t.exception.values[0].type||n||"Error"}function P(t,e={}){try{t.exception.values[0].mechanism=t.exception.values[0].mechanism||{},Object.keys(e).forEach(n=>{t.exception.values[0].mechanism[n]=e[n]})}catch(t){}}const W=Date.now();let X=0;const G={now(){let t=Date.now()-W;return t<X&&(t=X),X=t,t},timeOrigin:W};const z=(()=>{if(function(){var t;return"ReactNative"===(null===(t=U().navigator)||void 0===t?void 0:t.product)}())return function(){const{performance:t}=U();if(t&&"function"==typeof t.now){const e=t.now();return{now:()=>t.now()-e,timeOrigin:W}}return G}();if(M())try{return function(t,e){return t.require(e)}(module,"perf_hooks").performance}catch(t){return G}const{performance:t}=U();return t&&t.now?(void 0===t.timeOrigin&&(t.timeOrigin=t.timing&&t.timing.navigationStart||W),t):G})();function J(){return(z.timeOrigin+z.now())/1e3}const V=6e4;function K(t,e){if(!e)return V;const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?V:r-t}const Q=U(),Y="Sentry Logger ";Q.__SENTRY__=Q.__SENTRY__||{};const Z=Q.__SENTRY__.logger||(Q.__SENTRY__.logger=new class{constructor(){this.l=!1}disable(){this.l=!1}enable(){this.l=!0}log(...t){this.l&&B(()=>{Q.console.log(`${Y}[Log]: ${t.join(" ")}`)})}warn(...t){this.l&&B(()=>{Q.console.warn(`${Y}[Warn]: ${t.join(" ")}`)})}error(...t){this.l&&B(()=>{Q.console.error(`${Y}[Error]: ${t.join(" ")}`)})}});var tt;!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(tt||(tt={}));class et{constructor(t){this.p=tt.PENDING,this.v=[],this.m=(t=>{this.g(tt.RESOLVED,t)}),this.j=(t=>{this.g(tt.REJECTED,t)}),this.g=((t,e)=>{this.p===tt.PENDING&&(f(e)?e.then(this.m,this.j):(this.p=t,this.O=e,this.$()))}),this._=(t=>{this.v=this.v.concat(t),this.$()}),this.$=(()=>{if(this.p===tt.PENDING)return;const t=this.v.slice();this.v=[],t.forEach(t=>{t.done||(this.p===tt.RESOLVED&&t.onfulfilled&&t.onfulfilled(this.O),this.p===tt.REJECTED&&t.onrejected&&t.onrejected(this.O),t.done=!0)})});try{t(this.m,this.j)}catch(t){this.j(t)}}static resolve(t){return new et(e=>{e(t)})}static reject(t){return new et((e,n)=>{n(t)})}static all(t){return new et((e,n)=>{if(!Array.isArray(t))return void n(new TypeError("Promise.all requires an array as input."));if(0===t.length)return void e([]);let r=t.length;const i=[];t.forEach((t,s)=>{et.resolve(t).then(t=>{i[s]=t,0===(r-=1)&&e(i)}).then(null,n)})})}then(t,e){return new et((n,r)=>{this._({done:!1,onfulfilled:e=>{if(t)try{return void n(t(e))}catch(t){return void r(t)}else n(e)},onrejected:t=>{if(e)try{return void n(e(t))}catch(t){return void r(t)}else r(t)}})})}catch(t){return this.then(t=>t,t)}finally(t){return new et((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}toString(){return"[object SyncPromise]"}}class nt{constructor(t){this.S=t,this.k=[]}isReady(){return void 0===this.S||this.length()<this.S}add(t){return this.isReady()?(-1===this.k.indexOf(t)&&this.k.push(t),t.then(()=>this.remove(t)).then(null,()=>this.remove(t).then(null,()=>{})),t):et.reject(new y("Not adding Promise due to buffer limit reached."))}remove(t){return this.k.splice(this.k.indexOf(t),1)[0]}length(){return this.k.length}drain(t){return new et(e=>{const n=setTimeout(()=>{t&&t>0&&e(!1)},t);et.all(this.k).then(()=>{clearTimeout(n),e(!0)}).then(null,()=>{e(!0)})})}}function rt(){if(!("fetch"in U()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function it(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function st(){if(!rt())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}const ot=U(),ct={},ut={};function at(t){if(!ut[t])switch(ut[t]=!0,t){case"console":!function(){if(!("console"in ot))return;["debug","info","warn","error","log","assert"].forEach(function(t){t in ot.console&&S(ot.console,t,function(e){return function(...n){lt("console",{args:n,level:t}),e&&Function.prototype.apply.call(e,ot.console,n)}})})}();break;case"dom":!function(){if(!("document"in ot))return;ot.document.addEventListener("click",gt("click",lt.bind(null,"dom")),!1),ot.document.addEventListener("keypress",jt(lt.bind(null,"dom")),!1),["EventTarget","Node"].forEach(t=>{const e=ot[t]&&ot[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(S(e,"addEventListener",function(t){return function(e,n,r){return n&&n.handleEvent?("click"===e&&S(n,"handleEvent",function(t){return function(e){return gt("click",lt.bind(null,"dom"))(e),t.call(this,e)}}),"keypress"===e&&S(n,"handleEvent",function(t){return function(e){return jt(lt.bind(null,"dom"))(e),t.call(this,e)}})):("click"===e&&gt("click",lt.bind(null,"dom"),!0)(this),"keypress"===e&&jt(lt.bind(null,"dom"))(this)),t.call(this,e,n,r)}}),S(e,"removeEventListener",function(t){return function(e,n,r){try{t.call(this,e,n.__sentry_wrapped__,r)}catch(t){}return t.call(this,e,n,r)}}))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in ot))return;const t=[],e=[],n=XMLHttpRequest.prototype;S(n,"open",function(n){return function(...r){const i=this,s=r[1];i.__sentry_xhr__={method:c(r[0])?r[0].toUpperCase():r[0],url:r[1]},c(s)&&"POST"===i.__sentry_xhr__.method&&s.match(/sentry_key/)&&(i.__sentry_own_request__=!0);const o=function(){if(4===i.readyState){try{i.__sentry_xhr__&&(i.__sentry_xhr__.status_code=i.status)}catch(t){}try{const n=t.indexOf(i);if(-1!==n){t.splice(n);const r=e.splice(n)[0];i.__sentry_xhr__&&void 0!==r[0]&&(i.__sentry_xhr__.body=r[0])}}catch(t){}lt("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:i})}};return"onreadystatechange"in i&&"function"==typeof i.onreadystatechange?S(i,"onreadystatechange",function(t){return function(...e){return o(),t.apply(i,e)}}):i.addEventListener("readystatechange",o),n.apply(i,r)}}),S(n,"send",function(n){return function(...r){return t.push(this),e.push(r),lt("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),n.apply(this,r)}})}();break;case"fetch":!function(){if(!function(){if(!rt())return!1;const t=U();if(it(t.fetch))return!0;let e=!1;const n=t.document;if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t),t.contentWindow&&t.contentWindow.fetch&&(e=it(t.contentWindow.fetch)),n.head.removeChild(t)}catch(t){Z.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return e}())return;S(ot,"fetch",function(t){return function(...e){const n={args:e,fetchData:{method:ft(e),url:dt(e)},startTimestamp:Date.now()};return lt("fetch",Object.assign({},n)),t.apply(ot,e).then(t=>(lt("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),response:t})),t),t=>{throw lt("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),error:t})),t})}})}();break;case"history":!function(){if(!function(){const t=U(),e=t.chrome,n=e&&e.app&&e.app.runtime,r="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!n&&r}())return;const t=ot.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=pt,e=String(n);pt=e,lt("history",{from:t,to:e})}return t.apply(this,e)}}ot.onpopstate=function(...e){const n=ot.location.href,r=pt;if(pt=n,lt("history",{from:r,to:n}),t)return t.apply(this,e)},S(ot.history,"pushState",e),S(ot.history,"replaceState",e)}();break;case"error":Et=ot.onerror,ot.onerror=function(t,e,n,r,i){return lt("error",{column:r,error:i,line:n,msg:t,url:e}),!!Et&&Et.apply(this,arguments)};break;case"unhandledrejection":Ot=ot.onunhandledrejection,ot.onunhandledrejection=function(t){return lt("unhandledrejection",t),!Ot||Ot.apply(this,arguments)};break;default:Z.warn("unknown instrumentation type:",t)}}function ht(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(ct[t.type]=ct[t.type]||[],ct[t.type].push(t.callback),at(t.type))}function lt(t,e){if(t&&ct[t])for(const n of ct[t]||[])try{n(e)}catch(e){Z.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${w(n)}\nError: ${e}`)}}function ft(t=[]){return"Request"in ot&&d(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function dt(t=[]){return"string"==typeof t[0]?t[0]:"Request"in ot&&d(t[0],Request)?t[0].url:String(t[0])}let pt;const bt=1e3;let vt,yt,mt=0;function gt(t,e,n=!1){return r=>{vt=void 0,r&&yt!==r&&(yt=r,mt&&clearTimeout(mt),n?mt=setTimeout(()=>{e({event:r,name:t})}):e({event:r,name:t}))}}function jt(t){return e=>{let n;try{n=e.target}catch(t){return}const r=n&&n.tagName;r&&("INPUT"===r||"TEXTAREA"===r||n.isContentEditable)&&(vt||gt("input",t)(e),clearTimeout(vt),vt=setTimeout(()=>{vt=void 0},bt))}}let Et=null;let Ot=null;class wt{constructor(){this.T=!1,this.D=[],this.R=[],this.I=[],this.C={},this.N={},this.M={},this.A={}}static clone(t){const e=new wt;return t&&(e.I=[...t.I],e.N=Object.assign({},t.N),e.M=Object.assign({},t.M),e.A=Object.assign({},t.A),e.C=t.C,e.U=t.U,e.L=t.L,e.F=t.F,e.q=t.q,e.R=[...t.R]),e}addScopeListener(t){this.D.push(t)}addEventProcessor(t){return this.R.push(t),this}setUser(t){return this.C=t||{},this.B(),this}setTags(t){return this.N=Object.assign(Object.assign({},this.N),t),this.B(),this}setTag(t,e){return this.N=Object.assign(Object.assign({},this.N),{[t]:e}),this.B(),this}setExtras(t){return this.M=Object.assign(Object.assign({},this.M),t),this.B(),this}setExtra(t,e){return this.M=Object.assign(Object.assign({},this.M),{[t]:e}),this.B(),this}setFingerprint(t){return this.q=t,this.B(),this}setLevel(t){return this.U=t,this.B(),this}setTransactionName(t){return this.F=t,this.B(),this}setTransaction(t){return this.setTransactionName(t)}setContext(t,e){return this.A=Object.assign(Object.assign({},this.A),{[t]:e}),this.B(),this}setSpan(t){return this.L=t,this.B(),this}getSpan(){return this.L}getTransaction(){const t=this.getSpan();if(t&&t.spanRecorder&&t.spanRecorder.spans[0])return t.spanRecorder.spans[0]}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof wt?e:this}return t instanceof wt?(this.N=Object.assign(Object.assign({},this.N),t.N),this.M=Object.assign(Object.assign({},this.M),t.M),this.A=Object.assign(Object.assign({},this.A),t.A),t.C&&(this.C=t.C),t.U&&(this.U=t.U),t.q&&(this.q=t.q)):a(t)&&(t=t,this.N=Object.assign(Object.assign({},this.N),t.tags),this.M=Object.assign(Object.assign({},this.M),t.extra),this.A=Object.assign(Object.assign({},this.A),t.contexts),t.user&&(this.C=t.user),t.level&&(this.U=t.level),t.fingerprint&&(this.q=t.fingerprint)),this}clear(){return this.I=[],this.N={},this.M={},this.C={},this.A={},this.U=void 0,this.F=void 0,this.q=void 0,this.L=void 0,this.B(),this}addBreadcrumb(t,e){const n=Object.assign({timestamp:J()},t);return this.I=void 0!==e&&e>=0?[...this.I,n].slice(-e):[...this.I,n],this.B(),this}clearBreadcrumbs(){return this.I=[],this.B(),this}applyToEvent(t,e){return this.M&&Object.keys(this.M).length&&(t.extra=Object.assign(Object.assign({},this.M),t.extra)),this.N&&Object.keys(this.N).length&&(t.tags=Object.assign(Object.assign({},this.N),t.tags)),this.C&&Object.keys(this.C).length&&(t.user=Object.assign(Object.assign({},this.C),t.user)),this.A&&Object.keys(this.A).length&&(t.contexts=Object.assign(Object.assign({},this.A),t.contexts)),this.U&&(t.level=this.U),this.F&&(t.transaction=this.F),this.L&&(t.contexts=Object.assign({trace:this.L.getTraceContext()},t.contexts)),this.H(t),t.breadcrumbs=[...t.breadcrumbs||[],...this.I],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this.P([...$t(),...this.R],t,e)}P(t,e,n,r=0){return new et((i,s)=>{const o=t[r];if(null===e||"function"!=typeof o)i(e);else{const c=o(Object.assign({},e),n);f(c)?c.then(e=>this.P(t,e,n,r+1).then(i)).then(null,s):this.P(t,c,n,r+1).then(i).then(null,s)}})}B(){this.T||(this.T=!0,setTimeout(()=>{this.D.forEach(t=>{t(this)}),this.T=!1}))}H(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this.q&&(t.fingerprint=t.fingerprint.concat(this.q)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function $t(){const t=U();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function _t(t){$t().push(t)}const xt=3,St=100,kt=100;class Tt{constructor(t,e=new wt,n=xt){this.W=n,this.X=[],this.X.push({client:t,scope:e}),this.bindClient(t)}isOlderThan(t){return this.W<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getStack(),e=t.length>0?t[t.length-1].scope:void 0,n=wt.clone(e);return this.getStack().push({client:this.getClient(),scope:n}),n}popScope(){return void 0!==this.getStack().pop()}withScope(t){const e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this.X}getStackTop(){return this.X[this.X.length-1]}captureException(t,e){const n=this.G=L();let r=e;if(!e){let e;try{throw new Error("Sentry syntheticException")}catch(t){e=t}r={originalException:t,syntheticException:e}}return this.J("captureException",t,Object.assign(Object.assign({},r),{event_id:n})),n}captureMessage(t,e,n){const r=this.G=L();let i=n;if(!n){let e;try{throw new Error(t)}catch(t){e=t}i={originalException:t,syntheticException:e}}return this.J("captureMessage",t,e,Object.assign(Object.assign({},i),{event_id:r})),r}captureEvent(t,e){const n=this.G=L();return this.J("captureEvent",t,Object.assign(Object.assign({},e),{event_id:n})),n}lastEventId(){return this.G}addBreadcrumb(t,e){const n=this.getStackTop();if(!n.scope||!n.client)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:i=St}=n.client.getOptions&&n.client.getOptions()||{};if(i<=0)return;const s=J(),o=Object.assign({timestamp:s},t),c=r?B(()=>r(o,e)):o;null!==c&&n.scope.addBreadcrumb(c,Math.min(i,kt))}setUser(t){const e=this.getStackTop();e.scope&&e.scope.setUser(t)}setTags(t){const e=this.getStackTop();e.scope&&e.scope.setTags(t)}setExtras(t){const e=this.getStackTop();e.scope&&e.scope.setExtras(t)}setTag(t,e){const n=this.getStackTop();n.scope&&n.scope.setTag(t,e)}setExtra(t,e){const n=this.getStackTop();n.scope&&n.scope.setExtra(t,e)}setContext(t,e){const n=this.getStackTop();n.scope&&n.scope.setContext(t,e)}configureScope(t){const e=this.getStackTop();e.scope&&e.client&&t(e.scope)}run(t){const e=Rt(this);try{t(this)}finally{Rt(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return Z.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startSpan(t){return this.V("startSpan",t)}startTransaction(t,e){return this.V("startTransaction",t,e)}traceHeaders(){return this.V("traceHeaders")}J(t,...e){const n=this.getStackTop();n&&n.client&&n.client[t]&&n.client[t](...e,n.scope)}V(t,...e){const n=Dt().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);Z.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Dt(){const t=U();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Rt(t){const e=Dt(),n=Nt(e);return Mt(e,t),n}function It(){const t=Dt();return Ct(t)&&!Nt(t).isOlderThan(xt)||Mt(t,new Tt),M()?function(t){try{const e=function(){const t=Dt().__SENTRY__;return t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active}();if(!e)return Nt(t);if(!Ct(e)||Nt(e).isOlderThan(xt)){const n=Nt(t).getStackTop();Mt(e,new Tt(n.client,wt.clone(n.scope)))}return Nt(e)}catch(e){return Nt(t)}}(t):Nt(t)}function Ct(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function Nt(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub?t.__SENTRY__.hub:(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new Tt,t.__SENTRY__.hub)}function Mt(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function At(t,...e){const n=It();if(n&&n[t])return n[t](...e);throw new Error(`No hub defined or ${t} was not found on the hub, please open a bug report.`)}function captureException(t,e){let n;try{throw new Error("Sentry syntheticException")}catch(t){n=t}return At("captureException",t,{captureContext:e,originalException:t,syntheticException:n})}function Ut(t){At("withScope",t)}const Lt="7";class Ft{constructor(t){this.dsn=t,this.K=new j(t)}getDsn(){return this.K}getBaseApiEndpoint(){const t=this.K,e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}getStoreEndpoint(){return this.Y("store")}getStoreEndpointWithUrlEncodedAuth(){return`${this.getStoreEndpoint()}?${this.Z()}`}getEnvelopeEndpointWithUrlEncodedAuth(){return`${this.tt()}?${this.Z()}`}getStoreEndpointPath(){const t=this.K;return`${t.path?`/${t.path}`:""}/api/${t.projectId}/store/`}getRequestHeaders(t,e){const n=this.K,r=[`Sentry sentry_version=${Lt}`];return r.push(`sentry_client=${t}/${e}`),r.push(`sentry_key=${n.user}`),n.pass&&r.push(`sentry_secret=${n.pass}`),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}}getReportDialogEndpoint(t={}){const e=this.K,n=`${this.getBaseApiEndpoint()}embed/error-page/`,r=[];r.push(`dsn=${e.toString()}`);for(const e in t)if("user"===e){if(!t.user)continue;t.user.name&&r.push(`name=${encodeURIComponent(t.user.name)}`),t.user.email&&r.push(`email=${encodeURIComponent(t.user.email)}`)}else r.push(`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`);return r.length?`${n}?${r.join("&")}`:n}tt(){return this.Y("envelope")}Y(t){return`${this.getBaseApiEndpoint()}${this.K.projectId}/${t}/`}Z(){const t={sentry_key:this.K.user,sentry_version:Lt};return e=t,Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&");var e}}const qt=[];function Bt(t){const e={};return function(t){const e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations;let r=[];if(Array.isArray(n)){const t=n.map(t=>t.name),i=[];e.forEach(e=>{-1===t.indexOf(e.name)&&-1===i.indexOf(e.name)&&(r.push(e),i.push(e.name))}),n.forEach(t=>{-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))})}else"function"==typeof n?(r=n(e),r=Array.isArray(r)?r:[r]):r=[...e];const i=r.map(t=>t.name);return-1!==i.indexOf("Debug")&&r.push(...r.splice(i.indexOf("Debug"),1)),r}(t).forEach(t=>{e[t.name]=t,function(t){-1===qt.indexOf(t.name)&&(t.setupOnce(_t,It),qt.push(t.name),Z.log(`Integration installed: ${t.name}`))}(t)}),e}class Ht{constructor(t,e){this.et={},this.nt=!1,this.rt=new t(e),this.it=e,e.dsn&&(this.st=new j(e.dsn))}captureException(t,e,n){let r=e&&e.event_id;return this.nt=!0,this.ot().eventFromException(t,e).then(t=>{r=this.captureEvent(t,e,n)}),r}captureMessage(t,e,n,r){let i=n&&n.event_id;return this.nt=!0,(u(t)?this.ot().eventFromMessage(`${t}`,e,n):this.ot().eventFromException(t,n)).then(t=>{i=this.captureEvent(t,n,r)}),i}captureEvent(t,e,n){let r=e&&e.event_id;return this.nt=!0,this.ct(t,e,n).then(t=>{r=t&&t.event_id,this.nt=!1}).then(null,t=>{Z.error(t),this.nt=!1}),r}getDsn(){return this.st}getOptions(){return this.it}flush(t){return this.ut(t).then(e=>(clearInterval(e.interval),this.ot().getTransport().close(t).then(t=>e.ready&&t)))}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,t))}setupIntegrations(){this.at()&&(this.et=Bt(this.it))}getIntegration(t){try{return this.et[t.id]||null}catch(e){return Z.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}ut(t){return new et(e=>{let n=0;let r=0;clearInterval(r),r=setInterval(()=>{this.nt?(n+=1,t&&n>=t&&e({interval:r,ready:!1})):e({interval:r,ready:!0})},1)})}ot(){return this.rt}at(){return!1!==this.getOptions().enabled&&void 0!==this.st}ht(t,e,n){const{normalizeDepth:r=3}=this.getOptions(),i=Object.assign(Object.assign({},t),{event_id:t.event_id||(n&&n.event_id?n.event_id:L()),timestamp:t.timestamp||J()});this.lt(i),this.ft(i);let s=e;n&&n.captureContext&&(s=wt.clone(s).update(n.captureContext));let o=et.resolve(i);return s&&(o=s.applyToEvent(i,n)),o.then(t=>"number"==typeof r&&r>0?this.dt(t,r):t)}dt(t,e){if(!t)return null;const n=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>Object.assign(Object.assign({},t),t.data&&{data:C(t.data,e)}))}),t.user&&{user:C(t.user,e)}),t.contexts&&{contexts:C(t.contexts,e)}),t.extra&&{extra:C(t.extra,e)});return t.contexts&&t.contexts.trace&&(n.contexts.trace=t.contexts.trace),n}lt(t){const{environment:e,release:n,dist:r,maxValueLength:i=250}=this.getOptions();void 0===t.environment&&void 0!==e&&(t.environment=e),void 0===t.release&&void 0!==n&&(t.release=n),void 0===t.dist&&void 0!==r&&(t.dist=r),t.message&&(t.message=$(t.message,i));const s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=$(s.value,i));const o=t.request;o&&o.url&&(o.url=$(o.url,i))}ft(t){const e=t.sdk,n=Object.keys(this.et);e&&n.length>0&&(e.integrations=n)}pt(t){this.ot().sendEvent(t)}ct(t,e,n){const{beforeSend:r,sampleRate:i}=this.getOptions();if(!this.at())return et.reject("SDK not enabled, will not send event.");const s="transaction"===t.type;return!s&&"number"==typeof i&&Math.random()>i?et.reject("This event has been sampled, will not send event."):new et((i,o)=>{this.ht(t,n,e).then(t=>{if(null===t)return void o("An event processor returned null, will not send event.");let n=t;if(e&&e.data&&!0===e.data.__sentry__||!r||s)return this.pt(n),void i(n);const c=r(t,e);if(void 0===c)Z.error("`beforeSend` method has to return `null` or a valid event.");else if(f(c))this.bt(c,i,o);else{if(null===(n=c))return Z.log("`beforeSend` returned `null`, will not send event."),void i(null);this.pt(n),i(n)}}).then(null,t=>{this.captureException(t,{data:{__sentry__:!0},originalException:t}),o(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})})}bt(t,e,n){t.then(t=>{null!==t?(this.pt(t),e(t)):n("`beforeSend` returned `null`, will not send event.")}).then(null,t=>{n(`beforeSend rejected with ${t}`)})}}class Pt{sendEvent(e){return et.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:t.Status.Skipped})}close(t){return et.resolve(!0)}}class Wt{constructor(t){this.it=t,this.it.dsn||Z.warn("No DSN provided, backend will not do anything."),this.vt=this.yt()}eventFromException(t,e){throw new y("Backend has to implement `eventFromException` method")}eventFromMessage(t,e,n){throw new y("Backend has to implement `eventFromMessage` method")}sendEvent(t){this.vt.sendEvent(t).then(null,t=>{Z.error(`Error while sending event: ${t}`)})}getTransport(){return this.vt}yt(){return new Pt}}function Xt(t,e){const n="transaction"===t.type,r={body:JSON.stringify(t),url:n?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(n){const e=`${JSON.stringify({event_id:t.event_id,sent_at:new Date(1e3*J()).toISOString()})}\n${JSON.stringify({type:t.type})}\n${r.body}`;r.body=e}return r}let Gt;class zt{constructor(){this.name=zt.id}setupOnce(){Gt=Function.prototype.toString,Function.prototype.toString=function(...t){const e=this.__sentry_original__||this;return Gt.apply(e,t)}}}zt.id="FunctionToString";const Jt=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class Vt{constructor(t={}){this.it=t,this.name=Vt.id}setupOnce(){_t(t=>{const e=It();if(!e)return t;const n=e.getIntegration(Vt);if(n){const r=e.getClient(),i=r?r.getOptions():{},s=n.gt(i);if(n.jt(t,s))return null}return t})}jt(t,e){return this.Et(t,e)?(Z.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${q(t)}`),!0):this.Ot(t,e)?(Z.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${q(t)}`),!0):this.wt(t,e)?(Z.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${q(t)}.\nUrl: ${this.$t(t)}`),!0):!this._t(t,e)&&(Z.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${q(t)}.\nUrl: ${this.$t(t)}`),!0)}Et(t,e){if(!e.ignoreInternal)return!1;try{return t&&t.exception&&t.exception.values&&t.exception.values[0]&&"SentryError"===t.exception.values[0].type||!1}catch(t){return!1}}Ot(t,e){return!(!e.ignoreErrors||!e.ignoreErrors.length)&&this.xt(t).some(t=>e.ignoreErrors.some(e=>x(t,e)))}wt(t,e){if(!e.denyUrls||!e.denyUrls.length)return!1;const n=this.$t(t);return!!n&&e.denyUrls.some(t=>x(n,t))}_t(t,e){if(!e.allowUrls||!e.allowUrls.length)return!0;const n=this.$t(t);return!n||e.allowUrls.some(t=>x(n,t))}gt(t={}){return{allowUrls:[...this.it.whitelistUrls||[],...this.it.allowUrls||[],...t.whitelistUrls||[],...t.allowUrls||[]],denyUrls:[...this.it.blacklistUrls||[],...this.it.denyUrls||[],...t.blacklistUrls||[],...t.denyUrls||[]],ignoreErrors:[...this.it.ignoreErrors||[],...t.ignoreErrors||[],...Jt],ignoreInternal:void 0===this.it.ignoreInternal||this.it.ignoreInternal}}xt(t){if(t.message)return[t.message];if(t.exception)try{const{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch(e){return Z.error(`Cannot extract message for event ${q(t)}`),[]}return[]}$t(t){try{if(t.stacktrace){const e=t.stacktrace.frames;return e&&e[e.length-1].filename||null}if(t.exception){const e=t.exception.values&&t.exception.values[0].stacktrace&&t.exception.values[0].stacktrace.frames;return e&&e[e.length-1].filename||null}return null}catch(e){return Z.error(`Cannot extract url for event ${q(t)}`),null}}}Vt.id="InboundFilters";var Kt=Object.freeze({__proto__:null,FunctionToString:zt,InboundFilters:Vt});const Qt="?",Yt=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Zt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,te=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,ee=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ne=/\((\S*)(?::(\d+))(?::(\d+))\)/,re=/Minified React error #\d+;/i;function ie(t){let e=null,n=0;t&&("number"==typeof t.framesToPop?n=t.framesToPop:re.test(t.message)&&(n=1));try{if(e=function(t){if(!t||!t.stacktrace)return null;const e=t.stacktrace,n=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,r=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,i=e.split("\n"),s=[];let o;for(let t=0;t<i.length;t+=2){let e=null;(o=n.exec(i[t]))?e={url:o[2],func:o[3],args:[],line:+o[1],column:null}:(o=r.exec(i[t]))&&(e={url:o[6],func:o[3]||o[4],args:o[5]?o[5].split(","):[],line:+o[1],column:+o[2]}),e&&(!e.func&&e.line&&(e.func=Qt),s.push(e))}if(!s.length)return null;return{message:oe(t),name:t.name,stack:s}}(t))return se(e,n)}catch(t){}try{if(e=function(t){if(!t||!t.stack)return null;const e=[],n=t.stack.split("\n");let r,i,s,o;for(let c=0;c<n.length;++c){if(s=Yt.exec(n[c])){const t=s[2]&&0===s[2].indexOf("native");(r=s[2]&&0===s[2].indexOf("eval"))&&(i=ne.exec(s[2]))&&(s[2]=i[1],s[3]=i[2],s[4]=i[3]),o={url:s[2]&&0===s[2].indexOf("address at ")?s[2].substr("address at ".length):s[2],func:s[1]||Qt,args:t?[s[2]]:[],line:s[3]?+s[3]:null,column:s[4]?+s[4]:null}}else if(s=te.exec(n[c]))o={url:s[2],func:s[1]||Qt,args:[],line:+s[3],column:s[4]?+s[4]:null};else{if(!(s=Zt.exec(n[c])))continue;(r=s[3]&&s[3].indexOf(" > eval")>-1)&&(i=ee.exec(s[3]))?(s[1]=s[1]||"eval",s[3]=i[1],s[4]=i[2],s[5]=""):0!==c||s[5]||void 0===t.columnNumber||(e[0].column=t.columnNumber+1),o={url:s[3],func:s[1]||Qt,args:s[2]?s[2].split(","):[],line:s[4]?+s[4]:null,column:s[5]?+s[5]:null}}!o.func&&o.line&&(o.func=Qt),e.push(o)}if(!e.length)return null;return{message:oe(t),name:t.name,stack:e}}(t))return se(e,n)}catch(t){}return{message:oe(t),name:t&&t.name,stack:[],failed:!0}}function se(t,e){try{return Object.assign(Object.assign({},t),{stack:t.stack.slice(e)})}catch(e){return t}}function oe(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}const ce=50;function ue(t){const e=he(t.stack),n={type:t.name,value:t.message};return e&&e.length&&(n.stacktrace={frames:e}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function ae(t){return{exception:{values:[ue(t)]}}}function he(t){if(!t||!t.length)return[];let e=t;const n=e[0].func||"",r=e[e.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1)),-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.slice(0,ce).map(t=>({colno:null===t.column?void 0:t.column,filename:t.url||e[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line})).reverse()}function le(e,n,r){const i=de(n,r&&r.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return P(i,{handled:!0,type:"generic"}),i.level=t.Severity.Error,r&&r.event_id&&(i.event_id=r.event_id),et.resolve(i)}function fe(e,n,r=t.Severity.Info,i){const s=pe(n,i&&i.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return s.level=r,i&&i.event_id&&(s.event_id=i.event_id),et.resolve(s)}function de(t,e,n={}){let r;if(s(t)&&t.error){return r=ae(ie(t=t.error))}if(o(t)||(c=t,"[object DOMException]"===Object.prototype.toString.call(c))){const i=t,s=i.name||(o(i)?"DOMError":"DOMException"),c=i.message?`${s}: ${i.message}`:s;return H(r=pe(c,e,n),c),r}var c;if(i(t))return r=ae(ie(t));if(a(t)||h(t)){return P(r=function(t,e,n){const r={exception:{values:[{type:h(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:`Non-Error ${n?"promise rejection":"exception"} captured with keys: ${N(t)}`}]},extra:{__serialized__:D(t)}};if(e){const t=he(ie(e).stack);r.stacktrace={frames:t}}return r}(t,e,n.rejection),{synthetic:!0}),r}return H(r=pe(t,e,n),`${t}`,void 0),P(r,{synthetic:!0}),r}function pe(t,e,n={}){const r={message:t};if(n.attachStacktrace&&e){const t=he(ie(e).stack);r.stacktrace={frames:t}}return r}class be{constructor(t){this.options=t,this.k=new nt(30),this.St=new Ft(this.options.dsn),this.url=this.St.getStoreEndpointWithUrlEncodedAuth()}sendEvent(t){throw new y("Transport Class has to implement `sendEvent` method")}close(t){return this.k.drain(t)}}const ve=U();class ye extends be{constructor(){super(...arguments),this.kt=new Date(Date.now())}sendEvent(e){if(new Date(Date.now())<this.kt)return Promise.reject({event:e,reason:`Transport locked till ${this.kt} due to too many requests.`,status:429});const n=Xt(e,this.St),r={body:n.body,method:"POST",referrerPolicy:st()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this.k.add(new et((e,i)=>{ve.fetch(n.url,r).then(n=>{const r=t.Status.fromHttpCode(n.status);if(r!==t.Status.Success){if(r===t.Status.RateLimit){const t=Date.now(),e=n.headers.get("Retry-After");this.kt=new Date(t+K(t,e)),Z.warn(`Too many requests, backing off till: ${this.kt}`)}i(n)}else e({status:r})}).catch(i)}))}}class me extends be{constructor(){super(...arguments),this.kt=new Date(Date.now())}sendEvent(e){if(new Date(Date.now())<this.kt)return Promise.reject({event:e,reason:`Transport locked till ${this.kt} due to too many requests.`,status:429});const n=Xt(e,this.St);return this.k.add(new et((e,r)=>{const i=new XMLHttpRequest;i.onreadystatechange=(()=>{if(4!==i.readyState)return;const n=t.Status.fromHttpCode(i.status);if(n!==t.Status.Success){if(n===t.Status.RateLimit){const t=Date.now(),e=i.getResponseHeader("Retry-After");this.kt=new Date(t+K(t,e)),Z.warn(`Too many requests, backing off till: ${this.kt}`)}r(i)}else e({status:n})}),i.open("POST",n.url);for(const t in this.options.headers)this.options.headers.hasOwnProperty(t)&&i.setRequestHeader(t,this.options.headers[t]);i.send(n.body)}))}}var ge=Object.freeze({__proto__:null,BaseTransport:be,FetchTransport:ye,XHRTransport:me});class je extends Wt{eventFromException(t,e){return le(this.it,t,e)}eventFromMessage(e,n=t.Severity.Info,r){return fe(this.it,e,n,r)}yt(){if(!this.it.dsn)return super.yt();const t=Object.assign(Object.assign({},this.it.transportOptions),{dsn:this.it.dsn});return this.it.transport?new this.it.transport(t):rt()?new ye(t):new me(t)}}let Ee=0;function Oe(){return Ee>0}function we(t,e={},n){if("function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(e){return t}const sentryWrapped=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map(t=>we(t,e));return t.handleEvent?t.handleEvent.apply(this,i):t.apply(this,i)}catch(t){throw Ee+=1,setTimeout(()=>{Ee-=1}),Ut(n=>{n.addEventProcessor(t=>{const n=Object.assign({},t);return e.mechanism&&(H(n,void 0,void 0),P(n,e.mechanism)),n.extra=Object.assign(Object.assign({},n.extra),{arguments:r}),n}),captureException(t)}),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(sentryWrapped[e]=t[e])}catch(t){}t.prototype=t.prototype||{},sentryWrapped.prototype=t.prototype,Object.defineProperty(t,"__sentry_wrapped__",{enumerable:!1,value:sentryWrapped}),Object.defineProperties(sentryWrapped,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:t}});try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function $e(t={}){if(!t.eventId)return void Z.error("Missing eventId option in showReportDialog call");if(!t.dsn)return void Z.error("Missing dsn option in showReportDialog call");const e=document.createElement("script");e.async=!0,e.src=new Ft(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad),(document.head||document.body).appendChild(e)}class _e{constructor(t){this.name=_e.id,this.Tt=!1,this.Dt=!1,this.it=Object.assign({onerror:!0,onunhandledrejection:!0},t)}setupOnce(){Error.stackTraceLimit=50,this.it.onerror&&(Z.log("Global Handler attached: onerror"),this.Rt()),this.it.onunhandledrejection&&(Z.log("Global Handler attached: onunhandledrejection"),this.It())}Rt(){this.Tt||(ht({callback:t=>{const e=t.error,n=It(),r=n.getIntegration(_e),i=e&&!0===e.__sentry_own_request__;if(!r||Oe()||i)return;const s=n.getClient(),o=u(e)?this.Ct(t.msg,t.url,t.line,t.column):this.Nt(de(e,void 0,{attachStacktrace:s&&s.getOptions().attachStacktrace,rejection:!1}),t.url,t.line,t.column);P(o,{handled:!1,type:"onerror"}),n.captureEvent(o,{originalException:e})},type:"error"}),this.Tt=!0)}It(){this.Dt||(ht({callback:e=>{let n=e;try{"reason"in e?n=e.reason:"detail"in e&&"reason"in e.detail&&(n=e.detail.reason)}catch(t){}const r=It(),i=r.getIntegration(_e),s=n&&!0===n.__sentry_own_request__;if(!i||Oe()||s)return!0;const o=r.getClient(),c=u(n)?this.Mt(n):de(n,void 0,{attachStacktrace:o&&o.getOptions().attachStacktrace,rejection:!0});c.level=t.Severity.Error,P(c,{handled:!1,type:"onunhandledrejection"}),r.captureEvent(c,{originalException:n})},type:"unhandledrejection"}),this.Dt=!0)}Ct(t,e,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o,u=s(t)?t.message:t;if(c(u)){const t=u.match(i);t&&(o=t[1],u=t[2])}const a={exception:{values:[{type:o||"Error",value:u}]}};return this.Nt(a,e,n,r)}Mt(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${t}`}]}}}Nt(t,e,n,r){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].stacktrace=t.exception.values[0].stacktrace||{},t.exception.values[0].stacktrace.frames=t.exception.values[0].stacktrace.frames||[];const i=isNaN(parseInt(r,10))?void 0:r,s=isNaN(parseInt(n,10))?void 0:n,o=c(e)&&e.length>0?e:function(){try{return document.location.href}catch(t){return""}}();return 0===t.exception.values[0].stacktrace.frames.length&&t.exception.values[0].stacktrace.frames.push({colno:i,filename:o,function:"?",in_app:!0,lineno:s}),t}}_e.id="GlobalHandlers";const xe=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Se{constructor(t){this.name=Se.id,this.it=Object.assign({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}setupOnce(){const t=U();if(this.it.setTimeout&&S(t,"setTimeout",this.At.bind(this)),this.it.setInterval&&S(t,"setInterval",this.At.bind(this)),this.it.requestAnimationFrame&&S(t,"requestAnimationFrame",this.Ut.bind(this)),this.it.XMLHttpRequest&&"XMLHttpRequest"in t&&S(XMLHttpRequest.prototype,"send",this.Lt.bind(this)),this.it.eventTarget){(Array.isArray(this.it.eventTarget)?this.it.eventTarget:xe).forEach(this.Ft.bind(this))}}At(t){return function(...e){const n=e[0];return e[0]=we(n,{mechanism:{data:{function:w(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}Ut(t){return function(e){return t.call(this,we(e,{mechanism:{data:{function:"requestAnimationFrame",handler:w(t)},handled:!0,type:"instrument"}}))}}Ft(t){const e=U(),n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(S(n,"addEventListener",function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=we(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:w(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.call(this,n,we(r,{mechanism:{data:{function:"addEventListener",handler:w(r),target:t},handled:!0,type:"instrument"}}),i)}}),S(n,"removeEventListener",function(t){return function(e,n,r){try{t.call(this,e,n.__sentry_wrapped__,r)}catch(t){}return t.call(this,e,n,r)}}))}Lt(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&S(n,t,function(e){const n={mechanism:{data:{function:t,handler:w(e)},handled:!0,type:"instrument"}};return e.__sentry_original__&&(n.mechanism.data.handler=w(e.__sentry_original__)),we(e,n)})}),t.apply(this,e)}}}Se.id="TryCatch";class ke{constructor(t){this.name=ke.id,this.it=Object.assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}addSentryBreadcrumb(t){this.it.sentry&&It().addBreadcrumb({category:`sentry.${"transaction"===t.type?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:q(t)},{event:t})}setupOnce(){this.it.console&&ht({callback:(...t)=>{this.qt(...t)},type:"console"}),this.it.dom&&ht({callback:(...t)=>{this.Bt(...t)},type:"dom"}),this.it.xhr&&ht({callback:(...t)=>{this.Ht(...t)},type:"xhr"}),this.it.fetch&&ht({callback:(...t)=>{this.Pt(...t)},type:"fetch"}),this.it.history&&ht({callback:(...t)=>{this.Wt(...t)},type:"history"})}qt(e){const n={category:"console",data:{arguments:e.args,logger:"console"},level:t.Severity.fromString(e.level),message:_(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${_(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}It().addBreadcrumb(n,{input:e.args,level:e.level})}Bt(t){let e;try{e=t.event.target?p(t.event.target):p(t.event)}catch(t){e="<unknown>"}0!==e.length&&It().addBreadcrumb({category:`ui.${t.name}`,message:e},{event:t.event,name:t.name})}Ht(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;const{method:e,url:n,status_code:r,body:i}=t.xhr.__sentry_xhr__||{};It().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:i})}else;}Pt(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?It().addBreadcrumb({category:"fetch",data:e.fetchData,level:t.Severity.Error,type:"http"},{data:e.error,input:e.args}):It().addBreadcrumb({category:"fetch",data:Object.assign(Object.assign({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}Wt(t){const e=U();let n=t.from,r=t.to;const i=F(e.location.href);let s=F(n);const o=F(r);s.path||(s=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),It().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}}ke.id="Breadcrumbs";const Te="cause",De=5;class Re{constructor(t={}){this.name=Re.id,this.Xt=t.key||Te,this.S=t.limit||De}setupOnce(){_t((t,e)=>{const n=It().getIntegration(Re);return n?n.Gt(t,e):t})}Gt(t,e){if(!(t.exception&&t.exception.values&&e&&d(e.originalException,Error)))return t;const n=this.zt(e.originalException,this.Xt);return t.exception.values=[...n,...t.exception.values],t}zt(t,e,n=[]){if(!d(t[e],Error)||n.length+1>=this.S)return n;const r=ue(ie(t[e]));return this.zt(t[e],e,[r,...n])}}Re.id="LinkedErrors";const Ie=U();class Ce{constructor(){this.name=Ce.id}setupOnce(){_t(t=>{var e,n,r;if(It().getIntegration(Ce)){if(!Ie.navigator&&!Ie.location&&!Ie.document)return t;const i=(null===(e=t.request)||void 0===e?void 0:e.url)||(null===(n=Ie.location)||void 0===n?void 0:n.href),{referrer:s}=Ie.document||{},{userAgent:o}=Ie.navigator||{},c=Object.assign(Object.assign(Object.assign({},null===(r=t.request)||void 0===r?void 0:r.headers),s&&{Referer:s}),o&&{"User-Agent":o}),u=Object.assign(Object.assign({},i&&{url:i}),{headers:c});return Object.assign(Object.assign({},t),{request:u})}return t})}}Ce.id="UserAgent";var Ne=Object.freeze({__proto__:null,GlobalHandlers:_e,TryCatch:Se,Breadcrumbs:ke,LinkedErrors:Re,UserAgent:Ce});const Me="sentry.javascript.browser",Ae="5.24.2";class Ue extends Ht{constructor(t={}){super(je,t)}showReportDialog(t={}){U().document&&(this.at()?$e(Object.assign(Object.assign({},t),{dsn:t.dsn||this.getDsn()})):Z.error("Trying to call showReportDialog with Sentry Client disabled"))}ht(t,e,n){return t.platform=t.platform||"javascript",t.sdk=Object.assign(Object.assign({},t.sdk),{name:Me,packages:[...t.sdk&&t.sdk.packages||[],{name:"npm:@sentry/browser",version:Ae}],version:Ae}),super.ht(t,e,n)}pt(t){const e=this.getIntegration(ke);e&&e.addSentryBreadcrumb(t),super.pt(t)}}const Le=[new Vt,new zt,new Se,new ke,new _e,new Re,new Ce];let Fe={};const qe=U();qe.Sentry&&qe.Sentry.Integrations&&(Fe=qe.Sentry.Integrations);const Be=Object.assign(Object.assign(Object.assign({},Fe),Kt),Ne);return t.BrowserClient=Ue,t.Hub=Tt,t.Integrations=Be,t.SDK_NAME=Me,t.SDK_VERSION=Ae,t.Scope=wt,t.Transports=ge,t.addBreadcrumb=function(t){At("addBreadcrumb",t)},t.addGlobalEventProcessor=_t,t.captureEvent=function(t){return At("captureEvent",t)},t.captureException=captureException,t.captureMessage=function(t,e){let n;try{throw new Error(t)}catch(t){n=t}const r="string"!=typeof e?{captureContext:e}:void 0;return At("captureMessage",t,"string"==typeof e?e:void 0,Object.assign({originalException:t,syntheticException:n},r))},t.close=function(t){const e=It().getClient();return e?e.close(t):et.reject(!1)},t.configureScope=function(t){At("configureScope",t)},t.defaultIntegrations=Le,t.eventFromException=le,t.eventFromMessage=fe,t.flush=function(t){const e=It().getClient();return e?e.flush(t):et.reject(!1)},t.forceLoad=function(){},t.getCurrentHub=It,t.getHubFromCarrier=Nt,t.init=function(t={}){if(void 0===t.defaultIntegrations&&(t.defaultIntegrations=Le),void 0===t.release){const e=U();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}!function(t,e){!0===e.debug&&Z.enable();const n=It(),r=new t(e);n.bindClient(r)}(Ue,t)},t.injectReportDialog=$e,t.lastEventId=function(){return It().lastEventId()},t.makeMain=Rt,t.onLoad=function(t){t()},t.setContext=function(t,e){At("setContext",t,e)},t.setExtra=function(t,e){At("setExtra",t,e)},t.setExtras=function(t){At("setExtras",t)},t.setTag=function(t,e){At("setTag",t,e)},t.setTags=function(t){At("setTags",t)},t.setUser=function(t){At("setUser",t)},t.showReportDialog=function(t={}){t.eventId||(t.eventId=It().lastEventId());const e=It().getClient();e&&e.showReportDialog(t)},t.startTransaction=function(t,e){return At("startTransaction",Object.assign({},t),e)},t.withScope=Ut,t.wrap=function(t){return we(t)()},t}({});
1
+ /*! @sentry/browser 5.25.0 (bca2c59) | https://github.com/getsentry/sentry-javascript */
2
+ var Sentry=function(t){var e,n,r;function i(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return d(t,Error)}}function s(t){return"[object ErrorEvent]"===Object.prototype.toString.call(t)}function o(t){return"[object DOMError]"===Object.prototype.toString.call(t)}function c(t){return"[object String]"===Object.prototype.toString.call(t)}function u(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function a(t){return"[object Object]"===Object.prototype.toString.call(t)}function h(t){return"undefined"!=typeof Event&&d(t,Event)}function l(t){return"undefined"!=typeof Element&&d(t,Element)}function f(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function d(t,e){try{return t instanceof e}catch(t){return!1}}function p(t){try{let e=t;const n=5,r=80,i=[];let s=0,o=0;const c=" > ",u=c.length;let a;for(;e&&s++<n&&!("html"===(a=b(e))||s>1&&o+i.length*u+a.length>=r);)i.push(a),o+=a.length,e=e.parentNode;return i.reverse().join(c)}catch(t){return"<unknown>"}}function b(t){const e=t,n=[];let r,i,s,o,u;if(!e||!e.tagName)return"";if(n.push(e.tagName.toLowerCase()),e.id&&n.push(`#${e.id}`),(r=e.className)&&c(r))for(i=r.split(/\s+/),u=0;u<i.length;u++)n.push(`.${i[u]}`);const a=["type","name","title","alt"];for(u=0;u<a.length;u++)s=a[u],(o=e.getAttribute(s))&&n.push(`[${s}="${o}"]`);return n.join("")}!function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Debug=2]="Debug",t[t.Verbose=3]="Verbose"}(e||(e={})),(n=t.Severity||(t.Severity={})).Fatal="fatal",n.Error="error",n.Warning="warning",n.Log="log",n.Info="info",n.Debug="debug",n.Critical="critical",function(t){t.fromString=function(e){switch(e){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}}(t.Severity||(t.Severity={})),(r=t.Status||(t.Status={})).Unknown="unknown",r.Skipped="skipped",r.Success="success",r.RateLimit="rate_limit",r.Invalid="invalid",r.Failed="failed",function(t){t.fromHttpCode=function(e){return e>=200&&e<300?t.Success:429===e?t.RateLimit:e>=400&&e<500?t.Invalid:e>=500?t.Failed:t.Unknown}}(t.Status||(t.Status={}));const v=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(const n in e)t.hasOwnProperty(n)||(t[n]=e[n]);return t});class y extends Error{constructor(t){super(t),this.message=t,this.name=new.target.prototype.constructor.name,v(this,new.target.prototype)}}const m=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,g="Invalid Dsn";class j{constructor(t){"string"==typeof t?this.t(t):this.i(t),this.s()}toString(t=!1){const{host:e,path:n,pass:r,port:i,projectId:s,protocol:o,user:c}=this;return`${o}://${c}${t&&r?`:${r}`:""}`+`@${e}${i?`:${i}`:""}/${n?`${n}/`:n}${s}`}t(t){const e=m.exec(t);if(!e)throw new y(g);const[n,r,i="",s,o="",c]=e.slice(1);let u="",a=c;const h=a.split("/");if(h.length>1&&(u=h.slice(0,-1).join("/"),a=h.pop()),a){const t=a.match(/^\d+/);t&&(a=t[0])}this.i({host:s,pass:i,path:u,projectId:a,port:o,protocol:n,user:r})}i(t){this.protocol=t.protocol,this.user=t.user,this.pass=t.pass||"",this.host=t.host,this.port=t.port||"",this.path=t.path||"",this.projectId=t.projectId}s(){if(["protocol","user","host","projectId"].forEach(t=>{if(!this[t])throw new y(`${g}: ${t} missing`)}),!this.projectId.match(/^\d+$/))throw new y(`${g}: Invalid projectId ${this.projectId}`);if("http"!==this.protocol&&"https"!==this.protocol)throw new y(`${g}: Invalid protocol ${this.protocol}`);if(this.port&&isNaN(parseInt(this.port,10)))throw new y(`${g}: Invalid port ${this.port}`)}}class w{constructor(){this.o="function"==typeof WeakSet,this.u=this.o?new WeakSet:[]}memoize(t){if(this.o)return!!this.u.has(t)||(this.u.add(t),!1);for(let e=0;e<this.u.length;e++){if(this.u[e]===t)return!0}return this.u.push(t),!1}unmemoize(t){if(this.o)this.u.delete(t);else for(let e=0;e<this.u.length;e++)if(this.u[e]===t){this.u.splice(e,1);break}}}const E="<anonymous>";function O(t){try{return t&&"function"==typeof t&&t.name||E}catch(t){return E}}function $(t,e=0){return"string"!=typeof t||0===e?t:t.length<=e?t:`${t.substr(0,e)}...`}function _(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;e<t.length;e++){const r=t[e];try{n.push(String(r))}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)}function x(t,e){return!!c(t)&&(n=e,"[object RegExp]"===Object.prototype.toString.call(n)?e.test(t):"string"==typeof e&&-1!==t.indexOf(e));var n}function S(t,e,n){if(!(e in t))return;const r=t[e],i=n(r);if("function"==typeof i)try{i.prototype=i.prototype||{},Object.defineProperties(i,{__sentry_original__:{enumerable:!1,value:r}})}catch(t){}t[e]=i}function k(t){if(i(t)){const e=t,n={message:e.message,name:e.name,stack:e.stack};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t]);return n}if(h(t)){const e=t,n={};n.type=e.type;try{n.target=l(e.target)?p(e.target):Object.prototype.toString.call(e.target)}catch(t){n.target="<unknown>"}try{n.currentTarget=l(e.currentTarget)?p(e.currentTarget):Object.prototype.toString.call(e.currentTarget)}catch(t){n.currentTarget="<unknown>"}"undefined"!=typeof CustomEvent&&d(t,CustomEvent)&&(n.detail=e.detail);for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e);return n}return t}function T(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function D(t,e=3,n=102400){const r=C(t,e);return T(r)>n?D(t,e-1,n):r}function R(t,e){return"domain"===e&&t&&"object"==typeof t&&t.h?"[Domain]":"domainEmitter"===e?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":a(n=t)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n?"[SyntheticEvent]":"number"==typeof t&&t!=t?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?`[Function: ${O(t)}]`:t;var n}function I(t,e,n=1/0,r=new w){if(0===n)return function(t){const e=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===e)return"[Object]";if("[object Array]"===e)return"[Array]";const n=R(t);return u(n)?n:e}(e);if(null!=e&&"function"==typeof e.toJSON)return e.toJSON();const i=R(e,t);if(u(i))return i;const s=k(e),o=Array.isArray(e)?[]:{};if(r.memoize(e))return"[Circular ~]";for(const t in s)Object.prototype.hasOwnProperty.call(s,t)&&(o[t]=I(t,s[t],n-1,r));return r.unmemoize(e),o}function C(t,e){try{return JSON.parse(JSON.stringify(t,(t,n)=>I(t,n,e)))}catch(t){return"**non-serializable**"}}function M(t,e=40){const n=Object.keys(k(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return $(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:$(r,e)}return""}function N(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}const A={};function U(){return N()?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:A}function L(){const t=U(),e=t.crypto||t.msCrypto;if(void 0!==e&&e.getRandomValues){const t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const n=t=>{let e=t.toString(16);for(;e.length<4;)e=`0${e}`;return e};return n(t[0])+n(t[1])+n(t[2])+n(t[3])+n(t[4])+n(t[5])+n(t[6])+n(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{const e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)})}function F(t){if(!t)return{};const e=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function q(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){const e=t.exception.values[0];return e.type&&e.value?`${e.type}: ${e.value}`:e.type||e.value||t.event_id||"<unknown>"}return t.event_id||"<unknown>"}function B(t){const e=U();if(!("console"in e))return t();const n=e.console,r={};["debug","info","warn","error","log","assert"].forEach(t=>{t in e.console&&n[t].__sentry_original__&&(r[t]=n[t],n[t]=n[t].__sentry_original__)});const i=t();return Object.keys(r).forEach(t=>{n[t]=r[t]}),i}function H(t,e,n){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||e||"",t.exception.values[0].type=t.exception.values[0].type||n||"Error"}function P(t,e={}){try{t.exception.values[0].mechanism=t.exception.values[0].mechanism||{},Object.keys(e).forEach(n=>{t.exception.values[0].mechanism[n]=e[n]})}catch(t){}}const W=6e4;function X(t,e){if(!e)return W;const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?W:r-t}const G=U(),z="Sentry Logger ";G.__SENTRY__=G.__SENTRY__||{};const J=G.__SENTRY__.logger||(G.__SENTRY__.logger=new class{constructor(){this.l=!1}disable(){this.l=!1}enable(){this.l=!0}log(...t){this.l&&B(()=>{G.console.log(`${z}[Log]: ${t.join(" ")}`)})}warn(...t){this.l&&B(()=>{G.console.warn(`${z}[Warn]: ${t.join(" ")}`)})}error(...t){this.l&&B(()=>{G.console.error(`${z}[Error]: ${t.join(" ")}`)})}});function V(){if(!("fetch"in U()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function K(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function Q(){if(!V())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}const Y=U(),Z={},tt={};function et(t){if(!tt[t])switch(tt[t]=!0,t){case"console":!function(){if(!("console"in Y))return;["debug","info","warn","error","log","assert"].forEach(function(t){t in Y.console&&S(Y.console,t,function(e){return function(...n){rt("console",{args:n,level:t}),e&&Function.prototype.apply.call(e,Y.console,n)}})})}();break;case"dom":!function(){if(!("document"in Y))return;Y.document.addEventListener("click",lt("click",rt.bind(null,"dom")),!1),Y.document.addEventListener("keypress",ft(rt.bind(null,"dom")),!1),["EventTarget","Node"].forEach(t=>{const e=Y[t]&&Y[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(S(e,"addEventListener",function(t){return function(e,n,r){return n&&n.handleEvent?("click"===e&&S(n,"handleEvent",function(t){return function(e){return lt("click",rt.bind(null,"dom"))(e),t.call(this,e)}}),"keypress"===e&&S(n,"handleEvent",function(t){return function(e){return ft(rt.bind(null,"dom"))(e),t.call(this,e)}})):("click"===e&&lt("click",rt.bind(null,"dom"),!0)(this),"keypress"===e&&ft(rt.bind(null,"dom"))(this)),t.call(this,e,n,r)}}),S(e,"removeEventListener",function(t){return function(e,n,r){try{t.call(this,e,n.__sentry_wrapped__,r)}catch(t){}return t.call(this,e,n,r)}}))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in Y))return;const t=[],e=[],n=XMLHttpRequest.prototype;S(n,"open",function(n){return function(...r){const i=this,s=r[1];i.__sentry_xhr__={method:c(r[0])?r[0].toUpperCase():r[0],url:r[1]},c(s)&&"POST"===i.__sentry_xhr__.method&&s.match(/sentry_key/)&&(i.__sentry_own_request__=!0);const o=function(){if(4===i.readyState){try{i.__sentry_xhr__&&(i.__sentry_xhr__.status_code=i.status)}catch(t){}try{const n=t.indexOf(i);if(-1!==n){t.splice(n);const r=e.splice(n)[0];i.__sentry_xhr__&&void 0!==r[0]&&(i.__sentry_xhr__.body=r[0])}}catch(t){}rt("xhr",{args:r,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:i})}};return"onreadystatechange"in i&&"function"==typeof i.onreadystatechange?S(i,"onreadystatechange",function(t){return function(...e){return o(),t.apply(i,e)}}):i.addEventListener("readystatechange",o),n.apply(i,r)}}),S(n,"send",function(n){return function(...r){return t.push(this),e.push(r),rt("xhr",{args:r,startTimestamp:Date.now(),xhr:this}),n.apply(this,r)}})}();break;case"fetch":!function(){if(!function(){if(!V())return!1;const t=U();if(K(t.fetch))return!0;let e=!1;const n=t.document;if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t),t.contentWindow&&t.contentWindow.fetch&&(e=K(t.contentWindow.fetch)),n.head.removeChild(t)}catch(t){J.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return e}())return;S(Y,"fetch",function(t){return function(...e){const n={args:e,fetchData:{method:it(e),url:st(e)},startTimestamp:Date.now()};return rt("fetch",Object.assign({},n)),t.apply(Y,e).then(t=>(rt("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),response:t})),t),t=>{throw rt("fetch",Object.assign(Object.assign({},n),{endTimestamp:Date.now(),error:t})),t})}})}();break;case"history":!function(){if(!function(){const t=U(),e=t.chrome,n=e&&e.app&&e.app.runtime,r="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!n&&r}())return;const t=Y.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=ot,e=String(n);ot=e,rt("history",{from:t,to:e})}return t.apply(this,e)}}Y.onpopstate=function(...e){const n=Y.location.href,r=ot;if(ot=n,rt("history",{from:r,to:n}),t)return t.apply(this,e)},S(Y.history,"pushState",e),S(Y.history,"replaceState",e)}();break;case"error":dt=Y.onerror,Y.onerror=function(t,e,n,r,i){return rt("error",{column:r,error:i,line:n,msg:t,url:e}),!!dt&&dt.apply(this,arguments)};break;case"unhandledrejection":pt=Y.onunhandledrejection,Y.onunhandledrejection=function(t){return rt("unhandledrejection",t),!pt||pt.apply(this,arguments)};break;default:J.warn("unknown instrumentation type:",t)}}function nt(t){t&&"string"==typeof t.type&&"function"==typeof t.callback&&(Z[t.type]=Z[t.type]||[],Z[t.type].push(t.callback),et(t.type))}function rt(t,e){if(t&&Z[t])for(const n of Z[t]||[])try{n(e)}catch(e){J.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${O(n)}\nError: ${e}`)}}function it(t=[]){return"Request"in Y&&d(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function st(t=[]){return"string"==typeof t[0]?t[0]:"Request"in Y&&d(t[0],Request)?t[0].url:String(t[0])}let ot;const ct=1e3;let ut,at,ht=0;function lt(t,e,n=!1){return r=>{ut=void 0,r&&at!==r&&(at=r,ht&&clearTimeout(ht),n?ht=setTimeout(()=>{e({event:r,name:t})}):e({event:r,name:t}))}}function ft(t){return e=>{let n;try{n=e.target}catch(t){return}const r=n&&n.tagName;r&&("INPUT"===r||"TEXTAREA"===r||n.isContentEditable)&&(ut||lt("input",t)(e),clearTimeout(ut),ut=setTimeout(()=>{ut=void 0},ct))}}let dt=null;let pt=null;var bt;!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(bt||(bt={}));class vt{constructor(t){this.p=bt.PENDING,this.v=[],this.m=(t=>{this.g(bt.RESOLVED,t)}),this.j=(t=>{this.g(bt.REJECTED,t)}),this.g=((t,e)=>{this.p===bt.PENDING&&(f(e)?e.then(this.m,this.j):(this.p=t,this.O=e,this.$()))}),this._=(t=>{this.v=this.v.concat(t),this.$()}),this.$=(()=>{if(this.p===bt.PENDING)return;const t=this.v.slice();this.v=[],t.forEach(t=>{t.done||(this.p===bt.RESOLVED&&t.onfulfilled&&t.onfulfilled(this.O),this.p===bt.REJECTED&&t.onrejected&&t.onrejected(this.O),t.done=!0)})});try{t(this.m,this.j)}catch(t){this.j(t)}}static resolve(t){return new vt(e=>{e(t)})}static reject(t){return new vt((e,n)=>{n(t)})}static all(t){return new vt((e,n)=>{if(!Array.isArray(t))return void n(new TypeError("Promise.all requires an array as input."));if(0===t.length)return void e([]);let r=t.length;const i=[];t.forEach((t,s)=>{vt.resolve(t).then(t=>{i[s]=t,0===(r-=1)&&e(i)}).then(null,n)})})}then(t,e){return new vt((n,r)=>{this._({done:!1,onfulfilled:e=>{if(t)try{return void n(t(e))}catch(t){return void r(t)}else n(e)},onrejected:t=>{if(e)try{return void n(e(t))}catch(t){return void r(t)}else r(t)}})})}catch(t){return this.then(t=>t,t)}finally(t){return new vt((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}toString(){return"[object SyncPromise]"}}class yt{constructor(t){this.S=t,this.k=[]}isReady(){return void 0===this.S||this.length()<this.S}add(t){return this.isReady()?(-1===this.k.indexOf(t)&&this.k.push(t),t.then(()=>this.remove(t)).then(null,()=>this.remove(t).then(null,()=>{})),t):vt.reject(new y("Not adding Promise due to buffer limit reached."))}remove(t){return this.k.splice(this.k.indexOf(t),1)[0]}length(){return this.k.length}drain(t){return new vt(e=>{const n=setTimeout(()=>{t&&t>0&&e(!1)},t);vt.all(this.k).then(()=>{clearTimeout(n),e(!0)}).then(null,()=>{e(!0)})})}}const mt={nowSeconds:()=>Date.now()/1e3};const gt=N()?function(){try{return(t=module,e="perf_hooks",t.require(e)).performance}catch(t){return}var t,e}():function(){const{performance:t}=U();if(t&&t.now)return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),jt=void 0===gt?mt:{nowSeconds:()=>(gt.timeOrigin+gt.now())/1e3},wt=mt.nowSeconds.bind(mt);jt.nowSeconds.bind(jt),(()=>{const{performance:t}=U();if(t)t.timeOrigin?t.timeOrigin:t.timing&&t.timing.navigationStart||Date.now()})();class Et{constructor(){this.T=!1,this.D=[],this.R=[],this.I=[],this.C={},this.M={},this.N={},this.A={}}static clone(t){const e=new Et;return t&&(e.I=[...t.I],e.M=Object.assign({},t.M),e.N=Object.assign({},t.N),e.A=Object.assign({},t.A),e.C=t.C,e.U=t.U,e.L=t.L,e.F=t.F,e.q=t.q,e.R=[...t.R]),e}addScopeListener(t){this.D.push(t)}addEventProcessor(t){return this.R.push(t),this}setUser(t){return this.C=t||{},this.B(),this}setTags(t){return this.M=Object.assign(Object.assign({},this.M),t),this.B(),this}setTag(t,e){return this.M=Object.assign(Object.assign({},this.M),{[t]:e}),this.B(),this}setExtras(t){return this.N=Object.assign(Object.assign({},this.N),t),this.B(),this}setExtra(t,e){return this.N=Object.assign(Object.assign({},this.N),{[t]:e}),this.B(),this}setFingerprint(t){return this.q=t,this.B(),this}setLevel(t){return this.U=t,this.B(),this}setTransactionName(t){return this.F=t,this.B(),this}setTransaction(t){return this.setTransactionName(t)}setContext(t,e){return null===e?delete this.A[t]:this.A=Object.assign(Object.assign({},this.A),{[t]:e}),this.B(),this}setSpan(t){return this.L=t,this.B(),this}getSpan(){return this.L}getTransaction(){var t,e,n,r;const i=this.getSpan();return(null===(t=i)||void 0===t?void 0:t.transaction)?null===(e=i)||void 0===e?void 0:e.transaction:(null===(r=null===(n=i)||void 0===n?void 0:n.spanRecorder)||void 0===r?void 0:r.spans[0])?i.spanRecorder.spans[0]:void 0}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof Et?e:this}return t instanceof Et?(this.M=Object.assign(Object.assign({},this.M),t.M),this.N=Object.assign(Object.assign({},this.N),t.N),this.A=Object.assign(Object.assign({},this.A),t.A),t.C&&(this.C=t.C),t.U&&(this.U=t.U),t.q&&(this.q=t.q)):a(t)&&(t=t,this.M=Object.assign(Object.assign({},this.M),t.tags),this.N=Object.assign(Object.assign({},this.N),t.extra),this.A=Object.assign(Object.assign({},this.A),t.contexts),t.user&&(this.C=t.user),t.level&&(this.U=t.level),t.fingerprint&&(this.q=t.fingerprint)),this}clear(){return this.I=[],this.M={},this.N={},this.C={},this.A={},this.U=void 0,this.F=void 0,this.q=void 0,this.L=void 0,this.B(),this}addBreadcrumb(t,e){const n=Object.assign({timestamp:wt()},t);return this.I=void 0!==e&&e>=0?[...this.I,n].slice(-e):[...this.I,n],this.B(),this}clearBreadcrumbs(){return this.I=[],this.B(),this}applyToEvent(t,e){return this.N&&Object.keys(this.N).length&&(t.extra=Object.assign(Object.assign({},this.N),t.extra)),this.M&&Object.keys(this.M).length&&(t.tags=Object.assign(Object.assign({},this.M),t.tags)),this.C&&Object.keys(this.C).length&&(t.user=Object.assign(Object.assign({},this.C),t.user)),this.A&&Object.keys(this.A).length&&(t.contexts=Object.assign(Object.assign({},this.A),t.contexts)),this.U&&(t.level=this.U),this.F&&(t.transaction=this.F),this.L&&(t.contexts=Object.assign({trace:this.L.getTraceContext()},t.contexts)),this.H(t),t.breadcrumbs=[...t.breadcrumbs||[],...this.I],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,this.P([...Ot(),...this.R],t,e)}P(t,e,n,r=0){return new vt((i,s)=>{const o=t[r];if(null===e||"function"!=typeof o)i(e);else{const c=o(Object.assign({},e),n);f(c)?c.then(e=>this.P(t,e,n,r+1).then(i)).then(null,s):this.P(t,c,n,r+1).then(i).then(null,s)}})}B(){this.T||(this.T=!0,setTimeout(()=>{this.D.forEach(t=>{t(this)}),this.T=!1}))}H(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this.q&&(t.fingerprint=t.fingerprint.concat(this.q)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function Ot(){const t=U();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function $t(t){Ot().push(t)}const _t=3,xt=100,St=100;class kt{constructor(t,e=new Et,n=_t){this.W=n,this.X=[],this.X.push({client:t,scope:e}),this.bindClient(t)}isOlderThan(t){return this.W<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=this.getStack(),e=t.length>0?t[t.length-1].scope:void 0,n=Et.clone(e);return this.getStack().push({client:this.getClient(),scope:n}),n}popScope(){return void 0!==this.getStack().pop()}withScope(t){const e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this.X}getStackTop(){return this.X[this.X.length-1]}captureException(t,e){const n=this.G=L();let r=e;if(!e){let e;try{throw new Error("Sentry syntheticException")}catch(t){e=t}r={originalException:t,syntheticException:e}}return this.J("captureException",t,Object.assign(Object.assign({},r),{event_id:n})),n}captureMessage(t,e,n){const r=this.G=L();let i=n;if(!n){let e;try{throw new Error(t)}catch(t){e=t}i={originalException:t,syntheticException:e}}return this.J("captureMessage",t,e,Object.assign(Object.assign({},i),{event_id:r})),r}captureEvent(t,e){const n=this.G=L();return this.J("captureEvent",t,Object.assign(Object.assign({},e),{event_id:n})),n}lastEventId(){return this.G}addBreadcrumb(t,e){const n=this.getStackTop();if(!n.scope||!n.client)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:i=xt}=n.client.getOptions&&n.client.getOptions()||{};if(i<=0)return;const s=wt(),o=Object.assign({timestamp:s},t),c=r?B(()=>r(o,e)):o;null!==c&&n.scope.addBreadcrumb(c,Math.min(i,St))}setUser(t){const e=this.getStackTop();e.scope&&e.scope.setUser(t)}setTags(t){const e=this.getStackTop();e.scope&&e.scope.setTags(t)}setExtras(t){const e=this.getStackTop();e.scope&&e.scope.setExtras(t)}setTag(t,e){const n=this.getStackTop();n.scope&&n.scope.setTag(t,e)}setExtra(t,e){const n=this.getStackTop();n.scope&&n.scope.setExtra(t,e)}setContext(t,e){const n=this.getStackTop();n.scope&&n.scope.setContext(t,e)}configureScope(t){const e=this.getStackTop();e.scope&&e.client&&t(e.scope)}run(t){const e=Dt(this);try{t(this)}finally{Dt(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return J.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startSpan(t){return this.V("startSpan",t)}startTransaction(t,e){return this.V("startTransaction",t,e)}traceHeaders(){return this.V("traceHeaders")}J(t,...e){const n=this.getStackTop();n&&n.client&&n.client[t]&&n.client[t](...e,n.scope)}V(t,...e){const n=Tt().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);J.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function Tt(){const t=U();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function Dt(t){const e=Tt(),n=Ct(e);return Mt(e,t),n}function Rt(){const t=Tt();return It(t)&&!Ct(t).isOlderThan(_t)||Mt(t,new kt),N()?function(t){try{const e=function(){const t=Tt().__SENTRY__;return t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active}();if(!e)return Ct(t);if(!It(e)||Ct(e).isOlderThan(_t)){const n=Ct(t).getStackTop();Mt(e,new kt(n.client,Et.clone(n.scope)))}return Ct(e)}catch(e){return Ct(t)}}(t):Ct(t)}function It(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function Ct(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub?t.__SENTRY__.hub:(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new kt,t.__SENTRY__.hub)}function Mt(t,e){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0)}function Nt(t,...e){const n=Rt();if(n&&n[t])return n[t](...e);throw new Error(`No hub defined or ${t} was not found on the hub, please open a bug report.`)}function captureException(t,e){let n;try{throw new Error("Sentry syntheticException")}catch(t){n=t}return Nt("captureException",t,{captureContext:e,originalException:t,syntheticException:n})}function At(t){Nt("withScope",t)}const Ut="7";class Lt{constructor(t){this.dsn=t,this.K=new j(t)}getDsn(){return this.K}getBaseApiEndpoint(){const t=this.K,e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}getStoreEndpoint(){return this.Y("store")}getStoreEndpointWithUrlEncodedAuth(){return`${this.getStoreEndpoint()}?${this.Z()}`}getEnvelopeEndpointWithUrlEncodedAuth(){return`${this.tt()}?${this.Z()}`}getStoreEndpointPath(){const t=this.K;return`${t.path?`/${t.path}`:""}/api/${t.projectId}/store/`}getRequestHeaders(t,e){const n=this.K,r=[`Sentry sentry_version=${Ut}`];return r.push(`sentry_client=${t}/${e}`),r.push(`sentry_key=${n.user}`),n.pass&&r.push(`sentry_secret=${n.pass}`),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}}getReportDialogEndpoint(t={}){const e=this.K,n=`${this.getBaseApiEndpoint()}embed/error-page/`,r=[];r.push(`dsn=${e.toString()}`);for(const e in t)if("user"===e){if(!t.user)continue;t.user.name&&r.push(`name=${encodeURIComponent(t.user.name)}`),t.user.email&&r.push(`email=${encodeURIComponent(t.user.email)}`)}else r.push(`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`);return r.length?`${n}?${r.join("&")}`:n}tt(){return this.Y("envelope")}Y(t){return`${this.getBaseApiEndpoint()}${this.K.projectId}/${t}/`}Z(){const t={sentry_key:this.K.user,sentry_version:Ut};return e=t,Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&");var e}}const Ft=[];function qt(t){const e={};return function(t){const e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations;let r=[];if(Array.isArray(n)){const t=n.map(t=>t.name),i=[];e.forEach(e=>{-1===t.indexOf(e.name)&&-1===i.indexOf(e.name)&&(r.push(e),i.push(e.name))}),n.forEach(t=>{-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))})}else"function"==typeof n?(r=n(e),r=Array.isArray(r)?r:[r]):r=[...e];const i=r.map(t=>t.name);return-1!==i.indexOf("Debug")&&r.push(...r.splice(i.indexOf("Debug"),1)),r}(t).forEach(t=>{e[t.name]=t,function(t){-1===Ft.indexOf(t.name)&&(t.setupOnce($t,Rt),Ft.push(t.name),J.log(`Integration installed: ${t.name}`))}(t)}),e}class Bt{constructor(t,e){this.et={},this.nt=!1,this.rt=new t(e),this.it=e,e.dsn&&(this.st=new j(e.dsn))}captureException(t,e,n){let r=e&&e.event_id;return this.nt=!0,this.ot().eventFromException(t,e).then(t=>{r=this.captureEvent(t,e,n)}),r}captureMessage(t,e,n,r){let i=n&&n.event_id;return this.nt=!0,(u(t)?this.ot().eventFromMessage(`${t}`,e,n):this.ot().eventFromException(t,n)).then(t=>{i=this.captureEvent(t,n,r)}),i}captureEvent(t,e,n){let r=e&&e.event_id;return this.nt=!0,this.ct(t,e,n).then(t=>{r=t&&t.event_id,this.nt=!1}).then(null,t=>{J.error(t),this.nt=!1}),r}getDsn(){return this.st}getOptions(){return this.it}flush(t){return this.ut(t).then(e=>(clearInterval(e.interval),this.ot().getTransport().close(t).then(t=>e.ready&&t)))}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,t))}setupIntegrations(){this.at()&&(this.et=qt(this.it))}getIntegration(t){try{return this.et[t.id]||null}catch(e){return J.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}ut(t){return new vt(e=>{let n=0;let r=0;clearInterval(r),r=setInterval(()=>{this.nt?(n+=1,t&&n>=t&&e({interval:r,ready:!1})):e({interval:r,ready:!0})},1)})}ot(){return this.rt}at(){return!1!==this.getOptions().enabled&&void 0!==this.st}ht(t,e,n){const{normalizeDepth:r=3}=this.getOptions(),i=Object.assign(Object.assign({},t),{event_id:t.event_id||(n&&n.event_id?n.event_id:L()),timestamp:t.timestamp||wt()});this.lt(i),this.ft(i);let s=e;n&&n.captureContext&&(s=Et.clone(s).update(n.captureContext));let o=vt.resolve(i);return s&&(o=s.applyToEvent(i,n)),o.then(t=>"number"==typeof r&&r>0?this.dt(t,r):t)}dt(t,e){if(!t)return null;const n=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>Object.assign(Object.assign({},t),t.data&&{data:C(t.data,e)}))}),t.user&&{user:C(t.user,e)}),t.contexts&&{contexts:C(t.contexts,e)}),t.extra&&{extra:C(t.extra,e)});return t.contexts&&t.contexts.trace&&(n.contexts.trace=t.contexts.trace),n}lt(t){const{environment:e,release:n,dist:r,maxValueLength:i=250}=this.getOptions();void 0===t.environment&&void 0!==e&&(t.environment=e),void 0===t.release&&void 0!==n&&(t.release=n),void 0===t.dist&&void 0!==r&&(t.dist=r),t.message&&(t.message=$(t.message,i));const s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=$(s.value,i));const o=t.request;o&&o.url&&(o.url=$(o.url,i))}ft(t){const e=t.sdk,n=Object.keys(this.et);e&&n.length>0&&(e.integrations=n)}pt(t){this.ot().sendEvent(t)}ct(t,e,n){const{beforeSend:r,sampleRate:i}=this.getOptions();if(!this.at())return vt.reject("SDK not enabled, will not send event.");const s="transaction"===t.type;return!s&&"number"==typeof i&&Math.random()>i?vt.reject("This event has been sampled, will not send event."):new vt((i,o)=>{this.ht(t,n,e).then(t=>{if(null===t)return void o("An event processor returned null, will not send event.");let n=t;if(e&&e.data&&!0===e.data.__sentry__||!r||s)return this.pt(n),void i(n);const c=r(t,e);if(void 0===c)J.error("`beforeSend` method has to return `null` or a valid event.");else if(f(c))this.bt(c,i,o);else{if(null===(n=c))return J.log("`beforeSend` returned `null`, will not send event."),void i(null);this.pt(n),i(n)}}).then(null,t=>{this.captureException(t,{data:{__sentry__:!0},originalException:t}),o(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})})}bt(t,e,n){t.then(t=>{null!==t?(this.pt(t),e(t)):n("`beforeSend` returned `null`, will not send event.")}).then(null,t=>{n(`beforeSend rejected with ${t}`)})}}class Ht{sendEvent(e){return vt.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:t.Status.Skipped})}close(t){return vt.resolve(!0)}}class Pt{constructor(t){this.it=t,this.it.dsn||J.warn("No DSN provided, backend will not do anything."),this.vt=this.yt()}eventFromException(t,e){throw new y("Backend has to implement `eventFromException` method")}eventFromMessage(t,e,n){throw new y("Backend has to implement `eventFromMessage` method")}sendEvent(t){this.vt.sendEvent(t).then(null,t=>{J.error(`Error while sending event: ${t}`)})}getTransport(){return this.vt}yt(){return new Ht}}function Wt(t,e){const n="transaction"===t.type,r={body:JSON.stringify(t),url:n?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(n){const e=`${JSON.stringify({event_id:t.event_id,sent_at:(new Date).toISOString()})}\n${JSON.stringify({type:t.type})}\n${r.body}`;r.body=e}return r}let Xt;class Gt{constructor(){this.name=Gt.id}setupOnce(){Xt=Function.prototype.toString,Function.prototype.toString=function(...t){const e=this.__sentry_original__||this;return Xt.apply(e,t)}}}Gt.id="FunctionToString";const zt=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class Jt{constructor(t={}){this.it=t,this.name=Jt.id}setupOnce(){$t(t=>{const e=Rt();if(!e)return t;const n=e.getIntegration(Jt);if(n){const r=e.getClient(),i=r?r.getOptions():{},s=n.gt(i);if(n.jt(t,s))return null}return t})}jt(t,e){return this.wt(t,e)?(J.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${q(t)}`),!0):this.Et(t,e)?(J.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${q(t)}`),!0):this.Ot(t,e)?(J.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${q(t)}.\nUrl: ${this.$t(t)}`),!0):!this._t(t,e)&&(J.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${q(t)}.\nUrl: ${this.$t(t)}`),!0)}wt(t,e){if(!e.ignoreInternal)return!1;try{return t&&t.exception&&t.exception.values&&t.exception.values[0]&&"SentryError"===t.exception.values[0].type||!1}catch(t){return!1}}Et(t,e){return!(!e.ignoreErrors||!e.ignoreErrors.length)&&this.xt(t).some(t=>e.ignoreErrors.some(e=>x(t,e)))}Ot(t,e){if(!e.denyUrls||!e.denyUrls.length)return!1;const n=this.$t(t);return!!n&&e.denyUrls.some(t=>x(n,t))}_t(t,e){if(!e.allowUrls||!e.allowUrls.length)return!0;const n=this.$t(t);return!n||e.allowUrls.some(t=>x(n,t))}gt(t={}){return{allowUrls:[...this.it.whitelistUrls||[],...this.it.allowUrls||[],...t.whitelistUrls||[],...t.allowUrls||[]],denyUrls:[...this.it.blacklistUrls||[],...this.it.denyUrls||[],...t.blacklistUrls||[],...t.denyUrls||[]],ignoreErrors:[...this.it.ignoreErrors||[],...t.ignoreErrors||[],...zt],ignoreInternal:void 0===this.it.ignoreInternal||this.it.ignoreInternal}}xt(t){if(t.message)return[t.message];if(t.exception)try{const{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch(e){return J.error(`Cannot extract message for event ${q(t)}`),[]}return[]}$t(t){try{if(t.stacktrace){const e=t.stacktrace.frames;return e&&e[e.length-1].filename||null}if(t.exception){const e=t.exception.values&&t.exception.values[0].stacktrace&&t.exception.values[0].stacktrace.frames;return e&&e[e.length-1].filename||null}return null}catch(e){return J.error(`Cannot extract url for event ${q(t)}`),null}}}Jt.id="InboundFilters";var Vt=Object.freeze({__proto__:null,FunctionToString:Gt,InboundFilters:Jt});const Kt="?",Qt=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Yt=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js))(?::(\d+))?(?::(\d+))?\s*$/i,Zt=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,te=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,ee=/\((\S*)(?::(\d+))(?::(\d+))\)/,ne=/Minified React error #\d+;/i;function re(t){let e=null,n=0;t&&("number"==typeof t.framesToPop?n=t.framesToPop:ne.test(t.message)&&(n=1));try{if(e=function(t){if(!t||!t.stacktrace)return null;const e=t.stacktrace,n=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,r=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\((.*)\))? in (.*):\s*$/i,i=e.split("\n"),s=[];let o;for(let t=0;t<i.length;t+=2){let e=null;(o=n.exec(i[t]))?e={url:o[2],func:o[3],args:[],line:+o[1],column:null}:(o=r.exec(i[t]))&&(e={url:o[6],func:o[3]||o[4],args:o[5]?o[5].split(","):[],line:+o[1],column:+o[2]}),e&&(!e.func&&e.line&&(e.func=Kt),s.push(e))}if(!s.length)return null;return{message:se(t),name:t.name,stack:s}}(t))return ie(e,n)}catch(t){}try{if(e=function(t){if(!t||!t.stack)return null;const e=[],n=t.stack.split("\n");let r,i,s,o;for(let c=0;c<n.length;++c){if(s=Qt.exec(n[c])){const t=s[2]&&0===s[2].indexOf("native");(r=s[2]&&0===s[2].indexOf("eval"))&&(i=ee.exec(s[2]))&&(s[2]=i[1],s[3]=i[2],s[4]=i[3]),o={url:s[2]&&0===s[2].indexOf("address at ")?s[2].substr("address at ".length):s[2],func:s[1]||Kt,args:t?[s[2]]:[],line:s[3]?+s[3]:null,column:s[4]?+s[4]:null}}else if(s=Zt.exec(n[c]))o={url:s[2],func:s[1]||Kt,args:[],line:+s[3],column:s[4]?+s[4]:null};else{if(!(s=Yt.exec(n[c])))continue;(r=s[3]&&s[3].indexOf(" > eval")>-1)&&(i=te.exec(s[3]))?(s[1]=s[1]||"eval",s[3]=i[1],s[4]=i[2],s[5]=""):0!==c||s[5]||void 0===t.columnNumber||(e[0].column=t.columnNumber+1),o={url:s[3],func:s[1]||Kt,args:s[2]?s[2].split(","):[],line:s[4]?+s[4]:null,column:s[5]?+s[5]:null}}!o.func&&o.line&&(o.func=Kt),e.push(o)}if(!e.length)return null;return{message:se(t),name:t.name,stack:e}}(t))return ie(e,n)}catch(t){}return{message:se(t),name:t&&t.name,stack:[],failed:!0}}function ie(t,e){try{return Object.assign(Object.assign({},t),{stack:t.stack.slice(e)})}catch(e){return t}}function se(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}const oe=50;function ce(t){const e=ae(t.stack),n={type:t.name,value:t.message};return e&&e.length&&(n.stacktrace={frames:e}),void 0===n.type&&""===n.value&&(n.value="Unrecoverable error caught"),n}function ue(t){return{exception:{values:[ce(t)]}}}function ae(t){if(!t||!t.length)return[];let e=t;const n=e[0].func||"",r=e[e.length-1].func||"";return-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1)),-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1)),e.slice(0,oe).map(t=>({colno:null===t.column?void 0:t.column,filename:t.url||e[0].url,function:t.func||"?",in_app:!0,lineno:null===t.line?void 0:t.line})).reverse()}function he(e,n,r){const i=fe(n,r&&r.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return P(i,{handled:!0,type:"generic"}),i.level=t.Severity.Error,r&&r.event_id&&(i.event_id=r.event_id),vt.resolve(i)}function le(e,n,r=t.Severity.Info,i){const s=de(n,i&&i.syntheticException||void 0,{attachStacktrace:e.attachStacktrace});return s.level=r,i&&i.event_id&&(s.event_id=i.event_id),vt.resolve(s)}function fe(t,e,n={}){let r;if(s(t)&&t.error){return r=ue(re(t=t.error))}if(o(t)||(c=t,"[object DOMException]"===Object.prototype.toString.call(c))){const i=t,s=i.name||(o(i)?"DOMError":"DOMException"),c=i.message?`${s}: ${i.message}`:s;return H(r=de(c,e,n),c),r}var c;if(i(t))return r=ue(re(t));if(a(t)||h(t)){return P(r=function(t,e,n){const r={exception:{values:[{type:h(t)?t.constructor.name:n?"UnhandledRejection":"Error",value:`Non-Error ${n?"promise rejection":"exception"} captured with keys: ${M(t)}`}]},extra:{__serialized__:D(t)}};if(e){const t=ae(re(e).stack);r.stacktrace={frames:t}}return r}(t,e,n.rejection),{synthetic:!0}),r}return H(r=de(t,e,n),`${t}`,void 0),P(r,{synthetic:!0}),r}function de(t,e,n={}){const r={message:t};if(n.attachStacktrace&&e){const t=ae(re(e).stack);r.stacktrace={frames:t}}return r}class pe{constructor(t){this.options=t,this.k=new yt(30),this.St=new Lt(this.options.dsn),this.url=this.St.getStoreEndpointWithUrlEncodedAuth()}sendEvent(t){throw new y("Transport Class has to implement `sendEvent` method")}close(t){return this.k.drain(t)}}const be=U();class ve extends pe{constructor(){super(...arguments),this.kt=new Date(Date.now())}sendEvent(e){if(new Date(Date.now())<this.kt)return Promise.reject({event:e,reason:`Transport locked till ${this.kt} due to too many requests.`,status:429});const n=Wt(e,this.St),r={body:n.body,method:"POST",referrerPolicy:Q()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this.k.add(new vt((e,i)=>{be.fetch(n.url,r).then(n=>{const r=t.Status.fromHttpCode(n.status);if(r!==t.Status.Success){if(r===t.Status.RateLimit){const t=Date.now(),e=n.headers.get("Retry-After");this.kt=new Date(t+X(t,e)),J.warn(`Too many requests, backing off till: ${this.kt}`)}i(n)}else e({status:r})}).catch(i)}))}}class ye extends pe{constructor(){super(...arguments),this.kt=new Date(Date.now())}sendEvent(e){if(new Date(Date.now())<this.kt)return Promise.reject({event:e,reason:`Transport locked till ${this.kt} due to too many requests.`,status:429});const n=Wt(e,this.St);return this.k.add(new vt((e,r)=>{const i=new XMLHttpRequest;i.onreadystatechange=(()=>{if(4!==i.readyState)return;const n=t.Status.fromHttpCode(i.status);if(n!==t.Status.Success){if(n===t.Status.RateLimit){const t=Date.now(),e=i.getResponseHeader("Retry-After");this.kt=new Date(t+X(t,e)),J.warn(`Too many requests, backing off till: ${this.kt}`)}r(i)}else e({status:n})}),i.open("POST",n.url);for(const t in this.options.headers)this.options.headers.hasOwnProperty(t)&&i.setRequestHeader(t,this.options.headers[t]);i.send(n.body)}))}}var me=Object.freeze({__proto__:null,BaseTransport:pe,FetchTransport:ve,XHRTransport:ye});class ge extends Pt{eventFromException(t,e){return he(this.it,t,e)}eventFromMessage(e,n=t.Severity.Info,r){return le(this.it,e,n,r)}yt(){if(!this.it.dsn)return super.yt();const t=Object.assign(Object.assign({},this.it.transportOptions),{dsn:this.it.dsn});return this.it.transport?new this.it.transport(t):V()?new ve(t):new ye(t)}}let je=0;function we(){return je>0}function Ee(t,e={},n){if("function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(e){return t}const sentryWrapped=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map(t=>Ee(t,e));return t.handleEvent?t.handleEvent.apply(this,i):t.apply(this,i)}catch(t){throw je+=1,setTimeout(()=>{je-=1}),At(n=>{n.addEventProcessor(t=>{const n=Object.assign({},t);return e.mechanism&&(H(n,void 0,void 0),P(n,e.mechanism)),n.extra=Object.assign(Object.assign({},n.extra),{arguments:r}),n}),captureException(t)}),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(sentryWrapped[e]=t[e])}catch(t){}t.prototype=t.prototype||{},sentryWrapped.prototype=t.prototype,Object.defineProperty(t,"__sentry_wrapped__",{enumerable:!1,value:sentryWrapped}),Object.defineProperties(sentryWrapped,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:t}});try{Object.getOwnPropertyDescriptor(sentryWrapped,"name").configurable&&Object.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function Oe(t={}){if(!t.eventId)return void J.error("Missing eventId option in showReportDialog call");if(!t.dsn)return void J.error("Missing dsn option in showReportDialog call");const e=document.createElement("script");e.async=!0,e.src=new Lt(t.dsn).getReportDialogEndpoint(t),t.onLoad&&(e.onload=t.onLoad),(document.head||document.body).appendChild(e)}class $e{constructor(t){this.name=$e.id,this.Tt=!1,this.Dt=!1,this.it=Object.assign({onerror:!0,onunhandledrejection:!0},t)}setupOnce(){Error.stackTraceLimit=50,this.it.onerror&&(J.log("Global Handler attached: onerror"),this.Rt()),this.it.onunhandledrejection&&(J.log("Global Handler attached: onunhandledrejection"),this.It())}Rt(){this.Tt||(nt({callback:t=>{const e=t.error,n=Rt(),r=n.getIntegration($e),i=e&&!0===e.__sentry_own_request__;if(!r||we()||i)return;const s=n.getClient(),o=u(e)?this.Ct(t.msg,t.url,t.line,t.column):this.Mt(fe(e,void 0,{attachStacktrace:s&&s.getOptions().attachStacktrace,rejection:!1}),t.url,t.line,t.column);P(o,{handled:!1,type:"onerror"}),n.captureEvent(o,{originalException:e})},type:"error"}),this.Tt=!0)}It(){this.Dt||(nt({callback:e=>{let n=e;try{"reason"in e?n=e.reason:"detail"in e&&"reason"in e.detail&&(n=e.detail.reason)}catch(t){}const r=Rt(),i=r.getIntegration($e),s=n&&!0===n.__sentry_own_request__;if(!i||we()||s)return!0;const o=r.getClient(),c=u(n)?this.Nt(n):fe(n,void 0,{attachStacktrace:o&&o.getOptions().attachStacktrace,rejection:!0});c.level=t.Severity.Error,P(c,{handled:!1,type:"onunhandledrejection"}),r.captureEvent(c,{originalException:n})},type:"unhandledrejection"}),this.Dt=!0)}Ct(t,e,n,r){const i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o,u=s(t)?t.message:t;if(c(u)){const t=u.match(i);t&&(o=t[1],u=t[2])}const a={exception:{values:[{type:o||"Error",value:u}]}};return this.Mt(a,e,n,r)}Nt(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${t}`}]}}}Mt(t,e,n,r){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].stacktrace=t.exception.values[0].stacktrace||{},t.exception.values[0].stacktrace.frames=t.exception.values[0].stacktrace.frames||[];const i=isNaN(parseInt(r,10))?void 0:r,s=isNaN(parseInt(n,10))?void 0:n,o=c(e)&&e.length>0?e:function(){try{return document.location.href}catch(t){return""}}();return 0===t.exception.values[0].stacktrace.frames.length&&t.exception.values[0].stacktrace.frames.push({colno:i,filename:o,function:"?",in_app:!0,lineno:s}),t}}$e.id="GlobalHandlers";const _e=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class xe{constructor(t){this.name=xe.id,this.it=Object.assign({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},t)}setupOnce(){const t=U();if(this.it.setTimeout&&S(t,"setTimeout",this.At.bind(this)),this.it.setInterval&&S(t,"setInterval",this.At.bind(this)),this.it.requestAnimationFrame&&S(t,"requestAnimationFrame",this.Ut.bind(this)),this.it.XMLHttpRequest&&"XMLHttpRequest"in t&&S(XMLHttpRequest.prototype,"send",this.Lt.bind(this)),this.it.eventTarget){(Array.isArray(this.it.eventTarget)?this.it.eventTarget:_e).forEach(this.Ft.bind(this))}}At(t){return function(...e){const n=e[0];return e[0]=Ee(n,{mechanism:{data:{function:O(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}Ut(t){return function(e){return t.call(this,Ee(e,{mechanism:{data:{function:"requestAnimationFrame",handler:O(t)},handled:!0,type:"instrument"}}))}}Ft(t){const e=U(),n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(S(n,"addEventListener",function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Ee(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:O(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.call(this,n,Ee(r,{mechanism:{data:{function:"addEventListener",handler:O(r),target:t},handled:!0,type:"instrument"}}),i)}}),S(n,"removeEventListener",function(t){return function(e,n,r){try{t.call(this,e,n.__sentry_wrapped__,r)}catch(t){}return t.call(this,e,n,r)}}))}Lt(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&S(n,t,function(e){const n={mechanism:{data:{function:t,handler:O(e)},handled:!0,type:"instrument"}};return e.__sentry_original__&&(n.mechanism.data.handler=O(e.__sentry_original__)),Ee(e,n)})}),t.apply(this,e)}}}xe.id="TryCatch";class Se{constructor(t){this.name=Se.id,this.it=Object.assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}addSentryBreadcrumb(t){this.it.sentry&&Rt().addBreadcrumb({category:`sentry.${"transaction"===t.type?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:q(t)},{event:t})}setupOnce(){this.it.console&&nt({callback:(...t)=>{this.qt(...t)},type:"console"}),this.it.dom&&nt({callback:(...t)=>{this.Bt(...t)},type:"dom"}),this.it.xhr&&nt({callback:(...t)=>{this.Ht(...t)},type:"xhr"}),this.it.fetch&&nt({callback:(...t)=>{this.Pt(...t)},type:"fetch"}),this.it.history&&nt({callback:(...t)=>{this.Wt(...t)},type:"history"})}qt(e){const n={category:"console",data:{arguments:e.args,logger:"console"},level:t.Severity.fromString(e.level),message:_(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;n.message=`Assertion failed: ${_(e.args.slice(1)," ")||"console.assert"}`,n.data.arguments=e.args.slice(1)}Rt().addBreadcrumb(n,{input:e.args,level:e.level})}Bt(t){let e;try{e=t.event.target?p(t.event.target):p(t.event)}catch(t){e="<unknown>"}0!==e.length&&Rt().addBreadcrumb({category:`ui.${t.name}`,message:e},{event:t.event,name:t.name})}Ht(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;const{method:e,url:n,status_code:r,body:i}=t.xhr.__sentry_xhr__||{};Rt().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:r},type:"http"},{xhr:t.xhr,input:i})}else;}Pt(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?Rt().addBreadcrumb({category:"fetch",data:e.fetchData,level:t.Severity.Error,type:"http"},{data:e.error,input:e.args}):Rt().addBreadcrumb({category:"fetch",data:Object.assign(Object.assign({},e.fetchData),{status_code:e.response.status}),type:"http"},{input:e.args,response:e.response})))}Wt(t){const e=U();let n=t.from,r=t.to;const i=F(e.location.href);let s=F(n);const o=F(r);s.path||(s=i),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),i.protocol===s.protocol&&i.host===s.host&&(n=s.relative),Rt().addBreadcrumb({category:"navigation",data:{from:n,to:r}})}}Se.id="Breadcrumbs";const ke="cause",Te=5;class De{constructor(t={}){this.name=De.id,this.Xt=t.key||ke,this.S=t.limit||Te}setupOnce(){$t((t,e)=>{const n=Rt().getIntegration(De);return n?n.Gt(t,e):t})}Gt(t,e){if(!(t.exception&&t.exception.values&&e&&d(e.originalException,Error)))return t;const n=this.zt(e.originalException,this.Xt);return t.exception.values=[...n,...t.exception.values],t}zt(t,e,n=[]){if(!d(t[e],Error)||n.length+1>=this.S)return n;const r=ce(re(t[e]));return this.zt(t[e],e,[r,...n])}}De.id="LinkedErrors";const Re=U();class Ie{constructor(){this.name=Ie.id}setupOnce(){$t(t=>{var e,n,r;if(Rt().getIntegration(Ie)){if(!Re.navigator&&!Re.location&&!Re.document)return t;const i=(null===(e=t.request)||void 0===e?void 0:e.url)||(null===(n=Re.location)||void 0===n?void 0:n.href),{referrer:s}=Re.document||{},{userAgent:o}=Re.navigator||{},c=Object.assign(Object.assign(Object.assign({},null===(r=t.request)||void 0===r?void 0:r.headers),s&&{Referer:s}),o&&{"User-Agent":o}),u=Object.assign(Object.assign({},i&&{url:i}),{headers:c});return Object.assign(Object.assign({},t),{request:u})}return t})}}Ie.id="UserAgent";var Ce=Object.freeze({__proto__:null,GlobalHandlers:$e,TryCatch:xe,Breadcrumbs:Se,LinkedErrors:De,UserAgent:Ie});const Me="sentry.javascript.browser",Ne="5.25.0";class Ae extends Bt{constructor(t={}){super(ge,t)}showReportDialog(t={}){U().document&&(this.at()?Oe(Object.assign(Object.assign({},t),{dsn:t.dsn||this.getDsn()})):J.error("Trying to call showReportDialog with Sentry Client disabled"))}ht(t,e,n){return t.platform=t.platform||"javascript",t.sdk=Object.assign(Object.assign({},t.sdk),{name:Me,packages:[...t.sdk&&t.sdk.packages||[],{name:"npm:@sentry/browser",version:Ne}],version:Ne}),super.ht(t,e,n)}pt(t){const e=this.getIntegration(Se);e&&e.addSentryBreadcrumb(t),super.pt(t)}}const Ue=[new Jt,new Gt,new xe,new Se,new $e,new De,new Ie];let Le={};const Fe=U();Fe.Sentry&&Fe.Sentry.Integrations&&(Le=Fe.Sentry.Integrations);const qe=Object.assign(Object.assign(Object.assign({},Le),Vt),Ce);return t.BrowserClient=Ae,t.Hub=kt,t.Integrations=qe,t.SDK_NAME=Me,t.SDK_VERSION=Ne,t.Scope=Et,t.Transports=me,t.addBreadcrumb=function(t){Nt("addBreadcrumb",t)},t.addGlobalEventProcessor=$t,t.captureEvent=function(t){return Nt("captureEvent",t)},t.captureException=captureException,t.captureMessage=function(t,e){let n;try{throw new Error(t)}catch(t){n=t}const r="string"!=typeof e?{captureContext:e}:void 0;return Nt("captureMessage",t,"string"==typeof e?e:void 0,Object.assign({originalException:t,syntheticException:n},r))},t.close=function(t){const e=Rt().getClient();return e?e.close(t):vt.reject(!1)},t.configureScope=function(t){Nt("configureScope",t)},t.defaultIntegrations=Ue,t.eventFromException=he,t.eventFromMessage=le,t.flush=function(t){const e=Rt().getClient();return e?e.flush(t):vt.reject(!1)},t.forceLoad=function(){},t.getCurrentHub=Rt,t.getHubFromCarrier=Ct,t.init=function(t={}){if(void 0===t.defaultIntegrations&&(t.defaultIntegrations=Ue),void 0===t.release){const e=U();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}!function(t,e){!0===e.debug&&J.enable();const n=Rt(),r=new t(e);n.bindClient(r)}(Ae,t)},t.injectReportDialog=Oe,t.lastEventId=function(){return Rt().lastEventId()},t.makeMain=Dt,t.onLoad=function(t){t()},t.setContext=function(t,e){Nt("setContext",t,e)},t.setExtra=function(t,e){Nt("setExtra",t,e)},t.setExtras=function(t){Nt("setExtras",t)},t.setTag=function(t,e){Nt("setTag",t,e)},t.setTags=function(t){Nt("setTags",t)},t.setUser=function(t){Nt("setUser",t)},t.showReportDialog=function(t={}){t.eventId||(t.eventId=Rt().lastEventId());const e=Rt().getClient();e&&e.showReportDialog(t)},t.startTransaction=function(t,e){return Nt("startTransaction",Object.assign({},t),e)},t.withScope=At,t.wrap=function(t){return Ee(t)()},t}({});
3
3
  //# sourceMappingURL=bundle.es6.min.js.map