wineater-bot 3.1.3 → 3.1.4

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.
@@ -728,33 +728,33 @@ var pn = { exports: {} };
728
728
  return null;
729
729
  }
730
730
  }, getItem: function(b, f) {
731
- var h = this;
731
+ var d = this;
732
732
  return new Promise(function(m, g) {
733
733
  try {
734
- var w = h.getItemSync(b);
734
+ var w = d.getItemSync(b);
735
735
  f == null || f(null, w), m(w);
736
736
  } catch (x) {
737
737
  f && f(x, null), g(x);
738
738
  }
739
739
  });
740
- }, setItem: function(b, f, h) {
740
+ }, setItem: function(b, f, d) {
741
741
  return new Promise(function(m, g) {
742
742
  try {
743
- localStorage.setItem(b, f), h && h(null, f), m(f);
743
+ localStorage.setItem(b, f), d && d(null, f), m(f);
744
744
  } catch (w) {
745
- h && h(w, null), g(w);
745
+ d && d(w, null), g(w);
746
746
  }
747
747
  });
748
748
  } }, i = function() {
749
749
  return i = Object.assign || function(b) {
750
- for (var f, h = 1, m = arguments.length; h < m; h++)
751
- for (var g in f = arguments[h])
750
+ for (var f, d = 1, m = arguments.length; d < m; d++)
751
+ for (var g in f = arguments[d])
752
752
  Object.prototype.hasOwnProperty.call(f, g) && (b[g] = f[g]);
753
753
  return b;
754
754
  }, i.apply(this, arguments);
755
755
  };
