obi-sdk 0.6.4 → 0.6.6

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/react.es.js CHANGED
@@ -16446,6 +16446,11 @@ class Ip {
16446
16446
  params: { path: { id: e } }
16447
16447
  });
16448
16448
  }
16449
+ async startSession(e, t) {
16450
+ return await this.client.GET("/sessions/{id}/start-session", {
16451
+ params: { path: { id: e }, query: t ? { token: t } : {} }
16452
+ });
16453
+ }
16449
16454
  async getSessionRecording(e) {
16450
16455
  return await this.client.GET("/sessions/{id}/recording", {
16451
16456
  params: { path: { id: e } }
@@ -22608,50 +22613,7 @@ var bT = function(A, e) {
22608
22613
  var n = e.ownerDocument, i = n.documentElement ? Pn(A, getComputedStyle(n.documentElement).backgroundColor) : Dt.TRANSPARENT, r = n.body ? Pn(A, getComputedStyle(n.body).backgroundColor) : Dt.TRANSPARENT, s = typeof t == "string" ? Pn(A, t) : t === null ? Dt.TRANSPARENT : 4294967295;
22609
22614
  return e === n.documentElement ? bA(i) ? bA(r) ? s : r : i : s;
22610
22615
  };
22611
- class ST {
22612
- /**
22613
- * Create a new StorageManager with a specific namespace
22614
- * @param namespace The namespace to prefix all keys with
22615
- */
22616
- constructor(e) {
22617
- this.namespace = e;
22618
- }
22619
- /**
22620
- * Get a value from localStorage with the namespace prefix
22621
- * @param key The key to retrieve
22622
- * @returns The stored value or null if not found
22623
- */
22624
- getItem(e) {
22625
- return localStorage.getItem(`${this.namespace}.${e}`);
22626
- }
22627
- /**
22628
- * Set a value in localStorage with the namespace prefix
22629
- * @param key The key to set
22630
- * @param value The value to store
22631
- */
22632
- setItem(e, t) {
22633
- localStorage.setItem(`${this.namespace}.${e}`, t);
22634
- }
22635
- /**
22636
- * Remove a value from localStorage with the namespace prefix
22637
- * @param key The key to remove
22638
- */
22639
- removeItem(e) {
22640
- localStorage.removeItem(`${this.namespace}.${e}`);
22641
- }
22642
- /**
22643
- * Clear all keys that belong to this namespace
22644
- */
22645
- clear() {
22646
- for (let e = 0; e < localStorage.length; e++) {
22647
- const t = localStorage.key(e);
22648
- t && t.startsWith(`${this.namespace}.`) && localStorage.removeItem(t);
22649
- }
22650
- }
22651
- }
22652
- const oa = {
22653
- SESSION_DATA: "session_data"
22654
- }, aa = new ST("io.obi.widget"), W = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, JA = "9.23.0", ee = globalThis;
22616
+ const W = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, JA = "9.23.0", ee = globalThis;
22655
22617
  function oo() {
22656
22618
  return ao(ee), ee;
22657
22619
  }
@@ -22684,7 +22646,7 @@ function Vg(A) {
22684
22646
  function jd(A) {
22685
22647
  return jn(A, "DOMError");
22686
22648
  }
22687
- function UT(A) {
22649
+ function ST(A) {
22688
22650
  return jn(A, "DOMException");
22689
22651
  }
22690
22652
  function zt(A) {
@@ -22702,16 +22664,16 @@ function Hi(A) {
22702
22664
  function uo(A) {
22703
22665
  return typeof Event < "u" && QA(A, Event);
22704
22666
  }
22705
- function TT(A) {
22667
+ function UT(A) {
22706
22668
  return typeof Element < "u" && QA(A, Element);
22707
22669
  }
22708
- function QT(A) {
22670
+ function TT(A) {
22709
22671
  return jn(A, "RegExp");
22710
22672
  }
22711
22673
  function lo(A) {
22712
22674
  return !!(A?.then && typeof A.then == "function");
22713
22675
  }
22714
- function FT(A) {
22676
+ function QT(A) {
22715
22677
  return Hi(A) && "nativeEvent" in A && "preventDefault" in A && "stopPropagation" in A;
22716
22678
  }
22717
22679
  function QA(A, e) {
@@ -22724,10 +22686,10 @@ function QA(A, e) {
22724
22686
  function jg(A) {
22725
22687
  return !!(typeof A == "object" && A !== null && (A.__isVue || A._isVue));
22726
22688
  }
22727
- function kT(A) {
22689
+ function FT(A) {
22728
22690
  return typeof Request < "u" && QA(A, Request);
22729
22691
  }
22730
- const bu = ee, IT = 80;
22692
+ const bu = ee, kT = 80;
22731
22693
  function $g(A, e = {}) {
22732
22694
  if (!A)
22733
22695
  return "<unknown>";
@@ -22737,15 +22699,15 @@ function $g(A, e = {}) {
22737
22699
  let r = 0, s = 0;
22738
22700
  const o = " > ", a = o.length;
22739
22701
  let c;
22740
- const u = Array.isArray(e) ? e : e.keyAttrs, l = !Array.isArray(e) && e.maxStringLength || IT;
22741
- for (; t && r++ < n && (c = _T(t, u), !(c === "html" || r > 1 && s + i.length * a + c.length >= l)); )
22702
+ const u = Array.isArray(e) ? e : e.keyAttrs, l = !Array.isArray(e) && e.maxStringLength || kT;
22703
+ for (; t && r++ < n && (c = IT(t, u), !(c === "html" || r > 1 && s + i.length * a + c.length >= l)); )
22742
22704
  i.push(c), s += c.length, t = t.parentNode;
22743
22705
  return i.reverse().join(o);
22744
22706
  } catch {
22745
22707
  return "<unknown>";
22746
22708
  }
22747
22709
  }
22748
- function _T(A, e) {
22710
+ function IT(A, e) {
22749
22711
  const t = A, n = [];
22750
22712
  if (!t?.tagName)
22751
22713
  return "";
@@ -22784,7 +22746,7 @@ function Wg() {
22784
22746
  return "";
22785
22747
  }
22786
22748
  }
22787
- function xT(A) {
22749
+ function _T(A) {
22788
22750
  if (!bu.HTMLElement)
22789
22751
  return null;
22790
22752
  let e = A;
@@ -22802,7 +22764,7 @@ function xT(A) {
22802
22764
  }
22803
22765
  return null;
22804
22766
  }
22805
- const RT = "Sentry Logger ", Qc = [
22767
+ const xT = "Sentry Logger ", Qc = [
22806
22768
  "debug",
22807
22769
  "info",
22808
22770
  "warn",
@@ -22827,7 +22789,7 @@ function ho(A) {
22827
22789
  });
22828
22790
  }
22829
22791
  }
22830
- function PT() {
22792
+ function RT() {
22831
22793
  let A = !1;
22832
22794
  const e = {
22833
22795
  enable: () => {
@@ -22841,7 +22803,7 @@ function PT() {
22841
22803
  return W ? Qc.forEach((t) => {
22842
22804
  e[t] = (...n) => {
22843
22805
  A && ho(() => {
22844
- ee.console[t](`${RT}[${t}]:`, ...n);
22806
+ ee.console[t](`${xT}[${t}]:`, ...n);
22845
22807
  });
22846
22808
  };
22847
22809
  }) : Qc.forEach((t) => {
@@ -22849,7 +22811,7 @@ function PT() {
22849
22811
  };
22850
22812
  }), e;
22851
22813
  }
22852
- const M = co("logger", PT);
22814
+ const M = co("logger", RT);
22853
22815
  function Is(A, e = 0) {
22854
22816
  return typeof A != "string" || e === 0 || A.length <= e ? A : `${A.slice(0, e)}...`;
22855
22817
  }
@@ -22867,11 +22829,11 @@ function $d(A, e) {
22867
22829
  }
22868
22830
  return t.join(e);
22869
22831
  }
22870
- function DT(A, e, t = !1) {
22871
- return zt(A) ? QT(e) ? e.test(A) : zt(e) ? t ? A === e : A.includes(e) : !1 : !1;
22832
+ function PT(A, e, t = !1) {
22833
+ return zt(A) ? TT(e) ? e.test(A) : zt(e) ? t ? A === e : A.includes(e) : !1 : !1;
22872
22834
  }
22873
22835
  function fo(A, e = [], t = !1) {
22874
- return e.some((n) => DT(A, n, t));
22836
+ return e.some((n) => PT(A, n, t));
22875
22837
  }
22876
22838
  function rt(A, e, t) {
22877
22839
  if (!(e in A))
@@ -22930,7 +22892,7 @@ function Xg(A) {
22930
22892
  }
22931
22893
  function Wd(A) {
22932
22894
  try {
22933
- return TT(A) ? $g(A) : Object.prototype.toString.call(A);
22895
+ return UT(A) ? $g(A) : Object.prototype.toString.call(A);
22934
22896
  } catch {
22935
22897
  return "<unknown>";
22936
22898
  }
@@ -22944,7 +22906,7 @@ function Jd(A) {
22944
22906
  } else
22945
22907
  return {};
22946
22908
  }
22947
- function LT(A, e = 40) {
22909
+ function DT(A, e = 40) {
22948
22910
  const t = Object.keys(Xg(A));
22949
22911
  t.sort();
22950
22912
  const n = t[0];
@@ -22959,11 +22921,11 @@ function LT(A, e = 40) {
22959
22921
  }
22960
22922
  return "";
22961
22923
  }
22962
- function OT() {
22924
+ function LT() {
22963
22925
  const A = ee;
22964
22926
  return A.crypto || A.msCrypto;
22965
22927
  }
22966
- function ft(A = OT()) {
22928
+ function ft(A = LT()) {
22967
22929
  let e = () => Math.random() * 16;
22968
22930
  try {
22969
22931
  if (A?.randomUUID)
@@ -23007,7 +22969,7 @@ function Hn(A, e) {
23007
22969
  }
23008
22970
  }
23009
22971
  function Xd(A) {
23010
- if (HT(A))
22972
+ if (OT(A))
23011
22973
  return !0;
23012
22974
  try {
23013
22975
  ZA(A, "__sentry_captured__", !0);
@@ -23015,7 +22977,7 @@ function Xd(A) {
23015
22977
  }
23016
22978
  return !1;
23017
22979
  }
23018
- function HT(A) {
22980
+ function OT(A) {
23019
22981
  try {
23020
22982
  return A.__sentry_captured__;
23021
22983
  } catch {
@@ -23025,15 +22987,15 @@ const Yg = 1e3;
23025
22987
  function Xi() {
23026
22988
  return Date.now() / Yg;
23027
22989
  }
23028
- function MT() {
22990
+ function HT() {
23029
22991
  const { performance: A } = ee;
23030
22992
  if (!A?.now)
23031
22993
  return Xi;
23032
22994
  const e = Date.now() - A.now(), t = A.timeOrigin == null ? e : A.timeOrigin;
23033
22995
  return () => (t + A.now()) / Yg;
23034
22996
  }
23035
- const Zt = MT();
23036
- function NT(A) {
22997
+ const Zt = HT();
22998
+ function MT(A) {
23037
22999
  const e = Zt(), t = {
23038
23000
  sid: ft(),
23039
23001
  init: !0,
@@ -23043,7 +23005,7 @@ function NT(A) {
23043
23005
  status: "ok",
23044
23006
  errors: 0,
23045
23007
  ignoreDuration: !1,
23046
- toJSON: () => GT(t)
23008
+ toJSON: () => KT(t)
23047
23009
  };
23048
23010
  return A && Mn(t, A), t;
23049
23011
  }
@@ -23058,11 +23020,11 @@ function Mn(A, e = {}) {
23058
23020
  }
23059
23021
  e.release && (A.release = e.release), e.environment && (A.environment = e.environment), !A.ipAddress && e.ipAddress && (A.ipAddress = e.ipAddress), !A.userAgent && e.userAgent && (A.userAgent = e.userAgent), typeof e.errors == "number" && (A.errors = e.errors), e.status && (A.status = e.status);
23060
23022
  }
23061
- function KT(A, e) {
23023
+ function NT(A, e) {
23062
23024
  let t = {};
23063
23025
  e ? t = { status: e } : A.status === "ok" && (t = { status: "exited" }), Mn(A, t);
23064
23026
  }
23065
- function GT(A) {
23027
+ function KT(A) {
23066
23028
  return {
23067
23029
  sid: `${A.sid}`,
23068
23030
  init: A.init,
@@ -23105,7 +23067,7 @@ function zd() {
23105
23067
  function zg() {
23106
23068
  return ft().substring(16);
23107
23069
  }
23108
- const VT = 100;
23070
+ const GT = 100;
23109
23071
  class Tt {
23110
23072
  /** Flag if notifying is happening. */
23111
23073
  /** Callback for client to receive scope changes. */
@@ -23309,7 +23271,7 @@ class Tt {
23309
23271
  * By default, the last 100 breadcrumbs are kept.
23310
23272
  */
23311
23273
  addBreadcrumb(e, t) {
23312
- const n = typeof t == "number" ? t : VT;
23274
+ const n = typeof t == "number" ? t : GT;
23313
23275
  if (n <= 0)
23314
23276
  return this;
23315
23277
  const i = {
@@ -23443,13 +23405,13 @@ class Tt {
23443
23405
  }), this._notifyingListeners = !1);
23444
23406
  }
23445
23407
  }
23446
- function jT() {
23408
+ function VT() {
23447
23409
  return co("defaultCurrentScope", () => new Tt());
23448
23410
  }
23449
- function $T() {
23411
+ function jT() {
23450
23412
  return co("defaultIsolationScope", () => new Tt());
23451
23413
  }
23452
- class WT {
23414
+ class $T {
23453
23415
  constructor(e, t) {
23454
23416
  let n;
23455
23417
  e ? n = e : n = new Tt();
@@ -23517,23 +23479,23 @@ class WT {
23517
23479
  }
23518
23480
  function Nn() {
23519
23481
  const A = oo(), e = ao(A);
23520
- return e.stack = e.stack || new WT(jT(), $T());
23482
+ return e.stack = e.stack || new $T(VT(), jT());
23521
23483
  }
23522
- function JT(A) {
23484
+ function WT(A) {
23523
23485
  return Nn().withScope(A);
23524
23486
  }
23525
- function XT(A, e) {
23487
+ function JT(A, e) {
23526
23488
  const t = Nn();
23527
23489
  return t.withScope(() => (t.getStackTop().scope = A, e(A)));
23528
23490
  }
23529
23491
  function Zd(A) {
23530
23492
  return Nn().withScope(() => A(Nn().getIsolationScope()));
23531
23493
  }
23532
- function qT() {
23494
+ function XT() {
23533
23495
  return {
23534
23496
  withIsolationScope: Zd,
23535
- withScope: JT,
23536
- withSetScope: XT,
23497
+ withScope: WT,
23498
+ withSetScope: JT,
23537
23499
  withSetIsolationScope: (A, e) => Zd(e),
23538
23500
  getCurrentScope: () => Nn().getScope(),
23539
23501
  getIsolationScope: () => Nn().getIsolationScope()
@@ -23541,7 +23503,7 @@ function qT() {
23541
23503
  }
23542
23504
  function Su(A) {
23543
23505
  const e = ao(A);
23544
- return e.acs ? e.acs : qT();
23506
+ return e.acs ? e.acs : XT();
23545
23507
  }
23546
23508
  function $n() {
23547
23509
  const A = oo();
@@ -23551,7 +23513,7 @@ function Yi() {
23551
23513
  const A = oo();
23552
23514
  return Su(A).getIsolationScope();
23553
23515
  }
23554
- function YT() {
23516
+ function qT() {
23555
23517
  return co("globalScope", () => new Tt());
23556
23518
  }
23557
23519
  function Zg(...A) {
@@ -23565,35 +23527,35 @@ function Zg(...A) {
23565
23527
  function Ve() {
23566
23528
  return $n().getClient();
23567
23529
  }
23568
- function zT(A) {
23530
+ function YT(A) {
23569
23531
  const e = A.getPropagationContext(), { traceId: t, parentSpanId: n, propagationSpanId: i } = e, r = {
23570
23532
  trace_id: t,
23571
23533
  span_id: i || zg()
23572
23534
  };
23573
23535
  return n && (r.parent_span_id = n), r;
23574
23536
  }
23575
- const ZT = "sentry.source", eQ = "sentry.sample_rate", tQ = "sentry.previous_trace_sample_rate", AQ = "sentry.op", nQ = "sentry.origin", em = "sentry.profile_id", tm = "sentry.exclusive_time", iQ = 0, rQ = 1, sQ = "_sentryScope", oQ = "_sentryIsolationScope";
23537
+ const zT = "sentry.source", ZT = "sentry.sample_rate", eQ = "sentry.previous_trace_sample_rate", tQ = "sentry.op", AQ = "sentry.origin", em = "sentry.profile_id", tm = "sentry.exclusive_time", nQ = 0, iQ = 1, rQ = "_sentryScope", sQ = "_sentryIsolationScope";
23576
23538
  function Am(A) {
23577
23539
  return {
23578
- scope: A[sQ],
23579
- isolationScope: A[oQ]
23540
+ scope: A[rQ],
23541
+ isolationScope: A[sQ]
23580
23542
  };
23581
23543
  }
23582
- function aQ(A) {
23544
+ function oQ(A) {
23583
23545
  if (typeof A == "boolean")
23584
23546
  return Number(A);
23585
23547
  const e = typeof A == "string" ? parseFloat(A) : A;
23586
23548
  if (!(typeof e != "number" || isNaN(e) || e < 0 || e > 1))
23587
23549
  return e;
23588
23550
  }
23589
- const cQ = "sentry-", uQ = /^sentry-/;
23590
- function lQ(A) {
23591
- const e = dQ(A);
23551
+ const aQ = "sentry-", cQ = /^sentry-/;
23552
+ function uQ(A) {
23553
+ const e = lQ(A);
23592
23554
  if (!e)
23593
23555
  return;
23594
23556
  const t = Object.entries(e).reduce((n, [i, r]) => {
23595
- if (i.match(uQ)) {
23596
- const s = i.slice(cQ.length);
23557
+ if (i.match(cQ)) {
23558
+ const s = i.slice(aQ.length);
23597
23559
  n[s] = r;
23598
23560
  }
23599
23561
  return n;
@@ -23601,7 +23563,7 @@ function lQ(A) {
23601
23563
  if (Object.keys(t).length > 0)
23602
23564
  return t;
23603
23565
  }
23604
- function dQ(A) {
23566
+ function lQ(A) {
23605
23567
  if (!(!A || !zt(A) && !Array.isArray(A)))
23606
23568
  return Array.isArray(A) ? A.reduce((e, t) => {
23607
23569
  const n = eh(t);
@@ -23623,7 +23585,7 @@ function eh(A) {
23623
23585
  }
23624
23586
  const nm = 1;
23625
23587
  let th = !1;
23626
- function hQ(A) {
23588
+ function dQ(A) {
23627
23589
  const { spanId: e, traceId: t, isRemote: n } = A.spanContext(), i = n ? e : Uu(A).parent_span_id, r = Am(A).scope, s = n ? r?.getPropagationContext().propagationSpanId || zg() : e;
23628
23590
  return {
23629
23591
  parent_span_id: i,
@@ -23631,7 +23593,7 @@ function hQ(A) {
23631
23593
  trace_id: t
23632
23594
  };
23633
23595
  }
23634
- function fQ(A) {
23596
+ function hQ(A) {
23635
23597
  if (A && A.length > 0)
23636
23598
  return A.map(({ context: { spanId: e, traceId: t, traceFlags: n, ...i }, attributes: r }) => ({
23637
23599
  span_id: e,
@@ -23648,10 +23610,10 @@ function nh(A) {
23648
23610
  return A > 9999999999 ? A / 1e3 : A;
23649
23611
  }
23650
23612
  function Uu(A) {
23651
- if (gQ(A))
23613
+ if (pQ(A))
23652
23614
  return A.getSpanJSON();
23653
23615
  const { spanId: e, traceId: t } = A.spanContext();
23654
- if (pQ(A)) {
23616
+ if (fQ(A)) {
23655
23617
  const { attributes: n, startTime: i, name: r, endTime: s, status: o, links: a } = A, c = "parentSpanId" in A ? A.parentSpanId : "parentSpanContext" in A ? A.parentSpanContext?.spanId : void 0;
23656
23618
  return {
23657
23619
  span_id: e,
@@ -23662,10 +23624,10 @@ function Uu(A) {
23662
23624
  start_timestamp: Ah(i),
23663
23625
  // This is [0,0] by default in OTEL, in which case we want to interpret this as no end time
23664
23626
  timestamp: Ah(s) || void 0,
23665
- status: BQ(o),
23666
- op: n[AQ],
23667
- origin: n[nQ],
23668
- links: fQ(a)
23627
+ status: mQ(o),
23628
+ op: n[tQ],
23629
+ origin: n[AQ],
23630
+ links: hQ(a)
23669
23631
  };
23670
23632
  }
23671
23633
  return {
@@ -23675,24 +23637,24 @@ function Uu(A) {
23675
23637
  data: {}
23676
23638
  };
23677
23639
  }
23678
- function pQ(A) {
23640
+ function fQ(A) {
23679
23641
  const e = A;
23680
23642
  return !!e.attributes && !!e.startTime && !!e.name && !!e.endTime && !!e.status;
23681
23643
  }
23682
- function gQ(A) {
23644
+ function pQ(A) {
23683
23645
  return typeof A.getSpanJSON == "function";
23684
23646
  }
23685
- function mQ(A) {
23647
+ function gQ(A) {
23686
23648
  const { traceFlags: e } = A.spanContext();
23687
23649
  return e === nm;
23688
23650
  }
23689
- function BQ(A) {
23690
- if (!(!A || A.code === iQ))
23691
- return A.code === rQ ? "ok" : A.message || "unknown_error";
23651
+ function mQ(A) {
23652
+ if (!(!A || A.code === nQ))
23653
+ return A.code === iQ ? "ok" : A.message || "unknown_error";
23692
23654
  }
23693
- const vQ = "_sentryRootSpan";
23655
+ const BQ = "_sentryRootSpan";
23694
23656
  function im(A) {
23695
- return A[vQ] || A;
23657
+ return A[BQ] || A;
23696
23658
  }
23697
23659
  function ih() {
23698
23660
  th || (ho(() => {
@@ -23702,7 +23664,7 @@ function ih() {
23702
23664
  }), th = !0);
23703
23665
  }
23704
23666
  const rm = 50, en = "?", rh = /\(error: (.*)\)/, sh = /captureMessage|captureException/;
23705
- function CQ(...A) {
23667
+ function vQ(...A) {
23706
23668
  const e = A.sort((t, n) => t[0] - n[0]).map((t) => t[1]);
23707
23669
  return (t, n = 0, i = 0) => {
23708
23670
  const r = [], s = t.split(`
@@ -23724,10 +23686,10 @@ function CQ(...A) {
23724
23686
  break;
23725
23687
  }
23726
23688
  }
23727
- return wQ(r.slice(i));
23689
+ return CQ(r.slice(i));
23728
23690
  };
23729
23691
  }
23730
- function wQ(A) {
23692
+ function CQ(A) {
23731
23693
  if (!A.length)
23732
23694
  return [];
23733
23695
  const e = Array.from(A);
@@ -23740,12 +23702,12 @@ function wQ(A) {
23740
23702
  function Qr(A) {
23741
23703
  return A[A.length - 1] || {};
23742
23704
  }
23743
- const ca = "<anonymous>";
23705
+ const oa = "<anonymous>";
23744
23706
  function FA(A) {
23745
23707
  try {
23746
- return !A || typeof A != "function" ? ca : A.name || ca;
23708
+ return !A || typeof A != "function" ? oa : A.name || oa;
23747
23709
  } catch {
23748
- return ca;
23710
+ return oa;
23749
23711
  }
23750
23712
  }
23751
23713
  function oh(A) {
@@ -23791,49 +23753,49 @@ Error:`,
23791
23753
  );
23792
23754
  }
23793
23755
  }
23794
- let ua = null;
23795
- function yQ(A) {
23756
+ let aa = null;
23757
+ function wQ(A) {
23796
23758
  const e = "error";
23797
- an(e, A), cn(e, bQ);
23759
+ an(e, A), cn(e, yQ);
23798
23760
  }
23799
- function bQ() {
23800
- ua = ee.onerror, ee.onerror = function(A, e, t, n, i) {
23761
+ function yQ() {
23762
+ aa = ee.onerror, ee.onerror = function(A, e, t, n, i) {
23801
23763
  return Et("error", {
23802
23764
  column: n,
23803
23765
  error: i,
23804
23766
  line: t,
23805
23767
  msg: A,
23806
23768
  url: e
23807
- }), ua ? ua.apply(this, arguments) : !1;
23769
+ }), aa ? aa.apply(this, arguments) : !1;
23808
23770
  }, ee.onerror.__SENTRY_INSTRUMENTED__ = !0;
23809
23771
  }
23810
- let la = null;
23811
- function EQ(A) {
23772
+ let ca = null;
23773
+ function bQ(A) {
23812
23774
  const e = "unhandledrejection";
23813
- an(e, A), cn(e, SQ);
23775
+ an(e, A), cn(e, EQ);
23814
23776
  }
23815
- function SQ() {
23816
- la = ee.onunhandledrejection, ee.onunhandledrejection = function(A) {
23817
- return Et("unhandledrejection", A), la ? la.apply(this, arguments) : !0;
23777
+ function EQ() {
23778
+ ca = ee.onunhandledrejection, ee.onunhandledrejection = function(A) {
23779
+ return Et("unhandledrejection", A), ca ? ca.apply(this, arguments) : !0;
23818
23780
  }, ee.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0;
23819
23781
  }
23820
- function UQ(A) {
23782
+ function SQ(A) {
23821
23783
  if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__)
23822
23784
  return !1;
23823
23785
  const e = A || Ve()?.getOptions();
23824
23786
  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)
23825
23787
  (e.tracesSampleRate != null || !!e.tracesSampler);
23826
23788
  }
23827
- const Tu = "production", TQ = /^o(\d+)\./, QQ = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
23828
- function FQ(A) {
23789
+ const Tu = "production", UQ = /^o(\d+)\./, TQ = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
23790
+ function QQ(A) {
23829
23791
  return A === "http" || A === "https";
23830
23792
  }
23831
23793
  function po(A, e = !1) {
23832
23794
  const { host: t, path: n, pass: i, port: r, projectId: s, protocol: o, publicKey: a } = A;
23833
23795
  return `${o}://${a}${e && i ? `:${i}` : ""}@${t}${r ? `:${r}` : ""}/${n && `${n}/`}${s}`;
23834
23796
  }
23835
- function kQ(A) {
23836
- const e = QQ.exec(A);
23797
+ function FQ(A) {
23798
+ const e = TQ.exec(A);
23837
23799
  if (!e) {
23838
23800
  ho(() => {
23839
23801
  console.error(`Invalid Sentry Dsn: ${A}`);
@@ -23860,25 +23822,25 @@ function sm(A) {
23860
23822
  projectId: A.projectId
23861
23823
  };
23862
23824
  }
23863
- function IQ(A) {
23825
+ function kQ(A) {
23864
23826
  if (!W)
23865
23827
  return !0;
23866
23828
  const { port: e, projectId: t, protocol: n } = A;
23867
- return ["protocol", "publicKey", "host", "projectId"].find((s) => A[s] ? !1 : (M.error(`Invalid Sentry Dsn: ${s} missing`), !0)) ? !1 : t.match(/^\d+$/) ? FQ(n) ? e && isNaN(parseInt(e, 10)) ? (M.error(`Invalid Sentry Dsn: Invalid port ${e}`), !1) : !0 : (M.error(`Invalid Sentry Dsn: Invalid protocol ${n}`), !1) : (M.error(`Invalid Sentry Dsn: Invalid projectId ${t}`), !1);
23829
+ return ["protocol", "publicKey", "host", "projectId"].find((s) => A[s] ? !1 : (M.error(`Invalid Sentry Dsn: ${s} missing`), !0)) ? !1 : t.match(/^\d+$/) ? QQ(n) ? e && isNaN(parseInt(e, 10)) ? (M.error(`Invalid Sentry Dsn: Invalid port ${e}`), !1) : !0 : (M.error(`Invalid Sentry Dsn: Invalid protocol ${n}`), !1) : (M.error(`Invalid Sentry Dsn: Invalid projectId ${t}`), !1);
23868
23830
  }
23869
- function _Q(A) {
23870
- return A.match(TQ)?.[1];
23831
+ function IQ(A) {
23832
+ return A.match(UQ)?.[1];
23871
23833
  }
23872
- function xQ(A) {
23873
- const e = typeof A == "string" ? kQ(A) : sm(A);
23874
- if (!(!e || !IQ(e)))
23834
+ function _Q(A) {
23835
+ const e = typeof A == "string" ? FQ(A) : sm(A);
23836
+ if (!(!e || !kQ(e)))
23875
23837
  return e;
23876
23838
  }
23877
- const RQ = "_frozenDsc";
23839
+ const xQ = "_frozenDsc";
23878
23840
  function om(A, e) {
23879
23841
  const t = e.getOptions(), { publicKey: n, host: i } = e.getDsn() || {};
23880
23842
  let r;
23881
- t.orgId ? r = String(t.orgId) : i && (r = _Q(i));
23843
+ t.orgId ? r = String(t.orgId) : i && (r = IQ(i));
23882
23844
  const s = {
23883
23845
  environment: t.environment || Tu,
23884
23846
  release: t.release,
@@ -23888,26 +23850,26 @@ function om(A, e) {
23888
23850
  };
23889
23851
  return e.emit("createDsc", s), s;
23890
23852
  }
23891
- function PQ(A, e) {
23853
+ function RQ(A, e) {
23892
23854
  const t = e.getPropagationContext();
23893
23855
  return t.dsc || om(t.traceId, A);
23894
23856
  }
23895
- function DQ(A) {
23857
+ function PQ(A) {
23896
23858
  const e = Ve();
23897
23859
  if (!e)
23898
23860
  return {};
23899
- const t = im(A), n = Uu(t), i = n.data, r = t.spanContext().traceState, s = r?.get("sentry.sample_rate") ?? i[eQ] ?? i[tQ];
23861
+ const t = im(A), n = Uu(t), i = n.data, r = t.spanContext().traceState, s = r?.get("sentry.sample_rate") ?? i[ZT] ?? i[eQ];
23900
23862
  function o(f) {
23901
23863
  return (typeof s == "number" || typeof s == "string") && (f.sample_rate = `${s}`), f;
23902
23864
  }
23903
- const a = t[RQ];
23865
+ const a = t[xQ];
23904
23866
  if (a)
23905
23867
  return o(a);
23906
- const c = r?.get("sentry.dsc"), u = c && lQ(c);
23868
+ const c = r?.get("sentry.dsc"), u = c && uQ(c);
23907
23869
  if (u)
23908
23870
  return o(u);
23909
- const l = om(A.spanContext().traceId, e), d = i[ZT], h = n.description;
23910
- return d !== "url" && h && (l.transaction = h), UQ() && (l.sampled = String(mQ(t)), l.sample_rand = // In OTEL we store the sample rand on the trace state because we cannot access scopes for NonRecordingSpans
23871
+ const l = om(A.spanContext().traceId, e), d = i[zT], h = n.description;
23872
+ return d !== "url" && h && (l.transaction = h), SQ() && (l.sampled = String(gQ(t)), l.sample_rand = // In OTEL we store the sample rand on the trace state because we cannot access scopes for NonRecordingSpans
23911
23873
  // The Sentry OTEL SpanSampler takes care of writing the sample rand on the root span
23912
23874
  r?.get("sentry.sample_rand") ?? // On all other platforms we can actually get the scopes from a root span (we use this as a fallback)
23913
23875
  Am(t).scope?.getPropagationContext().sampleRand.toString()), o(l), e.emit("createDsc", l, t), l;
@@ -23921,14 +23883,14 @@ function Wt(A, e = 100, t = 1 / 0) {
23921
23883
  }
23922
23884
  function am(A, e = 3, t = 100 * 1024) {
23923
23885
  const n = Wt(A, e);
23924
- return MQ(n) > t ? am(A, e - 1, t) : n;
23886
+ return HQ(n) > t ? am(A, e - 1, t) : n;
23925
23887
  }
23926
- function Ic(A, e, t = 1 / 0, n = 1 / 0, i = NQ()) {
23888
+ function Ic(A, e, t = 1 / 0, n = 1 / 0, i = MQ()) {
23927
23889
  const [r, s] = i;
23928
23890
  if (e == null || // this matches null and undefined -> eqeq not eqeqeq
23929
23891
  ["boolean", "string"].includes(typeof e) || typeof e == "number" && Number.isFinite(e))
23930
23892
  return e;
23931
- const o = LQ(A, e);
23893
+ const o = DQ(A, e);
23932
23894
  if (!o.startsWith("[object "))
23933
23895
  return o;
23934
23896
  if (e.__sentry_skip_normalization__)
@@ -23960,7 +23922,7 @@ function Ic(A, e, t = 1 / 0, n = 1 / 0, i = NQ()) {
23960
23922
  }
23961
23923
  return s(e), u;
23962
23924
  }
23963
- function LQ(A, e) {
23925
+ function DQ(A, e) {
23964
23926
  try {
23965
23927
  if (A === "domain" && e && typeof e == "object" && e._events)
23966
23928
  return "[Domain]";
@@ -23974,7 +23936,7 @@ function LQ(A, e) {
23974
23936
  return "[Document]";
23975
23937
  if (jg(e))
23976
23938
  return "[VueViewModel]";
23977
- if (FT(e))
23939
+ if (QT(e))
23978
23940
  return "[SyntheticEvent]";
23979
23941
  if (typeof e == "number" && !Number.isFinite(e))
23980
23942
  return `[${e}]`;
@@ -23984,23 +23946,23 @@ function LQ(A, e) {
23984
23946
  return `[${String(e)}]`;
23985
23947
  if (typeof e == "bigint")
23986
23948
  return `[BigInt: ${String(e)}]`;
23987
- const t = OQ(e);
23949
+ const t = LQ(e);
23988
23950
  return /^HTML(\w*)Element$/.test(t) ? `[HTMLElement: ${t}]` : `[object ${t}]`;
23989
23951
  } catch (t) {
23990
23952
  return `**non-serializable** (${t})`;
23991
23953
  }
23992
23954
  }
23993
- function OQ(A) {
23955
+ function LQ(A) {
23994
23956
  const e = Object.getPrototypeOf(A);
23995
23957
  return e?.constructor ? e.constructor.name : "null prototype";
23996
23958
  }
23997
- function HQ(A) {
23959
+ function OQ(A) {
23998
23960
  return ~-encodeURI(A).split(/%..|./).length;
23999
23961
  }
24000
- function MQ(A) {
24001
- return HQ(JSON.stringify(A));
23962
+ function HQ(A) {
23963
+ return OQ(JSON.stringify(A));
24002
23964
  }
24003
- function NQ() {
23965
+ function MQ() {
24004
23966
  const A = /* @__PURE__ */ new WeakSet();
24005
23967
  function e(n) {
24006
23968
  return A.has(n) ? !0 : (A.add(n), !1);
@@ -24013,7 +23975,7 @@ function NQ() {
24013
23975
  function zi(A, e = []) {
24014
23976
  return [A, e];
24015
23977
  }
24016
- function KQ(A, e) {
23978
+ function NQ(A, e) {
24017
23979
  const [t, n] = A;
24018
23980
  return [t, [...n, e]];
24019
23981
  }
@@ -24030,7 +23992,7 @@ function _c(A) {
24030
23992
  const e = ao(ee);
24031
23993
  return e.encodePolyfill ? e.encodePolyfill(A) : new TextEncoder().encode(A);
24032
23994
  }
24033
- function GQ(A) {
23995
+ function KQ(A) {
24034
23996
  const [e, t] = A;
24035
23997
  let n = JSON.stringify(e);
24036
23998
  function i(r) {
@@ -24052,16 +24014,16 @@ ${JSON.stringify(s)}
24052
24014
  i(a);
24053
24015
  }
24054
24016
  }
24055
- return typeof n == "string" ? n : VQ(n);
24017
+ return typeof n == "string" ? n : GQ(n);
24056
24018
  }
24057
- function VQ(A) {
24019
+ function GQ(A) {
24058
24020
  const e = A.reduce((i, r) => i + r.length, 0), t = new Uint8Array(e);
24059
24021
  let n = 0;
24060
24022
  for (const i of A)
24061
24023
  t.set(i, n), n += i.length;
24062
24024
  return t;
24063
24025
  }
24064
- function jQ(A) {
24026
+ function VQ(A) {
24065
24027
  const e = typeof A.data == "string" ? _c(A.data) : A.data;
24066
24028
  return [
24067
24029
  {
@@ -24074,7 +24036,7 @@ function jQ(A) {
24074
24036
  e
24075
24037
  ];
24076
24038
  }
24077
- const $Q = {
24039
+ const jQ = {
24078
24040
  session: "session",
24079
24041
  sessions: "session",
24080
24042
  attachment: "attachment",
@@ -24093,7 +24055,7 @@ const $Q = {
24093
24055
  log: "log_item"
24094
24056
  };
24095
24057
  function uh(A) {
24096
- return $Q[A];
24058
+ return jQ[A];
24097
24059
  }
24098
24060
  function cm(A) {
24099
24061
  if (!A?.sdk)
@@ -24101,7 +24063,7 @@ function cm(A) {
24101
24063
  const { name: e, version: t } = A.sdk;
24102
24064
  return { name: e, version: t };
24103
24065
  }
24104
- function WQ(A, e, t, n) {
24066
+ function $Q(A, e, t, n) {
24105
24067
  const i = A.sdkProcessingMetadata?.dynamicSamplingContext;
24106
24068
  return {
24107
24069
  event_id: A.event_id,
@@ -24113,10 +24075,10 @@ function WQ(A, e, t, n) {
24113
24075
  }
24114
24076
  };
24115
24077
  }
24116
- function JQ(A, e) {
24078
+ function WQ(A, e) {
24117
24079
  return e && (A.sdk = A.sdk || {}, A.sdk.name = A.sdk.name || e.name, A.sdk.version = A.sdk.version || e.version, A.sdk.integrations = [...A.sdk.integrations || [], ...e.integrations || []], A.sdk.packages = [...A.sdk.packages || [], ...e.packages || []]), A;
24118
24080
  }
24119
- function XQ(A, e, t, n) {
24081
+ function JQ(A, e, t, n) {
24120
24082
  const i = cm(t), r = {
24121
24083
  sent_at: (/* @__PURE__ */ new Date()).toISOString(),
24122
24084
  ...i && { sdk: i },
@@ -24124,10 +24086,10 @@ function XQ(A, e, t, n) {
24124
24086
  }, s = "aggregates" in A ? [{ type: "sessions" }, A] : [{ type: "session" }, A.toJSON()];
24125
24087
  return zi(r, [s]);
24126
24088
  }
24127
- function qQ(A, e, t, n) {
24089
+ function XQ(A, e, t, n) {
24128
24090
  const i = cm(t), r = A.type && A.type !== "replay_event" ? A.type : "event";
24129
- JQ(A, t?.sdk);
24130
- const s = WQ(A, i, n, e);
24091
+ WQ(A, t?.sdk);
24092
+ const s = $Q(A, i, n, e);
24131
24093
  return delete A.sdkProcessingMetadata, zi(s, [[{ type: r }, A]]);
24132
24094
  }
24133
24095
  var Jt;
@@ -24247,7 +24209,7 @@ function xc(A, e, t, n = 0) {
24247
24209
  });
24248
24210
  }
24249
24211
  let Fr, lh, kr;
24250
- function YQ(A) {
24212
+ function qQ(A) {
24251
24213
  const e = ee._sentryDebugIds;
24252
24214
  if (!e)
24253
24215
  return {};
@@ -24270,9 +24232,9 @@ function YQ(A) {
24270
24232
  return n;
24271
24233
  }, {})), kr;
24272
24234
  }
24273
- function zQ(A, e) {
24235
+ function YQ(A, e) {
24274
24236
  const { fingerprint: t, span: n, breadcrumbs: i, sdkProcessingMetadata: r } = e;
24275
- ZQ(A, e), n && AF(A, n), nF(A, t), eF(A, i), tF(A, r);
24237
+ zQ(A, e), n && tF(A, n), AF(A, t), ZQ(A, i), eF(A, r);
24276
24238
  }
24277
24239
  function dh(A, e) {
24278
24240
  const {
@@ -24295,44 +24257,44 @@ function dh(A, e) {
24295
24257
  function Ir(A, e, t) {
24296
24258
  A[e] = qi(A[e], t, 1);
24297
24259
  }
24298
- function ZQ(A, e) {
24260
+ function zQ(A, e) {
24299
24261
  const { extra: t, tags: n, user: i, contexts: r, level: s, transactionName: o } = e;
24300
24262
  Object.keys(t).length && (A.extra = { ...t, ...A.extra }), Object.keys(n).length && (A.tags = { ...n, ...A.tags }), Object.keys(i).length && (A.user = { ...i, ...A.user }), Object.keys(r).length && (A.contexts = { ...r, ...A.contexts }), s && (A.level = s), o && A.type !== "transaction" && (A.transaction = o);
24301
24263
  }
24302
- function eF(A, e) {
24264
+ function ZQ(A, e) {
24303
24265
  const t = [...A.breadcrumbs || [], ...e];
24304
24266
  A.breadcrumbs = t.length ? t : void 0;
24305
24267
  }
24306
- function tF(A, e) {
24268
+ function eF(A, e) {
24307
24269
  A.sdkProcessingMetadata = {
24308
24270
  ...A.sdkProcessingMetadata,
24309
24271
  ...e
24310
24272
  };
24311
24273
  }
24312
- function AF(A, e) {
24274
+ function tF(A, e) {
24313
24275
  A.contexts = {
24314
- trace: hQ(e),
24276
+ trace: dQ(e),
24315
24277
  ...A.contexts
24316
24278
  }, A.sdkProcessingMetadata = {
24317
- dynamicSamplingContext: DQ(e),
24279
+ dynamicSamplingContext: PQ(e),
24318
24280
  ...A.sdkProcessingMetadata
24319
24281
  };
24320
24282
  const t = im(e), n = Uu(t).description;
24321
24283
  n && !A.transaction && A.type === "transaction" && (A.transaction = n);
24322
24284
  }
24323
- function nF(A, e) {
24285
+ function AF(A, e) {
24324
24286
  A.fingerprint = A.fingerprint ? Array.isArray(A.fingerprint) ? A.fingerprint : [A.fingerprint] : [], e && (A.fingerprint = A.fingerprint.concat(e)), A.fingerprint.length || delete A.fingerprint;
24325
24287
  }
24326
- function iF(A, e, t, n, i, r) {
24288
+ function nF(A, e, t, n, i, r) {
24327
24289
  const { normalizeDepth: s = 3, normalizeMaxBreadth: o = 1e3 } = A, a = {
24328
24290
  ...e,
24329
24291
  event_id: e.event_id || t.event_id || ft(),
24330
24292
  timestamp: e.timestamp || Xi()
24331
24293
  }, c = t.integrations || A.integrations.map((g) => g.name);
24332
- rF(a, A), aF(a, c), i && i.emit("applyFrameMetadata", e), e.type === void 0 && sF(a, A.stackParser);
24333
- const u = uF(n, t.captureContext);
24294
+ iF(a, A), oF(a, c), i && i.emit("applyFrameMetadata", e), e.type === void 0 && rF(a, A.stackParser);
24295
+ const u = cF(n, t.captureContext);
24334
24296
  t.mechanism && Hn(a, t.mechanism);
24335
- const l = i ? i.getEventProcessors() : [], d = YT().getScopeData();
24297
+ const l = i ? i.getEventProcessors() : [], d = qT().getScopeData();
24336
24298
  if (r) {
24337
24299
  const g = r.getScopeData();
24338
24300
  dh(d, g);
@@ -24342,29 +24304,29 @@ function iF(A, e, t, n, i, r) {
24342
24304
  dh(d, g);
24343
24305
  }
24344
24306
  const h = [...t.attachments || [], ...d.attachments];
24345
- h.length && (t.attachments = h), zQ(a, d);
24307
+ h.length && (t.attachments = h), YQ(a, d);
24346
24308
  const f = [
24347
24309
  ...l,
24348
24310
  // Run scope event processors _after_ all other processors
24349
24311
  ...d.eventProcessors
24350
24312
  ];
24351
- return xc(f, a, t).then((g) => (g && oF(g), typeof s == "number" && s > 0 ? cF(g, s, o) : g));
24313
+ return xc(f, a, t).then((g) => (g && sF(g), typeof s == "number" && s > 0 ? aF(g, s, o) : g));
24352
24314
  }
24353
- function rF(A, e) {
24315
+ function iF(A, e) {
24354
24316
  const { environment: t, release: n, dist: i, maxValueLength: r = 250 } = e;
24355
24317
  A.environment = A.environment || t || Tu, !A.release && n && (A.release = n), !A.dist && i && (A.dist = i);
24356
24318
  const s = A.request;
24357
24319
  s?.url && (s.url = Is(s.url, r));
24358
24320
  }
24359
- function sF(A, e) {
24360
- const t = YQ(e);
24321
+ function rF(A, e) {
24322
+ const t = qQ(e);
24361
24323
  A.exception?.values?.forEach((n) => {
24362
24324
  n.stacktrace?.frames?.forEach((i) => {
24363
24325
  i.filename && (i.debug_id = t[i.filename]);
24364
24326
  });
24365
24327
  });
24366
24328
  }
24367
- function oF(A) {
24329
+ function sF(A) {
24368
24330
  const e = {};
24369
24331
  if (A.exception?.values?.forEach((n) => {
24370
24332
  n.stacktrace?.frames?.forEach((i) => {
@@ -24382,10 +24344,10 @@ function oF(A) {
24382
24344
  });
24383
24345
  });
24384
24346
  }
24385
- function aF(A, e) {
24347
+ function oF(A, e) {
24386
24348
  e.length > 0 && (A.sdk = A.sdk || {}, A.sdk.integrations = [...A.sdk.integrations || [], ...e]);
24387
24349
  }
24388
- function cF(A, e, t) {
24350
+ function aF(A, e, t) {
24389
24351
  if (!A)
24390
24352
  return null;
24391
24353
  const n = {
@@ -24415,22 +24377,22 @@ function cF(A, e, t) {
24415
24377
  }
24416
24378
  }))), A.contexts?.flags && n.contexts && (n.contexts.flags = Wt(A.contexts.flags, 3, t)), n;
24417
24379
  }
24418
- function uF(A, e) {
24380
+ function cF(A, e) {
24419
24381
  if (!e)
24420
24382
  return A;
24421
24383
  const t = A ? A.clone() : new Tt();
24422
24384
  return t.update(e), t;
24423
24385
  }
24424
- function lF(A) {
24386
+ function uF(A) {
24425
24387
  if (A)
24426
- return dF(A) ? { captureContext: A } : fF(A) ? {
24388
+ return lF(A) ? { captureContext: A } : hF(A) ? {
24427
24389
  captureContext: A
24428
24390
  } : A;
24429
24391
  }
24430
- function dF(A) {
24392
+ function lF(A) {
24431
24393
  return A instanceof Tt || typeof A == "function";
24432
24394
  }
24433
- const hF = [
24395
+ const dF = [
24434
24396
  "user",
24435
24397
  "level",
24436
24398
  "extra",
@@ -24439,17 +24401,17 @@ const hF = [
24439
24401
  "fingerprint",
24440
24402
  "propagationContext"
24441
24403
  ];
24442
- function fF(A) {
24443
- return Object.keys(A).some((e) => hF.includes(e));
24404
+ function hF(A) {
24405
+ return Object.keys(A).some((e) => dF.includes(e));
24444
24406
  }
24445
- function pF(A, e) {
24446
- return $n().captureException(A, lF(e));
24407
+ function fF(A, e) {
24408
+ return $n().captureException(A, uF(e));
24447
24409
  }
24448
24410
  function um(A, e) {
24449
24411
  return $n().captureEvent(A, e);
24450
24412
  }
24451
24413
  function hh(A) {
24452
- const e = Yi(), t = $n(), { userAgent: n } = ee.navigator || {}, i = NT({
24414
+ const e = Yi(), t = $n(), { userAgent: n } = ee.navigator || {}, i = MT({
24453
24415
  user: t.getUser() || e.getUser(),
24454
24416
  ...n && { userAgent: n },
24455
24417
  ...A
@@ -24458,7 +24420,7 @@ function hh(A) {
24458
24420
  }
24459
24421
  function lm() {
24460
24422
  const A = Yi(), t = $n().getSession() || A.getSession();
24461
- t && KT(t), dm(), A.setSession();
24423
+ t && NT(t), dm(), A.setSession();
24462
24424
  }
24463
24425
  function dm() {
24464
24426
  const A = Yi(), e = Ve(), t = A.getSession();
@@ -24471,25 +24433,25 @@ function fh(A = !1) {
24471
24433
  }
24472
24434
  dm();
24473
24435
  }
24474
- const gF = "7";
24475
- function mF(A) {
24436
+ const pF = "7";
24437
+ function gF(A) {
24476
24438
  const e = A.protocol ? `${A.protocol}:` : "", t = A.port ? `:${A.port}` : "";
24477
24439
  return `${e}//${A.host}${t}${A.path ? `/${A.path}` : ""}/api/`;
24478
24440
  }
24479
- function BF(A) {
24480
- return `${mF(A)}${A.projectId}/envelope/`;
24441
+ function mF(A) {
24442
+ return `${gF(A)}${A.projectId}/envelope/`;
24481
24443
  }
24482
- function vF(A, e) {
24444
+ function BF(A, e) {
24483
24445
  const t = {
24484
- sentry_version: gF
24446
+ sentry_version: pF
24485
24447
  };
24486
24448
  return A.publicKey && (t.sentry_key = A.publicKey), e && (t.sentry_client = `${e.name}/${e.version}`), new URLSearchParams(t).toString();
24487
24449
  }
24488
- function CF(A, e, t) {
24489
- return e || `${BF(A)}?${vF(A, t)}`;
24450
+ function vF(A, e, t) {
24451
+ return e || `${mF(A)}?${BF(A, t)}`;
24490
24452
  }
24491
24453
  const ph = [];
24492
- function wF(A, e) {
24454
+ function CF(A, e) {
24493
24455
  const t = {};
24494
24456
  return e.forEach((n) => {
24495
24457
  n && hm(A, n, t);
@@ -24526,7 +24488,7 @@ function fm(A) {
24526
24488
  }
24527
24489
  return e;
24528
24490
  }
24529
- function yF(A) {
24491
+ function wF(A) {
24530
24492
  const { trace_id: e, parent_span_id: t, span_id: n, status: i, origin: r, data: s, op: o } = A.contexts?.trace ?? {};
24531
24493
  return {
24532
24494
  data: s ?? {},
@@ -24545,7 +24507,7 @@ function yF(A) {
24545
24507
  is_segment: !0
24546
24508
  };
24547
24509
  }
24548
- function bF(A) {
24510
+ function yF(A) {
24549
24511
  return {
24550
24512
  type: "transaction",
24551
24513
  timestamp: A.timestamp,
@@ -24569,7 +24531,7 @@ function bF(A) {
24569
24531
  measurements: A.measurements
24570
24532
  };
24571
24533
  }
24572
- function EF(A, e, t) {
24534
+ function bF(A, e, t) {
24573
24535
  const n = [
24574
24536
  { type: "client_report" },
24575
24537
  {
@@ -24586,7 +24548,7 @@ function ns(A) {
24586
24548
  [pm]: !0
24587
24549
  };
24588
24550
  }
24589
- function da(A) {
24551
+ function ua(A) {
24590
24552
  return {
24591
24553
  message: A,
24592
24554
  [gm]: !0
@@ -24598,7 +24560,7 @@ function vh(A) {
24598
24560
  function Ch(A) {
24599
24561
  return !!A && typeof A == "object" && gm in A;
24600
24562
  }
24601
- class SF {
24563
+ class EF {
24602
24564
  /** Options passed to the SDK. */
24603
24565
  /** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */
24604
24566
  /** Array of set up integrations. */
@@ -24611,8 +24573,8 @@ class SF {
24611
24573
  * @param options Options for the client.
24612
24574
  */
24613
24575
  constructor(e) {
24614
- if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = xQ(e.dsn) : W && M.warn("No DSN provided, client will not send events."), this._dsn) {
24615
- const t = CF(
24576
+ if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = _Q(e.dsn) : W && M.warn("No DSN provided, client will not send events."), this._dsn) {
24577
+ const t = vF(
24616
24578
  this._dsn,
24617
24579
  e.tunnel,
24618
24580
  e._metadata ? e._metadata.sdk : void 0
@@ -24785,9 +24747,9 @@ class SF {
24785
24747
  */
24786
24748
  sendEvent(e, t = {}) {
24787
24749
  this.emit("beforeSendEvent", e, t);
24788
- let n = qQ(e, this._dsn, this._options._metadata, this._options.tunnel);
24750
+ let n = XQ(e, this._dsn, this._options._metadata, this._options.tunnel);
24789
24751
  for (const r of t.attachments || [])
24790
- n = KQ(n, jQ(r));
24752
+ n = NQ(n, VQ(r));
24791
24753
  const i = this.sendEnvelope(n);
24792
24754
  i && i.then((r) => this.emit("afterSendEvent", e, r), null);
24793
24755
  }
@@ -24811,7 +24773,7 @@ class SF {
24811
24773
  e.release = e.release || t, e.environment = e.environment || n;
24812
24774
  }
24813
24775
  this.emit("beforeSendSession", e);
24814
- const i = XQ(e, this._dsn, this._options._metadata, this._options.tunnel);
24776
+ const i = JQ(e, this._dsn, this._options._metadata, this._options.tunnel);
24815
24777
  this.sendEnvelope(i);
24816
24778
  }
24817
24779
  /**
@@ -24857,7 +24819,7 @@ class SF {
24857
24819
  /** Setup integrations for this client. */
24858
24820
  _setupIntegrations() {
24859
24821
  const { integrations: e } = this._options;
24860
- this._integrations = wF(this, e), gh(this, e);
24822
+ this._integrations = CF(this, e), gh(this, e);
24861
24823
  }
24862
24824
  /** Updates existing session based on the provided event */
24863
24825
  _updateSessionFromEvent(e, t) {
@@ -24915,14 +24877,14 @@ class SF {
24915
24877
  */
24916
24878
  _prepareEvent(e, t, n, i) {
24917
24879
  const r = this.getOptions(), s = Object.keys(this._integrations);
24918
- return !t.integrations && s?.length && (t.integrations = s), this.emit("preprocessEvent", e, t), e.type || i.setLastEventId(e.event_id || t.event_id), iF(r, e, t, n, this, i).then((o) => {
24880
+ return !t.integrations && s?.length && (t.integrations = s), this.emit("preprocessEvent", e, t), e.type || i.setLastEventId(e.event_id || t.event_id), nF(r, e, t, n, this, i).then((o) => {
24919
24881
  if (o === null)
24920
24882
  return o;
24921
24883
  this.emit("postprocessEvent", o, t), o.contexts = {
24922
- trace: zT(n),
24884
+ trace: YT(n),
24923
24885
  ...o.contexts
24924
24886
  };
24925
- const a = PQ(this, n);
24887
+ const a = RQ(this, n);
24926
24888
  return o.sdkProcessingMetadata = {
24927
24889
  dynamicSamplingContext: a,
24928
24890
  ...o.sdkProcessingMetadata
@@ -24957,28 +24919,28 @@ class SF {
24957
24919
  * @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.
24958
24920
  */
24959
24921
  _processEvent(e, t, n, i) {
24960
- const r = this.getOptions(), { sampleRate: s } = r, o = mm(e), a = Rc(e), c = e.type || "error", u = `before send for type \`${c}\``, l = typeof s > "u" ? void 0 : aQ(s);
24922
+ const r = this.getOptions(), { sampleRate: s } = r, o = mm(e), a = Rc(e), c = e.type || "error", u = `before send for type \`${c}\``, l = typeof s > "u" ? void 0 : oQ(s);
24961
24923
  if (a && typeof l == "number" && Math.random() > l)
24962
24924
  return this.recordDroppedEvent("sample_rate", "error"), _s(
24963
- da(
24925
+ ua(
24964
24926
  `Discarding event because it's not included in the random sample (sampling rate = ${s})`
24965
24927
  )
24966
24928
  );
24967
24929
  const d = c === "replay_event" ? "replay" : c;
24968
24930
  return this._prepareEvent(e, t, n, i).then((h) => {
24969
24931
  if (h === null)
24970
- throw this.recordDroppedEvent("event_processor", d), da("An event processor returned `null`, will not send event.");
24932
+ throw this.recordDroppedEvent("event_processor", d), ua("An event processor returned `null`, will not send event.");
24971
24933
  if (t.data && t.data.__sentry__ === !0)
24972
24934
  return h;
24973
- const p = TF(this, r, h, t);
24974
- return UF(p, u);
24935
+ const p = UF(this, r, h, t);
24936
+ return SF(p, u);
24975
24937
  }).then((h) => {
24976
24938
  if (h === null) {
24977
24939
  if (this.recordDroppedEvent("before_send", d), o) {
24978
24940
  const B = 1 + (e.spans || []).length;
24979
24941
  this.recordDroppedEvent("before_send", "span", B);
24980
24942
  }
24981
- throw da(`${u} returned \`null\`, will not send event.`);
24943
+ throw ua(`${u} returned \`null\`, will not send event.`);
24982
24944
  }
24983
24945
  const f = n.getSession() || i.getSession();
24984
24946
  if (a && f && this._updateSessionFromEvent(f, h), o) {
@@ -25044,14 +25006,14 @@ Reason: ${h}`
25044
25006
  return;
25045
25007
  }
25046
25008
  W && M.log("Sending outcomes:", e);
25047
- const t = EF(e, this._options.tunnel && po(this._dsn));
25009
+ const t = bF(e, this._options.tunnel && po(this._dsn));
25048
25010
  this.sendEnvelope(t);
25049
25011
  }
25050
25012
  /**
25051
25013
  * Creates an {@link Event} from all inputs to `captureException` and non-primitive inputs to `captureMessage`.
25052
25014
  */
25053
25015
  }
25054
- function UF(A, e) {
25016
+ function SF(A, e) {
25055
25017
  const t = `${e} must return \`null\` or a valid event.`;
25056
25018
  if (lo(A))
25057
25019
  return A.then(
@@ -25068,15 +25030,15 @@ function UF(A, e) {
25068
25030
  throw ns(t);
25069
25031
  return A;
25070
25032
  }
25071
- function TF(A, e, t, n) {
25033
+ function UF(A, e, t, n) {
25072
25034
  const { beforeSend: i, beforeSendTransaction: r, beforeSendSpan: s } = e;
25073
25035
  let o = t;
25074
25036
  if (Rc(o) && i)
25075
25037
  return i(o, n);
25076
25038
  if (mm(o)) {
25077
25039
  if (s) {
25078
- const a = s(yF(o));
25079
- if (a ? o = qi(t, bF(a)) : ih(), o.spans) {
25040
+ const a = s(wF(o));
25041
+ if (a ? o = qi(t, yF(a)) : ih(), o.spans) {
25080
25042
  const c = [];
25081
25043
  for (const u of o.spans) {
25082
25044
  const l = s(u);
@@ -25104,7 +25066,7 @@ function Rc(A) {
25104
25066
  function mm(A) {
25105
25067
  return A.type === "transaction";
25106
25068
  }
25107
- function QF(A) {
25069
+ function TF(A) {
25108
25070
  return [
25109
25071
  {
25110
25072
  type: "log",
@@ -25116,26 +25078,26 @@ function QF(A) {
25116
25078
  }
25117
25079
  ];
25118
25080
  }
25119
- function FF(A, e, t, n) {
25081
+ function QF(A, e, t, n) {
25120
25082
  const i = {};
25121
25083
  return e?.sdk && (i.sdk = {
25122
25084
  name: e.sdk.name,
25123
25085
  version: e.sdk.version
25124
- }), t && n && (i.dsn = po(n)), zi(i, [QF(A)]);
25086
+ }), t && n && (i.dsn = po(n)), zi(i, [TF(A)]);
25125
25087
  }
25126
25088
  ee._sentryClientToLogBufferMap = /* @__PURE__ */ new WeakMap();
25127
- function ha(A, e) {
25128
- const t = e ?? kF(A) ?? [];
25089
+ function la(A, e) {
25090
+ const t = e ?? FF(A) ?? [];
25129
25091
  if (t.length === 0)
25130
25092
  return;
25131
- const n = A.getOptions(), i = FF(t, n._metadata, n.tunnel, A.getDsn());
25093
+ const n = A.getOptions(), i = QF(t, n._metadata, n.tunnel, A.getDsn());
25132
25094
  ee._sentryClientToLogBufferMap?.set(A, []), A.emit("flushLogs"), A.sendEnvelope(i);
25133
25095
  }
25134
- function kF(A) {
25096
+ function FF(A) {
25135
25097
  return ee._sentryClientToLogBufferMap?.get(A);
25136
25098
  }
25137
25099
  const Bm = Symbol.for("SentryBufferFullError");
25138
- function IF(A) {
25100
+ function kF(A) {
25139
25101
  const e = [];
25140
25102
  function t() {
25141
25103
  return A === void 0 || e.length < A;
@@ -25174,21 +25136,21 @@ function IF(A) {
25174
25136
  drain: r
25175
25137
  };
25176
25138
  }
25177
- const _F = 60 * 1e3;
25178
- function xF(A, e = Date.now()) {
25139
+ const IF = 60 * 1e3;
25140
+ function _F(A, e = Date.now()) {
25179
25141
  const t = parseInt(`${A}`, 10);
25180
25142
  if (!isNaN(t))
25181
25143
  return t * 1e3;
25182
25144
  const n = Date.parse(`${A}`);
25183
- return isNaN(n) ? _F : n - e;
25145
+ return isNaN(n) ? IF : n - e;
25184
25146
  }
25185
- function RF(A, e) {
25147
+ function xF(A, e) {
25186
25148
  return A[e] || A.all || 0;
25187
25149
  }
25188
- function PF(A, e, t = Date.now()) {
25189
- return RF(A, e) > t;
25150
+ function RF(A, e, t = Date.now()) {
25151
+ return xF(A, e) > t;
25190
25152
  }
25191
- function DF(A, { statusCode: e, headers: t }, n = Date.now()) {
25153
+ function PF(A, { statusCode: e, headers: t }, n = Date.now()) {
25192
25154
  const i = {
25193
25155
  ...A
25194
25156
  }, r = t?.["x-sentry-rate-limits"], s = t?.["retry-after"];
@@ -25202,12 +25164,12 @@ function DF(A, { statusCode: e, headers: t }, n = Date.now()) {
25202
25164
  h === "metric_bucket" ? (!u || u.split(";").includes("custom")) && (i[h] = n + d) : i[h] = n + d;
25203
25165
  }
25204
25166
  else
25205
- s ? i.all = n + xF(s, n) : e === 429 && (i.all = n + 60 * 1e3);
25167
+ s ? i.all = n + _F(s, n) : e === 429 && (i.all = n + 60 * 1e3);
25206
25168
  return i;
25207
25169
  }
25208
- const LF = 64;
25209
- function OF(A, e, t = IF(
25210
- A.bufferSize || LF
25170
+ const DF = 64;
25171
+ function LF(A, e, t = kF(
25172
+ A.bufferSize || DF
25211
25173
  )) {
25212
25174
  let n = {};
25213
25175
  const i = (s) => t.drain(s);
@@ -25215,15 +25177,15 @@ function OF(A, e, t = IF(
25215
25177
  const o = [];
25216
25178
  if (ch(s, (l, d) => {
25217
25179
  const h = uh(d);
25218
- PF(n, h) ? A.recordDroppedEvent("ratelimit_backoff", h) : o.push(l);
25180
+ RF(n, h) ? A.recordDroppedEvent("ratelimit_backoff", h) : o.push(l);
25219
25181
  }), o.length === 0)
25220
25182
  return tn({});
25221
25183
  const a = zi(s[0], o), c = (l) => {
25222
25184
  ch(a, (d, h) => {
25223
25185
  A.recordDroppedEvent(l, uh(h));
25224
25186
  });
25225
- }, u = () => e({ body: GQ(a) }).then(
25226
- (l) => (l.statusCode !== void 0 && (l.statusCode < 200 || l.statusCode >= 300) && W && M.warn(`Sentry responded with status code ${l.statusCode} to sent event.`), n = DF(n, l), l),
25187
+ }, u = () => e({ body: KQ(a) }).then(
25188
+ (l) => (l.statusCode !== void 0 && (l.statusCode < 200 || l.statusCode >= 300) && W && M.warn(`Sentry responded with status code ${l.statusCode} to sent event.`), n = PF(n, l), l),
25227
25189
  (l) => {
25228
25190
  throw c("network_error"), W && M.error("Encountered error running transport request:", l), l;
25229
25191
  }
@@ -25242,19 +25204,19 @@ function OF(A, e, t = IF(
25242
25204
  flush: i
25243
25205
  };
25244
25206
  }
25245
- function HF(A) {
25207
+ function OF(A) {
25246
25208
  A.user?.ip_address === void 0 && (A.user = {
25247
25209
  ...A.user,
25248
25210
  ip_address: "{{auto}}"
25249
25211
  });
25250
25212
  }
25251
- function MF(A) {
25213
+ function HF(A) {
25252
25214
  "aggregates" in A ? A.attrs?.ip_address === void 0 && (A.attrs = {
25253
25215
  ...A.attrs,
25254
25216
  ip_address: "{{auto}}"
25255
25217
  }) : A.ipAddress === void 0 && (A.ipAddress = "{{auto}}");
25256
25218
  }
25257
- function NF(A, e, t = [e], n = "npm") {
25219
+ function MF(A, e, t = [e], n = "npm") {
25258
25220
  const i = A._metadata || {};
25259
25221
  i.sdk || (i.sdk = {
25260
25222
  name: `sentry.javascript.${e}`,
@@ -25265,20 +25227,20 @@ function NF(A, e, t = [e], n = "npm") {
25265
25227
  version: JA
25266
25228
  }), A._metadata = i;
25267
25229
  }
25268
- const KF = 100;
25230
+ const NF = 100;
25269
25231
  function An(A, e) {
25270
25232
  const t = Ve(), n = Yi();
25271
25233
  if (!t)
25272
25234
  return;
25273
- const { beforeBreadcrumb: i = null, maxBreadcrumbs: r = KF } = t.getOptions();
25235
+ const { beforeBreadcrumb: i = null, maxBreadcrumbs: r = NF } = t.getOptions();
25274
25236
  if (r <= 0)
25275
25237
  return;
25276
25238
  const o = { timestamp: Xi(), ...A }, a = i ? ho(() => i(o, e)) : o;
25277
25239
  a !== null && (t.emit && t.emit("beforeAddBreadcrumb", a, e), n.addBreadcrumb(a, r));
25278
25240
  }
25279
25241
  let wh;
25280
- const GF = "FunctionToString", yh = /* @__PURE__ */ new WeakMap(), VF = () => ({
25281
- name: GF,
25242
+ const KF = "FunctionToString", yh = /* @__PURE__ */ new WeakMap(), GF = () => ({
25243
+ name: KF,
25282
25244
  setupOnce() {
25283
25245
  wh = Function.prototype.toString;
25284
25246
  try {
@@ -25292,7 +25254,7 @@ const GF = "FunctionToString", yh = /* @__PURE__ */ new WeakMap(), VF = () => ({
25292
25254
  setup(A) {
25293
25255
  yh.set(A, !0);
25294
25256
  }
25295
- }), jF = VF, $F = [
25257
+ }), VF = GF, jF = [
25296
25258
  /^Script error\.?$/,
25297
25259
  /^Javascript error: Script error\.? on line 0$/,
25298
25260
  /^ResizeObserver loop completed with undelivered notifications.$/,
@@ -25313,10 +25275,10 @@ const GF = "FunctionToString", yh = /* @__PURE__ */ new WeakMap(), VF = () => ({
25313
25275
  // unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps
25314
25276
  /^Java exception was raised during method invocation$/
25315
25277
  // error from Facebook Mobile browser (https://github.com/getsentry/sentry-javascript/issues/15065)
25316
- ], WF = "EventFilters", JF = (A = {}) => {
25278
+ ], $F = "EventFilters", WF = (A = {}) => {
25317
25279
  let e;
25318
25280
  return {
25319
- name: WF,
25281
+ name: $F,
25320
25282
  setup(t) {
25321
25283
  const n = t.getOptions();
25322
25284
  e = bh(A, n);
@@ -25326,11 +25288,11 @@ const GF = "FunctionToString", yh = /* @__PURE__ */ new WeakMap(), VF = () => ({
25326
25288
  const r = i.getOptions();
25327
25289
  e = bh(A, r);
25328
25290
  }
25329
- return qF(t, e) ? null : t;
25291
+ return XF(t, e) ? null : t;
25330
25292
  }
25331
25293
  };
25332
- }, XF = (A = {}) => ({
25333
- ...JF(A),
25294
+ }, JF = (A = {}) => ({
25295
+ ...WF(A),
25334
25296
  name: "InboundFilters"
25335
25297
  });
25336
25298
  function bh(A = {}, e = {}) {
@@ -25340,32 +25302,32 @@ function bh(A = {}, e = {}) {
25340
25302
  ignoreErrors: [
25341
25303
  ...A.ignoreErrors || [],
25342
25304
  ...e.ignoreErrors || [],
25343
- ...A.disableErrorDefaults ? [] : $F
25305
+ ...A.disableErrorDefaults ? [] : jF
25344
25306
  ],
25345
25307
  ignoreTransactions: [...A.ignoreTransactions || [], ...e.ignoreTransactions || []]
25346
25308
  };
25347
25309
  }
25348
- function qF(A, e) {
25310
+ function XF(A, e) {
25349
25311
  if (A.type) {
25350
- if (A.type === "transaction" && zF(A, e.ignoreTransactions))
25312
+ if (A.type === "transaction" && YF(A, e.ignoreTransactions))
25351
25313
  return W && M.warn(
25352
25314
  `Event dropped due to being matched by \`ignoreTransactions\` option.
25353
25315
  Event: ${NA(A)}`
25354
25316
  ), !0;
25355
25317
  } else {
25356
- if (YF(A, e.ignoreErrors))
25318
+ if (qF(A, e.ignoreErrors))
25357
25319
  return W && M.warn(
25358
25320
  `Event dropped due to being matched by \`ignoreErrors\` option.
25359
25321
  Event: ${NA(A)}`
25360
25322
  ), !0;
25361
- if (Ak(A))
25323
+ if (tk(A))
25362
25324
  return W && M.warn(
25363
25325
  `Event dropped due to not having an error message, error type or stacktrace.
25364
25326
  Event: ${NA(
25365
25327
  A
25366
25328
  )}`
25367
25329
  ), !0;
25368
- if (ZF(A, e.denyUrls))
25330
+ if (zF(A, e.denyUrls))
25369
25331
  return W && M.warn(
25370
25332
  `Event dropped due to being matched by \`denyUrls\` option.
25371
25333
  Event: ${NA(
@@ -25373,7 +25335,7 @@ Event: ${NA(
25373
25335
  )}.
25374
25336
  Url: ${xs(A)}`
25375
25337
  ), !0;
25376
- if (!ek(A, e.allowUrls))
25338
+ if (!ZF(A, e.allowUrls))
25377
25339
  return W && M.warn(
25378
25340
  `Event dropped due to not being matched by \`allowUrls\` option.
25379
25341
  Event: ${NA(
@@ -25384,28 +25346,28 @@ Url: ${xs(A)}`
25384
25346
  }
25385
25347
  return !1;
25386
25348
  }
25387
- function YF(A, e) {
25349
+ function qF(A, e) {
25388
25350
  return e?.length ? fm(A).some((t) => fo(t, e)) : !1;
25389
25351
  }
25390
- function zF(A, e) {
25352
+ function YF(A, e) {
25391
25353
  if (!e?.length)
25392
25354
  return !1;
25393
25355
  const t = A.transaction;
25394
25356
  return t ? fo(t, e) : !1;
25395
25357
  }
25396
- function ZF(A, e) {
25358
+ function zF(A, e) {
25397
25359
  if (!e?.length)
25398
25360
  return !1;
25399
25361
  const t = xs(A);
25400
25362
  return t ? fo(t, e) : !1;
25401
25363
  }
25402
- function ek(A, e) {
25364
+ function ZF(A, e) {
25403
25365
  if (!e?.length)
25404
25366
  return !0;
25405
25367
  const t = xs(A);
25406
25368
  return t ? fo(t, e) : !0;
25407
25369
  }
25408
- function tk(A = []) {
25370
+ function ek(A = []) {
25409
25371
  for (let e = A.length - 1; e >= 0; e--) {
25410
25372
  const t = A[e];
25411
25373
  if (t && t.filename !== "<anonymous>" && t.filename !== "[native code]")
@@ -25416,19 +25378,19 @@ function tk(A = []) {
25416
25378
  function xs(A) {
25417
25379
  try {
25418
25380
  const t = [...A.exception?.values ?? []].reverse().find((n) => n.mechanism?.parent_id === void 0 && n.stacktrace?.frames?.length)?.stacktrace?.frames;
25419
- return t ? tk(t) : null;
25381
+ return t ? ek(t) : null;
25420
25382
  } catch {
25421
25383
  return W && M.error(`Cannot extract url for event ${NA(A)}`), null;
25422
25384
  }
25423
25385
  }
25424
- function Ak(A) {
25386
+ function tk(A) {
25425
25387
  return A.exception?.values?.length ? (
25426
25388
  // No top-level message
25427
25389
  !A.message && // There are no exception values that have a stacktrace, a non-generic-Error type or value
25428
25390
  !A.exception.values.some((e) => e.stacktrace || e.type && e.type !== "Error" || e.value)
25429
25391
  ) : !1;
25430
25392
  }
25431
- function nk(A, e, t, n, i, r) {
25393
+ function Ak(A, e, t, n, i, r) {
25432
25394
  if (!i.exception?.values || !r || !QA(r.originalException, Error))
25433
25395
  return;
25434
25396
  const s = i.exception.values.length > 0 ? i.exception.values[i.exception.values.length - 1] : void 0;
@@ -25494,11 +25456,11 @@ function Sh(A, e, t, n) {
25494
25456
  parent_id: n
25495
25457
  };
25496
25458
  }
25497
- function ik(A) {
25459
+ function nk(A) {
25498
25460
  const e = "console";
25499
- an(e, A), cn(e, rk);
25461
+ an(e, A), cn(e, ik);
25500
25462
  }
25501
- function rk() {
25463
+ function ik() {
25502
25464
  "console" in ee && Qc.forEach(function(A) {
25503
25465
  A in ee.console && rt(ee.console, A, function(e) {
25504
25466
  return ks[A] = e, function(...t) {
@@ -25507,33 +25469,33 @@ function rk() {
25507
25469
  });
25508
25470
  });
25509
25471
  }
25510
- function sk(A) {
25472
+ function rk(A) {
25511
25473
  return A === "warn" ? "warning" : ["fatal", "error", "warning", "log", "info", "debug"].includes(A) ? A : "log";
25512
25474
  }
25513
- const ok = "Dedupe", ak = () => {
25475
+ const sk = "Dedupe", ok = () => {
25514
25476
  let A;
25515
25477
  return {
25516
- name: ok,
25478
+ name: sk,
25517
25479
  processEvent(e) {
25518
25480
  if (e.type)
25519
25481
  return e;
25520
25482
  try {
25521
- if (uk(e, A))
25483
+ if (ck(e, A))
25522
25484
  return W && M.warn("Event dropped due to being a duplicate of previously captured event."), null;
25523
25485
  } catch {
25524
25486
  }
25525
25487
  return A = e;
25526
25488
  }
25527
25489
  };
25528
- }, ck = ak;
25529
- function uk(A, e) {
25530
- return e ? !!(lk(A, e) || dk(A, e)) : !1;
25490
+ }, ak = ok;
25491
+ function ck(A, e) {
25492
+ return e ? !!(uk(A, e) || lk(A, e)) : !1;
25531
25493
  }
25532
- function lk(A, e) {
25494
+ function uk(A, e) {
25533
25495
  const t = A.message, n = e.message;
25534
25496
  return !(!t && !n || t && !n || !t && n || t !== n || !Cm(A, e) || !vm(A, e));
25535
25497
  }
25536
- function dk(A, e) {
25498
+ function lk(A, e) {
25537
25499
  const t = Uh(e), n = Uh(A);
25538
25500
  return !(!t || !n || t.type !== n.type || t.value !== n.value || !Cm(A, e) || !vm(A, e));
25539
25501
  }
@@ -25566,7 +25528,7 @@ function Cm(A, e) {
25566
25528
  function Uh(A) {
25567
25529
  return A.exception?.values && A.exception.values[0];
25568
25530
  }
25569
- function fa(A) {
25531
+ function da(A) {
25570
25532
  if (!A)
25571
25533
  return {};
25572
25534
  const e = A.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
@@ -25588,10 +25550,10 @@ function wm(A) {
25588
25550
  return A >= 400 && A < 500 ? "warning" : A >= 500 ? "error" : void 0;
25589
25551
  }
25590
25552
  const Mi = ee;
25591
- function hk() {
25553
+ function dk() {
25592
25554
  return "history" in Mi && !!Mi.history;
25593
25555
  }
25594
- function fk() {
25556
+ function hk() {
25595
25557
  if (!("fetch" in Mi))
25596
25558
  return !1;
25597
25559
  try {
@@ -25603,10 +25565,10 @@ function fk() {
25603
25565
  function Dc(A) {
25604
25566
  return A && /^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(A.toString());
25605
25567
  }
25606
- function pk() {
25568
+ function fk() {
25607
25569
  if (typeof EdgeRuntime == "string")
25608
25570
  return !0;
25609
- if (!fk())
25571
+ if (!hk())
25610
25572
  return !1;
25611
25573
  if (Dc(Mi.fetch))
25612
25574
  return !0;
@@ -25621,14 +25583,14 @@ function pk() {
25621
25583
  }
25622
25584
  return A;
25623
25585
  }
25624
- function gk(A, e) {
25586
+ function pk(A, e) {
25625
25587
  const t = "fetch";
25626
- an(t, A), cn(t, () => mk(void 0, e));
25588
+ an(t, A), cn(t, () => gk(void 0, e));
25627
25589
  }
25628
- function mk(A, e = !1) {
25629
- e && !pk() || rt(ee, "fetch", function(t) {
25590
+ function gk(A, e = !1) {
25591
+ e && !fk() || rt(ee, "fetch", function(t) {
25630
25592
  return function(...n) {
25631
- const i = new Error(), { method: r, url: s } = Bk(n), o = {
25593
+ const i = new Error(), { method: r, url: s } = mk(n), o = {
25632
25594
  args: n,
25633
25595
  fetchData: {
25634
25596
  method: r,
@@ -25637,7 +25599,7 @@ function mk(A, e = !1) {
25637
25599
  startTimestamp: Zt() * 1e3,
25638
25600
  // // Adding the error to be able to fingerprint the failed fetch event in HttpClient instrumentation
25639
25601
  virtualError: i,
25640
- headers: vk(n)
25602
+ headers: Bk(n)
25641
25603
  };
25642
25604
  return A || Et("fetch", {
25643
25605
  ...o
@@ -25670,7 +25632,7 @@ function Lc(A, e) {
25670
25632
  function Th(A) {
25671
25633
  return typeof A == "string" ? A : A ? Lc(A, "url") ? A.url : A.toString ? A.toString() : "" : "";
25672
25634
  }
25673
- function Bk(A) {
25635
+ function mk(A) {
25674
25636
  if (A.length === 0)
25675
25637
  return { method: "GET", url: "" };
25676
25638
  if (A.length === 2) {
@@ -25686,17 +25648,17 @@ function Bk(A) {
25686
25648
  method: Lc(e, "method") ? String(e.method).toUpperCase() : "GET"
25687
25649
  };
25688
25650
  }
25689
- function vk(A) {
25651
+ function Bk(A) {
25690
25652
  const [e, t] = A;
25691
25653
  try {
25692
25654
  if (typeof t == "object" && t !== null && "headers" in t && t.headers)
25693
25655
  return new Headers(t.headers);
25694
- if (kT(e))
25656
+ if (FT(e))
25695
25657
  return new Headers(e.headers);
25696
25658
  } catch {
25697
25659
  }
25698
25660
  }
25699
- function Ck() {
25661
+ function vk() {
25700
25662
  return "npm";
25701
25663
  }
25702
25664
  const Re = ee;
@@ -25704,7 +25666,7 @@ let Oc = 0;
25704
25666
  function ym() {
25705
25667
  return Oc > 0;
25706
25668
  }
25707
- function wk() {
25669
+ function Ck() {
25708
25670
  Oc++, setTimeout(() => {
25709
25671
  Oc--;
25710
25672
  });
@@ -25729,11 +25691,11 @@ function Kn(A, e = {}) {
25729
25691
  const r = i.map((s) => Kn(s, e));
25730
25692
  return A.apply(this, r);
25731
25693
  } catch (r) {
25732
- throw wk(), Zg((s) => {
25694
+ throw Ck(), Zg((s) => {
25733
25695
  s.addEventProcessor((o) => (e.mechanism && (Fc(o, void 0, void 0), Hn(o, e.mechanism)), o.extra = {
25734
25696
  ...o.extra,
25735
25697
  arguments: i
25736
- }, o)), pF(r);
25698
+ }, o)), fF(r);
25737
25699
  }), r;
25738
25700
  }
25739
25701
  };
@@ -25753,7 +25715,7 @@ function Kn(A, e = {}) {
25753
25715
  }
25754
25716
  return n;
25755
25717
  }
25756
- function yk() {
25718
+ function wk() {
25757
25719
  const A = Wg(), { referrer: e } = Re.document || {}, { userAgent: t } = Re.navigator || {}, n = {
25758
25720
  ...e && { Referer: e },
25759
25721
  ...t && { "User-Agent": t }
@@ -25765,13 +25727,13 @@ function yk() {
25765
25727
  }
25766
25728
  function Qu(A, e) {
25767
25729
  const t = Fu(A, e), n = {
25768
- type: Tk(e),
25769
- value: Qk(e)
25730
+ type: Uk(e),
25731
+ value: Tk(e)
25770
25732
  };
25771
25733
  return t.length && (n.stacktrace = { frames: t }), n.type === void 0 && n.value === "" && (n.value = "Unrecoverable error caught"), n;
25772
25734
  }
25773
- function bk(A, e, t, n) {
25774
- const r = Ve()?.getOptions().normalizeDepth, s = xk(e), o = {
25735
+ function yk(A, e, t, n) {
25736
+ const r = Ve()?.getOptions().normalizeDepth, s = _k(e), o = {
25775
25737
  __serialized__: am(e, r)
25776
25738
  };
25777
25739
  if (s)
@@ -25786,7 +25748,7 @@ function bk(A, e, t, n) {
25786
25748
  values: [
25787
25749
  {
25788
25750
  type: uo(e) ? e.constructor.name : n ? "UnhandledRejection" : "Error",
25789
- value: Ik(e, { isUnhandledRejection: n })
25751
+ value: kk(e, { isUnhandledRejection: n })
25790
25752
  }
25791
25753
  ]
25792
25754
  },
@@ -25798,7 +25760,7 @@ function bk(A, e, t, n) {
25798
25760
  }
25799
25761
  return a;
25800
25762
  }
25801
- function pa(A, e) {
25763
+ function ha(A, e) {
25802
25764
  return {
25803
25765
  exception: {
25804
25766
  values: [Qu(A, e)]
@@ -25806,54 +25768,54 @@ function pa(A, e) {
25806
25768
  };
25807
25769
  }
25808
25770
  function Fu(A, e) {
25809
- const t = e.stacktrace || e.stack || "", n = Sk(e), i = Uk(e);
25771
+ const t = e.stacktrace || e.stack || "", n = Ek(e), i = Sk(e);
25810
25772
  try {
25811
25773
  return A(t, n, i);
25812
25774
  } catch {
25813
25775
  }
25814
25776
  return [];
25815
25777
  }
25816
- const Ek = /Minified React error #\d+;/i;
25817
- function Sk(A) {
25818
- return A && Ek.test(A.message) ? 1 : 0;
25778
+ const bk = /Minified React error #\d+;/i;
25779
+ function Ek(A) {
25780
+ return A && bk.test(A.message) ? 1 : 0;
25819
25781
  }
25820
- function Uk(A) {
25782
+ function Sk(A) {
25821
25783
  return typeof A.framesToPop == "number" ? A.framesToPop : 0;
25822
25784
  }
25823
25785
  function bm(A) {
25824
25786
  return typeof WebAssembly < "u" && typeof WebAssembly.Exception < "u" ? A instanceof WebAssembly.Exception : !1;
25825
25787
  }
25826
- function Tk(A) {
25788
+ function Uk(A) {
25827
25789
  const e = A?.name;
25828
25790
  return !e && bm(A) ? A.message && Array.isArray(A.message) && A.message.length == 2 ? A.message[0] : "WebAssembly.Exception" : e;
25829
25791
  }
25830
- function Qk(A) {
25792
+ function Tk(A) {
25831
25793
  const e = A?.message;
25832
25794
  return bm(A) ? Array.isArray(A.message) && A.message.length == 2 ? A.message[1] : "wasm exception" : e ? e.error && typeof e.error.message == "string" ? e.error.message : e : "No error message";
25833
25795
  }
25834
- function Fk(A, e, t, n) {
25796
+ function Qk(A, e, t, n) {
25835
25797
  const i = t?.syntheticException || void 0, r = ku(A, e, i, n);
25836
25798
  return Hn(r), r.level = "error", t?.event_id && (r.event_id = t.event_id), tn(r);
25837
25799
  }
25838
- function kk(A, e, t = "info", n, i) {
25800
+ function Fk(A, e, t = "info", n, i) {
25839
25801
  const r = n?.syntheticException || void 0, s = Hc(A, e, r, i);
25840
25802
  return s.level = t, n?.event_id && (s.event_id = n.event_id), tn(s);
25841
25803
  }
25842
25804
  function ku(A, e, t, n, i) {
25843
25805
  let r;
25844
25806
  if (Vg(e) && e.error)
25845
- return pa(A, e.error);
25846
- if (jd(e) || UT(e)) {
25807
+ return ha(A, e.error);
25808
+ if (jd(e) || ST(e)) {
25847
25809
  const s = e;
25848
25810
  if ("stack" in e)
25849
- r = pa(A, e);
25811
+ r = ha(A, e);
25850
25812
  else {
25851
25813
  const o = s.name || (jd(s) ? "DOMError" : "DOMException"), a = s.message ? `${o}: ${s.message}` : o;
25852
25814
  r = Hc(A, a, t, n), Fc(r, a);
25853
25815
  }
25854
25816
  return "code" in s && (r.tags = { ...r.tags, "DOMException.code": `${s.code}` }), r;
25855
25817
  }
25856
- return Cu(e) ? pa(A, e) : Hi(e) || uo(e) ? (r = bk(A, e, t, i), Hn(r, {
25818
+ return Cu(e) ? ha(A, e) : Hi(e) || uo(e) ? (r = yk(A, e, t, i), Hn(r, {
25857
25819
  synthetic: !0
25858
25820
  }), r) : (r = Hc(A, e, t, n), Fc(r, `${e}`, void 0), Hn(r, {
25859
25821
  synthetic: !0
@@ -25876,18 +25838,18 @@ function Hc(A, e, t, n) {
25876
25838
  }
25877
25839
  return i.message = e, i;
25878
25840
  }
25879
- function Ik(A, { isUnhandledRejection: e }) {
25880
- const t = LT(A), n = e ? "promise rejection" : "exception";
25881
- return Vg(A) ? `Event \`ErrorEvent\` captured as ${n} with message \`${A.message}\`` : uo(A) ? `Event \`${_k(A)}\` (type=${A.type}) captured as ${n}` : `Object captured as ${n} with keys: ${t}`;
25841
+ function kk(A, { isUnhandledRejection: e }) {
25842
+ const t = DT(A), n = e ? "promise rejection" : "exception";
25843
+ return Vg(A) ? `Event \`ErrorEvent\` captured as ${n} with message \`${A.message}\`` : uo(A) ? `Event \`${Ik(A)}\` (type=${A.type}) captured as ${n}` : `Object captured as ${n} with keys: ${t}`;
25882
25844
  }
25883
- function _k(A) {
25845
+ function Ik(A) {
25884
25846
  try {
25885
25847
  const e = Object.getPrototypeOf(A);
25886
25848
  return e ? e.constructor.name : void 0;
25887
25849
  } catch {
25888
25850
  }
25889
25851
  }
25890
- function xk(A) {
25852
+ function _k(A) {
25891
25853
  for (const e in A)
25892
25854
  if (Object.prototype.hasOwnProperty.call(A, e)) {
25893
25855
  const t = A[e];
@@ -25895,38 +25857,38 @@ function xk(A) {
25895
25857
  return t;
25896
25858
  }
25897
25859
  }
25898
- const Rk = 5e3;
25899
- class Pk extends SF {
25860
+ const xk = 5e3;
25861
+ class Rk extends EF {
25900
25862
  /**
25901
25863
  * Creates a new Browser SDK instance.
25902
25864
  *
25903
25865
  * @param options Configuration options for this SDK.
25904
25866
  */
25905
25867
  constructor(e) {
25906
- const t = Dk(e), n = Re.SENTRY_SDK_SOURCE || Ck();
25907
- NF(t, "browser", ["browser"], n), super(t);
25868
+ const t = Pk(e), n = Re.SENTRY_SDK_SOURCE || vk();
25869
+ MF(t, "browser", ["browser"], n), super(t);
25908
25870
  const { sendDefaultPii: i, sendClientReports: r, _experiments: s } = this._options, o = s?.enableLogs;
25909
25871
  Re.document && (r || o) && Re.document.addEventListener("visibilitychange", () => {
25910
- Re.document.visibilityState === "hidden" && (r && this._flushOutcomes(), o && ha(this));
25872
+ Re.document.visibilityState === "hidden" && (r && this._flushOutcomes(), o && la(this));
25911
25873
  }), o && (this.on("flush", () => {
25912
- ha(this);
25874
+ la(this);
25913
25875
  }), this.on("afterCaptureLog", () => {
25914
25876
  this._logFlushIdleTimeout && clearTimeout(this._logFlushIdleTimeout), this._logFlushIdleTimeout = setTimeout(() => {
25915
- ha(this);
25916
- }, Rk);
25917
- })), i && (this.on("postprocessEvent", HF), this.on("beforeSendSession", MF));
25877
+ la(this);
25878
+ }, xk);
25879
+ })), i && (this.on("postprocessEvent", OF), this.on("beforeSendSession", HF));
25918
25880
  }
25919
25881
  /**
25920
25882
  * @inheritDoc
25921
25883
  */
25922
25884
  eventFromException(e, t) {
25923
- return Fk(this._options.stackParser, e, t, this._options.attachStacktrace);
25885
+ return Qk(this._options.stackParser, e, t, this._options.attachStacktrace);
25924
25886
  }
25925
25887
  /**
25926
25888
  * @inheritDoc
25927
25889
  */
25928
25890
  eventFromMessage(e, t = "info", n) {
25929
- return kk(this._options.stackParser, e, t, n, this._options.attachStacktrace);
25891
+ return Fk(this._options.stackParser, e, t, n, this._options.attachStacktrace);
25930
25892
  }
25931
25893
  /**
25932
25894
  * @inheritDoc
@@ -25935,7 +25897,7 @@ class Pk extends SF {
25935
25897
  return e.platform = e.platform || "javascript", super._prepareEvent(e, t, n, i);
25936
25898
  }
25937
25899
  }
25938
- function Dk(A) {
25900
+ function Pk(A) {
25939
25901
  return {
25940
25902
  release: typeof __SENTRY_RELEASE__ == "string" ? __SENTRY_RELEASE__ : Re.SENTRY_RELEASE?.id,
25941
25903
  // This supports the variable that sentry-webpack-plugin injects
@@ -25945,13 +25907,13 @@ function Dk(A) {
25945
25907
  ...A
25946
25908
  };
25947
25909
  }
25948
- const Lk = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, Ge = ee, Ok = 1e3;
25910
+ const Dk = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, Ge = ee, Lk = 1e3;
25949
25911
  let Qh, Mc, Nc;
25950
- function Hk(A) {
25912
+ function Ok(A) {
25951
25913
  const e = "dom";
25952
- an(e, A), cn(e, Mk);
25914
+ an(e, A), cn(e, Hk);
25953
25915
  }
25954
- function Mk() {
25916
+ function Hk() {
25955
25917
  if (!Ge.document)
25956
25918
  return;
25957
25919
  const A = Et.bind(null, "dom"), e = Fh(A, !0);
@@ -25988,7 +25950,7 @@ function Mk() {
25988
25950
  ));
25989
25951
  });
25990
25952
  }
25991
- function Nk(A) {
25953
+ function Mk(A) {
25992
25954
  if (A.type !== Mc)
25993
25955
  return !1;
25994
25956
  try {
@@ -25998,24 +25960,24 @@ function Nk(A) {
25998
25960
  }
25999
25961
  return !0;
26000
25962
  }
26001
- function Kk(A, e) {
25963
+ function Nk(A, e) {
26002
25964
  return A !== "keypress" ? !1 : e?.tagName ? !(e.tagName === "INPUT" || e.tagName === "TEXTAREA" || e.isContentEditable) : !0;
26003
25965
  }
26004
25966
  function Fh(A, e = !1) {
26005
25967
  return (t) => {
26006
25968
  if (!t || t._sentryCaptured)
26007
25969
  return;
26008
- const n = Gk(t);
26009
- if (Kk(t.type, n))
25970
+ const n = Kk(t);
25971
+ if (Nk(t.type, n))
26010
25972
  return;
26011
25973
  ZA(t, "_sentryCaptured", !0), n && !n._sentryId && ZA(n, "_sentryId", ft());
26012
25974
  const i = t.type === "keypress" ? "input" : t.type;
26013
- Nk(t) || (A({ event: t, name: i, global: e }), Mc = t.type, Nc = n ? n._sentryId : void 0), clearTimeout(Qh), Qh = Ge.setTimeout(() => {
25975
+ Mk(t) || (A({ event: t, name: i, global: e }), Mc = t.type, Nc = n ? n._sentryId : void 0), clearTimeout(Qh), Qh = Ge.setTimeout(() => {
26014
25976
  Nc = void 0, Mc = void 0;
26015
- }, Ok);
25977
+ }, Lk);
26016
25978
  };
26017
25979
  }
26018
- function Gk(A) {
25980
+ function Kk(A) {
26019
25981
  try {
26020
25982
  return A.target;
26021
25983
  } catch {
@@ -26025,21 +25987,21 @@ function Gk(A) {
26025
25987
  let _r;
26026
25988
  function Em(A) {
26027
25989
  const e = "history";
26028
- an(e, A), cn(e, Vk);
25990
+ an(e, A), cn(e, Gk);
26029
25991
  }
26030
- function Vk() {
25992
+ function Gk() {
26031
25993
  if (Ge.addEventListener("popstate", () => {
26032
25994
  const e = Ge.location.href, t = _r;
26033
25995
  if (_r = e, t === e)
26034
25996
  return;
26035
25997
  Et("history", { from: t, to: e });
26036
- }), !hk())
25998
+ }), !dk())
26037
25999
  return;
26038
26000
  function A(e) {
26039
26001
  return function(...t) {
26040
26002
  const n = t.length > 2 ? t[2] : void 0;
26041
26003
  if (n) {
26042
- const i = _r, r = jk(String(n));
26004
+ const i = _r, r = Vk(String(n));
26043
26005
  if (_r = r, i === r)
26044
26006
  return e.apply(this, t);
26045
26007
  Et("history", { from: i, to: r });
@@ -26049,7 +26011,7 @@ function Vk() {
26049
26011
  }
26050
26012
  rt(Ge.history, "pushState", A), rt(Ge.history, "replaceState", A);
26051
26013
  }
26052
- function jk(A) {
26014
+ function Vk(A) {
26053
26015
  try {
26054
26016
  return new URL(A, Ge.location.origin).toString();
26055
26017
  } catch {
@@ -26057,7 +26019,7 @@ function jk(A) {
26057
26019
  }
26058
26020
  }
26059
26021
  const is = {};
26060
- function $k(A) {
26022
+ function jk(A) {
26061
26023
  const e = is[A];
26062
26024
  if (e)
26063
26025
  return e;
@@ -26072,7 +26034,7 @@ function $k(A) {
26072
26034
  const r = i.contentWindow;
26073
26035
  r?.[A] && (t = r[A]), n.head.removeChild(i);
26074
26036
  } catch (i) {
26075
- Lk && M.warn(`Could not create sandbox iframe for ${A} check, bailing to window.${A}: `, i);
26037
+ Dk && M.warn(`Could not create sandbox iframe for ${A} check, bailing to window.${A}: `, i);
26076
26038
  }
26077
26039
  return t && (is[A] = t.bind(Ge));
26078
26040
  }
@@ -26080,17 +26042,17 @@ function kh(A) {
26080
26042
  is[A] = void 0;
26081
26043
  }
26082
26044
  const Bi = "__sentry_xhr_v3__";
26083
- function Wk(A) {
26045
+ function $k(A) {
26084
26046
  const e = "xhr";
26085
- an(e, A), cn(e, Jk);
26047
+ an(e, A), cn(e, Wk);
26086
26048
  }
26087
- function Jk() {
26049
+ function Wk() {
26088
26050
  if (!Ge.XMLHttpRequest)
26089
26051
  return;
26090
26052
  const A = XMLHttpRequest.prototype;
26091
26053
  A.open = new Proxy(A.open, {
26092
26054
  apply(e, t, n) {
26093
- const i = new Error(), r = Zt() * 1e3, s = zt(n[0]) ? n[0].toUpperCase() : void 0, o = Xk(n[1]);
26055
+ const i = new Error(), r = Zt() * 1e3, s = zt(n[0]) ? n[0].toUpperCase() : void 0, o = Jk(n[1]);
26094
26056
  if (!s || !o)
26095
26057
  return e.apply(t, n);
26096
26058
  t[Bi] = {
@@ -26139,7 +26101,7 @@ function Jk() {
26139
26101
  }
26140
26102
  });
26141
26103
  }
26142
- function Xk(A) {
26104
+ function Jk(A) {
26143
26105
  if (zt(A))
26144
26106
  return A;
26145
26107
  try {
@@ -26147,7 +26109,7 @@ function Xk(A) {
26147
26109
  } catch {
26148
26110
  }
26149
26111
  }
26150
- function qk(A, e = $k("fetch")) {
26112
+ function Xk(A, e = jk("fetch")) {
26151
26113
  let t = 0, n = 0;
26152
26114
  function i(r) {
26153
26115
  const s = r.body.length;
@@ -26185,9 +26147,9 @@ function qk(A, e = $k("fetch")) {
26185
26147
  return kh("fetch"), t -= s, n--, _s(a);
26186
26148
  }
26187
26149
  }
26188
- return OF(A, i);
26150
+ return LF(A, i);
26189
26151
  }
26190
- const Yk = 30, zk = 50;
26152
+ const qk = 30, Yk = 50;
26191
26153
  function Kc(A, e, t, n) {
26192
26154
  const i = {
26193
26155
  filename: A,
@@ -26197,38 +26159,38 @@ function Kc(A, e, t, n) {
26197
26159
  };
26198
26160
  return t !== void 0 && (i.lineno = t), n !== void 0 && (i.colno = n), i;
26199
26161
  }
26200
- const Zk = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, eI = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, tI = /\((\S*)(?::(\d+))(?::(\d+))\)/, AI = (A) => {
26201
- const e = Zk.exec(A);
26162
+ const zk = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, Zk = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, eI = /\((\S*)(?::(\d+))(?::(\d+))\)/, tI = (A) => {
26163
+ const e = zk.exec(A);
26202
26164
  if (e) {
26203
26165
  const [, n, i, r] = e;
26204
26166
  return Kc(n, en, +i, +r);
26205
26167
  }
26206
- const t = eI.exec(A);
26168
+ const t = Zk.exec(A);
26207
26169
  if (t) {
26208
26170
  if (t[2] && t[2].indexOf("eval") === 0) {
26209
- const s = tI.exec(t[2]);
26171
+ const s = eI.exec(t[2]);
26210
26172
  s && (t[2] = s[1], t[3] = s[2], t[4] = s[3]);
26211
26173
  }
26212
26174
  const [i, r] = Sm(t[1] || en, t[2]);
26213
26175
  return Kc(r, i, t[3] ? +t[3] : void 0, t[4] ? +t[4] : void 0);
26214
26176
  }
26215
- }, nI = [Yk, AI], iI = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i, rI = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, sI = (A) => {
26216
- const e = iI.exec(A);
26177
+ }, AI = [qk, tI], nI = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i, iI = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, rI = (A) => {
26178
+ const e = nI.exec(A);
26217
26179
  if (e) {
26218
26180
  if (e[3] && e[3].indexOf(" > eval") > -1) {
26219
- const r = rI.exec(e[3]);
26181
+ const r = iI.exec(e[3]);
26220
26182
  r && (e[1] = e[1] || "eval", e[3] = r[1], e[4] = r[2], e[5] = "");
26221
26183
  }
26222
26184
  let n = e[3], i = e[1] || en;
26223
26185
  return [i, n] = Sm(i, n), Kc(n, i, e[4] ? +e[4] : void 0, e[5] ? +e[5] : void 0);
26224
26186
  }
26225
- }, oI = [zk, sI], aI = [nI, oI], cI = CQ(...aI), Sm = (A, e) => {
26187
+ }, sI = [Yk, rI], oI = [AI, sI], aI = vQ(...oI), Sm = (A, e) => {
26226
26188
  const t = A.indexOf("safari-extension") !== -1, n = A.indexOf("safari-web-extension") !== -1;
26227
26189
  return t || n ? [
26228
26190
  A.indexOf("@") !== -1 ? A.split("@")[0] : en,
26229
26191
  t ? `safari-extension:${e}` : `safari-web-extension:${e}`
26230
26192
  ] : [A, e];
26231
- }, Iu = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, xr = 1024, uI = "Breadcrumbs", lI = (A = {}) => {
26193
+ }, Iu = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__, xr = 1024, cI = "Breadcrumbs", uI = (A = {}) => {
26232
26194
  const e = {
26233
26195
  console: !0,
26234
26196
  dom: !0,
@@ -26239,13 +26201,13 @@ const Zk = /^\s*at (\S+?)(?::(\d+))(?::(\d+))\s*$/i, eI = /^\s*at (?:(.+?\)(?: \
26239
26201
  ...A
26240
26202
  };
26241
26203
  return {
26242
- name: uI,
26204
+ name: cI,
26243
26205
  setup(t) {
26244
- e.console && ik(pI(t)), e.dom && Hk(fI(t, e.dom)), e.xhr && Wk(gI(t)), e.fetch && gk(mI(t)), e.history && Em(BI(t)), e.sentry && t.on("beforeSendEvent", hI(t));
26206
+ e.console && nk(fI(t)), e.dom && Ok(hI(t, e.dom)), e.xhr && $k(pI(t)), e.fetch && pk(gI(t)), e.history && Em(mI(t)), e.sentry && t.on("beforeSendEvent", dI(t));
26245
26207
  }
26246
26208
  };
26247
- }, dI = lI;
26248
- function hI(A) {
26209
+ }, lI = uI;
26210
+ function dI(A) {
26249
26211
  return function(t) {
26250
26212
  Ve() === A && An(
26251
26213
  {
@@ -26260,7 +26222,7 @@ function hI(A) {
26260
26222
  );
26261
26223
  };
26262
26224
  }
26263
- function fI(A, e) {
26225
+ function hI(A, e) {
26264
26226
  return function(n) {
26265
26227
  if (Ve() !== A)
26266
26228
  return;
@@ -26269,8 +26231,8 @@ function fI(A, e) {
26269
26231
  `\`dom.maxStringLength\` cannot exceed ${xr}, but a value of ${o} was configured. Sentry will use ${xr} instead.`
26270
26232
  ), o = xr), typeof s == "string" && (s = [s]);
26271
26233
  try {
26272
- const c = n.event, u = vI(c) ? c.target : c;
26273
- i = $g(u, { keyAttrs: s, maxStringLength: o }), r = xT(u);
26234
+ const c = n.event, u = BI(c) ? c.target : c;
26235
+ i = $g(u, { keyAttrs: s, maxStringLength: o }), r = _T(u);
26274
26236
  } catch {
26275
26237
  i = "<unknown>";
26276
26238
  }
@@ -26287,7 +26249,7 @@ function fI(A, e) {
26287
26249
  });
26288
26250
  };
26289
26251
  }
26290
- function pI(A) {
26252
+ function fI(A) {
26291
26253
  return function(t) {
26292
26254
  if (Ve() !== A)
26293
26255
  return;
@@ -26297,7 +26259,7 @@ function pI(A) {
26297
26259
  arguments: t.args,
26298
26260
  logger: "console"
26299
26261
  },
26300
- level: sk(t.level),
26262
+ level: rk(t.level),
26301
26263
  message: $d(t.args, " ")
26302
26264
  };
26303
26265
  if (t.level === "assert")
@@ -26311,7 +26273,7 @@ function pI(A) {
26311
26273
  });
26312
26274
  };
26313
26275
  }
26314
- function gI(A) {
26276
+ function pI(A) {
26315
26277
  return function(t) {
26316
26278
  if (Ve() !== A)
26317
26279
  return;
@@ -26336,7 +26298,7 @@ function gI(A) {
26336
26298
  A.emit("beforeOutgoingRequestBreadcrumb", d, l), An(d, l);
26337
26299
  };
26338
26300
  }
26339
- function mI(A) {
26301
+ function gI(A) {
26340
26302
  return function(t) {
26341
26303
  if (Ve() !== A)
26342
26304
  return;
@@ -26376,14 +26338,14 @@ function mI(A) {
26376
26338
  }
26377
26339
  };
26378
26340
  }
26379
- function BI(A) {
26341
+ function mI(A) {
26380
26342
  return function(t) {
26381
26343
  if (Ve() !== A)
26382
26344
  return;
26383
26345
  let n = t.from, i = t.to;
26384
- const r = fa(Re.location.href);
26385
- let s = n ? fa(n) : void 0;
26386
- const o = fa(i);
26346
+ const r = da(Re.location.href);
26347
+ let s = n ? da(n) : void 0;
26348
+ const o = da(i);
26387
26349
  s?.path || (s = r), r.protocol === o.protocol && r.host === o.host && (i = o.relative), r.protocol === s.protocol && r.host === s.host && (n = s.relative), An({
26388
26350
  category: "navigation",
26389
26351
  data: {
@@ -26393,10 +26355,10 @@ function BI(A) {
26393
26355
  });
26394
26356
  };
26395
26357
  }
26396
- function vI(A) {
26358
+ function BI(A) {
26397
26359
  return !!A && !!A.target;
26398
26360
  }
26399
- const CI = [
26361
+ const vI = [
26400
26362
  "EventTarget",
26401
26363
  "Window",
26402
26364
  "Node",
@@ -26428,7 +26390,7 @@ const CI = [
26428
26390
  "XMLHttpRequest",
26429
26391
  "XMLHttpRequestEventTarget",
26430
26392
  "XMLHttpRequestUpload"
26431
- ], wI = "BrowserApiErrors", yI = (A = {}) => {
26393
+ ], CI = "BrowserApiErrors", wI = (A = {}) => {
26432
26394
  const e = {
26433
26395
  XMLHttpRequest: !0,
26434
26396
  eventTarget: !0,
@@ -26438,16 +26400,16 @@ const CI = [
26438
26400
  ...A
26439
26401
  };
26440
26402
  return {
26441
- name: wI,
26403
+ name: CI,
26442
26404
  // TODO: This currently only works for the first client this is setup
26443
26405
  // We may want to adjust this to check for client etc.
26444
26406
  setupOnce() {
26445
- e.setTimeout && rt(Re, "setTimeout", Ih), e.setInterval && rt(Re, "setInterval", Ih), e.requestAnimationFrame && rt(Re, "requestAnimationFrame", EI), e.XMLHttpRequest && "XMLHttpRequest" in Re && rt(XMLHttpRequest.prototype, "send", SI);
26407
+ e.setTimeout && rt(Re, "setTimeout", Ih), e.setInterval && rt(Re, "setInterval", Ih), e.requestAnimationFrame && rt(Re, "requestAnimationFrame", bI), e.XMLHttpRequest && "XMLHttpRequest" in Re && rt(XMLHttpRequest.prototype, "send", EI);
26446
26408
  const t = e.eventTarget;
26447
- t && (Array.isArray(t) ? t : CI).forEach(UI);
26409
+ t && (Array.isArray(t) ? t : vI).forEach(SI);
26448
26410
  }
26449
26411
  };
26450
- }, bI = yI;
26412
+ }, yI = wI;
26451
26413
  function Ih(A) {
26452
26414
  return function(...e) {
26453
26415
  const t = e[0];
@@ -26460,7 +26422,7 @@ function Ih(A) {
26460
26422
  }), A.apply(this, e);
26461
26423
  };
26462
26424
  }
26463
- function EI(A) {
26425
+ function bI(A) {
26464
26426
  return function(e) {
26465
26427
  return A.apply(this, [
26466
26428
  Kn(e, {
@@ -26476,7 +26438,7 @@ function EI(A) {
26476
26438
  ]);
26477
26439
  };
26478
26440
  }
26479
- function SI(A) {
26441
+ function EI(A) {
26480
26442
  return function(...e) {
26481
26443
  const t = this;
26482
26444
  return ["onload", "onerror", "onprogress", "onreadystatechange"].forEach((i) => {
@@ -26496,12 +26458,12 @@ function SI(A) {
26496
26458
  }), A.apply(this, e);
26497
26459
  };
26498
26460
  }
26499
- function UI(A) {
26461
+ function SI(A) {
26500
26462
  const t = Re[A]?.prototype;
26501
26463
  t?.hasOwnProperty?.("addEventListener") && (rt(t, "addEventListener", function(n) {
26502
26464
  return function(i, r, s) {
26503
26465
  try {
26504
- TI(r) && (r.handleEvent = Kn(r.handleEvent, {
26466
+ UI(r) && (r.handleEvent = Kn(r.handleEvent, {
26505
26467
  mechanism: {
26506
26468
  data: {
26507
26469
  function: "handleEvent",
@@ -26541,10 +26503,10 @@ function UI(A) {
26541
26503
  };
26542
26504
  }));
26543
26505
  }
26544
- function TI(A) {
26506
+ function UI(A) {
26545
26507
  return typeof A.handleEvent == "function";
26546
26508
  }
26547
- const QI = () => ({
26509
+ const TI = () => ({
26548
26510
  name: "BrowserSession",
26549
26511
  setupOnce() {
26550
26512
  if (typeof Re.document > "u") {
@@ -26555,28 +26517,28 @@ const QI = () => ({
26555
26517
  A !== void 0 && A !== e && (hh({ ignoreDuration: !0 }), fh());
26556
26518
  });
26557
26519
  }
26558
- }), FI = "GlobalHandlers", kI = (A = {}) => {
26520
+ }), QI = "GlobalHandlers", FI = (A = {}) => {
26559
26521
  const e = {
26560
26522
  onerror: !0,
26561
26523
  onunhandledrejection: !0,
26562
26524
  ...A
26563
26525
  };
26564
26526
  return {
26565
- name: FI,
26527
+ name: QI,
26566
26528
  setupOnce() {
26567
26529
  Error.stackTraceLimit = 50;
26568
26530
  },
26569
26531
  setup(t) {
26570
- e.onerror && (_I(t), _h("onerror")), e.onunhandledrejection && (xI(t), _h("onunhandledrejection"));
26532
+ e.onerror && (II(t), _h("onerror")), e.onunhandledrejection && (_I(t), _h("onunhandledrejection"));
26571
26533
  }
26572
26534
  };
26573
- }, II = kI;
26574
- function _I(A) {
26575
- yQ((e) => {
26535
+ }, kI = FI;
26536
+ function II(A) {
26537
+ wQ((e) => {
26576
26538
  const { stackParser: t, attachStacktrace: n } = Um();
26577
26539
  if (Ve() !== A || ym())
26578
26540
  return;
26579
- const { msg: i, url: r, line: s, column: o, error: a } = e, c = DI(
26541
+ const { msg: i, url: r, line: s, column: o, error: a } = e, c = PI(
26580
26542
  ku(t, a || i, void 0, n, !1),
26581
26543
  r,
26582
26544
  s,
@@ -26591,12 +26553,12 @@ function _I(A) {
26591
26553
  });
26592
26554
  });
26593
26555
  }
26594
- function xI(A) {
26595
- EQ((e) => {
26556
+ function _I(A) {
26557
+ bQ((e) => {
26596
26558
  const { stackParser: t, attachStacktrace: n } = Um();
26597
26559
  if (Ve() !== A || ym())
26598
26560
  return;
26599
- const i = RI(e), r = yu(i) ? PI(i) : ku(t, i, void 0, n, !0);
26561
+ const i = xI(e), r = yu(i) ? RI(i) : ku(t, i, void 0, n, !0);
26600
26562
  r.level = "error", um(r, {
26601
26563
  originalException: i,
26602
26564
  mechanism: {
@@ -26606,7 +26568,7 @@ function xI(A) {
26606
26568
  });
26607
26569
  });
26608
26570
  }
26609
- function RI(A) {
26571
+ function xI(A) {
26610
26572
  if (yu(A))
26611
26573
  return A;
26612
26574
  try {
@@ -26618,7 +26580,7 @@ function RI(A) {
26618
26580
  }
26619
26581
  return A;
26620
26582
  }
26621
- function PI(A) {
26583
+ function RI(A) {
26622
26584
  return {
26623
26585
  exception: {
26624
26586
  values: [
@@ -26631,7 +26593,7 @@ function PI(A) {
26631
26593
  }
26632
26594
  };
26633
26595
  }
26634
- function DI(A, e, t, n) {
26596
+ function PI(A, e, t, n) {
26635
26597
  const i = A.exception = A.exception || {}, r = i.values = i.values || [], s = r[0] = r[0] || {}, o = s.stacktrace = s.stacktrace || {}, a = o.frames = o.frames || [], c = n, u = t, l = zt(e) && e.length > 0 ? e : Wg();
26636
26598
  return a.length === 0 && a.push({
26637
26599
  colno: c,
@@ -26650,12 +26612,12 @@ function Um() {
26650
26612
  attachStacktrace: !1
26651
26613
  };
26652
26614
  }
26653
- const LI = () => ({
26615
+ const DI = () => ({
26654
26616
  name: "HttpContext",
26655
26617
  preprocessEvent(A) {
26656
26618
  if (!Re.navigator && !Re.location && !Re.document)
26657
26619
  return;
26658
- const e = yk(), t = {
26620
+ const e = wk(), t = {
26659
26621
  ...e.headers,
26660
26622
  ...A.request?.headers
26661
26623
  };
@@ -26665,13 +26627,13 @@ const LI = () => ({
26665
26627
  headers: t
26666
26628
  };
26667
26629
  }
26668
- }), OI = "cause", HI = 5, MI = "LinkedErrors", NI = (A = {}) => {
26669
- const e = A.limit || HI, t = A.key || OI;
26630
+ }), LI = "cause", OI = 5, HI = "LinkedErrors", MI = (A = {}) => {
26631
+ const e = A.limit || OI, t = A.key || LI;
26670
26632
  return {
26671
- name: MI,
26633
+ name: HI,
26672
26634
  preprocessEvent(n, i, r) {
26673
26635
  const s = r.getOptions();
26674
- nk(
26636
+ Ak(
26675
26637
  // This differs from the LinkedErrors integration in core by using a different exceptionFromError function
26676
26638
  Qu,
26677
26639
  s.stackParser,
@@ -26682,32 +26644,32 @@ const LI = () => ({
26682
26644
  );
26683
26645
  }
26684
26646
  };
26685
- }, KI = NI;
26686
- function GI(A) {
26647
+ }, NI = MI;
26648
+ function KI(A) {
26687
26649
  return [
26688
26650
  // TODO(v10): Replace with `eventFiltersIntegration` once we remove the deprecated `inboundFiltersIntegration`
26689
26651
  // eslint-disable-next-line deprecation/deprecation
26690
- XF(),
26691
- jF(),
26692
- bI(),
26693
- dI(),
26694
- II(),
26695
- KI(),
26696
- ck(),
26697
- LI(),
26698
- QI()
26652
+ JF(),
26653
+ VF(),
26654
+ yI(),
26655
+ lI(),
26656
+ kI(),
26657
+ NI(),
26658
+ ak(),
26659
+ DI(),
26660
+ TI()
26699
26661
  ];
26700
26662
  }
26701
- function VI() {
26702
- const A = GI().filter(
26663
+ function GI() {
26664
+ const A = KI().filter(
26703
26665
  (n) => !["BrowserApiErrors", "Breadcrumbs", "GlobalHandlers", "HttpContext"].includes(
26704
26666
  n.name
26705
26667
  )
26706
- ), e = new Pk({
26668
+ ), e = new Rk({
26707
26669
  dsn: "https://ac54bd10eac67be2dafbc346e704e4d4@o4507251798835200.ingest.us.sentry.io/4509409566392320",
26708
26670
  environment: "production",
26709
- transport: qk,
26710
- stackParser: cI,
26671
+ transport: Xk,
26672
+ stackParser: aI,
26711
26673
  integrations: A,
26712
26674
  // Enhanced configuration for better error tracking
26713
26675
  beforeSend(n, i) {
@@ -26720,12 +26682,12 @@ function VI() {
26720
26682
  return t.setClient(e), e.init(), t;
26721
26683
  }
26722
26684
  let Rs = null, At = {};
26723
- function jI() {
26724
- Rs || (Rs = VI());
26685
+ function VI() {
26686
+ Rs || (Rs = GI());
26725
26687
  }
26726
26688
  function ct(A, e) {
26727
26689
  {
26728
- if (jI(), !Rs)
26690
+ if (VI(), !Rs)
26729
26691
  return;
26730
26692
  Zg((t) => {
26731
26693
  Object.entries(At).forEach(([n, i]) => {
@@ -26770,7 +26732,7 @@ function ai(A, e, t) {
26770
26732
  }
26771
26733
  };
26772
26734
  }
26773
- function $I(A, e, t) {
26735
+ function jI(A, e, t) {
26774
26736
  return (...n) => {
26775
26737
  try {
26776
26738
  se(`${e}_started`, { componentName: t }, t);
@@ -26816,6 +26778,50 @@ function Tm(A) {
26816
26778
  }
26817
26779
  };
26818
26780
  }
26781
+ class $I {
26782
+ /**
26783
+ * Create a new StorageManager with a specific namespace
26784
+ * @param namespace The namespace to prefix all keys with
26785
+ */
26786
+ constructor(e) {
26787
+ this.namespace = e;
26788
+ }
26789
+ /**
26790
+ * Get a value from localStorage with the namespace prefix
26791
+ * @param key The key to retrieve
26792
+ * @returns The stored value or null if not found
26793
+ */
26794
+ getItem(e) {
26795
+ return localStorage.getItem(`${this.namespace}.${e}`);
26796
+ }
26797
+ /**
26798
+ * Set a value in localStorage with the namespace prefix
26799
+ * @param key The key to set
26800
+ * @param value The value to store
26801
+ */
26802
+ setItem(e, t) {
26803
+ localStorage.setItem(`${this.namespace}.${e}`, t);
26804
+ }
26805
+ /**
26806
+ * Remove a value from localStorage with the namespace prefix
26807
+ * @param key The key to remove
26808
+ */
26809
+ removeItem(e) {
26810
+ localStorage.removeItem(`${this.namespace}.${e}`);
26811
+ }
26812
+ /**
26813
+ * Clear all keys that belong to this namespace
26814
+ */
26815
+ clear() {
26816
+ for (let e = 0; e < localStorage.length; e++) {
26817
+ const t = localStorage.key(e);
26818
+ t && t.startsWith(`${this.namespace}.`) && localStorage.removeItem(t);
26819
+ }
26820
+ }
26821
+ }
26822
+ const fa = {
26823
+ SESSION_DATA: "session_data"
26824
+ }, pa = new $I("io.obi.widget");
26819
26825
  var WI = Object.defineProperty, JI = Object.getOwnPropertyDescriptor, go = (A, e, t, n) => {
26820
26826
  for (var i = n > 1 ? void 0 : n ? JI(e, t) : e, r = A.length - 1, s; r >= 0; r--)
26821
26827
  (s = A[r]) && (i = (n ? s(e, t, i) : s(i)) || i);
@@ -27048,7 +27054,7 @@ var A_ = Object.defineProperty, n_ = Object.getOwnPropertyDescriptor, nA = (A, e
27048
27054
  };
27049
27055
  class un extends Ft {
27050
27056
  constructor() {
27051
- super(), this.id = "", this.name = "", this.description = "", this.duration = 10, this.selected = !1, this.handleClick = $I(
27057
+ super(), this.id = "", this.name = "", this.description = "", this.duration = 10, this.selected = !1, this.handleClick = jI(
27052
27058
  () => {
27053
27059
  se(
27054
27060
  "course_clicked",
@@ -28045,13 +28051,7 @@ let er = class extends Ft {
28045
28051
  }
28046
28052
  for (let d = 0; d < this.barCount; d++) {
28047
28053
  const h = l.length > 0 && l[d] !== void 0 ? l[d] : c;
28048
- if (this.volume.speaker === "USER") {
28049
- const B = Math.floor((h * 0.5 + 0.5) * 255).toString(16).padStart(2, "0");
28050
- t.fillStyle = `${this.primaryColor}${B}`;
28051
- } else {
28052
- const B = Math.floor((h * 0.5 + 0.5) * 255).toString(16).padStart(2, "0");
28053
- t.fillStyle = `#FFFFFF${B}`;
28054
- }
28054
+ this.volume.speaker === "USER" ? t.fillStyle = `${this.primaryColor}` : t.fillStyle = "#FFFFFF";
28055
28055
  const f = Math.max(2, h * 0.8 * a), p = i - (this.barCount - d) * (o + s), g = o / 2;
28056
28056
  t.beginPath(), t.moveTo(p + g, r / 2 - f), t.lineTo(p + o - g, r / 2 - f), t.quadraticCurveTo(
28057
28057
  p + o,
@@ -28419,139 +28419,184 @@ let De = class extends Ft {
28419
28419
  speaker: "ASSISTANT",
28420
28420
  volume: 0,
28421
28421
  spectrum: []
28422
- }, this.sessionToken = null, this.roomToken = null, this.roomUrl = null, this.boundSaveSessionData = null, this.obiClient = null, this.closeNavTimeoutRef = null, this.researchingTimeoutRef = null, this.connectObi = ai(async (e) => {
28423
- if (this.activeSession) {
28424
- se("connection_already_exists", { sessionToken: e }, "ObiWidget"), console.log("Connection already exists");
28425
- return;
28426
- }
28427
- se("session_connection_started", { sessionToken: e }, "ObiWidget"), vi({ sessionId: e });
28428
- try {
28429
- const t = this.createSession(e);
28430
- if (!t) {
28431
- this.handleSessionCreationFailure(() => this.removeSessionUrlParams());
28422
+ }, this.sessionToken = null, this.roomToken = null, this.roomUrl = null, this.boundSaveSessionData = null, this.obiClient = null, this.closeNavTimeoutRef = null, this.researchingTimeoutRef = null, this.connectObi = ai(
28423
+ async (e) => {
28424
+ if (this.activeSession) {
28425
+ se("connection_already_exists", { sessionToken: e }, "ObiWidget"), console.log("Connection already exists");
28432
28426
  return;
28433
28427
  }
28434
- this.setupSessionEventListeners(t, () => this.removeSessionUrlParams()), t.on("screenCaptureRequested", ai(async () => {
28435
- se("screen_capture_requested", {}, "ObiWidget");
28436
- try {
28437
- const r = (await yT(document.documentElement, {
28438
- useCORS: !0,
28439
- allowTaint: !0,
28440
- foreignObjectRendering: !0
28441
- })).toDataURL("image/png");
28442
- this.activeSession.emit("screenCaptureComplete", r), se("screen_capture_completed", {}, "ObiWidget");
28443
- } catch (i) {
28444
- ct(i, {
28445
- componentName: "ObiWidget",
28446
- handlerName: "screenCaptureRequested",
28447
- sessionToken: e
28448
- }), console.error("[obi] error capturing screen:", i), this.activeSession.emit("screenCaptureComplete", "error"), se("screen_capture_failed", {
28449
- error: i instanceof Error ? i.message : String(i)
28450
- }, "ObiWidget");
28428
+ se("session_connection_started", { sessionToken: e }, "ObiWidget"), vi({ sessionId: e });
28429
+ try {
28430
+ const t = this.createSession(e);
28431
+ if (!t) {
28432
+ this.handleSessionCreationFailure(() => this.removeSessionUrlParams());
28433
+ return;
28451
28434
  }
28452
- }, "screenCaptureRequested", "ObiWidget"));
28453
- const n = await t.connect();
28454
- n && (this.sessionToken = e, this.roomToken = n.token, this.roomUrl = n.url, vi({
28455
- sessionId: e,
28456
- widgetState: this.state.toString()
28457
- }), this.removeSessionUrlParams(), se("session_connection_established", {
28458
- sessionToken: e,
28459
- hasRoomToken: !!n.token
28460
- }, "ObiWidget")), this.activeSession = t;
28461
- } catch (t) {
28462
- console.error("Failed to start session:", t), ct(t, {
28463
- componentName: "ObiWidget",
28464
- handlerName: "connectObi",
28465
- sessionToken: e
28466
- }), this.handleSessionCreationFailure(() => this.removeSessionUrlParams());
28467
- }
28468
- }, "connectObi", "ObiWidget"), this.handleCourseSelectEvent = (e) => {
28435
+ this.setupSessionEventListeners(t, () => this.removeSessionUrlParams()), t.on(
28436
+ "screenCaptureRequested",
28437
+ ai(
28438
+ async () => {
28439
+ se("screen_capture_requested", {}, "ObiWidget");
28440
+ try {
28441
+ const r = (await yT(document.documentElement, {
28442
+ useCORS: !0,
28443
+ allowTaint: !0,
28444
+ foreignObjectRendering: !0
28445
+ })).toDataURL("image/png");
28446
+ this.activeSession.emit("screenCaptureComplete", r), se("screen_capture_completed", {}, "ObiWidget");
28447
+ } catch (i) {
28448
+ ct(i, {
28449
+ componentName: "ObiWidget",
28450
+ handlerName: "screenCaptureRequested",
28451
+ sessionToken: e
28452
+ }), console.error("[obi] error capturing screen:", i), this.activeSession.emit("screenCaptureComplete", "error"), se(
28453
+ "screen_capture_failed",
28454
+ {
28455
+ error: i instanceof Error ? i.message : String(i)
28456
+ },
28457
+ "ObiWidget"
28458
+ );
28459
+ }
28460
+ },
28461
+ "screenCaptureRequested",
28462
+ "ObiWidget"
28463
+ )
28464
+ );
28465
+ const n = await t.connect();
28466
+ n && (this.sessionToken = e, this.roomToken = n.token, this.roomUrl = n.url, vi({
28467
+ sessionId: e,
28468
+ widgetState: this.state.toString()
28469
+ }), this.removeSessionUrlParams(), se(
28470
+ "session_connection_established",
28471
+ {
28472
+ sessionToken: e,
28473
+ hasRoomToken: !!n.token
28474
+ },
28475
+ "ObiWidget"
28476
+ )), this.activeSession = t;
28477
+ } catch (t) {
28478
+ console.error("Failed to start session:", t), ct(t, {
28479
+ componentName: "ObiWidget",
28480
+ handlerName: "connectObi",
28481
+ sessionToken: e
28482
+ }), this.handleSessionCreationFailure(() => this.removeSessionUrlParams());
28483
+ }
28484
+ },
28485
+ "connectObi",
28486
+ "ObiWidget"
28487
+ ), this.handleCourseSelectEvent = (e) => {
28469
28488
  const t = e;
28470
28489
  this.selectedCourse = t.detail, this.showCourseModal = !1, this.showSessionStartModal = !0;
28471
- }, this.handleUrlSessionEvent = ai(async (e) => {
28472
- se("url_session_event", { sessionToken: e }, "ObiWidget");
28473
- try {
28474
- if (!this.obiClient) {
28475
- const n = new Error("ObiClient not initialized");
28476
- ct(n, {
28490
+ }, this.handleUrlSessionEvent = ai(
28491
+ async (e) => {
28492
+ se("url_session_event", { sessionToken: e }, "ObiWidget");
28493
+ try {
28494
+ if (!this.obiClient) {
28495
+ const n = new Error("ObiClient not initialized");
28496
+ ct(n, {
28497
+ componentName: "ObiWidget",
28498
+ handlerName: "handleUrlSessionEvent",
28499
+ sessionToken: e
28500
+ }), console.error("ObiClient not initialized");
28501
+ return;
28502
+ }
28503
+ const t = await this.obiClient.startSession(e, this.apiKey);
28504
+ if (t.data) {
28505
+ const { session: n } = t.data;
28506
+ if (console.log("[obi-sdk] session:", n), se(
28507
+ "session_started",
28508
+ {
28509
+ sessionId: n?.id,
28510
+ sessionToken: e
28511
+ },
28512
+ "ObiWidget"
28513
+ ), n) {
28514
+ const i = n;
28515
+ this.selectedCourse = {
28516
+ id: e,
28517
+ name: i.onboarding_plan?.name || "",
28518
+ description: i.onboarding_plan?.description || ""
28519
+ }, this.state = O.LOADING, this.showSessionStartModal = !0, se(
28520
+ "matching_session_found",
28521
+ {
28522
+ sessionToken: e,
28523
+ hasOnboardingPlan: !!i.onboarding_plan
28524
+ },
28525
+ "ObiWidget"
28526
+ );
28527
+ } else
28528
+ console.log("[obi-sdk] no session found with token:", e), se("no_matching_session", { sessionToken: e }, "ObiWidget");
28529
+ }
28530
+ } catch (t) {
28531
+ console.error("Failed to fetch session details:", t), ct(t, {
28477
28532
  componentName: "ObiWidget",
28478
28533
  handlerName: "handleUrlSessionEvent",
28479
28534
  sessionToken: e
28480
- }), console.error("ObiClient not initialized");
28481
- return;
28482
- }
28483
- const t = await this.obiClient.listSessions(this.apiKey);
28484
- if (t.data) {
28485
- const n = t.data.sessions;
28486
- console.log("[obi-sdk] sessions:", n), se("sessions_fetched", {
28487
- sessionCount: n?.length || 0,
28488
- sessionToken: e
28489
- }, "ObiWidget");
28490
- const i = n?.find((r) => r.uuid === e);
28491
- if (i) {
28492
- const r = i;
28493
- this.selectedCourse = {
28494
- id: e,
28495
- name: r.onboarding_plan?.name || "",
28496
- description: r.onboarding_plan?.description || ""
28497
- }, this.state = O.LOADING, this.showSessionStartModal = !0, se("matching_session_found", {
28498
- sessionToken: e,
28499
- hasOnboardingPlan: !!r.onboarding_plan
28500
- }, "ObiWidget");
28501
- } else
28502
- console.log("[obi-sdk] no session found with token:", e), se("no_matching_session", { sessionToken: e }, "ObiWidget");
28503
- }
28504
- } catch (t) {
28505
- console.error("Failed to fetch session details:", t), ct(t, {
28506
- componentName: "ObiWidget",
28507
- handlerName: "handleUrlSessionEvent",
28508
- sessionToken: e
28509
- });
28510
- }
28511
- }, "handleUrlSessionEvent", "ObiWidget"), this.handleSessionStart = ai(async (e) => {
28512
- if (se("session_start_requested", { sessionToken: e }, "ObiWidget"), this.activeSession) {
28513
- se("session_start_blocked", { sessionToken: e }, "ObiWidget"), console.log("Connection already in progress or active session exists");
28514
- return;
28515
- }
28516
- this.showSessionStartModal = !1, this.state = O.LOADING, vi({ widgetState: this.state.toString() }), await this.connectObi(e);
28517
- }, "handleSessionStart", "ObiWidget"), this.checkExistingSession = ai(async () => {
28518
- se("checking_existing_session", {}, "ObiWidget");
28519
- try {
28520
- const e = JSON.parse(
28521
- aa.getItem(oa.SESSION_DATA) || "{}"
28522
- ), { sessionToken: t, roomToken: n, roomUrl: i, sessionExpiry: r, obiState: s } = e;
28523
- if (!t || !n || !i) {
28524
- se("no_existing_session_data", {}, "ObiWidget");
28525
- return;
28535
+ });
28526
28536
  }
28527
- if (console.log("[obi-sdk] using existing session"), se("existing_session_data_found", {
28528
- sessionToken: t,
28529
- hasExpiry: !!r,
28530
- obiState: s
28531
- }, "ObiWidget"), r && new Date(r) < /* @__PURE__ */ new Date()) {
28532
- this.clearSessionStorage(), se("session_expired", { sessionToken: t }, "ObiWidget");
28537
+ },
28538
+ "handleUrlSessionEvent",
28539
+ "ObiWidget"
28540
+ ), this.handleSessionStart = ai(
28541
+ async (e) => {
28542
+ if (se("session_start_requested", { sessionToken: e }, "ObiWidget"), this.activeSession) {
28543
+ se("session_start_blocked", { sessionToken: e }, "ObiWidget"), console.log("Connection already in progress or active session exists");
28533
28544
  return;
28534
28545
  }
28535
- this.state = O.LOADING, vi({
28536
- sessionId: t,
28537
- widgetState: this.state.toString()
28538
- });
28539
- const o = this.createSession(t);
28540
- if (!o) {
28541
- this.handleSessionCreationFailure(() => this.clearSessionStorage());
28542
- return;
28546
+ this.showSessionStartModal = !1, this.state = O.LOADING, vi({ widgetState: this.state.toString() }), await this.connectObi(e);
28547
+ },
28548
+ "handleSessionStart",
28549
+ "ObiWidget"
28550
+ ), this.checkExistingSession = ai(
28551
+ async () => {
28552
+ se("checking_existing_session", {}, "ObiWidget");
28553
+ try {
28554
+ const e = JSON.parse(
28555
+ pa.getItem(fa.SESSION_DATA) || "{}"
28556
+ ), { sessionToken: t, roomToken: n, roomUrl: i, sessionExpiry: r, obiState: s } = e;
28557
+ if (!t || !n || !i) {
28558
+ se("no_existing_session_data", {}, "ObiWidget");
28559
+ return;
28560
+ }
28561
+ if (console.log("[obi-sdk] using existing session"), se(
28562
+ "existing_session_data_found",
28563
+ {
28564
+ sessionToken: t,
28565
+ hasExpiry: !!r,
28566
+ obiState: s
28567
+ },
28568
+ "ObiWidget"
28569
+ ), r && new Date(r) < /* @__PURE__ */ new Date()) {
28570
+ this.clearSessionStorage(), se("session_expired", { sessionToken: t }, "ObiWidget");
28571
+ return;
28572
+ }
28573
+ this.state = O.LOADING, vi({
28574
+ sessionId: t,
28575
+ widgetState: this.state.toString()
28576
+ });
28577
+ const o = this.createSession(t);
28578
+ if (!o) {
28579
+ this.handleSessionCreationFailure(() => this.clearSessionStorage());
28580
+ return;
28581
+ }
28582
+ this.setupSessionEventListeners(o, () => this.clearSessionStorage()), await o.reconnect(i, n, s) ? (this.activeSession = o, this.sessionToken = t, this.roomToken = n, this.roomUrl = i, this.state = s, this.storedActiveState = s, se(
28583
+ "session_reconnected",
28584
+ {
28585
+ sessionToken: t,
28586
+ obiState: s
28587
+ },
28588
+ "ObiWidget"
28589
+ )) : (this.clearSessionStorage(), se("session_reconnection_failed", { sessionToken: t }, "ObiWidget"));
28590
+ } catch (e) {
28591
+ console.error("Error reconnecting to session:", e), ct(e, {
28592
+ componentName: "ObiWidget",
28593
+ handlerName: "checkExistingSession"
28594
+ }), this.handleSessionCreationFailure(() => this.clearSessionStorage());
28543
28595
  }
28544
- this.setupSessionEventListeners(o, () => this.clearSessionStorage()), await o.reconnect(i, n, s) ? (this.activeSession = o, this.sessionToken = t, this.roomToken = n, this.roomUrl = i, this.state = s, this.storedActiveState = s, se("session_reconnected", {
28545
- sessionToken: t,
28546
- obiState: s
28547
- }, "ObiWidget")) : (this.clearSessionStorage(), se("session_reconnection_failed", { sessionToken: t }, "ObiWidget"));
28548
- } catch (e) {
28549
- console.error("Error reconnecting to session:", e), ct(e, {
28550
- componentName: "ObiWidget",
28551
- handlerName: "checkExistingSession"
28552
- }), this.handleSessionCreationFailure(() => this.clearSessionStorage());
28553
- }
28554
- }, "checkExistingSession", "ObiWidget");
28596
+ },
28597
+ "checkExistingSession",
28598
+ "ObiWidget"
28599
+ );
28555
28600
  try {
28556
28601
  Tm("ObiWidget").setContext(), this.obiClient = new Ip({
28557
28602
  baseUrl: tc
@@ -28635,7 +28680,7 @@ let De = class extends Ft {
28635
28680
  * Clear session-related data from localStorage
28636
28681
  */
28637
28682
  clearSessionStorage() {
28638
- aa.removeItem(oa.SESSION_DATA);
28683
+ pa.removeItem(fa.SESSION_DATA);
28639
28684
  }
28640
28685
  // Method to save session data
28641
28686
  saveSessionData() {
@@ -28649,7 +28694,7 @@ let De = class extends Ft {
28649
28694
  obiState: this.storedActiveState ?? this.state,
28650
28695
  sessionExpiry: e.toISOString()
28651
28696
  };
28652
- aa.setItem(oa.SESSION_DATA, JSON.stringify(t));
28697
+ pa.setItem(fa.SESSION_DATA, JSON.stringify(t));
28653
28698
  }
28654
28699
  }
28655
28700
  async sessionConnectionCheck() {