wineater-bot 3.0.20 → 3.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/wineater-chatbot.mjs +116 -115
- package/dist/wineater-chatbot.umd.js +17 -17
- package/index.html +1 -1
- package/package.json +1 -1
- package/src/js/widget.js +9 -5
|
@@ -702,10 +702,10 @@ function $s() {
|
|
|
702
702
|
function Ri(t) {
|
|
703
703
|
st("Message Sent", { distinct_id: oe("uniqueUserID"), message_content: t, client: oe("chatbotToken") });
|
|
704
704
|
}
|
|
705
|
-
function
|
|
705
|
+
function Fi(t) {
|
|
706
706
|
st("Products Got", { distinct_id: oe("uniqueUserID"), products: t, client: oe("chatbotToken") });
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function Ai(t) {
|
|
709
709
|
st("Product Clicked", { distinct_id: oe("uniqueUserID"), product_id: t, client: oe("chatbotToken") });
|
|
710
710
|
}
|
|
711
711
|
var We = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
@@ -908,7 +908,7 @@ var pn = { exports: {} };
|
|
|
908
908
|
(function(b) {
|
|
909
909
|
b.NONE = "NONE", b.DEFAULT_FLAGS = "DEFAULT_FLAGS", b.CACHE = "CACHE", b.SERVER = "SERVER";
|
|
910
910
|
})(c || (c = {}));
|
|
911
|
-
var E,
|
|
911
|
+
var E, F = null, P = "BULLET_TRAIN_DB", A = "BULLET_TRAIN_EVENT", k = "https://edge.api.flagsmith.com/api/v1/", N = "flagsmith_value_", O = "flagsmith_enabled_", D = "flagsmith_trait_", I = function() {
|
|
912
912
|
function b(f) {
|
|
913
913
|
var d = this;
|
|
914
914
|
this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
|
|
@@ -1058,24 +1058,24 @@ var pn = { exports: {} };
|
|
|
1058
1058
|
}, this._onChange = function(m, g, w) {
|
|
1059
1059
|
var x, R;
|
|
1060
1060
|
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);
|
|
1061
|
-
}, u = f.fetch ? f.fetch : typeof fetch < "u" ? fetch : We == null ? void 0 : We.fetch, this.canUseStorage = typeof window < "u" || !!f.browserlessStorage, this.log("Constructing flagsmith instance " + f), f.eventSource && (E = f.eventSource), f.AsyncStorage && (
|
|
1061
|
+
}, u = f.fetch ? f.fetch : typeof fetch < "u" ? fetch : We == null ? void 0 : We.fetch, this.canUseStorage = typeof window < "u" || !!f.browserlessStorage, this.log("Constructing flagsmith instance " + f), f.eventSource && (E = f.eventSource), f.AsyncStorage && (F = f.AsyncStorage);
|
|
1062
1062
|
}
|
|
1063
1063
|
return b.prototype.init = function(f) {
|
|
1064
1064
|
var d, m, g;
|
|
1065
1065
|
return r(this, void 0, void 0, function() {
|
|
1066
|
-
var w, x, R, M, H, _, W, ee, ae, te, ne, ce, le, me, Ke, Je, Le, se, J,
|
|
1066
|
+
var w, x, R, M, H, _, W, ee, ae, te, ne, ce, le, me, Ke, Je, Le, se, J, At, Xe, Wn, Ye, Dt, qn, Vn, Lt, Gn, Mt, Qe, Me, Kn, ie = this;
|
|
1067
1067
|
return o(this, function(pe) {
|
|
1068
1068
|
switch (pe.label) {
|
|
1069
1069
|
case 0:
|
|
1070
1070
|
w = v(f.evaluationContext || this.evaluationContext), pe.label = 1;
|
|
1071
1071
|
case 1:
|
|
1072
|
-
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, Je = f.realtime, Le = f.eventSourceUrl, se = Le === void 0 ? "https://realtime.flagsmith.com/" : Le, J = f.AsyncStorage,
|
|
1072
|
+
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, Je = f.realtime, Le = f.eventSourceUrl, se = Le === void 0 ? "https://realtime.flagsmith.com/" : Le, J = f.AsyncStorage, At = f.identity, Xe = f.traits, Wn = f.state, Ye = f.cacheOptions, Dt = f.angularHttpClient, qn = f._trigger, Vn = f._triggerLoadingState, w.environment = x ? { apiKey: x } : w.environment, !w.environment || !w.environment.apiKey)
|
|
1073
1073
|
throw new Error("Please provide `evaluationContext.environment` with non-empty `apiKey`");
|
|
1074
|
-
if (w.identity =
|
|
1074
|
+
if (w.identity = At || Xe ? { identifier: At, traits: Xe ? Object.fromEntries(Object.entries(Xe).map(function(he) {
|
|
1075
1075
|
return [he[0], { value: he[1] }];
|
|
1076
1076
|
})) : {} } : w.identity, this.evaluationContext = w, this.api = M, this.headers = H, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = _, Lt = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = qn || this._trigger, this._triggerLoadingState = Vn || this._triggerLoadingState, this.onError = function(he) {
|
|
1077
1077
|
ie.setLoadingState(i(i({}, ie.loadingState), { isFetching: !1, isLoading: !1, error: he })), ae == null || ae(he);
|
|
1078
|
-
}, 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 =
|
|
1078
|
+
}, 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 = F !== void 0 && !!W, J && (F = J), Je && 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), Dt && (u = /* @__PURE__ */ function(he) {
|
|
1079
1079
|
return function(be, ye) {
|
|
1080
1080
|
var Te = ye.headers, Y = ye.method, Be = ye.body;
|
|
1081
1081
|
return new Promise(function(Re) {
|
|
@@ -1096,14 +1096,14 @@ var pn = { exports: {} };
|
|
|
1096
1096
|
}
|
|
1097
1097
|
});
|
|
1098
1098
|
};
|
|
1099
|
-
}(Dt)),
|
|
1099
|
+
}(Dt)), F && this.canUseStorage && F.getItem(A).then(function(he) {
|
|
1100
1100
|
try {
|
|
1101
1101
|
ie.evaluationEvent = JSON.parse(he) || {};
|
|
1102
1102
|
} catch {
|
|
1103
1103
|
ie.evaluationEvent = {};
|
|
1104
1104
|
}
|
|
1105
1105
|
ie.analyticsInterval = setInterval(ie.analyticsFlags, ie.ticks);
|
|
1106
|
-
}), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval),
|
|
1106
|
+
}), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), F && this.canUseStorage && F.getItem(A, function(he, be) {
|
|
1107
1107
|
if (be && ie.evaluationContext.environment) {
|
|
1108
1108
|
var ye = JSON.parse(be);
|
|
1109
1109
|
if (ye[ie.evaluationContext.environment.apiKey]) {
|
|
@@ -1113,7 +1113,7 @@ var pn = { exports: {} };
|
|
|
1113
1113
|
}
|
|
1114
1114
|
})), !W)
|
|
1115
1115
|
return [3, 9];
|
|
1116
|
-
if (!
|
|
1116
|
+
if (!F || !this.canUseStorage)
|
|
1117
1117
|
return [3, 8];
|
|
1118
1118
|
Gn = function(he, be) {
|
|
1119
1119
|
return r(ie, void 0, void 0, function() {
|
|
@@ -1156,9 +1156,9 @@ var pn = { exports: {} };
|
|
|
1156
1156
|
});
|
|
1157
1157
|
}, pe.label = 2;
|
|
1158
1158
|
case 2:
|
|
1159
|
-
return pe.trys.push([2, 7, , 8]),
|
|
1159
|
+
return pe.trys.push([2, 7, , 8]), F.getItemSync ? (Mt = F.getItemSync(P), [3, 5]) : [3, 3];
|
|
1160
1160
|
case 3:
|
|
1161
|
-
return [4,
|
|
1161
|
+
return [4, F.getItem(P)];
|
|
1162
1162
|
case 4:
|
|
1163
1163
|
Mt = pe.sent(), pe.label = 5;
|
|
1164
1164
|
case 5:
|
|
@@ -1214,12 +1214,12 @@ var pn = { exports: {} };
|
|
|
1214
1214
|
if (this.cacheFlags) {
|
|
1215
1215
|
this.ts = (/* @__PURE__ */ new Date()).valueOf();
|
|
1216
1216
|
var f = JSON.stringify(this.getState());
|
|
1217
|
-
this.log("Setting storage", f),
|
|
1217
|
+
this.log("Setting storage", f), F.setItem(P, f);
|
|
1218
1218
|
}
|
|
1219
1219
|
}, b.prototype.updateEventStorage = function() {
|
|
1220
1220
|
if (this.enableAnalytics) {
|
|
1221
1221
|
var f = JSON.stringify(this.getState().evaluationEvent);
|
|
1222
|
-
|
|
1222
|
+
F.setItem(A, f);
|
|
1223
1223
|
}
|
|
1224
1224
|
}, b.prototype.setLoadingState = function(f) {
|
|
1225
1225
|
var d;
|
|
@@ -1536,7 +1536,7 @@ for (var X = 280; X < 288; ++X)
|
|
|
1536
1536
|
var nt = new fe(32);
|
|
1537
1537
|
for (var X = 0; X < 32; ++X)
|
|
1538
1538
|
nt[X] = 5;
|
|
1539
|
-
var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0),
|
|
1539
|
+
var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0), Fn = function(t) {
|
|
1540
1540
|
return (t + 7) / 8 | 0;
|
|
1541
1541
|
}, Js = function(t, e, n) {
|
|
1542
1542
|
return (e == null || e < 0) && (e = 0), (n == null || n > t.length) && (n = t.length), new fe(t.subarray(e, n));
|
|
@@ -1589,19 +1589,19 @@ var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0), An = f
|
|
|
1589
1589
|
r[s].s > p && (p = r[s].s);
|
|
1590
1590
|
var y = new re(p + 1), S = vt(n[c - 1], y, 0);
|
|
1591
1591
|
if (S > e) {
|
|
1592
|
-
var s = 0, v = 0, E = S - e,
|
|
1592
|
+
var s = 0, v = 0, E = S - e, F = 1 << E;
|
|
1593
1593
|
for (r.sort(function(O, D) {
|
|
1594
1594
|
return y[D.s] - y[O.s] || O.f - D.f;
|
|
1595
1595
|
}); s < i; ++s) {
|
|
1596
1596
|
var P = r[s].s;
|
|
1597
1597
|
if (y[P] > e)
|
|
1598
|
-
v +=
|
|
1598
|
+
v += F - (1 << S - y[P]), y[P] = e;
|
|
1599
1599
|
else
|
|
1600
1600
|
break;
|
|
1601
1601
|
}
|
|
1602
1602
|
for (v >>= E; v > 0; ) {
|
|
1603
|
-
var
|
|
1604
|
-
y[
|
|
1603
|
+
var A = r[s].s;
|
|
1604
|
+
y[A] < e ? v -= 1 << e - y[A]++ - 1 : ++s;
|
|
1605
1605
|
}
|
|
1606
1606
|
for (; s >= 0 && v; --s) {
|
|
1607
1607
|
var k = r[s].s;
|
|
@@ -1639,15 +1639,15 @@ var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0), An = f
|
|
|
1639
1639
|
for (var n = 0, s = 0; s < e.length; ++s)
|
|
1640
1640
|
n += t[s] * e[s];
|
|
1641
1641
|
return n;
|
|
1642
|
-
},
|
|
1643
|
-
var s = n.length, i =
|
|
1642
|
+
}, An = function(t, e, n) {
|
|
1643
|
+
var s = n.length, i = Fn(e + 2);
|
|
1644
1644
|
t[i] = s & 255, t[i + 1] = s >> 8, t[i + 2] = t[i] ^ 255, t[i + 3] = t[i + 1] ^ 255;
|
|
1645
1645
|
for (var r = 0; r < s; ++r)
|
|
1646
1646
|
t[i + r + 4] = n[r];
|
|
1647
1647
|
return (i + 4 + s) * 8;
|
|
1648
1648
|
}, yn = function(t, e, n, s, i, r, o, l, a, h, c) {
|
|
1649
1649
|
ve(e, c++, n), ++i[256];
|
|
1650
|
-
for (var u = dt(i, 15), p = u.t, y = u.l, S = dt(r, 15), v = S.t, E = S.l,
|
|
1650
|
+
for (var u = dt(i, 15), p = u.t, y = u.l, S = dt(r, 15), v = S.t, E = S.l, F = bn(p), P = F.c, A = F.n, k = bn(v), N = k.c, O = k.n, D = new re(19), I = 0; I < P.length; ++I)
|
|
1651
1651
|
++D[P[I] & 31];
|
|
1652
1652
|
for (var I = 0; I < N.length; ++I)
|
|
1653
1653
|
++D[N[I] & 31];
|
|
@@ -1655,12 +1655,12 @@ var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0), An = f
|
|
|
1655
1655
|
;
|
|
1656
1656
|
var $ = h + 5 << 3, C = He(i, Oe) + He(r, nt) + o, L = He(i, p) + He(r, v) + o + 14 + 3 * j + He(D, B) + 2 * D[16] + 3 * D[17] + 7 * D[18];
|
|
1657
1657
|
if (a >= 0 && $ <= C && $ <= L)
|
|
1658
|
-
return
|
|
1658
|
+
return An(e, c, t.subarray(a, a + h));
|
|
1659
1659
|
var V, K, U, b;
|
|
1660
1660
|
if (ve(e, c, 1 + (L < C)), c += 2, L < C) {
|
|
1661
1661
|
V = qe(p, y, 0), K = p, U = qe(v, E, 0), b = v;
|
|
1662
1662
|
var f = qe(B, G, 0);
|
|
1663
|
-
ve(e, c,
|
|
1663
|
+
ve(e, c, A - 257), ve(e, c + 5, O - 1), ve(e, c + 10, j - 4), c += 14;
|
|
1664
1664
|
for (var I = 0; I < j; ++I)
|
|
1665
1665
|
ve(e, c + 3 * I, B[gn[I]]);
|
|
1666
1666
|
c += 3 * j;
|
|
@@ -1686,10 +1686,10 @@ var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0), An = f
|
|
|
1686
1686
|
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;
|
|
1687
1687
|
if (e) {
|
|
1688
1688
|
c && (a[0] = r.r >> 3);
|
|
1689
|
-
for (var u = Ys[e - 1], p = u >> 13, y = u & 8191, S = (1 << n) - 1, v = r.p || new re(32768), E = r.h || new re(S + 1),
|
|
1690
|
-
return (t[ne] ^ t[ne + 1] <<
|
|
1689
|
+
for (var u = Ys[e - 1], p = u >> 13, y = u & 8191, S = (1 << n) - 1, v = r.p || new re(32768), E = r.h || new re(S + 1), F = Math.ceil(n / 3), P = 2 * F, A = function(ne) {
|
|
1690
|
+
return (t[ne] ^ t[ne + 1] << F ^ t[ne + 2] << P) & S;
|
|
1691
1691
|
}, k = new Ct(25e3), N = new re(288), O = new re(32), D = 0, I = 0, T = r.i || 0, B = 0, G = r.w || 0, j = 0; T + 2 < o; ++T) {
|
|
1692
|
-
var $ =
|
|
1692
|
+
var $ = A(T), C = T & 32767, L = E[$];
|
|
1693
1693
|
if (v[C] = L, E[$] = C, G <= T) {
|
|
1694
1694
|
var V = o - T;
|
|
1695
1695
|
if ((D > 7e3 || B > 24576) && (V > 423 || !h)) {
|
|
@@ -1700,7 +1700,7 @@ var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0), An = f
|
|
|
1700
1700
|
O[K] = 0;
|
|
1701
1701
|
}
|
|
1702
1702
|
var U = 2, b = 0, f = y, d = C - L & 32767;
|
|
1703
|
-
if (V > 2 && $ ==
|
|
1703
|
+
if (V > 2 && $ == A(T - d))
|
|
1704
1704
|
for (var m = Math.min(p, V) - 1, g = Math.min(32767, T), w = Math.min(258, V); d <= g && --f && C != L; ) {
|
|
1705
1705
|
if (t[T + U] == t[T + U - d]) {
|
|
1706
1706
|
for (var x = 0; x < w && t[T + x] == t[T + x - d]; ++x)
|
|
@@ -1730,11 +1730,11 @@ var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0), An = f
|
|
|
1730
1730
|
} else {
|
|
1731
1731
|
for (var T = r.w || 0; T < o + h; T += 65535) {
|
|
1732
1732
|
var te = T + 65535;
|
|
1733
|
-
te >= o && (a[c / 8 | 0] = h, te = o), c =
|
|
1733
|
+
te >= o && (a[c / 8 | 0] = h, te = o), c = An(a, c + 1, t.subarray(T, te));
|
|
1734
1734
|
}
|
|
1735
1735
|
r.i = o;
|
|
1736
1736
|
}
|
|
1737
|
-
return Js(l, 0, s +
|
|
1737
|
+
return Js(l, 0, s + Fn(c) + i);
|
|
1738
1738
|
}, Zs = /* @__PURE__ */ function() {
|
|
1739
1739
|
for (var t = new Int32Array(256), e = 0; e < 256; ++e) {
|
|
1740
1740
|
for (var n = e, s = 9; --s; )
|
|
@@ -1802,7 +1802,7 @@ var Gs = /* @__PURE__ */ qe(Oe, 9, 0), Ks = /* @__PURE__ */ qe(nt, 5, 0), An = f
|
|
|
1802
1802
|
var a = ji({}, it[n].e);
|
|
1803
1803
|
return Li(it[n].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", n, a, zi(a), s);
|
|
1804
1804
|
}, Hi = function() {
|
|
1805
|
-
return [fe, re, Ct, _t, Nt, gn, bt, mn, Gs, Oe, Ks, nt, yt, Ys, Dn, qe, ve, Ue, dt, vt, bn, He,
|
|
1805
|
+
return [fe, re, Ct, _t, Nt, gn, bt, mn, Gs, Oe, Ks, nt, yt, Ys, Dn, qe, ve, Ue, dt, vt, bn, He, An, yn, Fn, Js, Qs, Ln, qi, ti];
|
|
1806
1806
|
}, $i = function() {
|
|
1807
1807
|
return [ni, si, wt, ei, Zs];
|
|
1808
1808
|
}, ti = function(t) {
|
|
@@ -2340,7 +2340,7 @@ function li(t, e) {
|
|
|
2340
2340
|
}
|
|
2341
2341
|
return n;
|
|
2342
2342
|
}
|
|
2343
|
-
function
|
|
2343
|
+
function Fe(t) {
|
|
2344
2344
|
return [
|
|
2345
2345
|
0,
|
|
2346
2346
|
t
|
|
@@ -2613,7 +2613,7 @@ function hi(t, e) {
|
|
|
2613
2613
|
e
|
|
2614
2614
|
];
|
|
2615
2615
|
}
|
|
2616
|
-
function
|
|
2616
|
+
function Fr(t, e) {
|
|
2617
2617
|
return [
|
|
2618
2618
|
77,
|
|
2619
2619
|
t,
|
|
@@ -2643,7 +2643,7 @@ function xt(t, e, n, s, i, r, o, l, a) {
|
|
|
2643
2643
|
a
|
|
2644
2644
|
];
|
|
2645
2645
|
}
|
|
2646
|
-
function
|
|
2646
|
+
function Ar(t, e, n, s, i, r) {
|
|
2647
2647
|
return [
|
|
2648
2648
|
84,
|
|
2649
2649
|
t,
|
|
@@ -2706,7 +2706,7 @@ function ut(t) {
|
|
|
2706
2706
|
t
|
|
2707
2707
|
];
|
|
2708
2708
|
}
|
|
2709
|
-
function
|
|
2709
|
+
function Ae(t) {
|
|
2710
2710
|
return [
|
|
2711
2711
|
118,
|
|
2712
2712
|
t
|
|
@@ -3185,7 +3185,7 @@ class co {
|
|
|
3185
3185
|
}, this.signalTask = (u, p, y) => {
|
|
3186
3186
|
if (!u)
|
|
3187
3187
|
return console.error("User Testing: No Task ID Given");
|
|
3188
|
-
const S = this.durations.tasks.find((
|
|
3188
|
+
const S = this.durations.tasks.find((F) => F.taskId === u), v = this.getTimestamp(), E = S ? v - S.started : 0;
|
|
3189
3189
|
return fetch(`${this.ingestPoint}/v1/web/uxt/signals/task`, {
|
|
3190
3190
|
method: "POST",
|
|
3191
3191
|
headers: {
|
|
@@ -3351,7 +3351,7 @@ class lo {
|
|
|
3351
3351
|
S.append(p, y);
|
|
3352
3352
|
const v = z("div", "closePanelButton", ui, "Collapse Panel"), E = z("div", "nextButton", Qr, "Done, Next");
|
|
3353
3353
|
s.append(i, r), a.append(h, c), u.append(v, E), o.append(l, a, S, u), n.append(s, o);
|
|
3354
|
-
const
|
|
3354
|
+
const F = () => {
|
|
3355
3355
|
const k = e[this.currentTaskIndex];
|
|
3356
3356
|
h.textContent = k.title, c.textContent = k.description, k.allow_typing ? S.style.display = "flex" : S.style.display = "none";
|
|
3357
3357
|
};
|
|
@@ -3375,7 +3375,7 @@ class lo {
|
|
|
3375
3375
|
this.hideTaskSection = () => (r.textContent = "+", Object.assign(o.style, {
|
|
3376
3376
|
display: "none"
|
|
3377
3377
|
}), this.widgetTasksVisible = !1, !1), this.showTaskSection = () => (r.textContent = "-", Object.assign(o.style, je), this.widgetTasksVisible = !0, !0);
|
|
3378
|
-
const
|
|
3378
|
+
const A = () => {
|
|
3379
3379
|
const k = document.getElementById(`or_task_${this.currentTaskIndex}`);
|
|
3380
3380
|
k && Object.assign(k.style, ms);
|
|
3381
3381
|
for (let N = 0; N < this.currentTaskIndex; N++) {
|
|
@@ -3387,18 +3387,18 @@ class lo {
|
|
|
3387
3387
|
var N, O, D, I;
|
|
3388
3388
|
const k = e[this.currentTaskIndex].allow_typing ? y.value : void 0;
|
|
3389
3389
|
if (y.value = "", (N = this.signalManager) == null || N.signalTask(e[this.currentTaskIndex].task_id, "done", k), this.currentTaskIndex < e.length - 1) {
|
|
3390
|
-
this.currentTaskIndex++,
|
|
3390
|
+
this.currentTaskIndex++, F();
|
|
3391
3391
|
const T = (O = this.signalManager) == null ? void 0 : O.getDurations();
|
|
3392
3392
|
T && T.tasks.findIndex((B) => B.taskId === e[this.currentTaskIndex].task_id) === -1 && (T.tasks.push({
|
|
3393
3393
|
taskId: e[this.currentTaskIndex].task_id,
|
|
3394
3394
|
started: this.app.timestamp()
|
|
3395
|
-
}), (D = this.signalManager) == null || D.setDurations(T)), (I = this.signalManager) == null || I.signalTask(e[this.currentTaskIndex].task_id, "begin"),
|
|
3395
|
+
}), (D = this.signalManager) == null || D.setDurations(T)), (I = this.signalManager) == null || I.signalTask(e[this.currentTaskIndex].task_id, "begin"), A();
|
|
3396
3396
|
} else
|
|
3397
3397
|
this.showEndSection();
|
|
3398
3398
|
this.app.localStorage.setItem("or_uxt_task_index", this.currentTaskIndex.toString());
|
|
3399
3399
|
}, setTimeout(() => {
|
|
3400
3400
|
const k = document.getElementById("or_task_0");
|
|
3401
|
-
k && Object.assign(k.style, ms),
|
|
3401
|
+
k && Object.assign(k.style, ms), F(), A();
|
|
3402
3402
|
}, 1), n;
|
|
3403
3403
|
}
|
|
3404
3404
|
showEndSection() {
|
|
@@ -4209,17 +4209,17 @@ let Co = class {
|
|
|
4209
4209
|
const E = this.checkNodeId(y, p);
|
|
4210
4210
|
if (E) {
|
|
4211
4211
|
this.waitStarted().then(() => {
|
|
4212
|
-
var
|
|
4212
|
+
var A;
|
|
4213
4213
|
a++;
|
|
4214
|
-
const
|
|
4214
|
+
const F = this.session.getSessionToken(), P = {
|
|
4215
4215
|
line: de.iframeId,
|
|
4216
4216
|
context: this.contextId,
|
|
4217
4217
|
domain: p,
|
|
4218
4218
|
id: E,
|
|
4219
|
-
token:
|
|
4219
|
+
token: F,
|
|
4220
4220
|
frameOrderNumber: a
|
|
4221
4221
|
};
|
|
4222
|
-
this.debug.log("iframe_data", P), (
|
|
4222
|
+
this.debug.log("iframe_data", P), (A = c.source) == null || A.postMessage(P, "*");
|
|
4223
4223
|
}).catch(console.error), v = 10;
|
|
4224
4224
|
break;
|
|
4225
4225
|
}
|
|
@@ -4233,8 +4233,8 @@ let Co = class {
|
|
|
4233
4233
|
let v = S;
|
|
4234
4234
|
return this.pageFrames.forEach((E) => {
|
|
4235
4235
|
if (E.dataset.domain === c.data.domain) {
|
|
4236
|
-
const [
|
|
4237
|
-
v = [
|
|
4236
|
+
const [F, P, A] = S, { left: k, top: N } = E.getBoundingClientRect();
|
|
4237
|
+
v = [F, P + k, A + N];
|
|
4238
4238
|
}
|
|
4239
4239
|
}), v;
|
|
4240
4240
|
}
|
|
@@ -4242,11 +4242,11 @@ let Co = class {
|
|
|
4242
4242
|
let v = S;
|
|
4243
4243
|
return this.pageFrames.forEach((E) => {
|
|
4244
4244
|
if (E.dataset.domain === c.data.domain) {
|
|
4245
|
-
const [
|
|
4245
|
+
const [F, P, A, k, N, O, D] = S, { left: I, top: T, width: B, height: G } = E.getBoundingClientRect(), j = document.documentElement.scrollWidth, $ = document.documentElement.scrollHeight, C = O / 100 * B + I, L = D / 100 * G + T, V = C / j, K = L / $;
|
|
4246
4246
|
v = [
|
|
4247
|
-
A,
|
|
4248
|
-
P,
|
|
4249
4247
|
F,
|
|
4248
|
+
P,
|
|
4249
|
+
A,
|
|
4250
4250
|
k,
|
|
4251
4251
|
N,
|
|
4252
4252
|
Math.round(V * 1e3) / 10,
|
|
@@ -4356,7 +4356,7 @@ let Co = class {
|
|
|
4356
4356
|
* */
|
|
4357
4357
|
_nCommit() {
|
|
4358
4358
|
if (this.socketMode) {
|
|
4359
|
-
this.messages.unshift(
|
|
4359
|
+
this.messages.unshift(Ae(this.session.getTabId())), this.messages.unshift(Fe(this.timestamp())), this.commitCallbacks.forEach((e) => e(this.messages)), this.messages.length = 0;
|
|
4360
4360
|
return;
|
|
4361
4361
|
}
|
|
4362
4362
|
if (!(this.worker === void 0 || !this.messages.length)) {
|
|
@@ -4371,7 +4371,7 @@ let Co = class {
|
|
|
4371
4371
|
try {
|
|
4372
4372
|
or(() => {
|
|
4373
4373
|
var e;
|
|
4374
|
-
this.messages.unshift(
|
|
4374
|
+
this.messages.unshift(Ae(this.session.getTabId())), this.messages.unshift(Fe(this.timestamp())), (e = this.worker) == null || e.postMessage(this.messages), this.commitCallbacks.forEach((n) => n(this.messages)), this.messages.length = 0;
|
|
4375
4375
|
});
|
|
4376
4376
|
} catch (e) {
|
|
4377
4377
|
this._debug("worker_commit", e), this.stop(!0), setTimeout(() => {
|
|
@@ -4387,7 +4387,7 @@ let Co = class {
|
|
|
4387
4387
|
* but in turn we don't overload batch writer on session start with 1000 batches
|
|
4388
4388
|
* */
|
|
4389
4389
|
_cStartCommit() {
|
|
4390
|
-
this.coldStartCommitN += 1, this.coldStartCommitN === 2 && (this.bufferedMessages1.push(
|
|
4390
|
+
this.coldStartCommitN += 1, this.coldStartCommitN === 2 && (this.bufferedMessages1.push(Fe(this.timestamp())), this.bufferedMessages1.push(Ae(this.session.getTabId())), this.bufferedMessages2.push(Fe(this.timestamp())), this.bufferedMessages2.push(Ae(this.session.getTabId())), this.coldStartCommitN = 0);
|
|
4391
4391
|
}
|
|
4392
4392
|
commit() {
|
|
4393
4393
|
this.activityState === Q.ColdStart ? this._cStartCommit() : this._nCommit();
|
|
@@ -4508,7 +4508,7 @@ let Co = class {
|
|
|
4508
4508
|
const s = 1e3, i = this.checkSessionToken(e.forceNew);
|
|
4509
4509
|
n && await this.setupConditionalStart(e);
|
|
4510
4510
|
const r = () => {
|
|
4511
|
-
this.orderNumber += 1, en(), this.coldStartTs = ge(), this.orderNumber % 2 === 0 ? (this.bufferedMessages1.length = 0, this.bufferedMessages1.push(
|
|
4511
|
+
this.orderNumber += 1, en(), this.coldStartTs = ge(), this.orderNumber % 2 === 0 ? (this.bufferedMessages1.length = 0, this.bufferedMessages1.push(Fe(this.timestamp())), this.bufferedMessages1.push(Ae(this.session.getTabId()))) : (this.bufferedMessages2.length = 0, this.bufferedMessages2.push(Fe(this.timestamp())), this.bufferedMessages2.push(Ae(this.session.getTabId()))), this.stop(!1), this.activityState = Q.ColdStart, e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
|
|
4512
4512
|
userID: e.userID,
|
|
4513
4513
|
metadata: e.metadata
|
|
4514
4514
|
}), i || (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(ut(this.session.getTabId()))), this.observer.observe(), this.ticker.start();
|
|
@@ -4575,7 +4575,7 @@ let Co = class {
|
|
|
4575
4575
|
const o = JSON.parse(i);
|
|
4576
4576
|
this.bufferedMessages1 = Array.isArray(o) ? o : this.bufferedMessages1, this.localStorage.removeItem(an);
|
|
4577
4577
|
}
|
|
4578
|
-
this.bufferedMessages1.push(
|
|
4578
|
+
this.bufferedMessages1.push(Fe(this.timestamp())), this.bufferedMessages1.push(Ae(this.session.getTabId())), this.activityState = Q.ColdStart, e.sessionHash && this.session.applySessionHash(e.sessionHash), e.forceNew && this.session.reset(), this.session.assign({
|
|
4579
4579
|
userID: e.userID,
|
|
4580
4580
|
metadata: e.metadata
|
|
4581
4581
|
});
|
|
@@ -4730,9 +4730,9 @@ let Co = class {
|
|
|
4730
4730
|
// derived from token
|
|
4731
4731
|
startTimestamp: E,
|
|
4732
4732
|
// real startTS (server time), derived from sessionID
|
|
4733
|
-
userBrowser:
|
|
4733
|
+
userBrowser: F,
|
|
4734
4734
|
userCity: P,
|
|
4735
|
-
userCountry:
|
|
4735
|
+
userCountry: A,
|
|
4736
4736
|
userDevice: k,
|
|
4737
4737
|
userOS: N,
|
|
4738
4738
|
userState: O,
|
|
@@ -4746,9 +4746,9 @@ let Co = class {
|
|
|
4746
4746
|
return this.signalError(C, []), _e(C);
|
|
4747
4747
|
}
|
|
4748
4748
|
this.delay = S, this.session.setSessionToken(h), this.session.setUserInfo({
|
|
4749
|
-
userBrowser:
|
|
4749
|
+
userBrowser: F,
|
|
4750
4750
|
userCity: P,
|
|
4751
|
-
userCountry:
|
|
4751
|
+
userCountry: A,
|
|
4752
4752
|
userDevice: k,
|
|
4753
4753
|
userOS: N,
|
|
4754
4754
|
userState: O
|
|
@@ -4849,7 +4849,7 @@ let Co = class {
|
|
|
4849
4849
|
trackWs(e) {
|
|
4850
4850
|
const n = e;
|
|
4851
4851
|
return (s, i, r = "down") => {
|
|
4852
|
-
typeof s != "string" || typeof i != "string" || i.length > 5 * 1024 * 1024 || s.length > 255 || this.send(
|
|
4852
|
+
typeof s != "string" || typeof i != "string" || i.length > 5 * 1024 * 1024 || s.length > 255 || this.send(Ar("websocket", n, i, this.timestamp(), r, s));
|
|
4853
4853
|
};
|
|
4854
4854
|
}
|
|
4855
4855
|
stop(e = !0) {
|
|
@@ -4925,7 +4925,7 @@ function Ro(t) {
|
|
|
4925
4925
|
})), t.map(ks).join(" ");
|
|
4926
4926
|
}
|
|
4927
4927
|
const Es = ["log", "info", "warn", "error", "debug", "assert"];
|
|
4928
|
-
function
|
|
4928
|
+
function Fo(t, e) {
|
|
4929
4929
|
const n = Object.assign({
|
|
4930
4930
|
consoleMethods: Es,
|
|
4931
4931
|
consoleThrottling: 30
|
|
@@ -4956,7 +4956,7 @@ function Ao(t, e) {
|
|
|
4956
4956
|
l(window), t.observer.attachContextCallback(l);
|
|
4957
4957
|
}
|
|
4958
4958
|
var mi = { exports: {} }, ln = { exports: {} }, Ts;
|
|
4959
|
-
function
|
|
4959
|
+
function Ao() {
|
|
4960
4960
|
return Ts || (Ts = 1, function(t, e) {
|
|
4961
4961
|
(function(n, s) {
|
|
4962
4962
|
t.exports = s();
|
|
@@ -4999,15 +4999,15 @@ function Fo() {
|
|
|
4999
4999
|
throw new TypeError("Eval Origin must be an Object or StackFrame");
|
|
5000
5000
|
},
|
|
5001
5001
|
toString: function() {
|
|
5002
|
-
var v = this.getFileName() || "", E = this.getLineNumber() || "",
|
|
5003
|
-
return this.getIsEval() ? v ? "[eval] (" + v + ":" + E + ":" +
|
|
5002
|
+
var v = this.getFileName() || "", E = this.getLineNumber() || "", F = this.getColumnNumber() || "", P = this.getFunctionName() || "";
|
|
5003
|
+
return this.getIsEval() ? v ? "[eval] (" + v + ":" + E + ":" + F + ")" : "[eval]:" + E + ":" + F : P ? P + " (" + v + ":" + E + ":" + F + ")" : v + ":" + E + ":" + F;
|
|
5004
5004
|
}
|
|
5005
5005
|
}, u.fromString = function(E) {
|
|
5006
|
-
var
|
|
5006
|
+
var F = E.indexOf("("), P = E.lastIndexOf(")"), A = E.substring(0, F), k = E.substring(F + 1, P).split(","), N = E.substring(P + 1);
|
|
5007
5007
|
if (N.indexOf("@") === 0)
|
|
5008
5008
|
var O = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(N, ""), D = O[1], I = O[2], T = O[3];
|
|
5009
5009
|
return new u({
|
|
5010
|
-
functionName:
|
|
5010
|
+
functionName: A,
|
|
5011
5011
|
args: k || void 0,
|
|
5012
5012
|
fileName: D,
|
|
5013
5013
|
lineNumber: I || void 0,
|
|
@@ -5040,7 +5040,7 @@ function Fo() {
|
|
|
5040
5040
|
}
|
|
5041
5041
|
(function(t, e) {
|
|
5042
5042
|
(function(n, s) {
|
|
5043
|
-
t.exports = s(
|
|
5043
|
+
t.exports = s(Ao());
|
|
5044
5044
|
})(We, function(s) {
|
|
5045
5045
|
var i = /(^|@)\S+:\d+/, r = /^\s*at .*(\S+:\d+|\(native\))/m, o = /^(eval@)?(\[native code])?$/;
|
|
5046
5046
|
return {
|
|
@@ -5375,10 +5375,10 @@ function Wo(t, e) {
|
|
|
5375
5375
|
p = ge();
|
|
5376
5376
|
}, E = () => {
|
|
5377
5377
|
y === 0 && p !== 0 && (y = ge() - p);
|
|
5378
|
-
},
|
|
5378
|
+
}, F = () => {
|
|
5379
5379
|
p !== 0 && (S = ge() - p), h(u, c, y, S), y = 0, S = 0, p = 0;
|
|
5380
5380
|
};
|
|
5381
|
-
t.nodes.attachNodeListener(c, "focus", v), t.nodes.attachNodeListener(c, "input", E), t.nodes.attachNodeListener(c, "change",
|
|
5381
|
+
t.nodes.attachNodeListener(c, "focus", v), t.nodes.attachNodeListener(c, "input", E), t.nodes.attachNodeListener(c, "change", F);
|
|
5382
5382
|
return;
|
|
5383
5383
|
}
|
|
5384
5384
|
if (Ho(c)) {
|
|
@@ -5617,7 +5617,7 @@ function na(t, e) {
|
|
|
5617
5617
|
}
|
|
5618
5618
|
let i = -1, r = -1, o = !1, l = null, a = 0, h = {}, c = 0, u = 0, p = 0, y = 0, S;
|
|
5619
5619
|
const v = 8e-3, E = 225;
|
|
5620
|
-
function
|
|
5620
|
+
function F() {
|
|
5621
5621
|
const k = y / E;
|
|
5622
5622
|
if (!c) {
|
|
5623
5623
|
c = k;
|
|
@@ -5627,13 +5627,13 @@ function na(t, e) {
|
|
|
5627
5627
|
p > 4 && N > v && t.send(Lr(ge())), y = 0, p = 0, c = k;
|
|
5628
5628
|
}
|
|
5629
5629
|
t.attachStartCallback(() => {
|
|
5630
|
-
S = setInterval(() =>
|
|
5630
|
+
S = setInterval(() => F(), E);
|
|
5631
5631
|
}), t.attachStopCallback(() => {
|
|
5632
5632
|
i = -1, r = -1, o = !1, l = null, h = {}, S && clearInterval(S);
|
|
5633
5633
|
});
|
|
5634
5634
|
const P = () => {
|
|
5635
5635
|
o && (t.send(yr(i, r)), o = !1);
|
|
5636
|
-
},
|
|
5636
|
+
}, A = (k, N = !1) => {
|
|
5637
5637
|
function O(I, T, B) {
|
|
5638
5638
|
return h[I] = h[I] || ea(T, k, B);
|
|
5639
5639
|
}
|
|
@@ -5652,17 +5652,17 @@ function na(t, e) {
|
|
|
5652
5652
|
return;
|
|
5653
5653
|
const B = t.nodes.getID(T);
|
|
5654
5654
|
if (B !== void 0) {
|
|
5655
|
-
const G = I.pageX, j = I.pageY, $ = k.documentElement.scrollWidth, C = k.documentElement.scrollHeight, L =
|
|
5655
|
+
const G = I.pageX, j = I.pageY, $ = k.documentElement.scrollWidth, C = k.documentElement.scrollHeight, L = Fs(G / $), V = Fs(j / C);
|
|
5656
5656
|
P(), t.send(Rr(B, l === T ? Math.round(performance.now() - a) : 0, s(T), On(T) && !n ? O(B, T, e) : "", L, V), !0);
|
|
5657
5657
|
}
|
|
5658
5658
|
l = null;
|
|
5659
5659
|
});
|
|
5660
5660
|
};
|
|
5661
5661
|
t.nodes.attachNodeCallback((k) => {
|
|
5662
|
-
kt(k) &&
|
|
5663
|
-
}),
|
|
5662
|
+
kt(k) && A(k);
|
|
5663
|
+
}), A(document, !0), t.ticker.attach(P, (e == null ? void 0 : e.trackingOffset) || 7);
|
|
5664
5664
|
}
|
|
5665
|
-
function
|
|
5665
|
+
function Fs(t) {
|
|
5666
5666
|
return Math.round(t * 1e4);
|
|
5667
5667
|
}
|
|
5668
5668
|
function sa(t) {
|
|
@@ -5767,9 +5767,9 @@ function ra(t, e) {
|
|
|
5767
5767
|
domContentLoadedEventStart: S,
|
|
5768
5768
|
domContentLoadedEventEnd: v,
|
|
5769
5769
|
loadEventStart: E,
|
|
5770
|
-
loadEventEnd:
|
|
5770
|
+
loadEventEnd: F
|
|
5771
5771
|
} = performance.timing;
|
|
5772
|
-
t.send(wr(u - c || 0, p - c || 0, y - c || 0, S - c || 0, v - c || 0, E - c || 0,
|
|
5772
|
+
t.send(wr(u - c || 0, p - c || 0, y - c || 0, S - c || 0, v - c || 0, E - c || 0, F - c || 0, l, a));
|
|
5773
5773
|
}
|
|
5774
5774
|
}, 30);
|
|
5775
5775
|
}
|
|
@@ -5781,7 +5781,7 @@ function ra(t, e) {
|
|
|
5781
5781
|
const S = performance.now();
|
|
5782
5782
|
if (s !== null && (h = Math.max.apply(null, Object.keys(s).map((v) => s[v])), S - h > 1e3 && (p = sa(s), s = null)), u !== null && (S - u > 50 && (c = S), u = S - c > 5e3 ? null : S), p !== null && u === null || S > 3e4) {
|
|
5783
5783
|
y = !0, s = null;
|
|
5784
|
-
const v = p === null ? 0 : ia(a || l, p), { domContentLoadedEventEnd: E, navigationStart:
|
|
5784
|
+
const v = p === null ? 0 : ia(a || l, p), { domContentLoadedEventEnd: E, navigationStart: F } = performance.timing, P = u === null ? Math.max(c, a, E - F || 0) : 0;
|
|
5785
5785
|
t.send(Sr(v, a > h ? a : h, P));
|
|
5786
5786
|
}
|
|
5787
5787
|
});
|
|
@@ -5836,7 +5836,7 @@ function aa(t) {
|
|
|
5836
5836
|
e = null, i = Ge(), n = s = -1, o(), l(), a();
|
|
5837
5837
|
}), document.hidden !== void 0 && t.attachEventListener(document, "visibilitychange", a, !1, !1), t.ticker.attach(o, 1, !1), t.ticker.attach(l, 5, !1);
|
|
5838
5838
|
}
|
|
5839
|
-
function
|
|
5839
|
+
function As(t) {
|
|
5840
5840
|
return Ot(t) && // @ts-ignore
|
|
5841
5841
|
!!t.adoptedStyleSheets;
|
|
5842
5842
|
}
|
|
@@ -5846,7 +5846,7 @@ function Ei() {
|
|
|
5846
5846
|
}
|
|
5847
5847
|
const lt = /* @__PURE__ */ new Map();
|
|
5848
5848
|
function la(t) {
|
|
5849
|
-
if (t === null || !
|
|
5849
|
+
if (t === null || !As(document))
|
|
5850
5850
|
return;
|
|
5851
5851
|
const e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), s = (o) => setTimeout(() => {
|
|
5852
5852
|
let l = t.nodes.getID(o);
|
|
@@ -5868,7 +5868,7 @@ function la(t) {
|
|
|
5868
5868
|
}
|
|
5869
5869
|
if (Symbol.iterator in a)
|
|
5870
5870
|
for (const u of a)
|
|
5871
|
-
h.includes(u) || t.send(
|
|
5871
|
+
h.includes(u) || t.send(Fr(u, l));
|
|
5872
5872
|
n.set(l, h);
|
|
5873
5873
|
}, 20);
|
|
5874
5874
|
function i(o) {
|
|
@@ -5901,7 +5901,7 @@ function la(t) {
|
|
|
5901
5901
|
}), t.attachStartCallback(() => {
|
|
5902
5902
|
s(document);
|
|
5903
5903
|
}), t.nodes.attachNodeCallback((o) => {
|
|
5904
|
-
|
|
5904
|
+
As(o) && s(o);
|
|
5905
5905
|
});
|
|
5906
5906
|
}
|
|
5907
5907
|
function ha(t) {
|
|
@@ -6017,13 +6017,13 @@ function fa(t, e, n, s, i) {
|
|
|
6017
6017
|
t.debug.log("Openreplay: attaching axios spy to instance", e);
|
|
6018
6018
|
function r(p) {
|
|
6019
6019
|
t.debug.log("Openreplay: capturing axios response data", p);
|
|
6020
|
-
const { headers: y, data: S, method: v, url: E, baseURL:
|
|
6020
|
+
const { headers: y, data: S, method: v, url: E, baseURL: F } = p.config, { data: P, headers: A, status: k, response: N } = p, { data: O, headers: D, status: I } = N || {}, T = n.ignoreHeaders, B = Array.isArray(T) ? (U) => T.includes(U) : () => T;
|
|
6021
6021
|
function G(U, b) {
|
|
6022
6022
|
B(b[0]) || (U[b[0]] = b[1]);
|
|
6023
6023
|
}
|
|
6024
6024
|
let j = {}, $ = {};
|
|
6025
6025
|
y.toJSON ? j = y.toJSON() : y instanceof Headers ? y.forEach((U, b) => G(j, [b, U])) : Array.isArray(y) ? y.forEach((U) => G(j, U)) : typeof y == "object" && Object.entries(y).forEach((U) => G(j, U));
|
|
6026
|
-
const C = D ||
|
|
6026
|
+
const C = D || A;
|
|
6027
6027
|
C.toJSON ? $ = C.toJSON() : C instanceof Headers ? C.forEach((U, b) => G($, [b, U])) : Array.isArray(C) ? C.forEach((U) => G($, U)) : typeof C == "object" && Object.entries(C).forEach(([U, b]) => {
|
|
6028
6028
|
B(U) || ($[U] = b);
|
|
6029
6029
|
});
|
|
@@ -6495,15 +6495,15 @@ function Ia(t, e = {}) {
|
|
|
6495
6495
|
}
|
|
6496
6496
|
const h = (c) => {
|
|
6497
6497
|
if (n.useProxy)
|
|
6498
|
-
return Ta(c, n.ignoreHeaders, o, l, (
|
|
6499
|
-
const u = c.fetch.bind(c), p = (
|
|
6500
|
-
if (!(typeof
|
|
6501
|
-
return u(
|
|
6498
|
+
return Ta(c, n.ignoreHeaders, o, l, (A) => t.send(A), (A) => t.isServiceURL(A), n.tokenUrlMatcher);
|
|
6499
|
+
const u = c.fetch.bind(c), p = (A, k = {}) => {
|
|
6500
|
+
if (!(typeof A == "string" || A instanceof URL) || t.isServiceURL(String(A)))
|
|
6501
|
+
return u(A, k);
|
|
6502
6502
|
o(function(O, D) {
|
|
6503
6503
|
k.headers === void 0 && (k.headers = {}), k.headers instanceof Headers ? k.headers.append(O, D) : Array.isArray(k.headers) ? k.headers.push([O, D]) : k.headers[O] = D;
|
|
6504
6504
|
});
|
|
6505
6505
|
const N = performance.now();
|
|
6506
|
-
return u(
|
|
6506
|
+
return u(A, k).then((O) => {
|
|
6507
6507
|
const D = performance.now() - N;
|
|
6508
6508
|
if (n.failuresOnly && O.status < 400)
|
|
6509
6509
|
return O;
|
|
@@ -6519,7 +6519,7 @@ function Ia(t, e = {}) {
|
|
|
6519
6519
|
});
|
|
6520
6520
|
}
|
|
6521
6521
|
const j = Ls(k.method), $ = l({
|
|
6522
|
-
url: String(
|
|
6522
|
+
url: String(A),
|
|
6523
6523
|
method: j,
|
|
6524
6524
|
status: I.status,
|
|
6525
6525
|
request: {
|
|
@@ -6538,7 +6538,7 @@ function Ia(t, e = {}) {
|
|
|
6538
6538
|
};
|
|
6539
6539
|
c.fetch = p;
|
|
6540
6540
|
const y = c.XMLHttpRequest.prototype.open, S = c.XMLHttpRequest.prototype.setRequestHeader, v = c.XMLHttpRequest.prototype.send;
|
|
6541
|
-
function E(
|
|
6541
|
+
function E(A, k) {
|
|
6542
6542
|
const N = this;
|
|
6543
6543
|
o((D, I) => N.setRequestHeader(D, I));
|
|
6544
6544
|
let O = 0;
|
|
@@ -6550,7 +6550,7 @@ function Ia(t, e = {}) {
|
|
|
6550
6550
|
const K = V.split(": "), U = K.shift();
|
|
6551
6551
|
i(U) || ($[U] = K.join(": "));
|
|
6552
6552
|
});
|
|
6553
|
-
const C = Ls(
|
|
6553
|
+
const C = Ls(A), L = l({
|
|
6554
6554
|
url: String(k),
|
|
6555
6555
|
method: C,
|
|
6556
6556
|
status: N.status,
|
|
@@ -6567,18 +6567,18 @@ function Ia(t, e = {}) {
|
|
|
6567
6567
|
L && t.send(xt("xhr", C, String(L.url), a(L.request), a(L.response), N.status, O + Ge(), B, 0));
|
|
6568
6568
|
})), y.apply(this, arguments);
|
|
6569
6569
|
}
|
|
6570
|
-
function A
|
|
6570
|
+
function F(A) {
|
|
6571
6571
|
const k = un(this);
|
|
6572
|
-
return k.body =
|
|
6572
|
+
return k.body = A, v.apply(this, arguments);
|
|
6573
6573
|
}
|
|
6574
|
-
function P(
|
|
6575
|
-
if (!i(
|
|
6574
|
+
function P(A, k) {
|
|
6575
|
+
if (!i(A)) {
|
|
6576
6576
|
const N = un(this);
|
|
6577
|
-
N.headers[
|
|
6577
|
+
N.headers[A] = k;
|
|
6578
6578
|
}
|
|
6579
6579
|
return S.apply(this, arguments);
|
|
6580
6580
|
}
|
|
6581
|
-
n.axiosInstances || (c.XMLHttpRequest.prototype.open = E, c.XMLHttpRequest.prototype.send =
|
|
6581
|
+
n.axiosInstances || (c.XMLHttpRequest.prototype.open = E, c.XMLHttpRequest.prototype.send = F, c.XMLHttpRequest.prototype.setRequestHeader = P);
|
|
6582
6582
|
};
|
|
6583
6583
|
h(window), n.axiosInstances && n.axiosInstances.forEach((c) => {
|
|
6584
6584
|
fa(t, c, n, l, a);
|
|
@@ -6681,7 +6681,7 @@ class Oa {
|
|
|
6681
6681
|
return;
|
|
6682
6682
|
}
|
|
6683
6683
|
const r = new Co(e.projectKey, e.sessionToken, e, this.signalStartIssue, this.crossdomainMode);
|
|
6684
|
-
this.app = r, this.crossdomainMode || (aa(r), _o(r), zr(r, e), _a(r)), na(r, e.mouse), oa(r, this.crossdomainMode), ha(r), la(r),
|
|
6684
|
+
this.app = r, this.crossdomainMode || (aa(r), _o(r), zr(r, e), _a(r)), na(r, e.mouse), oa(r, this.crossdomainMode), ha(r), la(r), Fo(r, e), Mo(r, e), jo(r), Wo(r, e), ra(r, e), da(r), ua(r), Ia(r, e.network), Ca(r), window.__OPENREPLAY__ = this, e.flags && e.flags.onFlagsLoad && this.onFlagsLoad(e.flags.onFlagsLoad);
|
|
6685
6685
|
const o = window.open;
|
|
6686
6686
|
(e.autoResetOnWindowOpen || e.resetTabOnWindowOpen) && (r.attachStartCallback(() => {
|
|
6687
6687
|
const a = r.getTabId(), h = r.sessionStorage ?? window.sessionStorage;
|
|
@@ -7329,11 +7329,11 @@ width: 100%;
|
|
|
7329
7329
|
`, Ti = document.createElement("style");
|
|
7330
7330
|
Ti.textContent = Ra;
|
|
7331
7331
|
document.head.appendChild(Ti);
|
|
7332
|
-
const
|
|
7333
|
-
class
|
|
7332
|
+
const Fa = ["climats", "telckel", "biobio", "weinpoint", "vinigrandi", "ampely", "test"], Aa = "HeUw6IXuhvz6tRuXdPEGEbj3SGQ3Q2YtEc1Z8jd41Kg9LtyPb4Epu0to31SYIadG";
|
|
7333
|
+
class Ft {
|
|
7334
7334
|
constructor(e) {
|
|
7335
7335
|
var n;
|
|
7336
|
-
this.baseURL = "https://wineater-backend.vercel.app/", this.store =
|
|
7336
|
+
this.baseURL = "https://wineater-backend.vercel.app/", this.store = Fa.find((s) => window.location.href.includes(s)), this.token = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.CLIENT_TOKEN) || Aa;
|
|
7337
7337
|
}
|
|
7338
7338
|
async getStoreConfig(e) {
|
|
7339
7339
|
console.log(e);
|
|
@@ -7430,7 +7430,7 @@ class At {
|
|
|
7430
7430
|
}
|
|
7431
7431
|
class Da {
|
|
7432
7432
|
constructor() {
|
|
7433
|
-
this.api = new
|
|
7433
|
+
this.api = new Ft(), this.language = "en", this.translations = {
|
|
7434
7434
|
fr: {
|
|
7435
7435
|
welcomeMessage: "Quel plat allez-vous déguster ? Décrivez-le-moi et je vous proposerai le vin qui l'accompagnera parfaitement.",
|
|
7436
7436
|
noResultsFound: "Aucun résultat trouvé.",
|
|
@@ -7726,7 +7726,7 @@ const q = new Da(), fn = {
|
|
|
7726
7726
|
class La {
|
|
7727
7727
|
constructor() {
|
|
7728
7728
|
var e;
|
|
7729
|
-
this.widgetType = ((e = window == null ? void 0 : window.wineaterData) == null ? void 0 : e.WIDGET_TYPE) || "store", this.api = new
|
|
7729
|
+
this.widgetType = ((e = window == null ? void 0 : window.wineaterData) == null ? void 0 : e.WIDGET_TYPE) || "store", this.api = new Ft(), this.selectedFilters = {
|
|
7730
7730
|
price: null,
|
|
7731
7731
|
color: null,
|
|
7732
7732
|
intensity: null
|
|
@@ -7841,15 +7841,16 @@ class La {
|
|
|
7841
7841
|
displayResults(e, n = !1) {
|
|
7842
7842
|
const s = document.getElementById("wine-placeholder");
|
|
7843
7843
|
this.hideLoadingIndicator(), s.innerHTML = "", e.forEach((i, r) => {
|
|
7844
|
+
r === e.length - 1 && this.widgetType === "store" && (i.isSommSelection = !0), console.log(i);
|
|
7844
7845
|
const o = `
|
|
7845
7846
|
<div class="wine-recommendation-tile ${i.isSommSelection ? "somm-selection" : ""}">
|
|
7846
7847
|
${i.isSommSelection ? `<div class="somm-selection-badge">${q.translate("wineDetails.sommSelection")}</div>` : ""}
|
|
7847
|
-
${i.image ? `<img src="${i.image}" alt="${i.title}" />` : ""}
|
|
7848
|
+
${i.image || i.Image ? `<img src="${i.image || i.Image}" alt="${i.title || i.Title}" />` : ""}
|
|
7848
7849
|
<div class="tile-details">
|
|
7849
|
-
<strong>${i.title}</strong>
|
|
7850
|
-
<p>${q.translate("wineDetails.price")}: ${i.price ||
|
|
7851
|
-
<p>${q.translate("wineDetails.region")}: ${i.region ||
|
|
7852
|
-
<p>${q.translate("wineDetails.type")}: ${i.type ||
|
|
7850
|
+
<strong>${i.title || i.Title}</strong>
|
|
7851
|
+
<p>${q.translate("wineDetails.price")}: ${i.price || i.Price}</p>
|
|
7852
|
+
<p>${q.translate("wineDetails.region")}: ${i.region || i.Region}</p>
|
|
7853
|
+
<p>${q.translate("wineDetails.type")}: ${i.type || i.Type}</p>
|
|
7853
7854
|
${this.widgetType === "bar" ? `<p>${q.translate("wineDetails.reason")}: ${i.pairing_recommendation || "N/A"}</p>` : ""}
|
|
7854
7855
|
${this.widgetType === "bar" ? `<p>${q.translate("wineDetails.code")}: ${i.url || "N/A"}</p>` : `<a href="${i.Url}" target="_blank">${q.translate("wineDetails.moreInfo")}</a>`}
|
|
7855
7856
|
</div>
|
|
@@ -7949,7 +7950,7 @@ class La {
|
|
|
7949
7950
|
class Ma {
|
|
7950
7951
|
constructor() {
|
|
7951
7952
|
var n;
|
|
7952
|
-
this.api = new
|
|
7953
|
+
this.api = new Ft();
|
|
7953
7954
|
const e = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.FIRST_MESSAGE_TEXT) || q.translate("welcomeMessage");
|
|
7954
7955
|
this.displayFirstMessage(e);
|
|
7955
7956
|
}
|
|
@@ -7986,12 +7987,12 @@ class Ma {
|
|
|
7986
7987
|
i.textContent = e, i.className = "message " + n, s.appendChild(i), s.scrollTop = s.scrollHeight;
|
|
7987
7988
|
}
|
|
7988
7989
|
sendAnalytics(e) {
|
|
7989
|
-
console.log(e),
|
|
7990
|
+
console.log(e), Ai(e);
|
|
7990
7991
|
}
|
|
7991
7992
|
displayResults(e) {
|
|
7992
7993
|
console.log(e);
|
|
7993
7994
|
const n = document.getElementById("message-container");
|
|
7994
|
-
|
|
7995
|
+
Fi(e.map((s) => s.Title)), e.forEach((s) => {
|
|
7995
7996
|
const i = document.createElement("div");
|
|
7996
7997
|
i.className = "wine-recommendation";
|
|
7997
7998
|
const r = document.createElement("div");
|
|
@@ -8030,7 +8031,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|
|
8030
8031
|
function za(t) {
|
|
8031
8032
|
gt = t;
|
|
8032
8033
|
}
|
|
8033
|
-
new
|
|
8034
|
+
new Ft();
|
|
8034
8035
|
const ht = {
|
|
8035
8036
|
PRODUCT_PAGES: /producto\/[^\/]+\/$/
|
|
8036
8037
|
// Matches any product page like 'producto/any-product-name/'
|