@cloudflare/vite-plugin 0.0.0-6fe4a67d0 → 0.0.0-7006630cf
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/asset-workers/asset-worker.js +664 -754
- package/dist/asset-workers/router-worker.js +644 -720
- package/dist/index.js +178 -216
- package/dist/runner-worker/index.js +1 -1
- package/package.json +7 -8
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// ../workers-shared/dist/router-worker.mjs
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
2
|
+
var Pn = Object.defineProperty;
|
|
3
|
+
var Mn = (t, e, n) => e in t ? Pn(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
|
|
4
|
+
var fe = (t, e, n) => (Mn(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
5
|
+
var bt = (t, e, n) => {
|
|
6
6
|
if (!e.has(t)) throw TypeError("Cannot " + n);
|
|
7
7
|
};
|
|
8
|
-
var
|
|
9
|
-
var
|
|
8
|
+
var Ye = (t, e, n) => (bt(t, e, "read from private field"), n ? n.call(t) : e.get(t));
|
|
9
|
+
var Rt = (t, e, n) => {
|
|
10
10
|
if (e.has(t)) throw TypeError("Cannot add the same private member more than once");
|
|
11
11
|
e instanceof WeakSet ? e.add(t) : e.set(t, n);
|
|
12
12
|
};
|
|
13
|
-
var
|
|
14
|
-
var
|
|
13
|
+
var It = (t, e, n, r) => (bt(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n);
|
|
14
|
+
var pe = class {
|
|
15
15
|
constructor(e) {
|
|
16
16
|
this.performanceTimer = e;
|
|
17
17
|
}
|
|
@@ -19,103 +19,103 @@ var me = class {
|
|
|
19
19
|
return this.performanceTimer ? this.performanceTimer.timeOrigin + this.performanceTimer.now() : Date.now();
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
|
-
var
|
|
23
|
-
function
|
|
24
|
-
switch (
|
|
22
|
+
var xt = Object.prototype.toString;
|
|
23
|
+
function U(t) {
|
|
24
|
+
switch (xt.call(t)) {
|
|
25
25
|
case "[object Error]":
|
|
26
26
|
case "[object Exception]":
|
|
27
27
|
case "[object DOMException]":
|
|
28
28
|
return true;
|
|
29
29
|
default:
|
|
30
|
-
return
|
|
30
|
+
return O(t, Error);
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
33
|
+
function Nt(t, e) {
|
|
34
|
+
return xt.call(t) === `[object ${e}]`;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
36
|
+
function j(t) {
|
|
37
|
+
return Nt(t, "String");
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function le(t) {
|
|
40
40
|
return t === null || typeof t != "object" && typeof t != "function";
|
|
41
41
|
}
|
|
42
42
|
function R(t) {
|
|
43
|
-
return
|
|
43
|
+
return Nt(t, "Object");
|
|
44
44
|
}
|
|
45
|
-
function
|
|
46
|
-
return typeof Event < "u" &&
|
|
45
|
+
function $e(t) {
|
|
46
|
+
return typeof Event < "u" && O(t, Event);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return typeof Element < "u" &&
|
|
48
|
+
function je(t) {
|
|
49
|
+
return typeof Element < "u" && O(t, Element);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function G(t) {
|
|
52
52
|
return !!(t && t.then && typeof t.then == "function");
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function He(t) {
|
|
55
55
|
return R(t) && "nativeEvent" in t && "preventDefault" in t && "stopPropagation" in t;
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Z(t) {
|
|
58
58
|
return typeof t == "number" && t !== t;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function O(t, e) {
|
|
61
61
|
try {
|
|
62
62
|
return t instanceof e;
|
|
63
63
|
} catch {
|
|
64
64
|
return false;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function qe(t) {
|
|
68
68
|
return !!(typeof t == "object" && t !== null && (t.__isVue || t._isVue));
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function v(t, e = 0) {
|
|
71
71
|
return typeof t != "string" || e === 0 || t.length <= e ? t : `${t.slice(0, e)}...`;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function me(t) {
|
|
74
74
|
return t && t.Math == Math ? t : void 0;
|
|
75
75
|
}
|
|
76
|
-
var m = typeof globalThis == "object" &&
|
|
76
|
+
var m = typeof globalThis == "object" && me(globalThis) || typeof window == "object" && me(window) || typeof self == "object" && me(self) || typeof global == "object" && me(global) || /* @__PURE__ */ function() {
|
|
77
77
|
return this;
|
|
78
78
|
}() || {};
|
|
79
|
-
function
|
|
79
|
+
function x() {
|
|
80
80
|
return m;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
82
|
+
function Q(t, e, n) {
|
|
83
83
|
let r = n || m, s = r.__SENTRY__ = r.__SENTRY__ || {};
|
|
84
84
|
return s[t] || (s[t] = e());
|
|
85
85
|
}
|
|
86
|
-
var
|
|
87
|
-
var
|
|
88
|
-
function
|
|
86
|
+
var fs = x();
|
|
87
|
+
var Un = 80;
|
|
88
|
+
function Dt(t, e = {}) {
|
|
89
89
|
if (!t) return "<unknown>";
|
|
90
90
|
try {
|
|
91
|
-
let n = t, r = 5, s = [], i = 0, o = 0, a = " > ",
|
|
92
|
-
for (; n && i++ < r && (
|
|
91
|
+
let n = t, r = 5, s = [], i = 0, o = 0, a = " > ", c = a.length, u, f = Array.isArray(e) ? e : e.keyAttrs, d = !Array.isArray(e) && e.maxStringLength || Un;
|
|
92
|
+
for (; n && i++ < r && (u = Gn(n, f), !(u === "html" || i > 1 && o + s.length * c + u.length >= d)); ) s.push(u), o += u.length, n = n.parentNode;
|
|
93
93
|
return s.reverse().join(a);
|
|
94
94
|
} catch {
|
|
95
95
|
return "<unknown>";
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
function
|
|
99
|
-
let n = t, r = [], s, i, o, a,
|
|
98
|
+
function Gn(t, e) {
|
|
99
|
+
let n = t, r = [], s, i, o, a, c;
|
|
100
100
|
if (!n || !n.tagName) return "";
|
|
101
101
|
r.push(n.tagName.toLowerCase());
|
|
102
|
-
let
|
|
103
|
-
if (
|
|
102
|
+
let u = e && e.length ? e.filter((d) => n.getAttribute(d)).map((d) => [d, n.getAttribute(d)]) : null;
|
|
103
|
+
if (u && u.length) u.forEach((d) => {
|
|
104
104
|
r.push(`[${d[0]}="${d[1]}"]`);
|
|
105
105
|
});
|
|
106
|
-
else if (n.id && r.push(`#${n.id}`), s = n.className, s &&
|
|
106
|
+
else if (n.id && r.push(`#${n.id}`), s = n.className, s && j(s)) for (i = s.split(/\s+/), c = 0; c < i.length; c++) r.push(`.${i[c]}`);
|
|
107
107
|
let f = ["aria-label", "type", "name", "title", "alt"];
|
|
108
|
-
for (
|
|
108
|
+
for (c = 0; c < f.length; c++) o = f[c], a = n.getAttribute(o), a && r.push(`[${o}="${a}"]`);
|
|
109
109
|
return r.join("");
|
|
110
110
|
}
|
|
111
|
-
var
|
|
112
|
-
var
|
|
113
|
-
var
|
|
114
|
-
function
|
|
111
|
+
var Fn = "Sentry Logger ";
|
|
112
|
+
var ee = ["debug", "info", "warn", "error", "log", "assert", "trace"];
|
|
113
|
+
var H = {};
|
|
114
|
+
function _e(t) {
|
|
115
115
|
if (!("console" in m)) return t();
|
|
116
|
-
let e = m.console, n = {}, r = Object.keys(
|
|
116
|
+
let e = m.console, n = {}, r = Object.keys(H);
|
|
117
117
|
r.forEach((s) => {
|
|
118
|
-
let i =
|
|
118
|
+
let i = H[s];
|
|
119
119
|
n[s] = e[s], e[s] = i;
|
|
120
120
|
});
|
|
121
121
|
try {
|
|
@@ -126,125 +126,125 @@ function ge(t) {
|
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Bn() {
|
|
130
130
|
let t = false, e = { enable: () => {
|
|
131
131
|
t = true;
|
|
132
132
|
}, disable: () => {
|
|
133
133
|
t = false;
|
|
134
134
|
}, isEnabled: () => t };
|
|
135
|
-
return typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__ ?
|
|
135
|
+
return typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__ ? ee.forEach((n) => {
|
|
136
136
|
e[n] = (...r) => {
|
|
137
|
-
t &&
|
|
138
|
-
m.console[n](`${
|
|
137
|
+
t && _e(() => {
|
|
138
|
+
m.console[n](`${Fn}[${n}]:`, ...r);
|
|
139
139
|
});
|
|
140
140
|
};
|
|
141
|
-
}) :
|
|
141
|
+
}) : ee.forEach((n) => {
|
|
142
142
|
e[n] = () => {
|
|
143
143
|
};
|
|
144
144
|
}), e;
|
|
145
145
|
}
|
|
146
|
-
var p =
|
|
147
|
-
var
|
|
148
|
-
function
|
|
146
|
+
var p = Bn();
|
|
147
|
+
var Ln = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
|
|
148
|
+
function Yn(t) {
|
|
149
149
|
return t === "http" || t === "https";
|
|
150
150
|
}
|
|
151
|
-
function
|
|
152
|
-
let { host: n, path: r, pass: s, port: i, projectId: o, protocol: a, publicKey:
|
|
153
|
-
return `${a}://${
|
|
151
|
+
function C(t, e = false) {
|
|
152
|
+
let { host: n, path: r, pass: s, port: i, projectId: o, protocol: a, publicKey: c } = t;
|
|
153
|
+
return `${a}://${c}${e && s ? `:${s}` : ""}@${n}${i ? `:${i}` : ""}/${r && `${r}/`}${o}`;
|
|
154
154
|
}
|
|
155
|
-
function
|
|
156
|
-
let e =
|
|
155
|
+
function kt(t) {
|
|
156
|
+
let e = Ln.exec(t);
|
|
157
157
|
if (!e) {
|
|
158
158
|
console.error(`Invalid Sentry Dsn: ${t}`);
|
|
159
159
|
return;
|
|
160
160
|
}
|
|
161
|
-
let [n, r, s = "", i, o = "", a] = e.slice(1),
|
|
162
|
-
if (f.length > 1 && (
|
|
163
|
-
let d =
|
|
164
|
-
d && (
|
|
161
|
+
let [n, r, s = "", i, o = "", a] = e.slice(1), c = "", u = a, f = u.split("/");
|
|
162
|
+
if (f.length > 1 && (c = f.slice(0, -1).join("/"), u = f.pop()), u) {
|
|
163
|
+
let d = u.match(/^\d+/);
|
|
164
|
+
d && (u = d[0]);
|
|
165
165
|
}
|
|
166
|
-
return
|
|
166
|
+
return Ot({ host: i, pass: s, path: c, projectId: u, port: o, protocol: n, publicKey: r });
|
|
167
167
|
}
|
|
168
|
-
function
|
|
168
|
+
function Ot(t) {
|
|
169
169
|
return { protocol: t.protocol, publicKey: t.publicKey || "", pass: t.pass || "", host: t.host, port: t.port || "", path: t.path || "", projectId: t.projectId };
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function $n(t) {
|
|
172
172
|
if (!(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__)) return true;
|
|
173
173
|
let { port: e, projectId: n, protocol: r } = t;
|
|
174
|
-
return ["protocol", "publicKey", "host", "projectId"].find((o) => t[o] ? false : (p.error(`Invalid Sentry Dsn: ${o} missing`), true)) ? false : n.match(/^\d+$/) ?
|
|
174
|
+
return ["protocol", "publicKey", "host", "projectId"].find((o) => t[o] ? false : (p.error(`Invalid Sentry Dsn: ${o} missing`), true)) ? false : n.match(/^\d+$/) ? Yn(r) ? e && isNaN(parseInt(e, 10)) ? (p.error(`Invalid Sentry Dsn: Invalid port ${e}`), false) : true : (p.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), false) : (p.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), false);
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
let e = typeof t == "string" ?
|
|
178
|
-
if (!(!e ||
|
|
176
|
+
function he(t) {
|
|
177
|
+
let e = typeof t == "string" ? kt(t) : Ot(t);
|
|
178
|
+
if (!(!e || !$n(e))) return e;
|
|
179
179
|
}
|
|
180
180
|
var y = class extends Error {
|
|
181
181
|
constructor(e, n = "warn") {
|
|
182
182
|
super(e), this.message = e, this.name = new.target.prototype.constructor.name, Object.setPrototypeOf(this, new.target.prototype), this.logLevel = n;
|
|
183
183
|
}
|
|
184
184
|
};
|
|
185
|
-
function
|
|
185
|
+
function I(t, e, n) {
|
|
186
186
|
if (!(e in t)) return;
|
|
187
187
|
let r = t[e], s = n(r);
|
|
188
|
-
typeof s == "function" &&
|
|
188
|
+
typeof s == "function" && vt(s, r), t[e] = s;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function q(t, e, n) {
|
|
191
191
|
try {
|
|
192
192
|
Object.defineProperty(t, e, { value: n, writable: true, configurable: true });
|
|
193
193
|
} catch {
|
|
194
194
|
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(`Failed to add non-enumerable property "${e}" to object`, t);
|
|
195
195
|
}
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function vt(t, e) {
|
|
198
198
|
try {
|
|
199
199
|
let n = e.prototype || {};
|
|
200
|
-
t.prototype = e.prototype = n,
|
|
200
|
+
t.prototype = e.prototype = n, q(t, "__sentry_original__", e);
|
|
201
201
|
} catch {
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function ze(t) {
|
|
205
205
|
return Object.keys(t).map((e) => `${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&");
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
if (
|
|
209
|
-
if (
|
|
210
|
-
let e = { type: t.type, target:
|
|
211
|
-
return typeof CustomEvent < "u" &&
|
|
207
|
+
function ge(t) {
|
|
208
|
+
if (U(t)) return { message: t.message, name: t.name, stack: t.stack, ...wt(t) };
|
|
209
|
+
if ($e(t)) {
|
|
210
|
+
let e = { type: t.type, target: At(t.target), currentTarget: At(t.currentTarget), ...wt(t) };
|
|
211
|
+
return typeof CustomEvent < "u" && O(t, CustomEvent) && (e.detail = t.detail), e;
|
|
212
212
|
} else return t;
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function At(t) {
|
|
215
215
|
try {
|
|
216
|
-
return
|
|
216
|
+
return je(t) ? Dt(t) : Object.prototype.toString.call(t);
|
|
217
217
|
} catch {
|
|
218
218
|
return "<unknown>";
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
|
-
function
|
|
221
|
+
function wt(t) {
|
|
222
222
|
if (typeof t == "object" && t !== null) {
|
|
223
223
|
let e = {};
|
|
224
224
|
for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
225
225
|
return e;
|
|
226
226
|
} else return {};
|
|
227
227
|
}
|
|
228
|
-
function
|
|
229
|
-
let n = Object.keys(
|
|
228
|
+
function te(t, e = 40) {
|
|
229
|
+
let n = Object.keys(ge(t));
|
|
230
230
|
if (n.sort(), !n.length) return "[object has no keys]";
|
|
231
|
-
if (n[0].length >= e) return
|
|
231
|
+
if (n[0].length >= e) return v(n[0], e);
|
|
232
232
|
for (let r = n.length; r > 0; r--) {
|
|
233
233
|
let s = n.slice(0, r).join(", ");
|
|
234
|
-
if (!(s.length > e)) return r === n.length ? s :
|
|
234
|
+
if (!(s.length > e)) return r === n.length ? s : v(s, e);
|
|
235
235
|
}
|
|
236
236
|
return "";
|
|
237
237
|
}
|
|
238
238
|
function g(t) {
|
|
239
|
-
return
|
|
239
|
+
return We(t, /* @__PURE__ */ new Map());
|
|
240
240
|
}
|
|
241
|
-
function
|
|
241
|
+
function We(t, e) {
|
|
242
242
|
if (R(t)) {
|
|
243
243
|
let n = e.get(t);
|
|
244
244
|
if (n !== void 0) return n;
|
|
245
245
|
let r = {};
|
|
246
246
|
e.set(t, r);
|
|
247
|
-
for (let s of Object.keys(t)) typeof t[s] < "u" && (r[s] =
|
|
247
|
+
for (let s of Object.keys(t)) typeof t[s] < "u" && (r[s] = We(t[s], e));
|
|
248
248
|
return r;
|
|
249
249
|
}
|
|
250
250
|
if (Array.isArray(t)) {
|
|
@@ -252,20 +252,20 @@ function Ve(t, e) {
|
|
|
252
252
|
if (n !== void 0) return n;
|
|
253
253
|
let r = [];
|
|
254
254
|
return e.set(t, r), t.forEach((s) => {
|
|
255
|
-
r.push(
|
|
255
|
+
r.push(We(s, e));
|
|
256
256
|
}), r;
|
|
257
257
|
}
|
|
258
258
|
return t;
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function jn(t, e = false) {
|
|
261
261
|
return !(e || t && !t.startsWith("/") && !t.includes(":\\") && !t.startsWith(".") && !t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//)) && t !== void 0 && !t.includes("node_modules/");
|
|
262
262
|
}
|
|
263
|
-
function
|
|
263
|
+
function Ct(t) {
|
|
264
264
|
let e = /^\s*[-]{4,}$/, n = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
|
|
265
265
|
return (r) => {
|
|
266
266
|
let s = r.match(n);
|
|
267
267
|
if (s) {
|
|
268
|
-
let i, o, a,
|
|
268
|
+
let i, o, a, c, u;
|
|
269
269
|
if (s[1]) {
|
|
270
270
|
a = s[1];
|
|
271
271
|
let l = a.lastIndexOf(".");
|
|
@@ -274,19 +274,19 @@ function Ut(t) {
|
|
|
274
274
|
let _ = i.indexOf(".Module");
|
|
275
275
|
_ > 0 && (a = a.slice(_ + 1), i = i.slice(0, _));
|
|
276
276
|
}
|
|
277
|
-
|
|
277
|
+
c = void 0;
|
|
278
278
|
}
|
|
279
|
-
o && (
|
|
279
|
+
o && (c = i, u = o), o === "<anonymous>" && (u = void 0, a = void 0), a === void 0 && (u = u || "<anonymous>", a = c ? `${c}.${u}` : u);
|
|
280
280
|
let f = s[2] && s[2].startsWith("file://") ? s[2].slice(7) : s[2], d = s[5] === "native";
|
|
281
|
-
return !f && s[5] && !d && (f = s[5]), { filename: f, module: t ? t(f) : void 0, function: a, lineno: parseInt(s[3], 10) || void 0, colno: parseInt(s[4], 10) || void 0, in_app:
|
|
281
|
+
return !f && s[5] && !d && (f = s[5]), { filename: f, module: t ? t(f) : void 0, function: a, lineno: parseInt(s[3], 10) || void 0, colno: parseInt(s[4], 10) || void 0, in_app: jn(f, d) };
|
|
282
282
|
}
|
|
283
283
|
if (r.match(e)) return { filename: r };
|
|
284
284
|
};
|
|
285
285
|
}
|
|
286
|
-
var
|
|
287
|
-
var
|
|
288
|
-
var
|
|
289
|
-
function
|
|
286
|
+
var Ut = 50;
|
|
287
|
+
var Pt = /\(error: (.*)\)/;
|
|
288
|
+
var Mt = /captureMessage|captureException/;
|
|
289
|
+
function Ee(...t) {
|
|
290
290
|
let e = t.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
|
|
291
291
|
return (n, r = 0) => {
|
|
292
292
|
let s = [], i = n.split(`
|
|
@@ -294,192 +294,192 @@ function ye(...t) {
|
|
|
294
294
|
for (let o = r; o < i.length; o++) {
|
|
295
295
|
let a = i[o];
|
|
296
296
|
if (a.length > 1024) continue;
|
|
297
|
-
let
|
|
298
|
-
if (!
|
|
299
|
-
for (let
|
|
300
|
-
let f = c
|
|
297
|
+
let c = Pt.test(a) ? a.replace(Pt, "$1") : a;
|
|
298
|
+
if (!c.match(/\S*Error: /)) {
|
|
299
|
+
for (let u of e) {
|
|
300
|
+
let f = u(c);
|
|
301
301
|
if (f) {
|
|
302
302
|
s.push(f);
|
|
303
303
|
break;
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
if (s.length >=
|
|
306
|
+
if (s.length >= Ut) break;
|
|
307
307
|
}
|
|
308
308
|
}
|
|
309
|
-
return
|
|
309
|
+
return Gt(s);
|
|
310
310
|
};
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
return Array.isArray(t) ?
|
|
312
|
+
function Ve(t) {
|
|
313
|
+
return Array.isArray(t) ? Ee(...t) : t;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Gt(t) {
|
|
316
316
|
if (!t.length) return [];
|
|
317
317
|
let e = Array.from(t);
|
|
318
|
-
return /sentryWrapped/.test(e[e.length - 1].function || "") && e.pop(), e.reverse(),
|
|
318
|
+
return /sentryWrapped/.test(e[e.length - 1].function || "") && e.pop(), e.reverse(), Mt.test(e[e.length - 1].function || "") && (e.pop(), Mt.test(e[e.length - 1].function || "") && e.pop()), e.slice(0, Ut).map((n) => ({ ...n, filename: n.filename || e[e.length - 1].filename, function: n.function || "?" }));
|
|
319
319
|
}
|
|
320
|
-
var
|
|
321
|
-
function
|
|
320
|
+
var Ke = "<anonymous>";
|
|
321
|
+
function ne(t) {
|
|
322
322
|
try {
|
|
323
|
-
return !t || typeof t != "function" ?
|
|
323
|
+
return !t || typeof t != "function" ? Ke : t.name || Ke;
|
|
324
324
|
} catch {
|
|
325
|
-
return
|
|
325
|
+
return Ke;
|
|
326
326
|
}
|
|
327
327
|
}
|
|
328
|
-
function
|
|
329
|
-
return [90,
|
|
328
|
+
function Je(t) {
|
|
329
|
+
return [90, Ct(t)];
|
|
330
330
|
}
|
|
331
|
-
var
|
|
332
|
-
function
|
|
333
|
-
if (!("fetch" in
|
|
331
|
+
var Xe = x();
|
|
332
|
+
function Hn() {
|
|
333
|
+
if (!("fetch" in Xe)) return false;
|
|
334
334
|
try {
|
|
335
335
|
return new Headers(), new Request("http://www.example.com"), new Response(), true;
|
|
336
336
|
} catch {
|
|
337
337
|
return false;
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function Ft(t) {
|
|
341
341
|
return t && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString());
|
|
342
342
|
}
|
|
343
|
-
function
|
|
344
|
-
if (!
|
|
345
|
-
if (
|
|
346
|
-
let t = false, e =
|
|
343
|
+
function Bt() {
|
|
344
|
+
if (!Hn()) return false;
|
|
345
|
+
if (Ft(Xe.fetch)) return true;
|
|
346
|
+
let t = false, e = Xe.document;
|
|
347
347
|
if (e && typeof e.createElement == "function") try {
|
|
348
348
|
let n = e.createElement("iframe");
|
|
349
|
-
n.hidden = true, e.head.appendChild(n), n.contentWindow && n.contentWindow.fetch && (t =
|
|
349
|
+
n.hidden = true, e.head.appendChild(n), n.contentWindow && n.contentWindow.fetch && (t = Ft(n.contentWindow.fetch)), e.head.removeChild(n);
|
|
350
350
|
} catch (n) {
|
|
351
351
|
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", n);
|
|
352
352
|
}
|
|
353
353
|
return t;
|
|
354
354
|
}
|
|
355
|
-
var
|
|
356
|
-
function
|
|
357
|
-
let t =
|
|
355
|
+
var Se = x();
|
|
356
|
+
function Lt() {
|
|
357
|
+
let t = Se.chrome, e = t && t.app && t.app.runtime, n = "history" in Se && !!Se.history.pushState && !!Se.history.replaceState;
|
|
358
358
|
return !e && n;
|
|
359
359
|
}
|
|
360
|
-
var E =
|
|
361
|
-
var
|
|
362
|
-
var
|
|
363
|
-
var
|
|
364
|
-
function
|
|
365
|
-
if (!
|
|
360
|
+
var E = x();
|
|
361
|
+
var re = "__sentry_xhr_v2__";
|
|
362
|
+
var se = {};
|
|
363
|
+
var Yt = {};
|
|
364
|
+
function qn(t) {
|
|
365
|
+
if (!Yt[t]) switch (Yt[t] = true, t) {
|
|
366
366
|
case "console":
|
|
367
|
-
|
|
367
|
+
Wn();
|
|
368
368
|
break;
|
|
369
369
|
case "dom":
|
|
370
|
-
|
|
370
|
+
zt();
|
|
371
371
|
break;
|
|
372
372
|
case "xhr":
|
|
373
|
-
|
|
373
|
+
Wt();
|
|
374
374
|
break;
|
|
375
375
|
case "fetch":
|
|
376
|
-
|
|
376
|
+
zn();
|
|
377
377
|
break;
|
|
378
378
|
case "history":
|
|
379
|
-
|
|
379
|
+
Kn();
|
|
380
380
|
break;
|
|
381
381
|
case "error":
|
|
382
|
-
|
|
382
|
+
Zn();
|
|
383
383
|
break;
|
|
384
384
|
case "unhandledrejection":
|
|
385
|
-
|
|
385
|
+
Qn();
|
|
386
386
|
break;
|
|
387
387
|
default:
|
|
388
388
|
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn("unknown instrumentation type:", t);
|
|
389
389
|
return;
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
function
|
|
393
|
-
|
|
392
|
+
function Ie(t, e) {
|
|
393
|
+
se[t] = se[t] || [], se[t].push(e), qn(t);
|
|
394
394
|
}
|
|
395
|
-
function
|
|
396
|
-
if (!(!t || !
|
|
395
|
+
function N(t, e) {
|
|
396
|
+
if (!(!t || !se[t])) for (let n of se[t] || []) try {
|
|
397
397
|
n(e);
|
|
398
398
|
} catch (r) {
|
|
399
399
|
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.error(`Error while triggering instrumentation handler.
|
|
400
400
|
Type: ${t}
|
|
401
|
-
Name: ${
|
|
401
|
+
Name: ${ne(n)}
|
|
402
402
|
Error:`, r);
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
"console" in m &&
|
|
407
|
-
t in m.console &&
|
|
408
|
-
return
|
|
409
|
-
|
|
410
|
-
let r =
|
|
405
|
+
function Wn() {
|
|
406
|
+
"console" in m && ee.forEach(function(t) {
|
|
407
|
+
t in m.console && I(m.console, t, function(e) {
|
|
408
|
+
return H[t] = e, function(...n) {
|
|
409
|
+
N("console", { args: n, level: t });
|
|
410
|
+
let r = H[t];
|
|
411
411
|
r && r.apply(m.console, n);
|
|
412
412
|
};
|
|
413
413
|
});
|
|
414
414
|
});
|
|
415
415
|
}
|
|
416
|
-
function
|
|
417
|
-
|
|
416
|
+
function zn() {
|
|
417
|
+
Bt() && I(m, "fetch", function(t) {
|
|
418
418
|
return function(...e) {
|
|
419
|
-
let { method: n, url: r } =
|
|
420
|
-
return
|
|
421
|
-
throw
|
|
419
|
+
let { method: n, url: r } = qt(e), s = { args: e, fetchData: { method: n, url: r }, startTimestamp: Date.now() };
|
|
420
|
+
return N("fetch", { ...s }), t.apply(m, e).then((i) => (N("fetch", { ...s, endTimestamp: Date.now(), response: i }), i), (i) => {
|
|
421
|
+
throw N("fetch", { ...s, endTimestamp: Date.now(), error: i }), i;
|
|
422
422
|
});
|
|
423
423
|
};
|
|
424
424
|
});
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function Ze(t, e) {
|
|
427
427
|
return !!t && typeof t == "object" && !!t[e];
|
|
428
428
|
}
|
|
429
|
-
function
|
|
430
|
-
return typeof t == "string" ? t : t ?
|
|
429
|
+
function $t(t) {
|
|
430
|
+
return typeof t == "string" ? t : t ? Ze(t, "url") ? t.url : t.toString ? t.toString() : "" : "";
|
|
431
431
|
}
|
|
432
|
-
function
|
|
432
|
+
function qt(t) {
|
|
433
433
|
if (t.length === 0) return { method: "GET", url: "" };
|
|
434
434
|
if (t.length === 2) {
|
|
435
435
|
let [n, r] = t;
|
|
436
|
-
return { url:
|
|
436
|
+
return { url: $t(n), method: Ze(r, "method") ? String(r.method).toUpperCase() : "GET" };
|
|
437
437
|
}
|
|
438
438
|
let e = t[0];
|
|
439
|
-
return { url:
|
|
439
|
+
return { url: $t(e), method: Ze(e, "method") ? String(e.method).toUpperCase() : "GET" };
|
|
440
440
|
}
|
|
441
|
-
function
|
|
441
|
+
function Wt() {
|
|
442
442
|
if (!E.XMLHttpRequest) return;
|
|
443
443
|
let t = XMLHttpRequest.prototype;
|
|
444
|
-
|
|
444
|
+
I(t, "open", function(e) {
|
|
445
445
|
return function(...n) {
|
|
446
|
-
let r = Date.now(), s = n[1], i = this[
|
|
447
|
-
|
|
446
|
+
let r = Date.now(), s = n[1], i = this[re] = { method: j(n[0]) ? n[0].toUpperCase() : n[0], url: n[1], request_headers: {} };
|
|
447
|
+
j(s) && i.method === "POST" && s.match(/sentry_key/) && (this.__sentry_own_request__ = true);
|
|
448
448
|
let o = () => {
|
|
449
|
-
let a = this[
|
|
449
|
+
let a = this[re];
|
|
450
450
|
if (a && this.readyState === 4) {
|
|
451
451
|
try {
|
|
452
452
|
a.status_code = this.status;
|
|
453
453
|
} catch {
|
|
454
454
|
}
|
|
455
|
-
|
|
455
|
+
N("xhr", { args: n, endTimestamp: Date.now(), startTimestamp: r, xhr: this });
|
|
456
456
|
}
|
|
457
457
|
};
|
|
458
|
-
return "onreadystatechange" in this && typeof this.onreadystatechange == "function" ?
|
|
459
|
-
return function(...
|
|
460
|
-
return o(), a.apply(this,
|
|
458
|
+
return "onreadystatechange" in this && typeof this.onreadystatechange == "function" ? I(this, "onreadystatechange", function(a) {
|
|
459
|
+
return function(...c) {
|
|
460
|
+
return o(), a.apply(this, c);
|
|
461
461
|
};
|
|
462
|
-
}) : this.addEventListener("readystatechange", o),
|
|
463
|
-
return function(...
|
|
464
|
-
let [
|
|
465
|
-
return d && (d.request_headers[
|
|
462
|
+
}) : this.addEventListener("readystatechange", o), I(this, "setRequestHeader", function(a) {
|
|
463
|
+
return function(...c) {
|
|
464
|
+
let [u, f] = c, d = this[re];
|
|
465
|
+
return d && (d.request_headers[u.toLowerCase()] = f), a.apply(this, c);
|
|
466
466
|
};
|
|
467
467
|
}), e.apply(this, n);
|
|
468
468
|
};
|
|
469
|
-
}),
|
|
469
|
+
}), I(t, "send", function(e) {
|
|
470
470
|
return function(...n) {
|
|
471
|
-
let r = this[
|
|
472
|
-
return r && n[0] !== void 0 && (r.body = n[0]),
|
|
471
|
+
let r = this[re];
|
|
472
|
+
return r && n[0] !== void 0 && (r.body = n[0]), N("xhr", { args: n, startTimestamp: Date.now(), xhr: this }), e.apply(this, n);
|
|
473
473
|
};
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
|
-
var
|
|
477
|
-
function
|
|
478
|
-
if (!
|
|
476
|
+
var ye;
|
|
477
|
+
function Kn() {
|
|
478
|
+
if (!Lt()) return;
|
|
479
479
|
let t = E.onpopstate;
|
|
480
480
|
E.onpopstate = function(...n) {
|
|
481
|
-
let r = E.location.href, s =
|
|
482
|
-
if (
|
|
481
|
+
let r = E.location.href, s = ye;
|
|
482
|
+
if (ye = r, N("history", { from: s, to: r }), t) try {
|
|
483
483
|
return t.apply(this, n);
|
|
484
484
|
} catch {
|
|
485
485
|
}
|
|
@@ -488,18 +488,18 @@ function Zn() {
|
|
|
488
488
|
return function(...r) {
|
|
489
489
|
let s = r.length > 2 ? r[2] : void 0;
|
|
490
490
|
if (s) {
|
|
491
|
-
let i =
|
|
492
|
-
|
|
491
|
+
let i = ye, o = String(s);
|
|
492
|
+
ye = o, N("history", { from: i, to: o });
|
|
493
493
|
}
|
|
494
494
|
return n.apply(this, r);
|
|
495
495
|
};
|
|
496
496
|
}
|
|
497
|
-
|
|
497
|
+
I(E.history, "pushState", e), I(E.history, "replaceState", e);
|
|
498
498
|
}
|
|
499
|
-
var
|
|
500
|
-
var
|
|
501
|
-
var
|
|
502
|
-
function
|
|
499
|
+
var Vn = 1e3;
|
|
500
|
+
var jt;
|
|
501
|
+
var Te;
|
|
502
|
+
function Jn(t, e) {
|
|
503
503
|
if (t.type !== e.type) return false;
|
|
504
504
|
try {
|
|
505
505
|
if (t.target !== e.target) return false;
|
|
@@ -507,7 +507,7 @@ function er(t, e) {
|
|
|
507
507
|
}
|
|
508
508
|
return true;
|
|
509
509
|
}
|
|
510
|
-
function
|
|
510
|
+
function Xn(t) {
|
|
511
511
|
if (t.type !== "keypress") return false;
|
|
512
512
|
try {
|
|
513
513
|
let e = t.target;
|
|
@@ -517,27 +517,27 @@ function tr(t) {
|
|
|
517
517
|
}
|
|
518
518
|
return true;
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function Ht(t, e = false) {
|
|
521
521
|
return (n) => {
|
|
522
|
-
if (!n || n._sentryCaptured ||
|
|
523
|
-
|
|
522
|
+
if (!n || n._sentryCaptured || Xn(n)) return;
|
|
523
|
+
q(n, "_sentryCaptured", true);
|
|
524
524
|
let r = n.type === "keypress" ? "input" : n.type;
|
|
525
|
-
(
|
|
526
|
-
|
|
527
|
-
},
|
|
525
|
+
(Te === void 0 || !Jn(Te, n)) && (t({ event: n, name: r, global: e }), Te = n), clearTimeout(jt), jt = E.setTimeout(() => {
|
|
526
|
+
Te = void 0;
|
|
527
|
+
}, Vn);
|
|
528
528
|
};
|
|
529
529
|
}
|
|
530
|
-
function
|
|
530
|
+
function zt() {
|
|
531
531
|
if (!E.document) return;
|
|
532
|
-
let t =
|
|
532
|
+
let t = N.bind(null, "dom"), e = Ht(t, true);
|
|
533
533
|
E.document.addEventListener("click", e, false), E.document.addEventListener("keypress", e, false), ["EventTarget", "Node"].forEach((n) => {
|
|
534
534
|
let r = E[n] && E[n].prototype;
|
|
535
|
-
!r || !r.hasOwnProperty || !r.hasOwnProperty("addEventListener") || (
|
|
535
|
+
!r || !r.hasOwnProperty || !r.hasOwnProperty("addEventListener") || (I(r, "addEventListener", function(s) {
|
|
536
536
|
return function(i, o, a) {
|
|
537
537
|
if (i === "click" || i == "keypress") try {
|
|
538
|
-
let
|
|
538
|
+
let c = this, u = c.__sentry_instrumentation_handlers__ = c.__sentry_instrumentation_handlers__ || {}, f = u[i] = u[i] || { refCount: 0 };
|
|
539
539
|
if (!f.handler) {
|
|
540
|
-
let d =
|
|
540
|
+
let d = Ht(t);
|
|
541
541
|
f.handler = d, s.call(this, i, d, a);
|
|
542
542
|
}
|
|
543
543
|
f.refCount++;
|
|
@@ -545,11 +545,11 @@ function Jt() {
|
|
|
545
545
|
}
|
|
546
546
|
return s.call(this, i, o, a);
|
|
547
547
|
};
|
|
548
|
-
}),
|
|
548
|
+
}), I(r, "removeEventListener", function(s) {
|
|
549
549
|
return function(i, o, a) {
|
|
550
550
|
if (i === "click" || i == "keypress") try {
|
|
551
|
-
let
|
|
552
|
-
f && (f.refCount--, f.refCount <= 0 && (s.call(this, i, f.handler, a), f.handler = void 0, delete
|
|
551
|
+
let c = this, u = c.__sentry_instrumentation_handlers__ || {}, f = u[i];
|
|
552
|
+
f && (f.refCount--, f.refCount <= 0 && (s.call(this, i, f.handler, a), f.handler = void 0, delete u[i]), Object.keys(u).length === 0 && delete c.__sentry_instrumentation_handlers__);
|
|
553
553
|
} catch {
|
|
554
554
|
}
|
|
555
555
|
return s.call(this, i, o, a);
|
|
@@ -557,28 +557,28 @@ function Jt() {
|
|
|
557
557
|
}));
|
|
558
558
|
});
|
|
559
559
|
}
|
|
560
|
-
var
|
|
561
|
-
function
|
|
562
|
-
|
|
563
|
-
return
|
|
560
|
+
var be = null;
|
|
561
|
+
function Zn() {
|
|
562
|
+
be = E.onerror, E.onerror = function(t, e, n, r, s) {
|
|
563
|
+
return N("error", { column: r, error: s, line: n, msg: t, url: e }), be && !be.__SENTRY_LOADER__ ? be.apply(this, arguments) : false;
|
|
564
564
|
}, E.onerror.__SENTRY_INSTRUMENTED__ = true;
|
|
565
565
|
}
|
|
566
|
-
var
|
|
567
|
-
function
|
|
568
|
-
|
|
569
|
-
return
|
|
566
|
+
var Re = null;
|
|
567
|
+
function Qn() {
|
|
568
|
+
Re = E.onunhandledrejection, E.onunhandledrejection = function(t) {
|
|
569
|
+
return N("unhandledrejection", t), Re && !Re.__SENTRY_LOADER__ ? Re.apply(this, arguments) : true;
|
|
570
570
|
}, E.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function Kt() {
|
|
573
573
|
return typeof __SENTRY_BROWSER_BUNDLE__ < "u" && !!__SENTRY_BROWSER_BUNDLE__;
|
|
574
574
|
}
|
|
575
|
-
function
|
|
576
|
-
return !
|
|
575
|
+
function Vt() {
|
|
576
|
+
return !Kt() && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]";
|
|
577
577
|
}
|
|
578
|
-
function
|
|
578
|
+
function Jt(t, e) {
|
|
579
579
|
return t.require(e);
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function Xt() {
|
|
582
582
|
let t = typeof WeakSet == "function", e = t ? /* @__PURE__ */ new WeakSet() : [];
|
|
583
583
|
function n(s) {
|
|
584
584
|
if (t) return e.has(s) ? true : (e.add(s), false);
|
|
@@ -603,15 +603,15 @@ function h() {
|
|
|
603
603
|
}
|
|
604
604
|
return ("10000000100040008000" + 1e11).replace(/[018]/g, (r) => (r ^ (n() & 15) >> r / 4).toString(16));
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function er(t) {
|
|
607
607
|
return t.exception && t.exception.values ? t.exception.values[0] : void 0;
|
|
608
608
|
}
|
|
609
|
-
function
|
|
609
|
+
function ie(t, e, n) {
|
|
610
610
|
let r = t.exception = t.exception || {}, s = r.values = r.values || [], i = s[0] = s[0] || {};
|
|
611
611
|
i.value || (i.value = e || ""), i.type || (i.type = n || "Error");
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
let n =
|
|
613
|
+
function oe(t, e) {
|
|
614
|
+
let n = er(t);
|
|
615
615
|
if (!n) return;
|
|
616
616
|
let r = { type: "generic", handled: true }, s = n.mechanism;
|
|
617
617
|
if (n.mechanism = { ...r, ...s, ...e }, e && "data" in e) {
|
|
@@ -619,149 +619,114 @@ function ae(t, e) {
|
|
|
619
619
|
n.mechanism.data = i;
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
|
-
function
|
|
622
|
+
function xe(t) {
|
|
623
623
|
if (t && t.__sentry_captured__) return true;
|
|
624
624
|
try {
|
|
625
|
-
|
|
625
|
+
q(t, "__sentry_captured__", true);
|
|
626
626
|
} catch {
|
|
627
627
|
}
|
|
628
628
|
return false;
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function ae(t) {
|
|
631
631
|
return Array.isArray(t) ? t : [t];
|
|
632
632
|
}
|
|
633
|
-
function
|
|
633
|
+
function D(t, e = 100, n = 1 / 0) {
|
|
634
634
|
try {
|
|
635
|
-
return
|
|
635
|
+
return Ne("", t, e, n);
|
|
636
636
|
} catch (r) {
|
|
637
637
|
return { ERROR: `**non-serializable** (${r})` };
|
|
638
638
|
}
|
|
639
639
|
}
|
|
640
|
-
function
|
|
641
|
-
let r =
|
|
642
|
-
return
|
|
640
|
+
function W(t, e = 3, n = 100 * 1024) {
|
|
641
|
+
let r = D(t, e);
|
|
642
|
+
return sr(r) > n ? W(t, e - 1, n) : r;
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function Ne(t, e, n = 1 / 0, r = 1 / 0, s = Xt()) {
|
|
645
645
|
let [i, o] = s;
|
|
646
|
-
if (e == null || ["number", "boolean", "string"].includes(typeof e) && !
|
|
647
|
-
let a =
|
|
646
|
+
if (e == null || ["number", "boolean", "string"].includes(typeof e) && !Z(e)) return e;
|
|
647
|
+
let a = tr(t, e);
|
|
648
648
|
if (!a.startsWith("[object ")) return a;
|
|
649
649
|
if (e.__sentry_skip_normalization__) return e;
|
|
650
|
-
let
|
|
651
|
-
if (
|
|
650
|
+
let c = typeof e.__sentry_override_normalization_depth__ == "number" ? e.__sentry_override_normalization_depth__ : n;
|
|
651
|
+
if (c === 0) return a.replace("object ", "");
|
|
652
652
|
if (i(e)) return "[Circular ~]";
|
|
653
|
-
let
|
|
654
|
-
if (
|
|
655
|
-
let _ =
|
|
656
|
-
return
|
|
653
|
+
let u = e;
|
|
654
|
+
if (u && typeof u.toJSON == "function") try {
|
|
655
|
+
let _ = u.toJSON();
|
|
656
|
+
return Ne("", _, c - 1, r, s);
|
|
657
657
|
} catch {
|
|
658
658
|
}
|
|
659
|
-
let f = Array.isArray(e) ? [] : {}, d = 0, l =
|
|
659
|
+
let f = Array.isArray(e) ? [] : {}, d = 0, l = ge(e);
|
|
660
660
|
for (let _ in l) {
|
|
661
661
|
if (!Object.prototype.hasOwnProperty.call(l, _)) continue;
|
|
662
662
|
if (d >= r) {
|
|
663
663
|
f[_] = "[MaxProperties ~]";
|
|
664
664
|
break;
|
|
665
665
|
}
|
|
666
|
-
let
|
|
667
|
-
f[_] =
|
|
666
|
+
let M = l[_];
|
|
667
|
+
f[_] = Ne(_, M, c - 1, r, s), d++;
|
|
668
668
|
}
|
|
669
669
|
return o(e), f;
|
|
670
670
|
}
|
|
671
|
-
function
|
|
671
|
+
function tr(t, e) {
|
|
672
672
|
try {
|
|
673
673
|
if (t === "domain" && e && typeof e == "object" && e._events) return "[Domain]";
|
|
674
674
|
if (t === "domainEmitter") return "[DomainEmitter]";
|
|
675
675
|
if (typeof global < "u" && e === global) return "[Global]";
|
|
676
676
|
if (typeof window < "u" && e === window) return "[Window]";
|
|
677
677
|
if (typeof document < "u" && e === document) return "[Document]";
|
|
678
|
-
if (
|
|
679
|
-
if (
|
|
678
|
+
if (qe(e)) return "[VueViewModel]";
|
|
679
|
+
if (He(e)) return "[SyntheticEvent]";
|
|
680
680
|
if (typeof e == "number" && e !== e) return "[NaN]";
|
|
681
|
-
if (typeof e == "function") return `[Function: ${
|
|
681
|
+
if (typeof e == "function") return `[Function: ${ne(e)}]`;
|
|
682
682
|
if (typeof e == "symbol") return `[${String(e)}]`;
|
|
683
683
|
if (typeof e == "bigint") return `[BigInt: ${String(e)}]`;
|
|
684
|
-
let n =
|
|
684
|
+
let n = nr(e);
|
|
685
685
|
return /^HTML(\w*)Element$/.test(n) ? `[HTMLElement: ${n}]` : `[object ${n}]`;
|
|
686
686
|
} catch (n) {
|
|
687
687
|
return `**non-serializable** (${n})`;
|
|
688
688
|
}
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function nr(t) {
|
|
691
691
|
let e = Object.getPrototypeOf(t);
|
|
692
692
|
return e ? e.constructor.name : "null prototype";
|
|
693
693
|
}
|
|
694
|
-
function
|
|
694
|
+
function rr(t) {
|
|
695
695
|
return ~-encodeURI(t).split(/%..|./).length;
|
|
696
696
|
}
|
|
697
|
-
function
|
|
698
|
-
return
|
|
699
|
-
}
|
|
700
|
-
function ur(t, e) {
|
|
701
|
-
let n = 0;
|
|
702
|
-
for (let r = t.length - 1; r >= 0; r--) {
|
|
703
|
-
let s = t[r];
|
|
704
|
-
s === "." ? t.splice(r, 1) : s === ".." ? (t.splice(r, 1), n++) : n && (t.splice(r, 1), n--);
|
|
705
|
-
}
|
|
706
|
-
if (e) for (; n--; n) t.unshift("..");
|
|
707
|
-
return t;
|
|
697
|
+
function sr(t) {
|
|
698
|
+
return rr(JSON.stringify(t));
|
|
708
699
|
}
|
|
709
|
-
var
|
|
710
|
-
function
|
|
711
|
-
let e = t.length > 1024 ? `<truncated>${t.slice(-1024)}` : t, n =
|
|
700
|
+
var ir = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;
|
|
701
|
+
function or(t) {
|
|
702
|
+
let e = t.length > 1024 ? `<truncated>${t.slice(-1024)}` : t, n = ir.exec(e);
|
|
712
703
|
return n ? n.slice(1) : [];
|
|
713
704
|
}
|
|
714
|
-
function
|
|
715
|
-
let
|
|
716
|
-
for (let r = t.length - 1; r >= -1 && !n; r--) {
|
|
717
|
-
let s = r >= 0 ? t[r] : "/";
|
|
718
|
-
s && (e = `${s}/${e}`, n = s.charAt(0) === "/");
|
|
719
|
-
}
|
|
720
|
-
return e = ur(e.split("/").filter((r) => !!r), !n).join("/"), (n ? "/" : "") + e || ".";
|
|
721
|
-
}
|
|
722
|
-
function tn(t) {
|
|
723
|
-
let e = 0;
|
|
724
|
-
for (; e < t.length && t[e] === ""; e++) ;
|
|
725
|
-
let n = t.length - 1;
|
|
726
|
-
for (; n >= 0 && t[n] === ""; n--) ;
|
|
727
|
-
return e > n ? [] : t.slice(e, n - e + 1);
|
|
728
|
-
}
|
|
729
|
-
function nt(t, e) {
|
|
730
|
-
t = tt(t).slice(1), e = tt(e).slice(1);
|
|
731
|
-
let n = tn(t.split("/")), r = tn(e.split("/")), s = Math.min(n.length, r.length), i = s;
|
|
732
|
-
for (let a = 0; a < s; a++) if (n[a] !== r[a]) {
|
|
733
|
-
i = a;
|
|
734
|
-
break;
|
|
735
|
-
}
|
|
736
|
-
let o = [];
|
|
737
|
-
for (let a = i; a < n.length; a++) o.push("..");
|
|
738
|
-
return o = o.concat(r.slice(i)), o.join("/");
|
|
739
|
-
}
|
|
740
|
-
function ue(t, e) {
|
|
741
|
-
let n = fr(t)[2];
|
|
705
|
+
function Qe(t, e) {
|
|
706
|
+
let n = or(t)[2];
|
|
742
707
|
return e && n.slice(e.length * -1) === e && (n = n.slice(0, n.length - e.length)), n;
|
|
743
708
|
}
|
|
744
|
-
var
|
|
709
|
+
var A;
|
|
745
710
|
(function(t) {
|
|
746
711
|
t[t.PENDING = 0] = "PENDING";
|
|
747
712
|
let n = 1;
|
|
748
713
|
t[t.RESOLVED = n] = "RESOLVED";
|
|
749
714
|
let r = 2;
|
|
750
715
|
t[t.REJECTED = r] = "REJECTED";
|
|
751
|
-
})(
|
|
716
|
+
})(A || (A = {}));
|
|
752
717
|
function T(t) {
|
|
753
718
|
return new S((e) => {
|
|
754
719
|
e(t);
|
|
755
720
|
});
|
|
756
721
|
}
|
|
757
|
-
function
|
|
722
|
+
function F(t) {
|
|
758
723
|
return new S((e, n) => {
|
|
759
724
|
n(t);
|
|
760
725
|
});
|
|
761
726
|
}
|
|
762
727
|
var S = class {
|
|
763
728
|
constructor(e) {
|
|
764
|
-
S.prototype.__init.call(this), S.prototype.__init2.call(this), S.prototype.__init3.call(this), S.prototype.__init4.call(this), this._state =
|
|
729
|
+
S.prototype.__init.call(this), S.prototype.__init2.call(this), S.prototype.__init3.call(this), S.prototype.__init4.call(this), this._state = A.PENDING, this._handlers = [];
|
|
765
730
|
try {
|
|
766
731
|
e(this._resolve, this._reject);
|
|
767
732
|
} catch (n) {
|
|
@@ -808,18 +773,18 @@ var S = class {
|
|
|
808
773
|
}
|
|
809
774
|
__init() {
|
|
810
775
|
this._resolve = (e) => {
|
|
811
|
-
this._setResult(
|
|
776
|
+
this._setResult(A.RESOLVED, e);
|
|
812
777
|
};
|
|
813
778
|
}
|
|
814
779
|
__init2() {
|
|
815
780
|
this._reject = (e) => {
|
|
816
|
-
this._setResult(
|
|
781
|
+
this._setResult(A.REJECTED, e);
|
|
817
782
|
};
|
|
818
783
|
}
|
|
819
784
|
__init3() {
|
|
820
785
|
this._setResult = (e, n) => {
|
|
821
|
-
if (this._state ===
|
|
822
|
-
if (
|
|
786
|
+
if (this._state === A.PENDING) {
|
|
787
|
+
if (G(n)) {
|
|
823
788
|
n.then(this._resolve, this._reject);
|
|
824
789
|
return;
|
|
825
790
|
}
|
|
@@ -829,15 +794,15 @@ var S = class {
|
|
|
829
794
|
}
|
|
830
795
|
__init4() {
|
|
831
796
|
this._executeHandlers = () => {
|
|
832
|
-
if (this._state ===
|
|
797
|
+
if (this._state === A.PENDING) return;
|
|
833
798
|
let e = this._handlers.slice();
|
|
834
799
|
this._handlers = [], e.forEach((n) => {
|
|
835
|
-
n[0] || (this._state ===
|
|
800
|
+
n[0] || (this._state === A.RESOLVED && n[1](this._value), this._state === A.REJECTED && n[2](this._value), n[0] = true);
|
|
836
801
|
});
|
|
837
802
|
};
|
|
838
803
|
}
|
|
839
804
|
};
|
|
840
|
-
function
|
|
805
|
+
function et(t) {
|
|
841
806
|
let e = [];
|
|
842
807
|
function n() {
|
|
843
808
|
return t === void 0 || e.length < t;
|
|
@@ -846,69 +811,69 @@ function rt(t) {
|
|
|
846
811
|
return e.splice(e.indexOf(o), 1)[0];
|
|
847
812
|
}
|
|
848
813
|
function s(o) {
|
|
849
|
-
if (!n()) return
|
|
814
|
+
if (!n()) return F(new y("Not adding Promise because buffer limit was reached."));
|
|
850
815
|
let a = o();
|
|
851
816
|
return e.indexOf(a) === -1 && e.push(a), a.then(() => r(a)).then(null, () => r(a).then(null, () => {
|
|
852
817
|
})), a;
|
|
853
818
|
}
|
|
854
819
|
function i(o) {
|
|
855
|
-
return new S((a,
|
|
856
|
-
let
|
|
857
|
-
if (!
|
|
820
|
+
return new S((a, c) => {
|
|
821
|
+
let u = e.length;
|
|
822
|
+
if (!u) return a(true);
|
|
858
823
|
let f = setTimeout(() => {
|
|
859
824
|
o && o > 0 && a(false);
|
|
860
825
|
}, o);
|
|
861
826
|
e.forEach((d) => {
|
|
862
827
|
T(d).then(() => {
|
|
863
|
-
--
|
|
864
|
-
},
|
|
828
|
+
--u || (clearTimeout(f), a(true));
|
|
829
|
+
}, c);
|
|
865
830
|
});
|
|
866
831
|
});
|
|
867
832
|
}
|
|
868
833
|
return { $: e, add: s, drain: i };
|
|
869
834
|
}
|
|
870
|
-
var
|
|
871
|
-
var
|
|
872
|
-
function
|
|
873
|
-
let { performance: t } =
|
|
835
|
+
var Qt = x();
|
|
836
|
+
var nt = { nowSeconds: () => Date.now() / 1e3 };
|
|
837
|
+
function ar() {
|
|
838
|
+
let { performance: t } = Qt;
|
|
874
839
|
if (!t || !t.now) return;
|
|
875
840
|
let e = Date.now() - t.now();
|
|
876
841
|
return { now: () => t.now(), timeOrigin: e };
|
|
877
842
|
}
|
|
878
|
-
function
|
|
843
|
+
function cr() {
|
|
879
844
|
try {
|
|
880
|
-
return
|
|
845
|
+
return Jt(module, "perf_hooks").performance;
|
|
881
846
|
} catch {
|
|
882
847
|
return;
|
|
883
848
|
}
|
|
884
849
|
}
|
|
885
|
-
var
|
|
886
|
-
var
|
|
887
|
-
var
|
|
888
|
-
var
|
|
889
|
-
var
|
|
890
|
-
var
|
|
891
|
-
let { performance: t } =
|
|
850
|
+
var tt = Vt() ? cr() : ar();
|
|
851
|
+
var Zt = tt === void 0 ? nt : { nowSeconds: () => (tt.timeOrigin + tt.now()) / 1e3 };
|
|
852
|
+
var B = nt.nowSeconds.bind(nt);
|
|
853
|
+
var L = Zt.nowSeconds.bind(Zt);
|
|
854
|
+
var ce;
|
|
855
|
+
var ur = (() => {
|
|
856
|
+
let { performance: t } = Qt;
|
|
892
857
|
if (!t || !t.now) {
|
|
893
|
-
|
|
858
|
+
ce = "none";
|
|
894
859
|
return;
|
|
895
860
|
}
|
|
896
|
-
let e = 3600 * 1e3, n = t.now(), r = Date.now(), s = t.timeOrigin ? Math.abs(t.timeOrigin + n - r) : e, i = s < e, o = t.timing && t.timing.navigationStart,
|
|
897
|
-
return i ||
|
|
861
|
+
let e = 3600 * 1e3, n = t.now(), r = Date.now(), s = t.timeOrigin ? Math.abs(t.timeOrigin + n - r) : e, i = s < e, o = t.timing && t.timing.navigationStart, c = typeof o == "number" ? Math.abs(o + n - r) : e, u = c < e;
|
|
862
|
+
return i || u ? s <= c ? (ce = "timeOrigin", t.timeOrigin) : (ce = "navigationStart", o) : (ce = "dateNow", r);
|
|
898
863
|
})();
|
|
899
|
-
var
|
|
900
|
-
function
|
|
864
|
+
var dr = new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");
|
|
865
|
+
function rt(t = h(), e = h().substring(16), n) {
|
|
901
866
|
let r = "";
|
|
902
867
|
return n !== void 0 && (r = n ? "-1" : "-0"), `${t}-${e}${r}`;
|
|
903
868
|
}
|
|
904
|
-
function
|
|
869
|
+
function P(t, e = []) {
|
|
905
870
|
return [t, e];
|
|
906
871
|
}
|
|
907
|
-
function
|
|
872
|
+
function it(t, e) {
|
|
908
873
|
let [n, r] = t;
|
|
909
874
|
return [n, [...r, e]];
|
|
910
875
|
}
|
|
911
|
-
function
|
|
876
|
+
function De(t, e) {
|
|
912
877
|
let n = t[1];
|
|
913
878
|
for (let r of n) {
|
|
914
879
|
let s = r[0].type;
|
|
@@ -916,157 +881,118 @@ function Oe(t, e) {
|
|
|
916
881
|
}
|
|
917
882
|
return false;
|
|
918
883
|
}
|
|
919
|
-
function
|
|
884
|
+
function st(t, e) {
|
|
920
885
|
return (e || new TextEncoder()).encode(t);
|
|
921
886
|
}
|
|
922
|
-
function
|
|
887
|
+
function ot(t, e) {
|
|
923
888
|
let [n, r] = t, s = JSON.stringify(n);
|
|
924
889
|
function i(o) {
|
|
925
|
-
typeof s == "string" ? s = typeof o == "string" ? s + o : [
|
|
890
|
+
typeof s == "string" ? s = typeof o == "string" ? s + o : [st(s, e), o] : s.push(typeof o == "string" ? st(o, e) : o);
|
|
926
891
|
}
|
|
927
892
|
for (let o of r) {
|
|
928
|
-
let [a,
|
|
893
|
+
let [a, c] = o;
|
|
929
894
|
if (i(`
|
|
930
895
|
${JSON.stringify(a)}
|
|
931
|
-
`), typeof
|
|
896
|
+
`), typeof c == "string" || c instanceof Uint8Array) i(c);
|
|
932
897
|
else {
|
|
933
|
-
let
|
|
898
|
+
let u;
|
|
934
899
|
try {
|
|
935
|
-
|
|
900
|
+
u = JSON.stringify(c);
|
|
936
901
|
} catch {
|
|
937
|
-
|
|
902
|
+
u = JSON.stringify(D(c));
|
|
938
903
|
}
|
|
939
|
-
i(
|
|
904
|
+
i(u);
|
|
940
905
|
}
|
|
941
906
|
}
|
|
942
|
-
return typeof s == "string" ? s :
|
|
907
|
+
return typeof s == "string" ? s : fr(s);
|
|
943
908
|
}
|
|
944
|
-
function
|
|
909
|
+
function fr(t) {
|
|
945
910
|
let e = t.reduce((s, i) => s + i.length, 0), n = new Uint8Array(e), r = 0;
|
|
946
911
|
for (let s of t) n.set(s, r), r += s.length;
|
|
947
912
|
return n;
|
|
948
913
|
}
|
|
949
|
-
function
|
|
950
|
-
let n = typeof t.data == "string" ?
|
|
914
|
+
function at(t, e) {
|
|
915
|
+
let n = typeof t.data == "string" ? st(t.data, e) : t.data;
|
|
951
916
|
return [g({ type: "attachment", length: n.length, filename: t.filename, content_type: t.contentType, attachment_type: t.attachmentType }), n];
|
|
952
917
|
}
|
|
953
|
-
var
|
|
954
|
-
function
|
|
955
|
-
return
|
|
918
|
+
var pr = { session: "session", sessions: "session", attachment: "attachment", transaction: "transaction", event: "error", client_report: "internal", user_report: "default", profile: "profile", replay_event: "replay", replay_recording: "replay", check_in: "monitor", statsd: "unknown" };
|
|
919
|
+
function ke(t) {
|
|
920
|
+
return pr[t];
|
|
956
921
|
}
|
|
957
|
-
function
|
|
922
|
+
function Oe(t) {
|
|
958
923
|
if (!t || !t.sdk) return;
|
|
959
924
|
let { name: e, version: n } = t.sdk;
|
|
960
925
|
return { name: e, version: n };
|
|
961
926
|
}
|
|
962
|
-
function
|
|
927
|
+
function ct(t, e, n, r) {
|
|
963
928
|
let s = t.sdkProcessingMetadata && t.sdkProcessingMetadata.dynamicSamplingContext;
|
|
964
|
-
return { event_id: t.event_id, sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...e && { sdk: e }, ...!!n && r && { dsn:
|
|
929
|
+
return { event_id: t.event_id, sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...e && { sdk: e }, ...!!n && r && { dsn: C(r) }, ...s && { trace: g({ ...s }) } };
|
|
965
930
|
}
|
|
966
|
-
function
|
|
931
|
+
function en(t, e = Date.now()) {
|
|
967
932
|
let n = parseInt(`${t}`, 10);
|
|
968
933
|
if (!isNaN(n)) return n * 1e3;
|
|
969
934
|
let r = Date.parse(`${t}`);
|
|
970
935
|
return isNaN(r) ? 6e4 : r - e;
|
|
971
936
|
}
|
|
972
|
-
function
|
|
937
|
+
function tn(t, e) {
|
|
973
938
|
return t[e] || t.all || 0;
|
|
974
939
|
}
|
|
975
|
-
function
|
|
976
|
-
return
|
|
940
|
+
function ut(t, e, n = Date.now()) {
|
|
941
|
+
return tn(t, e) > n;
|
|
977
942
|
}
|
|
978
|
-
function
|
|
943
|
+
function dt(t, { statusCode: e, headers: n }, r = Date.now()) {
|
|
979
944
|
let s = { ...t }, i = n && n["x-sentry-rate-limits"], o = n && n["retry-after"];
|
|
980
945
|
if (i) for (let a of i.trim().split(",")) {
|
|
981
|
-
let [
|
|
982
|
-
if (!
|
|
983
|
-
else for (let l of
|
|
946
|
+
let [c, u] = a.split(":", 2), f = parseInt(c, 10), d = (isNaN(f) ? 60 : f) * 1e3;
|
|
947
|
+
if (!u) s.all = r + d;
|
|
948
|
+
else for (let l of u.split(";")) s[l] = r + d;
|
|
984
949
|
}
|
|
985
|
-
else o ? s.all = r +
|
|
950
|
+
else o ? s.all = r + en(o, r) : e === 429 && (s.all = r + 60 * 1e3);
|
|
986
951
|
return s;
|
|
987
952
|
}
|
|
988
|
-
function
|
|
953
|
+
function ft(t, e) {
|
|
989
954
|
return t(e.stack || "", 1);
|
|
990
955
|
}
|
|
991
|
-
function
|
|
992
|
-
let n = { type: e.name || e.constructor.name, value: e.message }, r =
|
|
956
|
+
function nn(t, e) {
|
|
957
|
+
let n = { type: e.name || e.constructor.name, value: e.message }, r = ft(t, e);
|
|
993
958
|
return r.length && (n.stacktrace = { frames: r }), n;
|
|
994
959
|
}
|
|
995
|
-
function
|
|
960
|
+
function lr(t) {
|
|
996
961
|
if ("name" in t && typeof t.name == "string") {
|
|
997
962
|
let e = `'${t.name}' captured as exception`;
|
|
998
963
|
return "message" in t && typeof t.message == "string" && (e += ` with message '${t.message}'`), e;
|
|
999
|
-
} else return "message" in t && typeof t.message == "string" ? t.message : `Object captured as exception with keys: ${
|
|
964
|
+
} else return "message" in t && typeof t.message == "string" ? t.message : `Object captured as exception with keys: ${te(t)}`;
|
|
1000
965
|
}
|
|
1001
|
-
function
|
|
966
|
+
function pt(t, e, n, r) {
|
|
1002
967
|
let s = n, o = r && r.data && r.data.mechanism || { handled: true, type: "generic" };
|
|
1003
|
-
if (!
|
|
968
|
+
if (!U(n)) {
|
|
1004
969
|
if (R(n)) {
|
|
1005
|
-
let
|
|
1006
|
-
|
|
1007
|
-
l.setExtra("__serialized__",
|
|
970
|
+
let c = t(), u = c.getClient(), f = u && u.getOptions().normalizeDepth;
|
|
971
|
+
c.configureScope((l) => {
|
|
972
|
+
l.setExtra("__serialized__", W(n, f));
|
|
1008
973
|
});
|
|
1009
|
-
let d =
|
|
974
|
+
let d = lr(n);
|
|
1010
975
|
s = r && r.syntheticException || new Error(d), s.message = d;
|
|
1011
976
|
} else s = r && r.syntheticException || new Error(n), s.message = n;
|
|
1012
977
|
o.synthetic = true;
|
|
1013
978
|
}
|
|
1014
|
-
let a = { exception: { values: [
|
|
1015
|
-
return
|
|
979
|
+
let a = { exception: { values: [nn(e, s)] } };
|
|
980
|
+
return ie(a, void 0, void 0), oe(a, o), { ...a, event_id: r && r.event_id };
|
|
1016
981
|
}
|
|
1017
|
-
function
|
|
982
|
+
function lt(t, e, n = "info", r, s) {
|
|
1018
983
|
let i = { event_id: r && r.event_id, level: n, message: e };
|
|
1019
984
|
if (s && r && r.syntheticException) {
|
|
1020
|
-
let o =
|
|
985
|
+
let o = ft(t, r.syntheticException);
|
|
1021
986
|
o.length && (i.exception = { values: [{ value: e, stacktrace: { frames: o } }] });
|
|
1022
987
|
}
|
|
1023
988
|
return i;
|
|
1024
989
|
}
|
|
1025
|
-
var
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
}
|
|
1029
|
-
constructor(e = {}) {
|
|
1030
|
-
O.prototype.__init.call(this), this.name = O.id, e.root && (this._root = e.root), this._prefix = e.prefix || "app:///", e.iteratee && (this._iteratee = e.iteratee);
|
|
1031
|
-
}
|
|
1032
|
-
setupOnce(e, n) {
|
|
1033
|
-
}
|
|
1034
|
-
processEvent(e) {
|
|
1035
|
-
return this.process(e);
|
|
1036
|
-
}
|
|
1037
|
-
process(e) {
|
|
1038
|
-
let n = e;
|
|
1039
|
-
return e.exception && Array.isArray(e.exception.values) && (n = this._processExceptionsEvent(n)), n;
|
|
1040
|
-
}
|
|
1041
|
-
__init() {
|
|
1042
|
-
this._iteratee = (e) => {
|
|
1043
|
-
if (!e.filename) return e;
|
|
1044
|
-
let n = /^[a-zA-Z]:\\/.test(e.filename) || e.filename.includes("\\") && !e.filename.includes("/"), r = /^\//.test(e.filename);
|
|
1045
|
-
if (n || r) {
|
|
1046
|
-
let s = n ? e.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : e.filename, i = this._root ? nt(this._root, s) : ue(s);
|
|
1047
|
-
e.filename = `${this._prefix}${i}`;
|
|
1048
|
-
}
|
|
1049
|
-
return e;
|
|
1050
|
-
};
|
|
1051
|
-
}
|
|
1052
|
-
_processExceptionsEvent(e) {
|
|
1053
|
-
try {
|
|
1054
|
-
return { ...e, exception: { ...e.exception, values: e.exception.values.map((n) => ({ ...n, ...n.stacktrace && { stacktrace: this._processStacktrace(n.stacktrace) } })) } };
|
|
1055
|
-
} catch {
|
|
1056
|
-
return e;
|
|
1057
|
-
}
|
|
1058
|
-
}
|
|
1059
|
-
_processStacktrace(e) {
|
|
1060
|
-
return { ...e, frames: e && e.frames && e.frames.map((n) => this._iteratee(n)) };
|
|
1061
|
-
}
|
|
1062
|
-
};
|
|
1063
|
-
O.__initStatic();
|
|
1064
|
-
var V = "production";
|
|
1065
|
-
function fe() {
|
|
1066
|
-
return ee("globalEventProcessors", () => []);
|
|
990
|
+
var z = "production";
|
|
991
|
+
function ue() {
|
|
992
|
+
return Q("globalEventProcessors", () => []);
|
|
1067
993
|
}
|
|
1068
|
-
function
|
|
1069
|
-
|
|
994
|
+
function rn(t) {
|
|
995
|
+
ue().push(t);
|
|
1070
996
|
}
|
|
1071
997
|
function K(t, e, n, r = 0) {
|
|
1072
998
|
return new S((s, i) => {
|
|
@@ -1074,16 +1000,16 @@ function K(t, e, n, r = 0) {
|
|
|
1074
1000
|
if (e === null || typeof o != "function") s(e);
|
|
1075
1001
|
else {
|
|
1076
1002
|
let a = o({ ...e }, n);
|
|
1077
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && o.id && a === null && p.log(`Event processor "${o.id}" dropped event`),
|
|
1003
|
+
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && o.id && a === null && p.log(`Event processor "${o.id}" dropped event`), G(a) ? a.then((c) => K(t, c, n, r + 1).then(s)).then(null, i) : K(t, a, n, r + 1).then(s).then(null, i);
|
|
1078
1004
|
}
|
|
1079
1005
|
});
|
|
1080
1006
|
}
|
|
1081
|
-
function
|
|
1082
|
-
let e =
|
|
1083
|
-
return t &&
|
|
1007
|
+
function sn(t) {
|
|
1008
|
+
let e = L(), n = { sid: h(), init: true, timestamp: e, started: e, duration: 0, status: "ok", errors: 0, ignoreDuration: false, toJSON: () => mr(n) };
|
|
1009
|
+
return t && w(n, t), n;
|
|
1084
1010
|
}
|
|
1085
|
-
function
|
|
1086
|
-
if (e.user && (!t.ipAddress && e.user.ip_address && (t.ipAddress = e.user.ip_address), !t.did && !e.did && (t.did = e.user.id || e.user.email || e.user.username)), t.timestamp = e.timestamp ||
|
|
1011
|
+
function w(t, e = {}) {
|
|
1012
|
+
if (e.user && (!t.ipAddress && e.user.ip_address && (t.ipAddress = e.user.ip_address), !t.did && !e.did && (t.did = e.user.id || e.user.email || e.user.username)), t.timestamp = e.timestamp || L(), e.abnormal_mechanism && (t.abnormal_mechanism = e.abnormal_mechanism), e.ignoreDuration && (t.ignoreDuration = e.ignoreDuration), e.sid && (t.sid = e.sid.length === 32 ? e.sid : h()), e.init !== void 0 && (t.init = e.init), !t.did && e.did && (t.did = `${e.did}`), typeof e.started == "number" && (t.started = e.started), t.ignoreDuration) t.duration = void 0;
|
|
1087
1013
|
else if (typeof e.duration == "number") t.duration = e.duration;
|
|
1088
1014
|
else {
|
|
1089
1015
|
let n = t.timestamp - t.started;
|
|
@@ -1091,17 +1017,17 @@ function v(t, e = {}) {
|
|
|
1091
1017
|
}
|
|
1092
1018
|
e.release && (t.release = e.release), e.environment && (t.environment = e.environment), !t.ipAddress && e.ipAddress && (t.ipAddress = e.ipAddress), !t.userAgent && e.userAgent && (t.userAgent = e.userAgent), typeof e.errors == "number" && (t.errors = e.errors), e.status && (t.status = e.status);
|
|
1093
1019
|
}
|
|
1094
|
-
function
|
|
1020
|
+
function on(t, e) {
|
|
1095
1021
|
let n = {};
|
|
1096
|
-
e ? n = { status: e } : t.status === "ok" && (n = { status: "exited" }),
|
|
1022
|
+
e ? n = { status: e } : t.status === "ok" && (n = { status: "exited" }), w(t, n);
|
|
1097
1023
|
}
|
|
1098
|
-
function
|
|
1024
|
+
function mr(t) {
|
|
1099
1025
|
return g({ sid: `${t.sid}`, init: t.init, started: new Date(t.started * 1e3).toISOString(), timestamp: new Date(t.timestamp * 1e3).toISOString(), status: t.status, errors: t.errors, did: typeof t.did == "number" || typeof t.did == "string" ? `${t.did}` : void 0, duration: t.duration, abnormal_mechanism: t.abnormal_mechanism, attrs: { release: t.release, environment: t.environment, ip_address: t.ipAddress, user_agent: t.userAgent } });
|
|
1100
1026
|
}
|
|
1101
|
-
var
|
|
1027
|
+
var _r = 100;
|
|
1102
1028
|
var k = class {
|
|
1103
1029
|
constructor() {
|
|
1104
|
-
this._notifyingListeners = false, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext =
|
|
1030
|
+
this._notifyingListeners = false, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = an();
|
|
1105
1031
|
}
|
|
1106
1032
|
static clone(e) {
|
|
1107
1033
|
let n = new k();
|
|
@@ -1114,7 +1040,7 @@ var k = class {
|
|
|
1114
1040
|
return this._eventProcessors.push(e), this;
|
|
1115
1041
|
}
|
|
1116
1042
|
setUser(e) {
|
|
1117
|
-
return this._user = e || {}, this._session &&
|
|
1043
|
+
return this._user = e || {}, this._session && w(this._session, { user: e }), this._notifyScopeListeners(), this;
|
|
1118
1044
|
}
|
|
1119
1045
|
getUser() {
|
|
1120
1046
|
return this._user;
|
|
@@ -1174,12 +1100,12 @@ var k = class {
|
|
|
1174
1100
|
return e instanceof k ? (this._tags = { ...this._tags, ...e._tags }, this._extra = { ...this._extra, ...e._extra }, this._contexts = { ...this._contexts, ...e._contexts }, e._user && Object.keys(e._user).length && (this._user = e._user), e._level && (this._level = e._level), e._fingerprint && (this._fingerprint = e._fingerprint), e._requestSession && (this._requestSession = e._requestSession), e._propagationContext && (this._propagationContext = e._propagationContext)) : R(e) && (e = e, this._tags = { ...this._tags, ...e.tags }, this._extra = { ...this._extra, ...e.extra }, this._contexts = { ...this._contexts, ...e.contexts }, e.user && (this._user = e.user), e.level && (this._level = e.level), e.fingerprint && (this._fingerprint = e.fingerprint), e.requestSession && (this._requestSession = e.requestSession), e.propagationContext && (this._propagationContext = e.propagationContext)), this;
|
|
1175
1101
|
}
|
|
1176
1102
|
clear() {
|
|
1177
|
-
return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._span = void 0, this._session = void 0, this._notifyScopeListeners(), this._attachments = [], this._propagationContext =
|
|
1103
|
+
return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._span = void 0, this._session = void 0, this._notifyScopeListeners(), this._attachments = [], this._propagationContext = an(), this;
|
|
1178
1104
|
}
|
|
1179
1105
|
addBreadcrumb(e, n) {
|
|
1180
|
-
let r = typeof n == "number" ? n :
|
|
1106
|
+
let r = typeof n == "number" ? n : _r;
|
|
1181
1107
|
if (r <= 0) return this;
|
|
1182
|
-
let s = { timestamp:
|
|
1108
|
+
let s = { timestamp: B(), ...e }, i = this._breadcrumbs;
|
|
1183
1109
|
return i.push(s), this._breadcrumbs = i.length > r ? i.slice(-r) : i, this._notifyScopeListeners(), this;
|
|
1184
1110
|
}
|
|
1185
1111
|
getLastBreadcrumb() {
|
|
@@ -1209,7 +1135,7 @@ var k = class {
|
|
|
1209
1135
|
}
|
|
1210
1136
|
this._applyFingerprint(e);
|
|
1211
1137
|
let s = this._getBreadcrumbs(), i = [...e.breadcrumbs || [], ...s];
|
|
1212
|
-
return e.breadcrumbs = i.length > 0 ? i : void 0, e.sdkProcessingMetadata = { ...e.sdkProcessingMetadata, ...this._sdkProcessingMetadata, propagationContext: this._propagationContext }, K([...r || [], ...
|
|
1138
|
+
return e.breadcrumbs = i.length > 0 ? i : void 0, e.sdkProcessingMetadata = { ...e.sdkProcessingMetadata, ...this._sdkProcessingMetadata, propagationContext: this._propagationContext }, K([...r || [], ...ue(), ...this._eventProcessors], e, n);
|
|
1213
1139
|
}
|
|
1214
1140
|
setSDKProcessingMetadata(e) {
|
|
1215
1141
|
return this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...e }, this;
|
|
@@ -1229,16 +1155,16 @@ var k = class {
|
|
|
1229
1155
|
}), this._notifyingListeners = false);
|
|
1230
1156
|
}
|
|
1231
1157
|
_applyFingerprint(e) {
|
|
1232
|
-
e.fingerprint = e.fingerprint ?
|
|
1158
|
+
e.fingerprint = e.fingerprint ? ae(e.fingerprint) : [], this._fingerprint && (e.fingerprint = e.fingerprint.concat(this._fingerprint)), e.fingerprint && !e.fingerprint.length && delete e.fingerprint;
|
|
1233
1159
|
}
|
|
1234
1160
|
};
|
|
1235
|
-
function
|
|
1161
|
+
function an() {
|
|
1236
1162
|
return { traceId: h(), spanId: h().substring(16) };
|
|
1237
1163
|
}
|
|
1238
|
-
var
|
|
1239
|
-
var
|
|
1240
|
-
var
|
|
1241
|
-
constructor(e, n = new k(), r =
|
|
1164
|
+
var cn = 4;
|
|
1165
|
+
var hr = 100;
|
|
1166
|
+
var Y = class {
|
|
1167
|
+
constructor(e, n = new k(), r = cn) {
|
|
1242
1168
|
this._version = r, this._stack = [{ scope: n }], e && this.bindClient(e);
|
|
1243
1169
|
}
|
|
1244
1170
|
isOlderThan(e) {
|
|
@@ -1299,10 +1225,10 @@ var $ = class {
|
|
|
1299
1225
|
addBreadcrumb(e, n) {
|
|
1300
1226
|
let { scope: r, client: s } = this.getStackTop();
|
|
1301
1227
|
if (!s) return;
|
|
1302
|
-
let { beforeBreadcrumb: i = null, maxBreadcrumbs: o =
|
|
1228
|
+
let { beforeBreadcrumb: i = null, maxBreadcrumbs: o = hr } = s.getOptions && s.getOptions() || {};
|
|
1303
1229
|
if (o <= 0) return;
|
|
1304
|
-
let
|
|
1305
|
-
|
|
1230
|
+
let c = { timestamp: B(), ...e }, u = i ? _e(() => i(c, n)) : c;
|
|
1231
|
+
u !== null && (s.emit && s.emit("beforeAddBreadcrumb", u, n), r.addBreadcrumb(u, o));
|
|
1306
1232
|
}
|
|
1307
1233
|
setUser(e) {
|
|
1308
1234
|
this.getScope().setUser(e);
|
|
@@ -1327,11 +1253,11 @@ var $ = class {
|
|
|
1327
1253
|
r && e(n);
|
|
1328
1254
|
}
|
|
1329
1255
|
run(e) {
|
|
1330
|
-
let n =
|
|
1256
|
+
let n = mt(this);
|
|
1331
1257
|
try {
|
|
1332
1258
|
e(this);
|
|
1333
1259
|
} finally {
|
|
1334
|
-
|
|
1260
|
+
mt(n);
|
|
1335
1261
|
}
|
|
1336
1262
|
}
|
|
1337
1263
|
getIntegration(e) {
|
|
@@ -1363,11 +1289,11 @@ Sentry.init({...});
|
|
|
1363
1289
|
}
|
|
1364
1290
|
endSession() {
|
|
1365
1291
|
let n = this.getStackTop().scope, r = n.getSession();
|
|
1366
|
-
r &&
|
|
1292
|
+
r && on(r), this._sendSessionUpdate(), n.setSession();
|
|
1367
1293
|
}
|
|
1368
1294
|
startSession(e) {
|
|
1369
|
-
let { scope: n, client: r } = this.getStackTop(), { release: s, environment: i =
|
|
1370
|
-
return
|
|
1295
|
+
let { scope: n, client: r } = this.getStackTop(), { release: s, environment: i = z } = r && r.getOptions() || {}, { userAgent: o } = m.navigator || {}, a = sn({ release: s, environment: i, user: n.getUser(), ...o && { userAgent: o }, ...e }), c = n.getSession && n.getSession();
|
|
1296
|
+
return c && c.status === "ok" && w(c, { status: "exited" }), this.endSession(), n.setSession(a), a;
|
|
1371
1297
|
}
|
|
1372
1298
|
shouldSendDefaultPii() {
|
|
1373
1299
|
let e = this.getClient(), n = e && e.getOptions();
|
|
@@ -1382,56 +1308,56 @@ Sentry.init({...});
|
|
|
1382
1308
|
r && e(r, n);
|
|
1383
1309
|
}
|
|
1384
1310
|
_callExtensionMethod(e, ...n) {
|
|
1385
|
-
let s =
|
|
1311
|
+
let s = $().__SENTRY__;
|
|
1386
1312
|
if (s && s.extensions && typeof s.extensions[e] == "function") return s.extensions[e].apply(this, n);
|
|
1387
1313
|
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn(`Extension method ${e} couldn't be found, doing nothing.`);
|
|
1388
1314
|
}
|
|
1389
1315
|
};
|
|
1390
|
-
function
|
|
1316
|
+
function $() {
|
|
1391
1317
|
return m.__SENTRY__ = m.__SENTRY__ || { extensions: {}, hub: void 0 }, m;
|
|
1392
1318
|
}
|
|
1393
|
-
function
|
|
1394
|
-
let e =
|
|
1395
|
-
return
|
|
1319
|
+
function mt(t) {
|
|
1320
|
+
let e = $(), n = Ae(e);
|
|
1321
|
+
return _t(e, t), n;
|
|
1396
1322
|
}
|
|
1397
1323
|
function b() {
|
|
1398
|
-
let t =
|
|
1324
|
+
let t = $();
|
|
1399
1325
|
if (t.__SENTRY__ && t.__SENTRY__.acs) {
|
|
1400
1326
|
let e = t.__SENTRY__.acs.getCurrentHub();
|
|
1401
1327
|
if (e) return e;
|
|
1402
1328
|
}
|
|
1403
|
-
return
|
|
1329
|
+
return gr(t);
|
|
1404
1330
|
}
|
|
1405
|
-
function
|
|
1406
|
-
return (!
|
|
1331
|
+
function gr(t = $()) {
|
|
1332
|
+
return (!Er(t) || Ae(t).isOlderThan(cn)) && _t(t, new Y()), Ae(t);
|
|
1407
1333
|
}
|
|
1408
|
-
function
|
|
1334
|
+
function Er(t) {
|
|
1409
1335
|
return !!(t && t.__SENTRY__ && t.__SENTRY__.hub);
|
|
1410
1336
|
}
|
|
1411
|
-
function
|
|
1412
|
-
return
|
|
1337
|
+
function Ae(t) {
|
|
1338
|
+
return Q("hub", () => new Y(), t);
|
|
1413
1339
|
}
|
|
1414
|
-
function
|
|
1340
|
+
function _t(t, e) {
|
|
1415
1341
|
if (!t) return false;
|
|
1416
1342
|
let n = t.__SENTRY__ = t.__SENTRY__ || {};
|
|
1417
1343
|
return n.hub = e, true;
|
|
1418
1344
|
}
|
|
1419
|
-
function
|
|
1345
|
+
function un(t) {
|
|
1420
1346
|
return (t || b()).getScope().getTransaction();
|
|
1421
1347
|
}
|
|
1422
|
-
var
|
|
1423
|
-
function
|
|
1424
|
-
|
|
1348
|
+
var dn = false;
|
|
1349
|
+
function fn() {
|
|
1350
|
+
dn || (dn = true, Ie("error", ht), Ie("unhandledrejection", ht));
|
|
1425
1351
|
}
|
|
1426
|
-
function
|
|
1427
|
-
let t =
|
|
1352
|
+
function ht() {
|
|
1353
|
+
let t = un();
|
|
1428
1354
|
if (t) {
|
|
1429
1355
|
let e = "internal_error";
|
|
1430
1356
|
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(`[Tracing] Transaction: ${e} -> Global error occured`), t.setStatus(e);
|
|
1431
1357
|
}
|
|
1432
1358
|
}
|
|
1433
|
-
|
|
1434
|
-
var
|
|
1359
|
+
ht.tag = "sentry_tracingErrorCallback";
|
|
1360
|
+
var we = class {
|
|
1435
1361
|
constructor(e = 1e3) {
|
|
1436
1362
|
this._maxlen = e, this.spans = [];
|
|
1437
1363
|
}
|
|
@@ -1439,9 +1365,9 @@ var Ce = class {
|
|
|
1439
1365
|
this.spans.length > this._maxlen ? e.spanRecorder = void 0 : this.spans.push(e);
|
|
1440
1366
|
}
|
|
1441
1367
|
};
|
|
1442
|
-
var
|
|
1368
|
+
var V = class {
|
|
1443
1369
|
constructor(e = {}) {
|
|
1444
|
-
this.traceId = e.traceId || h(), this.spanId = e.spanId || h().substring(16), this.startTimestamp = e.startTimestamp ||
|
|
1370
|
+
this.traceId = e.traceId || h(), this.spanId = e.spanId || h().substring(16), this.startTimestamp = e.startTimestamp || L(), this.tags = e.tags || {}, this.data = e.data || {}, this.instrumenter = e.instrumenter || "sentry", this.origin = e.origin || "manual", e.parentSpanId && (this.parentSpanId = e.parentSpanId), "sampled" in e && (this.sampled = e.sampled), e.op && (this.op = e.op), e.description && (this.description = e.description), e.name && (this.description = e.name), e.status && (this.status = e.status), e.endTimestamp && (this.endTimestamp = e.endTimestamp);
|
|
1445
1371
|
}
|
|
1446
1372
|
get name() {
|
|
1447
1373
|
return this.description || "";
|
|
@@ -1450,7 +1376,7 @@ var J = class {
|
|
|
1450
1376
|
this.setName(e);
|
|
1451
1377
|
}
|
|
1452
1378
|
startChild(e) {
|
|
1453
|
-
let n = new
|
|
1379
|
+
let n = new V({ ...e, parentSpanId: this.spanId, sampled: this.sampled, traceId: this.traceId });
|
|
1454
1380
|
if (n.spanRecorder = this.spanRecorder, n.spanRecorder && n.spanRecorder.add(n), n.transaction = this.transaction, (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && n.transaction) {
|
|
1455
1381
|
let r = e && e.op || "< unknown op >", s = n.transaction.name || "< unknown name >", i = n.transaction.spanId, o = `[Tracing] Starting '${r}' span on transaction '${s}' (${i}).`;
|
|
1456
1382
|
n.transaction.metadata.spanMetadata[n.spanId] = { logMessage: o }, p.log(o);
|
|
@@ -1468,7 +1394,7 @@ var J = class {
|
|
|
1468
1394
|
}
|
|
1469
1395
|
setHttpStatus(e) {
|
|
1470
1396
|
this.setTag("http.status_code", String(e)), this.setData("http.response.status_code", e);
|
|
1471
|
-
let n =
|
|
1397
|
+
let n = Sr(e);
|
|
1472
1398
|
return n !== "unknown_error" && this.setStatus(n), this;
|
|
1473
1399
|
}
|
|
1474
1400
|
setName(e) {
|
|
@@ -1482,10 +1408,10 @@ var J = class {
|
|
|
1482
1408
|
let { logMessage: n } = this.transaction.metadata.spanMetadata[this.spanId];
|
|
1483
1409
|
n && p.log(n.replace("Starting", "Finishing"));
|
|
1484
1410
|
}
|
|
1485
|
-
this.endTimestamp = typeof e == "number" ? e :
|
|
1411
|
+
this.endTimestamp = typeof e == "number" ? e : L();
|
|
1486
1412
|
}
|
|
1487
1413
|
toTraceparent() {
|
|
1488
|
-
return
|
|
1414
|
+
return rt(this.traceId, this.spanId, this.sampled);
|
|
1489
1415
|
}
|
|
1490
1416
|
toContext() {
|
|
1491
1417
|
return g({ data: this.data, description: this.description, endTimestamp: this.endTimestamp, op: this.op, parentSpanId: this.parentSpanId, sampled: this.sampled, spanId: this.spanId, startTimestamp: this.startTimestamp, status: this.status, tags: this.tags, traceId: this.traceId });
|
|
@@ -1500,7 +1426,7 @@ var J = class {
|
|
|
1500
1426
|
return g({ data: Object.keys(this.data).length > 0 ? this.data : void 0, description: this.description, op: this.op, parent_span_id: this.parentSpanId, span_id: this.spanId, start_timestamp: this.startTimestamp, status: this.status, tags: Object.keys(this.tags).length > 0 ? this.tags : void 0, timestamp: this.endTimestamp, trace_id: this.traceId, origin: this.origin });
|
|
1501
1427
|
}
|
|
1502
1428
|
};
|
|
1503
|
-
function
|
|
1429
|
+
function Sr(t) {
|
|
1504
1430
|
if (t < 400 && t >= 100) return "ok";
|
|
1505
1431
|
if (t >= 400 && t < 500) switch (t) {
|
|
1506
1432
|
case 401:
|
|
@@ -1530,11 +1456,11 @@ function xr(t) {
|
|
|
1530
1456
|
}
|
|
1531
1457
|
return "unknown_error";
|
|
1532
1458
|
}
|
|
1533
|
-
function
|
|
1534
|
-
let r = e.getOptions(), { publicKey: s } = e.getDsn() || {}, { segment: i } = n && n.getUser() || {}, o = g({ environment: r.environment ||
|
|
1459
|
+
function J(t, e, n) {
|
|
1460
|
+
let r = e.getOptions(), { publicKey: s } = e.getDsn() || {}, { segment: i } = n && n.getUser() || {}, o = g({ environment: r.environment || z, release: r.release, user_segment: i, public_key: s, trace_id: t });
|
|
1535
1461
|
return e.emit && e.emit("createDsc", o), o;
|
|
1536
1462
|
}
|
|
1537
|
-
var
|
|
1463
|
+
var ve = class extends V {
|
|
1538
1464
|
constructor(e, n) {
|
|
1539
1465
|
super(e), delete this.description, this._measurements = {}, this._contexts = {}, this._hub = n || b(), this._name = e.name || "", this.metadata = { source: "custom", ...e.metadata, spanMetadata: {} }, this._trimEnd = e.trimEnd, this.transaction = this;
|
|
1540
1466
|
let r = this.metadata.dynamicSamplingContext;
|
|
@@ -1550,7 +1476,7 @@ var Pe = class extends J {
|
|
|
1550
1476
|
this._name = e, this.metadata.source = n;
|
|
1551
1477
|
}
|
|
1552
1478
|
initSpanRecorder(e = 1e3) {
|
|
1553
|
-
this.spanRecorder || (this.spanRecorder = new
|
|
1479
|
+
this.spanRecorder || (this.spanRecorder = new we(e)), this.spanRecorder.add(this);
|
|
1554
1480
|
}
|
|
1555
1481
|
setContext(e, n) {
|
|
1556
1482
|
n === null ? delete this._contexts[e] : this._contexts[e] = n;
|
|
@@ -1576,7 +1502,7 @@ var Pe = class extends J {
|
|
|
1576
1502
|
if (this._frozenDynamicSamplingContext) return this._frozenDynamicSamplingContext;
|
|
1577
1503
|
let e = this._hub || b(), n = e.getClient();
|
|
1578
1504
|
if (!n) return {};
|
|
1579
|
-
let r = e.getScope(), s =
|
|
1505
|
+
let r = e.getScope(), s = J(this.traceId, n, r), i = this.metadata.sampleRate;
|
|
1580
1506
|
i !== void 0 && (s.sample_rate = `${i}`);
|
|
1581
1507
|
let o = this.metadata.source;
|
|
1582
1508
|
return o && o !== "url" && (s.transaction = this.name), this.sampled !== void 0 && (s.sampled = String(this.sampled)), s;
|
|
@@ -1593,41 +1519,41 @@ var Pe = class extends J {
|
|
|
1593
1519
|
return;
|
|
1594
1520
|
}
|
|
1595
1521
|
let r = this.spanRecorder ? this.spanRecorder.spans.filter((a) => a !== this && a.endTimestamp) : [];
|
|
1596
|
-
this._trimEnd && r.length > 0 && (this.endTimestamp = r.reduce((a,
|
|
1522
|
+
this._trimEnd && r.length > 0 && (this.endTimestamp = r.reduce((a, c) => a.endTimestamp && c.endTimestamp ? a.endTimestamp > c.endTimestamp ? a : c : a).endTimestamp);
|
|
1597
1523
|
let s = this.metadata, i = { contexts: { ...this._contexts, trace: this.getTraceContext() }, spans: r, start_timestamp: this.startTimestamp, tags: this.tags, timestamp: this.endTimestamp, transaction: this.name, type: "transaction", sdkProcessingMetadata: { ...s, dynamicSamplingContext: this.getDynamicSamplingContext() }, ...s.source && { transaction_info: { source: s.source } } };
|
|
1598
1524
|
return Object.keys(this._measurements).length > 0 && ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log("[Measurements] Adding measurements to transaction", JSON.stringify(this._measurements, void 0, 2)), i.measurements = this._measurements), (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`), i;
|
|
1599
1525
|
}
|
|
1600
1526
|
};
|
|
1601
|
-
function
|
|
1527
|
+
function pn(t) {
|
|
1602
1528
|
if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__) return false;
|
|
1603
1529
|
let e = b().getClient(), n = t || e && e.getOptions();
|
|
1604
1530
|
return !!n && (n.enableTracing || "tracesSampleRate" in n || "tracesSampler" in n);
|
|
1605
1531
|
}
|
|
1606
|
-
function
|
|
1607
|
-
if (!
|
|
1532
|
+
function ln(t, e, n) {
|
|
1533
|
+
if (!pn(e)) return t.sampled = false, t;
|
|
1608
1534
|
if (t.sampled !== void 0) return t.setMetadata({ sampleRate: Number(t.sampled) }), t;
|
|
1609
1535
|
let r;
|
|
1610
|
-
return typeof e.tracesSampler == "function" ? (r = e.tracesSampler(n), t.setMetadata({ sampleRate: Number(r) })) : n.parentSampled !== void 0 ? r = n.parentSampled : typeof e.tracesSampleRate < "u" ? (r = e.tracesSampleRate, t.setMetadata({ sampleRate: Number(r) })) : (r = 1, t.setMetadata({ sampleRate: r })),
|
|
1536
|
+
return typeof e.tracesSampler == "function" ? (r = e.tracesSampler(n), t.setMetadata({ sampleRate: Number(r) })) : n.parentSampled !== void 0 ? r = n.parentSampled : typeof e.tracesSampleRate < "u" ? (r = e.tracesSampleRate, t.setMetadata({ sampleRate: Number(r) })) : (r = 1, t.setMetadata({ sampleRate: r })), yr(r) ? r ? (t.sampled = Math.random() < r, t.sampled ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(`[Tracing] starting ${t.op} transaction - ${t.name}`), t) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`), t)) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler == "function" ? "tracesSampler returned 0 or false" : "a negative sampling decision was inherited or tracesSampleRate is set to 0"}`), t.sampled = false, t) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn("[Tracing] Discarding transaction because of invalid sample rate."), t.sampled = false, t);
|
|
1611
1537
|
}
|
|
1612
|
-
function
|
|
1613
|
-
return
|
|
1538
|
+
function yr(t) {
|
|
1539
|
+
return Z(t) || !(typeof t == "number" || typeof t == "boolean") ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t)} of type ${JSON.stringify(typeof t)}.`), false) : t < 0 || t > 1 ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`), false) : true;
|
|
1614
1540
|
}
|
|
1615
|
-
function
|
|
1541
|
+
function Tr() {
|
|
1616
1542
|
let e = this.getScope().getSpan();
|
|
1617
1543
|
return e ? { "sentry-trace": e.toTraceparent() } : {};
|
|
1618
1544
|
}
|
|
1619
|
-
function
|
|
1545
|
+
function br(t, e) {
|
|
1620
1546
|
let n = this.getClient(), r = n && n.getOptions() || {}, s = r.instrumenter || "sentry", i = t.instrumenter || "sentry";
|
|
1621
1547
|
s !== i && ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${s}\` instrumenter.
|
|
1622
1548
|
The transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`), t.sampled = false);
|
|
1623
|
-
let o = new
|
|
1624
|
-
return o =
|
|
1549
|
+
let o = new ve(t, this);
|
|
1550
|
+
return o = ln(o, r, { parentSampled: t.parentSampled, transactionContext: t, ...e }), o.sampled && o.initSpanRecorder(r._experiments && r._experiments.maxSpans), n && n.emit && n.emit("startTransaction", o), o;
|
|
1625
1551
|
}
|
|
1626
|
-
function
|
|
1627
|
-
let t =
|
|
1628
|
-
t.__SENTRY__ && (t.__SENTRY__.extensions = t.__SENTRY__.extensions || {}, t.__SENTRY__.extensions.startTransaction || (t.__SENTRY__.extensions.startTransaction =
|
|
1552
|
+
function mn() {
|
|
1553
|
+
let t = $();
|
|
1554
|
+
t.__SENTRY__ && (t.__SENTRY__.extensions = t.__SENTRY__.extensions || {}, t.__SENTRY__.extensions.startTransaction || (t.__SENTRY__.extensions.startTransaction = br), t.__SENTRY__.extensions.traceHeaders || (t.__SENTRY__.extensions.traceHeaders = Tr), fn());
|
|
1629
1555
|
}
|
|
1630
|
-
var
|
|
1556
|
+
var Ce = class {
|
|
1631
1557
|
constructor(e, n) {
|
|
1632
1558
|
this._client = e, this.flushTimeout = 60, this._pendingAggregates = {}, this._isEnabled = true, this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1e3), this._sessionAttrs = n;
|
|
1633
1559
|
}
|
|
@@ -1661,64 +1587,64 @@ var Me = class {
|
|
|
1661
1587
|
}
|
|
1662
1588
|
}
|
|
1663
1589
|
};
|
|
1664
|
-
var
|
|
1665
|
-
function
|
|
1590
|
+
var Rr = "7";
|
|
1591
|
+
function Ir(t) {
|
|
1666
1592
|
let e = t.protocol ? `${t.protocol}:` : "", n = t.port ? `:${t.port}` : "";
|
|
1667
1593
|
return `${e}//${t.host}${n}${t.path ? `/${t.path}` : ""}/api/`;
|
|
1668
1594
|
}
|
|
1669
|
-
function
|
|
1670
|
-
return `${
|
|
1595
|
+
function xr(t) {
|
|
1596
|
+
return `${Ir(t)}${t.projectId}/envelope/`;
|
|
1671
1597
|
}
|
|
1672
|
-
function
|
|
1673
|
-
return
|
|
1598
|
+
function Nr(t, e) {
|
|
1599
|
+
return ze({ sentry_key: t.publicKey, sentry_version: Rr, ...e && { sentry_client: `${e.name}/${e.version}` } });
|
|
1674
1600
|
}
|
|
1675
|
-
function
|
|
1601
|
+
function _n(t, e = {}) {
|
|
1676
1602
|
let n = typeof e == "string" ? e : e.tunnel, r = typeof e == "string" || !e._metadata ? void 0 : e._metadata.sdk;
|
|
1677
|
-
return n || `${
|
|
1603
|
+
return n || `${xr(t)}?${Nr(t, r)}`;
|
|
1678
1604
|
}
|
|
1679
|
-
function
|
|
1605
|
+
function Dr(t, e) {
|
|
1680
1606
|
return e && (t.sdk = t.sdk || {}, t.sdk.name = t.sdk.name || e.name, t.sdk.version = t.sdk.version || e.version, t.sdk.integrations = [...t.sdk.integrations || [], ...e.integrations || []], t.sdk.packages = [...t.sdk.packages || [], ...e.packages || []]), t;
|
|
1681
1607
|
}
|
|
1682
|
-
function
|
|
1683
|
-
let s =
|
|
1684
|
-
return
|
|
1608
|
+
function hn(t, e, n, r) {
|
|
1609
|
+
let s = Oe(n), i = { sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...s && { sdk: s }, ...!!r && e && { dsn: C(e) } }, o = "aggregates" in t ? [{ type: "sessions" }, t] : [{ type: "session" }, t.toJSON()];
|
|
1610
|
+
return P(i, [o]);
|
|
1685
1611
|
}
|
|
1686
|
-
function
|
|
1687
|
-
let s =
|
|
1688
|
-
|
|
1689
|
-
let o =
|
|
1690
|
-
return delete t.sdkProcessingMetadata,
|
|
1612
|
+
function gn(t, e, n, r) {
|
|
1613
|
+
let s = Oe(n), i = t.type && t.type !== "replay_event" ? t.type : "event";
|
|
1614
|
+
Dr(t, n && n.sdk);
|
|
1615
|
+
let o = ct(t, s, r, e);
|
|
1616
|
+
return delete t.sdkProcessingMetadata, P(o, [[{ type: i }, t]]);
|
|
1691
1617
|
}
|
|
1692
|
-
var
|
|
1693
|
-
function
|
|
1618
|
+
var En = [];
|
|
1619
|
+
function kr(t) {
|
|
1694
1620
|
let e = {};
|
|
1695
1621
|
return t.forEach((n) => {
|
|
1696
1622
|
let { name: r } = n, s = e[r];
|
|
1697
1623
|
s && !s.isDefaultInstance && n.isDefaultInstance || (e[r] = n);
|
|
1698
1624
|
}), Object.keys(e).map((n) => e[n]);
|
|
1699
1625
|
}
|
|
1700
|
-
function
|
|
1626
|
+
function gt(t) {
|
|
1701
1627
|
let e = t.defaultIntegrations || [], n = t.integrations;
|
|
1702
1628
|
e.forEach((o) => {
|
|
1703
1629
|
o.isDefaultInstance = true;
|
|
1704
1630
|
});
|
|
1705
1631
|
let r;
|
|
1706
|
-
Array.isArray(n) ? r = [...e, ...n] : typeof n == "function" ? r =
|
|
1707
|
-
let s =
|
|
1632
|
+
Array.isArray(n) ? r = [...e, ...n] : typeof n == "function" ? r = ae(n(e)) : r = e;
|
|
1633
|
+
let s = kr(r), i = Or(s, (o) => o.name === "Debug");
|
|
1708
1634
|
if (i !== -1) {
|
|
1709
1635
|
let [o] = s.splice(i, 1);
|
|
1710
1636
|
s.push(o);
|
|
1711
1637
|
}
|
|
1712
1638
|
return s;
|
|
1713
1639
|
}
|
|
1714
|
-
function
|
|
1640
|
+
function Sn(t, e) {
|
|
1715
1641
|
let n = {};
|
|
1716
1642
|
return e.forEach((r) => {
|
|
1717
|
-
r &&
|
|
1643
|
+
r && Et(t, r, n);
|
|
1718
1644
|
}), n;
|
|
1719
1645
|
}
|
|
1720
|
-
function
|
|
1721
|
-
if (n[e.name] = e,
|
|
1646
|
+
function Et(t, e, n) {
|
|
1647
|
+
if (n[e.name] = e, En.indexOf(e.name) === -1 && (e.setupOnce(rn, b), En.push(e.name)), t.on && typeof e.preprocessEvent == "function") {
|
|
1722
1648
|
let r = e.preprocessEvent.bind(e);
|
|
1723
1649
|
t.on("preprocessEvent", (s, i) => r(s, i, t));
|
|
1724
1650
|
}
|
|
@@ -1728,44 +1654,44 @@ function Tt(t, e, n) {
|
|
|
1728
1654
|
}
|
|
1729
1655
|
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(`Integration installed: ${e.name}`);
|
|
1730
1656
|
}
|
|
1731
|
-
function
|
|
1657
|
+
function Or(t, e) {
|
|
1732
1658
|
for (let n = 0; n < t.length; n++) if (e(t[n]) === true) return n;
|
|
1733
1659
|
return -1;
|
|
1734
1660
|
}
|
|
1735
|
-
function
|
|
1736
|
-
let { normalizeDepth: i = 3, normalizeMaxBreadth: o = 1e3 } = t, a = { ...e, event_id: e.event_id || n.event_id || h(), timestamp: e.timestamp ||
|
|
1737
|
-
|
|
1738
|
-
let
|
|
1739
|
-
n.captureContext && (
|
|
1661
|
+
function Tn(t, e, n, r, s) {
|
|
1662
|
+
let { normalizeDepth: i = 3, normalizeMaxBreadth: o = 1e3 } = t, a = { ...e, event_id: e.event_id || n.event_id || h(), timestamp: e.timestamp || B() }, c = n.integrations || t.integrations.map((l) => l.name);
|
|
1663
|
+
Ar(a, t), Cr(a, c), e.type === void 0 && wr(a, t.stackParser);
|
|
1664
|
+
let u = r;
|
|
1665
|
+
n.captureContext && (u = k.clone(u).update(n.captureContext));
|
|
1740
1666
|
let f = T(a), d = s && s.getEventProcessors ? s.getEventProcessors() : [];
|
|
1741
|
-
if (
|
|
1742
|
-
if (
|
|
1743
|
-
let l = [...n.attachments || [], ...
|
|
1667
|
+
if (u) {
|
|
1668
|
+
if (u.getAttachments) {
|
|
1669
|
+
let l = [...n.attachments || [], ...u.getAttachments()];
|
|
1744
1670
|
l.length && (n.attachments = l);
|
|
1745
1671
|
}
|
|
1746
|
-
f =
|
|
1747
|
-
} else f = K([...d, ...
|
|
1748
|
-
return f.then((l) => (l &&
|
|
1672
|
+
f = u.applyToEvent(a, n, d);
|
|
1673
|
+
} else f = K([...d, ...ue()], a, n);
|
|
1674
|
+
return f.then((l) => (l && vr(l), typeof i == "number" && i > 0 ? Pr(l, i, o) : l));
|
|
1749
1675
|
}
|
|
1750
|
-
function
|
|
1676
|
+
function Ar(t, e) {
|
|
1751
1677
|
let { environment: n, release: r, dist: s, maxValueLength: i = 250 } = e;
|
|
1752
|
-
"environment" in t || (t.environment = "environment" in e ? n :
|
|
1678
|
+
"environment" in t || (t.environment = "environment" in e ? n : z), t.release === void 0 && r !== void 0 && (t.release = r), t.dist === void 0 && s !== void 0 && (t.dist = s), t.message && (t.message = v(t.message, i));
|
|
1753
1679
|
let o = t.exception && t.exception.values && t.exception.values[0];
|
|
1754
|
-
o && o.value && (o.value =
|
|
1680
|
+
o && o.value && (o.value = v(o.value, i));
|
|
1755
1681
|
let a = t.request;
|
|
1756
|
-
a && a.url && (a.url =
|
|
1682
|
+
a && a.url && (a.url = v(a.url, i));
|
|
1757
1683
|
}
|
|
1758
|
-
var
|
|
1759
|
-
function
|
|
1684
|
+
var yn = /* @__PURE__ */ new WeakMap();
|
|
1685
|
+
function wr(t, e) {
|
|
1760
1686
|
let n = m._sentryDebugIds;
|
|
1761
1687
|
if (!n) return;
|
|
1762
|
-
let r, s =
|
|
1763
|
-
s ? r = s : (r = /* @__PURE__ */ new Map(),
|
|
1688
|
+
let r, s = yn.get(e);
|
|
1689
|
+
s ? r = s : (r = /* @__PURE__ */ new Map(), yn.set(e, r));
|
|
1764
1690
|
let i = Object.keys(n).reduce((o, a) => {
|
|
1765
|
-
let
|
|
1766
|
-
|
|
1767
|
-
for (let f =
|
|
1768
|
-
let d =
|
|
1691
|
+
let c, u = r.get(a);
|
|
1692
|
+
u ? c = u : (c = e(a), r.set(a, c));
|
|
1693
|
+
for (let f = c.length - 1; f >= 0; f--) {
|
|
1694
|
+
let d = c[f];
|
|
1769
1695
|
if (d.filename) {
|
|
1770
1696
|
o[d.filename] = n[a];
|
|
1771
1697
|
break;
|
|
@@ -1782,7 +1708,7 @@ function Ur(t, e) {
|
|
|
1782
1708
|
} catch {
|
|
1783
1709
|
}
|
|
1784
1710
|
}
|
|
1785
|
-
function
|
|
1711
|
+
function vr(t) {
|
|
1786
1712
|
let e = {};
|
|
1787
1713
|
try {
|
|
1788
1714
|
t.exception.values.forEach((r) => {
|
|
@@ -1799,25 +1725,25 @@ function Gr(t) {
|
|
|
1799
1725
|
n.push({ type: "sourcemap", code_file: r, debug_id: e[r] });
|
|
1800
1726
|
});
|
|
1801
1727
|
}
|
|
1802
|
-
function
|
|
1728
|
+
function Cr(t, e) {
|
|
1803
1729
|
e.length > 0 && (t.sdk = t.sdk || {}, t.sdk.integrations = [...t.sdk.integrations || [], ...e]);
|
|
1804
1730
|
}
|
|
1805
|
-
function
|
|
1731
|
+
function Pr(t, e, n) {
|
|
1806
1732
|
if (!t) return null;
|
|
1807
|
-
let r = { ...t, ...t.breadcrumbs && { breadcrumbs: t.breadcrumbs.map((s) => ({ ...s, ...s.data && { data:
|
|
1808
|
-
return t.contexts && t.contexts.trace && r.contexts && (r.contexts.trace = t.contexts.trace, t.contexts.trace.data && (r.contexts.trace.data =
|
|
1733
|
+
let r = { ...t, ...t.breadcrumbs && { breadcrumbs: t.breadcrumbs.map((s) => ({ ...s, ...s.data && { data: D(s.data, e, n) } })) }, ...t.user && { user: D(t.user, e, n) }, ...t.contexts && { contexts: D(t.contexts, e, n) }, ...t.extra && { extra: D(t.extra, e, n) } };
|
|
1734
|
+
return t.contexts && t.contexts.trace && r.contexts && (r.contexts.trace = t.contexts.trace, t.contexts.trace.data && (r.contexts.trace.data = D(t.contexts.trace.data, e, n))), t.spans && (r.spans = t.spans.map((s) => (s.data && (s.data = D(s.data, e, n)), s))), r;
|
|
1809
1735
|
}
|
|
1810
|
-
var
|
|
1811
|
-
var
|
|
1736
|
+
var bn = "Not capturing exception because it's already been captured.";
|
|
1737
|
+
var Pe = class {
|
|
1812
1738
|
constructor(e) {
|
|
1813
|
-
if (this._options = e, this._integrations = {}, this._integrationsInitialized = false, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn =
|
|
1814
|
-
let n =
|
|
1739
|
+
if (this._options = e, this._integrations = {}, this._integrationsInitialized = false, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = he(e.dsn) : (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn("No DSN provided, client will not send events."), this._dsn) {
|
|
1740
|
+
let n = _n(this._dsn, e);
|
|
1815
1741
|
this._transport = e.transport({ recordDroppedEvent: this.recordDroppedEvent.bind(this), ...e.transportOptions, url: n });
|
|
1816
1742
|
}
|
|
1817
1743
|
}
|
|
1818
1744
|
captureException(e, n, r) {
|
|
1819
|
-
if (
|
|
1820
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(
|
|
1745
|
+
if (xe(e)) {
|
|
1746
|
+
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(bn);
|
|
1821
1747
|
return;
|
|
1822
1748
|
}
|
|
1823
1749
|
let s = n && n.event_id;
|
|
@@ -1826,14 +1752,14 @@ var Ue = class {
|
|
|
1826
1752
|
})), s;
|
|
1827
1753
|
}
|
|
1828
1754
|
captureMessage(e, n, r, s) {
|
|
1829
|
-
let i = r && r.event_id, o =
|
|
1755
|
+
let i = r && r.event_id, o = le(e) ? this.eventFromMessage(String(e), n, r) : this.eventFromException(e, r);
|
|
1830
1756
|
return this._process(o.then((a) => this._captureEvent(a, r, s)).then((a) => {
|
|
1831
1757
|
i = a;
|
|
1832
1758
|
})), i;
|
|
1833
1759
|
}
|
|
1834
1760
|
captureEvent(e, n, r) {
|
|
1835
|
-
if (n && n.originalException &&
|
|
1836
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(
|
|
1761
|
+
if (n && n.originalException && xe(n.originalException)) {
|
|
1762
|
+
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(bn);
|
|
1837
1763
|
return;
|
|
1838
1764
|
}
|
|
1839
1765
|
let s = n && n.event_id;
|
|
@@ -1842,7 +1768,7 @@ var Ue = class {
|
|
|
1842
1768
|
})), s;
|
|
1843
1769
|
}
|
|
1844
1770
|
captureSession(e) {
|
|
1845
|
-
typeof e.release != "string" ? (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn("Discarded session because of missing or non-string release") : (this.sendSession(e),
|
|
1771
|
+
typeof e.release != "string" ? (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn("Discarded session because of missing or non-string release") : (this.sendSession(e), w(e, { init: false }));
|
|
1846
1772
|
}
|
|
1847
1773
|
getDsn() {
|
|
1848
1774
|
return this._dsn;
|
|
@@ -1870,7 +1796,7 @@ var Ue = class {
|
|
|
1870
1796
|
this._eventProcessors.push(e);
|
|
1871
1797
|
}
|
|
1872
1798
|
setupIntegrations(e) {
|
|
1873
|
-
(e && !this._integrationsInitialized || this._isEnabled() && !this._integrationsInitialized) && (this._integrations =
|
|
1799
|
+
(e && !this._integrationsInitialized || this._isEnabled() && !this._integrationsInitialized) && (this._integrations = Sn(this, this._options.integrations), this._integrationsInitialized = true);
|
|
1874
1800
|
}
|
|
1875
1801
|
getIntegrationById(e) {
|
|
1876
1802
|
return this._integrations[e];
|
|
@@ -1883,17 +1809,17 @@ var Ue = class {
|
|
|
1883
1809
|
}
|
|
1884
1810
|
}
|
|
1885
1811
|
addIntegration(e) {
|
|
1886
|
-
|
|
1812
|
+
Et(this, e, this._integrations);
|
|
1887
1813
|
}
|
|
1888
1814
|
sendEvent(e, n = {}) {
|
|
1889
1815
|
this.emit("beforeSendEvent", e, n);
|
|
1890
|
-
let r =
|
|
1891
|
-
for (let i of n.attachments || []) r =
|
|
1816
|
+
let r = gn(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
1817
|
+
for (let i of n.attachments || []) r = it(r, at(i, this._options.transportOptions && this._options.transportOptions.textEncoder));
|
|
1892
1818
|
let s = this._sendEnvelope(r);
|
|
1893
1819
|
s && s.then((i) => this.emit("afterSendEvent", e, i), null);
|
|
1894
1820
|
}
|
|
1895
1821
|
sendSession(e) {
|
|
1896
|
-
let n =
|
|
1822
|
+
let n = hn(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
1897
1823
|
this._sendEnvelope(n);
|
|
1898
1824
|
}
|
|
1899
1825
|
recordDroppedEvent(e, n, r) {
|
|
@@ -1912,16 +1838,16 @@ var Ue = class {
|
|
|
1912
1838
|
let r = false, s = false, i = n.exception && n.exception.values;
|
|
1913
1839
|
if (i) {
|
|
1914
1840
|
s = true;
|
|
1915
|
-
for (let
|
|
1916
|
-
let
|
|
1917
|
-
if (
|
|
1841
|
+
for (let c of i) {
|
|
1842
|
+
let u = c.mechanism;
|
|
1843
|
+
if (u && u.handled === false) {
|
|
1918
1844
|
r = true;
|
|
1919
1845
|
break;
|
|
1920
1846
|
}
|
|
1921
1847
|
}
|
|
1922
1848
|
}
|
|
1923
1849
|
let o = e.status === "ok";
|
|
1924
|
-
(o && e.errors === 0 || o && r) && (
|
|
1850
|
+
(o && e.errors === 0 || o && r) && (w(e, { ...r && { status: "crashed" }, errors: e.errors || Number(s || r) }), this.captureSession(e));
|
|
1925
1851
|
}
|
|
1926
1852
|
_isClientDoneProcessing(e) {
|
|
1927
1853
|
return new S((n) => {
|
|
@@ -1935,13 +1861,13 @@ var Ue = class {
|
|
|
1935
1861
|
}
|
|
1936
1862
|
_prepareEvent(e, n, r) {
|
|
1937
1863
|
let s = this.getOptions(), i = Object.keys(this._integrations);
|
|
1938
|
-
return !n.integrations && i.length > 0 && (n.integrations = i), this.emit("preprocessEvent", e, n),
|
|
1864
|
+
return !n.integrations && i.length > 0 && (n.integrations = i), this.emit("preprocessEvent", e, n), Tn(s, e, n, r, this).then((o) => {
|
|
1939
1865
|
if (o === null) return o;
|
|
1940
1866
|
let { propagationContext: a } = o.sdkProcessingMetadata || {};
|
|
1941
1867
|
if (!(o.contexts && o.contexts.trace) && a) {
|
|
1942
|
-
let { traceId:
|
|
1943
|
-
o.contexts = { trace: { trace_id:
|
|
1944
|
-
let _ = l ||
|
|
1868
|
+
let { traceId: u, spanId: f, parentSpanId: d, dsc: l } = a;
|
|
1869
|
+
o.contexts = { trace: { trace_id: u, span_id: f, parent_span_id: d }, ...o.contexts };
|
|
1870
|
+
let _ = l || J(u, this, r);
|
|
1945
1871
|
o.sdkProcessingMetadata = { dynamicSamplingContext: _, ...o.sdkProcessingMetadata };
|
|
1946
1872
|
}
|
|
1947
1873
|
return o;
|
|
@@ -1956,22 +1882,22 @@ var Ue = class {
|
|
|
1956
1882
|
});
|
|
1957
1883
|
}
|
|
1958
1884
|
_processEvent(e, n, r) {
|
|
1959
|
-
let s = this.getOptions(), { sampleRate: i } = s, o =
|
|
1960
|
-
if (a && typeof i == "number" && Math.random() > i) return this.recordDroppedEvent("sample_rate", "error", e),
|
|
1961
|
-
let f =
|
|
1885
|
+
let s = this.getOptions(), { sampleRate: i } = s, o = In(e), a = Rn(e), c = e.type || "error", u = `before send for type \`${c}\``;
|
|
1886
|
+
if (a && typeof i == "number" && Math.random() > i) return this.recordDroppedEvent("sample_rate", "error", e), F(new y(`Discarding event because it's not included in the random sample (sampling rate = ${i})`, "log"));
|
|
1887
|
+
let f = c === "replay_event" ? "replay" : c;
|
|
1962
1888
|
return this._prepareEvent(e, n, r).then((d) => {
|
|
1963
1889
|
if (d === null) throw this.recordDroppedEvent("event_processor", f, e), new y("An event processor returned `null`, will not send event.", "log");
|
|
1964
1890
|
if (n.data && n.data.__sentry__ === true) return d;
|
|
1965
|
-
let _ =
|
|
1966
|
-
return
|
|
1891
|
+
let _ = Ur(s, d, n);
|
|
1892
|
+
return Mr(_, u);
|
|
1967
1893
|
}).then((d) => {
|
|
1968
|
-
if (d === null) throw this.recordDroppedEvent("before_send", f, e), new y(`${
|
|
1894
|
+
if (d === null) throw this.recordDroppedEvent("before_send", f, e), new y(`${u} returned \`null\`, will not send event.`, "log");
|
|
1969
1895
|
let l = r && r.getSession();
|
|
1970
1896
|
!o && l && this._updateSessionFromEvent(l, d);
|
|
1971
1897
|
let _ = d.transaction_info;
|
|
1972
1898
|
if (o && _ && d.transaction !== e.transaction) {
|
|
1973
|
-
let
|
|
1974
|
-
d.transaction_info = { ..._, source:
|
|
1899
|
+
let M = "custom";
|
|
1900
|
+
d.transaction_info = { ..._, source: M };
|
|
1975
1901
|
}
|
|
1976
1902
|
return this.sendEvent(d, n), d;
|
|
1977
1903
|
}).then(null, (d) => {
|
|
@@ -1996,9 +1922,9 @@ Reason: ${d}`));
|
|
|
1996
1922
|
});
|
|
1997
1923
|
}
|
|
1998
1924
|
};
|
|
1999
|
-
function
|
|
1925
|
+
function Mr(t, e) {
|
|
2000
1926
|
let n = `${e} must return \`null\` or a valid event.`;
|
|
2001
|
-
if (
|
|
1927
|
+
if (G(t)) return t.then((r) => {
|
|
2002
1928
|
if (!R(r) && r !== null) throw new y(n);
|
|
2003
1929
|
return r;
|
|
2004
1930
|
}, (r) => {
|
|
@@ -2007,34 +1933,34 @@ function Lr(t, e) {
|
|
|
2007
1933
|
if (!R(t) && t !== null) throw new y(n);
|
|
2008
1934
|
return t;
|
|
2009
1935
|
}
|
|
2010
|
-
function
|
|
1936
|
+
function Ur(t, e, n) {
|
|
2011
1937
|
let { beforeSend: r, beforeSendTransaction: s } = t;
|
|
2012
|
-
return
|
|
1938
|
+
return Rn(e) && r ? r(e, n) : In(e) && s ? s(e, n) : e;
|
|
2013
1939
|
}
|
|
2014
|
-
function
|
|
1940
|
+
function Rn(t) {
|
|
2015
1941
|
return t.type === void 0;
|
|
2016
1942
|
}
|
|
2017
|
-
function
|
|
1943
|
+
function In(t) {
|
|
2018
1944
|
return t.type === "transaction";
|
|
2019
1945
|
}
|
|
2020
|
-
function
|
|
1946
|
+
function xn(t, e, n, r, s) {
|
|
2021
1947
|
let i = { sent_at: (/* @__PURE__ */ new Date()).toISOString() };
|
|
2022
|
-
n && n.sdk && (i.sdk = { name: n.sdk.name, version: n.sdk.version }), r && s && (i.dsn =
|
|
2023
|
-
let o =
|
|
2024
|
-
return
|
|
1948
|
+
n && n.sdk && (i.sdk = { name: n.sdk.name, version: n.sdk.version }), r && s && (i.dsn = C(s)), e && (i.trace = g(e));
|
|
1949
|
+
let o = Gr(t);
|
|
1950
|
+
return P(i, [o]);
|
|
2025
1951
|
}
|
|
2026
|
-
function
|
|
1952
|
+
function Gr(t) {
|
|
2027
1953
|
return [{ type: "check_in" }, t];
|
|
2028
1954
|
}
|
|
2029
|
-
var
|
|
1955
|
+
var de = class extends Pe {
|
|
2030
1956
|
constructor(e) {
|
|
2031
|
-
|
|
1957
|
+
mn(), super(e);
|
|
2032
1958
|
}
|
|
2033
1959
|
eventFromException(e, n) {
|
|
2034
|
-
return T(
|
|
1960
|
+
return T(pt(b, this._options.stackParser, e, n));
|
|
2035
1961
|
}
|
|
2036
1962
|
eventFromMessage(e, n = "info", r) {
|
|
2037
|
-
return T(
|
|
1963
|
+
return T(lt(this._options.stackParser, e, n, r, this._options.attachStacktrace));
|
|
2038
1964
|
}
|
|
2039
1965
|
captureException(e, n, r) {
|
|
2040
1966
|
if (this._options.autoSessionTracking && this._sessionFlusher && r) {
|
|
@@ -2055,16 +1981,16 @@ var pe = class extends Ue {
|
|
|
2055
1981
|
}
|
|
2056
1982
|
initSessionFlusher() {
|
|
2057
1983
|
let { release: e, environment: n } = this._options;
|
|
2058
|
-
e ? this._sessionFlusher = new
|
|
1984
|
+
e ? this._sessionFlusher = new Ce(this, { release: e, environment: n }) : (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn("Cannot initialise an instance of SessionFlusher if no release is provided!");
|
|
2059
1985
|
}
|
|
2060
1986
|
captureCheckIn(e, n, r) {
|
|
2061
1987
|
let s = e.status !== "in_progress" && e.checkInId ? e.checkInId : h();
|
|
2062
1988
|
if (!this._isEnabled()) return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn("SDK not enabled, will not capture checkin."), s;
|
|
2063
|
-
let i = this.getOptions(), { release: o, environment: a, tunnel:
|
|
2064
|
-
e.status !== "in_progress" && (
|
|
1989
|
+
let i = this.getOptions(), { release: o, environment: a, tunnel: c } = i, u = { check_in_id: s, monitor_slug: e.monitorSlug, status: e.status, release: o, environment: a };
|
|
1990
|
+
e.status !== "in_progress" && (u.duration = e.duration), n && (u.monitor_config = { schedule: n.schedule, checkin_margin: n.checkinMargin, max_runtime: n.maxRuntime, timezone: n.timezone });
|
|
2065
1991
|
let [f, d] = this._getTraceInfoFromScope(r);
|
|
2066
|
-
d && (
|
|
2067
|
-
let l =
|
|
1992
|
+
d && (u.contexts = { trace: d });
|
|
1993
|
+
let l = xn(u, f, this.getSdkMetadata(), c, this.getDsn());
|
|
2068
1994
|
return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.info("Sending checkin:", e.monitorSlug, e.status), this._sendEnvelope(l), s;
|
|
2069
1995
|
}
|
|
2070
1996
|
_captureRequestSession() {
|
|
@@ -2078,165 +2004,165 @@ var pe = class extends Ue {
|
|
|
2078
2004
|
let n = e.getSpan();
|
|
2079
2005
|
if (n) return [n.transaction ? n.transaction.getDynamicSamplingContext() : void 0, n.getTraceContext()];
|
|
2080
2006
|
let { traceId: r, spanId: s, parentSpanId: i, dsc: o } = e.getPropagationContext(), a = { trace_id: r, span_id: s, parent_span_id: i };
|
|
2081
|
-
return o ? [o, a] : [
|
|
2007
|
+
return o ? [o, a] : [J(r, this, e), a];
|
|
2082
2008
|
}
|
|
2083
2009
|
};
|
|
2084
|
-
var
|
|
2085
|
-
function
|
|
2010
|
+
var Fr = 30;
|
|
2011
|
+
function St(t, e, n = et(t.bufferSize || Fr)) {
|
|
2086
2012
|
let r = {}, s = (o) => n.drain(o);
|
|
2087
2013
|
function i(o) {
|
|
2088
2014
|
let a = [];
|
|
2089
|
-
if (
|
|
2090
|
-
let _ =
|
|
2091
|
-
if (
|
|
2092
|
-
let
|
|
2093
|
-
t.recordDroppedEvent("ratelimit_backoff", _,
|
|
2015
|
+
if (De(o, (d, l) => {
|
|
2016
|
+
let _ = ke(l);
|
|
2017
|
+
if (ut(r, _)) {
|
|
2018
|
+
let M = Nn(d, l);
|
|
2019
|
+
t.recordDroppedEvent("ratelimit_backoff", _, M);
|
|
2094
2020
|
} else a.push(d);
|
|
2095
2021
|
}), a.length === 0) return T();
|
|
2096
|
-
let
|
|
2097
|
-
|
|
2098
|
-
let
|
|
2099
|
-
t.recordDroppedEvent(d,
|
|
2022
|
+
let c = P(o[0], a), u = (d) => {
|
|
2023
|
+
De(c, (l, _) => {
|
|
2024
|
+
let M = Nn(l, _);
|
|
2025
|
+
t.recordDroppedEvent(d, ke(_), M);
|
|
2100
2026
|
});
|
|
2101
|
-
}, f = () => e({ body:
|
|
2102
|
-
throw
|
|
2027
|
+
}, f = () => e({ body: ot(c, t.textEncoder) }).then((d) => (d.statusCode !== void 0 && (d.statusCode < 200 || d.statusCode >= 300) && (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn(`Sentry responded with status code ${d.statusCode} to sent event.`), r = dt(r, d), d), (d) => {
|
|
2028
|
+
throw u("network_error"), d;
|
|
2103
2029
|
});
|
|
2104
2030
|
return n.add(f).then((d) => d, (d) => {
|
|
2105
|
-
if (d instanceof y) return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.error("Skipped sending event because buffer is full."),
|
|
2031
|
+
if (d instanceof y) return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.error("Skipped sending event because buffer is full."), u("queue_overflow"), T();
|
|
2106
2032
|
throw d;
|
|
2107
2033
|
});
|
|
2108
2034
|
}
|
|
2109
2035
|
return i.__sentry__baseTransport__ = true, { send: i, flush: s };
|
|
2110
2036
|
}
|
|
2111
|
-
function
|
|
2037
|
+
function Nn(t, e) {
|
|
2112
2038
|
if (!(e !== "event" && e !== "transaction")) return Array.isArray(t) ? t[1] : void 0;
|
|
2113
2039
|
}
|
|
2114
|
-
function
|
|
2040
|
+
function kn(t) {
|
|
2115
2041
|
return typeof t == "object" && t !== null;
|
|
2116
2042
|
}
|
|
2117
|
-
function
|
|
2118
|
-
return
|
|
2043
|
+
function Br(t) {
|
|
2044
|
+
return kn(t) && "handled" in t && typeof t.handled == "boolean" && "type" in t && typeof t.type == "string";
|
|
2119
2045
|
}
|
|
2120
|
-
function
|
|
2121
|
-
return
|
|
2046
|
+
function Lr(t) {
|
|
2047
|
+
return kn(t) && "mechanism" in t && Br(t.mechanism);
|
|
2122
2048
|
}
|
|
2123
|
-
function
|
|
2049
|
+
function Yr() {
|
|
2124
2050
|
if (m.SENTRY_RELEASE && m.SENTRY_RELEASE.id) return m.SENTRY_RELEASE.id;
|
|
2125
2051
|
}
|
|
2126
|
-
function
|
|
2052
|
+
function Dn(t, e) {
|
|
2127
2053
|
return t !== void 0 ? (t[e[0]] = e[1], t) : { [e[0]]: e[1] };
|
|
2128
2054
|
}
|
|
2129
|
-
function
|
|
2055
|
+
function On(t, e) {
|
|
2130
2056
|
return t(e.stack || "", 1);
|
|
2131
2057
|
}
|
|
2132
|
-
function
|
|
2058
|
+
function $r(t) {
|
|
2133
2059
|
let e = t && t.message;
|
|
2134
2060
|
return e ? e.error && typeof e.error.message == "string" ? e.error.message : e : "No error message";
|
|
2135
2061
|
}
|
|
2136
|
-
function
|
|
2137
|
-
let n = { type: e.name || e.constructor.name, value:
|
|
2062
|
+
function An(t, e) {
|
|
2063
|
+
let n = { type: e.name || e.constructor.name, value: $r(e) }, r = On(t, e);
|
|
2138
2064
|
return r.length && (n.stacktrace = { frames: r }), n.type === void 0 && n.value === "" && (n.value = "Unrecoverable error caught"), n;
|
|
2139
2065
|
}
|
|
2140
|
-
function
|
|
2141
|
-
let s, o = (r && r.data &&
|
|
2142
|
-
if (
|
|
2066
|
+
function jr(t, e, n, r) {
|
|
2067
|
+
let s, o = (r && r.data && Lr(r.data) ? r.data.mechanism : void 0) ?? { handled: true, type: "generic" };
|
|
2068
|
+
if (U(n)) s = n;
|
|
2143
2069
|
else {
|
|
2144
2070
|
if (R(n)) {
|
|
2145
|
-
let
|
|
2071
|
+
let c = `Non-Error exception captured with keys: ${te(n)}`, u = t?.getClient(), f = u && u.getOptions().normalizeDepth;
|
|
2146
2072
|
t?.configureScope((d) => {
|
|
2147
|
-
d.setExtra("__serialized__",
|
|
2148
|
-
}), s = r && r.syntheticException || new Error(
|
|
2073
|
+
d.setExtra("__serialized__", W(n, f));
|
|
2074
|
+
}), s = r && r.syntheticException || new Error(c), s.message = c;
|
|
2149
2075
|
} else s = r && r.syntheticException || new Error(n), s.message = n;
|
|
2150
2076
|
o.synthetic = true;
|
|
2151
2077
|
}
|
|
2152
|
-
let a = { exception: { values: [
|
|
2153
|
-
return
|
|
2078
|
+
let a = { exception: { values: [An(e, s)] } };
|
|
2079
|
+
return ie(a, void 0, void 0), oe(a, o), { ...a, event_id: r && r.event_id };
|
|
2154
2080
|
}
|
|
2155
|
-
function
|
|
2081
|
+
function Hr(t, e, n = "info", r, s) {
|
|
2156
2082
|
let i = { event_id: r && r.event_id, level: n, message: e };
|
|
2157
2083
|
if (s && r && r.syntheticException) {
|
|
2158
|
-
let o =
|
|
2084
|
+
let o = On(t, r.syntheticException);
|
|
2159
2085
|
o.length && (i.exception = { values: [{ value: e, stacktrace: { frames: o } }] });
|
|
2160
2086
|
}
|
|
2161
2087
|
return i;
|
|
2162
2088
|
}
|
|
2163
|
-
var
|
|
2164
|
-
var
|
|
2165
|
-
name =
|
|
2089
|
+
var qr = 5;
|
|
2090
|
+
var Fe = class {
|
|
2091
|
+
name = Fe.id;
|
|
2166
2092
|
limit;
|
|
2167
2093
|
constructor(e = {}) {
|
|
2168
|
-
this.limit = e.limit ||
|
|
2094
|
+
this.limit = e.limit || qr;
|
|
2169
2095
|
}
|
|
2170
2096
|
setupOnce(e, n) {
|
|
2171
2097
|
let r = n().getClient();
|
|
2172
2098
|
r && e((s, i) => {
|
|
2173
|
-
let o = n().getIntegration(
|
|
2174
|
-
return o ?
|
|
2099
|
+
let o = n().getIntegration(Fe);
|
|
2100
|
+
return o ? Wr(r.getOptions().stackParser, o.limit, s, i) : s;
|
|
2175
2101
|
});
|
|
2176
2102
|
}
|
|
2177
2103
|
};
|
|
2178
|
-
var
|
|
2179
|
-
|
|
2180
|
-
function
|
|
2181
|
-
if (!n.exception || !n.exception.values || !r || !
|
|
2182
|
-
let s =
|
|
2104
|
+
var Me = Fe;
|
|
2105
|
+
fe(Me, "id", "LinkedErrors");
|
|
2106
|
+
function Wr(t, e, n, r) {
|
|
2107
|
+
if (!n.exception || !n.exception.values || !r || !O(r.originalException, Error)) return n;
|
|
2108
|
+
let s = wn(t, e, r.originalException);
|
|
2183
2109
|
return n.exception.values = [...s, ...n.exception.values], n;
|
|
2184
2110
|
}
|
|
2185
|
-
function
|
|
2186
|
-
if (!
|
|
2187
|
-
let s =
|
|
2188
|
-
return
|
|
2111
|
+
function wn(t, e, n, r = []) {
|
|
2112
|
+
if (!O(n.cause, Error) || r.length + 1 >= e) return r;
|
|
2113
|
+
let s = An(t, n.cause);
|
|
2114
|
+
return wn(t, e, n.cause, [s, ...r]);
|
|
2189
2115
|
}
|
|
2190
|
-
var
|
|
2191
|
-
var
|
|
2192
|
-
var
|
|
2116
|
+
var zr = { allowedHeaders: ["CF-RAY", "CF-Worker"] };
|
|
2117
|
+
var X;
|
|
2118
|
+
var Be = class {
|
|
2193
2119
|
constructor(e = {}) {
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2120
|
+
fe(this, "name", Be.id);
|
|
2121
|
+
Rt(this, X, void 0);
|
|
2122
|
+
It(this, X, { ...zr, ...e });
|
|
2197
2123
|
}
|
|
2198
2124
|
setupOnce(e, n) {
|
|
2199
2125
|
n().getClient() && e((s) => {
|
|
2200
2126
|
let { sdkProcessingMetadata: i } = s;
|
|
2201
|
-
return !n().getIntegration(
|
|
2127
|
+
return !n().getIntegration(Be) || !i || ("request" in i && i.request instanceof Request && (s.request = Vr(i.request, Ye(this, X)), s.user = Kr(s.user ?? {}, i.request, Ye(this, X))), "requestData" in i && (s.request ? s.request.data = i.requestData : s.request = { data: i.requestData })), s;
|
|
2202
2128
|
});
|
|
2203
2129
|
}
|
|
2204
2130
|
};
|
|
2205
|
-
var
|
|
2206
|
-
|
|
2207
|
-
function
|
|
2131
|
+
var Ue = Be;
|
|
2132
|
+
X = /* @__PURE__ */ new WeakMap(), fe(Ue, "id", "RequestData");
|
|
2133
|
+
function Kr(t, e, n) {
|
|
2208
2134
|
let r = e.headers.get("CF-Connecting-IP"), { allowedIps: s } = n, i = { ...t };
|
|
2209
|
-
return !("ip_address" in t) && r && s !== void 0 &&
|
|
2135
|
+
return !("ip_address" in t) && r && s !== void 0 && Jr(r, s) && (i.ip_address = r), Object.keys(i).length > 0 ? i : void 0;
|
|
2210
2136
|
}
|
|
2211
|
-
function
|
|
2137
|
+
function Vr(t, e) {
|
|
2212
2138
|
let n = t.headers.get("cookie"), r;
|
|
2213
2139
|
if (n) try {
|
|
2214
|
-
r =
|
|
2140
|
+
r = Xr(n);
|
|
2215
2141
|
} catch {
|
|
2216
2142
|
}
|
|
2217
2143
|
let s = {};
|
|
2218
|
-
for (let [
|
|
2144
|
+
for (let [u, f] of t.headers.entries()) u !== "cookie" && (s[u] = f);
|
|
2219
2145
|
let i = { method: t.method, cookies: r, headers: s };
|
|
2220
2146
|
try {
|
|
2221
|
-
let
|
|
2222
|
-
i.url = `${
|
|
2147
|
+
let u = new URL(t.url);
|
|
2148
|
+
i.url = `${u.protocol}//${u.hostname}${u.pathname}`, i.query_string = u.search;
|
|
2223
2149
|
} catch {
|
|
2224
2150
|
let f = t.url.indexOf("?");
|
|
2225
2151
|
f < 0 ? i.url = t.url : (i.url = t.url.substr(0, f), i.query_string = t.url.substr(f + 1));
|
|
2226
2152
|
}
|
|
2227
|
-
let { allowedHeaders: o, allowedCookies: a, allowedSearchParams:
|
|
2228
|
-
if (o !== void 0 && i.headers ? (i.headers =
|
|
2229
|
-
let
|
|
2230
|
-
Object.keys(
|
|
2231
|
-
f.set(d,
|
|
2153
|
+
let { allowedHeaders: o, allowedCookies: a, allowedSearchParams: c } = e;
|
|
2154
|
+
if (o !== void 0 && i.headers ? (i.headers = yt(i.headers, o), Object.keys(i.headers).length === 0 && delete i.headers) : delete i.headers, a !== void 0 && i.cookies ? (i.cookies = yt(i.cookies, a), Object.keys(i.cookies).length === 0 && delete i.cookies) : delete i.cookies, c !== void 0) {
|
|
2155
|
+
let u = Object.fromEntries(new URLSearchParams(i.query_string)), f = new URLSearchParams();
|
|
2156
|
+
Object.keys(yt(u, c)).forEach((d) => {
|
|
2157
|
+
f.set(d, u[d]);
|
|
2232
2158
|
}), i.query_string = f.toString();
|
|
2233
2159
|
} else delete i.query_string;
|
|
2234
2160
|
return i;
|
|
2235
2161
|
}
|
|
2236
|
-
function
|
|
2162
|
+
function Jr(t, e) {
|
|
2237
2163
|
return typeof e == "boolean" ? e : e instanceof RegExp ? e.test(t) : Array.isArray(e) ? e.map((r) => r.toLowerCase()).includes(t) : false;
|
|
2238
2164
|
}
|
|
2239
|
-
function
|
|
2165
|
+
function yt(t, e) {
|
|
2240
2166
|
let n = () => false;
|
|
2241
2167
|
if (typeof e == "boolean") return e ? t : {};
|
|
2242
2168
|
if (e instanceof RegExp) n = (r) => e.test(r);
|
|
@@ -2246,7 +2172,7 @@ function Rt(t, e) {
|
|
|
2246
2172
|
} else return {};
|
|
2247
2173
|
return Object.keys(t).filter(n).reduce((r, s) => (r[s] = t[s], r), {});
|
|
2248
2174
|
}
|
|
2249
|
-
function
|
|
2175
|
+
function Xr(t) {
|
|
2250
2176
|
if (typeof t != "string") return {};
|
|
2251
2177
|
try {
|
|
2252
2178
|
return t.split(";").map((e) => e.split("=")).reduce((e, [n, r]) => (e[decodeURIComponent(n.trim())] = decodeURIComponent(r.trim()), e), {});
|
|
@@ -2254,7 +2180,7 @@ function ns(t) {
|
|
|
2254
2180
|
return {};
|
|
2255
2181
|
}
|
|
2256
2182
|
}
|
|
2257
|
-
function
|
|
2183
|
+
function Zr(t, e) {
|
|
2258
2184
|
let n = {};
|
|
2259
2185
|
return t.forEach((r) => {
|
|
2260
2186
|
n[r.name] = r, r.setupOnce((s) => {
|
|
@@ -2262,22 +2188,22 @@ function rs(t, e) {
|
|
|
2262
2188
|
}, () => e);
|
|
2263
2189
|
}), n;
|
|
2264
2190
|
}
|
|
2265
|
-
var
|
|
2191
|
+
var Tt = class extends de {
|
|
2266
2192
|
#e = null;
|
|
2267
2193
|
constructor(e) {
|
|
2268
2194
|
e._metadata = e._metadata || {}, e._metadata.sdk = e._metadata.sdk || { name: "toucan-js", packages: [{ name: "npm:toucan-js", version: "3.3.1" }], version: "3.3.1" }, super(e);
|
|
2269
2195
|
}
|
|
2270
2196
|
setupIntegrations() {
|
|
2271
|
-
this._isEnabled() && !this._integrationsInitialized && this.#e && (this._integrations =
|
|
2197
|
+
this._isEnabled() && !this._integrationsInitialized && this.#e && (this._integrations = Zr(this._options.integrations, this.#e), this._integrationsInitialized = true);
|
|
2272
2198
|
}
|
|
2273
2199
|
eventFromException(e, n) {
|
|
2274
|
-
return T(
|
|
2200
|
+
return T(jr(this.#e, this._options.stackParser, e, n));
|
|
2275
2201
|
}
|
|
2276
2202
|
eventFromMessage(e, n = "info", r) {
|
|
2277
|
-
return T(
|
|
2203
|
+
return T(Hr(this._options.stackParser, e, n, r, this._options.attachStacktrace));
|
|
2278
2204
|
}
|
|
2279
2205
|
_prepareEvent(e, n, r) {
|
|
2280
|
-
return e.platform = e.platform || "javascript", this.getOptions().request && (e.sdkProcessingMetadata =
|
|
2206
|
+
return e.platform = e.platform || "javascript", this.getOptions().request && (e.sdkProcessingMetadata = Dn(e.sdkProcessingMetadata, ["request", this.getOptions().request])), this.getOptions().requestData && (e.sdkProcessingMetadata = Dn(e.sdkProcessingMetadata, ["requestData", this.getOptions().requestData])), super._prepareEvent(e, n, r);
|
|
2281
2207
|
}
|
|
2282
2208
|
getSdk() {
|
|
2283
2209
|
return this.#e;
|
|
@@ -2292,8 +2218,8 @@ var xt = class extends pe {
|
|
|
2292
2218
|
this.getOptions().enabled = e;
|
|
2293
2219
|
}
|
|
2294
2220
|
};
|
|
2295
|
-
function
|
|
2296
|
-
let [e, n] =
|
|
2221
|
+
function Qr(t) {
|
|
2222
|
+
let [e, n] = Je(t);
|
|
2297
2223
|
return [e, (s) => {
|
|
2298
2224
|
let i = n(s);
|
|
2299
2225
|
if (i) {
|
|
@@ -2303,28 +2229,28 @@ function ss(t) {
|
|
|
2303
2229
|
return i;
|
|
2304
2230
|
}];
|
|
2305
2231
|
}
|
|
2306
|
-
function
|
|
2307
|
-
if (t) return
|
|
2232
|
+
function es(t) {
|
|
2233
|
+
if (t) return Qe(t, ".js");
|
|
2308
2234
|
}
|
|
2309
|
-
var
|
|
2310
|
-
function
|
|
2235
|
+
var ts = Ee(Qr(es));
|
|
2236
|
+
function ns(t) {
|
|
2311
2237
|
function e({ body: n }) {
|
|
2312
2238
|
try {
|
|
2313
2239
|
let s = (t.fetcher ?? fetch)(t.url, { method: "POST", headers: t.headers, body: n }).then((i) => ({ statusCode: i.status, headers: { "retry-after": i.headers.get("Retry-After"), "x-sentry-rate-limits": i.headers.get("X-Sentry-Rate-Limits") } }));
|
|
2314
2240
|
return t.context && t.context.waitUntil(s), s;
|
|
2315
2241
|
} catch (r) {
|
|
2316
|
-
return
|
|
2242
|
+
return F(r);
|
|
2317
2243
|
}
|
|
2318
2244
|
}
|
|
2319
|
-
return
|
|
2245
|
+
return St(t, e);
|
|
2320
2246
|
}
|
|
2321
|
-
var
|
|
2247
|
+
var Ge = class extends Y {
|
|
2322
2248
|
constructor(e) {
|
|
2323
|
-
if (e.defaultIntegrations = e.defaultIntegrations === false ? [] : [...Array.isArray(e.defaultIntegrations) ? e.defaultIntegrations : [new
|
|
2324
|
-
let r =
|
|
2249
|
+
if (e.defaultIntegrations = e.defaultIntegrations === false ? [] : [...Array.isArray(e.defaultIntegrations) ? e.defaultIntegrations : [new Ue(e.requestDataOptions), new Me()]], e.release === void 0) {
|
|
2250
|
+
let r = Yr();
|
|
2325
2251
|
r !== void 0 && (e.release = r);
|
|
2326
2252
|
}
|
|
2327
|
-
let n = new
|
|
2253
|
+
let n = new Tt({ ...e, transport: ns, integrations: gt(e), stackParser: Ve(e.stackParser || ts), transportOptions: { ...e.transportOptions, context: e.context } });
|
|
2328
2254
|
super(n), n.setSdk(this), n.setupIntegrations();
|
|
2329
2255
|
}
|
|
2330
2256
|
setRequestBody(e) {
|
|
@@ -2337,23 +2263,21 @@ var Be = class extends $ {
|
|
|
2337
2263
|
return e.status === "in_progress" && this.setContext("monitor", { slug: e.monitorSlug }), this.getClient().captureCheckIn(e, n, r);
|
|
2338
2264
|
}
|
|
2339
2265
|
};
|
|
2340
|
-
function
|
|
2266
|
+
function vn(t, e, n, r, s, i, o, a) {
|
|
2341
2267
|
if (!(n && r && s)) return;
|
|
2342
|
-
let c = new
|
|
2343
|
-
|
|
2344
|
-
} })], requestDataOptions: { allowedHeaders: ["user-agent", "cf-challenge", "accept-encoding", "accept-language", "cf-ray", "content-length", "content-type", "host"], allowedSearchParams: /(.*)/ }, transportOptions: { headers: { "CF-Access-Client-ID": r, "CF-Access-Client-Secret": s } } });
|
|
2345
|
-
return i && (c.setTag("colo", i.coloId), c.setTag("metal", i.metalId)), a && u && (c.setTag("accountId", a), c.setTag("scriptId", u)), c.setUser({ id: a?.toString() }), c;
|
|
2268
|
+
let c = new Ge({ dsn: n, request: t, context: e, sampleRate: 1, requestDataOptions: { allowedHeaders: ["user-agent", "cf-challenge", "accept-encoding", "accept-language", "cf-ray", "content-length", "content-type", "host"], allowedSearchParams: /(.*)/ }, transportOptions: { headers: { "CF-Access-Client-ID": r, "CF-Access-Client-Secret": s } } });
|
|
2269
|
+
return i && (c.setTag("colo", i.coloId), c.setTag("metal", i.metalId)), o && a && (c.setTag("accountId", o), c.setTag("scriptId", a)), c.setUser({ id: o?.toString() }), c;
|
|
2346
2270
|
}
|
|
2347
|
-
function
|
|
2271
|
+
function rs() {
|
|
2348
2272
|
return { addLogs: () => {
|
|
2349
2273
|
}, setTags: () => {
|
|
2350
2274
|
}, end: () => {
|
|
2351
2275
|
}, isRecording: true };
|
|
2352
2276
|
}
|
|
2353
|
-
function
|
|
2354
|
-
return { enterSpan: (t, e, ...n) => e(
|
|
2277
|
+
function Cn() {
|
|
2278
|
+
return { enterSpan: (t, e, ...n) => e(rs(), ...n), getSpanContext: () => ({ traceId: "test-trace", spanId: "test-span", parentSpanId: "test-parent-span", traceFlags: 0 }), runWithSpanContext: (t, e, ...n) => e(...n), traceId: "test-trace", spanId: "test-span", parentSpanId: "test-parent-span", cfTraceIdHeader: "test-trace:test-span:0" };
|
|
2355
2279
|
}
|
|
2356
|
-
var
|
|
2280
|
+
var Le = class {
|
|
2357
2281
|
constructor(e) {
|
|
2358
2282
|
this.data = {};
|
|
2359
2283
|
this.hasWritten = false;
|
|
@@ -2369,29 +2293,29 @@ var $e = class {
|
|
|
2369
2293
|
this.hasWritten || this.readyAnalytics && (this.hasWritten = true, this.readyAnalytics.logEvent({ version: 1, accountId: this.data.accountId, indexId: this.data.scriptId?.toString(), doubles: [this.data.requestTime ?? -1, this.data.coloId ?? -1, this.data.metalId ?? -1, this.data.coloTier ?? -1, this.data.userWorkerAhead === void 0 ? -1 : Number(this.data.userWorkerAhead)], blobs: [this.data.hostname?.substring(0, 256), this.data.dispatchtype, this.data.error?.substring(0, 256), this.data.version, this.data.coloRegion] }));
|
|
2370
2294
|
}
|
|
2371
2295
|
};
|
|
2372
|
-
var
|
|
2373
|
-
let r, s = false, i = new
|
|
2296
|
+
var nc = { async fetch(t, e, n) {
|
|
2297
|
+
let r, s = false, i = new Le(e.ANALYTICS), o = new pe(e.UNSAFE_PERFORMANCE), a = o.now();
|
|
2374
2298
|
try {
|
|
2375
|
-
e.JAEGER || (e.JAEGER =
|
|
2376
|
-
let
|
|
2377
|
-
e.COLO_METADATA && e.VERSION_METADATA && e.CONFIG && i.setData({ accountId: e.CONFIG.account_id, scriptId: e.CONFIG.script_id, coloId: e.COLO_METADATA.coloId, metalId: e.COLO_METADATA.metalId, coloTier: e.COLO_METADATA.coloTier, coloRegion: e.COLO_METADATA.coloRegion, hostname:
|
|
2378
|
-
let
|
|
2299
|
+
e.JAEGER || (e.JAEGER = Cn()), r = vn(t, n, e.SENTRY_DSN, e.SENTRY_ACCESS_CLIENT_ID, e.SENTRY_ACCESS_CLIENT_SECRET, e.COLO_METADATA, e.CONFIG?.account_id, e.CONFIG?.script_id);
|
|
2300
|
+
let c = new URL(t.url);
|
|
2301
|
+
e.COLO_METADATA && e.VERSION_METADATA && e.CONFIG && i.setData({ accountId: e.CONFIG.account_id, scriptId: e.CONFIG.script_id, coloId: e.COLO_METADATA.coloId, metalId: e.COLO_METADATA.metalId, coloTier: e.COLO_METADATA.coloTier, coloRegion: e.COLO_METADATA.coloRegion, hostname: c.hostname, version: e.VERSION_METADATA.id, userWorkerAhead: e.CONFIG.invoke_user_worker_ahead_of_assets });
|
|
2302
|
+
let u = t.clone();
|
|
2379
2303
|
if (e.CONFIG.invoke_user_worker_ahead_of_assets) {
|
|
2380
2304
|
if (!e.CONFIG.has_user_worker) throw new Error("Fetch for user worker without having a user worker binding");
|
|
2381
|
-
return i.setData({ dispatchtype: "worker" }), await e.JAEGER.enterSpan("dispatch_worker", async (d) => (d.setTags({ hasUserWorker: true, asset: "ignored", dispatchType: "worker" }), s = true, e.USER_WORKER.fetch(
|
|
2305
|
+
return i.setData({ dispatchtype: "worker" }), await e.JAEGER.enterSpan("dispatch_worker", async (d) => (d.setTags({ hasUserWorker: true, asset: "ignored", dispatchType: "worker" }), s = true, e.USER_WORKER.fetch(u)));
|
|
2382
2306
|
}
|
|
2383
2307
|
let f = await e.ASSET_WORKER.unstable_canFetch(t);
|
|
2384
|
-
return e.CONFIG.has_user_worker && !f ? (i.setData({ dispatchtype: "worker" }), await e.JAEGER.enterSpan("dispatch_worker", async (d) => (d.setTags({ hasUserWorker: e.CONFIG.has_user_worker || false, asset: f, dispatchType: "worker" }), s = true, e.USER_WORKER.fetch(
|
|
2385
|
-
} catch (
|
|
2308
|
+
return e.CONFIG.has_user_worker && !f ? (i.setData({ dispatchtype: "worker" }), await e.JAEGER.enterSpan("dispatch_worker", async (d) => (d.setTags({ hasUserWorker: e.CONFIG.has_user_worker || false, asset: f, dispatchType: "worker" }), s = true, e.USER_WORKER.fetch(u)))) : (i.setData({ dispatchtype: "asset" }), await e.JAEGER.enterSpan("dispatch_assets", async (d) => (d.setTags({ hasUserWorker: e.CONFIG.has_user_worker || false, asset: f, dispatchType: "asset" }), e.ASSET_WORKER.fetch(u))));
|
|
2309
|
+
} catch (c) {
|
|
2386
2310
|
if (s) return;
|
|
2387
|
-
throw
|
|
2311
|
+
throw c instanceof Error && i.setData({ error: c.message }), r && r.captureException(c), c;
|
|
2388
2312
|
} finally {
|
|
2389
2313
|
i.setData({ requestTime: o.now() - a }), i.write();
|
|
2390
2314
|
}
|
|
2391
2315
|
} };
|
|
2392
2316
|
|
|
2393
2317
|
// src/asset-workers/router-worker.ts
|
|
2394
|
-
var router_worker_default =
|
|
2318
|
+
var router_worker_default = nc;
|
|
2395
2319
|
export {
|
|
2396
2320
|
router_worker_default as default
|
|
2397
2321
|
};
|