Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Socket
Sign inDemoInstall

@sentry/browser

Package Overview
Dependencies
Maintainers
9
Versions
536
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/browser - npm Package Compare versions

Comparing version 5.0.3 to 5.0.5

4

build/bundle.es6.min.js

@@ -1,3 +0,3 @@

/*! @sentry/browser 5.0.3 (70ef0838) | https://github.com/getsentry/sentry-javascript */
var Sentry=function(t){"use strict";var n,e,r;function i(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return t instanceof 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 Boolean(t&&t.then&&"function"==typeof t.then)}!function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Debug=2]="Debug",t[t.Verbose=3]="Verbose"}(n||(n={})),(e=t.Severity||(t.Severity={})).Fatal="fatal",e.Error="error",e.Warning="warning",e.Log="log",e.Info="info",e.Debug="debug",e.Critical="critical",function(t){t.fromString=function(n){switch(n){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(n){return n>=200&&n<300?t.Success:429===n?t.RateLimit:n>=400&&n<500?t.Invalid:n>=500?t.Failed:t.Unknown}}(t.Status||(t.Status={}));const l={};function f(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:l}function d(){const t=f(),n=t.crypto||t.msCrypto;if(void 0!==n&&n.getRandomValues){const t=new Uint16Array(8);n.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=t=>{let n=t.toString(16);for(;n.length<4;)n=`0${n}`;return n};return e(t[0])+e(t[1])+e(t[2])+e(t[3])+e(t[4])+e(t[5])+e(t[6])+e(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=16*Math.random()|0;return("x"===t?n:3&n|8).toString(16)})}function p(t){const n=[];let e,r,i,s,o;if(!t||!t.tagName)return"";if(n.push(t.tagName.toLowerCase()),t.id&&n.push(`#${t.id}`),(e=t.className)&&c(e))for(r=e.split(/\s+/),o=0;o<r.length;o++)n.push(`.${r[o]}`);const u=["type","name","title","alt"];for(o=0;o<u.length;o++)i=u[o],(s=t.getAttribute(i))&&n.push(`[${i}="${s}"]`);return n.join("")}function v(t){if(!t)return{};const n=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!n)return{};const e=n[6]||"",r=n[8]||"";return{host:n[4],path:n[5],protocol:n[2],relative:n[5]+e+r}}function m(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){const n=t.exception.values[0];return n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||t.event_id||"<unknown>"}return t.event_id||"<unknown>"}function y(t){const n=f();if(!("console"in n))return t();const e=n.console,r={};["debug","info","warn","error","log"].forEach(t=>{t in n.console&&e[t].__sentry__&&(r[t]=e[t].__sentry_wrapped__,e[t]=e[t].__sentry_original__)});const i=t();return Object.keys(r).forEach(t=>{e[t]=r[t]}),i}function b(t,n,e,r={handled:!0,type:"generic"}){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||n||"",t.exception.values[0].type=t.exception.values[0].type||e||"Error",t.exception.values[0].mechanism=t.exception.values[0].mechanism||r}class g{constructor(){this.t="function"==typeof WeakSet,this.i=this.t?new WeakSet:[]}memoize(t){if(this.t)return!!this.i.has(t)||(this.i.add(t),!1);for(let n=0;n<this.i.length;n++){if(this.i[n]===t)return!0}return this.i.push(t),!1}unmemoize(t){if(this.t)this.i.delete(t);else for(let n=0;n<this.i.length;n++)if(this.i[n]===t){this.i.splice(n,1);break}}}function w(t,n,e){if(!(n in t)||t[n].__sentry__)return;const r=t[n],i=e(r);"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:r},__sentry_wrapped__:{enumerable:!1,value:i}})),t[n]=i}function E(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function $(t,n=3,e=102400){const r=O(t,n);return E(r)>e?$(t,n-1,e):r}function _(t,n){return"domain"===n&&"object"==typeof t&&t.s?"[Domain]":"domainEmitter"===n?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":"undefined"!=typeof Event&&t instanceof Event?Object.getPrototypeOf(t)?t.constructor.name:"Event":a(e=t)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e?"[SyntheticEvent]":Number.isNaN(t)?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?`[Function: ${t.name||"<unknown-function-name>"}]`:t;var e}function j(t,n,e=1/0,r=new g){if(0===e)return function(t){const n=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===n)return"[Object]";if("[object Array]"===n)return"[Array]";const e=_(t);return u(e)?e:n}(n);if(null!=n&&"function"==typeof n.toJSON)return n.toJSON();const s=_(n,t);if(u(s))return s;const o=i(n)?function(t){const n={message:t.message,name:t.name,stack:t.stack};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}(n):n,c=Array.isArray(n)?[]:{};if(r.memoize(n))return"[Circular ~]";for(const t in o)Object.prototype.hasOwnProperty.call(o,t)&&(c[t]=j(t,o[t],e-1,r));return r.unmemoize(n),c}function O(t,n){try{return JSON.parse(JSON.stringify(t,(t,e)=>j(t,e,n)))}catch(t){return"**non-serializable**"}}var x;!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(x||(x={}));class S{constructor(t){this.o=x.PENDING,this.u=[],this.h=(t=>{this.l(t,x.RESOLVED)}),this.p=(t=>{this.l(t,x.REJECTED)}),this.l=((t,n)=>{this.o===x.PENDING&&(h(t)?t.then(this.h,this.p):(this.v=t,this.o=n,this.m()))}),this.m=(()=>{this.o!==x.PENDING&&(this.o===x.REJECTED?this.u.forEach(t=>t.onFail&&t.onFail(this.v)):this.u.forEach(t=>t.onSuccess&&t.onSuccess(this.v)),this.u=[])}),this.g=(t=>{this.u=this.u.concat(t),this.m()});try{t(this.h,this.p)}catch(t){this.p(t)}}then(t,n){return new S((e,r)=>{this.g({onFail:t=>{if(n)try{return void e(n(t))}catch(t){return void r(t)}else r(t)},onSuccess:n=>{if(t)try{return void e(t(n))}catch(t){return void r(t)}else e(n)}})})}catch(t){return this.then(t=>t,t)}toString(){return"[object SyncPromise]"}static resolve(t){return new S(n=>{n(t)})}static reject(t){return new S((n,e)=>{e(t)})}}class k{constructor(){this.$=!1,this._=[],this.j=[],this.O=[],this.S={},this.k={},this.T={}}addScopeListener(t){this._.push(t)}addEventProcessor(t){return this.j.push(t),this}R(){this.$||(this.$=!0,setTimeout(()=>{this._.forEach(t=>{t(this)}),this.$=!1}))}F(t,n,e,r=0){return new S((i,s)=>{const o=t[r];if(null===n||"function"!=typeof o)i(n);else{const c=o(Object.assign({},n),e);h(c)?c.then(n=>this.F(t,n,e,r+1).then(i)).catch(s):this.F(t,c,e,r+1).then(i).catch(s)}})}setUser(t){return this.S=O(t),this.R(),this}setTags(t){return this.k=Object.assign({},this.k,O(t)),this.R(),this}setTag(t,n){return this.k=Object.assign({},this.k,{[t]:O(n)}),this.R(),this}setExtras(t){return this.T=Object.assign({},this.T,O(t)),this.R(),this}setExtra(t,n){return this.T=Object.assign({},this.T,{[t]:O(n)}),this.R(),this}setFingerprint(t){return this.D=O(t),this.R(),this}setLevel(t){return this.I=O(t),this.R(),this}static clone(t){const n=new k;return Object.assign(n,t,{_:[]}),t&&(n.O=[...t.O],n.k=Object.assign({},t.k),n.T=Object.assign({},t.T),n.S=t.S,n.I=t.I,n.D=t.D,n.j=[...t.j]),n}clear(){return this.O=[],this.k={},this.T={},this.S={},this.I=void 0,this.D=void 0,this.R(),this}addBreadcrumb(t,n){return this.O=void 0!==n&&n>=0?[...this.O,O(t)].slice(-n):[...this.O,O(t)],this.R(),this}clearBreadcrumbs(){return this.O=[],this.R(),this}M(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this.D&&(t.fingerprint=t.fingerprint.concat(this.D)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}applyToEvent(t,n){return this.T&&Object.keys(this.T).length&&(t.extra=Object.assign({},this.T,t.extra)),this.k&&Object.keys(this.k).length&&(t.tags=Object.assign({},this.k,t.tags)),this.S&&Object.keys(this.S).length&&(t.user=Object.assign({},this.S,t.user)),this.I&&(t.level=this.I),this.M(t),(!t.breadcrumbs||0===t.breadcrumbs.length)&&this.O.length>0&&(t.breadcrumbs=this.O),this.F([...T(),...this.j],t,n)}}function T(){const t=f();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function R(t){T().push(t)}const F=f(),D="Sentry Logger ";F.__SENTRY__=F.__SENTRY__||{};const I=F.__SENTRY__.logger||(F.__SENTRY__.logger=new class{constructor(){this.C=!1}disable(){this.C=!1}enable(){this.C=!0}log(...t){this.C&&y(()=>{F.console.log(`${D}[Log]: ${t.join(" ")}`)})}warn(...t){this.C&&y(()=>{F.console.warn(`${D}[Warn]: ${t.join(" ")}`)})}error(...t){this.C&&y(()=>{F.console.error(`${D}[Error]: ${t.join(" ")}`)})}}),M=3,C=30,U=100;class P{constructor(t,n=new k,e=M){this.U=e,this.P=[],this.P.push({client:t,scope:n})}A(t,...n){const e=this.getStackTop();e&&e.client&&e.client[t]&&e.client[t](...n,e.scope)}isOlderThan(t){return this.U<t}bindClient(t){this.getStackTop().client=t}pushScope(){const t=this.getStack(),n=t.length>0?t[t.length-1].scope:void 0,e=k.clone(n);return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return void 0!==this.getStack().pop()}withScope(t){const n=this.pushScope();try{t(n)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this.P}getStackTop(){return this.P[this.P.length-1]}captureException(t,n){const e=this.L=d();return this.A("captureException",t,Object.assign({},n,{event_id:e})),e}captureMessage(t,n,e){const r=this.L=d();return this.A("captureMessage",t,n,Object.assign({},e,{event_id:r})),r}captureEvent(t,n){const e=this.L=d();return this.A("captureEvent",t,Object.assign({},n,{event_id:e})),e}lastEventId(){return this.L}addBreadcrumb(t,n){const e=this.getStackTop();if(!e.scope||!e.client)return;const{beforeBreadcrumb:r,maxBreadcrumbs:i=C}=e.client.getOptions();if(i<=0)return;const s=(new Date).getTime()/1e3,o=Object.assign({timestamp:s},t),c=r?y(()=>r(o,n)):o;null!==c&&e.scope.addBreadcrumb(c,Math.min(i,U))}configureScope(t){const n=this.getStackTop();n.scope&&n.client&&t(n.scope)}run(t){const n=L(this);try{t(this)}finally{L(n)}}getIntegration(t){const n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch(n){return I.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}}function A(){const t=f();return t.__SENTRY__=t.__SENTRY__||{hub:void 0},t}function L(t){const n=A(),e=H(n);return q(n,t),e}function N(){const t=A();B(t)&&!H(t).isOlderThan(M)||q(t,new P);try{const r=(n=module,e="domain",n.require(e)).active;if(!r)return H(t);if(!B(r)||H(r).isOlderThan(M)){const n=H(t).getStackTop();q(r,new P(n.client,k.clone(n.scope)))}return H(r)}catch(n){return H(t)}var n,e}function B(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function H(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub?t.__SENTRY__.hub:(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new P,t.__SENTRY__.hub)}function q(t,n){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=n,!0)}function W(t,...n){const e=N();if(e&&e[t])return e[t](...n);throw new Error(`No hub defined or ${t} was not found on the hub, please open a bug report.`)}function captureException(t){let n;try{throw new Error("Sentry syntheticException")}catch(t){n=t}return W("captureException",t,{originalException:t,syntheticException:n})}function X(t){W("withScope",t)}class z extends Error{constructor(t){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype)}}const G=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w\.-]+)(?::(\d+))?\/(.+)/,J="Invalid Dsn";class V{constructor(t){"string"==typeof t?this.N(t):this.B(t),this.H()}toString(t=!1){const{host:n,path:e,pass:r,port:i,projectId:s,protocol:o,user:c}=this;return`${o}://${c}${t&&r?`:${r}`:""}`+`@${n}${i?`:${i}`:""}/${e?`${e}/`:e}${s}`}N(t){const n=G.exec(t);if(!n)throw new z(J);const[e,r,i="",s,o="",c]=n.slice(1);let u="",a=c;const h=a.split("/");h.length>1&&(u=h.slice(0,-1).join("/"),a=h.pop()),Object.assign(this,{host:s,pass:i,path:u,projectId:a,port:o,protocol:e,user:r})}B(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}H(){if(["protocol","user","host","projectId"].forEach(t=>{if(!this[t])throw new z(J)}),"http"!==this.protocol&&"https"!==this.protocol)throw new z(J);if(this.port&&Number.isNaN(parseInt(this.port,10)))throw new z(J)}}const K="7";class Z{constructor(t){this.dsn=t,this.q=new V(t)}getDsn(){return this.q}getStoreEndpoint(){return`${this.W()}${this.getStoreEndpointPath()}`}getStoreEndpointWithUrlEncodedAuth(){const t={sentry_key:this.q.user,sentry_version:K};return`${this.getStoreEndpoint()}?${n=t,Object.keys(n).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`).join("&")}`;var n}W(){const t=this.q,n=t.protocol?`${t.protocol}:`:"",e=t.port?`:${t.port}`:"";return`${n}//${t.host}${e}`}getStoreEndpointPath(){const t=this.q;return`${t.path?`/${t.path}`:""}/api/${t.projectId}/store/`}getRequestHeaders(t,n){const e=this.q,r=[`Sentry sentry_version=${K}`];return r.push(`sentry_timestamp=${(new Date).getTime()}`),r.push(`sentry_client=${t}/${n}`),r.push(`sentry_key=${e.user}`),e.pass&&r.push(`sentry_secret=${e.pass}`),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}}getReportDialogEndpoint(t={}){const n=this.q,e=`${this.W()}${n.path?`/${n.path}`:""}/api/embed/error-page/`,r=[];r.push(`dsn=${n.toString()}`);for(const n in t)if("user"===n){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(n)}=${encodeURIComponent(t[n])}`);return r.length?`${e}?${r.join("&")}`:e}}function Q(t,n,e,r){return new(e||(e=Promise))(function(i,s){function o(t){try{u(r.next(t))}catch(t){s(t)}}function c(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){t.done?i(t.value):new e(function(n){n(t.value)}).then(o,c)}u((r=r.apply(t,n||[])).next())})}function Y(t,n=0){return 0===n?t:t.length<=n?t:`${t.substr(0,n)}...`}function tt(t,n){if(!Array.isArray(t))return"";const e=[];for(let n=0;n<t.length;n++){const r=t[n];try{e.push(String(r))}catch(t){e.push("[value cannot be serialized]")}}return e.join(n)}function nt(t,n=40){if(!t.length)return"[object has no keys]";if(t[0].length>=n)return Y(t[0],n);for(let e=t.length;e>0;e--){const r=t.slice(0,e).join(", ");if(!(r.length>n))return e===t.length?r:Y(r,n)}return""}const et=[];function rt(t){const n={};return function(t){const n=t.defaultIntegrations&&[...t.defaultIntegrations]||[],e=t.integrations;let r=[];if(Array.isArray(e)){const t=e.map(t=>t.name),i=[];n.forEach(n=>{-1===t.indexOf(n.name)&&-1===i.indexOf(n.name)&&(r.push(n),i.push(n.name))}),e.forEach(t=>{-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))})}else{if("function"!=typeof e)return[...n];r=e(n),r=Array.isArray(r)?r:[r]}return r}(t).forEach(t=>{n[t.name]=t,function(t){-1===et.indexOf(t.name)&&(t.setupOnce(R,N),et.push(t.name),I.log(`Integration installed: ${t.name}`))}(t)}),n}class it{constructor(t,n){this.X=!1,this.G=new t(n),this.J=n,n.dsn&&(this.V=new V(n.dsn)),this.K=rt(this.J)}captureException(t,n,e){let r=n&&n.event_id;return this.X=!0,this.Z().eventFromException(t,n).then(t=>this.Y(t,n,e)).then(t=>{r=t&&t.event_id,this.X=!1}).catch(t=>{I.log(t),this.X=!1}),r}captureMessage(t,n,e,r){let i=e&&e.event_id;return this.X=!0,(u(t)?this.Z().eventFromMessage(`${t}`,n,e):this.Z().eventFromException(t,e)).then(t=>this.Y(t,e,r)).then(t=>{i=t&&t.event_id,this.X=!1}).catch(t=>{I.log(t),this.X=!1}),i}captureEvent(t,n,e){let r=n&&n.event_id;return this.X=!0,this.Y(t,n,e).then(t=>{r=t&&t.event_id,this.X=!1}).catch(t=>{I.log(t),this.X=!1}),r}getDsn(){return this.V}getOptions(){return this.J}flush(t){return Q(this,void 0,void 0,function*(){return(yield Promise.all([this.Z().getTransport().close(t),this.tt()])).reduce((t,n)=>t&&n)})}close(t){return Q(this,void 0,void 0,function*(){return this.flush(t).finally(()=>{this.getOptions().enabled=!1})})}getIntegrations(){return this.K||{}}getIntegration(t){try{return this.K[t.id]||null}catch(n){return I.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}tt(t=0){return Q(this,void 0,void 0,function*(){return new Promise(n=>{this.X?t>=10?n(!1):setTimeout(()=>Q(this,void 0,void 0,function*(){n(yield this.tt(t+1))}),10):n(!0)})})}Z(){return this.G}nt(){return!1!==this.getOptions().enabled&&void 0!==this.V}et(t,n,e){const{environment:r,release:i,dist:s,maxValueLength:o=250}=this.getOptions(),c=Object.assign({},t);void 0===c.environment&&void 0!==r&&(c.environment=r),void 0===c.release&&void 0!==i&&(c.release=i),void 0===c.dist&&void 0!==s&&(c.dist=s),c.message&&(c.message=Y(c.message,o));const u=c.exception&&c.exception.values&&c.exception.values[0];u&&u.value&&(u.value=Y(u.value,o));const a=c.request;a&&a.url&&(a.url=Y(a.url,o)),void 0===c.event_id&&(c.event_id=d()),this.rt(c.sdk);let h=S.resolve(c);return n&&(h=n.applyToEvent(c,e)),h}rt(t){const n=Object.keys(this.K);t&&n.length>0&&(t.integrations=n)}Y(t,n,e){const{beforeSend:r,sampleRate:i}=this.getOptions();return this.nt()?"number"==typeof i&&Math.random()>i?S.reject("This event has been sampled, will not send event."):new S((i,s)=>{this.et(t,e,n).then(t=>{if(null===t)return void s("An event processor returned null, will not send event.");let e=t;try{if(n&&n.data&&!0===n.data.__sentry__||!r)return this.Z().sendEvent(e),void i(e);const o=r(t,n);if(void 0===o)I.error("`beforeSend` method has to return `null` or a valid event.");else if(h(o))this.it(o,i,s);else{if(null===(e=o))return I.log("`beforeSend` returned `null`, will not send event."),void i(null);this.Z().sendEvent(e),i(e)}}catch(t){this.captureException(t,{data:{__sentry__:!0},originalException:t}),s("`beforeSend` throw an error, will not send event.")}})}):S.reject("SDK not enabled, will not send event.")}it(t,n,e){t.then(t=>{null!==t?(this.Z().sendEvent(t),n(t)):e("`beforeSend` returned `null`, will not send event.")}).catch(t=>{e(`beforeSend rejected with ${t}`)})}}class st{sendEvent(n){return Q(this,void 0,void 0,function*(){return Promise.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:t.Status.Skipped})})}close(t){return Q(this,void 0,void 0,function*(){return Promise.resolve(!0)})}}class ot{constructor(t){this.J=t,this.J.dsn||I.warn("No DSN provided, backend will not do anything."),this.st=this.ot()}ot(){return new st}eventFromException(t,n){throw new z("Backend has to implement `eventFromException` method")}eventFromMessage(t,n,e){throw new z("Backend has to implement `eventFromMessage` method")}sendEvent(t){this.st.sendEvent(t).catch(t=>{I.error(`Error while sending event: ${t}`)})}getTransport(){return this.st}}let ct;class ut{constructor(){this.name=ut.id}setupOnce(){ct=Function.prototype.toString,Function.prototype.toString=function(...t){const n=this.__sentry__?this.__sentry_original__:this;return ct.apply(n,t)}}}ut.id="FunctionToString";const at=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class ht{constructor(t={}){this.J=t,this.name=ht.id}setupOnce(){R(t=>{const n=N();if(!n)return t;const e=n.getIntegration(ht);if(e){const r=n.getClient(),i=r?r.getOptions():{},s=e.ct(i);if(e.ut(t,s))return null}return t})}ut(t,n){return this.at(t,n)?(I.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${m(t)}`),!0):this.ht(t,n)?(I.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${m(t)}`),!0):this.lt(t,n)?(I.warn(`Event dropped due to being matched by \`blacklistUrls\` option.\nEvent: ${m(t)}.\nUrl: ${this.ft(t)}`),!0):!this.dt(t,n)&&(I.warn(`Event dropped due to not being matched by \`whitelistUrls\` option.\nEvent: ${m(t)}.\nUrl: ${this.ft(t)}`),!0)}at(t,n={}){if(!n.ignoreInternal)return!1;try{return"SentryError"===t.exception.values[0].type}catch(t){return!1}}ht(t,n={}){return!(!n.ignoreErrors||!n.ignoreErrors.length)&&this.pt(t).some(t=>n.ignoreErrors.some(n=>this.vt(t,n)))}lt(t,n={}){if(!n.blacklistUrls||!n.blacklistUrls.length)return!1;const e=this.ft(t);return!!e&&n.blacklistUrls.some(t=>this.vt(e,t))}dt(t,n={}){if(!n.whitelistUrls||!n.whitelistUrls.length)return!0;const e=this.ft(t);return!e||n.whitelistUrls.some(t=>this.vt(e,t))}ct(t={}){return{blacklistUrls:[...this.J.blacklistUrls||[],...t.blacklistUrls||[]],ignoreErrors:[...this.J.ignoreErrors||[],...t.ignoreErrors||[],...at],ignoreInternal:void 0===this.J.ignoreInternal||this.J.ignoreInternal,whitelistUrls:[...this.J.whitelistUrls||[],...t.whitelistUrls||[]]}}vt(t,n){return e=n,"[object RegExp]"===Object.prototype.toString.call(e)?n.test(t):"string"==typeof n&&t.includes(n);var e}pt(t){if(t.message)return[t.message];if(t.exception)try{const{type:n,value:e}=t.exception.values[0];return[`${e}`,`${n}: ${e}`]}catch(n){return I.error(`Cannot extract message for event ${m(t)}`),[]}return[]}ft(t){try{if(t.stacktrace){const n=t.stacktrace.frames;return n[n.length-1].filename}if(t.exception){const n=t.exception.values[0].stacktrace.frames;return n[n.length-1].filename}return null}catch(n){return I.error(`Cannot extract url for event ${m(t)}`),null}}}ht.id="InboundFilters";var lt=Object.freeze({FunctionToString:ut,InboundFilters:ht});function ft(){if(!("fetch"in f()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function dt(){if(!ft())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}var pt=f(),vt={report:!1,collectWindowErrors:!1,computeStackTrace:!1,linesOfContext:!1},mt="?",yt=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function bt(t,n){return Object.prototype.hasOwnProperty.call(t,n)}function gt(){return"undefined"==typeof document||null==document.location?"":document.location.href}vt.report=function(){var t,n,e=[],r=null,o=null;function c(t,n,r){var i=null;if(!n||vt.collectWindowErrors){for(var s in e)if(bt(e,s))try{e[s](t,n,r)}catch(t){i=t}if(i)throw i}}function u(n,e,r,u,a){var l=null;if(a=s(a)?a.error:a,n=s(n)?n.message:n,o)vt.computeStackTrace.augmentStackTraceWithInitialElement(o,e,r,n),h();else if(a&&i(a))(l=vt.computeStackTrace(a)).mechanism="onerror",c(l,!0,a);else{var f,d={url:e,line:r,column:u},p=n;if("[object String]"==={}.toString.call(n)){var v=n.match(yt);v&&(f=v[1],p=v[2])}d.func=mt,d.context=null,c(l={name:f,message:p,mode:"onerror",mechanism:"onerror",stack:[Object.assign({},d,{url:d.url||gt()})]},!0,null)}return!!t&&t.apply(this,arguments)}function a(t){var n=t&&(t.detail?t.detail.reason:t.reason)||t,e=vt.computeStackTrace(n);e.mechanism="onunhandledrejection",c(e,!0,n)}function h(){var t=o,n=r;o=null,r=null,c(t,!1,n)}function l(t){if(o){if(r===t)return;h()}var n=vt.computeStackTrace(t);throw o=n,r=t,setTimeout(function(){r===t&&h()},n.incomplete?2e3:0),t}return l.subscribe=function(t){e.push(t)},l.installGlobalHandler=function(){!0!==n&&(t=pt.onerror,pt.onerror=u,n=!0)},l.installGlobalUnhandledRejectionHandler=function(){pt.onunhandledrejection=a},l}(),vt.computeStackTrace=function(){function t(t){if(!t.stack)return null;for(var n,e,r,i=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,o=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,c=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,u=/\((\S*)(?::(\d+))(?::(\d+))\)/,a=t.stack.split("\n"),h=[],l=/^(.*) is undefined$/.exec(t.message),f=0,d=a.length;f<d;++f){if(e=i.exec(a[f])){var p=e[2]&&0===e[2].indexOf("native");e[2]&&0===e[2].indexOf("eval")&&(n=u.exec(e[2]))&&(e[2]=n[1]),r={url:p?null:e[2],func:e[1]||mt,args:p?[e[2]]:[],line:e[3]?+e[3]:null,column:e[4]?+e[4]:null}}else if(e=o.exec(a[f]))r={url:e[2],func:e[1]||mt,args:[],line:+e[3],column:e[4]?+e[4]:null};else{if(!(e=s.exec(a[f])))continue;e[3]&&e[3].indexOf(" > eval")>-1&&(n=c.exec(e[3]))?e[3]=n[1]:0!==f||e[5]||void 0===t.columnNumber||(h[0].column=t.columnNumber+1),r={url:e[3],func:e[1]||mt,args:e[2]?e[2].split(","):[],line:e[4]?+e[4]:null,column:e[5]?+e[5]:null}}!r.func&&r.line&&(r.func=mt),r.context=null,h.push(r)}return h.length?(h[0]&&h[0].line&&!h[0].column&&l&&(h[0].column=null),{mode:"stack",name:t.name,message:t.message,stack:h}):null}function n(t,n,e,r){var i={url:n,line:e};if(i.url&&i.line){if(t.incomplete=!1,i.func||(i.func=mt),i.context||(i.context=null),/ '([^']+)' /.exec(r)&&(i.column=null),t.stack.length>0&&t.stack[0].url===i.url){if(t.stack[0].line===i.line)return!1;if(!t.stack[0].line&&t.stack[0].func===i.func)return t.stack[0].line=i.line,t.stack[0].context=i.context,!1}return t.stack.unshift(i),t.partial=!0,!0}return t.incomplete=!0,!1}function e(t,i){for(var s,o,c=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,u=[],a={},h=!1,l=e.caller;l&&!h;l=l.caller)if(l!==r&&l!==vt.report){if(o={url:null,func:mt,args:[],line:null,column:null},l.name?o.func=l.name:(s=c.exec(l.toString()))&&(o.func=s[1]),void 0===o.func)try{o.func=s.input.substring(0,s.input.indexOf("{"))}catch(t){}a[""+l]?h=!0:a[""+l]=!0,u.push(o)}i&&u.splice(0,i);var f={mode:"callers",name:t.name,message:t.message,stack:u};return n(f,t.sourceURL||t.fileName,t.line||t.lineNumber,t.message||t.description),f}function r(n,r){var i=null;r=null==r?0:+r;try{if(i=function(t){var n=t.stacktrace;if(n){for(var e,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,i=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,s=n.split("\n"),o=[],c=0;c<s.length;c+=2){var u=null;(e=r.exec(s[c]))?u={url:e[2],line:+e[1],column:null,func:e[3],args:[]}:(e=i.exec(s[c]))&&(u={url:e[6],line:+e[1],column:+e[2],func:e[3]||e[4],args:e[5]?e[5].split(","):[]}),u&&(!u.func&&u.line&&(u.func=mt),u.line&&(u.context=null),u.context||(u.context=[s[c+1]]),o.push(u))}return o.length?{mode:"stacktrace",name:t.name,message:t.message,stack:o}:null}}(n))return i}catch(t){}try{if(i=t(n))return i}catch(t){}try{if(i=function(t){var n=t.message.split("\n");if(n.length<4)return null;var e,r=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,i=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,s=/^\s*Line (\d+) of function script\s*$/i,o=[],c=pt&&pt.document&&pt.document.getElementsByTagName("script"),u=[];for(var a in c)bt(c,a)&&!c[a].src&&u.push(c[a]);for(var h=2;h<n.length;h+=2){var l=null;(e=r.exec(n[h]))?l={url:e[2],func:e[3],args:[],line:+e[1],column:null}:(e=i.exec(n[h]))?l={url:e[3],func:e[4],args:[],line:+e[1],column:null}:(e=s.exec(n[h]))&&(l={url:gt().replace(/#.*$/,""),func:"",args:[],line:e[1],column:null}),l&&(l.func||(l.func=mt),l.context=[n[h+1]],o.push(l))}return o.length?{mode:"multiline",name:t.name,message:n[0],stack:o}:null}(n))return i}catch(t){}try{if(i=e(n,r+1))return i}catch(t){}return{original:n,name:n.name,message:n.message,mode:"failed"}}return r.augmentStackTraceWithInitialElement=n,r.computeStackTraceFromStackProp=t,r}(),vt.collectWindowErrors=!0,vt.linesOfContext=11;const wt=vt.report.subscribe,Et=vt.report.installGlobalHandler,$t=vt.report.installGlobalUnhandledRejectionHandler,_t=vt.computeStackTrace,jt=50;function Ot(t){const n=St(t.stack),e={type:t.name,value:t.message};return n&&n.length&&(e.stacktrace={frames:n}),void 0===e.type&&""===e.value&&(e.value="Unrecoverable error caught"),e}function xt(t){return{exception:{values:[Ot(t)]}}}function St(t){if(!t||!t.length)return[];let n=t;const e=n[0].func||"",r=n[n.length-1].func||"";return(e.includes("captureMessage")||e.includes("captureException"))&&(n=n.slice(1)),r.includes("sentryWrapped")&&(n=n.slice(0,-1)),n.map(t=>({colno:t.column,filename:t.url||n[0].url,function:t.func||"?",in_app:!0,lineno:t.line})).slice(0,jt).reverse()}class kt{constructor(t){this.yt=t,this.bt=[]}isReady(){return void 0===this.yt||this.length()<this.yt}add(t){return Q(this,void 0,void 0,function*(){return this.isReady()?(-1===this.bt.indexOf(t)&&this.bt.push(t),t.then(()=>Q(this,void 0,void 0,function*(){return this.remove(t)})).catch(()=>Q(this,void 0,void 0,function*(){return this.remove(t).catch(()=>{})})),t):Promise.reject(new z("Not adding Promise due to buffer limit reached."))})}remove(t){return Q(this,void 0,void 0,function*(){return this.bt.splice(this.bt.indexOf(t),1)[0]})}length(){return this.bt.length}drain(t){return Q(this,void 0,void 0,function*(){return new Promise(n=>{const e=setTimeout(()=>{t&&t>0&&n(!1)},t);Promise.all(this.bt).then(()=>{clearTimeout(e),n(!0)}).catch(()=>{n(!0)})})})}}class Tt{constructor(t){this.options=t,this.bt=new kt(30),this.url=new Z(this.options.dsn).getStoreEndpointWithUrlEncodedAuth()}sendEvent(t){return Q(this,void 0,void 0,function*(){throw new z("Transport Class has to implement `sendEvent` method")})}close(t){return Q(this,void 0,void 0,function*(){return this.bt.drain(t)})}}const Rt=f();class Ft extends Tt{sendEvent(n){return Q(this,void 0,void 0,function*(){const e={body:JSON.stringify(n),method:"POST",referrerPolicy:dt()?"origin":""};return this.bt.add(Rt.fetch(this.url,e).then(n=>({status:t.Status.fromHttpCode(n.status)})))})}}class Dt extends Tt{sendEvent(n){return Q(this,void 0,void 0,function*(){return this.bt.add(new Promise((e,r)=>{const i=new XMLHttpRequest;i.onreadystatechange=(()=>{4===i.readyState&&(200===i.status&&e({status:t.Status.fromHttpCode(i.status)}),r(i))}),i.open("POST",this.url),i.send(JSON.stringify(n))}))})}}var It=Object.freeze({BaseTransport:Tt,FetchTransport:Ft,XHRTransport:Dt});class Mt extends ot{ot(){if(!this.J.dsn)return super.ot();const t=this.J.transportOptions?this.J.transportOptions:{dsn:this.J.dsn};return this.J.transport?new this.J.transport(t):ft()?new Ft(t):new Dt(t)}eventFromException(n,e){let r;if(s(n)&&n.error){return n=n.error,r=xt(_t(n)),S.resolve(this.gt(r,e))}if(o(n)||(c=n,"[object DOMException]"===Object.prototype.toString.call(c))){const r=n,i=r.name||(o(r)?"DOMError":"DOMException"),s=r.message?`${i}: ${r.message}`:i;return this.eventFromMessage(s,t.Severity.Error,e).then(t=>(b(t,s),S.resolve(this.gt(t,e))))}var c;if(i(n))return r=xt(_t(n)),S.resolve(this.gt(r,e));if(a(n)&&e&&e.syntheticException){return b(r=function(t,n){const e=Object.keys(t).sort(),r={extra:{__serialized__:$(t)},message:`Non-Error exception captured with keys: ${nt(e)}`};if(n){const t=St(_t(n).stack);r.stacktrace={frames:t}}return r}(n,e.syntheticException),"Custom Object",void 0,{handled:!0,synthetic:!0,type:"generic"}),r.level=t.Severity.Error,S.resolve(this.gt(r,e))}const u=n;return this.eventFromMessage(u,void 0,e).then(n=>(b(n,`${u}`,void 0,{handled:!0,synthetic:!0,type:"generic"}),n.level=t.Severity.Error,S.resolve(this.gt(n,e))))}gt(t,n){return Object.assign({},t,{event_id:n&&n.event_id})}eventFromMessage(n,e=t.Severity.Info,r){const i={event_id:r&&r.event_id,level:e,message:n};if(this.J.attachStacktrace&&r&&r.syntheticException){const t=St(_t(r.syntheticException).stack);i.stacktrace={frames:t}}return S.resolve(i)}}const Ct="sentry.javascript.browser",Ut="5.0.3";class Pt extends it{constructor(t={}){super(Mt,t)}et(t,n,e){return t.platform=t.platform||"javascript",t.sdk=Object.assign({},t.sdk,{name:Ct,packages:[...t.sdk&&t.sdk.packages||[],{name:"npm:@sentry/browser",version:Ut}],version:Ut}),super.et(t,n,e)}showReportDialog(t={}){const n=f().document;if(!n)return;if(!this.nt())return void I.error("Trying to call showReportDialog with Sentry Client is disabled");const e=t.dsn||this.getDsn();if(!t.eventId)return void I.error("Missing `eventId` option in showReportDialog call");if(!e)return void I.error("Missing `Dsn` option in showReportDialog call");const r=n.createElement("script");r.async=!0,r.src=new Z(e).getReportDialogEndpoint(t),(n.head||n.body).appendChild(r)}}const At=1e3;let Lt,Nt,Bt=0;function Ht(t,n={},e){if("function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(n){return t}const sentryWrapped=function(){e&&"function"==typeof e&&e.apply(this,arguments);const r=Array.prototype.slice.call(arguments);try{const e=r.map(t=>Ht(t,n));return t.handleEvent?t.handleEvent.apply(this,e):t.apply(this,e)}catch(t){throw Bt+=1,setTimeout(()=>{Bt-=1}),X(e=>{e.addEventProcessor(t=>{const e=Object.assign({},t);return n.mechanism&&b(e,void 0,void 0,n.mechanism),e.extra=Object.assign({},e.extra,{arguments:O(r,3)}),e}),captureException(t)}),t}};try{for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(sentryWrapped[n]=t[n])}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.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function qt(t){return n=>{if(Lt=void 0,Nt===n)return;let e;Nt=n;try{e=function(t){let n=t;const e=[];let r=0,i=0;const s=" > ".length;let o;for(;n&&r++<5&&!("html"===(o=p(n))||r>1&&i+e.length*s+o.length>=80);)e.push(o),i+=o.length,n=n.parentNode;return e.reverse().join(" > ")}(n.target)}catch(t){e="<unknown>"}N().addBreadcrumb({category:`ui.${t}`,message:e},{event:n,name:t})}}function Wt(){return t=>{let n;try{n=t.target}catch(t){return}const e=n&&n.tagName;e&&("INPUT"===e||"TEXTAREA"===e||n.isContentEditable)&&(Lt||qt("input")(t),clearTimeout(Lt),Lt=setTimeout(()=>{Lt=void 0},At))}}class Xt{constructor(t){this.name=Xt.id,this.J=Object.assign({onerror:!0,onunhandledrejection:!0},t)}setupOnce(){Error.stackTraceLimit=50,wt((t,n,e)=>{if(Bt>0)return;const r=N().getIntegration(Xt);r&&N().captureEvent(r.wt(t),{data:{stack:t},originalException:e})}),this.J.onerror&&(I.log("Global Handler attached: onerror"),Et()),this.J.onunhandledrejection&&(I.log("Global Handler attached: onunhandledrejection"),$t())}wt(t){const n=xt(t),e={mode:t.mode};t.message&&(e.message=t.message),t.name&&(e.name=t.name);const r=N().getClient(),i=r&&r.getOptions().maxValueLength||250;return b(n,t.original?Y(JSON.stringify(O(t.original)),i):"","onunhandledrejection"===t.mechanism?"UnhandledRejection":"Error",{data:e,handled:!1,type:t.mechanism}),n}}Xt.id="GlobalHandlers";class zt{constructor(){this.Et=0,this.name=zt.id}$t(t){return function(...n){const e=n[0];return n[0]=Ht(e,{mechanism:{data:{function:Gt(t)},handled:!0,type:"instrument"}}),t.apply(this,n)}}_t(t){return function(n){return t(Ht(n,{mechanism:{data:{function:"requestAnimationFrame",handler:Gt(t)},handled:!0,type:"instrument"}}))}}jt(t){const n=f(),e=n[t]&&n[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(w(e,"addEventListener",function(n){return function(e,r,i){try{r.handleEvent=Ht(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:Gt(r),target:t},handled:!0,type:"instrument"}})}catch(t){}let s,o,c;return"EventTarget"!==t&&"Node"!==t||(o=qt("click"),c=Wt(),s=function(t){if(!t)return;let n;try{n=t.type}catch(t){return}return"click"===n?o(t):"keypress"===n?c(t):void 0}),n.call(this,e,Ht(r,{mechanism:{data:{function:"addEventListener",handler:Gt(r),target:t},handled:!0,type:"instrument"}},s),i)}}),w(e,"removeEventListener",function(t){return function(n,e,r){let i=e;try{i=i&&(i.__sentry_wrapped__||i)}catch(t){}return t.call(this,n,i,r)}}))}setupOnce(){this.Et=this.Et;const t=f();w(t,"setTimeout",this.$t.bind(this)),w(t,"setInterval",this.$t.bind(this)),w(t,"requestAnimationFrame",this._t.bind(this)),["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"].forEach(this.jt.bind(this))}}function Gt(t){try{return t&&t.name||"<anonymous>"}catch(t){return"<anonymous>"}}zt.id="TryCatch";const Jt=f();let Vt;class Kt{constructor(t){this.name=Kt.id,this.J=Object.assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}Ot(){"console"in Jt&&["debug","info","warn","error","log"].forEach(function(n){n in Jt.console&&w(Jt.console,n,function(e){return function(...r){const i={category:"console",data:{extra:{arguments:O(r,3)},logger:"console"},level:t.Severity.fromString(n),message:tt(r," ")};"assert"===n&&!1===r[0]&&(i.message=`Assertion failed: ${tt(r.slice(1)," ")||"console.assert"}`,i.data.extra.arguments=O(r.slice(1),3)),Kt.addBreadcrumb(i,{input:r,level:n}),e&&Function.prototype.apply.call(e,Jt.console,r)}})})}xt(){"document"in Jt&&(Jt.document.addEventListener("click",qt("click"),!1),Jt.document.addEventListener("keypress",Wt(),!1))}St(){ft()&&-1!==f().fetch.toString().indexOf("native")&&w(Jt,"fetch",function(n){return function(...e){const r=e[0];let i,s="GET";"string"==typeof r?i=r:"Request"in Jt&&r instanceof Request?(i=r.url,r.method&&(s=r.method)):i=String(r),e[1]&&e[1].method&&(s=e[1].method);const o=N().getClient(),c=o&&o.getDsn();if(c){const t=new Z(c).getStoreEndpoint();if(t&&i.includes(t))return"POST"===s&&e[1]&&e[1].body&&Zt(e[1].body),n.apply(Jt,e)}const u={method:s,url:i};return n.apply(Jt,e).then(t=>(u.status_code=t.status,Kt.addBreadcrumb({category:"fetch",data:u,type:"http"},{input:e,response:t}),t)).catch(n=>{throw Kt.addBreadcrumb({category:"fetch",data:u,level:t.Severity.Error,type:"http"},{error:n,input:e}),n})}})}kt(){if(!function(){const t=f(),n=t.chrome,e=n&&n.app&&n.app.runtime,r="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!e&&r}())return;const t=(t,n)=>{const e=v(Jt.location.href),r=v(n);let i=v(t);i.path||(i=e),Vt=n,e.protocol===r.protocol&&e.host===r.host&&(n=r.relative),e.protocol===i.protocol&&e.host===i.host&&(t=i.relative),Kt.addBreadcrumb({category:"navigation",data:{from:t,to:n}})},n=Jt.onpopstate;function e(n){return function(...e){const r=e.length>2?e[2]:void 0;return r&&t(Vt,String(r)),n.apply(this,e)}}Jt.onpopstate=((...e)=>{const r=Jt.location.href;if(t(Vt,r),n)return n.apply(this,e)}),w(Jt.history,"pushState",e),w(Jt.history,"replaceState",e)}Tt(){if(!("XMLHttpRequest"in Jt))return;const t=XMLHttpRequest.prototype;w(t,"open",t=>(function(...n){const e=n[1];this.__sentry_xhr__={method:n[0],url:n[1]};const r=N().getClient(),i=r&&r.getDsn();if(i){const t=new Z(i).getStoreEndpoint();c(e)&&t&&e.includes(t)&&(this.__sentry_own_request__=!0)}return t.apply(this,n)})),w(t,"send",t=>(function(...n){const e=this;function r(){if(4===e.readyState){if(e.__sentry_own_request__)return;try{e.__sentry_xhr__&&(e.__sentry_xhr__.status_code=e.status)}catch(t){}Kt.addBreadcrumb({category:"xhr",data:e.__sentry_xhr__,type:"http"},{xhr:e})}}return e.__sentry_own_request__&&Zt(n[0]),["onload","onerror","onprogress"].forEach(t=>{!function(t,n){t in n&&"function"==typeof n[t]&&w(n,t,n=>Ht(n,{mechanism:{data:{function:t,handler:n&&n.name||"<anonymous>"},handled:!0,type:"instrument"}}))}(t,e)}),"onreadystatechange"in e&&"function"==typeof e.onreadystatechange?w(e,"onreadystatechange",function(t){return Ht(t,{mechanism:{data:{function:"onreadystatechange",handler:t&&t.name||"<anonymous>"},handled:!0,type:"instrument"}},r)}):e.onreadystatechange=r,t.apply(this,n)}))}static addBreadcrumb(t,n){N().getIntegration(Kt)&&N().addBreadcrumb(t,n)}setupOnce(){this.J.console&&this.Ot(),this.J.dom&&this.xt(),this.J.xhr&&this.Tt(),this.J.fetch&&this.St(),this.J.history&&this.kt()}}function Zt(n){try{const e=JSON.parse(n);Kt.addBreadcrumb({category:"sentry",event_id:e.event_id,level:e.level||t.Severity.fromString("error"),message:m(e)},{event:e})}catch(t){I.error("Error while adding sentry type breadcrumb")}}Kt.id="Breadcrumbs";const Qt="cause",Yt=5;class tn{constructor(t={}){this.name=tn.id,this.Rt=t.key||Qt,this.yt=t.limit||Yt}setupOnce(){R((t,n)=>{const e=N().getIntegration(tn);return e?e.handler(t,n):t})}handler(t,n){if(!(t.exception&&t.exception.values&&n&&n.originalException instanceof Error))return t;const e=this.walkErrorTree(n.originalException,this.Rt);return t.exception.values=[...e,...t.exception.values],t}walkErrorTree(t,n,e=[]){if(!(t[n]instanceof Error)||e.length+1>=this.yt)return e;const r=Ot(_t(t[n]));return this.walkErrorTree(t[n],n,[r,...e])}}tn.id="LinkedErrors";const nn=f();class en{constructor(){this.name=en.id}setupOnce(){R(t=>{if(N().getIntegration(en)){if(!nn.navigator||!nn.location)return t;const n=t.request||{};return n.url=n.url||nn.location.href,n.headers=n.headers||{},n.headers["User-Agent"]=nn.navigator.userAgent,Object.assign({},t,{request:n})}return t})}}en.id="UserAgent";var rn=Object.freeze({GlobalHandlers:Xt,TryCatch:zt,Breadcrumbs:Kt,LinkedErrors:tn,UserAgent:en});const sn=[new ht,new ut,new zt,new Kt,new Xt,new tn,new en];let on={};const cn=f();cn.Sentry&&cn.Sentry.Integrations&&(on=cn.Sentry.Integrations);const un=Object.assign({},on,lt,rn);return t.Integrations=un,t.Transports=It,t.addGlobalEventProcessor=R,t.addBreadcrumb=function(t){W("addBreadcrumb",t)},t.captureException=captureException,t.captureEvent=function(t){return W("captureEvent",t)},t.captureMessage=function(t,n){let e;try{throw new Error(t)}catch(t){e=t}return W("captureMessage",t,n,{originalException:t,syntheticException:e})},t.configureScope=function(t){W("configureScope",t)},t.withScope=X,t.getHubFromCarrier=H,t.getCurrentHub=N,t.Hub=P,t.Scope=k,t.BrowserClient=Pt,t.defaultIntegrations=sn,t.forceLoad=function(){},t.init=function(t={}){void 0===t.defaultIntegrations&&(t.defaultIntegrations=sn),function(t,n){!0===n.debug&&I.enable(),N().bindClient(new t(n))}(Pt,t)},t.lastEventId=function(){return N().lastEventId()},t.onLoad=function(t){t()},t.showReportDialog=function(t={}){t.eventId||(t.eventId=N().lastEventId());const n=N().getClient();n&&n.showReportDialog(t)},t.flush=function(t){return Q(this,void 0,void 0,function*(){const n=N().getClient();return n?n.flush(t):Promise.reject(!1)})},t.close=function(t){return Q(this,void 0,void 0,function*(){const n=N().getClient();return n?n.close(t):Promise.reject(!1)})},t.SDK_NAME=Ct,t.SDK_VERSION=Ut,t}({});
/*! @sentry/browser 5.0.5 (913eafc4) | https://github.com/getsentry/sentry-javascript */
var Sentry=function(t){"use strict";var n,e,r;function i(t){switch(Object.prototype.toString.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return t instanceof 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 Boolean(t&&t.then&&"function"==typeof t.then)}!function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Debug=2]="Debug",t[t.Verbose=3]="Verbose"}(n||(n={})),(e=t.Severity||(t.Severity={})).Fatal="fatal",e.Error="error",e.Warning="warning",e.Log="log",e.Info="info",e.Debug="debug",e.Critical="critical",function(t){t.fromString=function(n){switch(n){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(n){return n>=200&&n<300?t.Success:429===n?t.RateLimit:n>=400&&n<500?t.Invalid:n>=500?t.Failed:t.Unknown}}(t.Status||(t.Status={}));const l={};function f(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:l}function d(){const t=f(),n=t.crypto||t.msCrypto;if(void 0!==n&&n.getRandomValues){const t=new Uint16Array(8);n.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=t=>{let n=t.toString(16);for(;n.length<4;)n=`0${n}`;return n};return e(t[0])+e(t[1])+e(t[2])+e(t[3])+e(t[4])+e(t[5])+e(t[6])+e(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=16*Math.random()|0;return("x"===t?n:3&n|8).toString(16)})}function p(t){const n=[];let e,r,i,s,o;if(!t||!t.tagName)return"";if(n.push(t.tagName.toLowerCase()),t.id&&n.push(`#${t.id}`),(e=t.className)&&c(e))for(r=e.split(/\s+/),o=0;o<r.length;o++)n.push(`.${r[o]}`);const u=["type","name","title","alt"];for(o=0;o<u.length;o++)i=u[o],(s=t.getAttribute(i))&&n.push(`[${i}="${s}"]`);return n.join("")}function v(t){if(!t)return{};const n=t.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!n)return{};const e=n[6]||"",r=n[8]||"";return{host:n[4],path:n[5],protocol:n[2],relative:n[5]+e+r}}function m(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){const n=t.exception.values[0];return n.type&&n.value?`${n.type}: ${n.value}`:n.type||n.value||t.event_id||"<unknown>"}return t.event_id||"<unknown>"}function y(t){const n=f();if(!("console"in n))return t();const e=n.console,r={};["debug","info","warn","error","log"].forEach(t=>{t in n.console&&e[t].__sentry__&&(r[t]=e[t].__sentry_wrapped__,e[t]=e[t].__sentry_original__)});const i=t();return Object.keys(r).forEach(t=>{e[t]=r[t]}),i}function b(t,n,e,r={handled:!0,type:"generic"}){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||n||"",t.exception.values[0].type=t.exception.values[0].type||e||"Error",t.exception.values[0].mechanism=t.exception.values[0].mechanism||r}class g{constructor(){this.t="function"==typeof WeakSet,this.i=this.t?new WeakSet:[]}memoize(t){if(this.t)return!!this.i.has(t)||(this.i.add(t),!1);for(let n=0;n<this.i.length;n++){if(this.i[n]===t)return!0}return this.i.push(t),!1}unmemoize(t){if(this.t)this.i.delete(t);else for(let n=0;n<this.i.length;n++)if(this.i[n]===t){this.i.splice(n,1);break}}}function w(t,n,e){if(!(n in t)||t[n].__sentry__)return;const r=t[n],i=e(r);"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:r},__sentry_wrapped__:{enumerable:!1,value:i}})),t[n]=i}function E(t){return function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(t))}function $(t,n=3,e=102400){const r=O(t,n);return E(r)>e?$(t,n-1,e):r}function _(t,n){return"domain"===n&&"object"==typeof t&&t.s?"[Domain]":"domainEmitter"===n?"[DomainEmitter]":"undefined"!=typeof global&&t===global?"[Global]":"undefined"!=typeof window&&t===window?"[Window]":"undefined"!=typeof document&&t===document?"[Document]":"undefined"!=typeof Event&&t instanceof Event?Object.getPrototypeOf(t)?t.constructor.name:"Event":a(e=t)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e?"[SyntheticEvent]":Number.isNaN(t)?"[NaN]":void 0===t?"[undefined]":"function"==typeof t?`[Function: ${t.name||"<unknown-function-name>"}]`:t;var e}function j(t,n,e=1/0,r=new g){if(0===e)return function(t){const n=Object.prototype.toString.call(t);if("string"==typeof t)return t;if("[object Object]"===n)return"[Object]";if("[object Array]"===n)return"[Array]";const e=_(t);return u(e)?e:n}(n);if(null!=n&&"function"==typeof n.toJSON)return n.toJSON();const s=_(n,t);if(u(s))return s;const o=i(n)?function(t){const n={message:t.message,name:t.name,stack:t.stack};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}(n):n,c=Array.isArray(n)?[]:{};if(r.memoize(n))return"[Circular ~]";for(const t in o)Object.prototype.hasOwnProperty.call(o,t)&&(c[t]=j(t,o[t],e-1,r));return r.unmemoize(n),c}function O(t,n){try{return JSON.parse(JSON.stringify(t,(t,e)=>j(t,e,n)))}catch(t){return"**non-serializable**"}}var x;!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(x||(x={}));class S{constructor(t){this.o=x.PENDING,this.u=[],this.h=(t=>{this.l(t,x.RESOLVED)}),this.p=(t=>{this.l(t,x.REJECTED)}),this.l=((t,n)=>{this.o===x.PENDING&&(h(t)?t.then(this.h,this.p):(this.v=t,this.o=n,this.m()))}),this.m=(()=>{this.o!==x.PENDING&&(this.o===x.REJECTED?this.u.forEach(t=>t.onFail&&t.onFail(this.v)):this.u.forEach(t=>t.onSuccess&&t.onSuccess(this.v)),this.u=[])}),this.g=(t=>{this.u=this.u.concat(t),this.m()});try{t(this.h,this.p)}catch(t){this.p(t)}}then(t,n){return new S((e,r)=>{this.g({onFail:t=>{if(n)try{return void e(n(t))}catch(t){return void r(t)}else r(t)},onSuccess:n=>{if(t)try{return void e(t(n))}catch(t){return void r(t)}else e(n)}})})}catch(t){return this.then(t=>t,t)}toString(){return"[object SyncPromise]"}static resolve(t){return new S(n=>{n(t)})}static reject(t){return new S((n,e)=>{e(t)})}}class k{constructor(){this.$=!1,this._=[],this.j=[],this.O=[],this.S={},this.k={},this.T={}}addScopeListener(t){this._.push(t)}addEventProcessor(t){return this.j.push(t),this}R(){this.$||(this.$=!0,setTimeout(()=>{this._.forEach(t=>{t(this)}),this.$=!1}))}F(t,n,e,r=0){return new S((i,s)=>{const o=t[r];if(null===n||"function"!=typeof o)i(n);else{const c=o(Object.assign({},n),e);h(c)?c.then(n=>this.F(t,n,e,r+1).then(i)).catch(s):this.F(t,c,e,r+1).then(i).catch(s)}})}setUser(t){return this.S=O(t),this.R(),this}setTags(t){return this.k=Object.assign({},this.k,O(t)),this.R(),this}setTag(t,n){return this.k=Object.assign({},this.k,{[t]:O(n)}),this.R(),this}setExtras(t){return this.T=Object.assign({},this.T,O(t)),this.R(),this}setExtra(t,n){return this.T=Object.assign({},this.T,{[t]:O(n)}),this.R(),this}setFingerprint(t){return this.D=O(t),this.R(),this}setLevel(t){return this.I=O(t),this.R(),this}static clone(t){const n=new k;return Object.assign(n,t,{_:[]}),t&&(n.O=[...t.O],n.k=Object.assign({},t.k),n.T=Object.assign({},t.T),n.S=t.S,n.I=t.I,n.D=t.D,n.j=[...t.j]),n}clear(){return this.O=[],this.k={},this.T={},this.S={},this.I=void 0,this.D=void 0,this.R(),this}addBreadcrumb(t,n){return this.O=void 0!==n&&n>=0?[...this.O,O(t)].slice(-n):[...this.O,O(t)],this.R(),this}clearBreadcrumbs(){return this.O=[],this.R(),this}M(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this.D&&(t.fingerprint=t.fingerprint.concat(this.D)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}applyToEvent(t,n){return this.T&&Object.keys(this.T).length&&(t.extra=Object.assign({},this.T,t.extra)),this.k&&Object.keys(this.k).length&&(t.tags=Object.assign({},this.k,t.tags)),this.S&&Object.keys(this.S).length&&(t.user=Object.assign({},this.S,t.user)),this.I&&(t.level=this.I),this.M(t),(!t.breadcrumbs||0===t.breadcrumbs.length)&&this.O.length>0&&(t.breadcrumbs=this.O),this.F([...T(),...this.j],t,n)}}function T(){const t=f();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function R(t){T().push(t)}const F=f(),D="Sentry Logger ";F.__SENTRY__=F.__SENTRY__||{};const I=F.__SENTRY__.logger||(F.__SENTRY__.logger=new class{constructor(){this.C=!1}disable(){this.C=!1}enable(){this.C=!0}log(...t){this.C&&y(()=>{F.console.log(`${D}[Log]: ${t.join(" ")}`)})}warn(...t){this.C&&y(()=>{F.console.warn(`${D}[Warn]: ${t.join(" ")}`)})}error(...t){this.C&&y(()=>{F.console.error(`${D}[Error]: ${t.join(" ")}`)})}}),M=3,C=30,U=100;class P{constructor(t,n=new k,e=M){this.U=e,this.P=[],this.P.push({client:t,scope:n})}A(t,...n){const e=this.getStackTop();e&&e.client&&e.client[t]&&e.client[t](...n,e.scope)}isOlderThan(t){return this.U<t}bindClient(t){this.getStackTop().client=t}pushScope(){const t=this.getStack(),n=t.length>0?t[t.length-1].scope:void 0,e=k.clone(n);return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return void 0!==this.getStack().pop()}withScope(t){const n=this.pushScope();try{t(n)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this.P}getStackTop(){return this.P[this.P.length-1]}captureException(t,n){const e=this.L=d();return this.A("captureException",t,Object.assign({},n,{event_id:e})),e}captureMessage(t,n,e){const r=this.L=d();return this.A("captureMessage",t,n,Object.assign({},e,{event_id:r})),r}captureEvent(t,n){const e=this.L=d();return this.A("captureEvent",t,Object.assign({},n,{event_id:e})),e}lastEventId(){return this.L}addBreadcrumb(t,n){const e=this.getStackTop();if(!e.scope||!e.client)return;const{beforeBreadcrumb:r,maxBreadcrumbs:i=C}=e.client.getOptions();if(i<=0)return;const s=(new Date).getTime()/1e3,o=Object.assign({timestamp:s},t),c=r?y(()=>r(o,n)):o;null!==c&&e.scope.addBreadcrumb(c,Math.min(i,U))}configureScope(t){const n=this.getStackTop();n.scope&&n.client&&t(n.scope)}run(t){const n=L(this);try{t(this)}finally{L(n)}}getIntegration(t){const n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch(n){return I.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}}function A(){const t=f();return t.__SENTRY__=t.__SENTRY__||{hub:void 0},t}function L(t){const n=A(),e=H(n);return q(n,t),e}function N(){const t=A();B(t)&&!H(t).isOlderThan(M)||q(t,new P);try{const r=(n=module,e="domain",n.require(e)).active;if(!r)return H(t);if(!B(r)||H(r).isOlderThan(M)){const n=H(t).getStackTop();q(r,new P(n.client,k.clone(n.scope)))}return H(r)}catch(n){return H(t)}var n,e}function B(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function H(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub?t.__SENTRY__.hub:(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new P,t.__SENTRY__.hub)}function q(t,n){return!!t&&(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=n,!0)}function W(t,...n){const e=N();if(e&&e[t])return e[t](...n);throw new Error(`No hub defined or ${t} was not found on the hub, please open a bug report.`)}function captureException(t){let n;try{throw new Error("Sentry syntheticException")}catch(t){n=t}return W("captureException",t,{originalException:t,syntheticException:n})}function X(t){W("withScope",t)}class z extends Error{constructor(t){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype)}}const G=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w\.-]+)(?::(\d+))?\/(.+)/,J="Invalid Dsn";class V{constructor(t){"string"==typeof t?this.N(t):this.B(t),this.H()}toString(t=!1){const{host:n,path:e,pass:r,port:i,projectId:s,protocol:o,user:c}=this;return`${o}://${c}${t&&r?`:${r}`:""}`+`@${n}${i?`:${i}`:""}/${e?`${e}/`:e}${s}`}N(t){const n=G.exec(t);if(!n)throw new z(J);const[e,r,i="",s,o="",c]=n.slice(1);let u="",a=c;const h=a.split("/");h.length>1&&(u=h.slice(0,-1).join("/"),a=h.pop()),Object.assign(this,{host:s,pass:i,path:u,projectId:a,port:o,protocol:e,user:r})}B(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}H(){if(["protocol","user","host","projectId"].forEach(t=>{if(!this[t])throw new z(J)}),"http"!==this.protocol&&"https"!==this.protocol)throw new z(J);if(this.port&&Number.isNaN(parseInt(this.port,10)))throw new z(J)}}const K="7";class Z{constructor(t){this.dsn=t,this.q=new V(t)}getDsn(){return this.q}getStoreEndpoint(){return`${this.W()}${this.getStoreEndpointPath()}`}getStoreEndpointWithUrlEncodedAuth(){const t={sentry_key:this.q.user,sentry_version:K};return`${this.getStoreEndpoint()}?${n=t,Object.keys(n).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`).join("&")}`;var n}W(){const t=this.q,n=t.protocol?`${t.protocol}:`:"",e=t.port?`:${t.port}`:"";return`${n}//${t.host}${e}`}getStoreEndpointPath(){const t=this.q;return`${t.path?`/${t.path}`:""}/api/${t.projectId}/store/`}getRequestHeaders(t,n){const e=this.q,r=[`Sentry sentry_version=${K}`];return r.push(`sentry_timestamp=${(new Date).getTime()}`),r.push(`sentry_client=${t}/${n}`),r.push(`sentry_key=${e.user}`),e.pass&&r.push(`sentry_secret=${e.pass}`),{"Content-Type":"application/json","X-Sentry-Auth":r.join(", ")}}getReportDialogEndpoint(t={}){const n=this.q,e=`${this.W()}${n.path?`/${n.path}`:""}/api/embed/error-page/`,r=[];r.push(`dsn=${n.toString()}`);for(const n in t)if("user"===n){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(n)}=${encodeURIComponent(t[n])}`);return r.length?`${e}?${r.join("&")}`:e}}function Q(t,n,e,r){return new(e||(e=Promise))(function(i,s){function o(t){try{u(r.next(t))}catch(t){s(t)}}function c(t){try{u(r.throw(t))}catch(t){s(t)}}function u(t){t.done?i(t.value):new e(function(n){n(t.value)}).then(o,c)}u((r=r.apply(t,n||[])).next())})}function Y(t,n=0){return 0===n?t:t.length<=n?t:`${t.substr(0,n)}...`}function tt(t,n){if(!Array.isArray(t))return"";const e=[];for(let n=0;n<t.length;n++){const r=t[n];try{e.push(String(r))}catch(t){e.push("[value cannot be serialized]")}}return e.join(n)}function nt(t,n=40){if(!t.length)return"[object has no keys]";if(t[0].length>=n)return Y(t[0],n);for(let e=t.length;e>0;e--){const r=t.slice(0,e).join(", ");if(!(r.length>n))return e===t.length?r:Y(r,n)}return""}const et=[];function rt(t){const n={};return function(t){const n=t.defaultIntegrations&&[...t.defaultIntegrations]||[],e=t.integrations;let r=[];if(Array.isArray(e)){const t=e.map(t=>t.name),i=[];n.forEach(n=>{-1===t.indexOf(n.name)&&-1===i.indexOf(n.name)&&(r.push(n),i.push(n.name))}),e.forEach(t=>{-1===i.indexOf(t.name)&&(r.push(t),i.push(t.name))})}else{if("function"!=typeof e)return[...n];r=e(n),r=Array.isArray(r)?r:[r]}return r}(t).forEach(t=>{n[t.name]=t,function(t){-1===et.indexOf(t.name)&&(t.setupOnce(R,N),et.push(t.name),I.log(`Integration installed: ${t.name}`))}(t)}),n}class it{constructor(t,n){this.X=!1,this.G=new t(n),this.J=n,n.dsn&&(this.V=new V(n.dsn)),this.K=rt(this.J)}captureException(t,n,e){let r=n&&n.event_id;return this.X=!0,this.Z().eventFromException(t,n).then(t=>this.Y(t,n,e)).then(t=>{r=t&&t.event_id,this.X=!1}).catch(t=>{I.log(t),this.X=!1}),r}captureMessage(t,n,e,r){let i=e&&e.event_id;return this.X=!0,(u(t)?this.Z().eventFromMessage(`${t}`,n,e):this.Z().eventFromException(t,e)).then(t=>this.Y(t,e,r)).then(t=>{i=t&&t.event_id,this.X=!1}).catch(t=>{I.log(t),this.X=!1}),i}captureEvent(t,n,e){let r=n&&n.event_id;return this.X=!0,this.Y(t,n,e).then(t=>{r=t&&t.event_id,this.X=!1}).catch(t=>{I.log(t),this.X=!1}),r}getDsn(){return this.V}getOptions(){return this.J}flush(t){return Q(this,void 0,void 0,function*(){return(yield Promise.all([this.Z().getTransport().close(t),this.tt()])).reduce((t,n)=>t&&n)})}close(t){return Q(this,void 0,void 0,function*(){return this.flush(t).finally(()=>{this.getOptions().enabled=!1})})}getIntegrations(){return this.K||{}}getIntegration(t){try{return this.K[t.id]||null}catch(n){return I.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}tt(t=0){return Q(this,void 0,void 0,function*(){return new Promise(n=>{this.X?t>=10?n(!1):setTimeout(()=>Q(this,void 0,void 0,function*(){n(yield this.tt(t+1))}),10):n(!0)})})}Z(){return this.G}nt(){return!1!==this.getOptions().enabled&&void 0!==this.V}et(t,n,e){const{environment:r,release:i,dist:s,maxValueLength:o=250}=this.getOptions(),c=Object.assign({},t);void 0===c.environment&&void 0!==r&&(c.environment=r),void 0===c.release&&void 0!==i&&(c.release=i),void 0===c.dist&&void 0!==s&&(c.dist=s),c.message&&(c.message=Y(c.message,o));const u=c.exception&&c.exception.values&&c.exception.values[0];u&&u.value&&(u.value=Y(u.value,o));const a=c.request;a&&a.url&&(a.url=Y(a.url,o)),void 0===c.event_id&&(c.event_id=d()),this.rt(c.sdk);let h=S.resolve(c);return n&&(h=n.applyToEvent(c,e)),h}rt(t){const n=Object.keys(this.K);t&&n.length>0&&(t.integrations=n)}Y(t,n,e){const{beforeSend:r,sampleRate:i}=this.getOptions();return this.nt()?"number"==typeof i&&Math.random()>i?S.reject("This event has been sampled, will not send event."):new S((i,s)=>{this.et(t,e,n).then(t=>{if(null===t)return void s("An event processor returned null, will not send event.");let e=t;try{if(n&&n.data&&!0===n.data.__sentry__||!r)return this.Z().sendEvent(e),void i(e);const o=r(t,n);if(void 0===o)I.error("`beforeSend` method has to return `null` or a valid event.");else if(h(o))this.it(o,i,s);else{if(null===(e=o))return I.log("`beforeSend` returned `null`, will not send event."),void i(null);this.Z().sendEvent(e),i(e)}}catch(t){this.captureException(t,{data:{__sentry__:!0},originalException:t}),s("`beforeSend` throw an error, will not send event.")}})}):S.reject("SDK not enabled, will not send event.")}it(t,n,e){t.then(t=>{null!==t?(this.Z().sendEvent(t),n(t)):e("`beforeSend` returned `null`, will not send event.")}).catch(t=>{e(`beforeSend rejected with ${t}`)})}}class st{sendEvent(n){return Q(this,void 0,void 0,function*(){return Promise.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:t.Status.Skipped})})}close(t){return Q(this,void 0,void 0,function*(){return Promise.resolve(!0)})}}class ot{constructor(t){this.J=t,this.J.dsn||I.warn("No DSN provided, backend will not do anything."),this.st=this.ot()}ot(){return new st}eventFromException(t,n){throw new z("Backend has to implement `eventFromException` method")}eventFromMessage(t,n,e){throw new z("Backend has to implement `eventFromMessage` method")}sendEvent(t){this.st.sendEvent(t).catch(t=>{I.error(`Error while sending event: ${t}`)})}getTransport(){return this.st}}let ct;class ut{constructor(){this.name=ut.id}setupOnce(){ct=Function.prototype.toString,Function.prototype.toString=function(...t){const n=this.__sentry__?this.__sentry_original__:this;return ct.apply(n,t)}}}ut.id="FunctionToString";const at=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class ht{constructor(t={}){this.J=t,this.name=ht.id}setupOnce(){R(t=>{const n=N();if(!n)return t;const e=n.getIntegration(ht);if(e){const r=n.getClient(),i=r?r.getOptions():{},s=e.ct(i);if(e.ut(t,s))return null}return t})}ut(t,n){return this.at(t,n)?(I.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${m(t)}`),!0):this.ht(t,n)?(I.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${m(t)}`),!0):this.lt(t,n)?(I.warn(`Event dropped due to being matched by \`blacklistUrls\` option.\nEvent: ${m(t)}.\nUrl: ${this.ft(t)}`),!0):!this.dt(t,n)&&(I.warn(`Event dropped due to not being matched by \`whitelistUrls\` option.\nEvent: ${m(t)}.\nUrl: ${this.ft(t)}`),!0)}at(t,n={}){if(!n.ignoreInternal)return!1;try{return"SentryError"===t.exception.values[0].type}catch(t){return!1}}ht(t,n={}){return!(!n.ignoreErrors||!n.ignoreErrors.length)&&this.pt(t).some(t=>n.ignoreErrors.some(n=>this.vt(t,n)))}lt(t,n={}){if(!n.blacklistUrls||!n.blacklistUrls.length)return!1;const e=this.ft(t);return!!e&&n.blacklistUrls.some(t=>this.vt(e,t))}dt(t,n={}){if(!n.whitelistUrls||!n.whitelistUrls.length)return!0;const e=this.ft(t);return!e||n.whitelistUrls.some(t=>this.vt(e,t))}ct(t={}){return{blacklistUrls:[...this.J.blacklistUrls||[],...t.blacklistUrls||[]],ignoreErrors:[...this.J.ignoreErrors||[],...t.ignoreErrors||[],...at],ignoreInternal:void 0===this.J.ignoreInternal||this.J.ignoreInternal,whitelistUrls:[...this.J.whitelistUrls||[],...t.whitelistUrls||[]]}}vt(t,n){return e=n,"[object RegExp]"===Object.prototype.toString.call(e)?n.test(t):"string"==typeof n&&t.includes(n);var e}pt(t){if(t.message)return[t.message];if(t.exception)try{const{type:n,value:e}=t.exception.values[0];return[`${e}`,`${n}: ${e}`]}catch(n){return I.error(`Cannot extract message for event ${m(t)}`),[]}return[]}ft(t){try{if(t.stacktrace){const n=t.stacktrace.frames;return n[n.length-1].filename}if(t.exception){const n=t.exception.values[0].stacktrace.frames;return n[n.length-1].filename}return null}catch(n){return I.error(`Cannot extract url for event ${m(t)}`),null}}}ht.id="InboundFilters";var lt=Object.freeze({FunctionToString:ut,InboundFilters:ht});function ft(){if(!("fetch"in f()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function dt(){if(!ft())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}var pt=f(),vt={report:!1,collectWindowErrors:!1,computeStackTrace:!1,linesOfContext:!1},mt="?",yt=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function bt(t,n){return Object.prototype.hasOwnProperty.call(t,n)}function gt(){return"undefined"==typeof document||null==document.location?"":document.location.href}vt.report=function(){var t,n,e=[],r=null,o=null;function c(t,n,r){var i=null;if(!n||vt.collectWindowErrors){for(var s in e)if(bt(e,s))try{e[s](t,n,r)}catch(t){i=t}if(i)throw i}}function u(n,e,r,u,a){var l=null;if(a=s(a)?a.error:a,n=s(n)?n.message:n,o)vt.computeStackTrace.augmentStackTraceWithInitialElement(o,e,r,n),h();else if(a&&i(a))(l=vt.computeStackTrace(a)).mechanism="onerror",c(l,!0,a);else{var f,d={url:e,line:r,column:u},p=n;if("[object String]"==={}.toString.call(n)){var v=n.match(yt);v&&(f=v[1],p=v[2])}d.func=mt,d.context=null,c(l={name:f,message:p,mode:"onerror",mechanism:"onerror",stack:[Object.assign({},d,{url:d.url||gt()})]},!0,null)}return!!t&&t.apply(this,arguments)}function a(t){var n=t&&(t.detail?t.detail.reason:t.reason)||t,e=vt.computeStackTrace(n);e.mechanism="onunhandledrejection",c(e,!0,n)}function h(){var t=o,n=r;o=null,r=null,c(t,!1,n)}function l(t){if(o){if(r===t)return;h()}var n=vt.computeStackTrace(t);throw o=n,r=t,setTimeout(function(){r===t&&h()},n.incomplete?2e3:0),t}return l.subscribe=function(t){e.push(t)},l.installGlobalHandler=function(){!0!==n&&(t=pt.onerror,pt.onerror=u,n=!0)},l.installGlobalUnhandledRejectionHandler=function(){pt.onunhandledrejection=a},l}(),vt.computeStackTrace=function(){function t(t){if(!t.stack)return null;for(var n,e,r,i=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,o=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,c=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,u=/\((\S*)(?::(\d+))(?::(\d+))\)/,a=t.stack.split("\n"),h=[],l=/^(.*) is undefined$/.exec(t.message),f=0,d=a.length;f<d;++f){if(e=i.exec(a[f])){var p=e[2]&&0===e[2].indexOf("native");e[2]&&0===e[2].indexOf("eval")&&(n=u.exec(e[2]))&&(e[2]=n[1]),r={url:p?null:e[2],func:e[1]||mt,args:p?[e[2]]:[],line:e[3]?+e[3]:null,column:e[4]?+e[4]:null}}else if(e=o.exec(a[f]))r={url:e[2],func:e[1]||mt,args:[],line:+e[3],column:e[4]?+e[4]:null};else{if(!(e=s.exec(a[f])))continue;e[3]&&e[3].indexOf(" > eval")>-1&&(n=c.exec(e[3]))?e[3]=n[1]:0!==f||e[5]||void 0===t.columnNumber||(h[0].column=t.columnNumber+1),r={url:e[3],func:e[1]||mt,args:e[2]?e[2].split(","):[],line:e[4]?+e[4]:null,column:e[5]?+e[5]:null}}!r.func&&r.line&&(r.func=mt),r.context=null,h.push(r)}return h.length?(h[0]&&h[0].line&&!h[0].column&&l&&(h[0].column=null),{mode:"stack",name:t.name,message:t.message,stack:h}):null}function n(t,n,e,r){var i={url:n,line:e};if(i.url&&i.line){if(t.incomplete=!1,i.func||(i.func=mt),i.context||(i.context=null),/ '([^']+)' /.exec(r)&&(i.column=null),t.stack.length>0&&t.stack[0].url===i.url){if(t.stack[0].line===i.line)return!1;if(!t.stack[0].line&&t.stack[0].func===i.func)return t.stack[0].line=i.line,t.stack[0].context=i.context,!1}return t.stack.unshift(i),t.partial=!0,!0}return t.incomplete=!0,!1}function e(t,i){for(var s,o,c=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,u=[],a={},h=!1,l=e.caller;l&&!h;l=l.caller)if(l!==r&&l!==vt.report){if(o={url:null,func:mt,args:[],line:null,column:null},l.name?o.func=l.name:(s=c.exec(l.toString()))&&(o.func=s[1]),void 0===o.func)try{o.func=s.input.substring(0,s.input.indexOf("{"))}catch(t){}a[""+l]?h=!0:a[""+l]=!0,u.push(o)}i&&u.splice(0,i);var f={mode:"callers",name:t.name,message:t.message,stack:u};return n(f,t.sourceURL||t.fileName,t.line||t.lineNumber,t.message||t.description),f}function r(n,r){var i=null;r=null==r?0:+r;try{if(i=function(t){var n=t.stacktrace;if(n){for(var e,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,i=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,s=n.split("\n"),o=[],c=0;c<s.length;c+=2){var u=null;(e=r.exec(s[c]))?u={url:e[2],line:+e[1],column:null,func:e[3],args:[]}:(e=i.exec(s[c]))&&(u={url:e[6],line:+e[1],column:+e[2],func:e[3]||e[4],args:e[5]?e[5].split(","):[]}),u&&(!u.func&&u.line&&(u.func=mt),u.line&&(u.context=null),u.context||(u.context=[s[c+1]]),o.push(u))}return o.length?{mode:"stacktrace",name:t.name,message:t.message,stack:o}:null}}(n))return i}catch(t){}try{if(i=t(n))return i}catch(t){}try{if(i=function(t){var n=t.message.split("\n");if(n.length<4)return null;var e,r=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,i=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,s=/^\s*Line (\d+) of function script\s*$/i,o=[],c=pt&&pt.document&&pt.document.getElementsByTagName("script"),u=[];for(var a in c)bt(c,a)&&!c[a].src&&u.push(c[a]);for(var h=2;h<n.length;h+=2){var l=null;(e=r.exec(n[h]))?l={url:e[2],func:e[3],args:[],line:+e[1],column:null}:(e=i.exec(n[h]))?l={url:e[3],func:e[4],args:[],line:+e[1],column:null}:(e=s.exec(n[h]))&&(l={url:gt().replace(/#.*$/,""),func:"",args:[],line:e[1],column:null}),l&&(l.func||(l.func=mt),l.context=[n[h+1]],o.push(l))}return o.length?{mode:"multiline",name:t.name,message:n[0],stack:o}:null}(n))return i}catch(t){}try{if(i=e(n,r+1))return i}catch(t){}return{original:n,name:n.name,message:n.message,mode:"failed"}}return r.augmentStackTraceWithInitialElement=n,r.computeStackTraceFromStackProp=t,r}(),vt.collectWindowErrors=!0,vt.linesOfContext=11;const wt=vt.report.subscribe,Et=vt.report.installGlobalHandler,$t=vt.report.installGlobalUnhandledRejectionHandler,_t=vt.computeStackTrace,jt=50;function Ot(t){const n=St(t.stack),e={type:t.name,value:t.message};return n&&n.length&&(e.stacktrace={frames:n}),void 0===e.type&&""===e.value&&(e.value="Unrecoverable error caught"),e}function xt(t){return{exception:{values:[Ot(t)]}}}function St(t){if(!t||!t.length)return[];let n=t;const e=n[0].func||"",r=n[n.length-1].func||"";return(e.includes("captureMessage")||e.includes("captureException"))&&(n=n.slice(1)),r.includes("sentryWrapped")&&(n=n.slice(0,-1)),n.map(t=>({colno:t.column,filename:t.url||n[0].url,function:t.func||"?",in_app:!0,lineno:t.line})).slice(0,jt).reverse()}class kt{constructor(t){this.yt=t,this.bt=[]}isReady(){return void 0===this.yt||this.length()<this.yt}add(t){return Q(this,void 0,void 0,function*(){return this.isReady()?(-1===this.bt.indexOf(t)&&this.bt.push(t),t.then(()=>Q(this,void 0,void 0,function*(){return this.remove(t)})).catch(()=>Q(this,void 0,void 0,function*(){return this.remove(t).catch(()=>{})})),t):Promise.reject(new z("Not adding Promise due to buffer limit reached."))})}remove(t){return Q(this,void 0,void 0,function*(){return this.bt.splice(this.bt.indexOf(t),1)[0]})}length(){return this.bt.length}drain(t){return Q(this,void 0,void 0,function*(){return new Promise(n=>{const e=setTimeout(()=>{t&&t>0&&n(!1)},t);Promise.all(this.bt).then(()=>{clearTimeout(e),n(!0)}).catch(()=>{n(!0)})})})}}class Tt{constructor(t){this.options=t,this.bt=new kt(30),this.url=new Z(this.options.dsn).getStoreEndpointWithUrlEncodedAuth()}sendEvent(t){return Q(this,void 0,void 0,function*(){throw new z("Transport Class has to implement `sendEvent` method")})}close(t){return Q(this,void 0,void 0,function*(){return this.bt.drain(t)})}}const Rt=f();class Ft extends Tt{sendEvent(n){return Q(this,void 0,void 0,function*(){const e={body:JSON.stringify(n),method:"POST",referrerPolicy:dt()?"origin":""};return this.bt.add(Rt.fetch(this.url,e).then(n=>({status:t.Status.fromHttpCode(n.status)})))})}}class Dt extends Tt{sendEvent(n){return Q(this,void 0,void 0,function*(){return this.bt.add(new Promise((e,r)=>{const i=new XMLHttpRequest;i.onreadystatechange=(()=>{4===i.readyState&&(200===i.status&&e({status:t.Status.fromHttpCode(i.status)}),r(i))}),i.open("POST",this.url),i.send(JSON.stringify(n))}))})}}var It=Object.freeze({BaseTransport:Tt,FetchTransport:Ft,XHRTransport:Dt});class Mt extends ot{ot(){if(!this.J.dsn)return super.ot();const t=this.J.transportOptions?this.J.transportOptions:{dsn:this.J.dsn};return this.J.transport?new this.J.transport(t):ft()?new Ft(t):new Dt(t)}eventFromException(n,e){let r;if(s(n)&&n.error){return n=n.error,r=xt(_t(n)),S.resolve(this.gt(r,e))}if(o(n)||(c=n,"[object DOMException]"===Object.prototype.toString.call(c))){const r=n,i=r.name||(o(r)?"DOMError":"DOMException"),s=r.message?`${i}: ${r.message}`:i;return this.eventFromMessage(s,t.Severity.Error,e).then(t=>(b(t,s),S.resolve(this.gt(t,e))))}var c;if(i(n))return r=xt(_t(n)),S.resolve(this.gt(r,e));if(a(n)&&e&&e.syntheticException){return b(r=function(t,n){const e=Object.keys(t).sort(),r={extra:{__serialized__:$(t)},message:`Non-Error exception captured with keys: ${nt(e)}`};if(n){const t=St(_t(n).stack);r.stacktrace={frames:t}}return r}(n,e.syntheticException),"Custom Object",void 0,{handled:!0,synthetic:!0,type:"generic"}),r.level=t.Severity.Error,S.resolve(this.gt(r,e))}const u=n;return this.eventFromMessage(u,void 0,e).then(n=>(b(n,`${u}`,void 0,{handled:!0,synthetic:!0,type:"generic"}),n.level=t.Severity.Error,S.resolve(this.gt(n,e))))}gt(t,n){return Object.assign({},t,{event_id:n&&n.event_id})}eventFromMessage(n,e=t.Severity.Info,r){const i={event_id:r&&r.event_id,level:e,message:n};if(this.J.attachStacktrace&&r&&r.syntheticException){const t=St(_t(r.syntheticException).stack);i.stacktrace={frames:t}}return S.resolve(i)}}const Ct="sentry.javascript.browser",Ut="5.0.5";class Pt extends it{constructor(t={}){super(Mt,t)}et(t,n,e){return t.platform=t.platform||"javascript",t.sdk=Object.assign({},t.sdk,{name:Ct,packages:[...t.sdk&&t.sdk.packages||[],{name:"npm:@sentry/browser",version:Ut}],version:Ut}),super.et(t,n,e)}showReportDialog(t={}){const n=f().document;if(!n)return;if(!this.nt())return void I.error("Trying to call showReportDialog with Sentry Client is disabled");const e=t.dsn||this.getDsn();if(!t.eventId)return void I.error("Missing `eventId` option in showReportDialog call");if(!e)return void I.error("Missing `Dsn` option in showReportDialog call");const r=n.createElement("script");r.async=!0,r.src=new Z(e).getReportDialogEndpoint(t),(n.head||n.body).appendChild(r)}}const At=1e3;let Lt,Nt,Bt=0;function Ht(t,n={},e){if("function"!=typeof t)return t;try{if(t.__sentry__)return t;if(t.__sentry_wrapped__)return t.__sentry_wrapped__}catch(n){return t}const sentryWrapped=function(){e&&"function"==typeof e&&e.apply(this,arguments);const r=Array.prototype.slice.call(arguments);try{const e=r.map(t=>Ht(t,n));return t.handleEvent?t.handleEvent.apply(this,e):t.apply(this,e)}catch(t){throw Bt+=1,setTimeout(()=>{Bt-=1}),X(e=>{e.addEventProcessor(t=>{const e=Object.assign({},t);return n.mechanism&&b(e,void 0,void 0,n.mechanism),e.extra=Object.assign({},e.extra,{arguments:O(r,3)}),e}),captureException(t)}),t}};try{for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(sentryWrapped[n]=t[n])}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.defineProperty(sentryWrapped,"name",{get:()=>t.name})}catch(t){}return sentryWrapped}function qt(t){return n=>{if(Lt=void 0,Nt===n)return;let e;Nt=n;try{e=function(t){let n=t;const e=[];let r=0,i=0;const s=" > ".length;let o;for(;n&&r++<5&&!("html"===(o=p(n))||r>1&&i+e.length*s+o.length>=80);)e.push(o),i+=o.length,n=n.parentNode;return e.reverse().join(" > ")}(n.target)}catch(t){e="<unknown>"}N().addBreadcrumb({category:`ui.${t}`,message:e},{event:n,name:t})}}function Wt(){return t=>{let n;try{n=t.target}catch(t){return}const e=n&&n.tagName;e&&("INPUT"===e||"TEXTAREA"===e||n.isContentEditable)&&(Lt||qt("input")(t),clearTimeout(Lt),Lt=setTimeout(()=>{Lt=void 0},At))}}class Xt{constructor(t){this.name=Xt.id,this.J=Object.assign({onerror:!0,onunhandledrejection:!0},t)}setupOnce(){Error.stackTraceLimit=50,wt((t,n,e)=>{if(Bt>0)return;const r=N().getIntegration(Xt);r&&N().captureEvent(r.wt(t),{data:{stack:t},originalException:e})}),this.J.onerror&&(I.log("Global Handler attached: onerror"),Et()),this.J.onunhandledrejection&&(I.log("Global Handler attached: onunhandledrejection"),$t())}wt(t){const n=xt(t),e={mode:t.mode};t.message&&(e.message=t.message),t.name&&(e.name=t.name);const r=N().getClient(),i=r&&r.getOptions().maxValueLength||250;return b(n,t.original?Y(JSON.stringify(O(t.original)),i):"","onunhandledrejection"===t.mechanism?"UnhandledRejection":"Error",{data:e,handled:!1,type:t.mechanism}),n}}Xt.id="GlobalHandlers";class zt{constructor(){this.Et=0,this.name=zt.id}$t(t){return function(...n){const e=n[0];return n[0]=Ht(e,{mechanism:{data:{function:Gt(t)},handled:!0,type:"instrument"}}),t.apply(this,n)}}_t(t){return function(n){return t(Ht(n,{mechanism:{data:{function:"requestAnimationFrame",handler:Gt(t)},handled:!0,type:"instrument"}}))}}jt(t){const n=f(),e=n[t]&&n[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(w(e,"addEventListener",function(n){return function(e,r,i){try{r.handleEvent=Ht(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:Gt(r),target:t},handled:!0,type:"instrument"}})}catch(t){}let s,o,c;return"EventTarget"!==t&&"Node"!==t||(o=qt("click"),c=Wt(),s=function(t){if(!t)return;let n;try{n=t.type}catch(t){return}return"click"===n?o(t):"keypress"===n?c(t):void 0}),n.call(this,e,Ht(r,{mechanism:{data:{function:"addEventListener",handler:Gt(r),target:t},handled:!0,type:"instrument"}},s),i)}}),w(e,"removeEventListener",function(t){return function(n,e,r){let i=e;try{i=i&&(i.__sentry_wrapped__||i)}catch(t){}return t.call(this,n,i,r)}}))}setupOnce(){this.Et=this.Et;const t=f();w(t,"setTimeout",this.$t.bind(this)),w(t,"setInterval",this.$t.bind(this)),w(t,"requestAnimationFrame",this._t.bind(this)),["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"].forEach(this.jt.bind(this))}}function Gt(t){try{return t&&t.name||"<anonymous>"}catch(t){return"<anonymous>"}}zt.id="TryCatch";const Jt=f();let Vt;class Kt{constructor(t){this.name=Kt.id,this.J=Object.assign({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},t)}Ot(){"console"in Jt&&["debug","info","warn","error","log"].forEach(function(n){n in Jt.console&&w(Jt.console,n,function(e){return function(...r){const i={category:"console",data:{extra:{arguments:O(r,3)},logger:"console"},level:t.Severity.fromString(n),message:tt(r," ")};"assert"===n&&!1===r[0]&&(i.message=`Assertion failed: ${tt(r.slice(1)," ")||"console.assert"}`,i.data.extra.arguments=O(r.slice(1),3)),Kt.addBreadcrumb(i,{input:r,level:n}),e&&Function.prototype.apply.call(e,Jt.console,r)}})})}xt(){"document"in Jt&&(Jt.document.addEventListener("click",qt("click"),!1),Jt.document.addEventListener("keypress",Wt(),!1))}St(){ft()&&-1!==f().fetch.toString().indexOf("native")&&w(Jt,"fetch",function(n){return function(...e){const r=e[0];let i,s="GET";"string"==typeof r?i=r:"Request"in Jt&&r instanceof Request?(i=r.url,r.method&&(s=r.method)):i=String(r),e[1]&&e[1].method&&(s=e[1].method);const o=N().getClient(),c=o&&o.getDsn();if(c){const t=new Z(c).getStoreEndpoint();if(t&&i.includes(t))return"POST"===s&&e[1]&&e[1].body&&Zt(e[1].body),n.apply(Jt,e)}const u={method:s,url:i};return n.apply(Jt,e).then(t=>(u.status_code=t.status,Kt.addBreadcrumb({category:"fetch",data:u,type:"http"},{input:e,response:t}),t)).catch(n=>{throw Kt.addBreadcrumb({category:"fetch",data:u,level:t.Severity.Error,type:"http"},{error:n,input:e}),n})}})}kt(){if(!function(){const t=f(),n=t.chrome,e=n&&n.app&&n.app.runtime,r="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!e&&r}())return;const t=(t,n)=>{const e=v(Jt.location.href),r=v(n);let i=v(t);i.path||(i=e),Vt=n,e.protocol===r.protocol&&e.host===r.host&&(n=r.relative),e.protocol===i.protocol&&e.host===i.host&&(t=i.relative),Kt.addBreadcrumb({category:"navigation",data:{from:t,to:n}})},n=Jt.onpopstate;function e(n){return function(...e){const r=e.length>2?e[2]:void 0;return r&&t(Vt,String(r)),n.apply(this,e)}}Jt.onpopstate=((...e)=>{const r=Jt.location.href;if(t(Vt,r),n)return n.apply(this,e)}),w(Jt.history,"pushState",e),w(Jt.history,"replaceState",e)}Tt(){if(!("XMLHttpRequest"in Jt))return;const t=XMLHttpRequest.prototype;w(t,"open",t=>(function(...n){const e=n[1];this.__sentry_xhr__={method:n[0],url:n[1]};const r=N().getClient(),i=r&&r.getDsn();if(i){const t=new Z(i).getStoreEndpoint();c(e)&&t&&e.includes(t)&&(this.__sentry_own_request__=!0)}return t.apply(this,n)})),w(t,"send",t=>(function(...n){const e=this;function r(){if(4===e.readyState){if(e.__sentry_own_request__)return;try{e.__sentry_xhr__&&(e.__sentry_xhr__.status_code=e.status)}catch(t){}Kt.addBreadcrumb({category:"xhr",data:e.__sentry_xhr__,type:"http"},{xhr:e})}}return e.__sentry_own_request__&&Zt(n[0]),["onload","onerror","onprogress"].forEach(t=>{!function(t,n){t in n&&"function"==typeof n[t]&&w(n,t,n=>Ht(n,{mechanism:{data:{function:t,handler:n&&n.name||"<anonymous>"},handled:!0,type:"instrument"}}))}(t,e)}),"onreadystatechange"in e&&"function"==typeof e.onreadystatechange?w(e,"onreadystatechange",function(t){return Ht(t,{mechanism:{data:{function:"onreadystatechange",handler:t&&t.name||"<anonymous>"},handled:!0,type:"instrument"}},r)}):e.onreadystatechange=r,t.apply(this,n)}))}static addBreadcrumb(t,n){N().getIntegration(Kt)&&N().addBreadcrumb(t,n)}setupOnce(){this.J.console&&this.Ot(),this.J.dom&&this.xt(),this.J.xhr&&this.Tt(),this.J.fetch&&this.St(),this.J.history&&this.kt()}}function Zt(n){try{const e=JSON.parse(n);Kt.addBreadcrumb({category:"sentry",event_id:e.event_id,level:e.level||t.Severity.fromString("error"),message:m(e)},{event:e})}catch(t){I.error("Error while adding sentry type breadcrumb")}}Kt.id="Breadcrumbs";const Qt="cause",Yt=5;class tn{constructor(t={}){this.name=tn.id,this.Rt=t.key||Qt,this.yt=t.limit||Yt}setupOnce(){R((t,n)=>{const e=N().getIntegration(tn);return e?e.handler(t,n):t})}handler(t,n){if(!(t.exception&&t.exception.values&&n&&n.originalException instanceof Error))return t;const e=this.walkErrorTree(n.originalException,this.Rt);return t.exception.values=[...e,...t.exception.values],t}walkErrorTree(t,n,e=[]){if(!(t[n]instanceof Error)||e.length+1>=this.yt)return e;const r=Ot(_t(t[n]));return this.walkErrorTree(t[n],n,[r,...e])}}tn.id="LinkedErrors";const nn=f();class en{constructor(){this.name=en.id}setupOnce(){R(t=>{if(N().getIntegration(en)){if(!nn.navigator||!nn.location)return t;const n=t.request||{};return n.url=n.url||nn.location.href,n.headers=n.headers||{},n.headers["User-Agent"]=nn.navigator.userAgent,Object.assign({},t,{request:n})}return t})}}en.id="UserAgent";var rn=Object.freeze({GlobalHandlers:Xt,TryCatch:zt,Breadcrumbs:Kt,LinkedErrors:tn,UserAgent:en});const sn=[new ht,new ut,new zt,new Kt,new Xt,new tn,new en];let on={};const cn=f();cn.Sentry&&cn.Sentry.Integrations&&(on=cn.Sentry.Integrations);const un=Object.assign({},on,lt,rn);return t.Integrations=un,t.Transports=It,t.addGlobalEventProcessor=R,t.addBreadcrumb=function(t){W("addBreadcrumb",t)},t.captureException=captureException,t.captureEvent=function(t){return W("captureEvent",t)},t.captureMessage=function(t,n){let e;try{throw new Error(t)}catch(t){e=t}return W("captureMessage",t,n,{originalException:t,syntheticException:e})},t.configureScope=function(t){W("configureScope",t)},t.withScope=X,t.getHubFromCarrier=H,t.getCurrentHub=N,t.Hub=P,t.Scope=k,t.BrowserClient=Pt,t.defaultIntegrations=sn,t.forceLoad=function(){},t.init=function(t={}){void 0===t.defaultIntegrations&&(t.defaultIntegrations=sn),function(t,n){!0===n.debug&&I.enable(),N().bindClient(new t(n))}(Pt,t)},t.lastEventId=function(){return N().lastEventId()},t.onLoad=function(t){t()},t.showReportDialog=function(t={}){t.eventId||(t.eventId=N().lastEventId());const n=N().getClient();n&&n.showReportDialog(t)},t.flush=function(t){return Q(this,void 0,void 0,function*(){const n=N().getClient();return n?n.flush(t):Promise.reject(!1)})},t.close=function(t){return Q(this,void 0,void 0,function*(){const n=N().getClient();return n?n.close(t):Promise.reject(!1)})},t.SDK_NAME=Ct,t.SDK_VERSION=Ut,t}({});
//# sourceMappingURL=bundle.es6.min.js.map

