"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("@babel/runtime/helpers/defineProperty"));function t(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(e);r&&(c=c.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,c)}return t}function c(e){for(var c=1;c<arguments.length;c++){var a=null!=arguments[c]?arguments[c]:{};c%2?t(Object(a),!0).forEach((function(t){r.default(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):t(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var a=/corva\.ai\/(.+?)\/packages/,n=/app\/(.+?)\/.*\.chunk\.js/;exports.attachHTTPHeaders=function(e){var r=e.config,t=e.appKey,a=c({},r.headers||{});return t&&(a["x-corva-app"]=t),c(c({},r),{},{headers:a})},exports.getAppKeyFromStackTrace=function(){var e=Error.stackTraceLimit;Error.stackTraceLimit=300;var r=new Error,t=r.stack.match(a)||r.stack.match(n);return Error.stackTraceLimit=e,t?t[1].replace("/app/","."):null};
