@useknest/widget-core 0.0.1-alpha.6 → 0.0.1-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6,12 +6,12 @@ function Wn(t = tn) {
6
6
  function qn(t = tn) {
7
7
  return `${t}${en}/widget-config`;
8
8
  }
9
- const Yn = "Sorry, I didn't get a response.", ie = "Unknown error occurred", Ra = "https://useknest.com/default-avatar.svg", ka = "#0d7a7f", Aa = "Hi! I'm your AI assistant. I'm trained to answer questions about your documentation. How can I help you today?", xa = [
9
+ const Yn = "Sorry, I didn't get a response.", ie = "Unknown error occurred", zn = "This domain is not authorized. Please add it to your allowed origins in the Knest dashboard.", ka = "https://useknest.com/default-avatar.svg", Aa = "#0d7a7f", xa = "Hi! I'm your AI assistant. I'm trained to answer questions about your documentation. How can I help you today?", Oa = [
10
10
  "How do I get started?",
11
11
  "What features are available?",
12
12
  "How do I integrate this?"
13
13
  ];
14
- async function Oa(t, e) {
14
+ async function Na(t, e) {
15
15
  try {
16
16
  const n = await fetch(qn(e), {
17
17
  method: "GET",
@@ -20,16 +20,16 @@ async function Oa(t, e) {
20
20
  }
21
21
  });
22
22
  if (n.ok)
23
- return await n.json();
24
- {
25
- const r = await n.text();
26
- return console.warn("Failed to fetch widget config:", n.status, r), null;
27
- }
23
+ return { config: await n.json(), error: null };
24
+ if (n.status === 401 || n.status === 403)
25
+ return console.warn("Widget config auth error:", n.status), { config: null, error: "auth" };
26
+ const r = await n.text();
27
+ return console.warn("Failed to fetch widget config:", n.status, r), { config: null, error: "network" };
28
28
  } catch (n) {
29
- return console.error("Error fetching widget config:", n), null;
29
+ return console.error("Error fetching widget config:", n), { config: null, error: "network" };
30
30
  }
31
31
  }
32
- async function Na(t) {
32
+ async function Ca(t) {
33
33
  const { publishableApiKey: e, content: n, threadId: r, callbacks: s, baseUrl: o } = t;
34
34
  try {
35
35
  const i = { content: n };
@@ -43,6 +43,8 @@ async function Na(t) {
43
43
  body: JSON.stringify(i)
44
44
  });
45
45
  if (!a.ok) {
46
+ if (a.status === 401 || a.status === 403)
47
+ throw new Error(zn);
46
48
  const m = await a.json();
47
49
  throw new Error(m.error || "Failed to send message");
48
50
  }
@@ -84,7 +86,7 @@ Qe.setOptions({
84
86
  breaks: !0,
85
87
  gfm: !0
86
88
  });
87
- function Ca(t) {
89
+ function Da(t) {
88
90
  return t.split(/\n\s*\n/).map((n) => n.trim()).filter((n) => n).map((n) => ({
89
91
  html: Qe.parseInline(n)
90
92
  }));
@@ -101,7 +103,7 @@ function J(t, e, n = _) {
101
103
  const r = n.__SENTRY__ = n.__SENTRY__ || {}, s = r[P] = r[P] || {};
102
104
  return s[t] || (s[t] = e());
103
105
  }
104
- const zn = [
106
+ const Xn = [
105
107
  "debug",
106
108
  "info",
107
109
  "warn",
@@ -109,7 +111,7 @@ const zn = [
109
111
  "log",
110
112
  "assert",
111
113
  "trace"
112
- ], Xn = "Sentry Logger ", lt = {};
114
+ ], Kn = "Sentry Logger ", lt = {};
113
115
  function Y(t) {
114
116
  if (!("console" in _))
115
117
  return t();
@@ -126,27 +128,27 @@ function Y(t) {
126
128
  });
127
129
  }
128
130
  }
129
- function Kn() {
131
+ function Vn() {
130
132
  Yt().enabled = !0;
131
133
  }
132
- function Vn() {
134
+ function Jn() {
133
135
  Yt().enabled = !1;
134
136
  }
135
137
  function nn() {
136
138
  return Yt().enabled;
137
139
  }
138
- function Jn(...t) {
140
+ function Zn(...t) {
139
141
  qt("log", ...t);
140
142
  }
141
- function Zn(...t) {
143
+ function Qn(...t) {
142
144
  qt("warn", ...t);
143
145
  }
144
- function Qn(...t) {
146
+ function tr(...t) {
145
147
  qt("error", ...t);
146
148
  }
147
149
  function qt(t, ...e) {
148
150
  h && nn() && Y(() => {
149
- _.console[t](`${Xn}[${t}]:`, ...e);
151
+ _.console[t](`${Kn}[${t}]:`, ...e);
150
152
  });
151
153
  }
152
154
  function Yt() {
@@ -154,17 +156,17 @@ function Yt() {
154
156
  }
155
157
  const p = {
156
158
  /** Enable logging. */
157
- enable: Kn,
159
+ enable: Vn,
158
160
  /** Disable logging. */
159
- disable: Vn,
161
+ disable: Jn,
160
162
  /** Check if logging is enabled. */
161
163
  isEnabled: nn,
162
164
  /** Log a message. */
163
- log: Jn,
165
+ log: Zn,
164
166
  /** Log a warning. */
165
- warn: Zn,
167
+ warn: Qn,
166
168
  /** Log an error. */
167
- error: Qn
169
+ error: tr
168
170
  }, rn = 50, M = "?", ae = /\(error: (.*)\)/, ce = /captureMessage|captureException/;
169
171
  function sn(...t) {
170
172
  const e = t.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
@@ -188,13 +190,13 @@ function sn(...t) {
188
190
  break;
189
191
  }
190
192
  }
191
- return er(o.slice(s));
193
+ return nr(o.slice(s));
192
194
  };
193
195
  }
194
- function tr(t) {
196
+ function er(t) {
195
197
  return Array.isArray(t) ? sn(...t) : t;
196
198
  }
197
- function er(t) {
199
+ function nr(t) {
198
200
  if (!t.length)
199
201
  return [];
200
202
  const e = Array.from(t);
@@ -259,11 +261,11 @@ Error:`,
259
261
  }
260
262
  }
261
263
  let vt = null;
262
- function nr(t) {
264
+ function rr(t) {
263
265
  const e = "error";
264
- j(e, t), B(e, rr);
266
+ j(e, t), B(e, sr);
265
267
  }
266
- function rr() {
268
+ function sr() {
267
269
  vt = _.onerror, _.onerror = function(t, e, n, r, s) {
268
270
  return v("error", {
269
271
  column: r,
@@ -275,11 +277,11 @@ function rr() {
275
277
  }, _.onerror.__SENTRY_INSTRUMENTED__ = !0;
276
278
  }
277
279
  let wt = null;
278
- function sr(t) {
280
+ function or(t) {
279
281
  const e = "unhandledrejection";
280
- j(e, t), B(e, or);
282
+ j(e, t), B(e, ir);
281
283
  }
282
- function or() {
284
+ function ir() {
283
285
  wt = _.onunhandledrejection, _.onunhandledrejection = function(t) {
284
286
  return v("unhandledrejection", t), wt ? wt.apply(this, arguments) : !0;
285
287
  }, _.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0;
@@ -305,7 +307,7 @@ function an(t) {
305
307
  function le(t) {
306
308
  return z(t, "DOMError");
307
309
  }
308
- function ir(t) {
310
+ function ar(t) {
309
311
  return z(t, "DOMException");
310
312
  }
311
313
  function A(t) {
@@ -323,16 +325,16 @@ function K(t) {
323
325
  function _t(t) {
324
326
  return typeof Event < "u" && N(t, Event);
325
327
  }
326
- function ar(t) {
328
+ function cr(t) {
327
329
  return typeof Element < "u" && N(t, Element);
328
330
  }
329
- function cr(t) {
331
+ function ur(t) {
330
332
  return z(t, "RegExp");
331
333
  }
332
334
  function yt(t) {
333
335
  return !!(t?.then && typeof t.then == "function");
334
336
  }
335
- function ur(t) {
337
+ function fr(t) {
336
338
  return K(t) && "nativeEvent" in t && "preventDefault" in t && "stopPropagation" in t;
337
339
  }
338
340
  function N(t, e) {
@@ -345,10 +347,10 @@ function N(t, e) {
345
347
  function cn(t) {
346
348
  return !!(typeof t == "object" && t !== null && (t.__isVue || t._isVue));
347
349
  }
348
- function fr(t) {
350
+ function lr(t) {
349
351
  return typeof Request < "u" && N(t, Request);
350
352
  }
351
- const Vt = _, lr = 80;
353
+ const Vt = _, dr = 80;
352
354
  function un(t, e = {}) {
353
355
  if (!t)
354
356
  return "<unknown>";
@@ -358,15 +360,15 @@ function un(t, e = {}) {
358
360
  let o = 0, i = 0;
359
361
  const a = " > ", c = a.length;
360
362
  let u;
361
- const f = Array.isArray(e) ? e : e.keyAttrs, l = !Array.isArray(e) && e.maxStringLength || lr;
362
- for (; n && o++ < r && (u = dr(n, f), !(u === "html" || o > 1 && i + s.length * c + u.length >= l)); )
363
+ const f = Array.isArray(e) ? e : e.keyAttrs, l = !Array.isArray(e) && e.maxStringLength || dr;
364
+ for (; n && o++ < r && (u = pr(n, f), !(u === "html" || o > 1 && i + s.length * c + u.length >= l)); )
363
365
  s.push(u), i += u.length, n = n.parentNode;
364
366
  return s.reverse().join(a);
365
367
  } catch {
366
368
  return "<unknown>";
367
369
  }
368
370
  }
369
- function dr(t, e) {
371
+ function pr(t, e) {
370
372
  const n = t, r = [];
371
373
  if (!n?.tagName)
372
374
  return "";
@@ -405,7 +407,7 @@ function Jt() {
405
407
  return "";
406
408
  }
407
409
  }
408
- function pr(t) {
410
+ function hr(t) {
409
411
  if (!Vt.HTMLElement)
410
412
  return null;
411
413
  let e = t;
@@ -440,11 +442,11 @@ function de(t, e) {
440
442
  }
441
443
  return n.join(e);
442
444
  }
443
- function hr(t, e, n = !1) {
444
- return A(t) ? cr(e) ? e.test(t) : A(e) ? n ? t === e : t.includes(e) : !1 : !1;
445
+ function mr(t, e, n = !1) {
446
+ return A(t) ? ur(e) ? e.test(t) : A(e) ? n ? t === e : t.includes(e) : !1 : !1;
445
447
  }
446
448
  function Et(t, e = [], n = !1) {
447
- return e.some((r) => hr(t, r, n));
449
+ return e.some((r) => mr(t, r, n));
448
450
  }
449
451
  function T(t, e, n) {
450
452
  if (!(e in t))
@@ -503,7 +505,7 @@ function ln(t) {
503
505
  }
504
506
  function pe(t) {
505
507
  try {
506
- return ar(t) ? un(t) : Object.prototype.toString.call(t);
508
+ return cr(t) ? un(t) : Object.prototype.toString.call(t);
507
509
  } catch {
508
510
  return "<unknown>";
509
511
  }
@@ -517,7 +519,7 @@ function he(t) {
517
519
  } else
518
520
  return {};
519
521
  }
520
- function mr(t, e = 40) {
522
+ function gr(t, e = 40) {
521
523
  const n = Object.keys(ln(t));
522
524
  n.sort();
523
525
  const r = n[0];
@@ -532,11 +534,11 @@ function mr(t, e = 40) {
532
534
  }
533
535
  return "";
534
536
  }
535
- function gr() {
537
+ function _r() {
536
538
  const t = _;
537
539
  return t.crypto || t.msCrypto;
538
540
  }
539
- function I(t = gr()) {
541
+ function I(t = _r()) {
540
542
  let e = () => Math.random() * 16;
541
543
  try {
542
544
  if (t?.randomUUID)
@@ -580,7 +582,7 @@ function H(t, e) {
580
582
  }
581
583
  }
582
584
  function me(t) {
583
- if (_r(t))
585
+ if (yr(t))
584
586
  return !0;
585
587
  try {
586
588
  F(t, "__sentry_captured__", !0);
@@ -588,7 +590,7 @@ function me(t) {
588
590
  }
589
591
  return !1;
590
592
  }
591
- function _r(t) {
593
+ function yr(t) {
592
594
  try {
593
595
  return t.__sentry_captured__;
594
596
  } catch {
@@ -598,7 +600,7 @@ const pn = 1e3;
598
600
  function Z() {
599
601
  return Date.now() / pn;
600
602
  }
601
- function yr() {
603
+ function Er() {
602
604
  const { performance: t } = _;
603
605
  if (!t?.now || !t.timeOrigin)
604
606
  return Z;
@@ -607,9 +609,9 @@ function yr() {
607
609
  }
608
610
  let ge;
609
611
  function x() {
610
- return (ge ?? (ge = yr()))();
612
+ return (ge ?? (ge = Er()))();
611
613
  }
612
- function Er(t) {
614
+ function Sr(t) {
613
615
  const e = x(), n = {
614
616
  sid: I(),
615
617
  init: !0,
@@ -619,7 +621,7 @@ function Er(t) {
619
621
  status: "ok",
620
622
  errors: 0,
621
623
  ignoreDuration: !1,
622
- toJSON: () => br(n)
624
+ toJSON: () => Tr(n)
623
625
  };
624
626
  return t && G(n, t), n;
625
627
  }
@@ -634,11 +636,11 @@ function G(t, e = {}) {
634
636
  }
635
637
  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);
636
638
  }
637
- function Sr(t, e) {
639
+ function br(t, e) {
638
640
  let n = {};
639
641
  t.status === "ok" && (n = { status: "exited" }), G(t, n);
640
642
  }
641
- function br(t) {
643
+ function Tr(t) {
642
644
  return {
643
645
  sid: `${t.sid}`,
644
646
  init: t.init,
@@ -681,7 +683,7 @@ function ye(t, e) {
681
683
  function Ee(t) {
682
684
  return t[Ct];
683
685
  }
684
- const Tr = 100;
686
+ const Ir = 100;
685
687
  class w {
686
688
  /** Flag if notifying is happening. */
687
689
  /** Callback for client to receive scope changes. */
@@ -885,7 +887,7 @@ class w {
885
887
  * By default, the last 100 breadcrumbs are kept.
886
888
  */
887
889
  addBreadcrumb(e, n) {
888
- const r = typeof n == "number" ? n : Tr;
890
+ const r = typeof n == "number" ? n : Ir;
889
891
  if (r <= 0)
890
892
  return this;
891
893
  const s = {
@@ -1019,13 +1021,13 @@ class w {
1019
1021
  }), this._notifyingListeners = !1);
1020
1022
  }
1021
1023
  }
1022
- function Ir() {
1024
+ function vr() {
1023
1025
  return J("defaultCurrentScope", () => new w());
1024
1026
  }
1025
- function vr() {
1027
+ function wr() {
1026
1028
  return J("defaultIsolationScope", () => new w());
1027
1029
  }
1028
- class wr {
1030
+ class Rr {
1029
1031
  constructor(e, n) {
1030
1032
  let r;
1031
1033
  e ? r = e : r = new w();
@@ -1093,23 +1095,23 @@ class wr {
1093
1095
  }
1094
1096
  function W() {
1095
1097
  const t = mt(), e = gt(t);
1096
- return e.stack = e.stack || new wr(Ir(), vr());
1098
+ return e.stack = e.stack || new Rr(vr(), wr());
1097
1099
  }
1098
- function Rr(t) {
1100
+ function kr(t) {
1099
1101
  return W().withScope(t);
1100
1102
  }
1101
- function kr(t, e) {
1103
+ function Ar(t, e) {
1102
1104
  const n = W();
1103
1105
  return n.withScope(() => (n.getStackTop().scope = t, e(t)));
1104
1106
  }
1105
1107
  function Se(t) {
1106
1108
  return W().withScope(() => t(W().getIsolationScope()));
1107
1109
  }
1108
- function Ar() {
1110
+ function xr() {
1109
1111
  return {
1110
1112
  withIsolationScope: Se,
1111
- withScope: Rr,
1112
- withSetScope: kr,
1113
+ withScope: kr,
1114
+ withSetScope: Ar,
1113
1115
  withSetIsolationScope: (t, e) => Se(e),
1114
1116
  getCurrentScope: () => W().getScope(),
1115
1117
  getIsolationScope: () => W().getIsolationScope()
@@ -1117,7 +1119,7 @@ function Ar() {
1117
1119
  }
1118
1120
  function Qt(t) {
1119
1121
  const e = gt(t);
1120
- return e.acs ? e.acs : Ar();
1122
+ return e.acs ? e.acs : xr();
1121
1123
  }
1122
1124
  function D() {
1123
1125
  const t = mt();
@@ -1127,10 +1129,10 @@ function tt() {
1127
1129
  const t = mt();
1128
1130
  return Qt(t).getIsolationScope();
1129
1131
  }
1130
- function xr() {
1132
+ function Or() {
1131
1133
  return J("globalScope", () => new w());
1132
1134
  }
1133
- function Or(...t) {
1135
+ function Nr(...t) {
1134
1136
  const e = mt(), n = Qt(e);
1135
1137
  if (t.length === 2) {
1136
1138
  const [r, s] = t;
@@ -1141,28 +1143,28 @@ function Or(...t) {
1141
1143
  function b() {
1142
1144
  return D().getClient();
1143
1145
  }
1144
- function Nr(t) {
1146
+ function Cr(t) {
1145
1147
  const e = t.getPropagationContext(), { traceId: n, parentSpanId: r, propagationSpanId: s } = e, o = {
1146
1148
  trace_id: n,
1147
1149
  span_id: s || hn()
1148
1150
  };
1149
1151
  return r && (o.parent_span_id = r), o;
1150
1152
  }
1151
- const Cr = "sentry.source", Dr = "sentry.sample_rate", Lr = "sentry.previous_trace_sample_rate", Pr = "sentry.op", Mr = "sentry.origin", mn = "sentry.profile_id", gn = "sentry.exclusive_time", Fr = 0, $r = 1, Ur = "_sentryScope", jr = "_sentryIsolationScope";
1153
+ const Dr = "sentry.source", Lr = "sentry.sample_rate", Pr = "sentry.previous_trace_sample_rate", Mr = "sentry.op", Fr = "sentry.origin", mn = "sentry.profile_id", gn = "sentry.exclusive_time", $r = 0, Ur = 1, jr = "_sentryScope", Br = "_sentryIsolationScope";
1152
1154
  function _n(t) {
1153
1155
  return {
1154
- scope: t[Ur],
1155
- isolationScope: t[jr]
1156
+ scope: t[jr],
1157
+ isolationScope: t[Br]
1156
1158
  };
1157
1159
  }
1158
- const Br = "sentry-", Hr = /^sentry-/;
1159
- function Gr(t) {
1160
- const e = Wr(t);
1160
+ const Hr = "sentry-", Gr = /^sentry-/;
1161
+ function Wr(t) {
1162
+ const e = qr(t);
1161
1163
  if (!e)
1162
1164
  return;
1163
1165
  const n = Object.entries(e).reduce((r, [s, o]) => {
1164
- if (s.match(Hr)) {
1165
- const i = s.slice(Br.length);
1166
+ if (s.match(Gr)) {
1167
+ const i = s.slice(Hr.length);
1166
1168
  r[i] = o;
1167
1169
  }
1168
1170
  return r;
@@ -1170,7 +1172,7 @@ function Gr(t) {
1170
1172
  if (Object.keys(n).length > 0)
1171
1173
  return n;
1172
1174
  }
1173
- function Wr(t) {
1175
+ function qr(t) {
1174
1176
  if (!(!t || !A(t) && !Array.isArray(t)))
1175
1177
  return Array.isArray(t) ? t.reduce((e, n) => {
1176
1178
  const r = be(n);
@@ -1190,7 +1192,7 @@ function be(t) {
1190
1192
  })
1191
1193
  ).reduce((e, [n, r]) => (n && r && (e[n] = r), e), {});
1192
1194
  }
1193
- function qr(t) {
1195
+ function Yr(t) {
1194
1196
  if (typeof t == "boolean")
1195
1197
  return Number(t);
1196
1198
  const e = typeof t == "string" ? parseFloat(t) : t;
@@ -1199,7 +1201,7 @@ function qr(t) {
1199
1201
  }
1200
1202
  const yn = 1;
1201
1203
  let Te = !1;
1202
- function Yr(t) {
1204
+ function zr(t) {
1203
1205
  const { spanId: e, traceId: n, isRemote: r } = t.spanContext(), s = r ? e : te(t).parent_span_id, o = _n(t).scope, i = r ? o?.getPropagationContext().propagationSpanId || hn() : e;
1204
1206
  return {
1205
1207
  parent_span_id: s,
@@ -1207,7 +1209,7 @@ function Yr(t) {
1207
1209
  trace_id: n
1208
1210
  };
1209
1211
  }
1210
- function zr(t) {
1212
+ function Xr(t) {
1211
1213
  if (t && t.length > 0)
1212
1214
  return t.map(({ context: { spanId: e, traceId: n, traceFlags: r, ...s }, attributes: o }) => ({
1213
1215
  span_id: e,
@@ -1224,10 +1226,10 @@ function ve(t) {
1224
1226
  return t > 9999999999 ? t / 1e3 : t;
1225
1227
  }
1226
1228
  function te(t) {
1227
- if (Kr(t))
1229
+ if (Vr(t))
1228
1230
  return t.getSpanJSON();
1229
1231
  const { spanId: e, traceId: n } = t.spanContext();
1230
- if (Xr(t)) {
1232
+ if (Kr(t)) {
1231
1233
  const { attributes: r, startTime: s, name: o, endTime: i, status: a, links: c } = t, u = "parentSpanId" in t ? t.parentSpanId : "parentSpanContext" in t ? t.parentSpanContext?.spanId : void 0;
1232
1234
  return {
1233
1235
  span_id: e,
@@ -1238,10 +1240,10 @@ function te(t) {
1238
1240
  start_timestamp: Ie(s),
1239
1241
  // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time
1240
1242
  timestamp: Ie(i) || void 0,
1241
- status: Jr(a),
1242
- op: r[Pr],
1243
- origin: r[Mr],
1244
- links: zr(c)
1243
+ status: Zr(a),
1244
+ op: r[Mr],
1245
+ origin: r[Fr],
1246
+ links: Xr(c)
1245
1247
  };
1246
1248
  }
1247
1249
  return {
@@ -1251,24 +1253,24 @@ function te(t) {
1251
1253
  data: {}
1252
1254
  };
1253
1255
  }
1254
- function Xr(t) {
1256
+ function Kr(t) {
1255
1257
  const e = t;
1256
1258
  return !!e.attributes && !!e.startTime && !!e.name && !!e.endTime && !!e.status;
1257
1259
  }
1258
- function Kr(t) {
1260
+ function Vr(t) {
1259
1261
  return typeof t.getSpanJSON == "function";
1260
1262
  }
1261
- function Vr(t) {
1263
+ function Jr(t) {
1262
1264
  const { traceFlags: e } = t.spanContext();
1263
1265
  return e === yn;
1264
1266
  }
1265
- function Jr(t) {
1266
- if (!(!t || t.code === Fr))
1267
- return t.code === $r ? "ok" : t.message || "unknown_error";
1267
+ function Zr(t) {
1268
+ if (!(!t || t.code === $r))
1269
+ return t.code === Ur ? "ok" : t.message || "unknown_error";
1268
1270
  }
1269
- const Zr = "_sentryRootSpan";
1271
+ const Qr = "_sentryRootSpan";
1270
1272
  function En(t) {
1271
- return t[Zr] || t;
1273
+ return t[Qr] || t;
1272
1274
  }
1273
1275
  function we() {
1274
1276
  Te || (Y(() => {
@@ -1277,23 +1279,23 @@ function we() {
1277
1279
  );
1278
1280
  }), Te = !0);
1279
1281
  }
1280
- function Qr(t) {
1282
+ function ts(t) {
1281
1283
  if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__)
1282
1284
  return !1;
1283
1285
  const e = t || b()?.getOptions();
1284
1286
  return !!e && // Note: This check is `!= null`, meaning "nullish". `0` is not "nullish", `undefined` and `null` are. (This comment was brought to you by 15 minutes of questioning life)
1285
1287
  (e.tracesSampleRate != null || !!e.tracesSampler);
1286
1288
  }
1287
- const ee = "production", ts = /^o(\d+)\./, es = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
1288
- function ns(t) {
1289
+ const ee = "production", es = /^o(\d+)\./, ns = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
1290
+ function rs(t) {
1289
1291
  return t === "http" || t === "https";
1290
1292
  }
1291
1293
  function St(t, e = !1) {
1292
1294
  const { host: n, path: r, pass: s, port: o, projectId: i, protocol: a, publicKey: c } = t;
1293
1295
  return `${a}://${c}${e && s ? `:${s}` : ""}@${n}${o ? `:${o}` : ""}/${r && `${r}/`}${i}`;
1294
1296
  }
1295
- function rs(t) {
1296
- const e = es.exec(t);
1297
+ function ss(t) {
1298
+ const e = ns.exec(t);
1297
1299
  if (!e) {
1298
1300
  Y(() => {
1299
1301
  console.error(`Invalid Sentry Dsn: ${t}`);
@@ -1320,25 +1322,25 @@ function Sn(t) {
1320
1322
  projectId: t.projectId
1321
1323
  };
1322
1324
  }
1323
- function ss(t) {
1325
+ function os(t) {
1324
1326
  if (!h)
1325
1327
  return !0;
1326
1328
  const { port: e, projectId: n, protocol: r } = t;
1327
- return ["protocol", "publicKey", "host", "projectId"].find((i) => t[i] ? !1 : (p.error(`Invalid Sentry Dsn: ${i} missing`), !0)) ? !1 : n.match(/^\d+$/) ? ns(r) ? e && isNaN(parseInt(e, 10)) ? (p.error(`Invalid Sentry Dsn: Invalid port ${e}`), !1) : !0 : (p.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), !1) : (p.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), !1);
1328
- }
1329
- function os(t) {
1330
- return t.match(ts)?.[1];
1329
+ return ["protocol", "publicKey", "host", "projectId"].find((i) => t[i] ? !1 : (p.error(`Invalid Sentry Dsn: ${i} missing`), !0)) ? !1 : n.match(/^\d+$/) ? rs(r) ? e && isNaN(parseInt(e, 10)) ? (p.error(`Invalid Sentry Dsn: Invalid port ${e}`), !1) : !0 : (p.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), !1) : (p.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), !1);
1331
1330
  }
1332
1331
  function is(t) {
1333
- const e = typeof t == "string" ? rs(t) : Sn(t);
1334
- if (!(!e || !ss(e)))
1332
+ return t.match(es)?.[1];
1333
+ }
1334
+ function as(t) {
1335
+ const e = typeof t == "string" ? ss(t) : Sn(t);
1336
+ if (!(!e || !os(e)))
1335
1337
  return e;
1336
1338
  }
1337
- const as = "_frozenDsc";
1339
+ const cs = "_frozenDsc";
1338
1340
  function bn(t, e) {
1339
1341
  const n = e.getOptions(), { publicKey: r, host: s } = e.getDsn() || {};
1340
1342
  let o;
1341
- n.orgId ? o = String(n.orgId) : s && (o = os(s));
1343
+ n.orgId ? o = String(n.orgId) : s && (o = is(s));
1342
1344
  const i = {
1343
1345
  environment: n.environment || ee,
1344
1346
  release: n.release,
@@ -1348,26 +1350,26 @@ function bn(t, e) {
1348
1350
  };
1349
1351
  return e.emit("createDsc", i), i;
1350
1352
  }
1351
- function cs(t, e) {
1353
+ function us(t, e) {
1352
1354
  const n = e.getPropagationContext();
1353
1355
  return n.dsc || bn(n.traceId, t);
1354
1356
  }
1355
- function us(t) {
1357
+ function fs(t) {
1356
1358
  const e = b();
1357
1359
  if (!e)
1358
1360
  return {};
1359
- const n = En(t), r = te(n), s = r.data, o = n.spanContext().traceState, i = o?.get("sentry.sample_rate") ?? s[Dr] ?? s[Lr];
1361
+ const n = En(t), r = te(n), s = r.data, o = n.spanContext().traceState, i = o?.get("sentry.sample_rate") ?? s[Lr] ?? s[Pr];
1360
1362
  function a(E) {
1361
1363
  return (typeof i == "number" || typeof i == "string") && (E.sample_rate = `${i}`), E;
1362
1364
  }
1363
- const c = n[as];
1365
+ const c = n[cs];
1364
1366
  if (c)
1365
1367
  return a(c);
1366
- const u = o?.get("sentry.dsc"), f = u && Gr(u);
1368
+ const u = o?.get("sentry.dsc"), f = u && Wr(u);
1367
1369
  if (f)
1368
1370
  return a(f);
1369
- const l = bn(t.spanContext().traceId, e), m = s[Cr], d = r.description;
1370
- return m !== "url" && d && (l.transaction = d), Qr() && (l.sampled = String(Vr(n)), l.sample_rand = // In OTEL we store the sample rand on the trace state because we cannot access scopes for NonRecordingSpans
1371
+ const l = bn(t.spanContext().traceId, e), m = s[Dr], d = r.description;
1372
+ return m !== "url" && d && (l.transaction = d), ts() && (l.sampled = String(Jr(n)), l.sample_rand = // In OTEL we store the sample rand on the trace state because we cannot access scopes for NonRecordingSpans
1371
1373
  // The Sentry OTEL SpanSampler takes care of writing the sample rand on the root span
1372
1374
  o?.get("sentry.sample_rand") ?? // On all other platforms we can actually get the scopes from a root span (we use this as a fallback)
1373
1375
  _n(n).scope?.getPropagationContext().sampleRand.toString()), a(l), e.emit("createDsc", l, n), l;
@@ -1381,14 +1383,14 @@ function k(t, e = 100, n = 1 / 0) {
1381
1383
  }
1382
1384
  function Tn(t, e = 3, n = 100 * 1024) {
1383
1385
  const r = k(t, e);
1384
- return ps(r) > n ? Tn(t, e - 1, n) : r;
1386
+ return hs(r) > n ? Tn(t, e - 1, n) : r;
1385
1387
  }
1386
- function Dt(t, e, n = 1 / 0, r = 1 / 0, s = hs()) {
1388
+ function Dt(t, e, n = 1 / 0, r = 1 / 0, s = ms()) {
1387
1389
  const [o, i] = s;
1388
1390
  if (e == null || // this matches null and undefined -> eqeq not eqeqeq
1389
1391
  ["boolean", "string"].includes(typeof e) || typeof e == "number" && Number.isFinite(e))
1390
1392
  return e;
1391
- const a = fs(t, e);
1393
+ const a = ls(t, e);
1392
1394
  if (!a.startsWith("[object "))
1393
1395
  return a;
1394
1396
  if (e.__sentry_skip_normalization__)
@@ -1420,7 +1422,7 @@ function Dt(t, e, n = 1 / 0, r = 1 / 0, s = hs()) {
1420
1422
  }
1421
1423
  return i(e), f;
1422
1424
  }
1423
- function fs(t, e) {
1425
+ function ls(t, e) {
1424
1426
  try {
1425
1427
  if (t === "domain" && e && typeof e == "object" && e._events)
1426
1428
  return "[Domain]";
@@ -1434,7 +1436,7 @@ function fs(t, e) {
1434
1436
  return "[Document]";
1435
1437
  if (cn(e))
1436
1438
  return "[VueViewModel]";
1437
- if (ur(e))
1439
+ if (fr(e))
1438
1440
  return "[SyntheticEvent]";
1439
1441
  if (typeof e == "number" && !Number.isFinite(e))
1440
1442
  return `[${e}]`;
@@ -1444,23 +1446,23 @@ function fs(t, e) {
1444
1446
  return `[${String(e)}]`;
1445
1447
  if (typeof e == "bigint")
1446
1448
  return `[BigInt: ${String(e)}]`;
1447
- const n = ls(e);
1449
+ const n = ds(e);
1448
1450
  return /^HTML(\w*)Element$/.test(n) ? `[HTMLElement: ${n}]` : `[object ${n}]`;
1449
1451
  } catch (n) {
1450
1452
  return `**non-serializable** (${n})`;
1451
1453
  }
1452
1454
  }
1453
- function ls(t) {
1455
+ function ds(t) {
1454
1456
  const e = Object.getPrototypeOf(t);
1455
1457
  return e?.constructor ? e.constructor.name : "null prototype";
1456
1458
  }
1457
- function ds(t) {
1459
+ function ps(t) {
1458
1460
  return ~-encodeURI(t).split(/%..|./).length;
1459
1461
  }
1460
- function ps(t) {
1461
- return ds(JSON.stringify(t));
1462
+ function hs(t) {
1463
+ return ps(JSON.stringify(t));
1462
1464
  }
1463
- function hs() {
1465
+ function ms() {
1464
1466
  const t = /* @__PURE__ */ new WeakSet();
1465
1467
  function e(r) {
1466
1468
  return t.has(r) ? !0 : (t.add(r), !1);
@@ -1473,7 +1475,7 @@ function hs() {
1473
1475
  function et(t, e = []) {
1474
1476
  return [t, e];
1475
1477
  }
1476
- function ms(t, e) {
1478
+ function gs(t, e) {
1477
1479
  const [n, r] = t;
1478
1480
  return [n, [...r, e]];
1479
1481
  }
@@ -1490,7 +1492,7 @@ function Lt(t) {
1490
1492
  const e = gt(_);
1491
1493
  return e.encodePolyfill ? e.encodePolyfill(t) : new TextEncoder().encode(t);
1492
1494
  }
1493
- function gs(t) {
1495
+ function _s(t) {
1494
1496
  const [e, n] = t;
1495
1497
  let r = JSON.stringify(e);
1496
1498
  function s(o) {
@@ -1512,16 +1514,16 @@ ${JSON.stringify(i)}
1512
1514
  s(c);
1513
1515
  }
1514
1516
  }
1515
- return typeof r == "string" ? r : _s(r);
1517
+ return typeof r == "string" ? r : ys(r);
1516
1518
  }
1517
- function _s(t) {
1519
+ function ys(t) {
1518
1520
  const e = t.reduce((s, o) => s + o.length, 0), n = new Uint8Array(e);
1519
1521
  let r = 0;
1520
1522
  for (const s of t)
1521
1523
  n.set(s, r), r += s.length;
1522
1524
  return n;
1523
1525
  }
1524
- function ys(t) {
1526
+ function Es(t) {
1525
1527
  const e = typeof t.data == "string" ? Lt(t.data) : t.data;
1526
1528
  return [
1527
1529
  {
@@ -1534,7 +1536,7 @@ function ys(t) {
1534
1536
  e
1535
1537
  ];
1536
1538
  }
1537
- const Es = {
1539
+ const Ss = {
1538
1540
  session: "session",
1539
1541
  sessions: "session",
1540
1542
  attachment: "attachment",
@@ -1553,7 +1555,7 @@ const Es = {
1553
1555
  log: "log_item"
1554
1556
  };
1555
1557
  function ke(t) {
1556
- return Es[t];
1558
+ return Ss[t];
1557
1559
  }
1558
1560
  function In(t) {
1559
1561
  if (!t?.sdk)
@@ -1561,7 +1563,7 @@ function In(t) {
1561
1563
  const { name: e, version: n } = t.sdk;
1562
1564
  return { name: e, version: n };
1563
1565
  }
1564
- function Ss(t, e, n, r) {
1566
+ function bs(t, e, n, r) {
1565
1567
  const s = t.sdkProcessingMetadata?.dynamicSamplingContext;
1566
1568
  return {
1567
1569
  event_id: t.event_id,
@@ -1573,10 +1575,10 @@ function Ss(t, e, n, r) {
1573
1575
  }
1574
1576
  };
1575
1577
  }
1576
- function bs(t, e) {
1578
+ function Ts(t, e) {
1577
1579
  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;
1578
1580
  }
1579
- function Ts(t, e, n, r) {
1581
+ function Is(t, e, n, r) {
1580
1582
  const s = In(n), o = {
1581
1583
  sent_at: (/* @__PURE__ */ new Date()).toISOString(),
1582
1584
  ...s && { sdk: s },
@@ -1584,10 +1586,10 @@ function Ts(t, e, n, r) {
1584
1586
  }, i = "aggregates" in t ? [{ type: "sessions" }, t] : [{ type: "session" }, t.toJSON()];
1585
1587
  return et(o, [i]);
1586
1588
  }
1587
- function Is(t, e, n, r) {
1589
+ function vs(t, e, n, r) {
1588
1590
  const s = In(n), o = t.type && t.type !== "replay_event" ? t.type : "event";
1589
- bs(t, n?.sdk);
1590
- const i = Ss(t, s, r, e);
1591
+ Ts(t, n?.sdk);
1592
+ const i = bs(t, s, r, e);
1591
1593
  return delete t.sdkProcessingMetadata, et(i, [[{ type: o }, t]]);
1592
1594
  }
1593
1595
  const Rt = 0, Ae = 1, xe = 2;
@@ -1699,9 +1701,9 @@ function Pt(t, e, n, r = 0) {
1699
1701
  }
1700
1702
  });
1701
1703
  }
1702
- function vs(t, e) {
1704
+ function ws(t, e) {
1703
1705
  const { fingerprint: n, span: r, breadcrumbs: s, sdkProcessingMetadata: o } = e;
1704
- ws(t, e), r && As(t, r), xs(t, n), Rs(t, s), ks(t, o);
1706
+ Rs(t, e), r && xs(t, r), Os(t, n), ks(t, s), As(t, o);
1705
1707
  }
1706
1708
  function Oe(t, e) {
1707
1709
  const {
@@ -1724,36 +1726,36 @@ function Oe(t, e) {
1724
1726
  function rt(t, e, n) {
1725
1727
  t[e] = Q(t[e], n, 1);
1726
1728
  }
1727
- function ws(t, e) {
1729
+ function Rs(t, e) {
1728
1730
  const { extra: n, tags: r, user: s, contexts: o, level: i, transactionName: a } = e;
1729
1731
  Object.keys(n).length && (t.extra = { ...n, ...t.extra }), Object.keys(r).length && (t.tags = { ...r, ...t.tags }), Object.keys(s).length && (t.user = { ...s, ...t.user }), Object.keys(o).length && (t.contexts = { ...o, ...t.contexts }), i && (t.level = i), a && t.type !== "transaction" && (t.transaction = a);
1730
1732
  }
1731
- function Rs(t, e) {
1733
+ function ks(t, e) {
1732
1734
  const n = [...t.breadcrumbs || [], ...e];
1733
1735
  t.breadcrumbs = n.length ? n : void 0;
1734
1736
  }
1735
- function ks(t, e) {
1737
+ function As(t, e) {
1736
1738
  t.sdkProcessingMetadata = {
1737
1739
  ...t.sdkProcessingMetadata,
1738
1740
  ...e
1739
1741
  };
1740
1742
  }
1741
- function As(t, e) {
1743
+ function xs(t, e) {
1742
1744
  t.contexts = {
1743
- trace: Yr(e),
1745
+ trace: zr(e),
1744
1746
  ...t.contexts
1745
1747
  }, t.sdkProcessingMetadata = {
1746
- dynamicSamplingContext: us(e),
1748
+ dynamicSamplingContext: fs(e),
1747
1749
  ...t.sdkProcessingMetadata
1748
1750
  };
1749
1751
  const n = En(e), r = te(n).description;
1750
1752
  r && !t.transaction && t.type === "transaction" && (t.transaction = r);
1751
1753
  }
1752
- function xs(t, e) {
1754
+ function Os(t, e) {
1753
1755
  t.fingerprint = t.fingerprint ? Array.isArray(t.fingerprint) ? t.fingerprint : [t.fingerprint] : [], e && (t.fingerprint = t.fingerprint.concat(e)), t.fingerprint.length || delete t.fingerprint;
1754
1756
  }
1755
1757
  let st, Ne, ot;
1756
- function Os(t) {
1758
+ function Ns(t) {
1757
1759
  const e = _._sentryDebugIds;
1758
1760
  if (!e)
1759
1761
  return {};
@@ -1776,16 +1778,16 @@ function Os(t) {
1776
1778
  return r;
1777
1779
  }, {})), ot;
1778
1780
  }
1779
- function Ns(t, e, n, r, s, o) {
1781
+ function Cs(t, e, n, r, s, o) {
1780
1782
  const { normalizeDepth: i = 3, normalizeMaxBreadth: a = 1e3 } = t, c = {
1781
1783
  ...e,
1782
1784
  event_id: e.event_id || n.event_id || I(),
1783
1785
  timestamp: e.timestamp || Z()
1784
1786
  }, u = n.integrations || t.integrations.map((g) => g.name);
1785
- Cs(c, t), Ps(c, u), s && s.emit("applyFrameMetadata", e), e.type === void 0 && Ds(c, t.stackParser);
1786
- const f = Fs(r, n.captureContext);
1787
+ Ds(c, t), Ms(c, u), s && s.emit("applyFrameMetadata", e), e.type === void 0 && Ls(c, t.stackParser);
1788
+ const f = $s(r, n.captureContext);
1787
1789
  n.mechanism && H(c, n.mechanism);
1788
- const l = s ? s.getEventProcessors() : [], m = xr().getScopeData();
1790
+ const l = s ? s.getEventProcessors() : [], m = Or().getScopeData();
1789
1791
  if (o) {
1790
1792
  const g = o.getScopeData();
1791
1793
  Oe(m, g);
@@ -1795,29 +1797,29 @@ function Ns(t, e, n, r, s, o) {
1795
1797
  Oe(m, g);
1796
1798
  }
1797
1799
  const d = [...n.attachments || [], ...m.attachments];
1798
- d.length && (n.attachments = d), vs(c, m);
1800
+ d.length && (n.attachments = d), ws(c, m);
1799
1801
  const E = [
1800
1802
  ...l,
1801
1803
  // Run scope event processors _after_ all other processors
1802
1804
  ...m.eventProcessors
1803
1805
  ];
1804
- return Pt(E, c, n).then((g) => (g && Ls(g), typeof i == "number" && i > 0 ? Ms(g, i, a) : g));
1806
+ return Pt(E, c, n).then((g) => (g && Ps(g), typeof i == "number" && i > 0 ? Fs(g, i, a) : g));
1805
1807
  }
1806
- function Cs(t, e) {
1808
+ function Ds(t, e) {
1807
1809
  const { environment: n, release: r, dist: s, maxValueLength: o = 250 } = e;
1808
1810
  t.environment = t.environment || n || ee, !t.release && r && (t.release = r), !t.dist && s && (t.dist = s);
1809
1811
  const i = t.request;
1810
1812
  i?.url && (i.url = dt(i.url, o));
1811
1813
  }
1812
- function Ds(t, e) {
1813
- const n = Os(e);
1814
+ function Ls(t, e) {
1815
+ const n = Ns(e);
1814
1816
  t.exception?.values?.forEach((r) => {
1815
1817
  r.stacktrace?.frames?.forEach((s) => {
1816
1818
  s.filename && (s.debug_id = n[s.filename]);
1817
1819
  });
1818
1820
  });
1819
1821
  }
1820
- function Ls(t) {
1822
+ function Ps(t) {
1821
1823
  const e = {};
1822
1824
  if (t.exception?.values?.forEach((r) => {
1823
1825
  r.stacktrace?.frames?.forEach((s) => {
@@ -1835,10 +1837,10 @@ function Ls(t) {
1835
1837
  });
1836
1838
  });
1837
1839
  }
1838
- function Ps(t, e) {
1840
+ function Ms(t, e) {
1839
1841
  e.length > 0 && (t.sdk = t.sdk || {}, t.sdk.integrations = [...t.sdk.integrations || [], ...e]);
1840
1842
  }
1841
- function Ms(t, e, n) {
1843
+ function Fs(t, e, n) {
1842
1844
  if (!t)
1843
1845
  return null;
1844
1846
  const r = {
@@ -1868,22 +1870,22 @@ function Ms(t, e, n) {
1868
1870
  }
1869
1871
  }))), t.contexts?.flags && r.contexts && (r.contexts.flags = k(t.contexts.flags, 3, n)), r;
1870
1872
  }
1871
- function Fs(t, e) {
1873
+ function $s(t, e) {
1872
1874
  if (!e)
1873
1875
  return t;
1874
1876
  const n = t ? t.clone() : new w();
1875
1877
  return n.update(e), n;
1876
1878
  }
1877
- function $s(t) {
1879
+ function Us(t) {
1878
1880
  if (t)
1879
- return Us(t) ? { captureContext: t } : Bs(t) ? {
1881
+ return js(t) ? { captureContext: t } : Hs(t) ? {
1880
1882
  captureContext: t
1881
1883
  } : t;
1882
1884
  }
1883
- function Us(t) {
1885
+ function js(t) {
1884
1886
  return t instanceof w || typeof t == "function";
1885
1887
  }
1886
- const js = [
1888
+ const Bs = [
1887
1889
  "user",
1888
1890
  "level",
1889
1891
  "extra",
@@ -1892,17 +1894,17 @@ const js = [
1892
1894
  "fingerprint",
1893
1895
  "propagationContext"
1894
1896
  ];
1895
- function Bs(t) {
1896
- return Object.keys(t).some((e) => js.includes(e));
1897
+ function Hs(t) {
1898
+ return Object.keys(t).some((e) => Bs.includes(e));
1897
1899
  }
1898
1900
  function vn(t, e) {
1899
- return D().captureException(t, $s(e));
1901
+ return D().captureException(t, Us(e));
1900
1902
  }
1901
1903
  function wn(t, e) {
1902
1904
  return D().captureEvent(t, e);
1903
1905
  }
1904
1906
  function Ce(t) {
1905
- const e = tt(), n = D(), { userAgent: r } = _.navigator || {}, s = Er({
1907
+ const e = tt(), n = D(), { userAgent: r } = _.navigator || {}, s = Sr({
1906
1908
  user: n.getUser() || e.getUser(),
1907
1909
  ...r && { userAgent: r },
1908
1910
  ...t
@@ -1911,7 +1913,7 @@ function Ce(t) {
1911
1913
  }
1912
1914
  function Rn() {
1913
1915
  const t = tt(), n = D().getSession() || t.getSession();
1914
- n && Sr(n), kn(), t.setSession();
1916
+ n && br(n), kn(), t.setSession();
1915
1917
  }
1916
1918
  function kn() {
1917
1919
  const t = tt(), e = b(), n = t.getSession();
@@ -1924,32 +1926,32 @@ function De(t = !1) {
1924
1926
  }
1925
1927
  kn();
1926
1928
  }
1927
- const Hs = "7";
1928
- function Gs(t) {
1929
+ const Gs = "7";
1930
+ function Ws(t) {
1929
1931
  const e = t.protocol ? `${t.protocol}:` : "", n = t.port ? `:${t.port}` : "";
1930
1932
  return `${e}//${t.host}${n}${t.path ? `/${t.path}` : ""}/api/`;
1931
1933
  }
1932
- function Ws(t) {
1933
- return `${Gs(t)}${t.projectId}/envelope/`;
1934
+ function qs(t) {
1935
+ return `${Ws(t)}${t.projectId}/envelope/`;
1934
1936
  }
1935
- function qs(t, e) {
1937
+ function Ys(t, e) {
1936
1938
  const n = {
1937
- sentry_version: Hs
1939
+ sentry_version: Gs
1938
1940
  };
1939
1941
  return t.publicKey && (n.sentry_key = t.publicKey), e && (n.sentry_client = `${e.name}/${e.version}`), new URLSearchParams(n).toString();
1940
1942
  }
1941
- function Ys(t, e, n) {
1942
- return e || `${Ws(t)}?${qs(t, n)}`;
1943
+ function zs(t, e, n) {
1944
+ return e || `${qs(t)}?${Ys(t, n)}`;
1943
1945
  }
1944
1946
  const Le = [];
1945
- function zs(t) {
1947
+ function Xs(t) {
1946
1948
  const e = {};
1947
1949
  return t.forEach((n) => {
1948
1950
  const { name: r } = n, s = e[r];
1949
1951
  s && !s.isDefaultInstance && n.isDefaultInstance || (e[r] = n);
1950
1952
  }), Object.values(e);
1951
1953
  }
1952
- function Xs(t) {
1954
+ function Ks(t) {
1953
1955
  const e = t.defaultIntegrations || [], n = t.integrations;
1954
1956
  e.forEach((s) => {
1955
1957
  s.isDefaultInstance = !0;
@@ -1962,9 +1964,9 @@ function Xs(t) {
1962
1964
  r = Array.isArray(s) ? s : [s];
1963
1965
  } else
1964
1966
  r = e;
1965
- return zs(r);
1967
+ return Xs(r);
1966
1968
  }
1967
- function Ks(t, e) {
1969
+ function Vs(t, e) {
1968
1970
  const n = {};
1969
1971
  return e.forEach((r) => {
1970
1972
  r && An(t, r, n);
@@ -1991,7 +1993,7 @@ function An(t, e, n) {
1991
1993
  }
1992
1994
  h && p.log(`Integration installed: ${e.name}`);
1993
1995
  }
1994
- function Vs(t, e, n) {
1996
+ function Js(t, e, n) {
1995
1997
  const r = [
1996
1998
  { type: "client_report" },
1997
1999
  {
@@ -2011,7 +2013,7 @@ function xn(t) {
2011
2013
  }
2012
2014
  return e;
2013
2015
  }
2014
- function Js(t) {
2016
+ function Zs(t) {
2015
2017
  const { trace_id: e, parent_span_id: n, span_id: r, status: s, origin: o, data: i, op: a } = t.contexts?.trace ?? {};
2016
2018
  return {
2017
2019
  data: i ?? {},
@@ -2030,7 +2032,7 @@ function Js(t) {
2030
2032
  is_segment: !0
2031
2033
  };
2032
2034
  }
2033
- function Zs(t) {
2035
+ function Qs(t) {
2034
2036
  return {
2035
2037
  type: "transaction",
2036
2038
  timestamp: t.timestamp,
@@ -2073,7 +2075,7 @@ function $e(t) {
2073
2075
  function Ue(t) {
2074
2076
  return !!t && typeof t == "object" && Nn in t;
2075
2077
  }
2076
- class Qs {
2078
+ class to {
2077
2079
  /** Options passed to the SDK. */
2078
2080
  /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */
2079
2081
  /** Array of set up integrations. */
@@ -2086,8 +2088,8 @@ class Qs {
2086
2088
  * @param options Options for the client.
2087
2089
  */
2088
2090
  constructor(e) {
2089
- if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = is(e.dsn) : h && p.warn("No DSN provided, client will not send events."), this._dsn) {
2090
- const n = Ys(
2091
+ if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = as(e.dsn) : h && p.warn("No DSN provided, client will not send events."), this._dsn) {
2092
+ const n = zs(
2091
2093
  this._dsn,
2092
2094
  e.tunnel,
2093
2095
  e._metadata ? e._metadata.sdk : void 0
@@ -2260,9 +2262,9 @@ class Qs {
2260
2262
  */
2261
2263
  sendEvent(e, n = {}) {
2262
2264
  this.emit("beforeSendEvent", e, n);
2263
- let r = Is(e, this._dsn, this._options._metadata, this._options.tunnel);
2265
+ let r = vs(e, this._dsn, this._options._metadata, this._options.tunnel);
2264
2266
  for (const o of n.attachments || [])
2265
- r = ms(r, ys(o));
2267
+ r = gs(r, Es(o));
2266
2268
  const s = this.sendEnvelope(r);
2267
2269
  s && s.then((o) => this.emit("afterSendEvent", e, o), null);
2268
2270
  }
@@ -2286,7 +2288,7 @@ class Qs {
2286
2288
  e.release = e.release || n, e.environment = e.environment || r;
2287
2289
  }
2288
2290
  this.emit("beforeSendSession", e);
2289
- const s = Ts(e, this._dsn, this._options._metadata, this._options.tunnel);
2291
+ const s = Is(e, this._dsn, this._options._metadata, this._options.tunnel);
2290
2292
  this.sendEnvelope(s);
2291
2293
  }
2292
2294
  /**
@@ -2332,7 +2334,7 @@ class Qs {
2332
2334
  /** Setup integrations for this client. */
2333
2335
  _setupIntegrations() {
2334
2336
  const { integrations: e } = this._options;
2335
- this._integrations = Ks(this, e), Pe(this, e);
2337
+ this._integrations = Vs(this, e), Pe(this, e);
2336
2338
  }
2337
2339
  /** Updates existing session based on the provided event */
2338
2340
  _updateSessionFromEvent(e, n) {
@@ -2390,14 +2392,14 @@ class Qs {
2390
2392
  */
2391
2393
  _prepareEvent(e, n, r, s) {
2392
2394
  const o = this.getOptions(), i = Object.keys(this._integrations);
2393
- return !n.integrations && i?.length && (n.integrations = i), this.emit("preprocessEvent", e, n), e.type || s.setLastEventId(e.event_id || n.event_id), Ns(o, e, n, r, this, s).then((a) => {
2395
+ return !n.integrations && i?.length && (n.integrations = i), this.emit("preprocessEvent", e, n), e.type || s.setLastEventId(e.event_id || n.event_id), Cs(o, e, n, r, this, s).then((a) => {
2394
2396
  if (a === null)
2395
2397
  return a;
2396
2398
  this.emit("postprocessEvent", a, n), a.contexts = {
2397
- trace: Nr(r),
2399
+ trace: Cr(r),
2398
2400
  ...a.contexts
2399
2401
  };
2400
- const c = cs(this, r);
2402
+ const c = us(this, r);
2401
2403
  return a.sdkProcessingMetadata = {
2402
2404
  dynamicSamplingContext: c,
2403
2405
  ...a.sdkProcessingMetadata
@@ -2432,7 +2434,7 @@ class Qs {
2432
2434
  * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.
2433
2435
  */
2434
2436
  _processEvent(e, n, r, s) {
2435
- const o = this.getOptions(), { sampleRate: i } = o, a = Cn(e), c = Mt(e), u = e.type || "error", f = `before send for type \`${u}\``, l = typeof i > "u" ? void 0 : qr(i);
2437
+ const o = this.getOptions(), { sampleRate: i } = o, a = Cn(e), c = Mt(e), u = e.type || "error", f = `before send for type \`${u}\``, l = typeof i > "u" ? void 0 : Yr(i);
2436
2438
  if (c && typeof l == "number" && Math.random() > l)
2437
2439
  return this.recordDroppedEvent("sample_rate", "error"), pt(
2438
2440
  kt(
@@ -2445,8 +2447,8 @@ class Qs {
2445
2447
  throw this.recordDroppedEvent("event_processor", m), kt("An event processor returned `null`, will not send event.");
2446
2448
  if (n.data && n.data.__sentry__ === !0)
2447
2449
  return d;
2448
- const R = eo(this, o, d, n);
2449
- return to(R, f);
2450
+ const R = no(this, o, d, n);
2451
+ return eo(R, f);
2450
2452
  }).then((d) => {
2451
2453
  if (d === null) {
2452
2454
  if (this.recordDroppedEvent("before_send", m), a) {
@@ -2519,14 +2521,14 @@ Reason: ${d}`
2519
2521
  return;
2520
2522
  }
2521
2523
  h && p.log("Sending outcomes:", e);
2522
- const n = Vs(e, this._options.tunnel && St(this._dsn));
2524
+ const n = Js(e, this._options.tunnel && St(this._dsn));
2523
2525
  this.sendEnvelope(n);
2524
2526
  }
2525
2527
  /**
2526
2528
  * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
2527
2529
  */
2528
2530
  }
2529
- function to(t, e) {
2531
+ function eo(t, e) {
2530
2532
  const n = `${e} must return \`null\` or a valid event.`;
2531
2533
  if (yt(t))
2532
2534
  return t.then(
@@ -2543,15 +2545,15 @@ function to(t, e) {
2543
2545
  throw ut(n);
2544
2546
  return t;
2545
2547
  }
2546
- function eo(t, e, n, r) {
2548
+ function no(t, e, n, r) {
2547
2549
  const { beforeSend: s, beforeSendTransaction: o, beforeSendSpan: i } = e;
2548
2550
  let a = n;
2549
2551
  if (Mt(a) && s)
2550
2552
  return s(a, r);
2551
2553
  if (Cn(a)) {
2552
2554
  if (i) {
2553
- const c = i(Js(a));
2554
- if (c ? a = Q(n, Zs(c)) : we(), a.spans) {
2555
+ const c = i(Zs(a));
2556
+ if (c ? a = Q(n, Qs(c)) : we(), a.spans) {
2555
2557
  const u = [];
2556
2558
  for (const f of a.spans) {
2557
2559
  const l = i(f);
@@ -2579,7 +2581,7 @@ function Mt(t) {
2579
2581
  function Cn(t) {
2580
2582
  return t.type === "transaction";
2581
2583
  }
2582
- function no(t) {
2584
+ function ro(t) {
2583
2585
  return [
2584
2586
  {
2585
2587
  type: "log",
@@ -2591,38 +2593,38 @@ function no(t) {
2591
2593
  }
2592
2594
  ];
2593
2595
  }
2594
- function ro(t, e, n, r) {
2596
+ function so(t, e, n, r) {
2595
2597
  const s = {};
2596
2598
  return e?.sdk && (s.sdk = {
2597
2599
  name: e.sdk.name,
2598
2600
  version: e.sdk.version
2599
- }), n && r && (s.dsn = St(r)), et(s, [no(t)]);
2601
+ }), n && r && (s.dsn = St(r)), et(s, [ro(t)]);
2600
2602
  }
2601
2603
  function At(t, e) {
2602
- const n = so(t) ?? [];
2604
+ const n = oo(t) ?? [];
2603
2605
  if (n.length === 0)
2604
2606
  return;
2605
- const r = t.getOptions(), s = ro(n, r._metadata, r.tunnel, t.getDsn());
2607
+ const r = t.getOptions(), s = so(n, r._metadata, r.tunnel, t.getDsn());
2606
2608
  Dn().set(t, []), t.emit("flushLogs"), t.sendEnvelope(s);
2607
2609
  }
2608
- function so(t) {
2610
+ function oo(t) {
2609
2611
  return Dn().get(t);
2610
2612
  }
2611
2613
  function Dn() {
2612
2614
  return J("clientToLogBufferMap", () => /* @__PURE__ */ new WeakMap());
2613
2615
  }
2614
- function oo(t, e) {
2616
+ function io(t, e) {
2615
2617
  e.debug === !0 && (h ? p.enable() : Y(() => {
2616
2618
  console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");
2617
2619
  })), D().update(e.initialScope);
2618
2620
  const r = new t(e);
2619
- return io(r), r.init(), r;
2621
+ return ao(r), r.init(), r;
2620
2622
  }
2621
- function io(t) {
2623
+ function ao(t) {
2622
2624
  D().setClient(t);
2623
2625
  }
2624
2626
  const Ln = Symbol.for("SentryBufferFullError");
2625
- function ao(t) {
2627
+ function co(t) {
2626
2628
  const e = [];
2627
2629
  function n() {
2628
2630
  return t === void 0 || e.length < t;
@@ -2661,21 +2663,21 @@ function ao(t) {
2661
2663
  drain: o
2662
2664
  };
2663
2665
  }
2664
- const co = 60 * 1e3;
2665
- function uo(t, e = Date.now()) {
2666
+ const uo = 60 * 1e3;
2667
+ function fo(t, e = Date.now()) {
2666
2668
  const n = parseInt(`${t}`, 10);
2667
2669
  if (!isNaN(n))
2668
2670
  return n * 1e3;
2669
2671
  const r = Date.parse(`${t}`);
2670
- return isNaN(r) ? co : r - e;
2672
+ return isNaN(r) ? uo : r - e;
2671
2673
  }
2672
- function fo(t, e) {
2674
+ function lo(t, e) {
2673
2675
  return t[e] || t.all || 0;
2674
2676
  }
2675
- function lo(t, e, n = Date.now()) {
2676
- return fo(t, e) > n;
2677
+ function po(t, e, n = Date.now()) {
2678
+ return lo(t, e) > n;
2677
2679
  }
2678
- function po(t, { statusCode: e, headers: n }, r = Date.now()) {
2680
+ function ho(t, { statusCode: e, headers: n }, r = Date.now()) {
2679
2681
  const s = {
2680
2682
  ...t
2681
2683
  }, o = n?.["x-sentry-rate-limits"], i = n?.["retry-after"];
@@ -2688,12 +2690,12 @@ function po(t, { statusCode: e, headers: n }, r = Date.now()) {
2688
2690
  for (const d of u.split(";"))
2689
2691
  d === "metric_bucket" ? (!f || f.split(";").includes("custom")) && (s[d] = r + m) : s[d] = r + m;
2690
2692
  }
2691
- else i ? s.all = r + uo(i, r) : e === 429 && (s.all = r + 60 * 1e3);
2693
+ else i ? s.all = r + fo(i, r) : e === 429 && (s.all = r + 60 * 1e3);
2692
2694
  return s;
2693
2695
  }
2694
- const ho = 64;
2695
- function mo(t, e, n = ao(
2696
- t.bufferSize || ho
2696
+ const mo = 64;
2697
+ function go(t, e, n = co(
2698
+ t.bufferSize || mo
2697
2699
  )) {
2698
2700
  let r = {};
2699
2701
  const s = (i) => n.drain(i);
@@ -2701,15 +2703,15 @@ function mo(t, e, n = ao(
2701
2703
  const a = [];
2702
2704
  if (Re(i, (l, m) => {
2703
2705
  const d = ke(m);
2704
- lo(r, d) ? t.recordDroppedEvent("ratelimit_backoff", d) : a.push(l);
2706
+ po(r, d) ? t.recordDroppedEvent("ratelimit_backoff", d) : a.push(l);
2705
2707
  }), a.length === 0)
2706
2708
  return $({});
2707
2709
  const c = et(i[0], a), u = (l) => {
2708
2710
  Re(c, (m, d) => {
2709
2711
  t.recordDroppedEvent(l, ke(d));
2710
2712
  });
2711
- }, f = () => e({ body: gs(c) }).then(
2712
- (l) => (l.statusCode !== void 0 && (l.statusCode < 200 || l.statusCode >= 300) && h && p.warn(`Sentry responded with status code ${l.statusCode} to sent event.`), r = po(r, l), l),
2713
+ }, f = () => e({ body: _s(c) }).then(
2714
+ (l) => (l.statusCode !== void 0 && (l.statusCode < 200 || l.statusCode >= 300) && h && p.warn(`Sentry responded with status code ${l.statusCode} to sent event.`), r = ho(r, l), l),
2713
2715
  (l) => {
2714
2716
  throw u("network_error"), h && p.error("Encountered error running transport request:", l), l;
2715
2717
  }
@@ -2728,19 +2730,19 @@ function mo(t, e, n = ao(
2728
2730
  flush: s
2729
2731
  };
2730
2732
  }
2731
- function go(t) {
2733
+ function _o(t) {
2732
2734
  t.user?.ip_address === void 0 && (t.user = {
2733
2735
  ...t.user,
2734
2736
  ip_address: "{{auto}}"
2735
2737
  });
2736
2738
  }
2737
- function _o(t) {
2739
+ function yo(t) {
2738
2740
  "aggregates" in t ? t.attrs?.ip_address === void 0 && (t.attrs = {
2739
2741
  ...t.attrs,
2740
2742
  ip_address: "{{auto}}"
2741
2743
  }) : t.ipAddress === void 0 && (t.ipAddress = "{{auto}}");
2742
2744
  }
2743
- function yo(t, e, n = [e], r = "npm") {
2745
+ function Eo(t, e, n = [e], r = "npm") {
2744
2746
  const s = t._metadata || {};
2745
2747
  s.sdk || (s.sdk = {
2746
2748
  name: `sentry.javascript.${e}`,
@@ -2751,18 +2753,18 @@ function yo(t, e, n = [e], r = "npm") {
2751
2753
  version: P
2752
2754
  }), t._metadata = s;
2753
2755
  }
2754
- const Eo = 100;
2756
+ const So = 100;
2755
2757
  function U(t, e) {
2756
2758
  const n = b(), r = tt();
2757
2759
  if (!n) return;
2758
- const { beforeBreadcrumb: s = null, maxBreadcrumbs: o = Eo } = n.getOptions();
2760
+ const { beforeBreadcrumb: s = null, maxBreadcrumbs: o = So } = n.getOptions();
2759
2761
  if (o <= 0) return;
2760
2762
  const a = { timestamp: Z(), ...t }, c = s ? Y(() => s(a, e)) : a;
2761
2763
  c !== null && (n.emit && n.emit("beforeAddBreadcrumb", c, e), r.addBreadcrumb(c, o));
2762
2764
  }
2763
2765
  let je;
2764
- const So = "FunctionToString", Be = /* @__PURE__ */ new WeakMap(), bo = (() => ({
2765
- name: So,
2766
+ const bo = "FunctionToString", Be = /* @__PURE__ */ new WeakMap(), To = (() => ({
2767
+ name: bo,
2766
2768
  setupOnce() {
2767
2769
  je = Function.prototype.toString;
2768
2770
  try {
@@ -2776,7 +2778,7 @@ const So = "FunctionToString", Be = /* @__PURE__ */ new WeakMap(), bo = (() => (
2776
2778
  setup(t) {
2777
2779
  Be.set(t, !0);
2778
2780
  }
2779
- })), To = bo, Io = [
2781
+ })), Io = To, vo = [
2780
2782
  /^Script error\.?$/,
2781
2783
  /^Javascript error: Script error\.? on line 0$/,
2782
2784
  /^ResizeObserver loop completed with undelivered notifications.$/,
@@ -2797,10 +2799,10 @@ const So = "FunctionToString", Be = /* @__PURE__ */ new WeakMap(), bo = (() => (
2797
2799
  // unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps
2798
2800
  /^Java exception was raised during method invocation$/
2799
2801
  // error from Facebook Mobile browser (https://github.com/getsentry/sentry-javascript/issues/15065)
2800
- ], vo = "EventFilters", wo = (t = {}) => {
2802
+ ], wo = "EventFilters", Ro = (t = {}) => {
2801
2803
  let e;
2802
2804
  return {
2803
- name: vo,
2805
+ name: wo,
2804
2806
  setup(n) {
2805
2807
  const r = n.getOptions();
2806
2808
  e = He(t, r);
@@ -2810,11 +2812,11 @@ const So = "FunctionToString", Be = /* @__PURE__ */ new WeakMap(), bo = (() => (
2810
2812
  const o = s.getOptions();
2811
2813
  e = He(t, o);
2812
2814
  }
2813
- return ko(n, e) ? null : n;
2815
+ return Ao(n, e) ? null : n;
2814
2816
  }
2815
2817
  };
2816
- }, Ro = ((t = {}) => ({
2817
- ...wo(t),
2818
+ }, ko = ((t = {}) => ({
2819
+ ...Ro(t),
2818
2820
  name: "InboundFilters"
2819
2821
  }));
2820
2822
  function He(t = {}, e = {}) {
@@ -2824,32 +2826,32 @@ function He(t = {}, e = {}) {
2824
2826
  ignoreErrors: [
2825
2827
  ...t.ignoreErrors || [],
2826
2828
  ...e.ignoreErrors || [],
2827
- ...t.disableErrorDefaults ? [] : Io
2829
+ ...t.disableErrorDefaults ? [] : vo
2828
2830
  ],
2829
2831
  ignoreTransactions: [...t.ignoreTransactions || [], ...e.ignoreTransactions || []]
2830
2832
  };
2831
2833
  }
2832
- function ko(t, e) {
2834
+ function Ao(t, e) {
2833
2835
  if (t.type) {
2834
- if (t.type === "transaction" && xo(t, e.ignoreTransactions))
2836
+ if (t.type === "transaction" && Oo(t, e.ignoreTransactions))
2835
2837
  return h && p.warn(
2836
2838
  `Event dropped due to being matched by \`ignoreTransactions\` option.
2837
2839
  Event: ${L(t)}`
2838
2840
  ), !0;
2839
2841
  } else {
2840
- if (Ao(t, e.ignoreErrors))
2842
+ if (xo(t, e.ignoreErrors))
2841
2843
  return h && p.warn(
2842
2844
  `Event dropped due to being matched by \`ignoreErrors\` option.
2843
2845
  Event: ${L(t)}`
2844
2846
  ), !0;
2845
- if (Do(t))
2847
+ if (Lo(t))
2846
2848
  return h && p.warn(
2847
2849
  `Event dropped due to not having an error message, error type or stacktrace.
2848
2850
  Event: ${L(
2849
2851
  t
2850
2852
  )}`
2851
2853
  ), !0;
2852
- if (Oo(t, e.denyUrls))
2854
+ if (No(t, e.denyUrls))
2853
2855
  return h && p.warn(
2854
2856
  `Event dropped due to being matched by \`denyUrls\` option.
2855
2857
  Event: ${L(
@@ -2857,7 +2859,7 @@ Event: ${L(
2857
2859
  )}.
2858
2860
  Url: ${ht(t)}`
2859
2861
  ), !0;
2860
- if (!No(t, e.allowUrls))
2862
+ if (!Co(t, e.allowUrls))
2861
2863
  return h && p.warn(
2862
2864
  `Event dropped due to not being matched by \`allowUrls\` option.
2863
2865
  Event: ${L(
@@ -2868,28 +2870,28 @@ Url: ${ht(t)}`
2868
2870
  }
2869
2871
  return !1;
2870
2872
  }
2871
- function Ao(t, e) {
2873
+ function xo(t, e) {
2872
2874
  return e?.length ? xn(t).some((n) => Et(n, e)) : !1;
2873
2875
  }
2874
- function xo(t, e) {
2876
+ function Oo(t, e) {
2875
2877
  if (!e?.length)
2876
2878
  return !1;
2877
2879
  const n = t.transaction;
2878
2880
  return n ? Et(n, e) : !1;
2879
2881
  }
2880
- function Oo(t, e) {
2882
+ function No(t, e) {
2881
2883
  if (!e?.length)
2882
2884
  return !1;
2883
2885
  const n = ht(t);
2884
2886
  return n ? Et(n, e) : !1;
2885
2887
  }
2886
- function No(t, e) {
2888
+ function Co(t, e) {
2887
2889
  if (!e?.length)
2888
2890
  return !0;
2889
2891
  const n = ht(t);
2890
2892
  return n ? Et(n, e) : !0;
2891
2893
  }
2892
- function Co(t = []) {
2894
+ function Do(t = []) {
2893
2895
  for (let e = t.length - 1; e >= 0; e--) {
2894
2896
  const n = t[e];
2895
2897
  if (n && n.filename !== "<anonymous>" && n.filename !== "[native code]")
@@ -2900,19 +2902,19 @@ function Co(t = []) {
2900
2902
  function ht(t) {
2901
2903
  try {
2902
2904
  const n = [...t.exception?.values ?? []].reverse().find((r) => r.mechanism?.parent_id === void 0 && r.stacktrace?.frames?.length)?.stacktrace?.frames;
2903
- return n ? Co(n) : null;
2905
+ return n ? Do(n) : null;
2904
2906
  } catch {
2905
2907
  return h && p.error(`Cannot extract url for event ${L(t)}`), null;
2906
2908
  }
2907
2909
  }
2908
- function Do(t) {
2910
+ function Lo(t) {
2909
2911
  return t.exception?.values?.length ? (
2910
2912
  // No top-level message
2911
2913
  !t.message && // There are no exception values that have a stacktrace, a non-generic-Error type or value
2912
2914
  !t.exception.values.some((e) => e.stacktrace || e.type && e.type !== "Error" || e.value)
2913
2915
  ) : !1;
2914
2916
  }
2915
- function Lo(t, e, n, r, s, o) {
2917
+ function Po(t, e, n, r, s, o) {
2916
2918
  if (!s.exception?.values || !o || !N(o.originalException, Error))
2917
2919
  return;
2918
2920
  const i = s.exception.values.length > 0 ? s.exception.values[s.exception.values.length - 1] : void 0;
@@ -2978,12 +2980,12 @@ function We(t, e, n, r) {
2978
2980
  parent_id: r
2979
2981
  };
2980
2982
  }
2981
- function Po(t) {
2983
+ function Mo(t) {
2982
2984
  const e = "console";
2983
- j(e, t), B(e, Mo);
2985
+ j(e, t), B(e, Fo);
2984
2986
  }
2985
- function Mo() {
2986
- "console" in _ && zn.forEach(function(t) {
2987
+ function Fo() {
2988
+ "console" in _ && Xn.forEach(function(t) {
2987
2989
  t in _.console && T(_.console, t, function(e) {
2988
2990
  return lt[t] = e, function(...n) {
2989
2991
  v("console", { args: n, level: t }), lt[t]?.apply(_.console, n);
@@ -2991,33 +2993,33 @@ function Mo() {
2991
2993
  });
2992
2994
  });
2993
2995
  }
2994
- function Fo(t) {
2996
+ function $o(t) {
2995
2997
  return t === "warn" ? "warning" : ["fatal", "error", "warning", "log", "info", "debug"].includes(t) ? t : "log";
2996
2998
  }
2997
- const $o = "Dedupe", Uo = (() => {
2999
+ const Uo = "Dedupe", jo = (() => {
2998
3000
  let t;
2999
3001
  return {
3000
- name: $o,
3002
+ name: Uo,
3001
3003
  processEvent(e) {
3002
3004
  if (e.type)
3003
3005
  return e;
3004
3006
  try {
3005
- if (Bo(e, t))
3007
+ if (Ho(e, t))
3006
3008
  return h && p.warn("Event dropped due to being a duplicate of previously captured event."), null;
3007
3009
  } catch {
3008
3010
  }
3009
3011
  return t = e;
3010
3012
  }
3011
3013
  };
3012
- }), jo = Uo;
3013
- function Bo(t, e) {
3014
- return e ? !!(Ho(t, e) || Go(t, e)) : !1;
3015
- }
3014
+ }), Bo = jo;
3016
3015
  function Ho(t, e) {
3016
+ return e ? !!(Go(t, e) || Wo(t, e)) : !1;
3017
+ }
3018
+ function Go(t, e) {
3017
3019
  const n = t.message, r = e.message;
3018
3020
  return !(!n && !r || n && !r || !n && r || n !== r || !Mn(t, e) || !Pn(t, e));
3019
3021
  }
3020
- function Go(t, e) {
3022
+ function Wo(t, e) {
3021
3023
  const n = qe(e), r = qe(t);
3022
3024
  return !(!n || !r || n.type !== r.type || n.value !== r.value || !Mn(t, e) || !Pn(t, e));
3023
3025
  }
@@ -3072,10 +3074,10 @@ function Fn(t) {
3072
3074
  return t >= 400 && t < 500 ? "warning" : t >= 500 ? "error" : void 0;
3073
3075
  }
3074
3076
  const V = _;
3075
- function Wo() {
3077
+ function qo() {
3076
3078
  return "history" in V && !!V.history;
3077
3079
  }
3078
- function qo() {
3080
+ function Yo() {
3079
3081
  if (!("fetch" in V))
3080
3082
  return !1;
3081
3083
  try {
@@ -3087,10 +3089,10 @@ function qo() {
3087
3089
  function $t(t) {
3088
3090
  return t && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString());
3089
3091
  }
3090
- function Yo() {
3092
+ function zo() {
3091
3093
  if (typeof EdgeRuntime == "string")
3092
3094
  return !0;
3093
- if (!qo())
3095
+ if (!Yo())
3094
3096
  return !1;
3095
3097
  if ($t(V.fetch))
3096
3098
  return !0;
@@ -3105,14 +3107,14 @@ function Yo() {
3105
3107
  }
3106
3108
  return t;
3107
3109
  }
3108
- function zo(t, e) {
3110
+ function Xo(t, e) {
3109
3111
  const n = "fetch";
3110
- j(n, t), B(n, () => Xo(void 0, e));
3112
+ j(n, t), B(n, () => Ko(void 0, e));
3111
3113
  }
3112
- function Xo(t, e = !1) {
3113
- e && !Yo() || T(_, "fetch", function(n) {
3114
+ function Ko(t, e = !1) {
3115
+ e && !zo() || T(_, "fetch", function(n) {
3114
3116
  return function(...r) {
3115
- const s = new Error(), { method: o, url: i } = Ko(r), a = {
3117
+ const s = new Error(), { method: o, url: i } = Vo(r), a = {
3116
3118
  args: r,
3117
3119
  fetchData: {
3118
3120
  method: o,
@@ -3121,7 +3123,7 @@ function Xo(t, e = !1) {
3121
3123
  startTimestamp: x() * 1e3,
3122
3124
  // // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation
3123
3125
  virtualError: s,
3124
- headers: Vo(r)
3126
+ headers: Jo(r)
3125
3127
  };
3126
3128
  return v("fetch", {
3127
3129
  ...a
@@ -3154,7 +3156,7 @@ function Ut(t, e) {
3154
3156
  function Ye(t) {
3155
3157
  return typeof t == "string" ? t : t ? Ut(t, "url") ? t.url : t.toString ? t.toString() : "" : "";
3156
3158
  }
3157
- function Ko(t) {
3159
+ function Vo(t) {
3158
3160
  if (t.length === 0)
3159
3161
  return { method: "GET", url: "" };
3160
3162
  if (t.length === 2) {
@@ -3170,17 +3172,17 @@ function Ko(t) {
3170
3172
  method: Ut(e, "method") ? String(e.method).toUpperCase() : "GET"
3171
3173
  };
3172
3174
  }
3173
- function Vo(t) {
3175
+ function Jo(t) {
3174
3176
  const [e, n] = t;
3175
3177
  try {
3176
3178
  if (typeof n == "object" && n !== null && "headers" in n && n.headers)
3177
3179
  return new Headers(n.headers);
3178
- if (fr(e))
3180
+ if (lr(e))
3179
3181
  return new Headers(e.headers);
3180
3182
  } catch {
3181
3183
  }
3182
3184
  }
3183
- function Jo() {
3185
+ function Zo() {
3184
3186
  return "npm";
3185
3187
  }
3186
3188
  const y = _;
@@ -3188,7 +3190,7 @@ let jt = 0;
3188
3190
  function $n() {
3189
3191
  return jt > 0;
3190
3192
  }
3191
- function Zo() {
3193
+ function Qo() {
3192
3194
  jt++, setTimeout(() => {
3193
3195
  jt--;
3194
3196
  });
@@ -3213,7 +3215,7 @@ function q(t, e = {}) {
3213
3215
  const o = s.map((i) => q(i, e));
3214
3216
  return t.apply(this, o);
3215
3217
  } catch (o) {
3216
- throw Zo(), Or((i) => {
3218
+ throw Qo(), Nr((i) => {
3217
3219
  i.addEventProcessor((a) => (e.mechanism && (Nt(a, void 0), H(a, e.mechanism)), a.extra = {
3218
3220
  ...a.extra,
3219
3221
  arguments: s
@@ -3237,7 +3239,7 @@ function q(t, e = {}) {
3237
3239
  }
3238
3240
  return r;
3239
3241
  }
3240
- function Qo() {
3242
+ function ti() {
3241
3243
  const t = Jt(), { referrer: e } = y.document || {}, { userAgent: n } = y.navigator || {}, r = {
3242
3244
  ...e && { Referer: e },
3243
3245
  ...n && { "User-Agent": n }
@@ -3249,13 +3251,13 @@ function Qo() {
3249
3251
  }
3250
3252
  function ne(t, e) {
3251
3253
  const n = re(t, e), r = {
3252
- type: si(e),
3253
- value: oi(e)
3254
+ type: oi(e),
3255
+ value: ii(e)
3254
3256
  };
3255
3257
  return n.length && (r.stacktrace = { frames: n }), r.type === void 0 && r.value === "" && (r.value = "Unrecoverable error caught"), r;
3256
3258
  }
3257
- function ti(t, e, n, r) {
3258
- const o = b()?.getOptions().normalizeDepth, i = fi(e), a = {
3259
+ function ei(t, e, n, r) {
3260
+ const o = b()?.getOptions().normalizeDepth, i = li(e), a = {
3259
3261
  __serialized__: Tn(e, o)
3260
3262
  };
3261
3263
  if (i)
@@ -3270,7 +3272,7 @@ function ti(t, e, n, r) {
3270
3272
  values: [
3271
3273
  {
3272
3274
  type: _t(e) ? e.constructor.name : r ? "UnhandledRejection" : "Error",
3273
- value: ci(e, { isUnhandledRejection: r })
3275
+ value: ui(e, { isUnhandledRejection: r })
3274
3276
  }
3275
3277
  ]
3276
3278
  },
@@ -3290,36 +3292,36 @@ function Ot(t, e) {
3290
3292
  };
3291
3293
  }
3292
3294
  function re(t, e) {
3293
- const n = e.stacktrace || e.stack || "", r = ni(e), s = ri(e);
3295
+ const n = e.stacktrace || e.stack || "", r = ri(e), s = si(e);
3294
3296
  try {
3295
3297
  return t(n, r, s);
3296
3298
  } catch {
3297
3299
  }
3298
3300
  return [];
3299
3301
  }
3300
- const ei = /Minified React error #\d+;/i;
3301
- function ni(t) {
3302
- return t && ei.test(t.message) ? 1 : 0;
3303
- }
3302
+ const ni = /Minified React error #\d+;/i;
3304
3303
  function ri(t) {
3304
+ return t && ni.test(t.message) ? 1 : 0;
3305
+ }
3306
+ function si(t) {
3305
3307
  return typeof t.framesToPop == "number" ? t.framesToPop : 0;
3306
3308
  }
3307
3309
  function Un(t) {
3308
3310
  return typeof WebAssembly < "u" && typeof WebAssembly.Exception < "u" ? t instanceof WebAssembly.Exception : !1;
3309
3311
  }
3310
- function si(t) {
3312
+ function oi(t) {
3311
3313
  const e = t?.name;
3312
3314
  return !e && Un(t) ? t.message && Array.isArray(t.message) && t.message.length == 2 ? t.message[0] : "WebAssembly.Exception" : e;
3313
3315
  }
3314
- function oi(t) {
3316
+ function ii(t) {
3315
3317
  const e = t?.message;
3316
3318
  return Un(t) ? Array.isArray(t.message) && t.message.length == 2 ? t.message[1] : "wasm exception" : e ? e.error && typeof e.error.message == "string" ? e.error.message : e : "No error message";
3317
3319
  }
3318
- function ii(t, e, n, r) {
3320
+ function ai(t, e, n, r) {
3319
3321
  const s = n?.syntheticException || void 0, o = se(t, e, s, r);
3320
3322
  return H(o), o.level = "error", n?.event_id && (o.event_id = n.event_id), $(o);
3321
3323
  }
3322
- function ai(t, e, n = "info", r, s) {
3324
+ function ci(t, e, n = "info", r, s) {
3323
3325
  const o = r?.syntheticException || void 0, i = Bt(t, e, o, s);
3324
3326
  return i.level = n, r?.event_id && (i.event_id = r.event_id), $(i);
3325
3327
  }
@@ -3327,7 +3329,7 @@ function se(t, e, n, r, s) {
3327
3329
  let o;
3328
3330
  if (an(e) && e.error)
3329
3331
  return Ot(t, e.error);
3330
- if (le(e) || ir(e)) {
3332
+ if (le(e) || ar(e)) {
3331
3333
  const i = e;
3332
3334
  if ("stack" in e)
3333
3335
  o = Ot(t, e);
@@ -3337,7 +3339,7 @@ function se(t, e, n, r, s) {
3337
3339
  }
3338
3340
  return "code" in i && (o.tags = { ...o.tags, "DOMException.code": `${i.code}` }), o;
3339
3341
  }
3340
- return zt(e) ? Ot(t, e) : K(e) || _t(e) ? (o = ti(t, e, n, s), H(o, {
3342
+ return zt(e) ? Ot(t, e) : K(e) || _t(e) ? (o = ei(t, e, n, s), H(o, {
3341
3343
  synthetic: !0
3342
3344
  }), o) : (o = Bt(t, e, n, r), Nt(o, `${e}`), H(o, {
3343
3345
  synthetic: !0
@@ -3360,18 +3362,18 @@ function Bt(t, e, n, r) {
3360
3362
  }
3361
3363
  return s.message = e, s;
3362
3364
  }
3363
- function ci(t, { isUnhandledRejection: e }) {
3364
- const n = mr(t), r = e ? "promise rejection" : "exception";
3365
- return an(t) ? `Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\`` : _t(t) ? `Event \`${ui(t)}\` (type=${t.type}) captured as ${r}` : `Object captured as ${r} with keys: ${n}`;
3365
+ function ui(t, { isUnhandledRejection: e }) {
3366
+ const n = gr(t), r = e ? "promise rejection" : "exception";
3367
+ return an(t) ? `Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\`` : _t(t) ? `Event \`${fi(t)}\` (type=${t.type}) captured as ${r}` : `Object captured as ${r} with keys: ${n}`;
3366
3368
  }
3367
- function ui(t) {
3369
+ function fi(t) {
3368
3370
  try {
3369
3371
  const e = Object.getPrototypeOf(t);
3370
3372
  return e ? e.constructor.name : void 0;
3371
3373
  } catch {
3372
3374
  }
3373
3375
  }
3374
- function fi(t) {
3376
+ function li(t) {
3375
3377
  for (const e in t)
3376
3378
  if (Object.prototype.hasOwnProperty.call(t, e)) {
3377
3379
  const n = t[e];
@@ -3379,16 +3381,16 @@ function fi(t) {
3379
3381
  return n;
3380
3382
  }
3381
3383
  }
3382
- const li = 5e3;
3383
- class di extends Qs {
3384
+ const di = 5e3;
3385
+ class pi extends to {
3384
3386
  /**
3385
3387
  * Creates a new Browser SDK instance.
3386
3388
  *
3387
3389
  * @param options Configuration options for this SDK.
3388
3390
  */
3389
3391
  constructor(e) {
3390
- const n = pi(e), r = y.SENTRY_SDK_SOURCE || Jo();
3391
- yo(n, "browser", ["browser"], r), super(n);
3392
+ const n = hi(e), r = y.SENTRY_SDK_SOURCE || Zo();
3393
+ Eo(n, "browser", ["browser"], r), super(n);
3392
3394
  const { sendDefaultPii: s, sendClientReports: o, enableLogs: i, _experiments: a } = this._options, c = i ?? a?.enableLogs;
3393
3395
  y.document && (o || c) && y.document.addEventListener("visibilitychange", () => {
3394
3396
  y.document.visibilityState === "hidden" && (o && this._flushOutcomes(), c && At(this));
@@ -3397,20 +3399,20 @@ class di extends Qs {
3397
3399
  }), this.on("afterCaptureLog", () => {
3398
3400
  this._logFlushIdleTimeout && clearTimeout(this._logFlushIdleTimeout), this._logFlushIdleTimeout = setTimeout(() => {
3399
3401
  At(this);
3400
- }, li);
3401
- })), s && (this.on("postprocessEvent", go), this.on("beforeSendSession", _o));
3402
+ }, di);
3403
+ })), s && (this.on("postprocessEvent", _o), this.on("beforeSendSession", yo));
3402
3404
  }
3403
3405
  /**
3404
3406
  * @inheritDoc
3405
3407
  */
3406
3408
  eventFromException(e, n) {
3407
- return ii(this._options.stackParser, e, n, this._options.attachStacktrace);
3409
+ return ai(this._options.stackParser, e, n, this._options.attachStacktrace);
3408
3410
  }
3409
3411
  /**
3410
3412
  * @inheritDoc
3411
3413
  */
3412
3414
  eventFromMessage(e, n = "info", r) {
3413
- return ai(this._options.stackParser, e, n, r, this._options.attachStacktrace);
3415
+ return ci(this._options.stackParser, e, n, r, this._options.attachStacktrace);
3414
3416
  }
3415
3417
  /**
3416
3418
  * @inheritDoc
@@ -3419,7 +3421,7 @@ class di extends Qs {
3419
3421
  return e.platform = e.platform || "javascript", super._prepareEvent(e, n, r, s);
3420
3422
  }
3421
3423
  }
3422
- function pi(t) {
3424
+ function hi(t) {
3423
3425
  return {
3424
3426
  release: typeof __SENTRY_RELEASE__ == "string" ? __SENTRY_RELEASE__ : y.SENTRY_RELEASE?.id,
3425
3427
  // This supports the variable that sentry-webpack-plugin injects
@@ -3429,12 +3431,12 @@ function pi(t) {
3429
3431
  ...t
3430
3432
  };
3431
3433
  }
3432
- const hi = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, S = _, mi = 1e3;
3434
+ const mi = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, S = _, gi = 1e3;
3433
3435
  let ze, Ht, Gt;
3434
- function gi(t) {
3435
- j("dom", t), B("dom", _i);
3436
+ function _i(t) {
3437
+ j("dom", t), B("dom", yi);
3436
3438
  }
3437
- function _i() {
3439
+ function yi() {
3438
3440
  if (!S.document)
3439
3441
  return;
3440
3442
  const t = v.bind(null, "dom"), e = Xe(t, !0);
@@ -3471,7 +3473,7 @@ function _i() {
3471
3473
  ));
3472
3474
  });
3473
3475
  }
3474
- function yi(t) {
3476
+ function Ei(t) {
3475
3477
  if (t.type !== Ht)
3476
3478
  return !1;
3477
3479
  try {
@@ -3481,24 +3483,24 @@ function yi(t) {
3481
3483
  }
3482
3484
  return !0;
3483
3485
  }
3484
- function Ei(t, e) {
3486
+ function Si(t, e) {
3485
3487
  return t !== "keypress" ? !1 : e?.tagName ? !(e.tagName === "INPUT" || e.tagName === "TEXTAREA" || e.isContentEditable) : !0;
3486
3488
  }
3487
3489
  function Xe(t, e = !1) {
3488
3490
  return (n) => {
3489
3491
  if (!n || n._sentryCaptured)
3490
3492
  return;
3491
- const r = Si(n);
3492
- if (Ei(n.type, r))
3493
+ const r = bi(n);
3494
+ if (Si(n.type, r))
3493
3495
  return;
3494
3496
  F(n, "_sentryCaptured", !0), r && !r._sentryId && F(r, "_sentryId", I());
3495
3497
  const s = n.type === "keypress" ? "input" : n.type;
3496
- yi(n) || (t({ event: n, name: s, global: e }), Ht = n.type, Gt = r ? r._sentryId : void 0), clearTimeout(ze), ze = S.setTimeout(() => {
3498
+ Ei(n) || (t({ event: n, name: s, global: e }), Ht = n.type, Gt = r ? r._sentryId : void 0), clearTimeout(ze), ze = S.setTimeout(() => {
3497
3499
  Gt = void 0, Ht = void 0;
3498
- }, mi);
3500
+ }, gi);
3499
3501
  };
3500
3502
  }
3501
- function Si(t) {
3503
+ function bi(t) {
3502
3504
  try {
3503
3505
  return t.target;
3504
3506
  } catch {
@@ -3508,21 +3510,21 @@ function Si(t) {
3508
3510
  let it;
3509
3511
  function jn(t) {
3510
3512
  const e = "history";
3511
- j(e, t), B(e, bi);
3513
+ j(e, t), B(e, Ti);
3512
3514
  }
3513
- function bi() {
3515
+ function Ti() {
3514
3516
  if (S.addEventListener("popstate", () => {
3515
3517
  const e = S.location.href, n = it;
3516
3518
  if (it = e, n === e)
3517
3519
  return;
3518
3520
  v("history", { from: n, to: e });
3519
- }), !Wo())
3521
+ }), !qo())
3520
3522
  return;
3521
3523
  function t(e) {
3522
3524
  return function(...n) {
3523
3525
  const r = n.length > 2 ? n[2] : void 0;
3524
3526
  if (r) {
3525
- const s = it, o = Ti(String(r));
3527
+ const s = it, o = Ii(String(r));
3526
3528
  if (it = o, s === o)
3527
3529
  return e.apply(this, n);
3528
3530
  v("history", { from: s, to: o });
@@ -3532,7 +3534,7 @@ function bi() {
3532
3534
  }
3533
3535
  T(S.history, "pushState", t), T(S.history, "replaceState", t);
3534
3536
  }
3535
- function Ti(t) {
3537
+ function Ii(t) {
3536
3538
  try {
3537
3539
  return new URL(t, S.location.origin).toString();
3538
3540
  } catch {
@@ -3540,7 +3542,7 @@ function Ti(t) {
3540
3542
  }
3541
3543
  }
3542
3544
  const ft = {};
3543
- function Ii(t) {
3545
+ function vi(t) {
3544
3546
  const e = ft[t];
3545
3547
  if (e)
3546
3548
  return e;
@@ -3555,7 +3557,7 @@ function Ii(t) {
3555
3557
  const o = s.contentWindow;
3556
3558
  o?.[t] && (n = o[t]), r.head.removeChild(s);
3557
3559
  } catch (s) {
3558
- hi && p.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `, s);
3560
+ mi && p.warn(`Could not create sandbox iframe for ${t} check, bailing to window.${t}: `, s);
3559
3561
  }
3560
3562
  return n && (ft[t] = n.bind(S));
3561
3563
  }
@@ -3563,16 +3565,16 @@ function Ke(t) {
3563
3565
  ft[t] = void 0;
3564
3566
  }
3565
3567
  const X = "__sentry_xhr_v3__";
3566
- function vi(t) {
3567
- j("xhr", t), B("xhr", wi);
3568
+ function wi(t) {
3569
+ j("xhr", t), B("xhr", Ri);
3568
3570
  }
3569
- function wi() {
3571
+ function Ri() {
3570
3572
  if (!S.XMLHttpRequest)
3571
3573
  return;
3572
3574
  const t = XMLHttpRequest.prototype;
3573
3575
  t.open = new Proxy(t.open, {
3574
3576
  apply(e, n, r) {
3575
- const s = new Error(), o = x() * 1e3, i = A(r[0]) ? r[0].toUpperCase() : void 0, a = Ri(r[1]);
3577
+ const s = new Error(), o = x() * 1e3, i = A(r[0]) ? r[0].toUpperCase() : void 0, a = ki(r[1]);
3576
3578
  if (!i || !a)
3577
3579
  return e.apply(n, r);
3578
3580
  n[X] = {
@@ -3621,7 +3623,7 @@ function wi() {
3621
3623
  }
3622
3624
  });
3623
3625
  }
3624
- function Ri(t) {
3626
+ function ki(t) {
3625
3627
  if (A(t))
3626
3628
  return t;
3627
3629
  try {
@@ -3629,7 +3631,7 @@ function Ri(t) {
3629
3631
  } catch {
3630
3632
  }
3631
3633
  }
3632
- function ki(t, e = Ii("fetch")) {
3634
+ function Ai(t, e = vi("fetch")) {
3633
3635
  let n = 0, r = 0;
3634
3636
  function s(o) {
3635
3637
  const i = o.body.length;
@@ -3667,9 +3669,9 @@ function ki(t, e = Ii("fetch")) {
3667
3669
  return Ke("fetch"), n -= i, r--, pt(c);
3668
3670
  }
3669
3671
  }
3670
- return mo(t, s);
3672
+ return go(t, s);
3671
3673
  }
3672
- const Ai = 30, xi = 50;
3674
+ const xi = 30, Oi = 50;
3673
3675
  function Wt(t, e, n, r) {
3674
3676
  const s = {
3675
3677
  filename: t,
@@ -3679,38 +3681,38 @@ function Wt(t, e, n, r) {
3679
3681
  };
3680
3682
  return n !== void 0 && (s.lineno = n), r !== void 0 && (s.colno = r), s;
3681
3683
  }
3682
- const Oi = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Ni = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, Ci = /\((\S*)(?::(\d+))(?::(\d+))\)/, Di = (t) => {
3683
- const e = Oi.exec(t);
3684
+ const Ni = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Ci = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, Di = /\((\S*)(?::(\d+))(?::(\d+))\)/, Li = (t) => {
3685
+ const e = Ni.exec(t);
3684
3686
  if (e) {
3685
3687
  const [, r, s, o] = e;
3686
3688
  return Wt(r, M, +s, +o);
3687
3689
  }
3688
- const n = Ni.exec(t);
3690
+ const n = Ci.exec(t);
3689
3691
  if (n) {
3690
3692
  if (n[2] && n[2].indexOf("eval") === 0) {
3691
- const i = Ci.exec(n[2]);
3693
+ const i = Di.exec(n[2]);
3692
3694
  i && (n[2] = i[1], n[3] = i[2], n[4] = i[3]);
3693
3695
  }
3694
3696
  const [s, o] = Bn(n[1] || M, n[2]);
3695
3697
  return Wt(o, s, n[3] ? +n[3] : void 0, n[4] ? +n[4] : void 0);
3696
3698
  }
3697
- }, Li = [Ai, Di], Pi = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i, Mi = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, Fi = (t) => {
3698
- const e = Pi.exec(t);
3699
+ }, Pi = [xi, Li], Mi = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i, Fi = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, $i = (t) => {
3700
+ const e = Mi.exec(t);
3699
3701
  if (e) {
3700
3702
  if (e[3] && e[3].indexOf(" > eval") > -1) {
3701
- const o = Mi.exec(e[3]);
3703
+ const o = Fi.exec(e[3]);
3702
3704
  o && (e[1] = e[1] || "eval", e[3] = o[1], e[4] = o[2], e[5] = "");
3703
3705
  }
3704
3706
  let r = e[3], s = e[1] || M;
3705
3707
  return [s, r] = Bn(s, r), Wt(r, s, e[4] ? +e[4] : void 0, e[5] ? +e[5] : void 0);
3706
3708
  }
3707
- }, $i = [xi, Fi], Ui = [Li, $i], ji = sn(...Ui), Bn = (t, e) => {
3709
+ }, Ui = [Oi, $i], ji = [Pi, Ui], Bi = sn(...ji), Bn = (t, e) => {
3708
3710
  const n = t.indexOf("safari-extension") !== -1, r = t.indexOf("safari-web-extension") !== -1;
3709
3711
  return n || r ? [
3710
3712
  t.indexOf("@") !== -1 ? t.split("@")[0] : M,
3711
3713
  n ? `safari-extension:${e}` : `safari-web-extension:${e}`
3712
3714
  ] : [t, e];
3713
- }, bt = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, at = 1024, Bi = "Breadcrumbs", Hi = ((t = {}) => {
3715
+ }, bt = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, at = 1024, Hi = "Breadcrumbs", Gi = ((t = {}) => {
3714
3716
  const e = {
3715
3717
  console: !0,
3716
3718
  dom: !0,
@@ -3721,13 +3723,13 @@ const Oi = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Ni = /^\s*at (?:(.+?\)(?: \
3721
3723
  ...t
3722
3724
  };
3723
3725
  return {
3724
- name: Bi,
3726
+ name: Hi,
3725
3727
  setup(n) {
3726
- e.console && Po(qi(n)), e.dom && gi(Wi(n, e.dom)), e.xhr && vi(Yi(n)), e.fetch && zo(zi(n)), e.history && jn(Xi(n)), e.sentry && n.on("beforeSendEvent", Gi(n));
3728
+ e.console && Mo(Yi(n)), e.dom && _i(qi(n, e.dom)), e.xhr && wi(zi(n)), e.fetch && Xo(Xi(n)), e.history && jn(Ki(n)), e.sentry && n.on("beforeSendEvent", Wi(n));
3727
3729
  }
3728
3730
  };
3729
- }), Hn = Hi;
3730
- function Gi(t) {
3731
+ }), Hn = Gi;
3732
+ function Wi(t) {
3731
3733
  return function(n) {
3732
3734
  b() === t && U(
3733
3735
  {
@@ -3742,7 +3744,7 @@ function Gi(t) {
3742
3744
  );
3743
3745
  };
3744
3746
  }
3745
- function Wi(t, e) {
3747
+ function qi(t, e) {
3746
3748
  return function(r) {
3747
3749
  if (b() !== t)
3748
3750
  return;
@@ -3751,8 +3753,8 @@ function Wi(t, e) {
3751
3753
  `\`dom.maxStringLength\` cannot exceed ${at}, but a value of ${a} was configured. Sentry will use ${at} instead.`
3752
3754
  ), a = at), typeof i == "string" && (i = [i]);
3753
3755
  try {
3754
- const u = r.event, f = Ki(u) ? u.target : u;
3755
- s = un(f, { keyAttrs: i, maxStringLength: a }), o = pr(f);
3756
+ const u = r.event, f = Vi(u) ? u.target : u;
3757
+ s = un(f, { keyAttrs: i, maxStringLength: a }), o = hr(f);
3756
3758
  } catch {
3757
3759
  s = "<unknown>";
3758
3760
  }
@@ -3769,7 +3771,7 @@ function Wi(t, e) {
3769
3771
  });
3770
3772
  };
3771
3773
  }
3772
- function qi(t) {
3774
+ function Yi(t) {
3773
3775
  return function(n) {
3774
3776
  if (b() !== t)
3775
3777
  return;
@@ -3779,7 +3781,7 @@ function qi(t) {
3779
3781
  arguments: n.args,
3780
3782
  logger: "console"
3781
3783
  },
3782
- level: Fo(n.level),
3784
+ level: $o(n.level),
3783
3785
  message: de(n.args, " ")
3784
3786
  };
3785
3787
  if (n.level === "assert")
@@ -3793,7 +3795,7 @@ function qi(t) {
3793
3795
  });
3794
3796
  };
3795
3797
  }
3796
- function Yi(t) {
3798
+ function zi(t) {
3797
3799
  return function(n) {
3798
3800
  if (b() !== t)
3799
3801
  return;
@@ -3818,7 +3820,7 @@ function Yi(t) {
3818
3820
  t.emit("beforeOutgoingRequestBreadcrumb", m, l), U(m, l);
3819
3821
  };
3820
3822
  }
3821
- function zi(t) {
3823
+ function Xi(t) {
3822
3824
  return function(n) {
3823
3825
  if (b() !== t)
3824
3826
  return;
@@ -3858,7 +3860,7 @@ function zi(t) {
3858
3860
  }
3859
3861
  };
3860
3862
  }
3861
- function Xi(t) {
3863
+ function Ki(t) {
3862
3864
  return function(n) {
3863
3865
  if (b() !== t)
3864
3866
  return;
@@ -3875,10 +3877,10 @@ function Xi(t) {
3875
3877
  });
3876
3878
  };
3877
3879
  }
3878
- function Ki(t) {
3880
+ function Vi(t) {
3879
3881
  return !!t && !!t.target;
3880
3882
  }
3881
- const Vi = [
3883
+ const Ji = [
3882
3884
  "EventTarget",
3883
3885
  "Window",
3884
3886
  "Node",
@@ -3910,7 +3912,7 @@ const Vi = [
3910
3912
  "XMLHttpRequest",
3911
3913
  "XMLHttpRequestEventTarget",
3912
3914
  "XMLHttpRequestUpload"
3913
- ], Ji = "BrowserApiErrors", Zi = ((t = {}) => {
3915
+ ], Zi = "BrowserApiErrors", Qi = ((t = {}) => {
3914
3916
  const e = {
3915
3917
  XMLHttpRequest: !0,
3916
3918
  eventTarget: !0,
@@ -3921,16 +3923,16 @@ const Vi = [
3921
3923
  ...t
3922
3924
  };
3923
3925
  return {
3924
- name: Ji,
3926
+ name: Zi,
3925
3927
  // TODO: This currently only works for the first client this is setup
3926
3928
  // We may want to adjust this to check for client etc.
3927
3929
  setupOnce() {
3928
- e.setTimeout && T(y, "setTimeout", Ve), e.setInterval && T(y, "setInterval", Ve), e.requestAnimationFrame && T(y, "requestAnimationFrame", ta), e.XMLHttpRequest && "XMLHttpRequest" in y && T(XMLHttpRequest.prototype, "send", ea);
3930
+ e.setTimeout && T(y, "setTimeout", Ve), e.setInterval && T(y, "setInterval", Ve), e.requestAnimationFrame && T(y, "requestAnimationFrame", ea), e.XMLHttpRequest && "XMLHttpRequest" in y && T(XMLHttpRequest.prototype, "send", na);
3929
3931
  const n = e.eventTarget;
3930
- n && (Array.isArray(n) ? n : Vi).forEach((s) => na(s, e));
3932
+ n && (Array.isArray(n) ? n : Ji).forEach((s) => ra(s, e));
3931
3933
  }
3932
3934
  };
3933
- }), Qi = Zi;
3935
+ }), ta = Qi;
3934
3936
  function Ve(t) {
3935
3937
  return function(...e) {
3936
3938
  const n = e[0];
@@ -3943,7 +3945,7 @@ function Ve(t) {
3943
3945
  }), t.apply(this, e);
3944
3946
  };
3945
3947
  }
3946
- function ta(t) {
3948
+ function ea(t) {
3947
3949
  return function(e) {
3948
3950
  return t.apply(this, [
3949
3951
  q(e, {
@@ -3959,7 +3961,7 @@ function ta(t) {
3959
3961
  ]);
3960
3962
  };
3961
3963
  }
3962
- function ea(t) {
3964
+ function na(t) {
3963
3965
  return function(...e) {
3964
3966
  const n = this;
3965
3967
  return ["onload", "onerror", "onprogress", "onreadystatechange"].forEach((s) => {
@@ -3979,12 +3981,12 @@ function ea(t) {
3979
3981
  }), t.apply(this, e);
3980
3982
  };
3981
3983
  }
3982
- function na(t, e) {
3984
+ function ra(t, e) {
3983
3985
  const r = y[t]?.prototype;
3984
3986
  r?.hasOwnProperty?.("addEventListener") && (T(r, "addEventListener", function(s) {
3985
3987
  return function(o, i, a) {
3986
3988
  try {
3987
- ra(i) && (i.handleEvent = q(i.handleEvent, {
3989
+ sa(i) && (i.handleEvent = q(i.handleEvent, {
3988
3990
  mechanism: {
3989
3991
  data: {
3990
3992
  function: "handleEvent",
@@ -3997,7 +3999,7 @@ function na(t, e) {
3997
3999
  }));
3998
4000
  } catch {
3999
4001
  }
4000
- return e.unregisterOriginalCallbacks && sa(this, o, i), s.apply(this, [
4002
+ return e.unregisterOriginalCallbacks && oa(this, o, i), s.apply(this, [
4001
4003
  o,
4002
4004
  q(i, {
4003
4005
  mechanism: {
@@ -4024,13 +4026,13 @@ function na(t, e) {
4024
4026
  };
4025
4027
  }));
4026
4028
  }
4027
- function ra(t) {
4029
+ function sa(t) {
4028
4030
  return typeof t.handleEvent == "function";
4029
4031
  }
4030
- function sa(t, e, n) {
4032
+ function oa(t, e, n) {
4031
4033
  t && typeof t == "object" && "removeEventListener" in t && typeof t.removeEventListener == "function" && t.removeEventListener(e, n);
4032
4034
  }
4033
- const oa = () => ({
4035
+ const ia = () => ({
4034
4036
  name: "BrowserSession",
4035
4037
  setupOnce() {
4036
4038
  if (typeof y.document > "u") {
@@ -4041,28 +4043,28 @@ const oa = () => ({
4041
4043
  t !== void 0 && t !== e && (Ce({ ignoreDuration: !0 }), De());
4042
4044
  });
4043
4045
  }
4044
- }), ia = "GlobalHandlers", aa = ((t = {}) => {
4046
+ }), aa = "GlobalHandlers", ca = ((t = {}) => {
4045
4047
  const e = {
4046
4048
  onerror: !0,
4047
4049
  onunhandledrejection: !0,
4048
4050
  ...t
4049
4051
  };
4050
4052
  return {
4051
- name: ia,
4053
+ name: aa,
4052
4054
  setupOnce() {
4053
4055
  Error.stackTraceLimit = 50;
4054
4056
  },
4055
4057
  setup(n) {
4056
- e.onerror && (ua(n), Je("onerror")), e.onunhandledrejection && (fa(n), Je("onunhandledrejection"));
4058
+ e.onerror && (fa(n), Je("onerror")), e.onunhandledrejection && (la(n), Je("onunhandledrejection"));
4057
4059
  }
4058
4060
  };
4059
- }), ca = aa;
4060
- function ua(t) {
4061
- nr((e) => {
4061
+ }), ua = ca;
4062
+ function fa(t) {
4063
+ rr((e) => {
4062
4064
  const { stackParser: n, attachStacktrace: r } = Gn();
4063
4065
  if (b() !== t || $n())
4064
4066
  return;
4065
- const { msg: s, url: o, line: i, column: a, error: c } = e, u = pa(
4067
+ const { msg: s, url: o, line: i, column: a, error: c } = e, u = ha(
4066
4068
  se(n, c || s, void 0, r, !1),
4067
4069
  o,
4068
4070
  i,
@@ -4077,12 +4079,12 @@ function ua(t) {
4077
4079
  });
4078
4080
  });
4079
4081
  }
4080
- function fa(t) {
4081
- sr((e) => {
4082
+ function la(t) {
4083
+ or((e) => {
4082
4084
  const { stackParser: n, attachStacktrace: r } = Gn();
4083
4085
  if (b() !== t || $n())
4084
4086
  return;
4085
- const s = la(e), o = Kt(s) ? da(s) : se(n, s, void 0, r, !0);
4087
+ const s = da(e), o = Kt(s) ? pa(s) : se(n, s, void 0, r, !0);
4086
4088
  o.level = "error", wn(o, {
4087
4089
  originalException: s,
4088
4090
  mechanism: {
@@ -4092,7 +4094,7 @@ function fa(t) {
4092
4094
  });
4093
4095
  });
4094
4096
  }
4095
- function la(t) {
4097
+ function da(t) {
4096
4098
  if (Kt(t))
4097
4099
  return t;
4098
4100
  try {
@@ -4104,7 +4106,7 @@ function la(t) {
4104
4106
  }
4105
4107
  return t;
4106
4108
  }
4107
- function da(t) {
4109
+ function pa(t) {
4108
4110
  return {
4109
4111
  exception: {
4110
4112
  values: [
@@ -4117,7 +4119,7 @@ function da(t) {
4117
4119
  }
4118
4120
  };
4119
4121
  }
4120
- function pa(t, e, n, r) {
4122
+ function ha(t, e, n, r) {
4121
4123
  const s = t.exception = t.exception || {}, o = s.values = s.values || [], i = o[0] = o[0] || {}, a = i.stacktrace = i.stacktrace || {}, c = a.frames = a.frames || [], u = r, f = n, l = A(e) && e.length > 0 ? e : Jt();
4122
4124
  return c.length === 0 && c.push({
4123
4125
  colno: u,
@@ -4136,12 +4138,12 @@ function Gn() {
4136
4138
  attachStacktrace: !1
4137
4139
  };
4138
4140
  }
4139
- const ha = () => ({
4141
+ const ma = () => ({
4140
4142
  name: "HttpContext",
4141
4143
  preprocessEvent(t) {
4142
4144
  if (!y.navigator && !y.location && !y.document)
4143
4145
  return;
4144
- const e = Qo(), n = {
4146
+ const e = ti(), n = {
4145
4147
  ...e.headers,
4146
4148
  ...t.request?.headers
4147
4149
  };
@@ -4151,13 +4153,13 @@ const ha = () => ({
4151
4153
  headers: n
4152
4154
  };
4153
4155
  }
4154
- }), ma = "cause", ga = 5, _a = "LinkedErrors", ya = ((t = {}) => {
4155
- const e = t.limit || ga, n = t.key || ma;
4156
+ }), ga = "cause", _a = 5, ya = "LinkedErrors", Ea = ((t = {}) => {
4157
+ const e = t.limit || _a, n = t.key || ga;
4156
4158
  return {
4157
- name: _a,
4159
+ name: ya,
4158
4160
  preprocessEvent(r, s, o) {
4159
4161
  const i = o.getOptions();
4160
- Lo(
4162
+ Po(
4161
4163
  // This differs from the LinkedErrors integration in core by using a different exceptionFromError function
4162
4164
  ne,
4163
4165
  i.stackParser,
@@ -4168,15 +4170,15 @@ const ha = () => ({
4168
4170
  );
4169
4171
  }
4170
4172
  };
4171
- }), Ea = ya;
4172
- function Sa() {
4173
- return ba() ? (bt && Y(() => {
4173
+ }), Sa = Ea;
4174
+ function ba() {
4175
+ return Ta() ? (bt && Y(() => {
4174
4176
  console.error(
4175
4177
  "[Sentry] You cannot use Sentry.init() in a browser extension, see: https://docs.sentry.io/platforms/javascript/best-practices/browser-extensions/"
4176
4178
  );
4177
4179
  }), !0) : !1;
4178
4180
  }
4179
- function ba() {
4181
+ function Ta() {
4180
4182
  if (typeof y.window > "u")
4181
4183
  return !1;
4182
4184
  const t = y;
@@ -4185,39 +4187,39 @@ function ba() {
4185
4187
  const n = Jt(), r = ["chrome-extension", "moz-extension", "ms-browser-extension", "safari-web-extension"];
4186
4188
  return !(y === y.top && r.some((o) => n.startsWith(`${o}://`)));
4187
4189
  }
4188
- function Ta(t) {
4190
+ function Ia(t) {
4189
4191
  return [
4190
4192
  // TODO(v10): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`
4191
4193
  // eslint-disable-next-line deprecation/deprecation
4192
- Ro(),
4193
- To(),
4194
- Qi(),
4194
+ ko(),
4195
+ Io(),
4196
+ ta(),
4195
4197
  Hn(),
4196
- ca(),
4197
- Ea(),
4198
- jo(),
4199
- ha(),
4200
- oa()
4198
+ ua(),
4199
+ Sa(),
4200
+ Bo(),
4201
+ ma(),
4202
+ ia()
4201
4203
  ];
4202
4204
  }
4203
- function Ia(t = {}) {
4204
- const e = !t.skipBrowserExtensionCheck && Sa(), n = {
4205
+ function va(t = {}) {
4206
+ const e = !t.skipBrowserExtensionCheck && ba(), n = {
4205
4207
  ...t,
4206
4208
  enabled: e ? !1 : t.enabled,
4207
- stackParser: tr(t.stackParser || ji),
4208
- integrations: Xs({
4209
+ stackParser: er(t.stackParser || Bi),
4210
+ integrations: Ks({
4209
4211
  integrations: t.integrations,
4210
- defaultIntegrations: t.defaultIntegrations == null ? Ta() : t.defaultIntegrations
4212
+ defaultIntegrations: t.defaultIntegrations == null ? Ia() : t.defaultIntegrations
4211
4213
  }),
4212
- transport: t.transport || ki
4214
+ transport: t.transport || Ai
4213
4215
  };
4214
- return oo(di, n);
4216
+ return io(pi, n);
4215
4217
  }
4216
- const va = "https://005d25250a41bd0071570b0c0a2b2c4d@o4510467570073600.ingest.us.sentry.io/4510472944156672";
4218
+ const wa = "https://005d25250a41bd0071570b0c0a2b2c4d@o4510467570073600.ingest.us.sentry.io/4510472944156672";
4217
4219
  let Ze = !1;
4218
- function Da() {
4219
- Ze || (Ia({
4220
- dsn: va,
4220
+ function La() {
4221
+ Ze || (va({
4222
+ dsn: wa,
4221
4223
  // Only capture errors, not performance data.
4222
4224
  tracesSampleRate: 0,
4223
4225
  // Minimal breadcrumbs to reduce noise.
@@ -4238,7 +4240,7 @@ function Da() {
4238
4240
  }
4239
4241
  }), Ze = !0);
4240
4242
  }
4241
- function La(t, e) {
4243
+ function Pa(t, e) {
4242
4244
  const n = typeof t == "string" ? new Error(t) : t;
4243
4245
  vn(n, {
4244
4246
  tags: { source: "knest-widget" },
@@ -4247,18 +4249,19 @@ function La(t, e) {
4247
4249
  }
4248
4250
  export {
4249
4251
  en as API_PATH,
4250
- Ra as DEFAULT_AVATAR_URL,
4252
+ zn as AUTH_ERROR_MESSAGE,
4253
+ ka as DEFAULT_AVATAR_URL,
4251
4254
  tn as DEFAULT_BASE_URL,
4252
- ka as DEFAULT_BRAND_COLOR,
4255
+ Aa as DEFAULT_BRAND_COLOR,
4253
4256
  ie as DEFAULT_ERROR_MESSAGE,
4254
- xa as DEFAULT_EXAMPLE_QUESTIONS,
4255
- Aa as DEFAULT_WELCOME_MESSAGE,
4257
+ Oa as DEFAULT_EXAMPLE_QUESTIONS,
4258
+ xa as DEFAULT_WELCOME_MESSAGE,
4256
4259
  Yn as FALLBACK_ERROR_MESSAGE,
4257
- La as captureWidgetException,
4258
- Oa as fetchWidgetConfig,
4259
- Ca as formatContent,
4260
+ Pa as captureWidgetException,
4261
+ Na as fetchWidgetConfig,
4262
+ Da as formatContent,
4260
4263
  Wn as getChatApiUrl,
4261
4264
  qn as getConfigApiUrl,
4262
- Da as initWidgetSentry,
4263
- Na as streamChatMessage
4265
+ La as initWidgetSentry,
4266
+ Ca as streamChatMessage
4264
4267
  };