@cloudflare/vite-plugin 0.0.0-ab4dcff48 → 0.0.0-aba0e9cad
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 +897 -779
- package/dist/asset-workers/router-worker.js +230 -230
- package/dist/index.js +133 -87
- package/package.json +10 -9
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// ../workers-shared/dist/asset-worker.mjs
|
|
2
|
-
import { WorkerEntrypoint as
|
|
3
|
-
var
|
|
2
|
+
import { WorkerEntrypoint as mo } from "cloudflare:workers";
|
|
3
|
+
var de = class {
|
|
4
4
|
constructor(e) {
|
|
5
5
|
this.performanceTimer = e;
|
|
6
6
|
}
|
|
@@ -8,134 +8,179 @@ var ee = class {
|
|
|
8
8
|
return this.performanceTimer ? this.performanceTimer.timeOrigin + this.performanceTimer.now() : Date.now();
|
|
9
9
|
}
|
|
10
10
|
};
|
|
11
|
-
var
|
|
11
|
+
var it = class extends Response {
|
|
12
12
|
constructor(e, n) {
|
|
13
|
-
super(e, { ...n, status:
|
|
13
|
+
super(e, { ...n, status: it.status });
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
|
-
var
|
|
16
|
+
var S = it;
|
|
17
|
+
S.status = 200;
|
|
18
|
+
var at = class extends Response {
|
|
17
19
|
constructor(...[e, n]) {
|
|
18
|
-
super(e, { ...n, status:
|
|
20
|
+
super(e, { ...n, status: at.status, statusText: "Not Found" });
|
|
19
21
|
}
|
|
20
22
|
};
|
|
21
|
-
var
|
|
23
|
+
var D = at;
|
|
24
|
+
D.status = 404;
|
|
25
|
+
var fe = class extends D {
|
|
26
|
+
constructor() {
|
|
27
|
+
super();
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
var ct = class extends Response {
|
|
22
31
|
constructor(...[e, n]) {
|
|
23
|
-
super(e, { ...n, status:
|
|
32
|
+
super(e, { ...n, status: ct.status, statusText: "Method Not Allowed" });
|
|
24
33
|
}
|
|
25
34
|
};
|
|
26
|
-
var
|
|
35
|
+
var X = ct;
|
|
36
|
+
X.status = 405;
|
|
37
|
+
var ut = class extends Response {
|
|
27
38
|
constructor(e, n) {
|
|
28
|
-
super(null, { ...n, status:
|
|
39
|
+
super(null, { ...n, status: ut.status });
|
|
29
40
|
}
|
|
30
41
|
};
|
|
31
|
-
var
|
|
42
|
+
var M = ut;
|
|
43
|
+
M.status = 500;
|
|
44
|
+
var lt = class extends Response {
|
|
32
45
|
constructor(...[e, n]) {
|
|
33
|
-
super(null, { ...n, status:
|
|
46
|
+
super(null, { ...n, status: lt.status, statusText: "Not Modified" });
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
var Q = lt;
|
|
50
|
+
Q.status = 304;
|
|
51
|
+
var pt = class extends Response {
|
|
52
|
+
constructor(e, n) {
|
|
53
|
+
super(null, { ...n, status: pt.status, statusText: "Moved Permanently", headers: { ...n?.headers, Location: e } });
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var ee = pt;
|
|
57
|
+
ee.status = 301;
|
|
58
|
+
var dt = class extends Response {
|
|
59
|
+
constructor(e, n) {
|
|
60
|
+
super(null, { ...n, status: dt.status, statusText: "Found", headers: { ...n?.headers, Location: e } });
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
var te = dt;
|
|
64
|
+
te.status = 302;
|
|
65
|
+
var ft = class extends Response {
|
|
66
|
+
constructor(e, n) {
|
|
67
|
+
super(null, { ...n, status: ft.status, statusText: "See Other", headers: { ...n?.headers, Location: e } });
|
|
34
68
|
}
|
|
35
69
|
};
|
|
36
|
-
var
|
|
70
|
+
var ne = ft;
|
|
71
|
+
ne.status = 303;
|
|
72
|
+
var mt = class extends Response {
|
|
37
73
|
constructor(e, n) {
|
|
38
|
-
super(null, { ...n, status:
|
|
74
|
+
super(null, { ...n, status: mt.status, statusText: "Temporary Redirect", headers: { ...n?.headers, Location: e } });
|
|
39
75
|
}
|
|
40
76
|
};
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
77
|
+
var F = mt;
|
|
78
|
+
F.status = 307;
|
|
79
|
+
var ht = class extends Response {
|
|
80
|
+
constructor(e, n) {
|
|
81
|
+
super(null, { ...n, status: ht.status, statusText: "Permanent Redirect", headers: { ...n?.headers, Location: e } });
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
var re = ht;
|
|
85
|
+
re.status = 308;
|
|
86
|
+
var cn = Object.prototype.toString;
|
|
87
|
+
function z(t) {
|
|
88
|
+
switch (cn.call(t)) {
|
|
44
89
|
case "[object Error]":
|
|
45
90
|
case "[object Exception]":
|
|
46
91
|
case "[object DOMException]":
|
|
47
92
|
return true;
|
|
48
93
|
default:
|
|
49
|
-
return
|
|
94
|
+
return k(t, Error);
|
|
50
95
|
}
|
|
51
96
|
}
|
|
52
|
-
function
|
|
53
|
-
return
|
|
97
|
+
function gt(t, e) {
|
|
98
|
+
return cn.call(t) === `[object ${e}]`;
|
|
54
99
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
100
|
+
function _t(t) {
|
|
101
|
+
return gt(t, "ErrorEvent");
|
|
57
102
|
}
|
|
58
|
-
function
|
|
59
|
-
return
|
|
103
|
+
function Et(t) {
|
|
104
|
+
return gt(t, "String");
|
|
60
105
|
}
|
|
61
|
-
function
|
|
106
|
+
function se(t) {
|
|
62
107
|
return typeof t == "object" && t !== null && "__sentry_template_string__" in t && "__sentry_template_values__" in t;
|
|
63
108
|
}
|
|
64
|
-
function
|
|
65
|
-
return t === null ||
|
|
109
|
+
function Oe(t) {
|
|
110
|
+
return t === null || se(t) || typeof t != "object" && typeof t != "function";
|
|
66
111
|
}
|
|
67
|
-
function
|
|
68
|
-
return
|
|
112
|
+
function O(t) {
|
|
113
|
+
return gt(t, "Object");
|
|
69
114
|
}
|
|
70
|
-
function
|
|
71
|
-
return typeof Event < "u" &&
|
|
115
|
+
function St(t) {
|
|
116
|
+
return typeof Event < "u" && k(t, Event);
|
|
72
117
|
}
|
|
73
|
-
function
|
|
74
|
-
return typeof Element < "u" &&
|
|
118
|
+
function yt(t) {
|
|
119
|
+
return typeof Element < "u" && k(t, Element);
|
|
75
120
|
}
|
|
76
|
-
function
|
|
121
|
+
function P(t) {
|
|
77
122
|
return !!(t && t.then && typeof t.then == "function");
|
|
78
123
|
}
|
|
79
|
-
function
|
|
80
|
-
return
|
|
124
|
+
function Tt(t) {
|
|
125
|
+
return O(t) && "nativeEvent" in t && "preventDefault" in t && "stopPropagation" in t;
|
|
81
126
|
}
|
|
82
|
-
function
|
|
127
|
+
function k(t, e) {
|
|
83
128
|
try {
|
|
84
129
|
return t instanceof e;
|
|
85
130
|
} catch {
|
|
86
131
|
return false;
|
|
87
132
|
}
|
|
88
133
|
}
|
|
89
|
-
function
|
|
134
|
+
function It(t) {
|
|
90
135
|
return !!(typeof t == "object" && t !== null && (t.__isVue || t._isVue));
|
|
91
136
|
}
|
|
92
|
-
function
|
|
137
|
+
function U(t, e = 0) {
|
|
93
138
|
return typeof t != "string" || e === 0 || t.length <= e ? t : `${t.slice(0, e)}...`;
|
|
94
139
|
}
|
|
95
|
-
var
|
|
96
|
-
var
|
|
97
|
-
function
|
|
98
|
-
let r = n ||
|
|
140
|
+
var $ = "8.9.2";
|
|
141
|
+
var h = globalThis;
|
|
142
|
+
function oe(t, e, n) {
|
|
143
|
+
let r = n || h, s = r.__SENTRY__ = r.__SENTRY__ || {}, o = s[$] = s[$] || {};
|
|
99
144
|
return o[t] || (o[t] = e());
|
|
100
145
|
}
|
|
101
|
-
var
|
|
102
|
-
var
|
|
103
|
-
function
|
|
146
|
+
var Sr = h;
|
|
147
|
+
var yr = 80;
|
|
148
|
+
function un(t, e = {}) {
|
|
104
149
|
if (!t) return "<unknown>";
|
|
105
150
|
try {
|
|
106
|
-
let n = t, r = 5, s = [], o = 0, i = 0, a = " > ", c = a.length, u,
|
|
107
|
-
for (; n && o++ < r && (u =
|
|
151
|
+
let n = t, r = 5, s = [], o = 0, i = 0, a = " > ", c = a.length, u, l = Array.isArray(e) ? e : e.keyAttrs, p = !Array.isArray(e) && e.maxStringLength || yr;
|
|
152
|
+
for (; n && o++ < r && (u = Tr(n, l), !(u === "html" || o > 1 && i + s.length * c + u.length >= p)); ) s.push(u), i += u.length, n = n.parentNode;
|
|
108
153
|
return s.reverse().join(a);
|
|
109
154
|
} catch {
|
|
110
155
|
return "<unknown>";
|
|
111
156
|
}
|
|
112
157
|
}
|
|
113
|
-
function
|
|
158
|
+
function Tr(t, e) {
|
|
114
159
|
let n = t, r = [], s, o, i, a, c;
|
|
115
160
|
if (!n || !n.tagName) return "";
|
|
116
|
-
if (
|
|
161
|
+
if (Sr.HTMLElement && n instanceof HTMLElement && n.dataset) {
|
|
117
162
|
if (n.dataset.sentryComponent) return n.dataset.sentryComponent;
|
|
118
163
|
if (n.dataset.sentryElement) return n.dataset.sentryElement;
|
|
119
164
|
}
|
|
120
165
|
r.push(n.tagName.toLowerCase());
|
|
121
|
-
let u = e && e.length ? e.filter((
|
|
122
|
-
if (u && u.length) u.forEach((
|
|
123
|
-
r.push(`[${
|
|
166
|
+
let u = e && e.length ? e.filter((p) => n.getAttribute(p)).map((p) => [p, n.getAttribute(p)]) : null;
|
|
167
|
+
if (u && u.length) u.forEach((p) => {
|
|
168
|
+
r.push(`[${p[0]}="${p[1]}"]`);
|
|
124
169
|
});
|
|
125
|
-
else if (n.id && r.push(`#${n.id}`), s = n.className, s &&
|
|
126
|
-
let
|
|
127
|
-
for (c = 0; c <
|
|
170
|
+
else if (n.id && r.push(`#${n.id}`), s = n.className, s && Et(s)) for (o = s.split(/\s+/), c = 0; c < o.length; c++) r.push(`.${o[c]}`);
|
|
171
|
+
let l = ["aria-label", "type", "name", "title", "alt"];
|
|
172
|
+
for (c = 0; c < l.length; c++) i = l[c], a = n.getAttribute(i), a && r.push(`[${i}="${a}"]`);
|
|
128
173
|
return r.join("");
|
|
129
174
|
}
|
|
130
|
-
var
|
|
131
|
-
var
|
|
132
|
-
var
|
|
133
|
-
var
|
|
134
|
-
function
|
|
135
|
-
if (!("console" in
|
|
136
|
-
let e =
|
|
175
|
+
var H = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__;
|
|
176
|
+
var Ir = "Sentry Logger ";
|
|
177
|
+
var xt = ["debug", "info", "warn", "error", "log", "assert", "trace"];
|
|
178
|
+
var At = {};
|
|
179
|
+
function ve(t) {
|
|
180
|
+
if (!("console" in h)) return t();
|
|
181
|
+
let e = h.console, n = {}, r = Object.keys(At);
|
|
137
182
|
r.forEach((s) => {
|
|
138
|
-
let o =
|
|
183
|
+
let o = At[s];
|
|
139
184
|
n[s] = e[s], e[s] = o;
|
|
140
185
|
});
|
|
141
186
|
try {
|
|
@@ -146,115 +191,115 @@ function Ie(t) {
|
|
|
146
191
|
});
|
|
147
192
|
}
|
|
148
193
|
}
|
|
149
|
-
function
|
|
194
|
+
function xr() {
|
|
150
195
|
let t = false, e = { enable: () => {
|
|
151
196
|
t = true;
|
|
152
197
|
}, disable: () => {
|
|
153
198
|
t = false;
|
|
154
199
|
}, isEnabled: () => t };
|
|
155
|
-
return
|
|
200
|
+
return H ? xt.forEach((n) => {
|
|
156
201
|
e[n] = (...r) => {
|
|
157
|
-
t &&
|
|
158
|
-
|
|
202
|
+
t && ve(() => {
|
|
203
|
+
h.console[n](`${Ir}[${n}]:`, ...r);
|
|
159
204
|
});
|
|
160
205
|
};
|
|
161
|
-
}) :
|
|
206
|
+
}) : xt.forEach((n) => {
|
|
162
207
|
e[n] = () => {
|
|
163
208
|
};
|
|
164
209
|
}), e;
|
|
165
210
|
}
|
|
166
|
-
var
|
|
167
|
-
var
|
|
168
|
-
function
|
|
211
|
+
var f = xr();
|
|
212
|
+
var Ar = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
|
|
213
|
+
function br(t) {
|
|
169
214
|
return t === "http" || t === "https";
|
|
170
215
|
}
|
|
171
|
-
function
|
|
216
|
+
function B(t, e = false) {
|
|
172
217
|
let { host: n, path: r, pass: s, port: o, projectId: i, protocol: a, publicKey: c } = t;
|
|
173
218
|
return `${a}://${c}${e && s ? `:${s}` : ""}@${n}${o ? `:${o}` : ""}/${r && `${r}/`}${i}`;
|
|
174
219
|
}
|
|
175
|
-
function
|
|
176
|
-
let e =
|
|
220
|
+
function ln(t) {
|
|
221
|
+
let e = Ar.exec(t);
|
|
177
222
|
if (!e) {
|
|
178
|
-
|
|
223
|
+
ve(() => {
|
|
179
224
|
console.error(`Invalid Sentry Dsn: ${t}`);
|
|
180
225
|
});
|
|
181
226
|
return;
|
|
182
227
|
}
|
|
183
|
-
let [n, r, s = "", o, i = "", a] = e.slice(1), c = "", u = a,
|
|
184
|
-
if (
|
|
185
|
-
let
|
|
186
|
-
|
|
228
|
+
let [n, r, s = "", o, i = "", a] = e.slice(1), c = "", u = a, l = u.split("/");
|
|
229
|
+
if (l.length > 1 && (c = l.slice(0, -1).join("/"), u = l.pop()), u) {
|
|
230
|
+
let p = u.match(/^\d+/);
|
|
231
|
+
p && (u = p[0]);
|
|
187
232
|
}
|
|
188
|
-
return
|
|
233
|
+
return pn({ host: o, pass: s, path: c, projectId: u, port: i, protocol: n, publicKey: r });
|
|
189
234
|
}
|
|
190
|
-
function
|
|
235
|
+
function pn(t) {
|
|
191
236
|
return { protocol: t.protocol, publicKey: t.publicKey || "", pass: t.pass || "", host: t.host, port: t.port || "", path: t.path || "", projectId: t.projectId };
|
|
192
237
|
}
|
|
193
|
-
function
|
|
194
|
-
if (!
|
|
238
|
+
function Rr(t) {
|
|
239
|
+
if (!H) return true;
|
|
195
240
|
let { port: e, projectId: n, protocol: r } = t;
|
|
196
|
-
return ["protocol", "publicKey", "host", "projectId"].find((i) => t[i] ? false : (
|
|
241
|
+
return ["protocol", "publicKey", "host", "projectId"].find((i) => t[i] ? false : (f.error(`Invalid Sentry Dsn: ${i} missing`), true)) ? false : n.match(/^\d+$/) ? br(r) ? e && isNaN(parseInt(e, 10)) ? (f.error(`Invalid Sentry Dsn: Invalid port ${e}`), false) : true : (f.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), false) : (f.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), false);
|
|
197
242
|
}
|
|
198
|
-
function
|
|
199
|
-
let e = typeof t == "string" ?
|
|
200
|
-
if (!(!e || !
|
|
243
|
+
function we(t) {
|
|
244
|
+
let e = typeof t == "string" ? ln(t) : pn(t);
|
|
245
|
+
if (!(!e || !Rr(e))) return e;
|
|
201
246
|
}
|
|
202
|
-
var
|
|
247
|
+
var b = class extends Error {
|
|
203
248
|
constructor(e, n = "warn") {
|
|
204
249
|
super(e), this.message = e, this.name = new.target.prototype.constructor.name, Object.setPrototypeOf(this, new.target.prototype), this.logLevel = n;
|
|
205
250
|
}
|
|
206
251
|
};
|
|
207
|
-
function
|
|
252
|
+
function Y(t, e, n) {
|
|
208
253
|
try {
|
|
209
254
|
Object.defineProperty(t, e, { value: n, writable: true, configurable: true });
|
|
210
255
|
} catch {
|
|
211
|
-
|
|
256
|
+
H && f.log(`Failed to add non-enumerable property "${e}" to object`, t);
|
|
212
257
|
}
|
|
213
258
|
}
|
|
214
|
-
function
|
|
259
|
+
function Rt(t) {
|
|
215
260
|
return Object.keys(t).map((e) => `${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&");
|
|
216
261
|
}
|
|
217
|
-
function
|
|
218
|
-
if (
|
|
219
|
-
if (
|
|
220
|
-
let e = { type: t.type, target:
|
|
221
|
-
return typeof CustomEvent < "u" &&
|
|
262
|
+
function De(t) {
|
|
263
|
+
if (z(t)) return { message: t.message, name: t.name, stack: t.stack, ...fn(t) };
|
|
264
|
+
if (St(t)) {
|
|
265
|
+
let e = { type: t.type, target: dn(t.target), currentTarget: dn(t.currentTarget), ...fn(t) };
|
|
266
|
+
return typeof CustomEvent < "u" && k(t, CustomEvent) && (e.detail = t.detail), e;
|
|
222
267
|
} else return t;
|
|
223
268
|
}
|
|
224
|
-
function
|
|
269
|
+
function dn(t) {
|
|
225
270
|
try {
|
|
226
|
-
return
|
|
271
|
+
return yt(t) ? un(t) : Object.prototype.toString.call(t);
|
|
227
272
|
} catch {
|
|
228
273
|
return "<unknown>";
|
|
229
274
|
}
|
|
230
275
|
}
|
|
231
|
-
function
|
|
276
|
+
function fn(t) {
|
|
232
277
|
if (typeof t == "object" && t !== null) {
|
|
233
278
|
let e = {};
|
|
234
279
|
for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
235
280
|
return e;
|
|
236
281
|
} else return {};
|
|
237
282
|
}
|
|
238
|
-
function
|
|
239
|
-
let n = Object.keys(
|
|
283
|
+
function me(t, e = 40) {
|
|
284
|
+
let n = Object.keys(De(t));
|
|
240
285
|
if (n.sort(), !n.length) return "[object has no keys]";
|
|
241
|
-
if (n[0].length >= e) return
|
|
286
|
+
if (n[0].length >= e) return U(n[0], e);
|
|
242
287
|
for (let r = n.length; r > 0; r--) {
|
|
243
288
|
let s = n.slice(0, r).join(", ");
|
|
244
|
-
if (!(s.length > e)) return r === n.length ? s :
|
|
289
|
+
if (!(s.length > e)) return r === n.length ? s : U(s, e);
|
|
245
290
|
}
|
|
246
291
|
return "";
|
|
247
292
|
}
|
|
248
|
-
function
|
|
249
|
-
return
|
|
293
|
+
function y(t) {
|
|
294
|
+
return bt(t, /* @__PURE__ */ new Map());
|
|
250
295
|
}
|
|
251
|
-
function
|
|
252
|
-
if (
|
|
296
|
+
function bt(t, e) {
|
|
297
|
+
if (Cr(t)) {
|
|
253
298
|
let n = e.get(t);
|
|
254
299
|
if (n !== void 0) return n;
|
|
255
300
|
let r = {};
|
|
256
301
|
e.set(t, r);
|
|
257
|
-
for (let s of Object.keys(t)) typeof t[s] < "u" && (r[s] =
|
|
302
|
+
for (let s of Object.keys(t)) typeof t[s] < "u" && (r[s] = bt(t[s], e));
|
|
258
303
|
return r;
|
|
259
304
|
}
|
|
260
305
|
if (Array.isArray(t)) {
|
|
@@ -262,13 +307,13 @@ function it(t, e) {
|
|
|
262
307
|
if (n !== void 0) return n;
|
|
263
308
|
let r = [];
|
|
264
309
|
return e.set(t, r), t.forEach((s) => {
|
|
265
|
-
r.push(
|
|
310
|
+
r.push(bt(s, e));
|
|
266
311
|
}), r;
|
|
267
312
|
}
|
|
268
313
|
return t;
|
|
269
314
|
}
|
|
270
|
-
function
|
|
271
|
-
if (!
|
|
315
|
+
function Cr(t) {
|
|
316
|
+
if (!O(t)) return false;
|
|
272
317
|
try {
|
|
273
318
|
let e = Object.getPrototypeOf(t).constructor.name;
|
|
274
319
|
return !e || e === "Object";
|
|
@@ -276,10 +321,10 @@ function or(t) {
|
|
|
276
321
|
return true;
|
|
277
322
|
}
|
|
278
323
|
}
|
|
279
|
-
var
|
|
280
|
-
var
|
|
281
|
-
var
|
|
282
|
-
function
|
|
324
|
+
var Me = "?";
|
|
325
|
+
var mn = /\(error: (.*)\)/;
|
|
326
|
+
var hn = /captureMessage|captureException/;
|
|
327
|
+
function Pe(...t) {
|
|
283
328
|
let e = t.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
|
|
284
329
|
return (n, r = 0, s = 0) => {
|
|
285
330
|
let o = [], i = n.split(`
|
|
@@ -287,98 +332,98 @@ function Ce(...t) {
|
|
|
287
332
|
for (let a = r; a < i.length; a++) {
|
|
288
333
|
let c = i[a];
|
|
289
334
|
if (c.length > 1024) continue;
|
|
290
|
-
let u =
|
|
335
|
+
let u = mn.test(c) ? c.replace(mn, "$1") : c;
|
|
291
336
|
if (!u.match(/\S*Error: /)) {
|
|
292
|
-
for (let
|
|
293
|
-
let
|
|
294
|
-
if (
|
|
295
|
-
o.push(
|
|
337
|
+
for (let l of e) {
|
|
338
|
+
let p = l(u);
|
|
339
|
+
if (p) {
|
|
340
|
+
o.push(p);
|
|
296
341
|
break;
|
|
297
342
|
}
|
|
298
343
|
}
|
|
299
344
|
if (o.length >= 50 + s) break;
|
|
300
345
|
}
|
|
301
346
|
}
|
|
302
|
-
return
|
|
347
|
+
return gn(o.slice(s));
|
|
303
348
|
};
|
|
304
349
|
}
|
|
305
|
-
function
|
|
306
|
-
return Array.isArray(t) ?
|
|
350
|
+
function Nt(t) {
|
|
351
|
+
return Array.isArray(t) ? Pe(...t) : t;
|
|
307
352
|
}
|
|
308
|
-
function
|
|
353
|
+
function gn(t) {
|
|
309
354
|
if (!t.length) return [];
|
|
310
355
|
let e = Array.from(t);
|
|
311
|
-
return /sentryWrapped/.test(e[e.length - 1].function || "") && e.pop(), e.reverse(),
|
|
356
|
+
return /sentryWrapped/.test(e[e.length - 1].function || "") && e.pop(), e.reverse(), hn.test(e[e.length - 1].function || "") && (e.pop(), hn.test(e[e.length - 1].function || "") && e.pop()), e.slice(0, 50).map((n) => ({ ...n, filename: n.filename || e[e.length - 1].filename, function: n.function || Me }));
|
|
312
357
|
}
|
|
313
|
-
var
|
|
314
|
-
function
|
|
358
|
+
var Ct = "<anonymous>";
|
|
359
|
+
function he(t) {
|
|
315
360
|
try {
|
|
316
|
-
return !t || typeof t != "function" ?
|
|
361
|
+
return !t || typeof t != "function" ? Ct : t.name || Ct;
|
|
317
362
|
} catch {
|
|
318
|
-
return
|
|
363
|
+
return Ct;
|
|
319
364
|
}
|
|
320
365
|
}
|
|
321
|
-
var
|
|
322
|
-
var
|
|
323
|
-
function
|
|
324
|
-
|
|
366
|
+
var ke = {};
|
|
367
|
+
var _n = {};
|
|
368
|
+
function Le(t, e) {
|
|
369
|
+
ke[t] = ke[t] || [], ke[t].push(e);
|
|
325
370
|
}
|
|
326
|
-
function
|
|
327
|
-
|
|
371
|
+
function Fe(t, e) {
|
|
372
|
+
_n[t] || (e(), _n[t] = true);
|
|
328
373
|
}
|
|
329
|
-
function
|
|
330
|
-
let n = t &&
|
|
374
|
+
function Ue(t, e) {
|
|
375
|
+
let n = t && ke[t];
|
|
331
376
|
if (n) for (let r of n) try {
|
|
332
377
|
r(e);
|
|
333
378
|
} catch (s) {
|
|
334
|
-
|
|
379
|
+
H && f.error(`Error while triggering instrumentation handler.
|
|
335
380
|
Type: ${t}
|
|
336
|
-
Name: ${
|
|
381
|
+
Name: ${he(r)}
|
|
337
382
|
Error:`, s);
|
|
338
383
|
}
|
|
339
384
|
}
|
|
340
|
-
var
|
|
341
|
-
function
|
|
342
|
-
return Date.now() /
|
|
385
|
+
var En = 1e3;
|
|
386
|
+
function ie() {
|
|
387
|
+
return Date.now() / En;
|
|
343
388
|
}
|
|
344
|
-
function
|
|
345
|
-
let { performance: t } =
|
|
346
|
-
if (!t || !t.now) return
|
|
389
|
+
function Nr() {
|
|
390
|
+
let { performance: t } = h;
|
|
391
|
+
if (!t || !t.now) return ie;
|
|
347
392
|
let e = Date.now() - t.now(), n = t.timeOrigin == null ? e : t.timeOrigin;
|
|
348
|
-
return () => (n + t.now()) /
|
|
393
|
+
return () => (n + t.now()) / En;
|
|
349
394
|
}
|
|
350
|
-
var
|
|
351
|
-
var
|
|
352
|
-
var
|
|
353
|
-
let { performance: t } =
|
|
395
|
+
var _e = Nr();
|
|
396
|
+
var ge;
|
|
397
|
+
var Or = (() => {
|
|
398
|
+
let { performance: t } = h;
|
|
354
399
|
if (!t || !t.now) {
|
|
355
|
-
|
|
400
|
+
ge = "none";
|
|
356
401
|
return;
|
|
357
402
|
}
|
|
358
403
|
let e = 3600 * 1e3, n = t.now(), r = Date.now(), s = t.timeOrigin ? Math.abs(t.timeOrigin + n - r) : e, o = s < e, i = t.timing && t.timing.navigationStart, c = typeof i == "number" ? Math.abs(i + n - r) : e, u = c < e;
|
|
359
|
-
return o || u ? s <= c ? (
|
|
404
|
+
return o || u ? s <= c ? (ge = "timeOrigin", t.timeOrigin) : (ge = "navigationStart", i) : (ge = "dateNow", r);
|
|
360
405
|
})();
|
|
361
|
-
var
|
|
362
|
-
function
|
|
406
|
+
var $e = null;
|
|
407
|
+
function Ot(t) {
|
|
363
408
|
let e = "error";
|
|
364
|
-
|
|
409
|
+
Le(e, t), Fe(e, vr);
|
|
365
410
|
}
|
|
366
|
-
function
|
|
367
|
-
|
|
368
|
-
return
|
|
369
|
-
},
|
|
411
|
+
function vr() {
|
|
412
|
+
$e = h.onerror, h.onerror = function(t, e, n, r, s) {
|
|
413
|
+
return Ue("error", { column: r, error: s, line: n, msg: t, url: e }), $e && !$e.__SENTRY_LOADER__ ? $e.apply(this, arguments) : false;
|
|
414
|
+
}, h.onerror.__SENTRY_INSTRUMENTED__ = true;
|
|
370
415
|
}
|
|
371
|
-
var
|
|
372
|
-
function
|
|
416
|
+
var He = null;
|
|
417
|
+
function vt(t) {
|
|
373
418
|
let e = "unhandledrejection";
|
|
374
|
-
|
|
419
|
+
Le(e, t), Fe(e, wr);
|
|
375
420
|
}
|
|
376
|
-
function
|
|
377
|
-
|
|
378
|
-
return
|
|
379
|
-
},
|
|
421
|
+
function wr() {
|
|
422
|
+
He = h.onunhandledrejection, h.onunhandledrejection = function(t) {
|
|
423
|
+
return Ue("unhandledrejection", t), He && !He.__SENTRY_LOADER__ ? He.apply(this, arguments) : true;
|
|
424
|
+
}, h.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;
|
|
380
425
|
}
|
|
381
|
-
function
|
|
426
|
+
function Sn() {
|
|
382
427
|
let t = typeof WeakSet == "function", e = t ? /* @__PURE__ */ new WeakSet() : [];
|
|
383
428
|
function n(s) {
|
|
384
429
|
if (t) return e.has(s) ? true : (e.add(s), false);
|
|
@@ -394,8 +439,8 @@ function en() {
|
|
|
394
439
|
}
|
|
395
440
|
return [n, r];
|
|
396
441
|
}
|
|
397
|
-
function
|
|
398
|
-
let t =
|
|
442
|
+
function x() {
|
|
443
|
+
let t = h, e = t.crypto || t.msCrypto, n = () => Math.random() * 16;
|
|
399
444
|
try {
|
|
400
445
|
if (e && e.randomUUID) return e.randomUUID().replace(/-/g, "");
|
|
401
446
|
e && e.getRandomValues && (n = () => {
|
|
@@ -406,15 +451,15 @@ function T() {
|
|
|
406
451
|
}
|
|
407
452
|
return ("10000000100040008000" + 1e11).replace(/[018]/g, (r) => (r ^ (n() & 15) >> r / 4).toString(16));
|
|
408
453
|
}
|
|
409
|
-
function
|
|
454
|
+
function Dr(t) {
|
|
410
455
|
return t.exception && t.exception.values ? t.exception.values[0] : void 0;
|
|
411
456
|
}
|
|
412
|
-
function
|
|
457
|
+
function Ee(t, e, n) {
|
|
413
458
|
let r = t.exception = t.exception || {}, s = r.values = r.values || [], o = s[0] = s[0] || {};
|
|
414
459
|
o.value || (o.value = e || ""), o.type || (o.type = n || "Error");
|
|
415
460
|
}
|
|
416
|
-
function
|
|
417
|
-
let n =
|
|
461
|
+
function J(t, e) {
|
|
462
|
+
let n = Dr(t);
|
|
418
463
|
if (!n) return;
|
|
419
464
|
let r = { type: "generic", handled: true }, s = n.mechanism;
|
|
420
465
|
if (n.mechanism = { ...r, ...s, ...e }, e && "data" in e) {
|
|
@@ -422,32 +467,32 @@ function j(t, e) {
|
|
|
422
467
|
n.mechanism.data = o;
|
|
423
468
|
}
|
|
424
469
|
}
|
|
425
|
-
function
|
|
470
|
+
function Be(t) {
|
|
426
471
|
if (t && t.__sentry_captured__) return true;
|
|
427
472
|
try {
|
|
428
|
-
|
|
473
|
+
Y(t, "__sentry_captured__", true);
|
|
429
474
|
} catch {
|
|
430
475
|
}
|
|
431
476
|
return false;
|
|
432
477
|
}
|
|
433
|
-
function
|
|
478
|
+
function Se(t) {
|
|
434
479
|
return Array.isArray(t) ? t : [t];
|
|
435
480
|
}
|
|
436
|
-
function
|
|
481
|
+
function v(t, e = 100, n = 1 / 0) {
|
|
437
482
|
try {
|
|
438
|
-
return
|
|
483
|
+
return wt("", t, e, n);
|
|
439
484
|
} catch (r) {
|
|
440
485
|
return { ERROR: `**non-serializable** (${r})` };
|
|
441
486
|
}
|
|
442
487
|
}
|
|
443
|
-
function
|
|
444
|
-
let r =
|
|
445
|
-
return
|
|
488
|
+
function ae(t, e = 3, n = 100 * 1024) {
|
|
489
|
+
let r = v(t, e);
|
|
490
|
+
return Lr(r) > n ? ae(t, e - 1, n) : r;
|
|
446
491
|
}
|
|
447
|
-
function
|
|
492
|
+
function wt(t, e, n = 1 / 0, r = 1 / 0, s = Sn()) {
|
|
448
493
|
let [o, i] = s;
|
|
449
494
|
if (e == null || ["number", "boolean", "string"].includes(typeof e) && !Number.isNaN(e)) return e;
|
|
450
|
-
let a =
|
|
495
|
+
let a = Mr(t, e);
|
|
451
496
|
if (!a.startsWith("[object ")) return a;
|
|
452
497
|
if (e.__sentry_skip_normalization__) return e;
|
|
453
498
|
let c = typeof e.__sentry_override_normalization_depth__ == "number" ? e.__sentry_override_normalization_depth__ : n;
|
|
@@ -455,52 +500,52 @@ function dt(t, e, n = 1 / 0, r = 1 / 0, s = en()) {
|
|
|
455
500
|
if (o(e)) return "[Circular ~]";
|
|
456
501
|
let u = e;
|
|
457
502
|
if (u && typeof u.toJSON == "function") try {
|
|
458
|
-
let
|
|
459
|
-
return
|
|
503
|
+
let d = u.toJSON();
|
|
504
|
+
return wt("", d, c - 1, r, s);
|
|
460
505
|
} catch {
|
|
461
506
|
}
|
|
462
|
-
let
|
|
463
|
-
for (let
|
|
464
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
465
|
-
if (
|
|
466
|
-
|
|
507
|
+
let l = Array.isArray(e) ? [] : {}, p = 0, m = De(e);
|
|
508
|
+
for (let d in m) {
|
|
509
|
+
if (!Object.prototype.hasOwnProperty.call(m, d)) continue;
|
|
510
|
+
if (p >= r) {
|
|
511
|
+
l[d] = "[MaxProperties ~]";
|
|
467
512
|
break;
|
|
468
513
|
}
|
|
469
|
-
let
|
|
470
|
-
|
|
514
|
+
let g = m[d];
|
|
515
|
+
l[d] = wt(d, g, c - 1, r, s), p++;
|
|
471
516
|
}
|
|
472
|
-
return i(e),
|
|
517
|
+
return i(e), l;
|
|
473
518
|
}
|
|
474
|
-
function
|
|
519
|
+
function Mr(t, e) {
|
|
475
520
|
try {
|
|
476
521
|
if (t === "domain" && e && typeof e == "object" && e._events) return "[Domain]";
|
|
477
522
|
if (t === "domainEmitter") return "[DomainEmitter]";
|
|
478
523
|
if (typeof global < "u" && e === global) return "[Global]";
|
|
479
524
|
if (typeof window < "u" && e === window) return "[Window]";
|
|
480
525
|
if (typeof document < "u" && e === document) return "[Document]";
|
|
481
|
-
if (
|
|
482
|
-
if (
|
|
526
|
+
if (It(e)) return "[VueViewModel]";
|
|
527
|
+
if (Tt(e)) return "[SyntheticEvent]";
|
|
483
528
|
if (typeof e == "number" && e !== e) return "[NaN]";
|
|
484
|
-
if (typeof e == "function") return `[Function: ${
|
|
529
|
+
if (typeof e == "function") return `[Function: ${he(e)}]`;
|
|
485
530
|
if (typeof e == "symbol") return `[${String(e)}]`;
|
|
486
531
|
if (typeof e == "bigint") return `[BigInt: ${String(e)}]`;
|
|
487
|
-
let n =
|
|
532
|
+
let n = Pr(e);
|
|
488
533
|
return /^HTML(\w*)Element$/.test(n) ? `[HTMLElement: ${n}]` : `[object ${n}]`;
|
|
489
534
|
} catch (n) {
|
|
490
535
|
return `**non-serializable** (${n})`;
|
|
491
536
|
}
|
|
492
537
|
}
|
|
493
|
-
function
|
|
538
|
+
function Pr(t) {
|
|
494
539
|
let e = Object.getPrototypeOf(t);
|
|
495
540
|
return e ? e.constructor.name : "null prototype";
|
|
496
541
|
}
|
|
497
|
-
function
|
|
542
|
+
function kr(t) {
|
|
498
543
|
return ~-encodeURI(t).split(/%..|./).length;
|
|
499
544
|
}
|
|
500
|
-
function
|
|
501
|
-
return
|
|
545
|
+
function Lr(t) {
|
|
546
|
+
return kr(JSON.stringify(t));
|
|
502
547
|
}
|
|
503
|
-
function
|
|
548
|
+
function Fr(t, e) {
|
|
504
549
|
let n = 0;
|
|
505
550
|
for (let r = t.length - 1; r >= 0; r--) {
|
|
506
551
|
let s = t[r];
|
|
@@ -509,29 +554,29 @@ function gr(t, e) {
|
|
|
509
554
|
if (e) for (; n--; n) t.unshift("..");
|
|
510
555
|
return t;
|
|
511
556
|
}
|
|
512
|
-
var
|
|
513
|
-
function
|
|
514
|
-
let e = t.length > 1024 ? `<truncated>${t.slice(-1024)}` : t, n =
|
|
557
|
+
var Ur = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;
|
|
558
|
+
function $r(t) {
|
|
559
|
+
let e = t.length > 1024 ? `<truncated>${t.slice(-1024)}` : t, n = Ur.exec(e);
|
|
515
560
|
return n ? n.slice(1) : [];
|
|
516
561
|
}
|
|
517
|
-
function
|
|
562
|
+
function Dt(...t) {
|
|
518
563
|
let e = "", n = false;
|
|
519
564
|
for (let r = t.length - 1; r >= -1 && !n; r--) {
|
|
520
565
|
let s = r >= 0 ? t[r] : "/";
|
|
521
566
|
s && (e = `${s}/${e}`, n = s.charAt(0) === "/");
|
|
522
567
|
}
|
|
523
|
-
return e =
|
|
568
|
+
return e = Fr(e.split("/").filter((r) => !!r), !n).join("/"), (n ? "/" : "") + e || ".";
|
|
524
569
|
}
|
|
525
|
-
function
|
|
570
|
+
function yn(t) {
|
|
526
571
|
let e = 0;
|
|
527
572
|
for (; e < t.length && t[e] === ""; e++) ;
|
|
528
573
|
let n = t.length - 1;
|
|
529
574
|
for (; n >= 0 && t[n] === ""; n--) ;
|
|
530
575
|
return e > n ? [] : t.slice(e, n - e + 1);
|
|
531
576
|
}
|
|
532
|
-
function
|
|
533
|
-
t =
|
|
534
|
-
let n =
|
|
577
|
+
function Mt(t, e) {
|
|
578
|
+
t = Dt(t).slice(1), e = Dt(e).slice(1);
|
|
579
|
+
let n = yn(t.split("/")), r = yn(e.split("/")), s = Math.min(n.length, r.length), o = s;
|
|
535
580
|
for (let a = 0; a < s; a++) if (n[a] !== r[a]) {
|
|
536
581
|
o = a;
|
|
537
582
|
break;
|
|
@@ -540,31 +585,31 @@ function mt(t, e) {
|
|
|
540
585
|
for (let a = o; a < n.length; a++) i.push("..");
|
|
541
586
|
return i = i.concat(r.slice(o)), i.join("/");
|
|
542
587
|
}
|
|
543
|
-
function
|
|
544
|
-
let n =
|
|
588
|
+
function ye(t, e) {
|
|
589
|
+
let n = $r(t)[2];
|
|
545
590
|
return e && n.slice(e.length * -1) === e && (n = n.slice(0, n.length - e.length)), n;
|
|
546
591
|
}
|
|
547
|
-
var
|
|
592
|
+
var L;
|
|
548
593
|
(function(t) {
|
|
549
594
|
t[t.PENDING = 0] = "PENDING";
|
|
550
595
|
let n = 1;
|
|
551
596
|
t[t.RESOLVED = n] = "RESOLVED";
|
|
552
597
|
let r = 2;
|
|
553
598
|
t[t.REJECTED = r] = "REJECTED";
|
|
554
|
-
})(
|
|
555
|
-
function
|
|
556
|
-
return new
|
|
599
|
+
})(L || (L = {}));
|
|
600
|
+
function R(t) {
|
|
601
|
+
return new A((e) => {
|
|
557
602
|
e(t);
|
|
558
603
|
});
|
|
559
604
|
}
|
|
560
|
-
function
|
|
561
|
-
return new
|
|
605
|
+
function V(t) {
|
|
606
|
+
return new A((e, n) => {
|
|
562
607
|
n(t);
|
|
563
608
|
});
|
|
564
609
|
}
|
|
565
|
-
var
|
|
610
|
+
var A = class {
|
|
566
611
|
constructor(e) {
|
|
567
|
-
|
|
612
|
+
A.prototype.__init.call(this), A.prototype.__init2.call(this), A.prototype.__init3.call(this), A.prototype.__init4.call(this), this._state = L.PENDING, this._handlers = [];
|
|
568
613
|
try {
|
|
569
614
|
e(this._resolve, this._reject);
|
|
570
615
|
} catch (n) {
|
|
@@ -572,7 +617,7 @@ var I = class {
|
|
|
572
617
|
}
|
|
573
618
|
}
|
|
574
619
|
then(e, n) {
|
|
575
|
-
return new
|
|
620
|
+
return new A((r, s) => {
|
|
576
621
|
this._handlers.push([false, (o) => {
|
|
577
622
|
if (!e) r(o);
|
|
578
623
|
else try {
|
|
@@ -594,7 +639,7 @@ var I = class {
|
|
|
594
639
|
return this.then((n) => n, e);
|
|
595
640
|
}
|
|
596
641
|
finally(e) {
|
|
597
|
-
return new
|
|
642
|
+
return new A((n, r) => {
|
|
598
643
|
let s, o;
|
|
599
644
|
return this.then((i) => {
|
|
600
645
|
o = false, s = i, e && e();
|
|
@@ -611,18 +656,18 @@ var I = class {
|
|
|
611
656
|
}
|
|
612
657
|
__init() {
|
|
613
658
|
this._resolve = (e) => {
|
|
614
|
-
this._setResult(
|
|
659
|
+
this._setResult(L.RESOLVED, e);
|
|
615
660
|
};
|
|
616
661
|
}
|
|
617
662
|
__init2() {
|
|
618
663
|
this._reject = (e) => {
|
|
619
|
-
this._setResult(
|
|
664
|
+
this._setResult(L.REJECTED, e);
|
|
620
665
|
};
|
|
621
666
|
}
|
|
622
667
|
__init3() {
|
|
623
668
|
this._setResult = (e, n) => {
|
|
624
|
-
if (this._state ===
|
|
625
|
-
if (
|
|
669
|
+
if (this._state === L.PENDING) {
|
|
670
|
+
if (P(n)) {
|
|
626
671
|
n.then(this._resolve, this._reject);
|
|
627
672
|
return;
|
|
628
673
|
}
|
|
@@ -632,15 +677,15 @@ var I = class {
|
|
|
632
677
|
}
|
|
633
678
|
__init4() {
|
|
634
679
|
this._executeHandlers = () => {
|
|
635
|
-
if (this._state ===
|
|
680
|
+
if (this._state === L.PENDING) return;
|
|
636
681
|
let e = this._handlers.slice();
|
|
637
682
|
this._handlers = [], e.forEach((n) => {
|
|
638
|
-
n[0] || (this._state ===
|
|
683
|
+
n[0] || (this._state === L.RESOLVED && n[1](this._value), this._state === L.REJECTED && n[2](this._value), n[0] = true);
|
|
639
684
|
});
|
|
640
685
|
};
|
|
641
686
|
}
|
|
642
687
|
};
|
|
643
|
-
function
|
|
688
|
+
function Pt(t) {
|
|
644
689
|
let e = [];
|
|
645
690
|
function n() {
|
|
646
691
|
return t === void 0 || e.length < t;
|
|
@@ -649,31 +694,31 @@ function gt(t) {
|
|
|
649
694
|
return e.splice(e.indexOf(i), 1)[0];
|
|
650
695
|
}
|
|
651
696
|
function s(i) {
|
|
652
|
-
if (!n()) return
|
|
697
|
+
if (!n()) return V(new b("Not adding Promise because buffer limit was reached."));
|
|
653
698
|
let a = i();
|
|
654
699
|
return e.indexOf(a) === -1 && e.push(a), a.then(() => r(a)).then(null, () => r(a).then(null, () => {
|
|
655
700
|
})), a;
|
|
656
701
|
}
|
|
657
702
|
function o(i) {
|
|
658
|
-
return new
|
|
703
|
+
return new A((a, c) => {
|
|
659
704
|
let u = e.length;
|
|
660
705
|
if (!u) return a(true);
|
|
661
|
-
let
|
|
706
|
+
let l = setTimeout(() => {
|
|
662
707
|
i && i > 0 && a(false);
|
|
663
708
|
}, i);
|
|
664
|
-
e.forEach((
|
|
665
|
-
|
|
666
|
-
--u || (clearTimeout(
|
|
709
|
+
e.forEach((p) => {
|
|
710
|
+
R(p).then(() => {
|
|
711
|
+
--u || (clearTimeout(l), a(true));
|
|
667
712
|
}, c);
|
|
668
713
|
});
|
|
669
714
|
});
|
|
670
715
|
}
|
|
671
716
|
return { $: e, add: s, drain: o };
|
|
672
717
|
}
|
|
673
|
-
function
|
|
718
|
+
function Tn(t, e = false) {
|
|
674
719
|
return !(e || t && !t.startsWith("/") && !t.match(/^[A-Z]:/) && !t.startsWith(".") && !t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//)) && t !== void 0 && !t.includes("node_modules/");
|
|
675
720
|
}
|
|
676
|
-
function
|
|
721
|
+
function In(t) {
|
|
677
722
|
let e = /^\s*[-]{4,}$/, n = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
|
|
678
723
|
return (r) => {
|
|
679
724
|
let s = r.match(n);
|
|
@@ -681,32 +726,32 @@ function rn(t) {
|
|
|
681
726
|
let o, i, a, c, u;
|
|
682
727
|
if (s[1]) {
|
|
683
728
|
a = s[1];
|
|
684
|
-
let
|
|
685
|
-
if (a[
|
|
686
|
-
o = a.slice(0,
|
|
687
|
-
let
|
|
688
|
-
|
|
729
|
+
let m = a.lastIndexOf(".");
|
|
730
|
+
if (a[m - 1] === "." && m--, m > 0) {
|
|
731
|
+
o = a.slice(0, m), i = a.slice(m + 1);
|
|
732
|
+
let d = o.indexOf(".Module");
|
|
733
|
+
d > 0 && (a = a.slice(d + 1), o = o.slice(0, d));
|
|
689
734
|
}
|
|
690
735
|
c = void 0;
|
|
691
736
|
}
|
|
692
|
-
i && (c = o, u = i), i === "<anonymous>" && (u = void 0, a = void 0), a === void 0 && (u = u ||
|
|
693
|
-
let
|
|
694
|
-
return
|
|
737
|
+
i && (c = o, u = i), i === "<anonymous>" && (u = void 0, a = void 0), a === void 0 && (u = u || Me, a = c ? `${c}.${u}` : u);
|
|
738
|
+
let l = s[2] && s[2].startsWith("file://") ? s[2].slice(7) : s[2], p = s[5] === "native";
|
|
739
|
+
return l && l.match(/\/[A-Z]:/) && (l = l.slice(1)), !l && s[5] && !p && (l = s[5]), { filename: l, module: t ? t(l) : void 0, function: a, lineno: parseInt(s[3], 10) || void 0, colno: parseInt(s[4], 10) || void 0, in_app: Tn(l, p) };
|
|
695
740
|
}
|
|
696
741
|
if (r.match(e)) return { filename: r };
|
|
697
742
|
};
|
|
698
743
|
}
|
|
699
|
-
function
|
|
700
|
-
return [90,
|
|
744
|
+
function kt(t) {
|
|
745
|
+
return [90, In(t)];
|
|
701
746
|
}
|
|
702
|
-
function
|
|
747
|
+
function j(t, e = []) {
|
|
703
748
|
return [t, e];
|
|
704
749
|
}
|
|
705
|
-
function
|
|
750
|
+
function Ft(t, e) {
|
|
706
751
|
let [n, r] = t;
|
|
707
752
|
return [n, [...r, e]];
|
|
708
753
|
}
|
|
709
|
-
function
|
|
754
|
+
function je(t, e) {
|
|
710
755
|
let n = t[1];
|
|
711
756
|
for (let r of n) {
|
|
712
757
|
let s = r[0].type;
|
|
@@ -714,13 +759,13 @@ function Pe(t, e) {
|
|
|
714
759
|
}
|
|
715
760
|
return false;
|
|
716
761
|
}
|
|
717
|
-
function
|
|
718
|
-
return
|
|
762
|
+
function Lt(t) {
|
|
763
|
+
return h.__SENTRY__ && h.__SENTRY__.encodePolyfill ? h.__SENTRY__.encodePolyfill(t) : new TextEncoder().encode(t);
|
|
719
764
|
}
|
|
720
|
-
function
|
|
765
|
+
function Ut(t) {
|
|
721
766
|
let [e, n] = t, r = JSON.stringify(e);
|
|
722
767
|
function s(o) {
|
|
723
|
-
typeof r == "string" ? r = typeof o == "string" ? r + o : [
|
|
768
|
+
typeof r == "string" ? r = typeof o == "string" ? r + o : [Lt(r), o] : r.push(typeof o == "string" ? Lt(o) : o);
|
|
724
769
|
}
|
|
725
770
|
for (let o of n) {
|
|
726
771
|
let [i, a] = o;
|
|
@@ -732,127 +777,127 @@ ${JSON.stringify(i)}
|
|
|
732
777
|
try {
|
|
733
778
|
c = JSON.stringify(a);
|
|
734
779
|
} catch {
|
|
735
|
-
c = JSON.stringify(
|
|
780
|
+
c = JSON.stringify(v(a));
|
|
736
781
|
}
|
|
737
782
|
s(c);
|
|
738
783
|
}
|
|
739
784
|
}
|
|
740
|
-
return typeof r == "string" ? r :
|
|
785
|
+
return typeof r == "string" ? r : Hr(r);
|
|
741
786
|
}
|
|
742
|
-
function
|
|
787
|
+
function Hr(t) {
|
|
743
788
|
let e = t.reduce((s, o) => s + o.length, 0), n = new Uint8Array(e), r = 0;
|
|
744
789
|
for (let s of t) n.set(s, r), r += s.length;
|
|
745
790
|
return n;
|
|
746
791
|
}
|
|
747
|
-
function
|
|
748
|
-
let e = typeof t.data == "string" ?
|
|
749
|
-
return [
|
|
792
|
+
function $t(t) {
|
|
793
|
+
let e = typeof t.data == "string" ? Lt(t.data) : t.data;
|
|
794
|
+
return [y({ type: "attachment", length: e.length, filename: t.filename, content_type: t.contentType, attachment_type: t.attachmentType }), e];
|
|
750
795
|
}
|
|
751
|
-
var
|
|
752
|
-
function
|
|
753
|
-
return
|
|
796
|
+
var Br = { session: "session", sessions: "session", attachment: "attachment", transaction: "transaction", event: "error", client_report: "internal", user_report: "default", profile: "profile", profile_chunk: "profile", replay_event: "replay", replay_recording: "replay", check_in: "monitor", feedback: "feedback", span: "span", statsd: "metric_bucket" };
|
|
797
|
+
function Ge(t) {
|
|
798
|
+
return Br[t];
|
|
754
799
|
}
|
|
755
|
-
function
|
|
800
|
+
function qe(t) {
|
|
756
801
|
if (!t || !t.sdk) return;
|
|
757
802
|
let { name: e, version: n } = t.sdk;
|
|
758
803
|
return { name: e, version: n };
|
|
759
804
|
}
|
|
760
|
-
function
|
|
805
|
+
function Ht(t, e, n, r) {
|
|
761
806
|
let s = t.sdkProcessingMetadata && t.sdkProcessingMetadata.dynamicSamplingContext;
|
|
762
|
-
return { event_id: t.event_id, sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...e && { sdk: e }, ...!!n && r && { dsn:
|
|
807
|
+
return { event_id: t.event_id, sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...e && { sdk: e }, ...!!n && r && { dsn: B(r) }, ...s && { trace: y({ ...s }) } };
|
|
763
808
|
}
|
|
764
|
-
function
|
|
809
|
+
function xn(t, e = Date.now()) {
|
|
765
810
|
let n = parseInt(`${t}`, 10);
|
|
766
811
|
if (!isNaN(n)) return n * 1e3;
|
|
767
812
|
let r = Date.parse(`${t}`);
|
|
768
813
|
return isNaN(r) ? 6e4 : r - e;
|
|
769
814
|
}
|
|
770
|
-
function
|
|
815
|
+
function An(t, e) {
|
|
771
816
|
return t[e] || t.all || 0;
|
|
772
817
|
}
|
|
773
|
-
function
|
|
774
|
-
return
|
|
818
|
+
function Bt(t, e, n = Date.now()) {
|
|
819
|
+
return An(t, e) > n;
|
|
775
820
|
}
|
|
776
|
-
function
|
|
821
|
+
function jt(t, { statusCode: e, headers: n }, r = Date.now()) {
|
|
777
822
|
let s = { ...t }, o = n && n["x-sentry-rate-limits"], i = n && n["retry-after"];
|
|
778
823
|
if (o) for (let a of o.trim().split(",")) {
|
|
779
|
-
let [c, u, , ,
|
|
780
|
-
if (!u) s.all = r +
|
|
781
|
-
else for (let
|
|
824
|
+
let [c, u, , , l] = a.split(":", 5), p = parseInt(c, 10), m = (isNaN(p) ? 60 : p) * 1e3;
|
|
825
|
+
if (!u) s.all = r + m;
|
|
826
|
+
else for (let d of u.split(";")) d === "metric_bucket" ? (!l || l.split(";").includes("custom")) && (s[d] = r + m) : s[d] = r + m;
|
|
782
827
|
}
|
|
783
|
-
else i ? s.all = r +
|
|
828
|
+
else i ? s.all = r + xn(i, r) : e === 429 && (s.all = r + 60 * 1e3);
|
|
784
829
|
return s;
|
|
785
830
|
}
|
|
786
|
-
function
|
|
831
|
+
function Gt(t, e) {
|
|
787
832
|
return t(e.stack || "", 1);
|
|
788
833
|
}
|
|
789
|
-
function
|
|
790
|
-
let n = { type: e.name || e.constructor.name, value: e.message }, r =
|
|
834
|
+
function bn(t, e) {
|
|
835
|
+
let n = { type: e.name || e.constructor.name, value: e.message }, r = Gt(t, e);
|
|
791
836
|
return r.length && (n.stacktrace = { frames: r }), n;
|
|
792
837
|
}
|
|
793
|
-
function
|
|
838
|
+
function jr(t) {
|
|
794
839
|
for (let e in t) if (Object.prototype.hasOwnProperty.call(t, e)) {
|
|
795
840
|
let n = t[e];
|
|
796
841
|
if (n instanceof Error) return n;
|
|
797
842
|
}
|
|
798
843
|
}
|
|
799
|
-
function
|
|
844
|
+
function Gr(t) {
|
|
800
845
|
if ("name" in t && typeof t.name == "string") {
|
|
801
846
|
let r = `'${t.name}' captured as exception`;
|
|
802
847
|
return "message" in t && typeof t.message == "string" && (r += ` with message '${t.message}'`), r;
|
|
803
848
|
} else if ("message" in t && typeof t.message == "string") return t.message;
|
|
804
|
-
let e =
|
|
805
|
-
if (
|
|
806
|
-
let n =
|
|
849
|
+
let e = me(t);
|
|
850
|
+
if (_t(t)) return `Event \`ErrorEvent\` captured as exception with message \`${t.message}\``;
|
|
851
|
+
let n = qr(t);
|
|
807
852
|
return `${n && n !== "Object" ? `'${n}'` : "Object"} captured as exception with keys: ${e}`;
|
|
808
853
|
}
|
|
809
|
-
function
|
|
854
|
+
function qr(t) {
|
|
810
855
|
try {
|
|
811
856
|
let e = Object.getPrototypeOf(t);
|
|
812
857
|
return e ? e.constructor.name : void 0;
|
|
813
858
|
} catch {
|
|
814
859
|
}
|
|
815
860
|
}
|
|
816
|
-
function
|
|
817
|
-
if (
|
|
818
|
-
if (e.synthetic = true,
|
|
819
|
-
let o = t && t.getOptions().normalizeDepth, i = { __serialized__:
|
|
861
|
+
function zr(t, e, n, r) {
|
|
862
|
+
if (z(n)) return [n, void 0];
|
|
863
|
+
if (e.synthetic = true, O(n)) {
|
|
864
|
+
let o = t && t.getOptions().normalizeDepth, i = { __serialized__: ae(n, o) }, a = jr(n);
|
|
820
865
|
if (a) return [a, i];
|
|
821
|
-
let c =
|
|
866
|
+
let c = Gr(n), u = r && r.syntheticException || new Error(c);
|
|
822
867
|
return u.message = c, [u, i];
|
|
823
868
|
}
|
|
824
869
|
let s = r && r.syntheticException || new Error(n);
|
|
825
870
|
return s.message = `${n}`, [s, void 0];
|
|
826
871
|
}
|
|
827
|
-
function
|
|
828
|
-
let o = r && r.data && r.data.mechanism || { handled: true, type: "generic" }, [i, a] =
|
|
829
|
-
return a && (c.extra = a),
|
|
872
|
+
function qt(t, e, n, r) {
|
|
873
|
+
let o = r && r.data && r.data.mechanism || { handled: true, type: "generic" }, [i, a] = zr(t, o, n, r), c = { exception: { values: [bn(e, i)] } };
|
|
874
|
+
return a && (c.extra = a), Ee(c, void 0, void 0), J(c, o), { ...c, event_id: r && r.event_id };
|
|
830
875
|
}
|
|
831
|
-
function
|
|
876
|
+
function zt(t, e, n = "info", r, s) {
|
|
832
877
|
let o = { event_id: r && r.event_id, level: n };
|
|
833
878
|
if (s && r && r.syntheticException) {
|
|
834
|
-
let i =
|
|
879
|
+
let i = Gt(t, r.syntheticException);
|
|
835
880
|
i.length && (o.exception = { values: [{ value: e, stacktrace: { frames: i } }] });
|
|
836
881
|
}
|
|
837
|
-
if (
|
|
882
|
+
if (se(e)) {
|
|
838
883
|
let { __sentry_template_string__: i, __sentry_template_values__: a } = e;
|
|
839
884
|
return o.logentry = { message: i, params: a }, o;
|
|
840
885
|
}
|
|
841
886
|
return o.message = e, o;
|
|
842
887
|
}
|
|
843
|
-
function
|
|
844
|
-
return { traceId:
|
|
888
|
+
function ze() {
|
|
889
|
+
return { traceId: x(), spanId: x().substring(16) };
|
|
845
890
|
}
|
|
846
891
|
var _ = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__;
|
|
847
|
-
function
|
|
848
|
-
return
|
|
892
|
+
function G() {
|
|
893
|
+
return Te(h), h;
|
|
849
894
|
}
|
|
850
|
-
function
|
|
895
|
+
function Te(t) {
|
|
851
896
|
let e = t.__SENTRY__ = t.__SENTRY__ || {};
|
|
852
|
-
return e.version = e.version ||
|
|
897
|
+
return e.version = e.version || $, e[$] = e[$] || {};
|
|
853
898
|
}
|
|
854
|
-
function
|
|
855
|
-
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 ||
|
|
899
|
+
function Ie(t, e = {}) {
|
|
900
|
+
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 || _e(), 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 : x()), 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;
|
|
856
901
|
else if (typeof e.duration == "number") t.duration = e.duration;
|
|
857
902
|
else {
|
|
858
903
|
let n = t.timestamp - t.started;
|
|
@@ -860,21 +905,21 @@ function le(t, e = {}) {
|
|
|
860
905
|
}
|
|
861
906
|
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);
|
|
862
907
|
}
|
|
863
|
-
var
|
|
864
|
-
function
|
|
865
|
-
e ?
|
|
908
|
+
var Yt = "_sentrySpan";
|
|
909
|
+
function Jt(t, e) {
|
|
910
|
+
e ? Y(t, Yt, e) : delete t[Yt];
|
|
866
911
|
}
|
|
867
|
-
function
|
|
868
|
-
return t[
|
|
912
|
+
function W(t) {
|
|
913
|
+
return t[Yt];
|
|
869
914
|
}
|
|
870
|
-
var
|
|
871
|
-
var
|
|
915
|
+
var Jr = 100;
|
|
916
|
+
var xe = class {
|
|
872
917
|
constructor() {
|
|
873
|
-
this._notifyingListeners = false, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext =
|
|
918
|
+
this._notifyingListeners = false, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = ze();
|
|
874
919
|
}
|
|
875
920
|
clone() {
|
|
876
|
-
let e = new
|
|
877
|
-
return e._breadcrumbs = [...this._breadcrumbs], e._tags = { ...this._tags }, e._extra = { ...this._extra }, e._contexts = { ...this._contexts }, e._user = this._user, e._level = this._level, e._session = this._session, e._transactionName = this._transactionName, e._fingerprint = this._fingerprint, e._eventProcessors = [...this._eventProcessors], e._requestSession = this._requestSession, e._attachments = [...this._attachments], e._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, e._propagationContext = { ...this._propagationContext }, e._client = this._client, e._lastEventId = this._lastEventId,
|
|
921
|
+
let e = new xe();
|
|
922
|
+
return e._breadcrumbs = [...this._breadcrumbs], e._tags = { ...this._tags }, e._extra = { ...this._extra }, e._contexts = { ...this._contexts }, e._user = this._user, e._level = this._level, e._session = this._session, e._transactionName = this._transactionName, e._fingerprint = this._fingerprint, e._eventProcessors = [...this._eventProcessors], e._requestSession = this._requestSession, e._attachments = [...this._attachments], e._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, e._propagationContext = { ...this._propagationContext }, e._client = this._client, e._lastEventId = this._lastEventId, Jt(e, W(this)), e;
|
|
878
923
|
}
|
|
879
924
|
setClient(e) {
|
|
880
925
|
this._client = e;
|
|
@@ -895,7 +940,7 @@ var pe = class {
|
|
|
895
940
|
return this._eventProcessors.push(e), this;
|
|
896
941
|
}
|
|
897
942
|
setUser(e) {
|
|
898
|
-
return this._user = e || { email: void 0, id: void 0, ip_address: void 0, username: void 0 }, this._session &&
|
|
943
|
+
return this._user = e || { email: void 0, id: void 0, ip_address: void 0, username: void 0 }, this._session && Ie(this._session, { user: e }), this._notifyScopeListeners(), this;
|
|
899
944
|
}
|
|
900
945
|
getUser() {
|
|
901
946
|
return this._user;
|
|
@@ -938,16 +983,16 @@ var pe = class {
|
|
|
938
983
|
}
|
|
939
984
|
update(e) {
|
|
940
985
|
if (!e) return this;
|
|
941
|
-
let n = typeof e == "function" ? e(this) : e, [r, s] = n instanceof C ? [n.getScopeData(), n.getRequestSession()] :
|
|
942
|
-
return this._tags = { ...this._tags, ...o }, this._extra = { ...this._extra, ...i }, this._contexts = { ...this._contexts, ...c }, a && Object.keys(a).length && (this._user = a), u && (this._level = u),
|
|
986
|
+
let n = typeof e == "function" ? e(this) : e, [r, s] = n instanceof C ? [n.getScopeData(), n.getRequestSession()] : O(n) ? [e, e.requestSession] : [], { tags: o, extra: i, user: a, contexts: c, level: u, fingerprint: l = [], propagationContext: p } = r || {};
|
|
987
|
+
return this._tags = { ...this._tags, ...o }, this._extra = { ...this._extra, ...i }, this._contexts = { ...this._contexts, ...c }, a && Object.keys(a).length && (this._user = a), u && (this._level = u), l.length && (this._fingerprint = l), p && (this._propagationContext = p), s && (this._requestSession = s), this;
|
|
943
988
|
}
|
|
944
989
|
clear() {
|
|
945
|
-
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._session = void 0,
|
|
990
|
+
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._session = void 0, Jt(this, void 0), this._attachments = [], this._propagationContext = ze(), this._notifyScopeListeners(), this;
|
|
946
991
|
}
|
|
947
992
|
addBreadcrumb(e, n) {
|
|
948
|
-
let r = typeof n == "number" ? n :
|
|
993
|
+
let r = typeof n == "number" ? n : Jr;
|
|
949
994
|
if (r <= 0) return this;
|
|
950
|
-
let s = { timestamp:
|
|
995
|
+
let s = { timestamp: ie(), ...e }, o = this._breadcrumbs;
|
|
951
996
|
return o.push(s), this._breadcrumbs = o.length > r ? o.slice(-r) : o, this._notifyScopeListeners(), this;
|
|
952
997
|
}
|
|
953
998
|
getLastBreadcrumb() {
|
|
@@ -963,7 +1008,7 @@ var pe = class {
|
|
|
963
1008
|
return this._attachments = [], this;
|
|
964
1009
|
}
|
|
965
1010
|
getScopeData() {
|
|
966
|
-
return { breadcrumbs: this._breadcrumbs, attachments: this._attachments, contexts: this._contexts, tags: this._tags, extra: this._extra, user: this._user, level: this._level, fingerprint: this._fingerprint || [], eventProcessors: this._eventProcessors, propagationContext: this._propagationContext, sdkProcessingMetadata: this._sdkProcessingMetadata, transactionName: this._transactionName, span:
|
|
1011
|
+
return { breadcrumbs: this._breadcrumbs, attachments: this._attachments, contexts: this._contexts, tags: this._tags, extra: this._extra, user: this._user, level: this._level, fingerprint: this._fingerprint || [], eventProcessors: this._eventProcessors, propagationContext: this._propagationContext, sdkProcessingMetadata: this._sdkProcessingMetadata, transactionName: this._transactionName, span: W(this) };
|
|
967
1012
|
}
|
|
968
1013
|
setSDKProcessingMetadata(e) {
|
|
969
1014
|
return this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...e }, this;
|
|
@@ -975,20 +1020,20 @@ var pe = class {
|
|
|
975
1020
|
return this._propagationContext;
|
|
976
1021
|
}
|
|
977
1022
|
captureException(e, n) {
|
|
978
|
-
let r = n && n.event_id ? n.event_id :
|
|
979
|
-
if (!this._client) return
|
|
1023
|
+
let r = n && n.event_id ? n.event_id : x();
|
|
1024
|
+
if (!this._client) return f.warn("No client configured on scope - will not capture exception!"), r;
|
|
980
1025
|
let s = new Error("Sentry syntheticException");
|
|
981
1026
|
return this._client.captureException(e, { originalException: e, syntheticException: s, ...n, event_id: r }, this), r;
|
|
982
1027
|
}
|
|
983
1028
|
captureMessage(e, n, r) {
|
|
984
|
-
let s = r && r.event_id ? r.event_id :
|
|
985
|
-
if (!this._client) return
|
|
1029
|
+
let s = r && r.event_id ? r.event_id : x();
|
|
1030
|
+
if (!this._client) return f.warn("No client configured on scope - will not capture message!"), s;
|
|
986
1031
|
let o = new Error(e);
|
|
987
1032
|
return this._client.captureMessage(e, n, { originalException: e, syntheticException: o, ...r, event_id: s }, this), s;
|
|
988
1033
|
}
|
|
989
1034
|
captureEvent(e, n) {
|
|
990
|
-
let r = n && n.event_id ? n.event_id :
|
|
991
|
-
return this._client ? (this._client.captureEvent(e, { ...n, event_id: r }, this), r) : (
|
|
1035
|
+
let r = n && n.event_id ? n.event_id : x();
|
|
1036
|
+
return this._client ? (this._client.captureEvent(e, { ...n, event_id: r }, this), r) : (f.warn("No client configured on scope - will not capture event!"), r);
|
|
992
1037
|
}
|
|
993
1038
|
_notifyScopeListeners() {
|
|
994
1039
|
this._notifyingListeners || (this._notifyingListeners = true, this._scopeListeners.forEach((e) => {
|
|
@@ -996,14 +1041,14 @@ var pe = class {
|
|
|
996
1041
|
}), this._notifyingListeners = false);
|
|
997
1042
|
}
|
|
998
1043
|
};
|
|
999
|
-
var C =
|
|
1000
|
-
function
|
|
1001
|
-
return
|
|
1044
|
+
var C = xe;
|
|
1045
|
+
function Rn() {
|
|
1046
|
+
return oe("defaultCurrentScope", () => new C());
|
|
1002
1047
|
}
|
|
1003
|
-
function
|
|
1004
|
-
return
|
|
1048
|
+
function Cn() {
|
|
1049
|
+
return oe("defaultIsolationScope", () => new C());
|
|
1005
1050
|
}
|
|
1006
|
-
var
|
|
1051
|
+
var Vt = class {
|
|
1007
1052
|
constructor(e, n) {
|
|
1008
1053
|
let r;
|
|
1009
1054
|
e ? r = e : r = new C();
|
|
@@ -1017,7 +1062,7 @@ var Ot = class {
|
|
|
1017
1062
|
} catch (s) {
|
|
1018
1063
|
throw this._popScope(), s;
|
|
1019
1064
|
}
|
|
1020
|
-
return
|
|
1065
|
+
return P(r) ? r.then((s) => (this._popScope(), s), (s) => {
|
|
1021
1066
|
throw this._popScope(), s;
|
|
1022
1067
|
}) : (this._popScope(), r);
|
|
1023
1068
|
}
|
|
@@ -1044,240 +1089,240 @@ var Ot = class {
|
|
|
1044
1089
|
return this.getStack().length <= 1 ? false : !!this.getStack().pop();
|
|
1045
1090
|
}
|
|
1046
1091
|
};
|
|
1047
|
-
function
|
|
1048
|
-
let t =
|
|
1049
|
-
return e.stack = e.stack || new
|
|
1092
|
+
function ce() {
|
|
1093
|
+
let t = G(), e = Te(t);
|
|
1094
|
+
return e.stack = e.stack || new Vt(Rn(), Cn());
|
|
1050
1095
|
}
|
|
1051
|
-
function
|
|
1052
|
-
return
|
|
1096
|
+
function Vr(t) {
|
|
1097
|
+
return ce().withScope(t);
|
|
1053
1098
|
}
|
|
1054
|
-
function
|
|
1055
|
-
let n =
|
|
1099
|
+
function Wr(t, e) {
|
|
1100
|
+
let n = ce();
|
|
1056
1101
|
return n.withScope(() => (n.getStackTop().scope = t, e(t)));
|
|
1057
1102
|
}
|
|
1058
|
-
function
|
|
1059
|
-
return
|
|
1103
|
+
function Nn(t) {
|
|
1104
|
+
return ce().withScope(() => t(ce().getIsolationScope()));
|
|
1060
1105
|
}
|
|
1061
|
-
function
|
|
1062
|
-
return { withIsolationScope:
|
|
1106
|
+
function On() {
|
|
1107
|
+
return { withIsolationScope: Nn, withScope: Vr, withSetScope: Wr, withSetIsolationScope: (t, e) => Nn(e), getCurrentScope: () => ce().getScope(), getIsolationScope: () => ce().getIsolationScope() };
|
|
1063
1108
|
}
|
|
1064
|
-
function
|
|
1065
|
-
let e =
|
|
1066
|
-
return e.acs ? e.acs :
|
|
1109
|
+
function Ae(t) {
|
|
1110
|
+
let e = Te(t);
|
|
1111
|
+
return e.acs ? e.acs : On();
|
|
1067
1112
|
}
|
|
1068
|
-
function
|
|
1069
|
-
let t =
|
|
1070
|
-
return
|
|
1113
|
+
function Wt() {
|
|
1114
|
+
let t = G();
|
|
1115
|
+
return Ae(t).getCurrentScope();
|
|
1071
1116
|
}
|
|
1072
|
-
function
|
|
1073
|
-
let t =
|
|
1074
|
-
return
|
|
1117
|
+
function K() {
|
|
1118
|
+
let t = G();
|
|
1119
|
+
return Ae(t).getIsolationScope();
|
|
1075
1120
|
}
|
|
1076
|
-
function
|
|
1077
|
-
return
|
|
1121
|
+
function vn() {
|
|
1122
|
+
return oe("globalScope", () => new C());
|
|
1078
1123
|
}
|
|
1079
|
-
function
|
|
1080
|
-
return
|
|
1124
|
+
function wn() {
|
|
1125
|
+
return Wt().getClient();
|
|
1081
1126
|
}
|
|
1082
|
-
var
|
|
1083
|
-
function
|
|
1084
|
-
let e = t[
|
|
1127
|
+
var Kr = "_sentryMetrics";
|
|
1128
|
+
function Dn(t) {
|
|
1129
|
+
let e = t[Kr];
|
|
1085
1130
|
if (!e) return;
|
|
1086
1131
|
let n = {};
|
|
1087
|
-
for (let [, [r, s]] of e) n[r] || (n[r] = []), n[r].push(
|
|
1132
|
+
for (let [, [r, s]] of e) n[r] || (n[r] = []), n[r].push(y(s));
|
|
1088
1133
|
return n;
|
|
1089
1134
|
}
|
|
1090
|
-
var
|
|
1091
|
-
var
|
|
1092
|
-
var
|
|
1093
|
-
var
|
|
1094
|
-
var
|
|
1095
|
-
function
|
|
1096
|
-
let { spanId: e, traceId: n } = t.spanContext(), { parent_span_id: r } =
|
|
1097
|
-
return
|
|
1135
|
+
var Mn = "sentry.source";
|
|
1136
|
+
var Pn = "sentry.sample_rate";
|
|
1137
|
+
var kn = "sentry.op";
|
|
1138
|
+
var Ln = "sentry.origin";
|
|
1139
|
+
var Zr = 1;
|
|
1140
|
+
function Ye(t) {
|
|
1141
|
+
let { spanId: e, traceId: n } = t.spanContext(), { parent_span_id: r } = ue(t);
|
|
1142
|
+
return y({ parent_span_id: r, span_id: e, trace_id: n });
|
|
1098
1143
|
}
|
|
1099
|
-
function
|
|
1100
|
-
return typeof t == "number" ?
|
|
1144
|
+
function Fn(t) {
|
|
1145
|
+
return typeof t == "number" ? Un(t) : Array.isArray(t) ? t[0] + t[1] / 1e9 : t instanceof Date ? Un(t.getTime()) : _e();
|
|
1101
1146
|
}
|
|
1102
|
-
function
|
|
1147
|
+
function Un(t) {
|
|
1103
1148
|
return t > 9999999999 ? t / 1e3 : t;
|
|
1104
1149
|
}
|
|
1105
|
-
function
|
|
1106
|
-
if (
|
|
1150
|
+
function ue(t) {
|
|
1151
|
+
if (Qr(t)) return t.getSpanJSON();
|
|
1107
1152
|
try {
|
|
1108
1153
|
let { spanId: e, traceId: n } = t.spanContext();
|
|
1109
|
-
if (
|
|
1154
|
+
if (Xr(t)) {
|
|
1110
1155
|
let { attributes: r, startTime: s, name: o, endTime: i, parentSpanId: a, status: c } = t;
|
|
1111
|
-
return
|
|
1156
|
+
return y({ span_id: e, trace_id: n, data: r, description: o, parent_span_id: a, start_timestamp: Fn(s), timestamp: Fn(i) || void 0, status: es(c), op: r[kn], origin: r[Ln], _metrics_summary: Dn(t) });
|
|
1112
1157
|
}
|
|
1113
1158
|
return { span_id: e, trace_id: n };
|
|
1114
1159
|
} catch {
|
|
1115
1160
|
return {};
|
|
1116
1161
|
}
|
|
1117
1162
|
}
|
|
1118
|
-
function
|
|
1163
|
+
function Xr(t) {
|
|
1119
1164
|
let e = t;
|
|
1120
1165
|
return !!e.attributes && !!e.startTime && !!e.name && !!e.endTime && !!e.status;
|
|
1121
1166
|
}
|
|
1122
|
-
function
|
|
1167
|
+
function Qr(t) {
|
|
1123
1168
|
return typeof t.getSpanJSON == "function";
|
|
1124
1169
|
}
|
|
1125
|
-
function
|
|
1170
|
+
function $n(t) {
|
|
1126
1171
|
let { traceFlags: e } = t.spanContext();
|
|
1127
|
-
return e ===
|
|
1172
|
+
return e === Zr;
|
|
1128
1173
|
}
|
|
1129
|
-
function
|
|
1174
|
+
function es(t) {
|
|
1130
1175
|
if (!(!t || t.code === 0)) return t.code === 1 ? "ok" : t.message || "unknown_error";
|
|
1131
1176
|
}
|
|
1132
|
-
var
|
|
1133
|
-
function
|
|
1134
|
-
return t[
|
|
1177
|
+
var ts = "_sentryRootSpan";
|
|
1178
|
+
function q(t) {
|
|
1179
|
+
return t[ts] || t;
|
|
1135
1180
|
}
|
|
1136
|
-
function
|
|
1137
|
-
let t =
|
|
1138
|
-
return e.getActiveSpan ? e.getActiveSpan() :
|
|
1181
|
+
function Hn() {
|
|
1182
|
+
let t = G(), e = Ae(t);
|
|
1183
|
+
return e.getActiveSpan ? e.getActiveSpan() : W(Wt());
|
|
1139
1184
|
}
|
|
1140
|
-
var
|
|
1141
|
-
function
|
|
1142
|
-
|
|
1185
|
+
var Bn = false;
|
|
1186
|
+
function jn() {
|
|
1187
|
+
Bn || (Bn = true, Ot(Kt), vt(Kt));
|
|
1143
1188
|
}
|
|
1144
|
-
function
|
|
1145
|
-
let t =
|
|
1189
|
+
function Kt() {
|
|
1190
|
+
let t = Hn(), e = t && q(t);
|
|
1146
1191
|
if (e) {
|
|
1147
1192
|
let n = "internal_error";
|
|
1148
|
-
_ &&
|
|
1193
|
+
_ && f.log(`[Tracing] Root span: ${n} -> Global error occured`), e.setStatus({ code: 2, message: n });
|
|
1149
1194
|
}
|
|
1150
1195
|
}
|
|
1151
|
-
|
|
1152
|
-
var
|
|
1153
|
-
var
|
|
1154
|
-
function
|
|
1155
|
-
let n = e.getOptions(), { publicKey: r } = e.getDsn() || {}, s =
|
|
1196
|
+
Kt.tag = "sentry_tracingErrorCallback";
|
|
1197
|
+
var Je = "production";
|
|
1198
|
+
var ns = "_frozenDsc";
|
|
1199
|
+
function be(t, e) {
|
|
1200
|
+
let n = e.getOptions(), { publicKey: r } = e.getDsn() || {}, s = y({ environment: n.environment || Je, release: n.release, public_key: r, trace_id: t });
|
|
1156
1201
|
return e.emit("createDsc", s), s;
|
|
1157
1202
|
}
|
|
1158
|
-
function
|
|
1159
|
-
let e =
|
|
1203
|
+
function Ve(t) {
|
|
1204
|
+
let e = wn();
|
|
1160
1205
|
if (!e) return {};
|
|
1161
|
-
let n =
|
|
1206
|
+
let n = be(ue(t).trace_id || "", e), r = q(t);
|
|
1162
1207
|
if (!r) return n;
|
|
1163
|
-
let s = r[
|
|
1208
|
+
let s = r[ns];
|
|
1164
1209
|
if (s) return s;
|
|
1165
|
-
let o =
|
|
1210
|
+
let o = ue(r), i = o.data || {}, a = i[Pn];
|
|
1166
1211
|
a != null && (n.sample_rate = `${a}`);
|
|
1167
|
-
let c = i[
|
|
1168
|
-
return c && c !== "url" && (n.transaction = o.description), n.sampled = String(
|
|
1212
|
+
let c = i[Mn];
|
|
1213
|
+
return c && c !== "url" && (n.transaction = o.description), n.sampled = String($n(r)), e.emit("createDsc", n), n;
|
|
1169
1214
|
}
|
|
1170
|
-
function
|
|
1215
|
+
function Gn(t) {
|
|
1171
1216
|
if (typeof t == "boolean") return Number(t);
|
|
1172
1217
|
let e = typeof t == "string" ? parseFloat(t) : t;
|
|
1173
1218
|
if (typeof e != "number" || isNaN(e) || e < 0 || e > 1) {
|
|
1174
|
-
_ &&
|
|
1219
|
+
_ && f.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)}.`);
|
|
1175
1220
|
return;
|
|
1176
1221
|
}
|
|
1177
1222
|
return e;
|
|
1178
1223
|
}
|
|
1179
|
-
function
|
|
1224
|
+
function rs(t, e) {
|
|
1180
1225
|
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;
|
|
1181
1226
|
}
|
|
1182
|
-
function
|
|
1183
|
-
let s =
|
|
1184
|
-
return
|
|
1227
|
+
function qn(t, e, n, r) {
|
|
1228
|
+
let s = qe(n), o = { sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...s && { sdk: s }, ...!!r && e && { dsn: B(e) } }, i = "aggregates" in t ? [{ type: "sessions" }, t] : [{ type: "session" }, t.toJSON()];
|
|
1229
|
+
return j(o, [i]);
|
|
1185
1230
|
}
|
|
1186
|
-
function
|
|
1187
|
-
let s =
|
|
1188
|
-
|
|
1189
|
-
let i =
|
|
1190
|
-
return delete t.sdkProcessingMetadata,
|
|
1231
|
+
function zn(t, e, n, r) {
|
|
1232
|
+
let s = qe(n), o = t.type && t.type !== "replay_event" ? t.type : "event";
|
|
1233
|
+
rs(t, n && n.sdk);
|
|
1234
|
+
let i = Ht(t, s, r, e);
|
|
1235
|
+
return delete t.sdkProcessingMetadata, j(i, [[{ type: o }, t]]);
|
|
1191
1236
|
}
|
|
1192
|
-
function
|
|
1193
|
-
return new
|
|
1237
|
+
function We(t, e, n, r = 0) {
|
|
1238
|
+
return new A((s, o) => {
|
|
1194
1239
|
let i = t[r];
|
|
1195
1240
|
if (e === null || typeof i != "function") s(e);
|
|
1196
1241
|
else {
|
|
1197
1242
|
let a = i({ ...e }, n);
|
|
1198
|
-
_ && i.id && a === null &&
|
|
1243
|
+
_ && i.id && a === null && f.log(`Event processor "${i.id}" dropped event`), P(a) ? a.then((c) => We(t, c, n, r + 1).then(s)).then(null, o) : We(t, a, n, r + 1).then(s).then(null, o);
|
|
1199
1244
|
}
|
|
1200
1245
|
});
|
|
1201
1246
|
}
|
|
1202
|
-
function
|
|
1247
|
+
function Yn(t, e) {
|
|
1203
1248
|
let { fingerprint: n, span: r, breadcrumbs: s, sdkProcessingMetadata: o } = e;
|
|
1204
|
-
|
|
1249
|
+
ss(t, e), r && as(t, r), cs(t, n), os(t, s), is(t, o);
|
|
1205
1250
|
}
|
|
1206
|
-
function
|
|
1207
|
-
let { extra: n, tags: r, user: s, contexts: o, level: i, sdkProcessingMetadata: a, breadcrumbs: c, fingerprint: u, eventProcessors:
|
|
1208
|
-
|
|
1251
|
+
function Zt(t, e) {
|
|
1252
|
+
let { extra: n, tags: r, user: s, contexts: o, level: i, sdkProcessingMetadata: a, breadcrumbs: c, fingerprint: u, eventProcessors: l, attachments: p, propagationContext: m, transactionName: d, span: g } = e;
|
|
1253
|
+
Re(t, "extra", n), Re(t, "tags", r), Re(t, "user", s), Re(t, "contexts", o), Re(t, "sdkProcessingMetadata", a), i && (t.level = i), d && (t.transactionName = d), g && (t.span = g), c.length && (t.breadcrumbs = [...t.breadcrumbs, ...c]), u.length && (t.fingerprint = [...t.fingerprint, ...u]), l.length && (t.eventProcessors = [...t.eventProcessors, ...l]), p.length && (t.attachments = [...t.attachments, ...p]), t.propagationContext = { ...t.propagationContext, ...m };
|
|
1209
1254
|
}
|
|
1210
|
-
function
|
|
1255
|
+
function Re(t, e, n) {
|
|
1211
1256
|
if (n && Object.keys(n).length) {
|
|
1212
1257
|
t[e] = { ...t[e] };
|
|
1213
1258
|
for (let r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[e][r] = n[r]);
|
|
1214
1259
|
}
|
|
1215
1260
|
}
|
|
1216
|
-
function
|
|
1217
|
-
let { extra: n, tags: r, user: s, contexts: o, level: i, transactionName: a } = e, c =
|
|
1261
|
+
function ss(t, e) {
|
|
1262
|
+
let { extra: n, tags: r, user: s, contexts: o, level: i, transactionName: a } = e, c = y(n);
|
|
1218
1263
|
c && Object.keys(c).length && (t.extra = { ...c, ...t.extra });
|
|
1219
|
-
let u =
|
|
1264
|
+
let u = y(r);
|
|
1220
1265
|
u && Object.keys(u).length && (t.tags = { ...u, ...t.tags });
|
|
1221
|
-
let
|
|
1222
|
-
|
|
1223
|
-
let
|
|
1224
|
-
|
|
1266
|
+
let l = y(s);
|
|
1267
|
+
l && Object.keys(l).length && (t.user = { ...l, ...t.user });
|
|
1268
|
+
let p = y(o);
|
|
1269
|
+
p && Object.keys(p).length && (t.contexts = { ...p, ...t.contexts }), i && (t.level = i), a && t.type !== "transaction" && (t.transaction = a);
|
|
1225
1270
|
}
|
|
1226
|
-
function
|
|
1271
|
+
function os(t, e) {
|
|
1227
1272
|
let n = [...t.breadcrumbs || [], ...e];
|
|
1228
1273
|
t.breadcrumbs = n.length ? n : void 0;
|
|
1229
1274
|
}
|
|
1230
|
-
function
|
|
1275
|
+
function is(t, e) {
|
|
1231
1276
|
t.sdkProcessingMetadata = { ...t.sdkProcessingMetadata, ...e };
|
|
1232
1277
|
}
|
|
1233
|
-
function
|
|
1234
|
-
t.contexts = { trace:
|
|
1235
|
-
let n =
|
|
1278
|
+
function as(t, e) {
|
|
1279
|
+
t.contexts = { trace: Ye(e), ...t.contexts }, t.sdkProcessingMetadata = { dynamicSamplingContext: Ve(e), ...t.sdkProcessingMetadata };
|
|
1280
|
+
let n = q(e), r = ue(n).description;
|
|
1236
1281
|
r && !t.transaction && t.type === "transaction" && (t.transaction = r);
|
|
1237
1282
|
}
|
|
1238
|
-
function
|
|
1239
|
-
t.fingerprint = t.fingerprint ?
|
|
1283
|
+
function cs(t, e) {
|
|
1284
|
+
t.fingerprint = t.fingerprint ? Se(t.fingerprint) : [], e && (t.fingerprint = t.fingerprint.concat(e)), t.fingerprint && !t.fingerprint.length && delete t.fingerprint;
|
|
1240
1285
|
}
|
|
1241
|
-
function
|
|
1242
|
-
let { normalizeDepth: i = 3, normalizeMaxBreadth: a = 1e3 } = t, c = { ...e, event_id: e.event_id || n.event_id ||
|
|
1243
|
-
|
|
1244
|
-
let
|
|
1245
|
-
n.mechanism &&
|
|
1246
|
-
let
|
|
1286
|
+
function Vn(t, e, n, r, s, o) {
|
|
1287
|
+
let { normalizeDepth: i = 3, normalizeMaxBreadth: a = 1e3 } = t, c = { ...e, event_id: e.event_id || n.event_id || x(), timestamp: e.timestamp || ie() }, u = n.integrations || t.integrations.map((T) => T.name);
|
|
1288
|
+
us(c, t), ds(c, u), e.type === void 0 && ls(c, t.stackParser);
|
|
1289
|
+
let l = ms(r, n.captureContext);
|
|
1290
|
+
n.mechanism && J(c, n.mechanism);
|
|
1291
|
+
let p = s ? s.getEventProcessors() : [], m = vn().getScopeData();
|
|
1247
1292
|
if (o) {
|
|
1248
|
-
let
|
|
1249
|
-
|
|
1293
|
+
let T = o.getScopeData();
|
|
1294
|
+
Zt(m, T);
|
|
1250
1295
|
}
|
|
1251
|
-
if (
|
|
1252
|
-
let
|
|
1253
|
-
|
|
1296
|
+
if (l) {
|
|
1297
|
+
let T = l.getScopeData();
|
|
1298
|
+
Zt(m, T);
|
|
1254
1299
|
}
|
|
1255
|
-
let
|
|
1256
|
-
|
|
1257
|
-
let
|
|
1258
|
-
return
|
|
1300
|
+
let d = [...n.attachments || [], ...m.attachments];
|
|
1301
|
+
d.length && (n.attachments = d), Yn(c, m);
|
|
1302
|
+
let g = [...p, ...m.eventProcessors];
|
|
1303
|
+
return We(g, c, n).then((T) => (T && ps(T), typeof i == "number" && i > 0 ? fs(T, i, a) : T));
|
|
1259
1304
|
}
|
|
1260
|
-
function
|
|
1305
|
+
function us(t, e) {
|
|
1261
1306
|
let { environment: n, release: r, dist: s, maxValueLength: o = 250 } = e;
|
|
1262
|
-
"environment" in t || (t.environment = "environment" in e ? n :
|
|
1307
|
+
"environment" in t || (t.environment = "environment" in e ? n : Je), t.release === void 0 && r !== void 0 && (t.release = r), t.dist === void 0 && s !== void 0 && (t.dist = s), t.message && (t.message = U(t.message, o));
|
|
1263
1308
|
let i = t.exception && t.exception.values && t.exception.values[0];
|
|
1264
|
-
i && i.value && (i.value =
|
|
1309
|
+
i && i.value && (i.value = U(i.value, o));
|
|
1265
1310
|
let a = t.request;
|
|
1266
|
-
a && a.url && (a.url =
|
|
1311
|
+
a && a.url && (a.url = U(a.url, o));
|
|
1267
1312
|
}
|
|
1268
|
-
var
|
|
1269
|
-
function
|
|
1270
|
-
let n =
|
|
1313
|
+
var Jn = /* @__PURE__ */ new WeakMap();
|
|
1314
|
+
function ls(t, e) {
|
|
1315
|
+
let n = h._sentryDebugIds;
|
|
1271
1316
|
if (!n) return;
|
|
1272
|
-
let r, s =
|
|
1273
|
-
s ? r = s : (r = /* @__PURE__ */ new Map(),
|
|
1317
|
+
let r, s = Jn.get(e);
|
|
1318
|
+
s ? r = s : (r = /* @__PURE__ */ new Map(), Jn.set(e, r));
|
|
1274
1319
|
let o = Object.keys(n).reduce((i, a) => {
|
|
1275
1320
|
let c, u = r.get(a);
|
|
1276
1321
|
u ? c = u : (c = e(a), r.set(a, c));
|
|
1277
|
-
for (let
|
|
1278
|
-
let
|
|
1279
|
-
if (
|
|
1280
|
-
i[
|
|
1322
|
+
for (let l = c.length - 1; l >= 0; l--) {
|
|
1323
|
+
let p = c[l];
|
|
1324
|
+
if (p.filename) {
|
|
1325
|
+
i[p.filename] = n[a];
|
|
1281
1326
|
break;
|
|
1282
1327
|
}
|
|
1283
1328
|
}
|
|
@@ -1292,7 +1337,7 @@ function jr(t, e) {
|
|
|
1292
1337
|
} catch {
|
|
1293
1338
|
}
|
|
1294
1339
|
}
|
|
1295
|
-
function
|
|
1340
|
+
function ps(t) {
|
|
1296
1341
|
let e = {};
|
|
1297
1342
|
try {
|
|
1298
1343
|
t.exception.values.forEach((r) => {
|
|
@@ -1309,20 +1354,20 @@ function Gr(t) {
|
|
|
1309
1354
|
n.push({ type: "sourcemap", code_file: r, debug_id: e[r] });
|
|
1310
1355
|
});
|
|
1311
1356
|
}
|
|
1312
|
-
function
|
|
1357
|
+
function ds(t, e) {
|
|
1313
1358
|
e.length > 0 && (t.sdk = t.sdk || {}, t.sdk.integrations = [...t.sdk.integrations || [], ...e]);
|
|
1314
1359
|
}
|
|
1315
|
-
function
|
|
1360
|
+
function fs(t, e, n) {
|
|
1316
1361
|
if (!t) return null;
|
|
1317
|
-
let r = { ...t, ...t.breadcrumbs && { breadcrumbs: t.breadcrumbs.map((s) => ({ ...s, ...s.data && { data:
|
|
1318
|
-
return t.contexts && t.contexts.trace && r.contexts && (r.contexts.trace = t.contexts.trace, t.contexts.trace.data && (r.contexts.trace.data =
|
|
1362
|
+
let r = { ...t, ...t.breadcrumbs && { breadcrumbs: t.breadcrumbs.map((s) => ({ ...s, ...s.data && { data: v(s.data, e, n) } })) }, ...t.user && { user: v(t.user, e, n) }, ...t.contexts && { contexts: v(t.contexts, e, n) }, ...t.extra && { extra: v(t.extra, e, n) } };
|
|
1363
|
+
return t.contexts && t.contexts.trace && r.contexts && (r.contexts.trace = t.contexts.trace, t.contexts.trace.data && (r.contexts.trace.data = v(t.contexts.trace.data, e, n))), t.spans && (r.spans = t.spans.map((s) => ({ ...s, ...s.data && { data: v(s.data, e, n) } }))), r;
|
|
1319
1364
|
}
|
|
1320
|
-
function
|
|
1365
|
+
function ms(t, e) {
|
|
1321
1366
|
if (!e) return t;
|
|
1322
1367
|
let n = t ? t.clone() : new C();
|
|
1323
1368
|
return n.update(e), n;
|
|
1324
1369
|
}
|
|
1325
|
-
var
|
|
1370
|
+
var Ke = class {
|
|
1326
1371
|
constructor(e, n) {
|
|
1327
1372
|
this._client = e, this.flushTimeout = 60, this._pendingAggregates = {}, this._isEnabled = true, this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1e3), this._intervalId.unref && this._intervalId.unref(), this._sessionAttrs = n;
|
|
1328
1373
|
}
|
|
@@ -1332,14 +1377,14 @@ var je = class {
|
|
|
1332
1377
|
}
|
|
1333
1378
|
getSessionAggregates() {
|
|
1334
1379
|
let e = Object.keys(this._pendingAggregates).map((r) => this._pendingAggregates[parseInt(r)]), n = { attrs: this._sessionAttrs, aggregates: e };
|
|
1335
|
-
return
|
|
1380
|
+
return y(n);
|
|
1336
1381
|
}
|
|
1337
1382
|
close() {
|
|
1338
1383
|
clearInterval(this._intervalId), this._isEnabled = false, this.flush();
|
|
1339
1384
|
}
|
|
1340
1385
|
incrementSessionStatusCount() {
|
|
1341
1386
|
if (!this._isEnabled) return;
|
|
1342
|
-
let e =
|
|
1387
|
+
let e = K(), n = e.getRequestSession();
|
|
1343
1388
|
n && n.status && (this._incrementSessionStatusCount(n.status, /* @__PURE__ */ new Date()), e.setRequestSession(void 0));
|
|
1344
1389
|
}
|
|
1345
1390
|
_incrementSessionStatusCount(e, n) {
|
|
@@ -1356,57 +1401,57 @@ var je = class {
|
|
|
1356
1401
|
}
|
|
1357
1402
|
}
|
|
1358
1403
|
};
|
|
1359
|
-
var
|
|
1360
|
-
function
|
|
1404
|
+
var hs = "7";
|
|
1405
|
+
function gs(t) {
|
|
1361
1406
|
let e = t.protocol ? `${t.protocol}:` : "", n = t.port ? `:${t.port}` : "";
|
|
1362
1407
|
return `${e}//${t.host}${n}${t.path ? `/${t.path}` : ""}/api/`;
|
|
1363
1408
|
}
|
|
1364
|
-
function
|
|
1365
|
-
return `${
|
|
1409
|
+
function _s(t) {
|
|
1410
|
+
return `${gs(t)}${t.projectId}/envelope/`;
|
|
1366
1411
|
}
|
|
1367
|
-
function
|
|
1368
|
-
return
|
|
1412
|
+
function Es(t, e) {
|
|
1413
|
+
return Rt({ sentry_key: t.publicKey, sentry_version: hs, ...e && { sentry_client: `${e.name}/${e.version}` } });
|
|
1369
1414
|
}
|
|
1370
|
-
function
|
|
1371
|
-
return e || `${
|
|
1415
|
+
function Wn(t, e, n) {
|
|
1416
|
+
return e || `${_s(t)}?${Es(t, n)}`;
|
|
1372
1417
|
}
|
|
1373
|
-
var
|
|
1374
|
-
function
|
|
1418
|
+
var Kn = [];
|
|
1419
|
+
function Ss(t) {
|
|
1375
1420
|
let e = {};
|
|
1376
1421
|
return t.forEach((n) => {
|
|
1377
1422
|
let { name: r } = n, s = e[r];
|
|
1378
1423
|
s && !s.isDefaultInstance && n.isDefaultInstance || (e[r] = n);
|
|
1379
1424
|
}), Object.keys(e).map((n) => e[n]);
|
|
1380
1425
|
}
|
|
1381
|
-
function
|
|
1426
|
+
function Xt(t) {
|
|
1382
1427
|
let e = t.defaultIntegrations || [], n = t.integrations;
|
|
1383
1428
|
e.forEach((i) => {
|
|
1384
1429
|
i.isDefaultInstance = true;
|
|
1385
1430
|
});
|
|
1386
1431
|
let r;
|
|
1387
|
-
Array.isArray(n) ? r = [...e, ...n] : typeof n == "function" ? r =
|
|
1388
|
-
let s =
|
|
1432
|
+
Array.isArray(n) ? r = [...e, ...n] : typeof n == "function" ? r = Se(n(e)) : r = e;
|
|
1433
|
+
let s = Ss(r), o = ys(s, (i) => i.name === "Debug");
|
|
1389
1434
|
if (o !== -1) {
|
|
1390
1435
|
let [i] = s.splice(o, 1);
|
|
1391
1436
|
s.push(i);
|
|
1392
1437
|
}
|
|
1393
1438
|
return s;
|
|
1394
1439
|
}
|
|
1395
|
-
function
|
|
1440
|
+
function Zn(t, e) {
|
|
1396
1441
|
let n = {};
|
|
1397
1442
|
return e.forEach((r) => {
|
|
1398
|
-
r &&
|
|
1443
|
+
r && en(t, r, n);
|
|
1399
1444
|
}), n;
|
|
1400
1445
|
}
|
|
1401
|
-
function
|
|
1446
|
+
function Qt(t, e) {
|
|
1402
1447
|
for (let n of e) n && n.afterAllSetup && n.afterAllSetup(t);
|
|
1403
1448
|
}
|
|
1404
|
-
function
|
|
1449
|
+
function en(t, e, n) {
|
|
1405
1450
|
if (n[e.name]) {
|
|
1406
|
-
_ &&
|
|
1451
|
+
_ && f.log(`Integration skipped because it was already installed: ${e.name}`);
|
|
1407
1452
|
return;
|
|
1408
1453
|
}
|
|
1409
|
-
if (n[e.name] = e,
|
|
1454
|
+
if (n[e.name] = e, Kn.indexOf(e.name) === -1 && typeof e.setupOnce == "function" && (e.setupOnce(), Kn.push(e.name)), e.setup && typeof e.setup == "function" && e.setup(t), typeof e.preprocessEvent == "function") {
|
|
1410
1455
|
let r = e.preprocessEvent.bind(e);
|
|
1411
1456
|
t.on("preprocessEvent", (s, o) => r(s, o, t));
|
|
1412
1457
|
}
|
|
@@ -1414,38 +1459,38 @@ function kt(t, e, n) {
|
|
|
1414
1459
|
let r = e.processEvent.bind(e), s = Object.assign((o, i) => r(o, i, t), { id: e.name });
|
|
1415
1460
|
t.addEventProcessor(s);
|
|
1416
1461
|
}
|
|
1417
|
-
_ &&
|
|
1462
|
+
_ && f.log(`Integration installed: ${e.name}`);
|
|
1418
1463
|
}
|
|
1419
|
-
function
|
|
1464
|
+
function ys(t, e) {
|
|
1420
1465
|
for (let n = 0; n < t.length; n++) if (e(t[n]) === true) return n;
|
|
1421
1466
|
return -1;
|
|
1422
1467
|
}
|
|
1423
|
-
var
|
|
1424
|
-
var
|
|
1468
|
+
var Xn = "Not capturing exception because it's already been captured.";
|
|
1469
|
+
var Ze = class {
|
|
1425
1470
|
constructor(e) {
|
|
1426
|
-
if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn =
|
|
1427
|
-
let n =
|
|
1471
|
+
if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = we(e.dsn) : _ && f.warn("No DSN provided, client will not send events."), this._dsn) {
|
|
1472
|
+
let n = Wn(this._dsn, e.tunnel, e._metadata ? e._metadata.sdk : void 0);
|
|
1428
1473
|
this._transport = e.transport({ tunnel: this._options.tunnel, recordDroppedEvent: this.recordDroppedEvent.bind(this), ...e.transportOptions, url: n });
|
|
1429
1474
|
}
|
|
1430
1475
|
}
|
|
1431
1476
|
captureException(e, n, r) {
|
|
1432
|
-
let s =
|
|
1433
|
-
if (
|
|
1477
|
+
let s = x();
|
|
1478
|
+
if (Be(e)) return _ && f.log(Xn), s;
|
|
1434
1479
|
let o = { event_id: s, ...n };
|
|
1435
1480
|
return this._process(this.eventFromException(e, o).then((i) => this._captureEvent(i, o, r))), o.event_id;
|
|
1436
1481
|
}
|
|
1437
1482
|
captureMessage(e, n, r, s) {
|
|
1438
|
-
let o = { event_id:
|
|
1483
|
+
let o = { event_id: x(), ...r }, i = se(e) ? e : String(e), a = Oe(e) ? this.eventFromMessage(i, n, o) : this.eventFromException(e, o);
|
|
1439
1484
|
return this._process(a.then((c) => this._captureEvent(c, o, s))), o.event_id;
|
|
1440
1485
|
}
|
|
1441
1486
|
captureEvent(e, n, r) {
|
|
1442
|
-
let s =
|
|
1443
|
-
if (n && n.originalException &&
|
|
1487
|
+
let s = x();
|
|
1488
|
+
if (n && n.originalException && Be(n.originalException)) return _ && f.log(Xn), s;
|
|
1444
1489
|
let o = { event_id: s, ...n }, a = (e.sdkProcessingMetadata || {}).capturedSpanScope;
|
|
1445
1490
|
return this._process(this._captureEvent(e, o, a || r)), o.event_id;
|
|
1446
1491
|
}
|
|
1447
1492
|
captureSession(e) {
|
|
1448
|
-
typeof e.release != "string" ? _ &&
|
|
1493
|
+
typeof e.release != "string" ? _ && f.warn("Discarded session because of missing or non-string release") : (this.sendSession(e), Ie(e, { init: false }));
|
|
1449
1494
|
}
|
|
1450
1495
|
getDsn() {
|
|
1451
1496
|
return this._dsn;
|
|
@@ -1461,7 +1506,7 @@ var Ge = class {
|
|
|
1461
1506
|
}
|
|
1462
1507
|
flush(e) {
|
|
1463
1508
|
let n = this._transport;
|
|
1464
|
-
return n ? (this.emit("flush"), this._isClientDoneProcessing(e).then((r) => n.flush(e).then((s) => r && s))) :
|
|
1509
|
+
return n ? (this.emit("flush"), this._isClientDoneProcessing(e).then((r) => n.flush(e).then((s) => r && s))) : R(true);
|
|
1465
1510
|
}
|
|
1466
1511
|
close(e) {
|
|
1467
1512
|
return this.flush(e).then((n) => (this.getOptions().enabled = false, this.emit("close"), n));
|
|
@@ -1480,23 +1525,23 @@ var Ge = class {
|
|
|
1480
1525
|
}
|
|
1481
1526
|
addIntegration(e) {
|
|
1482
1527
|
let n = this._integrations[e.name];
|
|
1483
|
-
|
|
1528
|
+
en(this, e, this._integrations), n || Qt(this, [e]);
|
|
1484
1529
|
}
|
|
1485
1530
|
sendEvent(e, n = {}) {
|
|
1486
1531
|
this.emit("beforeSendEvent", e, n);
|
|
1487
|
-
let r =
|
|
1488
|
-
for (let o of n.attachments || []) r =
|
|
1532
|
+
let r = zn(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
1533
|
+
for (let o of n.attachments || []) r = Ft(r, $t(o));
|
|
1489
1534
|
let s = this.sendEnvelope(r);
|
|
1490
1535
|
s && s.then((o) => this.emit("afterSendEvent", e, o), null);
|
|
1491
1536
|
}
|
|
1492
1537
|
sendSession(e) {
|
|
1493
|
-
let n =
|
|
1538
|
+
let n = qn(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
1494
1539
|
this.sendEnvelope(n);
|
|
1495
1540
|
}
|
|
1496
1541
|
recordDroppedEvent(e, n, r) {
|
|
1497
1542
|
if (this._options.sendClientReports) {
|
|
1498
1543
|
let s = `${e}:${n}`;
|
|
1499
|
-
_ &&
|
|
1544
|
+
_ && f.log(`Adding outcome: "${s}"`), this._outcomes[s] = this._outcomes[s] + 1 || 1;
|
|
1500
1545
|
}
|
|
1501
1546
|
}
|
|
1502
1547
|
on(e, n) {
|
|
@@ -1506,11 +1551,11 @@ var Ge = class {
|
|
|
1506
1551
|
this._hooks[e] && this._hooks[e].forEach((r) => r(...n));
|
|
1507
1552
|
}
|
|
1508
1553
|
sendEnvelope(e) {
|
|
1509
|
-
return this.emit("beforeEnvelope", e), this._isEnabled() && this._transport ? this._transport.send(e).then(null, (n) => (_ &&
|
|
1554
|
+
return this.emit("beforeEnvelope", e), this._isEnabled() && this._transport ? this._transport.send(e).then(null, (n) => (_ && f.error("Error while sending event:", n), n)) : (_ && f.error("Transport disabled"), R({}));
|
|
1510
1555
|
}
|
|
1511
1556
|
_setupIntegrations() {
|
|
1512
1557
|
let { integrations: e } = this._options;
|
|
1513
|
-
this._integrations =
|
|
1558
|
+
this._integrations = Zn(this, e), Qt(this, e);
|
|
1514
1559
|
}
|
|
1515
1560
|
_updateSessionFromEvent(e, n) {
|
|
1516
1561
|
let r = false, s = false, o = n.exception && n.exception.values;
|
|
@@ -1525,10 +1570,10 @@ var Ge = class {
|
|
|
1525
1570
|
}
|
|
1526
1571
|
}
|
|
1527
1572
|
let i = e.status === "ok";
|
|
1528
|
-
(i && e.errors === 0 || i && r) && (
|
|
1573
|
+
(i && e.errors === 0 || i && r) && (Ie(e, { ...r && { status: "crashed" }, errors: e.errors || Number(s || r) }), this.captureSession(e));
|
|
1529
1574
|
}
|
|
1530
1575
|
_isClientDoneProcessing(e) {
|
|
1531
|
-
return new
|
|
1576
|
+
return new A((n) => {
|
|
1532
1577
|
let r = 0, s = 1, o = setInterval(() => {
|
|
1533
1578
|
this._numProcessing == 0 ? (clearInterval(o), n(true)) : (r += s, e && r >= e && (clearInterval(o), n(false)));
|
|
1534
1579
|
}, s);
|
|
@@ -1537,16 +1582,16 @@ var Ge = class {
|
|
|
1537
1582
|
_isEnabled() {
|
|
1538
1583
|
return this.getOptions().enabled !== false && this._transport !== void 0;
|
|
1539
1584
|
}
|
|
1540
|
-
_prepareEvent(e, n, r, s =
|
|
1585
|
+
_prepareEvent(e, n, r, s = K()) {
|
|
1541
1586
|
let o = this.getOptions(), i = Object.keys(this._integrations);
|
|
1542
|
-
return !n.integrations && i.length > 0 && (n.integrations = i), this.emit("preprocessEvent", e, n), e.type || s.setLastEventId(e.event_id || n.event_id),
|
|
1587
|
+
return !n.integrations && i.length > 0 && (n.integrations = i), this.emit("preprocessEvent", e, n), e.type || s.setLastEventId(e.event_id || n.event_id), Vn(o, e, n, r, this, s).then((a) => {
|
|
1543
1588
|
if (a === null) return a;
|
|
1544
1589
|
let c = { ...s.getPropagationContext(), ...r ? r.getPropagationContext() : void 0 };
|
|
1545
1590
|
if (!(a.contexts && a.contexts.trace) && c) {
|
|
1546
|
-
let { traceId:
|
|
1547
|
-
a.contexts = { trace:
|
|
1548
|
-
let
|
|
1549
|
-
a.sdkProcessingMetadata = { dynamicSamplingContext:
|
|
1591
|
+
let { traceId: l, spanId: p, parentSpanId: m, dsc: d } = c;
|
|
1592
|
+
a.contexts = { trace: y({ trace_id: l, span_id: p, parent_span_id: m }), ...a.contexts };
|
|
1593
|
+
let g = d || be(l, this);
|
|
1594
|
+
a.sdkProcessingMetadata = { dynamicSamplingContext: g, ...a.sdkProcessingMetadata };
|
|
1550
1595
|
}
|
|
1551
1596
|
return a;
|
|
1552
1597
|
});
|
|
@@ -1555,32 +1600,32 @@ var Ge = class {
|
|
|
1555
1600
|
return this._processEvent(e, n, r).then((s) => s.event_id, (s) => {
|
|
1556
1601
|
if (_) {
|
|
1557
1602
|
let o = s;
|
|
1558
|
-
o.logLevel === "log" ?
|
|
1603
|
+
o.logLevel === "log" ? f.log(o.message) : f.warn(o);
|
|
1559
1604
|
}
|
|
1560
1605
|
});
|
|
1561
1606
|
}
|
|
1562
1607
|
_processEvent(e, n, r) {
|
|
1563
|
-
let s = this.getOptions(), { sampleRate: o } = s, i =
|
|
1564
|
-
if (a && typeof
|
|
1565
|
-
let
|
|
1566
|
-
return this._prepareEvent(e, n, r,
|
|
1567
|
-
if (
|
|
1568
|
-
if (n.data && n.data.__sentry__ === true) return
|
|
1569
|
-
let
|
|
1570
|
-
return
|
|
1571
|
-
}).then((
|
|
1572
|
-
if (
|
|
1573
|
-
let
|
|
1574
|
-
!i &&
|
|
1575
|
-
let
|
|
1576
|
-
if (i &&
|
|
1577
|
-
let
|
|
1578
|
-
|
|
1608
|
+
let s = this.getOptions(), { sampleRate: o } = s, i = er(e), a = Qn(e), c = e.type || "error", u = `before send for type \`${c}\``, l = typeof o > "u" ? void 0 : Gn(o);
|
|
1609
|
+
if (a && typeof l == "number" && Math.random() > l) return this.recordDroppedEvent("sample_rate", "error", e), V(new b(`Discarding event because it's not included in the random sample (sampling rate = ${o})`, "log"));
|
|
1610
|
+
let p = c === "replay_event" ? "replay" : c, d = (e.sdkProcessingMetadata || {}).capturedSpanIsolationScope;
|
|
1611
|
+
return this._prepareEvent(e, n, r, d).then((g) => {
|
|
1612
|
+
if (g === null) throw this.recordDroppedEvent("event_processor", p, e), new b("An event processor returned `null`, will not send event.", "log");
|
|
1613
|
+
if (n.data && n.data.__sentry__ === true) return g;
|
|
1614
|
+
let T = Is(s, g, n);
|
|
1615
|
+
return Ts(T, u);
|
|
1616
|
+
}).then((g) => {
|
|
1617
|
+
if (g === null) throw this.recordDroppedEvent("before_send", p, e), new b(`${u} returned \`null\`, will not send event.`, "log");
|
|
1618
|
+
let Z = r && r.getSession();
|
|
1619
|
+
!i && Z && this._updateSessionFromEvent(Z, g);
|
|
1620
|
+
let T = g.transaction_info;
|
|
1621
|
+
if (i && T && g.transaction !== e.transaction) {
|
|
1622
|
+
let I = "custom";
|
|
1623
|
+
g.transaction_info = { ...T, source: I };
|
|
1579
1624
|
}
|
|
1580
|
-
return this.sendEvent(
|
|
1581
|
-
}).then(null, (
|
|
1582
|
-
throw
|
|
1583
|
-
Reason: ${
|
|
1625
|
+
return this.sendEvent(g, n), g;
|
|
1626
|
+
}).then(null, (g) => {
|
|
1627
|
+
throw g instanceof b ? g : (this.captureException(g, { data: { __sentry__: true }, originalException: g }), new b(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
1628
|
+
Reason: ${g}`));
|
|
1584
1629
|
});
|
|
1585
1630
|
}
|
|
1586
1631
|
_process(e) {
|
|
@@ -1594,21 +1639,21 @@ Reason: ${h}`));
|
|
|
1594
1639
|
});
|
|
1595
1640
|
}
|
|
1596
1641
|
};
|
|
1597
|
-
function
|
|
1642
|
+
function Ts(t, e) {
|
|
1598
1643
|
let n = `${e} must return \`null\` or a valid event.`;
|
|
1599
|
-
if (
|
|
1600
|
-
if (!
|
|
1644
|
+
if (P(t)) return t.then((r) => {
|
|
1645
|
+
if (!O(r) && r !== null) throw new b(n);
|
|
1601
1646
|
return r;
|
|
1602
1647
|
}, (r) => {
|
|
1603
|
-
throw new
|
|
1648
|
+
throw new b(`${e} rejected with ${r}`);
|
|
1604
1649
|
});
|
|
1605
|
-
if (!
|
|
1650
|
+
if (!O(t) && t !== null) throw new b(n);
|
|
1606
1651
|
return t;
|
|
1607
1652
|
}
|
|
1608
|
-
function
|
|
1653
|
+
function Is(t, e, n) {
|
|
1609
1654
|
let { beforeSend: r, beforeSendTransaction: s, beforeSendSpan: o } = t;
|
|
1610
|
-
if (
|
|
1611
|
-
if (
|
|
1655
|
+
if (Qn(e) && r) return r(e, n);
|
|
1656
|
+
if (er(e)) {
|
|
1612
1657
|
if (e.spans && o) {
|
|
1613
1658
|
let i = [];
|
|
1614
1659
|
for (let a of e.spans) {
|
|
@@ -1621,41 +1666,41 @@ function es(t, e, n) {
|
|
|
1621
1666
|
}
|
|
1622
1667
|
return e;
|
|
1623
1668
|
}
|
|
1624
|
-
function
|
|
1669
|
+
function Qn(t) {
|
|
1625
1670
|
return t.type === void 0;
|
|
1626
1671
|
}
|
|
1627
|
-
function
|
|
1672
|
+
function er(t) {
|
|
1628
1673
|
return t.type === "transaction";
|
|
1629
1674
|
}
|
|
1630
|
-
function
|
|
1675
|
+
function tr(t, e, n, r, s) {
|
|
1631
1676
|
let o = { sent_at: (/* @__PURE__ */ new Date()).toISOString() };
|
|
1632
|
-
n && n.sdk && (o.sdk = { name: n.sdk.name, version: n.sdk.version }), r && s && (o.dsn =
|
|
1633
|
-
let i =
|
|
1634
|
-
return
|
|
1677
|
+
n && n.sdk && (o.sdk = { name: n.sdk.name, version: n.sdk.version }), r && s && (o.dsn = B(s)), e && (o.trace = y(e));
|
|
1678
|
+
let i = xs(t);
|
|
1679
|
+
return j(o, [i]);
|
|
1635
1680
|
}
|
|
1636
|
-
function
|
|
1681
|
+
function xs(t) {
|
|
1637
1682
|
return [{ type: "check_in" }, t];
|
|
1638
1683
|
}
|
|
1639
|
-
var
|
|
1684
|
+
var Ce = class extends Ze {
|
|
1640
1685
|
constructor(e) {
|
|
1641
|
-
|
|
1686
|
+
jn(), super(e);
|
|
1642
1687
|
}
|
|
1643
1688
|
eventFromException(e, n) {
|
|
1644
|
-
return
|
|
1689
|
+
return R(qt(this, this._options.stackParser, e, n));
|
|
1645
1690
|
}
|
|
1646
1691
|
eventFromMessage(e, n = "info", r) {
|
|
1647
|
-
return
|
|
1692
|
+
return R(zt(this._options.stackParser, e, n, r, this._options.attachStacktrace));
|
|
1648
1693
|
}
|
|
1649
1694
|
captureException(e, n, r) {
|
|
1650
1695
|
if (this._options.autoSessionTracking && this._sessionFlusher) {
|
|
1651
|
-
let s =
|
|
1696
|
+
let s = K().getRequestSession();
|
|
1652
1697
|
s && s.status === "ok" && (s.status = "errored");
|
|
1653
1698
|
}
|
|
1654
1699
|
return super.captureException(e, n, r);
|
|
1655
1700
|
}
|
|
1656
1701
|
captureEvent(e, n, r) {
|
|
1657
1702
|
if (this._options.autoSessionTracking && this._sessionFlusher && (e.type || "exception") === "exception" && e.exception && e.exception.values && e.exception.values.length > 0) {
|
|
1658
|
-
let i =
|
|
1703
|
+
let i = K().getRequestSession();
|
|
1659
1704
|
i && i.status === "ok" && (i.status = "errored");
|
|
1660
1705
|
}
|
|
1661
1706
|
return super.captureEvent(e, n, r);
|
|
@@ -1665,68 +1710,68 @@ var ge = class extends Ge {
|
|
|
1665
1710
|
}
|
|
1666
1711
|
initSessionFlusher() {
|
|
1667
1712
|
let { release: e, environment: n } = this._options;
|
|
1668
|
-
e ? this._sessionFlusher = new
|
|
1713
|
+
e ? this._sessionFlusher = new Ke(this, { release: e, environment: n }) : _ && f.warn("Cannot initialise an instance of SessionFlusher if no release is provided!");
|
|
1669
1714
|
}
|
|
1670
1715
|
captureCheckIn(e, n, r) {
|
|
1671
|
-
let s = "checkInId" in e && e.checkInId ? e.checkInId :
|
|
1672
|
-
if (!this._isEnabled()) return _ &&
|
|
1716
|
+
let s = "checkInId" in e && e.checkInId ? e.checkInId : x();
|
|
1717
|
+
if (!this._isEnabled()) return _ && f.warn("SDK not enabled, will not capture checkin."), s;
|
|
1673
1718
|
let o = this.getOptions(), { release: i, environment: a, tunnel: c } = o, u = { check_in_id: s, monitor_slug: e.monitorSlug, status: e.status, release: i, environment: a };
|
|
1674
1719
|
"duration" in e && (u.duration = e.duration), n && (u.monitor_config = { schedule: n.schedule, checkin_margin: n.checkinMargin, max_runtime: n.maxRuntime, timezone: n.timezone, failure_issue_threshold: n.failureIssueThreshold, recovery_threshold: n.recoveryThreshold });
|
|
1675
|
-
let [
|
|
1676
|
-
|
|
1677
|
-
let
|
|
1678
|
-
return _ &&
|
|
1720
|
+
let [l, p] = this._getTraceInfoFromScope(r);
|
|
1721
|
+
p && (u.contexts = { trace: p });
|
|
1722
|
+
let m = tr(u, l, this.getSdkMetadata(), c, this.getDsn());
|
|
1723
|
+
return _ && f.info("Sending checkin:", e.monitorSlug, e.status), this.sendEnvelope(m), s;
|
|
1679
1724
|
}
|
|
1680
1725
|
_captureRequestSession() {
|
|
1681
|
-
this._sessionFlusher ? this._sessionFlusher.incrementSessionStatusCount() : _ &&
|
|
1726
|
+
this._sessionFlusher ? this._sessionFlusher.incrementSessionStatusCount() : _ && f.warn("Discarded request mode session because autoSessionTracking option was disabled");
|
|
1682
1727
|
}
|
|
1683
1728
|
_prepareEvent(e, n, r, s) {
|
|
1684
1729
|
return this._options.platform && (e.platform = e.platform || this._options.platform), this._options.runtime && (e.contexts = { ...e.contexts, runtime: (e.contexts || {}).runtime || this._options.runtime }), this._options.serverName && (e.server_name = e.server_name || this._options.serverName), super._prepareEvent(e, n, r, s);
|
|
1685
1730
|
}
|
|
1686
1731
|
_getTraceInfoFromScope(e) {
|
|
1687
1732
|
if (!e) return [void 0, void 0];
|
|
1688
|
-
let n =
|
|
1733
|
+
let n = W(e);
|
|
1689
1734
|
if (n) {
|
|
1690
|
-
let c =
|
|
1691
|
-
return [
|
|
1735
|
+
let c = q(n);
|
|
1736
|
+
return [Ve(c), Ye(c)];
|
|
1692
1737
|
}
|
|
1693
1738
|
let { traceId: r, spanId: s, parentSpanId: o, dsc: i } = e.getPropagationContext(), a = { trace_id: r, span_id: s, parent_span_id: o };
|
|
1694
|
-
return i ? [i, a] : [
|
|
1739
|
+
return i ? [i, a] : [be(r, this), a];
|
|
1695
1740
|
}
|
|
1696
1741
|
};
|
|
1697
|
-
var
|
|
1698
|
-
function
|
|
1742
|
+
var As = 64;
|
|
1743
|
+
function tn(t, e, n = Pt(t.bufferSize || As)) {
|
|
1699
1744
|
let r = {}, s = (i) => n.drain(i);
|
|
1700
1745
|
function o(i) {
|
|
1701
1746
|
let a = [];
|
|
1702
|
-
if (
|
|
1703
|
-
let
|
|
1704
|
-
if (
|
|
1705
|
-
let
|
|
1706
|
-
t.recordDroppedEvent("ratelimit_backoff",
|
|
1707
|
-
} else a.push(
|
|
1708
|
-
}), a.length === 0) return
|
|
1709
|
-
let c =
|
|
1710
|
-
|
|
1711
|
-
let
|
|
1712
|
-
t.recordDroppedEvent(
|
|
1747
|
+
if (je(i, (p, m) => {
|
|
1748
|
+
let d = Ge(m);
|
|
1749
|
+
if (Bt(r, d)) {
|
|
1750
|
+
let g = nr(p, m);
|
|
1751
|
+
t.recordDroppedEvent("ratelimit_backoff", d, g);
|
|
1752
|
+
} else a.push(p);
|
|
1753
|
+
}), a.length === 0) return R({});
|
|
1754
|
+
let c = j(i[0], a), u = (p) => {
|
|
1755
|
+
je(c, (m, d) => {
|
|
1756
|
+
let g = nr(m, d);
|
|
1757
|
+
t.recordDroppedEvent(p, Ge(d), g);
|
|
1713
1758
|
});
|
|
1714
|
-
},
|
|
1715
|
-
throw u("network_error"),
|
|
1759
|
+
}, l = () => e({ body: Ut(c) }).then((p) => (p.statusCode !== void 0 && (p.statusCode < 200 || p.statusCode >= 300) && _ && f.warn(`Sentry responded with status code ${p.statusCode} to sent event.`), r = jt(r, p), p), (p) => {
|
|
1760
|
+
throw u("network_error"), p;
|
|
1716
1761
|
});
|
|
1717
|
-
return n.add(
|
|
1718
|
-
if (
|
|
1719
|
-
throw
|
|
1762
|
+
return n.add(l).then((p) => p, (p) => {
|
|
1763
|
+
if (p instanceof b) return _ && f.error("Skipped sending event because buffer is full."), u("queue_overflow"), R({});
|
|
1764
|
+
throw p;
|
|
1720
1765
|
});
|
|
1721
1766
|
}
|
|
1722
1767
|
return { send: o, flush: s };
|
|
1723
1768
|
}
|
|
1724
|
-
function
|
|
1769
|
+
function nr(t, e) {
|
|
1725
1770
|
if (!(e !== "event" && e !== "transaction")) return Array.isArray(t) ? t[1] : void 0;
|
|
1726
1771
|
}
|
|
1727
|
-
var
|
|
1728
|
-
var
|
|
1729
|
-
let e = t.root, n = t.prefix || "app:///", r = "window" in
|
|
1772
|
+
var bs = "RewriteFrames";
|
|
1773
|
+
var Xe = (t = {}) => {
|
|
1774
|
+
let e = t.root, n = t.prefix || "app:///", r = "window" in h && h.window !== void 0, s = t.iteratee || Rs({ isBrowser: r, root: e, prefix: n });
|
|
1730
1775
|
function o(a) {
|
|
1731
1776
|
try {
|
|
1732
1777
|
return { ...a, exception: { ...a.exception, values: a.exception.values.map((c) => ({ ...c, ...c.stacktrace && { stacktrace: i(c.stacktrace) } })) } };
|
|
@@ -1737,12 +1782,12 @@ var qe = (t = {}) => {
|
|
|
1737
1782
|
function i(a) {
|
|
1738
1783
|
return { ...a, frames: a && a.frames && a.frames.map((c) => s(c)) };
|
|
1739
1784
|
}
|
|
1740
|
-
return { name:
|
|
1785
|
+
return { name: bs, processEvent(a) {
|
|
1741
1786
|
let c = a;
|
|
1742
1787
|
return a.exception && Array.isArray(a.exception.values) && (c = o(c)), c;
|
|
1743
1788
|
} };
|
|
1744
1789
|
};
|
|
1745
|
-
function
|
|
1790
|
+
function Rs({ isBrowser: t, root: e, prefix: n }) {
|
|
1746
1791
|
return (r) => {
|
|
1747
1792
|
if (!r.filename) return r;
|
|
1748
1793
|
let s = /^[a-zA-Z]:\\/.test(r.filename) || r.filename.includes("\\") && !r.filename.includes("/"), o = /^\//.test(r.filename);
|
|
@@ -1752,112 +1797,112 @@ function ss({ isBrowser: t, root: e, prefix: n }) {
|
|
|
1752
1797
|
i.indexOf(e) === 0 && (r.filename = i.replace(e, n));
|
|
1753
1798
|
}
|
|
1754
1799
|
} else if (s || o) {
|
|
1755
|
-
let i = s ? r.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : r.filename, a = e ?
|
|
1800
|
+
let i = s ? r.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : r.filename, a = e ? Mt(e, i) : ye(i);
|
|
1756
1801
|
r.filename = `${n}${a}`;
|
|
1757
1802
|
}
|
|
1758
1803
|
return r;
|
|
1759
1804
|
};
|
|
1760
1805
|
}
|
|
1761
|
-
function
|
|
1806
|
+
function sr(t) {
|
|
1762
1807
|
return typeof t == "object" && t !== null;
|
|
1763
1808
|
}
|
|
1764
|
-
function
|
|
1765
|
-
return
|
|
1809
|
+
function Ns(t) {
|
|
1810
|
+
return sr(t) && "handled" in t && typeof t.handled == "boolean" && "type" in t && typeof t.type == "string";
|
|
1766
1811
|
}
|
|
1767
|
-
function
|
|
1768
|
-
return
|
|
1812
|
+
function Os(t) {
|
|
1813
|
+
return sr(t) && "mechanism" in t && Ns(t.mechanism);
|
|
1769
1814
|
}
|
|
1770
|
-
function
|
|
1771
|
-
if (
|
|
1815
|
+
function vs() {
|
|
1816
|
+
if (h.SENTRY_RELEASE && h.SENTRY_RELEASE.id) return h.SENTRY_RELEASE.id;
|
|
1772
1817
|
}
|
|
1773
|
-
function
|
|
1818
|
+
function rr(t, e) {
|
|
1774
1819
|
return t !== void 0 ? (t[e[0]] = e[1], t) : { [e[0]]: e[1] };
|
|
1775
1820
|
}
|
|
1776
|
-
function
|
|
1821
|
+
function or(t, e) {
|
|
1777
1822
|
return t(e.stack || "", 1);
|
|
1778
1823
|
}
|
|
1779
|
-
function
|
|
1824
|
+
function ws(t) {
|
|
1780
1825
|
let e = t && t.message;
|
|
1781
1826
|
return e ? e.error && typeof e.error.message == "string" ? e.error.message : e : "No error message";
|
|
1782
1827
|
}
|
|
1783
|
-
function
|
|
1784
|
-
let n = { type: e.name || e.constructor.name, value:
|
|
1828
|
+
function ir(t, e) {
|
|
1829
|
+
let n = { type: e.name || e.constructor.name, value: ws(e) }, r = or(t, e);
|
|
1785
1830
|
return r.length && (n.stacktrace = { frames: r }), n.type === void 0 && n.value === "" && (n.value = "Unrecoverable error caught"), n;
|
|
1786
1831
|
}
|
|
1787
|
-
function
|
|
1788
|
-
let s, i = (r && r.data &&
|
|
1789
|
-
if (
|
|
1832
|
+
function Ds(t, e, n, r) {
|
|
1833
|
+
let s, i = (r && r.data && Os(r.data) ? r.data.mechanism : void 0) ?? { handled: true, type: "generic" };
|
|
1834
|
+
if (z(n)) s = n;
|
|
1790
1835
|
else {
|
|
1791
|
-
if (
|
|
1792
|
-
let c = `Non-Error exception captured with keys: ${
|
|
1793
|
-
t?.setExtra("__serialized__",
|
|
1836
|
+
if (O(n)) {
|
|
1837
|
+
let c = `Non-Error exception captured with keys: ${me(n)}`, u = t?.getClient(), l = u && u.getOptions().normalizeDepth;
|
|
1838
|
+
t?.setExtra("__serialized__", ae(n, l)), s = r && r.syntheticException || new Error(c), s.message = c;
|
|
1794
1839
|
} else s = r && r.syntheticException || new Error(n), s.message = n;
|
|
1795
1840
|
i.synthetic = true;
|
|
1796
1841
|
}
|
|
1797
|
-
let a = { exception: { values: [
|
|
1798
|
-
return
|
|
1842
|
+
let a = { exception: { values: [ir(e, s)] } };
|
|
1843
|
+
return Ee(a, void 0, void 0), J(a, i), { ...a, event_id: r && r.event_id };
|
|
1799
1844
|
}
|
|
1800
|
-
function
|
|
1845
|
+
function Ms(t, e, n = "info", r, s) {
|
|
1801
1846
|
let o = { event_id: r && r.event_id, level: n, message: e };
|
|
1802
1847
|
if (s && r && r.syntheticException) {
|
|
1803
|
-
let i =
|
|
1848
|
+
let i = or(t, r.syntheticException);
|
|
1804
1849
|
i.length && (o.exception = { values: [{ value: e, stacktrace: { frames: i } }] });
|
|
1805
1850
|
}
|
|
1806
1851
|
return o;
|
|
1807
1852
|
}
|
|
1808
|
-
var
|
|
1809
|
-
var
|
|
1810
|
-
function
|
|
1811
|
-
if (!n.exception || !n.exception.values || !r || !
|
|
1812
|
-
let s =
|
|
1853
|
+
var Ps = 5;
|
|
1854
|
+
var ks = (t = { limit: Ps }) => ({ name: "LinkedErrors", processEvent: (e, n, r) => Ls(r.getOptions().stackParser, t.limit, e, n) });
|
|
1855
|
+
function Ls(t, e, n, r) {
|
|
1856
|
+
if (!n.exception || !n.exception.values || !r || !k(r.originalException, Error)) return n;
|
|
1857
|
+
let s = ar(t, e, r.originalException);
|
|
1813
1858
|
return n.exception.values = [...s, ...n.exception.values], n;
|
|
1814
1859
|
}
|
|
1815
|
-
function
|
|
1816
|
-
if (!
|
|
1817
|
-
let s =
|
|
1818
|
-
return
|
|
1860
|
+
function ar(t, e, n, r = []) {
|
|
1861
|
+
if (!k(n.cause, Error) || r.length + 1 >= e) return r;
|
|
1862
|
+
let s = ir(t, n.cause);
|
|
1863
|
+
return ar(t, e, n.cause, [s, ...r]);
|
|
1819
1864
|
}
|
|
1820
|
-
var
|
|
1821
|
-
var
|
|
1822
|
-
let e = { ...
|
|
1865
|
+
var Fs = { allowedHeaders: ["CF-RAY", "CF-Worker"] };
|
|
1866
|
+
var Us = (t = {}) => {
|
|
1867
|
+
let e = { ...Fs, ...t };
|
|
1823
1868
|
return { name: "RequestData", preprocessEvent: (n) => {
|
|
1824
1869
|
let { sdkProcessingMetadata: r } = n;
|
|
1825
|
-
return r && ("request" in r && r.request instanceof Request && (n.request =
|
|
1870
|
+
return r && ("request" in r && r.request instanceof Request && (n.request = Hs(r.request, e), n.user = $s(n.user ?? {}, r.request, e)), "requestData" in r && (n.request ? n.request.data = r.requestData : n.request = { data: r.requestData })), n;
|
|
1826
1871
|
} };
|
|
1827
1872
|
};
|
|
1828
|
-
function
|
|
1873
|
+
function $s(t, e, n) {
|
|
1829
1874
|
let r = e.headers.get("CF-Connecting-IP"), { allowedIps: s } = n, o = { ...t };
|
|
1830
|
-
return !("ip_address" in t) && r && s !== void 0 &&
|
|
1875
|
+
return !("ip_address" in t) && r && s !== void 0 && Bs(r, s) && (o.ip_address = r), Object.keys(o).length > 0 ? o : void 0;
|
|
1831
1876
|
}
|
|
1832
|
-
function
|
|
1877
|
+
function Hs(t, e) {
|
|
1833
1878
|
let n = t.headers.get("cookie"), r;
|
|
1834
1879
|
if (n) try {
|
|
1835
|
-
r =
|
|
1880
|
+
r = js(n);
|
|
1836
1881
|
} catch {
|
|
1837
1882
|
}
|
|
1838
1883
|
let s = {};
|
|
1839
|
-
for (let [u,
|
|
1884
|
+
for (let [u, l] of t.headers.entries()) u !== "cookie" && (s[u] = l);
|
|
1840
1885
|
let o = { method: t.method, cookies: r, headers: s };
|
|
1841
1886
|
try {
|
|
1842
1887
|
let u = new URL(t.url);
|
|
1843
1888
|
o.url = `${u.protocol}//${u.hostname}${u.pathname}`, o.query_string = u.search;
|
|
1844
1889
|
} catch {
|
|
1845
|
-
let
|
|
1846
|
-
|
|
1890
|
+
let l = t.url.indexOf("?");
|
|
1891
|
+
l < 0 ? o.url = t.url : (o.url = t.url.substr(0, l), o.query_string = t.url.substr(l + 1));
|
|
1847
1892
|
}
|
|
1848
1893
|
let { allowedHeaders: i, allowedCookies: a, allowedSearchParams: c } = e;
|
|
1849
|
-
if (i !== void 0 && o.headers ? (o.headers =
|
|
1850
|
-
let u = Object.fromEntries(new URLSearchParams(o.query_string)),
|
|
1851
|
-
Object.keys(
|
|
1852
|
-
|
|
1853
|
-
}), o.query_string =
|
|
1894
|
+
if (i !== void 0 && o.headers ? (o.headers = nn(o.headers, i), Object.keys(o.headers).length === 0 && delete o.headers) : delete o.headers, a !== void 0 && o.cookies ? (o.cookies = nn(o.cookies, a), Object.keys(o.cookies).length === 0 && delete o.cookies) : delete o.cookies, c !== void 0) {
|
|
1895
|
+
let u = Object.fromEntries(new URLSearchParams(o.query_string)), l = new URLSearchParams();
|
|
1896
|
+
Object.keys(nn(u, c)).forEach((p) => {
|
|
1897
|
+
l.set(p, u[p]);
|
|
1898
|
+
}), o.query_string = l.toString();
|
|
1854
1899
|
} else delete o.query_string;
|
|
1855
1900
|
return o;
|
|
1856
1901
|
}
|
|
1857
|
-
function
|
|
1902
|
+
function Bs(t, e) {
|
|
1858
1903
|
return typeof e == "boolean" ? e : e instanceof RegExp ? e.test(t) : Array.isArray(e) ? e.map((r) => r.toLowerCase()).includes(t) : false;
|
|
1859
1904
|
}
|
|
1860
|
-
function
|
|
1905
|
+
function nn(t, e) {
|
|
1861
1906
|
let n = () => false;
|
|
1862
1907
|
if (typeof e == "boolean") return e ? t : {};
|
|
1863
1908
|
if (e instanceof RegExp) n = (r) => e.test(r);
|
|
@@ -1867,7 +1912,7 @@ function Ft(t, e) {
|
|
|
1867
1912
|
} else return {};
|
|
1868
1913
|
return Object.keys(t).filter(n).reduce((r, s) => (r[s] = t[s], r), {});
|
|
1869
1914
|
}
|
|
1870
|
-
function
|
|
1915
|
+
function js(t) {
|
|
1871
1916
|
if (typeof t != "string") return {};
|
|
1872
1917
|
try {
|
|
1873
1918
|
return t.split(";").map((e) => e.split("=")).reduce((e, [n, r]) => (e[decodeURIComponent(n.trim())] = decodeURIComponent(r.trim()), e), {});
|
|
@@ -1875,7 +1920,7 @@ function ys(t) {
|
|
|
1875
1920
|
return {};
|
|
1876
1921
|
}
|
|
1877
1922
|
}
|
|
1878
|
-
function
|
|
1923
|
+
function Gs(t, e) {
|
|
1879
1924
|
let n = {};
|
|
1880
1925
|
return t.forEach((r) => {
|
|
1881
1926
|
n[r.name] = r, typeof r.setupOnce == "function" && r.setupOnce();
|
|
@@ -1892,23 +1937,23 @@ function Ts(t, e) {
|
|
|
1892
1937
|
}
|
|
1893
1938
|
}), n;
|
|
1894
1939
|
}
|
|
1895
|
-
var
|
|
1940
|
+
var rn = class extends Ce {
|
|
1896
1941
|
#e = null;
|
|
1897
1942
|
#t = false;
|
|
1898
1943
|
constructor(e) {
|
|
1899
1944
|
e._metadata = e._metadata || {}, e._metadata.sdk = e._metadata.sdk || { name: "toucan-js", packages: [{ name: "npm:toucan-js", version: "4.0.0" }], version: "4.0.0" }, super(e);
|
|
1900
1945
|
}
|
|
1901
1946
|
setupIntegrations() {
|
|
1902
|
-
this._isEnabled() && !this.#t && this.#e && (this._integrations =
|
|
1947
|
+
this._isEnabled() && !this.#t && this.#e && (this._integrations = Gs(this._options.integrations, this.#e), this.#t = true);
|
|
1903
1948
|
}
|
|
1904
1949
|
eventFromException(e, n) {
|
|
1905
|
-
return
|
|
1950
|
+
return R(Ds(this.#e, this._options.stackParser, e, n));
|
|
1906
1951
|
}
|
|
1907
1952
|
eventFromMessage(e, n = "info", r) {
|
|
1908
|
-
return
|
|
1953
|
+
return R(Ms(this._options.stackParser, e, n, r, this._options.attachStacktrace));
|
|
1909
1954
|
}
|
|
1910
1955
|
_prepareEvent(e, n, r) {
|
|
1911
|
-
return e.platform = e.platform || "javascript", this.getOptions().request && (e.sdkProcessingMetadata =
|
|
1956
|
+
return e.platform = e.platform || "javascript", this.getOptions().request && (e.sdkProcessingMetadata = rr(e.sdkProcessingMetadata, ["request", this.getOptions().request])), this.getOptions().requestData && (e.sdkProcessingMetadata = rr(e.sdkProcessingMetadata, ["requestData", this.getOptions().requestData])), super._prepareEvent(e, n, r);
|
|
1912
1957
|
}
|
|
1913
1958
|
getSdk() {
|
|
1914
1959
|
return this.#e;
|
|
@@ -1923,8 +1968,8 @@ var Ut = class extends ge {
|
|
|
1923
1968
|
this.getOptions().enabled = e;
|
|
1924
1969
|
}
|
|
1925
1970
|
};
|
|
1926
|
-
function
|
|
1927
|
-
let [e, n] =
|
|
1971
|
+
function qs(t) {
|
|
1972
|
+
let [e, n] = kt(t);
|
|
1928
1973
|
return [e, (s) => {
|
|
1929
1974
|
let o = n(s);
|
|
1930
1975
|
if (o) {
|
|
@@ -1934,32 +1979,32 @@ function Is(t) {
|
|
|
1934
1979
|
return o;
|
|
1935
1980
|
}];
|
|
1936
1981
|
}
|
|
1937
|
-
function
|
|
1938
|
-
if (t) return
|
|
1982
|
+
function zs(t) {
|
|
1983
|
+
if (t) return ye(t, ".js");
|
|
1939
1984
|
}
|
|
1940
|
-
var
|
|
1941
|
-
function
|
|
1985
|
+
var Ys = Pe(qs(zs));
|
|
1986
|
+
function Js(t) {
|
|
1942
1987
|
function e({ body: n }) {
|
|
1943
1988
|
try {
|
|
1944
1989
|
let s = (t.fetcher ?? fetch)(t.url, { method: "POST", headers: t.headers, body: n }).then((o) => ({ statusCode: o.status, headers: { "retry-after": o.headers.get("Retry-After"), "x-sentry-rate-limits": o.headers.get("X-Sentry-Rate-Limits") } }));
|
|
1945
1990
|
return t.context && t.context.waitUntil(s), s;
|
|
1946
1991
|
} catch (r) {
|
|
1947
|
-
return
|
|
1992
|
+
return V(r);
|
|
1948
1993
|
}
|
|
1949
1994
|
}
|
|
1950
|
-
return
|
|
1995
|
+
return tn(t, e);
|
|
1951
1996
|
}
|
|
1952
|
-
var
|
|
1997
|
+
var le = class extends C {
|
|
1953
1998
|
#e;
|
|
1954
1999
|
constructor(e) {
|
|
1955
|
-
if (super(), e.defaultIntegrations = e.defaultIntegrations === false ? [] : [...Array.isArray(e.defaultIntegrations) ? e.defaultIntegrations : [
|
|
1956
|
-
let n =
|
|
2000
|
+
if (super(), e.defaultIntegrations = e.defaultIntegrations === false ? [] : [...Array.isArray(e.defaultIntegrations) ? e.defaultIntegrations : [Us(e.requestDataOptions), ks()]], e.release === void 0) {
|
|
2001
|
+
let n = vs();
|
|
1957
2002
|
n !== void 0 && (e.release = n);
|
|
1958
2003
|
}
|
|
1959
2004
|
this.#e = e, this.attachNewClient();
|
|
1960
2005
|
}
|
|
1961
2006
|
attachNewClient() {
|
|
1962
|
-
let e = new
|
|
2007
|
+
let e = new rn({ ...this.#e, transport: Js, integrations: Xt(this.#e), stackParser: Nt(this.#e.stackParser || Ys), transportOptions: { ...this.#e.transportOptions, context: this.#e.context } });
|
|
1963
2008
|
this.setClient(e), e.setSdk(this), e.setupIntegrations();
|
|
1964
2009
|
}
|
|
1965
2010
|
setRequestBody(e) {
|
|
@@ -1976,7 +2021,7 @@ var Q = class extends C {
|
|
|
1976
2021
|
return super.addBreadcrumb(e, s);
|
|
1977
2022
|
}
|
|
1978
2023
|
clone() {
|
|
1979
|
-
let e = new
|
|
2024
|
+
let e = new le({ ...this.#e });
|
|
1980
2025
|
return e._breadcrumbs = [...this._breadcrumbs], e._tags = { ...this._tags }, e._extra = { ...this._extra }, e._contexts = { ...this._contexts }, e._user = this._user, e._level = this._level, e._session = this._session, e._transactionName = this._transactionName, e._fingerprint = this._fingerprint, e._eventProcessors = [...this._eventProcessors], e._requestSession = this._requestSession, e._attachments = [...this._attachments], e._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, e._propagationContext = { ...this._propagationContext }, e._lastEventId = this._lastEventId, e;
|
|
1981
2026
|
}
|
|
1982
2027
|
withScope(e) {
|
|
@@ -1984,23 +2029,23 @@ var Q = class extends C {
|
|
|
1984
2029
|
return e(n);
|
|
1985
2030
|
}
|
|
1986
2031
|
};
|
|
1987
|
-
function
|
|
2032
|
+
function cr(t, e, n, r, s, o, i, a, c) {
|
|
1988
2033
|
if (!(n && r && s)) return;
|
|
1989
|
-
let u = new
|
|
1990
|
-
return
|
|
2034
|
+
let u = new le({ dsn: n, request: t, context: e, sampleRate: 1, release: i?.tag, integrations: [Xe({ iteratee(l) {
|
|
2035
|
+
return l.filename = "/index.js", l;
|
|
1991
2036
|
} })], 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 } } });
|
|
1992
2037
|
return o && (u.setTag("colo", o.coloId), u.setTag("metal", o.metalId)), a && c && (u.setTag("accountId", a), u.setTag("scriptId", c)), u.setUser({ id: a?.toString() }), u;
|
|
1993
2038
|
}
|
|
1994
|
-
function
|
|
2039
|
+
function Vs() {
|
|
1995
2040
|
return { addLogs: () => {
|
|
1996
2041
|
}, setTags: () => {
|
|
1997
2042
|
}, end: () => {
|
|
1998
2043
|
}, isRecording: true };
|
|
1999
2044
|
}
|
|
2000
|
-
function
|
|
2001
|
-
return { enterSpan: (t, e, ...n) => e(
|
|
2045
|
+
function sn() {
|
|
2046
|
+
return { enterSpan: (t, e, ...n) => e(Vs(), ...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" };
|
|
2002
2047
|
}
|
|
2003
|
-
var
|
|
2048
|
+
var Qe = class {
|
|
2004
2049
|
constructor(e) {
|
|
2005
2050
|
this.data = {};
|
|
2006
2051
|
this.readyAnalytics = e;
|
|
@@ -2015,33 +2060,33 @@ var ze = class {
|
|
|
2015
2060
|
this.readyAnalytics && 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.status ?? -1], blobs: [this.data.hostname?.substring(0, 256), this.data.userAgent?.substring(0, 256), this.data.htmlHandling, this.data.notFoundHandling, this.data.error?.substring(0, 256), this.data.version, this.data.coloRegion] });
|
|
2016
2061
|
}
|
|
2017
2062
|
};
|
|
2018
|
-
var
|
|
2063
|
+
var tt = class {
|
|
2019
2064
|
constructor(e) {
|
|
2020
2065
|
this.data = e;
|
|
2021
2066
|
}
|
|
2022
2067
|
async get(e) {
|
|
2023
|
-
let n = await
|
|
2024
|
-
return r ?
|
|
2068
|
+
let n = await Zs(e), r = on(new Uint8Array(this.data, 20), n);
|
|
2069
|
+
return r ? Qs(r) : null;
|
|
2025
2070
|
}
|
|
2026
2071
|
};
|
|
2027
|
-
var
|
|
2072
|
+
var Zs = async (t) => {
|
|
2028
2073
|
let n = new TextEncoder().encode(t), r = await crypto.subtle.digest("SHA-256", n.buffer);
|
|
2029
2074
|
return new Uint8Array(r, 0, 16);
|
|
2030
2075
|
};
|
|
2031
|
-
var
|
|
2076
|
+
var on = (t, e) => {
|
|
2032
2077
|
if (t.byteLength === 0) return false;
|
|
2033
2078
|
let n = t.byteOffset + (t.byteLength / 40 >> 1) * 40, r = new Uint8Array(t.buffer, n, 16);
|
|
2034
2079
|
if (r.byteLength !== e.byteLength) throw new TypeError("Search value and current value are of different lengths");
|
|
2035
|
-
let s =
|
|
2080
|
+
let s = Xs(e, r);
|
|
2036
2081
|
if (s < 0) {
|
|
2037
2082
|
let o = t.byteOffset, i = n - t.byteOffset;
|
|
2038
|
-
return
|
|
2083
|
+
return on(new Uint8Array(t.buffer, o, i), e);
|
|
2039
2084
|
} else if (s > 0) {
|
|
2040
2085
|
let o = n + 40, i = t.buffer.byteLength - n - 40;
|
|
2041
|
-
return
|
|
2086
|
+
return on(new Uint8Array(t.buffer, o, i), e);
|
|
2042
2087
|
} else return new Uint8Array(t.buffer, n, 40);
|
|
2043
2088
|
};
|
|
2044
|
-
var
|
|
2089
|
+
var Xs = (t, e) => {
|
|
2045
2090
|
if (t.byteLength < e.byteLength) return -1;
|
|
2046
2091
|
if (t.byteLength > e.byteLength) return 1;
|
|
2047
2092
|
for (let [n, r] of t.entries()) {
|
|
@@ -2050,12 +2095,9 @@ var vs = (t, e) => {
|
|
|
2050
2095
|
}
|
|
2051
2096
|
return 0;
|
|
2052
2097
|
};
|
|
2053
|
-
var
|
|
2054
|
-
var
|
|
2055
|
-
|
|
2056
|
-
return t?.run_worker_first !== void 0 ? e = t?.run_worker_first : t?.serve_directly !== void 0 ? e = !t.serve_directly : e = false, { html_handling: t?.html_handling ?? "auto-trailing-slash", not_found_handling: t?.not_found_handling ?? "none", run_worker_first: e, serve_directly: !e };
|
|
2057
|
-
};
|
|
2058
|
-
var Ve = class {
|
|
2098
|
+
var Qs = (t) => [...t.slice(16, 16 + 16)].map((n) => n.toString(16).padStart(2, "0")).join("");
|
|
2099
|
+
var an = (t) => ({ compatibility_date: t?.compatibility_date ?? "2021-11-02", compatibility_flags: t?.compatibility_flags ?? [], html_handling: t?.html_handling ?? "auto-trailing-slash", not_found_handling: t?.not_found_handling ?? "none", redirects: t?.redirects ?? { version: 1, staticRules: {}, rules: {} }, headers: t?.headers ?? { version: 2, rules: {} }, account_id: t?.account_id ?? -1, script_id: t?.script_id ?? -1 });
|
|
2100
|
+
var nt = class {
|
|
2059
2101
|
constructor(e) {
|
|
2060
2102
|
this.data = {};
|
|
2061
2103
|
this.readyAnalytics = e;
|
|
@@ -2070,89 +2112,166 @@ var Ve = class {
|
|
|
2070
2112
|
this.readyAnalytics && this.readyAnalytics.logEvent({ version: 1, accountId: this.data.accountId, indexId: this.data.experimentName, doubles: [this.data.manifestReadTime ?? -1], blobs: [] });
|
|
2071
2113
|
}
|
|
2072
2114
|
};
|
|
2073
|
-
var
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2115
|
+
var ur = "public, max-age=0, must-revalidate";
|
|
2116
|
+
var eo = /[-/\\^$*+?.()|[\]{}]/g;
|
|
2117
|
+
var to = (t) => t.replace(eo, "\\$&");
|
|
2118
|
+
var no = /(?<=^https:\\\/\\\/[^/]*?):([A-Za-z]\w*)(?=\\)/g;
|
|
2119
|
+
var ro = /:([A-Za-z]\w*)/g;
|
|
2120
|
+
var rt = (t, e) => {
|
|
2121
|
+
for (let [n, r] of Object.entries(e)) t = t.replaceAll(`:${n}`, r);
|
|
2122
|
+
return t;
|
|
2123
|
+
};
|
|
2124
|
+
var st = (t, e = (n) => n) => {
|
|
2125
|
+
if (!t) return () => [];
|
|
2126
|
+
let n = Object.entries(t).map(([r, s]) => {
|
|
2127
|
+
let o = r.startsWith("https://");
|
|
2128
|
+
r = r.split("*").map(to).join("(?<splat>.*)");
|
|
2129
|
+
let i = r.matchAll(no);
|
|
2130
|
+
for (let c of i) r = r.split(c[0]).join(`(?<${c[1]}>[^/.]+)`);
|
|
2131
|
+
let a = r.matchAll(ro);
|
|
2132
|
+
for (let c of a) r = r.split(c[0]).join(`(?<${c[1]}>[^/]+)`);
|
|
2133
|
+
r = "^" + r + "$";
|
|
2134
|
+
try {
|
|
2135
|
+
let c = new RegExp(r);
|
|
2136
|
+
return [{ crossHost: o, regExp: c }, s];
|
|
2137
|
+
} catch {
|
|
2138
|
+
}
|
|
2139
|
+
}).filter((r) => r !== void 0);
|
|
2140
|
+
return ({ request: r }) => {
|
|
2141
|
+
let { pathname: s, hostname: o } = new URL(r.url);
|
|
2142
|
+
return n.map(([{ crossHost: i, regExp: a }, c]) => {
|
|
2143
|
+
let u = i ? `https://${o}${s}` : s, l = a.exec(u);
|
|
2144
|
+
if (l) return e(c, l.groups || {});
|
|
2145
|
+
}).filter((i) => i !== void 0);
|
|
2146
|
+
};
|
|
2147
|
+
};
|
|
2148
|
+
function lr(t, e, n) {
|
|
2149
|
+
let r = new Headers({ ETag: `"${t}"` });
|
|
2150
|
+
return e !== void 0 && r.append("Content-Type", e), so(n) && r.append("Cache-Control", ur), r;
|
|
2077
2151
|
}
|
|
2078
|
-
function
|
|
2152
|
+
function so(t) {
|
|
2079
2153
|
return !t.headers.has("Authorization") && !t.headers.has("Range");
|
|
2080
2154
|
}
|
|
2081
|
-
|
|
2082
|
-
let
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2155
|
+
function pr(t, e, n) {
|
|
2156
|
+
let s = st(n.headers?.version === dr ? n.headers.rules : {}, ({ set: i = {}, unset: a = [] }, c) => {
|
|
2157
|
+
let u = {};
|
|
2158
|
+
return Object.keys(i).forEach((l) => {
|
|
2159
|
+
u[l] = rt(i[l], c);
|
|
2160
|
+
}), { set: u, unset: a };
|
|
2161
|
+
})({ request: t }), o = /* @__PURE__ */ new Set();
|
|
2162
|
+
return s.forEach(({ set: i = {}, unset: a = [] }) => {
|
|
2163
|
+
a.forEach((c) => {
|
|
2164
|
+
e.headers.delete(c);
|
|
2165
|
+
}), Object.keys(i).forEach((c) => {
|
|
2166
|
+
o.has(c.toLowerCase()) ? e.headers.append(c, i[c]) : (e.headers.set(c, i[c]), o.add(c.toLowerCase()));
|
|
2167
|
+
});
|
|
2168
|
+
}), e;
|
|
2169
|
+
}
|
|
2170
|
+
var oo = 1;
|
|
2171
|
+
var dr = 2;
|
|
2172
|
+
var fr = async (t, e, n, r) => {
|
|
2173
|
+
let s = new URL(t.url), { host: o, search: i } = s, { pathname: a } = s, c = () => {
|
|
2174
|
+
let I = n.redirects.staticRules[`https://${o}${a}`], w = n.redirects.staticRules[a];
|
|
2175
|
+
return I && w ? I.lineNumber < w.lineNumber ? I : w : I || w;
|
|
2176
|
+
}, u = () => st(n.redirects.version === oo ? n.redirects.rules : {}, ({ status: I, to: w }, N) => ({ status: I, to: rt(w, N) })), l = c() || u()({ request: t })[0], p = false;
|
|
2177
|
+
if (l) if (l.status === 200) a = new URL(l.to, t.url).pathname, p = true;
|
|
2178
|
+
else {
|
|
2179
|
+
let { status: I, to: w } = l, N = new URL(w, t.url), pe = N.origin === new URL(t.url).origin ? `${N.pathname}${N.search || i}${N.hash}` : `${N.href.slice(0, N.href.length - (N.search.length + N.hash.length))}${N.search ? N.search : i}${N.hash}`;
|
|
2180
|
+
switch (I) {
|
|
2181
|
+
case ee.status:
|
|
2182
|
+
return new ee(pe);
|
|
2183
|
+
case ne.status:
|
|
2184
|
+
return new ne(pe);
|
|
2185
|
+
case F.status:
|
|
2186
|
+
return new F(pe);
|
|
2187
|
+
case re.status:
|
|
2188
|
+
return new re(pe);
|
|
2189
|
+
case te.status:
|
|
2190
|
+
default:
|
|
2191
|
+
return new te(pe);
|
|
2192
|
+
}
|
|
2193
|
+
}
|
|
2194
|
+
let m = po(a), d = await gr(m, n, r);
|
|
2195
|
+
if (!d) {
|
|
2196
|
+
let I = p ? new D() : new fe();
|
|
2197
|
+
return e.JAEGER.enterSpan("no_intent", (w) => (w.setTags({ decodedPathname: m, configuration: JSON.stringify(n), proxied: p, status: I.status }), I));
|
|
2198
|
+
}
|
|
2199
|
+
let g = t.method.toUpperCase();
|
|
2200
|
+
if (!["GET", "HEAD"].includes(g)) return e.JAEGER.enterSpan("method_not_allowed", (I) => (I.setTags({ method: g, status: X.status }), new X()));
|
|
2201
|
+
let Z = d.redirect ?? m, T = fo(Z);
|
|
2202
|
+
return T !== a && d.asset || d.redirect ? e.JAEGER.enterSpan("redirect", (I) => (I.setTags({ originalPath: a, location: T !== a ? T : d.redirect ?? "<unknown>", status: F.status }), new F(T + i))) : d.asset ? d.asset : e.JAEGER.enterSpan("unknown_action", (I) => (I.setTags({ pathname: a, status: M.status }), new M(new Error("Unknown action"))));
|
|
2203
|
+
};
|
|
2204
|
+
var io = async (t, e, n, r) => {
|
|
2205
|
+
let { pathname: s } = new URL(e.url), o = e.method.toUpperCase(), i = await n.JAEGER.enterSpan("getByETag", async (p) => (p.setTags({ pathname: s, eTag: t.eTag, status: t.status }), await r(t.eTag))), a = lr(t.eTag, i.contentType, e), c = `"${t.eTag}"`, u = `W/${c}`, l = e.headers.get("If-None-Match") || "";
|
|
2206
|
+
return [u, c].includes(l) ? n.JAEGER.enterSpan("matched_etag", (p) => (p.setTags({ matchedEtag: l, status: Q.status }), new Q(null, { headers: a }))) : n.JAEGER.enterSpan("response", (p) => {
|
|
2207
|
+
p.setTags({ etag: t.eTag, status: t.status, head: o === "HEAD" });
|
|
2208
|
+
let m = o === "HEAD" ? null : i.readableStream;
|
|
2209
|
+
switch (t.status) {
|
|
2210
|
+
case D.status:
|
|
2211
|
+
return new D(m, { headers: a });
|
|
2212
|
+
case S.status:
|
|
2213
|
+
return new S(m, { headers: a });
|
|
2100
2214
|
}
|
|
2101
2215
|
});
|
|
2102
2216
|
};
|
|
2103
|
-
var
|
|
2217
|
+
var mr = async (t, e, n, r) => !(await fr(t, e, { ...n, not_found_handling: "none" }, r) instanceof fe);
|
|
2218
|
+
var hr = async (t, e, n, r, s) => {
|
|
2219
|
+
let o = await fr(t, e, n, r), i = o instanceof Response ? o : await io(o, t, e, s);
|
|
2220
|
+
return pr(t, i, n);
|
|
2221
|
+
};
|
|
2222
|
+
var gr = async (t, e, n, r = false) => {
|
|
2104
2223
|
switch (e.html_handling) {
|
|
2105
2224
|
case "auto-trailing-slash":
|
|
2106
|
-
return
|
|
2225
|
+
return ao(t, e, n, r);
|
|
2107
2226
|
case "force-trailing-slash":
|
|
2108
|
-
return
|
|
2227
|
+
return co(t, e, n, r);
|
|
2109
2228
|
case "drop-trailing-slash":
|
|
2110
|
-
return
|
|
2229
|
+
return uo(t, e, n, r);
|
|
2111
2230
|
case "none":
|
|
2112
|
-
return
|
|
2231
|
+
return lo(t, e, n);
|
|
2113
2232
|
}
|
|
2114
2233
|
};
|
|
2115
|
-
var
|
|
2234
|
+
var ao = async (t, e, n, r) => {
|
|
2116
2235
|
let s = null, o = null, i = await n(t);
|
|
2117
2236
|
if (t.endsWith("/index")) {
|
|
2118
|
-
if (i) return { asset: { eTag: i, status:
|
|
2237
|
+
if (i) return { asset: { eTag: i, status: S.status }, redirect: null };
|
|
2119
2238
|
if (s = await E(`${t}.html`, t.slice(0, -5), e, n, r)) return s;
|
|
2120
2239
|
if (s = await E(`${t.slice(0, -6)}.html`, t.slice(0, -6), e, n, r)) return s;
|
|
2121
2240
|
} else if (t.endsWith("/index.html")) {
|
|
2122
2241
|
if (s = await E(t, t.slice(0, -10), e, n, r)) return s;
|
|
2123
2242
|
if (s = await E(`${t.slice(0, -11)}.html`, t.slice(0, -11), e, n, r)) return s;
|
|
2124
2243
|
} else if (t.endsWith("/")) {
|
|
2125
|
-
if (o = await n(`${t}index.html`)) return { asset: { eTag: o, status:
|
|
2244
|
+
if (o = await n(`${t}index.html`)) return { asset: { eTag: o, status: S.status }, redirect: null };
|
|
2126
2245
|
if (s = await E(`${t.slice(0, -1)}.html`, t.slice(0, -1), e, n, r)) return s;
|
|
2127
2246
|
} else if (t.endsWith(".html")) {
|
|
2128
2247
|
if (s = await E(t, t.slice(0, -5), e, n, r)) return s;
|
|
2129
2248
|
if (s = await E(`${t.slice(0, -5)}/index.html`, `${t.slice(0, -5)}/`, e, n, r)) return s;
|
|
2130
2249
|
}
|
|
2131
|
-
return i ? { asset: { eTag: i, status:
|
|
2250
|
+
return i ? { asset: { eTag: i, status: S.status }, redirect: null } : (o = await n(`${t}.html`)) ? { asset: { eTag: o, status: S.status }, redirect: null } : (s = await E(`${t}/index.html`, `${t}/`, e, n, r)) ? s : ot(t, e, n);
|
|
2132
2251
|
};
|
|
2133
|
-
var
|
|
2252
|
+
var co = async (t, e, n, r) => {
|
|
2134
2253
|
let s = null, o = null, i = await n(t);
|
|
2135
2254
|
if (t.endsWith("/index")) {
|
|
2136
|
-
if (i) return { asset: { eTag: i, status:
|
|
2255
|
+
if (i) return { asset: { eTag: i, status: S.status }, redirect: null };
|
|
2137
2256
|
if (s = await E(`${t}.html`, t.slice(0, -5), e, n, r)) return s;
|
|
2138
2257
|
if (s = await E(`${t.slice(0, -6)}.html`, t.slice(0, -5), e, n, r)) return s;
|
|
2139
2258
|
} else if (t.endsWith("/index.html")) {
|
|
2140
2259
|
if (s = await E(t, t.slice(0, -10), e, n, r)) return s;
|
|
2141
2260
|
if (s = await E(`${t.slice(0, -11)}.html`, t.slice(0, -10), e, n, r)) return s;
|
|
2142
2261
|
} else if (t.endsWith("/")) {
|
|
2143
|
-
if (o = await n(`${t}index.html`)) return { asset: { eTag: o, status:
|
|
2144
|
-
if (o = await n(`${t.slice(0, -1)}.html`)) return { asset: { eTag: o, status:
|
|
2262
|
+
if (o = await n(`${t}index.html`)) return { asset: { eTag: o, status: S.status }, redirect: null };
|
|
2263
|
+
if (o = await n(`${t.slice(0, -1)}.html`)) return { asset: { eTag: o, status: S.status }, redirect: null };
|
|
2145
2264
|
} else if (t.endsWith(".html")) {
|
|
2146
2265
|
if (s = await E(t, `${t.slice(0, -5)}/`, e, n, r)) return s;
|
|
2147
|
-
if (i) return { asset: { eTag: i, status:
|
|
2266
|
+
if (i) return { asset: { eTag: i, status: S.status }, redirect: null };
|
|
2148
2267
|
if (s = await E(`${t.slice(0, -5)}/index.html`, `${t.slice(0, -5)}/`, e, n, r)) return s;
|
|
2149
2268
|
}
|
|
2150
|
-
return i ? { asset: { eTag: i, status:
|
|
2269
|
+
return i ? { asset: { eTag: i, status: S.status }, redirect: null } : (s = await E(`${t}.html`, `${t}/`, e, n, r)) || (s = await E(`${t}/index.html`, `${t}/`, e, n, r)) ? s : ot(t, e, n);
|
|
2151
2270
|
};
|
|
2152
|
-
var
|
|
2271
|
+
var uo = async (t, e, n, r) => {
|
|
2153
2272
|
let s = null, o = null, i = await n(t);
|
|
2154
2273
|
if (t.endsWith("/index")) {
|
|
2155
|
-
if (i) return { asset: { eTag: i, status:
|
|
2274
|
+
if (i) return { asset: { eTag: i, status: S.status }, redirect: null };
|
|
2156
2275
|
if (t === "/index") {
|
|
2157
2276
|
if (s = await E("/index.html", "/", e, n, r)) return s;
|
|
2158
2277
|
} else {
|
|
@@ -2163,11 +2282,11 @@ var ks = async (t, e, n, r) => {
|
|
|
2163
2282
|
if (s = await E("/index.html", "/", e, n, r)) return s;
|
|
2164
2283
|
} else {
|
|
2165
2284
|
if (s = await E(t, t.slice(0, -11), e, n, r)) return s;
|
|
2166
|
-
if (i) return { asset: { eTag: i, status:
|
|
2285
|
+
if (i) return { asset: { eTag: i, status: S.status }, redirect: null };
|
|
2167
2286
|
if (s = await E(`${t.slice(0, -11)}.html`, t.slice(0, -11), e, n, r)) return s;
|
|
2168
2287
|
}
|
|
2169
2288
|
else if (t.endsWith("/")) if (t === "/") {
|
|
2170
|
-
if (o = await n("/index.html")) return { asset: { eTag: o, status:
|
|
2289
|
+
if (o = await n("/index.html")) return { asset: { eTag: o, status: S.status }, redirect: null };
|
|
2171
2290
|
} else {
|
|
2172
2291
|
if (s = await E(`${t.slice(0, -1)}.html`, t.slice(0, -1), e, n, r)) return s;
|
|
2173
2292
|
if (s = await E(`${t.slice(0, -1)}/index.html`, t.slice(0, -1), e, n, r)) return s;
|
|
@@ -2176,24 +2295,24 @@ var ks = async (t, e, n, r) => {
|
|
|
2176
2295
|
if (s = await E(t, t.slice(0, -5), e, n, r)) return s;
|
|
2177
2296
|
if (s = await E(`${t.slice(0, -5)}/index.html`, t.slice(0, -5), e, n, r)) return s;
|
|
2178
2297
|
}
|
|
2179
|
-
return i ? { asset: { eTag: i, status:
|
|
2298
|
+
return i ? { asset: { eTag: i, status: S.status }, redirect: null } : (o = await n(`${t}.html`)) ? { asset: { eTag: o, status: S.status }, redirect: null } : (o = await n(`${t}/index.html`)) ? { asset: { eTag: o, status: S.status }, redirect: null } : ot(t, e, n);
|
|
2180
2299
|
};
|
|
2181
|
-
var
|
|
2300
|
+
var lo = async (t, e, n) => {
|
|
2182
2301
|
let r = await n(t);
|
|
2183
|
-
return r ? { asset: { eTag: r, status:
|
|
2302
|
+
return r ? { asset: { eTag: r, status: S.status }, redirect: null } : ot(t, e, n);
|
|
2184
2303
|
};
|
|
2185
|
-
var
|
|
2304
|
+
var ot = async (t, e, n) => {
|
|
2186
2305
|
switch (e.not_found_handling) {
|
|
2187
2306
|
case "single-page-application": {
|
|
2188
2307
|
let r = await n("/index.html");
|
|
2189
|
-
return r ? { asset: { eTag: r, status:
|
|
2308
|
+
return r ? { asset: { eTag: r, status: S.status }, redirect: null } : null;
|
|
2190
2309
|
}
|
|
2191
2310
|
case "404-page": {
|
|
2192
2311
|
let r = t;
|
|
2193
2312
|
for (; r; ) {
|
|
2194
2313
|
r = r.slice(0, r.lastIndexOf("/"));
|
|
2195
2314
|
let s = await n(`${r}/404.html`);
|
|
2196
|
-
if (s) return { asset: { eTag: s, status:
|
|
2315
|
+
if (s) return { asset: { eTag: s, status: D.status }, redirect: null };
|
|
2197
2316
|
}
|
|
2198
2317
|
return null;
|
|
2199
2318
|
}
|
|
@@ -2205,26 +2324,26 @@ var Ke = async (t, e, n) => {
|
|
|
2205
2324
|
var E = async (t, e, n, r, s) => {
|
|
2206
2325
|
if (s) return null;
|
|
2207
2326
|
if (!await r(e)) {
|
|
2208
|
-
let o = await
|
|
2327
|
+
let o = await gr(e, n, r, true);
|
|
2209
2328
|
if (o?.asset && o.asset.eTag === await r(t)) return { asset: null, redirect: e };
|
|
2210
2329
|
}
|
|
2211
2330
|
return null;
|
|
2212
2331
|
};
|
|
2213
|
-
var
|
|
2332
|
+
var po = (t) => t.split("/").map((e) => {
|
|
2214
2333
|
try {
|
|
2215
2334
|
return decodeURIComponent(e);
|
|
2216
2335
|
} catch {
|
|
2217
2336
|
return e;
|
|
2218
2337
|
}
|
|
2219
|
-
}).join("/");
|
|
2220
|
-
var
|
|
2338
|
+
}).join("/").replace(/\/+/g, "/");
|
|
2339
|
+
var fo = (t) => t.split("/").map((e) => {
|
|
2221
2340
|
try {
|
|
2222
2341
|
return encodeURIComponent(e);
|
|
2223
2342
|
} catch {
|
|
2224
2343
|
return e;
|
|
2225
2344
|
}
|
|
2226
2345
|
}).join("/");
|
|
2227
|
-
async function
|
|
2346
|
+
async function _r(t, e, n, r = 1) {
|
|
2228
2347
|
let s = 0;
|
|
2229
2348
|
for (; s <= r; ) try {
|
|
2230
2349
|
let o = await t.getWithMetadata(e, { type: "stream", cacheTtl: 31536e3 });
|
|
@@ -2241,57 +2360,56 @@ async function Wn(t, e, n, r = 1) {
|
|
|
2241
2360
|
await new Promise((i) => setTimeout(i, Math.pow(2, s++) * 1e3));
|
|
2242
2361
|
}
|
|
2243
2362
|
}
|
|
2244
|
-
|
|
2363
|
+
function ho(t, e, n) {
|
|
2364
|
+
try {
|
|
2365
|
+
let r = new M(n);
|
|
2366
|
+
return t && t.captureException(n), n instanceof Error && e.setData({ error: n.message }), r;
|
|
2367
|
+
} catch (r) {
|
|
2368
|
+
return console.error("Error handling error", r), new M(r);
|
|
2369
|
+
}
|
|
2370
|
+
}
|
|
2371
|
+
function go(t, e, n) {
|
|
2372
|
+
try {
|
|
2373
|
+
t.setData({ requestTime: e.now() - n }), t.write();
|
|
2374
|
+
} catch (r) {
|
|
2375
|
+
console.error("Error submitting metrics", r);
|
|
2376
|
+
}
|
|
2377
|
+
}
|
|
2378
|
+
var Er = class extends mo {
|
|
2245
2379
|
async fetch(t) {
|
|
2246
|
-
let e, n = new
|
|
2380
|
+
let e, n = new Qe(this.env.ANALYTICS), r = new de(this.env.UNSAFE_PERFORMANCE), s = r.now();
|
|
2247
2381
|
try {
|
|
2248
|
-
this.env.JAEGER
|
|
2249
|
-
let o =
|
|
2382
|
+
this.env.JAEGER ??= sn(), e = cr(t, this.ctx, this.env.SENTRY_DSN, this.env.SENTRY_ACCESS_CLIENT_ID, this.env.SENTRY_ACCESS_CLIENT_SECRET, this.env.COLO_METADATA, this.env.VERSION_METADATA, this.env.CONFIG?.account_id, this.env.CONFIG?.script_id);
|
|
2383
|
+
let o = an(this.env.CONFIG), i = t.headers.get("user-agent") ?? "UA UNKNOWN", a = new URL(t.url);
|
|
2250
2384
|
return this.env.COLO_METADATA && this.env.VERSION_METADATA && this.env.CONFIG && n.setData({ accountId: this.env.CONFIG.account_id, scriptId: this.env.CONFIG.script_id, coloId: this.env.COLO_METADATA.coloId, metalId: this.env.COLO_METADATA.metalId, coloTier: this.env.COLO_METADATA.coloTier, coloRegion: this.env.COLO_METADATA.coloRegion, version: this.env.VERSION_METADATA.tag, hostname: a.hostname, htmlHandling: o.html_handling, notFoundHandling: o.not_found_handling, userAgent: i }), await this.env.JAEGER.enterSpan("handleRequest", async (c) => {
|
|
2251
2385
|
c.setTags({ hostname: a.hostname, eyeballPath: a.pathname, env: this.env.ENVIRONMENT, version: this.env.VERSION_METADATA?.id });
|
|
2252
|
-
let u = await
|
|
2386
|
+
let u = await hr(t, this.env, o, this.unstable_exists.bind(this), this.unstable_getByETag.bind(this));
|
|
2253
2387
|
return n.setData({ status: u.status }), u;
|
|
2254
2388
|
});
|
|
2255
2389
|
} catch (o) {
|
|
2256
|
-
return
|
|
2390
|
+
return ho(e, n, o);
|
|
2257
2391
|
} finally {
|
|
2258
|
-
|
|
2259
|
-
}
|
|
2260
|
-
}
|
|
2261
|
-
handleError(t, e, n) {
|
|
2262
|
-
try {
|
|
2263
|
-
let r = new $(n);
|
|
2264
|
-
return t && t.captureException(n), n instanceof Error && e.setData({ error: n.message }), r;
|
|
2265
|
-
} catch (r) {
|
|
2266
|
-
return console.error("Error handling error", r), new $(r);
|
|
2267
|
-
}
|
|
2268
|
-
}
|
|
2269
|
-
submitMetrics(t, e, n) {
|
|
2270
|
-
try {
|
|
2271
|
-
t.setData({ requestTime: e.now() - n }), t.write();
|
|
2272
|
-
} catch (r) {
|
|
2273
|
-
console.error("Error submitting metrics", r);
|
|
2392
|
+
go(n, r, s);
|
|
2274
2393
|
}
|
|
2275
2394
|
}
|
|
2276
2395
|
async unstable_canFetch(t) {
|
|
2277
|
-
|
|
2278
|
-
return await We(n, { ...Bt(this.env.CONFIG), not_found_handling: "none" }, this.unstable_exists.bind(this)) !== null;
|
|
2396
|
+
return this.env.JAEGER ??= sn(), mr(t, this.env, an(this.env.CONFIG), this.unstable_exists.bind(this));
|
|
2279
2397
|
}
|
|
2280
2398
|
async unstable_getByETag(t) {
|
|
2281
|
-
let e = await
|
|
2399
|
+
let e = await _r(this.env.ASSETS_KV_NAMESPACE, t);
|
|
2282
2400
|
if (!e || !e.value) throw new Error(`Requested asset ${t} exists in the asset manifest but not in the KV namespace.`);
|
|
2283
|
-
return { readableStream: e.value, contentType: e.metadata?.contentType
|
|
2401
|
+
return { readableStream: e.value, contentType: e.metadata?.contentType };
|
|
2284
2402
|
}
|
|
2285
2403
|
async unstable_getByPathname(t) {
|
|
2286
2404
|
let e = await this.unstable_exists(t);
|
|
2287
2405
|
return e ? this.unstable_getByETag(e) : null;
|
|
2288
2406
|
}
|
|
2289
2407
|
async unstable_exists(t) {
|
|
2290
|
-
let e = new
|
|
2408
|
+
let e = new nt(this.env.EXPERIMENT_ANALYTICS), n = new de(this.env.UNSAFE_PERFORMANCE);
|
|
2291
2409
|
this.env.COLO_METADATA && this.env.VERSION_METADATA && this.env.CONFIG && e.setData({ accountId: this.env.CONFIG.account_id, experimentName: "manifest-read-timing" });
|
|
2292
2410
|
let r = n.now();
|
|
2293
2411
|
try {
|
|
2294
|
-
return await new
|
|
2412
|
+
return await new tt(this.env.ASSETS_MANIFEST).get(t);
|
|
2295
2413
|
} finally {
|
|
2296
2414
|
e.setData({ manifestReadTime: n.now() - r }), e.write();
|
|
2297
2415
|
}
|
|
@@ -2306,7 +2424,7 @@ var UNKNOWN_HOST = "http://localhost";
|
|
|
2306
2424
|
var MODULE_PATTERN = `__CLOUDFLARE_MODULE__(${MODULE_TYPES.join("|")})__(.*?)__`;
|
|
2307
2425
|
|
|
2308
2426
|
// src/asset-workers/asset-worker.ts
|
|
2309
|
-
var CustomAssetWorker = class extends
|
|
2427
|
+
var CustomAssetWorker = class extends Er {
|
|
2310
2428
|
async fetch(request) {
|
|
2311
2429
|
const response = await super.fetch(request);
|
|
2312
2430
|
const modifiedResponse = new Response(response.body, response);
|