@eka-care/ekascribe-ts-sdk 3.0.16 → 3.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +908 -955
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { SessionStatus as
|
|
2
|
-
import { createWorkerBlobUrl as
|
|
1
|
+
import { SessionStatus as Ir, ScribeError as Ne, ScribeClient as vr, TransportMode as Oe } from "med-scribe-alliance-ts-sdk";
|
|
2
|
+
import { createWorkerBlobUrl as tu, getWorkerUrl as eu } from "med-scribe-alliance-ts-sdk";
|
|
3
3
|
const wr = 1e4;
|
|
4
|
-
class
|
|
4
|
+
class kr {
|
|
5
5
|
constructor(t) {
|
|
6
6
|
this.tokenRefreshPromise = null, this.accessToken = t.access_token, this.clientId = t.clientId, this.flavour = t.flavour, this.defaultTimeout = t.defaultTimeout ?? wr, this.onUnauthorized = t.onUnauthorized;
|
|
7
7
|
}
|
|
@@ -30,9 +30,9 @@ class Nr {
|
|
|
30
30
|
credentials: "include"
|
|
31
31
|
});
|
|
32
32
|
if (a.status === 401)
|
|
33
|
-
throw new
|
|
33
|
+
throw new F("Unauthorized", 401);
|
|
34
34
|
if (a.status === 403)
|
|
35
|
-
throw new
|
|
35
|
+
throw new F("Forbidden", 403);
|
|
36
36
|
let c;
|
|
37
37
|
return a.headers.get("content-type")?.includes("application/json") ? c = await a.json() : c = await a.text(), {
|
|
38
38
|
status: a.status,
|
|
@@ -53,7 +53,7 @@ class Nr {
|
|
|
53
53
|
}), this.tokenRefreshPromise);
|
|
54
54
|
}
|
|
55
55
|
isUnauthorizedError(t) {
|
|
56
|
-
return t instanceof
|
|
56
|
+
return t instanceof F && t.status === 401;
|
|
57
57
|
}
|
|
58
58
|
extractHeaders(t) {
|
|
59
59
|
const n = {};
|
|
@@ -62,15 +62,15 @@ class Nr {
|
|
|
62
62
|
}), n;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
class
|
|
65
|
+
class F extends Error {
|
|
66
66
|
constructor(t, n) {
|
|
67
67
|
super(t), this.status = n, this.name = "TransportError";
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
const
|
|
71
|
-
class
|
|
70
|
+
const Nr = 1e4;
|
|
71
|
+
class Or {
|
|
72
72
|
constructor(t, n) {
|
|
73
|
-
this.tokenRefreshPromise = null, this.pendingRequests = /* @__PURE__ */ new Map(), this.accessToken = t.access_token, this.clientId = t.clientId, this.flavour = t.flavour, this.defaultTimeout = t.defaultTimeout ??
|
|
73
|
+
this.tokenRefreshPromise = null, this.pendingRequests = /* @__PURE__ */ new Map(), this.accessToken = t.access_token, this.clientId = t.clientId, this.flavour = t.flavour, this.defaultTimeout = t.defaultTimeout ?? Nr, this.onUnauthorized = t.onUnauthorized, this.bridge = n, this.bridge.onResponse((r) => {
|
|
74
74
|
const s = r;
|
|
75
75
|
if (s?.type !== "response" || !s.correlationId) return;
|
|
76
76
|
const o = this.pendingRequests.get(s.correlationId);
|
|
@@ -86,7 +86,7 @@ class Cr {
|
|
|
86
86
|
}
|
|
87
87
|
destroy() {
|
|
88
88
|
for (const [, t] of this.pendingRequests)
|
|
89
|
-
t.reject(new
|
|
89
|
+
t.reject(new F("Transport destroyed", 0));
|
|
90
90
|
this.pendingRequests.clear();
|
|
91
91
|
}
|
|
92
92
|
async request(t) {
|
|
@@ -113,16 +113,16 @@ class Cr {
|
|
|
113
113
|
};
|
|
114
114
|
return new Promise((a, c) => {
|
|
115
115
|
const u = setTimeout(() => {
|
|
116
|
-
this.pendingRequests.delete(n), c(new
|
|
116
|
+
this.pendingRequests.delete(n), c(new F("IPC request timed out", 408));
|
|
117
117
|
}, r);
|
|
118
118
|
this.pendingRequests.set(n, {
|
|
119
119
|
resolve: (d) => {
|
|
120
120
|
if (clearTimeout(u), d.status === 401) {
|
|
121
|
-
c(new
|
|
121
|
+
c(new F("Unauthorized", 401));
|
|
122
122
|
return;
|
|
123
123
|
}
|
|
124
124
|
if (d.status === 403) {
|
|
125
|
-
c(new
|
|
125
|
+
c(new F("Forbidden", 403));
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
128
|
a(d);
|
|
@@ -143,20 +143,20 @@ class Cr {
|
|
|
143
143
|
}), this.tokenRefreshPromise);
|
|
144
144
|
}
|
|
145
145
|
isUnauthorizedError(t) {
|
|
146
|
-
return t instanceof
|
|
146
|
+
return t instanceof F && t.status === 401;
|
|
147
147
|
}
|
|
148
148
|
generateCorrelationId() {
|
|
149
149
|
return `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
const
|
|
152
|
+
const Cr = {
|
|
153
153
|
voiceV1: "https://api.dev.eka.care/voice/api/v1",
|
|
154
154
|
voiceV2: "https://api.dev.eka.care/voice/api/v2",
|
|
155
155
|
voiceV3: "https://api.dev.eka.care/voice/api/v3",
|
|
156
156
|
cookV1: "https://deepthought-genai.dev.eka.care/api/v1",
|
|
157
157
|
ekaHost: "https://api.dev.eka.care",
|
|
158
158
|
parchiHost: "https://parchi.dev.eka.care"
|
|
159
|
-
},
|
|
159
|
+
}, Dr = {
|
|
160
160
|
voiceV1: "https://api.eka.care/voice/api/v1",
|
|
161
161
|
voiceV2: "https://api.eka.care/voice/api/v2",
|
|
162
162
|
voiceV3: "https://api.eka.care/voice/api/v3",
|
|
@@ -164,10 +164,10 @@ const Dr = {
|
|
|
164
164
|
ekaHost: "https://api.eka.care",
|
|
165
165
|
parchiHost: "https://parchi.eka.care"
|
|
166
166
|
};
|
|
167
|
-
function
|
|
168
|
-
return e === "PROD" ?
|
|
167
|
+
function Ar(e) {
|
|
168
|
+
return e === "PROD" ? Dr : Cr;
|
|
169
169
|
}
|
|
170
|
-
class
|
|
170
|
+
class xr {
|
|
171
171
|
constructor() {
|
|
172
172
|
this.handlers = /* @__PURE__ */ new Map();
|
|
173
173
|
}
|
|
@@ -198,16 +198,16 @@ class Fr {
|
|
|
198
198
|
return !!n && n.size > 0;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
const m = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, E = globalThis,
|
|
201
|
+
const m = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, E = globalThis, G = "10.43.0";
|
|
202
202
|
function Ot() {
|
|
203
203
|
return Ct(E), E;
|
|
204
204
|
}
|
|
205
205
|
function Ct(e) {
|
|
206
206
|
const t = e.__SENTRY__ = e.__SENTRY__ || {};
|
|
207
|
-
return t.version = t.version ||
|
|
207
|
+
return t.version = t.version || G, t[G] = t[G] || {};
|
|
208
208
|
}
|
|
209
209
|
function nt(e, t, n = E) {
|
|
210
|
-
const r = n.__SENTRY__ = n.__SENTRY__ || {}, s = r[
|
|
210
|
+
const r = n.__SENTRY__ = n.__SENTRY__ || {}, s = r[G] = r[G] || {};
|
|
211
211
|
return s[e] || (s[e] = t());
|
|
212
212
|
}
|
|
213
213
|
const $r = [
|
|
@@ -218,13 +218,13 @@ const $r = [
|
|
|
218
218
|
"log",
|
|
219
219
|
"assert",
|
|
220
220
|
"trace"
|
|
221
|
-
],
|
|
221
|
+
], Fr = "Sentry Logger ", wt = {};
|
|
222
222
|
function rt(e) {
|
|
223
223
|
if (!("console" in E))
|
|
224
224
|
return e();
|
|
225
|
-
const t = E.console, n = {}, r = Object.keys(
|
|
225
|
+
const t = E.console, n = {}, r = Object.keys(wt);
|
|
226
226
|
r.forEach((s) => {
|
|
227
|
-
const o =
|
|
227
|
+
const o = wt[s];
|
|
228
228
|
n[s] = t[s], t[s] = o;
|
|
229
229
|
});
|
|
230
230
|
try {
|
|
@@ -235,47 +235,47 @@ function rt(e) {
|
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
+
function Mr() {
|
|
239
|
+
pe().enabled = !0;
|
|
240
|
+
}
|
|
238
241
|
function Pr() {
|
|
239
|
-
|
|
242
|
+
pe().enabled = !1;
|
|
240
243
|
}
|
|
241
|
-
function
|
|
242
|
-
|
|
244
|
+
function On() {
|
|
245
|
+
return pe().enabled;
|
|
243
246
|
}
|
|
244
|
-
function
|
|
245
|
-
|
|
247
|
+
function Ur(...e) {
|
|
248
|
+
fe("log", ...e);
|
|
246
249
|
}
|
|
247
250
|
function Lr(...e) {
|
|
248
|
-
|
|
251
|
+
fe("warn", ...e);
|
|
249
252
|
}
|
|
250
253
|
function Hr(...e) {
|
|
251
|
-
|
|
252
|
-
}
|
|
253
|
-
function Br(...e) {
|
|
254
|
-
pe("error", ...e);
|
|
254
|
+
fe("error", ...e);
|
|
255
255
|
}
|
|
256
|
-
function
|
|
257
|
-
m &&
|
|
258
|
-
E.console[e](`${
|
|
256
|
+
function fe(e, ...t) {
|
|
257
|
+
m && On() && rt(() => {
|
|
258
|
+
E.console[e](`${Fr}[${e}]:`, ...t);
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function pe() {
|
|
262
262
|
return m ? nt("loggerSettings", () => ({ enabled: !1 })) : { enabled: !1 };
|
|
263
263
|
}
|
|
264
264
|
const h = {
|
|
265
265
|
/** Enable logging. */
|
|
266
|
-
enable:
|
|
266
|
+
enable: Mr,
|
|
267
267
|
/** Disable logging. */
|
|
268
|
-
disable:
|
|
268
|
+
disable: Pr,
|
|
269
269
|
/** Check if logging is enabled. */
|
|
270
|
-
isEnabled:
|
|
270
|
+
isEnabled: On,
|
|
271
271
|
/** Log a message. */
|
|
272
|
-
log:
|
|
272
|
+
log: Ur,
|
|
273
273
|
/** Log a warning. */
|
|
274
|
-
warn:
|
|
274
|
+
warn: Lr,
|
|
275
275
|
/** Log an error. */
|
|
276
|
-
error:
|
|
277
|
-
},
|
|
278
|
-
function
|
|
276
|
+
error: Hr
|
|
277
|
+
}, Cn = 50, X = "?", Ce = /\(error: (.*)\)/, De = /captureMessage|captureException/;
|
|
278
|
+
function Dn(...e) {
|
|
279
279
|
const t = e.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
|
|
280
280
|
return (n, r = 0, s = 0) => {
|
|
281
281
|
const o = [], i = n.split(`
|
|
@@ -283,7 +283,7 @@ function An(...e) {
|
|
|
283
283
|
for (let a = r; a < i.length; a++) {
|
|
284
284
|
let c = i[a];
|
|
285
285
|
c.length > 1024 && (c = c.slice(0, 1024));
|
|
286
|
-
const u =
|
|
286
|
+
const u = Ce.test(c) ? c.replace(Ce, "$1") : c;
|
|
287
287
|
if (!u.match(/\S*Error: /)) {
|
|
288
288
|
for (const d of t) {
|
|
289
289
|
const l = d(u);
|
|
@@ -292,21 +292,21 @@ function An(...e) {
|
|
|
292
292
|
break;
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
|
-
if (o.length >=
|
|
295
|
+
if (o.length >= Cn + s)
|
|
296
296
|
break;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
return
|
|
299
|
+
return jr(o.slice(s));
|
|
300
300
|
};
|
|
301
301
|
}
|
|
302
|
-
function
|
|
303
|
-
return Array.isArray(e) ?
|
|
302
|
+
function Br(e) {
|
|
303
|
+
return Array.isArray(e) ? Dn(...e) : e;
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function jr(e) {
|
|
306
306
|
if (!e.length)
|
|
307
307
|
return [];
|
|
308
308
|
const t = Array.from(e);
|
|
309
|
-
return /sentryWrapped/.test(_t(t).function || "") && t.pop(), t.reverse(),
|
|
309
|
+
return /sentryWrapped/.test(_t(t).function || "") && t.pop(), t.reverse(), De.test(_t(t).function || "") && (t.pop(), De.test(_t(t).function || "") && t.pop()), t.slice(0, Cn).map((n) => ({
|
|
310
310
|
...n,
|
|
311
311
|
filename: n.filename || _t(t).filename,
|
|
312
312
|
function: n.function || X
|
|
@@ -316,14 +316,14 @@ function _t(e) {
|
|
|
316
316
|
return e[e.length - 1] || {};
|
|
317
317
|
}
|
|
318
318
|
const Ut = "<anonymous>";
|
|
319
|
-
function
|
|
319
|
+
function L(e) {
|
|
320
320
|
try {
|
|
321
321
|
return !e || typeof e != "function" ? Ut : e.name || Ut;
|
|
322
322
|
} catch {
|
|
323
323
|
return Ut;
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
function
|
|
326
|
+
function Ae(e) {
|
|
327
327
|
const t = e.exception;
|
|
328
328
|
if (t) {
|
|
329
329
|
const n = [];
|
|
@@ -336,16 +336,16 @@ function xe(e) {
|
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function An(e) {
|
|
340
340
|
return "__v_isVNode" in e && e.__v_isVNode ? "[VueVNode]" : "[VueViewModel]";
|
|
341
341
|
}
|
|
342
|
-
const St = {},
|
|
342
|
+
const St = {}, xe = {};
|
|
343
343
|
function K(e, t) {
|
|
344
344
|
St[e] = St[e] || [], St[e].push(t);
|
|
345
345
|
}
|
|
346
346
|
function Y(e, t) {
|
|
347
|
-
if (!
|
|
348
|
-
|
|
347
|
+
if (!xe[e]) {
|
|
348
|
+
xe[e] = !0;
|
|
349
349
|
try {
|
|
350
350
|
t();
|
|
351
351
|
} catch (n) {
|
|
@@ -363,7 +363,7 @@ function D(e, t) {
|
|
|
363
363
|
m && h.error(
|
|
364
364
|
`Error while triggering instrumentation handler.
|
|
365
365
|
Type: ${e}
|
|
366
|
-
Name: ${
|
|
366
|
+
Name: ${L(r)}
|
|
367
367
|
Error:`,
|
|
368
368
|
s
|
|
369
369
|
);
|
|
@@ -372,9 +372,9 @@ Error:`,
|
|
|
372
372
|
let Lt = null;
|
|
373
373
|
function Vr(e) {
|
|
374
374
|
const t = "error";
|
|
375
|
-
K(t, e), Y(t,
|
|
375
|
+
K(t, e), Y(t, zr);
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function zr() {
|
|
378
378
|
Lt = E.onerror, E.onerror = function(e, t, n, r, s) {
|
|
379
379
|
return D("error", {
|
|
380
380
|
column: r,
|
|
@@ -386,7 +386,7 @@ function Gr() {
|
|
|
386
386
|
}, E.onerror.__SENTRY_INSTRUMENTED__ = !0;
|
|
387
387
|
}
|
|
388
388
|
let Ht = null;
|
|
389
|
-
function
|
|
389
|
+
function Wr(e) {
|
|
390
390
|
const t = "unhandledrejection";
|
|
391
391
|
K(t, e), Y(t, qr);
|
|
392
392
|
}
|
|
@@ -395,20 +395,20 @@ function qr() {
|
|
|
395
395
|
return D("unhandledrejection", e), Ht ? Ht.apply(this, arguments) : !0;
|
|
396
396
|
}, E.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0;
|
|
397
397
|
}
|
|
398
|
-
const
|
|
398
|
+
const xn = Object.prototype.toString;
|
|
399
399
|
function Dt(e) {
|
|
400
|
-
switch (
|
|
400
|
+
switch (xn.call(e)) {
|
|
401
401
|
case "[object Error]":
|
|
402
402
|
case "[object Exception]":
|
|
403
403
|
case "[object DOMException]":
|
|
404
404
|
case "[object WebAssembly.Exception]":
|
|
405
405
|
return !0;
|
|
406
406
|
default:
|
|
407
|
-
return
|
|
407
|
+
return H(e, Error);
|
|
408
408
|
}
|
|
409
409
|
}
|
|
410
410
|
function st(e, t) {
|
|
411
|
-
return
|
|
411
|
+
return xn.call(e) === `[object ${t}]`;
|
|
412
412
|
}
|
|
413
413
|
function $n(e) {
|
|
414
414
|
return st(e, "ErrorEvent");
|
|
@@ -416,51 +416,51 @@ function $n(e) {
|
|
|
416
416
|
function $e(e) {
|
|
417
417
|
return st(e, "DOMError");
|
|
418
418
|
}
|
|
419
|
-
function
|
|
419
|
+
function Gr(e) {
|
|
420
420
|
return st(e, "DOMException");
|
|
421
421
|
}
|
|
422
422
|
function M(e) {
|
|
423
423
|
return st(e, "String");
|
|
424
424
|
}
|
|
425
|
-
function
|
|
425
|
+
function he(e) {
|
|
426
426
|
return typeof e == "object" && e !== null && "__sentry_template_string__" in e && "__sentry_template_values__" in e;
|
|
427
427
|
}
|
|
428
428
|
function At(e) {
|
|
429
|
-
return e === null ||
|
|
429
|
+
return e === null || he(e) || typeof e != "object" && typeof e != "function";
|
|
430
430
|
}
|
|
431
431
|
function ct(e) {
|
|
432
432
|
return st(e, "Object");
|
|
433
433
|
}
|
|
434
434
|
function xt(e) {
|
|
435
|
-
return typeof Event < "u" &&
|
|
435
|
+
return typeof Event < "u" && H(e, Event);
|
|
436
436
|
}
|
|
437
|
-
function
|
|
438
|
-
return typeof Element < "u" &&
|
|
437
|
+
function Xr(e) {
|
|
438
|
+
return typeof Element < "u" && H(e, Element);
|
|
439
439
|
}
|
|
440
|
-
function
|
|
440
|
+
function Kr(e) {
|
|
441
441
|
return st(e, "RegExp");
|
|
442
442
|
}
|
|
443
443
|
function lt(e) {
|
|
444
444
|
return !!(e?.then && typeof e.then == "function");
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function Yr(e) {
|
|
447
447
|
return ct(e) && "nativeEvent" in e && "preventDefault" in e && "stopPropagation" in e;
|
|
448
448
|
}
|
|
449
|
-
function
|
|
449
|
+
function H(e, t) {
|
|
450
450
|
try {
|
|
451
451
|
return e instanceof t;
|
|
452
452
|
} catch {
|
|
453
453
|
return !1;
|
|
454
454
|
}
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function Fn(e) {
|
|
457
457
|
return !!(typeof e == "object" && e !== null && (e.__isVue || e._isVue || e.__v_isVNode));
|
|
458
458
|
}
|
|
459
|
-
function
|
|
460
|
-
return typeof Request < "u" &&
|
|
459
|
+
function Mn(e) {
|
|
460
|
+
return typeof Request < "u" && H(e, Request);
|
|
461
461
|
}
|
|
462
|
-
const
|
|
463
|
-
function
|
|
462
|
+
const me = E, Jr = 80;
|
|
463
|
+
function Pn(e, t = {}) {
|
|
464
464
|
if (!e)
|
|
465
465
|
return "<unknown>";
|
|
466
466
|
try {
|
|
@@ -469,19 +469,19 @@ function Un(e, t = {}) {
|
|
|
469
469
|
let o = 0, i = 0;
|
|
470
470
|
const a = " > ", c = a.length;
|
|
471
471
|
let u;
|
|
472
|
-
const d = Array.isArray(t) ? t : t.keyAttrs, l = !Array.isArray(t) && t.maxStringLength ||
|
|
473
|
-
for (; n && o++ < r && (u =
|
|
472
|
+
const d = Array.isArray(t) ? t : t.keyAttrs, l = !Array.isArray(t) && t.maxStringLength || Jr;
|
|
473
|
+
for (; n && o++ < r && (u = Zr(n, d), !(u === "html" || o > 1 && i + s.length * c + u.length >= l)); )
|
|
474
474
|
s.push(u), i += u.length, n = n.parentNode;
|
|
475
475
|
return s.reverse().join(a);
|
|
476
476
|
} catch {
|
|
477
477
|
return "<unknown>";
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
|
-
function
|
|
480
|
+
function Zr(e, t) {
|
|
481
481
|
const n = e, r = [];
|
|
482
482
|
if (!n?.tagName)
|
|
483
483
|
return "";
|
|
484
|
-
if (
|
|
484
|
+
if (me.HTMLElement && n instanceof HTMLElement && n.dataset) {
|
|
485
485
|
if (n.dataset.sentryComponent)
|
|
486
486
|
return n.dataset.sentryComponent;
|
|
487
487
|
if (n.dataset.sentryElement)
|
|
@@ -509,15 +509,15 @@ function Qr(e, t) {
|
|
|
509
509
|
}
|
|
510
510
|
return r.join("");
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function _e() {
|
|
513
513
|
try {
|
|
514
|
-
return
|
|
514
|
+
return me.document.location.href;
|
|
515
515
|
} catch {
|
|
516
516
|
return "";
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
function
|
|
520
|
-
if (!
|
|
519
|
+
function Qr(e) {
|
|
520
|
+
if (!me.HTMLElement)
|
|
521
521
|
return null;
|
|
522
522
|
let t = e;
|
|
523
523
|
const n = 5;
|
|
@@ -534,21 +534,21 @@ function ts(e) {
|
|
|
534
534
|
}
|
|
535
535
|
return null;
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function k(e, t, n) {
|
|
538
538
|
if (!(t in e))
|
|
539
539
|
return;
|
|
540
540
|
const r = e[t];
|
|
541
541
|
if (typeof r != "function")
|
|
542
542
|
return;
|
|
543
543
|
const s = n(r);
|
|
544
|
-
typeof s == "function" &&
|
|
544
|
+
typeof s == "function" && Un(s, r);
|
|
545
545
|
try {
|
|
546
546
|
e[t] = s;
|
|
547
547
|
} catch {
|
|
548
548
|
m && h.log(`Failed to replace method "${t}" in object`, e);
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
function
|
|
551
|
+
function B(e, t, n) {
|
|
552
552
|
try {
|
|
553
553
|
Object.defineProperty(e, t, {
|
|
554
554
|
// enumerable: false, // the default, so we can save on bundle size by not explicitly setting it
|
|
@@ -560,43 +560,43 @@ function j(e, t, n) {
|
|
|
560
560
|
m && h.log(`Failed to add non-enumerable property "${t}" to object`, e);
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function Un(e, t) {
|
|
564
564
|
try {
|
|
565
565
|
const n = t.prototype || {};
|
|
566
|
-
e.prototype = t.prototype = n,
|
|
566
|
+
e.prototype = t.prototype = n, B(e, "__sentry_original__", t);
|
|
567
567
|
} catch {
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
function
|
|
570
|
+
function ge(e) {
|
|
571
571
|
return e.__sentry_original__;
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Ln(e) {
|
|
574
574
|
if (Dt(e))
|
|
575
575
|
return {
|
|
576
576
|
message: e.message,
|
|
577
577
|
name: e.name,
|
|
578
578
|
stack: e.stack,
|
|
579
|
-
...
|
|
579
|
+
...Me(e)
|
|
580
580
|
};
|
|
581
581
|
if (xt(e)) {
|
|
582
582
|
const t = {
|
|
583
583
|
type: e.type,
|
|
584
|
-
target:
|
|
585
|
-
currentTarget:
|
|
586
|
-
...
|
|
584
|
+
target: Fe(e.target),
|
|
585
|
+
currentTarget: Fe(e.currentTarget),
|
|
586
|
+
...Me(e)
|
|
587
587
|
};
|
|
588
|
-
return typeof CustomEvent < "u" &&
|
|
588
|
+
return typeof CustomEvent < "u" && H(e, CustomEvent) && (t.detail = e.detail), t;
|
|
589
589
|
} else
|
|
590
590
|
return e;
|
|
591
591
|
}
|
|
592
|
-
function
|
|
592
|
+
function Fe(e) {
|
|
593
593
|
try {
|
|
594
|
-
return
|
|
594
|
+
return Xr(e) ? Pn(e) : Object.prototype.toString.call(e);
|
|
595
595
|
} catch {
|
|
596
596
|
return "<unknown>";
|
|
597
597
|
}
|
|
598
598
|
}
|
|
599
|
-
function
|
|
599
|
+
function Me(e) {
|
|
600
600
|
if (typeof e == "object" && e !== null) {
|
|
601
601
|
const t = {};
|
|
602
602
|
for (const n in e)
|
|
@@ -605,34 +605,34 @@ function Pe(e) {
|
|
|
605
605
|
} else
|
|
606
606
|
return {};
|
|
607
607
|
}
|
|
608
|
-
function
|
|
609
|
-
const t = Object.keys(
|
|
608
|
+
function ts(e) {
|
|
609
|
+
const t = Object.keys(Ln(e));
|
|
610
610
|
return t.sort(), t[0] ? t.join(", ") : "[object has no keys]";
|
|
611
611
|
}
|
|
612
612
|
let J;
|
|
613
|
-
function
|
|
613
|
+
function $t(e) {
|
|
614
614
|
if (J !== void 0)
|
|
615
615
|
return J ? J(e) : e();
|
|
616
616
|
const t = Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"), n = E;
|
|
617
617
|
return t in n && typeof n[t] == "function" ? (J = n[t], J(e)) : (J = null, e());
|
|
618
618
|
}
|
|
619
|
-
function
|
|
620
|
-
return
|
|
619
|
+
function kt() {
|
|
620
|
+
return $t(() => Math.random());
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
return
|
|
622
|
+
function Ft() {
|
|
623
|
+
return $t(() => Date.now());
|
|
624
624
|
}
|
|
625
625
|
function Kt(e, t = 0) {
|
|
626
626
|
return typeof e != "string" || t === 0 || e.length <= t ? e : `${e.slice(0, t)}...`;
|
|
627
627
|
}
|
|
628
|
-
function
|
|
628
|
+
function Pe(e, t) {
|
|
629
629
|
if (!Array.isArray(e))
|
|
630
630
|
return "";
|
|
631
631
|
const n = [];
|
|
632
632
|
for (let r = 0; r < e.length; r++) {
|
|
633
633
|
const s = e[r];
|
|
634
634
|
try {
|
|
635
|
-
|
|
635
|
+
Fn(s) ? n.push(An(s)) : n.push(String(s));
|
|
636
636
|
} catch {
|
|
637
637
|
n.push("[value cannot be serialized]");
|
|
638
638
|
}
|
|
@@ -640,41 +640,41 @@ function Ue(e, t) {
|
|
|
640
640
|
return n.join(t);
|
|
641
641
|
}
|
|
642
642
|
function Tt(e, t, n = !1) {
|
|
643
|
-
return M(e) ?
|
|
643
|
+
return M(e) ? Kr(t) ? t.test(e) : M(t) ? n ? e === t : e.includes(t) : !1 : !1;
|
|
644
644
|
}
|
|
645
645
|
function Mt(e, t = [], n = !1) {
|
|
646
646
|
return t.some((r) => Tt(e, r, n));
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function es() {
|
|
649
649
|
const e = E;
|
|
650
650
|
return e.crypto || e.msCrypto;
|
|
651
651
|
}
|
|
652
652
|
let Bt;
|
|
653
|
-
function
|
|
654
|
-
return
|
|
653
|
+
function ns() {
|
|
654
|
+
return kt() * 16;
|
|
655
655
|
}
|
|
656
|
-
function O(e =
|
|
656
|
+
function O(e = es()) {
|
|
657
657
|
try {
|
|
658
658
|
if (e?.randomUUID)
|
|
659
|
-
return
|
|
659
|
+
return $t(() => e.randomUUID()).replace(/-/g, "");
|
|
660
660
|
} catch {
|
|
661
661
|
}
|
|
662
662
|
return Bt || (Bt = "10000000100040008000" + 1e11), Bt.replace(
|
|
663
663
|
/[018]/g,
|
|
664
664
|
(t) => (
|
|
665
665
|
// eslint-disable-next-line no-bitwise
|
|
666
|
-
(t ^ (
|
|
666
|
+
(t ^ (ns() & 15) >> t / 4).toString(16)
|
|
667
667
|
)
|
|
668
668
|
);
|
|
669
669
|
}
|
|
670
|
-
function
|
|
670
|
+
function Hn(e) {
|
|
671
671
|
return e.exception?.values?.[0];
|
|
672
672
|
}
|
|
673
|
-
function
|
|
673
|
+
function q(e) {
|
|
674
674
|
const { message: t, event_id: n } = e;
|
|
675
675
|
if (t)
|
|
676
676
|
return t;
|
|
677
|
-
const r =
|
|
677
|
+
const r = Hn(e);
|
|
678
678
|
return r ? r.type && r.value ? `${r.type}: ${r.value}` : r.type || r.value || n || "<unknown>" : n || "<unknown>";
|
|
679
679
|
}
|
|
680
680
|
function Yt(e, t, n) {
|
|
@@ -682,7 +682,7 @@ function Yt(e, t, n) {
|
|
|
682
682
|
o.value || (o.value = t || ""), o.type || (o.type = "Error");
|
|
683
683
|
}
|
|
684
684
|
function Z(e, t) {
|
|
685
|
-
const n =
|
|
685
|
+
const n = Hn(e);
|
|
686
686
|
if (!n)
|
|
687
687
|
return;
|
|
688
688
|
const r = { type: "generic", handled: !0 }, s = n.mechanism;
|
|
@@ -691,37 +691,37 @@ function Z(e, t) {
|
|
|
691
691
|
n.mechanism.data = o;
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
|
-
function
|
|
695
|
-
if (
|
|
694
|
+
function Ue(e) {
|
|
695
|
+
if (rs(e))
|
|
696
696
|
return !0;
|
|
697
697
|
try {
|
|
698
|
-
|
|
698
|
+
B(e, "__sentry_captured__", !0);
|
|
699
699
|
} catch {
|
|
700
700
|
}
|
|
701
701
|
return !1;
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function rs(e) {
|
|
704
704
|
try {
|
|
705
705
|
return e.__sentry_captured__;
|
|
706
706
|
} catch {
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
|
-
const
|
|
709
|
+
const Bn = 1e3;
|
|
710
710
|
function ft() {
|
|
711
|
-
return
|
|
711
|
+
return Ft() / Bn;
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function ss() {
|
|
714
714
|
const { performance: e } = E;
|
|
715
715
|
if (!e?.now || !e.timeOrigin)
|
|
716
716
|
return ft;
|
|
717
717
|
const t = e.timeOrigin;
|
|
718
|
-
return () => (t +
|
|
718
|
+
return () => (t + $t(() => e.now())) / Bn;
|
|
719
719
|
}
|
|
720
|
-
let
|
|
720
|
+
let Le;
|
|
721
721
|
function P() {
|
|
722
|
-
return (
|
|
722
|
+
return (Le ?? (Le = ss()))();
|
|
723
723
|
}
|
|
724
|
-
function
|
|
724
|
+
function os(e) {
|
|
725
725
|
const t = P(), n = {
|
|
726
726
|
sid: O(),
|
|
727
727
|
init: !0,
|
|
@@ -731,7 +731,7 @@ function is(e) {
|
|
|
731
731
|
status: "ok",
|
|
732
732
|
errors: 0,
|
|
733
733
|
ignoreDuration: !1,
|
|
734
|
-
toJSON: () =>
|
|
734
|
+
toJSON: () => as(n)
|
|
735
735
|
};
|
|
736
736
|
return e && Q(n, e), n;
|
|
737
737
|
}
|
|
@@ -746,11 +746,11 @@ function Q(e, t = {}) {
|
|
|
746
746
|
}
|
|
747
747
|
t.release && (e.release = t.release), t.environment && (e.environment = t.environment), !e.ipAddress && t.ipAddress && (e.ipAddress = t.ipAddress), !e.userAgent && t.userAgent && (e.userAgent = t.userAgent), typeof t.errors == "number" && (e.errors = t.errors), t.status && (e.status = t.status);
|
|
748
748
|
}
|
|
749
|
-
function
|
|
749
|
+
function is(e, t) {
|
|
750
750
|
let n = {};
|
|
751
751
|
e.status === "ok" && (n = { status: "exited" }), Q(e, n);
|
|
752
752
|
}
|
|
753
|
-
function
|
|
753
|
+
function as(e) {
|
|
754
754
|
return {
|
|
755
755
|
sid: `${e.sid}`,
|
|
756
756
|
init: e.init,
|
|
@@ -780,20 +780,20 @@ function pt(e, t, n = 2) {
|
|
|
780
780
|
Object.prototype.hasOwnProperty.call(t, s) && (r[s] = pt(r[s], t[s], n - 1));
|
|
781
781
|
return r;
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function He() {
|
|
784
784
|
return O();
|
|
785
785
|
}
|
|
786
|
-
function
|
|
786
|
+
function jn() {
|
|
787
787
|
return O().substring(16);
|
|
788
788
|
}
|
|
789
789
|
const Jt = "_sentrySpan";
|
|
790
|
-
function
|
|
791
|
-
t ?
|
|
790
|
+
function Be(e, t) {
|
|
791
|
+
t ? B(e, Jt, t) : delete e[Jt];
|
|
792
792
|
}
|
|
793
|
-
function
|
|
793
|
+
function je(e) {
|
|
794
794
|
return e[Jt];
|
|
795
795
|
}
|
|
796
|
-
const
|
|
796
|
+
const cs = 100;
|
|
797
797
|
class A {
|
|
798
798
|
/** Flag if notifying is happening. */
|
|
799
799
|
/** Callback for client to receive scope changes. */
|
|
@@ -825,8 +825,8 @@ class A {
|
|
|
825
825
|
// NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.
|
|
826
826
|
constructor() {
|
|
827
827
|
this._notifyingListeners = !1, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._attributes = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = {
|
|
828
|
-
traceId:
|
|
829
|
-
sampleRand:
|
|
828
|
+
traceId: He(),
|
|
829
|
+
sampleRand: kt()
|
|
830
830
|
};
|
|
831
831
|
}
|
|
832
832
|
/**
|
|
@@ -836,7 +836,7 @@ class A {
|
|
|
836
836
|
const t = new A();
|
|
837
837
|
return t._breadcrumbs = [...this._breadcrumbs], t._tags = { ...this._tags }, t._attributes = { ...this._attributes }, t._extra = { ...this._extra }, t._contexts = { ...this._contexts }, this._contexts.flags && (t._contexts.flags = {
|
|
838
838
|
values: [...this._contexts.flags.values]
|
|
839
|
-
}), t._user = this._user, t._level = this._level, t._session = this._session, t._transactionName = this._transactionName, t._fingerprint = this._fingerprint, t._eventProcessors = [...this._eventProcessors], t._attachments = [...this._attachments], t._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, t._propagationContext = { ...this._propagationContext }, t._client = this._client, t._lastEventId = this._lastEventId, t._conversationId = this._conversationId,
|
|
839
|
+
}), t._user = this._user, t._level = this._level, t._session = this._session, t._transactionName = this._transactionName, t._fingerprint = this._fingerprint, t._eventProcessors = [...this._eventProcessors], t._attachments = [...this._attachments], t._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, t._propagationContext = { ...this._propagationContext }, t._client = this._client, t._lastEventId = this._lastEventId, t._conversationId = this._conversationId, Be(t, je(this)), t;
|
|
840
840
|
}
|
|
841
841
|
/**
|
|
842
842
|
* Update the client assigned to this scope.
|
|
@@ -1074,9 +1074,9 @@ class A {
|
|
|
1074
1074
|
* Note: The client will not be cleared.
|
|
1075
1075
|
*/
|
|
1076
1076
|
clear() {
|
|
1077
|
-
return this._breadcrumbs = [], this._tags = {}, this._attributes = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._session = void 0, this._conversationId = void 0,
|
|
1078
|
-
traceId:
|
|
1079
|
-
sampleRand:
|
|
1077
|
+
return this._breadcrumbs = [], this._tags = {}, this._attributes = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._session = void 0, this._conversationId = void 0, Be(this, void 0), this._attachments = [], this.setPropagationContext({
|
|
1078
|
+
traceId: He(),
|
|
1079
|
+
sampleRand: kt()
|
|
1080
1080
|
}), this._notifyScopeListeners(), this;
|
|
1081
1081
|
}
|
|
1082
1082
|
/**
|
|
@@ -1084,7 +1084,7 @@ class A {
|
|
|
1084
1084
|
* By default, the last 100 breadcrumbs are kept.
|
|
1085
1085
|
*/
|
|
1086
1086
|
addBreadcrumb(t, n) {
|
|
1087
|
-
const r = typeof n == "number" ? n :
|
|
1087
|
+
const r = typeof n == "number" ? n : cs;
|
|
1088
1088
|
if (r <= 0)
|
|
1089
1089
|
return this;
|
|
1090
1090
|
const s = {
|
|
@@ -1137,7 +1137,7 @@ class A {
|
|
|
1137
1137
|
propagationContext: this._propagationContext,
|
|
1138
1138
|
sdkProcessingMetadata: this._sdkProcessingMetadata,
|
|
1139
1139
|
transactionName: this._transactionName,
|
|
1140
|
-
span:
|
|
1140
|
+
span: je(this),
|
|
1141
1141
|
conversationId: this._conversationId
|
|
1142
1142
|
};
|
|
1143
1143
|
}
|
|
@@ -1220,13 +1220,13 @@ class A {
|
|
|
1220
1220
|
}), this._notifyingListeners = !1);
|
|
1221
1221
|
}
|
|
1222
1222
|
}
|
|
1223
|
-
function
|
|
1223
|
+
function us() {
|
|
1224
1224
|
return nt("defaultCurrentScope", () => new A());
|
|
1225
1225
|
}
|
|
1226
|
-
function
|
|
1226
|
+
function ds() {
|
|
1227
1227
|
return nt("defaultIsolationScope", () => new A());
|
|
1228
1228
|
}
|
|
1229
|
-
class
|
|
1229
|
+
class ls {
|
|
1230
1230
|
constructor(t, n) {
|
|
1231
1231
|
let r;
|
|
1232
1232
|
t ? r = t : r = new A();
|
|
@@ -1294,45 +1294,45 @@ class fs {
|
|
|
1294
1294
|
}
|
|
1295
1295
|
function tt() {
|
|
1296
1296
|
const e = Ot(), t = Ct(e);
|
|
1297
|
-
return t.stack = t.stack || new
|
|
1297
|
+
return t.stack = t.stack || new ls(us(), ds());
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1299
|
+
function fs(e) {
|
|
1300
1300
|
return tt().withScope(e);
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1302
|
+
function ps(e, t) {
|
|
1303
1303
|
const n = tt();
|
|
1304
1304
|
return n.withScope(() => (n.getStackTop().scope = e, t(e)));
|
|
1305
1305
|
}
|
|
1306
1306
|
function Ve(e) {
|
|
1307
1307
|
return tt().withScope(() => e(tt().getIsolationScope()));
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1309
|
+
function hs() {
|
|
1310
1310
|
return {
|
|
1311
1311
|
withIsolationScope: Ve,
|
|
1312
|
-
withScope:
|
|
1313
|
-
withSetScope:
|
|
1312
|
+
withScope: fs,
|
|
1313
|
+
withSetScope: ps,
|
|
1314
1314
|
withSetIsolationScope: (e, t) => Ve(t),
|
|
1315
1315
|
getCurrentScope: () => tt().getScope(),
|
|
1316
1316
|
getIsolationScope: () => tt().getIsolationScope()
|
|
1317
1317
|
};
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function ye(e) {
|
|
1320
1320
|
const t = Ct(e);
|
|
1321
|
-
return t.acs ? t.acs :
|
|
1321
|
+
return t.acs ? t.acs : hs();
|
|
1322
1322
|
}
|
|
1323
1323
|
function x() {
|
|
1324
1324
|
const e = Ot();
|
|
1325
|
-
return
|
|
1325
|
+
return ye(e).getCurrentScope();
|
|
1326
1326
|
}
|
|
1327
1327
|
function V() {
|
|
1328
1328
|
const e = Ot();
|
|
1329
|
-
return
|
|
1329
|
+
return ye(e).getIsolationScope();
|
|
1330
1330
|
}
|
|
1331
|
-
function
|
|
1331
|
+
function ms() {
|
|
1332
1332
|
return nt("globalScope", () => new A());
|
|
1333
1333
|
}
|
|
1334
|
-
function
|
|
1335
|
-
const t = Ot(), n =
|
|
1334
|
+
function _s(...e) {
|
|
1335
|
+
const t = Ot(), n = ye(t);
|
|
1336
1336
|
if (e.length === 2) {
|
|
1337
1337
|
const [r, s] = e;
|
|
1338
1338
|
return r ? n.withSetScope(r, s) : n.withScope(s);
|
|
@@ -1342,15 +1342,15 @@ function gs(...e) {
|
|
|
1342
1342
|
function I() {
|
|
1343
1343
|
return x().getClient();
|
|
1344
1344
|
}
|
|
1345
|
-
function
|
|
1345
|
+
function gs(e) {
|
|
1346
1346
|
const t = e.getPropagationContext(), { traceId: n, parentSpanId: r, propagationSpanId: s } = t, o = {
|
|
1347
1347
|
trace_id: n,
|
|
1348
|
-
span_id: s ||
|
|
1348
|
+
span_id: s || jn()
|
|
1349
1349
|
};
|
|
1350
1350
|
return r && (o.parent_span_id = r), o;
|
|
1351
1351
|
}
|
|
1352
|
-
const
|
|
1353
|
-
function
|
|
1352
|
+
const ys = "sentry.source", Es = "sentry.sample_rate", Ss = "sentry.previous_trace_sample_rate", Ts = "sentry.op", Rs = "sentry.origin", Vn = "sentry.profile_id", zn = "sentry.exclusive_time", bs = "gen_ai.conversation.id", Is = 0, vs = 1, ws = "_sentryScope", ks = "_sentryIsolationScope";
|
|
1353
|
+
function Ns(e) {
|
|
1354
1354
|
if (e) {
|
|
1355
1355
|
if (typeof e == "object" && "deref" in e && typeof e.deref == "function")
|
|
1356
1356
|
try {
|
|
@@ -1361,21 +1361,21 @@ function Os(e) {
|
|
|
1361
1361
|
return e;
|
|
1362
1362
|
}
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1364
|
+
function Wn(e) {
|
|
1365
1365
|
const t = e;
|
|
1366
1366
|
return {
|
|
1367
1367
|
scope: t[ws],
|
|
1368
|
-
isolationScope:
|
|
1368
|
+
isolationScope: Ns(t[ks])
|
|
1369
1369
|
};
|
|
1370
1370
|
}
|
|
1371
|
-
const
|
|
1372
|
-
function
|
|
1373
|
-
const t =
|
|
1371
|
+
const Os = "sentry-", Cs = /^sentry-/;
|
|
1372
|
+
function Ds(e) {
|
|
1373
|
+
const t = As(e);
|
|
1374
1374
|
if (!t)
|
|
1375
1375
|
return;
|
|
1376
1376
|
const n = Object.entries(t).reduce((r, [s, o]) => {
|
|
1377
|
-
if (s.match(
|
|
1378
|
-
const i = s.slice(
|
|
1377
|
+
if (s.match(Cs)) {
|
|
1378
|
+
const i = s.slice(Os.length);
|
|
1379
1379
|
r[i] = o;
|
|
1380
1380
|
}
|
|
1381
1381
|
return r;
|
|
@@ -1383,16 +1383,16 @@ function As(e) {
|
|
|
1383
1383
|
if (Object.keys(n).length > 0)
|
|
1384
1384
|
return n;
|
|
1385
1385
|
}
|
|
1386
|
-
function
|
|
1386
|
+
function As(e) {
|
|
1387
1387
|
if (!(!e || !M(e) && !Array.isArray(e)))
|
|
1388
1388
|
return Array.isArray(e) ? e.reduce((t, n) => {
|
|
1389
|
-
const r =
|
|
1389
|
+
const r = ze(n);
|
|
1390
1390
|
return Object.entries(r).forEach(([s, o]) => {
|
|
1391
1391
|
t[s] = o;
|
|
1392
1392
|
}), t;
|
|
1393
|
-
}, {}) :
|
|
1393
|
+
}, {}) : ze(e);
|
|
1394
1394
|
}
|
|
1395
|
-
function
|
|
1395
|
+
function ze(e) {
|
|
1396
1396
|
return e.split(",").map((t) => {
|
|
1397
1397
|
const n = t.indexOf("=");
|
|
1398
1398
|
if (n === -1)
|
|
@@ -1407,15 +1407,15 @@ function Ge(e) {
|
|
|
1407
1407
|
});
|
|
1408
1408
|
}).reduce((t, [n, r]) => (n && r && (t[n] = r), t), {});
|
|
1409
1409
|
}
|
|
1410
|
-
const
|
|
1411
|
-
function
|
|
1410
|
+
const xs = /^o(\d+)\./, $s = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)((?:\[[:.%\w]+\]|[\w.-]+))(?::(\d+))?\/(.+)/;
|
|
1411
|
+
function Fs(e) {
|
|
1412
1412
|
return e === "http" || e === "https";
|
|
1413
1413
|
}
|
|
1414
1414
|
function ht(e, t = !1) {
|
|
1415
1415
|
const { host: n, path: r, pass: s, port: o, projectId: i, protocol: a, publicKey: c } = e;
|
|
1416
1416
|
return `${a}://${c}${t && s ? `:${s}` : ""}@${n}${o ? `:${o}` : ""}/${r && `${r}/`}${i}`;
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function Ms(e) {
|
|
1419
1419
|
const t = $s.exec(e);
|
|
1420
1420
|
if (!t) {
|
|
1421
1421
|
rt(() => {
|
|
@@ -1443,36 +1443,36 @@ function qn(e) {
|
|
|
1443
1443
|
projectId: e.projectId
|
|
1444
1444
|
};
|
|
1445
1445
|
}
|
|
1446
|
-
function
|
|
1446
|
+
function Ps(e) {
|
|
1447
1447
|
if (!m)
|
|
1448
1448
|
return !0;
|
|
1449
1449
|
const { port: t, projectId: n, protocol: r } = e;
|
|
1450
|
-
return ["protocol", "publicKey", "host", "projectId"].find((i) => e[i] ? !1 : (h.error(`Invalid Sentry Dsn: ${i} missing`), !0)) ? !1 : n.match(/^\d+$/) ?
|
|
1450
|
+
return ["protocol", "publicKey", "host", "projectId"].find((i) => e[i] ? !1 : (h.error(`Invalid Sentry Dsn: ${i} missing`), !0)) ? !1 : n.match(/^\d+$/) ? Fs(r) ? t && isNaN(parseInt(t, 10)) ? (h.error(`Invalid Sentry Dsn: Invalid port ${t}`), !1) : !0 : (h.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), !1) : (h.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), !1);
|
|
1451
1451
|
}
|
|
1452
|
-
function
|
|
1453
|
-
return e.match(
|
|
1452
|
+
function Us(e) {
|
|
1453
|
+
return e.match(xs)?.[1];
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1455
|
+
function Ls(e) {
|
|
1456
1456
|
const t = e.getOptions(), { host: n } = e.getDsn() || {};
|
|
1457
1457
|
let r;
|
|
1458
|
-
return t.orgId ? r = String(t.orgId) : n && (r =
|
|
1458
|
+
return t.orgId ? r = String(t.orgId) : n && (r = Us(n)), r;
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1461
|
-
const t = typeof e == "string" ?
|
|
1462
|
-
if (!(!t || !
|
|
1460
|
+
function Hs(e) {
|
|
1461
|
+
const t = typeof e == "string" ? Ms(e) : qn(e);
|
|
1462
|
+
if (!(!t || !Ps(t)))
|
|
1463
1463
|
return t;
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1465
|
+
function Bs(e) {
|
|
1466
1466
|
if (typeof e == "boolean")
|
|
1467
1467
|
return Number(e);
|
|
1468
1468
|
const t = typeof e == "string" ? parseFloat(e) : e;
|
|
1469
1469
|
if (!(typeof t != "number" || isNaN(t) || t < 0 || t > 1))
|
|
1470
1470
|
return t;
|
|
1471
1471
|
}
|
|
1472
|
-
const
|
|
1473
|
-
let
|
|
1474
|
-
function
|
|
1475
|
-
const { spanId: t, traceId: n, isRemote: r } = e.spanContext(), s = r ? t :
|
|
1472
|
+
const Gn = 1;
|
|
1473
|
+
let We = !1;
|
|
1474
|
+
function js(e) {
|
|
1475
|
+
const { spanId: t, traceId: n, isRemote: r } = e.spanContext(), s = r ? t : Ee(e).parent_span_id, o = Wn(e).scope, i = r ? o?.getPropagationContext().propagationSpanId || jn() : t;
|
|
1476
1476
|
return {
|
|
1477
1477
|
parent_span_id: s,
|
|
1478
1478
|
span_id: i,
|
|
@@ -1484,22 +1484,22 @@ function Vs(e) {
|
|
|
1484
1484
|
return e.map(({ context: { spanId: t, traceId: n, traceFlags: r, ...s }, attributes: o }) => ({
|
|
1485
1485
|
span_id: t,
|
|
1486
1486
|
trace_id: n,
|
|
1487
|
-
sampled: r ===
|
|
1487
|
+
sampled: r === Gn,
|
|
1488
1488
|
attributes: o,
|
|
1489
1489
|
...s
|
|
1490
1490
|
}));
|
|
1491
1491
|
}
|
|
1492
1492
|
function qe(e) {
|
|
1493
|
-
return typeof e == "number" ?
|
|
1493
|
+
return typeof e == "number" ? Ge(e) : Array.isArray(e) ? e[0] + e[1] / 1e9 : e instanceof Date ? Ge(e.getTime()) : P();
|
|
1494
1494
|
}
|
|
1495
|
-
function
|
|
1495
|
+
function Ge(e) {
|
|
1496
1496
|
return e > 9999999999 ? e / 1e3 : e;
|
|
1497
1497
|
}
|
|
1498
|
-
function
|
|
1499
|
-
if (
|
|
1498
|
+
function Ee(e) {
|
|
1499
|
+
if (Ws(e))
|
|
1500
1500
|
return e.getSpanJSON();
|
|
1501
1501
|
const { spanId: t, traceId: n } = e.spanContext();
|
|
1502
|
-
if (
|
|
1502
|
+
if (zs(e)) {
|
|
1503
1503
|
const { attributes: r, startTime: s, name: o, endTime: i, status: a, links: c } = e, u = "parentSpanId" in e ? e.parentSpanId : "parentSpanContext" in e ? e.parentSpanContext?.spanId : void 0;
|
|
1504
1504
|
return {
|
|
1505
1505
|
span_id: t,
|
|
@@ -1510,9 +1510,9 @@ function Se(e) {
|
|
|
1510
1510
|
start_timestamp: qe(s),
|
|
1511
1511
|
// This is [0,0] by default in OTEL, in which case we want to interpret this as no end time
|
|
1512
1512
|
timestamp: qe(i) || void 0,
|
|
1513
|
-
status:
|
|
1514
|
-
op: r[
|
|
1515
|
-
origin: r[
|
|
1513
|
+
status: Gs(a),
|
|
1514
|
+
op: r[Ts],
|
|
1515
|
+
origin: r[Rs],
|
|
1516
1516
|
links: Vs(c)
|
|
1517
1517
|
};
|
|
1518
1518
|
}
|
|
@@ -1523,120 +1523,120 @@ function Se(e) {
|
|
|
1523
1523
|
data: {}
|
|
1524
1524
|
};
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1526
|
+
function zs(e) {
|
|
1527
1527
|
const t = e;
|
|
1528
1528
|
return !!t.attributes && !!t.startTime && !!t.name && !!t.endTime && !!t.status;
|
|
1529
1529
|
}
|
|
1530
|
-
function
|
|
1530
|
+
function Ws(e) {
|
|
1531
1531
|
return typeof e.getSpanJSON == "function";
|
|
1532
1532
|
}
|
|
1533
1533
|
function qs(e) {
|
|
1534
1534
|
const { traceFlags: t } = e.spanContext();
|
|
1535
|
-
return t ===
|
|
1535
|
+
return t === Gn;
|
|
1536
1536
|
}
|
|
1537
|
-
function
|
|
1538
|
-
if (!(!e || e.code ===
|
|
1539
|
-
return e.code ===
|
|
1537
|
+
function Gs(e) {
|
|
1538
|
+
if (!(!e || e.code === Is))
|
|
1539
|
+
return e.code === vs ? "ok" : e.message || "internal_error";
|
|
1540
1540
|
}
|
|
1541
|
-
const
|
|
1542
|
-
function
|
|
1543
|
-
return e[
|
|
1541
|
+
const Xs = "_sentryRootSpan";
|
|
1542
|
+
function Xn(e) {
|
|
1543
|
+
return e[Xs] || e;
|
|
1544
1544
|
}
|
|
1545
|
-
function
|
|
1546
|
-
|
|
1545
|
+
function Xe() {
|
|
1546
|
+
We || (rt(() => {
|
|
1547
1547
|
console.warn(
|
|
1548
1548
|
"[Sentry] Returning null from `beforeSendSpan` is disallowed. To drop certain spans, configure the respective integrations directly or use `ignoreSpans`."
|
|
1549
1549
|
);
|
|
1550
|
-
}),
|
|
1550
|
+
}), We = !0);
|
|
1551
1551
|
}
|
|
1552
|
-
function
|
|
1552
|
+
function Ks(e) {
|
|
1553
1553
|
if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__)
|
|
1554
1554
|
return !1;
|
|
1555
1555
|
const t = I()?.getOptions();
|
|
1556
1556
|
return !!t && // Note: This check is `!= null`, meaning "nullish". `0` is not "nullish", `undefined` and `null` are. (This comment was brought to you by 15 minutes of questioning life)
|
|
1557
1557
|
(t.tracesSampleRate != null || !!t.tracesSampler);
|
|
1558
1558
|
}
|
|
1559
|
-
function
|
|
1559
|
+
function Ke(e) {
|
|
1560
1560
|
h.log(`Ignoring span ${e.op} - ${e.description} because it matches \`ignoreSpans\`.`);
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1562
|
+
function Ye(e, t) {
|
|
1563
1563
|
if (!t?.length || !e.description)
|
|
1564
1564
|
return !1;
|
|
1565
1565
|
for (const n of t) {
|
|
1566
|
-
if (
|
|
1566
|
+
if (Js(n)) {
|
|
1567
1567
|
if (Tt(e.description, n))
|
|
1568
|
-
return m &&
|
|
1568
|
+
return m && Ke(e), !0;
|
|
1569
1569
|
continue;
|
|
1570
1570
|
}
|
|
1571
1571
|
if (!n.name && !n.op)
|
|
1572
1572
|
continue;
|
|
1573
1573
|
const r = n.name ? Tt(e.description, n.name) : !0, s = n.op ? e.op && Tt(e.op, n.op) : !0;
|
|
1574
1574
|
if (r && s)
|
|
1575
|
-
return m &&
|
|
1575
|
+
return m && Ke(e), !0;
|
|
1576
1576
|
}
|
|
1577
1577
|
return !1;
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function Ys(e, t) {
|
|
1580
1580
|
const n = t.parent_span_id, r = t.span_id;
|
|
1581
1581
|
if (n)
|
|
1582
1582
|
for (const s of e)
|
|
1583
1583
|
s.parent_span_id === r && (s.parent_span_id = n);
|
|
1584
1584
|
}
|
|
1585
|
-
function
|
|
1585
|
+
function Js(e) {
|
|
1586
1586
|
return typeof e == "string" || e instanceof RegExp;
|
|
1587
1587
|
}
|
|
1588
|
-
const
|
|
1589
|
-
function
|
|
1588
|
+
const Se = "production", Zs = "_frozenDsc";
|
|
1589
|
+
function Kn(e, t) {
|
|
1590
1590
|
const n = t.getOptions(), { publicKey: r } = t.getDsn() || {}, s = {
|
|
1591
|
-
environment: n.environment ||
|
|
1591
|
+
environment: n.environment || Se,
|
|
1592
1592
|
release: n.release,
|
|
1593
1593
|
public_key: r,
|
|
1594
1594
|
trace_id: e,
|
|
1595
|
-
org_id:
|
|
1595
|
+
org_id: Ls(t)
|
|
1596
1596
|
};
|
|
1597
1597
|
return t.emit("createDsc", s), s;
|
|
1598
1598
|
}
|
|
1599
|
-
function
|
|
1599
|
+
function Qs(e, t) {
|
|
1600
1600
|
const n = t.getPropagationContext();
|
|
1601
|
-
return n.dsc ||
|
|
1601
|
+
return n.dsc || Kn(n.traceId, e);
|
|
1602
1602
|
}
|
|
1603
|
-
function
|
|
1603
|
+
function to(e) {
|
|
1604
1604
|
const t = I();
|
|
1605
1605
|
if (!t)
|
|
1606
1606
|
return {};
|
|
1607
|
-
const n =
|
|
1607
|
+
const n = Xn(e), r = Ee(n), s = r.data, o = n.spanContext().traceState, i = o?.get("sentry.sample_rate") ?? s[Es] ?? s[Ss];
|
|
1608
1608
|
function a(S) {
|
|
1609
1609
|
return (typeof i == "number" || typeof i == "string") && (S.sample_rate = `${i}`), S;
|
|
1610
1610
|
}
|
|
1611
|
-
const c = n[
|
|
1611
|
+
const c = n[Zs];
|
|
1612
1612
|
if (c)
|
|
1613
1613
|
return a(c);
|
|
1614
|
-
const u = o?.get("sentry.dsc"), d = u &&
|
|
1614
|
+
const u = o?.get("sentry.dsc"), d = u && Ds(u);
|
|
1615
1615
|
if (d)
|
|
1616
1616
|
return a(d);
|
|
1617
|
-
const l =
|
|
1618
|
-
return p !== "url" && f && (l.transaction = f),
|
|
1617
|
+
const l = Kn(e.spanContext().traceId, t), p = s[ys], f = r.description;
|
|
1618
|
+
return p !== "url" && f && (l.transaction = f), Ks() && (l.sampled = String(qs(n)), l.sample_rand = // In OTEL we store the sample rand on the trace state because we cannot access scopes for NonRecordingSpans
|
|
1619
1619
|
// The Sentry OTEL SpanSampler takes care of writing the sample rand on the root span
|
|
1620
1620
|
o?.get("sentry.sample_rand") ?? // On all other platforms we can actually get the scopes from a root span (we use this as a fallback)
|
|
1621
|
-
|
|
1621
|
+
Wn(n).scope?.getPropagationContext().sampleRand.toString()), a(l), t.emit("createDsc", l, n), l;
|
|
1622
1622
|
}
|
|
1623
|
-
function
|
|
1623
|
+
function $(e, t = 100, n = 1 / 0) {
|
|
1624
1624
|
try {
|
|
1625
1625
|
return Zt("", e, t, n);
|
|
1626
1626
|
} catch (r) {
|
|
1627
1627
|
return { ERROR: `**non-serializable** (${r})` };
|
|
1628
1628
|
}
|
|
1629
1629
|
}
|
|
1630
|
-
function
|
|
1631
|
-
const r =
|
|
1632
|
-
return
|
|
1630
|
+
function Yn(e, t = 3, n = 100 * 1024) {
|
|
1631
|
+
const r = $(e, t);
|
|
1632
|
+
return so(r) > n ? Yn(e, t - 1, n) : r;
|
|
1633
1633
|
}
|
|
1634
|
-
function Zt(e, t, n = 1 / 0, r = 1 / 0, s =
|
|
1634
|
+
function Zt(e, t, n = 1 / 0, r = 1 / 0, s = oo()) {
|
|
1635
1635
|
const [o, i] = s;
|
|
1636
1636
|
if (t == null || // this matches null and undefined -> eqeq not eqeqeq
|
|
1637
1637
|
["boolean", "string"].includes(typeof t) || typeof t == "number" && Number.isFinite(t))
|
|
1638
1638
|
return t;
|
|
1639
|
-
const a =
|
|
1639
|
+
const a = eo(e, t);
|
|
1640
1640
|
if (!a.startsWith("[object "))
|
|
1641
1641
|
return a;
|
|
1642
1642
|
if (t.__sentry_skip_normalization__)
|
|
@@ -1655,7 +1655,7 @@ function Zt(e, t, n = 1 / 0, r = 1 / 0, s = io()) {
|
|
|
1655
1655
|
}
|
|
1656
1656
|
const d = Array.isArray(t) ? [] : {};
|
|
1657
1657
|
let l = 0;
|
|
1658
|
-
const p =
|
|
1658
|
+
const p = Ln(t);
|
|
1659
1659
|
for (const f in p) {
|
|
1660
1660
|
if (!Object.prototype.hasOwnProperty.call(p, f))
|
|
1661
1661
|
continue;
|
|
@@ -1668,7 +1668,7 @@ function Zt(e, t, n = 1 / 0, r = 1 / 0, s = io()) {
|
|
|
1668
1668
|
}
|
|
1669
1669
|
return i(t), d;
|
|
1670
1670
|
}
|
|
1671
|
-
function
|
|
1671
|
+
function eo(e, t) {
|
|
1672
1672
|
try {
|
|
1673
1673
|
if (e === "domain" && t && typeof t == "object" && t._events)
|
|
1674
1674
|
return "[Domain]";
|
|
@@ -1680,35 +1680,35 @@ function no(e, t) {
|
|
|
1680
1680
|
return "[Window]";
|
|
1681
1681
|
if (typeof document < "u" && t === document)
|
|
1682
1682
|
return "[Document]";
|
|
1683
|
-
if (
|
|
1684
|
-
return
|
|
1685
|
-
if (
|
|
1683
|
+
if (Fn(t))
|
|
1684
|
+
return An(t);
|
|
1685
|
+
if (Yr(t))
|
|
1686
1686
|
return "[SyntheticEvent]";
|
|
1687
1687
|
if (typeof t == "number" && !Number.isFinite(t))
|
|
1688
1688
|
return `[${t}]`;
|
|
1689
1689
|
if (typeof t == "function")
|
|
1690
|
-
return `[Function: ${
|
|
1690
|
+
return `[Function: ${L(t)}]`;
|
|
1691
1691
|
if (typeof t == "symbol")
|
|
1692
1692
|
return `[${String(t)}]`;
|
|
1693
1693
|
if (typeof t == "bigint")
|
|
1694
1694
|
return `[BigInt: ${String(t)}]`;
|
|
1695
|
-
const n =
|
|
1695
|
+
const n = no(t);
|
|
1696
1696
|
return /^HTML(\w*)Element$/.test(n) ? `[HTMLElement: ${n}]` : `[object ${n}]`;
|
|
1697
1697
|
} catch (n) {
|
|
1698
1698
|
return `**non-serializable** (${n})`;
|
|
1699
1699
|
}
|
|
1700
1700
|
}
|
|
1701
|
-
function
|
|
1701
|
+
function no(e) {
|
|
1702
1702
|
const t = Object.getPrototypeOf(e);
|
|
1703
1703
|
return t?.constructor ? t.constructor.name : "null prototype";
|
|
1704
1704
|
}
|
|
1705
|
-
function
|
|
1705
|
+
function ro(e) {
|
|
1706
1706
|
return ~-encodeURI(e).split(/%..|./).length;
|
|
1707
1707
|
}
|
|
1708
|
-
function
|
|
1709
|
-
return
|
|
1708
|
+
function so(e) {
|
|
1709
|
+
return ro(JSON.stringify(e));
|
|
1710
1710
|
}
|
|
1711
|
-
function
|
|
1711
|
+
function oo() {
|
|
1712
1712
|
const e = /* @__PURE__ */ new WeakSet();
|
|
1713
1713
|
function t(r) {
|
|
1714
1714
|
return e.has(r) ? !0 : (e.add(r), !1);
|
|
@@ -1721,7 +1721,7 @@ function io() {
|
|
|
1721
1721
|
function ot(e, t = []) {
|
|
1722
1722
|
return [e, t];
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1724
|
+
function io(e, t) {
|
|
1725
1725
|
const [n, r] = e;
|
|
1726
1726
|
return [n, [...r, t]];
|
|
1727
1727
|
}
|
|
@@ -1734,14 +1734,14 @@ function Qt(e, t) {
|
|
|
1734
1734
|
}
|
|
1735
1735
|
return !1;
|
|
1736
1736
|
}
|
|
1737
|
-
function
|
|
1737
|
+
function ao(e, t) {
|
|
1738
1738
|
return Qt(e, (n, r) => t.includes(r));
|
|
1739
1739
|
}
|
|
1740
1740
|
function te(e) {
|
|
1741
1741
|
const t = Ct(E);
|
|
1742
1742
|
return t.encodePolyfill ? t.encodePolyfill(e) : new TextEncoder().encode(e);
|
|
1743
1743
|
}
|
|
1744
|
-
function
|
|
1744
|
+
function co(e) {
|
|
1745
1745
|
const [t, n] = e;
|
|
1746
1746
|
let r = JSON.stringify(t);
|
|
1747
1747
|
function s(o) {
|
|
@@ -1758,21 +1758,21 @@ ${JSON.stringify(i)}
|
|
|
1758
1758
|
try {
|
|
1759
1759
|
c = JSON.stringify(a);
|
|
1760
1760
|
} catch {
|
|
1761
|
-
c = JSON.stringify(
|
|
1761
|
+
c = JSON.stringify($(a));
|
|
1762
1762
|
}
|
|
1763
1763
|
s(c);
|
|
1764
1764
|
}
|
|
1765
1765
|
}
|
|
1766
|
-
return typeof r == "string" ? r :
|
|
1766
|
+
return typeof r == "string" ? r : uo(r);
|
|
1767
1767
|
}
|
|
1768
|
-
function
|
|
1768
|
+
function uo(e) {
|
|
1769
1769
|
const t = e.reduce((s, o) => s + o.length, 0), n = new Uint8Array(t);
|
|
1770
1770
|
let r = 0;
|
|
1771
1771
|
for (const s of e)
|
|
1772
1772
|
n.set(s, r), r += s.length;
|
|
1773
1773
|
return n;
|
|
1774
1774
|
}
|
|
1775
|
-
function
|
|
1775
|
+
function lo(e) {
|
|
1776
1776
|
const t = typeof e.data == "string" ? te(e.data) : e.data;
|
|
1777
1777
|
return [
|
|
1778
1778
|
{
|
|
@@ -1785,7 +1785,7 @@ function fo(e) {
|
|
|
1785
1785
|
t
|
|
1786
1786
|
];
|
|
1787
1787
|
}
|
|
1788
|
-
const
|
|
1788
|
+
const fo = {
|
|
1789
1789
|
session: "session",
|
|
1790
1790
|
sessions: "session",
|
|
1791
1791
|
attachment: "attachment",
|
|
@@ -1805,16 +1805,16 @@ const po = {
|
|
|
1805
1805
|
metric: "metric",
|
|
1806
1806
|
trace_metric: "metric"
|
|
1807
1807
|
};
|
|
1808
|
-
function
|
|
1809
|
-
return
|
|
1808
|
+
function Je(e) {
|
|
1809
|
+
return fo[e];
|
|
1810
1810
|
}
|
|
1811
|
-
function
|
|
1811
|
+
function Jn(e) {
|
|
1812
1812
|
if (!e?.sdk)
|
|
1813
1813
|
return;
|
|
1814
1814
|
const { name: t, version: n } = e.sdk;
|
|
1815
1815
|
return { name: t, version: n };
|
|
1816
1816
|
}
|
|
1817
|
-
function
|
|
1817
|
+
function po(e, t, n, r) {
|
|
1818
1818
|
const s = e.sdkProcessingMetadata?.dynamicSamplingContext;
|
|
1819
1819
|
return {
|
|
1820
1820
|
event_id: e.event_id,
|
|
@@ -1826,7 +1826,7 @@ function ho(e, t, n, r) {
|
|
|
1826
1826
|
}
|
|
1827
1827
|
};
|
|
1828
1828
|
}
|
|
1829
|
-
function
|
|
1829
|
+
function ho(e, t) {
|
|
1830
1830
|
if (!t)
|
|
1831
1831
|
return e;
|
|
1832
1832
|
const n = e.sdk || {};
|
|
@@ -1842,27 +1842,27 @@ function mo(e, t) {
|
|
|
1842
1842
|
} : void 0
|
|
1843
1843
|
}, e;
|
|
1844
1844
|
}
|
|
1845
|
-
function
|
|
1846
|
-
const s =
|
|
1845
|
+
function mo(e, t, n, r) {
|
|
1846
|
+
const s = Jn(n), o = {
|
|
1847
1847
|
sent_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1848
1848
|
...s && { sdk: s },
|
|
1849
1849
|
...!!r && t && { dsn: ht(t) }
|
|
1850
1850
|
}, i = "aggregates" in e ? [{ type: "sessions" }, e] : [{ type: "session" }, e.toJSON()];
|
|
1851
1851
|
return ot(o, [i]);
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1854
|
-
const s =
|
|
1855
|
-
|
|
1856
|
-
const i =
|
|
1853
|
+
function _o(e, t, n, r) {
|
|
1854
|
+
const s = Jn(n), o = e.type && e.type !== "replay_event" ? e.type : "event";
|
|
1855
|
+
ho(e, n?.sdk);
|
|
1856
|
+
const i = po(e, s, r, t);
|
|
1857
1857
|
return delete e.sdkProcessingMetadata, ot(i, [[{ type: o }, e]]);
|
|
1858
1858
|
}
|
|
1859
|
-
const jt = 0,
|
|
1859
|
+
const jt = 0, Ze = 1, Qe = 2;
|
|
1860
1860
|
function mt(e) {
|
|
1861
1861
|
return new ut((t) => {
|
|
1862
1862
|
t(e);
|
|
1863
1863
|
});
|
|
1864
1864
|
}
|
|
1865
|
-
function
|
|
1865
|
+
function Te(e) {
|
|
1866
1866
|
return new ut((t, n) => {
|
|
1867
1867
|
n(e);
|
|
1868
1868
|
});
|
|
@@ -1929,7 +1929,7 @@ class ut {
|
|
|
1929
1929
|
return;
|
|
1930
1930
|
const t = this._handlers.slice();
|
|
1931
1931
|
this._handlers = [], t.forEach((n) => {
|
|
1932
|
-
n[0] || (this._state ===
|
|
1932
|
+
n[0] || (this._state === Ze && n[1](this._value), this._state === Qe && n[2](this._value), n[0] = !0);
|
|
1933
1933
|
});
|
|
1934
1934
|
}
|
|
1935
1935
|
/** Run the executor for the SyncPromise. */
|
|
@@ -1943,9 +1943,9 @@ class ut {
|
|
|
1943
1943
|
this._state = o, this._value = i, this._executeHandlers();
|
|
1944
1944
|
}
|
|
1945
1945
|
}, r = (o) => {
|
|
1946
|
-
n(
|
|
1946
|
+
n(Ze, o);
|
|
1947
1947
|
}, s = (o) => {
|
|
1948
|
-
n(
|
|
1948
|
+
n(Qe, o);
|
|
1949
1949
|
};
|
|
1950
1950
|
try {
|
|
1951
1951
|
t(r, s);
|
|
@@ -1954,12 +1954,12 @@ class ut {
|
|
|
1954
1954
|
}
|
|
1955
1955
|
}
|
|
1956
1956
|
}
|
|
1957
|
-
function
|
|
1957
|
+
function go(e, t, n, r = 0) {
|
|
1958
1958
|
try {
|
|
1959
1959
|
const s = ee(t, n, e, r);
|
|
1960
1960
|
return lt(s) ? s : mt(s);
|
|
1961
1961
|
} catch (s) {
|
|
1962
|
-
return
|
|
1962
|
+
return Te(s);
|
|
1963
1963
|
}
|
|
1964
1964
|
}
|
|
1965
1965
|
function ee(e, t, n, r) {
|
|
@@ -1969,26 +1969,26 @@ function ee(e, t, n, r) {
|
|
|
1969
1969
|
const o = s({ ...e }, t);
|
|
1970
1970
|
return m && o === null && h.log(`Event processor "${s.id || "?"}" dropped event`), lt(o) ? o.then((i) => ee(i, t, n, r + 1)) : ee(o, t, n, r + 1);
|
|
1971
1971
|
}
|
|
1972
|
-
let
|
|
1973
|
-
function
|
|
1972
|
+
let z, tn, en, U;
|
|
1973
|
+
function yo(e) {
|
|
1974
1974
|
const t = E._sentryDebugIds, n = E._debugIds;
|
|
1975
1975
|
if (!t && !n)
|
|
1976
1976
|
return {};
|
|
1977
1977
|
const r = t ? Object.keys(t) : [], s = n ? Object.keys(n) : [];
|
|
1978
|
-
if (U && r.length ===
|
|
1978
|
+
if (U && r.length === tn && s.length === en)
|
|
1979
1979
|
return U;
|
|
1980
|
-
|
|
1980
|
+
tn = r.length, en = s.length, U = {}, z || (z = {});
|
|
1981
1981
|
const o = (i, a) => {
|
|
1982
1982
|
for (const c of i) {
|
|
1983
|
-
const u = a[c], d =
|
|
1983
|
+
const u = a[c], d = z?.[c];
|
|
1984
1984
|
if (d && U && u)
|
|
1985
|
-
U[d[0]] = u,
|
|
1985
|
+
U[d[0]] = u, z && (z[c] = [d[0], u]);
|
|
1986
1986
|
else if (u) {
|
|
1987
1987
|
const l = e(c);
|
|
1988
1988
|
for (let p = l.length - 1; p >= 0; p--) {
|
|
1989
1989
|
const S = l[p]?.filename;
|
|
1990
|
-
if (S && U &&
|
|
1991
|
-
U[S] = u,
|
|
1990
|
+
if (S && U && z) {
|
|
1991
|
+
U[S] = u, z[c] = [S, u];
|
|
1992
1992
|
break;
|
|
1993
1993
|
}
|
|
1994
1994
|
}
|
|
@@ -1997,11 +1997,11 @@ function Eo(e) {
|
|
|
1997
1997
|
};
|
|
1998
1998
|
return t && o(r, t), n && o(s, n), U;
|
|
1999
1999
|
}
|
|
2000
|
-
function
|
|
2000
|
+
function Eo(e, t) {
|
|
2001
2001
|
const { fingerprint: n, span: r, breadcrumbs: s, sdkProcessingMetadata: o } = t;
|
|
2002
|
-
|
|
2002
|
+
So(e, t), r && bo(e, r), Io(e, n), To(e, s), Ro(e, o);
|
|
2003
2003
|
}
|
|
2004
|
-
function
|
|
2004
|
+
function nn(e, t) {
|
|
2005
2005
|
const {
|
|
2006
2006
|
extra: n,
|
|
2007
2007
|
tags: r,
|
|
@@ -2016,80 +2016,80 @@ function rn(e, t) {
|
|
|
2016
2016
|
attachments: p,
|
|
2017
2017
|
propagationContext: f,
|
|
2018
2018
|
transactionName: S,
|
|
2019
|
-
span:
|
|
2019
|
+
span: R
|
|
2020
2020
|
} = t;
|
|
2021
|
-
it(e, "extra", n), it(e, "tags", r), it(e, "attributes", s), it(e, "user", o), it(e, "contexts", i), e.sdkProcessingMetadata = pt(e.sdkProcessingMetadata, c, 2), a && (e.level = a), S && (e.transactionName = S),
|
|
2021
|
+
it(e, "extra", n), it(e, "tags", r), it(e, "attributes", s), it(e, "user", o), it(e, "contexts", i), e.sdkProcessingMetadata = pt(e.sdkProcessingMetadata, c, 2), a && (e.level = a), S && (e.transactionName = S), R && (e.span = R), u.length && (e.breadcrumbs = [...e.breadcrumbs, ...u]), d.length && (e.fingerprint = [...e.fingerprint, ...d]), l.length && (e.eventProcessors = [...e.eventProcessors, ...l]), p.length && (e.attachments = [...e.attachments, ...p]), e.propagationContext = { ...e.propagationContext, ...f };
|
|
2022
2022
|
}
|
|
2023
2023
|
function it(e, t, n) {
|
|
2024
2024
|
e[t] = pt(e[t], n, 1);
|
|
2025
2025
|
}
|
|
2026
|
-
function
|
|
2027
|
-
const n =
|
|
2028
|
-
return e &&
|
|
2026
|
+
function Zn(e, t) {
|
|
2027
|
+
const n = ms().getScopeData();
|
|
2028
|
+
return e && nn(n, e.getScopeData()), t && nn(n, t.getScopeData()), n;
|
|
2029
2029
|
}
|
|
2030
|
-
function
|
|
2030
|
+
function So(e, t) {
|
|
2031
2031
|
const { extra: n, tags: r, user: s, contexts: o, level: i, transactionName: a } = t;
|
|
2032
2032
|
Object.keys(n).length && (e.extra = { ...n, ...e.extra }), Object.keys(r).length && (e.tags = { ...r, ...e.tags }), Object.keys(s).length && (e.user = { ...s, ...e.user }), Object.keys(o).length && (e.contexts = { ...o, ...e.contexts }), i && (e.level = i), a && e.type !== "transaction" && (e.transaction = a);
|
|
2033
2033
|
}
|
|
2034
|
-
function
|
|
2034
|
+
function To(e, t) {
|
|
2035
2035
|
const n = [...e.breadcrumbs || [], ...t];
|
|
2036
2036
|
e.breadcrumbs = n.length ? n : void 0;
|
|
2037
2037
|
}
|
|
2038
|
-
function
|
|
2038
|
+
function Ro(e, t) {
|
|
2039
2039
|
e.sdkProcessingMetadata = {
|
|
2040
2040
|
...e.sdkProcessingMetadata,
|
|
2041
2041
|
...t
|
|
2042
2042
|
};
|
|
2043
2043
|
}
|
|
2044
|
-
function
|
|
2044
|
+
function bo(e, t) {
|
|
2045
2045
|
e.contexts = {
|
|
2046
|
-
trace:
|
|
2046
|
+
trace: js(t),
|
|
2047
2047
|
...e.contexts
|
|
2048
2048
|
}, e.sdkProcessingMetadata = {
|
|
2049
|
-
dynamicSamplingContext:
|
|
2049
|
+
dynamicSamplingContext: to(t),
|
|
2050
2050
|
...e.sdkProcessingMetadata
|
|
2051
2051
|
};
|
|
2052
|
-
const n =
|
|
2052
|
+
const n = Xn(t), r = Ee(n).description;
|
|
2053
2053
|
r && !e.transaction && e.type === "transaction" && (e.transaction = r);
|
|
2054
2054
|
}
|
|
2055
|
-
function
|
|
2055
|
+
function Io(e, t) {
|
|
2056
2056
|
e.fingerprint = e.fingerprint ? Array.isArray(e.fingerprint) ? e.fingerprint : [e.fingerprint] : [], t && (e.fingerprint = e.fingerprint.concat(t)), e.fingerprint.length || delete e.fingerprint;
|
|
2057
2057
|
}
|
|
2058
|
-
function
|
|
2058
|
+
function vo(e, t, n, r, s, o) {
|
|
2059
2059
|
const { normalizeDepth: i = 3, normalizeMaxBreadth: a = 1e3 } = e, c = {
|
|
2060
2060
|
...t,
|
|
2061
2061
|
event_id: t.event_id || n.event_id || O(),
|
|
2062
2062
|
timestamp: t.timestamp || ft()
|
|
2063
2063
|
}, u = n.integrations || e.integrations.map((N) => N.name);
|
|
2064
|
-
wo(c, e),
|
|
2065
|
-
const d =
|
|
2064
|
+
wo(c, e), Oo(c, u), s && s.emit("applyFrameMetadata", t), t.type === void 0 && ko(c, e.stackParser);
|
|
2065
|
+
const d = Do(r, n.captureContext);
|
|
2066
2066
|
n.mechanism && Z(c, n.mechanism);
|
|
2067
|
-
const l = s ? s.getEventProcessors() : [], p =
|
|
2068
|
-
f.length && (n.attachments = f),
|
|
2067
|
+
const l = s ? s.getEventProcessors() : [], p = Zn(o, d), f = [...n.attachments || [], ...p.attachments];
|
|
2068
|
+
f.length && (n.attachments = f), Eo(c, p);
|
|
2069
2069
|
const S = [
|
|
2070
2070
|
...l,
|
|
2071
2071
|
// Run scope event processors _after_ all other processors
|
|
2072
2072
|
...p.eventProcessors
|
|
2073
2073
|
];
|
|
2074
|
-
return (n.data && n.data.__sentry__ === !0 ? mt(c) :
|
|
2074
|
+
return (n.data && n.data.__sentry__ === !0 ? mt(c) : go(S, c, n)).then((N) => (N && No(N), typeof i == "number" && i > 0 ? Co(N, i, a) : N));
|
|
2075
2075
|
}
|
|
2076
2076
|
function wo(e, t) {
|
|
2077
2077
|
const { environment: n, release: r, dist: s, maxValueLength: o } = t;
|
|
2078
|
-
e.environment = e.environment || n ||
|
|
2078
|
+
e.environment = e.environment || n || Se, !e.release && r && (e.release = r), !e.dist && s && (e.dist = s);
|
|
2079
2079
|
const i = e.request;
|
|
2080
2080
|
i?.url && o && (i.url = Kt(i.url, o)), o && e.exception?.values?.forEach((a) => {
|
|
2081
2081
|
a.value && (a.value = Kt(a.value, o));
|
|
2082
2082
|
});
|
|
2083
2083
|
}
|
|
2084
|
-
function
|
|
2085
|
-
const n =
|
|
2084
|
+
function ko(e, t) {
|
|
2085
|
+
const n = yo(t);
|
|
2086
2086
|
e.exception?.values?.forEach((r) => {
|
|
2087
2087
|
r.stacktrace?.frames?.forEach((s) => {
|
|
2088
2088
|
s.filename && (s.debug_id = n[s.filename]);
|
|
2089
2089
|
});
|
|
2090
2090
|
});
|
|
2091
2091
|
}
|
|
2092
|
-
function
|
|
2092
|
+
function No(e) {
|
|
2093
2093
|
const t = {};
|
|
2094
2094
|
if (e.exception?.values?.forEach((r) => {
|
|
2095
2095
|
r.stacktrace?.frames?.forEach((s) => {
|
|
@@ -2107,10 +2107,10 @@ function Oo(e) {
|
|
|
2107
2107
|
});
|
|
2108
2108
|
});
|
|
2109
2109
|
}
|
|
2110
|
-
function
|
|
2110
|
+
function Oo(e, t) {
|
|
2111
2111
|
t.length > 0 && (e.sdk = e.sdk || {}, e.sdk.integrations = [...e.sdk.integrations || [], ...t]);
|
|
2112
2112
|
}
|
|
2113
|
-
function
|
|
2113
|
+
function Co(e, t, n) {
|
|
2114
2114
|
if (!e)
|
|
2115
2115
|
return null;
|
|
2116
2116
|
const r = {
|
|
@@ -2119,40 +2119,40 @@ function Do(e, t, n) {
|
|
|
2119
2119
|
breadcrumbs: e.breadcrumbs.map((s) => ({
|
|
2120
2120
|
...s,
|
|
2121
2121
|
...s.data && {
|
|
2122
|
-
data:
|
|
2122
|
+
data: $(s.data, t, n)
|
|
2123
2123
|
}
|
|
2124
2124
|
}))
|
|
2125
2125
|
},
|
|
2126
2126
|
...e.user && {
|
|
2127
|
-
user:
|
|
2127
|
+
user: $(e.user, t, n)
|
|
2128
2128
|
},
|
|
2129
2129
|
...e.contexts && {
|
|
2130
|
-
contexts:
|
|
2130
|
+
contexts: $(e.contexts, t, n)
|
|
2131
2131
|
},
|
|
2132
2132
|
...e.extra && {
|
|
2133
|
-
extra:
|
|
2133
|
+
extra: $(e.extra, t, n)
|
|
2134
2134
|
}
|
|
2135
2135
|
};
|
|
2136
|
-
return e.contexts?.trace && r.contexts && (r.contexts.trace = e.contexts.trace, e.contexts.trace.data && (r.contexts.trace.data =
|
|
2136
|
+
return e.contexts?.trace && r.contexts && (r.contexts.trace = e.contexts.trace, e.contexts.trace.data && (r.contexts.trace.data = $(e.contexts.trace.data, t, n))), e.spans && (r.spans = e.spans.map((s) => ({
|
|
2137
2137
|
...s,
|
|
2138
2138
|
...s.data && {
|
|
2139
|
-
data:
|
|
2139
|
+
data: $(s.data, t, n)
|
|
2140
2140
|
}
|
|
2141
|
-
}))), e.contexts?.flags && r.contexts && (r.contexts.flags =
|
|
2141
|
+
}))), e.contexts?.flags && r.contexts && (r.contexts.flags = $(e.contexts.flags, 3, n)), r;
|
|
2142
2142
|
}
|
|
2143
|
-
function
|
|
2143
|
+
function Do(e, t) {
|
|
2144
2144
|
if (!t)
|
|
2145
2145
|
return e;
|
|
2146
2146
|
const n = e ? e.clone() : new A();
|
|
2147
2147
|
return n.update(t), n;
|
|
2148
2148
|
}
|
|
2149
|
-
function
|
|
2149
|
+
function Ao(e) {
|
|
2150
2150
|
if (e)
|
|
2151
|
-
return
|
|
2151
|
+
return xo(e) ? { captureContext: e } : Fo(e) ? {
|
|
2152
2152
|
captureContext: e
|
|
2153
2153
|
} : e;
|
|
2154
2154
|
}
|
|
2155
|
-
function
|
|
2155
|
+
function xo(e) {
|
|
2156
2156
|
return e instanceof A || typeof e == "function";
|
|
2157
2157
|
}
|
|
2158
2158
|
const $o = [
|
|
@@ -2164,63 +2164,63 @@ const $o = [
|
|
|
2164
2164
|
"fingerprint",
|
|
2165
2165
|
"propagationContext"
|
|
2166
2166
|
];
|
|
2167
|
-
function
|
|
2167
|
+
function Fo(e) {
|
|
2168
2168
|
return Object.keys(e).some((t) => $o.includes(t));
|
|
2169
2169
|
}
|
|
2170
|
-
function
|
|
2171
|
-
return x().captureException(e,
|
|
2170
|
+
function Qn(e, t) {
|
|
2171
|
+
return x().captureException(e, Ao(t));
|
|
2172
2172
|
}
|
|
2173
|
-
function
|
|
2173
|
+
function Mo(e, t) {
|
|
2174
2174
|
const n = typeof t == "string" ? t : void 0, r = typeof t != "string" ? { captureContext: t } : void 0;
|
|
2175
2175
|
return x().captureMessage(e, n, r);
|
|
2176
2176
|
}
|
|
2177
|
-
function
|
|
2177
|
+
function tr(e, t) {
|
|
2178
2178
|
return x().captureEvent(e, t);
|
|
2179
2179
|
}
|
|
2180
|
-
function
|
|
2180
|
+
function Po(e) {
|
|
2181
2181
|
V().setUser(e);
|
|
2182
2182
|
}
|
|
2183
|
-
function
|
|
2184
|
-
const t = V(), { user: n } =
|
|
2183
|
+
function rn(e) {
|
|
2184
|
+
const t = V(), { user: n } = Zn(t, x()), { userAgent: r } = E.navigator || {}, s = os({
|
|
2185
2185
|
user: n,
|
|
2186
2186
|
...r && { userAgent: r },
|
|
2187
2187
|
...e
|
|
2188
2188
|
}), o = t.getSession();
|
|
2189
|
-
return o?.status === "ok" && Q(o, { status: "exited" }),
|
|
2189
|
+
return o?.status === "ok" && Q(o, { status: "exited" }), er(), t.setSession(s), s;
|
|
2190
2190
|
}
|
|
2191
|
-
function
|
|
2191
|
+
function er() {
|
|
2192
2192
|
const e = V(), n = x().getSession() || e.getSession();
|
|
2193
|
-
n &&
|
|
2193
|
+
n && is(n), nr(), e.setSession();
|
|
2194
2194
|
}
|
|
2195
|
-
function
|
|
2195
|
+
function nr() {
|
|
2196
2196
|
const e = V(), t = I(), n = e.getSession();
|
|
2197
2197
|
n && t && t.captureSession(n);
|
|
2198
2198
|
}
|
|
2199
|
-
function
|
|
2199
|
+
function Vt(e = !1) {
|
|
2200
2200
|
if (e) {
|
|
2201
|
-
|
|
2201
|
+
er();
|
|
2202
2202
|
return;
|
|
2203
2203
|
}
|
|
2204
|
-
|
|
2204
|
+
nr();
|
|
2205
2205
|
}
|
|
2206
|
-
const
|
|
2207
|
-
function
|
|
2206
|
+
const Uo = "7";
|
|
2207
|
+
function Lo(e) {
|
|
2208
2208
|
const t = e.protocol ? `${e.protocol}:` : "", n = e.port ? `:${e.port}` : "";
|
|
2209
2209
|
return `${t}//${e.host}${n}${e.path ? `/${e.path}` : ""}/api/`;
|
|
2210
2210
|
}
|
|
2211
|
-
function
|
|
2212
|
-
return `${
|
|
2211
|
+
function Ho(e) {
|
|
2212
|
+
return `${Lo(e)}${e.projectId}/envelope/`;
|
|
2213
2213
|
}
|
|
2214
|
-
function
|
|
2214
|
+
function Bo(e, t) {
|
|
2215
2215
|
const n = {
|
|
2216
|
-
sentry_version:
|
|
2216
|
+
sentry_version: Uo
|
|
2217
2217
|
};
|
|
2218
2218
|
return e.publicKey && (n.sentry_key = e.publicKey), t && (n.sentry_client = `${t.name}/${t.version}`), new URLSearchParams(n).toString();
|
|
2219
2219
|
}
|
|
2220
|
-
function
|
|
2221
|
-
return t || `${
|
|
2220
|
+
function jo(e, t, n) {
|
|
2221
|
+
return t || `${Ho(e)}?${Bo(e, n)}`;
|
|
2222
2222
|
}
|
|
2223
|
-
const
|
|
2223
|
+
const sn = [];
|
|
2224
2224
|
function Vo(e) {
|
|
2225
2225
|
const t = {};
|
|
2226
2226
|
return e.forEach((n) => {
|
|
@@ -2228,7 +2228,7 @@ function Vo(e) {
|
|
|
2228
2228
|
s && !s.isDefaultInstance && n.isDefaultInstance || (t[r] = n);
|
|
2229
2229
|
}), Object.values(t);
|
|
2230
2230
|
}
|
|
2231
|
-
function
|
|
2231
|
+
function zo(e) {
|
|
2232
2232
|
const t = e.defaultIntegrations || [], n = e.integrations;
|
|
2233
2233
|
t.forEach((s) => {
|
|
2234
2234
|
s.isDefaultInstance = !0;
|
|
@@ -2243,22 +2243,22 @@ function Go(e) {
|
|
|
2243
2243
|
r = t;
|
|
2244
2244
|
return Vo(r);
|
|
2245
2245
|
}
|
|
2246
|
-
function
|
|
2246
|
+
function Wo(e, t) {
|
|
2247
2247
|
const n = {};
|
|
2248
2248
|
return t.forEach((r) => {
|
|
2249
|
-
r &&
|
|
2249
|
+
r && rr(e, r, n);
|
|
2250
2250
|
}), n;
|
|
2251
2251
|
}
|
|
2252
|
-
function
|
|
2252
|
+
function on(e, t) {
|
|
2253
2253
|
for (const n of t)
|
|
2254
2254
|
n?.afterAllSetup && n.afterAllSetup(e);
|
|
2255
2255
|
}
|
|
2256
|
-
function
|
|
2256
|
+
function rr(e, t, n) {
|
|
2257
2257
|
if (n[t.name]) {
|
|
2258
2258
|
m && h.log(`Integration skipped because it was already installed: ${t.name}`);
|
|
2259
2259
|
return;
|
|
2260
2260
|
}
|
|
2261
|
-
if (n[t.name] = t, !
|
|
2261
|
+
if (n[t.name] = t, !sn.includes(t.name) && typeof t.setupOnce == "function" && (t.setupOnce(), sn.push(t.name)), t.setup && typeof t.setup == "function" && t.setup(e), typeof t.preprocessEvent == "function") {
|
|
2262
2262
|
const r = t.preprocessEvent.bind(t);
|
|
2263
2263
|
e.on("preprocessEvent", (s, o) => r(s, o, e));
|
|
2264
2264
|
}
|
|
@@ -2282,7 +2282,7 @@ function qo(e) {
|
|
|
2282
2282
|
}
|
|
2283
2283
|
];
|
|
2284
2284
|
}
|
|
2285
|
-
function
|
|
2285
|
+
function Go(e, t, n, r) {
|
|
2286
2286
|
const s = {};
|
|
2287
2287
|
return t?.sdk && (s.sdk = {
|
|
2288
2288
|
name: t.sdk.name,
|
|
@@ -2290,19 +2290,19 @@ function Xo(e, t, n, r) {
|
|
|
2290
2290
|
}), n && r && (s.dsn = ht(r)), ot(s, [qo(e)]);
|
|
2291
2291
|
}
|
|
2292
2292
|
function ne(e, t) {
|
|
2293
|
-
const n = t ??
|
|
2293
|
+
const n = t ?? Xo(e) ?? [];
|
|
2294
2294
|
if (n.length === 0)
|
|
2295
2295
|
return;
|
|
2296
|
-
const r = e.getOptions(), s =
|
|
2297
|
-
|
|
2296
|
+
const r = e.getOptions(), s = Go(n, r._metadata, r.tunnel, e.getDsn());
|
|
2297
|
+
sr().set(e, []), e.emit("flushLogs"), e.sendEnvelope(s);
|
|
2298
2298
|
}
|
|
2299
|
-
function
|
|
2300
|
-
return
|
|
2299
|
+
function Xo(e) {
|
|
2300
|
+
return sr().get(e);
|
|
2301
2301
|
}
|
|
2302
|
-
function
|
|
2302
|
+
function sr() {
|
|
2303
2303
|
return nt("clientToLogBufferMap", () => /* @__PURE__ */ new WeakMap());
|
|
2304
2304
|
}
|
|
2305
|
-
function
|
|
2305
|
+
function Ko(e) {
|
|
2306
2306
|
return [
|
|
2307
2307
|
{
|
|
2308
2308
|
type: "trace_metric",
|
|
@@ -2314,31 +2314,31 @@ function Yo(e) {
|
|
|
2314
2314
|
}
|
|
2315
2315
|
];
|
|
2316
2316
|
}
|
|
2317
|
-
function
|
|
2317
|
+
function Yo(e, t, n, r) {
|
|
2318
2318
|
const s = {};
|
|
2319
2319
|
return t?.sdk && (s.sdk = {
|
|
2320
2320
|
name: t.sdk.name,
|
|
2321
2321
|
version: t.sdk.version
|
|
2322
|
-
}), n && r && (s.dsn = ht(r)), ot(s, [
|
|
2322
|
+
}), n && r && (s.dsn = ht(r)), ot(s, [Ko(e)]);
|
|
2323
2323
|
}
|
|
2324
|
-
function
|
|
2325
|
-
const n = t ??
|
|
2324
|
+
function or(e, t) {
|
|
2325
|
+
const n = t ?? Jo(e) ?? [];
|
|
2326
2326
|
if (n.length === 0)
|
|
2327
2327
|
return;
|
|
2328
|
-
const r = e.getOptions(), s =
|
|
2329
|
-
|
|
2328
|
+
const r = e.getOptions(), s = Yo(n, r._metadata, r.tunnel, e.getDsn());
|
|
2329
|
+
ir().set(e, []), e.emit("flushMetrics"), e.sendEnvelope(s);
|
|
2330
2330
|
}
|
|
2331
|
-
function
|
|
2332
|
-
return
|
|
2331
|
+
function Jo(e) {
|
|
2332
|
+
return ir().get(e);
|
|
2333
2333
|
}
|
|
2334
|
-
function
|
|
2334
|
+
function ir() {
|
|
2335
2335
|
return nt("clientToMetricBufferMap", () => /* @__PURE__ */ new WeakMap());
|
|
2336
2336
|
}
|
|
2337
|
-
function
|
|
2337
|
+
function ar(e) {
|
|
2338
2338
|
return typeof e == "object" && typeof e.unref == "function" && e.unref(), e;
|
|
2339
2339
|
}
|
|
2340
|
-
const
|
|
2341
|
-
function
|
|
2340
|
+
const Re = Symbol.for("SentryBufferFullError");
|
|
2341
|
+
function be(e = 100) {
|
|
2342
2342
|
const t = /* @__PURE__ */ new Set();
|
|
2343
2343
|
function n() {
|
|
2344
2344
|
return t.size < e;
|
|
@@ -2348,7 +2348,7 @@ function Ie(e = 100) {
|
|
|
2348
2348
|
}
|
|
2349
2349
|
function s(i) {
|
|
2350
2350
|
if (!n())
|
|
2351
|
-
return Re
|
|
2351
|
+
return Te(Re);
|
|
2352
2352
|
const a = i();
|
|
2353
2353
|
return t.add(a), a.then(
|
|
2354
2354
|
() => r(a),
|
|
@@ -2363,7 +2363,7 @@ function Ie(e = 100) {
|
|
|
2363
2363
|
return a;
|
|
2364
2364
|
const c = [
|
|
2365
2365
|
a,
|
|
2366
|
-
new Promise((u) =>
|
|
2366
|
+
new Promise((u) => ar(setTimeout(() => u(!1), i)))
|
|
2367
2367
|
];
|
|
2368
2368
|
return Promise.race(c);
|
|
2369
2369
|
}
|
|
@@ -2375,21 +2375,21 @@ function Ie(e = 100) {
|
|
|
2375
2375
|
drain: o
|
|
2376
2376
|
};
|
|
2377
2377
|
}
|
|
2378
|
-
const
|
|
2379
|
-
function
|
|
2378
|
+
const Zo = 60 * 1e3;
|
|
2379
|
+
function Qo(e, t = Ft()) {
|
|
2380
2380
|
const n = parseInt(`${e}`, 10);
|
|
2381
2381
|
if (!isNaN(n))
|
|
2382
2382
|
return n * 1e3;
|
|
2383
2383
|
const r = Date.parse(`${e}`);
|
|
2384
|
-
return isNaN(r) ?
|
|
2384
|
+
return isNaN(r) ? Zo : r - t;
|
|
2385
2385
|
}
|
|
2386
|
-
function
|
|
2386
|
+
function ti(e, t) {
|
|
2387
2387
|
return e[t] || e.all || 0;
|
|
2388
2388
|
}
|
|
2389
|
-
function
|
|
2390
|
-
return
|
|
2389
|
+
function ei(e, t, n = Ft()) {
|
|
2390
|
+
return ti(e, t) > n;
|
|
2391
2391
|
}
|
|
2392
|
-
function
|
|
2392
|
+
function ni(e, { statusCode: t, headers: n }, r = Ft()) {
|
|
2393
2393
|
const s = {
|
|
2394
2394
|
...e
|
|
2395
2395
|
}, o = n?.["x-sentry-rate-limits"], i = n?.["retry-after"];
|
|
@@ -2402,34 +2402,34 @@ function ri(e, { statusCode: t, headers: n }, r = $t()) {
|
|
|
2402
2402
|
for (const f of u.split(";"))
|
|
2403
2403
|
f === "metric_bucket" ? (!d || d.split(";").includes("custom")) && (s[f] = r + p) : s[f] = r + p;
|
|
2404
2404
|
}
|
|
2405
|
-
else i ? s.all = r +
|
|
2405
|
+
else i ? s.all = r + Qo(i, r) : t === 429 && (s.all = r + 60 * 1e3);
|
|
2406
2406
|
return s;
|
|
2407
2407
|
}
|
|
2408
|
-
const
|
|
2409
|
-
function
|
|
2410
|
-
e.bufferSize ||
|
|
2408
|
+
const cr = 64;
|
|
2409
|
+
function ri(e, t, n = be(
|
|
2410
|
+
e.bufferSize || cr
|
|
2411
2411
|
)) {
|
|
2412
2412
|
let r = {};
|
|
2413
2413
|
const s = (i) => n.drain(i);
|
|
2414
2414
|
function o(i) {
|
|
2415
2415
|
const a = [];
|
|
2416
2416
|
if (Qt(i, (l, p) => {
|
|
2417
|
-
const f =
|
|
2418
|
-
|
|
2417
|
+
const f = Je(p);
|
|
2418
|
+
ei(r, f) ? e.recordDroppedEvent("ratelimit_backoff", f) : a.push(l);
|
|
2419
2419
|
}), a.length === 0)
|
|
2420
2420
|
return Promise.resolve({});
|
|
2421
2421
|
const c = ot(i[0], a), u = (l) => {
|
|
2422
|
-
if (
|
|
2422
|
+
if (ao(c, ["client_report"])) {
|
|
2423
2423
|
m && h.warn(`Dropping client report. Will not send outcomes (reason: ${l}).`);
|
|
2424
2424
|
return;
|
|
2425
2425
|
}
|
|
2426
2426
|
Qt(c, (p, f) => {
|
|
2427
|
-
e.recordDroppedEvent(l,
|
|
2427
|
+
e.recordDroppedEvent(l, Je(f));
|
|
2428
2428
|
});
|
|
2429
|
-
}, d = () => t({ body:
|
|
2429
|
+
}, d = () => t({ body: co(c) }).then(
|
|
2430
2430
|
(l) => l.statusCode === 413 ? (m && h.error(
|
|
2431
2431
|
"Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."
|
|
2432
|
-
), u("send_error"), l) : (m && l.statusCode !== void 0 && (l.statusCode < 200 || l.statusCode >= 300) && h.warn(`Sentry responded with status code ${l.statusCode} to sent event.`), r =
|
|
2432
|
+
), u("send_error"), l) : (m && l.statusCode !== void 0 && (l.statusCode < 200 || l.statusCode >= 300) && h.warn(`Sentry responded with status code ${l.statusCode} to sent event.`), r = ni(r, l), l),
|
|
2433
2433
|
(l) => {
|
|
2434
2434
|
throw u("network_error"), m && h.error("Encountered error running transport request:", l), l;
|
|
2435
2435
|
}
|
|
@@ -2437,7 +2437,7 @@ function si(e, t, n = Ie(
|
|
|
2437
2437
|
return n.add(d).then(
|
|
2438
2438
|
(l) => l,
|
|
2439
2439
|
(l) => {
|
|
2440
|
-
if (l ===
|
|
2440
|
+
if (l === Re)
|
|
2441
2441
|
return m && h.error("Skipped sending event because buffer is full."), u("queue_overflow"), Promise.resolve({});
|
|
2442
2442
|
throw l;
|
|
2443
2443
|
}
|
|
@@ -2448,7 +2448,7 @@ function si(e, t, n = Ie(
|
|
|
2448
2448
|
flush: s
|
|
2449
2449
|
};
|
|
2450
2450
|
}
|
|
2451
|
-
function
|
|
2451
|
+
function si(e, t, n) {
|
|
2452
2452
|
const r = [
|
|
2453
2453
|
{ type: "client_report" },
|
|
2454
2454
|
{
|
|
@@ -2458,7 +2458,7 @@ function oi(e, t, n) {
|
|
|
2458
2458
|
];
|
|
2459
2459
|
return ot(t ? { dsn: t } : {}, [r]);
|
|
2460
2460
|
}
|
|
2461
|
-
function
|
|
2461
|
+
function ur(e) {
|
|
2462
2462
|
const t = [];
|
|
2463
2463
|
e.message && t.push(e.message);
|
|
2464
2464
|
try {
|
|
@@ -2468,7 +2468,7 @@ function dr(e) {
|
|
|
2468
2468
|
}
|
|
2469
2469
|
return t;
|
|
2470
2470
|
}
|
|
2471
|
-
function
|
|
2471
|
+
function oi(e) {
|
|
2472
2472
|
const { trace_id: t, parent_span_id: n, span_id: r, status: s, origin: o, data: i, op: a } = e.contexts?.trace ?? {};
|
|
2473
2473
|
return {
|
|
2474
2474
|
data: i ?? {},
|
|
@@ -2482,12 +2482,12 @@ function ii(e) {
|
|
|
2482
2482
|
trace_id: t ?? "",
|
|
2483
2483
|
origin: o,
|
|
2484
2484
|
profile_id: i?.[Vn],
|
|
2485
|
-
exclusive_time: i?.[
|
|
2485
|
+
exclusive_time: i?.[zn],
|
|
2486
2486
|
measurements: e.measurements,
|
|
2487
2487
|
is_segment: !0
|
|
2488
2488
|
};
|
|
2489
2489
|
}
|
|
2490
|
-
function
|
|
2490
|
+
function ii(e) {
|
|
2491
2491
|
return {
|
|
2492
2492
|
type: "transaction",
|
|
2493
2493
|
timestamp: e.timestamp,
|
|
@@ -2504,47 +2504,47 @@ function ai(e) {
|
|
|
2504
2504
|
data: {
|
|
2505
2505
|
...e.data,
|
|
2506
2506
|
...e.profile_id && { [Vn]: e.profile_id },
|
|
2507
|
-
...e.exclusive_time && { [
|
|
2507
|
+
...e.exclusive_time && { [zn]: e.exclusive_time }
|
|
2508
2508
|
}
|
|
2509
2509
|
}
|
|
2510
2510
|
},
|
|
2511
2511
|
measurements: e.measurements
|
|
2512
2512
|
};
|
|
2513
2513
|
}
|
|
2514
|
-
const
|
|
2514
|
+
const an = "Not capturing exception because it's already been captured.", cn = "Discarded session because of missing or non-string release", dr = Symbol.for("SentryInternalError"), lr = Symbol.for("SentryDoNotSendEventError"), ai = 5e3;
|
|
2515
2515
|
function Rt(e) {
|
|
2516
2516
|
return {
|
|
2517
2517
|
message: e,
|
|
2518
|
-
[
|
|
2518
|
+
[dr]: !0
|
|
2519
2519
|
};
|
|
2520
2520
|
}
|
|
2521
|
-
function
|
|
2521
|
+
function zt(e) {
|
|
2522
2522
|
return {
|
|
2523
2523
|
message: e,
|
|
2524
|
-
[
|
|
2524
|
+
[lr]: !0
|
|
2525
2525
|
};
|
|
2526
2526
|
}
|
|
2527
|
+
function un(e) {
|
|
2528
|
+
return !!e && typeof e == "object" && dr in e;
|
|
2529
|
+
}
|
|
2527
2530
|
function dn(e) {
|
|
2528
2531
|
return !!e && typeof e == "object" && lr in e;
|
|
2529
2532
|
}
|
|
2530
|
-
function ln(e) {
|
|
2531
|
-
return !!e && typeof e == "object" && fr in e;
|
|
2532
|
-
}
|
|
2533
|
-
function fn(e, t, n, r, s) {
|
|
2533
|
+
function ln(e, t, n, r, s) {
|
|
2534
2534
|
let o = 0, i, a = !1;
|
|
2535
2535
|
e.on(n, () => {
|
|
2536
2536
|
o = 0, clearTimeout(i), a = !1;
|
|
2537
2537
|
}), e.on(t, (c) => {
|
|
2538
|
-
o += r(c), o >= 8e5 ? s(e) : a || (a = !0, i =
|
|
2538
|
+
o += r(c), o >= 8e5 ? s(e) : a || (a = !0, i = ar(
|
|
2539
2539
|
setTimeout(() => {
|
|
2540
2540
|
s(e);
|
|
2541
|
-
},
|
|
2541
|
+
}, ai)
|
|
2542
2542
|
));
|
|
2543
2543
|
}), e.on("flush", () => {
|
|
2544
2544
|
s(e);
|
|
2545
2545
|
});
|
|
2546
2546
|
}
|
|
2547
|
-
class
|
|
2547
|
+
class ci {
|
|
2548
2548
|
/** Options passed to the SDK. */
|
|
2549
2549
|
/** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */
|
|
2550
2550
|
/** Array of set up integrations. */
|
|
@@ -2557,8 +2557,8 @@ class ui {
|
|
|
2557
2557
|
* @param options Options for the client.
|
|
2558
2558
|
*/
|
|
2559
2559
|
constructor(t) {
|
|
2560
|
-
if (this._options = t, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], this._promiseBuffer =
|
|
2561
|
-
const r =
|
|
2560
|
+
if (this._options = t, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], this._promiseBuffer = be(t.transportOptions?.bufferSize ?? cr), t.dsn ? this._dsn = Hs(t.dsn) : m && h.warn("No DSN provided, client will not send events."), this._dsn) {
|
|
2561
|
+
const r = jo(
|
|
2562
2562
|
this._dsn,
|
|
2563
2563
|
t.tunnel,
|
|
2564
2564
|
t._metadata ? t._metadata.sdk : void 0
|
|
@@ -2570,12 +2570,12 @@ class ui {
|
|
|
2570
2570
|
url: r
|
|
2571
2571
|
});
|
|
2572
2572
|
}
|
|
2573
|
-
this._options.enableLogs = this._options.enableLogs ?? this._options._experiments?.enableLogs, this._options.enableLogs &&
|
|
2573
|
+
this._options.enableLogs = this._options.enableLogs ?? this._options._experiments?.enableLogs, this._options.enableLogs && ln(this, "afterCaptureLog", "flushLogs", fi, ne), (this._options.enableMetrics ?? this._options._experiments?.enableMetrics ?? !0) && ln(
|
|
2574
2574
|
this,
|
|
2575
2575
|
"afterCaptureMetric",
|
|
2576
2576
|
"flushMetrics",
|
|
2577
|
-
|
|
2578
|
-
|
|
2577
|
+
li,
|
|
2578
|
+
or
|
|
2579
2579
|
);
|
|
2580
2580
|
}
|
|
2581
2581
|
/**
|
|
@@ -2585,8 +2585,8 @@ class ui {
|
|
|
2585
2585
|
*/
|
|
2586
2586
|
captureException(t, n, r) {
|
|
2587
2587
|
const s = O();
|
|
2588
|
-
if (
|
|
2589
|
-
return m && h.log(
|
|
2588
|
+
if (Ue(t))
|
|
2589
|
+
return m && h.log(an), s;
|
|
2590
2590
|
const o = {
|
|
2591
2591
|
event_id: s,
|
|
2592
2592
|
...n
|
|
@@ -2605,7 +2605,7 @@ class ui {
|
|
|
2605
2605
|
const o = {
|
|
2606
2606
|
event_id: O(),
|
|
2607
2607
|
...r
|
|
2608
|
-
}, i =
|
|
2608
|
+
}, i = he(t) ? t : String(t), a = At(t), c = a ? this.eventFromMessage(i, n, o) : this.eventFromException(t, o);
|
|
2609
2609
|
return this._process(
|
|
2610
2610
|
() => c.then((u) => this._captureEvent(u, o, s)),
|
|
2611
2611
|
a ? "unknown" : "error"
|
|
@@ -2618,12 +2618,12 @@ class ui {
|
|
|
2618
2618
|
*/
|
|
2619
2619
|
captureEvent(t, n, r) {
|
|
2620
2620
|
const s = O();
|
|
2621
|
-
if (n?.originalException &&
|
|
2622
|
-
return m && h.log(
|
|
2621
|
+
if (n?.originalException && Ue(n.originalException))
|
|
2622
|
+
return m && h.log(an), s;
|
|
2623
2623
|
const o = {
|
|
2624
2624
|
event_id: s,
|
|
2625
2625
|
...n
|
|
2626
|
-
}, i = t.sdkProcessingMetadata || {}, a = i.capturedSpanScope, c = i.capturedSpanIsolationScope, u =
|
|
2626
|
+
}, i = t.sdkProcessingMetadata || {}, a = i.capturedSpanScope, c = i.capturedSpanIsolationScope, u = fn(t.type);
|
|
2627
2627
|
return this._process(
|
|
2628
2628
|
() => this._captureEvent(t, o, a || r, c),
|
|
2629
2629
|
u
|
|
@@ -2742,39 +2742,39 @@ class ui {
|
|
|
2742
2742
|
*/
|
|
2743
2743
|
addIntegration(t) {
|
|
2744
2744
|
const n = this._integrations[t.name];
|
|
2745
|
-
|
|
2745
|
+
rr(this, t, this._integrations), n || on(this, [t]);
|
|
2746
2746
|
}
|
|
2747
2747
|
/**
|
|
2748
2748
|
* Send a fully prepared event to Sentry.
|
|
2749
2749
|
*/
|
|
2750
2750
|
sendEvent(t, n = {}) {
|
|
2751
2751
|
this.emit("beforeSendEvent", t, n);
|
|
2752
|
-
let r =
|
|
2752
|
+
let r = _o(t, this._dsn, this._options._metadata, this._options.tunnel);
|
|
2753
2753
|
for (const s of n.attachments || [])
|
|
2754
|
-
r =
|
|
2754
|
+
r = io(r, lo(s));
|
|
2755
2755
|
this.sendEnvelope(r).then((s) => this.emit("afterSendEvent", t, s));
|
|
2756
2756
|
}
|
|
2757
2757
|
/**
|
|
2758
2758
|
* Send a session or session aggregrates to Sentry.
|
|
2759
2759
|
*/
|
|
2760
2760
|
sendSession(t) {
|
|
2761
|
-
const { release: n, environment: r =
|
|
2761
|
+
const { release: n, environment: r = Se } = this._options;
|
|
2762
2762
|
if ("aggregates" in t) {
|
|
2763
2763
|
const o = t.attrs || {};
|
|
2764
2764
|
if (!o.release && !n) {
|
|
2765
|
-
m && h.warn(
|
|
2765
|
+
m && h.warn(cn);
|
|
2766
2766
|
return;
|
|
2767
2767
|
}
|
|
2768
2768
|
o.release = o.release || n, o.environment = o.environment || r, t.attrs = o;
|
|
2769
2769
|
} else {
|
|
2770
2770
|
if (!t.release && !n) {
|
|
2771
|
-
m && h.warn(
|
|
2771
|
+
m && h.warn(cn);
|
|
2772
2772
|
return;
|
|
2773
2773
|
}
|
|
2774
2774
|
t.release = t.release || n, t.environment = t.environment || r;
|
|
2775
2775
|
}
|
|
2776
2776
|
this.emit("beforeSendSession", t);
|
|
2777
|
-
const s =
|
|
2777
|
+
const s = mo(t, this._dsn, this._options._metadata, this._options.tunnel);
|
|
2778
2778
|
this.sendEnvelope(s);
|
|
2779
2779
|
}
|
|
2780
2780
|
/**
|
|
@@ -2834,7 +2834,7 @@ class ui {
|
|
|
2834
2834
|
/** Setup integrations for this client. */
|
|
2835
2835
|
_setupIntegrations() {
|
|
2836
2836
|
const { integrations: t } = this._options;
|
|
2837
|
-
this._integrations =
|
|
2837
|
+
this._integrations = Wo(this, t), on(this, t);
|
|
2838
2838
|
}
|
|
2839
2839
|
/** Updates existing session based on the provided event */
|
|
2840
2840
|
_updateSessionFromEvent(t, n) {
|
|
@@ -2893,14 +2893,14 @@ class ui {
|
|
|
2893
2893
|
*/
|
|
2894
2894
|
_prepareEvent(t, n, r, s) {
|
|
2895
2895
|
const o = this.getOptions(), i = Object.keys(this._integrations);
|
|
2896
|
-
return !n.integrations && i?.length && (n.integrations = i), this.emit("preprocessEvent", t, n), t.type || s.setLastEventId(t.event_id || n.event_id),
|
|
2896
|
+
return !n.integrations && i?.length && (n.integrations = i), this.emit("preprocessEvent", t, n), t.type || s.setLastEventId(t.event_id || n.event_id), vo(o, t, n, r, this, s).then((a) => {
|
|
2897
2897
|
if (a === null)
|
|
2898
2898
|
return a;
|
|
2899
2899
|
this.emit("postprocessEvent", a, n), a.contexts = {
|
|
2900
|
-
trace: { ...a.contexts?.trace, ...
|
|
2900
|
+
trace: { ...a.contexts?.trace, ...gs(r) },
|
|
2901
2901
|
...a.contexts
|
|
2902
2902
|
};
|
|
2903
|
-
const c =
|
|
2903
|
+
const c = Qs(this, r);
|
|
2904
2904
|
return a.sdkProcessingMetadata = {
|
|
2905
2905
|
dynamicSamplingContext: c,
|
|
2906
2906
|
...a.sdkProcessingMetadata
|
|
@@ -2914,10 +2914,10 @@ class ui {
|
|
|
2914
2914
|
* @param scope
|
|
2915
2915
|
*/
|
|
2916
2916
|
_captureEvent(t, n = {}, r = x(), s = V()) {
|
|
2917
|
-
return m && re(t) && h.log(`Captured error event \`${
|
|
2917
|
+
return m && re(t) && h.log(`Captured error event \`${ur(t)[0] || "<unknown>"}\``), this._processEvent(t, n, r, s).then(
|
|
2918
2918
|
(o) => o.event_id,
|
|
2919
2919
|
(o) => {
|
|
2920
|
-
m && (
|
|
2920
|
+
m && (dn(o) ? h.log(o.message) : un(o) ? h.warn(o.message) : h.warn(o));
|
|
2921
2921
|
}
|
|
2922
2922
|
);
|
|
2923
2923
|
}
|
|
@@ -2935,45 +2935,45 @@ class ui {
|
|
|
2935
2935
|
* @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.
|
|
2936
2936
|
*/
|
|
2937
2937
|
_processEvent(t, n, r, s) {
|
|
2938
|
-
const o = this.getOptions(), { sampleRate: i } = o, a =
|
|
2939
|
-
if (c && typeof l == "number" &&
|
|
2940
|
-
return this.recordDroppedEvent("sample_rate", "error"),
|
|
2941
|
-
|
|
2938
|
+
const o = this.getOptions(), { sampleRate: i } = o, a = fr(t), c = re(t), d = `before send for type \`${t.type || "error"}\``, l = typeof i > "u" ? void 0 : Bs(i);
|
|
2939
|
+
if (c && typeof l == "number" && kt() > l)
|
|
2940
|
+
return this.recordDroppedEvent("sample_rate", "error"), Te(
|
|
2941
|
+
zt(
|
|
2942
2942
|
`Discarding event because it's not included in the random sample (sampling rate = ${i})`
|
|
2943
2943
|
)
|
|
2944
2944
|
);
|
|
2945
|
-
const p =
|
|
2945
|
+
const p = fn(t.type);
|
|
2946
2946
|
return this._prepareEvent(t, n, r, s).then((f) => {
|
|
2947
2947
|
if (f === null)
|
|
2948
|
-
throw this.recordDroppedEvent("event_processor", p),
|
|
2948
|
+
throw this.recordDroppedEvent("event_processor", p), zt("An event processor returned `null`, will not send event.");
|
|
2949
2949
|
if (n.data && n.data.__sentry__ === !0)
|
|
2950
2950
|
return f;
|
|
2951
|
-
const
|
|
2952
|
-
return
|
|
2951
|
+
const R = di(this, o, f, n);
|
|
2952
|
+
return ui(R, d);
|
|
2953
2953
|
}).then((f) => {
|
|
2954
2954
|
if (f === null) {
|
|
2955
2955
|
if (this.recordDroppedEvent("before_send", p), a) {
|
|
2956
2956
|
const N = 1 + (t.spans || []).length;
|
|
2957
2957
|
this.recordDroppedEvent("before_send", "span", N);
|
|
2958
2958
|
}
|
|
2959
|
-
throw
|
|
2959
|
+
throw zt(`${d} returned \`null\`, will not send event.`);
|
|
2960
2960
|
}
|
|
2961
2961
|
const S = r.getSession() || s.getSession();
|
|
2962
2962
|
if (c && S && this._updateSessionFromEvent(S, f), a) {
|
|
2963
|
-
const C = f.sdkProcessingMetadata?.spanCountBeforeProcessing || 0, N = f.spans ? f.spans.length : 0,
|
|
2964
|
-
|
|
2963
|
+
const C = f.sdkProcessingMetadata?.spanCountBeforeProcessing || 0, N = f.spans ? f.spans.length : 0, ke = C - N;
|
|
2964
|
+
ke > 0 && this.recordDroppedEvent("before_send", "span", ke);
|
|
2965
2965
|
}
|
|
2966
|
-
const
|
|
2967
|
-
if (a &&
|
|
2966
|
+
const R = f.transaction_info;
|
|
2967
|
+
if (a && R && f.transaction !== t.transaction) {
|
|
2968
2968
|
const C = "custom";
|
|
2969
2969
|
f.transaction_info = {
|
|
2970
|
-
...
|
|
2970
|
+
...R,
|
|
2971
2971
|
source: C
|
|
2972
2972
|
};
|
|
2973
2973
|
}
|
|
2974
2974
|
return this.sendEvent(f, n), f;
|
|
2975
2975
|
}).then(null, (f) => {
|
|
2976
|
-
throw
|
|
2976
|
+
throw dn(f) || un(f) ? f : (this.captureException(f, {
|
|
2977
2977
|
mechanism: {
|
|
2978
2978
|
handled: !1,
|
|
2979
2979
|
type: "internal"
|
|
@@ -2994,7 +2994,7 @@ Reason: ${f}`
|
|
|
2994
2994
|
_process(t, n) {
|
|
2995
2995
|
this._numProcessing++, this._promiseBuffer.add(t).then(
|
|
2996
2996
|
(r) => (this._numProcessing--, r),
|
|
2997
|
-
(r) => (this._numProcessing--, r ===
|
|
2997
|
+
(r) => (this._numProcessing--, r === Re && this.recordDroppedEvent("queue_overflow", n), r)
|
|
2998
2998
|
);
|
|
2999
2999
|
}
|
|
3000
3000
|
/**
|
|
@@ -3026,17 +3026,17 @@ Reason: ${f}`
|
|
|
3026
3026
|
return;
|
|
3027
3027
|
}
|
|
3028
3028
|
m && h.log("Sending outcomes:", t);
|
|
3029
|
-
const n =
|
|
3029
|
+
const n = si(t, this._options.tunnel && ht(this._dsn));
|
|
3030
3030
|
this.sendEnvelope(n);
|
|
3031
3031
|
}
|
|
3032
3032
|
/**
|
|
3033
3033
|
* Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
|
|
3034
3034
|
*/
|
|
3035
3035
|
}
|
|
3036
|
-
function
|
|
3036
|
+
function fn(e) {
|
|
3037
3037
|
return e === "replay_event" ? "replay" : e || "error";
|
|
3038
3038
|
}
|
|
3039
|
-
function
|
|
3039
|
+
function ui(e, t) {
|
|
3040
3040
|
const n = `${t} must return \`null\` or a valid event.`;
|
|
3041
3041
|
if (lt(e))
|
|
3042
3042
|
return e.then(
|
|
@@ -3053,30 +3053,30 @@ function di(e, t) {
|
|
|
3053
3053
|
throw Rt(n);
|
|
3054
3054
|
return e;
|
|
3055
3055
|
}
|
|
3056
|
-
function
|
|
3056
|
+
function di(e, t, n, r) {
|
|
3057
3057
|
const { beforeSend: s, beforeSendTransaction: o, beforeSendSpan: i, ignoreSpans: a } = t;
|
|
3058
3058
|
let c = n;
|
|
3059
3059
|
if (re(c) && s)
|
|
3060
3060
|
return s(c, r);
|
|
3061
|
-
if (
|
|
3061
|
+
if (fr(c)) {
|
|
3062
3062
|
if (i || a) {
|
|
3063
|
-
const u =
|
|
3064
|
-
if (a?.length &&
|
|
3063
|
+
const u = oi(c);
|
|
3064
|
+
if (a?.length && Ye(u, a))
|
|
3065
3065
|
return null;
|
|
3066
3066
|
if (i) {
|
|
3067
3067
|
const d = i(u);
|
|
3068
|
-
d ? c = pt(n,
|
|
3068
|
+
d ? c = pt(n, ii(d)) : Xe();
|
|
3069
3069
|
}
|
|
3070
3070
|
if (c.spans) {
|
|
3071
3071
|
const d = [], l = c.spans;
|
|
3072
3072
|
for (const f of l) {
|
|
3073
|
-
if (a?.length &&
|
|
3074
|
-
|
|
3073
|
+
if (a?.length && Ye(f, a)) {
|
|
3074
|
+
Ys(l, f);
|
|
3075
3075
|
continue;
|
|
3076
3076
|
}
|
|
3077
3077
|
if (i) {
|
|
3078
3078
|
const S = i(f);
|
|
3079
|
-
S ? d.push(S) : (
|
|
3079
|
+
S ? d.push(S) : (Xe(), d.push(f));
|
|
3080
3080
|
} else
|
|
3081
3081
|
d.push(f);
|
|
3082
3082
|
}
|
|
@@ -3100,45 +3100,45 @@ function li(e, t, n, r) {
|
|
|
3100
3100
|
function re(e) {
|
|
3101
3101
|
return e.type === void 0;
|
|
3102
3102
|
}
|
|
3103
|
-
function
|
|
3103
|
+
function fr(e) {
|
|
3104
3104
|
return e.type === "transaction";
|
|
3105
3105
|
}
|
|
3106
|
-
function
|
|
3106
|
+
function li(e) {
|
|
3107
3107
|
let t = 0;
|
|
3108
|
-
return e.name && (t += e.name.length * 2), t += 8, t +
|
|
3108
|
+
return e.name && (t += e.name.length * 2), t += 8, t + pr(e.attributes);
|
|
3109
3109
|
}
|
|
3110
|
-
function
|
|
3110
|
+
function fi(e) {
|
|
3111
3111
|
let t = 0;
|
|
3112
|
-
return e.message && (t += e.message.length * 2), t +
|
|
3112
|
+
return e.message && (t += e.message.length * 2), t + pr(e.attributes);
|
|
3113
3113
|
}
|
|
3114
|
-
function
|
|
3114
|
+
function pr(e) {
|
|
3115
3115
|
if (!e)
|
|
3116
3116
|
return 0;
|
|
3117
3117
|
let t = 0;
|
|
3118
3118
|
return Object.values(e).forEach((n) => {
|
|
3119
|
-
Array.isArray(n) ? t += n.length *
|
|
3119
|
+
Array.isArray(n) ? t += n.length * pn(n[0]) : At(n) ? t += pn(n) : t += 100;
|
|
3120
3120
|
}), t;
|
|
3121
3121
|
}
|
|
3122
|
-
function
|
|
3122
|
+
function pn(e) {
|
|
3123
3123
|
return typeof e == "string" ? e.length * 2 : typeof e == "number" ? 8 : typeof e == "boolean" ? 4 : 0;
|
|
3124
3124
|
}
|
|
3125
|
-
function
|
|
3125
|
+
function pi(e) {
|
|
3126
3126
|
return Dt(e) && "__sentry_fetch_url_host__" in e && typeof e.__sentry_fetch_url_host__ == "string";
|
|
3127
3127
|
}
|
|
3128
|
-
function
|
|
3129
|
-
return
|
|
3128
|
+
function hn(e) {
|
|
3129
|
+
return pi(e) ? `${e.message} (${e.__sentry_fetch_url_host__})` : e.message;
|
|
3130
3130
|
}
|
|
3131
|
-
function
|
|
3131
|
+
function hi(e, t) {
|
|
3132
3132
|
t.debug === !0 && (m ? h.enable() : rt(() => {
|
|
3133
3133
|
console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");
|
|
3134
3134
|
})), x().update(t.initialScope);
|
|
3135
3135
|
const r = new e(t);
|
|
3136
|
-
return
|
|
3136
|
+
return mi(r), r.init(), r;
|
|
3137
3137
|
}
|
|
3138
|
-
function
|
|
3138
|
+
function mi(e) {
|
|
3139
3139
|
x().setClient(e);
|
|
3140
3140
|
}
|
|
3141
|
-
function
|
|
3141
|
+
function Wt(e) {
|
|
3142
3142
|
if (!e)
|
|
3143
3143
|
return {};
|
|
3144
3144
|
const t = e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
|
|
@@ -3155,7 +3155,7 @@ function Gt(e) {
|
|
|
3155
3155
|
// everything minus origin
|
|
3156
3156
|
};
|
|
3157
3157
|
}
|
|
3158
|
-
function
|
|
3158
|
+
function _i(e, t = !0) {
|
|
3159
3159
|
if (e.startsWith("data:")) {
|
|
3160
3160
|
const n = e.match(/^data:([^;,]+)/), r = n ? n[1] : "text/plain", s = e.includes(";base64,"), o = e.indexOf(",");
|
|
3161
3161
|
let i = "";
|
|
@@ -3167,45 +3167,45 @@ function gi(e, t = !0) {
|
|
|
3167
3167
|
}
|
|
3168
3168
|
return e;
|
|
3169
3169
|
}
|
|
3170
|
-
function
|
|
3170
|
+
function gi(e) {
|
|
3171
3171
|
"aggregates" in e ? e.attrs?.ip_address === void 0 && (e.attrs = {
|
|
3172
3172
|
...e.attrs,
|
|
3173
3173
|
ip_address: "{{auto}}"
|
|
3174
3174
|
}) : e.ipAddress === void 0 && (e.ipAddress = "{{auto}}");
|
|
3175
3175
|
}
|
|
3176
|
-
function
|
|
3176
|
+
function yi(e, t, n = [t], r = "npm") {
|
|
3177
3177
|
const s = (e._metadata = e._metadata || {}).sdk = e._metadata.sdk || {};
|
|
3178
3178
|
s.name || (s.name = `sentry.javascript.${t}`, s.packages = n.map((o) => ({
|
|
3179
3179
|
name: `${r}:@sentry/${o}`,
|
|
3180
|
-
version:
|
|
3181
|
-
})), s.version =
|
|
3180
|
+
version: G
|
|
3181
|
+
})), s.version = G);
|
|
3182
3182
|
}
|
|
3183
|
-
const
|
|
3184
|
-
function
|
|
3183
|
+
const Ei = 100;
|
|
3184
|
+
function j(e, t) {
|
|
3185
3185
|
const n = I(), r = V();
|
|
3186
3186
|
if (!n) return;
|
|
3187
|
-
const { beforeBreadcrumb: s = null, maxBreadcrumbs: o =
|
|
3187
|
+
const { beforeBreadcrumb: s = null, maxBreadcrumbs: o = Ei } = n.getOptions();
|
|
3188
3188
|
if (o <= 0) return;
|
|
3189
3189
|
const a = { timestamp: ft(), ...e }, c = s ? rt(() => s(a, t)) : a;
|
|
3190
3190
|
c !== null && (n.emit && n.emit("beforeAddBreadcrumb", c, t), r.addBreadcrumb(c, o));
|
|
3191
3191
|
}
|
|
3192
|
-
let
|
|
3193
|
-
const
|
|
3194
|
-
name:
|
|
3192
|
+
let mn;
|
|
3193
|
+
const Si = "FunctionToString", _n = /* @__PURE__ */ new WeakMap(), Ti = (() => ({
|
|
3194
|
+
name: Si,
|
|
3195
3195
|
setupOnce() {
|
|
3196
|
-
|
|
3196
|
+
mn = Function.prototype.toString;
|
|
3197
3197
|
try {
|
|
3198
3198
|
Function.prototype.toString = function(...e) {
|
|
3199
|
-
const t =
|
|
3200
|
-
return
|
|
3199
|
+
const t = ge(this), n = _n.has(I()) && t !== void 0 ? t : this;
|
|
3200
|
+
return mn.apply(n, e);
|
|
3201
3201
|
};
|
|
3202
3202
|
} catch {
|
|
3203
3203
|
}
|
|
3204
3204
|
},
|
|
3205
3205
|
setup(e) {
|
|
3206
|
-
|
|
3206
|
+
_n.set(e, !0);
|
|
3207
3207
|
}
|
|
3208
|
-
})),
|
|
3208
|
+
})), Ri = Ti, bi = [
|
|
3209
3209
|
/^Script error\.?$/,
|
|
3210
3210
|
/^Javascript error: Script error\.? on line 0$/,
|
|
3211
3211
|
/^ResizeObserver loop completed with undelivered notifications.$/,
|
|
@@ -3226,70 +3226,70 @@ const Ti = "FunctionToString", gn = /* @__PURE__ */ new WeakMap(), Ri = (() => (
|
|
|
3226
3226
|
// unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps
|
|
3227
3227
|
/^Java exception was raised during method invocation$/
|
|
3228
3228
|
// error from Facebook Mobile browser (https://github.com/getsentry/sentry-javascript/issues/15065)
|
|
3229
|
-
],
|
|
3229
|
+
], Ii = "EventFilters", vi = (e = {}) => {
|
|
3230
3230
|
let t;
|
|
3231
3231
|
return {
|
|
3232
|
-
name:
|
|
3232
|
+
name: Ii,
|
|
3233
3233
|
setup(n) {
|
|
3234
3234
|
const r = n.getOptions();
|
|
3235
|
-
t =
|
|
3235
|
+
t = gn(e, r);
|
|
3236
3236
|
},
|
|
3237
3237
|
processEvent(n, r, s) {
|
|
3238
3238
|
if (!t) {
|
|
3239
3239
|
const o = s.getOptions();
|
|
3240
|
-
t =
|
|
3240
|
+
t = gn(e, o);
|
|
3241
3241
|
}
|
|
3242
|
-
return
|
|
3242
|
+
return ki(n, t) ? null : n;
|
|
3243
3243
|
}
|
|
3244
3244
|
};
|
|
3245
3245
|
}, wi = ((e = {}) => ({
|
|
3246
|
-
...
|
|
3246
|
+
...vi(e),
|
|
3247
3247
|
name: "InboundFilters"
|
|
3248
3248
|
}));
|
|
3249
|
-
function
|
|
3249
|
+
function gn(e = {}, t = {}) {
|
|
3250
3250
|
return {
|
|
3251
3251
|
allowUrls: [...e.allowUrls || [], ...t.allowUrls || []],
|
|
3252
3252
|
denyUrls: [...e.denyUrls || [], ...t.denyUrls || []],
|
|
3253
3253
|
ignoreErrors: [
|
|
3254
3254
|
...e.ignoreErrors || [],
|
|
3255
3255
|
...t.ignoreErrors || [],
|
|
3256
|
-
...e.disableErrorDefaults ? [] :
|
|
3256
|
+
...e.disableErrorDefaults ? [] : bi
|
|
3257
3257
|
],
|
|
3258
3258
|
ignoreTransactions: [...e.ignoreTransactions || [], ...t.ignoreTransactions || []]
|
|
3259
3259
|
};
|
|
3260
3260
|
}
|
|
3261
|
-
function
|
|
3261
|
+
function ki(e, t) {
|
|
3262
3262
|
if (e.type) {
|
|
3263
|
-
if (e.type === "transaction" &&
|
|
3263
|
+
if (e.type === "transaction" && Oi(e, t.ignoreTransactions))
|
|
3264
3264
|
return m && h.warn(
|
|
3265
3265
|
`Event dropped due to being matched by \`ignoreTransactions\` option.
|
|
3266
|
-
Event: ${
|
|
3266
|
+
Event: ${q(e)}`
|
|
3267
3267
|
), !0;
|
|
3268
3268
|
} else {
|
|
3269
|
-
if (
|
|
3269
|
+
if (Ni(e, t.ignoreErrors))
|
|
3270
3270
|
return m && h.warn(
|
|
3271
3271
|
`Event dropped due to being matched by \`ignoreErrors\` option.
|
|
3272
|
-
Event: ${
|
|
3272
|
+
Event: ${q(e)}`
|
|
3273
3273
|
), !0;
|
|
3274
|
-
if (
|
|
3274
|
+
if (xi(e))
|
|
3275
3275
|
return m && h.warn(
|
|
3276
3276
|
`Event dropped due to not having an error message, error type or stacktrace.
|
|
3277
|
-
Event: ${
|
|
3277
|
+
Event: ${q(
|
|
3278
3278
|
e
|
|
3279
3279
|
)}`
|
|
3280
3280
|
), !0;
|
|
3281
|
-
if (
|
|
3281
|
+
if (Ci(e, t.denyUrls))
|
|
3282
3282
|
return m && h.warn(
|
|
3283
3283
|
`Event dropped due to being matched by \`denyUrls\` option.
|
|
3284
|
-
Event: ${
|
|
3284
|
+
Event: ${q(
|
|
3285
3285
|
e
|
|
3286
3286
|
)}.
|
|
3287
3287
|
Url: ${Nt(e)}`
|
|
3288
3288
|
), !0;
|
|
3289
|
-
if (!
|
|
3289
|
+
if (!Di(e, t.allowUrls))
|
|
3290
3290
|
return m && h.warn(
|
|
3291
3291
|
`Event dropped due to not being matched by \`allowUrls\` option.
|
|
3292
|
-
Event: ${
|
|
3292
|
+
Event: ${q(
|
|
3293
3293
|
e
|
|
3294
3294
|
)}.
|
|
3295
3295
|
Url: ${Nt(e)}`
|
|
@@ -3297,28 +3297,28 @@ Url: ${Nt(e)}`
|
|
|
3297
3297
|
}
|
|
3298
3298
|
return !1;
|
|
3299
3299
|
}
|
|
3300
|
-
function
|
|
3301
|
-
return t?.length ?
|
|
3300
|
+
function Ni(e, t) {
|
|
3301
|
+
return t?.length ? ur(e).some((n) => Mt(n, t)) : !1;
|
|
3302
3302
|
}
|
|
3303
|
-
function
|
|
3303
|
+
function Oi(e, t) {
|
|
3304
3304
|
if (!t?.length)
|
|
3305
3305
|
return !1;
|
|
3306
3306
|
const n = e.transaction;
|
|
3307
3307
|
return n ? Mt(n, t) : !1;
|
|
3308
3308
|
}
|
|
3309
|
-
function
|
|
3309
|
+
function Ci(e, t) {
|
|
3310
3310
|
if (!t?.length)
|
|
3311
3311
|
return !1;
|
|
3312
3312
|
const n = Nt(e);
|
|
3313
3313
|
return n ? Mt(n, t) : !1;
|
|
3314
3314
|
}
|
|
3315
|
-
function
|
|
3315
|
+
function Di(e, t) {
|
|
3316
3316
|
if (!t?.length)
|
|
3317
3317
|
return !0;
|
|
3318
3318
|
const n = Nt(e);
|
|
3319
3319
|
return n ? Mt(n, t) : !0;
|
|
3320
3320
|
}
|
|
3321
|
-
function
|
|
3321
|
+
function Ai(e = []) {
|
|
3322
3322
|
for (let t = e.length - 1; t >= 0; t--) {
|
|
3323
3323
|
const n = e[t];
|
|
3324
3324
|
if (n && n.filename !== "<anonymous>" && n.filename !== "[native code]")
|
|
@@ -3329,12 +3329,12 @@ function xi(e = []) {
|
|
|
3329
3329
|
function Nt(e) {
|
|
3330
3330
|
try {
|
|
3331
3331
|
const n = [...e.exception?.values ?? []].reverse().find((r) => r.mechanism?.parent_id === void 0 && r.stacktrace?.frames?.length)?.stacktrace?.frames;
|
|
3332
|
-
return n ?
|
|
3332
|
+
return n ? Ai(n) : null;
|
|
3333
3333
|
} catch {
|
|
3334
|
-
return m && h.error(`Cannot extract url for event ${
|
|
3334
|
+
return m && h.error(`Cannot extract url for event ${q(e)}`), null;
|
|
3335
3335
|
}
|
|
3336
3336
|
}
|
|
3337
|
-
function
|
|
3337
|
+
function xi(e) {
|
|
3338
3338
|
return e.exception?.values?.length ? (
|
|
3339
3339
|
// No top-level message
|
|
3340
3340
|
!e.message && // There are no exception values that have a stacktrace, a non-generic-Error type or value
|
|
@@ -3342,7 +3342,7 @@ function Fi(e) {
|
|
|
3342
3342
|
) : !1;
|
|
3343
3343
|
}
|
|
3344
3344
|
function $i(e, t, n, r, s, o) {
|
|
3345
|
-
if (!s.exception?.values || !o || !
|
|
3345
|
+
if (!s.exception?.values || !o || !H(o.originalException, Error))
|
|
3346
3346
|
return;
|
|
3347
3347
|
const i = s.exception.values.length > 0 ? s.exception.values[s.exception.values.length - 1] : void 0;
|
|
3348
3348
|
i && (s.exception.values = se(
|
|
@@ -3360,10 +3360,10 @@ function se(e, t, n, r, s, o, i, a) {
|
|
|
3360
3360
|
if (o.length >= n + 1)
|
|
3361
3361
|
return o;
|
|
3362
3362
|
let c = [...o];
|
|
3363
|
-
if (
|
|
3364
|
-
|
|
3363
|
+
if (H(r[s], Error)) {
|
|
3364
|
+
yn(i, a, r);
|
|
3365
3365
|
const u = e(t, r[s]), d = c.length;
|
|
3366
|
-
|
|
3366
|
+
En(u, s, d, a), c = se(
|
|
3367
3367
|
e,
|
|
3368
3368
|
t,
|
|
3369
3369
|
n,
|
|
@@ -3374,11 +3374,11 @@ function se(e, t, n, r, s, o, i, a) {
|
|
|
3374
3374
|
d
|
|
3375
3375
|
);
|
|
3376
3376
|
}
|
|
3377
|
-
return
|
|
3378
|
-
if (
|
|
3379
|
-
|
|
3377
|
+
return hr(r) && r.errors.forEach((u, d) => {
|
|
3378
|
+
if (H(u, Error)) {
|
|
3379
|
+
yn(i, a, r);
|
|
3380
3380
|
const l = e(t, u), p = c.length;
|
|
3381
|
-
|
|
3381
|
+
En(l, `errors[${d}]`, p, a), c = se(
|
|
3382
3382
|
e,
|
|
3383
3383
|
t,
|
|
3384
3384
|
n,
|
|
@@ -3391,19 +3391,19 @@ function se(e, t, n, r, s, o, i, a) {
|
|
|
3391
3391
|
}
|
|
3392
3392
|
}), c;
|
|
3393
3393
|
}
|
|
3394
|
-
function
|
|
3394
|
+
function hr(e) {
|
|
3395
3395
|
return Array.isArray(e.errors);
|
|
3396
3396
|
}
|
|
3397
|
-
function
|
|
3397
|
+
function yn(e, t, n) {
|
|
3398
3398
|
e.mechanism = {
|
|
3399
3399
|
handled: !0,
|
|
3400
3400
|
type: "auto.core.linked_errors",
|
|
3401
|
-
...
|
|
3401
|
+
...hr(n) && { is_exception_group: !0 },
|
|
3402
3402
|
...e.mechanism,
|
|
3403
3403
|
exception_id: t
|
|
3404
3404
|
};
|
|
3405
3405
|
}
|
|
3406
|
-
function
|
|
3406
|
+
function En(e, t, n, r) {
|
|
3407
3407
|
e.mechanism = {
|
|
3408
3408
|
handled: !0,
|
|
3409
3409
|
...e.mechanism,
|
|
@@ -3413,51 +3413,51 @@ function Sn(e, t, n, r) {
|
|
|
3413
3413
|
parent_id: r
|
|
3414
3414
|
};
|
|
3415
3415
|
}
|
|
3416
|
-
function
|
|
3416
|
+
function Fi(e) {
|
|
3417
3417
|
const t = "console";
|
|
3418
|
-
K(t, e), Y(t,
|
|
3418
|
+
K(t, e), Y(t, Mi);
|
|
3419
3419
|
}
|
|
3420
|
-
function
|
|
3420
|
+
function Mi() {
|
|
3421
3421
|
"console" in E && $r.forEach(function(e) {
|
|
3422
|
-
e in E.console &&
|
|
3423
|
-
return
|
|
3424
|
-
D("console", { args: n, level: e }),
|
|
3422
|
+
e in E.console && k(E.console, e, function(t) {
|
|
3423
|
+
return wt[e] = t, function(...n) {
|
|
3424
|
+
D("console", { args: n, level: e }), wt[e]?.apply(E.console, n);
|
|
3425
3425
|
};
|
|
3426
3426
|
});
|
|
3427
3427
|
});
|
|
3428
3428
|
}
|
|
3429
|
-
function
|
|
3429
|
+
function Pi(e) {
|
|
3430
3430
|
return e === "warn" ? "warning" : ["fatal", "error", "warning", "log", "info", "debug"].includes(e) ? e : "log";
|
|
3431
3431
|
}
|
|
3432
|
-
const
|
|
3432
|
+
const Ui = "Dedupe", Li = (() => {
|
|
3433
3433
|
let e;
|
|
3434
3434
|
return {
|
|
3435
|
-
name:
|
|
3435
|
+
name: Ui,
|
|
3436
3436
|
processEvent(t) {
|
|
3437
3437
|
if (t.type)
|
|
3438
3438
|
return t;
|
|
3439
3439
|
try {
|
|
3440
|
-
if (
|
|
3440
|
+
if (Bi(t, e))
|
|
3441
3441
|
return m && h.warn("Event dropped due to being a duplicate of previously captured event."), null;
|
|
3442
3442
|
} catch {
|
|
3443
3443
|
}
|
|
3444
3444
|
return e = t;
|
|
3445
3445
|
}
|
|
3446
3446
|
};
|
|
3447
|
-
}),
|
|
3448
|
-
function
|
|
3449
|
-
return t ? !!(
|
|
3447
|
+
}), Hi = Li;
|
|
3448
|
+
function Bi(e, t) {
|
|
3449
|
+
return t ? !!(ji(e, t) || Vi(e, t)) : !1;
|
|
3450
3450
|
}
|
|
3451
|
-
function
|
|
3451
|
+
function ji(e, t) {
|
|
3452
3452
|
const n = e.message, r = t.message;
|
|
3453
|
-
return !(!n && !r || n && !r || !n && r || n !== r || !
|
|
3453
|
+
return !(!n && !r || n && !r || !n && r || n !== r || !_r(e, t) || !mr(e, t));
|
|
3454
3454
|
}
|
|
3455
3455
|
function Vi(e, t) {
|
|
3456
|
-
const n =
|
|
3457
|
-
return !(!n || !r || n.type !== r.type || n.value !== r.value || !
|
|
3456
|
+
const n = Sn(t), r = Sn(e);
|
|
3457
|
+
return !(!n || !r || n.type !== r.type || n.value !== r.value || !_r(e, t) || !mr(e, t));
|
|
3458
3458
|
}
|
|
3459
|
-
function
|
|
3460
|
-
let n =
|
|
3459
|
+
function mr(e, t) {
|
|
3460
|
+
let n = Ae(e), r = Ae(t);
|
|
3461
3461
|
if (!n && !r)
|
|
3462
3462
|
return !0;
|
|
3463
3463
|
if (n && !r || !n && r || (n = n, r = r, r.length !== n.length))
|
|
@@ -3469,7 +3469,7 @@ function _r(e, t) {
|
|
|
3469
3469
|
}
|
|
3470
3470
|
return !0;
|
|
3471
3471
|
}
|
|
3472
|
-
function
|
|
3472
|
+
function _r(e, t) {
|
|
3473
3473
|
let n = e.fingerprint, r = t.fingerprint;
|
|
3474
3474
|
if (!n && !r)
|
|
3475
3475
|
return !0;
|
|
@@ -3482,27 +3482,27 @@ function gr(e, t) {
|
|
|
3482
3482
|
return !1;
|
|
3483
3483
|
}
|
|
3484
3484
|
}
|
|
3485
|
-
function
|
|
3485
|
+
function Sn(e) {
|
|
3486
3486
|
return e.exception?.values?.[0];
|
|
3487
3487
|
}
|
|
3488
|
-
const
|
|
3489
|
-
name:
|
|
3488
|
+
const zi = "ConversationId", Wi = (() => ({
|
|
3489
|
+
name: zi,
|
|
3490
3490
|
setup(e) {
|
|
3491
3491
|
e.on("spanStart", (t) => {
|
|
3492
3492
|
const n = x().getScopeData(), r = V().getScopeData(), s = n.conversationId || r.conversationId;
|
|
3493
|
-
s && t.setAttribute(
|
|
3493
|
+
s && t.setAttribute(bs, s);
|
|
3494
3494
|
});
|
|
3495
3495
|
}
|
|
3496
|
-
})), qi =
|
|
3497
|
-
function
|
|
3496
|
+
})), qi = Wi;
|
|
3497
|
+
function gr(e) {
|
|
3498
3498
|
if (e !== void 0)
|
|
3499
3499
|
return e >= 400 && e < 500 ? "warning" : e >= 500 ? "error" : void 0;
|
|
3500
3500
|
}
|
|
3501
3501
|
const dt = E;
|
|
3502
|
-
function
|
|
3502
|
+
function Gi() {
|
|
3503
3503
|
return "history" in dt && !!dt.history;
|
|
3504
3504
|
}
|
|
3505
|
-
function
|
|
3505
|
+
function Xi() {
|
|
3506
3506
|
if (!("fetch" in dt))
|
|
3507
3507
|
return !1;
|
|
3508
3508
|
try {
|
|
@@ -3514,10 +3514,10 @@ function Ki() {
|
|
|
3514
3514
|
function oe(e) {
|
|
3515
3515
|
return e && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString());
|
|
3516
3516
|
}
|
|
3517
|
-
function
|
|
3517
|
+
function Ki() {
|
|
3518
3518
|
if (typeof EdgeRuntime == "string")
|
|
3519
3519
|
return !0;
|
|
3520
|
-
if (!
|
|
3520
|
+
if (!Xi())
|
|
3521
3521
|
return !1;
|
|
3522
3522
|
if (oe(dt.fetch))
|
|
3523
3523
|
return !0;
|
|
@@ -3532,14 +3532,14 @@ function Yi() {
|
|
|
3532
3532
|
}
|
|
3533
3533
|
return e;
|
|
3534
3534
|
}
|
|
3535
|
-
function
|
|
3535
|
+
function Yi(e, t) {
|
|
3536
3536
|
const n = "fetch";
|
|
3537
|
-
K(n, e), Y(n, () =>
|
|
3537
|
+
K(n, e), Y(n, () => Ji(void 0, t));
|
|
3538
3538
|
}
|
|
3539
|
-
function
|
|
3540
|
-
t && !
|
|
3539
|
+
function Ji(e, t = !1) {
|
|
3540
|
+
t && !Ki() || k(E, "fetch", function(n) {
|
|
3541
3541
|
return function(...r) {
|
|
3542
|
-
const s = new Error(), { method: o, url: i } =
|
|
3542
|
+
const s = new Error(), { method: o, url: i } = Zi(r), a = {
|
|
3543
3543
|
args: r,
|
|
3544
3544
|
fetchData: {
|
|
3545
3545
|
method: o,
|
|
@@ -3548,7 +3548,7 @@ function Zi(e, t = !1) {
|
|
|
3548
3548
|
startTimestamp: P() * 1e3,
|
|
3549
3549
|
// // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation
|
|
3550
3550
|
virtualError: s,
|
|
3551
|
-
headers:
|
|
3551
|
+
headers: Qi(r)
|
|
3552
3552
|
};
|
|
3553
3553
|
return D("fetch", {
|
|
3554
3554
|
...a
|
|
@@ -3563,12 +3563,12 @@ function Zi(e, t = !1) {
|
|
|
3563
3563
|
...a,
|
|
3564
3564
|
endTimestamp: P() * 1e3,
|
|
3565
3565
|
error: c
|
|
3566
|
-
}), Dt(c) && c.stack === void 0 && (c.stack = s.stack,
|
|
3566
|
+
}), Dt(c) && c.stack === void 0 && (c.stack = s.stack, B(c, "framesToPop", 1));
|
|
3567
3567
|
const d = I()?.getOptions().enhanceFetchErrorMessages ?? "always";
|
|
3568
3568
|
if (d !== !1 && c instanceof TypeError && (c.message === "Failed to fetch" || c.message === "Load failed" || c.message === "NetworkError when attempting to fetch resource."))
|
|
3569
3569
|
try {
|
|
3570
3570
|
const f = new URL(a.fetchData.url).host;
|
|
3571
|
-
d === "always" ? c.message = `${c.message} (${f})` :
|
|
3571
|
+
d === "always" ? c.message = `${c.message} (${f})` : B(c, "__sentry_fetch_url_host__", f);
|
|
3572
3572
|
} catch {
|
|
3573
3573
|
}
|
|
3574
3574
|
throw c;
|
|
@@ -3580,47 +3580,47 @@ function Zi(e, t = !1) {
|
|
|
3580
3580
|
function bt(e, t) {
|
|
3581
3581
|
return !!e && typeof e == "object" && !!e[t];
|
|
3582
3582
|
}
|
|
3583
|
-
function
|
|
3583
|
+
function Tn(e) {
|
|
3584
3584
|
return typeof e == "string" ? e : e ? bt(e, "url") ? e.url : e.toString ? e.toString() : "" : "";
|
|
3585
3585
|
}
|
|
3586
|
-
function
|
|
3586
|
+
function Zi(e) {
|
|
3587
3587
|
if (e.length === 0)
|
|
3588
3588
|
return { method: "GET", url: "" };
|
|
3589
3589
|
if (e.length === 2) {
|
|
3590
3590
|
const [n, r] = e;
|
|
3591
3591
|
return {
|
|
3592
|
-
url:
|
|
3592
|
+
url: Tn(n),
|
|
3593
3593
|
method: bt(r, "method") ? String(r.method).toUpperCase() : (
|
|
3594
3594
|
// Request object as first argument
|
|
3595
|
-
|
|
3595
|
+
Mn(n) && bt(n, "method") ? String(n.method).toUpperCase() : "GET"
|
|
3596
3596
|
)
|
|
3597
3597
|
};
|
|
3598
3598
|
}
|
|
3599
3599
|
const t = e[0];
|
|
3600
3600
|
return {
|
|
3601
|
-
url:
|
|
3601
|
+
url: Tn(t),
|
|
3602
3602
|
method: bt(t, "method") ? String(t.method).toUpperCase() : "GET"
|
|
3603
3603
|
};
|
|
3604
3604
|
}
|
|
3605
|
-
function
|
|
3605
|
+
function Qi(e) {
|
|
3606
3606
|
const [t, n] = e;
|
|
3607
3607
|
try {
|
|
3608
3608
|
if (typeof n == "object" && n !== null && "headers" in n && n.headers)
|
|
3609
3609
|
return new Headers(n.headers);
|
|
3610
|
-
if (
|
|
3610
|
+
if (Mn(t))
|
|
3611
3611
|
return new Headers(t.headers);
|
|
3612
3612
|
} catch {
|
|
3613
3613
|
}
|
|
3614
3614
|
}
|
|
3615
|
-
function
|
|
3615
|
+
function ta() {
|
|
3616
3616
|
return "npm";
|
|
3617
3617
|
}
|
|
3618
|
-
const
|
|
3618
|
+
const T = E;
|
|
3619
3619
|
let ie = 0;
|
|
3620
|
-
function
|
|
3620
|
+
function yr() {
|
|
3621
3621
|
return ie > 0;
|
|
3622
3622
|
}
|
|
3623
|
-
function
|
|
3623
|
+
function ea() {
|
|
3624
3624
|
ie++, setTimeout(() => {
|
|
3625
3625
|
ie--;
|
|
3626
3626
|
});
|
|
@@ -3635,7 +3635,7 @@ function et(e, t = {}) {
|
|
|
3635
3635
|
const s = e.__sentry_wrapped__;
|
|
3636
3636
|
if (s)
|
|
3637
3637
|
return typeof s == "function" ? s : e;
|
|
3638
|
-
if (
|
|
3638
|
+
if (ge(e))
|
|
3639
3639
|
return e;
|
|
3640
3640
|
} catch {
|
|
3641
3641
|
return e;
|
|
@@ -3645,11 +3645,11 @@ function et(e, t = {}) {
|
|
|
3645
3645
|
const o = s.map((i) => et(i, t));
|
|
3646
3646
|
return e.apply(this, o);
|
|
3647
3647
|
} catch (o) {
|
|
3648
|
-
throw
|
|
3648
|
+
throw ea(), _s((i) => {
|
|
3649
3649
|
i.addEventProcessor((a) => (t.mechanism && (Yt(a, void 0), Z(a, t.mechanism)), a.extra = {
|
|
3650
3650
|
...a.extra,
|
|
3651
3651
|
arguments: s
|
|
3652
|
-
}, a)),
|
|
3652
|
+
}, a)), Qn(o);
|
|
3653
3653
|
}), o;
|
|
3654
3654
|
}
|
|
3655
3655
|
};
|
|
@@ -3658,7 +3658,7 @@ function et(e, t = {}) {
|
|
|
3658
3658
|
Object.prototype.hasOwnProperty.call(e, s) && (r[s] = e[s]);
|
|
3659
3659
|
} catch {
|
|
3660
3660
|
}
|
|
3661
|
-
|
|
3661
|
+
Un(r, e), B(e, "__sentry_wrapped__", r);
|
|
3662
3662
|
try {
|
|
3663
3663
|
Object.getOwnPropertyDescriptor(r, "name").configurable && Object.defineProperty(r, "name", {
|
|
3664
3664
|
get() {
|
|
@@ -3669,8 +3669,8 @@ function et(e, t = {}) {
|
|
|
3669
3669
|
}
|
|
3670
3670
|
return r;
|
|
3671
3671
|
}
|
|
3672
|
-
function
|
|
3673
|
-
const e =
|
|
3672
|
+
function na() {
|
|
3673
|
+
const e = _e(), { referrer: t } = T.document || {}, { userAgent: n } = T.navigator || {}, r = {
|
|
3674
3674
|
...t && { Referer: t },
|
|
3675
3675
|
...n && { "User-Agent": n }
|
|
3676
3676
|
};
|
|
@@ -3679,21 +3679,21 @@ function ra() {
|
|
|
3679
3679
|
headers: r
|
|
3680
3680
|
};
|
|
3681
3681
|
}
|
|
3682
|
-
function
|
|
3683
|
-
const n =
|
|
3684
|
-
type:
|
|
3685
|
-
value:
|
|
3682
|
+
function Ie(e, t) {
|
|
3683
|
+
const n = ve(e, t), r = {
|
|
3684
|
+
type: aa(t),
|
|
3685
|
+
value: ca(t)
|
|
3686
3686
|
};
|
|
3687
3687
|
return n.length && (r.stacktrace = { frames: n }), r.type === void 0 && r.value === "" && (r.value = "Unrecoverable error caught"), r;
|
|
3688
3688
|
}
|
|
3689
|
-
function
|
|
3690
|
-
const o = I()?.getOptions().normalizeDepth, i =
|
|
3691
|
-
__serialized__:
|
|
3689
|
+
function ra(e, t, n, r) {
|
|
3690
|
+
const o = I()?.getOptions().normalizeDepth, i = pa(t), a = {
|
|
3691
|
+
__serialized__: Yn(t, o)
|
|
3692
3692
|
};
|
|
3693
3693
|
if (i)
|
|
3694
3694
|
return {
|
|
3695
3695
|
exception: {
|
|
3696
|
-
values: [
|
|
3696
|
+
values: [Ie(e, i)]
|
|
3697
3697
|
},
|
|
3698
3698
|
extra: a
|
|
3699
3699
|
};
|
|
@@ -3702,74 +3702,74 @@ function sa(e, t, n, r) {
|
|
|
3702
3702
|
values: [
|
|
3703
3703
|
{
|
|
3704
3704
|
type: xt(t) ? t.constructor.name : r ? "UnhandledRejection" : "Error",
|
|
3705
|
-
value:
|
|
3705
|
+
value: la(t, { isUnhandledRejection: r })
|
|
3706
3706
|
}
|
|
3707
3707
|
]
|
|
3708
3708
|
},
|
|
3709
3709
|
extra: a
|
|
3710
3710
|
};
|
|
3711
3711
|
if (n) {
|
|
3712
|
-
const u =
|
|
3712
|
+
const u = ve(e, n);
|
|
3713
3713
|
u.length && (c.exception.values[0].stacktrace = { frames: u });
|
|
3714
3714
|
}
|
|
3715
3715
|
return c;
|
|
3716
3716
|
}
|
|
3717
|
-
function
|
|
3717
|
+
function qt(e, t) {
|
|
3718
3718
|
return {
|
|
3719
3719
|
exception: {
|
|
3720
|
-
values: [
|
|
3720
|
+
values: [Ie(e, t)]
|
|
3721
3721
|
}
|
|
3722
3722
|
};
|
|
3723
3723
|
}
|
|
3724
|
-
function
|
|
3725
|
-
const n = t.stacktrace || t.stack || "", r =
|
|
3724
|
+
function ve(e, t) {
|
|
3725
|
+
const n = t.stacktrace || t.stack || "", r = oa(t), s = ia(t);
|
|
3726
3726
|
try {
|
|
3727
3727
|
return e(n, r, s);
|
|
3728
3728
|
} catch {
|
|
3729
3729
|
}
|
|
3730
3730
|
return [];
|
|
3731
3731
|
}
|
|
3732
|
-
const
|
|
3733
|
-
function
|
|
3734
|
-
return e &&
|
|
3732
|
+
const sa = /Minified React error #\d+;/i;
|
|
3733
|
+
function oa(e) {
|
|
3734
|
+
return e && sa.test(e.message) ? 1 : 0;
|
|
3735
3735
|
}
|
|
3736
|
-
function
|
|
3736
|
+
function ia(e) {
|
|
3737
3737
|
return typeof e.framesToPop == "number" ? e.framesToPop : 0;
|
|
3738
3738
|
}
|
|
3739
|
-
function
|
|
3739
|
+
function Er(e) {
|
|
3740
3740
|
return typeof WebAssembly < "u" && typeof WebAssembly.Exception < "u" ? e instanceof WebAssembly.Exception : !1;
|
|
3741
3741
|
}
|
|
3742
|
-
function
|
|
3742
|
+
function aa(e) {
|
|
3743
3743
|
const t = e?.name;
|
|
3744
|
-
return !t &&
|
|
3744
|
+
return !t && Er(e) ? e.message && Array.isArray(e.message) && e.message.length == 2 ? e.message[0] : "WebAssembly.Exception" : t;
|
|
3745
3745
|
}
|
|
3746
|
-
function
|
|
3746
|
+
function ca(e) {
|
|
3747
3747
|
const t = e?.message;
|
|
3748
|
-
return
|
|
3748
|
+
return Er(e) ? Array.isArray(e.message) && e.message.length == 2 ? e.message[1] : "wasm exception" : t ? t.error && typeof t.error.message == "string" ? hn(t.error) : hn(e) : "No error message";
|
|
3749
3749
|
}
|
|
3750
|
-
function
|
|
3750
|
+
function ua(e, t, n, r) {
|
|
3751
3751
|
const s = n?.syntheticException || void 0, o = we(e, t, s, r);
|
|
3752
3752
|
return Z(o), o.level = "error", n?.event_id && (o.event_id = n.event_id), mt(o);
|
|
3753
3753
|
}
|
|
3754
|
-
function
|
|
3754
|
+
function da(e, t, n = "info", r, s) {
|
|
3755
3755
|
const o = r?.syntheticException || void 0, i = ae(e, t, o, s);
|
|
3756
3756
|
return i.level = n, r?.event_id && (i.event_id = r.event_id), mt(i);
|
|
3757
3757
|
}
|
|
3758
3758
|
function we(e, t, n, r, s) {
|
|
3759
3759
|
let o;
|
|
3760
3760
|
if ($n(t) && t.error)
|
|
3761
|
-
return
|
|
3762
|
-
if ($e(t) ||
|
|
3761
|
+
return qt(e, t.error);
|
|
3762
|
+
if ($e(t) || Gr(t)) {
|
|
3763
3763
|
const i = t;
|
|
3764
3764
|
if ("stack" in t)
|
|
3765
|
-
o =
|
|
3765
|
+
o = qt(e, t);
|
|
3766
3766
|
else {
|
|
3767
3767
|
const a = i.name || ($e(i) ? "DOMError" : "DOMException"), c = i.message ? `${a}: ${i.message}` : a;
|
|
3768
3768
|
o = ae(e, c, n, r), Yt(o, c);
|
|
3769
3769
|
}
|
|
3770
3770
|
return "code" in i && (o.tags = { ...o.tags, "DOMException.code": `${i.code}` }), o;
|
|
3771
3771
|
}
|
|
3772
|
-
return Dt(t) ?
|
|
3772
|
+
return Dt(t) ? qt(e, t) : ct(t) || xt(t) ? (o = ra(e, t, n, s), Z(o, {
|
|
3773
3773
|
synthetic: !0
|
|
3774
3774
|
}), o) : (o = ae(e, t, n, r), Yt(o, `${t}`), Z(o, {
|
|
3775
3775
|
synthetic: !0
|
|
@@ -3778,12 +3778,12 @@ function we(e, t, n, r, s) {
|
|
|
3778
3778
|
function ae(e, t, n, r) {
|
|
3779
3779
|
const s = {};
|
|
3780
3780
|
if (r && n) {
|
|
3781
|
-
const o =
|
|
3781
|
+
const o = ve(e, n);
|
|
3782
3782
|
o.length && (s.exception = {
|
|
3783
3783
|
values: [{ value: t, stacktrace: { frames: o } }]
|
|
3784
3784
|
}), Z(s, { synthetic: !0 });
|
|
3785
3785
|
}
|
|
3786
|
-
if (
|
|
3786
|
+
if (he(t)) {
|
|
3787
3787
|
const { __sentry_template_string__: o, __sentry_template_values__: i } = t;
|
|
3788
3788
|
return s.logentry = {
|
|
3789
3789
|
message: o,
|
|
@@ -3792,18 +3792,18 @@ function ae(e, t, n, r) {
|
|
|
3792
3792
|
}
|
|
3793
3793
|
return s.message = t, s;
|
|
3794
3794
|
}
|
|
3795
|
-
function
|
|
3796
|
-
const n =
|
|
3797
|
-
return $n(e) ? `Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\`` : xt(e) ? `Event \`${
|
|
3795
|
+
function la(e, { isUnhandledRejection: t }) {
|
|
3796
|
+
const n = ts(e), r = t ? "promise rejection" : "exception";
|
|
3797
|
+
return $n(e) ? `Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\`` : xt(e) ? `Event \`${fa(e)}\` (type=${e.type}) captured as ${r}` : `Object captured as ${r} with keys: ${n}`;
|
|
3798
3798
|
}
|
|
3799
|
-
function
|
|
3799
|
+
function fa(e) {
|
|
3800
3800
|
try {
|
|
3801
3801
|
const t = Object.getPrototypeOf(e);
|
|
3802
3802
|
return t ? t.constructor.name : void 0;
|
|
3803
3803
|
} catch {
|
|
3804
3804
|
}
|
|
3805
3805
|
}
|
|
3806
|
-
function
|
|
3806
|
+
function pa(e) {
|
|
3807
3807
|
for (const t in e)
|
|
3808
3808
|
if (Object.prototype.hasOwnProperty.call(e, t)) {
|
|
3809
3809
|
const n = e[t];
|
|
@@ -3811,15 +3811,15 @@ function ha(e) {
|
|
|
3811
3811
|
return n;
|
|
3812
3812
|
}
|
|
3813
3813
|
}
|
|
3814
|
-
class
|
|
3814
|
+
class ha extends ci {
|
|
3815
3815
|
/**
|
|
3816
3816
|
* Creates a new Browser SDK instance.
|
|
3817
3817
|
*
|
|
3818
3818
|
* @param options Configuration options for this SDK.
|
|
3819
3819
|
*/
|
|
3820
3820
|
constructor(t) {
|
|
3821
|
-
const n =
|
|
3822
|
-
|
|
3821
|
+
const n = ma(t), r = T.SENTRY_SDK_SOURCE || ta();
|
|
3822
|
+
yi(n, "browser", ["browser"], r), n._metadata?.sdk && (n._metadata.sdk.settings = {
|
|
3823
3823
|
infer_ip: n.sendDefaultPii ? "auto" : "never",
|
|
3824
3824
|
// purposefully allowing already passed settings to override the default
|
|
3825
3825
|
...n._metadata.sdk.settings
|
|
@@ -3831,21 +3831,21 @@ class ma extends ui {
|
|
|
3831
3831
|
_experiments: a,
|
|
3832
3832
|
enableMetrics: c
|
|
3833
3833
|
} = this._options, u = c ?? a?.enableMetrics ?? !0;
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
}), s && this.on("beforeSendSession",
|
|
3834
|
+
T.document && (o || i || u) && T.document.addEventListener("visibilitychange", () => {
|
|
3835
|
+
T.document.visibilityState === "hidden" && (o && this._flushOutcomes(), i && ne(this), u && or(this));
|
|
3836
|
+
}), s && this.on("beforeSendSession", gi);
|
|
3837
3837
|
}
|
|
3838
3838
|
/**
|
|
3839
3839
|
* @inheritDoc
|
|
3840
3840
|
*/
|
|
3841
3841
|
eventFromException(t, n) {
|
|
3842
|
-
return
|
|
3842
|
+
return ua(this._options.stackParser, t, n, this._options.attachStacktrace);
|
|
3843
3843
|
}
|
|
3844
3844
|
/**
|
|
3845
3845
|
* @inheritDoc
|
|
3846
3846
|
*/
|
|
3847
3847
|
eventFromMessage(t, n = "info", r) {
|
|
3848
|
-
return
|
|
3848
|
+
return da(this._options.stackParser, t, n, r, this._options.attachStacktrace);
|
|
3849
3849
|
}
|
|
3850
3850
|
/**
|
|
3851
3851
|
* @inheritDoc
|
|
@@ -3854,9 +3854,9 @@ class ma extends ui {
|
|
|
3854
3854
|
return t.platform = t.platform || "javascript", super._prepareEvent(t, n, r, s);
|
|
3855
3855
|
}
|
|
3856
3856
|
}
|
|
3857
|
-
function
|
|
3857
|
+
function ma(e) {
|
|
3858
3858
|
return {
|
|
3859
|
-
release: typeof __SENTRY_RELEASE__ == "string" ? __SENTRY_RELEASE__ :
|
|
3859
|
+
release: typeof __SENTRY_RELEASE__ == "string" ? __SENTRY_RELEASE__ : T.SENTRY_RELEASE?.id,
|
|
3860
3860
|
// This supports the variable that sentry-webpack-plugin injects
|
|
3861
3861
|
sendClientReports: !0,
|
|
3862
3862
|
// We default this to true, as it is the safer scenario
|
|
@@ -3864,24 +3864,24 @@ function _a(e) {
|
|
|
3864
3864
|
...e
|
|
3865
3865
|
};
|
|
3866
3866
|
}
|
|
3867
|
-
const
|
|
3868
|
-
let
|
|
3869
|
-
function
|
|
3870
|
-
K("dom", e), Y("dom",
|
|
3867
|
+
const _a = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, v = E, ga = 1e3;
|
|
3868
|
+
let Rn, ce, ue;
|
|
3869
|
+
function ya(e) {
|
|
3870
|
+
K("dom", e), Y("dom", Ea);
|
|
3871
3871
|
}
|
|
3872
|
-
function
|
|
3872
|
+
function Ea() {
|
|
3873
3873
|
if (!v.document)
|
|
3874
3874
|
return;
|
|
3875
|
-
const e = D.bind(null, "dom"), t =
|
|
3875
|
+
const e = D.bind(null, "dom"), t = bn(e, !0);
|
|
3876
3876
|
v.document.addEventListener("click", t, !1), v.document.addEventListener("keypress", t, !1), ["EventTarget", "Node"].forEach((n) => {
|
|
3877
3877
|
const s = v[n]?.prototype;
|
|
3878
|
-
s?.hasOwnProperty?.("addEventListener") && (
|
|
3878
|
+
s?.hasOwnProperty?.("addEventListener") && (k(s, "addEventListener", function(o) {
|
|
3879
3879
|
return function(i, a, c) {
|
|
3880
3880
|
if (i === "click" || i == "keypress")
|
|
3881
3881
|
try {
|
|
3882
3882
|
const u = this.__sentry_instrumentation_handlers__ = this.__sentry_instrumentation_handlers__ || {}, d = u[i] = u[i] || { refCount: 0 };
|
|
3883
3883
|
if (!d.handler) {
|
|
3884
|
-
const l =
|
|
3884
|
+
const l = bn(e);
|
|
3885
3885
|
d.handler = l, o.call(this, i, l, c);
|
|
3886
3886
|
}
|
|
3887
3887
|
d.refCount++;
|
|
@@ -3889,7 +3889,7 @@ function Sa() {
|
|
|
3889
3889
|
}
|
|
3890
3890
|
return o.call(this, i, a, c);
|
|
3891
3891
|
};
|
|
3892
|
-
}),
|
|
3892
|
+
}), k(
|
|
3893
3893
|
s,
|
|
3894
3894
|
"removeEventListener",
|
|
3895
3895
|
function(o) {
|
|
@@ -3906,7 +3906,7 @@ function Sa() {
|
|
|
3906
3906
|
));
|
|
3907
3907
|
});
|
|
3908
3908
|
}
|
|
3909
|
-
function
|
|
3909
|
+
function Sa(e) {
|
|
3910
3910
|
if (e.type !== ce)
|
|
3911
3911
|
return !1;
|
|
3912
3912
|
try {
|
|
@@ -3916,24 +3916,24 @@ function Ta(e) {
|
|
|
3916
3916
|
}
|
|
3917
3917
|
return !0;
|
|
3918
3918
|
}
|
|
3919
|
-
function
|
|
3919
|
+
function Ta(e, t) {
|
|
3920
3920
|
return e !== "keypress" ? !1 : t?.tagName ? !(t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable) : !0;
|
|
3921
3921
|
}
|
|
3922
|
-
function
|
|
3922
|
+
function bn(e, t = !1) {
|
|
3923
3923
|
return (n) => {
|
|
3924
3924
|
if (!n || n._sentryCaptured)
|
|
3925
3925
|
return;
|
|
3926
|
-
const r =
|
|
3927
|
-
if (
|
|
3926
|
+
const r = Ra(n);
|
|
3927
|
+
if (Ta(n.type, r))
|
|
3928
3928
|
return;
|
|
3929
|
-
|
|
3929
|
+
B(n, "_sentryCaptured", !0), r && !r._sentryId && B(r, "_sentryId", O());
|
|
3930
3930
|
const s = n.type === "keypress" ? "input" : n.type;
|
|
3931
|
-
|
|
3931
|
+
Sa(n) || (e({ event: n, name: s, global: t }), ce = n.type, ue = r ? r._sentryId : void 0), clearTimeout(Rn), Rn = v.setTimeout(() => {
|
|
3932
3932
|
ue = void 0, ce = void 0;
|
|
3933
|
-
},
|
|
3933
|
+
}, ga);
|
|
3934
3934
|
};
|
|
3935
3935
|
}
|
|
3936
|
-
function
|
|
3936
|
+
function Ra(e) {
|
|
3937
3937
|
try {
|
|
3938
3938
|
return e.target;
|
|
3939
3939
|
} catch {
|
|
@@ -3941,23 +3941,23 @@ function ba(e) {
|
|
|
3941
3941
|
}
|
|
3942
3942
|
}
|
|
3943
3943
|
let gt;
|
|
3944
|
-
function
|
|
3944
|
+
function Sr(e) {
|
|
3945
3945
|
const t = "history";
|
|
3946
|
-
K(t, e), Y(t,
|
|
3946
|
+
K(t, e), Y(t, ba);
|
|
3947
3947
|
}
|
|
3948
|
-
function
|
|
3948
|
+
function ba() {
|
|
3949
3949
|
if (v.addEventListener("popstate", () => {
|
|
3950
3950
|
const t = v.location.href, n = gt;
|
|
3951
3951
|
if (gt = t, n === t)
|
|
3952
3952
|
return;
|
|
3953
3953
|
D("history", { from: n, to: t });
|
|
3954
|
-
}), !
|
|
3954
|
+
}), !Gi())
|
|
3955
3955
|
return;
|
|
3956
3956
|
function e(t) {
|
|
3957
3957
|
return function(...n) {
|
|
3958
3958
|
const r = n.length > 2 ? n[2] : void 0;
|
|
3959
3959
|
if (r) {
|
|
3960
|
-
const s = gt, o =
|
|
3960
|
+
const s = gt, o = Ia(String(r));
|
|
3961
3961
|
if (gt = o, s === o)
|
|
3962
3962
|
return t.apply(this, n);
|
|
3963
3963
|
D("history", { from: s, to: o });
|
|
@@ -3965,9 +3965,9 @@ function Ia() {
|
|
|
3965
3965
|
return t.apply(this, n);
|
|
3966
3966
|
};
|
|
3967
3967
|
}
|
|
3968
|
-
|
|
3968
|
+
k(v.history, "pushState", e), k(v.history, "replaceState", e);
|
|
3969
3969
|
}
|
|
3970
|
-
function
|
|
3970
|
+
function Ia(e) {
|
|
3971
3971
|
try {
|
|
3972
3972
|
return new URL(e, v.location.origin).toString();
|
|
3973
3973
|
} catch {
|
|
@@ -3975,7 +3975,7 @@ function va(e) {
|
|
|
3975
3975
|
}
|
|
3976
3976
|
}
|
|
3977
3977
|
const It = {};
|
|
3978
|
-
function
|
|
3978
|
+
function va(e) {
|
|
3979
3979
|
const t = It[e];
|
|
3980
3980
|
if (t)
|
|
3981
3981
|
return t;
|
|
@@ -3990,7 +3990,7 @@ function ka(e) {
|
|
|
3990
3990
|
const o = s.contentWindow;
|
|
3991
3991
|
o?.[e] && (n = o[e]), r.head.removeChild(s);
|
|
3992
3992
|
} catch (s) {
|
|
3993
|
-
|
|
3993
|
+
_a && h.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `, s);
|
|
3994
3994
|
}
|
|
3995
3995
|
return n && (It[e] = n.bind(v));
|
|
3996
3996
|
}
|
|
@@ -3998,16 +3998,16 @@ function wa(e) {
|
|
|
3998
3998
|
It[e] = void 0;
|
|
3999
3999
|
}
|
|
4000
4000
|
const at = "__sentry_xhr_v3__";
|
|
4001
|
-
function
|
|
4002
|
-
K("xhr", e), Y("xhr",
|
|
4001
|
+
function ka(e) {
|
|
4002
|
+
K("xhr", e), Y("xhr", Na);
|
|
4003
4003
|
}
|
|
4004
|
-
function
|
|
4004
|
+
function Na() {
|
|
4005
4005
|
if (!v.XMLHttpRequest)
|
|
4006
4006
|
return;
|
|
4007
4007
|
const e = XMLHttpRequest.prototype;
|
|
4008
4008
|
e.open = new Proxy(e.open, {
|
|
4009
4009
|
apply(t, n, r) {
|
|
4010
|
-
const s = new Error(), o = P() * 1e3, i = M(r[0]) ? r[0].toUpperCase() : void 0, a =
|
|
4010
|
+
const s = new Error(), o = P() * 1e3, i = M(r[0]) ? r[0].toUpperCase() : void 0, a = Oa(r[1]);
|
|
4011
4011
|
if (!i || !a)
|
|
4012
4012
|
return t.apply(n, r);
|
|
4013
4013
|
n[at] = {
|
|
@@ -4056,7 +4056,7 @@ function Oa() {
|
|
|
4056
4056
|
}
|
|
4057
4057
|
});
|
|
4058
4058
|
}
|
|
4059
|
-
function
|
|
4059
|
+
function Oa(e) {
|
|
4060
4060
|
if (M(e))
|
|
4061
4061
|
return e;
|
|
4062
4062
|
try {
|
|
@@ -4064,8 +4064,8 @@ function Ca(e) {
|
|
|
4064
4064
|
} catch {
|
|
4065
4065
|
}
|
|
4066
4066
|
}
|
|
4067
|
-
const
|
|
4068
|
-
function
|
|
4067
|
+
const Ca = 40;
|
|
4068
|
+
function Da(e, t = va("fetch")) {
|
|
4069
4069
|
let n = 0, r = 0;
|
|
4070
4070
|
async function s(o) {
|
|
4071
4071
|
const i = o.body.length;
|
|
@@ -4104,13 +4104,13 @@ function Aa(e, t = ka("fetch")) {
|
|
|
4104
4104
|
n -= i, r--;
|
|
4105
4105
|
}
|
|
4106
4106
|
}
|
|
4107
|
-
return
|
|
4107
|
+
return ri(
|
|
4108
4108
|
e,
|
|
4109
4109
|
s,
|
|
4110
|
-
|
|
4110
|
+
be(e.bufferSize || Ca)
|
|
4111
4111
|
);
|
|
4112
4112
|
}
|
|
4113
|
-
const Pt = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__,
|
|
4113
|
+
const Pt = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, Aa = 30, xa = 50;
|
|
4114
4114
|
function de(e, t, n, r) {
|
|
4115
4115
|
const s = {
|
|
4116
4116
|
filename: e,
|
|
@@ -4120,8 +4120,8 @@ function de(e, t, n, r) {
|
|
|
4120
4120
|
};
|
|
4121
4121
|
return n !== void 0 && (s.lineno = n), r !== void 0 && (s.colno = r), s;
|
|
4122
4122
|
}
|
|
4123
|
-
const $a = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i,
|
|
4124
|
-
const t = e.match(
|
|
4123
|
+
const $a = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Fa = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, Ma = /\((\S*)(?::(\d+))(?::(\d+))\)/, Pa = /at (.+?) ?\(data:(.+?),/, Ua = (e) => {
|
|
4124
|
+
const t = e.match(Pa);
|
|
4125
4125
|
if (t)
|
|
4126
4126
|
return {
|
|
4127
4127
|
filename: `<data:${t[2]}>`,
|
|
@@ -4132,32 +4132,32 @@ const $a = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Ma = /^\s*at (?:(.+?\)(?: \
|
|
|
4132
4132
|
const [, s, o, i] = n;
|
|
4133
4133
|
return de(s, X, +o, +i);
|
|
4134
4134
|
}
|
|
4135
|
-
const r =
|
|
4135
|
+
const r = Fa.exec(e);
|
|
4136
4136
|
if (r) {
|
|
4137
4137
|
if (r[2] && r[2].indexOf("eval") === 0) {
|
|
4138
|
-
const a =
|
|
4138
|
+
const a = Ma.exec(r[2]);
|
|
4139
4139
|
a && (r[2] = a[1], r[3] = a[2], r[4] = a[3]);
|
|
4140
4140
|
}
|
|
4141
|
-
const [o, i] =
|
|
4141
|
+
const [o, i] = Tr(r[1] || X, r[2]);
|
|
4142
4142
|
return de(i, o, r[3] ? +r[3] : void 0, r[4] ? +r[4] : void 0);
|
|
4143
4143
|
}
|
|
4144
|
-
},
|
|
4145
|
-
const t =
|
|
4144
|
+
}, La = [Aa, Ua], Ha = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i, Ba = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, ja = (e) => {
|
|
4145
|
+
const t = Ha.exec(e);
|
|
4146
4146
|
if (t) {
|
|
4147
4147
|
if (t[3] && t[3].indexOf(" > eval") > -1) {
|
|
4148
|
-
const o =
|
|
4148
|
+
const o = Ba.exec(t[3]);
|
|
4149
4149
|
o && (t[1] = t[1] || "eval", t[3] = o[1], t[4] = o[2], t[5] = "");
|
|
4150
4150
|
}
|
|
4151
4151
|
let r = t[3], s = t[1] || X;
|
|
4152
|
-
return [s, r] =
|
|
4152
|
+
return [s, r] = Tr(s, r), de(r, s, t[4] ? +t[4] : void 0, t[5] ? +t[5] : void 0);
|
|
4153
4153
|
}
|
|
4154
|
-
}, Va = [
|
|
4154
|
+
}, Va = [xa, ja], za = [La, Va], Wa = Dn(...za), Tr = (e, t) => {
|
|
4155
4155
|
const n = e.indexOf("safari-extension") !== -1, r = e.indexOf("safari-web-extension") !== -1;
|
|
4156
4156
|
return n || r ? [
|
|
4157
4157
|
e.indexOf("@") !== -1 ? e.split("@")[0] : X,
|
|
4158
4158
|
n ? `safari-extension:${t}` : `safari-web-extension:${t}`
|
|
4159
4159
|
] : [e, t];
|
|
4160
|
-
}, yt = 1024, qa = "Breadcrumbs",
|
|
4160
|
+
}, yt = 1024, qa = "Breadcrumbs", Ga = ((e = {}) => {
|
|
4161
4161
|
const t = {
|
|
4162
4162
|
console: !0,
|
|
4163
4163
|
dom: !0,
|
|
@@ -4170,18 +4170,18 @@ const $a = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Ma = /^\s*at (?:(.+?\)(?: \
|
|
|
4170
4170
|
return {
|
|
4171
4171
|
name: qa,
|
|
4172
4172
|
setup(n) {
|
|
4173
|
-
t.console &&
|
|
4173
|
+
t.console && Fi(Ja(n)), t.dom && ya(Ya(n, t.dom)), t.xhr && ka(Za(n)), t.fetch && Yi(Qa(n)), t.history && Sr(tc(n)), t.sentry && n.on("beforeSendEvent", Ka(n));
|
|
4174
4174
|
}
|
|
4175
4175
|
};
|
|
4176
|
-
}),
|
|
4177
|
-
function
|
|
4176
|
+
}), Xa = Ga;
|
|
4177
|
+
function Ka(e) {
|
|
4178
4178
|
return function(n) {
|
|
4179
|
-
I() === e &&
|
|
4179
|
+
I() === e && j(
|
|
4180
4180
|
{
|
|
4181
4181
|
category: `sentry.${n.type === "transaction" ? "transaction" : "event"}`,
|
|
4182
4182
|
event_id: n.event_id,
|
|
4183
4183
|
level: n.level,
|
|
4184
|
-
message:
|
|
4184
|
+
message: q(n)
|
|
4185
4185
|
},
|
|
4186
4186
|
{
|
|
4187
4187
|
event: n
|
|
@@ -4189,7 +4189,7 @@ function Ya(e) {
|
|
|
4189
4189
|
);
|
|
4190
4190
|
};
|
|
4191
4191
|
}
|
|
4192
|
-
function
|
|
4192
|
+
function Ya(e, t) {
|
|
4193
4193
|
return function(r) {
|
|
4194
4194
|
if (I() !== e)
|
|
4195
4195
|
return;
|
|
@@ -4198,8 +4198,8 @@ function Ja(e, t) {
|
|
|
4198
4198
|
`\`dom.maxStringLength\` cannot exceed ${yt}, but a value of ${a} was configured. Sentry will use ${yt} instead.`
|
|
4199
4199
|
), a = yt), typeof i == "string" && (i = [i]);
|
|
4200
4200
|
try {
|
|
4201
|
-
const u = r.event, d =
|
|
4202
|
-
s =
|
|
4201
|
+
const u = r.event, d = ec(u) ? u.target : u;
|
|
4202
|
+
s = Pn(d, { keyAttrs: i, maxStringLength: a }), o = Qr(d);
|
|
4203
4203
|
} catch {
|
|
4204
4204
|
s = "<unknown>";
|
|
4205
4205
|
}
|
|
@@ -4209,14 +4209,14 @@ function Ja(e, t) {
|
|
|
4209
4209
|
category: `ui.${r.name}`,
|
|
4210
4210
|
message: s
|
|
4211
4211
|
};
|
|
4212
|
-
o && (c.data = { "ui.component_name": o }),
|
|
4212
|
+
o && (c.data = { "ui.component_name": o }), j(c, {
|
|
4213
4213
|
event: r.event,
|
|
4214
4214
|
name: r.name,
|
|
4215
4215
|
global: r.global
|
|
4216
4216
|
});
|
|
4217
4217
|
};
|
|
4218
4218
|
}
|
|
4219
|
-
function
|
|
4219
|
+
function Ja(e) {
|
|
4220
4220
|
return function(n) {
|
|
4221
4221
|
if (I() !== e)
|
|
4222
4222
|
return;
|
|
@@ -4226,21 +4226,21 @@ function Za(e) {
|
|
|
4226
4226
|
arguments: n.args,
|
|
4227
4227
|
logger: "console"
|
|
4228
4228
|
},
|
|
4229
|
-
level:
|
|
4230
|
-
message:
|
|
4229
|
+
level: Pi(n.level),
|
|
4230
|
+
message: Pe(n.args, " ")
|
|
4231
4231
|
};
|
|
4232
4232
|
if (n.level === "assert")
|
|
4233
4233
|
if (n.args[0] === !1)
|
|
4234
|
-
r.message = `Assertion failed: ${
|
|
4234
|
+
r.message = `Assertion failed: ${Pe(n.args.slice(1), " ") || "console.assert"}`, r.data.arguments = n.args.slice(1);
|
|
4235
4235
|
else
|
|
4236
4236
|
return;
|
|
4237
|
-
|
|
4237
|
+
j(r, {
|
|
4238
4238
|
input: n.args,
|
|
4239
4239
|
level: n.level
|
|
4240
4240
|
});
|
|
4241
4241
|
};
|
|
4242
4242
|
}
|
|
4243
|
-
function
|
|
4243
|
+
function Za(e) {
|
|
4244
4244
|
return function(n) {
|
|
4245
4245
|
if (I() !== e)
|
|
4246
4246
|
return;
|
|
@@ -4260,12 +4260,12 @@ function Qa(e) {
|
|
|
4260
4260
|
category: "xhr",
|
|
4261
4261
|
data: d,
|
|
4262
4262
|
type: "http",
|
|
4263
|
-
level:
|
|
4263
|
+
level: gr(c)
|
|
4264
4264
|
};
|
|
4265
|
-
e.emit("beforeOutgoingRequestBreadcrumb", p, l),
|
|
4265
|
+
e.emit("beforeOutgoingRequestBreadcrumb", p, l), j(p, l);
|
|
4266
4266
|
};
|
|
4267
4267
|
}
|
|
4268
|
-
function
|
|
4268
|
+
function Qa(e) {
|
|
4269
4269
|
return function(n) {
|
|
4270
4270
|
if (I() !== e)
|
|
4271
4271
|
return;
|
|
@@ -4283,7 +4283,7 @@ function tc(e) {
|
|
|
4283
4283
|
level: "error",
|
|
4284
4284
|
type: "http"
|
|
4285
4285
|
};
|
|
4286
|
-
e.emit("beforeOutgoingRequestBreadcrumb", a, i),
|
|
4286
|
+
e.emit("beforeOutgoingRequestBreadcrumb", a, i), j(a, i);
|
|
4287
4287
|
} else {
|
|
4288
4288
|
const o = n.response, i = {
|
|
4289
4289
|
...n.fetchData,
|
|
@@ -4299,21 +4299,21 @@ function tc(e) {
|
|
|
4299
4299
|
category: "fetch",
|
|
4300
4300
|
data: i,
|
|
4301
4301
|
type: "http",
|
|
4302
|
-
level:
|
|
4302
|
+
level: gr(i.status_code)
|
|
4303
4303
|
};
|
|
4304
|
-
e.emit("beforeOutgoingRequestBreadcrumb", c, a),
|
|
4304
|
+
e.emit("beforeOutgoingRequestBreadcrumb", c, a), j(c, a);
|
|
4305
4305
|
}
|
|
4306
4306
|
};
|
|
4307
4307
|
}
|
|
4308
|
-
function
|
|
4308
|
+
function tc(e) {
|
|
4309
4309
|
return function(n) {
|
|
4310
4310
|
if (I() !== e)
|
|
4311
4311
|
return;
|
|
4312
4312
|
let r = n.from, s = n.to;
|
|
4313
|
-
const o =
|
|
4314
|
-
let i = r ?
|
|
4315
|
-
const a =
|
|
4316
|
-
i?.path || (i = o), o.protocol === a.protocol && o.host === a.host && (s = a.relative), o.protocol === i.protocol && o.host === i.host && (r = i.relative),
|
|
4313
|
+
const o = Wt(T.location.href);
|
|
4314
|
+
let i = r ? Wt(r) : void 0;
|
|
4315
|
+
const a = Wt(s);
|
|
4316
|
+
i?.path || (i = o), o.protocol === a.protocol && o.host === a.host && (s = a.relative), o.protocol === i.protocol && o.host === i.host && (r = i.relative), j({
|
|
4317
4317
|
category: "navigation",
|
|
4318
4318
|
data: {
|
|
4319
4319
|
from: r,
|
|
@@ -4322,10 +4322,10 @@ function ec(e) {
|
|
|
4322
4322
|
});
|
|
4323
4323
|
};
|
|
4324
4324
|
}
|
|
4325
|
-
function
|
|
4325
|
+
function ec(e) {
|
|
4326
4326
|
return !!e && !!e.target;
|
|
4327
4327
|
}
|
|
4328
|
-
const
|
|
4328
|
+
const nc = [
|
|
4329
4329
|
"EventTarget",
|
|
4330
4330
|
"Window",
|
|
4331
4331
|
"Node",
|
|
@@ -4357,7 +4357,7 @@ const rc = [
|
|
|
4357
4357
|
"XMLHttpRequest",
|
|
4358
4358
|
"XMLHttpRequestEventTarget",
|
|
4359
4359
|
"XMLHttpRequestUpload"
|
|
4360
|
-
],
|
|
4360
|
+
], rc = "BrowserApiErrors", sc = ((e = {}) => {
|
|
4361
4361
|
const t = {
|
|
4362
4362
|
XMLHttpRequest: !0,
|
|
4363
4363
|
eventTarget: !0,
|
|
@@ -4368,34 +4368,34 @@ const rc = [
|
|
|
4368
4368
|
...e
|
|
4369
4369
|
};
|
|
4370
4370
|
return {
|
|
4371
|
-
name:
|
|
4371
|
+
name: rc,
|
|
4372
4372
|
// TODO: This currently only works for the first client this is setup
|
|
4373
4373
|
// We may want to adjust this to check for client etc.
|
|
4374
4374
|
setupOnce() {
|
|
4375
|
-
t.setTimeout &&
|
|
4375
|
+
t.setTimeout && k(T, "setTimeout", In), t.setInterval && k(T, "setInterval", In), t.requestAnimationFrame && k(T, "requestAnimationFrame", ic), t.XMLHttpRequest && "XMLHttpRequest" in T && k(XMLHttpRequest.prototype, "send", ac);
|
|
4376
4376
|
const n = t.eventTarget;
|
|
4377
|
-
n && (Array.isArray(n) ? n :
|
|
4377
|
+
n && (Array.isArray(n) ? n : nc).forEach((s) => cc(s, t));
|
|
4378
4378
|
}
|
|
4379
4379
|
};
|
|
4380
|
-
}),
|
|
4381
|
-
function
|
|
4380
|
+
}), oc = sc;
|
|
4381
|
+
function In(e) {
|
|
4382
4382
|
return function(...t) {
|
|
4383
4383
|
const n = t[0];
|
|
4384
4384
|
return t[0] = et(n, {
|
|
4385
4385
|
mechanism: {
|
|
4386
4386
|
handled: !1,
|
|
4387
|
-
type: `auto.browser.browserapierrors.${
|
|
4387
|
+
type: `auto.browser.browserapierrors.${L(e)}`
|
|
4388
4388
|
}
|
|
4389
4389
|
}), e.apply(this, t);
|
|
4390
4390
|
};
|
|
4391
4391
|
}
|
|
4392
|
-
function
|
|
4392
|
+
function ic(e) {
|
|
4393
4393
|
return function(t) {
|
|
4394
4394
|
return e.apply(this, [
|
|
4395
4395
|
et(t, {
|
|
4396
4396
|
mechanism: {
|
|
4397
4397
|
data: {
|
|
4398
|
-
handler:
|
|
4398
|
+
handler: L(e)
|
|
4399
4399
|
},
|
|
4400
4400
|
handled: !1,
|
|
4401
4401
|
type: "auto.browser.browserapierrors.requestAnimationFrame"
|
|
@@ -4404,34 +4404,34 @@ function ac(e) {
|
|
|
4404
4404
|
]);
|
|
4405
4405
|
};
|
|
4406
4406
|
}
|
|
4407
|
-
function
|
|
4407
|
+
function ac(e) {
|
|
4408
4408
|
return function(...t) {
|
|
4409
4409
|
const n = this;
|
|
4410
4410
|
return ["onload", "onerror", "onprogress", "onreadystatechange"].forEach((s) => {
|
|
4411
|
-
s in n && typeof n[s] == "function" &&
|
|
4411
|
+
s in n && typeof n[s] == "function" && k(n, s, function(o) {
|
|
4412
4412
|
const i = {
|
|
4413
4413
|
mechanism: {
|
|
4414
4414
|
data: {
|
|
4415
|
-
handler:
|
|
4415
|
+
handler: L(o)
|
|
4416
4416
|
},
|
|
4417
4417
|
handled: !1,
|
|
4418
4418
|
type: `auto.browser.browserapierrors.xhr.${s}`
|
|
4419
4419
|
}
|
|
4420
|
-
}, a =
|
|
4421
|
-
return a && (i.mechanism.data.handler =
|
|
4420
|
+
}, a = ge(o);
|
|
4421
|
+
return a && (i.mechanism.data.handler = L(a)), et(o, i);
|
|
4422
4422
|
});
|
|
4423
4423
|
}), e.apply(this, t);
|
|
4424
4424
|
};
|
|
4425
4425
|
}
|
|
4426
|
-
function
|
|
4427
|
-
const r =
|
|
4428
|
-
r?.hasOwnProperty?.("addEventListener") && (
|
|
4426
|
+
function cc(e, t) {
|
|
4427
|
+
const r = T[e]?.prototype;
|
|
4428
|
+
r?.hasOwnProperty?.("addEventListener") && (k(r, "addEventListener", function(s) {
|
|
4429
4429
|
return function(o, i, a) {
|
|
4430
4430
|
try {
|
|
4431
|
-
|
|
4431
|
+
uc(i) && (i.handleEvent = et(i.handleEvent, {
|
|
4432
4432
|
mechanism: {
|
|
4433
4433
|
data: {
|
|
4434
|
-
handler:
|
|
4434
|
+
handler: L(i),
|
|
4435
4435
|
target: e
|
|
4436
4436
|
},
|
|
4437
4437
|
handled: !1,
|
|
@@ -4440,12 +4440,12 @@ function uc(e, t) {
|
|
|
4440
4440
|
}));
|
|
4441
4441
|
} catch {
|
|
4442
4442
|
}
|
|
4443
|
-
return t.unregisterOriginalCallbacks &&
|
|
4443
|
+
return t.unregisterOriginalCallbacks && dc(this, o, i), s.apply(this, [
|
|
4444
4444
|
o,
|
|
4445
4445
|
et(i, {
|
|
4446
4446
|
mechanism: {
|
|
4447
4447
|
data: {
|
|
4448
|
-
handler:
|
|
4448
|
+
handler: L(i),
|
|
4449
4449
|
target: e
|
|
4450
4450
|
},
|
|
4451
4451
|
handled: !1,
|
|
@@ -4455,7 +4455,7 @@ function uc(e, t) {
|
|
|
4455
4455
|
a
|
|
4456
4456
|
]);
|
|
4457
4457
|
};
|
|
4458
|
-
}),
|
|
4458
|
+
}), k(r, "removeEventListener", function(s) {
|
|
4459
4459
|
return function(o, i, a) {
|
|
4460
4460
|
try {
|
|
4461
4461
|
const c = i.__sentry_wrapped__;
|
|
@@ -4466,45 +4466,45 @@ function uc(e, t) {
|
|
|
4466
4466
|
};
|
|
4467
4467
|
}));
|
|
4468
4468
|
}
|
|
4469
|
-
function
|
|
4469
|
+
function uc(e) {
|
|
4470
4470
|
return typeof e.handleEvent == "function";
|
|
4471
4471
|
}
|
|
4472
|
-
function
|
|
4472
|
+
function dc(e, t, n) {
|
|
4473
4473
|
e && typeof e == "object" && "removeEventListener" in e && typeof e.removeEventListener == "function" && e.removeEventListener(t, n);
|
|
4474
4474
|
}
|
|
4475
|
-
const
|
|
4475
|
+
const lc = (e = {}) => {
|
|
4476
4476
|
const t = e.lifecycle ?? "route";
|
|
4477
4477
|
return {
|
|
4478
4478
|
name: "BrowserSession",
|
|
4479
4479
|
setupOnce() {
|
|
4480
|
-
if (typeof
|
|
4480
|
+
if (typeof T.document > "u") {
|
|
4481
4481
|
Pt && h.warn("Using the `browserSessionIntegration` in non-browser environments is not supported.");
|
|
4482
4482
|
return;
|
|
4483
4483
|
}
|
|
4484
|
-
|
|
4484
|
+
rn({ ignoreDuration: !0 }), Vt();
|
|
4485
4485
|
const n = V();
|
|
4486
4486
|
let r = n.getUser();
|
|
4487
4487
|
n.addScopeListener((s) => {
|
|
4488
4488
|
const o = s.getUser();
|
|
4489
|
-
(r?.id !== o?.id || r?.ip_address !== o?.ip_address) && (
|
|
4490
|
-
}), t === "route" &&
|
|
4491
|
-
s !== o && (
|
|
4489
|
+
(r?.id !== o?.id || r?.ip_address !== o?.ip_address) && (Vt(), r = o);
|
|
4490
|
+
}), t === "route" && Sr(({ from: s, to: o }) => {
|
|
4491
|
+
s !== o && (rn({ ignoreDuration: !0 }), Vt());
|
|
4492
4492
|
});
|
|
4493
4493
|
}
|
|
4494
4494
|
};
|
|
4495
|
-
},
|
|
4496
|
-
name:
|
|
4495
|
+
}, fc = "CultureContext", pc = (() => ({
|
|
4496
|
+
name: fc,
|
|
4497
4497
|
preprocessEvent(e) {
|
|
4498
|
-
const t =
|
|
4498
|
+
const t = mc();
|
|
4499
4499
|
t && (e.contexts = {
|
|
4500
4500
|
...e.contexts,
|
|
4501
4501
|
culture: { ...t, ...e.contexts?.culture }
|
|
4502
4502
|
});
|
|
4503
4503
|
}
|
|
4504
|
-
})),
|
|
4505
|
-
function
|
|
4504
|
+
})), hc = pc;
|
|
4505
|
+
function mc() {
|
|
4506
4506
|
try {
|
|
4507
|
-
const e =
|
|
4507
|
+
const e = T.Intl;
|
|
4508
4508
|
if (!e)
|
|
4509
4509
|
return;
|
|
4510
4510
|
const t = e.DateTimeFormat().resolvedOptions();
|
|
@@ -4517,34 +4517,34 @@ function _c() {
|
|
|
4517
4517
|
return;
|
|
4518
4518
|
}
|
|
4519
4519
|
}
|
|
4520
|
-
const
|
|
4520
|
+
const _c = "GlobalHandlers", gc = ((e = {}) => {
|
|
4521
4521
|
const t = {
|
|
4522
4522
|
onerror: !0,
|
|
4523
4523
|
onunhandledrejection: !0,
|
|
4524
4524
|
...e
|
|
4525
4525
|
};
|
|
4526
4526
|
return {
|
|
4527
|
-
name:
|
|
4527
|
+
name: _c,
|
|
4528
4528
|
setupOnce() {
|
|
4529
4529
|
Error.stackTraceLimit = 50;
|
|
4530
4530
|
},
|
|
4531
4531
|
setup(n) {
|
|
4532
|
-
t.onerror && (
|
|
4532
|
+
t.onerror && (Ec(n), vn("onerror")), t.onunhandledrejection && (Sc(n), vn("onunhandledrejection"));
|
|
4533
4533
|
}
|
|
4534
4534
|
};
|
|
4535
|
-
}),
|
|
4536
|
-
function
|
|
4535
|
+
}), yc = gc;
|
|
4536
|
+
function Ec(e) {
|
|
4537
4537
|
Vr((t) => {
|
|
4538
|
-
const { stackParser: n, attachStacktrace: r } =
|
|
4539
|
-
if (I() !== e ||
|
|
4538
|
+
const { stackParser: n, attachStacktrace: r } = Rr();
|
|
4539
|
+
if (I() !== e || yr())
|
|
4540
4540
|
return;
|
|
4541
|
-
const { msg: s, url: o, line: i, column: a, error: c } = t, u =
|
|
4541
|
+
const { msg: s, url: o, line: i, column: a, error: c } = t, u = bc(
|
|
4542
4542
|
we(n, c || s, void 0, r, !1),
|
|
4543
4543
|
o,
|
|
4544
4544
|
i,
|
|
4545
4545
|
a
|
|
4546
4546
|
);
|
|
4547
|
-
u.level = "error",
|
|
4547
|
+
u.level = "error", tr(u, {
|
|
4548
4548
|
originalException: c,
|
|
4549
4549
|
mechanism: {
|
|
4550
4550
|
handled: !1,
|
|
@@ -4553,13 +4553,13 @@ function Sc(e) {
|
|
|
4553
4553
|
});
|
|
4554
4554
|
});
|
|
4555
4555
|
}
|
|
4556
|
-
function
|
|
4557
|
-
|
|
4558
|
-
const { stackParser: n, attachStacktrace: r } =
|
|
4559
|
-
if (I() !== e ||
|
|
4556
|
+
function Sc(e) {
|
|
4557
|
+
Wr((t) => {
|
|
4558
|
+
const { stackParser: n, attachStacktrace: r } = Rr();
|
|
4559
|
+
if (I() !== e || yr())
|
|
4560
4560
|
return;
|
|
4561
|
-
const s =
|
|
4562
|
-
o.level = "error",
|
|
4561
|
+
const s = Tc(t), o = At(s) ? Rc(s) : we(n, s, void 0, r, !0);
|
|
4562
|
+
o.level = "error", tr(o, {
|
|
4563
4563
|
originalException: s,
|
|
4564
4564
|
mechanism: {
|
|
4565
4565
|
handled: !1,
|
|
@@ -4568,7 +4568,7 @@ function Tc(e) {
|
|
|
4568
4568
|
});
|
|
4569
4569
|
});
|
|
4570
4570
|
}
|
|
4571
|
-
function
|
|
4571
|
+
function Tc(e) {
|
|
4572
4572
|
if (At(e))
|
|
4573
4573
|
return e;
|
|
4574
4574
|
try {
|
|
@@ -4580,7 +4580,7 @@ function Rc(e) {
|
|
|
4580
4580
|
}
|
|
4581
4581
|
return e;
|
|
4582
4582
|
}
|
|
4583
|
-
function
|
|
4583
|
+
function Rc(e) {
|
|
4584
4584
|
return {
|
|
4585
4585
|
exception: {
|
|
4586
4586
|
values: [
|
|
@@ -4593,8 +4593,8 @@ function bc(e) {
|
|
|
4593
4593
|
}
|
|
4594
4594
|
};
|
|
4595
4595
|
}
|
|
4596
|
-
function
|
|
4597
|
-
const s = e.exception = e.exception || {}, o = s.values = s.values || [], i = o[0] = o[0] || {}, a = i.stacktrace = i.stacktrace || {}, c = a.frames = a.frames || [], u = r, d = n, l =
|
|
4596
|
+
function bc(e, t, n, r) {
|
|
4597
|
+
const s = e.exception = e.exception || {}, o = s.values = s.values || [], i = o[0] = o[0] || {}, a = i.stacktrace = i.stacktrace || {}, c = a.frames = a.frames || [], u = r, d = n, l = Ic(t) ?? _e();
|
|
4598
4598
|
return c.length === 0 && c.push({
|
|
4599
4599
|
colno: u,
|
|
4600
4600
|
filename: l,
|
|
@@ -4603,25 +4603,25 @@ function Ic(e, t, n, r) {
|
|
|
4603
4603
|
lineno: d
|
|
4604
4604
|
}), e;
|
|
4605
4605
|
}
|
|
4606
|
-
function
|
|
4606
|
+
function vn(e) {
|
|
4607
4607
|
Pt && h.log(`Global Handler attached: ${e}`);
|
|
4608
4608
|
}
|
|
4609
|
-
function
|
|
4609
|
+
function Rr() {
|
|
4610
4610
|
return I()?.getOptions() || {
|
|
4611
4611
|
stackParser: () => [],
|
|
4612
4612
|
attachStacktrace: !1
|
|
4613
4613
|
};
|
|
4614
4614
|
}
|
|
4615
|
-
function
|
|
4615
|
+
function Ic(e) {
|
|
4616
4616
|
if (!(!M(e) || e.length === 0))
|
|
4617
|
-
return e.startsWith("data:") ? `<${
|
|
4617
|
+
return e.startsWith("data:") ? `<${_i(e, !1)}>` : e;
|
|
4618
4618
|
}
|
|
4619
|
-
const
|
|
4619
|
+
const vc = () => ({
|
|
4620
4620
|
name: "HttpContext",
|
|
4621
4621
|
preprocessEvent(e) {
|
|
4622
|
-
if (!
|
|
4622
|
+
if (!T.navigator && !T.location && !T.document)
|
|
4623
4623
|
return;
|
|
4624
|
-
const t =
|
|
4624
|
+
const t = na(), n = {
|
|
4625
4625
|
...t.headers,
|
|
4626
4626
|
...e.request?.headers
|
|
4627
4627
|
};
|
|
@@ -4631,15 +4631,15 @@ const kc = () => ({
|
|
|
4631
4631
|
headers: n
|
|
4632
4632
|
};
|
|
4633
4633
|
}
|
|
4634
|
-
}), wc = "cause",
|
|
4635
|
-
const t = e.limit ||
|
|
4634
|
+
}), wc = "cause", kc = 5, Nc = "LinkedErrors", Oc = ((e = {}) => {
|
|
4635
|
+
const t = e.limit || kc, n = e.key || wc;
|
|
4636
4636
|
return {
|
|
4637
|
-
name:
|
|
4637
|
+
name: Nc,
|
|
4638
4638
|
preprocessEvent(r, s, o) {
|
|
4639
4639
|
const i = o.getOptions();
|
|
4640
4640
|
$i(
|
|
4641
4641
|
// This differs from the LinkedErrors integration in core by using a different exceptionFromError function
|
|
4642
|
-
|
|
4642
|
+
Ie,
|
|
4643
4643
|
i.stackParser,
|
|
4644
4644
|
n,
|
|
4645
4645
|
t,
|
|
@@ -4648,79 +4648,79 @@ const kc = () => ({
|
|
|
4648
4648
|
);
|
|
4649
4649
|
}
|
|
4650
4650
|
};
|
|
4651
|
-
}),
|
|
4652
|
-
function
|
|
4653
|
-
return
|
|
4651
|
+
}), Cc = Oc;
|
|
4652
|
+
function Dc() {
|
|
4653
|
+
return Ac() ? (Pt && rt(() => {
|
|
4654
4654
|
console.error(
|
|
4655
4655
|
"[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/"
|
|
4656
4656
|
);
|
|
4657
4657
|
}), !0) : !1;
|
|
4658
4658
|
}
|
|
4659
|
-
function
|
|
4660
|
-
if (typeof
|
|
4659
|
+
function Ac() {
|
|
4660
|
+
if (typeof T.window > "u")
|
|
4661
4661
|
return !1;
|
|
4662
|
-
const e =
|
|
4662
|
+
const e = T;
|
|
4663
4663
|
if (e.nw || !(e.chrome || e.browser)?.runtime?.id)
|
|
4664
4664
|
return !1;
|
|
4665
|
-
const n =
|
|
4666
|
-
return !(
|
|
4665
|
+
const n = _e(), r = ["chrome-extension", "moz-extension", "ms-browser-extension", "safari-web-extension"];
|
|
4666
|
+
return !(T === T.top && r.some((o) => n.startsWith(`${o}://`)));
|
|
4667
4667
|
}
|
|
4668
|
-
function
|
|
4668
|
+
function xc(e) {
|
|
4669
4669
|
return [
|
|
4670
4670
|
// TODO(v11): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`
|
|
4671
4671
|
// eslint-disable-next-line deprecation/deprecation
|
|
4672
4672
|
wi(),
|
|
4673
|
-
|
|
4673
|
+
Ri(),
|
|
4674
4674
|
qi(),
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
|
|
4681
|
-
|
|
4682
|
-
|
|
4675
|
+
oc(),
|
|
4676
|
+
Xa(),
|
|
4677
|
+
yc(),
|
|
4678
|
+
Cc(),
|
|
4679
|
+
Hi(),
|
|
4680
|
+
vc(),
|
|
4681
|
+
hc(),
|
|
4682
|
+
lc()
|
|
4683
4683
|
];
|
|
4684
4684
|
}
|
|
4685
4685
|
function $c(e = {}) {
|
|
4686
|
-
const t = !e.skipBrowserExtensionCheck &&
|
|
4687
|
-
let n = e.defaultIntegrations == null ?
|
|
4686
|
+
const t = !e.skipBrowserExtensionCheck && Dc();
|
|
4687
|
+
let n = e.defaultIntegrations == null ? xc() : e.defaultIntegrations;
|
|
4688
4688
|
const r = {
|
|
4689
4689
|
...e,
|
|
4690
4690
|
enabled: t ? !1 : e.enabled,
|
|
4691
|
-
stackParser:
|
|
4692
|
-
integrations:
|
|
4691
|
+
stackParser: Br(e.stackParser || Wa),
|
|
4692
|
+
integrations: zo({
|
|
4693
4693
|
integrations: e.integrations,
|
|
4694
4694
|
defaultIntegrations: n
|
|
4695
4695
|
}),
|
|
4696
|
-
transport: e.transport ||
|
|
4696
|
+
transport: e.transport || Da
|
|
4697
4697
|
};
|
|
4698
|
-
return
|
|
4698
|
+
return hi(ha, r);
|
|
4699
4699
|
}
|
|
4700
|
-
const
|
|
4701
|
-
class
|
|
4700
|
+
const Fc = "https://06451c8d861702902d2e6b2088fa9b62@o1128948.ingest.us.sentry.io/4509207135387648";
|
|
4701
|
+
class Mc {
|
|
4702
4702
|
constructor(t) {
|
|
4703
4703
|
this.enabled = t;
|
|
4704
4704
|
}
|
|
4705
4705
|
init(t) {
|
|
4706
4706
|
this.enabled && $c({
|
|
4707
|
-
dsn:
|
|
4707
|
+
dsn: Fc,
|
|
4708
4708
|
environment: t,
|
|
4709
4709
|
defaultIntegrations: !1,
|
|
4710
4710
|
tracesSampleRate: 0
|
|
4711
4711
|
});
|
|
4712
4712
|
}
|
|
4713
4713
|
setUser(t) {
|
|
4714
|
-
!this.enabled || !t || (this.flavour = t,
|
|
4714
|
+
!this.enabled || !t || (this.flavour = t, Po({ id: t, username: t }));
|
|
4715
4715
|
}
|
|
4716
4716
|
setTransactionId(t) {
|
|
4717
4717
|
this.txnId = t;
|
|
4718
4718
|
}
|
|
4719
4719
|
addBreadcrumb(t, n, r) {
|
|
4720
|
-
this.enabled &&
|
|
4720
|
+
this.enabled && j({ category: t, message: n, data: r, level: "info", timestamp: Date.now() / 1e3 });
|
|
4721
4721
|
}
|
|
4722
4722
|
captureEvent(t, n) {
|
|
4723
|
-
this.enabled &&
|
|
4723
|
+
this.enabled && Mo(t, {
|
|
4724
4724
|
level: "info",
|
|
4725
4725
|
tags: { txn_id: this.txnId, flavour: this.flavour },
|
|
4726
4726
|
extra: n,
|
|
@@ -4728,7 +4728,7 @@ class Pc {
|
|
|
4728
4728
|
});
|
|
4729
4729
|
}
|
|
4730
4730
|
captureError(t, n) {
|
|
4731
|
-
this.enabled &&
|
|
4731
|
+
this.enabled && Qn(t, {
|
|
4732
4732
|
tags: { txn_id: this.txnId, flavour: this.flavour },
|
|
4733
4733
|
extra: n
|
|
4734
4734
|
});
|
|
@@ -4743,9 +4743,9 @@ const g = {
|
|
|
4743
4743
|
UNAUTHORIZED: 401,
|
|
4744
4744
|
FORBIDDEN: 403
|
|
4745
4745
|
};
|
|
4746
|
-
var
|
|
4746
|
+
var Pc = /* @__PURE__ */ ((e) => (e.NOT_INITIALIZED = "na", e.INIT = "init", e.STOP = "stop", e.COMMIT = "commit", e))(Pc || {}), Uc = /* @__PURE__ */ ((e) => (e.START = "start", e.PAUSE = "pause", e.RESUME = "resume", e.STOP = "stop", e))(Uc || {}), Lc = /* @__PURE__ */ ((e) => (e.EKA_EMR_TEMPLATE = "eka_emr_template", e.CLINICAL_NOTE_TEMPLATE = "clinical_notes_template", e.TRANSCRIPT_TEMPLATE = "transcript_template", e.EKA_EMR_TO_FHIR_TEMPLATE = "eka_emr_to_fhir_template", e.NIC_TEMPLATE = "nic_template", e))(Lc || {}), Hc = /* @__PURE__ */ ((e) => (e.SUCCESS = "success", e.FAILURE = "failure", e.PARTIAL_COMPLETE = "partial_complete", e.IN_PROGRESS = "in-progress", e))(Hc || {}), y = /* @__PURE__ */ ((e) => (e.MICROPHONE = "microphone", e.TXN_INIT_FAILED = "txn_init_failed", e.TXN_LIMIT_EXCEEDED = "txn_limit_exceeded", e.INTERNAL_SERVER_ERROR = "internal_server_error", e.END_RECORDING_FAILED = "end_recording_failed", e.AUDIO_UPLOAD_FAILED = "audio_upload_failed", e.TXN_COMMIT_FAILED = "txn_commit_failed", e.TXN_STATUS_MISMATCH = "txn_status_mismatch", e.NETWORK_ERROR = "network_error", e.UNKNOWN_ERROR = "unknown_error", e.UNAUTHORIZED = "unauthorized", e.FORBIDDEN = "forbidden", e))(y || {}), Bc = /* @__PURE__ */ ((e) => (e.SUCCESS = "success", e.IN_PROGRESS = "in-progress", e.FAILED = "failed", e.CANCELLED = "cancelled", e))(Bc || {}), br = /* @__PURE__ */ ((e) => (e.AWS_CONFIGURE_STATUS = "aws_configure_status", e.FILE_UPLOAD_STATUS = "file_upload_status", e.TRANSACTION_STATUS = "transaction_status", e.TEMPLATE_OPERATION_STATUS = "template_operation_status", e.AUTHENTICATION_STATUS = "authentication_status", e.NETWORK_STATUS = "network_status", e.STORAGE_STATUS = "storage_status", e))(br || {}), vt = /* @__PURE__ */ ((e) => (e.JSON = "json", e.TRANSCRIPT = "transcript", e.MARKDOWN = "markdown", e))(vt || {}), W = /* @__PURE__ */ ((e) => (e.INTERNET_CONNECTIVITY = "INTERNET_CONNECTIVITY", e.SYSTEM_INFO = "SYSTEM_INFO", e.MICROPHONE = "MICROPHONE", e.SHARED_WORKER = "SHARED_WORKER", e.NETWORK_API = "NETWORK_API", e))(W || {}), b = /* @__PURE__ */ ((e) => (e.SUCCESS = "success", e.ERROR = "error", e.WARNING = "warning", e))(b || {});
|
|
4747
4747
|
function _(e, t) {
|
|
4748
|
-
return e instanceof
|
|
4748
|
+
return e instanceof F ? e.status === 401 ? {
|
|
4749
4749
|
error_code: y.UNAUTHORIZED,
|
|
4750
4750
|
status_code: g.UNAUTHORIZED,
|
|
4751
4751
|
message: "Authentication failed. Token may be expired."
|
|
@@ -4775,7 +4775,7 @@ function _(e, t) {
|
|
|
4775
4775
|
message: `${t} ${e}`
|
|
4776
4776
|
};
|
|
4777
4777
|
}
|
|
4778
|
-
class
|
|
4778
|
+
class jc {
|
|
4779
4779
|
constructor(t, n, r) {
|
|
4780
4780
|
this.transport = t, this.hosts = n, this.allianceClient = r;
|
|
4781
4781
|
}
|
|
@@ -5067,7 +5067,7 @@ class Wc {
|
|
|
5067
5067
|
}
|
|
5068
5068
|
}
|
|
5069
5069
|
}
|
|
5070
|
-
const wn = "https://cdn.eka.care/vagus/cmlf0ip4a00000td1dmth2wk3.png",
|
|
5070
|
+
const wn = "https://cdn.eka.care/vagus/cmlf0ip4a00000td1dmth2wk3.png", kn = "https://cdn.eka.care/vagus/cmlf0j9ea00010td1h3mi6zqk.png", Gt = "3cm", Xt = "3.5cm";
|
|
5071
5071
|
class Vc {
|
|
5072
5072
|
constructor(t, n, r) {
|
|
5073
5073
|
this.transport = t, this.hosts = n, this.allianceClient = r;
|
|
@@ -5345,9 +5345,9 @@ class Vc {
|
|
|
5345
5345
|
doctor_id: null,
|
|
5346
5346
|
type: null,
|
|
5347
5347
|
header_img: wn,
|
|
5348
|
-
header_height:
|
|
5348
|
+
header_height: Gt,
|
|
5349
5349
|
header_top_margin: null,
|
|
5350
|
-
footer_img:
|
|
5350
|
+
footer_img: kn,
|
|
5351
5351
|
footer_height: Xt,
|
|
5352
5352
|
margin_left: null,
|
|
5353
5353
|
margin_right: null,
|
|
@@ -5367,9 +5367,9 @@ class Vc {
|
|
|
5367
5367
|
doctor_id: t.docid || null,
|
|
5368
5368
|
type: t.type || null,
|
|
5369
5369
|
header_img: t.header_img || wn,
|
|
5370
|
-
header_height: t.header_img && t.header_height ||
|
|
5370
|
+
header_height: t.header_img && t.header_height || Gt,
|
|
5371
5371
|
header_top_margin: t.header_top_margin || null,
|
|
5372
|
-
footer_img: t.footer_img ||
|
|
5372
|
+
footer_img: t.footer_img || kn,
|
|
5373
5373
|
footer_height: t.footer_img && t.footer_height || Xt,
|
|
5374
5374
|
margin_left: t.margin_left || null,
|
|
5375
5375
|
margin_right: t.margin_right || null,
|
|
@@ -5383,7 +5383,7 @@ class Vc {
|
|
|
5383
5383
|
};
|
|
5384
5384
|
}
|
|
5385
5385
|
}
|
|
5386
|
-
class
|
|
5386
|
+
class zc {
|
|
5387
5387
|
constructor(t, n, r, s, o) {
|
|
5388
5388
|
this.allianceClient = t, this.transport = n, this.hosts = r, this.tracker = s, this.callbackRegistry = o, this.txnID = "", this.storedSession = null;
|
|
5389
5389
|
}
|
|
@@ -5483,7 +5483,7 @@ class Gc {
|
|
|
5483
5483
|
await this.allianceClient.reset();
|
|
5484
5484
|
const n = {
|
|
5485
5485
|
session_id: t.txn_id,
|
|
5486
|
-
status:
|
|
5486
|
+
status: Ir.CREATED,
|
|
5487
5487
|
created_at: new Date(t.created_at * 1e3).toISOString(),
|
|
5488
5488
|
expires_at: t.expires_at,
|
|
5489
5489
|
upload_url: t.upload_url
|
|
@@ -5574,7 +5574,7 @@ class Gc {
|
|
|
5574
5574
|
const r = t || this.txnID;
|
|
5575
5575
|
return r ? this.allianceClient.getSessionStatus(r, n) : {
|
|
5576
5576
|
success: !1,
|
|
5577
|
-
error: new
|
|
5577
|
+
error: new Ne(
|
|
5578
5578
|
"No session ID available. Call initTransaction() first or pass a sessionId.",
|
|
5579
5579
|
y.TXN_STATUS_MISMATCH
|
|
5580
5580
|
)
|
|
@@ -5605,14 +5605,14 @@ class Gc {
|
|
|
5605
5605
|
if (!n)
|
|
5606
5606
|
return {
|
|
5607
5607
|
success: !1,
|
|
5608
|
-
error: new
|
|
5608
|
+
error: new Ne(
|
|
5609
5609
|
"No session ID available. Call initTransaction() first or pass a sessionId.",
|
|
5610
5610
|
y.TXN_STATUS_MISMATCH
|
|
5611
5611
|
)
|
|
5612
5612
|
};
|
|
5613
5613
|
const r = await this.allianceClient.cancelSession(n);
|
|
5614
5614
|
return this.storedSession = null, this.txnID = "", this.callbackRegistry.hasHandlers("onSessionEvent") && await this.callbackRegistry.dispatch("onSessionEvent", {
|
|
5615
|
-
callback_type:
|
|
5615
|
+
callback_type: br.TRANSACTION_STATUS,
|
|
5616
5616
|
status: "info",
|
|
5617
5617
|
message: `Session cancelled: ${r.success ? "success" : r.error.message}`,
|
|
5618
5618
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -5708,13 +5708,13 @@ class Gc {
|
|
|
5708
5708
|
await this.allianceClient.reset(), this.txnID = "", this.storedSession = null;
|
|
5709
5709
|
}
|
|
5710
5710
|
}
|
|
5711
|
-
const
|
|
5711
|
+
const Nn = (e) => {
|
|
5712
5712
|
try {
|
|
5713
5713
|
return JSON.parse(e);
|
|
5714
5714
|
} catch {
|
|
5715
5715
|
return e;
|
|
5716
5716
|
}
|
|
5717
|
-
},
|
|
5717
|
+
}, Wc = (e) => {
|
|
5718
5718
|
try {
|
|
5719
5719
|
const t = atob(e), n = new Uint8Array(t.length);
|
|
5720
5720
|
for (let s = 0; s < t.length; s++)
|
|
@@ -5725,15 +5725,15 @@ const On = (e) => {
|
|
|
5725
5725
|
}
|
|
5726
5726
|
}, qc = (e, t) => {
|
|
5727
5727
|
if (!t || t.trim() === "") return null;
|
|
5728
|
-
const n =
|
|
5728
|
+
const n = Wc(t);
|
|
5729
5729
|
switch (e) {
|
|
5730
5730
|
case vt.JSON:
|
|
5731
|
-
return
|
|
5731
|
+
return Nn(n);
|
|
5732
5732
|
case vt.TRANSCRIPT:
|
|
5733
5733
|
case vt.MARKDOWN:
|
|
5734
5734
|
return n;
|
|
5735
5735
|
default:
|
|
5736
|
-
return
|
|
5736
|
+
return Nn(n);
|
|
5737
5737
|
}
|
|
5738
5738
|
}, Et = (e) => e?.length ? e.map((t) => {
|
|
5739
5739
|
const { value: n } = t;
|
|
@@ -5742,7 +5742,7 @@ const On = (e) => {
|
|
|
5742
5742
|
value: qc(t.type, n)
|
|
5743
5743
|
};
|
|
5744
5744
|
}) : [];
|
|
5745
|
-
class
|
|
5745
|
+
class Gc {
|
|
5746
5746
|
constructor(t, n) {
|
|
5747
5747
|
this.transport = t, this.hosts = n;
|
|
5748
5748
|
}
|
|
@@ -5808,27 +5808,27 @@ class Xc {
|
|
|
5808
5808
|
return s && f.push(`template_id=${s}`), o && f.push(`document_id=${o}`), i && f.push("dlp=true"), f.join("&");
|
|
5809
5809
|
}, p = async () => {
|
|
5810
5810
|
try {
|
|
5811
|
-
const f = l(), S = await this.fetchV3Status(n, f, 2e4), { status_code:
|
|
5811
|
+
const f = l(), S = await this.fetchV3Status(n, f, 2e4), { status_code: R, response: C } = S;
|
|
5812
5812
|
if (Date.now() >= u)
|
|
5813
5813
|
return c(500, null, "Timeout while fetching analysis results.", "timeout");
|
|
5814
|
-
if (
|
|
5814
|
+
if (R === 401 || R === 403)
|
|
5815
5815
|
return c(
|
|
5816
|
-
|
|
5816
|
+
R,
|
|
5817
5817
|
C ?? null,
|
|
5818
5818
|
"Unauthorized or Forbidden",
|
|
5819
5819
|
"failed"
|
|
5820
5820
|
);
|
|
5821
|
-
if (
|
|
5822
|
-
if (
|
|
5821
|
+
if (R === 202 || R === 400 || R >= 500) {
|
|
5822
|
+
if (R === 202 && C && a?.({
|
|
5823
5823
|
txn_id: n,
|
|
5824
5824
|
response: C,
|
|
5825
|
-
status_code:
|
|
5825
|
+
status_code: R,
|
|
5826
5826
|
message: "Partial result received",
|
|
5827
5827
|
poll_status: "in-progress"
|
|
5828
|
-
}),
|
|
5828
|
+
}), R >= 400) {
|
|
5829
5829
|
if (d++, d >= 3)
|
|
5830
5830
|
return c(
|
|
5831
|
-
|
|
5831
|
+
R,
|
|
5832
5832
|
null,
|
|
5833
5833
|
C?.error?.message || "Backend error while fetching results.",
|
|
5834
5834
|
"failed"
|
|
@@ -5838,7 +5838,7 @@ class Xc {
|
|
|
5838
5838
|
return await new Promise((N) => setTimeout(N, 1e3)), p();
|
|
5839
5839
|
}
|
|
5840
5840
|
return c(
|
|
5841
|
-
|
|
5841
|
+
R,
|
|
5842
5842
|
C ?? null,
|
|
5843
5843
|
"Template results generated successfully.",
|
|
5844
5844
|
"success"
|
|
@@ -5886,10 +5886,10 @@ class Xc {
|
|
|
5886
5886
|
};
|
|
5887
5887
|
}
|
|
5888
5888
|
}
|
|
5889
|
-
const
|
|
5890
|
-
class
|
|
5889
|
+
const Xc = 5e3;
|
|
5890
|
+
class Kc {
|
|
5891
5891
|
constructor(t, n) {
|
|
5892
|
-
this.transport = t, this.hosts = n, this.
|
|
5892
|
+
this.transport = t, this.hosts = n, this.microphoneStream = null;
|
|
5893
5893
|
}
|
|
5894
5894
|
async runCompatibilityTest(t) {
|
|
5895
5895
|
const n = [], r = [
|
|
@@ -5911,28 +5911,25 @@ class Jc {
|
|
|
5911
5911
|
this.cleanup();
|
|
5912
5912
|
}
|
|
5913
5913
|
}
|
|
5914
|
-
setCompatiblityTestSharedWorker(t) {
|
|
5915
|
-
this.testSharedWorker = t;
|
|
5916
|
-
}
|
|
5917
5914
|
cleanup() {
|
|
5918
5915
|
try {
|
|
5919
|
-
this.microphoneStream && (this.microphoneStream.getTracks().forEach((t) => t.stop()), this.microphoneStream = null)
|
|
5916
|
+
this.microphoneStream && (this.microphoneStream.getTracks().forEach((t) => t.stop()), this.microphoneStream = null);
|
|
5920
5917
|
} catch (t) {
|
|
5921
5918
|
console.error("Error during cleanup:", t);
|
|
5922
5919
|
}
|
|
5923
5920
|
}
|
|
5924
5921
|
// --- Test 1: Internet Connectivity ---
|
|
5925
5922
|
async checkInternetConnectivity() {
|
|
5926
|
-
const t = Date.now(), n =
|
|
5923
|
+
const t = Date.now(), n = W.INTERNET_CONNECTIVITY;
|
|
5927
5924
|
try {
|
|
5928
5925
|
if (!navigator.onLine)
|
|
5929
5926
|
return this.createTestResult(
|
|
5930
5927
|
n,
|
|
5931
|
-
|
|
5928
|
+
b.ERROR,
|
|
5932
5929
|
"No internet connection detected",
|
|
5933
5930
|
{ isOnline: !1 }
|
|
5934
5931
|
);
|
|
5935
|
-
const r = new AbortController(), s = setTimeout(() => r.abort(),
|
|
5932
|
+
const r = new AbortController(), s = setTimeout(() => r.abort(), Xc);
|
|
5936
5933
|
try {
|
|
5937
5934
|
await fetch("https://www.google.com/favicon.ico", {
|
|
5938
5935
|
mode: "no-cors",
|
|
@@ -5942,14 +5939,14 @@ class Jc {
|
|
|
5942
5939
|
const o = Date.now() - t;
|
|
5943
5940
|
return this.createTestResult(
|
|
5944
5941
|
n,
|
|
5945
|
-
|
|
5942
|
+
b.SUCCESS,
|
|
5946
5943
|
"Internet connection is working properly.",
|
|
5947
5944
|
{ isOnline: !0, pingTime: o }
|
|
5948
5945
|
);
|
|
5949
5946
|
} catch (o) {
|
|
5950
5947
|
return clearTimeout(s), this.createTestResult(
|
|
5951
5948
|
n,
|
|
5952
|
-
|
|
5949
|
+
b.ERROR,
|
|
5953
5950
|
"Unable to reach internet",
|
|
5954
5951
|
{ isOnline: !1 },
|
|
5955
5952
|
o instanceof Error ? o.message : "Fetch failed"
|
|
@@ -5958,7 +5955,7 @@ class Jc {
|
|
|
5958
5955
|
} catch (r) {
|
|
5959
5956
|
return this.createTestResult(
|
|
5960
5957
|
n,
|
|
5961
|
-
|
|
5958
|
+
b.ERROR,
|
|
5962
5959
|
"Error checking internet connectivity",
|
|
5963
5960
|
{ isOnline: !1 },
|
|
5964
5961
|
r instanceof Error ? r.message : "Unknown error"
|
|
@@ -5967,10 +5964,10 @@ class Jc {
|
|
|
5967
5964
|
}
|
|
5968
5965
|
// --- Test 2: System Info ---
|
|
5969
5966
|
async checkSystemInfo() {
|
|
5970
|
-
const t =
|
|
5967
|
+
const t = W.SYSTEM_INFO;
|
|
5971
5968
|
try {
|
|
5972
5969
|
const { browser: n, version: r } = this.detectBrowser(), s = navigator.deviceMemory, o = Intl.DateTimeFormat().resolvedOptions().timeZone, a = (/* @__PURE__ */ new Date()).toISOString(), c = await this.validateTimezone();
|
|
5973
|
-
return c ? this.createTestResult(t,
|
|
5970
|
+
return c ? this.createTestResult(t, b.ERROR, c, {
|
|
5974
5971
|
browser: n,
|
|
5975
5972
|
version: r,
|
|
5976
5973
|
ram: s,
|
|
@@ -5978,14 +5975,14 @@ class Jc {
|
|
|
5978
5975
|
systemTime: a
|
|
5979
5976
|
}) : this.createTestResult(
|
|
5980
5977
|
t,
|
|
5981
|
-
|
|
5978
|
+
b.SUCCESS,
|
|
5982
5979
|
"Your browser and device meet the required specifications.",
|
|
5983
5980
|
{ browser: n, version: r, ram: s, timezone: o, systemTime: a }
|
|
5984
5981
|
);
|
|
5985
5982
|
} catch (n) {
|
|
5986
5983
|
return this.createTestResult(
|
|
5987
5984
|
t,
|
|
5988
|
-
|
|
5985
|
+
b.ERROR,
|
|
5989
5986
|
"Error collecting system information",
|
|
5990
5987
|
void 0,
|
|
5991
5988
|
n instanceof Error ? n.message : "Unknown error"
|
|
@@ -6031,12 +6028,12 @@ class Jc {
|
|
|
6031
6028
|
}
|
|
6032
6029
|
// --- Test 3: Microphone Permission ---
|
|
6033
6030
|
async checkMicrophonePermission() {
|
|
6034
|
-
const t =
|
|
6031
|
+
const t = W.MICROPHONE;
|
|
6035
6032
|
try {
|
|
6036
6033
|
if (!navigator.mediaDevices?.getUserMedia)
|
|
6037
6034
|
return this.createTestResult(
|
|
6038
6035
|
t,
|
|
6039
|
-
|
|
6036
|
+
b.ERROR,
|
|
6040
6037
|
"getUserMedia is not supported in this browser",
|
|
6041
6038
|
{ permission: "denied" }
|
|
6042
6039
|
);
|
|
@@ -6044,7 +6041,7 @@ class Jc {
|
|
|
6044
6041
|
const n = await navigator.mediaDevices.getUserMedia({ audio: !0 }), r = n.getAudioTracks()[0]?.getSettings()?.deviceId;
|
|
6045
6042
|
return n.getTracks().forEach((s) => s.stop()), this.createTestResult(
|
|
6046
6043
|
t,
|
|
6047
|
-
|
|
6044
|
+
b.SUCCESS,
|
|
6048
6045
|
"Microphone access is enabled and working.",
|
|
6049
6046
|
{ permission: "granted", deviceId: r }
|
|
6050
6047
|
);
|
|
@@ -6054,7 +6051,7 @@ class Jc {
|
|
|
6054
6051
|
} catch (n) {
|
|
6055
6052
|
return this.createTestResult(
|
|
6056
6053
|
t,
|
|
6057
|
-
|
|
6054
|
+
b.ERROR,
|
|
6058
6055
|
"Error checking microphone permission",
|
|
6059
6056
|
{ permission: "denied" },
|
|
6060
6057
|
n instanceof Error ? n.message : "Unknown error"
|
|
@@ -6062,7 +6059,7 @@ class Jc {
|
|
|
6062
6059
|
}
|
|
6063
6060
|
}
|
|
6064
6061
|
handleMicrophoneError(t) {
|
|
6065
|
-
const n =
|
|
6062
|
+
const n = W.MICROPHONE, r = {
|
|
6066
6063
|
NotAllowedError: { message: "Microphone permission denied", permission: "denied" },
|
|
6067
6064
|
PermissionDeniedError: { message: "Microphone permission denied", permission: "denied" },
|
|
6068
6065
|
NotFoundError: { message: "No microphone found", permission: "denied" }
|
|
@@ -6072,7 +6069,7 @@ class Jc {
|
|
|
6072
6069
|
};
|
|
6073
6070
|
return this.createTestResult(
|
|
6074
6071
|
n,
|
|
6075
|
-
|
|
6072
|
+
b.ERROR,
|
|
6076
6073
|
i.message,
|
|
6077
6074
|
{ permission: i.permission },
|
|
6078
6075
|
o
|
|
@@ -6080,80 +6077,37 @@ class Jc {
|
|
|
6080
6077
|
}
|
|
6081
6078
|
// --- Test 4: Shared Worker Support ---
|
|
6082
6079
|
async checkSharedWorkerSupport() {
|
|
6083
|
-
const t =
|
|
6080
|
+
const t = W.SHARED_WORKER;
|
|
6084
6081
|
try {
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
);
|
|
6092
|
-
try {
|
|
6093
|
-
return this.testSharedWorker ? await this.testWorkerCommunication(this.testSharedWorker) : this.createTestResult(
|
|
6094
|
-
t,
|
|
6095
|
-
T.WARNING,
|
|
6096
|
-
"SharedWorker not created",
|
|
6097
|
-
{ supported: !1, workerCreated: !1 }
|
|
6098
|
-
);
|
|
6099
|
-
} catch (n) {
|
|
6100
|
-
return this.createTestResult(
|
|
6101
|
-
t,
|
|
6102
|
-
T.WARNING,
|
|
6103
|
-
"SharedWorker supported but failed to create",
|
|
6104
|
-
{ supported: !0, workerCreated: !1 },
|
|
6105
|
-
n instanceof Error ? n.message : "Worker creation failed"
|
|
6106
|
-
);
|
|
6107
|
-
}
|
|
6082
|
+
return this.createTestResult(
|
|
6083
|
+
t,
|
|
6084
|
+
b.SUCCESS,
|
|
6085
|
+
"Your browser supports smooth background performance.",
|
|
6086
|
+
{ supported: !0 }
|
|
6087
|
+
);
|
|
6108
6088
|
} catch (n) {
|
|
6109
6089
|
return this.createTestResult(
|
|
6110
6090
|
t,
|
|
6111
|
-
|
|
6091
|
+
b.ERROR,
|
|
6112
6092
|
"Error checking SharedWorker support",
|
|
6113
|
-
{ supported: !1
|
|
6093
|
+
{ supported: !1 },
|
|
6114
6094
|
n instanceof Error ? n.message : "Unknown error"
|
|
6115
6095
|
);
|
|
6116
6096
|
}
|
|
6117
6097
|
}
|
|
6118
|
-
testWorkerCommunication(t) {
|
|
6119
|
-
const n = L.SHARED_WORKER;
|
|
6120
|
-
return new Promise((r) => {
|
|
6121
|
-
const s = setTimeout(() => {
|
|
6122
|
-
r(
|
|
6123
|
-
this.createTestResult(
|
|
6124
|
-
n,
|
|
6125
|
-
T.WARNING,
|
|
6126
|
-
"SharedWorker created but did not respond",
|
|
6127
|
-
{ supported: !0, workerCreated: !0 }
|
|
6128
|
-
)
|
|
6129
|
-
);
|
|
6130
|
-
}, Yc);
|
|
6131
|
-
t.port.onmessage = (o) => {
|
|
6132
|
-
const { action: i } = o.data || {};
|
|
6133
|
-
i === le.TEST_WORKER && (clearTimeout(s), r(
|
|
6134
|
-
this.createTestResult(
|
|
6135
|
-
n,
|
|
6136
|
-
T.SUCCESS,
|
|
6137
|
-
"Your browser supports smooth background performance.",
|
|
6138
|
-
{ supported: !0, workerCreated: !0 }
|
|
6139
|
-
)
|
|
6140
|
-
));
|
|
6141
|
-
}, t.port.start(), t.port.postMessage({ action: le.TEST_WORKER });
|
|
6142
|
-
});
|
|
6143
|
-
}
|
|
6144
6098
|
// --- Test 5: Network & API Access (ping-only) ---
|
|
6145
6099
|
async checkNetworkAndApiAccess() {
|
|
6146
|
-
const t = Date.now(), n =
|
|
6100
|
+
const t = Date.now(), n = W.NETWORK_API;
|
|
6147
6101
|
try {
|
|
6148
6102
|
const r = await this.pingApi(), s = Date.now() - t;
|
|
6149
6103
|
return r ? this.createTestResult(
|
|
6150
6104
|
n,
|
|
6151
|
-
|
|
6105
|
+
b.SUCCESS,
|
|
6152
6106
|
"Secure network access is confirmed.",
|
|
6153
6107
|
{ pingSuccess: !0, responseTime: s }
|
|
6154
6108
|
) : this.createTestResult(
|
|
6155
6109
|
n,
|
|
6156
|
-
|
|
6110
|
+
b.ERROR,
|
|
6157
6111
|
"Unable to access API",
|
|
6158
6112
|
{ pingSuccess: !1, responseTime: s }
|
|
6159
6113
|
);
|
|
@@ -6161,7 +6115,7 @@ class Jc {
|
|
|
6161
6115
|
const s = Date.now() - t;
|
|
6162
6116
|
return this.createTestResult(
|
|
6163
6117
|
n,
|
|
6164
|
-
|
|
6118
|
+
b.ERROR,
|
|
6165
6119
|
"Error checking network and API access",
|
|
6166
6120
|
{ pingSuccess: !1, responseTime: s },
|
|
6167
6121
|
r instanceof Error ? r.message : "Unknown error"
|
|
@@ -6192,7 +6146,7 @@ class Jc {
|
|
|
6192
6146
|
createSummary(t) {
|
|
6193
6147
|
let n = 0, r = 0, s = 0;
|
|
6194
6148
|
for (const o of t)
|
|
6195
|
-
o.status ===
|
|
6149
|
+
o.status === b.SUCCESS ? n++ : o.status === b.ERROR ? r++ : o.status === b.WARNING && s++;
|
|
6196
6150
|
return {
|
|
6197
6151
|
allPassed: n === t.length,
|
|
6198
6152
|
results: t,
|
|
@@ -6203,21 +6157,21 @@ class Jc {
|
|
|
6203
6157
|
};
|
|
6204
6158
|
}
|
|
6205
6159
|
}
|
|
6206
|
-
const
|
|
6160
|
+
const w = class w {
|
|
6207
6161
|
constructor(t) {
|
|
6208
|
-
this.config = t, this.hosts =
|
|
6162
|
+
this.config = t, this.hosts = Ar(t.env), this.callbackRegistry = new xr(), this.tracker = new Mc(t.enableTracking ?? !1);
|
|
6209
6163
|
const n = {
|
|
6210
6164
|
access_token: t.access_token,
|
|
6211
6165
|
clientId: t.clientId,
|
|
6212
6166
|
flavour: t.flavour,
|
|
6213
6167
|
onUnauthorized: () => this.handleUnauthorized()
|
|
6214
6168
|
};
|
|
6215
|
-
if (t.mode === "ipc" && t.ipcBridge ? this.transport = new
|
|
6169
|
+
if (t.mode === "ipc" && t.ipcBridge ? this.transport = new Or(n, t.ipcBridge) : this.transport = new kr(n), t.enableTracking && (this.tracker.init(t.env), t.flavour && this.tracker.setUser(t.flavour)), !t.allianceConfig?.baseUrl)
|
|
6216
6170
|
throw new Error("[EkaScribe] allianceConfig.baseUrl is required.");
|
|
6217
|
-
this.allianceClient = new
|
|
6171
|
+
this.allianceClient = new vr({
|
|
6218
6172
|
baseUrl: t.allianceConfig.baseUrl,
|
|
6219
6173
|
accessToken: t.access_token,
|
|
6220
|
-
mode: t.mode === "ipc" ?
|
|
6174
|
+
mode: t.mode === "ipc" ? Oe.IPC : Oe.DIRECT,
|
|
6221
6175
|
ipcTransport: t.ipcBridge,
|
|
6222
6176
|
useWorker: t.allianceConfig?.useWorker ?? "auto",
|
|
6223
6177
|
workerScriptUrl: t.sharedWorkerUrl,
|
|
@@ -6225,7 +6179,7 @@ const k = class k {
|
|
|
6225
6179
|
autoDiscovery: !0
|
|
6226
6180
|
}), this.allianceClient.init().catch((r) => {
|
|
6227
6181
|
console.error("[EkaScribe] Alliance SDK init failed:", r);
|
|
6228
|
-
}), this.documents = new
|
|
6182
|
+
}), this.documents = new jc(this.transport, this.hosts, this.allianceClient), this.sessions = new Vc(this.transport, this.hosts, this.allianceClient), this.output = new Gc(this.transport, this.hosts), this.recording = new zc(
|
|
6229
6183
|
this.allianceClient,
|
|
6230
6184
|
this.transport,
|
|
6231
6185
|
this.hosts,
|
|
@@ -6240,18 +6194,18 @@ const k = class k {
|
|
|
6240
6194
|
});
|
|
6241
6195
|
}
|
|
6242
6196
|
static getInstance(t) {
|
|
6243
|
-
if (
|
|
6244
|
-
const n =
|
|
6197
|
+
if (w.instance) {
|
|
6198
|
+
const n = w.instance.config, r = t.env && n.env !== t.env, s = t.clientId && n.clientId !== t.clientId;
|
|
6245
6199
|
if (r || s)
|
|
6246
6200
|
console.warn(
|
|
6247
6201
|
`[EkaScribe] Configuration changed${r ? ` (env: ${n.env} → ${t.env})` : ""}${s ? ` (clientId: ${n.clientId} → ${t.clientId})` : ""}. Resetting instance.`
|
|
6248
|
-
),
|
|
6202
|
+
), w.instance.resetInstance().catch((o) => {
|
|
6249
6203
|
console.error("[EkaScribe] Error during instance reset:", o);
|
|
6250
6204
|
});
|
|
6251
6205
|
else
|
|
6252
|
-
return t.access_token &&
|
|
6206
|
+
return t.access_token && w.instance.updateAuthTokens({ access_token: t.access_token }), t.flavour && t.flavour !== n.flavour && (n.flavour = t.flavour, t.enableTracking && w.instance.tracker.setUser(t.flavour)), w.instance;
|
|
6253
6207
|
}
|
|
6254
|
-
return
|
|
6208
|
+
return w.instance = new w(t), w.instance;
|
|
6255
6209
|
}
|
|
6256
6210
|
// ─── Recording ─────────────────────────────────────────────────────────────
|
|
6257
6211
|
/** @deprecated Backward compatible */
|
|
@@ -6332,13 +6286,12 @@ const k = class k {
|
|
|
6332
6286
|
this.config.access_token = t, this.transport.setAuthToken(t), this.allianceClient.setAccessToken(t);
|
|
6333
6287
|
}
|
|
6334
6288
|
// ─── Compatibility ─────────────────────────────────────────────────────────
|
|
6335
|
-
async runSystemCompatibilityTest(t
|
|
6336
|
-
|
|
6337
|
-
return n && r.setCompatiblityTestSharedWorker(n), r.runCompatibilityTest(t);
|
|
6289
|
+
async runSystemCompatibilityTest(t) {
|
|
6290
|
+
return new Kc(this.transport, this.hosts).runCompatibilityTest(t);
|
|
6338
6291
|
}
|
|
6339
6292
|
// ─── Lifecycle ─────────────────────────────────────────────────────────────
|
|
6340
6293
|
async resetInstance() {
|
|
6341
|
-
await this.recording.reset(), this.callbackRegistry.removeAll(),
|
|
6294
|
+
await this.recording.reset(), this.callbackRegistry.removeAll(), w.instance = null;
|
|
6342
6295
|
}
|
|
6343
6296
|
// ─── Private ───────────────────────────────────────────────────────────────
|
|
6344
6297
|
async handleUnauthorized() {
|
|
@@ -6351,21 +6304,21 @@ const k = class k {
|
|
|
6351
6304
|
return s && this.updateAuthTokens({ access_token: s }), s;
|
|
6352
6305
|
}
|
|
6353
6306
|
};
|
|
6354
|
-
|
|
6355
|
-
let
|
|
6356
|
-
const
|
|
6307
|
+
w.instance = null;
|
|
6308
|
+
let le = w;
|
|
6309
|
+
const Jc = (e) => le.getInstance(e);
|
|
6357
6310
|
export {
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6311
|
+
Pc as API_STATUS,
|
|
6312
|
+
br as CALLBACK_TYPE,
|
|
6313
|
+
b as COMPATIBILITY_TEST_STATUS,
|
|
6314
|
+
W as COMPATIBILITY_TEST_TYPE,
|
|
6362
6315
|
y as ERROR_CODE,
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6316
|
+
Bc as PROCESSING_STATUS,
|
|
6317
|
+
Hc as RESULT_STATUS,
|
|
6318
|
+
Lc as TEMPLATE_ID,
|
|
6366
6319
|
vt as TEMPLATE_TYPE,
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6320
|
+
Uc as VAD_STATUS,
|
|
6321
|
+
tu as createWorkerBlobUrl,
|
|
6322
|
+
Jc as getEkaScribeInstance,
|
|
6323
|
+
eu as getWorkerUrl
|
|
6371
6324
|
};
|