@honeybadger-io/js
Advanced tools
Comparing version 4.2.0 to 4.3.0
@@ -10,4 +10,5 @@ import { Types, Client } from '@honeybadger-io/core'; | ||
} | ||
export { Types } from '@honeybadger-io/core'; | ||
declare const _default: Honeybadger; | ||
export default _default; | ||
//# sourceMappingURL=browser.d.ts.map |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Honeybadger=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){var t=e.default;if("function"==typeof t){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var r={},n={},o={},i={},a="<unknown>";var c=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,u=/\((\S*)(?::(\d+))(?::(\d+))\)/;var s=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var l=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,f=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;var d=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;var p=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;var g=Object.freeze({__proto__:null,parse:function(e){return e.split("\n").reduce((function(e,t){var r=function(e){var t=c.exec(e);if(!t)return null;var r=t[2]&&0===t[2].indexOf("native"),n=t[2]&&0===t[2].indexOf("eval"),o=u.exec(t[2]);n&&null!=o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]);return{file:r?null:t[2],methodName:t[1]||a,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}(t)||function(e){var t=s.exec(e);if(!t)return null;return{file:t[2],methodName:t[1]||a,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}}(t)||function(e){var t=l.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=f.exec(t[3]);r&&null!=n&&(t[3]=n[1],t[4]=n[2],t[5]=null);return{file:t[3],methodName:t[1]||a,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}(t)||function(e){var t=p.exec(e);if(!t)return null;return{file:t[2],methodName:t[1]||a,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}}(t)||function(e){var t=d.exec(e);if(!t)return null;return{file:t[3],methodName:t[1]||a,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}}(t);return r&&e.push(r),e}),[])}}),h=t(g),m=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),v=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),y=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&m(t,e,r);return v(t,e),t},b=e&&e.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function c(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,c)}u((n=n.apply(e,t||[])).next())}))},_=e&&e.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(i,"__esModule",{value:!0}),i.isBrowserConfig=i.clone=i.formatCGIData=i.filterUrl=i.filter=i.generateStackTrace=i.endpoint=i.instrument=i.isErrorObject=i.makeNotice=i.logger=i.sanitize=i.shallowClone=i.runAfterNotifyHandlers=i.runBeforeNotifyHandlers=i.getSourceForBacktrace=i.getCauses=i.makeBacktrace=i.objectIsExtensible=i.objectIsEmpty=i.mergeNotice=i.merge=void 0;var w=y(h);function E(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r}function j(e,t){void 0===t&&(t=0);try{var r=w.parse(e).map((function(e){return{file:e.file,method:e.methodName,number:e.lineNumber,column:e.column}}));return r.splice(0,t),r}catch(e){return[]}}function O(e){if("object"!=typeof e||null===e)return{};var t={};for(var r in e)t[r]=e[r];return t}function k(e){return e instanceof Error||"[object Error]"===Object.prototype.toString.call(e)}function x(e,t){for(var r=0;r<t.length;r++)if(-1!==e.toLowerCase().indexOf(t[r].toLowerCase()))return!0;return!1}function N(e,t){var r=Object.prototype.toString.call(t).slice(8,-1);return null!=t&&r===e}i.merge=E,i.mergeNotice=function(e,t){var r=E(e,t);return e.context&&t.context&&(r.context=E(e.context,t.context)),r},i.objectIsEmpty=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},i.objectIsExtensible=function(e){return"function"!=typeof Object.isExtensible||Object.isExtensible(e)},i.makeBacktrace=j,i.getCauses=function(e){if(e.cause){for(var t=[],r=e;t.length<3&&(r=r.cause);)t.push({class:r.name,message:r.message,backtrace:"string"==typeof r.stack?j(r.stack):null});return t}return[]},i.getSourceForBacktrace=function(e,t){return b(this,void 0,void 0,(function(){var r,n,o,i;return _(this,(function(a){switch(a.label){case 0:if(r=[],!t||!e||!e.length)return[2,r];n=0,a.label=1;case 1:return e.length?(o=e.splice(0)[n],[4,t(o.file)]):[3,3];case 2:return i=a.sent(),r[n]=function(e,t,r){void 0===r&&(r=2);if(!e)return null;var n=e.split("\n");n.unshift("");for(var o=t+r,i={},a=t-r;a<=o;a++){var c=n[a];"string"==typeof c&&(i[a]=c)}return i}(i,o.number),n++,[3,1];case 3:return[2,r]}}))}))},i.runBeforeNotifyHandlers=function(e,t){for(var r=!0,n=0,o=t.length;n<o;n++){!1===(0,t[n])(e)&&(r=!1)}return r},i.runAfterNotifyHandlers=function(e,t,r){e&&e.afterNotify&&e.afterNotify(r,e);for(var n=0,o=t.length;n<o;n++)t[n](r,e);return!0},i.shallowClone=O,i.sanitize=function(e,t){void 0===t&&(t=8);var r=[];function n(e,n){if(void 0===n&&(n=0),n>=t)return"[DEPTH]";if(!function(e){var t=typeof e;return/function/.test(t)?"toJSON"===e.name:!/symbol/.test(t)&&null!==e&&("object"!=typeof e||void 0!==e.hasOwnProperty)}(e))return Object.prototype.toString.call(e);if(function(e){if(!e||"object"!=typeof e)return!1;for(var t=0;t<r.length;t++)if(r[t]===e)return!0;return r.push(e),!1}(e))return"[RECURSION]";if(Array.isArray(e))return e.map((function(e){return o(e,n+1)}));if("object"==typeof e){var i={};for(var a in e){var c=e[a];Object.prototype.hasOwnProperty.call(e,a)&&null!=a&&null!=c&&(i[a]=o(c,n+1))}return i}return e}function o(e,t){void 0===t&&(t=0);try{return n(e,t)}catch(e){return"[ERROR] ".concat(e)}}return o(e)},i.logger=function(e){var t=function(t){return function(){for(var r,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if("debug"===t){if(!e.config.debug)return;t="log"}n.unshift("[Honeybadger]"),(r=e.config.logger)[t].apply(r,n)}};return{log:t("log"),info:t("info"),debug:t("debug"),warn:t("warn"),error:t("error")}},i.makeNotice=function(e){var t;if(e)if(k(e)){var r=e;t=E(e,{name:r.name,message:r.message,stack:r.stack,cause:r.cause})}else if("object"==typeof e)t=O(e);else{t={message:String(e)}}else t={};return t},i.isErrorObject=k,i.instrument=function(e,t,r){if(e&&t&&r&&t in e){for(var n=e[t];n&&n.__hb_original;)n=n.__hb_original;try{e[t]=r(n),e[t].__hb_original=n}catch(e){}}},i.endpoint=function(e,t){var r=e.trim().replace(/\/$/,"");return t=t.trim().replace(/(^\/|\/$)/g,""),"".concat(r,"/").concat(t)},i.generateStackTrace=function(){try{throw new Error("")}catch(e){if(e.stack)return e.stack}for(var e=10,t=[],r=arguments.callee;r&&t.length<e;){/function(?:\s+([\w$]+))+\s*\(/.test(r.toString())?t.push(RegExp.$1||"<anonymous>"):t.push("<anonymous>");try{r=r.caller}catch(e){break}}return t.join("\n")},i.filter=function(e,t){if(N("Object",e)){N("Array",t)||(t=[]);var r=[];return function e(n){var o,i;if(N("Object",n)||N("Array",n)){if(-1!==r.indexOf(n))return"[CIRCULAR DATA STRUCTURE]";r.push(n)}if(N("Object",n)){for(o in i={},n)x(o,t)?i[o]="[FILTERED]":i[o]=e(n[o]);return i}return N("Array",n)?n.map((function(t){return e(t)})):N("Function",n)?"[FUNC]":n}(e)}},i.filterUrl=function(e,t){if(!t)return e;if("string"!=typeof e)return e;var r=e.split(/\?/,2)[1];if(!r)return e;var n=e;return r.split(/[&]\s?/).forEach((function(e){var r=e.split("=",2),o=r[0],i=r[1];x(o,t)&&(n=n.replace("".concat(o,"=").concat(i),"".concat(o,"=[FILTERED]")))})),n},i.formatCGIData=function(e,t){void 0===t&&(t="");var r={};return Object.keys(e).forEach((function(n){var o=t+n.replace(/\W/g,"_").toUpperCase();r[o]=e[n]})),r},i.clone=function(e){return JSON.parse(JSON.stringify(e))},i.isBrowserConfig=function(e){return void 0!==e.async};var S={};Object.defineProperty(S,"__esModule",{value:!0}),S.GlobalStore=void 0;var C=function(){function e(e){this.store=e}return e.prototype.getStore=function(){return this.store},e.prototype.run=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return this.store=e,t.apply(void 0,r)},e}();S.GlobalStore=C;var T=e&&e.__assign||function(){return T=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},T.apply(this,arguments)};Object.defineProperty(o,"__esModule",{value:!0}),o.Client=void 0;var P=i,R=S,U={name:"honeybadger-js",url:"https://github.com/honeybadger-io/honeybadger-js",version:"4.2.0"},H=/,|\s+/,M=/\S/,B=function(){function e(e,t){void 0===e&&(e={}),this.__pluginsExecuted=!1,this.__store=null,this.__beforeNotifyHandlers=[],this.__afterNotifyHandlers=[],this.config=T({apiKey:null,endpoint:"https://api.honeybadger.io",environment:null,hostname:null,projectRoot:null,component:null,action:null,revision:null,reportData:null,breadcrumbsEnabled:!0,maxBreadcrumbs:40,maxObjectDepth:8,logger:console,developmentEnvironments:["dev","development","test"],debug:!1,tags:null,enableUncaught:!0,enableUnhandledRejection:!0,afterUncaught:function(){return!0},filters:["creditcard","password"],__plugins:[]},e),this.__store=new R.GlobalStore({context:{},breadcrumbs:[]}),this.__transport=t,this.logger=(0,P.logger)(this)}return e.prototype.getVersion=function(){return U.version},e.prototype.configure=function(e){var t=this;for(var r in void 0===e&&(e={}),e)this.config[r]=e[r];return this.__pluginsExecuted||(this.__pluginsExecuted=!0,this.config.__plugins.forEach((function(e){return e.load(t)}))),this},e.prototype.__setStore=function(e){this.__store=e},e.prototype.beforeNotify=function(e){return this.__beforeNotifyHandlers.push(e),this},e.prototype.afterNotify=function(e){return this.__afterNotifyHandlers.push(e),this},e.prototype.setContext=function(e){if("object"==typeof e){var t=this.__store.getStore();t.context=(0,P.merge)(t.context,e)}return this},e.prototype.resetContext=function(e){this.logger.warn("Deprecation warning: `Honeybadger.resetContext()` has been deprecated; please use `Honeybadger.clear()` instead.");var t=this.__store.getStore();return t.context="object"==typeof e&&null!==e?e:{},this},e.prototype.clear=function(){var e=this.__store.getStore();return e.context={},e.breadcrumbs=[],this},e.prototype.notify=function(e,t,r){var n=this;void 0===t&&(t=void 0),void 0===r&&(r=void 0);var o=null,i=this.makeNotice(e,t,r);i||(this.logger.debug("failed to build error report"),o=new Error("failed to build error report")),o||!1!==this.config.reportData||(this.logger.debug("skipping error report: honeybadger.js is disabled",i),o=new Error("honeybadger.js is disabled")),!o&&this.__developmentMode()&&(this.logger.log("honeybadger.js is in development mode; the following error report will be sent in production.",i),o=new Error("honeybadger.js is in development mode")),o||this.config.apiKey||(this.logger.warn("could not send error report: no API key has been configured",i),o=new Error("missing API key"));var a=i&&i.backtrace?i.backtrace.map((function(e){return(0,P.shallowClone)(e)})):null,c=(0,P.runBeforeNotifyHandlers)(i,this.__beforeNotifyHandlers);if(o||c||(this.logger.debug("skipping error report: beforeNotify handlers returned false",i),o=new Error("beforeNotify handlers returned false")),o)return(0,P.runAfterNotifyHandlers)(i,this.__afterNotifyHandlers,o),!1;this.addBreadcrumb("Honeybadger Notice",{category:"notice",metadata:{message:i.message,name:i.name,stack:i.stack}});var u=this.__getStoreContentsOrDefault().breadcrumbs;return i.__breadcrumbs=this.config.breadcrumbsEnabled?u.slice():[],(0,P.getSourceForBacktrace)(a,this.__getSourceFileHandler).then((function(e){e.forEach((function(e,t){i.backtrace[t].source=e}));var t=n.__buildPayload(i);n.__transport.send({headers:{"X-API-Key":n.config.apiKey,"Content-Type":"application/json",Accept:"text/json, application/json"},method:"POST",endpoint:(0,P.endpoint)(n.config.endpoint,"/v1/notices/js"),maxObjectDepth:n.config.maxObjectDepth,logger:n.logger,async:(0,P.isBrowserConfig)(n.config)?n.config.async:void 0},t).then((function(e){if(201!==e.statusCode)return(0,P.runAfterNotifyHandlers)(i,n.__afterNotifyHandlers,new Error("Bad HTTP response: ".concat(e.statusCode))),void n.logger.warn("Error report failed: unknown response from server. code=".concat(e.statusCode));var t=JSON.parse(e.body).id;(0,P.runAfterNotifyHandlers)((0,P.merge)(i,{id:t}),n.__afterNotifyHandlers),n.logger.info("Error report sent ⚡ https://app.honeybadger.io/notice/".concat(t))})).catch((function(e){n.logger.error("Error report failed: an unknown error occurred.","message=".concat(e.message)),(0,P.runAfterNotifyHandlers)(i,n.__afterNotifyHandlers,e)}))})),!0},e.prototype.notifyAsync=function(e,t,r){var n=this;return void 0===t&&(t=void 0),void 0===r&&(r=void 0),new Promise((function(o,i){var a,c,u;a=e.afterNotify?e:t&&t.afterNotify?t:r&&r.afterNotify?r:t&&"object"==typeof t?t:r||(t={}),u=(c=a).afterNotify,c.afterNotify=function(e){if(null==u||u.call(n,e),e)return i(e);o()},n.notify(e,t,r)}))},e.prototype.makeNotice=function(e,t,r){void 0===t&&(t=void 0),void 0===r&&(r=void 0);var n=(0,P.makeNotice)(e);t&&"object"!=typeof t&&(t={name:String(t)});if(t&&(n=(0,P.mergeNotice)(n,t)),"object"==typeof r&&null!==r&&(n=(0,P.mergeNotice)(n,r)),(0,P.objectIsEmpty)(n))return null;var o=this.__getStoreContentsOrDefault().context,i=this.__constructTags(n.tags),a=this.__constructTags(o.tags),c=this.__constructTags(this.config.tags),u=i.concat(a).concat(c),s=u.filter((function(e,t){return u.indexOf(e)===t})),l=0;return"string"==typeof(n=(0,P.merge)(n,{name:n.name||"Error",context:(0,P.merge)(o,n.context),projectRoot:n.projectRoot||this.config.projectRoot,environment:n.environment||this.config.environment,component:n.component||this.config.component,action:n.action||this.config.action,revision:n.revision||this.config.revision,tags:s})).stack&&n.stack.trim()||(n.stack=(0,P.generateStackTrace)(),l=2),n.backtrace=(0,P.makeBacktrace)(n.stack,l),n},e.prototype.addBreadcrumb=function(e,t){if(this.config.breadcrumbsEnabled){t=t||{};var r=(0,P.shallowClone)(t.metadata),n=t.category||"custom",o=(new Date).toISOString(),i=this.__store.getStore(),a=i.breadcrumbs;a.push({category:n,message:e,metadata:r,timestamp:o});var c=this.config.maxBreadcrumbs;return a.length>c&&(a=a.slice(a.length-c)),i.breadcrumbs=a,this}},e.prototype.__developmentMode=function(){return!0!==this.config.reportData&&(this.config.environment&&this.config.developmentEnvironments.includes(this.config.environment))},e.prototype.__buildPayload=function(e){var t=(0,P.filter)(e.headers,this.config.filters)||{},r=(0,P.filter)(T(T({},e.cgiData),(0,P.formatCGIData)(t,"HTTP_")),this.config.filters);return{notifier:U,breadcrumbs:{enabled:!!this.config.breadcrumbsEnabled,trail:e.__breadcrumbs||[]},error:{class:e.name,message:e.message,backtrace:e.backtrace,fingerprint:e.fingerprint,tags:e.tags,causes:(0,P.getCauses)(e)},request:{url:(0,P.filterUrl)(e.url,this.config.filters),component:e.component,action:e.action,context:e.context,cgi_data:r,params:(0,P.filter)(e.params,this.config.filters)||{},session:(0,P.filter)(e.session,this.config.filters)||{}},server:{project_root:e.projectRoot,environment_name:e.environment,revision:e.revision,hostname:this.config.hostname,time:(new Date).toUTCString()},details:e.details||{}}},e.prototype.__constructTags=function(e){return e?e.toString().split(H).filter((function(e){return M.test(e)})):[]},e.prototype.__getStoreContentsOrDefault=function(){var e=this.__store.getStore();return T({context:{},breadcrumbs:[]},e||{})},e}();o.Client=B;var A={};Object.defineProperty(A,"__esModule",{value:!0}),function(t){var r=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&r(t,e,o);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.Types=t.Store=t.Client=void 0;var c=o;Object.defineProperty(t,"Client",{enumerable:!0,get:function(){return c.Client}}),t.Store=a(S),t.Types=a(A),t.Util=a(i)}(n);var D={};function I(e){if(!e||!e.tagName)return"";var t=e.tagName.toLowerCase();if("html"===t)return"";e.id&&(t+="#".concat(e.id));var r=e.getAttribute("class");r&&r.split(/\s+/).forEach((function(e){t+=".".concat(e)})),["alt","name","title","type"].forEach((function(r){var n=e.getAttribute(r);n&&(t+="[".concat(r,'="').concat(n,'"]'))}));var n=function(e){try{var t=e.parentNode.childNodes,r=[];return Array.prototype.forEach.call(t,(function(t){t.tagName&&t.tagName===e.tagName&&r.push(t)})),r}catch(e){return[]}}(e);return n.length>1&&(t+=":nth-child(".concat(Array.prototype.indexOf.call(n,e)+1,")")),t}function L(e){return-1!==e.toString().indexOf("native")}function q(e){var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/)||{};return{protocol:t[2],host:t[4],pathname:t[5]}}Object.defineProperty(D,"__esModule",{value:!0}),D.preferCatch=D.encodeCookie=D.decodeCookie=D.localURLPathname=D.parseURL=D.nativeFetch=D.stringTextOfElement=D.stringSelectorOfElement=D.stringNameOfElement=void 0,D.stringNameOfElement=I,D.stringSelectorOfElement=function e(t){var r=I(t);if(t.parentNode&&t.parentNode.tagName){var n=e(t.parentNode);if(n.length>0)return"".concat(n," > ").concat(r)}return r},D.stringTextOfElement=function(e){var t=e.textContent||e.innerText||"";return t||"submit"!==e.type&&"button"!==e.type||(t=e.value),function(e,t){e.length>t&&(e=e.substr(0,t)+"...");return e}(t.trim(),300)},D.nativeFetch=function(){if(!window.fetch)return!1;if(L(window.fetch))return!0;try{var e=document.createElement("iframe");e.style.display="none",document.head.appendChild(e);var t=e.contentWindow.fetch&&L(e.contentWindow.fetch);return document.head.removeChild(e),t}catch(e){console&&console.warn&&console.warn("failed to detect native fetch via iframe: "+e)}return!1},D.parseURL=q,D.localURLPathname=function(e){var t=q(e),r=q(document.URL);return t.host&&t.protocol?t.protocol===r.protocol&&t.host===r.host?t.pathname:"".concat(t.protocol,"://").concat(t.host).concat(t.pathname):t.pathname},D.decodeCookie=function(e){var t={};return e.split(/[;,]\s?/).forEach((function(e){var r=e.split("=",2),n=r[0],o=r[1];t[n]=o})),t},D.encodeCookie=function(e){if("object"==typeof e){var t=[];for(var r in e)t.push(r+"="+e[r]);return t.join(";")}},D.preferCatch=function(){var e=!0;if(window.atob||(e=!1),window.ErrorEvent)try{0===new window.ErrorEvent("").colno&&(e=!1)}catch(e){}return e}();var F={};Object.defineProperty(F,"__esModule",{value:!0}),F.onError=F.ignoreNextOnError=void 0;var W,G=n,$=G.Util.instrument,X=G.Util.makeNotice,K=0;F.ignoreNextOnError=function(){K+=1,clearTimeout(W),W=setTimeout((function(){K=0}))},F.onError=function(e){return void 0===e&&(e=window),{load:function(t){$(e,"onerror",(function(e){var r=function(e,r,n,o,i){if(t.logger.debug("window.onerror callback invoked",arguments),K>0)return t.logger.debug("Ignoring window.onerror (error likely reported earlier)",arguments),void(K-=1);if(0===n&&/Script error\.?/.test(e))t.config.enableUncaught&&t.logger.warn("Ignoring cross-domain script error: enable CORS to track these types of errors",arguments);else{var a=X(i);a.name||(a.name="window.onerror"),a.message||(a.message=e),a.stack||(a.stack=[a.message,"\n at ? (",r||"unknown",":",n||0,":",o||0,")"].join("")),t.addBreadcrumb("window.onerror"!==a.name&&a.name?"window.onerror: ".concat(a.name):"window.onerror",{category:"error",metadata:{name:a.name,message:a.message,stack:a.stack}}),t.config.enableUncaught&&t.notify(a)}};return function(t,n,o,i,a){return r(t,n,o,i,a),"function"==typeof e&&e.apply(window,arguments)}}))}}};var z={};Object.defineProperty(z,"__esModule",{value:!0});var J=n.Util.instrument;z.default=function(e){return void 0===e&&(e=window),{load:function(t){t.config.enableUnhandledRejection&&J(e,"onunhandledrejection",(function(e){function r(e){var r;if(t.logger.debug("window.onunhandledrejection callback invoked",arguments),t.config.enableUnhandledRejection){var n=e.reason;if(n instanceof Error){var o="unknown",i=0,a="".concat(n.message,"\n at ? (").concat(o,":").concat(i,")"),c=n.stack||a,u={name:n.name,message:"UnhandledPromiseRejectionWarning: ".concat(n),stack:c};return t.addBreadcrumb("window.onunhandledrejection: ".concat(u.name),{category:"error",metadata:u}),void t.notify(u)}var s="string"==typeof n?n:null!==(r=JSON.stringify(n))&&void 0!==r?r:"Unspecified reason";t.notify({name:"window.onunhandledrejection",message:"UnhandledPromiseRejectionWarning: ".concat(s)})}}return function(t){r(t),"function"==typeof e&&e.apply(this,arguments)}}))}}};var V={};Object.defineProperty(V,"__esModule",{value:!0});var Q=n,Y=D,Z=Q.Util.sanitize,ee=Q.Util.instrument;V.default=function(e){return void 0===e&&(e=window),{load:function(t){function r(e){return!0===t.config.breadcrumbsEnabled||(e?!0===t.config.breadcrumbsEnabled[e]:!1!==t.config.breadcrumbsEnabled)}!function(){function n(e){return Array.isArray(e)?e.map((function(e){try{return String(e)}catch(e){return"[unknown]"}})).join(" "):""}r("console")&&["debug","info","warn","error","log"].forEach((function(r){ee(e.console,r,(function(o){return function(){var i=Array.prototype.slice.call(arguments),a=n(i),c={category:"log",metadata:{level:r,arguments:Z(i,3)}};t.addBreadcrumb(a,c),"function"==typeof o&&Function.prototype.apply.call(o,e.console,arguments)}}))}))}(),r("dom")&&e.addEventListener("click",(function(e){var r,n,o;try{r=(0,Y.stringNameOfElement)(e.target),n=(0,Y.stringSelectorOfElement)(e.target),o=(0,Y.stringTextOfElement)(e.target)}catch(e){r="UI Click",n="[unknown]",o="[unknown]"}0!==r.length&&t.addBreadcrumb(r,{category:"ui.click",metadata:{selector:n,text:o,event:e}})}),!0),r("network")&&(ee(XMLHttpRequest.prototype,"open",(function(e){return function(){var t=this,r=arguments[1],n="string"==typeof arguments[0]?arguments[0].toUpperCase():arguments[0],o="".concat(n," ").concat((0,Y.localURLPathname)(r));this.__hb_xhr={type:"xhr",method:n,url:r,message:o},"function"==typeof e&&e.apply(t,arguments)}})),ee(XMLHttpRequest.prototype,"send",(function(e){return function(){var r=this;function n(){if(4===r.readyState){var e=void 0;r.__hb_xhr&&(r.__hb_xhr.status_code=r.status,e=r.__hb_xhr.message,delete r.__hb_xhr.message),t.addBreadcrumb(e||"XMLHttpRequest",{category:"request",metadata:r.__hb_xhr})}}"onreadystatechange"in r&&"function"==typeof r.onreadystatechange?ee(r,"onreadystatechange",(function(e){return function(){n(),"function"==typeof e&&e.apply(this,arguments)}})):r.onreadystatechange=n,"function"==typeof e&&e.apply(r,arguments)}}))),r("network")&&(0,Y.nativeFetch)()&&ee(e,"fetch",(function(r){return function(){var n,o=arguments[0],i="GET";"string"==typeof o?n=o:"Request"in e&&o instanceof Request?(n=o.url,o.method&&(i=o.method)):n=String(o),arguments[1]&&arguments[1].method&&(i=arguments[1].method),"string"==typeof i&&(i=i.toUpperCase());var a="".concat(i," ").concat((0,Y.localURLPathname)(n)),c={type:"fetch",method:i,url:n};return r.apply(this,arguments).then((function(e){return c.status_code=e.status,t.addBreadcrumb(a,{category:"request",metadata:c}),e})).catch((function(e){throw t.addBreadcrumb("fetch error",{category:"error",metadata:c}),e}))}})),function(){if(r("navigation")){var n=e.location.href;ee(e,"onpopstate",(function(t){return function(){if(o(n,e.location.href),t)return t.apply(this,arguments)}})),ee(e.history,"pushState",i),ee(e.history,"replaceState",i)}function o(e,r){n=r,t.addBreadcrumb("Page changed",{category:"navigation",metadata:{from:e,to:r}})}function i(e){return function(){var t=arguments.length>2?arguments[2]:void 0;return t&&o(n,String(t)),e.apply(this,arguments)}}}()}}};var te={};Object.defineProperty(te,"__esModule",{value:!0});var re=n.Util.instrument;te.default=function(e){return void 0===e&&(e=window),{load:function(t){!function(){function r(e){return function(r){return function(n,o){if("function"==typeof n){var i=Array.prototype.slice.call(arguments,2);return n=t.__wrap(n,e),r((function(){n.apply(void 0,i)}),o)}return r(n,o)}}}re(e,"setTimeout",r({component:"setTimeout"})),re(e,"setInterval",r({component:"setInterval"}))}()}}};var ne={};Object.defineProperty(ne,"__esModule",{value:!0});var oe=n.Util.instrument;ne.default=function(e){return void 0===e&&(e=window),{load:function(t){["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"].forEach((function(r){var n=e[r]&&e[r].prototype;n&&Object.prototype.hasOwnProperty.call(n,"addEventListener")&&(oe(n,"addEventListener",(function(e){var n={component:"".concat(r,".prototype.addEventListener")};return function(r,o,i,a){try{o&&null!=o.handleEvent&&(o.handleEvent=t.__wrap(o.handleEvent,n))}catch(e){t.logger.error(e)}return e.call(this,r,t.__wrap(o,n),i,a)}})),oe(n,"removeEventListener",(function(e){return function(r,n,o,i){return e.call(this,r,n,o,i),e.call(this,r,t.__wrap(n),o,i)}})))}))}}};var ie={};Object.defineProperty(ie,"__esModule",{value:!0}),ie.BrowserTransport=void 0;var ae=n.Util.sanitize,ce=function(){function e(){}return e.prototype.send=function(e,t){return new Promise((function(r,n){try{var o=new XMLHttpRequest;if(o.open(e.method,e.endpoint,e.async),Object.keys(e.headers||[]).length)for(var i in e.headers)void 0!==e.headers[i]&&o.setRequestHeader(i,String(e.headers[i]));o.send(t?JSON.stringify(ae(t,e.maxObjectDepth)):void 0),o.onload=function(){return r({statusCode:o.status,body:o.response})}}catch(e){n(e)}}))},e}();ie.BrowserTransport=ce;var ue,se=e&&e.__extends||(ue=function(e,t){return ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},ue(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}ue(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),le=e&&e.__assign||function(){return le=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},le.apply(this,arguments)},fe=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(r,"__esModule",{value:!0});var de=n,pe=D,ge=F,he=fe(z),me=fe(V),ve=fe(te),ye=fe(ne),be=ie,_e=de.Util.merge,we=de.Util.filter,Ee=de.Util.objectIsExtensible,je=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,le({async:!0,maxErrors:null,projectRoot:window.location.protocol+"//"+window.location.host},t),new be.BrowserTransport)||this;return r.__errorsSent=0,r.__lastWrapErr=void 0,r.__beforeNotifyHandlers=[function(e){return r.__exceedsMaxErrors()?(r.logger.debug("Dropping notice: max errors exceeded",e),!1):(e&&!e.url&&(e.url=document.URL),r.__incrementErrorsCount(),!0)}],r}return se(t,e),t.prototype.configure=function(t){return void 0===t&&(t={}),e.prototype.configure.call(this,t)},t.prototype.resetMaxErrors=function(){return this.__errorsSent=0},t.prototype.factory=function(e){return new t(e)},t.prototype.checkIn=function(e){throw new Error("Honeybadger.checkIn() is not supported on the browser")},t.prototype.__buildPayload=function(t){var r,n={HTTP_USER_AGENT:void 0,HTTP_REFERER:void 0,HTTP_COOKIE:void 0};n.HTTP_USER_AGENT=navigator.userAgent,document.referrer.match(/\S/)&&(n.HTTP_REFERER=document.referrer),(r="string"==typeof t.cookies?(0,pe.decodeCookie)(t.cookies):t.cookies)&&(n.HTTP_COOKIE=(0,pe.encodeCookie)(we(r,this.config.filters)));var o=e.prototype.__buildPayload.call(this,t);return o.request.cgi_data=_e(n,o.request.cgi_data),o},t.prototype.__wrap=function(e,t){void 0===t&&(t={});var r=e;t||(t={});try{if("function"!=typeof r)return r;if(!Ee(r))return r;if(!r.___hb){var n=this;r.___hb=function(){if(!pe.preferCatch)return r.apply(this,arguments);try{return r.apply(this,arguments)}catch(e){if(n.__lastWrapErr===e)throw e;throw n.__lastWrapErr=e,(0,ge.ignoreNextOnError)(),n.addBreadcrumb(t.component?"".concat(t.component,": ").concat(e.name):e.name,{category:"error",metadata:{message:e.message,name:e.name,stack:e.stack}}),n.config.enableUncaught&&n.notify(e),e}}}return r.___hb.___hb=r.___hb,r.___hb}catch(e){return r}},t.prototype.__incrementErrorsCount=function(){return this.__errorsSent++},t.prototype.__exceedsMaxErrors=function(){return this.config.maxErrors&&this.__errorsSent>=this.config.maxErrors},t}(de.Client);return r.default=new je({__plugins:[(0,ge.onError)(),(0,he.default)(),(0,ve.default)(),(0,ye.default)(),(0,me.default)()]})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Honeybadger=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e){var t=e.default;if("function"==typeof t){var r=function(){return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})})),r}var n={},o={},i={},a={},c="<unknown>";var u=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,s=/\((\S*)(?::(\d+))(?::(\d+))\)/;var l=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var f=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,d=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;var p=/^\s*(?:([^@]*)(?:\((.*?)\))?@)?(\S.*?):(\d+)(?::(\d+))?\s*$/i;var g=/^\s*at (?:((?:\[object object\])?[^\\/]+(?: \[as \S+\])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i;var h=Object.freeze({__proto__:null,parse:function(e){return e.split("\n").reduce((function(e,t){var r=function(e){var t=u.exec(e);if(!t)return null;var r=t[2]&&0===t[2].indexOf("native"),n=t[2]&&0===t[2].indexOf("eval"),o=s.exec(t[2]);n&&null!=o&&(t[2]=o[1],t[3]=o[2],t[4]=o[3]);return{file:r?null:t[2],methodName:t[1]||c,arguments:r?[t[2]]:[],lineNumber:t[3]?+t[3]:null,column:t[4]?+t[4]:null}}(t)||function(e){var t=l.exec(e);if(!t)return null;return{file:t[2],methodName:t[1]||c,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}}(t)||function(e){var t=f.exec(e);if(!t)return null;var r=t[3]&&t[3].indexOf(" > eval")>-1,n=d.exec(t[3]);r&&null!=n&&(t[3]=n[1],t[4]=n[2],t[5]=null);return{file:t[3],methodName:t[1]||c,arguments:t[2]?t[2].split(","):[],lineNumber:t[4]?+t[4]:null,column:t[5]?+t[5]:null}}(t)||function(e){var t=g.exec(e);if(!t)return null;return{file:t[2],methodName:t[1]||c,arguments:[],lineNumber:+t[3],column:t[4]?+t[4]:null}}(t)||function(e){var t=p.exec(e);if(!t)return null;return{file:t[3],methodName:t[1]||c,arguments:[],lineNumber:+t[4],column:t[5]?+t[5]:null}}(t);return r&&e.push(r),e}),[])}}),m=r(h),y=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),v=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),b=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&y(t,e,r);return v(t,e),t},_=e&&e.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function c(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,c)}u((n=n.apply(e,t||[])).next())}))},w=e&&e.__generator||function(e,t){var r,n,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}};Object.defineProperty(a,"__esModule",{value:!0}),a.isBrowserConfig=a.clone=a.formatCGIData=a.filterUrl=a.filter=a.generateStackTrace=a.endpoint=a.instrument=a.isErrorObject=a.makeNotice=a.logger=a.sanitize=a.shallowClone=a.runAfterNotifyHandlers=a.runBeforeNotifyHandlers=a.getSourceForBacktrace=a.getCauses=a.makeBacktrace=a.objectIsExtensible=a.objectIsEmpty=a.mergeNotice=a.merge=void 0;var E=b(m);function O(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r}function j(e,t){void 0===t&&(t=0);try{var r=E.parse(e).map((function(e){return{file:e.file,method:e.methodName,number:e.lineNumber,column:e.column}}));return r.splice(0,t),r}catch(e){return[]}}function k(e){if("object"!=typeof e||null===e)return{};var t={};for(var r in e)t[r]=e[r];return t}function x(e){return e instanceof Error||"[object Error]"===Object.prototype.toString.call(e)}function N(e,t){for(var r=0;r<t.length;r++)if(-1!==e.toLowerCase().indexOf(t[r].toLowerCase()))return!0;return!1}function S(e,t){var r=Object.prototype.toString.call(t).slice(8,-1);return null!=t&&r===e}a.merge=O,a.mergeNotice=function(e,t){var r=O(e,t);return e.context&&t.context&&(r.context=O(e.context,t.context)),r},a.objectIsEmpty=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0},a.objectIsExtensible=function(e){return"function"!=typeof Object.isExtensible||Object.isExtensible(e)},a.makeBacktrace=j,a.getCauses=function(e){if(e.cause){for(var t=[],r=e;t.length<3&&(r=r.cause);)t.push({class:r.name,message:r.message,backtrace:"string"==typeof r.stack?j(r.stack):null});return t}return[]},a.getSourceForBacktrace=function(e,t){return _(this,void 0,void 0,(function(){var r,n,o,i;return w(this,(function(a){switch(a.label){case 0:if(r=[],!t||!e||!e.length)return[2,r];n=0,a.label=1;case 1:return e.length?(o=e.splice(0)[n],[4,t(o.file)]):[3,3];case 2:return i=a.sent(),r[n]=function(e,t,r){void 0===r&&(r=2);if(!e)return null;var n=e.split("\n");n.unshift("");for(var o=t+r,i={},a=t-r;a<=o;a++){var c=n[a];"string"==typeof c&&(i[a]=c)}return i}(i,o.number),n++,[3,1];case 3:return[2,r]}}))}))},a.runBeforeNotifyHandlers=function(e,t){for(var r=!0,n=0,o=t.length;n<o;n++){!1===(0,t[n])(e)&&(r=!1)}return r},a.runAfterNotifyHandlers=function(e,t,r){e&&e.afterNotify&&e.afterNotify(r,e);for(var n=0,o=t.length;n<o;n++)t[n](r,e);return!0},a.shallowClone=k,a.sanitize=function(e,t){void 0===t&&(t=8);var r=[];function n(e,n){if(void 0===n&&(n=0),n>=t)return"[DEPTH]";if(!function(e){var t=typeof e;return/function/.test(t)?"toJSON"===e.name:!/symbol/.test(t)&&null!==e&&("object"!=typeof e||void 0!==e.hasOwnProperty)}(e))return Object.prototype.toString.call(e);if(function(e){if(!e||"object"!=typeof e)return!1;for(var t=0;t<r.length;t++)if(r[t]===e)return!0;return r.push(e),!1}(e))return"[RECURSION]";if(Array.isArray(e))return e.map((function(e){return o(e,n+1)}));if("object"==typeof e){var i={};for(var a in e){var c=e[a];Object.prototype.hasOwnProperty.call(e,a)&&null!=a&&null!=c&&(i[a]=o(c,n+1))}return i}return e}function o(e,t){void 0===t&&(t=0);try{return n(e,t)}catch(e){return"[ERROR] ".concat(e)}}return o(e)},a.logger=function(e){var t=function(t){return function(){for(var r,n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if("debug"===t){if(!e.config.debug)return;t="log"}n.unshift("[Honeybadger]"),(r=e.config.logger)[t].apply(r,n)}};return{log:t("log"),info:t("info"),debug:t("debug"),warn:t("warn"),error:t("error")}},a.makeNotice=function(e){var t;if(e)if(x(e)){var r=e;t=O(e,{name:r.name,message:r.message,stack:r.stack,cause:r.cause})}else if("object"==typeof e)t=k(e);else{t={message:String(e)}}else t={};return t},a.isErrorObject=x,a.instrument=function(e,t,r){if(e&&t&&r&&t in e){for(var n=e[t];n&&n.__hb_original;)n=n.__hb_original;try{e[t]=r(n),e[t].__hb_original=n}catch(e){}}},a.endpoint=function(e,t){var r=e.trim().replace(/\/$/,"");return t=t.trim().replace(/(^\/|\/$)/g,""),"".concat(r,"/").concat(t)},a.generateStackTrace=function(){try{throw new Error("")}catch(e){if(e.stack)return e.stack}for(var e=10,t=[],r=arguments.callee;r&&t.length<e;){/function(?:\s+([\w$]+))+\s*\(/.test(r.toString())?t.push(RegExp.$1||"<anonymous>"):t.push("<anonymous>");try{r=r.caller}catch(e){break}}return t.join("\n")},a.filter=function(e,t){if(S("Object",e)){S("Array",t)||(t=[]);var r=[];return function e(n){var o,i;if(S("Object",n)||S("Array",n)){if(-1!==r.indexOf(n))return"[CIRCULAR DATA STRUCTURE]";r.push(n)}if(S("Object",n)){for(o in i={},n)N(o,t)?i[o]="[FILTERED]":i[o]=e(n[o]);return i}return S("Array",n)?n.map((function(t){return e(t)})):S("Function",n)?"[FUNC]":n}(e)}},a.filterUrl=function(e,t){if(!t)return e;if("string"!=typeof e)return e;var r=e.split(/\?/,2)[1];if(!r)return e;var n=e;return r.split(/[&]\s?/).forEach((function(e){var r=e.split("=",2),o=r[0],i=r[1];N(o,t)&&(n=n.replace("".concat(o,"=").concat(i),"".concat(o,"=[FILTERED]")))})),n},a.formatCGIData=function(e,t){void 0===t&&(t="");var r={};return Object.keys(e).forEach((function(n){var o=t+n.replace(/\W/g,"_").toUpperCase();r[o]=e[n]})),r},a.clone=function(e){return JSON.parse(JSON.stringify(e))},a.isBrowserConfig=function(e){return void 0!==e.async};var T={};Object.defineProperty(T,"__esModule",{value:!0}),T.GlobalStore=void 0;var C=function(){function e(e){this.store=e}return e.prototype.getStore=function(){return this.store},e.prototype.run=function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return this.store=e,t.apply(void 0,r)},e}();T.GlobalStore=C;var P=e&&e.__assign||function(){return P=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},P.apply(this,arguments)};Object.defineProperty(i,"__esModule",{value:!0}),i.Client=void 0;var R=a,U=T,H={name:"honeybadger-js",url:"https://github.com/honeybadger-io/honeybadger-js",version:"4.3.0"},M=/,|\s+/,B=/\S/,A=function(){function e(e,t){void 0===e&&(e={}),this.__pluginsExecuted=!1,this.__store=null,this.__beforeNotifyHandlers=[],this.__afterNotifyHandlers=[],this.config=P({apiKey:null,endpoint:"https://api.honeybadger.io",environment:null,hostname:null,projectRoot:null,component:null,action:null,revision:null,reportData:null,breadcrumbsEnabled:!0,maxBreadcrumbs:40,maxObjectDepth:8,logger:console,developmentEnvironments:["dev","development","test"],debug:!1,tags:null,enableUncaught:!0,enableUnhandledRejection:!0,afterUncaught:function(){return!0},filters:["creditcard","password"],__plugins:[]},e),this.__store=new U.GlobalStore({context:{},breadcrumbs:[]}),this.__transport=t,this.logger=(0,R.logger)(this)}return e.prototype.getVersion=function(){return H.version},e.prototype.configure=function(e){var t=this;for(var r in void 0===e&&(e={}),e)this.config[r]=e[r];return this.__pluginsExecuted||(this.__pluginsExecuted=!0,this.config.__plugins.forEach((function(e){return e.load(t)}))),this},e.prototype.__setStore=function(e){this.__store=e},e.prototype.beforeNotify=function(e){return this.__beforeNotifyHandlers.push(e),this},e.prototype.afterNotify=function(e){return this.__afterNotifyHandlers.push(e),this},e.prototype.setContext=function(e){if("object"==typeof e){var t=this.__store.getStore();t.context=(0,R.merge)(t.context,e)}return this},e.prototype.resetContext=function(e){this.logger.warn("Deprecation warning: `Honeybadger.resetContext()` has been deprecated; please use `Honeybadger.clear()` instead.");var t=this.__store.getStore();return t.context="object"==typeof e&&null!==e?e:{},this},e.prototype.clear=function(){var e=this.__store.getStore();return e.context={},e.breadcrumbs=[],this},e.prototype.notify=function(e,t,r){var n=this;void 0===t&&(t=void 0),void 0===r&&(r=void 0);var o=null,i=this.makeNotice(e,t,r);i||(this.logger.debug("failed to build error report"),o=new Error("failed to build error report")),o||!1!==this.config.reportData||(this.logger.debug("skipping error report: honeybadger.js is disabled",i),o=new Error("honeybadger.js is disabled")),!o&&this.__developmentMode()&&(this.logger.log("honeybadger.js is in development mode; the following error report will be sent in production.",i),o=new Error("honeybadger.js is in development mode")),o||this.config.apiKey||(this.logger.warn("could not send error report: no API key has been configured",i),o=new Error("missing API key"));var a=i&&i.backtrace?i.backtrace.map((function(e){return(0,R.shallowClone)(e)})):null,c=(0,R.runBeforeNotifyHandlers)(i,this.__beforeNotifyHandlers);if(o||c||(this.logger.debug("skipping error report: beforeNotify handlers returned false",i),o=new Error("beforeNotify handlers returned false")),o)return(0,R.runAfterNotifyHandlers)(i,this.__afterNotifyHandlers,o),!1;this.addBreadcrumb("Honeybadger Notice",{category:"notice",metadata:{message:i.message,name:i.name,stack:i.stack}});var u=this.__getStoreContentsOrDefault().breadcrumbs;return i.__breadcrumbs=this.config.breadcrumbsEnabled?u.slice():[],(0,R.getSourceForBacktrace)(a,this.__getSourceFileHandler).then((function(e){e.forEach((function(e,t){i.backtrace[t].source=e}));var t=n.__buildPayload(i);n.__transport.send({headers:{"X-API-Key":n.config.apiKey,"Content-Type":"application/json",Accept:"text/json, application/json"},method:"POST",endpoint:(0,R.endpoint)(n.config.endpoint,"/v1/notices/js"),maxObjectDepth:n.config.maxObjectDepth,logger:n.logger,async:(0,R.isBrowserConfig)(n.config)?n.config.async:void 0},t).then((function(e){if(201!==e.statusCode)return(0,R.runAfterNotifyHandlers)(i,n.__afterNotifyHandlers,new Error("Bad HTTP response: ".concat(e.statusCode))),void n.logger.warn("Error report failed: unknown response from server. code=".concat(e.statusCode));var t=JSON.parse(e.body).id;(0,R.runAfterNotifyHandlers)((0,R.merge)(i,{id:t}),n.__afterNotifyHandlers),n.logger.info("Error report sent ⚡ https://app.honeybadger.io/notice/".concat(t))})).catch((function(e){n.logger.error("Error report failed: an unknown error occurred.","message=".concat(e.message)),(0,R.runAfterNotifyHandlers)(i,n.__afterNotifyHandlers,e)}))})),!0},e.prototype.notifyAsync=function(e,t,r){var n=this;return void 0===t&&(t=void 0),void 0===r&&(r=void 0),new Promise((function(o,i){var a,c,u;a=e.afterNotify?e:t&&t.afterNotify?t:r&&r.afterNotify?r:t&&"object"==typeof t?t:r||(t={}),u=(c=a).afterNotify,c.afterNotify=function(e){if(null==u||u.call(n,e),e)return i(e);o()},n.notify(e,t,r)}))},e.prototype.makeNotice=function(e,t,r){void 0===t&&(t=void 0),void 0===r&&(r=void 0);var n=(0,R.makeNotice)(e);t&&"object"!=typeof t&&(t={name:String(t)});if(t&&(n=(0,R.mergeNotice)(n,t)),"object"==typeof r&&null!==r&&(n=(0,R.mergeNotice)(n,r)),(0,R.objectIsEmpty)(n))return null;var o=this.__getStoreContentsOrDefault().context,i=this.__constructTags(n.tags),a=this.__constructTags(o.tags),c=this.__constructTags(this.config.tags),u=i.concat(a).concat(c),s=u.filter((function(e,t){return u.indexOf(e)===t})),l=0;return"string"==typeof(n=(0,R.merge)(n,{name:n.name||"Error",context:(0,R.merge)(o,n.context),projectRoot:n.projectRoot||this.config.projectRoot,environment:n.environment||this.config.environment,component:n.component||this.config.component,action:n.action||this.config.action,revision:n.revision||this.config.revision,tags:s})).stack&&n.stack.trim()||(n.stack=(0,R.generateStackTrace)(),l=2),n.backtrace=(0,R.makeBacktrace)(n.stack,l),n},e.prototype.addBreadcrumb=function(e,t){if(this.config.breadcrumbsEnabled){t=t||{};var r=(0,R.shallowClone)(t.metadata),n=t.category||"custom",o=(new Date).toISOString(),i=this.__store.getStore(),a=i.breadcrumbs;a.push({category:n,message:e,metadata:r,timestamp:o});var c=this.config.maxBreadcrumbs;return a.length>c&&(a=a.slice(a.length-c)),i.breadcrumbs=a,this}},e.prototype.__developmentMode=function(){return!0!==this.config.reportData&&(this.config.environment&&this.config.developmentEnvironments.includes(this.config.environment))},e.prototype.__buildPayload=function(e){var t=(0,R.filter)(e.headers,this.config.filters)||{},r=(0,R.filter)(P(P({},e.cgiData),(0,R.formatCGIData)(t,"HTTP_")),this.config.filters);return{notifier:H,breadcrumbs:{enabled:!!this.config.breadcrumbsEnabled,trail:e.__breadcrumbs||[]},error:{class:e.name,message:e.message,backtrace:e.backtrace,fingerprint:e.fingerprint,tags:e.tags,causes:(0,R.getCauses)(e)},request:{url:(0,R.filterUrl)(e.url,this.config.filters),component:e.component,action:e.action,context:e.context,cgi_data:r,params:(0,R.filter)(e.params,this.config.filters)||{},session:(0,R.filter)(e.session,this.config.filters)||{}},server:{project_root:e.projectRoot,environment_name:e.environment,revision:e.revision,hostname:this.config.hostname,time:(new Date).toUTCString()},details:e.details||{}}},e.prototype.__constructTags=function(e){return e?e.toString().split(M).filter((function(e){return B.test(e)})):[]},e.prototype.__getStoreContentsOrDefault=function(){var e=this.__store.getStore();return P({context:{},breadcrumbs:[]},e||{})},e}();i.Client=A;var D={};Object.defineProperty(D,"__esModule",{value:!0}),function(t){var r=e&&e.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),n=e&&e.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&r(t,e,o);return n(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.Util=t.Types=t.Store=t.Client=void 0;var c=i;Object.defineProperty(t,"Client",{enumerable:!0,get:function(){return c.Client}}),t.Store=o(T),t.Types=o(D),t.Util=o(a)}(o);var I={};function L(e){if(!e||!e.tagName)return"";var t=e.tagName.toLowerCase();if("html"===t)return"";e.id&&(t+="#".concat(e.id));var r=e.getAttribute("class");r&&r.split(/\s+/).forEach((function(e){t+=".".concat(e)})),["alt","name","title","type"].forEach((function(r){var n=e.getAttribute(r);n&&(t+="[".concat(r,'="').concat(n,'"]'))}));var n=function(e){try{var t=e.parentNode.childNodes,r=[];return Array.prototype.forEach.call(t,(function(t){t.tagName&&t.tagName===e.tagName&&r.push(t)})),r}catch(e){return[]}}(e);return n.length>1&&(t+=":nth-child(".concat(Array.prototype.indexOf.call(n,e)+1,")")),t}function q(e){return-1!==e.toString().indexOf("native")}function F(e){var t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/)||{};return{protocol:t[2],host:t[4],pathname:t[5]}}Object.defineProperty(I,"__esModule",{value:!0}),I.preferCatch=I.encodeCookie=I.decodeCookie=I.localURLPathname=I.parseURL=I.nativeFetch=I.stringTextOfElement=I.stringSelectorOfElement=I.stringNameOfElement=void 0,I.stringNameOfElement=L,I.stringSelectorOfElement=function e(t){var r=L(t);if(t.parentNode&&t.parentNode.tagName){var n=e(t.parentNode);if(n.length>0)return"".concat(n," > ").concat(r)}return r},I.stringTextOfElement=function(e){var t=e.textContent||e.innerText||"";return t||"submit"!==e.type&&"button"!==e.type||(t=e.value),function(e,t){e.length>t&&(e=e.substr(0,t)+"...");return e}(t.trim(),300)},I.nativeFetch=function(){if(!window.fetch)return!1;if(q(window.fetch))return!0;try{var e=document.createElement("iframe");e.style.display="none",document.head.appendChild(e);var t=e.contentWindow.fetch&&q(e.contentWindow.fetch);return document.head.removeChild(e),t}catch(e){console&&console.warn&&console.warn("failed to detect native fetch via iframe: "+e)}return!1},I.parseURL=F,I.localURLPathname=function(e){var t=F(e),r=F(document.URL);return t.host&&t.protocol?t.protocol===r.protocol&&t.host===r.host?t.pathname:"".concat(t.protocol,"://").concat(t.host).concat(t.pathname):t.pathname},I.decodeCookie=function(e){var t={};return e.split(/[;,]\s?/).forEach((function(e){var r=e.split("=",2),n=r[0],o=r[1];t[n]=o})),t},I.encodeCookie=function(e){if("object"==typeof e){var t=[];for(var r in e)t.push(r+"="+e[r]);return t.join(";")}},I.preferCatch=function(){var e=!0;if(window.atob||(e=!1),window.ErrorEvent)try{0===new window.ErrorEvent("").colno&&(e=!1)}catch(e){}return e}();var W={};Object.defineProperty(W,"__esModule",{value:!0}),W.onError=W.ignoreNextOnError=void 0;var G,$=o,X=$.Util.instrument,K=$.Util.makeNotice,z=0;W.ignoreNextOnError=function(){z+=1,clearTimeout(G),G=setTimeout((function(){z=0}))},W.onError=function(e){return void 0===e&&(e=window),{load:function(t){X(e,"onerror",(function(e){var r=function(e,r,n,o,i){if(t.logger.debug("window.onerror callback invoked",arguments),z>0)return t.logger.debug("Ignoring window.onerror (error likely reported earlier)",arguments),void(z-=1);if(0===n&&/Script error\.?/.test(e))t.config.enableUncaught&&t.logger.warn("Ignoring cross-domain script error: enable CORS to track these types of errors",arguments);else{var a=K(i);a.name||(a.name="window.onerror"),a.message||(a.message=e),a.stack||(a.stack=[a.message,"\n at ? (",r||"unknown",":",n||0,":",o||0,")"].join("")),t.addBreadcrumb("window.onerror"!==a.name&&a.name?"window.onerror: ".concat(a.name):"window.onerror",{category:"error",metadata:{name:a.name,message:a.message,stack:a.stack}}),t.config.enableUncaught&&t.notify(a)}};return function(t,n,o,i,a){return r(t,n,o,i,a),"function"==typeof e&&e.apply(window,arguments)}}))}}};var J={};Object.defineProperty(J,"__esModule",{value:!0});var V=o.Util.instrument;J.default=function(e){return void 0===e&&(e=window),{load:function(t){t.config.enableUnhandledRejection&&V(e,"onunhandledrejection",(function(e){function r(e){var r;if(t.logger.debug("window.onunhandledrejection callback invoked",arguments),t.config.enableUnhandledRejection){var n=e.reason;if(n instanceof Error){var o="unknown",i=0,a="".concat(n.message,"\n at ? (").concat(o,":").concat(i,")"),c=n.stack||a,u={name:n.name,message:"UnhandledPromiseRejectionWarning: ".concat(n),stack:c};return t.addBreadcrumb("window.onunhandledrejection: ".concat(u.name),{category:"error",metadata:u}),void t.notify(u)}var s="string"==typeof n?n:null!==(r=JSON.stringify(n))&&void 0!==r?r:"Unspecified reason";t.notify({name:"window.onunhandledrejection",message:"UnhandledPromiseRejectionWarning: ".concat(s)})}}return function(t){r(t),"function"==typeof e&&e.apply(this,arguments)}}))}}};var Q={};Object.defineProperty(Q,"__esModule",{value:!0});var Y=o,Z=I,ee=Y.Util.sanitize,te=Y.Util.instrument;Q.default=function(e){return void 0===e&&(e=window),{load:function(t){function r(e){return!0===t.config.breadcrumbsEnabled||(e?!0===t.config.breadcrumbsEnabled[e]:!1!==t.config.breadcrumbsEnabled)}!function(){function n(e){return Array.isArray(e)?e.map((function(e){try{return String(e)}catch(e){return"[unknown]"}})).join(" "):""}r("console")&&["debug","info","warn","error","log"].forEach((function(r){te(e.console,r,(function(o){return function(){var i=Array.prototype.slice.call(arguments),a=n(i),c={category:"log",metadata:{level:r,arguments:ee(i,3)}};t.addBreadcrumb(a,c),"function"==typeof o&&Function.prototype.apply.call(o,e.console,arguments)}}))}))}(),r("dom")&&e.addEventListener("click",(function(e){var r,n,o;try{r=(0,Z.stringNameOfElement)(e.target),n=(0,Z.stringSelectorOfElement)(e.target),o=(0,Z.stringTextOfElement)(e.target)}catch(e){r="UI Click",n="[unknown]",o="[unknown]"}0!==r.length&&t.addBreadcrumb(r,{category:"ui.click",metadata:{selector:n,text:o,event:e}})}),!0),r("network")&&(te(XMLHttpRequest.prototype,"open",(function(e){return function(){var t=this,r=arguments[1],n="string"==typeof arguments[0]?arguments[0].toUpperCase():arguments[0],o="".concat(n," ").concat((0,Z.localURLPathname)(r));this.__hb_xhr={type:"xhr",method:n,url:r,message:o},"function"==typeof e&&e.apply(t,arguments)}})),te(XMLHttpRequest.prototype,"send",(function(e){return function(){var r=this;function n(){if(4===r.readyState){var e=void 0;r.__hb_xhr&&(r.__hb_xhr.status_code=r.status,e=r.__hb_xhr.message,delete r.__hb_xhr.message),t.addBreadcrumb(e||"XMLHttpRequest",{category:"request",metadata:r.__hb_xhr})}}"onreadystatechange"in r&&"function"==typeof r.onreadystatechange?te(r,"onreadystatechange",(function(e){return function(){n(),"function"==typeof e&&e.apply(this,arguments)}})):r.onreadystatechange=n,"function"==typeof e&&e.apply(r,arguments)}}))),r("network")&&(0,Z.nativeFetch)()&&te(e,"fetch",(function(r){return function(){var n,o=arguments[0],i="GET";"string"==typeof o?n=o:"Request"in e&&o instanceof Request?(n=o.url,o.method&&(i=o.method)):n=String(o),arguments[1]&&arguments[1].method&&(i=arguments[1].method),"string"==typeof i&&(i=i.toUpperCase());var a="".concat(i," ").concat((0,Z.localURLPathname)(n)),c={type:"fetch",method:i,url:n};return r.apply(this,arguments).then((function(e){return c.status_code=e.status,t.addBreadcrumb(a,{category:"request",metadata:c}),e})).catch((function(e){throw t.addBreadcrumb("fetch error",{category:"error",metadata:c}),e}))}})),function(){if(r("navigation")){var n=e.location.href;te(e,"onpopstate",(function(t){return function(){if(o(n,e.location.href),t)return t.apply(this,arguments)}})),te(e.history,"pushState",i),te(e.history,"replaceState",i)}function o(e,r){n=r,t.addBreadcrumb("Page changed",{category:"navigation",metadata:{from:e,to:r}})}function i(e){return function(){var t=arguments.length>2?arguments[2]:void 0;return t&&o(n,String(t)),e.apply(this,arguments)}}}()}}};var re={};Object.defineProperty(re,"__esModule",{value:!0});var ne=o.Util.instrument;re.default=function(e){return void 0===e&&(e=window),{load:function(t){!function(){function r(e){return function(r){return function(n,o){if("function"==typeof n){var i=Array.prototype.slice.call(arguments,2);return n=t.__wrap(n,e),r((function(){n.apply(void 0,i)}),o)}return r(n,o)}}}ne(e,"setTimeout",r({component:"setTimeout"})),ne(e,"setInterval",r({component:"setInterval"}))}()}}};var oe={};Object.defineProperty(oe,"__esModule",{value:!0});var ie=o.Util.instrument;oe.default=function(e){return void 0===e&&(e=window),{load:function(t){["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"].forEach((function(r){var n=e[r]&&e[r].prototype;n&&Object.prototype.hasOwnProperty.call(n,"addEventListener")&&(ie(n,"addEventListener",(function(e){var n={component:"".concat(r,".prototype.addEventListener")};return function(r,o,i,a){try{o&&null!=o.handleEvent&&(o.handleEvent=t.__wrap(o.handleEvent,n))}catch(e){t.logger.error(e)}return e.call(this,r,t.__wrap(o,n),i,a)}})),ie(n,"removeEventListener",(function(e){return function(r,n,o,i){return e.call(this,r,n,o,i),e.call(this,r,t.__wrap(n),o,i)}})))}))}}};var ae={};Object.defineProperty(ae,"__esModule",{value:!0}),ae.BrowserTransport=void 0;var ce=o.Util.sanitize,ue=function(){function e(){}return e.prototype.send=function(e,t){return new Promise((function(r,n){try{var o=new XMLHttpRequest;if(o.open(e.method,e.endpoint,e.async),Object.keys(e.headers||[]).length)for(var i in e.headers)void 0!==e.headers[i]&&o.setRequestHeader(i,String(e.headers[i]));o.send(t?JSON.stringify(ce(t,e.maxObjectDepth)):void 0),o.onload=function(){return r({statusCode:o.status,body:o.response})}}catch(e){n(e)}}))},e}();return ae.BrowserTransport=ue,function(t){var r,n=e&&e.__extends||(r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},r(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=e&&e.__assign||function(){return i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)},a=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Types=void 0;var c=o,u=I,s=W,l=a(J),f=a(Q),d=a(re),p=a(oe),g=ae,h=c.Util.merge,m=c.Util.filter,y=c.Util.objectIsExtensible,v=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,i({async:!0,maxErrors:null,projectRoot:window.location.protocol+"//"+window.location.host},t),new g.BrowserTransport)||this;return r.__errorsSent=0,r.__lastWrapErr=void 0,r.__beforeNotifyHandlers=[function(e){return r.__exceedsMaxErrors()?(r.logger.debug("Dropping notice: max errors exceeded",e),!1):(e&&!e.url&&(e.url=document.URL),r.__incrementErrorsCount(),!0)}],r}return n(t,e),t.prototype.configure=function(t){return void 0===t&&(t={}),e.prototype.configure.call(this,t)},t.prototype.resetMaxErrors=function(){return this.__errorsSent=0},t.prototype.factory=function(e){return new t(e)},t.prototype.checkIn=function(e){throw new Error("Honeybadger.checkIn() is not supported on the browser")},t.prototype.__buildPayload=function(t){var r,n={HTTP_USER_AGENT:void 0,HTTP_REFERER:void 0,HTTP_COOKIE:void 0};n.HTTP_USER_AGENT=navigator.userAgent,document.referrer.match(/\S/)&&(n.HTTP_REFERER=document.referrer),(r="string"==typeof t.cookies?(0,u.decodeCookie)(t.cookies):t.cookies)&&(n.HTTP_COOKIE=(0,u.encodeCookie)(m(r,this.config.filters)));var o=e.prototype.__buildPayload.call(this,t);return o.request.cgi_data=h(n,o.request.cgi_data),o},t.prototype.__wrap=function(e,t){void 0===t&&(t={});var r=e;t||(t={});try{if("function"!=typeof r)return r;if(!y(r))return r;if(!r.___hb){var n=this;r.___hb=function(){if(!u.preferCatch)return r.apply(this,arguments);try{return r.apply(this,arguments)}catch(e){if(n.__lastWrapErr===e)throw e;throw n.__lastWrapErr=e,(0,s.ignoreNextOnError)(),n.addBreadcrumb(t.component?"".concat(t.component,": ").concat(e.name):e.name,{category:"error",metadata:{message:e.message,name:e.name,stack:e.stack}}),n.config.enableUncaught&&n.notify(e),e}}}return r.___hb.___hb=r.___hb,r.___hb}catch(e){return r}},t.prototype.__incrementErrorsCount=function(){return this.__errorsSent++},t.prototype.__exceedsMaxErrors=function(){return this.config.maxErrors&&this.__errorsSent>=this.config.maxErrors},t}(c.Client),b=o;Object.defineProperty(t,"Types",{enumerable:!0,get:function(){return b.Types}}),t.default=new v({__plugins:[(0,s.onError)(),(0,l.default)(),(0,d.default)(),(0,p.default)(),(0,f.default)()]})}(n),t(n)})); | ||
//# sourceMappingURL=honeybadger.min.js.map |
@@ -15,4 +15,5 @@ import { Client, Types } from '@honeybadger-io/core'; | ||
} | ||
export { Types } from '@honeybadger-io/core'; | ||
declare const _default: Honeybadger; | ||
export default _default; | ||
//# sourceMappingURL=server.d.ts.map |
{ | ||
"name": "@honeybadger-io/js", | ||
"version": "4.2.0", | ||
"version": "4.3.0", | ||
"license": "MIT", | ||
"homepage": "https://github.com/honeybadger-io/honeybadger-js", | ||
"homepage": "https://github.com/honeybadger-io/honeybadger-js/tree/master/packages/js", | ||
"author": { | ||
@@ -53,3 +53,3 @@ "name": "Joshua Wood", | ||
"dependencies": { | ||
"@honeybadger-io/core": "^4.2.0", | ||
"@honeybadger-io/core": "^4.3.0", | ||
"@types/aws-lambda": "^8.10.89" | ||
@@ -78,3 +78,3 @@ }, | ||
}, | ||
"gitHead": "8f6f98647326755f8a3854068e68d2357651a34b" | ||
"gitHead": "c5aff95bcaf716d5df122e5225c217b5e3c2620e" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
458762
3755
Updated@honeybadger-io/core@^4.3.0