wineater-bot 3.8.1 → 3.8.2
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 +245 -241
- package/dist/wineater-chatbot.umd.js +22 -22
- package/package.json +1 -1
- package/src/js/widget.js +36 -24
|
@@ -30,7 +30,7 @@ function mi() {
|
|
|
30
30
|
return e || (e = pi(), Rs(t, e, 365)), e;
|
|
31
31
|
}
|
|
32
32
|
var $e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
33
|
-
function
|
|
33
|
+
function vi(t) {
|
|
34
34
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
35
35
|
}
|
|
36
36
|
var $n = { exports: {} };
|
|
@@ -38,39 +38,39 @@ var $n = { exports: {} };
|
|
|
38
38
|
(function(n, s) {
|
|
39
39
|
s(e);
|
|
40
40
|
})($e, function(n) {
|
|
41
|
-
var s = { getItemSync: function(
|
|
41
|
+
var s = { getItemSync: function(b) {
|
|
42
42
|
try {
|
|
43
|
-
return localStorage.getItem(
|
|
43
|
+
return localStorage.getItem(b) || null;
|
|
44
44
|
} catch {
|
|
45
45
|
return null;
|
|
46
46
|
}
|
|
47
|
-
}, getItem: function(
|
|
47
|
+
}, getItem: function(b, f) {
|
|
48
48
|
var h = this;
|
|
49
49
|
return new Promise(function(m, g) {
|
|
50
50
|
try {
|
|
51
|
-
var S = h.getItemSync(
|
|
51
|
+
var S = h.getItemSync(b);
|
|
52
52
|
f == null || f(null, S), m(S);
|
|
53
53
|
} catch (k) {
|
|
54
54
|
f && f(k, null), g(k);
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
-
}, setItem: function(
|
|
57
|
+
}, setItem: function(b, f, h) {
|
|
58
58
|
return new Promise(function(m, g) {
|
|
59
59
|
try {
|
|
60
|
-
localStorage.setItem(
|
|
60
|
+
localStorage.setItem(b, f), h && h(null, f), m(f);
|
|
61
61
|
} catch (S) {
|
|
62
62
|
h && h(S, null), g(S);
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
} }, i = function() {
|
|
66
|
-
return i = Object.assign || function(
|
|
66
|
+
return i = Object.assign || function(b) {
|
|
67
67
|
for (var f, h = 1, m = arguments.length; h < m; h++)
|
|
68
68
|
for (var g in f = arguments[h])
|
|
69
|
-
Object.prototype.hasOwnProperty.call(f, g) && (
|
|
70
|
-
return
|
|
69
|
+
Object.prototype.hasOwnProperty.call(f, g) && (b[g] = f[g]);
|
|
70
|
+
return b;
|
|
71
71
|
}, i.apply(this, arguments);
|
|
72
72
|
};
|
|
73
|
-
function r(
|
|
73
|
+
function r(b, f, h, m) {
|
|
74
74
|
return new (h || (h = Promise))(function(g, S) {
|
|
75
75
|
function k(q) {
|
|
76
76
|
try {
|
|
@@ -92,10 +92,10 @@ var $n = { exports: {} };
|
|
|
92
92
|
W(O);
|
|
93
93
|
})).then(k, L);
|
|
94
94
|
}
|
|
95
|
-
B((m = m.apply(
|
|
95
|
+
B((m = m.apply(b, f || [])).next());
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
|
-
function o(
|
|
98
|
+
function o(b, f) {
|
|
99
99
|
var h, m, g, S, k = { label: 0, sent: function() {
|
|
100
100
|
if (1 & g[0])
|
|
101
101
|
throw g[1];
|
|
@@ -146,7 +146,7 @@ var $n = { exports: {} };
|
|
|
146
146
|
g[2] && k.ops.pop(), k.trys.pop();
|
|
147
147
|
continue;
|
|
148
148
|
}
|
|
149
|
-
O = f.call(
|
|
149
|
+
O = f.call(b, k);
|
|
150
150
|
} catch (W) {
|
|
151
151
|
O = [6, W], m = 0;
|
|
152
152
|
} finally {
|
|
@@ -159,13 +159,13 @@ var $n = { exports: {} };
|
|
|
159
159
|
};
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
function l(
|
|
162
|
+
function l(b, f, h) {
|
|
163
163
|
if (h || arguments.length === 2)
|
|
164
164
|
for (var m, g = 0, S = f.length; g < S; g++)
|
|
165
165
|
!m && g in f || (m || (m = Array.prototype.slice.call(f, 0, g)), m[g] = f[g]);
|
|
166
|
-
return
|
|
166
|
+
return b.concat(m || Array.prototype.slice.call(f));
|
|
167
167
|
}
|
|
168
|
-
var c = function
|
|
168
|
+
var c = function b(f, h) {
|
|
169
169
|
if (f === h)
|
|
170
170
|
return !0;
|
|
171
171
|
if (f && h && typeof f == "object" && typeof h == "object") {
|
|
@@ -176,7 +176,7 @@ var $n = { exports: {} };
|
|
|
176
176
|
if ((m = f.length) != h.length)
|
|
177
177
|
return !1;
|
|
178
178
|
for (g = m; g-- != 0; )
|
|
179
|
-
if (!
|
|
179
|
+
if (!b(f[g], h[g]))
|
|
180
180
|
return !1;
|
|
181
181
|
return !0;
|
|
182
182
|
}
|
|
@@ -193,44 +193,44 @@ var $n = { exports: {} };
|
|
|
193
193
|
return !1;
|
|
194
194
|
for (g = m; g-- != 0; ) {
|
|
195
195
|
var k = S[g];
|
|
196
|
-
if (!
|
|
196
|
+
if (!b(f[k], h[k]))
|
|
197
197
|
return !1;
|
|
198
198
|
}
|
|
199
199
|
return !0;
|
|
200
200
|
}
|
|
201
201
|
return f != f && h != h;
|
|
202
202
|
};
|
|
203
|
-
function u(
|
|
203
|
+
function u(b, f) {
|
|
204
204
|
var h = Object.keys(f || {}).filter(function(m) {
|
|
205
|
-
var g =
|
|
205
|
+
var g = b == null ? void 0 : b[m], S = f == null ? void 0 : f[m];
|
|
206
206
|
return !c(g, S);
|
|
207
207
|
});
|
|
208
|
-
return Object.keys(
|
|
208
|
+
return Object.keys(b || {}).filter(function(m) {
|
|
209
209
|
Object.keys(f || {}).includes(m) || h.push(m);
|
|
210
210
|
}), Object.keys(h).length ? h : null;
|
|
211
211
|
}
|
|
212
212
|
var a, d;
|
|
213
|
-
function p(
|
|
213
|
+
function p(b, f, h) {
|
|
214
214
|
var m = "shortString", g = !0;
|
|
215
|
-
typeof h == "number" && (m = "javaDouble", g = !1),
|
|
215
|
+
typeof h == "number" && (m = "javaDouble", g = !1), b[m] = b[m] || {}, b[m][f] = g ? h + "" : h;
|
|
216
216
|
}
|
|
217
|
-
function b
|
|
218
|
-
return !!
|
|
217
|
+
function v(b) {
|
|
218
|
+
return !!b && typeof b == "object" && b.value !== void 0;
|
|
219
219
|
}
|
|
220
|
-
function w(
|
|
221
|
-
return Object.fromEntries(Object.entries(
|
|
220
|
+
function w(b) {
|
|
221
|
+
return Object.fromEntries(Object.entries(b).map(function(f) {
|
|
222
222
|
var h = f[0], m = f[1];
|
|
223
|
-
return [h,
|
|
223
|
+
return [h, v(m) ? m : { value: m }];
|
|
224
224
|
}));
|
|
225
225
|
}
|
|
226
|
-
function y(
|
|
227
|
-
return i(i({},
|
|
226
|
+
function y(b) {
|
|
227
|
+
return i(i({}, b), { identity: b.identity ? i(i({}, b.identity), { traits: w(b.identity.traits || {}) }) : void 0 });
|
|
228
228
|
}
|
|
229
|
-
(function(
|
|
230
|
-
|
|
229
|
+
(function(b) {
|
|
230
|
+
b.NONE = "NONE", b.DEFAULT_FLAGS = "DEFAULT_FLAGS", b.CACHE = "CACHE", b.SERVER = "SERVER";
|
|
231
231
|
})(a || (a = {}));
|
|
232
232
|
var x, C = null, F = "BULLET_TRAIN_DB", R = "BULLET_TRAIN_EVENT", T = "https://edge.api.flagsmith.com/api/v1/", N = "flagsmith_value_", D = "flagsmith_enabled_", A = "flagsmith_trait_", I = function() {
|
|
233
|
-
function
|
|
233
|
+
function b(f) {
|
|
234
234
|
var h = this;
|
|
235
235
|
this._trigger = null, this._triggerLoadingState = null, this.timestamp = null, this.isLoading = !1, this.eventSource = null, this.getFlags = function() {
|
|
236
236
|
var m = h, g = m.api, S = m.evaluationContext;
|
|
@@ -333,7 +333,7 @@ var $n = { exports: {} };
|
|
|
333
333
|
if (h.api)
|
|
334
334
|
return h.setContext(i(i({}, h.evaluationContext), { identity: i(i({}, h.evaluationContext.identity), { traits: i(i({}, (g = h.evaluationContext.identity) === null || g === void 0 ? void 0 : g.traits), Object.fromEntries(Object.entries(m).map(function(S) {
|
|
335
335
|
var k = S[0], L = S[1];
|
|
336
|
-
return [k,
|
|
336
|
+
return [k, v(L) ? L : { value: L }];
|
|
337
337
|
}))) }) }));
|
|
338
338
|
console.error("Attempted to setTraits a user before calling flagsmith.init. Call flagsmith.init first, if you wish to prevent it sending a request for flags, call init with preventFetch:true.");
|
|
339
339
|
}, this.hasFeature = function(m, g) {
|
|
@@ -381,7 +381,7 @@ var $n = { exports: {} };
|
|
|
381
381
|
h.setLoadingState(S), (k = h.onChange) === null || k === void 0 || k.call(h, m, g, h.loadingState), (L = h._trigger) === null || L === void 0 || L.call(h);
|
|
382
382
|
}, d = f.fetch ? f.fetch : typeof fetch < "u" ? fetch : $e == null ? void 0 : $e.fetch, this.canUseStorage = typeof window < "u" || !!f.browserlessStorage, this.log("Constructing flagsmith instance " + f), f.eventSource && (x = f.eventSource), f.AsyncStorage && (C = f.AsyncStorage);
|
|
383
383
|
}
|
|
384
|
-
return
|
|
384
|
+
return b.prototype.init = function(f) {
|
|
385
385
|
var h, m, g;
|
|
386
386
|
return r(this, void 0, void 0, function() {
|
|
387
387
|
var S, k, L, B, q, O, W, ee, oe, te, ne, ae, ce, ge, Ge, Ke, Ae, se, K, Ct, Je, Pn, Xe, _t, Bn, jn, Nt, zn, Ot, Ye, Me, Un, ie = this;
|
|
@@ -397,8 +397,8 @@ var $n = { exports: {} };
|
|
|
397
397
|
})) : {} } : S.identity, this.evaluationContext = S, this.api = B, this.headers = q, this.getFlagInterval = null, this.analyticsInterval = null, this.onChange = O, Nt = "Wrong Flagsmith Configuration: preventFetch is true and no defaulFlags provided", this._trigger = Bn || this._trigger, this._triggerLoadingState = jn || this._triggerLoadingState, this.onError = function(le) {
|
|
398
398
|
ie.setLoadingState(i(i({}, ie.loadingState), { isFetching: !1, isLoading: !1, error: le })), oe == null || oe(le);
|
|
399
399
|
}, this.enableLogs = ce || !1, this.cacheOptions = Xe ? { skipAPI: !!Xe.skipAPI, ttl: Xe.ttl || 0, loadStale: !!Xe.loadStale } : this.cacheOptions, !this.cacheOptions.ttl && this.cacheOptions.skipAPI && console.warn("Flagsmith: you have set a cache ttl of 0 and are skipping API calls, this means the API will not be hit unless you clear local storage."), ne && (d = ne), this.enableAnalytics = Ge || !1, this.flags = Object.assign({}, te) || {}, this.datadogRum = ee || null, this.initialised = !0, this.ticks = 1e4, this.timer = this.enableLogs ? (/* @__PURE__ */ new Date()).valueOf() : null, this.cacheFlags = C !== void 0 && !!W, K && (C = K), Ke && typeof window < "u" && this.setupRealtime(se, S.environment.apiKey), Object.keys(this.flags).length && (this.loadingState = i(i({}, this.loadingState), { isLoading: !1, source: a.DEFAULT_FLAGS })), this.setState(Pn), this.log("Initialising with properties", f, this), ge && (typeof dtrum > "u" ? console.error("You have attempted to enable dynatrace but dtrum is undefined, please check you have the Dynatrace RUM JavaScript API installed.") : this.dtrum = dtrum), _t && (d = /* @__PURE__ */ function(le) {
|
|
400
|
-
return function(me,
|
|
401
|
-
var Te =
|
|
400
|
+
return function(me, ve) {
|
|
401
|
+
var Te = ve.headers, Y = ve.method, Fe = ve.body;
|
|
402
402
|
return new Promise(function(Oe) {
|
|
403
403
|
switch (Y) {
|
|
404
404
|
case "GET":
|
|
@@ -426,10 +426,10 @@ var $n = { exports: {} };
|
|
|
426
426
|
ie.analyticsInterval = setInterval(ie.analyticsFlags, ie.ticks);
|
|
427
427
|
}), this.enableAnalytics && (this.analyticsInterval && clearInterval(this.analyticsInterval), C && this.canUseStorage && C.getItem(R, function(le, me) {
|
|
428
428
|
if (me && ie.evaluationContext.environment) {
|
|
429
|
-
var
|
|
430
|
-
if (
|
|
429
|
+
var ve = JSON.parse(me);
|
|
430
|
+
if (ve[ie.evaluationContext.environment.apiKey]) {
|
|
431
431
|
var Te = ie.getState();
|
|
432
|
-
ie.log("Retrieved events from cache", me), ie.setState(i(i({}, Te), { evaluationEvent:
|
|
432
|
+
ie.log("Retrieved events from cache", me), ie.setState(i(i({}, Te), { evaluationEvent: ve[ie.evaluationContext.environment.apiKey] }));
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
})), !W)
|
|
@@ -438,15 +438,15 @@ var $n = { exports: {} };
|
|
|
438
438
|
return [3, 8];
|
|
439
439
|
zn = function(le, me) {
|
|
440
440
|
return r(ie, void 0, void 0, function() {
|
|
441
|
-
var
|
|
441
|
+
var ve, Te, Y, Fe, Oe, xe, Rt, Hn, Dt, Lt, At, Mt, Ft, Pt, Bt, jt, zt, Ut, Ht, $t, qt, Wt, Vt, Gt;
|
|
442
442
|
return o(this, function(Ee) {
|
|
443
443
|
switch (Ee.label) {
|
|
444
444
|
case 0:
|
|
445
445
|
if (!me)
|
|
446
446
|
return [3, 7];
|
|
447
|
-
|
|
447
|
+
ve = null, Te = null, Ee.label = 1;
|
|
448
448
|
case 1:
|
|
449
|
-
return Ee.trys.push([1, 5, , 6]), Y = JSON.parse(me), Fe = !1, Oe = !1, Y && Y.api === this.api && ((Lt = (Dt = Y.evaluationContext) === null || Dt === void 0 ? void 0 : Dt.environment) === null || Lt === void 0 ? void 0 : Lt.apiKey) === ((At = this.evaluationContext.environment) === null || At === void 0 ? void 0 : At.apiKey) && (xe = !0, this.evaluationContext.identity && ((Ft = (Mt = Y.evaluationContext) === null || Mt === void 0 ? void 0 : Mt.identity) === null || Ft === void 0 ? void 0 : Ft.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Bt = (Pt = Y.evaluationContext) === null || Pt === void 0 ? void 0 : Pt.identity) === null || Bt === void 0 ? void 0 : Bt.identifier) + " to " + this.evaluationContext.identity.identifier), xe = !1), this.cacheOptions.ttl && (!Y.ts || (/* @__PURE__ */ new Date()).valueOf() - Y.ts > this.cacheOptions.ttl) && (Y.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), xe = !1) : Y.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), Oe = !0, xe = !0)), xe && (Fe = !0, Te = u((jt = this.evaluationContext.identity) === null || jt === void 0 ? void 0 : jt.traits, (Ut = (zt = Y.evaluationContext) === null || zt === void 0 ? void 0 : zt.identity) === null || Ut === void 0 ? void 0 : Ut.traits),
|
|
449
|
+
return Ee.trys.push([1, 5, , 6]), Y = JSON.parse(me), Fe = !1, Oe = !1, Y && Y.api === this.api && ((Lt = (Dt = Y.evaluationContext) === null || Dt === void 0 ? void 0 : Dt.environment) === null || Lt === void 0 ? void 0 : Lt.apiKey) === ((At = this.evaluationContext.environment) === null || At === void 0 ? void 0 : At.apiKey) && (xe = !0, this.evaluationContext.identity && ((Ft = (Mt = Y.evaluationContext) === null || Mt === void 0 ? void 0 : Mt.identity) === null || Ft === void 0 ? void 0 : Ft.identifier) !== this.evaluationContext.identity.identifier && (this.log("Ignoring cache, identity has changed from " + ((Bt = (Pt = Y.evaluationContext) === null || Pt === void 0 ? void 0 : Pt.identity) === null || Bt === void 0 ? void 0 : Bt.identifier) + " to " + this.evaluationContext.identity.identifier), xe = !1), this.cacheOptions.ttl && (!Y.ts || (/* @__PURE__ */ new Date()).valueOf() - Y.ts > this.cacheOptions.ttl) && (Y.ts && !this.cacheOptions.loadStale ? (this.log("Ignoring cache, timestamp is too old ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), xe = !1) : Y.ts && this.cacheOptions.loadStale && (this.log("Loading stale cache, timestamp ts:" + Y.ts + " ttl: " + this.cacheOptions.ttl + " time elapsed since cache: " + ((/* @__PURE__ */ new Date()).valueOf() - Y.ts) + "ms"), Oe = !0, xe = !0)), xe && (Fe = !0, Te = u((jt = this.evaluationContext.identity) === null || jt === void 0 ? void 0 : jt.traits, (Ut = (zt = Y.evaluationContext) === null || zt === void 0 ? void 0 : zt.identity) === null || Ut === void 0 ? void 0 : Ut.traits), ve = u(this.flags, Y.flags), this.setState(i(i({}, Y), { evaluationContext: y(i(i({}, Y.evaluationContext), { identity: !((Ht = Y.evaluationContext) === null || Ht === void 0) && Ht.identity ? i(i({}, ($t = Y.evaluationContext) === null || $t === void 0 ? void 0 : $t.identity), { traits: i(i({}, ((Wt = (qt = Y.evaluationContext) === null || qt === void 0 ? void 0 : qt.identity) === null || Wt === void 0 ? void 0 : Wt.traits) || {}), Je || {}) }) : void 0 })) })), this.log("Retrieved flags from cache", Y))), Fe ? (Rt = !ae && (!this.cacheOptions.skipAPI || Oe), this._onChange(null, { isFromServer: !1, flagsChanged: ve, traitsChanged: Te }, this._loadedState(null, a.CACHE, Rt)), this.oldFlags = this.flags, this.cacheOptions.skipAPI && Fe && !Oe && this.log("Skipping API, using cache"), Rt && this.getFlags(), [3, 4]) : [3, 2];
|
|
450
450
|
case 2:
|
|
451
451
|
return ae ? [3, 4] : [4, this.getFlags()];
|
|
452
452
|
case 3:
|
|
@@ -508,44 +508,44 @@ var $n = { exports: {} };
|
|
|
508
508
|
}
|
|
509
509
|
});
|
|
510
510
|
});
|
|
511
|
-
},
|
|
511
|
+
}, b.prototype._loadedState = function(f, h, m) {
|
|
512
512
|
return f === void 0 && (f = null), m === void 0 && (m = !1), { error: f, isFetching: m, isLoading: !1, source: h };
|
|
513
|
-
},
|
|
513
|
+
}, b.prototype.getAllFlags = function() {
|
|
514
514
|
return this.flags;
|
|
515
|
-
},
|
|
515
|
+
}, b.prototype.identify = function(f, h, m) {
|
|
516
516
|
return this.evaluationContext.identity = { identifier: f, transient: m, traits: this.evaluationContext.identity && this.evaluationContext.identity.identifier == f ? this.evaluationContext.identity.traits : {} }, this.evaluationContext.identity.identifier = f, this.log("Identify: " + this.evaluationContext.identity.identifier), h && (this.evaluationContext.identity.traits = Object.fromEntries(Object.entries(h).map(function(g) {
|
|
517
517
|
var S = g[0], k = g[1];
|
|
518
|
-
return [S,
|
|
518
|
+
return [S, v(k) ? k : { value: k }];
|
|
519
519
|
}))), this.initialised ? this.getFlags() : Promise.resolve();
|
|
520
|
-
},
|
|
520
|
+
}, b.prototype.getState = function() {
|
|
521
521
|
return { api: this.api, flags: this.flags, ts: this.ts, evaluationContext: this.evaluationContext, evaluationEvent: this.evaluationEvent };
|
|
522
|
-
},
|
|
522
|
+
}, b.prototype.setState = function(f) {
|
|
523
523
|
f && (this.initialised = !0, this.api = f.api || this.api || T, this.flags = f.flags || this.flags, this.evaluationContext = f.evaluationContext || this.evaluationContext, this.evaluationEvent = f.evaluationEvent || this.evaluationEvent, this.log("setState called", this));
|
|
524
|
-
},
|
|
524
|
+
}, b.prototype.logout = function() {
|
|
525
525
|
return this.evaluationContext.identity = null, this.initialised ? this.getFlags() : Promise.resolve();
|
|
526
|
-
},
|
|
526
|
+
}, b.prototype.startListening = function(f) {
|
|
527
527
|
f === void 0 && (f = 1e3), this.getFlagInterval && clearInterval(this.getFlagInterval), this.getFlagInterval = setInterval(this.getFlags, f);
|
|
528
|
-
},
|
|
528
|
+
}, b.prototype.stopListening = function() {
|
|
529
529
|
this.getFlagInterval && (clearInterval(this.getFlagInterval), this.getFlagInterval = null);
|
|
530
|
-
},
|
|
530
|
+
}, b.prototype.log = function() {
|
|
531
531
|
for (var f = [], h = 0; h < arguments.length; h++)
|
|
532
532
|
f[h] = arguments[h];
|
|
533
533
|
this.enableLogs && console.log.apply(this, l(["FLAGSMITH:", (/* @__PURE__ */ new Date()).valueOf() - (this.timer || 0), "ms"], f, !0));
|
|
534
|
-
},
|
|
534
|
+
}, b.prototype.updateStorage = function() {
|
|
535
535
|
if (this.cacheFlags) {
|
|
536
536
|
this.ts = (/* @__PURE__ */ new Date()).valueOf();
|
|
537
537
|
var f = JSON.stringify(this.getState());
|
|
538
538
|
this.log("Setting storage", f), C.setItem(F, f);
|
|
539
539
|
}
|
|
540
|
-
},
|
|
540
|
+
}, b.prototype.updateEventStorage = function() {
|
|
541
541
|
if (this.enableAnalytics) {
|
|
542
542
|
var f = JSON.stringify(this.getState().evaluationEvent);
|
|
543
543
|
C.setItem(R, f);
|
|
544
544
|
}
|
|
545
|
-
},
|
|
545
|
+
}, b.prototype.setLoadingState = function(f) {
|
|
546
546
|
var h;
|
|
547
547
|
c(f, this.loadingState) || (this.loadingState = i({}, f), this.log("Loading state changed", f), (h = this._triggerLoadingState) === null || h === void 0 || h.call(this));
|
|
548
|
-
},
|
|
548
|
+
}, b.prototype.setupRealtime = function(f, h) {
|
|
549
549
|
var m = this, g = f + "sse/environments/" + h + "/stream";
|
|
550
550
|
x ? this.eventSource || (this.log("Creating event source with url " + g), this.eventSource = new x(g), this.eventSource.addEventListener("environment_updated", function(S) {
|
|
551
551
|
var k;
|
|
@@ -556,40 +556,40 @@ var $n = { exports: {} };
|
|
|
556
556
|
}
|
|
557
557
|
k ? !m.timestamp || k > m.timestamp ? m.isLoading ? m.log("updated_at is new, but flags are loading", S.data, m.timestamp) : (m.log("updated_at is new, fetching flags", S.data, m.timestamp), m.getFlags()) : m.log("updated_at is outdated, skipping get flags", S.data, m.timestamp) : m.log("No updated_at received, fetching flags", S);
|
|
558
558
|
})) : this.log("Error, EventSource is undefined");
|
|
559
|
-
},
|
|
559
|
+
}, b;
|
|
560
560
|
}();
|
|
561
|
-
function E(
|
|
562
|
-
var f =
|
|
561
|
+
function E(b) {
|
|
562
|
+
var f = b.fetch, h = b.AsyncStorage, m = b.eventSource;
|
|
563
563
|
return new I({ fetch: f, AsyncStorage: h, eventSource: m });
|
|
564
564
|
}
|
|
565
|
-
var P, U = (P = function(
|
|
565
|
+
var P, U = (P = function(b, f) {
|
|
566
566
|
return P = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(h, m) {
|
|
567
567
|
h.__proto__ = m;
|
|
568
568
|
} || function(h, m) {
|
|
569
569
|
for (var g in m)
|
|
570
570
|
Object.prototype.hasOwnProperty.call(m, g) && (h[g] = m[g]);
|
|
571
|
-
}, P(
|
|
572
|
-
}, function(
|
|
571
|
+
}, P(b, f);
|
|
572
|
+
}, function(b, f) {
|
|
573
573
|
if (typeof f != "function" && f !== null)
|
|
574
574
|
throw new TypeError("Class extends value " + String(f) + " is not a constructor or null");
|
|
575
575
|
function h() {
|
|
576
|
-
this.constructor =
|
|
576
|
+
this.constructor = b;
|
|
577
577
|
}
|
|
578
|
-
P(
|
|
579
|
-
}), j = function(
|
|
580
|
-
var f = typeof Symbol == "function" && Symbol.iterator, h = f &&
|
|
578
|
+
P(b, f), b.prototype = f === null ? Object.create(f) : (h.prototype = f.prototype, new h());
|
|
579
|
+
}), j = function(b) {
|
|
580
|
+
var f = typeof Symbol == "function" && Symbol.iterator, h = f && b[f], m = 0;
|
|
581
581
|
if (h)
|
|
582
|
-
return h.call(
|
|
583
|
-
if (
|
|
582
|
+
return h.call(b);
|
|
583
|
+
if (b && typeof b.length == "number")
|
|
584
584
|
return { next: function() {
|
|
585
|
-
return
|
|
585
|
+
return b && m >= b.length && (b = void 0), { value: b && b[m++], done: !b };
|
|
586
586
|
} };
|
|
587
587
|
throw new TypeError(f ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
588
|
-
}, z = function(
|
|
589
|
-
var h = typeof Symbol == "function" &&
|
|
588
|
+
}, z = function(b, f) {
|
|
589
|
+
var h = typeof Symbol == "function" && b[Symbol.iterator];
|
|
590
590
|
if (!h)
|
|
591
|
-
return
|
|
592
|
-
var m, g, S = h.call(
|
|
591
|
+
return b;
|
|
592
|
+
var m, g, S = h.call(b), k = [];
|
|
593
593
|
try {
|
|
594
594
|
for (; (f === void 0 || f-- > 0) && !(m = S.next()).done; )
|
|
595
595
|
k.push(m.value);
|
|
@@ -604,19 +604,19 @@ var $n = { exports: {} };
|
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
606
|
return k;
|
|
607
|
-
}, _ = function(
|
|
607
|
+
}, _ = function(b, f, h) {
|
|
608
608
|
if (h || arguments.length === 2)
|
|
609
609
|
for (var m, g = 0, S = f.length; g < S; g++)
|
|
610
610
|
!m && g in f || (m || (m = Array.prototype.slice.call(f, 0, g)), m[g] = f[g]);
|
|
611
|
-
return
|
|
612
|
-
}, M = function(
|
|
611
|
+
return b.concat(m || Array.prototype.slice.call(f));
|
|
612
|
+
}, M = function(b) {
|
|
613
613
|
function f() {
|
|
614
|
-
return
|
|
614
|
+
return b.call(this, `EventSource not available.
|
|
615
615
|
Consider loading an EventSource polyfill and making it available globally as EventSource, or passing one in as eventSourceClass to the ReconnectingEventSource constructor.`) || this;
|
|
616
616
|
}
|
|
617
|
-
return U(f,
|
|
617
|
+
return U(f, b), f;
|
|
618
618
|
}(Error), V = function() {
|
|
619
|
-
function
|
|
619
|
+
function b(f, h) {
|
|
620
620
|
var m = this;
|
|
621
621
|
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")
|
|
622
622
|
throw new M();
|
|
@@ -624,9 +624,9 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
624
624
|
m._onevent(g);
|
|
625
625
|
}, this._start();
|
|
626
626
|
}
|
|
627
|
-
return
|
|
627
|
+
return b.prototype.dispatchEvent = function(f) {
|
|
628
628
|
throw new Error("Method not implemented.");
|
|
629
|
-
},
|
|
629
|
+
}, b.prototype._start = function() {
|
|
630
630
|
var f, h, m = this, g = this.url;
|
|
631
631
|
this._lastEventId && (g.indexOf("?") === -1 ? g += "?" : g += "&", g += "lastEventId=" + encodeURIComponent(this._lastEventId)), this._eventSource = new this.eventSourceClass(g, this._configuration), this._eventSource.onopen = function(B) {
|
|
632
632
|
m._onopen(B);
|
|
@@ -650,9 +650,9 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
650
650
|
throw f.error;
|
|
651
651
|
}
|
|
652
652
|
}
|
|
653
|
-
},
|
|
653
|
+
}, b.prototype._onopen = function(f) {
|
|
654
654
|
this.readyState === 0 && (this.readyState = 1, this.onopen(f));
|
|
655
|
-
},
|
|
655
|
+
}, b.prototype._onerror = function(f) {
|
|
656
656
|
var h = this;
|
|
657
657
|
if (this.readyState === 1 && (this.readyState = 0, this.onerror(f)), this._eventSource) {
|
|
658
658
|
this._eventSource.close(), this._eventSource = null;
|
|
@@ -661,7 +661,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
661
661
|
return h._start();
|
|
662
662
|
}, m);
|
|
663
663
|
}
|
|
664
|
-
},
|
|
664
|
+
}, b.prototype._onevent = function(f) {
|
|
665
665
|
var h, m;
|
|
666
666
|
f && f.lastEventId && (this._lastEventId = f.lastEventId);
|
|
667
667
|
var g = this._listeners[f.type];
|
|
@@ -680,24 +680,24 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
682
|
f.type === "message" && this.onmessage(f);
|
|
683
|
-
},
|
|
684
|
-
},
|
|
685
|
-
},
|
|
686
|
-
},
|
|
683
|
+
}, b.prototype.onopen = function(f) {
|
|
684
|
+
}, b.prototype.onerror = function(f) {
|
|
685
|
+
}, b.prototype.onmessage = function(f) {
|
|
686
|
+
}, b.prototype.close = function() {
|
|
687
687
|
this._timer && (clearTimeout(this._timer), this._timer = null), this._eventSource && (this._eventSource.close(), this._eventSource = null), this.readyState = 2;
|
|
688
|
-
},
|
|
688
|
+
}, b.prototype.addEventListener = function(f, h, m) {
|
|
689
689
|
this._listeners[f] == null && (this._listeners[f] = [], this._eventSource != null && this._eventSource.addEventListener(f, this._onevent_wrapped));
|
|
690
690
|
var g = this._listeners[f];
|
|
691
691
|
g.includes(h) || (this._listeners[f] = _(_([], z(g), !1), [h], !1));
|
|
692
|
-
},
|
|
692
|
+
}, b.prototype.removeEventListener = function(f, h, m) {
|
|
693
693
|
var g = this._listeners[f];
|
|
694
694
|
this._listeners[f] = g.filter(function(S) {
|
|
695
695
|
return S !== h;
|
|
696
696
|
});
|
|
697
|
-
},
|
|
697
|
+
}, b;
|
|
698
698
|
}();
|
|
699
699
|
globalThis.FlagsmithEventSource = typeof EventSource < "u" ? EventSource : null;
|
|
700
|
-
var G = function(
|
|
700
|
+
var G = function(b, f) {
|
|
701
701
|
return f = f || {}, new Promise(function(h, m) {
|
|
702
702
|
var g = new XMLHttpRequest(), S = [], k = [], L = {}, B = function() {
|
|
703
703
|
return { ok: (g.status / 100 | 0) == 2, statusText: g.statusText, status: g.status, url: g.responseURL, text: function() {
|
|
@@ -716,7 +716,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
716
716
|
return O.toLowerCase() in L;
|
|
717
717
|
} } };
|
|
718
718
|
};
|
|
719
|
-
for (var q in g.open(f.method || "get",
|
|
719
|
+
for (var q in g.open(f.method || "get", b, !0), g.onload = function() {
|
|
720
720
|
g.getAllResponseHeaders().replace(/^(.*?):[^\S\n]*([\s\S]*?)$/gm, function(O, W, ee) {
|
|
721
721
|
S.push(W = W.toLowerCase()), k.push([W, ee]), L[W] = L[W] ? L[W] + "," + ee : ee;
|
|
722
722
|
}), h(B());
|
|
@@ -730,7 +730,7 @@ Consider loading an EventSource polyfill and making it available globally as Eve
|
|
|
730
730
|
}, n.default = $, Object.defineProperty(n, "__esModule", { value: !0 });
|
|
731
731
|
});
|
|
732
732
|
})($n, $n.exports);
|
|
733
|
-
var qn = {},
|
|
733
|
+
var qn = {}, bi = function(t, e, n, s, i) {
|
|
734
734
|
var r = new Worker(qn[e] || (qn[e] = URL.createObjectURL(new Blob([
|
|
735
735
|
t + ';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'
|
|
736
736
|
], { type: "text/javascript" }))));
|
|
@@ -880,7 +880,7 @@ var As = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
|
|
|
880
880
|
if (s.code = t, Error.captureStackTrace && Error.captureStackTrace(s, Ps), !n)
|
|
881
881
|
throw s;
|
|
882
882
|
return s;
|
|
883
|
-
},
|
|
883
|
+
}, be = function(t, e, n) {
|
|
884
884
|
n <<= e & 7;
|
|
885
885
|
var s = e / 8 | 0;
|
|
886
886
|
t[s] |= n, t[s + 1] |= n >> 8;
|
|
@@ -906,29 +906,29 @@ var As = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
|
|
|
906
906
|
l = n[n[u].f < n[d].f ? u++ : d++], c = n[u != a && n[u].f < n[d].f ? u++ : d++], n[a++] = { s: -1, f: l.f + c.f, l, r: c };
|
|
907
907
|
for (var p = r[0].s, s = 1; s < i; ++s)
|
|
908
908
|
r[s].s > p && (p = r[s].s);
|
|
909
|
-
var
|
|
909
|
+
var v = new re(p + 1), w = pt(n[a - 1], v, 0);
|
|
910
910
|
if (w > e) {
|
|
911
911
|
var s = 0, y = 0, x = w - e, C = 1 << x;
|
|
912
912
|
for (r.sort(function(D, A) {
|
|
913
|
-
return
|
|
913
|
+
return v[A.s] - v[D.s] || D.f - A.f;
|
|
914
914
|
}); s < i; ++s) {
|
|
915
915
|
var F = r[s].s;
|
|
916
|
-
if (
|
|
917
|
-
y += C - (1 << w -
|
|
916
|
+
if (v[F] > e)
|
|
917
|
+
y += C - (1 << w - v[F]), v[F] = e;
|
|
918
918
|
else
|
|
919
919
|
break;
|
|
920
920
|
}
|
|
921
921
|
for (y >>= x; y > 0; ) {
|
|
922
922
|
var R = r[s].s;
|
|
923
|
-
|
|
923
|
+
v[R] < e ? y -= 1 << e - v[R]++ - 1 : ++s;
|
|
924
924
|
}
|
|
925
925
|
for (; s >= 0 && y; --s) {
|
|
926
926
|
var T = r[s].s;
|
|
927
|
-
|
|
927
|
+
v[T] == e && (--v[T], ++y);
|
|
928
928
|
}
|
|
929
929
|
w = e;
|
|
930
930
|
}
|
|
931
|
-
return { t: new de(
|
|
931
|
+
return { t: new de(v), l: w };
|
|
932
932
|
}, pt = function(t, e, n) {
|
|
933
933
|
return t.s == -1 ? Math.max(pt(t.l, e, n + 1), pt(t.r, e, n + 1)) : e[t.s] = n;
|
|
934
934
|
}, ln = function(t) {
|
|
@@ -965,8 +965,8 @@ var As = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
|
|
|
965
965
|
t[i + r + 4] = n[r];
|
|
966
966
|
return (i + 4 + s) * 8;
|
|
967
967
|
}, un = function(t, e, n, s, i, r, o, l, c, u, a) {
|
|
968
|
-
|
|
969
|
-
for (var d = ct(i, 15), p = d.t,
|
|
968
|
+
be(e, a++, n), ++i[256];
|
|
969
|
+
for (var d = ct(i, 15), p = d.t, v = d.l, w = ct(r, 15), y = w.t, x = w.l, C = ln(p), F = C.c, R = C.n, T = ln(y), N = T.c, D = T.n, A = new re(19), I = 0; I < F.length; ++I)
|
|
970
970
|
++A[F[I] & 31];
|
|
971
971
|
for (var I = 0; I < N.length; ++I)
|
|
972
972
|
++A[N[I] & 31];
|
|
@@ -975,28 +975,28 @@ var As = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
|
|
|
975
975
|
var z = u + 5 << 3, _ = Ue(i, Ne) + Ue(r, tt) + o, M = Ue(i, p) + Ue(r, y) + o + 14 + 3 * j + Ue(A, P) + 2 * A[16] + 3 * A[17] + 7 * A[18];
|
|
976
976
|
if (c >= 0 && z <= _ && z <= M)
|
|
977
977
|
return En(e, a, t.subarray(c, c + u));
|
|
978
|
-
var V, G, $,
|
|
979
|
-
if (
|
|
980
|
-
V = qe(p,
|
|
978
|
+
var V, G, $, b;
|
|
979
|
+
if (be(e, a, 1 + (M < _)), a += 2, M < _) {
|
|
980
|
+
V = qe(p, v, 0), G = p, $ = qe(y, x, 0), b = y;
|
|
981
981
|
var f = qe(P, U, 0);
|
|
982
|
-
|
|
982
|
+
be(e, a, R - 257), be(e, a + 5, D - 1), be(e, a + 10, j - 4), a += 14;
|
|
983
983
|
for (var I = 0; I < j; ++I)
|
|
984
|
-
|
|
984
|
+
be(e, a + 3 * I, P[an[I]]);
|
|
985
985
|
a += 3 * j;
|
|
986
986
|
for (var h = [F, N], m = 0; m < 2; ++m)
|
|
987
987
|
for (var g = h[m], I = 0; I < g.length; ++I) {
|
|
988
988
|
var S = g[I] & 31;
|
|
989
|
-
|
|
989
|
+
be(e, a, f[S]), a += P[S], S > 15 && (be(e, a, g[I] >> 5 & 127), a += g[I] >> 12);
|
|
990
990
|
}
|
|
991
991
|
} else
|
|
992
|
-
V = As, G = Ne, $ = Ms,
|
|
992
|
+
V = As, G = Ne, $ = Ms, b = tt;
|
|
993
993
|
for (var I = 0; I < l; ++I) {
|
|
994
994
|
var k = s[I];
|
|
995
995
|
if (k > 255) {
|
|
996
996
|
var S = k >> 18 & 31;
|
|
997
|
-
ze(e, a, V[S + 257]), a += G[S + 257], S > 7 && (
|
|
997
|
+
ze(e, a, V[S + 257]), a += G[S + 257], S > 7 && (be(e, a, k >> 23 & 31), a += kt[S]);
|
|
998
998
|
var L = k & 31;
|
|
999
|
-
ze(e, a, $[L]), a +=
|
|
999
|
+
ze(e, a, $[L]), a += b[L], L > 3 && (ze(e, a, k >> 5 & 8191), a += Tt[L]);
|
|
1000
1000
|
} else
|
|
1001
1001
|
ze(e, a, V[k]), a += G[k];
|
|
1002
1002
|
}
|
|
@@ -1005,7 +1005,7 @@ var As = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
|
|
|
1005
1005
|
var o = r.z || t.length, l = new de(s + o + 5 * (1 + Math.ceil(o / 7e3)) + i), c = l.subarray(s, l.length - i), u = r.l, a = (r.r || 0) & 7;
|
|
1006
1006
|
if (e) {
|
|
1007
1007
|
a && (c[0] = r.r >> 3);
|
|
1008
|
-
for (var d = Bs[e - 1], p = d >> 13,
|
|
1008
|
+
for (var d = Bs[e - 1], p = d >> 13, v = d & 8191, w = (1 << n) - 1, y = r.p || new re(32768), x = r.h || new re(w + 1), C = Math.ceil(n / 3), F = 2 * C, R = function(ne) {
|
|
1009
1009
|
return (t[ne] ^ t[ne + 1] << C ^ t[ne + 2] << F) & w;
|
|
1010
1010
|
}, T = new xt(25e3), N = new re(288), D = new re(32), A = 0, I = 0, E = r.i || 0, P = 0, U = r.w || 0, j = 0; E + 2 < o; ++E) {
|
|
1011
1011
|
var z = R(E), _ = E & 32767, M = x[z];
|
|
@@ -1018,14 +1018,14 @@ var As = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
|
|
|
1018
1018
|
for (var G = 0; G < 30; ++G)
|
|
1019
1019
|
D[G] = 0;
|
|
1020
1020
|
}
|
|
1021
|
-
var $ = 2,
|
|
1021
|
+
var $ = 2, b = 0, f = v, h = _ - M & 32767;
|
|
1022
1022
|
if (V > 2 && z == R(E - h))
|
|
1023
1023
|
for (var m = Math.min(p, V) - 1, g = Math.min(32767, E), S = Math.min(258, V); h <= g && --f && _ != M; ) {
|
|
1024
1024
|
if (t[E + $] == t[E + $ - h]) {
|
|
1025
1025
|
for (var k = 0; k < S && t[E + k] == t[E + k - h]; ++k)
|
|
1026
1026
|
;
|
|
1027
1027
|
if (k > $) {
|
|
1028
|
-
if ($ = k,
|
|
1028
|
+
if ($ = k, b = h, k > m)
|
|
1029
1029
|
break;
|
|
1030
1030
|
for (var L = Math.min(h, k - 2), B = 0, G = 0; G < L; ++G) {
|
|
1031
1031
|
var q = E - h + G & 32767, O = y[q], W = q - O & 32767;
|
|
@@ -1035,9 +1035,9 @@ var As = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
|
|
|
1035
1035
|
}
|
|
1036
1036
|
_ = M, M = y[_], h += _ - M & 32767;
|
|
1037
1037
|
}
|
|
1038
|
-
if (
|
|
1039
|
-
T[P++] = 268435456 | dt[$] << 18 | cn[
|
|
1040
|
-
var ee = dt[$] & 31, oe = cn[
|
|
1038
|
+
if (b) {
|
|
1039
|
+
T[P++] = 268435456 | dt[$] << 18 | cn[b];
|
|
1040
|
+
var ee = dt[$] & 31, oe = cn[b] & 31;
|
|
1041
1041
|
I += kt[ee] + Tt[oe], ++N[257 + ee], ++D[oe], U = E + $, ++A;
|
|
1042
1042
|
} else
|
|
1043
1043
|
T[P++] = t[E], ++N[t[E]];
|
|
@@ -1119,9 +1119,9 @@ var As = /* @__PURE__ */ qe(Ne, 9, 0), Ms = /* @__PURE__ */ qe(tt, 5, 0), Tn = f
|
|
|
1119
1119
|
nt[n] = { c: Wn(t[o], i, r), e: r };
|
|
1120
1120
|
}
|
|
1121
1121
|
var c = xi({}, nt[n].e);
|
|
1122
|
-
return
|
|
1122
|
+
return bi(nt[n].c + ";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage=" + e.toString() + "}", n, c, ki(c), s);
|
|
1123
1123
|
}, Ei = function() {
|
|
1124
|
-
return [de, re, xt, kt, Tt, an, dt, cn, As, Ne, Ms, tt, ft, Bs, In, qe,
|
|
1124
|
+
return [de, re, xt, kt, Tt, an, dt, cn, As, Ne, Ms, tt, ft, Bs, In, qe, be, ze, ct, pt, ln, Ue, En, un, Tn, Fs, js, Cn, _i, Hs];
|
|
1125
1125
|
}, Ii = function() {
|
|
1126
1126
|
return [$s, qs, gt, Us, zs];
|
|
1127
1127
|
}, Hs = function(t) {
|
|
@@ -1948,7 +1948,7 @@ function pn(t, e, n, s) {
|
|
|
1948
1948
|
s
|
|
1949
1949
|
];
|
|
1950
1950
|
}
|
|
1951
|
-
function
|
|
1951
|
+
function vt(t, e, n, s, i, r, o, l, c) {
|
|
1952
1952
|
return [
|
|
1953
1953
|
83,
|
|
1954
1954
|
t,
|
|
@@ -1973,7 +1973,7 @@ function mr(t, e, n, s, i, r) {
|
|
|
1973
1973
|
r
|
|
1974
1974
|
];
|
|
1975
1975
|
}
|
|
1976
|
-
function
|
|
1976
|
+
function vr(t, e, n, s, i, r) {
|
|
1977
1977
|
return [
|
|
1978
1978
|
112,
|
|
1979
1979
|
t,
|
|
@@ -1992,7 +1992,7 @@ function ss(t, e, n) {
|
|
|
1992
1992
|
n
|
|
1993
1993
|
];
|
|
1994
1994
|
}
|
|
1995
|
-
function
|
|
1995
|
+
function br(t) {
|
|
1996
1996
|
return [
|
|
1997
1997
|
114,
|
|
1998
1998
|
t
|
|
@@ -2493,7 +2493,7 @@ function H(t, e, n, s, i) {
|
|
|
2493
2493
|
const r = document.createElement(t);
|
|
2494
2494
|
return r.className = e, Object.assign(r.style, n), s && (r.textContent = s), i && (r.id = i), r;
|
|
2495
2495
|
}
|
|
2496
|
-
const ut = "or_uxt_test_start", mn = "or_uxt_task_index",
|
|
2496
|
+
const ut = "or_uxt_test_start", mn = "or_uxt_task_index", vn = "or_uxt_session_id", qr = "or_uxt_test_id";
|
|
2497
2497
|
class Wr {
|
|
2498
2498
|
constructor(e, n, s, i, r, o, l, c, u) {
|
|
2499
2499
|
this.ingestPoint = e, this.getTimestamp = n, this.token = s, this.testId = i, this.storageKey = r, this.setStorageKey = o, this.removeStorageKey = l, this.getStorageKey = c, this.getSessionId = u, this.durations = {
|
|
@@ -2501,7 +2501,7 @@ class Wr {
|
|
|
2501
2501
|
tasks: []
|
|
2502
2502
|
}, this.getDurations = () => this.durations, this.setDurations = (d) => {
|
|
2503
2503
|
this.durations.testStart = d.testStart, this.durations.tasks = d.tasks;
|
|
2504
|
-
}, this.signalTask = (d, p,
|
|
2504
|
+
}, this.signalTask = (d, p, v) => {
|
|
2505
2505
|
if (!d)
|
|
2506
2506
|
return console.error("User Testing: No Task ID Given");
|
|
2507
2507
|
const w = this.durations.tasks.find((C) => C.taskId === d), y = this.getTimestamp(), x = w ? y - w.started : 0;
|
|
@@ -2517,17 +2517,17 @@ class Wr {
|
|
|
2517
2517
|
status: p,
|
|
2518
2518
|
duration: x,
|
|
2519
2519
|
timestamp: y,
|
|
2520
|
-
taskAnswer:
|
|
2520
|
+
taskAnswer: v
|
|
2521
2521
|
})
|
|
2522
2522
|
});
|
|
2523
2523
|
}, this.signalTest = (d) => {
|
|
2524
2524
|
const p = this.getTimestamp();
|
|
2525
2525
|
if (d === "begin" && this.testId) {
|
|
2526
2526
|
const y = this.getSessionId();
|
|
2527
|
-
this.setStorageKey(
|
|
2527
|
+
this.setStorageKey(vn, y), this.setStorageKey(this.storageKey, this.testId.toString()), this.setStorageKey(ut, p.toString());
|
|
2528
2528
|
} else
|
|
2529
2529
|
this.removeStorageKey(this.storageKey), this.removeStorageKey(mn), this.removeStorageKey(ut);
|
|
2530
|
-
const
|
|
2530
|
+
const v = this.durations.testStart || p, w = p - v;
|
|
2531
2531
|
return fetch(`${this.ingestPoint}/v1/web/uxt/signals/test`, {
|
|
2532
2532
|
method: "POST",
|
|
2533
2533
|
headers: {
|
|
@@ -2562,8 +2562,8 @@ class Vr {
|
|
|
2562
2562
|
});
|
|
2563
2563
|
}, this.hideTaskSection = () => !1, this.showTaskSection = () => !0, this.collapseWidget = () => !1, this.removeGreeting = () => !1, this.toggleDescriptionVisibility = () => {
|
|
2564
2564
|
}, this.currentTaskIndex = 0, this.userRecorder = new Br(e);
|
|
2565
|
-
const s = this.app.getSessionID(), i = this.app.localStorage.getItem(
|
|
2566
|
-
s !== i && (this.app.localStorage.removeItem(this.storageKey), this.app.localStorage.removeItem(
|
|
2565
|
+
const s = this.app.getSessionID(), i = this.app.localStorage.getItem(vn);
|
|
2566
|
+
s !== i && (this.app.localStorage.removeItem(this.storageKey), this.app.localStorage.removeItem(vn), this.app.localStorage.removeItem(qr), this.app.localStorage.removeItem(mn), this.app.localStorage.removeItem(ut));
|
|
2567
2567
|
const r = this.app.localStorage.getItem(mn);
|
|
2568
2568
|
r && (this.currentTaskIndex = parseInt(r, 10));
|
|
2569
2569
|
}
|
|
@@ -2647,11 +2647,11 @@ class Vr {
|
|
|
2647
2647
|
}, c.onclick = () => {
|
|
2648
2648
|
var a, d, p;
|
|
2649
2649
|
if (u(), this.test) {
|
|
2650
|
-
const
|
|
2651
|
-
|
|
2650
|
+
const v = (a = this.signalManager) == null ? void 0 : a.getDurations(), w = v ? v.tasks.findIndex((y) => this.test && y.taskId === this.test.tasks[0].task_id) : null;
|
|
2651
|
+
v && w === -1 && (v.tasks.push({
|
|
2652
2652
|
taskId: this.test.tasks[0].task_id,
|
|
2653
2653
|
started: this.app.timestamp()
|
|
2654
|
-
}), (d = this.signalManager) == null || d.setDurations(
|
|
2654
|
+
}), (d = this.signalManager) == null || d.setDurations(v)), (p = this.signalManager) == null || p.signalTask(this.test.tasks[0].task_id, "begin");
|
|
2655
2655
|
}
|
|
2656
2656
|
this.showTaskSection(), o.removeChild(c);
|
|
2657
2657
|
}, n;
|
|
@@ -2664,10 +2664,10 @@ class Vr {
|
|
|
2664
2664
|
lineHeight: "auto"
|
|
2665
2665
|
}, "Tasks"), r = H("div", "icon", os, "-"), o = H("div", "content", Be), l = H("div", "pagination", Dr), c = H("div", "taskCard", us), u = H("div", "taskText", hs), a = H("div", "taskDescription", Ar), d = H("div", "taskButtons", Fr), p = H("div", "taskText", hs);
|
|
2666
2666
|
p.textContent = "Your answer";
|
|
2667
|
-
const
|
|
2667
|
+
const v = H("textarea", "taskDescription", {
|
|
2668
2668
|
resize: "vertical"
|
|
2669
2669
|
}), w = H("div", "inputArea", us);
|
|
2670
|
-
w.append(p,
|
|
2670
|
+
w.append(p, v);
|
|
2671
2671
|
const y = H("div", "closePanelButton", Zs, "Collapse Panel"), x = H("div", "nextButton", Mr, "Done, Next");
|
|
2672
2672
|
s.append(i, r), c.append(u, a), d.append(y, x), o.append(l, c, w, d), n.append(s, o);
|
|
2673
2673
|
const C = () => {
|
|
@@ -2704,8 +2704,8 @@ class Vr {
|
|
|
2704
2704
|
};
|
|
2705
2705
|
return s.onclick = F, y.onclick = this.collapseWidget, x.onclick = () => {
|
|
2706
2706
|
var N, D, A, I;
|
|
2707
|
-
const T = e[this.currentTaskIndex].allow_typing ?
|
|
2708
|
-
if (
|
|
2707
|
+
const T = e[this.currentTaskIndex].allow_typing ? v.value : void 0;
|
|
2708
|
+
if (v.value = "", (N = this.signalManager) == null || N.signalTask(e[this.currentTaskIndex].task_id, "done", T), this.currentTaskIndex < e.length - 1) {
|
|
2709
2709
|
this.currentTaskIndex++, C();
|
|
2710
2710
|
const E = (D = this.signalManager) == null ? void 0 : D.getDurations();
|
|
2711
2711
|
E && E.tasks.findIndex((P) => P.taskId === e[this.currentTaskIndex].task_id) === -1 && (E.tasks.push({
|
|
@@ -2742,7 +2742,7 @@ We appreciate your time and valuable input.`), r = H("div", "end_button_or", as,
|
|
|
2742
2742
|
function ei(t) {
|
|
2743
2743
|
return !!t && t.nodeType != null;
|
|
2744
2744
|
}
|
|
2745
|
-
function
|
|
2745
|
+
function bn(t) {
|
|
2746
2746
|
return t.namespaceURI === "http://www.w3.org/2000/svg";
|
|
2747
2747
|
}
|
|
2748
2748
|
function ke(t) {
|
|
@@ -2754,7 +2754,7 @@ function Gr(t) {
|
|
|
2754
2754
|
function yn(t) {
|
|
2755
2755
|
return t.nodeType === Node.TEXT_NODE;
|
|
2756
2756
|
}
|
|
2757
|
-
function
|
|
2757
|
+
function bt(t) {
|
|
2758
2758
|
return t.nodeType === Node.DOCUMENT_NODE;
|
|
2759
2759
|
}
|
|
2760
2760
|
function Et(t) {
|
|
@@ -2989,7 +2989,7 @@ class Rn {
|
|
|
2989
2989
|
this.commited.length = 0, this.recents.clear(), this.indexes.length = 1, this.attributesMap.clear(), this.textSet.clear();
|
|
2990
2990
|
}
|
|
2991
2991
|
sendNodeAttribute(e, n, s, i) {
|
|
2992
|
-
if (
|
|
2992
|
+
if (bn(n)) {
|
|
2993
2993
|
s.substr(0, 6) === "xlink:" && (s = s.substr(6)), i === null ? this.app.send(Yn(e, s)) : s === "href" ? (i.length > 1e5 && (i = ""), this.app.send(hn(e, s, i, this.app.getBaseHref()))) : this.app.attributeSender.sendSetAttribute(e, s, i);
|
|
2994
2994
|
return;
|
|
2995
2995
|
}
|
|
@@ -3090,7 +3090,7 @@ class Rn {
|
|
|
3090
3090
|
const d = a.clientWidth, p = a.clientHeight;
|
|
3091
3091
|
a = n.cloneNode(), a.style.width = `${d}px`, a.style.height = `${p}px`;
|
|
3092
3092
|
}
|
|
3093
|
-
this.app.send(Gi(e, i, c, a.tagName,
|
|
3093
|
+
this.app.send(Gi(e, i, c, a.tagName, bn(n)));
|
|
3094
3094
|
}
|
|
3095
3095
|
for (let d = 0; d < a.attributes.length; d++) {
|
|
3096
3096
|
const p = a.attributes[d];
|
|
@@ -3521,11 +3521,11 @@ let lo = class {
|
|
|
3521
3521
|
const u = (a) => {
|
|
3522
3522
|
const { data: d } = a;
|
|
3523
3523
|
if (d.line === ue.iframeSignal) {
|
|
3524
|
-
const p = d.domain,
|
|
3525
|
-
this.pageFrames =
|
|
3524
|
+
const p = d.domain, v = Array.from(document.querySelectorAll("iframe"));
|
|
3525
|
+
this.pageFrames = v, (async () => {
|
|
3526
3526
|
let y = 0;
|
|
3527
3527
|
for (; y < 10; ) {
|
|
3528
|
-
const x = this.checkNodeId(
|
|
3528
|
+
const x = this.checkNodeId(v, p);
|
|
3529
3529
|
if (x) {
|
|
3530
3530
|
this.waitStarted().then(() => {
|
|
3531
3531
|
var R;
|
|
@@ -3547,7 +3547,7 @@ let lo = class {
|
|
|
3547
3547
|
})();
|
|
3548
3548
|
}
|
|
3549
3549
|
if (d.line === ue.iframeBatch) {
|
|
3550
|
-
const
|
|
3550
|
+
const v = d.messages.map((w) => {
|
|
3551
3551
|
if (w[0] === 20) {
|
|
3552
3552
|
let y = w;
|
|
3553
3553
|
return this.pageFrames.forEach((x) => {
|
|
@@ -3576,7 +3576,7 @@ let lo = class {
|
|
|
3576
3576
|
}
|
|
3577
3577
|
return w;
|
|
3578
3578
|
});
|
|
3579
|
-
this.messages.push(...
|
|
3579
|
+
this.messages.push(...v);
|
|
3580
3580
|
}
|
|
3581
3581
|
};
|
|
3582
3582
|
window.addEventListener("message", u), this.attachStopCallback(() => {
|
|
@@ -3837,7 +3837,7 @@ let lo = class {
|
|
|
3837
3837
|
}, 30 * s), r();
|
|
3838
3838
|
}
|
|
3839
3839
|
async setupConditionalStart(e) {
|
|
3840
|
-
var p,
|
|
3840
|
+
var p, v;
|
|
3841
3841
|
this.conditionsManager = new Li(this, e);
|
|
3842
3842
|
const n = await fetch(this.options.ingestPoint + "/v1/web/start", {
|
|
3843
3843
|
method: "POST",
|
|
@@ -3878,7 +3878,7 @@ let lo = class {
|
|
|
3878
3878
|
userState: u
|
|
3879
3879
|
});
|
|
3880
3880
|
const d = { sessionToken: s, userUUID: "", sessionID: "" };
|
|
3881
|
-
this.startCallbacks.forEach((w) => w(d)), await ((p = this.conditionsManager) == null ? void 0 : p.fetchConditions(a, s)), await this.featureFlags.reloadFlags(s), await this.tagWatcher.fetchTags(this.options.ingestPoint, s), (
|
|
3881
|
+
this.startCallbacks.forEach((w) => w(d)), await ((p = this.conditionsManager) == null ? void 0 : p.fetchConditions(a, s)), await this.featureFlags.reloadFlags(s), await this.tagWatcher.fetchTags(this.options.ingestPoint, s), (v = this.conditionsManager) == null || v.processFlags(this.featureFlags.flags);
|
|
3882
3882
|
}
|
|
3883
3883
|
/**
|
|
3884
3884
|
* Starts offline session recording
|
|
@@ -3935,7 +3935,7 @@ let lo = class {
|
|
|
3935
3935
|
* @reject {string} - error message
|
|
3936
3936
|
* */
|
|
3937
3937
|
async uploadOfflineRecording() {
|
|
3938
|
-
var p,
|
|
3938
|
+
var p, v;
|
|
3939
3939
|
this.stop(!1);
|
|
3940
3940
|
const e = pe();
|
|
3941
3941
|
(p = this.worker) == null || p.postMessage({
|
|
@@ -3965,7 +3965,7 @@ let lo = class {
|
|
|
3965
3965
|
timezone: tn()
|
|
3966
3966
|
})
|
|
3967
3967
|
}), { token: s, userBrowser: i, userCity: r, userCountry: o, userDevice: l, userOS: c, userState: u, beaconSizeLimit: a, projectID: d } = await n.json();
|
|
3968
|
-
for ((
|
|
3968
|
+
for ((v = this.worker) == null || v.postMessage({
|
|
3969
3969
|
type: "auth",
|
|
3970
3970
|
token: s,
|
|
3971
3971
|
beaconSizeLimit: a
|
|
@@ -4041,7 +4041,7 @@ let lo = class {
|
|
|
4041
4041
|
userUUID: a,
|
|
4042
4042
|
projectID: d,
|
|
4043
4043
|
beaconSizeLimit: p,
|
|
4044
|
-
compressionThreshold:
|
|
4044
|
+
compressionThreshold: v,
|
|
4045
4045
|
// how big the batch should be before we decide to compress it
|
|
4046
4046
|
delay: w,
|
|
4047
4047
|
// derived from token
|
|
@@ -4079,7 +4079,7 @@ let lo = class {
|
|
|
4079
4079
|
type: "auth",
|
|
4080
4080
|
token: u,
|
|
4081
4081
|
beaconSizeLimit: p
|
|
4082
|
-
}), !l && u === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(lt(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([_, M]) => this.send(Qn(_, M))), this.localStorage.setItem(this.options.local_uuid_key, a), this.compressionThreshold =
|
|
4082
|
+
}), !l && u === o && (this.debug.log("continuing session on new tab", this.session.getTabId()), this.send(lt(this.session.getTabId()))), Object.entries(this.session.getInfo().metadata).forEach(([_, M]) => this.send(Qn(_, M))), this.localStorage.setItem(this.options.local_uuid_key, a), this.compressionThreshold = v;
|
|
4083
4083
|
const U = { sessionToken: u, userUUID: a, sessionID: y };
|
|
4084
4084
|
if (this.startCallbacks.forEach((_) => _(U)), this.featureFlags.reloadFlags(), await this.tagWatcher.fetchTags(this.options.ingestPoint, u), this.activityState = Q.Active, A && !this.options.canvas.disableCanvas && (this.canvasRecorder = this.canvasRecorder ?? new Kr(this, {
|
|
4085
4085
|
fps: E,
|
|
@@ -4243,10 +4243,10 @@ function po(t) {
|
|
|
4243
4243
|
}
|
|
4244
4244
|
})), t.map(ms).join(" ");
|
|
4245
4245
|
}
|
|
4246
|
-
const
|
|
4246
|
+
const vs = ["log", "info", "warn", "error", "debug", "assert"];
|
|
4247
4247
|
function go(t, e) {
|
|
4248
4248
|
const n = Object.assign({
|
|
4249
|
-
consoleMethods:
|
|
4249
|
+
consoleMethods: vs,
|
|
4250
4250
|
consoleThrottling: 30
|
|
4251
4251
|
}, e);
|
|
4252
4252
|
if (!Array.isArray(n.consoleMethods) || n.consoleMethods.length === 0)
|
|
@@ -4259,12 +4259,12 @@ function go(t, e) {
|
|
|
4259
4259
|
t.attachStartCallback(r), t.ticker.attach(r, 33, !1);
|
|
4260
4260
|
const o = (c, u) => {
|
|
4261
4261
|
const a = {
|
|
4262
|
-
apply: function(d, p,
|
|
4263
|
-
Reflect.apply(d, u,
|
|
4262
|
+
apply: function(d, p, v) {
|
|
4263
|
+
Reflect.apply(d, u, v), i = i + 1, !(i > n.consoleThrottling) && s(d.name, v);
|
|
4264
4264
|
}
|
|
4265
4265
|
};
|
|
4266
4266
|
n.consoleMethods.forEach((d) => {
|
|
4267
|
-
if (
|
|
4267
|
+
if (vs.indexOf(d) === -1) {
|
|
4268
4268
|
t.debug.error(`OpenReplay: unsupported console method "${d}"`);
|
|
4269
4269
|
return;
|
|
4270
4270
|
}
|
|
@@ -4274,9 +4274,9 @@ function go(t, e) {
|
|
|
4274
4274
|
}, l = t.safe((c) => o(c.console, c));
|
|
4275
4275
|
l(window), t.observer.attachContextCallback(l);
|
|
4276
4276
|
}
|
|
4277
|
-
var si = { exports: {} }, nn = { exports: {} },
|
|
4277
|
+
var si = { exports: {} }, nn = { exports: {} }, bs;
|
|
4278
4278
|
function mo() {
|
|
4279
|
-
return
|
|
4279
|
+
return bs || (bs = 1, function(t, e) {
|
|
4280
4280
|
(function(n, s) {
|
|
4281
4281
|
t.exports = s();
|
|
4282
4282
|
})($e, function() {
|
|
@@ -4339,14 +4339,14 @@ function mo() {
|
|
|
4339
4339
|
this[y] = !!x;
|
|
4340
4340
|
};
|
|
4341
4341
|
}(r[p]);
|
|
4342
|
-
for (var
|
|
4343
|
-
d.prototype["get" + s(o[
|
|
4342
|
+
for (var v = 0; v < o.length; v++)
|
|
4343
|
+
d.prototype["get" + s(o[v])] = i(o[v]), d.prototype["set" + s(o[v])] = /* @__PURE__ */ function(y) {
|
|
4344
4344
|
return function(x) {
|
|
4345
4345
|
if (!n(x))
|
|
4346
4346
|
throw new TypeError(y + " must be a Number");
|
|
4347
4347
|
this[y] = Number(x);
|
|
4348
4348
|
};
|
|
4349
|
-
}(o[
|
|
4349
|
+
}(o[v]);
|
|
4350
4350
|
for (var w = 0; w < l.length; w++)
|
|
4351
4351
|
d.prototype["get" + s(l[w])] = i(l[w]), d.prototype["set" + s(l[w])] = /* @__PURE__ */ function(y) {
|
|
4352
4352
|
return function(x) {
|
|
@@ -4394,12 +4394,12 @@ function mo() {
|
|
|
4394
4394
|
a.indexOf("(eval ") > -1 && (a = a.replace(/eval code/g, "eval").replace(/(\(eval at [^()]*)|(,.*$)/g, ""));
|
|
4395
4395
|
var d = a.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), p = d.match(/ (\(.+\)$)/);
|
|
4396
4396
|
d = p ? d.replace(p[0], "") : d;
|
|
4397
|
-
var
|
|
4397
|
+
var v = this.extractLocation(p ? p[1] : d), w = p && d || void 0, y = ["eval", "<anonymous>"].indexOf(v[0]) > -1 ? void 0 : v[0];
|
|
4398
4398
|
return new s({
|
|
4399
4399
|
functionName: w,
|
|
4400
4400
|
fileName: y,
|
|
4401
|
-
lineNumber:
|
|
4402
|
-
columnNumber:
|
|
4401
|
+
lineNumber: v[1],
|
|
4402
|
+
columnNumber: v[2],
|
|
4403
4403
|
source: a
|
|
4404
4404
|
});
|
|
4405
4405
|
}, this);
|
|
@@ -4414,9 +4414,9 @@ function mo() {
|
|
|
4414
4414
|
return new s({
|
|
4415
4415
|
functionName: a
|
|
4416
4416
|
});
|
|
4417
|
-
var d = /((.*".+"[^@]*)?[^@]*)(?:@)/, p = a.match(d),
|
|
4417
|
+
var d = /((.*".+"[^@]*)?[^@]*)(?:@)/, p = a.match(d), v = p && p[1] ? p[1] : void 0, w = this.extractLocation(a.replace(d, ""));
|
|
4418
4418
|
return new s({
|
|
4419
|
-
functionName:
|
|
4419
|
+
functionName: v,
|
|
4420
4420
|
fileName: w[0],
|
|
4421
4421
|
lineNumber: w[1],
|
|
4422
4422
|
columnNumber: w[2],
|
|
@@ -4432,7 +4432,7 @@ function mo() {
|
|
|
4432
4432
|
},
|
|
4433
4433
|
parseOpera9: function(c) {
|
|
4434
4434
|
for (var u = /Line (\d+).*script (?:in )?(\S+)/i, a = c.message.split(`
|
|
4435
|
-
`), d = [], p = 2,
|
|
4435
|
+
`), d = [], p = 2, v = a.length; p < v; p += 2) {
|
|
4436
4436
|
var w = u.exec(a[p]);
|
|
4437
4437
|
w && d.push(new s({
|
|
4438
4438
|
fileName: w[2],
|
|
@@ -4444,7 +4444,7 @@ function mo() {
|
|
|
4444
4444
|
},
|
|
4445
4445
|
parseOpera10: function(c) {
|
|
4446
4446
|
for (var u = /Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i, a = c.stacktrace.split(`
|
|
4447
|
-
`), d = [], p = 0,
|
|
4447
|
+
`), d = [], p = 0, v = a.length; p < v; p += 2) {
|
|
4448
4448
|
var w = u.exec(a[p]);
|
|
4449
4449
|
w && d.push(
|
|
4450
4450
|
new s({
|
|
@@ -4464,8 +4464,8 @@ function mo() {
|
|
|
4464
4464
|
return !!a.match(i) && !a.match(/^Error created at/);
|
|
4465
4465
|
}, this);
|
|
4466
4466
|
return u.map(function(a) {
|
|
4467
|
-
var d = a.split("@"), p = this.extractLocation(d.pop()),
|
|
4468
|
-
|
|
4467
|
+
var d = a.split("@"), p = this.extractLocation(d.pop()), v = d.shift() || "", w = v.replace(/<anonymous function(: (\w+))?>/, "$2").replace(/\([^)]*\)/g, "") || void 0, y;
|
|
4468
|
+
v.match(/\(([^)]*)\)/) && (y = v.replace(/^[^(]+\(([^)]*)\)$/, "$1"));
|
|
4469
4469
|
var x = y === void 0 || y === "[arguments not available]" ? void 0 : y.split(",");
|
|
4470
4470
|
return new s({
|
|
4471
4471
|
functionName: w,
|
|
@@ -4480,8 +4480,8 @@ function mo() {
|
|
|
4480
4480
|
};
|
|
4481
4481
|
});
|
|
4482
4482
|
})(si);
|
|
4483
|
-
var
|
|
4484
|
-
const
|
|
4483
|
+
var vo = si.exports;
|
|
4484
|
+
const bo = /* @__PURE__ */ vi(vo);
|
|
4485
4485
|
function ys(t) {
|
|
4486
4486
|
return [
|
|
4487
4487
|
{
|
|
@@ -4496,7 +4496,7 @@ function ys(t) {
|
|
|
4496
4496
|
function wt(t, e, n = {}) {
|
|
4497
4497
|
let s = e;
|
|
4498
4498
|
try {
|
|
4499
|
-
s =
|
|
4499
|
+
s = bo.parse(t);
|
|
4500
4500
|
} catch {
|
|
4501
4501
|
}
|
|
4502
4502
|
return pn(t.name, t.message, JSON.stringify(s), JSON.stringify(n));
|
|
@@ -4640,10 +4640,10 @@ function Co(t, e) {
|
|
|
4640
4640
|
obscureInputDates: !1
|
|
4641
4641
|
}, e);
|
|
4642
4642
|
function s(a, d) {
|
|
4643
|
-
let p = d.value,
|
|
4644
|
-
d.type === "password" || t.sanitizer.isHidden(a) ?
|
|
4643
|
+
let p = d.value, v = n.defaultInputMode;
|
|
4644
|
+
d.type === "password" || t.sanitizer.isHidden(a) ? v = je.Hidden : (t.sanitizer.isObscured(a) || v === je.Plain && (n.obscureInputNumbers && d.type !== "date" && /\d\d\d\d/.test(p) || n.obscureInputDates && d.type === "date" || n.obscureInputEmails && (d.type === "email" || ~p.indexOf("@")))) && (v = je.Obscured);
|
|
4645
4645
|
let w = 0;
|
|
4646
|
-
switch (
|
|
4646
|
+
switch (v) {
|
|
4647
4647
|
case je.Hidden:
|
|
4648
4648
|
w = -1, p = "";
|
|
4649
4649
|
break;
|
|
@@ -4654,8 +4654,8 @@ function Co(t, e) {
|
|
|
4654
4654
|
return { value: p, mask: w };
|
|
4655
4655
|
}
|
|
4656
4656
|
function i(a, d) {
|
|
4657
|
-
const { value: p, mask:
|
|
4658
|
-
t.send(Zi(a, p,
|
|
4657
|
+
const { value: p, mask: v } = s(a, d);
|
|
4658
|
+
t.send(Zi(a, p, v));
|
|
4659
4659
|
}
|
|
4660
4660
|
const r = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
4661
4661
|
t.attachStopCallback(() => {
|
|
@@ -4680,22 +4680,22 @@ function Co(t, e) {
|
|
|
4680
4680
|
c(d, p.checked);
|
|
4681
4681
|
});
|
|
4682
4682
|
}, 3);
|
|
4683
|
-
function u(a, d, p,
|
|
4683
|
+
function u(a, d, p, v) {
|
|
4684
4684
|
const { value: w, mask: y } = s(a, d), x = ri(d);
|
|
4685
|
-
t.send(
|
|
4685
|
+
t.send(vr(a, w, y !== 0, x, p, v));
|
|
4686
4686
|
}
|
|
4687
4687
|
t.nodes.attachNodeCallback(t.safe((a) => {
|
|
4688
4688
|
const d = t.nodes.getID(a);
|
|
4689
4689
|
if (d !== void 0) {
|
|
4690
4690
|
if (Z(a, "select") && (i(d, a), t.nodes.attachNodeListener(a, "change", () => i(d, a))), To(a)) {
|
|
4691
4691
|
l(d, a);
|
|
4692
|
-
let p = 0,
|
|
4692
|
+
let p = 0, v = 0, w = 0;
|
|
4693
4693
|
const y = () => {
|
|
4694
4694
|
p = pe();
|
|
4695
4695
|
}, x = () => {
|
|
4696
|
-
|
|
4696
|
+
v === 0 && p !== 0 && (v = pe() - p);
|
|
4697
4697
|
}, C = () => {
|
|
4698
|
-
p !== 0 && (w = pe() - p), u(d, a,
|
|
4698
|
+
p !== 0 && (w = pe() - p), u(d, a, v, w), v = 0, w = 0, p = 0;
|
|
4699
4699
|
};
|
|
4700
4700
|
t.nodes.attachNodeListener(a, "focus", y), t.nodes.attachNodeListener(a, "input", x), t.nodes.attachNodeListener(a, "change", C);
|
|
4701
4701
|
return;
|
|
@@ -4905,7 +4905,7 @@ function Bo(t, e) {
|
|
|
4905
4905
|
return null;
|
|
4906
4906
|
n = n.parentElement;
|
|
4907
4907
|
}
|
|
4908
|
-
if (
|
|
4908
|
+
if (bn(t)) {
|
|
4909
4909
|
let s = t.ownerSVGElement;
|
|
4910
4910
|
for (; s !== null; )
|
|
4911
4911
|
t = s, s = s.ownerSVGElement;
|
|
@@ -4934,16 +4934,16 @@ function jo(t, e) {
|
|
|
4934
4934
|
}
|
|
4935
4935
|
return "";
|
|
4936
4936
|
}
|
|
4937
|
-
let i = -1, r = -1, o = !1, l = null, c = 0, u = {}, a = 0, d = 0, p = 0,
|
|
4937
|
+
let i = -1, r = -1, o = !1, l = null, c = 0, u = {}, a = 0, d = 0, p = 0, v = 0, w;
|
|
4938
4938
|
const y = 8e-3, x = 225;
|
|
4939
4939
|
function C() {
|
|
4940
|
-
const T =
|
|
4940
|
+
const T = v / x;
|
|
4941
4941
|
if (!a) {
|
|
4942
4942
|
a = T;
|
|
4943
4943
|
return;
|
|
4944
4944
|
}
|
|
4945
4945
|
const N = (T - a) / x;
|
|
4946
|
-
p > 4 && N > y && t.send(
|
|
4946
|
+
p > 4 && N > y && t.send(br(pe())), v = 0, p = 0, a = T;
|
|
4947
4947
|
}
|
|
4948
4948
|
t.attachStartCallback(() => {
|
|
4949
4949
|
w = setInterval(() => C(), x);
|
|
@@ -4964,7 +4964,7 @@ function jo(t, e) {
|
|
|
4964
4964
|
const [E, P] = t.observer.getDocumentOffset(T);
|
|
4965
4965
|
i = I.clientX + E, r = I.clientY + P, o = !0;
|
|
4966
4966
|
const U = Math.sign(I.movementX);
|
|
4967
|
-
|
|
4967
|
+
v += Math.abs(I.movementX) + Math.abs(I.movementY), U !== d && (d = U, p++);
|
|
4968
4968
|
}, !1), A(T, "click", (I) => {
|
|
4969
4969
|
const E = Ts(I.target, T);
|
|
4970
4970
|
if (!I.clientX && !I.clientY || E === null)
|
|
@@ -4978,7 +4978,7 @@ function jo(t, e) {
|
|
|
4978
4978
|
});
|
|
4979
4979
|
};
|
|
4980
4980
|
t.nodes.attachNodeCallback((T) => {
|
|
4981
|
-
|
|
4981
|
+
bt(T) && R(T);
|
|
4982
4982
|
}), R(document, !0), t.ticker.attach(F, (e == null ? void 0 : e.trackingOffset) || 7);
|
|
4983
4983
|
}
|
|
4984
4984
|
function Es(t) {
|
|
@@ -5004,8 +5004,8 @@ function zo(t) {
|
|
|
5004
5004
|
const c = r.getBoundingClientRect(), u = Math.max(c.top, 0), a = Math.max(c.left, 0), d = Math.min(c.bottom, window.innerHeight || document.documentElement && document.documentElement.clientHeight || 0), p = Math.min(c.right, window.innerWidth || document.documentElement && document.documentElement.clientWidth || 0);
|
|
5005
5005
|
if (d <= u || p <= a)
|
|
5006
5006
|
continue;
|
|
5007
|
-
const
|
|
5008
|
-
e.push({ time: l, area:
|
|
5007
|
+
const v = (d - u) * (p - a);
|
|
5008
|
+
e.push({ time: l, area: v });
|
|
5009
5009
|
}
|
|
5010
5010
|
return e;
|
|
5011
5011
|
}
|
|
@@ -5082,24 +5082,24 @@ function Ho(t, e) {
|
|
|
5082
5082
|
navigationStart: a,
|
|
5083
5083
|
requestStart: d,
|
|
5084
5084
|
responseStart: p,
|
|
5085
|
-
responseEnd:
|
|
5085
|
+
responseEnd: v,
|
|
5086
5086
|
domContentLoadedEventStart: w,
|
|
5087
5087
|
domContentLoadedEventEnd: y,
|
|
5088
5088
|
loadEventStart: x,
|
|
5089
5089
|
loadEventEnd: C
|
|
5090
5090
|
} = performance.timing;
|
|
5091
|
-
t.send(sr(d - a || 0, p - a || 0,
|
|
5091
|
+
t.send(sr(d - a || 0, p - a || 0, v - a || 0, w - a || 0, y - a || 0, x - a || 0, C - a || 0, l, c));
|
|
5092
5092
|
}
|
|
5093
5093
|
}, 30);
|
|
5094
5094
|
}
|
|
5095
5095
|
if (n.capturePageRenderTimings) {
|
|
5096
|
-
let u = 0, a = 0, d = 0, p = null,
|
|
5096
|
+
let u = 0, a = 0, d = 0, p = null, v = !1;
|
|
5097
5097
|
t.ticker.attach(() => {
|
|
5098
|
-
if (
|
|
5098
|
+
if (v)
|
|
5099
5099
|
return;
|
|
5100
5100
|
const w = performance.now();
|
|
5101
5101
|
if (s !== null && (u = Math.max.apply(null, Object.keys(s).map((y) => s[y])), w - u > 1e3 && (p = zo(s), s = null)), d !== null && (w - d > 50 && (a = w), d = w - a > 5e3 ? null : w), p !== null && d === null || w > 3e4) {
|
|
5102
|
-
|
|
5102
|
+
v = !0, s = null;
|
|
5103
5103
|
const y = p === null ? 0 : Uo(c || l, p), { domContentLoadedEventEnd: x, navigationStart: C } = performance.timing, F = d === null ? Math.max(a, c, x - C || 0) : 0;
|
|
5104
5104
|
t.send(ir(y, c > u ? c : u, F));
|
|
5105
5105
|
}
|
|
@@ -5117,7 +5117,7 @@ function $o(t, e) {
|
|
|
5117
5117
|
let n = !1;
|
|
5118
5118
|
const s = /* @__PURE__ */ new Map();
|
|
5119
5119
|
function i(l) {
|
|
5120
|
-
ei(l) && (ke(l) && s.set(l, [l.scrollLeft, l.scrollTop]),
|
|
5120
|
+
ei(l) && (ke(l) && s.set(l, [l.scrollLeft, l.scrollTop]), bt(l) && s.set(l, rn(l)));
|
|
5121
5121
|
}
|
|
5122
5122
|
const r = t.safe(() => {
|
|
5123
5123
|
e || t.send(Wi(...rn(document)));
|
|
@@ -5128,7 +5128,7 @@ function $o(t, e) {
|
|
|
5128
5128
|
t.attachStartCallback(r), t.attachStopCallback(() => {
|
|
5129
5129
|
n = !1, s.clear();
|
|
5130
5130
|
}), t.nodes.attachNodeCallback((l, c) => {
|
|
5131
|
-
c && (ke(l) && l.scrollLeft + l.scrollTop > 0 ? s.set(l, [l.scrollLeft, l.scrollTop]) :
|
|
5131
|
+
c && (ke(l) && l.scrollLeft + l.scrollTop > 0 ? s.set(l, [l.scrollLeft, l.scrollTop]) : bt(l) && s.set(l, rn(l))), Et(l) && t.nodes.attachNodeListener(l, "scroll", (u) => {
|
|
5132
5132
|
i(u.target);
|
|
5133
5133
|
});
|
|
5134
5134
|
}), t.attachEventListener(document, "scroll", (l) => {
|
|
@@ -5177,8 +5177,8 @@ function Vo(t) {
|
|
|
5177
5177
|
if (a && Symbol.iterator in a)
|
|
5178
5178
|
for (const d of a) {
|
|
5179
5179
|
let p = e.get(d);
|
|
5180
|
-
const
|
|
5181
|
-
if (p || (p = hi(), e.set(d, p)), c.includes(p) || t.send(Ys(p, l)),
|
|
5180
|
+
const v = !p;
|
|
5181
|
+
if (p || (p = hi(), e.set(d, p)), c.includes(p) || t.send(Ys(p, l)), v) {
|
|
5182
5182
|
const w = d.cssRules;
|
|
5183
5183
|
for (let y = 0; y < w.length; y++)
|
|
5184
5184
|
t.send(fn(p, w[y].cssText, y, t.getBaseHref()));
|
|
@@ -5321,7 +5321,7 @@ function Jo(t) {
|
|
|
5321
5321
|
s.FontFace = i;
|
|
5322
5322
|
};
|
|
5323
5323
|
t.observer.attachContextCallback(n), n(window), t.nodes.attachNodeCallback(t.safe((s) => {
|
|
5324
|
-
if (!
|
|
5324
|
+
if (!bt(s))
|
|
5325
5325
|
return;
|
|
5326
5326
|
const i = e.get(s);
|
|
5327
5327
|
if (!i)
|
|
@@ -5336,15 +5336,15 @@ function Xo(t, e, n, s, i) {
|
|
|
5336
5336
|
t.debug.log("Openreplay: attaching axios spy to instance", e);
|
|
5337
5337
|
function r(p) {
|
|
5338
5338
|
t.debug.log("Openreplay: capturing axios response data", p);
|
|
5339
|
-
const { headers:
|
|
5340
|
-
function U($,
|
|
5341
|
-
P(
|
|
5339
|
+
const { headers: v, data: w, method: y, url: x, baseURL: C } = p.config, { data: F, headers: R, status: T, response: N } = p, { data: D, headers: A, status: I } = N || {}, E = n.ignoreHeaders, P = Array.isArray(E) ? ($) => E.includes($) : () => E;
|
|
5340
|
+
function U($, b) {
|
|
5341
|
+
P(b[0]) || ($[b[0]] = b[1]);
|
|
5342
5342
|
}
|
|
5343
5343
|
let j = {}, z = {};
|
|
5344
|
-
|
|
5344
|
+
v.toJSON ? j = v.toJSON() : v instanceof Headers ? v.forEach(($, b) => U(j, [b, $])) : Array.isArray(v) ? v.forEach(($) => U(j, $)) : typeof v == "object" && Object.entries(v).forEach(($) => U(j, $));
|
|
5345
5345
|
const _ = A || R;
|
|
5346
|
-
_.toJSON ? z = _.toJSON() : _ instanceof Headers ? _.forEach(($,
|
|
5347
|
-
P($) || (z[$] =
|
|
5346
|
+
_.toJSON ? z = _.toJSON() : _ instanceof Headers ? _.forEach(($, b) => U(z, [b, $])) : Array.isArray(_) ? _.forEach(($) => U(z, $)) : typeof _ == "object" && Object.entries(_).forEach(([$, b]) => {
|
|
5347
|
+
P($) || (z[$] = b);
|
|
5348
5348
|
});
|
|
5349
5349
|
const M = s({
|
|
5350
5350
|
url: x,
|
|
@@ -5364,12 +5364,12 @@ function Xo(t, e, n, s, i) {
|
|
|
5364
5364
|
return;
|
|
5365
5365
|
}
|
|
5366
5366
|
const V = p.config.__openreplay_timing, G = performance.now() - V;
|
|
5367
|
-
t.debug.log("Openreplay: final req object", M), t.send(
|
|
5367
|
+
t.debug.log("Openreplay: final req object", M), t.send(vt("xhr", String(y), String(M.url), i(M.request), i(M.response), M.status, V + Ve(), G, 0));
|
|
5368
5368
|
}
|
|
5369
5369
|
function o(p) {
|
|
5370
5370
|
if (t.debug.log("Openreplay: capturing API request", p), p.__openreplay_timing = performance.now(), n.sessionTokenHeader) {
|
|
5371
|
-
const
|
|
5372
|
-
w && p.headers.set(
|
|
5371
|
+
const v = typeof n.sessionTokenHeader == "string" ? n.sessionTokenHeader : "X-OpenReplay-Session-Token", w = t.getSessionToken();
|
|
5372
|
+
w && p.headers.set(v, w);
|
|
5373
5373
|
}
|
|
5374
5374
|
return p;
|
|
5375
5375
|
}
|
|
@@ -5388,8 +5388,8 @@ function Xo(t, e, n, s, i) {
|
|
|
5388
5388
|
synchronous: !0
|
|
5389
5389
|
});
|
|
5390
5390
|
t.attachStopCallback(() => {
|
|
5391
|
-
var p,
|
|
5392
|
-
(
|
|
5391
|
+
var p, v, w, y;
|
|
5392
|
+
(v = (p = e.interceptors.request).eject) == null || v.call(p, a), (y = (w = e.interceptors.response).eject) == null || y.call(w, d);
|
|
5393
5393
|
});
|
|
5394
5394
|
}
|
|
5395
5395
|
function Yo(t) {
|
|
@@ -5418,7 +5418,7 @@ class Ln {
|
|
|
5418
5418
|
response: i
|
|
5419
5419
|
});
|
|
5420
5420
|
if (r)
|
|
5421
|
-
return
|
|
5421
|
+
return vt(this.requestType, r.method, r.url, JSON.stringify(r.request), JSON.stringify(r.response), r.status, this.startTime + Ve(), this.duration, this.responseSize);
|
|
5422
5422
|
}
|
|
5423
5423
|
writeHeaders() {
|
|
5424
5424
|
const e = {};
|
|
@@ -5851,12 +5851,12 @@ function la(t, e = {}) {
|
|
|
5851
5851
|
body: E
|
|
5852
5852
|
}
|
|
5853
5853
|
});
|
|
5854
|
-
z && t.send(
|
|
5854
|
+
z && t.send(vt("fetch", j, String(z.url), c(z.request), c(z.response), I.status, N + Ve(), A, 0));
|
|
5855
5855
|
}).catch((E) => t.debug.error("Could not process Fetch response:", E)), D;
|
|
5856
5856
|
});
|
|
5857
5857
|
};
|
|
5858
5858
|
a.fetch = p;
|
|
5859
|
-
const
|
|
5859
|
+
const v = a.XMLHttpRequest.prototype.open, w = a.XMLHttpRequest.prototype.setRequestHeader, y = a.XMLHttpRequest.prototype.send;
|
|
5860
5860
|
function x(R, T) {
|
|
5861
5861
|
const N = this;
|
|
5862
5862
|
o((A, I) => N.setRequestHeader(A, I));
|
|
@@ -5883,8 +5883,8 @@ function la(t, e = {}) {
|
|
|
5883
5883
|
body: N.response
|
|
5884
5884
|
}
|
|
5885
5885
|
});
|
|
5886
|
-
M && t.send(
|
|
5887
|
-
})),
|
|
5886
|
+
M && t.send(vt("xhr", _, String(M.url), c(M.request), c(M.response), N.status, D + Ve(), P, 0));
|
|
5887
|
+
})), v.apply(this, arguments);
|
|
5888
5888
|
}
|
|
5889
5889
|
function C(R) {
|
|
5890
5890
|
const T = on(this);
|
|
@@ -7119,7 +7119,7 @@ class fi {
|
|
|
7119
7119
|
}
|
|
7120
7120
|
}
|
|
7121
7121
|
}
|
|
7122
|
-
class
|
|
7122
|
+
class va {
|
|
7123
7123
|
constructor() {
|
|
7124
7124
|
this.api = new fi(), this.language = "en", this.currency = "USD", this.currencies = {
|
|
7125
7125
|
USD: {
|
|
@@ -7689,9 +7689,9 @@ class ba {
|
|
|
7689
7689
|
const n = this.OpenAIApiKey, s = "https://api.openai.com/v1/chat/completions", i = {
|
|
7690
7690
|
"Content-Type": "application/json",
|
|
7691
7691
|
Authorization: `Bearer ${n}`
|
|
7692
|
-
}, r = Object.entries(e).map(([p,
|
|
7692
|
+
}, r = Object.entries(e).map(([p, v]) => ({
|
|
7693
7693
|
key: p,
|
|
7694
|
-
text:
|
|
7694
|
+
text: v
|
|
7695
7695
|
})), o = `
|
|
7696
7696
|
You are a professional translator.
|
|
7697
7697
|
|
|
@@ -7743,8 +7743,8 @@ class ba {
|
|
|
7743
7743
|
}
|
|
7744
7744
|
}
|
|
7745
7745
|
}
|
|
7746
|
-
const J = new
|
|
7747
|
-
class
|
|
7746
|
+
const J = new va();
|
|
7747
|
+
class ba {
|
|
7748
7748
|
constructor() {
|
|
7749
7749
|
var e, n, s, i, r;
|
|
7750
7750
|
this.widgetType = ((e = window == null ? void 0 : window.wineaterData) == null ? void 0 : e.WIDGET_TYPE) || "store", this.countryCode = ((n = window == null ? void 0 : window.wineaterData) == null ? void 0 : n.COUNTRY_CODE) || null, this.widgetWrapper = ((s = window == null ? void 0 : window.wineaterData) == null ? void 0 : s.WIDGET_WRAPPER) || "wineater-widget-conteiner", this.titleText = (i = window == null ? void 0 : window.wineaterData) == null ? void 0 : i.TITLE_TEXT, this.subtitleText = (r = window == null ? void 0 : window.wineaterData) == null ? void 0 : r.SUBTITLE_TEXT, this.api = new fi(), console.log(this.titleText), this.selectedFilters = {
|
|
@@ -7870,13 +7870,13 @@ class va {
|
|
|
7870
7870
|
return typeof u != "number" && (u = Number(u)), u.toLocaleString("en-US");
|
|
7871
7871
|
}
|
|
7872
7872
|
e.forEach(async (u, a) => {
|
|
7873
|
-
const d = i(u, "title"), p = i(u, "image"),
|
|
7873
|
+
const d = i(u, "title"), p = i(u, "image"), v = i(u, "total"), w = i(u, "url"), y = u.tags || u.Tags, x = r(u, ["type", "country", "region", "grape"]), C = y ? o(y) : "", F = l(u), R = u["Short Description"], T = u.pairing_recommendation, N = u.isSommSelection, D = `
|
|
7874
7874
|
<div class="wine-recommendation-tile ${N ? "somm-selection" : ""}">
|
|
7875
7875
|
${N ? `<div class="somm-selection-badge">${J.translate("wineDetails.sommSelection")}</div>` : ""}
|
|
7876
7876
|
|
|
7877
7877
|
<div class="tile-top">
|
|
7878
7878
|
${p ? `<img src="${p}" alt="${d}" class="wine-image" />` : ""}
|
|
7879
|
-
<div class="wine-price">${c(
|
|
7879
|
+
<div class="wine-price">${c(v)} ${J.getCurrency("label")}</div>
|
|
7880
7880
|
<h3 class="wine-title">${d}</h3>
|
|
7881
7881
|
</div>
|
|
7882
7882
|
|
|
@@ -7907,14 +7907,18 @@ class va {
|
|
|
7907
7907
|
U.stopPropagation(), E.classList.add("hidden");
|
|
7908
7908
|
}), document.addEventListener("click", (U) => {
|
|
7909
7909
|
U.target.closest(".card-popup") || U.target.closest(".mobile-fullscreen-popup") || U.target.closest("[data-toggle-info]") || (document.querySelectorAll(".card-popup").forEach((z) => z.classList.add("hidden")), document.querySelectorAll(".mobile-fullscreen-wrapper").forEach((z) => z.remove()));
|
|
7910
|
-
}),
|
|
7910
|
+
}), this.widgetType === "store" ? (A.addEventListener("mouseenter", () => {
|
|
7911
|
+
E.classList.remove("hidden");
|
|
7912
|
+
}), A.addEventListener("mouseleave", () => {
|
|
7913
|
+
E.classList.add("hidden");
|
|
7914
|
+
})) : I == null || I.addEventListener("click", (U) => {
|
|
7911
7915
|
var j;
|
|
7912
7916
|
if (U.stopPropagation(), document.querySelectorAll(".card-popup").forEach((z) => z.classList.add("hidden")), document.querySelectorAll(".mobile-fullscreen-wrapper").forEach((z) => z.remove()), window.innerWidth <= 768) {
|
|
7913
7917
|
const z = E.innerHTML, _ = document.createElement("div");
|
|
7914
7918
|
_.className = "mobile-fullscreen-wrapper", _.innerHTML = `
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7919
|
+
<div class="mobile-fullscreen-overlay"></div>
|
|
7920
|
+
<div class="card-popup mobile-fullscreen-popup">${z}</div>
|
|
7921
|
+
`, (j = _.querySelector(".card-popup-close")) == null || j.addEventListener("click", () => _.remove()), document.body.appendChild(_);
|
|
7918
7922
|
} else
|
|
7919
7923
|
E.classList.remove("hidden");
|
|
7920
7924
|
});
|
|
@@ -7968,24 +7972,24 @@ class va {
|
|
|
7968
7972
|
}).filter(Boolean);
|
|
7969
7973
|
if (p.length === 0)
|
|
7970
7974
|
return;
|
|
7971
|
-
const
|
|
7975
|
+
const v = await J.translateTexts(
|
|
7972
7976
|
Object.fromEntries(p.map((x) => [x.key, x.text]))
|
|
7973
7977
|
), w = document.querySelector(`.card-popup[data-wine-index="${d}"]`);
|
|
7974
7978
|
if (!w)
|
|
7975
7979
|
return;
|
|
7976
|
-
if (
|
|
7980
|
+
if (v["Short Description"]) {
|
|
7977
7981
|
const x = w.querySelector(".popup-short-desc");
|
|
7978
|
-
x && (x.textContent =
|
|
7982
|
+
x && (x.textContent = v["Short Description"]);
|
|
7979
7983
|
}
|
|
7980
|
-
if (
|
|
7984
|
+
if (v.reason) {
|
|
7981
7985
|
const x = w.querySelector(".popup-reason");
|
|
7982
|
-
x && (x.textContent =
|
|
7986
|
+
x && (x.textContent = v.reason);
|
|
7983
7987
|
}
|
|
7984
|
-
if (
|
|
7988
|
+
if (v.pairing_recommendation) {
|
|
7985
7989
|
const x = w.querySelector(".popup-pairing");
|
|
7986
|
-
x && (x.textContent =
|
|
7990
|
+
x && (x.textContent = v.pairing_recommendation);
|
|
7987
7991
|
}
|
|
7988
|
-
const y =
|
|
7992
|
+
const y = v.tags || v.Tags;
|
|
7989
7993
|
if (y) {
|
|
7990
7994
|
const C = y.split(",").map((R) => R.trim()).map((R) => `<span class="popup-tag">${R}</span>`).join(""), F = w.querySelector(".popup-tags");
|
|
7991
7995
|
F && (F.innerHTML = C);
|
|
@@ -8043,7 +8047,7 @@ class wa {
|
|
|
8043
8047
|
Rs("chatbotToken", ((e = window.wineaterData) == null ? void 0 : e.CLIENT_TOKEN) || ya, 365), mi();
|
|
8044
8048
|
}
|
|
8045
8049
|
async initialize() {
|
|
8046
|
-
this.tracker.start(), await this.initTranslator(), this.initCookies(), new
|
|
8050
|
+
this.tracker.start(), await this.initTranslator(), this.initCookies(), new ba();
|
|
8047
8051
|
}
|
|
8048
8052
|
}
|
|
8049
8053
|
document.addEventListener("DOMContentLoaded", () => {
|