Full Site Editing - Version 3.36343

Version Description

Download this release

Release Info

Developer fullofcaffeine
Plugin Icon wp plugin Full Site Editing
Version 3.36343
Comparing to
See all releases

Code changes from version 3.36079 to 3.36343

build_meta.txt CHANGED
@@ -1,3 +1,3 @@
1
- commit_hash=71848faa7a136cbb435e3a6e360ab9e003d97f5a
2
- commit_url=https://github.com/Automattic/wp-calypso/commit/71848faa7a136cbb435e3a6e360ab9e003d97f5a
3
- build_number=3.36079
1
+ commit_hash=cf205c8cc260f8faf454ad54cc32144ab6a521f5
2
+ commit_url=https://github.com/Automattic/wp-calypso/commit/cf205c8cc260f8faf454ad54cc32144ab6a521f5
3
+ build_number=3.36343
error-reporting/dist/error-reporting.asset.php CHANGED
@@ -1 +1 @@
1
- <?php return array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => 'a4fc2b0f439b264af608');
1
+ <?php return array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '350ed962902d03be0d1a');
error-reporting/dist/error-reporting.js CHANGED
@@ -2,430 +2,450 @@
2
  /******/ "use strict";
3
  /******/ var __webpack_modules__ = ({
4
 
5
- /***/ 487:
6
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7
 
8
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9
- /* harmony export */ "u": function() { return /* binding */ BrowserBackend; }
10
  /* harmony export */ });
11
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(334);
12
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4911);
13
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(9504);
14
- /* harmony import */ var _sentry_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2226);
15
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9798);
16
- /* harmony import */ var _eventbuilder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1988);
17
- /* harmony import */ var _transports__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1449);
18
- /* harmony import */ var _transports__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(6149);
19
- /* harmony import */ var _transports__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(4827);
20
- /* harmony import */ var _transports__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(6144);
 
 
 
 
21
 
22
 
23
 
24
 
25
 
 
26
 
27
  /**
28
- * The Sentry Browser SDK Backend.
29
- * @hidden
 
 
30
  */
31
- var BrowserBackend = /** @class */ (function (_super) {
32
- (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__extends */ .ZT)(BrowserBackend, _super);
33
- function BrowserBackend() {
34
- return _super !== null && _super.apply(this, arguments) || this;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  }
36
- /**
37
- * @inheritDoc
38
- */
39
- BrowserBackend.prototype.eventFromException = function (exception, hint) {
40
- return (0,_eventbuilder__WEBPACK_IMPORTED_MODULE_1__/* .eventFromException */ .dr)(exception, hint, this._options.attachStacktrace);
41
- };
42
- /**
43
- * @inheritDoc
44
- */
45
- BrowserBackend.prototype.eventFromMessage = function (message, level, hint) {
46
- if (level === void 0) { level = _sentry_types__WEBPACK_IMPORTED_MODULE_2__/* .Severity.Info */ .z.Info; }
47
- return (0,_eventbuilder__WEBPACK_IMPORTED_MODULE_1__/* .eventFromMessage */ .aB)(message, level, hint, this._options.attachStacktrace);
48
- };
49
- /**
50
- * @inheritDoc
51
- */
52
- BrowserBackend.prototype._setupTransport = function () {
53
- if (!this._options.dsn) {
54
- // We return the noop transport here in case there is no Dsn.
55
- return _super.prototype._setupTransport.call(this);
56
- }
57
- var transportOptions = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._options.transportOptions), { dsn: this._options.dsn, tunnel: this._options.tunnel, sendClientReports: this._options.sendClientReports, _metadata: this._options._metadata });
58
- var api = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_3__/* .initAPIDetails */ .hd)(transportOptions.dsn, transportOptions._metadata, transportOptions.tunnel);
59
- var url = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_3__/* .getEnvelopeEndpointWithUrlEncodedAuth */ .Ut)(api.dsn, api.tunnel);
60
- if (this._options.transport) {
61
- return new this._options.transport(transportOptions);
62
- }
63
- if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .supportsFetch */ .Ak)()) {
64
- var requestOptions = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, transportOptions.fetchParameters);
65
- this._newTransport = (0,_transports__WEBPACK_IMPORTED_MODULE_5__/* .makeNewFetchTransport */ .k)({ requestOptions: requestOptions, url: url });
66
- return new _transports__WEBPACK_IMPORTED_MODULE_6__/* .FetchTransport */ .V(transportOptions);
67
- }
68
- this._newTransport = (0,_transports__WEBPACK_IMPORTED_MODULE_7__/* .makeNewXHRTransport */ .H)({
69
- url: url,
70
- headers: transportOptions.headers,
71
- });
72
- return new _transports__WEBPACK_IMPORTED_MODULE_8__/* .XHRTransport */ .w(transportOptions);
73
- };
74
- return BrowserBackend;
75
- }(_sentry_core__WEBPACK_IMPORTED_MODULE_9__/* .BaseBackend */ .N));
76
-
77
- //# sourceMappingURL=backend.js.map
78
-
79
- /***/ }),
80
-
81
- /***/ 2314:
82
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
83
 
84
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
85
- /* harmony export */ "R": function() { return /* binding */ BrowserClient; }
86
- /* harmony export */ });
87
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(334);
88
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1476);
89
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(9849);
90
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5907);
91
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8536);
92
- /* harmony import */ var _backend__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(487);
93
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7904);
94
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2634);
95
- /* harmony import */ var _integrations__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8356);
96
 
 
 
 
 
 
 
 
97
 
 
 
 
 
 
98
 
 
 
 
 
99
 
 
 
 
 
100
 
 
101
 
 
 
102
 
103
- /**
104
- * The Sentry Browser SDK Client.
105
- *
106
- * @see BrowserOptions for documentation on configuration options.
107
- * @see SentryClient for usage documentation.
108
- */
109
- var BrowserClient = /** @class */ (function (_super) {
110
- (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__extends */ .ZT)(BrowserClient, _super);
111
- /**
112
- * Creates a new Browser SDK instance.
113
- *
114
- * @param options Configuration options for this SDK.
115
- */
116
- function BrowserClient(options) {
117
- if (options === void 0) { options = {}; }
118
- var _this = this;
119
- options._metadata = options._metadata || {};
120
- options._metadata.sdk = options._metadata.sdk || {
121
- name: 'sentry.javascript.browser',
122
- packages: [
123
- {
124
- name: 'npm:@sentry/browser',
125
- version: _sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .SDK_VERSION */ .J,
126
- },
127
- ],
128
- version: _sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .SDK_VERSION */ .J,
129
- };
130
- _this = _super.call(this, _backend__WEBPACK_IMPORTED_MODULE_2__/* .BrowserBackend */ .u, options) || this;
131
- return _this;
132
  }
133
- /**
134
- * Show a report dialog to the user to send feedback to a specific event.
135
- *
136
- * @param options Set individual options for the dialog
137
- */
138
- BrowserClient.prototype.showReportDialog = function (options) {
139
- if (options === void 0) { options = {}; }
140
- // doesn't work without a document (React Native)
141
- var document = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .getGlobalObject */ .R)().document;
142
- if (!document) {
143
- return;
144
- }
145
- if (!this._isEnabled()) {
146
- _flags__WEBPACK_IMPORTED_MODULE_4__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .logger.error */ .kg.error('Trying to call showReportDialog with Sentry Client disabled');
147
- return;
148
- }
149
- (0,_helpers__WEBPACK_IMPORTED_MODULE_6__/* .injectReportDialog */ .BS)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, options), { dsn: options.dsn || this.getDsn() }));
150
- };
151
- /**
152
- * @inheritDoc
153
- */
154
- BrowserClient.prototype._prepareEvent = function (event, scope, hint) {
155
- event.platform = event.platform || 'javascript';
156
- return _super.prototype._prepareEvent.call(this, event, scope, hint);
157
- };
158
- /**
159
- * @inheritDoc
160
- */
161
- BrowserClient.prototype._sendEvent = function (event) {
162
- var integration = this.getIntegration(_integrations__WEBPACK_IMPORTED_MODULE_7__/* .Breadcrumbs */ .O);
163
- if (integration) {
164
- integration.addSentryBreadcrumb(event);
165
- }
166
- _super.prototype._sendEvent.call(this, event);
167
- };
168
- return BrowserClient;
169
- }(_sentry_core__WEBPACK_IMPORTED_MODULE_8__/* .BaseClient */ .W));
170
 
171
  //# sourceMappingURL=client.js.map
172
 
 
173
  /***/ }),
174
 
175
  /***/ 1988:
176
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
177
 
178
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
179
- /* harmony export */ "GJ": function() { return /* binding */ exceptionFromError; },
180
  /* harmony export */ "dr": function() { return /* binding */ eventFromException; },
181
  /* harmony export */ "aB": function() { return /* binding */ eventFromMessage; },
182
- /* harmony export */ "ME": function() { return /* binding */ eventFromUnknownInput; }
 
183
  /* harmony export */ });
184
- /* unused harmony exports eventFromPlainObject, eventFromError, parseStackFrames, eventFromString */
185
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(334);
186
- /* harmony import */ var _sentry_types__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2226);
187
  /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1757);
188
  /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1995);
189
  /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8035);
190
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9038);
191
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3699);
192
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7946);
193
- /* harmony import */ var _stack_parsers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2224);
194
-
195
-
196
 
197
 
198
  /**
199
- * This function creates an exception from an TraceKitStackTrace
200
- * @param stacktrace TraceKitStackTrace that will be converted to an exception
201
- * @hidden
202
  */
203
- function exceptionFromError(ex) {
204
- // Get the frames first since Opera can lose the stack if we touch anything else first
205
- var frames = parseStackFrames(ex);
206
- var exception = {
207
- type: ex && ex.name,
208
- value: extractMessage(ex),
209
- };
210
- if (frames.length) {
211
- exception.stacktrace = { frames: frames };
212
- }
213
- if (exception.type === undefined && exception.value === '') {
214
- exception.value = 'Unrecoverable error caught';
215
- }
216
- return exception;
 
 
 
 
217
  }
 
218
  /**
219
  * @hidden
220
  */
221
- function eventFromPlainObject(exception, syntheticException, isUnhandledRejection) {
222
- var event = {
223
- exception: {
224
- values: [
225
- {
226
- type: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isEvent */ .cO)(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',
227
- value: "Non-Error " + (isUnhandledRejection ? 'promise rejection' : 'exception') + " captured with keys: " + (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .extractExceptionKeysForMessage */ .zf)(exception),
228
- },
229
- ],
230
- },
231
- extra: {
232
- __serialized__: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .normalizeToSize */ .Qy)(exception),
 
 
233
  },
234
- };
235
- if (syntheticException) {
236
- var frames_1 = parseStackFrames(syntheticException);
237
- if (frames_1.length) {
238
- event.stacktrace = { frames: frames_1 };
239
- }
 
 
 
 
 
 
240
  }
241
- return event;
 
 
242
  }
 
243
  /**
244
  * @hidden
245
  */
246
- function eventFromError(ex) {
247
- return {
248
- exception: {
249
- values: [exceptionFromError(ex)],
250
- },
251
- };
252
  }
 
253
  /** Parses stack frames from an error */
254
- function parseStackFrames(ex) {
255
- // Access and store the stacktrace property before doing ANYTHING
256
- // else to it because Opera is not very good at providing it
257
- // reliably in other circumstances.
258
- var stacktrace = ex.stacktrace || ex.stack || '';
259
- var popSize = getPopSize(ex);
260
- try {
261
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .createStackParser */ .pE)(_stack_parsers__WEBPACK_IMPORTED_MODULE_4__/* .opera10StackParser */ .CS, _stack_parsers__WEBPACK_IMPORTED_MODULE_4__/* .opera11StackParser */ .ay, _stack_parsers__WEBPACK_IMPORTED_MODULE_4__/* .chromeStackParser */ .s$, _stack_parsers__WEBPACK_IMPORTED_MODULE_4__/* .winjsStackParser */ .aL, _stack_parsers__WEBPACK_IMPORTED_MODULE_4__/* .geckoStackParser */ .Pi)(stacktrace, popSize);
262
- }
263
- catch (e) {
264
- // no-empty
265
- }
266
- return [];
 
 
 
 
 
267
  }
 
268
  // Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108
269
  var reactMinifiedRegexp = /Minified React error #\d+;/i;
 
270
  function getPopSize(ex) {
271
- if (ex) {
272
- if (typeof ex.framesToPop === 'number') {
273
- return ex.framesToPop;
274
- }
275
- if (reactMinifiedRegexp.test(ex.message)) {
276
- return 1;
277
- }
278
  }
279
- return 0;
 
 
280
  }
 
281
  /**
282
  * There are cases where stacktrace.message is an Event object
283
  * https://github.com/getsentry/sentry-javascript/issues/1949
284
  * In this specific case we try to extract stacktrace.message.error.message
285
  */
286
  function extractMessage(ex) {
287
- var message = ex && ex.message;
288
- if (!message) {
289
- return 'No error message';
290
- }
291
- if (message.error && typeof message.error.message === 'string') {
292
- return message.error.message;
293
- }
294
- return message;
295
  }
 
296
  /**
297
  * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
298
  * @hidden
299
  */
300
- function eventFromException(exception, hint, attachStacktrace) {
301
- var syntheticException = (hint && hint.syntheticException) || undefined;
302
- var event = eventFromUnknownInput(exception, syntheticException, attachStacktrace);
303
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .addExceptionMechanism */ .EG)(event); // defaults to { type: 'generic', handled: true }
304
- event.level = _sentry_types__WEBPACK_IMPORTED_MODULE_6__/* .Severity.Error */ .z.Error;
305
- if (hint && hint.event_id) {
306
- event.event_id = hint.event_id;
307
- }
308
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_7__/* .resolvedSyncPromise */ .WD)(event);
 
 
 
 
 
309
  }
 
310
  /**
311
  * Builds and Event from a Message
312
  * @hidden
313
  */
314
- function eventFromMessage(message, level, hint, attachStacktrace) {
315
- if (level === void 0) { level = _sentry_types__WEBPACK_IMPORTED_MODULE_6__/* .Severity.Info */ .z.Info; }
316
- var syntheticException = (hint && hint.syntheticException) || undefined;
317
- var event = eventFromString(message, syntheticException, attachStacktrace);
318
- event.level = level;
319
- if (hint && hint.event_id) {
320
- event.event_id = hint.event_id;
321
- }
322
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_7__/* .resolvedSyncPromise */ .WD)(event);
 
 
 
 
 
323
  }
 
324
  /**
325
  * @hidden
326
  */
327
- function eventFromUnknownInput(exception, syntheticException, attachStacktrace, isUnhandledRejection) {
328
- var event;
329
- if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isErrorEvent */ .VW)(exception) && exception.error) {
330
- // If it is an ErrorEvent with `error` property, extract it to get actual Error
331
- var errorEvent = exception;
332
- return eventFromError(errorEvent.error);
333
- }
334
- // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name
335
- // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be
336
- // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.
337
- //
338
- // https://developer.mozilla.org/en-US/docs/Web/API/DOMError
339
- // https://developer.mozilla.org/en-US/docs/Web/API/DOMException
340
- // https://webidl.spec.whatwg.org/#es-DOMException-specialness
341
- if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isDOMError */ .TX)(exception) || (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isDOMException */ .fm)(exception)) {
342
- var domException = exception;
343
- if ('stack' in exception) {
344
- event = eventFromError(exception);
345
- }
346
- else {
347
- var name_1 = domException.name || ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isDOMError */ .TX)(domException) ? 'DOMError' : 'DOMException');
348
- var message = domException.message ? name_1 + ": " + domException.message : name_1;
349
- event = eventFromString(message, syntheticException, attachStacktrace);
350
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .addExceptionTypeValue */ .Db)(event, message);
351
- }
352
- if ('code' in domException) {
353
- event.tags = (0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__assign */ .pi)({}, event.tags), { 'DOMException.code': "" + domException.code });
354
- }
355
- return event;
356
- }
357
- if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isError */ .VZ)(exception)) {
358
- // we have a real Error object, do nothing
359
- return eventFromError(exception);
360
- }
361
- if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isPlainObject */ .PO)(exception) || (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isEvent */ .cO)(exception)) {
362
- // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize
363
- // it manually. This will allow us to group events based on top-level keys which is much better than creating a new
364
- // group on any key/value change.
365
- var objectException = exception;
366
- event = eventFromPlainObject(objectException, syntheticException, isUnhandledRejection);
367
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .addExceptionMechanism */ .EG)(event, {
368
- synthetic: true,
369
- });
370
- return event;
371
  }
372
- // If none of previous checks were valid, then it means that it's not:
373
- // - an instance of DOMError
374
- // - an instance of DOMException
375
- // - an instance of Event
376
- // - an instance of Error
377
- // - a valid ErrorEvent (one with an error property)
378
- // - a plain Object
379
- //
380
- // So bail out and capture it as a simple message:
381
- event = eventFromString(exception, syntheticException, attachStacktrace);
382
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .addExceptionTypeValue */ .Db)(event, "" + exception, undefined);
383
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .addExceptionMechanism */ .EG)(event, {
384
- synthetic: true,
 
 
385
  });
386
  return event;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
387
  }
 
388
  /**
389
  * @hidden
390
  */
391
- function eventFromString(input, syntheticException, attachStacktrace) {
392
- var event = {
393
- message: input,
394
- };
395
- if (attachStacktrace && syntheticException) {
396
- var frames_2 = parseStackFrames(syntheticException);
397
- if (frames_2.length) {
398
- event.stacktrace = { frames: frames_2 };
399
- }
 
 
 
 
 
 
 
400
  }
401
- return event;
 
 
402
  }
403
- //# sourceMappingURL=eventbuilder.js.map
404
 
405
- /***/ }),
406
 
407
- /***/ 7904:
408
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
409
 
410
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
411
- /* harmony export */ "h": function() { return /* binding */ IS_DEBUG_BUILD; }
412
- /* harmony export */ });
413
- /*
414
- * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking
415
- * for users.
416
- *
417
- * Debug flags need to be declared in each package individually and must not be imported across package boundaries,
418
- * because some build tools have trouble tree-shaking imported guards.
419
- *
420
- * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.
421
- *
422
- * Debug flag files will contain "magic strings" like `__SENTRY_DEBUG__` that may get replaced with actual values during
423
- * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not
424
- * replaced.
425
- */
426
- /** Flag that is true for debug builds, false otherwise. */
427
- var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;
428
- //# sourceMappingURL=flags.js.map
429
 
430
  /***/ }),
431
 
@@ -434,415 +454,433 @@ var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_D
434
 
435
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
436
  /* harmony export */ "Wz": function() { return /* binding */ shouldIgnoreOnError; },
437
- /* harmony export */ "re": function() { return /* binding */ wrap; },
438
- /* harmony export */ "BS": function() { return /* binding */ injectReportDialog; }
439
  /* harmony export */ });
440
  /* unused harmony export ignoreNextOnError */
441
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(334);
442
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4678);
443
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(4911);
444
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
445
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1995);
446
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3699);
447
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(8536);
448
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(7904);
449
 
450
 
451
 
 
452
 
453
- var global = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
454
- var ignoreOnError = 0;
455
  /**
456
  * @hidden
457
  */
458
  function shouldIgnoreOnError() {
459
- return ignoreOnError > 0;
460
  }
 
461
  /**
462
  * @hidden
463
  */
464
  function ignoreNextOnError() {
465
- // onerror should trigger before setTimeout
466
- ignoreOnError += 1;
467
- setTimeout(function () {
468
- ignoreOnError -= 1;
469
- });
470
  }
 
471
  /**
472
  * Instruments the given function and sends an event to Sentry every time the
473
  * function throws an exception.
474
  *
475
- * @param fn A function to wrap.
 
476
  * @returns The wrapped function.
477
  * @hidden
478
  */
479
- function wrap(fn, options, before) {
480
- // for future readers what this does is wrap a function and then create
481
- // a bi-directional wrapping between them.
482
- //
483
- // example: wrapped = wrap(original);
484
- // original.__sentry_wrapped__ -> wrapped
485
- // wrapped.__sentry_original__ -> original
486
- if (options === void 0) { options = {}; }
487
- if (typeof fn !== 'function') {
488
- return fn;
489
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
490
  try {
491
- // if we're dealing with a function that was previously wrapped, return
492
- // the original wrapper.
493
- var wrapper = fn.__sentry_wrapped__;
494
- if (wrapper) {
495
- return wrapper;
496
- }
497
- // We don't wanna wrap it twice
498
- if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .getOriginalFunction */ .HK)(fn)) {
499
- return fn;
500
- }
501
- }
502
- catch (e) {
503
- // Just accessing custom props in some Selenium environments
504
- // can cause a "Permission denied" exception (see raven-js#495).
505
- // Bail on wrapping and return the function as-is (defers to window.onerror).
506
- return fn;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
507
  }
508
- /* eslint-disable prefer-rest-params */
509
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
510
- var sentryWrapped = function () {
511
- var args = Array.prototype.slice.call(arguments);
512
- try {
513
- if (before && typeof before === 'function') {
514
- before.apply(this, arguments);
515
- }
516
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access
517
- var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });
518
- // Attempt to invoke user-land function
519
- // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
520
- // means the sentry.javascript SDK caught an error invoking your application code. This
521
- // is expected behavior and NOT indicative of a bug with sentry.javascript.
522
- return fn.apply(this, wrappedArguments);
523
- }
524
- catch (ex) {
525
- ignoreNextOnError();
526
- (0,_sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .withScope */ .$e)(function (scope) {
527
- scope.addEventProcessor(function (event) {
528
- if (options.mechanism) {
529
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .addExceptionTypeValue */ .Db)(event, undefined, undefined);
530
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .addExceptionMechanism */ .EG)(event, options.mechanism);
531
- }
532
- event.extra = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__assign */ .pi)({}, event.extra), { arguments: args });
533
- return event;
534
- });
535
- (0,_sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .captureException */ .Tb)(ex);
536
- });
537
- throw ex;
538
- }
539
- };
540
- /* eslint-enable prefer-rest-params */
541
- // Accessing some objects may throw
542
- // ref: https://github.com/getsentry/sentry-javascript/issues/1168
543
- try {
544
- for (var property in fn) {
545
- if (Object.prototype.hasOwnProperty.call(fn, property)) {
546
- sentryWrapped[property] = fn[property];
547
- }
548
- }
549
  }
550
- catch (_oO) { } // eslint-disable-line no-empty
551
- // Signal that this function has been wrapped/filled already
552
- // for both debugging and to prevent it to being wrapped/filled twice
553
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .markFunctionWrapped */ .$Q)(sentryWrapped, fn);
554
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .addNonEnumerableProperty */ .xp)(fn, '__sentry_wrapped__', sentryWrapped);
555
- // Restore original function name (not all browsers allow that)
556
- try {
557
- var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name');
558
- if (descriptor.configurable) {
559
- Object.defineProperty(sentryWrapped, 'name', {
560
- get: function () {
561
- return fn.name;
562
- },
563
- });
564
- }
565
- // eslint-disable-next-line no-empty
566
  }
567
- catch (_oO) { }
568
- return sentryWrapped;
 
569
  }
 
570
  /**
571
- * Injects the Report Dialog script
572
- * @hidden
573
  */
574
- function injectReportDialog(options) {
575
- if (options === void 0) { options = {}; }
576
- if (!global.document) {
577
- return;
578
- }
579
- if (!options.eventId) {
580
- _flags__WEBPACK_IMPORTED_MODULE_5__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .logger.error */ .kg.error('Missing eventId option in showReportDialog call');
581
- return;
582
- }
583
- if (!options.dsn) {
584
- _flags__WEBPACK_IMPORTED_MODULE_5__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .logger.error */ .kg.error('Missing dsn option in showReportDialog call');
585
- return;
586
- }
587
- var script = global.document.createElement('script');
588
- script.async = true;
589
- script.src = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_7__/* .getReportDialogEndpoint */ .hR)(options.dsn, options);
590
- if (options.onLoad) {
591
- // eslint-disable-next-line @typescript-eslint/unbound-method
592
- script.onload = options.onLoad;
593
- }
594
- var injectionPoint = global.document.head || global.document.body;
595
- if (injectionPoint) {
596
- injectionPoint.appendChild(script);
597
- }
598
- }
599
  //# sourceMappingURL=helpers.js.map
600
 
 
601
  /***/ }),
602
 
603
  /***/ 8356:
604
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
605
 
606
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
 
607
  /* harmony export */ "O": function() { return /* binding */ Breadcrumbs; }
608
  /* harmony export */ });
609
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(334);
610
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8585);
611
- /* harmony import */ var _sentry_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(2226);
612
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3699);
613
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4005);
614
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4194);
615
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8653);
616
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9660);
617
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(5907);
618
 
619
- /* eslint-disable @typescript-eslint/no-unsafe-member-access */
620
- /* eslint-disable max-lines */
621
 
 
622
 
 
623
 
624
  /**
625
  * Default Breadcrumbs instrumentations
626
  * TODO: Deprecated - with v6, this will be renamed to `Instrument`
627
  */
628
- var Breadcrumbs = /** @class */ (function () {
629
- /**
630
- * @inheritDoc
631
- */
632
- function Breadcrumbs(options) {
633
- /**
634
- * @inheritDoc
635
- */
636
- this.name = Breadcrumbs.id;
637
- this._options = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({ console: true, dom: true, fetch: true, history: true, sentry: true, xhr: true }, options);
638
- }
639
- /**
640
- * Create a breadcrumb of `sentry` from the events themselves
641
- */
642
- Breadcrumbs.prototype.addSentryBreadcrumb = function (event) {
643
- if (!this._options.sentry) {
644
- return;
645
- }
646
- (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .getCurrentHub */ .Gd)().addBreadcrumb({
647
- category: "sentry." + (event.type === 'transaction' ? 'transaction' : 'event'),
648
- event_id: event.event_id,
649
- level: event.level,
650
- message: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .getEventDescription */ .jH)(event),
651
- }, {
652
- event: event,
653
- });
654
- };
655
- /**
656
- * Instrument browser built-ins w/ breadcrumb capturing
657
- * - Console API
658
- * - DOM API (click/typing)
659
- * - XMLHttpRequest API
660
- * - Fetch API
661
- * - History API
662
- */
663
- Breadcrumbs.prototype.setupOnce = function () {
664
- if (this._options.console) {
665
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .addInstrumentationHandler */ .o)('console', _consoleBreadcrumb);
666
- }
667
- if (this._options.dom) {
668
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .addInstrumentationHandler */ .o)('dom', _domBreadcrumb(this._options.dom));
669
- }
670
- if (this._options.xhr) {
671
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .addInstrumentationHandler */ .o)('xhr', _xhrBreadcrumb);
672
- }
673
- if (this._options.fetch) {
674
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .addInstrumentationHandler */ .o)('fetch', _fetchBreadcrumb);
675
- }
676
- if (this._options.history) {
677
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .addInstrumentationHandler */ .o)('history', _historyBreadcrumb);
678
- }
679
- };
680
- /**
681
- * @inheritDoc
682
- */
683
- Breadcrumbs.id = 'Breadcrumbs';
684
- return Breadcrumbs;
685
- }());
686
 
687
  /**
688
  * A HOC that creaes a function that creates breadcrumbs from DOM API calls.
689
  * This is a HOC so that we get access to dom options in the closure.
690
  */
691
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
692
  function _domBreadcrumb(dom) {
693
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
694
  function _innerDomBreadcrumb(handlerData) {
695
- var target;
696
- var keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;
697
- if (typeof keyAttrs === 'string') {
698
- keyAttrs = [keyAttrs];
699
- }
700
- // Accessing event.target can throw (see getsentry/raven-js#838, #768)
701
- try {
702
- target = handlerData.event.target
703
- ? (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .htmlTreeAsString */ .R)(handlerData.event.target, keyAttrs)
704
- : (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .htmlTreeAsString */ .R)(handlerData.event, keyAttrs);
705
- }
706
- catch (e) {
707
- target = '<unknown>';
708
- }
709
- if (target.length === 0) {
710
- return;
711
- }
712
- (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .getCurrentHub */ .Gd)().addBreadcrumb({
713
- category: "ui." + handlerData.name,
714
- message: target,
715
- }, {
716
- event: handlerData.event,
717
- name: handlerData.name,
718
- global: handlerData.global,
719
- });
720
  }
721
- return _innerDomBreadcrumb;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
722
  }
 
723
  /**
724
  * Creates breadcrumbs from console API calls
725
  */
726
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
727
  function _consoleBreadcrumb(handlerData) {
728
- var breadcrumb = {
729
- category: 'console',
730
- data: {
731
- arguments: handlerData.args,
732
- logger: 'console',
733
- },
734
- level: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .severityFromString */ .E)(handlerData.level),
735
- message: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .safeJoin */ .nK)(handlerData.args, ' '),
736
- };
737
- if (handlerData.level === 'assert') {
738
- if (handlerData.args[0] === false) {
739
- breadcrumb.message = "Assertion failed: " + ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .safeJoin */ .nK)(handlerData.args.slice(1), ' ') || 'console.assert');
740
- breadcrumb.data.arguments = handlerData.args.slice(1);
741
- }
742
- else {
743
- // Don't capture a breadcrumb for passed assertions
744
- return;
745
- }
746
  }
747
- (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .getCurrentHub */ .Gd)().addBreadcrumb(breadcrumb, {
748
- input: handlerData.args,
749
- level: handlerData.level,
750
- });
 
 
751
  }
 
752
  /**
753
  * Creates breadcrumbs from XHR API calls
754
  */
755
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
756
  function _xhrBreadcrumb(handlerData) {
757
- if (handlerData.endTimestamp) {
758
- // We only capture complete, non-sentry requests
759
- if (handlerData.xhr.__sentry_own_request__) {
760
- return;
761
- }
762
- var _a = handlerData.xhr.__sentry_xhr__ || {}, method = _a.method, url = _a.url, status_code = _a.status_code, body = _a.body;
763
- (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .getCurrentHub */ .Gd)().addBreadcrumb({
764
- category: 'xhr',
765
- data: {
766
- method: method,
767
- url: url,
768
- status_code: status_code,
769
- },
770
- type: 'http',
771
- }, {
772
- xhr: handlerData.xhr,
773
- input: body,
774
- });
775
- return;
776
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
777
  }
 
778
  /**
779
  * Creates breadcrumbs from fetch API calls
780
  */
781
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
782
  function _fetchBreadcrumb(handlerData) {
783
- // We only capture complete fetch requests
784
- if (!handlerData.endTimestamp) {
785
- return;
786
- }
787
- if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {
788
- // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)
789
- return;
790
- }
791
- if (handlerData.error) {
792
- (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .getCurrentHub */ .Gd)().addBreadcrumb({
793
- category: 'fetch',
794
- data: handlerData.fetchData,
795
- level: _sentry_types__WEBPACK_IMPORTED_MODULE_7__/* .Severity.Error */ .z.Error,
796
- type: 'http',
797
- }, {
798
- data: handlerData.error,
799
- input: handlerData.args,
800
- });
801
- }
802
- else {
803
- (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .getCurrentHub */ .Gd)().addBreadcrumb({
804
- category: 'fetch',
805
- data: (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, handlerData.fetchData), { status_code: handlerData.response.status }),
806
- type: 'http',
807
- }, {
808
- input: handlerData.args,
809
- response: handlerData.response,
810
- });
811
- }
 
 
 
 
 
 
 
 
 
 
812
  }
 
813
  /**
814
  * Creates breadcrumbs from history API calls
815
  */
816
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
817
  function _historyBreadcrumb(handlerData) {
818
- var global = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_8__/* .getGlobalObject */ .R)();
819
- var from = handlerData.from;
820
- var to = handlerData.to;
821
- var parsedLoc = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .parseUrl */ .en)(global.location.href);
822
- var parsedFrom = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .parseUrl */ .en)(from);
823
- var parsedTo = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .parseUrl */ .en)(to);
824
- // Initial pushState doesn't provide `from` information
825
- if (!parsedFrom.path) {
826
- parsedFrom = parsedLoc;
827
- }
828
- // Use only the path component of the URL if the URL matches the current
829
- // document (almost all the time when using pushState)
830
- if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {
831
- to = parsedTo.relative;
832
- }
833
- if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {
834
- from = parsedFrom.relative;
835
- }
836
- (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .getCurrentHub */ .Gd)().addBreadcrumb({
837
- category: 'navigation',
838
- data: {
839
- from: from,
840
- to: to,
841
- },
842
- });
 
 
 
843
  }
 
 
844
  //# sourceMappingURL=breadcrumbs.js.map
845
 
 
846
  /***/ }),
847
 
848
  /***/ 184:
@@ -851,177 +889,215 @@ function _historyBreadcrumb(handlerData) {
851
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
852
  /* harmony export */ "I": function() { return /* binding */ Dedupe; }
853
  /* harmony export */ });
854
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8536);
855
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7904);
856
 
857
 
858
  /** Deduplication filter */
859
- var Dedupe = /** @class */ (function () {
860
- function Dedupe() {
861
- /**
862
- * @inheritDoc
863
- */
864
- this.name = Dedupe.id;
865
- }
866
- /**
867
- * @inheritDoc
868
- */
869
- Dedupe.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) {
870
- addGlobalEventProcessor(function (currentEvent) {
871
- var self = getCurrentHub().getIntegration(Dedupe);
872
- if (self) {
873
- // Juuust in case something goes wrong
874
- try {
875
- if (_shouldDropEvent(currentEvent, self._previousEvent)) {
876
- _flags__WEBPACK_IMPORTED_MODULE_0__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .logger.warn */ .kg.warn('Event dropped due to being a duplicate of previously captured event.');
877
- return null;
878
- }
879
- }
880
- catch (_oO) {
881
- return (self._previousEvent = currentEvent);
882
- }
883
- return (self._previousEvent = currentEvent);
884
- }
885
- return currentEvent;
886
- });
 
 
 
 
 
 
 
 
887
  };
888
- /**
889
- * @inheritDoc
890
- */
891
- Dedupe.id = 'Dedupe';
892
- return Dedupe;
893
- }());
894
 
895
  /** JSDoc */
896
  function _shouldDropEvent(currentEvent, previousEvent) {
897
- if (!previousEvent) {
898
- return false;
899
- }
900
- if (_isSameMessageEvent(currentEvent, previousEvent)) {
901
- return true;
902
- }
903
- if (_isSameExceptionEvent(currentEvent, previousEvent)) {
904
- return true;
905
- }
906
  return false;
 
 
 
 
 
 
 
 
 
 
 
907
  }
 
908
  /** JSDoc */
909
  function _isSameMessageEvent(currentEvent, previousEvent) {
910
- var currentMessage = currentEvent.message;
911
- var previousMessage = previousEvent.message;
912
- // If neither event has a message property, they were both exceptions, so bail out
913
- if (!currentMessage && !previousMessage) {
914
- return false;
915
- }
916
- // If only one event has a stacktrace, but not the other one, they are not the same
917
- if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {
918
- return false;
919
- }
920
- if (currentMessage !== previousMessage) {
921
- return false;
922
- }
923
- if (!_isSameFingerprint(currentEvent, previousEvent)) {
924
- return false;
925
- }
926
- if (!_isSameStacktrace(currentEvent, previousEvent)) {
927
- return false;
928
- }
929
- return true;
 
 
 
 
 
 
930
  }
 
931
  /** JSDoc */
932
  function _isSameExceptionEvent(currentEvent, previousEvent) {
933
- var previousException = _getExceptionFromEvent(previousEvent);
934
- var currentException = _getExceptionFromEvent(currentEvent);
935
- if (!previousException || !currentException) {
936
- return false;
937
- }
938
- if (previousException.type !== currentException.type || previousException.value !== currentException.value) {
939
- return false;
940
- }
941
- if (!_isSameFingerprint(currentEvent, previousEvent)) {
942
- return false;
943
- }
944
- if (!_isSameStacktrace(currentEvent, previousEvent)) {
945
- return false;
946
- }
947
- return true;
 
 
 
 
 
948
  }
 
949
  /** JSDoc */
950
  function _isSameStacktrace(currentEvent, previousEvent) {
951
- var currentFrames = _getFramesFromEvent(currentEvent);
952
- var previousFrames = _getFramesFromEvent(previousEvent);
953
- // If neither event has a stacktrace, they are assumed to be the same
954
- if (!currentFrames && !previousFrames) {
955
- return true;
956
- }
957
- // If only one event has a stacktrace, but not the other one, they are not the same
958
- if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {
959
- return false;
960
- }
961
- currentFrames = currentFrames;
962
- previousFrames = previousFrames;
963
- // If number of frames differ, they are not the same
964
- if (previousFrames.length !== currentFrames.length) {
965
- return false;
966
- }
967
- // Otherwise, compare the two
968
- for (var i = 0; i < previousFrames.length; i++) {
969
- var frameA = previousFrames[i];
970
- var frameB = currentFrames[i];
971
- if (frameA.filename !== frameB.filename ||
972
- frameA.lineno !== frameB.lineno ||
973
- frameA.colno !== frameB.colno ||
974
- frameA.function !== frameB.function) {
975
- return false;
976
- }
977
- }
978
  return true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
979
  }
 
980
  /** JSDoc */
981
  function _isSameFingerprint(currentEvent, previousEvent) {
982
- var currentFingerprint = currentEvent.fingerprint;
983
- var previousFingerprint = previousEvent.fingerprint;
984
- // If neither event has a fingerprint, they are assumed to be the same
985
- if (!currentFingerprint && !previousFingerprint) {
986
- return true;
987
- }
988
- // If only one event has a fingerprint, but not the other one, they are not the same
989
- if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {
990
- return false;
991
- }
992
- currentFingerprint = currentFingerprint;
993
- previousFingerprint = previousFingerprint;
994
- // Otherwise, compare the two
995
- try {
996
- return !!(currentFingerprint.join('') === previousFingerprint.join(''));
997
- }
998
- catch (_oO) {
999
- return false;
1000
- }
 
 
 
1001
  }
 
1002
  /** JSDoc */
1003
  function _getExceptionFromEvent(event) {
1004
- return event.exception && event.exception.values && event.exception.values[0];
1005
  }
 
1006
  /** JSDoc */
1007
  function _getFramesFromEvent(event) {
1008
- var exception = event.exception;
1009
- if (exception) {
1010
- try {
1011
- // @ts-ignore Object could be undefined
1012
- return exception.values[0].stacktrace.frames;
1013
- }
1014
- catch (_oO) {
1015
- return undefined;
1016
- }
1017
- }
1018
- else if (event.stacktrace) {
1019
- return event.stacktrace.frames;
1020
  }
1021
- return undefined;
 
1022
  }
 
 
1023
  //# sourceMappingURL=dedupe.js.map
1024
 
 
1025
  /***/ }),
1026
 
1027
  /***/ 1228:
@@ -1030,128 +1106,148 @@ function _getFramesFromEvent(event) {
1030
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1031
  /* harmony export */ "d": function() { return /* binding */ GlobalHandlers; }
1032
  /* harmony export */ });
1033
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(334);
1034
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(8585);
1035
- /* harmony import */ var _sentry_types__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2226);
1036
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4005);
1037
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1757);
1038
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(4194);
1039
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(8536);
1040
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(3699);
1041
- /* harmony import */ var _eventbuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1988);
1042
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7904);
1043
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2634);
1044
-
1045
- /* eslint-disable @typescript-eslint/no-unsafe-member-access */
1046
-
1047
 
1048
 
1049
 
1050
 
1051
 
1052
  /** Global handlers */
1053
- var GlobalHandlers = /** @class */ (function () {
1054
- /** JSDoc */
1055
- function GlobalHandlers(options) {
1056
- /**
1057
- * @inheritDoc
1058
- */
1059
- this.name = GlobalHandlers.id;
1060
- /**
1061
- * Stores references functions to installing handlers. Will set to undefined
1062
- * after they have been run so that they are not used twice.
1063
- */
1064
- this._installFunc = {
1065
- onerror: _installGlobalOnErrorHandler,
1066
- onunhandledrejection: _installGlobalOnUnhandledRejectionHandler,
1067
- };
1068
- this._options = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({ onerror: true, onunhandledrejection: true }, options);
1069
- }
1070
- /**
1071
- * @inheritDoc
1072
- */
1073
- GlobalHandlers.prototype.setupOnce = function () {
1074
- Error.stackTraceLimit = 50;
1075
- var options = this._options;
1076
- // We can disable guard-for-in as we construct the options object above + do checks against
1077
- // `this._installFunc` for the property.
1078
- // eslint-disable-next-line guard-for-in
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1079
  for (var key in options) {
1080
- var installFunc = this._installFunc[key];
1081
- if (installFunc && options[key]) {
1082
- globalHandlerLog(key);
1083
- installFunc();
1084
- this._installFunc[key] = undefined;
1085
- }
1086
- }
1087
- };
1088
- /**
1089
- * @inheritDoc
1090
- */
1091
- GlobalHandlers.id = 'GlobalHandlers';
1092
- return GlobalHandlers;
1093
- }());
1094
 
1095
  /** JSDoc */
1096
  function _installGlobalOnErrorHandler() {
1097
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .addInstrumentationHandler */ .o)('error',
1098
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1099
- function (data) {
1100
- var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__read */ .CR)(getHubAndAttachStacktrace(), 2), hub = _a[0], attachStacktrace = _a[1];
1101
- if (!hub.getIntegration(GlobalHandlers)) {
1102
- return;
1103
- }
1104
- var msg = data.msg, url = data.url, line = data.line, column = data.column, error = data.error;
1105
- if ((0,_helpers__WEBPACK_IMPORTED_MODULE_2__/* .shouldIgnoreOnError */ .Wz)() || (error && error.__sentry_own_request__)) {
1106
- return;
1107
- }
1108
- var event = error === undefined && (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .isString */ .HD)(msg)
1109
- ? _eventFromIncompleteOnError(msg, url, line, column)
1110
- : _enhanceEventWithInitialFrame((0,_eventbuilder__WEBPACK_IMPORTED_MODULE_4__/* .eventFromUnknownInput */ .ME)(error || msg, undefined, attachStacktrace, false), url, line, column);
1111
- event.level = _sentry_types__WEBPACK_IMPORTED_MODULE_5__/* .Severity.Error */ .z.Error;
1112
- addMechanismAndCapture(hub, error, event, 'onerror');
1113
- });
 
 
 
 
 
 
 
 
 
 
1114
  }
 
1115
  /** JSDoc */
1116
  function _installGlobalOnUnhandledRejectionHandler() {
1117
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .addInstrumentationHandler */ .o)('unhandledrejection',
1118
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1119
- function (e) {
1120
- var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__read */ .CR)(getHubAndAttachStacktrace(), 2), hub = _a[0], attachStacktrace = _a[1];
1121
- if (!hub.getIntegration(GlobalHandlers)) {
1122
- return;
1123
- }
1124
- var error = e;
1125
- // dig the object of the rejection out of known event types
1126
- try {
1127
- // PromiseRejectionEvents store the object of the rejection under 'reason'
1128
- // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent
1129
- if ('reason' in e) {
1130
- error = e.reason;
1131
- }
1132
- // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents
1133
- // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into
1134
- // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec
1135
- // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and
1136
- // https://github.com/getsentry/sentry-javascript/issues/2380
1137
- else if ('detail' in e && 'reason' in e.detail) {
1138
- error = e.detail.reason;
1139
- }
1140
- }
1141
- catch (_oO) {
1142
- // no-empty
1143
- }
1144
- if ((0,_helpers__WEBPACK_IMPORTED_MODULE_2__/* .shouldIgnoreOnError */ .Wz)() || (error && error.__sentry_own_request__)) {
1145
- return true;
1146
- }
1147
- var event = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .isPrimitive */ .pt)(error)
1148
- ? _eventFromRejectionWithPrimitive(error)
1149
- : (0,_eventbuilder__WEBPACK_IMPORTED_MODULE_4__/* .eventFromUnknownInput */ .ME)(error, undefined, attachStacktrace, true);
1150
- event.level = _sentry_types__WEBPACK_IMPORTED_MODULE_5__/* .Severity.Error */ .z.Error;
1151
- addMechanismAndCapture(hub, error, event, 'onunhandledrejection');
1152
  return;
1153
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1154
  }
 
1155
  /**
1156
  * Create an event from a promise rejection where the `reason` is a primitive.
1157
  *
@@ -1159,92 +1255,171 @@ function _installGlobalOnUnhandledRejectionHandler() {
1159
  * @returns An Event object with an appropriate `exception` value
1160
  */
1161
  function _eventFromRejectionWithPrimitive(reason) {
1162
- return {
1163
- exception: {
1164
- values: [
1165
- {
1166
- type: 'UnhandledRejection',
1167
- // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)
1168
- value: "Non-Error promise rejection captured with value: " + String(reason),
1169
- },
1170
- ],
1171
  },
1172
- };
 
 
1173
  }
 
1174
  /**
1175
  * This function creates a stack from an old, error-less onerror handler.
1176
  */
1177
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1178
  function _eventFromIncompleteOnError(msg, url, line, column) {
1179
- var ERROR_TYPES_RE = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
1180
- // If 'message' is ErrorEvent, get real message from inside
1181
- var message = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .isErrorEvent */ .VW)(msg) ? msg.message : msg;
1182
- var name = 'Error';
1183
- var groups = message.match(ERROR_TYPES_RE);
1184
- if (groups) {
1185
- name = groups[1];
1186
- message = groups[2];
1187
- }
1188
- var event = {
1189
- exception: {
1190
- values: [
1191
- {
1192
- type: name,
1193
- value: message,
1194
- },
1195
- ],
 
 
1196
  },
1197
- };
1198
- return _enhanceEventWithInitialFrame(event, url, line, column);
 
 
 
1199
  }
 
1200
  /** JSDoc */
1201
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1202
  function _enhanceEventWithInitialFrame(event, url, line, column) {
1203
- // event.exception
1204
- var e = (event.exception = event.exception || {});
1205
- // event.exception.values
1206
- var ev = (e.values = e.values || []);
1207
- // event.exception.values[0]
1208
- var ev0 = (ev[0] = ev[0] || {});
1209
- // event.exception.values[0].stacktrace
1210
- var ev0s = (ev0.stacktrace = ev0.stacktrace || {});
1211
- // event.exception.values[0].stacktrace.frames
1212
- var ev0sf = (ev0s.frames = ev0s.frames || []);
1213
- var colno = isNaN(parseInt(column, 10)) ? undefined : column;
1214
- var lineno = isNaN(parseInt(line, 10)) ? undefined : line;
1215
- var filename = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .isString */ .HD)(url) && url.length > 0 ? url : (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .getLocationHref */ .l)();
1216
- // event.exception.values[0].stacktrace.frames
1217
- if (ev0sf.length === 0) {
1218
- ev0sf.push({
1219
- colno: colno,
1220
- filename: filename,
1221
- function: '?',
1222
- in_app: true,
1223
- lineno: lineno,
1224
- });
1225
- }
1226
- return event;
 
 
 
1227
  }
 
1228
  function globalHandlerLog(type) {
1229
- _flags__WEBPACK_IMPORTED_MODULE_7__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_8__/* .logger.log */ .kg.log("Global Handler attached: " + type);
1230
  }
 
1231
  function addMechanismAndCapture(hub, error, event, type) {
1232
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_9__/* .addExceptionMechanism */ .EG)(event, {
1233
- handled: false,
1234
- type: type,
1235
- });
1236
- hub.captureEvent(event, {
1237
- originalException: error,
1238
- });
1239
- }
1240
- function getHubAndAttachStacktrace() {
1241
- var hub = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_10__/* .getCurrentHub */ .Gd)();
1242
- var client = hub.getClient();
1243
- var attachStacktrace = client && client.getOptions().attachStacktrace;
1244
- return [hub, attachStacktrace];
 
 
 
 
1245
  }
 
 
1246
  //# sourceMappingURL=globalhandlers.js.map
1247
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1248
  /***/ }),
1249
 
1250
  /***/ 3440:
@@ -1254,71 +1429,101 @@ function getHubAndAttachStacktrace() {
1254
  /* harmony export */ "iP": function() { return /* binding */ LinkedErrors; }
1255
  /* harmony export */ });
1256
  /* unused harmony exports _handler, _walkErrorTree */
1257
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(334);
1258
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1684);
1259
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8585);
1260
  /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1757);
1261
- /* harmony import */ var _eventbuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1988);
1262
 
1263
 
1264
 
1265
 
1266
  var DEFAULT_KEY = 'cause';
1267
  var DEFAULT_LIMIT = 5;
 
1268
  /** Adds SDK info to an event. */
1269
- var LinkedErrors = /** @class */ (function () {
1270
- /**
1271
- * @inheritDoc
1272
- */
1273
- function LinkedErrors(options) {
1274
- if (options === void 0) { options = {}; }
1275
- /**
1276
- * @inheritDoc
1277
- */
1278
- this.name = LinkedErrors.id;
1279
- this._key = options.key || DEFAULT_KEY;
1280
- this._limit = options.limit || DEFAULT_LIMIT;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1281
  }
1282
- /**
1283
- * @inheritDoc
1284
- */
1285
- LinkedErrors.prototype.setupOnce = function () {
1286
- (0,_sentry_core__WEBPACK_IMPORTED_MODULE_0__/* .addGlobalEventProcessor */ .c)(function (event, hint) {
1287
- var self = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .getCurrentHub */ .Gd)().getIntegration(LinkedErrors);
1288
- return self ? _handler(self._key, self._limit, event, hint) : event;
1289
- });
1290
- };
1291
- /**
1292
- * @inheritDoc
1293
- */
1294
- LinkedErrors.id = 'LinkedErrors';
1295
- return LinkedErrors;
1296
- }());
1297
 
1298
  /**
1299
  * @inheritDoc
1300
  */
1301
- function _handler(key, limit, event, hint) {
1302
- if (!event.exception || !event.exception.values || !hint || !(0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .isInstanceOf */ .V9)(hint.originalException, Error)) {
1303
- return event;
1304
- }
1305
- var linkedErrors = _walkErrorTree(limit, hint.originalException, key);
1306
- event.exception.values = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__spread */ .fl)(linkedErrors, event.exception.values);
 
 
1307
  return event;
 
 
 
 
1308
  }
 
1309
  /**
1310
  * JSDOC
1311
  */
1312
- function _walkErrorTree(limit, error, key, stack) {
1313
- if (stack === void 0) { stack = []; }
1314
- if (!(0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .isInstanceOf */ .V9)(error[key], Error) || stack.length + 1 >= limit) {
1315
- return stack;
1316
- }
1317
- var exception = (0,_eventbuilder__WEBPACK_IMPORTED_MODULE_4__/* .exceptionFromError */ .GJ)(error[key]);
1318
- return _walkErrorTree(limit, error[key], key, (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__spread */ .fl)([exception], stack));
 
 
 
 
 
1319
  }
 
 
1320
  //# sourceMappingURL=linkederrors.js.map
1321
 
 
1322
  /***/ }),
1323
 
1324
  /***/ 3399:
@@ -1327,328 +1532,321 @@ function _walkErrorTree(limit, error, key, stack) {
1327
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1328
  /* harmony export */ "p": function() { return /* binding */ TryCatch; }
1329
  /* harmony export */ });
1330
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(334);
1331
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5907);
1332
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1995);
1333
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9038);
1334
- /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2634);
1335
-
1336
 
1337
 
1338
  var DEFAULT_EVENT_TARGET = [
1339
- 'EventTarget',
1340
- 'Window',
1341
- 'Node',
1342
- 'ApplicationCache',
1343
- 'AudioTrackList',
1344
- 'ChannelMergerNode',
1345
- 'CryptoOperation',
1346
- 'EventSource',
1347
- 'FileReader',
1348
- 'HTMLUnknownElement',
1349
- 'IDBDatabase',
1350
- 'IDBRequest',
1351
- 'IDBTransaction',
1352
- 'KeyOperation',
1353
- 'MediaController',
1354
- 'MessagePort',
1355
- 'ModalWindow',
1356
- 'Notification',
1357
- 'SVGElementInstance',
1358
- 'Screen',
1359
- 'TextTrack',
1360
- 'TextTrackCue',
1361
- 'TextTrackList',
1362
- 'WebSocket',
1363
- 'WebSocketWorker',
1364
- 'Worker',
1365
- 'XMLHttpRequest',
1366
- 'XMLHttpRequestEventTarget',
1367
- 'XMLHttpRequestUpload',
1368
  ];
 
1369
  /** Wrap timer functions and event targets to catch errors and provide better meta data */
1370
- var TryCatch = /** @class */ (function () {
1371
- /**
1372
- * @inheritDoc
1373
- */
1374
- function TryCatch(options) {
1375
- /**
1376
- * @inheritDoc
1377
- */
1378
- this.name = TryCatch.id;
1379
- this._options = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({ XMLHttpRequest: true, eventTarget: true, requestAnimationFrame: true, setInterval: true, setTimeout: true }, options);
1380
- }
1381
- /**
1382
- * Wrap timer functions and event targets to catch errors
1383
- * and provide better metadata.
1384
- */
1385
- TryCatch.prototype.setupOnce = function () {
1386
- var global = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .getGlobalObject */ .R)();
1387
- if (this._options.setTimeout) {
1388
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .fill */ .hl)(global, 'setTimeout', _wrapTimeFunction);
1389
- }
1390
- if (this._options.setInterval) {
1391
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .fill */ .hl)(global, 'setInterval', _wrapTimeFunction);
1392
- }
1393
- if (this._options.requestAnimationFrame) {
1394
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .fill */ .hl)(global, 'requestAnimationFrame', _wrapRAF);
1395
- }
1396
- if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {
1397
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .fill */ .hl)(XMLHttpRequest.prototype, 'send', _wrapXHR);
1398
- }
1399
- var eventTargetOption = this._options.eventTarget;
1400
- if (eventTargetOption) {
1401
- var eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;
1402
- eventTarget.forEach(_wrapEventTarget);
1403
- }
1404
  };
1405
- /**
1406
- * @inheritDoc
1407
- */
1408
- TryCatch.id = 'TryCatch';
1409
- return TryCatch;
1410
- }());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1411
 
1412
  /** JSDoc */
1413
  function _wrapTimeFunction(original) {
1414
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1415
- return function () {
1416
- var args = [];
1417
- for (var _i = 0; _i < arguments.length; _i++) {
1418
- args[_i] = arguments[_i];
1419
- }
1420
- var originalCallback = args[0];
1421
- args[0] = (0,_helpers__WEBPACK_IMPORTED_MODULE_3__/* .wrap */ .re)(originalCallback, {
1422
- mechanism: {
1423
- data: { function: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .getFunctionName */ .$P)(original) },
1424
- handled: true,
1425
- type: 'instrument',
1426
- },
1427
- });
1428
- return original.apply(this, args);
1429
- };
1430
  }
 
1431
  /** JSDoc */
1432
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1433
  function _wrapRAF(original) {
1434
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1435
- return function (callback) {
1436
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
1437
  return original.apply(this, [
1438
- (0,_helpers__WEBPACK_IMPORTED_MODULE_3__/* .wrap */ .re)(callback, {
1439
- mechanism: {
1440
- data: {
1441
- function: 'requestAnimationFrame',
1442
- handler: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .getFunctionName */ .$P)(original),
1443
- },
1444
- handled: true,
1445
- type: 'instrument',
1446
- },
1447
- }),
1448
- ]);
1449
- };
1450
  }
 
1451
  /** JSDoc */
1452
  function _wrapXHR(originalSend) {
1453
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1454
- return function () {
1455
- var args = [];
1456
- for (var _i = 0; _i < arguments.length; _i++) {
1457
- args[_i] = arguments[_i];
1458
- }
1459
- // eslint-disable-next-line @typescript-eslint/no-this-alias
1460
  var xhr = this;
1461
- var xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];
1462
- xmlHttpRequestProps.forEach(function (prop) {
1463
- if (prop in xhr && typeof xhr[prop] === 'function') {
1464
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1465
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .fill */ .hl)(xhr, prop, function (original) {
1466
- var wrapOptions = {
1467
- mechanism: {
1468
- data: {
1469
- function: prop,
1470
- handler: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .getFunctionName */ .$P)(original),
1471
- },
1472
- handled: true,
1473
- type: 'instrument',
1474
- },
1475
- };
1476
- // If Instrument integration has been called before TryCatch, get the name of original function
1477
- var originalFunction = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .getOriginalFunction */ .HK)(original);
1478
- if (originalFunction) {
1479
- wrapOptions.mechanism.data.handler = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .getFunctionName */ .$P)(originalFunction);
1480
- }
1481
- // Otherwise wrap directly
1482
- return (0,_helpers__WEBPACK_IMPORTED_MODULE_3__/* .wrap */ .re)(original, wrapOptions);
1483
- });
1484
- }
1485
  });
1486
- return originalSend.apply(this, args);
1487
- };
 
 
 
1488
  }
 
1489
  /** JSDoc */
1490
  function _wrapEventTarget(target) {
1491
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1492
- var global = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .getGlobalObject */ .R)();
1493
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
1494
  var proto = global[target] && global[target].prototype;
1495
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins
1496
  if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {
1497
- return;
1498
- }
1499
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .fill */ .hl)(proto, 'addEventListener', function (original) {
1500
- return function (eventName, fn, options) {
1501
- try {
1502
- if (typeof fn.handleEvent === 'function') {
1503
- fn.handleEvent = (0,_helpers__WEBPACK_IMPORTED_MODULE_3__/* .wrap */ .re)(fn.handleEvent.bind(fn), {
1504
- mechanism: {
1505
- data: {
1506
- function: 'handleEvent',
1507
- handler: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .getFunctionName */ .$P)(fn),
1508
- target: target,
1509
- },
1510
- handled: true,
1511
- type: 'instrument',
1512
- },
1513
- });
1514
- }
1515
- }
1516
- catch (err) {
1517
- // can sometimes get 'Permission denied to access property "handle Event'
1518
- }
1519
- return original.apply(this, [
1520
- eventName,
1521
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1522
- (0,_helpers__WEBPACK_IMPORTED_MODULE_3__/* .wrap */ .re)(fn, {
1523
- mechanism: {
1524
- data: {
1525
- function: 'addEventListener',
1526
- handler: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .getFunctionName */ .$P)(fn),
1527
- target: target,
1528
- },
1529
- handled: true,
1530
- type: 'instrument',
1531
- },
1532
- }),
1533
- options,
1534
- ]);
1535
- };
1536
- });
1537
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .fill */ .hl)(proto, 'removeEventListener', function (originalRemoveEventListener) {
1538
- return function (eventName, fn, options) {
1539
- /**
1540
- * There are 2 possible scenarios here:
1541
- *
1542
- * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified
1543
- * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function
1544
- * as a pass-through, and call original `removeEventListener` with it.
1545
- *
1546
- * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using
1547
- * our wrapped version of `addEventListener`, which internally calls `wrap` helper.
1548
- * This helper "wraps" whole callback inside a try/catch statement, and attached appropriate metadata to it,
1549
- * in order for us to make a distinction between wrapped/non-wrapped functions possible.
1550
- * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.
1551
- *
1552
- * When someone adds a handler prior to initialization, and then do it again, but after,
1553
- * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible
1554
- * to get rid of the initial handler and it'd stick there forever.
1555
- */
1556
- var wrappedEventHandler = fn;
1557
- try {
1558
- var originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;
1559
- if (originalEventHandler) {
1560
- originalRemoveEventListener.call(this, eventName, originalEventHandler, options);
1561
- }
1562
- }
1563
- catch (e) {
1564
- // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments
1565
- }
1566
- return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);
1567
- };
1568
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1569
  }
 
 
1570
  //# sourceMappingURL=trycatch.js.map
1571
 
 
1572
  /***/ }),
1573
 
1574
- /***/ 9992:
1575
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1576
 
1577
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1578
- /* harmony export */ "Z": function() { return /* binding */ UserAgent; }
 
1579
  /* harmony export */ });
1580
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(334);
1581
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1684);
1582
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8585);
1583
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1584
 
1585
 
1586
 
1587
- var global = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
1588
- /** UserAgent */
1589
- var UserAgent = /** @class */ (function () {
1590
- function UserAgent() {
1591
- /**
1592
- * @inheritDoc
1593
- */
1594
- this.name = UserAgent.id;
1595
- }
1596
- /**
1597
- * @inheritDoc
1598
- */
1599
- UserAgent.prototype.setupOnce = function () {
1600
- (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .addGlobalEventProcessor */ .c)(function (event) {
1601
- if ((0,_sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .getCurrentHub */ .Gd)().getIntegration(UserAgent)) {
1602
- // if none of the information we want exists, don't bother
1603
- if (!global.navigator && !global.location && !global.document) {
1604
- return event;
1605
- }
1606
- // grab as much info as exists and add it to the event
1607
- var url = (event.request && event.request.url) || (global.location && global.location.href);
1608
- var referrer = (global.document || {}).referrer;
1609
- var userAgent = (global.navigator || {}).userAgent;
1610
- var headers = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)({}, (event.request && event.request.headers)), (referrer && { Referer: referrer })), (userAgent && { 'User-Agent': userAgent }));
1611
- var request = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)({}, (url && { url: url })), { headers: headers });
1612
- return (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)({}, event), { request: request });
1613
- }
1614
- return event;
1615
- });
1616
- };
1617
- /**
1618
- * @inheritDoc
1619
- */
1620
- UserAgent.id = 'UserAgent';
1621
- return UserAgent;
1622
- }());
1623
 
1624
- //# sourceMappingURL=useragent.js.map
1625
 
1626
- /***/ }),
1627
 
1628
- /***/ 2456:
1629
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1630
 
1631
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1632
- /* harmony export */ "S1": function() { return /* binding */ init; },
1633
- /* harmony export */ "yl": function() { return /* binding */ flush; }
1634
- /* harmony export */ });
1635
- /* unused harmony exports defaultIntegrations, showReportDialog, lastEventId, forceLoad, onLoad, close, wrap */
1636
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1061);
1637
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6286);
1638
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(6853);
1639
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(8585);
1640
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(5907);
1641
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(8536);
1642
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(7946);
1643
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(4005);
1644
- /* harmony import */ var _client__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2314);
1645
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(7904);
1646
- /* harmony import */ var _integrations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3399);
1647
- /* harmony import */ var _integrations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8356);
1648
- /* harmony import */ var _integrations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1228);
1649
- /* harmony import */ var _integrations__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3440);
1650
- /* harmony import */ var _integrations__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(184);
1651
- /* harmony import */ var _integrations__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(9992);
1652
 
1653
 
1654
 
@@ -1657,15 +1855,16 @@ var UserAgent = /** @class */ (function () {
1657
 
1658
 
1659
  var defaultIntegrations = [
1660
- new _sentry_core__WEBPACK_IMPORTED_MODULE_0__/* .InboundFilters */ .QD(),
1661
- new _sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .FunctionToString */ .c(),
1662
- new _integrations__WEBPACK_IMPORTED_MODULE_2__/* .TryCatch */ .p(),
1663
- new _integrations__WEBPACK_IMPORTED_MODULE_3__/* .Breadcrumbs */ .O(),
1664
- new _integrations__WEBPACK_IMPORTED_MODULE_4__/* .GlobalHandlers */ .d(),
1665
- new _integrations__WEBPACK_IMPORTED_MODULE_5__/* .LinkedErrors */ .iP(),
1666
- new _integrations__WEBPACK_IMPORTED_MODULE_6__/* .Dedupe */ .I(),
1667
- new _integrations__WEBPACK_IMPORTED_MODULE_7__/* .UserAgent */ .Z(),
1668
  ];
 
1669
  /**
1670
  * The Sentry Browser SDK Client.
1671
  *
@@ -1723,71 +1922,110 @@ var defaultIntegrations = [
1723
  *
1724
  * @see {@link BrowserOptions} for documentation on configuration options.
1725
  */
1726
- function init(options) {
1727
- if (options === void 0) { options = {}; }
1728
- if (options.defaultIntegrations === undefined) {
1729
- options.defaultIntegrations = defaultIntegrations;
1730
- }
1731
- if (options.release === undefined) {
1732
- var window_1 = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_8__/* .getGlobalObject */ .R)();
1733
- // This supports the variable that sentry-webpack-plugin injects
1734
- if (window_1.SENTRY_RELEASE && window_1.SENTRY_RELEASE.id) {
1735
- options.release = window_1.SENTRY_RELEASE.id;
1736
- }
1737
- }
1738
- if (options.autoSessionTracking === undefined) {
1739
- options.autoSessionTracking = true;
1740
- }
1741
- if (options.sendClientReports === undefined) {
1742
- options.sendClientReports = true;
1743
- }
1744
- (0,_sentry_core__WEBPACK_IMPORTED_MODULE_9__/* .initAndBind */ .M)(_client__WEBPACK_IMPORTED_MODULE_10__/* .BrowserClient */ .R, options);
1745
- if (options.autoSessionTracking) {
1746
- startSessionTracking();
1747
- }
 
 
 
 
 
 
 
 
1748
  }
 
1749
  /**
1750
  * Present the user with a report dialog.
1751
  *
1752
  * @param options Everything is optional, we try to fetch all info need from the global scope.
1753
  */
1754
- function showReportDialog(options) {
1755
- if (options === void 0) { options = {}; }
1756
- var hub = getCurrentHub();
1757
- var scope = hub.getScope();
1758
- if (scope) {
1759
- options.user = __assign(__assign({}, scope.getUser()), options.user);
1760
- }
1761
- if (!options.eventId) {
1762
- options.eventId = hub.lastEventId();
1763
- }
1764
- var client = hub.getClient();
1765
- if (client) {
1766
- client.showReportDialog(options);
1767
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1768
  }
 
1769
  /**
1770
  * This is the getter for lastEventId.
1771
  *
1772
  * @returns The last event id of a captured event.
1773
  */
1774
  function lastEventId() {
1775
- return getCurrentHub().lastEventId();
1776
  }
 
1777
  /**
1778
  * This function is here to be API compatible with the loader.
1779
  * @hidden
1780
  */
1781
  function forceLoad() {
1782
- // Noop
1783
  }
 
1784
  /**
1785
  * This function is here to be API compatible with the loader.
1786
  * @hidden
1787
  */
1788
  function onLoad(callback) {
1789
- callback();
1790
  }
 
1791
  /**
1792
  * Call `flush()` on the current client, if there is one. See {@link Client.flush}.
1793
  *
@@ -1797,13 +2035,14 @@ function onLoad(callback) {
1797
  * doesn't (or if there's no client defined).
1798
  */
1799
  function flush(timeout) {
1800
- var client = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_11__/* .getCurrentHub */ .Gd)().getClient();
1801
- if (client) {
1802
- return client.flush(timeout);
1803
- }
1804
- _flags__WEBPACK_IMPORTED_MODULE_12__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_13__/* .logger.warn */ .kg.warn('Cannot flush events. No client defined.');
1805
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_14__/* .resolvedSyncPromise */ .WD)(false);
1806
  }
 
1807
  /**
1808
  * Call `close()` on the current client, if there is one. See {@link Client.close}.
1809
  *
@@ -1813,13 +2052,14 @@ function flush(timeout) {
1813
  * doesn't (or if there's no client defined).
1814
  */
1815
  function close(timeout) {
1816
- var client = getCurrentHub().getClient();
1817
- if (client) {
1818
- return client.close(timeout);
1819
- }
1820
- IS_DEBUG_BUILD && logger.warn('Cannot flush events and disable SDK. No client defined.');
1821
- return resolvedSyncPromise(false);
1822
  }
 
1823
  /**
1824
  * Wrap code within a try/catch block so the SDK is able to capture errors.
1825
  *
@@ -1827,158 +2067,205 @@ function close(timeout) {
1827
  *
1828
  * @returns The result of wrapped function call.
1829
  */
1830
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1831
  function wrap(fn) {
1832
- return internalWrap(fn)();
1833
  }
 
1834
  function startSessionOnHub(hub) {
1835
- hub.startSession({ ignoreDuration: true });
1836
- hub.captureSession();
1837
  }
 
1838
  /**
1839
  * Enable automatic Session Tracking for the initial page load.
1840
  */
1841
  function startSessionTracking() {
1842
- var window = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_8__/* .getGlobalObject */ .R)();
1843
- var document = window.document;
1844
- if (typeof document === 'undefined') {
1845
- _flags__WEBPACK_IMPORTED_MODULE_12__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_13__/* .logger.warn */ .kg.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');
1846
- return;
1847
- }
1848
- var hub = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_11__/* .getCurrentHub */ .Gd)();
1849
- // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and
1850
- // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are
1851
- // pinned at the same version in package.json, but there are edge cases where it's possible. See
1852
- // https://github.com/getsentry/sentry-javascript/issues/3207 and
1853
- // https://github.com/getsentry/sentry-javascript/issues/3234 and
1854
- // https://github.com/getsentry/sentry-javascript/issues/3278.
1855
- if (!hub.captureSession) {
1856
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1857
  }
1858
- // The session duration for browser sessions does not track a meaningful
1859
- // concept that can be used as a metric.
1860
- // Automatically captured sessions are akin to page views, and thus we
1861
- // discard their duration.
1862
- startSessionOnHub(hub);
1863
- // We want to create a session for every navigation as well
1864
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_15__/* .addInstrumentationHandler */ .o)('history', function (_a) {
1865
- var from = _a.from, to = _a.to;
1866
- // Don't create an additional session for the initial route or if the location did not change
1867
- if (!(from === undefined || from === to)) {
1868
- startSessionOnHub((0,_sentry_core__WEBPACK_IMPORTED_MODULE_11__/* .getCurrentHub */ .Gd)());
1869
- }
1870
- });
1871
  }
 
 
1872
  //# sourceMappingURL=sdk.js.map
1873
 
 
1874
  /***/ }),
1875
 
1876
  /***/ 2224:
1877
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1878
 
1879
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1880
- /* harmony export */ "s$": function() { return /* binding */ chromeStackParser; },
1881
- /* harmony export */ "Pi": function() { return /* binding */ geckoStackParser; },
1882
- /* harmony export */ "aL": function() { return /* binding */ winjsStackParser; },
1883
- /* harmony export */ "CS": function() { return /* binding */ opera10StackParser; },
1884
- /* harmony export */ "ay": function() { return /* binding */ opera11StackParser; }
1885
  /* harmony export */ });
1886
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(334);
 
 
1887
 
1888
  // global reference to slice
1889
  var UNKNOWN_FUNCTION = '?';
 
1890
  var OPERA10_PRIORITY = 10;
1891
  var OPERA11_PRIORITY = 20;
1892
  var CHROME_PRIORITY = 30;
1893
  var WINJS_PRIORITY = 40;
1894
  var GECKO_PRIORITY = 50;
 
1895
  function createFrame(filename, func, lineno, colno) {
1896
- var frame = {
1897
- filename: filename,
1898
- function: func,
1899
- // All browser frames are considered in_app
1900
- in_app: true,
1901
- };
1902
- if (lineno !== undefined) {
1903
- frame.lineno = lineno;
1904
- }
1905
- if (colno !== undefined) {
1906
- frame.colno = colno;
1907
- }
1908
- return frame;
 
 
 
1909
  }
 
1910
  // Chromium based browsers: Chrome, Brave, new Opera, new Edge
1911
- var chromeRegex = /^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;
 
1912
  var chromeEvalRegex = /\((\S*)(?::(\d+))(?::(\d+))\)/;
1913
- var chrome = function (line) {
1914
- var parts = chromeRegex.exec(line);
1915
- if (parts) {
1916
- var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line
1917
- if (isEval) {
1918
- var subMatch = chromeEvalRegex.exec(parts[2]);
1919
- if (subMatch) {
1920
- // throw out eval line/column and use top-most line/column number
1921
- parts[2] = subMatch[1]; // url
1922
- parts[3] = subMatch[2]; // line
1923
- parts[4] = subMatch[3]; // column
1924
- }
1925
- }
1926
- // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now
1927
- // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)
1928
- var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__read */ .CR)(extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]), 2), func = _a[0], filename = _a[1];
1929
- return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);
1930
  }
1931
- return;
 
 
 
 
 
 
 
 
1932
  };
1933
- var chromeStackParser = [CHROME_PRIORITY, chrome];
 
 
1934
  // gecko regex: `(?:bundle|\d+\.js)`: `bundle` is for react native, `\d+\.js` also but specifically for ram bundles because it
1935
  // generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js
1936
  // We need this specific case for now because we want no other regex to match.
1937
- var geckoREgex = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
 
1938
  var geckoEvalRegex = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
1939
- var gecko = function (line) {
1940
- var _a;
1941
- var parts = geckoREgex.exec(line);
1942
- if (parts) {
1943
- var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;
1944
- if (isEval) {
1945
- var subMatch = geckoEvalRegex.exec(parts[3]);
1946
- if (subMatch) {
1947
- // throw out eval line/column and use top-most line number
1948
- parts[1] = parts[1] || 'eval';
1949
- parts[3] = subMatch[1];
1950
- parts[4] = subMatch[2];
1951
- parts[5] = ''; // no column when eval
1952
- }
1953
- }
1954
- var filename = parts[3];
1955
- var func = parts[1] || UNKNOWN_FUNCTION;
1956
- _a = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__read */ .CR)(extractSafariExtensionDetails(func, filename), 2), func = _a[0], filename = _a[1];
1957
- return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);
1958
  }
1959
- return;
 
 
 
 
 
 
 
 
1960
  };
1961
- var geckoStackParser = [GECKO_PRIORITY, gecko];
1962
- var winjsRegex = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
1963
- var winjs = function (line) {
1964
- var parts = winjsRegex.exec(line);
1965
- return parts
1966
- ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)
1967
- : undefined;
 
 
 
 
 
1968
  };
1969
- var winjsStackParser = [WINJS_PRIORITY, winjs];
 
 
1970
  var opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
1971
- var opera10 = function (line) {
1972
- var parts = opera10Regex.exec(line);
1973
- return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;
 
1974
  };
1975
- var opera10StackParser = [OPERA10_PRIORITY, opera10];
1976
- var opera11Regex = / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i;
1977
- var opera11 = function (line) {
1978
- var parts = opera11Regex.exec(line);
1979
- return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;
 
 
 
 
1980
  };
1981
- var opera11StackParser = [OPERA11_PRIORITY, opera11];
 
 
 
 
 
 
1982
  /**
1983
  * Safari web extensions, starting version unknown, can produce "frames-only" stacktraces.
1984
  * What it means, is that instead of format like:
@@ -1999,394 +2286,93 @@ var opera11StackParser = [OPERA11_PRIORITY, opera11];
1999
  * Unfortunately "just" changing RegExp is too complicated now and making it pass all tests
2000
  * and fix this case seems like an impossible, or at least way too time-consuming task.
2001
  */
2002
- var extractSafariExtensionDetails = function (func, filename) {
2003
- var isSafariExtension = func.indexOf('safari-extension') !== -1;
2004
- var isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;
2005
- return isSafariExtension || isSafariWebExtension
2006
- ? [
2007
- func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,
2008
- isSafariExtension ? "safari-extension:" + filename : "safari-web-extension:" + filename,
2009
- ]
2010
- : [func, filename];
 
2011
  };
 
 
2012
  //# sourceMappingURL=stack-parsers.js.map
2013
 
 
2014
  /***/ }),
2015
 
2016
- /***/ 6526:
2017
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2018
 
2019
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2020
- /* harmony export */ "d": function() { return /* binding */ BaseTransport; }
2021
  /* harmony export */ });
2022
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(334);
2023
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4911);
2024
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6508);
2025
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
2026
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8963);
2027
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8536);
2028
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(250);
2029
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(3135);
2030
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(6894);
2031
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(8886);
2032
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(1630);
2033
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7904);
2034
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(5854);
2035
 
2036
 
2037
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2038
 
 
 
 
 
 
 
 
 
2039
 
2040
- function requestTypeToCategory(ty) {
2041
- var tyStr = ty;
2042
- return tyStr === 'event' ? 'error' : tyStr;
2043
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2044
  var global = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
2045
- /** Base Transport class implementation */
2046
- var BaseTransport = /** @class */ (function () {
2047
- function BaseTransport(options) {
2048
- var _this = this;
2049
- this.options = options;
2050
- /** A simple buffer holding all requests. */
2051
- this._buffer = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .makePromiseBuffer */ .x)(30);
2052
- /** Locks transport after receiving rate limits in a response */
2053
- this._rateLimits = {};
2054
- this._outcomes = {};
2055
- this._api = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .initAPIDetails */ .hd)(options.dsn, options._metadata, options.tunnel);
2056
- // eslint-disable-next-line deprecation/deprecation
2057
- this.url = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .getStoreEndpointWithUrlEncodedAuth */ .qi)(this._api.dsn);
2058
- if (this.options.sendClientReports && global.document) {
2059
- global.document.addEventListener('visibilitychange', function () {
2060
- if (global.document.visibilityState === 'hidden') {
2061
- _this._flushOutcomes();
2062
- }
2063
- });
2064
- }
2065
- }
2066
- /**
2067
- * @inheritDoc
2068
- */
2069
- BaseTransport.prototype.sendEvent = function (event) {
2070
- return this._sendRequest((0,_sentry_core__WEBPACK_IMPORTED_MODULE_3__/* .eventToSentryRequest */ .nA)(event, this._api), event);
2071
- };
2072
- /**
2073
- * @inheritDoc
2074
- */
2075
- BaseTransport.prototype.sendSession = function (session) {
2076
- return this._sendRequest((0,_sentry_core__WEBPACK_IMPORTED_MODULE_3__/* .sessionToSentryRequest */ .Qz)(session, this._api), session);
2077
- };
2078
- /**
2079
- * @inheritDoc
2080
- */
2081
- BaseTransport.prototype.close = function (timeout) {
2082
- return this._buffer.drain(timeout);
2083
- };
2084
- /**
2085
- * @inheritDoc
2086
- */
2087
- BaseTransport.prototype.recordLostEvent = function (reason, category) {
2088
- var _a;
2089
- if (!this.options.sendClientReports) {
2090
- return;
2091
- }
2092
- // We want to track each category (event, transaction, session) separately
2093
- // but still keep the distinction between different type of outcomes.
2094
- // We could use nested maps, but it's much easier to read and type this way.
2095
- // A correct type for map-based implementation if we want to go that route
2096
- // would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`
2097
- var key = requestTypeToCategory(category) + ":" + reason;
2098
- _flags__WEBPACK_IMPORTED_MODULE_4__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .logger.log */ .kg.log("Adding outcome: " + key);
2099
- this._outcomes[key] = (_a = this._outcomes[key], (_a !== null && _a !== void 0 ? _a : 0)) + 1;
2100
- };
2101
- /**
2102
- * Send outcomes as an envelope
2103
- */
2104
- BaseTransport.prototype._flushOutcomes = function () {
2105
- if (!this.options.sendClientReports) {
2106
- return;
2107
- }
2108
- var outcomes = this._outcomes;
2109
- this._outcomes = {};
2110
- // Nothing to send
2111
- if (!Object.keys(outcomes).length) {
2112
- _flags__WEBPACK_IMPORTED_MODULE_4__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .logger.log */ .kg.log('No outcomes to flush');
2113
- return;
2114
- }
2115
- _flags__WEBPACK_IMPORTED_MODULE_4__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .logger.log */ .kg.log("Flushing outcomes:\n" + JSON.stringify(outcomes, null, 2));
2116
- var url = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .getEnvelopeEndpointWithUrlEncodedAuth */ .Ut)(this._api.dsn, this._api.tunnel);
2117
- var discardedEvents = Object.keys(outcomes).map(function (key) {
2118
- var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__read */ .CR)(key.split(':'), 2), category = _a[0], reason = _a[1];
2119
- return {
2120
- reason: reason,
2121
- category: category,
2122
- quantity: outcomes[key],
2123
- };
2124
- // TODO: Improve types on discarded_events to get rid of cast
2125
- });
2126
- var envelope = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_7__/* .createClientReportEnvelope */ .y)(discardedEvents, this._api.tunnel && (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_8__/* .dsnToString */ .R)(this._api.dsn));
2127
- try {
2128
- (0,_utils__WEBPACK_IMPORTED_MODULE_9__/* .sendReport */ .z)(url, (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_10__/* .serializeEnvelope */ .V$)(envelope));
2129
- }
2130
- catch (e) {
2131
- _flags__WEBPACK_IMPORTED_MODULE_4__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .logger.error */ .kg.error(e);
2132
- }
2133
- };
2134
- /**
2135
- * Handle Sentry repsonse for promise-based transports.
2136
- */
2137
- BaseTransport.prototype._handleResponse = function (_a) {
2138
- var requestType = _a.requestType, response = _a.response, headers = _a.headers, resolve = _a.resolve, reject = _a.reject;
2139
- var status = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_11__/* .eventStatusFromHttpCode */ .F)(response.status);
2140
- this._rateLimits = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .updateRateLimits */ .WG)(this._rateLimits, headers);
2141
- // eslint-disable-next-line deprecation/deprecation
2142
- if (this._isRateLimited(requestType)) {
2143
- _flags__WEBPACK_IMPORTED_MODULE_4__/* .IS_DEBUG_BUILD */ .h &&
2144
- // eslint-disable-next-line deprecation/deprecation
2145
- _sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .logger.warn */ .kg.warn("Too many " + requestType + " requests, backing off until: " + this._disabledUntil(requestType));
2146
- }
2147
- if (status === 'success') {
2148
- resolve({ status: status });
2149
- return;
2150
- }
2151
- reject(response);
2152
- };
2153
- /**
2154
- * Gets the time that given category is disabled until for rate limiting
2155
- *
2156
- * @deprecated Please use `disabledUntil` from @sentry/utils
2157
- */
2158
- BaseTransport.prototype._disabledUntil = function (requestType) {
2159
- var category = requestTypeToCategory(requestType);
2160
- return new Date((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .disabledUntil */ .ns)(this._rateLimits, category));
2161
- };
2162
- /**
2163
- * Checks if a category is rate limited
2164
- *
2165
- * @deprecated Please use `isRateLimited` from @sentry/utils
2166
- */
2167
- BaseTransport.prototype._isRateLimited = function (requestType) {
2168
- var category = requestTypeToCategory(requestType);
2169
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .isRateLimited */ .Q)(this._rateLimits, category);
2170
- };
2171
- return BaseTransport;
2172
- }());
2173
-
2174
- //# sourceMappingURL=base.js.map
2175
-
2176
- /***/ }),
2177
-
2178
- /***/ 6149:
2179
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2180
-
2181
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2182
- /* harmony export */ "V": function() { return /* binding */ FetchTransport; }
2183
- /* harmony export */ });
2184
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(334);
2185
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9798);
2186
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7946);
2187
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4388);
2188
- /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(6526);
2189
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5854);
2190
-
2191
-
2192
-
2193
-
2194
- /** `fetch` based transport */
2195
- var FetchTransport = /** @class */ (function (_super) {
2196
- (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__extends */ .ZT)(FetchTransport, _super);
2197
- function FetchTransport(options, fetchImpl) {
2198
- if (fetchImpl === void 0) { fetchImpl = (0,_utils__WEBPACK_IMPORTED_MODULE_1__/* .getNativeFetchImplementation */ .x)(); }
2199
- var _this = _super.call(this, options) || this;
2200
- _this._fetch = fetchImpl;
2201
- return _this;
2202
- }
2203
- /**
2204
- * @param sentryRequest Prepared SentryRequest to be delivered
2205
- * @param originalPayload Original payload used to create SentryRequest
2206
- */
2207
- FetchTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {
2208
- var _this = this;
2209
- // eslint-disable-next-line deprecation/deprecation
2210
- if (this._isRateLimited(sentryRequest.type)) {
2211
- this.recordLostEvent('ratelimit_backoff', sentryRequest.type);
2212
- return Promise.reject({
2213
- event: originalPayload,
2214
- type: sentryRequest.type,
2215
- // eslint-disable-next-line deprecation/deprecation
2216
- reason: "Transport for " + sentryRequest.type + " requests locked till " + this._disabledUntil(sentryRequest.type) + " due to too many requests.",
2217
- status: 429,
2218
- });
2219
- }
2220
- var options = {
2221
- body: sentryRequest.body,
2222
- method: 'POST',
2223
- // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'
2224
- // (see https://caniuse.com/#feat=referrer-policy),
2225
- // it doesn't. And it throws an exception instead of ignoring this parameter...
2226
- // REF: https://github.com/getsentry/raven-js/issues/1233
2227
- referrerPolicy: ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .supportsReferrerPolicy */ .hv)() ? 'origin' : ''),
2228
- };
2229
- if (this.options.fetchParameters !== undefined) {
2230
- Object.assign(options, this.options.fetchParameters);
2231
- }
2232
- if (this.options.headers !== undefined) {
2233
- options.headers = this.options.headers;
2234
- }
2235
- return this._buffer
2236
- .add(function () {
2237
- return new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .SyncPromise */ .cW(function (resolve, reject) {
2238
- void _this._fetch(sentryRequest.url, options)
2239
- .then(function (response) {
2240
- var headers = {
2241
- 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),
2242
- 'retry-after': response.headers.get('Retry-After'),
2243
- };
2244
- _this._handleResponse({
2245
- requestType: sentryRequest.type,
2246
- response: response,
2247
- headers: headers,
2248
- resolve: resolve,
2249
- reject: reject,
2250
- });
2251
- })
2252
- .catch(reject);
2253
- });
2254
- })
2255
- .then(undefined, function (reason) {
2256
- // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.
2257
- if (reason instanceof _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .SentryError */ .b) {
2258
- _this.recordLostEvent('queue_overflow', sentryRequest.type);
2259
- }
2260
- else {
2261
- _this.recordLostEvent('network_error', sentryRequest.type);
2262
- }
2263
- throw reason;
2264
- });
2265
- };
2266
- return FetchTransport;
2267
- }(_base__WEBPACK_IMPORTED_MODULE_5__/* .BaseTransport */ .d));
2268
-
2269
- //# sourceMappingURL=fetch.js.map
2270
-
2271
- /***/ }),
2272
-
2273
- /***/ 1449:
2274
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2275
 
2276
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2277
- /* harmony export */ "k": function() { return /* binding */ makeNewFetchTransport; }
2278
- /* harmony export */ });
2279
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(334);
2280
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1518);
2281
- /* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5854);
2282
-
2283
-
2284
-
2285
- /**
2286
- * Creates a Transport that uses the Fetch API to send events to Sentry.
2287
- */
2288
- function makeNewFetchTransport(options, nativeFetch) {
2289
- if (nativeFetch === void 0) { nativeFetch = (0,_utils__WEBPACK_IMPORTED_MODULE_0__/* .getNativeFetchImplementation */ .x)(); }
2290
- function makeRequest(request) {
2291
- var requestOptions = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .pi)({ body: request.body, method: 'POST', referrerPolicy: 'origin' }, options.requestOptions);
2292
- return nativeFetch(options.url, requestOptions).then(function (response) {
2293
- return response.text().then(function (body) { return ({
2294
- body: body,
2295
- headers: {
2296
- 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),
2297
- 'retry-after': response.headers.get('Retry-After'),
2298
- },
2299
- reason: response.statusText,
2300
- statusCode: response.status,
2301
- }); });
2302
- });
2303
- }
2304
- return (0,_sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .createTransport */ .qv)({ bufferSize: options.bufferSize }, makeRequest);
2305
- }
2306
- //# sourceMappingURL=new-fetch.js.map
2307
-
2308
- /***/ }),
2309
-
2310
- /***/ 4827:
2311
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2312
-
2313
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2314
- /* harmony export */ "H": function() { return /* binding */ makeNewXHRTransport; }
2315
- /* harmony export */ });
2316
- /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1518);
2317
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7946);
2318
-
2319
-
2320
- /**
2321
- * The DONE ready state for XmlHttpRequest
2322
- *
2323
- * Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined
2324
- * (e.g. during testing, it is `undefined`)
2325
- *
2326
- * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}
2327
- */
2328
- var XHR_READYSTATE_DONE = 4;
2329
- /**
2330
- * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.
2331
- */
2332
- function makeNewXHRTransport(options) {
2333
- function makeRequest(request) {
2334
- return new _sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .SyncPromise */ .cW(function (resolve, _reject) {
2335
- var xhr = new XMLHttpRequest();
2336
- xhr.onreadystatechange = function () {
2337
- if (xhr.readyState === XHR_READYSTATE_DONE) {
2338
- var response = {
2339
- body: xhr.response,
2340
- headers: {
2341
- 'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'),
2342
- 'retry-after': xhr.getResponseHeader('Retry-After'),
2343
- },
2344
- reason: xhr.statusText,
2345
- statusCode: xhr.status,
2346
- };
2347
- resolve(response);
2348
- }
2349
- };
2350
- xhr.open('POST', options.url);
2351
- for (var header in options.headers) {
2352
- if (Object.prototype.hasOwnProperty.call(options.headers, header)) {
2353
- xhr.setRequestHeader(header, options.headers[header]);
2354
- }
2355
- }
2356
- xhr.send(request.body);
2357
- });
2358
- }
2359
- return (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .createTransport */ .qv)({ bufferSize: options.bufferSize }, makeRequest);
2360
- }
2361
- //# sourceMappingURL=new-xhr.js.map
2362
-
2363
- /***/ }),
2364
-
2365
- /***/ 5854:
2366
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2367
-
2368
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2369
- /* harmony export */ "x": function() { return /* binding */ getNativeFetchImplementation; },
2370
- /* harmony export */ "z": function() { return /* binding */ sendReport; }
2371
- /* harmony export */ });
2372
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
2373
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9798);
2374
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8536);
2375
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3518);
2376
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7904);
2377
-
2378
-
2379
- var global = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
2380
- var cachedFetchImpl;
2381
  /**
2382
  * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.
2383
  * Whenever someone wraps the Fetch API and returns the wrong promise chain,
2384
  * this chain becomes orphaned and there is no possible way to capture it's rejections
2385
  * other than allowing it bubble up to this very handler. eg.
2386
  *
2387
- * const f = window.fetch;
2388
  * window.fetch = function () {
2389
- * const p = f.apply(this, arguments);
2390
  *
2391
  * p.then(function() {
2392
  * console.log('hi.');
@@ -2417,36 +2403,36 @@ var cachedFetchImpl;
2417
  * Safari: resource blocked by content blocker
2418
  */
2419
  function getNativeFetchImplementation() {
2420
- if (cachedFetchImpl) {
2421
- return cachedFetchImpl;
2422
- }
2423
- /* eslint-disable @typescript-eslint/unbound-method */
2424
- // Fast path to avoid DOM I/O
2425
- if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .isNativeFetch */ .Du)(global.fetch)) {
2426
- return (cachedFetchImpl = global.fetch.bind(global));
2427
- }
2428
- var document = global.document;
2429
- var fetchImpl = global.fetch;
2430
- // eslint-disable-next-line deprecation/deprecation
2431
  if (document && typeof document.createElement === 'function') {
2432
- try {
2433
- var sandbox = document.createElement('iframe');
2434
- sandbox.hidden = true;
2435
- document.head.appendChild(sandbox);
2436
- var contentWindow = sandbox.contentWindow;
2437
- if (contentWindow && contentWindow.fetch) {
2438
- fetchImpl = contentWindow.fetch;
2439
- }
2440
- document.head.removeChild(sandbox);
2441
- }
2442
- catch (e) {
2443
- _flags__WEBPACK_IMPORTED_MODULE_2__/* .IS_DEBUG_BUILD */ .h &&
2444
- _sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .logger.warn */ .kg.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);
2445
- }
2446
  }
2447
- return (cachedFetchImpl = fetchImpl.bind(global));
2448
- /* eslint-enable @typescript-eslint/unbound-method */
2449
- }
 
 
2450
  /**
2451
  * Sends sdk client report using sendBeacon or fetch as a fallback if available
2452
  *
@@ -2454,3482 +2440,1550 @@ function getNativeFetchImplementation() {
2454
  * @param body report payload
2455
  */
2456
  function sendReport(url, body) {
2457
- var isRealNavigator = Object.prototype.toString.call(global && global.navigator) === '[object Navigator]';
2458
- var hasSendBeacon = isRealNavigator && typeof global.navigator.sendBeacon === 'function';
2459
- if (hasSendBeacon) {
2460
- // Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch
2461
- var sendBeacon = global.navigator.sendBeacon.bind(global.navigator);
2462
- return sendBeacon(url, body);
2463
- }
2464
- if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .supportsFetch */ .Ak)()) {
2465
- var fetch_1 = getNativeFetchImplementation();
2466
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .forget */ .I)(fetch_1(url, {
2467
- body: body,
2468
- method: 'POST',
2469
- credentials: 'omit',
2470
- keepalive: true,
2471
- }));
2472
- }
 
 
2473
  }
 
 
2474
  //# sourceMappingURL=utils.js.map
2475
 
 
2476
  /***/ }),
2477
 
2478
  /***/ 6144:
2479
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2480
 
2481
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2482
- /* harmony export */ "w": function() { return /* binding */ XHRTransport; }
2483
  /* harmony export */ });
2484
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(334);
2485
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7946);
2486
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4388);
2487
- /* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(6526);
2488
-
2489
-
2490
-
2491
- /** `XHR` based transport */
2492
- var XHRTransport = /** @class */ (function (_super) {
2493
- (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__extends */ .ZT)(XHRTransport, _super);
2494
- function XHRTransport() {
2495
- return _super !== null && _super.apply(this, arguments) || this;
2496
- }
2497
- /**
2498
- * @param sentryRequest Prepared SentryRequest to be delivered
2499
- * @param originalPayload Original payload used to create SentryRequest
2500
- */
2501
- XHRTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {
2502
- var _this = this;
2503
- // eslint-disable-next-line deprecation/deprecation
2504
- if (this._isRateLimited(sentryRequest.type)) {
2505
- this.recordLostEvent('ratelimit_backoff', sentryRequest.type);
2506
- return Promise.reject({
2507
- event: originalPayload,
2508
- type: sentryRequest.type,
2509
- // eslint-disable-next-line deprecation/deprecation
2510
- reason: "Transport for " + sentryRequest.type + " requests locked till " + this._disabledUntil(sentryRequest.type) + " due to too many requests.",
2511
- status: 429,
2512
- });
2513
- }
2514
- return this._buffer
2515
- .add(function () {
2516
- return new _sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .SyncPromise */ .cW(function (resolve, reject) {
2517
- var request = new XMLHttpRequest();
2518
- request.onreadystatechange = function () {
2519
- if (request.readyState === 4) {
2520
- var headers = {
2521
- 'x-sentry-rate-limits': request.getResponseHeader('X-Sentry-Rate-Limits'),
2522
- 'retry-after': request.getResponseHeader('Retry-After'),
2523
- };
2524
- _this._handleResponse({ requestType: sentryRequest.type, response: request, headers: headers, resolve: resolve, reject: reject });
2525
- }
2526
- };
2527
- request.open('POST', sentryRequest.url);
2528
- for (var header in _this.options.headers) {
2529
- if (Object.prototype.hasOwnProperty.call(_this.options.headers, header)) {
2530
- request.setRequestHeader(header, _this.options.headers[header]);
2531
- }
2532
- }
2533
- request.send(sentryRequest.body);
2534
- });
2535
- })
2536
- .then(undefined, function (reason) {
2537
- // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.
2538
- if (reason instanceof _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .SentryError */ .b) {
2539
- _this.recordLostEvent('queue_overflow', sentryRequest.type);
2540
- }
2541
- else {
2542
- _this.recordLostEvent('network_error', sentryRequest.type);
2543
- }
2544
- throw reason;
2545
- });
2546
- };
2547
- return XHRTransport;
2548
- }(_base__WEBPACK_IMPORTED_MODULE_3__/* .BaseTransport */ .d));
2549
 
2550
- //# sourceMappingURL=xhr.js.map
2551
 
2552
- /***/ }),
2553
 
2554
- /***/ 334:
2555
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
 
2556
 
2557
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2558
- /* harmony export */ "ZT": function() { return /* binding */ __extends; },
2559
- /* harmony export */ "pi": function() { return /* binding */ __assign; },
2560
- /* harmony export */ "CR": function() { return /* binding */ __read; },
2561
- /* harmony export */ "fl": function() { return /* binding */ __spread; }
2562
- /* harmony export */ });
2563
- /* unused harmony exports __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet */
2564
- /*! *****************************************************************************
2565
- Copyright (c) Microsoft Corporation.
2566
-
2567
- Permission to use, copy, modify, and/or distribute this software for any
2568
- purpose with or without fee is hereby granted.
2569
-
2570
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2571
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2572
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2573
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2574
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2575
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2576
- PERFORMANCE OF THIS SOFTWARE.
2577
- ***************************************************************************** */
2578
- /* global Reflect, Promise */
2579
-
2580
- var extendStatics = function(d, b) {
2581
- extendStatics = Object.setPrototypeOf ||
2582
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
2583
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
2584
- return extendStatics(d, b);
2585
- };
2586
 
2587
- function __extends(d, b) {
2588
- extendStatics(d, b);
2589
- function __() { this.constructor = d; }
2590
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2591
- }
2592
 
2593
- var __assign = function() {
2594
- __assign = Object.assign || function __assign(t) {
2595
- for (var s, i = 1, n = arguments.length; i < n; i++) {
2596
- s = arguments[i];
2597
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
 
 
 
 
2598
  }
2599
- return t;
2600
- }
2601
- return __assign.apply(this, arguments);
2602
- }
2603
 
2604
- function __rest(s, e) {
2605
- var t = {};
2606
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
2607
- t[p] = s[p];
2608
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
2609
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
2610
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
2611
- t[p[i]] = s[p[i]];
2612
- }
2613
- return t;
2614
- }
2615
 
2616
- function __decorate(decorators, target, key, desc) {
2617
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
2618
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
2619
- 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;
2620
- return c > 3 && r && Object.defineProperty(target, key, r), r;
2621
- }
2622
 
2623
- function __param(paramIndex, decorator) {
2624
- return function (target, key) { decorator(target, key, paramIndex); }
2625
- }
2626
 
2627
- function __metadata(metadataKey, metadataValue) {
2628
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
2629
  }
2630
 
2631
- function __awaiter(thisArg, _arguments, P, generator) {
2632
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
2633
- return new (P || (P = Promise))(function (resolve, reject) {
2634
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
2635
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
2636
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
2637
- step((generator = generator.apply(thisArg, _arguments || [])).next());
2638
- });
2639
- }
2640
 
2641
- function __generator(thisArg, body) {
2642
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
2643
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
2644
- function verb(n) { return function (v) { return step([n, v]); }; }
2645
- function step(op) {
2646
- if (f) throw new TypeError("Generator is already executing.");
2647
- while (_) try {
2648
- 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;
2649
- if (y = 0, t) op = [op[0] & 2, t.value];
2650
- switch (op[0]) {
2651
- case 0: case 1: t = op; break;
2652
- case 4: _.label++; return { value: op[1], done: false };
2653
- case 5: _.label++; y = op[1]; op = [0]; continue;
2654
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
2655
- default:
2656
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
2657
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
2658
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
2659
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
2660
- if (t[2]) _.ops.pop();
2661
- _.trys.pop(); continue;
2662
- }
2663
- op = body.call(thisArg, _);
2664
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
2665
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
2666
- }
2667
- }
2668
 
2669
- function __createBinding(o, m, k, k2) {
2670
- if (k2 === undefined) k2 = k;
2671
- o[k2] = m[k];
2672
- }
2673
 
2674
- function __exportStar(m, exports) {
2675
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
2676
- }
2677
 
2678
- function __values(o) {
2679
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
2680
- if (m) return m.call(o);
2681
- if (o && typeof o.length === "number") return {
2682
- next: function () {
2683
- if (o && i >= o.length) o = void 0;
2684
- return { value: o && o[i++], done: !o };
2685
- }
2686
- };
2687
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
2688
- }
2689
 
2690
- function __read(o, n) {
2691
- var m = typeof Symbol === "function" && o[Symbol.iterator];
2692
- if (!m) return o;
2693
- var i = m.call(o), r, ar = [], e;
2694
- try {
2695
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
2696
- }
2697
- catch (error) { e = { error: error }; }
2698
- finally {
2699
- try {
2700
- if (r && !r.done && (m = i["return"])) m.call(i);
2701
- }
2702
- finally { if (e) throw e.error; }
2703
- }
2704
- return ar;
2705
- }
2706
 
2707
- function __spread() {
2708
- for (var ar = [], i = 0; i < arguments.length; i++)
2709
- ar = ar.concat(__read(arguments[i]));
2710
- return ar;
2711
- }
2712
 
2713
- function __spreadArrays() {
2714
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
2715
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
2716
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
2717
- r[k] = a[j];
2718
- return r;
2719
- };
2720
 
2721
- function __await(v) {
2722
- return this instanceof __await ? (this.v = v, this) : new __await(v);
 
 
 
2723
  }
2724
 
2725
- function __asyncGenerator(thisArg, _arguments, generator) {
2726
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
2727
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
2728
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
2729
- 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); }); }; }
2730
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
2731
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
2732
- function fulfill(value) { resume("next", value); }
2733
- function reject(value) { resume("throw", value); }
2734
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
2735
  }
2736
 
2737
- function __asyncDelegator(o) {
2738
- var i, p;
2739
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
2740
- 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; }
 
 
 
 
2741
  }
2742
 
2743
- function __asyncValues(o) {
2744
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
2745
- var m = o[Symbol.asyncIterator], i;
2746
- 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);
2747
- 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); }); }; }
2748
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
 
2749
  }
2750
 
2751
- function __makeTemplateObject(cooked, raw) {
2752
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
2753
- return cooked;
2754
- };
2755
-
2756
- function __importStar(mod) {
2757
- if (mod && mod.__esModule) return mod;
2758
- var result = {};
2759
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
2760
- result.default = mod;
2761
- return result;
2762
- }
2763
 
2764
- function __importDefault(mod) {
2765
- return (mod && mod.__esModule) ? mod : { default: mod };
2766
- }
 
2767
 
2768
- function __classPrivateFieldGet(receiver, privateMap) {
2769
- if (!privateMap.has(receiver)) {
2770
- throw new TypeError("attempted to get private field on non-instance");
 
2771
  }
2772
- return privateMap.get(receiver);
2773
- }
2774
 
2775
- function __classPrivateFieldSet(receiver, privateMap, value) {
2776
- if (!privateMap.has(receiver)) {
2777
- throw new TypeError("attempted to set private field on non-instance");
 
 
 
 
 
 
 
 
 
 
2778
  }
2779
- privateMap.set(receiver, value);
2780
- return value;
 
2781
  }
2782
 
2783
 
 
 
 
2784
  /***/ }),
2785
 
2786
- /***/ 4911:
2787
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2788
 
2789
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2790
- /* harmony export */ "hd": function() { return /* binding */ initAPIDetails; },
2791
- /* harmony export */ "qi": function() { return /* binding */ getStoreEndpointWithUrlEncodedAuth; },
2792
- /* harmony export */ "Ut": function() { return /* binding */ getEnvelopeEndpointWithUrlEncodedAuth; },
2793
- /* harmony export */ "hR": function() { return /* binding */ getReportDialogEndpoint; }
2794
  /* harmony export */ });
2795
- /* unused harmony exports API, getRequestHeaders */
 
2796
  /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3135);
2797
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1995);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2798
 
2799
- var SENTRY_API_VERSION = '7';
2800
  /**
2801
- * Helper class to provide urls, headers and metadata that can be used to form
2802
- * different types of requests to Sentry endpoints.
2803
- * Supports both envelopes and regular event requests.
2804
  *
2805
- * @deprecated Please use APIDetails
2806
- **/
2807
- var API = /** @class */ (function () {
2808
- /** Create a new instance of API */
2809
- function API(dsn, metadata, tunnel) {
2810
- if (metadata === void 0) { metadata = {}; }
2811
- this.dsn = dsn;
2812
- this._dsnObject = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .makeDsn */ .v)(dsn);
2813
- this.metadata = metadata;
2814
- this._tunnel = tunnel;
2815
- }
2816
- /** Returns the Dsn object. */
2817
- API.prototype.getDsn = function () {
2818
- return this._dsnObject;
2819
- };
2820
- /** Does this transport force envelopes? */
2821
- API.prototype.forceEnvelope = function () {
2822
- return !!this._tunnel;
2823
- };
2824
- /** Returns the prefix to construct Sentry ingestion API endpoints. */
2825
- API.prototype.getBaseApiEndpoint = function () {
2826
- return getBaseApiEndpoint(this._dsnObject);
2827
- };
2828
- /** Returns the store endpoint URL. */
2829
- API.prototype.getStoreEndpoint = function () {
2830
- return getStoreEndpoint(this._dsnObject);
2831
- };
2832
- /**
2833
- * Returns the store endpoint URL with auth in the query string.
2834
- *
2835
- * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.
2836
- */
2837
- API.prototype.getStoreEndpointWithUrlEncodedAuth = function () {
2838
- return getStoreEndpointWithUrlEncodedAuth(this._dsnObject);
2839
- };
2840
- /**
2841
- * Returns the envelope endpoint URL with auth in the query string.
2842
- *
2843
- * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.
2844
- */
2845
- API.prototype.getEnvelopeEndpointWithUrlEncodedAuth = function () {
2846
- return getEnvelopeEndpointWithUrlEncodedAuth(this._dsnObject, this._tunnel);
2847
- };
2848
- return API;
2849
- }());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2850
 
2851
- /** Initializes API Details */
2852
- function initAPIDetails(dsn, metadata, tunnel) {
2853
- return {
2854
- initDsn: dsn,
2855
- metadata: metadata || {},
2856
- dsn: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .makeDsn */ .v)(dsn),
2857
- tunnel: tunnel,
2858
- };
2859
- }
2860
- /** Returns the prefix to construct Sentry ingestion API endpoints. */
2861
- function getBaseApiEndpoint(dsn) {
2862
- var protocol = dsn.protocol ? dsn.protocol + ":" : '';
2863
- var port = dsn.port ? ":" + dsn.port : '';
2864
- return protocol + "//" + dsn.host + port + (dsn.path ? "/" + dsn.path : '') + "/api/";
2865
- }
2866
- /** Returns the ingest API endpoint for target. */
2867
- function _getIngestEndpoint(dsn, target) {
2868
- return "" + getBaseApiEndpoint(dsn) + dsn.projectId + "/" + target + "/";
2869
- }
2870
- /** Returns a URL-encoded string with auth config suitable for a query string. */
2871
- function _encodedAuth(dsn) {
2872
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .urlEncode */ ._j)({
2873
- // We send only the minimum set of required information. See
2874
- // https://github.com/getsentry/sentry-javascript/issues/2572.
2875
- sentry_key: dsn.publicKey,
2876
- sentry_version: SENTRY_API_VERSION,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2877
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2878
  }
2879
- /** Returns the store endpoint URL. */
2880
- function getStoreEndpoint(dsn) {
2881
- return _getIngestEndpoint(dsn, 'store');
2882
- }
2883
  /**
2884
- * Returns the store endpoint URL with auth in the query string.
2885
- *
2886
- * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.
2887
  */
2888
- function getStoreEndpointWithUrlEncodedAuth(dsn) {
2889
- return getStoreEndpoint(dsn) + "?" + _encodedAuth(dsn);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2890
  }
2891
- /** Returns the envelope endpoint URL. */
2892
- function _getEnvelopeEndpoint(dsn) {
2893
- return _getIngestEndpoint(dsn, 'envelope');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2894
  }
 
2895
  /**
2896
- * Returns the envelope endpoint URL with auth in the query string.
2897
- *
2898
- * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.
2899
- */
2900
- function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel) {
2901
- return tunnel ? tunnel : _getEnvelopeEndpoint(dsn) + "?" + _encodedAuth(dsn);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2902
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2903
  /**
2904
- * Returns an object that can be used in request headers.
2905
- * This is needed for node and the old /store endpoint in sentry
2906
  */
2907
- function getRequestHeaders(dsn, clientName, clientVersion) {
2908
- // CHANGE THIS to use metadata but keep clientName and clientVersion compatible
2909
- var header = ["Sentry sentry_version=" + SENTRY_API_VERSION];
2910
- header.push("sentry_client=" + clientName + "/" + clientVersion);
2911
- header.push("sentry_key=" + dsn.publicKey);
2912
- if (dsn.pass) {
2913
- header.push("sentry_secret=" + dsn.pass);
2914
  }
2915
- return {
2916
- 'Content-Type': 'application/json',
2917
- 'X-Sentry-Auth': header.join(', '),
2918
- };
2919
  }
2920
- /** Returns the url to the report dialog endpoint. */
2921
- function getReportDialogEndpoint(dsnLike, dialogOptions) {
2922
- var dsn = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .makeDsn */ .v)(dsnLike);
2923
- var endpoint = getBaseApiEndpoint(dsn) + "embed/error-page/";
2924
- var encodedOptions = "dsn=" + (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .dsnToString */ .R)(dsn);
2925
- for (var key in dialogOptions) {
2926
- if (key === 'dsn') {
2927
- continue;
2928
- }
2929
- if (key === 'user') {
2930
- if (!dialogOptions.user) {
2931
- continue;
2932
- }
2933
- if (dialogOptions.user.name) {
2934
- encodedOptions += "&name=" + encodeURIComponent(dialogOptions.user.name);
2935
- }
2936
- if (dialogOptions.user.email) {
2937
- encodedOptions += "&email=" + encodeURIComponent(dialogOptions.user.email);
2938
- }
2939
- }
2940
- else {
2941
- encodedOptions += "&" + encodeURIComponent(key) + "=" + encodeURIComponent(dialogOptions[key]);
2942
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2943
  }
2944
- return endpoint + "?" + encodedOptions;
 
 
2945
  }
2946
- //# sourceMappingURL=api.js.map
 
 
 
2947
 
2948
  /***/ }),
2949
 
2950
- /***/ 9504:
2951
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2952
 
2953
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2954
- /* harmony export */ "N": function() { return /* binding */ BaseBackend; }
2955
  /* harmony export */ });
2956
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5733);
2957
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8536);
2958
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4388);
2959
- /* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4911);
2960
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(428);
2961
- /* harmony import */ var _request__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6508);
2962
- /* harmony import */ var _transports_noop__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3926);
2963
 
2964
 
 
2965
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2966
 
 
 
 
 
 
 
2967
 
2968
 
2969
- /**
2970
- * This is the base implemention of a Backend.
2971
- * @hidden
2972
- */
2973
- var BaseBackend = /** @class */ (function () {
2974
- /** Creates a new backend instance. */
2975
- function BaseBackend(options) {
2976
- this._options = options;
2977
- if (!this._options.dsn) {
2978
- _flags__WEBPACK_IMPORTED_MODULE_0__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .logger.warn */ .kg.warn('No DSN provided, backend will not do anything.');
2979
- }
2980
- this._transport = this._setupTransport();
2981
- }
2982
- /**
2983
- * @inheritDoc
2984
- */
2985
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
2986
- BaseBackend.prototype.eventFromException = function (_exception, _hint) {
2987
- throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .SentryError */ .b('Backend has to implement `eventFromException` method');
2988
- };
2989
- /**
2990
- * @inheritDoc
2991
- */
2992
- BaseBackend.prototype.eventFromMessage = function (_message, _level, _hint) {
2993
- throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .SentryError */ .b('Backend has to implement `eventFromMessage` method');
2994
- };
2995
- /**
2996
- * @inheritDoc
2997
- */
2998
- BaseBackend.prototype.sendEvent = function (event) {
2999
- // TODO(v7): Remove the if-else
3000
- if (this._newTransport &&
3001
- this._options.dsn &&
3002
- this._options._experiments &&
3003
- this._options._experiments.newTransport) {
3004
- var api = (0,_api__WEBPACK_IMPORTED_MODULE_3__/* .initAPIDetails */ .hd)(this._options.dsn, this._options._metadata, this._options.tunnel);
3005
- var env = (0,_request__WEBPACK_IMPORTED_MODULE_4__/* .createEventEnvelope */ .Mq)(event, api);
3006
- void this._newTransport.send(env).then(null, function (reason) {
3007
- _flags__WEBPACK_IMPORTED_MODULE_0__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .logger.error */ .kg.error('Error while sending event:', reason);
3008
- });
3009
- }
3010
- else {
3011
- void this._transport.sendEvent(event).then(null, function (reason) {
3012
- _flags__WEBPACK_IMPORTED_MODULE_0__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .logger.error */ .kg.error('Error while sending event:', reason);
3013
- });
3014
- }
3015
- };
3016
- /**
3017
- * @inheritDoc
3018
- */
3019
- BaseBackend.prototype.sendSession = function (session) {
3020
- if (!this._transport.sendSession) {
3021
- _flags__WEBPACK_IMPORTED_MODULE_0__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .logger.warn */ .kg.warn("Dropping session because custom transport doesn't implement sendSession");
3022
- return;
3023
- }
3024
- // TODO(v7): Remove the if-else
3025
- if (this._newTransport &&
3026
- this._options.dsn &&
3027
- this._options._experiments &&
3028
- this._options._experiments.newTransport) {
3029
- var api = (0,_api__WEBPACK_IMPORTED_MODULE_3__/* .initAPIDetails */ .hd)(this._options.dsn, this._options._metadata, this._options.tunnel);
3030
- var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__read */ .CR)((0,_request__WEBPACK_IMPORTED_MODULE_4__/* .createSessionEnvelope */ .Q3)(session, api), 1), env = _a[0];
3031
- void this._newTransport.send(env).then(null, function (reason) {
3032
- _flags__WEBPACK_IMPORTED_MODULE_0__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .logger.error */ .kg.error('Error while sending session:', reason);
3033
- });
3034
- }
3035
- else {
3036
- void this._transport.sendSession(session).then(null, function (reason) {
3037
- _flags__WEBPACK_IMPORTED_MODULE_0__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .logger.error */ .kg.error('Error while sending session:', reason);
3038
- });
3039
- }
3040
- };
3041
- /**
3042
- * @inheritDoc
3043
- */
3044
- BaseBackend.prototype.getTransport = function () {
3045
- return this._transport;
3046
- };
3047
- /**
3048
- * Sets up the transport so it can be used later to send requests.
3049
- */
3050
- BaseBackend.prototype._setupTransport = function () {
3051
- return new _transports_noop__WEBPACK_IMPORTED_MODULE_6__/* .NoopTransport */ .V();
3052
- };
3053
- return BaseBackend;
3054
- }());
3055
 
3056
- //# sourceMappingURL=basebackend.js.map
3057
 
3058
  /***/ }),
3059
 
3060
- /***/ 9849:
3061
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3062
 
3063
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3064
- /* harmony export */ "W": function() { return /* binding */ BaseClient; }
3065
  /* harmony export */ });
3066
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5733);
3067
- /* harmony import */ var _sentry_hub__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(1684);
3068
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3135);
3069
  /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3699);
3070
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8536);
3071
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1757);
3072
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(7946);
3073
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7790);
3074
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(8035);
3075
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(9660);
3076
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(4388);
3077
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(428);
3078
- /* harmony import */ var _integration__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8889);
3079
 
3080
- /* eslint-disable max-lines */
3081
 
 
 
 
3082
 
 
3083
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3084
 
3085
- var ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured.";
3086
- /**
3087
- * Base implementation for all JavaScript SDK clients.
3088
- *
3089
- * Call the constructor with the corresponding backend constructor and options
3090
- * specific to the client subclass. To access these options later, use
3091
- * {@link Client.getOptions}. Also, the Backend instance is available via
3092
- * {@link Client.getBackend}.
3093
- *
3094
- * If a Dsn is specified in the options, it will be parsed and stored. Use
3095
- * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is
3096
- * invalid, the constructor will throw a {@link SentryException}. Note that
3097
- * without a valid Dsn, the SDK will not send any events to Sentry.
3098
- *
3099
- * Before sending an event via the backend, it is passed through
3100
- * {@link BaseClient._prepareEvent} to add SDK information and scope data
3101
- * (breadcrumbs and context). To add more custom information, override this
3102
- * method and extend the resulting prepared event.
3103
- *
3104
- * To issue automatically created events (e.g. via instrumentation), use
3105
- * {@link Client.captureEvent}. It will prepare the event and pass it through
3106
- * the callback lifecycle. To issue auto-breadcrumbs, use
3107
- * {@link Client.addBreadcrumb}.
3108
- *
3109
- * @example
3110
- * class NodeClient extends BaseClient<NodeBackend, NodeOptions> {
3111
- * public constructor(options: NodeOptions) {
3112
- * super(NodeBackend, options);
3113
- * }
3114
- *
3115
- * // ...
3116
- * }
3117
- */
3118
- var BaseClient = /** @class */ (function () {
3119
- /**
3120
- * Initializes this client instance.
3121
- *
3122
- * @param backendClass A constructor function to create the backend.
3123
- * @param options Options for the client.
3124
- */
3125
- function BaseClient(backendClass, options) {
3126
- /** Array of used integrations. */
3127
- this._integrations = {};
3128
- /** Number of calls being processed */
3129
- this._numProcessing = 0;
3130
- this._backend = new backendClass(options);
3131
- this._options = options;
3132
- if (options.dsn) {
3133
- this._dsn = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .makeDsn */ .v)(options.dsn);
3134
- }
3135
- }
3136
- /**
3137
- * @inheritDoc
3138
- */
3139
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
3140
- BaseClient.prototype.captureException = function (exception, hint, scope) {
3141
- var _this = this;
3142
- // ensure we haven't captured this very object before
3143
- if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .checkOrSetAlreadyCaught */ .YO)(exception)) {
3144
- _flags__WEBPACK_IMPORTED_MODULE_2__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .logger.log */ .kg.log(ALREADY_SEEN_ERROR);
3145
- return;
3146
- }
3147
- var eventId = hint && hint.event_id;
3148
- this._process(this._getBackend()
3149
- .eventFromException(exception, hint)
3150
- .then(function (event) { return _this._captureEvent(event, hint, scope); })
3151
- .then(function (result) {
3152
- eventId = result;
3153
- }));
3154
- return eventId;
3155
- };
3156
- /**
3157
- * @inheritDoc
3158
- */
3159
- BaseClient.prototype.captureMessage = function (message, level, hint, scope) {
3160
- var _this = this;
3161
- var eventId = hint && hint.event_id;
3162
- var promisedEvent = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .isPrimitive */ .pt)(message)
3163
- ? this._getBackend().eventFromMessage(String(message), level, hint)
3164
- : this._getBackend().eventFromException(message, hint);
3165
- this._process(promisedEvent
3166
- .then(function (event) { return _this._captureEvent(event, hint, scope); })
3167
- .then(function (result) {
3168
- eventId = result;
3169
- }));
3170
- return eventId;
3171
- };
3172
- /**
3173
- * @inheritDoc
3174
- */
3175
- BaseClient.prototype.captureEvent = function (event, hint, scope) {
3176
- // ensure we haven't captured this very object before
3177
- if (hint && hint.originalException && (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .checkOrSetAlreadyCaught */ .YO)(hint.originalException)) {
3178
- _flags__WEBPACK_IMPORTED_MODULE_2__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .logger.log */ .kg.log(ALREADY_SEEN_ERROR);
3179
- return;
3180
- }
3181
- var eventId = hint && hint.event_id;
3182
- this._process(this._captureEvent(event, hint, scope).then(function (result) {
3183
- eventId = result;
3184
- }));
3185
- return eventId;
3186
- };
3187
- /**
3188
- * @inheritDoc
3189
- */
3190
- BaseClient.prototype.captureSession = function (session) {
3191
- if (!this._isEnabled()) {
3192
- _flags__WEBPACK_IMPORTED_MODULE_2__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .logger.warn */ .kg.warn('SDK not enabled, will not capture session.');
3193
- return;
3194
- }
3195
- if (!(typeof session.release === 'string')) {
3196
- _flags__WEBPACK_IMPORTED_MODULE_2__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .logger.warn */ .kg.warn('Discarded session because of missing or non-string release');
3197
- }
3198
- else {
3199
- this._sendSession(session);
3200
- // After sending, we set init false to indicate it's not the first occurrence
3201
- session.update({ init: false });
3202
- }
3203
- };
3204
- /**
3205
- * @inheritDoc
3206
- */
3207
- BaseClient.prototype.getDsn = function () {
3208
- return this._dsn;
3209
- };
3210
- /**
3211
- * @inheritDoc
3212
- */
3213
- BaseClient.prototype.getOptions = function () {
3214
- return this._options;
3215
- };
3216
- /**
3217
- * @inheritDoc
3218
- */
3219
- BaseClient.prototype.getTransport = function () {
3220
- return this._getBackend().getTransport();
3221
- };
3222
- /**
3223
- * @inheritDoc
3224
- */
3225
- BaseClient.prototype.flush = function (timeout) {
3226
- var _this = this;
3227
- return this._isClientDoneProcessing(timeout).then(function (clientFinished) {
3228
- return _this.getTransport()
3229
- .close(timeout)
3230
- .then(function (transportFlushed) { return clientFinished && transportFlushed; });
3231
- });
3232
- };
3233
- /**
3234
- * @inheritDoc
3235
- */
3236
- BaseClient.prototype.close = function (timeout) {
3237
- var _this = this;
3238
- return this.flush(timeout).then(function (result) {
3239
- _this.getOptions().enabled = false;
3240
- return result;
3241
- });
3242
- };
3243
- /**
3244
- * Sets up the integrations
3245
- */
3246
- BaseClient.prototype.setupIntegrations = function () {
3247
- if (this._isEnabled() && !this._integrations.initialized) {
3248
- this._integrations = (0,_integration__WEBPACK_IMPORTED_MODULE_5__/* .setupIntegrations */ .q4)(this._options);
3249
- }
3250
- };
3251
- /**
3252
- * @inheritDoc
3253
- */
3254
- BaseClient.prototype.getIntegration = function (integration) {
3255
- try {
3256
- return this._integrations[integration.id] || null;
3257
- }
3258
- catch (_oO) {
3259
- _flags__WEBPACK_IMPORTED_MODULE_2__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .logger.warn */ .kg.warn("Cannot retrieve integration " + integration.id + " from the current Client");
3260
- return null;
3261
- }
3262
- };
3263
- /** Updates existing session based on the provided event */
3264
- BaseClient.prototype._updateSessionFromEvent = function (session, event) {
3265
- var e_1, _a;
3266
- var crashed = false;
3267
- var errored = false;
3268
- var exceptions = event.exception && event.exception.values;
3269
- if (exceptions) {
3270
- errored = true;
3271
- try {
3272
- for (var exceptions_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__values */ .XA)(exceptions), exceptions_1_1 = exceptions_1.next(); !exceptions_1_1.done; exceptions_1_1 = exceptions_1.next()) {
3273
- var ex = exceptions_1_1.value;
3274
- var mechanism = ex.mechanism;
3275
- if (mechanism && mechanism.handled === false) {
3276
- crashed = true;
3277
- break;
3278
- }
3279
- }
3280
- }
3281
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
3282
- finally {
3283
- try {
3284
- if (exceptions_1_1 && !exceptions_1_1.done && (_a = exceptions_1.return)) _a.call(exceptions_1);
3285
- }
3286
- finally { if (e_1) throw e_1.error; }
3287
- }
3288
- }
3289
- // A session is updated and that session update is sent in only one of the two following scenarios:
3290
- // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update
3291
- // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update
3292
- var sessionNonTerminal = session.status === 'ok';
3293
- var shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);
3294
- if (shouldUpdateAndSend) {
3295
- session.update((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .pi)({}, (crashed && { status: 'crashed' })), { errors: session.errors || Number(errored || crashed) }));
3296
- this.captureSession(session);
3297
- }
3298
- };
3299
- /** Deliver captured session to Sentry */
3300
- BaseClient.prototype._sendSession = function (session) {
3301
- this._getBackend().sendSession(session);
3302
- };
3303
- /**
3304
- * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying
3305
- * "no" (resolving to `false`) in order to give the client a chance to potentially finish first.
3306
- *
3307
- * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not
3308
- * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to
3309
- * `true`.
3310
- * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and
3311
- * `false` otherwise
3312
- */
3313
- BaseClient.prototype._isClientDoneProcessing = function (timeout) {
3314
- var _this = this;
3315
- return new _sentry_utils__WEBPACK_IMPORTED_MODULE_7__/* .SyncPromise */ .cW(function (resolve) {
3316
- var ticked = 0;
3317
- var tick = 1;
3318
- var interval = setInterval(function () {
3319
- if (_this._numProcessing == 0) {
3320
- clearInterval(interval);
3321
- resolve(true);
3322
- }
3323
- else {
3324
- ticked += tick;
3325
- if (timeout && ticked >= timeout) {
3326
- clearInterval(interval);
3327
- resolve(false);
3328
- }
3329
- }
3330
- }, tick);
3331
- });
3332
- };
3333
- /** Returns the current backend. */
3334
- BaseClient.prototype._getBackend = function () {
3335
- return this._backend;
3336
- };
3337
- /** Determines whether this SDK is enabled and a valid Dsn is present. */
3338
- BaseClient.prototype._isEnabled = function () {
3339
- return this.getOptions().enabled !== false && this._dsn !== undefined;
3340
- };
3341
- /**
3342
- * Adds common information to events.
3343
- *
3344
- * The information includes release and environment from `options`,
3345
- * breadcrumbs and context (extra, tags and user) from the scope.
3346
- *
3347
- * Information that is already present in the event is never overwritten. For
3348
- * nested objects, such as the context, keys are merged.
3349
- *
3350
- * @param event The original event.
3351
- * @param hint May contain additional information about the original exception.
3352
- * @param scope A scope containing event metadata.
3353
- * @returns A new event with more information.
3354
- */
3355
- BaseClient.prototype._prepareEvent = function (event, scope, hint) {
3356
- var _this = this;
3357
- var _a = this.getOptions(), _b = _a.normalizeDepth, normalizeDepth = _b === void 0 ? 3 : _b, _c = _a.normalizeMaxBreadth, normalizeMaxBreadth = _c === void 0 ? 1000 : _c;
3358
- var prepared = (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .pi)({}, event), { event_id: event.event_id || (hint && hint.event_id ? hint.event_id : (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .uuid4 */ .DM)()), timestamp: event.timestamp || (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_8__/* .dateTimestampInSeconds */ .yW)() });
3359
- this._applyClientOptions(prepared);
3360
- this._applyIntegrationsMetadata(prepared);
3361
- // If we have scope given to us, use it as the base for further modifications.
3362
- // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.
3363
- var finalScope = scope;
3364
- if (hint && hint.captureContext) {
3365
- finalScope = _sentry_hub__WEBPACK_IMPORTED_MODULE_9__/* .Scope.clone */ .s.clone(finalScope).update(hint.captureContext);
3366
- }
3367
- // We prepare the result here with a resolved Event.
3368
- var result = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_7__/* .resolvedSyncPromise */ .WD)(prepared);
3369
- // This should be the last thing called, since we want that
3370
- // {@link Hub.addEventProcessor} gets the finished prepared event.
3371
- if (finalScope) {
3372
- // In case we have a hub we reassign it.
3373
- result = finalScope.applyToEvent(prepared, hint);
3374
- }
3375
- return result.then(function (evt) {
3376
- if (evt) {
3377
- // TODO this is more of the hack trying to solve https://github.com/getsentry/sentry-javascript/issues/2809
3378
- // it is only attached as extra data to the event if the event somehow skips being normalized
3379
- evt.sdkProcessingMetadata = (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .pi)({}, evt.sdkProcessingMetadata), { normalizeDepth: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_10__/* .normalize */ .Fv)(normalizeDepth) + " (" + typeof normalizeDepth + ")" });
3380
- }
3381
- if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {
3382
- return _this._normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);
3383
- }
3384
- return evt;
3385
- });
3386
- };
3387
- /**
3388
- * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.
3389
- * Normalized keys:
3390
- * - `breadcrumbs.data`
3391
- * - `user`
3392
- * - `contexts`
3393
- * - `extra`
3394
- * @param event Event
3395
- * @returns Normalized event
3396
- */
3397
- BaseClient.prototype._normalizeEvent = function (event, depth, maxBreadth) {
3398
- if (!event) {
3399
- return null;
3400
- }
3401
- var normalized = (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .pi)({}, event), (event.breadcrumbs && {
3402
- breadcrumbs: event.breadcrumbs.map(function (b) { return ((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .pi)({}, b), (b.data && {
3403
- data: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_10__/* .normalize */ .Fv)(b.data, depth, maxBreadth),
3404
- }))); }),
3405
- })), (event.user && {
3406
- user: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_10__/* .normalize */ .Fv)(event.user, depth, maxBreadth),
3407
- })), (event.contexts && {
3408
- contexts: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_10__/* .normalize */ .Fv)(event.contexts, depth, maxBreadth),
3409
- })), (event.extra && {
3410
- extra: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_10__/* .normalize */ .Fv)(event.extra, depth, maxBreadth),
3411
- }));
3412
- // event.contexts.trace stores information about a Transaction. Similarly,
3413
- // event.spans[] stores information about child Spans. Given that a
3414
- // Transaction is conceptually a Span, normalization should apply to both
3415
- // Transactions and Spans consistently.
3416
- // For now the decision is to skip normalization of Transactions and Spans,
3417
- // so this block overwrites the normalized event to add back the original
3418
- // Transaction information prior to normalization.
3419
- if (event.contexts && event.contexts.trace) {
3420
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
3421
- normalized.contexts.trace = event.contexts.trace;
3422
- }
3423
- normalized.sdkProcessingMetadata = (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__assign */ .pi)({}, normalized.sdkProcessingMetadata), { baseClientNormalized: true });
3424
- return normalized;
3425
- };
3426
- /**
3427
- * Enhances event using the client configuration.
3428
- * It takes care of all "static" values like environment, release and `dist`,
3429
- * as well as truncating overly long values.
3430
- * @param event event instance to be enhanced
3431
- */
3432
- BaseClient.prototype._applyClientOptions = function (event) {
3433
- var options = this.getOptions();
3434
- var environment = options.environment, release = options.release, dist = options.dist, _a = options.maxValueLength, maxValueLength = _a === void 0 ? 250 : _a;
3435
- if (!('environment' in event)) {
3436
- event.environment = 'environment' in options ? environment : 'production';
3437
- }
3438
- if (event.release === undefined && release !== undefined) {
3439
- event.release = release;
3440
- }
3441
- if (event.dist === undefined && dist !== undefined) {
3442
- event.dist = dist;
3443
- }
3444
- if (event.message) {
3445
- event.message = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_11__/* .truncate */ .$G)(event.message, maxValueLength);
3446
- }
3447
- var exception = event.exception && event.exception.values && event.exception.values[0];
3448
- if (exception && exception.value) {
3449
- exception.value = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_11__/* .truncate */ .$G)(exception.value, maxValueLength);
3450
- }
3451
- var request = event.request;
3452
- if (request && request.url) {
3453
- request.url = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_11__/* .truncate */ .$G)(request.url, maxValueLength);
3454
- }
3455
- };
3456
- /**
3457
- * This function adds all used integrations to the SDK info in the event.
3458
- * @param event The event that will be filled with all integrations.
3459
- */
3460
- BaseClient.prototype._applyIntegrationsMetadata = function (event) {
3461
- var integrationsArray = Object.keys(this._integrations);
3462
- if (integrationsArray.length > 0) {
3463
- event.sdk = event.sdk || {};
3464
- event.sdk.integrations = (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__spread */ .fl)((event.sdk.integrations || []), integrationsArray);
3465
- }
3466
- };
3467
- /**
3468
- * Tells the backend to send this event
3469
- * @param event The Sentry event to send
3470
- */
3471
- BaseClient.prototype._sendEvent = function (event) {
3472
- this._getBackend().sendEvent(event);
3473
- };
3474
- /**
3475
- * Processes the event and logs an error in case of rejection
3476
- * @param event
3477
- * @param hint
3478
- * @param scope
3479
- */
3480
- BaseClient.prototype._captureEvent = function (event, hint, scope) {
3481
- return this._processEvent(event, hint, scope).then(function (finalEvent) {
3482
- return finalEvent.event_id;
3483
- }, function (reason) {
3484
- _flags__WEBPACK_IMPORTED_MODULE_2__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .logger.error */ .kg.error(reason);
3485
- return undefined;
3486
- });
3487
- };
3488
- /**
3489
- * Processes an event (either error or message) and sends it to Sentry.
3490
- *
3491
- * This also adds breadcrumbs and context information to the event. However,
3492
- * platform specific meta data (such as the User's IP address) must be added
3493
- * by the SDK implementor.
3494
- *
3495
- *
3496
- * @param event The event to send to Sentry.
3497
- * @param hint May contain additional information about the original exception.
3498
- * @param scope A scope containing event metadata.
3499
- * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.
3500
- */
3501
- BaseClient.prototype._processEvent = function (event, hint, scope) {
3502
- var _this = this;
3503
- // eslint-disable-next-line @typescript-eslint/unbound-method
3504
- var _a = this.getOptions(), beforeSend = _a.beforeSend, sampleRate = _a.sampleRate;
3505
- var transport = this.getTransport();
3506
- function recordLostEvent(outcome, category) {
3507
- if (transport.recordLostEvent) {
3508
- transport.recordLostEvent(outcome, category);
3509
- }
3510
- }
3511
- if (!this._isEnabled()) {
3512
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_7__/* .rejectedSyncPromise */ .$2)(new _sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .SentryError */ .b('SDK not enabled, will not capture event.'));
3513
- }
3514
- var isTransaction = event.type === 'transaction';
3515
- // 1.0 === 100% events are sent
3516
- // 0.0 === 0% events are sent
3517
- // Sampling for transaction happens somewhere else
3518
- if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {
3519
- recordLostEvent('sample_rate', 'event');
3520
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_7__/* .rejectedSyncPromise */ .$2)(new _sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .SentryError */ .b("Discarding event because it's not included in the random sample (sampling rate = " + sampleRate + ")"));
3521
- }
3522
- return this._prepareEvent(event, scope, hint)
3523
- .then(function (prepared) {
3524
- if (prepared === null) {
3525
- recordLostEvent('event_processor', event.type || 'event');
3526
- throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .SentryError */ .b('An event processor returned null, will not send event.');
3527
- }
3528
- var isInternalException = hint && hint.data && hint.data.__sentry__ === true;
3529
- if (isInternalException || isTransaction || !beforeSend) {
3530
- return prepared;
3531
- }
3532
- var beforeSendResult = beforeSend(prepared, hint);
3533
- return _ensureBeforeSendRv(beforeSendResult);
3534
- })
3535
- .then(function (processedEvent) {
3536
- if (processedEvent === null) {
3537
- recordLostEvent('before_send', event.type || 'event');
3538
- throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .SentryError */ .b('`beforeSend` returned `null`, will not send event.');
3539
- }
3540
- var session = scope && scope.getSession && scope.getSession();
3541
- if (!isTransaction && session) {
3542
- _this._updateSessionFromEvent(session, processedEvent);
3543
- }
3544
- _this._sendEvent(processedEvent);
3545
- return processedEvent;
3546
- })
3547
- .then(null, function (reason) {
3548
- if (reason instanceof _sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .SentryError */ .b) {
3549
- throw reason;
3550
- }
3551
- _this.captureException(reason, {
3552
- data: {
3553
- __sentry__: true,
3554
- },
3555
- originalException: reason,
3556
- });
3557
- throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .SentryError */ .b("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: " + reason);
3558
- });
3559
- };
3560
- /**
3561
- * Occupies the client with processing and event
3562
- */
3563
- BaseClient.prototype._process = function (promise) {
3564
- var _this = this;
3565
- this._numProcessing += 1;
3566
- void promise.then(function (value) {
3567
- _this._numProcessing -= 1;
3568
- return value;
3569
- }, function (reason) {
3570
- _this._numProcessing -= 1;
3571
- return reason;
3572
- });
3573
- };
3574
- return BaseClient;
3575
- }());
3576
 
3577
- /**
3578
- * Verifies that return value of configured `beforeSend` is of expected type.
3579
- */
3580
- function _ensureBeforeSendRv(rv) {
3581
- var nullErr = '`beforeSend` method has to return `null` or a valid event.';
3582
- if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .isThenable */ .J8)(rv)) {
3583
- return rv.then(function (event) {
3584
- if (!((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .isPlainObject */ .PO)(event) || event === null)) {
3585
- throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .SentryError */ .b(nullErr);
3586
- }
3587
- return event;
3588
- }, function (e) {
3589
- throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .SentryError */ .b("beforeSend rejected with " + e);
3590
- });
3591
- }
3592
- else if (!((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .isPlainObject */ .PO)(rv) || rv === null)) {
3593
- throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .SentryError */ .b(nullErr);
3594
- }
3595
- return rv;
3596
  }
3597
- //# sourceMappingURL=baseclient.js.map
3598
-
3599
- /***/ }),
3600
 
3601
- /***/ 428:
3602
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3603
 
3604
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3605
- /* harmony export */ "h": function() { return /* binding */ IS_DEBUG_BUILD; }
3606
- /* harmony export */ });
3607
- /*
3608
- * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking
3609
- * for users.
3610
- *
3611
- * Debug flags need to be declared in each package individually and must not be imported across package boundaries,
3612
- * because some build tools have trouble tree-shaking imported guards.
3613
- *
3614
- * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.
3615
- *
3616
- * Debug flag files will contain "magic strings" like `__SENTRY_DEBUG__` that may get replaced with actual values during
3617
- * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not
3618
- * replaced.
3619
- */
3620
- /** Flag that is true for debug builds, false otherwise. */
3621
- var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;
3622
- //# sourceMappingURL=flags.js.map
3623
 
3624
- /***/ }),
 
 
 
3625
 
3626
- /***/ 8889:
3627
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
3628
 
3629
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3630
- /* harmony export */ "q4": function() { return /* binding */ setupIntegrations; }
3631
- /* harmony export */ });
3632
- /* unused harmony exports installedIntegrations, getIntegrationsToSetup, setupIntegration */
3633
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5733);
3634
- /* harmony import */ var _sentry_hub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1684);
3635
- /* harmony import */ var _sentry_hub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8585);
3636
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8536);
3637
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1995);
3638
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(428);
3639
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3640
 
 
 
 
 
 
 
 
 
 
3641
 
 
 
 
3642
 
3643
- var installedIntegrations = [];
3644
- /**
3645
- * @private
3646
- */
3647
- function filterDuplicates(integrations) {
3648
- return integrations.reduce(function (acc, integrations) {
3649
- if (acc.every(function (accIntegration) { return integrations.name !== accIntegration.name; })) {
3650
- acc.push(integrations);
3651
- }
3652
- return acc;
3653
- }, []);
3654
- }
3655
- /** Gets integration to install */
3656
- function getIntegrationsToSetup(options) {
3657
- var defaultIntegrations = (options.defaultIntegrations && (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)(options.defaultIntegrations)) || [];
3658
- var userIntegrations = options.integrations;
3659
- var integrations = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)(filterDuplicates(defaultIntegrations));
3660
- if (Array.isArray(userIntegrations)) {
3661
- // Filter out integrations that are also included in user options
3662
- integrations = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)(integrations.filter(function (integrations) {
3663
- return userIntegrations.every(function (userIntegration) { return userIntegration.name !== integrations.name; });
3664
- }), filterDuplicates(userIntegrations));
3665
- }
3666
- else if (typeof userIntegrations === 'function') {
3667
- integrations = userIntegrations(integrations);
3668
- integrations = Array.isArray(integrations) ? integrations : [integrations];
3669
- }
3670
- // Make sure that if present, `Debug` integration will always run last
3671
- var integrationsNames = integrations.map(function (i) { return i.name; });
3672
- var alwaysLastToRun = 'Debug';
3673
- if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {
3674
- integrations.push.apply(integrations, (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)(integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1)));
3675
- }
3676
- return integrations;
3677
- }
3678
- /** Setup given integration */
3679
- function setupIntegration(integration) {
3680
- if (installedIntegrations.indexOf(integration.name) !== -1) {
3681
- return;
3682
  }
3683
- integration.setupOnce(_sentry_hub__WEBPACK_IMPORTED_MODULE_1__/* .addGlobalEventProcessor */ .c, _sentry_hub__WEBPACK_IMPORTED_MODULE_2__/* .getCurrentHub */ .Gd);
3684
- installedIntegrations.push(integration.name);
3685
- _flags__WEBPACK_IMPORTED_MODULE_3__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.log */ .kg.log("Integration installed: " + integration.name);
3686
- }
3687
- /**
3688
- * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default
3689
- * integrations are added unless they were already provided before.
3690
- * @param integrations array of integration instances
3691
- * @param withDefault should enable default integrations
3692
- */
3693
- function setupIntegrations(options) {
3694
- var integrations = {};
3695
- getIntegrationsToSetup(options).forEach(function (integration) {
3696
- integrations[integration.name] = integration;
3697
- setupIntegration(integration);
3698
- });
3699
- // set the `initialized` flag so we don't run through the process again unecessarily; use `Object.defineProperty`
3700
- // because by default it creates a property which is nonenumerable, which we want since `initialized` shouldn't be
3701
- // considered a member of the index the way the actual integrations are
3702
- (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .addNonEnumerableProperty */ .xp)(integrations, 'initialized', true);
3703
- return integrations;
3704
- }
3705
- //# sourceMappingURL=integration.js.map
3706
 
3707
- /***/ }),
 
3708
 
3709
- /***/ 6286:
3710
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
 
 
 
 
 
 
 
3711
 
3712
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3713
- /* harmony export */ "c": function() { return /* binding */ FunctionToString; }
3714
- /* harmony export */ });
3715
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1995);
3716
 
3717
- var originalFunctionToString;
3718
- /** Patch toString calls to return proper name for wrapped functions */
3719
- var FunctionToString = /** @class */ (function () {
3720
- function FunctionToString() {
3721
- /**
3722
- * @inheritDoc
3723
- */
3724
- this.name = FunctionToString.id;
3725
- }
3726
- /**
3727
- * @inheritDoc
3728
- */
3729
- FunctionToString.prototype.setupOnce = function () {
3730
- // eslint-disable-next-line @typescript-eslint/unbound-method
3731
- originalFunctionToString = Function.prototype.toString;
3732
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
3733
- Function.prototype.toString = function () {
3734
- var args = [];
3735
- for (var _i = 0; _i < arguments.length; _i++) {
3736
- args[_i] = arguments[_i];
3737
- }
3738
- var context = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .getOriginalFunction */ .HK)(this) || this;
3739
- return originalFunctionToString.apply(context, args);
3740
- };
3741
- };
3742
- /**
3743
- * @inheritDoc
3744
- */
3745
- FunctionToString.id = 'FunctionToString';
3746
- return FunctionToString;
3747
- }());
3748
 
3749
- //# sourceMappingURL=functiontostring.js.map
3750
 
3751
  /***/ }),
3752
 
3753
- /***/ 1061:
3754
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3755
 
3756
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3757
- /* harmony export */ "QD": function() { return /* binding */ InboundFilters; }
3758
  /* harmony export */ });
3759
- /* unused harmony exports _mergeOptions, _shouldDropEvent */
3760
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5733);
3761
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8536);
3762
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3699);
3763
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9660);
3764
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(428);
3765
 
3766
 
3767
 
3768
- // "Script error." is hard coded into browsers for errors that it can't read.
3769
- // this is the result of a script being pulled in from an external domain and CORS.
3770
- var DEFAULT_IGNORE_ERRORS = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/];
3771
- /** Inbound filters configurable by the user */
3772
- var InboundFilters = /** @class */ (function () {
3773
- function InboundFilters(_options) {
3774
- if (_options === void 0) { _options = {}; }
3775
- this._options = _options;
3776
- /**
3777
- * @inheritDoc
3778
- */
3779
- this.name = InboundFilters.id;
 
 
 
 
 
 
 
3780
  }
3781
- /**
3782
- * @inheritDoc
3783
- */
3784
- InboundFilters.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) {
3785
- addGlobalEventProcessor(function (event) {
3786
- var hub = getCurrentHub();
3787
- if (hub) {
3788
- var self_1 = hub.getIntegration(InboundFilters);
3789
- if (self_1) {
3790
- var client = hub.getClient();
3791
- var clientOptions = client ? client.getOptions() : {};
3792
- var options = _mergeOptions(self_1._options, clientOptions);
3793
- return _shouldDropEvent(event, options) ? null : event;
3794
- }
3795
- }
3796
- return event;
3797
- });
3798
- };
3799
- /**
3800
- * @inheritDoc
3801
- */
3802
- InboundFilters.id = 'InboundFilters';
3803
- return InboundFilters;
3804
- }());
3805
 
3806
- /** JSDoc */
3807
- function _mergeOptions(internalOptions, clientOptions) {
3808
- if (internalOptions === void 0) { internalOptions = {}; }
3809
- if (clientOptions === void 0) { clientOptions = {}; }
3810
- return {
3811
- allowUrls: (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)((internalOptions.whitelistUrls || []), (internalOptions.allowUrls || []), (clientOptions.whitelistUrls || []), (clientOptions.allowUrls || [])),
3812
- denyUrls: (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)((internalOptions.blacklistUrls || []), (internalOptions.denyUrls || []), (clientOptions.blacklistUrls || []), (clientOptions.denyUrls || [])),
3813
- ignoreErrors: (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)((internalOptions.ignoreErrors || []), (clientOptions.ignoreErrors || []), DEFAULT_IGNORE_ERRORS),
3814
- ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,
3815
- };
3816
  }
3817
- /** JSDoc */
3818
- function _shouldDropEvent(event, options) {
3819
- if (options.ignoreInternal && _isSentryError(event)) {
3820
- _flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h &&
3821
- _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.warn */ .kg.warn("Event dropped due to being internal Sentry Error.\nEvent: " + (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .getEventDescription */ .jH)(event));
3822
- return true;
3823
- }
3824
- if (_isIgnoredError(event, options.ignoreErrors)) {
3825
- _flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h &&
3826
- _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.warn */ .kg.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: " + (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .getEventDescription */ .jH)(event));
3827
- return true;
3828
- }
3829
- if (_isDeniedUrl(event, options.denyUrls)) {
3830
- _flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h &&
3831
- _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.warn */ .kg.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: " + (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .getEventDescription */ .jH)(event) + ".\nUrl: " + _getEventFilterUrl(event));
3832
- return true;
3833
- }
3834
- if (!_isAllowedUrl(event, options.allowUrls)) {
3835
- _flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h &&
3836
- _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.warn */ .kg.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: " + (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .getEventDescription */ .jH)(event) + ".\nUrl: " + _getEventFilterUrl(event));
3837
- return true;
3838
- }
3839
- return false;
3840
- }
3841
- function _isIgnoredError(event, ignoreErrors) {
3842
- if (!ignoreErrors || !ignoreErrors.length) {
3843
- return false;
3844
- }
3845
- return _getPossibleEventMessages(event).some(function (message) {
3846
- return ignoreErrors.some(function (pattern) { return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .isMatchingPattern */ .zC)(message, pattern); });
3847
- });
3848
- }
3849
- function _isDeniedUrl(event, denyUrls) {
3850
- // TODO: Use Glob instead?
3851
- if (!denyUrls || !denyUrls.length) {
3852
- return false;
3853
- }
3854
- var url = _getEventFilterUrl(event);
3855
- return !url ? false : denyUrls.some(function (pattern) { return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .isMatchingPattern */ .zC)(url, pattern); });
3856
- }
3857
- function _isAllowedUrl(event, allowUrls) {
3858
- // TODO: Use Glob instead?
3859
- if (!allowUrls || !allowUrls.length) {
3860
- return true;
3861
- }
3862
- var url = _getEventFilterUrl(event);
3863
- return !url ? true : allowUrls.some(function (pattern) { return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .isMatchingPattern */ .zC)(url, pattern); });
3864
- }
3865
- function _getPossibleEventMessages(event) {
3866
- if (event.message) {
3867
- return [event.message];
3868
- }
3869
- if (event.exception) {
3870
- try {
3871
- 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;
3872
- return ["" + value, type + ": " + value];
3873
- }
3874
- catch (oO) {
3875
- _flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.error */ .kg.error("Cannot extract message for event " + (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .getEventDescription */ .jH)(event));
3876
- return [];
3877
- }
3878
- }
3879
- return [];
3880
- }
3881
- function _isSentryError(event) {
3882
- try {
3883
- // @ts-ignore can't be a sentry error if undefined
3884
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
3885
- return event.exception.values[0].type === 'SentryError';
3886
- }
3887
- catch (e) {
3888
- // ignore
3889
- }
3890
- return false;
3891
- }
3892
- function _getLastValidUrl(frames) {
3893
- if (frames === void 0) { frames = []; }
3894
- for (var i = frames.length - 1; i >= 0; i--) {
3895
- var frame = frames[i];
3896
- if (frame && frame.filename !== '<anonymous>' && frame.filename !== '[native code]') {
3897
- return frame.filename || null;
3898
- }
3899
- }
3900
- return null;
3901
- }
3902
- function _getEventFilterUrl(event) {
3903
- try {
3904
- if (event.stacktrace) {
3905
- return _getLastValidUrl(event.stacktrace.frames);
3906
- }
3907
- var frames_1;
3908
- try {
3909
- // @ts-ignore we only care about frames if the whole thing here is defined
3910
- frames_1 = event.exception.values[0].stacktrace.frames;
3911
- }
3912
- catch (e) {
3913
- // ignore
3914
- }
3915
- return frames_1 ? _getLastValidUrl(frames_1) : null;
3916
- }
3917
- catch (oO) {
3918
- _flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.error */ .kg.error("Cannot extract url for event " + (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .getEventDescription */ .jH)(event));
3919
- return null;
3920
- }
3921
- }
3922
- //# sourceMappingURL=inboundfilters.js.map
3923
-
3924
- /***/ }),
3925
-
3926
- /***/ 6508:
3927
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3928
-
3929
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3930
- /* harmony export */ "Q3": function() { return /* binding */ createSessionEnvelope; },
3931
- /* harmony export */ "Qz": function() { return /* binding */ sessionToSentryRequest; },
3932
- /* harmony export */ "Mq": function() { return /* binding */ createEventEnvelope; },
3933
- /* harmony export */ "nA": function() { return /* binding */ eventToSentryRequest; }
3934
- /* harmony export */ });
3935
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5733);
3936
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3135);
3937
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6894);
3938
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8035);
3939
- /* harmony import */ var _api__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4911);
3940
-
3941
-
3942
-
3943
- /** Extract sdk info from from the API metadata */
3944
- function getSdkMetadataForEnvelopeHeader(api) {
3945
- if (!api.metadata || !api.metadata.sdk) {
3946
- return;
3947
- }
3948
- var _a = api.metadata.sdk, name = _a.name, version = _a.version;
3949
- return { name: name, version: version };
3950
- }
3951
- /**
3952
- * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.
3953
- * Merge with existing data if any.
3954
- **/
3955
- function enhanceEventWithSdkInfo(event, sdkInfo) {
3956
- if (!sdkInfo) {
3957
- return event;
3958
- }
3959
- event.sdk = event.sdk || {};
3960
- event.sdk.name = event.sdk.name || sdkInfo.name;
3961
- event.sdk.version = event.sdk.version || sdkInfo.version;
3962
- event.sdk.integrations = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)((event.sdk.integrations || []), (sdkInfo.integrations || []));
3963
- event.sdk.packages = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)((event.sdk.packages || []), (sdkInfo.packages || []));
3964
- return event;
3965
- }
3966
- /** Creates an envelope from a Session */
3967
- function createSessionEnvelope(session, api) {
3968
- var sdkInfo = getSdkMetadataForEnvelopeHeader(api);
3969
- var envelopeHeaders = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({ sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .dsnToString */ .R)(api.dsn) }));
3970
- // I know this is hacky but we don't want to add `sessions` to request type since it's never rate limited
3971
- var type = 'aggregates' in session ? 'sessions' : 'session';
3972
- // TODO (v7) Have to cast type because envelope items do not accept a `SentryRequestType`
3973
- var envelopeItem = [{ type: type }, session];
3974
- var envelope = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .createEnvelope */ .Jd)(envelopeHeaders, [envelopeItem]);
3975
- return [envelope, type];
3976
- }
3977
- /** Creates a SentryRequest from a Session. */
3978
- function sessionToSentryRequest(session, api) {
3979
- var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__read */ .CR)(createSessionEnvelope(session, api), 2), envelope = _a[0], type = _a[1];
3980
- return {
3981
- body: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .serializeEnvelope */ .V$)(envelope),
3982
- type: type,
3983
- url: (0,_api__WEBPACK_IMPORTED_MODULE_3__/* .getEnvelopeEndpointWithUrlEncodedAuth */ .Ut)(api.dsn, api.tunnel),
3984
- };
3985
- }
3986
- /**
3987
- * Create an Envelope from an event. Note that this is duplicated from below,
3988
- * but on purpose as this will be refactored in v7.
3989
- */
3990
- function createEventEnvelope(event, api) {
3991
- var sdkInfo = getSdkMetadataForEnvelopeHeader(api);
3992
- var eventType = event.type || 'event';
3993
- var transactionSampling = (event.sdkProcessingMetadata || {}).transactionSampling;
3994
- var _a = transactionSampling || {}, samplingMethod = _a.method, sampleRate = _a.rate;
3995
- // TODO: Below is a temporary hack in order to debug a serialization error - see
3996
- // https://github.com/getsentry/sentry-javascript/issues/2809,
3997
- // https://github.com/getsentry/sentry-javascript/pull/4425, and
3998
- // https://github.com/getsentry/sentry-javascript/pull/4574.
3999
- //
4000
- // TL; DR: even though we normalize all events (which should prevent this), something is causing `JSON.stringify` to
4001
- // throw a circular reference error.
4002
- //
4003
- // When it's time to remove it:
4004
- // 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting
4005
- // `sdkProcessingMetadata`
4006
- // 2. Restore the original version of the request body, which is commented out
4007
- // 3. Search for either of the PR URLs above and pull out the companion hacks in the browser playwright tests and the
4008
- // baseClient tests in this package
4009
- enhanceEventWithSdkInfo(event, api.metadata.sdk);
4010
- event.tags = event.tags || {};
4011
- event.extra = event.extra || {};
4012
- // In theory, all events should be marked as having gone through normalization and so
4013
- // we should never set this tag/extra data
4014
- if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {
4015
- event.tags.skippedNormalization = true;
4016
- event.extra.normalizeDepth = event.sdkProcessingMetadata ? event.sdkProcessingMetadata.normalizeDepth : 'unset';
4017
- }
4018
- // prevent this data from being sent to sentry
4019
- // TODO: This is NOT part of the hack - DO NOT DELETE
4020
- delete event.sdkProcessingMetadata;
4021
- var envelopeHeaders = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .dsnToString */ .R)(api.dsn) }));
4022
- var eventItem = [
4023
- {
4024
- type: eventType,
4025
- sample_rates: [{ id: samplingMethod, rate: sampleRate }],
4026
- },
4027
- event,
4028
- ];
4029
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .createEnvelope */ .Jd)(envelopeHeaders, [eventItem]);
4030
- }
4031
- /** Creates a SentryRequest from an event. */
4032
- function eventToSentryRequest(event, api) {
4033
- var sdkInfo = getSdkMetadataForEnvelopeHeader(api);
4034
- var eventType = event.type || 'event';
4035
- var useEnvelope = eventType === 'transaction' || !!api.tunnel;
4036
- var transactionSampling = (event.sdkProcessingMetadata || {}).transactionSampling;
4037
- var _a = transactionSampling || {}, samplingMethod = _a.method, sampleRate = _a.rate;
4038
- // TODO: Below is a temporary hack in order to debug a serialization error - see
4039
- // https://github.com/getsentry/sentry-javascript/issues/2809,
4040
- // https://github.com/getsentry/sentry-javascript/pull/4425, and
4041
- // https://github.com/getsentry/sentry-javascript/pull/4574.
4042
- //
4043
- // TL; DR: even though we normalize all events (which should prevent this), something is causing `JSON.stringify` to
4044
- // throw a circular reference error.
4045
- //
4046
- // When it's time to remove it:
4047
- // 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting
4048
- // `sdkProcessingMetadata`
4049
- // 2. Restore the original version of the request body, which is commented out
4050
- // 3. Search for either of the PR URLs above and pull out the companion hacks in the browser playwright tests and the
4051
- // baseClient tests in this package
4052
- enhanceEventWithSdkInfo(event, api.metadata.sdk);
4053
- event.tags = event.tags || {};
4054
- event.extra = event.extra || {};
4055
- // In theory, all events should be marked as having gone through normalization and so
4056
- // we should never set this tag/extra data
4057
- if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {
4058
- event.tags.skippedNormalization = true;
4059
- event.extra.normalizeDepth = event.sdkProcessingMetadata ? event.sdkProcessingMetadata.normalizeDepth : 'unset';
4060
- }
4061
- // prevent this data from being sent to sentry
4062
- // TODO: This is NOT part of the hack - DO NOT DELETE
4063
- delete event.sdkProcessingMetadata;
4064
- var body;
4065
- try {
4066
- // 99.9% of events should get through just fine - no change in behavior for them
4067
- body = JSON.stringify(event);
4068
- }
4069
- catch (err) {
4070
- // Record data about the error without replacing original event data, then force renormalization
4071
- event.tags.JSONStringifyError = true;
4072
- event.extra.JSONStringifyError = err;
4073
- try {
4074
- body = JSON.stringify((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .normalize */ .Fv)(event));
4075
- }
4076
- catch (newErr) {
4077
- // At this point even renormalization hasn't worked, meaning something about the event data has gone very wrong.
4078
- // Time to cut our losses and record only the new error. With luck, even in the problematic cases we're trying to
4079
- // debug with this hack, we won't ever land here.
4080
- var innerErr = newErr;
4081
- body = JSON.stringify({
4082
- message: 'JSON.stringify error after renormalization',
4083
- // setting `extra: { innerErr }` here for some reason results in an empty object, so unpack manually
4084
- extra: { message: innerErr.message, stack: innerErr.stack },
4085
- });
4086
- }
4087
- }
4088
- var req = {
4089
- // this is the relevant line of code before the hack was added, to make it easy to undo said hack once we've solved
4090
- // the mystery
4091
- // body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),
4092
- body: body,
4093
- type: eventType,
4094
- url: useEnvelope
4095
- ? (0,_api__WEBPACK_IMPORTED_MODULE_3__/* .getEnvelopeEndpointWithUrlEncodedAuth */ .Ut)(api.dsn, api.tunnel)
4096
- : (0,_api__WEBPACK_IMPORTED_MODULE_3__/* .getStoreEndpointWithUrlEncodedAuth */ .qi)(api.dsn),
4097
- };
4098
- // https://develop.sentry.dev/sdk/envelopes/
4099
- // Since we don't need to manipulate envelopes nor store them, there is no
4100
- // exported concept of an Envelope with operations including serialization and
4101
- // deserialization. Instead, we only implement a minimal subset of the spec to
4102
- // serialize events inline here.
4103
- if (useEnvelope) {
4104
- var envelopeHeaders = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .dsnToString */ .R)(api.dsn) }));
4105
- var eventItem = [
4106
- {
4107
- type: eventType,
4108
- sample_rates: [{ id: samplingMethod, rate: sampleRate }],
4109
- },
4110
- req.body,
4111
- ];
4112
- var envelope = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .createEnvelope */ .Jd)(envelopeHeaders, [eventItem]);
4113
- req.body = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .serializeEnvelope */ .V$)(envelope);
4114
- }
4115
- return req;
4116
- }
4117
- //# sourceMappingURL=request.js.map
4118
-
4119
- /***/ }),
4120
-
4121
- /***/ 6853:
4122
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4123
-
4124
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4125
- /* harmony export */ "M": function() { return /* binding */ initAndBind; }
4126
- /* harmony export */ });
4127
- /* harmony import */ var _sentry_hub__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8585);
4128
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8536);
4129
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(428);
4130
-
4131
-
4132
-
4133
- /**
4134
- * Internal function to create a new SDK client instance. The client is
4135
- * installed and then bound to the current scope.
4136
- *
4137
- * @param clientClass The client class to instantiate.
4138
- * @param options Options to pass to the client.
4139
- */
4140
- function initAndBind(clientClass, options) {
4141
- if (options.debug === true) {
4142
- if (_flags__WEBPACK_IMPORTED_MODULE_0__/* .IS_DEBUG_BUILD */ .h) {
4143
- _sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .logger.enable */ .kg.enable();
4144
- }
4145
- else {
4146
- // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped
4147
- // eslint-disable-next-line no-console
4148
- console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');
4149
- }
4150
- }
4151
- var hub = (0,_sentry_hub__WEBPACK_IMPORTED_MODULE_2__/* .getCurrentHub */ .Gd)();
4152
- var scope = hub.getScope();
4153
- if (scope) {
4154
- scope.update(options.initialScope);
4155
- }
4156
- var client = new clientClass(options);
4157
- hub.bindClient(client);
4158
- }
4159
- //# sourceMappingURL=sdk.js.map
4160
-
4161
- /***/ }),
4162
-
4163
- /***/ 1518:
4164
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4165
-
4166
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4167
- /* harmony export */ "qv": function() { return /* binding */ createTransport; }
4168
- /* harmony export */ });
4169
- /* unused harmony exports ERROR_TRANSPORT_CATEGORY, TRANSACTION_TRANSPORT_CATEGORY, ATTACHMENT_TRANSPORT_CATEGORY, SESSION_TRANSPORT_CATEGORY, DEFAULT_TRANSPORT_BUFFER_SIZE */
4170
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8963);
4171
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6894);
4172
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1630);
4173
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7946);
4174
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8886);
4175
-
4176
- var ERROR_TRANSPORT_CATEGORY = 'error';
4177
- var TRANSACTION_TRANSPORT_CATEGORY = 'transaction';
4178
- var ATTACHMENT_TRANSPORT_CATEGORY = 'attachment';
4179
- var SESSION_TRANSPORT_CATEGORY = 'session';
4180
- var DEFAULT_TRANSPORT_BUFFER_SIZE = 30;
4181
- /**
4182
- * Creates a `NewTransport`
4183
- *
4184
- * @param options
4185
- * @param makeRequest
4186
- */
4187
- function createTransport(options, makeRequest, buffer) {
4188
- if (buffer === void 0) { buffer = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .makePromiseBuffer */ .x)(options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE); }
4189
- var rateLimits = {};
4190
- var flush = function (timeout) { return buffer.drain(timeout); };
4191
- function send(envelope) {
4192
- var envCategory = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .getEnvelopeType */ .y7)(envelope);
4193
- var category = envCategory === 'event' ? 'error' : envCategory;
4194
- var request = {
4195
- category: category,
4196
- body: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .serializeEnvelope */ .V$)(envelope),
4197
- };
4198
- // Don't add to buffer if transport is already rate-limited
4199
- if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .isRateLimited */ .Q)(rateLimits, category)) {
4200
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .rejectedSyncPromise */ .$2)({
4201
- status: 'rate_limit',
4202
- reason: getRateLimitReason(rateLimits, category),
4203
- });
4204
- }
4205
- var requestTask = function () {
4206
- return makeRequest(request).then(function (_a) {
4207
- var body = _a.body, headers = _a.headers, reason = _a.reason, statusCode = _a.statusCode;
4208
- var status = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .eventStatusFromHttpCode */ .F)(statusCode);
4209
- if (headers) {
4210
- rateLimits = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .updateRateLimits */ .WG)(rateLimits, headers);
4211
- }
4212
- if (status === 'success') {
4213
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .resolvedSyncPromise */ .WD)({ status: status, reason: reason });
4214
- }
4215
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .rejectedSyncPromise */ .$2)({
4216
- status: status,
4217
- reason: reason ||
4218
- body ||
4219
- (status === 'rate_limit' ? getRateLimitReason(rateLimits, category) : 'Unknown transport error'),
4220
- });
4221
- });
4222
- };
4223
- return buffer.add(requestTask);
4224
- }
4225
- return {
4226
- send: send,
4227
- flush: flush,
4228
- };
4229
- }
4230
- function getRateLimitReason(rateLimits, category) {
4231
- return "Too many " + category + " requests, backing off until: " + new Date((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .disabledUntil */ .ns)(rateLimits, category)).toISOString();
4232
- }
4233
- //# sourceMappingURL=base.js.map
4234
-
4235
- /***/ }),
4236
-
4237
- /***/ 3926:
4238
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4239
-
4240
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4241
- /* harmony export */ "V": function() { return /* binding */ NoopTransport; }
4242
- /* harmony export */ });
4243
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7946);
4244
-
4245
- /** Noop transport */
4246
- var NoopTransport = /** @class */ (function () {
4247
- function NoopTransport() {
4248
- }
4249
- /**
4250
- * @inheritDoc
4251
- */
4252
- NoopTransport.prototype.sendEvent = function (_) {
4253
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .resolvedSyncPromise */ .WD)({
4254
- reason: 'NoopTransport: Event has been skipped because no Dsn is configured.',
4255
- status: 'skipped',
4256
- });
4257
- };
4258
- /**
4259
- * @inheritDoc
4260
- */
4261
- NoopTransport.prototype.close = function (_) {
4262
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .resolvedSyncPromise */ .WD)(true);
4263
- };
4264
- return NoopTransport;
4265
- }());
4266
-
4267
- //# sourceMappingURL=noop.js.map
4268
-
4269
- /***/ }),
4270
-
4271
- /***/ 1476:
4272
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4273
-
4274
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4275
- /* harmony export */ "J": function() { return /* binding */ SDK_VERSION; }
4276
- /* harmony export */ });
4277
- var SDK_VERSION = '6.19.6';
4278
- //# sourceMappingURL=version.js.map
4279
-
4280
- /***/ }),
4281
-
4282
- /***/ 5733:
4283
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4284
-
4285
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4286
- /* harmony export */ "pi": function() { return /* binding */ __assign; },
4287
- /* harmony export */ "XA": function() { return /* binding */ __values; },
4288
- /* harmony export */ "CR": function() { return /* binding */ __read; },
4289
- /* harmony export */ "fl": function() { return /* binding */ __spread; }
4290
- /* harmony export */ });
4291
- /* unused harmony exports __extends, __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet */
4292
- /*! *****************************************************************************
4293
- Copyright (c) Microsoft Corporation.
4294
-
4295
- Permission to use, copy, modify, and/or distribute this software for any
4296
- purpose with or without fee is hereby granted.
4297
-
4298
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
4299
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
4300
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
4301
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
4302
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
4303
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
4304
- PERFORMANCE OF THIS SOFTWARE.
4305
- ***************************************************************************** */
4306
- /* global Reflect, Promise */
4307
-
4308
- var extendStatics = function(d, b) {
4309
- extendStatics = Object.setPrototypeOf ||
4310
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
4311
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
4312
- return extendStatics(d, b);
4313
- };
4314
-
4315
- function __extends(d, b) {
4316
- extendStatics(d, b);
4317
- function __() { this.constructor = d; }
4318
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
4319
- }
4320
-
4321
- var __assign = function() {
4322
- __assign = Object.assign || function __assign(t) {
4323
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4324
- s = arguments[i];
4325
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
4326
- }
4327
- return t;
4328
- }
4329
- return __assign.apply(this, arguments);
4330
- }
4331
-
4332
- function __rest(s, e) {
4333
- var t = {};
4334
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4335
- t[p] = s[p];
4336
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
4337
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
4338
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
4339
- t[p[i]] = s[p[i]];
4340
- }
4341
- return t;
4342
- }
4343
-
4344
- function __decorate(decorators, target, key, desc) {
4345
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4346
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4347
- 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;
4348
- return c > 3 && r && Object.defineProperty(target, key, r), r;
4349
- }
4350
-
4351
- function __param(paramIndex, decorator) {
4352
- return function (target, key) { decorator(target, key, paramIndex); }
4353
- }
4354
-
4355
- function __metadata(metadataKey, metadataValue) {
4356
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
4357
- }
4358
-
4359
- function __awaiter(thisArg, _arguments, P, generator) {
4360
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4361
- return new (P || (P = Promise))(function (resolve, reject) {
4362
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
4363
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
4364
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
4365
- step((generator = generator.apply(thisArg, _arguments || [])).next());
4366
- });
4367
- }
4368
-
4369
- function __generator(thisArg, body) {
4370
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
4371
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
4372
- function verb(n) { return function (v) { return step([n, v]); }; }
4373
- function step(op) {
4374
- if (f) throw new TypeError("Generator is already executing.");
4375
- while (_) try {
4376
- 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;
4377
- if (y = 0, t) op = [op[0] & 2, t.value];
4378
- switch (op[0]) {
4379
- case 0: case 1: t = op; break;
4380
- case 4: _.label++; return { value: op[1], done: false };
4381
- case 5: _.label++; y = op[1]; op = [0]; continue;
4382
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
4383
- default:
4384
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
4385
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
4386
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
4387
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
4388
- if (t[2]) _.ops.pop();
4389
- _.trys.pop(); continue;
4390
- }
4391
- op = body.call(thisArg, _);
4392
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
4393
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
4394
- }
4395
- }
4396
-
4397
- function __createBinding(o, m, k, k2) {
4398
- if (k2 === undefined) k2 = k;
4399
- o[k2] = m[k];
4400
- }
4401
-
4402
- function __exportStar(m, exports) {
4403
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
4404
- }
4405
-
4406
- function __values(o) {
4407
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
4408
- if (m) return m.call(o);
4409
- if (o && typeof o.length === "number") return {
4410
- next: function () {
4411
- if (o && i >= o.length) o = void 0;
4412
- return { value: o && o[i++], done: !o };
4413
- }
4414
- };
4415
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
4416
- }
4417
-
4418
- function __read(o, n) {
4419
- var m = typeof Symbol === "function" && o[Symbol.iterator];
4420
- if (!m) return o;
4421
- var i = m.call(o), r, ar = [], e;
4422
- try {
4423
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
4424
- }
4425
- catch (error) { e = { error: error }; }
4426
- finally {
4427
- try {
4428
- if (r && !r.done && (m = i["return"])) m.call(i);
4429
- }
4430
- finally { if (e) throw e.error; }
4431
- }
4432
- return ar;
4433
- }
4434
-
4435
- function __spread() {
4436
- for (var ar = [], i = 0; i < arguments.length; i++)
4437
- ar = ar.concat(__read(arguments[i]));
4438
- return ar;
4439
- }
4440
-
4441
- function __spreadArrays() {
4442
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
4443
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
4444
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
4445
- r[k] = a[j];
4446
- return r;
4447
- };
4448
-
4449
- function __await(v) {
4450
- return this instanceof __await ? (this.v = v, this) : new __await(v);
4451
- }
4452
-
4453
- function __asyncGenerator(thisArg, _arguments, generator) {
4454
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
4455
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
4456
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
4457
- 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); }); }; }
4458
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
4459
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
4460
- function fulfill(value) { resume("next", value); }
4461
- function reject(value) { resume("throw", value); }
4462
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
4463
- }
4464
-
4465
- function __asyncDelegator(o) {
4466
- var i, p;
4467
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
4468
- 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; }
4469
- }
4470
-
4471
- function __asyncValues(o) {
4472
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
4473
- var m = o[Symbol.asyncIterator], i;
4474
- 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);
4475
- 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); }); }; }
4476
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
4477
- }
4478
-
4479
- function __makeTemplateObject(cooked, raw) {
4480
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4481
- return cooked;
4482
- };
4483
-
4484
- function __importStar(mod) {
4485
- if (mod && mod.__esModule) return mod;
4486
- var result = {};
4487
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
4488
- result.default = mod;
4489
- return result;
4490
- }
4491
-
4492
- function __importDefault(mod) {
4493
- return (mod && mod.__esModule) ? mod : { default: mod };
4494
- }
4495
-
4496
- function __classPrivateFieldGet(receiver, privateMap) {
4497
- if (!privateMap.has(receiver)) {
4498
- throw new TypeError("attempted to get private field on non-instance");
4499
- }
4500
- return privateMap.get(receiver);
4501
- }
4502
-
4503
- function __classPrivateFieldSet(receiver, privateMap, value) {
4504
- if (!privateMap.has(receiver)) {
4505
- throw new TypeError("attempted to set private field on non-instance");
4506
- }
4507
- privateMap.set(receiver, value);
4508
- return value;
4509
- }
4510
-
4511
-
4512
- /***/ }),
4513
-
4514
- /***/ 1299:
4515
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4516
-
4517
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4518
- /* harmony export */ "h": function() { return /* binding */ IS_DEBUG_BUILD; }
4519
- /* harmony export */ });
4520
- /*
4521
- * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking
4522
- * for users.
4523
- *
4524
- * Debug flags need to be declared in each package individually and must not be imported across package boundaries,
4525
- * because some build tools have trouble tree-shaking imported guards.
4526
- *
4527
- * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.
4528
- *
4529
- * Debug flag files will contain "magic strings" like `__SENTRY_DEBUG__` that may get replaced with actual values during
4530
- * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not
4531
- * replaced.
4532
- */
4533
- /** Flag that is true for debug builds, false otherwise. */
4534
- var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;
4535
- //# sourceMappingURL=flags.js.map
4536
-
4537
- /***/ }),
4538
-
4539
- /***/ 8585:
4540
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4541
-
4542
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4543
- /* harmony export */ "Gd": function() { return /* binding */ getCurrentHub; }
4544
- /* harmony export */ });
4545
- /* unused harmony exports API_VERSION, Hub, getMainCarrier, makeMain, getActiveDomain, getHubFromCarrier, setHubOnCarrier */
4546
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8773);
4547
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3699);
4548
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7790);
4549
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8536);
4550
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(5907);
4551
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(7392);
4552
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1299);
4553
- /* harmony import */ var _scope__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1684);
4554
- /* harmony import */ var _session__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(2430);
4555
-
4556
-
4557
-
4558
-
4559
-
4560
- /**
4561
- * API compatibility version of this hub.
4562
- *
4563
- * WARNING: This number should only be increased when the global interface
4564
- * changes and new methods are introduced.
4565
- *
4566
- * @hidden
4567
- */
4568
- var API_VERSION = 4;
4569
- /**
4570
- * Default maximum number of breadcrumbs added to an event. Can be overwritten
4571
- * with {@link Options.maxBreadcrumbs}.
4572
- */
4573
- var DEFAULT_BREADCRUMBS = 100;
4574
- /**
4575
- * @inheritDoc
4576
- */
4577
- var Hub = /** @class */ (function () {
4578
- /**
4579
- * Creates a new instance of the hub, will push one {@link Layer} into the
4580
- * internal stack on creation.
4581
- *
4582
- * @param client bound to the hub.
4583
- * @param scope bound to the hub.
4584
- * @param version number, higher number means higher priority.
4585
- */
4586
- function Hub(client, scope, _version) {
4587
- if (scope === void 0) { scope = new _scope__WEBPACK_IMPORTED_MODULE_0__/* .Scope */ .s(); }
4588
- if (_version === void 0) { _version = API_VERSION; }
4589
- this._version = _version;
4590
- /** Is a {@link Layer}[] containing the client and scope */
4591
- this._stack = [{}];
4592
- this.getStackTop().scope = scope;
4593
- if (client) {
4594
- this.bindClient(client);
4595
- }
4596
- }
4597
- /**
4598
- * @inheritDoc
4599
- */
4600
- Hub.prototype.isOlderThan = function (version) {
4601
- return this._version < version;
4602
- };
4603
- /**
4604
- * @inheritDoc
4605
- */
4606
- Hub.prototype.bindClient = function (client) {
4607
- var top = this.getStackTop();
4608
- top.client = client;
4609
- if (client && client.setupIntegrations) {
4610
- client.setupIntegrations();
4611
- }
4612
- };
4613
- /**
4614
- * @inheritDoc
4615
- */
4616
- Hub.prototype.pushScope = function () {
4617
- // We want to clone the content of prev scope
4618
- var scope = _scope__WEBPACK_IMPORTED_MODULE_0__/* .Scope.clone */ .s.clone(this.getScope());
4619
- this.getStack().push({
4620
- client: this.getClient(),
4621
- scope: scope,
4622
- });
4623
- return scope;
4624
- };
4625
- /**
4626
- * @inheritDoc
4627
- */
4628
- Hub.prototype.popScope = function () {
4629
- if (this.getStack().length <= 1)
4630
- return false;
4631
- return !!this.getStack().pop();
4632
- };
4633
- /**
4634
- * @inheritDoc
4635
- */
4636
- Hub.prototype.withScope = function (callback) {
4637
- var scope = this.pushScope();
4638
- try {
4639
- callback(scope);
4640
- }
4641
- finally {
4642
- this.popScope();
4643
- }
4644
- };
4645
- /**
4646
- * @inheritDoc
4647
- */
4648
- Hub.prototype.getClient = function () {
4649
- return this.getStackTop().client;
4650
- };
4651
- /** Returns the scope of the top stack. */
4652
- Hub.prototype.getScope = function () {
4653
- return this.getStackTop().scope;
4654
- };
4655
- /** Returns the scope stack for domains or the process. */
4656
- Hub.prototype.getStack = function () {
4657
- return this._stack;
4658
- };
4659
- /** Returns the topmost scope layer in the order domain > local > process. */
4660
- Hub.prototype.getStackTop = function () {
4661
- return this._stack[this._stack.length - 1];
4662
- };
4663
- /**
4664
- * @inheritDoc
4665
- */
4666
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
4667
- Hub.prototype.captureException = function (exception, hint) {
4668
- var eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .uuid4 */ .DM)());
4669
- var finalHint = hint;
4670
- // If there's no explicit hint provided, mimic the same thing that would happen
4671
- // in the minimal itself to create a consistent behavior.
4672
- // We don't do this in the client, as it's the lowest level API, and doing this,
4673
- // would prevent user from having full control over direct calls.
4674
- if (!hint) {
4675
- var syntheticException = void 0;
4676
- try {
4677
- throw new Error('Sentry syntheticException');
4678
- }
4679
- catch (exception) {
4680
- syntheticException = exception;
4681
- }
4682
- finalHint = {
4683
- originalException: exception,
4684
- syntheticException: syntheticException,
4685
- };
4686
- }
4687
- this._invokeClient('captureException', exception, (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)({}, finalHint), { event_id: eventId }));
4688
- return eventId;
4689
- };
4690
- /**
4691
- * @inheritDoc
4692
- */
4693
- Hub.prototype.captureMessage = function (message, level, hint) {
4694
- var eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .uuid4 */ .DM)());
4695
- var finalHint = hint;
4696
- // If there's no explicit hint provided, mimic the same thing that would happen
4697
- // in the minimal itself to create a consistent behavior.
4698
- // We don't do this in the client, as it's the lowest level API, and doing this,
4699
- // would prevent user from having full control over direct calls.
4700
- if (!hint) {
4701
- var syntheticException = void 0;
4702
- try {
4703
- throw new Error(message);
4704
- }
4705
- catch (exception) {
4706
- syntheticException = exception;
4707
- }
4708
- finalHint = {
4709
- originalException: message,
4710
- syntheticException: syntheticException,
4711
- };
4712
- }
4713
- this._invokeClient('captureMessage', message, level, (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)({}, finalHint), { event_id: eventId }));
4714
- return eventId;
4715
- };
4716
- /**
4717
- * @inheritDoc
4718
- */
4719
- Hub.prototype.captureEvent = function (event, hint) {
4720
- var eventId = hint && hint.event_id ? hint.event_id : (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .uuid4 */ .DM)();
4721
- if (event.type !== 'transaction') {
4722
- this._lastEventId = eventId;
4723
- }
4724
- this._invokeClient('captureEvent', event, (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)({}, hint), { event_id: eventId }));
4725
- return eventId;
4726
- };
4727
- /**
4728
- * @inheritDoc
4729
- */
4730
- Hub.prototype.lastEventId = function () {
4731
- return this._lastEventId;
4732
- };
4733
- /**
4734
- * @inheritDoc
4735
- */
4736
- Hub.prototype.addBreadcrumb = function (breadcrumb, hint) {
4737
- var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
4738
- if (!scope || !client)
4739
- return;
4740
- // eslint-disable-next-line @typescript-eslint/unbound-method
4741
- var _b = (client.getOptions && client.getOptions()) || {}, _c = _b.beforeBreadcrumb, beforeBreadcrumb = _c === void 0 ? null : _c, _d = _b.maxBreadcrumbs, maxBreadcrumbs = _d === void 0 ? DEFAULT_BREADCRUMBS : _d;
4742
- if (maxBreadcrumbs <= 0)
4743
- return;
4744
- var timestamp = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .dateTimestampInSeconds */ .yW)();
4745
- var mergedBreadcrumb = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)({ timestamp: timestamp }, breadcrumb);
4746
- var finalBreadcrumb = beforeBreadcrumb
4747
- ? (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .consoleSandbox */ .Cf)(function () { return beforeBreadcrumb(mergedBreadcrumb, hint); })
4748
- : mergedBreadcrumb;
4749
- if (finalBreadcrumb === null)
4750
- return;
4751
- scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);
4752
- };
4753
- /**
4754
- * @inheritDoc
4755
- */
4756
- Hub.prototype.setUser = function (user) {
4757
- var scope = this.getScope();
4758
- if (scope)
4759
- scope.setUser(user);
4760
- };
4761
- /**
4762
- * @inheritDoc
4763
- */
4764
- Hub.prototype.setTags = function (tags) {
4765
- var scope = this.getScope();
4766
- if (scope)
4767
- scope.setTags(tags);
4768
- };
4769
- /**
4770
- * @inheritDoc
4771
- */
4772
- Hub.prototype.setExtras = function (extras) {
4773
- var scope = this.getScope();
4774
- if (scope)
4775
- scope.setExtras(extras);
4776
- };
4777
- /**
4778
- * @inheritDoc
4779
- */
4780
- Hub.prototype.setTag = function (key, value) {
4781
- var scope = this.getScope();
4782
- if (scope)
4783
- scope.setTag(key, value);
4784
- };
4785
- /**
4786
- * @inheritDoc
4787
- */
4788
- Hub.prototype.setExtra = function (key, extra) {
4789
- var scope = this.getScope();
4790
- if (scope)
4791
- scope.setExtra(key, extra);
4792
- };
4793
- /**
4794
- * @inheritDoc
4795
- */
4796
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4797
- Hub.prototype.setContext = function (name, context) {
4798
- var scope = this.getScope();
4799
- if (scope)
4800
- scope.setContext(name, context);
4801
- };
4802
- /**
4803
- * @inheritDoc
4804
- */
4805
- Hub.prototype.configureScope = function (callback) {
4806
- var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
4807
- if (scope && client) {
4808
- callback(scope);
4809
- }
4810
- };
4811
- /**
4812
- * @inheritDoc
4813
- */
4814
- Hub.prototype.run = function (callback) {
4815
- var oldHub = makeMain(this);
4816
- try {
4817
- callback(this);
4818
- }
4819
- finally {
4820
- makeMain(oldHub);
4821
- }
4822
- };
4823
- /**
4824
- * @inheritDoc
4825
- */
4826
- Hub.prototype.getIntegration = function (integration) {
4827
- var client = this.getClient();
4828
- if (!client)
4829
- return null;
4830
- try {
4831
- return client.getIntegration(integration);
4832
- }
4833
- catch (_oO) {
4834
- _flags__WEBPACK_IMPORTED_MODULE_5__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.warn */ .kg.warn("Cannot retrieve integration " + integration.id + " from the current Hub");
4835
- return null;
4836
- }
4837
- };
4838
- /**
4839
- * @inheritDoc
4840
- */
4841
- Hub.prototype.startSpan = function (context) {
4842
- return this._callExtensionMethod('startSpan', context);
4843
- };
4844
- /**
4845
- * @inheritDoc
4846
- */
4847
- Hub.prototype.startTransaction = function (context, customSamplingContext) {
4848
- return this._callExtensionMethod('startTransaction', context, customSamplingContext);
4849
- };
4850
- /**
4851
- * @inheritDoc
4852
- */
4853
- Hub.prototype.traceHeaders = function () {
4854
- return this._callExtensionMethod('traceHeaders');
4855
- };
4856
- /**
4857
- * @inheritDoc
4858
- */
4859
- Hub.prototype.captureSession = function (endSession) {
4860
- if (endSession === void 0) { endSession = false; }
4861
- // both send the update and pull the session from the scope
4862
- if (endSession) {
4863
- return this.endSession();
4864
- }
4865
- // only send the update
4866
- this._sendSessionUpdate();
4867
- };
4868
- /**
4869
- * @inheritDoc
4870
- */
4871
- Hub.prototype.endSession = function () {
4872
- var layer = this.getStackTop();
4873
- var scope = layer && layer.scope;
4874
- var session = scope && scope.getSession();
4875
- if (session) {
4876
- session.close();
4877
- }
4878
- this._sendSessionUpdate();
4879
- // the session is over; take it off of the scope
4880
- if (scope) {
4881
- scope.setSession();
4882
- }
4883
- };
4884
- /**
4885
- * @inheritDoc
4886
- */
4887
- Hub.prototype.startSession = function (context) {
4888
- var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
4889
- var _b = (client && client.getOptions()) || {}, release = _b.release, environment = _b.environment;
4890
- // Will fetch userAgent if called from browser sdk
4891
- var global = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .getGlobalObject */ .R)();
4892
- var userAgent = (global.navigator || {}).userAgent;
4893
- var session = new _session__WEBPACK_IMPORTED_MODULE_7__/* .Session */ .z((0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__assign */ .pi)({ release: release,
4894
- environment: environment }, (scope && { user: scope.getUser() })), (userAgent && { userAgent: userAgent })), context));
4895
- if (scope) {
4896
- // End existing session if there's one
4897
- var currentSession = scope.getSession && scope.getSession();
4898
- if (currentSession && currentSession.status === 'ok') {
4899
- currentSession.update({ status: 'exited' });
4900
- }
4901
- this.endSession();
4902
- // Afterwards we set the new session on the scope
4903
- scope.setSession(session);
4904
- }
4905
- return session;
4906
- };
4907
- /**
4908
- * Sends the current Session on the scope
4909
- */
4910
- Hub.prototype._sendSessionUpdate = function () {
4911
- var _a = this.getStackTop(), scope = _a.scope, client = _a.client;
4912
- if (!scope)
4913
- return;
4914
- var session = scope.getSession && scope.getSession();
4915
- if (session) {
4916
- if (client && client.captureSession) {
4917
- client.captureSession(session);
4918
- }
4919
- }
4920
- };
4921
- /**
4922
- * Internal helper function to call a method on the top client if it exists.
4923
- *
4924
- * @param method The method to call on the client.
4925
- * @param args Arguments to pass to the client function.
4926
- */
4927
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4928
- Hub.prototype._invokeClient = function (method) {
4929
- var _a;
4930
- var args = [];
4931
- for (var _i = 1; _i < arguments.length; _i++) {
4932
- args[_i - 1] = arguments[_i];
4933
- }
4934
- var _b = this.getStackTop(), scope = _b.scope, client = _b.client;
4935
- if (client && client[method]) {
4936
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
4937
- (_a = client)[method].apply(_a, (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__spread */ .fl)(args, [scope]));
4938
- }
4939
- };
4940
- /**
4941
- * Calls global extension method and binding current instance to the function call
4942
- */
4943
- // @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)
4944
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
4945
- Hub.prototype._callExtensionMethod = function (method) {
4946
- var args = [];
4947
- for (var _i = 1; _i < arguments.length; _i++) {
4948
- args[_i - 1] = arguments[_i];
4949
- }
4950
- var carrier = getMainCarrier();
4951
- var sentry = carrier.__SENTRY__;
4952
- if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {
4953
- return sentry.extensions[method].apply(this, args);
4954
- }
4955
- _flags__WEBPACK_IMPORTED_MODULE_5__/* .IS_DEBUG_BUILD */ .h && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.warn */ .kg.warn("Extension method " + method + " couldn't be found, doing nothing.");
4956
- };
4957
- return Hub;
4958
- }());
4959
-
4960
- /**
4961
- * Returns the global shim registry.
4962
- *
4963
- * FIXME: This function is problematic, because despite always returning a valid Carrier,
4964
- * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check
4965
- * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.
4966
- **/
4967
- function getMainCarrier() {
4968
- var carrier = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .getGlobalObject */ .R)();
4969
- carrier.__SENTRY__ = carrier.__SENTRY__ || {
4970
- extensions: {},
4971
- hub: undefined,
4972
- };
4973
- return carrier;
4974
- }
4975
- /**
4976
- * Replaces the current main hub with the passed one on the global object
4977
- *
4978
- * @returns The old replaced hub
4979
- */
4980
- function makeMain(hub) {
4981
- var registry = getMainCarrier();
4982
- var oldHub = getHubFromCarrier(registry);
4983
- setHubOnCarrier(registry, hub);
4984
- return oldHub;
4985
- }
4986
- /**
4987
- * Returns the default hub instance.
4988
- *
4989
- * If a hub is already registered in the global carrier but this module
4990
- * contains a more recent version, it replaces the registered version.
4991
- * Otherwise, the currently registered hub will be returned.
4992
- */
4993
- function getCurrentHub() {
4994
- // Get main carrier (global for every environment)
4995
- var registry = getMainCarrier();
4996
- // If there's no hub, or its an old API, assign a new one
4997
- if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {
4998
- setHubOnCarrier(registry, new Hub());
4999
- }
5000
- // Prefer domains over global if they are there (applicable only to Node environment)
5001
- if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_8__/* .isNodeEnv */ .KV)()) {
5002
- return getHubFromActiveDomain(registry);
5003
- }
5004
- // Return hub that lives on a global object
5005
- return getHubFromCarrier(registry);
5006
- }
5007
- /**
5008
- * Returns the active domain, if one exists
5009
- * @deprecated No longer used; remove in v7
5010
- * @returns The domain, or undefined if there is no active domain
5011
- */
5012
- // eslint-disable-next-line deprecation/deprecation
5013
- function getActiveDomain() {
5014
- IS_DEBUG_BUILD && logger.warn('Function `getActiveDomain` is deprecated and will be removed in a future version.');
5015
- var sentry = getMainCarrier().__SENTRY__;
5016
- return sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;
5017
- }
5018
- /**
5019
- * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist
5020
- * @returns discovered hub
5021
- */
5022
- function getHubFromActiveDomain(registry) {
5023
- try {
5024
- var sentry = getMainCarrier().__SENTRY__;
5025
- var activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;
5026
- // If there's no active domain, just return global hub
5027
- if (!activeDomain) {
5028
- return getHubFromCarrier(registry);
5029
- }
5030
- // If there's no hub on current domain, or it's an old API, assign a new one
5031
- if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {
5032
- var registryHubTopStack = getHubFromCarrier(registry).getStackTop();
5033
- setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, _scope__WEBPACK_IMPORTED_MODULE_0__/* .Scope.clone */ .s.clone(registryHubTopStack.scope)));
5034
- }
5035
- // Return hub that lives on a domain
5036
- return getHubFromCarrier(activeDomain);
5037
- }
5038
- catch (_Oo) {
5039
- // Return hub that lives on a global object
5040
- return getHubFromCarrier(registry);
5041
- }
5042
- }
5043
- /**
5044
- * This will tell whether a carrier has a hub on it or not
5045
- * @param carrier object
5046
- */
5047
- function hasHubOnCarrier(carrier) {
5048
- return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);
5049
- }
5050
- /**
5051
- * This will create a new {@link Hub} and add to the passed object on
5052
- * __SENTRY__.hub.
5053
- * @param carrier object
5054
- * @hidden
5055
- */
5056
- function getHubFromCarrier(carrier) {
5057
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .getGlobalSingleton */ .Y)('hub', function () { return new Hub(); }, carrier);
5058
- }
5059
- /**
5060
- * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute
5061
- * @param carrier object
5062
- * @param hub Hub
5063
- * @returns A boolean indicating success or failure
5064
- */
5065
- function setHubOnCarrier(carrier, hub) {
5066
- if (!carrier)
5067
- return false;
5068
- var __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});
5069
- __SENTRY__.hub = hub;
5070
- return true;
5071
- }
5072
- //# sourceMappingURL=hub.js.map
5073
-
5074
- /***/ }),
5075
-
5076
- /***/ 1684:
5077
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5078
-
5079
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5080
- /* harmony export */ "s": function() { return /* binding */ Scope; },
5081
- /* harmony export */ "c": function() { return /* binding */ addGlobalEventProcessor; }
5082
- /* harmony export */ });
5083
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8773);
5084
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1757);
5085
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7790);
5086
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7946);
5087
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(5907);
5088
-
5089
-
5090
- /**
5091
- * Absolute maximum number of breadcrumbs added to an event.
5092
- * The `maxBreadcrumbs` option cannot be higher than this value.
5093
- */
5094
- var MAX_BREADCRUMBS = 100;
5095
- /**
5096
- * Holds additional event information. {@link Scope.applyToEvent} will be
5097
- * called by the client before an event will be sent.
5098
- */
5099
- var Scope = /** @class */ (function () {
5100
- function Scope() {
5101
- /** Flag if notifying is happening. */
5102
- this._notifyingListeners = false;
5103
- /** Callback for client to receive scope changes. */
5104
- this._scopeListeners = [];
5105
- /** Callback list that will be called after {@link applyToEvent}. */
5106
- this._eventProcessors = [];
5107
- /** Array of breadcrumbs. */
5108
- this._breadcrumbs = [];
5109
- /** User */
5110
- this._user = {};
5111
- /** Tags */
5112
- this._tags = {};
5113
- /** Extra */
5114
- this._extra = {};
5115
- /** Contexts */
5116
- this._contexts = {};
5117
- /**
5118
- * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
5119
- * sent to Sentry
5120
- */
5121
- this._sdkProcessingMetadata = {};
5122
- }
5123
- /**
5124
- * Inherit values from the parent scope.
5125
- * @param scope to clone.
5126
- */
5127
- Scope.clone = function (scope) {
5128
- var newScope = new Scope();
5129
- if (scope) {
5130
- newScope._breadcrumbs = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)(scope._breadcrumbs);
5131
- newScope._tags = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, scope._tags);
5132
- newScope._extra = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, scope._extra);
5133
- newScope._contexts = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, scope._contexts);
5134
- newScope._user = scope._user;
5135
- newScope._level = scope._level;
5136
- newScope._span = scope._span;
5137
- newScope._session = scope._session;
5138
- newScope._transactionName = scope._transactionName;
5139
- newScope._fingerprint = scope._fingerprint;
5140
- newScope._eventProcessors = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)(scope._eventProcessors);
5141
- newScope._requestSession = scope._requestSession;
5142
- }
5143
- return newScope;
5144
- };
5145
- /**
5146
- * Add internal on change listener. Used for sub SDKs that need to store the scope.
5147
- * @hidden
5148
- */
5149
- Scope.prototype.addScopeListener = function (callback) {
5150
- this._scopeListeners.push(callback);
5151
- };
5152
- /**
5153
- * @inheritDoc
5154
- */
5155
- Scope.prototype.addEventProcessor = function (callback) {
5156
- this._eventProcessors.push(callback);
5157
- return this;
5158
- };
5159
- /**
5160
- * @inheritDoc
5161
- */
5162
- Scope.prototype.setUser = function (user) {
5163
- this._user = user || {};
5164
- if (this._session) {
5165
- this._session.update({ user: user });
5166
- }
5167
- this._notifyScopeListeners();
5168
- return this;
5169
- };
5170
- /**
5171
- * @inheritDoc
5172
- */
5173
- Scope.prototype.getUser = function () {
5174
- return this._user;
5175
- };
5176
- /**
5177
- * @inheritDoc
5178
- */
5179
- Scope.prototype.getRequestSession = function () {
5180
- return this._requestSession;
5181
- };
5182
- /**
5183
- * @inheritDoc
5184
- */
5185
- Scope.prototype.setRequestSession = function (requestSession) {
5186
- this._requestSession = requestSession;
5187
- return this;
5188
- };
5189
- /**
5190
- * @inheritDoc
5191
- */
5192
- Scope.prototype.setTags = function (tags) {
5193
- this._tags = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._tags), tags);
5194
- this._notifyScopeListeners();
5195
- return this;
5196
- };
5197
- /**
5198
- * @inheritDoc
5199
- */
5200
- Scope.prototype.setTag = function (key, value) {
5201
- var _a;
5202
- this._tags = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._tags), (_a = {}, _a[key] = value, _a));
5203
- this._notifyScopeListeners();
5204
- return this;
5205
- };
5206
- /**
5207
- * @inheritDoc
5208
- */
5209
- Scope.prototype.setExtras = function (extras) {
5210
- this._extra = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._extra), extras);
5211
- this._notifyScopeListeners();
5212
- return this;
5213
- };
5214
- /**
5215
- * @inheritDoc
5216
- */
5217
- Scope.prototype.setExtra = function (key, extra) {
5218
- var _a;
5219
- this._extra = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._extra), (_a = {}, _a[key] = extra, _a));
5220
- this._notifyScopeListeners();
5221
- return this;
5222
- };
5223
- /**
5224
- * @inheritDoc
5225
- */
5226
- Scope.prototype.setFingerprint = function (fingerprint) {
5227
- this._fingerprint = fingerprint;
5228
- this._notifyScopeListeners();
5229
- return this;
5230
- };
5231
- /**
5232
- * @inheritDoc
5233
- */
5234
- Scope.prototype.setLevel = function (level) {
5235
- this._level = level;
5236
- this._notifyScopeListeners();
5237
- return this;
5238
- };
5239
- /**
5240
- * @inheritDoc
5241
- */
5242
- Scope.prototype.setTransactionName = function (name) {
5243
- this._transactionName = name;
5244
- this._notifyScopeListeners();
5245
- return this;
5246
- };
5247
- /**
5248
- * Can be removed in major version.
5249
- * @deprecated in favor of {@link this.setTransactionName}
5250
- */
5251
- Scope.prototype.setTransaction = function (name) {
5252
- return this.setTransactionName(name);
5253
- };
5254
- /**
5255
- * @inheritDoc
5256
- */
5257
- Scope.prototype.setContext = function (key, context) {
5258
- var _a;
5259
- if (context === null) {
5260
- // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
5261
- delete this._contexts[key];
5262
- }
5263
- else {
5264
- this._contexts = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._contexts), (_a = {}, _a[key] = context, _a));
5265
- }
5266
- this._notifyScopeListeners();
5267
- return this;
5268
- };
5269
- /**
5270
- * @inheritDoc
5271
- */
5272
- Scope.prototype.setSpan = function (span) {
5273
- this._span = span;
5274
- this._notifyScopeListeners();
5275
- return this;
5276
- };
5277
- /**
5278
- * @inheritDoc
5279
- */
5280
- Scope.prototype.getSpan = function () {
5281
- return this._span;
5282
- };
5283
- /**
5284
- * @inheritDoc
5285
- */
5286
- Scope.prototype.getTransaction = function () {
5287
- // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will
5288
- // have a pointer to the currently-active transaction.
5289
- var span = this.getSpan();
5290
- return span && span.transaction;
5291
- };
5292
- /**
5293
- * @inheritDoc
5294
- */
5295
- Scope.prototype.setSession = function (session) {
5296
- if (!session) {
5297
- delete this._session;
5298
- }
5299
- else {
5300
- this._session = session;
5301
- }
5302
- this._notifyScopeListeners();
5303
- return this;
5304
- };
5305
- /**
5306
- * @inheritDoc
5307
- */
5308
- Scope.prototype.getSession = function () {
5309
- return this._session;
5310
- };
5311
- /**
5312
- * @inheritDoc
5313
- */
5314
- Scope.prototype.update = function (captureContext) {
5315
- if (!captureContext) {
5316
- return this;
5317
- }
5318
- if (typeof captureContext === 'function') {
5319
- var updatedScope = captureContext(this);
5320
- return updatedScope instanceof Scope ? updatedScope : this;
5321
- }
5322
- if (captureContext instanceof Scope) {
5323
- this._tags = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._tags), captureContext._tags);
5324
- this._extra = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._extra), captureContext._extra);
5325
- this._contexts = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._contexts), captureContext._contexts);
5326
- if (captureContext._user && Object.keys(captureContext._user).length) {
5327
- this._user = captureContext._user;
5328
- }
5329
- if (captureContext._level) {
5330
- this._level = captureContext._level;
5331
- }
5332
- if (captureContext._fingerprint) {
5333
- this._fingerprint = captureContext._fingerprint;
5334
- }
5335
- if (captureContext._requestSession) {
5336
- this._requestSession = captureContext._requestSession;
5337
- }
5338
- }
5339
- else if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .isPlainObject */ .PO)(captureContext)) {
5340
- // eslint-disable-next-line no-param-reassign
5341
- captureContext = captureContext;
5342
- this._tags = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._tags), captureContext.tags);
5343
- this._extra = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._extra), captureContext.extra);
5344
- this._contexts = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._contexts), captureContext.contexts);
5345
- if (captureContext.user) {
5346
- this._user = captureContext.user;
5347
- }
5348
- if (captureContext.level) {
5349
- this._level = captureContext.level;
5350
- }
5351
- if (captureContext.fingerprint) {
5352
- this._fingerprint = captureContext.fingerprint;
5353
- }
5354
- if (captureContext.requestSession) {
5355
- this._requestSession = captureContext.requestSession;
5356
- }
5357
- }
5358
- return this;
5359
- };
5360
- /**
5361
- * @inheritDoc
5362
- */
5363
- Scope.prototype.clear = function () {
5364
- this._breadcrumbs = [];
5365
- this._tags = {};
5366
- this._extra = {};
5367
- this._user = {};
5368
- this._contexts = {};
5369
- this._level = undefined;
5370
- this._transactionName = undefined;
5371
- this._fingerprint = undefined;
5372
- this._requestSession = undefined;
5373
- this._span = undefined;
5374
- this._session = undefined;
5375
- this._notifyScopeListeners();
5376
- return this;
5377
- };
5378
- /**
5379
- * @inheritDoc
5380
- */
5381
- Scope.prototype.addBreadcrumb = function (breadcrumb, maxBreadcrumbs) {
5382
- var maxCrumbs = typeof maxBreadcrumbs === 'number' ? Math.min(maxBreadcrumbs, MAX_BREADCRUMBS) : MAX_BREADCRUMBS;
5383
- // No data has been changed, so don't notify scope listeners
5384
- if (maxCrumbs <= 0) {
5385
- return this;
5386
- }
5387
- var mergedBreadcrumb = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({ timestamp: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .dateTimestampInSeconds */ .yW)() }, breadcrumb);
5388
- this._breadcrumbs = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)(this._breadcrumbs, [mergedBreadcrumb]).slice(-maxCrumbs);
5389
- this._notifyScopeListeners();
5390
- return this;
5391
- };
5392
- /**
5393
- * @inheritDoc
5394
- */
5395
- Scope.prototype.clearBreadcrumbs = function () {
5396
- this._breadcrumbs = [];
5397
- this._notifyScopeListeners();
5398
- return this;
5399
- };
5400
- /**
5401
- * Applies the current context and fingerprint to the event.
5402
- * Note that breadcrumbs will be added by the client.
5403
- * Also if the event has already breadcrumbs on it, we do not merge them.
5404
- * @param event Event
5405
- * @param hint May contain additional information about the original exception.
5406
- * @hidden
5407
- */
5408
- Scope.prototype.applyToEvent = function (event, hint) {
5409
- if (this._extra && Object.keys(this._extra).length) {
5410
- event.extra = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._extra), event.extra);
5411
- }
5412
- if (this._tags && Object.keys(this._tags).length) {
5413
- event.tags = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._tags), event.tags);
5414
- }
5415
- if (this._user && Object.keys(this._user).length) {
5416
- event.user = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._user), event.user);
5417
- }
5418
- if (this._contexts && Object.keys(this._contexts).length) {
5419
- event.contexts = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._contexts), event.contexts);
5420
- }
5421
- if (this._level) {
5422
- event.level = this._level;
5423
- }
5424
- if (this._transactionName) {
5425
- event.transaction = this._transactionName;
5426
- }
5427
- // We want to set the trace context for normal events only if there isn't already
5428
- // a trace context on the event. There is a product feature in place where we link
5429
- // errors with transaction and it relies on that.
5430
- if (this._span) {
5431
- event.contexts = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({ trace: this._span.getTraceContext() }, event.contexts);
5432
- var transactionName = this._span.transaction && this._span.transaction.name;
5433
- if (transactionName) {
5434
- event.tags = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({ transaction: transactionName }, event.tags);
5435
- }
5436
- }
5437
- this._applyFingerprint(event);
5438
- event.breadcrumbs = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)((event.breadcrumbs || []), this._breadcrumbs);
5439
- event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;
5440
- event.sdkProcessingMetadata = this._sdkProcessingMetadata;
5441
- return this._notifyEventProcessors((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__spread */ .fl)(getGlobalEventProcessors(), this._eventProcessors), event, hint);
5442
- };
5443
- /**
5444
- * Add data which will be accessible during event processing but won't get sent to Sentry
5445
- */
5446
- Scope.prototype.setSDKProcessingMetadata = function (newData) {
5447
- this._sdkProcessingMetadata = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, this._sdkProcessingMetadata), newData);
5448
- return this;
5449
- };
5450
- /**
5451
- * This will be called after {@link applyToEvent} is finished.
5452
- */
5453
- Scope.prototype._notifyEventProcessors = function (processors, event, hint, index) {
5454
- var _this = this;
5455
- if (index === void 0) { index = 0; }
5456
- return new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .SyncPromise */ .cW(function (resolve, reject) {
5457
- var processor = processors[index];
5458
- if (event === null || typeof processor !== 'function') {
5459
- resolve(event);
5460
- }
5461
- else {
5462
- var result = processor((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, event), hint);
5463
- if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .isThenable */ .J8)(result)) {
5464
- void result
5465
- .then(function (final) { return _this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve); })
5466
- .then(null, reject);
5467
- }
5468
- else {
5469
- void _this._notifyEventProcessors(processors, result, hint, index + 1)
5470
- .then(resolve)
5471
- .then(null, reject);
5472
- }
5473
- }
5474
- });
5475
- };
5476
- /**
5477
- * This will be called on every set call.
5478
- */
5479
- Scope.prototype._notifyScopeListeners = function () {
5480
- var _this = this;
5481
- // We need this check for this._notifyingListeners to be able to work on scope during updates
5482
- // If this check is not here we'll produce endless recursion when something is done with the scope
5483
- // during the callback.
5484
- if (!this._notifyingListeners) {
5485
- this._notifyingListeners = true;
5486
- this._scopeListeners.forEach(function (callback) {
5487
- callback(_this);
5488
- });
5489
- this._notifyingListeners = false;
5490
- }
5491
- };
5492
- /**
5493
- * Applies fingerprint from the scope to the event if there's one,
5494
- * uses message if there's one instead or get rid of empty fingerprint
5495
- */
5496
- Scope.prototype._applyFingerprint = function (event) {
5497
- // Make sure it's an array first and we actually have something in place
5498
- event.fingerprint = event.fingerprint
5499
- ? Array.isArray(event.fingerprint)
5500
- ? event.fingerprint
5501
- : [event.fingerprint]
5502
- : [];
5503
- // If we have something on the scope, then merge it with event
5504
- if (this._fingerprint) {
5505
- event.fingerprint = event.fingerprint.concat(this._fingerprint);
5506
- }
5507
- // If we have no data at all, remove empty array default
5508
- if (event.fingerprint && !event.fingerprint.length) {
5509
- delete event.fingerprint;
5510
- }
5511
- };
5512
- return Scope;
5513
- }());
5514
-
5515
- /**
5516
- * Returns the global event processors.
5517
- */
5518
- function getGlobalEventProcessors() {
5519
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .getGlobalSingleton */ .Y)('globalEventProcessors', function () { return []; });
5520
- }
5521
- /**
5522
- * Add a EventProcessor to be kept globally.
5523
- * @param callback EventProcessor to add
5524
- */
5525
- function addGlobalEventProcessor(callback) {
5526
- getGlobalEventProcessors().push(callback);
5527
- }
5528
- //# sourceMappingURL=scope.js.map
5529
-
5530
- /***/ }),
5531
-
5532
- /***/ 2430:
5533
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5534
 
5535
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5536
- /* harmony export */ "z": function() { return /* binding */ Session; }
5537
- /* harmony export */ });
5538
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3699);
5539
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7790);
5540
- /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1995);
5541
 
5542
- /**
5543
- * @inheritdoc
5544
- */
5545
- var Session = /** @class */ (function () {
5546
- function Session(context) {
5547
- this.errors = 0;
5548
- this.sid = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .uuid4 */ .DM)();
5549
- this.duration = 0;
5550
- this.status = 'ok';
5551
- this.init = true;
5552
- this.ignoreDuration = false;
5553
- // Both timestamp and started are in seconds since the UNIX epoch.
5554
- var startingTime = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .timestampInSeconds */ .ph)();
5555
- this.timestamp = startingTime;
5556
- this.started = startingTime;
5557
- if (context) {
5558
- this.update(context);
5559
- }
5560
- }
5561
- /** JSDoc */
5562
- // eslint-disable-next-line complexity
5563
- Session.prototype.update = function (context) {
5564
- if (context === void 0) { context = {}; }
5565
- if (context.user) {
5566
- if (!this.ipAddress && context.user.ip_address) {
5567
- this.ipAddress = context.user.ip_address;
5568
- }
5569
- if (!this.did && !context.did) {
5570
- this.did = context.user.id || context.user.email || context.user.username;
5571
- }
5572
- }
5573
- this.timestamp = context.timestamp || (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .timestampInSeconds */ .ph)();
5574
- if (context.ignoreDuration) {
5575
- this.ignoreDuration = context.ignoreDuration;
5576
- }
5577
- if (context.sid) {
5578
- // Good enough uuid validation. — Kamil
5579
- this.sid = context.sid.length === 32 ? context.sid : (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .uuid4 */ .DM)();
5580
- }
5581
- if (context.init !== undefined) {
5582
- this.init = context.init;
5583
- }
5584
- if (!this.did && context.did) {
5585
- this.did = "" + context.did;
5586
- }
5587
- if (typeof context.started === 'number') {
5588
- this.started = context.started;
5589
- }
5590
- if (this.ignoreDuration) {
5591
- this.duration = undefined;
5592
- }
5593
- else if (typeof context.duration === 'number') {
5594
- this.duration = context.duration;
5595
- }
5596
- else {
5597
- var duration = this.timestamp - this.started;
5598
- this.duration = duration >= 0 ? duration : 0;
5599
- }
5600
- if (context.release) {
5601
- this.release = context.release;
5602
- }
5603
- if (context.environment) {
5604
- this.environment = context.environment;
5605
- }
5606
- if (!this.ipAddress && context.ipAddress) {
5607
- this.ipAddress = context.ipAddress;
5608
- }
5609
- if (!this.userAgent && context.userAgent) {
5610
- this.userAgent = context.userAgent;
5611
- }
5612
- if (typeof context.errors === 'number') {
5613
- this.errors = context.errors;
5614
- }
5615
- if (context.status) {
5616
- this.status = context.status;
5617
- }
5618
- };
5619
- /** JSDoc */
5620
- Session.prototype.close = function (status) {
5621
- if (status) {
5622
- this.update({ status: status });
5623
- }
5624
- else if (this.status === 'ok') {
5625
- this.update({ status: 'exited' });
5626
- }
5627
- else {
5628
- this.update();
5629
- }
5630
- };
5631
- /** JSDoc */
5632
- Session.prototype.toJSON = function () {
5633
- return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .dropUndefinedKeys */ .Jr)({
5634
- sid: "" + this.sid,
5635
- init: this.init,
5636
- // Make sure that sec is converted to ms for date constructor
5637
- started: new Date(this.started * 1000).toISOString(),
5638
- timestamp: new Date(this.timestamp * 1000).toISOString(),
5639
- status: this.status,
5640
- errors: this.errors,
5641
- did: typeof this.did === 'number' || typeof this.did === 'string' ? "" + this.did : undefined,
5642
- duration: this.duration,
5643
- attrs: {
5644
- release: this.release,
5645
- environment: this.environment,
5646
- ip_address: this.ipAddress,
5647
- user_agent: this.userAgent,
5648
- },
5649
- });
5650
- };
5651
- return Session;
5652
- }());
5653
 
5654
- //# sourceMappingURL=session.js.map
5655
 
5656
  /***/ }),
5657
 
5658
- /***/ 8773:
5659
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5660
 
5661
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5662
- /* harmony export */ "pi": function() { return /* binding */ __assign; },
5663
- /* harmony export */ "fl": function() { return /* binding */ __spread; }
5664
  /* harmony export */ });
5665
- /* unused harmony exports __extends, __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet */
5666
- /*! *****************************************************************************
5667
- Copyright (c) Microsoft Corporation.
5668
-
5669
- Permission to use, copy, modify, and/or distribute this software for any
5670
- purpose with or without fee is hereby granted.
5671
-
5672
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
5673
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
5674
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
5675
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
5676
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
5677
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
5678
- PERFORMANCE OF THIS SOFTWARE.
5679
- ***************************************************************************** */
5680
- /* global Reflect, Promise */
5681
-
5682
- var extendStatics = function(d, b) {
5683
- extendStatics = Object.setPrototypeOf ||
5684
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5685
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
5686
- return extendStatics(d, b);
5687
- };
5688
-
5689
- function __extends(d, b) {
5690
- extendStatics(d, b);
5691
- function __() { this.constructor = d; }
5692
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
5693
- }
5694
-
5695
- var __assign = function() {
5696
- __assign = Object.assign || function __assign(t) {
5697
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5698
- s = arguments[i];
5699
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
5700
- }
5701
- return t;
5702
- }
5703
- return __assign.apply(this, arguments);
5704
- }
5705
-
5706
- function __rest(s, e) {
5707
- var t = {};
5708
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5709
- t[p] = s[p];
5710
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
5711
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
5712
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
5713
- t[p[i]] = s[p[i]];
5714
- }
5715
- return t;
5716
- }
5717
-
5718
- function __decorate(decorators, target, key, desc) {
5719
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
5720
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5721
- 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;
5722
- return c > 3 && r && Object.defineProperty(target, key, r), r;
5723
- }
5724
 
5725
- function __param(paramIndex, decorator) {
5726
- return function (target, key) { decorator(target, key, paramIndex); }
5727
- }
5728
 
5729
- function __metadata(metadataKey, metadataValue) {
5730
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
5731
- }
5732
 
5733
- function __awaiter(thisArg, _arguments, P, generator) {
5734
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5735
- return new (P || (P = Promise))(function (resolve, reject) {
5736
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5737
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
5738
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
5739
- step((generator = generator.apply(thisArg, _arguments || [])).next());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5740
  });
5741
- }
5742
 
5743
- function __generator(thisArg, body) {
5744
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
5745
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
5746
- function verb(n) { return function (v) { return step([n, v]); }; }
5747
- function step(op) {
5748
- if (f) throw new TypeError("Generator is already executing.");
5749
- while (_) try {
5750
- 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;
5751
- if (y = 0, t) op = [op[0] & 2, t.value];
5752
- switch (op[0]) {
5753
- case 0: case 1: t = op; break;
5754
- case 4: _.label++; return { value: op[1], done: false };
5755
- case 5: _.label++; y = op[1]; op = [0]; continue;
5756
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
5757
- default:
5758
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
5759
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
5760
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
5761
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
5762
- if (t[2]) _.ops.pop();
5763
- _.trys.pop(); continue;
5764
- }
5765
- op = body.call(thisArg, _);
5766
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
5767
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
5768
  }
5769
- }
5770
 
5771
- function __createBinding(o, m, k, k2) {
5772
- if (k2 === undefined) k2 = k;
5773
- o[k2] = m[k];
5774
- }
5775
-
5776
- function __exportStar(m, exports) {
5777
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
5778
- }
5779
 
5780
- function __values(o) {
5781
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
5782
- if (m) return m.call(o);
5783
- if (o && typeof o.length === "number") return {
5784
- next: function () {
5785
- if (o && i >= o.length) o = void 0;
5786
- return { value: o && o[i++], done: !o };
5787
- }
5788
  };
5789
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
5790
- }
5791
-
5792
- function __read(o, n) {
5793
- var m = typeof Symbol === "function" && o[Symbol.iterator];
5794
- if (!m) return o;
5795
- var i = m.call(o), r, ar = [], e;
5796
- try {
5797
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
5798
- }
5799
- catch (error) { e = { error: error }; }
5800
- finally {
5801
- try {
5802
- if (r && !r.done && (m = i["return"])) m.call(i);
5803
- }
5804
- finally { if (e) throw e.error; }
5805
- }
5806
- return ar;
5807
- }
5808
 
5809
- function __spread() {
5810
- for (var ar = [], i = 0; i < arguments.length; i++)
5811
- ar = ar.concat(__read(arguments[i]));
5812
- return ar;
5813
- }
5814
-
5815
- function __spreadArrays() {
5816
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
5817
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
5818
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
5819
- r[k] = a[j];
5820
- return r;
5821
- };
5822
 
5823
- function __await(v) {
5824
- return this instanceof __await ? (this.v = v, this) : new __await(v);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5825
  }
5826
 
5827
- function __asyncGenerator(thisArg, _arguments, generator) {
5828
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
5829
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
5830
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
5831
- 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); }); }; }
5832
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
5833
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
5834
- function fulfill(value) { resume("next", value); }
5835
- function reject(value) { resume("throw", value); }
5836
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
5837
- }
5838
 
5839
- function __asyncDelegator(o) {
5840
- var i, p;
5841
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
5842
- 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; }
5843
- }
5844
 
5845
- function __asyncValues(o) {
5846
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
5847
- var m = o[Symbol.asyncIterator], i;
5848
- 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);
5849
- 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); }); }; }
5850
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
5851
- }
5852
 
5853
- function __makeTemplateObject(cooked, raw) {
5854
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
5855
- return cooked;
5856
- };
5857
 
5858
- function __importStar(mod) {
5859
- if (mod && mod.__esModule) return mod;
5860
- var result = {};
5861
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
5862
- result.default = mod;
5863
- return result;
5864
- }
5865
 
5866
- function __importDefault(mod) {
5867
- return (mod && mod.__esModule) ? mod : { default: mod };
5868
- }
 
5869
 
5870
- function __classPrivateFieldGet(receiver, privateMap) {
5871
- if (!privateMap.has(receiver)) {
5872
- throw new TypeError("attempted to get private field on non-instance");
5873
- }
5874
- return privateMap.get(receiver);
5875
- }
5876
 
5877
- function __classPrivateFieldSet(receiver, privateMap, value) {
5878
- if (!privateMap.has(receiver)) {
5879
- throw new TypeError("attempted to set private field on non-instance");
5880
- }
5881
- privateMap.set(receiver, value);
5882
- return value;
5883
- }
5884
 
5885
 
5886
  /***/ }),
5887
 
5888
- /***/ 4678:
5889
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5890
 
5891
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5892
  /* harmony export */ "Tb": function() { return /* binding */ captureException; },
5893
  /* harmony export */ "$e": function() { return /* binding */ withScope; }
5894
  /* harmony export */ });
5895
- /* unused harmony exports captureMessage, captureEvent, configureScope, addBreadcrumb, setContext, setExtras, setTags, setExtra, setTag, setUser, _callOnClient, startTransaction */
5896
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5559);
5897
- /* harmony import */ var _sentry_hub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8585);
5898
 
5899
 
5900
- /**
5901
- * This calls a function on the current hub.
5902
- * @param method function to call on hub.
5903
- * @param args to pass to function.
5904
- */
5905
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5906
- function callOnHub(method) {
5907
- var args = [];
5908
- for (var _i = 1; _i < arguments.length; _i++) {
5909
- args[_i - 1] = arguments[_i];
5910
- }
5911
- var hub = (0,_sentry_hub__WEBPACK_IMPORTED_MODULE_0__/* .getCurrentHub */ .Gd)();
5912
- if (hub && hub[method]) {
5913
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5914
- return hub[method].apply(hub, (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spread */ .fl)(args));
5915
- }
5916
- throw new Error("No hub defined or " + method + " was not found on the hub, please open a bug report.");
5917
- }
5918
  /**
5919
  * Captures an exception event and sends it to Sentry.
5920
  *
5921
  * @param exception An exception-like object.
 
5922
  * @returns The generated eventId.
5923
  */
5924
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
5925
  function captureException(exception, captureContext) {
5926
- var syntheticException = new Error('Sentry syntheticException');
5927
- return callOnHub('captureException', exception, {
5928
- captureContext: captureContext,
5929
- originalException: exception,
5930
- syntheticException: syntheticException,
5931
- });
5932
  }
 
5933
  /**
5934
  * Captures a message event and sends it to Sentry.
5935
  *
@@ -5937,30 +3991,35 @@ function captureException(exception, captureContext) {
5937
  * @param Severity Define the level of the message.
5938
  * @returns The generated eventId.
5939
  */
5940
- function captureMessage(message, captureContext) {
5941
- var syntheticException = new Error(message);
5942
- // This is necessary to provide explicit scopes upgrade, without changing the original
5943
- // arity of the `captureMessage(message, level)` method.
5944
- var level = typeof captureContext === 'string' ? captureContext : undefined;
5945
- var context = typeof captureContext !== 'string' ? { captureContext: captureContext } : undefined;
5946
- return callOnHub('captureMessage', message, level, __assign({ originalException: message, syntheticException: syntheticException }, context));
 
 
5947
  }
 
5948
  /**
5949
  * Captures a manually created event and sends it to Sentry.
5950
  *
5951
  * @param event The event to send to Sentry.
5952
  * @returns The generated eventId.
5953
  */
5954
- function captureEvent(event) {
5955
- return callOnHub('captureEvent', event);
5956
  }
 
5957
  /**
5958
  * Callback to set context information onto the scope.
5959
  * @param callback Callback function that receives Scope.
5960
  */
5961
  function configureScope(callback) {
5962
- callOnHub('configureScope', callback);
5963
  }
 
5964
  /**
5965
  * Records a new breadcrumb which will be attached to future events.
5966
  *
@@ -5970,39 +4029,43 @@ function configureScope(callback) {
5970
  * @param breadcrumb The breadcrumb to record.
5971
  */
5972
  function addBreadcrumb(breadcrumb) {
5973
- callOnHub('addBreadcrumb', breadcrumb);
5974
  }
 
5975
  /**
5976
  * Sets context data with the given name.
5977
  * @param name of the context
5978
  * @param context Any kind of data. This data will be normalized.
5979
  */
5980
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
5981
  function setContext(name, context) {
5982
- callOnHub('setContext', name, context);
5983
  }
 
5984
  /**
5985
  * Set an object that will be merged sent as extra data with the event.
5986
  * @param extras Extras object to merge into current context.
5987
  */
5988
  function setExtras(extras) {
5989
- callOnHub('setExtras', extras);
5990
- }
5991
- /**
5992
- * Set an object that will be merged sent as tags data with the event.
5993
- * @param tags Tags context object to merge into current context.
5994
- */
5995
- function setTags(tags) {
5996
- callOnHub('setTags', tags);
5997
  }
 
5998
  /**
5999
  * Set key:value that will be sent as extra data with the event.
6000
  * @param key String of extra
6001
  * @param extra Any kind of data. This data will be normalized.
6002
  */
6003
  function setExtra(key, extra) {
6004
- callOnHub('setExtra', key, extra);
 
 
 
 
 
 
 
 
6005
  }
 
6006
  /**
6007
  * Set key:value that will be sent as tags data with the event.
6008
  *
@@ -6012,356 +4075,1564 @@ function setExtra(key, extra) {
6012
  * @param value Value of tag
6013
  */
6014
  function setTag(key, value) {
6015
- callOnHub('setTag', key, value);
6016
  }
 
6017
  /**
6018
  * Updates user context information for future events.
6019
  *
6020
  * @param user User context object to be set in the current context. Pass `null` to unset the user.
6021
  */
6022
  function setUser(user) {
6023
- callOnHub('setUser', user);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6024
  }
 
6025
  /**
6026
- * Creates a new scope with and executes the given operation within.
6027
- * The scope is automatically removed once the operation
6028
- * finishes or throws.
6029
- *
6030
- * This is essentially a convenience function for:
6031
- *
6032
- * pushScope();
6033
- * callback();
6034
- * popScope();
6035
- *
6036
- * @param callback that will be enclosed into push/popScope.
6037
  */
6038
- function withScope(callback) {
6039
- callOnHub('withScope', callback);
6040
  }
 
6041
  /**
6042
- * Calls a function on the latest client. Use this with caution, it's meant as
6043
- * in "internal" helper so we don't need to expose every possible function in
6044
- * the shim. It is not guaranteed that the client actually implements the
6045
- * function.
6046
- *
6047
- * @param method The method to call on the client/client.
6048
- * @param args Arguments to pass to the client/fontend.
6049
  * @hidden
6050
  */
6051
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6052
- function _callOnClient(method) {
6053
- var args = [];
6054
- for (var _i = 1; _i < arguments.length; _i++) {
6055
- args[_i - 1] = arguments[_i];
6056
- }
6057
- callOnHub.apply(void 0, __spread(['_invokeClient', method], args));
6058
  }
 
6059
  /**
6060
- * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
6061
- *
6062
- * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a
6063
- * new child span within the transaction or any span, call the respective `.startChild()` method.
6064
- *
6065
- * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.
6066
- *
6067
- * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its
6068
- * finished child spans will be sent to Sentry.
6069
- *
6070
- * @param context Properties of the new `Transaction`.
6071
- * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent
6072
- * default values). See {@link Options.tracesSampler}.
6073
- *
6074
- * @returns The transaction which was just started
6075
  */
6076
- function startTransaction(context, customSamplingContext) {
6077
- return callOnHub('startTransaction', __assign({}, context), customSamplingContext);
 
 
 
6078
  }
6079
- //# sourceMappingURL=index.js.map
 
 
 
6080
 
6081
  /***/ }),
6082
 
6083
- /***/ 5559:
6084
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6085
 
6086
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6087
- /* harmony export */ "fl": function() { return /* binding */ __spread; }
 
6088
  /* harmony export */ });
6089
- /* unused harmony exports __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet */
6090
- /*! *****************************************************************************
6091
- Copyright (c) Microsoft Corporation.
6092
-
6093
- Permission to use, copy, modify, and/or distribute this software for any
6094
- purpose with or without fee is hereby granted.
6095
-
6096
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
6097
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
6098
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
6099
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
6100
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
6101
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
6102
- PERFORMANCE OF THIS SOFTWARE.
6103
- ***************************************************************************** */
6104
- /* global Reflect, Promise */
6105
-
6106
- var extendStatics = function(d, b) {
6107
- extendStatics = Object.setPrototypeOf ||
6108
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6109
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
6110
- return extendStatics(d, b);
6111
- };
6112
 
6113
- function __extends(d, b) {
6114
- extendStatics(d, b);
6115
- function __() { this.constructor = d; }
6116
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6117
- }
6118
 
6119
- var __assign = function() {
6120
- __assign = Object.assign || function __assign(t) {
6121
- for (var s, i = 1, n = arguments.length; i < n; i++) {
6122
- s = arguments[i];
6123
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
6124
- }
6125
- return t;
6126
- }
6127
- return __assign.apply(this, arguments);
6128
- }
6129
 
6130
- function __rest(s, e) {
6131
- var t = {};
6132
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
6133
- t[p] = s[p];
6134
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
6135
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
6136
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
6137
- t[p[i]] = s[p[i]];
6138
- }
6139
- return t;
6140
- }
6141
 
6142
- function __decorate(decorators, target, key, desc) {
6143
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
6144
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
6145
- 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;
6146
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6147
- }
 
6148
 
6149
- function __param(paramIndex, decorator) {
6150
- return function (target, key) { decorator(target, key, paramIndex); }
6151
- }
6152
 
6153
- function __metadata(metadataKey, metadataValue) {
6154
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
6155
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6156
 
6157
- function __awaiter(thisArg, _arguments, P, generator) {
6158
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6159
- return new (P || (P = Promise))(function (resolve, reject) {
6160
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6161
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6162
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
6163
- step((generator = generator.apply(thisArg, _arguments || [])).next());
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6164
  });
6165
- }
6166
 
6167
- function __generator(thisArg, body) {
6168
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
6169
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
6170
- function verb(n) { return function (v) { return step([n, v]); }; }
6171
- function step(op) {
6172
- if (f) throw new TypeError("Generator is already executing.");
6173
- while (_) try {
6174
- 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;
6175
- if (y = 0, t) op = [op[0] & 2, t.value];
6176
- switch (op[0]) {
6177
- case 0: case 1: t = op; break;
6178
- case 4: _.label++; return { value: op[1], done: false };
6179
- case 5: _.label++; y = op[1]; op = [0]; continue;
6180
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
6181
- default:
6182
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
6183
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
6184
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
6185
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
6186
- if (t[2]) _.ops.pop();
6187
- _.trys.pop(); continue;
6188
- }
6189
- op = body.call(thisArg, _);
6190
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
6191
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
6192
  }
6193
- }
6194
 
6195
- function __createBinding(o, m, k, k2) {
6196
- if (k2 === undefined) k2 = k;
6197
- o[k2] = m[k];
6198
- }
 
 
 
 
 
 
 
 
 
 
 
 
6199
 
6200
- function __exportStar(m, exports) {
6201
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
 
 
 
6202
  }
6203
 
6204
- function __values(o) {
6205
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
6206
- if (m) return m.call(o);
6207
- if (o && typeof o.length === "number") return {
6208
- next: function () {
6209
- if (o && i >= o.length) o = void 0;
6210
- return { value: o && o[i++], done: !o };
6211
- }
6212
- };
6213
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
6214
  }
6215
 
6216
- function __read(o, n) {
6217
- var m = typeof Symbol === "function" && o[Symbol.iterator];
6218
- if (!m) return o;
6219
- var i = m.call(o), r, ar = [], e;
6220
- try {
6221
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
6222
- }
6223
- catch (error) { e = { error: error }; }
6224
- finally {
6225
- try {
6226
- if (r && !r.done && (m = i["return"])) m.call(i);
6227
- }
6228
- finally { if (e) throw e.error; }
6229
- }
6230
- return ar;
6231
  }
6232
 
6233
- function __spread() {
6234
- for (var ar = [], i = 0; i < arguments.length; i++)
6235
- ar = ar.concat(__read(arguments[i]));
6236
- return ar;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6237
  }
6238
 
6239
- function __spreadArrays() {
6240
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
6241
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
6242
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
6243
- r[k] = a[j];
6244
- return r;
6245
- };
6246
 
6247
- function __await(v) {
6248
- return this instanceof __await ? (this.v = v, this) : new __await(v);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6249
  }
6250
 
6251
- function __asyncGenerator(thisArg, _arguments, generator) {
6252
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
6253
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
6254
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
6255
- 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); }); }; }
6256
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
6257
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
6258
- function fulfill(value) { resume("next", value); }
6259
- function reject(value) { resume("throw", value); }
6260
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
6261
  }
6262
 
6263
- function __asyncDelegator(o) {
6264
- var i, p;
6265
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
6266
- 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; }
 
6267
  }
6268
 
6269
- function __asyncValues(o) {
6270
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
6271
- var m = o[Symbol.asyncIterator], i;
6272
- 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);
6273
- 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); }); }; }
6274
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
6275
  }
6276
 
6277
- function __makeTemplateObject(cooked, raw) {
6278
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
6279
- return cooked;
6280
- };
6281
 
6282
- function __importStar(mod) {
6283
- if (mod && mod.__esModule) return mod;
6284
- var result = {};
6285
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
6286
- result.default = mod;
6287
- return result;
6288
  }
6289
 
6290
- function __importDefault(mod) {
6291
- return (mod && mod.__esModule) ? mod : { default: mod };
 
 
 
 
 
6292
  }
6293
 
6294
- function __classPrivateFieldGet(receiver, privateMap) {
6295
- if (!privateMap.has(receiver)) {
6296
- throw new TypeError("attempted to get private field on non-instance");
6297
- }
6298
- return privateMap.get(receiver);
 
6299
  }
6300
 
6301
- function __classPrivateFieldSet(receiver, privateMap, value) {
6302
- if (!privateMap.has(receiver)) {
6303
- throw new TypeError("attempted to set private field on non-instance");
 
 
 
 
 
 
 
 
 
6304
  }
6305
- privateMap.set(receiver, value);
6306
- return value;
6307
  }
6308
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6309
 
6310
- /***/ }),
 
 
6311
 
6312
- /***/ 2226:
6313
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
 
6314
 
6315
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6316
- /* harmony export */ "z": function() { return /* binding */ Severity; }
6317
- /* harmony export */ });
6318
- /* unused harmony export SeverityLevels */
6319
- /**
6320
- * TODO(v7): Remove this enum and replace with SeverityLevel
6321
- */
6322
- var Severity;
6323
- (function (Severity) {
6324
- /** JSDoc */
6325
- Severity["Fatal"] = "fatal";
6326
- /** JSDoc */
6327
- Severity["Error"] = "error";
6328
- /** JSDoc */
6329
- Severity["Warning"] = "warning";
6330
- /** JSDoc */
6331
- Severity["Log"] = "log";
6332
- /** JSDoc */
6333
- Severity["Info"] = "info";
6334
- /** JSDoc */
6335
- Severity["Debug"] = "debug";
6336
- /** JSDoc */
6337
- Severity["Critical"] = "critical";
6338
- })(Severity || (Severity = {}));
6339
- // TODO: in v7, these can disappear, because they now also exist in `@sentry/utils`. (Having them there rather than here
6340
- // is nice because then it enforces the idea that only types are exported from `@sentry/types`.)
6341
- var SeverityLevels = (/* unused pure expression or super */ null && (['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical']));
6342
- //# sourceMappingURL=severity.js.map
6343
 
6344
- /***/ }),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6345
 
6346
- /***/ 3518:
6347
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
 
 
 
6348
 
6349
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6350
- /* harmony export */ "I": function() { return /* binding */ forget; }
6351
- /* harmony export */ });
6352
  /**
6353
- * Consumes the promise and logs the error when it rejects.
6354
- * @param promise A promise to forget.
 
 
 
 
 
 
 
 
6355
  */
6356
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6357
- function forget(promise) {
6358
- void promise.then(null, function (e) {
6359
- // TODO: Use a better logging mechanism
6360
- // eslint-disable-next-line no-console
6361
- console.error(e);
6362
- });
 
 
 
 
 
 
 
 
 
 
 
 
6363
  }
6364
- //# sourceMappingURL=async.js.map
 
 
 
6365
 
6366
  /***/ }),
6367
 
@@ -6369,11 +5640,12 @@ function forget(promise) {
6369
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6370
 
6371
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6372
- /* harmony export */ "R": function() { return /* binding */ htmlTreeAsString; },
6373
- /* harmony export */ "l": function() { return /* binding */ getLocationHref; }
6374
  /* harmony export */ });
6375
- /* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5907);
6376
- /* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1757);
 
6377
 
6378
 
6379
  /**
@@ -6383,103 +5655,118 @@ function forget(promise) {
6383
  * @returns generated DOM path
6384
  */
6385
  function htmlTreeAsString(elem, keyAttrs) {
6386
- // try/catch both:
6387
- // - accessing event.target (see getsentry/raven-js#838, #768)
6388
- // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly
6389
- // - can throw an exception in some circumstances.
6390
- try {
6391
- var currentElem = elem;
6392
- var MAX_TRAVERSE_HEIGHT = 5;
6393
- var MAX_OUTPUT_LEN = 80;
6394
- var out = [];
6395
- var height = 0;
6396
- var len = 0;
6397
- var separator = ' > ';
6398
- var sepLength = separator.length;
6399
- var nextStr = void 0;
6400
- // eslint-disable-next-line no-plusplus
 
 
6401
  while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {
6402
- nextStr = _htmlElementAsString(currentElem, keyAttrs);
6403
- // bail out if
6404
- // - nextStr is the 'html' element
6405
- // - the length of the string that would be created exceeds MAX_OUTPUT_LEN
6406
- // (ignore this limit if we are on the first iteration)
6407
- if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {
6408
- break;
6409
- }
6410
- out.push(nextStr);
6411
- len += nextStr.length;
6412
- currentElem = currentElem.parentNode;
6413
- }
6414
- return out.reverse().join(separator);
6415
- }
6416
- catch (_oO) {
6417
- return '<unknown>';
6418
  }
 
 
 
 
 
6419
  }
 
6420
  /**
6421
  * Returns a simple, query-selector representation of a DOM element
6422
  * e.g. [HTMLElement] => input#foo.btn[name=baz]
6423
  * @returns generated DOM path
6424
  */
6425
  function _htmlElementAsString(el, keyAttrs) {
6426
- var elem = el;
6427
- var out = [];
6428
- var className;
6429
- var classes;
6430
- var key;
6431
- var attr;
6432
- var i;
6433
- if (!elem || !elem.tagName) {
6434
- return '';
6435
- }
6436
- out.push(elem.tagName.toLowerCase());
6437
- // Pairs of attribute keys defined in `serializeAttribute` and their values on element.
6438
- var keyAttrPairs = keyAttrs && keyAttrs.length
6439
- ? keyAttrs.filter(function (keyAttr) { return elem.getAttribute(keyAttr); }).map(function (keyAttr) { return [keyAttr, elem.getAttribute(keyAttr)]; })
6440
- : null;
6441
- if (keyAttrPairs && keyAttrPairs.length) {
6442
- keyAttrPairs.forEach(function (keyAttrPair) {
6443
- out.push("[" + keyAttrPair[0] + "=\"" + keyAttrPair[1] + "\"]");
6444
- });
 
 
 
 
 
 
 
 
 
 
 
6445
  }
6446
- else {
6447
- if (elem.id) {
6448
- out.push("#" + elem.id);
6449
- }
6450
- // eslint-disable-next-line prefer-const
6451
  className = elem.className;
6452
- if (className && (0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .HD)(className)) {
6453
- classes = className.split(/\s+/);
6454
- for (i = 0; i < classes.length; i++) {
6455
- out.push("." + classes[i]);
6456
- }
6457
- }
6458
  }
6459
- var allowedAttrs = ['type', 'name', 'title', 'alt'];
6460
- for (i = 0; i < allowedAttrs.length; i++) {
6461
- key = allowedAttrs[i];
6462
- attr = elem.getAttribute(key);
6463
- if (attr) {
6464
- out.push("[" + key + "=\"" + attr + "\"]");
6465
- }
6466
  }
6467
- return out.join('');
 
6468
  }
 
6469
  /**
6470
  * A safe form of location.href
6471
  */
6472
  function getLocationHref() {
6473
- var global = (0,_global__WEBPACK_IMPORTED_MODULE_1__/* .getGlobalObject */ .R)();
6474
- try {
6475
- return global.document.location.href;
6476
- }
6477
- catch (oO) {
6478
- return '';
6479
- }
6480
  }
 
 
6481
  //# sourceMappingURL=browser.js.map
6482
 
 
6483
  /***/ }),
6484
 
6485
  /***/ 250:
@@ -6488,47 +5775,55 @@ function getLocationHref() {
6488
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6489
  /* harmony export */ "y": function() { return /* binding */ createClientReportEnvelope; }
6490
  /* harmony export */ });
6491
- /* harmony import */ var _envelope__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6894);
6492
- /* harmony import */ var _time__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7790);
 
6493
 
6494
 
6495
  /**
6496
  * Creates client report envelope
6497
  * @param discarded_events An array of discard events
6498
- * @param dsn A DSN that can be set on the header. Optional.
6499
- */
6500
- function createClientReportEnvelope(discarded_events, dsn, timestamp) {
6501
- var clientReportItem = [
6502
- { type: 'client_report' },
6503
- {
6504
- timestamp: timestamp || (0,_time__WEBPACK_IMPORTED_MODULE_0__/* .dateTimestampInSeconds */ .yW)(),
6505
- discarded_events: discarded_events,
6506
- },
6507
- ];
6508
- return (0,_envelope__WEBPACK_IMPORTED_MODULE_1__/* .createEnvelope */ .Jd)(dsn ? { dsn: dsn } : {}, [clientReportItem]);
 
 
 
 
6509
  }
 
 
6510
  //# sourceMappingURL=clientreport.js.map
6511
 
 
6512
  /***/ }),
6513
 
6514
  /***/ 3135:
6515
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6516
 
6517
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6518
- /* harmony export */ "R": function() { return /* binding */ dsnToString; },
6519
- /* harmony export */ "v": function() { return /* binding */ makeDsn; }
6520
  /* harmony export */ });
6521
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4715);
6522
- /* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4388);
6523
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1923);
6524
-
6525
 
6526
 
6527
  /** Regular expression used to parse a Dsn. */
6528
  var DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;
 
6529
  function isValidProtocol(protocol) {
6530
- return protocol === 'http' || protocol === 'https';
6531
  }
 
6532
  /**
6533
  * Renders the string representation of this Dsn.
6534
  *
@@ -6538,89 +5833,119 @@ function isValidProtocol(protocol) {
6538
  *
6539
  * @param withPassword When set to true, the password will be included.
6540
  */
6541
- function dsnToString(dsn, withPassword) {
6542
- if (withPassword === void 0) { withPassword = false; }
6543
- var host = dsn.host, path = dsn.path, pass = dsn.pass, port = dsn.port, projectId = dsn.projectId, protocol = dsn.protocol, publicKey = dsn.publicKey;
6544
- return (protocol + "://" + publicKey + (withPassword && pass ? ":" + pass : '') +
6545
- ("@" + host + (port ? ":" + port : '') + "/" + (path ? path + "/" : path) + projectId));
 
6546
  }
 
 
 
 
 
 
 
6547
  function dsnFromString(str) {
6548
- var match = DSN_REGEX.exec(str);
6549
- if (!match) {
6550
- throw new _error__WEBPACK_IMPORTED_MODULE_0__/* .SentryError */ .b("Invalid Sentry Dsn: " + str);
6551
- }
6552
- var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__read */ .CR)(match.slice(1), 6), protocol = _a[0], publicKey = _a[1], _b = _a[2], pass = _b === void 0 ? '' : _b, host = _a[3], _c = _a[4], port = _c === void 0 ? '' : _c, lastPath = _a[5];
6553
- var path = '';
6554
- var projectId = lastPath;
6555
- var split = projectId.split('/');
6556
- if (split.length > 1) {
6557
- path = split.slice(0, -1).join('/');
6558
- projectId = split.pop();
6559
- }
6560
- if (projectId) {
6561
- var projectMatch = projectId.match(/^\d+/);
6562
- if (projectMatch) {
6563
- projectId = projectMatch[0];
6564
- }
 
 
 
6565
  }
6566
- return dsnFromComponents({ host: host, pass: pass, path: path, projectId: projectId, port: port, protocol: protocol, publicKey: publicKey });
 
 
6567
  }
 
6568
  function dsnFromComponents(components) {
6569
- // TODO this is for backwards compatibility, and can be removed in a future version
6570
- if ('user' in components && !('publicKey' in components)) {
6571
- components.publicKey = components.user;
6572
- }
6573
- return {
6574
- user: components.publicKey || '',
6575
- protocol: components.protocol,
6576
- publicKey: components.publicKey || '',
6577
- pass: components.pass || '',
6578
- host: components.host,
6579
- port: components.port || '',
6580
- path: components.path || '',
6581
- projectId: components.projectId,
6582
- };
6583
  }
 
6584
  function validateDsn(dsn) {
6585
- if (!_flags__WEBPACK_IMPORTED_MODULE_2__/* .IS_DEBUG_BUILD */ .h) {
6586
- return;
6587
- }
6588
- var port = dsn.port, projectId = dsn.projectId, protocol = dsn.protocol;
6589
- var requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];
6590
- requiredComponents.forEach(function (component) {
6591
- if (!dsn[component]) {
6592
- throw new _error__WEBPACK_IMPORTED_MODULE_0__/* .SentryError */ .b("Invalid Sentry Dsn: " + component + " missing");
6593
- }
6594
- });
6595
- if (!projectId.match(/^\d+$/)) {
6596
- throw new _error__WEBPACK_IMPORTED_MODULE_0__/* .SentryError */ .b("Invalid Sentry Dsn: Invalid projectId " + projectId);
6597
- }
6598
- if (!isValidProtocol(protocol)) {
6599
- throw new _error__WEBPACK_IMPORTED_MODULE_0__/* .SentryError */ .b("Invalid Sentry Dsn: Invalid protocol " + protocol);
6600
- }
6601
- if (port && isNaN(parseInt(port, 10))) {
6602
- throw new _error__WEBPACK_IMPORTED_MODULE_0__/* .SentryError */ .b("Invalid Sentry Dsn: Invalid port " + port);
6603
  }
6604
- return true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6605
  }
 
6606
  /** The Sentry Dsn, identifying a Sentry instance and project. */
6607
  function makeDsn(from) {
6608
- var components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);
6609
- validateDsn(components);
6610
- return components;
6611
  }
6612
- //# sourceMappingURL=dsn.js.map
6613
 
6614
- /***/ }),
 
 
 
 
 
 
 
 
 
 
 
6615
 
6616
- /***/ 6872:
6617
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
 
 
6618
 
6619
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6620
- /* harmony export */ "a": function() { return /* binding */ SeverityLevels; }
6621
- /* harmony export */ });
6622
- var SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'critical'];
6623
- //# sourceMappingURL=enums.js.map
6624
 
6625
  /***/ }),
6626
 
@@ -6644,29 +5969,34 @@ var SeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug', 'crit
6644
  * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want
6645
  * users to be able to shake away expressions that it guards.
6646
  */
 
6647
  /**
6648
  * Figures out if we're building a browser bundle.
6649
  *
6650
  * @returns true if this is a browser bundle build.
6651
  */
6652
  function isBrowserBundle() {
6653
- return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;
6654
  }
 
 
6655
  //# sourceMappingURL=env.js.map
6656
 
 
6657
  /***/ }),
6658
 
6659
  /***/ 6894:
6660
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6661
 
6662
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
 
 
6663
  /* harmony export */ "Jd": function() { return /* binding */ createEnvelope; },
6664
- /* harmony export */ "y7": function() { return /* binding */ getEnvelopeType; },
 
6665
  /* harmony export */ "V$": function() { return /* binding */ serializeEnvelope; }
6666
  /* harmony export */ });
6667
- /* unused harmony export addItemToEnvelope */
6668
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4715);
6669
- /* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1757);
6670
 
6671
 
6672
  /**
@@ -6674,46 +6004,121 @@ function isBrowserBundle() {
6674
  * Make sure to always explicitly provide the generic to this function
6675
  * so that the envelope types resolve correctly.
6676
  */
6677
- function createEnvelope(headers, items) {
6678
- if (items === void 0) { items = []; }
6679
- return [headers, items];
6680
  }
 
6681
  /**
6682
  * Add an item to an envelope.
6683
  * Make sure to always explicitly provide the generic to this function
6684
  * so that the envelope types resolve correctly.
6685
  */
6686
  function addItemToEnvelope(envelope, newItem) {
6687
- var _a = __read(envelope, 2), headers = _a[0], items = _a[1];
6688
- return [headers, __spread(items, [newItem])];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6689
  }
 
6690
  /**
6691
- * Get the type of the envelope. Grabs the type from the first envelope item.
6692
  */
6693
- function getEnvelopeType(envelope) {
6694
- var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__read */ .CR)(envelope, 2), _b = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__read */ .CR)(_a[1], 1), _c = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__read */ .CR)(_b[0], 1), firstItemHeader = _c[0];
6695
- return firstItemHeader.type;
 
 
 
 
 
 
 
 
 
 
 
 
 
6696
  }
 
 
 
 
 
 
 
 
 
 
 
6697
  /**
6698
- * Serializes an envelope into a string.
6699
  */
6700
- function serializeEnvelope(envelope) {
6701
- var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__read */ .CR)(envelope, 2), headers = _a[0], items = _a[1];
6702
- var serializedHeaders = JSON.stringify(headers);
6703
- // Have to cast items to any here since Envelope is a union type
6704
- // Fixed in Typescript 4.2
6705
- // TODO: Remove any[] cast when we upgrade to TS 4.2
6706
- // https://github.com/microsoft/TypeScript/issues/36390
6707
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
6708
- return items.reduce(function (acc, item) {
6709
- var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__read */ .CR)(item, 2), itemHeaders = _a[0], payload = _a[1];
6710
- // We do not serialize payloads that are primitives
6711
- var serializedPayload = (0,_is__WEBPACK_IMPORTED_MODULE_1__/* .isPrimitive */ .pt)(payload) ? String(payload) : JSON.stringify(payload);
6712
- return acc + "\n" + JSON.stringify(itemHeaders) + "\n" + serializedPayload;
6713
- }, serializedHeaders);
6714
  }
 
 
6715
  //# sourceMappingURL=envelope.js.map
6716
 
 
6717
  /***/ }),
6718
 
6719
  /***/ 4388:
@@ -6722,50 +6127,22 @@ function serializeEnvelope(envelope) {
6722
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6723
  /* harmony export */ "b": function() { return /* binding */ SentryError; }
6724
  /* harmony export */ });
6725
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4715);
6726
- /* harmony import */ var _polyfill__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(467);
6727
-
6728
-
6729
  /** An error emitted by Sentry SDKs and related utilities. */
6730
- var SentryError = /** @class */ (function (_super) {
6731
- (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__extends */ .ZT)(SentryError, _super);
6732
- function SentryError(message) {
6733
- var _newTarget = this.constructor;
6734
- var _this = _super.call(this, message) || this;
6735
- _this.message = message;
6736
- _this.name = _newTarget.prototype.constructor.name;
6737
- (0,_polyfill__WEBPACK_IMPORTED_MODULE_1__/* .setPrototypeOf */ .f)(_this, _newTarget.prototype);
6738
- return _this;
6739
- }
6740
- return SentryError;
6741
- }(Error));
6742
 
6743
- //# sourceMappingURL=error.js.map
 
6744
 
6745
- /***/ }),
 
 
 
6746
 
6747
- /***/ 1923:
6748
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6749
 
6750
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6751
- /* harmony export */ "h": function() { return /* binding */ IS_DEBUG_BUILD; }
6752
- /* harmony export */ });
6753
- /*
6754
- * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking
6755
- * for users.
6756
- *
6757
- * Debug flags need to be declared in each package individually and must not be imported across package boundaries,
6758
- * because some build tools have trouble tree-shaking imported guards.
6759
- *
6760
- * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.
6761
- *
6762
- * Debug flag files will contain "magic strings" like `__SENTRY_DEBUG__` that may get replaced with actual values during
6763
- * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not
6764
- * replaced.
6765
- */
6766
- /** Flag that is true for debug builds, false otherwise. */
6767
- var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;
6768
- //# sourceMappingURL=flags.js.map
6769
 
6770
  /***/ }),
6771
 
@@ -6776,27 +6153,28 @@ var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_D
6776
  /* harmony export */ "R": function() { return /* binding */ getGlobalObject; },
6777
  /* harmony export */ "Y": function() { return /* binding */ getGlobalSingleton; }
6778
  /* harmony export */ });
6779
- /* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7392);
6780
- /**
6781
- * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
6782
- * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.
6783
- */
6784
 
6785
  var fallbackGlobalObject = {};
 
6786
  /**
6787
  * Safely get global scope object
6788
  *
6789
  * @returns Global scope object
6790
  */
6791
  function getGlobalObject() {
6792
- return ((0,_node__WEBPACK_IMPORTED_MODULE_0__/* .isNodeEnv */ .KV)()
6793
- ? window
6794
- : typeof window !== 'undefined' // eslint-disable-line no-restricted-globals
6795
- ? window // eslint-disable-line no-restricted-globals
6796
- : typeof self !== 'undefined'
6797
- ? self
6798
- : fallbackGlobalObject);
6799
  }
 
6800
  /**
6801
  * Returns a global singleton contained in the global `__SENTRY__` object.
6802
  *
@@ -6809,13 +6187,16 @@ function getGlobalObject() {
6809
  * @returns the singleton
6810
  */
6811
  function getGlobalSingleton(name, creator, obj) {
6812
- var global = (obj || getGlobalObject());
6813
- var __SENTRY__ = (global.__SENTRY__ = global.__SENTRY__ || {});
6814
- var singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());
6815
- return singleton;
6816
  }
 
 
6817
  //# sourceMappingURL=global.js.map
6818
 
 
6819
  /***/ }),
6820
 
6821
  /***/ 4005:
@@ -6824,14 +6205,12 @@ function getGlobalSingleton(name, creator, obj) {
6824
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6825
  /* harmony export */ "o": function() { return /* binding */ addInstrumentationHandler; }
6826
  /* harmony export */ });
6827
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4715);
6828
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1923);
6829
- /* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
6830
- /* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1757);
6831
- /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8536);
6832
- /* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1995);
6833
- /* harmony import */ var _stacktrace__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9038);
6834
- /* harmony import */ var _supports__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(9798);
6835
 
6836
 
6837
 
@@ -6839,8 +6218,8 @@ function getGlobalSingleton(name, creator, obj) {
6839
 
6840
 
6841
 
 
6842
 
6843
- var global = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
6844
  /**
6845
  * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.
6846
  * - Console API
@@ -6851,354 +6230,361 @@ var global = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)()
6851
  * - Error API
6852
  * - UnhandledRejection API
6853
  */
 
6854
  var handlers = {};
6855
  var instrumented = {};
 
6856
  /** Instruments given API */
6857
  function instrument(type) {
6858
- if (instrumented[type]) {
6859
- return;
6860
- }
6861
- instrumented[type] = true;
6862
- switch (type) {
6863
- case 'console':
6864
- instrumentConsole();
6865
- break;
6866
- case 'dom':
6867
- instrumentDOM();
6868
- break;
6869
- case 'xhr':
6870
- instrumentXHR();
6871
- break;
6872
- case 'fetch':
6873
- instrumentFetch();
6874
- break;
6875
- case 'history':
6876
- instrumentHistory();
6877
- break;
6878
- case 'error':
6879
- instrumentError();
6880
- break;
6881
- case 'unhandledrejection':
6882
- instrumentUnhandledRejection();
6883
- break;
6884
- default:
6885
- _flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h && _logger__WEBPACK_IMPORTED_MODULE_2__/* .logger.warn */ .kg.warn('unknown instrumentation type:', type);
6886
- return;
6887
- }
 
 
6888
  }
 
6889
  /**
6890
  * Add handler that will be called when given type of instrumentation triggers.
6891
  * Use at your own risk, this might break without changelog notice, only used internally.
6892
  * @hidden
6893
  */
6894
  function addInstrumentationHandler(type, callback) {
6895
- handlers[type] = handlers[type] || [];
6896
- handlers[type].push(callback);
6897
- instrument(type);
6898
  }
 
6899
  /** JSDoc */
6900
  function triggerHandlers(type, data) {
6901
- var e_1, _a;
6902
- if (!type || !handlers[type]) {
6903
- return;
6904
- }
 
6905
  try {
6906
- for (var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__values */ .XA)(handlers[type] || []), _c = _b.next(); !_c.done; _c = _b.next()) {
6907
- var handler = _c.value;
6908
- try {
6909
- handler(data);
6910
- }
6911
- catch (e) {
6912
- _flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h &&
6913
- _logger__WEBPACK_IMPORTED_MODULE_2__/* .logger.error */ .kg.error("Error while triggering instrumentation handler.\nType: " + type + "\nName: " + (0,_stacktrace__WEBPACK_IMPORTED_MODULE_4__/* .getFunctionName */ .$P)(handler) + "\nError:", e);
6914
- }
6915
- }
6916
- }
6917
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
6918
- finally {
6919
- try {
6920
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
6921
- }
6922
- finally { if (e_1) throw e_1.error; }
6923
  }
 
6924
  }
 
6925
  /** JSDoc */
6926
  function instrumentConsole() {
6927
- if (!('console' in global)) {
6928
- return;
 
 
 
 
 
6929
  }
6930
- _logger__WEBPACK_IMPORTED_MODULE_2__/* .CONSOLE_LEVELS.forEach */ .RU.forEach(function (level) {
6931
- if (!(level in global.console)) {
6932
- return;
 
 
 
 
 
6933
  }
6934
- (0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(global.console, level, function (originalConsoleMethod) {
6935
- return function () {
6936
- var args = [];
6937
- for (var _i = 0; _i < arguments.length; _i++) {
6938
- args[_i] = arguments[_i];
6939
- }
6940
- triggerHandlers('console', { args: args, level: level });
6941
- // this fails for some browsers. :(
6942
- if (originalConsoleMethod) {
6943
- originalConsoleMethod.apply(global.console, args);
6944
- }
6945
- };
6946
- });
6947
  });
 
6948
  }
 
6949
  /** JSDoc */
6950
  function instrumentFetch() {
6951
- if (!(0,_supports__WEBPACK_IMPORTED_MODULE_6__/* .supportsNativeFetch */ .t$)()) {
6952
- return;
6953
- }
6954
- (0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(global, 'fetch', function (originalFetch) {
6955
- return function () {
6956
- var args = [];
6957
- for (var _i = 0; _i < arguments.length; _i++) {
6958
- args[_i] = arguments[_i];
6959
- }
6960
- var handlerData = {
6961
- args: args,
6962
- fetchData: {
6963
- method: getFetchMethod(args),
6964
- url: getFetchUrl(args),
6965
- },
6966
- startTimestamp: Date.now(),
6967
- };
6968
- triggerHandlers('fetch', (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)({}, handlerData));
6969
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
6970
- return originalFetch.apply(global, args).then(function (response) {
6971
- triggerHandlers('fetch', (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)({}, handlerData), { endTimestamp: Date.now(), response: response }));
6972
- return response;
6973
- }, function (error) {
6974
- triggerHandlers('fetch', (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__assign */ .pi)({}, handlerData), { endTimestamp: Date.now(), error: error }));
6975
- // NOTE: If you are a Sentry user, and you are seeing this stack frame,
6976
- // it means the sentry.javascript SDK caught an error invoking your application code.
6977
- // This is expected behavior and NOT indicative of a bug with sentry.javascript.
6978
- throw error;
6979
- });
6980
- };
6981
- });
 
 
 
 
 
 
 
 
 
 
 
6982
  }
6983
- /* eslint-disable @typescript-eslint/no-unsafe-member-access */
6984
  /** Extract `method` from fetch call arguments */
6985
- function getFetchMethod(fetchArgs) {
6986
- if (fetchArgs === void 0) { fetchArgs = []; }
6987
- if ('Request' in global && (0,_is__WEBPACK_IMPORTED_MODULE_7__/* .isInstanceOf */ .V9)(fetchArgs[0], Request) && fetchArgs[0].method) {
6988
- return String(fetchArgs[0].method).toUpperCase();
6989
- }
6990
- if (fetchArgs[1] && fetchArgs[1].method) {
6991
- return String(fetchArgs[1].method).toUpperCase();
6992
- }
6993
- return 'GET';
6994
  }
 
6995
  /** Extract `url` from fetch call arguments */
6996
- function getFetchUrl(fetchArgs) {
6997
- if (fetchArgs === void 0) { fetchArgs = []; }
6998
- if (typeof fetchArgs[0] === 'string') {
6999
- return fetchArgs[0];
7000
- }
7001
- if ('Request' in global && (0,_is__WEBPACK_IMPORTED_MODULE_7__/* .isInstanceOf */ .V9)(fetchArgs[0], Request)) {
7002
- return fetchArgs[0].url;
7003
- }
7004
- return String(fetchArgs[0]);
7005
  }
7006
- /* eslint-enable @typescript-eslint/no-unsafe-member-access */
7007
  /** JSDoc */
7008
  function instrumentXHR() {
7009
- if (!('XMLHttpRequest' in global)) {
7010
- return;
7011
- }
7012
- var xhrproto = XMLHttpRequest.prototype;
7013
- (0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(xhrproto, 'open', function (originalOpen) {
7014
- return function () {
7015
- var args = [];
7016
- for (var _i = 0; _i < arguments.length; _i++) {
7017
- args[_i] = arguments[_i];
7018
- }
7019
- // eslint-disable-next-line @typescript-eslint/no-this-alias
7020
  var xhr = this;
7021
- var url = args[1];
7022
- var xhrInfo = (xhr.__sentry_xhr__ = {
7023
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
7024
- method: (0,_is__WEBPACK_IMPORTED_MODULE_7__/* .isString */ .HD)(args[0]) ? args[0].toUpperCase() : args[0],
7025
- url: args[1],
7026
- });
7027
- // if Sentry key appears in URL, don't capture it as a request
7028
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
7029
- if ((0,_is__WEBPACK_IMPORTED_MODULE_7__/* .isString */ .HD)(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) {
7030
- xhr.__sentry_own_request__ = true;
7031
- }
7032
- var onreadystatechangeHandler = function () {
7033
- if (xhr.readyState === 4) {
7034
- try {
7035
- // touching statusCode in some platforms throws
7036
- // an exception
7037
- xhrInfo.status_code = xhr.status;
7038
- }
7039
- catch (e) {
7040
- /* do nothing */
7041
- }
7042
- triggerHandlers('xhr', {
7043
- args: args,
7044
- endTimestamp: Date.now(),
7045
- startTimestamp: Date.now(),
7046
- xhr: xhr,
7047
- });
7048
- }
7049
- };
7050
- if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {
7051
- (0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(xhr, 'onreadystatechange', function (original) {
7052
- return function () {
7053
- var readyStateArgs = [];
7054
- for (var _i = 0; _i < arguments.length; _i++) {
7055
- readyStateArgs[_i] = arguments[_i];
7056
- }
7057
- onreadystatechangeHandler();
7058
- return original.apply(xhr, readyStateArgs);
7059
- };
7060
- });
7061
- }
7062
- else {
7063
- xhr.addEventListener('readystatechange', onreadystatechangeHandler);
7064
- }
7065
- return originalOpen.apply(xhr, args);
7066
- };
7067
- });
7068
- (0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(xhrproto, 'send', function (originalSend) {
7069
- return function () {
7070
- var args = [];
7071
- for (var _i = 0; _i < arguments.length; _i++) {
7072
- args[_i] = arguments[_i];
7073
- }
7074
- if (this.__sentry_xhr__ && args[0] !== undefined) {
7075
- this.__sentry_xhr__.body = args[0];
7076
- }
7077
- triggerHandlers('xhr', {
7078
- args: args,
7079
- startTimestamp: Date.now(),
7080
- xhr: this,
7081
- });
7082
- return originalSend.apply(this, args);
7083
- };
7084
- });
7085
  }
7086
- var lastHref;
 
 
7087
  /** JSDoc */
7088
  function instrumentHistory() {
7089
- if (!(0,_supports__WEBPACK_IMPORTED_MODULE_6__/* .supportsHistory */ .Bf)()) {
7090
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7091
  }
7092
- var oldOnPopState = global.onpopstate;
7093
- global.onpopstate = function () {
7094
- var args = [];
7095
- for (var _i = 0; _i < arguments.length; _i++) {
7096
- args[_i] = arguments[_i];
7097
- }
7098
- var to = global.location.href;
7099
- // keep track of the current URL state, as we always receive only the updated state
7100
  var from = lastHref;
 
 
7101
  lastHref = to;
7102
  triggerHandlers('history', {
7103
- from: from,
7104
- to: to,
7105
  });
7106
- if (oldOnPopState) {
7107
- // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.
7108
- // https://github.com/getsentry/sentry-javascript/issues/3344
7109
- // https://github.com/bugsnag/bugsnag-js/issues/469
7110
- try {
7111
- return oldOnPopState.apply(this, args);
7112
- }
7113
- catch (_oO) {
7114
- // no-empty
7115
- }
7116
- }
7117
  };
7118
- /** @hidden */
7119
- function historyReplacementFunction(originalHistoryFunction) {
7120
- return function () {
7121
- var args = [];
7122
- for (var _i = 0; _i < arguments.length; _i++) {
7123
- args[_i] = arguments[_i];
7124
- }
7125
- var url = args.length > 2 ? args[2] : undefined;
7126
- if (url) {
7127
- // coerce to string (this is what pushState does)
7128
- var from = lastHref;
7129
- var to = String(url);
7130
- // keep track of the current URL state, as we always receive only the updated state
7131
- lastHref = to;
7132
- triggerHandlers('history', {
7133
- from: from,
7134
- to: to,
7135
- });
7136
- }
7137
- return originalHistoryFunction.apply(this, args);
7138
- };
7139
- }
7140
- (0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(global.history, 'pushState', historyReplacementFunction);
7141
- (0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(global.history, 'replaceState', historyReplacementFunction);
7142
  }
 
7143
  var debounceDuration = 1000;
7144
- var debounceTimerID;
7145
- var lastCapturedEvent;
 
7146
  /**
7147
  * Decide whether the current event should finish the debounce of previously captured one.
7148
  * @param previous previously captured event
7149
  * @param current event to be captured
7150
  */
7151
  function shouldShortcircuitPreviousDebounce(previous, current) {
7152
- // If there was no previous event, it should always be swapped for the new one.
7153
- if (!previous) {
7154
- return true;
7155
- }
7156
- // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.
7157
- if (previous.type !== current.type) {
7158
- return true;
7159
- }
7160
- try {
7161
- // If both events have the same type, it's still possible that actions were performed on different targets.
7162
- // e.g. 2 clicks on different buttons.
7163
- if (previous.target !== current.target) {
7164
- return true;
7165
- }
7166
- }
7167
- catch (e) {
7168
- // just accessing `target` property can throw an exception in some rare circumstances
7169
- // see: https://github.com/getsentry/sentry-javascript/issues/838
7170
  }
7171
- // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_
7172
- // to which an event listener was attached), we treat them as the same action, as we want to capture
7173
- // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.
7174
- return false;
 
 
 
 
 
7175
  }
 
7176
  /**
7177
  * Decide whether an event should be captured.
7178
  * @param event event to be captured
7179
  */
7180
  function shouldSkipDOMEvent(event) {
7181
- // We are only interested in filtering `keypress` events for now.
7182
- if (event.type !== 'keypress') {
7183
- return false;
7184
- }
7185
- try {
7186
- var target = event.target;
7187
- if (!target || !target.tagName) {
7188
- return true;
7189
- }
7190
- // Only consider keypress events on actual input elements. This will disregard keypresses targeting body
7191
- // e.g.tabbing through elements, hotkeys, etc.
7192
- if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {
7193
- return false;
7194
- }
7195
  }
7196
- catch (e) {
7197
- // just accessing `target` property can throw an exception in some rare circumstances
7198
- // see: https://github.com/getsentry/sentry-javascript/issues/838
 
 
7199
  }
7200
- return true;
 
 
 
 
 
7201
  }
 
7202
  /**
7203
  * Wraps addEventListener to capture UI breadcrumbs
7204
  * @param handler function that will be triggered
@@ -7206,182 +6592,212 @@ function shouldSkipDOMEvent(event) {
7206
  * @returns wrapped breadcrumb events handler
7207
  * @hidden
7208
  */
7209
- function makeDOMEventHandler(handler, globalListener) {
7210
- if (globalListener === void 0) { globalListener = false; }
7211
- return function (event) {
7212
- // It's possible this handler might trigger multiple times for the same
7213
- // event (e.g. event propagation through node ancestors).
7214
- // Ignore if we've already captured that event.
7215
- if (!event || lastCapturedEvent === event) {
7216
- return;
7217
- }
7218
- // We always want to skip _some_ events.
7219
- if (shouldSkipDOMEvent(event)) {
7220
- return;
7221
- }
7222
- var name = event.type === 'keypress' ? 'input' : event.type;
7223
- // If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons.
7224
- if (debounceTimerID === undefined) {
7225
- handler({
7226
- event: event,
7227
- name: name,
7228
- global: globalListener,
7229
- });
7230
- lastCapturedEvent = event;
7231
- }
7232
- // If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one.
7233
- // If that's the case, emit the previous event and store locally the newly-captured DOM event.
7234
- else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) {
7235
- handler({
7236
- event: event,
7237
- name: name,
7238
- global: globalListener,
7239
- });
7240
- lastCapturedEvent = event;
7241
- }
7242
- // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.
7243
- clearTimeout(debounceTimerID);
7244
- debounceTimerID = global.setTimeout(function () {
7245
- debounceTimerID = undefined;
7246
- }, debounceDuration);
7247
- };
 
 
 
7248
  }
 
7249
  /** JSDoc */
7250
  function instrumentDOM() {
7251
- if (!('document' in global)) {
7252
- return;
7253
- }
7254
- // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom
7255
- // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before
7256
- // we instrument `addEventListener` so that we don't end up attaching this handler twice.
7257
- var triggerDOMHandler = triggerHandlers.bind(null, 'dom');
7258
- var globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);
7259
- global.document.addEventListener('click', globalDOMEventHandler, false);
7260
- global.document.addEventListener('keypress', globalDOMEventHandler, false);
7261
- // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled
7262
- // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That
7263
- // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler
7264
- // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still
7265
- // guaranteed to fire at least once.)
7266
- ['EventTarget', 'Node'].forEach(function (target) {
7267
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
7268
- var proto = global[target] && global[target].prototype;
7269
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins
7270
  if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {
7271
- return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7272
  }
7273
- (0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(proto, 'addEventListener', function (originalAddEventListener) {
7274
- return function (type, listener, options) {
7275
- if (type === 'click' || type == 'keypress') {
7276
- try {
7277
- var el = this;
7278
- var handlers_1 = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});
7279
- var handlerForType = (handlers_1[type] = handlers_1[type] || { refCount: 0 });
7280
- if (!handlerForType.handler) {
7281
- var handler = makeDOMEventHandler(triggerDOMHandler);
7282
- handlerForType.handler = handler;
7283
- originalAddEventListener.call(this, type, handler, options);
7284
- }
7285
- handlerForType.refCount += 1;
7286
- }
7287
- catch (e) {
7288
- // Accessing dom properties is always fragile.
7289
- // Also allows us to skip `addEventListenrs` calls with no proper `this` context.
7290
- }
7291
- }
7292
- return originalAddEventListener.call(this, type, listener, options);
7293
- };
7294
- });
7295
- (0,_object__WEBPACK_IMPORTED_MODULE_5__/* .fill */ .hl)(proto, 'removeEventListener', function (originalRemoveEventListener) {
7296
- return function (type, listener, options) {
7297
- if (type === 'click' || type == 'keypress') {
7298
- try {
7299
- var el = this;
7300
- var handlers_2 = el.__sentry_instrumentation_handlers__ || {};
7301
- var handlerForType = handlers_2[type];
7302
- if (handlerForType) {
7303
- handlerForType.refCount -= 1;
7304
- // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.
7305
- if (handlerForType.refCount <= 0) {
7306
- originalRemoveEventListener.call(this, type, handlerForType.handler, options);
7307
- handlerForType.handler = undefined;
7308
- delete handlers_2[type]; // eslint-disable-line @typescript-eslint/no-dynamic-delete
7309
- }
7310
- // If there are no longer any custom handlers of any type on this element, cleanup everything.
7311
- if (Object.keys(handlers_2).length === 0) {
7312
- delete el.__sentry_instrumentation_handlers__;
7313
- }
7314
- }
7315
- }
7316
- catch (e) {
7317
- // Accessing dom properties is always fragile.
7318
- // Also allows us to skip `addEventListenrs` calls with no proper `this` context.
7319
- }
7320
- }
7321
- return originalRemoveEventListener.call(this, type, listener, options);
7322
- };
7323
- });
7324
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7325
  }
7326
- var _oldOnErrorHandler = null;
 
7327
  /** JSDoc */
7328
  function instrumentError() {
7329
- _oldOnErrorHandler = global.onerror;
7330
- global.onerror = function (msg, url, line, column, error) {
7331
- triggerHandlers('error', {
7332
- column: column,
7333
- error: error,
7334
- line: line,
7335
- msg: msg,
7336
- url: url,
7337
- });
7338
- if (_oldOnErrorHandler) {
7339
- // eslint-disable-next-line prefer-rest-params
 
7340
  return _oldOnErrorHandler.apply(this, arguments);
7341
- }
7342
- return false;
7343
- };
 
7344
  }
7345
- var _oldOnUnhandledRejectionHandler = null;
 
7346
  /** JSDoc */
7347
  function instrumentUnhandledRejection() {
7348
- _oldOnUnhandledRejectionHandler = global.onunhandledrejection;
7349
- global.onunhandledrejection = function (e) {
7350
- triggerHandlers('unhandledrejection', e);
7351
- if (_oldOnUnhandledRejectionHandler) {
7352
- // eslint-disable-next-line prefer-rest-params
 
7353
  return _oldOnUnhandledRejectionHandler.apply(this, arguments);
7354
- }
7355
- return true;
7356
- };
 
7357
  }
 
 
7358
  //# sourceMappingURL=instrument.js.map
7359
 
 
7360
  /***/ }),
7361
 
7362
  /***/ 1757:
7363
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7364
 
7365
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7366
- /* harmony export */ "VZ": function() { return /* binding */ isError; },
7367
- /* harmony export */ "VW": function() { return /* binding */ isErrorEvent; },
7368
  /* harmony export */ "TX": function() { return /* binding */ isDOMError; },
7369
  /* harmony export */ "fm": function() { return /* binding */ isDOMException; },
7370
- /* harmony export */ "HD": function() { return /* binding */ isString; },
7371
- /* harmony export */ "pt": function() { return /* binding */ isPrimitive; },
7372
- /* harmony export */ "PO": function() { return /* binding */ isPlainObject; },
7373
- /* harmony export */ "cO": function() { return /* binding */ isEvent; },
7374
  /* harmony export */ "kK": function() { return /* binding */ isElement; },
 
 
 
 
 
 
 
7375
  /* harmony export */ "Kj": function() { return /* binding */ isRegExp; },
7376
- /* harmony export */ "J8": function() { return /* binding */ isThenable; },
7377
  /* harmony export */ "Cy": function() { return /* binding */ isSyntheticEvent; },
7378
- /* harmony export */ "i2": function() { return /* binding */ isNaN; },
7379
- /* harmony export */ "V9": function() { return /* binding */ isInstanceOf; }
7380
  /* harmony export */ });
7381
- /* eslint-disable @typescript-eslint/no-explicit-any */
7382
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
7383
- // eslint-disable-next-line @typescript-eslint/unbound-method
7384
  var objectToString = Object.prototype.toString;
 
7385
  /**
7386
  * Checks whether given value's type is one of a few Error or Error-like
7387
  * {@link isError}.
@@ -7390,18 +6806,20 @@ var objectToString = Object.prototype.toString;
7390
  * @returns A boolean representing the result.
7391
  */
7392
  function isError(wat) {
7393
- switch (objectToString.call(wat)) {
7394
- case '[object Error]':
7395
- case '[object Exception]':
7396
- case '[object DOMException]':
7397
- return true;
7398
- default:
7399
- return isInstanceOf(wat, Error);
7400
- }
7401
  }
 
7402
  function isBuiltin(wat, ty) {
7403
- return objectToString.call(wat) === "[object " + ty + "]";
7404
  }
 
7405
  /**
7406
  * Checks whether given value's type is ErrorEvent
7407
  * {@link isErrorEvent}.
@@ -7410,8 +6828,9 @@ function isBuiltin(wat, ty) {
7410
  * @returns A boolean representing the result.
7411
  */
7412
  function isErrorEvent(wat) {
7413
- return isBuiltin(wat, 'ErrorEvent');
7414
  }
 
7415
  /**
7416
  * Checks whether given value's type is DOMError
7417
  * {@link isDOMError}.
@@ -7420,8 +6839,9 @@ function isErrorEvent(wat) {
7420
  * @returns A boolean representing the result.
7421
  */
7422
  function isDOMError(wat) {
7423
- return isBuiltin(wat, 'DOMError');
7424
  }
 
7425
  /**
7426
  * Checks whether given value's type is DOMException
7427
  * {@link isDOMException}.
@@ -7430,8 +6850,9 @@ function isDOMError(wat) {
7430
  * @returns A boolean representing the result.
7431
  */
7432
  function isDOMException(wat) {
7433
- return isBuiltin(wat, 'DOMException');
7434
  }
 
7435
  /**
7436
  * Checks whether given value's type is a string
7437
  * {@link isString}.
@@ -7440,8 +6861,9 @@ function isDOMException(wat) {
7440
  * @returns A boolean representing the result.
7441
  */
7442
  function isString(wat) {
7443
- return isBuiltin(wat, 'String');
7444
  }
 
7445
  /**
7446
  * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)
7447
  * {@link isPrimitive}.
@@ -7450,8 +6872,9 @@ function isString(wat) {
7450
  * @returns A boolean representing the result.
7451
  */
7452
  function isPrimitive(wat) {
7453
- return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');
7454
  }
 
7455
  /**
7456
  * Checks whether given value's type is an object literal
7457
  * {@link isPlainObject}.
@@ -7460,8 +6883,9 @@ function isPrimitive(wat) {
7460
  * @returns A boolean representing the result.
7461
  */
7462
  function isPlainObject(wat) {
7463
- return isBuiltin(wat, 'Object');
7464
  }
 
7465
  /**
7466
  * Checks whether given value's type is an Event instance
7467
  * {@link isEvent}.
@@ -7470,8 +6894,9 @@ function isPlainObject(wat) {
7470
  * @returns A boolean representing the result.
7471
  */
7472
  function isEvent(wat) {
7473
- return typeof Event !== 'undefined' && isInstanceOf(wat, Event);
7474
  }
 
7475
  /**
7476
  * Checks whether given value's type is an Element instance
7477
  * {@link isElement}.
@@ -7480,8 +6905,9 @@ function isEvent(wat) {
7480
  * @returns A boolean representing the result.
7481
  */
7482
  function isElement(wat) {
7483
- return typeof Element !== 'undefined' && isInstanceOf(wat, Element);
7484
  }
 
7485
  /**
7486
  * Checks whether given value's type is an regexp
7487
  * {@link isRegExp}.
@@ -7490,16 +6916,17 @@ function isElement(wat) {
7490
  * @returns A boolean representing the result.
7491
  */
7492
  function isRegExp(wat) {
7493
- return isBuiltin(wat, 'RegExp');
7494
  }
 
7495
  /**
7496
  * Checks whether given value has a then function.
7497
  * @param wat A value to be checked.
7498
  */
7499
  function isThenable(wat) {
7500
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
7501
  return Boolean(wat && wat.then && typeof wat.then === 'function');
7502
  }
 
7503
  /**
7504
  * Checks whether given value's type is a SyntheticEvent
7505
  * {@link isSyntheticEvent}.
@@ -7508,8 +6935,9 @@ function isThenable(wat) {
7508
  * @returns A boolean representing the result.
7509
  */
7510
  function isSyntheticEvent(wat) {
7511
- return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;
7512
  }
 
7513
  /**
7514
  * Checks whether given value is NaN
7515
  * {@link isNaN}.
@@ -7518,8 +6946,9 @@ function isSyntheticEvent(wat) {
7518
  * @returns A boolean representing the result.
7519
  */
7520
  function isNaN(wat) {
7521
- return typeof wat === 'number' && wat !== wat;
7522
  }
 
7523
  /**
7524
  * Checks whether given value's type is an instance of provided constructor.
7525
  * {@link isInstanceOf}.
@@ -7529,15 +6958,17 @@ function isNaN(wat) {
7529
  * @returns A boolean representing the result.
7530
  */
7531
  function isInstanceOf(wat, base) {
7532
- try {
7533
- return wat instanceof base;
7534
- }
7535
- catch (_e) {
7536
- return false;
7537
- }
7538
  }
 
 
7539
  //# sourceMappingURL=is.js.map
7540
 
 
7541
  /***/ }),
7542
 
7543
  /***/ 8536:
@@ -7548,17 +6979,17 @@ function isInstanceOf(wat, base) {
7548
  /* harmony export */ "Cf": function() { return /* binding */ consoleSandbox; },
7549
  /* harmony export */ "kg": function() { return /* binding */ logger; }
7550
  /* harmony export */ });
7551
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4715);
7552
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1923);
7553
- /* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
7554
-
7555
 
7556
 
7557
  // TODO: Implement different loggers for different environments
7558
- var global = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
 
7559
  /** Prefix for logging strings */
7560
  var PREFIX = 'Sentry Logger ';
7561
- var CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert'];
 
 
7562
  /**
7563
  * Temporarily disable sentry console instrumentations.
7564
  *
@@ -7566,76 +6997,78 @@ var CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert'];
7566
  * @returns The results of the callback
7567
  */
7568
  function consoleSandbox(callback) {
7569
- var global = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
7570
- if (!('console' in global)) {
7571
- return callback();
7572
- }
7573
- var originalConsole = global.console;
7574
- var wrappedLevels = {};
7575
- // Restore all wrapped console methods
7576
- CONSOLE_LEVELS.forEach(function (level) {
7577
- // TODO(v7): Remove this check as it's only needed for Node 6
7578
- var originalWrappedFunc = originalConsole[level] && originalConsole[level].__sentry_original__;
7579
- if (level in global.console && originalWrappedFunc) {
7580
- wrappedLevels[level] = originalConsole[level];
7581
- originalConsole[level] = originalWrappedFunc;
7582
- }
 
 
 
 
 
 
 
 
 
 
 
 
7583
  });
7584
- try {
7585
- return callback();
7586
- }
7587
- finally {
7588
- // Revert restoration to wrapped state
7589
- Object.keys(wrappedLevels).forEach(function (level) {
7590
- originalConsole[level] = wrappedLevels[level];
7591
- });
7592
- }
7593
  }
 
7594
  function makeLogger() {
7595
- var enabled = false;
7596
- var logger = {
7597
- enable: function () {
7598
- enabled = true;
7599
- },
7600
- disable: function () {
7601
- enabled = false;
7602
- },
7603
- };
7604
- if (_flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h) {
7605
- CONSOLE_LEVELS.forEach(function (name) {
7606
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
7607
- logger[name] = function () {
7608
- var args = [];
7609
- for (var _i = 0; _i < arguments.length; _i++) {
7610
- args[_i] = arguments[_i];
7611
- }
7612
- if (enabled) {
7613
- consoleSandbox(function () {
7614
- var _a;
7615
- (_a = global.console)[name].apply(_a, (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__spread */ .fl)([PREFIX + "[" + name + "]:"], args));
7616
- });
7617
- }
7618
- };
7619
- });
7620
- }
7621
- else {
7622
- CONSOLE_LEVELS.forEach(function (name) {
7623
- logger[name] = function () { return undefined; };
7624
- });
7625
- }
7626
- return logger;
7627
  }
 
7628
  // Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used
7629
- var logger;
7630
- if (_flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h) {
7631
- logger = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalSingleton */ .Y)('logger', makeLogger);
7632
- }
7633
- else {
7634
- logger = makeLogger();
7635
  }
7636
 
 
7637
  //# sourceMappingURL=logger.js.map
7638
 
 
7639
  /***/ }),
7640
 
7641
  /***/ 4048:
@@ -7644,106 +7077,112 @@ else {
7644
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7645
  /* harmony export */ "i": function() { return /* binding */ memoBuilder; }
7646
  /* harmony export */ });
7647
- /* eslint-disable @typescript-eslint/no-unsafe-member-access */
7648
- /* eslint-disable @typescript-eslint/no-explicit-any */
7649
  /**
7650
  * Helper to decycle json objects
7651
  */
7652
  function memoBuilder() {
7653
- var hasWeakSet = typeof WeakSet === 'function';
7654
- var inner = hasWeakSet ? new WeakSet() : [];
7655
- function memoize(obj) {
7656
- if (hasWeakSet) {
7657
- if (inner.has(obj)) {
7658
- return true;
7659
- }
7660
- inner.add(obj);
7661
- return false;
7662
- }
7663
- // eslint-disable-next-line @typescript-eslint/prefer-for-of
7664
- for (var i = 0; i < inner.length; i++) {
7665
- var value = inner[i];
7666
- if (value === obj) {
7667
- return true;
7668
- }
7669
- }
7670
- inner.push(obj);
7671
- return false;
7672
  }
7673
- function unmemoize(obj) {
7674
- if (hasWeakSet) {
7675
- inner.delete(obj);
7676
- }
7677
- else {
7678
- for (var i = 0; i < inner.length; i++) {
7679
- if (inner[i] === obj) {
7680
- inner.splice(i, 1);
7681
- break;
7682
- }
7683
- }
 
 
 
 
 
 
 
7684
  }
 
7685
  }
7686
- return [memoize, unmemoize];
 
7687
  }
 
 
7688
  //# sourceMappingURL=memo.js.map
7689
 
 
7690
  /***/ }),
7691
 
7692
  /***/ 3699:
7693
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7694
 
7695
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7696
- /* harmony export */ "DM": function() { return /* binding */ uuid4; },
7697
- /* harmony export */ "en": function() { return /* binding */ parseUrl; },
7698
- /* harmony export */ "jH": function() { return /* binding */ getEventDescription; },
7699
- /* harmony export */ "Db": function() { return /* binding */ addExceptionTypeValue; },
7700
  /* harmony export */ "EG": function() { return /* binding */ addExceptionMechanism; },
7701
- /* harmony export */ "YO": function() { return /* binding */ checkOrSetAlreadyCaught; }
 
 
 
 
7702
  /* harmony export */ });
7703
- /* unused harmony exports parseSemver, addContextToFrame, stripUrlQueryAndFragment */
7704
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4715);
7705
- /* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
7706
- /* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1995);
7707
 
7708
 
7709
 
7710
 
 
 
 
 
7711
  /**
7712
  * UUID4 generator
7713
  *
7714
  * @returns string Generated UUID4.
7715
  */
7716
  function uuid4() {
7717
- var global = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
7718
- var crypto = global.crypto || global.msCrypto;
7719
- if (!(crypto === void 0) && crypto.getRandomValues) {
7720
- // Use window.crypto API if available
7721
- var arr = new Uint16Array(8);
7722
- crypto.getRandomValues(arr);
7723
- // set 4 in byte 7
7724
- // eslint-disable-next-line no-bitwise
 
7725
  arr[3] = (arr[3] & 0xfff) | 0x4000;
7726
- // set 2 most significant bits of byte 9 to '10'
7727
- // eslint-disable-next-line no-bitwise
7728
  arr[4] = (arr[4] & 0x3fff) | 0x8000;
7729
- var pad = function (num) {
7730
- var v = num.toString(16);
7731
- while (v.length < 4) {
7732
- v = "0" + v;
7733
- }
7734
- return v;
7735
- };
7736
- 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]));
7737
- }
7738
- // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
7739
- return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
7740
- // eslint-disable-next-line no-bitwise
 
 
 
7741
  var r = (Math.random() * 16) | 0;
7742
- // eslint-disable-next-line no-bitwise
7743
  var v = c === 'x' ? r : (r & 0x3) | 0x8;
7744
- return v.toString(16);
7745
- });
7746
  }
 
7747
  /**
7748
  * Parses string form of URL into an object
7749
  * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
@@ -7751,45 +7190,54 @@ function uuid4() {
7751
  * // environments where DOM might not be available
7752
  * @returns parsed URL object
7753
  */
7754
- function parseUrl(url) {
7755
- if (!url) {
7756
- return {};
7757
- }
7758
- var match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
7759
- if (!match) {
7760
- return {};
7761
- }
7762
- // coerce to undefined values to empty string so we don't get 'undefined'
7763
- var query = match[6] || '';
7764
- var fragment = match[8] || '';
7765
- return {
7766
- host: match[4],
7767
- path: match[5],
7768
- protocol: match[2],
7769
- relative: match[5] + query + fragment,
7770
- };
 
 
 
 
 
7771
  }
 
7772
  function getFirstException(event) {
7773
- return event.exception && event.exception.values ? event.exception.values[0] : undefined;
7774
  }
 
7775
  /**
7776
  * Extracts either message or type+value from an event that can be used for user-facing logs
7777
  * @returns event's description
7778
  */
7779
  function getEventDescription(event) {
7780
- var message = event.message, eventId = event.event_id;
7781
- if (message) {
7782
- return message;
7783
- }
7784
- var firstException = getFirstException(event);
7785
- if (firstException) {
7786
- if (firstException.type && firstException.value) {
7787
- return firstException.type + ": " + firstException.value;
7788
- }
7789
- return firstException.type || firstException.value || eventId || '<unknown>';
7790
  }
7791
- return eventId || '<unknown>';
 
 
7792
  }
 
7793
  /**
7794
  * Adds exception values, type and value to an synthetic Exception.
7795
  * @param event The event to modify.
@@ -7798,16 +7246,17 @@ function getEventDescription(event) {
7798
  * @hidden
7799
  */
7800
  function addExceptionTypeValue(event, value, type) {
7801
- var exception = (event.exception = event.exception || {});
7802
- var values = (exception.values = exception.values || []);
7803
- var firstException = (values[0] = values[0] || {});
7804
- if (!firstException.value) {
7805
- firstException.value = value || '';
7806
- }
7807
- if (!firstException.type) {
7808
- firstException.type = type || 'Error';
7809
- }
7810
  }
 
7811
  /**
7812
  * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.
7813
  *
@@ -7816,37 +7265,47 @@ function addExceptionTypeValue(event, value, type) {
7816
  * @hidden
7817
  */
7818
  function addExceptionMechanism(event, newMechanism) {
7819
- var firstException = getFirstException(event);
7820
- if (!firstException) {
7821
- return;
7822
- }
7823
- var defaultMechanism = { type: 'generic', handled: true };
7824
- var currentMechanism = firstException.mechanism;
7825
- firstException.mechanism = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .pi)({}, defaultMechanism), currentMechanism), newMechanism);
7826
- if (newMechanism && 'data' in newMechanism) {
7827
- var mergedData = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .pi)({}, (currentMechanism && currentMechanism.data)), newMechanism.data);
7828
- firstException.mechanism.data = mergedData;
7829
- }
 
 
7830
  }
 
7831
  // https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
7832
- var 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-]+)*))?$/;
 
 
 
 
 
 
7833
  /**
7834
  * Parses input into a SemVer interface
7835
  * @param input string representation of a semver version
7836
  */
7837
  function parseSemver(input) {
7838
- var match = input.match(SEMVER_REGEXP) || [];
7839
- var major = parseInt(match[1], 10);
7840
- var minor = parseInt(match[2], 10);
7841
- var patch = parseInt(match[3], 10);
7842
- return {
7843
- buildmetadata: match[5],
7844
- major: isNaN(major) ? undefined : major,
7845
- minor: isNaN(minor) ? undefined : minor,
7846
- patch: isNaN(patch) ? undefined : patch,
7847
- prerelease: match[4],
7848
- };
7849
  }
 
7850
  /**
7851
  * This function adds context (pre/post/line) lines to the provided frame
7852
  *
@@ -7854,19 +7313,22 @@ function parseSemver(input) {
7854
  * @param frame StackFrame that will be mutated
7855
  * @param linesOfContext number of context lines we want to add pre/post
7856
  */
7857
- function addContextToFrame(lines, frame, linesOfContext) {
7858
- if (linesOfContext === void 0) { linesOfContext = 5; }
7859
- var lineno = frame.lineno || 0;
7860
- var maxLines = lines.length;
7861
- var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);
7862
- frame.pre_context = lines
7863
- .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)
7864
- .map(function (line) { return snipLine(line, 0); });
7865
- frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);
7866
- frame.post_context = lines
7867
- .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)
7868
- .map(function (line) { return snipLine(line, 0); });
 
 
7869
  }
 
7870
  /**
7871
  * Strip the query string and fragment off of a given URL or path (if present)
7872
  *
@@ -7874,9 +7336,9 @@ function addContextToFrame(lines, frame, linesOfContext) {
7874
  * @returns URL or path without query string or fragment
7875
  */
7876
  function stripUrlQueryAndFragment(urlPath) {
7877
- // eslint-disable-next-line no-useless-escape
7878
  return urlPath.split(/[\?#]/, 1)[0];
7879
  }
 
7880
  /**
7881
  * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object
7882
  * in question), and marks it captured if not.
@@ -7899,34 +7361,39 @@ function stripUrlQueryAndFragment(urlPath) {
7899
  * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)
7900
  */
7901
  function checkOrSetAlreadyCaught(exception) {
7902
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
7903
- if (exception && exception.__sentry_captured__) {
7904
- return true;
7905
- }
7906
- try {
7907
- // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the
7908
- // `ExtraErrorData` integration
7909
- (0,_object__WEBPACK_IMPORTED_MODULE_2__/* .addNonEnumerableProperty */ .xp)(exception, '__sentry_captured__', true);
7910
- }
7911
- catch (err) {
7912
- // `exception` is a primitive, so we can't mark it seen
7913
- }
7914
- return false;
7915
  }
 
 
7916
  //# sourceMappingURL=misc.js.map
7917
 
 
7918
  /***/ }),
7919
 
7920
  /***/ 7392:
7921
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
7922
 
7923
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7924
- /* harmony export */ "KV": function() { return /* binding */ isNodeEnv; },
7925
- /* harmony export */ "l$": function() { return /* binding */ dynamicRequire; }
7926
  /* harmony export */ });
7927
  /* unused harmony export loadModule */
7928
- /* harmony import */ var _env__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4285);
7929
  /* module decorator */ module = __webpack_require__.hmd(module);
 
 
7930
  /**
7931
  * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
7932
  * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.
@@ -7938,21 +7405,23 @@ function checkOrSetAlreadyCaught(exception) {
7938
  * @returns Answer to given question
7939
  */
7940
  function isNodeEnv() {
7941
- // explicitly check for browser bundles as those can be optimized statically
7942
- // by terser/rollup.
7943
- return (!(0,_env__WEBPACK_IMPORTED_MODULE_0__/* .isBrowserBundle */ .n)() &&
7944
- Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]');
 
 
7945
  }
 
7946
  /**
7947
  * Requires a module which is protected against bundler minification.
7948
  *
7949
  * @param request The module path to resolve
7950
  */
7951
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any
7952
  function dynamicRequire(mod, request) {
7953
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
7954
  return mod.require(request);
7955
  }
 
7956
  /**
7957
  * Helper for dynamically loading module that should work with linked dependencies.
7958
  * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`
@@ -7967,24 +7436,28 @@ function dynamicRequire(mod, request) {
7967
  * @returns possibly required module
7968
  */
7969
  function loadModule(moduleName) {
7970
- var mod;
7971
- try {
7972
- mod = dynamicRequire(module, moduleName);
7973
- }
7974
- catch (e) {
7975
- // no-empty
7976
- }
7977
- try {
7978
- var cwd = dynamicRequire(module, 'process').cwd;
7979
- mod = dynamicRequire(module, cwd() + "/node_modules/" + moduleName);
7980
- }
7981
- catch (e) {
7982
- // no-empty
7983
- }
7984
- return mod;
 
7985
  }
 
 
7986
  //# sourceMappingURL=node.js.map
7987
 
 
7988
  /***/ }),
7989
 
7990
  /***/ 8035:
@@ -7995,11 +7468,10 @@ function loadModule(moduleName) {
7995
  /* harmony export */ "Qy": function() { return /* binding */ normalizeToSize; }
7996
  /* harmony export */ });
7997
  /* unused harmony export walk */
7998
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4715);
7999
- /* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1757);
8000
- /* harmony import */ var _memo__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4048);
8001
- /* harmony import */ var _object__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1995);
8002
- /* harmony import */ var _stacktrace__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9038);
8003
 
8004
 
8005
 
@@ -8024,31 +7496,32 @@ function loadModule(moduleName) {
8024
  * object in the normallized output..
8025
  * @returns A normalized version of the object, or `"**non-serializable**"` if any errors are thrown during normalization.
8026
  */
8027
- function normalize(input, depth, maxProperties) {
8028
- if (depth === void 0) { depth = +Infinity; }
8029
- if (maxProperties === void 0) { maxProperties = +Infinity; }
8030
- try {
8031
- // since we're at the outermost level, there is no key
8032
- return visit('', input, depth, maxProperties);
8033
- }
8034
- catch (err) {
8035
- return { ERROR: "**non-serializable** (" + err + ")" };
8036
- }
8037
  }
 
8038
  /** JSDoc */
8039
- function normalizeToSize(object,
8040
- // Default Node.js REPL depth
8041
- depth,
8042
- // 100kB, as 200kB is max payload size, so half sounds reasonable
8043
- maxSize) {
8044
- if (depth === void 0) { depth = 3; }
8045
- if (maxSize === void 0) { maxSize = 100 * 1024; }
8046
- var normalized = normalize(object, depth);
8047
- if (jsonSize(normalized) > maxSize) {
8048
- return normalizeToSize(object, depth - 1, maxSize);
8049
- }
8050
- return normalized;
 
 
8051
  }
 
8052
  /**
8053
  * Visits a node to perform normalization on it
8054
  *
@@ -8058,68 +7531,92 @@ maxSize) {
8058
  * @param maxProperties Optional maximum number of properties/elements included in any single object/array
8059
  * @param memo Optional Memo class handling decycling
8060
  */
8061
- function visit(key, value, depth, maxProperties, memo) {
8062
- if (depth === void 0) { depth = +Infinity; }
8063
- if (maxProperties === void 0) { maxProperties = +Infinity; }
8064
- if (memo === void 0) { memo = (0,_memo__WEBPACK_IMPORTED_MODULE_0__/* .memoBuilder */ .i)(); }
8065
- var _a = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__read */ .CR)(memo, 2), memoize = _a[0], unmemoize = _a[1];
8066
- // If the value has a `toJSON` method, see if we can bail and let it do the work
8067
- var valueWithToJSON = value;
8068
- if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {
8069
- try {
8070
- return valueWithToJSON.toJSON();
8071
- }
8072
- catch (err) {
8073
- // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)
8074
- }
 
 
8075
  }
8076
- // Get the simple cases out of the way first
8077
- if (value === null || (['number', 'boolean', 'string'].includes(typeof value) && !(0,_is__WEBPACK_IMPORTED_MODULE_2__/* .isNaN */ .i2)(value))) {
8078
- return value;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8079
  }
8080
- var stringified = stringifyValue(key, value);
8081
- // Anything we could potentially dig into more (objects or arrays) will have come back as `"[object XXXX]"`.
8082
- // Everything else will have already been serialized, so if we don't see that pattern, we're done.
8083
- if (!stringified.startsWith('[object ')) {
8084
- return stringified;
8085
- }
8086
- // We're also done if we've reached the max depth
8087
- if (depth === 0) {
8088
- // At this point we know `serialized` is a string of the form `"[object XXXX]"`. Clean it up so it's just `"[XXXX]"`.
8089
- return stringified.replace('object ', '');
8090
- }
8091
- // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.
8092
- if (memoize(value)) {
8093
- return '[Circular ~]';
8094
- }
8095
- // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse
8096
- // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each
8097
- // property/entry, and keep track of the number of items we add to it.
8098
- var normalized = (Array.isArray(value) ? [] : {});
8099
- var numAdded = 0;
8100
- // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant
8101
- // properties are non-enumerable and otherwise would get missed.
8102
- var visitable = ((0,_is__WEBPACK_IMPORTED_MODULE_2__/* .isError */ .VZ)(value) || (0,_is__WEBPACK_IMPORTED_MODULE_2__/* .isEvent */ .cO)(value) ? (0,_object__WEBPACK_IMPORTED_MODULE_3__/* .convertToPlainObject */ .Sh)(value) : value);
8103
- for (var visitKey in visitable) {
8104
- // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.
8105
- if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {
8106
- continue;
8107
- }
8108
- if (numAdded >= maxProperties) {
8109
- normalized[visitKey] = '[MaxProperties ~]';
8110
- break;
8111
- }
8112
- // Recursively visit all the child nodes
8113
- var visitValue = visitable[visitKey];
8114
- normalized[visitKey] = visit(visitKey, visitValue, depth - 1, maxProperties, memo);
8115
- numAdded += 1;
8116
- }
8117
- // Once we've visited all the branches, remove the parent from memo storage
8118
- unmemoize(value);
8119
- // Return accumulated values
8120
- return normalized;
8121
  }
8122
- // TODO remove this in v7 (this means the method will no longer be exported, under any name)
8123
 
8124
  /**
8125
  * Stringify the given value. Handles various known special values and types.
@@ -8130,92 +7627,106 @@ function visit(key, value, depth, maxProperties, memo) {
8130
  * @param value The value to stringify
8131
  * @returns A stringified representation of the given value
8132
  */
8133
- function stringifyValue(key,
8134
- // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for
8135
- // our internal use, it'll do
8136
- value) {
8137
- try {
8138
- if (key === 'domain' && value && typeof value === 'object' && value._events) {
8139
- return '[Domain]';
8140
- }
8141
- if (key === 'domainEmitter') {
8142
- return '[DomainEmitter]';
8143
- }
8144
- // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first
8145
- // which won't throw if they are not present.
8146
- if (typeof window !== 'undefined' && value === window) {
8147
- return '[Global]';
8148
- }
8149
- // eslint-disable-next-line no-restricted-globals
 
 
 
 
 
8150
  if (typeof window !== 'undefined' && value === window) {
8151
- return '[Window]';
8152
- }
8153
- // eslint-disable-next-line no-restricted-globals
8154
  if (typeof document !== 'undefined' && value === document) {
8155
- return '[Document]';
8156
- }
8157
- // React's SyntheticEvent thingy
8158
- if ((0,_is__WEBPACK_IMPORTED_MODULE_2__/* .isSyntheticEvent */ .Cy)(value)) {
8159
- return '[SyntheticEvent]';
8160
- }
8161
- if (typeof value === 'number' && value !== value) {
8162
- return '[NaN]';
8163
- }
8164
- // this catches `undefined` (but not `null`, which is a primitive and can be serialized on its own)
8165
- if (value === void 0) {
8166
- return '[undefined]';
8167
- }
8168
- if (typeof value === 'function') {
8169
- return "[Function: " + (0,_stacktrace__WEBPACK_IMPORTED_MODULE_4__/* .getFunctionName */ .$P)(value) + "]";
8170
- }
8171
- if (typeof value === 'symbol') {
8172
- return "[" + String(value) + "]";
8173
- }
8174
- // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion
8175
- if (typeof value === 'bigint') {
8176
- return "[BigInt: " + String(value) + "]";
8177
- }
8178
- // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting
8179
- // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as
8180
- // `"[object Object]"`. If we instead look at the constructor's name (which is the same as the name of the class),
8181
- // we can make sure that only plain objects come out that way.
8182
- return "[object " + Object.getPrototypeOf(value).constructor.name + "]";
8183
  }
8184
- catch (err) {
8185
- return "**non-serializable** (" + err + ")";
 
 
8186
  }
 
 
 
 
 
 
 
 
 
8187
  }
 
8188
  /** Calculates bytes size of input string */
8189
  function utf8Length(value) {
8190
- // eslint-disable-next-line no-bitwise
8191
  return ~-encodeURI(value).split(/%..|./).length;
8192
  }
 
8193
  /** Calculates bytes size of input object */
8194
  function jsonSize(value) {
8195
- return utf8Length(JSON.stringify(value));
8196
  }
 
 
8197
  //# sourceMappingURL=normalize.js.map
8198
 
 
8199
  /***/ }),
8200
 
8201
  /***/ 1995:
8202
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8203
 
8204
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8205
- /* harmony export */ "hl": function() { return /* binding */ fill; },
8206
  /* harmony export */ "xp": function() { return /* binding */ addNonEnumerableProperty; },
8207
- /* harmony export */ "$Q": function() { return /* binding */ markFunctionWrapped; },
8208
- /* harmony export */ "HK": function() { return /* binding */ getOriginalFunction; },
8209
- /* harmony export */ "_j": function() { return /* binding */ urlEncode; },
8210
  /* harmony export */ "Sh": function() { return /* binding */ convertToPlainObject; },
 
8211
  /* harmony export */ "zf": function() { return /* binding */ extractExceptionKeysForMessage; },
8212
- /* harmony export */ "Jr": function() { return /* binding */ dropUndefinedKeys; }
 
 
 
8213
  /* harmony export */ });
8214
  /* unused harmony export objectify */
8215
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4715);
8216
- /* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4194);
8217
- /* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1757);
8218
- /* harmony import */ var _string__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9660);
8219
 
8220
 
8221
 
@@ -8232,24 +7743,27 @@ function jsonSize(value) {
8232
  * @returns void
8233
  */
8234
  function fill(source, name, replacementFactory) {
8235
- if (!(name in source)) {
8236
- return;
8237
- }
8238
- var original = source[name];
8239
- var wrapped = replacementFactory(original);
8240
- // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work
8241
- // otherwise it'll throw "TypeError: Object.defineProperties called on non-object"
8242
- if (typeof wrapped === 'function') {
8243
- try {
8244
- markFunctionWrapped(wrapped, original);
8245
- }
8246
- catch (_Oo) {
8247
- // This can throw if multiple fill happens on a global object like XMLHttpRequest
8248
- // Fixes https://github.com/getsentry/sentry-javascript/issues/2043
8249
- }
8250
  }
8251
- source[name] = wrapped;
 
 
8252
  }
 
8253
  /**
8254
  * Defines a non-enumerable property on the given object.
8255
  *
@@ -8258,13 +7772,14 @@ function fill(source, name, replacementFactory) {
8258
  * @param value The value to which to set the property
8259
  */
8260
  function addNonEnumerableProperty(obj, name, value) {
8261
- Object.defineProperty(obj, name, {
8262
- // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it
8263
- value: value,
8264
- writable: true,
8265
- configurable: true,
8266
- });
8267
  }
 
8268
  /**
8269
  * Remembers the original function on the wrapped function and
8270
  * patches up the prototype.
@@ -8273,10 +7788,11 @@ function addNonEnumerableProperty(obj, name, value) {
8273
  * @param original the original function that gets wrapped
8274
  */
8275
  function markFunctionWrapped(wrapped, original) {
8276
- var proto = original.prototype || {};
8277
- wrapped.prototype = original.prototype = proto;
8278
- addNonEnumerableProperty(wrapped, '__sentry_original__', original);
8279
  }
 
8280
  /**
8281
  * This extracts the original function if available. See
8282
  * `markFunctionWrapped` for more information.
@@ -8285,8 +7801,9 @@ function markFunctionWrapped(wrapped, original) {
8285
  * @returns the unwrapped version of the function if available.
8286
  */
8287
  function getOriginalFunction(func) {
8288
- return func.__sentry_original__;
8289
  }
 
8290
  /**
8291
  * Encodes given object into url-friendly format
8292
  *
@@ -8294,107 +7811,164 @@ function getOriginalFunction(func) {
8294
  * @returns string Encoded
8295
  */
8296
  function urlEncode(object) {
8297
- return Object.keys(object)
8298
- .map(function (key) { return encodeURIComponent(key) + "=" + encodeURIComponent(object[key]); })
8299
- .join('&');
8300
  }
 
8301
  /**
8302
- * Transforms any object into an object literal with all its attributes
8303
- * attached to it.
8304
  *
8305
  * @param value Initial source that we have to transform in order for it to be usable by the serializer
 
 
8306
  */
8307
- function convertToPlainObject(value) {
8308
- var newObj = value;
8309
- if ((0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isError */ .VZ)(value)) {
8310
- newObj = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .pi)({ message: value.message, name: value.name, stack: value.stack }, getOwnProperties(value));
8311
- }
8312
- else if ((0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isEvent */ .cO)(value)) {
8313
- var event_1 = value;
8314
- newObj = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__assign */ .pi)({ type: event_1.type, target: serializeEventTarget(event_1.target), currentTarget: serializeEventTarget(event_1.currentTarget) }, getOwnProperties(event_1));
8315
- if (typeof CustomEvent !== 'undefined' && (0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isInstanceOf */ .V9)(value, CustomEvent)) {
8316
- newObj.detail = event_1.detail;
8317
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
8318
  }
 
8319
  return newObj;
 
 
 
8320
  }
 
8321
  /** Creates a string representation of the target of an `Event` object */
8322
  function serializeEventTarget(target) {
8323
- try {
8324
- return (0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isElement */ .kK)(target) ? (0,_browser__WEBPACK_IMPORTED_MODULE_2__/* .htmlTreeAsString */ .R)(target) : Object.prototype.toString.call(target);
8325
- }
8326
- catch (_oO) {
8327
- return '<unknown>';
8328
- }
8329
  }
 
8330
  /** Filters out all but an object's own properties */
8331
  function getOwnProperties(obj) {
 
8332
  var extractedProps = {};
8333
  for (var property in obj) {
8334
- if (Object.prototype.hasOwnProperty.call(obj, property)) {
8335
- extractedProps[property] = obj[property];
8336
- }
8337
  }
8338
  return extractedProps;
 
 
 
8339
  }
 
8340
  /**
8341
  * Given any captured exception, extract its keys and create a sorted
8342
  * and truncated list that will be used inside the event message.
8343
  * eg. `Non-error exception captured with keys: foo, bar, baz`
8344
  */
8345
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
8346
- function extractExceptionKeysForMessage(exception, maxLength) {
8347
- if (maxLength === void 0) { maxLength = 40; }
8348
- var keys = Object.keys(convertToPlainObject(exception));
8349
- keys.sort();
8350
- if (!keys.length) {
8351
- return '[object has no keys]';
8352
- }
8353
- if (keys[0].length >= maxLength) {
8354
- return (0,_string__WEBPACK_IMPORTED_MODULE_3__/* .truncate */ .$G)(keys[0], maxLength);
8355
- }
8356
- for (var includedKeys = keys.length; includedKeys > 0; includedKeys--) {
8357
- var serialized = keys.slice(0, includedKeys).join(', ');
8358
- if (serialized.length > maxLength) {
8359
- continue;
8360
- }
8361
- if (includedKeys === keys.length) {
8362
- return serialized;
8363
- }
8364
- return (0,_string__WEBPACK_IMPORTED_MODULE_3__/* .truncate */ .$G)(serialized, maxLength);
8365
  }
8366
- return '';
 
 
 
 
 
 
8367
  }
 
8368
  /**
8369
- * Given any object, return the new object with removed keys that value was `undefined`.
8370
  * Works recursively on objects and arrays.
 
 
8371
  */
8372
- function dropUndefinedKeys(val) {
8373
- var e_1, _a;
8374
- if ((0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isPlainObject */ .PO)(val)) {
8375
- var rv = {};
8376
- try {
8377
- for (var _b = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__values */ .XA)(Object.keys(val)), _c = _b.next(); !_c.done; _c = _b.next()) {
8378
- var key = _c.value;
8379
- if (typeof val[key] !== 'undefined') {
8380
- rv[key] = dropUndefinedKeys(val[key]);
8381
- }
8382
- }
8383
- }
8384
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
8385
- finally {
8386
- try {
8387
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
8388
- }
8389
- finally { if (e_1) throw e_1.error; }
8390
- }
8391
- return rv;
 
 
 
 
 
 
8392
  }
8393
- if (Array.isArray(val)) {
8394
- return val.map(dropUndefinedKeys);
 
 
 
 
 
 
 
8395
  }
8396
- return val;
 
 
 
 
 
 
 
 
 
 
 
 
8397
  }
 
8398
  /**
8399
  * Ensure that something is an object.
8400
  *
@@ -8405,63 +7979,35 @@ function dropUndefinedKeys(val) {
8405
  * @returns A version of `wat` which can safely be used with `Object` class methods
8406
  */
8407
  function objectify(wat) {
8408
- var objectified;
8409
- switch (true) {
8410
- case wat === undefined || wat === null:
8411
- objectified = new String(wat);
8412
- break;
8413
- // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason
8414
- // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as
8415
- // an object in order to wrap it.
8416
- case typeof wat === 'symbol' || typeof wat === 'bigint':
8417
- objectified = Object(wat);
8418
- break;
8419
- // this will catch the remaining primitives: `String`, `Number`, and `Boolean`
8420
- case isPrimitive(wat):
8421
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
8422
- objectified = new wat.constructor(wat);
8423
- break;
8424
- // by process of elimination, at this point we know that `wat` must already be an object
8425
- default:
8426
- objectified = wat;
8427
- break;
8428
- }
8429
- return objectified;
8430
- }
8431
- //# sourceMappingURL=object.js.map
8432
 
8433
- /***/ }),
 
 
 
 
 
8434
 
8435
- /***/ 467:
8436
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
 
8437
 
8438
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8439
- /* harmony export */ "f": function() { return /* binding */ setPrototypeOf; }
8440
- /* harmony export */ });
8441
- var setPrototypeOf = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties);
8442
- /**
8443
- * setPrototypeOf polyfill using __proto__
8444
- */
8445
- // eslint-disable-next-line @typescript-eslint/ban-types
8446
- function setProtoOf(obj, proto) {
8447
- // @ts-ignore __proto__ does not exist on obj
8448
- obj.__proto__ = proto;
8449
- return obj;
8450
  }
8451
- /**
8452
- * setPrototypeOf polyfill using mixin
8453
- */
8454
- // eslint-disable-next-line @typescript-eslint/ban-types
8455
- function mixinProperties(obj, proto) {
8456
- for (var prop in proto) {
8457
- if (!Object.prototype.hasOwnProperty.call(obj, prop)) {
8458
- // @ts-ignore typescript complains about indexing so we remove
8459
- obj[prop] = proto[prop];
8460
- }
8461
- }
8462
- return obj;
8463
- }
8464
- //# sourceMappingURL=polyfill.js.map
8465
 
8466
  /***/ }),
8467
 
@@ -8471,8 +8017,9 @@ function mixinProperties(obj, proto) {
8471
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8472
  /* harmony export */ "x": function() { return /* binding */ makePromiseBuffer; }
8473
  /* harmony export */ });
8474
- /* harmony import */ var _error__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4388);
8475
- /* harmony import */ var _syncpromise__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7946);
 
8476
 
8477
 
8478
  /**
@@ -8480,233 +8027,253 @@ function mixinProperties(obj, proto) {
8480
  * @param limit max number of promises that can be stored in the buffer
8481
  */
8482
  function makePromiseBuffer(limit) {
8483
- var buffer = [];
8484
- function isReady() {
8485
- return limit === undefined || buffer.length < limit;
8486
- }
8487
- /**
8488
- * Remove a promise from the queue.
8489
- *
8490
- * @param task Can be any PromiseLike<T>
8491
- * @returns Removed promise.
8492
- */
8493
- function remove(task) {
8494
- return buffer.splice(buffer.indexOf(task), 1)[0];
8495
- }
8496
- /**
8497
- * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.
8498
- *
8499
- * @param taskProducer A function producing any PromiseLike<T>; In previous versions this used to be `task:
8500
- * PromiseLike<T>`, but under that model, Promises were instantly created on the call-site and their executor
8501
- * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By
8502
- * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer
8503
- * limit check.
8504
- * @returns The original promise.
8505
- */
8506
- function add(taskProducer) {
8507
- if (!isReady()) {
8508
- return (0,_syncpromise__WEBPACK_IMPORTED_MODULE_0__/* .rejectedSyncPromise */ .$2)(new _error__WEBPACK_IMPORTED_MODULE_1__/* .SentryError */ .b('Not adding Promise due to buffer limit reached.'));
8509
- }
8510
- // start the task and add its promise to the queue
8511
- var task = taskProducer();
8512
- if (buffer.indexOf(task) === -1) {
8513
- buffer.push(task);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8514
  }
8515
- void task
8516
- .then(function () { return remove(task); })
8517
- // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`
8518
- // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't
8519
- // have promises, so TS has to polyfill when down-compiling.)
8520
- .then(null, function () {
8521
- return remove(task).then(null, function () {
8522
- // We have to add another catch here because `remove()` starts a new promise chain.
8523
- });
8524
- });
8525
- return task;
8526
- }
8527
- /**
8528
- * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.
8529
- *
8530
- * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or
8531
- * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to
8532
- * `true`.
8533
- * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and
8534
- * `false` otherwise
8535
- */
8536
- function drain(timeout) {
8537
- return new _syncpromise__WEBPACK_IMPORTED_MODULE_0__/* .SyncPromise */ .cW(function (resolve, reject) {
8538
- var counter = buffer.length;
8539
- if (!counter) {
8540
- return resolve(true);
8541
- }
8542
- // wait for `timeout` ms and then resolve to `false` (if not cancelled first)
8543
- var capturedSetTimeout = setTimeout(function () {
8544
- if (timeout && timeout > 0) {
8545
- resolve(false);
8546
- }
8547
- }, timeout);
8548
- // if all promises resolve in time, cancel the timer and resolve to `true`
8549
- buffer.forEach(function (item) {
8550
- void (0,_syncpromise__WEBPACK_IMPORTED_MODULE_0__/* .resolvedSyncPromise */ .WD)(item).then(function () {
8551
- // eslint-disable-next-line no-plusplus
8552
  if (!--counter) {
8553
- clearTimeout(capturedSetTimeout);
8554
- resolve(true);
8555
- }
8556
- }, reject);
8557
- });
8558
- });
8559
- }
8560
- return {
8561
- $: buffer,
8562
- add: add,
8563
- drain: drain,
8564
- };
 
8565
  }
 
 
8566
  //# sourceMappingURL=promisebuffer.js.map
8567
 
 
8568
  /***/ }),
8569
 
8570
  /***/ 1630:
8571
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8572
 
8573
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8574
- /* harmony export */ "ns": function() { return /* binding */ disabledUntil; },
8575
  /* harmony export */ "Q": function() { return /* binding */ isRateLimited; },
8576
  /* harmony export */ "WG": function() { return /* binding */ updateRateLimits; }
8577
  /* harmony export */ });
8578
- /* unused harmony exports DEFAULT_RETRY_AFTER, parseRetryAfterHeader */
8579
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4715);
8580
 
8581
  var DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds
 
8582
  /**
8583
  * Extracts Retry-After value from the request header or returns default value
8584
  * @param header string representation of 'Retry-After' header
8585
  * @param now current unix timestamp
8586
  *
8587
  */
8588
- function parseRetryAfterHeader(header, now) {
8589
- if (now === void 0) { now = Date.now(); }
8590
- var headerDelay = parseInt("" + header, 10);
8591
- if (!isNaN(headerDelay)) {
8592
- return headerDelay * 1000;
8593
- }
8594
- var headerDate = Date.parse("" + header);
8595
- if (!isNaN(headerDate)) {
8596
- return headerDate - now;
8597
- }
8598
- return DEFAULT_RETRY_AFTER;
 
8599
  }
 
8600
  /**
8601
  * Gets the time that given category is disabled until for rate limiting
8602
  */
8603
  function disabledUntil(limits, category) {
8604
- return limits[category] || limits.all || 0;
8605
  }
 
8606
  /**
8607
  * Checks if a category is rate limited
8608
  */
8609
- function isRateLimited(limits, category, now) {
8610
- if (now === void 0) { now = Date.now(); }
8611
- return disabledUntil(limits, category) > now;
8612
  }
 
8613
  /**
8614
  * Update ratelimits from incoming headers.
8615
  * Returns true if headers contains a non-empty rate limiting header.
8616
  */
8617
- function updateRateLimits(limits, headers, now) {
8618
- var e_1, _a, e_2, _b;
8619
- if (now === void 0) { now = Date.now(); }
8620
- var updatedRateLimits = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, limits);
8621
- // "The name is case-insensitive."
8622
- // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get
8623
- var rateLimitHeader = headers['x-sentry-rate-limits'];
8624
- var retryAfterHeader = headers['retry-after'];
8625
- if (rateLimitHeader) {
8626
- try {
8627
- /**
8628
- * rate limit headers are of the form
8629
- * <header>,<header>,..
8630
- * where each <header> is of the form
8631
- * <retry_after>: <categories>: <scope>: <reason_code>
8632
- * where
8633
- * <retry_after> is a delay in seconds
8634
- * <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form
8635
- * <category>;<category>;...
8636
- * <scope> is what's being limited (org, project, or key) - ignored by SDK
8637
- * <reason_code> is an arbitrary string like "org_quota" - ignored by SDK
8638
- */
8639
- for (var _c = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__values */ .XA)(rateLimitHeader.trim().split(',')), _d = _c.next(); !_d.done; _d = _c.next()) {
8640
- var limit = _d.value;
8641
- var parameters = limit.split(':', 2);
8642
- var headerDelay = parseInt(parameters[0], 10);
8643
- var delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default
8644
- if (!parameters[1]) {
8645
- updatedRateLimits.all = now + delay;
8646
- }
8647
- else {
8648
- try {
8649
- for (var _e = (e_2 = void 0, (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__values */ .XA)(parameters[1].split(';'))), _f = _e.next(); !_f.done; _f = _e.next()) {
8650
- var category = _f.value;
8651
- updatedRateLimits[category] = now + delay;
8652
- }
8653
- }
8654
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
8655
- finally {
8656
- try {
8657
- if (_f && !_f.done && (_b = _e.return)) _b.call(_e);
8658
- }
8659
- finally { if (e_2) throw e_2.error; }
8660
- }
8661
- }
8662
- }
8663
- }
8664
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
8665
- finally {
8666
- try {
8667
- if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
8668
- }
8669
- finally { if (e_1) throw e_1.error; }
8670
  }
 
8671
  }
8672
- else if (retryAfterHeader) {
8673
- updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);
8674
- }
8675
- return updatedRateLimits;
 
 
 
8676
  }
 
 
8677
  //# sourceMappingURL=ratelimit.js.map
8678
 
 
8679
  /***/ }),
8680
 
8681
  /***/ 8653:
8682
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8683
 
8684
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8685
- /* harmony export */ "E": function() { return /* binding */ severityFromString; }
8686
  /* harmony export */ });
8687
- /* harmony import */ var _sentry_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2226);
8688
- /* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6872);
 
 
 
 
 
 
 
 
8689
 
 
8690
 
8691
- function isSupportedSeverity(level) {
8692
- return _enums__WEBPACK_IMPORTED_MODULE_0__/* .SeverityLevels.indexOf */ .a.indexOf(level) !== -1;
8693
- }
8694
  /**
8695
- * Converts a string-based level into a {@link Severity}.
8696
  *
8697
- * @param level string representation of Severity
 
 
8698
  * @returns Severity
8699
  */
8700
  function severityFromString(level) {
8701
- if (level === 'warn')
8702
- return _sentry_types__WEBPACK_IMPORTED_MODULE_1__/* .Severity.Warning */ .z.Warning;
8703
- if (isSupportedSeverity(level)) {
8704
- return level;
8705
- }
8706
- return _sentry_types__WEBPACK_IMPORTED_MODULE_1__/* .Severity.Log */ .z.Log;
 
 
 
 
 
8707
  }
 
 
8708
  //# sourceMappingURL=severity.js.map
8709
 
 
8710
  /***/ }),
8711
 
8712
  /***/ 9038:
@@ -8714,12 +8281,14 @@ function severityFromString(level) {
8714
 
8715
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8716
  /* harmony export */ "pE": function() { return /* binding */ createStackParser; },
8717
- /* harmony export */ "$P": function() { return /* binding */ getFunctionName; }
 
8718
  /* harmony export */ });
8719
- /* unused harmony export stripSentryFramesAndReverse */
8720
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4715);
8721
 
8722
  var STACKTRACE_LIMIT = 50;
 
8723
  /**
8724
  * Creates a stack parser with the supplied line parsers
8725
  *
@@ -8727,121 +8296,183 @@ var STACKTRACE_LIMIT = 50;
8727
  * frames and with Sentry SDK internal frames removed from the top and bottom
8728
  *
8729
  */
8730
- function createStackParser() {
8731
- var parsers = [];
8732
- for (var _i = 0; _i < arguments.length; _i++) {
8733
- parsers[_i] = arguments[_i];
8734
- }
8735
- var sortedParsers = parsers.sort(function (a, b) { return a[0] - b[0]; }).map(function (p) { return p[1]; });
8736
- return function (stack, skipFirst) {
8737
- var e_1, _a, e_2, _b;
8738
- if (skipFirst === void 0) { skipFirst = 0; }
8739
- var frames = [];
8740
- try {
8741
- for (var _c = (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__values */ .XA)(stack.split('\n').slice(skipFirst)), _d = _c.next(); !_d.done; _d = _c.next()) {
8742
- var line = _d.value;
8743
- try {
8744
- for (var sortedParsers_1 = (e_2 = void 0, (0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__values */ .XA)(sortedParsers)), sortedParsers_1_1 = sortedParsers_1.next(); !sortedParsers_1_1.done; sortedParsers_1_1 = sortedParsers_1.next()) {
8745
- var parser = sortedParsers_1_1.value;
8746
- var frame = parser(line);
8747
- if (frame) {
8748
- frames.push(frame);
8749
- break;
8750
- }
8751
- }
8752
- }
8753
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
8754
- finally {
8755
- try {
8756
- if (sortedParsers_1_1 && !sortedParsers_1_1.done && (_b = sortedParsers_1.return)) _b.call(sortedParsers_1);
8757
- }
8758
- finally { if (e_2) throw e_2.error; }
8759
- }
8760
- }
8761
- }
8762
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
8763
- finally {
8764
- try {
8765
- if (_d && !_d.done && (_a = _c.return)) _a.call(_c);
8766
- }
8767
- finally { if (e_1) throw e_1.error; }
8768
  }
8769
- return stripSentryFramesAndReverse(frames);
8770
- };
 
 
 
8771
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8772
  /**
8773
  * @hidden
8774
  */
8775
  function stripSentryFramesAndReverse(stack) {
8776
- if (!stack.length) {
8777
- return [];
8778
- }
8779
- var localStack = stack;
8780
- var firstFrameFunction = localStack[0].function || '';
8781
- var lastFrameFunction = localStack[localStack.length - 1].function || '';
8782
- // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)
8783
- if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {
8784
- localStack = localStack.slice(1);
8785
- }
8786
- // 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)
8787
- if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {
8788
- localStack = localStack.slice(0, -1);
8789
- }
8790
- // The frame where the crash happened, should be the last entry in the array
8791
- return localStack
8792
- .slice(0, STACKTRACE_LIMIT)
8793
- .map(function (frame) { return ((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)((0,tslib__WEBPACK_IMPORTED_MODULE_0__/* .__assign */ .pi)({}, frame), { filename: frame.filename || localStack[0].filename, function: frame.function || '?' })); })
8794
- .reverse();
 
 
 
 
 
 
 
 
 
8795
  }
 
8796
  var defaultFunctionName = '<anonymous>';
 
8797
  /**
8798
  * Safely extract function name from itself
8799
  */
8800
  function getFunctionName(fn) {
8801
- try {
8802
- if (!fn || typeof fn !== 'function') {
8803
- return defaultFunctionName;
8804
- }
8805
- return fn.name || defaultFunctionName;
8806
- }
8807
- catch (e) {
8808
- // Just accessing custom props in some Selenium environments
8809
- // can cause a "Permission denied" exception (see raven-js#495).
8810
- return defaultFunctionName;
8811
  }
 
 
 
 
 
 
8812
  }
8813
- //# sourceMappingURL=stacktrace.js.map
8814
 
8815
- /***/ }),
 
 
8816
 
8817
- /***/ 8886:
8818
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
 
 
 
8819
 
8820
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8821
- /* harmony export */ "F": function() { return /* binding */ eventStatusFromHttpCode; }
8822
- /* harmony export */ });
8823
- /**
8824
- * Converts an HTTP status code to sentry status {@link EventStatus}.
8825
- *
8826
- * @param code number HTTP status code
8827
- * @returns EventStatus
8828
- */
8829
- function eventStatusFromHttpCode(code) {
8830
- if (code >= 200 && code < 300) {
8831
- return 'success';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8832
  }
8833
- if (code === 429) {
8834
- return 'rate_limit';
 
 
8835
  }
8836
- if (code >= 400 && code < 500) {
8837
- return 'invalid';
 
 
8838
  }
8839
- if (code >= 500) {
8840
- return 'failed';
 
 
8841
  }
8842
- return 'unknown';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8843
  }
8844
- //# sourceMappingURL=status.js.map
 
 
 
8845
 
8846
  /***/ }),
8847
 
@@ -8849,12 +8480,13 @@ function eventStatusFromHttpCode(code) {
8849
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8850
 
8851
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8852
- /* harmony export */ "$G": function() { return /* binding */ truncate; },
8853
  /* harmony export */ "nK": function() { return /* binding */ safeJoin; },
8854
- /* harmony export */ "zC": function() { return /* binding */ isMatchingPattern; }
8855
  /* harmony export */ });
8856
- /* unused harmony exports snipLine, escapeStringForRegex */
8857
- /* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1757);
 
8858
 
8859
  /**
8860
  * Truncates given string to the maximum characters count
@@ -8863,13 +8495,13 @@ function eventStatusFromHttpCode(code) {
8863
  * @param max Maximum number of characters in truncated string (0 = unlimited)
8864
  * @returns string Encoded
8865
  */
8866
- function truncate(str, max) {
8867
- if (max === void 0) { max = 0; }
8868
- if (typeof str !== 'string' || max === 0) {
8869
- return str;
8870
- }
8871
- return str.length <= max ? str : str.substr(0, max) + "...";
8872
  }
 
8873
  /**
8874
  * This is basically just `trim_line` from
8875
  * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67
@@ -8879,76 +8511,82 @@ function truncate(str, max) {
8879
  * @returns string Encoded
8880
  */
8881
  function snipLine(line, colno) {
8882
- var newLine = line;
8883
- var lineLength = newLine.length;
8884
- if (lineLength <= 150) {
8885
- return newLine;
8886
- }
8887
- if (colno > lineLength) {
8888
- // eslint-disable-next-line no-param-reassign
8889
- colno = lineLength;
8890
- }
8891
- var start = Math.max(colno - 60, 0);
8892
- if (start < 5) {
8893
- start = 0;
8894
- }
8895
- var end = Math.min(start + 140, lineLength);
8896
- if (end > lineLength - 5) {
8897
- end = lineLength;
8898
- }
8899
- if (end === lineLength) {
8900
- start = Math.max(end - 140, 0);
8901
- }
8902
- newLine = newLine.slice(start, end);
8903
- if (start > 0) {
8904
- newLine = "'{snip} " + newLine;
8905
- }
8906
- if (end < lineLength) {
8907
- newLine += ' {snip}';
8908
- }
8909
  return newLine;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8910
  }
 
8911
  /**
8912
  * Join values in array
8913
  * @param input array of values to be joined together
8914
  * @param delimiter string to be placed in-between values
8915
  * @returns Joined values
8916
  */
8917
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
8918
  function safeJoin(input, delimiter) {
8919
- if (!Array.isArray(input)) {
8920
- return '';
8921
- }
8922
- var output = [];
8923
- // eslint-disable-next-line @typescript-eslint/prefer-for-of
8924
- for (var i = 0; i < input.length; i++) {
8925
- var value = input[i];
8926
- try {
8927
- output.push(String(value));
8928
- }
8929
- catch (e) {
8930
- output.push('[value cannot be serialized]');
8931
- }
8932
  }
8933
- return output.join(delimiter);
 
 
8934
  }
 
8935
  /**
8936
  * Checks if the value matches a regex or includes the string
8937
  * @param value The string value to be checked against
8938
  * @param pattern Either a regex or a string that must be contained in value
8939
  */
8940
  function isMatchingPattern(value, pattern) {
8941
- if (!(0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .HD)(value)) {
8942
- return false;
8943
- }
8944
- if ((0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isRegExp */ .Kj)(pattern)) {
8945
- return pattern.test(value);
8946
- }
8947
- if (typeof pattern === 'string') {
8948
- return value.indexOf(pattern) !== -1;
8949
- }
8950
  return false;
 
 
 
 
 
 
 
 
 
8951
  }
 
8952
  /**
8953
  * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to
8954
  * `new RegExp()`.
@@ -8961,28 +8599,29 @@ function isMatchingPattern(value, pattern) {
8961
  * @returns An version of the string with all special regex characters escaped
8962
  */
8963
  function escapeStringForRegex(regexString) {
8964
- // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems
8965
- // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.
8966
- return regexString.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d');
8967
  }
 
 
8968
  //# sourceMappingURL=string.js.map
8969
 
 
8970
  /***/ }),
8971
 
8972
  /***/ 9798:
8973
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8974
 
8975
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8976
- /* harmony export */ "Ak": function() { return /* binding */ supportsFetch; },
8977
  /* harmony export */ "Du": function() { return /* binding */ isNativeFetch; },
8978
- /* harmony export */ "t$": function() { return /* binding */ supportsNativeFetch; },
8979
- /* harmony export */ "hv": function() { return /* binding */ supportsReferrerPolicy; },
8980
- /* harmony export */ "Bf": function() { return /* binding */ supportsHistory; }
8981
  /* harmony export */ });
8982
- /* unused harmony exports supportsErrorEvent, supportsDOMError, supportsDOMException, supportsReportingObserver */
8983
- /* harmony import */ var _flags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1923);
8984
- /* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
8985
- /* harmony import */ var _logger__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8536);
8986
 
8987
 
8988
 
@@ -8993,14 +8632,14 @@ function escapeStringForRegex(regexString) {
8993
  * @returns Answer to the given question.
8994
  */
8995
  function supportsErrorEvent() {
8996
- try {
8997
- new ErrorEvent('');
8998
- return true;
8999
- }
9000
- catch (e) {
9001
- return false;
9002
- }
9003
  }
 
9004
  /**
9005
  * Tells whether current environment supports DOMError objects
9006
  * {@link supportsDOMError}.
@@ -9008,17 +8647,17 @@ function supportsErrorEvent() {
9008
  * @returns Answer to the given question.
9009
  */
9010
  function supportsDOMError() {
9011
- try {
9012
- // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':
9013
- // 1 argument required, but only 0 present.
9014
- // @ts-ignore It really needs 1 argument, not 0.
9015
- new DOMError('');
9016
- return true;
9017
- }
9018
- catch (e) {
9019
- return false;
9020
- }
9021
  }
 
9022
  /**
9023
  * Tells whether current environment supports DOMException objects
9024
  * {@link supportsDOMException}.
@@ -9026,14 +8665,14 @@ function supportsDOMError() {
9026
  * @returns Answer to the given question.
9027
  */
9028
  function supportsDOMException() {
9029
- try {
9030
- new DOMException('');
9031
- return true;
9032
- }
9033
- catch (e) {
9034
- return false;
9035
- }
9036
  }
 
9037
  /**
9038
  * Tells whether current environment supports Fetch API
9039
  * {@link supportsFetch}.
@@ -9041,26 +8680,26 @@ function supportsDOMException() {
9041
  * @returns Answer to the given question.
9042
  */
9043
  function supportsFetch() {
9044
- if (!('fetch' in (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)())) {
9045
- return false;
9046
- }
9047
- try {
9048
- new Headers();
9049
- new Request('');
9050
- new Response();
9051
- return true;
9052
- }
9053
- catch (e) {
9054
- return false;
9055
- }
9056
  }
9057
  /**
9058
  * isNativeFetch checks if the given function is a native implementation of fetch()
9059
  */
9060
- // eslint-disable-next-line @typescript-eslint/ban-types
9061
  function isNativeFetch(func) {
9062
- return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString());
9063
  }
 
9064
  /**
9065
  * Tells whether current environment supports Fetch API natively
9066
  * {@link supportsNativeFetch}.
@@ -9068,38 +8707,39 @@ function isNativeFetch(func) {
9068
  * @returns true if `window.fetch` is natively implemented, false otherwise
9069
  */
9070
  function supportsNativeFetch() {
9071
- if (!supportsFetch()) {
9072
- return false;
9073
- }
9074
- var global = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
9075
- // Fast path to avoid DOM I/O
9076
- // eslint-disable-next-line @typescript-eslint/unbound-method
 
9077
  if (isNativeFetch(global.fetch)) {
9078
- return true;
9079
- }
9080
- // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)
9081
- // so create a "pure" iframe to see if that has native fetch
9082
- var result = false;
9083
- var doc = global.document;
9084
- // eslint-disable-next-line deprecation/deprecation
9085
- if (doc && typeof doc.createElement === 'function') {
9086
- try {
9087
- var sandbox = doc.createElement('iframe');
9088
- sandbox.hidden = true;
9089
- doc.head.appendChild(sandbox);
9090
- if (sandbox.contentWindow && sandbox.contentWindow.fetch) {
9091
- // eslint-disable-next-line @typescript-eslint/unbound-method
9092
  result = isNativeFetch(sandbox.contentWindow.fetch);
9093
- }
9094
- doc.head.removeChild(sandbox);
9095
- }
9096
- catch (err) {
9097
- _flags__WEBPACK_IMPORTED_MODULE_1__/* .IS_DEBUG_BUILD */ .h &&
9098
- _logger__WEBPACK_IMPORTED_MODULE_2__/* .logger.warn */ .kg.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);
9099
- }
9100
  }
9101
- return result;
 
 
9102
  }
 
9103
  /**
9104
  * Tells whether current environment supports ReportingObserver API
9105
  * {@link supportsReportingObserver}.
@@ -9107,8 +8747,9 @@ function supportsNativeFetch() {
9107
  * @returns Answer to the given question.
9108
  */
9109
  function supportsReportingObserver() {
9110
- return 'ReportingObserver' in getGlobalObject();
9111
  }
 
9112
  /**
9113
  * Tells whether current environment supports Referrer Policy API
9114
  * {@link supportsReferrerPolicy}.
@@ -9116,23 +8757,25 @@ function supportsReportingObserver() {
9116
  * @returns Answer to the given question.
9117
  */
9118
  function supportsReferrerPolicy() {
9119
- // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'
9120
- // (see https://caniuse.com/#feat=referrer-policy),
9121
- // it doesn't. And it throws an exception instead of ignoring this parameter...
9122
- // REF: https://github.com/getsentry/raven-js/issues/1233
9123
- if (!supportsFetch()) {
9124
- return false;
9125
- }
9126
- try {
9127
- new Request('_', {
9128
- referrerPolicy: 'origin',
9129
- });
9130
- return true;
9131
- }
9132
- catch (e) {
9133
- return false;
9134
- }
 
9135
  }
 
9136
  /**
9137
  * Tells whether current environment supports History API
9138
  * {@link supportsHistory}.
@@ -9140,35 +8783,45 @@ function supportsReferrerPolicy() {
9140
  * @returns Answer to the given question.
9141
  */
9142
  function supportsHistory() {
9143
- // NOTE: in Chrome App environment, touching history.pushState, *even inside
9144
- // a try/catch block*, will cause Chrome to output an error to console.error
9145
- // borrowed from: https://github.com/angular/angular.js/pull/13945/files
9146
- var global = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
9147
- /* eslint-disable @typescript-eslint/no-unsafe-member-access */
9148
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
9149
- var chrome = global.chrome;
9150
- var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;
9151
- /* eslint-enable @typescript-eslint/no-unsafe-member-access */
9152
  var hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;
9153
- return !isChromePackagedApp && hasHistoryApi;
 
9154
  }
 
 
9155
  //# sourceMappingURL=supports.js.map
9156
 
 
9157
  /***/ }),
9158
 
9159
  /***/ 7946:
9160
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9161
 
9162
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9163
- /* harmony export */ "WD": function() { return /* binding */ resolvedSyncPromise; },
9164
  /* harmony export */ "$2": function() { return /* binding */ rejectedSyncPromise; },
9165
- /* harmony export */ "cW": function() { return /* binding */ SyncPromise; }
9166
  /* harmony export */ });
9167
- /* harmony import */ var _is__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1757);
9168
- /* eslint-disable @typescript-eslint/explicit-function-return-type */
9169
- /* eslint-disable @typescript-eslint/typedef */
9170
- /* eslint-disable @typescript-eslint/explicit-module-boundary-types */
9171
- /* eslint-disable @typescript-eslint/no-explicit-any */
 
 
 
 
 
 
 
 
 
9172
 
9173
  /**
9174
  * Creates a resolved sync promise.
@@ -9177,10 +8830,11 @@ function supportsHistory() {
9177
  * @returns the resolved sync promise
9178
  */
9179
  function resolvedSyncPromise(value) {
9180
- return new SyncPromise(function (resolve) {
9181
- resolve(value);
9182
- });
9183
  }
 
9184
  /**
9185
  * Creates a rejected sync promise.
9186
  *
@@ -9188,142 +8842,164 @@ function resolvedSyncPromise(value) {
9188
  * @returns the rejected sync promise
9189
  */
9190
  function rejectedSyncPromise(reason) {
9191
- return new SyncPromise(function (_, reject) {
9192
- reject(reason);
9193
- });
9194
  }
 
9195
  /**
9196
  * Thenable class that behaves like a Promise and follows it's interface
9197
  * but is not async internally
9198
  */
9199
- var SyncPromise = /** @class */ (function () {
9200
- function SyncPromise(executor) {
9201
- var _this = this;
9202
- this._state = 0 /* PENDING */;
9203
- this._handlers = [];
9204
- /** JSDoc */
9205
- this._resolve = function (value) {
9206
- _this._setResult(1 /* RESOLVED */, value);
9207
- };
9208
- /** JSDoc */
9209
- this._reject = function (reason) {
9210
- _this._setResult(2 /* REJECTED */, reason);
9211
- };
9212
- /** JSDoc */
9213
- this._setResult = function (state, value) {
9214
- if (_this._state !== 0 /* PENDING */) {
9215
- return;
9216
- }
9217
- if ((0,_is__WEBPACK_IMPORTED_MODULE_0__/* .isThenable */ .J8)(value)) {
9218
- void value.then(_this._resolve, _this._reject);
9219
- return;
 
 
 
 
 
 
 
 
 
 
 
 
9220
  }
9221
- _this._state = state;
9222
- _this._value = value;
9223
- _this._executeHandlers();
9224
- };
9225
- /** JSDoc */
9226
- this._executeHandlers = function () {
9227
- if (_this._state === 0 /* PENDING */) {
9228
- return;
 
 
9229
  }
9230
- var cachedHandlers = _this._handlers.slice();
9231
- _this._handlers = [];
9232
- cachedHandlers.forEach(function (handler) {
9233
- if (handler[0]) {
9234
- return;
9235
- }
9236
- if (_this._state === 1 /* RESOLVED */) {
9237
- // eslint-disable-next-line @typescript-eslint/no-floating-promises
9238
- handler[1](_this._value);
9239
- }
9240
- if (_this._state === 2 /* REJECTED */) {
9241
- handler[2](_this._value);
9242
- }
9243
- handler[0] = true;
9244
- });
9245
- };
9246
- try {
9247
- executor(this._resolve, this._reject);
9248
- }
9249
- catch (e) {
9250
- this._reject(e);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9251
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9252
  }
9253
- /** JSDoc */
9254
- SyncPromise.prototype.then = function (onfulfilled, onrejected) {
9255
- var _this = this;
9256
- return new SyncPromise(function (resolve, reject) {
9257
- _this._handlers.push([
9258
- false,
9259
- function (result) {
9260
- if (!onfulfilled) {
9261
- // TODO: ¯\_(ツ)_/¯
9262
- // TODO: FIXME
9263
- resolve(result);
9264
- }
9265
- else {
9266
- try {
9267
- resolve(onfulfilled(result));
9268
- }
9269
- catch (e) {
9270
- reject(e);
9271
- }
9272
- }
9273
- },
9274
- function (reason) {
9275
- if (!onrejected) {
9276
- reject(reason);
9277
- }
9278
- else {
9279
- try {
9280
- resolve(onrejected(reason));
9281
- }
9282
- catch (e) {
9283
- reject(e);
9284
- }
9285
- }
9286
- },
9287
- ]);
9288
- _this._executeHandlers();
9289
- });
9290
- };
9291
- /** JSDoc */
9292
- SyncPromise.prototype.catch = function (onrejected) {
9293
- return this.then(function (val) { return val; }, onrejected);
9294
- };
9295
- /** JSDoc */
9296
- SyncPromise.prototype.finally = function (onfinally) {
9297
- var _this = this;
9298
- return new SyncPromise(function (resolve, reject) {
9299
- var val;
9300
- var isRejected;
9301
- return _this.then(function (value) {
9302
- isRejected = false;
9303
- val = value;
9304
- if (onfinally) {
9305
- onfinally();
9306
- }
9307
- }, function (reason) {
9308
- isRejected = true;
9309
- val = reason;
9310
- if (onfinally) {
9311
- onfinally();
9312
- }
9313
- }).then(function () {
9314
- if (isRejected) {
9315
- reject(val);
9316
- return;
9317
- }
9318
- resolve(val);
9319
- });
9320
- });
9321
- };
9322
- return SyncPromise;
9323
- }());
9324
 
9325
  //# sourceMappingURL=syncpromise.js.map
9326
 
 
9327
  /***/ }),
9328
 
9329
  /***/ 7790:
@@ -9333,12 +9009,17 @@ var SyncPromise = /** @class */ (function () {
9333
  /* harmony export */ "yW": function() { return /* binding */ dateTimestampInSeconds; },
9334
  /* harmony export */ "ph": function() { return /* binding */ timestampInSeconds; }
9335
  /* harmony export */ });
9336
- /* unused harmony exports timestampWithMs, usingPerformanceAPI, _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin */
9337
- /* harmony import */ var _global__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
9338
- /* harmony import */ var _node__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7392);
9339
  /* module decorator */ module = __webpack_require__.hmd(module);
9340
 
9341
 
 
 
 
 
 
9342
  /**
9343
  * A TimestampSource implementation for environments that do not support the Performance Web API natively.
9344
  *
@@ -9347,8 +9028,14 @@ var SyncPromise = /** @class */ (function () {
9347
  * is more obvious to explain "why does my span have negative duration" than "why my spans have zero duration".
9348
  */
9349
  var dateTimestampSource = {
9350
- nowSeconds: function () { return Date.now() / 1000; },
9351
  };
 
 
 
 
 
 
9352
  /**
9353
  * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not
9354
  * support the API.
@@ -9356,63 +9043,70 @@ var dateTimestampSource = {
9356
  * Wrapping the native API works around differences in behavior from different browsers.
9357
  */
9358
  function getBrowserPerformance() {
9359
- var performance = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)().performance;
9360
- if (!performance || !performance.now) {
9361
- return undefined;
9362
- }
9363
- // Replace performance.timeOrigin with our own timeOrigin based on Date.now().
9364
- //
9365
- // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +
9366
- // performance.now() gives a date arbitrarily in the past.
9367
- //
9368
- // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is
9369
- // undefined.
9370
- //
9371
- // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to
9372
- // interact with data coming out of performance entries.
9373
- //
9374
- // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that
9375
- // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes
9376
- // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have
9377
- // observed skews that can be as long as days, weeks or months.
9378
- //
9379
- // See https://github.com/getsentry/sentry-javascript/issues/2590.
9380
- //
9381
- // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload
9382
- // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation
9383
- // transactions of long-lived web pages.
9384
- var timeOrigin = Date.now() - performance.now();
9385
- return {
9386
- now: function () { return performance.now(); },
9387
- timeOrigin: timeOrigin,
9388
- };
 
 
9389
  }
 
9390
  /**
9391
  * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't
9392
  * implement the API.
9393
  */
9394
  function getNodePerformance() {
9395
- try {
9396
- var perfHooks = (0,_node__WEBPACK_IMPORTED_MODULE_1__/* .dynamicRequire */ .l$)(module, 'perf_hooks');
9397
- return perfHooks.performance;
9398
- }
9399
- catch (_) {
9400
- return undefined;
9401
- }
9402
  }
 
9403
  /**
9404
  * The Performance API implementation for the current platform, if available.
9405
  */
9406
- var platformPerformance = (0,_node__WEBPACK_IMPORTED_MODULE_1__/* .isNodeEnv */ .KV)() ? getNodePerformance() : getBrowserPerformance();
9407
- var timestampSource = platformPerformance === undefined
 
 
9408
  ? dateTimestampSource
9409
  : {
9410
- nowSeconds: function () { return (platformPerformance.timeOrigin + platformPerformance.now()) / 1000; },
9411
- };
 
9412
  /**
9413
  * Returns a timestamp in seconds since the UNIX epoch using the Date API.
9414
  */
9415
  var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);
 
9416
  /**
9417
  * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the
9418
  * availability of the Performance API.
@@ -9425,296 +9119,74 @@ var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSo
9425
  * See https://github.com/getsentry/sentry-javascript/issues/2590.
9426
  */
9427
  var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);
 
9428
  // Re-exported with an old name for backwards-compatibility.
9429
  var timestampWithMs = (/* unused pure expression or super */ null && (timestampInSeconds));
 
9430
  /**
9431
  * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.
9432
  */
9433
  var usingPerformanceAPI = platformPerformance !== undefined;
 
9434
  /**
9435
  * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.
9436
  */
9437
- var _browserPerformanceTimeOriginMode;
 
9438
  /**
9439
  * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the
9440
  * performance API is available.
9441
  */
9442
- var browserPerformanceTimeOrigin = (function () {
9443
- // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or
9444
- // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin
9445
- // data as reliable if they are within a reasonable threshold of the current time.
9446
- var performance = (0,_global__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)().performance;
9447
- if (!performance || !performance.now) {
9448
- _browserPerformanceTimeOriginMode = 'none';
9449
- return undefined;
9450
- }
9451
- var threshold = 3600 * 1000;
9452
- var performanceNow = performance.now();
9453
- var dateNow = Date.now();
9454
- // if timeOrigin isn't available set delta to threshold so it isn't used
9455
- var timeOriginDelta = performance.timeOrigin
9456
- ? Math.abs(performance.timeOrigin + performanceNow - dateNow)
9457
- : threshold;
9458
- var timeOriginIsReliable = timeOriginDelta < threshold;
9459
- // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin
9460
- // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.
9461
- // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always
9462
- // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the
9463
- // Date API.
9464
- // eslint-disable-next-line deprecation/deprecation
 
 
 
9465
  var navigationStart = performance.timing && performance.timing.navigationStart;
9466
- var hasNavigationStart = typeof navigationStart === 'number';
9467
- // if navigationStart isn't available set delta to threshold so it isn't used
9468
- var navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;
9469
- var navigationStartIsReliable = navigationStartDelta < threshold;
9470
- if (timeOriginIsReliable || navigationStartIsReliable) {
9471
- // Use the more reliable time origin
9472
- if (timeOriginDelta <= navigationStartDelta) {
9473
- _browserPerformanceTimeOriginMode = 'timeOrigin';
9474
- return performance.timeOrigin;
9475
- }
9476
- else {
9477
- _browserPerformanceTimeOriginMode = 'navigationStart';
9478
- return navigationStart;
9479
- }
9480
- }
9481
- // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.
9482
- _browserPerformanceTimeOriginMode = 'dateNow';
9483
- return dateNow;
 
9484
  })();
9485
- //# sourceMappingURL=time.js.map
9486
-
9487
- /***/ }),
9488
-
9489
- /***/ 4715:
9490
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9491
-
9492
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9493
- /* harmony export */ "ZT": function() { return /* binding */ __extends; },
9494
- /* harmony export */ "pi": function() { return /* binding */ __assign; },
9495
- /* harmony export */ "XA": function() { return /* binding */ __values; },
9496
- /* harmony export */ "CR": function() { return /* binding */ __read; },
9497
- /* harmony export */ "fl": function() { return /* binding */ __spread; }
9498
- /* harmony export */ });
9499
- /* unused harmony exports __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet */
9500
- /*! *****************************************************************************
9501
- Copyright (c) Microsoft Corporation.
9502
-
9503
- Permission to use, copy, modify, and/or distribute this software for any
9504
- purpose with or without fee is hereby granted.
9505
-
9506
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9507
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
9508
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
9509
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
9510
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
9511
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
9512
- PERFORMANCE OF THIS SOFTWARE.
9513
- ***************************************************************************** */
9514
- /* global Reflect, Promise */
9515
-
9516
- var extendStatics = function(d, b) {
9517
- extendStatics = Object.setPrototypeOf ||
9518
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
9519
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
9520
- return extendStatics(d, b);
9521
- };
9522
-
9523
- function __extends(d, b) {
9524
- extendStatics(d, b);
9525
- function __() { this.constructor = d; }
9526
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
9527
- }
9528
-
9529
- var __assign = function() {
9530
- __assign = Object.assign || function __assign(t) {
9531
- for (var s, i = 1, n = arguments.length; i < n; i++) {
9532
- s = arguments[i];
9533
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
9534
- }
9535
- return t;
9536
- }
9537
- return __assign.apply(this, arguments);
9538
- }
9539
-
9540
- function __rest(s, e) {
9541
- var t = {};
9542
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
9543
- t[p] = s[p];
9544
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
9545
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
9546
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9547
- t[p[i]] = s[p[i]];
9548
- }
9549
- return t;
9550
- }
9551
-
9552
- function __decorate(decorators, target, key, desc) {
9553
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
9554
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9555
- 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;
9556
- return c > 3 && r && Object.defineProperty(target, key, r), r;
9557
- }
9558
-
9559
- function __param(paramIndex, decorator) {
9560
- return function (target, key) { decorator(target, key, paramIndex); }
9561
- }
9562
-
9563
- function __metadata(metadataKey, metadataValue) {
9564
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
9565
- }
9566
-
9567
- function __awaiter(thisArg, _arguments, P, generator) {
9568
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
9569
- return new (P || (P = Promise))(function (resolve, reject) {
9570
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
9571
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9572
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
9573
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9574
- });
9575
- }
9576
-
9577
- function __generator(thisArg, body) {
9578
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
9579
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
9580
- function verb(n) { return function (v) { return step([n, v]); }; }
9581
- function step(op) {
9582
- if (f) throw new TypeError("Generator is already executing.");
9583
- while (_) try {
9584
- 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;
9585
- if (y = 0, t) op = [op[0] & 2, t.value];
9586
- switch (op[0]) {
9587
- case 0: case 1: t = op; break;
9588
- case 4: _.label++; return { value: op[1], done: false };
9589
- case 5: _.label++; y = op[1]; op = [0]; continue;
9590
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
9591
- default:
9592
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
9593
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
9594
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
9595
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
9596
- if (t[2]) _.ops.pop();
9597
- _.trys.pop(); continue;
9598
- }
9599
- op = body.call(thisArg, _);
9600
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
9601
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
9602
- }
9603
- }
9604
-
9605
- function __createBinding(o, m, k, k2) {
9606
- if (k2 === undefined) k2 = k;
9607
- o[k2] = m[k];
9608
- }
9609
-
9610
- function __exportStar(m, exports) {
9611
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
9612
- }
9613
-
9614
- function __values(o) {
9615
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
9616
- if (m) return m.call(o);
9617
- if (o && typeof o.length === "number") return {
9618
- next: function () {
9619
- if (o && i >= o.length) o = void 0;
9620
- return { value: o && o[i++], done: !o };
9621
- }
9622
- };
9623
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
9624
- }
9625
-
9626
- function __read(o, n) {
9627
- var m = typeof Symbol === "function" && o[Symbol.iterator];
9628
- if (!m) return o;
9629
- var i = m.call(o), r, ar = [], e;
9630
- try {
9631
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
9632
- }
9633
- catch (error) { e = { error: error }; }
9634
- finally {
9635
- try {
9636
- if (r && !r.done && (m = i["return"])) m.call(i);
9637
- }
9638
- finally { if (e) throw e.error; }
9639
- }
9640
- return ar;
9641
- }
9642
-
9643
- function __spread() {
9644
- for (var ar = [], i = 0; i < arguments.length; i++)
9645
- ar = ar.concat(__read(arguments[i]));
9646
- return ar;
9647
- }
9648
-
9649
- function __spreadArrays() {
9650
- for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
9651
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
9652
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
9653
- r[k] = a[j];
9654
- return r;
9655
- };
9656
-
9657
- function __await(v) {
9658
- return this instanceof __await ? (this.v = v, this) : new __await(v);
9659
- }
9660
-
9661
- function __asyncGenerator(thisArg, _arguments, generator) {
9662
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
9663
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
9664
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
9665
- 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); }); }; }
9666
- function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
9667
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
9668
- function fulfill(value) { resume("next", value); }
9669
- function reject(value) { resume("throw", value); }
9670
- function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
9671
- }
9672
 
9673
- function __asyncDelegator(o) {
9674
- var i, p;
9675
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
9676
- 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; }
9677
- }
9678
-
9679
- function __asyncValues(o) {
9680
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
9681
- var m = o[Symbol.asyncIterator], i;
9682
- 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);
9683
- 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); }); }; }
9684
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
9685
- }
9686
-
9687
- function __makeTemplateObject(cooked, raw) {
9688
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
9689
- return cooked;
9690
- };
9691
-
9692
- function __importStar(mod) {
9693
- if (mod && mod.__esModule) return mod;
9694
- var result = {};
9695
- if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
9696
- result.default = mod;
9697
- return result;
9698
- }
9699
-
9700
- function __importDefault(mod) {
9701
- return (mod && mod.__esModule) ? mod : { default: mod };
9702
- }
9703
-
9704
- function __classPrivateFieldGet(receiver, privateMap) {
9705
- if (!privateMap.has(receiver)) {
9706
- throw new TypeError("attempted to get private field on non-instance");
9707
- }
9708
- return privateMap.get(receiver);
9709
- }
9710
 
9711
- function __classPrivateFieldSet(receiver, privateMap, value) {
9712
- if (!privateMap.has(receiver)) {
9713
- throw new TypeError("attempted to set private field on non-instance");
9714
- }
9715
- privateMap.set(receiver, value);
9716
- return value;
9717
- }
9718
 
9719
 
9720
  /***/ }),
@@ -9817,7 +9289,7 @@ var __webpack_exports__ = {};
9817
  !function() {
9818
  __webpack_require__.r(__webpack_exports__);
9819
  /* harmony import */ var _sentry_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2456);
9820
- /* harmony import */ var _sentry_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4678);
9821
  /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6989);
9822
  /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__);
9823
  var _window$A8C_ETK_Error;
2
  /******/ "use strict";
3
  /******/ var __webpack_modules__ = ({
4
 
5
+ /***/ 2314:
6
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7
 
8
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9
+ /* harmony export */ "R": function() { return /* binding */ BrowserClient; }
10
  /* harmony export */ });
11
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9849);
12
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1476);
13
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8585);
14
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4911);
15
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
16
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3699);
17
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8536);
18
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(250);
19
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(3135);
20
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(6894);
21
+ /* harmony import */ var _eventbuilder_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1988);
22
+ /* harmony import */ var _integrations_breadcrumbs_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8356);
23
+ /* harmony import */ var _transports_utils_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(5854);
24
+
25
 
26
 
27
 
28
 
29
 
30
+ var globalObject = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
31
 
32
  /**
33
+ * The Sentry Browser SDK Client.
34
+ *
35
+ * @see BrowserOptions for documentation on configuration options.
36
+ * @see SentryClient for usage documentation.
37
  */
38
+ class BrowserClient extends _sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .BaseClient */ .W {
39
+ /**
40
+ * Creates a new Browser SDK instance.
41
+ *
42
+ * @param options Configuration options for this SDK.
43
+ */
44
+ constructor(options) {
45
+ options._metadata = options._metadata || {};
46
+ options._metadata.sdk = options._metadata.sdk || {
47
+ name: 'sentry.javascript.browser',
48
+ packages: [
49
+ {
50
+ name: 'npm:@sentry/browser',
51
+ version: _sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .SDK_VERSION */ .J,
52
+ },
53
+ ],
54
+ version: _sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .SDK_VERSION */ .J,
55
+ };
56
+
57
+ super(options);
58
+
59
+ if (options.sendClientReports && globalObject.document) {
60
+ globalObject.document.addEventListener('visibilitychange', () => {
61
+ if (globalObject.document.visibilityState === 'hidden') {
62
+ this._flushOutcomes();
63
+ }
64
+ });
65
+ }
66
+ }
67
+
68
+ /**
69
+ * @inheritDoc
70
+ */
71
+ eventFromException(exception, hint) {
72
+ return (0,_eventbuilder_js__WEBPACK_IMPORTED_MODULE_3__/* .eventFromException */ .dr)(this._options.stackParser, exception, hint, this._options.attachStacktrace);
73
+ }
74
+
75
+ /**
76
+ * @inheritDoc
77
+ */
78
+ eventFromMessage(
79
+ message,
80
+ level = 'info',
81
+ hint,
82
+ ) {
83
+ return (0,_eventbuilder_js__WEBPACK_IMPORTED_MODULE_3__/* .eventFromMessage */ .aB)(this._options.stackParser, message, level, hint, this._options.attachStacktrace);
84
+ }
85
+
86
+ /**
87
+ * @inheritDoc
88
+ */
89
+ sendEvent(event, hint) {
90
+ // We only want to add the sentry event breadcrumb when the user has the breadcrumb integration installed and
91
+ // activated its `sentry` option.
92
+ // We also do not want to use the `Breadcrumbs` class here directly, because we do not want it to be included in
93
+ // bundles, if it is not used by the SDK.
94
+ // This all sadly is a bit ugly, but we currently don't have a "pre-send" hook on the integrations so we do it this
95
+ // way for now.
96
+ var breadcrumbIntegration = this.getIntegrationById(_integrations_breadcrumbs_js__WEBPACK_IMPORTED_MODULE_4__/* .BREADCRUMB_INTEGRATION_ID */ .p) ;
97
+ if (
98
+ breadcrumbIntegration &&
99
+ // We check for definedness of `options`, even though it is not strictly necessary, because that access to
100
+ // `.sentry` below does not throw, in case users provided their own integration with id "Breadcrumbs" that does
101
+ // not have an`options` field
102
+ breadcrumbIntegration.options &&
103
+ breadcrumbIntegration.options.sentry
104
+ ) {
105
+ (0,_sentry_core__WEBPACK_IMPORTED_MODULE_5__/* .getCurrentHub */ .Gd)().addBreadcrumb(
106
+ {
107
+ category: `sentry.${event.type === 'transaction' ? 'transaction' : 'event'}`,
108
+ event_id: event.event_id,
109
+ level: event.level,
110
+ message: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .getEventDescription */ .jH)(event),
111
+ },
112
+ {
113
+ event,
114
+ },
115
+ );
116
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
 
118
+ super.sendEvent(event, hint);
119
+ }
 
 
 
 
 
 
 
 
 
 
120
 
121
+ /**
122
+ * @inheritDoc
123
+ */
124
+ _prepareEvent(event, hint, scope) {
125
+ event.platform = event.platform || 'javascript';
126
+ return super._prepareEvent(event, hint, scope);
127
+ }
128
 
129
+ /**
130
+ * Sends client reports as an envelope.
131
+ */
132
+ _flushOutcomes() {
133
+ var outcomes = this._clearOutcomes();
134
 
135
+ if (outcomes.length === 0) {
136
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_7__/* .logger.log */ .kg.log('No outcomes to send');
137
+ return;
138
+ }
139
 
140
+ if (!this._dsn) {
141
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_7__/* .logger.log */ .kg.log('No dsn provided, will not send outcomes');
142
+ return;
143
+ }
144
 
145
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_7__/* .logger.log */ .kg.log('Sending outcomes:', outcomes);
146
 
147
+ var url = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_8__/* .getEnvelopeEndpointWithUrlEncodedAuth */ .U)(this._dsn, this._options.tunnel);
148
+ var envelope = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_9__/* .createClientReportEnvelope */ .y)(outcomes, this._options.tunnel && (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_10__/* .dsnToString */ .RA)(this._dsn));
149
 
150
+ try {
151
+ (0,_transports_utils_js__WEBPACK_IMPORTED_MODULE_11__/* .sendReport */ .z)(url, (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .serializeEnvelope */ .V$)(envelope));
152
+ } catch (e) {
153
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_7__/* .logger.error */ .kg.error(e);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
  }
155
+ }
156
+ }
157
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
 
159
  //# sourceMappingURL=client.js.map
160
 
161
+
162
  /***/ }),
163
 
164
  /***/ 1988:
165
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
166
 
167
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
 
168
  /* harmony export */ "dr": function() { return /* binding */ eventFromException; },
169
  /* harmony export */ "aB": function() { return /* binding */ eventFromMessage; },
170
+ /* harmony export */ "ME": function() { return /* binding */ eventFromUnknownInput; },
171
+ /* harmony export */ "GJ": function() { return /* binding */ exceptionFromError; }
172
  /* harmony export */ });
173
+ /* unused harmony exports eventFromError, eventFromPlainObject, eventFromString, parseStackFrames */
 
 
174
  /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1757);
175
  /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1995);
176
  /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8035);
177
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3699);
178
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(7946);
 
 
 
 
179
 
180
 
181
  /**
182
+ * This function creates an exception from a JavaScript Error
 
 
183
  */
184
+ function exceptionFromError(stackParser, ex) {
185
+ // Get the frames first since Opera can lose the stack if we touch anything else first
186
+ var frames = parseStackFrames(stackParser, ex);
187
+
188
+ var exception = {
189
+ type: ex && ex.name,
190
+ value: extractMessage(ex),
191
+ };
192
+
193
+ if (frames.length) {
194
+ exception.stacktrace = { frames };
195
+ }
196
+
197
+ if (exception.type === undefined && exception.value === '') {
198
+ exception.value = 'Unrecoverable error caught';
199
+ }
200
+
201
+ return exception;
202
  }
203
+
204
  /**
205
  * @hidden
206
  */
207
+ function eventFromPlainObject(
208
+ stackParser,
209
+ exception,
210
+ syntheticException,
211
+ isUnhandledRejection,
212
+ ) {
213
+ var event = {
214
+ exception: {
215
+ values: [
216
+ {
217
+ type: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isEvent */ .cO)(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',
218
+ value: `Non-Error ${
219
+ isUnhandledRejection ? 'promise rejection' : 'exception'
220
+ } captured with keys: ${(0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .extractExceptionKeysForMessage */ .zf)(exception)}`,
221
  },
222
+ ],
223
+ },
224
+ extra: {
225
+ __serialized__: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .normalizeToSize */ .Qy)(exception),
226
+ },
227
+ };
228
+
229
+ if (syntheticException) {
230
+ var frames = parseStackFrames(stackParser, syntheticException);
231
+ if (frames.length) {
232
+ // event.exception.values[0] has been set above
233
+ (event.exception ).values[0].stacktrace = { frames };
234
  }
235
+ }
236
+
237
+ return event;
238
  }
239
+
240
  /**
241
  * @hidden
242
  */
243
+ function eventFromError(stackParser, ex) {
244
+ return {
245
+ exception: {
246
+ values: [exceptionFromError(stackParser, ex)],
247
+ },
248
+ };
249
  }
250
+
251
  /** Parses stack frames from an error */
252
+ function parseStackFrames(
253
+ stackParser,
254
+ ex,
255
+ ) {
256
+ // Access and store the stacktrace property before doing ANYTHING
257
+ // else to it because Opera is not very good at providing it
258
+ // reliably in other circumstances.
259
+ var stacktrace = ex.stacktrace || ex.stack || '';
260
+
261
+ var popSize = getPopSize(ex);
262
+
263
+ try {
264
+ return stackParser(stacktrace, popSize);
265
+ } catch (e) {
266
+ // no-empty
267
+ }
268
+
269
+ return [];
270
  }
271
+
272
  // Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108
273
  var reactMinifiedRegexp = /Minified React error #\d+;/i;
274
+
275
  function getPopSize(ex) {
276
+ if (ex) {
277
+ if (typeof ex.framesToPop === 'number') {
278
+ return ex.framesToPop;
279
+ }
280
+
281
+ if (reactMinifiedRegexp.test(ex.message)) {
282
+ return 1;
283
  }
284
+ }
285
+
286
+ return 0;
287
  }
288
+
289
  /**
290
  * There are cases where stacktrace.message is an Event object
291
  * https://github.com/getsentry/sentry-javascript/issues/1949
292
  * In this specific case we try to extract stacktrace.message.error.message
293
  */
294
  function extractMessage(ex) {
295
+ var message = ex && ex.message;
296
+ if (!message) {
297
+ return 'No error message';
298
+ }
299
+ if (message.error && typeof message.error.message === 'string') {
300
+ return message.error.message;
301
+ }
302
+ return message;
303
  }
304
+
305
  /**
306
  * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
307
  * @hidden
308
  */
309
+ function eventFromException(
310
+ stackParser,
311
+ exception,
312
+ hint,
313
+ attachStacktrace,
314
+ ) {
315
+ var syntheticException = (hint && hint.syntheticException) || undefined;
316
+ var event = eventFromUnknownInput(stackParser, exception, syntheticException, attachStacktrace);
317
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .addExceptionMechanism */ .EG)(event); // defaults to { type: 'generic', handled: true }
318
+ event.level = 'error';
319
+ if (hint && hint.event_id) {
320
+ event.event_id = hint.event_id;
321
+ }
322
+ return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .resolvedSyncPromise */ .WD)(event);
323
  }
324
+
325
  /**
326
  * Builds and Event from a Message
327
  * @hidden
328
  */
329
+ function eventFromMessage(
330
+ stackParser,
331
+ message,
332
+ level = 'info',
333
+ hint,
334
+ attachStacktrace,
335
+ ) {
336
+ var syntheticException = (hint && hint.syntheticException) || undefined;
337
+ var event = eventFromString(stackParser, message, syntheticException, attachStacktrace);
338
+ event.level = level;
339
+ if (hint && hint.event_id) {
340
+ event.event_id = hint.event_id;
341
+ }
342
+ return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .resolvedSyncPromise */ .WD)(event);
343
  }
344
+
345
  /**
346
  * @hidden
347
  */
348
+ function eventFromUnknownInput(
349
+ stackParser,
350
+ exception,
351
+ syntheticException,
352
+ attachStacktrace,
353
+ isUnhandledRejection,
354
+ ) {
355
+ let event;
356
+
357
+ if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isErrorEvent */ .VW)(exception ) && (exception ).error) {
358
+ // If it is an ErrorEvent with `error` property, extract it to get actual Error
359
+ var errorEvent = exception ;
360
+ return eventFromError(stackParser, errorEvent.error );
361
+ }
362
+
363
+ // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name
364
+ // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be
365
+ // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.
366
+ //
367
+ // https://developer.mozilla.org/en-US/docs/Web/API/DOMError
368
+ // https://developer.mozilla.org/en-US/docs/Web/API/DOMException
369
+ // https://webidl.spec.whatwg.org/#es-DOMException-specialness
370
+ if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isDOMError */ .TX)(exception ) || (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isDOMException */ .fm)(exception )) {
371
+ var domException = exception ;
372
+
373
+ if ('stack' in (exception )) {
374
+ event = eventFromError(stackParser, exception );
375
+ } else {
376
+ var name = domException.name || ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isDOMError */ .TX)(domException) ? 'DOMError' : 'DOMException');
377
+ var message = domException.message ? `${name}: ${domException.message}` : name;
378
+ event = eventFromString(stackParser, message, syntheticException, attachStacktrace);
379
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .addExceptionTypeValue */ .Db)(event, message);
380
+ }
381
+ if ('code' in domException) {
382
+ event.tags = { ...event.tags, 'DOMException.code': `${domException.code}` };
 
 
 
 
 
 
 
 
 
383
  }
384
+
385
+ return event;
386
+ }
387
+ if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isError */ .VZ)(exception)) {
388
+ // we have a real Error object, do nothing
389
+ return eventFromError(stackParser, exception);
390
+ }
391
+ if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isPlainObject */ .PO)(exception) || (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .isEvent */ .cO)(exception)) {
392
+ // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize
393
+ // it manually. This will allow us to group events based on top-level keys which is much better than creating a new
394
+ // group on any key/value change.
395
+ var objectException = exception ;
396
+ event = eventFromPlainObject(stackParser, objectException, syntheticException, isUnhandledRejection);
397
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .addExceptionMechanism */ .EG)(event, {
398
+ synthetic: true,
399
  });
400
  return event;
401
+ }
402
+
403
+ // If none of previous checks were valid, then it means that it's not:
404
+ // - an instance of DOMError
405
+ // - an instance of DOMException
406
+ // - an instance of Event
407
+ // - an instance of Error
408
+ // - a valid ErrorEvent (one with an error property)
409
+ // - a plain Object
410
+ //
411
+ // So bail out and capture it as a simple message:
412
+ event = eventFromString(stackParser, exception , syntheticException, attachStacktrace);
413
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .addExceptionTypeValue */ .Db)(event, `${exception}`, undefined);
414
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .addExceptionMechanism */ .EG)(event, {
415
+ synthetic: true,
416
+ });
417
+
418
+ return event;
419
  }
420
+
421
  /**
422
  * @hidden
423
  */
424
+ function eventFromString(
425
+ stackParser,
426
+ input,
427
+ syntheticException,
428
+ attachStacktrace,
429
+ ) {
430
+ var event = {
431
+ message: input,
432
+ };
433
+
434
+ if (attachStacktrace && syntheticException) {
435
+ var frames = parseStackFrames(stackParser, syntheticException);
436
+ if (frames.length) {
437
+ event.exception = {
438
+ values: [{ value: input, stacktrace: { frames } }],
439
+ };
440
  }
441
+ }
442
+
443
+ return event;
444
  }
 
445
 
 
446
 
447
+ //# sourceMappingURL=eventbuilder.js.map
 
448
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
449
 
450
  /***/ }),
451
 
454
 
455
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
456
  /* harmony export */ "Wz": function() { return /* binding */ shouldIgnoreOnError; },
457
+ /* harmony export */ "re": function() { return /* binding */ wrap; }
 
458
  /* harmony export */ });
459
  /* unused harmony export ignoreNextOnError */
460
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2483);
461
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1995);
462
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3699);
 
 
 
 
 
463
 
464
 
465
 
466
+ let ignoreOnError = 0;
467
 
 
 
468
  /**
469
  * @hidden
470
  */
471
  function shouldIgnoreOnError() {
472
+ return ignoreOnError > 0;
473
  }
474
+
475
  /**
476
  * @hidden
477
  */
478
  function ignoreNextOnError() {
479
+ // onerror should trigger before setTimeout
480
+ ignoreOnError += 1;
481
+ setTimeout(() => {
482
+ ignoreOnError -= 1;
483
+ });
484
  }
485
+
486
  /**
487
  * Instruments the given function and sends an event to Sentry every time the
488
  * function throws an exception.
489
  *
490
+ * @param fn A function to wrap. It is generally safe to pass an unbound function, because the returned wrapper always
491
+ * has a correct `this` context.
492
  * @returns The wrapped function.
493
  * @hidden
494
  */
495
+ function wrap(
496
+ fn,
497
+ options
498
+
499
+ = {},
500
+ before,
501
+ ) {
502
+ // for future readers what this does is wrap a function and then create
503
+ // a bi-directional wrapping between them.
504
+ //
505
+ // example: wrapped = wrap(original);
506
+ // original.__sentry_wrapped__ -> wrapped
507
+ // wrapped.__sentry_original__ -> original
508
+
509
+ if (typeof fn !== 'function') {
510
+ return fn;
511
+ }
512
+
513
+ try {
514
+ // if we're dealing with a function that was previously wrapped, return
515
+ // the original wrapper.
516
+ var wrapper = fn.__sentry_wrapped__;
517
+ if (wrapper) {
518
+ return wrapper;
519
+ }
520
+
521
+ // We don't wanna wrap it twice
522
+ if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .getOriginalFunction */ .HK)(fn)) {
523
+ return fn;
524
+ }
525
+ } catch (e) {
526
+ // Just accessing custom props in some Selenium environments
527
+ // can cause a "Permission denied" exception (see raven-js#495).
528
+ // Bail on wrapping and return the function as-is (defers to window.onerror).
529
+ return fn;
530
+ }
531
+
532
+ // It is important that `sentryWrapped` is not an arrow function to preserve the context of `this`
533
+ var sentryWrapped = function () {
534
+ var args = Array.prototype.slice.call(arguments);
535
+
536
  try {
537
+ if (before && typeof before === 'function') {
538
+ before.apply(this, arguments);
539
+ }
540
+
541
+ var wrappedArguments = args.map((arg) => wrap(arg, options));
542
+
543
+ // Attempt to invoke user-land function
544
+ // NOTE: If you are a Sentry user, and you are seeing this stack frame, it
545
+ // means the sentry.javascript SDK caught an error invoking your application code. This
546
+ // is expected behavior and NOT indicative of a bug with sentry.javascript.
547
+ return fn.apply(this, wrappedArguments);
548
+ } catch (ex) {
549
+ ignoreNextOnError();
550
+
551
+ (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .withScope */ .$e)((scope) => {
552
+ scope.addEventProcessor((event) => {
553
+ if (options.mechanism) {
554
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .addExceptionTypeValue */ .Db)(event, undefined, undefined);
555
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .addExceptionMechanism */ .EG)(event, options.mechanism);
556
+ }
557
+
558
+ event.extra = {
559
+ ...event.extra,
560
+ arguments: args,
561
+ };
562
+
563
+ return event;
564
+ });
565
+
566
+ (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .captureException */ .Tb)(ex);
567
+ });
568
+
569
+ throw ex;
570
  }
571
+ };
572
+
573
+ // Accessing some objects may throw
574
+ // ref: https://github.com/getsentry/sentry-javascript/issues/1168
575
+ try {
576
+ for (var property in fn) {
577
+ if (Object.prototype.hasOwnProperty.call(fn, property)) {
578
+ sentryWrapped[property] = fn[property];
579
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
580
  }
581
+ } catch (_oO) {}
582
+ // Signal that this function has been wrapped/filled already
583
+ // for both debugging and to prevent it to being wrapped/filled twice
584
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .markFunctionWrapped */ .$Q)(sentryWrapped, fn);
585
+
586
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .addNonEnumerableProperty */ .xp)(fn, '__sentry_wrapped__', sentryWrapped);
587
+
588
+ // Restore original function name (not all browsers allow that)
589
+ try {
590
+ var descriptor = Object.getOwnPropertyDescriptor(sentryWrapped, 'name') ;
591
+ if (descriptor.configurable) {
592
+ Object.defineProperty(sentryWrapped, 'name', {
593
+ get() {
594
+ return fn.name;
595
+ },
596
+ });
597
  }
598
+ } catch (_oO) {}
599
+
600
+ return sentryWrapped;
601
  }
602
+
603
  /**
604
+ * All properties the report dialog supports
 
605
  */
606
+
607
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
608
  //# sourceMappingURL=helpers.js.map
609
 
610
+
611
  /***/ }),
612
 
613
  /***/ 8356:
614
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
615
 
616
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
617
+ /* harmony export */ "p": function() { return /* binding */ BREADCRUMB_INTEGRATION_ID; },
618
  /* harmony export */ "O": function() { return /* binding */ Breadcrumbs; }
619
  /* harmony export */ });
620
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8585);
621
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4005);
622
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4194);
623
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8653);
624
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9660);
625
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5907);
626
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3699);
627
+
 
628
 
 
 
629
 
630
+ /** JSDoc */
631
 
632
+ var BREADCRUMB_INTEGRATION_ID = 'Breadcrumbs';
633
 
634
  /**
635
  * Default Breadcrumbs instrumentations
636
  * TODO: Deprecated - with v6, this will be renamed to `Instrument`
637
  */
638
+ class Breadcrumbs {
639
+ /**
640
+ * @inheritDoc
641
+ */
642
+ static __initStatic() {this.id = BREADCRUMB_INTEGRATION_ID;}
643
+
644
+ /**
645
+ * @inheritDoc
646
+ */
647
+ __init() {this.name = Breadcrumbs.id;}
648
+
649
+ /**
650
+ * Options of the breadcrumbs integration.
651
+ */
652
+ // This field is public, because we use it in the browser client to check if the `sentry` option is enabled.
653
+
654
+
655
+ /**
656
+ * @inheritDoc
657
+ */
658
+ constructor(options) {;Breadcrumbs.prototype.__init.call(this);
659
+ this.options = {
660
+ console: true,
661
+ dom: true,
662
+ fetch: true,
663
+ history: true,
664
+ sentry: true,
665
+ xhr: true,
666
+ ...options,
667
+ };
668
+ }
669
+
670
+ /**
671
+ * Instrument browser built-ins w/ breadcrumb capturing
672
+ * - Console API
673
+ * - DOM API (click/typing)
674
+ * - XMLHttpRequest API
675
+ * - Fetch API
676
+ * - History API
677
+ */
678
+ setupOnce() {
679
+ if (this.options.console) {
680
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .addInstrumentationHandler */ .o)('console', _consoleBreadcrumb);
681
+ }
682
+ if (this.options.dom) {
683
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .addInstrumentationHandler */ .o)('dom', _domBreadcrumb(this.options.dom));
684
+ }
685
+ if (this.options.xhr) {
686
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .addInstrumentationHandler */ .o)('xhr', _xhrBreadcrumb);
687
+ }
688
+ if (this.options.fetch) {
689
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .addInstrumentationHandler */ .o)('fetch', _fetchBreadcrumb);
690
+ }
691
+ if (this.options.history) {
692
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .addInstrumentationHandler */ .o)('history', _historyBreadcrumb);
693
+ }
694
+ }
695
+ } Breadcrumbs.__initStatic();
696
 
697
  /**
698
  * A HOC that creaes a function that creates breadcrumbs from DOM API calls.
699
  * This is a HOC so that we get access to dom options in the closure.
700
  */
 
701
  function _domBreadcrumb(dom) {
 
702
  function _innerDomBreadcrumb(handlerData) {
703
+ let target;
704
+ let keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;
705
+
706
+ if (typeof keyAttrs === 'string') {
707
+ keyAttrs = [keyAttrs];
708
+ }
709
+
710
+ // Accessing event.target can throw (see getsentry/raven-js#838, #768)
711
+ try {
712
+ target = handlerData.event.target
713
+ ? (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .htmlTreeAsString */ .R)(handlerData.event.target , keyAttrs)
714
+ : (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .htmlTreeAsString */ .R)(handlerData.event , keyAttrs);
715
+ } catch (e) {
716
+ target = '<unknown>';
717
+ }
718
+
719
+ if (target.length === 0) {
720
+ return;
 
 
 
 
 
 
 
721
  }
722
+
723
+ (0,_sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .getCurrentHub */ .Gd)().addBreadcrumb(
724
+ {
725
+ category: `ui.${handlerData.name}`,
726
+ message: target,
727
+ },
728
+ {
729
+ event: handlerData.event,
730
+ name: handlerData.name,
731
+ global: handlerData.global,
732
+ },
733
+ );
734
+ }
735
+
736
+ return _innerDomBreadcrumb;
737
  }
738
+
739
  /**
740
  * Creates breadcrumbs from console API calls
741
  */
 
742
  function _consoleBreadcrumb(handlerData) {
743
+ var breadcrumb = {
744
+ category: 'console',
745
+ data: {
746
+ arguments: handlerData.args,
747
+ logger: 'console',
748
+ },
749
+ level: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .severityLevelFromString */ .VT)(handlerData.level),
750
+ message: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .safeJoin */ .nK)(handlerData.args, ' '),
751
+ };
752
+
753
+ if (handlerData.level === 'assert') {
754
+ if (handlerData.args[0] === false) {
755
+ breadcrumb.message = `Assertion failed: ${(0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .safeJoin */ .nK)(handlerData.args.slice(1), ' ') || 'console.assert'}`;
756
+ breadcrumb.data.arguments = handlerData.args.slice(1);
757
+ } else {
758
+ // Don't capture a breadcrumb for passed assertions
759
+ return;
 
760
  }
761
+ }
762
+
763
+ (0,_sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .getCurrentHub */ .Gd)().addBreadcrumb(breadcrumb, {
764
+ input: handlerData.args,
765
+ level: handlerData.level,
766
+ });
767
  }
768
+
769
  /**
770
  * Creates breadcrumbs from XHR API calls
771
  */
 
772
  function _xhrBreadcrumb(handlerData) {
773
+ if (handlerData.endTimestamp) {
774
+ // We only capture complete, non-sentry requests
775
+ if (handlerData.xhr.__sentry_own_request__) {
776
+ return;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
777
  }
778
+
779
+ const { method, url, status_code, body } = handlerData.xhr.__sentry_xhr__ || {};
780
+
781
+ (0,_sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .getCurrentHub */ .Gd)().addBreadcrumb(
782
+ {
783
+ category: 'xhr',
784
+ data: {
785
+ method,
786
+ url,
787
+ status_code,
788
+ },
789
+ type: 'http',
790
+ },
791
+ {
792
+ xhr: handlerData.xhr,
793
+ input: body,
794
+ },
795
+ );
796
+
797
+ return;
798
+ }
799
  }
800
+
801
  /**
802
  * Creates breadcrumbs from fetch API calls
803
  */
 
804
  function _fetchBreadcrumb(handlerData) {
805
+ // We only capture complete fetch requests
806
+ if (!handlerData.endTimestamp) {
807
+ return;
808
+ }
809
+
810
+ if (handlerData.fetchData.url.match(/sentry_key/) && handlerData.fetchData.method === 'POST') {
811
+ // We will not create breadcrumbs for fetch requests that contain `sentry_key` (internal sentry requests)
812
+ return;
813
+ }
814
+
815
+ if (handlerData.error) {
816
+ (0,_sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .getCurrentHub */ .Gd)().addBreadcrumb(
817
+ {
818
+ category: 'fetch',
819
+ data: handlerData.fetchData,
820
+ level: 'error',
821
+ type: 'http',
822
+ },
823
+ {
824
+ data: handlerData.error,
825
+ input: handlerData.args,
826
+ },
827
+ );
828
+ } else {
829
+ (0,_sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .getCurrentHub */ .Gd)().addBreadcrumb(
830
+ {
831
+ category: 'fetch',
832
+ data: {
833
+ ...handlerData.fetchData,
834
+ status_code: handlerData.response.status,
835
+ },
836
+ type: 'http',
837
+ },
838
+ {
839
+ input: handlerData.args,
840
+ response: handlerData.response,
841
+ },
842
+ );
843
+ }
844
  }
845
+
846
  /**
847
  * Creates breadcrumbs from history API calls
848
  */
 
849
  function _historyBreadcrumb(handlerData) {
850
+ var global = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .getGlobalObject */ .R)();
851
+ let from = handlerData.from;
852
+ let to = handlerData.to;
853
+ var parsedLoc = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .parseUrl */ .en)(global.location.href);
854
+ let parsedFrom = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .parseUrl */ .en)(from);
855
+ var parsedTo = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .parseUrl */ .en)(to);
856
+
857
+ // Initial pushState doesn't provide `from` information
858
+ if (!parsedFrom.path) {
859
+ parsedFrom = parsedLoc;
860
+ }
861
+
862
+ // Use only the path component of the URL if the URL matches the current
863
+ // document (almost all the time when using pushState)
864
+ if (parsedLoc.protocol === parsedTo.protocol && parsedLoc.host === parsedTo.host) {
865
+ to = parsedTo.relative;
866
+ }
867
+ if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {
868
+ from = parsedFrom.relative;
869
+ }
870
+
871
+ (0,_sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .getCurrentHub */ .Gd)().addBreadcrumb({
872
+ category: 'navigation',
873
+ data: {
874
+ from,
875
+ to,
876
+ },
877
+ });
878
  }
879
+
880
+
881
  //# sourceMappingURL=breadcrumbs.js.map
882
 
883
+
884
  /***/ }),
885
 
886
  /***/ 184:
889
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
890
  /* harmony export */ "I": function() { return /* binding */ Dedupe; }
891
  /* harmony export */ });
892
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8536);
 
893
 
894
 
895
  /** Deduplication filter */
896
+ class Dedupe {constructor() { Dedupe.prototype.__init.call(this); }
897
+ /**
898
+ * @inheritDoc
899
+ */
900
+ static __initStatic() {this.id = 'Dedupe';}
901
+
902
+ /**
903
+ * @inheritDoc
904
+ */
905
+ __init() {this.name = Dedupe.id;}
906
+
907
+ /**
908
+ * @inheritDoc
909
+ */
910
+
911
+
912
+ /**
913
+ * @inheritDoc
914
+ */
915
+ setupOnce(addGlobalEventProcessor, getCurrentHub) {
916
+ var eventProcessor = currentEvent => {
917
+ var self = getCurrentHub().getIntegration(Dedupe);
918
+ if (self) {
919
+ // Juuust in case something goes wrong
920
+ try {
921
+ if (_shouldDropEvent(currentEvent, self._previousEvent)) {
922
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .logger.warn */ .kg.warn('Event dropped due to being a duplicate of previously captured event.');
923
+ return null;
924
+ }
925
+ } catch (_oO) {
926
+ return (self._previousEvent = currentEvent);
927
+ }
928
+
929
+ return (self._previousEvent = currentEvent);
930
+ }
931
+ return currentEvent;
932
  };
933
+
934
+ eventProcessor.id = this.name;
935
+ addGlobalEventProcessor(eventProcessor);
936
+ }
937
+ } Dedupe.__initStatic();
 
938
 
939
  /** JSDoc */
940
  function _shouldDropEvent(currentEvent, previousEvent) {
941
+ if (!previousEvent) {
 
 
 
 
 
 
 
 
942
  return false;
943
+ }
944
+
945
+ if (_isSameMessageEvent(currentEvent, previousEvent)) {
946
+ return true;
947
+ }
948
+
949
+ if (_isSameExceptionEvent(currentEvent, previousEvent)) {
950
+ return true;
951
+ }
952
+
953
+ return false;
954
  }
955
+
956
  /** JSDoc */
957
  function _isSameMessageEvent(currentEvent, previousEvent) {
958
+ var currentMessage = currentEvent.message;
959
+ var previousMessage = previousEvent.message;
960
+
961
+ // If neither event has a message property, they were both exceptions, so bail out
962
+ if (!currentMessage && !previousMessage) {
963
+ return false;
964
+ }
965
+
966
+ // If only one event has a stacktrace, but not the other one, they are not the same
967
+ if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {
968
+ return false;
969
+ }
970
+
971
+ if (currentMessage !== previousMessage) {
972
+ return false;
973
+ }
974
+
975
+ if (!_isSameFingerprint(currentEvent, previousEvent)) {
976
+ return false;
977
+ }
978
+
979
+ if (!_isSameStacktrace(currentEvent, previousEvent)) {
980
+ return false;
981
+ }
982
+
983
+ return true;
984
  }
985
+
986
  /** JSDoc */
987
  function _isSameExceptionEvent(currentEvent, previousEvent) {
988
+ var previousException = _getExceptionFromEvent(previousEvent);
989
+ var currentException = _getExceptionFromEvent(currentEvent);
990
+
991
+ if (!previousException || !currentException) {
992
+ return false;
993
+ }
994
+
995
+ if (previousException.type !== currentException.type || previousException.value !== currentException.value) {
996
+ return false;
997
+ }
998
+
999
+ if (!_isSameFingerprint(currentEvent, previousEvent)) {
1000
+ return false;
1001
+ }
1002
+
1003
+ if (!_isSameStacktrace(currentEvent, previousEvent)) {
1004
+ return false;
1005
+ }
1006
+
1007
+ return true;
1008
  }
1009
+
1010
  /** JSDoc */
1011
  function _isSameStacktrace(currentEvent, previousEvent) {
1012
+ let currentFrames = _getFramesFromEvent(currentEvent);
1013
+ let previousFrames = _getFramesFromEvent(previousEvent);
1014
+
1015
+ // If neither event has a stacktrace, they are assumed to be the same
1016
+ if (!currentFrames && !previousFrames) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1017
  return true;
1018
+ }
1019
+
1020
+ // If only one event has a stacktrace, but not the other one, they are not the same
1021
+ if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {
1022
+ return false;
1023
+ }
1024
+
1025
+ currentFrames = currentFrames ;
1026
+ previousFrames = previousFrames ;
1027
+
1028
+ // If number of frames differ, they are not the same
1029
+ if (previousFrames.length !== currentFrames.length) {
1030
+ return false;
1031
+ }
1032
+
1033
+ // Otherwise, compare the two
1034
+ for (let i = 0; i < previousFrames.length; i++) {
1035
+ var frameA = previousFrames[i];
1036
+ var frameB = currentFrames[i];
1037
+
1038
+ if (
1039
+ frameA.filename !== frameB.filename ||
1040
+ frameA.lineno !== frameB.lineno ||
1041
+ frameA.colno !== frameB.colno ||
1042
+ frameA.function !== frameB.function
1043
+ ) {
1044
+ return false;
1045
+ }
1046
+ }
1047
+
1048
+ return true;
1049
  }
1050
+
1051
  /** JSDoc */
1052
  function _isSameFingerprint(currentEvent, previousEvent) {
1053
+ let currentFingerprint = currentEvent.fingerprint;
1054
+ let previousFingerprint = previousEvent.fingerprint;
1055
+
1056
+ // If neither event has a fingerprint, they are assumed to be the same
1057
+ if (!currentFingerprint && !previousFingerprint) {
1058
+ return true;
1059
+ }
1060
+
1061
+ // If only one event has a fingerprint, but not the other one, they are not the same
1062
+ if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {
1063
+ return false;
1064
+ }
1065
+
1066
+ currentFingerprint = currentFingerprint ;
1067
+ previousFingerprint = previousFingerprint ;
1068
+
1069
+ // Otherwise, compare the two
1070
+ try {
1071
+ return !!(currentFingerprint.join('') === previousFingerprint.join(''));
1072
+ } catch (_oO) {
1073
+ return false;
1074
+ }
1075
  }
1076
+
1077
  /** JSDoc */
1078
  function _getExceptionFromEvent(event) {
1079
+ return event.exception && event.exception.values && event.exception.values[0];
1080
  }
1081
+
1082
  /** JSDoc */
1083
  function _getFramesFromEvent(event) {
1084
+ var exception = event.exception;
1085
+
1086
+ if (exception) {
1087
+ try {
1088
+ // @ts-ignore Object could be undefined
1089
+ return exception.values[0].stacktrace.frames;
1090
+ } catch (_oO) {
1091
+ return undefined;
 
 
 
 
1092
  }
1093
+ }
1094
+ return undefined;
1095
  }
1096
+
1097
+
1098
  //# sourceMappingURL=dedupe.js.map
1099
 
1100
+
1101
  /***/ }),
1102
 
1103
  /***/ 1228:
1106
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1107
  /* harmony export */ "d": function() { return /* binding */ GlobalHandlers; }
1108
  /* harmony export */ });
1109
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8585);
1110
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4005);
1111
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1757);
1112
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4194);
1113
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8536);
1114
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3699);
1115
+ /* harmony import */ var _eventbuilder_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1988);
1116
+ /* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2634);
 
 
 
 
 
 
1117
 
1118
 
1119
 
1120
 
1121
 
1122
  /** Global handlers */
1123
+ class GlobalHandlers {
1124
+ /**
1125
+ * @inheritDoc
1126
+ */
1127
+ static __initStatic() {this.id = 'GlobalHandlers';}
1128
+
1129
+ /**
1130
+ * @inheritDoc
1131
+ */
1132
+ __init() {this.name = GlobalHandlers.id;}
1133
+
1134
+ /** JSDoc */
1135
+
1136
+
1137
+ /**
1138
+ * Stores references functions to installing handlers. Will set to undefined
1139
+ * after they have been run so that they are not used twice.
1140
+ */
1141
+ __init2() {this._installFunc = {
1142
+ onerror: _installGlobalOnErrorHandler,
1143
+ onunhandledrejection: _installGlobalOnUnhandledRejectionHandler,
1144
+ };}
1145
+
1146
+ /** JSDoc */
1147
+ constructor(options) {;GlobalHandlers.prototype.__init.call(this);GlobalHandlers.prototype.__init2.call(this);
1148
+ this._options = {
1149
+ onerror: true,
1150
+ onunhandledrejection: true,
1151
+ ...options,
1152
+ };
1153
+ }
1154
+ /**
1155
+ * @inheritDoc
1156
+ */
1157
+ setupOnce() {
1158
+ Error.stackTraceLimit = 50;
1159
+ var options = this._options;
1160
+
1161
+ // We can disable guard-for-in as we construct the options object above + do checks against
1162
+ // `this._installFunc` for the property.
1163
  for (var key in options) {
1164
+ var installFunc = this._installFunc[key ];
1165
+ if (installFunc && options[key ]) {
1166
+ globalHandlerLog(key);
1167
+ installFunc();
1168
+ this._installFunc[key ] = undefined;
1169
+ }
1170
+ }
1171
+ }
1172
+ } GlobalHandlers.__initStatic();
 
 
 
 
 
1173
 
1174
  /** JSDoc */
1175
  function _installGlobalOnErrorHandler() {
1176
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .addInstrumentationHandler */ .o)(
1177
+ 'error',
1178
+ (data) => {
1179
+ const [hub, stackParser, attachStacktrace] = getHubAndOptions();
1180
+ if (!hub.getIntegration(GlobalHandlers)) {
1181
+ return;
1182
+ }
1183
+ const { msg, url, line, column, error } = data;
1184
+ if ((0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__/* .shouldIgnoreOnError */ .Wz)() || (error && error.__sentry_own_request__)) {
1185
+ return;
1186
+ }
1187
+
1188
+ var event =
1189
+ error === undefined && (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .HD)(msg)
1190
+ ? _eventFromIncompleteOnError(msg, url, line, column)
1191
+ : _enhanceEventWithInitialFrame(
1192
+ (0,_eventbuilder_js__WEBPACK_IMPORTED_MODULE_3__/* .eventFromUnknownInput */ .ME)(stackParser, error || msg, undefined, attachStacktrace, false),
1193
+ url,
1194
+ line,
1195
+ column,
1196
+ );
1197
+
1198
+ event.level = 'error';
1199
+
1200
+ addMechanismAndCapture(hub, error, event, 'onerror');
1201
+ },
1202
+ );
1203
  }
1204
+
1205
  /** JSDoc */
1206
  function _installGlobalOnUnhandledRejectionHandler() {
1207
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .addInstrumentationHandler */ .o)(
1208
+ 'unhandledrejection',
1209
+ (e) => {
1210
+ const [hub, stackParser, attachStacktrace] = getHubAndOptions();
1211
+ if (!hub.getIntegration(GlobalHandlers)) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1212
  return;
1213
+ }
1214
+ let error = e;
1215
+
1216
+ // dig the object of the rejection out of known event types
1217
+ try {
1218
+ // PromiseRejectionEvents store the object of the rejection under 'reason'
1219
+ // see https://developer.mozilla.org/en-US/docs/Web/API/PromiseRejectionEvent
1220
+ if ('reason' in e) {
1221
+ error = e.reason;
1222
+ }
1223
+ // something, somewhere, (likely a browser extension) effectively casts PromiseRejectionEvents
1224
+ // to CustomEvents, moving the `promise` and `reason` attributes of the PRE into
1225
+ // the CustomEvent's `detail` attribute, since they're not part of CustomEvent's spec
1226
+ // see https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent and
1227
+ // https://github.com/getsentry/sentry-javascript/issues/2380
1228
+ else if ('detail' in e && 'reason' in e.detail) {
1229
+ error = e.detail.reason;
1230
+ }
1231
+ } catch (_oO) {
1232
+ // no-empty
1233
+ }
1234
+
1235
+ if ((0,_helpers_js__WEBPACK_IMPORTED_MODULE_1__/* .shouldIgnoreOnError */ .Wz)() || (error && error.__sentry_own_request__)) {
1236
+ return true;
1237
+ }
1238
+
1239
+ var event = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .isPrimitive */ .pt)(error)
1240
+ ? _eventFromRejectionWithPrimitive(error)
1241
+ : (0,_eventbuilder_js__WEBPACK_IMPORTED_MODULE_3__/* .eventFromUnknownInput */ .ME)(stackParser, error, undefined, attachStacktrace, true);
1242
+
1243
+ event.level = 'error';
1244
+
1245
+ addMechanismAndCapture(hub, error, event, 'onunhandledrejection');
1246
+ return;
1247
+ },
1248
+ );
1249
  }
1250
+
1251
  /**
1252
  * Create an event from a promise rejection where the `reason` is a primitive.
1253
  *
1255
  * @returns An Event object with an appropriate `exception` value
1256
  */
1257
  function _eventFromRejectionWithPrimitive(reason) {
1258
+ return {
1259
+ exception: {
1260
+ values: [
1261
+ {
1262
+ type: 'UnhandledRejection',
1263
+ // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)
1264
+ value: `Non-Error promise rejection captured with value: ${String(reason)}`,
 
 
1265
  },
1266
+ ],
1267
+ },
1268
+ };
1269
  }
1270
+
1271
  /**
1272
  * This function creates a stack from an old, error-less onerror handler.
1273
  */
 
1274
  function _eventFromIncompleteOnError(msg, url, line, column) {
1275
+ var ERROR_TYPES_RE =
1276
+ /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
1277
+
1278
+ // If 'message' is ErrorEvent, get real message from inside
1279
+ let message = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .isErrorEvent */ .VW)(msg) ? msg.message : msg;
1280
+ let name = 'Error';
1281
+
1282
+ var groups = message.match(ERROR_TYPES_RE);
1283
+ if (groups) {
1284
+ name = groups[1];
1285
+ message = groups[2];
1286
+ }
1287
+
1288
+ var event = {
1289
+ exception: {
1290
+ values: [
1291
+ {
1292
+ type: name,
1293
+ value: message,
1294
  },
1295
+ ],
1296
+ },
1297
+ };
1298
+
1299
+ return _enhanceEventWithInitialFrame(event, url, line, column);
1300
  }
1301
+
1302
  /** JSDoc */
 
1303
  function _enhanceEventWithInitialFrame(event, url, line, column) {
1304
+ // event.exception
1305
+ var e = (event.exception = event.exception || {});
1306
+ // event.exception.values
1307
+ var ev = (e.values = e.values || []);
1308
+ // event.exception.values[0]
1309
+ var ev0 = (ev[0] = ev[0] || {});
1310
+ // event.exception.values[0].stacktrace
1311
+ var ev0s = (ev0.stacktrace = ev0.stacktrace || {});
1312
+ // event.exception.values[0].stacktrace.frames
1313
+ var ev0sf = (ev0s.frames = ev0s.frames || []);
1314
+
1315
+ var colno = isNaN(parseInt(column, 10)) ? undefined : column;
1316
+ var lineno = isNaN(parseInt(line, 10)) ? undefined : line;
1317
+ var filename = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .HD)(url) && url.length > 0 ? url : (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .getLocationHref */ .l)();
1318
+
1319
+ // event.exception.values[0].stacktrace.frames
1320
+ if (ev0sf.length === 0) {
1321
+ ev0sf.push({
1322
+ colno,
1323
+ filename,
1324
+ function: '?',
1325
+ in_app: true,
1326
+ lineno,
1327
+ });
1328
+ }
1329
+
1330
+ return event;
1331
  }
1332
+
1333
  function globalHandlerLog(type) {
1334
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .logger.log */ .kg.log(`Global Handler attached: ${type}`);
1335
  }
1336
+
1337
  function addMechanismAndCapture(hub, error, event, type) {
1338
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .addExceptionMechanism */ .EG)(event, {
1339
+ handled: false,
1340
+ type,
1341
+ });
1342
+ hub.captureEvent(event, {
1343
+ originalException: error,
1344
+ });
1345
+ }
1346
+
1347
+ function getHubAndOptions() {
1348
+ var hub = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_7__/* .getCurrentHub */ .Gd)();
1349
+ var client = hub.getClient();
1350
+ var options = (client && client.getOptions()) || {
1351
+ stackParser: () => [],
1352
+ attachStacktrace: false,
1353
+ };
1354
+ return [hub, options.stackParser, options.attachStacktrace];
1355
  }
1356
+
1357
+
1358
  //# sourceMappingURL=globalhandlers.js.map
1359
 
1360
+
1361
+ /***/ }),
1362
+
1363
+ /***/ 2605:
1364
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1365
+
1366
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1367
+ /* harmony export */ "q": function() { return /* binding */ HttpContext; }
1368
+ /* harmony export */ });
1369
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1684);
1370
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8585);
1371
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
1372
+
1373
+
1374
+
1375
+ var global = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
1376
+
1377
+ /** HttpContext integration collects information about HTTP request headers */
1378
+ class HttpContext {constructor() { HttpContext.prototype.__init.call(this); }
1379
+ /**
1380
+ * @inheritDoc
1381
+ */
1382
+ static __initStatic() {this.id = 'HttpContext';}
1383
+
1384
+ /**
1385
+ * @inheritDoc
1386
+ */
1387
+ __init() {this.name = HttpContext.id;}
1388
+
1389
+ /**
1390
+ * @inheritDoc
1391
+ */
1392
+ setupOnce() {
1393
+ (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .addGlobalEventProcessor */ .c)((event) => {
1394
+ if ((0,_sentry_core__WEBPACK_IMPORTED_MODULE_2__/* .getCurrentHub */ .Gd)().getIntegration(HttpContext)) {
1395
+ // if none of the information we want exists, don't bother
1396
+ if (!global.navigator && !global.location && !global.document) {
1397
+ return event;
1398
+ }
1399
+
1400
+ // grab as much info as exists and add it to the event
1401
+ var url = (event.request && event.request.url) || (global.location && global.location.href);
1402
+ const { referrer } = global.document || {};
1403
+ const { userAgent } = global.navigator || {};
1404
+
1405
+ var headers = {
1406
+ ...(event.request && event.request.headers),
1407
+ ...(referrer && { Referer: referrer }),
1408
+ ...(userAgent && { 'User-Agent': userAgent }),
1409
+ };
1410
+ var request = { ...(url && { url }), headers };
1411
+
1412
+ return { ...event, request };
1413
+ }
1414
+ return event;
1415
+ });
1416
+ }
1417
+ } HttpContext.__initStatic();
1418
+
1419
+
1420
+ //# sourceMappingURL=httpcontext.js.map
1421
+
1422
+
1423
  /***/ }),
1424
 
1425
  /***/ 3440:
1429
  /* harmony export */ "iP": function() { return /* binding */ LinkedErrors; }
1430
  /* harmony export */ });
1431
  /* unused harmony exports _handler, _walkErrorTree */
1432
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8585);
1433
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1684);
 
1434
  /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1757);
1435
+ /* harmony import */ var _eventbuilder_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1988);
1436
 
1437
 
1438
 
1439
 
1440
  var DEFAULT_KEY = 'cause';
1441
  var DEFAULT_LIMIT = 5;
1442
+
1443
  /** Adds SDK info to an event. */
1444
+ class LinkedErrors {
1445
+ /**
1446
+ * @inheritDoc
1447
+ */
1448
+ static __initStatic() {this.id = 'LinkedErrors';}
1449
+
1450
+ /**
1451
+ * @inheritDoc
1452
+ */
1453
+ __init() {this.name = LinkedErrors.id;}
1454
+
1455
+ /**
1456
+ * @inheritDoc
1457
+ */
1458
+
1459
+
1460
+ /**
1461
+ * @inheritDoc
1462
+ */
1463
+
1464
+
1465
+ /**
1466
+ * @inheritDoc
1467
+ */
1468
+ constructor(options = {}) {;LinkedErrors.prototype.__init.call(this);
1469
+ this._key = options.key || DEFAULT_KEY;
1470
+ this._limit = options.limit || DEFAULT_LIMIT;
1471
+ }
1472
+
1473
+ /**
1474
+ * @inheritDoc
1475
+ */
1476
+ setupOnce() {
1477
+ var client = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_0__/* .getCurrentHub */ .Gd)().getClient();
1478
+ if (!client) {
1479
+ return;
1480
  }
1481
+ (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .addGlobalEventProcessor */ .c)((event, hint) => {
1482
+ var self = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_0__/* .getCurrentHub */ .Gd)().getIntegration(LinkedErrors);
1483
+ return self ? _handler(client.getOptions().stackParser, self._key, self._limit, event, hint) : event;
1484
+ });
1485
+ }
1486
+ } LinkedErrors.__initStatic();
 
 
 
 
 
 
 
 
 
1487
 
1488
  /**
1489
  * @inheritDoc
1490
  */
1491
+ function _handler(
1492
+ parser,
1493
+ key,
1494
+ limit,
1495
+ event,
1496
+ hint,
1497
+ ) {
1498
+ if (!event.exception || !event.exception.values || !hint || !(0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .isInstanceOf */ .V9)(hint.originalException, Error)) {
1499
  return event;
1500
+ }
1501
+ var linkedErrors = _walkErrorTree(parser, limit, hint.originalException , key);
1502
+ event.exception.values = [...linkedErrors, ...event.exception.values];
1503
+ return event;
1504
  }
1505
+
1506
  /**
1507
  * JSDOC
1508
  */
1509
+ function _walkErrorTree(
1510
+ parser,
1511
+ limit,
1512
+ error,
1513
+ key,
1514
+ stack = [],
1515
+ ) {
1516
+ if (!(0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .isInstanceOf */ .V9)(error[key], Error) || stack.length + 1 >= limit) {
1517
+ return stack;
1518
+ }
1519
+ var exception = (0,_eventbuilder_js__WEBPACK_IMPORTED_MODULE_3__/* .exceptionFromError */ .GJ)(parser, error[key]);
1520
+ return _walkErrorTree(parser, limit, error[key], key, [exception, ...stack]);
1521
  }
1522
+
1523
+
1524
  //# sourceMappingURL=linkederrors.js.map
1525
 
1526
+
1527
  /***/ }),
1528
 
1529
  /***/ 3399:
1532
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1533
  /* harmony export */ "p": function() { return /* binding */ TryCatch; }
1534
  /* harmony export */ });
1535
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
1536
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1995);
1537
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9038);
1538
+ /* harmony import */ var _helpers_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2634);
1539
+
 
1540
 
1541
 
1542
  var DEFAULT_EVENT_TARGET = [
1543
+ 'EventTarget',
1544
+ 'Window',
1545
+ 'Node',
1546
+ 'ApplicationCache',
1547
+ 'AudioTrackList',
1548
+ 'ChannelMergerNode',
1549
+ 'CryptoOperation',
1550
+ 'EventSource',
1551
+ 'FileReader',
1552
+ 'HTMLUnknownElement',
1553
+ 'IDBDatabase',
1554
+ 'IDBRequest',
1555
+ 'IDBTransaction',
1556
+ 'KeyOperation',
1557
+ 'MediaController',
1558
+ 'MessagePort',
1559
+ 'ModalWindow',
1560
+ 'Notification',
1561
+ 'SVGElementInstance',
1562
+ 'Screen',
1563
+ 'TextTrack',
1564
+ 'TextTrackCue',
1565
+ 'TextTrackList',
1566
+ 'WebSocket',
1567
+ 'WebSocketWorker',
1568
+ 'Worker',
1569
+ 'XMLHttpRequest',
1570
+ 'XMLHttpRequestEventTarget',
1571
+ 'XMLHttpRequestUpload',
1572
  ];
1573
+
1574
  /** Wrap timer functions and event targets to catch errors and provide better meta data */
1575
+ class TryCatch {
1576
+ /**
1577
+ * @inheritDoc
1578
+ */
1579
+ static __initStatic() {this.id = 'TryCatch';}
1580
+
1581
+ /**
1582
+ * @inheritDoc
1583
+ */
1584
+ __init() {this.name = TryCatch.id;}
1585
+
1586
+ /** JSDoc */
1587
+
1588
+
1589
+ /**
1590
+ * @inheritDoc
1591
+ */
1592
+ constructor(options) {;TryCatch.prototype.__init.call(this);
1593
+ this._options = {
1594
+ XMLHttpRequest: true,
1595
+ eventTarget: true,
1596
+ requestAnimationFrame: true,
1597
+ setInterval: true,
1598
+ setTimeout: true,
1599
+ ...options,
 
 
 
 
 
 
 
 
 
1600
  };
1601
+ }
1602
+
1603
+ /**
1604
+ * Wrap timer functions and event targets to catch errors
1605
+ * and provide better metadata.
1606
+ */
1607
+ setupOnce() {
1608
+ var global = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
1609
+
1610
+ if (this._options.setTimeout) {
1611
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .fill */ .hl)(global, 'setTimeout', _wrapTimeFunction);
1612
+ }
1613
+
1614
+ if (this._options.setInterval) {
1615
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .fill */ .hl)(global, 'setInterval', _wrapTimeFunction);
1616
+ }
1617
+
1618
+ if (this._options.requestAnimationFrame) {
1619
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .fill */ .hl)(global, 'requestAnimationFrame', _wrapRAF);
1620
+ }
1621
+
1622
+ if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {
1623
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .fill */ .hl)(XMLHttpRequest.prototype, 'send', _wrapXHR);
1624
+ }
1625
+
1626
+ var eventTargetOption = this._options.eventTarget;
1627
+ if (eventTargetOption) {
1628
+ var eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;
1629
+ eventTarget.forEach(_wrapEventTarget);
1630
+ }
1631
+ }
1632
+ } TryCatch.__initStatic();
1633
 
1634
  /** JSDoc */
1635
  function _wrapTimeFunction(original) {
1636
+ return function ( ...args) {
1637
+ var originalCallback = args[0];
1638
+ args[0] = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__/* .wrap */ .re)(originalCallback, {
1639
+ mechanism: {
1640
+ data: { function: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .getFunctionName */ .$P)(original) },
1641
+ handled: true,
1642
+ type: 'instrument',
1643
+ },
1644
+ });
1645
+ return original.apply(this, args);
1646
+ };
 
 
 
 
 
1647
  }
1648
+
1649
  /** JSDoc */
 
1650
  function _wrapRAF(original) {
1651
+ return function ( callback) {
 
 
1652
  return original.apply(this, [
1653
+ (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__/* .wrap */ .re)(callback, {
1654
+ mechanism: {
1655
+ data: {
1656
+ function: 'requestAnimationFrame',
1657
+ handler: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .getFunctionName */ .$P)(original),
1658
+ },
1659
+ handled: true,
1660
+ type: 'instrument',
1661
+ },
1662
+ }),
1663
+ ]);
1664
+ };
1665
  }
1666
+
1667
  /** JSDoc */
1668
  function _wrapXHR(originalSend) {
1669
+ return function ( ...args) {
 
 
 
 
 
 
1670
  var xhr = this;
1671
+ var xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];
1672
+
1673
+ xmlHttpRequestProps.forEach(prop => {
1674
+ if (prop in xhr && typeof xhr[prop] === 'function') {
1675
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .fill */ .hl)(xhr, prop, function (original) {
1676
+ var wrapOptions = {
1677
+ mechanism: {
1678
+ data: {
1679
+ function: prop,
1680
+ handler: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .getFunctionName */ .$P)(original),
1681
+ },
1682
+ handled: true,
1683
+ type: 'instrument',
1684
+ },
1685
+ };
1686
+
1687
+ // If Instrument integration has been called before TryCatch, get the name of original function
1688
+ var originalFunction = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .getOriginalFunction */ .HK)(original);
1689
+ if (originalFunction) {
1690
+ wrapOptions.mechanism.data.handler = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .getFunctionName */ .$P)(originalFunction);
1691
+ }
1692
+
1693
+ // Otherwise wrap directly
1694
+ return (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__/* .wrap */ .re)(original, wrapOptions);
1695
  });
1696
+ }
1697
+ });
1698
+
1699
+ return originalSend.apply(this, args);
1700
+ };
1701
  }
1702
+
1703
  /** JSDoc */
1704
  function _wrapEventTarget(target) {
1705
+ var global = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)() ;
 
 
1706
  var proto = global[target] && global[target].prototype;
1707
+
1708
  if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {
1709
+ return;
1710
+ }
1711
+
1712
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .fill */ .hl)(proto, 'addEventListener', function (original)
1713
+
1714
+ {
1715
+ return function (
1716
+
1717
+ eventName,
1718
+ fn,
1719
+ options,
1720
+ ) {
1721
+ try {
1722
+ if (typeof fn.handleEvent === 'function') {
1723
+ // ESlint disable explanation:
1724
+ // First, it is generally safe to call `wrap` with an unbound function. Furthermore, using `.bind()` would
1725
+ // introduce a bug here, because bind returns a new function that doesn't have our
1726
+ // flags(like __sentry_original__) attached. `wrap` checks for those flags to avoid unnecessary wrapping.
1727
+ // Without those flags, every call to addEventListener wraps the function again, causing a memory leak.
1728
+ fn.handleEvent = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__/* .wrap */ .re)(fn.handleEvent, {
1729
+ mechanism: {
1730
+ data: {
1731
+ function: 'handleEvent',
1732
+ handler: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .getFunctionName */ .$P)(fn),
1733
+ target,
1734
+ },
1735
+ handled: true,
1736
+ type: 'instrument',
1737
+ },
1738
+ });
1739
+ }
1740
+ } catch (err) {
1741
+ // can sometimes get 'Permission denied to access property "handle Event'
1742
+ }
1743
+
1744
+ return original.apply(this, [
1745
+ eventName,
1746
+ (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__/* .wrap */ .re)(fn , {
1747
+ mechanism: {
1748
+ data: {
1749
+ function: 'addEventListener',
1750
+ handler: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .getFunctionName */ .$P)(fn),
1751
+ target,
1752
+ },
1753
+ handled: true,
1754
+ type: 'instrument',
1755
+ },
1756
+ }),
1757
+ options,
1758
+ ]);
1759
+ };
1760
+ });
1761
+
1762
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .fill */ .hl)(
1763
+ proto,
1764
+ 'removeEventListener',
1765
+ function (
1766
+ originalRemoveEventListener,
1767
+ ) {
1768
+ return function (
1769
+
1770
+ eventName,
1771
+ fn,
1772
+ options,
1773
+ ) {
1774
+ /**
1775
+ * There are 2 possible scenarios here:
1776
+ *
1777
+ * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified
1778
+ * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function
1779
+ * as a pass-through, and call original `removeEventListener` with it.
1780
+ *
1781
+ * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using
1782
+ * our wrapped version of `addEventListener`, which internally calls `wrap` helper.
1783
+ * This helper "wraps" whole callback inside a try/catch statement, and attached appropriate metadata to it,
1784
+ * in order for us to make a distinction between wrapped/non-wrapped functions possible.
1785
+ * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.
1786
+ *
1787
+ * When someone adds a handler prior to initialization, and then do it again, but after,
1788
+ * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible
1789
+ * to get rid of the initial handler and it'd stick there forever.
1790
+ */
1791
+ var wrappedEventHandler = fn ;
1792
+ try {
1793
+ var originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;
1794
+ if (originalEventHandler) {
1795
+ originalRemoveEventListener.call(this, eventName, originalEventHandler, options);
1796
+ }
1797
+ } catch (e) {
1798
+ // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments
1799
+ }
1800
+ return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);
1801
+ };
1802
+ },
1803
+ );
1804
  }
1805
+
1806
+
1807
  //# sourceMappingURL=trycatch.js.map
1808
 
1809
+
1810
  /***/ }),
1811
 
1812
+ /***/ 2456:
1813
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1814
 
1815
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1816
+ /* harmony export */ "yl": function() { return /* binding */ flush; },
1817
+ /* harmony export */ "S1": function() { return /* binding */ init; }
1818
  /* harmony export */ });
1819
+ /* unused harmony exports close, defaultIntegrations, forceLoad, lastEventId, onLoad, showReportDialog, wrap */
1820
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1061);
1821
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6286);
1822
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(8889);
1823
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(6853);
1824
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(8585);
1825
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(5907);
1826
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(9038);
1827
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(9798);
1828
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(8536);
1829
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(7946);
1830
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(4005);
1831
+ /* harmony import */ var _client_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(2314);
1832
+ /* harmony import */ var _stack_parsers_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2224);
1833
+ /* harmony import */ var _integrations_trycatch_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3399);
1834
+ /* harmony import */ var _integrations_breadcrumbs_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8356);
1835
+ /* harmony import */ var _integrations_globalhandlers_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1228);
1836
+ /* harmony import */ var _integrations_linkederrors_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3440);
1837
+ /* harmony import */ var _integrations_dedupe_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(184);
1838
+ /* harmony import */ var _integrations_httpcontext_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(2605);
1839
+ /* harmony import */ var _transports_fetch_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(6149);
1840
+ /* harmony import */ var _transports_xhr_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(6144);
1841
+
1842
+
1843
 
1844
 
1845
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1846
 
 
1847
 
 
1848
 
 
 
1849
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1850
 
1851
 
1852
 
1855
 
1856
 
1857
  var defaultIntegrations = [
1858
+ new _sentry_core__WEBPACK_IMPORTED_MODULE_0__/* .InboundFilters */ .QD(),
1859
+ new _sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .FunctionToString */ .c(),
1860
+ new _integrations_trycatch_js__WEBPACK_IMPORTED_MODULE_2__/* .TryCatch */ .p(),
1861
+ new _integrations_breadcrumbs_js__WEBPACK_IMPORTED_MODULE_3__/* .Breadcrumbs */ .O(),
1862
+ new _integrations_globalhandlers_js__WEBPACK_IMPORTED_MODULE_4__/* .GlobalHandlers */ .d(),
1863
+ new _integrations_linkederrors_js__WEBPACK_IMPORTED_MODULE_5__/* .LinkedErrors */ .iP(),
1864
+ new _integrations_dedupe_js__WEBPACK_IMPORTED_MODULE_6__/* .Dedupe */ .I(),
1865
+ new _integrations_httpcontext_js__WEBPACK_IMPORTED_MODULE_7__/* .HttpContext */ .q(),
1866
  ];
1867
+
1868
  /**
1869
  * The Sentry Browser SDK Client.
1870
  *
1922
  *
1923
  * @see {@link BrowserOptions} for documentation on configuration options.
1924
  */
1925
+ function init(options = {}) {
1926
+ if (options.defaultIntegrations === undefined) {
1927
+ options.defaultIntegrations = defaultIntegrations;
1928
+ }
1929
+ if (options.release === undefined) {
1930
+ var window = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_8__/* .getGlobalObject */ .R)();
1931
+ // This supports the variable that sentry-webpack-plugin injects
1932
+ if (window.SENTRY_RELEASE && window.SENTRY_RELEASE.id) {
1933
+ options.release = window.SENTRY_RELEASE.id;
1934
+ }
1935
+ }
1936
+ if (options.autoSessionTracking === undefined) {
1937
+ options.autoSessionTracking = true;
1938
+ }
1939
+ if (options.sendClientReports === undefined) {
1940
+ options.sendClientReports = true;
1941
+ }
1942
+
1943
+ var clientOptions = {
1944
+ ...options,
1945
+ stackParser: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_9__/* .stackParserFromStackParserOptions */ .Sq)(options.stackParser || _stack_parsers_js__WEBPACK_IMPORTED_MODULE_10__/* .defaultStackParser */ .Dt),
1946
+ integrations: (0,_sentry_core__WEBPACK_IMPORTED_MODULE_11__/* .getIntegrationsToSetup */ .m8)(options),
1947
+ transport: options.transport || ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .supportsFetch */ .Ak)() ? _transports_fetch_js__WEBPACK_IMPORTED_MODULE_13__/* .makeFetchTransport */ .f : _transports_xhr_js__WEBPACK_IMPORTED_MODULE_14__/* .makeXHRTransport */ .K),
1948
+ };
1949
+
1950
+ (0,_sentry_core__WEBPACK_IMPORTED_MODULE_15__/* .initAndBind */ .M)(_client_js__WEBPACK_IMPORTED_MODULE_16__/* .BrowserClient */ .R, clientOptions);
1951
+
1952
+ if (options.autoSessionTracking) {
1953
+ startSessionTracking();
1954
+ }
1955
  }
1956
+
1957
  /**
1958
  * Present the user with a report dialog.
1959
  *
1960
  * @param options Everything is optional, we try to fetch all info need from the global scope.
1961
  */
1962
+ function showReportDialog(options = {}, hub = getCurrentHub()) {
1963
+ // doesn't work without a document (React Native)
1964
+ var global = getGlobalObject();
1965
+ if (!global.document) {
1966
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Global document not defined in showReportDialog call');
1967
+ return;
1968
+ }
1969
+
1970
+ const { client, scope } = hub.getStackTop();
1971
+ var dsn = options.dsn || (client && client.getDsn());
1972
+ if (!dsn) {
1973
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('DSN not configured for showReportDialog call');
1974
+ return;
1975
+ }
1976
+
1977
+ if (scope) {
1978
+ options.user = {
1979
+ ...scope.getUser(),
1980
+ ...options.user,
1981
+ };
1982
+ }
1983
+
1984
+ if (!options.eventId) {
1985
+ options.eventId = hub.lastEventId();
1986
+ }
1987
+
1988
+ var script = global.document.createElement('script');
1989
+ script.async = true;
1990
+ script.src = getReportDialogEndpoint(dsn, options);
1991
+
1992
+ if (options.onLoad) {
1993
+ script.onload = options.onLoad;
1994
+ }
1995
+
1996
+ var injectionPoint = global.document.head || global.document.body;
1997
+ if (injectionPoint) {
1998
+ injectionPoint.appendChild(script);
1999
+ } else {
2000
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.error('Not injecting report dialog. No injection point found in HTML');
2001
+ }
2002
  }
2003
+
2004
  /**
2005
  * This is the getter for lastEventId.
2006
  *
2007
  * @returns The last event id of a captured event.
2008
  */
2009
  function lastEventId() {
2010
+ return getCurrentHub().lastEventId();
2011
  }
2012
+
2013
  /**
2014
  * This function is here to be API compatible with the loader.
2015
  * @hidden
2016
  */
2017
  function forceLoad() {
2018
+ // Noop
2019
  }
2020
+
2021
  /**
2022
  * This function is here to be API compatible with the loader.
2023
  * @hidden
2024
  */
2025
  function onLoad(callback) {
2026
+ callback();
2027
  }
2028
+
2029
  /**
2030
  * Call `flush()` on the current client, if there is one. See {@link Client.flush}.
2031
  *
2035
  * doesn't (or if there's no client defined).
2036
  */
2037
  function flush(timeout) {
2038
+ var client = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_17__/* .getCurrentHub */ .Gd)().getClient();
2039
+ if (client) {
2040
+ return client.flush(timeout);
2041
+ }
2042
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_18__/* .logger.warn */ .kg.warn('Cannot flush events. No client defined.');
2043
+ return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_19__/* .resolvedSyncPromise */ .WD)(false);
2044
  }
2045
+
2046
  /**
2047
  * Call `close()` on the current client, if there is one. See {@link Client.close}.
2048
  *
2052
  * doesn't (or if there's no client defined).
2053
  */
2054
  function close(timeout) {
2055
+ var client = getCurrentHub().getClient();
2056
+ if (client) {
2057
+ return client.close(timeout);
2058
+ }
2059
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && logger.warn('Cannot flush events and disable SDK. No client defined.');
2060
+ return resolvedSyncPromise(false);
2061
  }
2062
+
2063
  /**
2064
  * Wrap code within a try/catch block so the SDK is able to capture errors.
2065
  *
2067
  *
2068
  * @returns The result of wrapped function call.
2069
  */
 
2070
  function wrap(fn) {
2071
+ return wrap$1(fn)();
2072
  }
2073
+
2074
  function startSessionOnHub(hub) {
2075
+ hub.startSession({ ignoreDuration: true });
2076
+ hub.captureSession();
2077
  }
2078
+
2079
  /**
2080
  * Enable automatic Session Tracking for the initial page load.
2081
  */
2082
  function startSessionTracking() {
2083
+ var window = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_8__/* .getGlobalObject */ .R)();
2084
+ var document = window.document;
2085
+
2086
+ if (typeof document === 'undefined') {
2087
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
2088
+ _sentry_utils__WEBPACK_IMPORTED_MODULE_18__/* .logger.warn */ .kg.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');
2089
+ return;
2090
+ }
2091
+
2092
+ var hub = (0,_sentry_core__WEBPACK_IMPORTED_MODULE_17__/* .getCurrentHub */ .Gd)();
2093
+
2094
+ // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and
2095
+ // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are
2096
+ // pinned at the same version in package.json, but there are edge cases where it's possible. See
2097
+ // https://github.com/getsentry/sentry-javascript/issues/3207 and
2098
+ // https://github.com/getsentry/sentry-javascript/issues/3234 and
2099
+ // https://github.com/getsentry/sentry-javascript/issues/3278.
2100
+ if (!hub.captureSession) {
2101
+ return;
2102
+ }
2103
+
2104
+ // The session duration for browser sessions does not track a meaningful
2105
+ // concept that can be used as a metric.
2106
+ // Automatically captured sessions are akin to page views, and thus we
2107
+ // discard their duration.
2108
+ startSessionOnHub(hub);
2109
+
2110
+ // We want to create a session for every navigation as well
2111
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_20__/* .addInstrumentationHandler */ .o)('history', ({ from, to }) => {
2112
+ // Don't create an additional session for the initial route or if the location did not change
2113
+ if (!(from === undefined || from === to)) {
2114
+ startSessionOnHub((0,_sentry_core__WEBPACK_IMPORTED_MODULE_17__/* .getCurrentHub */ .Gd)());
2115
  }
2116
+ });
 
 
 
 
 
 
 
 
 
 
 
 
2117
  }
2118
+
2119
+
2120
  //# sourceMappingURL=sdk.js.map
2121
 
2122
+
2123
  /***/ }),
2124
 
2125
  /***/ 2224:
2126
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2127
 
2128
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2129
+ /* harmony export */ "Dt": function() { return /* binding */ defaultStackParser; }
 
 
 
 
2130
  /* harmony export */ });
2131
+ /* unused harmony exports chromeStackLineParser, defaultStackLineParsers, geckoStackLineParser, opera10StackLineParser, opera11StackLineParser, winjsStackLineParser */
2132
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9038);
2133
+
2134
 
2135
  // global reference to slice
2136
  var UNKNOWN_FUNCTION = '?';
2137
+
2138
  var OPERA10_PRIORITY = 10;
2139
  var OPERA11_PRIORITY = 20;
2140
  var CHROME_PRIORITY = 30;
2141
  var WINJS_PRIORITY = 40;
2142
  var GECKO_PRIORITY = 50;
2143
+
2144
  function createFrame(filename, func, lineno, colno) {
2145
+ var frame = {
2146
+ filename,
2147
+ function: func,
2148
+ // All browser frames are considered in_app
2149
+ in_app: true,
2150
+ };
2151
+
2152
+ if (lineno !== undefined) {
2153
+ frame.lineno = lineno;
2154
+ }
2155
+
2156
+ if (colno !== undefined) {
2157
+ frame.colno = colno;
2158
+ }
2159
+
2160
+ return frame;
2161
  }
2162
+
2163
  // Chromium based browsers: Chrome, Brave, new Opera, new Edge
2164
+ var chromeRegex =
2165
+ /^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i;
2166
  var chromeEvalRegex = /\((\S*)(?::(\d+))(?::(\d+))\)/;
2167
+
2168
+ var chrome = line => {
2169
+ var parts = chromeRegex.exec(line);
2170
+
2171
+ if (parts) {
2172
+ var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line
2173
+
2174
+ if (isEval) {
2175
+ var subMatch = chromeEvalRegex.exec(parts[2]);
2176
+
2177
+ if (subMatch) {
2178
+ // throw out eval line/column and use top-most line/column number
2179
+ parts[2] = subMatch[1]; // url
2180
+ parts[3] = subMatch[2]; // line
2181
+ parts[4] = subMatch[3]; // column
2182
+ }
 
2183
  }
2184
+
2185
+ // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now
2186
+ // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)
2187
+ const [func, filename] = extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]);
2188
+
2189
+ return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);
2190
+ }
2191
+
2192
+ return;
2193
  };
2194
+
2195
+ var chromeStackLineParser = [CHROME_PRIORITY, chrome];
2196
+
2197
  // gecko regex: `(?:bundle|\d+\.js)`: `bundle` is for react native, `\d+\.js` also but specifically for ram bundles because it
2198
  // generates filenames without a prefix like `file://` the filenames in the stacktrace are just 42.js
2199
  // We need this specific case for now because we want no other regex to match.
2200
+ var geckoREgex =
2201
+ /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i;
2202
  var geckoEvalRegex = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i;
2203
+
2204
+ var gecko = line => {
2205
+ var parts = geckoREgex.exec(line);
2206
+
2207
+ if (parts) {
2208
+ var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;
2209
+ if (isEval) {
2210
+ var subMatch = geckoEvalRegex.exec(parts[3]);
2211
+
2212
+ if (subMatch) {
2213
+ // throw out eval line/column and use top-most line number
2214
+ parts[1] = parts[1] || 'eval';
2215
+ parts[3] = subMatch[1];
2216
+ parts[4] = subMatch[2];
2217
+ parts[5] = ''; // no column when eval
2218
+ }
 
 
 
2219
  }
2220
+
2221
+ let filename = parts[3];
2222
+ let func = parts[1] || UNKNOWN_FUNCTION;
2223
+ [func, filename] = extractSafariExtensionDetails(func, filename);
2224
+
2225
+ return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);
2226
+ }
2227
+
2228
+ return;
2229
  };
2230
+
2231
+ var geckoStackLineParser = [GECKO_PRIORITY, gecko];
2232
+
2233
+ var winjsRegex =
2234
+ /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;
2235
+
2236
+ var winjs = line => {
2237
+ var parts = winjsRegex.exec(line);
2238
+
2239
+ return parts
2240
+ ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)
2241
+ : undefined;
2242
  };
2243
+
2244
+ var winjsStackLineParser = [WINJS_PRIORITY, winjs];
2245
+
2246
  var opera10Regex = / line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;
2247
+
2248
+ var opera10 = line => {
2249
+ var parts = opera10Regex.exec(line);
2250
+ return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;
2251
  };
2252
+
2253
+ var opera10StackLineParser = [OPERA10_PRIORITY, opera10];
2254
+
2255
+ var opera11Regex =
2256
+ / line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i;
2257
+
2258
+ var opera11 = line => {
2259
+ var parts = opera11Regex.exec(line);
2260
+ return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;
2261
  };
2262
+
2263
+ var opera11StackLineParser = [OPERA11_PRIORITY, opera11];
2264
+
2265
+ var defaultStackLineParsers = [chromeStackLineParser, geckoStackLineParser, winjsStackLineParser];
2266
+
2267
+ var defaultStackParser = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .createStackParser */ .pE)(...defaultStackLineParsers);
2268
+
2269
  /**
2270
  * Safari web extensions, starting version unknown, can produce "frames-only" stacktraces.
2271
  * What it means, is that instead of format like:
2286
  * Unfortunately "just" changing RegExp is too complicated now and making it pass all tests
2287
  * and fix this case seems like an impossible, or at least way too time-consuming task.
2288
  */
2289
+ var extractSafariExtensionDetails = (func, filename) => {
2290
+ var isSafariExtension = func.indexOf('safari-extension') !== -1;
2291
+ var isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;
2292
+
2293
+ return isSafariExtension || isSafariWebExtension
2294
+ ? [
2295
+ func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,
2296
+ isSafariExtension ? `safari-extension:${filename}` : `safari-web-extension:${filename}`,
2297
+ ]
2298
+ : [func, filename];
2299
  };
2300
+
2301
+
2302
  //# sourceMappingURL=stack-parsers.js.map
2303
 
2304
+
2305
  /***/ }),
2306
 
2307
+ /***/ 6149:
2308
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2309
 
2310
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2311
+ /* harmony export */ "f": function() { return /* binding */ makeFetchTransport; }
2312
  /* harmony export */ });
2313
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1518);
2314
+ /* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5854);
 
 
 
 
 
 
 
 
 
 
 
2315
 
2316
 
2317
 
2318
+ /**
2319
+ * Creates a Transport that uses the Fetch API to send events to Sentry.
2320
+ */
2321
+ function makeFetchTransport(
2322
+ options,
2323
+ nativeFetch = (0,_utils_js__WEBPACK_IMPORTED_MODULE_0__/* .getNativeFetchImplementation */ .x)(),
2324
+ ) {
2325
+ function makeRequest(request) {
2326
+ var requestOptions = {
2327
+ body: request.body,
2328
+ method: 'POST',
2329
+ referrerPolicy: 'origin',
2330
+ headers: options.headers,
2331
+ ...options.fetchOptions,
2332
+ };
2333
 
2334
+ return nativeFetch(options.url, requestOptions).then(response => ({
2335
+ statusCode: response.status,
2336
+ headers: {
2337
+ 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),
2338
+ 'retry-after': response.headers.get('Retry-After'),
2339
+ },
2340
+ }));
2341
+ }
2342
 
2343
+ return (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .createTransport */ .q)(options, makeRequest);
 
 
2344
  }
2345
+
2346
+
2347
+ //# sourceMappingURL=fetch.js.map
2348
+
2349
+
2350
+ /***/ }),
2351
+
2352
+ /***/ 5854:
2353
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2354
+
2355
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2356
+ /* harmony export */ "x": function() { return /* binding */ getNativeFetchImplementation; },
2357
+ /* harmony export */ "z": function() { return /* binding */ sendReport; }
2358
+ /* harmony export */ });
2359
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
2360
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9798);
2361
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8536);
2362
+
2363
+
2364
  var global = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
2365
+ let cachedFetchImpl;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2366
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2367
  /**
2368
  * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.
2369
  * Whenever someone wraps the Fetch API and returns the wrong promise chain,
2370
  * this chain becomes orphaned and there is no possible way to capture it's rejections
2371
  * other than allowing it bubble up to this very handler. eg.
2372
  *
2373
+ * var f = window.fetch;
2374
  * window.fetch = function () {
2375
+ * var p = f.apply(this, arguments);
2376
  *
2377
  * p.then(function() {
2378
  * console.log('hi.');
2403
  * Safari: resource blocked by content blocker
2404
  */
2405
  function getNativeFetchImplementation() {
2406
+ if (cachedFetchImpl) {
2407
+ return cachedFetchImpl;
2408
+ }
2409
+
2410
+ // Fast path to avoid DOM I/O
2411
+ if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .isNativeFetch */ .Du)(global.fetch)) {
2412
+ return (cachedFetchImpl = global.fetch.bind(global));
2413
+ }
2414
+
2415
+ var document = global.document;
2416
+ let fetchImpl = global.fetch;
2417
  if (document && typeof document.createElement === 'function') {
2418
+ try {
2419
+ var sandbox = document.createElement('iframe');
2420
+ sandbox.hidden = true;
2421
+ document.head.appendChild(sandbox);
2422
+ var contentWindow = sandbox.contentWindow;
2423
+ if (contentWindow && contentWindow.fetch) {
2424
+ fetchImpl = contentWindow.fetch;
2425
+ }
2426
+ document.head.removeChild(sandbox);
2427
+ } catch (e) {
2428
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
2429
+ _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.warn */ .kg.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);
 
 
2430
  }
2431
+ }
2432
+
2433
+ return (cachedFetchImpl = fetchImpl.bind(global));
2434
+ }
2435
+
2436
  /**
2437
  * Sends sdk client report using sendBeacon or fetch as a fallback if available
2438
  *
2440
  * @param body report payload
2441
  */
2442
  function sendReport(url, body) {
2443
+ var isRealNavigator = Object.prototype.toString.call(global && global.navigator) === '[object Navigator]';
2444
+ var hasSendBeacon = isRealNavigator && typeof global.navigator.sendBeacon === 'function';
2445
+
2446
+ if (hasSendBeacon) {
2447
+ // Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch
2448
+ var sendBeacon = global.navigator.sendBeacon.bind(global.navigator);
2449
+ sendBeacon(url, body);
2450
+ } else if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .supportsFetch */ .Ak)()) {
2451
+ var fetch = getNativeFetchImplementation();
2452
+ fetch(url, {
2453
+ body,
2454
+ method: 'POST',
2455
+ credentials: 'omit',
2456
+ keepalive: true,
2457
+ }).then(null, error => {
2458
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.error */ .kg.error(error);
2459
+ });
2460
+ }
2461
  }
2462
+
2463
+
2464
  //# sourceMappingURL=utils.js.map
2465
 
2466
+
2467
  /***/ }),
2468
 
2469
  /***/ 6144:
2470
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2471
 
2472
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2473
+ /* harmony export */ "K": function() { return /* binding */ makeXHRTransport; }
2474
  /* harmony export */ });
2475
+ /* harmony import */ var _sentry_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1518);
2476
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7946);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2477
 
 
2478
 
 
2479
 
2480
+ /**
2481
+ * The DONE ready state for XmlHttpRequest
2482
+ *
2483
+ * Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined
2484
+ * (e.g. during testing, it is `undefined`)
2485
+ *
2486
+ * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}
2487
+ */
2488
+ var XHR_READYSTATE_DONE = 4;
2489
 
2490
+ /**
2491
+ * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.
2492
+ */
2493
+ function makeXHRTransport(options) {
2494
+ function makeRequest(request) {
2495
+ return new _sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .SyncPromise */ .cW((resolve, reject) => {
2496
+ var xhr = new XMLHttpRequest();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2497
 
2498
+ xhr.onerror = reject;
 
 
 
 
2499
 
2500
+ xhr.onreadystatechange = () => {
2501
+ if (xhr.readyState === XHR_READYSTATE_DONE) {
2502
+ resolve({
2503
+ statusCode: xhr.status,
2504
+ headers: {
2505
+ 'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'),
2506
+ 'retry-after': xhr.getResponseHeader('Retry-After'),
2507
+ },
2508
+ });
2509
  }
2510
+ };
 
 
 
2511
 
2512
+ xhr.open('POST', options.url);
 
 
 
 
 
 
 
 
 
 
2513
 
2514
+ for (var header in options.headers) {
2515
+ if (Object.prototype.hasOwnProperty.call(options.headers, header)) {
2516
+ xhr.setRequestHeader(header, options.headers[header]);
2517
+ }
2518
+ }
 
2519
 
2520
+ xhr.send(request.body);
2521
+ });
2522
+ }
2523
 
2524
+ return (0,_sentry_core__WEBPACK_IMPORTED_MODULE_1__/* .createTransport */ .q)(options, makeRequest);
 
2525
  }
2526
 
 
 
 
 
 
 
 
 
 
2527
 
2528
+ //# sourceMappingURL=xhr.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2529
 
 
 
 
 
2530
 
2531
+ /***/ }),
 
 
2532
 
2533
+ /***/ 4911:
2534
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
 
 
 
 
2535
 
2536
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2537
+ /* harmony export */ "U": function() { return /* binding */ getEnvelopeEndpointWithUrlEncodedAuth; }
2538
+ /* harmony export */ });
2539
+ /* unused harmony export getReportDialogEndpoint */
2540
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1995);
 
 
 
 
 
 
 
 
 
 
 
2541
 
 
 
 
 
 
2542
 
2543
+ var SENTRY_API_VERSION = '7';
 
 
 
 
 
 
2544
 
2545
+ /** Returns the prefix to construct Sentry ingestion API endpoints. */
2546
+ function getBaseApiEndpoint(dsn) {
2547
+ var protocol = dsn.protocol ? `${dsn.protocol}:` : '';
2548
+ var port = dsn.port ? `:${dsn.port}` : '';
2549
+ return `${protocol}//${dsn.host}${port}${dsn.path ? `/${dsn.path}` : ''}/api/`;
2550
  }
2551
 
2552
+ /** Returns the ingest API endpoint for target. */
2553
+ function _getIngestEndpoint(dsn) {
2554
+ return `${getBaseApiEndpoint(dsn)}${dsn.projectId}/envelope/`;
 
 
 
 
 
 
 
2555
  }
2556
 
2557
+ /** Returns a URL-encoded string with auth config suitable for a query string. */
2558
+ function _encodedAuth(dsn) {
2559
+ return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .urlEncode */ ._j)({
2560
+ // We send only the minimum set of required information. See
2561
+ // https://github.com/getsentry/sentry-javascript/issues/2572.
2562
+ sentry_key: dsn.publicKey,
2563
+ sentry_version: SENTRY_API_VERSION,
2564
+ });
2565
  }
2566
 
2567
+ /**
2568
+ * Returns the envelope endpoint URL with auth in the query string.
2569
+ *
2570
+ * Sending auth as part of the query string and not as custom HTTP headers avoids CORS preflight requests.
2571
+ */
2572
+ function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel) {
2573
+ return tunnel ? tunnel : `${_getIngestEndpoint(dsn)}?${_encodedAuth(dsn)}`;
2574
  }
2575
 
2576
+ /** Returns the url to the report dialog endpoint. */
2577
+ function getReportDialogEndpoint(
2578
+ dsnLike,
2579
+ dialogOptions
 
 
 
 
 
 
 
 
2580
 
2581
+ ,
2582
+ ) {
2583
+ var dsn = makeDsn(dsnLike);
2584
+ var endpoint = `${getBaseApiEndpoint(dsn)}embed/error-page/`;
2585
 
2586
+ let encodedOptions = `dsn=${dsnToString(dsn)}`;
2587
+ for (var key in dialogOptions) {
2588
+ if (key === 'dsn') {
2589
+ continue;
2590
  }
 
 
2591
 
2592
+ if (key === 'user') {
2593
+ var user = dialogOptions.user;
2594
+ if (!user) {
2595
+ continue;
2596
+ }
2597
+ if (user.name) {
2598
+ encodedOptions += `&name=${encodeURIComponent(user.name)}`;
2599
+ }
2600
+ if (user.email) {
2601
+ encodedOptions += `&email=${encodeURIComponent(user.email)}`;
2602
+ }
2603
+ } else {
2604
+ encodedOptions += `&${encodeURIComponent(key)}=${encodeURIComponent(dialogOptions[key] )}`;
2605
  }
2606
+ }
2607
+
2608
+ return `${endpoint}?${encodedOptions}`;
2609
  }
2610
 
2611
 
2612
+ //# sourceMappingURL=api.js.map
2613
+
2614
+
2615
  /***/ }),
2616
 
2617
+ /***/ 9849:
2618
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
2619
 
2620
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2621
+ /* harmony export */ "W": function() { return /* binding */ BaseClient; }
 
 
 
2622
  /* harmony export */ });
2623
+ /* harmony import */ var _sentry_hub__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(2430);
2624
+ /* harmony import */ var _sentry_hub__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(1684);
2625
  /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3135);
2626
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8536);
2627
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3699);
2628
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1757);
2629
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7946);
2630
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(6894);
2631
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(7790);
2632
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(8035);
2633
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(9660);
2634
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(4388);
2635
+ /* harmony import */ var _api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4911);
2636
+ /* harmony import */ var _envelope_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(3055);
2637
+ /* harmony import */ var _integration_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(8889);
2638
+
2639
+
2640
+
2641
+
2642
+
2643
+
2644
+ var ALREADY_SEEN_ERROR = "Not capturing exception because it's already been captured.";
2645
 
 
2646
  /**
2647
+ * Base implementation for all JavaScript SDK clients.
 
 
2648
  *
2649
+ * Call the constructor with the corresponding options
2650
+ * specific to the client subclass. To access these options later, use
2651
+ * {@link Client.getOptions}.
2652
+ *
2653
+ * If a Dsn is specified in the options, it will be parsed and stored. Use
2654
+ * {@link Client.getDsn} to retrieve the Dsn at any moment. In case the Dsn is
2655
+ * invalid, the constructor will throw a {@link SentryException}. Note that
2656
+ * without a valid Dsn, the SDK will not send any events to Sentry.
2657
+ *
2658
+ * Before sending an event, it is passed through
2659
+ * {@link BaseClient._prepareEvent} to add SDK information and scope data
2660
+ * (breadcrumbs and context). To add more custom information, override this
2661
+ * method and extend the resulting prepared event.
2662
+ *
2663
+ * To issue automatically created events (e.g. via instrumentation), use
2664
+ * {@link Client.captureEvent}. It will prepare the event and pass it through
2665
+ * the callback lifecycle. To issue auto-breadcrumbs, use
2666
+ * {@link Client.addBreadcrumb}.
2667
+ *
2668
+ * @example
2669
+ * class NodeClient extends BaseClient<NodeOptions> {
2670
+ * public constructor(options: NodeOptions) {
2671
+ * super(options);
2672
+ * }
2673
+ *
2674
+ * // ...
2675
+ * }
2676
+ */
2677
+ class BaseClient {
2678
+ /** Options passed to the SDK. */
2679
+
2680
+
2681
+ /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */
2682
+
2683
+
2684
+ /** Array of set up integrations. */
2685
+ __init() {this._integrations = {};}
2686
+
2687
+ /** Indicates whether this client's integrations have been set up. */
2688
+ __init2() {this._integrationsInitialized = false;}
2689
+
2690
+ /** Number of calls being processed */
2691
+ __init3() {this._numProcessing = 0;}
2692
+
2693
+ /** Holds flushable */
2694
+ __init4() {this._outcomes = {};}
2695
+
2696
+ /**
2697
+ * Initializes this client instance.
2698
+ *
2699
+ * @param options Options for the client.
2700
+ */
2701
+ constructor(options) {;BaseClient.prototype.__init.call(this);BaseClient.prototype.__init2.call(this);BaseClient.prototype.__init3.call(this);BaseClient.prototype.__init4.call(this);
2702
+ this._options = options;
2703
+ if (options.dsn) {
2704
+ this._dsn = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .makeDsn */ .vK)(options.dsn);
2705
+ var url = (0,_api_js__WEBPACK_IMPORTED_MODULE_1__/* .getEnvelopeEndpointWithUrlEncodedAuth */ .U)(this._dsn, options.tunnel);
2706
+ this._transport = options.transport({
2707
+ recordDroppedEvent: this.recordDroppedEvent.bind(this),
2708
+ ...options.transportOptions,
2709
+ url,
2710
+ });
2711
+ } else {
2712
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.warn */ .kg.warn('No DSN provided, client will not do anything.');
2713
+ }
2714
+ }
2715
+
2716
+ /**
2717
+ * @inheritDoc
2718
+ */
2719
+ captureException(exception, hint, scope) {
2720
+ // ensure we haven't captured this very object before
2721
+ if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .checkOrSetAlreadyCaught */ .YO)(exception)) {
2722
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.log */ .kg.log(ALREADY_SEEN_ERROR);
2723
+ return;
2724
+ }
2725
 
2726
+ let eventId = hint && hint.event_id;
2727
+
2728
+ this._process(
2729
+ this.eventFromException(exception, hint)
2730
+ .then(event => this._captureEvent(event, hint, scope))
2731
+ .then(result => {
2732
+ eventId = result;
2733
+ }),
2734
+ );
2735
+
2736
+ return eventId;
2737
+ }
2738
+
2739
+ /**
2740
+ * @inheritDoc
2741
+ */
2742
+ captureMessage(
2743
+ message,
2744
+ level,
2745
+ hint,
2746
+ scope,
2747
+ ) {
2748
+ let eventId = hint && hint.event_id;
2749
+
2750
+ var promisedEvent = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .isPrimitive */ .pt)(message)
2751
+ ? this.eventFromMessage(String(message), level, hint)
2752
+ : this.eventFromException(message, hint);
2753
+
2754
+ this._process(
2755
+ promisedEvent
2756
+ .then(event => this._captureEvent(event, hint, scope))
2757
+ .then(result => {
2758
+ eventId = result;
2759
+ }),
2760
+ );
2761
+
2762
+ return eventId;
2763
+ }
2764
+
2765
+ /**
2766
+ * @inheritDoc
2767
+ */
2768
+ captureEvent(event, hint, scope) {
2769
+ // ensure we haven't captured this very object before
2770
+ if (hint && hint.originalException && (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .checkOrSetAlreadyCaught */ .YO)(hint.originalException)) {
2771
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.log */ .kg.log(ALREADY_SEEN_ERROR);
2772
+ return;
2773
+ }
2774
+
2775
+ let eventId = hint && hint.event_id;
2776
+
2777
+ this._process(
2778
+ this._captureEvent(event, hint, scope).then(result => {
2779
+ eventId = result;
2780
+ }),
2781
+ );
2782
+
2783
+ return eventId;
2784
+ }
2785
+
2786
+ /**
2787
+ * @inheritDoc
2788
+ */
2789
+ captureSession(session) {
2790
+ if (!this._isEnabled()) {
2791
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.warn */ .kg.warn('SDK not enabled, will not capture session.');
2792
+ return;
2793
+ }
2794
+
2795
+ if (!(typeof session.release === 'string')) {
2796
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.warn */ .kg.warn('Discarded session because of missing or non-string release');
2797
+ } else {
2798
+ this.sendSession(session);
2799
+ // After sending, we set init false to indicate it's not the first occurrence
2800
+ (0,_sentry_hub__WEBPACK_IMPORTED_MODULE_5__/* .updateSession */ .CT)(session, { init: false });
2801
+ }
2802
+ }
2803
+
2804
+ /**
2805
+ * @inheritDoc
2806
+ */
2807
+ getDsn() {
2808
+ return this._dsn;
2809
+ }
2810
+
2811
+ /**
2812
+ * @inheritDoc
2813
+ */
2814
+ getOptions() {
2815
+ return this._options;
2816
+ }
2817
+
2818
+ /**
2819
+ * @inheritDoc
2820
+ */
2821
+ getTransport() {
2822
+ return this._transport;
2823
+ }
2824
+
2825
+ /**
2826
+ * @inheritDoc
2827
+ */
2828
+ flush(timeout) {
2829
+ var transport = this._transport;
2830
+ if (transport) {
2831
+ return this._isClientDoneProcessing(timeout).then(clientFinished => {
2832
+ return transport.flush(timeout).then(transportFlushed => clientFinished && transportFlushed);
2833
+ });
2834
+ } else {
2835
+ return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .resolvedSyncPromise */ .WD)(true);
2836
+ }
2837
+ }
2838
+
2839
+ /**
2840
+ * @inheritDoc
2841
+ */
2842
+ close(timeout) {
2843
+ return this.flush(timeout).then(result => {
2844
+ this.getOptions().enabled = false;
2845
+ return result;
2846
  });
2847
+ }
2848
+
2849
+ /**
2850
+ * Sets up the integrations
2851
+ */
2852
+ setupIntegrations() {
2853
+ if (this._isEnabled() && !this._integrationsInitialized) {
2854
+ this._integrations = (0,_integration_js__WEBPACK_IMPORTED_MODULE_7__/* .setupIntegrations */ .q4)(this._options.integrations);
2855
+ this._integrationsInitialized = true;
2856
+ }
2857
+ }
2858
+
2859
+ /**
2860
+ * Gets an installed integration by its `id`.
2861
+ *
2862
+ * @returns The installed integration or `undefined` if no integration with that `id` was installed.
2863
+ */
2864
+ getIntegrationById(integrationId) {
2865
+ return this._integrations[integrationId];
2866
+ }
2867
+
2868
+ /**
2869
+ * @inheritDoc
2870
+ */
2871
+ getIntegration(integration) {
2872
+ try {
2873
+ return (this._integrations[integration.id] ) || null;
2874
+ } catch (_oO) {
2875
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.warn */ .kg.warn(`Cannot retrieve integration ${integration.id} from the current Client`);
2876
+ return null;
2877
+ }
2878
+ }
2879
+
2880
+ /**
2881
+ * @inheritDoc
2882
+ */
2883
+ sendEvent(event, hint = {}) {
2884
+ if (this._dsn) {
2885
+ let env = (0,_envelope_js__WEBPACK_IMPORTED_MODULE_8__/* .createEventEnvelope */ .M)(event, this._dsn, this._options._metadata, this._options.tunnel);
2886
+
2887
+ for (var attachment of hint.attachments || []) {
2888
+ env = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_9__/* .addItemToEnvelope */ .BO)(
2889
+ env,
2890
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_9__/* .createAttachmentEnvelopeItem */ .zQ)(
2891
+ attachment,
2892
+ this._options.transportOptions && this._options.transportOptions.textEncoder,
2893
+ ),
2894
+ );
2895
+ }
2896
+
2897
+ this._sendEnvelope(env);
2898
+ }
2899
+ }
2900
+
2901
+ /**
2902
+ * @inheritDoc
2903
+ */
2904
+ sendSession(session) {
2905
+ if (this._dsn) {
2906
+ var env = (0,_envelope_js__WEBPACK_IMPORTED_MODULE_8__/* .createSessionEnvelope */ .Q)(session, this._dsn, this._options._metadata, this._options.tunnel);
2907
+ this._sendEnvelope(env);
2908
+ }
2909
+ }
2910
+
2911
+ /**
2912
+ * @inheritDoc
2913
+ */
2914
+ recordDroppedEvent(reason, category) {
2915
+ if (this._options.sendClientReports) {
2916
+ // We want to track each category (error, transaction, session) separately
2917
+ // but still keep the distinction between different type of outcomes.
2918
+ // We could use nested maps, but it's much easier to read and type this way.
2919
+ // A correct type for map-based implementation if we want to go that route
2920
+ // would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`
2921
+ // With typescript 4.1 we could even use template literal types
2922
+ var key = `${reason}:${category}`;
2923
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.log */ .kg.log(`Adding outcome: "${key}"`);
2924
+
2925
+ // The following works because undefined + 1 === NaN and NaN is falsy
2926
+ this._outcomes[key] = this._outcomes[key] + 1 || 1;
2927
+ }
2928
+ }
2929
+
2930
+ /** Updates existing session based on the provided event */
2931
+ _updateSessionFromEvent(session, event) {
2932
+ let crashed = false;
2933
+ let errored = false;
2934
+ var exceptions = event.exception && event.exception.values;
2935
+
2936
+ if (exceptions) {
2937
+ errored = true;
2938
+
2939
+ for (var ex of exceptions) {
2940
+ var mechanism = ex.mechanism;
2941
+ if (mechanism && mechanism.handled === false) {
2942
+ crashed = true;
2943
+ break;
2944
+ }
2945
+ }
2946
+ }
2947
+
2948
+ // A session is updated and that session update is sent in only one of the two following scenarios:
2949
+ // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update
2950
+ // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update
2951
+ var sessionNonTerminal = session.status === 'ok';
2952
+ var shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);
2953
+
2954
+ if (shouldUpdateAndSend) {
2955
+ (0,_sentry_hub__WEBPACK_IMPORTED_MODULE_5__/* .updateSession */ .CT)(session, {
2956
+ ...(crashed && { status: 'crashed' }),
2957
+ errors: session.errors || Number(errored || crashed),
2958
+ });
2959
+ this.captureSession(session);
2960
+ }
2961
+ }
2962
+
2963
+ /**
2964
+ * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying
2965
+ * "no" (resolving to `false`) in order to give the client a chance to potentially finish first.
2966
+ *
2967
+ * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not
2968
+ * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to
2969
+ * `true`.
2970
+ * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and
2971
+ * `false` otherwise
2972
+ */
2973
+ _isClientDoneProcessing(timeout) {
2974
+ return new _sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .SyncPromise */ .cW(resolve => {
2975
+ let ticked = 0;
2976
+ var tick = 1;
2977
+
2978
+ var interval = setInterval(() => {
2979
+ if (this._numProcessing == 0) {
2980
+ clearInterval(interval);
2981
+ resolve(true);
2982
+ } else {
2983
+ ticked += tick;
2984
+ if (timeout && ticked >= timeout) {
2985
+ clearInterval(interval);
2986
+ resolve(false);
2987
+ }
2988
+ }
2989
+ }, tick);
2990
+ });
2991
+ }
2992
+
2993
+ /** Determines whether this SDK is enabled and a valid Dsn is present. */
2994
+ _isEnabled() {
2995
+ return this.getOptions().enabled !== false && this._dsn !== undefined;
2996
+ }
2997
+
2998
+ /**
2999
+ * Adds common information to events.
3000
+ *
3001
+ * The information includes release and environment from `options`,
3002
+ * breadcrumbs and context (extra, tags and user) from the scope.
3003
+ *
3004
+ * Information that is already present in the event is never overwritten. For
3005
+ * nested objects, such as the context, keys are merged.
3006
+ *
3007
+ * @param event The original event.
3008
+ * @param hint May contain additional information about the original exception.
3009
+ * @param scope A scope containing event metadata.
3010
+ * @returns A new event with more information.
3011
+ */
3012
+ _prepareEvent(event, hint, scope) {
3013
+ const { normalizeDepth = 3, normalizeMaxBreadth = 1000 } = this.getOptions();
3014
+ var prepared = {
3015
+ ...event,
3016
+ event_id: event.event_id || hint.event_id || (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .uuid4 */ .DM)(),
3017
+ timestamp: event.timestamp || (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_10__/* .dateTimestampInSeconds */ .yW)(),
3018
+ };
3019
+
3020
+ this._applyClientOptions(prepared);
3021
+ this._applyIntegrationsMetadata(prepared);
3022
+
3023
+ // If we have scope given to us, use it as the base for further modifications.
3024
+ // This allows us to prevent unnecessary copying of data if `captureContext` is not provided.
3025
+ let finalScope = scope;
3026
+ if (hint.captureContext) {
3027
+ finalScope = _sentry_hub__WEBPACK_IMPORTED_MODULE_11__/* .Scope.clone */ .s.clone(finalScope).update(hint.captureContext);
3028
+ }
3029
+
3030
+ // We prepare the result here with a resolved Event.
3031
+ let result = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .resolvedSyncPromise */ .WD)(prepared);
3032
+
3033
+ // This should be the last thing called, since we want that
3034
+ // {@link Hub.addEventProcessor} gets the finished prepared event.
3035
+ if (finalScope) {
3036
+ // Collect attachments from the hint and scope
3037
+ var attachments = [...(hint.attachments || []), ...finalScope.getAttachments()];
3038
+
3039
+ if (attachments.length) {
3040
+ hint.attachments = attachments;
3041
+ }
3042
+
3043
+ // In case we have a hub we reassign it.
3044
+ result = finalScope.applyToEvent(prepared, hint);
3045
+ }
3046
+
3047
+ return result.then(evt => {
3048
+ if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {
3049
+ return this._normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);
3050
+ }
3051
+ return evt;
3052
+ });
3053
+ }
3054
+
3055
+ /**
3056
+ * Applies `normalize` function on necessary `Event` attributes to make them safe for serialization.
3057
+ * Normalized keys:
3058
+ * - `breadcrumbs.data`
3059
+ * - `user`
3060
+ * - `contexts`
3061
+ * - `extra`
3062
+ * @param event Event
3063
+ * @returns Normalized event
3064
+ */
3065
+ _normalizeEvent(event, depth, maxBreadth) {
3066
+ if (!event) {
3067
+ return null;
3068
+ }
3069
+
3070
+ var normalized = {
3071
+ ...event,
3072
+ ...(event.breadcrumbs && {
3073
+ breadcrumbs: event.breadcrumbs.map(b => ({
3074
+ ...b,
3075
+ ...(b.data && {
3076
+ data: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .normalize */ .Fv)(b.data, depth, maxBreadth),
3077
+ }),
3078
+ })),
3079
+ }),
3080
+ ...(event.user && {
3081
+ user: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .normalize */ .Fv)(event.user, depth, maxBreadth),
3082
+ }),
3083
+ ...(event.contexts && {
3084
+ contexts: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .normalize */ .Fv)(event.contexts, depth, maxBreadth),
3085
+ }),
3086
+ ...(event.extra && {
3087
+ extra: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .normalize */ .Fv)(event.extra, depth, maxBreadth),
3088
+ }),
3089
+ };
3090
+
3091
+ // event.contexts.trace stores information about a Transaction. Similarly,
3092
+ // event.spans[] stores information about child Spans. Given that a
3093
+ // Transaction is conceptually a Span, normalization should apply to both
3094
+ // Transactions and Spans consistently.
3095
+ // For now the decision is to skip normalization of Transactions and Spans,
3096
+ // so this block overwrites the normalized event to add back the original
3097
+ // Transaction information prior to normalization.
3098
+ if (event.contexts && event.contexts.trace && normalized.contexts) {
3099
+ normalized.contexts.trace = event.contexts.trace;
3100
+
3101
+ // event.contexts.trace.data may contain circular/dangerous data so we need to normalize it
3102
+ if (event.contexts.trace.data) {
3103
+ normalized.contexts.trace.data = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .normalize */ .Fv)(event.contexts.trace.data, depth, maxBreadth);
3104
+ }
3105
+ }
3106
+
3107
+ // event.spans[].data may contain circular/dangerous data so we need to normalize it
3108
+ if (event.spans) {
3109
+ normalized.spans = event.spans.map(span => {
3110
+ // We cannot use the spread operator here because `toJSON` on `span` is non-enumerable
3111
+ if (span.data) {
3112
+ span.data = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_12__/* .normalize */ .Fv)(span.data, depth, maxBreadth);
3113
+ }
3114
+ return span;
3115
+ });
3116
+ }
3117
+
3118
+ return normalized;
3119
+ }
3120
+
3121
+ /**
3122
+ * Enhances event using the client configuration.
3123
+ * It takes care of all "static" values like environment, release and `dist`,
3124
+ * as well as truncating overly long values.
3125
+ * @param event event instance to be enhanced
3126
+ */
3127
+ _applyClientOptions(event) {
3128
+ var options = this.getOptions();
3129
+ const { environment, release, dist, maxValueLength = 250 } = options;
3130
+
3131
+ if (!('environment' in event)) {
3132
+ event.environment = 'environment' in options ? environment : 'production';
3133
+ }
3134
+
3135
+ if (event.release === undefined && release !== undefined) {
3136
+ event.release = release;
3137
+ }
3138
+
3139
+ if (event.dist === undefined && dist !== undefined) {
3140
+ event.dist = dist;
3141
+ }
3142
+
3143
+ if (event.message) {
3144
+ event.message = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_13__/* .truncate */ .$G)(event.message, maxValueLength);
3145
+ }
3146
+
3147
+ var exception = event.exception && event.exception.values && event.exception.values[0];
3148
+ if (exception && exception.value) {
3149
+ exception.value = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_13__/* .truncate */ .$G)(exception.value, maxValueLength);
3150
+ }
3151
+
3152
+ var request = event.request;
3153
+ if (request && request.url) {
3154
+ request.url = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_13__/* .truncate */ .$G)(request.url, maxValueLength);
3155
+ }
3156
+ }
3157
+
3158
+ /**
3159
+ * This function adds all used integrations to the SDK info in the event.
3160
+ * @param event The event that will be filled with all integrations.
3161
+ */
3162
+ _applyIntegrationsMetadata(event) {
3163
+ var integrationsArray = Object.keys(this._integrations);
3164
+ if (integrationsArray.length > 0) {
3165
+ event.sdk = event.sdk || {};
3166
+ event.sdk.integrations = [...(event.sdk.integrations || []), ...integrationsArray];
3167
+ }
3168
+ }
3169
+
3170
+ /**
3171
+ * Processes the event and logs an error in case of rejection
3172
+ * @param event
3173
+ * @param hint
3174
+ * @param scope
3175
+ */
3176
+ _captureEvent(event, hint = {}, scope) {
3177
+ return this._processEvent(event, hint, scope).then(
3178
+ finalEvent => {
3179
+ return finalEvent.event_id;
3180
+ },
3181
+ reason => {
3182
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.warn */ .kg.warn(reason);
3183
+ return undefined;
3184
+ },
3185
+ );
3186
+ }
3187
+
3188
+ /**
3189
+ * Processes an event (either error or message) and sends it to Sentry.
3190
+ *
3191
+ * This also adds breadcrumbs and context information to the event. However,
3192
+ * platform specific meta data (such as the User's IP address) must be added
3193
+ * by the SDK implementor.
3194
+ *
3195
+ *
3196
+ * @param event The event to send to Sentry.
3197
+ * @param hint May contain additional information about the original exception.
3198
+ * @param scope A scope containing event metadata.
3199
+ * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.
3200
+ */
3201
+ _processEvent(event, hint, scope) {
3202
+ const { beforeSend, sampleRate } = this.getOptions();
3203
+
3204
+ if (!this._isEnabled()) {
3205
+ return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .rejectedSyncPromise */ .$2)(new _sentry_utils__WEBPACK_IMPORTED_MODULE_14__/* .SentryError */ .b('SDK not enabled, will not capture event.'));
3206
+ }
3207
+
3208
+ var isTransaction = event.type === 'transaction';
3209
+ // 1.0 === 100% events are sent
3210
+ // 0.0 === 0% events are sent
3211
+ // Sampling for transaction happens somewhere else
3212
+ if (!isTransaction && typeof sampleRate === 'number' && Math.random() > sampleRate) {
3213
+ this.recordDroppedEvent('sample_rate', 'error');
3214
+ return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .rejectedSyncPromise */ .$2)(
3215
+ new _sentry_utils__WEBPACK_IMPORTED_MODULE_14__/* .SentryError */ .b(
3216
+ `Discarding event because it's not included in the random sample (sampling rate = ${sampleRate})`,
3217
+ ),
3218
+ );
3219
+ }
3220
+
3221
+ return this._prepareEvent(event, hint, scope)
3222
+ .then(prepared => {
3223
+ if (prepared === null) {
3224
+ this.recordDroppedEvent('event_processor', event.type || 'error');
3225
+ throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_14__/* .SentryError */ .b('An event processor returned null, will not send event.');
3226
+ }
3227
+
3228
+ var isInternalException = hint.data && (hint.data ).__sentry__ === true;
3229
+ if (isInternalException || isTransaction || !beforeSend) {
3230
+ return prepared;
3231
+ }
3232
+
3233
+ var beforeSendResult = beforeSend(prepared, hint);
3234
+ return _ensureBeforeSendRv(beforeSendResult);
3235
+ })
3236
+ .then(processedEvent => {
3237
+ if (processedEvent === null) {
3238
+ this.recordDroppedEvent('before_send', event.type || 'error');
3239
+ throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_14__/* .SentryError */ .b('`beforeSend` returned `null`, will not send event.');
3240
+ }
3241
+
3242
+ var session = scope && scope.getSession();
3243
+ if (!isTransaction && session) {
3244
+ this._updateSessionFromEvent(session, processedEvent);
3245
+ }
3246
+
3247
+ this.sendEvent(processedEvent, hint);
3248
+ return processedEvent;
3249
+ })
3250
+ .then(null, reason => {
3251
+ if (reason instanceof _sentry_utils__WEBPACK_IMPORTED_MODULE_14__/* .SentryError */ .b) {
3252
+ throw reason;
3253
+ }
3254
+
3255
+ this.captureException(reason, {
3256
+ data: {
3257
+ __sentry__: true,
3258
+ },
3259
+ originalException: reason ,
3260
+ });
3261
+ throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_14__/* .SentryError */ .b(
3262
+ `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${reason}`,
3263
+ );
3264
+ });
3265
+ }
3266
+
3267
+ /**
3268
+ * Occupies the client with processing and event
3269
+ */
3270
+ _process(promise) {
3271
+ this._numProcessing += 1;
3272
+ void promise.then(
3273
+ value => {
3274
+ this._numProcessing -= 1;
3275
+ return value;
3276
+ },
3277
+ reason => {
3278
+ this._numProcessing -= 1;
3279
+ return reason;
3280
+ },
3281
+ );
3282
+ }
3283
+
3284
+ /**
3285
+ * @inheritdoc
3286
+ */
3287
+ _sendEnvelope(envelope) {
3288
+ if (this._transport && this._dsn) {
3289
+ this._transport.send(envelope).then(null, reason => {
3290
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.error */ .kg.error('Error while sending event:', reason);
3291
+ });
3292
+ } else {
3293
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.error */ .kg.error('Transport disabled');
3294
+ }
3295
+ }
3296
+
3297
+ /**
3298
+ * Clears outcomes on this client and returns them.
3299
+ */
3300
+ _clearOutcomes() {
3301
+ var outcomes = this._outcomes;
3302
+ this._outcomes = {};
3303
+ return Object.keys(outcomes).map(key => {
3304
+ const [reason, category] = key.split(':') ;
3305
+ return {
3306
+ reason,
3307
+ category,
3308
+ quantity: outcomes[key],
3309
+ };
3310
+ });
3311
+ }
3312
+
3313
+ /**
3314
+ * @inheritDoc
3315
+ */
3316
+
3317
+
3318
  }
3319
+
 
 
 
3320
  /**
3321
+ * Verifies that return value of configured `beforeSend` is of expected type.
 
 
3322
  */
3323
+ function _ensureBeforeSendRv(rv) {
3324
+ var nullErr = '`beforeSend` method has to return `null` or a valid event.';
3325
+ if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .isThenable */ .J8)(rv)) {
3326
+ return rv.then(
3327
+ event => {
3328
+ if (!((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .isPlainObject */ .PO)(event) || event === null)) {
3329
+ throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_14__/* .SentryError */ .b(nullErr);
3330
+ }
3331
+ return event;
3332
+ },
3333
+ e => {
3334
+ throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_14__/* .SentryError */ .b(`beforeSend rejected with ${e}`);
3335
+ },
3336
+ );
3337
+ } else if (!((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .isPlainObject */ .PO)(rv) || rv === null)) {
3338
+ throw new _sentry_utils__WEBPACK_IMPORTED_MODULE_14__/* .SentryError */ .b(nullErr);
3339
+ }
3340
+ return rv;
3341
  }
3342
+
3343
+
3344
+ //# sourceMappingURL=baseclient.js.map
3345
+
3346
+
3347
+ /***/ }),
3348
+
3349
+ /***/ 3055:
3350
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3351
+
3352
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3353
+ /* harmony export */ "M": function() { return /* binding */ createEventEnvelope; },
3354
+ /* harmony export */ "Q": function() { return /* binding */ createSessionEnvelope; }
3355
+ /* harmony export */ });
3356
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3135);
3357
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6894);
3358
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6990);
3359
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1995);
3360
+
3361
+
3362
+ /** Extract sdk info from from the API metadata */
3363
+ function getSdkMetadataForEnvelopeHeader(metadata) {
3364
+ if (!metadata || !metadata.sdk) {
3365
+ return;
3366
+ }
3367
+ const { name, version } = metadata.sdk;
3368
+ return { name, version };
3369
  }
3370
+
3371
  /**
3372
+ * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.
3373
+ * Merge with existing data if any.
3374
+ **/
3375
+ function enhanceEventWithSdkInfo(event, sdkInfo) {
3376
+ if (!sdkInfo) {
3377
+ return event;
3378
+ }
3379
+ event.sdk = event.sdk || {};
3380
+ event.sdk.name = event.sdk.name || sdkInfo.name;
3381
+ event.sdk.version = event.sdk.version || sdkInfo.version;
3382
+ event.sdk.integrations = [...(event.sdk.integrations || []), ...(sdkInfo.integrations || [])];
3383
+ event.sdk.packages = [...(event.sdk.packages || []), ...(sdkInfo.packages || [])];
3384
+ return event;
3385
+ }
3386
+
3387
+ /** Creates an envelope from a Session */
3388
+ function createSessionEnvelope(
3389
+ session,
3390
+ dsn,
3391
+ metadata,
3392
+ tunnel,
3393
+ ) {
3394
+ var sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);
3395
+ var envelopeHeaders = {
3396
+ sent_at: new Date().toISOString(),
3397
+ ...(sdkInfo && { sdk: sdkInfo }),
3398
+ ...(!!tunnel && { dsn: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .dsnToString */ .RA)(dsn) }),
3399
+ };
3400
+
3401
+ var envelopeItem =
3402
+ 'aggregates' in session ? [{ type: 'sessions' }, session] : [{ type: 'session' }, session];
3403
+
3404
+ return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .createEnvelope */ .Jd)(envelopeHeaders, [envelopeItem]);
3405
+ }
3406
+
3407
+ /**
3408
+ * Create an Envelope from an event.
3409
+ */
3410
+ function createEventEnvelope(
3411
+ event,
3412
+ dsn,
3413
+ metadata,
3414
+ tunnel,
3415
+ ) {
3416
+ var sdkInfo = getSdkMetadataForEnvelopeHeader(metadata);
3417
+ var eventType = event.type || 'event';
3418
+
3419
+ const { transactionSampling } = event.sdkProcessingMetadata || {};
3420
+ const { method: samplingMethod, rate: sampleRate } = transactionSampling || {};
3421
+
3422
+ enhanceEventWithSdkInfo(event, metadata && metadata.sdk);
3423
+
3424
+ var envelopeHeaders = createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn);
3425
+
3426
+ // Prevent this data (which, if it exists, was used in earlier steps in the processing pipeline) from being sent to
3427
+ // sentry. (Note: Our use of this property comes and goes with whatever we might be debugging, whatever hacks we may
3428
+ // have temporarily added, etc. Even if we don't happen to be using it at some point in the future, let's not get rid
3429
+ // of this `delete`, lest we miss putting it back in the next time the property is in use.)
3430
+ delete event.sdkProcessingMetadata;
3431
+
3432
+ var eventItem = [
3433
+ {
3434
+ type: eventType,
3435
+ sample_rates: [{ id: samplingMethod, rate: sampleRate }],
3436
+ },
3437
+ event,
3438
+ ];
3439
+ return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .createEnvelope */ .Jd)(envelopeHeaders, [eventItem]);
3440
+ }
3441
+
3442
+ function createEventEnvelopeHeaders(
3443
+ event,
3444
+ sdkInfo,
3445
+ tunnel,
3446
+ dsn,
3447
+ ) {
3448
+ var baggage = event.sdkProcessingMetadata && event.sdkProcessingMetadata.baggage;
3449
+ var dynamicSamplingContext = baggage && (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .getSentryBaggageItems */ .Hk)(baggage);
3450
+
3451
+ return {
3452
+ event_id: event.event_id ,
3453
+ sent_at: new Date().toISOString(),
3454
+ ...(sdkInfo && { sdk: sdkInfo }),
3455
+ ...(!!tunnel && { dsn: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .dsnToString */ .RA)(dsn) }),
3456
+ ...(event.type === 'transaction' &&
3457
+ dynamicSamplingContext && {
3458
+ trace: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .dropUndefinedKeys */ .Jr)({ ...dynamicSamplingContext }) ,
3459
+ }),
3460
+ };
3461
  }
3462
+
3463
+
3464
+ //# sourceMappingURL=envelope.js.map
3465
+
3466
+
3467
+ /***/ }),
3468
+
3469
+ /***/ 8889:
3470
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3471
+
3472
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3473
+ /* harmony export */ "m8": function() { return /* binding */ getIntegrationsToSetup; },
3474
+ /* harmony export */ "q4": function() { return /* binding */ setupIntegrations; }
3475
+ /* harmony export */ });
3476
+ /* unused harmony export installedIntegrations */
3477
+ /* harmony import */ var _sentry_hub__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1684);
3478
+ /* harmony import */ var _sentry_hub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8585);
3479
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8536);
3480
+
3481
+
3482
+
3483
+ var installedIntegrations = [];
3484
+
3485
+ /** Map of integrations assigned to a client */
3486
+
3487
  /**
3488
+ * @private
 
3489
  */
3490
+ function filterDuplicates(integrations) {
3491
+ return integrations.reduce((acc, integrations) => {
3492
+ if (acc.every(accIntegration => integrations.name !== accIntegration.name)) {
3493
+ acc.push(integrations);
 
 
 
3494
  }
3495
+ return acc;
3496
+ }, [] );
 
 
3497
  }
3498
+
3499
+ /** Gets integration to install */
3500
+ function getIntegrationsToSetup(options) {
3501
+ var defaultIntegrations = (options.defaultIntegrations && [...options.defaultIntegrations]) || [];
3502
+ var userIntegrations = options.integrations;
3503
+
3504
+ let integrations = [...filterDuplicates(defaultIntegrations)];
3505
+
3506
+ if (Array.isArray(userIntegrations)) {
3507
+ // Filter out integrations that are also included in user options
3508
+ integrations = [
3509
+ ...integrations.filter(integrations =>
3510
+ userIntegrations.every(userIntegration => userIntegration.name !== integrations.name),
3511
+ ),
3512
+ // And filter out duplicated user options integrations
3513
+ ...filterDuplicates(userIntegrations),
3514
+ ];
3515
+ } else if (typeof userIntegrations === 'function') {
3516
+ integrations = userIntegrations(integrations);
3517
+ integrations = Array.isArray(integrations) ? integrations : [integrations];
3518
+ }
3519
+
3520
+ // Make sure that if present, `Debug` integration will always run last
3521
+ var integrationsNames = integrations.map(i => i.name);
3522
+ var alwaysLastToRun = 'Debug';
3523
+ if (integrationsNames.indexOf(alwaysLastToRun) !== -1) {
3524
+ integrations.push(...integrations.splice(integrationsNames.indexOf(alwaysLastToRun), 1));
3525
+ }
3526
+
3527
+ return integrations;
3528
+ }
3529
+
3530
+ /**
3531
+ * Given a list of integration instances this installs them all. When `withDefaults` is set to `true` then all default
3532
+ * integrations are added unless they were already provided before.
3533
+ * @param integrations array of integration instances
3534
+ * @param withDefault should enable default integrations
3535
+ */
3536
+ function setupIntegrations(integrations) {
3537
+ var integrationIndex = {};
3538
+
3539
+ integrations.forEach(integration => {
3540
+ integrationIndex[integration.name] = integration;
3541
+
3542
+ if (installedIntegrations.indexOf(integration.name) === -1) {
3543
+ integration.setupOnce(_sentry_hub__WEBPACK_IMPORTED_MODULE_0__/* .addGlobalEventProcessor */ .c, _sentry_hub__WEBPACK_IMPORTED_MODULE_1__/* .getCurrentHub */ .Gd);
3544
+ installedIntegrations.push(integration.name);
3545
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .logger.log */ .kg.log(`Integration installed: ${integration.name}`);
3546
  }
3547
+ });
3548
+
3549
+ return integrationIndex;
3550
  }
3551
+
3552
+
3553
+ //# sourceMappingURL=integration.js.map
3554
+
3555
 
3556
  /***/ }),
3557
 
3558
+ /***/ 6286:
3559
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3560
 
3561
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3562
+ /* harmony export */ "c": function() { return /* binding */ FunctionToString; }
3563
  /* harmony export */ });
3564
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1995);
 
 
 
 
 
 
3565
 
3566
 
3567
+ let originalFunctionToString;
3568
 
3569
+ /** Patch toString calls to return proper name for wrapped functions */
3570
+ class FunctionToString {constructor() { FunctionToString.prototype.__init.call(this); }
3571
+ /**
3572
+ * @inheritDoc
3573
+ */
3574
+ static __initStatic() {this.id = 'FunctionToString';}
3575
+
3576
+ /**
3577
+ * @inheritDoc
3578
+ */
3579
+ __init() {this.name = FunctionToString.id;}
3580
+
3581
+ /**
3582
+ * @inheritDoc
3583
+ */
3584
+ setupOnce() {
3585
+ originalFunctionToString = Function.prototype.toString;
3586
 
3587
+ Function.prototype.toString = function ( ...args) {
3588
+ var context = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .getOriginalFunction */ .HK)(this) || this;
3589
+ return originalFunctionToString.apply(context, args);
3590
+ };
3591
+ }
3592
+ } FunctionToString.__initStatic();
3593
 
3594
 
3595
+ //# sourceMappingURL=functiontostring.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3596
 
 
3597
 
3598
  /***/ }),
3599
 
3600
+ /***/ 1061:
3601
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3602
 
3603
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3604
+ /* harmony export */ "QD": function() { return /* binding */ InboundFilters; }
3605
  /* harmony export */ });
3606
+ /* unused harmony exports _mergeOptions, _shouldDropEvent */
3607
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8536);
 
3608
  /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3699);
3609
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9660);
 
 
 
 
 
 
 
 
3610
 
 
3611
 
3612
+ // "Script error." is hard coded into browsers for errors that it can't read.
3613
+ // this is the result of a script being pulled in from an external domain and CORS.
3614
+ var DEFAULT_IGNORE_ERRORS = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/];
3615
 
3616
+ /** Options for the InboundFilters integration */
3617
 
3618
+ /** Inbound filters configurable by the user */
3619
+ class InboundFilters {
3620
+ /**
3621
+ * @inheritDoc
3622
+ */
3623
+ static __initStatic() {this.id = 'InboundFilters';}
3624
+
3625
+ /**
3626
+ * @inheritDoc
3627
+ */
3628
+ __init() {this.name = InboundFilters.id;}
3629
+
3630
+ constructor( _options = {}) {;this._options = _options;InboundFilters.prototype.__init.call(this);}
3631
+
3632
+ /**
3633
+ * @inheritDoc
3634
+ */
3635
+ setupOnce(addGlobalEventProcessor, getCurrentHub) {
3636
+ var eventProcess = (event) => {
3637
+ var hub = getCurrentHub();
3638
+ if (hub) {
3639
+ var self = hub.getIntegration(InboundFilters);
3640
+ if (self) {
3641
+ var client = hub.getClient();
3642
+ var clientOptions = client ? client.getOptions() : {};
3643
+ var options = _mergeOptions(self._options, clientOptions);
3644
+ return _shouldDropEvent(event, options) ? null : event;
3645
+ }
3646
+ }
3647
+ return event;
3648
+ };
3649
 
3650
+ eventProcess.id = this.name;
3651
+ addGlobalEventProcessor(eventProcess);
3652
+ }
3653
+ } InboundFilters.__initStatic();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3654
 
3655
+ /** JSDoc */
3656
+ function _mergeOptions(
3657
+ internalOptions = {},
3658
+ clientOptions = {},
3659
+ ) {
3660
+ return {
3661
+ allowUrls: [...(internalOptions.allowUrls || []), ...(clientOptions.allowUrls || [])],
3662
+ denyUrls: [...(internalOptions.denyUrls || []), ...(clientOptions.denyUrls || [])],
3663
+ ignoreErrors: [
3664
+ ...(internalOptions.ignoreErrors || []),
3665
+ ...(clientOptions.ignoreErrors || []),
3666
+ ...DEFAULT_IGNORE_ERRORS,
3667
+ ],
3668
+ ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,
3669
+ };
 
 
 
 
3670
  }
 
 
 
3671
 
3672
+ /** JSDoc */
3673
+ function _shouldDropEvent(event, options) {
3674
+ if (options.ignoreInternal && _isSentryError(event)) {
3675
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
3676
+ _sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .logger.warn */ .kg.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${(0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .getEventDescription */ .jH)(event)}`);
3677
+ return true;
3678
+ }
3679
+ if (_isIgnoredError(event, options.ignoreErrors)) {
3680
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
3681
+ _sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .logger.warn */ .kg.warn(
3682
+ `Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${(0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .getEventDescription */ .jH)(event)}`,
3683
+ );
3684
+ return true;
3685
+ }
3686
+ if (_isDeniedUrl(event, options.denyUrls)) {
3687
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
3688
+ _sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .logger.warn */ .kg.warn(
3689
+ `Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${(0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .getEventDescription */ .jH)(
3690
+ event,
3691
+ )}.\nUrl: ${_getEventFilterUrl(event)}`,
3692
+ );
3693
+ return true;
3694
+ }
3695
+ if (!_isAllowedUrl(event, options.allowUrls)) {
3696
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
3697
+ _sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .logger.warn */ .kg.warn(
3698
+ `Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${(0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .getEventDescription */ .jH)(
3699
+ event,
3700
+ )}.\nUrl: ${_getEventFilterUrl(event)}`,
3701
+ );
3702
+ return true;
3703
+ }
3704
+ return false;
3705
+ }
3706
 
3707
+ function _isIgnoredError(event, ignoreErrors) {
3708
+ if (!ignoreErrors || !ignoreErrors.length) {
3709
+ return false;
3710
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3711
 
3712
+ return _getPossibleEventMessages(event).some(message =>
3713
+ ignoreErrors.some(pattern => (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .isMatchingPattern */ .zC)(message, pattern)),
3714
+ );
3715
+ }
3716
 
3717
+ function _isDeniedUrl(event, denyUrls) {
3718
+ // TODO: Use Glob instead?
3719
+ if (!denyUrls || !denyUrls.length) {
3720
+ return false;
3721
+ }
3722
+ var url = _getEventFilterUrl(event);
3723
+ return !url ? false : denyUrls.some(pattern => (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .isMatchingPattern */ .zC)(url, pattern));
3724
+ }
3725
 
3726
+ function _isAllowedUrl(event, allowUrls) {
3727
+ // TODO: Use Glob instead?
3728
+ if (!allowUrls || !allowUrls.length) {
3729
+ return true;
3730
+ }
3731
+ var url = _getEventFilterUrl(event);
3732
+ return !url ? true : allowUrls.some(pattern => (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .isMatchingPattern */ .zC)(url, pattern));
3733
+ }
 
 
3734
 
3735
+ function _getPossibleEventMessages(event) {
3736
+ if (event.message) {
3737
+ return [event.message];
3738
+ }
3739
+ if (event.exception) {
3740
+ try {
3741
+ const { type = '', value = '' } = (event.exception.values && event.exception.values[0]) || {};
3742
+ return [`${value}`, `${type}: ${value}`];
3743
+ } catch (oO) {
3744
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .logger.error */ .kg.error(`Cannot extract message for event ${(0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .getEventDescription */ .jH)(event)}`);
3745
+ return [];
3746
+ }
3747
+ }
3748
+ return [];
3749
+ }
3750
 
3751
+ function _isSentryError(event) {
3752
+ try {
3753
+ // @ts-ignore can't be a sentry error if undefined
3754
+ return event.exception.values[0].type === 'SentryError';
3755
+ } catch (e) {
3756
+ // ignore
3757
+ }
3758
+ return false;
3759
+ }
3760
 
3761
+ function _getLastValidUrl(frames = []) {
3762
+ for (let i = frames.length - 1; i >= 0; i--) {
3763
+ var frame = frames[i];
3764
 
3765
+ if (frame && frame.filename !== '<anonymous>' && frame.filename !== '[native code]') {
3766
+ return frame.filename || null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3767
  }
3768
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3769
 
3770
+ return null;
3771
+ }
3772
 
3773
+ function _getEventFilterUrl(event) {
3774
+ try {
3775
+ let frames;
3776
+ try {
3777
+ // @ts-ignore we only care about frames if the whole thing here is defined
3778
+ frames = event.exception.values[0].stacktrace.frames;
3779
+ } catch (e) {
3780
+ // ignore
3781
+ }
3782
+ return frames ? _getLastValidUrl(frames) : null;
3783
+ } catch (oO) {
3784
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .logger.error */ .kg.error(`Cannot extract url for event ${(0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .getEventDescription */ .jH)(event)}`);
3785
+ return null;
3786
+ }
3787
+ }
3788
 
 
 
 
 
3789
 
3790
+ //# sourceMappingURL=inboundfilters.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3791
 
 
3792
 
3793
  /***/ }),
3794
 
3795
+ /***/ 6853:
3796
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3797
 
3798
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3799
+ /* harmony export */ "M": function() { return /* binding */ initAndBind; }
3800
  /* harmony export */ });
3801
+ /* harmony import */ var _sentry_hub__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8585);
3802
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8536);
 
 
 
 
3803
 
3804
 
3805
 
3806
+ /** A class object that can instantiate Client objects. */
3807
+
3808
+ /**
3809
+ * Internal function to create a new SDK client instance. The client is
3810
+ * installed and then bound to the current scope.
3811
+ *
3812
+ * @param clientClass The client class to instantiate.
3813
+ * @param options Options to pass to the client.
3814
+ */
3815
+ function initAndBind(
3816
+ clientClass,
3817
+ options,
3818
+ ) {
3819
+ if (options.debug === true) {
3820
+ if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {
3821
+ _sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .logger.enable */ .kg.enable();
3822
+ } else {
3823
+ // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped
3824
+ console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');
3825
  }
3826
+ }
3827
+ var hub = (0,_sentry_hub__WEBPACK_IMPORTED_MODULE_1__/* .getCurrentHub */ .Gd)();
3828
+ var scope = hub.getScope();
3829
+ if (scope) {
3830
+ scope.update(options.initialScope);
3831
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3832
 
3833
+ var client = new clientClass(options);
3834
+ hub.bindClient(client);
 
 
 
 
 
 
 
 
3835
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3836
 
 
 
 
 
 
 
3837
 
3838
+ //# sourceMappingURL=sdk.js.map
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3839
 
 
3840
 
3841
  /***/ }),
3842
 
3843
+ /***/ 1518:
3844
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3845
 
3846
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3847
+ /* harmony export */ "q": function() { return /* binding */ createTransport; }
 
3848
  /* harmony export */ });
3849
+ /* unused harmony export DEFAULT_TRANSPORT_BUFFER_SIZE */
3850
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8963);
3851
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6894);
3852
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1630);
3853
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7946);
3854
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8536);
3855
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(4388);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3856
 
 
 
 
3857
 
3858
+ var DEFAULT_TRANSPORT_BUFFER_SIZE = 30;
 
 
3859
 
3860
+ /**
3861
+ * Creates an instance of a Sentry `Transport`
3862
+ *
3863
+ * @param options
3864
+ * @param makeRequest
3865
+ */
3866
+ function createTransport(
3867
+ options,
3868
+ makeRequest,
3869
+ buffer = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .makePromiseBuffer */ .x)(options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE),
3870
+ ) {
3871
+ let rateLimits = {};
3872
+
3873
+ var flush = (timeout) => buffer.drain(timeout);
3874
+
3875
+ function send(envelope) {
3876
+ var filteredEnvelopeItems = [];
3877
+
3878
+ // Drop rate limited items from envelope
3879
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .forEachEnvelopeItem */ .gv)(envelope, (item, type) => {
3880
+ var envelopeItemDataCategory = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .envelopeItemTypeToDataCategory */ .mL)(type);
3881
+ if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .isRateLimited */ .Q)(rateLimits, envelopeItemDataCategory)) {
3882
+ options.recordDroppedEvent('ratelimit_backoff', envelopeItemDataCategory);
3883
+ } else {
3884
+ filteredEnvelopeItems.push(item);
3885
+ }
3886
  });
 
3887
 
3888
+ // Skip sending if envelope is empty after filtering out rate limited events
3889
+ if (filteredEnvelopeItems.length === 0) {
3890
+ return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .resolvedSyncPromise */ .WD)();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3891
  }
 
3892
 
3893
+ var filteredEnvelope = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .createEnvelope */ .Jd)(envelope[0], filteredEnvelopeItems );
 
 
 
 
 
 
 
3894
 
3895
+ // Creates client report for each item in an envelope
3896
+ var recordEnvelopeLoss = (reason) => {
3897
+ (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .forEachEnvelopeItem */ .gv)(filteredEnvelope, (_, type) => {
3898
+ options.recordDroppedEvent(reason, (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .envelopeItemTypeToDataCategory */ .mL)(type));
3899
+ });
 
 
 
3900
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3901
 
3902
+ var requestTask = () =>
3903
+ makeRequest({ body: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .serializeEnvelope */ .V$)(filteredEnvelope, options.textEncoder) }).then(
3904
+ response => {
3905
+ // We don't want to throw on NOK responses, but we want to at least log them
3906
+ if (response.statusCode !== undefined && (response.statusCode < 200 || response.statusCode >= 300)) {
3907
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.warn */ .kg.warn(`Sentry responded with status code ${response.statusCode} to sent event.`);
3908
+ }
 
 
 
 
 
 
3909
 
3910
+ rateLimits = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .updateRateLimits */ .WG)(rateLimits, response);
3911
+ },
3912
+ error => {
3913
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.error */ .kg.error('Failed while sending event:', error);
3914
+ recordEnvelopeLoss('network_error');
3915
+ },
3916
+ );
3917
+
3918
+ return buffer.add(requestTask).then(
3919
+ result => result,
3920
+ error => {
3921
+ if (error instanceof _sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .SentryError */ .b) {
3922
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.error */ .kg.error('Skipped sending event due to full buffer');
3923
+ recordEnvelopeLoss('queue_overflow');
3924
+ return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .resolvedSyncPromise */ .WD)();
3925
+ } else {
3926
+ throw error;
3927
+ }
3928
+ },
3929
+ );
3930
+ }
3931
+
3932
+ return {
3933
+ send,
3934
+ flush,
3935
+ };
3936
  }
3937
 
 
 
 
 
 
 
 
 
 
 
 
3938
 
3939
+ //# sourceMappingURL=base.js.map
 
 
 
 
3940
 
 
 
 
 
 
 
 
3941
 
3942
+ /***/ }),
 
 
 
3943
 
3944
+ /***/ 1476:
3945
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
 
 
 
 
 
3946
 
3947
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3948
+ /* harmony export */ "J": function() { return /* binding */ SDK_VERSION; }
3949
+ /* harmony export */ });
3950
+ var SDK_VERSION = '7.3.1';
3951
 
 
 
 
 
 
 
3952
 
3953
+ //# sourceMappingURL=version.js.map
 
 
 
 
 
 
3954
 
3955
 
3956
  /***/ }),
3957
 
3958
+ /***/ 2483:
3959
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
3960
 
3961
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3962
  /* harmony export */ "Tb": function() { return /* binding */ captureException; },
3963
  /* harmony export */ "$e": function() { return /* binding */ withScope; }
3964
  /* harmony export */ });
3965
+ /* unused harmony exports addBreadcrumb, captureEvent, captureMessage, configureScope, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction */
3966
+ /* harmony import */ var _hub_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8585);
 
3967
 
3968
 
3969
+ // Note: All functions in this file are typed with a return value of `ReturnType<Hub[HUB_FUNCTION]>`,
3970
+ // where HUB_FUNCTION is some method on the Hub class.
3971
+ //
3972
+ // This is done to make sure the top level SDK methods stay in sync with the hub methods.
3973
+ // Although every method here has an explicit return type, some of them (that map to void returns) do not
3974
+ // contain `return` keywords. This is done to save on bundle size, as `return` is not minifiable.
3975
+
 
 
 
 
 
 
 
 
 
 
 
3976
  /**
3977
  * Captures an exception event and sends it to Sentry.
3978
  *
3979
  * @param exception An exception-like object.
3980
+ * @param captureContext Additional scope data to apply to exception event.
3981
  * @returns The generated eventId.
3982
  */
 
3983
  function captureException(exception, captureContext) {
3984
+ return (0,_hub_js__WEBPACK_IMPORTED_MODULE_0__/* .getCurrentHub */ .Gd)().captureException(exception, { captureContext });
 
 
 
 
 
3985
  }
3986
+
3987
  /**
3988
  * Captures a message event and sends it to Sentry.
3989
  *
3991
  * @param Severity Define the level of the message.
3992
  * @returns The generated eventId.
3993
  */
3994
+ function captureMessage(
3995
+ message,
3996
+ captureContext,
3997
+ ) {
3998
+ // This is necessary to provide explicit scopes upgrade, without changing the original
3999
+ // arity of the `captureMessage(message, level)` method.
4000
+ var level = typeof captureContext === 'string' ? captureContext : undefined;
4001
+ var context = typeof captureContext !== 'string' ? { captureContext } : undefined;
4002
+ return getCurrentHub().captureMessage(message, level, context);
4003
  }
4004
+
4005
  /**
4006
  * Captures a manually created event and sends it to Sentry.
4007
  *
4008
  * @param event The event to send to Sentry.
4009
  * @returns The generated eventId.
4010
  */
4011
+ function captureEvent(event, hint) {
4012
+ return getCurrentHub().captureEvent(event, hint);
4013
  }
4014
+
4015
  /**
4016
  * Callback to set context information onto the scope.
4017
  * @param callback Callback function that receives Scope.
4018
  */
4019
  function configureScope(callback) {
4020
+ getCurrentHub().configureScope(callback);
4021
  }
4022
+
4023
  /**
4024
  * Records a new breadcrumb which will be attached to future events.
4025
  *
4029
  * @param breadcrumb The breadcrumb to record.
4030
  */
4031
  function addBreadcrumb(breadcrumb) {
4032
+ getCurrentHub().addBreadcrumb(breadcrumb);
4033
  }
4034
+
4035
  /**
4036
  * Sets context data with the given name.
4037
  * @param name of the context
4038
  * @param context Any kind of data. This data will be normalized.
4039
  */
 
4040
  function setContext(name, context) {
4041
+ getCurrentHub().setContext(name, context);
4042
  }
4043
+
4044
  /**
4045
  * Set an object that will be merged sent as extra data with the event.
4046
  * @param extras Extras object to merge into current context.
4047
  */
4048
  function setExtras(extras) {
4049
+ getCurrentHub().setExtras(extras);
 
 
 
 
 
 
 
4050
  }
4051
+
4052
  /**
4053
  * Set key:value that will be sent as extra data with the event.
4054
  * @param key String of extra
4055
  * @param extra Any kind of data. This data will be normalized.
4056
  */
4057
  function setExtra(key, extra) {
4058
+ getCurrentHub().setExtra(key, extra);
4059
+ }
4060
+
4061
+ /**
4062
+ * Set an object that will be merged sent as tags data with the event.
4063
+ * @param tags Tags context object to merge into current context.
4064
+ */
4065
+ function setTags(tags) {
4066
+ getCurrentHub().setTags(tags);
4067
  }
4068
+
4069
  /**
4070
  * Set key:value that will be sent as tags data with the event.
4071
  *
4075
  * @param value Value of tag
4076
  */
4077
  function setTag(key, value) {
4078
+ getCurrentHub().setTag(key, value);
4079
  }
4080
+
4081
  /**
4082
  * Updates user context information for future events.
4083
  *
4084
  * @param user User context object to be set in the current context. Pass `null` to unset the user.
4085
  */
4086
  function setUser(user) {
4087
+ getCurrentHub().setUser(user);
4088
+ }
4089
+
4090
+ /**
4091
+ * Creates a new scope with and executes the given operation within.
4092
+ * The scope is automatically removed once the operation
4093
+ * finishes or throws.
4094
+ *
4095
+ * This is essentially a convenience function for:
4096
+ *
4097
+ * pushScope();
4098
+ * callback();
4099
+ * popScope();
4100
+ *
4101
+ * @param callback that will be enclosed into push/popScope.
4102
+ */
4103
+ function withScope(callback) {
4104
+ (0,_hub_js__WEBPACK_IMPORTED_MODULE_0__/* .getCurrentHub */ .Gd)().withScope(callback);
4105
+ }
4106
+
4107
+ /**
4108
+ * Starts a new `Transaction` and returns it. This is the entry point to manual tracing instrumentation.
4109
+ *
4110
+ * A tree structure can be built by adding child spans to the transaction, and child spans to other spans. To start a
4111
+ * new child span within the transaction or any span, call the respective `.startChild()` method.
4112
+ *
4113
+ * Every child span must be finished before the transaction is finished, otherwise the unfinished spans are discarded.
4114
+ *
4115
+ * The transaction must be finished with a call to its `.finish()` method, at which point the transaction with all its
4116
+ * finished child spans will be sent to Sentry.
4117
+ *
4118
+ * @param context Properties of the new `Transaction`.
4119
+ * @param customSamplingContext Information given to the transaction sampling function (along with context-dependent
4120
+ * default values). See {@link Options.tracesSampler}.
4121
+ *
4122
+ * @returns The transaction which was just started
4123
+ */
4124
+ function startTransaction(
4125
+ context,
4126
+ customSamplingContext,
4127
+ ) {
4128
+ return getCurrentHub().startTransaction({ ...context }, customSamplingContext);
4129
+ }
4130
+
4131
+
4132
+ //# sourceMappingURL=exports.js.map
4133
+
4134
+
4135
+ /***/ }),
4136
+
4137
+ /***/ 8585:
4138
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4139
+
4140
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4141
+ /* harmony export */ "Gd": function() { return /* binding */ getCurrentHub; }
4142
+ /* harmony export */ });
4143
+ /* unused harmony exports API_VERSION, Hub, getHubFromCarrier, getMainCarrier, makeMain, setHubOnCarrier */
4144
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3699);
4145
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7790);
4146
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8536);
4147
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5907);
4148
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(7392);
4149
+ /* harmony import */ var _scope_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1684);
4150
+ /* harmony import */ var _session_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2430);
4151
+
4152
+
4153
+
4154
+
4155
+ /**
4156
+ * API compatibility version of this hub.
4157
+ *
4158
+ * WARNING: This number should only be increased when the global interface
4159
+ * changes and new methods are introduced.
4160
+ *
4161
+ * @hidden
4162
+ */
4163
+ var API_VERSION = 4;
4164
+
4165
+ /**
4166
+ * Default maximum number of breadcrumbs added to an event. Can be overwritten
4167
+ * with {@link Options.maxBreadcrumbs}.
4168
+ */
4169
+ var DEFAULT_BREADCRUMBS = 100;
4170
+
4171
+ /**
4172
+ * A layer in the process stack.
4173
+ * @hidden
4174
+ */
4175
+
4176
+ /**
4177
+ * @inheritDoc
4178
+ */
4179
+ class Hub {
4180
+ /** Is a {@link Layer}[] containing the client and scope */
4181
+ __init() {this._stack = [{}];}
4182
+
4183
+ /** Contains the last event id of a captured event. */
4184
+
4185
+
4186
+ /**
4187
+ * Creates a new instance of the hub, will push one {@link Layer} into the
4188
+ * internal stack on creation.
4189
+ *
4190
+ * @param client bound to the hub.
4191
+ * @param scope bound to the hub.
4192
+ * @param version number, higher number means higher priority.
4193
+ */
4194
+ constructor(client, scope = new _scope_js__WEBPACK_IMPORTED_MODULE_0__/* .Scope */ .s(), _version = API_VERSION) {;this._version = _version;Hub.prototype.__init.call(this);
4195
+ this.getStackTop().scope = scope;
4196
+ if (client) {
4197
+ this.bindClient(client);
4198
+ }
4199
+ }
4200
+
4201
+ /**
4202
+ * @inheritDoc
4203
+ */
4204
+ isOlderThan(version) {
4205
+ return this._version < version;
4206
+ }
4207
+
4208
+ /**
4209
+ * @inheritDoc
4210
+ */
4211
+ bindClient(client) {
4212
+ var top = this.getStackTop();
4213
+ top.client = client;
4214
+ if (client && client.setupIntegrations) {
4215
+ client.setupIntegrations();
4216
+ }
4217
+ }
4218
+
4219
+ /**
4220
+ * @inheritDoc
4221
+ */
4222
+ pushScope() {
4223
+ // We want to clone the content of prev scope
4224
+ var scope = _scope_js__WEBPACK_IMPORTED_MODULE_0__/* .Scope.clone */ .s.clone(this.getScope());
4225
+ this.getStack().push({
4226
+ client: this.getClient(),
4227
+ scope,
4228
+ });
4229
+ return scope;
4230
+ }
4231
+
4232
+ /**
4233
+ * @inheritDoc
4234
+ */
4235
+ popScope() {
4236
+ if (this.getStack().length <= 1) return false;
4237
+ return !!this.getStack().pop();
4238
+ }
4239
+
4240
+ /**
4241
+ * @inheritDoc
4242
+ */
4243
+ withScope(callback) {
4244
+ var scope = this.pushScope();
4245
+ try {
4246
+ callback(scope);
4247
+ } finally {
4248
+ this.popScope();
4249
+ }
4250
+ }
4251
+
4252
+ /**
4253
+ * @inheritDoc
4254
+ */
4255
+ getClient() {
4256
+ return this.getStackTop().client ;
4257
+ }
4258
+
4259
+ /** Returns the scope of the top stack. */
4260
+ getScope() {
4261
+ return this.getStackTop().scope;
4262
+ }
4263
+
4264
+ /** Returns the scope stack for domains or the process. */
4265
+ getStack() {
4266
+ return this._stack;
4267
+ }
4268
+
4269
+ /** Returns the topmost scope layer in the order domain > local > process. */
4270
+ getStackTop() {
4271
+ return this._stack[this._stack.length - 1];
4272
+ }
4273
+
4274
+ /**
4275
+ * @inheritDoc
4276
+ */
4277
+ captureException(exception, hint) {
4278
+ var eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .uuid4 */ .DM)());
4279
+ var syntheticException = new Error('Sentry syntheticException');
4280
+ this._withClient((client, scope) => {
4281
+ client.captureException(
4282
+ exception,
4283
+ {
4284
+ originalException: exception,
4285
+ syntheticException,
4286
+ ...hint,
4287
+ event_id: eventId,
4288
+ },
4289
+ scope,
4290
+ );
4291
+ });
4292
+ return eventId;
4293
+ }
4294
+
4295
+ /**
4296
+ * @inheritDoc
4297
+ */
4298
+ captureMessage(
4299
+ message,
4300
+ level,
4301
+ hint,
4302
+ ) {
4303
+ var eventId = (this._lastEventId = hint && hint.event_id ? hint.event_id : (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .uuid4 */ .DM)());
4304
+ var syntheticException = new Error(message);
4305
+ this._withClient((client, scope) => {
4306
+ client.captureMessage(
4307
+ message,
4308
+ level,
4309
+ {
4310
+ originalException: message,
4311
+ syntheticException,
4312
+ ...hint,
4313
+ event_id: eventId,
4314
+ },
4315
+ scope,
4316
+ );
4317
+ });
4318
+ return eventId;
4319
+ }
4320
+
4321
+ /**
4322
+ * @inheritDoc
4323
+ */
4324
+ captureEvent(event, hint) {
4325
+ var eventId = hint && hint.event_id ? hint.event_id : (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .uuid4 */ .DM)();
4326
+ if (event.type !== 'transaction') {
4327
+ this._lastEventId = eventId;
4328
+ }
4329
+
4330
+ this._withClient((client, scope) => {
4331
+ client.captureEvent(event, { ...hint, event_id: eventId }, scope);
4332
+ });
4333
+ return eventId;
4334
+ }
4335
+
4336
+ /**
4337
+ * @inheritDoc
4338
+ */
4339
+ lastEventId() {
4340
+ return this._lastEventId;
4341
+ }
4342
+
4343
+ /**
4344
+ * @inheritDoc
4345
+ */
4346
+ addBreadcrumb(breadcrumb, hint) {
4347
+ const { scope, client } = this.getStackTop();
4348
+
4349
+ if (!scope || !client) return;
4350
+
4351
+ const { beforeBreadcrumb = null, maxBreadcrumbs = DEFAULT_BREADCRUMBS } =
4352
+ (client.getOptions && client.getOptions()) || {};
4353
+
4354
+ if (maxBreadcrumbs <= 0) return;
4355
+
4356
+ var timestamp = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .dateTimestampInSeconds */ .yW)();
4357
+ var mergedBreadcrumb = { timestamp, ...breadcrumb };
4358
+ var finalBreadcrumb = beforeBreadcrumb
4359
+ ? ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .consoleSandbox */ .Cf)(() => beforeBreadcrumb(mergedBreadcrumb, hint)) )
4360
+ : mergedBreadcrumb;
4361
+
4362
+ if (finalBreadcrumb === null) return;
4363
+
4364
+ scope.addBreadcrumb(finalBreadcrumb, maxBreadcrumbs);
4365
+ }
4366
+
4367
+ /**
4368
+ * @inheritDoc
4369
+ */
4370
+ setUser(user) {
4371
+ var scope = this.getScope();
4372
+ if (scope) scope.setUser(user);
4373
+ }
4374
+
4375
+ /**
4376
+ * @inheritDoc
4377
+ */
4378
+ setTags(tags) {
4379
+ var scope = this.getScope();
4380
+ if (scope) scope.setTags(tags);
4381
+ }
4382
+
4383
+ /**
4384
+ * @inheritDoc
4385
+ */
4386
+ setExtras(extras) {
4387
+ var scope = this.getScope();
4388
+ if (scope) scope.setExtras(extras);
4389
+ }
4390
+
4391
+ /**
4392
+ * @inheritDoc
4393
+ */
4394
+ setTag(key, value) {
4395
+ var scope = this.getScope();
4396
+ if (scope) scope.setTag(key, value);
4397
+ }
4398
+
4399
+ /**
4400
+ * @inheritDoc
4401
+ */
4402
+ setExtra(key, extra) {
4403
+ var scope = this.getScope();
4404
+ if (scope) scope.setExtra(key, extra);
4405
+ }
4406
+
4407
+ /**
4408
+ * @inheritDoc
4409
+ */
4410
+ setContext(name, context) {
4411
+ var scope = this.getScope();
4412
+ if (scope) scope.setContext(name, context);
4413
+ }
4414
+
4415
+ /**
4416
+ * @inheritDoc
4417
+ */
4418
+ configureScope(callback) {
4419
+ const { scope, client } = this.getStackTop();
4420
+ if (scope && client) {
4421
+ callback(scope);
4422
+ }
4423
+ }
4424
+
4425
+ /**
4426
+ * @inheritDoc
4427
+ */
4428
+ run(callback) {
4429
+ var oldHub = makeMain(this);
4430
+ try {
4431
+ callback(this);
4432
+ } finally {
4433
+ makeMain(oldHub);
4434
+ }
4435
+ }
4436
+
4437
+ /**
4438
+ * @inheritDoc
4439
+ */
4440
+ getIntegration(integration) {
4441
+ var client = this.getClient();
4442
+ if (!client) return null;
4443
+ try {
4444
+ return client.getIntegration(integration);
4445
+ } catch (_oO) {
4446
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .logger.warn */ .kg.warn(`Cannot retrieve integration ${integration.id} from the current Hub`);
4447
+ return null;
4448
+ }
4449
+ }
4450
+
4451
+ /**
4452
+ * @inheritDoc
4453
+ */
4454
+ startTransaction(context, customSamplingContext) {
4455
+ return this._callExtensionMethod('startTransaction', context, customSamplingContext);
4456
+ }
4457
+
4458
+ /**
4459
+ * @inheritDoc
4460
+ */
4461
+ traceHeaders() {
4462
+ return this._callExtensionMethod('traceHeaders');
4463
+ }
4464
+
4465
+ /**
4466
+ * @inheritDoc
4467
+ */
4468
+ captureSession(endSession = false) {
4469
+ // both send the update and pull the session from the scope
4470
+ if (endSession) {
4471
+ return this.endSession();
4472
+ }
4473
+
4474
+ // only send the update
4475
+ this._sendSessionUpdate();
4476
+ }
4477
+
4478
+ /**
4479
+ * @inheritDoc
4480
+ */
4481
+ endSession() {
4482
+ var layer = this.getStackTop();
4483
+ var scope = layer && layer.scope;
4484
+ var session = scope && scope.getSession();
4485
+ if (session) {
4486
+ (0,_session_js__WEBPACK_IMPORTED_MODULE_4__/* .closeSession */ .RJ)(session);
4487
+ }
4488
+ this._sendSessionUpdate();
4489
+
4490
+ // the session is over; take it off of the scope
4491
+ if (scope) {
4492
+ scope.setSession();
4493
+ }
4494
+ }
4495
+
4496
+ /**
4497
+ * @inheritDoc
4498
+ */
4499
+ startSession(context) {
4500
+ const { scope, client } = this.getStackTop();
4501
+ const { release, environment } = (client && client.getOptions()) || {};
4502
+
4503
+ // Will fetch userAgent if called from browser sdk
4504
+ var global = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .getGlobalObject */ .R)();
4505
+ const { userAgent } = global.navigator || {};
4506
+
4507
+ var session = (0,_session_js__WEBPACK_IMPORTED_MODULE_4__/* .makeSession */ .Hv)({
4508
+ release,
4509
+ environment,
4510
+ ...(scope && { user: scope.getUser() }),
4511
+ ...(userAgent && { userAgent }),
4512
+ ...context,
4513
+ });
4514
+
4515
+ if (scope) {
4516
+ // End existing session if there's one
4517
+ var currentSession = scope.getSession && scope.getSession();
4518
+ if (currentSession && currentSession.status === 'ok') {
4519
+ (0,_session_js__WEBPACK_IMPORTED_MODULE_4__/* .updateSession */ .CT)(currentSession, { status: 'exited' });
4520
+ }
4521
+ this.endSession();
4522
+
4523
+ // Afterwards we set the new session on the scope
4524
+ scope.setSession(session);
4525
+ }
4526
+
4527
+ return session;
4528
+ }
4529
+
4530
+ /**
4531
+ * Sends the current Session on the scope
4532
+ */
4533
+ _sendSessionUpdate() {
4534
+ const { scope, client } = this.getStackTop();
4535
+ if (!scope) return;
4536
+
4537
+ var session = scope.getSession();
4538
+ if (session) {
4539
+ if (client && client.captureSession) {
4540
+ client.captureSession(session);
4541
+ }
4542
+ }
4543
+ }
4544
+
4545
+ /**
4546
+ * Internal helper function to call a method on the top client if it exists.
4547
+ *
4548
+ * @param method The method to call on the client.
4549
+ * @param args Arguments to pass to the client function.
4550
+ */
4551
+ _withClient(callback) {
4552
+ const { scope, client } = this.getStackTop();
4553
+ if (client) {
4554
+ callback(client, scope);
4555
+ }
4556
+ }
4557
+
4558
+ /**
4559
+ * Calls global extension method and binding current instance to the function call
4560
+ */
4561
+ // @ts-ignore Function lacks ending return statement and return type does not include 'undefined'. ts(2366)
4562
+ _callExtensionMethod(method, ...args) {
4563
+ var carrier = getMainCarrier();
4564
+ var sentry = carrier.__SENTRY__;
4565
+ if (sentry && sentry.extensions && typeof sentry.extensions[method] === 'function') {
4566
+ return sentry.extensions[method].apply(this, args);
4567
+ }
4568
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .logger.warn */ .kg.warn(`Extension method ${method} couldn't be found, doing nothing.`);
4569
+ }
4570
+ }
4571
+
4572
+ /**
4573
+ * Returns the global shim registry.
4574
+ *
4575
+ * FIXME: This function is problematic, because despite always returning a valid Carrier,
4576
+ * it has an optional `__SENTRY__` property, which then in turn requires us to always perform an unnecessary check
4577
+ * at the call-site. We always access the carrier through this function, so we can guarantee that `__SENTRY__` is there.
4578
+ **/
4579
+ function getMainCarrier() {
4580
+ var carrier = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .getGlobalObject */ .R)();
4581
+ carrier.__SENTRY__ = carrier.__SENTRY__ || {
4582
+ extensions: {},
4583
+ hub: undefined,
4584
+ };
4585
+ return carrier;
4586
+ }
4587
+
4588
+ /**
4589
+ * Replaces the current main hub with the passed one on the global object
4590
+ *
4591
+ * @returns The old replaced hub
4592
+ */
4593
+ function makeMain(hub) {
4594
+ var registry = getMainCarrier();
4595
+ var oldHub = getHubFromCarrier(registry);
4596
+ setHubOnCarrier(registry, hub);
4597
+ return oldHub;
4598
+ }
4599
+
4600
+ /**
4601
+ * Returns the default hub instance.
4602
+ *
4603
+ * If a hub is already registered in the global carrier but this module
4604
+ * contains a more recent version, it replaces the registered version.
4605
+ * Otherwise, the currently registered hub will be returned.
4606
+ */
4607
+ function getCurrentHub() {
4608
+ // Get main carrier (global for every environment)
4609
+ var registry = getMainCarrier();
4610
+
4611
+ // If there's no hub, or its an old API, assign a new one
4612
+ if (!hasHubOnCarrier(registry) || getHubFromCarrier(registry).isOlderThan(API_VERSION)) {
4613
+ setHubOnCarrier(registry, new Hub());
4614
+ }
4615
+
4616
+ // Prefer domains over global if they are there (applicable only to Node environment)
4617
+ if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_6__/* .isNodeEnv */ .KV)()) {
4618
+ return getHubFromActiveDomain(registry);
4619
+ }
4620
+ // Return hub that lives on a global object
4621
+ return getHubFromCarrier(registry);
4622
+ }
4623
+
4624
+ /**
4625
+ * Try to read the hub from an active domain, and fallback to the registry if one doesn't exist
4626
+ * @returns discovered hub
4627
+ */
4628
+ function getHubFromActiveDomain(registry) {
4629
+ try {
4630
+ var sentry = getMainCarrier().__SENTRY__;
4631
+ var activeDomain = sentry && sentry.extensions && sentry.extensions.domain && sentry.extensions.domain.active;
4632
+
4633
+ // If there's no active domain, just return global hub
4634
+ if (!activeDomain) {
4635
+ return getHubFromCarrier(registry);
4636
+ }
4637
+
4638
+ // If there's no hub on current domain, or it's an old API, assign a new one
4639
+ if (!hasHubOnCarrier(activeDomain) || getHubFromCarrier(activeDomain).isOlderThan(API_VERSION)) {
4640
+ var registryHubTopStack = getHubFromCarrier(registry).getStackTop();
4641
+ setHubOnCarrier(activeDomain, new Hub(registryHubTopStack.client, _scope_js__WEBPACK_IMPORTED_MODULE_0__/* .Scope.clone */ .s.clone(registryHubTopStack.scope)));
4642
+ }
4643
+
4644
+ // Return hub that lives on a domain
4645
+ return getHubFromCarrier(activeDomain);
4646
+ } catch (_Oo) {
4647
+ // Return hub that lives on a global object
4648
+ return getHubFromCarrier(registry);
4649
+ }
4650
  }
4651
+
4652
  /**
4653
+ * This will tell whether a carrier has a hub on it or not
4654
+ * @param carrier object
 
 
 
 
 
 
 
 
 
4655
  */
4656
+ function hasHubOnCarrier(carrier) {
4657
+ return !!(carrier && carrier.__SENTRY__ && carrier.__SENTRY__.hub);
4658
  }
4659
+
4660
  /**
4661
+ * This will create a new {@link Hub} and add to the passed object on
4662
+ * __SENTRY__.hub.
4663
+ * @param carrier object
 
 
 
 
4664
  * @hidden
4665
  */
4666
+ function getHubFromCarrier(carrier) {
4667
+ return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .getGlobalSingleton */ .Y)('hub', () => new Hub(), carrier);
 
 
 
 
 
4668
  }
4669
+
4670
  /**
4671
+ * This will set passed {@link Hub} on the passed object's __SENTRY__.hub attribute
4672
+ * @param carrier object
4673
+ * @param hub Hub
4674
+ * @returns A boolean indicating success or failure
 
 
 
 
 
 
 
 
 
 
 
4675
  */
4676
+ function setHubOnCarrier(carrier, hub) {
4677
+ if (!carrier) return false;
4678
+ var __SENTRY__ = (carrier.__SENTRY__ = carrier.__SENTRY__ || {});
4679
+ __SENTRY__.hub = hub;
4680
+ return true;
4681
  }
4682
+
4683
+
4684
+ //# sourceMappingURL=hub.js.map
4685
+
4686
 
4687
  /***/ }),
4688
 
4689
+ /***/ 1684:
4690
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
4691
 
4692
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4693
+ /* harmony export */ "s": function() { return /* binding */ Scope; },
4694
+ /* harmony export */ "c": function() { return /* binding */ addGlobalEventProcessor; }
4695
  /* harmony export */ });
4696
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1757);
4697
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7790);
4698
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7946);
4699
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8536);
4700
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5907);
4701
+ /* harmony import */ var _session_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2430);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4702
 
 
 
 
 
 
4703
 
 
 
 
 
 
 
 
 
 
 
4704
 
4705
+ /**
4706
+ * Absolute maximum number of breadcrumbs added to an event.
4707
+ * The `maxBreadcrumbs` option cannot be higher than this value.
4708
+ */
4709
+ var MAX_BREADCRUMBS = 100;
 
 
 
 
 
 
4710
 
4711
+ /**
4712
+ * Holds additional event information. {@link Scope.applyToEvent} will be
4713
+ * called by the client before an event will be sent.
4714
+ */
4715
+ class Scope {
4716
+ /** Flag if notifying is happening. */
4717
+
4718
 
4719
+ /** Callback for client to receive scope changes. */
4720
+
 
4721
 
4722
+ /** Callback list that will be called after {@link applyToEvent}. */
4723
+
4724
+
4725
+ /** Array of breadcrumbs. */
4726
+
4727
+
4728
+ /** User */
4729
+
4730
+
4731
+ /** Tags */
4732
+
4733
+
4734
+ /** Extra */
4735
+
4736
+
4737
+ /** Contexts */
4738
+
4739
+
4740
+ /** Attachments */
4741
+
4742
+
4743
+ /**
4744
+ * A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
4745
+ * sent to Sentry
4746
+ */
4747
+
4748
+
4749
+ /** Fingerprint */
4750
+
4751
+
4752
+ /** Severity */
4753
+
4754
+
4755
+ /** Transaction Name */
4756
+
4757
+
4758
+ /** Span */
4759
+
4760
+
4761
+ /** Session */
4762
+
4763
+
4764
+ /** Request Mode Session Status */
4765
+
4766
+
4767
+ constructor() {
4768
+ this._notifyingListeners = false;
4769
+ this._scopeListeners = [];
4770
+ this._eventProcessors = [];
4771
+ this._breadcrumbs = [];
4772
+ this._attachments = [];
4773
+ this._user = {};
4774
+ this._tags = {};
4775
+ this._extra = {};
4776
+ this._contexts = {};
4777
+ this._sdkProcessingMetadata = {};
4778
+ }
4779
+
4780
+ /**
4781
+ * Inherit values from the parent scope.
4782
+ * @param scope to clone.
4783
+ */
4784
+ static clone(scope) {
4785
+ var newScope = new Scope();
4786
+ if (scope) {
4787
+ newScope._breadcrumbs = [...scope._breadcrumbs];
4788
+ newScope._tags = { ...scope._tags };
4789
+ newScope._extra = { ...scope._extra };
4790
+ newScope._contexts = { ...scope._contexts };
4791
+ newScope._user = scope._user;
4792
+ newScope._level = scope._level;
4793
+ newScope._span = scope._span;
4794
+ newScope._session = scope._session;
4795
+ newScope._transactionName = scope._transactionName;
4796
+ newScope._fingerprint = scope._fingerprint;
4797
+ newScope._eventProcessors = [...scope._eventProcessors];
4798
+ newScope._requestSession = scope._requestSession;
4799
+ newScope._attachments = [...scope._attachments];
4800
+ }
4801
+ return newScope;
4802
+ }
4803
+
4804
+ /**
4805
+ * Add internal on change listener. Used for sub SDKs that need to store the scope.
4806
+ * @hidden
4807
+ */
4808
+ addScopeListener(callback) {
4809
+ this._scopeListeners.push(callback);
4810
+ }
4811
+
4812
+ /**
4813
+ * @inheritDoc
4814
+ */
4815
+ addEventProcessor(callback) {
4816
+ this._eventProcessors.push(callback);
4817
+ return this;
4818
+ }
4819
+
4820
+ /**
4821
+ * @inheritDoc
4822
+ */
4823
+ setUser(user) {
4824
+ this._user = user || {};
4825
+ if (this._session) {
4826
+ (0,_session_js__WEBPACK_IMPORTED_MODULE_0__/* .updateSession */ .CT)(this._session, { user });
4827
+ }
4828
+ this._notifyScopeListeners();
4829
+ return this;
4830
+ }
4831
+
4832
+ /**
4833
+ * @inheritDoc
4834
+ */
4835
+ getUser() {
4836
+ return this._user;
4837
+ }
4838
+
4839
+ /**
4840
+ * @inheritDoc
4841
+ */
4842
+ getRequestSession() {
4843
+ return this._requestSession;
4844
+ }
4845
+
4846
+ /**
4847
+ * @inheritDoc
4848
+ */
4849
+ setRequestSession(requestSession) {
4850
+ this._requestSession = requestSession;
4851
+ return this;
4852
+ }
4853
+
4854
+ /**
4855
+ * @inheritDoc
4856
+ */
4857
+ setTags(tags) {
4858
+ this._tags = {
4859
+ ...this._tags,
4860
+ ...tags,
4861
+ };
4862
+ this._notifyScopeListeners();
4863
+ return this;
4864
+ }
4865
+
4866
+ /**
4867
+ * @inheritDoc
4868
+ */
4869
+ setTag(key, value) {
4870
+ this._tags = { ...this._tags, [key]: value };
4871
+ this._notifyScopeListeners();
4872
+ return this;
4873
+ }
4874
+
4875
+ /**
4876
+ * @inheritDoc
4877
+ */
4878
+ setExtras(extras) {
4879
+ this._extra = {
4880
+ ...this._extra,
4881
+ ...extras,
4882
+ };
4883
+ this._notifyScopeListeners();
4884
+ return this;
4885
+ }
4886
+
4887
+ /**
4888
+ * @inheritDoc
4889
+ */
4890
+ setExtra(key, extra) {
4891
+ this._extra = { ...this._extra, [key]: extra };
4892
+ this._notifyScopeListeners();
4893
+ return this;
4894
+ }
4895
+
4896
+ /**
4897
+ * @inheritDoc
4898
+ */
4899
+ setFingerprint(fingerprint) {
4900
+ this._fingerprint = fingerprint;
4901
+ this._notifyScopeListeners();
4902
+ return this;
4903
+ }
4904
+
4905
+ /**
4906
+ * @inheritDoc
4907
+ */
4908
+ setLevel(
4909
+ level,
4910
+ ) {
4911
+ this._level = level;
4912
+ this._notifyScopeListeners();
4913
+ return this;
4914
+ }
4915
+
4916
+ /**
4917
+ * @inheritDoc
4918
+ */
4919
+ setTransactionName(name) {
4920
+ this._transactionName = name;
4921
+ this._notifyScopeListeners();
4922
+ return this;
4923
+ }
4924
+
4925
+ /**
4926
+ * @inheritDoc
4927
+ */
4928
+ setContext(key, context) {
4929
+ if (context === null) {
4930
+ delete this._contexts[key];
4931
+ } else {
4932
+ this._contexts = { ...this._contexts, [key]: context };
4933
+ }
4934
+
4935
+ this._notifyScopeListeners();
4936
+ return this;
4937
+ }
4938
+
4939
+ /**
4940
+ * @inheritDoc
4941
+ */
4942
+ setSpan(span) {
4943
+ this._span = span;
4944
+ this._notifyScopeListeners();
4945
+ return this;
4946
+ }
4947
+
4948
+ /**
4949
+ * @inheritDoc
4950
+ */
4951
+ getSpan() {
4952
+ return this._span;
4953
+ }
4954
+
4955
+ /**
4956
+ * @inheritDoc
4957
+ */
4958
+ getTransaction() {
4959
+ // Often, this span (if it exists at all) will be a transaction, but it's not guaranteed to be. Regardless, it will
4960
+ // have a pointer to the currently-active transaction.
4961
+ var span = this.getSpan();
4962
+ return span && span.transaction;
4963
+ }
4964
+
4965
+ /**
4966
+ * @inheritDoc
4967
+ */
4968
+ setSession(session) {
4969
+ if (!session) {
4970
+ delete this._session;
4971
+ } else {
4972
+ this._session = session;
4973
+ }
4974
+ this._notifyScopeListeners();
4975
+ return this;
4976
+ }
4977
+
4978
+ /**
4979
+ * @inheritDoc
4980
+ */
4981
+ getSession() {
4982
+ return this._session;
4983
+ }
4984
+
4985
+ /**
4986
+ * @inheritDoc
4987
+ */
4988
+ update(captureContext) {
4989
+ if (!captureContext) {
4990
+ return this;
4991
+ }
4992
+
4993
+ if (typeof captureContext === 'function') {
4994
+ var updatedScope = (captureContext )(this);
4995
+ return updatedScope instanceof Scope ? updatedScope : this;
4996
+ }
4997
+
4998
+ if (captureContext instanceof Scope) {
4999
+ this._tags = { ...this._tags, ...captureContext._tags };
5000
+ this._extra = { ...this._extra, ...captureContext._extra };
5001
+ this._contexts = { ...this._contexts, ...captureContext._contexts };
5002
+ if (captureContext._user && Object.keys(captureContext._user).length) {
5003
+ this._user = captureContext._user;
5004
+ }
5005
+ if (captureContext._level) {
5006
+ this._level = captureContext._level;
5007
+ }
5008
+ if (captureContext._fingerprint) {
5009
+ this._fingerprint = captureContext._fingerprint;
5010
+ }
5011
+ if (captureContext._requestSession) {
5012
+ this._requestSession = captureContext._requestSession;
5013
+ }
5014
+ } else if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .isPlainObject */ .PO)(captureContext)) {
5015
+ captureContext = captureContext ;
5016
+ this._tags = { ...this._tags, ...captureContext.tags };
5017
+ this._extra = { ...this._extra, ...captureContext.extra };
5018
+ this._contexts = { ...this._contexts, ...captureContext.contexts };
5019
+ if (captureContext.user) {
5020
+ this._user = captureContext.user;
5021
+ }
5022
+ if (captureContext.level) {
5023
+ this._level = captureContext.level;
5024
+ }
5025
+ if (captureContext.fingerprint) {
5026
+ this._fingerprint = captureContext.fingerprint;
5027
+ }
5028
+ if (captureContext.requestSession) {
5029
+ this._requestSession = captureContext.requestSession;
5030
+ }
5031
+ }
5032
+
5033
+ return this;
5034
+ }
5035
+
5036
+ /**
5037
+ * @inheritDoc
5038
+ */
5039
+ clear() {
5040
+ this._breadcrumbs = [];
5041
+ this._tags = {};
5042
+ this._extra = {};
5043
+ this._user = {};
5044
+ this._contexts = {};
5045
+ this._level = undefined;
5046
+ this._transactionName = undefined;
5047
+ this._fingerprint = undefined;
5048
+ this._requestSession = undefined;
5049
+ this._span = undefined;
5050
+ this._session = undefined;
5051
+ this._notifyScopeListeners();
5052
+ this._attachments = [];
5053
+ return this;
5054
+ }
5055
+
5056
+ /**
5057
+ * @inheritDoc
5058
+ */
5059
+ addBreadcrumb(breadcrumb, maxBreadcrumbs) {
5060
+ var maxCrumbs = typeof maxBreadcrumbs === 'number' ? Math.min(maxBreadcrumbs, MAX_BREADCRUMBS) : MAX_BREADCRUMBS;
5061
+
5062
+ // No data has been changed, so don't notify scope listeners
5063
+ if (maxCrumbs <= 0) {
5064
+ return this;
5065
+ }
5066
+
5067
+ var mergedBreadcrumb = {
5068
+ timestamp: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .dateTimestampInSeconds */ .yW)(),
5069
+ ...breadcrumb,
5070
+ };
5071
+ this._breadcrumbs = [...this._breadcrumbs, mergedBreadcrumb].slice(-maxCrumbs);
5072
+ this._notifyScopeListeners();
5073
+
5074
+ return this;
5075
+ }
5076
+
5077
+ /**
5078
+ * @inheritDoc
5079
+ */
5080
+ clearBreadcrumbs() {
5081
+ this._breadcrumbs = [];
5082
+ this._notifyScopeListeners();
5083
+ return this;
5084
+ }
5085
+
5086
+ /**
5087
+ * @inheritDoc
5088
+ */
5089
+ addAttachment(attachment) {
5090
+ this._attachments.push(attachment);
5091
+ return this;
5092
+ }
5093
+
5094
+ /**
5095
+ * @inheritDoc
5096
+ */
5097
+ getAttachments() {
5098
+ return this._attachments;
5099
+ }
5100
+
5101
+ /**
5102
+ * @inheritDoc
5103
+ */
5104
+ clearAttachments() {
5105
+ this._attachments = [];
5106
+ return this;
5107
+ }
5108
+
5109
+ /**
5110
+ * Applies the current context and fingerprint to the event.
5111
+ * Note that breadcrumbs will be added by the client.
5112
+ * Also if the event has already breadcrumbs on it, we do not merge them.
5113
+ * @param event Event
5114
+ * @param hint May contain additional information about the original exception.
5115
+ * @hidden
5116
+ */
5117
+ applyToEvent(event, hint = {}) {
5118
+ if (this._extra && Object.keys(this._extra).length) {
5119
+ event.extra = { ...this._extra, ...event.extra };
5120
+ }
5121
+ if (this._tags && Object.keys(this._tags).length) {
5122
+ event.tags = { ...this._tags, ...event.tags };
5123
+ }
5124
+ if (this._user && Object.keys(this._user).length) {
5125
+ event.user = { ...this._user, ...event.user };
5126
+ }
5127
+ if (this._contexts && Object.keys(this._contexts).length) {
5128
+ event.contexts = { ...this._contexts, ...event.contexts };
5129
+ }
5130
+ if (this._level) {
5131
+ event.level = this._level;
5132
+ }
5133
+ if (this._transactionName) {
5134
+ event.transaction = this._transactionName;
5135
+ }
5136
+
5137
+ // We want to set the trace context for normal events only if there isn't already
5138
+ // a trace context on the event. There is a product feature in place where we link
5139
+ // errors with transaction and it relies on that.
5140
+ if (this._span) {
5141
+ event.contexts = { trace: this._span.getTraceContext(), ...event.contexts };
5142
+ var transactionName = this._span.transaction && this._span.transaction.name;
5143
+ if (transactionName) {
5144
+ event.tags = { transaction: transactionName, ...event.tags };
5145
+ }
5146
+ }
5147
 
5148
+ this._applyFingerprint(event);
5149
+
5150
+ event.breadcrumbs = [...(event.breadcrumbs || []), ...this._breadcrumbs];
5151
+ event.breadcrumbs = event.breadcrumbs.length > 0 ? event.breadcrumbs : undefined;
5152
+
5153
+ event.sdkProcessingMetadata = { ...event.sdkProcessingMetadata, ...this._sdkProcessingMetadata };
5154
+
5155
+ return this._notifyEventProcessors([...getGlobalEventProcessors(), ...this._eventProcessors], event, hint);
5156
+ }
5157
+
5158
+ /**
5159
+ * Add data which will be accessible during event processing but won't get sent to Sentry
5160
+ */
5161
+ setSDKProcessingMetadata(newData) {
5162
+ this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...newData };
5163
+
5164
+ return this;
5165
+ }
5166
+
5167
+ /**
5168
+ * This will be called after {@link applyToEvent} is finished.
5169
+ */
5170
+ _notifyEventProcessors(
5171
+ processors,
5172
+ event,
5173
+ hint,
5174
+ index = 0,
5175
+ ) {
5176
+ return new _sentry_utils__WEBPACK_IMPORTED_MODULE_3__/* .SyncPromise */ .cW((resolve, reject) => {
5177
+ var processor = processors[index];
5178
+ if (event === null || typeof processor !== 'function') {
5179
+ resolve(event);
5180
+ } else {
5181
+ var result = processor({ ...event }, hint) ;
5182
+
5183
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
5184
+ processor.id &&
5185
+ result === null &&
5186
+ _sentry_utils__WEBPACK_IMPORTED_MODULE_4__/* .logger.log */ .kg.log(`Event processor "${processor.id}" dropped event`);
5187
+
5188
+ if ((0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .isThenable */ .J8)(result)) {
5189
+ void result
5190
+ .then(final => this._notifyEventProcessors(processors, final, hint, index + 1).then(resolve))
5191
+ .then(null, reject);
5192
+ } else {
5193
+ void this._notifyEventProcessors(processors, result, hint, index + 1)
5194
+ .then(resolve)
5195
+ .then(null, reject);
5196
+ }
5197
+ }
5198
  });
5199
+ }
5200
 
5201
+ /**
5202
+ * This will be called on every set call.
5203
+ */
5204
+ _notifyScopeListeners() {
5205
+ // We need this check for this._notifyingListeners to be able to work on scope during updates
5206
+ // If this check is not here we'll produce endless recursion when something is done with the scope
5207
+ // during the callback.
5208
+ if (!this._notifyingListeners) {
5209
+ this._notifyingListeners = true;
5210
+ this._scopeListeners.forEach(callback => {
5211
+ callback(this);
5212
+ });
5213
+ this._notifyingListeners = false;
 
 
 
 
 
 
 
 
 
 
 
 
5214
  }
5215
+ }
5216
 
5217
+ /**
5218
+ * Applies fingerprint from the scope to the event if there's one,
5219
+ * uses message if there's one instead or get rid of empty fingerprint
5220
+ */
5221
+ _applyFingerprint(event) {
5222
+ // Make sure it's an array first and we actually have something in place
5223
+ event.fingerprint = event.fingerprint
5224
+ ? Array.isArray(event.fingerprint)
5225
+ ? event.fingerprint
5226
+ : [event.fingerprint]
5227
+ : [];
5228
+
5229
+ // If we have something on the scope, then merge it with event
5230
+ if (this._fingerprint) {
5231
+ event.fingerprint = event.fingerprint.concat(this._fingerprint);
5232
+ }
5233
 
5234
+ // If we have no data at all, remove empty array default
5235
+ if (event.fingerprint && !event.fingerprint.length) {
5236
+ delete event.fingerprint;
5237
+ }
5238
+ }
5239
  }
5240
 
5241
+ /**
5242
+ * Returns the global event processors.
5243
+ */
5244
+ function getGlobalEventProcessors() {
5245
+ return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_5__/* .getGlobalSingleton */ .Y)('globalEventProcessors', () => []);
 
 
 
 
 
5246
  }
5247
 
5248
+ /**
5249
+ * Add a EventProcessor to be kept globally.
5250
+ * @param callback EventProcessor to add
5251
+ */
5252
+ function addGlobalEventProcessor(callback) {
5253
+ getGlobalEventProcessors().push(callback);
 
 
 
 
 
 
 
 
 
5254
  }
5255
 
5256
+
5257
+ //# sourceMappingURL=scope.js.map
5258
+
5259
+
5260
+ /***/ }),
5261
+
5262
+ /***/ 2430:
5263
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5264
+
5265
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5266
+ /* harmony export */ "RJ": function() { return /* binding */ closeSession; },
5267
+ /* harmony export */ "Hv": function() { return /* binding */ makeSession; },
5268
+ /* harmony export */ "CT": function() { return /* binding */ updateSession; }
5269
+ /* harmony export */ });
5270
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7790);
5271
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3699);
5272
+ /* harmony import */ var _sentry_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1995);
5273
+
5274
+
5275
+ /**
5276
+ * Creates a new `Session` object by setting certain default parameters. If optional @param context
5277
+ * is passed, the passed properties are applied to the session object.
5278
+ *
5279
+ * @param context (optional) additional properties to be applied to the returned session object
5280
+ *
5281
+ * @returns a new `Session` object
5282
+ */
5283
+ function makeSession(context) {
5284
+ // Both timestamp and started are in seconds since the UNIX epoch.
5285
+ var startingTime = (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .timestampInSeconds */ .ph)();
5286
+
5287
+ var session = {
5288
+ sid: (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .uuid4 */ .DM)(),
5289
+ init: true,
5290
+ timestamp: startingTime,
5291
+ started: startingTime,
5292
+ duration: 0,
5293
+ status: 'ok',
5294
+ errors: 0,
5295
+ ignoreDuration: false,
5296
+ toJSON: () => sessionToJSON(session),
5297
+ };
5298
+
5299
+ if (context) {
5300
+ updateSession(session, context);
5301
+ }
5302
+
5303
+ return session;
5304
+ }
5305
+
5306
+ /**
5307
+ * Updates a session object with the properties passed in the context.
5308
+ *
5309
+ * Note that this function mutates the passed object and returns void.
5310
+ * (Had to do this instead of returning a new and updated session because closing and sending a session
5311
+ * makes an update to the session after it was passed to the sending logic.
5312
+ * @see BaseClient.captureSession )
5313
+ *
5314
+ * @param session the `Session` to update
5315
+ * @param context the `SessionContext` holding the properties that should be updated in @param session
5316
+ */
5317
+ function updateSession(session, context = {}) {
5318
+ if (context.user) {
5319
+ if (!session.ipAddress && context.user.ip_address) {
5320
+ session.ipAddress = context.user.ip_address;
5321
+ }
5322
+
5323
+ if (!session.did && !context.did) {
5324
+ session.did = context.user.id || context.user.email || context.user.username;
5325
+ }
5326
+ }
5327
+
5328
+ session.timestamp = context.timestamp || (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_0__/* .timestampInSeconds */ .ph)();
5329
+
5330
+ if (context.ignoreDuration) {
5331
+ session.ignoreDuration = context.ignoreDuration;
5332
+ }
5333
+ if (context.sid) {
5334
+ // Good enough uuid validation. — Kamil
5335
+ session.sid = context.sid.length === 32 ? context.sid : (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_1__/* .uuid4 */ .DM)();
5336
+ }
5337
+ if (context.init !== undefined) {
5338
+ session.init = context.init;
5339
+ }
5340
+ if (!session.did && context.did) {
5341
+ session.did = `${context.did}`;
5342
+ }
5343
+ if (typeof context.started === 'number') {
5344
+ session.started = context.started;
5345
+ }
5346
+ if (session.ignoreDuration) {
5347
+ session.duration = undefined;
5348
+ } else if (typeof context.duration === 'number') {
5349
+ session.duration = context.duration;
5350
+ } else {
5351
+ var duration = session.timestamp - session.started;
5352
+ session.duration = duration >= 0 ? duration : 0;
5353
+ }
5354
+ if (context.release) {
5355
+ session.release = context.release;
5356
+ }
5357
+ if (context.environment) {
5358
+ session.environment = context.environment;
5359
+ }
5360
+ if (!session.ipAddress && context.ipAddress) {
5361
+ session.ipAddress = context.ipAddress;
5362
+ }
5363
+ if (!session.userAgent && context.userAgent) {
5364
+ session.userAgent = context.userAgent;
5365
+ }
5366
+ if (typeof context.errors === 'number') {
5367
+ session.errors = context.errors;
5368
+ }
5369
+ if (context.status) {
5370
+ session.status = context.status;
5371
+ }
5372
+ }
5373
+
5374
+ /**
5375
+ * Closes a session by setting its status and updating the session object with it.
5376
+ * Internally calls `updateSession` to update the passed session object.
5377
+ *
5378
+ * Note that this function mutates the passed session (@see updateSession for explanation).
5379
+ *
5380
+ * @param session the `Session` object to be closed
5381
+ * @param status the `SessionStatus` with which the session was closed. If you don't pass a status,
5382
+ * this function will keep the previously set status, unless it was `'ok'` in which case
5383
+ * it is changed to `'exited'`.
5384
+ */
5385
+ function closeSession(session, status) {
5386
+ let context = {};
5387
+ if (status) {
5388
+ context = { status };
5389
+ } else if (session.status === 'ok') {
5390
+ context = { status: 'exited' };
5391
+ }
5392
+
5393
+ updateSession(session, context);
5394
+ }
5395
+
5396
+ /**
5397
+ * Serializes a passed session object to a JSON object with a slightly different structure.
5398
+ * This is necessary because the Sentry backend requires a slightly different schema of a session
5399
+ * than the one the JS SDKs use internally.
5400
+ *
5401
+ * @param session the session to be converted
5402
+ *
5403
+ * @returns a JSON object of the passed session
5404
+ */
5405
+ function sessionToJSON(session) {
5406
+ return (0,_sentry_utils__WEBPACK_IMPORTED_MODULE_2__/* .dropUndefinedKeys */ .Jr)({
5407
+ sid: `${session.sid}`,
5408
+ init: session.init,
5409
+ // Make sure that sec is converted to ms for date constructor
5410
+ started: new Date(session.started * 1000).toISOString(),
5411
+ timestamp: new Date(session.timestamp * 1000).toISOString(),
5412
+ status: session.status,
5413
+ errors: session.errors,
5414
+ did: typeof session.did === 'number' || typeof session.did === 'string' ? `${session.did}` : undefined,
5415
+ duration: session.duration,
5416
+ attrs: {
5417
+ release: session.release,
5418
+ environment: session.environment,
5419
+ ip_address: session.ipAddress,
5420
+ user_agent: session.userAgent,
5421
+ },
5422
+ });
5423
  }
5424
 
 
 
 
 
 
 
 
5425
 
5426
+ //# sourceMappingURL=session.js.map
5427
+
5428
+
5429
+ /***/ }),
5430
+
5431
+ /***/ 6990:
5432
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5433
+
5434
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5435
+ /* harmony export */ "Hk": function() { return /* binding */ getSentryBaggageItems; }
5436
+ /* harmony export */ });
5437
+ /* unused harmony exports BAGGAGE_HEADER_NAME, MAX_BAGGAGE_STRING_LENGTH, SENTRY_BAGGAGE_KEY_PREFIX, SENTRY_BAGGAGE_KEY_PREFIX_REGEX, createBaggage, getBaggageValue, getThirdPartyBaggage, isBaggageMutable, isSentryBaggageEmpty, mergeAndSerializeBaggage, parseBaggageHeader, parseBaggageSetMutability, serializeBaggage, setBaggageImmutable, setBaggageValue */
5438
+
5439
+
5440
+
5441
+ var BAGGAGE_HEADER_NAME = 'baggage';
5442
+
5443
+ var SENTRY_BAGGAGE_KEY_PREFIX = 'sentry-';
5444
+
5445
+ var SENTRY_BAGGAGE_KEY_PREFIX_REGEX = /^sentry-/;
5446
+
5447
+ /**
5448
+ * Max length of a serialized baggage string
5449
+ *
5450
+ * https://www.w3.org/TR/baggage/#limits
5451
+ */
5452
+ var MAX_BAGGAGE_STRING_LENGTH = 8192;
5453
+
5454
+ /** Create an instance of Baggage */
5455
+ function createBaggage(initItems, baggageString = '', mutable = true) {
5456
+ return [{ ...initItems }, baggageString, mutable];
5457
  }
5458
 
5459
+ /** Get a value from baggage */
5460
+ function getBaggageValue(baggage, key) {
5461
+ return baggage[0][key];
 
 
 
 
 
 
 
5462
  }
5463
 
5464
+ /** Add a value to baggage */
5465
+ function setBaggageValue(baggage, key, value) {
5466
+ if (isBaggageMutable(baggage)) {
5467
+ baggage[0][key] = value;
5468
+ }
5469
  }
5470
 
5471
+ /** Check if the Sentry part of the passed baggage (i.e. the first element in the tuple) is empty */
5472
+ function isSentryBaggageEmpty(baggage) {
5473
+ return Object.keys(baggage[0]).length === 0;
 
 
 
5474
  }
5475
 
5476
+ /** Returns Sentry specific baggage values */
5477
+ function getSentryBaggageItems(baggage) {
5478
+ return baggage[0];
5479
+ }
5480
 
5481
+ /**
5482
+ * Returns 3rd party baggage string of @param baggage
5483
+ * @param baggage
5484
+ */
5485
+ function getThirdPartyBaggage(baggage) {
5486
+ return baggage[1];
5487
  }
5488
 
5489
+ /**
5490
+ * Checks if baggage is mutable
5491
+ * @param baggage
5492
+ * @returns true if baggage is mutable, else false
5493
+ */
5494
+ function isBaggageMutable(baggage) {
5495
+ return baggage[2];
5496
  }
5497
 
5498
+ /**
5499
+ * Sets the passed baggage immutable
5500
+ * @param baggage
5501
+ */
5502
+ function setBaggageImmutable(baggage) {
5503
+ baggage[2] = false;
5504
  }
5505
 
5506
+ /** Serialize a baggage object */
5507
+ function serializeBaggage(baggage) {
5508
+ return Object.keys(baggage[0]).reduce((prev, key) => {
5509
+ var val = baggage[0][key] ;
5510
+ var baggageEntry = `${SENTRY_BAGGAGE_KEY_PREFIX}${encodeURIComponent(key)}=${encodeURIComponent(val)}`;
5511
+ var newVal = prev === '' ? baggageEntry : `${prev},${baggageEntry}`;
5512
+ if (newVal.length > MAX_BAGGAGE_STRING_LENGTH) {
5513
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
5514
+ logger.warn(`Not adding key: ${key} with val: ${val} to baggage due to exceeding baggage size limits.`);
5515
+ return prev;
5516
+ } else {
5517
+ return newVal;
5518
  }
5519
+ }, baggage[1]);
 
5520
  }
5521
 
5522
+ /**
5523
+ * Parse a baggage header from a string or a string array and return a Baggage object
5524
+ *
5525
+ * If @param includeThirdPartyEntries is set to true, third party baggage entries are added to the Baggage object
5526
+ * (This is necessary for merging potentially pre-existing baggage headers in outgoing requests with
5527
+ * our `sentry-` values)
5528
+ */
5529
+ function parseBaggageHeader(
5530
+ inputBaggageValue,
5531
+ includeThirdPartyEntries = false,
5532
+ ) {
5533
+ // Adding this check here because we got reports of this function failing due to the input value
5534
+ // not being a string. This debug log might help us determine what's going on here.
5535
+ if ((!Array.isArray(inputBaggageValue) && !isString(inputBaggageValue)) || typeof inputBaggageValue === 'number') {
5536
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
5537
+ logger.warn(
5538
+ '[parseBaggageHeader] Received input value of incompatible type: ',
5539
+ typeof inputBaggageValue,
5540
+ inputBaggageValue,
5541
+ );
5542
 
5543
+ // Gonna early-return an empty baggage object so that we don't fail later on
5544
+ return createBaggage({}, '');
5545
+ }
5546
 
5547
+ var baggageEntries = (isString(inputBaggageValue) ? inputBaggageValue : inputBaggageValue.join(','))
5548
+ .split(',')
5549
+ .map(entry => entry.trim())
5550
+ .filter(entry => entry !== '' && (includeThirdPartyEntries || SENTRY_BAGGAGE_KEY_PREFIX_REGEX.test(entry)));
5551
 
5552
+ return baggageEntries.reduce(
5553
+ ([baggageObj, baggageString], curr) => {
5554
+ const [key, val] = curr.split('=');
5555
+ if (SENTRY_BAGGAGE_KEY_PREFIX_REGEX.test(key)) {
5556
+ var baggageKey = decodeURIComponent(key.split('-')[1]);
5557
+ return [
5558
+ {
5559
+ ...baggageObj,
5560
+ [baggageKey]: decodeURIComponent(val),
5561
+ },
5562
+ baggageString,
5563
+ true,
5564
+ ];
5565
+ } else {
5566
+ return [baggageObj, baggageString === '' ? curr : `${baggageString},${curr}`, true];
5567
+ }
5568
+ },
5569
+ [{}, '', true],
5570
+ );
5571
+ }
 
 
 
 
 
 
 
 
5572
 
5573
+ /**
5574
+ * Merges the baggage header we saved from the incoming request (or meta tag) with
5575
+ * a possibly created or modified baggage header by a third party that's been added
5576
+ * to the outgoing request header.
5577
+ *
5578
+ * In case @param headerBaggageString exists, we can safely add the the 3rd party part of @param headerBaggage
5579
+ * with our @param incomingBaggage. This is possible because if we modified anything beforehand,
5580
+ * it would only affect parts of the sentry baggage (@see Baggage interface).
5581
+ *
5582
+ * @param incomingBaggage the baggage header of the incoming request that might contain sentry entries
5583
+ * @param thirdPartyBaggageHeader possibly existing baggage header string or string[] added from a third
5584
+ * party to the request headers
5585
+ *
5586
+ * @return a merged and serialized baggage string to be propagated with the outgoing request
5587
+ */
5588
+ function mergeAndSerializeBaggage(incomingBaggage, thirdPartyBaggageHeader) {
5589
+ if (!incomingBaggage && !thirdPartyBaggageHeader) {
5590
+ return '';
5591
+ }
5592
 
5593
+ var headerBaggage = (thirdPartyBaggageHeader && parseBaggageHeader(thirdPartyBaggageHeader, true)) || undefined;
5594
+ var thirdPartyHeaderBaggage = headerBaggage && getThirdPartyBaggage(headerBaggage);
5595
+
5596
+ var finalBaggage = createBaggage((incomingBaggage && incomingBaggage[0]) || {}, thirdPartyHeaderBaggage || '');
5597
+ return serializeBaggage(finalBaggage);
5598
+ }
5599
 
 
 
 
5600
  /**
5601
+ * Helper function that takes a raw baggage string (if available) and the processed sentry-trace header
5602
+ * data (if available), parses the baggage string and creates a Baggage object
5603
+ * If there is no baggage string, it will create an empty Baggage object.
5604
+ * In a second step, this functions determines if the created Baggage object should be set immutable
5605
+ * to prevent mutation of the Sentry data.
5606
+ *
5607
+ * Extracted this logic to a function because it's duplicated in a lot of places.
5608
+ *
5609
+ * @param rawBaggageValue
5610
+ * @param sentryTraceHeader
5611
  */
5612
+ function parseBaggageSetMutability(
5613
+ rawBaggageValue,
5614
+ sentryTraceHeader,
5615
+ ) {
5616
+ var baggage = parseBaggageHeader(rawBaggageValue || '');
5617
+
5618
+ // Because we are always creating a Baggage object by calling `parseBaggageHeader` above
5619
+ // (either a filled one or an empty one, even if we didn't get a `baggage` header),
5620
+ // we only need to check if we have a sentry-trace header or not. As soon as we have it,
5621
+ // we set baggage immutable. In case we don't get a sentry-trace header, we can assume that
5622
+ // this SDK is the head of the trace and thus we still permit mutation at this time.
5623
+ // There is one exception though, which is that we get a baggage-header with `sentry-`
5624
+ // items but NO sentry-trace header. In this case we also set the baggage immutable for now
5625
+ // but if smoething like this would ever happen, we should revisit this and determine
5626
+ // what this would actually mean for the trace (i.e. is this SDK the head?, what happened
5627
+ // before that we don't have a sentry-trace header?, etc)
5628
+ (sentryTraceHeader || !isSentryBaggageEmpty(baggage)) && setBaggageImmutable(baggage);
5629
+
5630
+ return baggage;
5631
  }
5632
+
5633
+
5634
+ //# sourceMappingURL=baggage.js.map
5635
+
5636
 
5637
  /***/ }),
5638
 
5640
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5641
 
5642
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5643
+ /* harmony export */ "l": function() { return /* binding */ getLocationHref; },
5644
+ /* harmony export */ "R": function() { return /* binding */ htmlTreeAsString; }
5645
  /* harmony export */ });
5646
+ /* harmony import */ var _global_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5907);
5647
+ /* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1757);
5648
+
5649
 
5650
 
5651
  /**
5655
  * @returns generated DOM path
5656
  */
5657
  function htmlTreeAsString(elem, keyAttrs) {
5658
+
5659
+
5660
+ // try/catch both:
5661
+ // - accessing event.target (see getsentry/raven-js#838, #768)
5662
+ // - `htmlTreeAsString` because it's complex, and just accessing the DOM incorrectly
5663
+ // - can throw an exception in some circumstances.
5664
+ try {
5665
+ let currentElem = elem ;
5666
+ var MAX_TRAVERSE_HEIGHT = 5;
5667
+ var MAX_OUTPUT_LEN = 80;
5668
+ var out = [];
5669
+ let height = 0;
5670
+ let len = 0;
5671
+ var separator = ' > ';
5672
+ var sepLength = separator.length;
5673
+ let nextStr;
5674
+
5675
  while (currentElem && height++ < MAX_TRAVERSE_HEIGHT) {
5676
+ nextStr = _htmlElementAsString(currentElem, keyAttrs);
5677
+ // bail out if
5678
+ // - nextStr is the 'html' element
5679
+ // - the length of the string that would be created exceeds MAX_OUTPUT_LEN
5680
+ // (ignore this limit if we are on the first iteration)
5681
+ if (nextStr === 'html' || (height > 1 && len + out.length * sepLength + nextStr.length >= MAX_OUTPUT_LEN)) {
5682
+ break;
5683
+ }
5684
+
5685
+ out.push(nextStr);
5686
+
5687
+ len += nextStr.length;
5688
+ currentElem = currentElem.parentNode;
 
 
 
5689
  }
5690
+
5691
+ return out.reverse().join(separator);
5692
+ } catch (_oO) {
5693
+ return '<unknown>';
5694
+ }
5695
  }
5696
+
5697
  /**
5698
  * Returns a simple, query-selector representation of a DOM element
5699
  * e.g. [HTMLElement] => input#foo.btn[name=baz]
5700
  * @returns generated DOM path
5701
  */
5702
  function _htmlElementAsString(el, keyAttrs) {
5703
+ var elem = el
5704
+
5705
+ ;
5706
+
5707
+ var out = [];
5708
+ let className;
5709
+ let classes;
5710
+ let key;
5711
+ let attr;
5712
+ let i;
5713
+
5714
+ if (!elem || !elem.tagName) {
5715
+ return '';
5716
+ }
5717
+
5718
+ out.push(elem.tagName.toLowerCase());
5719
+
5720
+ // Pairs of attribute keys defined in `serializeAttribute` and their values on element.
5721
+ var keyAttrPairs =
5722
+ keyAttrs && keyAttrs.length
5723
+ ? keyAttrs.filter(keyAttr => elem.getAttribute(keyAttr)).map(keyAttr => [keyAttr, elem.getAttribute(keyAttr)])
5724
+ : null;
5725
+
5726
+ if (keyAttrPairs && keyAttrPairs.length) {
5727
+ keyAttrPairs.forEach(keyAttrPair => {
5728
+ out.push(`[${keyAttrPair[0]}="${keyAttrPair[1]}"]`);
5729
+ });
5730
+ } else {
5731
+ if (elem.id) {
5732
+ out.push(`#${elem.id}`);
5733
  }
5734
+
 
 
 
 
5735
  className = elem.className;
5736
+ if (className && (0,_is_js__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .HD)(className)) {
5737
+ classes = className.split(/\s+/);
5738
+ for (i = 0; i < classes.length; i++) {
5739
+ out.push(`.${classes[i]}`);
5740
+ }
 
5741
  }
5742
+ }
5743
+ var allowedAttrs = ['type', 'name', 'title', 'alt'];
5744
+ for (i = 0; i < allowedAttrs.length; i++) {
5745
+ key = allowedAttrs[i];
5746
+ attr = elem.getAttribute(key);
5747
+ if (attr) {
5748
+ out.push(`[${key}="${attr}"]`);
5749
  }
5750
+ }
5751
+ return out.join('');
5752
  }
5753
+
5754
  /**
5755
  * A safe form of location.href
5756
  */
5757
  function getLocationHref() {
5758
+ var global = (0,_global_js__WEBPACK_IMPORTED_MODULE_1__/* .getGlobalObject */ .R)();
5759
+ try {
5760
+ return global.document.location.href;
5761
+ } catch (oO) {
5762
+ return '';
5763
+ }
 
5764
  }
5765
+
5766
+
5767
  //# sourceMappingURL=browser.js.map
5768
 
5769
+
5770
  /***/ }),
5771
 
5772
  /***/ 250:
5775
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5776
  /* harmony export */ "y": function() { return /* binding */ createClientReportEnvelope; }
5777
  /* harmony export */ });
5778
+ /* harmony import */ var _envelope_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6894);
5779
+ /* harmony import */ var _time_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7790);
5780
+
5781
 
5782
 
5783
  /**
5784
  * Creates client report envelope
5785
  * @param discarded_events An array of discard events
5786
+ * @param dsn A DSN that can be set on the header. Optional.
5787
+ */
5788
+ function createClientReportEnvelope(
5789
+ discarded_events,
5790
+ dsn,
5791
+ timestamp,
5792
+ ) {
5793
+ var clientReportItem = [
5794
+ { type: 'client_report' },
5795
+ {
5796
+ timestamp: timestamp || (0,_time_js__WEBPACK_IMPORTED_MODULE_0__/* .dateTimestampInSeconds */ .yW)(),
5797
+ discarded_events,
5798
+ },
5799
+ ];
5800
+ return (0,_envelope_js__WEBPACK_IMPORTED_MODULE_1__/* .createEnvelope */ .Jd)(dsn ? { dsn } : {}, [clientReportItem]);
5801
  }
5802
+
5803
+
5804
  //# sourceMappingURL=clientreport.js.map
5805
 
5806
+
5807
  /***/ }),
5808
 
5809
  /***/ 3135:
5810
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5811
 
5812
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5813
+ /* harmony export */ "RA": function() { return /* binding */ dsnToString; },
5814
+ /* harmony export */ "vK": function() { return /* binding */ makeDsn; }
5815
  /* harmony export */ });
5816
+ /* unused harmony export extensionRelayDSN */
5817
+ /* harmony import */ var _error_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4388);
 
 
5818
 
5819
 
5820
  /** Regular expression used to parse a Dsn. */
5821
  var DSN_REGEX = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;
5822
+
5823
  function isValidProtocol(protocol) {
5824
+ return protocol === 'http' || protocol === 'https';
5825
  }
5826
+
5827
  /**
5828
  * Renders the string representation of this Dsn.
5829
  *
5833
  *
5834
  * @param withPassword When set to true, the password will be included.
5835
  */
5836
+ function dsnToString(dsn, withPassword = false) {
5837
+ const { host, path, pass, port, projectId, protocol, publicKey } = dsn;
5838
+ return (
5839
+ `${protocol}://${publicKey}${withPassword && pass ? `:${pass}` : ''}` +
5840
+ `@${host}${port ? `:${port}` : ''}/${path ? `${path}/` : path}${projectId}`
5841
+ );
5842
  }
5843
+
5844
+ /**
5845
+ * Parses a Dsn from a given string.
5846
+ *
5847
+ * @param str A Dsn as string
5848
+ * @returns Dsn as DsnComponents
5849
+ */
5850
  function dsnFromString(str) {
5851
+ var match = DSN_REGEX.exec(str);
5852
+
5853
+ if (!match) {
5854
+ throw new _error_js__WEBPACK_IMPORTED_MODULE_0__/* .SentryError */ .b(`Invalid Sentry Dsn: ${str}`);
5855
+ }
5856
+
5857
+ const [protocol, publicKey, pass = '', host, port = '', lastPath] = match.slice(1);
5858
+ let path = '';
5859
+ let projectId = lastPath;
5860
+
5861
+ var split = projectId.split('/');
5862
+ if (split.length > 1) {
5863
+ path = split.slice(0, -1).join('/');
5864
+ projectId = split.pop() ;
5865
+ }
5866
+
5867
+ if (projectId) {
5868
+ var projectMatch = projectId.match(/^\d+/);
5869
+ if (projectMatch) {
5870
+ projectId = projectMatch[0];
5871
  }
5872
+ }
5873
+
5874
+ return dsnFromComponents({ host, pass, path, projectId, port, protocol: protocol , publicKey });
5875
  }
5876
+
5877
  function dsnFromComponents(components) {
5878
+ return {
5879
+ protocol: components.protocol,
5880
+ publicKey: components.publicKey || '',
5881
+ pass: components.pass || '',
5882
+ host: components.host,
5883
+ port: components.port || '',
5884
+ path: components.path || '',
5885
+ projectId: components.projectId,
5886
+ };
 
 
 
 
 
5887
  }
5888
+
5889
  function validateDsn(dsn) {
5890
+ if (!(typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {
5891
+ return;
5892
+ }
5893
+
5894
+ const { port, projectId, protocol } = dsn;
5895
+
5896
+ var requiredComponents = ['protocol', 'publicKey', 'host', 'projectId'];
5897
+ requiredComponents.forEach(component => {
5898
+ if (!dsn[component]) {
5899
+ throw new _error_js__WEBPACK_IMPORTED_MODULE_0__/* .SentryError */ .b(`Invalid Sentry Dsn: ${component} missing`);
 
 
 
 
 
 
 
 
5900
  }
5901
+ });
5902
+
5903
+ if (!projectId.match(/^\d+$/)) {
5904
+ throw new _error_js__WEBPACK_IMPORTED_MODULE_0__/* .SentryError */ .b(`Invalid Sentry Dsn: Invalid projectId ${projectId}`);
5905
+ }
5906
+
5907
+ if (!isValidProtocol(protocol)) {
5908
+ throw new _error_js__WEBPACK_IMPORTED_MODULE_0__/* .SentryError */ .b(`Invalid Sentry Dsn: Invalid protocol ${protocol}`);
5909
+ }
5910
+
5911
+ if (port && isNaN(parseInt(port, 10))) {
5912
+ throw new _error_js__WEBPACK_IMPORTED_MODULE_0__/* .SentryError */ .b(`Invalid Sentry Dsn: Invalid port ${port}`);
5913
+ }
5914
+
5915
+ return true;
5916
  }
5917
+
5918
  /** The Sentry Dsn, identifying a Sentry instance and project. */
5919
  function makeDsn(from) {
5920
+ var components = typeof from === 'string' ? dsnFromString(from) : dsnFromComponents(from);
5921
+ validateDsn(components);
5922
+ return components;
5923
  }
 
5924
 
5925
+ /**
5926
+ * Changes a Dsn to point to the `relay` server running in the Lambda Extension.
5927
+ *
5928
+ * This is only used by the serverless integration for AWS Lambda.
5929
+ *
5930
+ * @param originalDsn The original Dsn of the customer.
5931
+ * @returns Dsn pointing to Lambda extension.
5932
+ */
5933
+ function extensionRelayDSN(originalDsn) {
5934
+ if (originalDsn === undefined) {
5935
+ return undefined;
5936
+ }
5937
 
5938
+ var dsn = dsnFromString(originalDsn);
5939
+ dsn.host = 'localhost';
5940
+ dsn.port = '3000';
5941
+ dsn.protocol = 'http';
5942
+
5943
+ return dsnToString(dsn);
5944
+ }
5945
+
5946
+
5947
+ //# sourceMappingURL=dsn.js.map
5948
 
 
 
 
 
 
5949
 
5950
  /***/ }),
5951
 
5969
  * An example for this is the __SENTRY_DEBUG__ constant. It is declared in each package individually because we want
5970
  * users to be able to shake away expressions that it guards.
5971
  */
5972
+
5973
  /**
5974
  * Figures out if we're building a browser bundle.
5975
  *
5976
  * @returns true if this is a browser bundle build.
5977
  */
5978
  function isBrowserBundle() {
5979
+ return typeof __SENTRY_BROWSER_BUNDLE__ !== 'undefined' && !!__SENTRY_BROWSER_BUNDLE__;
5980
  }
5981
+
5982
+
5983
  //# sourceMappingURL=env.js.map
5984
 
5985
+
5986
  /***/ }),
5987
 
5988
  /***/ 6894:
5989
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
5990
 
5991
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
5992
+ /* harmony export */ "BO": function() { return /* binding */ addItemToEnvelope; },
5993
+ /* harmony export */ "zQ": function() { return /* binding */ createAttachmentEnvelopeItem; },
5994
  /* harmony export */ "Jd": function() { return /* binding */ createEnvelope; },
5995
+ /* harmony export */ "mL": function() { return /* binding */ envelopeItemTypeToDataCategory; },
5996
+ /* harmony export */ "gv": function() { return /* binding */ forEachEnvelopeItem; },
5997
  /* harmony export */ "V$": function() { return /* binding */ serializeEnvelope; }
5998
  /* harmony export */ });
5999
+ /* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1995);
 
 
6000
 
6001
 
6002
  /**
6004
  * Make sure to always explicitly provide the generic to this function
6005
  * so that the envelope types resolve correctly.
6006
  */
6007
+ function createEnvelope(headers, items = []) {
6008
+ return [headers, items] ;
 
6009
  }
6010
+
6011
  /**
6012
  * Add an item to an envelope.
6013
  * Make sure to always explicitly provide the generic to this function
6014
  * so that the envelope types resolve correctly.
6015
  */
6016
  function addItemToEnvelope(envelope, newItem) {
6017
+ const [headers, items] = envelope;
6018
+ return [headers, [...items, newItem]] ;
6019
+ }
6020
+
6021
+ /**
6022
+ * Convenience function to loop through the items and item types of an envelope.
6023
+ * (This function was mostly created because working with envelope types is painful at the moment)
6024
+ */
6025
+ function forEachEnvelopeItem(
6026
+ envelope,
6027
+ callback,
6028
+ ) {
6029
+ var envelopeItems = envelope[1];
6030
+ envelopeItems.forEach((envelopeItem) => {
6031
+ var envelopeItemType = envelopeItem[0].type;
6032
+ callback(envelopeItem, envelopeItemType);
6033
+ });
6034
+ }
6035
+
6036
+ function encodeUTF8(input, textEncoder) {
6037
+ var utf8 = textEncoder || new TextEncoder();
6038
+ return utf8.encode(input);
6039
+ }
6040
+
6041
+ /**
6042
+ * Serializes an envelope.
6043
+ */
6044
+ function serializeEnvelope(envelope, textEncoder) {
6045
+ const [envHeaders, items] = envelope;
6046
+
6047
+ // Initially we construct our envelope as a string and only convert to binary chunks if we encounter binary data
6048
+ let parts = JSON.stringify(envHeaders);
6049
+
6050
+ function append(next) {
6051
+ if (typeof parts === 'string') {
6052
+ parts = typeof next === 'string' ? parts + next : [encodeUTF8(parts, textEncoder), next];
6053
+ } else {
6054
+ parts.push(typeof next === 'string' ? encodeUTF8(next, textEncoder) : next);
6055
+ }
6056
+ }
6057
+
6058
+ for (var item of items) {
6059
+ const [itemHeaders, payload] = item ;
6060
+ append(`\n${JSON.stringify(itemHeaders)}\n`);
6061
+ append(typeof payload === 'string' || payload instanceof Uint8Array ? payload : JSON.stringify(payload));
6062
+ }
6063
+
6064
+ return typeof parts === 'string' ? parts : concatBuffers(parts);
6065
+ }
6066
+
6067
+ function concatBuffers(buffers) {
6068
+ var totalLength = buffers.reduce((acc, buf) => acc + buf.length, 0);
6069
+
6070
+ var merged = new Uint8Array(totalLength);
6071
+ let offset = 0;
6072
+ for (var buffer of buffers) {
6073
+ merged.set(buffer, offset);
6074
+ offset += buffer.length;
6075
+ }
6076
+
6077
+ return merged;
6078
  }
6079
+
6080
  /**
6081
+ * Creates attachment envelope items
6082
  */
6083
+ function createAttachmentEnvelopeItem(
6084
+ attachment,
6085
+ textEncoder,
6086
+ ) {
6087
+ var buffer = typeof attachment.data === 'string' ? encodeUTF8(attachment.data, textEncoder) : attachment.data;
6088
+
6089
+ return [
6090
+ (0,_object_js__WEBPACK_IMPORTED_MODULE_0__/* .dropUndefinedKeys */ .Jr)({
6091
+ type: 'attachment',
6092
+ length: buffer.length,
6093
+ filename: attachment.filename,
6094
+ content_type: attachment.contentType,
6095
+ attachment_type: attachment.attachmentType,
6096
+ }),
6097
+ buffer,
6098
+ ];
6099
  }
6100
+
6101
+ var ITEM_TYPE_TO_DATA_CATEGORY_MAP = {
6102
+ session: 'session',
6103
+ sessions: 'session',
6104
+ attachment: 'attachment',
6105
+ transaction: 'transaction',
6106
+ event: 'error',
6107
+ client_report: 'internal',
6108
+ user_report: 'default',
6109
+ };
6110
+
6111
  /**
6112
+ * Maps the type of an envelope item to a data category.
6113
  */
6114
+ function envelopeItemTypeToDataCategory(type) {
6115
+ return ITEM_TYPE_TO_DATA_CATEGORY_MAP[type];
 
 
 
 
 
 
 
 
 
 
 
 
6116
  }
6117
+
6118
+
6119
  //# sourceMappingURL=envelope.js.map
6120
 
6121
+
6122
  /***/ }),
6123
 
6124
  /***/ 4388:
6127
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6128
  /* harmony export */ "b": function() { return /* binding */ SentryError; }
6129
  /* harmony export */ });
 
 
 
 
6130
  /** An error emitted by Sentry SDKs and related utilities. */
6131
+ class SentryError extends Error {
6132
+ /** Display name of this error instance. */
6133
+
 
 
 
 
 
 
 
 
 
6134
 
6135
+ constructor( message) {
6136
+ super(message);this.message = message;;
6137
 
6138
+ this.name = new.target.prototype.constructor.name;
6139
+ Object.setPrototypeOf(this, new.target.prototype);
6140
+ }
6141
+ }
6142
 
 
 
6143
 
6144
+ //# sourceMappingURL=error.js.map
6145
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6146
 
6147
  /***/ }),
6148
 
6153
  /* harmony export */ "R": function() { return /* binding */ getGlobalObject; },
6154
  /* harmony export */ "Y": function() { return /* binding */ getGlobalSingleton; }
6155
  /* harmony export */ });
6156
+ /* harmony import */ var _node_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7392);
6157
+
6158
+
6159
+ /** Internal */
 
6160
 
6161
  var fallbackGlobalObject = {};
6162
+
6163
  /**
6164
  * Safely get global scope object
6165
  *
6166
  * @returns Global scope object
6167
  */
6168
  function getGlobalObject() {
6169
+ return (
6170
+ (0,_node_js__WEBPACK_IMPORTED_MODULE_0__/* .isNodeEnv */ .KV)()
6171
+ ? window
6172
+ : typeof window !== 'undefined' ? window : typeof self !== 'undefined'
6173
+ ? self
6174
+ : fallbackGlobalObject
6175
+ ) ;
6176
  }
6177
+
6178
  /**
6179
  * Returns a global singleton contained in the global `__SENTRY__` object.
6180
  *
6187
  * @returns the singleton
6188
  */
6189
  function getGlobalSingleton(name, creator, obj) {
6190
+ var global = (obj || getGlobalObject()) ;
6191
+ var __SENTRY__ = (global.__SENTRY__ = global.__SENTRY__ || {});
6192
+ var singleton = __SENTRY__[name] || (__SENTRY__[name] = creator());
6193
+ return singleton;
6194
  }
6195
+
6196
+
6197
  //# sourceMappingURL=global.js.map
6198
 
6199
+
6200
  /***/ }),
6201
 
6202
  /***/ 4005:
6205
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
6206
  /* harmony export */ "o": function() { return /* binding */ addInstrumentationHandler; }
6207
  /* harmony export */ });
6208
+ /* harmony import */ var _global_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
6209
+ /* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1757);
6210
+ /* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8536);
6211
+ /* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1995);
6212
+ /* harmony import */ var _stacktrace_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9038);
6213
+ /* harmony import */ var _supports_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9798);
 
 
6214
 
6215
 
6216
 
6218
 
6219
 
6220
 
6221
+ var global = (0,_global_js__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
6222
 
 
6223
  /**
6224
  * Instrument native APIs to call handlers that can be used to create breadcrumbs, APM spans etc.
6225
  * - Console API
6230
  * - Error API
6231
  * - UnhandledRejection API
6232
  */
6233
+
6234
  var handlers = {};
6235
  var instrumented = {};
6236
+
6237
  /** Instruments given API */
6238
  function instrument(type) {
6239
+ if (instrumented[type]) {
6240
+ return;
6241
+ }
6242
+
6243
+ instrumented[type] = true;
6244
+
6245
+ switch (type) {
6246
+ case 'console':
6247
+ instrumentConsole();
6248
+ break;
6249
+ case 'dom':
6250
+ instrumentDOM();
6251
+ break;
6252
+ case 'xhr':
6253
+ instrumentXHR();
6254
+ break;
6255
+ case 'fetch':
6256
+ instrumentFetch();
6257
+ break;
6258
+ case 'history':
6259
+ instrumentHistory();
6260
+ break;
6261
+ case 'error':
6262
+ instrumentError();
6263
+ break;
6264
+ case 'unhandledrejection':
6265
+ instrumentUnhandledRejection();
6266
+ break;
6267
+ default:
6268
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) && _logger_js__WEBPACK_IMPORTED_MODULE_1__/* .logger.warn */ .kg.warn('unknown instrumentation type:', type);
6269
+ return;
6270
+ }
6271
  }
6272
+
6273
  /**
6274
  * Add handler that will be called when given type of instrumentation triggers.
6275
  * Use at your own risk, this might break without changelog notice, only used internally.
6276
  * @hidden
6277
  */
6278
  function addInstrumentationHandler(type, callback) {
6279
+ handlers[type] = handlers[type] || [];
6280
+ (handlers[type] ).push(callback);
6281
+ instrument(type);
6282
  }
6283
+
6284
  /** JSDoc */
6285
  function triggerHandlers(type, data) {
6286
+ if (!type || !handlers[type]) {
6287
+ return;
6288
+ }
6289
+
6290
+ for (var handler of handlers[type] || []) {
6291
  try {
6292
+ handler(data);
6293
+ } catch (e) {
6294
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
6295
+ _logger_js__WEBPACK_IMPORTED_MODULE_1__/* .logger.error */ .kg.error(
6296
+ `Error while triggering instrumentation handler.\nType: ${type}\nName: ${(0,_stacktrace_js__WEBPACK_IMPORTED_MODULE_2__/* .getFunctionName */ .$P)(handler)}\nError:`,
6297
+ e,
6298
+ );
 
 
 
 
 
 
 
 
 
 
6299
  }
6300
+ }
6301
  }
6302
+
6303
  /** JSDoc */
6304
  function instrumentConsole() {
6305
+ if (!('console' in global)) {
6306
+ return;
6307
+ }
6308
+
6309
+ _logger_js__WEBPACK_IMPORTED_MODULE_1__/* .CONSOLE_LEVELS.forEach */ .RU.forEach(function (level) {
6310
+ if (!(level in global.console)) {
6311
+ return;
6312
  }
6313
+
6314
+ (0,_object_js__WEBPACK_IMPORTED_MODULE_3__/* .fill */ .hl)(global.console, level, function (originalConsoleMethod) {
6315
+ return function (...args) {
6316
+ triggerHandlers('console', { args, level });
6317
+
6318
+ // this fails for some browsers. :(
6319
+ if (originalConsoleMethod) {
6320
+ originalConsoleMethod.apply(global.console, args);
6321
  }
6322
+ };
 
 
 
 
 
 
 
 
 
 
 
 
6323
  });
6324
+ });
6325
  }
6326
+
6327
  /** JSDoc */
6328
  function instrumentFetch() {
6329
+ if (!(0,_supports_js__WEBPACK_IMPORTED_MODULE_4__/* .supportsNativeFetch */ .t$)()) {
6330
+ return;
6331
+ }
6332
+
6333
+ (0,_object_js__WEBPACK_IMPORTED_MODULE_3__/* .fill */ .hl)(global, 'fetch', function (originalFetch) {
6334
+ return function (...args) {
6335
+ var handlerData = {
6336
+ args,
6337
+ fetchData: {
6338
+ method: getFetchMethod(args),
6339
+ url: getFetchUrl(args),
6340
+ },
6341
+ startTimestamp: Date.now(),
6342
+ };
6343
+
6344
+ triggerHandlers('fetch', {
6345
+ ...handlerData,
6346
+ });
6347
+
6348
+ return originalFetch.apply(global, args).then(
6349
+ (response) => {
6350
+ triggerHandlers('fetch', {
6351
+ ...handlerData,
6352
+ endTimestamp: Date.now(),
6353
+ response,
6354
+ });
6355
+ return response;
6356
+ },
6357
+ (error) => {
6358
+ triggerHandlers('fetch', {
6359
+ ...handlerData,
6360
+ endTimestamp: Date.now(),
6361
+ error,
6362
+ });
6363
+ // NOTE: If you are a Sentry user, and you are seeing this stack frame,
6364
+ // it means the sentry.javascript SDK caught an error invoking your application code.
6365
+ // This is expected behavior and NOT indicative of a bug with sentry.javascript.
6366
+ throw error;
6367
+ },
6368
+ );
6369
+ };
6370
+ });
6371
  }
6372
+
6373
  /** Extract `method` from fetch call arguments */
6374
+ function getFetchMethod(fetchArgs = []) {
6375
+ if ('Request' in global && (0,_is_js__WEBPACK_IMPORTED_MODULE_5__/* .isInstanceOf */ .V9)(fetchArgs[0], Request) && fetchArgs[0].method) {
6376
+ return String(fetchArgs[0].method).toUpperCase();
6377
+ }
6378
+ if (fetchArgs[1] && fetchArgs[1].method) {
6379
+ return String(fetchArgs[1].method).toUpperCase();
6380
+ }
6381
+ return 'GET';
 
6382
  }
6383
+
6384
  /** Extract `url` from fetch call arguments */
6385
+ function getFetchUrl(fetchArgs = []) {
6386
+ if (typeof fetchArgs[0] === 'string') {
6387
+ return fetchArgs[0];
6388
+ }
6389
+ if ('Request' in global && (0,_is_js__WEBPACK_IMPORTED_MODULE_5__/* .isInstanceOf */ .V9)(fetchArgs[0], Request)) {
6390
+ return fetchArgs[0].url;
6391
+ }
6392
+ return String(fetchArgs[0]);
 
6393
  }
6394
+
6395
  /** JSDoc */
6396
  function instrumentXHR() {
6397
+ if (!('XMLHttpRequest' in global)) {
6398
+ return;
6399
+ }
6400
+
6401
+ var xhrproto = XMLHttpRequest.prototype;
6402
+
6403
+ (0,_object_js__WEBPACK_IMPORTED_MODULE_3__/* .fill */ .hl)(xhrproto, 'open', function (originalOpen) {
6404
+ return function ( ...args) {
 
 
 
6405
  var xhr = this;
6406
+ var url = args[1];
6407
+ var xhrInfo = (xhr.__sentry_xhr__ = {
6408
+ method: (0,_is_js__WEBPACK_IMPORTED_MODULE_5__/* .isString */ .HD)(args[0]) ? args[0].toUpperCase() : args[0],
6409
+ url: args[1],
6410
+ });
6411
+
6412
+ // if Sentry key appears in URL, don't capture it as a request
6413
+ if ((0,_is_js__WEBPACK_IMPORTED_MODULE_5__/* .isString */ .HD)(url) && xhrInfo.method === 'POST' && url.match(/sentry_key/)) {
6414
+ xhr.__sentry_own_request__ = true;
6415
+ }
6416
+
6417
+ var onreadystatechangeHandler = function () {
6418
+ if (xhr.readyState === 4) {
6419
+ try {
6420
+ // touching statusCode in some platforms throws
6421
+ // an exception
6422
+ xhrInfo.status_code = xhr.status;
6423
+ } catch (e) {
6424
+ /* do nothing */
6425
+ }
6426
+
6427
+ triggerHandlers('xhr', {
6428
+ args,
6429
+ endTimestamp: Date.now(),
6430
+ startTimestamp: Date.now(),
6431
+ xhr,
6432
+ });
6433
+ }
6434
+ };
6435
+
6436
+ if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {
6437
+ (0,_object_js__WEBPACK_IMPORTED_MODULE_3__/* .fill */ .hl)(xhr, 'onreadystatechange', function (original) {
6438
+ return function (...readyStateArgs) {
6439
+ onreadystatechangeHandler();
6440
+ return original.apply(xhr, readyStateArgs);
6441
+ };
6442
+ });
6443
+ } else {
6444
+ xhr.addEventListener('readystatechange', onreadystatechangeHandler);
6445
+ }
6446
+
6447
+ return originalOpen.apply(xhr, args);
6448
+ };
6449
+ });
6450
+
6451
+ (0,_object_js__WEBPACK_IMPORTED_MODULE_3__/* .fill */ .hl)(xhrproto, 'send', function (originalSend) {
6452
+ return function ( ...args) {
6453
+ if (this.__sentry_xhr__ && args[0] !== undefined) {
6454
+ this.__sentry_xhr__.body = args[0];
6455
+ }
6456
+
6457
+ triggerHandlers('xhr', {
6458
+ args,
6459
+ startTimestamp: Date.now(),
6460
+ xhr: this,
6461
+ });
6462
+
6463
+ return originalSend.apply(this, args);
6464
+ };
6465
+ });
 
 
 
 
6466
  }
6467
+
6468
+ let lastHref;
6469
+
6470
  /** JSDoc */
6471
  function instrumentHistory() {
6472
+ if (!(0,_supports_js__WEBPACK_IMPORTED_MODULE_4__/* .supportsHistory */ .Bf)()) {
6473
+ return;
6474
+ }
6475
+
6476
+ var oldOnPopState = global.onpopstate;
6477
+ global.onpopstate = function ( ...args) {
6478
+ var to = global.location.href;
6479
+ // keep track of the current URL state, as we always receive only the updated state
6480
+ var from = lastHref;
6481
+ lastHref = to;
6482
+ triggerHandlers('history', {
6483
+ from,
6484
+ to,
6485
+ });
6486
+ if (oldOnPopState) {
6487
+ // Apparently this can throw in Firefox when incorrectly implemented plugin is installed.
6488
+ // https://github.com/getsentry/sentry-javascript/issues/3344
6489
+ // https://github.com/bugsnag/bugsnag-js/issues/469
6490
+ try {
6491
+ return oldOnPopState.apply(this, args);
6492
+ } catch (_oO) {
6493
+ // no-empty
6494
+ }
6495
  }
6496
+ };
6497
+
6498
+ /** @hidden */
6499
+ function historyReplacementFunction(originalHistoryFunction) {
6500
+ return function ( ...args) {
6501
+ var url = args.length > 2 ? args[2] : undefined;
6502
+ if (url) {
6503
+ // coerce to string (this is what pushState does)
6504
  var from = lastHref;
6505
+ var to = String(url);
6506
+ // keep track of the current URL state, as we always receive only the updated state
6507
  lastHref = to;
6508
  triggerHandlers('history', {
6509
+ from,
6510
+ to,
6511
  });
6512
+ }
6513
+ return originalHistoryFunction.apply(this, args);
 
 
 
 
 
 
 
 
 
6514
  };
6515
+ }
6516
+
6517
+ (0,_object_js__WEBPACK_IMPORTED_MODULE_3__/* .fill */ .hl)(global.history, 'pushState', historyReplacementFunction);
6518
+ (0,_object_js__WEBPACK_IMPORTED_MODULE_3__/* .fill */ .hl)(global.history, 'replaceState', historyReplacementFunction);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6519
  }
6520
+
6521
  var debounceDuration = 1000;
6522
+ let debounceTimerID;
6523
+ let lastCapturedEvent;
6524
+
6525
  /**
6526
  * Decide whether the current event should finish the debounce of previously captured one.
6527
  * @param previous previously captured event
6528
  * @param current event to be captured
6529
  */
6530
  function shouldShortcircuitPreviousDebounce(previous, current) {
6531
+ // If there was no previous event, it should always be swapped for the new one.
6532
+ if (!previous) {
6533
+ return true;
6534
+ }
6535
+
6536
+ // If both events have different type, then user definitely performed two separate actions. e.g. click + keypress.
6537
+ if (previous.type !== current.type) {
6538
+ return true;
6539
+ }
6540
+
6541
+ try {
6542
+ // If both events have the same type, it's still possible that actions were performed on different targets.
6543
+ // e.g. 2 clicks on different buttons.
6544
+ if (previous.target !== current.target) {
6545
+ return true;
 
 
 
6546
  }
6547
+ } catch (e) {
6548
+ // just accessing `target` property can throw an exception in some rare circumstances
6549
+ // see: https://github.com/getsentry/sentry-javascript/issues/838
6550
+ }
6551
+
6552
+ // If both events have the same type _and_ same `target` (an element which triggered an event, _not necessarily_
6553
+ // to which an event listener was attached), we treat them as the same action, as we want to capture
6554
+ // only one breadcrumb. e.g. multiple clicks on the same button, or typing inside a user input box.
6555
+ return false;
6556
  }
6557
+
6558
  /**
6559
  * Decide whether an event should be captured.
6560
  * @param event event to be captured
6561
  */
6562
  function shouldSkipDOMEvent(event) {
6563
+ // We are only interested in filtering `keypress` events for now.
6564
+ if (event.type !== 'keypress') {
6565
+ return false;
6566
+ }
6567
+
6568
+ try {
6569
+ var target = event.target ;
6570
+
6571
+ if (!target || !target.tagName) {
6572
+ return true;
 
 
 
 
6573
  }
6574
+
6575
+ // Only consider keypress events on actual input elements. This will disregard keypresses targeting body
6576
+ // e.g.tabbing through elements, hotkeys, etc.
6577
+ if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable) {
6578
+ return false;
6579
  }
6580
+ } catch (e) {
6581
+ // just accessing `target` property can throw an exception in some rare circumstances
6582
+ // see: https://github.com/getsentry/sentry-javascript/issues/838
6583
+ }
6584
+
6585
+ return true;
6586
  }
6587
+
6588
  /**
6589
  * Wraps addEventListener to capture UI breadcrumbs
6590
  * @param handler function that will be triggered
6592
  * @returns wrapped breadcrumb events handler
6593
  * @hidden
6594
  */
6595
+ function makeDOMEventHandler(handler, globalListener = false) {
6596
+ return (event) => {
6597
+ // It's possible this handler might trigger multiple times for the same
6598
+ // event (e.g. event propagation through node ancestors).
6599
+ // Ignore if we've already captured that event.
6600
+ if (!event || lastCapturedEvent === event) {
6601
+ return;
6602
+ }
6603
+
6604
+ // We always want to skip _some_ events.
6605
+ if (shouldSkipDOMEvent(event)) {
6606
+ return;
6607
+ }
6608
+
6609
+ var name = event.type === 'keypress' ? 'input' : event.type;
6610
+
6611
+ // If there is no debounce timer, it means that we can safely capture the new event and store it for future comparisons.
6612
+ if (debounceTimerID === undefined) {
6613
+ handler({
6614
+ event: event,
6615
+ name,
6616
+ global: globalListener,
6617
+ });
6618
+ lastCapturedEvent = event;
6619
+ }
6620
+ // If there is a debounce awaiting, see if the new event is different enough to treat it as a unique one.
6621
+ // If that's the case, emit the previous event and store locally the newly-captured DOM event.
6622
+ else if (shouldShortcircuitPreviousDebounce(lastCapturedEvent, event)) {
6623
+ handler({
6624
+ event: event,
6625
+ name,
6626
+ global: globalListener,
6627
+ });
6628
+ lastCapturedEvent = event;
6629
+ }
6630
+
6631
+ // Start a new debounce timer that will prevent us from capturing multiple events that should be grouped together.
6632
+ clearTimeout(debounceTimerID);
6633
+ debounceTimerID = global.setTimeout(() => {
6634
+ debounceTimerID = undefined;
6635
+ }, debounceDuration);
6636
+ };
6637
  }
6638
+
6639
  /** JSDoc */
6640
  function instrumentDOM() {
6641
+ if (!('document' in global)) {
6642
+ return;
6643
+ }
6644
+
6645
+ // Make it so that any click or keypress that is unhandled / bubbled up all the way to the document triggers our dom
6646
+ // handlers. (Normally we have only one, which captures a breadcrumb for each click or keypress.) Do this before
6647
+ // we instrument `addEventListener` so that we don't end up attaching this handler twice.
6648
+ var triggerDOMHandler = triggerHandlers.bind(null, 'dom');
6649
+ var globalDOMEventHandler = makeDOMEventHandler(triggerDOMHandler, true);
6650
+ global.document.addEventListener('click', globalDOMEventHandler, false);
6651
+ global.document.addEventListener('keypress', globalDOMEventHandler, false);
6652
+
6653
+ // After hooking into click and keypress events bubbled up to `document`, we also hook into user-handled
6654
+ // clicks & keypresses, by adding an event listener of our own to any element to which they add a listener. That
6655
+ // way, whenever one of their handlers is triggered, ours will be, too. (This is needed because their handler
6656
+ // could potentially prevent the event from bubbling up to our global listeners. This way, our handler are still
6657
+ // guaranteed to fire at least once.)
6658
+ ['EventTarget', 'Node'].forEach((target) => {
6659
+ var proto = (global )[target] && (global )[target].prototype;
6660
  if (!proto || !proto.hasOwnProperty || !proto.hasOwnProperty('addEventListener')) {
6661
+ return;
6662
+ }
6663
+
6664
+ (0,_object_js__WEBPACK_IMPORTED_MODULE_3__/* .fill */ .hl)(proto, 'addEventListener', function (originalAddEventListener) {
6665
+ return function (
6666
+
6667
+ type,
6668
+ listener,
6669
+ options,
6670
+ ) {
6671
+ if (type === 'click' || type == 'keypress') {
6672
+ try {
6673
+ var el = this ;
6674
+ var handlers = (el.__sentry_instrumentation_handlers__ = el.__sentry_instrumentation_handlers__ || {});
6675
+ var handlerForType = (handlers[type] = handlers[type] || { refCount: 0 });
6676
+
6677
+ if (!handlerForType.handler) {
6678
+ var handler = makeDOMEventHandler(triggerDOMHandler);
6679
+ handlerForType.handler = handler;
6680
+ originalAddEventListener.call(this, type, handler, options);
6681
+ }
6682
+
6683
+ handlerForType.refCount += 1;
6684
+ } catch (e) {
6685
+ // Accessing dom properties is always fragile.
6686
+ // Also allows us to skip `addEventListenrs` calls with no proper `this` context.
6687
+ }
6688
  }
6689
+
6690
+ return originalAddEventListener.call(this, type, listener, options);
6691
+ };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6692
  });
6693
+
6694
+ (0,_object_js__WEBPACK_IMPORTED_MODULE_3__/* .fill */ .hl)(
6695
+ proto,
6696
+ 'removeEventListener',
6697
+ function (originalRemoveEventListener) {
6698
+ return function (
6699
+
6700
+ type,
6701
+ listener,
6702
+ options,
6703
+ ) {
6704
+ if (type === 'click' || type == 'keypress') {
6705
+ try {
6706
+ var el = this ;
6707
+ var handlers = el.__sentry_instrumentation_handlers__ || {};
6708
+ var handlerForType = handlers[type];
6709
+
6710
+ if (handlerForType) {
6711
+ handlerForType.refCount -= 1;
6712
+ // If there are no longer any custom handlers of the current type on this element, we can remove ours, too.
6713
+ if (handlerForType.refCount <= 0) {
6714
+ originalRemoveEventListener.call(this, type, handlerForType.handler, options);
6715
+ handlerForType.handler = undefined;
6716
+ delete handlers[type]; }
6717
+
6718
+ // If there are no longer any custom handlers of any type on this element, cleanup everything.
6719
+ if (Object.keys(handlers).length === 0) {
6720
+ delete el.__sentry_instrumentation_handlers__;
6721
+ }
6722
+ }
6723
+ } catch (e) {
6724
+ // Accessing dom properties is always fragile.
6725
+ // Also allows us to skip `addEventListenrs` calls with no proper `this` context.
6726
+ }
6727
+ }
6728
+
6729
+ return originalRemoveEventListener.call(this, type, listener, options);
6730
+ };
6731
+ },
6732
+ );
6733
+ });
6734
  }
6735
+
6736
+ let _oldOnErrorHandler = null;
6737
  /** JSDoc */
6738
  function instrumentError() {
6739
+ _oldOnErrorHandler = global.onerror;
6740
+
6741
+ global.onerror = function (msg, url, line, column, error) {
6742
+ triggerHandlers('error', {
6743
+ column,
6744
+ error,
6745
+ line,
6746
+ msg,
6747
+ url,
6748
+ });
6749
+
6750
+ if (_oldOnErrorHandler) {
6751
  return _oldOnErrorHandler.apply(this, arguments);
6752
+ }
6753
+
6754
+ return false;
6755
+ };
6756
  }
6757
+
6758
+ let _oldOnUnhandledRejectionHandler = null;
6759
  /** JSDoc */
6760
  function instrumentUnhandledRejection() {
6761
+ _oldOnUnhandledRejectionHandler = global.onunhandledrejection;
6762
+
6763
+ global.onunhandledrejection = function (e) {
6764
+ triggerHandlers('unhandledrejection', e);
6765
+
6766
+ if (_oldOnUnhandledRejectionHandler) {
6767
  return _oldOnUnhandledRejectionHandler.apply(this, arguments);
6768
+ }
6769
+
6770
+ return true;
6771
+ };
6772
  }
6773
+
6774
+
6775
  //# sourceMappingURL=instrument.js.map
6776
 
6777
+
6778
  /***/ }),
6779
 
6780
  /***/ 1757:
6781
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
6782
 
6783
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
 
 
6784
  /* harmony export */ "TX": function() { return /* binding */ isDOMError; },
6785
  /* harmony export */ "fm": function() { return /* binding */ isDOMException; },
 
 
 
 
6786
  /* harmony export */ "kK": function() { return /* binding */ isElement; },
6787
+ /* harmony export */ "VZ": function() { return /* binding */ isError; },
6788
+ /* harmony export */ "VW": function() { return /* binding */ isErrorEvent; },
6789
+ /* harmony export */ "cO": function() { return /* binding */ isEvent; },
6790
+ /* harmony export */ "V9": function() { return /* binding */ isInstanceOf; },
6791
+ /* harmony export */ "i2": function() { return /* binding */ isNaN; },
6792
+ /* harmony export */ "PO": function() { return /* binding */ isPlainObject; },
6793
+ /* harmony export */ "pt": function() { return /* binding */ isPrimitive; },
6794
  /* harmony export */ "Kj": function() { return /* binding */ isRegExp; },
6795
+ /* harmony export */ "HD": function() { return /* binding */ isString; },
6796
  /* harmony export */ "Cy": function() { return /* binding */ isSyntheticEvent; },
6797
+ /* harmony export */ "J8": function() { return /* binding */ isThenable; }
 
6798
  /* harmony export */ });
 
 
 
6799
  var objectToString = Object.prototype.toString;
6800
+
6801
  /**
6802
  * Checks whether given value's type is one of a few Error or Error-like
6803
  * {@link isError}.
6806
  * @returns A boolean representing the result.
6807
  */
6808
  function isError(wat) {
6809
+ switch (objectToString.call(wat)) {
6810
+ case '[object Error]':
6811
+ case '[object Exception]':
6812
+ case '[object DOMException]':
6813
+ return true;
6814
+ default:
6815
+ return isInstanceOf(wat, Error);
6816
+ }
6817
  }
6818
+
6819
  function isBuiltin(wat, ty) {
6820
+ return objectToString.call(wat) === `[object ${ty}]`;
6821
  }
6822
+
6823
  /**
6824
  * Checks whether given value's type is ErrorEvent
6825
  * {@link isErrorEvent}.
6828
  * @returns A boolean representing the result.
6829
  */
6830
  function isErrorEvent(wat) {
6831
+ return isBuiltin(wat, 'ErrorEvent');
6832
  }
6833
+
6834
  /**
6835
  * Checks whether given value's type is DOMError
6836
  * {@link isDOMError}.
6839
  * @returns A boolean representing the result.
6840
  */
6841
  function isDOMError(wat) {
6842
+ return isBuiltin(wat, 'DOMError');
6843
  }
6844
+
6845
  /**
6846
  * Checks whether given value's type is DOMException
6847
  * {@link isDOMException}.
6850
  * @returns A boolean representing the result.
6851
  */
6852
  function isDOMException(wat) {
6853
+ return isBuiltin(wat, 'DOMException');
6854
  }
6855
+
6856
  /**
6857
  * Checks whether given value's type is a string
6858
  * {@link isString}.
6861
  * @returns A boolean representing the result.
6862
  */
6863
  function isString(wat) {
6864
+ return isBuiltin(wat, 'String');
6865
  }
6866
+
6867
  /**
6868
  * Checks whether given value is a primitive (undefined, null, number, boolean, string, bigint, symbol)
6869
  * {@link isPrimitive}.
6872
  * @returns A boolean representing the result.
6873
  */
6874
  function isPrimitive(wat) {
6875
+ return wat === null || (typeof wat !== 'object' && typeof wat !== 'function');
6876
  }
6877
+
6878
  /**
6879
  * Checks whether given value's type is an object literal
6880
  * {@link isPlainObject}.
6883
  * @returns A boolean representing the result.
6884
  */
6885
  function isPlainObject(wat) {
6886
+ return isBuiltin(wat, 'Object');
6887
  }
6888
+
6889
  /**
6890
  * Checks whether given value's type is an Event instance
6891
  * {@link isEvent}.
6894
  * @returns A boolean representing the result.
6895
  */
6896
  function isEvent(wat) {
6897
+ return typeof Event !== 'undefined' && isInstanceOf(wat, Event);
6898
  }
6899
+
6900
  /**
6901
  * Checks whether given value's type is an Element instance
6902
  * {@link isElement}.
6905
  * @returns A boolean representing the result.
6906
  */
6907
  function isElement(wat) {
6908
+ return typeof Element !== 'undefined' && isInstanceOf(wat, Element);
6909
  }
6910
+
6911
  /**
6912
  * Checks whether given value's type is an regexp
6913
  * {@link isRegExp}.
6916
  * @returns A boolean representing the result.
6917
  */
6918
  function isRegExp(wat) {
6919
+ return isBuiltin(wat, 'RegExp');
6920
  }
6921
+
6922
  /**
6923
  * Checks whether given value has a then function.
6924
  * @param wat A value to be checked.
6925
  */
6926
  function isThenable(wat) {
 
6927
  return Boolean(wat && wat.then && typeof wat.then === 'function');
6928
  }
6929
+
6930
  /**
6931
  * Checks whether given value's type is a SyntheticEvent
6932
  * {@link isSyntheticEvent}.
6935
  * @returns A boolean representing the result.
6936
  */
6937
  function isSyntheticEvent(wat) {
6938
+ return isPlainObject(wat) && 'nativeEvent' in wat && 'preventDefault' in wat && 'stopPropagation' in wat;
6939
  }
6940
+
6941
  /**
6942
  * Checks whether given value is NaN
6943
  * {@link isNaN}.
6946
  * @returns A boolean representing the result.
6947
  */
6948
  function isNaN(wat) {
6949
+ return typeof wat === 'number' && wat !== wat;
6950
  }
6951
+
6952
  /**
6953
  * Checks whether given value's type is an instance of provided constructor.
6954
  * {@link isInstanceOf}.
6958
  * @returns A boolean representing the result.
6959
  */
6960
  function isInstanceOf(wat, base) {
6961
+ try {
6962
+ return wat instanceof base;
6963
+ } catch (_e) {
6964
+ return false;
6965
+ }
 
6966
  }
6967
+
6968
+
6969
  //# sourceMappingURL=is.js.map
6970
 
6971
+
6972
  /***/ }),
6973
 
6974
  /***/ 8536:
6979
  /* harmony export */ "Cf": function() { return /* binding */ consoleSandbox; },
6980
  /* harmony export */ "kg": function() { return /* binding */ logger; }
6981
  /* harmony export */ });
6982
+ /* harmony import */ var _global_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
 
 
 
6983
 
6984
 
6985
  // TODO: Implement different loggers for different environments
6986
+ var global = (0,_global_js__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
6987
+
6988
  /** Prefix for logging strings */
6989
  var PREFIX = 'Sentry Logger ';
6990
+
6991
+ var CONSOLE_LEVELS = ['debug', 'info', 'warn', 'error', 'log', 'assert', 'trace'] ;
6992
+
6993
  /**
6994
  * Temporarily disable sentry console instrumentations.
6995
  *
6997
  * @returns The results of the callback
6998
  */
6999
  function consoleSandbox(callback) {
7000
+ var global = (0,_global_js__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
7001
+
7002
+ if (!('console' in global)) {
7003
+ return callback();
7004
+ }
7005
+
7006
+ var originalConsole = global.console ;
7007
+ var wrappedLevels = {};
7008
+
7009
+ // Restore all wrapped console methods
7010
+ CONSOLE_LEVELS.forEach(level => {
7011
+ // TODO(v7): Remove this check as it's only needed for Node 6
7012
+ var originalWrappedFunc =
7013
+ originalConsole[level] && (originalConsole[level] ).__sentry_original__;
7014
+ if (level in global.console && originalWrappedFunc) {
7015
+ wrappedLevels[level] = originalConsole[level] ;
7016
+ originalConsole[level] = originalWrappedFunc ;
7017
+ }
7018
+ });
7019
+
7020
+ try {
7021
+ return callback();
7022
+ } finally {
7023
+ // Revert restoration to wrapped state
7024
+ Object.keys(wrappedLevels).forEach(level => {
7025
+ originalConsole[level] = wrappedLevels[level ];
7026
  });
7027
+ }
 
 
 
 
 
 
 
 
7028
  }
7029
+
7030
  function makeLogger() {
7031
+ let enabled = false;
7032
+ var logger = {
7033
+ enable: () => {
7034
+ enabled = true;
7035
+ },
7036
+ disable: () => {
7037
+ enabled = false;
7038
+ },
7039
+ };
7040
+
7041
+ if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {
7042
+ CONSOLE_LEVELS.forEach(name => {
7043
+ logger[name] = (...args) => {
7044
+ if (enabled) {
7045
+ consoleSandbox(() => {
7046
+ global.console[name](`${PREFIX}[${name}]:`, ...args);
7047
+ });
7048
+ }
7049
+ };
7050
+ });
7051
+ } else {
7052
+ CONSOLE_LEVELS.forEach(name => {
7053
+ logger[name] = () => undefined;
7054
+ });
7055
+ }
7056
+
7057
+ return logger ;
 
 
 
 
 
7058
  }
7059
+
7060
  // Ensure we only have a single logger instance, even if multiple versions of @sentry/utils are being used
7061
+ let logger;
7062
+ if ((typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__)) {
7063
+ logger = (0,_global_js__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalSingleton */ .Y)('logger', makeLogger);
7064
+ } else {
7065
+ logger = makeLogger();
 
7066
  }
7067
 
7068
+
7069
  //# sourceMappingURL=logger.js.map
7070
 
7071
+
7072
  /***/ }),
7073
 
7074
  /***/ 4048:
7077
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7078
  /* harmony export */ "i": function() { return /* binding */ memoBuilder; }
7079
  /* harmony export */ });
 
 
7080
  /**
7081
  * Helper to decycle json objects
7082
  */
7083
  function memoBuilder() {
7084
+ var hasWeakSet = typeof WeakSet === 'function';
7085
+ var inner = hasWeakSet ? new WeakSet() : [];
7086
+ function memoize(obj) {
7087
+ if (hasWeakSet) {
7088
+ if (inner.has(obj)) {
7089
+ return true;
7090
+ }
7091
+ inner.add(obj);
7092
+ return false;
 
 
 
 
 
 
 
 
 
 
7093
  }
7094
+ for (let i = 0; i < inner.length; i++) {
7095
+ var value = inner[i];
7096
+ if (value === obj) {
7097
+ return true;
7098
+ }
7099
+ }
7100
+ inner.push(obj);
7101
+ return false;
7102
+ }
7103
+
7104
+ function unmemoize(obj) {
7105
+ if (hasWeakSet) {
7106
+ inner.delete(obj);
7107
+ } else {
7108
+ for (let i = 0; i < inner.length; i++) {
7109
+ if (inner[i] === obj) {
7110
+ inner.splice(i, 1);
7111
+ break;
7112
  }
7113
+ }
7114
  }
7115
+ }
7116
+ return [memoize, unmemoize];
7117
  }
7118
+
7119
+
7120
  //# sourceMappingURL=memo.js.map
7121
 
7122
+
7123
  /***/ }),
7124
 
7125
  /***/ 3699:
7126
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7127
 
7128
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
 
 
 
 
7129
  /* harmony export */ "EG": function() { return /* binding */ addExceptionMechanism; },
7130
+ /* harmony export */ "Db": function() { return /* binding */ addExceptionTypeValue; },
7131
+ /* harmony export */ "YO": function() { return /* binding */ checkOrSetAlreadyCaught; },
7132
+ /* harmony export */ "jH": function() { return /* binding */ getEventDescription; },
7133
+ /* harmony export */ "en": function() { return /* binding */ parseUrl; },
7134
+ /* harmony export */ "DM": function() { return /* binding */ uuid4; }
7135
  /* harmony export */ });
7136
+ /* unused harmony exports addContextToFrame, parseSemver, stripUrlQueryAndFragment */
7137
+ /* harmony import */ var _global_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
7138
+ /* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1995);
 
7139
 
7140
 
7141
 
7142
 
7143
+ /**
7144
+ * Extended Window interface that allows for Crypto API usage in IE browsers
7145
+ */
7146
+
7147
  /**
7148
  * UUID4 generator
7149
  *
7150
  * @returns string Generated UUID4.
7151
  */
7152
  function uuid4() {
7153
+ var global = (0,_global_js__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)() ;
7154
+ var crypto = global.crypto || global.msCrypto;
7155
+
7156
+ if (!(crypto === void 0) && crypto.getRandomValues) {
7157
+ // Use window.crypto API if available
7158
+ var arr = new Uint16Array(8);
7159
+ crypto.getRandomValues(arr);
7160
+
7161
+ // set 4 in byte 7
7162
  arr[3] = (arr[3] & 0xfff) | 0x4000;
7163
+ // set 2 most significant bits of byte 9 to '10'
 
7164
  arr[4] = (arr[4] & 0x3fff) | 0x8000;
7165
+
7166
+ var pad = (num) => {
7167
+ let v = num.toString(16);
7168
+ while (v.length < 4) {
7169
+ v = `0${v}`;
7170
+ }
7171
+ return v;
7172
+ };
7173
+
7174
+ return (
7175
+ pad(arr[0]) + pad(arr[1]) + pad(arr[2]) + pad(arr[3]) + pad(arr[4]) + pad(arr[5]) + pad(arr[6]) + pad(arr[7])
7176
+ );
7177
+ }
7178
+ // http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
7179
+ return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, c => {
7180
  var r = (Math.random() * 16) | 0;
 
7181
  var v = c === 'x' ? r : (r & 0x3) | 0x8;
7182
+ return v.toString(16);
7183
+ });
7184
  }
7185
+
7186
  /**
7187
  * Parses string form of URL into an object
7188
  * // borrowed from https://tools.ietf.org/html/rfc3986#appendix-B
7190
  * // environments where DOM might not be available
7191
  * @returns parsed URL object
7192
  */
7193
+ function parseUrl(url)
7194
+
7195
+ {
7196
+ if (!url) {
7197
+ return {};
7198
+ }
7199
+
7200
+ var match = url.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
7201
+
7202
+ if (!match) {
7203
+ return {};
7204
+ }
7205
+
7206
+ // coerce to undefined values to empty string so we don't get 'undefined'
7207
+ var query = match[6] || '';
7208
+ var fragment = match[8] || '';
7209
+ return {
7210
+ host: match[4],
7211
+ path: match[5],
7212
+ protocol: match[2],
7213
+ relative: match[5] + query + fragment, // everything minus origin
7214
+ };
7215
  }
7216
+
7217
  function getFirstException(event) {
7218
+ return event.exception && event.exception.values ? event.exception.values[0] : undefined;
7219
  }
7220
+
7221
  /**
7222
  * Extracts either message or type+value from an event that can be used for user-facing logs
7223
  * @returns event's description
7224
  */
7225
  function getEventDescription(event) {
7226
+ const { message, event_id: eventId } = event;
7227
+ if (message) {
7228
+ return message;
7229
+ }
7230
+
7231
+ var firstException = getFirstException(event);
7232
+ if (firstException) {
7233
+ if (firstException.type && firstException.value) {
7234
+ return `${firstException.type}: ${firstException.value}`;
 
7235
  }
7236
+ return firstException.type || firstException.value || eventId || '<unknown>';
7237
+ }
7238
+ return eventId || '<unknown>';
7239
  }
7240
+
7241
  /**
7242
  * Adds exception values, type and value to an synthetic Exception.
7243
  * @param event The event to modify.
7246
  * @hidden
7247
  */
7248
  function addExceptionTypeValue(event, value, type) {
7249
+ var exception = (event.exception = event.exception || {});
7250
+ var values = (exception.values = exception.values || []);
7251
+ var firstException = (values[0] = values[0] || {});
7252
+ if (!firstException.value) {
7253
+ firstException.value = value || '';
7254
+ }
7255
+ if (!firstException.type) {
7256
+ firstException.type = type || 'Error';
7257
+ }
7258
  }
7259
+
7260
  /**
7261
  * Adds exception mechanism data to a given event. Uses defaults if the second parameter is not passed.
7262
  *
7265
  * @hidden
7266
  */
7267
  function addExceptionMechanism(event, newMechanism) {
7268
+ var firstException = getFirstException(event);
7269
+ if (!firstException) {
7270
+ return;
7271
+ }
7272
+
7273
+ var defaultMechanism = { type: 'generic', handled: true };
7274
+ var currentMechanism = firstException.mechanism;
7275
+ firstException.mechanism = { ...defaultMechanism, ...currentMechanism, ...newMechanism };
7276
+
7277
+ if (newMechanism && 'data' in newMechanism) {
7278
+ var mergedData = { ...(currentMechanism && currentMechanism.data), ...newMechanism.data };
7279
+ firstException.mechanism.data = mergedData;
7280
+ }
7281
  }
7282
+
7283
  // https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
7284
+ var SEMVER_REGEXP =
7285
+ /^(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-]+)*))?$/;
7286
+
7287
+ /**
7288
+ * Represents Semantic Versioning object
7289
+ */
7290
+
7291
  /**
7292
  * Parses input into a SemVer interface
7293
  * @param input string representation of a semver version
7294
  */
7295
  function parseSemver(input) {
7296
+ var match = input.match(SEMVER_REGEXP) || [];
7297
+ var major = parseInt(match[1], 10);
7298
+ var minor = parseInt(match[2], 10);
7299
+ var patch = parseInt(match[3], 10);
7300
+ return {
7301
+ buildmetadata: match[5],
7302
+ major: isNaN(major) ? undefined : major,
7303
+ minor: isNaN(minor) ? undefined : minor,
7304
+ patch: isNaN(patch) ? undefined : patch,
7305
+ prerelease: match[4],
7306
+ };
7307
  }
7308
+
7309
  /**
7310
  * This function adds context (pre/post/line) lines to the provided frame
7311
  *
7313
  * @param frame StackFrame that will be mutated
7314
  * @param linesOfContext number of context lines we want to add pre/post
7315
  */
7316
+ function addContextToFrame(lines, frame, linesOfContext = 5) {
7317
+ var lineno = frame.lineno || 0;
7318
+ var maxLines = lines.length;
7319
+ var sourceLine = Math.max(Math.min(maxLines, lineno - 1), 0);
7320
+
7321
+ frame.pre_context = lines
7322
+ .slice(Math.max(0, sourceLine - linesOfContext), sourceLine)
7323
+ .map((line) => snipLine(line, 0));
7324
+
7325
+ frame.context_line = snipLine(lines[Math.min(maxLines - 1, sourceLine)], frame.colno || 0);
7326
+
7327
+ frame.post_context = lines
7328
+ .slice(Math.min(sourceLine + 1, maxLines), sourceLine + 1 + linesOfContext)
7329
+ .map((line) => snipLine(line, 0));
7330
  }
7331
+
7332
  /**
7333
  * Strip the query string and fragment off of a given URL or path (if present)
7334
  *
7336
  * @returns URL or path without query string or fragment
7337
  */
7338
  function stripUrlQueryAndFragment(urlPath) {
 
7339
  return urlPath.split(/[\?#]/, 1)[0];
7340
  }
7341
+
7342
  /**
7343
  * Checks whether or not we've already captured the given exception (note: not an identical exception - the very object
7344
  * in question), and marks it captured if not.
7361
  * @returns `true` if the exception has already been captured, `false` if not (with the side effect of marking it seen)
7362
  */
7363
  function checkOrSetAlreadyCaught(exception) {
7364
+ if (exception && (exception ).__sentry_captured__) {
7365
+ return true;
7366
+ }
7367
+
7368
+ try {
7369
+ // set it this way rather than by assignment so that it's not ennumerable and therefore isn't recorded by the
7370
+ // `ExtraErrorData` integration
7371
+ (0,_object_js__WEBPACK_IMPORTED_MODULE_1__/* .addNonEnumerableProperty */ .xp)(exception , '__sentry_captured__', true);
7372
+ } catch (err) {
7373
+ // `exception` is a primitive, so we can't mark it seen
7374
+ }
7375
+
7376
+ return false;
7377
  }
7378
+
7379
+
7380
  //# sourceMappingURL=misc.js.map
7381
 
7382
+
7383
  /***/ }),
7384
 
7385
  /***/ 7392:
7386
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
7387
 
7388
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
7389
+ /* harmony export */ "l$": function() { return /* binding */ dynamicRequire; },
7390
+ /* harmony export */ "KV": function() { return /* binding */ isNodeEnv; }
7391
  /* harmony export */ });
7392
  /* unused harmony export loadModule */
7393
+ /* harmony import */ var _env_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4285);
7394
  /* module decorator */ module = __webpack_require__.hmd(module);
7395
+
7396
+
7397
  /**
7398
  * NOTE: In order to avoid circular dependencies, if you add a function to this module and it needs to print something,
7399
  * you must either a) use `console.log` rather than the logger, or b) put your function elsewhere.
7405
  * @returns Answer to given question
7406
  */
7407
  function isNodeEnv() {
7408
+ // explicitly check for browser bundles as those can be optimized statically
7409
+ // by terser/rollup.
7410
+ return (
7411
+ !(0,_env_js__WEBPACK_IMPORTED_MODULE_0__/* .isBrowserBundle */ .n)() &&
7412
+ Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]'
7413
+ );
7414
  }
7415
+
7416
  /**
7417
  * Requires a module which is protected against bundler minification.
7418
  *
7419
  * @param request The module path to resolve
7420
  */
 
7421
  function dynamicRequire(mod, request) {
 
7422
  return mod.require(request);
7423
  }
7424
+
7425
  /**
7426
  * Helper for dynamically loading module that should work with linked dependencies.
7427
  * The problem is that we _should_ be using `require(require.resolve(moduleName, { paths: [cwd()] }))`
7436
  * @returns possibly required module
7437
  */
7438
  function loadModule(moduleName) {
7439
+ let mod;
7440
+
7441
+ try {
7442
+ mod = dynamicRequire(module, moduleName);
7443
+ } catch (e) {
7444
+ // no-empty
7445
+ }
7446
+
7447
+ try {
7448
+ const { cwd } = dynamicRequire(module, 'process');
7449
+ mod = dynamicRequire(module, `${cwd()}/node_modules/${moduleName}`) ;
7450
+ } catch (e) {
7451
+ // no-empty
7452
+ }
7453
+
7454
+ return mod;
7455
  }
7456
+
7457
+
7458
  //# sourceMappingURL=node.js.map
7459
 
7460
+
7461
  /***/ }),
7462
 
7463
  /***/ 8035:
7468
  /* harmony export */ "Qy": function() { return /* binding */ normalizeToSize; }
7469
  /* harmony export */ });
7470
  /* unused harmony export walk */
7471
+ /* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1757);
7472
+ /* harmony import */ var _memo_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4048);
7473
+ /* harmony import */ var _object_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1995);
7474
+ /* harmony import */ var _stacktrace_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9038);
 
7475
 
7476
 
7477
 
7496
  * object in the normallized output..
7497
  * @returns A normalized version of the object, or `"**non-serializable**"` if any errors are thrown during normalization.
7498
  */
7499
+ function normalize(input, depth = +Infinity, maxProperties = +Infinity) {
7500
+ try {
7501
+ // since we're at the outermost level, we don't provide a key
7502
+ return visit('', input, depth, maxProperties);
7503
+ } catch (err) {
7504
+ return { ERROR: `**non-serializable** (${err})` };
7505
+ }
 
 
 
7506
  }
7507
+
7508
  /** JSDoc */
7509
+ function normalizeToSize(
7510
+ object,
7511
+ // Default Node.js REPL depth
7512
+ depth = 3,
7513
+ // 100kB, as 200kB is max payload size, so half sounds reasonable
7514
+ maxSize = 100 * 1024,
7515
+ ) {
7516
+ var normalized = normalize(object, depth);
7517
+
7518
+ if (jsonSize(normalized) > maxSize) {
7519
+ return normalizeToSize(object, depth - 1, maxSize);
7520
+ }
7521
+
7522
+ return normalized ;
7523
  }
7524
+
7525
  /**
7526
  * Visits a node to perform normalization on it
7527
  *
7531
  * @param maxProperties Optional maximum number of properties/elements included in any single object/array
7532
  * @param memo Optional Memo class handling decycling
7533
  */
7534
+ function visit(
7535
+ key,
7536
+ value,
7537
+ depth = +Infinity,
7538
+ maxProperties = +Infinity,
7539
+ memo = (0,_memo_js__WEBPACK_IMPORTED_MODULE_0__/* .memoBuilder */ .i)(),
7540
+ ) {
7541
+ const [memoize, unmemoize] = memo;
7542
+
7543
+ // If the value has a `toJSON` method, see if we can bail and let it do the work
7544
+ var valueWithToJSON = value ;
7545
+ if (valueWithToJSON && typeof valueWithToJSON.toJSON === 'function') {
7546
+ try {
7547
+ return valueWithToJSON.toJSON();
7548
+ } catch (err) {
7549
+ // pass (The built-in `toJSON` failed, but we can still try to do it ourselves)
7550
  }
7551
+ }
7552
+
7553
+ // Get the simple cases out of the way first
7554
+ if (value === null || (['number', 'boolean', 'string'].includes(typeof value) && !(0,_is_js__WEBPACK_IMPORTED_MODULE_1__/* .isNaN */ .i2)(value))) {
7555
+ return value ;
7556
+ }
7557
+
7558
+ var stringified = stringifyValue(key, value);
7559
+
7560
+ // Anything we could potentially dig into more (objects or arrays) will have come back as `"[object XXXX]"`.
7561
+ // Everything else will have already been serialized, so if we don't see that pattern, we're done.
7562
+ if (!stringified.startsWith('[object ')) {
7563
+ return stringified;
7564
+ }
7565
+
7566
+ // From here on, we can assert that `value` is either an object or an array.
7567
+
7568
+ // Do not normalize objects that we know have already been normalized. As a general rule, the
7569
+ // "__sentry_skip_normalization__" property should only be used sparingly and only should only be set on objects that
7570
+ // have already been normalized.
7571
+ if ((value )['__sentry_skip_normalization__']) {
7572
+ return value ;
7573
+ }
7574
+
7575
+ // We're also done if we've reached the max depth
7576
+ if (depth === 0) {
7577
+ // At this point we know `serialized` is a string of the form `"[object XXXX]"`. Clean it up so it's just `"[XXXX]"`.
7578
+ return stringified.replace('object ', '');
7579
+ }
7580
+
7581
+ // If we've already visited this branch, bail out, as it's circular reference. If not, note that we're seeing it now.
7582
+ if (memoize(value)) {
7583
+ return '[Circular ~]';
7584
+ }
7585
+
7586
+ // At this point we know we either have an object or an array, we haven't seen it before, and we're going to recurse
7587
+ // because we haven't yet reached the max depth. Create an accumulator to hold the results of visiting each
7588
+ // property/entry, and keep track of the number of items we add to it.
7589
+ var normalized = (Array.isArray(value) ? [] : {}) ;
7590
+ let numAdded = 0;
7591
+
7592
+ // Before we begin, convert`Error` and`Event` instances into plain objects, since some of each of their relevant
7593
+ // properties are non-enumerable and otherwise would get missed.
7594
+ var visitable = (0,_object_js__WEBPACK_IMPORTED_MODULE_2__/* .convertToPlainObject */ .Sh)(value );
7595
+
7596
+ for (var visitKey in visitable) {
7597
+ // Avoid iterating over fields in the prototype if they've somehow been exposed to enumeration.
7598
+ if (!Object.prototype.hasOwnProperty.call(visitable, visitKey)) {
7599
+ continue;
7600
  }
7601
+
7602
+ if (numAdded >= maxProperties) {
7603
+ normalized[visitKey] = '[MaxProperties ~]';
7604
+ break;
7605
+ }
7606
+
7607
+ // Recursively visit all the child nodes
7608
+ var visitValue = visitable[visitKey];
7609
+ normalized[visitKey] = visit(visitKey, visitValue, depth - 1, maxProperties, memo);
7610
+
7611
+ numAdded += 1;
7612
+ }
7613
+
7614
+ // Once we've visited all the branches, remove the parent from memo storage
7615
+ unmemoize(value);
7616
+
7617
+ // Return accumulated values
7618
+ return normalized;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7619
  }
 
7620
 
7621
  /**
7622
  * Stringify the given value. Handles various known special values and types.
7627
  * @param value The value to stringify
7628
  * @returns A stringified representation of the given value
7629
  */
7630
+ function stringifyValue(
7631
+ key,
7632
+ // this type is a tiny bit of a cheat, since this function does handle NaN (which is technically a number), but for
7633
+ // our internal use, it'll do
7634
+ value,
7635
+ ) {
7636
+ try {
7637
+ if (key === 'domain' && value && typeof value === 'object' && (value )._events) {
7638
+ return '[Domain]';
7639
+ }
7640
+
7641
+ if (key === 'domainEmitter') {
7642
+ return '[DomainEmitter]';
7643
+ }
7644
+
7645
+ // It's safe to use `global`, `window`, and `document` here in this manner, as we are asserting using `typeof` first
7646
+ // which won't throw if they are not present.
7647
+
7648
+ if (typeof window !== 'undefined' && value === window) {
7649
+ return '[Global]';
7650
+ }
7651
+
7652
  if (typeof window !== 'undefined' && value === window) {
7653
+ return '[Window]';
7654
+ }
7655
+
7656
  if (typeof document !== 'undefined' && value === document) {
7657
+ return '[Document]';
7658
+ }
7659
+
7660
+ // React's SyntheticEvent thingy
7661
+ if ((0,_is_js__WEBPACK_IMPORTED_MODULE_1__/* .isSyntheticEvent */ .Cy)(value)) {
7662
+ return '[SyntheticEvent]';
7663
+ }
7664
+
7665
+ if (typeof value === 'number' && value !== value) {
7666
+ return '[NaN]';
7667
+ }
7668
+
7669
+ // this catches `undefined` (but not `null`, which is a primitive and can be serialized on its own)
7670
+ if (value === void 0) {
7671
+ return '[undefined]';
7672
+ }
7673
+
7674
+ if (typeof value === 'function') {
7675
+ return `[Function: ${(0,_stacktrace_js__WEBPACK_IMPORTED_MODULE_3__/* .getFunctionName */ .$P)(value)}]`;
7676
+ }
7677
+
7678
+ if (typeof value === 'symbol') {
7679
+ return `[${String(value)}]`;
 
 
 
 
 
7680
  }
7681
+
7682
+ // stringified BigInts are indistinguishable from regular numbers, so we need to label them to avoid confusion
7683
+ if (typeof value === 'bigint') {
7684
+ return `[BigInt: ${String(value)}]`;
7685
  }
7686
+
7687
+ // Now that we've knocked out all the special cases and the primitives, all we have left are objects. Simply casting
7688
+ // them to strings means that instances of classes which haven't defined their `toStringTag` will just come out as
7689
+ // `"[object Object]"`. If we instead look at the constructor's name (which is the same as the name of the class),
7690
+ // we can make sure that only plain objects come out that way.
7691
+ return `[object ${(Object.getPrototypeOf(value) ).constructor.name}]`;
7692
+ } catch (err) {
7693
+ return `**non-serializable** (${err})`;
7694
+ }
7695
  }
7696
+
7697
  /** Calculates bytes size of input string */
7698
  function utf8Length(value) {
 
7699
  return ~-encodeURI(value).split(/%..|./).length;
7700
  }
7701
+
7702
  /** Calculates bytes size of input object */
7703
  function jsonSize(value) {
7704
+ return utf8Length(JSON.stringify(value));
7705
  }
7706
+
7707
+
7708
  //# sourceMappingURL=normalize.js.map
7709
 
7710
+
7711
  /***/ }),
7712
 
7713
  /***/ 1995:
7714
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
7715
 
7716
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
 
7717
  /* harmony export */ "xp": function() { return /* binding */ addNonEnumerableProperty; },
 
 
 
7718
  /* harmony export */ "Sh": function() { return /* binding */ convertToPlainObject; },
7719
+ /* harmony export */ "Jr": function() { return /* binding */ dropUndefinedKeys; },
7720
  /* harmony export */ "zf": function() { return /* binding */ extractExceptionKeysForMessage; },
7721
+ /* harmony export */ "hl": function() { return /* binding */ fill; },
7722
+ /* harmony export */ "HK": function() { return /* binding */ getOriginalFunction; },
7723
+ /* harmony export */ "$Q": function() { return /* binding */ markFunctionWrapped; },
7724
+ /* harmony export */ "_j": function() { return /* binding */ urlEncode; }
7725
  /* harmony export */ });
7726
  /* unused harmony export objectify */
7727
+ /* harmony import */ var _browser_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4194);
7728
+ /* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1757);
7729
+ /* harmony import */ var _string_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9660);
 
7730
 
7731
 
7732
 
7743
  * @returns void
7744
  */
7745
  function fill(source, name, replacementFactory) {
7746
+ if (!(name in source)) {
7747
+ return;
7748
+ }
7749
+
7750
+ var original = source[name] ;
7751
+ var wrapped = replacementFactory(original) ;
7752
+
7753
+ // Make sure it's a function first, as we need to attach an empty prototype for `defineProperties` to work
7754
+ // otherwise it'll throw "TypeError: Object.defineProperties called on non-object"
7755
+ if (typeof wrapped === 'function') {
7756
+ try {
7757
+ markFunctionWrapped(wrapped, original);
7758
+ } catch (_Oo) {
7759
+ // This can throw if multiple fill happens on a global object like XMLHttpRequest
7760
+ // Fixes https://github.com/getsentry/sentry-javascript/issues/2043
7761
  }
7762
+ }
7763
+
7764
+ source[name] = wrapped;
7765
  }
7766
+
7767
  /**
7768
  * Defines a non-enumerable property on the given object.
7769
  *
7772
  * @param value The value to which to set the property
7773
  */
7774
  function addNonEnumerableProperty(obj, name, value) {
7775
+ Object.defineProperty(obj, name, {
7776
+ // enumerable: false, // the default, so we can save on bundle size by not explicitly setting it
7777
+ value: value,
7778
+ writable: true,
7779
+ configurable: true,
7780
+ });
7781
  }
7782
+
7783
  /**
7784
  * Remembers the original function on the wrapped function and
7785
  * patches up the prototype.
7788
  * @param original the original function that gets wrapped
7789
  */
7790
  function markFunctionWrapped(wrapped, original) {
7791
+ var proto = original.prototype || {};
7792
+ wrapped.prototype = original.prototype = proto;
7793
+ addNonEnumerableProperty(wrapped, '__sentry_original__', original);
7794
  }
7795
+
7796
  /**
7797
  * This extracts the original function if available. See
7798
  * `markFunctionWrapped` for more information.
7801
  * @returns the unwrapped version of the function if available.
7802
  */
7803
  function getOriginalFunction(func) {
7804
+ return func.__sentry_original__;
7805
  }
7806
+
7807
  /**
7808
  * Encodes given object into url-friendly format
7809
  *
7811
  * @returns string Encoded
7812
  */
7813
  function urlEncode(object) {
7814
+ return Object.keys(object)
7815
+ .map(key => `${encodeURIComponent(key)}=${encodeURIComponent(object[key])}`)
7816
+ .join('&');
7817
  }
7818
+
7819
  /**
7820
+ * Transforms any `Error` or `Event` into a plain object with all of their enumerable properties, and some of their
7821
+ * non-enumerable properties attached.
7822
  *
7823
  * @param value Initial source that we have to transform in order for it to be usable by the serializer
7824
+ * @returns An Event or Error turned into an object - or the value argurment itself, when value is neither an Event nor
7825
+ * an Error.
7826
  */
7827
+ function convertToPlainObject(
7828
+ value,
7829
+ )
7830
+
7831
+ {
7832
+ if ((0,_is_js__WEBPACK_IMPORTED_MODULE_0__/* .isError */ .VZ)(value)) {
7833
+ return {
7834
+ message: value.message,
7835
+ name: value.name,
7836
+ stack: value.stack,
7837
+ ...getOwnProperties(value),
7838
+ };
7839
+ } else if ((0,_is_js__WEBPACK_IMPORTED_MODULE_0__/* .isEvent */ .cO)(value)) {
7840
+ var newObj
7841
+
7842
+ = {
7843
+ type: value.type,
7844
+ target: serializeEventTarget(value.target),
7845
+ currentTarget: serializeEventTarget(value.currentTarget),
7846
+ ...getOwnProperties(value),
7847
+ };
7848
+
7849
+ if (typeof CustomEvent !== 'undefined' && (0,_is_js__WEBPACK_IMPORTED_MODULE_0__/* .isInstanceOf */ .V9)(value, CustomEvent)) {
7850
+ newObj.detail = value.detail;
7851
  }
7852
+
7853
  return newObj;
7854
+ } else {
7855
+ return value;
7856
+ }
7857
  }
7858
+
7859
  /** Creates a string representation of the target of an `Event` object */
7860
  function serializeEventTarget(target) {
7861
+ try {
7862
+ return (0,_is_js__WEBPACK_IMPORTED_MODULE_0__/* .isElement */ .kK)(target) ? (0,_browser_js__WEBPACK_IMPORTED_MODULE_1__/* .htmlTreeAsString */ .R)(target) : Object.prototype.toString.call(target);
7863
+ } catch (_oO) {
7864
+ return '<unknown>';
7865
+ }
 
7866
  }
7867
+
7868
  /** Filters out all but an object's own properties */
7869
  function getOwnProperties(obj) {
7870
+ if (typeof obj === 'object' && obj !== null) {
7871
  var extractedProps = {};
7872
  for (var property in obj) {
7873
+ if (Object.prototype.hasOwnProperty.call(obj, property)) {
7874
+ extractedProps[property] = (obj )[property];
7875
+ }
7876
  }
7877
  return extractedProps;
7878
+ } else {
7879
+ return {};
7880
+ }
7881
  }
7882
+
7883
  /**
7884
  * Given any captured exception, extract its keys and create a sorted
7885
  * and truncated list that will be used inside the event message.
7886
  * eg. `Non-error exception captured with keys: foo, bar, baz`
7887
  */
7888
+ function extractExceptionKeysForMessage(exception, maxLength = 40) {
7889
+ var keys = Object.keys(convertToPlainObject(exception));
7890
+ keys.sort();
7891
+
7892
+ if (!keys.length) {
7893
+ return '[object has no keys]';
7894
+ }
7895
+
7896
+ if (keys[0].length >= maxLength) {
7897
+ return (0,_string_js__WEBPACK_IMPORTED_MODULE_2__/* .truncate */ .$G)(keys[0], maxLength);
7898
+ }
7899
+
7900
+ for (let includedKeys = keys.length; includedKeys > 0; includedKeys--) {
7901
+ var serialized = keys.slice(0, includedKeys).join(', ');
7902
+ if (serialized.length > maxLength) {
7903
+ continue;
 
 
 
 
7904
  }
7905
+ if (includedKeys === keys.length) {
7906
+ return serialized;
7907
+ }
7908
+ return (0,_string_js__WEBPACK_IMPORTED_MODULE_2__/* .truncate */ .$G)(serialized, maxLength);
7909
+ }
7910
+
7911
+ return '';
7912
  }
7913
+
7914
  /**
7915
+ * Given any object, return a new object having removed all fields whose value was `undefined`.
7916
  * Works recursively on objects and arrays.
7917
+ *
7918
+ * Attention: This function keeps circular references in the returned object.
7919
  */
7920
+ function dropUndefinedKeys(inputValue) {
7921
+ // This map keeps track of what already visited nodes map to.
7922
+ // Our Set - based memoBuilder doesn't work here because we want to the output object to have the same circular
7923
+ // references as the input object.
7924
+ var memoizationMap = new Map();
7925
+
7926
+ // This function just proxies `_dropUndefinedKeys` to keep the `memoBuilder` out of this function's API
7927
+ return _dropUndefinedKeys(inputValue, memoizationMap);
7928
+ }
7929
+
7930
+ function _dropUndefinedKeys(inputValue, memoizationMap) {
7931
+ if ((0,_is_js__WEBPACK_IMPORTED_MODULE_0__/* .isPlainObject */ .PO)(inputValue)) {
7932
+ // If this node has already been visited due to a circular reference, return the object it was mapped to in the new object
7933
+ var memoVal = memoizationMap.get(inputValue);
7934
+ if (memoVal !== undefined) {
7935
+ return memoVal ;
7936
+ }
7937
+
7938
+ var returnValue = {};
7939
+ // Store the mapping of this value in case we visit it again, in case of circular data
7940
+ memoizationMap.set(inputValue, returnValue);
7941
+
7942
+ for (var key of Object.keys(inputValue)) {
7943
+ if (typeof inputValue[key] !== 'undefined') {
7944
+ returnValue[key] = _dropUndefinedKeys(inputValue[key], memoizationMap);
7945
+ }
7946
  }
7947
+
7948
+ return returnValue ;
7949
+ }
7950
+
7951
+ if (Array.isArray(inputValue)) {
7952
+ // If this node has already been visited due to a circular reference, return the array it was mapped to in the new object
7953
+ var memoVal = memoizationMap.get(inputValue);
7954
+ if (memoVal !== undefined) {
7955
+ return memoVal ;
7956
  }
7957
+
7958
+ var returnValue = [];
7959
+ // Store the mapping of this value in case we visit it again, in case of circular data
7960
+ memoizationMap.set(inputValue, returnValue);
7961
+
7962
+ inputValue.forEach((item) => {
7963
+ returnValue.push(_dropUndefinedKeys(item, memoizationMap));
7964
+ });
7965
+
7966
+ return returnValue ;
7967
+ }
7968
+
7969
+ return inputValue;
7970
  }
7971
+
7972
  /**
7973
  * Ensure that something is an object.
7974
  *
7979
  * @returns A version of `wat` which can safely be used with `Object` class methods
7980
  */
7981
  function objectify(wat) {
7982
+ let objectified;
7983
+ switch (true) {
7984
+ case wat === undefined || wat === null:
7985
+ objectified = new String(wat);
7986
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7987
 
7988
+ // Though symbols and bigints do have wrapper classes (`Symbol` and `BigInt`, respectively), for whatever reason
7989
+ // those classes don't have constructors which can be used with the `new` keyword. We therefore need to cast each as
7990
+ // an object in order to wrap it.
7991
+ case typeof wat === 'symbol' || typeof wat === 'bigint':
7992
+ objectified = Object(wat);
7993
+ break;
7994
 
7995
+ // this will catch the remaining primitives: `String`, `Number`, and `Boolean`
7996
+ case isPrimitive(wat):
7997
+ objectified = new (wat ).constructor(wat);
7998
+ break;
7999
 
8000
+ // by process of elimination, at this point we know that `wat` must already be an object
8001
+ default:
8002
+ objectified = wat;
8003
+ break;
8004
+ }
8005
+ return objectified;
 
 
 
 
 
 
8006
  }
8007
+
8008
+
8009
+ //# sourceMappingURL=object.js.map
8010
+
 
 
 
 
 
 
 
 
 
 
8011
 
8012
  /***/ }),
8013
 
8017
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8018
  /* harmony export */ "x": function() { return /* binding */ makePromiseBuffer; }
8019
  /* harmony export */ });
8020
+ /* harmony import */ var _error_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4388);
8021
+ /* harmony import */ var _syncpromise_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7946);
8022
+
8023
 
8024
 
8025
  /**
8027
  * @param limit max number of promises that can be stored in the buffer
8028
  */
8029
  function makePromiseBuffer(limit) {
8030
+ var buffer = [];
8031
+
8032
+ function isReady() {
8033
+ return limit === undefined || buffer.length < limit;
8034
+ }
8035
+
8036
+ /**
8037
+ * Remove a promise from the queue.
8038
+ *
8039
+ * @param task Can be any PromiseLike<T>
8040
+ * @returns Removed promise.
8041
+ */
8042
+ function remove(task) {
8043
+ return buffer.splice(buffer.indexOf(task), 1)[0];
8044
+ }
8045
+
8046
+ /**
8047
+ * Add a promise (representing an in-flight action) to the queue, and set it to remove itself on fulfillment.
8048
+ *
8049
+ * @param taskProducer A function producing any PromiseLike<T>; In previous versions this used to be `task:
8050
+ * PromiseLike<T>`, but under that model, Promises were instantly created on the call-site and their executor
8051
+ * functions therefore ran immediately. Thus, even if the buffer was full, the action still happened. By
8052
+ * requiring the promise to be wrapped in a function, we can defer promise creation until after the buffer
8053
+ * limit check.
8054
+ * @returns The original promise.
8055
+ */
8056
+ function add(taskProducer) {
8057
+ if (!isReady()) {
8058
+ return (0,_syncpromise_js__WEBPACK_IMPORTED_MODULE_0__/* .rejectedSyncPromise */ .$2)(new _error_js__WEBPACK_IMPORTED_MODULE_1__/* .SentryError */ .b('Not adding Promise due to buffer limit reached.'));
8059
+ }
8060
+
8061
+ // start the task and add its promise to the queue
8062
+ var task = taskProducer();
8063
+ if (buffer.indexOf(task) === -1) {
8064
+ buffer.push(task);
8065
+ }
8066
+ void task
8067
+ .then(() => remove(task))
8068
+ // Use `then(null, rejectionHandler)` rather than `catch(rejectionHandler)` so that we can use `PromiseLike`
8069
+ // rather than `Promise`. `PromiseLike` doesn't have a `.catch` method, making its polyfill smaller. (ES5 didn't
8070
+ // have promises, so TS has to polyfill when down-compiling.)
8071
+ .then(null, () =>
8072
+ remove(task).then(null, () => {
8073
+ // We have to add another catch here because `remove()` starts a new promise chain.
8074
+ }),
8075
+ );
8076
+ return task;
8077
+ }
8078
+
8079
+ /**
8080
+ * Wait for all promises in the queue to resolve or for timeout to expire, whichever comes first.
8081
+ *
8082
+ * @param timeout The time, in ms, after which to resolve to `false` if the queue is still non-empty. Passing `0` (or
8083
+ * not passing anything) will make the promise wait as long as it takes for the queue to drain before resolving to
8084
+ * `true`.
8085
+ * @returns A promise which will resolve to `true` if the queue is already empty or drains before the timeout, and
8086
+ * `false` otherwise
8087
+ */
8088
+ function drain(timeout) {
8089
+ return new _syncpromise_js__WEBPACK_IMPORTED_MODULE_0__/* .SyncPromise */ .cW((resolve, reject) => {
8090
+ let counter = buffer.length;
8091
+
8092
+ if (!counter) {
8093
+ return resolve(true);
8094
+ }
8095
+
8096
+ // wait for `timeout` ms and then resolve to `false` (if not cancelled first)
8097
+ var capturedSetTimeout = setTimeout(() => {
8098
+ if (timeout && timeout > 0) {
8099
+ resolve(false);
8100
  }
8101
+ }, timeout);
8102
+
8103
+ // if all promises resolve in time, cancel the timer and resolve to `true`
8104
+ buffer.forEach(item => {
8105
+ void (0,_syncpromise_js__WEBPACK_IMPORTED_MODULE_0__/* .resolvedSyncPromise */ .WD)(item).then(() => {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8106
  if (!--counter) {
8107
+ clearTimeout(capturedSetTimeout);
8108
+ resolve(true);
8109
+ }
8110
+ }, reject);
8111
+ });
8112
+ });
8113
+ }
8114
+
8115
+ return {
8116
+ $: buffer,
8117
+ add,
8118
+ drain,
8119
+ };
8120
  }
8121
+
8122
+
8123
  //# sourceMappingURL=promisebuffer.js.map
8124
 
8125
+
8126
  /***/ }),
8127
 
8128
  /***/ 1630:
8129
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8130
 
8131
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
 
8132
  /* harmony export */ "Q": function() { return /* binding */ isRateLimited; },
8133
  /* harmony export */ "WG": function() { return /* binding */ updateRateLimits; }
8134
  /* harmony export */ });
8135
+ /* unused harmony exports DEFAULT_RETRY_AFTER, disabledUntil, parseRetryAfterHeader */
8136
+ // Intentionally keeping the key broad, as we don't know for sure what rate limit headers get returned from backend
8137
 
8138
  var DEFAULT_RETRY_AFTER = 60 * 1000; // 60 seconds
8139
+
8140
  /**
8141
  * Extracts Retry-After value from the request header or returns default value
8142
  * @param header string representation of 'Retry-After' header
8143
  * @param now current unix timestamp
8144
  *
8145
  */
8146
+ function parseRetryAfterHeader(header, now = Date.now()) {
8147
+ var headerDelay = parseInt(`${header}`, 10);
8148
+ if (!isNaN(headerDelay)) {
8149
+ return headerDelay * 1000;
8150
+ }
8151
+
8152
+ var headerDate = Date.parse(`${header}`);
8153
+ if (!isNaN(headerDate)) {
8154
+ return headerDate - now;
8155
+ }
8156
+
8157
+ return DEFAULT_RETRY_AFTER;
8158
  }
8159
+
8160
  /**
8161
  * Gets the time that given category is disabled until for rate limiting
8162
  */
8163
  function disabledUntil(limits, category) {
8164
+ return limits[category] || limits.all || 0;
8165
  }
8166
+
8167
  /**
8168
  * Checks if a category is rate limited
8169
  */
8170
+ function isRateLimited(limits, category, now = Date.now()) {
8171
+ return disabledUntil(limits, category) > now;
 
8172
  }
8173
+
8174
  /**
8175
  * Update ratelimits from incoming headers.
8176
  * Returns true if headers contains a non-empty rate limiting header.
8177
  */
8178
+ function updateRateLimits(
8179
+ limits,
8180
+ { statusCode, headers },
8181
+ now = Date.now(),
8182
+ ) {
8183
+ var updatedRateLimits = {
8184
+ ...limits,
8185
+ };
8186
+
8187
+ // "The name is case-insensitive."
8188
+ // https://developer.mozilla.org/en-US/docs/Web/API/Headers/get
8189
+ var rateLimitHeader = headers && headers['x-sentry-rate-limits'];
8190
+ var retryAfterHeader = headers && headers['retry-after'];
8191
+
8192
+ if (rateLimitHeader) {
8193
+ /**
8194
+ * rate limit headers are of the form
8195
+ * <header>,<header>,..
8196
+ * where each <header> is of the form
8197
+ * <retry_after>: <categories>: <scope>: <reason_code>
8198
+ * where
8199
+ * <retry_after> is a delay in seconds
8200
+ * <categories> is the event type(s) (error, transaction, etc) being rate limited and is of the form
8201
+ * <category>;<category>;...
8202
+ * <scope> is what's being limited (org, project, or key) - ignored by SDK
8203
+ * <reason_code> is an arbitrary string like "org_quota" - ignored by SDK
8204
+ */
8205
+ for (var limit of rateLimitHeader.trim().split(',')) {
8206
+ const [retryAfter, categories] = limit.split(':', 2);
8207
+ var headerDelay = parseInt(retryAfter, 10);
8208
+ var delay = (!isNaN(headerDelay) ? headerDelay : 60) * 1000; // 60sec default
8209
+ if (!categories) {
8210
+ updatedRateLimits.all = now + delay;
8211
+ } else {
8212
+ for (var category of categories.split(';')) {
8213
+ updatedRateLimits[category] = now + delay;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8214
  }
8215
+ }
8216
  }
8217
+ } else if (retryAfterHeader) {
8218
+ updatedRateLimits.all = now + parseRetryAfterHeader(retryAfterHeader, now);
8219
+ } else if (statusCode === 429) {
8220
+ updatedRateLimits.all = now + 60 * 1000;
8221
+ }
8222
+
8223
+ return updatedRateLimits;
8224
  }
8225
+
8226
+
8227
  //# sourceMappingURL=ratelimit.js.map
8228
 
8229
+
8230
  /***/ }),
8231
 
8232
  /***/ 8653:
8233
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8234
 
8235
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8236
+ /* harmony export */ "VT": function() { return /* binding */ severityLevelFromString; }
8237
  /* harmony export */ });
8238
+ /* unused harmony exports severityFromString, validSeverityLevels */
8239
+ // Note: Ideally the `SeverityLevel` type would be derived from `validSeverityLevels`, but that would mean either
8240
+ //
8241
+ // a) moving `validSeverityLevels` to `@sentry/types`,
8242
+ // b) moving the`SeverityLevel` type here, or
8243
+ // c) importing `validSeverityLevels` from here into `@sentry/types`.
8244
+ //
8245
+ // Option A would make `@sentry/types` a runtime dependency of `@sentry/utils` (not good), and options B and C would
8246
+ // create a circular dependency between `@sentry/types` and `@sentry/utils` (also not good). So a TODO accompanying the
8247
+ // type, reminding anyone who changes it to change this list also, will have to do.
8248
 
8249
+ var validSeverityLevels = ['fatal', 'error', 'warning', 'log', 'info', 'debug'];
8250
 
 
 
 
8251
  /**
8252
+ * Converts a string-based level into a member of the deprecated {@link Severity} enum.
8253
  *
8254
+ * @deprecated `severityFromString` is deprecated. Please use `severityLevelFromString` instead.
8255
+ *
8256
+ * @param level String representation of Severity
8257
  * @returns Severity
8258
  */
8259
  function severityFromString(level) {
8260
+ return severityLevelFromString(level) ;
8261
+ }
8262
+
8263
+ /**
8264
+ * Converts a string-based level into a `SeverityLevel`, normalizing it along the way.
8265
+ *
8266
+ * @param level String representation of desired `SeverityLevel`.
8267
+ * @returns The `SeverityLevel` corresponding to the given string, or 'log' if the string isn't a valid level.
8268
+ */
8269
+ function severityLevelFromString(level) {
8270
+ return (level === 'warn' ? 'warning' : validSeverityLevels.includes(level) ? level : 'log') ;
8271
  }
8272
+
8273
+
8274
  //# sourceMappingURL=severity.js.map
8275
 
8276
+
8277
  /***/ }),
8278
 
8279
  /***/ 9038:
8281
 
8282
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8283
  /* harmony export */ "pE": function() { return /* binding */ createStackParser; },
8284
+ /* harmony export */ "$P": function() { return /* binding */ getFunctionName; },
8285
+ /* harmony export */ "Sq": function() { return /* binding */ stackParserFromStackParserOptions; }
8286
  /* harmony export */ });
8287
+ /* unused harmony exports nodeStackLineParser, stripSentryFramesAndReverse */
8288
+
8289
 
8290
  var STACKTRACE_LIMIT = 50;
8291
+
8292
  /**
8293
  * Creates a stack parser with the supplied line parsers
8294
  *
8296
  * frames and with Sentry SDK internal frames removed from the top and bottom
8297
  *
8298
  */
8299
+ function createStackParser(...parsers) {
8300
+ var sortedParsers = parsers.sort((a, b) => a[0] - b[0]).map(p => p[1]);
8301
+
8302
+ return (stack, skipFirst = 0) => {
8303
+ var frames = [];
8304
+
8305
+ for (var line of stack.split('\n').slice(skipFirst)) {
8306
+ for (var parser of sortedParsers) {
8307
+ var frame = parser(line);
8308
+
8309
+ if (frame) {
8310
+ frames.push(frame);
8311
+ break;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8312
  }
8313
+ }
8314
+ }
8315
+
8316
+ return stripSentryFramesAndReverse(frames);
8317
+ };
8318
  }
8319
+
8320
+ /**
8321
+ * Gets a stack parser implementation from Options.stackParser
8322
+ * @see Options
8323
+ *
8324
+ * If options contains an array of line parsers, it is converted into a parser
8325
+ */
8326
+ function stackParserFromStackParserOptions(stackParser) {
8327
+ if (Array.isArray(stackParser)) {
8328
+ return createStackParser(...stackParser);
8329
+ }
8330
+ return stackParser;
8331
+ }
8332
+
8333
  /**
8334
  * @hidden
8335
  */
8336
  function stripSentryFramesAndReverse(stack) {
8337
+ if (!stack.length) {
8338
+ return [];
8339
+ }
8340
+
8341
+ let localStack = stack;
8342
+
8343
+ var firstFrameFunction = localStack[0].function || '';
8344
+ var lastFrameFunction = localStack[localStack.length - 1].function || '';
8345
+
8346
+ // If stack starts with one of our API calls, remove it (starts, meaning it's the top of the stack - aka last call)
8347
+ if (firstFrameFunction.indexOf('captureMessage') !== -1 || firstFrameFunction.indexOf('captureException') !== -1) {
8348
+ localStack = localStack.slice(1);
8349
+ }
8350
+
8351
+ // 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)
8352
+ if (lastFrameFunction.indexOf('sentryWrapped') !== -1) {
8353
+ localStack = localStack.slice(0, -1);
8354
+ }
8355
+
8356
+ // The frame where the crash happened, should be the last entry in the array
8357
+ return localStack
8358
+ .slice(0, STACKTRACE_LIMIT)
8359
+ .map(frame => ({
8360
+ ...frame,
8361
+ filename: frame.filename || localStack[0].filename,
8362
+ function: frame.function || '?',
8363
+ }))
8364
+ .reverse();
8365
  }
8366
+
8367
  var defaultFunctionName = '<anonymous>';
8368
+
8369
  /**
8370
  * Safely extract function name from itself
8371
  */
8372
  function getFunctionName(fn) {
8373
+ try {
8374
+ if (!fn || typeof fn !== 'function') {
8375
+ return defaultFunctionName;
 
 
 
 
 
 
 
8376
  }
8377
+ return fn.name || defaultFunctionName;
8378
+ } catch (e) {
8379
+ // Just accessing custom props in some Selenium environments
8380
+ // can cause a "Permission denied" exception (see raven-js#495).
8381
+ return defaultFunctionName;
8382
+ }
8383
  }
 
8384
 
8385
+ function node(getModule) {
8386
+ var FILENAME_MATCH = /^\s*[-]{4,}$/;
8387
+ var FULL_MATCH = /at (?:async )?(?:(.+?)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/;
8388
 
8389
+ return (line) => {
8390
+ if (line.match(FILENAME_MATCH)) {
8391
+ return {
8392
+ filename: line,
8393
+ };
8394
+ }
8395
 
8396
+ var lineMatch = line.match(FULL_MATCH);
8397
+ if (!lineMatch) {
8398
+ return undefined;
8399
+ }
8400
+
8401
+ let object;
8402
+ let method;
8403
+ let functionName;
8404
+ let typeName;
8405
+ let methodName;
8406
+
8407
+ if (lineMatch[1]) {
8408
+ functionName = lineMatch[1];
8409
+
8410
+ let methodStart = functionName.lastIndexOf('.');
8411
+ if (functionName[methodStart - 1] === '.') {
8412
+ methodStart--;
8413
+ }
8414
+
8415
+ if (methodStart > 0) {
8416
+ object = functionName.substr(0, methodStart);
8417
+ method = functionName.substr(methodStart + 1);
8418
+ var objectEnd = object.indexOf('.Module');
8419
+ if (objectEnd > 0) {
8420
+ functionName = functionName.substr(objectEnd + 1);
8421
+ object = object.substr(0, objectEnd);
8422
+ }
8423
+ }
8424
+ typeName = undefined;
8425
  }
8426
+
8427
+ if (method) {
8428
+ typeName = object;
8429
+ methodName = method;
8430
  }
8431
+
8432
+ if (method === '<anonymous>') {
8433
+ methodName = undefined;
8434
+ functionName = undefined;
8435
  }
8436
+
8437
+ if (functionName === undefined) {
8438
+ methodName = methodName || '<anonymous>';
8439
+ functionName = typeName ? `${typeName}.${methodName}` : methodName;
8440
  }
8441
+
8442
+ var filename = _optionalChain([lineMatch, 'access', _ => _[2], 'optionalAccess', _2 => _2.startsWith, 'call', _3 => _3('file://')]) ? lineMatch[2].substr(7) : lineMatch[2];
8443
+ var isNative = lineMatch[5] === 'native';
8444
+ var isInternal =
8445
+ isNative || (filename && !filename.startsWith('/') && !filename.startsWith('.') && filename.indexOf(':\\') !== 1);
8446
+
8447
+ // in_app is all that's not an internal Node function or a module within node_modules
8448
+ // note that isNative appears to return true even for node core libraries
8449
+ // see https://github.com/getsentry/raven-node/issues/176
8450
+ var in_app = !isInternal && filename !== undefined && !filename.includes('node_modules/');
8451
+
8452
+ return {
8453
+ filename,
8454
+ module: _optionalChain([getModule, 'optionalCall', _4 => _4(filename)]),
8455
+ function: functionName,
8456
+ lineno: parseInt(lineMatch[3], 10) || undefined,
8457
+ colno: parseInt(lineMatch[4], 10) || undefined,
8458
+ in_app,
8459
+ };
8460
+ };
8461
+ }
8462
+
8463
+ /**
8464
+ * Node.js stack line parser
8465
+ *
8466
+ * This is in @sentry/utils so it can be used from the Electron SDK in the browser for when `nodeIntegration == true`.
8467
+ * This allows it to be used without referencing or importing any node specific code which causes bundlers to complain
8468
+ */
8469
+ function nodeStackLineParser(getModule) {
8470
+ return [90, node(getModule)];
8471
  }
8472
+
8473
+
8474
+ //# sourceMappingURL=stacktrace.js.map
8475
+
8476
 
8477
  /***/ }),
8478
 
8480
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8481
 
8482
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8483
+ /* harmony export */ "zC": function() { return /* binding */ isMatchingPattern; },
8484
  /* harmony export */ "nK": function() { return /* binding */ safeJoin; },
8485
+ /* harmony export */ "$G": function() { return /* binding */ truncate; }
8486
  /* harmony export */ });
8487
+ /* unused harmony exports escapeStringForRegex, snipLine */
8488
+ /* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1757);
8489
+
8490
 
8491
  /**
8492
  * Truncates given string to the maximum characters count
8495
  * @param max Maximum number of characters in truncated string (0 = unlimited)
8496
  * @returns string Encoded
8497
  */
8498
+ function truncate(str, max = 0) {
8499
+ if (typeof str !== 'string' || max === 0) {
8500
+ return str;
8501
+ }
8502
+ return str.length <= max ? str : `${str.substr(0, max)}...`;
 
8503
  }
8504
+
8505
  /**
8506
  * This is basically just `trim_line` from
8507
  * https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67
8511
  * @returns string Encoded
8512
  */
8513
  function snipLine(line, colno) {
8514
+ let newLine = line;
8515
+ var lineLength = newLine.length;
8516
+ if (lineLength <= 150) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8517
  return newLine;
8518
+ }
8519
+ if (colno > lineLength) {
8520
+ colno = lineLength;
8521
+ }
8522
+
8523
+ let start = Math.max(colno - 60, 0);
8524
+ if (start < 5) {
8525
+ start = 0;
8526
+ }
8527
+
8528
+ let end = Math.min(start + 140, lineLength);
8529
+ if (end > lineLength - 5) {
8530
+ end = lineLength;
8531
+ }
8532
+ if (end === lineLength) {
8533
+ start = Math.max(end - 140, 0);
8534
+ }
8535
+
8536
+ newLine = newLine.slice(start, end);
8537
+ if (start > 0) {
8538
+ newLine = `'{snip} ${newLine}`;
8539
+ }
8540
+ if (end < lineLength) {
8541
+ newLine += ' {snip}';
8542
+ }
8543
+
8544
+ return newLine;
8545
  }
8546
+
8547
  /**
8548
  * Join values in array
8549
  * @param input array of values to be joined together
8550
  * @param delimiter string to be placed in-between values
8551
  * @returns Joined values
8552
  */
 
8553
  function safeJoin(input, delimiter) {
8554
+ if (!Array.isArray(input)) {
8555
+ return '';
8556
+ }
8557
+
8558
+ var output = [];
8559
+ for (let i = 0; i < input.length; i++) {
8560
+ var value = input[i];
8561
+ try {
8562
+ output.push(String(value));
8563
+ } catch (e) {
8564
+ output.push('[value cannot be serialized]');
 
 
8565
  }
8566
+ }
8567
+
8568
+ return output.join(delimiter);
8569
  }
8570
+
8571
  /**
8572
  * Checks if the value matches a regex or includes the string
8573
  * @param value The string value to be checked against
8574
  * @param pattern Either a regex or a string that must be contained in value
8575
  */
8576
  function isMatchingPattern(value, pattern) {
8577
+ if (!(0,_is_js__WEBPACK_IMPORTED_MODULE_0__/* .isString */ .HD)(value)) {
 
 
 
 
 
 
 
 
8578
  return false;
8579
+ }
8580
+
8581
+ if ((0,_is_js__WEBPACK_IMPORTED_MODULE_0__/* .isRegExp */ .Kj)(pattern)) {
8582
+ return pattern.test(value);
8583
+ }
8584
+ if (typeof pattern === 'string') {
8585
+ return value.indexOf(pattern) !== -1;
8586
+ }
8587
+ return false;
8588
  }
8589
+
8590
  /**
8591
  * Given a string, escape characters which have meaning in the regex grammar, such that the result is safe to feed to
8592
  * `new RegExp()`.
8599
  * @returns An version of the string with all special regex characters escaped
8600
  */
8601
  function escapeStringForRegex(regexString) {
8602
+ // escape the hyphen separately so we can also replace it with a unicode literal hyphen, to avoid the problems
8603
+ // discussed in https://github.com/sindresorhus/escape-string-regexp/issues/20.
8604
+ return regexString.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d');
8605
  }
8606
+
8607
+
8608
  //# sourceMappingURL=string.js.map
8609
 
8610
+
8611
  /***/ }),
8612
 
8613
  /***/ 9798:
8614
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8615
 
8616
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
 
8617
  /* harmony export */ "Du": function() { return /* binding */ isNativeFetch; },
8618
+ /* harmony export */ "Ak": function() { return /* binding */ supportsFetch; },
8619
+ /* harmony export */ "Bf": function() { return /* binding */ supportsHistory; },
8620
+ /* harmony export */ "t$": function() { return /* binding */ supportsNativeFetch; }
8621
  /* harmony export */ });
8622
+ /* unused harmony exports supportsDOMError, supportsDOMException, supportsErrorEvent, supportsReferrerPolicy, supportsReportingObserver */
8623
+ /* harmony import */ var _global_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
8624
+ /* harmony import */ var _logger_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8536);
 
8625
 
8626
 
8627
 
8632
  * @returns Answer to the given question.
8633
  */
8634
  function supportsErrorEvent() {
8635
+ try {
8636
+ new ErrorEvent('');
8637
+ return true;
8638
+ } catch (e) {
8639
+ return false;
8640
+ }
 
8641
  }
8642
+
8643
  /**
8644
  * Tells whether current environment supports DOMError objects
8645
  * {@link supportsDOMError}.
8647
  * @returns Answer to the given question.
8648
  */
8649
  function supportsDOMError() {
8650
+ try {
8651
+ // Chrome: VM89:1 Uncaught TypeError: Failed to construct 'DOMError':
8652
+ // 1 argument required, but only 0 present.
8653
+ // @ts-ignore It really needs 1 argument, not 0.
8654
+ new DOMError('');
8655
+ return true;
8656
+ } catch (e) {
8657
+ return false;
8658
+ }
 
8659
  }
8660
+
8661
  /**
8662
  * Tells whether current environment supports DOMException objects
8663
  * {@link supportsDOMException}.
8665
  * @returns Answer to the given question.
8666
  */
8667
  function supportsDOMException() {
8668
+ try {
8669
+ new DOMException('');
8670
+ return true;
8671
+ } catch (e) {
8672
+ return false;
8673
+ }
 
8674
  }
8675
+
8676
  /**
8677
  * Tells whether current environment supports Fetch API
8678
  * {@link supportsFetch}.
8680
  * @returns Answer to the given question.
8681
  */
8682
  function supportsFetch() {
8683
+ if (!('fetch' in (0,_global_js__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)())) {
8684
+ return false;
8685
+ }
8686
+
8687
+ try {
8688
+ new Headers();
8689
+ new Request('');
8690
+ new Response();
8691
+ return true;
8692
+ } catch (e) {
8693
+ return false;
8694
+ }
8695
  }
8696
  /**
8697
  * isNativeFetch checks if the given function is a native implementation of fetch()
8698
  */
 
8699
  function isNativeFetch(func) {
8700
+ return func && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(func.toString());
8701
  }
8702
+
8703
  /**
8704
  * Tells whether current environment supports Fetch API natively
8705
  * {@link supportsNativeFetch}.
8707
  * @returns true if `window.fetch` is natively implemented, false otherwise
8708
  */
8709
  function supportsNativeFetch() {
8710
+ if (!supportsFetch()) {
8711
+ return false;
8712
+ }
8713
+
8714
+ var global = (0,_global_js__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
8715
+
8716
+ // Fast path to avoid DOM I/O
8717
  if (isNativeFetch(global.fetch)) {
8718
+ return true;
8719
+ }
8720
+
8721
+ // window.fetch is implemented, but is polyfilled or already wrapped (e.g: by a chrome extension)
8722
+ // so create a "pure" iframe to see if that has native fetch
8723
+ let result = false;
8724
+ var doc = global.document;
8725
+ if (doc && typeof (doc.createElement ) === 'function') {
8726
+ try {
8727
+ var sandbox = doc.createElement('iframe');
8728
+ sandbox.hidden = true;
8729
+ doc.head.appendChild(sandbox);
8730
+ if (sandbox.contentWindow && sandbox.contentWindow.fetch) {
 
8731
  result = isNativeFetch(sandbox.contentWindow.fetch);
8732
+ }
8733
+ doc.head.removeChild(sandbox);
8734
+ } catch (err) {
8735
+ (typeof __SENTRY_DEBUG__ === 'undefined' || __SENTRY_DEBUG__) &&
8736
+ _logger_js__WEBPACK_IMPORTED_MODULE_1__/* .logger.warn */ .kg.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', err);
 
 
8737
  }
8738
+ }
8739
+
8740
+ return result;
8741
  }
8742
+
8743
  /**
8744
  * Tells whether current environment supports ReportingObserver API
8745
  * {@link supportsReportingObserver}.
8747
  * @returns Answer to the given question.
8748
  */
8749
  function supportsReportingObserver() {
8750
+ return 'ReportingObserver' in getGlobalObject();
8751
  }
8752
+
8753
  /**
8754
  * Tells whether current environment supports Referrer Policy API
8755
  * {@link supportsReferrerPolicy}.
8757
  * @returns Answer to the given question.
8758
  */
8759
  function supportsReferrerPolicy() {
8760
+ // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default'
8761
+ // (see https://caniuse.com/#feat=referrer-policy),
8762
+ // it doesn't. And it throws an exception instead of ignoring this parameter...
8763
+ // REF: https://github.com/getsentry/raven-js/issues/1233
8764
+
8765
+ if (!supportsFetch()) {
8766
+ return false;
8767
+ }
8768
+
8769
+ try {
8770
+ new Request('_', {
8771
+ referrerPolicy: 'origin' ,
8772
+ });
8773
+ return true;
8774
+ } catch (e) {
8775
+ return false;
8776
+ }
8777
  }
8778
+
8779
  /**
8780
  * Tells whether current environment supports History API
8781
  * {@link supportsHistory}.
8783
  * @returns Answer to the given question.
8784
  */
8785
  function supportsHistory() {
8786
+ // NOTE: in Chrome App environment, touching history.pushState, *even inside
8787
+ // a try/catch block*, will cause Chrome to output an error to console.error
8788
+ // borrowed from: https://github.com/angular/angular.js/pull/13945/files
8789
+ var global = (0,_global_js__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
8790
+ var chrome = (global ).chrome;
8791
+ var isChromePackagedApp = chrome && chrome.app && chrome.app.runtime;
 
 
 
8792
  var hasHistoryApi = 'history' in global && !!global.history.pushState && !!global.history.replaceState;
8793
+
8794
+ return !isChromePackagedApp && hasHistoryApi;
8795
  }
8796
+
8797
+
8798
  //# sourceMappingURL=supports.js.map
8799
 
8800
+
8801
  /***/ }),
8802
 
8803
  /***/ 7946:
8804
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
8805
 
8806
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
8807
+ /* harmony export */ "cW": function() { return /* binding */ SyncPromise; },
8808
  /* harmony export */ "$2": function() { return /* binding */ rejectedSyncPromise; },
8809
+ /* harmony export */ "WD": function() { return /* binding */ resolvedSyncPromise; }
8810
  /* harmony export */ });
8811
+ /* harmony import */ var _is_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1757);
8812
+
8813
+
8814
+ /** SyncPromise internal states */
8815
+ var States; (function (States) {
8816
+ /** Pending */
8817
+ var PENDING = 0; States[States["PENDING"] = PENDING] = "PENDING";
8818
+ /** Resolved / OK */
8819
+ var RESOLVED = 1; States[States["RESOLVED"] = RESOLVED] = "RESOLVED";
8820
+ /** Rejected / Error */
8821
+ var REJECTED = 2; States[States["REJECTED"] = REJECTED] = "REJECTED";
8822
+ })(States || (States = {}));
8823
+
8824
+ // Overloads so we can call resolvedSyncPromise without arguments and generic argument
8825
 
8826
  /**
8827
  * Creates a resolved sync promise.
8830
  * @returns the resolved sync promise
8831
  */
8832
  function resolvedSyncPromise(value) {
8833
+ return new SyncPromise(resolve => {
8834
+ resolve(value);
8835
+ });
8836
  }
8837
+
8838
  /**
8839
  * Creates a rejected sync promise.
8840
  *
8842
  * @returns the rejected sync promise
8843
  */
8844
  function rejectedSyncPromise(reason) {
8845
+ return new SyncPromise((_, reject) => {
8846
+ reject(reason);
8847
+ });
8848
  }
8849
+
8850
  /**
8851
  * Thenable class that behaves like a Promise and follows it's interface
8852
  * but is not async internally
8853
  */
8854
+ class SyncPromise {
8855
+ __init() {this._state = States.PENDING;}
8856
+ __init2() {this._handlers = [];}
8857
+
8858
+
8859
+ constructor(
8860
+ executor,
8861
+ ) {;SyncPromise.prototype.__init.call(this);SyncPromise.prototype.__init2.call(this);SyncPromise.prototype.__init3.call(this);SyncPromise.prototype.__init4.call(this);SyncPromise.prototype.__init5.call(this);SyncPromise.prototype.__init6.call(this);
8862
+ try {
8863
+ executor(this._resolve, this._reject);
8864
+ } catch (e) {
8865
+ this._reject(e);
8866
+ }
8867
+ }
8868
+
8869
+ /** JSDoc */
8870
+ then(
8871
+ onfulfilled,
8872
+ onrejected,
8873
+ ) {
8874
+ return new SyncPromise((resolve, reject) => {
8875
+ this._handlers.push([
8876
+ false,
8877
+ result => {
8878
+ if (!onfulfilled) {
8879
+ // TODO: ¯\_(ツ)_/¯
8880
+ // TODO: FIXME
8881
+ resolve(result );
8882
+ } else {
8883
+ try {
8884
+ resolve(onfulfilled(result));
8885
+ } catch (e) {
8886
+ reject(e);
8887
  }
8888
+ }
8889
+ },
8890
+ reason => {
8891
+ if (!onrejected) {
8892
+ reject(reason);
8893
+ } else {
8894
+ try {
8895
+ resolve(onrejected(reason));
8896
+ } catch (e) {
8897
+ reject(e);
8898
  }
8899
+ }
8900
+ },
8901
+ ]);
8902
+ this._executeHandlers();
8903
+ });
8904
+ }
8905
+
8906
+ /** JSDoc */
8907
+ catch(
8908
+ onrejected,
8909
+ ) {
8910
+ return this.then(val => val, onrejected);
8911
+ }
8912
+
8913
+ /** JSDoc */
8914
+ finally(onfinally) {
8915
+ return new SyncPromise((resolve, reject) => {
8916
+ let val;
8917
+ let isRejected;
8918
+
8919
+ return this.then(
8920
+ value => {
8921
+ isRejected = false;
8922
+ val = value;
8923
+ if (onfinally) {
8924
+ onfinally();
8925
+ }
8926
+ },
8927
+ reason => {
8928
+ isRejected = true;
8929
+ val = reason;
8930
+ if (onfinally) {
8931
+ onfinally();
8932
+ }
8933
+ },
8934
+ ).then(() => {
8935
+ if (isRejected) {
8936
+ reject(val);
8937
+ return;
8938
  }
8939
+
8940
+ resolve(val );
8941
+ });
8942
+ });
8943
+ }
8944
+
8945
+ /** JSDoc */
8946
+ __init3() {this._resolve = (value) => {
8947
+ this._setResult(States.RESOLVED, value);
8948
+ };}
8949
+
8950
+ /** JSDoc */
8951
+ __init4() {this._reject = (reason) => {
8952
+ this._setResult(States.REJECTED, reason);
8953
+ };}
8954
+
8955
+ /** JSDoc */
8956
+ __init5() {this._setResult = (state, value) => {
8957
+ if (this._state !== States.PENDING) {
8958
+ return;
8959
  }
8960
+
8961
+ if ((0,_is_js__WEBPACK_IMPORTED_MODULE_0__/* .isThenable */ .J8)(value)) {
8962
+ void (value ).then(this._resolve, this._reject);
8963
+ return;
8964
+ }
8965
+
8966
+ this._state = state;
8967
+ this._value = value;
8968
+
8969
+ this._executeHandlers();
8970
+ };}
8971
+
8972
+ /** JSDoc */
8973
+ __init6() {this._executeHandlers = () => {
8974
+ if (this._state === States.PENDING) {
8975
+ return;
8976
+ }
8977
+
8978
+ var cachedHandlers = this._handlers.slice();
8979
+ this._handlers = [];
8980
+
8981
+ cachedHandlers.forEach(handler => {
8982
+ if (handler[0]) {
8983
+ return;
8984
+ }
8985
+
8986
+ if (this._state === States.RESOLVED) {
8987
+ handler[1](this._value );
8988
+ }
8989
+
8990
+ if (this._state === States.REJECTED) {
8991
+ handler[2](this._value);
8992
+ }
8993
+
8994
+ handler[0] = true;
8995
+ });
8996
+ };}
8997
+ }
8998
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8999
 
9000
  //# sourceMappingURL=syncpromise.js.map
9001
 
9002
+
9003
  /***/ }),
9004
 
9005
  /***/ 7790:
9009
  /* harmony export */ "yW": function() { return /* binding */ dateTimestampInSeconds; },
9010
  /* harmony export */ "ph": function() { return /* binding */ timestampInSeconds; }
9011
  /* harmony export */ });
9012
+ /* unused harmony exports _browserPerformanceTimeOriginMode, browserPerformanceTimeOrigin, timestampWithMs, usingPerformanceAPI */
9013
+ /* harmony import */ var _global_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5907);
9014
+ /* harmony import */ var _node_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7392);
9015
  /* module decorator */ module = __webpack_require__.hmd(module);
9016
 
9017
 
9018
+
9019
+ /**
9020
+ * An object that can return the current timestamp in seconds since the UNIX epoch.
9021
+ */
9022
+
9023
  /**
9024
  * A TimestampSource implementation for environments that do not support the Performance Web API natively.
9025
  *
9028
  * is more obvious to explain "why does my span have negative duration" than "why my spans have zero duration".
9029
  */
9030
  var dateTimestampSource = {
9031
+ nowSeconds: () => Date.now() / 1000,
9032
  };
9033
+
9034
+ /**
9035
+ * A partial definition of the [Performance Web API]{@link https://developer.mozilla.org/en-US/docs/Web/API/Performance}
9036
+ * for accessing a high-resolution monotonic clock.
9037
+ */
9038
+
9039
  /**
9040
  * Returns a wrapper around the native Performance API browser implementation, or undefined for browsers that do not
9041
  * support the API.
9043
  * Wrapping the native API works around differences in behavior from different browsers.
9044
  */
9045
  function getBrowserPerformance() {
9046
+ const { performance } = (0,_global_js__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
9047
+ if (!performance || !performance.now) {
9048
+ return undefined;
9049
+ }
9050
+
9051
+ // Replace performance.timeOrigin with our own timeOrigin based on Date.now().
9052
+ //
9053
+ // This is a partial workaround for browsers reporting performance.timeOrigin such that performance.timeOrigin +
9054
+ // performance.now() gives a date arbitrarily in the past.
9055
+ //
9056
+ // Additionally, computing timeOrigin in this way fills the gap for browsers where performance.timeOrigin is
9057
+ // undefined.
9058
+ //
9059
+ // The assumption that performance.timeOrigin + performance.now() ~= Date.now() is flawed, but we depend on it to
9060
+ // interact with data coming out of performance entries.
9061
+ //
9062
+ // Note that despite recommendations against it in the spec, browsers implement the Performance API with a clock that
9063
+ // might stop when the computer is asleep (and perhaps under other circumstances). Such behavior causes
9064
+ // performance.timeOrigin + performance.now() to have an arbitrary skew over Date.now(). In laptop computers, we have
9065
+ // observed skews that can be as long as days, weeks or months.
9066
+ //
9067
+ // See https://github.com/getsentry/sentry-javascript/issues/2590.
9068
+ //
9069
+ // BUG: despite our best intentions, this workaround has its limitations. It mostly addresses timings of pageload
9070
+ // transactions, but ignores the skew built up over time that can aversely affect timestamps of navigation
9071
+ // transactions of long-lived web pages.
9072
+ var timeOrigin = Date.now() - performance.now();
9073
+
9074
+ return {
9075
+ now: () => performance.now(),
9076
+ timeOrigin,
9077
+ };
9078
  }
9079
+
9080
  /**
9081
  * Returns the native Performance API implementation from Node.js. Returns undefined in old Node.js versions that don't
9082
  * implement the API.
9083
  */
9084
  function getNodePerformance() {
9085
+ try {
9086
+ var perfHooks = (0,_node_js__WEBPACK_IMPORTED_MODULE_1__/* .dynamicRequire */ .l$)(module, 'perf_hooks') ;
9087
+ return perfHooks.performance;
9088
+ } catch (_) {
9089
+ return undefined;
9090
+ }
 
9091
  }
9092
+
9093
  /**
9094
  * The Performance API implementation for the current platform, if available.
9095
  */
9096
+ var platformPerformance = (0,_node_js__WEBPACK_IMPORTED_MODULE_1__/* .isNodeEnv */ .KV)() ? getNodePerformance() : getBrowserPerformance();
9097
+
9098
+ var timestampSource =
9099
+ platformPerformance === undefined
9100
  ? dateTimestampSource
9101
  : {
9102
+ nowSeconds: () => (platformPerformance.timeOrigin + platformPerformance.now()) / 1000,
9103
+ };
9104
+
9105
  /**
9106
  * Returns a timestamp in seconds since the UNIX epoch using the Date API.
9107
  */
9108
  var dateTimestampInSeconds = dateTimestampSource.nowSeconds.bind(dateTimestampSource);
9109
+
9110
  /**
9111
  * Returns a timestamp in seconds since the UNIX epoch using either the Performance or Date APIs, depending on the
9112
  * availability of the Performance API.
9119
  * See https://github.com/getsentry/sentry-javascript/issues/2590.
9120
  */
9121
  var timestampInSeconds = timestampSource.nowSeconds.bind(timestampSource);
9122
+
9123
  // Re-exported with an old name for backwards-compatibility.
9124
  var timestampWithMs = (/* unused pure expression or super */ null && (timestampInSeconds));
9125
+
9126
  /**
9127
  * A boolean that is true when timestampInSeconds uses the Performance API to produce monotonic timestamps.
9128
  */
9129
  var usingPerformanceAPI = platformPerformance !== undefined;
9130
+
9131
  /**
9132
  * Internal helper to store what is the source of browserPerformanceTimeOrigin below. For debugging only.
9133
  */
9134
+ let _browserPerformanceTimeOriginMode;
9135
+
9136
  /**
9137
  * The number of milliseconds since the UNIX epoch. This value is only usable in a browser, and only when the
9138
  * performance API is available.
9139
  */
9140
+ var browserPerformanceTimeOrigin = (() => {
9141
+ // Unfortunately browsers may report an inaccurate time origin data, through either performance.timeOrigin or
9142
+ // performance.timing.navigationStart, which results in poor results in performance data. We only treat time origin
9143
+ // data as reliable if they are within a reasonable threshold of the current time.
9144
+
9145
+ const { performance } = (0,_global_js__WEBPACK_IMPORTED_MODULE_0__/* .getGlobalObject */ .R)();
9146
+ if (!performance || !performance.now) {
9147
+ _browserPerformanceTimeOriginMode = 'none';
9148
+ return undefined;
9149
+ }
9150
+
9151
+ var threshold = 3600 * 1000;
9152
+ var performanceNow = performance.now();
9153
+ var dateNow = Date.now();
9154
+
9155
+ // if timeOrigin isn't available set delta to threshold so it isn't used
9156
+ var timeOriginDelta = performance.timeOrigin
9157
+ ? Math.abs(performance.timeOrigin + performanceNow - dateNow)
9158
+ : threshold;
9159
+ var timeOriginIsReliable = timeOriginDelta < threshold;
9160
+
9161
+ // While performance.timing.navigationStart is deprecated in favor of performance.timeOrigin, performance.timeOrigin
9162
+ // is not as widely supported. Namely, performance.timeOrigin is undefined in Safari as of writing.
9163
+ // Also as of writing, performance.timing is not available in Web Workers in mainstream browsers, so it is not always
9164
+ // a valid fallback. In the absence of an initial time provided by the browser, fallback to the current time from the
9165
+ // Date API.
9166
  var navigationStart = performance.timing && performance.timing.navigationStart;
9167
+ var hasNavigationStart = typeof navigationStart === 'number';
9168
+ // if navigationStart isn't available set delta to threshold so it isn't used
9169
+ var navigationStartDelta = hasNavigationStart ? Math.abs(navigationStart + performanceNow - dateNow) : threshold;
9170
+ var navigationStartIsReliable = navigationStartDelta < threshold;
9171
+
9172
+ if (timeOriginIsReliable || navigationStartIsReliable) {
9173
+ // Use the more reliable time origin
9174
+ if (timeOriginDelta <= navigationStartDelta) {
9175
+ _browserPerformanceTimeOriginMode = 'timeOrigin';
9176
+ return performance.timeOrigin;
9177
+ } else {
9178
+ _browserPerformanceTimeOriginMode = 'navigationStart';
9179
+ return navigationStart;
9180
+ }
9181
+ }
9182
+
9183
+ // Either both timeOrigin and navigationStart are skewed or neither is available, fallback to Date.
9184
+ _browserPerformanceTimeOriginMode = 'dateNow';
9185
+ return dateNow;
9186
  })();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9188
 
9189
+ //# sourceMappingURL=time.js.map
 
 
 
 
 
 
9190
 
9191
 
9192
  /***/ }),
9289
  !function() {
9290
  __webpack_require__.r(__webpack_exports__);
9291
  /* harmony import */ var _sentry_browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2456);
9292
+ /* harmony import */ var _sentry_browser__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2483);
9293
  /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6989);
9294
  /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__);
9295
  var _window$A8C_ETK_Error;
error-reporting/dist/error-reporting.min.js CHANGED
@@ -1,32 +1,2 @@
1
- !function(){"use strict";var t={487:function(t,n,e){e.d(n,{u:function(){return l}});var r=e(334),i=e(4911),o=e(9504),s=e(2226),a=e(9798),u=e(1988),c=e(1449),f=e(6149),p=e(4827),d=e(6144),l=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(n,t),n.prototype.eventFromException=function(t,n){return(0,u.dr)(t,n,this._options.attachStacktrace)},n.prototype.eventFromMessage=function(t,n,e){return void 0===n&&(n=s.z.Info),(0,u.aB)(t,n,e,this._options.attachStacktrace)},n.prototype._setupTransport=function(){if(!this._options.dsn)return t.prototype._setupTransport.call(this);var n=(0,r.pi)((0,r.pi)({},this._options.transportOptions),{dsn:this._options.dsn,tunnel:this._options.tunnel,sendClientReports:this._options.sendClientReports,_metadata:this._options._metadata}),e=(0,i.hd)(n.dsn,n._metadata,n.tunnel),o=(0,i.Ut)(e.dsn,e.tunnel);if(this._options.transport)return new this._options.transport(n);if((0,a.Ak)()){var s=(0,r.pi)({},n.fetchParameters);return this._newTransport=(0,c.k)({requestOptions:s,url:o}),new f.V(n)}return this._newTransport=(0,p.H)({url:o,headers:n.headers}),new d.w(n)},n}(o.N)},2314:function(t,n,e){e.d(n,{R:function(){return d}});var r=e(334),i=e(1476),o=e(9849),s=e(5907),a=e(8536),u=e(487),c=e(7904),f=e(2634),p=e(8356),d=function(t){function n(n){void 0===n&&(n={});return n._metadata=n._metadata||{},n._metadata.sdk=n._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:i.J}],version:i.J},t.call(this,u.u,n)||this}return(0,r.ZT)(n,t),n.prototype.showReportDialog=function(t){void 0===t&&(t={}),(0,s.R)().document&&(this._isEnabled()?(0,f.BS)((0,r.pi)((0,r.pi)({},t),{dsn:t.dsn||this.getDsn()})):c.h&&a.kg.error("Trying to call showReportDialog with Sentry Client disabled"))},n.prototype._prepareEvent=function(n,e,r){return n.platform=n.platform||"javascript",t.prototype._prepareEvent.call(this,n,e,r)},n.prototype._sendEvent=function(n){var e=this.getIntegration(p.O);e&&e.addSentryBreadcrumb(n),t.prototype._sendEvent.call(this,n)},n}(o.W)},1988:function(t,n,e){e.d(n,{GJ:function(){return d},dr:function(){return _},aB:function(){return g},ME:function(){return m}});var r=e(334),i=e(2226),o=e(1757),s=e(1995),a=e(8035),u=e(9038),c=e(3699),f=e(7946),p=e(2224);function d(t){var n=h(t),e={type:t&&t.name,value:y(t)};return n.length&&(e.stacktrace={frames:n}),void 0===e.type&&""===e.value&&(e.value="Unrecoverable error caught"),e}function l(t){return{exception:{values:[d(t)]}}}function h(t){var n=t.stacktrace||t.stack||"",e=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(v.test(t.message))return 1}return 0}(t);try{return(0,u.pE)(p.CS,p.ay,p.s$,p.aL,p.Pi)(n,e)}catch(r){}return[]}var v=/Minified React error #\d+;/i;function y(t){var n=t&&t.message;return n?n.error&&"string"==typeof n.error.message?n.error.message:n:"No error message"}function _(t,n,e){var r=m(t,n&&n.syntheticException||void 0,e);return(0,c.EG)(r),r.level=i.z.Error,n&&n.event_id&&(r.event_id=n.event_id),(0,f.WD)(r)}function g(t,n,e,r){void 0===n&&(n=i.z.Info);var o=b(t,e&&e.syntheticException||void 0,r);return o.level=n,e&&e.event_id&&(o.event_id=e.event_id),(0,f.WD)(o)}function m(t,n,e,i){var u;if((0,o.VW)(t)&&t.error)return l(t.error);if((0,o.TX)(t)||(0,o.fm)(t)){var f=t;if("stack"in t)u=l(t);else{var p=f.name||((0,o.TX)(f)?"DOMError":"DOMException"),d=f.message?p+": "+f.message:p;u=b(d,n,e),(0,c.Db)(u,d)}return"code"in f&&(u.tags=(0,r.pi)((0,r.pi)({},u.tags),{"DOMException.code":""+f.code})),u}return(0,o.VZ)(t)?l(t):(0,o.PO)(t)||(0,o.cO)(t)?(u=function(t,n,e){var r={exception:{values:[{type:(0,o.cO)(t)?t.constructor.name:e?"UnhandledRejection":"Error",value:"Non-Error "+(e?"promise rejection":"exception")+" captured with keys: "+(0,s.zf)(t)}]},extra:{__serialized__:(0,a.Qy)(t)}};if(n){var i=h(n);i.length&&(r.stacktrace={frames:i})}return r}(t,n,i),(0,c.EG)(u,{synthetic:!0}),u):(u=b(t,n,e),(0,c.Db)(u,""+t,void 0),(0,c.EG)(u,{synthetic:!0}),u)}function b(t,n,e){var r={message:t};if(e&&n){var i=h(n);i.length&&(r.stacktrace={frames:i})}return r}},7904:function(t,n,e){e.d(n,{h:function(){return r}});var r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},2634:function(t,n,e){e.d(n,{Wz:function(){return l},re:function(){return v},BS:function(){return y}});var r=e(334),i=e(4678),o=e(4911),s=e(5907),a=e(1995),u=e(3699),c=e(8536),f=e(7904),p=(0,s.R)(),d=0;function l(){return d>0}function h(){d+=1,setTimeout((function(){d-=1}))}function v(t,n,e){if(void 0===n&&(n={}),"function"!=typeof t)return t;try{var o=t.__sentry_wrapped__;if(o)return o;if((0,a.HK)(t))return t}catch(f){return t}var s=function(){var o=Array.prototype.slice.call(arguments);try{e&&"function"==typeof e&&e.apply(this,arguments);var s=o.map((function(t){return v(t,n)}));return t.apply(this,s)}catch(a){throw h(),(0,i.$e)((function(t){t.addEventProcessor((function(t){return n.mechanism&&((0,u.Db)(t,void 0,void 0),(0,u.EG)(t,n.mechanism)),t.extra=(0,r.pi)((0,r.pi)({},t.extra),{arguments:o}),t})),(0,i.Tb)(a)})),a}};try{for(var c in t)Object.prototype.hasOwnProperty.call(t,c)&&(s[c]=t[c])}catch(p){}(0,a.$Q)(s,t),(0,a.xp)(t,"__sentry_wrapped__",s);try{Object.getOwnPropertyDescriptor(s,"name").configurable&&Object.defineProperty(s,"name",{get:function(){return t.name}})}catch(p){}return s}function y(t){if(void 0===t&&(t={}),p.document)if(t.eventId)if(t.dsn){var n=p.document.createElement("script");n.async=!0,n.src=(0,o.hR)(t.dsn,t),t.onLoad&&(n.onload=t.onLoad);var e=p.document.head||p.document.body;e&&e.appendChild(n)}else f.h&&c.kg.error("Missing dsn option in showReportDialog call");else f.h&&c.kg.error("Missing eventId option in showReportDialog call")}},8356:function(t,n,e){e.d(n,{O:function(){return d}});var r=e(334),i=e(8585),o=e(2226),s=e(3699),a=e(4005),u=e(4194),c=e(8653),f=e(9660),p=e(5907),d=function(){function t(n){this.name=t.id,this._options=(0,r.pi)({console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0},n)}return t.prototype.addSentryBreadcrumb=function(t){this._options.sentry&&(0,i.Gd)().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:(0,s.jH)(t)},{event:t})},t.prototype.setupOnce=function(){this._options.console&&(0,a.o)("console",l),this._options.dom&&(0,a.o)("dom",function(t){function n(n){var e,r="object"==typeof t?t.serializeAttribute:void 0;"string"==typeof r&&(r=[r]);try{e=n.event.target?(0,u.R)(n.event.target,r):(0,u.R)(n.event,r)}catch(o){e="<unknown>"}0!==e.length&&(0,i.Gd)().addBreadcrumb({category:"ui."+n.name,message:e},{event:n.event,name:n.name,global:n.global})}return n}(this._options.dom)),this._options.xhr&&(0,a.o)("xhr",h),this._options.fetch&&(0,a.o)("fetch",v),this._options.history&&(0,a.o)("history",y)},t.id="Breadcrumbs",t}();function l(t){var n={category:"console",data:{arguments:t.args,logger:"console"},level:(0,c.E)(t.level),message:(0,f.nK)(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;n.message="Assertion failed: "+((0,f.nK)(t.args.slice(1)," ")||"console.assert"),n.data.arguments=t.args.slice(1)}(0,i.Gd)().addBreadcrumb(n,{input:t.args,level:t.level})}function h(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;var n=t.xhr.__sentry_xhr__||{},e=n.method,r=n.url,o=n.status_code,s=n.body;(0,i.Gd)().addBreadcrumb({category:"xhr",data:{method:e,url:r,status_code:o},type:"http"},{xhr:t.xhr,input:s})}else;}function v(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method||(t.error?(0,i.Gd)().addBreadcrumb({category:"fetch",data:t.fetchData,level:o.z.Error,type:"http"},{data:t.error,input:t.args}):(0,i.Gd)().addBreadcrumb({category:"fetch",data:(0,r.pi)((0,r.pi)({},t.fetchData),{status_code:t.response.status}),type:"http"},{input:t.args,response:t.response})))}function y(t){var n=(0,p.R)(),e=t.from,r=t.to,o=(0,s.en)(n.location.href),a=(0,s.en)(e),u=(0,s.en)(r);a.path||(a=o),o.protocol===u.protocol&&o.host===u.host&&(r=u.relative),o.protocol===a.protocol&&o.host===a.host&&(e=a.relative),(0,i.Gd)().addBreadcrumb({category:"navigation",data:{from:e,to:r}})}},184:function(t,n,e){e.d(n,{I:function(){return o}});var r=e(8536),i=e(7904),o=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(n,e){n((function(n){var o=e().getIntegration(t);if(o){try{if(function(t,n){if(!n)return!1;if(function(t,n){var e=t.message,r=n.message;if(!e&&!r)return!1;if(e&&!r||!e&&r)return!1;if(e!==r)return!1;if(!a(t,n))return!1;if(!s(t,n))return!1;return!0}(t,n))return!0;if(function(t,n){var e=u(n),r=u(t);if(!e||!r)return!1;if(e.type!==r.type||e.value!==r.value)return!1;if(!a(t,n))return!1;if(!s(t,n))return!1;return!0}(t,n))return!0;return!1}(n,o._previousEvent))return i.h&&r.kg.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(c){return o._previousEvent=n}return o._previousEvent=n}return n}))},t.id="Dedupe",t}();function s(t,n){var e=c(t),r=c(n);if(!e&&!r)return!0;if(e&&!r||!e&&r)return!1;if(e=e,(r=r).length!==e.length)return!1;for(var i=0;i<r.length;i++){var o=r[i],s=e[i];if(o.filename!==s.filename||o.lineno!==s.lineno||o.colno!==s.colno||o.function!==s.function)return!1}return!0}function a(t,n){var e=t.fingerprint,r=n.fingerprint;if(!e&&!r)return!0;if(e&&!r||!e&&r)return!1;e=e,r=r;try{return!(e.join("")!==r.join(""))}catch(i){return!1}}function u(t){return t.exception&&t.exception.values&&t.exception.values[0]}function c(t){var n=t.exception;if(n)try{return n.values[0].stacktrace.frames}catch(e){return}else if(t.stacktrace)return t.stacktrace.frames}},1228:function(t,n,e){e.d(n,{d:function(){return h}});var r=e(334),i=e(8585),o=e(2226),s=e(4005),a=e(1757),u=e(4194),c=e(8536),f=e(3699),p=e(1988),d=e(7904),l=e(2634),h=function(){function t(n){this.name=t.id,this._installFunc={onerror:v,onunhandledrejection:y},this._options=(0,r.pi)({onerror:!0,onunhandledrejection:!0},n)}return t.prototype.setupOnce=function(){Error.stackTraceLimit=50;var t,n=this._options;for(var e in n){var r=this._installFunc[e];r&&n[e]&&(t=e,d.h&&c.kg.log("Global Handler attached: "+t),r(),this._installFunc[e]=void 0)}},t.id="GlobalHandlers",t}();function v(){(0,s.o)("error",(function(t){var n=(0,r.CR)(m(),2),e=n[0],i=n[1];if(e.getIntegration(h)){var s=t.msg,u=t.url,c=t.line,f=t.column,d=t.error;if(!((0,l.Wz)()||d&&d.__sentry_own_request__)){var v=void 0===d&&(0,a.HD)(s)?function(t,n,e,r){var i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,o=(0,a.VW)(t)?t.message:t,s="Error",u=o.match(i);u&&(s=u[1],o=u[2]);return _({exception:{values:[{type:s,value:o}]}},n,e,r)}(s,u,c,f):_((0,p.ME)(d||s,void 0,i,!1),u,c,f);v.level=o.z.Error,g(e,d,v,"onerror")}}}))}function y(){(0,s.o)("unhandledrejection",(function(t){var n=(0,r.CR)(m(),2),e=n[0],i=n[1];if(e.getIntegration(h)){var s=t;try{"reason"in t?s=t.reason:"detail"in t&&"reason"in t.detail&&(s=t.detail.reason)}catch(c){}if((0,l.Wz)()||s&&s.__sentry_own_request__)return!0;var u=(0,a.pt)(s)?{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(s)}]}}:(0,p.ME)(s,void 0,i,!0);u.level=o.z.Error,g(e,s,u,"onunhandledrejection")}}))}function _(t,n,e,r){var i=t.exception=t.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},c=s.stacktrace=s.stacktrace||{},f=c.frames=c.frames||[],p=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(e,10))?void 0:e,l=(0,a.HD)(n)&&n.length>0?n:(0,u.l)();return 0===f.length&&f.push({colno:p,filename:l,function:"?",in_app:!0,lineno:d}),t}function g(t,n,e,r){(0,f.EG)(e,{handled:!1,type:r}),t.captureEvent(e,{originalException:n})}function m(){var t=(0,i.Gd)(),n=t.getClient();return[t,n&&n.getOptions().attachStacktrace]}},3440:function(t,n,e){e.d(n,{iP:function(){return u}});var r=e(334),i=e(1684),o=e(8585),s=e(1757),a=e(1988),u=function(){function t(n){void 0===n&&(n={}),this.name=t.id,this._key=n.key||"cause",this._limit=n.limit||5}return t.prototype.setupOnce=function(){(0,i.c)((function(n,e){var i=(0,o.Gd)().getIntegration(t);return i?function(t,n,e,i){if(!(e.exception&&e.exception.values&&i&&(0,s.V9)(i.originalException,Error)))return e;var o=c(n,i.originalException,t);return e.exception.values=(0,r.fl)(o,e.exception.values),e}(i._key,i._limit,n,e):n}))},t.id="LinkedErrors",t}();function c(t,n,e,i){if(void 0===i&&(i=[]),!(0,s.V9)(n[e],Error)||i.length+1>=t)return i;var o=(0,a.GJ)(n[e]);return c(t,n[e],e,(0,r.fl)([o],i))}},3399:function(t,n,e){e.d(n,{p:function(){return c}});var r=e(334),i=e(5907),o=e(1995),s=e(9038),a=e(2634),u=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],c=function(){function t(n){this.name=t.id,this._options=(0,r.pi)({XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0},n)}return t.prototype.setupOnce=function(){var t=(0,i.R)();this._options.setTimeout&&(0,o.hl)(t,"setTimeout",f),this._options.setInterval&&(0,o.hl)(t,"setInterval",f),this._options.requestAnimationFrame&&(0,o.hl)(t,"requestAnimationFrame",p),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&(0,o.hl)(XMLHttpRequest.prototype,"send",d);var n=this._options.eventTarget;n&&(Array.isArray(n)?n:u).forEach(l)},t.id="TryCatch",t}();function f(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var r=n[0];return n[0]=(0,a.re)(r,{mechanism:{data:{function:(0,s.$P)(t)},handled:!0,type:"instrument"}}),t.apply(this,n)}}function p(t){return function(n){return t.apply(this,[(0,a.re)(n,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,s.$P)(t)},handled:!0,type:"instrument"}})])}}function d(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var r=this,i=["onload","onerror","onprogress","onreadystatechange"];return i.forEach((function(t){t in r&&"function"==typeof r[t]&&(0,o.hl)(r,t,(function(n){var e={mechanism:{data:{function:t,handler:(0,s.$P)(n)},handled:!0,type:"instrument"}},r=(0,o.HK)(n);return r&&(e.mechanism.data.handler=(0,s.$P)(r)),(0,a.re)(n,e)}))})),t.apply(this,n)}}function l(t){var n=(0,i.R)(),e=n[t]&&n[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&((0,o.hl)(e,"addEventListener",(function(n){return function(e,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=(0,a.re)(r.handleEvent.bind(r),{mechanism:{data:{function:"handleEvent",handler:(0,s.$P)(r),target:t},handled:!0,type:"instrument"}}))}catch(o){}return n.apply(this,[e,(0,a.re)(r,{mechanism:{data:{function:"addEventListener",handler:(0,s.$P)(r),target:t},handled:!0,type:"instrument"}}),i])}})),(0,o.hl)(e,"removeEventListener",(function(t){return function(n,e,r){var i=e;try{var o=i&&i.__sentry_wrapped__;o&&t.call(this,n,o,r)}catch(s){}return t.call(this,n,i,r)}})))}},9992:function(t,n,e){e.d(n,{Z:function(){return a}});var r=e(334),i=e(1684),o=e(8585),s=(0,e(5907).R)(),a=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){(0,i.c)((function(n){if((0,o.Gd)().getIntegration(t)){if(!s.navigator&&!s.location&&!s.document)return n;var e=n.request&&n.request.url||s.location&&s.location.href,i=(s.document||{}).referrer,a=(s.navigator||{}).userAgent,u=(0,r.pi)((0,r.pi)((0,r.pi)({},n.request&&n.request.headers),i&&{Referer:i}),a&&{"User-Agent":a}),c=(0,r.pi)((0,r.pi)({},e&&{url:e}),{headers:u});return(0,r.pi)((0,r.pi)({},n),{request:c})}return n}))},t.id="UserAgent",t}()},2456:function(t,n,e){e.d(n,{S1:function(){return b},yl:function(){return x}});var r=e(1061),i=e(6286),o=e(6853),s=e(8585),a=e(5907),u=e(8536),c=e(7946),f=e(4005),p=e(2314),d=e(7904),l=e(3399),h=e(8356),v=e(1228),y=e(3440),_=e(184),g=e(9992),m=[new r.QD,new i.c,new l.p,new h.O,new v.d,new y.iP,new _.I,new g.Z];function b(t){if(void 0===t&&(t={}),void 0===t.defaultIntegrations&&(t.defaultIntegrations=m),void 0===t.release){var n=(0,a.R)();n.SENTRY_RELEASE&&n.SENTRY_RELEASE.id&&(t.release=n.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0),(0,o.M)(p.R,t),t.autoSessionTracking&&function(){if(void 0===(0,a.R)().document)return void(d.h&&u.kg.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));var t=(0,s.Gd)();if(!t.captureSession)return;w(t),(0,f.o)("history",(function(t){var n=t.from,e=t.to;void 0!==n&&n!==e&&w((0,s.Gd)())}))}()}function x(t){var n=(0,s.Gd)().getClient();return n?n.flush(t):(d.h&&u.kg.warn("Cannot flush events. No client defined."),(0,c.WD)(!1))}function w(t){t.startSession({ignoreDuration:!0}),t.captureSession()}},2224:function(t,n,e){e.d(n,{s$:function(){return u},Pi:function(){return p},aL:function(){return l},CS:function(){return v},ay:function(){return _}});var r=e(334),i="?";function o(t,n,e,r){var i={filename:t,function:n,in_app:!0};return void 0!==e&&(i.lineno=e),void 0!==r&&(i.colno=r),i}var s=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,a=/\((\S*)(?::(\d+))(?::(\d+))\)/,u=[30,function(t){var n=s.exec(t);if(n){if(n[2]&&0===n[2].indexOf("eval")){var e=a.exec(n[2]);e&&(n[2]=e[1],n[3]=e[2],n[4]=e[3])}var u=(0,r.CR)(g(n[1]||i,n[2]),2),c=u[0];return o(u[1],c,n[3]?+n[3]:void 0,n[4]?+n[4]:void 0)}}],c=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,f=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,p=[50,function(t){var n,e=c.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){var s=f.exec(e[3]);s&&(e[1]=e[1]||"eval",e[3]=s[1],e[4]=s[2],e[5]="")}var a=e[3],u=e[1]||i;return u=(n=(0,r.CR)(g(u,a),2))[0],o(a=n[1],u,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],d=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,l=[40,function(t){var n=d.exec(t);return n?o(n[2],n[1]||i,+n[3],n[4]?+n[4]:void 0):void 0}],h=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,v=[10,function(t){var n=h.exec(t);return n?o(n[2],n[3]||i,+n[1]):void 0}],y=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i,_=[20,function(t){var n=y.exec(t);return n?o(n[5],n[3]||n[4]||i,+n[1],+n[2]):void 0}],g=function(t,n){var e=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return e||r?[-1!==t.indexOf("@")?t.split("@")[0]:i,e?"safari-extension:"+n:"safari-web-extension:"+n]:[t,n]}},6526:function(t,n,e){e.d(n,{d:function(){return g}});var r=e(334),i=e(4911),o=e(6508),s=e(5907),a=e(8963),u=e(8536),c=e(250),f=e(3135),p=e(6894),d=e(8886),l=e(1630),h=e(7904),v=e(5854);function y(t){return"event"===t?"error":t}var _=(0,s.R)(),g=function(){function t(t){var n=this;this.options=t,this._buffer=(0,a.x)(30),this._rateLimits={},this._outcomes={},this._api=(0,i.hd)(t.dsn,t._metadata,t.tunnel),this.url=(0,i.qi)(this._api.dsn),this.options.sendClientReports&&_.document&&_.document.addEventListener("visibilitychange",(function(){"hidden"===_.document.visibilityState&&n._flushOutcomes()}))}return t.prototype.sendEvent=function(t){return this._sendRequest((0,o.nA)(t,this._api),t)},t.prototype.sendSession=function(t){return this._sendRequest((0,o.Qz)(t,this._api),t)},t.prototype.close=function(t){return this._buffer.drain(t)},t.prototype.recordLostEvent=function(t,n){var e;if(this.options.sendClientReports){var r=y(n)+":"+t;h.h&&u.kg.log("Adding outcome: "+r),this._outcomes[r]=(null!=(e=this._outcomes[r])?e:0)+1}},t.prototype._flushOutcomes=function(){if(this.options.sendClientReports){var t=this._outcomes;if(this._outcomes={},Object.keys(t).length){h.h&&u.kg.log("Flushing outcomes:\n"+JSON.stringify(t,null,2));var n=(0,i.Ut)(this._api.dsn,this._api.tunnel),e=Object.keys(t).map((function(n){var e=(0,r.CR)(n.split(":"),2),i=e[0];return{reason:e[1],category:i,quantity:t[n]}})),o=(0,c.y)(e,this._api.tunnel&&(0,f.R)(this._api.dsn));try{(0,v.z)(n,(0,p.V$)(o))}catch(s){h.h&&u.kg.error(s)}}else h.h&&u.kg.log("No outcomes to flush")}},t.prototype._handleResponse=function(t){var n=t.requestType,e=t.response,r=t.headers,i=t.resolve,o=t.reject,s=(0,d.F)(e.status);this._rateLimits=(0,l.WG)(this._rateLimits,r),this._isRateLimited(n)&&h.h&&u.kg.warn("Too many "+n+" requests, backing off until: "+this._disabledUntil(n)),"success"!==s?o(e):i({status:s})},t.prototype._disabledUntil=function(t){var n=y(t);return new Date((0,l.ns)(this._rateLimits,n))},t.prototype._isRateLimited=function(t){var n=y(t);return(0,l.Q)(this._rateLimits,n)},t}()},6149:function(t,n,e){e.d(n,{V:function(){return c}});var r=e(334),i=e(9798),o=e(7946),s=e(4388),a=e(6526),u=e(5854),c=function(t){function n(n,e){void 0===e&&(e=(0,u.x)());var r=t.call(this,n)||this;return r._fetch=e,r}return(0,r.ZT)(n,t),n.prototype._sendRequest=function(t,n){var e=this;if(this._isRateLimited(t.type))return this.recordLostEvent("ratelimit_backoff",t.type),Promise.reject({event:n,type:t.type,reason:"Transport for "+t.type+" requests locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429});var r={body:t.body,method:"POST",referrerPolicy:(0,i.hv)()?"origin":""};return void 0!==this.options.fetchParameters&&Object.assign(r,this.options.fetchParameters),void 0!==this.options.headers&&(r.headers=this.options.headers),this._buffer.add((function(){return new o.cW((function(n,i){e._fetch(t.url,r).then((function(r){var o={"x-sentry-rate-limits":r.headers.get("X-Sentry-Rate-Limits"),"retry-after":r.headers.get("Retry-After")};e._handleResponse({requestType:t.type,response:r,headers:o,resolve:n,reject:i})})).catch(i)}))})).then(void 0,(function(n){throw n instanceof s.b?e.recordLostEvent("queue_overflow",t.type):e.recordLostEvent("network_error",t.type),n}))},n}(a.d)},1449:function(t,n,e){e.d(n,{k:function(){return s}});var r=e(334),i=e(1518),o=e(5854);function s(t,n){return void 0===n&&(n=(0,o.x)()),(0,i.qv)({bufferSize:t.bufferSize},(function(e){var i=(0,r.pi)({body:e.body,method:"POST",referrerPolicy:"origin"},t.requestOptions);return n(t.url,i).then((function(t){return t.text().then((function(n){return{body:n,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")},reason:t.statusText,statusCode:t.status}}))}))}))}},4827:function(t,n,e){e.d(n,{H:function(){return o}});var r=e(1518),i=e(7946);function o(t){return(0,r.qv)({bufferSize:t.bufferSize},(function(n){return new i.cW((function(e,r){var i=new XMLHttpRequest;for(var o in i.onreadystatechange=function(){if(4===i.readyState){var t={body:i.response,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")},reason:i.statusText,statusCode:i.status};e(t)}},i.open("POST",t.url),t.headers)Object.prototype.hasOwnProperty.call(t.headers,o)&&i.setRequestHeader(o,t.headers[o]);i.send(n.body)}))}))}},5854:function(t,n,e){e.d(n,{x:function(){return f},z:function(){return p}});var r,i=e(5907),o=e(9798),s=e(8536),a=e(3518),u=e(7904),c=(0,i.R)();function f(){if(r)return r;if((0,o.Du)(c.fetch))return r=c.fetch.bind(c);var t=c.document,n=c.fetch;if(t&&"function"==typeof t.createElement)try{var e=t.createElement("iframe");e.hidden=!0,t.head.appendChild(e);var i=e.contentWindow;i&&i.fetch&&(n=i.fetch),t.head.removeChild(e)}catch(a){u.h&&s.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",a)}return r=n.bind(c)}function p(t,n){if("[object Navigator]"===Object.prototype.toString.call(c&&c.navigator)&&"function"==typeof c.navigator.sendBeacon)return c.navigator.sendBeacon.bind(c.navigator)(t,n);if((0,o.Ak)()){var e=f();return(0,a.I)(e(t,{body:n,method:"POST",credentials:"omit",keepalive:!0}))}}},6144:function(t,n,e){e.d(n,{w:function(){return s}});var r=e(334),i=e(7946),o=e(4388),s=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return(0,r.ZT)(n,t),n.prototype._sendRequest=function(t,n){var e=this;return this._isRateLimited(t.type)?(this.recordLostEvent("ratelimit_backoff",t.type),Promise.reject({event:n,type:t.type,reason:"Transport for "+t.type+" requests locked till "+this._disabledUntil(t.type)+" due to too many requests.",status:429})):this._buffer.add((function(){return new i.cW((function(n,r){var i=new XMLHttpRequest;for(var o in i.onreadystatechange=function(){if(4===i.readyState){var o={"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")};e._handleResponse({requestType:t.type,response:i,headers:o,resolve:n,reject:r})}},i.open("POST",t.url),e.options.headers)Object.prototype.hasOwnProperty.call(e.options.headers,o)&&i.setRequestHeader(o,e.options.headers[o]);i.send(t.body)}))})).then(void 0,(function(n){throw n instanceof o.b?e.recordLostEvent("queue_overflow",t.type):e.recordLostEvent("network_error",t.type),n}))},n}(e(6526).d)},334:function(t,n,e){e.d(n,{ZT:function(){return i},pi:function(){return o},CR:function(){return s},fl:function(){return a}});
2
- /*! *****************************************************************************
3
- Copyright (c) Microsoft Corporation.
4
-
5
- Permission to use, copy, modify, and/or distribute this software for any
6
- purpose with or without fee is hereby granted.
7
-
8
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14
- PERFORMANCE OF THIS SOFTWARE.
15
- ***************************************************************************** */
16
- var r=function(t,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])},r(t,n)};function i(t,n){function __(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}var o=function(){return o=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t},o.apply(this,arguments)};function s(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),s=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return s}function a(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(s(arguments[n]));return t}},4911:function(t,n,e){e.d(n,{hd:function(){return o},qi:function(){return f},Ut:function(){return p},hR:function(){return d}});var r=e(3135),i=e(1995);!function(){function t(t,n,e){void 0===n&&(n={}),this.dsn=t,this._dsnObject=(0,r.v)(t),this.metadata=n,this._tunnel=e}t.prototype.getDsn=function(){return this._dsnObject},t.prototype.forceEnvelope=function(){return!!this._tunnel},t.prototype.getBaseApiEndpoint=function(){return s(this._dsnObject)},t.prototype.getStoreEndpoint=function(){return c(this._dsnObject)},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return f(this._dsnObject)},t.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return p(this._dsnObject,this._tunnel)}}();function o(t,n,e){return{initDsn:t,metadata:n||{},dsn:(0,r.v)(t),tunnel:e}}function s(t){var n=t.protocol?t.protocol+":":"",e=t.port?":"+t.port:"";return n+"//"+t.host+e+(t.path?"/"+t.path:"")+"/api/"}function a(t,n){return""+s(t)+t.projectId+"/"+n+"/"}function u(t){return(0,i._j)({sentry_key:t.publicKey,sentry_version:"7"})}function c(t){return a(t,"store")}function f(t){return c(t)+"?"+u(t)}function p(t,n){return n||function(t){return a(t,"envelope")}(t)+"?"+u(t)}function d(t,n){var e=(0,r.v)(t),i=s(e)+"embed/error-page/",o="dsn="+(0,r.R)(e);for(var a in n)if("dsn"!==a)if("user"===a){if(!n.user)continue;n.user.name&&(o+="&name="+encodeURIComponent(n.user.name)),n.user.email&&(o+="&email="+encodeURIComponent(n.user.email))}else o+="&"+encodeURIComponent(a)+"="+encodeURIComponent(n[a]);return i+"?"+o}},9504:function(t,n,e){e.d(n,{N:function(){return f}});var r=e(5733),i=e(8536),o=e(4388),s=e(4911),a=e(428),u=e(6508),c=e(3926),f=function(){function t(t){this._options=t,this._options.dsn||a.h&&i.kg.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return t.prototype.eventFromException=function(t,n){throw new o.b("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(t,n,e){throw new o.b("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(t){if(this._newTransport&&this._options.dsn&&this._options._experiments&&this._options._experiments.newTransport){var n=(0,s.hd)(this._options.dsn,this._options._metadata,this._options.tunnel),e=(0,u.Mq)(t,n);this._newTransport.send(e).then(null,(function(t){a.h&&i.kg.error("Error while sending event:",t)}))}else this._transport.sendEvent(t).then(null,(function(t){a.h&&i.kg.error("Error while sending event:",t)}))},t.prototype.sendSession=function(t){if(this._transport.sendSession)if(this._newTransport&&this._options.dsn&&this._options._experiments&&this._options._experiments.newTransport){var n=(0,s.hd)(this._options.dsn,this._options._metadata,this._options.tunnel),e=(0,r.CR)((0,u.Q3)(t,n),1)[0];this._newTransport.send(e).then(null,(function(t){a.h&&i.kg.error("Error while sending session:",t)}))}else this._transport.sendSession(t).then(null,(function(t){a.h&&i.kg.error("Error while sending session:",t)}));else a.h&&i.kg.warn("Dropping session because custom transport doesn't implement sendSession")},t.prototype.getTransport=function(){return this._transport},t.prototype._setupTransport=function(){return new c.V},t}()},9849:function(t,n,e){e.d(n,{W:function(){return _}});var r=e(5733),i=e(1684),o=e(3135),s=e(3699),a=e(8536),u=e(1757),c=e(7946),f=e(7790),p=e(8035),d=e(9660),l=e(4388),h=e(428),v=e(8889),y="Not capturing exception because it's already been captured.",_=function(){function t(t,n){this._integrations={},this._numProcessing=0,this._backend=new t(n),this._options=n,n.dsn&&(this._dsn=(0,o.v)(n.dsn))}return t.prototype.captureException=function(t,n,e){var r=this;if(!(0,s.YO)(t)){var i=n&&n.event_id;return this._process(this._getBackend().eventFromException(t,n).then((function(t){return r._captureEvent(t,n,e)})).then((function(t){i=t}))),i}h.h&&a.kg.log(y)},t.prototype.captureMessage=function(t,n,e,r){var i=this,o=e&&e.event_id,s=(0,u.pt)(t)?this._getBackend().eventFromMessage(String(t),n,e):this._getBackend().eventFromException(t,e);return this._process(s.then((function(t){return i._captureEvent(t,e,r)})).then((function(t){o=t}))),o},t.prototype.captureEvent=function(t,n,e){if(!(n&&n.originalException&&(0,s.YO)(n.originalException))){var r=n&&n.event_id;return this._process(this._captureEvent(t,n,e).then((function(t){r=t}))),r}h.h&&a.kg.log(y)},t.prototype.captureSession=function(t){this._isEnabled()?"string"!=typeof t.release?h.h&&a.kg.warn("Discarded session because of missing or non-string release"):(this._sendSession(t),t.update({init:!1})):h.h&&a.kg.warn("SDK not enabled, will not capture session.")},t.prototype.getDsn=function(){return this._dsn},t.prototype.getOptions=function(){return this._options},t.prototype.getTransport=function(){return this._getBackend().getTransport()},t.prototype.flush=function(t){var n=this;return this._isClientDoneProcessing(t).then((function(e){return n.getTransport().close(t).then((function(t){return e&&t}))}))},t.prototype.close=function(t){var n=this;return this.flush(t).then((function(t){return n.getOptions().enabled=!1,t}))},t.prototype.setupIntegrations=function(){this._isEnabled()&&!this._integrations.initialized&&(this._integrations=(0,v.q4)(this._options))},t.prototype.getIntegration=function(t){try{return this._integrations[t.id]||null}catch(n){return h.h&&a.kg.warn("Cannot retrieve integration "+t.id+" from the current Client"),null}},t.prototype._updateSessionFromEvent=function(t,n){var e,i,o=!1,s=!1,a=n.exception&&n.exception.values;if(a){s=!0;try{for(var u=(0,r.XA)(a),c=u.next();!c.done;c=u.next()){var f=c.value.mechanism;if(f&&!1===f.handled){o=!0;break}}}catch(d){e={error:d}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(e)throw e.error}}}var p="ok"===t.status;(p&&0===t.errors||p&&o)&&(t.update((0,r.pi)((0,r.pi)({},o&&{status:"crashed"}),{errors:t.errors||Number(s||o)})),this.captureSession(t))},t.prototype._sendSession=function(t){this._getBackend().sendSession(t)},t.prototype._isClientDoneProcessing=function(t){var n=this;return new c.cW((function(e){var r=0,i=setInterval((function(){0==n._numProcessing?(clearInterval(i),e(!0)):(r+=1,t&&r>=t&&(clearInterval(i),e(!1)))}),1)}))},t.prototype._getBackend=function(){return this._backend},t.prototype._isEnabled=function(){return!1!==this.getOptions().enabled&&void 0!==this._dsn},t.prototype._prepareEvent=function(t,n,e){var o=this,a=this.getOptions(),u=a.normalizeDepth,d=void 0===u?3:u,l=a.normalizeMaxBreadth,h=void 0===l?1e3:l,v=(0,r.pi)((0,r.pi)({},t),{event_id:t.event_id||(e&&e.event_id?e.event_id:(0,s.DM)()),timestamp:t.timestamp||(0,f.yW)()});this._applyClientOptions(v),this._applyIntegrationsMetadata(v);var y=n;e&&e.captureContext&&(y=i.s.clone(y).update(e.captureContext));var _=(0,c.WD)(v);return y&&(_=y.applyToEvent(v,e)),_.then((function(t){return t&&(t.sdkProcessingMetadata=(0,r.pi)((0,r.pi)({},t.sdkProcessingMetadata),{normalizeDepth:(0,p.Fv)(d)+" ("+typeof d+")"})),"number"==typeof d&&d>0?o._normalizeEvent(t,d,h):t}))},t.prototype._normalizeEvent=function(t,n,e){if(!t)return null;var i=(0,r.pi)((0,r.pi)((0,r.pi)((0,r.pi)((0,r.pi)({},t),t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((function(t){return(0,r.pi)((0,r.pi)({},t),t.data&&{data:(0,p.Fv)(t.data,n,e)})}))}),t.user&&{user:(0,p.Fv)(t.user,n,e)}),t.contexts&&{contexts:(0,p.Fv)(t.contexts,n,e)}),t.extra&&{extra:(0,p.Fv)(t.extra,n,e)});return t.contexts&&t.contexts.trace&&(i.contexts.trace=t.contexts.trace),i.sdkProcessingMetadata=(0,r.pi)((0,r.pi)({},i.sdkProcessingMetadata),{baseClientNormalized:!0}),i},t.prototype._applyClientOptions=function(t){var n=this.getOptions(),e=n.environment,r=n.release,i=n.dist,o=n.maxValueLength,s=void 0===o?250:o;"environment"in t||(t.environment="environment"in n?e:"production"),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==i&&(t.dist=i),t.message&&(t.message=(0,d.$G)(t.message,s));var a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=(0,d.$G)(a.value,s));var u=t.request;u&&u.url&&(u.url=(0,d.$G)(u.url,s))},t.prototype._applyIntegrationsMetadata=function(t){var n=Object.keys(this._integrations);n.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=(0,r.fl)(t.sdk.integrations||[],n))},t.prototype._sendEvent=function(t){this._getBackend().sendEvent(t)},t.prototype._captureEvent=function(t,n,e){return this._processEvent(t,n,e).then((function(t){return t.event_id}),(function(t){h.h&&a.kg.error(t)}))},t.prototype._processEvent=function(t,n,e){var r=this,i=this.getOptions(),o=i.beforeSend,s=i.sampleRate,a=this.getTransport();function f(t,n){a.recordLostEvent&&a.recordLostEvent(t,n)}if(!this._isEnabled())return(0,c.$2)(new l.b("SDK not enabled, will not capture event."));var p="transaction"===t.type;return!p&&"number"==typeof s&&Math.random()>s?(f("sample_rate","event"),(0,c.$2)(new l.b("Discarding event because it's not included in the random sample (sampling rate = "+s+")"))):this._prepareEvent(t,e,n).then((function(e){if(null===e)throw f("event_processor",t.type||"event"),new l.b("An event processor returned null, will not send event.");return n&&n.data&&!0===n.data.__sentry__||p||!o?e:function(t){var n="`beforeSend` method has to return `null` or a valid event.";if((0,u.J8)(t))return t.then((function(t){if(!(0,u.PO)(t)&&null!==t)throw new l.b(n);return t}),(function(t){throw new l.b("beforeSend rejected with "+t)}));if(!(0,u.PO)(t)&&null!==t)throw new l.b(n);return t}(o(e,n))})).then((function(n){if(null===n)throw f("before_send",t.type||"event"),new l.b("`beforeSend` returned `null`, will not send event.");var i=e&&e.getSession&&e.getSession();return!p&&i&&r._updateSessionFromEvent(i,n),r._sendEvent(n),n})).then(null,(function(t){if(t instanceof l.b)throw t;throw r.captureException(t,{data:{__sentry__:!0},originalException:t}),new l.b("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+t)}))},t.prototype._process=function(t){var n=this;this._numProcessing+=1,t.then((function(t){return n._numProcessing-=1,t}),(function(t){return n._numProcessing-=1,t}))},t}()},428:function(t,n,e){e.d(n,{h:function(){return r}});var r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},8889:function(t,n,e){e.d(n,{q4:function(){return p}});var r=e(5733),i=e(1684),o=e(8585),s=e(8536),a=e(1995),u=e(428),c=[];function f(t){return t.reduce((function(t,n){return t.every((function(t){return n.name!==t.name}))&&t.push(n),t}),[])}function p(t){var n={};return function(t){var n=t.defaultIntegrations&&(0,r.fl)(t.defaultIntegrations)||[],e=t.integrations,i=(0,r.fl)(f(n));Array.isArray(e)?i=(0,r.fl)(i.filter((function(t){return e.every((function(n){return n.name!==t.name}))})),f(e)):"function"==typeof e&&(i=e(i),i=Array.isArray(i)?i:[i]);var o=i.map((function(t){return t.name})),s="Debug";return-1!==o.indexOf(s)&&i.push.apply(i,(0,r.fl)(i.splice(o.indexOf(s),1))),i}(t).forEach((function(t){n[t.name]=t,function(t){-1===c.indexOf(t.name)&&(t.setupOnce(i.c,o.Gd),c.push(t.name),u.h&&s.kg.log("Integration installed: "+t.name))}(t)})),(0,a.xp)(n,"initialized",!0),n}},6286:function(t,n,e){e.d(n,{c:function(){return o}});var r,i=e(1995),o=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){r=Function.prototype.toString,Function.prototype.toString=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=(0,i.HK)(this)||this;return r.apply(e,t)}},t.id="FunctionToString",t}()},1061:function(t,n,e){e.d(n,{QD:function(){return c}});var r=e(5733),i=e(8536),o=e(3699),s=e(9660),a=e(428),u=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],c=function(){function t(n){void 0===n&&(n={}),this._options=n,this.name=t.id}return t.prototype.setupOnce=function(n,e){n((function(n){var c=e();if(c){var f=c.getIntegration(t);if(f){var d=c.getClient(),l=d?d.getOptions():{},h=function(t,n){void 0===t&&(t={});void 0===n&&(n={});return{allowUrls:(0,r.fl)(t.whitelistUrls||[],t.allowUrls||[],n.whitelistUrls||[],n.allowUrls||[]),denyUrls:(0,r.fl)(t.blacklistUrls||[],t.denyUrls||[],n.blacklistUrls||[],n.denyUrls||[]),ignoreErrors:(0,r.fl)(t.ignoreErrors||[],n.ignoreErrors||[],u),ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(f._options,l);return function(t,n){if(n.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(n){}return!1}(t))return a.h&&i.kg.warn("Event dropped due to being internal Sentry Error.\nEvent: "+(0,o.jH)(t)),!0;if(function(t,n){if(!n||!n.length)return!1;return function(t){if(t.message)return[t.message];if(t.exception)try{var n=t.exception.values&&t.exception.values[0]||{},e=n.type,r=void 0===e?"":e,s=n.value,u=void 0===s?"":s;return[""+u,r+": "+u]}catch(c){return a.h&&i.kg.error("Cannot extract message for event "+(0,o.jH)(t)),[]}return[]}(t).some((function(t){return n.some((function(n){return(0,s.zC)(t,n)}))}))}(t,n.ignoreErrors))return a.h&&i.kg.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+(0,o.jH)(t)),!0;if(function(t,n){if(!n||!n.length)return!1;var e=p(t);return!!e&&n.some((function(t){return(0,s.zC)(e,t)}))}(t,n.denyUrls))return a.h&&i.kg.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: "+(0,o.jH)(t)+".\nUrl: "+p(t)),!0;if(!function(t,n){if(!n||!n.length)return!0;var e=p(t);return!e||n.some((function(t){return(0,s.zC)(e,t)}))}(t,n.allowUrls))return a.h&&i.kg.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+(0,o.jH)(t)+".\nUrl: "+p(t)),!0;return!1}(n,h)?null:n}}return n}))},t.id="InboundFilters",t}();function f(t){void 0===t&&(t=[]);for(var n=t.length-1;n>=0;n--){var e=t[n];if(e&&"<anonymous>"!==e.filename&&"[native code]"!==e.filename)return e.filename||null}return null}function p(t){try{if(t.stacktrace)return f(t.stacktrace.frames);var n;try{n=t.exception.values[0].stacktrace.frames}catch(e){}return n?f(n):null}catch(r){return a.h&&i.kg.error("Cannot extract url for event "+(0,o.jH)(t)),null}}},6508:function(t,n,e){e.d(n,{Q3:function(){return f},Qz:function(){return p},Mq:function(){return d},nA:function(){return l}});var r=e(5733),i=e(3135),o=e(6894),s=e(8035),a=e(4911);function u(t){if(t.metadata&&t.metadata.sdk){var n=t.metadata.sdk;return{name:n.name,version:n.version}}}function c(t,n){return n?(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||n.name,t.sdk.version=t.sdk.version||n.version,t.sdk.integrations=(0,r.fl)(t.sdk.integrations||[],n.integrations||[]),t.sdk.packages=(0,r.fl)(t.sdk.packages||[],n.packages||[]),t):t}function f(t,n){var e=u(n),s=(0,r.pi)((0,r.pi)({sent_at:(new Date).toISOString()},e&&{sdk:e}),!!n.tunnel&&{dsn:(0,i.R)(n.dsn)}),a="aggregates"in t?"sessions":"session",c=[{type:a},t];return[(0,o.Jd)(s,[c]),a]}function p(t,n){var e=(0,r.CR)(f(t,n),2),i=e[0],s=e[1];return{body:(0,o.V$)(i),type:s,url:(0,a.Ut)(n.dsn,n.tunnel)}}function d(t,n){var e=u(n),s=t.type||"event",a=(t.sdkProcessingMetadata||{}).transactionSampling||{},f=a.method,p=a.rate;c(t,n.metadata.sdk),t.tags=t.tags||{},t.extra=t.extra||{},t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baseClientNormalized||(t.tags.skippedNormalization=!0,t.extra.normalizeDepth=t.sdkProcessingMetadata?t.sdkProcessingMetadata.normalizeDepth:"unset"),delete t.sdkProcessingMetadata;var d=(0,r.pi)((0,r.pi)({event_id:t.event_id,sent_at:(new Date).toISOString()},e&&{sdk:e}),!!n.tunnel&&{dsn:(0,i.R)(n.dsn)}),l=[{type:s,sample_rates:[{id:f,rate:p}]},t];return(0,o.Jd)(d,[l])}function l(t,n){var e,f=u(n),p=t.type||"event",d="transaction"===p||!!n.tunnel,l=(t.sdkProcessingMetadata||{}).transactionSampling||{},h=l.method,v=l.rate;c(t,n.metadata.sdk),t.tags=t.tags||{},t.extra=t.extra||{},t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baseClientNormalized||(t.tags.skippedNormalization=!0,t.extra.normalizeDepth=t.sdkProcessingMetadata?t.sdkProcessingMetadata.normalizeDepth:"unset"),delete t.sdkProcessingMetadata;try{e=JSON.stringify(t)}catch(x){t.tags.JSONStringifyError=!0,t.extra.JSONStringifyError=x;try{e=JSON.stringify((0,s.Fv)(t))}catch(w){var y=w;e=JSON.stringify({message:"JSON.stringify error after renormalization",extra:{message:y.message,stack:y.stack}})}}var _={body:e,type:p,url:d?(0,a.Ut)(n.dsn,n.tunnel):(0,a.qi)(n.dsn)};if(d){var g=(0,r.pi)((0,r.pi)({event_id:t.event_id,sent_at:(new Date).toISOString()},f&&{sdk:f}),!!n.tunnel&&{dsn:(0,i.R)(n.dsn)}),m=[{type:p,sample_rates:[{id:h,rate:v}]},_.body],b=(0,o.Jd)(g,[m]);_.body=(0,o.V$)(b)}return _}},6853:function(t,n,e){e.d(n,{M:function(){return s}});var r=e(8585),i=e(8536),o=e(428);function s(t,n){!0===n.debug&&(o.h?i.kg.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));var e=(0,r.Gd)(),s=e.getScope();s&&s.update(n.initialScope);var a=new t(n);e.bindClient(a)}},1518:function(t,n,e){e.d(n,{qv:function(){return u}});var r=e(8963),i=e(6894),o=e(1630),s=e(7946),a=e(8886);function u(t,n,e){void 0===e&&(e=(0,r.x)(t.bufferSize||30));var u={};return{send:function(t){var r=(0,i.y7)(t),f="event"===r?"error":r,p={category:f,body:(0,i.V$)(t)};return(0,o.Q)(u,f)?(0,s.$2)({status:"rate_limit",reason:c(u,f)}):e.add((function(){return n(p).then((function(t){var n=t.body,e=t.headers,r=t.reason,i=t.statusCode,p=(0,a.F)(i);return e&&(u=(0,o.WG)(u,e)),"success"===p?(0,s.WD)({status:p,reason:r}):(0,s.$2)({status:p,reason:r||n||("rate_limit"===p?c(u,f):"Unknown transport error")})}))}))},flush:function(t){return e.drain(t)}}}function c(t,n){return"Too many "+n+" requests, backing off until: "+new Date((0,o.ns)(t,n)).toISOString()}},3926:function(t,n,e){e.d(n,{V:function(){return i}});var r=e(7946),i=function(){function t(){}return t.prototype.sendEvent=function(t){return(0,r.WD)({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:"skipped"})},t.prototype.close=function(t){return(0,r.WD)(!0)},t}()},1476:function(t,n,e){e.d(n,{J:function(){return r}});var r="6.19.6"},5733:function(t,n,e){e.d(n,{pi:function(){return r},XA:function(){return i},CR:function(){return o},fl:function(){return s}});var r=function(){return r=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t},r.apply(this,arguments)};function i(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),s=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return s}function s(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(o(arguments[n]));return t}},1299:function(t,n,e){e.d(n,{h:function(){return r}});var r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},8585:function(t,n,e){e.d(n,{Gd:function(){return v}});var r=e(8773),i=e(3699),o=e(7790),s=e(8536),a=e(5907),u=e(7392),c=e(1299),f=e(1684),p=e(2430),d=function(){function t(t,n,e){void 0===n&&(n=new f.s),void 0===e&&(e=4),this._version=e,this._stack=[{}],this.getStackTop().scope=n,t&&this.bindClient(t)}return t.prototype.isOlderThan=function(t){return this._version<t},t.prototype.bindClient=function(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()},t.prototype.pushScope=function(){var t=f.s.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t},t.prototype.popScope=function(){return!(this.getStack().length<=1)&&!!this.getStack().pop()},t.prototype.withScope=function(t){var n=this.pushScope();try{t(n)}finally{this.popScope()}},t.prototype.getClient=function(){return this.getStackTop().client},t.prototype.getScope=function(){return this.getStackTop().scope},t.prototype.getStack=function(){return this._stack},t.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},t.prototype.captureException=function(t,n){var e=this._lastEventId=n&&n.event_id?n.event_id:(0,i.DM)(),o=n;if(!n){var s=void 0;try{throw new Error("Sentry syntheticException")}catch(t){s=t}o={originalException:t,syntheticException:s}}return this._invokeClient("captureException",t,(0,r.pi)((0,r.pi)({},o),{event_id:e})),e},t.prototype.captureMessage=function(t,n,e){var o=this._lastEventId=e&&e.event_id?e.event_id:(0,i.DM)(),s=e;if(!e){var a=void 0;try{throw new Error(t)}catch(u){a=u}s={originalException:t,syntheticException:a}}return this._invokeClient("captureMessage",t,n,(0,r.pi)((0,r.pi)({},s),{event_id:o})),o},t.prototype.captureEvent=function(t,n){var e=n&&n.event_id?n.event_id:(0,i.DM)();return"transaction"!==t.type&&(this._lastEventId=e),this._invokeClient("captureEvent",t,(0,r.pi)((0,r.pi)({},n),{event_id:e})),e},t.prototype.lastEventId=function(){return this._lastEventId},t.prototype.addBreadcrumb=function(t,n){var e=this.getStackTop(),i=e.scope,a=e.client;if(i&&a){var u=a.getOptions&&a.getOptions()||{},c=u.beforeBreadcrumb,f=void 0===c?null:c,p=u.maxBreadcrumbs,d=void 0===p?100:p;if(!(d<=0)){var l=(0,o.yW)(),h=(0,r.pi)({timestamp:l},t),v=f?(0,s.Cf)((function(){return f(h,n)})):h;null!==v&&i.addBreadcrumb(v,d)}}},t.prototype.setUser=function(t){var n=this.getScope();n&&n.setUser(t)},t.prototype.setTags=function(t){var n=this.getScope();n&&n.setTags(t)},t.prototype.setExtras=function(t){var n=this.getScope();n&&n.setExtras(t)},t.prototype.setTag=function(t,n){var e=this.getScope();e&&e.setTag(t,n)},t.prototype.setExtra=function(t,n){var e=this.getScope();e&&e.setExtra(t,n)},t.prototype.setContext=function(t,n){var e=this.getScope();e&&e.setContext(t,n)},t.prototype.configureScope=function(t){var n=this.getStackTop(),e=n.scope,r=n.client;e&&r&&t(e)},t.prototype.run=function(t){var n=h(this);try{t(this)}finally{h(n)}},t.prototype.getIntegration=function(t){var n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch(e){return c.h&&s.kg.warn("Cannot retrieve integration "+t.id+" from the current Hub"),null}},t.prototype.startSpan=function(t){return this._callExtensionMethod("startSpan",t)},t.prototype.startTransaction=function(t,n){return this._callExtensionMethod("startTransaction",t,n)},t.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},t.prototype.captureSession=function(t){if(void 0===t&&(t=!1),t)return this.endSession();this._sendSessionUpdate()},t.prototype.endSession=function(){var t=this.getStackTop(),n=t&&t.scope,e=n&&n.getSession();e&&e.close(),this._sendSessionUpdate(),n&&n.setSession()},t.prototype.startSession=function(t){var n=this.getStackTop(),e=n.scope,i=n.client,o=i&&i.getOptions()||{},s=o.release,u=o.environment,c=((0,a.R)().navigator||{}).userAgent,f=new p.z((0,r.pi)((0,r.pi)((0,r.pi)({release:s,environment:u},e&&{user:e.getUser()}),c&&{userAgent:c}),t));if(e){var d=e.getSession&&e.getSession();d&&"ok"===d.status&&d.update({status:"exited"}),this.endSession(),e.setSession(f)}return f},t.prototype._sendSessionUpdate=function(){var t=this.getStackTop(),n=t.scope,e=t.client;if(n){var r=n.getSession&&n.getSession();r&&e&&e.captureSession&&e.captureSession(r)}},t.prototype._invokeClient=function(t){for(var n,e=[],i=1;i<arguments.length;i++)e[i-1]=arguments[i];var o=this.getStackTop(),s=o.scope,a=o.client;a&&a[t]&&(n=a)[t].apply(n,(0,r.fl)(e,[s]))},t.prototype._callExtensionMethod=function(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var r=l(),i=r.__SENTRY__;if(i&&i.extensions&&"function"==typeof i.extensions[t])return i.extensions[t].apply(this,n);c.h&&s.kg.warn("Extension method "+t+" couldn't be found, doing nothing.")},t}();function l(){var t=(0,a.R)();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function h(t){var n=l(),e=_(n);return g(n,t),e}function v(){var t=l();return y(t)&&!_(t).isOlderThan(4)||g(t,new d),(0,u.KV)()?function(t){try{var n=l().__SENTRY__,e=n&&n.extensions&&n.extensions.domain&&n.extensions.domain.active;if(!e)return _(t);if(!y(e)||_(e).isOlderThan(4)){var r=_(t).getStackTop();g(e,new d(r.client,f.s.clone(r.scope)))}return _(e)}catch(i){return _(t)}}(t):_(t)}function y(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function _(t){return(0,a.Y)("hub",(function(){return new d}),t)}function g(t,n){return!!t&&((t.__SENTRY__=t.__SENTRY__||{}).hub=n,!0)}},1684:function(t,n,e){e.d(n,{s:function(){return u},c:function(){return f}});var r=e(8773),i=e(1757),o=e(7790),s=e(7946),a=e(5907),u=function(){function t(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}return t.clone=function(n){var e=new t;return n&&(e._breadcrumbs=(0,r.fl)(n._breadcrumbs),e._tags=(0,r.pi)({},n._tags),e._extra=(0,r.pi)({},n._extra),e._contexts=(0,r.pi)({},n._contexts),e._user=n._user,e._level=n._level,e._span=n._span,e._session=n._session,e._transactionName=n._transactionName,e._fingerprint=n._fingerprint,e._eventProcessors=(0,r.fl)(n._eventProcessors),e._requestSession=n._requestSession),e},t.prototype.addScopeListener=function(t){this._scopeListeners.push(t)},t.prototype.addEventProcessor=function(t){return this._eventProcessors.push(t),this},t.prototype.setUser=function(t){return this._user=t||{},this._session&&this._session.update({user:t}),this._notifyScopeListeners(),this},t.prototype.getUser=function(){return this._user},t.prototype.getRequestSession=function(){return this._requestSession},t.prototype.setRequestSession=function(t){return this._requestSession=t,this},t.prototype.setTags=function(t){return this._tags=(0,r.pi)((0,r.pi)({},this._tags),t),this._notifyScopeListeners(),this},t.prototype.setTag=function(t,n){var e;return this._tags=(0,r.pi)((0,r.pi)({},this._tags),((e={})[t]=n,e)),this._notifyScopeListeners(),this},t.prototype.setExtras=function(t){return this._extra=(0,r.pi)((0,r.pi)({},this._extra),t),this._notifyScopeListeners(),this},t.prototype.setExtra=function(t,n){var e;return this._extra=(0,r.pi)((0,r.pi)({},this._extra),((e={})[t]=n,e)),this._notifyScopeListeners(),this},t.prototype.setFingerprint=function(t){return this._fingerprint=t,this._notifyScopeListeners(),this},t.prototype.setLevel=function(t){return this._level=t,this._notifyScopeListeners(),this},t.prototype.setTransactionName=function(t){return this._transactionName=t,this._notifyScopeListeners(),this},t.prototype.setTransaction=function(t){return this.setTransactionName(t)},t.prototype.setContext=function(t,n){var e;return null===n?delete this._contexts[t]:this._contexts=(0,r.pi)((0,r.pi)({},this._contexts),((e={})[t]=n,e)),this._notifyScopeListeners(),this},t.prototype.setSpan=function(t){return this._span=t,this._notifyScopeListeners(),this},t.prototype.getSpan=function(){return this._span},t.prototype.getTransaction=function(){var t=this.getSpan();return t&&t.transaction},t.prototype.setSession=function(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this},t.prototype.getSession=function(){return this._session},t.prototype.update=function(n){if(!n)return this;if("function"==typeof n){var e=n(this);return e instanceof t?e:this}return n instanceof t?(this._tags=(0,r.pi)((0,r.pi)({},this._tags),n._tags),this._extra=(0,r.pi)((0,r.pi)({},this._extra),n._extra),this._contexts=(0,r.pi)((0,r.pi)({},this._contexts),n._contexts),n._user&&Object.keys(n._user).length&&(this._user=n._user),n._level&&(this._level=n._level),n._fingerprint&&(this._fingerprint=n._fingerprint),n._requestSession&&(this._requestSession=n._requestSession)):(0,i.PO)(n)&&(n=n,this._tags=(0,r.pi)((0,r.pi)({},this._tags),n.tags),this._extra=(0,r.pi)((0,r.pi)({},this._extra),n.extra),this._contexts=(0,r.pi)((0,r.pi)({},this._contexts),n.contexts),n.user&&(this._user=n.user),n.level&&(this._level=n.level),n.fingerprint&&(this._fingerprint=n.fingerprint),n.requestSession&&(this._requestSession=n.requestSession)),this},t.prototype.clear=function(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this},t.prototype.addBreadcrumb=function(t,n){var e="number"==typeof n?Math.min(n,100):100;if(e<=0)return this;var i=(0,r.pi)({timestamp:(0,o.yW)()},t);return this._breadcrumbs=(0,r.fl)(this._breadcrumbs,[i]).slice(-e),this._notifyScopeListeners(),this},t.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},t.prototype.applyToEvent=function(t,n){if(this._extra&&Object.keys(this._extra).length&&(t.extra=(0,r.pi)((0,r.pi)({},this._extra),t.extra)),this._tags&&Object.keys(this._tags).length&&(t.tags=(0,r.pi)((0,r.pi)({},this._tags),t.tags)),this._user&&Object.keys(this._user).length&&(t.user=(0,r.pi)((0,r.pi)({},this._user),t.user)),this._contexts&&Object.keys(this._contexts).length&&(t.contexts=(0,r.pi)((0,r.pi)({},this._contexts),t.contexts)),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts=(0,r.pi)({trace:this._span.getTraceContext()},t.contexts);var e=this._span.transaction&&this._span.transaction.name;e&&(t.tags=(0,r.pi)({transaction:e},t.tags))}return this._applyFingerprint(t),t.breadcrumbs=(0,r.fl)(t.breadcrumbs||[],this._breadcrumbs),t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata=this._sdkProcessingMetadata,this._notifyEventProcessors((0,r.fl)(c(),this._eventProcessors),t,n)},t.prototype.setSDKProcessingMetadata=function(t){return this._sdkProcessingMetadata=(0,r.pi)((0,r.pi)({},this._sdkProcessingMetadata),t),this},t.prototype._notifyEventProcessors=function(t,n,e,o){var a=this;return void 0===o&&(o=0),new s.cW((function(s,u){var c=t[o];if(null===n||"function"!=typeof c)s(n);else{var f=c((0,r.pi)({},n),e);(0,i.J8)(f)?f.then((function(n){return a._notifyEventProcessors(t,n,e,o+1).then(s)})).then(null,u):a._notifyEventProcessors(t,f,e,o+1).then(s).then(null,u)}}))},t.prototype._notifyScopeListeners=function(){var t=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((function(n){n(t)})),this._notifyingListeners=!1)},t.prototype._applyFingerprint=function(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint},t}();function c(){return(0,a.Y)("globalEventProcessors",(function(){return[]}))}function f(t){c().push(t)}},2430:function(t,n,e){e.d(n,{z:function(){return s}});var r=e(3699),i=e(7790),o=e(1995),s=function(){function t(t){this.errors=0,this.sid=(0,r.DM)(),this.duration=0,this.status="ok",this.init=!0,this.ignoreDuration=!1;var n=(0,i.ph)();this.timestamp=n,this.started=n,t&&this.update(t)}return t.prototype.update=function(t){if(void 0===t&&(t={}),t.user&&(!this.ipAddress&&t.user.ip_address&&(this.ipAddress=t.user.ip_address),this.did||t.did||(this.did=t.user.id||t.user.email||t.user.username)),this.timestamp=t.timestamp||(0,i.ph)(),t.ignoreDuration&&(this.ignoreDuration=t.ignoreDuration),t.sid&&(this.sid=32===t.sid.length?t.sid:(0,r.DM)()),void 0!==t.init&&(this.init=t.init),!this.did&&t.did&&(this.did=""+t.did),"number"==typeof t.started&&(this.started=t.started),this.ignoreDuration)this.duration=void 0;else if("number"==typeof t.duration)this.duration=t.duration;else{var n=this.timestamp-this.started;this.duration=n>=0?n:0}t.release&&(this.release=t.release),t.environment&&(this.environment=t.environment),!this.ipAddress&&t.ipAddress&&(this.ipAddress=t.ipAddress),!this.userAgent&&t.userAgent&&(this.userAgent=t.userAgent),"number"==typeof t.errors&&(this.errors=t.errors),t.status&&(this.status=t.status)},t.prototype.close=function(t){t?this.update({status:t}):"ok"===this.status?this.update({status:"exited"}):this.update()},t.prototype.toJSON=function(){return(0,o.Jr)({sid:""+this.sid,init:this.init,started:new Date(1e3*this.started).toISOString(),timestamp:new Date(1e3*this.timestamp).toISOString(),status:this.status,errors:this.errors,did:"number"==typeof this.did||"string"==typeof this.did?""+this.did:void 0,duration:this.duration,attrs:{release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent}})},t}()},8773:function(t,n,e){e.d(n,{pi:function(){return r},fl:function(){return o}});var r=function(){return r=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t},r.apply(this,arguments)};function i(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),s=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return s}function o(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(i(arguments[n]));return t}},4678:function(t,n,e){e.d(n,{Tb:function(){return s},$e:function(){return a}});var r=e(5559),i=e(8585);function o(t){for(var n=[],e=1;e<arguments.length;e++)n[e-1]=arguments[e];var o=(0,i.Gd)();if(o&&o[t])return o[t].apply(o,(0,r.fl)(n));throw new Error("No hub defined or "+t+" was not found on the hub, please open a bug report.")}function s(t,n){return o("captureException",t,{captureContext:n,originalException:t,syntheticException:new Error("Sentry syntheticException")})}function a(t){o("withScope",t)}},5559:function(t,n,e){e.d(n,{fl:function(){return i}});function r(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),s=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return s}function i(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(r(arguments[n]));return t}},2226:function(t,n,e){var r;e.d(n,{z:function(){return r}}),function(t){t.Fatal="fatal",t.Error="error",t.Warning="warning",t.Log="log",t.Info="info",t.Debug="debug",t.Critical="critical"}(r||(r={}))},3518:function(t,n,e){function r(t){t.then(null,(function(t){console.error(t)}))}e.d(n,{I:function(){return r}})},4194:function(t,n,e){e.d(n,{R:function(){return o},l:function(){return a}});var r=e(5907),i=e(1757);function o(t,n){try{for(var e=t,r=[],i=0,o=0,a=" > ".length,u=void 0;e&&i++<5&&!("html"===(u=s(e,n))||i>1&&o+r.length*a+u.length>=80);)r.push(u),o+=u.length,e=e.parentNode;return r.reverse().join(" > ")}catch(c){return"<unknown>"}}function s(t,n){var e,r,o,s,a,u=t,c=[];if(!u||!u.tagName)return"";c.push(u.tagName.toLowerCase());var f=n&&n.length?n.filter((function(t){return u.getAttribute(t)})).map((function(t){return[t,u.getAttribute(t)]})):null;if(f&&f.length)f.forEach((function(t){c.push("["+t[0]+'="'+t[1]+'"]')}));else if(u.id&&c.push("#"+u.id),(e=u.className)&&(0,i.HD)(e))for(r=e.split(/\s+/),a=0;a<r.length;a++)c.push("."+r[a]);var p=["type","name","title","alt"];for(a=0;a<p.length;a++)o=p[a],(s=u.getAttribute(o))&&c.push("["+o+'="'+s+'"]');return c.join("")}function a(){var t=(0,r.R)();try{return t.document.location.href}catch(n){return""}}},250:function(t,n,e){e.d(n,{y:function(){return o}});var r=e(6894),i=e(7790);function o(t,n,e){var o=[{type:"client_report"},{timestamp:e||(0,i.yW)(),discarded_events:t}];return(0,r.Jd)(n?{dsn:n}:{},[o])}},3135:function(t,n,e){e.d(n,{R:function(){return a},v:function(){return c}});var r=e(4715),i=e(4388),o=e(1923),s=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function a(t,n){void 0===n&&(n=!1);var e=t.host,r=t.path,i=t.pass,o=t.port,s=t.projectId;return t.protocol+"://"+t.publicKey+(n&&i?":"+i:"")+"@"+e+(o?":"+o:"")+"/"+(r?r+"/":r)+s}function u(t){return"user"in t&&!("publicKey"in t)&&(t.publicKey=t.user),{user:t.publicKey||"",protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function c(t){var n="string"==typeof t?function(t){var n=s.exec(t);if(!n)throw new i.b("Invalid Sentry Dsn: "+t);var e=(0,r.CR)(n.slice(1),6),o=e[0],a=e[1],c=e[2],f=void 0===c?"":c,p=e[3],d=e[4],l=void 0===d?"":d,h="",v=e[5],y=v.split("/");if(y.length>1&&(h=y.slice(0,-1).join("/"),v=y.pop()),v){var _=v.match(/^\d+/);_&&(v=_[0])}return u({host:p,pass:f,path:h,projectId:v,port:l,protocol:o,publicKey:a})}(t):u(t);return function(t){if(o.h){var n=t.port,e=t.projectId,r=t.protocol;if(["protocol","publicKey","host","projectId"].forEach((function(n){if(!t[n])throw new i.b("Invalid Sentry Dsn: "+n+" missing")})),!e.match(/^\d+$/))throw new i.b("Invalid Sentry Dsn: Invalid projectId "+e);if(!function(t){return"http"===t||"https"===t}(r))throw new i.b("Invalid Sentry Dsn: Invalid protocol "+r);if(n&&isNaN(parseInt(n,10)))throw new i.b("Invalid Sentry Dsn: Invalid port "+n)}}(n),n}},6872:function(t,n,e){e.d(n,{a:function(){return r}});var r=["fatal","error","warning","log","info","debug","critical"]},4285:function(t,n,e){function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}e.d(n,{n:function(){return r}})},6894:function(t,n,e){e.d(n,{Jd:function(){return o},y7:function(){return s},V$:function(){return a}});var r=e(4715),i=e(1757);function o(t,n){return void 0===n&&(n=[]),[t,n]}function s(t){var n=(0,r.CR)(t,2),e=(0,r.CR)(n[1],1);return(0,r.CR)(e[0],1)[0].type}function a(t){var n=(0,r.CR)(t,2),e=n[0],o=n[1],s=JSON.stringify(e);return o.reduce((function(t,n){var e=(0,r.CR)(n,2),o=e[0],s=e[1],a=(0,i.pt)(s)?String(s):JSON.stringify(s);return t+"\n"+JSON.stringify(o)+"\n"+a}),s)}},4388:function(t,n,e){e.d(n,{b:function(){return o}});var r=e(4715),i=e(467),o=function(t){function n(n){var e=this.constructor,r=t.call(this,n)||this;return r.message=n,r.name=e.prototype.constructor.name,(0,i.f)(r,e.prototype),r}return(0,r.ZT)(n,t),n}(Error)},1923:function(t,n,e){e.d(n,{h:function(){return r}});var r="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},5907:function(t,n,e){e.d(n,{R:function(){return o},Y:function(){return s}});var r=e(7392),i={};function o(){return(0,r.KV)()||"undefined"!=typeof window?window:"undefined"!=typeof self?self:i}function s(t,n,e){var r=e||o(),i=r.__SENTRY__=r.__SENTRY__||{};return i[t]||(i[t]=n())}},4005:function(t,n,e){e.d(n,{o:function(){return y}});var r,i=e(4715),o=e(1923),s=e(5907),a=e(1757),u=e(8536),c=e(1995),f=e(9038),p=e(9798),d=(0,s.R)(),l={},h={};function v(t){if(!h[t])switch(h[t]=!0,t){case"console":!function(){if(!("console"in d))return;u.RU.forEach((function(t){t in d.console&&(0,c.hl)(d.console,t,(function(n){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];_("console",{args:e,level:t}),n&&n.apply(d.console,e)}}))}))}();break;case"dom":!function(){if(!("document"in d))return;var t=_.bind(null,"dom"),n=w(t,!0);d.document.addEventListener("click",n,!1),d.document.addEventListener("keypress",n,!1),["EventTarget","Node"].forEach((function(n){var e=d[n]&&d[n].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&((0,c.hl)(e,"addEventListener",(function(n){return function(e,r,i){if("click"===e||"keypress"==e)try{var o=this,s=o.__sentry_instrumentation_handlers__=o.__sentry_instrumentation_handlers__||{},a=s[e]=s[e]||{refCount:0};if(!a.handler){var u=w(t);a.handler=u,n.call(this,e,u,i)}a.refCount+=1}catch(c){}return n.call(this,e,r,i)}})),(0,c.hl)(e,"removeEventListener",(function(t){return function(n,e,r){if("click"===n||"keypress"==n)try{var i=this,o=i.__sentry_instrumentation_handlers__||{},s=o[n];s&&(s.refCount-=1,s.refCount<=0&&(t.call(this,n,s.handler,r),s.handler=void 0,delete o[n]),0===Object.keys(o).length&&delete i.__sentry_instrumentation_handlers__)}catch(a){}return t.call(this,n,e,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in d))return;var t=XMLHttpRequest.prototype;(0,c.hl)(t,"open",(function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var r=this,i=n[1],o=r.__sentry_xhr__={method:(0,a.HD)(n[0])?n[0].toUpperCase():n[0],url:n[1]};(0,a.HD)(i)&&"POST"===o.method&&i.match(/sentry_key/)&&(r.__sentry_own_request__=!0);var s=function(){if(4===r.readyState){try{o.status_code=r.status}catch(t){}_("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:r})}};return"onreadystatechange"in r&&"function"==typeof r.onreadystatechange?(0,c.hl)(r,"onreadystatechange",(function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return s(),t.apply(r,n)}})):r.addEventListener("readystatechange",s),t.apply(r,n)}})),(0,c.hl)(t,"send",(function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];return this.__sentry_xhr__&&void 0!==n[0]&&(this.__sentry_xhr__.body=n[0]),_("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),t.apply(this,n)}}))}();break;case"fetch":!function(){if(!(0,p.t$)())return;(0,c.hl)(d,"fetch",(function(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var r={args:n,fetchData:{method:g(n),url:m(n)},startTimestamp:Date.now()};return _("fetch",(0,i.pi)({},r)),t.apply(d,n).then((function(t){return _("fetch",(0,i.pi)((0,i.pi)({},r),{endTimestamp:Date.now(),response:t})),t}),(function(t){throw _("fetch",(0,i.pi)((0,i.pi)({},r),{endTimestamp:Date.now(),error:t})),t}))}}))}();break;case"history":!function(){if(!(0,p.Bf)())return;var t=d.onpopstate;function n(t){return function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var i=n.length>2?n[2]:void 0;if(i){var o=r,s=String(i);r=s,_("history",{from:o,to:s})}return t.apply(this,n)}}d.onpopstate=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var i=d.location.href,o=r;if(r=i,_("history",{from:o,to:i}),t)try{return t.apply(this,n)}catch(s){}},(0,c.hl)(d.history,"pushState",n),(0,c.hl)(d.history,"replaceState",n)}();break;case"error":S=d.onerror,d.onerror=function(t,n,e,r,i){return _("error",{column:r,error:i,line:e,msg:t,url:n}),!!S&&S.apply(this,arguments)};break;case"unhandledrejection":E=d.onunhandledrejection,d.onunhandledrejection=function(t){return _("unhandledrejection",t),!E||E.apply(this,arguments)};break;default:return void(o.h&&u.kg.warn("unknown instrumentation type:",t))}}function y(t,n){l[t]=l[t]||[],l[t].push(n),v(t)}function _(t,n){var e,r;if(t&&l[t])try{for(var s=(0,i.XA)(l[t]||[]),a=s.next();!a.done;a=s.next()){var c=a.value;try{c(n)}catch(p){o.h&&u.kg.error("Error while triggering instrumentation handler.\nType: "+t+"\nName: "+(0,f.$P)(c)+"\nError:",p)}}}catch(d){e={error:d}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}}function g(t){return void 0===t&&(t=[]),"Request"in d&&(0,a.V9)(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function m(t){return void 0===t&&(t=[]),"string"==typeof t[0]?t[0]:"Request"in d&&(0,a.V9)(t[0],Request)?t[0].url:String(t[0])}var b,x;function w(t,n){return void 0===n&&(n=!1),function(e){if(e&&x!==e&&!function(t){if("keypress"!==t.type)return!1;try{var n=t.target;if(!n||!n.tagName)return!0;if("INPUT"===n.tagName||"TEXTAREA"===n.tagName||n.isContentEditable)return!1}catch(e){}return!0}(e)){var r="keypress"===e.type?"input":e.type;(void 0===b||function(t,n){if(!t)return!0;if(t.type!==n.type)return!0;try{if(t.target!==n.target)return!0}catch(e){}return!1}(x,e))&&(t({event:e,name:r,global:n}),x=e),clearTimeout(b),b=d.setTimeout((function(){b=void 0}),1e3)}}}var S=null;var E=null},1757:function(t,n,e){e.d(n,{VZ:function(){return i},VW:function(){return s},TX:function(){return a},fm:function(){return u},HD:function(){return c},pt:function(){return f},PO:function(){return p},cO:function(){return d},kK:function(){return l},Kj:function(){return h},J8:function(){return v},Cy:function(){return y},i2:function(){return _},V9:function(){return g}});var r=Object.prototype.toString;function i(t){switch(r.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return g(t,Error)}}function o(t,n){return r.call(t)==="[object "+n+"]"}function s(t){return o(t,"ErrorEvent")}function a(t){return o(t,"DOMError")}function u(t){return o(t,"DOMException")}function c(t){return o(t,"String")}function f(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function p(t){return o(t,"Object")}function d(t){return"undefined"!=typeof Event&&g(t,Event)}function l(t){return"undefined"!=typeof Element&&g(t,Element)}function h(t){return o(t,"RegExp")}function v(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function y(t){return p(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function _(t){return"number"==typeof t&&t!=t}function g(t,n){try{return t instanceof n}catch(e){return!1}}},8536:function(t,n,e){e.d(n,{RU:function(){return c},Cf:function(){return f},kg:function(){return r}});var r,i=e(4715),o=e(1923),s=e(5907),a=(0,s.R)(),u="Sentry Logger ",c=["debug","info","warn","error","log","assert"];function f(t){var n=(0,s.R)();if(!("console"in n))return t();var e=n.console,r={};c.forEach((function(t){var i=e[t]&&e[t].__sentry_original__;t in n.console&&i&&(r[t]=e[t],e[t]=i)}));try{return t()}finally{Object.keys(r).forEach((function(t){e[t]=r[t]}))}}function p(){var t=!1,n={enable:function(){t=!0},disable:function(){t=!1}};return o.h?c.forEach((function(e){n[e]=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];t&&f((function(){var t;(t=a.console)[e].apply(t,(0,i.fl)([u+"["+e+"]:"],n))}))}})):c.forEach((function(t){n[t]=function(){}})),n}r=o.h?(0,s.Y)("logger",p):p()},4048:function(t,n,e){function r(){var t="function"==typeof WeakSet,n=t?new WeakSet:[];return[function(e){if(t)return!!n.has(e)||(n.add(e),!1);for(var r=0;r<n.length;r++){if(n[r]===e)return!0}return n.push(e),!1},function(e){if(t)n.delete(e);else for(var r=0;r<n.length;r++)if(n[r]===e){n.splice(r,1);break}}]}e.d(n,{i:function(){return r}})},3699:function(t,n,e){e.d(n,{DM:function(){return s},en:function(){return a},jH:function(){return c},Db:function(){return f},EG:function(){return p},YO:function(){return d}});var r=e(4715),i=e(5907),o=e(1995);function s(){var t=(0,i.R)(),n=t.crypto||t.msCrypto;if(void 0!==n&&n.getRandomValues){var e=new Uint16Array(8);n.getRandomValues(e),e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;var r=function(t){for(var n=t.toString(16);n.length<4;)n="0"+n;return n};return r(e[0])+r(e[1])+r(e[2])+r(e[3])+r(e[4])+r(e[5])+r(e[6])+r(e[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=16*Math.random()|0;return("x"===t?n:3&n|8).toString(16)}))}function a(t){if(!t)return{};var n=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!n)return{};var e=n[6]||"",r=n[8]||"";return{host:n[4],path:n[5],protocol:n[2],relative:n[5]+e+r}}function u(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function c(t){var n=t.message,e=t.event_id;if(n)return n;var r=u(t);return r?r.type&&r.value?r.type+": "+r.value:r.type||r.value||e||"<unknown>":e||"<unknown>"}function f(t,n,e){var r=t.exception=t.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=n||""),o.type||(o.type=e||"Error")}function p(t,n){var e=u(t);if(e){var i=e.mechanism;if(e.mechanism=(0,r.pi)((0,r.pi)((0,r.pi)({},{type:"generic",handled:!0}),i),n),n&&"data"in n){var o=(0,r.pi)((0,r.pi)({},i&&i.data),n.data);e.mechanism.data=o}}}function d(t){if(t&&t.__sentry_captured__)return!0;try{(0,o.xp)(t,"__sentry_captured__",!0)}catch(n){}return!1}},7392:function(t,n,e){e.d(n,{KV:function(){return i},l$:function(){return o}});var r=e(4285);function i(){return!(0,r.n)()&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function o(t,n){return t.require(n)}t=e.hmd(t)},8035:function(t,n,e){e.d(n,{Fv:function(){return u},Qy:function(){return c}});var r=e(4715),i=e(1757),o=e(4048),s=e(1995),a=e(9038);function u(t,n,e){void 0===n&&(n=1/0),void 0===e&&(e=1/0);try{return f("",t,n,e)}catch(r){return{ERROR:"**non-serializable** ("+r+")"}}}function c(t,n,e){void 0===n&&(n=3),void 0===e&&(e=102400);var r,i=u(t,n);return r=i,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(r))>e?c(t,n-1,e):i}function f(t,n,e,u,c){void 0===e&&(e=1/0),void 0===u&&(u=1/0),void 0===c&&(c=(0,o.i)());var p=(0,r.CR)(c,2),d=p[0],l=p[1],h=n;if(h&&"function"==typeof h.toJSON)try{return h.toJSON()}catch(x){}if(null===n||["number","boolean","string"].includes(typeof n)&&!(0,i.i2)(n))return n;var v=function(t,n){try{return"domain"===t&&n&&"object"==typeof n&&n._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!=typeof window&&n===window?"[Global]":"undefined"!=typeof window&&n===window?"[Window]":"undefined"!=typeof document&&n===document?"[Document]":(0,i.Cy)(n)?"[SyntheticEvent]":"number"==typeof n&&n!=n?"[NaN]":void 0===n?"[undefined]":"function"==typeof n?"[Function: "+(0,a.$P)(n)+"]":"symbol"==typeof n?"["+String(n)+"]":"bigint"==typeof n?"[BigInt: "+String(n)+"]":"[object "+Object.getPrototypeOf(n).constructor.name+"]"}catch(x){return"**non-serializable** ("+x+")"}}(t,n);if(!v.startsWith("[object "))return v;if(0===e)return v.replace("object ","");if(d(n))return"[Circular ~]";var y=Array.isArray(n)?[]:{},_=0,g=(0,i.VZ)(n)||(0,i.cO)(n)?(0,s.Sh)(n):n;for(var m in g)if(Object.prototype.hasOwnProperty.call(g,m)){if(_>=u){y[m]="[MaxProperties ~]";break}var b=g[m];y[m]=f(m,b,e-1,u,c),_+=1}return l(n),y}},1995:function(t,n,e){e.d(n,{hl:function(){return a},xp:function(){return u},$Q:function(){return c},HK:function(){return f},_j:function(){return p},Sh:function(){return d},zf:function(){return v},Jr:function(){return y}});var r=e(4715),i=e(4194),o=e(1757),s=e(9660);function a(t,n,e){if(n in t){var r=t[n],i=e(r);if("function"==typeof i)try{c(i,r)}catch(o){}t[n]=i}}function u(t,n,e){Object.defineProperty(t,n,{value:e,writable:!0,configurable:!0})}function c(t,n){var e=n.prototype||{};t.prototype=n.prototype=e,u(t,"__sentry_original__",n)}function f(t){return t.__sentry_original__}function p(t){return Object.keys(t).map((function(n){return encodeURIComponent(n)+"="+encodeURIComponent(t[n])})).join("&")}function d(t){var n=t;if((0,o.VZ)(t))n=(0,r.pi)({message:t.message,name:t.name,stack:t.stack},h(t));else if((0,o.cO)(t)){var e=t;n=(0,r.pi)({type:e.type,target:l(e.target),currentTarget:l(e.currentTarget)},h(e)),"undefined"!=typeof CustomEvent&&(0,o.V9)(t,CustomEvent)&&(n.detail=e.detail)}return n}function l(t){try{return(0,o.kK)(t)?(0,i.R)(t):Object.prototype.toString.call(t)}catch(n){return"<unknown>"}}function h(t){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}function v(t,n){void 0===n&&(n=40);var e=Object.keys(d(t));if(e.sort(),!e.length)return"[object has no keys]";if(e[0].length>=n)return(0,s.$G)(e[0],n);for(var r=e.length;r>0;r--){var i=e.slice(0,r).join(", ");if(!(i.length>n))return r===e.length?i:(0,s.$G)(i,n)}return""}function y(t){var n,e;if((0,o.PO)(t)){var i={};try{for(var s=(0,r.XA)(Object.keys(t)),a=s.next();!a.done;a=s.next()){var u=a.value;void 0!==t[u]&&(i[u]=y(t[u]))}}catch(c){n={error:c}}finally{try{a&&!a.done&&(e=s.return)&&e.call(s)}finally{if(n)throw n.error}}return i}return Array.isArray(t)?t.map(y):t}},467:function(t,n,e){e.d(n,{f:function(){return r}});var r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){return t.__proto__=n,t}:function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(t,e)||(t[e]=n[e]);return t})},8963:function(t,n,e){e.d(n,{x:function(){return o}});var r=e(4388),i=e(7946);function o(t){var n=[];function e(t){return n.splice(n.indexOf(t),1)[0]}return{$:n,add:function(o){if(!(void 0===t||n.length<t))return(0,i.$2)(new r.b("Not adding Promise due to buffer limit reached."));var s=o();return-1===n.indexOf(s)&&n.push(s),s.then((function(){return e(s)})).then(null,(function(){return e(s).then(null,(function(){}))})),s},drain:function(t){return new i.cW((function(e,r){var o=n.length;if(!o)return e(!0);var s=setTimeout((function(){t&&t>0&&e(!1)}),t);n.forEach((function(t){(0,i.WD)(t).then((function(){--o||(clearTimeout(s),e(!0))}),r)}))}))}}}},1630:function(t,n,e){e.d(n,{ns:function(){return i},Q:function(){return o},WG:function(){return s}});var r=e(4715);function i(t,n){return t[n]||t.all||0}function o(t,n,e){return void 0===e&&(e=Date.now()),i(t,n)>e}function s(t,n,e){var i,o,s,a;void 0===e&&(e=Date.now());var u=(0,r.pi)({},t),c=n["x-sentry-rate-limits"],f=n["retry-after"];if(c)try{for(var p=(0,r.XA)(c.trim().split(",")),d=p.next();!d.done;d=p.next()){var l=d.value.split(":",2),h=parseInt(l[0],10),v=1e3*(isNaN(h)?60:h);if(l[1])try{for(var y=(s=void 0,(0,r.XA)(l[1].split(";"))),_=y.next();!_.done;_=y.next()){u[_.value]=e+v}}catch(g){s={error:g}}finally{try{_&&!_.done&&(a=y.return)&&a.call(y)}finally{if(s)throw s.error}}else u.all=e+v}}catch(m){i={error:m}}finally{try{d&&!d.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}else f&&(u.all=e+function(t,n){void 0===n&&(n=Date.now());var e=parseInt(""+t,10);if(!isNaN(e))return 1e3*e;var r=Date.parse(""+t);return isNaN(r)?6e4:r-n}(f,e));return u}},8653:function(t,n,e){e.d(n,{E:function(){return o}});var r=e(2226),i=e(6872);function o(t){return"warn"===t?r.z.Warning:function(t){return-1!==i.a.indexOf(t)}(t)?t:r.z.Log}},9038:function(t,n,e){e.d(n,{pE:function(){return i},$P:function(){return a}});var r=e(4715);function i(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var e=t.sort((function(t,n){return t[0]-n[0]})).map((function(t){return t[1]}));return function(t,n){var i,s,a,u;void 0===n&&(n=0);var c=[];try{for(var f=(0,r.XA)(t.split("\n").slice(n)),p=f.next();!p.done;p=f.next()){var d=p.value;try{for(var l=(a=void 0,(0,r.XA)(e)),h=l.next();!h.done;h=l.next()){var v=(0,h.value)(d);if(v){c.push(v);break}}}catch(y){a={error:y}}finally{try{h&&!h.done&&(u=l.return)&&u.call(l)}finally{if(a)throw a.error}}}}catch(_){i={error:_}}finally{try{p&&!p.done&&(s=f.return)&&s.call(f)}finally{if(i)throw i.error}}return o(c)}}function o(t){if(!t.length)return[];var n=t,e=n[0].function||"",i=n[n.length-1].function||"";return-1===e.indexOf("captureMessage")&&-1===e.indexOf("captureException")||(n=n.slice(1)),-1!==i.indexOf("sentryWrapped")&&(n=n.slice(0,-1)),n.slice(0,50).map((function(t){return(0,r.pi)((0,r.pi)({},t),{filename:t.filename||n[0].filename,function:t.function||"?"})})).reverse()}var s="<anonymous>";function a(t){try{return t&&"function"==typeof t&&t.name||s}catch(n){return s}}},8886:function(t,n,e){function r(t){return t>=200&&t<300?"success":429===t?"rate_limit":t>=400&&t<500?"invalid":t>=500?"failed":"unknown"}e.d(n,{F:function(){return r}})},9660:function(t,n,e){e.d(n,{$G:function(){return i},nK:function(){return o},zC:function(){return s}});var r=e(1757);function i(t,n){return void 0===n&&(n=0),"string"!=typeof t||0===n||t.length<=n?t:t.substr(0,n)+"..."}function o(t,n){if(!Array.isArray(t))return"";for(var e=[],r=0;r<t.length;r++){var i=t[r];try{e.push(String(i))}catch(o){e.push("[value cannot be serialized]")}}return e.join(n)}function s(t,n){return!!(0,r.HD)(t)&&((0,r.Kj)(n)?n.test(t):"string"==typeof n&&-1!==t.indexOf(n))}},9798:function(t,n,e){e.d(n,{Ak:function(){return s},Du:function(){return a},t$:function(){return u},hv:function(){return c},Bf:function(){return f}});var r=e(1923),i=e(5907),o=e(8536);function s(){if(!("fetch"in(0,i.R)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function a(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function u(){if(!s())return!1;var t=(0,i.R)();if(a(t.fetch))return!0;var n=!1,e=t.document;if(e&&"function"==typeof e.createElement)try{var u=e.createElement("iframe");u.hidden=!0,e.head.appendChild(u),u.contentWindow&&u.contentWindow.fetch&&(n=a(u.contentWindow.fetch)),e.head.removeChild(u)}catch(c){r.h&&o.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",c)}return n}function c(){if(!s())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(t){return!1}}function f(){var t=(0,i.R)(),n=t.chrome,e=n&&n.app&&n.app.runtime,r="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!e&&r}},7946:function(t,n,e){e.d(n,{WD:function(){return i},$2:function(){return o},cW:function(){return s}});var r=e(1757);function i(t){return new s((function(n){n(t)}))}function o(t){return new s((function(n,e){e(t)}))}var s=function(){function t(t){var n=this;this._state=0,this._handlers=[],this._resolve=function(t){n._setResult(1,t)},this._reject=function(t){n._setResult(2,t)},this._setResult=function(t,e){0===n._state&&((0,r.J8)(e)?e.then(n._resolve,n._reject):(n._state=t,n._value=e,n._executeHandlers()))},this._executeHandlers=function(){if(0!==n._state){var t=n._handlers.slice();n._handlers=[],t.forEach((function(t){t[0]||(1===n._state&&t[1](n._value),2===n._state&&t[2](n._value),t[0]=!0)}))}};try{t(this._resolve,this._reject)}catch(e){this._reject(e)}}return t.prototype.then=function(n,e){var r=this;return new t((function(t,i){r._handlers.push([!1,function(e){if(n)try{t(n(e))}catch(r){i(r)}else t(e)},function(n){if(e)try{t(e(n))}catch(r){i(r)}else i(n)}]),r._executeHandlers()}))},t.prototype.catch=function(t){return this.then((function(t){return t}),t)},t.prototype.finally=function(n){var e=this;return new t((function(t,r){var i,o;return e.then((function(t){o=!1,i=t,n&&n()}),(function(t){o=!0,i=t,n&&n()})).then((function(){o?r(i):t(i)}))}))},t}()},7790:function(t,n,e){e.d(n,{yW:function(){return u},ph:function(){return c}});var r=e(5907),i=e(7392);t=e.hmd(t);var o={nowSeconds:function(){return Date.now()/1e3}};var s=(0,i.KV)()?function(){try{return(0,i.l$)(t,"perf_hooks").performance}catch(n){return}}():function(){var t=(0,r.R)().performance;if(t&&t.now)return{now:function(){return t.now()},timeOrigin:Date.now()-t.now()}}(),a=void 0===s?o:{nowSeconds:function(){return(s.timeOrigin+s.now())/1e3}},u=o.nowSeconds.bind(o),c=a.nowSeconds.bind(a);!function(){var t=(0,r.R)().performance;if(t&&t.now){var n=36e5,e=t.now(),i=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+e-i):n,s=o<n,a=t.timing&&t.timing.navigationStart,u="number"==typeof a?Math.abs(a+e-i):n;return s||u<n?o<=u?("timeOrigin",t.timeOrigin):("navigationStart",a):("dateNow",i)}"none"}()},4715:function(t,n,e){e.d(n,{ZT:function(){return i},pi:function(){return o},XA:function(){return s},CR:function(){return a},fl:function(){return u}});
17
- /*! *****************************************************************************
18
- Copyright (c) Microsoft Corporation.
19
-
20
- Permission to use, copy, modify, and/or distribute this software for any
21
- purpose with or without fee is hereby granted.
22
-
23
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
24
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
25
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
26
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
27
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
28
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
29
- PERFORMANCE OF THIS SOFTWARE.
30
- ***************************************************************************** */
31
- var r=function(t,n){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])},r(t,n)};function i(t,n){function __(){this.constructor=t}r(t,n),t.prototype=null===n?Object.create(n):(__.prototype=n.prototype,new __)}var o=function(){return o=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t},o.apply(this,arguments)};function s(t){var n="function"==typeof Symbol&&Symbol.iterator,e=n&&t[n],r=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,n){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var r,i,o=e.call(t),s=[];try{for(;(void 0===n||n-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(e=o.return)&&e.call(o)}finally{if(i)throw i.error}}return s}function u(){for(var t=[],n=0;n<arguments.length;n++)t=t.concat(a(arguments[n]));return t}},6989:function(t){t.exports=window.wp.apiFetch}},n={};function e(r){var i=n[r];if(void 0!==i)return i.exports;var o=n[r]={id:r,loaded:!1,exports:{}};return t[r](o,o.exports,e),o.loaded=!0,o.exports}e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.hmd=function(t){return(t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};!function(){e.r(r);var t,n=e(2456),i=e(4678),o=e(6989),s=e.n(o);const a="true"===(null===(t=window.A8C_ETK_ErrorReporting_Config)||void 0===t?void 0:t.shouldActivateSentry),u=window._jsErr||[],c=window._headJsErrorHandler;a?(n.S1({dsn:"https://658ae291b00242148af6b76494d4a49a@o248881.ingest.sentry.io/5876245",release:"wpcom-test-01"}),u.forEach((t=>i.Tb(t))),n.yl().then((()=>delete window._jsErr))):function(){const t=t=>{let{error:n}=t;if(!n)return;const e={message:n.message,trace:n.stack,url:document.location.href,feature:"wp-admin"};return s()({global:!0,path:"/rest/v1.1/js-error",method:"POST",data:{error:JSON.stringify(e)}}).catch((()=>console.error("Error: Unable to record the error in Logstash.")))};window.addEventListener("error",t),Promise.allSettled(u.map(t)).then((()=>delete window._jsErr))}(),window.removeEventListener("error",c),delete window._headJsErrorHandler}(),window.EditingToolkit=r}();
32
  //# sourceMappingURL=error-reporting.min.js.map
1
+ !function(){"use strict";var t={2314:function(t,e,n){n.d(e,{R:function(){return g}});var r=n(9849),i=n(1476),o=n(8585),s=n(4911),a=n(5907),u=n(3699),c=n(8536),d=n(250),_=n(3135),f=n(6894),l=n(1988),p=n(8356),h=n(5854),v=(0,a.R)();class g extends r.W{constructor(t){t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:i.J}],version:i.J},super(t),t.sendClientReports&&v.document&&v.document.addEventListener("visibilitychange",(()=>{"hidden"===v.document.visibilityState&&this._flushOutcomes()}))}eventFromException(t,e){return(0,l.dr)(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return(0,l.aB)(this._options.stackParser,t,e,n,this._options.attachStacktrace)}sendEvent(t,e){var n=this.getIntegrationById(p.p);n&&n.options&&n.options.sentry&&(0,o.Gd)().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:(0,u.jH)(t)},{event:t}),super.sendEvent(t,e)}_prepareEvent(t,e,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n)}_flushOutcomes(){var t=this._clearOutcomes();if(0!==t.length)if(this._dsn){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&c.kg.log("Sending outcomes:",t);var e=(0,s.U)(this._dsn,this._options.tunnel),n=(0,d.y)(t,this._options.tunnel&&(0,_.RA)(this._dsn));try{(0,h.z)(e,(0,f.V$)(n))}catch(r){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&c.kg.error(r)}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&c.kg.log("No dsn provided, will not send outcomes");else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&c.kg.log("No outcomes to send")}}},1988:function(t,e,n){n.d(e,{dr:function(){return l},aB:function(){return p},ME:function(){return h},GJ:function(){return u}});var r=n(1757),i=n(1995),o=n(8035),s=n(3699),a=n(7946);function u(t,e){var n=d(t,e),r={type:e&&e.name,value:f(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function c(t,e){return{exception:{values:[u(t,e)]}}}function d(t,e){var n=e.stacktrace||e.stack||"",r=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(_.test(t.message))return 1}return 0}(e);try{return t(n,r)}catch(i){}return[]}var _=/Minified React error #\d+;/i;function f(t){var e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function l(t,e,n,r){var i=h(t,e,n&&n.syntheticException||void 0,r);return(0,s.EG)(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),(0,a.WD)(i)}function p(t,e,n="info",r,i){var o=v(t,e,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),(0,a.WD)(o)}function h(t,e,n,a,u){let _;if((0,r.VW)(e)&&e.error)return c(t,e.error);if((0,r.TX)(e)||(0,r.fm)(e)){var f=e;if("stack"in e)_=c(t,e);else{var l=f.name||((0,r.TX)(f)?"DOMError":"DOMException"),p=f.message?`${l}: ${f.message}`:l;_=v(t,p,n,a),(0,s.Db)(_,p)}return"code"in f&&(_.tags={..._.tags,"DOMException.code":`${f.code}`}),_}return(0,r.VZ)(e)?c(t,e):(0,r.PO)(e)||(0,r.cO)(e)?(_=function(t,e,n,s){var a={exception:{values:[{type:(0,r.cO)(e)?e.constructor.name:s?"UnhandledRejection":"Error",value:`Non-Error ${s?"promise rejection":"exception"} captured with keys: ${(0,i.zf)(e)}`}]},extra:{__serialized__:(0,o.Qy)(e)}};if(n){var u=d(t,n);u.length&&(a.exception.values[0].stacktrace={frames:u})}return a}(t,e,n,u),(0,s.EG)(_,{synthetic:!0}),_):(_=v(t,e,n,a),(0,s.Db)(_,`${e}`,void 0),(0,s.EG)(_,{synthetic:!0}),_)}function v(t,e,n,r){var i={message:e};if(r&&n){var o=d(t,n);o.length&&(i.exception={values:[{value:e,stacktrace:{frames:o}}]})}return i}},2634:function(t,e,n){n.d(e,{Wz:function(){return a},re:function(){return c}});var r=n(2483),i=n(1995),o=n(3699);let s=0;function a(){return s>0}function u(){s+=1,setTimeout((()=>{s-=1}))}function c(t,e={},n){if("function"!=typeof t)return t;try{var s=t.__sentry_wrapped__;if(s)return s;if((0,i.HK)(t))return t}catch(_){return t}var a=function(){var i=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);var s=i.map((t=>c(t,e)));return t.apply(this,s)}catch(a){throw u(),(0,r.$e)((t=>{t.addEventProcessor((t=>(e.mechanism&&((0,o.Db)(t,void 0,void 0),(0,o.EG)(t,e.mechanism)),t.extra={...t.extra,arguments:i},t))),(0,r.Tb)(a)})),a}};try{for(var d in t)Object.prototype.hasOwnProperty.call(t,d)&&(a[d]=t[d])}catch(f){}(0,i.$Q)(a,t),(0,i.xp)(t,"__sentry_wrapped__",a);try{Object.getOwnPropertyDescriptor(a,"name").configurable&&Object.defineProperty(a,"name",{get:()=>t.name})}catch(f){}return a}},8356:function(t,e,n){n.d(e,{p:function(){return d},O:function(){return _}});var r=n(8585),i=n(4005),o=n(4194),s=n(8653),a=n(9660),u=n(5907),c=n(3699),d="Breadcrumbs";class _{static __initStatic(){this.id=d}__init(){this.name=_.id}constructor(t){_.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){this.options.console&&(0,i.o)("console",f),this.options.dom&&(0,i.o)("dom",function(t){function e(e){let n,i="object"==typeof t?t.serializeAttribute:void 0;"string"==typeof i&&(i=[i]);try{n=e.event.target?(0,o.R)(e.event.target,i):(0,o.R)(e.event,i)}catch(s){n="<unknown>"}0!==n.length&&(0,r.Gd)().addBreadcrumb({category:`ui.${e.name}`,message:n},{event:e.event,name:e.name,global:e.global})}return e}(this.options.dom)),this.options.xhr&&(0,i.o)("xhr",l),this.options.fetch&&(0,i.o)("fetch",p),this.options.history&&(0,i.o)("history",h)}}function f(t){var e={category:"console",data:{arguments:t.args,logger:"console"},level:(0,s.VT)(t.level),message:(0,a.nK)(t.args," ")};if("assert"===t.level){if(!1!==t.args[0])return;e.message=`Assertion failed: ${(0,a.nK)(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1)}(0,r.Gd)().addBreadcrumb(e,{input:t.args,level:t.level})}function l(t){if(t.endTimestamp){if(t.xhr.__sentry_own_request__)return;const{method:e,url:n,status_code:i,body:o}=t.xhr.__sentry_xhr__||{};(0,r.Gd)().addBreadcrumb({category:"xhr",data:{method:e,url:n,status_code:i},type:"http"},{xhr:t.xhr,input:o})}else;}function p(t){t.endTimestamp&&(t.fetchData.url.match(/sentry_key/)&&"POST"===t.fetchData.method||(t.error?(0,r.Gd)().addBreadcrumb({category:"fetch",data:t.fetchData,level:"error",type:"http"},{data:t.error,input:t.args}):(0,r.Gd)().addBreadcrumb({category:"fetch",data:{...t.fetchData,status_code:t.response.status},type:"http"},{input:t.args,response:t.response})))}function h(t){var e=(0,u.R)();let n=t.from,i=t.to;var o=(0,c.en)(e.location.href);let s=(0,c.en)(n);var a=(0,c.en)(i);s.path||(s=o),o.protocol===a.protocol&&o.host===a.host&&(i=a.relative),o.protocol===s.protocol&&o.host===s.host&&(n=s.relative),(0,r.Gd)().addBreadcrumb({category:"navigation",data:{from:n,to:i}})}_.__initStatic()},184:function(t,e,n){n.d(e,{I:function(){return i}});var r=n(8536);class i{constructor(){i.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=i.id}setupOnce(t,e){var n=t=>{var n=e().getIntegration(i);if(n){try{if(function(t,e){if(!e)return!1;if(function(t,e){var n=t.message,r=e.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!s(t,e))return!1;if(!o(t,e))return!1;return!0}(t,e))return!0;if(function(t,e){var n=a(e),r=a(t);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!s(t,e))return!1;if(!o(t,e))return!1;return!0}(t,e))return!0;return!1}(t,n._previousEvent))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(u){return n._previousEvent=t}return n._previousEvent=t}return t};n.id=this.name,t(n)}}function o(t,e){let n=u(t),r=u(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,r=r,r.length!==n.length)return!1;for(let s=0;s<r.length;s++){var i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function s(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return!(n.join("")!==r.join(""))}catch(i){return!1}}function a(t){return t.exception&&t.exception.values&&t.exception.values[0]}function u(t){var e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(n){return}}i.__initStatic()},1228:function(t,e,n){n.d(e,{d:function(){return _}});var r=n(8585),i=n(4005),o=n(1757),s=n(4194),a=n(8536),u=n(3699),c=n(1988),d=n(2634);class _{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=_.id}__init2(){this._installFunc={onerror:f,onunhandledrejection:l}}constructor(t){_.prototype.__init.call(this),_.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){Error.stackTraceLimit=50;var t,e=this._options;for(var n in e){var r=this._installFunc[n];r&&e[n]&&(t=n,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.log(`Global Handler attached: ${t}`),r(),this._installFunc[n]=void 0)}}}function f(){(0,i.o)("error",(t=>{const[e,n,r]=v();if(!e.getIntegration(_))return;const{msg:i,url:s,line:a,column:u,error:f}=t;if(!((0,d.Wz)()||f&&f.__sentry_own_request__)){var l=void 0===f&&(0,o.HD)(i)?function(t,e,n,r){var i=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let s=(0,o.VW)(t)?t.message:t,a="Error";var u=s.match(i);u&&(a=u[1],s=u[2]);return p({exception:{values:[{type:a,value:s}]}},e,n,r)}(i,s,a,u):p((0,c.ME)(n,f||i,void 0,r,!1),s,a,u);l.level="error",h(e,f,l,"onerror")}}))}function l(){(0,i.o)("unhandledrejection",(t=>{const[e,n,r]=v();if(!e.getIntegration(_))return;let i=t;try{"reason"in t?i=t.reason:"detail"in t&&"reason"in t.detail&&(i=t.detail.reason)}catch(a){}if((0,d.Wz)()||i&&i.__sentry_own_request__)return!0;var s=(0,o.pt)(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:(0,c.ME)(n,i,void 0,r,!0);s.level="error",h(e,i,s,"onunhandledrejection")}))}function p(t,e,n,r){var i=t.exception=t.exception||{},a=i.values=i.values||[],u=a[0]=a[0]||{},c=u.stacktrace=u.stacktrace||{},d=c.frames=c.frames||[],_=isNaN(parseInt(r,10))?void 0:r,f=isNaN(parseInt(n,10))?void 0:n,l=(0,o.HD)(e)&&e.length>0?e:(0,s.l)();return 0===d.length&&d.push({colno:_,filename:l,function:"?",in_app:!0,lineno:f}),t}function h(t,e,n,r){(0,u.EG)(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function v(){var t=(0,r.Gd)(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}_.__initStatic()},2605:function(t,e,n){n.d(e,{q:function(){return s}});var r=n(1684),i=n(8585),o=(0,n(5907).R)();class s{constructor(){s.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=s.id}setupOnce(){(0,r.c)((t=>{if((0,i.Gd)().getIntegration(s)){if(!o.navigator&&!o.location&&!o.document)return t;var e=t.request&&t.request.url||o.location&&o.location.href;const{referrer:r}=o.document||{},{userAgent:i}=o.navigator||{};var n={...e&&{url:e},headers:{...t.request&&t.request.headers,...r&&{Referer:r},...i&&{"User-Agent":i}}};return{...t,request:n}}return t}))}}s.__initStatic()},3440:function(t,e,n){n.d(e,{iP:function(){return a}});var r=n(8585),i=n(1684),o=n(1757),s=n(1988);class a{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=a.id}constructor(t={}){a.prototype.__init.call(this),this._key=t.key||"cause",this._limit=t.limit||5}setupOnce(){var t=(0,r.Gd)().getClient();t&&(0,i.c)(((e,n)=>{var i=(0,r.Gd)().getIntegration(a);return i?function(t,e,n,r,i){if(!(r.exception&&r.exception.values&&i&&(0,o.V9)(i.originalException,Error)))return r;var s=u(t,n,i.originalException,e);return r.exception.values=[...s,...r.exception.values],r}(t.getOptions().stackParser,i._key,i._limit,e,n):e}))}}function u(t,e,n,r,i=[]){if(!(0,o.V9)(n[r],Error)||i.length+1>=e)return i;var a=(0,s.GJ)(t,n[r]);return u(t,e,n[r],r,[a,...i])}a.__initStatic()},3399:function(t,e,n){n.d(e,{p:function(){return u}});var r=n(5907),i=n(1995),o=n(9038),s=n(2634),a=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class u{static __initStatic(){this.id="TryCatch"}__init(){this.name=u.id}constructor(t){u.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){var t=(0,r.R)();this._options.setTimeout&&(0,i.hl)(t,"setTimeout",c),this._options.setInterval&&(0,i.hl)(t,"setInterval",c),this._options.requestAnimationFrame&&(0,i.hl)(t,"requestAnimationFrame",d),this._options.XMLHttpRequest&&"XMLHttpRequest"in t&&(0,i.hl)(XMLHttpRequest.prototype,"send",_);var e=this._options.eventTarget;e&&(Array.isArray(e)?e:a).forEach(f)}}function c(t){return function(...e){var n=e[0];return e[0]=(0,s.re)(n,{mechanism:{data:{function:(0,o.$P)(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function d(t){return function(e){return t.apply(this,[(0,s.re)(e,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,o.$P)(t)},handled:!0,type:"instrument"}})])}}function _(t){return function(...e){var n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((t=>{t in n&&"function"==typeof n[t]&&(0,i.hl)(n,t,(function(e){var n={mechanism:{data:{function:t,handler:(0,o.$P)(e)},handled:!0,type:"instrument"}},r=(0,i.HK)(e);return r&&(n.mechanism.data.handler=(0,o.$P)(r)),(0,s.re)(e,n)}))})),t.apply(this,e)}}function f(t){var e=(0,r.R)(),n=e[t]&&e[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&((0,i.hl)(n,"addEventListener",(function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=(0,s.re)(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:(0,o.$P)(r),target:t},handled:!0,type:"instrument"}}))}catch(a){}return e.apply(this,[n,(0,s.re)(r,{mechanism:{data:{function:"addEventListener",handler:(0,o.$P)(r),target:t},handled:!0,type:"instrument"}}),i])}})),(0,i.hl)(n,"removeEventListener",(function(t){return function(e,n,r){var i=n;try{var o=i&&i.__sentry_wrapped__;o&&t.call(this,e,o,r)}catch(s){}return t.call(this,e,i,r)}})))}u.__initStatic()},2456:function(t,e,n){n.d(e,{yl:function(){return T},S1:function(){return k}});var r=n(1061),i=n(6286),o=n(8889),s=n(6853),a=n(8585),u=n(5907),c=n(9038),d=n(9798),_=n(8536),f=n(7946),l=n(4005),p=n(2314),h=n(2224),v=n(3399),g=n(8356),y=n(1228),m=n(3440),E=n(184),S=n(2605),b=n(6149),x=n(6144),w=[new r.QD,new i.c,new v.p,new g.O,new y.d,new m.iP,new E.I,new S.q];function k(t={}){if(void 0===t.defaultIntegrations&&(t.defaultIntegrations=w),void 0===t.release){var e=(0,u.R)();e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id&&(t.release=e.SENTRY_RELEASE.id)}void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0);var n={...t,stackParser:(0,c.Sq)(t.stackParser||h.Dt),integrations:(0,o.m8)(t),transport:t.transport||((0,d.Ak)()?b.f:x.K)};(0,s.M)(p.R,n),t.autoSessionTracking&&function(){if(void 0===(0,u.R)().document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&_.kg.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));var t=(0,a.Gd)();if(!t.captureSession)return;R(t),(0,l.o)("history",(({from:t,to:e})=>{void 0!==t&&t!==e&&R((0,a.Gd)())}))}()}function T(t){var e=(0,a.Gd)().getClient();return e?e.flush(t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&_.kg.warn("Cannot flush events. No client defined."),(0,f.WD)(!1))}function R(t){t.startSession({ignoreDuration:!0}),t.captureSession()}},2224:function(t,e,n){n.d(e,{Dt:function(){return f}});var r=n(9038),i="?";function o(t,e,n,r){var i={filename:t,function:e,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}var s=/^\s*at (?:(.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,a=/\((\S*)(?::(\d+))(?::(\d+))\)/,u=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,c=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,d=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,_=[[30,t=>{var e=s.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){var n=a.exec(e[2]);n&&(e[2]=n[1],e[3]=n[2],e[4]=n[3])}const[t,r]=l(e[1]||i,e[2]);return o(r,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],[50,t=>{var e=u.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){var n=c.exec(e[3]);n&&(e[1]=e[1]||"eval",e[3]=n[1],e[4]=n[2],e[5]="")}let t=e[3],r=e[1]||i;return[r,t]=l(r,t),o(t,r,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],[40,t=>{var e=d.exec(t);return e?o(e[2],e[1]||i,+e[3],e[4]?+e[4]:void 0):void 0}]],f=(0,r.pE)(..._),l=(t,e)=>{var n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:i,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]}},6149:function(t,e,n){n.d(e,{f:function(){return o}});var r=n(1518),i=n(5854);function o(t,e=(0,i.x)()){return(0,r.q)(t,(function(n){var r={body:n.body,method:"POST",referrerPolicy:"origin",headers:t.headers,...t.fetchOptions};return e(t.url,r).then((t=>({statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}})))}))}},5854:function(t,e,n){n.d(e,{x:function(){return u},z:function(){return c}});var r=n(5907),i=n(9798),o=n(8536),s=(0,r.R)();let a;function u(){if(a)return a;if((0,i.Du)(s.fetch))return a=s.fetch.bind(s);var t=s.document;let e=s.fetch;if(t&&"function"==typeof t.createElement)try{var n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);var r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(u){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",u)}return a=e.bind(s)}function c(t,e){if("[object Navigator]"===Object.prototype.toString.call(s&&s.navigator)&&"function"==typeof s.navigator.sendBeacon)s.navigator.sendBeacon.bind(s.navigator)(t,e);else if((0,i.Ak)()){u()(t,{body:e,method:"POST",credentials:"omit",keepalive:!0}).then(null,(t=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.error(t)}))}}},6144:function(t,e,n){n.d(e,{K:function(){return o}});var r=n(1518),i=n(7946);function o(t){return(0,r.q)(t,(function(e){return new i.cW(((n,r)=>{var i=new XMLHttpRequest;for(var o in i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url),t.headers)Object.prototype.hasOwnProperty.call(t.headers,o)&&i.setRequestHeader(o,t.headers[o]);i.send(e.body)}))}))}},4911:function(t,e,n){n.d(e,{U:function(){return o}});var r=n(1995);function i(t){var e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}function o(t,e){return e||`${function(t){return`${i(t)}${t.projectId}/envelope/`}(t)}?${function(t){return(0,r._j)({sentry_key:t.publicKey,sentry_version:"7"})}(t)}`}},9849:function(t,e,n){n.d(e,{W:function(){return m}});var r=n(2430),i=n(1684),o=n(3135),s=n(8536),a=n(3699),u=n(1757),c=n(7946),d=n(6894),_=n(7790),f=n(8035),l=n(9660),p=n(4388),h=n(4911),v=n(3055),g=n(8889),y="Not capturing exception because it's already been captured.";class m{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}constructor(t){if(m.prototype.__init.call(this),m.prototype.__init2.call(this),m.prototype.__init3.call(this),m.prototype.__init4.call(this),this._options=t,t.dsn){this._dsn=(0,o.vK)(t.dsn);var e=(0,h.U)(this._dsn,t.tunnel);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn("No DSN provided, client will not do anything.")}captureException(t,e,n){if((0,a.YO)(t))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(y));let r=e&&e.event_id;return this._process(this.eventFromException(t,e).then((t=>this._captureEvent(t,e,n))).then((t=>{r=t}))),r}captureMessage(t,e,n,r){let i=n&&n.event_id;var o=(0,u.pt)(t)?this.eventFromMessage(String(t),e,n):this.eventFromException(t,n);return this._process(o.then((t=>this._captureEvent(t,n,r))).then((t=>{i=t}))),i}captureEvent(t,e,n){if(e&&e.originalException&&(0,a.YO)(e.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(y));let r=e&&e.event_id;return this._process(this._captureEvent(t,e,n).then((t=>{r=t}))),r}captureSession(t){this._isEnabled()?"string"!=typeof t.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),(0,r.CT)(t,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(t){var e=this._transport;return e?this._isClientDoneProcessing(t).then((n=>e.flush(t).then((t=>n&&t)))):(0,c.WD)(!0)}close(t){return this.flush(t).then((t=>(this.getOptions().enabled=!1,t)))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=(0,g.q4)(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}sendEvent(t,e={}){if(this._dsn){let r=(0,v.M)(t,this._dsn,this._options._metadata,this._options.tunnel);for(var n of e.attachments||[])r=(0,d.BO)(r,(0,d.zQ)(n,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(r)}}sendSession(t){if(this._dsn){var e=(0,v.Q)(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}}recordDroppedEvent(t,e){if(this._options.sendClientReports){var n=`${t}:${e}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}_updateSessionFromEvent(t,e){let n=!1,i=!1;var o=e.exception&&e.exception.values;if(o)for(var s of(i=!0,o)){var a=s.mechanism;if(a&&!1===a.handled){n=!0;break}}var u="ok"===t.status;(u&&0===t.errors||u&&n)&&((0,r.CT)(t,{...n&&{status:"crashed"},errors:t.errors||Number(i||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new c.cW((e=>{let n=0;var r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(t,e,n){const{normalizeDepth:r=3,normalizeMaxBreadth:o=1e3}=this.getOptions();var s={...t,event_id:t.event_id||e.event_id||(0,a.DM)(),timestamp:t.timestamp||(0,_.yW)()};this._applyClientOptions(s),this._applyIntegrationsMetadata(s);let u=n;e.captureContext&&(u=i.s.clone(u).update(e.captureContext));let d=(0,c.WD)(s);if(u){var f=[...e.attachments||[],...u.getAttachments()];f.length&&(e.attachments=f),d=u.applyToEvent(s,e)}return d.then((t=>"number"==typeof r&&r>0?this._normalizeEvent(t,r,o):t))}_normalizeEvent(t,e,n){if(!t)return null;var r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map((t=>({...t,...t.data&&{data:(0,f.Fv)(t.data,e,n)}})))},...t.user&&{user:(0,f.Fv)(t.user,e,n)},...t.contexts&&{contexts:(0,f.Fv)(t.contexts,e,n)},...t.extra&&{extra:(0,f.Fv)(t.extra,e,n)}};return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=(0,f.Fv)(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map((t=>(t.data&&(t.data=(0,f.Fv)(t.data,e,n)),t)))),r}_applyClientOptions(t){var e=this.getOptions();const{environment:n,release:r,dist:i,maxValueLength:o=250}=e;"environment"in t||(t.environment="environment"in e?n:"production"),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==i&&(t.dist=i),t.message&&(t.message=(0,l.$G)(t.message,o));var s=t.exception&&t.exception.values&&t.exception.values[0];s&&s.value&&(s.value=(0,l.$G)(s.value,o));var a=t.request;a&&a.url&&(a.url=(0,l.$G)(a.url,o))}_applyIntegrationsMetadata(t){var e=Object.keys(this._integrations);e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then((t=>t.event_id),(t=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.warn(t)}))}_processEvent(t,e,n){const{beforeSend:r,sampleRate:i}=this.getOptions();if(!this._isEnabled())return(0,c.$2)(new p.b("SDK not enabled, will not capture event."));var o="transaction"===t.type;return!o&&"number"==typeof i&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),(0,c.$2)(new p.b(`Discarding event because it's not included in the random sample (sampling rate = ${i})`))):this._prepareEvent(t,e,n).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",t.type||"error"),new p.b("An event processor returned null, will not send event.");return e.data&&!0===e.data.__sentry__||o||!r?n:function(t){var e="`beforeSend` method has to return `null` or a valid event.";if((0,u.J8)(t))return t.then((t=>{if(!(0,u.PO)(t)&&null!==t)throw new p.b(e);return t}),(t=>{throw new p.b(`beforeSend rejected with ${t}`)}));if(!(0,u.PO)(t)&&null!==t)throw new p.b(e);return t}(r(n,e))})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",t.type||"error"),new p.b("`beforeSend` returned `null`, will not send event.");var i=n&&n.getSession();return!o&&i&&this._updateSessionFromEvent(i,r),this.sendEvent(r,e),r})).then(null,(t=>{if(t instanceof p.b)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new p.b(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)}))}_process(t){this._numProcessing+=1,t.then((t=>(this._numProcessing-=1,t)),(t=>(this._numProcessing-=1,t)))}_sendEnvelope(t){this._transport&&this._dsn?this._transport.send(t).then(null,(t=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.error("Error while sending event:",t)})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.kg.error("Transport disabled")}_clearOutcomes(){var t=this._outcomes;return this._outcomes={},Object.keys(t).map((e=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t[e]}}))}}},3055:function(t,e,n){n.d(e,{M:function(){return c},Q:function(){return u}});var r=n(3135),i=n(6894),o=n(6990),s=n(1995);function a(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function u(t,e,n,o){var s=a(n),u={sent_at:(new Date).toISOString(),...s&&{sdk:s},...!!o&&{dsn:(0,r.RA)(e)}},c="aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t];return(0,i.Jd)(u,[c])}function c(t,e,n,u){var c=a(n),d=t.type||"event";const{transactionSampling:_}=t.sdkProcessingMetadata||{},{method:f,rate:l}=_||{};!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);var p=function(t,e,n,i){var a=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.baggage,u=a&&(0,o.Hk)(a);return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&{dsn:(0,r.RA)(i)},..."transaction"===t.type&&u&&{trace:(0,s.Jr)({...u})}}}(t,c,u,e);delete t.sdkProcessingMetadata;var h=[{type:d,sample_rates:[{id:f,rate:l}]},t];return(0,i.Jd)(p,[h])}},8889:function(t,e,n){n.d(e,{m8:function(){return u},q4:function(){return c}});var r=n(1684),i=n(8585),o=n(8536),s=[];function a(t){return t.reduce(((t,e)=>(t.every((t=>e.name!==t.name))&&t.push(e),t)),[])}function u(t){var e=t.defaultIntegrations&&[...t.defaultIntegrations]||[],n=t.integrations;let r=[...a(e)];Array.isArray(n)?r=[...r.filter((t=>n.every((e=>e.name!==t.name)))),...a(n)]:"function"==typeof n&&(r=n(r),r=Array.isArray(r)?r:[r]);var i=r.map((t=>t.name)),o="Debug";return-1!==i.indexOf(o)&&r.push(...r.splice(i.indexOf(o),1)),r}function c(t){var e={};return t.forEach((t=>{e[t.name]=t,-1===s.indexOf(t.name)&&(t.setupOnce(r.c,i.Gd),s.push(t.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.log(`Integration installed: ${t.name}`))})),e}},6286:function(t,e,n){n.d(e,{c:function(){return o}});var r=n(1995);let i;class o{constructor(){o.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=o.id}setupOnce(){i=Function.prototype.toString,Function.prototype.toString=function(...t){var e=(0,r.HK)(this)||this;return i.apply(e,t)}}}o.__initStatic()},1061:function(t,e,n){n.d(e,{QD:function(){return a}});var r=n(8536),i=n(3699),o=n(9660),s=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class a{static __initStatic(){this.id="InboundFilters"}__init(){this.name=a.id}constructor(t={}){this._options=t,a.prototype.__init.call(this)}setupOnce(t,e){var n=t=>{var n=e();if(n){var c=n.getIntegration(a);if(c){var d=n.getClient(),_=d?d.getOptions():{},f=function(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...s],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(c._options,_);return function(t,e){if(e.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(e){}return!1}(t))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${(0,i.jH)(t)}`),!0;if(function(t,e){if(!e||!e.length)return!1;return function(t){if(t.message)return[t.message];if(t.exception)try{const{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error(`Cannot extract message for event ${(0,i.jH)(t)}`),[]}return[]}(t).some((t=>e.some((e=>(0,o.zC)(t,e)))))}(t,e.ignoreErrors))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${(0,i.jH)(t)}`),!0;if(function(t,e){if(!e||!e.length)return!1;var n=u(t);return!!n&&e.some((t=>(0,o.zC)(n,t)))}(t,e.denyUrls))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${(0,i.jH)(t)}.\nUrl: ${u(t)}`),!0;if(!function(t,e){if(!e||!e.length)return!0;var n=u(t);return!n||e.some((t=>(0,o.zC)(n,t)))}(t,e.allowUrls))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${(0,i.jH)(t)}.\nUrl: ${u(t)}`),!0;return!1}(t,f)?null:t}}return t};n.id=this.name,t(n)}}function u(t){try{let n;try{n=t.exception.values[0].stacktrace.frames}catch(e){}return n?function(t=[]){for(let n=t.length-1;n>=0;n--){var e=t[n];if(e&&"<anonymous>"!==e.filename&&"[native code]"!==e.filename)return e.filename||null}return null}(n):null}catch(n){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r.kg.error(`Cannot extract url for event ${(0,i.jH)(t)}`),null}}a.__initStatic()},6853:function(t,e,n){n.d(e,{M:function(){return o}});var r=n(8585),i=n(8536);function o(t,e){!0===e.debug&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?i.kg.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));var n=(0,r.Gd)(),o=n.getScope();o&&o.update(e.initialScope);var s=new t(e);n.bindClient(s)}},1518:function(t,e,n){n.d(e,{q:function(){return c}});var r=n(8963),i=n(6894),o=n(1630),s=n(7946),a=n(8536),u=n(4388);function c(t,e,n=(0,r.x)(t.bufferSize||30)){let c={};return{send:function(r){var d=[];if((0,i.gv)(r,((e,n)=>{var r=(0,i.mL)(n);(0,o.Q)(c,r)?t.recordDroppedEvent("ratelimit_backoff",r):d.push(e)})),0===d.length)return(0,s.WD)();var _=(0,i.Jd)(r[0],d),f=e=>{(0,i.gv)(_,((n,r)=>{t.recordDroppedEvent(e,(0,i.mL)(r))}))};return n.add((()=>e({body:(0,i.V$)(_,t.textEncoder)}).then((t=>{void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),c=(0,o.WG)(c,t)}),(t=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.error("Failed while sending event:",t),f("network_error")})))).then((t=>t),(t=>{if(t instanceof u.b)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.kg.error("Skipped sending event due to full buffer"),f("queue_overflow"),(0,s.WD)();throw t}))},flush:t=>n.drain(t)}}},1476:function(t,e,n){n.d(e,{J:function(){return r}});var r="7.3.1"},2483:function(t,e,n){n.d(e,{Tb:function(){return i},$e:function(){return o}});var r=n(8585);function i(t,e){return(0,r.Gd)().captureException(t,{captureContext:e})}function o(t){(0,r.Gd)().withScope(t)}},8585:function(t,e,n){n.d(e,{Gd:function(){return p}});var r=n(3699),i=n(7790),o=n(8536),s=n(5907),a=n(7392),u=n(1684),c=n(2430),d=100;class _{__init(){this._stack=[{}]}constructor(t,e=new u.s,n=4){this._version=n,_.prototype.__init.call(this),this.getStackTop().scope=e,t&&this.bindClient(t)}isOlderThan(t){return this._version<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){var t=u.s.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(t){var e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,e){var n=this._lastEventId=e&&e.event_id?e.event_id:(0,r.DM)(),i=new Error("Sentry syntheticException");return this._withClient(((r,o)=>{r.captureException(t,{originalException:t,syntheticException:i,...e,event_id:n},o)})),n}captureMessage(t,e,n){var i=this._lastEventId=n&&n.event_id?n.event_id:(0,r.DM)(),o=new Error(t);return this._withClient(((r,s)=>{r.captureMessage(t,e,{originalException:t,syntheticException:o,...n,event_id:i},s)})),i}captureEvent(t,e){var n=e&&e.event_id?e.event_id:(0,r.DM)();return"transaction"!==t.type&&(this._lastEventId=n),this._withClient(((r,i)=>{r.captureEvent(t,{...e,event_id:n},i)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:s=null,maxBreadcrumbs:a=d}=r.getOptions&&r.getOptions()||{};if(!(a<=0)){var u={timestamp:(0,i.yW)(),...t},c=s?(0,o.Cf)((()=>s(u,e))):u;null!==c&&n.addBreadcrumb(c,a)}}setUser(t){var e=this.getScope();e&&e.setUser(t)}setTags(t){var e=this.getScope();e&&e.setTags(t)}setExtras(t){var e=this.getScope();e&&e.setExtras(t)}setTag(t,e){var n=this.getScope();n&&n.setTag(t,e)}setExtra(t,e){var n=this.getScope();n&&n.setExtra(t,e)}setContext(t,e){var n=this.getScope();n&&n.setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();e&&n&&t(e)}run(t){var e=l(this);try{t(this)}finally{l(e)}}getIntegration(t){var e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(n){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){return this._callExtensionMethod("startTransaction",t,e)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){var t=this.getStackTop(),e=t&&t.scope,n=e&&e.getSession();n&&(0,c.RJ)(n),this._sendSessionUpdate(),e&&e.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:i}=n&&n.getOptions()||{};var o=(0,s.R)();const{userAgent:a}=o.navigator||{};var u=(0,c.Hv)({release:r,environment:i,...e&&{user:e.getUser()},...a&&{userAgent:a},...t});if(e){var d=e.getSession&&e.getSession();d&&"ok"===d.status&&(0,c.CT)(d,{status:"exited"}),this.endSession(),e.setSession(u)}return u}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop();if(t){var n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}}_withClient(t){const{scope:e,client:n}=this.getStackTop();n&&t(n,e)}_callExtensionMethod(t,...e){var n=f().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function f(){var t=(0,s.R)();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}function l(t){var e=f(),n=v(e);return g(e,t),n}function p(){var t=f();return h(t)&&!v(t).isOlderThan(4)||g(t,new _),(0,a.KV)()?function(t){try{var e=f().__SENTRY__,n=e&&e.extensions&&e.extensions.domain&&e.extensions.domain.active;if(!n)return v(t);if(!h(n)||v(n).isOlderThan(4)){var r=v(t).getStackTop();g(n,new _(r.client,u.s.clone(r.scope)))}return v(n)}catch(i){return v(t)}}(t):v(t)}function h(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function v(t){return(0,s.Y)("hub",(()=>new _),t)}function g(t,e){return!!t&&((t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0)}},1684:function(t,e,n){n.d(e,{s:function(){return c},c:function(){return _}});var r=n(1757),i=n(7790),o=n(7946),s=n(8536),a=n(5907),u=n(2430);class c{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){var e=new c;return t&&(e._breadcrumbs=[...t._breadcrumbs],e._tags={...t._tags},e._extra={...t._extra},e._contexts={...t._contexts},e._user=t._user,e._level=t._level,e._span=t._span,e._session=t._session,e._transactionName=t._transactionName,e._fingerprint=t._fingerprint,e._eventProcessors=[...t._eventProcessors],e._requestSession=t._requestSession,e._attachments=[...t._attachments]),e}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&(0,u.CT)(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,e){return null===e?delete this._contexts[t]:this._contexts={...this._contexts,[t]:e},this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){var t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if("function"==typeof t){var e=t(this);return e instanceof c?e:this}return t instanceof c?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession)):(0,r.PO)(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(t,e){var n="number"==typeof e?Math.min(e,100):100;if(n<=0)return this;var r={timestamp:(0,i.yW)(),...t};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,e={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};var n=this._span.transaction&&this._span.transaction.name;n&&(t.tags={transaction:n,...t.tags})}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...d(),...this._eventProcessors],t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,e,n,i=0){return new o.cW(((o,a)=>{var u=t[i];if(null===e||"function"!=typeof u)o(e);else{var c=u({...e},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&u.id&&null===c&&s.kg.log(`Event processor "${u.id}" dropped event`),(0,r.J8)(c)?c.then((e=>this._notifyEventProcessors(t,e,n,i+1).then(o))).then(null,a):this._notifyEventProcessors(t,c,n,i+1).then(o).then(null,a)}}))}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((t=>{t(this)})),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function d(){return(0,a.Y)("globalEventProcessors",(()=>[]))}function _(t){d().push(t)}},2430:function(t,e,n){n.d(e,{RJ:function(){return u},Hv:function(){return s},CT:function(){return a}});var r=n(7790),i=n(3699),o=n(1995);function s(t){var e=(0,r.ph)(),n={sid:(0,i.DM)(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return(0,o.Jr)({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&a(n,t),n}function a(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||(0,r.ph)(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:(0,i.DM)()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{var n=t.timestamp-t.started;t.duration=n>=0?n:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}function u(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),a(t,n)}},6990:function(t,e,n){n.d(e,{Hk:function(){return r}});function r(t){return t[0]}},4194:function(t,e,n){n.d(e,{l:function(){return a},R:function(){return o}});var r=n(5907),i=n(1757);function o(t,e){try{let i=t;var n=[];let o=0,a=0;var r=" > ".length;let u;for(;i&&o++<5&&(u=s(i,e),!("html"===u||o>1&&a+n.length*r+u.length>=80));)n.push(u),a+=u.length,i=i.parentNode;return n.reverse().join(" > ")}catch(i){return"<unknown>"}}function s(t,e){var n=t,r=[];let o,s,a,u,c;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());var d=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(d&&d.length)d.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),o=n.className,o&&(0,i.HD)(o))for(s=o.split(/\s+/),c=0;c<s.length;c++)r.push(`.${s[c]}`);var _=["type","name","title","alt"];for(c=0;c<_.length;c++)a=_[c],u=n.getAttribute(a),u&&r.push(`[${a}="${u}"]`);return r.join("")}function a(){var t=(0,r.R)();try{return t.document.location.href}catch(e){return""}}},250:function(t,e,n){n.d(e,{y:function(){return o}});var r=n(6894),i=n(7790);function o(t,e,n){var o=[{type:"client_report"},{timestamp:n||(0,i.yW)(),discarded_events:t}];return(0,r.Jd)(e?{dsn:e}:{},[o])}},3135:function(t,e,n){n.d(e,{RA:function(){return o},vK:function(){return u}});var r=n(4388),i=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/;function o(t,e=!1){const{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:u}=t;return`${a}://${u}${e&&i?`:${i}`:""}@${n}${o?`:${o}`:""}/${r?`${r}/`:r}${s}`}function s(t){var e=i.exec(t);if(!e)throw new r.b(`Invalid Sentry Dsn: ${t}`);const[n,o,s="",u,c="",d]=e.slice(1);let _="",f=d;var l=f.split("/");if(l.length>1&&(_=l.slice(0,-1).join("/"),f=l.pop()),f){var p=f.match(/^\d+/);p&&(f=p[0])}return a({host:u,pass:s,path:_,projectId:f,port:c,protocol:n,publicKey:o})}function a(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function u(t){var e="string"==typeof t?s(t):a(t);return function(t){if("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__)return;const{port:e,projectId:n,protocol:i}=t;if(["protocol","publicKey","host","projectId"].forEach((e=>{if(!t[e])throw new r.b(`Invalid Sentry Dsn: ${e} missing`)})),!n.match(/^\d+$/))throw new r.b(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!function(t){return"http"===t||"https"===t}(i))throw new r.b(`Invalid Sentry Dsn: Invalid protocol ${i}`);if(e&&isNaN(parseInt(e,10)))throw new r.b(`Invalid Sentry Dsn: Invalid port ${e}`)}(e),e}},4285:function(t,e,n){function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}n.d(e,{n:function(){return r}})},6894:function(t,e,n){n.d(e,{BO:function(){return o},zQ:function(){return c},Jd:function(){return i},mL:function(){return _},gv:function(){return s},V$:function(){return u}});var r=n(1995);function i(t,e=[]){return[t,e]}function o(t,e){const[n,r]=t;return[n,[...r,e]]}function s(t,e){t[1].forEach((t=>{var n=t[0].type;e(t,n)}))}function a(t,e){return(e||new TextEncoder).encode(t)}function u(t,e){const[n,r]=t;let i=JSON.stringify(n);function o(t){"string"==typeof i?i="string"==typeof t?i+t:[a(i,e),t]:i.push("string"==typeof t?a(t,e):t)}for(var s of r){const[t,e]=s;o(`\n${JSON.stringify(t)}\n`),o("string"==typeof e||e instanceof Uint8Array?e:JSON.stringify(e))}return"string"==typeof i?i:function(t){var e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let r=0;for(var i of t)n.set(i,r),r+=i.length;return n}(i)}function c(t,e){var n="string"==typeof t.data?a(t.data,e):t.data;return[(0,r.Jr)({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}var d={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function _(t){return d[t]}},4388:function(t,e,n){n.d(e,{b:function(){return r}});class r extends Error{constructor(t){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype)}}},5907:function(t,e,n){n.d(e,{R:function(){return o},Y:function(){return s}});var r=n(7392),i={};function o(){return(0,r.KV)()||"undefined"!=typeof window?window:"undefined"!=typeof self?self:i}function s(t,e,n){var r=n||o(),i=r.__SENTRY__=r.__SENTRY__||{};return i[t]||(i[t]=e())}},4005:function(t,e,n){n.d(e,{o:function(){return l}});var r=n(5907),i=n(1757),o=n(8536),s=n(1995),a=n(9038),u=n(9798),c=(0,r.R)(),d={},_={};function f(t){if(!_[t])switch(_[t]=!0,t){case"console":!function(){if(!("console"in c))return;o.RU.forEach((function(t){t in c.console&&(0,s.hl)(c.console,t,(function(e){return function(...n){p("console",{args:n,level:t}),e&&e.apply(c.console,n)}}))}))}();break;case"dom":!function(){if(!("document"in c))return;var t=p.bind(null,"dom"),e=E(t,!0);c.document.addEventListener("click",e,!1),c.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach((e=>{var n=c[e]&&c[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&((0,s.hl)(n,"addEventListener",(function(e){return function(n,r,i){if("click"===n||"keypress"==n)try{var o=this,s=o.__sentry_instrumentation_handlers__=o.__sentry_instrumentation_handlers__||{},a=s[n]=s[n]||{refCount:0};if(!a.handler){var u=E(t);a.handler=u,e.call(this,n,u,i)}a.refCount+=1}catch(c){}return e.call(this,n,r,i)}})),(0,s.hl)(n,"removeEventListener",(function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{var i=this,o=i.__sentry_instrumentation_handlers__||{},s=o[e];s&&(s.refCount-=1,s.refCount<=0&&(t.call(this,e,s.handler,r),s.handler=void 0,delete o[e]),0===Object.keys(o).length&&delete i.__sentry_instrumentation_handlers__)}catch(a){}return t.call(this,e,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in c))return;var t=XMLHttpRequest.prototype;(0,s.hl)(t,"open",(function(t){return function(...e){var n=this,r=e[1],o=n.__sentry_xhr__={method:(0,i.HD)(e[0])?e[0].toUpperCase():e[0],url:e[1]};(0,i.HD)(r)&&"POST"===o.method&&r.match(/sentry_key/)&&(n.__sentry_own_request__=!0);var a=function(){if(4===n.readyState){try{o.status_code=n.status}catch(t){}p("xhr",{args:e,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?(0,s.hl)(n,"onreadystatechange",(function(t){return function(...e){return a(),t.apply(n,e)}})):n.addEventListener("readystatechange",a),t.apply(n,e)}})),(0,s.hl)(t,"send",(function(t){return function(...e){return this.__sentry_xhr__&&void 0!==e[0]&&(this.__sentry_xhr__.body=e[0]),p("xhr",{args:e,startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}}))}();break;case"fetch":!function(){if(!(0,u.t$)())return;(0,s.hl)(c,"fetch",(function(t){return function(...e){var n={args:e,fetchData:{method:h(e),url:v(e)},startTimestamp:Date.now()};return p("fetch",{...n}),t.apply(c,e).then((t=>(p("fetch",{...n,endTimestamp:Date.now(),response:t}),t)),(t=>{throw p("fetch",{...n,endTimestamp:Date.now(),error:t}),t}))}}))}();break;case"history":!function(){if(!(0,u.Bf)())return;var t=c.onpopstate;function e(t){return function(...e){var n=e.length>2?e[2]:void 0;if(n){var r=g,i=String(n);g=i,p("history",{from:r,to:i})}return t.apply(this,e)}}c.onpopstate=function(...e){var n=c.location.href,r=g;if(g=n,p("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(i){}},(0,s.hl)(c.history,"pushState",e),(0,s.hl)(c.history,"replaceState",e)}();break;case"error":S=c.onerror,c.onerror=function(t,e,n,r,i){return p("error",{column:r,error:i,line:n,msg:t,url:e}),!!S&&S.apply(this,arguments)};break;case"unhandledrejection":b=c.onunhandledrejection,c.onunhandledrejection=function(t){return p("unhandledrejection",t),!b||b.apply(this,arguments)};break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.warn("unknown instrumentation type:",t))}}function l(t,e){d[t]=d[t]||[],d[t].push(e),f(t)}function p(t,e){if(t&&d[t])for(var n of d[t]||[])try{n(e)}catch(r){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.kg.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${(0,a.$P)(n)}\nError:`,r)}}function h(t=[]){return"Request"in c&&(0,i.V9)(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function v(t=[]){return"string"==typeof t[0]?t[0]:"Request"in c&&(0,i.V9)(t[0],Request)?t[0].url:String(t[0])}let g;let y,m;function E(t,e=!1){return n=>{if(n&&m!==n&&!function(t){if("keypress"!==t.type)return!1;try{var e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(n){}return!0}(n)){var r="keypress"===n.type?"input":n.type;(void 0===y||function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(n){}return!1}(m,n))&&(t({event:n,name:r,global:e}),m=n),clearTimeout(y),y=c.setTimeout((()=>{y=void 0}),1e3)}}}let S=null;let b=null},1757:function(t,e,n){n.d(e,{TX:function(){return a},fm:function(){return u},kK:function(){return l},VZ:function(){return i},VW:function(){return s},cO:function(){return f},V9:function(){return y},i2:function(){return g},PO:function(){return _},pt:function(){return d},Kj:function(){return p},HD:function(){return c},Cy:function(){return v},J8:function(){return h}});var r=Object.prototype.toString;function i(t){switch(r.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return y(t,Error)}}function o(t,e){return r.call(t)===`[object ${e}]`}function s(t){return o(t,"ErrorEvent")}function a(t){return o(t,"DOMError")}function u(t){return o(t,"DOMException")}function c(t){return o(t,"String")}function d(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function _(t){return o(t,"Object")}function f(t){return"undefined"!=typeof Event&&y(t,Event)}function l(t){return"undefined"!=typeof Element&&y(t,Element)}function p(t){return o(t,"RegExp")}function h(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function v(t){return _(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function g(t){return"number"==typeof t&&t!=t}function y(t,e){try{return t instanceof e}catch(n){return!1}}},8536:function(t,e,n){n.d(e,{RU:function(){return o},Cf:function(){return s},kg:function(){return u}});var r=n(5907),i=(0,r.R)(),o=["debug","info","warn","error","log","assert","trace"];function s(t){var e=(0,r.R)();if(!("console"in e))return t();var n=e.console,i={};o.forEach((t=>{var r=n[t]&&n[t].__sentry_original__;t in e.console&&r&&(i[t]=n[t],n[t]=r)}));try{return t()}finally{Object.keys(i).forEach((t=>{n[t]=i[t]}))}}function a(){let t=!1;var e={enable:()=>{t=!0},disable:()=>{t=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?o.forEach((n=>{e[n]=(...e)=>{t&&s((()=>{i.console[n](`Sentry Logger [${n}]:`,...e)}))}})):o.forEach((t=>{e[t]=()=>{}})),e}let u;u="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?(0,r.Y)("logger",a):a()},4048:function(t,e,n){function r(){var t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++){if(e[t]===n)return!0}return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}n.d(e,{i:function(){return r}})},3699:function(t,e,n){n.d(e,{EG:function(){return d},Db:function(){return c},YO:function(){return _},jH:function(){return u},en:function(){return s},DM:function(){return o}});var r=n(5907),i=n(1995);function o(){var t=(0,r.R)(),e=t.crypto||t.msCrypto;if(void 0!==e&&e.getRandomValues){var n=new Uint16Array(8);e.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var i=t=>{let e=t.toString(16);for(;e.length<4;)e=`0${e}`;return e};return i(n[0])+i(n[1])+i(n[2])+i(n[3])+i(n[4])+i(n[5])+i(n[6])+i(n[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(t=>{var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))}function s(t){if(!t)return{};var e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};var n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+n+r}}function a(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function u(t){const{message:e,event_id:n}=t;if(e)return e;var r=a(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function c(t,e,n){var r=t.exception=t.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=e||""),o.type||(o.type=n||"Error")}function d(t,e){var n=a(t);if(n){var r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){var i={...r&&r.data,...e.data};n.mechanism.data=i}}}function _(t){if(t&&t.__sentry_captured__)return!0;try{(0,i.xp)(t,"__sentry_captured__",!0)}catch(e){}return!1}},7392:function(t,e,n){n.d(e,{l$:function(){return o},KV:function(){return i}});var r=n(4285);function i(){return!(0,r.n)()&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function o(t,e){return t.require(e)}t=n.hmd(t)},8035:function(t,e,n){n.d(e,{Fv:function(){return a},Qy:function(){return u}});var r=n(1757),i=n(4048),o=n(1995),s=n(9038);function a(t,e=1/0,n=1/0){try{return c("",t,e,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function u(t,e=3,n=102400){var r,i=a(t,e);return r=i,function(t){return~-encodeURI(t).split(/%..|./).length}(JSON.stringify(r))>n?u(t,e-1,n):i}function c(t,e,n=1/0,a=1/0,u=(0,i.i)()){const[d,_]=u;var f=e;if(f&&"function"==typeof f.toJSON)try{return f.toJSON()}catch(m){}if(null===e||["number","boolean","string"].includes(typeof e)&&!(0,r.i2)(e))return e;var l=function(t,e){try{return"domain"===t&&e&&"object"==typeof e&&e._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":"undefined"!=typeof window&&e===window?"[Global]":"undefined"!=typeof window&&e===window?"[Window]":"undefined"!=typeof document&&e===document?"[Document]":(0,r.Cy)(e)?"[SyntheticEvent]":"number"==typeof e&&e!=e?"[NaN]":void 0===e?"[undefined]":"function"==typeof e?`[Function: ${(0,s.$P)(e)}]`:"symbol"==typeof e?`[${String(e)}]`:"bigint"==typeof e?`[BigInt: ${String(e)}]`:`[object ${Object.getPrototypeOf(e).constructor.name}]`}catch(m){return`**non-serializable** (${m})`}}(t,e);if(!l.startsWith("[object "))return l;if(e.__sentry_skip_normalization__)return e;if(0===n)return l.replace("object ","");if(d(e))return"[Circular ~]";var p=Array.isArray(e)?[]:{};let h=0;var v=(0,o.Sh)(e);for(var g in v)if(Object.prototype.hasOwnProperty.call(v,g)){if(h>=a){p[g]="[MaxProperties ~]";break}var y=v[g];p[g]=c(g,y,n-1,a,u),h+=1}return _(e),p}},1995:function(t,e,n){n.d(e,{xp:function(){return a},Sh:function(){return _},Jr:function(){return h},zf:function(){return p},hl:function(){return s},HK:function(){return c},$Q:function(){return u},_j:function(){return d}});var r=n(4194),i=n(1757),o=n(9660);function s(t,e,n){if(e in t){var r=t[e],i=n(r);if("function"==typeof i)try{u(i,r)}catch(o){}t[e]=i}}function a(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}function u(t,e){var n=e.prototype||{};t.prototype=e.prototype=n,a(t,"__sentry_original__",e)}function c(t){return t.__sentry_original__}function d(t){return Object.keys(t).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`)).join("&")}function _(t){if((0,i.VZ)(t))return{message:t.message,name:t.name,stack:t.stack,...l(t)};if((0,i.cO)(t)){var e={type:t.type,target:f(t.target),currentTarget:f(t.currentTarget),...l(t)};return"undefined"!=typeof CustomEvent&&(0,i.V9)(t,CustomEvent)&&(e.detail=t.detail),e}return t}function f(t){try{return(0,i.kK)(t)?(0,r.R)(t):Object.prototype.toString.call(t)}catch(e){return"<unknown>"}}function l(t){if("object"==typeof t&&null!==t){var e={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function p(t,e=40){var n=Object.keys(_(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return(0,o.$G)(n[0],e);for(let i=n.length;i>0;i--){var r=n.slice(0,i).join(", ");if(!(r.length>e))return i===n.length?r:(0,o.$G)(r,e)}return""}function h(t){return v(t,new Map)}function v(t,e){if((0,i.PO)(t)){if(void 0!==(o=e.get(t)))return o;var n={};for(var r of(e.set(t,n),Object.keys(t)))void 0!==t[r]&&(n[r]=v(t[r],e));return n}if(Array.isArray(t)){var o;if(void 0!==(o=e.get(t)))return o;n=[];return e.set(t,n),t.forEach((t=>{n.push(v(t,e))})),n}return t}},8963:function(t,e,n){n.d(e,{x:function(){return o}});var r=n(4388),i=n(7946);function o(t){var e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(o){if(!(void 0===t||e.length<t))return(0,i.$2)(new r.b("Not adding Promise due to buffer limit reached."));var s=o();return-1===e.indexOf(s)&&e.push(s),s.then((()=>n(s))).then(null,(()=>n(s).then(null,(()=>{})))),s},drain:function(t){return new i.cW(((n,r)=>{let o=e.length;if(!o)return n(!0);var s=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{(0,i.WD)(t).then((()=>{--o||(clearTimeout(s),n(!0))}),r)}))}))}}}},1630:function(t,e,n){n.d(e,{Q:function(){return r},WG:function(){return i}});function r(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}function i(t,{statusCode:e,headers:n},r=Date.now()){var i={...t},o=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(o)for(var a of o.trim().split(",")){const[t,e]=a.split(":",2);var u=parseInt(t,10),c=1e3*(isNaN(u)?60:u);if(e)for(var d of e.split(";"))i[d]=r+c;else i.all=r+c}else s?i.all=r+function(t,e=Date.now()){var n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;var r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}(s,r):429===e&&(i.all=r+6e4);return i}},8653:function(t,e,n){n.d(e,{VT:function(){return i}});var r=["fatal","error","warning","log","info","debug"];function i(t){return"warn"===t?"warning":r.includes(t)?t:"log"}},9038:function(t,e,n){n.d(e,{pE:function(){return r},$P:function(){return s},Sq:function(){return i}});function r(...t){var e=t.sort(((t,e)=>t[0]-e[0])).map((t=>t[1]));return(t,n=0)=>{var r=[];for(var i of t.split("\n").slice(n))for(var o of e){var s=o(i);if(s){r.push(s);break}}return function(t){if(!t.length)return[];let e=t;var n=e[0].function||"",r=e[e.length-1].function||"";-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(e=e.slice(1));-1!==r.indexOf("sentryWrapped")&&(e=e.slice(0,-1));return e.slice(0,50).map((t=>({...t,filename:t.filename||e[0].filename,function:t.function||"?"}))).reverse()}(r)}}function i(t){return Array.isArray(t)?r(...t):t}var o="<anonymous>";function s(t){try{return t&&"function"==typeof t&&t.name||o}catch(e){return o}}},9660:function(t,e,n){n.d(e,{zC:function(){return s},nK:function(){return o},$G:function(){return i}});var r=n(1757);function i(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.substr(0,e)}...`}function o(t,e){if(!Array.isArray(t))return"";var n=[];for(let o=0;o<t.length;o++){var r=t[o];try{n.push(String(r))}catch(i){n.push("[value cannot be serialized]")}}return n.join(e)}function s(t,e){return!!(0,r.HD)(t)&&((0,r.Kj)(e)?e.test(t):"string"==typeof e&&-1!==t.indexOf(e))}},9798:function(t,e,n){n.d(e,{Du:function(){return s},Ak:function(){return o},Bf:function(){return u},t$:function(){return a}});var r=n(5907),i=n(8536);function o(){if(!("fetch"in(0,r.R)()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}function s(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}function a(){if(!o())return!1;var t=(0,r.R)();if(s(t.fetch))return!0;let e=!1;var n=t.document;if(n&&"function"==typeof n.createElement)try{var a=n.createElement("iframe");a.hidden=!0,n.head.appendChild(a),a.contentWindow&&a.contentWindow.fetch&&(e=s(a.contentWindow.fetch)),n.head.removeChild(a)}catch(u){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.kg.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",u)}return e}function u(){var t=(0,r.R)(),e=t.chrome,n=e&&e.app&&e.app.runtime,i="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!n&&i}},7946:function(t,e,n){n.d(e,{cW:function(){return a},$2:function(){return s},WD:function(){return o}});var r,i=n(1757);function o(t){return new a((e=>{e(t)}))}function s(t){return new a(((e,n)=>{n(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(r||(r={}));class a{__init(){this._state=r.PENDING}__init2(){this._handlers=[]}constructor(t){a.prototype.__init.call(this),a.prototype.__init2.call(this),a.prototype.__init3.call(this),a.prototype.__init4.call(this),a.prototype.__init5.call(this),a.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(e){this._reject(e)}}then(t,e){return new a(((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(i){r(i)}else n(e)},t=>{if(e)try{n(e(t))}catch(i){r(i)}else r(t)}]),this._executeHandlers()}))}catch(t){return this.then((t=>t),t)}finally(t){return new a(((e,n)=>{let r,i;return this.then((e=>{i=!1,r=e,t&&t()}),(e=>{i=!0,r=e,t&&t()})).then((()=>{i?n(r):e(r)}))}))}__init3(){this._resolve=t=>{this._setResult(r.RESOLVED,t)}}__init4(){this._reject=t=>{this._setResult(r.REJECTED,t)}}__init5(){this._setResult=(t,e)=>{this._state===r.PENDING&&((0,i.J8)(e)?e.then(this._resolve,this._reject):(this._state=t,this._value=e,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state!==r.PENDING){var t=this._handlers.slice();this._handlers=[],t.forEach((t=>{t[0]||(this._state===r.RESOLVED&&t[1](this._value),this._state===r.REJECTED&&t[2](this._value),t[0]=!0)}))}}}}},7790:function(t,e,n){n.d(e,{yW:function(){return u},ph:function(){return c}});var r=n(5907),i=n(7392);t=n.hmd(t);var o={nowSeconds:()=>Date.now()/1e3};var s=(0,i.KV)()?function(){try{return(0,i.l$)(t,"perf_hooks").performance}catch(e){return}}():function(){const{performance:t}=(0,r.R)();if(t&&t.now)return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),a=void 0===s?o:{nowSeconds:()=>(s.timeOrigin+s.now())/1e3},u=o.nowSeconds.bind(o),c=a.nowSeconds.bind(a);let d;(()=>{const{performance:t}=(0,r.R)();if(t&&t.now){var e=36e5,n=t.now(),i=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+n-i):e,s=o<e,a=t.timing&&t.timing.navigationStart,u="number"==typeof a?Math.abs(a+n-i):e;return s||u<e?o<=u?(d="timeOrigin",t.timeOrigin):(d="navigationStart",a):(d="dateNow",i)}d="none"})()},6989:function(t){t.exports=window.wp.apiFetch}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r](o,o.exports,n),o.loaded=!0,o.exports}n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,{a:e}),e},n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.hmd=function(t){return(t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:function(){throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};!function(){n.r(r);var t,e=n(2456),i=n(2483),o=n(6989),s=n.n(o);const a="true"===(null===(t=window.A8C_ETK_ErrorReporting_Config)||void 0===t?void 0:t.shouldActivateSentry),u=window._jsErr||[],c=window._headJsErrorHandler;a?(e.S1({dsn:"https://658ae291b00242148af6b76494d4a49a@o248881.ingest.sentry.io/5876245",release:"wpcom-test-01"}),u.forEach((t=>i.Tb(t))),e.yl().then((()=>delete window._jsErr))):function(){const t=t=>{let{error:e}=t;if(!e)return;const n={message:e.message,trace:e.stack,url:document.location.href,feature:"wp-admin"};return s()({global:!0,path:"/rest/v1.1/js-error",method:"POST",data:{error:JSON.stringify(n)}}).catch((()=>console.error("Error: Unable to record the error in Logstash.")))};window.addEventListener("error",t),Promise.allSettled(u.map(t)).then((()=>delete window._jsErr))}(),window.removeEventListener("error",c),delete window._headJsErrorHandler}(),window.EditingToolkit=r}();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  //# sourceMappingURL=error-reporting.min.js.map
error-reporting/dist/error-reporting.min.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"error-reporting.min.js","mappings":"2LAUIA,EAAgC,SAAUC,GAE1C,SAASD,IACL,OAAkB,OAAXC,GAAmBA,EAAOC,MAAMC,KAAMC,YAAcD,KAwC/D,OA1CA,QAAUH,EAAgBC,GAO1BD,EAAeK,UAAUC,mBAAqB,SAAUC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AQgtB,WAAYR,EAAWx8B,IAAK68B,IAAgBzsB,MAAM,WAAasa,OAAO+R,SAM9EQ,GAIDvS,OAAOwS,oBAAqB,QAASR,UAC9BhS,OAAOiS,oB","sources":["webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/backend.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/client.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/eventbuilder.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/flags.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/helpers.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/breadcrumbs.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/dedupe.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/globalhandlers.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/linkederrors.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/trycatch.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/integrations/useragent.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/sdk.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/stack-parsers.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/base.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/fetch.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/new-fetch.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/new-xhr.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/utils.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/esm/transports/xhr.js","webpack://EditingToolkit/../../node_modules/@sentry/browser/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/api.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/basebackend.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/baseclient.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/flags.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/integration.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/integrations/functiontostring.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/integrations/inboundfilters.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/request.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/sdk.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/transports/base.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/transports/noop.js","webpack://EditingToolkit/../../node_modules/@sentry/core/esm/version.js","webpack://EditingToolkit/../../node_modules/@sentry/core/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/../../node_modules/@sentry/hub/esm/flags.js","webpack://EditingToolkit/../../node_modules/@sentry/hub/esm/hub.js","webpack://EditingToolkit/../../node_modules/@sentry/hub/esm/scope.js","webpack://EditingToolkit/../../node_modules/@sentry/hub/esm/session.js","webpack://EditingToolkit/../../node_modules/@sentry/hub/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/../../node_modules/@sentry/minimal/esm/index.js","webpack://EditingToolkit/../../node_modules/@sentry/minimal/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/../../node_modules/@sentry/types/esm/severity.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/async.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/browser.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/clientreport.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/dsn.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/enums.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/env.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/envelope.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/error.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/flags.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/global.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/instrument.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/is.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/logger.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/memo.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/misc.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/node.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/normalize.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/object.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/polyfill.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/promisebuffer.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/ratelimit.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/severity.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/stacktrace.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/status.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/string.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/supports.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/syncpromise.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/esm/time.js","webpack://EditingToolkit/../../node_modules/@sentry/utils/node_modules/tslib/tslib.es6.js","webpack://EditingToolkit/external window [\"wp\",\"apiFetch\"]","webpack://EditingToolkit/webpack/bootstrap","webpack://EditingToolkit/webpack/runtime/compat get default export","webpack://EditingToolkit/webpack/runtime/define property getters","webpack://EditingToolkit/webpack/runtime/harmony module decorator","webpack://EditingToolkit/webpack/runtime/hasOwnProperty shorthand","webpack://EditingToolkit/webpack/runtime/make namespace object","webpack://EditingToolkit/./editing-toolkit-plugin/error-reporting/index.js"],"sourcesContent":["import { __assign, __extends } from \"tslib\";\nimport { BaseBackend, getEnvelopeEndpointWithUrlEncodedAuth, initAPIDetails } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { supportsFetch } from '@sentry/utils';\nimport { eventFromException, eventFromMessage } from './eventbuilder';\nimport { FetchTransport, makeNewFetchTransport, makeNewXHRTransport, XHRTransport } from './transports';\n/**\n * The Sentry Browser SDK Backend.\n * @hidden\n */\nvar BrowserBackend = /** @class */ (function (_super) {\n __extends(BrowserBackend, _super);\n function BrowserBackend() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype.eventFromException = function (exception, hint) {\n return eventFromException(exception, hint, this._options.attachStacktrace);\n };\n /**\n * @inheritDoc\n */\n BrowserBackend.prototype.eventFromMessage = function (message, level, hint) {\n if (level === void 0) { level = Severity.Info; }\n return eventFromMessage(message, level, hint, this._options.attachStacktrace);\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 = __assign(__assign({}, this._options.transportOptions), { dsn: this._options.dsn, tunnel: this._options.tunnel, sendClientReports: this._options.sendClientReports, _metadata: this._options._metadata });\n var api = initAPIDetails(transportOptions.dsn, transportOptions._metadata, transportOptions.tunnel);\n var url = getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel);\n if (this._options.transport) {\n return new this._options.transport(transportOptions);\n }\n if (supportsFetch()) {\n var requestOptions = __assign({}, transportOptions.fetchParameters);\n this._newTransport = makeNewFetchTransport({ requestOptions: requestOptions, url: url });\n return new FetchTransport(transportOptions);\n }\n this._newTransport = makeNewXHRTransport({\n url: url,\n headers: transportOptions.headers,\n });\n return new XHRTransport(transportOptions);\n };\n return BrowserBackend;\n}(BaseBackend));\nexport { BrowserBackend };\n//# sourceMappingURL=backend.js.map","import { __assign, __extends } from \"tslib\";\nimport { BaseClient, SDK_VERSION } from '@sentry/core';\nimport { getGlobalObject, logger } from '@sentry/utils';\nimport { BrowserBackend } from './backend';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { injectReportDialog } from './helpers';\nimport { Breadcrumbs } from './integrations';\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 __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 var _this = this;\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || {\n name: 'sentry.javascript.browser',\n packages: [\n {\n name: 'npm:@sentry/browser',\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n };\n _this = _super.call(this, BrowserBackend, options) || this;\n return _this;\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 IS_DEBUG_BUILD && logger.error('Trying to call showReportDialog with Sentry Client disabled');\n return;\n }\n injectReportDialog(__assign(__assign({}, options), { dsn: options.dsn || this.getDsn() }));\n };\n /**\n * @inheritDoc\n */\n BrowserClient.prototype._prepareEvent = function (event, scope, hint) {\n event.platform = event.platform || 'javascript';\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 return BrowserClient;\n}(BaseClient));\nexport { BrowserClient };\n//# sourceMappingURL=client.js.map","import { __assign } from \"tslib\";\nimport { Severity } from '@sentry/types';\nimport { addExceptionMechanism, addExceptionTypeValue, createStackParser, extractExceptionKeysForMessage, isDOMError, isDOMException, isError, isErrorEvent, isEvent, isPlainObject, normalizeToSize, resolvedSyncPromise, } from '@sentry/utils';\nimport { chromeStackParser, geckoStackParser, opera10StackParser, opera11StackParser, winjsStackParser, } from './stack-parsers';\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 exceptionFromError(ex) {\n // Get the frames first since Opera can lose the stack if we touch anything else first\n var frames = parseStackFrames(ex);\n var exception = {\n type: ex && ex.name,\n value: extractMessage(ex),\n };\n if (frames.length) {\n exception.stacktrace = { frames: frames };\n }\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, isUnhandledRejection) {\n var event = {\n exception: {\n values: [\n {\n type: isEvent(exception) ? exception.constructor.name : isUnhandledRejection ? 'UnhandledRejection' : 'Error',\n value: \"Non-Error \" + (isUnhandledRejection ? 'promise rejection' : 'exception') + \" captured with keys: \" + extractExceptionKeysForMessage(exception),\n },\n ],\n },\n extra: {\n __serialized__: normalizeToSize(exception),\n },\n };\n if (syntheticException) {\n var frames_1 = parseStackFrames(syntheticException);\n if (frames_1.length) {\n event.stacktrace = { frames: frames_1 };\n }\n }\n return event;\n}\n/**\n * @hidden\n */\nexport function eventFromError(ex) {\n return {\n exception: {\n values: [exceptionFromError(ex)],\n },\n };\n}\n/** Parses stack frames from an error */\nexport function parseStackFrames(ex) {\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 || ex.stack || '';\n var popSize = getPopSize(ex);\n try {\n return createStackParser(opera10StackParser, opera11StackParser, chromeStackParser, winjsStackParser, geckoStackParser)(stacktrace, popSize);\n }\n catch (e) {\n // no-empty\n }\n return [];\n}\n// Based on our own mapping pattern - https://github.com/getsentry/sentry/blob/9f08305e09866c8bd6d0c24f5b0aabdd7dd6c59c/src/sentry/lang/javascript/errormapping.py#L83-L108\nvar reactMinifiedRegexp = /Minified React error #\\d+;/i;\nfunction getPopSize(ex) {\n if (ex) {\n if (typeof ex.framesToPop === 'number') {\n return ex.framesToPop;\n }\n if (reactMinifiedRegexp.test(ex.message)) {\n return 1;\n }\n }\n return 0;\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/**\n * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.\n * @hidden\n */\nexport function eventFromException(exception, hint, attachStacktrace) {\n var syntheticException = (hint && hint.syntheticException) || undefined;\n var event = eventFromUnknownInput(exception, syntheticException, attachStacktrace);\n addExceptionMechanism(event); // defaults to { type: 'generic', handled: true }\n event.level = Severity.Error;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n/**\n * Builds and Event from a Message\n * @hidden\n */\nexport function eventFromMessage(message, level, hint, attachStacktrace) {\n if (level === void 0) { level = Severity.Info; }\n var syntheticException = (hint && hint.syntheticException) || undefined;\n var event = eventFromString(message, syntheticException, attachStacktrace);\n event.level = level;\n if (hint && hint.event_id) {\n event.event_id = hint.event_id;\n }\n return resolvedSyncPromise(event);\n}\n/**\n * @hidden\n */\nexport function eventFromUnknownInput(exception, syntheticException, attachStacktrace, isUnhandledRejection) {\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 return eventFromError(errorEvent.error);\n }\n // If it is a `DOMError` (which is a legacy API, but still supported in some browsers) then we just extract the name\n // and message, as it doesn't provide anything else. According to the spec, all `DOMExceptions` should also be\n // `Error`s, but that's not the case in IE11, so in that case we treat it the same as we do a `DOMError`.\n //\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMError\n // https://developer.mozilla.org/en-US/docs/Web/API/DOMException\n // https://webidl.spec.whatwg.org/#es-DOMException-specialness\n if (isDOMError(exception) || isDOMException(exception)) {\n var domException = exception;\n if ('stack' in exception) {\n event = eventFromError(exception);\n }\n else {\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, attachStacktrace);\n addExceptionTypeValue(event, message);\n }\n if ('code' in domException) {\n event.tags = __assign(__assign({}, event.tags), { 'DOMException.code': \"\" + domException.code });\n }\n return event;\n }\n if (isError(exception)) {\n // we have a real Error object, do nothing\n return eventFromError(exception);\n }\n if (isPlainObject(exception) || isEvent(exception)) {\n // If it's a plain object or an instance of `Event` (the built-in JS kind, not this SDK's `Event` type), serialize\n // it manually. This will allow us to group events based on top-level keys which is much better than creating a new\n // group on any key/value change.\n var objectException = exception;\n event = eventFromPlainObject(objectException, syntheticException, isUnhandledRejection);\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, attachStacktrace);\n addExceptionTypeValue(event, \"\" + exception, undefined);\n addExceptionMechanism(event, {\n synthetic: true,\n });\n return event;\n}\n/**\n * @hidden\n */\nexport function eventFromString(input, syntheticException, attachStacktrace) {\n var event = {\n message: input,\n };\n if (attachStacktrace && syntheticException) {\n var frames_2 = parseStackFrames(syntheticException);\n if (frames_2.length) {\n event.stacktrace = { frames: frames_2 };\n }\n }\n return event;\n}\n//# sourceMappingURL=eventbuilder.js.map","/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n/** Flag that is true for debug builds, false otherwise. */\nexport var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n//# sourceMappingURL=flags.js.map","import { __assign } from \"tslib\";\nimport { captureException, getReportDialogEndpoint, withScope } from '@sentry/core';\nimport { addExceptionMechanism, addExceptionTypeValue, addNonEnumerableProperty, getGlobalObject, getOriginalFunction, logger, markFunctionWrapped, } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\nvar global = getGlobalObject();\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 // for future readers what this does is wrap a function and then create\n // a bi-directional wrapping between them.\n //\n // example: wrapped = wrap(original);\n // original.__sentry_wrapped__ -> wrapped\n // wrapped.__sentry_original__ -> original\n if (options === void 0) { options = {}; }\n if (typeof fn !== 'function') {\n return fn;\n }\n try {\n // if we're dealing with a function that was previously wrapped, return\n // the original wrapper.\n var wrapper = fn.__sentry_wrapped__;\n if (wrapper) {\n return wrapper;\n }\n // We don't wanna wrap it twice\n if (getOriginalFunction(fn)) {\n return fn;\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 /* eslint-disable prefer-rest-params */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var sentryWrapped = function () {\n var args = Array.prototype.slice.call(arguments);\n try {\n if (before && typeof before === 'function') {\n before.apply(this, arguments);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n var wrappedArguments = args.map(function (arg) { return wrap(arg, options); });\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 }\n catch (ex) {\n ignoreNextOnError();\n withScope(function (scope) {\n scope.addEventProcessor(function (event) {\n if (options.mechanism) {\n addExceptionTypeValue(event, undefined, undefined);\n addExceptionMechanism(event, options.mechanism);\n }\n event.extra = __assign(__assign({}, event.extra), { arguments: args });\n return event;\n });\n captureException(ex);\n });\n throw ex;\n }\n };\n /* eslint-enable prefer-rest-params */\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) { } // eslint-disable-line no-empty\n // Signal that this function has been wrapped/filled already\n // for both debugging and to prevent it to being wrapped/filled twice\n markFunctionWrapped(sentryWrapped, fn);\n addNonEnumerableProperty(fn, '__sentry_wrapped__', sentryWrapped);\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 // eslint-disable-next-line no-empty\n }\n catch (_oO) { }\n return sentryWrapped;\n}\n/**\n * Injects the Report Dialog script\n * @hidden\n */\nexport function injectReportDialog(options) {\n if (options === void 0) { options = {}; }\n if (!global.document) {\n return;\n }\n if (!options.eventId) {\n IS_DEBUG_BUILD && logger.error('Missing eventId option in showReportDialog call');\n return;\n }\n if (!options.dsn) {\n IS_DEBUG_BUILD && logger.error('Missing dsn option in showReportDialog call');\n return;\n }\n var script = global.document.createElement('script');\n script.async = true;\n script.src = getReportDialogEndpoint(options.dsn, options);\n if (options.onLoad) {\n // eslint-disable-next-line @typescript-eslint/unbound-method\n script.onload = options.onLoad;\n }\n var injectionPoint = global.document.head || global.document.body;\n if (injectionPoint) {\n injectionPoint.appendChild(script);\n }\n}\n//# sourceMappingURL=helpers.js.map","import { __assign } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\n/* eslint-disable max-lines */\nimport { getCurrentHub } from '@sentry/core';\nimport { Severity } from '@sentry/types';\nimport { addInstrumentationHandler, getEventDescription, getGlobalObject, htmlTreeAsString, parseUrl, safeJoin, severityFromString, } 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 = __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 * 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 if (this._options.console) {\n addInstrumentationHandler('console', _consoleBreadcrumb);\n }\n if (this._options.dom) {\n addInstrumentationHandler('dom', _domBreadcrumb(this._options.dom));\n }\n if (this._options.xhr) {\n addInstrumentationHandler('xhr', _xhrBreadcrumb);\n }\n if (this._options.fetch) {\n addInstrumentationHandler('fetch', _fetchBreadcrumb);\n }\n if (this._options.history) {\n addInstrumentationHandler('history', _historyBreadcrumb);\n }\n };\n /**\n * @inheritDoc\n */\n Breadcrumbs.id = 'Breadcrumbs';\n return Breadcrumbs;\n}());\nexport { Breadcrumbs };\n/**\n * A HOC that creaes a function that creates breadcrumbs from DOM API calls.\n * This is a HOC so that we get access to dom options in the closure.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _domBreadcrumb(dom) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function _innerDomBreadcrumb(handlerData) {\n var target;\n var keyAttrs = typeof dom === 'object' ? dom.serializeAttribute : undefined;\n if (typeof keyAttrs === 'string') {\n keyAttrs = [keyAttrs];\n }\n // Accessing event.target can throw (see getsentry/raven-js#838, #768)\n try {\n target = handlerData.event.target\n ? htmlTreeAsString(handlerData.event.target, keyAttrs)\n : htmlTreeAsString(handlerData.event, keyAttrs);\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 global: handlerData.global,\n });\n }\n return _innerDomBreadcrumb;\n}\n/**\n * Creates breadcrumbs from console API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _consoleBreadcrumb(handlerData) {\n var breadcrumb = {\n category: 'console',\n data: {\n arguments: handlerData.args,\n logger: 'console',\n },\n level: severityFromString(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 XHR API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _xhrBreadcrumb(handlerData) {\n if (handlerData.endTimestamp) {\n // We only capture complete, non-sentry requests\n if (handlerData.xhr.__sentry_own_request__) {\n return;\n }\n var _a = handlerData.xhr.__sentry_xhr__ || {}, method = _a.method, url = _a.url, status_code = _a.status_code, body = _a.body;\n getCurrentHub().addBreadcrumb({\n category: 'xhr',\n data: {\n method: method,\n url: url,\n status_code: status_code,\n },\n type: 'http',\n }, {\n xhr: handlerData.xhr,\n input: body,\n });\n return;\n }\n}\n/**\n * Creates breadcrumbs from fetch API calls\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _fetchBreadcrumb(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: __assign(__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// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _historyBreadcrumb(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 to = parsedTo.relative;\n }\n if (parsedLoc.protocol === parsedFrom.protocol && parsedLoc.host === parsedFrom.host) {\n from = parsedFrom.relative;\n }\n getCurrentHub().addBreadcrumb({\n category: 'navigation',\n data: {\n from: from,\n to: to,\n },\n });\n}\n//# sourceMappingURL=breadcrumbs.js.map","import { logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\n/** Deduplication filter */\nvar Dedupe = /** @class */ (function () {\n function Dedupe() {\n /**\n * @inheritDoc\n */\n this.name = Dedupe.id;\n }\n /**\n * @inheritDoc\n */\n Dedupe.prototype.setupOnce = function (addGlobalEventProcessor, getCurrentHub) {\n addGlobalEventProcessor(function (currentEvent) {\n var self = getCurrentHub().getIntegration(Dedupe);\n if (self) {\n // Juuust in case something goes wrong\n try {\n if (_shouldDropEvent(currentEvent, self._previousEvent)) {\n IS_DEBUG_BUILD && logger.warn('Event dropped due to being a duplicate of previously captured event.');\n return null;\n }\n }\n catch (_oO) {\n return (self._previousEvent = currentEvent);\n }\n return (self._previousEvent = currentEvent);\n }\n return currentEvent;\n });\n };\n /**\n * @inheritDoc\n */\n Dedupe.id = 'Dedupe';\n return Dedupe;\n}());\nexport { Dedupe };\n/** JSDoc */\nfunction _shouldDropEvent(currentEvent, previousEvent) {\n if (!previousEvent) {\n return false;\n }\n if (_isSameMessageEvent(currentEvent, previousEvent)) {\n return true;\n }\n if (_isSameExceptionEvent(currentEvent, previousEvent)) {\n return true;\n }\n return false;\n}\n/** JSDoc */\nfunction _isSameMessageEvent(currentEvent, previousEvent) {\n var currentMessage = currentEvent.message;\n var previousMessage = previousEvent.message;\n // If neither event has a message property, they were both exceptions, so bail out\n if (!currentMessage && !previousMessage) {\n return false;\n }\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentMessage && !previousMessage) || (!currentMessage && previousMessage)) {\n return false;\n }\n if (currentMessage !== previousMessage) {\n return false;\n }\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n}\n/** JSDoc */\nfunction _isSameExceptionEvent(currentEvent, previousEvent) {\n var previousException = _getExceptionFromEvent(previousEvent);\n var currentException = _getExceptionFromEvent(currentEvent);\n if (!previousException || !currentException) {\n return false;\n }\n if (previousException.type !== currentException.type || previousException.value !== currentException.value) {\n return false;\n }\n if (!_isSameFingerprint(currentEvent, previousEvent)) {\n return false;\n }\n if (!_isSameStacktrace(currentEvent, previousEvent)) {\n return false;\n }\n return true;\n}\n/** JSDoc */\nfunction _isSameStacktrace(currentEvent, previousEvent) {\n var currentFrames = _getFramesFromEvent(currentEvent);\n var previousFrames = _getFramesFromEvent(previousEvent);\n // If neither event has a stacktrace, they are assumed to be the same\n if (!currentFrames && !previousFrames) {\n return true;\n }\n // If only one event has a stacktrace, but not the other one, they are not the same\n if ((currentFrames && !previousFrames) || (!currentFrames && previousFrames)) {\n return false;\n }\n currentFrames = currentFrames;\n previousFrames = previousFrames;\n // If number of frames differ, they are not the same\n if (previousFrames.length !== currentFrames.length) {\n return false;\n }\n // Otherwise, compare the two\n for (var i = 0; i < previousFrames.length; i++) {\n var frameA = previousFrames[i];\n var frameB = currentFrames[i];\n if (frameA.filename !== frameB.filename ||\n frameA.lineno !== frameB.lineno ||\n frameA.colno !== frameB.colno ||\n frameA.function !== frameB.function) {\n return false;\n }\n }\n return true;\n}\n/** JSDoc */\nfunction _isSameFingerprint(currentEvent, previousEvent) {\n var currentFingerprint = currentEvent.fingerprint;\n var previousFingerprint = previousEvent.fingerprint;\n // If neither event has a fingerprint, they are assumed to be the same\n if (!currentFingerprint && !previousFingerprint) {\n return true;\n }\n // If only one event has a fingerprint, but not the other one, they are not the same\n if ((currentFingerprint && !previousFingerprint) || (!currentFingerprint && previousFingerprint)) {\n return false;\n }\n currentFingerprint = currentFingerprint;\n previousFingerprint = previousFingerprint;\n // Otherwise, compare the two\n try {\n return !!(currentFingerprint.join('') === previousFingerprint.join(''));\n }\n catch (_oO) {\n return false;\n }\n}\n/** JSDoc */\nfunction _getExceptionFromEvent(event) {\n return event.exception && event.exception.values && event.exception.values[0];\n}\n/** JSDoc */\nfunction _getFramesFromEvent(event) {\n var exception = event.exception;\n if (exception) {\n try {\n // @ts-ignore Object could be undefined\n return exception.values[0].stacktrace.frames;\n }\n catch (_oO) {\n return undefined;\n }\n }\n else if (event.stacktrace) {\n return event.stacktrace.frames;\n }\n return undefined;\n}\n//# sourceMappingURL=dedupe.js.map","import { __assign, __read } from \"tslib\";\n/* eslint-disable @typescript-eslint/no-unsafe-member-access */\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 { IS_DEBUG_BUILD } from '../flags';\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 /**\n * Stores references functions to installing handlers. Will set to undefined\n * after they have been run so that they are not used twice.\n */\n this._installFunc = {\n onerror: _installGlobalOnErrorHandler,\n onunhandledrejection: _installGlobalOnUnhandledRejectionHandler,\n };\n this._options = __assign({ onerror: true, onunhandledrejection: true }, options);\n }\n /**\n * @inheritDoc\n */\n GlobalHandlers.prototype.setupOnce = function () {\n Error.stackTraceLimit = 50;\n var options = this._options;\n // We can disable guard-for-in as we construct the options object above + do checks against\n // `this._installFunc` for the property.\n // eslint-disable-next-line guard-for-in\n for (var key in options) {\n var installFunc = this._installFunc[key];\n if (installFunc && options[key]) {\n globalHandlerLog(key);\n installFunc();\n this._installFunc[key] = undefined;\n }\n }\n };\n /**\n * @inheritDoc\n */\n GlobalHandlers.id = 'GlobalHandlers';\n return GlobalHandlers;\n}());\nexport { GlobalHandlers };\n/** JSDoc */\nfunction _installGlobalOnErrorHandler() {\n addInstrumentationHandler('error', \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function (data) {\n var _a = __read(getHubAndAttachStacktrace(), 2), hub = _a[0], attachStacktrace = _a[1];\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\n var msg = data.msg, url = data.url, line = data.line, column = data.column, error = data.error;\n if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return;\n }\n var event = error === undefined && isString(msg)\n ? _eventFromIncompleteOnError(msg, url, line, column)\n : _enhanceEventWithInitialFrame(eventFromUnknownInput(error || msg, undefined, attachStacktrace, false), url, line, column);\n event.level = Severity.Error;\n addMechanismAndCapture(hub, error, event, 'onerror');\n });\n}\n/** JSDoc */\nfunction _installGlobalOnUnhandledRejectionHandler() {\n addInstrumentationHandler('unhandledrejection', \n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n function (e) {\n var _a = __read(getHubAndAttachStacktrace(), 2), hub = _a[0], attachStacktrace = _a[1];\n if (!hub.getIntegration(GlobalHandlers)) {\n return;\n }\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 if (shouldIgnoreOnError() || (error && error.__sentry_own_request__)) {\n return true;\n }\n var event = isPrimitive(error)\n ? _eventFromRejectionWithPrimitive(error)\n : eventFromUnknownInput(error, undefined, attachStacktrace, true);\n event.level = Severity.Error;\n addMechanismAndCapture(hub, error, event, 'onunhandledrejection');\n return;\n });\n}\n/**\n * Create an event from a promise rejection where the `reason` is a primitive.\n *\n * @param reason: The `reason` property of the promise rejection\n * @returns An Event object with an appropriate `exception` value\n */\nfunction _eventFromRejectionWithPrimitive(reason) {\n return {\n exception: {\n values: [\n {\n type: 'UnhandledRejection',\n // String() is needed because the Primitive type includes symbols (which can't be automatically stringified)\n value: \"Non-Error promise rejection captured with value: \" + String(reason),\n },\n ],\n },\n };\n}\n/**\n * This function creates a stack from an old, error-less onerror handler.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _eventFromIncompleteOnError(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 = 'Error';\n var groups = message.match(ERROR_TYPES_RE);\n if (groups) {\n name = groups[1];\n message = groups[2];\n }\n var event = {\n exception: {\n values: [\n {\n type: name,\n value: message,\n },\n ],\n },\n };\n return _enhanceEventWithInitialFrame(event, url, line, column);\n}\n/** JSDoc */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _enhanceEventWithInitialFrame(event, url, line, column) {\n // event.exception\n var e = (event.exception = event.exception || {});\n // event.exception.values\n var ev = (e.values = e.values || []);\n // event.exception.values[0]\n var ev0 = (ev[0] = ev[0] || {});\n // event.exception.values[0].stacktrace\n var ev0s = (ev0.stacktrace = ev0.stacktrace || {});\n // event.exception.values[0].stacktrace.frames\n var ev0sf = (ev0s.frames = ev0s.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 // event.exception.values[0].stacktrace.frames\n if (ev0sf.length === 0) {\n ev0sf.push({\n colno: colno,\n filename: filename,\n function: '?',\n in_app: true,\n lineno: lineno,\n });\n }\n return event;\n}\nfunction globalHandlerLog(type) {\n IS_DEBUG_BUILD && logger.log(\"Global Handler attached: \" + type);\n}\nfunction addMechanismAndCapture(hub, error, event, type) {\n addExceptionMechanism(event, {\n handled: false,\n type: type,\n });\n hub.captureEvent(event, {\n originalException: error,\n });\n}\nfunction getHubAndAttachStacktrace() {\n var hub = getCurrentHub();\n var client = hub.getClient();\n var attachStacktrace = client && client.getOptions().attachStacktrace;\n return [hub, attachStacktrace];\n}\n//# sourceMappingURL=globalhandlers.js.map","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport { isInstanceOf } from '@sentry/utils';\nimport { exceptionFromError } from '../eventbuilder';\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 return self ? _handler(self._key, self._limit, event, hint) : event;\n });\n };\n /**\n * @inheritDoc\n */\n LinkedErrors.id = 'LinkedErrors';\n return LinkedErrors;\n}());\nexport { LinkedErrors };\n/**\n * @inheritDoc\n */\nexport function _handler(key, limit, event, hint) {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return event;\n }\n var linkedErrors = _walkErrorTree(limit, hint.originalException, key);\n event.exception.values = __spread(linkedErrors, event.exception.values);\n return event;\n}\n/**\n * JSDOC\n */\nexport function _walkErrorTree(limit, error, key, stack) {\n if (stack === void 0) { stack = []; }\n if (!isInstanceOf(error[key], Error) || stack.length + 1 >= limit) {\n return stack;\n }\n var exception = exceptionFromError(error[key]);\n return _walkErrorTree(limit, error[key], key, __spread([exception], stack));\n}\n//# sourceMappingURL=linkederrors.js.map","import { __assign } from \"tslib\";\nimport { fill, getFunctionName, getGlobalObject, getOriginalFunction } 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 = __assign({ XMLHttpRequest: true, eventTarget: true, requestAnimationFrame: true, setInterval: true, setTimeout: true }, options);\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', _wrapTimeFunction);\n }\n if (this._options.setInterval) {\n fill(global, 'setInterval', _wrapTimeFunction);\n }\n if (this._options.requestAnimationFrame) {\n fill(global, 'requestAnimationFrame', _wrapRAF);\n }\n if (this._options.XMLHttpRequest && 'XMLHttpRequest' in global) {\n fill(XMLHttpRequest.prototype, 'send', _wrapXHR);\n }\n var eventTargetOption = this._options.eventTarget;\n if (eventTargetOption) {\n var eventTarget = Array.isArray(eventTargetOption) ? eventTargetOption : DEFAULT_EVENT_TARGET;\n eventTarget.forEach(_wrapEventTarget);\n }\n };\n /**\n * @inheritDoc\n */\n TryCatch.id = 'TryCatch';\n return TryCatch;\n}());\nexport { TryCatch };\n/** JSDoc */\nfunction _wrapTimeFunction(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\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// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction _wrapRAF(original) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function (callback) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return original.apply(this, [\n 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}\n/** JSDoc */\nfunction _wrapXHR(originalSend) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var xhr = this;\n var xmlHttpRequestProps = ['onload', 'onerror', 'onprogress', 'onreadystatechange'];\n xmlHttpRequestProps.forEach(function (prop) {\n if (prop in xhr && typeof xhr[prop] === 'function') {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 var originalFunction = getOriginalFunction(original);\n if (originalFunction) {\n wrapOptions.mechanism.data.handler = getFunctionName(originalFunction);\n }\n // Otherwise wrap directly\n return wrap(original, wrapOptions);\n });\n }\n });\n return originalSend.apply(this, args);\n };\n}\n/** JSDoc */\nfunction _wrapEventTarget(target) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var global = getGlobalObject();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n var proto = global[target] && global[target].prototype;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, no-prototype-builtins\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 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.apply(this, [\n eventName,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n 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 }),\n options,\n ]);\n };\n });\n fill(proto, 'removeEventListener', function (originalRemoveEventListener) {\n return function (eventName, fn, options) {\n /**\n * There are 2 possible scenarios here:\n *\n * 1. Someone passes a callback, which was attached prior to Sentry initialization, or by using unmodified\n * method, eg. `document.addEventListener.call(el, name, handler). In this case, we treat this function\n * as a pass-through, and call original `removeEventListener` with it.\n *\n * 2. Someone passes a callback, which was attached after Sentry was initialized, which means that it was using\n * our wrapped version of `addEventListener`, which internally calls `wrap` helper.\n * This helper \"wraps\" whole callback inside a try/catch statement, and attached appropriate metadata to it,\n * in order for us to make a distinction between wrapped/non-wrapped functions possible.\n * If a function was wrapped, it has additional property of `__sentry_wrapped__`, holding the handler.\n *\n * When someone adds a handler prior to initialization, and then do it again, but after,\n * then we have to detach both of them. Otherwise, if we'd detach only wrapped one, it'd be impossible\n * to get rid of the initial handler and it'd stick there forever.\n */\n var wrappedEventHandler = fn;\n try {\n var originalEventHandler = wrappedEventHandler && wrappedEventHandler.__sentry_wrapped__;\n if (originalEventHandler) {\n originalRemoveEventListener.call(this, eventName, originalEventHandler, options);\n }\n }\n catch (e) {\n // ignore, accessing __sentry_wrapped__ will throw in some Selenium environments\n }\n return originalRemoveEventListener.call(this, eventName, wrappedEventHandler, options);\n };\n });\n}\n//# sourceMappingURL=trycatch.js.map","import { __assign } 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 none of the information we want exists, don't bother\n if (!global.navigator && !global.location && !global.document) {\n return event;\n }\n // grab as much info as exists and add it to the event\n var url = (event.request && event.request.url) || (global.location && global.location.href);\n var referrer = (global.document || {}).referrer;\n var userAgent = (global.navigator || {}).userAgent;\n var headers = __assign(__assign(__assign({}, (event.request && event.request.headers)), (referrer && { Referer: referrer })), (userAgent && { 'User-Agent': userAgent }));\n var request = __assign(__assign({}, (url && { url: url })), { headers: headers });\n return __assign(__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 { __assign } from \"tslib\";\nimport { getCurrentHub, initAndBind, Integrations as CoreIntegrations } from '@sentry/core';\nimport { addInstrumentationHandler, getGlobalObject, logger, resolvedSyncPromise } from '@sentry/utils';\nimport { BrowserClient } from './client';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { wrap as internalWrap } from './helpers';\nimport { Breadcrumbs, Dedupe, 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 Dedupe(),\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 if (options.autoSessionTracking === undefined) {\n options.autoSessionTracking = true;\n }\n if (options.sendClientReports === undefined) {\n options.sendClientReports = true;\n }\n initAndBind(BrowserClient, options);\n if (options.autoSessionTracking) {\n startSessionTracking();\n }\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 var hub = getCurrentHub();\n var scope = hub.getScope();\n if (scope) {\n options.user = __assign(__assign({}, scope.getUser()), options.user);\n }\n if (!options.eventId) {\n options.eventId = hub.lastEventId();\n }\n var client = hub.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 * Call `flush()` on the current client, if there is one. See {@link Client.flush}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause\n * the client to wait until all events are sent before resolving the promise.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function flush(timeout) {\n var client = getCurrentHub().getClient();\n if (client) {\n return client.flush(timeout);\n }\n IS_DEBUG_BUILD && logger.warn('Cannot flush events. No client defined.');\n return resolvedSyncPromise(false);\n}\n/**\n * Call `close()` on the current client, if there is one. See {@link Client.close}.\n *\n * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this\n * parameter will cause the client to wait until all events are sent before disabling itself.\n * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it\n * doesn't (or if there's no client defined).\n */\nexport function close(timeout) {\n var client = getCurrentHub().getClient();\n if (client) {\n return client.close(timeout);\n }\n IS_DEBUG_BUILD && logger.warn('Cannot flush events and disable SDK. No client defined.');\n return resolvedSyncPromise(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 */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport function wrap(fn) {\n return internalWrap(fn)();\n}\nfunction startSessionOnHub(hub) {\n hub.startSession({ ignoreDuration: true });\n hub.captureSession();\n}\n/**\n * Enable automatic Session Tracking for the initial page load.\n */\nfunction startSessionTracking() {\n var window = getGlobalObject();\n var document = window.document;\n if (typeof document === 'undefined') {\n IS_DEBUG_BUILD && logger.warn('Session tracking in non-browser environment with @sentry/browser is not supported.');\n return;\n }\n var hub = getCurrentHub();\n // The only way for this to be false is for there to be a version mismatch between @sentry/browser (>= 6.0.0) and\n // @sentry/hub (< 5.27.0). In the simple case, there won't ever be such a mismatch, because the two packages are\n // pinned at the same version in package.json, but there are edge cases where it's possible. See\n // https://github.com/getsentry/sentry-javascript/issues/3207 and\n // https://github.com/getsentry/sentry-javascript/issues/3234 and\n // https://github.com/getsentry/sentry-javascript/issues/3278.\n if (!hub.captureSession) {\n return;\n }\n // The session duration for browser sessions does not track a meaningful\n // concept that can be used as a metric.\n // Automatically captured sessions are akin to page views, and thus we\n // discard their duration.\n startSessionOnHub(hub);\n // We want to create a session for every navigation as well\n addInstrumentationHandler('history', function (_a) {\n var from = _a.from, to = _a.to;\n // Don't create an additional session for the initial route or if the location did not change\n if (!(from === undefined || from === to)) {\n startSessionOnHub(getCurrentHub());\n }\n });\n}\n//# sourceMappingURL=sdk.js.map","import { __read } from \"tslib\";\n// global reference to slice\nvar UNKNOWN_FUNCTION = '?';\nvar OPERA10_PRIORITY = 10;\nvar OPERA11_PRIORITY = 20;\nvar CHROME_PRIORITY = 30;\nvar WINJS_PRIORITY = 40;\nvar GECKO_PRIORITY = 50;\nfunction createFrame(filename, func, lineno, colno) {\n var frame = {\n filename: filename,\n function: func,\n // All browser frames are considered in_app\n in_app: true,\n };\n if (lineno !== undefined) {\n frame.lineno = lineno;\n }\n if (colno !== undefined) {\n frame.colno = colno;\n }\n return frame;\n}\n// Chromium based browsers: Chrome, Brave, new Opera, new Edge\nvar chromeRegex = /^\\s*at (?:(.*?) ?\\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack|<anonymous>|[-a-z]+:|.*bundle|\\/).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nvar chromeEvalRegex = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\nvar chrome = function (line) {\n var parts = chromeRegex.exec(line);\n if (parts) {\n var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n if (isEval) {\n var subMatch = chromeEvalRegex.exec(parts[2]);\n if (subMatch) {\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 }\n // Kamil: One more hack won't hurt us right? Understanding and adding more rules on top of these regexps right now\n // would be way too time consuming. (TODO: Rewrite whole RegExp to be more readable)\n var _a = __read(extractSafariExtensionDetails(parts[1] || UNKNOWN_FUNCTION, parts[2]), 2), func = _a[0], filename = _a[1];\n return createFrame(filename, func, parts[3] ? +parts[3] : undefined, parts[4] ? +parts[4] : undefined);\n }\n return;\n};\nexport var chromeStackParser = [CHROME_PRIORITY, chrome];\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 geckoREgex = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|capacitor).*?:\\/.*?|\\[native code\\]|[^@]*(?:bundle|\\d+\\.js)|\\/[\\w\\-. /=]+)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar geckoEvalRegex = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\nvar gecko = function (line) {\n var _a;\n var parts = geckoREgex.exec(line);\n if (parts) {\n var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n if (isEval) {\n var subMatch = geckoEvalRegex.exec(parts[3]);\n if (subMatch) {\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 }\n var filename = parts[3];\n var func = parts[1] || UNKNOWN_FUNCTION;\n _a = __read(extractSafariExtensionDetails(func, filename), 2), func = _a[0], filename = _a[1];\n return createFrame(filename, func, parts[4] ? +parts[4] : undefined, parts[5] ? +parts[5] : undefined);\n }\n return;\n};\nexport var geckoStackParser = [GECKO_PRIORITY, gecko];\nvar winjsRegex = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\nvar winjs = function (line) {\n var parts = winjsRegex.exec(line);\n return parts\n ? createFrame(parts[2], parts[1] || UNKNOWN_FUNCTION, +parts[3], parts[4] ? +parts[4] : undefined)\n : undefined;\n};\nexport var winjsStackParser = [WINJS_PRIORITY, winjs];\nvar opera10Regex = / line (\\d+).*script (?:in )?(\\S+)(?:: in function (\\S+))?$/i;\nvar opera10 = function (line) {\n var parts = opera10Regex.exec(line);\n return parts ? createFrame(parts[2], parts[3] || UNKNOWN_FUNCTION, +parts[1]) : undefined;\n};\nexport var opera10StackParser = [OPERA10_PRIORITY, opera10];\nvar opera11Regex = / line (\\d+), column (\\d+)\\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\\(.*\\))? in (.*):\\s*$/i;\nvar opera11 = function (line) {\n var parts = opera11Regex.exec(line);\n return parts ? createFrame(parts[5], parts[3] || parts[4] || UNKNOWN_FUNCTION, +parts[1], +parts[2]) : undefined;\n};\nexport var opera11StackParser = [OPERA11_PRIORITY, opera11];\n/**\n * Safari web extensions, starting version unknown, can produce \"frames-only\" stacktraces.\n * What it means, is that instead of format like:\n *\n * Error: wat\n * at function@url:row:col\n * at function@url:row:col\n * at function@url:row:col\n *\n * it produces something like:\n *\n * function@url:row:col\n * function@url:row:col\n * function@url:row:col\n *\n * Because of that, it won't be captured by `chrome` RegExp and will fall into `Gecko` branch.\n * This function is extracted so that we can use it in both places without duplicating the logic.\n * Unfortunately \"just\" changing RegExp is too complicated now and making it pass all tests\n * and fix this case seems like an impossible, or at least way too time-consuming task.\n */\nvar extractSafariExtensionDetails = function (func, filename) {\n var isSafariExtension = func.indexOf('safari-extension') !== -1;\n var isSafariWebExtension = func.indexOf('safari-web-extension') !== -1;\n return isSafariExtension || isSafariWebExtension\n ? [\n func.indexOf('@') !== -1 ? func.split('@')[0] : UNKNOWN_FUNCTION,\n isSafariExtension ? \"safari-extension:\" + filename : \"safari-web-extension:\" + filename,\n ]\n : [func, filename];\n};\n//# sourceMappingURL=stack-parsers.js.map","import { __read } from \"tslib\";\nimport { eventToSentryRequest, getEnvelopeEndpointWithUrlEncodedAuth, getStoreEndpointWithUrlEncodedAuth, initAPIDetails, sessionToSentryRequest, } from '@sentry/core';\nimport { createClientReportEnvelope, disabledUntil, dsnToString, eventStatusFromHttpCode, getGlobalObject, isRateLimited, logger, makePromiseBuffer, serializeEnvelope, updateRateLimits, } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\nimport { sendReport } from './utils';\nfunction requestTypeToCategory(ty) {\n var tyStr = ty;\n return tyStr === 'event' ? 'error' : tyStr;\n}\nvar global = getGlobalObject();\n/** Base Transport class implementation */\nvar BaseTransport = /** @class */ (function () {\n function BaseTransport(options) {\n var _this = this;\n this.options = options;\n /** A simple buffer holding all requests. */\n this._buffer = makePromiseBuffer(30);\n /** Locks transport after receiving rate limits in a response */\n this._rateLimits = {};\n this._outcomes = {};\n this._api = initAPIDetails(options.dsn, options._metadata, options.tunnel);\n // eslint-disable-next-line deprecation/deprecation\n this.url = getStoreEndpointWithUrlEncodedAuth(this._api.dsn);\n if (this.options.sendClientReports && global.document) {\n global.document.addEventListener('visibilitychange', function () {\n if (global.document.visibilityState === 'hidden') {\n _this._flushOutcomes();\n }\n });\n }\n }\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.sendEvent = function (event) {\n return this._sendRequest(eventToSentryRequest(event, this._api), event);\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.sendSession = function (session) {\n return this._sendRequest(sessionToSentryRequest(session, this._api), session);\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.close = function (timeout) {\n return this._buffer.drain(timeout);\n };\n /**\n * @inheritDoc\n */\n BaseTransport.prototype.recordLostEvent = function (reason, category) {\n var _a;\n if (!this.options.sendClientReports) {\n return;\n }\n // We want to track each category (event, transaction, session) separately\n // but still keep the distinction between different type of outcomes.\n // We could use nested maps, but it's much easier to read and type this way.\n // A correct type for map-based implementation if we want to go that route\n // would be `Partial<Record<SentryRequestType, Partial<Record<Outcome, number>>>>`\n var key = requestTypeToCategory(category) + \":\" + reason;\n IS_DEBUG_BUILD && logger.log(\"Adding outcome: \" + key);\n this._outcomes[key] = (_a = this._outcomes[key], (_a !== null && _a !== void 0 ? _a : 0)) + 1;\n };\n /**\n * Send outcomes as an envelope\n */\n BaseTransport.prototype._flushOutcomes = function () {\n if (!this.options.sendClientReports) {\n return;\n }\n var outcomes = this._outcomes;\n this._outcomes = {};\n // Nothing to send\n if (!Object.keys(outcomes).length) {\n IS_DEBUG_BUILD && logger.log('No outcomes to flush');\n return;\n }\n IS_DEBUG_BUILD && logger.log(\"Flushing outcomes:\\n\" + JSON.stringify(outcomes, null, 2));\n var url = getEnvelopeEndpointWithUrlEncodedAuth(this._api.dsn, this._api.tunnel);\n var discardedEvents = Object.keys(outcomes).map(function (key) {\n var _a = __read(key.split(':'), 2), category = _a[0], reason = _a[1];\n return {\n reason: reason,\n category: category,\n quantity: outcomes[key],\n };\n // TODO: Improve types on discarded_events to get rid of cast\n });\n var envelope = createClientReportEnvelope(discardedEvents, this._api.tunnel && dsnToString(this._api.dsn));\n try {\n sendReport(url, serializeEnvelope(envelope));\n }\n catch (e) {\n IS_DEBUG_BUILD && logger.error(e);\n }\n };\n /**\n * Handle Sentry repsonse for promise-based transports.\n */\n BaseTransport.prototype._handleResponse = function (_a) {\n var requestType = _a.requestType, response = _a.response, headers = _a.headers, resolve = _a.resolve, reject = _a.reject;\n var status = eventStatusFromHttpCode(response.status);\n this._rateLimits = updateRateLimits(this._rateLimits, headers);\n // eslint-disable-next-line deprecation/deprecation\n if (this._isRateLimited(requestType)) {\n IS_DEBUG_BUILD &&\n // eslint-disable-next-line deprecation/deprecation\n logger.warn(\"Too many \" + requestType + \" requests, backing off until: \" + this._disabledUntil(requestType));\n }\n if (status === 'success') {\n resolve({ status: status });\n return;\n }\n reject(response);\n };\n /**\n * Gets the time that given category is disabled until for rate limiting\n *\n * @deprecated Please use `disabledUntil` from @sentry/utils\n */\n BaseTransport.prototype._disabledUntil = function (requestType) {\n var category = requestTypeToCategory(requestType);\n return new Date(disabledUntil(this._rateLimits, category));\n };\n /**\n * Checks if a category is rate limited\n *\n * @deprecated Please use `isRateLimited` from @sentry/utils\n */\n BaseTransport.prototype._isRateLimited = function (requestType) {\n var category = requestTypeToCategory(requestType);\n return isRateLimited(this._rateLimits, category);\n };\n return BaseTransport;\n}());\nexport { BaseTransport };\n//# sourceMappingURL=base.js.map","import { __extends } from \"tslib\";\nimport { SentryError, supportsReferrerPolicy, SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\nimport { getNativeFetchImplementation } from './utils';\n/** `fetch` based transport */\nvar FetchTransport = /** @class */ (function (_super) {\n __extends(FetchTransport, _super);\n function FetchTransport(options, fetchImpl) {\n if (fetchImpl === void 0) { fetchImpl = getNativeFetchImplementation(); }\n var _this = _super.call(this, options) || this;\n _this._fetch = fetchImpl;\n return _this;\n }\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n FetchTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {\n var _this = this;\n // eslint-disable-next-line deprecation/deprecation\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent('ratelimit_backoff', sentryRequest.type);\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n // eslint-disable-next-line deprecation/deprecation\n reason: \"Transport for \" + sentryRequest.type + \" requests locked till \" + this._disabledUntil(sentryRequest.type) + \" due to too many requests.\",\n status: 429,\n });\n }\n var options = {\n body: sentryRequest.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 // (see https://caniuse.com/#feat=referrer-policy),\n // it doesn't. And it throws an 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\n .add(function () {\n return new SyncPromise(function (resolve, reject) {\n void _this._fetch(sentryRequest.url, options)\n .then(function (response) {\n var headers = {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n };\n _this._handleResponse({\n requestType: sentryRequest.type,\n response: response,\n headers: headers,\n resolve: resolve,\n reject: reject,\n });\n })\n .catch(reject);\n });\n })\n .then(undefined, function (reason) {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n _this.recordLostEvent('queue_overflow', sentryRequest.type);\n }\n else {\n _this.recordLostEvent('network_error', sentryRequest.type);\n }\n throw reason;\n });\n };\n return FetchTransport;\n}(BaseTransport));\nexport { FetchTransport };\n//# sourceMappingURL=fetch.js.map","import { __assign } from \"tslib\";\nimport { createTransport, } from '@sentry/core';\nimport { getNativeFetchImplementation } from './utils';\n/**\n * Creates a Transport that uses the Fetch API to send events to Sentry.\n */\nexport function makeNewFetchTransport(options, nativeFetch) {\n if (nativeFetch === void 0) { nativeFetch = getNativeFetchImplementation(); }\n function makeRequest(request) {\n var requestOptions = __assign({ body: request.body, method: 'POST', referrerPolicy: 'origin' }, options.requestOptions);\n return nativeFetch(options.url, requestOptions).then(function (response) {\n return response.text().then(function (body) { return ({\n body: body,\n headers: {\n 'x-sentry-rate-limits': response.headers.get('X-Sentry-Rate-Limits'),\n 'retry-after': response.headers.get('Retry-After'),\n },\n reason: response.statusText,\n statusCode: response.status,\n }); });\n });\n }\n return createTransport({ bufferSize: options.bufferSize }, makeRequest);\n}\n//# sourceMappingURL=new-fetch.js.map","import { createTransport, } from '@sentry/core';\nimport { SyncPromise } from '@sentry/utils';\n/**\n * The DONE ready state for XmlHttpRequest\n *\n * Defining it here as a constant b/c XMLHttpRequest.DONE is not always defined\n * (e.g. during testing, it is `undefined`)\n *\n * @see {@link https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState}\n */\nvar XHR_READYSTATE_DONE = 4;\n/**\n * Creates a Transport that uses the XMLHttpRequest API to send events to Sentry.\n */\nexport function makeNewXHRTransport(options) {\n function makeRequest(request) {\n return new SyncPromise(function (resolve, _reject) {\n var xhr = new XMLHttpRequest();\n xhr.onreadystatechange = function () {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n var response = {\n body: xhr.response,\n headers: {\n 'x-sentry-rate-limits': xhr.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': xhr.getResponseHeader('Retry-After'),\n },\n reason: xhr.statusText,\n statusCode: xhr.status,\n };\n resolve(response);\n }\n };\n xhr.open('POST', options.url);\n for (var header in options.headers) {\n if (Object.prototype.hasOwnProperty.call(options.headers, header)) {\n xhr.setRequestHeader(header, options.headers[header]);\n }\n }\n xhr.send(request.body);\n });\n }\n return createTransport({ bufferSize: options.bufferSize }, makeRequest);\n}\n//# sourceMappingURL=new-xhr.js.map","import { forget, getGlobalObject, isNativeFetch, logger, supportsFetch } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\nvar global = getGlobalObject();\nvar cachedFetchImpl;\n/**\n * A special usecase for incorrectly wrapped Fetch APIs in conjunction with ad-blockers.\n * Whenever someone wraps the Fetch API and returns the wrong promise chain,\n * this chain becomes orphaned and there is no possible way to capture it's rejections\n * other than allowing it bubble up to this very handler. eg.\n *\n * const f = window.fetch;\n * window.fetch = function () {\n * const p = f.apply(this, arguments);\n *\n * p.then(function() {\n * console.log('hi.');\n * });\n *\n * return p;\n * }\n *\n * `p.then(function () { ... })` is producing a completely separate promise chain,\n * however, what's returned is `p` - the result of original `fetch` call.\n *\n * This mean, that whenever we use the Fetch API to send our own requests, _and_\n * some ad-blocker blocks it, this orphaned chain will _always_ reject,\n * effectively causing another event to be captured.\n * This makes a whole process become an infinite loop, which we need to somehow\n * deal with, and break it in one way or another.\n *\n * To deal with this issue, we are making sure that we _always_ use the real\n * browser Fetch API, instead of relying on what `window.fetch` exposes.\n * The only downside to this would be missing our own requests as breadcrumbs,\n * but because we are already not doing this, it should be just fine.\n *\n * Possible failed fetch error messages per-browser:\n *\n * Chrome: Failed to fetch\n * Edge: Failed to Fetch\n * Firefox: NetworkError when attempting to fetch resource\n * Safari: resource blocked by content blocker\n */\nexport function getNativeFetchImplementation() {\n if (cachedFetchImpl) {\n return cachedFetchImpl;\n }\n /* eslint-disable @typescript-eslint/unbound-method */\n // Fast path to avoid DOM I/O\n if (isNativeFetch(global.fetch)) {\n return (cachedFetchImpl = global.fetch.bind(global));\n }\n var document = global.document;\n var fetchImpl = global.fetch;\n // eslint-disable-next-line deprecation/deprecation\n if (document && typeof document.createElement === 'function') {\n try {\n var sandbox = document.createElement('iframe');\n sandbox.hidden = true;\n document.head.appendChild(sandbox);\n var contentWindow = sandbox.contentWindow;\n if (contentWindow && contentWindow.fetch) {\n fetchImpl = contentWindow.fetch;\n }\n document.head.removeChild(sandbox);\n }\n catch (e) {\n IS_DEBUG_BUILD &&\n logger.warn('Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ', e);\n }\n }\n return (cachedFetchImpl = fetchImpl.bind(global));\n /* eslint-enable @typescript-eslint/unbound-method */\n}\n/**\n * Sends sdk client report using sendBeacon or fetch as a fallback if available\n *\n * @param url report endpoint\n * @param body report payload\n */\nexport function sendReport(url, body) {\n var isRealNavigator = Object.prototype.toString.call(global && global.navigator) === '[object Navigator]';\n var hasSendBeacon = isRealNavigator && typeof global.navigator.sendBeacon === 'function';\n if (hasSendBeacon) {\n // Prevent illegal invocations - https://xgwang.me/posts/you-may-not-know-beacon/#it-may-throw-error%2C-be-sure-to-catch\n var sendBeacon = global.navigator.sendBeacon.bind(global.navigator);\n return sendBeacon(url, body);\n }\n if (supportsFetch()) {\n var fetch_1 = getNativeFetchImplementation();\n return forget(fetch_1(url, {\n body: body,\n method: 'POST',\n credentials: 'omit',\n keepalive: true,\n }));\n }\n}\n//# sourceMappingURL=utils.js.map","import { __extends } from \"tslib\";\nimport { SentryError, SyncPromise } from '@sentry/utils';\nimport { BaseTransport } from './base';\n/** `XHR` based transport */\nvar XHRTransport = /** @class */ (function (_super) {\n __extends(XHRTransport, _super);\n function XHRTransport() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n /**\n * @param sentryRequest Prepared SentryRequest to be delivered\n * @param originalPayload Original payload used to create SentryRequest\n */\n XHRTransport.prototype._sendRequest = function (sentryRequest, originalPayload) {\n var _this = this;\n // eslint-disable-next-line deprecation/deprecation\n if (this._isRateLimited(sentryRequest.type)) {\n this.recordLostEvent('ratelimit_backoff', sentryRequest.type);\n return Promise.reject({\n event: originalPayload,\n type: sentryRequest.type,\n // eslint-disable-next-line deprecation/deprecation\n reason: \"Transport for \" + sentryRequest.type + \" requests locked till \" + this._disabledUntil(sentryRequest.type) + \" due to too many requests.\",\n status: 429,\n });\n }\n return this._buffer\n .add(function () {\n return new SyncPromise(function (resolve, reject) {\n var request = new XMLHttpRequest();\n request.onreadystatechange = function () {\n if (request.readyState === 4) {\n var headers = {\n 'x-sentry-rate-limits': request.getResponseHeader('X-Sentry-Rate-Limits'),\n 'retry-after': request.getResponseHeader('Retry-After'),\n };\n _this._handleResponse({ requestType: sentryRequest.type, response: request, headers: headers, resolve: resolve, reject: reject });\n }\n };\n request.open('POST', sentryRequest.url);\n for (var header in _this.options.headers) {\n if (Object.prototype.hasOwnProperty.call(_this.options.headers, header)) {\n request.setRequestHeader(header, _this.options.headers[header]);\n }\n }\n request.send(sentryRequest.body);\n });\n })\n .then(undefined, function (reason) {\n // It's either buffer rejection or any other xhr/fetch error, which are treated as NetworkError.\n if (reason instanceof SentryError) {\n _this.recordLostEvent('queue_overflow', sentryRequest.type);\n }\n else {\n _this.recordLostEvent('network_error', sentryRequest.type);\n }\n throw reason;\n });\n };\n return XHRTransport;\n}(BaseTransport));\nexport { XHRTransport };\n//# sourceMappingURL=xhr.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 { dsnToString, makeDsn, urlEncode } from '@sentry/utils';\nvar SENTRY_API_VERSION = '7';\n/**\n * Helper class to provide urls, headers and metadata that can be used to form\n * different types of requests to Sentry endpoints.\n * Supports both envelopes and regular event requests.\n *\n * @deprecated Please use APIDetails\n **/\nvar API = /** @class */ (function () {\n /** Create a new instance of API */\n function API(dsn, metadata, tunnel) {\n if (metadata === void 0) { metadata = {}; }\n this.dsn = dsn;\n this._dsnObject = makeDsn(dsn);\n this.metadata = metadata;\n this._tunnel = tunnel;\n }\n /** Returns the Dsn object. */\n API.prototype.getDsn = function () {\n return this._dsnObject;\n };\n /** Does this transport force envelopes? */\n API.prototype.forceEnvelope = function () {\n return !!this._tunnel;\n };\n /** Returns the prefix to construct Sentry ingestion API endpoints. */\n API.prototype.getBaseApiEndpoint = function () {\n return getBaseApiEndpoint(this._dsnObject);\n };\n /** Returns the store endpoint URL. */\n API.prototype.getStoreEndpoint = function () {\n return getStoreEndpoint(this._dsnObject);\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 getStoreEndpointWithUrlEncodedAuth(this._dsnObject);\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 getEnvelopeEndpointWithUrlEncodedAuth(this._dsnObject, this._tunnel);\n };\n return API;\n}());\nexport { API };\n/** Initializes API Details */\nexport function initAPIDetails(dsn, metadata, tunnel) {\n return {\n initDsn: dsn,\n metadata: metadata || {},\n dsn: makeDsn(dsn),\n tunnel: tunnel,\n };\n}\n/** Returns the prefix to construct Sentry ingestion API endpoints. */\nfunction getBaseApiEndpoint(dsn) {\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 ingest API endpoint for target. */\nfunction _getIngestEndpoint(dsn, target) {\n return \"\" + getBaseApiEndpoint(dsn) + dsn.projectId + \"/\" + target + \"/\";\n}\n/** Returns a URL-encoded string with auth config suitable for a query string. */\nfunction _encodedAuth(dsn) {\n return urlEncode({\n // We send only the minimum set of required information. See\n // https://github.com/getsentry/sentry-javascript/issues/2572.\n sentry_key: dsn.publicKey,\n sentry_version: SENTRY_API_VERSION,\n });\n}\n/** Returns the store endpoint URL. */\nfunction getStoreEndpoint(dsn) {\n return _getIngestEndpoint(dsn, 'store');\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 */\nexport function getStoreEndpointWithUrlEncodedAuth(dsn) {\n return getStoreEndpoint(dsn) + \"?\" + _encodedAuth(dsn);\n}\n/** Returns the envelope endpoint URL. */\nfunction _getEnvelopeEndpoint(dsn) {\n return _getIngestEndpoint(dsn, 'envelope');\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 */\nexport function getEnvelopeEndpointWithUrlEncodedAuth(dsn, tunnel) {\n return tunnel ? tunnel : _getEnvelopeEndpoint(dsn) + \"?\" + _encodedAuth(dsn);\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 */\nexport function getRequestHeaders(dsn, clientName, clientVersion) {\n // CHANGE THIS to use metadata but keep clientName and clientVersion compatible\n var header = [\"Sentry sentry_version=\" + SENTRY_API_VERSION];\n header.push(\"sentry_client=\" + clientName + \"/\" + clientVersion);\n header.push(\"sentry_key=\" + dsn.publicKey);\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. */\nexport function getReportDialogEndpoint(dsnLike, dialogOptions) {\n var dsn = makeDsn(dsnLike);\n var endpoint = getBaseApiEndpoint(dsn) + \"embed/error-page/\";\n var encodedOptions = \"dsn=\" + dsnToString(dsn);\n for (var key in dialogOptions) {\n if (key === 'dsn') {\n continue;\n }\n if (key === 'user') {\n if (!dialogOptions.user) {\n continue;\n }\n if (dialogOptions.user.name) {\n encodedOptions += \"&name=\" + encodeURIComponent(dialogOptions.user.name);\n }\n if (dialogOptions.user.email) {\n encodedOptions += \"&email=\" + encodeURIComponent(dialogOptions.user.email);\n }\n }\n else {\n encodedOptions += \"&\" + encodeURIComponent(key) + \"=\" + encodeURIComponent(dialogOptions[key]);\n }\n }\n return endpoint + \"?\" + encodedOptions;\n}\n//# sourceMappingURL=api.js.map","import { __read } from \"tslib\";\nimport { logger, SentryError } from '@sentry/utils';\nimport { initAPIDetails } from './api';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { createEventEnvelope, createSessionEnvelope } from './request';\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 IS_DEBUG_BUILD && logger.warn('No DSN provided, backend will not do anything.');\n }\n this._transport = this._setupTransport();\n }\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\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 // TODO(v7): Remove the if-else\n if (this._newTransport &&\n this._options.dsn &&\n this._options._experiments &&\n this._options._experiments.newTransport) {\n var api = initAPIDetails(this._options.dsn, this._options._metadata, this._options.tunnel);\n var env = createEventEnvelope(event, api);\n void this._newTransport.send(env).then(null, function (reason) {\n IS_DEBUG_BUILD && logger.error('Error while sending event:', reason);\n });\n }\n else {\n void this._transport.sendEvent(event).then(null, function (reason) {\n IS_DEBUG_BUILD && logger.error('Error while sending event:', reason);\n });\n }\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.sendSession = function (session) {\n if (!this._transport.sendSession) {\n IS_DEBUG_BUILD && logger.warn(\"Dropping session because custom transport doesn't implement sendSession\");\n return;\n }\n // TODO(v7): Remove the if-else\n if (this._newTransport &&\n this._options.dsn &&\n this._options._experiments &&\n this._options._experiments.newTransport) {\n var api = initAPIDetails(this._options.dsn, this._options._metadata, this._options.tunnel);\n var _a = __read(createSessionEnvelope(session, api), 1), env = _a[0];\n void this._newTransport.send(env).then(null, function (reason) {\n IS_DEBUG_BUILD && logger.error('Error while sending session:', reason);\n });\n }\n else {\n void this._transport.sendSession(session).then(null, function (reason) {\n IS_DEBUG_BUILD && logger.error('Error while sending session:', reason);\n });\n }\n };\n /**\n * @inheritDoc\n */\n BaseBackend.prototype.getTransport = function () {\n return this._transport;\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 return BaseBackend;\n}());\nexport { BaseBackend };\n//# sourceMappingURL=basebackend.js.map","import { __assign, __read, __spread, __values } from \"tslib\";\n/* eslint-disable max-lines */\nimport { Scope } from '@sentry/hub';\nimport { checkOrSetAlreadyCaught, dateTimestampInSeconds, isPlainObject, isPrimitive, isThenable, logger, makeDsn, normalize, rejectedSyncPromise, resolvedSyncPromise, SentryError, SyncPromise, truncate, uuid4, } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\nimport { setupIntegrations } from './integration';\nvar ALREADY_SEEN_ERROR = \"Not capturing exception because it's already been captured.\";\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 /** Number of calls being processed */\n this._numProcessing = 0;\n this._backend = new backendClass(options);\n this._options = options;\n if (options.dsn) {\n this._dsn = makeDsn(options.dsn);\n }\n }\n /**\n * @inheritDoc\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types\n BaseClient.prototype.captureException = function (exception, hint, scope) {\n var _this = this;\n // ensure we haven't captured this very object before\n if (checkOrSetAlreadyCaught(exception)) {\n IS_DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n var eventId = hint && hint.event_id;\n this._process(this._getBackend()\n .eventFromException(exception, hint)\n .then(function (event) { return _this._captureEvent(event, hint, scope); })\n .then(function (result) {\n eventId = result;\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 var promisedEvent = isPrimitive(message)\n ? this._getBackend().eventFromMessage(String(message), level, hint)\n : this._getBackend().eventFromException(message, hint);\n this._process(promisedEvent\n .then(function (event) { return _this._captureEvent(event, hint, scope); })\n .then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureEvent = function (event, hint, scope) {\n // ensure we haven't captured this very object before\n if (hint && hint.originalException && checkOrSetAlreadyCaught(hint.originalException)) {\n IS_DEBUG_BUILD && logger.log(ALREADY_SEEN_ERROR);\n return;\n }\n var eventId = hint && hint.event_id;\n this._process(this._captureEvent(event, hint, scope).then(function (result) {\n eventId = result;\n }));\n return eventId;\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.captureSession = function (session) {\n if (!this._isEnabled()) {\n IS_DEBUG_BUILD && logger.warn('SDK not enabled, will not capture session.');\n return;\n }\n if (!(typeof session.release === 'string')) {\n IS_DEBUG_BUILD && logger.warn('Discarded session because of missing or non-string release');\n }\n else {\n this._sendSession(session);\n // After sending, we set init false to indicate it's not the first occurrence\n session.update({ init: false });\n }\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.getTransport = function () {\n return this._getBackend().getTransport();\n };\n /**\n * @inheritDoc\n */\n BaseClient.prototype.flush = function (timeout) {\n var _this = this;\n return this._isClientDoneProcessing(timeout).then(function (clientFinished) {\n return _this.getTransport()\n .close(timeout)\n .then(function (transportFlushed) { return clientFinished && 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() && !this._integrations.initialized) {\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 IS_DEBUG_BUILD && logger.warn(\"Cannot retrieve integration \" + integration.id + \" from the current Client\");\n return null;\n }\n };\n /** Updates existing session based on the provided event */\n BaseClient.prototype._updateSessionFromEvent = function (session, event) {\n var e_1, _a;\n var crashed = false;\n var errored = false;\n var exceptions = event.exception && event.exception.values;\n if (exceptions) {\n errored = true;\n try {\n for (var exceptions_1 = __values(exceptions), exceptions_1_1 = exceptions_1.next(); !exceptions_1_1.done; exceptions_1_1 = exceptions_1.next()) {\n var ex = exceptions_1_1.value;\n var mechanism = ex.mechanism;\n if (mechanism && mechanism.handled === false) {\n crashed = true;\n break;\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (exceptions_1_1 && !exceptions_1_1.done && (_a = exceptions_1.return)) _a.call(exceptions_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n // A session is updated and that session update is sent in only one of the two following scenarios:\n // 1. Session with non terminal status and 0 errors + an error occurred -> Will set error count to 1 and send update\n // 2. Session with non terminal status and 1 error + a crash occurred -> Will set status crashed and send update\n var sessionNonTerminal = session.status === 'ok';\n var shouldUpdateAndSend = (sessionNonTerminal && session.errors === 0) || (sessionNonTerminal && crashed);\n if (shouldUpdateAndSend) {\n session.update(__assign(__assign({}, (crashed && { status: 'crashed' })), { errors: session.errors || Number(errored || crashed) }));\n this.captureSession(session);\n }\n };\n /** Deliver captured session to Sentry */\n BaseClient.prototype._sendSession = function (session) {\n this._getBackend().sendSession(session);\n };\n /**\n * Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying\n * \"no\" (resolving to `false`) in order to give the client a chance to potentially finish first.\n *\n * @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not\n * passing anything) will make the promise wait as long as it takes for processing to finish before resolving to\n * `true`.\n * @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and\n * `false` otherwise\n */\n BaseClient.prototype._isClientDoneProcessing = function (timeout) {\n var _this = this;\n return new SyncPromise(function (resolve) {\n var ticked = 0;\n var tick = 1;\n var interval = setInterval(function () {\n if (_this._numProcessing == 0) {\n clearInterval(interval);\n resolve(true);\n }\n else {\n ticked += tick;\n if (timeout && ticked >= timeout) {\n clearInterval(interval);\n resolve(false);\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(), _b = _a.normalizeDepth, normalizeDepth = _b === void 0 ? 3 : _b, _c = _a.normalizeMaxBreadth, normalizeMaxBreadth = _c === void 0 ? 1000 : _c;\n var prepared = __assign(__assign({}, event), { event_id: event.event_id || (hint && hint.event_id ? hint.event_id : uuid4()), timestamp: event.timestamp || dateTimestampInSeconds() });\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 = resolvedSyncPromise(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 if (evt) {\n // TODO this is more of the hack trying to solve https://github.com/getsentry/sentry-javascript/issues/2809\n // it is only attached as extra data to the event if the event somehow skips being normalized\n evt.sdkProcessingMetadata = __assign(__assign({}, evt.sdkProcessingMetadata), { normalizeDepth: normalize(normalizeDepth) + \" (\" + typeof normalizeDepth + \")\" });\n }\n if (typeof normalizeDepth === 'number' && normalizeDepth > 0) {\n return _this._normalizeEvent(evt, normalizeDepth, normalizeMaxBreadth);\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, maxBreadth) {\n if (!event) {\n return null;\n }\n var normalized = __assign(__assign(__assign(__assign(__assign({}, event), (event.breadcrumbs && {\n breadcrumbs: event.breadcrumbs.map(function (b) { return (__assign(__assign({}, b), (b.data && {\n data: normalize(b.data, depth, maxBreadth),\n }))); }),\n })), (event.user && {\n user: normalize(event.user, depth, maxBreadth),\n })), (event.contexts && {\n contexts: normalize(event.contexts, depth, maxBreadth),\n })), (event.extra && {\n extra: normalize(event.extra, depth, maxBreadth),\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 // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n normalized.contexts.trace = event.contexts.trace;\n }\n normalized.sdkProcessingMetadata = __assign(__assign({}, normalized.sdkProcessingMetadata), { baseClientNormalized: true });\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 options = this.getOptions();\n var environment = options.environment, release = options.release, dist = options.dist, _a = options.maxValueLength, maxValueLength = _a === void 0 ? 250 : _a;\n if (!('environment' in event)) {\n event.environment = 'environment' in options ? environment : 'production';\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 event The event that will be filled with all integrations.\n */\n BaseClient.prototype._applyIntegrationsMetadata = function (event) {\n var integrationsArray = Object.keys(this._integrations);\n if (integrationsArray.length > 0) {\n event.sdk = event.sdk || {};\n event.sdk.integrations = __spread((event.sdk.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 the event and logs an error in case of rejection\n * @param event\n * @param hint\n * @param scope\n */\n BaseClient.prototype._captureEvent = function (event, hint, scope) {\n return this._processEvent(event, hint, scope).then(function (finalEvent) {\n return finalEvent.event_id;\n }, function (reason) {\n IS_DEBUG_BUILD && logger.error(reason);\n return undefined;\n });\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 // eslint-disable-next-line @typescript-eslint/unbound-method\n var _a = this.getOptions(), beforeSend = _a.beforeSend, sampleRate = _a.sampleRate;\n var transport = this.getTransport();\n function recordLostEvent(outcome, category) {\n if (transport.recordLostEvent) {\n transport.recordLostEvent(outcome, category);\n }\n }\n if (!this._isEnabled()) {\n return rejectedSyncPromise(new SentryError('SDK not enabled, will not capture 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 recordLostEvent('sample_rate', 'event');\n return rejectedSyncPromise(new SentryError(\"Discarding event because it's not included in the random sample (sampling rate = \" + sampleRate + \")\"));\n }\n return this._prepareEvent(event, scope, hint)\n .then(function (prepared) {\n if (prepared === null) {\n recordLostEvent('event_processor', event.type || 'event');\n throw new SentryError('An event processor returned null, will not send event.');\n }\n var isInternalException = hint && hint.data && hint.data.__sentry__ === true;\n if (isInternalException || isTransaction || !beforeSend) {\n return prepared;\n }\n var beforeSendResult = beforeSend(prepared, hint);\n return _ensureBeforeSendRv(beforeSendResult);\n })\n .then(function (processedEvent) {\n if (processedEvent === null) {\n recordLostEvent('before_send', event.type || 'event');\n throw new SentryError('`beforeSend` returned `null`, will not send event.');\n }\n var session = scope && scope.getSession && scope.getSession();\n if (!isTransaction && session) {\n _this._updateSessionFromEvent(session, processedEvent);\n }\n _this._sendEvent(processedEvent);\n return processedEvent;\n })\n .then(null, function (reason) {\n if (reason instanceof SentryError) {\n throw reason;\n }\n _this.captureException(reason, {\n data: {\n __sentry__: true,\n },\n originalException: reason,\n });\n throw new SentryError(\"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 * Occupies the client with processing and event\n */\n BaseClient.prototype._process = function (promise) {\n var _this = this;\n this._numProcessing += 1;\n void promise.then(function (value) {\n _this._numProcessing -= 1;\n return value;\n }, function (reason) {\n _this._numProcessing -= 1;\n return reason;\n });\n };\n return BaseClient;\n}());\nexport { BaseClient };\n/**\n * Verifies that return value of configured `beforeSend` is of expected type.\n */\nfunction _ensureBeforeSendRv(rv) {\n var nullErr = '`beforeSend` method has to return `null` or a valid event.';\n if (isThenable(rv)) {\n return rv.then(function (event) {\n if (!(isPlainObject(event) || event === null)) {\n throw new SentryError(nullErr);\n }\n return event;\n }, function (e) {\n throw new SentryError(\"beforeSend rejected with \" + e);\n });\n }\n else if (!(isPlainObject(rv) || rv === null)) {\n throw new SentryError(nullErr);\n }\n return rv;\n}\n//# sourceMappingURL=baseclient.js.map","/*\n * This file defines flags and constants that can be modified during compile time in order to facilitate tree shaking\n * for users.\n *\n * Debug flags need to be declared in each package individually and must not be imported across package boundaries,\n * because some build tools have trouble tree-shaking imported guards.\n *\n * As a convention, we define debug flags in a `flags.ts` file in the root of a package's `src` folder.\n *\n * Debug flag files will contain \"magic strings\" like `__SENTRY_DEBUG__` that may get replaced with actual values during\n * our, or the user's build process. Take care when introducing new flags - they must not throw if they are not\n * replaced.\n */\n/** Flag that is true for debug builds, false otherwise. */\nexport var IS_DEBUG_BUILD = typeof __SENTRY_DEBUG__ === 'undefined' ? true : __SENTRY_DEBUG__;\n//# sourceMappingURL=flags.js.map","import { __read, __spread } from \"tslib\";\nimport { addGlobalEventProcessor, getCurrentHub } from '@sentry/hub';\nimport { addNonEnumerableProperty, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\nexport var installedIntegrations = [];\n/**\n * @private\n */\nfunction filterDuplicates(integrations) {\n return integrations.reduce(function (acc, integrations) {\n if (acc.every(function (accIntegration) { return integrations.name !== accIntegration.name; })) {\n acc.push(integrations);\n }\n return acc;\n }, []);\n}\n/** Gets integration to install */\nexport function getIntegrationsToSetup(options) {\n var defaultIntegrations = (options.defaultIntegrations && __spread(options.defaultIntegrations)) || [];\n var userIntegrations = options.integrations;\n var integrations = __spread(filterDuplicates(defaultIntegrations));\n if (Array.isArray(userIntegrations)) {\n // Filter out integrations that are also included in user options\n integrations = __spread(integrations.filter(function (integrations) {\n return userIntegrations.every(function (userIntegration) { return userIntegration.name !== integrations.name; });\n }), filterDuplicates(userIntegrations));\n }\n else if (typeof userIntegrations === 'function') {\n integrations = userIntegrations(integrations);\n integrations = Array.isArray(integrations) ? integrations : [integrations];\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, __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 IS_DEBUG_BUILD && 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 // set the `initialized` flag so we don't run through the process again unecessarily; use `Object.defineProperty`\n // because by default it creates a property which is nonenumerable, which we want since `initialized` shouldn't be\n // considered a member of the index the way the actual integrations are\n addNonEnumerableProperty(integrations, 'initialized', true);\n return integrations;\n}\n//# sourceMappingURL=integration.js.map","import { getOriginalFunction } from '@sentry/utils';\nvar 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 // eslint-disable-next-line @typescript-eslint/unbound-method\n originalFunctionToString = Function.prototype.toString;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\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 = getOriginalFunction(this) || this;\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 { __read, __spread } from \"tslib\";\nimport { getEventDescription, isMatchingPattern, logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from '../flags';\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 (addGlobalEventProcessor, getCurrentHub) {\n addGlobalEventProcessor(function (event) {\n var hub = getCurrentHub();\n if (hub) {\n var self_1 = hub.getIntegration(InboundFilters);\n if (self_1) {\n var client = hub.getClient();\n var clientOptions = client ? client.getOptions() : {};\n var options = _mergeOptions(self_1._options, clientOptions);\n return _shouldDropEvent(event, options) ? null : event;\n }\n }\n return event;\n });\n };\n /**\n * @inheritDoc\n */\n InboundFilters.id = 'InboundFilters';\n return InboundFilters;\n}());\nexport { InboundFilters };\n/** JSDoc */\nexport function _mergeOptions(internalOptions, clientOptions) {\n if (internalOptions === void 0) { internalOptions = {}; }\n if (clientOptions === void 0) { clientOptions = {}; }\n return {\n allowUrls: __spread((internalOptions.whitelistUrls || []), (internalOptions.allowUrls || []), (clientOptions.whitelistUrls || []), (clientOptions.allowUrls || [])),\n denyUrls: __spread((internalOptions.blacklistUrls || []), (internalOptions.denyUrls || []), (clientOptions.blacklistUrls || []), (clientOptions.denyUrls || [])),\n ignoreErrors: __spread((internalOptions.ignoreErrors || []), (clientOptions.ignoreErrors || []), DEFAULT_IGNORE_ERRORS),\n ignoreInternal: internalOptions.ignoreInternal !== undefined ? internalOptions.ignoreInternal : true,\n };\n}\n/** JSDoc */\nexport function _shouldDropEvent(event, options) {\n if (options.ignoreInternal && _isSentryError(event)) {\n IS_DEBUG_BUILD &&\n logger.warn(\"Event dropped due to being internal Sentry Error.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n if (_isIgnoredError(event, options.ignoreErrors)) {\n IS_DEBUG_BUILD &&\n logger.warn(\"Event dropped due to being matched by `ignoreErrors` option.\\nEvent: \" + getEventDescription(event));\n return true;\n }\n if (_isDeniedUrl(event, options.denyUrls)) {\n IS_DEBUG_BUILD &&\n logger.warn(\"Event dropped due to being matched by `denyUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + _getEventFilterUrl(event));\n return true;\n }\n if (!_isAllowedUrl(event, options.allowUrls)) {\n IS_DEBUG_BUILD &&\n logger.warn(\"Event dropped due to not being matched by `allowUrls` option.\\nEvent: \" + getEventDescription(event) + \".\\nUrl: \" + _getEventFilterUrl(event));\n return true;\n }\n return false;\n}\nfunction _isIgnoredError(event, ignoreErrors) {\n if (!ignoreErrors || !ignoreErrors.length) {\n return false;\n }\n return _getPossibleEventMessages(event).some(function (message) {\n return ignoreErrors.some(function (pattern) { return isMatchingPattern(message, pattern); });\n });\n}\nfunction _isDeniedUrl(event, denyUrls) {\n // TODO: Use Glob instead?\n if (!denyUrls || !denyUrls.length) {\n return false;\n }\n var url = _getEventFilterUrl(event);\n return !url ? false : denyUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });\n}\nfunction _isAllowedUrl(event, allowUrls) {\n // TODO: Use Glob instead?\n if (!allowUrls || !allowUrls.length) {\n return true;\n }\n var url = _getEventFilterUrl(event);\n return !url ? true : allowUrls.some(function (pattern) { return isMatchingPattern(url, pattern); });\n}\nfunction _getPossibleEventMessages(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 IS_DEBUG_BUILD && logger.error(\"Cannot extract message for event \" + getEventDescription(event));\n return [];\n }\n }\n return [];\n}\nfunction _isSentryError(event) {\n try {\n // @ts-ignore can't be a sentry error if undefined\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return event.exception.values[0].type === 'SentryError';\n }\n catch (e) {\n // ignore\n }\n return false;\n}\nfunction _getLastValidUrl(frames) {\n if (frames === void 0) { frames = []; }\n for (var i = frames.length - 1; i >= 0; i--) {\n var frame = frames[i];\n if (frame && frame.filename !== '<anonymous>' && frame.filename !== '[native code]') {\n return frame.filename || null;\n }\n }\n return null;\n}\nfunction _getEventFilterUrl(event) {\n try {\n if (event.stacktrace) {\n return _getLastValidUrl(event.stacktrace.frames);\n }\n var frames_1;\n try {\n // @ts-ignore we only care about frames if the whole thing here is defined\n frames_1 = event.exception.values[0].stacktrace.frames;\n }\n catch (e) {\n // ignore\n }\n return frames_1 ? _getLastValidUrl(frames_1) : null;\n }\n catch (oO) {\n IS_DEBUG_BUILD && logger.error(\"Cannot extract url for event \" + getEventDescription(event));\n return null;\n }\n}\n//# sourceMappingURL=inboundfilters.js.map","import { __assign, __read, __spread } from \"tslib\";\nimport { createEnvelope, dsnToString, normalize, serializeEnvelope } from '@sentry/utils';\nimport { getEnvelopeEndpointWithUrlEncodedAuth, getStoreEndpointWithUrlEncodedAuth } from './api';\n/** Extract sdk info from from the API metadata */\nfunction getSdkMetadataForEnvelopeHeader(api) {\n if (!api.metadata || !api.metadata.sdk) {\n return;\n }\n var _a = api.metadata.sdk, name = _a.name, version = _a.version;\n return { name: name, version: version };\n}\n/**\n * Apply SdkInfo (name, version, packages, integrations) to the corresponding event key.\n * Merge with existing data if any.\n **/\nfunction enhanceEventWithSdkInfo(event, sdkInfo) {\n if (!sdkInfo) {\n return event;\n }\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || sdkInfo.name;\n event.sdk.version = event.sdk.version || sdkInfo.version;\n event.sdk.integrations = __spread((event.sdk.integrations || []), (sdkInfo.integrations || []));\n event.sdk.packages = __spread((event.sdk.packages || []), (sdkInfo.packages || []));\n return event;\n}\n/** Creates an envelope from a Session */\nexport function createSessionEnvelope(session, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var envelopeHeaders = __assign(__assign({ sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: dsnToString(api.dsn) }));\n // I know this is hacky but we don't want to add `sessions` to request type since it's never rate limited\n var type = 'aggregates' in session ? 'sessions' : 'session';\n // TODO (v7) Have to cast type because envelope items do not accept a `SentryRequestType`\n var envelopeItem = [{ type: type }, session];\n var envelope = createEnvelope(envelopeHeaders, [envelopeItem]);\n return [envelope, type];\n}\n/** Creates a SentryRequest from a Session. */\nexport function sessionToSentryRequest(session, api) {\n var _a = __read(createSessionEnvelope(session, api), 2), envelope = _a[0], type = _a[1];\n return {\n body: serializeEnvelope(envelope),\n type: type,\n url: getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel),\n };\n}\n/**\n * Create an Envelope from an event. Note that this is duplicated from below,\n * but on purpose as this will be refactored in v7.\n */\nexport function createEventEnvelope(event, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var eventType = event.type || 'event';\n var transactionSampling = (event.sdkProcessingMetadata || {}).transactionSampling;\n var _a = transactionSampling || {}, samplingMethod = _a.method, sampleRate = _a.rate;\n // TODO: Below is a temporary hack in order to debug a serialization error - see\n // https://github.com/getsentry/sentry-javascript/issues/2809,\n // https://github.com/getsentry/sentry-javascript/pull/4425, and\n // https://github.com/getsentry/sentry-javascript/pull/4574.\n //\n // TL; DR: even though we normalize all events (which should prevent this), something is causing `JSON.stringify` to\n // throw a circular reference error.\n //\n // When it's time to remove it:\n // 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting\n // `sdkProcessingMetadata`\n // 2. Restore the original version of the request body, which is commented out\n // 3. Search for either of the PR URLs above and pull out the companion hacks in the browser playwright tests and the\n // baseClient tests in this package\n enhanceEventWithSdkInfo(event, api.metadata.sdk);\n event.tags = event.tags || {};\n event.extra = event.extra || {};\n // In theory, all events should be marked as having gone through normalization and so\n // we should never set this tag/extra data\n if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {\n event.tags.skippedNormalization = true;\n event.extra.normalizeDepth = event.sdkProcessingMetadata ? event.sdkProcessingMetadata.normalizeDepth : 'unset';\n }\n // prevent this data from being sent to sentry\n // TODO: This is NOT part of the hack - DO NOT DELETE\n delete event.sdkProcessingMetadata;\n var envelopeHeaders = __assign(__assign({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: dsnToString(api.dsn) }));\n var eventItem = [\n {\n type: eventType,\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n },\n event,\n ];\n return createEnvelope(envelopeHeaders, [eventItem]);\n}\n/** Creates a SentryRequest from an event. */\nexport function eventToSentryRequest(event, api) {\n var sdkInfo = getSdkMetadataForEnvelopeHeader(api);\n var eventType = event.type || 'event';\n var useEnvelope = eventType === 'transaction' || !!api.tunnel;\n var transactionSampling = (event.sdkProcessingMetadata || {}).transactionSampling;\n var _a = transactionSampling || {}, samplingMethod = _a.method, sampleRate = _a.rate;\n // TODO: Below is a temporary hack in order to debug a serialization error - see\n // https://github.com/getsentry/sentry-javascript/issues/2809,\n // https://github.com/getsentry/sentry-javascript/pull/4425, and\n // https://github.com/getsentry/sentry-javascript/pull/4574.\n //\n // TL; DR: even though we normalize all events (which should prevent this), something is causing `JSON.stringify` to\n // throw a circular reference error.\n //\n // When it's time to remove it:\n // 1. Delete everything between here and where the request object `req` is created, EXCEPT the line deleting\n // `sdkProcessingMetadata`\n // 2. Restore the original version of the request body, which is commented out\n // 3. Search for either of the PR URLs above and pull out the companion hacks in the browser playwright tests and the\n // baseClient tests in this package\n enhanceEventWithSdkInfo(event, api.metadata.sdk);\n event.tags = event.tags || {};\n event.extra = event.extra || {};\n // In theory, all events should be marked as having gone through normalization and so\n // we should never set this tag/extra data\n if (!(event.sdkProcessingMetadata && event.sdkProcessingMetadata.baseClientNormalized)) {\n event.tags.skippedNormalization = true;\n event.extra.normalizeDepth = event.sdkProcessingMetadata ? event.sdkProcessingMetadata.normalizeDepth : 'unset';\n }\n // prevent this data from being sent to sentry\n // TODO: This is NOT part of the hack - DO NOT DELETE\n delete event.sdkProcessingMetadata;\n var body;\n try {\n // 99.9% of events should get through just fine - no change in behavior for them\n body = JSON.stringify(event);\n }\n catch (err) {\n // Record data about the error without replacing original event data, then force renormalization\n event.tags.JSONStringifyError = true;\n event.extra.JSONStringifyError = err;\n try {\n body = JSON.stringify(normalize(event));\n }\n catch (newErr) {\n // At this point even renormalization hasn't worked, meaning something about the event data has gone very wrong.\n // Time to cut our losses and record only the new error. With luck, even in the problematic cases we're trying to\n // debug with this hack, we won't ever land here.\n var innerErr = newErr;\n body = JSON.stringify({\n message: 'JSON.stringify error after renormalization',\n // setting `extra: { innerErr }` here for some reason results in an empty object, so unpack manually\n extra: { message: innerErr.message, stack: innerErr.stack },\n });\n }\n }\n var req = {\n // this is the relevant line of code before the hack was added, to make it easy to undo said hack once we've solved\n // the mystery\n // body: JSON.stringify(sdkInfo ? enhanceEventWithSdkInfo(event, api.metadata.sdk) : event),\n body: body,\n type: eventType,\n url: useEnvelope\n ? getEnvelopeEndpointWithUrlEncodedAuth(api.dsn, api.tunnel)\n : getStoreEndpointWithUrlEncodedAuth(api.dsn),\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 = __assign(__assign({ event_id: event.event_id, sent_at: new Date().toISOString() }, (sdkInfo && { sdk: sdkInfo })), (!!api.tunnel && { dsn: dsnToString(api.dsn) }));\n var eventItem = [\n {\n type: eventType,\n sample_rates: [{ id: samplingMethod, rate: sampleRate }],\n },\n req.body,\n ];\n var envelope = createEnvelope(envelopeHeaders, [eventItem]);\n req.body = serializeEnvelope(envelope);\n }\n return req;\n}\n//# sourceMappingURL=request.js.map","import { getCurrentHub } from '@sentry/hub';\nimport { logger } from '@sentry/utils';\nimport { IS_DEBUG_BUILD } from './flags';\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 instantiate.\n * @param options Options to pass to the client.\n */\nexport function initAndBind(clientClass, options) {\n if (options.debug === true) {\n if (IS_DEBUG_BUILD) {\n logger.enable();\n }\n else {\n // use `console.warn` rather than `logger.warn` since by non-debug bundles have all `logger.x` statements stripped\n // eslint-disable-next-line no-console\n console.warn('[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.');\n }\n }\n var hub = getCurrentHub();\n var scope = hub.getScope();\n if (scope) {\n scope.update(options.initialScope);\n }\n var client = new clientClass(options);\n hub.bindClient(client);\n}\n//# sourceMappingURL=sdk.js.map","import { disabledUntil, eventStatusFromHttpCode, getEnvelopeType, isRateLimited, makePromiseBuffer, rejectedSyncPromise, resolvedSyncPromise, serializeEnvelope, updateRateLimits, } from '@sentry/utils';\nexport var ERROR_TRANSPORT_CATEGORY = 'error';\nexport var TRANSACTION_TRANSPORT_CATEGORY = 'transaction';\nexport var ATTACHMENT_TRANSPORT_CATEGORY = 'attachment';\nexport var SESSION_TRANSPORT_CATEGORY = 'session';\nexport var DEFAULT_TRANSPORT_BUFFER_SIZE = 30;\n/**\n * Creates a `NewTransport`\n *\n * @param options\n * @param makeRequest\n */\nexport function createTransport(options, makeRequest, buffer) {\n if (buffer === void 0) { buffer = makePromiseBuffer(options.bufferSize || DEFAULT_TRANSPORT_BUFFER_SIZE); }\n var rateLimits = {};\n var flush = function (timeout) { return buffer.drain(timeout); };\n function send(envelope) {\n var envCategory = getEnvelopeType(envelope);\n var category = envCategory === 'event' ? 'error' : envCategory;\n var request = {\n category: category,\n body: serializeEnvelope(envelope),\n };\n // Don't add to buffer if transport is already rate-limited\n if (isRateLimited(rateLimits, category)) {\n return rejectedSyncPromise({\n status: 'rate_limit',\n reason: getRateLimitReason(rateLimits, category),\n });\n }\n var requestTask = function () {\n return makeRequest(request).then(function (_a) {\n var body = _a.body, headers = _a.headers, reason = _a.reason, statusCode = _a.statusCode;\n var status = eventStatusFromHttpCode(statusCode);\n if (headers) {\n rateLimits = updateRateLimits(rateLimits, headers);\n }\n if (status === 'success') {\n return resolvedSyncPromise({ status: status, reason: reason });\n }\n return rejectedSyncPromise({\n status: status,\n reason: reason ||\n body ||\n (status === 'rate_limit' ? getRateLimitReason(rateLimits, category) : 'Unknown transport error'),\n });\n });\n };\n return buffer.add(requestTask);\n }\n return {\n send: send,\n flush: flush,\n };\n}\nfunction getRateLimitReason(rateLimits, category) {\n return \"Too many \" + category + \" requests, backing off until: \" + new Date(disabledUntil(rateLimits, category)).toISOString();\n}\n//# sourceMappingURL=base.js.map","import { resolvedSyncPromise } 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 resolvedSyncPromise({\n reason: 'NoopTransport: Event has been skipped because no Dsn is configured.',\n status: 'skipped',\n });\n };\n /**\n * @inheritDoc\n */\n NoopTransport.prototype.close = function (_) {\n return resolvedSyncPromise(true);\n };\n return NoopTransport;\n}());\nexport { NoopTransport };\n//# sourceMappingURL=noop.js.map","export var SDK_VERSION = '6.19.6';\n//# sourceMappingURL=version.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 functio