@cloudflare/vite-plugin 0.0.8 → 0.1.0

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