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

@bugsnag/browser

Package Overview
Dependencies
Maintainers
10
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.16.2 to 7.16.5

2

dist/bugsnag.min.js

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

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

@@ -47,3 +47,3 @@ "types": "types/bugsnag.d.ts",

"@bugsnag/plugin-network-breadcrumbs": "^7.16.1",
"@bugsnag/plugin-simple-throttle": "^7.16.1",
"@bugsnag/plugin-simple-throttle": "^7.16.5",
"@bugsnag/plugin-strip-query-string": "^7.16.1",

@@ -60,3 +60,3 @@ "@bugsnag/plugin-window-onerror": "^7.16.1",

},
"gitHead": "58c0ade57fa1ada78ce3dd912022f3e15b326fc7"
"gitHead": "8f5b22bba5082736b0bce814f5ab2318f6c16484"
}

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