756
- function r(b, f, h, m) {
757
- return new (h || (h = Promise))(function(g, w) {
756
+ function r(b, f, d, m) {
757
+ return new (d || (d = Promise))(function(g, w) {
758
758
  function x(H) {
759
759
  try {
760
760
  M(m.next(H));
@@ -771,7 +771,7 @@ var pn = { exports: {} };
771
771
  }
772
772
  function M(H) {
773
773
  var _;
774
- H.done ? g(H.value) : (_ = H.value, _ instanceof h ? _ : new h(function(W) {
774
+ H.done ? g(H.value) : (_ = H.value, _ instanceof d ? _ : new d(function(W) {
775
775
  W(_);
776
776
  })).then(x, R);
777
777
  }
@@ -779,7 +779,7 @@ var pn = { exports: {} };
779
779
  });
780
780
  }
781
781
  function o(b, f) {
782
- var h, m, g, w, x = { label: 0, sent: function() {
782
+ var d, m, g, w, x = { label: 0, sent: function() {
783
783
  if (1 & g[0])
784
784
  throw g[1];
785
785
  return g[1];
@@ -790,11 +790,11 @@ var pn = { exports: {} };
790
790
  function R(M) {
791
791
  return function(H) {
792
792
  return function(_) {
793
- if (h)
793
+ if (d)
794
794
  throw new TypeError("Generator is already executing.");
795
795
  for (; x; )
796
796
  try {
797
- if (h = 1, m && (g = 2 & _[0] ? m.return : _[0] ? m.throw || ((g = m.return) && g.call(m), 0) : m.next) && !(g = g.call(m, _[1])).done)
797
+ if (d = 1, m && (g = 2 & _[0] ? m.return : _[0] ? m.throw || ((g = m.return) && g.call(m), 0) : m.next) && !(g = g.call(m, _[1])).done)
798
798
  return g;
799
799
  switch (m = 0, g && (_ = [2 & _[0], g.value]), _[0]) {
800
800
  case 0:
@@ -833,7 +833,7 @@ var pn = { exports: {} };
833
833
  } catch (W) {
834
834
  _ = [6, W], m = 0;
835
835
  } finally {
836
- h = g = 0;
836
+ d = g = 0;
837
837
  }
838
838
  if (5 & _[0])
839
839
  throw _[1];
@@ -842,71 +842,71 @@ var pn = { exports: {} };
842
842
  };
843
843
  }
844
844
  }
845
- function l(b, f, h) {
846
- if (h || arguments.length === 2)
845
+ function l(b, f, d) {
846
+ if (d || arguments.length === 2)
847
847
  for (var m, g = 0, w = f.length; g < w; g++)
848
848
  !m && g in f || (m || (m = Array.prototype.slice.call(f, 0, g)), m[g] = f[g]);
849
849
  return b.concat(m || Array.prototype.slice.call(f));
850
850
  }
851
- var a = function b(f, h) {
852
- if (f === h)
851
+ var a = function b(f, d) {
852
+ if (f === d)
853
853
  return !0;
854
- if (f && h && typeof f == "object" && typeof h == "object") {
855
- if (f.constructor !== h.constructor)
854
+ if (f && d && typeof f == "object" && typeof d == "object") {
855
+ if (f.constructor !== d.constructor)
856
856
  return !1;
857
857
  var m, g, w;
858
858
  if (Array.isArray(f)) {
859
- if ((m = f.length) != h.length)
859
+ if ((m = f.length) != d.length)
860
860
  return !1;
861
861
  for (g = m; g-- != 0; )
862
- if (!b(f[g], h[g]))
862
+ if (!b(f[g], d[g]))
863
863
  return !1;
864
864
  return !0;
865
865
  }
866
866
  if (f.constructor === RegExp)
867
- return f.source === h.source && f.flags === h.flags;
867
+ return f.source === d.source && f.flags === d.flags;
868
868
  if (f.valueOf !== Object.prototype.valueOf)
869
- return f.valueOf() === h.valueOf();
869
+ return f.valueOf() === d.valueOf();
870
870
  if (f.toString !== Object.prototype.toString)
871
- return f.toString() === h.toString();
872
- if ((m = (w = Object.keys(f)).length) !== Object.keys(h).length)
871
+ return f.toString() === d.toString();
872
+ if ((m = (w = Object.keys(f)).length) !== Object.keys(d).length)
873
873
  return !1;
874
874
  for (g = m; g-- != 0; )
875
- if (!Object.prototype.hasOwnProperty.call(h, w[g]))
875
+ if (!Object.prototype.hasOwnProperty.call(d, w[g]))
876
876
  return !1;
877
877
  for (g = m; g-- != 0; ) {
878
878
  var x = w[g];
879
- if (!b(f[x], h[x]))
879
+ if (!b(f[x], d[x]))
880
880
  return !1;
881
881
  }
882
882
  return !0;
883
883
  }
884
- return f != f && h != h;
884
+ return f != f && d != d;
885
885
  };
886
- function d(b, f) {
887
- var h = Object.keys(f || {}).filter(function(m) {
886
+ function h(b, f) {
887
+ var d = Object.keys(f || {}).filter(function(m) {
888
888
  var g = b == null ? void 0 : b[m], w = f == null ? void 0 : f[m];
889
889
  return !a(g, w);
890
890
  });
891
891
  return Object.keys(b || {}).filter(function(m) {
892
- Object.keys(f || {}).includes(m) || h.push(m);
893
- }), Object.keys(h).length ? h : null;
892
+ Object.keys(f || {}).includes(m) || d.push(m);
893
+ }), Object.keys(d).length ? d : null;
894
894
  }
895
895
  var c, u;
896
- function p(b, f, h) {
896
+ function p(b, f, d) {
897
897
  var m = "shortString", g = !0;
898
- typeof h == "number" && (m = "javaDouble", g = !1), b[m] = b[m] || {}, b[m][f] = g ? h + "" : h;
898
+ typeof d == "number" && (m = "javaDouble", g = !1), b[m] = b[m] || {}, b[m][f] = g ? d + "" : d;
899
899
  }
900
- function v(b) {
900
+ function y(b) {
901
901
  return !!b && typeof b == "object" && b.value !== void 0;
902
902
  }
903
903
  function S(b) {
904
904
  return Object.fromEntries(Object.entries(b).map(function(f) {
905
- var h = f[0], m = f[1];
906
- return [h, v(m) ? m : { value: m }];
905
+ var d = f[0], m = f[1];
906
+ return [d, y(m) ? m : { value: m }];
907
907
  }));
908
908
  }
909
- function y(b) {
909
+ function v(b) {
910
910
  return i(i({}, b), { identity: b.identity ? i(i({}, b.identity), { traits: S(b.identity.traits || {}) }) : void 0 });
911
911
  }
912
912
  (function(b) {
@@ -914,122 +914,122 @@ var pn = { exports: {} };
914
914
  })(c || (c = {}));
915
915
  var T, A = null, B = "BULLET_TRAIN_DB", D = "BULLET_TRAIN_EVENT", k = "https://edge.api.flagsmith.com/api/v1/", N = "flagsmith_value_", O = "flagsmith_enabled_", L = "flagsmith_trait_", I = function() {
916
916
  function b(f) {
917
- var h = this;
917
+ var d = this;
918
918
  this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
919
- var m = h, g = m.api, w = m.evaluationContext;
920
- h.log("Get Flags"), h.isLoading = !0, h.loadingState.isFetching || h.setLoadingState(i(i({}, h.loadingState), { isFetching: !0 }));
921
- var x = "".concat(h.getContext().identity), R = function(M) {
919
+ var m = d, g = m.api, w = m.evaluationContext;
920
+ d.log("Get Flags"), d.isLoading = !0, d.loadingState.isFetching || d.setLoadingState(i(i({}, d.loadingState), { isFetching: !0 }));
921
+ var x = "".concat(d.getContext().identity), R = function(M) {
922
922
  var H, _, W, ee;
923
- if (M && x === "".concat(h.getContext().identity)) {
923
+ if (M && x === "".concat(d.getContext().identity)) {
924
924
  var ae = M.flags, te = M.traits, ne = M.identifier;
925
- h.isLoading = !1;
925
+ d.isLoading = !1;
926
926
  var ce = {}, le = {};
927
927
  te = te || [], (ae = ae || []).forEach(function(X) {
928
928
  ce[X.feature.name.toLowerCase().replace(/ /g, "_")] = { id: X.feature.id, enabled: X.enabled, value: X.feature_state_value };
929
929
  }), te.forEach(function(X) {
930
930
  le[X.trait_key.toLowerCase().replace(/ /g, "_")] = { transient: X.transient, value: X.trait_value };
931
- }), h.oldFlags = i({}, h.flags);
932
- var me = d(h.oldFlags, ce), Ke = d((H = h.evaluationContext.identity) === null || H === void 0 ? void 0 : H.traits, le);
933
- if ((ne || Object.keys(le).length) && (h.evaluationContext.identity = { traits: le }, ne && (h.evaluationContext.identity.identifier = ne)), h.flags = ce, h.updateStorage(), h._onChange(h.oldFlags, { isFromServer: !0, flagsChanged: me, traitsChanged: Ke }, h._loadedState(null, c.SERVER)), h.datadogRum)
931
+ }), d.oldFlags = i({}, d.flags);
932
+ var me = h(d.oldFlags, ce), Ke = h((H = d.evaluationContext.identity) === null || H === void 0 ? void 0 : H.traits, le);
933
+ if ((ne || Object.keys(le).length) && (d.evaluationContext.identity = { traits: le }, ne && (d.evaluationContext.identity.identifier = ne)), d.flags = ce, d.updateStorage(), d._onChange(d.oldFlags, { isFromServer: !0, flagsChanged: me, traitsChanged: Ke }, d._loadedState(null, c.SERVER)), d.datadogRum)
934
934
  try {
935
- if (h.datadogRum.trackTraits) {
935
+ if (d.datadogRum.trackTraits) {
936
936
  var Xe = {};
937
- Object.keys(((_ = h.evaluationContext.identity) === null || _ === void 0 ? void 0 : _.traits) || {}).map(function(X) {
938
- Xe[L + X] = h.getTrait(X);
937
+ Object.keys(((_ = d.evaluationContext.identity) === null || _ === void 0 ? void 0 : _.traits) || {}).map(function(X) {
938
+ Xe[L + X] = d.getTrait(X);
939
939
  });
940
- var Fe = i(i(i({}, h.datadogRum.client.getUser()), { id: h.datadogRum.client.getUser().id || ((W = h.evaluationContext.identity) === null || W === void 0 ? void 0 : W.identifier) }), Xe);
941
- h.log("Setting Datadog user", Fe), h.datadogRum.client.setUser(Fe);
940
+ var Fe = i(i(i({}, d.datadogRum.client.getUser()), { id: d.datadogRum.client.getUser().id || ((W = d.evaluationContext.identity) === null || W === void 0 ? void 0 : W.identifier) }), Xe);
941
+ d.log("Setting Datadog user", Fe), d.datadogRum.client.setUser(Fe);
942
942
  }
943
943
  } catch (X) {
944
944
  console.error(X);
945
945
  }
946
- if (h.dtrum)
946
+ if (d.dtrum)
947
947
  try {
948
948
  var se = { javaDouble: {}, date: {}, shortString: {}, javaLongOrObject: {} };
949
- Object.keys(h.flags).map(function(X) {
950
- p(se, N + X, h.getValue(X, { skipAnalytics: !0 })), p(se, O + X, h.hasFeature(X, { skipAnalytics: !0 }));
951
- }), Object.keys(((ee = h.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.traits) || {}).map(function(X) {
952
- p(se, L + X, h.getTrait(X));
953
- }), h.log("Sending javaLongOrObject traits to dynatrace", se.javaLongOrObject), h.log("Sending date traits to dynatrace", se.date), h.log("Sending shortString traits to dynatrace", se.shortString), h.log("Sending javaDouble to dynatrace", se.javaDouble), h.dtrum.sendSessionProperties(se.javaLongOrObject, se.date, se.shortString, se.javaDouble);
949
+ Object.keys(d.flags).map(function(X) {
950
+ p(se, N + X, d.getValue(X, { skipAnalytics: !0 })), p(se, O + X, d.hasFeature(X, { skipAnalytics: !0 }));
951
+ }), Object.keys(((ee = d.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.traits) || {}).map(function(X) {
952
+ p(se, L + X, d.getTrait(X));
953
+ }), d.log("Sending javaLongOrObject traits to dynatrace", se.javaLongOrObject), d.log("Sending date traits to dynatrace", se.date), d.log("Sending shortString traits to dynatrace", se.shortString), d.log("Sending javaDouble to dynatrace", se.javaDouble), d.dtrum.sendSessionProperties(se.javaLongOrObject, se.date, se.shortString, se.javaDouble);
954
954
  } catch (X) {
955
955
  console.error(X);
956
956
  }
957
957
  }
958
958
  };
959
- return w.identity ? Promise.all([w.identity.traits && Object.keys(w.identity.traits).length || !w.identity.identifier ? h.getJSON(g + "identities/", "POST", JSON.stringify({ identifier: w.identity.identifier, transient: w.identity.transient, traits: Object.entries(w.identity.traits).map(function(M) {
959
+ return w.identity ? Promise.all([w.identity.traits && Object.keys(w.identity.traits).length || !w.identity.identifier ? d.getJSON(g + "identities/", "POST", JSON.stringify({ identifier: w.identity.identifier, transient: w.identity.transient, traits: Object.entries(w.identity.traits).map(function(M) {
960
960
  var H = M[0], _ = M[1];
961
961
  return { trait_key: H, trait_value: _ == null ? void 0 : _.value, transient: _ == null ? void 0 : _.transient };
962
962
  }).filter(function(M) {
963
- return M.trait_value !== void 0 || (h.log("Warning - attempted to set an undefined trait value for key", M.trait_key), !1);
964
- }) })) : h.getJSON(g + "identities/?identifier=" + encodeURIComponent(w.identity.identifier) + (w.identity.transient ? "&transient=true" : ""))]).then(function(M) {
965
- return h.evaluationContext.identity = i(i({}, h.evaluationContext.identity), { traits: {} }), R(M == null ? void 0 : M[0]);
963
+ return M.trait_value !== void 0 || (d.log("Warning - attempted to set an undefined trait value for key", M.trait_key), !1);
964
+ }) })) : d.getJSON(g + "identities/?identifier=" + encodeURIComponent(w.identity.identifier) + (w.identity.transient ? "&transient=true" : ""))]).then(function(M) {
965
+ return d.evaluationContext.identity = i(i({}, d.evaluationContext.identity), { traits: {} }), R(M == null ? void 0 : M[0]);
966
966
  }).catch(function(M) {
967
967
  var H = M.message, _ = new Error(H);
968
968
  return Promise.reject(_);
969
- }) : h.getJSON(g + "flags/").then(function(M) {
969
+ }) : d.getJSON(g + "flags/").then(function(M) {
970
970
  return R({ flags: M, traits: void 0 });
971
971
  });
972
972
  }, this.analyticsFlags = function() {
973
- var m = h.api;
974
- if (h.evaluationEvent && h.evaluationContext.environment && h.evaluationEvent[h.evaluationContext.environment.apiKey])
975
- return h.evaluationEvent && Object.getOwnPropertyNames(h.evaluationEvent).length !== 0 && Object.getOwnPropertyNames(h.evaluationEvent[h.evaluationContext.environment.apiKey]).length !== 0 ? h.getJSON(m + "analytics/flags/", "POST", JSON.stringify(h.evaluationEvent[h.evaluationContext.environment.apiKey])).then(function(g) {
976
- if (h.evaluationContext.environment) {
977
- var w = h.getState();
978
- h.evaluationEvent || (h.evaluationEvent = {}), h.evaluationEvent[h.evaluationContext.environment.apiKey] = {}, h.setState(i(i({}, w), { evaluationEvent: h.evaluationEvent })), h.updateEventStorage();
973
+ var m = d.api;
974
+ if (d.evaluationEvent && d.evaluationContext.environment && d.evaluationEvent[d.evaluationContext.environment.apiKey])
975
+ return d.evaluationEvent && Object.getOwnPropertyNames(d.evaluationEvent).length !== 0 && Object.getOwnPropertyNames(d.evaluationEvent[d.evaluationContext.environment.apiKey]).length !== 0 ? d.getJSON(m + "analytics/flags/", "POST", JSON.stringify(d.evaluationEvent[d.evaluationContext.environment.apiKey])).then(function(g) {
976
+ if (d.evaluationContext.environment) {
977
+ var w = d.getState();
978
+ d.evaluationEvent || (d.evaluationEvent = {}), d.evaluationEvent[d.evaluationContext.environment.apiKey] = {}, d.setState(i(i({}, w), { evaluationEvent: d.evaluationEvent })), d.updateEventStorage();
979
979
  }
980
980
  }).catch(function(g) {
981
- h.log("Exception fetching evaluationEvent", g);
981
+ d.log("Exception fetching evaluationEvent", g);
982
982
  }) : void 0;
983
983
  }, this.datadogRum = null, this.loadingState = { isLoading: !0, isFetching: !0, error: null, source: c.NONE }, this.canUseStorage = !1, this.analyticsInterval = null, this.api = null, this.cacheFlags = !1, this.ts = null, this.enableAnalytics = !1, this.enableLogs = !1, this.evaluationContext = {}, this.evaluationEvent = null, this.flags = null, this.getFlagInterval = null, this.headers = null, this.initialised = !1, this.oldFlags = null, this.onChange = null, this.onError = null, this.ticks = null, this.timer = null, this.dtrum = null, this.withTraits = null, this.cacheOptions = { ttl: 0, skipAPI: !1, loadStale: !1 }, this.getValue = function(m, g, w) {
984
- var x = h.flags && h.flags[m.toLowerCase().replace(/ /g, "_")], R = null;
985
- if (x && (R = x.value), g != null && g.skipAnalytics || w || h.evaluateFlag(m, "VALUE"), R === null && (g == null ? void 0 : g.fallback) !== void 0)
984
+ var x = d.flags && d.flags[m.toLowerCase().replace(/ /g, "_")], R = null;
985
+ if (x && (R = x.value), g != null && g.skipAnalytics || w || d.evaluateFlag(m, "VALUE"), R === null && (g == null ? void 0 : g.fallback) !== void 0)
986
986
  return g.fallback;
987
987
  if (g != null && g.json)
988
988
  try {
989
- return R === null ? (h.log("Tried to parse null flag as JSON: " + m), null) : JSON.parse(R);
989
+ return R === null ? (d.log("Tried to parse null flag as JSON: " + m), null) : JSON.parse(R);
990
990
  } catch {
991
991
  return g.fallback;
992
992
  }
993
993
  return R;
994
994
  }, this.getTrait = function(m) {
995
995
  var g, w;
996
- return ((g = h.evaluationContext.identity) === null || g === void 0 ? void 0 : g.traits) && ((w = h.evaluationContext.identity.traits[m.toLowerCase().replace(/ /g, "_")]) === null || w === void 0 ? void 0 : w.value);
996
+ return ((g = d.evaluationContext.identity) === null || g === void 0 ? void 0 : g.traits) && ((w = d.evaluationContext.identity.traits[m.toLowerCase().replace(/ /g, "_")]) === null || w === void 0 ? void 0 : w.value);
997
997
  }, this.getAllTraits = function() {
998
998
  var m;
999
- return Object.fromEntries(Object.entries(((m = h.evaluationContext.identity) === null || m === void 0 ? void 0 : m.traits) || {}).map(function(g) {
999
+ return Object.fromEntries(Object.entries(((m = d.evaluationContext.identity) === null || m === void 0 ? void 0 : m.traits) || {}).map(function(g) {
1000
1000
  var w = g[0], x = g[1];
1001
1001
  return [w, x == null ? void 0 : x.value];
1002
1002
  }));
1003
1003
  }, this.setContext = function(m) {
1004
- var g = y(m);
1005
- return h.evaluationContext = i(i({}, g), { environment: g.environment || h.evaluationContext.environment }), h.initialised ? h.getFlags() : Promise.resolve();
1004
+ var g = v(m);
1005
+ return d.evaluationContext = i(i({}, g), { environment: g.environment || d.evaluationContext.environment }), d.initialised ? d.getFlags() : Promise.resolve();
1006
1006
  }, this.getContext = function() {
1007
- return h.evaluationContext;
1007
+ return d.evaluationContext;
1008
1008
  }, this.updateContext = function(m) {
1009
- return h.setContext(i(i({}, h.getContext()), m));
1009
+ return d.setContext(i(i({}, d.getContext()), m));
1010
1010
  }, this.setTrait = function(m, g) {
1011
1011
  var w;
1012
- if (h.api)
1013
- return h.setContext(i(i({}, h.evaluationContext), { identity: i(i({}, h.evaluationContext.identity), { traits: i(i({}, (w = h.evaluationContext.identity) === null || w === void 0 ? void 0 : w.traits), S(Object.fromEntries([[m, g]]))) }) }));
1012
+ if (d.api)
1013
+ return d.setContext(i(i({}, d.evaluationContext), { identity: i(i({}, d.evaluationContext.identity), { traits: i(i({}, (w = d.evaluationContext.identity) === null || w === void 0 ? void 0 : w.traits), S(Object.fromEntries([[m, g]]))) }) }));
1014
1014
  }, this.setTraits = function(m) {
1015
1015
  var g;
1016
- if (h.api)
1017
- 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(w) {
1016
+ if (d.api)
1017
+ return d.setContext(i(i({}, d.evaluationContext), { identity: i(i({}, d.evaluationContext.identity), { traits: i(i({}, (g = d.evaluationContext.identity) === null || g === void 0 ? void 0 : g.traits), Object.fromEntries(Object.entries(m).map(function(w) {
1018
1018
  var x = w[0], R = w[1];
1019
- return [x, v(R) ? R : { value: R }];
1019
+ return [x, y(R) ? R : { value: R }];
1020
1020
  }))) }) }));
1021
1021
  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.");
1022
1022
  }, this.hasFeature = function(m, g) {
1023
- var w = typeof g == "object", x = h.flags && h.flags[m.toLowerCase().replace(/ /g, "_")], R = !1;
1024
- return !x && w && g.fallback !== void 0 ? R = g == null ? void 0 : g.fallback : x && x.enabled && (R = !0), (w && !g.skipAnalytics || !g) && h.evaluateFlag(m, "ENABLED"), R;
1023
+ var w = typeof g == "object", x = d.flags && d.flags[m.toLowerCase().replace(/ /g, "_")], R = !1;
1024
+ return !x && w && g.fallback !== void 0 ? R = g == null ? void 0 : g.fallback : x && x.enabled && (R = !0), (w && !g.skipAnalytics || !g) && d.evaluateFlag(m, "ENABLED"), R;
1025
1025
  }, this.getJSON = function(m, g, w) {
1026
- var x, R = h;
1026
+ var x, R = d;
1027
1027
  R.evaluationContext;
1028
1028
  var M = R.headers, H = { method: g || "GET", body: w, cache: "no-cache", headers: {} };
1029
- h.evaluationContext.environment && (H.headers["X-Environment-Key"] = h.evaluationContext.environment.apiKey), g && g !== "GET" && (H.headers["Content-Type"] = "application/json; charset=utf-8"), M && Object.assign(H.headers, M), u || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
1030
- var _ = "".concat((x = h.evaluationContext.identity) === null || x === void 0 ? void 0 : x.identifier);
1029
+ d.evaluationContext.environment && (H.headers["X-Environment-Key"] = d.evaluationContext.environment.apiKey), g && g !== "GET" && (H.headers["Content-Type"] = "application/json; charset=utf-8"), M && Object.assign(H.headers, M), u || console.error("Flagsmith: fetch is undefined, please specify a fetch implementation into flagsmith.init to support SSR.");
1030
+ var _ = "".concat((x = d.evaluationContext.identity) === null || x === void 0 ? void 0 : x.identifier);
1031
1031
  return u(m, H).then(function(W) {
1032
- var ee, ae, te = "".concat((ee = h.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.identifier);
1032
+ var ee, ae, te = "".concat((ee = d.evaluationContext.identity) === null || ee === void 0 ? void 0 : ee.identifier);
1033
1033
  if (_ === te) {
1034
1034
  var ne = (ae = W.headers) === null || ae === void 0 ? void 0 : ae.get("x-flagsmith-document-updated-at");
1035
1035
  if (ne)
@@ -1037,11 +1037,11 @@ var pn = { exports: {} };
1037
1037
  var ce = parseFloat(ne);
1038
1038
  if (isNaN(ce))
1039
1039
  return Promise.reject("Failed to parse x-flagsmith-document-updated-at");
1040
- h.timestamp = ce;
1040
+ d.timestamp = ce;
1041
1041
  } catch (le) {
1042
- h.log(le, "Failed to parse x-flagsmith-document-updated-at", ne);
1042
+ d.log(le, "Failed to parse x-flagsmith-document-updated-at", ne);
1043
1043
  }
1044
- return h.log("Fetch response: " + W.status + " " + (g || "GET") + 0 + m), W.text().then(function(le) {
1044
+ return d.log("Fetch response: " + W.status + " " + (g || "GET") + 0 + m), W.text().then(function(le) {
1045
1045
  var me = le;
1046
1046
  try {
1047
1047
  me = JSON.parse(le);
@@ -1050,49 +1050,49 @@ var pn = { exports: {} };
1050
1050
  return !me && W.status && (me = "API Response: ".concat(W.status)), W.status && W.status >= 200 && W.status < 300 ? me : Promise.reject(new Error(me));
1051
1051
  });
1052
1052
  }
1053
- h.log("Received response with identity mismatch, ignoring response. Requested: ".concat(_, ", Current: ").concat(te));
1053
+ d.log("Received response with identity mismatch, ignoring response. Requested: ".concat(_, ", Current: ").concat(te));
1054
1054
  });
1055
1055
  }, this.evaluateFlag = function(m, g) {
1056
- if (h.datadogRum && (h.datadogRum.client.addFeatureFlagEvaluation ? g === "VALUE" ? h.datadogRum.client.addFeatureFlagEvaluation(N + m, h.getValue(m, {}, !0)) : h.datadogRum.client.addFeatureFlagEvaluation(O + m, h.hasFeature(m, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), h.enableAnalytics) {
1057
- if (!h.evaluationEvent || !h.evaluationContext.environment)
1056
+ if (d.datadogRum && (d.datadogRum.client.addFeatureFlagEvaluation ? g === "VALUE" ? d.datadogRum.client.addFeatureFlagEvaluation(N + m, d.getValue(m, {}, !0)) : d.datadogRum.client.addFeatureFlagEvaluation(O + m, d.hasFeature(m, !0)) : console.error("Flagsmith: Your datadog RUM client does not support the function addFeatureFlagEvaluation, please update it.")), d.enableAnalytics) {
1057
+ if (!d.evaluationEvent || !d.evaluationContext.environment)
1058
1058
  return;
1059
- h.evaluationEvent[h.evaluationContext.environment.apiKey] || (h.evaluationEvent[h.evaluationContext.environment.apiKey] = {}), h.evaluationEvent[h.evaluationContext.environment.apiKey][m] === void 0 && (h.evaluationEvent[h.evaluationContext.environment.apiKey][m] = 0), h.evaluationEvent[h.evaluationContext.environment.apiKey][m] += 1;
1059
+ d.evaluationEvent[d.evaluationContext.environment.apiKey] || (d.evaluationEvent[d.evaluationContext.environment.apiKey] = {}), d.evaluationEvent[d.evaluationContext.environment.apiKey][m] === void 0 && (d.evaluationEvent[d.evaluationContext.environment.apiKey][m] = 0), d.evaluationEvent[d.evaluationContext.environment.apiKey][m] += 1;
1060
1060
  }
1061
- h.updateEventStorage();
1061
+ d.updateEventStorage();
1062
1062
  }, this._onChange = function(m, g, w) {
1063
1063
  var x, R;
1064
- h.setLoadingState(w), (x = h.onChange) === null || x === void 0 || x.call(h, m, g, h.loadingState), (R = h._trigger) === null || R === void 0 || R.call(h);
1064
+ d.setLoadingState(w), (x = d.onChange) === null || x === void 0 || x.call(d, m, g, d.loadingState), (R = d._trigger) === null || R === void 0 || R.call(d);
1065
1065
  }, u = f.fetch ? f.fetch : typeof fetch < "u" ? fetch : qe == null ? void 0 : qe.fetch, this.canUseStorage = typeof window < "u" || !!f.browserlessStorage, this.log("Constructing flagsmith instance " + f), f.eventSource && (T = f.eventSource), f.AsyncStorage && (A = f.AsyncStorage);
1066
1066
  }
1067
1067
  return b.prototype.init = function(f) {
1068
- var h, m, g;
1068
+ var d, m, g;
1069
1069
  return r(this, void 0, void 0, function() {
1070
1070
  var w, x, R, M, H, _, W, ee, ae, te, ne, ce, le, me, Ke, Xe, Fe, se, X, Dt, Je, Wn, Ye, Lt, Gn, Vn, Ft, Kn, Mt, Qe, Me, Xn, ie = this;
1071
1071
  return o(this, function(pe) {
1072
1072
  switch (pe.label) {
1073
1073
  case 0:
1074
- w = y(f.evaluationContext || this.evaluationContext), pe.label = 1;
1074
+ w = v(f.evaluationContext || this.evaluationContext), pe.label = 1;
1075
1075
  case 1:
1076
1076
  if (pe.trys.push([1, 13, , 14]), x = f.environmentID, R = f.api, M = R === void 0 ? k : R, H = f.headers, _ = f.onChange, W = f.cacheFlags, ee = f.datadogRum, ae = f.onError, te = f.defaultFlags, ne = f.fetch, ce = f.preventFetch, le = f.enableLogs, me = f.enableDynatrace, Ke = f.enableAnalytics, Xe = f.realtime, Fe = f.eventSourceUrl, se = Fe === void 0 ? "https://realtime.flagsmith.com/" : Fe, X = f.AsyncStorage, Dt = f.identity, Je = f.traits, Wn = f.state, Ye = f.cacheOptions, Lt = f.angularHttpClient, Gn = f._trigger, Vn = f._triggerLoadingState, w.environment = x ? { apiKey: x } : w.environment, !w.environment || !w.environment.apiKey)
1077
1077
  throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
1078
- if (w.identity = Dt || Je ? { identifier: Dt, traits: Je ? Object.fromEntries(Object.entries(Je).map(function(de) {
1079
- return [de[0], { value: de[1] }];
1080
- })) : {} } : w.identity, this.evaluationContext = w, this.api = M, this.headers = H, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = _, Ft = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Gn || this._trigger, this._triggerLoadingState = Vn || this._triggerLoadingState, this.onError = function(de) {
1081
- ie.setLoadingState(i(i({}, ie.loadingState), { isFetching: !1, isLoading: !1, error: de })), ae == null || ae(de);
1082
- }, this.enableLogs = le || !1, this.cacheOptions = Ye ? { skipAPI: !!Ye.skipAPI, ttl: Ye.ttl || 0, loadStale: !!Ye.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 && (u = ne), this.enableAnalytics = Ke || !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 = A !== void 0 && !!W, X && (A = X), Xe && typeof window < "u" && this.setupRealtime(se, w.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = i(i({}, this.loadingState), { isLoading: !1, source: c.DEFAULT_FLAGS })), this.setState(Wn), this.log("Initialising with properties", f, this), me && (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), Lt && (u = /* @__PURE__ */ function(de) {
1083
- return function(be, ve) {
1084
- var Ee = ve.headers, Y = ve.method, Pe = ve.body;
1078
+ if (w.identity = Dt || Je ? { identifier: Dt, traits: Je ? Object.fromEntries(Object.entries(Je).map(function(he) {
1079
+ return [he[0], { value: he[1] }];
1080
+ })) : {} } : w.identity, this.evaluationContext = w, this.api = M, this.headers = H, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = _, Ft = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Gn || this._trigger, this._triggerLoadingState = Vn || this._triggerLoadingState, this.onError = function(he) {
1081
+ ie.setLoadingState(i(i({}, ie.loadingState), { isFetching: !1, isLoading: !1, error: he })), ae == null || ae(he);
1082
+ }, this.enableLogs = le || !1, this.cacheOptions = Ye ? { skipAPI: !!Ye.skipAPI, ttl: Ye.ttl || 0, loadStale: !!Ye.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 && (u = ne), this.enableAnalytics = Ke || !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 = A !== void 0 && !!W, X && (A = X), Xe && typeof window < "u" && this.setupRealtime(se, w.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = i(i({}, this.loadingState), { isLoading: !1, source: c.DEFAULT_FLAGS })), this.setState(Wn), this.log("Initialising with properties", f, this), me && (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), Lt && (u = /* @__PURE__ */ function(he) {
1083
+ return function(be, ye) {
1084
+ var Ee = ye.headers, Y = ye.method, Pe = ye.body;
1085
1085
  return new Promise(function(Re) {
1086
1086
  switch (Y) {
1087
1087
  case "GET":
1088
- return de.get(be, { headers: Ee }).subscribe(function(ke) {
1088
+ return he.get(be, { headers: Ee }).subscribe(function(ke) {
1089
1089
  Re({ ok: !0, text: function() {
1090
1090
  return Promise.resolve(ke);
1091
1091
  } });
1092
1092
  });
1093
1093
  case "POST":
1094
1094
  case "PUT":
1095
- return de.post(be, Pe, { headers: Ee }).subscribe(function(ke) {
1095
+ return he.post(be, Pe, { headers: Ee }).subscribe(function(ke) {
1096
1096
  Re({ ok: !0, text: function() {
1097
1097
  return Promise.resolve(ke);
1098
1098
  } });
@@ -1100,36 +1100,36 @@ var pn = { exports: {} };
1100
1100
  }
1101
1101
  });
1102
1102
  };
1103
- }(Lt)), A && this.canUseStorage && A.getItem(D).then(function(de) {
1103
+ }(Lt)), A && this.canUseStorage && A.getItem(D).then(function(he) {
1104
1104
  try {
1105
- ie.evaluationEvent = JSON.parse(de) || {};
1105
+ ie.evaluationEvent = JSON.parse(he) || {};
1106
1106
  } catch {
1107
1107
  ie.evaluationEvent = {};
1108
1108
  }
1109
1109
  ie.analyticsInterval = setInterval(ie.analyticsFlags, ie.ticks);
1110
- }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), A && this.canUseStorage && A.getItem(D, function(de, be) {
1110
+ }), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), A && this.canUseStorage && A.getItem(D, function(he, be) {
1111
1111
  if (be && ie.evaluationContext.environment) {
1112
- var ve = JSON.parse(be);
1113
- if (ve[ie.evaluationContext.environment.apiKey]) {
1112
+ var ye = JSON.parse(be);
1113
+ if (ye[ie.evaluationContext.environment.apiKey]) {
1114
1114
  var Ee = ie.getState();
1115
- ie.log("Retrieved events from cache", be), ie.setState(i(i({}, Ee), { evaluationEvent: ve[ie.evaluationContext.environment.apiKey] }));
1115
+ ie.log("Retrieved events from cache", be), ie.setState(i(i({}, Ee), { evaluationEvent: ye[ie.evaluationContext.environment.apiKey] }));
1116
1116
  }
1117
1117
  }
1118
1118
  })), !W)
1119
1119
  return [3, 9];
1120
1120
  if (!A || !this.canUseStorage)
1121
1121
  return [3, 8];
1122
- Kn = function(de, be) {
1122
+ Kn = function(he, be) {
1123
1123
  return r(ie, void 0, void 0, function() {
1124
- var ve, Ee, Y, Pe, Re, ke, Pt, Jn, Bt, jt, zt, Ut, Ht, $t, qt, Wt, Gt, Vt, Kt, Xt, Jt, Yt, Qt, Zt;
1124
+ var ye, Ee, Y, Pe, Re, ke, Pt, Jn, Bt, jt, zt, Ut, Ht, $t, qt, Wt, Gt, Vt, Kt, Xt, Jt, Yt, Qt, Zt;
1125
1125
  return o(this, function(Ie) {
1126
1126
  switch (Ie.label) {
1127
1127
  case 0:
1128
1128
  if (!be)
1129
1129
  return [3, 7];
1130
- ve = null, Ee = null, Ie.label = 1;
1130
+ ye = null, Ee = null, Ie.label = 1;
1131
1131
  case 1:
1132
- return Ie.trys.push([1, 5, , 6]), Y = JSON.parse(be), Pe = !1, Re = !1, Y && Y.api === this.api && ((jt = (Bt = Y.evaluationContext) === null || Bt === void 0 ? void 0 : Bt.environment) === null || jt === void 0 ? void 0 : jt.apiKey) === ((zt = this.evaluationContext.environment) === null || zt === void 0 ? void 0 : zt.apiKey) && (ke = !0, this.evaluationContext.identity && ((Ht = (Ut = Y.evaluationContext) === null || Ut === void 0 ? void 0 : Ut.identity) === null || Ht === void 0 ? void 0 : Ht.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((qt = ($t = Y.evaluationContext) === null || $t === void 0 ? void 0 : $t.identity) === null || qt === void 0 ? void 0 : qt.identifier) + " to " + this.evaluationContext.identity.identifier), ke = !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"), ke = !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"), Re = !0, ke = !0)), ke && (Pe = !0, Ee = d((Wt = this.evaluationContext.identity) === null || Wt === void 0 ? void 0 : Wt.traits, (Vt = (Gt = Y.evaluationContext) === null || Gt === void 0 ? void 0 : Gt.identity) === null || Vt === void 0 ? void 0 : Vt.traits), ve = d(this.flags, Y.flags), this.setState(i(i({}, Y), { evaluationContext: y(i(i({}, Y.evaluationContext), { identity: !((Kt = Y.evaluationContext) === null || Kt === void 0) && Kt.identity ? i(i({}, (Xt = Y.evaluationContext) === null || Xt === void 0 ? void 0 : Xt.identity), { traits: i(i({}, ((Yt = (Jt = Y.evaluationContext) === null || Jt === void 0 ? void 0 : Jt.identity) === null || Yt === void 0 ? void 0 : Yt.traits) || {}), Je || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", Y))), Pe ? (Pt = !ce && (!this.cacheOptions.skipAPI || Re), this._onChange(null, { isFromServer: !1, flagsChanged: ve, traitsChanged: Ee }, this._loadedState(null, c.CACHE, Pt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Pe && !Re && this.log("Skipping API, using cache"), Pt && this.getFlags(), [3, 4]) : [3, 2];
1132
+ return Ie.trys.push([1, 5, , 6]), Y = JSON.parse(be), Pe = !1, Re = !1, Y && Y.api === this.api && ((jt = (Bt = Y.evaluationContext) === null || Bt === void 0 ? void 0 : Bt.environment) === null || jt === void 0 ? void 0 : jt.apiKey) === ((zt = this.evaluationContext.environment) === null || zt === void 0 ? void 0 : zt.apiKey) && (ke = !0, this.evaluationContext.identity && ((Ht = (Ut = Y.evaluationContext) === null || Ut === void 0 ? void 0 : Ut.identity) === null || Ht === void 0 ? void 0 : Ht.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((qt = ($t = Y.evaluationContext) === null || $t === void 0 ? void 0 : $t.identity) === null || qt === void 0 ? void 0 : qt.identifier) + " to " + this.evaluationContext.identity.identifier), ke = !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"), ke = !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"), Re = !0, ke = !0)), ke && (Pe = !0, Ee = h((Wt = this.evaluationContext.identity) === null || Wt === void 0 ? void 0 : Wt.traits, (Vt = (Gt = Y.evaluationContext) === null || Gt === void 0 ? void 0 : Gt.identity) === null || Vt === void 0 ? void 0 : Vt.traits), ye = h(this.flags, Y.flags), this.setState(i(i({}, Y), { evaluationContext: v(i(i({}, Y.evaluationContext), { identity: !((Kt = Y.evaluationContext) === null || Kt === void 0) && Kt.identity ? i(i({}, (Xt = Y.evaluationContext) === null || Xt === void 0 ? void 0 : Xt.identity), { traits: i(i({}, ((Yt = (Jt = Y.evaluationContext) === null || Jt === void 0 ? void 0 : Jt.identity) === null || Yt === void 0 ? void 0 : Yt.traits) || {}), Je || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", Y))), Pe ? (Pt = !ce && (!this.cacheOptions.skipAPI || Re), this._onChange(null, { isFromServer: !1, flagsChanged: ye, traitsChanged: Ee }, this._loadedState(null, c.CACHE, Pt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Pe && !Re && this.log("Skipping API, using cache"), Pt && this.getFlags(), [3, 4]) : [3, 2];
1133
1133
  case 2:
1134
1134
  return ce ? [3, 4] : [4, this.getFlags()];
1135
1135
  case 3:
@@ -1146,11 +1146,11 @@ var pn = { exports: {} };
1146
1146
  return Ie.sent(), [3, 10];
1147
1147
  case 9:
1148
1148
  if (te)
1149
- this._onChange(null, { isFromServer: !1, flagsChanged: d({}, this.flags), traitsChanged: d({}, (Qt = this.evaluationContext.identity) === null || Qt === void 0 ? void 0 : Qt.traits) }, this._loadedState(null, c.DEFAULT_FLAGS));
1149
+ this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (Qt = this.evaluationContext.identity) === null || Qt === void 0 ? void 0 : Qt.traits) }, this._loadedState(null, c.DEFAULT_FLAGS));
1150
1150
  else {
1151
1151
  if (!this.flags)
1152
1152
  throw new Error(Ft);
1153
- this._onChange(null, { isFromServer: !1, flagsChanged: d({}, this.flags), traitsChanged: d({}, (Zt = this.evaluationContext.identity) === null || Zt === void 0 ? void 0 : Zt.traits) }, this._loadedState(null, c.DEFAULT_FLAGS));
1153
+ this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (Zt = this.evaluationContext.identity) === null || Zt === void 0 ? void 0 : Zt.traits) }, this._loadedState(null, c.DEFAULT_FLAGS));
1154
1154
  }
1155
1155
  Ie.label = 10;
1156
1156
  case 10:
@@ -1178,8 +1178,8 @@ var pn = { exports: {} };
1178
1178
  return pe.sent(), [3, 12];
1179
1179
  case 11:
1180
1180
  if (te)
1181
- this._onChange(null, { isFromServer: !1, flagsChanged: d({}, te), traitsChanged: d({}, (h = w.identity) === null || h === void 0 ? void 0 : h.traits) }, this._loadedState(null, c.DEFAULT_FLAGS));
1182
- else if (this.flags && (Qe = null, Object.keys(this.flags).length === 0 && (Qe = Ft), this._onChange(null, { isFromServer: !1, flagsChanged: d({}, this.flags), traitsChanged: d({}, (m = w.identity) === null || m === void 0 ? void 0 : m.traits) }, this._loadedState(Qe, c.DEFAULT_FLAGS)), Qe))
1181
+ this._onChange(null, { isFromServer: !1, flagsChanged: h({}, te), traitsChanged: h({}, (d = w.identity) === null || d === void 0 ? void 0 : d.traits) }, this._loadedState(null, c.DEFAULT_FLAGS));
1182
+ else if (this.flags && (Qe = null, Object.keys(this.flags).length === 0 && (Qe = Ft), this._onChange(null, { isFromServer: !1, flagsChanged: h({}, this.flags), traitsChanged: h({}, (m = w.identity) === null || m === void 0 ? void 0 : m.traits) }, this._loadedState(Qe, c.DEFAULT_FLAGS)), Qe))
1183
1183
  throw new Error(Qe);
1184
1184
  pe.label = 12;
1185
1185
  case 12:
@@ -1191,14 +1191,14 @@ var pn = { exports: {} };
1191
1191
  }
1192
1192
  });
1193
1193
  });
1194
- }, b.prototype._loadedState = function(f, h, m) {
1195
- return f === void 0 && (f = null), m === void 0 && (m = !1), { error: f, isFetching: m, isLoading: !1, source: h };
1194
+ }, b.prototype._loadedState = function(f, d, m) {
1195
+ return f === void 0 && (f = null), m === void 0 && (m = !1), { error: f, isFetching: m, isLoading: !1, source: d };
1196
1196
  }, b.prototype.getAllFlags = function() {
1197
1197
  return this.flags;
1198
- }, b.prototype.identify = function(f, h, m) {
1199
- 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) {
1198
+ }, b.prototype.identify = function(f, d, m) {
1199
+ 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), d && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(d).map(function(g) {
1200
1200
  var w = g[0], x = g[1];
1201
- return [w, v(x) ? x : { value: x }];
1201
+ return [w, y(x) ? x : { value: x }];
1202
1202
  }))), this.initialised ? this.getFlags() : Promise.resolve();
1203
1203
  }, b.prototype.getState = function() {
1204
1204
  return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
@@ -1211,8 +1211,8 @@ var pn = { exports: {} };
1211
1211
  }, b.prototype.stopListening = function() {
1212
1212
  this.getFlagInterval && (clearInterval(this.getFlagInterval), this.getFlagInterval = null);
1213
1213
  }, b.prototype.log = function() {
1214
- for (var f = [], h = 0; h < arguments.length; h++)
1215
- f[h] = arguments[h];
1214
+ for (var f = [], d = 0; d < arguments.length; d++)
1215
+ f[d] = arguments[d];
1216
1216
  this.enableLogs && console.log.apply(this, l(["FLAGSMITH:", (/* @__PURE__ */ new Date()).valueOf() - (this.timer || 0), "ms"], f, !0));
1217
1217
  }, b.prototype.updateStorage = function() {
1218
1218
  if (this.cacheFlags) {
@@ -1226,10 +1226,10 @@ var pn = { exports: {} };
1226
1226
  A.setItem(D, f);
1227
1227
  }
1228
1228
  }, b.prototype.setLoadingState = function(f) {
1229
- var h;
1230
- a(f, this.loadingState) || (this.loadingState = i({}, f), this.log("Loading state changed", f), (h = this._triggerLoadingState) === null || h === void 0 || h.call(this));
1231
- }, b.prototype.setupRealtime = function(f, h) {
1232
- var m = this, g = f + "sse/environments/" + h + "/stream";
1229
+ var d;
1230
+ a(f, this.loadingState) || (this.loadingState = i({}, f), this.log("Loading state changed", f), (d = this._triggerLoadingState) === null || d === void 0 || d.call(this));
1231
+ }, b.prototype.setupRealtime = function(f, d) {
1232
+ var m = this, g = f + "sse/environments/" + d + "/stream";
1233
1233
  T ? this.eventSource || (this.log("Creating event source with url " + g), this.eventSource = new T(g), this.eventSource.addEventListener("environment_updated", function(w) {
1234
1234
  var x;
1235
1235
  try {
@@ -1242,37 +1242,37 @@ var pn = { exports: {} };
1242
1242
  }, b;
1243
1243
  }();
1244
1244
  function E(b) {
1245
- var f = b.fetch, h = b.AsyncStorage, m = b.eventSource;
1246
- return new I({ fetch: f, AsyncStorage: h, eventSource: m });
1245
+ var f = b.fetch, d = b.AsyncStorage, m = b.eventSource;
1246
+ return new I({ fetch: f, AsyncStorage: d, eventSource: m });
1247
1247
  }
1248
1248
  var P, V = (P = function(b, f) {
1249
- return P = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, m) {
1250
- h.__proto__ = m;
1251
- } || function(h, m) {
1249
+ return P = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d, m) {
1250
+ d.__proto__ = m;
1251
+ } || function(d, m) {
1252
1252
  for (var g in m)
1253
- Object.prototype.hasOwnProperty.call(m, g) && (h[g] = m[g]);
1253
+ Object.prototype.hasOwnProperty.call(m, g) && (d[g] = m[g]);
1254
1254
  }, P(b, f);
1255
1255
  }, function(b, f) {
1256
1256
  if (typeof f != "function" && f !== null)
1257
1257
  throw new TypeError("Class extends value " + String(f) + " is not a constructor or null");
1258
- function h() {
1258
+ function d() {
1259
1259
  this.constructor = b;
1260
1260
  }
1261
- P(b, f), b.prototype = f === null ? Object.create(f) : (h.prototype = f.prototype, new h());
1261
+ P(b, f), b.prototype = f === null ? Object.create(f) : (d.prototype = f.prototype, new d());
1262
1262
  }), j = function(b) {
1263
- var f = typeof Symbol == "function" && Symbol.iterator, h = f && b[f], m = 0;
1264
- if (h)
1265
- return h.call(b);
1263
+ var f = typeof Symbol == "function" && Symbol.iterator, d = f && b[f], m = 0;
1264
+ if (d)
1265
+ return d.call(b);
1266
1266
  if (b && typeof b.length == "number")
1267
1267
  return { next: function() {
1268
1268
  return b && m >= b.length && (b = void 0), { value: b && b[m++], done: !b };
1269
1269
  } };
1270
1270
  throw new TypeError(f ? "Object is not iterable." : "Symbol.iterator is not defined.");
1271
1271
  }, q = function(b, f) {
1272
- var h = typeof Symbol == "function" && b[Symbol.iterator];
1273
- if (!h)
1272
+ var d = typeof Symbol == "function" && b[Symbol.iterator];
1273
+ if (!d)
1274
1274
  return b;
1275
- var m, g, w = h.call(b), x = [];
1275
+ var m, g, w = d.call(b), x = [];
1276
1276
  try {
1277
1277
  for (; (f === void 0 || f-- > 0) && !(m = w.next()).done; )
1278
1278
  x.push(m.value);
@@ -1280,15 +1280,15 @@ var pn = { exports: {} };
1280
1280
  g = { error: R };
1281
1281
  } finally {
1282
1282
  try {
1283
- m && !m.done && (h = w.return) && h.call(w);
1283
+ m && !m.done && (d = w.return) && d.call(w);
1284
1284
  } finally {
1285
1285
  if (g)
1286
1286
  throw g.error;
1287
1287
  }
1288
1288
  }
1289
1289
  return x;
1290
- }, C = function(b, f, h) {
1291
- if (h || arguments.length === 2)
1290
+ }, C = function(b, f, d) {
1291
+ if (d || arguments.length === 2)
1292
1292
  for (var m, g = 0, w = f.length; g < w; g++)
1293
1293
  !m && g in f || (m || (m = Array.prototype.slice.call(f, 0, g)), m[g] = f[g]);
1294
1294
  return b.concat(m || Array.prototype.slice.call(f));
@@ -1299,9 +1299,9 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1299
1299
  }
1300
1300
  return V(f, b), f;
1301
1301
  }(Error), G = function() {
1302
- function b(f, h) {
1302
+ function b(f, d) {
1303
1303
  var m = this;
1304
- if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = h != null ? Object.assign({}, h) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = f.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function")
1304
+ if (this.CONNECTING = 0, this.OPEN = 1, this.CLOSED = 2, this._configuration = d != null ? Object.assign({}, d) : void 0, this.withCredentials = !1, this._eventSource = null, this._lastEventId = null, this._timer = null, this._listeners = { open: [], error: [], message: [] }, this.url = f.toString(), this.readyState = this.CONNECTING, this.max_retry_time = 3e3, this.eventSourceClass = globalThis.FlagsmithEventSource, this._configuration != null && (this._configuration.lastEventId && (this._lastEventId = this._configuration.lastEventId, delete this._configuration.lastEventId), this._configuration.max_retry_time && (this.max_retry_time = this._configuration.max_retry_time, delete this._configuration.max_retry_time), this._configuration.eventSourceClass && (this.eventSourceClass = this._configuration.eventSourceClass, delete this._configuration.eventSourceClass)), this.eventSourceClass == null || typeof this.eventSourceClass != "function")
1305
1305
  throw new F();
1306
1306
  this._onevent_wrapped = function(g) {
1307
1307
  m._onevent(g);
@@ -1310,7 +1310,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1310
1310
  return b.prototype.dispatchEvent = function(f) {
1311
1311
  throw new Error("Method not implemented.");
1312
1312
  }, b.prototype._start = function() {
1313
- var f, h, m = this, g = this.url;
1313
+ var f, d, m = this, g = this.url;
1314
1314
  this._lastEventId && (g.indexOf("?") === -1 ? g += "?" : g += "&", g += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(g, this._configuration), this._eventSource.onopen = function(M) {
1315
1315
  m._onopen(M);
1316
1316
  }, this._eventSource.onerror = function(M) {
@@ -1327,7 +1327,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1327
1327
  f = { error: M };
1328
1328
  } finally {
1329
1329
  try {
1330
- x && !x.done && (h = w.return) && h.call(w);
1330
+ x && !x.done && (d = w.return) && d.call(w);
1331
1331
  } finally {
1332
1332
  if (f)
1333
1333
  throw f.error;
@@ -1336,16 +1336,16 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1336
1336
  }, b.prototype._onopen = function(f) {
1337
1337
  this.readyState === 0 && (this.readyState = 1, this.onopen(f));
1338
1338
  }, b.prototype._onerror = function(f) {
1339
- var h = this;
1339
+ var d = this;
1340
1340
  if (this.readyState === 1 && (this.readyState = 0, this.onerror(f)), this._eventSource) {
1341
1341
  this._eventSource.close(), this._eventSource = null;
1342
1342
  var m = Math.round(this.max_retry_time * Math.random());
1343
1343
  this._timer = setTimeout(function() {
1344
- return h._start();
1344
+ return d._start();
1345
1345
  }, m);
1346
1346
  }
1347
1347
  }, b.prototype._onevent = function(f) {
1348
- var h, m;
1348
+ var d, m;
1349
1349
  f && f.lastEventId && (this._lastEventId = f.lastEventId);
1350
1350
  var g = this._listeners[f.type];
1351
1351
  if (g != null)
@@ -1353,13 +1353,13 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1353
1353
  for (var w = j(C([], q(g), !1)), x = w.next(); !x.done; x = w.next())
1354
1354
  x.value.call(this, f);
1355
1355
  } catch (R) {
1356
- h = { error: R };
1356
+ d = { error: R };
1357
1357
  } finally {
1358
1358
  try {
1359
1359
  x && !x.done && (m = w.return) && m.call(w);
1360
1360
  } finally {
1361
- if (h)
1362
- throw h.error;
1361
+ if (d)
1362
+ throw d.error;
1363
1363
  }
1364
1364
  }
1365
1365
  f.type === "message" && this.onmessage(f);
@@ -1368,20 +1368,20 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1368
1368
  }, b.prototype.onmessage = function(f) {
1369
1369
  }, b.prototype.close = function() {
1370
1370
  this._timer && (clearTimeout(this._timer), this._timer = null), this._eventSource && (this._eventSource.close(), this._eventSource = null), this.readyState = 2;
1371
- }, b.prototype.addEventListener = function(f, h, m) {
1371
+ }, b.prototype.addEventListener = function(f, d, m) {
1372
1372
  this._listeners[f] == null && (this._listeners[f] = [], this._eventSource != null && this._eventSource.addEventListener(f, this._onevent_wrapped));
1373
1373
  var g = this._listeners[f];
1374
- g.includes(h) || (this._listeners[f] = C(C([], q(g), !1), [h], !1));
1375
- }, b.prototype.removeEventListener = function(f, h, m) {
1374
+ g.includes(d) || (this._listeners[f] = C(C([], q(g), !1), [d], !1));
1375
+ }, b.prototype.removeEventListener = function(f, d, m) {
1376
1376
  var g = this._listeners[f];
1377
1377
  this._listeners[f] = g.filter(function(w) {
1378
- return w !== h;
1378
+ return w !== d;
1379
1379
  });
1380
1380
  }, b;
1381
1381
  }();
1382
1382
  globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
1383
1383
  var K = function(b, f) {
1384
- return f = f || {}, new Promise(function(h, m) {
1384
+ return f = f || {}, new Promise(function(d, m) {
1385
1385
  var g = new XMLHttpRequest(), w = [], x = [], R = {}, M = function() {
1386
1386
  return { ok: (g.status / 100 | 0) == 2, statusText: g.statusText, status: g.status, url: g.responseURL, text: function() {
1387
1387
  return Promise.resolve(g.responseText);
@@ -1402,7 +1402,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
1402
1402
  for (var H in g.open(f.method || "get", b, !0), g.onload = function() {
1403
1403
  g.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(_, W, ee) {
1404
1404
  w.push(W = W.toLowerCase()), x.push([W, ee]), R[W] = R[W] ? R[W] + "," + ee : ee;
1405
- }), h(M());
1405
+ }), d(M());
1406
1406
  }, g.onerror = m, g.withCredentials = f.credentials == "include", f.headers)
1407
1407
  g.setRequestHeader(H, f.headers[H]);
1408
1408
  g.send(f.body || null);
@@ -1422,8 +1422,8 @@ var Qn = {}, Pi = function(t, e, n, s, i) {
1422
1422
  return r.onmessage = function(o) {
1423
1423
  var l = o.data, a = l.$e$;
1424
1424
  if (a) {
1425
- var d = new Error(a[0]);
1426
- d.code = a[1], d.stack = a[2], i(d, null);
1425
+ var h = new Error(a[0]);
1426
+ h.code = a[1], h.stack = a[2], i(h, null);
1427
1427
  } else
1428
1428
  i(null, l);
1429
1429
  }, r.postMessage(n, s), r;
@@ -1505,10 +1505,10 @@ var Qn = {}, Pi = function(t, e, n, s, i) {
1505
1505
  return { b: n, r: i };
1506
1506
  }, Ks = Vs(_t, 2), Bi = Ks.b, bt = Ks.r;
1507
1507
  Bi[28] = 258, bt[258] = 28;
1508
- var ji = Vs(Nt, 0), mn = ji.r, vt = new re(32768);
1508
+ var ji = Vs(Nt, 0), mn = ji.r, yt = new re(32768);
1509
1509
  for (var J = 0; J < 32768; ++J) {
1510
1510
  var Ce = (J & 43690) >> 1 | (J & 21845) << 1;
1511
- Ce = (Ce & 52428) >> 2 | (Ce & 13107) << 2, Ce = (Ce & 61680) >> 4 | (Ce & 3855) << 4, vt[J] = ((Ce & 65280) >> 8 | (Ce & 255) << 8) >> 1;
1511
+ Ce = (Ce & 52428) >> 2 | (Ce & 13107) << 2, Ce = (Ce & 61680) >> 4 | (Ce & 3855) << 4, yt[J] = ((Ce & 65280) >> 8 | (Ce & 255) << 8) >> 1;
1512
1512
  }
1513
1513
  var We = function(t, e, n) {
1514
1514
  for (var s = t.length, i = 0, r = new re(e); i < s; ++i)
@@ -1522,11 +1522,11 @@ var We = function(t, e, n) {
1522
1522
  var a = 15 - e;
1523
1523
  for (i = 0; i < s; ++i)
1524
1524
  if (t[i])
1525
- for (var d = i << 4 | t[i], c = e - t[i], u = o[t[i] - 1]++ << c, p = u | (1 << c) - 1; u <= p; ++u)
1526
- l[vt[u] >> a] = d;
1525
+ for (var h = i << 4 | t[i], c = e - t[i], u = o[t[i] - 1]++ << c, p = u | (1 << c) - 1; u <= p; ++u)
1526
+ l[yt[u] >> a] = h;
1527
1527
  } else
1528
1528
  for (l = new re(s), i = 0; i < s; ++i)
1529
- t[i] && (l[i] = vt[o[t[i] - 1]++] >> 15 - t[i]);
1529
+ t[i] && (l[i] = yt[o[t[i] - 1]++] >> 15 - t[i]);
1530
1530
  return l;
1531
1531
  }, Oe = new fe(288);
1532
1532
  for (var J = 0; J < 144; ++J)
@@ -1565,7 +1565,7 @@ var Xs = /* @__PURE__ */ We(Oe, 9, 0), Js = /* @__PURE__ */ We(nt, 5, 0), An = f
1565
1565
  if (s.code = t, Error.captureStackTrace && Error.captureStackTrace(s, Qs), !n)
1566
1566
  throw s;
1567
1567
  return s;
1568
- }, ye = function(t, e, n) {
1568
+ }, ve = function(t, e, n) {
1569
1569
  n <<= e & 7;
1570
1570
  var s = e / 8 | 0;
1571
1571
  t[s] |= n, t[s + 1] |= n >> 8;
@@ -1573,7 +1573,7 @@ var Xs = /* @__PURE__ */ We(Oe, 9, 0), Js = /* @__PURE__ */ We(nt, 5, 0), An = f
1573
1573
  n <<= e & 7;
1574
1574
  var s = e / 8 | 0;
1575
1575
  t[s] |= n, t[s + 1] |= n >> 8, t[s + 2] |= n >> 16;
1576
- }, ht = function(t, e) {
1576
+ }, dt = function(t, e) {
1577
1577
  for (var n = [], s = 0; s < t.length; ++s)
1578
1578
  t[s] && n.push({ s, f: t[s] });
1579
1579
  var i = n.length, r = n.slice();
@@ -1586,36 +1586,36 @@ var Xs = /* @__PURE__ */ We(Oe, 9, 0), Js = /* @__PURE__ */ We(nt, 5, 0), An = f
1586
1586
  n.sort(function(N, O) {
1587
1587
  return N.f - O.f;
1588
1588
  }), n.push({ s: -1, f: 25001 });
1589
- var l = n[0], a = n[1], d = 0, c = 1, u = 2;
1589
+ var l = n[0], a = n[1], h = 0, c = 1, u = 2;
1590
1590
  for (n[0] = { s: -1, f: l.f + a.f, l, r: a }; c != i - 1; )
1591
- l = n[n[d].f < n[u].f ? d++ : u++], a = n[d != c && n[d].f < n[u].f ? d++ : u++], n[c++] = { s: -1, f: l.f + a.f, l, r: a };
1591
+ l = n[n[h].f < n[u].f ? h++ : u++], a = n[h != c && n[h].f < n[u].f ? h++ : u++], n[c++] = { s: -1, f: l.f + a.f, l, r: a };
1592
1592
  for (var p = r[0].s, s = 1; s < i; ++s)
1593
1593
  r[s].s > p && (p = r[s].s);
1594
- var v = new re(p + 1), S = yt(n[c - 1], v, 0);
1594
+ var y = new re(p + 1), S = vt(n[c - 1], y, 0);
1595
1595
  if (S > e) {
1596
- var s = 0, y = 0, T = S - e, A = 1 << T;
1596
+ var s = 0, v = 0, T = S - e, A = 1 << T;
1597
1597
  for (r.sort(function(O, L) {
1598
- return v[L.s] - v[O.s] || O.f - L.f;
1598
+ return y[L.s] - y[O.s] || O.f - L.f;
1599
1599
  }); s < i; ++s) {
1600
1600
  var B = r[s].s;
1601
- if (v[B] > e)
1602
- y += A - (1 << S - v[B]), v[B] = e;
1601
+ if (y[B] > e)
1602
+ v += A - (1 << S - y[B]), y[B] = e;
1603
1603
  else
1604
1604
  break;
1605
1605
  }
1606
- for (y >>= T; y > 0; ) {
1606
+ for (v >>= T; v > 0; ) {
1607
1607
  var D = r[s].s;
1608
- v[D] < e ? y -= 1 << e - v[D]++ - 1 : ++s;
1608
+ y[D] < e ? v -= 1 << e - y[D]++ - 1 : ++s;
1609
1609
  }
1610
- for (; s >= 0 && y; --s) {
1610
+ for (; s >= 0 && v; --s) {
1611
1611
  var k = r[s].s;
1612
- v[k] == e && (--v[k], ++y);
1612
+ y[k] == e && (--y[k], ++v);
1613
1613
  }
1614
1614
  S = e;
1615
1615
  }
1616
- return { t: new fe(v), l: S };
1617
- }, yt = function(t, e, n) {
1618
- return t.s == -1 ? Math.max(yt(t.l, e, n + 1), yt(t.r, e, n + 1)) : e[t.s] = n;
1616
+ return { t: new fe(y), l: S };
1617
+ }, vt = function(t, e, n) {
1618
+ return t.s == -1 ? Math.max(vt(t.l, e, n + 1), vt(t.r, e, n + 1)) : e[t.s] = n;
1619
1619
  }, bn = function(t) {
1620
1620
  for (var e = t.length; e && !t[--e]; )
1621
1621
  ;
@@ -1649,29 +1649,29 @@ var Xs = /* @__PURE__ */ We(Oe, 9, 0), Js = /* @__PURE__ */ We(nt, 5, 0), An = f
1649
1649
  for (var r = 0; r < s; ++r)
1650
1650
  t[i + r + 4] = n[r];
1651
1651
  return (i + 4 + s) * 8;
1652
- }, vn = function(t, e, n, s, i, r, o, l, a, d, c) {
1653
- ye(e, c++, n), ++i[256];
1654
- for (var u = ht(i, 15), p = u.t, v = u.l, S = ht(r, 15), y = S.t, T = S.l, A = bn(p), B = A.c, D = A.n, k = bn(y), N = k.c, O = k.n, L = new re(19), I = 0; I < B.length; ++I)
1652
+ }, yn = function(t, e, n, s, i, r, o, l, a, h, c) {
1653
+ ve(e, c++, n), ++i[256];
1654
+ for (var u = dt(i, 15), p = u.t, y = u.l, S = dt(r, 15), v = S.t, T = S.l, A = bn(p), B = A.c, D = A.n, k = bn(v), N = k.c, O = k.n, L = new re(19), I = 0; I < B.length; ++I)
1655
1655
  ++L[B[I] & 31];
1656
1656
  for (var I = 0; I < N.length; ++I)
1657
1657
  ++L[N[I] & 31];
1658
- for (var E = ht(L, 7), P = E.t, V = E.l, j = 19; j > 4 && !P[gn[j - 1]]; --j)
1658
+ for (var E = dt(L, 7), P = E.t, V = E.l, j = 19; j > 4 && !P[gn[j - 1]]; --j)
1659
1659
  ;
1660
- var q = d + 5 << 3, C = He(i, Oe) + He(r, nt) + o, F = He(i, p) + He(r, y) + o + 14 + 3 * j + He(L, P) + 2 * L[16] + 3 * L[17] + 7 * L[18];
1660
+ var q = h + 5 << 3, C = He(i, Oe) + He(r, nt) + o, F = He(i, p) + He(r, v) + o + 14 + 3 * j + He(L, P) + 2 * L[16] + 3 * L[17] + 7 * L[18];
1661
1661
  if (a >= 0 && q <= C && q <= F)
1662
- return Dn(e, c, t.subarray(a, a + d));
1662
+ return Dn(e, c, t.subarray(a, a + h));
1663
1663
  var G, K, U, b;
1664
- if (ye(e, c, 1 + (F < C)), c += 2, F < C) {
1665
- G = We(p, v, 0), K = p, U = We(y, T, 0), b = y;
1664
+ if (ve(e, c, 1 + (F < C)), c += 2, F < C) {
1665
+ G = We(p, y, 0), K = p, U = We(v, T, 0), b = v;
1666
1666
  var f = We(P, V, 0);
1667
- ye(e, c, D - 257), ye(e, c + 5, O - 1), ye(e, c + 10, j - 4), c += 14;
1667
+ ve(e, c, D - 257), ve(e, c + 5, O - 1), ve(e, c + 10, j - 4), c += 14;
1668
1668
  for (var I = 0; I < j; ++I)
1669
- ye(e, c + 3 * I, P[gn[I]]);
1669
+ ve(e, c + 3 * I, P[gn[I]]);
1670
1670
  c += 3 * j;
1671
- for (var h = [B, N], m = 0; m < 2; ++m)
1672
- for (var g = h[m], I = 0; I < g.length; ++I) {
1671
+ for (var d = [B, N], m = 0; m < 2; ++m)
1672
+ for (var g = d[m], I = 0; I < g.length; ++I) {
1673
1673
  var w = g[I] & 31;
1674
- ye(e, c, f[w]), c += P[w], w > 15 && (ye(e, c, g[I] >> 5 & 127), c += g[I] >> 12);
1674
+ ve(e, c, f[w]), c += P[w], w > 15 && (ve(e, c, g[I] >> 5 & 127), c += g[I] >> 12);
1675
1675
  }
1676
1676
  } else
1677
1677
  G = Xs, K = Oe, U = Js, b = nt;
@@ -1679,7 +1679,7 @@ var Xs = /* @__PURE__ */ We(Oe, 9, 0), Js = /* @__PURE__ */ We(nt, 5, 0), An = f
1679
1679
  var x = s[I];
1680
1680
  if (x > 255) {
1681
1681
  var w = x >> 18 & 31;
1682
- Ue(e, c, G[w + 257]), c += K[w + 257], w > 7 && (ye(e, c, x >> 23 & 31), c += _t[w]);
1682
+ Ue(e, c, G[w + 257]), c += K[w + 257], w > 7 && (ve(e, c, x >> 23 & 31), c += _t[w]);
1683
1683
  var R = x & 31;
1684
1684
  Ue(e, c, U[R]), c += b[R], R > 3 && (Ue(e, c, x >> 5 & 8191), c += Nt[R]);
1685
1685
  } else
@@ -1687,38 +1687,38 @@ var Xs = /* @__PURE__ */ We(Oe, 9, 0), Js = /* @__PURE__ */ We(nt, 5, 0), An = f
1687
1687
  }
1688
1688
  return Ue(e, c, G[256]), c + K[256];
1689
1689
  }, Zs = /* @__PURE__ */ new Ct([65540, 131080, 131088, 131104, 262176, 1048704, 1048832, 2114560, 2117632]), Ln = /* @__PURE__ */ new fe(0), ei = function(t, e, n, s, i, r) {
1690
- var o = r.z || t.length, l = new fe(s + o + 5 * (1 + Math.ceil(o / 7e3)) + i), a = l.subarray(s, l.length - i), d = r.l, c = (r.r || 0) & 7;
1690
+ var o = r.z || t.length, l = new fe(s + o + 5 * (1 + Math.ceil(o / 7e3)) + i), a = l.subarray(s, l.length - i), h = r.l, c = (r.r || 0) & 7;
1691
1691
  if (e) {
1692
1692
  c && (a[0] = r.r >> 3);
1693
- for (var u = Zs[e - 1], p = u >> 13, v = u & 8191, S = (1 << n) - 1, y = r.p || new re(32768), T = r.h || new re(S + 1), A = Math.ceil(n / 3), B = 2 * A, D = function(ne) {
1693
+ for (var u = Zs[e - 1], p = u >> 13, y = u & 8191, S = (1 << n) - 1, v = r.p || new re(32768), T = r.h || new re(S + 1), A = Math.ceil(n / 3), B = 2 * A, D = function(ne) {
1694
1694
  return (t[ne] ^ t[ne + 1] << A ^ t[ne + 2] << B) & S;
1695
1695
  }, k = new Ct(25e3), N = new re(288), O = new re(32), L = 0, I = 0, E = r.i || 0, P = 0, V = r.w || 0, j = 0; E + 2 < o; ++E) {
1696
1696
  var q = D(E), C = E & 32767, F = T[q];
1697
- if (y[C] = F, T[q] = C, V <= E) {
1697
+ if (v[C] = F, T[q] = C, V <= E) {
1698
1698
  var G = o - E;
1699
- if ((L > 7e3 || P > 24576) && (G > 423 || !d)) {
1700
- c = vn(t, a, 0, k, N, O, I, P, j, E - j, c), P = L = I = 0, j = E;
1699
+ if ((L > 7e3 || P > 24576) && (G > 423 || !h)) {
1700
+ c = yn(t, a, 0, k, N, O, I, P, j, E - j, c), P = L = I = 0, j = E;
1701
1701
  for (var K = 0; K < 286; ++K)
1702
1702
  N[K] = 0;
1703
1703
  for (var K = 0; K < 30; ++K)
1704
1704
  O[K] = 0;
1705
1705
  }
1706
- var U = 2, b = 0, f = v, h = C - F & 32767;
1707
- if (G > 2 && q == D(E - h))
1708
- for (var m = Math.min(p, G) - 1, g = Math.min(32767, E), w = Math.min(258, G); h <= g && --f && C != F; ) {
1709
- if (t[E + U] == t[E + U - h]) {
1710
- for (var x = 0; x < w && t[E + x] == t[E + x - h]; ++x)
1706
+ var U = 2, b = 0, f = y, d = C - F & 32767;
1707
+ if (G > 2 && q == D(E - d))
1708
+ for (var m = Math.min(p, G) - 1, g = Math.min(32767, E), w = Math.min(258, G); d <= g && --f && C != F; ) {
1709
+ if (t[E + U] == t[E + U - d]) {
1710
+ for (var x = 0; x < w && t[E + x] == t[E + x - d]; ++x)
1711
1711
  ;
1712
1712
  if (x > U) {
1713
- if (U = x, b = h, x > m)
1713
+ if (U = x, b = d, x > m)
1714
1714
  break;
1715
- for (var R = Math.min(h, x - 2), M = 0, K = 0; K < R; ++K) {
1716
- var H = E - h + K & 32767, _ = y[H], W = H - _ & 32767;
1715
+ for (var R = Math.min(d, x - 2), M = 0, K = 0; K < R; ++K) {
1716
+ var H = E - d + K & 32767, _ = v[H], W = H - _ & 32767;
1717
1717
  W > M && (M = W, F = H);
1718
1718
  }
1719
1719
  }
1720
1720
  }
1721
- C = F, F = y[C], h += C - F & 32767;
1721
+ C = F, F = v[C], d += C - F & 32767;
1722
1722
  }
1723
1723
  if (b) {
1724
1724
  k[P++] = 268435456 | bt[U] << 18 | mn[b];
@@ -1730,11 +1730,11 @@ var Xs = /* @__PURE__ */ We(Oe, 9, 0), Js = /* @__PURE__ */ We(nt, 5, 0), An = f
1730
1730
  }
1731
1731
  for (E = Math.max(E, V); E < o; ++E)
1732
1732
  k[P++] = t[E], ++N[t[E]];
1733
- c = vn(t, a, d, k, N, O, I, P, j, E - j, c), d || (r.r = c & 7 | a[c / 8 | 0] << 3, c -= 7, r.h = T, r.p = y, r.i = E, r.w = V);
1733
+ c = yn(t, a, h, k, N, O, I, P, j, E - j, c), h || (r.r = c & 7 | a[c / 8 | 0] << 3, c -= 7, r.h = T, r.p = v, r.i = E, r.w = V);
1734
1734
  } else {
1735
- for (var E = r.w || 0; E < o + d; E += 65535) {
1735
+ for (var E = r.w || 0; E < o + h; E += 65535) {
1736
1736
  var te = E + 65535;
1737
- te >= o && (a[c / 8 | 0] = d, te = o), c = Dn(a, c + 1, t.subarray(E, te));
1737
+ te >= o && (a[c / 8 | 0] = h, te = o), c = Dn(a, c + 1, t.subarray(E, te));
1738
1738
  }
1739
1739
  r.i = o;
1740
1740
  }
@@ -1776,18 +1776,18 @@ var Xs = /* @__PURE__ */ We(Oe, 9, 0), Js = /* @__PURE__ */ We(nt, 5, 0), An = f
1776
1776
  var l = s[o], a = r[o];
1777
1777
  if (typeof l == "function") {
1778
1778
  e += ";" + a + "=";
1779
- var d = l.toString();
1779
+ var h = l.toString();
1780
1780
  if (l.prototype)
1781
- if (d.indexOf("[native code]") != -1) {
1782
- var c = d.indexOf(" ", 8) + 1;
1783
- e += d.slice(c, d.indexOf("(", c));
1781
+ if (h.indexOf("[native code]") != -1) {
1782
+ var c = h.indexOf(" ", 8) + 1;
1783
+ e += h.slice(c, h.indexOf("(", c));
1784
1784
  } else {
1785
- e += d;
1785
+ e += h;
1786
1786
  for (var u in l.prototype)
1787
1787
  e += ";" + a + ".prototype." + u + "=" + l.prototype[u].toString();
1788
1788
  }
1789
1789
  else
1790
- e += d;
1790
+ e += h;
1791
1791
  } else
1792
1792
  n[a] = l;
1793
1793
  }
@@ -1806,7 +1806,7 @@ var Xs = /* @__PURE__ */ We(Oe, 9, 0), Js = /* @__PURE__ */ We(nt, 5, 0), An = f
1806
1806
  var a = Ui({}, it[n].e);
1807
1807
  return Pi(it[n].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", n, a, Hi(a), s);
1808
1808
  }, qi = function() {
1809
- return [fe, re, Ct, _t, Nt, gn, bt, mn, Xs, Oe, Js, nt, vt, Zs, Ln, We, ye, Ue, ht, yt, bn, He, Dn, vn, An, Ys, ei, Fn, Vi, si];
1809
+ return [fe, re, Ct, _t, Nt, gn, bt, mn, Xs, Oe, Js, nt, yt, Zs, Ln, We, ve, Ue, dt, vt, bn, He, Dn, yn, An, Ys, ei, Fn, Vi, si];
1810
1810
  }, Wi = function() {
1811
1811
  return [ii, ri, wt, ni, ti];
1812
1812
  }, si = function(t) {
@@ -1915,15 +1915,15 @@ class Qi {
1915
1915
  }), { conditions: i } = await s.json(), r = [];
1916
1916
  i.forEach((o) => {
1917
1917
  o.filters.forEach((a) => {
1918
- let d;
1919
- a.type === "fetch" ? (d = {
1918
+ let h;
1919
+ a.type === "fetch" ? (h = {
1920
1920
  type: "network_request",
1921
1921
  subConditions: [],
1922
1922
  name: o.name
1923
1923
  }, a.filters.forEach((c) => {
1924
1924
  const u = this.createConditionFromFilter(c);
1925
- u && d.subConditions.push(u);
1926
- })) : d = this.createConditionFromFilter(a), d && (d.type === "session_duration" && this.processDuration(d.value[0], o.name), r.push({ ...d, name: o.name }));
1925
+ u && h.subConditions.push(u);
1926
+ })) : h = this.createConditionFromFilter(a), h && (h.type === "session_duration" && this.processDuration(h.value[0], o.name), r.push({ ...h, name: o.name }));
1927
1927
  });
1928
1928
  }), this.conditions = r;
1929
1929
  } catch {
@@ -2192,8 +2192,8 @@ class er {
2192
2192
  body: JSON.stringify(o)
2193
2193
  });
2194
2194
  if (a.status === 200) {
2195
- const d = await a.json();
2196
- return this.handleFlags(d.flags);
2195
+ const h = await a.json();
2196
+ return this.handleFlags(h.flags);
2197
2197
  }
2198
2198
  }
2199
2199
  handleFlags(e) {
@@ -2293,7 +2293,7 @@ function li(t, e, n, s) {
2293
2293
  );
2294
2294
  }
2295
2295
  }
2296
- function di(t, e, n, s) {
2296
+ function hi(t, e, n, s) {
2297
2297
  const i = Bn("removeEventListener");
2298
2298
  try {
2299
2299
  t[i](e, n, s);
@@ -2335,12 +2335,12 @@ const ar = new or();
2335
2335
  function cr(t) {
2336
2336
  ar.addTask(t);
2337
2337
  }
2338
- function hi(t, e) {
2338
+ function di(t, e) {
2339
2339
  const n = { ...t };
2340
2340
  for (const s in e)
2341
2341
  if (e.hasOwnProperty(s)) {
2342
2342
  const i = e[s], r = t[s];
2343
- typeof i == "object" && !Array.isArray(i) && i !== null ? n[s] = hi(r || {}, i) : n[s] = i;
2343
+ typeof i == "object" && !Array.isArray(i) && i !== null ? n[s] = di(r || {}, i) : n[s] = i;
2344
2344
  }
2345
2345
  return n;
2346
2346
  }
@@ -2357,14 +2357,14 @@ function lr(t, e) {
2357
2357
  e
2358
2358
  ];
2359
2359
  }
2360
- function dr(t, e) {
2360
+ function hr(t, e) {
2361
2361
  return [
2362
2362
  6,
2363
2363
  t,
2364
2364
  e
2365
2365
  ];
2366
2366
  }
2367
- function hr() {
2367
+ function dr() {
2368
2368
  return [
2369
2369
  7
2370
2370
  ];
@@ -2423,7 +2423,7 @@ function br(t, e, n) {
2423
2423
  n
2424
2424
  ];
2425
2425
  }
2426
- function vr(t, e, n) {
2426
+ function yr(t, e, n) {
2427
2427
  return [
2428
2428
  18,
2429
2429
  t,
@@ -2431,7 +2431,7 @@ function vr(t, e, n) {
2431
2431
  n
2432
2432
  ];
2433
2433
  }
2434
- function yr(t, e) {
2434
+ function vr(t, e) {
2435
2435
  return [
2436
2436
  19,
2437
2437
  t,
@@ -2537,7 +2537,7 @@ function cs(t) {
2537
2537
  t
2538
2538
  ];
2539
2539
  }
2540
- function yn(t, e, n, s) {
2540
+ function vn(t, e, n, s) {
2541
2541
  return [
2542
2542
  60,
2543
2543
  t,
@@ -2603,7 +2603,7 @@ function Sn(t, e, n, s) {
2603
2603
  s
2604
2604
  ];
2605
2605
  }
2606
- function ds(t, e) {
2606
+ function hs(t, e) {
2607
2607
  return [
2608
2608
  75,
2609
2609
  t,
@@ -2669,7 +2669,7 @@ function Mr(t, e, n, s, i, r) {
2669
2669
  r
2670
2670
  ];
2671
2671
  }
2672
- function hs(t, e, n) {
2672
+ function ds(t, e, n) {
2673
2673
  return [
2674
2674
  113,
2675
2675
  t,
@@ -2689,7 +2689,7 @@ function Br(t) {
2689
2689
  t
2690
2690
  ];
2691
2691
  }
2692
- function fi(t, e, n, s, i, r, o, l, a, d) {
2692
+ function fi(t, e, n, s, i, r, o, l, a, h) {
2693
2693
  return [
2694
2694
  116,
2695
2695
  t,
@@ -2701,7 +2701,7 @@ function fi(t, e, n, s, i, r, o, l, a, d) {
2701
2701
  o,
2702
2702
  l,
2703
2703
  a,
2704
- d
2704
+ h
2705
2705
  ];
2706
2706
  }
2707
2707
  function ut(t) {
@@ -2991,7 +2991,7 @@ const qr = {
2991
2991
  fontSize: "13px",
2992
2992
  height: "24px",
2993
2993
  width: "24px"
2994
- }, vs = {
2994
+ }, ys = {
2995
2995
  borderRadius: "0.375rem",
2996
2996
  border: "1px solid rgba(0, 0, 0, 0.06)",
2997
2997
  background: "#F5F7FF",
@@ -3001,7 +3001,7 @@ const qr = {
3001
3001
  padding: "0.625rem 0.9375rem",
3002
3002
  gap: "0.5rem",
3003
3003
  alignSelf: "stretch"
3004
- }, ys = {
3004
+ }, vs = {
3005
3005
  fontWeight: "bold"
3006
3006
  }, Zr = {
3007
3007
  fontSize: "13px",
@@ -3105,12 +3105,12 @@ function io(t, e) {
3105
3105
  e.onmousedown = function(n) {
3106
3106
  const s = t.getBoundingClientRect(), i = n.clientX - s.left, r = n.clientY - s.top;
3107
3107
  t.style.position = "fixed", t.style.zIndex = 99999999999999, o(n.pageX, n.pageY);
3108
- function o(d, c) {
3109
- let u = d - i, p = c - r;
3108
+ function o(h, c) {
3109
+ let u = h - i, p = c - r;
3110
3110
  u <= 5 && (u = 5), p <= 5 && (p = 5), u >= window.innerWidth - s.width && (u = window.innerWidth - s.width), p >= window.innerHeight - s.height && (p = window.innerHeight - s.height), t.style.left = `${u}px`, t.style.top = `${p}px`;
3111
3111
  }
3112
- function l(d) {
3113
- o(d.pageX, d.pageY);
3112
+ function l(h) {
3113
+ o(h.pageX, h.pageY);
3114
3114
  }
3115
3115
  document.addEventListener("mousemove", l);
3116
3116
  const a = () => {
@@ -3180,16 +3180,16 @@ function z(t, e, n, s, i) {
3180
3180
  }
3181
3181
  const ft = "or_uxt_test_start", Tn = "or_uxt_task_index", En = "or_uxt_session_id", lo = "or_uxt_test_id";
3182
3182
  class ho {
3183
- constructor(e, n, s, i, r, o, l, a, d) {
3184
- this.ingestPoint = e, this.getTimestamp = n, this.token = s, this.testId = i, this.storageKey = r, this.setStorageKey = o, this.removeStorageKey = l, this.getStorageKey = a, this.getSessionId = d, this.durations = {
3183
+ constructor(e, n, s, i, r, o, l, a, h) {
3184
+ this.ingestPoint = e, this.getTimestamp = n, this.token = s, this.testId = i, this.storageKey = r, this.setStorageKey = o, this.removeStorageKey = l, this.getStorageKey = a, this.getSessionId = h, this.durations = {
3185
3185
  testStart: 0,
3186
3186
  tasks: []
3187
3187
  }, this.getDurations = () => this.durations, this.setDurations = (u) => {
3188
3188
  this.durations.testStart = u.testStart, this.durations.tasks = u.tasks;
3189
- }, this.signalTask = (u, p, v) => {
3189
+ }, this.signalTask = (u, p, y) => {
3190
3190
  if (!u)
3191
3191
  return console.error("User Testing: No Task ID Given");
3192
- const S = this.durations.tasks.find((A) => A.taskId === u), y = this.getTimestamp(), T = S ? y - S.started : 0;
3192
+ const S = this.durations.tasks.find((A) => A.taskId === u), v = this.getTimestamp(), T = S ? v - S.started : 0;
3193
3193
  return fetch(`${this.ingestPoint}/v1/web/uxt/signals/task`, {
3194
3194
  method: "POST",
3195
3195
  headers: {
@@ -3201,18 +3201,18 @@ class ho {
3201
3201
  taskId: u,
3202
3202
  status: p,
3203
3203
  duration: T,
3204
- timestamp: y,
3205
- taskAnswer: v
3204
+ timestamp: v,
3205
+ taskAnswer: y
3206
3206
  })
3207
3207
  });
3208
3208
  }, this.signalTest = (u) => {
3209
3209
  const p = this.getTimestamp();
3210
3210
  if (u === "begin" && this.testId) {
3211
- const y = this.getSessionId();
3212
- this.setStorageKey(En, y), this.setStorageKey(this.storageKey, this.testId.toString()), this.setStorageKey(ft, p.toString());
3211
+ const v = this.getSessionId();
3212
+ this.setStorageKey(En, v), this.setStorageKey(this.storageKey, this.testId.toString()), this.setStorageKey(ft, p.toString());
3213
3213
  } else
3214
3214
  this.removeStorageKey(this.storageKey), this.removeStorageKey(Tn), this.removeStorageKey(ft);
3215
- const v = this.durations.testStart || p, S = p - v;
3215
+ const y = this.durations.testStart || p, S = p - y;
3216
3216
  return fetch(`${this.ingestPoint}/v1/web/uxt/signals/test`, {
3217
3217
  method: "POST",
3218
3218
  headers: {
@@ -3235,8 +3235,8 @@ class uo {
3235
3235
  constructor(e, n) {
3236
3236
  this.app = e, this.storageKey = n, this.bg = z("div", "bg", qr, void 0, "__or_ut_bg"), this.container = z("div", "container", Wr, void 0, "__or_ut_ct"), this.widgetGuidelinesVisible = !0, this.widgetTasksVisible = !1, this.widgetVisible = !0, this.isActive = !1, this.descriptionSection = null, this.taskSection = null, this.endSection = null, this.stopButton = null, this.stopButtonContainer = null, this.test = null, this.testId = null, this.signalManager = null, this.getTest = (o, l, a) => {
3237
3237
  this.testId = o;
3238
- const d = this.app.options.ingestPoint;
3239
- return fetch(`${d}/v1/web/uxt/test/${o}`, {
3238
+ const h = this.app.options.ingestPoint;
3239
+ return fetch(`${h}/v1/web/uxt/test/${o}`, {
3240
3240
  headers: {
3241
3241
  Authorization: `Bearer ${l}`
3242
3242
  }
@@ -3261,10 +3261,10 @@ class uo {
3261
3261
  📹 We're recording this browser tab to learn from your experience.
3262
3262
  🎤 Please enable mic and camera if asked, to give us a complete picture.`), o = z("div", "button", Kr, "Read guidelines to begin");
3263
3263
  this.removeGreeting = () => ((n || s) && this.userRecorder.startRecording(30, ws.Standard, n, s), this.container.removeChild(o), this.container.removeChild(r), this.container.removeChild(i), !1), o.onclick = () => {
3264
- var a, d, c, u;
3264
+ var a, h, c, u;
3265
3265
  this.removeGreeting();
3266
3266
  const l = (a = this.signalManager) == null ? void 0 : a.getDurations();
3267
- l && this.signalManager && (l.testStart = this.app.timestamp(), this.signalManager.setDurations(l)), (d = this.signalManager) == null || d.signalTest("begin"), this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, rt), this.showWidget(((c = this.test) == null ? void 0 : c.guidelines) || "", ((u = this.test) == null ? void 0 : u.tasks) || []);
3267
+ l && this.signalManager && (l.testStart = this.app.timestamp(), this.signalManager.setDurations(l)), (h = this.signalManager) == null || h.signalTest("begin"), this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, rt), this.showWidget(((c = this.test) == null ? void 0 : c.guidelines) || "", ((u = this.test) == null ? void 0 : u.tasks) || []);
3268
3268
  }, this.container.append(i, r, o), this.bg.appendChild(this.container), document.body.appendChild(this.bg);
3269
3269
  }
3270
3270
  showWidget(e, n, s) {
@@ -3285,8 +3285,8 @@ class uo {
3285
3285
  this.container.style.fontFamily = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"', Object.assign(this.container.style, rt);
3286
3286
  const r = this.createDescriptionSection(e), o = this.createTasksSection(n), l = z("div", "stop_bn_or", ms, "Abort Session"), a = z("div", "stop_ct_or", { fontSize: "13px!important" });
3287
3287
  a.style.fontSize = "13px", a.append(l), this.container.append(i, r, o, a), this.taskSection = o, this.descriptionSection = r, this.stopButton = l, this.stopButtonContainer = a, l.onclick = () => {
3288
- var d;
3289
- this.userRecorder.discard(), (d = this.signalManager) == null || d.signalTest("skipped"), document.body.removeChild(this.bg), window.close();
3288
+ var h;
3289
+ this.userRecorder.discard(), (h = this.signalManager) == null || h.signalTest("skipped"), document.body.removeChild(this.bg), window.close();
3290
3290
  }, s ? this.toggleDescriptionVisibility() : this.hideTaskSection();
3291
3291
  }
3292
3292
  createTitleSection() {
@@ -3324,19 +3324,19 @@ class uo {
3324
3324
  l.innerHTML = e;
3325
3325
  const a = z("div", "button_begin_or", gs, "Begin Test");
3326
3326
  s.append(i, r), o.append(l, a), n.append(s, o);
3327
- const d = () => {
3327
+ const h = () => {
3328
3328
  this.widgetGuidelinesVisible = !this.widgetGuidelinesVisible, r.textContent = this.widgetGuidelinesVisible ? "-" : "+", Object.assign(o.style, this.widgetGuidelinesVisible ? je : { display: "none" });
3329
3329
  };
3330
- return s.onclick = d, this.toggleDescriptionVisibility = () => {
3330
+ return s.onclick = h, this.toggleDescriptionVisibility = () => {
3331
3331
  this.widgetGuidelinesVisible = !1, r.textContent = this.widgetGuidelinesVisible ? "-" : "+", Object.assign(o.style, this.widgetGuidelinesVisible ? je : { display: "none" }), o.removeChild(a);
3332
3332
  }, a.onclick = () => {
3333
3333
  var c, u, p;
3334
- if (d(), this.test) {
3335
- const v = (c = this.signalManager) == null ? void 0 : c.getDurations(), S = v ? v.tasks.findIndex((y) => this.test && y.taskId === this.test.tasks[0].task_id) : null;
3336
- v && S === -1 && (v.tasks.push({
3334
+ if (h(), this.test) {
3335
+ const y = (c = this.signalManager) == null ? void 0 : c.getDurations(), S = y ? y.tasks.findIndex((v) => this.test && v.taskId === this.test.tasks[0].task_id) : null;
3336
+ y && S === -1 && (y.tasks.push({
3337
3337
  taskId: this.test.tasks[0].task_id,
3338
3338
  started: this.app.timestamp()
3339
- }), (u = this.signalManager) == null || u.setDurations(v)), (p = this.signalManager) == null || p.signalTask(this.test.tasks[0].task_id, "begin");
3339
+ }), (u = this.signalManager) == null || u.setDurations(y)), (p = this.signalManager) == null || p.signalTask(this.test.tasks[0].task_id, "begin");
3340
3340
  }
3341
3341
  this.showTaskSection(), o.removeChild(a);
3342
3342
  }, n;
@@ -3347,17 +3347,17 @@ class uo {
3347
3347
  fontSize: "13px",
3348
3348
  fontWeight: "500",
3349
3349
  lineHeight: "auto"
3350
- }, "Tasks"), r = z("div", "icon", ps, "-"), o = z("div", "content", je), l = z("div", "pagination", Yr), a = z("div", "taskCard", vs), d = z("div", "taskText", ys), c = z("div", "taskDescription", Zr), u = z("div", "taskButtons", to), p = z("div", "taskText", ys);
3350
+ }, "Tasks"), r = z("div", "icon", ps, "-"), o = z("div", "content", je), l = z("div", "pagination", Yr), a = z("div", "taskCard", ys), h = z("div", "taskText", vs), c = z("div", "taskDescription", Zr), u = z("div", "taskButtons", to), p = z("div", "taskText", vs);
3351
3351
  p.textContent = "Your answer";
3352
- const v = z("textarea", "taskDescription", {
3352
+ const y = z("textarea", "taskDescription", {
3353
3353
  resize: "vertical"
3354
- }), S = z("div", "inputArea", vs);
3355
- S.append(p, v);
3356
- const y = z("div", "closePanelButton", pi, "Collapse Panel"), T = z("div", "nextButton", eo, "Done, Next");
3357
- s.append(i, r), a.append(d, c), u.append(y, T), o.append(l, a, S, u), n.append(s, o);
3354
+ }), S = z("div", "inputArea", ys);
3355
+ S.append(p, y);
3356
+ const v = z("div", "closePanelButton", pi, "Collapse Panel"), T = z("div", "nextButton", eo, "Done, Next");
3357
+ s.append(i, r), a.append(h, c), u.append(v, T), o.append(l, a, S, u), n.append(s, o);
3358
3358
  const A = () => {
3359
3359
  const k = e[this.currentTaskIndex];
3360
- d.textContent = k.title, c.textContent = k.description, k.allow_typing ? S.style.display = "flex" : S.style.display = "none";
3360
+ h.textContent = k.title, c.textContent = k.description, k.allow_typing ? S.style.display = "flex" : S.style.display = "none";
3361
3361
  };
3362
3362
  e.forEach((k, N) => {
3363
3363
  const O = z("span", `or_task_${N}`, {
@@ -3387,10 +3387,10 @@ class uo {
3387
3387
  O && Object.assign(O.style, Qr);
3388
3388
  }
3389
3389
  };
3390
- return s.onclick = B, y.onclick = this.collapseWidget, T.onclick = () => {
3390
+ return s.onclick = B, v.onclick = this.collapseWidget, T.onclick = () => {
3391
3391
  var N, O, L, I;
3392
- const k = e[this.currentTaskIndex].allow_typing ? v.value : void 0;
3393
- if (v.value = "", (N = this.signalManager) == null || N.signalTask(e[this.currentTaskIndex].task_id, "done", k), this.currentTaskIndex < e.length - 1) {
3392
+ const k = e[this.currentTaskIndex].allow_typing ? y.value : void 0;
3393
+ if (y.value = "", (N = this.signalManager) == null || N.signalTask(e[this.currentTaskIndex].task_id, "done", k), this.currentTaskIndex < e.length - 1) {
3394
3394
  this.currentTaskIndex++, A();
3395
3395
  const E = (O = this.signalManager) == null ? void 0 : O.getDurations();
3396
3396
  E && E.tasks.findIndex((P) => P.taskId === e[this.currentTaskIndex].task_id) === -1 && (E.tasks.push({
@@ -3406,7 +3406,7 @@ class uo {
3406
3406
  }, 1), n;
3407
3407
  }
3408
3408
  showEndSection() {
3409
- var l, a, d, c;
3409
+ var l, a, h, c;
3410
3410
  let e = !0;
3411
3411
  (l = this.signalManager) == null || l.signalTest("done");
3412
3412
  const n = z("div", "end_section_or", Jr), s = z("div", "end_title_or", {
@@ -3415,7 +3415,7 @@ class uo {
3415
3415
  }, "Thank you! 👍"), i = z("div", "end_description_or", {}, ((a = this.test) == null ? void 0 : a.conclusion) ?? `Thank you for participating in our usability test. Your feedback has been captured and will be used to enhance our website.
3416
3416
 
3417
3417
  We appreciate your time and valuable input.`), r = z("div", "end_button_or", gs, "Submitting Feedback"), o = co();
3418
- r.appendChild(o), (d = this.test) != null && d.reqMic || (c = this.test) != null && c.reqCamera ? this.userRecorder.sendToAPI().then(() => {
3418
+ r.appendChild(o), (h = this.test) != null && h.reqMic || (c = this.test) != null && c.reqCamera ? this.userRecorder.sendToAPI().then(() => {
3419
3419
  r.removeChild(o), r.textContent = "End Session", e = !1;
3420
3420
  }).catch((u) => {
3421
3421
  console.error(u), r.removeChild(o), r.textContent = "End Session", e = !1;
@@ -3471,12 +3471,12 @@ class po {
3471
3471
  };
3472
3472
  const o = jr(i.toString(), r);
3473
3473
  this.app.send(o);
3474
- const l = (d) => {
3475
- go(d, this.options.quality, this.snapshots[i].dummy, this.options.fixedScaling, this.fileExt, (c) => {
3474
+ const l = (h) => {
3475
+ go(h, this.options.quality, this.snapshots[i].dummy, this.options.fixedScaling, this.fileExt, (c) => {
3476
3476
  c && (this.snapshots[i].images.push({ id: this.app.timestamp(), data: c }), this.snapshots[i].images.length > 9 && (this.sendSnaps(this.snapshots[i].images, i, this.snapshots[i].createdAt), this.snapshots[i].images = []));
3477
3477
  });
3478
3478
  }, a = setInterval(() => {
3479
- const d = this.app.nodes.getID(s), c = d ? this.app.nodes.getNode(d) : void 0;
3479
+ const h = this.app.nodes.getID(s), c = h ? this.app.nodes.getNode(h) : void 0;
3480
3480
  !c || !Z(c, "canvas") || c !== s ? (this.app.debug.log("Canvas element not in sync"), clearInterval(a)) : this.snapshots[i].paused || (this.options.useAnimationFrame ? requestAnimationFrame(() => {
3481
3481
  l(c);
3482
3482
  }) : l(c));
@@ -3551,7 +3551,7 @@ class bo {
3551
3551
  }, this.level = e;
3552
3552
  }
3553
3553
  }
3554
- class vo {
3554
+ class yo {
3555
3555
  constructor(e) {
3556
3556
  this.node_id = e, this.nodes = [], this.totalNodeAmount = 0, this.nodeCallbacks = [], this.elementListeners = /* @__PURE__ */ new Map(), this.nextNodeId = 0, this.scanTree = (n) => {
3557
3557
  this.nodes.forEach((s) => n(s));
@@ -3585,7 +3585,7 @@ class vo {
3585
3585
  if (n !== void 0) {
3586
3586
  e[this.node_id] = void 0, delete e[this.node_id], delete this.nodes[n];
3587
3587
  const s = this.elementListeners.get(n);
3588
- s !== void 0 && (this.elementListeners.delete(n), s.forEach((i) => di(e, i[0], i[1], i[2]))), this.totalNodeAmount--;
3588
+ s !== void 0 && (this.elementListeners.delete(n), s.forEach((i) => hi(e, i[0], i[1], i[2]))), this.totalNodeAmount--;
3589
3589
  }
3590
3590
  return n;
3591
3591
  }
@@ -3657,8 +3657,8 @@ class jn {
3657
3657
  const a = i.attributeName;
3658
3658
  if (a === null)
3659
3659
  continue;
3660
- let d = this.attributesMap.get(l);
3661
- d === void 0 && this.attributesMap.set(l, d = /* @__PURE__ */ new Set()), d.add(a);
3660
+ let h = this.attributesMap.get(l);
3661
+ h === void 0 && this.attributesMap.set(l, h = /* @__PURE__ */ new Set()), h.add(a);
3662
3662
  continue;
3663
3663
  }
3664
3664
  if (o === "characterData") {
@@ -3675,7 +3675,7 @@ class jn {
3675
3675
  }
3676
3676
  sendNodeAttribute(e, n, s, i) {
3677
3677
  if (In(n)) {
3678
- s.substr(0, 6) === "xlink:" && (s = s.substr(6)), i === null ? this.app.send(rs(e, s)) : s === "href" ? (i.length > 1e5 && (i = ""), this.app.send(yn(e, s, i, this.app.getBaseHref()))) : this.app.attributeSender.sendSetAttribute(e, s, i);
3678
+ s.substr(0, 6) === "xlink:" && (s = s.substr(6)), i === null ? this.app.send(rs(e, s)) : s === "href" ? (i.length > 1e5 && (i = ""), this.app.send(vn(e, s, i, this.app.getBaseHref()))) : this.app.attributeSender.sendSetAttribute(e, s, i);
3679
3679
  return;
3680
3680
  }
3681
3681
  if (!(s === "src" || s === "srcset" || s === "integrity" || s === "crossorigin" || s === "autocomplete" || s.substr(0, 2) === "on") && !(s === "value" && Z(n, "input") && n.type !== "button" && n.type !== "reset" && n.type !== "submit")) {
@@ -3684,7 +3684,7 @@ class jn {
3684
3684
  return;
3685
3685
  }
3686
3686
  if (s === "style" || s === "href" && Z(n, "link")) {
3687
- this.app.send(yn(e, s, i, this.app.getBaseHref()));
3687
+ this.app.send(vn(e, s, i, this.app.getBaseHref()));
3688
3688
  return;
3689
3689
  }
3690
3690
  (s === "href" || i.length > 1e5) && (i = ""), this.app.attributeSender.sendSetAttribute(e, s, i);
@@ -3786,11 +3786,11 @@ class jn {
3786
3786
  return !0;
3787
3787
  }
3788
3788
  o === we.Removed && i !== void 0 && this.app.send(pr(e, i, a));
3789
- const d = this.attributesMap.get(e);
3790
- if (d !== void 0) {
3789
+ const h = this.attributesMap.get(e);
3790
+ if (h !== void 0) {
3791
3791
  if (!Te(n))
3792
3792
  throw "commitNode: node is not an element";
3793
- for (const c of d)
3793
+ for (const c of h)
3794
3794
  this.sendNodeAttribute(e, n, c, n.getAttribute(c));
3795
3795
  }
3796
3796
  if (this.textSet.has(e)) {
@@ -3850,7 +3850,7 @@ class xs extends jn {
3850
3850
  });
3851
3851
  }
3852
3852
  }
3853
- class yo extends jn {
3853
+ class vo extends jn {
3854
3854
  observe(e) {
3855
3855
  const n = e.shadowRoot, s = this.app.nodes.getID(e);
3856
3856
  !n || s === void 0 || this.observeRoot(n, (i) => {
@@ -3934,7 +3934,7 @@ class So extends jn {
3934
3934
  e.addEventListener("load", s), s();
3935
3935
  }
3936
3936
  handleShadowRoot(e) {
3937
- const n = new yo(this.app);
3937
+ const n = new vo(this.app);
3938
3938
  this.shadowRootObservers.push(n), n.observe(e.host);
3939
3939
  }
3940
3940
  observe() {
@@ -3943,7 +3943,7 @@ class So extends jn {
3943
3943
  const n = on.apply(this, arguments);
3944
3944
  return e.handleShadowRoot(n), n;
3945
3945
  }, this.app.nodes.clear(), this.observeRoot(window.document, () => {
3946
- this.app.send(hr()), this.app.nodes.callNodeCallbacks(document, !0);
3946
+ this.app.send(dr()), this.app.nodes.callNodeCallbacks(document, !0);
3947
3947
  }, window.document.documentElement);
3948
3948
  }
3949
3949
  crossdomainObserve(e, n) {
@@ -4106,7 +4106,7 @@ function cn() {
4106
4106
  const t = (/* @__PURE__ */ new Date()).getTimezoneOffset() * -1, e = t >= 0 ? "+" : "-", n = Math.floor(Math.abs(t) / 60), s = Math.abs(t) % 60;
4107
4107
  return `UTC${e}${String(n).padStart(2, "0")}:${String(s).padStart(2, "0")}`;
4108
4108
  }
4109
- const _o = (t) => new Promise((e) => setTimeout(e, t)), he = {
4109
+ const _o = (t) => new Promise((e) => setTimeout(e, t)), de = {
4110
4110
  // ask if there are any tabs alive
4111
4111
  ask: "never-gonna-give-you-up",
4112
4112
  // response from another tab
@@ -4126,14 +4126,14 @@ let No = class {
4126
4126
  }, this.restartCanvasTracking = () => {
4127
4127
  var a;
4128
4128
  (a = this.canvasRecorder) == null || a.restartTracking();
4129
- }, this.flushBuffer = async (a) => new Promise((d) => {
4129
+ }, this.flushBuffer = async (a) => new Promise((h) => {
4130
4130
  let c = !1;
4131
4131
  const u = [a.shift()];
4132
4132
  for (; !c; ) {
4133
4133
  const p = a[0];
4134
4134
  !p || p[0] === 0 ? c = !0 : u.push(a.shift());
4135
4135
  }
4136
- this.postToWorker(u), d(null);
4136
+ this.postToWorker(u), h(null);
4137
4137
  }), this.onUxtCb = [], this.contextId = Math.random().toString(36).slice(2), this.projectKey = e, Object.keys(s).findIndex((a) => ["fixedCanvasScaling", "disableCanvas"].includes(a)) !== -1 && (console.warn('Openreplay: canvas options are moving to separate key "canvas" in next update. Please update your configuration.'), s = {
4138
4138
  ...s,
4139
4139
  canvas: {
@@ -4176,47 +4176,47 @@ let No = class {
4176
4176
  useAnimationFrame: !1
4177
4177
  }
4178
4178
  };
4179
- if (this.options = hi(o, s), !this.insideIframe && !this.options.forceSingleTab && globalThis && "BroadcastChannel" in globalThis) {
4179
+ if (this.options = di(o, s), !this.insideIframe && !this.options.forceSingleTab && globalThis && "BroadcastChannel" in globalThis) {
4180
4180
  const a = location.hostname.split(".").slice(-2).join("_");
4181
4181
  this.bc = new BroadcastChannel(`rick_${a}`);
4182
4182
  }
4183
- this.revID = this.options.revID, this.localStorage = this.options.localStorage ?? window.localStorage, this.sessionStorage = this.options.sessionStorage ?? window.sessionStorage, this.sanitizer = new ko(this, s), this.nodes = new vo(this.options.node_id), this.observer = new So(this, s), this.ticker = new Io(this), this.ticker.attach(() => this.commit()), this.debug = new bo(this.options.__debug__), this.session = new To(this, this.options), this.attributeSender = new Yi(this, !!this.options.disableStringDict), this.featureFlags = new er(this), this.tagWatcher = new $r(this.sessionStorage, this.debug.error, (a) => {
4183
+ this.revID = this.options.revID, this.localStorage = this.options.localStorage ?? window.localStorage, this.sessionStorage = this.options.sessionStorage ?? window.sessionStorage, this.sanitizer = new ko(this, s), this.nodes = new yo(this.options.node_id), this.observer = new So(this, s), this.ticker = new Io(this), this.ticker.attach(() => this.commit()), this.debug = new bo(this.options.__debug__), this.session = new To(this, this.options), this.attributeSender = new Yi(this, !!this.options.disableStringDict), this.featureFlags = new er(this), this.tagWatcher = new $r(this.sessionStorage, this.debug.error, (a) => {
4184
4184
  this.send(zr(a));
4185
- }), this.session.attachUpdateCallback(({ userID: a, metadata: d }) => {
4186
- a != null && this.send(Er(a)), d != null && Object.entries(d).forEach(([c, u]) => this.send(os(c, u)));
4185
+ }), this.session.attachUpdateCallback(({ userID: a, metadata: h }) => {
4186
+ a != null && this.send(Er(a)), h != null && Object.entries(h).forEach(([c, u]) => this.send(os(c, u)));
4187
4187
  }), n != null && this.session.applySessionHash(n), this.initWorker();
4188
4188
  const l = this.session.getTabId();
4189
4189
  if (this.insideIframe) {
4190
4190
  const a = (c) => {
4191
4191
  const { data: u } = c;
4192
- u.line === he.iframeId && (this.rootId = u.id, this.session.setSessionToken(u.token), this.frameOderNumber = u.frameOrderNumber, this.debug.log("starting iframe tracking", u), this.allowAppStart());
4192
+ u.line === de.iframeId && (this.rootId = u.id, this.session.setSessionToken(u.token), this.frameOderNumber = u.frameOrderNumber, this.debug.log("starting iframe tracking", u), this.allowAppStart());
4193
4193
  };
4194
4194
  window.addEventListener("message", a), this.attachStopCallback(() => {
4195
4195
  window.removeEventListener("message", a);
4196
4196
  });
4197
- const d = this.initialHostName;
4197
+ const h = this.initialHostName;
4198
4198
  window.parent.postMessage({
4199
- line: he.iframeSignal,
4199
+ line: de.iframeSignal,
4200
4200
  source: l,
4201
4201
  context: this.contextId,
4202
- domain: d
4202
+ domain: h
4203
4203
  }, "*");
4204
4204
  } else {
4205
4205
  let a = 0;
4206
- const d = (c) => {
4206
+ const h = (c) => {
4207
4207
  const { data: u } = c;
4208
- if (u.line === he.iframeSignal) {
4209
- const p = u.domain, v = Array.from(document.querySelectorAll("iframe"));
4210
- this.pageFrames = v, (async () => {
4211
- let y = 0;
4212
- for (; y < 10; ) {
4213
- const T = this.checkNodeId(v, p);
4208
+ if (u.line === de.iframeSignal) {
4209
+ const p = u.domain, y = Array.from(document.querySelectorAll("iframe"));
4210
+ this.pageFrames = y, (async () => {
4211
+ let v = 0;
4212
+ for (; v < 10; ) {
4213
+ const T = this.checkNodeId(y, p);
4214
4214
  if (T) {
4215
4215
  this.waitStarted().then(() => {
4216
4216
  var D;
4217
4217
  a++;
4218
4218
  const A = this.session.getSessionToken(), B = {
4219
- line: he.iframeId,
4219
+ line: de.iframeId,
4220
4220
  context: this.contextId,
4221
4221
  domain: p,
4222
4222
  id: T,
@@ -4224,30 +4224,30 @@ let No = class {
4224
4224
  frameOrderNumber: a
4225
4225
  };
4226
4226
  this.debug.log("iframe_data", B), (D = c.source) == null || D.postMessage(B, "*");
4227
- }).catch(console.error), y = 10;
4227
+ }).catch(console.error), v = 10;
4228
4228
  break;
4229
4229
  }
4230
- y++, await _o(100);
4230
+ v++, await _o(100);
4231
4231
  }
4232
4232
  })();
4233
4233
  }
4234
- if (u.line === he.iframeBatch) {
4235
- const v = u.messages.map((S) => {
4234
+ if (u.line === de.iframeBatch) {
4235
+ const y = u.messages.map((S) => {
4236
4236
  if (S[0] === 20) {
4237
- let y = S;
4237
+ let v = S;
4238
4238
  return this.pageFrames.forEach((T) => {
4239
4239
  if (T.dataset.domain === c.data.domain) {
4240
4240
  const [A, B, D] = S, { left: k, top: N } = T.getBoundingClientRect();
4241
- y = [A, B + k, D + N];
4241
+ v = [A, B + k, D + N];
4242
4242
  }
4243
- }), y;
4243
+ }), v;
4244
4244
  }
4245
4245
  if (S[0] === 68) {
4246
- let y = S;
4246
+ let v = S;
4247
4247
  return this.pageFrames.forEach((T) => {
4248
4248
  if (T.dataset.domain === c.data.domain) {
4249
4249
  const [A, B, D, k, N, O, L] = S, { left: I, top: E, width: P, height: V } = T.getBoundingClientRect(), j = document.documentElement.scrollWidth, q = document.documentElement.scrollHeight, C = O / 100 * P + I, F = L / 100 * V + E, G = C / j, K = F / q;
4250
- y = [
4250
+ v = [
4251
4251
  A,
4252
4252
  B,
4253
4253
  D,
@@ -4257,38 +4257,38 @@ let No = class {
4257
4257
  Math.round(K * 1e3) / 10
4258
4258
  ];
4259
4259
  }
4260
- }), y;
4260
+ }), v;
4261
4261
  }
4262
4262
  return S;
4263
4263
  });
4264
- this.messages.push(...v);
4264
+ this.messages.push(...y);
4265
4265
  }
4266
4266
  };
4267
- window.addEventListener("message", d), this.attachStopCallback(() => {
4268
- window.removeEventListener("message", d);
4267
+ window.addEventListener("message", h), this.attachStopCallback(() => {
4268
+ window.removeEventListener("message", h);
4269
4269
  });
4270
4270
  }
4271
4271
  this.bc !== null && (this.bc.postMessage({
4272
- line: he.ask,
4272
+ line: de.ask,
4273
4273
  source: l,
4274
4274
  context: this.contextId
4275
4275
  }), this.startTimeout = setTimeout(() => {
4276
4276
  this.allowAppStart();
4277
4277
  }, 500), this.bc.onmessage = (a) => {
4278
4278
  if (a.data.context !== this.contextId) {
4279
- if (a.data.line === he.resp) {
4280
- const d = a.data.token;
4281
- this.session.setSessionToken(d), this.allowAppStart();
4279
+ if (a.data.line === de.resp) {
4280
+ const h = a.data.token;
4281
+ this.session.setSessionToken(h), this.allowAppStart();
4282
4282
  }
4283
- if (a.data.line === he.reg) {
4284
- const d = a.data.token;
4285
- this.session.regenerateTabId(), this.session.setSessionToken(d), this.allowAppStart();
4283
+ if (a.data.line === de.reg) {
4284
+ const h = a.data.token;
4285
+ this.session.regenerateTabId(), this.session.setSessionToken(h), this.allowAppStart();
4286
4286
  }
4287
- if (a.data.line === he.ask) {
4288
- const d = this.session.getSessionToken();
4289
- d && this.bc && this.bc.postMessage({
4290
- line: a.data.source === l ? he.reg : he.resp,
4291
- token: d,
4287
+ if (a.data.line === de.ask) {
4288
+ const h = this.session.getSessionToken();
4289
+ h && this.bc && this.bc.postMessage({
4290
+ line: a.data.source === l ? de.reg : de.resp,
4291
+ token: h,
4292
4292
  source: l,
4293
4293
  context: this.contextId
4294
4294
  });
@@ -4366,7 +4366,7 @@ let No = class {
4366
4366
  if (!(this.worker === void 0 || !this.messages.length)) {
4367
4367
  if (this.insideIframe) {
4368
4368
  window.parent.postMessage({
4369
- line: he.iframeBatch,
4369
+ line: de.iframeBatch,
4370
4370
  messages: this.messages,
4371
4371
  domain: this.initialHostName
4372
4372
  }, "*"), this.commitCallbacks.forEach((e) => e(this.messages)), this.messages.length = 0;
@@ -4425,7 +4425,7 @@ let No = class {
4425
4425
  // Use app.nodes.attachNodeListener for registered nodes instead
4426
4426
  attachEventListener(e, n, s, i = !0, r = !0) {
4427
4427
  i && (s = this.safe(s));
4428
- const o = () => e ? li(e, n, s, r) : null, l = () => e ? di(e, n, s, r) : null;
4428
+ const o = () => e ? li(e, n, s, r) : null, l = () => e ? hi(e, n, s, r) : null;
4429
4429
  this.attachStartCallback(o, i), this.attachStopCallback(l, i);
4430
4430
  }
4431
4431
  // TODO: full correct semantic
@@ -4470,8 +4470,8 @@ let No = class {
4470
4470
  }
4471
4471
  const r = this.options.ingestPoint, a = (/api\.openreplay\.com/.test(r) ? "https://app.openreplay.com/ingest" : r).replace(/ingest$/, `${n}/session/${s}`);
4472
4472
  if (e != null && e.withCurrentTime) {
4473
- const d = ge() - i;
4474
- return `${a}?jumpto=${d}`;
4473
+ const h = ge() - i;
4474
+ return `${a}?jumpto=${h}`;
4475
4475
  }
4476
4476
  return a;
4477
4477
  }
@@ -4522,7 +4522,7 @@ let No = class {
4522
4522
  }, 30 * s), r();
4523
4523
  }
4524
4524
  async setupConditionalStart(e) {
4525
- var p, v;
4525
+ var p, y;
4526
4526
  this.conditionsManager = new Qi(this, e);
4527
4527
  const n = await fetch(this.options.ingestPoint + "/v1/web/start", {
4528
4528
  method: "POST",
@@ -4551,7 +4551,7 @@ let No = class {
4551
4551
  userCountry: o,
4552
4552
  userDevice: l,
4553
4553
  userOS: a,
4554
- userState: d,
4554
+ userState: h,
4555
4555
  projectID: c
4556
4556
  } = await n.json();
4557
4557
  this.session.assign({ projectID: c }), this.session.setUserInfo({
@@ -4560,10 +4560,10 @@ let No = class {
4560
4560
  userCountry: o,
4561
4561
  userDevice: l,
4562
4562
  userOS: a,
4563
- userState: d
4563
+ userState: h
4564
4564
  });
4565
4565
  const u = { sessionToken: s, userUUID: "", sessionID: "" };
4566
- this.startCallbacks.forEach((S) => S(u)), await ((p = this.conditionsManager) == null ? void 0 : p.fetchConditions(c, s)), await this.featureFlags.reloadFlags(s), await this.tagWatcher.fetchTags(this.options.ingestPoint, s), (v = this.conditionsManager) == null || v.processFlags(this.featureFlags.flags);
4566
+ this.startCallbacks.forEach((S) => S(u)), await ((p = this.conditionsManager) == null ? void 0 : p.fetchConditions(c, s)), await this.featureFlags.reloadFlags(s), await this.tagWatcher.fetchTags(this.options.ingestPoint, s), (y = this.conditionsManager) == null || y.processFlags(this.featureFlags.flags);
4567
4567
  }
4568
4568
  /**
4569
4569
  * Starts offline session recording
@@ -4620,7 +4620,7 @@ let No = class {
4620
4620
  * @reject {string} - error message
4621
4621
  * */
4622
4622
  async uploadOfflineRecording() {
4623
- var p, v;
4623
+ var p, y;
4624
4624
  this.stop(!1);
4625
4625
  const e = ge();
4626
4626
  (p = this.worker) == null || p.postMessage({
@@ -4649,8 +4649,8 @@ let No = class {
4649
4649
  jsHeapSizeLimit: sn,
4650
4650
  timezone: cn()
4651
4651
  })
4652
- }), { token: s, userBrowser: i, userCity: r, userCountry: o, userDevice: l, userOS: a, userState: d, beaconSizeLimit: c, projectID: u } = await n.json();
4653
- for ((v = this.worker) == null || v.postMessage({
4652
+ }), { token: s, userBrowser: i, userCity: r, userCountry: o, userDevice: l, userOS: a, userState: h, beaconSizeLimit: c, projectID: u } = await n.json();
4653
+ for ((y = this.worker) == null || y.postMessage({
4654
4654
  type: "auth",
4655
4655
  token: s,
4656
4656
  beaconSizeLimit: c
@@ -4660,7 +4660,7 @@ let No = class {
4660
4660
  userCountry: o,
4661
4661
  userDevice: l,
4662
4662
  userOS: a,
4663
- userState: d
4663
+ userState: h
4664
4664
  }); this.bufferedMessages1.length > 0; )
4665
4665
  await this.flushBuffer(this.bufferedMessages1);
4666
4666
  this.postToWorker([["q_end"]]), this.clearBuffers();
@@ -4722,15 +4722,15 @@ let No = class {
4722
4722
  return this.signalError(C, []), _e(C);
4723
4723
  }
4724
4724
  const {
4725
- token: d,
4725
+ token: h,
4726
4726
  userUUID: c,
4727
4727
  projectID: u,
4728
4728
  beaconSizeLimit: p,
4729
- compressionThreshold: v,
4729
+ compressionThreshold: y,
4730
4730
  // how big the batch should be before we decide to compress it
4731
4731
  delay: S,
4732
4732
  // derived from token
4733
- sessionID: y,
4733
+ sessionID: v,
4734
4734
  // derived from token
4735
4735
  startTimestamp: T,
4736
4736
  // real startTS (server time), derived from sessionID
@@ -4745,11 +4745,11 @@ let No = class {
4745
4745
  canvasFPS: E,
4746
4746
  assistOnly: P
4747
4747
  } = await a.json();
4748
- if (typeof d != "string" || typeof c != "string" || typeof T != "number" && typeof T < "u" || typeof y != "string" || typeof S != "number" || typeof p != "number" && typeof p < "u") {
4748
+ if (typeof h != "string" || typeof c != "string" || typeof T != "number" && typeof T < "u" || typeof v != "string" || typeof S != "number" || typeof p != "number" && typeof p < "u") {
4749
4749
  const C = `Incorrect server response: ${JSON.stringify(a)}`;
4750
4750
  return this.signalError(C, []), _e(C);
4751
4751
  }
4752
- this.delay = S, this.session.setSessionToken(d), this.session.setUserInfo({
4752
+ this.delay = S, this.session.setSessionToken(h), this.session.setUserInfo({
4753
4753
  userBrowser: A,
4754
4754
  userCity: B,
4755
4755
  userCountry: D,
@@ -4757,16 +4757,16 @@ let No = class {
4757
4757
  userOS: N,
4758
4758
  userState: O
4759
4759
  }), this.session.assign({
4760
- sessionID: y,
4760
+ sessionID: v,
4761
4761
  timestamp: T || r,
4762
4762
  projectID: u
4763
4763
  }), P ? (this.socketMode = !0, this.worker.postMessage("stop")) : this.worker.postMessage({
4764
4764
  type: "auth",
4765
- token: d,
4765
+ token: h,
4766
4766
  beaconSizeLimit: p
4767
- }), !l && d === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(ut(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([C, F]) => this.send(os(C, F))), this.localStorage.setItem(this.options.local_uuid_key, c), this.compressionThreshold = v;
4768
- const V = { sessionToken: d, userUUID: c, sessionID: y };
4769
- if (this.startCallbacks.forEach((C) => C(V)), this.featureFlags.reloadFlags(), await this.tagWatcher.fetchTags(this.options.ingestPoint, d), this.activityState = Q.Active, L && !this.options.canvas.disableCanvas && (this.canvasRecorder = this.canvasRecorder ?? new po(this, {
4767
+ }), !l && h === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(ut(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([C, F]) => this.send(os(C, F))), this.localStorage.setItem(this.options.local_uuid_key, c), this.compressionThreshold = y;
4768
+ const V = { sessionToken: h, userUUID: c, sessionID: v };
4769
+ if (this.startCallbacks.forEach((C) => C(V)), this.featureFlags.reloadFlags(), await this.tagWatcher.fetchTags(this.options.ingestPoint, h), this.activityState = Q.Active, L && !this.options.canvas.disableCanvas && (this.canvasRecorder = this.canvasRecorder ?? new po(this, {
4770
4770
  fps: E,
4771
4771
  quality: I,
4772
4772
  isDebug: this.options.canvas.__save_canvas_locally,
@@ -4789,15 +4789,15 @@ let No = class {
4789
4789
  j = F ? parseInt(F, 10) : void 0;
4790
4790
  }
4791
4791
  }
4792
- return j && (this.uxtManager.isActive ? this.onUxtCb.forEach((C) => C(j)) : this.uxtManager.getTest(j, d, !!q).then((C) => {
4792
+ return j && (this.uxtManager.isActive ? this.onUxtCb.forEach((C) => C(j)) : this.uxtManager.getTest(j, h, !!q).then((C) => {
4793
4793
  C && this.onUxtCb.forEach((F) => F(C));
4794
4794
  })), Co(V);
4795
4795
  } catch (a) {
4796
4796
  if (this.stop(), this.session.reset(), a === Ze)
4797
4797
  return this.signalError(Ze, []), _e(Ze);
4798
4798
  this._debug("session_start", a);
4799
- const d = a instanceof Error ? a.message : a.toString();
4800
- return this.signalError(d, []), _e(d);
4799
+ const h = a instanceof Error ? a.message : a.toString();
4800
+ return this.signalError(h, []), _e(h);
4801
4801
  }
4802
4802
  }
4803
4803
  addOnUxtCb(e) {
@@ -4936,16 +4936,16 @@ function Lo(t, e) {
4936
4936
  }, e);
4937
4937
  if (!Array.isArray(n.consoleMethods) || n.consoleMethods.length === 0)
4938
4938
  return;
4939
- const s = t.safe((a, d) => t.send(Sr(a, Do(d))));
4939
+ const s = t.safe((a, h) => t.send(Sr(a, Do(h))));
4940
4940
  let i = 0;
4941
4941
  const r = () => {
4942
4942
  i = 0;
4943
4943
  };
4944
4944
  t.attachStartCallback(r), t.ticker.attach(r, 33, !1);
4945
- const o = (a, d) => {
4945
+ const o = (a, h) => {
4946
4946
  const c = {
4947
- apply: function(u, p, v) {
4948
- Reflect.apply(u, d, v), i = i + 1, !(i > n.consoleThrottling) && s(u.name, v);
4947
+ apply: function(u, p, y) {
4948
+ Reflect.apply(u, h, y), i = i + 1, !(i > n.consoleThrottling) && s(u.name, y);
4949
4949
  }
4950
4950
  };
4951
4951
  n.consoleMethods.forEach((u) => {
@@ -4953,58 +4953,58 @@ function Lo(t, e) {
4953
4953
  t.debug.error(`OpenReplay: unsupported console method "${u}"`);
4954
4954
  return;
4955
4955
  }
4956
- const p = d.console[u];
4956
+ const p = h.console[u];
4957
4957
  a[u] = new Proxy(p, c);
4958
4958
  });
4959
4959
  }, l = t.safe((a) => o(a.console, a));
4960
4960
  l(window), t.observer.attachContextCallback(l);
4961
4961
  }
4962
- var vi = { exports: {} }, ln = { exports: {} }, Is;
4962
+ var yi = { exports: {} }, ln = { exports: {} }, Is;
4963
4963
  function Fo() {
4964
4964
  return Is || (Is = 1, function(t, e) {
4965
4965
  (function(n, s) {
4966
4966
  t.exports = s();
4967
4967
  })(qe, function() {
4968
- function n(y) {
4969
- return !isNaN(parseFloat(y)) && isFinite(y);
4968
+ function n(v) {
4969
+ return !isNaN(parseFloat(v)) && isFinite(v);
4970
4970
  }
4971
- function s(y) {
4972
- return y.charAt(0).toUpperCase() + y.substring(1);
4971
+ function s(v) {
4972
+ return v.charAt(0).toUpperCase() + v.substring(1);
4973
4973
  }
4974
- function i(y) {
4974
+ function i(v) {
4975
4975
  return function() {
4976
- return this[y];
4976
+ return this[v];
4977
4977
  };
4978
4978
  }
4979
- var r = ["isConstructor", "isEval", "isNative", "isToplevel"], o = ["columnNumber", "lineNumber"], l = ["fileName", "functionName", "source"], a = ["args"], d = ["evalOrigin"], c = r.concat(o, l, a, d);
4980
- function u(y) {
4981
- if (y)
4979
+ var r = ["isConstructor", "isEval", "isNative", "isToplevel"], o = ["columnNumber", "lineNumber"], l = ["fileName", "functionName", "source"], a = ["args"], h = ["evalOrigin"], c = r.concat(o, l, a, h);
4980
+ function u(v) {
4981
+ if (v)
4982
4982
  for (var T = 0; T < c.length; T++)
4983
- y[c[T]] !== void 0 && this["set" + s(c[T])](y[c[T]]);
4983
+ v[c[T]] !== void 0 && this["set" + s(c[T])](v[c[T]]);
4984
4984
  }
4985
4985
  u.prototype = {
4986
4986
  getArgs: function() {
4987
4987
  return this.args;
4988
4988
  },
4989
- setArgs: function(y) {
4990
- if (Object.prototype.toString.call(y) !== "[object Array]")
4989
+ setArgs: function(v) {
4990
+ if (Object.prototype.toString.call(v) !== "[object Array]")
4991
4991
  throw new TypeError("Args must be an Array");
4992
- this.args = y;
4992
+ this.args = v;
4993
4993
  },
4994
4994
  getEvalOrigin: function() {
4995
4995
  return this.evalOrigin;
4996
4996
  },
4997
- setEvalOrigin: function(y) {
4998
- if (y instanceof u)
4999
- this.evalOrigin = y;
5000
- else if (y instanceof Object)
5001
- this.evalOrigin = new u(y);
4997
+ setEvalOrigin: function(v) {
4998
+ if (v instanceof u)
4999
+ this.evalOrigin = v;
5000
+ else if (v instanceof Object)
5001
+ this.evalOrigin = new u(v);
5002
5002
  else
5003
5003
  throw new TypeError("Eval Origin must be an Object or StackFrame");
5004
5004
  },
5005
5005
  toString: function() {
5006
- var y = this.getFileName() || "", T = this.getLineNumber() || "", A = this.getColumnNumber() || "", B = this.getFunctionName() || "";
5007
- return this.getIsEval() ? y ? "[eval] (" + y + ":" + T + ":" + A + ")" : "[eval]:" + T + ":" + A : B ? B + " (" + y + ":" + T + ":" + A + ")" : y + ":" + T + ":" + A;
5006
+ var v = this.getFileName() || "", T = this.getLineNumber() || "", A = this.getColumnNumber() || "", B = this.getFunctionName() || "";
5007
+ return this.getIsEval() ? v ? "[eval] (" + v + ":" + T + ":" + A + ")" : "[eval]:" + T + ":" + A : B ? B + " (" + v + ":" + T + ":" + A + ")" : v + ":" + T + ":" + A;
5008
5008
  }
5009
5009
  }, u.fromString = function(T) {
5010
5010
  var A = T.indexOf("("), B = T.lastIndexOf(")"), D = T.substring(0, A), k = T.substring(A + 1, B).split(","), N = T.substring(B + 1);
@@ -5019,23 +5019,23 @@ function Fo() {
5019
5019
  });
5020
5020
  };
5021
5021
  for (var p = 0; p < r.length; p++)
5022
- u.prototype["get" + s(r[p])] = i(r[p]), u.prototype["set" + s(r[p])] = /* @__PURE__ */ function(y) {
5022
+ u.prototype["get" + s(r[p])] = i(r[p]), u.prototype["set" + s(r[p])] = /* @__PURE__ */ function(v) {
5023
5023
  return function(T) {
5024
- this[y] = !!T;
5024
+ this[v] = !!T;
5025
5025
  };
5026
5026
  }(r[p]);
5027
- for (var v = 0; v < o.length; v++)
5028
- u.prototype["get" + s(o[v])] = i(o[v]), u.prototype["set" + s(o[v])] = /* @__PURE__ */ function(y) {
5027
+ for (var y = 0; y < o.length; y++)
5028
+ u.prototype["get" + s(o[y])] = i(o[y]), u.prototype["set" + s(o[y])] = /* @__PURE__ */ function(v) {
5029
5029
  return function(T) {
5030
5030
  if (!n(T))
5031
- throw new TypeError(y + " must be a Number");
5032
- this[y] = Number(T);
5031
+ throw new TypeError(v + " must be a Number");
5032
+ this[v] = Number(T);
5033
5033
  };
5034
- }(o[v]);
5034
+ }(o[y]);
5035
5035
  for (var S = 0; S < l.length; S++)
5036
- u.prototype["get" + s(l[S])] = i(l[S]), u.prototype["set" + s(l[S])] = /* @__PURE__ */ function(y) {
5036
+ u.prototype["get" + s(l[S])] = i(l[S]), u.prototype["set" + s(l[S])] = /* @__PURE__ */ function(v) {
5037
5037
  return function(T) {
5038
- this[y] = String(T);
5038
+ this[v] = String(T);
5039
5039
  };
5040
5040
  }(l[S]);
5041
5041
  return u;
@@ -5067,41 +5067,41 @@ function Fo() {
5067
5067
  extractLocation: function(a) {
5068
5068
  if (a.indexOf(":") === -1)
5069
5069
  return [a];
5070
- var d = /(.+?)(?::(\d+))?(?::(\d+))?$/, c = d.exec(a.replace(/[()]/g, ""));
5070
+ var h = /(.+?)(?::(\d+))?(?::(\d+))?$/, c = h.exec(a.replace(/[()]/g, ""));
5071
5071
  return [c[1], c[2] || void 0, c[3] || void 0];
5072
5072
  },
5073
5073
  parseV8OrIE: function(a) {
5074
- var d = a.stack.split(`
5074
+ var h = a.stack.split(`
5075
5075
  `).filter(function(c) {
5076
5076
  return !!c.match(r);
5077
5077
  }, this);
5078
- return d.map(function(c) {
5078
+ return h.map(function(c) {
5079
5079
  c.indexOf("(eval ") > -1 && (c = c.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, ""));
5080
5080
  var u = c.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), p = u.match(/ (\(.+\)$)/);
5081
5081
  u = p ? u.replace(p[0], "") : u;
5082
- var v = this.extractLocation(p ? p[1] : u), S = p && u || void 0, y = ["eval", "<anonymous>"].indexOf(v[0]) > -1 ? void 0 : v[0];
5082
+ var y = this.extractLocation(p ? p[1] : u), S = p && u || void 0, v = ["eval", "<anonymous>"].indexOf(y[0]) > -1 ? void 0 : y[0];
5083
5083
  return new s({
5084
5084
  functionName: S,
5085
- fileName: y,
5086
- lineNumber: v[1],
5087
- columnNumber: v[2],
5085
+ fileName: v,
5086
+ lineNumber: y[1],
5087
+ columnNumber: y[2],
5088
5088
  source: c
5089
5089
  });
5090
5090
  }, this);
5091
5091
  },
5092
5092
  parseFFOrSafari: function(a) {
5093
- var d = a.stack.split(`
5093
+ var h = a.stack.split(`
5094
5094
  `).filter(function(c) {
5095
5095
  return !c.match(o);
5096
5096
  }, this);
5097
- return d.map(function(c) {
5097
+ return h.map(function(c) {
5098
5098
  if (c.indexOf(" > eval") > -1 && (c = c.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), c.indexOf("@") === -1 && c.indexOf(":") === -1)
5099
5099
  return new s({
5100
5100
  functionName: c
5101
5101
  });
5102
- var u = /((.*".+"[^@]*)?[^@]*)(?:@)/, p = c.match(u), v = p && p[1] ? p[1] : void 0, S = this.extractLocation(c.replace(u, ""));
5102
+ var u = /((.*".+"[^@]*)?[^@]*)(?:@)/, p = c.match(u), y = p && p[1] ? p[1] : void 0, S = this.extractLocation(c.replace(u, ""));
5103
5103
  return new s({
5104
- functionName: v,
5104
+ functionName: y,
5105
5105
  fileName: S[0],
5106
5106
  lineNumber: S[1],
5107
5107
  columnNumber: S[2],
@@ -5116,9 +5116,9 @@ function Fo() {
5116
5116
  `).length ? this.parseOpera9(a) : a.stack ? this.parseOpera11(a) : this.parseOpera10(a);
5117
5117
  },
5118
5118
  parseOpera9: function(a) {
5119
- for (var d = /Line (\d+).*script (?:in )?(\S+)/i, c = a.message.split(`
5120
- `), u = [], p = 2, v = c.length; p < v; p += 2) {
5121
- var S = d.exec(c[p]);
5119
+ for (var h = /Line (\d+).*script (?:in )?(\S+)/i, c = a.message.split(`
5120
+ `), u = [], p = 2, y = c.length; p < y; p += 2) {
5121
+ var S = h.exec(c[p]);
5122
5122
  S && u.push(new s({
5123
5123
  fileName: S[2],
5124
5124
  lineNumber: S[1],
@@ -5128,9 +5128,9 @@ function Fo() {
5128
5128
  return u;
5129
5129
  },
5130
5130
  parseOpera10: function(a) {
5131
- for (var d = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, c = a.stacktrace.split(`
5132
- `), u = [], p = 0, v = c.length; p < v; p += 2) {
5133
- var S = d.exec(c[p]);
5131
+ for (var h = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, c = a.stacktrace.split(`
5132
+ `), u = [], p = 0, y = c.length; p < y; p += 2) {
5133
+ var S = h.exec(c[p]);
5134
5134
  S && u.push(
5135
5135
  new s({
5136
5136
  functionName: S[3] || void 0,
@@ -5144,14 +5144,14 @@ function Fo() {
5144
5144
  },
5145
5145
  // Opera 10.65+ Error.stack very similar to FF/Safari
5146
5146
  parseOpera11: function(a) {
5147
- var d = a.stack.split(`
5147
+ var h = a.stack.split(`
5148
5148
  `).filter(function(c) {
5149
5149
  return !!c.match(i) && !c.match(/^Error created at/);
5150
5150
  }, this);
5151
- return d.map(function(c) {
5152
- var u = c.split("@"), p = this.extractLocation(u.pop()), v = u.shift() || "", S = v.replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0, y;
5153
- v.match(/\(([^)]*)\)/) && (y = v.replace(/^[^(]+\(([^)]*)\)$/, "$1"));
5154
- var T = y === void 0 || y === "[arguments not available]" ? void 0 : y.split(",");
5151
+ return h.map(function(c) {
5152
+ var u = c.split("@"), p = this.extractLocation(u.pop()), y = u.shift() || "", S = y.replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0, v;
5153
+ y.match(/\(([^)]*)\)/) && (v = y.replace(/^[^(]+\(([^)]*)\)$/, "$1"));
5154
+ var T = v === void 0 || v === "[arguments not available]" ? void 0 : v.split(",");
5155
5155
  return new s({
5156
5156
  functionName: S,
5157
5157
  args: T,
@@ -5164,8 +5164,8 @@ function Fo() {
5164
5164
  }
5165
5165
  };
5166
5166
  });
5167
- })(vi);
5168
- var Mo = vi.exports;
5167
+ })(yi);
5168
+ var Mo = yi.exports;
5169
5169
  const Po = /* @__PURE__ */ Gs(Mo);
5170
5170
  function Cs(t) {
5171
5171
  return [
@@ -5186,7 +5186,7 @@ function Et(t, e, n = {}) {
5186
5186
  }
5187
5187
  return xn(t.name, t.message, JSON.stringify(s), JSON.stringify(n));
5188
5188
  }
5189
- function yi(t, e = window, n = {}) {
5189
+ function vi(t, e = window, n = {}) {
5190
5190
  if (t instanceof ErrorEvent) {
5191
5191
  if (t.error instanceof Error)
5192
5192
  return Et(t.error, Cs(t), n);
@@ -5215,7 +5215,7 @@ function Bo(t, e) {
5215
5215
  }, e);
5216
5216
  function s(i) {
5217
5217
  function r(o) {
5218
- const l = yi(o, i);
5218
+ const l = vi(o, i);
5219
5219
  l != null && t.send(l);
5220
5220
  }
5221
5221
  t.attachEventListener(i, "unhandledrejection", r), t.attachEventListener(i, "error", r);
@@ -5232,17 +5232,17 @@ const zo = "https://static.openreplay.com/tracker/placeholder.jpeg";
5232
5232
  function Uo(t) {
5233
5233
  function e(l, a) {
5234
5234
  t.attributeSender.sendSetAttribute(l, "src", zo);
5235
- const { width: d, height: c } = a.getBoundingClientRect();
5236
- a.hasAttribute("width") || t.attributeSender.sendSetAttribute(l, "width", String(d)), a.hasAttribute("height") || t.attributeSender.sendSetAttribute(l, "height", String(c));
5235
+ const { width: h, height: c } = a.getBoundingClientRect();
5236
+ a.hasAttribute("width") || t.attributeSender.sendSetAttribute(l, "width", String(h)), a.hasAttribute("height") || t.attributeSender.sendSetAttribute(l, "height", String(c));
5237
5237
  }
5238
5238
  const n = function(l, a) {
5239
- const { srcset: d } = a;
5240
- if (!d)
5239
+ const { srcset: h } = a;
5240
+ if (!h)
5241
5241
  return;
5242
- const c = d.split(d.match(/,\s+/) ? /,\s+/ : ",").map((u) => _s(u)).join(", ");
5242
+ const c = h.split(h.match(/,\s+/) ? /,\s+/ : ",").map((u) => _s(u)).join(", ");
5243
5243
  t.attributeSender.sendSetAttribute(l, "srcset", c);
5244
5244
  }, s = function(l, a) {
5245
- a.src.length > nr && e(l, a), t.send(yn(l, "src", a.src, t.getBaseHref()));
5245
+ a.src.length > nr && e(l, a), t.send(vn(l, "src", a.src, t.getBaseHref()));
5246
5246
  }, i = t.safe(function(l) {
5247
5247
  const a = _s(l.src || "");
5248
5248
  ai(a) && t.send(fi(t.timestamp(), 0, 0, 0, 0, 0, a, "img", 0, !1));
@@ -5252,10 +5252,10 @@ function Uo(t) {
5252
5252
  }), o = ci(t.safe((l) => {
5253
5253
  for (const a of l)
5254
5254
  if (a.type === "attributes") {
5255
- const d = a.target, c = t.nodes.getID(d);
5255
+ const h = a.target, c = t.nodes.getID(h);
5256
5256
  if (c === void 0)
5257
5257
  return;
5258
- a.attributeName === "src" && s(c, d), a.attributeName === "srcset" && n(c, d);
5258
+ a.attributeName === "src" && s(c, h), a.attributeName === "srcset" && n(c, h);
5259
5259
  }
5260
5260
  }));
5261
5261
  t.attachStopCallback(() => {
@@ -5325,10 +5325,10 @@ function Go(t, e) {
5325
5325
  obscureInputDates: !1
5326
5326
  }, e);
5327
5327
  function s(c, u) {
5328
- let p = u.value, v = n.defaultInputMode;
5329
- u.type === "password" || t.sanitizer.isHidden(c) ? v = ze.Hidden : (t.sanitizer.isObscured(c) || v === ze.Plain && (n.obscureInputNumbers && u.type !== "date" && /\d\d\d\d/.test(p) || n.obscureInputDates && u.type === "date" || n.obscureInputEmails && (u.type === "email" || ~p.indexOf("@")))) && (v = ze.Obscured);
5328
+ let p = u.value, y = n.defaultInputMode;
5329
+ u.type === "password" || t.sanitizer.isHidden(c) ? y = ze.Hidden : (t.sanitizer.isObscured(c) || y === ze.Plain && (n.obscureInputNumbers && u.type !== "date" && /\d\d\d\d/.test(p) || n.obscureInputDates && u.type === "date" || n.obscureInputEmails && (u.type === "email" || ~p.indexOf("@")))) && (y = ze.Obscured);
5330
5330
  let S = 0;
5331
- switch (v) {
5331
+ switch (y) {
5332
5332
  case ze.Hidden:
5333
5333
  S = -1, p = "";
5334
5334
  break;
@@ -5339,8 +5339,8 @@ function Go(t, e) {
5339
5339
  return { value: p, mask: S };
5340
5340
  }
5341
5341
  function i(c, u) {
5342
- const { value: p, mask: v } = s(c, u);
5343
- t.send(vr(c, p, v));
5342
+ const { value: p, mask: y } = s(c, u);
5343
+ t.send(yr(c, p, y));
5344
5344
  }
5345
5345
  const r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
5346
5346
  t.attachStopCallback(() => {
@@ -5350,7 +5350,7 @@ function Go(t, e) {
5350
5350
  r.get(c) !== u.value && (r.set(c, u.value), i(c, u));
5351
5351
  }
5352
5352
  function a(c, u) {
5353
- o.get(c) !== u && (o.set(c, u), t.send(yr(c, u)));
5353
+ o.get(c) !== u && (o.set(c, u), t.send(vr(c, u)));
5354
5354
  }
5355
5355
  t.ticker.attach(() => {
5356
5356
  r.forEach((c, u) => {
@@ -5365,24 +5365,24 @@ function Go(t, e) {
5365
5365
  a(u, p.checked);
5366
5366
  });
5367
5367
  }, 3);
5368
- function d(c, u, p, v) {
5369
- const { value: S, mask: y } = s(c, u), T = wi(u);
5370
- t.send(Mr(c, S, y !== 0, T, p, v));
5368
+ function h(c, u, p, y) {
5369
+ const { value: S, mask: v } = s(c, u), T = wi(u);
5370
+ t.send(Mr(c, S, v !== 0, T, p, y));
5371
5371
  }
5372
5372
  t.nodes.attachNodeCallback(t.safe((c) => {
5373
5373
  const u = t.nodes.getID(c);
5374
5374
  if (u !== void 0) {
5375
5375
  if (Z(c, "select") && (i(u, c), t.nodes.attachNodeListener(c, "change", () => i(u, c))), $o(c)) {
5376
5376
  l(u, c);
5377
- let p = 0, v = 0, S = 0;
5378
- const y = () => {
5377
+ let p = 0, y = 0, S = 0;
5378
+ const v = () => {
5379
5379
  p = ge();
5380
5380
  }, T = () => {
5381
- v === 0 && p !== 0 && (v = ge() - p);
5381
+ y === 0 && p !== 0 && (y = ge() - p);
5382
5382
  }, A = () => {
5383
- p !== 0 && (S = ge() - p), d(u, c, v, S), v = 0, S = 0, p = 0;
5383
+ p !== 0 && (S = ge() - p), h(u, c, y, S), y = 0, S = 0, p = 0;
5384
5384
  };
5385
- t.nodes.attachNodeListener(c, "focus", y), t.nodes.attachNodeListener(c, "input", T), t.nodes.attachNodeListener(c, "change", A);
5385
+ t.nodes.attachNodeListener(c, "focus", v), t.nodes.attachNodeListener(c, "input", T), t.nodes.attachNodeListener(c, "change", A);
5386
5386
  return;
5387
5387
  }
5388
5388
  if (qo(c)) {
@@ -5428,16 +5428,16 @@ function ot(t, e, n) {
5428
5428
  if (ue.timeoutMs !== void 0 && l > ue.timeoutMs)
5429
5429
  throw new Error(`Timeout: Can't find a unique selector after ${l}ms`);
5430
5430
  let a = ct(Xo(r)) || ct(...Jo(r)) || ct(...Yo(r)) || ct(Qo(r)) || [Rs()];
5431
- const d = Zo(r);
5431
+ const h = Zo(r);
5432
5432
  if (e == "all")
5433
- d && (a = a.concat(a.filter(dn).map((c) => at(c, d))));
5433
+ h && (a = a.concat(a.filter(hn).map((c) => at(c, h))));
5434
5434
  else if (e == "two")
5435
- a = a.slice(0, 1), d && (a = a.concat(a.filter(dn).map((c) => at(c, d))));
5435
+ a = a.slice(0, 1), h && (a = a.concat(a.filter(hn).map((c) => at(c, h))));
5436
5436
  else if (e == "one") {
5437
5437
  const [c] = a = a.slice(0, 1);
5438
- d && dn(c) && (a = [at(c, d)]);
5438
+ h && hn(c) && (a = [at(c, h)]);
5439
5439
  } else
5440
- e == "none" && (a = [Rs()], d && (a = [at(a[0], d)]));
5440
+ e == "none" && (a = [Rs()], h && (a = [at(a[0], h)]));
5441
5441
  for (let c of a)
5442
5442
  c.level = o;
5443
5443
  if (i.push(a), i.length >= ue.seedMinLength && (s = Ns(i, n), s))
@@ -5527,7 +5527,7 @@ function at(t, e) {
5527
5527
  penalty: t.penalty + 1
5528
5528
  };
5529
5529
  }
5530
- function dn(t) {
5530
+ function hn(t) {
5531
5531
  return t.name !== "html" && !t.name.startsWith("#");
5532
5532
  }
5533
5533
  function ct(...t) {
@@ -5619,27 +5619,27 @@ function ia(t, e) {
5619
5619
  }
5620
5620
  return "";
5621
5621
  }
5622
- let i = -1, r = -1, o = !1, l = null, a = 0, d = {}, c = 0, u = 0, p = 0, v = 0, S;
5623
- const y = 8e-3, T = 225;
5622
+ let i = -1, r = -1, o = !1, l = null, a = 0, h = {}, c = 0, u = 0, p = 0, y = 0, S;
5623
+ const v = 8e-3, T = 225;
5624
5624
  function A() {
5625
- const k = v / T;
5625
+ const k = y / T;
5626
5626
  if (!c) {
5627
5627
  c = k;
5628
5628
  return;
5629
5629
  }
5630
5630
  const N = (k - c) / T;
5631
- p > 4 && N > y && t.send(Pr(ge())), v = 0, p = 0, c = k;
5631
+ p > 4 && N > v && t.send(Pr(ge())), y = 0, p = 0, c = k;
5632
5632
  }
5633
5633
  t.attachStartCallback(() => {
5634
5634
  S = setInterval(() => A(), T);
5635
5635
  }), t.attachStopCallback(() => {
5636
- i = -1, r = -1, o = !1, l = null, d = {}, S && clearInterval(S);
5636
+ i = -1, r = -1, o = !1, l = null, h = {}, S && clearInterval(S);
5637
5637
  });
5638
5638
  const B = () => {
5639
5639
  o && (t.send(wr(i, r)), o = !1);
5640
5640
  }, D = (k, N = !1) => {
5641
5641
  function O(I, E, P) {
5642
- return d[I] = d[I] || na(E, k, P);
5642
+ return h[I] = h[I] || na(E, k, P);
5643
5643
  }
5644
5644
  const L = N ? t.attachEventListener.bind(t) : t.nodes.attachNodeListener.bind(t.nodes);
5645
5645
  L(k.documentElement, "mouseover", (I) => {
@@ -5649,7 +5649,7 @@ function ia(t, e) {
5649
5649
  const [E, P] = t.observer.getDocumentOffset(k);
5650
5650
  i = I.clientX + E, r = I.clientY + P, o = !0;
5651
5651
  const V = Math.sign(I.movementX);
5652
- v += Math.abs(I.movementX) + Math.abs(I.movementY), V !== u && (u = V, p++);
5652
+ y += Math.abs(I.movementX) + Math.abs(I.movementY), V !== u && (u = V, p++);
5653
5653
  }, !1), L(k, "click", (I) => {
5654
5654
  const E = As(I.target, k);
5655
5655
  if (!I.clientX && !I.clientY || E === null)
@@ -5677,8 +5677,8 @@ function ra(t) {
5677
5677
  if (Z(r, "img") && (o = r.currentSrc || r.src), !o) {
5678
5678
  const S = getComputedStyle(r).getPropertyValue("background-image");
5679
5679
  if (S) {
5680
- const y = s.exec(S);
5681
- y !== null && (o = y[1], (o.startsWith('"') || o.startsWith("'")) && (o = o.substr(1, o.length - 2)));
5680
+ const v = s.exec(S);
5681
+ v !== null && (o = v[1], (o.startsWith('"') || o.startsWith("'")) && (o = o.substr(1, o.length - 2)));
5682
5682
  }
5683
5683
  }
5684
5684
  if (!o)
@@ -5686,11 +5686,11 @@ function ra(t) {
5686
5686
  const l = o.substr(0, 10) === "data:image" ? 0 : t[o];
5687
5687
  if (l === void 0)
5688
5688
  continue;
5689
- const a = r.getBoundingClientRect(), d = Math.max(a.top, 0), c = Math.max(a.left, 0), u = Math.min(a.bottom, window.innerHeight || document.documentElement && document.documentElement.clientHeight || 0), p = Math.min(a.right, window.innerWidth || document.documentElement && document.documentElement.clientWidth || 0);
5690
- if (u <= d || p <= c)
5689
+ const a = r.getBoundingClientRect(), h = Math.max(a.top, 0), c = Math.max(a.left, 0), u = Math.min(a.bottom, window.innerHeight || document.documentElement && document.documentElement.clientHeight || 0), p = Math.min(a.right, window.innerWidth || document.documentElement && document.documentElement.clientWidth || 0);
5690
+ if (u <= h || p <= c)
5691
5691
  continue;
5692
- const v = (u - d) * (p - c);
5693
- e.push({ time: l, area: v });
5692
+ const y = (u - h) * (p - c);
5693
+ e.push({ time: l, area: y });
5694
5694
  }
5695
5695
  return e;
5696
5696
  }
@@ -5712,43 +5712,43 @@ function aa(t, e) {
5712
5712
  if ("PerformanceObserver" in window || (n.captureResourceTimings = !1), !n.captureResourceTimings)
5713
5713
  return;
5714
5714
  let s = {};
5715
- function i(d) {
5715
+ function i(h) {
5716
5716
  var u;
5717
- if (d.duration < 0 || !ai(d.name) || t.isServiceURL(d.name))
5717
+ if (h.duration < 0 || !ai(h.name) || t.isServiceURL(h.name))
5718
5718
  return;
5719
- s !== null && (s[d.name] = d.startTime + d.duration);
5719
+ s !== null && (s[h.name] = h.startTime + h.duration);
5720
5720
  let c = !1;
5721
5721
  (u = n.excludedResourceUrls) == null || u.forEach((p) => {
5722
- if (d.name.startsWith(p)) {
5722
+ if (h.name.startsWith(p)) {
5723
5723
  c = !0;
5724
5724
  return;
5725
5725
  }
5726
5726
  }), !c && t.send(fi(
5727
- d.startTime + Ve(),
5728
- d.duration,
5729
- d.responseStart && d.startTime ? d.responseStart - d.startTime : 0,
5730
- d.transferSize > d.encodedBodySize ? d.transferSize - d.encodedBodySize : 0,
5731
- d.encodedBodySize || 0,
5732
- d.decodedBodySize || 0,
5733
- d.name,
5734
- d.initiatorType,
5735
- d.transferSize,
5727
+ h.startTime + Ve(),
5728
+ h.duration,
5729
+ h.responseStart && h.startTime ? h.responseStart - h.startTime : 0,
5730
+ h.transferSize > h.encodedBodySize ? h.transferSize - h.encodedBodySize : 0,
5731
+ h.encodedBodySize || 0,
5732
+ h.decodedBodySize || 0,
5733
+ h.name,
5734
+ h.initiatorType,
5735
+ h.transferSize,
5736
5736
  // @ts-ignore
5737
- d.responseStatus && d.responseStatus === 304 || d.transferSize === 0
5737
+ h.responseStatus && h.responseStatus === 304 || h.transferSize === 0
5738
5738
  ));
5739
5739
  }
5740
- const r = new PerformanceObserver((d) => d.getEntries().forEach(i));
5740
+ const r = new PerformanceObserver((h) => h.getEntries().forEach(i));
5741
5741
  let o;
5742
- t.attachStartCallback(function({ sessionID: d }) {
5743
- d !== o && (performance.getEntriesByType("resource").forEach(i), o = d), r.observe({ entryTypes: ["resource"] });
5742
+ t.attachStartCallback(function({ sessionID: h }) {
5743
+ h !== o && (performance.getEntriesByType("resource").forEach(i), o = h), r.observe({ entryTypes: ["resource"] });
5744
5744
  }), t.attachStopCallback(function() {
5745
5745
  r.disconnect();
5746
5746
  });
5747
5747
  let l = 0, a = 0;
5748
5748
  if (n.capturePageLoadTimings) {
5749
- let d = !1;
5749
+ let h = !1;
5750
5750
  t.ticker.attach(() => {
5751
- if (!d && ((l === 0 || a === 0) && performance.getEntriesByType("paint").forEach((c) => {
5751
+ if (!h && ((l === 0 || a === 0) && performance.getEntriesByType("paint").forEach((c) => {
5752
5752
  const { name: u, startTime: p } = c;
5753
5753
  switch (u) {
5754
5754
  case "first-paint":
@@ -5759,7 +5759,7 @@ function aa(t, e) {
5759
5759
  break;
5760
5760
  }
5761
5761
  }), performance.timing.loadEventEnd || performance.now() > 3e4)) {
5762
- d = !0;
5762
+ h = !0;
5763
5763
  const {
5764
5764
  // should be ok to use here, (https://github.com/mdn/content/issues/4713)
5765
5765
  // since it is compared with the values obtained on the page load (before any possible sleep state)
@@ -5767,31 +5767,31 @@ function aa(t, e) {
5767
5767
  navigationStart: c,
5768
5768
  requestStart: u,
5769
5769
  responseStart: p,
5770
- responseEnd: v,
5770
+ responseEnd: y,
5771
5771
  domContentLoadedEventStart: S,
5772
- domContentLoadedEventEnd: y,
5772
+ domContentLoadedEventEnd: v,
5773
5773
  loadEventStart: T,
5774
5774
  loadEventEnd: A
5775
5775
  } = performance.timing;
5776
- t.send(xr(u - c || 0, p - c || 0, v - c || 0, S - c || 0, y - c || 0, T - c || 0, A - c || 0, l, a));
5776
+ t.send(xr(u - c || 0, p - c || 0, y - c || 0, S - c || 0, v - c || 0, T - c || 0, A - c || 0, l, a));
5777
5777
  }
5778
5778
  }, 30);
5779
5779
  }
5780
5780
  if (n.capturePageRenderTimings) {
5781
- let d = 0, c = 0, u = 0, p = null, v = !1;
5781
+ let h = 0, c = 0, u = 0, p = null, y = !1;
5782
5782
  t.ticker.attach(() => {
5783
- if (v)
5783
+ if (y)
5784
5784
  return;
5785
5785
  const S = performance.now();
5786
- if (s !== null && (d = Math.max.apply(null, Object.keys(s).map((y) => s[y])), S - d > 1e3 && (p = ra(s), s = null)), u !== null && (S - u > 50 && (c = S), u = S - c > 5e3 ? null : S), p !== null && u === null || S > 3e4) {
5787
- v = !0, s = null;
5788
- const y = p === null ? 0 : oa(a || l, p), { domContentLoadedEventEnd: T, navigationStart: A } = performance.timing, B = u === null ? Math.max(c, a, T - A || 0) : 0;
5789
- t.send(kr(y, a > d ? a : d, B));
5786
+ if (s !== null && (h = Math.max.apply(null, Object.keys(s).map((v) => s[v])), S - h > 1e3 && (p = ra(s), s = null)), u !== null && (S - u > 50 && (c = S), u = S - c > 5e3 ? null : S), p !== null && u === null || S > 3e4) {
5787
+ y = !0, s = null;
5788
+ const v = p === null ? 0 : oa(a || l, p), { domContentLoadedEventEnd: T, navigationStart: A } = performance.timing, B = u === null ? Math.max(c, a, T - A || 0) : 0;
5789
+ t.send(kr(v, a > h ? a : h, B));
5790
5790
  }
5791
5791
  });
5792
5792
  }
5793
5793
  }
5794
- function hn(t) {
5794
+ function dn(t) {
5795
5795
  const e = t.defaultView;
5796
5796
  return [
5797
5797
  e && e.scrollX || t.documentElement && t.documentElement.scrollLeft || t.body && t.body.scrollLeft || 0,
@@ -5802,19 +5802,19 @@ function ca(t, e) {
5802
5802
  let n = !1;
5803
5803
  const s = /* @__PURE__ */ new Map();
5804
5804
  function i(l) {
5805
- gi(l) && (Te(l) && s.set(l, [l.scrollLeft, l.scrollTop]), kt(l) && s.set(l, hn(l)));
5805
+ gi(l) && (Te(l) && s.set(l, [l.scrollLeft, l.scrollTop]), kt(l) && s.set(l, dn(l)));
5806
5806
  }
5807
5807
  const r = t.safe(() => {
5808
- e || t.send(dr(...hn(document)));
5808
+ e || t.send(hr(...dn(document)));
5809
5809
  }), o = t.safe((l, a) => {
5810
- const d = t.nodes.getID(a);
5811
- d !== void 0 && t.send(br(d, l[0], l[1]));
5810
+ const h = t.nodes.getID(a);
5811
+ h !== void 0 && t.send(br(h, l[0], l[1]));
5812
5812
  });
5813
5813
  t.attachStartCallback(r), t.attachStopCallback(() => {
5814
5814
  n = !1, s.clear();
5815
5815
  }), t.nodes.attachNodeCallback((l, a) => {
5816
- a && (Te(l) && l.scrollLeft + l.scrollTop > 0 ? s.set(l, [l.scrollLeft, l.scrollTop]) : kt(l) && s.set(l, hn(l))), Ot(l) && t.nodes.attachNodeListener(l, "scroll", (d) => {
5817
- i(d.target);
5816
+ a && (Te(l) && l.scrollLeft + l.scrollTop > 0 ? s.set(l, [l.scrollLeft, l.scrollTop]) : kt(l) && s.set(l, dn(l))), Ot(l) && t.nodes.attachNodeListener(l, "scroll", (h) => {
5817
+ i(h.target);
5818
5818
  });
5819
5819
  }), t.attachEventListener(document, "scroll", (l) => {
5820
5820
  const a = l.target;
@@ -5830,11 +5830,11 @@ function ca(t, e) {
5830
5830
  function la(t) {
5831
5831
  let e, n, s, i, r = document.referrer;
5832
5832
  const o = t.safe(() => {
5833
- const { URL: d } = document;
5834
- d !== e && (e = d, t.send(Ur(e, r, i, document.title)), i = 0, r = e);
5833
+ const { URL: h } = document;
5834
+ h !== e && (e = h, t.send(Ur(e, r, i, document.title)), i = 0, r = e);
5835
5835
  }), l = t.safe(() => {
5836
- const { innerWidth: d, innerHeight: c } = window;
5837
- (d !== n || c !== s) && (n = d, s = c, t.send(lr(n, s)));
5836
+ const { innerWidth: h, innerHeight: c } = window;
5837
+ (h !== n || c !== s) && (n = h, s = c, t.send(lr(n, s)));
5838
5838
  }), a = document.hidden === void 0 ? Function.prototype : t.safe(() => t.send(Nr(document.hidden)));
5839
5839
  t.attachStartCallback(() => {
5840
5840
  e = null, i = Ve(), n = s = -1, o(), l(), a();
@@ -5844,12 +5844,12 @@ function Ls(t) {
5844
5844
  return Ot(t) && // @ts-ignore
5845
5845
  !!t.adoptedStyleSheets;
5846
5846
  }
5847
- let da = 15;
5847
+ let ha = 15;
5848
5848
  function Ii() {
5849
- return da++;
5849
+ return ha++;
5850
5850
  }
5851
5851
  const lt = /* @__PURE__ */ new Map();
5852
- function ha(t) {
5852
+ function da(t) {
5853
5853
  if (t === null || !Ls(document))
5854
5854
  return;
5855
5855
  const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), s = (o) => setTimeout(() => {
@@ -5858,30 +5858,30 @@ function ha(t) {
5858
5858
  return;
5859
5859
  let a = n.get(l);
5860
5860
  a || (a = []);
5861
- const d = [], c = o.adoptedStyleSheets;
5861
+ const h = [], c = o.adoptedStyleSheets;
5862
5862
  if (c && Symbol.iterator in c)
5863
5863
  for (const u of c) {
5864
5864
  let p = e.get(u);
5865
- const v = !p;
5866
- if (p || (p = Ii(), e.set(u, p)), a.includes(p) || t.send(ui(p, l)), v) {
5865
+ const y = !p;
5866
+ if (p || (p = Ii(), e.set(u, p)), a.includes(p) || t.send(ui(p, l)), y) {
5867
5867
  const S = u.cssRules;
5868
- for (let y = 0; y < S.length; y++)
5869
- t.send(Sn(p, S[y].cssText, y, t.getBaseHref()));
5868
+ for (let v = 0; v < S.length; v++)
5869
+ t.send(Sn(p, S[v].cssText, v, t.getBaseHref()));
5870
5870
  }
5871
- d.push(p);
5871
+ h.push(p);
5872
5872
  }
5873
5873
  if (Symbol.iterator in a)
5874
5874
  for (const u of a)
5875
- d.includes(u) || t.send(Lr(u, l));
5876
- n.set(l, d);
5875
+ h.includes(u) || t.send(Lr(u, l));
5876
+ n.set(l, h);
5877
5877
  }, 20);
5878
5878
  function i(o) {
5879
5879
  const l = Object.getOwnPropertyDescriptor(o, "adoptedStyleSheets");
5880
5880
  l && Object.defineProperty(o, "adoptedStyleSheets", {
5881
5881
  ...l,
5882
5882
  set: function(a) {
5883
- const d = l.set.call(this, a);
5884
- return s(this), d;
5883
+ const h = l.set.call(this, a);
5884
+ return s(this), h;
5885
5885
  }
5886
5886
  });
5887
5887
  }
@@ -5890,14 +5890,14 @@ function ha(t) {
5890
5890
  return;
5891
5891
  o.__openreplay_adpss_patched__ = !0, i(o.Document.prototype), i(o.ShadowRoot.prototype);
5892
5892
  const { replace: l, replaceSync: a } = o.CSSStyleSheet.prototype;
5893
- o.CSSStyleSheet.prototype.replace = function(d) {
5894
- return l.call(this, d).then((c) => {
5893
+ o.CSSStyleSheet.prototype.replace = function(h) {
5894
+ return l.call(this, h).then((c) => {
5895
5895
  const u = e.get(this);
5896
- return u && t.send(ls(u, d, t.getBaseHref())), c;
5896
+ return u && t.send(ls(u, h, t.getBaseHref())), c;
5897
5897
  });
5898
- }, o.CSSStyleSheet.prototype.replaceSync = function(d) {
5898
+ }, o.CSSStyleSheet.prototype.replaceSync = function(h) {
5899
5899
  const c = e.get(this);
5900
- return c && t.send(ls(c, d, t.getBaseHref())), a.call(this, d);
5900
+ return c && t.send(ls(c, h, t.getBaseHref())), a.call(this, h);
5901
5901
  };
5902
5902
  };
5903
5903
  r(window), t.observer.attachContextCallback(t.safe(r)), t.attachStopCallback(() => {
@@ -5917,7 +5917,7 @@ function ua(t) {
5917
5917
  }
5918
5918
  const e = t.safe((i, r, o) => {
5919
5919
  const l = lt.get(i);
5920
- l && (typeof o == "string" ? t.send(Sn(l, o, r, t.getBaseHref())) : t.send(ds(l, r)));
5920
+ l && (typeof o == "string" ? t.send(Sn(l, o, r, t.getBaseHref())) : t.send(hs(l, r)));
5921
5921
  }), n = t.safe((i) => {
5922
5922
  let r = i;
5923
5923
  for (; r.parentRule; )
@@ -5932,19 +5932,19 @@ function ua(t) {
5932
5932
  t.debug.warn("No sheedID found for", o, lt);
5933
5933
  return;
5934
5934
  }
5935
- const a = r.cssText, d = o.cssRules, c = Array.from(d).indexOf(r);
5936
- c >= 0 ? (t.send(Sn(l, a, c, t.getBaseHref())), t.send(ds(l, c + 1))) : t.debug.warn("Rule index not found in", o, r);
5935
+ const a = r.cssText, h = o.cssRules, c = Array.from(h).indexOf(r);
5936
+ c >= 0 ? (t.send(Sn(l, a, c, t.getBaseHref())), t.send(hs(l, c + 1))) : t.debug.warn("Rule index not found in", o, r);
5937
5937
  }), s = t.safe((i) => {
5938
5938
  const { insertRule: r, deleteRule: o } = i.CSSStyleSheet.prototype, { insertRule: l, deleteRule: a } = i.CSSGroupingRule.prototype;
5939
- i.CSSStyleSheet.prototype.insertRule = function(d, c = 0) {
5940
- return e(this, c, d), r.call(this, d, c);
5941
- }, i.CSSStyleSheet.prototype.deleteRule = function(d) {
5942
- return e(this, d), o.call(this, d);
5943
- }, i.CSSGroupingRule.prototype.insertRule = function(d, c = 0) {
5944
- const u = l.call(this, d, c);
5939
+ i.CSSStyleSheet.prototype.insertRule = function(h, c = 0) {
5940
+ return e(this, c, h), r.call(this, h, c);
5941
+ }, i.CSSStyleSheet.prototype.deleteRule = function(h) {
5942
+ return e(this, h), o.call(this, h);
5943
+ }, i.CSSGroupingRule.prototype.insertRule = function(h, c = 0) {
5944
+ const u = l.call(this, h, c);
5945
5945
  return n(this), u;
5946
- }, i.CSSGroupingRule.prototype.deleteRule = function(d = 0) {
5947
- const c = a.call(this, d);
5946
+ }, i.CSSGroupingRule.prototype.deleteRule = function(h = 0) {
5947
+ const c = a.call(this, h);
5948
5948
  return n(this), c;
5949
5949
  };
5950
5950
  });
@@ -5957,8 +5957,8 @@ function ua(t) {
5957
5957
  const o = i.sheet, l = Ii();
5958
5958
  lt.set(o, l), t.send(ui(l, r));
5959
5959
  const a = o.cssRules;
5960
- for (let d = 0; d < a.length; d++)
5961
- e(o, d, a[d].cssText);
5960
+ for (let h = 0; h < a.length; h++)
5961
+ e(o, h, a[h].cssText);
5962
5962
  });
5963
5963
  }
5964
5964
  function fa(t) {
@@ -5993,8 +5993,8 @@ function pa(t) {
5993
5993
  o[2] && t.safe(() => {
5994
5994
  l = JSON.stringify(o[2]);
5995
5995
  });
5996
- const a = [o[0], o[1], l], d = e.get(s.document) || [];
5997
- d.push(a), e.set(s.document, d);
5996
+ const a = [o[0], o[1], l], h = e.get(s.document) || [];
5997
+ h.push(a), e.set(s.document, h);
5998
5998
  const c = s === window ? 0 : t.nodes.getID(s.document);
5999
5999
  if (c === void 0)
6000
6000
  return;
@@ -6021,19 +6021,19 @@ function ga(t, e, n, s, i) {
6021
6021
  t.debug.log("Openreplay: attaching axios spy to instance", e);
6022
6022
  function r(p) {
6023
6023
  t.debug.log("Openreplay: capturing axios response data", p);
6024
- const { headers: v, data: S, method: y, url: T, baseURL: A } = p.config, { data: B, headers: D, status: k, response: N } = p, { data: O, headers: L, status: I } = N || {}, E = n.ignoreHeaders, P = Array.isArray(E) ? (U) => E.includes(U) : () => E;
6024
+ const { headers: y, data: S, method: v, url: T, baseURL: A } = p.config, { data: B, headers: D, status: k, response: N } = p, { data: O, headers: L, status: I } = N || {}, E = n.ignoreHeaders, P = Array.isArray(E) ? (U) => E.includes(U) : () => E;
6025
6025
  function V(U, b) {
6026
6026
  P(b[0]) || (U[b[0]] = b[1]);
6027
6027
  }
6028
6028
  let j = {}, q = {};
6029
- v.toJSON ? j = v.toJSON() : v instanceof Headers ? v.forEach((U, b) => V(j, [b, U])) : Array.isArray(v) ? v.forEach((U) => V(j, U)) : typeof v == "object" && Object.entries(v).forEach((U) => V(j, U));
6029
+ y.toJSON ? j = y.toJSON() : y instanceof Headers ? y.forEach((U, b) => V(j, [b, U])) : Array.isArray(y) ? y.forEach((U) => V(j, U)) : typeof y == "object" && Object.entries(y).forEach((U) => V(j, U));
6030
6030
  const C = L || D;
6031
6031
  C.toJSON ? q = C.toJSON() : C instanceof Headers ? C.forEach((U, b) => V(q, [b, U])) : Array.isArray(C) ? C.forEach((U) => V(q, U)) : typeof C == "object" && Object.entries(C).forEach(([U, b]) => {
6032
6032
  P(U) || (q[U] = b);
6033
6033
  });
6034
6034
  const F = s({
6035
6035
  url: T,
6036
- method: y || "",
6036
+ method: v || "",
6037
6037
  status: k || I || 0,
6038
6038
  request: {
6039
6039
  headers: j,
@@ -6049,12 +6049,12 @@ function ga(t, e, n, s, i) {
6049
6049
  return;
6050
6050
  }
6051
6051
  const G = p.config.__openreplay_timing, K = performance.now() - G;
6052
- t.debug.log("Openreplay: final req object", F), t.send(xt("xhr", String(y), String(F.url), i(F.request), i(F.response), F.status, G + Ve(), K, 0));
6052
+ t.debug.log("Openreplay: final req object", F), t.send(xt("xhr", String(v), String(F.url), i(F.request), i(F.response), F.status, G + Ve(), K, 0));
6053
6053
  }
6054
6054
  function o(p) {
6055
6055
  if (t.debug.log("Openreplay: capturing API request", p), p.__openreplay_timing = performance.now(), n.sessionTokenHeader) {
6056
- const v = typeof n.sessionTokenHeader == "string" ? n.sessionTokenHeader : "X-OpenReplay-Session-Token", S = t.getSessionToken();
6057
- S && p.headers.set(v, S);
6056
+ const y = typeof n.sessionTokenHeader == "string" ? n.sessionTokenHeader : "X-OpenReplay-Session-Token", S = t.getSessionToken();
6057
+ S && p.headers.set(y, S);
6058
6058
  }
6059
6059
  return p;
6060
6060
  }
@@ -6064,17 +6064,17 @@ function ga(t, e, n, s, i) {
6064
6064
  function a(p) {
6065
6065
  return t.debug.log("Openreplay: capturing API request error", p), ma(p) && p.response ? r(p.response) : p instanceof Error && t.send(Et(p, [])), Promise.reject(p);
6066
6066
  }
6067
- function d(p) {
6067
+ function h(p) {
6068
6068
  t.debug.log("Openreplay: failed API request, skipping", p);
6069
6069
  }
6070
- const c = e.interceptors.request.use(o, d, {
6070
+ const c = e.interceptors.request.use(o, h, {
6071
6071
  synchronous: !0
6072
6072
  }), u = e.interceptors.response.use(l, a, {
6073
6073
  synchronous: !0
6074
6074
  });
6075
6075
  t.attachStopCallback(() => {
6076
- var p, v, S, y;
6077
- (v = (p = e.interceptors.request).eject) == null || v.call(p, c), (y = (S = e.interceptors.response).eject) == null || y.call(S, u);
6076
+ var p, y, S, v;
6077
+ (y = (p = e.interceptors.request).eject) == null || y.call(p, c), (v = (S = e.interceptors.response).eject) == null || v.call(S, u);
6078
6078
  });
6079
6079
  }
6080
6080
  function ma(t) {
@@ -6145,7 +6145,7 @@ const tt = (t, e) => {
6145
6145
  (t[0] === "{" || t[0] === "[") && (e = t);
6146
6146
  const n = t.split("&");
6147
6147
  n.length === 1 ? e = t : e = n.join(",");
6148
- } else if (ya(t)) {
6148
+ } else if (va(t)) {
6149
6149
  const n = [];
6150
6150
  for (const [s, i] of t)
6151
6151
  n.push(`${s}=${typeof i == "string" ? i : "[object Object]"}`);
@@ -6153,7 +6153,7 @@ const tt = (t, e) => {
6153
6153
  } else
6154
6154
  t instanceof Blob || t instanceof ReadableStream || t instanceof ArrayBuffer ? e = "byte data" : $n(t) ? e = t : e = `can't parse body ${typeof t}`;
6155
6155
  return e;
6156
- }, va = (t, e = {}) => {
6156
+ }, ya = (t, e = {}) => {
6157
6157
  $n(e) || (e = {});
6158
6158
  let n = t ? t.split("?") : [];
6159
6159
  if (n.shift(), n.length > 0) {
@@ -6172,7 +6172,7 @@ const tt = (t, e) => {
6172
6172
  function $n(t) {
6173
6173
  return t !== null && typeof t == "object";
6174
6174
  }
6175
- function ya(t) {
6175
+ function va(t) {
6176
6176
  return t == null || ArrayBuffer.isView(t) ? !1 : typeof Symbol < "u" && typeof t[Symbol.iterator] == "function";
6177
6177
  }
6178
6178
  function It(t) {
@@ -6230,11 +6230,11 @@ class Sa {
6230
6230
  typeof i != "string" && !(i != null && i.url) || (i instanceof URL || typeof i == "string" ? this.isServiceUrl(String(i)) : this.isServiceUrl(String(i.url))))
6231
6231
  return e.apply(window, s);
6232
6232
  const l = new Un(this.ignoredHeaders, this.setSessionTokenHeader, this.sanitize);
6233
- return this.beforeFetch(l, i, r), this.setSessionTokenHeader((a, d) => {
6233
+ return this.beforeFetch(l, i, r), this.setSessionTokenHeader((a, h) => {
6234
6234
  if (!(this.tokenUrlMatcher !== void 0 && !this.tokenUrlMatcher(l.url))) {
6235
6235
  if (s[1] === void 0 && s[0] instanceof Request)
6236
- return s[0].headers.append(a, d);
6237
- s[1] || (s[1] = {}), s[1].headers === void 0 && (s[1] = { ...s[1], headers: {} }), s[1].headers instanceof Headers ? s[1].headers.append(a, d) : Array.isArray(s[1].headers) ? s[1].headers.push([a, d]) : s[1].headers[a] = d;
6236
+ return s[0].headers.append(a, h);
6237
+ s[1] || (s[1] = {}), s[1].headers === void 0 && (s[1] = { ...s[1], headers: {} }), s[1].headers instanceof Headers ? s[1].headers.append(a, h) : Array.isArray(s[1].headers) ? s[1].headers.push([a, h]) : s[1].headers[a] = h;
6238
6238
  }
6239
6239
  }), e.apply(window, s).then(this.afterFetch(l)).catch((a) => {
6240
6240
  throw l.endTime = performance.now(), l.duration = l.endTime - (l.startTime || l.endTime), a;
@@ -6341,7 +6341,7 @@ class ka {
6341
6341
  return (...s) => {
6342
6342
  var o, l;
6343
6343
  const i = s[0], r = s[1];
6344
- return this.item.method = i ? i.toUpperCase() : "GET", this.item.url = ((o = r.toString) == null ? void 0 : o.call(r)) || "", this.item.name = ((l = this.item.url) == null ? void 0 : l.replace(new RegExp("/*$"), "").split("/").pop()) ?? "", this.item.getData = va(this.item.url, {}), n.apply(e, s);
6344
+ return this.item.method = i ? i.toUpperCase() : "GET", this.item.url = ((o = r.toString) == null ? void 0 : o.call(r)) || "", this.item.name = ((l = this.item.url) == null ? void 0 : l.replace(new RegExp("/*$"), "").split("/").pop()) ?? "", this.item.getData = ya(this.item.url, {}), n.apply(e, s);
6345
6345
  };
6346
6346
  }
6347
6347
  getSend(e) {
@@ -6431,8 +6431,8 @@ class Ia {
6431
6431
  o.requestData = Hn(r), o.startTime || (o.startTime = performance.now());
6432
6432
  const a = e.apply(n, s);
6433
6433
  a ? (o.endTime = performance.now(), o.duration = o.endTime - (o.startTime || o.endTime), o.status = 0, o.statusText = "Sent", o.readyState = 4) : (o.status = 500, o.statusText = "Unknown");
6434
- const d = o.getMessage();
6435
- return d && this.sendMessage(d), a;
6434
+ const h = o.getMessage();
6435
+ return h && this.sendMessage(h), a;
6436
6436
  }
6437
6437
  }
6438
6438
  class Ge {
@@ -6497,7 +6497,7 @@ function _a(t, e = {}) {
6497
6497
  }
6498
6498
  return JSON.stringify(c);
6499
6499
  }
6500
- const d = (c) => {
6500
+ const h = (c) => {
6501
6501
  if (n.useProxy)
6502
6502
  return Ca(c, n.ignoreHeaders, o, l, (D) => t.send(D), (D) => t.isServiceURL(D), n.tokenUrlMatcher);
6503
6503
  const u = c.fetch.bind(c), p = (D, k = {}) => {
@@ -6541,7 +6541,7 @@ function _a(t, e = {}) {
6541
6541
  });
6542
6542
  };
6543
6543
  c.fetch = p;
6544
- const v = c.XMLHttpRequest.prototype.open, S = c.XMLHttpRequest.prototype.setRequestHeader, y = c.XMLHttpRequest.prototype.send;
6544
+ const y = c.XMLHttpRequest.prototype.open, S = c.XMLHttpRequest.prototype.setRequestHeader, v = c.XMLHttpRequest.prototype.send;
6545
6545
  function T(D, k) {
6546
6546
  const N = this;
6547
6547
  o((L, I) => N.setRequestHeader(L, I));
@@ -6569,11 +6569,11 @@ function _a(t, e = {}) {
6569
6569
  }
6570
6570
  });
6571
6571
  F && t.send(xt("xhr", C, String(F.url), a(F.request), a(F.response), N.status, O + Ve(), P, 0));
6572
- })), v.apply(this, arguments);
6572
+ })), y.apply(this, arguments);
6573
6573
  }
6574
6574
  function A(D) {
6575
6575
  const k = un(this);
6576
- return k.body = D, y.apply(this, arguments);
6576
+ return k.body = D, v.apply(this, arguments);
6577
6577
  }
6578
6578
  function B(D, k) {
6579
6579
  if (!i(D)) {
@@ -6584,18 +6584,18 @@ function _a(t, e = {}) {
6584
6584
  }
6585
6585
  n.axiosInstances || (c.XMLHttpRequest.prototype.open = T, c.XMLHttpRequest.prototype.send = A, c.XMLHttpRequest.prototype.setRequestHeader = B);
6586
6586
  };
6587
- d(window), n.axiosInstances && n.axiosInstances.forEach((c) => {
6587
+ h(window), n.axiosInstances && n.axiosInstances.forEach((c) => {
6588
6588
  ga(t, c, n, l, a);
6589
- }), n.captureInIframes && t.observer.attachContextCallback(t.safe(d));
6589
+ }), n.captureInIframes && t.observer.attachContextCallback(t.safe(h));
6590
6590
  }
6591
6591
  function Na(t) {
6592
6592
  t.attachEventListener(document, "selectionchange", () => {
6593
6593
  const e = document.getSelection();
6594
6594
  if (e !== null && !e.isCollapsed) {
6595
6595
  const n = t.nodes.getID(e.anchorNode), s = t.nodes.getID(e.focusNode), i = e.toString().replace(/\s+/g, " ");
6596
- n && s && t.send(hs(n, s, i));
6596
+ n && s && t.send(ds(n, s, i));
6597
6597
  } else
6598
- t.send(hs(-1, -1, ""));
6598
+ t.send(ds(-1, -1, ""));
6599
6599
  });
6600
6600
  }
6601
6601
  function Oa(t) {
@@ -6621,23 +6621,23 @@ class Aa {
6621
6621
  constructor(e) {
6622
6622
  var l;
6623
6623
  if (this.options = e, this.app = null, this.crossdomainMode = !1, this.checkDoNotTrack = () => this.options.respectDoNotTrack && (navigator.doNotTrack == "1" || // @ts-ignore
6624
- window.doNotTrack == "1"), this.signalStartIssue = (a, d) => {
6624
+ window.doNotTrack == "1"), this.signalStartIssue = (a, h) => {
6625
6625
  const c = this.checkDoNotTrack(), u = new XMLHttpRequest(), p = this.options.ingestPoint || mi;
6626
6626
  u.open("POST", p + "/v1/web/not-started"), u.send(JSON.stringify({
6627
6627
  trackerVersion: "14.0.4",
6628
6628
  projectKey: this.options.projectKey,
6629
6629
  doNotTrack: c,
6630
- reason: d.length ? `missing api: ${d.join(",")}` : a
6630
+ reason: h.length ? `missing api: ${h.join(",")}` : a
6631
6631
  }));
6632
6632
  }, this.restartCanvasTracking = () => {
6633
6633
  this.app !== null && this.app.restartCanvasTracking();
6634
- }, this.handleError = (a, d = {}) => {
6634
+ }, this.handleError = (a, h = {}) => {
6635
6635
  if (this.app !== null) {
6636
6636
  if (a instanceof Error) {
6637
- const c = Et(a, [], d);
6637
+ const c = Et(a, [], h);
6638
6638
  this.app.send(c);
6639
6639
  } else if (a instanceof ErrorEvent || "PromiseRejectionEvent" in window && a instanceof PromiseRejectionEvent) {
6640
- const c = yi(a, void 0, d);
6640
+ const c = vi(a, void 0, h);
6641
6641
  c != null && this.app.send(c);
6642
6642
  }
6643
6643
  }
@@ -6685,12 +6685,12 @@ class Aa {
6685
6685
  return;
6686
6686
  }
6687
6687
  const r = new No(e.projectKey, e.sessionToken, e, this.signalStartIssue, this.crossdomainMode);
6688
- this.app = r, this.crossdomainMode || (la(r), Oo(r), Hr(r, e), Oa(r)), ia(r, e.mouse), ca(r, this.crossdomainMode), ua(r), ha(r), Lo(r, e), Bo(r, e), Uo(r), Go(r, e), aa(r, e), fa(r), pa(r), _a(r, e.network), Na(r), window.__OPENREPLAY__ = this, e.flags && e.flags.onFlagsLoad && this.onFlagsLoad(e.flags.onFlagsLoad);
6688
+ this.app = r, this.crossdomainMode || (la(r), Oo(r), Hr(r, e), Oa(r)), ia(r, e.mouse), ca(r, this.crossdomainMode), ua(r), da(r), Lo(r, e), Bo(r, e), Uo(r), Go(r, e), aa(r, e), fa(r), pa(r), _a(r, e.network), Na(r), window.__OPENREPLAY__ = this, e.flags && e.flags.onFlagsLoad && this.onFlagsLoad(e.flags.onFlagsLoad);
6689
6689
  const o = window.open;
6690
6690
  (e.autoResetOnWindowOpen || e.resetTabOnWindowOpen) && (r.attachStartCallback(() => {
6691
- const a = r.getTabId(), d = r.sessionStorage ?? window.sessionStorage;
6691
+ const a = r.getTabId(), h = r.sessionStorage ?? window.sessionStorage;
6692
6692
  window.open = function(...c) {
6693
- return e.autoResetOnWindowOpen && r.resetNextPageSession(!0), e.resetTabOnWindowOpen && d.removeItem(e.session_tabid_key || "__openreplay_tabid"), r.resetNextPageSession(!1), d.setItem(e.session_tabid_key || "__openreplay_tabid", a), o.call(window, ...c);
6693
+ return e.autoResetOnWindowOpen && r.resetNextPageSession(!0), e.resetTabOnWindowOpen && h.removeItem(e.session_tabid_key || "__openreplay_tabid"), r.resetNextPageSession(!1), h.setItem(e.session_tabid_key || "__openreplay_tabid", a), o.call(window, ...c);
6694
6694
  };
6695
6695
  }), r.attachStopCallback(() => {
6696
6696
  window.open = o;
@@ -7798,6 +7798,51 @@ class Ma {
7798
7798
  headerOccasion: "Anlass",
7799
7799
  headerOr: "oder"
7800
7800
  },
7801
+ ukr: {
7802
+ lang: "ukr",
7803
+ welcomeMessage: "Що ви збираєтесь їсти? Опишіть свою страву, і я порекомендую вам ідеальне вино.",
7804
+ noResultsFound: "Результатів не знайдено.",
7805
+ somethingWentWrong: "Вибачте, щось пішло не так.",
7806
+ chatButton1: "Знайти ідеальне поєднання",
7807
+ chatButton2: "Підібрати вино",
7808
+ chatButton3: "Отримати пораду",
7809
+ chatTitle: "Сомельє-помічник 🍷",
7810
+ chatSubtitle: "Опишіть свою страву і отримайте рекомендацію за 30 секунд",
7811
+ inputPlaceholder: "наприклад, Тунець із салатом",
7812
+ sendButton: "Підібрати",
7813
+ poweredBy: "Розроблено на основі",
7814
+ price: "Ціна",
7815
+ region: "Регіон",
7816
+ type: "Тип",
7817
+ reason: "Рекомендація",
7818
+ moreInfo: "Докладніше",
7819
+ winePairingIntro: "До цього вина підходять такі страви:",
7820
+ askForDinner: "Що ви хочете на вечерю?",
7821
+ clearChatButton: "Очистити чат",
7822
+ widgetTitle: "ЗНАЙДІТЬ ІДЕАЛЬНЕ ВИНО",
7823
+ widgetSubtitle: "Поділіться тим, що у вас на думці—їжа, настрій, бюджет чи подія—і наш AI-сомельє порекомендує вам ідеальне вино за секунди",
7824
+ searchPlaceholder: "Введіть ключове слово або опис",
7825
+ wineDetails: {
7826
+ reason: "Причина",
7827
+ price: "Ціна",
7828
+ region: "Регіон",
7829
+ type: "Тип",
7830
+ moreInfo: "Докладніше",
7831
+ sommSelection: "Вибір сомельє",
7832
+ code: "Код",
7833
+ buy: "Купити"
7834
+ },
7835
+ searchButton: "Пошук",
7836
+ priceRange: "Діапазон цін",
7837
+ wineColor: "Колір вина",
7838
+ intensity: "Інтенсивність",
7839
+ red: "Червоне",
7840
+ white: "Біле",
7841
+ rose: "Рожеве",
7842
+ light: "Легке",
7843
+ medium: "Середнє",
7844
+ full: "Повне"
7845
+ },
7801
7846
  ru: {
7802
7847
  lang: "ru",
7803
7848
  welcomeMessage: "Что вы планируете поесть? Напишите ваше блюдо, и я подберу идеальное вино к нему.",
@@ -8082,7 +8127,7 @@ class Pa {
8082
8127
  (i.type || i.Type) && o.push(i.type || i.Type), (i.country || i.Country) && o.push(i.country || i.Country), (i.region || i.Region) && o.push(i.region || i.Region), (i.grape || i.Grape) && o.push(i.grape || i.Grape);
8083
8128
  const l = [];
8084
8129
  (i.type || i.Type) && l.push(i.type || i.Type), (i.country || i.Country) && l.push(i.country || i.Country), (i.region || i.Region) && l.push(i.region || i.Region), (i.grape || i.Grape) && l.push(i.grape || i.Grape);
8085
- const a = l.slice(0, 3).join(" • "), d = l.slice(3).join(" • "), c = `
8130
+ const a = l.slice(0, 3).join(" • "), h = l.slice(3).join(" • "), c = `
8086
8131
  <div class="wine-recommendation-tile ${i.isSommSelection ? "somm-selection" : ""}">
8087
8132
  ${i.isSommSelection ? `<div class="somm-selection-badge">
8088
8133
  ${$.translate("wineDetails.sommSelection")}
@@ -8107,7 +8152,7 @@ class Pa {
8107
8152
 
8108
8153
  <!-- Параметры через точки -->
8109
8154
  ${a ? `<div class="wine-params">${a}</div>` : ""}
8110
- ${d ? `<div class="wine-params">${d}</div>` : ""}
8155
+ ${h ? `<div class="wine-params">${h}</div>` : ""}
8111
8156
 
8112
8157
  <!-- Кнопка Buy, видна только при наведении -->
8113
8158
  <div class="bottom-row">
@@ -8179,9 +8224,9 @@ class Pa {
8179
8224
  document.querySelectorAll(".dish-tile.selected").forEach((u) => {
8180
8225
  l.push(u.dataset.dish);
8181
8226
  });
8182
- const a = r.value.trim(), d = [];
8183
- l.length > 0 && d.push(`Dishes: ${l.join(", ")}`), a && d.push(`Notes: ${a}`);
8184
- const c = d.join("; ");
8227
+ const a = r.value.trim(), h = [];
8228
+ l.length > 0 && h.push(`Dishes: ${l.join(", ")}`), a && h.push(`Notes: ${a}`);
8229
+ const c = h.join("; ");
8185
8230
  console.log("Final query =>", c);
8186
8231
  try {
8187
8232
  const u = await this.api.getWineRecommendationsSearch(c);
@@ -8270,8 +8315,8 @@ class Ba {
8270
8315
  `, l.querySelector("a").addEventListener("click", (c) => {
8271
8316
  c.preventDefault(), this.sendAnalytics(s.Title), window.open(s.Url, "_blank");
8272
8317
  }), r.appendChild(l);
8273
- const d = document.createElement("div");
8274
- d.className = "wine-description", d.innerHTML = s.Reason, i.appendChild(d), console.log(i), n.appendChild(i);
8318
+ const h = document.createElement("div");
8319
+ h.className = "wine-description", h.innerHTML = s.Reason, i.appendChild(h), console.log(i), n.appendChild(i);
8275
8320
  }), n.scrollTop = n.scrollHeight;
8276
8321
  }
8277
8322
  }
@@ -8293,7 +8338,7 @@ function Ha(t) {
8293
8338
  gt = t;
8294
8339
  }
8295
8340
  new At();
8296
- const dt = {
8341
+ const ht = {
8297
8342
  PRODUCT_PAGES: /producto\/[^\/]+\/$/
8298
8343
  // Matches any product page like 'producto/any-product-name/'
8299
8344
  // CART_PAGE: /carrito\/$/ // Matches the cart page like 'carrito/'
@@ -8310,8 +8355,8 @@ const $a = {
8310
8355
  };
8311
8356
  var Hs, $s;
8312
8357
  const qa = {
8313
- PRODUCT_PAGES: ((Hs = window.wineaterData) == null ? void 0 : Hs.PRODUCT_PAGES) || dt.PRODUCT_PAGES,
8314
- CART_PAGE: (($s = window.wineaterData) == null ? void 0 : $s.CART_PAGE) || (dt == null ? void 0 : dt.CART_PAGE)
8358
+ PRODUCT_PAGES: ((Hs = window.wineaterData) == null ? void 0 : Hs.PRODUCT_PAGES) || ht.PRODUCT_PAGES,
8359
+ CART_PAGE: (($s = window.wineaterData) == null ? void 0 : $s.CART_PAGE) || (ht == null ? void 0 : ht.CART_PAGE)
8315
8360
  };
8316
8361
  async function Wa() {
8317
8362
  const t = window.location.href;