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

@bugsnag/browser

Package Overview
Dependencies
Maintainers
9
Versions
134
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bugsnag/browser - npm Package Compare versions

Comparing version 7.15.1 to 7.16.0

2

dist/bugsnag.min.js

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

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Bugsnag=e()}}(function(){var o=["navigation","request","process","log","user","state","error","manual"],h=function(e,t,n){for(var r=n,o=0,i=e.length;o<i;o++)r=t(r,e[o],o,e);return r},p=function(e,o){return h(e,function(e,t,n,r){return o(t,n,r)?e.concat(t):e},[])},v=function(e,o){return h(e,function(e,t,n,r){return!0===e||t===o},!1)},t=function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=!{toString:null}.propertyIsEnumerable("toString"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],s=function(e){var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);if(!i)return n;for(var r=0,o=a.length;r<o;r++)Object.prototype.hasOwnProperty.call(e,a[r])&&n.push(a[r]);return n},n=function(t,n){return void 0===t&&(t=1),void 0===n&&(n=Infinity),function(e){return"number"==typeof e&&parseInt(""+e,10)===e&&t<=e&&e<=n}},e=function(e){return"function"==typeof e||t(e)&&p(e,function(e){return"function"==typeof e}).length===e.length},r=function(e){return"string"==typeof e&&!!e.length},u={};u.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:r},appVersion:{defaultValue:function(){return undefined},message:"should be a string",validate:function(e){return e===undefined||r(e)}},appType:{defaultValue:function(){return undefined},message:"should be a string",validate:function(e){return e===undefined||r(e)}},autoDetectErrors:{defaultValue:function(){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}},enabledErrorTypes:{defaultValue:function(){return{unhandledExceptions:!0,unhandledRejections:!0}},message:"should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",allowPartialObject:!0,validate:function(t){if("object"!=typeof t||!t)return!1;var e=s(t),n=s({unhandledExceptions:!0,unhandledRejections:!0});return!(p(e,function(e){return v(n,e)}).length<e.length)&&!(0<p(s(t),function(e){return"boolean"!=typeof t[e]}).length)}},onError:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:e},onSession:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:e},onBreadcrumb:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:e},endpoints:{defaultValue:function(){return{notify:"https://notify.bugsnag.com",sessions:"https://sessions.bugsnag.com"}},message:"should be an object containing endpoint URLs { notify, sessions }",validate:function(e){return e&&"object"==typeof e&&r(e.notify)&&r(e.sessions)&&0===p(s(e),function(e){return!v(["notify","sessions"],e)}).length}},autoTrackSessions:{defaultValue:function(e){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}},enabledReleaseStages:{defaultValue:function(){return null},message:"should be an array of strings",validate:function(e){return null===e||t(e)&&p(e,function(e){return"string"==typeof e}).length===e.length}},releaseStage:{defaultValue:function(){return"production"},message:"should be a string",validate:function(e){return"string"==typeof e&&e.length}},maxBreadcrumbs:{defaultValue:function(){return 25},message:"should be a number ≤100",validate:function(e){return n(0,100)(e)}},enabledBreadcrumbTypes:{defaultValue:function(){return o},message:"should be null or a list of available breadcrumb types ("+o.join(",")+")",validate:function(e){return null===e||t(e)&&h(e,function(e,t){return!1===e?e:v(o,t)},!0)}},context:{defaultValue:function(){return undefined},message:"should be a string",validate:function(e){return e===undefined||"string"==typeof e}},user:{defaultValue:function(){return{}},message:"should be an object with { id, email, name } properties",validate:function(e){return null===e||e&&h(s(e),function(e,t){return e&&v(["id","email","name"],t)},!0)}},metadata:{defaultValue:function(){return{}},message:"should be an object",validate:function(e){return"object"==typeof e&&null!==e}},logger:{defaultValue:function(){return undefined},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(n){return!n||n&&h(["debug","info","warn","error"],function(e,t){return e&&"function"==typeof n[t]},!0)}},redactedKeys:{defaultValue:function(){return["password"]},message:"should be an array of strings|regexes",validate:function(e){return t(e)&&e.length===p(e,function(e){return"string"==typeof e||e&&"function"==typeof e.test}).length}},plugins:{defaultValue:function(){return[]},message:"should be an array of plugin objects",validate:function(e){return t(e)&&e.length===p(e,function(e){return e&&"object"==typeof e&&"function"==typeof e.load}).length}}};var m=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y=function(e,o){return h(e,function(e,t,n,r){return e.concat(o(t,n,r))},[])};function c(){return(c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l=u.schema,d={releaseStage:m({},l.releaseStage,{defaultValue:function(){return/^localhost(:\d+)?$/.test(window.location.host)?"development":"production"}}),appType:c({},l.appType,{defaultValue:function(){return"browser"}}),logger:m({},l.logger,{defaultValue:function(){return"undefined"!=typeof console&&"function"==typeof console.debug?f():undefined}})},f=function(){var n={},r=console.log;return y(["debug","info","warn","error"],function(e){var t=console[e];n[e]="function"==typeof t?t.bind(console,"[bugsnag]"):r.bind(console,"[bugsnag]")}),n},b=function(){function e(e,t,n,r){void 0===r&&(r=new Date),this.type=n,this.message=e,this.metadata=t,this.timestamp=r}return e.prototype.toJSON=function(){return{type:this.type,name:this.message,timestamp:this.timestamp,metaData:this.metadata}},e}(),g={};!function(e,t){"use strict";"object"==typeof g?g=t():e.StackFrame=t()}(this,function(){"use strict";function n(e){return!isNaN(parseFloat(e))&&isFinite(e)}function r(e){return e.charAt(0).toUpperCase()+e.substring(1)}function e(e){return function(){return this[e]}}var t=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],i=["fileName","functionName","source"],a=t.concat(o,i,["args"]);function s(e){if(e instanceof Object)for(var t=0;t<a.length;t++)e.hasOwnProperty(a[t])&&e[a[t]]!==undefined&&this["set"+r(a[t])](e[a[t]])}s.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof s)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new s(e)}},toString:function(){return(this.getFunctionName()||"{anonymous}")+("("+(this.getArgs()||[]).join(",")+")")+(this.getFileName()?"@"+this.getFileName():"")+(n(this.getLineNumber())?":"+this.getLineNumber():"")+(n(this.getColumnNumber())?":"+this.getColumnNumber():"")}};for(var u=0;u<t.length;u++)s.prototype["get"+r(t[u])]=e(t[u]),s.prototype["set"+r(t[u])]=function(t){return function(e){this[t]=Boolean(e)}}(t[u]);for(var c=0;c<o.length;c++)s.prototype["get"+r(o[c])]=e(o[c]),s.prototype["set"+r(o[c])]=function(t){return function(e){if(!n(e))throw new TypeError(t+" must be a Number");this[t]=Number(e)}}(o[c]);for(var l=0;l<i.length;l++)s.prototype["get"+r(i[l])]=e(i[l]),s.prototype["set"+r(i[l])]=function(t){return function(e){this[t]=String(e)}}(i[l]);return s});var _={};!function(e,t){"use strict";"object"==typeof _?_=t(g):e.ErrorStackParser=t(e.StackFrame)}(this,function(s){"use strict";var t=/(^|@)\S+\:\d+/,n=/^\s*at .*(\S+\:\d+|\(native\))/m,r=/^(eval@)?(\[native code\])?$/;return{parse:function(e){if("undefined"!=typeof e.stacktrace||"undefined"!=typeof e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(n))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw new Error("Cannot parse given Error object")},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/.exec(e.replace(/[\(\)]/g,""));return[t[1],t[2]||undefined,t[3]||undefined]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(n)},this).map(function(e){-1<e.indexOf("(eval ")&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=t.match(/ (\((.+):(\d+):(\d+)\)$)/),r=(t=n?t.replace(n[0],""):t).split(/\s+/).slice(1),o=this.extractLocation(n?n[1]:r.pop()),i=r.join(" ")||undefined,a=-1<["eval","<anonymous>"].indexOf(o[0])?undefined:o[0];return new s({functionName:i,fileName:a,lineNumber:o[1],columnNumber:o[2],source:e})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(r)},this).map(function(e){if(-1<e.indexOf(" > eval")&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new s({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:undefined,o=this.extractLocation(e.replace(t,""));return new s({functionName:r,fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:e})},this)},parseOpera:function(e){return!e.stacktrace||-1<e.message.indexOf("\n")&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),r=[],o=2,i=n.length;o<i;o+=2){var a=t.exec(n[o]);a&&r.push(new s({fileName:a[2],lineNumber:a[1],source:n[o]}))}return r},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split("\n"),r=[],o=0,i=n.length;o<i;o+=2){var a=t.exec(n[o]);a&&r.push(new s({functionName:a[3]||undefined,fileName:a[2],lineNumber:a[1],source:n[o]}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(t)&&!e.match(/^Error created at/)},this).map(function(e){var t,n=e.split("@"),r=this.extractLocation(n.pop()),o=n.shift()||"",i=o.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||undefined;o.match(/\(([^\)]*)\)/)&&(t=o.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var a=t===undefined||"[arguments not available]"===t?undefined:t.split(",");return new s({functionName:i,args:a,fileName:r[0],lineNumber:r[1],columnNumber:r[2],source:e})},this)}}});var S=_,w=function(e){return!(!e||!e.stack&&!e.stacktrace&&!e["opera#sourceloc"]||"string"!=typeof(e.stack||e.stacktrace||e["opera#sourceloc"])||e.stack===e.name+": "+e.message)};var E=function dt(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}},O=function(e,t,n){"string"==typeof t&&(n?e[t]&&delete e[t][n]:delete e[t])},j={add:function(e,t,n,r){var o;if(t){var i;if(null===n)return O(e,t);"object"==typeof n&&(i=n),"string"==typeof n&&((o={})[n]=r,i=o),i&&(e[t]||(e[t]={}),e[t]=m({},e[t],i))}},get:function(e,t,n){return"string"!=typeof t?undefined:n?e[t]?e[t][n]:undefined:e[t]},clear:O},N={};!function(e,t){"use strict";"object"==typeof N?N=t(g):e.StackGenerator=t(e.StackFrame)}(this,function(s){return{backtrace:function(e){var t=[],n=10;"object"==typeof e&&"number"==typeof e.maxStackSize&&(n=e.maxStackSize);for(var r=arguments.callee;r&&t.length<n&&r.arguments;){for(var o=new Array(r.arguments.length),i=0;i<o.length;++i)o[i]=r.arguments[i];/function(?:\s+([\w$]+))+\s*\(/.test(r.toString())?t.push(new s({functionName:RegExp.$1||undefined,args:o})):t.push(new s({args:o}));try{r=r.caller}catch(a){break}}return t}}});var k=function(){function i(e,t,n,r,o){void 0===n&&(n=[]),void 0===r&&(r=L()),this.apiKey=undefined,this.context=undefined,this.groupingHash=undefined,this.originalError=o,this._handledState=r,this.severity=this._handledState.severity,this.unhandled=this._handledState.unhandled,this.app={},this.device={},this.request={},this.breadcrumbs=[],this.threads=[],this._metadata={},this._user={},this._session=undefined,this.errors=[{errorClass:R(e),errorMessage:R(t),type:i.__type,stacktrace:h(n,function(e,t){var n=x(t);try{return"{}"===JSON.stringify(n)?e:e.concat(n)}catch(r){return e}},[])}]}var e=i.prototype;return e.addMetadata=function(e,t,n){return j.add(this._metadata,e,t,n)},e.getMetadata=function(e,t){return j.get(this._metadata,e,t)},e.clearMetadata=function(e,t){return j.clear(this._metadata,e,t)},e.getUser=function(){return this._user},e.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},e.toJSON=function(){return{payloadVersion:"4",exceptions:y(this.errors,function(e){return m({},e,{message:e.errorMessage})}),severity:this.severity,unhandled:this._handledState.unhandled,severityReason:this._handledState.severityReason,app:this.app,device:this.device,request:this.request,breadcrumbs:this.breadcrumbs,context:this.context,groupingHash:this.groupingHash,metaData:this._metadata,user:this._user,session:this._session}},i}(),x=function(e){var t={file:e.fileName,method:T(e.functionName),lineNumber:e.lineNumber,columnNumber:e.columnNumber,code:undefined,inProject:undefined};return-1<t.lineNumber&&!t.file&&!t.method&&(t.file="global code"),t},T=function(e){return/^global code$/i.test(e)?"global code":e},L=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},R=function(e){return"string"==typeof e?e:""};k.getStacktrace=function(e,t,n){if(w(e))return S.parse(e).slice(t);try{return p(N.backtrace(),function(e){return-1===(e.functionName||"").indexOf("StackGenerator$$")}).slice(1+n)}catch(r){return[]}},k.create=function(e,t,n,r,o,i){void 0===o&&(o=0);var a,s=q(e,t,r,i),u=s[0],c=s[1];try{var l=k.getStacktrace(u,0<c?1+c+o:0,1+o);a=new k(u.name,u.message,l,n,e)}catch(d){a=new k(u.name,u.message,[],n,e)}return"InvalidError"===u.name&&a.addMetadata(""+r,"non-error parameter",B(e)),a};var B=function(e){return null===e?"null":e===undefined?"undefined":e},q=function(e,t,n,r){var o,i=0,a=function(e){r&&r.warn(n+' received a non-error: "'+e+'"');var t=new Error(n+' received a non-error. See "'+n+'" tab for more detail.');return t.name="InvalidError",t};if(t)switch(typeof e){case"string":case"number":case"boolean":o=new Error(String(e)),i+=1;break;case"function":o=a("function"),i+=2;break;case"object":null!==e&&E(e)?o=e:null!==e&&M(e)?((o=new Error(e.message||e.errorMessage)).name=e.name||e.errorClass,i+=1):(o=a(null===e?"null":"unsupported object"),i+=2);break;default:o=a("nothing"),i+=2}else E(e)?o=e:(o=a(typeof e),i+=2);if(!w(o))try{throw o}catch(s){w(s)&&(o=s,i=1)}return[o,i]};k.__type="browserjs";var M=function(e){return!("string"!=typeof e.name&&"string"!=typeof e.errorClass||"string"!=typeof e.message&&"string"!=typeof e.errorMessage)},C=k,D=function(e,t,n,r){for(var o=!1,i=e.slice();!o&&i.length;)try{o=!1===i.pop()(t)}catch(a){r.error("Error occurred in "+n+" callback, continuing anyway…"),r.error(a)}return o},A=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},P="object"==typeof window?window:self,V=0;for(var I in P)Object.hasOwnProperty.call(P,I)&&V++;var H=navigator.mimeTypes?navigator.mimeTypes.length:0,K=A((H+navigator.userAgent.length).toString(36)+V.toString(36),4),$=function(){return K},U=0,X=4,F=36,J=Math.pow(F,X);function W(){return A((Math.random()*J<<0).toString(F),X)}function z(){return"c"+(new Date).getTime().toString(F)+A(function e(){return U=U<J?U:0,++U-1}().toString(F),X)+$()+(W()+W())}z.fingerprint=$;var G=z,Q=function(){function e(){this.id=G(),this.startedAt=new Date,this._handled=0,this._unhandled=0,this._user={},this.app={},this.device={}}var t=e.prototype;return t.getUser=function(){return this._user},t.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},t.toJSON=function(){return{id:this.id,startedAt:this.startedAt,events:{handled:this._handled,unhandled:this._unhandled}}},t._track=function(e){this[e._handledState.unhandled?"_unhandled":"_handled"]+=1},e}(),Y=function(){},Z=function(){function g(e,t,n,r){var o=this;void 0===t&&(t=u.schema),void 0===n&&(n=[]),this._notifier=r,this._config={},this._schema=t,this._delivery={sendSession:Y,sendEvent:Y},this._logger={debug:Y,info:Y,warn:Y,error:Y},this._plugins={},this._breadcrumbs=[],this._session=null,this._metadata={},this._context=undefined,this._user={},this._cbs={e:[],s:[],sp:[],b:[]},this.Client=g,this.Event=C,this.Breadcrumb=b,this.Session=Q,this._config=this._configure(e,n),y(n.concat(this._config.plugins),function(e){e&&o._loadPlugin(e)}),this._depth=1;var i=this,a=this.notify;this.notify=function(){return a.apply(i,arguments)}}var e=g.prototype;return e.addMetadata=function(e,t,n){return j.add(this._metadata,e,t,n)},e.getMetadata=function(e,t){return j.get(this._metadata,e,t)},e.clearMetadata=function(e,t){return j.clear(this._metadata,e,t)},e.getContext=function(){return this._context},e.setContext=function(e){this._context=e},e._configure=function(r,e){var o=h(e,function(e,t){return t&&t.configSchema?m({},e,t.configSchema):e},this._schema),t=h(s(o),function(e,t){var n=o[t].defaultValue(r[t]);r[t]!==undefined?o[t].validate(r[t])?o[t].allowPartialObject?e.config[t]=m(n,r[t]):e.config[t]=r[t]:(e.errors[t]=o[t].message,e.config[t]=n):e.config[t]=n;return e},{errors:{},config:{}}),n=t.errors,i=t.config;if(o.apiKey){if(!i.apiKey)throw new Error("No Bugsnag API Key set");/^[0-9a-f]{32}$/i.test(i.apiKey)||(n.apiKey="should be a string of 32 hexadecimal characters")}return this._metadata=m({},i.metadata),this._user=m({},i.user),this._context=i.context,i.logger&&(this._logger=i.logger),i.onError&&(this._cbs.e=this._cbs.e.concat(i.onError)),i.onBreadcrumb&&(this._cbs.b=this._cbs.b.concat(i.onBreadcrumb)),i.onSession&&(this._cbs.s=this._cbs.s.concat(i.onSession)),s(n).length&&this._logger.warn(ee(n,r)),i},e.getUser=function(){return this._user},e.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},e._loadPlugin=function(e){var t=e.load(this);return e.name&&(this._plugins["~"+e.name+"~"]=t),this},e.getPlugin=function(e){return this._plugins["~"+e+"~"]},e._setDelivery=function(e){this._delivery=e(this)},e.startSession=function(){var e=new Q;return e.app.releaseStage=this._config.releaseStage,e.app.version=this._config.appVersion,e.app.type=this._config.appType,e._user=m({},this._user),D(this._cbs.s,e,"onSession",this._logger)?(this._logger.debug("Session not started due to onSession callback"),this):this._sessionDelegate.startSession(this,e)},e.addOnError=function(e,t){void 0===t&&(t=!1),this._cbs.e[t?"unshift":"push"](e)},e.removeOnError=function(t){this._cbs.e=p(this._cbs.e,function(e){return e!==t})},e._addOnSessionPayload=function(e){this._cbs.sp.push(e)},e.addOnSession=function(e){this._cbs.s.push(e)},e.removeOnSession=function(t){this._cbs.s=p(this._cbs.s,function(e){return e!==t})},e.addOnBreadcrumb=function(e,t){void 0===t&&(t=!1),this._cbs.b[t?"unshift":"push"](e)},e.removeOnBreadcrumb=function(t){this._cbs.b=p(this._cbs.b,function(e){return e!==t})},e.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},e.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},e.leaveBreadcrumb=function(e,t,n){if(e="string"==typeof e?e:"",n="string"==typeof n&&v(o,n)?n:"manual",t="object"==typeof t&&null!==t?t:{},e){var r=new b(e,t,n);D(this._cbs.b,r,"onBreadcrumb",this._logger)?this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback"):(this._breadcrumbs.push(r),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs)))}},e._isBreadcrumbTypeEnabled=function(e){var t=this._config.enabledBreadcrumbTypes;return null===t||v(t,e)},e.notify=function(e,t,n){void 0===n&&(n=Y);var r=C.create(e,!0,undefined,"notify()",this._depth+1,this._logger);this._notify(r,t,n)},e._notify=function(n,e,r){var o=this;if(void 0===r&&(r=Y),n.app=m({},n.app,{releaseStage:this._config.releaseStage,version:this._config.appVersion,type:this._config.appType}),n.context=n.context||this._context,n._metadata=m({},n._metadata,this._metadata),n._user=m({},n._user,this._user),n.breadcrumbs=this._breadcrumbs.slice(),null!==this._config.enabledReleaseStages&&!v(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"),r(null,n);var i,a,t,s,u,c,l,d=n.severity,f=function(e){o._logger.error("Error occurred in onError callback, continuing anyway…"),o._logger.error(e)},h=[].concat(this._cbs.e).concat(e);i=n,a=f,t=h,s=function(e,n){if("function"!=typeof e)return n(null);try{if(2!==e.length){var t=e(i);return t&&"function"==typeof t.then?t.then(function(e){return setTimeout(function(){return n(null,e)})},function(e){setTimeout(function(){return a(e),n(null,!0)})}):n(null,t)}e(i,function(e,t){if(e)return a(e),n(null);n(null,t)})}catch(r){a(r),n(null)}},u=function(e,t){if(e&&f(e),!t)return o._logger.debug("Event not sent due to onError callback"),r(null,n);o._isBreadcrumbTypeEnabled("error")&&g.prototype.leaveBreadcrumb.call(o,n.errors[0].errorClass,{errorClass:n.errors[0].errorClass,errorMessage:n.errors[0].errorMessage,severity:n.severity},"error"),d!==n.severity&&(n._handledState.severityReason={type:"userCallbackSetSeverity"}),n.unhandled!==n._handledState.unhandled&&(n._handledState.severityReason.unhandledOverridden=!0,n._handledState.unhandled=n.unhandled),o._session&&(o._session._track(n),n._session=o._session),o._delivery.sendEvent({apiKey:n.apiKey||o._config.apiKey,notifier:o._notifier,events:[n]},function(e){return r(e,n)})},c=0,(l=function(){if(c>=t.length)return u(null,!0);s(t[c],function(e,t){return e?u(e):!1===t?u(null,!1):(c++,void l())})})()},g}(),ee=function(t,n){return new Error("Invalid configuration\n"+y(s(t),function(e){return" - "+e+" "+t[e]+", got "+te(n[e])}).join("\n\n"))},te=function(e){switch(typeof e){case"string":case"number":case"object":return JSON.stringify(e);default:return String(e)}},ne=Z,re=function(e,t,n,r){var o=r&&r.redactedKeys?r.redactedKeys:[],i=r&&r.redactedPaths?r.redactedPaths:[];return JSON.stringify(function a(e,p,v){var m=[],y=0;return function b(e,t){function n(){return t.length>ae&&ie<y}y++;if(t.length>oe)return se;if(n())return se;if(null===e||"object"!=typeof e)return e;if(ce(m,e))return"[Circular]";m.push(e);if("function"==typeof e.toJSON)try{y--;var r=b(e.toJSON(),t);return m.pop(),r}catch(h){return ue(h)}var o=(i=e,i instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(i)));var i;if(o){y--;var a=b({name:e.name,message:e.message},t);return m.pop(),a}if(l=e,"[object Array]"===Object.prototype.toString.call(l)){for(var s=[],u=0,c=e.length;u<c;u++){if(n()){s.push(se);break}s.push(b(e[u],t.concat("[]")))}return m.pop(),s}var l;var d={};try{for(var f in e)if(Object.prototype.hasOwnProperty.call(e,f))if(le(v,t.join("."))&&de(p,f))d[f]="[REDACTED]";else{if(n()){d[f]=se;break}d[f]=b(fe(e,f),t.concat(f))}}catch(g){}m.pop();return d}(e,[])}(e,o,i),t,n)},oe=20,ie=25e3,ae=8,se="...";function ue(e){return"[Throws: "+(e?e.message:"?")+"]"}function ce(e,t){for(var n=0,r=e.length;n<r;n++){if(e[n]===t)return true}return false}function le(e,t){for(var n=0,r=e.length;n<r;n++)if(0===t.indexOf(e[n]))return!0;return!1}function de(e,t){for(var n=0,r=e.length;n<r;n++){if("string"==typeof e[n]&&e[n].toLowerCase()===t.toLowerCase())return!0;if(e[n]&&"function"==typeof e[n].test&&e[n].test(t))return!0}return!1}function fe(e,t){try{return e[t]}catch(n){return ue(n)}}var he={},ge=["events.[].metaData","events.[].breadcrumbs.[].metaData","events.[].request"];he.event=function(e,t){var n=re(e,null,null,{redactedPaths:ge,redactedKeys:t});if(1e6<n.length&&(e.events[0]._metadata={notifier:"WARNING!\nSerialized payload was "+n.length/1e6+"MB (limit = 1MB)\nmetadata was removed"},1e6<(n=re(e,null,null,{redactedPaths:ge,redactedKeys:t})).length))throw new Error("payload exceeded 1MB limit");return n},he.session=function(e,t){var n=re(e,null,null);if(1e6<n.length)throw new Error("payload exceeded 1MB limit");return n};var pe;pe=function(o,i){return void 0===i&&(i=window),{sendEvent:function(t,n){void 0===n&&(n=function(){});var e=ve(o._config,"notify","4",i),r=new i.XDomainRequest;r.onload=function(){n(null)},r.open("POST",e),setTimeout(function(){try{r.send(he.event(t,o._config.redactedKeys))}catch(e){o._logger.error(e),n(e)}},0)},sendSession:function(t,n){void 0===n&&(n=function(){});var e=ve(o._config,"sessions","1",i),r=new i.XDomainRequest;r.onload=function(){n(null)},r.open("POST",e),setTimeout(function(){try{r.send(he.session(t,o._config.redactedKeys))}catch(e){o._logger.error(e),n(e)}},0)}}};var ve=function(e,t,n,r){var o=JSON.parse(JSON.stringify(new Date));return me(e.endpoints[t],r.location.protocol)+"?apiKey="+encodeURIComponent(e.apiKey)+"&payloadVersion="+n+"&sentAt="+encodeURIComponent(o)},me=pe._matchPageProtocol=function(e,t){return"http:"===t?e.replace(/^https:/,"http:"):e},ye=function(i,a){return void 0===a&&(a=window),{sendEvent:function(e,t){void 0===t&&(t=function(){});try{var n=i._config.endpoints.notify,r=new a.XMLHttpRequest;r.onreadystatechange=function(){r.readyState===a.XMLHttpRequest.DONE&&t(null)},r.open("POST",n),r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("Bugsnag-Api-Key",e.apiKey||i._config.apiKey),r.setRequestHeader("Bugsnag-Payload-Version","4"),r.setRequestHeader("Bugsnag-Sent-At",(new Date).toISOString()),r.send(he.event(e,i._config.redactedKeys))}catch(o){i._logger.error(o)}},sendSession:function(e,t){void 0===t&&(t=function(){});try{var n=i._config.endpoints.sessions,r=new a.XMLHttpRequest;r.onreadystatechange=function(){r.readyState===a.XMLHttpRequest.DONE&&t(null)},r.open("POST",n),r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("Bugsnag-Api-Key",i._config.apiKey),r.setRequestHeader("Bugsnag-Payload-Version","1"),r.setRequestHeader("Bugsnag-Sent-At",(new Date).toISOString()),r.send(he.session(e,i._config.redactedKeys))}catch(o){i._logger.error(o)}}}},be=new Date,_e=function(){be=new Date},Se={name:"appDuration",load:function(e){return e.addOnError(function(e){var t=new Date;e.app.duration=t-be},!0),{reset:_e}}},we=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},Ee="object"==typeof window?window:self,Oe=0;for(var je in Ee)Object.hasOwnProperty.call(Ee,je)&&Oe++;var Ne=navigator.mimeTypes?navigator.mimeTypes.length:0,ke=we((Ne+navigator.userAgent.length).toString(36)+Oe.toString(36),4),xe=function(){return ke},Te=0,Le=4,Re=36,Be=Math.pow(Re,Le);function qe(){return we((Math.random()*Be<<0).toString(Re),Le)}function Me(){return"c"+(new Date).getTime().toString(Re)+we(function e(){return Te=Te<Be?Te:0,++Te-1}().toString(Re),Le)+xe()+(qe()+qe())}Me.fingerprint=xe;var Ce=Me,De="bugsnag-anonymous-id",Ae=function(e,r){return void 0===e&&(e=navigator),void 0===r&&(r=window.screen),{load:function(t){var n={locale:e.browserLanguage||e.systemLanguage||e.userLanguage||e.language,userAgent:e.userAgent};r&&r.orientation&&r.orientation.type?n.orientation=r.orientation.type:n.orientation=document.documentElement.clientWidth>document.documentElement.clientHeight?"landscape":"portrait",t._config.generateAnonymousId&&(n.id=function(){try{var e=window.localStorage,t=e.getItem(De);return t&&/^c[a-z0-9]{20,32}$/.test(t)||(t=Ce(),e.setItem(De,t)),t}catch(n){}}()),t.addOnSession(function(e){e.device=m({},e.device,n),t._config.collectUserIp||Pe(e)}),t.addOnError(function(e){e.device=m({},e.device,n,{time:new Date}),t._config.collectUserIp||Pe(e)},!0)},configSchema:{generateAnonymousId:{validate:function(e){return!0===e||!1===e},defaultValue:function(){return!0},message:"should be true|false"}}}},Pe=function(e){var t=e.getUser();t&&t.id||e.setUser(e.device.id)},Ve={load:function(e){e._sessionDelegate=Ie}},Ie={startSession:function(e,t){var n=e;return n._session=t,(n._pausedSession=null)===n._config.enabledReleaseStages||v(n._config.enabledReleaseStages,n._config.releaseStage)?n._delivery.sendSession({notifier:n._notifier,device:t.device,app:t.app,sessions:[{id:t.id,startedAt:t.startedAt,user:t._user}]}):n._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration"),n},resumeSession:function(e){return e._session?e:e._pausedSession?(e._session=e._pausedSession,e._pausedSession=null,e):e.startSession()},pauseSession:function(e){e._pausedSession=e._session,e._session=null}},He={load:function(e){e._config.collectUserIp||e.addOnError(function(e){e._user&&"undefined"==typeof e._user.id&&delete e._user.id,e._user=m({id:"[REDACTED]"},e._user),e.request=m({clientIp:"[REDACTED]"},e.request)})},configSchema:{collectUserIp:{defaultValue:function(){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}}}},Ke={load:function(i){!/^(local-)?dev(elopment)?$/.test(i._config.releaseStage)&&i._isBreadcrumbTypeEnabled("log")&&y($e,function(r){var o=console[r];console[r]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];i.leaveBreadcrumb("Console output",h(t,function(e,t,n){var r="[Unknown value]";try{r=String(t)}catch(o){}if("[object Object]"===r)try{r=JSON.stringify(t)}catch(o){}return e["["+n+"]"]=r,e},{severity:0===r.indexOf("group")?"log":r}),"log"),o.apply(console,t)},console[r]._restore=function(){console[r]=o}})}},$e=p(["log","debug","info","warn","error"],function(e){return"undefined"!=typeof console&&"function"==typeof console[e]}),Ue=function(d,f){return void 0===d&&(d=document),void 0===f&&(f=window),{load:function(e){if(e._config.trackInlineScripts){var o=f.location.href,i="",a=!!d.attachEvent?"complete"===d.readyState:"loading"!==d.readyState,s=function(){return d.documentElement.outerHTML};i=s();var t=d.onreadystatechange;d.onreadystatechange=function(){"interactive"===d.readyState&&(i=s(),a=!0);try{t.apply(this,arguments)}catch(e){}};var n=null,u=function(e){n=e},c=function(){var e=d.currentScript||n;if(!e&&!a){var t=d.scripts||d.getElementsByTagName("script");e=t[t.length-1]}return e};e.addOnError(function(e){e.errors[0].stacktrace=p(e.errors[0].stacktrace,function(e){return!/__trace__$/.test(e.method)});var t=e.errors[0].stacktrace[0];if(!t||!t.file||t.file.replace(/#.*$/,"")===o.replace(/#.*$/,"")){var n=c();if(n){var r=n.innerHTML;e.addMetadata("script","content",r.length<=5e5?r:r.substr(0,5e5)),t&&t.lineNumber&&(t.code=function(e){a&&i||(i=s());var t=["\x3c!-- DOC START --\x3e"].concat(i.split("\n")),n=e-1,r=Math.max(n-3,0),o=Math.min(n+3,t.length);return h(t.slice(r,o),function(e,t,n){return e[r+1+n]=t.length<=200?t:t.substr(0,200),e},{})}(t.lineNumber))}}},!0);var l=y(["setTimeout","setInterval","setImmediate","requestAnimationFrame"],function(e){return Xe(f,e,function(e){return r(e,function(t){return{get:function(){return t[0]},replace:function(e){t[0]=e}}})})})[0];y(["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"],function(e){f[e]&&f[e].prototype&&Object.prototype.hasOwnProperty.call(f[e].prototype,"addEventListener")&&(Xe(f[e].prototype,"addEventListener",function(e){return r(e,Fe)}),Xe(f[e].prototype,"removeEventListener",function(e){return r(e,Fe,!0)}))})}function r(i,a,s){return void 0===s&&(s=!1),function(){var e=[].slice.call(arguments);try{var t=a(e),n=t.get();if(s&&i.apply(this,e),"function"!=typeof n)return i.apply(this,e);if(n.__trace__)t.replace(n.__trace__);else{var r=c();n.__trace__=function(){u(r),l(function(){u(null)},0);var e=n.apply(this,arguments);return u(null),e},n.__trace__.__trace__=n.__trace__,t.replace(n.__trace__)}}catch(o){}if(i.apply)return i.apply(this,e);switch(e.length){case 1:return i(e[0]);case 2:return i(e[0],e[1]);default:return i()}}}},configSchema:{trackInlineScripts:{validate:function(e){return!0===e||!1===e},defaultValue:function(){return!0},message:"should be true|false"}}}};function Xe(e,t,n){var r=e[t];if(!r)return r;var o=n(r);return e[t]=o,r}function Fe(t){var n=!!t[1]&&"function"==typeof t[1].handleEvent;return{get:function(){return n?t[1].handleEvent:t[1]},replace:function(e){n?t[1].handleEvent=e:t[1]=e}}}var Je=function(a){return void 0===a&&(a=window),{load:function(o){"addEventListener"in a&&o._isBreadcrumbTypeEnabled("user")&&a.addEventListener("click",function(e){var t,n;try{t=We(e.target),n=function i(e,t){var n=[e.tagName];e.id&&n.push("#"+e.id);e.className&&e.className.length&&n.push("."+e.className.split(" ").join("."));if(!t.document.querySelectorAll||!Array.prototype.indexOf)return n.join("");try{if(1===t.document.querySelectorAll(n.join("")).length)return n.join("")}catch(o){return n.join("")}if(1<e.parentNode.childNodes.length){var r=Array.prototype.indexOf.call(e.parentNode.childNodes,e)+1;n.push(":nth-child("+r+")")}if(1===t.document.querySelectorAll(n.join("")).length)return n.join("");if(e.parentNode)return i(e.parentNode,t)+" > "+n.join("");return n.join("")}(e.target,a)}catch(r){n=t="[hidden]",o._logger.error("Cross domain error when tracking click event. See docs: https://tinyurl.com/yy3rn63z")}o.leaveBreadcrumb("UI click",{targetText:t,targetSelector:n},"user")},!0)}}},We=function(e){var t=e.textContent||e.innerText||"";return t||"submit"!==e.type&&"button"!==e.type||(t=e.value),function n(e,t){return e&&e.length<=t?e:e.slice(0,t-"(...)".length)+"(...)"}(t=t.replace(/^\s+|\s+$/g,""),140)};var ze;ze=function(r){void 0===r&&(r=window);var e={load:function(n){if("addEventListener"in r&&n._isBreadcrumbTypeEnabled("navigation")){var e=function(e){return function(){return n.leaveBreadcrumb(e,{},"navigation")}};r.addEventListener("pagehide",e("Page hidden"),!0),r.addEventListener("pageshow",e("Page shown"),!0),r.addEventListener("load",e("Page loaded"),!0),r.document.addEventListener("DOMContentLoaded",e("DOMContentLoaded"),!0),r.addEventListener("load",function(){return r.addEventListener("popstate",e("Navigated back"),!0)}),r.addEventListener("hashchange",function(e){var t=e.oldURL?{from:Ge(e.oldURL,r),to:Ge(e.newURL,r),state:Ye(r)}:{to:Ge(r.location.href,r)};n.leaveBreadcrumb("Hash changed",t,"navigation")},!0),r.history.replaceState&&Qe(n,r.history,"replaceState",r),r.history.pushState&&Qe(n,r.history,"pushState",r)}}};return e};var Ge=function(e,t){var n=t.document.createElement("A");return n.href=e,""+n.pathname+n.search+n.hash},Qe=function(u,c,l,d){var f=c[l];c[l]=function(e,t,n){var r,o,i,a,s;u.leaveBreadcrumb("History "+l,(o=e,i=t,a=n,s=Ge((r=d).location.href,r),{title:i,state:o,prevState:Ye(r),to:a||s,from:s}),"navigation"),"function"==typeof u.resetEventCount&&u.resetEventCount(),u._config.autoTrackSessions&&u.startSession(),f.apply(c,[e,t].concat(n!==undefined?n:[]))}},Ye=function(e){try{return e.history.state}catch(t){}},Ze="request",et="BS~~U",tt="BS~~M",nt={load:function(t){var n=0;t.addOnError(function(e){if(n>=t._config.maxEvents)return!1;n++}),t.resetEventCount=function(){n=0}},configSchema:{maxEvents:{defaultValue:function(){return 10},message:"should be a positive integer ≤100",validate:function(e){return n(1,100)(e)}}}},rt={},ot=(rt={load:function(e){e.addOnError(function(e){var t=h(e.errors,function(e,t){return e.concat(t.stacktrace)},[]);y(t,function(e){e.file=ot(e.file)})})}})._strip=function(e){return"string"==typeof e?e.replace(/\?.*$/,"").replace(/#.*$/,""):e},it=function(e,t,n,r){e[0]||e.push({});var o=e[0];o.file||"string"!=typeof t||(o.file=t),!o.lineNumber&&at(n)&&(o.lineNumber=n),o.columnNumber||(at(r)?o.columnNumber=r:window.event&&at(window.event.errorCharacter)&&(o.columnNumber=window.event.errorCharacter))},at=function(e){return"number"==typeof e&&"NaN"!==String.call(e)},st=function(t){return function(e){e.file!==t.toString()&&e.method&&(e.method=e.method.replace(/^\s+/,""))}},ut={},ct=m({},u.schema,d),lt={_client:null,createClient:function(e){"string"==typeof e&&(e={apiKey:e}),e||(e={});var t,n,r,o=[Se,Ae(),(void 0===r&&(r=window),{load:function(e){e.addOnError(function(e){e.context===undefined&&(e.context=r.location.pathname)},!0)}}),(void 0===n&&(n=window),{load:function(e){e.addOnError(function(e){e.request&&e.request.url||(e.request=m({},e.request,{url:n.location.href}))},!0)}}),nt,Ve,He,rt,(void 0===t&&(t=window),{load:function(c){if(c._config.autoDetectErrors&&c._config.enabledErrorTypes.unhandledExceptions){var l=t.onerror;t.onerror=function d(e,t,n,r,o){if(0===n&&/Script error\.?/.test(e))c._logger.warn("Ignoring cross-domain or eval script error. See docs: https://tinyurl.com/yy3rn63z");else{var i,a={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}};if(o)i=c.Event.create(o,!0,a,"window onerror",1),it(i.errors[0].stacktrace,t,n,r);else if("object"!=typeof e||null===e||t&&"string"==typeof t||n||r||o)i=c.Event.create(e,!0,a,"window onerror",1),it(i.errors[0].stacktrace,t,n,r);else{var s=e.type?"Event: "+e.type:"Error",u=e.message||e.detail||"";(i=c.Event.create({name:s,message:u},!0,a,"window onerror",1)).originalError=e,i.addMetadata("window onerror",{event:e,extraParameters:t})}c._notify(i)}"function"==typeof l&&l.apply(this,arguments)}}}}),function(e){void 0===e&&(e=window);var t={load:function(i){if(i._config.autoDetectErrors&&i._config.enabledErrorTypes.unhandledRejections){var n=function(e){var t=e.reason,n=!1;try{e.detail&&e.detail.reason&&(t=e.detail.reason,n=!0)}catch(o){}var r=i.Event.create(t,!1,{severity:"error",unhandled:!0,severityReason:{type:"unhandledPromiseRejection"}},"unhandledrejection handler",1,i._logger);n&&y(r.errors[0].stacktrace,st(t)),i._notify(r,function(e){var t;E(e.originalError)&&!e.originalError.stack&&e.addMetadata("unhandledRejection handler",((t={})[Object.prototype.toString.call(e.originalError)]={name:e.originalError.name,message:e.originalError.message,code:e.originalError.code},t))})};"addEventListener"in e?e.addEventListener("unhandledrejection",n):e.onunhandledrejection=function(e,t){n({detail:{reason:e,promise:t}})},n}}};return t}(),ze(),Je(),function(u,c){void 0===u&&(u=[]),void 0===c&&(c=window);var e={load:function(o){if(o._isBreadcrumbTypeEnabled("request")){var n=[o._config.endpoints.notify,o._config.endpoints.sessions].concat(u);!function e(){if("addEventListener"in c.XMLHttpRequest.prototype){var n=c.XMLHttpRequest.prototype.open;c.XMLHttpRequest.prototype.open=function(e,t){this[et]=t,this[tt]=e,this["BS~~S"]&&(this.removeEventListener("load",r),this.removeEventListener("error",i)),this.addEventListener("load",r),this.addEventListener("error",i),this["BS~~S"]=!0,n.apply(this,arguments)}}}(),function t(){if("fetch"in c&&!c.fetch.polyfill){var i=c.fetch;c.fetch=function(){var r,e=arguments,t=arguments[0],n=arguments[1],o=null;return t&&"object"==typeof t?(o=t.url,n&&"method"in n?r=n.method:t&&"method"in t&&(r=t.method)):(o=t,n&&"method"in n&&(r=n.method)),r===undefined&&(r="GET"),new Promise(function(t,n){i.apply(void 0,e).then(function(e){a(e,r,o),t(e)})["catch"](function(e){s(r,o),n(e)})})}}}();var a=function(e,t,n){var r={status:e.status,request:t+" "+n};400<=e.status?o.leaveBreadcrumb("fetch() failed",r,Ze):o.leaveBreadcrumb("fetch() succeeded",r,Ze)},s=function(e,t){o.leaveBreadcrumb("fetch() error",{request:e+" "+t},Ze)}}function r(){var e=this[et];if(e!==undefined){if("string"!=typeof e||!v(n,e.replace(/\?.*$/,""))){var t={status:this.status,request:this[tt]+" "+this[et]};400<=this.status?o.leaveBreadcrumb("XMLHttpRequest failed",t,Ze):o.leaveBreadcrumb("XMLHttpRequest succeeded",t,Ze)}}else o._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.")}function i(){var e=this[et];e!==undefined?"string"==typeof e&&v(n,e.replace(/\?.*$/,""))||o.leaveBreadcrumb("XMLHttpRequest error",{request:this[tt]+" "+this[et]},Ze):o._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.")}}};return e}(),Ke,Ue()],i=new ne(e,ct,o,{name:"Bugsnag JavaScript",version:"7.15.1",url:"https://github.com/bugsnag/bugsnag-js"});return i._setDelivery(window.XDomainRequest?pe:ye),i._logger.debug("Loaded!"),i.leaveBreadcrumb("Bugsnag loaded",{},"state"),i._config.autoTrackSessions?i.startSession():i},start:function(e){return lt._client?lt._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."):lt._client=lt.createClient(e),lt._client}};return y(["resetEventCount"].concat(s(ne.prototype)),function(t){/^_/.test(t)||(lt[t]=function(){if(!lt._client)return console.log("Bugsnag."+t+"() was called before Bugsnag.start()");lt._client._depth+=1;var e=lt._client[t].apply(lt._client,arguments);return lt._client._depth-=1,e})}),(ut=lt).Client=ne,ut.Event=C,ut.Session=Q,ut.Breadcrumb=b,ut["default"]=lt,ut});
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Bugsnag=e()}}(function(){var a=["navigation","request","process","log","user","state","error","manual"],h=function(e,t,n){for(var r=n,a=0,o=e.length;a<o;a++)r=t(r,e[a],a,e);return r},p=function(e,a){return h(e,function(e,t,n,r){return a(t,n,r)?e.concat(t):e},[])},v=function(e,a){return h(e,function(e,t,n,r){return!0===e||t===a},!1)},o=function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=!{toString:null}.propertyIsEnumerable("toString"),s=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(e){var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);if(!i)return n;for(var r=0,a=s.length;r<a;r++)Object.prototype.hasOwnProperty.call(e,s[r])&&n.push(s[r]);return n},t=function(t,n){return void 0===t&&(t=1),void 0===n&&(n=Infinity),function(e){return"number"==typeof e&&parseInt(""+e,10)===e&&t<=e&&e<=n}},e=function(e){return"function"==typeof e||o(e)&&p(e,function(e){return"function"==typeof e}).length===e.length},n=function(e){return"string"==typeof e&&!!e.length},c={};c.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:n},appVersion:{defaultValue:function(){return undefined},message:"should be a string",validate:function(e){return e===undefined||n(e)}},appType:{defaultValue:function(){return undefined},message:"should be a string",validate:function(e){return e===undefined||n(e)}},autoDetectErrors:{defaultValue:function(){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}},enabledErrorTypes:{defaultValue:function(){return{unhandledExceptions:!0,unhandledRejections:!0}},message:"should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",allowPartialObject:!0,validate:function(t){if("object"!=typeof t||!t)return!1;var e=u(t),n=u({unhandledExceptions:!0,unhandledRejections:!0});return!(p(e,function(e){return v(n,e)}).length<e.length)&&!(0<p(u(t),function(e){return"boolean"!=typeof t[e]}).length)}},onError:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:e},onSession:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:e},onBreadcrumb:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:e},endpoints:{defaultValue:function(){return{notify:"https://notify.bugsnag.com",sessions:"https://sessions.bugsnag.com"}},message:"should be an object containing endpoint URLs { notify, sessions }",validate:function(e){return e&&"object"==typeof e&&n(e.notify)&&n(e.sessions)&&0===p(u(e),function(e){return!v(["notify","sessions"],e)}).length}},autoTrackSessions:{defaultValue:function(e){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}},enabledReleaseStages:{defaultValue:function(){return null},message:"should be an array of strings",validate:function(e){return null===e||o(e)&&p(e,function(e){return"string"==typeof e}).length===e.length}},releaseStage:{defaultValue:function(){return"production"},message:"should be a string",validate:function(e){return"string"==typeof e&&e.length}},maxBreadcrumbs:{defaultValue:function(){return 25},message:"should be a number ≤100",validate:function(e){return t(0,100)(e)}},enabledBreadcrumbTypes:{defaultValue:function(){return a},message:"should be null or a list of available breadcrumb types ("+a.join(",")+")",validate:function(e){return null===e||o(e)&&h(e,function(e,t){return!1===e?e:v(a,t)},!0)}},context:{defaultValue:function(){return undefined},message:"should be a string",validate:function(e){return e===undefined||"string"==typeof e}},user:{defaultValue:function(){return{}},message:"should be an object with { id, email, name } properties",validate:function(e){return null===e||e&&h(u(e),function(e,t){return e&&v(["id","email","name"],t)},!0)}},metadata:{defaultValue:function(){return{}},message:"should be an object",validate:function(e){return"object"==typeof e&&null!==e}},logger:{defaultValue:function(){return undefined},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(n){return!n||n&&h(["debug","info","warn","error"],function(e,t){return e&&"function"==typeof n[t]},!0)}},redactedKeys:{defaultValue:function(){return["password"]},message:"should be an array of strings|regexes",validate:function(e){return o(e)&&e.length===p(e,function(e){return"string"==typeof e||e&&"function"==typeof e.test}).length}},plugins:{defaultValue:function(){return[]},message:"should be an array of plugin objects",validate:function(e){return o(e)&&e.length===p(e,function(e){return e&&"object"==typeof e&&"function"==typeof e.load}).length}},featureFlags:{defaultValue:function(){return[]},message:'should be an array of objects that have a "name" property',validate:function(e){return o(e)&&e.length===p(e,function(e){return e&&"object"==typeof e&&"string"==typeof e.name}).length}}};var m=function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},y=function(e,a){return h(e,function(e,t,n,r){return e.concat(a(t,n,r))},[])};function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var l=c.schema,f={releaseStage:m({},l.releaseStage,{defaultValue:function(){return/^localhost(:\d+)?$/.test(window.location.host)?"development":"production"}}),appType:r({},l.appType,{defaultValue:function(){return"browser"}}),logger:m({},l.logger,{defaultValue:function(){return"undefined"!=typeof console&&"function"==typeof console.debug?d():undefined}})},d=function(){var n={},r=console.log;return y(["debug","info","warn","error"],function(e){var t=console[e];n[e]="function"==typeof t?t.bind(console,"[bugsnag]"):r.bind(console,"[bugsnag]")}),n},b=function(){function e(e,t,n,r){void 0===r&&(r=new Date),this.type=n,this.message=e,this.metadata=t,this.timestamp=r}return e.prototype.toJSON=function(){return{type:this.type,name:this.message,timestamp:this.timestamp,metaData:this.metadata}},e}(),g={};!function(e,t){"use strict";"object"==typeof g?g=t():e.StackFrame=t()}(this,function(){"use strict";function n(e){return!isNaN(parseFloat(e))&&isFinite(e)}function r(e){return e.charAt(0).toUpperCase()+e.substring(1)}function e(e){return function(){return this[e]}}var t=["isConstructor","isEval","isNative","isToplevel"],a=["columnNumber","lineNumber"],o=["fileName","functionName","source"],i=t.concat(a,o,["args"]);function s(e){if(e instanceof Object)for(var t=0;t<i.length;t++)e.hasOwnProperty(i[t])&&e[i[t]]!==undefined&&this["set"+r(i[t])](e[i[t]])}s.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof s)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new s(e)}},toString:function(){return(this.getFunctionName()||"{anonymous}")+("("+(this.getArgs()||[]).join(",")+")")+(this.getFileName()?"@"+this.getFileName():"")+(n(this.getLineNumber())?":"+this.getLineNumber():"")+(n(this.getColumnNumber())?":"+this.getColumnNumber():"")}};for(var u=0;u<t.length;u++)s.prototype["get"+r(t[u])]=e(t[u]),s.prototype["set"+r(t[u])]=function(t){return function(e){this[t]=Boolean(e)}}(t[u]);for(var c=0;c<a.length;c++)s.prototype["get"+r(a[c])]=e(a[c]),s.prototype["set"+r(a[c])]=function(t){return function(e){if(!n(e))throw new TypeError(t+" must be a Number");this[t]=Number(e)}}(a[c]);for(var l=0;l<o.length;l++)s.prototype["get"+r(o[l])]=e(o[l]),s.prototype["set"+r(o[l])]=function(t){return function(e){this[t]=String(e)}}(o[l]);return s});var _={};!function(e,t){"use strict";"object"==typeof _?_=t(g):e.ErrorStackParser=t(e.StackFrame)}(this,function(s){"use strict";var t=/(^|@)\S+\:\d+/,n=/^\s*at .*(\S+\:\d+|\(native\))/m,r=/^(eval@)?(\[native code\])?$/;return{parse:function(e){if("undefined"!=typeof e.stacktrace||"undefined"!=typeof e["opera#sourceloc"])return this.parseOpera(e);if(e.stack&&e.stack.match(n))return this.parseV8OrIE(e);if(e.stack)return this.parseFFOrSafari(e);throw new Error("Cannot parse given Error object")},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?:\:(\d+))?(?:\:(\d+))?$/.exec(e.replace(/[\(\)]/g,""));return[t[1],t[2]||undefined,t[3]||undefined]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(n)},this).map(function(e){-1<e.indexOf("(eval ")&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"("),n=t.match(/ (\((.+):(\d+):(\d+)\)$)/),r=(t=n?t.replace(n[0],""):t).split(/\s+/).slice(1),a=this.extractLocation(n?n[1]:r.pop()),o=r.join(" ")||undefined,i=-1<["eval","<anonymous>"].indexOf(a[0])?undefined:a[0];return new s({functionName:o,fileName:i,lineNumber:a[1],columnNumber:a[2],source:e})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(r)},this).map(function(e){if(-1<e.indexOf(" > eval")&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new s({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:undefined,a=this.extractLocation(e.replace(t,""));return new s({functionName:r,fileName:a[0],lineNumber:a[1],columnNumber:a[2],source:e})},this)},parseOpera:function(e){return!e.stacktrace||-1<e.message.indexOf("\n")&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),r=[],a=2,o=n.length;a<o;a+=2){var i=t.exec(n[a]);i&&r.push(new s({fileName:i[2],lineNumber:i[1],source:n[a]}))}return r},parseOpera10:function(e){for(var t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split("\n"),r=[],a=0,o=n.length;a<o;a+=2){var i=t.exec(n[a]);i&&r.push(new s({functionName:i[3]||undefined,fileName:i[2],lineNumber:i[1],source:n[a]}))}return r},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(t)&&!e.match(/^Error created at/)},this).map(function(e){var t,n=e.split("@"),r=this.extractLocation(n.pop()),a=n.shift()||"",o=a.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||undefined;a.match(/\(([^\)]*)\)/)&&(t=a.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var i=t===undefined||"[arguments not available]"===t?undefined:t.split(",");return new s({functionName:o,args:i,fileName:r[0],lineNumber:r[1],columnNumber:r[2],source:e})},this)}}});var S=_,w=function(e,t,n,r){var a=r&&r.redactedKeys?r.redactedKeys:[],o=r&&r.redactedPaths?r.redactedPaths:[];return JSON.stringify(function i(e,p,v){var m=[],y=0;return function b(e,t){function n(){return t.length>j&&O<y}y++;if(t.length>E)return N;if(n())return N;if(null===e||"object"!=typeof e)return e;if(x(m,e))return"[Circular]";m.push(e);if("function"==typeof e.toJSON)try{y--;var r=b(e.toJSON(),t);return m.pop(),r}catch(h){return k(h)}var a=(o=e,o instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(o)));var o;if(a){y--;var i=b({name:e.name,message:e.message},t);return m.pop(),i}if(l=e,"[object Array]"===Object.prototype.toString.call(l)){for(var s=[],u=0,c=e.length;u<c;u++){if(n()){s.push(N);break}s.push(b(e[u],t.concat("[]")))}return m.pop(),s}var l;var f={};try{for(var d in e)if(Object.prototype.hasOwnProperty.call(e,d))if(T(v,t.join("."))&&L(p,d))f[d]="[REDACTED]";else{if(n()){f[d]=N;break}f[d]=b(R(e,d),t.concat(d))}}catch(g){}m.pop();return f}(e,[])}(e,a,o),t,n)},E=20,O=25e3,j=8,N="...";function k(e){return"[Throws: "+(e?e.message:"?")+"]"}function x(e,t){for(var n=0,r=e.length;n<r;n++){if(e[n]===t)return true}return false}function T(e,t){for(var n=0,r=e.length;n<r;n++)if(0===t.indexOf(e[n]))return!0;return!1}function L(e,t){for(var n=0,r=e.length;n<r;n++){if("string"==typeof e[n]&&e[n].toLowerCase()===t.toLowerCase())return!0;if(e[n]&&"function"==typeof e[n].test&&e[n].test(t))return!0}return!1}function R(e,t){try{return e[t]}catch(n){return k(n)}}function B(e,t,n){"string"==typeof t&&(n===undefined?n=null:null!==n&&"string"!=typeof n&&(n=w(n)),e[t]=n)}var q={add:B,merge:function ht(e,t){if(o(t))for(var n=0;n<t.length;++n){var r=t[n];null!==r&&"object"==typeof r&&B(e,r.name,r.variant)}},toEventApi:function gt(n){return y(u(n),function(e){var t={featureFlag:e};return"string"==typeof n[e]&&(t.variant=n[e]),t})}},M=function(e){return!(!e||!e.stack&&!e.stacktrace&&!e["opera#sourceloc"]||"string"!=typeof(e.stack||e.stacktrace||e["opera#sourceloc"])||e.stack===e.name+": "+e.message)};var A=function pt(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}},C=function(e,t,n){"string"==typeof t&&(n?e[t]&&delete e[t][n]:delete e[t])},D={add:function(e,t,n,r){var a;if(t){var o;if(null===n)return C(e,t);"object"==typeof n&&(o=n),"string"==typeof n&&((a={})[n]=r,o=a),o&&(e[t]||(e[t]={}),e[t]=m({},e[t],o))}},get:function(e,t,n){return"string"!=typeof t?undefined:n?e[t]?e[t][n]:undefined:e[t]},clear:C},P={};!function(e,t){"use strict";"object"==typeof P?P=t(g):e.StackGenerator=t(e.StackFrame)}(this,function(s){return{backtrace:function(e){var t=[],n=10;"object"==typeof e&&"number"==typeof e.maxStackSize&&(n=e.maxStackSize);for(var r=arguments.callee;r&&t.length<n&&r.arguments;){for(var a=new Array(r.arguments.length),o=0;o<a.length;++o)a[o]=r.arguments[o];/function(?:\s+([\w$]+))+\s*\(/.test(r.toString())?t.push(new s({functionName:RegExp.$1||undefined,args:a})):t.push(new s({args:a}));try{r=r.caller}catch(i){break}}return t}}});var V=function(){function o(e,t,n,r,a){void 0===n&&(n=[]),void 0===r&&(r=H()),this.apiKey=undefined,this.context=undefined,this.groupingHash=undefined,this.originalError=a,this._handledState=r,this.severity=this._handledState.severity,this.unhandled=this._handledState.unhandled,this.app={},this.device={},this.request={},this.breadcrumbs=[],this.threads=[],this._metadata={},this._features={},this._user={},this._session=undefined,this.errors=[{errorClass:K(e),errorMessage:K(t),type:o.__type,stacktrace:h(n,function(e,t){var n=I(t);try{return"{}"===JSON.stringify(n)?e:e.concat(n)}catch(r){return e}},[])}]}var e=o.prototype;return e.addMetadata=function(e,t,n){return D.add(this._metadata,e,t,n)},e.getMetadata=function(e,t){return D.get(this._metadata,e,t)},e.clearMetadata=function(e,t){return D.clear(this._metadata,e,t)},e.addFeatureFlag=function(e,t){void 0===t&&(t=null),q.add(this._features,e,t)},e.addFeatureFlags=function(e){q.merge(this._features,e)},e.clearFeatureFlag=function(e){delete this._features[e]},e.clearFeatureFlags=function(){this._features={}},e.getUser=function(){return this._user},e.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},e.toJSON=function(){return{payloadVersion:"4",exceptions:y(this.errors,function(e){return m({},e,{message:e.errorMessage})}),severity:this.severity,unhandled:this._handledState.unhandled,severityReason:this._handledState.severityReason,app:this.app,device:this.device,request:this.request,breadcrumbs:this.breadcrumbs,context:this.context,groupingHash:this.groupingHash,metaData:this._metadata,user:this._user,session:this._session,featureFlags:q.toEventApi(this._features)}},o}(),I=function(e){var t={file:e.fileName,method:F(e.functionName),lineNumber:e.lineNumber,columnNumber:e.columnNumber,code:undefined,inProject:undefined};return-1<t.lineNumber&&!t.file&&!t.method&&(t.file="global code"),t},F=function(e){return/^global code$/i.test(e)?"global code":e},H=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},K=function(e){return"string"==typeof e?e:""};V.getStacktrace=function(e,t,n){if(M(e))return S.parse(e).slice(t);try{return p(P.backtrace(),function(e){return-1===(e.functionName||"").indexOf("StackGenerator$$")}).slice(1+n)}catch(r){return[]}},V.create=function(e,t,n,r,a,o){void 0===a&&(a=0);var i,s=U(e,t,r,o),u=s[0],c=s[1];try{var l=V.getStacktrace(u,0<c?1+c+a:0,1+a);i=new V(u.name,u.message,l,n,e)}catch(f){i=new V(u.name,u.message,[],n,e)}return"InvalidError"===u.name&&i.addMetadata(""+r,"non-error parameter",$(e)),i};var $=function(e){return null===e?"null":e===undefined?"undefined":e},U=function(e,t,n,r){var a,o=0,i=function(e){r&&r.warn(n+' received a non-error: "'+e+'"');var t=new Error(n+' received a non-error. See "'+n+'" tab for more detail.');return t.name="InvalidError",t};if(t)switch(typeof e){case"string":case"number":case"boolean":a=new Error(String(e)),o+=1;break;case"function":a=i("function"),o+=2;break;case"object":null!==e&&A(e)?a=e:null!==e&&X(e)?((a=new Error(e.message||e.errorMessage)).name=e.name||e.errorClass,o+=1):(a=i(null===e?"null":"unsupported object"),o+=2);break;default:a=i("nothing"),o+=2}else A(e)?a=e:(a=i(typeof e),o+=2);if(!M(a))try{throw a}catch(s){M(s)&&(a=s,o=1)}return[a,o]};V.__type="browserjs";var X=function(e){return!("string"!=typeof e.name&&"string"!=typeof e.errorClass||"string"!=typeof e.message&&"string"!=typeof e.errorMessage)},J=V,W=function(e,t,n,r){for(var a=!1,o=e.slice();!a&&o.length;)try{a=!1===o.pop()(t)}catch(i){r.error("Error occurred in "+n+" callback, continuing anyway…"),r.error(i)}return a},z=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},G="object"==typeof window?window:self,Q=0;for(var Y in G)Object.hasOwnProperty.call(G,Y)&&Q++;var Z=navigator.mimeTypes?navigator.mimeTypes.length:0,ee=z((Z+navigator.userAgent.length).toString(36)+Q.toString(36),4),te=function(){return ee},ne=0,re=4,ae=36,oe=Math.pow(ae,re);function ie(){return z((Math.random()*oe<<0).toString(ae),re)}function se(){return"c"+(new Date).getTime().toString(ae)+z(function e(){return ne=ne<oe?ne:0,++ne-1}().toString(ae),re)+te()+(ie()+ie())}se.fingerprint=te;var ue=se,ce=function(){function e(){this.id=ue(),this.startedAt=new Date,this._handled=0,this._unhandled=0,this._user={},this.app={},this.device={}}var t=e.prototype;return t.getUser=function(){return this._user},t.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},t.toJSON=function(){return{id:this.id,startedAt:this.startedAt,events:{handled:this._handled,unhandled:this._unhandled}}},t._track=function(e){this[e._handledState.unhandled?"_unhandled":"_handled"]+=1},e}(),le=function(){},fe=function(){function g(e,t,n,r){var a=this;void 0===t&&(t=c.schema),void 0===n&&(n=[]),this._notifier=r,this._config={},this._schema=t,this._delivery={sendSession:le,sendEvent:le},this._logger={debug:le,info:le,warn:le,error:le},this._plugins={},this._breadcrumbs=[],this._session=null,this._metadata={},this._features={},this._context=undefined,this._user={},this._cbs={e:[],s:[],sp:[],b:[]},this.Client=g,this.Event=J,this.Breadcrumb=b,this.Session=ce,this._config=this._configure(e,n),y(n.concat(this._config.plugins),function(e){e&&a._loadPlugin(e)}),this._depth=1;var o=this,i=this.notify;this.notify=function(){return i.apply(o,arguments)}}var e=g.prototype;return e.addMetadata=function(e,t,n){return D.add(this._metadata,e,t,n)},e.getMetadata=function(e,t){return D.get(this._metadata,e,t)},e.clearMetadata=function(e,t){return D.clear(this._metadata,e,t)},e.addFeatureFlag=function(e,t){void 0===t&&(t=null),q.add(this._features,e,t)},e.addFeatureFlags=function(e){q.merge(this._features,e)},e.clearFeatureFlag=function(e){delete this._features[e]},e.clearFeatureFlags=function(){this._features={}},e.getContext=function(){return this._context},e.setContext=function(e){this._context=e},e._configure=function(r,e){var a=h(e,function(e,t){return t&&t.configSchema?m({},e,t.configSchema):e},this._schema),t=h(u(a),function(e,t){var n=a[t].defaultValue(r[t]);r[t]!==undefined?a[t].validate(r[t])?a[t].allowPartialObject?e.config[t]=m(n,r[t]):e.config[t]=r[t]:(e.errors[t]=a[t].message,e.config[t]=n):e.config[t]=n;return e},{errors:{},config:{}}),n=t.errors,o=t.config;if(a.apiKey){if(!o.apiKey)throw new Error("No Bugsnag API Key set");/^[0-9a-f]{32}$/i.test(o.apiKey)||(n.apiKey="should be a string of 32 hexadecimal characters")}return this._metadata=m({},o.metadata),q.merge(this._features,o.featureFlags),this._user=m({},o.user),this._context=o.context,o.logger&&(this._logger=o.logger),o.onError&&(this._cbs.e=this._cbs.e.concat(o.onError)),o.onBreadcrumb&&(this._cbs.b=this._cbs.b.concat(o.onBreadcrumb)),o.onSession&&(this._cbs.s=this._cbs.s.concat(o.onSession)),u(n).length&&this._logger.warn(de(n,r)),o},e.getUser=function(){return this._user},e.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},e._loadPlugin=function(e){var t=e.load(this);return e.name&&(this._plugins["~"+e.name+"~"]=t),this},e.getPlugin=function(e){return this._plugins["~"+e+"~"]},e._setDelivery=function(e){this._delivery=e(this)},e.startSession=function(){var e=new ce;return e.app.releaseStage=this._config.releaseStage,e.app.version=this._config.appVersion,e.app.type=this._config.appType,e._user=m({},this._user),W(this._cbs.s,e,"onSession",this._logger)?(this._logger.debug("Session not started due to onSession callback"),this):this._sessionDelegate.startSession(this,e)},e.addOnError=function(e,t){void 0===t&&(t=!1),this._cbs.e[t?"unshift":"push"](e)},e.removeOnError=function(t){this._cbs.e=p(this._cbs.e,function(e){return e!==t})},e._addOnSessionPayload=function(e){this._cbs.sp.push(e)},e.addOnSession=function(e){this._cbs.s.push(e)},e.removeOnSession=function(t){this._cbs.s=p(this._cbs.s,function(e){return e!==t})},e.addOnBreadcrumb=function(e,t){void 0===t&&(t=!1),this._cbs.b[t?"unshift":"push"](e)},e.removeOnBreadcrumb=function(t){this._cbs.b=p(this._cbs.b,function(e){return e!==t})},e.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},e.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},e.leaveBreadcrumb=function(e,t,n){if(e="string"==typeof e?e:"",n="string"==typeof n&&v(a,n)?n:"manual",t="object"==typeof t&&null!==t?t:{},e){var r=new b(e,t,n);W(this._cbs.b,r,"onBreadcrumb",this._logger)?this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback"):(this._breadcrumbs.push(r),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs)))}},e._isBreadcrumbTypeEnabled=function(e){var t=this._config.enabledBreadcrumbTypes;return null===t||v(t,e)},e.notify=function(e,t,n){void 0===n&&(n=le);var r=J.create(e,!0,undefined,"notify()",this._depth+1,this._logger);this._notify(r,t,n)},e._notify=function(n,e,r){var a=this;if(void 0===r&&(r=le),n.app=m({},n.app,{releaseStage:this._config.releaseStage,version:this._config.appVersion,type:this._config.appType}),n.context=n.context||this._context,n._metadata=m({},n._metadata,this._metadata),n._features=m({},n._features,this._features),n._user=m({},n._user,this._user),n.breadcrumbs=this._breadcrumbs.slice(),null!==this._config.enabledReleaseStages&&!v(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"),r(null,n);var o,i,t,s,u,c,l,f=n.severity,d=function(e){a._logger.error("Error occurred in onError callback, continuing anyway…"),a._logger.error(e)},h=[].concat(this._cbs.e).concat(e);o=n,i=d,t=h,s=function(e,n){if("function"!=typeof e)return n(null);try{if(2!==e.length){var t=e(o);return t&&"function"==typeof t.then?t.then(function(e){return setTimeout(function(){return n(null,e)})},function(e){setTimeout(function(){return i(e),n(null,!0)})}):n(null,t)}e(o,function(e,t){if(e)return i(e),n(null);n(null,t)})}catch(r){i(r),n(null)}},u=function(e,t){if(e&&d(e),!t)return a._logger.debug("Event not sent due to onError callback"),r(null,n);a._isBreadcrumbTypeEnabled("error")&&g.prototype.leaveBreadcrumb.call(a,n.errors[0].errorClass,{errorClass:n.errors[0].errorClass,errorMessage:n.errors[0].errorMessage,severity:n.severity},"error"),f!==n.severity&&(n._handledState.severityReason={type:"userCallbackSetSeverity"}),n.unhandled!==n._handledState.unhandled&&(n._handledState.severityReason.unhandledOverridden=!0,n._handledState.unhandled=n.unhandled),a._session&&(a._session._track(n),n._session=a._session),a._delivery.sendEvent({apiKey:n.apiKey||a._config.apiKey,notifier:a._notifier,events:[n]},function(e){return r(e,n)})},c=0,(l=function(){if(c>=t.length)return u(null,!0);s(t[c],function(e,t){return e?u(e):!1===t?u(null,!1):(c++,void l())})})()},g}(),de=function(t,n){return new Error("Invalid configuration\n"+y(u(t),function(e){return" - "+e+" "+t[e]+", got "+he(n[e])}).join("\n\n"))},he=function(e){switch(typeof e){case"string":case"number":case"object":return JSON.stringify(e);default:return String(e)}},ge=fe,pe={},ve=["events.[].metaData","events.[].breadcrumbs.[].metaData","events.[].request"];pe.event=function(e,t){var n=w(e,null,null,{redactedPaths:ve,redactedKeys:t});if(1e6<n.length&&(e.events[0]._metadata={notifier:"WARNING!\nSerialized payload was "+n.length/1e6+"MB (limit = 1MB)\nmetadata was removed"},1e6<(n=w(e,null,null,{redactedPaths:ve,redactedKeys:t})).length))throw new Error("payload exceeded 1MB limit");return n},pe.session=function(e,t){var n=w(e,null,null);if(1e6<n.length)throw new Error("payload exceeded 1MB limit");return n};var me;me=function(a,o){return void 0===o&&(o=window),{sendEvent:function(t,n){void 0===n&&(n=function(){});var e=ye(a._config,"notify","4",o),r=new o.XDomainRequest;r.onload=function(){n(null)},r.open("POST",e),setTimeout(function(){try{r.send(pe.event(t,a._config.redactedKeys))}catch(e){a._logger.error(e),n(e)}},0)},sendSession:function(t,n){void 0===n&&(n=function(){});var e=ye(a._config,"sessions","1",o),r=new o.XDomainRequest;r.onload=function(){n(null)},r.open("POST",e),setTimeout(function(){try{r.send(pe.session(t,a._config.redactedKeys))}catch(e){a._logger.error(e),n(e)}},0)}}};var ye=function(e,t,n,r){var a=JSON.parse(JSON.stringify(new Date));return be(e.endpoints[t],r.location.protocol)+"?apiKey="+encodeURIComponent(e.apiKey)+"&payloadVersion="+n+"&sentAt="+encodeURIComponent(a)},be=me._matchPageProtocol=function(e,t){return"http:"===t?e.replace(/^https:/,"http:"):e},_e=function(o,i){return void 0===i&&(i=window),{sendEvent:function(e,t){void 0===t&&(t=function(){});try{var n=o._config.endpoints.notify,r=new i.XMLHttpRequest;r.onreadystatechange=function(){r.readyState===i.XMLHttpRequest.DONE&&t(null)},r.open("POST",n),r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("Bugsnag-Api-Key",e.apiKey||o._config.apiKey),r.setRequestHeader("Bugsnag-Payload-Version","4"),r.setRequestHeader("Bugsnag-Sent-At",(new Date).toISOString()),r.send(pe.event(e,o._config.redactedKeys))}catch(a){o._logger.error(a)}},sendSession:function(e,t){void 0===t&&(t=function(){});try{var n=o._config.endpoints.sessions,r=new i.XMLHttpRequest;r.onreadystatechange=function(){r.readyState===i.XMLHttpRequest.DONE&&t(null)},r.open("POST",n),r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("Bugsnag-Api-Key",o._config.apiKey),r.setRequestHeader("Bugsnag-Payload-Version","1"),r.setRequestHeader("Bugsnag-Sent-At",(new Date).toISOString()),r.send(pe.session(e,o._config.redactedKeys))}catch(a){o._logger.error(a)}}}},Se=new Date,we=function(){Se=new Date},Ee={name:"appDuration",load:function(e){return e.addOnError(function(e){var t=new Date;e.app.duration=t-Se},!0),{reset:we}}},Oe=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},je="object"==typeof window?window:self,Ne=0;for(var ke in je)Object.hasOwnProperty.call(je,ke)&&Ne++;var xe=navigator.mimeTypes?navigator.mimeTypes.length:0,Te=Oe((xe+navigator.userAgent.length).toString(36)+Ne.toString(36),4),Le=function(){return Te},Re=0,Be=4,qe=36,Me=Math.pow(qe,Be);function Ae(){return Oe((Math.random()*Me<<0).toString(qe),Be)}function Ce(){return"c"+(new Date).getTime().toString(qe)+Oe(function e(){return Re=Re<Me?Re:0,++Re-1}().toString(qe),Be)+Le()+(Ae()+Ae())}Ce.fingerprint=Le;var De=Ce,Pe="bugsnag-anonymous-id",Ve=function(e,r){return void 0===e&&(e=navigator),void 0===r&&(r=window.screen),{load:function(t){var n={locale:e.browserLanguage||e.systemLanguage||e.userLanguage||e.language,userAgent:e.userAgent};r&&r.orientation&&r.orientation.type?n.orientation=r.orientation.type:n.orientation=document.documentElement.clientWidth>document.documentElement.clientHeight?"landscape":"portrait",t._config.generateAnonymousId&&(n.id=function(){try{var e=window.localStorage,t=e.getItem(Pe);return t&&/^c[a-z0-9]{20,32}$/.test(t)||(t=De(),e.setItem(Pe,t)),t}catch(n){}}()),t.addOnSession(function(e){e.device=m({},e.device,n),t._config.collectUserIp||Ie(e)}),t.addOnError(function(e){e.device=m({},e.device,n,{time:new Date}),t._config.collectUserIp||Ie(e)},!0)},configSchema:{generateAnonymousId:{validate:function(e){return!0===e||!1===e},defaultValue:function(){return!0},message:"should be true|false"}}}},Ie=function(e){var t=e.getUser();t&&t.id||e.setUser(e.device.id)},Fe={load:function(e){e._sessionDelegate=He}},He={startSession:function(e,t){var n=e;return n._session=t,(n._pausedSession=null)===n._config.enabledReleaseStages||v(n._config.enabledReleaseStages,n._config.releaseStage)?n._delivery.sendSession({notifier:n._notifier,device:t.device,app:t.app,sessions:[{id:t.id,startedAt:t.startedAt,user:t._user}]}):n._logger.warn("Session not sent due to releaseStage/enabledReleaseStages configuration"),n},resumeSession:function(e){return e._session?e:e._pausedSession?(e._session=e._pausedSession,e._pausedSession=null,e):e.startSession()},pauseSession:function(e){e._pausedSession=e._session,e._session=null}},Ke={load:function(e){e._config.collectUserIp||e.addOnError(function(e){e._user&&"undefined"==typeof e._user.id&&delete e._user.id,e._user=m({id:"[REDACTED]"},e._user),e.request=m({clientIp:"[REDACTED]"},e.request)})},configSchema:{collectUserIp:{defaultValue:function(){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}}}},$e={load:function(o){!/^(local-)?dev(elopment)?$/.test(o._config.releaseStage)&&o._isBreadcrumbTypeEnabled("log")&&y(Ue,function(r){var a=console[r];console[r]=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];o.leaveBreadcrumb("Console output",h(t,function(e,t,n){var r="[Unknown value]";try{r=String(t)}catch(a){}if("[object Object]"===r)try{r=JSON.stringify(t)}catch(a){}return e["["+n+"]"]=r,e},{severity:0===r.indexOf("group")?"log":r}),"log"),a.apply(console,t)},console[r]._restore=function(){console[r]=a}})}},Ue=p(["log","debug","info","warn","error"],function(e){return"undefined"!=typeof console&&"function"==typeof console[e]}),Xe=function(f,d){return void 0===f&&(f=document),void 0===d&&(d=window),{load:function(e){if(e._config.trackInlineScripts){var a=d.location.href,o="",i=!!f.attachEvent?"complete"===f.readyState:"loading"!==f.readyState,s=function(){return f.documentElement.outerHTML};o=s();var t=f.onreadystatechange;f.onreadystatechange=function(){"interactive"===f.readyState&&(o=s(),i=!0);try{t.apply(this,arguments)}catch(e){}};var n=null,u=function(e){n=e},c=function(){var e=f.currentScript||n;if(!e&&!i){var t=f.scripts||f.getElementsByTagName("script");e=t[t.length-1]}return e};e.addOnError(function(e){e.errors[0].stacktrace=p(e.errors[0].stacktrace,function(e){return!/__trace__$/.test(e.method)});var t=e.errors[0].stacktrace[0];if(!t||!t.file||t.file.replace(/#.*$/,"")===a.replace(/#.*$/,"")){var n=c();if(n){var r=n.innerHTML;e.addMetadata("script","content",r.length<=5e5?r:r.substr(0,5e5)),t&&t.lineNumber&&(t.code=function(e){i&&o||(o=s());var t=["\x3c!-- DOC START --\x3e"].concat(o.split("\n")),n=e-1,r=Math.max(n-3,0),a=Math.min(n+3,t.length);return h(t.slice(r,a),function(e,t,n){return e[r+1+n]=t.length<=200?t:t.substr(0,200),e},{})}(t.lineNumber))}}},!0);var l=y(["setTimeout","setInterval","setImmediate","requestAnimationFrame"],function(e){return Je(d,e,function(e){return r(e,function(t){return{get:function(){return t[0]},replace:function(e){t[0]=e}}})})})[0];y(["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"],function(e){d[e]&&d[e].prototype&&Object.prototype.hasOwnProperty.call(d[e].prototype,"addEventListener")&&(Je(d[e].prototype,"addEventListener",function(e){return r(e,We)}),Je(d[e].prototype,"removeEventListener",function(e){return r(e,We,!0)}))})}function r(o,i,s){return void 0===s&&(s=!1),function(){var e=[].slice.call(arguments);try{var t=i(e),n=t.get();if(s&&o.apply(this,e),"function"!=typeof n)return o.apply(this,e);if(n.__trace__)t.replace(n.__trace__);else{var r=c();n.__trace__=function(){u(r),l(function(){u(null)},0);var e=n.apply(this,arguments);return u(null),e},n.__trace__.__trace__=n.__trace__,t.replace(n.__trace__)}}catch(a){}if(o.apply)return o.apply(this,e);switch(e.length){case 1:return o(e[0]);case 2:return o(e[0],e[1]);default:return o()}}}},configSchema:{trackInlineScripts:{validate:function(e){return!0===e||!1===e},defaultValue:function(){return!0},message:"should be true|false"}}}};function Je(e,t,n){var r=e[t];if(!r)return r;var a=n(r);return e[t]=a,r}function We(t){var n=!!t[1]&&"function"==typeof t[1].handleEvent;return{get:function(){return n?t[1].handleEvent:t[1]},replace:function(e){n?t[1].handleEvent=e:t[1]=e}}}var ze=function(i){return void 0===i&&(i=window),{load:function(a){"addEventListener"in i&&a._isBreadcrumbTypeEnabled("user")&&i.addEventListener("click",function(e){var t,n;try{t=Ge(e.target),n=function o(e,t){var n=[e.tagName];e.id&&n.push("#"+e.id);e.className&&e.className.length&&n.push("."+e.className.split(" ").join("."));if(!t.document.querySelectorAll||!Array.prototype.indexOf)return n.join("");try{if(1===t.document.querySelectorAll(n.join("")).length)return n.join("")}catch(a){return n.join("")}if(1<e.parentNode.childNodes.length){var r=Array.prototype.indexOf.call(e.parentNode.childNodes,e)+1;n.push(":nth-child("+r+")")}if(1===t.document.querySelectorAll(n.join("")).length)return n.join("");if(e.parentNode)return o(e.parentNode,t)+" > "+n.join("");return n.join("")}(e.target,i)}catch(r){n=t="[hidden]",a._logger.error("Cross domain error when tracking click event. See docs: https://tinyurl.com/yy3rn63z")}a.leaveBreadcrumb("UI click",{targetText:t,targetSelector:n},"user")},!0)}}},Ge=function(e){var t=e.textContent||e.innerText||"";return t||"submit"!==e.type&&"button"!==e.type||(t=e.value),function n(e,t){return e&&e.length<=t?e:e.slice(0,t-"(...)".length)+"(...)"}(t=t.replace(/^\s+|\s+$/g,""),140)};var Qe;Qe=function(r){void 0===r&&(r=window);var e={load:function(n){if("addEventListener"in r&&n._isBreadcrumbTypeEnabled("navigation")){var e=function(e){return function(){return n.leaveBreadcrumb(e,{},"navigation")}};r.addEventListener("pagehide",e("Page hidden"),!0),r.addEventListener("pageshow",e("Page shown"),!0),r.addEventListener("load",e("Page loaded"),!0),r.document.addEventListener("DOMContentLoaded",e("DOMContentLoaded"),!0),r.addEventListener("load",function(){return r.addEventListener("popstate",e("Navigated back"),!0)}),r.addEventListener("hashchange",function(e){var t=e.oldURL?{from:Ye(e.oldURL,r),to:Ye(e.newURL,r),state:et(r)}:{to:Ye(r.location.href,r)};n.leaveBreadcrumb("Hash changed",t,"navigation")},!0),r.history.replaceState&&Ze(n,r.history,"replaceState",r),r.history.pushState&&Ze(n,r.history,"pushState",r)}}};return e};var Ye=function(e,t){var n=t.document.createElement("A");return n.href=e,""+n.pathname+n.search+n.hash},Ze=function(u,c,l,f){var d=c[l];c[l]=function(e,t,n){var r,a,o,i,s;u.leaveBreadcrumb("History "+l,(a=e,o=t,i=n,s=Ye((r=f).location.href,r),{title:o,state:a,prevState:et(r),to:i||s,from:s}),"navigation"),"function"==typeof u.resetEventCount&&u.resetEventCount(),u._config.autoTrackSessions&&u.startSession(),d.apply(c,[e,t].concat(n!==undefined?n:[]))}},et=function(e){try{return e.history.state}catch(t){}},tt="request",nt="BS~~U",rt="BS~~M",at={load:function(t){var n=0;t.addOnError(function(e){if(n>=t._config.maxEvents)return!1;n++}),t.resetEventCount=function(){n=0}},configSchema:{maxEvents:{defaultValue:function(){return 10},message:"should be a positive integer ≤100",validate:function(e){return t(1,100)(e)}}}},ot={},it=(ot={load:function(e){e.addOnError(function(e){var t=h(e.errors,function(e,t){return e.concat(t.stacktrace)},[]);y(t,function(e){e.file=it(e.file)})})}})._strip=function(e){return"string"==typeof e?e.replace(/\?.*$/,"").replace(/#.*$/,""):e},st=function(e,t,n,r){e[0]||e.push({});var a=e[0];a.file||"string"!=typeof t||(a.file=t),!a.lineNumber&&ut(n)&&(a.lineNumber=n),a.columnNumber||(ut(r)?a.columnNumber=r:window.event&&ut(window.event.errorCharacter)&&(a.columnNumber=window.event.errorCharacter))},ut=function(e){return"number"==typeof e&&"NaN"!==String.call(e)},ct=function(t){return function(e){e.file!==t.toString()&&e.method&&(e.method=e.method.replace(/^\s+/,""))}},lt={},ft=m({},c.schema,f),dt={_client:null,createClient:function(e){"string"==typeof e&&(e={apiKey:e}),e||(e={});var t,n,r,a=[Ee,Ve(),(void 0===r&&(r=window),{load:function(e){e.addOnError(function(e){e.context===undefined&&(e.context=r.location.pathname)},!0)}}),(void 0===n&&(n=window),{load:function(e){e.addOnError(function(e){e.request&&e.request.url||(e.request=m({},e.request,{url:n.location.href}))},!0)}}),at,Fe,Ke,ot,(void 0===t&&(t=window),{load:function(c){if(c._config.autoDetectErrors&&c._config.enabledErrorTypes.unhandledExceptions){var l=t.onerror;t.onerror=function f(e,t,n,r,a){if(0===n&&/Script error\.?/.test(e))c._logger.warn("Ignoring cross-domain or eval script error. See docs: https://tinyurl.com/yy3rn63z");else{var o,i={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}};if(a)o=c.Event.create(a,!0,i,"window onerror",1),st(o.errors[0].stacktrace,t,n,r);else if("object"!=typeof e||null===e||t&&"string"==typeof t||n||r||a)o=c.Event.create(e,!0,i,"window onerror",1),st(o.errors[0].stacktrace,t,n,r);else{var s=e.type?"Event: "+e.type:"Error",u=e.message||e.detail||"";(o=c.Event.create({name:s,message:u},!0,i,"window onerror",1)).originalError=e,o.addMetadata("window onerror",{event:e,extraParameters:t})}c._notify(o)}"function"==typeof l&&l.apply(this,arguments)}}}}),function(e){void 0===e&&(e=window);var t={load:function(o){if(o._config.autoDetectErrors&&o._config.enabledErrorTypes.unhandledRejections){var n=function(e){var t=e.reason,n=!1;try{e.detail&&e.detail.reason&&(t=e.detail.reason,n=!0)}catch(a){}var r=o.Event.create(t,!1,{severity:"error",unhandled:!0,severityReason:{type:"unhandledPromiseRejection"}},"unhandledrejection handler",1,o._logger);n&&y(r.errors[0].stacktrace,ct(t)),o._notify(r,function(e){var t;A(e.originalError)&&!e.originalError.stack&&e.addMetadata("unhandledRejection handler",((t={})[Object.prototype.toString.call(e.originalError)]={name:e.originalError.name,message:e.originalError.message,code:e.originalError.code},t))})};"addEventListener"in e?e.addEventListener("unhandledrejection",n):e.onunhandledrejection=function(e,t){n({detail:{reason:e,promise:t}})},n}}};return t}(),Qe(),ze(),function(u,c){void 0===u&&(u=[]),void 0===c&&(c=window);var e={load:function(a){if(a._isBreadcrumbTypeEnabled("request")){var n=[a._config.endpoints.notify,a._config.endpoints.sessions].concat(u);!function e(){if("addEventListener"in c.XMLHttpRequest.prototype){var n=c.XMLHttpRequest.prototype.open;c.XMLHttpRequest.prototype.open=function(e,t){this[nt]=t,this[rt]=e,this["BS~~S"]&&(this.removeEventListener("load",r),this.removeEventListener("error",o)),this.addEventListener("load",r),this.addEventListener("error",o),this["BS~~S"]=!0,n.apply(this,arguments)}}}(),function t(){if("fetch"in c&&!c.fetch.polyfill){var o=c.fetch;c.fetch=function(){var r,e=arguments,t=arguments[0],n=arguments[1],a=null;return t&&"object"==typeof t?(a=t.url,n&&"method"in n?r=n.method:t&&"method"in t&&(r=t.method)):(a=t,n&&"method"in n&&(r=n.method)),r===undefined&&(r="GET"),new Promise(function(t,n){o.apply(void 0,e).then(function(e){i(e,r,a),t(e)})["catch"](function(e){s(r,a),n(e)})})}}}();var i=function(e,t,n){var r={status:e.status,request:t+" "+n};400<=e.status?a.leaveBreadcrumb("fetch() failed",r,tt):a.leaveBreadcrumb("fetch() succeeded",r,tt)},s=function(e,t){a.leaveBreadcrumb("fetch() error",{request:e+" "+t},tt)}}function r(){var e=this[nt];if(e!==undefined){if("string"!=typeof e||!v(n,e.replace(/\?.*$/,""))){var t={status:this.status,request:this[rt]+" "+this[nt]};400<=this.status?a.leaveBreadcrumb("XMLHttpRequest failed",t,tt):a.leaveBreadcrumb("XMLHttpRequest succeeded",t,tt)}}else a._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.")}function o(){var e=this[nt];e!==undefined?"string"==typeof e&&v(n,e.replace(/\?.*$/,""))||a.leaveBreadcrumb("XMLHttpRequest error",{request:this[rt]+" "+this[nt]},tt):a._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.")}}};return e}(),$e,Xe()],o=new ge(e,ft,a,{name:"Bugsnag JavaScript",version:"7.16.0",url:"https://github.com/bugsnag/bugsnag-js"});return o._setDelivery(window.XDomainRequest?me:_e),o._logger.debug("Loaded!"),o.leaveBreadcrumb("Bugsnag loaded",{},"state"),o._config.autoTrackSessions?o.startSession():o},start:function(e){return dt._client?dt._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."):dt._client=dt.createClient(e),dt._client}};return y(["resetEventCount"].concat(u(ge.prototype)),function(t){/^_/.test(t)||(dt[t]=function(){if(!dt._client)return console.log("Bugsnag."+t+"() was called before Bugsnag.start()");dt._client._depth+=1;var e=dt._client[t].apply(dt._client,arguments);return dt._client._depth-=1,e})}),(lt=dt).Client=ge,lt.Event=J,lt.Session=ce,lt.Breadcrumb=b,lt["default"]=dt,lt});
//# sourceMappingURL=bugsnag.min.js.map
{
"name": "@bugsnag/browser",
"version": "7.15.1",
"version": "7.16.0",
"main": "dist/bugsnag.js",

@@ -35,19 +35,19 @@ "types": "types/bugsnag.d.ts",

"@bugsnag/core": "^7.0.1",
"@bugsnag/delivery-x-domain-request": "^7.15.1",
"@bugsnag/delivery-xml-http-request": "^7.15.1",
"@bugsnag/plugin-app-duration": "^7.15.1",
"@bugsnag/plugin-browser-context": "^7.15.1",
"@bugsnag/plugin-browser-device": "^7.15.1",
"@bugsnag/plugin-browser-request": "^7.15.1",
"@bugsnag/plugin-browser-session": "^7.15.1",
"@bugsnag/plugin-client-ip": "^7.15.1",
"@bugsnag/plugin-console-breadcrumbs": "^7.15.1",
"@bugsnag/plugin-inline-script-content": "^7.15.1",
"@bugsnag/plugin-interaction-breadcrumbs": "^7.15.1",
"@bugsnag/plugin-navigation-breadcrumbs": "^7.15.1",
"@bugsnag/plugin-network-breadcrumbs": "^7.15.1",
"@bugsnag/plugin-simple-throttle": "^7.15.1",
"@bugsnag/plugin-strip-query-string": "^7.15.1",
"@bugsnag/plugin-window-onerror": "^7.15.1",
"@bugsnag/plugin-window-unhandled-rejection": "^7.15.1",
"@bugsnag/delivery-x-domain-request": "^7.16.0",
"@bugsnag/delivery-xml-http-request": "^7.16.0",
"@bugsnag/plugin-app-duration": "^7.16.0",
"@bugsnag/plugin-browser-context": "^7.16.0",
"@bugsnag/plugin-browser-device": "^7.16.0",
"@bugsnag/plugin-browser-request": "^7.16.0",
"@bugsnag/plugin-browser-session": "^7.16.0",
"@bugsnag/plugin-client-ip": "^7.16.0",
"@bugsnag/plugin-console-breadcrumbs": "^7.16.0",
"@bugsnag/plugin-inline-script-content": "^7.16.0",
"@bugsnag/plugin-interaction-breadcrumbs": "^7.16.0",
"@bugsnag/plugin-navigation-breadcrumbs": "^7.16.0",
"@bugsnag/plugin-network-breadcrumbs": "^7.16.0",
"@bugsnag/plugin-simple-throttle": "^7.16.0",
"@bugsnag/plugin-strip-query-string": "^7.16.0",
"@bugsnag/plugin-window-onerror": "^7.16.0",
"@bugsnag/plugin-window-unhandled-rejection": "^7.16.0",
"cloudfront": "^0.4.1",

@@ -59,5 +59,5 @@ "knox": "^0.9.2",

"dependencies": {
"@bugsnag/core": "^7.15.1"
"@bugsnag/core": "^7.16.0"
},
"gitHead": "bc9e184988aad3d793b6f0abe2e7be9e69c821bd"
"gitHead": "15164a6fd606169f481f8105f5f7f2e8c1d57714"
}

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

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