@launchdarkly/o11y 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,29 +1,29 @@
1
- var qe = Object.defineProperty, Ge = Object.defineProperties;
2
- var je = Object.getOwnPropertyDescriptors;
3
- var $ = Object.getOwnPropertySymbols;
4
- var me = Object.prototype.hasOwnProperty, fe = Object.prototype.propertyIsEnumerable;
5
- var pe = (i) => {
1
+ var Ge = Object.defineProperty, je = Object.defineProperties;
2
+ var Je = Object.getOwnPropertyDescriptors;
3
+ var V = Object.getOwnPropertySymbols;
4
+ var me = Object.prototype.hasOwnProperty, pe = Object.prototype.propertyIsEnumerable;
5
+ var we = (i) => {
6
6
  throw TypeError(i);
7
7
  };
8
- var q = (i, e, t) => e in i ? qe(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, w = (i, e) => {
8
+ var G = (i, e, t) => e in i ? Ge(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, w = (i, e) => {
9
9
  for (var t in e || (e = {}))
10
- me.call(e, t) && q(i, t, e[t]);
11
- if ($)
12
- for (var t of $(e))
13
- fe.call(e, t) && q(i, t, e[t]);
10
+ me.call(e, t) && G(i, t, e[t]);
11
+ if (V)
12
+ for (var t of V(e))
13
+ pe.call(e, t) && G(i, t, e[t]);
14
14
  return i;
15
- }, y = (i, e) => Ge(i, je(e));
16
- var G = (i, e) => {
15
+ }, y = (i, e) => je(i, Je(e));
16
+ var j = (i, e) => {
17
17
  var t = {};
18
18
  for (var s in i)
19
19
  me.call(i, s) && e.indexOf(s) < 0 && (t[s] = i[s]);
20
- if (i != null && $)
21
- for (var s of $(i))
22
- e.indexOf(s) < 0 && fe.call(i, s) && (t[s] = i[s]);
20
+ if (i != null && V)
21
+ for (var s of V(i))
22
+ e.indexOf(s) < 0 && pe.call(i, s) && (t[s] = i[s]);
23
23
  return t;
24
24
  };
25
- var a = (i, e, t) => q(i, typeof e != "symbol" ? e + "" : e, t), we = (i, e, t) => e.has(i) || pe("Cannot " + t);
26
- var Se = (i, e, t) => (we(i, e, "read from private field"), t ? t.call(i) : e.get(i)), ye = (i, e, t) => e.has(i) ? pe("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), be = (i, e, t, s) => (we(i, e, "write to private field"), s ? s.call(i, t) : e.set(i, t), t);
25
+ var a = (i, e, t) => G(i, typeof e != "symbol" ? e + "" : e, t), Se = (i, e, t) => e.has(i) || we("Cannot " + t);
26
+ var ye = (i, e, t) => (Se(i, e, "read from private field"), t ? t.call(i) : e.get(i)), be = (i, e, t) => e.has(i) ? we("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), ke = (i, e, t, s) => (Se(i, e, "write to private field"), s ? s.call(i, t) : e.set(i, t), t);
27
27
  var _ = (i, e, t) => new Promise((s, n) => {
28
28
  var o = (d) => {
29
29
  try {
@@ -40,28 +40,28 @@ var _ = (i, e, t) => new Promise((s, n) => {
40
40
  }, l = (d) => d.done ? s(d.value) : Promise.resolve(d.value).then(o, r);
41
41
  l((t = t.apply(i, e)).next());
42
42
  });
43
- import { W as Je, M as L, r as j, I as ve, a as ke, S as Qe, C as Ye, F as Xe, b as Ze, P as et, c as _e, g as tt, p as st, d as it, e as nt, f as rt, h as ot, s as at, i as ct } from "./record-DTawahUk.js";
44
- import { R as as } from "./record-DTawahUk.js";
45
- import { s as A, G as O, g as M, S as E, r as Re, a as J, b as lt, c as dt, d as Q, e as Y, f as U, F as De, V as ht, P as gt, h as ut, H as X, M as mt, i as ft, L as Ue, j as We, p as pt, k as Ie, l as Ce, m as wt, n as St, o as yt, q as bt, t as vt, u as kt, v as _t, w as Rt, x as Dt } from "./common-BkAGcE30.js";
46
- import { X as It, F as Ct, A as Lt, C as Et, E as Nt, s as ze, D as Ot, a as Tt, m as Le, d as Be, b as Ee, c as Ne, r as Me, e as Pt, p as Ht, f as Ut, g as Wt, M as D, h as N, W as zt, N as Bt, P as Mt, J as Ft, i as V, j as x, k as $t, l as Vt, n as xt, o as Oe } from "./observe-xxoYHNEh.js";
47
- import { O as ls } from "./observe-xxoYHNEh.js";
48
- import { L as At } from "./buffer-DIFxvF2Q.js";
49
- import { g as Te } from "./LDObserve-CHIjcqIn.js";
50
- import { L as hs } from "./LDObserve-CHIjcqIn.js";
51
- import { LDRecord as us } from "./LDRecord.js";
52
- const Kt = (i, e, t) => {
43
+ import { W as Qe, M as C, r as J, I as ve, a as _e, S as Ye, C as Xe, F as Ze, b as et, P as tt, c as Re, g as st, p as it, d as nt, e as rt, f as ot, h as at, s as ct, i as lt } from "./record-BZHDLKsW.js";
44
+ import { R as ls } from "./record-BZHDLKsW.js";
45
+ import { s as K, G as O, g as F, S as E, r as De, a as Q, b as dt, c as ht, d as Y, e as X, f as W, F as Ie, V as gt, P as ut, h as ft, H as Z, M as mt, i as pt, L as We, j as ze, p as wt, k as Le, l as Ce, m as St, n as yt, o as bt, q as kt, t as vt, u as _t, v as Rt, w as Dt, x as It } from "./common-BjaGmQrE.js";
46
+ import { X as Lt, F as Ct, A as Et, C as Nt, E as Ot, s as Be, D as Tt, a as Pt, m as Ee, d as Me, b as Ne, c as Oe, r as Fe, e as Ht, p as Ut, f as Wt, g as zt, M as D, h as N, W as Bt, N as Mt, P as Ft, J as $t, i as x, j as A, k as Vt, l as xt, n as At, o as Te } from "./observe-D78YYNE1.js";
47
+ import { O as hs } from "./observe-D78YYNE1.js";
48
+ import { L as Kt, s as qt, a as T } from "./buffer-BjzLorpP.js";
49
+ import { g as Pe } from "./LDObserve-DhF3vCDR.js";
50
+ import { L as us } from "./LDObserve-DhF3vCDR.js";
51
+ import { LDRecord as ms } from "./LDRecord.js";
52
+ const Gt = (i, e, t) => {
53
53
  const s = window._highlightWebSocketRequestCallback;
54
54
  window._highlightWebSocketRequestCallback = i;
55
55
  const n = window._highlightWebSocketEventCallback;
56
56
  return window._highlightWebSocketEventCallback = (o) => {
57
- const h = o, { message: r, size: l } = h, d = G(h, ["message", "size"]), g = t.some(
58
- (m) => o.name.toLowerCase().includes(m)
57
+ const h = o, { message: r, size: l } = h, d = j(h, ["message", "size"]), g = t.some(
58
+ (f) => o.name.toLowerCase().includes(f)
59
59
  ) ? d : o;
60
60
  e(g);
61
61
  }, () => {
62
62
  window._highlightWebSocketRequestCallback = s, window._highlightWebSocketEventCallback = n;
63
63
  };
64
- }, qt = ({
64
+ }, jt = ({
65
65
  xhrCallback: i,
66
66
  fetchCallback: e,
67
67
  webSocketRequestCallback: t,
@@ -73,7 +73,7 @@ const Kt = (i, e, t) => {
73
73
  urlBlocklist: d,
74
74
  bodyKeysToRecord: c
75
75
  }) => {
76
- const g = It(
76
+ const g = Lt(
77
77
  i,
78
78
  r,
79
79
  l,
@@ -87,14 +87,14 @@ const Kt = (i, e, t) => {
87
87
  d,
88
88
  o,
89
89
  c
90
- ), m = n ? () => {
91
- } : Kt(
90
+ ), f = n ? () => {
91
+ } : Gt(
92
92
  t,
93
93
  s,
94
94
  d
95
95
  );
96
96
  return () => {
97
- g(), h(), m();
97
+ g(), h(), f();
98
98
  };
99
99
  };
100
100
  class I {
@@ -127,7 +127,7 @@ class I {
127
127
  a(this, "requestResponseSanitizer");
128
128
  var t, s;
129
129
  this.options = e, this.disableConsoleRecording = !!e.disableConsoleRecording, this.reportConsoleErrors = (t = e.reportConsoleErrors) != null ? t : !1, this.enablePromisePatch = (s = e.enablePromisePatch) != null ? s : !1, this.consoleMethodsToRecord = e.consoleMethodsToRecord || [
130
- ...Lt
130
+ ...Et
131
131
  ], this.listeners = [], this.errors = [], this.messages = [], this.lastNetworkRequestTimestamp = 0;
132
132
  }
133
133
  isListening() {
@@ -137,12 +137,12 @@ class I {
137
137
  if (this.isListening()) return;
138
138
  const e = this;
139
139
  this.disableConsoleRecording || this.listeners.push(
140
- Et(
140
+ Nt(
141
141
  (t) => {
142
142
  var s, n, o;
143
143
  if (this.reportConsoleErrors && (t.type === "Error" || t.type === "error") && t.value && t.trace) {
144
- const r = A(t.value);
145
- if (Ee.includes(r) || Ne.some(
144
+ const r = K(t.value);
145
+ if (Ne.includes(r) || Oe.some(
146
146
  (l) => r.includes(l)
147
147
  ))
148
148
  return;
@@ -155,25 +155,26 @@ class I {
155
155
  columnNumber: (o = t.trace[0]) != null && o.columnNumber ? t.trace[0].columnNumber : 0,
156
156
  stackTrace: t.trace,
157
157
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
158
- id: Me()
158
+ id: Fe()
159
159
  });
160
160
  }
161
161
  e.messages.push(t);
162
162
  },
163
- y(w({}, Be), {
164
- level: this.consoleMethodsToRecord
163
+ y(w({}, Me), {
164
+ level: this.consoleMethodsToRecord,
165
+ recordLaunchDarklySdkLogs: this.options.recordLaunchDarklySdkLogs
165
166
  })
166
167
  )
167
168
  ), this.listeners.push(
168
- Nt(
169
+ Ot(
169
170
  (t) => {
170
- Ee.includes(t.event) || Ne.some(
171
+ Ne.includes(t.event) || Oe.some(
171
172
  (s) => t.event.includes(s)
172
173
  ) || e.errors.push(t);
173
174
  },
174
175
  { enablePromisePatch: this.enablePromisePatch }
175
176
  )
176
- ), this.listeners.push(ze), I.setupNetworkListener(this, this.options);
177
+ ), this.listeners.push(Be), I.setupNetworkListener(this, this.options);
177
178
  }
178
179
  stopListening() {
179
180
  this.listeners.forEach((e) => e()), this.listeners = [];
@@ -181,7 +182,7 @@ class I {
181
182
  // We define this as a static method because versions earlier than 4.0.0 (Feb 2022) don't have this code.
182
183
  // For those versions, calling this from client will monkey-patch the network listeners onto the old FirstLoadListener object.
183
184
  static setupNetworkListener(e, t) {
184
- var o, r, l, d, c, g, h, m, f, R, v, C;
185
+ var o, r, l, d, c, g, h, f, m, R, k, L;
185
186
  const s = (t == null ? void 0 : t.backendUrl) || void 0 || "https://pub.highlight.io", n = t.otlpEndpoint || "https://otel.highlight.io";
186
187
  e.highlightEndpoints = [
187
188
  s,
@@ -192,17 +193,17 @@ class I {
192
193
  (S) => S.toLowerCase()
193
194
  )) || [], e.networkBodyKeysToRedact = ((h = (g = t.networkRecording) == null ? void 0 : g.networkBodyKeysToRedact) == null ? void 0 : h.map(
194
195
  (S) => S.toLowerCase()
195
- )) || [], e.urlBlocklist = ((f = (m = t.networkRecording) == null ? void 0 : m.urlBlocklist) == null ? void 0 : f.map(
196
+ )) || [], e.urlBlocklist = ((m = (f = t.networkRecording) == null ? void 0 : f.urlBlocklist) == null ? void 0 : m.map(
196
197
  (S) => S.toLowerCase()
197
198
  )) || [], e.urlBlocklist = [
198
199
  ...e.urlBlocklist,
199
- ...Ot
200
- ], e.requestResponseSanitizer = (R = t.networkRecording) == null ? void 0 : R.requestResponseSanitizer, e.networkHeaderKeysToRecord = (v = t.networkRecording) == null ? void 0 : v.headerKeysToRecord, e.networkHeaderKeysToRecord && (e.networkHeadersToRedact = [], e.networkHeaderKeysToRecord = e.networkHeaderKeysToRecord.map(
200
+ ...Tt
201
+ ], e.requestResponseSanitizer = (R = t.networkRecording) == null ? void 0 : R.requestResponseSanitizer, e.networkHeaderKeysToRecord = (k = t.networkRecording) == null ? void 0 : k.headerKeysToRecord, e.networkHeaderKeysToRecord && (e.networkHeadersToRedact = [], e.networkHeaderKeysToRecord = e.networkHeaderKeysToRecord.map(
201
202
  (S) => S.toLocaleLowerCase()
202
- )), e.networkBodyKeysToRecord = (C = t.networkRecording) == null ? void 0 : C.bodyKeysToRecord, e.networkBodyKeysToRecord && (e.networkBodyKeysToRedact = [], e.networkBodyKeysToRecord = e.networkBodyKeysToRecord.map(
203
+ )), e.networkBodyKeysToRecord = (L = t.networkRecording) == null ? void 0 : L.bodyKeysToRecord, e.networkBodyKeysToRecord && (e.networkBodyKeysToRedact = [], e.networkBodyKeysToRecord = e.networkBodyKeysToRecord.map(
203
204
  (S) => S.toLocaleLowerCase()
204
205
  ))), !e.disableNetworkRecording && e.enableRecordingNetworkContents && (e.hasNetworkRecording = !0, e.listeners.push(
205
- qt({
206
+ jt({
206
207
  xhrCallback: (S) => {
207
208
  e.xhrNetworkContents.push(S);
208
209
  },
@@ -233,7 +234,7 @@ class I {
233
234
  "resource"
234
235
  );
235
236
  const d = (t - l) * 2;
236
- if (s = s.filter((c) => c.responseEnd < e.lastNetworkRequestTimestamp ? !1 : Tt(
237
+ if (s = s.filter((c) => c.responseEnd < e.lastNetworkRequestTimestamp ? !1 : Pt(
237
238
  c.name,
238
239
  e.highlightEndpoints
239
240
  )).map((c) => y(w({}, c.toJSON()), {
@@ -246,12 +247,12 @@ class I {
246
247
  headersToRecord: e.networkHeaderKeysToRecord,
247
248
  requestResponseSanitizer: e.requestResponseSanitizer
248
249
  };
249
- s = Le(
250
+ s = Ee(
250
251
  s,
251
252
  e.xhrNetworkContents,
252
253
  "xmlhttprequest",
253
254
  c
254
- ), s = Le(
255
+ ), s = Ee(
255
256
  s,
256
257
  e.fetchNetworkContents,
257
258
  "fetch",
@@ -269,11 +270,11 @@ class I {
269
270
  e.disableNetworkRecording || (e.xhrNetworkContents = [], e.fetchNetworkContents = [], e.webSocketNetworkContents = [], e.webSocketEventContents = [], performance.clearResourceTimings());
270
271
  }
271
272
  }
272
- const W = (i, e) => {
273
- console.warn(`Highlight Warning: (${i}): `, { output: e });
273
+ const z = (i, e) => {
274
+ T("warn", `Highlight Warning: (${i}): `, { output: e });
274
275
  };
275
- var F;
276
- const te = class te {
276
+ var $;
277
+ const se = class se {
277
278
  constructor(e, t) {
278
279
  a(this, "options");
279
280
  /** Determines if the client is running on a Highlight property (e.g. frontend). */
@@ -283,7 +284,7 @@ const te = class te {
283
284
  // ECMAScript-private (#) so the internal GraphQL SDK type — which
284
285
  // references graphql-request / graphql — does not leak into the published
285
286
  // declaration file and break consumer type-checking.
286
- ye(this, F);
287
+ be(this, $);
287
288
  a(this, "events");
288
289
  a(this, "sessionData");
289
290
  a(this, "ready");
@@ -330,29 +331,29 @@ const te = class te {
330
331
  a(this, "_up_down_counters", /* @__PURE__ */ new Map());
331
332
  a(this, "_integrations", []);
332
333
  var n, o, r, l, d;
333
- e.sessionSecureID || (e.sessionSecureID = O()), this.options = e, typeof ((n = this.options) == null ? void 0 : n.debug) == "boolean" ? this.debugOptions = this.options.debug ? { clientInteractions: !0 } : {} : this.debugOptions = (r = (o = this.options) == null ? void 0 : o.debug) != null ? r : {}, this.logger = new At(this.debugOptions.clientInteractions), e.storageMode && (this.logger.log(
334
+ e.sessionSecureID || (e.sessionSecureID = O()), this.options = e, typeof ((n = this.options) == null ? void 0 : n.debug) == "boolean" ? this.debugOptions = this.options.debug ? { clientInteractions: !0 } : {} : this.debugOptions = (r = (o = this.options) == null ? void 0 : o.debug) != null ? r : {}, this.logger = new Kt(this.debugOptions.clientInteractions), e.debug && qt(!0), e.storageMode && (this.logger.log(
334
335
  `initializing in ${e.storageMode} session mode`
335
- ), wt(e.storageMode)), We(!!(e != null && e.sessionCookie)), this._worker = new Je(), this._worker.onmessage = (c) => {
336
- var g, h, m;
337
- ((g = c.data.response) == null ? void 0 : g.type) === L.AsyncEvents ? (this._eventBytesSinceSnapshot += c.data.response.eventsSize, this.logger.log(
336
+ ), St(e.storageMode)), ze(!!(e != null && e.sessionCookie)), this._worker = new Qe(), this._worker.onmessage = (c) => {
337
+ var g, h, f;
338
+ ((g = c.data.response) == null ? void 0 : g.type) === C.AsyncEvents ? (this._eventBytesSinceSnapshot += c.data.response.eventsSize, this.logger.log(
338
339
  `Web worker sent payloadID ${c.data.response.id} size ${c.data.response.eventsSize} bytes, compression ratio ${c.data.response.eventsSize / c.data.response.compressedSize}.
339
340
  Total since snapshot: ${(this._eventBytesSinceSnapshot / 1e6).toFixed(1)}MB`
340
- )) : ((h = c.data.response) == null ? void 0 : h.type) === L.CustomEvent ? this.addCustomEvent(
341
+ )) : ((h = c.data.response) == null ? void 0 : h.type) === C.CustomEvent ? this.addCustomEvent(
341
342
  c.data.response.tag,
342
343
  c.data.response.payload
343
- ) : ((m = c.data.response) == null ? void 0 : m.type) === L.Stop && (W(
344
+ ) : ((f = c.data.response) == null ? void 0 : f.type) === C.Stop && (z(
344
345
  "Stopping recording due to worker failure",
345
346
  c.data.response
346
347
  ), this.stopRecording(!1));
347
348
  };
348
- let s = M();
349
+ let s = F();
349
350
  if (this.reloaded = !1, !((l = this.sessionData) != null && l.sessionSecureID) && (s != null && s.sessionSecureID))
350
351
  this.sessionData = s, this.options.sessionSecureID = s.sessionSecureID, this.reloaded = !0, this.logger.log(
351
352
  `Tab reloaded, continuing previous session: ${this.sessionData.sessionSecureID}`
352
353
  );
353
354
  else {
354
355
  for (const c of Object.values(E))
355
- Re(c);
356
+ De(c);
356
357
  this.sessionData = {
357
358
  sessionSecureID: this.options.sessionSecureID,
358
359
  projectID: 0,
@@ -368,7 +369,7 @@ const te = class te {
368
369
  this._initMembers(this.options);
369
370
  }
370
371
  static create(e) {
371
- return new te(e);
372
+ return new se(e);
372
373
  }
373
374
  // Start a new session
374
375
  _reset(s) {
@@ -380,34 +381,34 @@ const te = class te {
380
381
  let n, o;
381
382
  if (!e)
382
383
  try {
383
- n = J(E.USER_IDENTIFIER);
384
- const r = J(
384
+ n = Q(E.USER_IDENTIFIER);
385
+ const r = Q(
385
386
  E.USER_OBJECT
386
387
  );
387
388
  r && (o = JSON.parse(r));
388
389
  } catch (r) {
389
390
  }
390
391
  for (const r of Object.values(E))
391
- Re(r);
392
+ De(r);
392
393
  this.sessionData.sessionSecureID = t ? O(`${this.organizationID}-${t}`) : O(), this.sessionData.sessionKey = t, this.sessionData.sessionStartTime = Date.now(), this.options.sessionSecureID = this.sessionData.sessionSecureID, this.stopRecording(), this._firstLoadListeners.stopListening(), this._firstLoadListeners = new I(this.options), yield this.initialize(), n && o && this.identify(n, o);
393
394
  });
394
395
  }
395
396
  _initMembers(e) {
396
- var o, r, l, d, c, g, h, m, f, R, v;
397
+ var o, r, l, d, c, g, h, f, m, R, k;
397
398
  this.sessionShortcut = !1, this._recordingStartTime = 0, this._isOnLocalHost = window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" || window.location.hostname === "", this.ready = !1, this.state = "NotRecording", this.manualStopped = !1, this.enableSegmentIntegration = !!e.enableSegmentIntegration, this.privacySetting = (o = e.privacySetting) != null ? o : "default", this.enableCanvasRecording = (r = e.enableCanvasRecording) != null ? r : !1, this.enablePerformanceRecording = (l = e.enablePerformanceRecording) != null ? l : !0, this.inlineImages = (d = e.inlineImages) != null ? d : this._isOnLocalHost, this.inlineVideos = (c = e.inlineVideos) != null ? c : this._isOnLocalHost, this.inlineStylesheet = (g = e.inlineStylesheet) != null ? g : this._isOnLocalHost, this.styleSheetResyncInterval = (h = e.styleSheetResyncInterval) != null ? h : 2e3, this.samplingStrategy = w({
398
399
  canvasFactor: 0.5,
399
400
  canvasMaxSnapshotDimension: 360,
400
401
  canvasClearWebGLBuffer: !0,
401
- dataUrlOptions: lt()
402
- }, (m = e.samplingStrategy) != null ? m : {
402
+ dataUrlOptions: dt()
403
+ }, (f = e.samplingStrategy) != null ? f : {
403
404
  canvas: 2
404
- }), this._backendUrl = (f = e == null ? void 0 : e.backendUrl) != null ? f : "https://pub.highlight.io", this._backendUrl[0] === "/" && (this._backendUrl = new URL(this._backendUrl, document.baseURI).href);
405
- const t = new yt(`${this._backendUrl}`, {
405
+ }), this._backendUrl = (m = e == null ? void 0 : e.backendUrl) != null ? m : "https://pub.highlight.io", this._backendUrl[0] === "/" && (this._backendUrl = new URL(this._backendUrl, document.baseURI).href);
406
+ const t = new bt(`${this._backendUrl}`, {
406
407
  headers: {}
407
408
  });
408
- be(this, F, dt(t, St())), this.environment = (R = e.environment) != null ? R : "production", this.appVersion = e.appVersion, this.serviceName = (v = e.serviceName) != null ? v : "", typeof e.organizationID == "string" ? this.organizationID = e.organizationID : this.organizationID = e.organizationID.toString(), this.isRunningOnHighlight = this.organizationID === "1" || this.organizationID === "1jdkoe52", this.firstloadVersion = e.firstloadVersion || "unknown", this.sessionShortcut = e.sessionShortcut || !1, this._onToggleFeedbackFormVisibility = () => {
409
+ ke(this, $, ht(t, yt())), this.environment = (R = e.environment) != null ? R : "production", this.appVersion = e.appVersion, this.serviceName = (k = e.serviceName) != null ? k : "", typeof e.organizationID == "string" ? this.organizationID = e.organizationID : this.organizationID = e.organizationID.toString(), this.isRunningOnHighlight = this.organizationID === "1" || this.organizationID === "1jdkoe52", this.firstloadVersion = e.firstloadVersion || "unknown", this.sessionShortcut = e.sessionShortcut || !1, this._onToggleFeedbackFormVisibility = () => {
409
410
  };
410
- const C = e, { firstloadVersion: s } = C, n = G(C, ["firstloadVersion"]);
411
+ const L = e, { firstloadVersion: s } = L, n = j(L, ["firstloadVersion"]);
411
412
  this._optionsInternal = n, this.listeners = [], this.events = [], this.hasSessionUnloaded = !1, this.hasPushedData = !1, window.Intercom && window.Intercom("onShow", () => {
412
413
  window.Intercom("update", {
413
414
  highlightSessionURL: this.getCurrentSessionURLWithTimestamp()
@@ -422,12 +423,12 @@ const te = class te {
422
423
  );
423
424
  return;
424
425
  }
425
- this.sessionData.userIdentifier = e.toString(), this.sessionData.userObject = t, Q(
426
+ this.sessionData.userIdentifier = e.toString(), this.sessionData.userObject = t, Y(
426
427
  E.USER_IDENTIFIER,
427
428
  e.toString()
428
- ), Q(E.USER_OBJECT, JSON.stringify(t)), this._worker.postMessage({
429
+ ), Y(E.USER_OBJECT, JSON.stringify(t)), this._worker.postMessage({
429
430
  message: {
430
- type: L.Identify,
431
+ type: C.Identify,
431
432
  userIdentifier: e,
432
433
  userObject: t,
433
434
  source: s
@@ -443,7 +444,7 @@ const te = class te {
443
444
  }
444
445
  log(e, t, s) {
445
446
  this._firstLoadListeners.messages.push(
446
- Pt(t, Be, e, s)
447
+ Ht(t, Me, e, s)
447
448
  );
448
449
  }
449
450
  pushCustomError(e, t) {
@@ -467,25 +468,25 @@ const te = class te {
467
468
  source: n,
468
469
  type: o
469
470
  }) {
470
- var c, g, h, m;
471
+ var c, g, h, f;
471
472
  e.cause && (s = y(w({}, s), { "exception.cause": e.cause }));
472
473
  let r = t ? t + ":" + e.message : e.message;
473
474
  o === "React.ErrorBoundary" && (r = "ErrorBoundary: " + r);
474
- const l = Ht(e), d = {
475
+ const l = Ut(e), d = {
475
476
  event: r,
476
477
  type: o != null ? o : "custom",
477
478
  url: window.location.href,
478
479
  source: n != null ? n : "",
479
480
  lineNumber: (c = l[0]) != null && c.lineNumber ? (g = l[0]) == null ? void 0 : g.lineNumber : 0,
480
- columnNumber: (h = l[0]) != null && h.columnNumber ? (m = l[0]) == null ? void 0 : m.columnNumber : 0,
481
+ columnNumber: (h = l[0]) != null && h.columnNumber ? (f = l[0]) == null ? void 0 : f.columnNumber : 0,
481
482
  stackTrace: l,
482
483
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
483
484
  payload: JSON.stringify(s),
484
- id: Me()
485
+ id: Fe()
485
486
  };
486
487
  this._firstLoadListeners.errors.push(d);
487
- for (const f of this._integrations)
488
- f.error(this.sessionData.sessionSecureID, d);
488
+ for (const m of this._integrations)
489
+ m.error(this.sessionData.sessionSecureID, d);
489
490
  }
490
491
  addProperties(e = {}, t) {
491
492
  const s = w({}, e);
@@ -497,7 +498,7 @@ const te = class te {
497
498
  }
498
499
  }), this._worker.postMessage({
499
500
  message: {
500
- type: L.Properties,
501
+ type: C.Properties,
501
502
  propertiesObject: s,
502
503
  propertyType: t
503
504
  }
@@ -510,7 +511,7 @@ const te = class te {
510
511
  }
511
512
  initialize(e) {
512
513
  return _(this, null, function* () {
513
- var t, s, n, o, r, l, d, c, g, h, m, f, R, v, C, S, se, ie, ne, re, oe, ae, ce, le, de;
514
+ var t, s, n, o, r, l, d, c, g, h, f, m, R, k, L, S, ie, ne, re, oe, ae, ce, le, de, he;
514
515
  if (navigator != null && navigator.webdriver && !window.Cypress || (t = navigator == null ? void 0 : navigator.userAgent) != null && t.includes("Googlebot") || (s = navigator == null ? void 0 : navigator.userAgent) != null && s.includes("AdsBot")) {
515
516
  (n = this._firstLoadListeners) == null || n.stopListening();
516
517
  return;
@@ -524,60 +525,61 @@ const te = class te {
524
525
  yield this._reset(y(w({}, e), { forceNew: !0 }));
525
526
  return;
526
527
  }
527
- const T = new Wt();
528
- Ut(
528
+ const P = new zt();
529
+ Wt(
529
530
  {
530
531
  backendUrl: (r = (o = this.options) == null ? void 0 : o.backendUrl) != null ? r : "https://pub.highlight.io",
531
532
  otlpEndpoint: (d = (l = this.options) == null ? void 0 : l.otlpEndpoint) != null ? d : "https://otel.highlight.io",
532
533
  projectId: (c = this.options) == null ? void 0 : c.organizationID,
533
534
  sessionSecureId: (g = this.options) == null ? void 0 : g.sessionSecureID,
534
- environment: (m = (h = this.options) == null ? void 0 : h.environment) != null ? m : "production",
535
- networkRecordingOptions: typeof ((f = this.options) == null ? void 0 : f.networkRecording) == "object" ? this.options.networkRecording : void 0,
535
+ environment: (f = (h = this.options) == null ? void 0 : h.environment) != null ? f : "production",
536
+ networkRecordingOptions: typeof ((m = this.options) == null ? void 0 : m.networkRecording) == "object" ? this.options.networkRecording : void 0,
536
537
  tracingOrigins: (R = this.options) == null ? void 0 : R.tracingOrigins,
537
- serviceName: (C = (v = this.options) == null ? void 0 : v.serviceName) != null ? C : "highlight-browser",
538
- instrumentations: (se = (S = this.options) == null ? void 0 : S.otel) == null ? void 0 : se.instrumentations,
538
+ serviceName: (L = (k = this.options) == null ? void 0 : k.serviceName) != null ? L : "highlight-browser",
539
+ instrumentations: (ie = (S = this.options) == null ? void 0 : S.otel) == null ? void 0 : ie.instrumentations,
539
540
  getIntegrations: () => [...this._integrations],
540
541
  productAnalyticsEvents: this._productAnalyticsEvents()
541
542
  },
542
- T
543
+ P
543
544
  ), this._gauges.clear(), this._counters.clear(), this._histograms.clear(), this._up_down_counters.clear(), this.logger.log(
544
545
  "Initializing...",
545
546
  e,
546
547
  this.sessionData,
547
548
  this.options
548
- ), this.sessionData = (ie = M(this.sessionData.sessionSecureID)) != null ? ie : this.sessionData, (ne = this.sessionData) != null && ne.sessionStartTime ? this._recordingStartTime = (re = this.sessionData) == null ? void 0 : re.sessionStartTime : (this._recordingStartTime = (/* @__PURE__ */ new Date()).getTime(), this.sessionData.sessionStartTime = this._recordingStartTime), Y(""), U(this.sessionData);
549
- let P = J(Ce.CLIENT_ID);
550
- P || (P = O(), Q(Ce.CLIENT_ID, P));
551
- let H;
552
- this.options.disableSessionRecording || this.options.disableNetworkRecording !== void 0 || typeof this.options.networkRecording == "boolean" ? H = !1 : H = ((oe = this.options.networkRecording) == null ? void 0 : oe.recordHeadersAndBody) || !1;
553
- let he = [];
554
- if (typeof this.options.networkRecording == "object" && ((ae = this.options.networkRecording.destinationDomains) != null && ae.length) && (he = this.options.networkRecording.destinationDomains), this._isCrossOriginIframe)
549
+ ), this.sessionData = (ne = F(this.sessionData.sessionSecureID)) != null ? ne : this.sessionData, (re = this.sessionData) != null && re.sessionStartTime ? this._recordingStartTime = (oe = this.sessionData) == null ? void 0 : oe.sessionStartTime : (this._recordingStartTime = (/* @__PURE__ */ new Date()).getTime(), this.sessionData.sessionStartTime = this._recordingStartTime), X(""), W(this.sessionData);
550
+ let H = Q(Ce.CLIENT_ID);
551
+ H || (H = O(), Y(Ce.CLIENT_ID, H));
552
+ let U;
553
+ this.options.disableSessionRecording || this.options.disableNetworkRecording !== void 0 || typeof this.options.networkRecording == "boolean" ? U = !1 : U = ((ae = this.options.networkRecording) == null ? void 0 : ae.recordHeadersAndBody) || !1;
554
+ let ge = [];
555
+ if (typeof this.options.networkRecording == "object" && ((ce = this.options.networkRecording.destinationDomains) != null && ce.length) && (ge = this.options.networkRecording.destinationDomains), this._isCrossOriginIframe)
555
556
  yield this._setupCrossOriginIframe();
556
557
  else {
557
- const k = yield Se(this, F).initializeSession({
558
+ const v = yield ye(this, $).initializeSession({
558
559
  organization_verbose_id: this.organizationID,
559
560
  enable_strict_privacy: this.privacySetting === "strict",
560
561
  privacy_setting: this.privacySetting,
561
- enable_recording_network_contents: H,
562
+ enable_recording_network_contents: U,
562
563
  clientVersion: this.firstloadVersion,
563
564
  firstloadVersion: this.firstloadVersion,
564
565
  clientConfig: JSON.stringify(this._optionsInternal),
565
566
  environment: this.environment,
566
- id: P,
567
+ id: H,
567
568
  appVersion: this.appVersion,
568
569
  serviceName: this.serviceName,
569
570
  session_secure_id: this.sessionData.sessionSecureID,
570
571
  session_key: this.sessionData.sessionKey,
571
- client_id: P,
572
- network_recording_domains: he,
572
+ client_id: H,
573
+ network_recording_domains: ge,
573
574
  disable_session_recording: this.options.disableSessionRecording
574
575
  });
575
- if (k.initializeSession.secure_id !== this.sessionData.sessionSecureID && this.logger.log(
576
- `Unexpected secure id returned by initializeSession: ${k.initializeSession.secure_id}, expected ${this.sessionData.sessionSecureID}`
577
- ), this.sessionData.sessionSecureID = k.initializeSession.secure_id, this.sessionData.projectID = parseInt(
578
- ((ce = k == null ? void 0 : k.initializeSession) == null ? void 0 : ce.project_id) || "0"
579
- ), T.setConfig(k.initializeSession.sampling), !this.sessionData.projectID || !this.sessionData.sessionSecureID) {
580
- console.error(
576
+ if (v.initializeSession.secure_id !== this.sessionData.sessionSecureID && this.logger.log(
577
+ `Unexpected secure id returned by initializeSession: ${v.initializeSession.secure_id}, expected ${this.sessionData.sessionSecureID}`
578
+ ), this.sessionData.sessionSecureID = v.initializeSession.secure_id, this.sessionData.projectID = parseInt(
579
+ ((le = v == null ? void 0 : v.initializeSession) == null ? void 0 : le.project_id) || "0"
580
+ ), P.setConfig(v.initializeSession.sampling), !this.sessionData.projectID || !this.sessionData.sessionSecureID) {
581
+ T(
582
+ "error",
581
583
  "Failed to initialize Highlight; an error occurred on our end.",
582
584
  this.sessionData
583
585
  );
@@ -591,15 +593,15 @@ Project ID: ${this.sessionData.projectID}
591
593
  SessionSecureID: ${this.sessionData.sessionSecureID}`
592
594
  ), this.options.sessionSecureID = this.sessionData.sessionSecureID, this._worker.postMessage({
593
595
  message: {
594
- type: L.Initialize,
596
+ type: C.Initialize,
595
597
  sessionSecureID: this.sessionData.sessionSecureID,
596
598
  backend: this._backendUrl,
597
599
  debug: !!this.debugOptions.clientInteractions,
598
600
  recordingStartTime: this._recordingStartTime
599
601
  }
600
602
  });
601
- for (const k of this._integrations)
602
- k.init(this.sessionData.sessionSecureID);
603
+ for (const v of this._integrations)
604
+ v.init(this.sessionData.sessionSecureID);
603
605
  if (this.sessionData.userIdentifier && this.identify(
604
606
  this.sessionData.userIdentifier,
605
607
  this.sessionData.userObject
@@ -608,43 +610,43 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
608
610
  this.options
609
611
  ) : this._firstLoadListeners.startListening(), this.pushPayloadTimerId && (clearTimeout(this.pushPayloadTimerId), this.pushPayloadTimerId = void 0), this._isCrossOriginIframe || (this.pushPayloadTimerId = setTimeout(() => {
610
612
  this._save();
611
- }, De)), this.options.disableSessionRecording) {
613
+ }, Ie)), this.options.disableSessionRecording) {
612
614
  this.logger.log(
613
615
  "Highlight is NOT RECORDING a session replay per H.init setting."
614
616
  ), this.ready = !0, this.state = "Recording", this.manualStopped = !1;
615
617
  return;
616
618
  }
617
- const { getDeviceDetails: ge } = $t();
618
- ge && this.recordGauge({
619
+ const { getDeviceDetails: ue } = Vt();
620
+ ue && this.recordGauge({
619
621
  name: N.DeviceMemory,
620
- value: ge().deviceMemory,
622
+ value: ue().deviceMemory,
621
623
  category: D.Device,
622
624
  group: window.location.href
623
625
  });
624
- const ue = (k, Ke) => {
625
- Ke && this.logger.log("received isCheckout emit", { event: k }), this.events.push(k);
626
+ const fe = (v, qe) => {
627
+ qe && this.logger.log("received isCheckout emit", { event: v }), this.events.push(v);
626
628
  };
627
- ue.bind(this);
628
- const Ve = !!this._recordStop;
629
+ fe.bind(this);
630
+ const xe = !!this._recordStop;
629
631
  this._recordStop && (this._recordStop(), this._recordStop = void 0);
630
- const [xe, Ae] = ot(
632
+ const [Ae, Ke] = at(
631
633
  this.privacySetting,
632
634
  this.options.maskAllInputs,
633
635
  this.options.maskInputOptions
634
636
  );
635
- this._recordStop = j({
636
- ignoreClass: (le = this.options.ignoreClass) != null ? le : "highlight-ignore",
637
+ this._recordStop = J({
638
+ ignoreClass: (de = this.options.ignoreClass) != null ? de : "highlight-ignore",
637
639
  ignoreSelector: this.options.ignoreSelector,
638
- blockClass: (de = this.options.blockClass) != null ? de : "highlight-block",
640
+ blockClass: (he = this.options.blockClass) != null ? he : "highlight-block",
639
641
  blockSelector: this.options.blockSelector,
640
- emit: ue,
642
+ emit: fe,
641
643
  recordCrossOriginIframes: this.options.recordCrossOriginIframe,
642
- privacySetting: rt(
644
+ privacySetting: ot(
643
645
  this.privacySetting,
644
646
  this.options.maskPiiText
645
647
  ),
646
- maskAllInputs: xe,
647
- maskInputOptions: Ae,
648
+ maskAllInputs: Ae,
649
+ maskInputOptions: Ke,
648
650
  maskTextClass: this.options.maskTextClass,
649
651
  maskTextSelector: this.options.maskTextSelector,
650
652
  recordCanvas: this.enableCanvasRecording,
@@ -659,18 +661,18 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
659
661
  maxSnapshotDimension: this.samplingStrategy.canvasMaxSnapshotDimension
660
662
  }
661
663
  },
662
- keepIframeSrcFn: (k) => !this.options.recordCrossOriginIframe,
664
+ keepIframeSrcFn: (v) => !this.options.recordCrossOriginIframe,
663
665
  inlineImages: this.inlineImages,
664
666
  inlineVideos: this.inlineVideos,
665
667
  collectFonts: this.inlineImages,
666
668
  inlineStylesheet: this.inlineStylesheet,
667
669
  styleSheetResyncInterval: this.styleSheetResyncInterval,
668
- plugins: [nt()],
670
+ plugins: [rt()],
669
671
  logger: typeof this.options.debug == "boolean" && this.options.debug || typeof this.options.debug == "object" && this.options.debug.domRecording ? {
670
672
  debug: this.logger.log,
671
- warn: W
673
+ warn: z
672
674
  } : void 0
673
- }), Ve || this.options.recordCrossOriginIframe && this._setupCrossOriginIframeParent(), document.referrer && (window && document.referrer.includes(window.location.origin) || (this.addCustomEvent("Referrer", document.referrer), this.addProperties(
675
+ }), xe || this.options.recordCrossOriginIframe && this._setupCrossOriginIframeParent(), document.referrer && (window && document.referrer.includes(window.location.origin) || (this.addCustomEvent("Referrer", document.referrer), this.addProperties(
674
676
  { referrer: document.referrer },
675
677
  { type: "session" }
676
678
  ))), this.sessionData.sessionKey && this.addProperties(
@@ -679,8 +681,8 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
679
681
  },
680
682
  { type: "session" }
681
683
  ), this._setupWindowListeners(), this.ready = !0, this.state = "Recording", this.manualStopped = !1;
682
- } catch (T) {
683
- this._isOnLocalHost && (console.error(T), W("initializeSession", T));
684
+ } catch (P) {
685
+ this._isOnLocalHost && (T("error", P), z("initializeSession", P));
684
686
  }
685
687
  });
686
688
  }
@@ -706,7 +708,7 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
706
708
  this.logger.log("Ignoring visibility event due to manual stop.");
707
709
  return;
708
710
  }
709
- (/* @__PURE__ */ new Date()).getTime() - this._lastVisibilityChangeTime < ht || (this._lastVisibilityChangeTime = (/* @__PURE__ */ new Date()).getTime(), this.logger.log(`Detected window ${e ? "hidden" : "visible"}.`), e ? (this.addCustomEvent("TabHidden", !0), this.options.disableBackgroundRecording && this.stopRecording()) : (this.options.disableBackgroundRecording && (yield this.initialize()), this.addCustomEvent("TabHidden", !1)));
711
+ (/* @__PURE__ */ new Date()).getTime() - this._lastVisibilityChangeTime < gt || (this._lastVisibilityChangeTime = (/* @__PURE__ */ new Date()).getTime(), this.logger.log(`Detected window ${e ? "hidden" : "visible"}.`), e ? (this.addCustomEvent("TabHidden", !0), this.options.disableBackgroundRecording && this.stopRecording()) : (this.options.disableBackgroundRecording && (yield this.initialize()), this.addCustomEvent("TabHidden", !1)));
710
712
  });
711
713
  }
712
714
  _setupCrossOriginIframe() {
@@ -717,7 +719,7 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
717
719
  const n = s.data;
718
720
  this.logger.log("highlight got window message ", n), this.sessionData.projectID = n.projectID, this.sessionData.sessionSecureID = n.sessionSecureID, window.parent.postMessage(
719
721
  {
720
- highlight: ke
722
+ highlight: _e
721
723
  },
722
724
  "*"
723
725
  ), window.removeEventListener("message", t), e();
@@ -742,8 +744,8 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
742
744
  "*"
743
745
  );
744
746
  });
745
- }, De), window.addEventListener("message", (e) => {
746
- e.data.highlight === ke && this.logger.log(
747
+ }, Ie), window.addEventListener("message", (e) => {
748
+ e.data.highlight === _e && this.logger.log(
747
749
  "highlight got response from initialized iframe"
748
750
  );
749
751
  });
@@ -753,7 +755,7 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
753
755
  try {
754
756
  const n = this;
755
757
  this.enableSegmentIntegration && this.listeners.push(
756
- Qe((r) => {
758
+ Ye((r) => {
757
759
  if (r.type === "track") {
758
760
  const l = {};
759
761
  l["segment-event"] = r.event, n.addProperties(l, {
@@ -773,24 +775,24 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
773
775
  }
774
776
  })
775
777
  ), this.listeners.push(
776
- gt((r) => {
778
+ ut((r) => {
777
779
  this.reloaded ? (this.addCustomEvent("Reload", r), this.reloaded = !1, n.addProperties(
778
780
  { reload: !0 },
779
781
  { type: "session" }
780
782
  )) : this.addCustomEvent("Navigate", r);
781
783
  })
782
784
  ), this.listeners.push(
783
- ut(
785
+ ft(
784
786
  (r) => {
785
787
  this.addCustomEvent("Viewport", r), this.submitViewportMetrics(r);
786
788
  }
787
789
  )
788
790
  ), this.listeners.push(
789
- Ye((r, l) => {
791
+ Xe((r, l) => {
790
792
  let d = null, c = null;
791
793
  if (l && l.target) {
792
794
  const g = l.target;
793
- d = bt(g), c = g.textContent, c && c.length > 2e3 && (c = c.substring(0, 2e3));
795
+ d = kt(g), c = g.textContent, c && c.length > 2e3 && (c = c.substring(0, 2e3));
794
796
  }
795
797
  this.addCustomEvent("Click", {
796
798
  clickTarget: r,
@@ -799,20 +801,20 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
799
801
  });
800
802
  })
801
803
  ), this.listeners.push(
802
- Xe((r) => {
804
+ Ze((r) => {
803
805
  r && this.addCustomEvent("Focus", r);
804
806
  })
805
807
  ), this.listeners.push(
806
- zt((r) => {
807
- const { name: l, value: d } = r, c = [], g = (h, m) => {
808
- m && c.push({ name: h, value: m });
808
+ Bt((r) => {
809
+ const { name: l, value: d } = r, c = [], g = (h, f) => {
810
+ f && c.push({ name: h, value: f });
809
811
  };
810
812
  switch (r.name) {
811
813
  case "LCP": {
812
814
  const h = r.attribution;
813
815
  g("web_vital.element", h.element), g(
814
816
  "web_vital.attribution.url",
815
- h.url ? Vt(h.url) : void 0
817
+ h.url ? xt(h.url) : void 0
816
818
  );
817
819
  break;
818
820
  }
@@ -846,7 +848,7 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
846
848
  });
847
849
  })
848
850
  ), this.listeners.push(
849
- Bt(
851
+ Mt(
850
852
  (r) => {
851
853
  const l = [];
852
854
  r.saveData !== void 0 && l.push({
@@ -871,15 +873,15 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
871
873
  this._recordingStartTime
872
874
  )
873
875
  ), this.sessionShortcut && this.listeners.push(
874
- Ze(this.sessionShortcut, () => {
876
+ et(this.sessionShortcut, () => {
875
877
  window.open(
876
878
  this.getCurrentSessionURLWithTimestamp(),
877
879
  "_blank"
878
880
  );
879
881
  })
880
882
  ), this.enablePerformanceRecording && (this.listeners.push(
881
- Mt((r) => {
882
- this.addCustomEvent("Performance", A(r)), Object.entries(r).filter(([l]) => l !== "relativeTimestamp").forEach(
883
+ Ft((r) => {
884
+ this.addCustomEvent("Performance", K(r)), Object.entries(r).filter(([l]) => l !== "relativeTimestamp").forEach(
883
885
  ([l, d]) => d && this.recordGauge({
884
886
  name: l,
885
887
  value: d,
@@ -889,8 +891,8 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
889
891
  );
890
892
  }, this._recordingStartTime)
891
893
  ), this.listeners.push(
892
- Ft((r) => {
893
- this.addCustomEvent("Jank", A(r)), this.recordGauge({
894
+ $t((r) => {
895
+ this.addCustomEvent("Jank", K(r)), this.recordGauge({
894
896
  name: "Jank",
895
897
  value: r.jankAmount,
896
898
  category: D.WebVital,
@@ -902,7 +904,7 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
902
904
  ({ visible: r }) => {
903
905
  this._visibilityHandler(!r);
904
906
  }
905
- ), this.logger.log("Set up Electron highlight.run events.")) : (et(
907
+ ), this.logger.log("Set up Electron highlight.run events.")) : (tt(
906
908
  (r) => this._visibilityHandler(r)
907
909
  ), this.logger.log("Set up document visibility listener.")), this._hasPreviouslyInitialized = !0);
908
910
  const o = () => {
@@ -912,16 +914,16 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
912
914
  () => window.removeEventListener("beforeunload", o)
913
915
  );
914
916
  } catch (n) {
915
- this._isOnLocalHost && (console.error(n), W("initializeSession _setupWindowListeners", n));
917
+ this._isOnLocalHost && (T("error", n), z("initializeSession _setupWindowListeners", n));
916
918
  }
917
919
  const e = () => {
918
- this.addCustomEvent("Page Unload", ""), Y(this.sessionData.sessionSecureID), U(this.sessionData);
920
+ this.addCustomEvent("Page Unload", ""), X(this.sessionData.sessionSecureID), W(this.sessionData);
919
921
  };
920
922
  if (window.addEventListener("beforeunload", e), this.listeners.push(
921
923
  () => window.removeEventListener("beforeunload", e)
922
924
  ), navigator.userAgent.match(/iPad/i) || navigator.userAgent.match(/iPhone/i)) {
923
925
  const n = () => {
924
- this.addCustomEvent("Page Unload", ""), Y(this.sessionData.sessionSecureID), U(this.sessionData);
926
+ this.addCustomEvent("Page Unload", ""), X(this.sessionData.sessionSecureID), W(this.sessionData);
925
927
  };
926
928
  window.addEventListener("pagehide", n), this.listeners.push(
927
929
  () => window.removeEventListener("pagehide", n)
@@ -965,9 +967,9 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
965
967
  var s, n;
966
968
  let t = this._gauges.get(e.name);
967
969
  if (!t) {
968
- if (t = (s = V()) == null ? void 0 : s.createGauge(
970
+ if (t = (s = x()) == null ? void 0 : s.createGauge(
969
971
  e.name,
970
- x(e.name, e.unit)
972
+ A(e.name, e.unit)
971
973
  ), !t) return;
972
974
  this._gauges.set(e.name, t);
973
975
  }
@@ -983,9 +985,9 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
983
985
  var s, n;
984
986
  let t = this._counters.get(e.name);
985
987
  if (!t) {
986
- if (t = (s = V()) == null ? void 0 : s.createCounter(
988
+ if (t = (s = x()) == null ? void 0 : s.createCounter(
987
989
  e.name,
988
- x(e.name, e.unit)
990
+ A(e.name, e.unit)
989
991
  ), !t) return;
990
992
  this._counters.set(e.name, t);
991
993
  }
@@ -1002,9 +1004,9 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
1002
1004
  var s, n;
1003
1005
  let t = this._histograms.get(e.name);
1004
1006
  if (!t) {
1005
- if (t = (s = V()) == null ? void 0 : s.createHistogram(
1007
+ if (t = (s = x()) == null ? void 0 : s.createHistogram(
1006
1008
  e.name,
1007
- x(e.name, e.unit)
1009
+ A(e.name, e.unit)
1008
1010
  ), !t) return;
1009
1011
  this._histograms.set(e.name, t);
1010
1012
  }
@@ -1018,9 +1020,9 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
1018
1020
  var s, n;
1019
1021
  let t = this._up_down_counters.get(e.name);
1020
1022
  if (!t) {
1021
- if (t = (s = V()) == null ? void 0 : s.createUpDownCounter(
1023
+ if (t = (s = x()) == null ? void 0 : s.createUpDownCounter(
1022
1024
  e.name,
1023
- x(e.name, e.unit)
1025
+ A(e.name, e.unit)
1024
1026
  ), !t) return;
1025
1027
  this._up_down_counters.set(e.name, t);
1026
1028
  }
@@ -1038,7 +1040,7 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
1038
1040
  this.manualStopped = !!e, this.manualStopped && this.addCustomEvent(
1039
1041
  "Stop",
1040
1042
  "H.stop() was called which stops Highlight from recording."
1041
- ), this.state = "NotRecording", e && this._recordStop && (this._recordStop(), this._recordStop = void 0), this.listeners.forEach((t) => t()), this.listeners = [], ze();
1043
+ ), this.state = "NotRecording", e && this._recordStop && (this._recordStop(), this._recordStop = void 0), this.listeners.forEach((t) => t()), this.listeners = [], Be();
1042
1044
  }
1043
1045
  getCurrentSessionTimestamp() {
1044
1046
  return this._recordingStartTime;
@@ -1048,15 +1050,15 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
1048
1050
  */
1049
1051
  getCurrentSessionURLWithTimestamp() {
1050
1052
  const e = (/* @__PURE__ */ new Date()).getTime(), { projectID: t, sessionSecureID: s } = this.sessionData, n = (e - this._recordingStartTime) / 1e3;
1051
- return `https://${X}/${t}/sessions/${s}?ts=${n}`;
1053
+ return `https://${Z}/${t}/sessions/${s}?ts=${n}`;
1052
1054
  }
1053
1055
  getCurrentSessionURL() {
1054
1056
  const e = this.sessionData.projectID, t = this.sessionData.sessionSecureID;
1055
- return e && t ? `https://${X}/${e}/sessions/${t}` : null;
1057
+ return e && t ? `https://${Z}/${e}/sessions/${t}` : null;
1056
1058
  }
1057
1059
  snapshot(e) {
1058
1060
  return _(this, null, function* () {
1059
- yield j.snapshotCanvas(e);
1061
+ yield J.snapshotCanvas(e);
1060
1062
  });
1061
1063
  }
1062
1064
  addSessionFeedback({
@@ -1068,7 +1070,7 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
1068
1070
  var o;
1069
1071
  this._worker.postMessage({
1070
1072
  message: {
1071
- type: L.Feedback,
1073
+ type: C.Feedback,
1072
1074
  verbatim: t,
1073
1075
  timestamp: e,
1074
1076
  userName: n || this.sessionData.userIdentifier,
@@ -1089,7 +1091,7 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
1089
1091
  let n = new Blob(
1090
1092
  [
1091
1093
  JSON.stringify({
1092
- query: pt(kt),
1094
+ query: wt(_t),
1093
1095
  variables: s
1094
1096
  })
1095
1097
  ],
@@ -1101,13 +1103,13 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
1101
1103
  method: "POST",
1102
1104
  body: n
1103
1105
  }), 0;
1104
- })), yield this._sendPayload({ sendFn: t }), this.hasPushedData = !0, this.sessionData.lastPushTime = Date.now(), U(this.sessionData);
1106
+ })), yield this._sendPayload({ sendFn: t }), this.hasPushedData = !0, this.sessionData.lastPushTime = Date.now(), W(this.sessionData);
1105
1107
  } catch (t) {
1106
- this._isOnLocalHost && (console.error(t), W("_save", t));
1108
+ this._isOnLocalHost && (T("error", t), z("_save", t));
1107
1109
  }
1108
1110
  this.state === "Recording" && (this.pushPayloadTimerId && (clearTimeout(this.pushPayloadTimerId), this.pushPayloadTimerId = void 0), this.pushPayloadTimerId = setTimeout(() => {
1109
1111
  this._save();
1110
- }, ft));
1112
+ }, pt));
1111
1113
  });
1112
1114
  }
1113
1115
  /**
@@ -1118,10 +1120,10 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
1118
1120
  if (this.state === "NotRecording") {
1119
1121
  let s;
1120
1122
  const n = () => {
1121
- clearInterval(s), this.state === "Recording" && this.events.length > 0 ? _e(e, t) : s = setTimeout(n, 500);
1123
+ clearInterval(s), this.state === "Recording" && this.events.length > 0 ? Re(e, t) : s = setTimeout(n, 500);
1122
1124
  };
1123
1125
  s = setTimeout(n, 500);
1124
- } else this.state === "Recording" && (this.events.length > 0 || this.hasPushedData) && _e(e, t);
1126
+ } else this.state === "Recording" && (this.events.length > 0 || this.hasPushedData) && Re(e, t);
1125
1127
  }
1126
1128
  _sendPayload(t) {
1127
1129
  return _(this, arguments, function* ({
@@ -1132,36 +1134,36 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
1132
1134
  this._recordingStartTime
1133
1135
  ), n = I.getRecordedWebSocketEvents(
1134
1136
  this._firstLoadListeners
1135
- ), o = [...this.events], r = [...this._firstLoadListeners.messages], l = [...this._firstLoadListeners.errors], { bytes: d, time: c } = this.enableCanvasRecording ? Ie.canvas : Ie.normal;
1137
+ ), o = [...this.events], r = [...this._firstLoadListeners.messages], l = [...this._firstLoadListeners.errors], { bytes: d, time: c } = this.enableCanvasRecording ? Le.canvas : Le.normal;
1136
1138
  this._eventBytesSinceSnapshot >= d && (/* @__PURE__ */ new Date()).getTime() - this._lastSnapshotTime >= c && this.takeFullSnapshot(), this.logger.log(
1137
1139
  `Sending: ${o.length} events, ${r.length} messages, ${s.length} network resources, ${l.length} errors
1138
1140
  To: ${this._backendUrl}
1139
1141
  Org: ${this.organizationID}
1140
1142
  SessionSecureID: ${this.sessionData.sessionSecureID}`
1141
1143
  );
1142
- const g = (/* @__PURE__ */ new Date()).getTime(), h = tt();
1144
+ const g = (/* @__PURE__ */ new Date()).getTime(), h = st();
1143
1145
  if (e) {
1144
- const m = {
1146
+ const f = {
1145
1147
  session_secure_id: this.sessionData.sessionSecureID,
1146
1148
  payload_id: g.toString(),
1147
1149
  events: { events: o },
1148
- messages: A({ messages: r }),
1150
+ messages: K({ messages: r }),
1149
1151
  resources: JSON.stringify({ resources: s }),
1150
1152
  web_socket_events: JSON.stringify({ webSocketEvents: n }),
1151
1153
  errors: l,
1152
1154
  is_beacon: !1,
1153
1155
  has_session_unloaded: this.hasSessionUnloaded,
1154
1156
  highlight_logs: h || void 0
1155
- }, { compressedBase64: f } = yield st(m);
1157
+ }, { compressedBase64: m } = yield it(f);
1156
1158
  yield e({
1157
1159
  session_secure_id: this.sessionData.sessionSecureID,
1158
1160
  payload_id: (/* @__PURE__ */ new Date()).getTime().toString(),
1159
- data: f
1161
+ data: m
1160
1162
  });
1161
1163
  } else
1162
1164
  this._worker.postMessage({
1163
1165
  message: {
1164
- type: L.AsyncEvents,
1166
+ type: C.AsyncEvents,
1165
1167
  id: g,
1166
1168
  events: o,
1167
1169
  messages: r,
@@ -1174,11 +1176,11 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
1174
1176
  highlightLogs: h
1175
1177
  }
1176
1178
  });
1177
- U(this.sessionData), I.clearRecordedNetworkResources(
1179
+ W(this.sessionData), I.clearRecordedNetworkResources(
1178
1180
  this._firstLoadListeners
1179
1181
  ), this.events = this.events.slice(o.length), this._firstLoadListeners.messages = this._firstLoadListeners.messages.slice(r.length), this._firstLoadListeners.errors = this._firstLoadListeners.errors.slice(
1180
1182
  l.length
1181
- ), it(h);
1183
+ ), nt(h);
1182
1184
  });
1183
1185
  }
1184
1186
  takeFullSnapshot() {
@@ -1189,15 +1191,15 @@ SessionSecureID: ${this.sessionData.sessionSecureID}`
1189
1191
  this.logger.log("taking full snapshot", {
1190
1192
  bytesSinceSnapshot: this._eventBytesSinceSnapshot,
1191
1193
  lastSnapshotTime: this._lastSnapshotTime
1192
- }), j.takeFullSnapshot(), this._eventBytesSinceSnapshot = 0, this._lastSnapshotTime = (/* @__PURE__ */ new Date()).getTime();
1194
+ }), J.takeFullSnapshot(), this._eventBytesSinceSnapshot = 0, this._lastSnapshotTime = (/* @__PURE__ */ new Date()).getTime();
1193
1195
  }
1194
1196
  registerLD(e) {
1195
- this._integrations.length || this._integrations.push(new Ue(e));
1197
+ this._integrations.length || this._integrations.push(new We(e));
1196
1198
  }
1197
1199
  };
1198
- F = new WeakMap();
1199
- let Z = te;
1200
- const Gt = () => {
1200
+ $ = new WeakMap();
1201
+ let ee = se;
1202
+ const Jt = () => {
1201
1203
  var i, e;
1202
1204
  typeof chrome != "undefined" && ((i = chrome == null ? void 0 : chrome.runtime) != null && i.onMessage) && ((e = chrome == null ? void 0 : chrome.runtime) == null || e.onMessage.addListener(
1203
1205
  (t, s, n) => {
@@ -1222,7 +1224,7 @@ const Gt = () => {
1222
1224
  }
1223
1225
  ));
1224
1226
  };
1225
- function ss(i) {
1227
+ function ns(i) {
1226
1228
  var e;
1227
1229
  i.on && ((e = i.webContents) != null && e.send) && (i.on("focus", () => {
1228
1230
  i.webContents.send("highlight.run", { visible: !0 });
@@ -1232,7 +1234,7 @@ function ss(i) {
1232
1234
  i.webContents.send("highlight.run", { visible: !1 });
1233
1235
  }));
1234
1236
  }
1235
- const is = ({
1237
+ const rs = ({
1236
1238
  next: i,
1237
1239
  payload: e
1238
1240
  }) => {
@@ -1249,20 +1251,20 @@ const is = ({
1249
1251
  }
1250
1252
  }
1251
1253
  i(e);
1252
- }, Fe = () => {
1254
+ }, $e = () => {
1253
1255
  if (typeof window != "undefined") {
1254
1256
  if (typeof window._highlightFetchPatch != "undefined")
1255
1257
  return;
1256
1258
  window._originalFetch = window.fetch, window._fetchProxy = (i, e) => window._originalFetch(i, e), window._highlightFetchPatch = (i, e) => window._fetchProxy.call(window || global, i, e), window.fetch = window._highlightFetchPatch;
1257
1259
  }
1258
- }, Pe = () => null, $e = () => {
1260
+ }, He = () => null, Ve = () => {
1259
1261
  if (typeof window != "undefined") {
1260
1262
  if (typeof window._highlightWebSocketRequestCallback != "undefined")
1261
1263
  return;
1262
- window._highlightWebSocketRequestCallback = Pe, window._highlightWebSocketEventCallback = Pe;
1264
+ window._highlightWebSocketRequestCallback = He, window._highlightWebSocketEventCallback = He;
1263
1265
  const i = new Proxy(window.WebSocket, {
1264
1266
  construct(e, t) {
1265
- const [, s] = xt(), n = new e(...t), o = (g) => {
1267
+ const [, s] = At(), n = new e(...t), o = (g) => {
1266
1268
  window._highlightWebSocketRequestCallback({
1267
1269
  socketId: s,
1268
1270
  initiatorType: "websocket",
@@ -1279,15 +1281,15 @@ const is = ({
1279
1281
  responseEndAbs: performance.timeOrigin + g.timeStamp
1280
1282
  }), n.removeEventListener("open", o), n.removeEventListener("error", d), n.removeEventListener("message", l), n.removeEventListener("close", r);
1281
1283
  }, l = (g) => {
1282
- const { data: h } = g, m = typeof h == "string" ? g.data : void 0;
1283
- let f;
1284
- typeof h == "string" ? f = h.length : h instanceof Blob ? f = h.size : f = h.byteLength || 0, window._highlightWebSocketEventCallback({
1284
+ const { data: h } = g, f = typeof h == "string" ? g.data : void 0;
1285
+ let m;
1286
+ typeof h == "string" ? m = h.length : h instanceof Blob ? m = h.size : m = h.byteLength || 0, window._highlightWebSocketEventCallback({
1285
1287
  socketId: s,
1286
1288
  type: "received",
1287
1289
  name: n.url,
1288
1290
  timeStamp: performance.timeOrigin + g.timeStamp,
1289
- size: f,
1290
- message: m
1291
+ size: m,
1292
+ message: f
1291
1293
  });
1292
1294
  }, d = (g) => {
1293
1295
  window._highlightWebSocketEventCallback({
@@ -1300,17 +1302,17 @@ const is = ({
1300
1302
  };
1301
1303
  n.addEventListener("open", o), n.addEventListener("error", d), n.addEventListener("message", l), n.addEventListener("close", r);
1302
1304
  const c = new Proxy(n.send, {
1303
- apply: function(g, h, m) {
1304
- const f = m[0], R = typeof f == "string" ? f : void 0;
1305
- let v;
1306
- typeof f == "string" ? v = f.length : f instanceof Blob ? v = f.size : v = f.byteLength || 0, window._highlightWebSocketEventCallback({
1305
+ apply: function(g, h, f) {
1306
+ const m = f[0], R = typeof m == "string" ? m : void 0;
1307
+ let k;
1308
+ typeof m == "string" ? k = m.length : m instanceof Blob ? k = m.size : k = m.byteLength || 0, window._highlightWebSocketEventCallback({
1307
1309
  socketId: s,
1308
1310
  type: "sent",
1309
1311
  name: n.url,
1310
1312
  timeStamp: performance.timeOrigin + performance.now(),
1311
- size: v,
1313
+ size: k,
1312
1314
  message: R
1313
- }), g.apply(h, m);
1315
+ }), g.apply(h, f);
1314
1316
  }
1315
1317
  });
1316
1318
  return n.send = c, n;
@@ -1319,11 +1321,11 @@ const is = ({
1319
1321
  window.WebSocket = i;
1320
1322
  }
1321
1323
  };
1322
- var jt = /* @__PURE__ */ ((i) => (i.Device = "Device", i.WebVital = "WebVital", i.Frontend = "Frontend", i.Backend = "Backend", i))(jt || {});
1324
+ var Qt = /* @__PURE__ */ ((i) => (i.Device = "Device", i.WebVital = "WebVital", i.Frontend = "Frontend", i.Backend = "Backend", i))(Qt || {});
1323
1325
  const b = (i, e) => {
1324
- console.warn(`highlight.run warning: (${i}): `, e);
1325
- }, Jt = 200;
1326
- let z = [], K, u, B, He = [], ee = !1;
1326
+ T("warn", `highlight.run warning: (${i}): `, e);
1327
+ }, Yt = 200;
1328
+ let B = [], q, u, M, Ue = [], te = !1;
1327
1329
  const p = {
1328
1330
  options: void 0,
1329
1331
  init: (i, e) => {
@@ -1337,22 +1339,22 @@ const p = {
1337
1339
  );
1338
1340
  return;
1339
1341
  }
1340
- e != null && e.sessionCookie ? Rt() : We(!1);
1341
- const g = M();
1342
+ e != null && e.sessionCookie ? Dt() : ze(!1);
1343
+ const g = F();
1342
1344
  let h = O();
1343
1345
  if (e != null && e.sessionKey ? h = O(
1344
1346
  `${i}-${e.sessionKey}`
1345
- ) : g != null && g.sessionSecureID && (h = g.sessionSecureID), ee)
1347
+ ) : g != null && g.sessionSecureID && (h = g.sessionSecureID), te)
1346
1348
  return { sessionSecureID: h };
1347
- ee = !0, Fe(), $e();
1348
- const m = y(w({}, e), {
1349
+ te = !0, $e(), Ve();
1350
+ const f = y(w({}, e), {
1349
1351
  organizationID: i,
1350
- firstloadVersion: Dt,
1352
+ firstloadVersion: It,
1351
1353
  environment: (e == null ? void 0 : e.environment) || "production",
1352
1354
  appVersion: e == null ? void 0 : e.version,
1353
1355
  sessionSecureID: h
1354
1356
  });
1355
- return B = new I(m), e != null && e.manualStart || B.startListening(), u = u != null ? u : new Z(m, B), e != null && e.manualStart || u.initialize(), !((s = (t = e == null ? void 0 : e.integrations) == null ? void 0 : t.mixpanel) != null && s.disabled) && ((o = (n = e == null ? void 0 : e.integrations) == null ? void 0 : n.mixpanel) != null && o.projectToken) && at(e.integrations.mixpanel), !((l = (r = e == null ? void 0 : e.integrations) == null ? void 0 : r.amplitude) != null && l.disabled) && ((c = (d = e == null ? void 0 : e.integrations) == null ? void 0 : d.amplitude) != null && c.apiKey) && ct(e.integrations.amplitude), { sessionSecureID: h };
1357
+ return M = new I(f), e != null && e.manualStart || M.startListening(), u = u != null ? u : new ee(f, M), e != null && e.manualStart || u.initialize(), !((s = (t = e == null ? void 0 : e.integrations) == null ? void 0 : t.mixpanel) != null && s.disabled) && ((o = (n = e == null ? void 0 : e.integrations) == null ? void 0 : n.mixpanel) != null && o.projectToken) && ct(e.integrations.mixpanel), !((l = (r = e == null ? void 0 : e.integrations) == null ? void 0 : r.amplitude) != null && l.disabled) && ((c = (d = e == null ? void 0 : e.integrations) == null ? void 0 : d.amplitude) != null && c.apiKey) && lt(e.integrations.amplitude), { sessionSecureID: h };
1356
1358
  } catch (g) {
1357
1359
  b("init", g);
1358
1360
  }
@@ -1414,21 +1416,21 @@ const p = {
1414
1416
  }
1415
1417
  },
1416
1418
  track: (i, e = {}) => {
1417
- var t, s, n, o, r, l, d, c, g, h, m;
1419
+ var t, s, n, o, r, l, d, c, g, h, f;
1418
1420
  try {
1419
1421
  p.onHighlightReady(() => {
1420
1422
  u.addProperties(y(w({}, e), { event: i })), u.log("H.track", "INFO", y(w({}, e != null ? e : {}), {
1421
1423
  event: i
1422
1424
  }));
1423
1425
  });
1424
- const f = u == null ? void 0 : u.getCurrentSessionURL();
1426
+ const m = u == null ? void 0 : u.getCurrentSessionURL();
1425
1427
  (n = (s = (t = p.options) == null ? void 0 : t.integrations) == null ? void 0 : s.mixpanel) != null && n.disabled || (o = window.mixpanel) != null && o.track && window.mixpanel.track(i, y(w({}, e), {
1426
- highlightSessionURL: f
1428
+ highlightSessionURL: m
1427
1429
  })), (d = (l = (r = p.options) == null ? void 0 : r.integrations) == null ? void 0 : l.amplitude) != null && d.disabled || (c = window.amplitude) != null && c.getInstance && window.amplitude.getInstance().logEvent(i, y(w({}, e), {
1428
- highlightSessionURL: f
1429
- })), (m = (h = (g = p.options) == null ? void 0 : g.integrations) == null ? void 0 : h.intercom) != null && m.disabled || window.Intercom && window.Intercom("trackEvent", i, e);
1430
- } catch (f) {
1431
- b("track", f);
1430
+ highlightSessionURL: m
1431
+ })), (f = (h = (g = p.options) == null ? void 0 : g.integrations) == null ? void 0 : h.intercom) != null && f.disabled || window.Intercom && window.Intercom("trackEvent", i, e);
1432
+ } catch (m) {
1433
+ b("track", m);
1432
1434
  }
1433
1435
  },
1434
1436
  log: (i, e, t) => {
@@ -1444,7 +1446,7 @@ const p = {
1444
1446
  var e;
1445
1447
  (u == null ? void 0 : u.state) === "Recording" && !(i != null && i.forceNew) ? i != null && i.silent || console.warn(
1446
1448
  "Highlight is already recording. Please `H.stop()` the current session before starting a new one."
1447
- ) : (((e = u == null ? void 0 : u._firstLoadListeners) != null ? e : B).startListening(), p.onHighlightReady(
1449
+ ) : (((e = u == null ? void 0 : u._firstLoadListeners) != null ? e : M).startListening(), p.onHighlightReady(
1448
1450
  () => _(void 0, null, function* () {
1449
1451
  yield u.initialize(i);
1450
1452
  }),
@@ -1470,7 +1472,7 @@ const p = {
1470
1472
  ), e && (window.mixpanel.track("identify", e), window.mixpanel.people.set(e))), !((c = (d = (l = p.options) == null ? void 0 : l.integrations) == null ? void 0 : d.amplitude) != null && c.disabled) && (g = window.amplitude) != null && g.getInstance && (window.amplitude.getInstance().setUserId(i), Object.keys(e).length > 0)) {
1471
1473
  const h = Object.keys(
1472
1474
  e
1473
- ).reduce((m, f) => (m.set(f, e[f]), m), new window.amplitude.Identify());
1475
+ ).reduce((f, m) => (f.set(m, e[m]), f), new window.amplitude.Identify());
1474
1476
  window.amplitude.getInstance().identify(h);
1475
1477
  }
1476
1478
  },
@@ -1534,9 +1536,9 @@ const p = {
1534
1536
  }
1535
1537
  },
1536
1538
  startSpan: (i, e, t, s) => {
1537
- const n = Oe();
1539
+ const n = Te();
1538
1540
  if (!n) {
1539
- const r = Te();
1541
+ const r = Pe();
1540
1542
  return s === void 0 && t === void 0 ? e(r) : s === void 0 ? t(r) : s(r);
1541
1543
  }
1542
1544
  const o = (r, l) => {
@@ -1558,9 +1560,9 @@ const p = {
1558
1560
  );
1559
1561
  },
1560
1562
  startManualSpan: (i, e, t, s) => {
1561
- const n = Oe();
1563
+ const n = Te();
1562
1564
  if (!n) {
1563
- const o = Te();
1565
+ const o = Pe();
1564
1566
  return s === void 0 && t === void 0 ? e(o) : s === void 0 ? t(o) : s(o);
1565
1567
  }
1566
1568
  return s === void 0 && t === void 0 ? n.startActiveSpan(i, e) : s === void 0 ? n.startActiveSpan(
@@ -1576,9 +1578,9 @@ const p = {
1576
1578
  },
1577
1579
  getSessionURL: () => new Promise((i, e) => {
1578
1580
  p.onHighlightReady(() => {
1579
- const t = u.sessionData.sessionSecureID, s = M(t);
1581
+ const t = u.sessionData.sessionSecureID, s = F(t);
1580
1582
  s ? i(
1581
- `https://${X}/${s.projectID}/sessions/${t}`
1583
+ `https://${Z}/${s.projectID}/sessions/${t}`
1582
1584
  ) : e(new Error(`Unable to get session URL: ${t}`));
1583
1585
  });
1584
1586
  }),
@@ -1588,7 +1590,7 @@ const p = {
1588
1590
  const t = yield p.getSessionURL();
1589
1591
  if (!t)
1590
1592
  throw new Error("Could not get session URL");
1591
- const s = u.sessionData.sessionSecureID, n = M(s), o = n == null ? void 0 : n.sessionStartTime;
1593
+ const s = u.sessionData.sessionSecureID, n = F(s), o = n == null ? void 0 : n.sessionStartTime;
1592
1594
  if (!o)
1593
1595
  throw new Error("Could not get session start timestamp");
1594
1596
  const r = (/* @__PURE__ */ new Date()).getTime(), l = new URL(t), d = new URL(t);
@@ -1614,32 +1616,32 @@ const p = {
1614
1616
  i();
1615
1617
  return;
1616
1618
  }
1617
- if (z.push({ options: e, func: i }), K !== void 0)
1619
+ if (B.push({ options: e, func: i }), q !== void 0)
1618
1620
  return;
1619
1621
  const t = () => {
1620
- z = z.filter((n) => {
1622
+ B = B.filter((n) => {
1621
1623
  var o;
1622
1624
  return !u || ((o = n.options) == null ? void 0 : o.waitForReady) !== !1 && !u.ready ? !0 : (n.func(), !1);
1623
- }), K = void 0, z.length > 0 && (K = setTimeout(
1625
+ }), q = void 0, B.length > 0 && (q = setTimeout(
1624
1626
  t,
1625
- Jt
1627
+ Yt
1626
1628
  ));
1627
1629
  };
1628
1630
  t();
1629
1631
  },
1630
1632
  registerLD(i) {
1631
- He.length || (p.onHighlightReady(() => {
1633
+ Ue.length || (p.onHighlightReady(() => {
1632
1634
  u.registerLD(i);
1633
- }), _t(this, i, p.options), He.push(new Ue(i)));
1635
+ }), Rt(this, i, p.options), Ue.push(new We(i)));
1634
1636
  }
1635
1637
  };
1636
1638
  typeof window != "undefined" && (window.H = p);
1637
- Gt();
1638
- Fe();
1639
+ Jt();
1639
1640
  $e();
1640
- const ns = {
1641
+ Ve();
1642
+ const os = {
1641
1643
  reset: () => {
1642
- ee = !1, u = void 0, z = [], K = void 0, B = void 0;
1644
+ te = !1, u = void 0, B = [], q = void 0, M = void 0;
1643
1645
  },
1644
1646
  setHighlightObj: (i) => {
1645
1647
  u = i;
@@ -1648,13 +1650,13 @@ const ns = {
1648
1650
  export {
1649
1651
  O as GenerateSecureID,
1650
1652
  p as H,
1651
- is as HighlightSegmentMiddleware,
1652
- hs as LDObserve,
1653
- us as LDRecord,
1654
- jt as MetricCategory,
1655
- ls as Observe,
1656
- as as Record,
1657
- ns as __testing,
1658
- ss as configureElectronHighlight
1653
+ rs as HighlightSegmentMiddleware,
1654
+ us as LDObserve,
1655
+ ms as LDRecord,
1656
+ Qt as MetricCategory,
1657
+ hs as Observe,
1658
+ ls as Record,
1659
+ os as __testing,
1660
+ ns as configureElectronHighlight
1659
1661
  };
1660
1662
  //# sourceMappingURL=index.js.map