{"version":3,"sources":["webpack:///./node_modules/@sentry/core/esm/transports/noop.js","webpack:///./node_modules/@sentry/browser/esm/integrations/index.js","webpack:///./node_modules/@sentry/browser/esm/backend.js","webpack:///./node_modules/@sentry/browser/esm/client.js","webpack:///./node_modules/@sentry/core/esm/request.js","webpack:///./node_modules/@sentry/utils/esm/supports.js","webpack:///./node_modules/@sentry/utils/esm/is.js","webpack:///./node_modules/@sentry/hub/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@sentry/browser/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@sentry/core/esm/integrations/functiontostring.js","webpack:///./node_modules/@sentry/core/esm/integrations/inboundfilters.js","webpack:///./node_modules/@sentry/core/esm/index.js","webpack:///./node_modules/@sentry/browser/esm/transports/index.js","webpack:///./node_modules/@sentry/browser/esm/integrations/breadcrumbs.js","webpack:///./node_modules/@sentry/browser/esm/integrations/trycatch.js","webpack:///./node_modules/@sentry/browser/esm/integrations/globalhandlers.js","webpack:///./node_modules/@sentry/browser/esm/integrations/linkederrors.js","webpack:///./node_modules/@sentry/browser/esm/integrations/useragent.js","webpack:///./node_modules/@sentry/core/esm/sdk.js","webpack:///./node_modules/@sentry/browser/esm/transports/fetch.js","webpack:///./node_modules/@sentry/core/esm/api.js","webpack:///./node_modules/@sentry/browser/esm/transports/xhr.js","webpack:///./node_modules/@sentry/core/esm/basebackend.js","webpack:///./node_modules/@sentry/core/esm/integration.js","webpack:///./node_modules/@sentry/core/esm/baseclient.js","webpack:///./node_modules/@sentry/utils/esm/memo.js","webpack:///./node_modules/@sentry/hub/esm/hub.js","webpack:///./node_modules/@sentry/browser/esm/index.js","webpack:///./node_modules/@sentry/utils/esm/object.js","webpack:///./node_modules/@sentry/minimal/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@sentry/minimal/esm/index.js","webpack:///(webpack)/buildin/harmony-module.js","webpack:///./node_modules/@sentry/utils/esm/dsn.js","webpack:///./node_modules/@sentry/utils/esm/logger.js","webpack:///./node_modules/@sentry/core/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@sentry/utils/esm/syncpromise.js","webpack:///./node_modules/@sentry/hub/esm/index.js","webpack:///./node_modules/@sentry/utils/node_modules/tslib/tslib.es6.js","webpack:///./node_modules/@sentry/browser/esm/helpers.js","webpack:///./node_modules/@sentry/browser/esm/sdk.js","webpack:///./node_modules/@sentry/utils/esm/polyfill.js","webpack:///./node_modules/@sentry/utils/esm/error.js","webpack:///./node_modules/@sentry/hub/esm/scope.js","webpack:///./node_modules/@sentry/utils/esm/string.js","webpack:///./node_modules/@sentry/types/esm/index.js","webpack:///./node_modules/@sentry/types/esm/status.js","webpack:///./node_modules/@sentry/browser/esm/tracekit.js","webpack:///./node_modules/@sentry/browser/esm/version.js","webpack:///./node_modules/@sentry/browser/esm/parsers.js","webpack:///./node_modules/@sentry/utils/esm/misc.js","webpack:///./node_modules/@sentry/utils/esm/instrument.js","webpack:///./node_modules/@sentry/utils/esm/promisebuffer.js","webpack:///./node_modules/@sentry/browser/esm/transports/base.js","webpack:///./node_modules/@sentry/browser/esm/eventbuilder.js","webpack:///./node_modules/@sentry/types/esm/severity.js"],"names":["NoopTransport","prototype","sendEvent","_","resolve","reason","status","Skipped","close","_super","BrowserBackend","apply","this","arguments","_setupTransport","_options","dsn","call","transportOptions","transport","supports","eventFromException","exception","hint","syntheticException","undefined","event","attachStacktrace","handled","type","level","Error","event_id","eventFromMessage","message","Info","BrowserClient","options","_prepareEvent","scope","platform","sdk","name","packages","version","_sendEvent","integration","getIntegration","addSentryBreadcrumb","showReportDialog","document","_isEnabled","getDsn","eventId","script","createElement","async","src","getReportDialogEndpoint","onLoad","onload","head","body","appendChild","logger","error","eventToSentryRequest","api","useEnvelope","req","JSON","stringify","url","getEnvelopeEndpointWithUrlEncodedAuth","getStoreEndpointWithUrlEncodedAuth","envelope","sent_at","Date","toISOString","supportsFetch","Headers","Request","Response","e","isNativeFetch","func","test","toString","supportsNativeFetch","global","fetch","result","doc","sandbox","hidden","contentWindow","removeChild","err","warn","supportsReferrerPolicy","referrerPolicy","supportsHistory","chrome","isChromePackagedApp","app","runtime","hasHistoryApi","history","pushState","replaceState","isError","wat","Object","isInstanceOf","isErrorEvent","isDOMError","isDOMException","isString","isPrimitive","isPlainObject","isEvent","Event","isElement","Element","isRegExp","isThenable","Boolean","then","isSyntheticEvent","base","_e","__assign","assign","t","s","i","n","length","p","hasOwnProperty","__read","o","m","Symbol","iterator","r","ar","next","done","push","value","__spread","concat","extendStatics","d","b","setPrototypeOf","__proto__","Array","__extends","__","constructor","create","originalFunctionToString","FunctionToString","id","setupOnce","Function","args","_i","context","__sentry_original__","DEFAULT_IGNORE_ERRORS","InboundFilters","hub","self","client","getClient","clientOptions","getOptions","_mergeOptions","_shouldDropEvent","_isSentryError","_isIgnoredError","_isBlacklistedUrl","_getEventFilterUrl","_isWhitelistedUrl","ignoreInternal","values","_oO","ignoreErrors","_getPossibleEventMessages","some","pattern","blacklistUrls","whitelistUrls","_a","_b","_c","oO","stacktrace","frames_1","frames","filename","frames_2","Breadcrumbs","console","dom","sentry","xhr","addBreadcrumb","category","_consoleBreadcrumb","handlerData","breadcrumb","data","fromString","slice","input","_domBreadcrumb","target","_xhrBreadcrumb","endTimestamp","__sentry_own_request__","__sentry_xhr__","_fetchBreadcrumb","fetchData","match","method","status_code","response","_historyBreadcrumb","from","to","parsedLoc","location","href","parsedFrom","parsedTo","path","protocol","host","relative","_this","callback","DEFAULT_EVENT_TARGET","TryCatch","XMLHttpRequest","eventTarget","requestAnimationFrame","setInterval","setTimeout","_wrapTimeFunction","original","originalCallback","mechanism","function","_wrapRAF","handler","_wrapEventTarget","proto","eventName","fn","handleEvent","bind","__sentry_wrapped__","_wrapXHR","originalSend","xmlHttpRequestProps","forEach","prop","wrapOptions","isArray","GlobalHandlers","_onErrorHandlerInstalled","_onUnhandledRejectionHandlerInstalled","onerror","onunhandledrejection","stackTraceLimit","log","_installGlobalOnErrorHandler","_installGlobalOnUnhandledRejectionHandler","currentHub","hasIntegration","isFailedOwnDelivery","_eventFromIncompleteOnError","msg","line","column","_enhanceEventWithInitialFrame","rejection","captureEvent","originalException","detail","_eventFromIncompleteRejection","groups","colno","isNaN","parseInt","lineno","in_app","LinkedErrors","_key","key","_limit","limit","_handler","linkedErrors","_walkErrorTree","stack","UserAgent","navigator","request","headers","userAgent","initAndBind","clientClass","debug","enable","bindClient","FetchTransport","_disabledUntil","now","Promise","reject","sentryReq","_api","fetchParameters","_buffer","add","fromHttpCode","Success","RateLimit","get","catch","API","_dsnObject","getBaseApiEndpoint","port","getStoreEndpoint","_getIngestEndpoint","_getEnvelopeEndpoint","projectId","_encodedAuth","auth","sentry_key","user","sentry_version","getStoreEndpointPath","getRequestHeaders","clientName","clientVersion","header","pass","join","dialogOptions","endpoint","encodedOptions","encodeURIComponent","email","XHRTransport","onreadystatechange","readyState","getResponseHeader","open","setRequestHeader","send","BaseBackend","_transport","_exception","_hint","_message","_level","getTransport","installedIntegrations","setupIntegrations","integrations","defaultIntegrations","userIntegrations","userIntegrationsNames_1","map","pickedIntegrationsNames_1","defaultIntegration","indexOf","userIntegration","integrationsNames","splice","getIntegrationsToSetup","setupIntegration","BaseClient","backendClass","_integrations","_processing","_backend","_dsn","captureException","_getBackend","captureMessage","is","_processEvent","finalEvent","flush","timeout","_isClientProcessing","clearInterval","interval","transportFlushed","ready","enabled","ticked","normalizeDepth","prepared","timestamp","_applyClientOptions","_applyIntegrationsMetadata","finalScope","captureContext","clone","update","applyToEvent","evt","_normalizeEvent","depth","normalized","breadcrumbs","contexts","extra","trace","environment","release","dist","maxValueLength","sdkInfo","integrationsArray","keys","beforeSend","sampleRate","isTransaction","Math","random","__sentry__","beforeSendResult","_handleAsyncBeforeSend","processedEvent","Memo","_hasWeakSet","WeakSet","_inner","memoize","obj","has","unmemoize","delete","Hub","_version","_stack","_invokeClient","top","getStackTop","isOlderThan","pushScope","getStack","parentScope","popScope","pop","withScope","getScope","_lastEventId","finalHint","lastEventId","beforeBreadcrumb","maxBreadcrumbs","mergedBreadcrumb","finalBreadcrumb","min","setUser","setTags","tags","setExtras","extras","setTag","setExtra","setContext","configureScope","run","oldHub","makeMain","startSpan","_callExtensionMethod","startTransaction","traceHeaders","carrier","getMainCarrier","__SENTRY__","extensions","registry","getHubFromCarrier","setHubOnCarrier","getCurrentHub","hasHubOnCarrier","activeDomain","active","registryHubTopStack","_Oo","getHubFromActiveDomain","windowIntegrations","_window","Sentry","Integrations","INTEGRATIONS","fill","source","replacement","wrapped","defineProperties","enumerable","urlEncode","object","getWalkSource","event_1","currentTarget","CustomEvent","jsonSize","encodeURI","split","utf8Length","normalizeToSize","maxSize","serialized","normalize","normalizeValue","_events","window","walk","memo","Infinity","serializeValue","toJSON","acc","innerKey","parse","extractExceptionKeysForMessage","maxLength","sort","includedKeys","callOnHub","module","exports","originalModule","webpackPolyfill","children","defineProperty","l","DSN_REGEX","Dsn","_fromString","_fromComponents","_validate","withPassword","str","exec","projectMatch","components","component","ERROR_MESSAGE","PREFIX","Logger","_enabled","disable","States","SyncPromise","executor","_state","PENDING","_handlers","_resolve","_setResult","RESOLVED","_reject","REJECTED","state","_value","_executeHandlers","_attachHandler","cachedHandlers","onfulfilled","onrejected","all","collection","counter","resolvedCollection","item","index","TypeError","val","finally","onfinally","isRejected","__values","ignoreOnError","shouldIgnoreOnError","ignoreNextOnError","wrap","before","sentryWrapped","wrappedArguments","arg","ex","addEventProcessor","property","getOwnPropertyDescriptor","configurable","init","window_1","SENTRY_RELEASE","forceLoad","SentryError","_newTarget","Scope","_notifyingListeners","_scopeListeners","_eventProcessors","_breadcrumbs","_user","_tags","_extra","_contexts","addScopeListener","_notifyScopeListeners","_notifyEventProcessors","processors","processor","final","setFingerprint","fingerprint","_fingerprint","setLevel","setTransaction","transaction","_transaction","setSpan","span","_span","getSpan","newScope","updatedScope","clear","clearBreadcrumbs","_applyFingerprint","getTraceContext","getGlobalEventProcessors","globalEventProcessors","addGlobalEventProcessor","truncate","max","substr","snipLine","newLine","ll","start","end","safeJoin","delimiter","output","String","isMatchingPattern","Status","code","Invalid","Failed","Unknown","gecko","winjs","geckoEval","chromeEval","computeStackTrace","popSize","framesToPop","parts","opera10Regex","opera11Regex","lines","element","extractMessage","computeStackTraceFromStacktraceProp","popFrames","submatch","isNative","columnNumber","computeStackTraceFromStackProp","failed","SDK_NAME","SDK_VERSION","exceptionFromStacktrace","prepareFramesForEvent","eventFromPlainObject","__serialized__","eventFromStacktrace","localStack","firstFrameFunction","lastFrameFunction","frame","reverse","isNodeEnv","process","fallbackGlobalObject","getGlobalObject","uuid4","crypto","msCrypto","getRandomValues","arr","Uint16Array","pad","num","v","replace","c","parseUrl","query","fragment","getEventDescription","consoleSandbox","originalConsole","wrappedLevels","addExceptionTypeValue","addExceptionMechanism","getLocationHref","htmlTreeAsString","elem","currentElem","out","height","len","sepLength","nextStr","_htmlElementAsString","parentNode","el","className","classes","attr","tagName","toLowerCase","attrWhitelist","getAttribute","INITIAL_TIME","prevNow","performanceFallback","timeOrigin","crossPlatformPerformance","require","performance","timing","navigationStart","timestampWithMs","parseRetryAfterHeader","headerDelay","headerDate","getFunctionName","lastHref","handlers","instrumented","instrument","originalConsoleLevel","triggerHandlers","instrumentConsole","addEventListener","domEventHandler","keypressEventHandler","innerOriginal","instrumentDOM","xhrproto","originalOpen","toUpperCase","onreadystatechangeHandler","startTimestamp","readyStateArgs","instrumentXHR","originalFetch","commonHandlerData","getFetchMethod","getFetchUrl","instrumentFetch","oldOnPopState","onpopstate","historyReplacementFunction","originalHistoryFunction","instrumentHistory","_oldOnErrorHandler","_oldOnUnhandledRejectionHandler","addInstrumentationHandler","e_1","e_1_1","return","fetchArgs","keypressTimeout","lastCapturedEvent","debounceTimer","debounce","clearTimeout","isContentEditable","PromiseBuffer","isReady","task","remove","drain","capturedSetTimeout","BaseTransport","eventFromUnknownInput","domException","name_1","eventFromString","objectException","synthetic","Severity","Debug","Warning","Fatal","Critical","Log"],"mappings":";0FAAA,sDAGIA,EAA+B,WAC/B,SAAS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5wB,KACpB,IAAK,OACL,IAAK,UACD,OAAO4wB,EAASE,QACpB,IAAK,QACD,OAAOF,EAAShxB,MACpB,IAAK,QACD,OAAOgxB,EAASG,MACpB,IAAK,WACD,OAAOH,EAASI,SACpB,IAAK,MACL,QACI,OAAOJ,EAASK,MAxBhC,CA4BGL,IAAaA,EAAW","file":"js/5-a77883d171c48554b009.chunk.js","sourcesContent":["import { Status } from '@sentry/types';\nimport { SyncPromise } from '@sentry/utils';\n/** Noop transport */\nvar NoopTransport = /** @class */ (function () {\n function NoopTransport() {\n }\n /**\n * @inheritDoc\n */\n NoopTransport.prototype.sendEvent = function (_) {\n return SyncPromise.resolve({\n reason: \"NoopTransport: Event has been skipped because no Dsn is configured.\",\n status: Status.Skipped,\n });\n };\n /**\n * @inheritDoc\n */\n NoopTransport.prototype.close = function (_) {\n return SyncPromise.resolve(true);\n };\n return NoopTransport;\n}());\nexport { NoopTransport };\n//# sourceMappingURL=noop.js.map","export { GlobalHandlers } from './globalhandlers';\nexport { TryCatch } from './trycatch';\nexport { Breadcrumbs } from './breadcrumbs';\nexport { LinkedErrors } from './linkederrors';\nexport { UserAgent } from './useragent';\n//# sourceMappingURL=index.js.map","import * as tslib_1 from \"tslib\";\nimport { BaseBackend } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addExceptionMechanism, supportsFetch, SyncPromise } from '@sentry/utils';\nimport { eventFromString, eventFromUnknownInput } from './eventbuilder';\nimport { FetchTransport, XHRTransport } from './transports';\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nvar BrowserBackend = /** @class */ (function (_super) {\n tslib_1.__extends(BrowserBackend, _super);\n function BrowserBackend() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype._setupTransport = function () {\n if (!this._options.dsn) {\n // We return the noop transport here in case there is no Dsn.\n return _super.prototype._setupTransport.call(this);\n }\n var transportOptions = tslib_1.__assign({}, this._options.transportOptions, { dsn: this._options.dsn });\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n return new FetchTransport(transportOptions);\n }\n return new XHRTransport(transportOptions);\n };\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype.eventFromException = function (exception, hint) {\n var syntheticException = (hint && hint.syntheticException) || undefined;\n var event = eventFromUnknownInput(exception, syntheticException, {\n attachStacktrace: this._options.attachStacktrace,\n });\n addExceptionMechanism(event, {\n handled: true,\n type: 'generic',\n });\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n };\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype.eventFromMessage = function (message, level, hint) {\n if (level === void 0) { level = Severity.Info; }\n var syntheticException = (hint && hint.syntheticException) || undefined;\n var event = eventFromString(message, syntheticException, {\n attachStacktrace: this._options.attachStacktrace,\n });\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return SyncPromise.resolve(event);\n };\n return BrowserBackend;\n}(BaseBackend));\nexport { BrowserBackend };\n//# sourceMappingURL=backend.js.map","import * as tslib_1 from \"tslib\";\nimport { API, BaseClient } from '@sentry/core';\nimport { getGlobalObject, logger } from '@sentry/utils';\nimport { BrowserBackend } from './backend';\nimport { Breadcrumbs } from './integrations';\nimport { SDK_NAME, SDK_VERSION } from './version';\n/**\n * The Sentry Browser SDK Client.\n *\n * @see BrowserOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nvar BrowserClient = /** @class */ (function (_super) {\n tslib_1.__extends(BrowserClient, _super);\n /**\n * Creates a new Browser SDK instance.\n *\n * @param options Configuration options for this SDK.\n */\n function BrowserClient(options) {\n if (options === void 0) { options = {}; }\n return _super.call(this, BrowserBackend, options) || this;\n }\n /**\n * @inheritDoc\n */\n BrowserClient.prototype._prepareEvent = function (event, scope, hint) {\n event.platform = event.platform || 'javascript';\n event.sdk = tslib_1.__assign({}, event.sdk, { name: SDK_NAME, packages: tslib_1.__spread(((event.sdk && event.sdk.packages) || []), [\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ]), version: SDK_VERSION });\n return _super.prototype._prepareEvent.call(this, event, scope, hint);\n };\n /**\n * @inheritDoc\n */\n BrowserClient.prototype._sendEvent = function (event) {\n var integration = this.getIntegration(Breadcrumbs);\n if (integration) {\n integration.addSentryBreadcrumb(event);\n }\n _super.prototype._sendEvent.call(this, event);\n };\n /**\n * Show a report dialog to the user to send feedback to a specific event.\n *\n * @param options Set individual options for the dialog\n */\n BrowserClient.prototype.showReportDialog = function (options) {\n if (options === void 0) { options = {}; }\n // doesn't work without a document (React Native)\n var document = getGlobalObject().document;\n if (!document) {\n return;\n }\n if (!this._isEnabled()) {\n logger.error('Trying to call showReportDialog with Sentry Client is disabled');\n return;\n }\n var dsn = options.dsn || this.getDsn();\n if (!options.eventId) {\n logger.error('Missing `eventId` option in showReportDialog call');\n return;\n }\n if (!dsn) {\n logger.error('Missing `Dsn` option in showReportDialog call');\n return;\n }\n var script = document.createElement('script');\n script.async = true;\n script.src = new API(dsn).getReportDialogEndpoint(options);\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n (document.head || document.body).appendChild(script);\n };\n return BrowserClient;\n}(BaseClient));\nexport { BrowserClient };\n//# sourceMappingURL=client.js.map","import { timestampWithMs } from '@sentry/utils';\n/** Creates a SentryRequest from an event. */\nexport function eventToSentryRequest(event, api) {\n var useEnvelope = event.type === 'transaction';\n var req = {\n body: JSON.stringify(event),\n url: useEnvelope ? api.getEnvelopeEndpointWithUrlEncodedAuth() : api.getStoreEndpointWithUrlEncodedAuth(),\n };\n // https://develop.sentry.dev/sdk/envelopes/\n // Since we don't need to manipulate envelopes nor store them, there is no\n // exported concept of an Envelope with operations including serialization and\n // deserialization. Instead, we only implement a minimal subset of the spec to\n // serialize events inline here.\n if (useEnvelope) {\n var envelopeHeaders = JSON.stringify({\n event_id: event.event_id,\n // We need to add * 1000 since we divide it by 1000 by default but JS works with ms precision\n // The reason we use timestampWithMs here is that all clocks across the SDK use the same clock\n sent_at: new Date(timestampWithMs() * 1000).toISOString(),\n });\n var itemHeaders = JSON.stringify({\n type: event.type,\n });\n // The trailing newline is optional. We intentionally don't send it to avoid\n // sending unnecessary bytes.\n //\n // const envelope = `${envelopeHeaders}\\n${itemHeaders}\\n${req.body}\\n`;\n var envelope = envelopeHeaders + \"\\n\" + itemHeaders + \"\\n\" + req.body;\n req.body = envelope;\n }\n return req;\n}\n//# sourceMappingURL=request.js.map","import { logger } from './logger';\nimport { getGlobalObject } from './misc';\n/**\n * Tells whether current environment supports ErrorEvent objects\n * {@link supportsErrorEvent}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsErrorEvent() {\n try {\n // tslint:disable:no-unused-expression\n new ErrorEvent('');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMError objects\n * {@link supportsDOMError}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMError() {\n try {\n // It really needs 1 argument, not 0.\n // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':\n // 1 argument required, but only 0 present.\n // @ts-ignore\n // tslint:disable:no-unused-expression\n new DOMError('');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports DOMException objects\n * {@link supportsDOMException}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsDOMException() {\n try {\n // tslint:disable:no-unused-expression\n new DOMException('');\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports Fetch API\n * {@link supportsFetch}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsFetch() {\n if (!('fetch' in getGlobalObject())) {\n return false;\n }\n try {\n // tslint:disable-next-line:no-unused-expression\n new Headers();\n // tslint:disable-next-line:no-unused-expression\n new Request('');\n // tslint:disable-next-line:no-unused-expression\n new Response();\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * isNativeFetch checks if the given function is a native implementation of fetch()\n */\nfunction isNativeFetch(func) {\n return func && /^function fetch\\(\\)\\s+\\{\\s+\\[native code\\]\\s+\\}$/.test(func.toString());\n}\n/**\n * Tells whether current environment supports Fetch API natively\n * {@link supportsNativeFetch}.\n *\n * @returns true if `window.fetch` is natively implemented, false otherwise\n */\nexport function supportsNativeFetch() {\n if (!supportsFetch()) {\n return false;\n }\n var global = getGlobalObject();\n // Fast path to avoid DOM I/O\n // tslint:disable-next-line:no-unbound-method\n if (isNativeFetch(global.fetch)) {\n return true;\n }\n // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)\n // so create a \"pure\" iframe to see if that has native fetch\n var result = false;\n var doc = global.document;\n // tslint:disable-next-line:no-unbound-method deprecation\n if (doc && typeof doc.createElement === \"function\") {\n try {\n var sandbox = doc.createElement('iframe');\n sandbox.hidden = true;\n doc.head.appendChild(sandbox);\n if (sandbox.contentWindow && sandbox.contentWindow.fetch) {\n // tslint:disable-next-line:no-unbound-method\n result = isNativeFetch(sandbox.contentWindow.fetch);\n }\n doc.head.removeChild(sandbox);\n }\n catch (err) {\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);\n }\n }\n return result;\n}\n/**\n * Tells whether current environment supports ReportingObserver API\n * {@link supportsReportingObserver}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReportingObserver() {\n // tslint:disable-next-line: no-unsafe-any\n return 'ReportingObserver' in getGlobalObject();\n}\n/**\n * Tells whether current environment supports Referrer Policy API\n * {@link supportsReferrerPolicy}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsReferrerPolicy() {\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n if (!supportsFetch()) {\n return false;\n }\n try {\n // tslint:disable:no-unused-expression\n new Request('_', {\n referrerPolicy: 'origin',\n });\n return true;\n }\n catch (e) {\n return false;\n }\n}\n/**\n * Tells whether current environment supports History API\n * {@link supportsHistory}.\n *\n * @returns Answer to the given question.\n */\nexport function supportsHistory() {\n // NOTE: in Chrome App environment, touching history.pushState, *even inside\n // a try/catch block*, will cause Chrome to output an error to console.error\n // borrowed from: https://github.com/angular/angular.js/pull/13945/files\n var global = getGlobalObject();\n var chrome = global.chrome;\n // tslint:disable-next-line:no-unsafe-any\n var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;\n var hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;\n return !isChromePackagedApp && hasHistoryApi;\n}\n//# sourceMappingURL=supports.js.map","/**\n * Checks whether given value's type is one of a few Error or Error-like\n * {@link isError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isError(wat) {\n switch (Object.prototype.toString.call(wat)) {\n case '[object Error]':\n return true;\n case '[object Exception]':\n return true;\n case '[object DOMException]':\n return true;\n default:\n return isInstanceOf(wat, Error);\n }\n}\n/**\n * Checks whether given value's type is ErrorEvent\n * {@link isErrorEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isErrorEvent(wat) {\n return Object.prototype.toString.call(wat) === '[object ErrorEvent]';\n}\n/**\n * Checks whether given value's type is DOMError\n * {@link isDOMError}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMError(wat) {\n return Object.prototype.toString.call(wat) === '[object DOMError]';\n}\n/**\n * Checks whether given value's type is DOMException\n * {@link isDOMException}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isDOMException(wat) {\n return Object.prototype.toString.call(wat) === '[object DOMException]';\n}\n/**\n * Checks whether given value's type is a string\n * {@link isString}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isString(wat) {\n return Object.prototype.toString.call(wat) === '[object String]';\n}\n/**\n * Checks whether given value's is a primitive (undefined, null, number, boolean, string)\n * {@link isPrimitive}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPrimitive(wat) {\n return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');\n}\n/**\n * Checks whether given value's type is an object literal\n * {@link isPlainObject}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isPlainObject(wat) {\n return Object.prototype.toString.call(wat) === '[object Object]';\n}\n/**\n * Checks whether given value's type is an Event instance\n * {@link isEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isEvent(wat) {\n // tslint:disable-next-line:strict-type-predicates\n return typeof Event !== 'undefined' && isInstanceOf(wat, Event);\n}\n/**\n * Checks whether given value's type is an Element instance\n * {@link isElement}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isElement(wat) {\n // tslint:disable-next-line:strict-type-predicates\n return typeof Element !== 'undefined' && isInstanceOf(wat, Element);\n}\n/**\n * Checks whether given value's type is an regexp\n * {@link isRegExp}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isRegExp(wat) {\n return Object.prototype.toString.call(wat) === '[object RegExp]';\n}\n/**\n * Checks whether given value has a then function.\n * @param wat A value to be checked.\n */\nexport function isThenable(wat) {\n // tslint:disable:no-unsafe-any\n return Boolean(wat && wat.then && typeof wat.then === 'function');\n // tslint:enable:no-unsafe-any\n}\n/**\n * Checks whether given value's type is a SyntheticEvent\n * {@link isSyntheticEvent}.\n *\n * @param wat A value to be checked.\n * @returns A boolean representing the result.\n */\nexport function isSyntheticEvent(wat) {\n // tslint:disable-next-line:no-unsafe-any\n return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;\n}\n/**\n * Checks whether given value's type is an instance of provided constructor.\n * {@link isInstanceOf}.\n *\n * @param wat A value to be checked.\n * @param base A constructor to be used in a check.\n * @returns A boolean representing the result.\n */\nexport function isInstanceOf(wat, base) {\n try {\n // tslint:disable-next-line:no-unsafe-any\n return wat instanceof base;\n }\n catch (_e) {\n return false;\n }\n}\n//# sourceMappingURL=is.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","var originalFunctionToString;\n/** Patch toString calls to return proper name for wrapped functions */\nvar FunctionToString = /** @class */ (function () {\n function FunctionToString() {\n /**\n * @inheritDoc\n */\n this.name = FunctionToString.id;\n }\n /**\n * @inheritDoc\n */\n FunctionToString.prototype.setupOnce = function () {\n originalFunctionToString = Function.prototype.toString;\n Function.prototype.toString = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var context = this.__sentry_original__ || this;\n // tslint:disable-next-line:no-unsafe-any\n return originalFunctionToString.apply(context, args);\n };\n };\n /**\n * @inheritDoc\n */\n FunctionToString.id = 'FunctionToString';\n return FunctionToString;\n}());\nexport { FunctionToString };\n//# sourceMappingURL=functiontostring.js.map","import * as tslib_1 from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';\n// \"Script error.\" is hard coded into browsers for errors that it can't read.\n// this is the result of a script being pulled in from an external domain and CORS.\nvar DEFAULT_IGNORE_ERRORS = [/^Script error\\.?$/, /^Javascript error: Script error\\.? on line 0$/];\n/** Inbound filters configurable by the user */\nvar InboundFilters = /** @class */ (function () {\n function InboundFilters(_options) {\n if (_options === void 0) { _options = {}; }\n this._options = _options;\n /**\n * @inheritDoc\n */\n this.name = InboundFilters.id;\n }\n /**\n * @inheritDoc\n */\n InboundFilters.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event) {\n var hub = getCurrentHub();\n if (!hub) {\n return event;\n }\n var self = hub.getIntegration(InboundFilters);\n if (self) {\n var client = hub.getClient();\n var clientOptions = client ? client.getOptions() : {};\n var options = self._mergeOptions(clientOptions);\n if (self._shouldDropEvent(event, options)) {\n return null;\n }\n }\n return event;\n });\n };\n /** JSDoc */\n InboundFilters.prototype._shouldDropEvent = function (event, options) {\n if (this._isSentryError(event, options)) {\n logger.warn(\"Event dropped due to being internal Sentry Error.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n if (this._isIgnoredError(event, options)) {\n logger.warn(\"Event dropped due to being matched by `ignoreErrors` option.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n if (this._isBlacklistedUrl(event, options)) {\n logger.warn(\"Event dropped due to being matched by `blacklistUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + this._getEventFilterUrl(event));\n return true;\n }\n if (!this._isWhitelistedUrl(event, options)) {\n logger.warn(\"Event dropped due to not being matched by `whitelistUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + this._getEventFilterUrl(event));\n return true;\n }\n return false;\n };\n /** JSDoc */\n InboundFilters.prototype._isSentryError = function (event, options) {\n if (options === void 0) { options = {}; }\n if (!options.ignoreInternal) {\n return false;\n }\n try {\n return ((event &&\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].type === 'SentryError') ||\n false);\n }\n catch (_oO) {\n return false;\n }\n };\n /** JSDoc */\n InboundFilters.prototype._isIgnoredError = function (event, options) {\n if (options === void 0) { options = {}; }\n if (!options.ignoreErrors || !options.ignoreErrors.length) {\n return false;\n }\n return this._getPossibleEventMessages(event).some(function (message) {\n // Not sure why TypeScript complains here...\n return options.ignoreErrors.some(function (pattern) { return isMatchingPattern(message, pattern); });\n });\n };\n /** JSDoc */\n InboundFilters.prototype._isBlacklistedUrl = function (event, options) {\n if (options === void 0) { options = {}; }\n // TODO: Use Glob instead?\n if (!options.blacklistUrls || !options.blacklistUrls.length) {\n return false;\n }\n var url = this._getEventFilterUrl(event);\n return !url ? false : options.blacklistUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });\n };\n /** JSDoc */\n InboundFilters.prototype._isWhitelistedUrl = function (event, options) {\n if (options === void 0) { options = {}; }\n // TODO: Use Glob instead?\n if (!options.whitelistUrls || !options.whitelistUrls.length) {\n return true;\n }\n var url = this._getEventFilterUrl(event);\n return !url ? true : options.whitelistUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });\n };\n /** JSDoc */\n InboundFilters.prototype._mergeOptions = function (clientOptions) {\n if (clientOptions === void 0) { clientOptions = {}; }\n return {\n blacklistUrls: tslib_1.__spread((this._options.blacklistUrls || []), (clientOptions.blacklistUrls || [])),\n ignoreErrors: tslib_1.__spread((this._options.ignoreErrors || []), (clientOptions.ignoreErrors || []), DEFAULT_IGNORE_ERRORS),\n ignoreInternal: typeof this._options.ignoreInternal !== 'undefined' ? this._options.ignoreInternal : true,\n whitelistUrls: tslib_1.__spread((this._options.whitelistUrls || []), (clientOptions.whitelistUrls || [])),\n };\n };\n /** JSDoc */\n InboundFilters.prototype._getPossibleEventMessages = function (event) {\n if (event.message) {\n return [event.message];\n }\n if (event.exception) {\n try {\n var _a = (event.exception.values && event.exception.values[0]) || {}, _b = _a.type, type = _b === void 0 ? '' : _b, _c = _a.value, value = _c === void 0 ? '' : _c;\n return [\"\" + value, type + \": \" + value];\n }\n catch (oO) {\n logger.error(\"Cannot extract message for event \" + getEventDescription(event));\n return [];\n }\n }\n return [];\n };\n /** JSDoc */\n InboundFilters.prototype._getEventFilterUrl = function (event) {\n try {\n if (event.stacktrace) {\n var frames_1 = event.stacktrace.frames;\n return (frames_1 && frames_1[frames_1.length - 1].filename) || null;\n }\n if (event.exception) {\n var frames_2 = event.exception.values && event.exception.values[0].stacktrace && event.exception.values[0].stacktrace.frames;\n return (frames_2 && frames_2[frames_2.length - 1].filename) || null;\n }\n return null;\n }\n catch (oO) {\n logger.error(\"Cannot extract url for event \" + getEventDescription(event));\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n InboundFilters.id = 'InboundFilters';\n return InboundFilters;\n}());\nexport { InboundFilters };\n//# sourceMappingURL=inboundfilters.js.map","export { addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, startTransaction, setContext, setExtra, setExtras, setTag, setTags, setUser, withScope, } from '@sentry/minimal';\nexport { addGlobalEventProcessor, getCurrentHub, getHubFromCarrier, Hub, Scope } from '@sentry/hub';\nexport { API } from './api';\nexport { BaseClient } from './baseclient';\nexport { BaseBackend } from './basebackend';\nexport { eventToSentryRequest } from './request';\nexport { initAndBind } from './sdk';\nexport { NoopTransport } from './transports/noop';\nimport * as Integrations from './integrations';\nexport { Integrations };\n//# sourceMappingURL=index.js.map","export { BaseTransport } from './base';\nexport { FetchTransport } from './fetch';\nexport { XHRTransport } from './xhr';\n//# sourceMappingURL=index.js.map","import * as tslib_1 from \"tslib\";\nimport { getCurrentHub } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addInstrumentationHandler, getEventDescription, getGlobalObject, htmlTreeAsString, parseUrl, safeJoin, } from '@sentry/utils';\n/**\n * Default Breadcrumbs instrumentations\n * TODO: Deprecated - with v6, this will be renamed to `Instrument`\n */\nvar Breadcrumbs = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function Breadcrumbs(options) {\n /**\n * @inheritDoc\n */\n this.name = Breadcrumbs.id;\n this._options = tslib_1.__assign({ console: true, dom: true, fetch: true, history: true, sentry: true, xhr: true }, options);\n }\n /**\n * Create a breadcrumb of `sentry` from the events themselves\n */\n Breadcrumbs.prototype.addSentryBreadcrumb = function (event) {\n if (!this._options.sentry) {\n return;\n }\n getCurrentHub().addBreadcrumb({\n category: \"sentry.\" + (event.type === 'transaction' ? 'transaction' : 'event'),\n event_id: event.event_id,\n level: event.level,\n message: getEventDescription(event),\n }, {\n event: event,\n });\n };\n /**\n * Creates breadcrumbs from console API calls\n */\n Breadcrumbs.prototype._consoleBreadcrumb = function (handlerData) {\n var breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: Severity.fromString(handlerData.level),\n message: safeJoin(handlerData.args, ' '),\n };\n if (handlerData.level === 'assert') {\n if (handlerData.args[0] === false) {\n breadcrumb.message = \"Assertion failed: \" + (safeJoin(handlerData.args.slice(1), ' ') || 'console.assert');\n breadcrumb.data.arguments = handlerData.args.slice(1);\n }\n else {\n // Don't capture a breadcrumb for passed assertions\n return;\n }\n }\n getCurrentHub().addBreadcrumb(breadcrumb, {\n input: handlerData.args,\n level: handlerData.level,\n });\n };\n /**\n * Creates breadcrumbs from DOM API calls\n */\n Breadcrumbs.prototype._domBreadcrumb = function (handlerData) {\n var target;\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target)\n : htmlTreeAsString(handlerData.event);\n }\n catch (e) {\n target = '<unknown>';\n }\n if (target.length === 0) {\n return;\n }\n getCurrentHub().addBreadcrumb({\n category: \"ui.\" + handlerData.name,\n message: target,\n }, {\n event: handlerData.event,\n name: handlerData.name,\n });\n };\n /**\n * Creates breadcrumbs from XHR API calls\n */\n Breadcrumbs.prototype._xhrBreadcrumb = function (handlerData) {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n getCurrentHub().addBreadcrumb({\n category: 'xhr',\n data: handlerData.xhr.__sentry_xhr__,\n type: 'http',\n }, {\n xhr: handlerData.xhr,\n });\n return;\n }\n };\n /**\n * Creates breadcrumbs from fetch API calls\n */\n Breadcrumbs.prototype._fetchBreadcrumb = function (handlerData) {\n // We only capture complete fetch requests\n if (!handlerData.endTimestamp) {\n return;\n }\n if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {\n // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)\n return;\n }\n if (handlerData.error) {\n getCurrentHub().addBreadcrumb({\n category: 'fetch',\n data: handlerData.fetchData,\n level: Severity.Error,\n type: 'http',\n }, {\n data: handlerData.error,\n input: handlerData.args,\n });\n }\n else {\n getCurrentHub().addBreadcrumb({\n category: 'fetch',\n data: tslib_1.__assign({}, handlerData.fetchData, { status_code: handlerData.response.status }),\n type: 'http',\n }, {\n input: handlerData.args,\n response: handlerData.response,\n });\n }\n };\n /**\n * Creates breadcrumbs from history API calls\n */\n Breadcrumbs.prototype._historyBreadcrumb = function (handlerData) {\n var global = getGlobalObject();\n var from = handlerData.from;\n var to = handlerData.to;\n var parsedLoc = parseUrl(global.location.href);\n var parsedFrom = parseUrl(from);\n var parsedTo = parseUrl(to);\n // Initial pushState doesn't provide `from` information\n if (!parsedFrom.path) {\n parsedFrom = parsedLoc;\n }\n // Use only the path component of the URL if the URL matches the current\n // document (almost all the time when using pushState)\n if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {\n // tslint:disable-next-line:no-parameter-reassignment\n to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n // tslint:disable-next-line:no-parameter-reassignment\n from = parsedFrom.relative;\n }\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from: from,\n to: to,\n },\n });\n };\n /**\n * Instrument browser built-ins w/ breadcrumb capturing\n * - Console API\n * - DOM API (click/typing)\n * - XMLHttpRequest API\n * - Fetch API\n * - History API\n */\n Breadcrumbs.prototype.setupOnce = function () {\n var _this = this;\n if (this._options.console) {\n addInstrumentationHandler({\n callback: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this._consoleBreadcrumb.apply(_this, tslib_1.__spread(args));\n },\n type: 'console',\n });\n }\n if (this._options.dom) {\n addInstrumentationHandler({\n callback: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this._domBreadcrumb.apply(_this, tslib_1.__spread(args));\n },\n type: 'dom',\n });\n }\n if (this._options.xhr) {\n addInstrumentationHandler({\n callback: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this._xhrBreadcrumb.apply(_this, tslib_1.__spread(args));\n },\n type: 'xhr',\n });\n }\n if (this._options.fetch) {\n addInstrumentationHandler({\n callback: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this._fetchBreadcrumb.apply(_this, tslib_1.__spread(args));\n },\n type: 'fetch',\n });\n }\n if (this._options.history) {\n addInstrumentationHandler({\n callback: function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n _this._historyBreadcrumb.apply(_this, tslib_1.__spread(args));\n },\n type: 'history',\n });\n }\n };\n /**\n * @inheritDoc\n */\n Breadcrumbs.id = 'Breadcrumbs';\n return Breadcrumbs;\n}());\nexport { Breadcrumbs };\n//# sourceMappingURL=breadcrumbs.js.map","import * as tslib_1 from \"tslib\";\nimport { fill, getFunctionName, getGlobalObject } from '@sentry/utils';\nimport { wrap } from '../helpers';\nvar DEFAULT_EVENT_TARGET = [\n 'EventTarget',\n 'Window',\n 'Node',\n 'ApplicationCache',\n 'AudioTrackList',\n 'ChannelMergerNode',\n 'CryptoOperation',\n 'EventSource',\n 'FileReader',\n 'HTMLUnknownElement',\n 'IDBDatabase',\n 'IDBRequest',\n 'IDBTransaction',\n 'KeyOperation',\n 'MediaController',\n 'MessagePort',\n 'ModalWindow',\n 'Notification',\n 'SVGElementInstance',\n 'Screen',\n 'TextTrack',\n 'TextTrackCue',\n 'TextTrackList',\n 'WebSocket',\n 'WebSocketWorker',\n 'Worker',\n 'XMLHttpRequest',\n 'XMLHttpRequestEventTarget',\n 'XMLHttpRequestUpload',\n];\n/** Wrap timer functions and event targets to catch errors and provide better meta data */\nvar TryCatch = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function TryCatch(options) {\n /**\n * @inheritDoc\n */\n this.name = TryCatch.id;\n this._options = tslib_1.__assign({ XMLHttpRequest: true, eventTarget: true, requestAnimationFrame: true, setInterval: true, setTimeout: true }, options);\n }\n /** JSDoc */\n TryCatch.prototype._wrapTimeFunction = function (original) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var originalCallback = args[0];\n args[0] = wrap(originalCallback, {\n mechanism: {\n data: { function: getFunctionName(original) },\n handled: true,\n type: 'instrument',\n },\n });\n return original.apply(this, args);\n };\n };\n /** JSDoc */\n TryCatch.prototype._wrapRAF = function (original) {\n return function (callback) {\n return original.call(this, wrap(callback, {\n mechanism: {\n data: {\n function: 'requestAnimationFrame',\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n }));\n };\n };\n /** JSDoc */\n TryCatch.prototype._wrapEventTarget = function (target) {\n var global = getGlobalObject();\n var proto = global[target] && global[target].prototype;\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n fill(proto, 'addEventListener', function (original) {\n return function (eventName, fn, options) {\n try {\n // tslint:disable-next-line:no-unbound-method strict-type-predicates\n if (typeof fn.handleEvent === 'function') {\n fn.handleEvent = wrap(fn.handleEvent.bind(fn), {\n mechanism: {\n data: {\n function: 'handleEvent',\n handler: getFunctionName(fn),\n target: target,\n },\n handled: true,\n type: 'instrument',\n },\n });\n }\n }\n catch (err) {\n // can sometimes get 'Permission denied to access property \"handle Event'\n }\n return original.call(this, eventName, wrap(fn, {\n mechanism: {\n data: {\n function: 'addEventListener',\n handler: getFunctionName(fn),\n target: target,\n },\n handled: true,\n type: 'instrument',\n },\n }), options);\n };\n });\n fill(proto, 'removeEventListener', function (original) {\n return function (eventName, fn, options) {\n var callback = fn;\n try {\n callback = callback && (callback.__sentry_wrapped__ || callback);\n }\n catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return original.call(this, eventName, callback, options);\n };\n });\n };\n /** JSDoc */\n TryCatch.prototype._wrapXHR = function (originalSend) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var xhr = this; // tslint:disable-line:no-this-assignment\n var xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n xmlHttpRequestProps.forEach(function (prop) {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n fill(xhr, prop, function (original) {\n var wrapOptions = {\n mechanism: {\n data: {\n function: prop,\n handler: getFunctionName(original),\n },\n handled: true,\n type: 'instrument',\n },\n };\n // If Instrument integration has been called before TryCatch, get the name of original function\n if (original.__sentry_original__) {\n wrapOptions.mechanism.data.handler = getFunctionName(original.__sentry_original__);\n }\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n return originalSend.apply(this, args);\n };\n };\n /**\n * Wrap timer functions and event targets to catch errors\n * and provide better metadata.\n */\n TryCatch.prototype.setupOnce = function () {\n var global = getGlobalObject();\n if (this._options.setTimeout) {\n fill(global, 'setTimeout', this._wrapTimeFunction.bind(this));\n }\n if (this._options.setInterval) {\n fill(global, 'setInterval', this._wrapTimeFunction.bind(this));\n }\n if (this._options.requestAnimationFrame) {\n fill(global, 'requestAnimationFrame', this._wrapRAF.bind(this));\n }\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', this._wrapXHR.bind(this));\n }\n if (this._options.eventTarget) {\n var eventTarget = Array.isArray(this._options.eventTarget) ? this._options.eventTarget : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(this._wrapEventTarget.bind(this));\n }\n };\n /**\n * @inheritDoc\n */\n TryCatch.id = 'TryCatch';\n return TryCatch;\n}());\nexport { TryCatch };\n//# sourceMappingURL=trycatch.js.map","import * as tslib_1 from \"tslib\";\nimport { getCurrentHub } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addExceptionMechanism, addInstrumentationHandler, getLocationHref, isErrorEvent, isPrimitive, isString, logger, } from '@sentry/utils';\nimport { eventFromUnknownInput } from '../eventbuilder';\nimport { shouldIgnoreOnError } from '../helpers';\n/** Global handlers */\nvar GlobalHandlers = /** @class */ (function () {\n /** JSDoc */\n function GlobalHandlers(options) {\n /**\n * @inheritDoc\n */\n this.name = GlobalHandlers.id;\n /** JSDoc */\n this._onErrorHandlerInstalled = false;\n /** JSDoc */\n this._onUnhandledRejectionHandlerInstalled = false;\n this._options = tslib_1.__assign({ onerror: true, onunhandledrejection: true }, options);\n }\n /**\n * @inheritDoc\n */\n GlobalHandlers.prototype.setupOnce = function () {\n Error.stackTraceLimit = 50;\n if (this._options.onerror) {\n logger.log('Global Handler attached: onerror');\n this._installGlobalOnErrorHandler();\n }\n if (this._options.onunhandledrejection) {\n logger.log('Global Handler attached: onunhandledrejection');\n this._installGlobalOnUnhandledRejectionHandler();\n }\n };\n /** JSDoc */\n GlobalHandlers.prototype._installGlobalOnErrorHandler = function () {\n var _this = this;\n if (this._onErrorHandlerInstalled) {\n return;\n }\n addInstrumentationHandler({\n callback: function (data) {\n var error = data.error;\n var currentHub = getCurrentHub();\n var hasIntegration = currentHub.getIntegration(GlobalHandlers);\n var isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return;\n }\n var client = currentHub.getClient();\n var event = isPrimitive(error)\n ? _this._eventFromIncompleteOnError(data.msg, data.url, data.line, data.column)\n : _this._enhanceEventWithInitialFrame(eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: false,\n }), data.url, data.line, data.column);\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror',\n });\n currentHub.captureEvent(event, {\n originalException: error,\n });\n },\n type: 'error',\n });\n this._onErrorHandlerInstalled = true;\n };\n /** JSDoc */\n GlobalHandlers.prototype._installGlobalOnUnhandledRejectionHandler = function () {\n var _this = this;\n if (this._onUnhandledRejectionHandlerInstalled) {\n return;\n }\n addInstrumentationHandler({\n callback: function (e) {\n var error = e;\n // dig the object of the rejection out of known event types\n try {\n // PromiseRejectionEvents store the object of the rejection under 'reason'\n // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent\n if ('reason' in e) {\n error = e.reason;\n }\n // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents\n // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into\n // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec\n // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and\n // https://github.com/getsentry/sentry-javascript/issues/2380\n else if ('detail' in e && 'reason' in e.detail) {\n error = e.detail.reason;\n }\n }\n catch (_oO) {\n // no-empty\n }\n var currentHub = getCurrentHub();\n var hasIntegration = currentHub.getIntegration(GlobalHandlers);\n var isFailedOwnDelivery = error && error.__sentry_own_request__ === true;\n if (!hasIntegration || shouldIgnoreOnError() || isFailedOwnDelivery) {\n return true;\n }\n var client = currentHub.getClient();\n var event = isPrimitive(error)\n ? _this._eventFromIncompleteRejection(error)\n : eventFromUnknownInput(error, undefined, {\n attachStacktrace: client && client.getOptions().attachStacktrace,\n rejection: true,\n });\n event.level = Severity.Error;\n addExceptionMechanism(event, {\n handled: false,\n type: 'onunhandledrejection',\n });\n currentHub.captureEvent(event, {\n originalException: error,\n });\n return;\n },\n type: 'unhandledrejection',\n });\n this._onUnhandledRejectionHandlerInstalled = true;\n };\n /**\n * This function creates a stack from an old, error-less onerror handler.\n */\n GlobalHandlers.prototype._eventFromIncompleteOnError = function (msg, url, line, column) {\n var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;\n // If 'message' is ErrorEvent, get real message from inside\n var message = isErrorEvent(msg) ? msg.message : msg;\n var name;\n if (isString(message)) {\n var groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n }\n var event = {\n exception: {\n values: [\n {\n type: name || 'Error',\n value: message,\n },\n ],\n },\n };\n return this._enhanceEventWithInitialFrame(event, url, line, column);\n };\n /**\n * This function creates an Event from an TraceKitStackTrace that has part of it missing.\n */\n GlobalHandlers.prototype._eventFromIncompleteRejection = function (error) {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n value: \"Non-Error promise rejection captured with value: \" + error,\n },\n ],\n },\n };\n };\n /** JSDoc */\n GlobalHandlers.prototype._enhanceEventWithInitialFrame = function (event, url, line, column) {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].stacktrace = event.exception.values[0].stacktrace || {};\n event.exception.values[0].stacktrace.frames = event.exception.values[0].stacktrace.frames || [];\n var colno = isNaN(parseInt(column, 10)) ? undefined : column;\n var lineno = isNaN(parseInt(line, 10)) ? undefined : line;\n var filename = isString(url) && url.length > 0 ? url : getLocationHref();\n if (event.exception.values[0].stacktrace.frames.length === 0) {\n event.exception.values[0].stacktrace.frames.push({\n colno: colno,\n filename: filename,\n function: '?',\n in_app: true,\n lineno: lineno,\n });\n }\n return event;\n };\n /**\n * @inheritDoc\n */\n GlobalHandlers.id = 'GlobalHandlers';\n return GlobalHandlers;\n}());\nexport { GlobalHandlers };\n//# sourceMappingURL=globalhandlers.js.map","import * as tslib_1 from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { isInstanceOf } from '@sentry/utils';\nimport { exceptionFromStacktrace } from '../parsers';\nimport { computeStackTrace } from '../tracekit';\nvar DEFAULT_KEY = 'cause';\nvar DEFAULT_LIMIT = 5;\n/** Adds SDK info to an event. */\nvar LinkedErrors = /** @class */ (function () {\n /**\n * @inheritDoc\n */\n function LinkedErrors(options) {\n if (options === void 0) { options = {}; }\n /**\n * @inheritDoc\n */\n this.name = LinkedErrors.id;\n this._key = options.key || DEFAULT_KEY;\n this._limit = options.limit || DEFAULT_LIMIT;\n }\n /**\n * @inheritDoc\n */\n LinkedErrors.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event, hint) {\n var self = getCurrentHub().getIntegration(LinkedErrors);\n if (self) {\n return self._handler(event, hint);\n }\n return event;\n });\n };\n /**\n * @inheritDoc\n */\n LinkedErrors.prototype._handler = function (event, hint) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n var linkedErrors = this._walkErrorTree(hint.originalException, this._key);\n event.exception.values = tslib_1.__spread(linkedErrors, event.exception.values);\n return event;\n };\n /**\n * @inheritDoc\n */\n LinkedErrors.prototype._walkErrorTree = function (error, key, stack) {\n if (stack === void 0) { stack = []; }\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= this._limit) {\n return stack;\n }\n var stacktrace = computeStackTrace(error[key]);\n var exception = exceptionFromStacktrace(stacktrace);\n return this._walkErrorTree(error[key], key, tslib_1.__spread([exception], stack));\n };\n /**\n * @inheritDoc\n */\n LinkedErrors.id = 'LinkedErrors';\n return LinkedErrors;\n}());\nexport { LinkedErrors };\n//# sourceMappingURL=linkederrors.js.map","import * as tslib_1 from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\nvar global = getGlobalObject();\n/** UserAgent */\nvar UserAgent = /** @class */ (function () {\n function UserAgent() {\n /**\n * @inheritDoc\n */\n this.name = UserAgent.id;\n }\n /**\n * @inheritDoc\n */\n UserAgent.prototype.setupOnce = function () {\n addGlobalEventProcessor(function (event) {\n if (getCurrentHub().getIntegration(UserAgent)) {\n if (!global.navigator || !global.location) {\n return event;\n }\n var request = event.request || {};\n request.url = request.url || global.location.href;\n request.headers = request.headers || {};\n request.headers['User-Agent'] = global.navigator.userAgent;\n return tslib_1.__assign({}, event, { request: request });\n }\n return event;\n });\n };\n /**\n * @inheritDoc\n */\n UserAgent.id = 'UserAgent';\n return UserAgent;\n}());\nexport { UserAgent };\n//# sourceMappingURL=useragent.js.map","import { getCurrentHub } from '@sentry/hub';\nimport { logger } from '@sentry/utils';\n/**\n * Internal function to create a new SDK client instance. The client is\n * installed and then bound to the current scope.\n *\n * @param clientClass The client class to instanciate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(clientClass, options) {\n if (options.debug === true) {\n logger.enable();\n }\n var hub = getCurrentHub();\n var client = new clientClass(options);\n hub.bindClient(client);\n}\n//# sourceMappingURL=sdk.js.map","import * as tslib_1 from \"tslib\";\nimport { eventToSentryRequest } from '@sentry/core';\nimport { Status } from '@sentry/types';\nimport { getGlobalObject, logger, parseRetryAfterHeader, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\nvar global = getGlobalObject();\n/** `fetch` based transport */\nvar FetchTransport = /** @class */ (function (_super) {\n tslib_1.__extends(FetchTransport, _super);\n function FetchTransport() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /** Locks transport after receiving 429 response */\n _this._disabledUntil = new Date(Date.now());\n return _this;\n }\n /**\n * @inheritDoc\n */\n FetchTransport.prototype.sendEvent = function (event) {\n var _this = this;\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject({\n event: event,\n reason: \"Transport locked till \" + this._disabledUntil + \" due to too many requests.\",\n status: 429,\n });\n }\n var sentryReq = eventToSentryRequest(event, this._api);\n var options = {\n body: sentryReq.body,\n method: 'POST',\n // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default\n // https://caniuse.com/#feat=referrer-policy\n // It doesn't. And it throw exception instead of ignoring this parameter...\n // REF: https://github.com/getsentry/raven-js/issues/1233\n referrerPolicy: (supportsReferrerPolicy() ? 'origin' : ''),\n };\n if (this.options.fetchParameters !== undefined) {\n Object.assign(options, this.options.fetchParameters);\n }\n if (this.options.headers !== undefined) {\n options.headers = this.options.headers;\n }\n return this._buffer.add(new SyncPromise(function (resolve, reject) {\n global\n .fetch(sentryReq.url, options)\n .then(function (response) {\n var status = Status.fromHttpCode(response.status);\n if (status === Status.Success) {\n resolve({ status: status });\n return;\n }\n if (status === Status.RateLimit) {\n var now = Date.now();\n _this._disabledUntil = new Date(now + parseRetryAfterHeader(now, response.headers.get('Retry-After')));\n logger.warn(\"Too many requests, backing off till: \" + _this._disabledUntil);\n }\n reject(response);\n })\n .catch(reject);\n }));\n };\n return FetchTransport;\n}(BaseTransport));\nexport { FetchTransport };\n//# sourceMappingURL=fetch.js.map","import { Dsn, urlEncode } from '@sentry/utils';\nvar SENTRY_API_VERSION = '7';\n/** Helper class to provide urls to different Sentry endpoints. */\nvar API = /** @class */ (function () {\n /** Create a new instance of API */\n function API(dsn) {\n this.dsn = dsn;\n this._dsnObject = new Dsn(dsn);\n }\n /** Returns the Dsn object. */\n API.prototype.getDsn = function () {\n return this._dsnObject;\n };\n /** Returns the prefix to construct Sentry ingestion API endpoints. */\n API.prototype.getBaseApiEndpoint = function () {\n var dsn = this._dsnObject;\n var protocol = dsn.protocol ? dsn.protocol + \":\" : '';\n var port = dsn.port ? \":\" + dsn.port : '';\n return protocol + \"//\" + dsn.host + port + (dsn.path ? \"/\" + dsn.path : '') + \"/api/\";\n };\n /** Returns the store endpoint URL. */\n API.prototype.getStoreEndpoint = function () {\n return this._getIngestEndpoint('store');\n };\n /** Returns the envelope endpoint URL. */\n API.prototype._getEnvelopeEndpoint = function () {\n return this._getIngestEndpoint('envelope');\n };\n /** Returns the ingest API endpoint for target. */\n API.prototype._getIngestEndpoint = function (target) {\n var base = this.getBaseApiEndpoint();\n var dsn = this._dsnObject;\n return \"\" + base + dsn.projectId + \"/\" + target + \"/\";\n };\n /**\n * Returns the store endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n API.prototype.getStoreEndpointWithUrlEncodedAuth = function () {\n return this.getStoreEndpoint() + \"?\" + this._encodedAuth();\n };\n /**\n * Returns the envelope endpoint URL with auth in the query string.\n *\n * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.\n */\n API.prototype.getEnvelopeEndpointWithUrlEncodedAuth = function () {\n return this._getEnvelopeEndpoint() + \"?\" + this._encodedAuth();\n };\n /** Returns a URL-encoded string with auth config suitable for a query string. */\n API.prototype._encodedAuth = function () {\n var dsn = this._dsnObject;\n var auth = {\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.user,\n sentry_version: SENTRY_API_VERSION,\n };\n return urlEncode(auth);\n };\n /** Returns only the path component for the store endpoint. */\n API.prototype.getStoreEndpointPath = function () {\n var dsn = this._dsnObject;\n return (dsn.path ? \"/\" + dsn.path : '') + \"/api/\" + dsn.projectId + \"/store/\";\n };\n /**\n * Returns an object that can be used in request headers.\n * This is needed for node and the old /store endpoint in sentry\n */\n API.prototype.getRequestHeaders = function (clientName, clientVersion) {\n var dsn = this._dsnObject;\n var header = [\"Sentry sentry_version=\" + SENTRY_API_VERSION];\n header.push(\"sentry_client=\" + clientName + \"/\" + clientVersion);\n header.push(\"sentry_key=\" + dsn.user);\n if (dsn.pass) {\n header.push(\"sentry_secret=\" + dsn.pass);\n }\n return {\n 'Content-Type': 'application/json',\n 'X-Sentry-Auth': header.join(', '),\n };\n };\n /** Returns the url to the report dialog endpoint. */\n API.prototype.getReportDialogEndpoint = function (dialogOptions) {\n if (dialogOptions === void 0) { dialogOptions = {}; }\n var dsn = this._dsnObject;\n var endpoint = this.getBaseApiEndpoint() + \"embed/error-page/\";\n var encodedOptions = [];\n encodedOptions.push(\"dsn=\" + dsn.toString());\n for (var key in dialogOptions) {\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions.push(\"name=\" + encodeURIComponent(dialogOptions.user.name));\n }\n if (dialogOptions.user.email) {\n encodedOptions.push(\"email=\" + encodeURIComponent(dialogOptions.user.email));\n }\n }\n else {\n encodedOptions.push(encodeURIComponent(key) + \"=\" + encodeURIComponent(dialogOptions[key]));\n }\n }\n if (encodedOptions.length) {\n return endpoint + \"?\" + encodedOptions.join('&');\n }\n return endpoint;\n };\n return API;\n}());\nexport { API };\n//# sourceMappingURL=api.js.map","import * as tslib_1 from \"tslib\";\nimport { eventToSentryRequest } from '@sentry/core';\nimport { Status } from '@sentry/types';\nimport { logger, parseRetryAfterHeader, SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\n/** `XHR` based transport */\nvar XHRTransport = /** @class */ (function (_super) {\n tslib_1.__extends(XHRTransport, _super);\n function XHRTransport() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n /** Locks transport after receiving 429 response */\n _this._disabledUntil = new Date(Date.now());\n return _this;\n }\n /**\n * @inheritDoc\n */\n XHRTransport.prototype.sendEvent = function (event) {\n var _this = this;\n if (new Date(Date.now()) < this._disabledUntil) {\n return Promise.reject({\n event: event,\n reason: \"Transport locked till \" + this._disabledUntil + \" due to too many requests.\",\n status: 429,\n });\n }\n var sentryReq = eventToSentryRequest(event, this._api);\n return this._buffer.add(new SyncPromise(function (resolve, reject) {\n var request = new XMLHttpRequest();\n request.onreadystatechange = function () {\n if (request.readyState !== 4) {\n return;\n }\n var status = Status.fromHttpCode(request.status);\n if (status === Status.Success) {\n resolve({ status: status });\n return;\n }\n if (status === Status.RateLimit) {\n var now = Date.now();\n _this._disabledUntil = new Date(now + parseRetryAfterHeader(now, request.getResponseHeader('Retry-After')));\n logger.warn(\"Too many requests, backing off till: \" + _this._disabledUntil);\n }\n reject(request);\n };\n request.open('POST', sentryReq.url);\n for (var header in _this.options.headers) {\n if (_this.options.headers.hasOwnProperty(header)) {\n request.setRequestHeader(header, _this.options.headers[header]);\n }\n }\n request.send(sentryReq.body);\n }));\n };\n return XHRTransport;\n}(BaseTransport));\nexport { XHRTransport };\n//# sourceMappingURL=xhr.js.map","import { logger, SentryError } from '@sentry/utils';\nimport { NoopTransport } from './transports/noop';\n/**\n * This is the base implemention of a Backend.\n * @hidden\n */\nvar BaseBackend = /** @class */ (function () {\n /** Creates a new backend instance. */\n function BaseBackend(options) {\n this._options = options;\n if (!this._options.dsn) {\n logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n /**\n * Sets up the transport so it can be used later to send requests.\n */\n BaseBackend.prototype._setupTransport = function () {\n return new NoopTransport();\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.eventFromException = function (_exception, _hint) {\n throw new SentryError('Backend has to implement `eventFromException` method');\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.eventFromMessage = function (_message, _level, _hint) {\n throw new SentryError('Backend has to implement `eventFromMessage` method');\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.sendEvent = function (event) {\n this._transport.sendEvent(event).then(null, function (reason) {\n logger.error(\"Error while sending event: \" + reason);\n });\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.getTransport = function () {\n return this._transport;\n };\n return BaseBackend;\n}());\nexport { BaseBackend };\n//# sourceMappingURL=basebackend.js.map","import * as tslib_1 from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { logger } from '@sentry/utils';\nexport var installedIntegrations = [];\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options) {\n var defaultIntegrations = (options.defaultIntegrations && tslib_1.__spread(options.defaultIntegrations)) || [];\n var userIntegrations = options.integrations;\n var integrations = [];\n if (Array.isArray(userIntegrations)) {\n var userIntegrationsNames_1 = userIntegrations.map(function (i) { return i.name; });\n var pickedIntegrationsNames_1 = [];\n // Leave only unique default integrations, that were not overridden with provided user integrations\n defaultIntegrations.forEach(function (defaultIntegration) {\n if (userIntegrationsNames_1.indexOf(defaultIntegration.name) === -1 &&\n pickedIntegrationsNames_1.indexOf(defaultIntegration.name) === -1) {\n integrations.push(defaultIntegration);\n pickedIntegrationsNames_1.push(defaultIntegration.name);\n }\n });\n // Don't add same user integration twice\n userIntegrations.forEach(function (userIntegration) {\n if (pickedIntegrationsNames_1.indexOf(userIntegration.name) === -1) {\n integrations.push(userIntegration);\n pickedIntegrationsNames_1.push(userIntegration.name);\n }\n });\n }\n else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(defaultIntegrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\n }\n else {\n integrations = tslib_1.__spread(defaultIntegrations);\n }\n // Make sure that if present, `Debug` integration will always run last\n var integrationsNames = integrations.map(function (i) { return i.name; });\n var alwaysLastToRun = 'Debug';\n if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {\n integrations.push.apply(integrations, tslib_1.__spread(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));\n }\n return integrations;\n}\n/** Setup given integration */\nexport function setupIntegration(integration) {\n if (installedIntegrations.indexOf(integration.name) !== -1) {\n return;\n }\n integration.setupOnce(addGlobalEventProcessor, getCurrentHub);\n installedIntegrations.push(integration.name);\n logger.log(\"Integration installed: \" + integration.name);\n}\n/**\n * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default\n * integrations are added unless they were already provided before.\n * @param integrations array of integration instances\n * @param withDefault should enable default integrations\n */\nexport function setupIntegrations(options) {\n var integrations = {};\n getIntegrationsToSetup(options).forEach(function (integration) {\n integrations[integration.name] = integration;\n setupIntegration(integration);\n });\n return integrations;\n}\n//# sourceMappingURL=integration.js.map","import * as tslib_1 from \"tslib\";\nimport { Scope } from '@sentry/hub';\nimport { Dsn, isPrimitive, isThenable, logger, normalize, SyncPromise, timestampWithMs, truncate, uuid4, } from '@sentry/utils';\nimport { setupIntegrations } from './integration';\n/**\n * Base implementation for all JavaScript SDK clients.\n *\n * Call the constructor with the corresponding backend constructor and options\n * specific to the client subclass. To access these options later, use\n * {@link Client.getOptions}. Also, the Backend instance is available via\n * {@link Client.getBackend}.\n *\n * If a Dsn is specified in the options, it will be parsed and stored. Use\n * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is\n * invalid, the constructor will throw a {@link SentryException}. Note that\n * without a valid Dsn, the SDK will not send any events to Sentry.\n *\n * Before sending an event via the backend, it is passed through\n * {@link BaseClient.prepareEvent} to add SDK information and scope data\n * (breadcrumbs and context). To add more custom information, override this\n * method and extend the resulting prepared event.\n *\n * To issue automatically created events (e.g. via instrumentation), use\n * {@link Client.captureEvent}. It will prepare the event and pass it through\n * the callback lifecycle. To issue auto-breadcrumbs, use\n * {@link Client.addBreadcrumb}.\n *\n * @example\n * class NodeClient extends BaseClient<NodeBackend, NodeOptions> {\n * public constructor(options: NodeOptions) {\n * super(NodeBackend, options);\n * }\n *\n * // ...\n * }\n */\nvar BaseClient = /** @class */ (function () {\n /**\n * Initializes this client instance.\n *\n * @param backendClass A constructor function to create the backend.\n * @param options Options for the client.\n */\n function BaseClient(backendClass, options) {\n /** Array of used integrations. */\n this._integrations = {};\n /** Is the client still processing a call? */\n this._processing = false;\n this._backend = new backendClass(options);\n this._options = options;\n if (options.dsn) {\n this._dsn = new Dsn(options.dsn);\n }\n }\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureException = function (exception, hint, scope) {\n var _this = this;\n var eventId = hint && hint.event_id;\n this._processing = true;\n this._getBackend()\n .eventFromException(exception, hint)\n .then(function (event) {\n eventId = _this.captureEvent(event, hint, scope);\n });\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureMessage = function (message, level, hint, scope) {\n var _this = this;\n var eventId = hint && hint.event_id;\n this._processing = true;\n var promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(\"\" + message, level, hint)\n : this._getBackend().eventFromException(message, hint);\n promisedEvent.then(function (event) {\n eventId = _this.captureEvent(event, hint, scope);\n });\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureEvent = function (event, hint, scope) {\n var _this = this;\n var eventId = hint && hint.event_id;\n this._processing = true;\n this._processEvent(event, hint, scope)\n .then(function (finalEvent) {\n // We need to check for finalEvent in case beforeSend returned null\n eventId = finalEvent && finalEvent.event_id;\n _this._processing = false;\n })\n .then(null, function (reason) {\n logger.error(reason);\n _this._processing = false;\n });\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getDsn = function () {\n return this._dsn;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getOptions = function () {\n return this._options;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.flush = function (timeout) {\n var _this = this;\n return this._isClientProcessing(timeout).then(function (status) {\n clearInterval(status.interval);\n return _this._getBackend()\n .getTransport()\n .close(timeout)\n .then(function (transportFlushed) { return status.ready && transportFlushed; });\n });\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.close = function (timeout) {\n var _this = this;\n return this.flush(timeout).then(function (result) {\n _this.getOptions().enabled = false;\n return result;\n });\n };\n /**\n * Sets up the integrations\n */\n BaseClient.prototype.setupIntegrations = function () {\n if (this._isEnabled()) {\n this._integrations = setupIntegrations(this._options);\n }\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.getIntegration = function (integration) {\n try {\n return this._integrations[integration.id] || null;\n }\n catch (_oO) {\n logger.warn(\"Cannot retrieve integration \" + integration.id + \" from the current Client\");\n return null;\n }\n };\n /** Waits for the client to be done with processing. */\n BaseClient.prototype._isClientProcessing = function (timeout) {\n var _this = this;\n return new SyncPromise(function (resolve) {\n var ticked = 0;\n var tick = 1;\n var interval = 0;\n clearInterval(interval);\n interval = setInterval(function () {\n if (!_this._processing) {\n resolve({\n interval: interval,\n ready: true,\n });\n }\n else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n resolve({\n interval: interval,\n ready: false,\n });\n }\n }\n }, tick);\n });\n };\n /** Returns the current backend. */\n BaseClient.prototype._getBackend = function () {\n return this._backend;\n };\n /** Determines whether this SDK is enabled and a valid Dsn is present. */\n BaseClient.prototype._isEnabled = function () {\n return this.getOptions().enabled !== false && this._dsn !== undefined;\n };\n /**\n * Adds common information to events.\n *\n * The information includes release and environment from `options`,\n * breadcrumbs and context (extra, tags and user) from the scope.\n *\n * Information that is already present in the event is never overwritten. For\n * nested objects, such as the context, keys are merged.\n *\n * @param event The original event.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A new event with more information.\n */\n BaseClient.prototype._prepareEvent = function (event, scope, hint) {\n var _this = this;\n var _a = this.getOptions().normalizeDepth, normalizeDepth = _a === void 0 ? 3 : _a;\n var prepared = tslib_1.__assign({}, event, { event_id: event.event_id || (hint && hint.event_id ? hint.event_id : uuid4()), timestamp: event.timestamp || timestampWithMs() });\n this._applyClientOptions(prepared);\n this._applyIntegrationsMetadata(prepared);\n // If we have scope given to us, use it as the base for further modifications.\n // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.\n var finalScope = scope;\n if (hint && hint.captureContext) {\n finalScope = Scope.clone(finalScope).update(hint.captureContext);\n }\n // We prepare the result here with a resolved Event.\n var result = SyncPromise.resolve(prepared);\n // This should be the last thing called, since we want that\n // {@link Hub.addEventProcessor} gets the finished prepared event.\n if (finalScope) {\n // In case we have a hub we reassign it.\n result = finalScope.applyToEvent(prepared, hint);\n }\n return result.then(function (evt) {\n // tslint:disable-next-line:strict-type-predicates\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return _this._normalizeEvent(evt, normalizeDepth);\n }\n return evt;\n });\n };\n /**\n * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.\n * Normalized keys:\n * - `breadcrumbs.data`\n * - `user`\n * - `contexts`\n * - `extra`\n * @param event Event\n * @returns Normalized event\n */\n BaseClient.prototype._normalizeEvent = function (event, depth) {\n if (!event) {\n return null;\n }\n // tslint:disable:no-unsafe-any\n var normalized = tslib_1.__assign({}, event, (event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(function (b) { return (tslib_1.__assign({}, b, (b.data && {\n data: normalize(b.data, depth),\n }))); }),\n }), (event.user && {\n user: normalize(event.user, depth),\n }), (event.contexts && {\n contexts: normalize(event.contexts, depth),\n }), (event.extra && {\n extra: normalize(event.extra, depth),\n }));\n // event.contexts.trace stores information about a Transaction. Similarly,\n // event.spans[] stores information about child Spans. Given that a\n // Transaction is conceptually a Span, normalization should apply to both\n // Transactions and Spans consistently.\n // For now the decision is to skip normalization of Transactions and Spans,\n // so this block overwrites the normalized event to add back the original\n // Transaction information prior to normalization.\n if (event.contexts && event.contexts.trace) {\n normalized.contexts.trace = event.contexts.trace;\n }\n return normalized;\n };\n /**\n * Enhances event using the client configuration.\n * It takes care of all \"static\" values like environment, release and `dist`,\n * as well as truncating overly long values.\n * @param event event instance to be enhanced\n */\n BaseClient.prototype._applyClientOptions = function (event) {\n var _a = this.getOptions(), environment = _a.environment, release = _a.release, dist = _a.dist, _b = _a.maxValueLength, maxValueLength = _b === void 0 ? 250 : _b;\n if (event.environment === undefined && environment !== undefined) {\n event.environment = environment;\n }\n if (event.release === undefined && release !== undefined) {\n event.release = release;\n }\n if (event.dist === undefined && dist !== undefined) {\n event.dist = dist;\n }\n if (event.message) {\n event.message = truncate(event.message, maxValueLength);\n }\n var exception = event.exception && event.exception.values && event.exception.values[0];\n if (exception && exception.value) {\n exception.value = truncate(exception.value, maxValueLength);\n }\n var request = event.request;\n if (request && request.url) {\n request.url = truncate(request.url, maxValueLength);\n }\n };\n /**\n * This function adds all used integrations to the SDK info in the event.\n * @param sdkInfo The sdkInfo of the event that will be filled with all integrations.\n */\n BaseClient.prototype._applyIntegrationsMetadata = function (event) {\n var sdkInfo = event.sdk;\n var integrationsArray = Object.keys(this._integrations);\n if (sdkInfo && integrationsArray.length > 0) {\n sdkInfo.integrations = integrationsArray;\n }\n };\n /**\n * Tells the backend to send this event\n * @param event The Sentry event to send\n */\n BaseClient.prototype._sendEvent = function (event) {\n this._getBackend().sendEvent(event);\n };\n /**\n * Processes an event (either error or message) and sends it to Sentry.\n *\n * This also adds breadcrumbs and context information to the event. However,\n * platform specific meta data (such as the User's IP address) must be added\n * by the SDK implementor.\n *\n *\n * @param event The event to send to Sentry.\n * @param hint May contain additional information about the original exception.\n * @param scope A scope containing event metadata.\n * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.\n */\n BaseClient.prototype._processEvent = function (event, hint, scope) {\n var _this = this;\n var _a = this.getOptions(), beforeSend = _a.beforeSend, sampleRate = _a.sampleRate;\n if (!this._isEnabled()) {\n return SyncPromise.reject('SDK not enabled, will not send event.');\n }\n var isTransaction = event.type === 'transaction';\n // 1.0 === 100% events are sent\n // 0.0 === 0% events are sent\n // Sampling for transaction happens somewhere else\n if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {\n return SyncPromise.reject('This event has been sampled, will not send event.');\n }\n return new SyncPromise(function (resolve, reject) {\n _this._prepareEvent(event, scope, hint)\n .then(function (prepared) {\n if (prepared === null) {\n reject('An event processor returned null, will not send event.');\n return;\n }\n var finalEvent = prepared;\n var isInternalException = hint && hint.data && hint.data.__sentry__ === true;\n // We skip beforeSend in case of transactions\n if (isInternalException || !beforeSend || isTransaction) {\n _this._sendEvent(finalEvent);\n resolve(finalEvent);\n return;\n }\n var beforeSendResult = beforeSend(prepared, hint);\n // tslint:disable-next-line:strict-type-predicates\n if (typeof beforeSendResult === 'undefined') {\n logger.error('`beforeSend` method has to return `null` or a valid event.');\n }\n else if (isThenable(beforeSendResult)) {\n _this._handleAsyncBeforeSend(beforeSendResult, resolve, reject);\n }\n else {\n finalEvent = beforeSendResult;\n if (finalEvent === null) {\n logger.log('`beforeSend` returned `null`, will not send event.');\n resolve(null);\n return;\n }\n // From here on we are really async\n _this._sendEvent(finalEvent);\n resolve(finalEvent);\n }\n })\n .then(null, function (reason) {\n _this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n reject(\"Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\\nReason: \" + reason);\n });\n });\n };\n /**\n * Resolves before send Promise and calls resolve/reject on parent SyncPromise.\n */\n BaseClient.prototype._handleAsyncBeforeSend = function (beforeSend, resolve, reject) {\n var _this = this;\n beforeSend\n .then(function (processedEvent) {\n if (processedEvent === null) {\n reject('`beforeSend` returned `null`, will not send event.');\n return;\n }\n // From here on we are really async\n _this._sendEvent(processedEvent);\n resolve(processedEvent);\n })\n .then(null, function (e) {\n reject(\"beforeSend rejected with \" + e);\n });\n };\n return BaseClient;\n}());\nexport { BaseClient };\n//# sourceMappingURL=baseclient.js.map","// tslint:disable:no-unsafe-any\n/**\n * Memo class used for decycle json objects. Uses WeakSet if available otherwise array.\n */\nvar Memo = /** @class */ (function () {\n function Memo() {\n // tslint:disable-next-line\n this._hasWeakSet = typeof WeakSet === 'function';\n this._inner = this._hasWeakSet ? new WeakSet() : [];\n }\n /**\n * Sets obj to remember.\n * @param obj Object to remember\n */\n Memo.prototype.memoize = function (obj) {\n if (this._hasWeakSet) {\n if (this._inner.has(obj)) {\n return true;\n }\n this._inner.add(obj);\n return false;\n }\n // tslint:disable-next-line:prefer-for-of\n for (var i = 0; i < this._inner.length; i++) {\n var value = this._inner[i];\n if (value === obj) {\n return true;\n }\n }\n this._inner.push(obj);\n return false;\n };\n /**\n * Removes object from internal storage.\n * @param obj Object to forget\n */\n Memo.prototype.unmemoize = function (obj) {\n if (this._hasWeakSet) {\n this._inner.delete(obj);\n }\n else {\n for (var i = 0; i < this._inner.length; i++) {\n if (this._inner[i] === obj) {\n this._inner.splice(i, 1);\n break;\n }\n }\n }\n };\n return Memo;\n}());\nexport { Memo };\n//# sourceMappingURL=memo.js.map","import * as tslib_1 from \"tslib\";\nimport { consoleSandbox, getGlobalObject, isNodeEnv, logger, timestampWithMs, uuid4 } from '@sentry/utils';\nimport { Scope } from './scope';\n/**\n * API compatibility version of this hub.\n *\n * WARNING: This number should only be incresed when the global interface\n * changes a and new methods are introduced.\n *\n * @hidden\n */\nexport var API_VERSION = 3;\n/**\n * Default maximum number of breadcrumbs added to an event. Can be overwritten\n * with {@link Options.maxBreadcrumbs}.\n */\nvar DEFAULT_BREADCRUMBS = 100;\n/**\n * Absolute maximum number of breadcrumbs added to an event. The\n * `maxBreadcrumbs` option cannot be higher than this value.\n */\nvar MAX_BREADCRUMBS = 100;\n/**\n * @inheritDoc\n */\nvar Hub = /** @class */ (function () {\n /**\n * Creates a new instance of the hub, will push one {@link Layer} into the\n * internal stack on creation.\n *\n * @param client bound to the hub.\n * @param scope bound to the hub.\n * @param version number, higher number means higher priority.\n */\n function Hub(client, scope, _version) {\n if (scope === void 0) { scope = new Scope(); }\n if (_version === void 0) { _version = API_VERSION; }\n this._version = _version;\n /** Is a {@link Layer}[] containing the client and scope */\n this._stack = [];\n this._stack.push({ client: client, scope: scope });\n }\n /**\n * Internal helper function to call a method on the top client if it exists.\n *\n * @param method The method to call on the client.\n * @param args Arguments to pass to the client function.\n */\n Hub.prototype._invokeClient = function (method) {\n var _a;\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var top = this.getStackTop();\n if (top && top.client && top.client[method]) {\n (_a = top.client)[method].apply(_a, tslib_1.__spread(args, [top.scope]));\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.isOlderThan = function (version) {\n return this._version < version;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.bindClient = function (client) {\n var top = this.getStackTop();\n top.client = client;\n if (client && client.setupIntegrations) {\n client.setupIntegrations();\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.pushScope = function () {\n // We want to clone the content of prev scope\n var stack = this.getStack();\n var parentScope = stack.length > 0 ? stack[stack.length - 1].scope : undefined;\n var scope = Scope.clone(parentScope);\n this.getStack().push({\n client: this.getClient(),\n scope: scope,\n });\n return scope;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.popScope = function () {\n return this.getStack().pop() !== undefined;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.withScope = function (callback) {\n var scope = this.pushScope();\n try {\n callback(scope);\n }\n finally {\n this.popScope();\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.getClient = function () {\n return this.getStackTop().client;\n };\n /** Returns the scope of the top stack. */\n Hub.prototype.getScope = function () {\n return this.getStackTop().scope;\n };\n /** Returns the scope stack for domains or the process. */\n Hub.prototype.getStack = function () {\n return this._stack;\n };\n /** Returns the topmost scope layer in the order domain > local > process. */\n Hub.prototype.getStackTop = function () {\n return this._stack[this._stack.length - 1];\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.captureException = function (exception, hint) {\n var eventId = (this._lastEventId = uuid4());\n var finalHint = hint;\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n var syntheticException = void 0;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n finalHint = {\n originalException: exception,\n syntheticException: syntheticException,\n };\n }\n this._invokeClient('captureException', exception, tslib_1.__assign({}, finalHint, { event_id: eventId }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.captureMessage = function (message, level, hint) {\n var eventId = (this._lastEventId = uuid4());\n var finalHint = hint;\n // If there's no explicit hint provided, mimick the same thing that would happen\n // in the minimal itself to create a consistent behavior.\n // We don't do this in the client, as it's the lowest level API, and doing this,\n // would prevent user from having full control over direct calls.\n if (!hint) {\n var syntheticException = void 0;\n try {\n throw new Error(message);\n }\n catch (exception) {\n syntheticException = exception;\n }\n finalHint = {\n originalException: message,\n syntheticException: syntheticException,\n };\n }\n this._invokeClient('captureMessage', message, level, tslib_1.__assign({}, finalHint, { event_id: eventId }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.captureEvent = function (event, hint) {\n var eventId = (this._lastEventId = uuid4());\n this._invokeClient('captureEvent', event, tslib_1.__assign({}, hint, { event_id: eventId }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.lastEventId = function () {\n return this._lastEventId;\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.addBreadcrumb = function (breadcrumb, hint) {\n var top = this.getStackTop();\n if (!top.scope || !top.client) {\n return;\n }\n var _a = (top.client.getOptions && top.client.getOptions()) || {}, _b = _a.beforeBreadcrumb, beforeBreadcrumb = _b === void 0 ? null : _b, _c = _a.maxBreadcrumbs, maxBreadcrumbs = _c === void 0 ? DEFAULT_BREADCRUMBS : _c;\n if (maxBreadcrumbs <= 0) {\n return;\n }\n var timestamp = timestampWithMs();\n var mergedBreadcrumb = tslib_1.__assign({ timestamp: timestamp }, breadcrumb);\n var finalBreadcrumb = beforeBreadcrumb\n ? consoleSandbox(function () { return beforeBreadcrumb(mergedBreadcrumb, hint); })\n : mergedBreadcrumb;\n if (finalBreadcrumb === null) {\n return;\n }\n top.scope.addBreadcrumb(finalBreadcrumb, Math.min(maxBreadcrumbs, MAX_BREADCRUMBS));\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setUser = function (user) {\n var top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setUser(user);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setTags = function (tags) {\n var top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setTags(tags);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setExtras = function (extras) {\n var top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setExtras(extras);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setTag = function (key, value) {\n var top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setTag(key, value);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setExtra = function (key, extra) {\n var top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setExtra(key, extra);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.setContext = function (name, context) {\n var top = this.getStackTop();\n if (!top.scope) {\n return;\n }\n top.scope.setContext(name, context);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.configureScope = function (callback) {\n var top = this.getStackTop();\n if (top.scope && top.client) {\n callback(top.scope);\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.run = function (callback) {\n var oldHub = makeMain(this);\n try {\n callback(this);\n }\n finally {\n makeMain(oldHub);\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.getIntegration = function (integration) {\n var client = this.getClient();\n if (!client) {\n return null;\n }\n try {\n return client.getIntegration(integration);\n }\n catch (_oO) {\n logger.warn(\"Cannot retrieve integration \" + integration.id + \" from the current Hub\");\n return null;\n }\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.startSpan = function (context) {\n return this._callExtensionMethod('startSpan', context);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.startTransaction = function (context) {\n return this._callExtensionMethod('startTransaction', context);\n };\n /**\n * @inheritDoc\n */\n Hub.prototype.traceHeaders = function () {\n return this._callExtensionMethod('traceHeaders');\n };\n /**\n * Calls global extension method and binding current instance to the function call\n */\n // @ts-ignore\n Hub.prototype._callExtensionMethod = function (method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var carrier = getMainCarrier();\n var sentry = carrier.__SENTRY__;\n // tslint:disable-next-line: strict-type-predicates\n if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {\n return sentry.extensions[method].apply(this, args);\n }\n logger.warn(\"Extension method \" + method + \" couldn't be found, doing nothing.\");\n };\n return Hub;\n}());\nexport { Hub };\n/** Returns the global shim registry. */\nexport function getMainCarrier() {\n var carrier = getGlobalObject();\n carrier.__SENTRY__ = carrier.__SENTRY__ || {\n extensions: {},\n hub: undefined,\n };\n return carrier;\n}\n/**\n * Replaces the current main hub with the passed one on the global object\n *\n * @returns The old replaced hub\n */\nexport function makeMain(hub) {\n var registry = getMainCarrier();\n var oldHub = getHubFromCarrier(registry);\n setHubOnCarrier(registry, hub);\n return oldHub;\n}\n/**\n * Returns the default hub instance.\n *\n * If a hub is already registered in the global carrier but this module\n * contains a more recent version, it replaces the registered version.\n * Otherwise, the currently registered hub will be returned.\n */\nexport function getCurrentHub() {\n // Get main carrier (global for every environment)\n var registry = getMainCarrier();\n // If there's no hub, or its an old API, assign a new one\n if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {\n setHubOnCarrier(registry, new Hub());\n }\n // Prefer domains over global if they are there (applicable only to Node environment)\n if (isNodeEnv()) {\n return getHubFromActiveDomain(registry);\n }\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n}\n/**\n * Try to read the hub from an active domain, fallback to the registry if one doesnt exist\n * @returns discovered hub\n */\nfunction getHubFromActiveDomain(registry) {\n try {\n var property = 'domain';\n var carrier = getMainCarrier();\n var sentry = carrier.__SENTRY__;\n // tslint:disable-next-line: strict-type-predicates\n if (!sentry || !sentry.extensions || !sentry.extensions[property]) {\n return getHubFromCarrier(registry);\n }\n var domain = sentry.extensions[property];\n var activeDomain = domain.active;\n // If there no active domain, just return global hub\n if (!activeDomain) {\n return getHubFromCarrier(registry);\n }\n // If there's no hub on current domain, or its an old API, assign a new one\n if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {\n var registryHubTopStack = getHubFromCarrier(registry).getStackTop();\n setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, Scope.clone(registryHubTopStack.scope)));\n }\n // Return hub that lives on a domain\n return getHubFromCarrier(activeDomain);\n }\n catch (_Oo) {\n // Return hub that lives on a global object\n return getHubFromCarrier(registry);\n }\n}\n/**\n * This will tell whether a carrier has a hub on it or not\n * @param carrier object\n */\nfunction hasHubOnCarrier(carrier) {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return true;\n }\n return false;\n}\n/**\n * This will create a new {@link Hub} and add to the passed object on\n * __SENTRY__.hub.\n * @param carrier object\n * @hidden\n */\nexport function getHubFromCarrier(carrier) {\n if (carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub) {\n return carrier.__SENTRY__.hub;\n }\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = new Hub();\n return carrier.__SENTRY__.hub;\n}\n/**\n * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute\n * @param carrier object\n * @param hub Hub\n */\nexport function setHubOnCarrier(carrier, hub) {\n if (!carrier) {\n return false;\n }\n carrier.__SENTRY__ = carrier.__SENTRY__ || {};\n carrier.__SENTRY__.hub = hub;\n return true;\n}\n//# sourceMappingURL=hub.js.map","import * as tslib_1 from \"tslib\";\nexport * from './exports';\nimport { Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject } from '@sentry/utils';\nimport * as BrowserIntegrations from './integrations';\nimport * as Transports from './transports';\nvar windowIntegrations = {};\n// This block is needed to add compatibility with the integrations packages when used with a CDN\n// tslint:disable: no-unsafe-any\nvar _window = getGlobalObject();\nif (_window.Sentry && _window.Sentry.Integrations) {\n windowIntegrations = _window.Sentry.Integrations;\n}\n// tslint:enable: no-unsafe-any\nvar INTEGRATIONS = tslib_1.__assign({}, windowIntegrations, CoreIntegrations, BrowserIntegrations);\nexport { INTEGRATIONS as Integrations, Transports };\n//# sourceMappingURL=index.js.map","import * as tslib_1 from \"tslib\";\nimport { isElement, isError, isEvent, isInstanceOf, isPlainObject, isPrimitive, isSyntheticEvent } from './is';\nimport { Memo } from './memo';\nimport { getFunctionName, htmlTreeAsString } from './misc';\nimport { truncate } from './string';\n/**\n * Wrap a given object method with a higher-order function\n *\n * @param source An object that contains a method to be wrapped.\n * @param name A name of method to be wrapped.\n * @param replacement A function that should be used to wrap a given method.\n * @returns void\n */\nexport function fill(source, name, replacement) {\n if (!(name in source)) {\n return;\n }\n var original = source[name];\n var wrapped = replacement(original);\n // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work\n // otherwise it'll throw \"TypeError: Object.defineProperties called on non-object\"\n // tslint:disable-next-line:strict-type-predicates\n if (typeof wrapped === 'function') {\n try {\n wrapped.prototype = wrapped.prototype || {};\n Object.defineProperties(wrapped, {\n __sentry_original__: {\n enumerable: false,\n value: original,\n },\n });\n }\n catch (_Oo) {\n // This can throw if multiple fill happens on a global object like XMLHttpRequest\n // Fixes https://github.com/getsentry/sentry-javascript/issues/2043\n }\n }\n source[name] = wrapped;\n}\n/**\n * Encodes given object into url-friendly format\n *\n * @param object An object that contains serializable values\n * @returns string Encoded\n */\nexport function urlEncode(object) {\n return Object.keys(object)\n .map(\n // tslint:disable-next-line:no-unsafe-any\n function (key) { return encodeURIComponent(key) + \"=\" + encodeURIComponent(object[key]); })\n .join('&');\n}\n/**\n * Transforms any object into an object literal with all it's attributes\n * attached to it.\n *\n * @param value Initial source that we have to transform in order to be usable by the serializer\n */\nfunction getWalkSource(value) {\n if (isError(value)) {\n var error = value;\n var err = {\n message: error.message,\n name: error.name,\n stack: error.stack,\n };\n for (var i in error) {\n if (Object.prototype.hasOwnProperty.call(error, i)) {\n err[i] = error[i];\n }\n }\n return err;\n }\n if (isEvent(value)) {\n var event_1 = value;\n var source = {};\n source.type = event_1.type;\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n source.target = isElement(event_1.target)\n ? htmlTreeAsString(event_1.target)\n : Object.prototype.toString.call(event_1.target);\n }\n catch (_oO) {\n source.target = '<unknown>';\n }\n try {\n source.currentTarget = isElement(event_1.currentTarget)\n ? htmlTreeAsString(event_1.currentTarget)\n : Object.prototype.toString.call(event_1.currentTarget);\n }\n catch (_oO) {\n source.currentTarget = '<unknown>';\n }\n // tslint:disable-next-line:strict-type-predicates\n if (typeof CustomEvent !== 'undefined' && isInstanceOf(value, CustomEvent)) {\n source.detail = event_1.detail;\n }\n for (var i in event_1) {\n if (Object.prototype.hasOwnProperty.call(event_1, i)) {\n source[i] = event_1;\n }\n }\n return source;\n }\n return value;\n}\n/** Calculates bytes size of input string */\nfunction utf8Length(value) {\n // tslint:disable-next-line:no-bitwise\n return ~-encodeURI(value).split(/%..|./).length;\n}\n/** Calculates bytes size of input object */\nfunction jsonSize(value) {\n return utf8Length(JSON.stringify(value));\n}\n/** JSDoc */\nexport function normalizeToSize(object, \n// Default Node.js REPL depth\ndepth, \n// 100kB, as 200kB is max payload size, so half sounds reasonable\nmaxSize) {\n if (depth === void 0) { depth = 3; }\n if (maxSize === void 0) { maxSize = 100 * 1024; }\n var serialized = normalize(object, depth);\n if (jsonSize(serialized) > maxSize) {\n return normalizeToSize(object, depth - 1, maxSize);\n }\n return serialized;\n}\n/** Transforms any input value into a string form, either primitive value or a type of the input */\nfunction serializeValue(value) {\n var type = Object.prototype.toString.call(value);\n // Node.js REPL notation\n if (typeof value === 'string') {\n return value;\n }\n if (type === '[object Object]') {\n return '[Object]';\n }\n if (type === '[object Array]') {\n return '[Array]';\n }\n var normalized = normalizeValue(value);\n return isPrimitive(normalized) ? normalized : type;\n}\n/**\n * normalizeValue()\n *\n * Takes unserializable input and make it serializable friendly\n *\n * - translates undefined/NaN values to \"[undefined]\"/\"[NaN]\" respectively,\n * - serializes Error objects\n * - filter global objects\n */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction normalizeValue(value, key) {\n if (key === 'domain' && value && typeof value === 'object' && value._events) {\n return '[Domain]';\n }\n if (key === 'domainEmitter') {\n return '[DomainEmitter]';\n }\n if (typeof global !== 'undefined' && value === global) {\n return '[Global]';\n }\n if (typeof window !== 'undefined' && value === window) {\n return '[Window]';\n }\n if (typeof document !== 'undefined' && value === document) {\n return '[Document]';\n }\n // React's SyntheticEvent thingy\n if (isSyntheticEvent(value)) {\n return '[SyntheticEvent]';\n }\n // tslint:disable-next-line:no-tautology-expression\n if (typeof value === 'number' && value !== value) {\n return '[NaN]';\n }\n if (value === void 0) {\n return '[undefined]';\n }\n if (typeof value === 'function') {\n return \"[Function: \" + getFunctionName(value) + \"]\";\n }\n return value;\n}\n/**\n * Walks an object to perform a normalization on it\n *\n * @param key of object that's walked in current iteration\n * @param value object to be walked\n * @param depth Optional number indicating how deep should walking be performed\n * @param memo Optional Memo class handling decycling\n */\nexport function walk(key, value, depth, memo) {\n if (depth === void 0) { depth = +Infinity; }\n if (memo === void 0) { memo = new Memo(); }\n // If we reach the maximum depth, serialize whatever has left\n if (depth === 0) {\n return serializeValue(value);\n }\n // If value implements `toJSON` method, call it and return early\n // tslint:disable:no-unsafe-any\n if (value !== null && value !== undefined && typeof value.toJSON === 'function') {\n return value.toJSON();\n }\n // tslint:enable:no-unsafe-any\n // If normalized value is a primitive, there are no branches left to walk, so we can just bail out, as theres no point in going down that branch any further\n var normalized = normalizeValue(value, key);\n if (isPrimitive(normalized)) {\n return normalized;\n }\n // Create source that we will use for next itterations, either objectified error object (Error type with extracted keys:value pairs) or the input itself\n var source = getWalkSource(value);\n // Create an accumulator that will act as a parent for all future itterations of that branch\n var acc = Array.isArray(value) ? [] : {};\n // If we already walked that branch, bail out, as it's circular reference\n if (memo.memoize(value)) {\n return '[Circular ~]';\n }\n // Walk all keys of the source\n for (var innerKey in source) {\n // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.\n if (!Object.prototype.hasOwnProperty.call(source, innerKey)) {\n continue;\n }\n // Recursively walk through all the child nodes\n acc[innerKey] = walk(innerKey, source[innerKey], depth - 1, memo);\n }\n // Once walked through all the branches, remove the parent from memo storage\n memo.unmemoize(value);\n // Return accumulated values\n return acc;\n}\n/**\n * normalize()\n *\n * - Creates a copy to prevent original input mutation\n * - Skip non-enumerablers\n * - Calls `toJSON` if implemented\n * - Removes circular references\n * - Translates non-serializeable values (undefined/NaN/Functions) to serializable format\n * - Translates known global objects/Classes to a string representations\n * - Takes care of Error objects serialization\n * - Optionally limit depth of final output\n */\nexport function normalize(input, depth) {\n try {\n // tslint:disable-next-line:no-unsafe-any\n return JSON.parse(JSON.stringify(input, function (key, value) { return walk(key, value, depth); }));\n }\n catch (_oO) {\n return '**non-serializable**';\n }\n}\n/**\n * Given any captured exception, extract its keys and create a sorted\n * and truncated list that will be used inside the event message.\n * eg. `Non-error exception captured with keys: foo, bar, baz`\n */\nexport function extractExceptionKeysForMessage(exception, maxLength) {\n if (maxLength === void 0) { maxLength = 40; }\n // tslint:disable:strict-type-predicates\n var keys = Object.keys(getWalkSource(exception));\n keys.sort();\n if (!keys.length) {\n return '[object has no keys]';\n }\n if (keys[0].length >= maxLength) {\n return truncate(keys[0], maxLength);\n }\n for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) {\n var serialized = keys.slice(0, includedKeys).join(', ');\n if (serialized.length > maxLength) {\n continue;\n }\n if (includedKeys === keys.length) {\n return serialized;\n }\n return truncate(serialized, maxLength);\n }\n return '';\n}\n/**\n * Given any object, return the new object with removed keys that value was `undefined`.\n * Works recursively on objects and arrays.\n */\nexport function dropUndefinedKeys(val) {\n var e_1, _a;\n if (isPlainObject(val)) {\n var obj = val;\n var rv = {};\n try {\n for (var _b = tslib_1.__values(Object.keys(obj)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n if (typeof obj[key] !== 'undefined') {\n rv[key] = dropUndefinedKeys(obj[key]);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n return rv;\n }\n if (Array.isArray(val)) {\n return val.map(dropUndefinedKeys);\n }\n return val;\n}\n//# sourceMappingURL=object.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import * as tslib_1 from \"tslib\";\nimport { getCurrentHub } from '@sentry/hub';\n/**\n * This calls a function on the current hub.\n * @param method function to call on hub.\n * @param args to pass to function.\n */\nfunction callOnHub(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n var hub = getCurrentHub();\n if (hub && hub[method]) {\n // tslint:disable-next-line:no-unsafe-any\n return hub[method].apply(hub, tslib_1.__spread(args));\n }\n throw new Error(\"No hub defined or \" + method + \" was not found on the hub, please open a bug report.\");\n}\n/**\n * Captures an exception event and sends it to Sentry.\n *\n * @param exception An exception-like object.\n * @returns The generated eventId.\n */\nexport function captureException(exception, captureContext) {\n var syntheticException;\n try {\n throw new Error('Sentry syntheticException');\n }\n catch (exception) {\n syntheticException = exception;\n }\n return callOnHub('captureException', exception, {\n captureContext: captureContext,\n originalException: exception,\n syntheticException: syntheticException,\n });\n}\n/**\n * Captures a message event and sends it to Sentry.\n *\n * @param message The message to send to Sentry.\n * @param level Define the level of the message.\n * @returns The generated eventId.\n */\nexport function captureMessage(message, captureContext) {\n var syntheticException;\n try {\n throw new Error(message);\n }\n catch (exception) {\n syntheticException = exception;\n }\n // This is necessary to provide explicit scopes upgrade, without changing the original\n // arrity of the `captureMessage(message, level)` method.\n var level = typeof captureContext === 'string' ? captureContext : undefined;\n var context = typeof captureContext !== 'string' ? { captureContext: captureContext } : undefined;\n return callOnHub('captureMessage', message, level, tslib_1.__assign({ originalException: message, syntheticException: syntheticException }, context));\n}\n/**\n * Captures a manually created event and sends it to Sentry.\n *\n * @param event The event to send to Sentry.\n * @returns The generated eventId.\n */\nexport function captureEvent(event) {\n return callOnHub('captureEvent', event);\n}\n/**\n * Callback to set context information onto the scope.\n * @param callback Callback function that receives Scope.\n */\nexport function configureScope(callback) {\n callOnHub('configureScope', callback);\n}\n/**\n * Records a new breadcrumb which will be attached to future events.\n *\n * Breadcrumbs will be added to subsequent events to provide more context on\n * user's actions prior to an error or crash.\n *\n * @param breadcrumb The breadcrumb to record.\n */\nexport function addBreadcrumb(breadcrumb) {\n callOnHub('addBreadcrumb', breadcrumb);\n}\n/**\n * Sets context data with the given name.\n * @param name of the context\n * @param context Any kind of data. This data will be normalized.\n */\nexport function setContext(name, context) {\n callOnHub('setContext', name, context);\n}\n/**\n * Set an object that will be merged sent as extra data with the event.\n * @param extras Extras object to merge into current context.\n */\nexport function setExtras(extras) {\n callOnHub('setExtras', extras);\n}\n/**\n * Set an object that will be merged sent as tags data with the event.\n * @param tags Tags context object to merge into current context.\n */\nexport function setTags(tags) {\n callOnHub('setTags', tags);\n}\n/**\n * Set key:value that will be sent as extra data with the event.\n * @param key String of extra\n * @param extra Any kind of data. This data will be normalized.\n */\nexport function setExtra(key, extra) {\n callOnHub('setExtra', key, extra);\n}\n/**\n * Set key:value that will be sent as tags data with the event.\n * @param key String key of tag\n * @param value String value of tag\n */\nexport function setTag(key, value) {\n callOnHub('setTag', key, value);\n}\n/**\n * Updates user context information for future events.\n *\n * @param user User context object to be set in the current context. Pass `null` to unset the user.\n */\nexport function setUser(user) {\n callOnHub('setUser', user);\n}\n/**\n * Creates a new scope with and executes the given operation within.\n * The scope is automatically removed once the operation\n * finishes or throws.\n *\n * This is essentially a convenience function for:\n *\n * pushScope();\n * callback();\n * popScope();\n *\n * @param callback that will be enclosed into push/popScope.\n */\nexport function withScope(callback) {\n callOnHub('withScope', callback);\n}\n/**\n * Calls a function on the latest client. Use this with caution, it's meant as\n * in \"internal\" helper so we don't need to expose every possible function in\n * the shim. It is not guaranteed that the client actually implements the\n * function.\n *\n * @param method The method to call on the client/client.\n * @param args Arguments to pass to the client/fontend.\n * @hidden\n */\nexport function _callOnClient(method) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n callOnHub.apply(void 0, tslib_1.__spread(['_invokeClient', method], args));\n}\n/**\n * Starts a new `Transaction` and returns it. This is the entry point to manual\n * tracing instrumentation.\n *\n * A tree structure can be built by adding child spans to the transaction, and\n * child spans to other spans. To start a new child span within the transaction\n * or any span, call the respective `.startChild()` method.\n *\n * Every child span must be finished before the transaction is finished,\n * otherwise the unfinished spans are discarded.\n *\n * The transaction must be finished with a call to its `.finish()` method, at\n * which point the transaction with all its finished child spans will be sent to\n * Sentry.\n *\n * @param context Properties of the new `Transaction`.\n */\nexport function startTransaction(context) {\n return callOnHub('startTransaction', tslib_1.__assign({}, context));\n}\n//# sourceMappingURL=index.js.map","module.exports = function(originalModule) {\n\tif (!originalModule.webpackPolyfill) {\n\t\tvar module = Object.create(originalModule);\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"exports\", {\n\t\t\tenumerable: true\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","import * as tslib_1 from \"tslib\";\nimport { SentryError } from './error';\n/** Regular expression used to parse a Dsn. */\nvar DSN_REGEX = /^(?:(\\w+):)\\/\\/(?:(\\w+)(?::(\\w+))?@)([\\w\\.-]+)(?::(\\d+))?\\/(.+)/;\n/** Error message */\nvar ERROR_MESSAGE = 'Invalid Dsn';\n/** The Sentry Dsn, identifying a Sentry instance and project. */\nvar Dsn = /** @class */ (function () {\n /** Creates a new Dsn component */\n function Dsn(from) {\n if (typeof from === 'string') {\n this._fromString(from);\n }\n else {\n this._fromComponents(from);\n }\n this._validate();\n }\n /**\n * Renders the string representation of this Dsn.\n *\n * By default, this will render the public representation without the password\n * component. To get the deprecated private representation, set `withPassword`\n * to true.\n *\n * @param withPassword When set to true, the password will be included.\n */\n Dsn.prototype.toString = function (withPassword) {\n if (withPassword === void 0) { withPassword = false; }\n // tslint:disable-next-line:no-this-assignment\n var _a = this, host = _a.host, path = _a.path, pass = _a.pass, port = _a.port, projectId = _a.projectId, protocol = _a.protocol, user = _a.user;\n return (protocol + \"://\" + user + (withPassword && pass ? \":\" + pass : '') +\n (\"@\" + host + (port ? \":\" + port : '') + \"/\" + (path ? path + \"/\" : path) + projectId));\n };\n /** Parses a string into this Dsn. */\n Dsn.prototype._fromString = function (str) {\n var match = DSN_REGEX.exec(str);\n if (!match) {\n throw new SentryError(ERROR_MESSAGE);\n }\n var _a = tslib_1.__read(match.slice(1), 6), protocol = _a[0], user = _a[1], _b = _a[2], pass = _b === void 0 ? '' : _b, host = _a[3], _c = _a[4], port = _c === void 0 ? '' : _c, lastPath = _a[5];\n var path = '';\n var projectId = lastPath;\n var split = projectId.split('/');\n if (split.length > 1) {\n path = split.slice(0, -1).join('/');\n projectId = split.pop();\n }\n if (projectId) {\n var projectMatch = projectId.match(/^\\d+/);\n if (projectMatch) {\n projectId = projectMatch[0];\n }\n }\n this._fromComponents({ host: host, pass: pass, path: path, projectId: projectId, port: port, protocol: protocol, user: user });\n };\n /** Maps Dsn components into this instance. */\n Dsn.prototype._fromComponents = function (components) {\n this.protocol = components.protocol;\n this.user = components.user;\n this.pass = components.pass || '';\n this.host = components.host;\n this.port = components.port || '';\n this.path = components.path || '';\n this.projectId = components.projectId;\n };\n /** Validates this Dsn and throws on error. */\n Dsn.prototype._validate = function () {\n var _this = this;\n ['protocol', 'user', 'host', 'projectId'].forEach(function (component) {\n if (!_this[component]) {\n throw new SentryError(ERROR_MESSAGE + \": \" + component + \" missing\");\n }\n });\n if (!this.projectId.match(/^\\d+$/)) {\n throw new SentryError(ERROR_MESSAGE + \": Invalid projectId \" + this.projectId);\n }\n if (this.protocol !== 'http' && this.protocol !== 'https') {\n throw new SentryError(ERROR_MESSAGE + \": Invalid protocol \" + this.protocol);\n }\n if (this.port && isNaN(parseInt(this.port, 10))) {\n throw new SentryError(ERROR_MESSAGE + \": Invalid port \" + this.port);\n }\n };\n return Dsn;\n}());\nexport { Dsn };\n//# sourceMappingURL=dsn.js.map","import { consoleSandbox, getGlobalObject } from './misc';\n// TODO: Implement different loggers for different environments\nvar global = getGlobalObject();\n/** Prefix for logging strings */\nvar PREFIX = 'Sentry Logger ';\n/** JSDoc */\nvar Logger = /** @class */ (function () {\n /** JSDoc */\n function Logger() {\n this._enabled = false;\n }\n /** JSDoc */\n Logger.prototype.disable = function () {\n this._enabled = false;\n };\n /** JSDoc */\n Logger.prototype.enable = function () {\n this._enabled = true;\n };\n /** JSDoc */\n Logger.prototype.log = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this._enabled) {\n return;\n }\n consoleSandbox(function () {\n global.console.log(PREFIX + \"[Log]: \" + args.join(' ')); // tslint:disable-line:no-console\n });\n };\n /** JSDoc */\n Logger.prototype.warn = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this._enabled) {\n return;\n }\n consoleSandbox(function () {\n global.console.warn(PREFIX + \"[Warn]: \" + args.join(' ')); // tslint:disable-line:no-console\n });\n };\n /** JSDoc */\n Logger.prototype.error = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (!this._enabled) {\n return;\n }\n consoleSandbox(function () {\n global.console.error(PREFIX + \"[Error]: \" + args.join(' ')); // tslint:disable-line:no-console\n });\n };\n return Logger;\n}());\n// Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used\nglobal.__SENTRY__ = global.__SENTRY__ || {};\nvar logger = global.__SENTRY__.logger || (global.__SENTRY__.logger = new Logger());\nexport { logger };\n//# sourceMappingURL=logger.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import { isThenable } from './is';\n/** SyncPromise internal states */\nvar States;\n(function (States) {\n /** Pending */\n States[\"PENDING\"] = \"PENDING\";\n /** Resolved / OK */\n States[\"RESOLVED\"] = \"RESOLVED\";\n /** Rejected / Error */\n States[\"REJECTED\"] = \"REJECTED\";\n})(States || (States = {}));\n/**\n * Thenable class that behaves like a Promise and follows it's interface\n * but is not async internally\n */\nvar SyncPromise = /** @class */ (function () {\n function SyncPromise(executor) {\n var _this = this;\n this._state = States.PENDING;\n this._handlers = [];\n /** JSDoc */\n this._resolve = function (value) {\n _this._setResult(States.RESOLVED, value);\n };\n /** JSDoc */\n this._reject = function (reason) {\n _this._setResult(States.REJECTED, reason);\n };\n /** JSDoc */\n this._setResult = function (state, value) {\n if (_this._state !== States.PENDING) {\n return;\n }\n if (isThenable(value)) {\n value.then(_this._resolve, _this._reject);\n return;\n }\n _this._state = state;\n _this._value = value;\n _this._executeHandlers();\n };\n // TODO: FIXME\n /** JSDoc */\n this._attachHandler = function (handler) {\n _this._handlers = _this._handlers.concat(handler);\n _this._executeHandlers();\n };\n /** JSDoc */\n this._executeHandlers = function () {\n if (_this._state === States.PENDING) {\n return;\n }\n var cachedHandlers = _this._handlers.slice();\n _this._handlers = [];\n cachedHandlers.forEach(function (handler) {\n if (handler.done) {\n return;\n }\n if (_this._state === States.RESOLVED) {\n if (handler.onfulfilled) {\n handler.onfulfilled(_this._value);\n }\n }\n if (_this._state === States.REJECTED) {\n if (handler.onrejected) {\n handler.onrejected(_this._value);\n }\n }\n handler.done = true;\n });\n };\n try {\n executor(this._resolve, this._reject);\n }\n catch (e) {\n this._reject(e);\n }\n }\n /** JSDoc */\n SyncPromise.prototype.toString = function () {\n return '[object SyncPromise]';\n };\n /** JSDoc */\n SyncPromise.resolve = function (value) {\n return new SyncPromise(function (resolve) {\n resolve(value);\n });\n };\n /** JSDoc */\n SyncPromise.reject = function (reason) {\n return new SyncPromise(function (_, reject) {\n reject(reason);\n });\n };\n /** JSDoc */\n SyncPromise.all = function (collection) {\n return new SyncPromise(function (resolve, reject) {\n if (!Array.isArray(collection)) {\n reject(new TypeError(\"Promise.all requires an array as input.\"));\n return;\n }\n if (collection.length === 0) {\n resolve([]);\n return;\n }\n var counter = collection.length;\n var resolvedCollection = [];\n collection.forEach(function (item, index) {\n SyncPromise.resolve(item)\n .then(function (value) {\n resolvedCollection[index] = value;\n counter -= 1;\n if (counter !== 0) {\n return;\n }\n resolve(resolvedCollection);\n })\n .then(null, reject);\n });\n });\n };\n /** JSDoc */\n SyncPromise.prototype.then = function (onfulfilled, onrejected) {\n var _this = this;\n return new SyncPromise(function (resolve, reject) {\n _this._attachHandler({\n done: false,\n onfulfilled: function (result) {\n if (!onfulfilled) {\n // TODO: ¯\\_(ツ)_/¯\n // TODO: FIXME\n resolve(result);\n return;\n }\n try {\n resolve(onfulfilled(result));\n return;\n }\n catch (e) {\n reject(e);\n return;\n }\n },\n onrejected: function (reason) {\n if (!onrejected) {\n reject(reason);\n return;\n }\n try {\n resolve(onrejected(reason));\n return;\n }\n catch (e) {\n reject(e);\n return;\n }\n },\n });\n });\n };\n /** JSDoc */\n SyncPromise.prototype.catch = function (onrejected) {\n return this.then(function (val) { return val; }, onrejected);\n };\n /** JSDoc */\n SyncPromise.prototype.finally = function (onfinally) {\n var _this = this;\n return new SyncPromise(function (resolve, reject) {\n var val;\n var isRejected;\n return _this.then(function (value) {\n isRejected = false;\n val = value;\n if (onfinally) {\n onfinally();\n }\n }, function (reason) {\n isRejected = true;\n val = reason;\n if (onfinally) {\n onfinally();\n }\n }).then(function () {\n if (isRejected) {\n reject(val);\n return;\n }\n resolve(val);\n });\n });\n };\n return SyncPromise;\n}());\nexport { SyncPromise };\n//# sourceMappingURL=syncpromise.js.map","export { addGlobalEventProcessor, Scope } from './scope';\nexport { getCurrentHub, getHubFromCarrier, getMainCarrier, Hub, makeMain, setHubOnCarrier } from './hub';\n//# sourceMappingURL=index.js.map","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import * as tslib_1 from \"tslib\";\nimport { captureException, withScope } from '@sentry/core';\nimport { addExceptionMechanism, addExceptionTypeValue } from '@sentry/utils';\nvar ignoreOnError = 0;\n/**\n * @hidden\n */\nexport function shouldIgnoreOnError() {\n return ignoreOnError > 0;\n}\n/**\n * @hidden\n */\nexport function ignoreNextOnError() {\n // onerror should trigger before setTimeout\n ignoreOnError += 1;\n setTimeout(function () {\n ignoreOnError -= 1;\n });\n}\n/**\n * Instruments the given function and sends an event to Sentry every time the\n * function throws an exception.\n *\n * @param fn A function to wrap.\n * @returns The wrapped function.\n * @hidden\n */\nexport function wrap(fn, options, before) {\n if (options === void 0) { options = {}; }\n // tslint:disable-next-line:strict-type-predicates\n if (typeof fn !== 'function') {\n return fn;\n }\n try {\n // We don't wanna wrap it twice\n if (fn.__sentry__) {\n return fn;\n }\n // If this has already been wrapped in the past, return that wrapped function\n if (fn.__sentry_wrapped__) {\n return fn.__sentry_wrapped__;\n }\n }\n catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n // Bail on wrapping and return the function as-is (defers to window.onerror).\n return fn;\n }\n var sentryWrapped = function () {\n var args = Array.prototype.slice.call(arguments);\n // tslint:disable:no-unsafe-any\n try {\n // tslint:disable-next-line:strict-type-predicates\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });\n if (fn.handleEvent) {\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.handleEvent.apply(this, wrappedArguments);\n }\n // Attempt to invoke user-land function\n // NOTE: If you are a Sentry user, and you are seeing this stack frame, it\n // means the sentry.javascript SDK caught an error invoking your application code. This\n // is expected behavior and NOT indicative of a bug with sentry.javascript.\n return fn.apply(this, wrappedArguments);\n // tslint:enable:no-unsafe-any\n }\n catch (ex) {\n ignoreNextOnError();\n withScope(function (scope) {\n scope.addEventProcessor(function (event) {\n var processedEvent = tslib_1.__assign({}, event);\n if (options.mechanism) {\n addExceptionTypeValue(processedEvent, undefined, undefined);\n addExceptionMechanism(processedEvent, options.mechanism);\n }\n processedEvent.extra = tslib_1.__assign({}, processedEvent.extra, { arguments: args });\n return processedEvent;\n });\n captureException(ex);\n });\n throw ex;\n }\n };\n // Accessing some objects may throw\n // ref: https://github.com/getsentry/sentry-javascript/issues/1168\n try {\n for (var property in fn) {\n if (Object.prototype.hasOwnProperty.call(fn, property)) {\n sentryWrapped[property] = fn[property];\n }\n }\n }\n catch (_oO) { } // tslint:disable-line:no-empty\n fn.prototype = fn.prototype || {};\n sentryWrapped.prototype = fn.prototype;\n Object.defineProperty(fn, '__sentry_wrapped__', {\n enumerable: false,\n value: sentryWrapped,\n });\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n Object.defineProperties(sentryWrapped, {\n __sentry__: {\n enumerable: false,\n value: true,\n },\n __sentry_original__: {\n enumerable: false,\n value: fn,\n },\n });\n // Restore original function name (not all browsers allow that)\n try {\n var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');\n if (descriptor.configurable) {\n Object.defineProperty(sentryWrapped, 'name', {\n get: function () {\n return fn.name;\n },\n });\n }\n }\n catch (_oO) {\n /*no-empty*/\n }\n return sentryWrapped;\n}\n//# sourceMappingURL=helpers.js.map","import { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { getGlobalObject, SyncPromise } from '@sentry/utils';\nimport { BrowserClient } from './client';\nimport { wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, GlobalHandlers, LinkedErrors, TryCatch, UserAgent } from './integrations';\nexport var defaultIntegrations = [\n new CoreIntegrations.InboundFilters(),\n new CoreIntegrations.FunctionToString(),\n new TryCatch(),\n new Breadcrumbs(),\n new GlobalHandlers(),\n new LinkedErrors(),\n new UserAgent(),\n];\n/**\n * The Sentry Browser SDK Client.\n *\n * To use this SDK, call the {@link init} function as early as possible when\n * loading the web page. To set context information or send manual events, use\n * the provided methods.\n *\n * @example\n *\n * ```\n *\n * import { init } from '@sentry/browser';\n *\n * init({\n * dsn: '__DSN__',\n * // ...\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { configureScope } from '@sentry/browser';\n * configureScope((scope: Scope) => {\n * scope.setExtra({ battery: 0.7 });\n * scope.setTag({ user_mode: 'admin' });\n * scope.setUser({ id: '4711' });\n * });\n * ```\n *\n * @example\n * ```\n *\n * import { addBreadcrumb } from '@sentry/browser';\n * addBreadcrumb({\n * message: 'My Breadcrumb',\n * // ...\n * });\n * ```\n *\n * @example\n *\n * ```\n *\n * import * as Sentry from '@sentry/browser';\n * Sentry.captureMessage('Hello, world!');\n * Sentry.captureException(new Error('Good bye'));\n * Sentry.captureEvent({\n * message: 'Manual',\n * stacktrace: [\n * // ...\n * ],\n * });\n * ```\n *\n * @see {@link BrowserOptions} for documentation on configuration options.\n */\nexport function init(options) {\n if (options === void 0) { options = {}; }\n if (options.defaultIntegrations === undefined) {\n options.defaultIntegrations = defaultIntegrations;\n }\n if (options.release === undefined) {\n var window_1 = getGlobalObject();\n // This supports the variable that sentry-webpack-plugin injects\n if (window_1.SENTRY_RELEASE && window_1.SENTRY_RELEASE.id) {\n options.release = window_1.SENTRY_RELEASE.id;\n }\n }\n initAndBind(BrowserClient, options);\n}\n/**\n * Present the user with a report dialog.\n *\n * @param options Everything is optional, we try to fetch all info need from the global scope.\n */\nexport function showReportDialog(options) {\n if (options === void 0) { options = {}; }\n if (!options.eventId) {\n options.eventId = getCurrentHub().lastEventId();\n }\n var client = getCurrentHub().getClient();\n if (client) {\n client.showReportDialog(options);\n }\n}\n/**\n * This is the getter for lastEventId.\n *\n * @returns The last event id of a captured event.\n */\nexport function lastEventId() {\n return getCurrentHub().lastEventId();\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function forceLoad() {\n // Noop\n}\n/**\n * This function is here to be API compatible with the loader.\n * @hidden\n */\nexport function onLoad(callback) {\n callback();\n}\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function flush(timeout) {\n var client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n return SyncPromise.reject(false);\n}\n/**\n * A promise that resolves when all current events have been sent.\n * If you provide a timeout and the queue takes longer to drain the promise returns false.\n *\n * @param timeout Maximum time in ms the client should wait.\n */\nexport function close(timeout) {\n var client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n return SyncPromise.reject(false);\n}\n/**\n * Wrap code within a try/catch block so the SDK is able to capture errors.\n *\n * @param fn A function to wrap.\n *\n * @returns The result of wrapped function call.\n */\nexport function wrap(fn) {\n return internalWrap(fn)(); // tslint:disable-line:no-unsafe-any\n}\n//# sourceMappingURL=sdk.js.map","export var setPrototypeOf = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties); // tslint:disable-line:no-unbound-method\n/**\n * setPrototypeOf polyfill using __proto__\n */\nfunction setProtoOf(obj, proto) {\n // @ts-ignore\n obj.__proto__ = proto;\n return obj;\n}\n/**\n * setPrototypeOf polyfill using mixin\n */\nfunction mixinProperties(obj, proto) {\n for (var prop in proto) {\n if (!obj.hasOwnProperty(prop)) {\n // @ts-ignore\n obj[prop] = proto[prop];\n }\n }\n return obj;\n}\n//# sourceMappingURL=polyfill.js.map","import * as tslib_1 from \"tslib\";\nimport { setPrototypeOf } from './polyfill';\n/** An error emitted by Sentry SDKs and related utilities. */\nvar SentryError = /** @class */ (function (_super) {\n tslib_1.__extends(SentryError, _super);\n function SentryError(message) {\n var _newTarget = this.constructor;\n var _this = _super.call(this, message) || this;\n _this.message = message;\n // tslint:disable:no-unsafe-any\n _this.name = _newTarget.prototype.constructor.name;\n setPrototypeOf(_this, _newTarget.prototype);\n return _this;\n }\n return SentryError;\n}(Error));\nexport { SentryError };\n//# sourceMappingURL=error.js.map","import * as tslib_1 from \"tslib\";\nimport { getGlobalObject, isPlainObject, isThenable, SyncPromise, timestampWithMs } from '@sentry/utils';\n/**\n * Holds additional event information. {@link Scope.applyToEvent} will be\n * called by the client before an event will be sent.\n */\nvar Scope = /** @class */ (function () {\n function Scope() {\n /** Flag if notifiying is happening. */\n this._notifyingListeners = false;\n /** Callback for client to receive scope changes. */\n this._scopeListeners = [];\n /** Callback list that will be called after {@link applyToEvent}. */\n this._eventProcessors = [];\n /** Array of breadcrumbs. */\n this._breadcrumbs = [];\n /** User */\n this._user = {};\n /** Tags */\n this._tags = {};\n /** Extra */\n this._extra = {};\n /** Contexts */\n this._contexts = {};\n }\n /**\n * Add internal on change listener. Used for sub SDKs that need to store the scope.\n * @hidden\n */\n Scope.prototype.addScopeListener = function (callback) {\n this._scopeListeners.push(callback);\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.addEventProcessor = function (callback) {\n this._eventProcessors.push(callback);\n return this;\n };\n /**\n * This will be called on every set call.\n */\n Scope.prototype._notifyScopeListeners = function () {\n var _this = this;\n if (!this._notifyingListeners) {\n this._notifyingListeners = true;\n setTimeout(function () {\n _this._scopeListeners.forEach(function (callback) {\n callback(_this);\n });\n _this._notifyingListeners = false;\n });\n }\n };\n /**\n * This will be called after {@link applyToEvent} is finished.\n */\n Scope.prototype._notifyEventProcessors = function (processors, event, hint, index) {\n var _this = this;\n if (index === void 0) { index = 0; }\n return new SyncPromise(function (resolve, reject) {\n var processor = processors[index];\n // tslint:disable-next-line:strict-type-predicates\n if (event === null || typeof processor !== 'function') {\n resolve(event);\n }\n else {\n var result = processor(tslib_1.__assign({}, event), hint);\n if (isThenable(result)) {\n result\n .then(function (final) { return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve); })\n .then(null, reject);\n }\n else {\n _this._notifyEventProcessors(processors, result, hint, index + 1)\n .then(resolve)\n .then(null, reject);\n }\n }\n });\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setUser = function (user) {\n this._user = user || {};\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setTags = function (tags) {\n this._tags = tslib_1.__assign({}, this._tags, tags);\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setTag = function (key, value) {\n var _a;\n this._tags = tslib_1.__assign({}, this._tags, (_a = {}, _a[key] = value, _a));\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setExtras = function (extras) {\n this._extra = tslib_1.__assign({}, this._extra, extras);\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setExtra = function (key, extra) {\n var _a;\n this._extra = tslib_1.__assign({}, this._extra, (_a = {}, _a[key] = extra, _a));\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setFingerprint = function (fingerprint) {\n this._fingerprint = fingerprint;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setLevel = function (level) {\n this._level = level;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setTransaction = function (transaction) {\n this._transaction = transaction;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setContext = function (key, context) {\n var _a;\n this._contexts = tslib_1.__assign({}, this._contexts, (_a = {}, _a[key] = context, _a));\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.setSpan = function (span) {\n this._span = span;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * Internal getter for Span, used in Hub.\n * @hidden\n */\n Scope.prototype.getSpan = function () {\n return this._span;\n };\n /**\n * Inherit values from the parent scope.\n * @param scope to clone.\n */\n Scope.clone = function (scope) {\n var newScope = new Scope();\n if (scope) {\n newScope._breadcrumbs = tslib_1.__spread(scope._breadcrumbs);\n newScope._tags = tslib_1.__assign({}, scope._tags);\n newScope._extra = tslib_1.__assign({}, scope._extra);\n newScope._contexts = tslib_1.__assign({}, scope._contexts);\n newScope._user = scope._user;\n newScope._level = scope._level;\n newScope._span = scope._span;\n newScope._transaction = scope._transaction;\n newScope._fingerprint = scope._fingerprint;\n newScope._eventProcessors = tslib_1.__spread(scope._eventProcessors);\n }\n return newScope;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.update = function (captureContext) {\n if (!captureContext) {\n return this;\n }\n if (typeof captureContext === 'function') {\n var updatedScope = captureContext(this);\n return updatedScope instanceof Scope ? updatedScope : this;\n }\n if (captureContext instanceof Scope) {\n this._tags = tslib_1.__assign({}, this._tags, captureContext._tags);\n this._extra = tslib_1.__assign({}, this._extra, captureContext._extra);\n this._contexts = tslib_1.__assign({}, this._contexts, captureContext._contexts);\n if (captureContext._user) {\n this._user = captureContext._user;\n }\n if (captureContext._level) {\n this._level = captureContext._level;\n }\n if (captureContext._fingerprint) {\n this._fingerprint = captureContext._fingerprint;\n }\n }\n else if (isPlainObject(captureContext)) {\n // tslint:disable-next-line:no-parameter-reassignment\n captureContext = captureContext;\n this._tags = tslib_1.__assign({}, this._tags, captureContext.tags);\n this._extra = tslib_1.__assign({}, this._extra, captureContext.extra);\n this._contexts = tslib_1.__assign({}, this._contexts, captureContext.contexts);\n if (captureContext.user) {\n this._user = captureContext.user;\n }\n if (captureContext.level) {\n this._level = captureContext.level;\n }\n if (captureContext.fingerprint) {\n this._fingerprint = captureContext.fingerprint;\n }\n }\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.clear = function () {\n this._breadcrumbs = [];\n this._tags = {};\n this._extra = {};\n this._user = {};\n this._contexts = {};\n this._level = undefined;\n this._transaction = undefined;\n this._fingerprint = undefined;\n this._span = undefined;\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) {\n var mergedBreadcrumb = tslib_1.__assign({ timestamp: timestampWithMs() }, breadcrumb);\n this._breadcrumbs =\n maxBreadcrumbs !== undefined && maxBreadcrumbs >= 0\n ? tslib_1.__spread(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxBreadcrumbs)\n : tslib_1.__spread(this._breadcrumbs, [mergedBreadcrumb]);\n this._notifyScopeListeners();\n return this;\n };\n /**\n * @inheritDoc\n */\n Scope.prototype.clearBreadcrumbs = function () {\n this._breadcrumbs = [];\n this._notifyScopeListeners();\n return this;\n };\n /**\n * Applies fingerprint from the scope to the event if there's one,\n * uses message if there's one instead or get rid of empty fingerprint\n */\n Scope.prototype._applyFingerprint = function (event) {\n // Make sure it's an array first and we actually have something in place\n event.fingerprint = event.fingerprint\n ? Array.isArray(event.fingerprint)\n ? event.fingerprint\n : [event.fingerprint]\n : [];\n // If we have something on the scope, then merge it with event\n if (this._fingerprint) {\n event.fingerprint = event.fingerprint.concat(this._fingerprint);\n }\n // If we have no data at all, remove empty array default\n if (event.fingerprint && !event.fingerprint.length) {\n delete event.fingerprint;\n }\n };\n /**\n * Applies the current context and fingerprint to the event.\n * Note that breadcrumbs will be added by the client.\n * Also if the event has already breadcrumbs on it, we do not merge them.\n * @param event Event\n * @param hint May contain additional informartion about the original exception.\n * @hidden\n */\n Scope.prototype.applyToEvent = function (event, hint) {\n if (this._extra && Object.keys(this._extra).length) {\n event.extra = tslib_1.__assign({}, this._extra, event.extra);\n }\n if (this._tags && Object.keys(this._tags).length) {\n event.tags = tslib_1.__assign({}, this._tags, event.tags);\n }\n if (this._user && Object.keys(this._user).length) {\n event.user = tslib_1.__assign({}, this._user, event.user);\n }\n if (this._contexts && Object.keys(this._contexts).length) {\n event.contexts = tslib_1.__assign({}, this._contexts, event.contexts);\n }\n if (this._level) {\n event.level = this._level;\n }\n if (this._transaction) {\n event.transaction = this._transaction;\n }\n // We want to set the trace context for normal events only if there isn't already\n // a trace context on the event. There is a product feature in place where we link\n // errors with transaction and it relys on that.\n if (this._span) {\n event.contexts = tslib_1.__assign({ trace: this._span.getTraceContext() }, event.contexts);\n }\n this._applyFingerprint(event);\n event.breadcrumbs = tslib_1.__spread((event.breadcrumbs || []), this._breadcrumbs);\n event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;\n return this._notifyEventProcessors(tslib_1.__spread(getGlobalEventProcessors(), this._eventProcessors), event, hint);\n };\n return Scope;\n}());\nexport { Scope };\n/**\n * Retruns the global event processors.\n */\nfunction getGlobalEventProcessors() {\n var global = getGlobalObject();\n global.__SENTRY__ = global.__SENTRY__ || {};\n global.__SENTRY__.globalEventProcessors = global.__SENTRY__.globalEventProcessors || [];\n return global.__SENTRY__.globalEventProcessors;\n}\n/**\n * Add a EventProcessor to be kept globally.\n * @param callback EventProcessor to add\n */\nexport function addGlobalEventProcessor(callback) {\n getGlobalEventProcessors().push(callback);\n}\n//# sourceMappingURL=scope.js.map","import { isRegExp, isString } from './is';\n/**\n * Truncates given string to the maximum characters count\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function truncate(str, max) {\n if (max === void 0) { max = 0; }\n // tslint:disable-next-line:strict-type-predicates\n if (typeof str !== 'string' || max === 0) {\n return str;\n }\n return str.length <= max ? str : str.substr(0, max) + \"...\";\n}\n/**\n * This is basically just `trim_line` from\n * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67\n *\n * @param str An object that contains serializable values\n * @param max Maximum number of characters in truncated string\n * @returns string Encoded\n */\nexport function snipLine(line, colno) {\n var newLine = line;\n var ll = newLine.length;\n if (ll <= 150) {\n return newLine;\n }\n if (colno > ll) {\n colno = ll; // tslint:disable-line:no-parameter-reassignment\n }\n var start = Math.max(colno - 60, 0);\n if (start < 5) {\n start = 0;\n }\n var end = Math.min(start + 140, ll);\n if (end > ll - 5) {\n end = ll;\n }\n if (end === ll) {\n start = Math.max(end - 140, 0);\n }\n newLine = newLine.slice(start, end);\n if (start > 0) {\n newLine = \"'{snip} \" + newLine;\n }\n if (end < ll) {\n newLine += ' {snip}';\n }\n return newLine;\n}\n/**\n * Join values in array\n * @param input array of values to be joined together\n * @param delimiter string to be placed in-between values\n * @returns Joined values\n */\nexport function safeJoin(input, delimiter) {\n if (!Array.isArray(input)) {\n return '';\n }\n var output = [];\n // tslint:disable-next-line:prefer-for-of\n for (var i = 0; i < input.length; i++) {\n var value = input[i];\n try {\n output.push(String(value));\n }\n catch (e) {\n output.push('[value cannot be serialized]');\n }\n }\n return output.join(delimiter);\n}\n/**\n * Checks if the value matches a regex or includes the string\n * @param value The string value to be checked against\n * @param pattern Either a regex or a string that must be contained in value\n */\nexport function isMatchingPattern(value, pattern) {\n if (!isString(value)) {\n return false;\n }\n if (isRegExp(pattern)) {\n return pattern.test(value);\n }\n if (typeof pattern === 'string') {\n return value.indexOf(pattern) !== -1;\n }\n return false;\n}\n//# sourceMappingURL=string.js.map","export { LogLevel } from './loglevel';\nexport { Severity } from './severity';\nexport { Status } from './status';\n//# sourceMappingURL=index.js.map","/** The status of an event. */\nexport var Status;\n(function (Status) {\n /** The status could not be determined. */\n Status[\"Unknown\"] = \"unknown\";\n /** The event was skipped due to configuration or callbacks. */\n Status[\"Skipped\"] = \"skipped\";\n /** The event was sent to Sentry successfully. */\n Status[\"Success\"] = \"success\";\n /** The client is currently rate limited and will try again later. */\n Status[\"RateLimit\"] = \"rate_limit\";\n /** The event could not be processed. */\n Status[\"Invalid\"] = \"invalid\";\n /** A server-side error ocurred during submission. */\n Status[\"Failed\"] = \"failed\";\n})(Status || (Status = {}));\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\n(function (Status) {\n /**\n * Converts a HTTP status code into a {@link Status}.\n *\n * @param code The HTTP response status code.\n * @returns The send status or {@link Status.Unknown}.\n */\n function fromHttpCode(code) {\n if (code >= 200 && code < 300) {\n return Status.Success;\n }\n if (code === 429) {\n return Status.RateLimit;\n }\n if (code >= 400 && code < 500) {\n return Status.Invalid;\n }\n if (code >= 500) {\n return Status.Failed;\n }\n return Status.Unknown;\n }\n Status.fromHttpCode = fromHttpCode;\n})(Status || (Status = {}));\n//# sourceMappingURL=status.js.map","// tslint:disable:object-literal-sort-keys\nimport * as tslib_1 from \"tslib\";\n// global reference to slice\nvar UNKNOWN_FUNCTION = '?';\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nvar chrome = /^\\s*at (?:(.*?) ?\\()?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\n// gecko regex: `(?:bundle|\\d+\\.js)`: `bundle` is for react native, `\\d+\\.js` also but specifically for ram bundles because it\n// generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js\n// We need this specific case for now because we want no other regex to match.\nvar gecko = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js))(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar winjs = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nvar geckoEval = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nvar chromeEval = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n/** JSDoc */\nexport function computeStackTrace(ex) {\n // tslint:disable:no-unsafe-any\n var stack = null;\n var popSize = ex && ex.framesToPop;\n try {\n // This must be tried first because Opera 10 *destroys*\n // its stacktrace property if you try to access the stack\n // property first!!\n stack = computeStackTraceFromStacktraceProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n }\n catch (e) {\n // no-empty\n }\n try {\n stack = computeStackTraceFromStackProp(ex);\n if (stack) {\n return popFrames(stack, popSize);\n }\n }\n catch (e) {\n // no-empty\n }\n return {\n message: extractMessage(ex),\n name: ex && ex.name,\n stack: [],\n failed: true,\n };\n}\n/** JSDoc */\n// tslint:disable-next-line:cyclomatic-complexity\nfunction computeStackTraceFromStackProp(ex) {\n // tslint:disable:no-conditional-assignment\n if (!ex || !ex.stack) {\n return null;\n }\n var stack = [];\n var lines = ex.stack.split('\\n');\n var isEval;\n var submatch;\n var parts;\n var element;\n for (var i = 0; i < lines.length; ++i) {\n if ((parts = chrome.exec(lines[i]))) {\n var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval && (submatch = chromeEval.exec(parts[2]))) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n parts[3] = submatch[2]; // line\n parts[4] = submatch[3]; // column\n }\n element = {\n // working with the regexp above is super painful. it is quite a hack, but just stripping the `address at `\n // prefix here seems like the quickest solution for now.\n url: parts[2] && parts[2].indexOf('address at ') === 0 ? parts[2].substr('address at '.length) : parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: isNative ? [parts[2]] : [],\n line: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null,\n };\n }\n else if ((parts = winjs.exec(lines[i]))) {\n element = {\n url: parts[2],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: [],\n line: +parts[3],\n column: parts[4] ? +parts[4] : null,\n };\n }\n else if ((parts = gecko.exec(lines[i]))) {\n isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval && (submatch = geckoEval.exec(parts[3]))) {\n // throw out eval line/column and use top-most line number\n parts[1] = parts[1] || \"eval\";\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = ''; // no column when eval\n }\n else if (i === 0 && !parts[5] && ex.columnNumber !== void 0) {\n // FireFox uses this awesome columnNumber property for its top frame\n // Also note, Firefox's column number is 0-based and everything else expects 1-based,\n // so adding 1\n // NOTE: this hack doesn't work if top-most frame is eval\n stack[0].column = ex.columnNumber + 1;\n }\n element = {\n url: parts[3],\n func: parts[1] || UNKNOWN_FUNCTION,\n args: parts[2] ? parts[2].split(',') : [],\n line: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null,\n };\n }\n else {\n continue;\n }\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n if (!stack.length) {\n return null;\n }\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack: stack,\n };\n}\n/** JSDoc */\nfunction computeStackTraceFromStacktraceProp(ex) {\n if (!ex || !ex.stacktrace) {\n return null;\n }\n // Access and store the stacktrace property before doing ANYTHING\n // else to it because Opera is not very good at providing it\n // reliably in other circumstances.\n var stacktrace = ex.stacktrace;\n var opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\n var opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:<anonymous function: ([^>]+)>|([^\\)]+))\\((.*)\\))? in (.*):\\s*$/i;\n var lines = stacktrace.split('\\n');\n var stack = [];\n var parts;\n for (var line = 0; line < lines.length; line += 2) {\n // tslint:disable:no-conditional-assignment\n var element = null;\n if ((parts = opera10Regex.exec(lines[line]))) {\n element = {\n url: parts[2],\n func: parts[3],\n args: [],\n line: +parts[1],\n column: null,\n };\n }\n else if ((parts = opera11Regex.exec(lines[line]))) {\n element = {\n url: parts[6],\n func: parts[3] || parts[4],\n args: parts[5] ? parts[5].split(',') : [],\n line: +parts[1],\n column: +parts[2],\n };\n }\n if (element) {\n if (!element.func && element.line) {\n element.func = UNKNOWN_FUNCTION;\n }\n stack.push(element);\n }\n }\n if (!stack.length) {\n return null;\n }\n return {\n message: extractMessage(ex),\n name: ex.name,\n stack: stack,\n };\n}\n/** Remove N number of frames from the stack */\nfunction popFrames(stacktrace, popSize) {\n try {\n return tslib_1.__assign({}, stacktrace, { stack: stacktrace.stack.slice(popSize) });\n }\n catch (e) {\n return stacktrace;\n }\n}\n/**\n * There are cases where stacktrace.message is an Event object\n * https://github.com/getsentry/sentry-javascript/issues/1949\n * In this specific case we try to extract stacktrace.message.error.message\n */\nfunction extractMessage(ex) {\n var message = ex && ex.message;\n if (!message) {\n return 'No error message';\n }\n if (message.error && typeof message.error.message === 'string') {\n return message.error.message;\n }\n return message;\n}\n//# sourceMappingURL=tracekit.js.map","export var SDK_NAME = 'sentry.javascript.browser';\nexport var SDK_VERSION = '5.17.0';\n//# sourceMappingURL=version.js.map","import { extractExceptionKeysForMessage, isEvent, normalizeToSize } from '@sentry/utils';\nimport { computeStackTrace } from './tracekit';\nvar STACKTRACE_LIMIT = 50;\n/**\n * This function creates an exception from an TraceKitStackTrace\n * @param stacktrace TraceKitStackTrace that will be converted to an exception\n * @hidden\n */\nexport function exceptionFromStacktrace(stacktrace) {\n var frames = prepareFramesForEvent(stacktrace.stack);\n var exception = {\n type: stacktrace.name,\n value: stacktrace.message,\n };\n if (frames && frames.length) {\n exception.stacktrace = { frames: frames };\n }\n // tslint:disable-next-line:strict-type-predicates\n if (exception.type === undefined && exception.value === '') {\n exception.value = 'Unrecoverable error caught';\n }\n return exception;\n}\n/**\n * @hidden\n */\nexport function eventFromPlainObject(exception, syntheticException, rejection) {\n var event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : rejection ? 'UnhandledRejection' : 'Error',\n value: \"Non-Error \" + (rejection ? 'promise rejection' : 'exception') + \" captured with keys: \" + extractExceptionKeysForMessage(exception),\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n if (syntheticException) {\n var stacktrace = computeStackTrace(syntheticException);\n var frames_1 = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames: frames_1,\n };\n }\n return event;\n}\n/**\n * @hidden\n */\nexport function eventFromStacktrace(stacktrace) {\n var exception = exceptionFromStacktrace(stacktrace);\n return {\n exception: {\n values: [exception],\n },\n };\n}\n/**\n * @hidden\n */\nexport function prepareFramesForEvent(stack) {\n if (!stack || !stack.length) {\n return [];\n }\n var localStack = stack;\n var firstFrameFunction = localStack[0].func || '';\n var lastFrameFunction = localStack[localStack.length - 1].func || '';\n // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)\n if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {\n localStack = localStack.slice(1);\n }\n // If stack ends with one of our internal API calls, remove it (ends, meaning it's the bottom of the stack - aka top-most call)\n if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {\n localStack = localStack.slice(0, -1);\n }\n // The frame where the crash happened, should be the last entry in the array\n return localStack\n .slice(0, STACKTRACE_LIMIT)\n .map(function (frame) { return ({\n colno: frame.column === null ? undefined : frame.column,\n filename: frame.url || localStack[0].url,\n function: frame.func || '?',\n in_app: true,\n lineno: frame.line === null ? undefined : frame.line,\n }); })\n .reverse();\n}\n//# sourceMappingURL=parsers.js.map","import { isString } from './is';\nimport { snipLine } from './string';\n/**\n * Requires a module which is protected against bundler minification.\n *\n * @param request The module path to resolve\n */\nexport function dynamicRequire(mod, request) {\n // tslint:disable-next-line: no-unsafe-any\n return mod.require(request);\n}\n/**\n * Checks whether we're in the Node.js or Browser environment\n *\n * @returns Answer to given question\n */\nexport function isNodeEnv() {\n // tslint:disable:strict-type-predicates\n return Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]';\n}\nvar fallbackGlobalObject = {};\n/**\n * Safely get global scope object\n *\n * @returns Global scope object\n */\nexport function getGlobalObject() {\n return (isNodeEnv()\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof self !== 'undefined'\n ? self\n : fallbackGlobalObject);\n}\n/**\n * UUID4 generator\n *\n * @returns string Generated UUID4.\n */\nexport function uuid4() {\n var global = getGlobalObject();\n var crypto = global.crypto || global.msCrypto;\n if (!(crypto === void 0) && crypto.getRandomValues) {\n // Use window.crypto API if available\n var arr = new Uint16Array(8);\n crypto.getRandomValues(arr);\n // set 4 in byte 7\n // tslint:disable-next-line:no-bitwise\n arr[3] = (arr[3] & 0xfff) | 0x4000;\n // set 2 most significant bits of byte 9 to '10'\n // tslint:disable-next-line:no-bitwise\n arr[4] = (arr[4] & 0x3fff) | 0x8000;\n var pad = function (num) {\n var v = num.toString(16);\n while (v.length < 4) {\n v = \"0\" + v;\n }\n return v;\n };\n return (pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7]));\n }\n // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523\n return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n // tslint:disable-next-line:no-bitwise\n var r = (Math.random() * 16) | 0;\n // tslint:disable-next-line:no-bitwise\n var v = c === 'x' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n/**\n * Parses string form of URL into an object\n * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B\n * // intentionally using regex and not <a/> href parsing trick because React Native and other\n * // environments where DOM might not be available\n * @returns parsed URL object\n */\nexport function parseUrl(url) {\n if (!url) {\n return {};\n }\n var match = url.match(/^(([^:\\/?#]+):)?(\\/\\/([^\\/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/);\n if (!match) {\n return {};\n }\n // coerce to undefined values to empty string so we don't get 'undefined'\n var query = match[6] || '';\n var fragment = match[8] || '';\n return {\n host: match[4],\n path: match[5],\n protocol: match[2],\n relative: match[5] + query + fragment,\n };\n}\n/**\n * Extracts either message or type+value from an event that can be used for user-facing logs\n * @returns event's description\n */\nexport function getEventDescription(event) {\n if (event.message) {\n return event.message;\n }\n if (event.exception && event.exception.values && event.exception.values[0]) {\n var exception = event.exception.values[0];\n if (exception.type && exception.value) {\n return exception.type + \": \" + exception.value;\n }\n return exception.type || exception.value || event.event_id || '<unknown>';\n }\n return event.event_id || '<unknown>';\n}\n/** JSDoc */\nexport function consoleSandbox(callback) {\n var global = getGlobalObject();\n var levels = ['debug', 'info', 'warn', 'error', 'log', 'assert'];\n if (!('console' in global)) {\n return callback();\n }\n var originalConsole = global.console;\n var wrappedLevels = {};\n // Restore all wrapped console methods\n levels.forEach(function (level) {\n if (level in global.console && originalConsole[level].__sentry_original__) {\n wrappedLevels[level] = originalConsole[level];\n originalConsole[level] = originalConsole[level].__sentry_original__;\n }\n });\n // Perform callback manipulations\n var result = callback();\n // Revert restoration to wrapped state\n Object.keys(wrappedLevels).forEach(function (level) {\n originalConsole[level] = wrappedLevels[level];\n });\n return result;\n}\n/**\n * Adds exception values, type and value to an synthetic Exception.\n * @param event The event to modify.\n * @param value Value of the exception.\n * @param type Type of the exception.\n * @hidden\n */\nexport function addExceptionTypeValue(event, value, type) {\n event.exception = event.exception || {};\n event.exception.values = event.exception.values || [];\n event.exception.values[0] = event.exception.values[0] || {};\n event.exception.values[0].value = event.exception.values[0].value || value || '';\n event.exception.values[0].type = event.exception.values[0].type || type || 'Error';\n}\n/**\n * Adds exception mechanism to a given event.\n * @param event The event to modify.\n * @param mechanism Mechanism of the mechanism.\n * @hidden\n */\nexport function addExceptionMechanism(event, mechanism) {\n if (mechanism === void 0) { mechanism = {}; }\n // TODO: Use real type with `keyof Mechanism` thingy and maybe make it better?\n try {\n // @ts-ignore\n // tslint:disable:no-non-null-assertion\n event.exception.values[0].mechanism = event.exception.values[0].mechanism || {};\n Object.keys(mechanism).forEach(function (key) {\n // @ts-ignore\n event.exception.values[0].mechanism[key] = mechanism[key];\n });\n }\n catch (_oO) {\n // no-empty\n }\n}\n/**\n * A safe form of location.href\n */\nexport function getLocationHref() {\n try {\n return document.location.href;\n }\n catch (oO) {\n return '';\n }\n}\n/**\n * Given a child DOM element, returns a query-selector statement describing that\n * and its ancestors\n * e.g. [HTMLElement] => body > div > input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nexport function htmlTreeAsString(elem) {\n // try/catch both:\n // - accessing event.target (see getsentry/raven-js#838, #768)\n // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly\n // - can throw an exception in some circumstances.\n try {\n var currentElem = elem;\n var MAX_TRAVERSE_HEIGHT = 5;\n var MAX_OUTPUT_LEN = 80;\n var out = [];\n var height = 0;\n var len = 0;\n var separator = ' > ';\n var sepLength = separator.length;\n var nextStr = void 0;\n while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {\n nextStr = _htmlElementAsString(currentElem);\n // bail out if\n // - nextStr is the 'html' element\n // - the length of the string that would be created exceeds MAX_OUTPUT_LEN\n // (ignore this limit if we are on the first iteration)\n if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {\n break;\n }\n out.push(nextStr);\n len += nextStr.length;\n currentElem = currentElem.parentNode;\n }\n return out.reverse().join(separator);\n }\n catch (_oO) {\n return '<unknown>';\n }\n}\n/**\n * Returns a simple, query-selector representation of a DOM element\n * e.g. [HTMLElement] => input#foo.btn[name=baz]\n * @returns generated DOM path\n */\nfunction _htmlElementAsString(el) {\n var elem = el;\n var out = [];\n var className;\n var classes;\n var key;\n var attr;\n var i;\n if (!elem || !elem.tagName) {\n return '';\n }\n out.push(elem.tagName.toLowerCase());\n if (elem.id) {\n out.push(\"#\" + elem.id);\n }\n className = elem.className;\n if (className && isString(className)) {\n classes = className.split(/\\s+/);\n for (i = 0; i < classes.length; i++) {\n out.push(\".\" + classes[i]);\n }\n }\n var attrWhitelist = ['type', 'name', 'title', 'alt'];\n for (i = 0; i < attrWhitelist.length; i++) {\n key = attrWhitelist[i];\n attr = elem.getAttribute(key);\n if (attr) {\n out.push(\"[\" + key + \"=\\\"\" + attr + \"\\\"]\");\n }\n }\n return out.join('');\n}\nvar INITIAL_TIME = Date.now();\nvar prevNow = 0;\nvar performanceFallback = {\n now: function () {\n var now = Date.now() - INITIAL_TIME;\n if (now < prevNow) {\n now = prevNow;\n }\n prevNow = now;\n return now;\n },\n timeOrigin: INITIAL_TIME,\n};\nexport var crossPlatformPerformance = (function () {\n if (isNodeEnv()) {\n try {\n var perfHooks = dynamicRequire(module, 'perf_hooks');\n return perfHooks.performance;\n }\n catch (_) {\n return performanceFallback;\n }\n }\n if (getGlobalObject().performance) {\n // Polyfill for performance.timeOrigin.\n //\n // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin\n // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.\n // tslint:disable-next-line:strict-type-predicates\n if (performance.timeOrigin === undefined) {\n // As of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always a\n // valid fallback. In the absence of a initial time provided by the browser, fallback to INITIAL_TIME.\n // @ts-ignore\n // tslint:disable-next-line:deprecation\n performance.timeOrigin = (performance.timing && performance.timing.navigationStart) || INITIAL_TIME;\n }\n }\n return getGlobalObject().performance || performanceFallback;\n})();\n/**\n * Returns a timestamp in seconds with milliseconds precision since the UNIX epoch calculated with the monotonic clock.\n */\nexport function timestampWithMs() {\n return (crossPlatformPerformance.timeOrigin + crossPlatformPerformance.now()) / 1000;\n}\n// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string\nvar SEMVER_REGEXP = /^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$/;\n/**\n * Parses input into a SemVer interface\n * @param input string representation of a semver version\n */\nexport function parseSemver(input) {\n var match = input.match(SEMVER_REGEXP) || [];\n var major = parseInt(match[1], 10);\n var minor = parseInt(match[2], 10);\n var patch = parseInt(match[3], 10);\n return {\n buildmetadata: match[5],\n major: isNaN(major) ? undefined : major,\n minor: isNaN(minor) ? undefined : minor,\n patch: isNaN(patch) ? undefined : patch,\n prerelease: match[4],\n };\n}\nvar defaultRetryAfter = 60 * 1000; // 60 seconds\n/**\n * Extracts Retry-After value from the request header or returns default value\n * @param now current unix timestamp\n * @param header string representation of 'Retry-After' header\n */\nexport function parseRetryAfterHeader(now, header) {\n if (!header) {\n return defaultRetryAfter;\n }\n var headerDelay = parseInt(\"\" + header, 10);\n if (!isNaN(headerDelay)) {\n return headerDelay * 1000;\n }\n var headerDate = Date.parse(\"\" + header);\n if (!isNaN(headerDate)) {\n return headerDate - now;\n }\n return defaultRetryAfter;\n}\nvar defaultFunctionName = '<anonymous>';\n/**\n * Safely extract function name from itself\n */\nexport function getFunctionName(fn) {\n try {\n if (!fn || typeof fn !== 'function') {\n return defaultFunctionName;\n }\n return fn.name || defaultFunctionName;\n }\n catch (e) {\n // Just accessing custom props in some Selenium environments\n // can cause a \"Permission denied\" exception (see raven-js#495).\n return defaultFunctionName;\n }\n}\n/**\n * This function adds context (pre/post/line) lines to the provided frame\n *\n * @param lines string[] containing all lines\n * @param frame StackFrame that will be mutated\n * @param linesOfContext number of context lines we want to add pre/post\n */\nexport function addContextToFrame(lines, frame, linesOfContext) {\n if (linesOfContext === void 0) { linesOfContext = 5; }\n var lineno = frame.lineno || 0;\n var maxLines = lines.length;\n var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);\n frame.pre_context = lines\n .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)\n .map(function (line) { return snipLine(line, 0); });\n frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);\n frame.post_context = lines\n .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)\n .map(function (line) { return snipLine(line, 0); });\n}\n//# sourceMappingURL=misc.js.map","/* tslint:disable:only-arrow-functions no-unsafe-any */\nimport * as tslib_1 from \"tslib\";\nimport { isInstanceOf, isString } from './is';\nimport { logger } from './logger';\nimport { getFunctionName, getGlobalObject } from './misc';\nimport { fill } from './object';\nimport { supportsHistory, supportsNativeFetch } from './supports';\nvar global = getGlobalObject();\n/**\n * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.\n * - Console API\n * - Fetch API\n * - XHR API\n * - History API\n * - DOM API (click/typing)\n * - Error API\n * - UnhandledRejection API\n */\nvar handlers = {};\nvar instrumented = {};\n/** Instruments given API */\nfunction instrument(type) {\n if (instrumented[type]) {\n return;\n }\n instrumented[type] = true;\n switch (type) {\n case 'console':\n instrumentConsole();\n break;\n case 'dom':\n instrumentDOM();\n break;\n case 'xhr':\n instrumentXHR();\n break;\n case 'fetch':\n instrumentFetch();\n break;\n case 'history':\n instrumentHistory();\n break;\n case 'error':\n instrumentError();\n break;\n case 'unhandledrejection':\n instrumentUnhandledRejection();\n break;\n default:\n logger.warn('unknown instrumentation type:', type);\n }\n}\n/**\n * Add handler that will be called when given type of instrumentation triggers.\n * Use at your own risk, this might break without changelog notice, only used internally.\n * @hidden\n */\nexport function addInstrumentationHandler(handler) {\n // tslint:disable-next-line:strict-type-predicates\n if (!handler || typeof handler.type !== 'string' || typeof handler.callback !== 'function') {\n return;\n }\n handlers[handler.type] = handlers[handler.type] || [];\n handlers[handler.type].push(handler.callback);\n instrument(handler.type);\n}\n/** JSDoc */\nfunction triggerHandlers(type, data) {\n var e_1, _a;\n if (!type || !handlers[type]) {\n return;\n }\n try {\n for (var _b = tslib_1.__values(handlers[type] || []), _c = _b.next(); !_c.done; _c = _b.next()) {\n var handler = _c.value;\n try {\n handler(data);\n }\n catch (e) {\n logger.error(\"Error while triggering instrumentation handler.\\nType: \" + type + \"\\nName: \" + getFunctionName(handler) + \"\\nError: \" + e);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n}\n/** JSDoc */\nfunction instrumentConsole() {\n if (!('console' in global)) {\n return;\n }\n ['debug', 'info', 'warn', 'error', 'log', 'assert'].forEach(function (level) {\n if (!(level in global.console)) {\n return;\n }\n fill(global.console, level, function (originalConsoleLevel) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n triggerHandlers('console', { args: args, level: level });\n // this fails for some browsers. :(\n if (originalConsoleLevel) {\n Function.prototype.apply.call(originalConsoleLevel, global.console, args);\n }\n };\n });\n });\n}\n/** JSDoc */\nfunction instrumentFetch() {\n if (!supportsNativeFetch()) {\n return;\n }\n fill(global, 'fetch', function (originalFetch) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var commonHandlerData = {\n args: args,\n fetchData: {\n method: getFetchMethod(args),\n url: getFetchUrl(args),\n },\n startTimestamp: Date.now(),\n };\n triggerHandlers('fetch', tslib_1.__assign({}, commonHandlerData));\n return originalFetch.apply(global, args).then(function (response) {\n triggerHandlers('fetch', tslib_1.__assign({}, commonHandlerData, { endTimestamp: Date.now(), response: response }));\n return response;\n }, function (error) {\n triggerHandlers('fetch', tslib_1.__assign({}, commonHandlerData, { endTimestamp: Date.now(), error: error }));\n throw error;\n });\n };\n });\n}\n/** Extract `method` from fetch call arguments */\nfunction getFetchMethod(fetchArgs) {\n if (fetchArgs === void 0) { fetchArgs = []; }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request) && fetchArgs[0].method) {\n return String(fetchArgs[0].method).toUpperCase();\n }\n if (fetchArgs[1] && fetchArgs[1].method) {\n return String(fetchArgs[1].method).toUpperCase();\n }\n return 'GET';\n}\n/** Extract `url` from fetch call arguments */\nfunction getFetchUrl(fetchArgs) {\n if (fetchArgs === void 0) { fetchArgs = []; }\n if (typeof fetchArgs[0] === 'string') {\n return fetchArgs[0];\n }\n if ('Request' in global && isInstanceOf(fetchArgs[0], Request)) {\n return fetchArgs[0].url;\n }\n return String(fetchArgs[0]);\n}\n/** JSDoc */\nfunction instrumentXHR() {\n if (!('XMLHttpRequest' in global)) {\n return;\n }\n var xhrproto = XMLHttpRequest.prototype;\n fill(xhrproto, 'open', function (originalOpen) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var xhr = this; // tslint:disable-line:no-this-assignment\n var url = args[1];\n xhr.__sentry_xhr__ = {\n method: isString(args[0]) ? args[0].toUpperCase() : args[0],\n url: args[1],\n };\n // if Sentry key appears in URL, don't capture it as a request\n if (isString(url) && xhr.__sentry_xhr__.method === 'POST' && url.match(/sentry_key/)) {\n xhr.__sentry_own_request__ = true;\n }\n var onreadystatechangeHandler = function () {\n if (xhr.readyState === 4) {\n try {\n // touching statusCode in some platforms throws\n // an exception\n if (xhr.__sentry_xhr__) {\n xhr.__sentry_xhr__.status_code = xhr.status;\n }\n }\n catch (e) {\n /* do nothing */\n }\n triggerHandlers('xhr', {\n args: args,\n endTimestamp: Date.now(),\n startTimestamp: Date.now(),\n xhr: xhr,\n });\n }\n };\n if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {\n fill(xhr, 'onreadystatechange', function (original) {\n return function () {\n var readyStateArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n readyStateArgs[_i] = arguments[_i];\n }\n onreadystatechangeHandler();\n return original.apply(xhr, readyStateArgs);\n };\n });\n }\n else {\n xhr.addEventListener('readystatechange', onreadystatechangeHandler);\n }\n return originalOpen.apply(xhr, args);\n };\n });\n fill(xhrproto, 'send', function (originalSend) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n triggerHandlers('xhr', {\n args: args,\n startTimestamp: Date.now(),\n xhr: this,\n });\n return originalSend.apply(this, args);\n };\n });\n}\nvar lastHref;\n/** JSDoc */\nfunction instrumentHistory() {\n if (!supportsHistory()) {\n return;\n }\n var oldOnPopState = global.onpopstate;\n global.onpopstate = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var to = global.location.href;\n // keep track of the current URL state, as we always receive only the updated state\n var from = lastHref;\n lastHref = to;\n triggerHandlers('history', {\n from: from,\n to: to,\n });\n if (oldOnPopState) {\n return oldOnPopState.apply(this, args);\n }\n };\n /** @hidden */\n function historyReplacementFunction(originalHistoryFunction) {\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var url = args.length > 2 ? args[2] : undefined;\n if (url) {\n // coerce to string (this is what pushState does)\n var from = lastHref;\n var to = String(url);\n // keep track of the current URL state, as we always receive only the updated state\n lastHref = to;\n triggerHandlers('history', {\n from: from,\n to: to,\n });\n }\n return originalHistoryFunction.apply(this, args);\n };\n }\n fill(global.history, 'pushState', historyReplacementFunction);\n fill(global.history, 'replaceState', historyReplacementFunction);\n}\n/** JSDoc */\nfunction instrumentDOM() {\n if (!('document' in global)) {\n return;\n }\n // Capture breadcrumbs from any click that is unhandled / bubbled up all the way\n // to the document. Do this before we instrument addEventListener.\n global.document.addEventListener('click', domEventHandler('click', triggerHandlers.bind(null, 'dom')), false);\n global.document.addEventListener('keypress', keypressEventHandler(triggerHandlers.bind(null, 'dom')), false);\n // After hooking into document bubbled up click and keypresses events, we also hook into user handled click & keypresses.\n ['EventTarget', 'Node'].forEach(function (target) {\n var proto = global[target] && global[target].prototype;\n if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {\n return;\n }\n fill(proto, 'addEventListener', function (original) {\n return function (eventName, fn, options) {\n if (fn && fn.handleEvent) {\n if (eventName === 'click') {\n fill(fn, 'handleEvent', function (innerOriginal) {\n return function (event) {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n if (eventName === 'keypress') {\n fill(fn, 'handleEvent', function (innerOriginal) {\n return function (event) {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(event);\n return innerOriginal.call(this, event);\n };\n });\n }\n }\n else {\n if (eventName === 'click') {\n domEventHandler('click', triggerHandlers.bind(null, 'dom'), true)(this);\n }\n if (eventName === 'keypress') {\n keypressEventHandler(triggerHandlers.bind(null, 'dom'))(this);\n }\n }\n return original.call(this, eventName, fn, options);\n };\n });\n fill(proto, 'removeEventListener', function (original) {\n return function (eventName, fn, options) {\n var callback = fn;\n try {\n callback = callback && (callback.__sentry_wrapped__ || callback);\n }\n catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return original.call(this, eventName, callback, options);\n };\n });\n });\n}\nvar debounceDuration = 1000;\nvar debounceTimer = 0;\nvar keypressTimeout;\nvar lastCapturedEvent;\n/**\n * Wraps addEventListener to capture UI breadcrumbs\n * @param name the event name (e.g. \"click\")\n * @param handler function that will be triggered\n * @param debounce decides whether it should wait till another event loop\n * @returns wrapped breadcrumb events handler\n * @hidden\n */\nfunction domEventHandler(name, handler, debounce) {\n if (debounce === void 0) { debounce = false; }\n return function (event) {\n // reset keypress timeout; e.g. triggering a 'click' after\n // a 'keypress' will reset the keypress debounce so that a new\n // set of keypresses can be recorded\n keypressTimeout = undefined;\n // It's possible this handler might trigger multiple times for the same\n // event (e.g. event propagation through node ancestors). Ignore if we've\n // already captured the event.\n if (!event || lastCapturedEvent === event) {\n return;\n }\n lastCapturedEvent = event;\n if (debounceTimer) {\n clearTimeout(debounceTimer);\n }\n if (debounce) {\n debounceTimer = setTimeout(function () {\n handler({ event: event, name: name });\n });\n }\n else {\n handler({ event: event, name: name });\n }\n };\n}\n/**\n * Wraps addEventListener to capture keypress UI events\n * @param handler function that will be triggered\n * @returns wrapped keypress events handler\n * @hidden\n */\nfunction keypressEventHandler(handler) {\n // TODO: if somehow user switches keypress target before\n // debounce timeout is triggered, we will only capture\n // a single breadcrumb from the FIRST target (acceptable?)\n return function (event) {\n var target;\n try {\n target = event.target;\n }\n catch (e) {\n // just accessing event properties can throw an exception in some rare circumstances\n // see: https://github.com/getsentry/raven-js/issues/838\n return;\n }\n var tagName = target && target.tagName;\n // only consider keypress events on actual input elements\n // this will disregard keypresses targeting body (e.g. tabbing\n // through elements, hotkeys, etc)\n if (!tagName || (tagName !== 'INPUT' && tagName !== 'TEXTAREA' && !target.isContentEditable)) {\n return;\n }\n // record first keypress in a series, but ignore subsequent\n // keypresses until debounce clears\n if (!keypressTimeout) {\n domEventHandler('input', handler)(event);\n }\n clearTimeout(keypressTimeout);\n keypressTimeout = setTimeout(function () {\n keypressTimeout = undefined;\n }, debounceDuration);\n };\n}\nvar _oldOnErrorHandler = null;\n/** JSDoc */\nfunction instrumentError() {\n _oldOnErrorHandler = global.onerror;\n global.onerror = function (msg, url, line, column, error) {\n triggerHandlers('error', {\n column: column,\n error: error,\n line: line,\n msg: msg,\n url: url,\n });\n if (_oldOnErrorHandler) {\n return _oldOnErrorHandler.apply(this, arguments);\n }\n return false;\n };\n}\nvar _oldOnUnhandledRejectionHandler = null;\n/** JSDoc */\nfunction instrumentUnhandledRejection() {\n _oldOnUnhandledRejectionHandler = global.onunhandledrejection;\n global.onunhandledrejection = function (e) {\n triggerHandlers('unhandledrejection', e);\n if (_oldOnUnhandledRejectionHandler) {\n return _oldOnUnhandledRejectionHandler.apply(this, arguments);\n }\n return true;\n };\n}\n//# sourceMappingURL=instrument.js.map","import { SentryError } from './error';\nimport { SyncPromise } from './syncpromise';\n/** A simple queue that holds promises. */\nvar PromiseBuffer = /** @class */ (function () {\n function PromiseBuffer(_limit) {\n this._limit = _limit;\n /** Internal set of queued Promises */\n this._buffer = [];\n }\n /**\n * Says if the buffer is ready to take more requests\n */\n PromiseBuffer.prototype.isReady = function () {\n return this._limit === undefined || this.length() < this._limit;\n };\n /**\n * Add a promise to the queue.\n *\n * @param task Can be any PromiseLike<T>\n * @returns The original promise.\n */\n PromiseBuffer.prototype.add = function (task) {\n var _this = this;\n if (!this.isReady()) {\n return SyncPromise.reject(new SentryError('Not adding Promise due to buffer limit reached.'));\n }\n if (this._buffer.indexOf(task) === -1) {\n this._buffer.push(task);\n }\n task\n .then(function () { return _this.remove(task); })\n .then(null, function () {\n return _this.remove(task).then(null, function () {\n // We have to add this catch here otherwise we have an unhandledPromiseRejection\n // because it's a new Promise chain.\n });\n });\n return task;\n };\n /**\n * Remove a promise to the queue.\n *\n * @param task Can be any PromiseLike<T>\n * @returns Removed promise.\n */\n PromiseBuffer.prototype.remove = function (task) {\n var removedTask = this._buffer.splice(this._buffer.indexOf(task), 1)[0];\n return removedTask;\n };\n /**\n * This function returns the number of unresolved promises in the queue.\n */\n PromiseBuffer.prototype.length = function () {\n return this._buffer.length;\n };\n /**\n * This will drain the whole queue, returns true if queue is empty or drained.\n * If timeout is provided and the queue takes longer to drain, the promise still resolves but with false.\n *\n * @param timeout Number in ms to wait until it resolves with false.\n */\n PromiseBuffer.prototype.drain = function (timeout) {\n var _this = this;\n return new SyncPromise(function (resolve) {\n var capturedSetTimeout = setTimeout(function () {\n if (timeout && timeout > 0) {\n resolve(false);\n }\n }, timeout);\n SyncPromise.all(_this._buffer)\n .then(function () {\n clearTimeout(capturedSetTimeout);\n resolve(true);\n })\n .then(null, function () {\n resolve(true);\n });\n });\n };\n return PromiseBuffer;\n}());\nexport { PromiseBuffer };\n//# sourceMappingURL=promisebuffer.js.map","import { API } from '@sentry/core';\nimport { PromiseBuffer, SentryError } from '@sentry/utils';\n/** Base Transport class implementation */\nvar BaseTransport = /** @class */ (function () {\n function BaseTransport(options) {\n this.options = options;\n /** A simple buffer holding all requests. */\n this._buffer = new PromiseBuffer(30);\n this._api = new API(this.options.dsn);\n // tslint:disable-next-line:deprecation\n this.url = this._api.getStoreEndpointWithUrlEncodedAuth();\n }\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.sendEvent = function (_) {\n throw new SentryError('Transport Class has to implement `sendEvent` method');\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.close = function (timeout) {\n return this._buffer.drain(timeout);\n };\n return BaseTransport;\n}());\nexport { BaseTransport };\n//# sourceMappingURL=base.js.map","import { addExceptionMechanism, addExceptionTypeValue, isDOMError, isDOMException, isError, isErrorEvent, isEvent, isPlainObject, } from '@sentry/utils';\nimport { eventFromPlainObject, eventFromStacktrace, prepareFramesForEvent } from './parsers';\nimport { computeStackTrace } from './tracekit';\n/** JSDoc */\nexport function eventFromUnknownInput(exception, syntheticException, options) {\n if (options === void 0) { options = {}; }\n var event;\n if (isErrorEvent(exception) && exception.error) {\n // If it is an ErrorEvent with `error` property, extract it to get actual Error\n var errorEvent = exception;\n exception = errorEvent.error; // tslint:disable-line:no-parameter-reassignment\n event = eventFromStacktrace(computeStackTrace(exception));\n return event;\n }\n if (isDOMError(exception) || isDOMException(exception)) {\n // If it is a DOMError or DOMException (which are legacy APIs, but still supported in some browsers)\n // then we just extract the name and message, as they don't provide anything else\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n var domException = exception;\n var name_1 = domException.name || (isDOMError(domException) ? 'DOMError' : 'DOMException');\n var message = domException.message ? name_1 + \": \" + domException.message : name_1;\n event = eventFromString(message, syntheticException, options);\n addExceptionTypeValue(event, message);\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n event = eventFromStacktrace(computeStackTrace(exception));\n return event;\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it is plain Object or Event, serialize it manually and extract options\n // This will allow us to group events based on top-level keys\n // which is much better than creating new group when any key/value change\n var objectException = exception;\n event = eventFromPlainObject(objectException, syntheticException, options.rejection);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n }\n // If none of previous checks were valid, then it means that it's not:\n // - an instance of DOMError\n // - an instance of DOMException\n // - an instance of Event\n // - an instance of Error\n // - a valid ErrorEvent (one with an error property)\n // - a plain Object\n //\n // So bail out and capture it as a simple message:\n event = eventFromString(exception, syntheticException, options);\n addExceptionTypeValue(event, \"\" + exception, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n}\n// this._options.attachStacktrace\n/** JSDoc */\nexport function eventFromString(input, syntheticException, options) {\n if (options === void 0) { options = {}; }\n var event = {\n message: input,\n };\n if (options.attachStacktrace && syntheticException) {\n var stacktrace = computeStackTrace(syntheticException);\n var frames_1 = prepareFramesForEvent(stacktrace.stack);\n event.stacktrace = {\n frames: frames_1,\n };\n }\n return event;\n}\n//# sourceMappingURL=eventbuilder.js.map","/** JSDoc */\nexport var Severity;\n(function (Severity) {\n /** JSDoc */\n Severity[\"Fatal\"] = \"fatal\";\n /** JSDoc */\n Severity[\"Error\"] = \"error\";\n /** JSDoc */\n Severity[\"Warning\"] = \"warning\";\n /** JSDoc */\n Severity[\"Log\"] = \"log\";\n /** JSDoc */\n Severity[\"Info\"] = \"info\";\n /** JSDoc */\n Severity[\"Debug\"] = \"debug\";\n /** JSDoc */\n Severity[\"Critical\"] = \"critical\";\n})(Severity || (Severity = {}));\n// tslint:disable:completed-docs\n// tslint:disable:no-unnecessary-qualifier no-namespace\n(function (Severity) {\n /**\n * Converts a string-based level into a {@link Severity}.\n *\n * @param level string representation of Severity\n * @returns Severity\n */\n function fromString(level) {\n switch (level) {\n case 'debug':\n return Severity.Debug;\n case 'info':\n return Severity.Info;\n case 'warn':\n case 'warning':\n return Severity.Warning;\n case 'error':\n return Severity.Error;\n case 'fatal':\n return Severity.Fatal;\n case 'critical':\n return Severity.Critical;\n case 'log':\n default:\n return Severity.Log;\n }\n }\n Severity.fromString = fromString;\n})(Severity || (Severity = {}));\n//# sourceMappingURL=severity.js.map"],"sourceRoot":""}