wineater-bot 3.6.0 → 3.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -30,7 +30,7 @@ function mi() {
30
30
  return e || (e = pi(), Rs(t, e, 365)), e;
31
31
  }
32
32
  var $e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
33
- function vi(t) {
33
+ function bi(t) {
34
34
  return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
35
35
  }
36
36
  var $n = { exports: {} };
@@ -214,16 +214,16 @@ var $n = { exports: {} };
214
214
  var m = "shortString", g = !0;
215
215
  typeof h == "number" && (m = "javaDouble", g = !1), y[m] = y[m] || {}, y[m][f] = g ? h + "" : h;
216
216
  }
217
- function v(y) {
217
+ function b(y) {
218
218
  return !!y && typeof y == "object" && y.value !== void 0;
219
219
  }
220
220
  function w(y) {
221
221
  return Object.fromEntries(Object.entries(y).map(function(f) {
222
222
  var h = f[0], m = f[1];
223
- return [h, v(m) ? m : { value: m }];
223
+ return [h, b(m) ? m : { value: m }];
224
224
  }));
225
225
  }
226
- function b(y) {
226
+ function v(y) {
227
227
  return i(i({}, y), { identity: y.identity ? i(i({}, y.identity), { traits: w(y.identity.traits || {}) }) : void 0 });
228
228
  }
229
229
  (function(y) {
@@ -318,7 +318,7 @@ var $n = { exports: {} };
318
318
  return [S, x == null ? void 0 : x.value];
319
319
  }));
320
320
  }, this.setContext = function(m) {
321
- var g = b(m);
321
+ var g = v(m);
322
322
  return h.evaluationContext = i(i({}, g), { environment: g.environment || h.evaluationContext.environment }), h.initialised ? h.getFlags() : Promise.resolve();
323
323
  }, this.getContext = function() {
324
324
  return h.evaluationContext;
@@ -333,7 +333,7 @@ var $n = { exports: {} };
333
333
  if (h.api)
334
334
  return h.setContext(i(i({}, h.evaluationContext), { identity: i(i({}, h.evaluationContext.identity), { traits: i(i({}, (g = h.evaluationContext.identity) === null || g === void 0 ? void 0 : g.traits), Object.fromEntries(Object.entries(m).map(function(S) {
335
335
  var x = S[0], A = S[1];
336
- return [x, v(A) ? A : { value: A }];
336
+ return [x, b(A) ? A : { value: A }];
337
337
  }))) }) }));
338
338
  console.error("Attempted to setTraits a user before calling flagsmith.init. Call flagsmith.init first, if you wish to prevent it sending a request for flags, call init with preventFetch:true.");
339
339
  }, this.hasFeature = function(m, g) {
@@ -388,7 +388,7 @@ var $n = { exports: {} };
388
388
  return o(this, function(fe) {
389
389
  switch (fe.label) {
390
390
  case 0:
391
- S = b(f.evaluationContext || this.evaluationContext), fe.label = 1;
391
+ S = v(f.evaluationContext || this.evaluationContext), fe.label = 1;
392
392
  case 1:
393
393
  if (fe.trys.push([1, 13, , 14]), x = f.environmentID, A = f.api, B = A === void 0 ? k : A, q = f.headers, O = f.onChange, W = f.cacheFlags, ee = f.datadogRum, oe = f.onError, te = f.defaultFlags, ne = f.fetch, ae = f.preventFetch, ce = f.enableLogs, ge = f.enableDynatrace, Ge = f.enableAnalytics, Ke = f.realtime, Le = f.eventSourceUrl, se = Le === void 0 ? "https://realtime.flagsmith.com/" : Le, J = f.AsyncStorage, Ct = f.identity, Je = f.traits, Pn = f.state, Xe = f.cacheOptions, _t = f.angularHttpClient, Bn = f._trigger, jn = f._triggerLoadingState, S.environment = x ? { apiKey: x } : S.environment, !S.environment || !S.environment.apiKey)
394
394
  throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
@@ -397,8 +397,8 @@ var $n = { exports: {} };
397
397
  })) : {} } : S.identity, this.evaluationContext = S, this.api = B, this.headers = q, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = O, Nt = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Bn || this._trigger, this._triggerLoadingState = jn || this._triggerLoadingState, this.onError = function(le) {
398
398
  ie.setLoadingState(i(i({}, ie.loadingState), { isFetching: !1, isLoading: !1, error: le })), oe == null || oe(le);
399
399
  }, this.enableLogs = ce || !1, this.cacheOptions = Xe ? { skipAPI: !!Xe.skipAPI, ttl: Xe.ttl || 0, loadStale: !!Xe.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), ne && (d = ne), this.enableAnalytics = Ge || !1, this.flags = Object.assign({}, te) || {}, this.datadogRum = ee || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = N !== void 0 && !!W, J && (N = J), Ke && typeof window < "u" && this.setupRealtime(se, S.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = i(i({}, this.loadingState), { isLoading: !1, source: a.DEFAULT_FLAGS })), this.setState(Pn), this.log("Initialising with properties", f, this), ge && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), _t && (d = /* @__PURE__ */ function(le) {
400
- return function(me, ve) {
401
- var Te = ve.headers, Y = ve.method, Fe = ve.body;
400
+ return function(me, be) {
401
+ var Te = be.headers, Y = be.method, Fe = be.body;
402
402
  return new Promise(function(Oe) {
403
403
  switch (Y) {
404
404
  case "GET":
@@ -426,10 +426,10 @@ var $n = { exports: {} };
426
426
  ie.analyticsInterval = setInterval(ie.analyticsFlags, ie.ticks);
427
427
  }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), N && this.canUseStorage && N.getItem(D, function(le, me) {
428
428
  if (me && ie.evaluationContext.environment) {
429
- var ve = JSON.parse(me);
430
- if (ve[ie.evaluationContext.environment.apiKey]) {
429
+ var be = JSON.parse(me);
430
+ if (be[ie.evaluationContext.environment.apiKey]) {
431
431
  var Te = ie.getState();
432
- ie.log("Retrieved events from cache", me), ie.setState(i(i({}, Te), { evaluationEvent: ve[ie.evaluationContext.environment.apiKey] }));
432
+ ie.log("Retrieved events from cache", me), ie.setState(i(i({}, Te), { evaluationEvent: be[ie.evaluationContext.environment.apiKey] }));
433
433
  }
434
434
  }
435
435
  })), !W)
@@ -438,15 +438,15 @@ var $n = { exports: {} };
438
438
  return [3, 8];
439
439
  zn = function(le, me) {
440
440
  return r(ie, void 0, void 0, function() {
441
- var ve, Te, Y, Fe, Oe, xe, Rt, Hn, Dt, At, Lt, Mt, Ft, Pt, Bt, jt, zt, Ut, Ht, $t, qt, Wt, Vt, Gt;
441
+ var be, Te, Y, Fe, Oe, xe, Rt, Hn, Dt, At, Lt, Mt, Ft, Pt, Bt, jt, zt, Ut, Ht, $t, qt, Wt, Vt, Gt;
442
442
  return o(this, function(Ee) {
443
443
  switch (Ee.label) {
444
444
  case 0:
445
445
  if (!me)
446
446
  return [3, 7];
447
- ve = null, Te = null, Ee.label = 1;
447
+ be = null, Te = null, Ee.label = 1;
448
448
  case 1:
449
- return Ee.trys.push([1, 5, , 6]), Y = JSON.parse(me), Fe = !1, Oe = !1, Y && Y.api === this.api && ((At = (Dt = Y.evaluationContext) === null || Dt === void 0 ? void 0 : Dt.environment) === null || At === void 0 ? void 0 : At.apiKey) === ((Lt = this.evaluationContext.environment) === null || Lt === void 0 ? void 0 : Lt.apiKey) && (xe = !0, this.evaluationContext.identity && ((Ft = (Mt = Y.evaluationContext) === null || Mt === void 0 ? void 0 : Mt.identity) === null || Ft === void 0 ? void 0 : Ft.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Bt = (Pt = Y.evaluationContext) === null || Pt === void 0 ? void 0 : Pt.identity) === null || Bt === void 0 ? void 0 : Bt.identifier) + " to " + this.evaluationContext.identity.identifier), xe = !1), this.cacheOptions.ttl && (!Y.ts || (/* @__PURE__ */ new Date()).valueOf() - Y.ts > this.cacheOptions.ttl) && (Y.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), xe = !1) : Y.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), Oe = !0, xe = !0)), xe && (Fe = !0, Te = u((jt = this.evaluationContext.identity) === null || jt === void 0 ? void 0 : jt.traits, (Ut = (zt = Y.evaluationContext) === null || zt === void 0 ? void 0 : zt.identity) === null || Ut === void 0 ? void 0 : Ut.traits), ve = u(this.flags, Y.flags), this.setState(i(i({}, Y), { evaluationContext: b(i(i({}, Y.evaluationContext), { identity: !((Ht = Y.evaluationContext) === null || Ht === void 0) && Ht.identity ? i(i({}, ($t = Y.evaluationContext) === null || $t === void 0 ? void 0 : $t.identity), { traits: i(i({}, ((Wt = (qt = Y.evaluationContext) === null || qt === void 0 ? void 0 : qt.identity) === null || Wt === void 0 ? void 0 : Wt.traits) || {}), Je || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", Y))), Fe ? (Rt = !ae && (!this.cacheOptions.skipAPI || Oe), this._onChange(null, { isFromServer: !1, flagsChanged: ve, traitsChanged: Te }, this._loadedState(null, a.CACHE, Rt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Fe && !Oe && this.log("Skipping API, using cache"), Rt && this.getFlags(), [3, 4]) : [3, 2];
449
+ return Ee.trys.push([1, 5, , 6]), Y = JSON.parse(me), Fe = !1, Oe = !1, Y && Y.api === this.api && ((At = (Dt = Y.evaluationContext) === null || Dt === void 0 ? void 0 : Dt.environment) === null || At === void 0 ? void 0 : At.apiKey) === ((Lt = this.evaluationContext.environment) === null || Lt === void 0 ? void 0 : Lt.apiKey) && (xe = !0, this.evaluationContext.identity && ((Ft = (Mt = Y.evaluationContext) === null || Mt === void 0 ? void 0 : Mt.identity) === null || Ft === void 0 ? void 0 : Ft.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Bt = (Pt = Y.evaluationContext) === null || Pt === void 0 ? void 0 : Pt.identity) === null || Bt === void 0 ? void 0 : Bt.identifier) + " to " + this.evaluationContext.identity.identifier), xe = !1), this.cacheOptions.ttl && (!Y.ts || (/* @__PURE__ */ new Date()).valueOf() - Y.ts > this.cacheOptions.ttl) && (Y.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), xe = !1) : Y.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), Oe = !0, xe = !0)), xe && (Fe = !0, Te = u((jt = this.evaluationContext.identity) === null || jt === void 0 ? void 0 : jt.traits, (Ut = (zt = Y.evaluationContext) === null || zt === void 0 ? void 0 : zt.identity) === null || Ut === void 0 ? void 0 : Ut.traits), be = u(this.flags, Y.flags), this.setState(i(i({}, Y), { evaluationContext: v(i(i({}, Y.evaluationContext), { identity: !((Ht = Y.evaluationContext) === null || Ht === void 0) && Ht.identity ? i(i({}, ($t = Y.evaluationContext) === null || $t === void 0 ? void 0 : $t.identity), { traits: i(i({}, ((Wt = (qt = Y.evaluationContext) === null || qt === void 0 ? void 0 : qt.identity) === null || Wt === void 0 ? void 0 : Wt.traits) || {}), Je || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", Y))), Fe ? (Rt = !ae && (!this.cacheOptions.skipAPI || Oe), this._onChange(null, { isFromServer: !1, flagsChanged: be, traitsChanged: Te }, this._loadedState(null, a.CACHE, Rt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Fe && !Oe && this.log("Skipping API, using cache"), Rt && this.getFlags(), [3, 4]) : [3, 2];
450
450
  case 2:
451
451
  return ae ? [3, 4] : [4, this.getFlags()];
452
452
  case 3:
@@ -515,7 +515,7 @@ var $n = { exports: {} };
515
515
  }, y.prototype.identify = function(f, h, m) {
516
516
  return this.evaluationContext.identity = { identifier: f, transient: m, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == f ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = f, this.log("Identify: " + this.evaluationContext.identity.identifier), h && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(h).map(function(g) {
517
517
  var S = g[0], x = g[1];
518
- return [S, v(x) ? x : { value: x }];
518
+ return [S, b(x) ? x : { value: x }];
519
519
  }))), this.initialised ? this.getFlags() : Promise.resolve();
520
520
  }, y.prototype.getState = function() {
521
521
  return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
@@ -730,7 +730,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
730
730
  }, n.default = $, Object.defineProperty(n, "__esModule", { value: !0 });
731
731
  });
732
732
  })($n, $n.exports);
733
- var qn = {}, bi = function(t, e, n, s, i) {
733
+ var qn = {}, vi = function(t, e, n, s, i) {
734
734
  var r = new Worker(qn[e] || (qn[e] = URL.createObjectURL(new Blob([
735
735
  t + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'
736
736
  ], { type: "text/javascript" }))));
@@ -880,7 +880,7 @@ var Ls = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
880
880
  if (s.code = t, Error.captureStackTrace && Error.captureStackTrace(s, Ps), !n)
881
881
  throw s;
882
882
  return s;
883
- }, be = function(t, e, n) {
883
+ }, ve = function(t, e, n) {
884
884
  n <<= e & 7;
885
885
  var s = e / 8 | 0;
886
886
  t[s] |= n, t[s + 1] |= n >> 8;
@@ -906,29 +906,29 @@ var Ls = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
906
906
  l = n[n[u].f < n[d].f ? u++ : d++], c = n[u != a && n[u].f < n[d].f ? u++ : d++], n[a++] = { s: -1, f: l.f + c.f, l, r: c };
907
907
  for (var p = r[0].s, s = 1; s < i; ++s)
908
908
  r[s].s > p && (p = r[s].s);
909
- var v = new re(p + 1), w = pt(n[a - 1], v, 0);
909
+ var b = new re(p + 1), w = pt(n[a - 1], b, 0);
910
910
  if (w > e) {
911
- var s = 0, b = 0, T = w - e, N = 1 << T;
911
+ var s = 0, v = 0, T = w - e, N = 1 << T;
912
912
  for (r.sort(function(R, L) {
913
- return v[L.s] - v[R.s] || R.f - L.f;
913
+ return b[L.s] - b[R.s] || R.f - L.f;
914
914
  }); s < i; ++s) {
915
915
  var M = r[s].s;
916
- if (v[M] > e)
917
- b += N - (1 << w - v[M]), v[M] = e;
916
+ if (b[M] > e)
917
+ v += N - (1 << w - b[M]), b[M] = e;
918
918
  else
919
919
  break;
920
920
  }
921
- for (b >>= T; b > 0; ) {
921
+ for (v >>= T; v > 0; ) {
922
922
  var D = r[s].s;
923
- v[D] < e ? b -= 1 << e - v[D]++ - 1 : ++s;
923
+ b[D] < e ? v -= 1 << e - b[D]++ - 1 : ++s;
924
924
  }
925
- for (; s >= 0 && b; --s) {
925
+ for (; s >= 0 && v; --s) {
926
926
  var k = r[s].s;
927
- v[k] == e && (--v[k], ++b);
927
+ b[k] == e && (--b[k], ++v);
928
928
  }
929
929
  w = e;
930
930
  }
931
- return { t: new de(v), l: w };
931
+ return { t: new de(b), l: w };
932
932
  }, pt = function(t, e, n) {
933
933
  return t.s == -1 ? Math.max(pt(t.l, e, n + 1), pt(t.r, e, n + 1)) : e[t.s] = n;
934
934
  }, ln = function(t) {
@@ -965,28 +965,28 @@ var Ls = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
965
965
  t[i + r + 4] = n[r];
966
966
  return (i + 4 + s) * 8;
967
967
  }, un = function(t, e, n, s, i, r, o, l, c, u, a) {
968
- be(e, a++, n), ++i[256];
969
- for (var d = ct(i, 15), p = d.t, v = d.l, w = ct(r, 15), b = w.t, T = w.l, N = ln(p), M = N.c, D = N.n, k = ln(b), _ = k.c, R = k.n, L = new re(19), I = 0; I < M.length; ++I)
968
+ ve(e, a++, n), ++i[256];
969
+ for (var d = ct(i, 15), p = d.t, b = d.l, w = ct(r, 15), v = w.t, T = w.l, N = ln(p), M = N.c, D = N.n, k = ln(v), _ = k.c, R = k.n, L = new re(19), I = 0; I < M.length; ++I)
970
970
  ++L[M[I] & 31];
971
971
  for (var I = 0; I < _.length; ++I)
972
972
  ++L[_[I] & 31];
973
973
  for (var E = ct(L, 7), P = E.t, U = E.l, j = 19; j > 4 && !P[an[j - 1]]; --j)
974
974
  ;
975
- var z = u + 5 << 3, C = Ue(i, Ne) + Ue(r, tt) + o, F = Ue(i, p) + Ue(r, b) + o + 14 + 3 * j + Ue(L, P) + 2 * L[16] + 3 * L[17] + 7 * L[18];
975
+ var z = u + 5 << 3, C = Ue(i, Ne) + Ue(r, tt) + o, F = Ue(i, p) + Ue(r, v) + o + 14 + 3 * j + Ue(L, P) + 2 * L[16] + 3 * L[17] + 7 * L[18];
976
976
  if (c >= 0 && z <= C && z <= F)
977
977
  return En(e, a, t.subarray(c, c + u));
978
978
  var V, K, $, y;
979
- if (be(e, a, 1 + (F < C)), a += 2, F < C) {
980
- V = qe(p, v, 0), K = p, $ = qe(b, T, 0), y = b;
979
+ if (ve(e, a, 1 + (F < C)), a += 2, F < C) {
980
+ V = qe(p, b, 0), K = p, $ = qe(v, T, 0), y = v;
981
981
  var f = qe(P, U, 0);
982
- be(e, a, D - 257), be(e, a + 5, R - 1), be(e, a + 10, j - 4), a += 14;
982
+ ve(e, a, D - 257), ve(e, a + 5, R - 1), ve(e, a + 10, j - 4), a += 14;
983
983
  for (var I = 0; I < j; ++I)
984
- be(e, a + 3 * I, P[an[I]]);
984
+ ve(e, a + 3 * I, P[an[I]]);
985
985
  a += 3 * j;
986
986
  for (var h = [M, _], m = 0; m < 2; ++m)
987
987
  for (var g = h[m], I = 0; I < g.length; ++I) {
988
988
  var S = g[I] & 31;
989
- be(e, a, f[S]), a += P[S], S > 15 && (be(e, a, g[I] >> 5 & 127), a += g[I] >> 12);
989
+ ve(e, a, f[S]), a += P[S], S > 15 && (ve(e, a, g[I] >> 5 & 127), a += g[I] >> 12);
990
990
  }
991
991
  } else
992
992
  V = Ls, K = Ne, $ = Ms, y = tt;
@@ -994,7 +994,7 @@ var Ls = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
994
994
  var x = s[I];
995
995
  if (x > 255) {
996
996
  var S = x >> 18 & 31;
997
- ze(e, a, V[S + 257]), a += K[S + 257], S > 7 && (be(e, a, x >> 23 & 31), a += kt[S]);
997
+ ze(e, a, V[S + 257]), a += K[S + 257], S > 7 && (ve(e, a, x >> 23 & 31), a += kt[S]);
998
998
  var A = x & 31;
999
999
  ze(e, a, $[A]), a += y[A], A > 3 && (ze(e, a, x >> 5 & 8191), a += Tt[A]);
1000
1000
  } else
@@ -1005,11 +1005,11 @@ var Ls = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
1005
1005
  var o = r.z || t.length, l = new de(s + o + 5 * (1 + Math.ceil(o / 7e3)) + i), c = l.subarray(s, l.length - i), u = r.l, a = (r.r || 0) & 7;
1006
1006
  if (e) {
1007
1007
  a && (c[0] = r.r >> 3);
1008
- for (var d = Bs[e - 1], p = d >> 13, v = d & 8191, w = (1 << n) - 1, b = r.p || new re(32768), T = r.h || new re(w + 1), N = Math.ceil(n / 3), M = 2 * N, D = function(ne) {
1008
+ for (var d = Bs[e - 1], p = d >> 13, b = d & 8191, w = (1 << n) - 1, v = r.p || new re(32768), T = r.h || new re(w + 1), N = Math.ceil(n / 3), M = 2 * N, D = function(ne) {
1009
1009
  return (t[ne] ^ t[ne + 1] << N ^ t[ne + 2] << M) & w;
1010
1010
  }, k = new xt(25e3), _ = new re(288), R = new re(32), L = 0, I = 0, E = r.i || 0, P = 0, U = r.w || 0, j = 0; E + 2 < o; ++E) {
1011
1011
  var z = D(E), C = E & 32767, F = T[z];
1012
- if (b[C] = F, T[z] = C, U <= E) {
1012
+ if (v[C] = F, T[z] = C, U <= E) {
1013
1013
  var V = o - E;
1014
1014
  if ((L > 7e3 || P > 24576) && (V > 423 || !u)) {
1015
1015
  a = un(t, c, 0, k, _, R, I, P, j, E - j, a), P = L = I = 0, j = E;
@@ -1018,7 +1018,7 @@ var Ls = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
1018
1018
  for (var K = 0; K < 30; ++K)
1019
1019
  R[K] = 0;
1020
1020
  }
1021
- var $ = 2, y = 0, f = v, h = C - F & 32767;
1021
+ var $ = 2, y = 0, f = b, h = C - F & 32767;
1022
1022
  if (V > 2 && z == D(E - h))
1023
1023
  for (var m = Math.min(p, V) - 1, g = Math.min(32767, E), S = Math.min(258, V); h <= g && --f && C != F; ) {
1024
1024
  if (t[E + $] == t[E + $ - h]) {
@@ -1028,12 +1028,12 @@ var Ls = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
1028
1028
  if ($ = x, y = h, x > m)
1029
1029
  break;
1030
1030
  for (var A = Math.min(h, x - 2), B = 0, K = 0; K < A; ++K) {
1031
- var q = E - h + K & 32767, O = b[q], W = q - O & 32767;
1031
+ var q = E - h + K & 32767, O = v[q], W = q - O & 32767;
1032
1032
  W > B && (B = W, F = q);
1033
1033
  }
1034
1034
  }
1035
1035
  }
1036
- C = F, F = b[C], h += C - F & 32767;
1036
+ C = F, F = v[C], h += C - F & 32767;
1037
1037
  }
1038
1038
  if (y) {
1039
1039
  k[P++] = 268435456 | dt[$] << 18 | cn[y];
@@ -1045,7 +1045,7 @@ var Ls = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
1045
1045
  }
1046
1046
  for (E = Math.max(E, U); E < o; ++E)
1047
1047
  k[P++] = t[E], ++_[t[E]];
1048
- a = un(t, c, u, k, _, R, I, P, j, E - j, a), u || (r.r = a & 7 | c[a / 8 | 0] << 3, a -= 7, r.h = T, r.p = b, r.i = E, r.w = U);
1048
+ a = un(t, c, u, k, _, R, I, P, j, E - j, a), u || (r.r = a & 7 | c[a / 8 | 0] << 3, a -= 7, r.h = T, r.p = v, r.i = E, r.w = U);
1049
1049
  } else {
1050
1050
  for (var E = r.w || 0; E < o + u; E += 65535) {
1051
1051
  var te = E + 65535;
@@ -1119,9 +1119,9 @@ var Ls = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
1119
1119
  nt[n] = { c: Wn(t[o], i, r), e: r };
1120
1120
  }
1121
1121
  var c = xi({}, nt[n].e);
1122
- return bi(nt[n].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", n, c, ki(c), s);
1122
+ return vi(nt[n].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", n, c, ki(c), s);
1123
1123
  }, Ei = function() {
1124
- return [de, re, xt, kt, Tt, an, dt, cn, Ls, Ne, Ms, tt, ft, Bs, In, qe, be, ze, ct, pt, ln, Ue, En, un, Tn, Fs, js, Cn, _i, Hs];
1124
+ return [de, re, xt, kt, Tt, an, dt, cn, Ls, Ne, Ms, tt, ft, Bs, In, qe, ve, ze, ct, pt, ln, Ue, En, un, Tn, Fs, js, Cn, _i, Hs];
1125
1125
  }, Ii = function() {
1126
1126
  return [$s, qs, gt, Us, zs];
1127
1127
  }, Hs = function(t) {
@@ -1948,7 +1948,7 @@ function pn(t, e, n, s) {
1948
1948
  s
1949
1949
  ];
1950
1950
  }
1951
- function vt(t, e, n, s, i, r, o, l, c) {
1951
+ function bt(t, e, n, s, i, r, o, l, c) {
1952
1952
  return [
1953
1953
  83,
1954
1954
  t,
@@ -1973,7 +1973,7 @@ function mr(t, e, n, s, i, r) {
1973
1973
  r
1974
1974
  ];
1975
1975
  }
1976
- function vr(t, e, n, s, i, r) {
1976
+ function br(t, e, n, s, i, r) {
1977
1977
  return [
1978
1978
  112,
1979
1979
  t,
@@ -1992,7 +1992,7 @@ function ss(t, e, n) {
1992
1992
  n
1993
1993
  ];
1994
1994
  }
1995
- function br(t) {
1995
+ function vr(t) {
1996
1996
  return [
1997
1997
  114,
1998
1998
  t
@@ -2493,7 +2493,7 @@ function H(t, e, n, s, i) {
2493
2493
  const r = document.createElement(t);
2494
2494
  return r.className = e, Object.assign(r.style, n), s && (r.textContent = s), i && (r.id = i), r;
2495
2495
  }
2496
- const ut = "or_uxt_test_start", mn = "or_uxt_task_index", vn = "or_uxt_session_id", qr = "or_uxt_test_id";
2496
+ const ut = "or_uxt_test_start", mn = "or_uxt_task_index", bn = "or_uxt_session_id", qr = "or_uxt_test_id";
2497
2497
  class Wr {
2498
2498
  constructor(e, n, s, i, r, o, l, c, u) {
2499
2499
  this.ingestPoint = e, this.getTimestamp = n, this.token = s, this.testId = i, this.storageKey = r, this.setStorageKey = o, this.removeStorageKey = l, this.getStorageKey = c, this.getSessionId = u, this.durations = {
@@ -2501,10 +2501,10 @@ class Wr {
2501
2501
  tasks: []
2502
2502
  }, this.getDurations = () => this.durations, this.setDurations = (d) => {
2503
2503
  this.durations.testStart = d.testStart, this.durations.tasks = d.tasks;
2504
- }, this.signalTask = (d, p, v) => {
2504
+ }, this.signalTask = (d, p, b) => {
2505
2505
  if (!d)
2506
2506
  return console.error("User Testing: No Task ID Given");
2507
- const w = this.durations.tasks.find((N) => N.taskId === d), b = this.getTimestamp(), T = w ? b - w.started : 0;
2507
+ const w = this.durations.tasks.find((N) => N.taskId === d), v = this.getTimestamp(), T = w ? v - w.started : 0;
2508
2508
  return fetch(`${this.ingestPoint}/v1/web/uxt/signals/task`, {
2509
2509
  method: "POST",
2510
2510
  headers: {
@@ -2516,18 +2516,18 @@ class Wr {
2516
2516
  taskId: d,
2517
2517
  status: p,
2518
2518
  duration: T,
2519
- timestamp: b,
2520
- taskAnswer: v
2519
+ timestamp: v,
2520
+ taskAnswer: b
2521
2521
  })
2522
2522
  });
2523
2523
  }, this.signalTest = (d) => {
2524
2524
  const p = this.getTimestamp();
2525
2525
  if (d === "begin" && this.testId) {
2526
- const b = this.getSessionId();
2527
- this.setStorageKey(vn, b), this.setStorageKey(this.storageKey, this.testId.toString()), this.setStorageKey(ut, p.toString());
2526
+ const v = this.getSessionId();
2527
+ this.setStorageKey(bn, v), this.setStorageKey(this.storageKey, this.testId.toString()), this.setStorageKey(ut, p.toString());
2528
2528
  } else
2529
2529
  this.removeStorageKey(this.storageKey), this.removeStorageKey(mn), this.removeStorageKey(ut);
2530
- const v = this.durations.testStart || p, w = p - v;
2530
+ const b = this.durations.testStart || p, w = p - b;
2531
2531
  return fetch(`${this.ingestPoint}/v1/web/uxt/signals/test`, {
2532
2532
  method: "POST",
2533
2533
  headers: {
@@ -2562,8 +2562,8 @@ class Vr {
2562
2562
  });
2563
2563
  }, this.hideTaskSection = () => !1, this.showTaskSection = () => !0, this.collapseWidget = () => !1, this.removeGreeting = () => !1, this.toggleDescriptionVisibility = () => {
2564
2564
  }, this.currentTaskIndex = 0, this.userRecorder = new Br(e);
2565
- const s = this.app.getSessionID(), i = this.app.localStorage.getItem(vn);
2566
- s !== i && (this.app.localStorage.removeItem(this.storageKey), this.app.localStorage.removeItem(vn), this.app.localStorage.removeItem(qr), this.app.localStorage.removeItem(mn), this.app.localStorage.removeItem(ut));
2565
+ const s = this.app.getSessionID(), i = this.app.localStorage.getItem(bn);
2566
+ s !== i && (this.app.localStorage.removeItem(this.storageKey), this.app.localStorage.removeItem(bn), this.app.localStorage.removeItem(qr), this.app.localStorage.removeItem(mn), this.app.localStorage.removeItem(ut));
2567
2567
  const r = this.app.localStorage.getItem(mn);
2568
2568
  r && (this.currentTaskIndex = parseInt(r, 10));
2569
2569
  }
@@ -2647,11 +2647,11 @@ class Vr {
2647
2647
  }, c.onclick = () => {
2648
2648
  var a, d, p;
2649
2649
  if (u(), this.test) {
2650
- const v = (a = this.signalManager) == null ? void 0 : a.getDurations(), w = v ? v.tasks.findIndex((b) => this.test && b.taskId === this.test.tasks[0].task_id) : null;
2651
- v && w === -1 && (v.tasks.push({
2650
+ const b = (a = this.signalManager) == null ? void 0 : a.getDurations(), w = b ? b.tasks.findIndex((v) => this.test && v.taskId === this.test.tasks[0].task_id) : null;
2651
+ b && w === -1 && (b.tasks.push({
2652
2652
  taskId: this.test.tasks[0].task_id,
2653
2653
  started: this.app.timestamp()
2654
- }), (d = this.signalManager) == null || d.setDurations(v)), (p = this.signalManager) == null || p.signalTask(this.test.tasks[0].task_id, "begin");
2654
+ }), (d = this.signalManager) == null || d.setDurations(b)), (p = this.signalManager) == null || p.signalTask(this.test.tasks[0].task_id, "begin");
2655
2655
  }
2656
2656
  this.showTaskSection(), o.removeChild(c);
2657
2657
  }, n;
@@ -2664,12 +2664,12 @@ class Vr {
2664
2664
  lineHeight: "auto"
2665
2665
  }, "Tasks"), r = H("div", "icon", os, "-"), o = H("div", "content", Be), l = H("div", "pagination", Dr), c = H("div", "taskCard", us), u = H("div", "taskText", hs), a = H("div", "taskDescription", Lr), d = H("div", "taskButtons", Fr), p = H("div", "taskText", hs);
2666
2666
  p.textContent = "Your answer";
2667
- const v = H("textarea", "taskDescription", {
2667
+ const b = H("textarea", "taskDescription", {
2668
2668
  resize: "vertical"
2669
2669
  }), w = H("div", "inputArea", us);
2670
- w.append(p, v);
2671
- const b = H("div", "closePanelButton", Zs, "Collapse Panel"), T = H("div", "nextButton", Mr, "Done, Next");
2672
- s.append(i, r), c.append(u, a), d.append(b, T), o.append(l, c, w, d), n.append(s, o);
2670
+ w.append(p, b);
2671
+ const v = H("div", "closePanelButton", Zs, "Collapse Panel"), T = H("div", "nextButton", Mr, "Done, Next");
2672
+ s.append(i, r), c.append(u, a), d.append(v, T), o.append(l, c, w, d), n.append(s, o);
2673
2673
  const N = () => {
2674
2674
  const k = e[this.currentTaskIndex];
2675
2675
  u.textContent = k.title, a.textContent = k.description, k.allow_typing ? w.style.display = "flex" : w.style.display = "none";
@@ -2702,10 +2702,10 @@ class Vr {
2702
2702
  R && Object.assign(R.style, Ar);
2703
2703
  }
2704
2704
  };
2705
- return s.onclick = M, b.onclick = this.collapseWidget, T.onclick = () => {
2705
+ return s.onclick = M, v.onclick = this.collapseWidget, T.onclick = () => {
2706
2706
  var _, R, L, I;
2707
- const k = e[this.currentTaskIndex].allow_typing ? v.value : void 0;
2708
- if (v.value = "", (_ = this.signalManager) == null || _.signalTask(e[this.currentTaskIndex].task_id, "done", k), this.currentTaskIndex < e.length - 1) {
2707
+ const k = e[this.currentTaskIndex].allow_typing ? b.value : void 0;
2708
+ if (b.value = "", (_ = this.signalManager) == null || _.signalTask(e[this.currentTaskIndex].task_id, "done", k), this.currentTaskIndex < e.length - 1) {
2709
2709
  this.currentTaskIndex++, N();
2710
2710
  const E = (R = this.signalManager) == null ? void 0 : R.getDurations();
2711
2711
  E && E.tasks.findIndex((P) => P.taskId === e[this.currentTaskIndex].task_id) === -1 && (E.tasks.push({
@@ -2742,7 +2742,7 @@ We appreciate your time and valuable input.`), r = H("div", "end_button_or", as,
2742
2742
  function ei(t) {
2743
2743
  return !!t && t.nodeType != null;
2744
2744
  }
2745
- function bn(t) {
2745
+ function vn(t) {
2746
2746
  return t.namespaceURI === "http://www.w3.org/2000/svg";
2747
2747
  }
2748
2748
  function ke(t) {
@@ -2754,7 +2754,7 @@ function Gr(t) {
2754
2754
  function yn(t) {
2755
2755
  return t.nodeType === Node.TEXT_NODE;
2756
2756
  }
2757
- function bt(t) {
2757
+ function vt(t) {
2758
2758
  return t.nodeType === Node.DOCUMENT_NODE;
2759
2759
  }
2760
2760
  function Et(t) {
@@ -2989,7 +2989,7 @@ class Rn {
2989
2989
  this.commited.length = 0, this.recents.clear(), this.indexes.length = 1, this.attributesMap.clear(), this.textSet.clear();
2990
2990
  }
2991
2991
  sendNodeAttribute(e, n, s, i) {
2992
- if (bn(n)) {
2992
+ if (vn(n)) {
2993
2993
  s.substr(0, 6) === "xlink:" && (s = s.substr(6)), i === null ? this.app.send(Yn(e, s)) : s === "href" ? (i.length > 1e5 && (i = ""), this.app.send(hn(e, s, i, this.app.getBaseHref()))) : this.app.attributeSender.sendSetAttribute(e, s, i);
2994
2994
  return;
2995
2995
  }
@@ -3090,7 +3090,7 @@ class Rn {
3090
3090
  const d = a.clientWidth, p = a.clientHeight;
3091
3091
  a = n.cloneNode(), a.style.width = `${d}px`, a.style.height = `${p}px`;
3092
3092
  }
3093
- this.app.send(Gi(e, i, c, a.tagName, bn(n)));
3093
+ this.app.send(Gi(e, i, c, a.tagName, vn(n)));
3094
3094
  }
3095
3095
  for (let d = 0; d < a.attributes.length; d++) {
3096
3096
  const p = a.attributes[d];
@@ -3521,11 +3521,11 @@ let lo = class {
3521
3521
  const u = (a) => {
3522
3522
  const { data: d } = a;
3523
3523
  if (d.line === ue.iframeSignal) {
3524
- const p = d.domain, v = Array.from(document.querySelectorAll("iframe"));
3525
- this.pageFrames = v, (async () => {
3526
- let b = 0;
3527
- for (; b < 10; ) {
3528
- const T = this.checkNodeId(v, p);
3524
+ const p = d.domain, b = Array.from(document.querySelectorAll("iframe"));
3525
+ this.pageFrames = b, (async () => {
3526
+ let v = 0;
3527
+ for (; v < 10; ) {
3528
+ const T = this.checkNodeId(b, p);
3529
3529
  if (T) {
3530
3530
  this.waitStarted().then(() => {
3531
3531
  var D;
@@ -3539,30 +3539,30 @@ let lo = class {
3539
3539
  frameOrderNumber: c
3540
3540
  };
3541
3541
  this.debug.log("iframe_data", M), (D = a.source) == null || D.postMessage(M, "*");
3542
- }).catch(console.error), b = 10;
3542
+ }).catch(console.error), v = 10;
3543
3543
  break;
3544
3544
  }
3545
- b++, await co(100);
3545
+ v++, await co(100);
3546
3546
  }
3547
3547
  })();
3548
3548
  }
3549
3549
  if (d.line === ue.iframeBatch) {
3550
- const v = d.messages.map((w) => {
3550
+ const b = d.messages.map((w) => {
3551
3551
  if (w[0] === 20) {
3552
- let b = w;
3552
+ let v = w;
3553
3553
  return this.pageFrames.forEach((T) => {
3554
3554
  if (T.dataset.domain === a.data.domain) {
3555
3555
  const [N, M, D] = w, { left: k, top: _ } = T.getBoundingClientRect();
3556
- b = [N, M + k, D + _];
3556
+ v = [N, M + k, D + _];
3557
3557
  }
3558
- }), b;
3558
+ }), v;
3559
3559
  }
3560
3560
  if (w[0] === 68) {
3561
- let b = w;
3561
+ let v = w;
3562
3562
  return this.pageFrames.forEach((T) => {
3563
3563
  if (T.dataset.domain === a.data.domain) {
3564
3564
  const [N, M, D, k, _, R, L] = w, { left: I, top: E, width: P, height: U } = T.getBoundingClientRect(), j = document.documentElement.scrollWidth, z = document.documentElement.scrollHeight, C = R / 100 * P + I, F = L / 100 * U + E, V = C / j, K = F / z;
3565
- b = [
3565
+ v = [
3566
3566
  N,
3567
3567
  M,
3568
3568
  D,
@@ -3572,11 +3572,11 @@ let lo = class {
3572
3572
  Math.round(K * 1e3) / 10
3573
3573
  ];
3574
3574
  }
3575
- }), b;
3575
+ }), v;
3576
3576
  }
3577
3577
  return w;
3578
3578
  });
3579
- this.messages.push(...v);
3579
+ this.messages.push(...b);
3580
3580
  }
3581
3581
  };
3582
3582
  window.addEventListener("message", u), this.attachStopCallback(() => {
@@ -3837,7 +3837,7 @@ let lo = class {
3837
3837
  }, 30 * s), r();
3838
3838
  }
3839
3839
  async setupConditionalStart(e) {
3840
- var p, v;
3840
+ var p, b;
3841
3841
  this.conditionsManager = new Ai(this, e);
3842
3842
  const n = await fetch(this.options.ingestPoint + "/v1/web/start", {
3843
3843
  method: "POST",
@@ -3878,7 +3878,7 @@ let lo = class {
3878
3878
  userState: u
3879
3879
  });
3880
3880
  const d = { sessionToken: s, userUUID: "", sessionID: "" };
3881
- this.startCallbacks.forEach((w) => w(d)), await ((p = this.conditionsManager) == null ? void 0 : p.fetchConditions(a, s)), await this.featureFlags.reloadFlags(s), await this.tagWatcher.fetchTags(this.options.ingestPoint, s), (v = this.conditionsManager) == null || v.processFlags(this.featureFlags.flags);
3881
+ this.startCallbacks.forEach((w) => w(d)), await ((p = this.conditionsManager) == null ? void 0 : p.fetchConditions(a, s)), await this.featureFlags.reloadFlags(s), await this.tagWatcher.fetchTags(this.options.ingestPoint, s), (b = this.conditionsManager) == null || b.processFlags(this.featureFlags.flags);
3882
3882
  }
3883
3883
  /**
3884
3884
  * Starts offline session recording
@@ -3935,7 +3935,7 @@ let lo = class {
3935
3935
  * @reject {string} - error message
3936
3936
  * */
3937
3937
  async uploadOfflineRecording() {
3938
- var p, v;
3938
+ var p, b;
3939
3939
  this.stop(!1);
3940
3940
  const e = pe();
3941
3941
  (p = this.worker) == null || p.postMessage({
@@ -3965,7 +3965,7 @@ let lo = class {
3965
3965
  timezone: tn()
3966
3966
  })
3967
3967
  }), { token: s, userBrowser: i, userCity: r, userCountry: o, userDevice: l, userOS: c, userState: u, beaconSizeLimit: a, projectID: d } = await n.json();
3968
- for ((v = this.worker) == null || v.postMessage({
3968
+ for ((b = this.worker) == null || b.postMessage({
3969
3969
  type: "auth",
3970
3970
  token: s,
3971
3971
  beaconSizeLimit: a
@@ -4041,11 +4041,11 @@ let lo = class {
4041
4041
  userUUID: a,
4042
4042
  projectID: d,
4043
4043
  beaconSizeLimit: p,
4044
- compressionThreshold: v,
4044
+ compressionThreshold: b,
4045
4045
  // how big the batch should be before we decide to compress it
4046
4046
  delay: w,
4047
4047
  // derived from token
4048
- sessionID: b,
4048
+ sessionID: v,
4049
4049
  // derived from token
4050
4050
  startTimestamp: T,
4051
4051
  // real startTS (server time), derived from sessionID
@@ -4060,7 +4060,7 @@ let lo = class {
4060
4060
  canvasFPS: E,
4061
4061
  assistOnly: P
4062
4062
  } = await c.json();
4063
- if (typeof u != "string" || typeof a != "string" || typeof T != "number" && typeof T < "u" || typeof b != "string" || typeof w != "number" || typeof p != "number" && typeof p < "u") {
4063
+ if (typeof u != "string" || typeof a != "string" || typeof T != "number" && typeof T < "u" || typeof v != "string" || typeof w != "number" || typeof p != "number" && typeof p < "u") {
4064
4064
  const C = `Incorrect server response: ${JSON.stringify(c)}`;
4065
4065
  return this.signalError(C, []), Ce(C);
4066
4066
  }
@@ -4072,15 +4072,15 @@ let lo = class {
4072
4072
  userOS: _,
4073
4073
  userState: R
4074
4074
  }), this.session.assign({
4075
- sessionID: b,
4075
+ sessionID: v,
4076
4076
  timestamp: T || r,
4077
4077
  projectID: d
4078
4078
  }), P ? (this.socketMode = !0, this.worker.postMessage("stop")) : this.worker.postMessage({
4079
4079
  type: "auth",
4080
4080
  token: u,
4081
4081
  beaconSizeLimit: p
4082
- }), !l && u === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(lt(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([C, F]) => this.send(Qn(C, F))), this.localStorage.setItem(this.options.local_uuid_key, a), this.compressionThreshold = v;
4083
- const U = { sessionToken: u, userUUID: a, sessionID: b };
4082
+ }), !l && u === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(lt(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([C, F]) => this.send(Qn(C, F))), this.localStorage.setItem(this.options.local_uuid_key, a), this.compressionThreshold = b;
4083
+ const U = { sessionToken: u, userUUID: a, sessionID: v };
4084
4084
  if (this.startCallbacks.forEach((C) => C(U)), this.featureFlags.reloadFlags(), await this.tagWatcher.fetchTags(this.options.ingestPoint, u), this.activityState = Q.Active, L && !this.options.canvas.disableCanvas && (this.canvasRecorder = this.canvasRecorder ?? new Kr(this, {
4085
4085
  fps: E,
4086
4086
  quality: I,
@@ -4243,10 +4243,10 @@ function po(t) {
4243
4243
  }
4244
4244
  })), t.map(ms).join(" ");
4245
4245
  }
4246
- const vs = ["log", "info", "warn", "error", "debug", "assert"];
4246
+ const bs = ["log", "info", "warn", "error", "debug", "assert"];
4247
4247
  function go(t, e) {
4248
4248
  const n = Object.assign({
4249
- consoleMethods: vs,
4249
+ consoleMethods: bs,
4250
4250
  consoleThrottling: 30
4251
4251
  }, e);
4252
4252
  if (!Array.isArray(n.consoleMethods) || n.consoleMethods.length === 0)
@@ -4259,12 +4259,12 @@ function go(t, e) {
4259
4259
  t.attachStartCallback(r), t.ticker.attach(r, 33, !1);
4260
4260
  const o = (c, u) => {
4261
4261
  const a = {
4262
- apply: function(d, p, v) {
4263
- Reflect.apply(d, u, v), i = i + 1, !(i > n.consoleThrottling) && s(d.name, v);
4262
+ apply: function(d, p, b) {
4263
+ Reflect.apply(d, u, b), i = i + 1, !(i > n.consoleThrottling) && s(d.name, b);
4264
4264
  }
4265
4265
  };
4266
4266
  n.consoleMethods.forEach((d) => {
4267
- if (vs.indexOf(d) === -1) {
4267
+ if (bs.indexOf(d) === -1) {
4268
4268
  t.debug.error(`OpenReplay: unsupported console method "${d}"`);
4269
4269
  return;
4270
4270
  }
@@ -4274,52 +4274,52 @@ function go(t, e) {
4274
4274
  }, l = t.safe((c) => o(c.console, c));
4275
4275
  l(window), t.observer.attachContextCallback(l);
4276
4276
  }
4277
- var si = { exports: {} }, nn = { exports: {} }, bs;
4277
+ var si = { exports: {} }, nn = { exports: {} }, vs;
4278
4278
  function mo() {
4279
- return bs || (bs = 1, function(t, e) {
4279
+ return vs || (vs = 1, function(t, e) {
4280
4280
  (function(n, s) {
4281
4281
  t.exports = s();
4282
4282
  })($e, function() {
4283
- function n(b) {
4284
- return !isNaN(parseFloat(b)) && isFinite(b);
4283
+ function n(v) {
4284
+ return !isNaN(parseFloat(v)) && isFinite(v);
4285
4285
  }
4286
- function s(b) {
4287
- return b.charAt(0).toUpperCase() + b.substring(1);
4286
+ function s(v) {
4287
+ return v.charAt(0).toUpperCase() + v.substring(1);
4288
4288
  }
4289
- function i(b) {
4289
+ function i(v) {
4290
4290
  return function() {
4291
- return this[b];
4291
+ return this[v];
4292
4292
  };
4293
4293
  }
4294
4294
  var r = ["isConstructor", "isEval", "isNative", "isToplevel"], o = ["columnNumber", "lineNumber"], l = ["fileName", "functionName", "source"], c = ["args"], u = ["evalOrigin"], a = r.concat(o, l, c, u);
4295
- function d(b) {
4296
- if (b)
4295
+ function d(v) {
4296
+ if (v)
4297
4297
  for (var T = 0; T < a.length; T++)
4298
- b[a[T]] !== void 0 && this["set" + s(a[T])](b[a[T]]);
4298
+ v[a[T]] !== void 0 && this["set" + s(a[T])](v[a[T]]);
4299
4299
  }
4300
4300
  d.prototype = {
4301
4301
  getArgs: function() {
4302
4302
  return this.args;
4303
4303
  },
4304
- setArgs: function(b) {
4305
- if (Object.prototype.toString.call(b) !== "[object Array]")
4304
+ setArgs: function(v) {
4305
+ if (Object.prototype.toString.call(v) !== "[object Array]")
4306
4306
  throw new TypeError("Args must be an Array");
4307
- this.args = b;
4307
+ this.args = v;
4308
4308
  },
4309
4309
  getEvalOrigin: function() {
4310
4310
  return this.evalOrigin;
4311
4311
  },
4312
- setEvalOrigin: function(b) {
4313
- if (b instanceof d)
4314
- this.evalOrigin = b;
4315
- else if (b instanceof Object)
4316
- this.evalOrigin = new d(b);
4312
+ setEvalOrigin: function(v) {
4313
+ if (v instanceof d)
4314
+ this.evalOrigin = v;
4315
+ else if (v instanceof Object)
4316
+ this.evalOrigin = new d(v);
4317
4317
  else
4318
4318
  throw new TypeError("Eval Origin must be an Object or StackFrame");
4319
4319
  },
4320
4320
  toString: function() {
4321
- var b = this.getFileName() || "", T = this.getLineNumber() || "", N = this.getColumnNumber() || "", M = this.getFunctionName() || "";
4322
- return this.getIsEval() ? b ? "[eval] (" + b + ":" + T + ":" + N + ")" : "[eval]:" + T + ":" + N : M ? M + " (" + b + ":" + T + ":" + N + ")" : b + ":" + T + ":" + N;
4321
+ var v = this.getFileName() || "", T = this.getLineNumber() || "", N = this.getColumnNumber() || "", M = this.getFunctionName() || "";
4322
+ return this.getIsEval() ? v ? "[eval] (" + v + ":" + T + ":" + N + ")" : "[eval]:" + T + ":" + N : M ? M + " (" + v + ":" + T + ":" + N + ")" : v + ":" + T + ":" + N;
4323
4323
  }
4324
4324
  }, d.fromString = function(T) {
4325
4325
  var N = T.indexOf("("), M = T.lastIndexOf(")"), D = T.substring(0, N), k = T.substring(N + 1, M).split(","), _ = T.substring(M + 1);
@@ -4334,23 +4334,23 @@ function mo() {
4334
4334
  });
4335
4335
  };
4336
4336
  for (var p = 0; p < r.length; p++)
4337
- d.prototype["get" + s(r[p])] = i(r[p]), d.prototype["set" + s(r[p])] = /* @__PURE__ */ function(b) {
4337
+ d.prototype["get" + s(r[p])] = i(r[p]), d.prototype["set" + s(r[p])] = /* @__PURE__ */ function(v) {
4338
4338
  return function(T) {
4339
- this[b] = !!T;
4339
+ this[v] = !!T;
4340
4340
  };
4341
4341
  }(r[p]);
4342
- for (var v = 0; v < o.length; v++)
4343
- d.prototype["get" + s(o[v])] = i(o[v]), d.prototype["set" + s(o[v])] = /* @__PURE__ */ function(b) {
4342
+ for (var b = 0; b < o.length; b++)
4343
+ d.prototype["get" + s(o[b])] = i(o[b]), d.prototype["set" + s(o[b])] = /* @__PURE__ */ function(v) {
4344
4344
  return function(T) {
4345
4345
  if (!n(T))
4346
- throw new TypeError(b + " must be a Number");
4347
- this[b] = Number(T);
4346
+ throw new TypeError(v + " must be a Number");
4347
+ this[v] = Number(T);
4348
4348
  };
4349
- }(o[v]);
4349
+ }(o[b]);
4350
4350
  for (var w = 0; w < l.length; w++)
4351
- d.prototype["get" + s(l[w])] = i(l[w]), d.prototype["set" + s(l[w])] = /* @__PURE__ */ function(b) {
4351
+ d.prototype["get" + s(l[w])] = i(l[w]), d.prototype["set" + s(l[w])] = /* @__PURE__ */ function(v) {
4352
4352
  return function(T) {
4353
- this[b] = String(T);
4353
+ this[v] = String(T);
4354
4354
  };
4355
4355
  }(l[w]);
4356
4356
  return d;
@@ -4394,12 +4394,12 @@ function mo() {
4394
4394
  a.indexOf("(eval ") > -1 && (a = a.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, ""));
4395
4395
  var d = a.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), p = d.match(/ (\(.+\)$)/);
4396
4396
  d = p ? d.replace(p[0], "") : d;
4397
- var v = this.extractLocation(p ? p[1] : d), w = p && d || void 0, b = ["eval", "<anonymous>"].indexOf(v[0]) > -1 ? void 0 : v[0];
4397
+ var b = this.extractLocation(p ? p[1] : d), w = p && d || void 0, v = ["eval", "<anonymous>"].indexOf(b[0]) > -1 ? void 0 : b[0];
4398
4398
  return new s({
4399
4399
  functionName: w,
4400
- fileName: b,
4401
- lineNumber: v[1],
4402
- columnNumber: v[2],
4400
+ fileName: v,
4401
+ lineNumber: b[1],
4402
+ columnNumber: b[2],
4403
4403
  source: a
4404
4404
  });
4405
4405
  }, this);
@@ -4414,9 +4414,9 @@ function mo() {
4414
4414
  return new s({
4415
4415
  functionName: a
4416
4416
  });
4417
- var d = /((.*".+"[^@]*)?[^@]*)(?:@)/, p = a.match(d), v = p && p[1] ? p[1] : void 0, w = this.extractLocation(a.replace(d, ""));
4417
+ var d = /((.*".+"[^@]*)?[^@]*)(?:@)/, p = a.match(d), b = p && p[1] ? p[1] : void 0, w = this.extractLocation(a.replace(d, ""));
4418
4418
  return new s({
4419
- functionName: v,
4419
+ functionName: b,
4420
4420
  fileName: w[0],
4421
4421
  lineNumber: w[1],
4422
4422
  columnNumber: w[2],
@@ -4432,7 +4432,7 @@ function mo() {
4432
4432
  },
4433
4433
  parseOpera9: function(c) {
4434
4434
  for (var u = /Line (\d+).*script (?:in )?(\S+)/i, a = c.message.split(`
4435
- `), d = [], p = 2, v = a.length; p < v; p += 2) {
4435
+ `), d = [], p = 2, b = a.length; p < b; p += 2) {
4436
4436
  var w = u.exec(a[p]);
4437
4437
  w && d.push(new s({
4438
4438
  fileName: w[2],
@@ -4444,7 +4444,7 @@ function mo() {
4444
4444
  },
4445
4445
  parseOpera10: function(c) {
4446
4446
  for (var u = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, a = c.stacktrace.split(`
4447
- `), d = [], p = 0, v = a.length; p < v; p += 2) {
4447
+ `), d = [], p = 0, b = a.length; p < b; p += 2) {
4448
4448
  var w = u.exec(a[p]);
4449
4449
  w && d.push(
4450
4450
  new s({
@@ -4464,9 +4464,9 @@ function mo() {
4464
4464
  return !!a.match(i) && !a.match(/^Error created at/);
4465
4465
  }, this);
4466
4466
  return u.map(function(a) {
4467
- var d = a.split("@"), p = this.extractLocation(d.pop()), v = d.shift() || "", w = v.replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0, b;
4468
- v.match(/\(([^)]*)\)/) && (b = v.replace(/^[^(]+\(([^)]*)\)$/, "$1"));
4469
- var T = b === void 0 || b === "[arguments not available]" ? void 0 : b.split(",");
4467
+ var d = a.split("@"), p = this.extractLocation(d.pop()), b = d.shift() || "", w = b.replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0, v;
4468
+ b.match(/\(([^)]*)\)/) && (v = b.replace(/^[^(]+\(([^)]*)\)$/, "$1"));
4469
+ var T = v === void 0 || v === "[arguments not available]" ? void 0 : v.split(",");
4470
4470
  return new s({
4471
4471
  functionName: w,
4472
4472
  args: T,
@@ -4480,8 +4480,8 @@ function mo() {
4480
4480
  };
4481
4481
  });
4482
4482
  })(si);
4483
- var vo = si.exports;
4484
- const bo = /* @__PURE__ */ vi(vo);
4483
+ var bo = si.exports;
4484
+ const vo = /* @__PURE__ */ bi(bo);
4485
4485
  function ys(t) {
4486
4486
  return [
4487
4487
  {
@@ -4496,7 +4496,7 @@ function ys(t) {
4496
4496
  function wt(t, e, n = {}) {
4497
4497
  let s = e;
4498
4498
  try {
4499
- s = bo.parse(t);
4499
+ s = vo.parse(t);
4500
4500
  } catch {
4501
4501
  }
4502
4502
  return pn(t.name, t.message, JSON.stringify(s), JSON.stringify(n));
@@ -4640,10 +4640,10 @@ function Co(t, e) {
4640
4640
  obscureInputDates: !1
4641
4641
  }, e);
4642
4642
  function s(a, d) {
4643
- let p = d.value, v = n.defaultInputMode;
4644
- d.type === "password" || t.sanitizer.isHidden(a) ? v = je.Hidden : (t.sanitizer.isObscured(a) || v === je.Plain && (n.obscureInputNumbers && d.type !== "date" && /\d\d\d\d/.test(p) || n.obscureInputDates && d.type === "date" || n.obscureInputEmails && (d.type === "email" || ~p.indexOf("@")))) && (v = je.Obscured);
4643
+ let p = d.value, b = n.defaultInputMode;
4644
+ d.type === "password" || t.sanitizer.isHidden(a) ? b = je.Hidden : (t.sanitizer.isObscured(a) || b === je.Plain && (n.obscureInputNumbers && d.type !== "date" && /\d\d\d\d/.test(p) || n.obscureInputDates && d.type === "date" || n.obscureInputEmails && (d.type === "email" || ~p.indexOf("@")))) && (b = je.Obscured);
4645
4645
  let w = 0;
4646
- switch (v) {
4646
+ switch (b) {
4647
4647
  case je.Hidden:
4648
4648
  w = -1, p = "";
4649
4649
  break;
@@ -4654,8 +4654,8 @@ function Co(t, e) {
4654
4654
  return { value: p, mask: w };
4655
4655
  }
4656
4656
  function i(a, d) {
4657
- const { value: p, mask: v } = s(a, d);
4658
- t.send(Zi(a, p, v));
4657
+ const { value: p, mask: b } = s(a, d);
4658
+ t.send(Zi(a, p, b));
4659
4659
  }
4660
4660
  const r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
4661
4661
  t.attachStopCallback(() => {
@@ -4680,24 +4680,24 @@ function Co(t, e) {
4680
4680
  c(d, p.checked);
4681
4681
  });
4682
4682
  }, 3);
4683
- function u(a, d, p, v) {
4684
- const { value: w, mask: b } = s(a, d), T = ri(d);
4685
- t.send(vr(a, w, b !== 0, T, p, v));
4683
+ function u(a, d, p, b) {
4684
+ const { value: w, mask: v } = s(a, d), T = ri(d);
4685
+ t.send(br(a, w, v !== 0, T, p, b));
4686
4686
  }
4687
4687
  t.nodes.attachNodeCallback(t.safe((a) => {
4688
4688
  const d = t.nodes.getID(a);
4689
4689
  if (d !== void 0) {
4690
4690
  if (Z(a, "select") && (i(d, a), t.nodes.attachNodeListener(a, "change", () => i(d, a))), To(a)) {
4691
4691
  l(d, a);
4692
- let p = 0, v = 0, w = 0;
4693
- const b = () => {
4692
+ let p = 0, b = 0, w = 0;
4693
+ const v = () => {
4694
4694
  p = pe();
4695
4695
  }, T = () => {
4696
- v === 0 && p !== 0 && (v = pe() - p);
4696
+ b === 0 && p !== 0 && (b = pe() - p);
4697
4697
  }, N = () => {
4698
- p !== 0 && (w = pe() - p), u(d, a, v, w), v = 0, w = 0, p = 0;
4698
+ p !== 0 && (w = pe() - p), u(d, a, b, w), b = 0, w = 0, p = 0;
4699
4699
  };
4700
- t.nodes.attachNodeListener(a, "focus", b), t.nodes.attachNodeListener(a, "input", T), t.nodes.attachNodeListener(a, "change", N);
4700
+ t.nodes.attachNodeListener(a, "focus", v), t.nodes.attachNodeListener(a, "input", T), t.nodes.attachNodeListener(a, "change", N);
4701
4701
  return;
4702
4702
  }
4703
4703
  if (Eo(a)) {
@@ -4905,7 +4905,7 @@ function Bo(t, e) {
4905
4905
  return null;
4906
4906
  n = n.parentElement;
4907
4907
  }
4908
- if (bn(t)) {
4908
+ if (vn(t)) {
4909
4909
  let s = t.ownerSVGElement;
4910
4910
  for (; s !== null; )
4911
4911
  t = s, s = s.ownerSVGElement;
@@ -4934,16 +4934,16 @@ function jo(t, e) {
4934
4934
  }
4935
4935
  return "";
4936
4936
  }
4937
- let i = -1, r = -1, o = !1, l = null, c = 0, u = {}, a = 0, d = 0, p = 0, v = 0, w;
4938
- const b = 8e-3, T = 225;
4937
+ let i = -1, r = -1, o = !1, l = null, c = 0, u = {}, a = 0, d = 0, p = 0, b = 0, w;
4938
+ const v = 8e-3, T = 225;
4939
4939
  function N() {
4940
- const k = v / T;
4940
+ const k = b / T;
4941
4941
  if (!a) {
4942
4942
  a = k;
4943
4943
  return;
4944
4944
  }
4945
4945
  const _ = (k - a) / T;
4946
- p > 4 && _ > b && t.send(br(pe())), v = 0, p = 0, a = k;
4946
+ p > 4 && _ > v && t.send(vr(pe())), b = 0, p = 0, a = k;
4947
4947
  }
4948
4948
  t.attachStartCallback(() => {
4949
4949
  w = setInterval(() => N(), T);
@@ -4964,7 +4964,7 @@ function jo(t, e) {
4964
4964
  const [E, P] = t.observer.getDocumentOffset(k);
4965
4965
  i = I.clientX + E, r = I.clientY + P, o = !0;
4966
4966
  const U = Math.sign(I.movementX);
4967
- v += Math.abs(I.movementX) + Math.abs(I.movementY), U !== d && (d = U, p++);
4967
+ b += Math.abs(I.movementX) + Math.abs(I.movementY), U !== d && (d = U, p++);
4968
4968
  }, !1), L(k, "click", (I) => {
4969
4969
  const E = Ts(I.target, k);
4970
4970
  if (!I.clientX && !I.clientY || E === null)
@@ -4978,7 +4978,7 @@ function jo(t, e) {
4978
4978
  });
4979
4979
  };
4980
4980
  t.nodes.attachNodeCallback((k) => {
4981
- bt(k) && D(k);
4981
+ vt(k) && D(k);
4982
4982
  }), D(document, !0), t.ticker.attach(M, (e == null ? void 0 : e.trackingOffset) || 7);
4983
4983
  }
4984
4984
  function Es(t) {
@@ -4992,8 +4992,8 @@ function zo(t) {
4992
4992
  if (Z(r, "img") && (o = r.currentSrc || r.src), !o) {
4993
4993
  const w = getComputedStyle(r).getPropertyValue("background-image");
4994
4994
  if (w) {
4995
- const b = s.exec(w);
4996
- b !== null && (o = b[1], (o.startsWith('"') || o.startsWith("'")) && (o = o.substr(1, o.length - 2)));
4995
+ const v = s.exec(w);
4996
+ v !== null && (o = v[1], (o.startsWith('"') || o.startsWith("'")) && (o = o.substr(1, o.length - 2)));
4997
4997
  }
4998
4998
  }
4999
4999
  if (!o)
@@ -5004,8 +5004,8 @@ function zo(t) {
5004
5004
  const c = r.getBoundingClientRect(), u = Math.max(c.top, 0), a = Math.max(c.left, 0), d = Math.min(c.bottom, window.innerHeight || document.documentElement && document.documentElement.clientHeight || 0), p = Math.min(c.right, window.innerWidth || document.documentElement && document.documentElement.clientWidth || 0);
5005
5005
  if (d <= u || p <= a)
5006
5006
  continue;
5007
- const v = (d - u) * (p - a);
5008
- e.push({ time: l, area: v });
5007
+ const b = (d - u) * (p - a);
5008
+ e.push({ time: l, area: b });
5009
5009
  }
5010
5010
  return e;
5011
5011
  }
@@ -5082,26 +5082,26 @@ function Ho(t, e) {
5082
5082
  navigationStart: a,
5083
5083
  requestStart: d,
5084
5084
  responseStart: p,
5085
- responseEnd: v,
5085
+ responseEnd: b,
5086
5086
  domContentLoadedEventStart: w,
5087
- domContentLoadedEventEnd: b,
5087
+ domContentLoadedEventEnd: v,
5088
5088
  loadEventStart: T,
5089
5089
  loadEventEnd: N
5090
5090
  } = performance.timing;
5091
- t.send(sr(d - a || 0, p - a || 0, v - a || 0, w - a || 0, b - a || 0, T - a || 0, N - a || 0, l, c));
5091
+ t.send(sr(d - a || 0, p - a || 0, b - a || 0, w - a || 0, v - a || 0, T - a || 0, N - a || 0, l, c));
5092
5092
  }
5093
5093
  }, 30);
5094
5094
  }
5095
5095
  if (n.capturePageRenderTimings) {
5096
- let u = 0, a = 0, d = 0, p = null, v = !1;
5096
+ let u = 0, a = 0, d = 0, p = null, b = !1;
5097
5097
  t.ticker.attach(() => {
5098
- if (v)
5098
+ if (b)
5099
5099
  return;
5100
5100
  const w = performance.now();
5101
- if (s !== null && (u = Math.max.apply(null, Object.keys(s).map((b) => s[b])), w - u > 1e3 && (p = zo(s), s = null)), d !== null && (w - d > 50 && (a = w), d = w - a > 5e3 ? null : w), p !== null && d === null || w > 3e4) {
5102
- v = !0, s = null;
5103
- const b = p === null ? 0 : Uo(c || l, p), { domContentLoadedEventEnd: T, navigationStart: N } = performance.timing, M = d === null ? Math.max(a, c, T - N || 0) : 0;
5104
- t.send(ir(b, c > u ? c : u, M));
5101
+ if (s !== null && (u = Math.max.apply(null, Object.keys(s).map((v) => s[v])), w - u > 1e3 && (p = zo(s), s = null)), d !== null && (w - d > 50 && (a = w), d = w - a > 5e3 ? null : w), p !== null && d === null || w > 3e4) {
5102
+ b = !0, s = null;
5103
+ const v = p === null ? 0 : Uo(c || l, p), { domContentLoadedEventEnd: T, navigationStart: N } = performance.timing, M = d === null ? Math.max(a, c, T - N || 0) : 0;
5104
+ t.send(ir(v, c > u ? c : u, M));
5105
5105
  }
5106
5106
  });
5107
5107
  }
@@ -5117,7 +5117,7 @@ function $o(t, e) {
5117
5117
  let n = !1;
5118
5118
  const s = /* @__PURE__ */ new Map();
5119
5119
  function i(l) {
5120
- ei(l) && (ke(l) && s.set(l, [l.scrollLeft, l.scrollTop]), bt(l) && s.set(l, rn(l)));
5120
+ ei(l) && (ke(l) && s.set(l, [l.scrollLeft, l.scrollTop]), vt(l) && s.set(l, rn(l)));
5121
5121
  }
5122
5122
  const r = t.safe(() => {
5123
5123
  e || t.send(Wi(...rn(document)));
@@ -5128,7 +5128,7 @@ function $o(t, e) {
5128
5128
  t.attachStartCallback(r), t.attachStopCallback(() => {
5129
5129
  n = !1, s.clear();
5130
5130
  }), t.nodes.attachNodeCallback((l, c) => {
5131
- c && (ke(l) && l.scrollLeft + l.scrollTop > 0 ? s.set(l, [l.scrollLeft, l.scrollTop]) : bt(l) && s.set(l, rn(l))), Et(l) && t.nodes.attachNodeListener(l, "scroll", (u) => {
5131
+ c && (ke(l) && l.scrollLeft + l.scrollTop > 0 ? s.set(l, [l.scrollLeft, l.scrollTop]) : vt(l) && s.set(l, rn(l))), Et(l) && t.nodes.attachNodeListener(l, "scroll", (u) => {
5132
5132
  i(u.target);
5133
5133
  });
5134
5134
  }), t.attachEventListener(document, "scroll", (l) => {
@@ -5177,11 +5177,11 @@ function Vo(t) {
5177
5177
  if (a && Symbol.iterator in a)
5178
5178
  for (const d of a) {
5179
5179
  let p = e.get(d);
5180
- const v = !p;
5181
- if (p || (p = hi(), e.set(d, p)), c.includes(p) || t.send(Ys(p, l)), v) {
5180
+ const b = !p;
5181
+ if (p || (p = hi(), e.set(d, p)), c.includes(p) || t.send(Ys(p, l)), b) {
5182
5182
  const w = d.cssRules;
5183
- for (let b = 0; b < w.length; b++)
5184
- t.send(fn(p, w[b].cssText, b, t.getBaseHref()));
5183
+ for (let v = 0; v < w.length; v++)
5184
+ t.send(fn(p, w[v].cssText, v, t.getBaseHref()));
5185
5185
  }
5186
5186
  u.push(p);
5187
5187
  }
@@ -5321,7 +5321,7 @@ function Jo(t) {
5321
5321
  s.FontFace = i;
5322
5322
  };
5323
5323
  t.observer.attachContextCallback(n), n(window), t.nodes.attachNodeCallback(t.safe((s) => {
5324
- if (!bt(s))
5324
+ if (!vt(s))
5325
5325
  return;
5326
5326
  const i = e.get(s);
5327
5327
  if (!i)
@@ -5336,19 +5336,19 @@ function Xo(t, e, n, s, i) {
5336
5336
  t.debug.log("Openreplay: attaching axios spy to instance", e);
5337
5337
  function r(p) {
5338
5338
  t.debug.log("Openreplay: capturing axios response data", p);
5339
- const { headers: v, data: w, method: b, url: T, baseURL: N } = p.config, { data: M, headers: D, status: k, response: _ } = p, { data: R, headers: L, status: I } = _ || {}, E = n.ignoreHeaders, P = Array.isArray(E) ? ($) => E.includes($) : () => E;
5339
+ const { headers: b, data: w, method: v, url: T, baseURL: N } = p.config, { data: M, headers: D, status: k, response: _ } = p, { data: R, headers: L, status: I } = _ || {}, E = n.ignoreHeaders, P = Array.isArray(E) ? ($) => E.includes($) : () => E;
5340
5340
  function U($, y) {
5341
5341
  P(y[0]) || ($[y[0]] = y[1]);
5342
5342
  }
5343
5343
  let j = {}, z = {};
5344
- v.toJSON ? j = v.toJSON() : v instanceof Headers ? v.forEach(($, y) => U(j, [y, $])) : Array.isArray(v) ? v.forEach(($) => U(j, $)) : typeof v == "object" && Object.entries(v).forEach(($) => U(j, $));
5344
+ b.toJSON ? j = b.toJSON() : b instanceof Headers ? b.forEach(($, y) => U(j, [y, $])) : Array.isArray(b) ? b.forEach(($) => U(j, $)) : typeof b == "object" && Object.entries(b).forEach(($) => U(j, $));
5345
5345
  const C = L || D;
5346
5346
  C.toJSON ? z = C.toJSON() : C instanceof Headers ? C.forEach(($, y) => U(z, [y, $])) : Array.isArray(C) ? C.forEach(($) => U(z, $)) : typeof C == "object" && Object.entries(C).forEach(([$, y]) => {
5347
5347
  P($) || (z[$] = y);
5348
5348
  });
5349
5349
  const F = s({
5350
5350
  url: T,
5351
- method: b || "",
5351
+ method: v || "",
5352
5352
  status: k || I || 0,
5353
5353
  request: {
5354
5354
  headers: j,
@@ -5364,12 +5364,12 @@ function Xo(t, e, n, s, i) {
5364
5364
  return;
5365
5365
  }
5366
5366
  const V = p.config.__openreplay_timing, K = performance.now() - V;
5367
- t.debug.log("Openreplay: final req object", F), t.send(vt("xhr", String(b), String(F.url), i(F.request), i(F.response), F.status, V + Ve(), K, 0));
5367
+ t.debug.log("Openreplay: final req object", F), t.send(bt("xhr", String(v), String(F.url), i(F.request), i(F.response), F.status, V + Ve(), K, 0));
5368
5368
  }
5369
5369
  function o(p) {
5370
5370
  if (t.debug.log("Openreplay: capturing API request", p), p.__openreplay_timing = performance.now(), n.sessionTokenHeader) {
5371
- const v = typeof n.sessionTokenHeader == "string" ? n.sessionTokenHeader : "X-OpenReplay-Session-Token", w = t.getSessionToken();
5372
- w && p.headers.set(v, w);
5371
+ const b = typeof n.sessionTokenHeader == "string" ? n.sessionTokenHeader : "X-OpenReplay-Session-Token", w = t.getSessionToken();
5372
+ w && p.headers.set(b, w);
5373
5373
  }
5374
5374
  return p;
5375
5375
  }
@@ -5388,8 +5388,8 @@ function Xo(t, e, n, s, i) {
5388
5388
  synchronous: !0
5389
5389
  });
5390
5390
  t.attachStopCallback(() => {
5391
- var p, v, w, b;
5392
- (v = (p = e.interceptors.request).eject) == null || v.call(p, a), (b = (w = e.interceptors.response).eject) == null || b.call(w, d);
5391
+ var p, b, w, v;
5392
+ (b = (p = e.interceptors.request).eject) == null || b.call(p, a), (v = (w = e.interceptors.response).eject) == null || v.call(w, d);
5393
5393
  });
5394
5394
  }
5395
5395
  function Yo(t) {
@@ -5418,7 +5418,7 @@ class An {
5418
5418
  response: i
5419
5419
  });
5420
5420
  if (r)
5421
- return vt(this.requestType, r.method, r.url, JSON.stringify(r.request), JSON.stringify(r.response), r.status, this.startTime + Ve(), this.duration, this.responseSize);
5421
+ return bt(this.requestType, r.method, r.url, JSON.stringify(r.request), JSON.stringify(r.response), r.status, this.startTime + Ve(), this.duration, this.responseSize);
5422
5422
  }
5423
5423
  writeHeaders() {
5424
5424
  const e = {};
@@ -5851,12 +5851,12 @@ function la(t, e = {}) {
5851
5851
  body: E
5852
5852
  }
5853
5853
  });
5854
- z && t.send(vt("fetch", j, String(z.url), c(z.request), c(z.response), I.status, _ + Ve(), L, 0));
5854
+ z && t.send(bt("fetch", j, String(z.url), c(z.request), c(z.response), I.status, _ + Ve(), L, 0));
5855
5855
  }).catch((E) => t.debug.error("Could not process Fetch response:", E)), R;
5856
5856
  });
5857
5857
  };
5858
5858
  a.fetch = p;
5859
- const v = a.XMLHttpRequest.prototype.open, w = a.XMLHttpRequest.prototype.setRequestHeader, b = a.XMLHttpRequest.prototype.send;
5859
+ const b = a.XMLHttpRequest.prototype.open, w = a.XMLHttpRequest.prototype.setRequestHeader, v = a.XMLHttpRequest.prototype.send;
5860
5860
  function T(D, k) {
5861
5861
  const _ = this;
5862
5862
  o((L, I) => _.setRequestHeader(L, I));
@@ -5883,12 +5883,12 @@ function la(t, e = {}) {
5883
5883
  body: _.response
5884
5884
  }
5885
5885
  });
5886
- F && t.send(vt("xhr", C, String(F.url), c(F.request), c(F.response), _.status, R + Ve(), P, 0));
5887
- })), v.apply(this, arguments);
5886
+ F && t.send(bt("xhr", C, String(F.url), c(F.request), c(F.response), _.status, R + Ve(), P, 0));
5887
+ })), b.apply(this, arguments);
5888
5888
  }
5889
5889
  function N(D) {
5890
5890
  const k = on(this);
5891
- return k.body = D, b.apply(this, arguments);
5891
+ return k.body = D, v.apply(this, arguments);
5892
5892
  }
5893
5893
  function M(D, k) {
5894
5894
  if (!i(D)) {
@@ -7119,7 +7119,7 @@ class fi {
7119
7119
  }
7120
7120
  }
7121
7121
  }
7122
- class va {
7122
+ class ba {
7123
7123
  constructor() {
7124
7124
  this.api = new fi(), this.language = "en", this.currency = "USD", this.currencies = {
7125
7125
  USD: {
@@ -7647,7 +7647,7 @@ class va {
7647
7647
  async fetchConfig(e) {
7648
7648
  try {
7649
7649
  const n = await this.api.getStoreConfig(e);
7650
- this.storeLanguage = n.lang, this.supportedLanguages = n.available_languages;
7650
+ this.storeLanguage = n.lang, this.supportedLanguages = n.available_languages, this.OpenAIApiKey = n.open_ai_key;
7651
7651
  const s = localStorage.getItem("selectedLanguage");
7652
7652
  s && this.translations[s] ? this.language = s : n.lang && this.translations[n.lang] ? (this.language = n.lang, localStorage.setItem("selectedLanguage", n.lang)) : this.language = "en", this.currency = n.currency || "USD";
7653
7653
  } catch {
@@ -7681,7 +7681,7 @@ class va {
7681
7681
  var u, a, d, p;
7682
7682
  if (this.storeLanguage === this.language || !this.supportedLanguages)
7683
7683
  return e;
7684
- const n = "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", s = "https://api.openai.com/v1/chat/completions", i = {
7684
+ const n = this.OpenAIApiKey, s = "https://api.openai.com/v1/chat/completions", i = {
7685
7685
  "Content-Type": "application/json",
7686
7686
  Authorization: `Bearer ${n}`
7687
7687
  }, o = Object.values(e).join(" ||| "), l = `Translate the following texts to ${this.language}. Return only the translated texts separated by " ||| " in the same order:
@@ -7696,24 +7696,24 @@ class va {
7696
7696
  max_tokens: 1e3
7697
7697
  });
7698
7698
  try {
7699
- const b = (p = (d = (a = (u = (await (await fetch(s, {
7699
+ const v = (p = (d = (a = (u = (await (await fetch(s, {
7700
7700
  method: "POST",
7701
7701
  headers: i,
7702
7702
  body: c
7703
7703
  })).json()).choices) == null ? void 0 : u[0]) == null ? void 0 : a.message) == null ? void 0 : d.content) == null ? void 0 : p.trim();
7704
- if (!b)
7704
+ if (!v)
7705
7705
  throw new Error("No response from OpenAI");
7706
- const T = b.split(" ||| ").map((M) => M.trim()), N = {};
7706
+ const T = v.split(" ||| ").map((M) => M.trim()), N = {};
7707
7707
  return Object.keys(e).forEach((M, D) => {
7708
7708
  N[M] = T[D] || e[M];
7709
7709
  }), N;
7710
- } catch (v) {
7711
- return console.error("Error translating texts:", v), e;
7710
+ } catch (b) {
7711
+ return console.error("Error translating texts:", b), e;
7712
7712
  }
7713
7713
  }
7714
7714
  }
7715
- const G = new va();
7716
- class ba {
7715
+ const G = new ba();
7716
+ class va {
7717
7717
  constructor() {
7718
7718
  var e, n, s, i, r;
7719
7719
  this.widgetType = ((e = window == null ? void 0 : window.wineaterData) == null ? void 0 : e.WIDGET_TYPE) || "store", this.countryCode = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.COUNTRY_CODE) || null, this.widgetWrapper = ((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.WIDGET_WRAPPER) || "wineater-widget-conteiner", this.titleText = (i = window == null ? void 0 : window.wineaterData) == null ? void 0 : i.TITLE_TEXT, this.subtitleText = (r = window == null ? void 0 : window.wineaterData) == null ? void 0 : r.SUBTITLE_TEXT, this.api = new fi(), console.log(this.titleText), this.selectedFilters = {
@@ -7839,13 +7839,13 @@ class ba {
7839
7839
  return typeof u != "number" && (u = Number(u)), u.toLocaleString("en-US");
7840
7840
  }
7841
7841
  e.forEach(async (u, a) => {
7842
- const d = i(u, "title"), p = i(u, "image"), v = i(u, "total"), w = i(u, "url"), b = u.tags || u.Tags, T = r(u, ["type", "country", "region", "grape"]), N = b ? o(b) : "", M = l(u), D = u["Short Description"], k = u.pairing_recommendation, _ = u.isSommSelection, R = `
7842
+ const d = i(u, "title"), p = i(u, "image"), b = i(u, "total"), w = i(u, "url"), v = u.tags || u.Tags, T = r(u, ["type", "country", "region", "grape"]), N = v ? o(v) : "", M = l(u), D = u["Short Description"], k = u.pairing_recommendation, _ = u.isSommSelection, R = `
7843
7843
  <div class="wine-recommendation-tile ${_ ? "somm-selection" : ""}">
7844
7844
  ${_ ? `<div class="somm-selection-badge">${G.translate("wineDetails.sommSelection")}</div>` : ""}
7845
7845
 
7846
7846
  <div class="tile-top">
7847
7847
  ${p ? `<img src="${p}" alt="${d}" class="wine-image" />` : ""}
7848
- <div class="wine-price">${c(v)} ${G.getCurrency("label")}</div>
7848
+ <div class="wine-price">${c(b)} ${G.getCurrency("label")}</div>
7849
7849
  <h3 class="wine-title">${d}</h3>
7850
7850
  </div>
7851
7851
 
@@ -7934,28 +7934,28 @@ class ba {
7934
7934
  for (let i = 0; i < e.length; i += s) {
7935
7935
  const o = e.slice(i, i + s).map(async (l, c) => {
7936
7936
  const u = i + c, a = {};
7937
- if (n.forEach((v) => {
7938
- const w = l[v] || l[v.toLowerCase()];
7939
- w && (a[v] = Array.isArray(w) ? w.join(", ") : w);
7937
+ if (n.forEach((b) => {
7938
+ const w = l[b] || l[b.toLowerCase()];
7939
+ w && (a[b] = Array.isArray(w) ? w.join(", ") : w);
7940
7940
  }), Object.keys(a).length === 0)
7941
7941
  return;
7942
7942
  const d = await G.translateTexts(a), p = document.querySelector(`.card-popup[data-wine-index="${u}"]`);
7943
7943
  if (p) {
7944
7944
  if (d["Short Description"]) {
7945
- const v = p.querySelector(".popup-short-desc");
7946
- v && (v.textContent = d["Short Description"]);
7945
+ const b = p.querySelector(".popup-short-desc");
7946
+ b && (b.textContent = d["Short Description"]);
7947
7947
  }
7948
7948
  if (d.reason) {
7949
- const v = p.querySelector(".popup-reason");
7950
- v && (v.textContent = d.reason);
7949
+ const b = p.querySelector(".popup-reason");
7950
+ b && (b.textContent = d.reason);
7951
7951
  }
7952
7952
  if (d.pairing_recommendation) {
7953
- const v = p.querySelector(".popup-pairing");
7954
- v && (v.textContent = d.pairing_recommendation);
7953
+ const b = p.querySelector(".popup-pairing");
7954
+ b && (b.textContent = d.pairing_recommendation);
7955
7955
  }
7956
7956
  if (d.Tags) {
7957
- const w = d.Tags.split(",").map((T) => T.trim()).map((T) => `<span class="popup-tag">${T}</span>`).join(""), b = p.querySelector(".popup-tags");
7958
- b && (b.innerHTML = w);
7957
+ const w = d.Tags.split(",").map((T) => T.trim()).map((T) => `<span class="popup-tag">${T}</span>`).join(""), v = p.querySelector(".popup-tags");
7958
+ v && (v.innerHTML = w);
7959
7959
  }
7960
7960
  }
7961
7961
  });
@@ -8011,7 +8011,7 @@ class wa {
8011
8011
  Rs("chatbotToken", ((e = window.wineaterData) == null ? void 0 : e.CLIENT_TOKEN) || ya, 365), mi();
8012
8012
  }
8013
8013
  async initialize() {
8014
- this.tracker.start(), await this.initTranslator(), this.initCookies(), new ba();
8014
+ this.tracker.start(), await this.initTranslator(), this.initCookies(), new va();
8015
8015
  }
8016
8016
  }
8017
8017
  document.addEventListener("DOMContentLoaded", () => {