(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4780],{96829:function(e){e.exports=function(){var e,t,n,r,o=["navigation","request","process","log","user","state","error","manual"],a=function(e,t,n){for(var r=n,o=0,a=e.length;o<a;o++)r=t(r,e[o],o,e);return r},i=function(e,t){return a(e,function(e,n,r,o){return t(n,r,o)?e.concat(n):e},[])},s=function(e,t){return a(e,function(e,n,r,o){return!0===e||n===t},!1)},u=function(e){return"[object Array]"===Object.prototype.toString.call(e)},c=!({toString:null}).propertyIsEnumerable("toString"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],d=function(e){var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);if(!c)return n;for(var r=0,o=l.length;r<o;r++)Object.prototype.hasOwnProperty.call(e,l[r])&&n.push(l[r]);return n},f=function(e,t){return void 0===e&&(e=1),void 0===t&&(t=1/0),function(n){return"number"==typeof n&&parseInt(""+n,10)===n&&n>=e&&n<=t}},h=function(e){return"function"==typeof e||u(e)&&i(e,function(e){return"function"==typeof e}).length===e.length},g=function(e){return"string"==typeof e&&!!e.length},p={},v=function(){return{unhandledExceptions:!0,unhandledRejections:!0}};p.schema={apiKey:{defaultValue:function(){return null},message:"is required",validate:g},appVersion:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||g(e)}},appType:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||g(e)}},autoDetectErrors:{defaultValue:function(){return!0},message:"should be true|false",validate:function(e){return!0===e||!1===e}},enabledErrorTypes:{defaultValue:function(){return v()},message:"should be an object containing the flags { unhandledExceptions:true|false, unhandledRejections:true|false }",allowPartialObject:!0,validate:function(e){if("object"!=typeof e||!e)return!1;var t=d(e),n=d(v());return!(i(t,function(e){return s(n,e)}).length<t.length)&&!(i(d(e),function(t){return"boolean"!=typeof e[t]}).length>0)}},onError:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:h},onSession:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:h},onBreadcrumb:{defaultValue:function(){return[]},message:"should be a function or array of functions",validate:h},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&&g(e.notify)&&g(e.sessions)&&0===i(d(e),function(e){return!s(["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||u(e)&&i(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 f(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||u(e)&&a(e,function(e,t){return!1===e?e:s(o,t)},!0)}},context:{defaultValue:function(){},message:"should be a string",validate:function(e){return void 0===e||"string"==typeof e}},user:{defaultValue:function(){return{}},message:"should be an object with { id, email, name } properties",validate:function(e){return null===e||e&&a(d(e),function(e,t){return e&&s(["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(){},message:"should be null or an object with methods { debug, info, warn, error }",validate:function(e){return!e||e&&a(["debug","info","warn","error"],function(t,n){return t&&"function"==typeof e[n]},!0)}},redactedKeys:{defaultValue:function(){return["password"]},message:"should be an array of strings|regexes",validate:function(e){return u(e)&&e.length===i(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 u(e)&&e.length===i(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,t){return a(e,function(e,n,r,o){return e.concat(t(n,r,o))},[])};function b(){return(b=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 _=p.schema,S={releaseStage:m({},_.releaseStage,{defaultValue:function(){return/^localhost(:\d+)?$/.test(window.location.host)?"development":"production"}}),appType:b({},_.appType,{defaultValue:function(){return"browser"}}),logger:m({},_.logger,{defaultValue:function(){return"undefined"!=typeof console&&"function"==typeof console.debug?w():void 0}})},w=function(){var e={},t=console.log;return y(["debug","info","warn","error"],function(n){var r=console[n];e[n]="function"==typeof r?r.bind(console,"[bugsnag]"):t.bind(console,"[bugsnag]")}),e},E=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}(),O={};e=function(){"use strict";function e(e){return!isNaN(parseFloat(e))&&isFinite(e)}function t(e){return e.charAt(0).toUpperCase()+e.substring(1)}function n(e){return function(){return this[e]}}var r=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],a=["fileName","functionName","source"],i=r.concat(o,a,["args"]);function s(e){if(e instanceof Object)for(var n=0;n<i.length;n++)e.hasOwnProperty(i[n])&&void 0!==e[i[n]]&&this["set"+t(i[n])](e[i[n]])}s.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw 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)this.evalOrigin=new s(e);else throw TypeError("Eval Origin must be an Object or StackFrame")},toString:function(){return(this.getFunctionName()||"{anonymous}")+"("+(this.getArgs()||[]).join(",")+")"+(this.getFileName()?"@"+this.getFileName():"")+(e(this.getLineNumber())?":"+this.getLineNumber():"")+(e(this.getColumnNumber())?":"+this.getColumnNumber():"")}};for(var u=0;u<r.length;u++)s.prototype["get"+t(r[u])]=n(r[u]),s.prototype["set"+t(r[u])]=function(e){return function(t){this[e]=!!t}}(r[u]);for(var c=0;c<o.length;c++)s.prototype["get"+t(o[c])]=n(o[c]),s.prototype["set"+t(o[c])]=function(t){return function(n){if(!e(n))throw TypeError(t+" must be a Number");this[t]=Number(n)}}(o[c]);for(var l=0;l<a.length;l++)s.prototype["get"+t(a[l])]=n(a[l]),s.prototype["set"+t(a[l])]=function(e){return function(t){this[e]=String(t)}}(a[l]);return s},"function"==typeof r&&r.amd?r("stackframe",[],e):"object"==typeof O?O=e():this.StackFrame=e();var k={};t=function(e){"use strict";var t=/(^|@)\S+\:\d+/,n=/^\s*at .*(\S+\:\d+|\(native\))/m,r=/^(eval@)?(\[native code\])?$/;return{parse:function(e){if(void 0!==e.stacktrace||void 0!==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 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]||void 0,t[3]||void 0]},parseV8OrIE:function(t){return t.stack.split("\n").filter(function(e){return!!e.match(n)},this).map(function(t){t.indexOf("(eval ")>-1&&(t=t.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var n=t.replace(/^\s+/,"").replace(/\(eval code/g,"("),r=n.match(/ (\((.+):(\d+):(\d+)\)$)/),o=(n=r?n.replace(r[0],""):n).split(/\s+/).slice(1),a=this.extractLocation(r?r[1]:o.pop());return new e({functionName:o.join(" ")||void 0,fileName:["eval","<anonymous>"].indexOf(a[0])>-1?void 0:a[0],lineNumber:a[1],columnNumber:a[2],source:t})},this)},parseFFOrSafari:function(t){return t.stack.split("\n").filter(function(e){return!e.match(r)},this).map(function(t){if(t.indexOf(" > eval")>-1&&(t=t.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),-1===t.indexOf("@")&&-1===t.indexOf(":"))return new e({functionName:t});var n=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=t.match(n),o=r&&r[1]?r[1]:void 0,a=this.extractLocation(t.replace(n,""));return new e({functionName:o,fileName:a[0],lineNumber:a[1],columnNumber:a[2],source:t})},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)/i,r=t.message.split("\n"),o=[],a=2,i=r.length;a<i;a+=2){var s=n.exec(r[a]);s&&o.push(new e({fileName:s[2],lineNumber:s[1],source:r[a]}))}return o},parseOpera10:function(t){for(var n=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=t.stacktrace.split("\n"),o=[],a=0,i=r.length;a<i;a+=2){var s=n.exec(r[a]);s&&o.push(new e({functionName:s[3]||void 0,fileName:s[2],lineNumber:s[1],source:r[a]}))}return o},parseOpera11:function(n){return n.stack.split("\n").filter(function(e){return!!e.match(t)&&!e.match(/^Error created at/)},this).map(function(t){var n,r=t.split("@"),o=this.extractLocation(r.pop()),a=r.shift()||"",i=a.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0;return a.match(/\(([^\)]*)\)/)&&(n=a.replace(/^[^\(]+\(([^\)]*)\)$/,"$1")),new e({functionName:i,args:void 0===n||"[arguments not available]"===n?void 0:n.split(","),fileName:o[0],lineNumber:o[1],columnNumber:o[2],source:t})},this)}}},"function"==typeof r&&r.amd?r("error-stack-parser",["stackframe"],t):"object"==typeof k?k=t(O):this.ErrorStackParser=t(this.StackFrame);var j=k,N=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},R=function(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}},B=function(e,t,n){if("string"==typeof t){if(!n){delete e[t];return}e[t]&&delete e[t][n]}},x={add:function(e,t,n,r){var o,a;if(t){if(null===n)return B(e,t);"object"==typeof n&&(a=n),"string"==typeof n&&((o={})[n]=r,a=o),a&&(e[t]||(e[t]={}),e[t]=m({},e[t],a))}},get:function(e,t,n){if("string"==typeof t){if(!n)return e[t];if(e[t])return e[t][n]}},clear:B},T={};n=function(e){return{backtrace:function(t){var n=[],r=10;"object"==typeof t&&"number"==typeof t.maxStackSize&&(r=t.maxStackSize);for(var o=arguments.callee;o&&n.length<r&&o.arguments;){for(var a=Array(o.arguments.length),i=0;i<a.length;++i)a[i]=o.arguments[i];/function(?:\s+([\w$]+))+\s*\(/.test(o.toString())?n.push(new e({functionName:RegExp.$1||void 0,args:a})):n.push(new e({args:a}));try{o=o.caller}catch(e){break}}return n}}},"function"==typeof r&&r.amd?r("stack-generator",["stackframe"],n):"object"==typeof T?T=n(O):this.StackGenerator=n(this.StackFrame);var L=function(){function e(t,n,r,o,i){void 0===r&&(r=[]),void 0===o&&(o=M()),this.apiKey=void 0,this.context=void 0,this.groupingHash=void 0,this.originalError=i,this._handledState=o,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=void 0,this.errors=[{errorClass:D(t),errorMessage:D(n),type:e.__type,stacktrace:a(r,function(e,t){var n=C(t);try{if("{}"===JSON.stringify(n))return e;return e.concat(n)}catch(t){return e}},[])}]}var t=e.prototype;return t.addMetadata=function(e,t,n){return x.add(this._metadata,e,t,n)},t.getMetadata=function(e,t){return x.get(this._metadata,e,t)},t.clearMetadata=function(e,t){return x.clear(this._metadata,e,t)},t.getUser=function(){return this._user},t.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},t.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}},e}(),C=function(e){var t={file:e.fileName,method:q(e.functionName),lineNumber:e.lineNumber,columnNumber:e.columnNumber,code:void 0,inProject:void 0};return!(t.lineNumber>-1)||t.file||t.method||(t.file="global code"),t},q=function(e){return/^global code$/i.test(e)?"global code":e},M=function(){return{unhandled:!1,severity:"warning",severityReason:{type:"handledException"}}},D=function(e){return"string"==typeof e?e:""};L.getStacktrace=function(e,t,n){if(N(e))return j.parse(e).slice(t);try{return i(T.backtrace(),function(e){return -1===(e.functionName||"").indexOf("StackGenerator$$")}).slice(1+n)}catch(e){return[]}},L.create=function(e,t,n,r,o,a){void 0===o&&(o=0);var i,s=A(e,t,r,a),u=s[0],c=s[1];try{var l=L.getStacktrace(u,c>0?1+c+o:0,1+o);i=new L(u.name,u.message,l,n,e)}catch(t){i=new L(u.name,u.message,[],n,e)}return"InvalidError"===u.name&&i.addMetadata(""+r,"non-error parameter",P(e)),i};var P=function(e){return null===e?"null":void 0===e?"undefined":e},A=function(e,t,n,r){var o,a=0,i=function(e){r&&r.warn(n+' received a non-error: "'+e+'"');var t=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=Error(String(e)),a+=1;break;case"function":o=i("function"),a+=2;break;case"object":null!==e&&R(e)?o=e:null!==e&&V(e)?((o=Error(e.message||e.errorMessage)).name=e.name||e.errorClass,a+=1):(o=i(null===e?"null":"unsupported object"),a+=2);break;default:o=i("nothing"),a+=2}else R(e)?o=e:(o=i(typeof e),a+=2);if(!N(o))try{throw o}catch(e){N(e)&&(o=e,a=1)}return[o,a]};L.__type="browserjs";var V=function(e){return("string"==typeof e.name||"string"==typeof e.errorClass)&&("string"==typeof e.message||"string"==typeof e.errorMessage)},I=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):void(r++,o())})};o()},H=function(e,t,n,r){I(e,function(e,r){if("function"!=typeof e)return r(null);try{if(2!==e.length){var o=e(t);if(o&&"function"==typeof o.then)return o.then(function(e){return setTimeout(function(){return r(null,e)})},function(e){setTimeout(function(){return n(e),r(null,!0)})});return r(null,o)}e(t,function(e,t){if(e)return n(e),r(null);r(null,t)})}catch(e){n(e),r(null)}},r)},K=function(e,t,n,r){for(var o=!1,a=e.slice();!o&&a.length;)try{o=!1===a.pop()(t)}catch(e){r.error("Error occurred in "+n+" callback, continuing anyway…"),r.error(e)}return o},$=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},U="object"==typeof window?window:self,X=0;for(var F in U)Object.hasOwnProperty.call(U,F)&&X++;var J=$(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+X.toString(36),4),z=function(){return J},W=0;function G(){return $((1679616*Math.random()<<0).toString(36),4)}function Q(){return"c"+new Date().getTime().toString(36)+$((W=W<1679616?W:0,++W-1).toString(36),4)+z()+(G()+G())}Q.fingerprint=z;var Y=function(){function e(){this.id=Q(),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}(),Z=function(){},ee=function(){function e(t,n,r,o){var a=this;void 0===n&&(n=p.schema),void 0===r&&(r=[]),this._notifier=o,this._config={},this._schema=n,this._delivery={sendSession:Z,sendEvent:Z},this._logger={debug:Z,info:Z,warn:Z,error:Z},this._plugins={},this._breadcrumbs=[],this._session=null,this._metadata={},this._context=void 0,this._user={},this._cbs={e:[],s:[],sp:[],b:[]},this.Client=e,this.Event=L,this.Breadcrumb=E,this.Session=Y,this._config=this._configure(t,r),y(r.concat(this._config.plugins),function(e){e&&a._loadPlugin(e)}),this._depth=1;var i=this,s=this.notify;this.notify=function(){return s.apply(i,arguments)}}var t=e.prototype;return t.addMetadata=function(e,t,n){return x.add(this._metadata,e,t,n)},t.getMetadata=function(e,t){return x.get(this._metadata,e,t)},t.clearMetadata=function(e,t){return x.clear(this._metadata,e,t)},t.getContext=function(){return this._context},t.setContext=function(e){this._context=e},t._configure=function(e,t){var n=a(t,function(e,t){return t&&t.configSchema?m({},e,t.configSchema):e},this._schema),r=a(d(n),function(t,r){var o=n[r].defaultValue(e[r]);return void 0!==e[r]?n[r].validate(e[r])?n[r].allowPartialObject?t.config[r]=m(o,e[r]):t.config[r]=e[r]:(t.errors[r]=n[r].message,t.config[r]=o):t.config[r]=o,t},{errors:{},config:{}}),o=r.errors,i=r.config;if(n.apiKey){if(!i.apiKey)throw Error("No Bugsnag API Key set");/^[0-9a-f]{32}$/i.test(i.apiKey)||(o.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)),d(o).length&&this._logger.warn(et(o,e)),i},t.getUser=function(){return this._user},t.setUser=function(e,t,n){this._user={id:e,email:t,name:n}},t._loadPlugin=function(e){var t=e.load(this);return e.name&&(this._plugins["~"+e.name+"~"]=t),this},t.getPlugin=function(e){return this._plugins["~"+e+"~"]},t._setDelivery=function(e){this._delivery=e(this)},t.startSession=function(){var e=new Y;return(e.app.releaseStage=this._config.releaseStage,e.app.version=this._config.appVersion,e.app.type=this._config.appType,e._user=m({},this._user),K(this._cbs.s,e,"onSession",this._logger))?(this._logger.debug("Session not started due to onSession callback"),this):this._sessionDelegate.startSession(this,e)},t.addOnError=function(e,t){void 0===t&&(t=!1),this._cbs.e[t?"unshift":"push"](e)},t.removeOnError=function(e){this._cbs.e=i(this._cbs.e,function(t){return t!==e})},t._addOnSessionPayload=function(e){this._cbs.sp.push(e)},t.addOnSession=function(e){this._cbs.s.push(e)},t.removeOnSession=function(e){this._cbs.s=i(this._cbs.s,function(t){return t!==e})},t.addOnBreadcrumb=function(e,t){void 0===t&&(t=!1),this._cbs.b[t?"unshift":"push"](e)},t.removeOnBreadcrumb=function(e){this._cbs.b=i(this._cbs.b,function(t){return t!==e})},t.pauseSession=function(){return this._sessionDelegate.pauseSession(this)},t.resumeSession=function(){return this._sessionDelegate.resumeSession(this)},t.leaveBreadcrumb=function(e,t,n){if(e="string"==typeof e?e:"",n="string"==typeof n&&s(o,n)?n:"manual",t="object"==typeof t&&null!==t?t:{},e){var r=new E(e,t,n);if(K(this._cbs.b,r,"onBreadcrumb",this._logger)){this._logger.debug("Breadcrumb not attached due to onBreadcrumb callback");return}this._breadcrumbs.push(r),this._breadcrumbs.length>this._config.maxBreadcrumbs&&(this._breadcrumbs=this._breadcrumbs.slice(this._breadcrumbs.length-this._config.maxBreadcrumbs))}},t._isBreadcrumbTypeEnabled=function(e){var t=this._config.enabledBreadcrumbTypes;return null===t||s(t,e)},t.notify=function(e,t,n){void 0===n&&(n=Z);var r=L.create(e,!0,void 0,"notify()",this._depth+1,this._logger);this._notify(r,t,n)},t._notify=function(t,n,r){var o=this;if(void 0===r&&(r=Z),t.app=m({},t.app,{releaseStage:this._config.releaseStage,version:this._config.appVersion,type:this._config.appType}),t.context=t.context||this._context,t._metadata=m({},t._metadata,this._metadata),t._user=m({},t._user,this._user),t.breadcrumbs=this._breadcrumbs.slice(),null!==this._config.enabledReleaseStages&&!s(this._config.enabledReleaseStages,this._config.releaseStage))return this._logger.warn("Event not sent due to releaseStage/enabledReleaseStages configuration"),r(null,t);var a=t.severity,i=function(e){o._logger.error("Error occurred in onError callback, continuing anyway…"),o._logger.error(e)};H([].concat(this._cbs.e).concat(n),t,i,function(n,s){if(n&&i(n),!s)return o._logger.debug("Event not sent due to onError callback"),r(null,t);o._isBreadcrumbTypeEnabled("error")&&e.prototype.leaveBreadcrumb.call(o,t.errors[0].errorClass,{errorClass:t.errors[0].errorClass,errorMessage:t.errors[0].errorMessage,severity:t.severity},"error"),a!==t.severity&&(t._handledState.severityReason={type:"userCallbackSetSeverity"}),t.unhandled!==t._handledState.unhandled&&(t._handledState.severityReason.unhandledOverridden=!0,t._handledState.unhandled=t.unhandled),o._session&&(o._session._track(t),t._session=o._session),o._delivery.sendEvent({apiKey:t.apiKey||o._config.apiKey,notifier:o._notifier,events:[t]},function(e){return r(e,t)})})},e}(),et=function(e,t){return Error("Invalid configuration\n"+y(d(e),function(n){return"  - "+n+" "+e[n]+", got "+en(t[n])}).join("\n\n"))},en=function(e){switch(typeof e){case"string":case"number":case"object":return JSON.stringify(e);default:return String(e)}},er=function(e,t,n,r){var o,a,i,s;return JSON.stringify((o=r&&r.redactedKeys?r.redactedKeys:[],a=r&&r.redactedPaths?r.redactedPaths:[],i=[],s=0,function e(t,n){function r(){return n.length>8&&s>25e3}if(s++,n.length>20||r())return"...";if(null===t||"object"!=typeof t)return t;if(function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return!0;return!1}(i,t))return"[Circular]";if(i.push(t),"function"==typeof t.toJSON)try{s--;var u=e(t.toJSON(),n);return i.pop(),u}catch(e){return eo(e)}if(t instanceof Error||/^\[object (Error|(Dom)?Exception)\]$/.test(Object.prototype.toString.call(t))){s--;var c=e({name:t.name,message:t.message},n);return i.pop(),c}if("[object Array]"===Object.prototype.toString.call(t)){for(var l=[],d=0,f=t.length;d<f;d++){if(r()){l.push("...");break}l.push(e(t[d],n.concat("[]")))}return i.pop(),l}var h={};try{for(var g in t)if(Object.prototype.hasOwnProperty.call(t,g)){if(function(e,t){for(var n=0,r=e.length;n<r;n++)if(0===t.indexOf(e[n]))return!0;return!1}(a,n.join("."))&&function(e,t){for(var n=0,r=e.length;n<r;n++)if("string"==typeof e[n]&&e[n].toLowerCase()===t.toLowerCase()||e[n]&&"function"==typeof e[n].test&&e[n].test(t))return!0;return!1}(o,g)){h[g]="[REDACTED]";continue}if(r()){h[g]="...";break}h[g]=e(function(e,t){try{return e[t]}catch(e){return eo(e)}}(t,g),n.concat(g))}}catch(e){}return i.pop(),h}(e,[])),t,n)};function eo(e){return"[Throws: "+(e?e.message:"?")+"]"}var ea={},ei=["events.[].metaData","events.[].breadcrumbs.[].metaData","events.[].request"];ea.event=function(e,t){var n=er(e,null,null,{redactedPaths:ei,redactedKeys:t});if(n.length>1e6&&(e.events[0]._metadata={notifier:"WARNING!\nSerialized payload was "+n.length/1e6+"MB (limit = 1MB)\nmetadata was removed"},(n=er(e,null,null,{redactedPaths:ei,redactedKeys:t})).length>1e6))throw Error("payload exceeded 1MB limit");return n},ea.session=function(e,t){var n=er(e,null,null);if(n.length>1e6)throw Error("payload exceeded 1MB limit");return n};var es={},eu=function(e,t,n,r){var o=JSON.parse(JSON.stringify(new Date));return ec(e.endpoints[t],r.location.protocol)+"?apiKey="+encodeURIComponent(e.apiKey)+"&payloadVersion="+n+"&sentAt="+encodeURIComponent(o)},ec=(es=function(e,t){return void 0===t&&(t=window),{sendEvent:function(n,r){void 0===r&&(r=function(){});var o=eu(e._config,"notify","4",t),a=new t.XDomainRequest;a.onload=function(){r(null)},a.open("POST",o),setTimeout(function(){try{a.send(ea.event(n,e._config.redactedKeys))}catch(t){e._logger.error(t),r(t)}},0)},sendSession:function(n,r){void 0===r&&(r=function(){});var o=eu(e._config,"sessions","1",t),a=new t.XDomainRequest;a.onload=function(){r(null)},a.open("POST",o),setTimeout(function(){try{a.send(ea.session(n,e._config.redactedKeys))}catch(t){e._logger.error(t),r(t)}},0)}}})._matchPageProtocol=function(e,t){return"http:"===t?e.replace(/^https:/,"http:"):e},el=function(e,t){return void 0===t&&(t=window),{sendEvent:function(n,r){void 0===r&&(r=function(){});try{var o=e._config.endpoints.notify,a=new t.XMLHttpRequest;a.onreadystatechange=function(){a.readyState===t.XMLHttpRequest.DONE&&r(null)},a.open("POST",o),a.setRequestHeader("Content-Type","application/json"),a.setRequestHeader("Bugsnag-Api-Key",n.apiKey||e._config.apiKey),a.setRequestHeader("Bugsnag-Payload-Version","4"),a.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),a.send(ea.event(n,e._config.redactedKeys))}catch(t){e._logger.error(t)}},sendSession:function(n,r){void 0===r&&(r=function(){});try{var o=e._config.endpoints.sessions,a=new t.XMLHttpRequest;a.onreadystatechange=function(){a.readyState===t.XMLHttpRequest.DONE&&r(null)},a.open("POST",o),a.setRequestHeader("Content-Type","application/json"),a.setRequestHeader("Bugsnag-Api-Key",e._config.apiKey),a.setRequestHeader("Bugsnag-Payload-Version","1"),a.setRequestHeader("Bugsnag-Sent-At",new Date().toISOString()),a.send(ea.session(n,e._config.redactedKeys))}catch(t){e._logger.error(t)}}}},ed=new Date,ef=function(){ed=new Date},eh={name:"appDuration",load:function(e){return e.addOnError(function(e){var t=new Date;e.app.duration=t-ed},!0),{reset:ef}}},eg=function(e,t){var n="000000000"+e;return n.substr(n.length-t)},ep="object"==typeof window?window:self,ev=0;for(var em in ep)Object.hasOwnProperty.call(ep,em)&&ev++;var ey=eg(((navigator.mimeTypes?navigator.mimeTypes.length:0)+navigator.userAgent.length).toString(36)+ev.toString(36),4),eb=function(){return ey},e_=0;function eS(){return eg((1679616*Math.random()<<0).toString(36),4)}function ew(){return"c"+new Date().getTime().toString(36)+eg((e_=e_<1679616?e_:0,++e_-1).toString(36),4)+eb()+(eS()+eS())}ew.fingerprint=eb;var eE="bugsnag-anonymous-id",eO=function(){try{var e=window.localStorage,t=e.getItem(eE);if(t&&/^c[a-z0-9]{20,32}$/.test(t))return t;return t=ew(),e.setItem(eE,t),t}catch(e){}},ek=function(e){var t=e.getUser();t&&t.id||e.setUser(e.device.id)},ej={load:function(e){e._sessionDelegate=eN}},eN={startSession:function(e,t){return(e._session=t,e._pausedSession=null,null===e._config.enabledReleaseStages||s(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}},eR={load:function(e){e._config.collectUserIp||e.addOnError(function(e){e._user&&void 0===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}}}},eB={};eB.load=function(e){!/^(local-)?dev(elopment)?$/.test(e._config.releaseStage)&&e._isBreadcrumbTypeEnabled("log")&&y(ex,function(t){var n=console[t];console[t]=function(){for(var r=arguments.length,o=Array(r),i=0;i<r;i++)o[i]=arguments[i];e.leaveBreadcrumb("Console output",a(o,function(e,t,n){var r="[Unknown value]";try{r=String(t)}catch(e){}if("[object Object]"===r)try{r=JSON.stringify(t)}catch(e){}return e["["+n+"]"]=r,e},{severity:0===t.indexOf("group")?"log":t}),"log"),n.apply(console,o)},console[t]._restore=function(){console[t]=n}})};var ex=i(["log","debug","info","warn","error"],function(e){return"undefined"!=typeof console&&"function"==typeof console[e]});function eT(e,t,n){var r=e[t];if(!r)return r;var o=n(r);return e[t]=o,r}function eL(e){var t=!!e[1]&&"function"==typeof e[1].handleEvent;return{get:function(){return t?e[1].handleEvent:e[1]},replace:function(n){t?e[1].handleEvent=n:e[1]=n}}}var eC=function(e){var t,n,r=e.textContent||e.innerText||"";return r||"submit"!==e.type&&"button"!==e.type||(r=e.value),t=r=r.replace(/^\s+|\s+$/g,""),n="(...)",t&&t.length<=140?t:t.slice(0,140-n.length)+n},eq={};eq=function(e){return void 0===e&&(e=window),{load:function(t){if("addEventListener"in e&&t._isBreadcrumbTypeEnabled("navigation")){var n=function(e){return function(){return t.leaveBreadcrumb(e,{},"navigation")}};e.addEventListener("pagehide",n("Page hidden"),!0),e.addEventListener("pageshow",n("Page shown"),!0),e.addEventListener("load",n("Page loaded"),!0),e.document.addEventListener("DOMContentLoaded",n("DOMContentLoaded"),!0),e.addEventListener("load",function(){return e.addEventListener("popstate",n("Navigated back"),!0)}),e.addEventListener("hashchange",function(n){var r=n.oldURL?{from:eM(n.oldURL,e),to:eM(n.newURL,e),state:eA(e)}:{to:eM(e.location.href,e)};t.leaveBreadcrumb("Hash changed",r,"navigation")},!0),e.history.replaceState&&eP(t,e.history,"replaceState",e),e.history.pushState&&eP(t,e.history,"pushState",e)}}}};var eM=function(e,t){var n=t.document.createElement("A");return n.href=e,""+n.pathname+n.search+n.hash},eD=function(e,t,n,r){var o=eM(e.location.href,e);return{title:n,state:t,prevState:eA(e),to:r||o,from:o}},eP=function(e,t,n,r){var o=t[n];t[n]=function(a,i,s){e.leaveBreadcrumb("History "+n,eD(r,a,i,s),"navigation"),"function"==typeof e.resetEventCount&&e.resetEventCount(),e._config.autoTrackSessions&&e.startSession(),o.apply(t,[a,i].concat(void 0!==s?s:[]))}},eA=function(e){try{return e.history.state}catch(e){}},eV="request",eI="BS~~S",eH="BS~~U",eK="BS~~M",e$={load:function(e){var t=0;e.addOnError(function(n){if(t>=e._config.maxEvents)return!1;t++}),e.resetEventCount=function(){t=0}},configSchema:{maxEvents:{defaultValue:function(){return 10},message:"should be a positive integer ≤100",validate:function(e){return f(1,100)(e)}}}},eU={},eX=(eU={load:function(e){e.addOnError(function(e){y(a(e.errors,function(e,t){return e.concat(t.stacktrace)},[]),function(e){e.file=eX(e.file)})})}})._strip=function(e){return"string"==typeof e?e.replace(/\?.*$/,"").replace(/#.*$/,""):e},eF=function(e,t,n,r){e[0]||e.push({});var o=e[0];o.file||"string"!=typeof t||(o.file=t),!o.lineNumber&&eJ(n)&&(o.lineNumber=n),!o.columnNumber&&(eJ(r)?o.columnNumber=r:window.event&&eJ(window.event.errorCharacter)&&(o.columnNumber=window.event.errorCharacter))},eJ=function(e){return"number"==typeof e&&"NaN"!==String.call(e)},ez={},eW=m({},p.schema,S),eG={_client:null,createClient:function(e){"string"==typeof e&&(e={apiKey:e}),e||(e={});var t,n,r,o,u,c,l,d,f,h,g,p=new ee(e,eW,[eh,(void 0===t&&(t=navigator),void 0===n&&(n=window.screen),{load:function(e){var r={locale:t.browserLanguage||t.systemLanguage||t.userLanguage||t.language,userAgent:t.userAgent};n&&n.orientation&&n.orientation.type?r.orientation=n.orientation.type:r.orientation=document.documentElement.clientWidth>document.documentElement.clientHeight?"landscape":"portrait",e._config.generateAnonymousId&&(r.id=eO()),e.addOnSession(function(t){t.device=m({},t.device,r),e._config.collectUserIp||ek(t)}),e.addOnError(function(t){t.device=m({},t.device,r,{time:new Date}),e._config.collectUserIp||ek(t)},!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){void 0===e.context&&(e.context=r.location.pathname)},!0)}}),(void 0===o&&(o=window),{load:function(e){e.addOnError(function(e){e.request&&e.request.url||(e.request=m({},e.request,{url:o.location.href}))},!0)}}),e$,ej,eR,eU,(void 0===u&&(u=window),{load:function(e){if(e._config.autoDetectErrors&&e._config.enabledErrorTypes.unhandledExceptions){var t=u.onerror;u.onerror=function(n,r,o,a,i){if(0===o&&/Script error\.?/.test(n))e._logger.warn("Ignoring cross-domain or eval script error. See docs: https://tinyurl.com/yy3rn63z");else{var s,u={severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}};if(i)eF((s=e.Event.create(i,!0,u,"window onerror",1)).errors[0].stacktrace,r,o,a);else if("object"!=typeof n||null===n||r&&"string"==typeof r||o||a||i)eF((s=e.Event.create(n,!0,u,"window onerror",1)).errors[0].stacktrace,r,o,a);else{var c=n.type?"Event: "+n.type:"Error",l=n.message||n.detail||"";(s=e.Event.create({name:c,message:l},!0,u,"window onerror",1)).originalError=n,s.addMetadata("window onerror",{event:n,extraParameters:r})}e._notify(s)}"function"==typeof t&&t.apply(this,arguments)}}}}),(void 0===c&&(c=window),{load:function(e){if(e._config.autoDetectErrors&&e._config.enabledErrorTypes.unhandledRejections){var t=function(t){var n,r=t.reason,o=!1;try{t.detail&&t.detail.reason&&(r=t.detail.reason,o=!0)}catch(e){}var a=e.Event.create(r,!1,{severity:"error",unhandled:!0,severityReason:{type:"unhandledPromiseRejection"}},"unhandledrejection handler",1,e._logger);o&&y(a.errors[0].stacktrace,(n=r,function(e){e.file!==n.toString()&&e.method&&(e.method=e.method.replace(/^\s+/,""))})),e._notify(a,function(e){if(R(e.originalError)&&!e.originalError.stack){var t;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 c?c.addEventListener("unhandledrejection",t):c.onunhandledrejection=function(e,n){t({detail:{reason:e,promise:n}})}}}}),eq(),(void 0===l&&(l=window),{load:function(e){"addEventListener"in l&&e._isBreadcrumbTypeEnabled("user")&&l.addEventListener("click",function(t){var n,r;try{n=eC(t.target),r=function e(t,n){var r=[t.tagName];if(t.id&&r.push("#"+t.id),t.className&&t.className.length&&r.push("."+t.className.split(" ").join(".")),!n.document.querySelectorAll||!Array.prototype.indexOf)return r.join("");try{if(1===n.document.querySelectorAll(r.join("")).length)return r.join("")}catch(e){return r.join("")}if(t.parentNode.childNodes.length>1){var o=Array.prototype.indexOf.call(t.parentNode.childNodes,t)+1;r.push(":nth-child("+o+")")}return 1===n.document.querySelectorAll(r.join("")).length?r.join(""):t.parentNode?e(t.parentNode,n)+" > "+r.join(""):r.join("")}(t.target,l)}catch(t){n="[hidden]",r="[hidden]",e._logger.error("Cross domain error when tracking click event. See docs: https://tinyurl.com/yy3rn63z")}e.leaveBreadcrumb("UI click",{targetText:n,targetSelector:r},"user")},!0)}}),(void 0===d&&(d=[]),void 0===f&&(f=window),{load:function(e){if(e._isBreadcrumbTypeEnabled("request")){var t=[e._config.endpoints.notify,e._config.endpoints.sessions].concat(d);(function(){if("addEventListener"in f.XMLHttpRequest.prototype){var e=f.XMLHttpRequest.prototype.open;f.XMLHttpRequest.prototype.open=function(t,n){this[eH]=n,this[eK]=t,this[eI]&&(this.removeEventListener("load",o),this.removeEventListener("error",a)),this.addEventListener("load",o),this.addEventListener("error",a),this[eI]=!0,e.apply(this,arguments)}}})(),function(){if("fetch"in f&&!f.fetch.polyfill){var e=f.fetch;f.fetch=function(){var t,o=arguments,a=arguments[0],i=arguments[1],s=null;return a&&"object"==typeof a?(s=a.url,i&&"method"in i?t=i.method:a&&"method"in a&&(t=a.method)):(s=a,i&&"method"in i&&(t=i.method)),void 0===t&&(t="GET"),new Promise(function(a,i){e.apply(void 0,o).then(function(e){n(e,t,s),a(e)}).catch(function(e){r(t,s),i(e)})})}}}();var n=function(t,n,r){var o={status:t.status,request:n+" "+r};t.status>=400?e.leaveBreadcrumb("fetch() failed",o,eV):e.leaveBreadcrumb("fetch() succeeded",o,eV)},r=function(t,n){e.leaveBreadcrumb("fetch() error",{request:t+" "+n},eV)}}function o(){if(void 0===this[eH]){e._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.");return}if(!s(t,this[eH].replace(/\?.*$/,""))){var n={status:this.status,request:this[eK]+" "+this[eH]};this.status>=400?e.leaveBreadcrumb("XMLHttpRequest failed",n,eV):e.leaveBreadcrumb("XMLHttpRequest succeeded",n,eV)}}function a(){if(void 0===this[eH]){e._logger.warn("The request URL is no longer present on this XMLHttpRequest. A breadcrumb cannot be left for this request.");return}s(t,this[eH].replace(/\?.*$/,""))||e.leaveBreadcrumb("XMLHttpRequest error",{request:this[eK]+" "+this[eH]},eV)}}}),eB,(void 0===h&&(h=document),void 0===g&&(g=window),{load:function(e){if(e._config.trackInlineScripts){var t=g.location.href,n="",r=h.attachEvent?"complete"===h.readyState:"loading"!==h.readyState,o=function(){return h.documentElement.outerHTML};n=o();var s=h.onreadystatechange;h.onreadystatechange=function(){"interactive"===h.readyState&&(n=o(),r=!0);try{s.apply(this,arguments)}catch(e){}};var u=null,c=function(e){u=e},l=function(){var e=h.currentScript||u;if(!e&&!r){var t=h.scripts||h.getElementsByTagName("script");e=t[t.length-1]}return e},d=function(e){r&&n||(n=o());var t=["<!-- DOC START -->"].concat(n.split("\n")),i=e-1,s=Math.max(i-3,0),u=Math.min(i+3,t.length);return a(t.slice(s,u),function(e,t,n){return e[s+1+n]=t.length<=200?t:t.substr(0,200),e},{})};e.addOnError(function(e){e.errors[0].stacktrace=i(e.errors[0].stacktrace,function(e){return!/__trace__$/.test(e.method)});var n=e.errors[0].stacktrace[0];if(!n||!n.file||n.file.replace(/#.*$/,"")===t.replace(/#.*$/,"")){var r=l();if(r){var o=r.innerHTML;e.addMetadata("script","content",o.length<=5e5?o:o.substr(0,5e5)),n&&n.lineNumber&&(n.code=d(n.lineNumber))}}},!0);var f=y(["setTimeout","setInterval","setImmediate","requestAnimationFrame"],function(e){return eT(g,e,function(e){return p(e,function(e){return{get:function(){return e[0]},replace:function(t){e[0]=t}}})})})[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){g[e]&&g[e].prototype&&Object.prototype.hasOwnProperty.call(g[e].prototype,"addEventListener")&&(eT(g[e].prototype,"addEventListener",function(e){return p(e,eL)}),eT(g[e].prototype,"removeEventListener",function(e){return p(e,eL,!0)}))})}function p(e,t,n){return void 0===n&&(n=!1),function(){var r=[].slice.call(arguments);try{var o=t(r),a=o.get();if(n&&e.apply(this,r),"function"!=typeof a)return e.apply(this,r);if(a.__trace__)o.replace(a.__trace__);else{var i=l();a.__trace__=function(){c(i),f(function(){c(null)},0);var e=a.apply(this,arguments);return c(null),e},a.__trace__.__trace__=a.__trace__,o.replace(a.__trace__)}}catch(e){}if(e.apply)return e.apply(this,r);switch(r.length){case 1:return e(r[0]);case 2:return e(r[0],r[1]);default:return e()}}}},configSchema:{trackInlineScripts:{validate:function(e){return!0===e||!1===e},defaultValue:function(){return!0},message:"should be true|false"}}})],{name:"Bugsnag JavaScript",version:"7.14.0",url:"https://github.com/bugsnag/bugsnag-js"});return p._setDelivery(window.XDomainRequest?es:el),p._logger.debug("Loaded!"),p.leaveBreadcrumb("Bugsnag loaded",{},"state"),p._config.autoTrackSessions?p.startSession():p},start:function(e){return eG._client?eG._client._logger.warn("Bugsnag.start() was called more than once. Ignoring."):eG._client=eG.createClient(e),eG._client}};return y(["resetEventCount"].concat(d(ee.prototype)),function(e){/^_/.test(e)||(eG[e]=function(){if(!eG._client)return console.log("Bugsnag."+e+"() was called before Bugsnag.start()");eG._client._depth+=1;var t=eG._client[e].apply(eG._client,arguments);return eG._client._depth-=1,t})}),(ez=eG).Client=ee,ez.Event=L,ez.Session=Y,ez.Breadcrumb=E,ez.default=eG,ez}()},73820:function(e,t,n){e.exports=n(96829)},65985:function(e){e.exports=function(){var e={};function t(){return(t=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)}function n(e,t){return(n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}e=function(){function e(){var e="undefined"!=typeof window&&window.React;if(this.name="react",this.lazy=0==arguments.length&&!e,!this.lazy&&(this.React=(arguments.length<=0?void 0:arguments[0])||e,!this.React))throw Error("@bugsnag/plugin-react reference to `React` was undefined")}return e.prototype.load=function(e){if(!this.lazy){var t=o(this.React,e);return t.createErrorBoundary=function(){return t},t}var n=function(){throw Error("@bugsnag/plugin-react was used incorrectly. Valid usage is as follows:\nPass React to the plugin constructor\n\n  `Bugsnag.start({ plugins: [new BugsnagPluginReact(React)] })`\nand then call `const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary()`\n\nOr if React is not available until after Bugsnag has started,\nconstruct the plugin with no arguments\n  `Bugsnag.start({ plugins: [new BugsnagPluginReact()] })`,\nthen pass in React when available to construct your error boundary\n  `const ErrorBoundary = Bugsnag.getPlugin('react').createErrorBoundary(React)`")};return n.createErrorBoundary=function(t){if(!t)throw Error("@bugsnag/plugin-react reference to `React` was undefined");return o(t,e)},n},e}();var r=function(e){for(var t=e.split(/\s*\n\s*/g),n="",r=0,o=t.length;r<o;r++)t[r].length&&(n+=(n.length?"\n":"")+t[r]);return n},o=function(e,o){return function(a){function i(e){var t;return(t=a.call(this,e)||this).state={error:null,info:null},t.handleClearError=t.handleClearError.bind(function(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)),t}i.prototype=Object.create(a.prototype),i.prototype.constructor=i,n(i,a);var s=i.prototype;return s.handleClearError=function(){this.setState({error:null,info:null})},s.componentDidCatch=function(e,t){var n=this.props.onError,a=o.Event.create(e,!0,{severity:"error",unhandled:!0,severityReason:{type:"unhandledException"}},1);t&&t.componentStack&&(t.componentStack=r(t.componentStack)),a.addMetadata("react",t),o._notify(a,n),this.setState({error:e,info:t})},s.render=function(){if(this.state.error){var n=this.props.FallbackComponent;return n?e.createElement(n,t({},this.state,{clearError:this.handleClearError})):null}return this.props.children},i}(e.Component)};return e.formatComponentStack=r,e.default=e,e}()}}]);