@@ -1,3 +0,3 @@

/*! @sentry/browser 5.0.3 (70ef0838) | https://github.com/getsentry/sentry-javascript */
var Sentry=function(n){"use strict";var t=function(n,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r])})(n,r)};function r(n,r){function i(){this.constructor=n}t(n,r),n.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}var i,e,o,u=function(){return(u=Object.assign||function(n){for(var t,r=1,i=arguments.length;r<i;r++)for(var e in t=arguments[r])Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}).apply(this,arguments)};function c(n,t,r,i){return new(r||(r=Promise))(function(e,o){function u(n){try{s(i.next(n))}catch(n){o(n)}}function c(n){try{s(i.throw(n))}catch(n){o(n)}}function s(n){n.done?e(n.value):new r(function(t){t(n.value)}).then(u,c)}s((i=i.apply(n,t||[])).next())})}function s(n,t){var r,i,e,o,u={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,i&&(e=2&o[0]?i.return:o[0]?i.throw||((e=i.return)&&e.call(i),0):i.next)&&!(e=e.call(i,o[1])).done)return e;switch(i=0,e&&(o=[2&o[0],e.value]),o[0]){case 0:case 1:e=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,i=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(e=(e=u.trys).length>0&&e[e.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!e||o[1]>e[0]&&o[1]<e[3])){u.label=o[1];break}if(6===o[0]&&u.label<e[1]){u.label=e[1],e=o;break}if(e&&u.label<e[2]){u.label=e[2],u.ops.push(o);break}e[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(n,u)}catch(n){o=[6,n],i=0}finally{r=e=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}function f(n,t){var r="function"==typeof Symbol&&n[Symbol.iterator];if(!r)return n;var i,e,o=r.call(n),u=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)u.push(i.value)}catch(n){e={error:n}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return u}function a(){for(var n=[],t=0;t<arguments.length;t++)n=n.concat(f(arguments[t]));return n}function h(n){switch(Object.prototype.toString.call(n)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return n instanceof Error}}function v(n){return"[object ErrorEvent]"===Object.prototype.toString.call(n)}function l(n){return"[object DOMError]"===Object.prototype.toString.call(n)}function d(n){return"[object String]"===Object.prototype.toString.call(n)}function p(n){return null===n||"object"!=typeof n&&"function"!=typeof n}function m(n){return"[object Object]"===Object.prototype.toString.call(n)}function y(n){return Boolean(n&&n.then&&"function"==typeof n.then)}!function(n){n[n.None=0]="None",n[n.Error=1]="Error",n[n.Debug=2]="Debug",n[n.Verbose=3]="Verbose"}(i||(i={})),(e=n.Severity||(n.Severity={})).Fatal="fatal",e.Error="error",e.Warning="warning",e.Log="log",e.Info="info",e.Debug="debug",e.Critical="critical",function(n){n.fromString=function(t){switch(t){case"debug":return n.Debug;case"info":return n.Info;case"warn":case"warning":return n.Warning;case"error":return n.Error;case"fatal":return n.Fatal;case"critical":return n.Critical;case"log":default:return n.Log}}}(n.Severity||(n.Severity={})),(o=n.Status||(n.Status={})).Unknown="unknown",o.Skipped="skipped",o.Success="success",o.RateLimit="rate_limit",o.Invalid="invalid",o.Failed="failed",function(n){n.fromHttpCode=function(t){return t>=200&&t<300?n.Success:429===t?n.RateLimit:t>=400&&t<500?n.Invalid:t>=500?n.Failed:n.Unknown}}(n.Status||(n.Status={}));var b={};function w(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:b}function g(){var n=w(),t=n.crypto||n.msCrypto;if(void 0!==t&&t.getRandomValues){var r=new Uint16Array(8);t.getRandomValues(r),r[3]=4095&r[3]|16384,r[4]=16383&r[4]|32768;var i=function(n){for(var t=n.toString(16);t.length<4;)t="0"+t;return t};return i(r[0])+i(r[1])+i(r[2])+i(r[3])+i(r[4])+i(r[5])+i(r[6])+i(r[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=16*Math.random()|0;return("x"===n?t:3&t|8).toString(16)})}function E(n){var t,r,i,e,o,u=[];if(!n||!n.tagName)return"";if(u.push(n.tagName.toLowerCase()),n.id&&u.push("#"+n.id),(t=n.className)&&d(t))for(r=t.split(/\s+/),o=0;o<r.length;o++)u.push("."+r[o]);var c=["type","name","title","alt"];for(o=0;o<c.length;o++)i=c[o],(e=n.getAttribute(i))&&u.push("["+i+'="'+e+'"]');return u.join("")}function x(n){if(!n)return{};var t=n.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var r=t[6]||"",i=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+r+i}}function j(n){if(n.message)return n.message;if(n.exception&&n.exception.values&&n.exception.values[0]){var t=n.exception.values[0];return t.type&&t.value?t.type+": "+t.value:t.type||t.value||n.event_id||"<unknown>"}return n.event_id||"<unknown>"}function S(n){var t=w();if(!("console"in t))return n();var r=t.console,i={};["debug","info","warn","error","log"].forEach(function(n){n in t.console&&r[n].__sentry__&&(i[n]=r[n].__sentry_wrapped__,r[n]=r[n].__sentry_original__)});var e=n();return Object.keys(i).forEach(function(n){r[n]=i[n]}),e}function _(n,t,r,i){void 0===i&&(i={handled:!0,type:"generic"}),n.exception=n.exception||{},n.exception.values=n.exception.values||[],n.exception.values[0]=n.exception.values[0]||{},n.exception.values[0].value=n.exception.values[0].value||t||"",n.exception.values[0].type=n.exception.values[0].type||r||"Error",n.exception.values[0].mechanism=n.exception.values[0].mechanism||i}var O,k=function(){function n(){this.t="function"==typeof WeakSet,this.i=this.t?new WeakSet:[]}return n.prototype.memoize=function(n){if(this.t)return!!this.i.has(n)||(this.i.add(n),!1);for(var t=0;t<this.i.length;t++){if(this.i[t]===n)return!0}return this.i.push(n),!1},n.prototype.unmemoize=function(n){if(this.t)this.i.delete(n);else for(var t=0;t<this.i.length;t++)if(this.i[t]===n){this.i.splice(t,1);break}},n}();function T(n,t,r){if(t in n&&!n[t].__sentry__){var i=n[t],e=r(i);"function"==typeof e&&(e.prototype=e.prototype||{},Object.defineProperties(e,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:i},__sentry_wrapped__:{enumerable:!1,value:e}})),n[t]=e}}function R(n){return function(n){return~-encodeURI(n).split(/%..|./).length}(JSON.stringify(n))}function D(n,t,r){void 0===t&&(t=3),void 0===r&&(r=102400);var i=C(n,t);return R(i)>r?D(n,t-1,r):i}function I(n,t){return"domain"===t&&"object"==typeof n&&n.o?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!=typeof global&&n===global?"[Global]":"undefined"!=typeof window&&n===window?"[Window]":"undefined"!=typeof document&&n===document?"[Document]":"undefined"!=typeof Event&&n instanceof Event?Object.getPrototypeOf(n)?n.constructor.name:"Event":m(r=n)&&"nativeEvent"in r&&"preventDefault"in r&&"stopPropagation"in r?"[SyntheticEvent]":Number.isNaN(n)?"[NaN]":void 0===n?"[undefined]":"function"==typeof n?"[Function: "+(n.name||"<unknown-function-name>")+"]":n;var r}function A(n,t,r,i){if(void 0===r&&(r=1/0),void 0===i&&(i=new k),0===r)return function(n){var t=Object.prototype.toString.call(n);if("string"==typeof n)return n;if("[object Object]"===t)return"[Object]";if("[object Array]"===t)return"[Array]";var r=I(n);return p(r)?r:t}(t);if(null!=t&&"function"==typeof t.toJSON)return t.toJSON();var e=I(t,n);if(p(e))return e;var o=h(t)?function(n){var t={message:n.message,name:n.name,stack:n.stack};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}(t):t,u=Array.isArray(t)?[]:{};if(i.memoize(t))return"[Circular ~]";for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(u[c]=A(c,o[c],r-1,i));return i.unmemoize(t),u}function C(n,t){try{return JSON.parse(JSON.stringify(n,function(n,r){return A(n,r,t)}))}catch(n){return"**non-serializable**"}}!function(n){n.PENDING="PENDING",n.RESOLVED="RESOLVED",n.REJECTED="REJECTED"}(O||(O={}));var M=function(){function n(n){var t=this;this.u=O.PENDING,this.s=[],this.h=function(n){t.v(n,O.RESOLVED)},this.l=function(n){t.v(n,O.REJECTED)},this.v=function(n,r){t.u===O.PENDING&&(y(n)?n.then(t.h,t.l):(t.p=n,t.u=r,t.m()))},this.m=function(){t.u!==O.PENDING&&(t.u===O.REJECTED?t.s.forEach(function(n){return n.onFail&&n.onFail(t.p)}):t.s.forEach(function(n){return n.onSuccess&&n.onSuccess(t.p)}),t.s=[])},this.g=function(n){t.s=t.s.concat(n),t.m()};try{n(this.h,this.l)}catch(n){this.l(n)}}return n.prototype.then=function(t,r){var i=this;return new n(function(n,e){i.g({onFail:function(t){if(r)try{return void n(r(t))}catch(n){return void e(n)}else e(t)},onSuccess:function(r){if(t)try{return void n(t(r))}catch(n){return void e(n)}else n(r)}})})},n.prototype.catch=function(n){return this.then(function(n){return n},n)},n.prototype.toString=function(){return"[object SyncPromise]"},n.resolve=function(t){return new n(function(n){n(t)})},n.reject=function(t){return new n(function(n,r){r(t)})},n}(),N=function(){function n(){this.j=!1,this.S=[],this._=[],this.O=[],this.k={},this.T={},this.R={}}return n.prototype.addScopeListener=function(n){this.S.push(n)},n.prototype.addEventProcessor=function(n){return this._.push(n),this},n.prototype.D=function(){var n=this;this.j||(this.j=!0,setTimeout(function(){n.S.forEach(function(t){t(n)}),n.j=!1}))},n.prototype.I=function(n,t,r,i){var e=this;return void 0===i&&(i=0),new M(function(o,c){var s=n[i];if(null===t||"function"!=typeof s)o(t);else{var f=s(u({},t),r);y(f)?f.then(function(t){return e.I(n,t,r,i+1).then(o)}).catch(c):e.I(n,f,r,i+1).then(o).catch(c)}})},n.prototype.setUser=function(n){return this.k=C(n),this.D(),this},n.prototype.setTags=function(n){return this.T=u({},this.T,C(n)),this.D(),this},n.prototype.setTag=function(n,t){var r;return this.T=u({},this.T,((r={})[n]=C(t),r)),this.D(),this},n.prototype.setExtras=function(n){return this.R=u({},this.R,C(n)),this.D(),this},n.prototype.setExtra=function(n,t){var r;return this.R=u({},this.R,((r={})[n]=C(t),r)),this.D(),this},n.prototype.setFingerprint=function(n){return this.A=C(n),this.D(),this},n.prototype.setLevel=function(n){return this.C=C(n),this.D(),this},n.clone=function(t){var r=new n;return Object.assign(r,t,{S:[]}),t&&(r.O=a(t.O),r.T=u({},t.T),r.R=u({},t.R),r.k=t.k,r.C=t.C,r.A=t.A,r._=a(t._)),r},n.prototype.clear=function(){return this.O=[],this.T={},this.R={},this.k={},this.C=void 0,this.A=void 0,this.D(),this},n.prototype.addBreadcrumb=function(n,t){return this.O=void 0!==t&&t>=0?a(this.O,[C(n)]).slice(-t):a(this.O,[C(n)]),this.D(),this},n.prototype.clearBreadcrumbs=function(){return this.O=[],this.D(),this},n.prototype.M=function(n){n.fingerprint=n.fingerprint?Array.isArray(n.fingerprint)?n.fingerprint:[n.fingerprint]:[],this.A&&(n.fingerprint=n.fingerprint.concat(this.A)),n.fingerprint&&!n.fingerprint.length&&delete n.fingerprint},n.prototype.applyToEvent=function(n,t){return this.R&&Object.keys(this.R).length&&(n.extra=u({},this.R,n.extra)),this.T&&Object.keys(this.T).length&&(n.tags=u({},this.T,n.tags)),this.k&&Object.keys(this.k).length&&(n.user=u({},this.k,n.user)),this.C&&(n.level=this.C),this.M(n),(!n.breadcrumbs||0===n.breadcrumbs.length)&&this.O.length>0&&(n.breadcrumbs=this.O),this.I(a(F(),this._),n,t)},n}();function F(){var n=w();return n.__SENTRY__=n.__SENTRY__||{},n.__SENTRY__.globalEventProcessors=n.__SENTRY__.globalEventProcessors||[],n.__SENTRY__.globalEventProcessors}function U(n){F().push(n)}var L=w(),P="Sentry Logger ",$=function(){function n(){this.N=!1}return n.prototype.disable=function(){this.N=!1},n.prototype.enable=function(){this.N=!0},n.prototype.log=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.N&&S(function(){L.console.log(P+"[Log]: "+n.join(" "))})},n.prototype.warn=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.N&&S(function(){L.console.warn(P+"[Warn]: "+n.join(" "))})},n.prototype.error=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.N&&S(function(){L.console.error(P+"[Error]: "+n.join(" "))})},n}();L.__SENTRY__=L.__SENTRY__||{};var q=L.__SENTRY__.logger||(L.__SENTRY__.logger=new $),H=3,W=function(){function n(n,t,r){void 0===t&&(t=new N),void 0===r&&(r=H),this.F=r,this.U=[],this.U.push({client:n,scope:t})}return n.prototype.L=function(n){for(var t,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var e=this.getStackTop();e&&e.client&&e.client[n]&&(t=e.client)[n].apply(t,a(r,[e.scope]))},n.prototype.isOlderThan=function(n){return this.F<n},n.prototype.bindClient=function(n){this.getStackTop().client=n},n.prototype.pushScope=function(){var n=this.getStack(),t=n.length>0?n[n.length-1].scope:void 0,r=N.clone(t);return this.getStack().push({client:this.getClient(),scope:r}),r},n.prototype.popScope=function(){return void 0!==this.getStack().pop()},n.prototype.withScope=function(n){var t=this.pushScope();try{n(t)}finally{this.popScope()}},n.prototype.getClient=function(){return this.getStackTop().client},n.prototype.getScope=function(){return this.getStackTop().scope},n.prototype.getStack=function(){return this.U},n.prototype.getStackTop=function(){return this.U[this.U.length-1]},n.prototype.captureException=function(n,t){var r=this.P=g();return this.L("captureException",n,u({},t,{event_id:r})),r},n.prototype.captureMessage=function(n,t,r){var i=this.P=g();return this.L("captureMessage",n,t,u({},r,{event_id:i})),i},n.prototype.captureEvent=function(n,t){var r=this.P=g();return this.L("captureEvent",n,u({},t,{event_id:r})),r},n.prototype.lastEventId=function(){return this.P},n.prototype.addBreadcrumb=function(n,t){var r=this.getStackTop();if(r.scope&&r.client){var i=r.client.getOptions(),e=i.beforeBreadcrumb,o=i.maxBreadcrumbs,c=void 0===o?30:o;if(!(c<=0)){var s=(new Date).getTime()/1e3,f=u({timestamp:s},n),a=e?S(function(){return e(f,t)}):f;null!==a&&r.scope.addBreadcrumb(a,Math.min(c,100))}}},n.prototype.configureScope=function(n){var t=this.getStackTop();t.scope&&t.client&&n(t.scope)},n.prototype.run=function(n){var t=G(this);try{n(this)}finally{G(t)}},n.prototype.getIntegration=function(n){var t=this.getClient();if(!t)return null;try{return t.getIntegration(n)}catch(t){return q.warn("Cannot retrieve integration "+n.id+" from the current Hub"),null}},n}();function B(){var n=w();return n.__SENTRY__=n.__SENTRY__||{hub:void 0},n}function G(n){var t=B(),r=z(t);return V(t,n),r}function J(){var n,t,r=B();X(r)&&!z(r).isOlderThan(H)||V(r,new W);try{var i=(n=module,t="domain",n.require(t)).active;if(!i)return z(r);if(!X(i)||z(i).isOlderThan(H)){var e=z(r).getStackTop();V(i,new W(e.client,N.clone(e.scope)))}return z(i)}catch(n){return z(r)}}function X(n){return!!(n&&n.__SENTRY__&&n.__SENTRY__.hub)}function z(n){return n&&n.__SENTRY__&&n.__SENTRY__.hub?n.__SENTRY__.hub:(n.__SENTRY__=n.__SENTRY__||{},n.__SENTRY__.hub=new W,n.__SENTRY__.hub)}function V(n,t){return!!n&&(n.__SENTRY__=n.__SENTRY__||{},n.__SENTRY__.hub=t,!0)}function K(n){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=J();if(i&&i[n])return i[n].apply(i,a(t));throw new Error("No hub defined or "+n+" was not found on the hub, please open a bug report.")}function captureException(n){var t;try{throw new Error("Sentry syntheticException")}catch(n){t=n}return K("captureException",n,{originalException:n,syntheticException:t})}function Z(n){K("withScope",n)}var Q=function(n){function t(t){var r=this.constructor,i=n.call(this,t)||this;return i.message=t,i.name=r.prototype.constructor.name,Object.setPrototypeOf(i,r.prototype),i}return r(t,n),t}(Error),Y=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w\.-]+)(?::(\d+))?\/(.+)/,nn=function(){function n(n){"string"==typeof n?this.$(n):this.q(n),this.H()}return n.prototype.toString=function(n){void 0===n&&(n=!1);var t=this,r=t.host,i=t.path,e=t.pass,o=t.port,u=t.projectId;return t.protocol+"://"+t.user+(n&&e?":"+e:"")+"@"+r+(o?":"+o:"")+"/"+(i?i+"/":i)+u},n.prototype.$=function(n){var t=Y.exec(n);if(!t)throw new Q("Invalid Dsn");var r=f(t.slice(1),6),i=r[0],e=r[1],o=r[2],u=void 0===o?"":o,c=r[3],s=r[4],a=void 0===s?"":s,h="",v=r[5],l=v.split("/");l.length>1&&(h=l.slice(0,-1).join("/"),v=l.pop()),Object.assign(this,{host:c,pass:u,path:h,projectId:v,port:a,protocol:i,user:e})},n.prototype.q=function(n){this.protocol=n.protocol,this.user=n.user,this.pass=n.pass||"",this.host=n.host,this.port=n.port||"",this.path=n.path||"",this.projectId=n.projectId},n.prototype.H=function(){var n=this;if(["protocol","user","host","projectId"].forEach(function(t){if(!n[t])throw new Q("Invalid Dsn")}),"http"!==this.protocol&&"https"!==this.protocol)throw new Q("Invalid Dsn");if(this.port&&Number.isNaN(parseInt(this.port,10)))throw new Q("Invalid Dsn")},n}(),tn=function(){function n(n){this.dsn=n,this.W=new nn(n)}return n.prototype.getDsn=function(){return this.W},n.prototype.getStoreEndpoint=function(){return""+this.B()+this.getStoreEndpointPath()},n.prototype.getStoreEndpointWithUrlEncodedAuth=function(){var n,t={sentry_key:this.W.user,sentry_version:"7"};return this.getStoreEndpoint()+"?"+(n=t,Object.keys(n).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(n[t])}).join("&"))},n.prototype.B=function(){var n=this.W,t=n.protocol?n.protocol+":":"",r=n.port?":"+n.port:"";return t+"//"+n.host+r},n.prototype.getStoreEndpointPath=function(){var n=this.W;return(n.path?"/"+n.path:"")+"/api/"+n.projectId+"/store/"},n.prototype.getRequestHeaders=function(n,t){var r=this.W,i=["Sentry sentry_version=7"];return i.push("sentry_timestamp="+(new Date).getTime()),i.push("sentry_client="+n+"/"+t),i.push("sentry_key="+r.user),r.pass&&i.push("sentry_secret="+r.pass),{"Content-Type":"application/json","X-Sentry-Auth":i.join(", ")}},n.prototype.getReportDialogEndpoint=function(n){void 0===n&&(n={});var t=this.W,r=this.B()+(t.path?"/"+t.path:"")+"/api/embed/error-page/",i=[];for(var e in i.push("dsn="+t.toString()),n)if("user"===e){if(!n.user)continue;n.user.name&&i.push("name="+encodeURIComponent(n.user.name)),n.user.email&&i.push("email="+encodeURIComponent(n.user.email))}else i.push(encodeURIComponent(e)+"="+encodeURIComponent(n[e]));return i.length?r+"?"+i.join("&"):r},n}();function rn(n,t){return void 0===t&&(t=0),0===t?n:n.length<=t?n:n.substr(0,t)+"..."}function en(n,t){if(!Array.isArray(n))return"";for(var r=[],i=0;i<n.length;i++){var e=n[i];try{r.push(String(e))}catch(n){r.push("[value cannot be serialized]")}}return r.join(t)}function on(n,t){if(void 0===t&&(t=40),!n.length)return"[object has no keys]";if(n[0].length>=t)return rn(n[0],t);for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(!(i.length>t))return r===n.length?i:rn(i,t)}return""}var un=[];function cn(n){var t={};return function(n){var t=n.defaultIntegrations&&a(n.defaultIntegrations)||[],r=n.integrations,i=[];if(Array.isArray(r)){var e=r.map(function(n){return n.name}),o=[];t.forEach(function(n){-1===e.indexOf(n.name)&&-1===o.indexOf(n.name)&&(i.push(n),o.push(n.name))}),r.forEach(function(n){-1===o.indexOf(n.name)&&(i.push(n),o.push(n.name))})}else{if("function"!=typeof r)return a(t);i=r(t),i=Array.isArray(i)?i:[i]}return i}(n).forEach(function(n){t[n.name]=n,function(n){-1===un.indexOf(n.name)&&(n.setupOnce(U,J),un.push(n.name),q.log("Integration installed: "+n.name))}(n)}),t}var sn,fn=function(){function n(n,t){this.G=!1,this.J=new n(t),this.X=t,t.dsn&&(this.V=new nn(t.dsn)),this.K=cn(this.X)}return n.prototype.captureException=function(n,t,r){var i=this,e=t&&t.event_id;return this.G=!0,this.Z().eventFromException(n,t).then(function(n){return i.Y(n,t,r)}).then(function(n){e=n&&n.event_id,i.G=!1}).catch(function(n){q.log(n),i.G=!1}),e},n.prototype.captureMessage=function(n,t,r,i){var e=this,o=r&&r.event_id;return this.G=!0,(p(n)?this.Z().eventFromMessage(""+n,t,r):this.Z().eventFromException(n,r)).then(function(n){return e.Y(n,r,i)}).then(function(n){o=n&&n.event_id,e.G=!1}).catch(function(n){q.log(n),e.G=!1}),o},n.prototype.captureEvent=function(n,t,r){var i=this,e=t&&t.event_id;return this.G=!0,this.Y(n,t,r).then(function(n){e=n&&n.event_id,i.G=!1}).catch(function(n){q.log(n),i.G=!1}),e},n.prototype.getDsn=function(){return this.V},n.prototype.getOptions=function(){return this.X},n.prototype.flush=function(n){return c(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,Promise.all([this.Z().getTransport().close(n),this.nn()])];case 1:return[2,t.sent().reduce(function(n,t){return n&&t})]}})})},n.prototype.close=function(n){return c(this,void 0,void 0,function(){var t=this;return s(this,function(r){return[2,this.flush(n).finally(function(){t.getOptions().enabled=!1})]})})},n.prototype.getIntegrations=function(){return this.K||{}},n.prototype.getIntegration=function(n){try{return this.K[n.id]||null}catch(t){return q.warn("Cannot retrieve integration "+n.id+" from the current Client"),null}},n.prototype.nn=function(n){return void 0===n&&(n=0),c(this,void 0,void 0,function(){var t=this;return s(this,function(r){return[2,new Promise(function(r){t.G?n>=10?r(!1):setTimeout(function(){return c(t,void 0,void 0,function(){var t;return s(this,function(i){switch(i.label){case 0:return t=r,[4,this.nn(n+1)];case 1:return t.apply(void 0,[i.sent()]),[2]}})})},10):r(!0)})]})})},n.prototype.Z=function(){return this.J},n.prototype.tn=function(){return!1!==this.getOptions().enabled&&void 0!==this.V},n.prototype.rn=function(n,t,r){var i=this.getOptions(),e=i.environment,o=i.release,c=i.dist,s=i.maxValueLength,f=void 0===s?250:s,a=u({},n);void 0===a.environment&&void 0!==e&&(a.environment=e),void 0===a.release&&void 0!==o&&(a.release=o),void 0===a.dist&&void 0!==c&&(a.dist=c),a.message&&(a.message=rn(a.message,f));var h=a.exception&&a.exception.values&&a.exception.values[0];h&&h.value&&(h.value=rn(h.value,f));var v=a.request;v&&v.url&&(v.url=rn(v.url,f)),void 0===a.event_id&&(a.event_id=g()),this.in(a.sdk);var l=M.resolve(a);return t&&(l=t.applyToEvent(a,r)),l},n.prototype.in=function(n){var t=Object.keys(this.K);n&&t.length>0&&(n.integrations=t)},n.prototype.Y=function(n,t,r){var i=this,e=this.getOptions(),o=e.beforeSend,u=e.sampleRate;return this.tn()?"number"==typeof u&&Math.random()>u?M.reject("This event has been sampled, will not send event."):new M(function(e,u){i.rn(n,r,t).then(function(n){if(null!==n){var r=n;try{if(t&&t.data&&!0===t.data.__sentry__||!o)return i.Z().sendEvent(r),void e(r);var c=o(n,t);if(void 0===c)q.error("`beforeSend` method has to return `null` or a valid event.");else if(y(c))i.en(c,e,u);else{if(null===(r=c))return q.log("`beforeSend` returned `null`, will not send event."),void e(null);i.Z().sendEvent(r),e(r)}}catch(n){i.captureException(n,{data:{__sentry__:!0},originalException:n}),u("`beforeSend` throw an error, will not send event.")}}else u("An event processor returned null, will not send event.")})}):M.reject("SDK not enabled, will not send event.")},n.prototype.en=function(n,t,r){var i=this;n.then(function(n){null!==n?(i.Z().sendEvent(n),t(n)):r("`beforeSend` returned `null`, will not send event.")}).catch(function(n){r("beforeSend rejected with "+n)})},n}(),an=function(){function t(){}return t.prototype.sendEvent=function(t){return c(this,void 0,void 0,function(){return s(this,function(t){return[2,Promise.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:n.Status.Skipped})]})})},t.prototype.close=function(n){return c(this,void 0,void 0,function(){return s(this,function(n){return[2,Promise.resolve(!0)]})})},t}(),hn=function(){function n(n){this.X=n,this.X.dsn||q.warn("No DSN provided, backend will not do anything."),this.on=this.un()}return n.prototype.un=function(){return new an},n.prototype.eventFromException=function(n,t){throw new Q("Backend has to implement `eventFromException` method")},n.prototype.eventFromMessage=function(n,t,r){throw new Q("Backend has to implement `eventFromMessage` method")},n.prototype.sendEvent=function(n){this.on.sendEvent(n).catch(function(n){q.error("Error while sending event: "+n)})},n.prototype.getTransport=function(){return this.on},n}();var vn=function(){function n(){this.name=n.id}return n.prototype.setupOnce=function(){sn=Function.prototype.toString,Function.prototype.toString=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var r=this.__sentry__?this.__sentry_original__:this;return sn.apply(r,n)}},n.id="FunctionToString",n}(),ln=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],dn=function(){function n(t){void 0===t&&(t={}),this.X=t,this.name=n.id}return n.prototype.setupOnce=function(){U(function(t){var r=J();if(!r)return t;var i=r.getIntegration(n);if(i){var e=r.getClient(),o=e?e.getOptions():{},u=i.cn(o);if(i.sn(t,u))return null}return t})},n.prototype.sn=function(n,t){return this.fn(n,t)?(q.warn("Event dropped due to being internal Sentry Error.\nEvent: "+j(n)),!0):this.an(n,t)?(q.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+j(n)),!0):this.hn(n,t)?(q.warn("Event dropped due to being matched by `blacklistUrls` option.\nEvent: "+j(n)+".\nUrl: "+this.vn(n)),!0):!this.ln(n,t)&&(q.warn("Event dropped due to not being matched by `whitelistUrls` option.\nEvent: "+j(n)+".\nUrl: "+this.vn(n)),!0)},n.prototype.fn=function(n,t){if(void 0===t&&(t={}),!t.ignoreInternal)return!1;try{return"SentryError"===n.exception.values[0].type}catch(n){return!1}},n.prototype.an=function(n,t){var r=this;return void 0===t&&(t={}),!(!t.ignoreErrors||!t.ignoreErrors.length)&&this.dn(n).some(function(n){return t.ignoreErrors.some(function(t){return r.pn(n,t)})})},n.prototype.hn=function(n,t){var r=this;if(void 0===t&&(t={}),!t.blacklistUrls||!t.blacklistUrls.length)return!1;var i=this.vn(n);return!!i&&t.blacklistUrls.some(function(n){return r.pn(i,n)})},n.prototype.ln=function(n,t){var r=this;if(void 0===t&&(t={}),!t.whitelistUrls||!t.whitelistUrls.length)return!0;var i=this.vn(n);return!i||t.whitelistUrls.some(function(n){return r.pn(i,n)})},n.prototype.cn=function(n){return void 0===n&&(n={}),{blacklistUrls:a(this.X.blacklistUrls||[],n.blacklistUrls||[]),ignoreErrors:a(this.X.ignoreErrors||[],n.ignoreErrors||[],ln),ignoreInternal:void 0===this.X.ignoreInternal||this.X.ignoreInternal,whitelistUrls:a(this.X.whitelistUrls||[],n.whitelistUrls||[])}},n.prototype.pn=function(n,t){return r=t,"[object RegExp]"===Object.prototype.toString.call(r)?t.test(n):"string"==typeof t&&n.includes(t);var r},n.prototype.dn=function(n){if(n.message)return[n.message];if(n.exception)try{var t=n.exception.values[0],r=t.type,i=t.value;return[""+i,r+": "+i]}catch(t){return q.error("Cannot extract message for event "+j(n)),[]}return[]},n.prototype.vn=function(n){try{if(n.stacktrace){var t=n.stacktrace.frames;return t[t.length-1].filename}if(n.exception){var r=n.exception.values[0].stacktrace.frames;return r[r.length-1].filename}return null}catch(t){return q.error("Cannot extract url for event "+j(n)),null}},n.id="InboundFilters",n}(),pn=Object.freeze({FunctionToString:vn,InboundFilters:dn});function mn(){if(!("fetch"in w()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(n){return!1}}function yn(){if(!mn())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(n){return!1}}var bn=w(),wn={report:!1,collectWindowErrors:!1,computeStackTrace:!1,linesOfContext:!1},gn="?",En=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function xn(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function jn(){return"undefined"==typeof document||null==document.location?"":document.location.href}wn.report=function(){var n,t,r=[],i=null,e=null;function o(n,t,i){var e=null;if(!t||wn.collectWindowErrors){for(var o in r)if(xn(r,o))try{r[o](n,t,i)}catch(n){e=n}if(e)throw e}}function c(t,r,i,c,s){var a=null;if(s=v(s)?s.error:s,t=v(t)?t.message:t,e)wn.computeStackTrace.augmentStackTraceWithInitialElement(e,r,i,t),f();else if(s&&h(s))(a=wn.computeStackTrace(s)).mechanism="onerror",o(a,!0,s);else{var l,d={url:r,line:i,column:c},p=t;if("[object String]"==={}.toString.call(t)){var m=t.match(En);m&&(l=m[1],p=m[2])}d.func=gn,d.context=null,o(a={name:l,message:p,mode:"onerror",mechanism:"onerror",stack:[u({},d,{url:d.url||jn()})]},!0,null)}return!!n&&n.apply(this,arguments)}function s(n){var t=n&&(n.detail?n.detail.reason:n.reason)||n,r=wn.computeStackTrace(t);r.mechanism="onunhandledrejection",o(r,!0,t)}function f(){var n=e,t=i;e=null,i=null,o(n,!1,t)}function a(n){if(e){if(i===n)return;f()}var t=wn.computeStackTrace(n);throw e=t,i=n,setTimeout(function(){i===n&&f()},t.incomplete?2e3:0),n}return a.subscribe=function(n){r.push(n)},a.installGlobalHandler=function(){!0!==t&&(n=bn.onerror,bn.onerror=c,t=!0)},a.installGlobalUnhandledRejectionHandler=function(){bn.onunhandledrejection=s},a}(),wn.computeStackTrace=function(){function n(n){if(!n.stack)return null;for(var t,r,i,e=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,o=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,u=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,c=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,s=/\((\S*)(?::(\d+))(?::(\d+))\)/,f=n.stack.split("\n"),a=[],h=/^(.*) is undefined$/.exec(n.message),v=0,l=f.length;v<l;++v){if(r=e.exec(f[v])){var d=r[2]&&0===r[2].indexOf("native");r[2]&&0===r[2].indexOf("eval")&&(t=s.exec(r[2]))&&(r[2]=t[1]),i={url:d?null:r[2],func:r[1]||gn,args:d?[r[2]]:[],line:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}else if(r=u.exec(f[v]))i={url:r[2],func:r[1]||gn,args:[],line:+r[3],column:r[4]?+r[4]:null};else{if(!(r=o.exec(f[v])))continue;r[3]&&r[3].indexOf(" > eval")>-1&&(t=c.exec(r[3]))?r[3]=t[1]:0!==v||r[5]||void 0===n.columnNumber||(a[0].column=n.columnNumber+1),i={url:r[3],func:r[1]||gn,args:r[2]?r[2].split(","):[],line:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}!i.func&&i.line&&(i.func=gn),i.context=null,a.push(i)}return a.length?(a[0]&&a[0].line&&!a[0].column&&h&&(a[0].column=null),{mode:"stack",name:n.name,message:n.message,stack:a}):null}function t(n,t,r,i){var e={url:t,line:r};if(e.url&&e.line){if(n.incomplete=!1,e.func||(e.func=gn),e.context||(e.context=null),/ '([^']+)' /.exec(i)&&(e.column=null),n.stack.length>0&&n.stack[0].url===e.url){if(n.stack[0].line===e.line)return!1;if(!n.stack[0].line&&n.stack[0].func===e.func)return n.stack[0].line=e.line,n.stack[0].context=e.context,!1}return n.stack.unshift(e),n.partial=!0,!0}return n.incomplete=!0,!1}function r(n,e){for(var o,u,c=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,s=[],f={},a=!1,h=r.caller;h&&!a;h=h.caller)if(h!==i&&h!==wn.report){if(u={url:null,func:gn,args:[],line:null,column:null},h.name?u.func=h.name:(o=c.exec(h.toString()))&&(u.func=o[1]),void 0===u.func)try{u.func=o.input.substring(0,o.input.indexOf("{"))}catch(n){}f[""+h]?a=!0:f[""+h]=!0,s.push(u)}e&&s.splice(0,e);var v={mode:"callers",name:n.name,message:n.message,stack:s};return t(v,n.sourceURL||n.fileName,n.line||n.lineNumber,n.message||n.description),v}function i(t,i){var e=null;i=null==i?0:+i;try{if(e=function(n){var t=n.stacktrace;if(t){for(var r,i=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,e=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,o=t.split("\n"),u=[],c=0;c<o.length;c+=2){var s=null;(r=i.exec(o[c]))?s={url:r[2],line:+r[1],column:null,func:r[3],args:[]}:(r=e.exec(o[c]))&&(s={url:r[6],line:+r[1],column:+r[2],func:r[3]||r[4],args:r[5]?r[5].split(","):[]}),s&&(!s.func&&s.line&&(s.func=gn),s.line&&(s.context=null),s.context||(s.context=[o[c+1]]),u.push(s))}return u.length?{mode:"stacktrace",name:n.name,message:n.message,stack:u}:null}}(t))return e}catch(n){}try{if(e=n(t))return e}catch(n){}try{if(e=function(n){var t=n.message.split("\n");if(t.length<4)return null;var r,i=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,e=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,o=/^\s*Line (\d+) of function script\s*$/i,u=[],c=bn&&bn.document&&bn.document.getElementsByTagName("script"),s=[];for(var f in c)xn(c,f)&&!c[f].src&&s.push(c[f]);for(var a=2;a<t.length;a+=2){var h=null;(r=i.exec(t[a]))?h={url:r[2],func:r[3],args:[],line:+r[1],column:null}:(r=e.exec(t[a]))?h={url:r[3],func:r[4],args:[],line:+r[1],column:null}:(r=o.exec(t[a]))&&(h={url:jn().replace(/#.*$/,""),func:"",args:[],line:r[1],column:null}),h&&(h.func||(h.func=gn),h.context=[t[a+1]],u.push(h))}return u.length?{mode:"multiline",name:n.name,message:t[0],stack:u}:null}(t))return e}catch(n){}try{if(e=r(t,i+1))return e}catch(n){}return{original:t,name:t.name,message:t.message,mode:"failed"}}return i.augmentStackTraceWithInitialElement=t,i.computeStackTraceFromStackProp=n,i}(),wn.collectWindowErrors=!0,wn.linesOfContext=11;var Sn=wn.report.subscribe,_n=wn.report.installGlobalHandler,On=wn.report.installGlobalUnhandledRejectionHandler,kn=wn.computeStackTrace,Tn=50;function Rn(n){var t=In(n.stack),r={type:n.name,value:n.message};return t&&t.length&&(r.stacktrace={frames:t}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Dn(n){return{exception:{values:[Rn(n)]}}}function In(n){if(!n||!n.length)return[];var t=n,r=t[0].func||"",i=t[t.length-1].func||"";return(r.includes("captureMessage")||r.includes("captureException"))&&(t=t.slice(1)),i.includes("sentryWrapped")&&(t=t.slice(0,-1)),t.map(function(n){return{colno:n.column,filename:n.url||t[0].url,function:n.func||"?",in_app:!0,lineno:n.line}}).slice(0,Tn).reverse()}var An,Cn,Mn=function(){function n(n){this.mn=n,this.yn=[]}return n.prototype.isReady=function(){return void 0===this.mn||this.length()<this.mn},n.prototype.add=function(n){return c(this,void 0,void 0,function(){var t=this;return s(this,function(r){return this.isReady()?(-1===this.yn.indexOf(n)&&this.yn.push(n),n.then(function(){return c(t,void 0,void 0,function(){return s(this,function(t){return[2,this.remove(n)]})})}).catch(function(){return c(t,void 0,void 0,function(){return s(this,function(t){return[2,this.remove(n).catch(function(){})]})})}),[2,n]):[2,Promise.reject(new Q("Not adding Promise due to buffer limit reached."))]})})},n.prototype.remove=function(n){return c(this,void 0,void 0,function(){return s(this,function(t){return[2,this.yn.splice(this.yn.indexOf(n),1)[0]]})})},n.prototype.length=function(){return this.yn.length},n.prototype.drain=function(n){return c(this,void 0,void 0,function(){var t=this;return s(this,function(r){return[2,new Promise(function(r){var i=setTimeout(function(){n&&n>0&&r(!1)},n);Promise.all(t.yn).then(function(){clearTimeout(i),r(!0)}).catch(function(){r(!0)})})]})})},n}(),Nn=function(){function n(n){this.options=n,this.yn=new Mn(30),this.url=new tn(this.options.dsn).getStoreEndpointWithUrlEncodedAuth()}return n.prototype.sendEvent=function(n){return c(this,void 0,void 0,function(){return s(this,function(n){throw new Q("Transport Class has to implement `sendEvent` method")})})},n.prototype.close=function(n){return c(this,void 0,void 0,function(){return s(this,function(t){return[2,this.yn.drain(n)]})})},n}(),Fn=w(),Un=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return r(i,t),i.prototype.sendEvent=function(t){return c(this,void 0,void 0,function(){var r;return s(this,function(i){return r={body:JSON.stringify(t),method:"POST",referrerPolicy:yn()?"origin":""},[2,this.yn.add(Fn.fetch(this.url,r).then(function(t){return{status:n.Status.fromHttpCode(t.status)}}))]})})},i}(Nn),Ln=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return r(i,t),i.prototype.sendEvent=function(t){return c(this,void 0,void 0,function(){var r=this;return s(this,function(i){return[2,this.yn.add(new Promise(function(i,e){var o=new XMLHttpRequest;o.onreadystatechange=function(){4===o.readyState&&(200===o.status&&i({status:n.Status.fromHttpCode(o.status)}),e(o))},o.open("POST",r.url),o.send(JSON.stringify(t))}))]})})},i}(Nn),Pn=Object.freeze({BaseTransport:Nn,FetchTransport:Un,XHRTransport:Ln}),$n=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return r(i,t),i.prototype.un=function(){if(!this.X.dsn)return t.prototype.un.call(this);var n=this.X.transportOptions?this.X.transportOptions:{dsn:this.X.dsn};return this.X.transport?new this.X.transport(n):mn()?new Un(n):new Ln(n)},i.prototype.eventFromException=function(t,r){var i,e,o=this;if(v(t)&&t.error)return t=t.error,i=Dn(kn(t)),M.resolve(this.bn(i,r));if(l(t)||(e=t,"[object DOMException]"===Object.prototype.toString.call(e))){var u=t,c=u.name||(l(u)?"DOMError":"DOMException"),s=u.message?c+": "+u.message:c;return this.eventFromMessage(s,n.Severity.Error,r).then(function(n){return _(n,s),M.resolve(o.bn(n,r))})}if(h(t))return i=Dn(kn(t)),M.resolve(this.bn(i,r));if(m(t)&&r&&r.syntheticException)return _(i=function(n,t){var r=Object.keys(n).sort(),i={extra:{__serialized__:D(n)},message:"Non-Error exception captured with keys: "+on(r)};if(t){var e=In(kn(t).stack);i.stacktrace={frames:e}}return i}(t,r.syntheticException),"Custom Object",void 0,{handled:!0,synthetic:!0,type:"generic"}),i.level=n.Severity.Error,M.resolve(this.bn(i,r));var f=t;return this.eventFromMessage(f,void 0,r).then(function(t){return _(t,""+f,void 0,{handled:!0,synthetic:!0,type:"generic"}),t.level=n.Severity.Error,M.resolve(o.bn(t,r))})},i.prototype.bn=function(n,t){return u({},n,{event_id:t&&t.event_id})},i.prototype.eventFromMessage=function(t,r,i){void 0===r&&(r=n.Severity.Info);var e={event_id:i&&i.event_id,level:r,message:t};if(this.X.attachStacktrace&&i&&i.syntheticException){var o=In(kn(i.syntheticException).stack);e.stacktrace={frames:o}}return M.resolve(e)},i}(hn),qn="sentry.javascript.browser",Hn=function(n){function t(t){return void 0===t&&(t={}),n.call(this,$n,t)||this}return r(t,n),t.prototype.rn=function(t,r,i){return t.platform=t.platform||"javascript",t.sdk=u({},t.sdk,{name:qn,packages:a(t.sdk&&t.sdk.packages||[],[{name:"npm:@sentry/browser",version:"5.0.3"}]),version:"5.0.3"}),n.prototype.rn.call(this,t,r,i)},t.prototype.showReportDialog=function(n){void 0===n&&(n={});var t=w().document;if(t)if(this.tn()){var r=n.dsn||this.getDsn();if(n.eventId)if(r){var i=t.createElement("script");i.async=!0,i.src=new tn(r).getReportDialogEndpoint(n),(t.head||t.body).appendChild(i)}else q.error("Missing `Dsn` option in showReportDialog call");else q.error("Missing `eventId` option in showReportDialog call")}else q.error("Trying to call showReportDialog with Sentry Client is disabled")},t}(fn),Wn=1e3,Bn=0;function Gn(n,t,r){if(void 0===t&&(t={}),"function"!=typeof n)return n;try{if(n.__sentry__)return n;if(n.__sentry_wrapped__)return n.__sentry_wrapped__}catch(t){return n}var sentryWrapped=function(){r&&"function"==typeof r&&r.apply(this,arguments);var i=Array.prototype.slice.call(arguments);try{var e=i.map(function(n){return Gn(n,t)});return n.handleEvent?n.handleEvent.apply(this,e):n.apply(this,e)}catch(n){throw Bn+=1,setTimeout(function(){Bn-=1}),Z(function(r){r.addEventProcessor(function(n){var r=u({},n);return t.mechanism&&_(r,void 0,void 0,t.mechanism),r.extra=u({},r.extra,{arguments:C(i,3)}),r}),captureException(n)}),n}};try{for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(sentryWrapped[i]=n[i])}catch(n){}n.prototype=n.prototype||{},sentryWrapped.prototype=n.prototype,Object.defineProperty(n,"__sentry_wrapped__",{enumerable:!1,value:sentryWrapped}),Object.defineProperties(sentryWrapped,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:n}});try{Object.defineProperty(sentryWrapped,"name",{get:function(){return n.name}})}catch(n){}return sentryWrapped}function Jn(n){return function(t){if(An=void 0,Cn!==t){var r;Cn=t;try{r=function(n){for(var t,r=n,i=[],e=0,o=0,u=" > ".length;r&&e++<5&&!("html"===(t=E(r))||e>1&&o+i.length*u+t.length>=80);)i.push(t),o+=t.length,r=r.parentNode;return i.reverse().join(" > ")}(t.target)}catch(n){r="<unknown>"}J().addBreadcrumb({category:"ui."+n,message:r},{event:t,name:n})}}}function Xn(){return function(n){var t;try{t=n.target}catch(n){return}var r=t&&t.tagName;r&&("INPUT"===r||"TEXTAREA"===r||t.isContentEditable)&&(An||Jn("input")(n),clearTimeout(An),An=setTimeout(function(){An=void 0},Wn))}}var zn=function(){function n(t){this.name=n.id,this.X=u({onerror:!0,onunhandledrejection:!0},t)}return n.prototype.setupOnce=function(){Error.stackTraceLimit=50,Sn(function(t,r,i){if(!(Bn>0)){var e=J().getIntegration(n);e&&J().captureEvent(e.wn(t),{data:{stack:t},originalException:i})}}),this.X.onerror&&(q.log("Global Handler attached: onerror"),_n()),this.X.onunhandledrejection&&(q.log("Global Handler attached: onunhandledrejection"),On())},n.prototype.wn=function(n){var t=Dn(n),r={mode:n.mode};n.message&&(r.message=n.message),n.name&&(r.name=n.name);var i=J().getClient(),e=i&&i.getOptions().maxValueLength||250;return _(t,n.original?rn(JSON.stringify(C(n.original)),e):"","onunhandledrejection"===n.mechanism?"UnhandledRejection":"Error",{data:r,handled:!1,type:n.mechanism}),t},n.id="GlobalHandlers",n}(),Vn=function(){function n(){this.gn=0,this.name=n.id}return n.prototype.En=function(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t[0];return t[0]=Gn(i,{mechanism:{data:{function:Kn(n)},handled:!0,type:"instrument"}}),n.apply(this,t)}},n.prototype.xn=function(n){return function(t){return n(Gn(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Kn(n)},handled:!0,type:"instrument"}}))}},n.prototype.jn=function(n){var t=w(),r=t[n]&&t[n].prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(T(r,"addEventListener",function(t){return function(r,i,e){try{i.handleEvent=Gn(i.handleEvent.bind(i),{mechanism:{data:{function:"handleEvent",handler:Kn(i),target:n},handled:!0,type:"instrument"}})}catch(n){}var o,u,c;return"EventTarget"!==n&&"Node"!==n||(u=Jn("click"),c=Xn(),o=function(n){if(n){var t;try{t=n.type}catch(n){return}return"click"===t?u(n):"keypress"===t?c(n):void 0}}),t.call(this,r,Gn(i,{mechanism:{data:{function:"addEventListener",handler:Kn(i),target:n},handled:!0,type:"instrument"}},o),e)}}),T(r,"removeEventListener",function(n){return function(t,r,i){var e=r;try{e=e&&(e.__sentry_wrapped__||e)}catch(n){}return n.call(this,t,e,i)}}))},n.prototype.setupOnce=function(){this.gn=this.gn;var n=w();T(n,"setTimeout",this.En.bind(this)),T(n,"setInterval",this.En.bind(this)),T(n,"requestAnimationFrame",this.xn.bind(this)),["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"].forEach(this.jn.bind(this))},n.id="TryCatch",n}();function Kn(n){try{return n&&n.name||"<anonymous>"}catch(n){return"<anonymous>"}}var Zn,Qn=w(),Yn=function(){function t(n){this.name=t.id,this.X=u({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},n)}return t.prototype.Sn=function(){"console"in Qn&&["debug","info","warn","error","log"].forEach(function(r){r in Qn.console&&T(Qn.console,r,function(i){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var u={category:"console",data:{extra:{arguments:C(e,3)},logger:"console"},level:n.Severity.fromString(r),message:en(e," ")};"assert"===r&&!1===e[0]&&(u.message="Assertion failed: "+(en(e.slice(1)," ")||"console.assert"),u.data.extra.arguments=C(e.slice(1),3)),t.addBreadcrumb(u,{input:e,level:r}),i&&Function.prototype.apply.call(i,Qn.console,e)}})})},t.prototype._n=function(){"document"in Qn&&(Qn.document.addEventListener("click",Jn("click"),!1),Qn.document.addEventListener("keypress",Xn(),!1))},t.prototype.On=function(){mn()&&-1!==w().fetch.toString().indexOf("native")&&T(Qn,"fetch",function(r){return function(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];var o,u=i[0],c="GET";"string"==typeof u?o=u:"Request"in Qn&&u instanceof Request?(o=u.url,u.method&&(c=u.method)):o=String(u),i[1]&&i[1].method&&(c=i[1].method);var s=J().getClient(),f=s&&s.getDsn();if(f){var a=new tn(f).getStoreEndpoint();if(a&&o.includes(a))return"POST"===c&&i[1]&&i[1].body&&nt(i[1].body),r.apply(Qn,i)}var h={method:c,url:o};return r.apply(Qn,i).then(function(n){return h.status_code=n.status,t.addBreadcrumb({category:"fetch",data:h,type:"http"},{input:i,response:n}),n}).catch(function(r){throw t.addBreadcrumb({category:"fetch",data:h,level:n.Severity.Error,type:"http"},{error:r,input:i}),r})}})},t.prototype.kn=function(){var n=this;if(r=w(),i=r.chrome,e=i&&i.app&&i.app.runtime,o="history"in r&&!!r.history.pushState&&!!r.history.replaceState,!e&&o){var r,i,e,o,u=function(n,r){var i=x(Qn.location.href),e=x(r),o=x(n);o.path||(o=i),Zn=r,i.protocol===e.protocol&&i.host===e.host&&(r=e.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),t.addBreadcrumb({category:"navigation",data:{from:n,to:r}})},c=Qn.onpopstate;Qn.onpopstate=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=Qn.location.href;if(u(Zn,i),c)return c.apply(n,t)},T(Qn.history,"pushState",s),T(Qn.history,"replaceState",s)}function s(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t.length>2?t[2]:void 0;return i&&u(Zn,String(i)),n.apply(this,t)}}},t.prototype.Tn=function(){if("XMLHttpRequest"in Qn){var n=XMLHttpRequest.prototype;T(n,"open",function(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t[1];this.__sentry_xhr__={method:t[0],url:t[1]};var e=J().getClient(),o=e&&e.getDsn();if(o){var u=new tn(o).getStoreEndpoint();d(i)&&u&&i.includes(u)&&(this.__sentry_own_request__=!0)}return n.apply(this,t)}}),T(n,"send",function(n){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var e=this;function o(){if(4===e.readyState){if(e.__sentry_own_request__)return;try{e.__sentry_xhr__&&(e.__sentry_xhr__.status_code=e.status)}catch(n){}t.addBreadcrumb({category:"xhr",data:e.__sentry_xhr__,type:"http"},{xhr:e})}}return e.__sentry_own_request__&&nt(r[0]),["onload","onerror","onprogress"].forEach(function(n){!function(n,t){n in t&&"function"==typeof t[n]&&T(t,n,function(t){return Gn(t,{mechanism:{data:{function:n,handler:t&&t.name||"<anonymous>"},handled:!0,type:"instrument"}})})}(n,e)}),"onreadystatechange"in e&&"function"==typeof e.onreadystatechange?T(e,"onreadystatechange",function(n){return Gn(n,{mechanism:{data:{function:"onreadystatechange",handler:n&&n.name||"<anonymous>"},handled:!0,type:"instrument"}},o)}):e.onreadystatechange=o,n.apply(this,r)}})}},t.addBreadcrumb=function(n,r){J().getIntegration(t)&&J().addBreadcrumb(n,r)},t.prototype.setupOnce=function(){this.X.console&&this.Sn(),this.X.dom&&this._n(),this.X.xhr&&this.Tn(),this.X.fetch&&this.On(),this.X.history&&this.kn()},t.id="Breadcrumbs",t}();function nt(t){try{var r=JSON.parse(t);Yn.addBreadcrumb({category:"sentry",event_id:r.event_id,level:r.level||n.Severity.fromString("error"),message:j(r)},{event:r})}catch(n){q.error("Error while adding sentry type breadcrumb")}}var tt="cause",rt=5,it=function(){function n(t){void 0===t&&(t={}),this.name=n.id,this.Rn=t.key||tt,this.mn=t.limit||rt}return n.prototype.setupOnce=function(){U(function(t,r){var i=J().getIntegration(n);return i?i.handler(t,r):t})},n.prototype.handler=function(n,t){if(!(n.exception&&n.exception.values&&t&&t.originalException instanceof Error))return n;var r=this.walkErrorTree(t.originalException,this.Rn);return n.exception.values=a(r,n.exception.values),n},n.prototype.walkErrorTree=function(n,t,r){if(void 0===r&&(r=[]),!(n[t]instanceof Error)||r.length+1>=this.mn)return r;var i=Rn(kn(n[t]));return this.walkErrorTree(n[t],t,a([i],r))},n.id="LinkedErrors",n}(),et=w(),ot=function(){function n(){this.name=n.id}return n.prototype.setupOnce=function(){U(function(t){if(J().getIntegration(n)){if(!et.navigator||!et.location)return t;var r=t.request||{};return r.url=r.url||et.location.href,r.headers=r.headers||{},r.headers["User-Agent"]=et.navigator.userAgent,u({},t,{request:r})}return t})},n.id="UserAgent",n}(),ut=Object.freeze({GlobalHandlers:zn,TryCatch:Vn,Breadcrumbs:Yn,LinkedErrors:it,UserAgent:ot}),ct=[new dn,new vn,new Vn,new Yn,new zn,new it,new ot];var st={},ft=w();ft.Sentry&&ft.Sentry.Integrations&&(st=ft.Sentry.Integrations);var at=u({},st,pn,ut);return n.Integrations=at,n.Transports=Pn,n.addGlobalEventProcessor=U,n.addBreadcrumb=function(n){K("addBreadcrumb",n)},n.captureException=captureException,n.captureEvent=function(n){return K("captureEvent",n)},n.captureMessage=function(n,t){var r;try{throw new Error(n)}catch(n){r=n}return K("captureMessage",n,t,{originalException:n,syntheticException:r})},n.configureScope=function(n){K("configureScope",n)},n.withScope=Z,n.getHubFromCarrier=z,n.getCurrentHub=J,n.Hub=W,n.Scope=N,n.BrowserClient=Hn,n.defaultIntegrations=ct,n.forceLoad=function(){},n.init=function(n){void 0===n&&(n={}),void 0===n.defaultIntegrations&&(n.defaultIntegrations=ct),function(n,t){!0===t.debug&&q.enable(),J().bindClient(new n(t))}(Hn,n)},n.lastEventId=function(){return J().lastEventId()},n.onLoad=function(n){n()},n.showReportDialog=function(n){void 0===n&&(n={}),n.eventId||(n.eventId=J().lastEventId());var t=J().getClient();t&&t.showReportDialog(n)},n.flush=function(n){return c(this,void 0,void 0,function(){var t;return s(this,function(r){return(t=J().getClient())?[2,t.flush(n)]:[2,Promise.reject(!1)]})})},n.close=function(n){return c(this,void 0,void 0,function(){var t;return s(this,function(r){return(t=J().getClient())?[2,t.close(n)]:[2,Promise.reject(!1)]})})},n.SDK_NAME=qn,n.SDK_VERSION="5.0.3",n}({});
/*! @sentry/browser 5.0.5 (913eafc4) | https://github.com/getsentry/sentry-javascript */
var Sentry=function(n){"use strict";var t=function(n,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r])})(n,r)};function r(n,r){function i(){this.constructor=n}t(n,r),n.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}var i,e,o,u=function(){return(u=Object.assign||function(n){for(var t,r=1,i=arguments.length;r<i;r++)for(var e in t=arguments[r])Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}).apply(this,arguments)};function c(n,t,r,i){return new(r||(r=Promise))(function(e,o){function u(n){try{s(i.next(n))}catch(n){o(n)}}function c(n){try{s(i.throw(n))}catch(n){o(n)}}function s(n){n.done?e(n.value):new r(function(t){t(n.value)}).then(u,c)}s((i=i.apply(n,t||[])).next())})}function s(n,t){var r,i,e,o,u={label:0,sent:function(){if(1&e[0])throw e[1];return e[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function c(o){return function(c){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;u;)try{if(r=1,i&&(e=2&o[0]?i.return:o[0]?i.throw||((e=i.return)&&e.call(i),0):i.next)&&!(e=e.call(i,o[1])).done)return e;switch(i=0,e&&(o=[2&o[0],e.value]),o[0]){case 0:case 1:e=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,i=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(e=(e=u.trys).length>0&&e[e.length-1])&&(6===o[0]||2===o[0])){u=0;continue}if(3===o[0]&&(!e||o[1]>e[0]&&o[1]<e[3])){u.label=o[1];break}if(6===o[0]&&u.label<e[1]){u.label=e[1],e=o;break}if(e&&u.label<e[2]){u.label=e[2],u.ops.push(o);break}e[2]&&u.ops.pop(),u.trys.pop();continue}o=t.call(n,u)}catch(n){o=[6,n],i=0}finally{r=e=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,c])}}}function f(n,t){var r="function"==typeof Symbol&&n[Symbol.iterator];if(!r)return n;var i,e,o=r.call(n),u=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)u.push(i.value)}catch(n){e={error:n}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}return u}function a(){for(var n=[],t=0;t<arguments.length;t++)n=n.concat(f(arguments[t]));return n}function h(n){switch(Object.prototype.toString.call(n)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return n instanceof Error}}function v(n){return"[object ErrorEvent]"===Object.prototype.toString.call(n)}function l(n){return"[object DOMError]"===Object.prototype.toString.call(n)}function d(n){return"[object String]"===Object.prototype.toString.call(n)}function p(n){return null===n||"object"!=typeof n&&"function"!=typeof n}function m(n){return"[object Object]"===Object.prototype.toString.call(n)}function y(n){return Boolean(n&&n.then&&"function"==typeof n.then)}!function(n){n[n.None=0]="None",n[n.Error=1]="Error",n[n.Debug=2]="Debug",n[n.Verbose=3]="Verbose"}(i||(i={})),(e=n.Severity||(n.Severity={})).Fatal="fatal",e.Error="error",e.Warning="warning",e.Log="log",e.Info="info",e.Debug="debug",e.Critical="critical",function(n){n.fromString=function(t){switch(t){case"debug":return n.Debug;case"info":return n.Info;case"warn":case"warning":return n.Warning;case"error":return n.Error;case"fatal":return n.Fatal;case"critical":return n.Critical;case"log":default:return n.Log}}}(n.Severity||(n.Severity={})),(o=n.Status||(n.Status={})).Unknown="unknown",o.Skipped="skipped",o.Success="success",o.RateLimit="rate_limit",o.Invalid="invalid",o.Failed="failed",function(n){n.fromHttpCode=function(t){return t>=200&&t<300?n.Success:429===t?n.RateLimit:t>=400&&t<500?n.Invalid:t>=500?n.Failed:n.Unknown}}(n.Status||(n.Status={}));var b={};function w(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:b}function g(){var n=w(),t=n.crypto||n.msCrypto;if(void 0!==t&&t.getRandomValues){var r=new Uint16Array(8);t.getRandomValues(r),r[3]=4095&r[3]|16384,r[4]=16383&r[4]|32768;var i=function(n){for(var t=n.toString(16);t.length<4;)t="0"+t;return t};return i(r[0])+i(r[1])+i(r[2])+i(r[3])+i(r[4])+i(r[5])+i(r[6])+i(r[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(n){var t=16*Math.random()|0;return("x"===n?t:3&t|8).toString(16)})}function E(n){var t,r,i,e,o,u=[];if(!n||!n.tagName)return"";if(u.push(n.tagName.toLowerCase()),n.id&&u.push("#"+n.id),(t=n.className)&&d(t))for(r=t.split(/\s+/),o=0;o<r.length;o++)u.push("."+r[o]);var c=["type","name","title","alt"];for(o=0;o<c.length;o++)i=c[o],(e=n.getAttribute(i))&&u.push("["+i+'="'+e+'"]');return u.join("")}function x(n){if(!n)return{};var t=n.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var r=t[6]||"",i=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+r+i}}function j(n){if(n.message)return n.message;if(n.exception&&n.exception.values&&n.exception.values[0]){var t=n.exception.values[0];return t.type&&t.value?t.type+": "+t.value:t.type||t.value||n.event_id||"<unknown>"}return n.event_id||"<unknown>"}function S(n){var t=w();if(!("console"in t))return n();var r=t.console,i={};["debug","info","warn","error","log"].forEach(function(n){n in t.console&&r[n].__sentry__&&(i[n]=r[n].__sentry_wrapped__,r[n]=r[n].__sentry_original__)});var e=n();return Object.keys(i).forEach(function(n){r[n]=i[n]}),e}function _(n,t,r,i){void 0===i&&(i={handled:!0,type:"generic"}),n.exception=n.exception||{},n.exception.values=n.exception.values||[],n.exception.values[0]=n.exception.values[0]||{},n.exception.values[0].value=n.exception.values[0].value||t||"",n.exception.values[0].type=n.exception.values[0].type||r||"Error",n.exception.values[0].mechanism=n.exception.values[0].mechanism||i}var O,k=function(){function n(){this.t="function"==typeof WeakSet,this.i=this.t?new WeakSet:[]}return n.prototype.memoize=function(n){if(this.t)return!!this.i.has(n)||(this.i.add(n),!1);for(var t=0;t<this.i.length;t++){if(this.i[t]===n)return!0}return this.i.push(n),!1},n.prototype.unmemoize=function(n){if(this.t)this.i.delete(n);else for(var t=0;t<this.i.length;t++)if(this.i[t]===n){this.i.splice(t,1);break}},n}();function T(n,t,r){if(t in n&&!n[t].__sentry__){var i=n[t],e=r(i);"function"==typeof e&&(e.prototype=e.prototype||{},Object.defineProperties(e,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:i},__sentry_wrapped__:{enumerable:!1,value:e}})),n[t]=e}}function R(n){return function(n){return~-encodeURI(n).split(/%..|./).length}(JSON.stringify(n))}function D(n,t,r){void 0===t&&(t=3),void 0===r&&(r=102400);var i=C(n,t);return R(i)>r?D(n,t-1,r):i}function I(n,t){return"domain"===t&&"object"==typeof n&&n.o?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!=typeof global&&n===global?"[Global]":"undefined"!=typeof window&&n===window?"[Window]":"undefined"!=typeof document&&n===document?"[Document]":"undefined"!=typeof Event&&n instanceof Event?Object.getPrototypeOf(n)?n.constructor.name:"Event":m(r=n)&&"nativeEvent"in r&&"preventDefault"in r&&"stopPropagation"in r?"[SyntheticEvent]":Number.isNaN(n)?"[NaN]":void 0===n?"[undefined]":"function"==typeof n?"[Function: "+(n.name||"<unknown-function-name>")+"]":n;var r}function A(n,t,r,i){if(void 0===r&&(r=1/0),void 0===i&&(i=new k),0===r)return function(n){var t=Object.prototype.toString.call(n);if("string"==typeof n)return n;if("[object Object]"===t)return"[Object]";if("[object Array]"===t)return"[Array]";var r=I(n);return p(r)?r:t}(t);if(null!=t&&"function"==typeof t.toJSON)return t.toJSON();var e=I(t,n);if(p(e))return e;var o=h(t)?function(n){var t={message:n.message,name:n.name,stack:n.stack};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}(t):t,u=Array.isArray(t)?[]:{};if(i.memoize(t))return"[Circular ~]";for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(u[c]=A(c,o[c],r-1,i));return i.unmemoize(t),u}function C(n,t){try{return JSON.parse(JSON.stringify(n,function(n,r){return A(n,r,t)}))}catch(n){return"**non-serializable**"}}!function(n){n.PENDING="PENDING",n.RESOLVED="RESOLVED",n.REJECTED="REJECTED"}(O||(O={}));var M=function(){function n(n){var t=this;this.u=O.PENDING,this.s=[],this.h=function(n){t.v(n,O.RESOLVED)},this.l=function(n){t.v(n,O.REJECTED)},this.v=function(n,r){t.u===O.PENDING&&(y(n)?n.then(t.h,t.l):(t.p=n,t.u=r,t.m()))},this.m=function(){t.u!==O.PENDING&&(t.u===O.REJECTED?t.s.forEach(function(n){return n.onFail&&n.onFail(t.p)}):t.s.forEach(function(n){return n.onSuccess&&n.onSuccess(t.p)}),t.s=[])},this.g=function(n){t.s=t.s.concat(n),t.m()};try{n(this.h,this.l)}catch(n){this.l(n)}}return n.prototype.then=function(t,r){var i=this;return new n(function(n,e){i.g({onFail:function(t){if(r)try{return void n(r(t))}catch(n){return void e(n)}else e(t)},onSuccess:function(r){if(t)try{return void n(t(r))}catch(n){return void e(n)}else n(r)}})})},n.prototype.catch=function(n){return this.then(function(n){return n},n)},n.prototype.toString=function(){return"[object SyncPromise]"},n.resolve=function(t){return new n(function(n){n(t)})},n.reject=function(t){return new n(function(n,r){r(t)})},n}(),N=function(){function n(){this.j=!1,this.S=[],this._=[],this.O=[],this.k={},this.T={},this.R={}}return n.prototype.addScopeListener=function(n){this.S.push(n)},n.prototype.addEventProcessor=function(n){return this._.push(n),this},n.prototype.D=function(){var n=this;this.j||(this.j=!0,setTimeout(function(){n.S.forEach(function(t){t(n)}),n.j=!1}))},n.prototype.I=function(n,t,r,i){var e=this;return void 0===i&&(i=0),new M(function(o,c){var s=n[i];if(null===t||"function"!=typeof s)o(t);else{var f=s(u({},t),r);y(f)?f.then(function(t){return e.I(n,t,r,i+1).then(o)}).catch(c):e.I(n,f,r,i+1).then(o).catch(c)}})},n.prototype.setUser=function(n){return this.k=C(n),this.D(),this},n.prototype.setTags=function(n){return this.T=u({},this.T,C(n)),this.D(),this},n.prototype.setTag=function(n,t){var r;return this.T=u({},this.T,((r={})[n]=C(t),r)),this.D(),this},n.prototype.setExtras=function(n){return this.R=u({},this.R,C(n)),this.D(),this},n.prototype.setExtra=function(n,t){var r;return this.R=u({},this.R,((r={})[n]=C(t),r)),this.D(),this},n.prototype.setFingerprint=function(n){return this.A=C(n),this.D(),this},n.prototype.setLevel=function(n){return this.C=C(n),this.D(),this},n.clone=function(t){var r=new n;return Object.assign(r,t,{S:[]}),t&&(r.O=a(t.O),r.T=u({},t.T),r.R=u({},t.R),r.k=t.k,r.C=t.C,r.A=t.A,r._=a(t._)),r},n.prototype.clear=function(){return this.O=[],this.T={},this.R={},this.k={},this.C=void 0,this.A=void 0,this.D(),this},n.prototype.addBreadcrumb=function(n,t){return this.O=void 0!==t&&t>=0?a(this.O,[C(n)]).slice(-t):a(this.O,[C(n)]),this.D(),this},n.prototype.clearBreadcrumbs=function(){return this.O=[],this.D(),this},n.prototype.M=function(n){n.fingerprint=n.fingerprint?Array.isArray(n.fingerprint)?n.fingerprint:[n.fingerprint]:[],this.A&&(n.fingerprint=n.fingerprint.concat(this.A)),n.fingerprint&&!n.fingerprint.length&&delete n.fingerprint},n.prototype.applyToEvent=function(n,t){return this.R&&Object.keys(this.R).length&&(n.extra=u({},this.R,n.extra)),this.T&&Object.keys(this.T).length&&(n.tags=u({},this.T,n.tags)),this.k&&Object.keys(this.k).length&&(n.user=u({},this.k,n.user)),this.C&&(n.level=this.C),this.M(n),(!n.breadcrumbs||0===n.breadcrumbs.length)&&this.O.length>0&&(n.breadcrumbs=this.O),this.I(a(F(),this._),n,t)},n}();function F(){var n=w();return n.__SENTRY__=n.__SENTRY__||{},n.__SENTRY__.globalEventProcessors=n.__SENTRY__.globalEventProcessors||[],n.__SENTRY__.globalEventProcessors}function U(n){F().push(n)}var L=w(),P="Sentry Logger ",$=function(){function n(){this.N=!1}return n.prototype.disable=function(){this.N=!1},n.prototype.enable=function(){this.N=!0},n.prototype.log=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.N&&S(function(){L.console.log(P+"[Log]: "+n.join(" "))})},n.prototype.warn=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.N&&S(function(){L.console.warn(P+"[Warn]: "+n.join(" "))})},n.prototype.error=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];this.N&&S(function(){L.console.error(P+"[Error]: "+n.join(" "))})},n}();L.__SENTRY__=L.__SENTRY__||{};var q=L.__SENTRY__.logger||(L.__SENTRY__.logger=new $),H=3,W=function(){function n(n,t,r){void 0===t&&(t=new N),void 0===r&&(r=H),this.F=r,this.U=[],this.U.push({client:n,scope:t})}return n.prototype.L=function(n){for(var t,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var e=this.getStackTop();e&&e.client&&e.client[n]&&(t=e.client)[n].apply(t,a(r,[e.scope]))},n.prototype.isOlderThan=function(n){return this.F<n},n.prototype.bindClient=function(n){this.getStackTop().client=n},n.prototype.pushScope=function(){var n=this.getStack(),t=n.length>0?n[n.length-1].scope:void 0,r=N.clone(t);return this.getStack().push({client:this.getClient(),scope:r}),r},n.prototype.popScope=function(){return void 0!==this.getStack().pop()},n.prototype.withScope=function(n){var t=this.pushScope();try{n(t)}finally{this.popScope()}},n.prototype.getClient=function(){return this.getStackTop().client},n.prototype.getScope=function(){return this.getStackTop().scope},n.prototype.getStack=function(){return this.U},n.prototype.getStackTop=function(){return this.U[this.U.length-1]},n.prototype.captureException=function(n,t){var r=this.P=g();return this.L("captureException",n,u({},t,{event_id:r})),r},n.prototype.captureMessage=function(n,t,r){var i=this.P=g();return this.L("captureMessage",n,t,u({},r,{event_id:i})),i},n.prototype.captureEvent=function(n,t){var r=this.P=g();return this.L("captureEvent",n,u({},t,{event_id:r})),r},n.prototype.lastEventId=function(){return this.P},n.prototype.addBreadcrumb=function(n,t){var r=this.getStackTop();if(r.scope&&r.client){var i=r.client.getOptions(),e=i.beforeBreadcrumb,o=i.maxBreadcrumbs,c=void 0===o?30:o;if(!(c<=0)){var s=(new Date).getTime()/1e3,f=u({timestamp:s},n),a=e?S(function(){return e(f,t)}):f;null!==a&&r.scope.addBreadcrumb(a,Math.min(c,100))}}},n.prototype.configureScope=function(n){var t=this.getStackTop();t.scope&&t.client&&n(t.scope)},n.prototype.run=function(n){var t=G(this);try{n(this)}finally{G(t)}},n.prototype.getIntegration=function(n){var t=this.getClient();if(!t)return null;try{return t.getIntegration(n)}catch(t){return q.warn("Cannot retrieve integration "+n.id+" from the current Hub"),null}},n}();function B(){var n=w();return n.__SENTRY__=n.__SENTRY__||{hub:void 0},n}function G(n){var t=B(),r=z(t);return V(t,n),r}function J(){var n,t,r=B();X(r)&&!z(r).isOlderThan(H)||V(r,new W);try{var i=(n=module,t="domain",n.require(t)).active;if(!i)return z(r);if(!X(i)||z(i).isOlderThan(H)){var e=z(r).getStackTop();V(i,new W(e.client,N.clone(e.scope)))}return z(i)}catch(n){return z(r)}}function X(n){return!!(n&&n.__SENTRY__&&n.__SENTRY__.hub)}function z(n){return n&&n.__SENTRY__&&n.__SENTRY__.hub?n.__SENTRY__.hub:(n.__SENTRY__=n.__SENTRY__||{},n.__SENTRY__.hub=new W,n.__SENTRY__.hub)}function V(n,t){return!!n&&(n.__SENTRY__=n.__SENTRY__||{},n.__SENTRY__.hub=t,!0)}function K(n){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=J();if(i&&i[n])return i[n].apply(i,a(t));throw new Error("No hub defined or "+n+" was not found on the hub, please open a bug report.")}function captureException(n){var t;try{throw new Error("Sentry syntheticException")}catch(n){t=n}return K("captureException",n,{originalException:n,syntheticException:t})}function Z(n){K("withScope",n)}var Q=function(n){function t(t){var r=this.constructor,i=n.call(this,t)||this;return i.message=t,i.name=r.prototype.constructor.name,Object.setPrototypeOf(i,r.prototype),i}return r(t,n),t}(Error),Y=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w\.-]+)(?::(\d+))?\/(.+)/,nn=function(){function n(n){"string"==typeof n?this.$(n):this.q(n),this.H()}return n.prototype.toString=function(n){void 0===n&&(n=!1);var t=this,r=t.host,i=t.path,e=t.pass,o=t.port,u=t.projectId;return t.protocol+"://"+t.user+(n&&e?":"+e:"")+"@"+r+(o?":"+o:"")+"/"+(i?i+"/":i)+u},n.prototype.$=function(n){var t=Y.exec(n);if(!t)throw new Q("Invalid Dsn");var r=f(t.slice(1),6),i=r[0],e=r[1],o=r[2],u=void 0===o?"":o,c=r[3],s=r[4],a=void 0===s?"":s,h="",v=r[5],l=v.split("/");l.length>1&&(h=l.slice(0,-1).join("/"),v=l.pop()),Object.assign(this,{host:c,pass:u,path:h,projectId:v,port:a,protocol:i,user:e})},n.prototype.q=function(n){this.protocol=n.protocol,this.user=n.user,this.pass=n.pass||"",this.host=n.host,this.port=n.port||"",this.path=n.path||"",this.projectId=n.projectId},n.prototype.H=function(){var n=this;if(["protocol","user","host","projectId"].forEach(function(t){if(!n[t])throw new Q("Invalid Dsn")}),"http"!==this.protocol&&"https"!==this.protocol)throw new Q("Invalid Dsn");if(this.port&&Number.isNaN(parseInt(this.port,10)))throw new Q("Invalid Dsn")},n}(),tn=function(){function n(n){this.dsn=n,this.W=new nn(n)}return n.prototype.getDsn=function(){return this.W},n.prototype.getStoreEndpoint=function(){return""+this.B()+this.getStoreEndpointPath()},n.prototype.getStoreEndpointWithUrlEncodedAuth=function(){var n,t={sentry_key:this.W.user,sentry_version:"7"};return this.getStoreEndpoint()+"?"+(n=t,Object.keys(n).map(function(t){return encodeURIComponent(t)+"="+encodeURIComponent(n[t])}).join("&"))},n.prototype.B=function(){var n=this.W,t=n.protocol?n.protocol+":":"",r=n.port?":"+n.port:"";return t+"//"+n.host+r},n.prototype.getStoreEndpointPath=function(){var n=this.W;return(n.path?"/"+n.path:"")+"/api/"+n.projectId+"/store/"},n.prototype.getRequestHeaders=function(n,t){var r=this.W,i=["Sentry sentry_version=7"];return i.push("sentry_timestamp="+(new Date).getTime()),i.push("sentry_client="+n+"/"+t),i.push("sentry_key="+r.user),r.pass&&i.push("sentry_secret="+r.pass),{"Content-Type":"application/json","X-Sentry-Auth":i.join(", ")}},n.prototype.getReportDialogEndpoint=function(n){void 0===n&&(n={});var t=this.W,r=this.B()+(t.path?"/"+t.path:"")+"/api/embed/error-page/",i=[];for(var e in i.push("dsn="+t.toString()),n)if("user"===e){if(!n.user)continue;n.user.name&&i.push("name="+encodeURIComponent(n.user.name)),n.user.email&&i.push("email="+encodeURIComponent(n.user.email))}else i.push(encodeURIComponent(e)+"="+encodeURIComponent(n[e]));return i.length?r+"?"+i.join("&"):r},n}();function rn(n,t){return void 0===t&&(t=0),0===t?n:n.length<=t?n:n.substr(0,t)+"..."}function en(n,t){if(!Array.isArray(n))return"";for(var r=[],i=0;i<n.length;i++){var e=n[i];try{r.push(String(e))}catch(n){r.push("[value cannot be serialized]")}}return r.join(t)}function on(n,t){if(void 0===t&&(t=40),!n.length)return"[object has no keys]";if(n[0].length>=t)return rn(n[0],t);for(var r=n.length;r>0;r--){var i=n.slice(0,r).join(", ");if(!(i.length>t))return r===n.length?i:rn(i,t)}return""}var un=[];function cn(n){var t={};return function(n){var t=n.defaultIntegrations&&a(n.defaultIntegrations)||[],r=n.integrations,i=[];if(Array.isArray(r)){var e=r.map(function(n){return n.name}),o=[];t.forEach(function(n){-1===e.indexOf(n.name)&&-1===o.indexOf(n.name)&&(i.push(n),o.push(n.name))}),r.forEach(function(n){-1===o.indexOf(n.name)&&(i.push(n),o.push(n.name))})}else{if("function"!=typeof r)return a(t);i=r(t),i=Array.isArray(i)?i:[i]}return i}(n).forEach(function(n){t[n.name]=n,function(n){-1===un.indexOf(n.name)&&(n.setupOnce(U,J),un.push(n.name),q.log("Integration installed: "+n.name))}(n)}),t}var sn,fn=function(){function n(n,t){this.G=!1,this.J=new n(t),this.X=t,t.dsn&&(this.V=new nn(t.dsn)),this.K=cn(this.X)}return n.prototype.captureException=function(n,t,r){var i=this,e=t&&t.event_id;return this.G=!0,this.Z().eventFromException(n,t).then(function(n){return i.Y(n,t,r)}).then(function(n){e=n&&n.event_id,i.G=!1}).catch(function(n){q.log(n),i.G=!1}),e},n.prototype.captureMessage=function(n,t,r,i){var e=this,o=r&&r.event_id;return this.G=!0,(p(n)?this.Z().eventFromMessage(""+n,t,r):this.Z().eventFromException(n,r)).then(function(n){return e.Y(n,r,i)}).then(function(n){o=n&&n.event_id,e.G=!1}).catch(function(n){q.log(n),e.G=!1}),o},n.prototype.captureEvent=function(n,t,r){var i=this,e=t&&t.event_id;return this.G=!0,this.Y(n,t,r).then(function(n){e=n&&n.event_id,i.G=!1}).catch(function(n){q.log(n),i.G=!1}),e},n.prototype.getDsn=function(){return this.V},n.prototype.getOptions=function(){return this.X},n.prototype.flush=function(n){return c(this,void 0,void 0,function(){return s(this,function(t){switch(t.label){case 0:return[4,Promise.all([this.Z().getTransport().close(n),this.nn()])];case 1:return[2,t.sent().reduce(function(n,t){return n&&t})]}})})},n.prototype.close=function(n){return c(this,void 0,void 0,function(){var t=this;return s(this,function(r){return[2,this.flush(n).finally(function(){t.getOptions().enabled=!1})]})})},n.prototype.getIntegrations=function(){return this.K||{}},n.prototype.getIntegration=function(n){try{return this.K[n.id]||null}catch(t){return q.warn("Cannot retrieve integration "+n.id+" from the current Client"),null}},n.prototype.nn=function(n){return void 0===n&&(n=0),c(this,void 0,void 0,function(){var t=this;return s(this,function(r){return[2,new Promise(function(r){t.G?n>=10?r(!1):setTimeout(function(){return c(t,void 0,void 0,function(){var t;return s(this,function(i){switch(i.label){case 0:return t=r,[4,this.nn(n+1)];case 1:return t.apply(void 0,[i.sent()]),[2]}})})},10):r(!0)})]})})},n.prototype.Z=function(){return this.J},n.prototype.tn=function(){return!1!==this.getOptions().enabled&&void 0!==this.V},n.prototype.rn=function(n,t,r){var i=this.getOptions(),e=i.environment,o=i.release,c=i.dist,s=i.maxValueLength,f=void 0===s?250:s,a=u({},n);void 0===a.environment&&void 0!==e&&(a.environment=e),void 0===a.release&&void 0!==o&&(a.release=o),void 0===a.dist&&void 0!==c&&(a.dist=c),a.message&&(a.message=rn(a.message,f));var h=a.exception&&a.exception.values&&a.exception.values[0];h&&h.value&&(h.value=rn(h.value,f));var v=a.request;v&&v.url&&(v.url=rn(v.url,f)),void 0===a.event_id&&(a.event_id=g()),this.in(a.sdk);var l=M.resolve(a);return t&&(l=t.applyToEvent(a,r)),l},n.prototype.in=function(n){var t=Object.keys(this.K);n&&t.length>0&&(n.integrations=t)},n.prototype.Y=function(n,t,r){var i=this,e=this.getOptions(),o=e.beforeSend,u=e.sampleRate;return this.tn()?"number"==typeof u&&Math.random()>u?M.reject("This event has been sampled, will not send event."):new M(function(e,u){i.rn(n,r,t).then(function(n){if(null!==n){var r=n;try{if(t&&t.data&&!0===t.data.__sentry__||!o)return i.Z().sendEvent(r),void e(r);var c=o(n,t);if(void 0===c)q.error("`beforeSend` method has to return `null` or a valid event.");else if(y(c))i.en(c,e,u);else{if(null===(r=c))return q.log("`beforeSend` returned `null`, will not send event."),void e(null);i.Z().sendEvent(r),e(r)}}catch(n){i.captureException(n,{data:{__sentry__:!0},originalException:n}),u("`beforeSend` throw an error, will not send event.")}}else u("An event processor returned null, will not send event.")})}):M.reject("SDK not enabled, will not send event.")},n.prototype.en=function(n,t,r){var i=this;n.then(function(n){null!==n?(i.Z().sendEvent(n),t(n)):r("`beforeSend` returned `null`, will not send event.")}).catch(function(n){r("beforeSend rejected with "+n)})},n}(),an=function(){function t(){}return t.prototype.sendEvent=function(t){return c(this,void 0,void 0,function(){return s(this,function(t){return[2,Promise.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:n.Status.Skipped})]})})},t.prototype.close=function(n){return c(this,void 0,void 0,function(){return s(this,function(n){return[2,Promise.resolve(!0)]})})},t}(),hn=function(){function n(n){this.X=n,this.X.dsn||q.warn("No DSN provided, backend will not do anything."),this.on=this.un()}return n.prototype.un=function(){return new an},n.prototype.eventFromException=function(n,t){throw new Q("Backend has to implement `eventFromException` method")},n.prototype.eventFromMessage=function(n,t,r){throw new Q("Backend has to implement `eventFromMessage` method")},n.prototype.sendEvent=function(n){this.on.sendEvent(n).catch(function(n){q.error("Error while sending event: "+n)})},n.prototype.getTransport=function(){return this.on},n}();var vn=function(){function n(){this.name=n.id}return n.prototype.setupOnce=function(){sn=Function.prototype.toString,Function.prototype.toString=function(){for(var n=[],t=0;t<arguments.length;t++)n[t]=arguments[t];var r=this.__sentry__?this.__sentry_original__:this;return sn.apply(r,n)}},n.id="FunctionToString",n}(),ln=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],dn=function(){function n(t){void 0===t&&(t={}),this.X=t,this.name=n.id}return n.prototype.setupOnce=function(){U(function(t){var r=J();if(!r)return t;var i=r.getIntegration(n);if(i){var e=r.getClient(),o=e?e.getOptions():{},u=i.cn(o);if(i.sn(t,u))return null}return t})},n.prototype.sn=function(n,t){return this.fn(n,t)?(q.warn("Event dropped due to being internal Sentry Error.\nEvent: "+j(n)),!0):this.an(n,t)?(q.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+j(n)),!0):this.hn(n,t)?(q.warn("Event dropped due to being matched by `blacklistUrls` option.\nEvent: "+j(n)+".\nUrl: "+this.vn(n)),!0):!this.ln(n,t)&&(q.warn("Event dropped due to not being matched by `whitelistUrls` option.\nEvent: "+j(n)+".\nUrl: "+this.vn(n)),!0)},n.prototype.fn=function(n,t){if(void 0===t&&(t={}),!t.ignoreInternal)return!1;try{return"SentryError"===n.exception.values[0].type}catch(n){return!1}},n.prototype.an=function(n,t){var r=this;return void 0===t&&(t={}),!(!t.ignoreErrors||!t.ignoreErrors.length)&&this.dn(n).some(function(n){return t.ignoreErrors.some(function(t){return r.pn(n,t)})})},n.prototype.hn=function(n,t){var r=this;if(void 0===t&&(t={}),!t.blacklistUrls||!t.blacklistUrls.length)return!1;var i=this.vn(n);return!!i&&t.blacklistUrls.some(function(n){return r.pn(i,n)})},n.prototype.ln=function(n,t){var r=this;if(void 0===t&&(t={}),!t.whitelistUrls||!t.whitelistUrls.length)return!0;var i=this.vn(n);return!i||t.whitelistUrls.some(function(n){return r.pn(i,n)})},n.prototype.cn=function(n){return void 0===n&&(n={}),{blacklistUrls:a(this.X.blacklistUrls||[],n.blacklistUrls||[]),ignoreErrors:a(this.X.ignoreErrors||[],n.ignoreErrors||[],ln),ignoreInternal:void 0===this.X.ignoreInternal||this.X.ignoreInternal,whitelistUrls:a(this.X.whitelistUrls||[],n.whitelistUrls||[])}},n.prototype.pn=function(n,t){return r=t,"[object RegExp]"===Object.prototype.toString.call(r)?t.test(n):"string"==typeof t&&n.includes(t);var r},n.prototype.dn=function(n){if(n.message)return[n.message];if(n.exception)try{var t=n.exception.values[0],r=t.type,i=t.value;return[""+i,r+": "+i]}catch(t){return q.error("Cannot extract message for event "+j(n)),[]}return[]},n.prototype.vn=function(n){try{if(n.stacktrace){var t=n.stacktrace.frames;return t[t.length-1].filename}if(n.exception){var r=n.exception.values[0].stacktrace.frames;return r[r.length-1].filename}return null}catch(t){return q.error("Cannot extract url for event "+j(n)),null}},n.id="InboundFilters",n}(),pn=Object.freeze({FunctionToString:vn,InboundFilters:dn});function mn(){if(!("fetch"in w()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(n){return!1}}function yn(){if(!mn())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(n){return!1}}var bn=w(),wn={report:!1,collectWindowErrors:!1,computeStackTrace:!1,linesOfContext:!1},gn="?",En=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function xn(n,t){return Object.prototype.hasOwnProperty.call(n,t)}function jn(){return"undefined"==typeof document||null==document.location?"":document.location.href}wn.report=function(){var n,t,r=[],i=null,e=null;function o(n,t,i){var e=null;if(!t||wn.collectWindowErrors){for(var o in r)if(xn(r,o))try{r[o](n,t,i)}catch(n){e=n}if(e)throw e}}function c(t,r,i,c,s){var a=null;if(s=v(s)?s.error:s,t=v(t)?t.message:t,e)wn.computeStackTrace.augmentStackTraceWithInitialElement(e,r,i,t),f();else if(s&&h(s))(a=wn.computeStackTrace(s)).mechanism="onerror",o(a,!0,s);else{var l,d={url:r,line:i,column:c},p=t;if("[object String]"==={}.toString.call(t)){var m=t.match(En);m&&(l=m[1],p=m[2])}d.func=gn,d.context=null,o(a={name:l,message:p,mode:"onerror",mechanism:"onerror",stack:[u({},d,{url:d.url||jn()})]},!0,null)}return!!n&&n.apply(this,arguments)}function s(n){var t=n&&(n.detail?n.detail.reason:n.reason)||n,r=wn.computeStackTrace(t);r.mechanism="onunhandledrejection",o(r,!0,t)}function f(){var n=e,t=i;e=null,i=null,o(n,!1,t)}function a(n){if(e){if(i===n)return;f()}var t=wn.computeStackTrace(n);throw e=t,i=n,setTimeout(function(){i===n&&f()},t.incomplete?2e3:0),n}return a.subscribe=function(n){r.push(n)},a.installGlobalHandler=function(){!0!==t&&(n=bn.onerror,bn.onerror=c,t=!0)},a.installGlobalUnhandledRejectionHandler=function(){bn.onunhandledrejection=s},a}(),wn.computeStackTrace=function(){function n(n){if(!n.stack)return null;for(var t,r,i,e=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,o=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,u=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,c=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,s=/\((\S*)(?::(\d+))(?::(\d+))\)/,f=n.stack.split("\n"),a=[],h=/^(.*) is undefined$/.exec(n.message),v=0,l=f.length;v<l;++v){if(r=e.exec(f[v])){var d=r[2]&&0===r[2].indexOf("native");r[2]&&0===r[2].indexOf("eval")&&(t=s.exec(r[2]))&&(r[2]=t[1]),i={url:d?null:r[2],func:r[1]||gn,args:d?[r[2]]:[],line:r[3]?+r[3]:null,column:r[4]?+r[4]:null}}else if(r=u.exec(f[v]))i={url:r[2],func:r[1]||gn,args:[],line:+r[3],column:r[4]?+r[4]:null};else{if(!(r=o.exec(f[v])))continue;r[3]&&r[3].indexOf(" > eval")>-1&&(t=c.exec(r[3]))?r[3]=t[1]:0!==v||r[5]||void 0===n.columnNumber||(a[0].column=n.columnNumber+1),i={url:r[3],func:r[1]||gn,args:r[2]?r[2].split(","):[],line:r[4]?+r[4]:null,column:r[5]?+r[5]:null}}!i.func&&i.line&&(i.func=gn),i.context=null,a.push(i)}return a.length?(a[0]&&a[0].line&&!a[0].column&&h&&(a[0].column=null),{mode:"stack",name:n.name,message:n.message,stack:a}):null}function t(n,t,r,i){var e={url:t,line:r};if(e.url&&e.line){if(n.incomplete=!1,e.func||(e.func=gn),e.context||(e.context=null),/ '([^']+)' /.exec(i)&&(e.column=null),n.stack.length>0&&n.stack[0].url===e.url){if(n.stack[0].line===e.line)return!1;if(!n.stack[0].line&&n.stack[0].func===e.func)return n.stack[0].line=e.line,n.stack[0].context=e.context,!1}return n.stack.unshift(e),n.partial=!0,!0}return n.incomplete=!0,!1}function r(n,e){for(var o,u,c=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,s=[],f={},a=!1,h=r.caller;h&&!a;h=h.caller)if(h!==i&&h!==wn.report){if(u={url:null,func:gn,args:[],line:null,column:null},h.name?u.func=h.name:(o=c.exec(h.toString()))&&(u.func=o[1]),void 0===u.func)try{u.func=o.input.substring(0,o.input.indexOf("{"))}catch(n){}f[""+h]?a=!0:f[""+h]=!0,s.push(u)}e&&s.splice(0,e);var v={mode:"callers",name:n.name,message:n.message,stack:s};return t(v,n.sourceURL||n.fileName,n.line||n.lineNumber,n.message||n.description),v}function i(t,i){var e=null;i=null==i?0:+i;try{if(e=function(n){var t=n.stacktrace;if(t){for(var r,i=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,e=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,o=t.split("\n"),u=[],c=0;c<o.length;c+=2){var s=null;(r=i.exec(o[c]))?s={url:r[2],line:+r[1],column:null,func:r[3],args:[]}:(r=e.exec(o[c]))&&(s={url:r[6],line:+r[1],column:+r[2],func:r[3]||r[4],args:r[5]?r[5].split(","):[]}),s&&(!s.func&&s.line&&(s.func=gn),s.line&&(s.context=null),s.context||(s.context=[o[c+1]]),u.push(s))}return u.length?{mode:"stacktrace",name:n.name,message:n.message,stack:u}:null}}(t))return e}catch(n){}try{if(e=n(t))return e}catch(n){}try{if(e=function(n){var t=n.message.split("\n");if(t.length<4)return null;var r,i=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,e=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,o=/^\s*Line (\d+) of function script\s*$/i,u=[],c=bn&&bn.document&&bn.document.getElementsByTagName("script"),s=[];for(var f in c)xn(c,f)&&!c[f].src&&s.push(c[f]);for(var a=2;a<t.length;a+=2){var h=null;(r=i.exec(t[a]))?h={url:r[2],func:r[3],args:[],line:+r[1],column:null}:(r=e.exec(t[a]))?h={url:r[3],func:r[4],args:[],line:+r[1],column:null}:(r=o.exec(t[a]))&&(h={url:jn().replace(/#.*$/,""),func:"",args:[],line:r[1],column:null}),h&&(h.func||(h.func=gn),h.context=[t[a+1]],u.push(h))}return u.length?{mode:"multiline",name:n.name,message:t[0],stack:u}:null}(t))return e}catch(n){}try{if(e=r(t,i+1))return e}catch(n){}return{original:t,name:t.name,message:t.message,mode:"failed"}}return i.augmentStackTraceWithInitialElement=t,i.computeStackTraceFromStackProp=n,i}(),wn.collectWindowErrors=!0,wn.linesOfContext=11;var Sn=wn.report.subscribe,_n=wn.report.installGlobalHandler,On=wn.report.installGlobalUnhandledRejectionHandler,kn=wn.computeStackTrace,Tn=50;function Rn(n){var t=In(n.stack),r={type:n.name,value:n.message};return t&&t.length&&(r.stacktrace={frames:t}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Dn(n){return{exception:{values:[Rn(n)]}}}function In(n){if(!n||!n.length)return[];var t=n,r=t[0].func||"",i=t[t.length-1].func||"";return(r.includes("captureMessage")||r.includes("captureException"))&&(t=t.slice(1)),i.includes("sentryWrapped")&&(t=t.slice(0,-1)),t.map(function(n){return{colno:n.column,filename:n.url||t[0].url,function:n.func||"?",in_app:!0,lineno:n.line}}).slice(0,Tn).reverse()}var An,Cn,Mn=function(){function n(n){this.mn=n,this.yn=[]}return n.prototype.isReady=function(){return void 0===this.mn||this.length()<this.mn},n.prototype.add=function(n){return c(this,void 0,void 0,function(){var t=this;return s(this,function(r){return this.isReady()?(-1===this.yn.indexOf(n)&&this.yn.push(n),n.then(function(){return c(t,void 0,void 0,function(){return s(this,function(t){return[2,this.remove(n)]})})}).catch(function(){return c(t,void 0,void 0,function(){return s(this,function(t){return[2,this.remove(n).catch(function(){})]})})}),[2,n]):[2,Promise.reject(new Q("Not adding Promise due to buffer limit reached."))]})})},n.prototype.remove=function(n){return c(this,void 0,void 0,function(){return s(this,function(t){return[2,this.yn.splice(this.yn.indexOf(n),1)[0]]})})},n.prototype.length=function(){return this.yn.length},n.prototype.drain=function(n){return c(this,void 0,void 0,function(){var t=this;return s(this,function(r){return[2,new Promise(function(r){var i=setTimeout(function(){n&&n>0&&r(!1)},n);Promise.all(t.yn).then(function(){clearTimeout(i),r(!0)}).catch(function(){r(!0)})})]})})},n}(),Nn=function(){function n(n){this.options=n,this.yn=new Mn(30),this.url=new tn(this.options.dsn).getStoreEndpointWithUrlEncodedAuth()}return n.prototype.sendEvent=function(n){return c(this,void 0,void 0,function(){return s(this,function(n){throw new Q("Transport Class has to implement `sendEvent` method")})})},n.prototype.close=function(n){return c(this,void 0,void 0,function(){return s(this,function(t){return[2,this.yn.drain(n)]})})},n}(),Fn=w(),Un=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return r(i,t),i.prototype.sendEvent=function(t){return c(this,void 0,void 0,function(){var r;return s(this,function(i){return r={body:JSON.stringify(t),method:"POST",referrerPolicy:yn()?"origin":""},[2,this.yn.add(Fn.fetch(this.url,r).then(function(t){return{status:n.Status.fromHttpCode(t.status)}}))]})})},i}(Nn),Ln=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return r(i,t),i.prototype.sendEvent=function(t){return c(this,void 0,void 0,function(){var r=this;return s(this,function(i){return[2,this.yn.add(new Promise(function(i,e){var o=new XMLHttpRequest;o.onreadystatechange=function(){4===o.readyState&&(200===o.status&&i({status:n.Status.fromHttpCode(o.status)}),e(o))},o.open("POST",r.url),o.send(JSON.stringify(t))}))]})})},i}(Nn),Pn=Object.freeze({BaseTransport:Nn,FetchTransport:Un,XHRTransport:Ln}),$n=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return r(i,t),i.prototype.un=function(){if(!this.X.dsn)return t.prototype.un.call(this);var n=this.X.transportOptions?this.X.transportOptions:{dsn:this.X.dsn};return this.X.transport?new this.X.transport(n):mn()?new Un(n):new Ln(n)},i.prototype.eventFromException=function(t,r){var i,e,o=this;if(v(t)&&t.error)return t=t.error,i=Dn(kn(t)),M.resolve(this.bn(i,r));if(l(t)||(e=t,"[object DOMException]"===Object.prototype.toString.call(e))){var u=t,c=u.name||(l(u)?"DOMError":"DOMException"),s=u.message?c+": "+u.message:c;return this.eventFromMessage(s,n.Severity.Error,r).then(function(n){return _(n,s),M.resolve(o.bn(n,r))})}if(h(t))return i=Dn(kn(t)),M.resolve(this.bn(i,r));if(m(t)&&r&&r.syntheticException)return _(i=function(n,t){var r=Object.keys(n).sort(),i={extra:{__serialized__:D(n)},message:"Non-Error exception captured with keys: "+on(r)};if(t){var e=In(kn(t).stack);i.stacktrace={frames:e}}return i}(t,r.syntheticException),"Custom Object",void 0,{handled:!0,synthetic:!0,type:"generic"}),i.level=n.Severity.Error,M.resolve(this.bn(i,r));var f=t;return this.eventFromMessage(f,void 0,r).then(function(t){return _(t,""+f,void 0,{handled:!0,synthetic:!0,type:"generic"}),t.level=n.Severity.Error,M.resolve(o.bn(t,r))})},i.prototype.bn=function(n,t){return u({},n,{event_id:t&&t.event_id})},i.prototype.eventFromMessage=function(t,r,i){void 0===r&&(r=n.Severity.Info);var e={event_id:i&&i.event_id,level:r,message:t};if(this.X.attachStacktrace&&i&&i.syntheticException){var o=In(kn(i.syntheticException).stack);e.stacktrace={frames:o}}return M.resolve(e)},i}(hn),qn="sentry.javascript.browser",Hn=function(n){function t(t){return void 0===t&&(t={}),n.call(this,$n,t)||this}return r(t,n),t.prototype.rn=function(t,r,i){return t.platform=t.platform||"javascript",t.sdk=u({},t.sdk,{name:qn,packages:a(t.sdk&&t.sdk.packages||[],[{name:"npm:@sentry/browser",version:"5.0.5"}]),version:"5.0.5"}),n.prototype.rn.call(this,t,r,i)},t.prototype.showReportDialog=function(n){void 0===n&&(n={});var t=w().document;if(t)if(this.tn()){var r=n.dsn||this.getDsn();if(n.eventId)if(r){var i=t.createElement("script");i.async=!0,i.src=new tn(r).getReportDialogEndpoint(n),(t.head||t.body).appendChild(i)}else q.error("Missing `Dsn` option in showReportDialog call");else q.error("Missing `eventId` option in showReportDialog call")}else q.error("Trying to call showReportDialog with Sentry Client is disabled")},t}(fn),Wn=1e3,Bn=0;function Gn(n,t,r){if(void 0===t&&(t={}),"function"!=typeof n)return n;try{if(n.__sentry__)return n;if(n.__sentry_wrapped__)return n.__sentry_wrapped__}catch(t){return n}var sentryWrapped=function(){r&&"function"==typeof r&&r.apply(this,arguments);var i=Array.prototype.slice.call(arguments);try{var e=i.map(function(n){return Gn(n,t)});return n.handleEvent?n.handleEvent.apply(this,e):n.apply(this,e)}catch(n){throw Bn+=1,setTimeout(function(){Bn-=1}),Z(function(r){r.addEventProcessor(function(n){var r=u({},n);return t.mechanism&&_(r,void 0,void 0,t.mechanism),r.extra=u({},r.extra,{arguments:C(i,3)}),r}),captureException(n)}),n}};try{for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(sentryWrapped[i]=n[i])}catch(n){}n.prototype=n.prototype||{},sentryWrapped.prototype=n.prototype,Object.defineProperty(n,"__sentry_wrapped__",{enumerable:!1,value:sentryWrapped}),Object.defineProperties(sentryWrapped,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:n}});try{Object.defineProperty(sentryWrapped,"name",{get:function(){return n.name}})}catch(n){}return sentryWrapped}function Jn(n){return function(t){if(An=void 0,Cn!==t){var r;Cn=t;try{r=function(n){for(var t,r=n,i=[],e=0,o=0,u=" > ".length;r&&e++<5&&!("html"===(t=E(r))||e>1&&o+i.length*u+t.length>=80);)i.push(t),o+=t.length,r=r.parentNode;return i.reverse().join(" > ")}(t.target)}catch(n){r="<unknown>"}J().addBreadcrumb({category:"ui."+n,message:r},{event:t,name:n})}}}function Xn(){return function(n){var t;try{t=n.target}catch(n){return}var r=t&&t.tagName;r&&("INPUT"===r||"TEXTAREA"===r||t.isContentEditable)&&(An||Jn("input")(n),clearTimeout(An),An=setTimeout(function(){An=void 0},Wn))}}var zn=function(){function n(t){this.name=n.id,this.X=u({onerror:!0,onunhandledrejection:!0},t)}return n.prototype.setupOnce=function(){Error.stackTraceLimit=50,Sn(function(t,r,i){if(!(Bn>0)){var e=J().getIntegration(n);e&&J().captureEvent(e.wn(t),{data:{stack:t},originalException:i})}}),this.X.onerror&&(q.log("Global Handler attached: onerror"),_n()),this.X.onunhandledrejection&&(q.log("Global Handler attached: onunhandledrejection"),On())},n.prototype.wn=function(n){var t=Dn(n),r={mode:n.mode};n.message&&(r.message=n.message),n.name&&(r.name=n.name);var i=J().getClient(),e=i&&i.getOptions().maxValueLength||250;return _(t,n.original?rn(JSON.stringify(C(n.original)),e):"","onunhandledrejection"===n.mechanism?"UnhandledRejection":"Error",{data:r,handled:!1,type:n.mechanism}),t},n.id="GlobalHandlers",n}(),Vn=function(){function n(){this.gn=0,this.name=n.id}return n.prototype.En=function(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t[0];return t[0]=Gn(i,{mechanism:{data:{function:Kn(n)},handled:!0,type:"instrument"}}),n.apply(this,t)}},n.prototype.xn=function(n){return function(t){return n(Gn(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Kn(n)},handled:!0,type:"instrument"}}))}},n.prototype.jn=function(n){var t=w(),r=t[n]&&t[n].prototype;r&&r.hasOwnProperty&&r.hasOwnProperty("addEventListener")&&(T(r,"addEventListener",function(t){return function(r,i,e){try{i.handleEvent=Gn(i.handleEvent.bind(i),{mechanism:{data:{function:"handleEvent",handler:Kn(i),target:n},handled:!0,type:"instrument"}})}catch(n){}var o,u,c;return"EventTarget"!==n&&"Node"!==n||(u=Jn("click"),c=Xn(),o=function(n){if(n){var t;try{t=n.type}catch(n){return}return"click"===t?u(n):"keypress"===t?c(n):void 0}}),t.call(this,r,Gn(i,{mechanism:{data:{function:"addEventListener",handler:Kn(i),target:n},handled:!0,type:"instrument"}},o),e)}}),T(r,"removeEventListener",function(n){return function(t,r,i){var e=r;try{e=e&&(e.__sentry_wrapped__||e)}catch(n){}return n.call(this,t,e,i)}}))},n.prototype.setupOnce=function(){this.gn=this.gn;var n=w();T(n,"setTimeout",this.En.bind(this)),T(n,"setInterval",this.En.bind(this)),T(n,"requestAnimationFrame",this.xn.bind(this)),["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"].forEach(this.jn.bind(this))},n.id="TryCatch",n}();function Kn(n){try{return n&&n.name||"<anonymous>"}catch(n){return"<anonymous>"}}var Zn,Qn=w(),Yn=function(){function t(n){this.name=t.id,this.X=u({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},n)}return t.prototype.Sn=function(){"console"in Qn&&["debug","info","warn","error","log"].forEach(function(r){r in Qn.console&&T(Qn.console,r,function(i){return function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];var u={category:"console",data:{extra:{arguments:C(e,3)},logger:"console"},level:n.Severity.fromString(r),message:en(e," ")};"assert"===r&&!1===e[0]&&(u.message="Assertion failed: "+(en(e.slice(1)," ")||"console.assert"),u.data.extra.arguments=C(e.slice(1),3)),t.addBreadcrumb(u,{input:e,level:r}),i&&Function.prototype.apply.call(i,Qn.console,e)}})})},t.prototype._n=function(){"document"in Qn&&(Qn.document.addEventListener("click",Jn("click"),!1),Qn.document.addEventListener("keypress",Xn(),!1))},t.prototype.On=function(){mn()&&-1!==w().fetch.toString().indexOf("native")&&T(Qn,"fetch",function(r){return function(){for(var i=[],e=0;e<arguments.length;e++)i[e]=arguments[e];var o,u=i[0],c="GET";"string"==typeof u?o=u:"Request"in Qn&&u instanceof Request?(o=u.url,u.method&&(c=u.method)):o=String(u),i[1]&&i[1].method&&(c=i[1].method);var s=J().getClient(),f=s&&s.getDsn();if(f){var a=new tn(f).getStoreEndpoint();if(a&&o.includes(a))return"POST"===c&&i[1]&&i[1].body&&nt(i[1].body),r.apply(Qn,i)}var h={method:c,url:o};return r.apply(Qn,i).then(function(n){return h.status_code=n.status,t.addBreadcrumb({category:"fetch",data:h,type:"http"},{input:i,response:n}),n}).catch(function(r){throw t.addBreadcrumb({category:"fetch",data:h,level:n.Severity.Error,type:"http"},{error:r,input:i}),r})}})},t.prototype.kn=function(){var n=this;if(r=w(),i=r.chrome,e=i&&i.app&&i.app.runtime,o="history"in r&&!!r.history.pushState&&!!r.history.replaceState,!e&&o){var r,i,e,o,u=function(n,r){var i=x(Qn.location.href),e=x(r),o=x(n);o.path||(o=i),Zn=r,i.protocol===e.protocol&&i.host===e.host&&(r=e.relative),i.protocol===o.protocol&&i.host===o.host&&(n=o.relative),t.addBreadcrumb({category:"navigation",data:{from:n,to:r}})},c=Qn.onpopstate;Qn.onpopstate=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=Qn.location.href;if(u(Zn,i),c)return c.apply(n,t)},T(Qn.history,"pushState",s),T(Qn.history,"replaceState",s)}function s(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t.length>2?t[2]:void 0;return i&&u(Zn,String(i)),n.apply(this,t)}}},t.prototype.Tn=function(){if("XMLHttpRequest"in Qn){var n=XMLHttpRequest.prototype;T(n,"open",function(n){return function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=t[1];this.__sentry_xhr__={method:t[0],url:t[1]};var e=J().getClient(),o=e&&e.getDsn();if(o){var u=new tn(o).getStoreEndpoint();d(i)&&u&&i.includes(u)&&(this.__sentry_own_request__=!0)}return n.apply(this,t)}}),T(n,"send",function(n){return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var e=this;function o(){if(4===e.readyState){if(e.__sentry_own_request__)return;try{e.__sentry_xhr__&&(e.__sentry_xhr__.status_code=e.status)}catch(n){}t.addBreadcrumb({category:"xhr",data:e.__sentry_xhr__,type:"http"},{xhr:e})}}return e.__sentry_own_request__&&nt(r[0]),["onload","onerror","onprogress"].forEach(function(n){!function(n,t){n in t&&"function"==typeof t[n]&&T(t,n,function(t){return Gn(t,{mechanism:{data:{function:n,handler:t&&t.name||"<anonymous>"},handled:!0,type:"instrument"}})})}(n,e)}),"onreadystatechange"in e&&"function"==typeof e.onreadystatechange?T(e,"onreadystatechange",function(n){return Gn(n,{mechanism:{data:{function:"onreadystatechange",handler:n&&n.name||"<anonymous>"},handled:!0,type:"instrument"}},o)}):e.onreadystatechange=o,n.apply(this,r)}})}},t.addBreadcrumb=function(n,r){J().getIntegration(t)&&J().addBreadcrumb(n,r)},t.prototype.setupOnce=function(){this.X.console&&this.Sn(),this.X.dom&&this._n(),this.X.xhr&&this.Tn(),this.X.fetch&&this.On(),this.X.history&&this.kn()},t.id="Breadcrumbs",t}();function nt(t){try{var r=JSON.parse(t);Yn.addBreadcrumb({category:"sentry",event_id:r.event_id,level:r.level||n.Severity.fromString("error"),message:j(r)},{event:r})}catch(n){q.error("Error while adding sentry type breadcrumb")}}var tt="cause",rt=5,it=function(){function n(t){void 0===t&&(t={}),this.name=n.id,this.Rn=t.key||tt,this.mn=t.limit||rt}return n.prototype.setupOnce=function(){U(function(t,r){var i=J().getIntegration(n);return i?i.handler(t,r):t})},n.prototype.handler=function(n,t){if(!(n.exception&&n.exception.values&&t&&t.originalException instanceof Error))return n;var r=this.walkErrorTree(t.originalException,this.Rn);return n.exception.values=a(r,n.exception.values),n},n.prototype.walkErrorTree=function(n,t,r){if(void 0===r&&(r=[]),!(n[t]instanceof Error)||r.length+1>=this.mn)return r;var i=Rn(kn(n[t]));return this.walkErrorTree(n[t],t,a([i],r))},n.id="LinkedErrors",n}(),et=w(),ot=function(){function n(){this.name=n.id}return n.prototype.setupOnce=function(){U(function(t){if(J().getIntegration(n)){if(!et.navigator||!et.location)return t;var r=t.request||{};return r.url=r.url||et.location.href,r.headers=r.headers||{},r.headers["User-Agent"]=et.navigator.userAgent,u({},t,{request:r})}return t})},n.id="UserAgent",n}(),ut=Object.freeze({GlobalHandlers:zn,TryCatch:Vn,Breadcrumbs:Yn,LinkedErrors:it,UserAgent:ot}),ct=[new dn,new vn,new Vn,new Yn,new zn,new it,new ot];var st={},ft=w();ft.Sentry&&ft.Sentry.Integrations&&(st=ft.Sentry.Integrations);var at=u({},st,pn,ut);return n.Integrations=at,n.Transports=Pn,n.addGlobalEventProcessor=U,n.addBreadcrumb=function(n){K("addBreadcrumb",n)},n.captureException=captureException,n.captureEvent=function(n){return K("captureEvent",n)},n.captureMessage=function(n,t){var r;try{throw new Error(n)}catch(n){r=n}return K("captureMessage",n,t,{originalException:n,syntheticException:r})},n.configureScope=function(n){K("configureScope",n)},n.withScope=Z,n.getHubFromCarrier=z,n.getCurrentHub=J,n.Hub=W,n.Scope=N,n.BrowserClient=Hn,n.defaultIntegrations=ct,n.forceLoad=function(){},n.init=function(n){void 0===n&&(n={}),void 0===n.defaultIntegrations&&(n.defaultIntegrations=ct),function(n,t){!0===t.debug&&q.enable(),J().bindClient(new n(t))}(Hn,n)},n.lastEventId=function(){return J().lastEventId()},n.onLoad=function(n){n()},n.showReportDialog=function(n){void 0===n&&(n={}),n.eventId||(n.eventId=J().lastEventId());var t=J().getClient();t&&t.showReportDialog(n)},n.flush=function(n){return c(this,void 0,void 0,function(){var t;return s(this,function(r){return(t=J().getClient())?[2,t.flush(n)]:[2,Promise.reject(!1)]})})},n.close=function(n){return c(this,void 0,void 0,function(){var t;return s(this,function(r){return(t=J().getClient())?[2,t.close(n)]:[2,Promise.reject(!1)]})})},n.SDK_NAME=qn,n.SDK_VERSION="5.0.5",n}({});
//# sourceMappingURL=bundle.min.js.map
export declare const SDK_NAME = "sentry.javascript.browser";
export declare const SDK_VERSION = "5.0.3";
export declare const SDK_VERSION = "5.0.5";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.SDK_NAME = 'sentry.javascript.browser';
exports.SDK_VERSION = '5.0.3';
exports.SDK_VERSION = '5.0.5';
//# sourceMappingURL=version.js.map

@@ -0,1 +1,2 @@

import * as tslib_1 from "tslib";
import { BaseBackend } from '@sentry/core';

@@ -14,12 +15,16 @@ import { Severity } from '@sentry/types';

*/
export class BrowserBackend extends BaseBackend {
var BrowserBackend = /** @class */ (function (_super) {
tslib_1.__extends(BrowserBackend, _super);
function BrowserBackend() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* @inheritDoc
*/
_setupTransport() {
BrowserBackend.prototype._setupTransport = function () {
if (!this._options.dsn) {
// We return the noop transport here in case there is no Dsn.
return super._setupTransport();
return _super.prototype._setupTransport.call(this);
}
const transportOptions = this._options.transportOptions
var transportOptions = this._options.transportOptions
? this._options.transportOptions

@@ -34,11 +39,12 @@ : { dsn: this._options.dsn };

return new XHRTransport(transportOptions);
}
};
/**
* @inheritDoc
*/
eventFromException(exception, hint) {
let event;
BrowserBackend.prototype.eventFromException = function (exception, hint) {
var _this = this;
var event;
if (isErrorEvent(exception) && exception.error) {
// If it is an ErrorEvent with `error` property, extract it to get actual Error
const errorEvent = exception;
var errorEvent = exception;
exception = errorEvent.error; // tslint:disable-line:no-parameter-reassignment

@@ -53,8 +59,8 @@ event = eventFromStacktrace(computeStackTrace(exception));

// https://developer.mozilla.org/en-US/docs/Web/API/DOMException
const domException = exception;
const name = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');
const message = domException.message ? `${name}: ${domException.message}` : name;
return this.eventFromMessage(message, Severity.Error, hint).then(messageEvent => {
addExceptionTypeValue(messageEvent, message);
return SyncPromise.resolve(this._buildEvent(messageEvent, hint));
var domException = exception;
var name_1 = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');
var message_1 = domException.message ? name_1 + ": " + domException.message : name_1;
return this.eventFromMessage(message_1, Severity.Error, hint).then(function (messageEvent) {
addExceptionTypeValue(messageEvent, message_1);
return SyncPromise.resolve(_this._buildEvent(messageEvent, hint));
});

@@ -71,3 +77,3 @@ }

// which is much better than creating new group when any key/value change
const objectException = exception;
var objectException = exception;
event = eventFromPlainObject(objectException, hint.syntheticException);

@@ -88,5 +94,5 @@ addExceptionTypeValue(event, 'Custom Object', undefined, {

// So bail out and capture it as a simple message:
const stringException = exception;
return this.eventFromMessage(stringException, undefined, hint).then(messageEvent => {
addExceptionTypeValue(messageEvent, `${stringException}`, undefined, {
var stringException = exception;
return this.eventFromMessage(stringException, undefined, hint).then(function (messageEvent) {
addExceptionTypeValue(messageEvent, "" + stringException, undefined, {
handled: true,

@@ -97,30 +103,33 @@ synthetic: true,

messageEvent.level = Severity.Error;
return SyncPromise.resolve(this._buildEvent(messageEvent, hint));
return SyncPromise.resolve(_this._buildEvent(messageEvent, hint));
});
}
};
/**
* This is an internal helper function that creates an event.
*/
_buildEvent(event, hint) {
return Object.assign({}, event, { event_id: hint && hint.event_id });
}
BrowserBackend.prototype._buildEvent = function (event, hint) {
return tslib_1.__assign({}, event, { event_id: hint && hint.event_id });
};
/**
* @inheritDoc
*/
eventFromMessage(message, level = Severity.Info, hint) {
const event = {
BrowserBackend.prototype.eventFromMessage = function (message, level, hint) {
if (level === void 0) { level = Severity.Info; }
var event = {
event_id: hint && hint.event_id,
level,
message,
level: level,
message: message,
};
if (this._options.attachStacktrace && hint && hint.syntheticException) {
const stacktrace = computeStackTrace(hint.syntheticException);
const frames = prepareFramesForEvent(stacktrace.stack);
var stacktrace = computeStackTrace(hint.syntheticException);
var frames_1 = prepareFramesForEvent(stacktrace.stack);
event.stacktrace = {
frames,
frames: frames_1,
};
}
return SyncPromise.resolve(event);
}
}
};
return BrowserBackend;
}(BaseBackend));
export { BrowserBackend };
//# sourceMappingURL=backend.js.map

@@ -0,1 +1,2 @@

import * as tslib_1 from "tslib";
import { API, BaseClient } from '@sentry/core';

@@ -12,3 +13,4 @@ import { logger } from '@sentry/utils/logger';

*/
export class BrowserClient extends BaseClient {
var BrowserClient = /** @class */ (function (_super) {
tslib_1.__extends(BrowserClient, _super);
/**

@@ -19,4 +21,5 @@ * Creates a new Browser SDK instance.

*/
constructor(options = {}) {
super(BrowserBackend, options);
function BrowserClient(options) {
if (options === void 0) { options = {}; }
return _super.call(this, BrowserBackend, options) || this;
}

@@ -26,6 +29,5 @@ /**

*/
_prepareEvent(event, scope, hint) {
BrowserClient.prototype._prepareEvent = function (event, scope, hint) {
event.platform = event.platform || 'javascript';
event.sdk = Object.assign({}, event.sdk, { name: SDK_NAME, packages: [
...((event.sdk && event.sdk.packages) || []),
event.sdk = tslib_1.__assign({}, event.sdk, { name: SDK_NAME, packages: tslib_1.__spread(((event.sdk && event.sdk.packages) || []), [
{

@@ -35,5 +37,5 @@ name: 'npm:@sentry/browser',

},
], version: SDK_VERSION });
return super._prepareEvent(event, scope, hint);
}
]), version: SDK_VERSION });
return _super.prototype._prepareEvent.call(this, event, scope, hint);
};
/**

@@ -44,5 +46,6 @@ * Show a report dialog to the user to send feedback to a specific event.

*/
showReportDialog(options = {}) {
BrowserClient.prototype.showReportDialog = function (options) {
if (options === void 0) { options = {}; }
// doesn't work without a document (React Native)
const document = getGlobalObject().document;
var document = getGlobalObject().document;
if (!document) {

@@ -55,3 +58,3 @@ return;

}
const dsn = options.dsn || this.getDsn();
var dsn = options.dsn || this.getDsn();
if (!options.eventId) {

@@ -65,8 +68,10 @@ logger.error('Missing `eventId` option in showReportDialog call');

}
const script = document.createElement('script');
var script = document.createElement('script');
script.async = true;
script.src = new API(dsn).getReportDialogEndpoint(options);
(document.head || document.body).appendChild(script);
}
}
};
return BrowserClient;
}(BaseClient));
export { BrowserClient };
//# sourceMappingURL=client.js.map

@@ -0,1 +1,2 @@

import * as tslib_1 from "tslib";
export { Severity, Status, } from '@sentry/types';

@@ -10,5 +11,5 @@ export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, withScope, getHubFromCarrier, getCurrentHub, Hub, Scope, } from '@sentry/core';

import * as Transports from './transports';
let windowIntegrations = {};
var windowIntegrations = {};
// tslint:disable: no-unsafe-any
const _window = getGlobalObject();
var _window = getGlobalObject();
if (_window.Sentry && _window.Sentry.Integrations) {

@@ -18,4 +19,4 @@ windowIntegrations = _window.Sentry.Integrations;

// tslint:enable: no-unsafe-any
const INTEGRATIONS = Object.assign({}, windowIntegrations, CoreIntegrations, BrowserIntegrations);
var INTEGRATIONS = tslib_1.__assign({}, windowIntegrations, CoreIntegrations, BrowserIntegrations);
export { INTEGRATIONS as Integrations, Transports };
//# sourceMappingURL=index.js.map

@@ -0,1 +1,2 @@

import * as tslib_1 from "tslib";
import { API, getCurrentHub } from '@sentry/core';

@@ -10,10 +11,10 @@ import { Severity } from '@sentry/types';

import { breadcrumbEventHandler, keypressEventHandler, wrap } from './helpers';
const global = getGlobalObject();
let lastHref;
var global = getGlobalObject();
var lastHref;
/** Default Breadcrumbs instrumentations */
export class Breadcrumbs {
var Breadcrumbs = /** @class */ (function () {
/**
* @inheritDoc
*/
constructor(options) {
function Breadcrumbs(options) {
/**

@@ -23,6 +24,6 @@ * @inheritDoc

this.name = Breadcrumbs.id;
this._options = Object.assign({ console: true, dom: true, fetch: true, history: true, sentry: true, xhr: true }, options);
this._options = tslib_1.__assign({ console: true, dom: true, fetch: true, history: true, sentry: true, xhr: true }, options);
}
/** JSDoc */
_instrumentConsole() {
Breadcrumbs.prototype._instrumentConsole = function () {
if (!('console' in global)) {

@@ -36,4 +37,8 @@ return;

fill(global.console, level, function (originalConsoleLevel) {
return function (...args) {
const breadcrumbData = {
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var breadcrumbData = {
category: 'console',

@@ -51,3 +56,3 @@ data: {

if (args[0] === false) {
breadcrumbData.message = `Assertion failed: ${safeJoin(args.slice(1), ' ') || 'console.assert'}`;
breadcrumbData.message = "Assertion failed: " + (safeJoin(args.slice(1), ' ') || 'console.assert');
breadcrumbData.data.extra.arguments = normalize(args.slice(1), 3);

@@ -58,3 +63,3 @@ }

input: args,
level,
level: level,
});

@@ -68,5 +73,5 @@ // this fails for some browsers. :(

});
}
};
/** JSDoc */
_instrumentDOM() {
Breadcrumbs.prototype._instrumentDOM = function () {
if (!('document' in global)) {

@@ -79,5 +84,5 @@ return;

global.document.addEventListener('keypress', keypressEventHandler(), false);
}
};
/** JSDoc */
_instrumentFetch() {
Breadcrumbs.prototype._instrumentFetch = function () {
if (!supportsNativeFetch()) {

@@ -87,6 +92,10 @@ return;

fill(global, 'fetch', function (originalFetch) {
return function (...args) {
const fetchInput = args[0];
let method = 'GET';
let url;
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var fetchInput = args[0];
var method = 'GET';
var url;
if (typeof fetchInput === 'string') {

@@ -107,6 +116,6 @@ url = fetchInput;

}
const client = getCurrentHub().getClient();
const dsn = client && client.getDsn();
var client = getCurrentHub().getClient();
var dsn = client && client.getDsn();
if (dsn) {
const filterUrl = new API(dsn).getStoreEndpoint();
var filterUrl = new API(dsn).getStoreEndpoint();
// if Sentry key appears in URL, don't capture it as a request

@@ -121,9 +130,9 @@ // but rather as our own 'sentry' type breadcrumb

}
const fetchData = {
method,
url,
var fetchData = {
method: method,
url: url,
};
return originalFetch
.apply(global, args)
.then((response) => {
.then(function (response) {
fetchData.status_code = response.status;

@@ -136,7 +145,7 @@ Breadcrumbs.addBreadcrumb({

input: args,
response,
response: response,
});
return response;
})
.catch((error) => {
.catch(function (error) {
Breadcrumbs.addBreadcrumb({

@@ -148,3 +157,3 @@ category: 'fetch',

}, {
error,
error: error,
input: args,

@@ -156,12 +165,13 @@ });

});
}
};
/** JSDoc */
_instrumentHistory() {
Breadcrumbs.prototype._instrumentHistory = function () {
var _this = this;
if (!supportsHistory()) {
return;
}
const captureUrlChange = (from, to) => {
const parsedLoc = parseUrl(global.location.href);
const parsedTo = parseUrl(to);
let parsedFrom = parseUrl(from);
var captureUrlChange = function (from, to) {
var parsedLoc = parseUrl(global.location.href);
var parsedTo = parseUrl(to);
var parsedFrom = parseUrl(from);
// Initial pushState doesn't provide `from` information

@@ -188,4 +198,4 @@ if (!parsedFrom.path) {

data: {
from,
to,
from: from,
to: to,
},

@@ -195,8 +205,12 @@ });

// record navigation (URL) changes
const oldOnPopState = global.onpopstate;
global.onpopstate = (...args) => {
const currentHref = global.location.href;
var oldOnPopState = global.onpopstate;
global.onpopstate = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var currentHref = global.location.href;
captureUrlChange(lastHref, currentHref);
if (oldOnPopState) {
return oldOnPopState.apply(this, args);
return oldOnPopState.apply(_this, args);
}

@@ -210,4 +224,8 @@ };

// params to preserve 0 arity
return function (...args) {
const url = args.length > 2 ? args[2] : undefined;
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var url = args.length > 2 ? args[2] : undefined;
// url argument is optional

@@ -223,5 +241,5 @@ if (url) {

fill(global.history, 'replaceState', historyReplacementFunction);
}
};
/** JSDoc */
_instrumentXHR() {
Breadcrumbs.prototype._instrumentXHR = function () {
if (!('XMLHttpRequest' in global)) {

@@ -236,74 +254,7 @@ return;

if (prop in xhr && typeof xhr[prop] === 'function') {
fill(xhr, prop, original => wrap(original, {
mechanism: {
data: {
function: prop,
handler: (original && original.name) || '<anonymous>',
},
handled: true,
type: 'instrument',
},
}));
}
}
const xhrproto = XMLHttpRequest.prototype;
fill(xhrproto, 'open', originalOpen => function (...args) {
const url = args[1];
this.__sentry_xhr__ = {
method: args[0],
url: args[1],
};
const client = getCurrentHub().getClient();
const dsn = client && client.getDsn();
if (dsn) {
const filterUrl = new API(dsn).getStoreEndpoint();
// if Sentry key appears in URL, don't capture it as a request
// but rather as our own 'sentry' type breadcrumb
if (isString(url) && (filterUrl && url.includes(filterUrl))) {
this.__sentry_own_request__ = true;
}
}
return originalOpen.apply(this, args);
});
fill(xhrproto, 'send', originalSend => function (...args) {
const xhr = this; // tslint:disable-line:no-this-assignment
if (xhr.__sentry_own_request__) {
addSentryBreadcrumb(args[0]);
}
/**
* @hidden
*/
function onreadystatechangeHandler() {
if (xhr.readyState === 4) {
if (xhr.__sentry_own_request__) {
return;
}
try {
// touching statusCode in some platforms throws
// an exception
if (xhr.__sentry_xhr__) {
xhr.__sentry_xhr__.status_code = xhr.status;
}
}
catch (e) {
/* do nothing */
}
Breadcrumbs.addBreadcrumb({
category: 'xhr',
data: xhr.__sentry_xhr__,
type: 'http',
}, {
xhr,
});
}
}
['onload', 'onerror', 'onprogress'].forEach(prop => {
wrapProp(prop, xhr);
});
if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {
fill(xhr, 'onreadystatechange', function (original) {
fill(xhr, prop, function (original) {
return wrap(original, {
mechanism: {
data: {
function: 'onreadystatechange',
function: prop,
handler: (original && original.name) || '<anonymous>',

@@ -314,13 +265,94 @@ },

},
}, onreadystatechangeHandler);
});
});
}
else {
// if onreadystatechange wasn't actually set by the page on this xhr, we
// are free to set our own and capture the breadcrumb
xhr.onreadystatechange = onreadystatechangeHandler;
}
return originalSend.apply(this, args);
}
var xhrproto = XMLHttpRequest.prototype;
fill(xhrproto, 'open', function (originalOpen) {
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var url = args[1];
this.__sentry_xhr__ = {
method: args[0],
url: args[1],
};
var client = getCurrentHub().getClient();
var dsn = client && client.getDsn();
if (dsn) {
var filterUrl = new API(dsn).getStoreEndpoint();
// if Sentry key appears in URL, don't capture it as a request
// but rather as our own 'sentry' type breadcrumb
if (isString(url) && (filterUrl && url.includes(filterUrl))) {
this.__sentry_own_request__ = true;
}
}
return originalOpen.apply(this, args);
};
});
}
fill(xhrproto, 'send', function (originalSend) {
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var xhr = this; // tslint:disable-line:no-this-assignment
if (xhr.__sentry_own_request__) {
addSentryBreadcrumb(args[0]);
}
/**
* @hidden
*/
function onreadystatechangeHandler() {
if (xhr.readyState === 4) {
if (xhr.__sentry_own_request__) {
return;
}
try {
// touching statusCode in some platforms throws
// an exception
if (xhr.__sentry_xhr__) {
xhr.__sentry_xhr__.status_code = xhr.status;
}
}
catch (e) {
/* do nothing */
}
Breadcrumbs.addBreadcrumb({
category: 'xhr',
data: xhr.__sentry_xhr__,
type: 'http',
}, {
xhr: xhr,
});
}
}
['onload', 'onerror', 'onprogress'].forEach(function (prop) {
wrapProp(prop, xhr);
});
if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {
fill(xhr, 'onreadystatechange', function (original) {
return wrap(original, {
mechanism: {
data: {
function: 'onreadystatechange',
handler: (original && original.name) || '<anonymous>',
},
handled: true,
type: 'instrument',
},
}, onreadystatechangeHandler);
});
}
else {
// if onreadystatechange wasn't actually set by the page on this xhr, we
// are free to set our own and capture the breadcrumb
xhr.onreadystatechange = onreadystatechangeHandler;
}
return originalSend.apply(this, args);
};
});
};
/**

@@ -331,7 +363,7 @@ * Helper that checks if integration is enabled on the client.

*/
static addBreadcrumb(breadcrumb, hint) {
Breadcrumbs.addBreadcrumb = function (breadcrumb, hint) {
if (getCurrentHub().getIntegration(Breadcrumbs)) {
getCurrentHub().addBreadcrumb(breadcrumb, hint);
}
}
};
/**

@@ -345,3 +377,3 @@ * Instrument browser built-ins w/ breadcrumb capturing

*/
setupOnce() {
Breadcrumbs.prototype.setupOnce = function () {
if (this._options.console) {

@@ -362,8 +394,10 @@ this._instrumentConsole();

}
}
}
/**
* @inheritDoc
*/
Breadcrumbs.id = 'Breadcrumbs';
};
/**
* @inheritDoc
*/
Breadcrumbs.id = 'Breadcrumbs';
return Breadcrumbs;
}());
export { Breadcrumbs };
/** JSDoc */

@@ -373,10 +407,10 @@ function addSentryBreadcrumb(serializedData) {

try {
const event = JSON.parse(serializedData);
var event_1 = JSON.parse(serializedData);
Breadcrumbs.addBreadcrumb({
category: 'sentry',
event_id: event.event_id,
level: event.level || Severity.fromString('error'),
message: getEventDescription(event),
event_id: event_1.event_id,
level: event_1.level || Severity.fromString('error'),
message: getEventDescription(event_1),
}, {
event,
event: event_1,
});

@@ -383,0 +417,0 @@ }

@@ -0,1 +1,2 @@

import * as tslib_1 from "tslib";
import { getCurrentHub } from '@sentry/core';

@@ -10,5 +11,5 @@ import { logger } from '@sentry/utils/logger';

/** Global handlers */
export class GlobalHandlers {
var GlobalHandlers = /** @class */ (function () {
/** JSDoc */
constructor(options) {
function GlobalHandlers(options) {
/**

@@ -18,3 +19,3 @@ * @inheritDoc

this.name = GlobalHandlers.id;
this._options = Object.assign({ onerror: true, onunhandledrejection: true }, options);
this._options = tslib_1.__assign({ onerror: true, onunhandledrejection: true }, options);
}

@@ -24,5 +25,5 @@ /**

*/
setupOnce() {
GlobalHandlers.prototype.setupOnce = function () {
Error.stackTraceLimit = 50;
subscribe((stack, _, error) => {
subscribe(function (stack, _, error) {
// TODO: use stack.context to get a valuable information from TraceKit, eg.

@@ -45,6 +46,6 @@ // [

}
const self = getCurrentHub().getIntegration(GlobalHandlers);
var self = getCurrentHub().getIntegration(GlobalHandlers);
if (self) {
getCurrentHub().captureEvent(self._eventFromGlobalHandler(stack), {
data: { stack },
data: { stack: stack },
originalException: error,

@@ -62,3 +63,3 @@ });

}
}
};
/**

@@ -69,5 +70,5 @@ * This function creates an Event from an TraceKitStackTrace.

*/
_eventFromGlobalHandler(stacktrace) {
const event = eventFromStacktrace(stacktrace);
const data = {
GlobalHandlers.prototype._eventFromGlobalHandler = function (stacktrace) {
var event = eventFromStacktrace(stacktrace);
var data = {
mode: stacktrace.mode,

@@ -81,11 +82,11 @@ };

}
const client = getCurrentHub().getClient();
const maxValueLength = (client && client.getOptions().maxValueLength) || 250;
const fallbackValue = stacktrace.original
var client = getCurrentHub().getClient();
var maxValueLength = (client && client.getOptions().maxValueLength) || 250;
var fallbackValue = stacktrace.original
? truncate(JSON.stringify(normalize(stacktrace.original)), maxValueLength)
: '';
const fallbackType = stacktrace.mechanism === 'onunhandledrejection' ? 'UnhandledRejection' : 'Error';
var fallbackType = stacktrace.mechanism === 'onunhandledrejection' ? 'UnhandledRejection' : 'Error';
// This makes sure we have type/value in every exception
addExceptionTypeValue(event, fallbackValue, fallbackType, {
data,
data: data,
handled: false,

@@ -95,8 +96,10 @@ type: stacktrace.mechanism,

return event;
}
}
/**
* @inheritDoc
*/
GlobalHandlers.id = 'GlobalHandlers';
};
/**
* @inheritDoc
*/
GlobalHandlers.id = 'GlobalHandlers';
return GlobalHandlers;
}());
export { GlobalHandlers };
//# sourceMappingURL=globalhandlers.js.map

@@ -0,8 +1,9 @@

import * as tslib_1 from "tslib";
import { captureException, getCurrentHub, withScope } from '@sentry/core';
import { addExceptionTypeValue, htmlTreeAsString } from '@sentry/utils/misc';
import { normalize } from '@sentry/utils/object';
const debounceDuration = 1000;
let keypressTimeout;
let lastCapturedEvent;
let ignoreOnError = 0;
var debounceDuration = 1000;
var keypressTimeout;
var lastCapturedEvent;
var ignoreOnError = 0;
/**

@@ -20,3 +21,3 @@ * @hidden

ignoreOnError += 1;
setTimeout(() => {
setTimeout(function () {
ignoreOnError -= 1;

@@ -33,3 +34,4 @@ });

*/
export function wrap(fn, options = {}, before) {
export function wrap(fn, options, before) {
if (options === void 0) { options = {}; }
// tslint:disable-next-line:strict-type-predicates

@@ -55,3 +57,3 @@ if (typeof fn !== 'function') {

}
const sentryWrapped = function () {
var sentryWrapped = function () {
// tslint:disable-next-line:strict-type-predicates

@@ -61,3 +63,3 @@ if (before && typeof before === 'function') {

}
const args = Array.prototype.slice.call(arguments);
var args = Array.prototype.slice.call(arguments);
try {

@@ -68,3 +70,3 @@ // Attempt to invoke user-land function

// expected behavior and NOT indicative of a bug with Raven.js.
const wrappedArguments = args.map((arg) => wrap(arg, options));
var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });
if (fn.handleEvent) {

@@ -77,9 +79,9 @@ return fn.handleEvent.apply(this, wrappedArguments);

ignoreNextOnError();
withScope(scope => {
scope.addEventProcessor((event) => {
const processedEvent = Object.assign({}, event);
withScope(function (scope) {
scope.addEventProcessor(function (event) {
var processedEvent = tslib_1.__assign({}, event);
if (options.mechanism) {
addExceptionTypeValue(processedEvent, undefined, undefined, options.mechanism);
}
processedEvent.extra = Object.assign({}, processedEvent.extra, { arguments: normalize(args, 3) });
processedEvent.extra = tslib_1.__assign({}, processedEvent.extra, { arguments: normalize(args, 3) });
return processedEvent;

@@ -95,3 +97,3 @@ });

try {
for (const property in fn) {
for (var property in fn) {
if (Object.prototype.hasOwnProperty.call(fn, property)) {

@@ -124,3 +126,3 @@ sentryWrapped[property] = fn[property];

Object.defineProperty(sentryWrapped, 'name', {
get() {
get: function () {
return fn.name;

@@ -142,3 +144,3 @@ },

export function breadcrumbEventHandler(eventName) {
return (event) => {
return function (event) {
// reset keypress timeout; e.g. triggering a 'click' after

@@ -159,3 +161,3 @@ // a 'keypress' will reset the keypress debounce so that a new

// can throw an exception in some circumstances.
let target;
var target;
try {

@@ -168,6 +170,6 @@ target = htmlTreeAsString(event.target);

getCurrentHub().addBreadcrumb({
category: `ui.${eventName}`,
category: "ui." + eventName,
message: target,
}, {
event,
event: event,
name: eventName,

@@ -186,4 +188,4 @@ });

// a single breadcrumb from the FIRST target (acceptable?)
return (event) => {
let target;
return function (event) {
var target;
try {

@@ -197,3 +199,3 @@ target = event.target;

}
const tagName = target && target.tagName;
var tagName = target && target.tagName;
// only consider keypress events on actual input elements

@@ -211,3 +213,3 @@ // this will disregard keypresses targeting body (e.g. tabbing

clearTimeout(keypressTimeout);
keypressTimeout = setTimeout(() => {
keypressTimeout = setTimeout(function () {
keypressTimeout = undefined;

@@ -214,0 +216,0 @@ }, debounceDuration);

@@ -0,12 +1,14 @@

import * as tslib_1 from "tslib";
import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';
import { exceptionFromStacktrace } from '../parsers';
import { computeStackTrace } from '../tracekit';
const DEFAULT_KEY = 'cause';
const DEFAULT_LIMIT = 5;
var DEFAULT_KEY = 'cause';
var DEFAULT_LIMIT = 5;
/** Adds SDK info to an event. */
export class LinkedErrors {
var LinkedErrors = /** @class */ (function () {
/**
* @inheritDoc
*/
constructor(options = {}) {
function LinkedErrors(options) {
if (options === void 0) { options = {}; }
/**

@@ -22,5 +24,5 @@ * @inheritDoc

*/
setupOnce() {
addGlobalEventProcessor((event, hint) => {
const self = getCurrentHub().getIntegration(LinkedErrors);
LinkedErrors.prototype.setupOnce = function () {
addGlobalEventProcessor(function (event, hint) {
var self = getCurrentHub().getIntegration(LinkedErrors);
if (self) {

@@ -31,30 +33,33 @@ return self.handler(event, hint);

});
}
};
/**
* @inheritDoc
*/
handler(event, hint) {
LinkedErrors.prototype.handler = function (event, hint) {
if (!event.exception || !event.exception.values || !hint || !(hint.originalException instanceof Error)) {
return event;
}
const linkedErrors = this.walkErrorTree(hint.originalException, this._key);
event.exception.values = [...linkedErrors, ...event.exception.values];
var linkedErrors = this.walkErrorTree(hint.originalException, this._key);
event.exception.values = tslib_1.__spread(linkedErrors, event.exception.values);
return event;
}
};
/**
* @inheritDoc
*/
walkErrorTree(error, key, stack = []) {
LinkedErrors.prototype.walkErrorTree = function (error, key, stack) {
if (stack === void 0) { stack = []; }
if (!(error[key] instanceof Error) || stack.length + 1 >= this._limit) {
return stack;
}
const stacktrace = computeStackTrace(error[key]);
const exception = exceptionFromStacktrace(stacktrace);
return this.walkErrorTree(error[key], key, [exception, ...stack]);
}
}
/**
* @inheritDoc
*/
LinkedErrors.id = 'LinkedErrors';
var stacktrace = computeStackTrace(error[key]);
var exception = exceptionFromStacktrace(stacktrace);
return this.walkErrorTree(error[key], key, tslib_1.__spread([exception], stack));
};
/**
* @inheritDoc
*/
LinkedErrors.id = 'LinkedErrors';
return LinkedErrors;
}());
export { LinkedErrors };
//# sourceMappingURL=linkederrors.js.map

@@ -5,4 +5,4 @@ import { getGlobalObject } from '@sentry/utils/misc';

/** Wrap timer functions and event targets to catch errors and provide better meta data */
export class TryCatch {
constructor() {
var TryCatch = /** @class */ (function () {
function TryCatch() {
/** JSDoc */

@@ -16,5 +16,9 @@ this._ignoreOnError = 0;

/** JSDoc */
_wrapTimeFunction(original) {
return function (...args) {
const originalCallback = args[0];
TryCatch.prototype._wrapTimeFunction = function (original) {
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var originalCallback = args[0];
args[0] = wrap(originalCallback, {

@@ -29,5 +33,5 @@ mechanism: {

};
}
};
/** JSDoc */
_wrapRAF(original) {
TryCatch.prototype._wrapRAF = function (original) {
return function (callback) {

@@ -45,7 +49,7 @@ return original(wrap(callback, {

};
}
};
/** JSDoc */
_wrapEventTarget(target) {
const global = getGlobalObject();
const proto = global[target] && global[target].prototype;
TryCatch.prototype._wrapEventTarget = function (target) {
var global = getGlobalObject();
var proto = global[target] && global[target].prototype;
if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {

@@ -62,3 +66,3 @@ return;

handler: getFunctionName(fn),
target,
target: target,
},

@@ -75,5 +79,5 @@ handled: true,

// so that we don't have more than one wrapper function
let before;
let clickHandler;
let keypressHandler;
var before;
var clickHandler;
var keypressHandler;
if (target === 'EventTarget' || target === 'Node') {

@@ -91,3 +95,3 @@ // NOTE: generating multiple handlers per addEventListener invocation, should

}
let eventType;
var eventType;
try {

@@ -114,3 +118,3 @@ eventType = event.type;

handler: getFunctionName(fn),
target,
target: target,
},

@@ -125,3 +129,3 @@ handled: true,

return function (eventName, fn, options) {
let callback = fn;
var callback = fn;
try {

@@ -136,3 +140,3 @@ callback = callback && (callback.__sentry_wrapped__ || callback);

});
}
};
/**

@@ -142,5 +146,5 @@ * Wrap timer functions and event targets to catch errors

*/
setupOnce() {
TryCatch.prototype.setupOnce = function () {
this._ignoreOnError = this._ignoreOnError;
const global = getGlobalObject();
var global = getGlobalObject();
fill(global, 'setTimeout', this._wrapTimeFunction.bind(this));

@@ -180,9 +184,11 @@ fill(global, 'setInterval', this._wrapTimeFunction.bind(this));

].forEach(this._wrapEventTarget.bind(this));
}
}
};
/**
* @inheritDoc
*/
TryCatch.id = 'TryCatch';
return TryCatch;
}());
export { TryCatch };
/**
* @inheritDoc
*/
TryCatch.id = 'TryCatch';
/**
* Safely extract function name from itself

@@ -189,0 +195,0 @@ */

@@ -0,7 +1,8 @@

import * as tslib_1 from "tslib";
import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';
import { getGlobalObject } from '@sentry/utils/misc';
const global = getGlobalObject();
var global = getGlobalObject();
/** UserAgent */
export class UserAgent {
constructor() {
var UserAgent = /** @class */ (function () {
function UserAgent() {
/**

@@ -15,4 +16,4 @@ * @inheritDoc

*/
setupOnce() {
addGlobalEventProcessor((event) => {
UserAgent.prototype.setupOnce = function () {
addGlobalEventProcessor(function (event) {
if (getCurrentHub().getIntegration(UserAgent)) {

@@ -23,16 +24,18 @@ if (!global.navigator || !global.location) {

// HTTP Interface: https://docs.sentry.io/clientdev/interfaces/http/?platform=javascript
const request = event.request || {};
var request = event.request || {};
request.url = request.url || global.location.href;
request.headers = request.headers || {};
request.headers['User-Agent'] = global.navigator.userAgent;
return Object.assign({}, event, { request });
return tslib_1.__assign({}, event, { request: request });
}
return event;
});
}
}
/**
* @inheritDoc
*/
UserAgent.id = 'UserAgent';
};
/**
* @inheritDoc
*/
UserAgent.id = 'UserAgent';
return UserAgent;
}());
export { UserAgent };
//# sourceMappingURL=useragent.js.map
import { normalizeToSize } from '@sentry/utils/object';
import { keysToEventMessage } from '@sentry/utils/string';
import { computeStackTrace } from './tracekit';
const STACKTRACE_LIMIT = 50;
var STACKTRACE_LIMIT = 50;
/**

@@ -11,4 +11,4 @@ * This function creates an exception from an TraceKitStackTrace

export function exceptionFromStacktrace(stacktrace) {
const frames = prepareFramesForEvent(stacktrace.stack);
const exception = {
var frames = prepareFramesForEvent(stacktrace.stack);
var exception = {
type: stacktrace.name,

@@ -18,3 +18,3 @@ value: stacktrace.message,

if (frames && frames.length) {
exception.stacktrace = { frames };
exception.stacktrace = { frames: frames };
}

@@ -31,14 +31,14 @@ // tslint:disable-next-line:strict-type-predicates

export function eventFromPlainObject(exception, syntheticException) {
const exceptionKeys = Object.keys(exception).sort();
const event = {
var exceptionKeys = Object.keys(exception).sort();
var event = {
extra: {
__serialized__: normalizeToSize(exception),
},
message: `Non-Error exception captured with keys: ${keysToEventMessage(exceptionKeys)}`,
message: "Non-Error exception captured with keys: " + keysToEventMessage(exceptionKeys),
};
if (syntheticException) {
const stacktrace = computeStackTrace(syntheticException);
const frames = prepareFramesForEvent(stacktrace.stack);
var stacktrace = computeStackTrace(syntheticException);
var frames_1 = prepareFramesForEvent(stacktrace.stack);
event.stacktrace = {
frames,
frames: frames_1,
};

@@ -52,3 +52,3 @@ }

export function eventFromStacktrace(stacktrace) {
const exception = exceptionFromStacktrace(stacktrace);
var exception = exceptionFromStacktrace(stacktrace);
return {

@@ -67,5 +67,5 @@ exception: {

}
let localStack = stack;
const firstFrameFunction = localStack[0].func || '';
const lastFrameFunction = localStack[localStack.length - 1].func || '';
var localStack = stack;
var firstFrameFunction = localStack[0].func || '';
var lastFrameFunction = localStack[localStack.length - 1].func || '';
// If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)

@@ -81,3 +81,3 @@ if (firstFrameFunction.includes('captureMessage') || firstFrameFunction.includes('captureException')) {

return localStack
.map((frame) => ({
.map(function (frame) { return ({
colno: frame.column,

@@ -88,3 +88,3 @@ filename: frame.url || localStack[0].url,

lineno: frame.line,
}))
}); })
.slice(0, STACKTRACE_LIMIT)

@@ -91,0 +91,0 @@ .reverse();

@@ -5,3 +5,3 @@ import * as tslib_1 from "tslib";

import { Breadcrumbs, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';
export const defaultIntegrations = [
export var defaultIntegrations = [
new CoreIntegrations.InboundFilters(),

@@ -72,3 +72,4 @@ new CoreIntegrations.FunctionToString(),

*/
export function init(options = {}) {
export function init(options) {
if (options === void 0) { options = {}; }
if (options.defaultIntegrations === undefined) {

@@ -84,7 +85,8 @@ options.defaultIntegrations = defaultIntegrations;

*/
export function showReportDialog(options = {}) {
export function showReportDialog(options) {
if (options === void 0) { options = {}; }
if (!options.eventId) {
options.eventId = getCurrentHub().lastEventId();
}
const client = getCurrentHub().getClient();
var client = getCurrentHub().getClient();
if (client) {

@@ -123,8 +125,11 @@ client.showReportDialog(options);

export function flush(timeout) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const client = getCurrentHub().getClient();
if (client) {
return client.flush(timeout);
}
return Promise.reject(false);
return tslib_1.__awaiter(this, void 0, void 0, function () {
var client;
return tslib_1.__generator(this, function (_a) {
client = getCurrentHub().getClient();
if (client) {
return [2 /*return*/, client.flush(timeout)];
}
return [2 /*return*/, Promise.reject(false)];
});
});

@@ -139,10 +144,13 @@ }

export function close(timeout) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const client = getCurrentHub().getClient();
if (client) {
return client.close(timeout);
}
return Promise.reject(false);
return tslib_1.__awaiter(this, void 0, void 0, function () {
var client;
return tslib_1.__generator(this, function (_a) {
client = getCurrentHub().getClient();
if (client) {
return [2 /*return*/, client.close(timeout)];
}
return [2 /*return*/, Promise.reject(false)];
});
});
}
//# sourceMappingURL=sdk.js.map
// tslint:disable
import * as tslib_1 from "tslib";
import { isError, isErrorEvent } from '@sentry/utils/is';

@@ -184,3 +185,3 @@ import { getGlobalObject } from '@sentry/utils/misc';

stack: [
Object.assign({}, location, {
tslib_1.__assign({}, location, {
// Firefox sometimes doesn't return url correctly and this is an old behavior

@@ -771,7 +772,7 @@ // that I prefer to port here as well.

TraceKit.linesOfContext = 11;
const subscribe = TraceKit.report.subscribe;
const installGlobalHandler = TraceKit.report.installGlobalHandler;
const installGlobalUnhandledRejectionHandler = TraceKit.report.installGlobalUnhandledRejectionHandler;
const computeStackTrace = TraceKit.computeStackTrace;
var subscribe = TraceKit.report.subscribe;
var installGlobalHandler = TraceKit.report.installGlobalHandler;
var installGlobalUnhandledRejectionHandler = TraceKit.report.installGlobalUnhandledRejectionHandler;
var computeStackTrace = TraceKit.computeStackTrace;
export { subscribe, installGlobalHandler, installGlobalUnhandledRejectionHandler, computeStackTrace };
//# sourceMappingURL=tracekit.js.map

@@ -6,4 +6,4 @@ import * as tslib_1 from "tslib";

/** Base Transport class implementation */
export class BaseTransport {
constructor(options) {
var BaseTransport = /** @class */ (function () {
function BaseTransport(options) {
this.options = options;

@@ -17,16 +17,22 @@ /** A simple buffer holding all requests. */

*/
sendEvent(_) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
throw new SentryError('Transport Class has to implement `sendEvent` method');
BaseTransport.prototype.sendEvent = function (_) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
throw new SentryError('Transport Class has to implement `sendEvent` method');
});
});
}
};
/**
* @inheritDoc
*/
close(timeout) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return this._buffer.drain(timeout);
BaseTransport.prototype.close = function (timeout) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, this._buffer.drain(timeout)];
});
});
}
}
};
return BaseTransport;
}());
export { BaseTransport };
//# sourceMappingURL=base.js.map

@@ -6,25 +6,34 @@ import * as tslib_1 from "tslib";

import { BaseTransport } from './base';
const global = getGlobalObject();
var global = getGlobalObject();
/** `fetch` based transport */
export class FetchTransport extends BaseTransport {
var FetchTransport = /** @class */ (function (_super) {
tslib_1.__extends(FetchTransport, _super);
function FetchTransport() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* @inheritDoc
*/
sendEvent(event) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
const defaultOptions = {
body: JSON.stringify(event),
method: 'POST',
// Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default
// https://caniuse.com/#feat=referrer-policy
// It doesn't. And it throw exception instead of ignoring this parameter...
// REF: https://github.com/getsentry/raven-js/issues/1233
referrerPolicy: (supportsReferrerPolicy() ? 'origin' : ''),
};
return this._buffer.add(global.fetch(this.url, defaultOptions).then(response => ({
status: Status.fromHttpCode(response.status),
})));
FetchTransport.prototype.sendEvent = function (event) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var defaultOptions;
return tslib_1.__generator(this, function (_a) {
defaultOptions = {
body: JSON.stringify(event),
method: 'POST',
// Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default
// https://caniuse.com/#feat=referrer-policy
// It doesn't. And it throw exception instead of ignoring this parameter...
// REF: https://github.com/getsentry/raven-js/issues/1233
referrerPolicy: (supportsReferrerPolicy() ? 'origin' : ''),
};
return [2 /*return*/, this._buffer.add(global.fetch(this.url, defaultOptions).then(function (response) { return ({
status: Status.fromHttpCode(response.status),
}); }))];
});
});
}
}
};
return FetchTransport;
}(BaseTransport));
export { FetchTransport };
//# sourceMappingURL=fetch.js.map

@@ -5,27 +5,36 @@ import * as tslib_1 from "tslib";

/** `XHR` based transport */
export class XHRTransport extends BaseTransport {
var XHRTransport = /** @class */ (function (_super) {
tslib_1.__extends(XHRTransport, _super);
function XHRTransport() {
return _super !== null && _super.apply(this, arguments) || this;
}
/**
* @inheritDoc
*/
sendEvent(event) {
return tslib_1.__awaiter(this, void 0, void 0, function* () {
return this._buffer.add(new Promise((resolve, reject) => {
const request = new XMLHttpRequest();
request.onreadystatechange = () => {
if (request.readyState !== 4) {
return;
}
if (request.status === 200) {
resolve({
status: Status.fromHttpCode(request.status),
});
}
reject(request);
};
request.open('POST', this.url);
request.send(JSON.stringify(event));
}));
XHRTransport.prototype.sendEvent = function (event) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var _this = this;
return tslib_1.__generator(this, function (_a) {
return [2 /*return*/, this._buffer.add(new Promise(function (resolve, reject) {
var request = new XMLHttpRequest();
request.onreadystatechange = function () {
if (request.readyState !== 4) {
return;
}
if (request.status === 200) {
resolve({
status: Status.fromHttpCode(request.status),
});
}
reject(request);
};
request.open('POST', _this.url);
request.send(JSON.stringify(event));
}))];
});
});
}
}
};
return XHRTransport;
}(BaseTransport));
export { XHRTransport };
//# sourceMappingURL=xhr.js.map
export declare const SDK_NAME = "sentry.javascript.browser";
export declare const SDK_VERSION = "5.0.3";
export declare const SDK_VERSION = "5.0.5";

@@ -1,3 +0,3 @@

export const SDK_NAME = 'sentry.javascript.browser';
export const SDK_VERSION = '5.0.3';
export var SDK_NAME = 'sentry.javascript.browser';
export var SDK_VERSION = '5.0.5';
//# sourceMappingURL=version.js.map
{
"name": "@sentry/browser",
"version": "5.0.3",
"version": "5.0.5",
"description": "Official Sentry SDK for browsers",

@@ -19,5 +19,5 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"dependencies": {
"@sentry/core": "5.0.3",
"@sentry/types": "5.0.0",
"@sentry/utils": "5.0.0",
"@sentry/core": "5.0.5",
"@sentry/types": "5.0.5",
"@sentry/utils": "5.0.5",
"tslib": "^1.9.3"

@@ -24,0 +24,0 @@ },

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc