@kalamba/sdk 0.13.1 → 0.13.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/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +134 -99
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.d.ts +1 -0
- package/dist/plugins.js +327 -326
- package/dist/wrapper.cjs +1 -1
- package/dist/wrapper.d.ts +1 -0
- package/dist/wrapper.js +709 -707
- package/package.json +1 -1
package/dist/plugins.js
CHANGED
|
@@ -2,28 +2,28 @@
|
|
|
2
2
|
* BSD 3-Clause License
|
|
3
3
|
* Copyright (c) 2025, Kalamba Games Limited
|
|
4
4
|
*/
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var m = (s, t, e) => (
|
|
5
|
+
var Wt = Object.defineProperty;
|
|
6
|
+
var $t = (s, t, e) => t in s ? Wt(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
|
|
7
|
+
var m = (s, t, e) => ($t(s, typeof t != "symbol" ? t + "" : t, e), e), rt = (s, t, e) => {
|
|
8
8
|
if (!t.has(s))
|
|
9
9
|
throw TypeError("Cannot " + e);
|
|
10
10
|
};
|
|
11
|
-
var y = (s, t, e) => (
|
|
11
|
+
var y = (s, t, e) => (rt(s, t, "read from private field"), e ? e.call(s) : t.get(s)), C = (s, t, e) => {
|
|
12
12
|
if (t.has(s))
|
|
13
13
|
throw TypeError("Cannot add the same private member more than once");
|
|
14
14
|
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
15
|
-
}, E = (s, t, e, i) => (
|
|
16
|
-
import { a as
|
|
17
|
-
import { a as
|
|
15
|
+
}, E = (s, t, e, i) => (rt(s, t, "write to private field"), i ? i.call(s, e) : t.set(s, e), e);
|
|
16
|
+
import { a as Fe } from "./errors-7cbbda8a.js";
|
|
17
|
+
import { a as ct, v as jt } from "./v4-58efbfa1.js";
|
|
18
18
|
function O(s, t) {
|
|
19
19
|
return (e, ...i) => {
|
|
20
20
|
console.log(`[%c${s}\x1B[m] %s`, t, e, ...i);
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Lt(s, t) {
|
|
24
24
|
return Math.round(s * 100 / t);
|
|
25
25
|
}
|
|
26
|
-
class
|
|
26
|
+
class V {
|
|
27
27
|
constructor(t, e) {
|
|
28
28
|
m(this, "config");
|
|
29
29
|
m(this, "sdkConfig");
|
|
@@ -42,10 +42,10 @@ class z {
|
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
const
|
|
46
|
-
class
|
|
45
|
+
const Qt = O("BasicPlugin", "color:#000000;font-weight:bold;");
|
|
46
|
+
class Ri extends V {
|
|
47
47
|
constructor(...t) {
|
|
48
|
-
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
48
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Qt("configured");
|
|
49
49
|
}
|
|
50
50
|
registerToSdkEvents() {
|
|
51
51
|
window.addEventListener("message", (t) => {
|
|
@@ -57,7 +57,7 @@ class Oi extends z {
|
|
|
57
57
|
return;
|
|
58
58
|
case "doBalanceUpdate":
|
|
59
59
|
const { currency: a, coinValueInCents: o } = this.sdkConfig.api;
|
|
60
|
-
i.currency === a && typeof i.balanceInCurrency == "number" ? this.send("balance", { balance:
|
|
60
|
+
i.currency === a && typeof i.balanceInCurrency == "number" ? this.send("balance", { balance: Lt(i.balanceInCurrency, o) }) : (i.balanceInCoins, this.send("balance", { balance: i.balanceInCoins }));
|
|
61
61
|
return;
|
|
62
62
|
case "doGamePause":
|
|
63
63
|
this.send("freeze");
|
|
@@ -92,8 +92,8 @@ class Oi extends z {
|
|
|
92
92
|
});
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
|
-
const v = O("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"),
|
|
96
|
-
class
|
|
95
|
+
const v = O("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), Xt = O("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
|
|
96
|
+
class Li extends V {
|
|
97
97
|
constructor(...t) {
|
|
98
98
|
super(...t), this.registerDebugToSdkEvents(), this.registerSdkToDebugEvents();
|
|
99
99
|
}
|
|
@@ -117,13 +117,13 @@ class xi extends z {
|
|
|
117
117
|
this.on("autoplay", (t) => v("autoplay", t)), this.on("balance", (t) => v("balance", t)), this.on("bet", (t) => v("bet", t)), this.on("cashier", (t) => v("cashier", t)), this.on("choice", (t) => v("choice", t)), this.on("close", (t) => v("close", t)), this.on("error", (t) => v("error", t)), this.on("loadEnd", (t) => v("loadEnd", t)), this.on("loadProgress", (t) => v("loadProgress", t)), this.on("loadStart", (t) => v("loadStart", t)), this.on("playCycleStart", (t) => v("playCycleStart", t)), this.on("playCycleEnd", (t) => v("playCycleEnd", t)), this.on("playEnd", (t) => v("playEnd", t)), this.on("playError", (t) => v("playError", t)), this.on("playReady", (t) => v("playReady", t)), this.on("playStart", (t) => v("playStart", t)), this.on("settings", (t) => v("settings", t));
|
|
118
118
|
}
|
|
119
119
|
_send(...t) {
|
|
120
|
-
|
|
120
|
+
Xt(...t), this.send(...t);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
-
const
|
|
124
|
-
class
|
|
123
|
+
const Kt = O("GigPlugin", "color:#000000;font-weight:bold;");
|
|
124
|
+
class Ui extends V {
|
|
125
125
|
constructor(...t) {
|
|
126
|
-
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
126
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Kt("configured");
|
|
127
127
|
}
|
|
128
128
|
postMessage(t) {
|
|
129
129
|
const e = {
|
|
@@ -171,10 +171,10 @@ class Ri extends z {
|
|
|
171
171
|
});
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
const
|
|
175
|
-
class
|
|
174
|
+
const Jt = O("OryxPlugin", "color:#000000;font-weight:bold;");
|
|
175
|
+
class _i extends V {
|
|
176
176
|
constructor(...t) {
|
|
177
|
-
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
177
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Jt("configured");
|
|
178
178
|
}
|
|
179
179
|
registerToSdkEvents() {
|
|
180
180
|
window.addEventListener("message", (t) => {
|
|
@@ -226,15 +226,15 @@ class Li extends z {
|
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
const
|
|
230
|
-
function
|
|
229
|
+
const dt = O("PariplayPlugin", "color:#000000;font-weight:bold;");
|
|
230
|
+
function Ge(s) {
|
|
231
231
|
try {
|
|
232
232
|
window.top.location = s;
|
|
233
233
|
} catch {
|
|
234
234
|
window.location = s;
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
|
-
function
|
|
237
|
+
function He(s, t) {
|
|
238
238
|
return new Promise(function(i, a) {
|
|
239
239
|
const o = new XMLHttpRequest();
|
|
240
240
|
o.onload = function() {
|
|
@@ -242,38 +242,38 @@ function Ge(s, t) {
|
|
|
242
242
|
}, o.open(s, t), o.send();
|
|
243
243
|
});
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function Ve() {
|
|
246
246
|
}
|
|
247
|
-
function
|
|
247
|
+
function Yt(s) {
|
|
248
248
|
return s.filter(function(e) {
|
|
249
249
|
return e.messageType.toUpperCase() === "DATA";
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function ze(s) {
|
|
253
253
|
return s.filter(function(e) {
|
|
254
254
|
return ["NOTIFICATION", "POPUP"].includes(e.messageType.toUpperCase());
|
|
255
255
|
});
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function Ut(s) {
|
|
258
258
|
try {
|
|
259
259
|
return JSON.parse(s.text);
|
|
260
260
|
} catch {
|
|
261
261
|
return {};
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
|
-
function
|
|
265
|
-
return s.map(
|
|
264
|
+
function Zt(s) {
|
|
265
|
+
return s.map(Ut).filter(Boolean).find(function(e) {
|
|
266
266
|
return e.betId != null && e.winId != null;
|
|
267
267
|
}) || {};
|
|
268
268
|
}
|
|
269
|
-
function
|
|
270
|
-
return s.map(
|
|
269
|
+
function ei(s) {
|
|
270
|
+
return s.map(Ut).filter(Boolean).find(function(e) {
|
|
271
271
|
return e.TotalBet != null && e.TotalWin != null;
|
|
272
272
|
}) || {};
|
|
273
273
|
}
|
|
274
|
-
class
|
|
274
|
+
class Bi extends V {
|
|
275
275
|
constructor(...t) {
|
|
276
|
-
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
276
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), dt("configured");
|
|
277
277
|
}
|
|
278
278
|
postMessage(t, e) {
|
|
279
279
|
const i = {
|
|
@@ -281,26 +281,26 @@ class Ui extends z {
|
|
|
281
281
|
sender: this.sdkConfig.api.game,
|
|
282
282
|
type: t
|
|
283
283
|
};
|
|
284
|
-
e != null && (i.data = e),
|
|
284
|
+
e != null && (i.data = e), dt("postMessage", i), window.parent.postMessage(i, "*");
|
|
285
285
|
}
|
|
286
286
|
coinsToCurrency(t) {
|
|
287
287
|
return t * this.sdkConfig.api.coinValueInCents / 100;
|
|
288
288
|
}
|
|
289
289
|
handleContinueButton(t, e) {
|
|
290
|
-
t.link &&
|
|
290
|
+
t.link && He("GET", t.link), e();
|
|
291
291
|
}
|
|
292
292
|
handleLinkButton(t, e) {
|
|
293
293
|
switch (t.linkType.toUpperCase()) {
|
|
294
294
|
case "AJAX":
|
|
295
|
-
|
|
295
|
+
He("GET", t.link), e();
|
|
296
296
|
return;
|
|
297
297
|
case "AJAXRESPONSE":
|
|
298
|
-
|
|
298
|
+
He("GET", t.link).then(() => {
|
|
299
299
|
e();
|
|
300
300
|
});
|
|
301
301
|
return;
|
|
302
302
|
case "REDIRECT":
|
|
303
|
-
|
|
303
|
+
Ge(t.link), e();
|
|
304
304
|
return;
|
|
305
305
|
}
|
|
306
306
|
}
|
|
@@ -327,13 +327,13 @@ class Ui extends z {
|
|
|
327
327
|
Object.assign({}, i, {
|
|
328
328
|
buttons: i.buttons.filter((o) => o.action.toUpperCase() === "CASHIER" ? !!this.sdkConfig.api.cashierUrl : !0).map((o) => Object.assign({}, o, {
|
|
329
329
|
onRelease: () => {
|
|
330
|
-
const n = i.messageType.toUpperCase() === "POPUP" ?
|
|
330
|
+
const n = i.messageType.toUpperCase() === "POPUP" ? Ve : a, h = this.buttonActions[o.action.toUpperCase()];
|
|
331
331
|
h ? h(o, n) : n();
|
|
332
332
|
}
|
|
333
333
|
}))
|
|
334
334
|
});
|
|
335
|
-
}).catch(
|
|
336
|
-
}).catch(
|
|
335
|
+
}).catch(Ve)), Promise.resolve()).then(() => {
|
|
336
|
+
}).catch(Ve);
|
|
337
337
|
}
|
|
338
338
|
registerToSdkEvents() {
|
|
339
339
|
window.addEventListener("message", (t) => {
|
|
@@ -380,7 +380,7 @@ class Ui extends z {
|
|
|
380
380
|
success: !0
|
|
381
381
|
});
|
|
382
382
|
try {
|
|
383
|
-
const a =
|
|
383
|
+
const a = ze(e.contract.uiMessages);
|
|
384
384
|
this.processInfoUiMessages(a);
|
|
385
385
|
} catch {
|
|
386
386
|
}
|
|
@@ -397,14 +397,14 @@ class Ui extends z {
|
|
|
397
397
|
window.history.back();
|
|
398
398
|
}
|
|
399
399
|
else
|
|
400
|
-
this.sdkConfig.api.homeUrl === "(api)" ? this.postMessage("quit") :
|
|
400
|
+
this.sdkConfig.api.homeUrl === "(api)" ? this.postMessage("quit") : Ge(this.sdkConfig.api.homeUrl);
|
|
401
401
|
}), this.on("playEnd", (e) => {
|
|
402
402
|
this.postMessage("roundEnded", {
|
|
403
403
|
balanceAfter: this.coinsToCurrency(e.contract.balance.coins),
|
|
404
404
|
win: this.coinsToCurrency(e.contract.win.round)
|
|
405
405
|
});
|
|
406
406
|
try {
|
|
407
|
-
const i =
|
|
407
|
+
const i = ze(e.contract.uiMessages);
|
|
408
408
|
this.processInfoUiMessages(i);
|
|
409
409
|
} catch {
|
|
410
410
|
}
|
|
@@ -424,7 +424,7 @@ class Ui extends z {
|
|
|
424
424
|
e.contract.balance.coins + e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier
|
|
425
425
|
)
|
|
426
426
|
});
|
|
427
|
-
const i = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), a =
|
|
427
|
+
const i = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), a = Yt(e.contract.uiMessages), o = ze(e.contract.uiMessages), n = Zt(a), h = ei(a);
|
|
428
428
|
this.postMessage("ticketReceived", {
|
|
429
429
|
Balance: this.coinsToCurrency(e.contract.balance.coins),
|
|
430
430
|
BetAmount: i ? this.coinsToCurrency(e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier) : 0,
|
|
@@ -446,12 +446,12 @@ class Ui extends z {
|
|
|
446
446
|
}), this.on("loadStart", () => {
|
|
447
447
|
this.postMessage("onAppFrameReady");
|
|
448
448
|
}), this.on("cashier", () => {
|
|
449
|
-
this.sdkConfig.api.cashierUrl && (this.sdkConfig.api.cashierUrl === "(api)" ? this.postMessage("cashier") :
|
|
449
|
+
this.sdkConfig.api.cashierUrl && (this.sdkConfig.api.cashierUrl === "(api)" ? this.postMessage("cashier") : Ge(this.sdkConfig.api.cashierUrl));
|
|
450
450
|
});
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
453
|
const ue = O("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
|
|
454
|
-
class
|
|
454
|
+
class Fi extends V {
|
|
455
455
|
constructor(...e) {
|
|
456
456
|
super(...e);
|
|
457
457
|
m(this, "VERSION", "1.17.0");
|
|
@@ -525,20 +525,20 @@ class _i extends z {
|
|
|
525
525
|
});
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
const
|
|
529
|
-
class
|
|
528
|
+
const qe = O("TukoPlugin", "color:#000000;font-weight:bold;");
|
|
529
|
+
class Di extends V {
|
|
530
530
|
constructor(...e) {
|
|
531
531
|
super(...e);
|
|
532
532
|
m(this, "PING_INTERVAL", 1e4);
|
|
533
533
|
const a = new URLSearchParams(window.location.search).get("pingCallbackUrl");
|
|
534
534
|
a && window.setInterval(() => {
|
|
535
535
|
this.ping(a);
|
|
536
|
-
}, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
536
|
+
}, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(), qe("configured");
|
|
537
537
|
}
|
|
538
538
|
ping(e) {
|
|
539
539
|
const i = new XMLHttpRequest();
|
|
540
540
|
i.onreadystatechange = function() {
|
|
541
|
-
i.readyState === XMLHttpRequest.DONE && (i.status === 0 || i.status >= 200 && i.status < 400 ?
|
|
541
|
+
i.readyState === XMLHttpRequest.DONE && (i.status === 0 || i.status >= 200 && i.status < 400 ? qe("ping ok", i) : qe("ping error", i));
|
|
542
542
|
}, i.open("GET", e), i.send();
|
|
543
543
|
}
|
|
544
544
|
registerToSdkEvents() {
|
|
@@ -551,7 +551,7 @@ class Bi extends z {
|
|
|
551
551
|
return;
|
|
552
552
|
case "doBalanceUpdate":
|
|
553
553
|
const { currency: o, coinValueInCents: n } = this.sdkConfig.api;
|
|
554
|
-
a.currency === o && typeof a.balanceInCurrency == "number" ? this.send("balance", { balance:
|
|
554
|
+
a.currency === o && typeof a.balanceInCurrency == "number" ? this.send("balance", { balance: Lt(a.balanceInCurrency, n) }) : (a.balanceInCoins, this.send("balance", { balance: a.balanceInCoins }));
|
|
555
555
|
return;
|
|
556
556
|
case "doGamePause":
|
|
557
557
|
this.send("freeze");
|
|
@@ -586,14 +586,14 @@ class Bi extends z {
|
|
|
586
586
|
});
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
const
|
|
590
|
-
class
|
|
589
|
+
const lt = O("QuantaPlugin", "color:#000000;font-weight:bold;");
|
|
590
|
+
class Ni extends V {
|
|
591
591
|
constructor(...t) {
|
|
592
|
-
super(...t), this.registerFromSdkEvents(),
|
|
592
|
+
super(...t), this.registerFromSdkEvents(), lt("configured");
|
|
593
593
|
}
|
|
594
594
|
postMessage(t) {
|
|
595
595
|
const e = { event: t };
|
|
596
|
-
|
|
596
|
+
lt("QuantaPlugin::postMessage", e), window.parent.postMessage(e, "*");
|
|
597
597
|
}
|
|
598
598
|
registerFromSdkEvents() {
|
|
599
599
|
this.on("close", () => {
|
|
@@ -609,9 +609,9 @@ class Fi extends z {
|
|
|
609
609
|
});
|
|
610
610
|
}
|
|
611
611
|
}
|
|
612
|
-
var
|
|
612
|
+
var ti = "2.0.0-beta.3", re = "", ut = "?", Je = "function", G = "undefined", ce = "object", Ye = "string", we = "major", l = "model", r = "name", d = "type", u = "vendor", c = "version", M = "architecture", J = "console", b = "mobile", f = "tablet", I = "smarttv", Ae = "wearable", ht = "xr", Ze = "embedded", pt = "user-agent", et = 500, st = "brands", W = "formFactors", at = "fullVersionList", Y = "platform", nt = "platformVersion", De = "bitness", z = "sec-ch-ua", ii = z + "-full-version-list", si = z + "-arch", ai = z + "-" + De, ni = z + "-form-factors", oi = z + "-" + b, ri = z + "-" + l, _t = z + "-" + Y, ci = _t + "-version", Bt = [st, at, b, l, Y, nt, M, W, De], T = "browser", U = "cpu", x = "device", _ = "engine", P = "os", Z = "result", ve = "Amazon", he = "Apple", gt = "ASUS", mt = "BlackBerry", Ce = "Google", wt = "Huawei", bt = "Lenovo", We = "LG", Oe = "Microsoft", ft = "Motorola", Me = "Samsung", yt = "Sharp", Se = "Sony", $e = "Xiaomi", je = "Zebra", X = "Mobile ", K = " Browser", Ie = "Chrome", di = "Edge", pe = "Firefox", ge = "Opera", kt = "Facebook", Et = "Sogou", tt = "Windows", li = typeof window !== G, S = li && window.navigator ? window.navigator : void 0, D = S && S.userAgentData ? S.userAgentData : void 0, ui = function(s, t) {
|
|
613
613
|
var e = {}, i = t;
|
|
614
|
-
if (!
|
|
614
|
+
if (!xe(t)) {
|
|
615
615
|
i = {};
|
|
616
616
|
for (var a in t)
|
|
617
617
|
for (var o in t[a])
|
|
@@ -620,24 +620,24 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
620
620
|
for (var n in s)
|
|
621
621
|
e[n] = i[n] && i[n].length % 2 === 0 ? i[n].concat(s[n]) : s[n];
|
|
622
622
|
return e;
|
|
623
|
-
},
|
|
623
|
+
}, Ne = function(s) {
|
|
624
624
|
for (var t = {}, e = 0; e < s.length; e++)
|
|
625
625
|
t[s[e].toUpperCase()] = s[e];
|
|
626
626
|
return t;
|
|
627
|
-
},
|
|
627
|
+
}, it = function(s, t) {
|
|
628
628
|
if (typeof s === ce && s.length > 0) {
|
|
629
629
|
for (var e in s)
|
|
630
|
-
if (
|
|
630
|
+
if (H(s[e]) == H(t))
|
|
631
631
|
return !0;
|
|
632
632
|
return !1;
|
|
633
633
|
}
|
|
634
|
-
return de(s) ?
|
|
635
|
-
},
|
|
634
|
+
return de(s) ? H(t).indexOf(H(s)) !== -1 : !1;
|
|
635
|
+
}, xe = function(s, t) {
|
|
636
636
|
for (var e in s)
|
|
637
|
-
return /^(browser|cpu|device|engine|os)$/.test(e) || (t ?
|
|
637
|
+
return /^(browser|cpu|device|engine|os)$/.test(e) || (t ? xe(s[e]) : !1);
|
|
638
638
|
}, de = function(s) {
|
|
639
|
-
return typeof s ===
|
|
640
|
-
},
|
|
639
|
+
return typeof s === Ye;
|
|
640
|
+
}, Qe = function(s) {
|
|
641
641
|
if (s) {
|
|
642
642
|
for (var t = [], e = $(/\\?\"/g, s).split(","), i = 0; i < e.length; i++)
|
|
643
643
|
if (e[i].indexOf(";") > -1) {
|
|
@@ -647,11 +647,11 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
647
647
|
t[i] = be(e[i]);
|
|
648
648
|
return t;
|
|
649
649
|
}
|
|
650
|
-
},
|
|
650
|
+
}, H = function(s) {
|
|
651
651
|
return de(s) ? s.toLowerCase() : s;
|
|
652
|
-
},
|
|
652
|
+
}, Xe = function(s) {
|
|
653
653
|
return de(s) ? $(/[^\d\.]/g, s).split(".")[0] : void 0;
|
|
654
|
-
},
|
|
654
|
+
}, B = function(s) {
|
|
655
655
|
for (var t in s) {
|
|
656
656
|
var e = s[t];
|
|
657
657
|
typeof e == ce && e.length == 2 ? this[e[0]] = e[1] : this[e] = void 0;
|
|
@@ -663,27 +663,27 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
663
663
|
return $(/\\?\"/g, s);
|
|
664
664
|
}, be = function(s, t) {
|
|
665
665
|
if (de(s))
|
|
666
|
-
return s = $(/^\s\s*/, s), typeof t ===
|
|
667
|
-
},
|
|
666
|
+
return s = $(/^\s\s*/, s), typeof t === G ? s : s.substring(0, et);
|
|
667
|
+
}, vt = function(s, t) {
|
|
668
668
|
if (!(!s || !t))
|
|
669
669
|
for (var e = 0, i, a, o, n, h, p; e < t.length && !h; ) {
|
|
670
670
|
var w = t[e], g = t[e + 1];
|
|
671
671
|
for (i = a = 0; i < w.length && !h && w[i]; )
|
|
672
672
|
if (h = w[i++].exec(s), h)
|
|
673
673
|
for (o = 0; o < g.length; o++)
|
|
674
|
-
p = h[++a], n = g[o], typeof n === ce && n.length > 0 ? n.length === 2 ? typeof n[1] ==
|
|
674
|
+
p = h[++a], n = g[o], typeof n === ce && n.length > 0 ? n.length === 2 ? typeof n[1] == Je ? this[n[0]] = n[1].call(this, p) : this[n[0]] = n[1] : n.length === 3 ? typeof n[1] === Je && !(n[1].exec && n[1].test) ? this[n[0]] = p ? n[1].call(this, p, n[2]) : void 0 : this[n[0]] = p ? p.replace(n[1], n[2]) : void 0 : n.length === 4 && (this[n[0]] = p ? n[3].call(this, p.replace(n[1], n[2])) : void 0) : this[n] = p || void 0;
|
|
675
675
|
e += 2;
|
|
676
676
|
}
|
|
677
|
-
},
|
|
677
|
+
}, Re = function(s, t) {
|
|
678
678
|
for (var e in t)
|
|
679
679
|
if (typeof t[e] === ce && t[e].length > 0) {
|
|
680
680
|
for (var i = 0; i < t[e].length; i++)
|
|
681
|
-
if (
|
|
682
|
-
return e ===
|
|
683
|
-
} else if (
|
|
684
|
-
return e ===
|
|
681
|
+
if (it(t[e][i], s))
|
|
682
|
+
return e === ut ? void 0 : e;
|
|
683
|
+
} else if (it(t[e], s))
|
|
684
|
+
return e === ut ? void 0 : e;
|
|
685
685
|
return t.hasOwnProperty("*") ? t["*"] : s;
|
|
686
|
-
},
|
|
686
|
+
}, Ct = {
|
|
687
687
|
ME: "4.90",
|
|
688
688
|
"NT 3.11": "NT3.51",
|
|
689
689
|
"NT 4.0": "NT4.0",
|
|
@@ -695,7 +695,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
695
695
|
"8.1": "NT 6.3",
|
|
696
696
|
10: ["NT 6.4", "NT 10.0"],
|
|
697
697
|
RT: "ARM"
|
|
698
|
-
},
|
|
698
|
+
}, Mt = {
|
|
699
699
|
embedded: "Automotive",
|
|
700
700
|
mobile: "Mobile",
|
|
701
701
|
tablet: ["Tablet", "EInk"],
|
|
@@ -704,7 +704,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
704
704
|
xr: ["VR", "XR"],
|
|
705
705
|
"?": ["Desktop", "Unknown"],
|
|
706
706
|
"*": void 0
|
|
707
|
-
},
|
|
707
|
+
}, St = {
|
|
708
708
|
browser: [
|
|
709
709
|
[
|
|
710
710
|
// Most common regardless engine
|
|
@@ -804,7 +804,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
804
804
|
/slbrowser\/([\w\.]+)/i
|
|
805
805
|
// Smart Lenovo Browser
|
|
806
806
|
],
|
|
807
|
-
[c, [r, "Smart " +
|
|
807
|
+
[c, [r, "Smart " + bt + K]],
|
|
808
808
|
[
|
|
809
809
|
/(avast|avg)\/([\w\.]+)/i
|
|
810
810
|
// Avast/AVG Secure Browser
|
|
@@ -864,7 +864,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
864
864
|
/samsungbrowser\/([\w\.]+)/i
|
|
865
865
|
// Samsung Internet
|
|
866
866
|
],
|
|
867
|
-
[c, [r,
|
|
867
|
+
[c, [r, Me + " Internet"]],
|
|
868
868
|
[
|
|
869
869
|
/(comodo_dragon)\/([\w\.]+)/i
|
|
870
870
|
// Comodo Dragon
|
|
@@ -874,12 +874,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
874
874
|
/metasr[\/ ]?([\d\.]+)/i
|
|
875
875
|
// Sogou Explorer
|
|
876
876
|
],
|
|
877
|
-
[c, [r,
|
|
877
|
+
[c, [r, Et + " Explorer"]],
|
|
878
878
|
[
|
|
879
879
|
/(sogou)mo\w+\/([\d\.]+)/i
|
|
880
880
|
// Sogou Mobile
|
|
881
881
|
],
|
|
882
|
-
[[r,
|
|
882
|
+
[[r, Et + " Mobile"], c],
|
|
883
883
|
[
|
|
884
884
|
/(electron)\/([\w\.]+) safari/i,
|
|
885
885
|
// Electron-based App
|
|
@@ -901,7 +901,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
901
901
|
/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
|
|
902
902
|
// Facebook App for iOS & Android
|
|
903
903
|
],
|
|
904
|
-
[[r,
|
|
904
|
+
[[r, kt], c],
|
|
905
905
|
[
|
|
906
906
|
/(Klarna)\/([\w\.]+)/i,
|
|
907
907
|
// Klarna Shopping Browser for iOS & Android
|
|
@@ -935,12 +935,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
935
935
|
/headlesschrome(?:\/([\w\.]+)| )/i
|
|
936
936
|
// Chrome Headless
|
|
937
937
|
],
|
|
938
|
-
[c, [r,
|
|
938
|
+
[c, [r, Ie + " Headless"]],
|
|
939
939
|
[
|
|
940
940
|
/ wv\).+(chrome)\/([\w\.]+)/i
|
|
941
941
|
// Chrome WebView
|
|
942
942
|
],
|
|
943
|
-
[[r,
|
|
943
|
+
[[r, Ie + " WebView"], c],
|
|
944
944
|
[
|
|
945
945
|
/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
|
|
946
946
|
// Android Browser
|
|
@@ -1058,7 +1058,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1058
1058
|
/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i
|
|
1059
1059
|
// PowerPC
|
|
1060
1060
|
],
|
|
1061
|
-
[[M, /ower/, re,
|
|
1061
|
+
[[M, /ower/, re, H]],
|
|
1062
1062
|
[
|
|
1063
1063
|
/(sun4\w)[;\)]/i
|
|
1064
1064
|
// SPARC
|
|
@@ -1068,7 +1068,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1068
1068
|
/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i
|
|
1069
1069
|
// IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
|
|
1070
1070
|
],
|
|
1071
|
-
[[M,
|
|
1071
|
+
[[M, H]]
|
|
1072
1072
|
],
|
|
1073
1073
|
device: [
|
|
1074
1074
|
[
|
|
@@ -1078,13 +1078,13 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1078
1078
|
// Samsung
|
|
1079
1079
|
/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i
|
|
1080
1080
|
],
|
|
1081
|
-
[l, [u,
|
|
1081
|
+
[l, [u, Me], [d, f]],
|
|
1082
1082
|
[
|
|
1083
1083
|
/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
|
|
1084
1084
|
/samsung[- ]([-\w]+)/i,
|
|
1085
1085
|
/sec-(sgh\w+)/i
|
|
1086
1086
|
],
|
|
1087
|
-
[l, [u,
|
|
1087
|
+
[l, [u, Me], [d, b]],
|
|
1088
1088
|
[
|
|
1089
1089
|
// Apple
|
|
1090
1090
|
/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
|
|
@@ -1106,17 +1106,17 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1106
1106
|
// Sharp
|
|
1107
1107
|
/\b(sh-?[altvz]?\d\d[a-ekm]?)/i
|
|
1108
1108
|
],
|
|
1109
|
-
[l, [u,
|
|
1109
|
+
[l, [u, yt], [d, b]],
|
|
1110
1110
|
[
|
|
1111
1111
|
// Huawei
|
|
1112
1112
|
/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i
|
|
1113
1113
|
],
|
|
1114
|
-
[l, [u,
|
|
1114
|
+
[l, [u, wt], [d, f]],
|
|
1115
1115
|
[
|
|
1116
1116
|
/(?:huawei|honor)([-\w ]+)[;\)]/i,
|
|
1117
1117
|
/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
|
|
1118
1118
|
],
|
|
1119
|
-
[l, [u,
|
|
1119
|
+
[l, [u, wt], [d, b]],
|
|
1120
1120
|
[
|
|
1121
1121
|
// Xiaomi
|
|
1122
1122
|
/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
|
|
@@ -1132,14 +1132,14 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1132
1132
|
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
|
|
1133
1133
|
// Xiaomi Mi
|
|
1134
1134
|
],
|
|
1135
|
-
[[l, /_/g, " "], [u,
|
|
1135
|
+
[[l, /_/g, " "], [u, $e], [d, b]],
|
|
1136
1136
|
[
|
|
1137
1137
|
/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,
|
|
1138
1138
|
// Redmi Pad
|
|
1139
1139
|
/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i
|
|
1140
1140
|
// Mi Pad tablets
|
|
1141
1141
|
],
|
|
1142
|
-
[[l, /_/g, " "], [u,
|
|
1142
|
+
[[l, /_/g, " "], [u, $e], [d, f]],
|
|
1143
1143
|
[
|
|
1144
1144
|
// OPPO
|
|
1145
1145
|
/; (\w+) bui.+ oppo/i,
|
|
@@ -1167,28 +1167,28 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1167
1167
|
/\bmot(?:orola)?[- ](\w*)/i,
|
|
1168
1168
|
/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
|
|
1169
1169
|
],
|
|
1170
|
-
[l, [u,
|
|
1170
|
+
[l, [u, ft], [d, b]],
|
|
1171
1171
|
[
|
|
1172
1172
|
/\b(mz60\d|xoom[2 ]{0,2}) build\//i
|
|
1173
1173
|
],
|
|
1174
|
-
[l, [u,
|
|
1174
|
+
[l, [u, ft], [d, f]],
|
|
1175
1175
|
[
|
|
1176
1176
|
// LG
|
|
1177
1177
|
/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
|
|
1178
1178
|
],
|
|
1179
|
-
[l, [u,
|
|
1179
|
+
[l, [u, We], [d, f]],
|
|
1180
1180
|
[
|
|
1181
1181
|
/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
|
|
1182
1182
|
/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
|
|
1183
1183
|
/\blg-?([\d\w]+) bui/i
|
|
1184
1184
|
],
|
|
1185
|
-
[l, [u,
|
|
1185
|
+
[l, [u, We], [d, b]],
|
|
1186
1186
|
[
|
|
1187
1187
|
// Lenovo
|
|
1188
1188
|
/(ideatab[-\w ]+)/i,
|
|
1189
1189
|
/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i
|
|
1190
1190
|
],
|
|
1191
|
-
[l, [u,
|
|
1191
|
+
[l, [u, bt], [d, f]],
|
|
1192
1192
|
[
|
|
1193
1193
|
// Nokia
|
|
1194
1194
|
/(?:maemo|nokia).*(n900|lumia \d+)/i,
|
|
@@ -1200,22 +1200,22 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1200
1200
|
/(pixel c)\b/i
|
|
1201
1201
|
// Google Pixel C
|
|
1202
1202
|
],
|
|
1203
|
-
[l, [u,
|
|
1203
|
+
[l, [u, Ce], [d, f]],
|
|
1204
1204
|
[
|
|
1205
1205
|
/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
|
|
1206
1206
|
// Google Pixel
|
|
1207
1207
|
],
|
|
1208
|
-
[l, [u,
|
|
1208
|
+
[l, [u, Ce], [d, b]],
|
|
1209
1209
|
[
|
|
1210
1210
|
// Sony
|
|
1211
1211
|
/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i
|
|
1212
1212
|
],
|
|
1213
|
-
[l, [u,
|
|
1213
|
+
[l, [u, Se], [d, b]],
|
|
1214
1214
|
[
|
|
1215
1215
|
/sony tablet [ps]/i,
|
|
1216
1216
|
/\b(?:sony)?sgp\w+(?: bui|\))/i
|
|
1217
1217
|
],
|
|
1218
|
-
[[l, "Xperia Tablet"], [u,
|
|
1218
|
+
[[l, "Xperia Tablet"], [u, Se], [d, f]],
|
|
1219
1219
|
[
|
|
1220
1220
|
// OnePlus
|
|
1221
1221
|
/ (kb2005|in20[12]5|be20[12][59])\b/i,
|
|
@@ -1230,12 +1230,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1230
1230
|
/(kf[a-z]+)( bui|\)).+silk\//i
|
|
1231
1231
|
// Kindle Fire HD
|
|
1232
1232
|
],
|
|
1233
|
-
[l, [u,
|
|
1233
|
+
[l, [u, ve], [d, f]],
|
|
1234
1234
|
[
|
|
1235
1235
|
/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
|
|
1236
1236
|
// Fire Phone
|
|
1237
1237
|
],
|
|
1238
|
-
[[l, /(.+)/g, "Fire Phone $1"], [u,
|
|
1238
|
+
[[l, /(.+)/g, "Fire Phone $1"], [u, ve], [d, b]],
|
|
1239
1239
|
[
|
|
1240
1240
|
// BlackBerry
|
|
1241
1241
|
/(playbook);[-\w\),; ]+(rim)/i
|
|
@@ -1247,16 +1247,16 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1247
1247
|
/\(bb10; (\w+)/i
|
|
1248
1248
|
// BlackBerry 10
|
|
1249
1249
|
],
|
|
1250
|
-
[l, [u,
|
|
1250
|
+
[l, [u, mt], [d, b]],
|
|
1251
1251
|
[
|
|
1252
1252
|
// Asus
|
|
1253
1253
|
/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
|
|
1254
1254
|
],
|
|
1255
|
-
[l, [u,
|
|
1255
|
+
[l, [u, gt], [d, f]],
|
|
1256
1256
|
[
|
|
1257
1257
|
/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
|
|
1258
1258
|
],
|
|
1259
|
-
[l, [u,
|
|
1259
|
+
[l, [u, gt], [d, b]],
|
|
1260
1260
|
[
|
|
1261
1261
|
// HTC
|
|
1262
1262
|
/(nexus 9)/i
|
|
@@ -1321,7 +1321,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1321
1321
|
/(surface duo)/i
|
|
1322
1322
|
// Surface Duo
|
|
1323
1323
|
],
|
|
1324
|
-
[l, [u,
|
|
1324
|
+
[l, [u, Oe], [d, f]],
|
|
1325
1325
|
[
|
|
1326
1326
|
/droid [\d\.]+; (fp\du?)(?: b|\))/i
|
|
1327
1327
|
// Fairphone
|
|
@@ -1341,16 +1341,16 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1341
1341
|
/(kin\.[onetw]{3})/i
|
|
1342
1342
|
// Microsoft Kin
|
|
1343
1343
|
],
|
|
1344
|
-
[[l, /\./g, " "], [u,
|
|
1344
|
+
[[l, /\./g, " "], [u, Oe], [d, b]],
|
|
1345
1345
|
[
|
|
1346
1346
|
/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
|
|
1347
1347
|
// Zebra
|
|
1348
1348
|
],
|
|
1349
|
-
[l, [u,
|
|
1349
|
+
[l, [u, je], [d, f]],
|
|
1350
1350
|
[
|
|
1351
1351
|
/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
|
|
1352
1352
|
],
|
|
1353
|
-
[l, [u,
|
|
1353
|
+
[l, [u, je], [d, b]],
|
|
1354
1354
|
[
|
|
1355
1355
|
///////////////////
|
|
1356
1356
|
// SMARTTVS
|
|
@@ -1362,12 +1362,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1362
1362
|
[
|
|
1363
1363
|
/hbbtv.+maple;(\d+)/i
|
|
1364
1364
|
],
|
|
1365
|
-
[[l, /^/, "SmartTV"], [u,
|
|
1365
|
+
[[l, /^/, "SmartTV"], [u, Me], [d, I]],
|
|
1366
1366
|
[
|
|
1367
1367
|
/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
|
|
1368
1368
|
// LG SmartTV
|
|
1369
1369
|
],
|
|
1370
|
-
[[u,
|
|
1370
|
+
[[u, We], [d, I]],
|
|
1371
1371
|
[
|
|
1372
1372
|
/(apple) ?tv/i
|
|
1373
1373
|
// Apple TV
|
|
@@ -1377,28 +1377,28 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1377
1377
|
/crkey/i
|
|
1378
1378
|
// Google Chromecast
|
|
1379
1379
|
],
|
|
1380
|
-
[[l,
|
|
1380
|
+
[[l, Ie + "cast"], [u, Ce], [d, I]],
|
|
1381
1381
|
[
|
|
1382
1382
|
/droid.+aft(\w+)( bui|\))/i
|
|
1383
1383
|
// Fire TV
|
|
1384
1384
|
],
|
|
1385
|
-
[l, [u,
|
|
1385
|
+
[l, [u, ve], [d, I]],
|
|
1386
1386
|
[
|
|
1387
1387
|
/\(dtv[\);].+(aquos)/i,
|
|
1388
1388
|
/(aquos-tv[\w ]+)\)/i
|
|
1389
1389
|
// Sharp
|
|
1390
1390
|
],
|
|
1391
|
-
[l, [u,
|
|
1391
|
+
[l, [u, yt], [d, I]],
|
|
1392
1392
|
[
|
|
1393
1393
|
/(bravia[\w ]+)( bui|\))/i
|
|
1394
1394
|
// Sony
|
|
1395
1395
|
],
|
|
1396
|
-
[l, [u,
|
|
1396
|
+
[l, [u, Se], [d, I]],
|
|
1397
1397
|
[
|
|
1398
1398
|
/(mitv-\w{5}) bui/i
|
|
1399
1399
|
// Xiaomi
|
|
1400
1400
|
],
|
|
1401
|
-
[l, [u,
|
|
1401
|
+
[l, [u, $e], [d, I]],
|
|
1402
1402
|
[
|
|
1403
1403
|
/Hbbtv.*(technisat) (.*);/i
|
|
1404
1404
|
// TechniSAT
|
|
@@ -1435,12 +1435,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1435
1435
|
/(playstation \w+)/i
|
|
1436
1436
|
// Playstation
|
|
1437
1437
|
],
|
|
1438
|
-
[l, [u,
|
|
1438
|
+
[l, [u, Se], [d, J]],
|
|
1439
1439
|
[
|
|
1440
1440
|
/\b(xbox(?: one)?(?!; xbox))[\); ]/i
|
|
1441
1441
|
// Microsoft Xbox
|
|
1442
1442
|
],
|
|
1443
|
-
[l, [u,
|
|
1443
|
+
[l, [u, Oe], [d, J]],
|
|
1444
1444
|
[
|
|
1445
1445
|
///////////////////
|
|
1446
1446
|
// WEARABLES
|
|
@@ -1448,16 +1448,16 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1448
1448
|
/((pebble))app/i
|
|
1449
1449
|
// Pebble
|
|
1450
1450
|
],
|
|
1451
|
-
[u, l, [d,
|
|
1451
|
+
[u, l, [d, Ae]],
|
|
1452
1452
|
[
|
|
1453
1453
|
/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
|
|
1454
1454
|
// Apple Watch
|
|
1455
1455
|
],
|
|
1456
|
-
[l, [u, he], [d,
|
|
1456
|
+
[l, [u, he], [d, Ae]],
|
|
1457
1457
|
[
|
|
1458
1458
|
/droid.+; (wt63?0{2,3})\)/i
|
|
1459
1459
|
],
|
|
1460
|
-
[l, [u,
|
|
1460
|
+
[l, [u, je], [d, Ae]],
|
|
1461
1461
|
[
|
|
1462
1462
|
///////////////////
|
|
1463
1463
|
// XR
|
|
@@ -1465,12 +1465,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1465
1465
|
/droid.+; (glass) \d/i
|
|
1466
1466
|
// Google Glass
|
|
1467
1467
|
],
|
|
1468
|
-
[l, [u,
|
|
1468
|
+
[l, [u, Ce], [d, ht]],
|
|
1469
1469
|
[
|
|
1470
1470
|
/(quest( \d| pro)?)/i
|
|
1471
1471
|
// Oculus Quest
|
|
1472
1472
|
],
|
|
1473
|
-
[l, [u,
|
|
1473
|
+
[l, [u, kt], [d, ht]],
|
|
1474
1474
|
[
|
|
1475
1475
|
///////////////////
|
|
1476
1476
|
// EMBEDDED
|
|
@@ -1478,12 +1478,12 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1478
1478
|
/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
|
|
1479
1479
|
// Tesla
|
|
1480
1480
|
],
|
|
1481
|
-
[u, [d,
|
|
1481
|
+
[u, [d, Ze]],
|
|
1482
1482
|
[
|
|
1483
1483
|
/(aeobc)\b/i
|
|
1484
1484
|
// Echo Dot
|
|
1485
1485
|
],
|
|
1486
|
-
[l, [u,
|
|
1486
|
+
[l, [u, ve], [d, Ze]],
|
|
1487
1487
|
[
|
|
1488
1488
|
////////////////////
|
|
1489
1489
|
// MIXED (GENERIC)
|
|
@@ -1518,7 +1518,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1518
1518
|
/windows.+ edge\/([\w\.]+)/i
|
|
1519
1519
|
// EdgeHTML
|
|
1520
1520
|
],
|
|
1521
|
-
[c, [r,
|
|
1521
|
+
[c, [r, di + "HTML"]],
|
|
1522
1522
|
[
|
|
1523
1523
|
/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i
|
|
1524
1524
|
// Blink
|
|
@@ -1555,14 +1555,14 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1555
1555
|
/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i
|
|
1556
1556
|
// Windows Phone
|
|
1557
1557
|
],
|
|
1558
|
-
[r, [c,
|
|
1558
|
+
[r, [c, Re, Ct]],
|
|
1559
1559
|
[
|
|
1560
1560
|
/windows nt 6\.2; (arm)/i,
|
|
1561
1561
|
// Windows RT
|
|
1562
1562
|
/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,
|
|
1563
1563
|
/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
|
|
1564
1564
|
],
|
|
1565
|
-
[[c,
|
|
1565
|
+
[[c, Re, Ct], [r, tt]],
|
|
1566
1566
|
[
|
|
1567
1567
|
// iOS/macOS
|
|
1568
1568
|
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
|
|
@@ -1598,7 +1598,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1598
1598
|
/\(bb(10);/i
|
|
1599
1599
|
// BlackBerry 10
|
|
1600
1600
|
],
|
|
1601
|
-
[c, [r,
|
|
1601
|
+
[c, [r, mt]],
|
|
1602
1602
|
[
|
|
1603
1603
|
/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i
|
|
1604
1604
|
// Symbian
|
|
@@ -1625,7 +1625,7 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1625
1625
|
/crkey\/([\d\.]+)/i
|
|
1626
1626
|
// Google Chromecast
|
|
1627
1627
|
],
|
|
1628
|
-
[c, [r,
|
|
1628
|
+
[c, [r, Ie + "cast"]],
|
|
1629
1629
|
[
|
|
1630
1630
|
/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i
|
|
1631
1631
|
// Chromium OS
|
|
@@ -1680,48 +1680,48 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1680
1680
|
],
|
|
1681
1681
|
[r, c]
|
|
1682
1682
|
]
|
|
1683
|
-
},
|
|
1683
|
+
}, Te = function() {
|
|
1684
1684
|
var s = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
|
|
1685
|
-
return
|
|
1685
|
+
return B.call(s.init, [
|
|
1686
1686
|
[T, [r, c, we, d]],
|
|
1687
|
-
[
|
|
1687
|
+
[U, [M]],
|
|
1688
1688
|
[x, [d, l, u]],
|
|
1689
|
-
[
|
|
1689
|
+
[_, [r, c]],
|
|
1690
1690
|
[P, [r, c]]
|
|
1691
|
-
]),
|
|
1691
|
+
]), B.call(s.isIgnore, [
|
|
1692
1692
|
[T, [c, we]],
|
|
1693
|
-
[
|
|
1693
|
+
[_, [c]],
|
|
1694
1694
|
[P, [c]]
|
|
1695
|
-
]),
|
|
1695
|
+
]), B.call(s.isIgnoreRgx, [
|
|
1696
1696
|
[T, / ?browser$/i],
|
|
1697
1697
|
[P, / ?os$/i]
|
|
1698
|
-
]),
|
|
1698
|
+
]), B.call(s.toString, [
|
|
1699
1699
|
[T, [r, c]],
|
|
1700
|
-
[
|
|
1700
|
+
[U, [M]],
|
|
1701
1701
|
[x, [u, l]],
|
|
1702
|
-
[
|
|
1702
|
+
[_, [r, c]],
|
|
1703
1703
|
[P, [r, c]]
|
|
1704
1704
|
]), s;
|
|
1705
|
-
}(),
|
|
1706
|
-
var e =
|
|
1705
|
+
}(), hi = function(s, t) {
|
|
1706
|
+
var e = Te.init[t], i = Te.isIgnore[t] || 0, a = Te.isIgnoreRgx[t] || 0, o = Te.toString[t] || 0;
|
|
1707
1707
|
function n() {
|
|
1708
|
-
|
|
1708
|
+
B.call(this, e);
|
|
1709
1709
|
}
|
|
1710
1710
|
return n.prototype.getItem = function() {
|
|
1711
1711
|
return s;
|
|
1712
1712
|
}, n.prototype.withClientHints = function() {
|
|
1713
|
-
return
|
|
1714
|
-
return s.setCH(new
|
|
1713
|
+
return D ? D.getHighEntropyValues(Bt).then(function(h) {
|
|
1714
|
+
return s.setCH(new Ft(h, !1)).parseCH().get();
|
|
1715
1715
|
}) : s.parseCH().get();
|
|
1716
1716
|
}, n.prototype.withFeatureCheck = function() {
|
|
1717
1717
|
return s.detectFeature().get();
|
|
1718
1718
|
}, t != Z && (n.prototype.is = function(h) {
|
|
1719
1719
|
var p = !1;
|
|
1720
1720
|
for (var w in this)
|
|
1721
|
-
if (this.hasOwnProperty(w) && !
|
|
1722
|
-
if (p = !0, h !=
|
|
1721
|
+
if (this.hasOwnProperty(w) && !it(i, w) && H(a ? $(a, this[w]) : this[w]) == H(a ? $(a, h) : h)) {
|
|
1722
|
+
if (p = !0, h != G)
|
|
1723
1723
|
break;
|
|
1724
|
-
} else if (h ==
|
|
1724
|
+
} else if (h == G && p) {
|
|
1725
1725
|
p = !p;
|
|
1726
1726
|
break;
|
|
1727
1727
|
}
|
|
@@ -1729,9 +1729,9 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1729
1729
|
}, n.prototype.toString = function() {
|
|
1730
1730
|
var h = re;
|
|
1731
1731
|
for (var p in o)
|
|
1732
|
-
typeof this[o[p]] !==
|
|
1733
|
-
return h ||
|
|
1734
|
-
}),
|
|
1732
|
+
typeof this[o[p]] !== G && (h += (h ? " " : re) + this[o[p]]);
|
|
1733
|
+
return h || G;
|
|
1734
|
+
}), D || (n.prototype.then = function(h) {
|
|
1735
1735
|
var p = this, w = function() {
|
|
1736
1736
|
for (var k in p)
|
|
1737
1737
|
p.hasOwnProperty(k) && (this[k] = p[k]);
|
|
@@ -1744,24 +1744,24 @@ var Zt = "2.0.0-beta.3", re = "", dt = "?", Ke = "function", H = "undefined", ce
|
|
|
1744
1744
|
return h(g), g;
|
|
1745
1745
|
}), new n();
|
|
1746
1746
|
};
|
|
1747
|
-
function
|
|
1748
|
-
if (s = s || {},
|
|
1749
|
-
|
|
1750
|
-
[
|
|
1751
|
-
[
|
|
1752
|
-
[b, /\?1/.test(s[
|
|
1753
|
-
[l, me(s[
|
|
1754
|
-
[Y, me(s[
|
|
1755
|
-
[
|
|
1756
|
-
[M, me(s[
|
|
1757
|
-
[W,
|
|
1758
|
-
[
|
|
1747
|
+
function Ft(s, t) {
|
|
1748
|
+
if (s = s || {}, B.call(this, Bt), t)
|
|
1749
|
+
B.call(this, [
|
|
1750
|
+
[st, Qe(s[z])],
|
|
1751
|
+
[at, Qe(s[ii])],
|
|
1752
|
+
[b, /\?1/.test(s[oi])],
|
|
1753
|
+
[l, me(s[ri])],
|
|
1754
|
+
[Y, me(s[_t])],
|
|
1755
|
+
[nt, me(s[ci])],
|
|
1756
|
+
[M, me(s[si])],
|
|
1757
|
+
[W, Qe(s[ni])],
|
|
1758
|
+
[De, me(s[ai])]
|
|
1759
1759
|
]);
|
|
1760
1760
|
else
|
|
1761
1761
|
for (var e in s)
|
|
1762
|
-
this.hasOwnProperty(e) && typeof s[e] !==
|
|
1762
|
+
this.hasOwnProperty(e) && typeof s[e] !== G && (this[e] = s[e]);
|
|
1763
1763
|
}
|
|
1764
|
-
function
|
|
1764
|
+
function It(s, t, e, i) {
|
|
1765
1765
|
return this.get = function(a) {
|
|
1766
1766
|
return a ? this.data.hasOwnProperty(a) ? this.data[a] : void 0 : this.data;
|
|
1767
1767
|
}, this.set = function(a, o) {
|
|
@@ -1772,112 +1772,112 @@ function Mt(s, t, e, i) {
|
|
|
1772
1772
|
if (S && S.userAgent == this.ua)
|
|
1773
1773
|
switch (this.itemType) {
|
|
1774
1774
|
case T:
|
|
1775
|
-
S.brave && typeof S.brave.isBrave ==
|
|
1775
|
+
S.brave && typeof S.brave.isBrave == Je && this.set(r, "Brave");
|
|
1776
1776
|
break;
|
|
1777
1777
|
case x:
|
|
1778
|
-
!this.get(d) &&
|
|
1778
|
+
!this.get(d) && D && D[b] && this.set(d, b), this.get(l) == "Macintosh" && S && typeof S.standalone !== G && S.maxTouchPoints && S.maxTouchPoints > 2 && this.set(l, "iPad").set(d, f);
|
|
1779
1779
|
break;
|
|
1780
1780
|
case P:
|
|
1781
|
-
!this.get(r) &&
|
|
1781
|
+
!this.get(r) && D && D[Y] && this.set(r, D[Y]);
|
|
1782
1782
|
break;
|
|
1783
1783
|
case Z:
|
|
1784
1784
|
var a = this.data, o = function(n) {
|
|
1785
1785
|
return a[n].getItem().detectFeature().get();
|
|
1786
1786
|
};
|
|
1787
|
-
this.set(T, o(T)).set(
|
|
1787
|
+
this.set(T, o(T)).set(U, o(U)).set(x, o(x)).set(_, o(_)).set(P, o(P));
|
|
1788
1788
|
}
|
|
1789
1789
|
return this;
|
|
1790
1790
|
}, this.parseUA = function() {
|
|
1791
|
-
return this.itemType != Z &&
|
|
1791
|
+
return this.itemType != Z && vt.call(this.data, this.ua, this.rgxMap), this.itemType == T && this.set(we, Xe(this.get(c))), this;
|
|
1792
1792
|
}, this.parseCH = function() {
|
|
1793
1793
|
var a = this.uaCH, o = this.rgxMap;
|
|
1794
1794
|
switch (this.itemType) {
|
|
1795
1795
|
case T:
|
|
1796
|
-
var n = a[
|
|
1796
|
+
var n = a[at] || a[st], h;
|
|
1797
1797
|
if (n)
|
|
1798
1798
|
for (var p in n) {
|
|
1799
1799
|
var w = $(/(Google|Microsoft) /, n[p].brand || n[p]), g = n[p].version;
|
|
1800
|
-
!/not.a.brand/i.test(w) && (!h || /chrom/i.test(h) && !/chromi/i.test(w)) && (this.set(r, w).set(c, g).set(we,
|
|
1800
|
+
!/not.a.brand/i.test(w) && (!h || /chrom/i.test(h) && !/chromi/i.test(w)) && (this.set(r, w).set(c, g).set(we, Xe(g)), h = w);
|
|
1801
1801
|
}
|
|
1802
1802
|
break;
|
|
1803
|
-
case
|
|
1803
|
+
case U:
|
|
1804
1804
|
var k = a[M];
|
|
1805
|
-
k && (k && a[
|
|
1805
|
+
k && (k && a[De] == "64" && (k += "64"), vt.call(this.data, k + ";", o));
|
|
1806
1806
|
break;
|
|
1807
1807
|
case x:
|
|
1808
|
-
if (a[b] && this.set(d, b), a[l] && this.set(l, a[l]), a[l] == "Xbox" && this.set(d, J).set(u,
|
|
1809
|
-
var
|
|
1808
|
+
if (a[b] && this.set(d, b), a[l] && this.set(l, a[l]), a[l] == "Xbox" && this.set(d, J).set(u, Oe), a[W]) {
|
|
1809
|
+
var F;
|
|
1810
1810
|
if (typeof a[W] != "string")
|
|
1811
|
-
for (var j = 0; !
|
|
1812
|
-
|
|
1811
|
+
for (var j = 0; !F && j < a[W].length; )
|
|
1812
|
+
F = Re(a[W][j++], Mt);
|
|
1813
1813
|
else
|
|
1814
|
-
|
|
1815
|
-
this.set(d,
|
|
1814
|
+
F = Re(a[W], Mt);
|
|
1815
|
+
this.set(d, F);
|
|
1816
1816
|
}
|
|
1817
1817
|
break;
|
|
1818
1818
|
case P:
|
|
1819
1819
|
var Q = a[Y];
|
|
1820
1820
|
if (Q) {
|
|
1821
|
-
var L = a[
|
|
1822
|
-
Q ==
|
|
1821
|
+
var L = a[nt];
|
|
1822
|
+
Q == tt && (L = parseInt(Xe(L), 10) >= 13 ? "11" : "10"), this.set(r, Q).set(c, L);
|
|
1823
1823
|
}
|
|
1824
|
-
this.get(r) ==
|
|
1824
|
+
this.get(r) == tt && a[l] == "Xbox" && this.set(r, "Xbox").set(c, void 0);
|
|
1825
1825
|
break;
|
|
1826
1826
|
case Z:
|
|
1827
|
-
var le = this.data, A = function(
|
|
1828
|
-
return le[
|
|
1827
|
+
var le = this.data, A = function(Ee) {
|
|
1828
|
+
return le[Ee].getItem().setCH(a).parseCH().get();
|
|
1829
1829
|
};
|
|
1830
|
-
this.set(T, A(T)).set(
|
|
1830
|
+
this.set(T, A(T)).set(U, A(U)).set(x, A(x)).set(_, A(_)).set(P, A(P));
|
|
1831
1831
|
}
|
|
1832
1832
|
return this;
|
|
1833
|
-
},
|
|
1833
|
+
}, B.call(this, [
|
|
1834
1834
|
["itemType", s],
|
|
1835
1835
|
["ua", t],
|
|
1836
1836
|
["uaCH", i],
|
|
1837
1837
|
["rgxMap", e],
|
|
1838
|
-
["data",
|
|
1838
|
+
["data", hi(this, s)]
|
|
1839
1839
|
]), this;
|
|
1840
1840
|
}
|
|
1841
1841
|
function R(s, t, e) {
|
|
1842
|
-
if (typeof s === ce ? (
|
|
1842
|
+
if (typeof s === ce ? (xe(s, !0) ? (typeof t === ce && (e = t), t = s) : (e = s, t = void 0), s = void 0) : typeof s === Ye && !xe(t, !0) && (e = t, t = void 0), !(this instanceof R))
|
|
1843
1843
|
return new R(s, t, e).getResult();
|
|
1844
|
-
var i = typeof s ===
|
|
1844
|
+
var i = typeof s === Ye ? s : (
|
|
1845
1845
|
// Passed user-agent string
|
|
1846
1846
|
S && S.userAgent ? S.userAgent : (
|
|
1847
1847
|
// navigator.userAgent
|
|
1848
|
-
e && e[
|
|
1848
|
+
e && e[pt] ? e[pt] : (
|
|
1849
1849
|
// User-Agent from passed headers
|
|
1850
1850
|
re
|
|
1851
1851
|
)
|
|
1852
1852
|
)
|
|
1853
|
-
), a = new
|
|
1853
|
+
), a = new Ft(e, !0), o = t ? ui(St, t) : St, n = function(h) {
|
|
1854
1854
|
return h == Z ? function() {
|
|
1855
|
-
return new
|
|
1855
|
+
return new It(h, i, o, a).set("ua", i).set(T, this.getBrowser()).set(U, this.getCPU()).set(x, this.getDevice()).set(_, this.getEngine()).set(P, this.getOS()).get();
|
|
1856
1856
|
} : function() {
|
|
1857
|
-
return new
|
|
1857
|
+
return new It(h, i, o[h], a).parseUA().get();
|
|
1858
1858
|
};
|
|
1859
1859
|
};
|
|
1860
|
-
return
|
|
1860
|
+
return B.call(this, [
|
|
1861
1861
|
["getBrowser", n(T)],
|
|
1862
|
-
["getCPU", n(
|
|
1862
|
+
["getCPU", n(U)],
|
|
1863
1863
|
["getDevice", n(x)],
|
|
1864
|
-
["getEngine", n(
|
|
1864
|
+
["getEngine", n(_)],
|
|
1865
1865
|
["getOS", n(P)],
|
|
1866
1866
|
["getResult", n(Z)],
|
|
1867
1867
|
["getUA", function() {
|
|
1868
1868
|
return i;
|
|
1869
1869
|
}],
|
|
1870
1870
|
["setUA", function(h) {
|
|
1871
|
-
return de(h) && (i = h.length >
|
|
1871
|
+
return de(h) && (i = h.length > et ? be(h, et) : h), this;
|
|
1872
1872
|
}]
|
|
1873
1873
|
]).setUA(i), this;
|
|
1874
1874
|
}
|
|
1875
|
-
R.VERSION =
|
|
1876
|
-
R.BROWSER =
|
|
1877
|
-
R.CPU =
|
|
1878
|
-
R.DEVICE =
|
|
1879
|
-
R.ENGINE = R.OS =
|
|
1880
|
-
class
|
|
1875
|
+
R.VERSION = ti;
|
|
1876
|
+
R.BROWSER = Ne([r, c, we, d]);
|
|
1877
|
+
R.CPU = Ne([M]);
|
|
1878
|
+
R.DEVICE = Ne([l, u, d, J, b, I, f, Ae, Ze]);
|
|
1879
|
+
R.ENGINE = R.OS = Ne([r, c]);
|
|
1880
|
+
class pi {
|
|
1881
1881
|
constructor(t, e) {
|
|
1882
1882
|
m(this, "config");
|
|
1883
1883
|
m(this, "sdkConfig");
|
|
@@ -1896,7 +1896,7 @@ class ui {
|
|
|
1896
1896
|
});
|
|
1897
1897
|
}
|
|
1898
1898
|
}
|
|
1899
|
-
class
|
|
1899
|
+
class gi {
|
|
1900
1900
|
constructor(t) {
|
|
1901
1901
|
m(this, "socket", null);
|
|
1902
1902
|
m(this, "webSocketUrl");
|
|
@@ -1956,31 +1956,31 @@ class hi {
|
|
|
1956
1956
|
i !== -1 && this.eventListeners[t].splice(i, 1);
|
|
1957
1957
|
}
|
|
1958
1958
|
}
|
|
1959
|
-
function
|
|
1959
|
+
function Pe(s) {
|
|
1960
1960
|
return JSON.parse(s == null ? void 0 : s.data);
|
|
1961
1961
|
}
|
|
1962
|
-
function
|
|
1962
|
+
function mi(s) {
|
|
1963
1963
|
var t;
|
|
1964
1964
|
return ((t = s == null ? void 0 : s.header) == null ? void 0 : t.name) === "Ping";
|
|
1965
1965
|
}
|
|
1966
|
-
function
|
|
1966
|
+
function Tt(s) {
|
|
1967
1967
|
var t;
|
|
1968
1968
|
return ((t = s == null ? void 0 : s.header) == null ? void 0 : t.name) === "RealityCheck";
|
|
1969
1969
|
}
|
|
1970
|
-
function
|
|
1970
|
+
function Le(s) {
|
|
1971
1971
|
return s.header.name === "GameEvent";
|
|
1972
1972
|
}
|
|
1973
|
-
function
|
|
1974
|
-
return
|
|
1973
|
+
function wi(s) {
|
|
1974
|
+
return Le(s) && s.body.event === "OPEN_GAME";
|
|
1975
1975
|
}
|
|
1976
|
-
function
|
|
1976
|
+
function Pt(s) {
|
|
1977
1977
|
return s.header.code !== 1;
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1980
|
-
return
|
|
1979
|
+
function bi(s) {
|
|
1980
|
+
return Le(s) && s.body.event.includes("_RESULT");
|
|
1981
1981
|
}
|
|
1982
1982
|
var ee, fe;
|
|
1983
|
-
class
|
|
1983
|
+
class fi extends gi {
|
|
1984
1984
|
constructor(e, i) {
|
|
1985
1985
|
const a = new URL(e.apiUrl);
|
|
1986
1986
|
a.searchParams.set("cageCode", e.cageCode), a.searchParams.set("gameCode", e.gameCode), a.searchParams.set("operatorCode", e.operatorCode), a.searchParams.set("playMode", e.playMode), a.searchParams.set("token", e.token), a.searchParams.set("username", e.username);
|
|
@@ -2017,8 +2017,8 @@ class wi extends hi {
|
|
|
2017
2017
|
C(this, ee, void 0);
|
|
2018
2018
|
C(this, fe, void 0);
|
|
2019
2019
|
m(this, "onMessage", (e) => {
|
|
2020
|
-
const i =
|
|
2021
|
-
(
|
|
2020
|
+
const i = Pe(e);
|
|
2021
|
+
(Le(i) || mi(i) || Tt(i)) && this.sendAcknowledgement(i), Tt(i) && this.handleRealityCheck(i);
|
|
2022
2022
|
});
|
|
2023
2023
|
this.eventListeners.realityCheck = [], this.gameCode = e.gameCode, E(this, ee, i.requestTimeoutMs), E(this, fe, i.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
|
|
2024
2024
|
}
|
|
@@ -2060,7 +2060,7 @@ class wi extends hi {
|
|
|
2060
2060
|
return new Promise((o, n) => {
|
|
2061
2061
|
setTimeout(() => n({ type: "timeout" }), y(this, ee));
|
|
2062
2062
|
const h = (p) => {
|
|
2063
|
-
const w =
|
|
2063
|
+
const w = Pe(p);
|
|
2064
2064
|
try {
|
|
2065
2065
|
e.cId === w.header.cId && (this.removeEventListener("message", h), w.header.code === 1 ? o(w) : n({ message: w, type: "error" }));
|
|
2066
2066
|
} catch {
|
|
@@ -2094,8 +2094,8 @@ class wi extends hi {
|
|
|
2094
2094
|
};
|
|
2095
2095
|
return new Promise((a, o) => {
|
|
2096
2096
|
const n = (h) => {
|
|
2097
|
-
const p =
|
|
2098
|
-
|
|
2097
|
+
const p = Pe(h);
|
|
2098
|
+
wi(p) ? (this.removeEventListener("message", n), a(p.body)) : Pt(p) && o({ data: p.body, type: "error" });
|
|
2099
2099
|
};
|
|
2100
2100
|
this.addEventListener("message", n), this.request(e, i).catch(
|
|
2101
2101
|
(h) => {
|
|
@@ -2116,8 +2116,8 @@ class wi extends hi {
|
|
|
2116
2116
|
};
|
|
2117
2117
|
return new Promise((n, h) => {
|
|
2118
2118
|
const p = (w) => {
|
|
2119
|
-
const g =
|
|
2120
|
-
|
|
2119
|
+
const g = Pe(w);
|
|
2120
|
+
Le(g) && o.seqId === g.body.correlationSeqId && (this.removeEventListener("message", p), bi(g) ? n(g.body) : Pt(g) && h({ data: g.body, type: "error" }));
|
|
2121
2121
|
};
|
|
2122
2122
|
this.addEventListener("message", p), this.request(a, o).catch(
|
|
2123
2123
|
(w) => {
|
|
@@ -2132,7 +2132,7 @@ class wi extends hi {
|
|
|
2132
2132
|
}
|
|
2133
2133
|
}
|
|
2134
2134
|
ee = new WeakMap(), fe = new WeakMap();
|
|
2135
|
-
function
|
|
2135
|
+
function Dt(s) {
|
|
2136
2136
|
const t = s.contract;
|
|
2137
2137
|
return t ? {
|
|
2138
2138
|
contract: {
|
|
@@ -2162,15 +2162,15 @@ function Bt(s) {
|
|
|
2162
2162
|
}
|
|
2163
2163
|
};
|
|
2164
2164
|
}
|
|
2165
|
-
function
|
|
2165
|
+
function Nt(s) {
|
|
2166
2166
|
var t, e;
|
|
2167
2167
|
return {
|
|
2168
2168
|
// SDK error codes are the same as RGS error codes so we don't need any mapping here
|
|
2169
|
-
code: ((t = s.data) == null ? void 0 : t.code) ??
|
|
2169
|
+
code: ((t = s.data) == null ? void 0 : t.code) ?? Fe.UNKNOWN,
|
|
2170
2170
|
details: (e = s.data) == null ? void 0 : e.details
|
|
2171
2171
|
};
|
|
2172
2172
|
}
|
|
2173
|
-
function
|
|
2173
|
+
function Gt(s, t) {
|
|
2174
2174
|
const e = t.contract;
|
|
2175
2175
|
if (!e) {
|
|
2176
2176
|
const i = t.data;
|
|
@@ -2290,15 +2290,15 @@ function Dt(s, t) {
|
|
|
2290
2290
|
data: t.opaqueGameServerToUi
|
|
2291
2291
|
};
|
|
2292
2292
|
}
|
|
2293
|
-
function
|
|
2293
|
+
function Ht(s) {
|
|
2294
2294
|
var t, e;
|
|
2295
2295
|
return {
|
|
2296
2296
|
// SDK error codes are the same as RGS error codes so we don't need any mapping here
|
|
2297
|
-
code: ((t = s.data) == null ? void 0 : t.code) ??
|
|
2297
|
+
code: ((t = s.data) == null ? void 0 : t.code) ?? Fe.UNKNOWN,
|
|
2298
2298
|
details: (e = s.data) == null ? void 0 : e.details
|
|
2299
2299
|
};
|
|
2300
2300
|
}
|
|
2301
|
-
function
|
|
2301
|
+
function Vt(s) {
|
|
2302
2302
|
const t = s.contract;
|
|
2303
2303
|
if (!t) {
|
|
2304
2304
|
const e = s.data;
|
|
@@ -2398,22 +2398,22 @@ function Gt(s) {
|
|
|
2398
2398
|
data: s.opaqueGameServerToUi
|
|
2399
2399
|
};
|
|
2400
2400
|
}
|
|
2401
|
-
function
|
|
2401
|
+
function zt(s) {
|
|
2402
2402
|
var t, e;
|
|
2403
2403
|
return {
|
|
2404
2404
|
// SDK error codes are the same as RGS error codes so we don't need any mapping here
|
|
2405
|
-
code: ((t = s.data) == null ? void 0 : t.code) ??
|
|
2405
|
+
code: ((t = s.data) == null ? void 0 : t.code) ?? Fe.UNKNOWN,
|
|
2406
2406
|
details: (e = s.data) == null ? void 0 : e.details
|
|
2407
2407
|
};
|
|
2408
2408
|
}
|
|
2409
|
-
const
|
|
2410
|
-
parseAuthenticateResponse:
|
|
2411
|
-
parseAuthenticateError:
|
|
2412
|
-
parseOpenGameResponse:
|
|
2413
|
-
parseOpenGameError:
|
|
2414
|
-
parsePlayResponse:
|
|
2415
|
-
parsePlayError:
|
|
2416
|
-
},
|
|
2409
|
+
const Gi = {
|
|
2410
|
+
parseAuthenticateResponse: Dt,
|
|
2411
|
+
parseAuthenticateError: Nt,
|
|
2412
|
+
parseOpenGameResponse: Gt,
|
|
2413
|
+
parseOpenGameError: Ht,
|
|
2414
|
+
parsePlayResponse: Vt,
|
|
2415
|
+
parsePlayError: zt
|
|
2416
|
+
}, yi = {
|
|
2417
2417
|
bul: "bg",
|
|
2418
2418
|
chi: "zh",
|
|
2419
2419
|
zho: "zh",
|
|
@@ -2445,8 +2445,8 @@ const Di = {
|
|
|
2445
2445
|
tur: "tr",
|
|
2446
2446
|
ukr: "uk",
|
|
2447
2447
|
vie: "vi"
|
|
2448
|
-
}, { device:
|
|
2449
|
-
class
|
|
2448
|
+
}, { device: ki } = R(navigator.userAgent), Ei = O("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
|
|
2449
|
+
class Hi extends pi {
|
|
2450
2450
|
constructor(...e) {
|
|
2451
2451
|
super(...e);
|
|
2452
2452
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -2477,7 +2477,7 @@ class Ni extends ui {
|
|
|
2477
2477
|
}), this.registerFromSdkEvents();
|
|
2478
2478
|
}
|
|
2479
2479
|
initialize(e) {
|
|
2480
|
-
this.socket = new
|
|
2480
|
+
this.socket = new fi(e, {
|
|
2481
2481
|
gameVersion: this.config.gameVersion,
|
|
2482
2482
|
requestTimeoutMs: this.sdkConfig.ui.requestTimeoutMs
|
|
2483
2483
|
}), ["fireboltroulette"].includes(e.gameCode) || (this.socket.addEventListener("close", (i) => {
|
|
@@ -2486,9 +2486,9 @@ class Ni extends ui {
|
|
|
2486
2486
|
messageCode: "TOO_MANY_OPEN_GAMES",
|
|
2487
2487
|
messageKey: "RgsError.TOO_MANY_OPEN_GAMES"
|
|
2488
2488
|
}) : i.code === 1011 || this.reconnect();
|
|
2489
|
-
}), ["mobile", "tablet"].includes(
|
|
2489
|
+
}), ["mobile", "tablet"].includes(ki.type ?? "") && document.addEventListener("visibilitychange", async () => {
|
|
2490
2490
|
document.hidden || (this.socket.socket ? this.socket.socket && [WebSocket.CONNECTING, WebSocket.OPEN].includes(this.socket.socket.readyState) && this.socket.close() : this.reconnect());
|
|
2491
|
-
})), this.socket.addEventListener("error", (i) =>
|
|
2491
|
+
})), this.socket.addEventListener("error", (i) => Ei("error", i)), this.socket.addEventListener("realityCheck", (i) => {
|
|
2492
2492
|
this.send("realityCheck", i);
|
|
2493
2493
|
});
|
|
2494
2494
|
}
|
|
@@ -2500,26 +2500,27 @@ class Ni extends ui {
|
|
|
2500
2500
|
}
|
|
2501
2501
|
}
|
|
2502
2502
|
async openGame() {
|
|
2503
|
-
|
|
2503
|
+
var Ee, ot;
|
|
2504
|
+
const e = new URLSearchParams(window.location.search), i = e.get("apiUrl"), a = e.get("cageCode"), o = e.get("gameCode"), n = e.get("operatorCode"), h = e.get("playMode"), p = e.get("token"), w = e.get("username"), g = e.get("gameHistoryUrl"), k = e.get("homeUrl") ?? void 0, F = e.get("cashierUrl") ?? void 0;
|
|
2504
2505
|
this.initialize({ apiUrl: i, cageCode: a, gameCode: o, operatorCode: n, playMode: h, token: p, username: w });
|
|
2505
2506
|
try {
|
|
2506
2507
|
await this.socket.connect();
|
|
2507
2508
|
} catch {
|
|
2508
|
-
throw { type: "error", data: { code:
|
|
2509
|
+
throw { type: "error", data: { code: Fe.CONNECTION_ERROR } };
|
|
2509
2510
|
}
|
|
2510
2511
|
let j;
|
|
2511
2512
|
try {
|
|
2512
2513
|
j = await this.socket.authenticate();
|
|
2513
|
-
} catch (
|
|
2514
|
-
throw { type:
|
|
2514
|
+
} catch (q) {
|
|
2515
|
+
throw { type: q.type, data: q.type === "error" ? Nt(q.data) : void 0 };
|
|
2515
2516
|
}
|
|
2516
2517
|
let Q;
|
|
2517
2518
|
try {
|
|
2518
2519
|
Q = await this.socket.openGame();
|
|
2519
|
-
} catch (
|
|
2520
|
-
throw { type:
|
|
2520
|
+
} catch (q) {
|
|
2521
|
+
throw { type: q.type, data: q.type === "error" ? Ht(q.data) : void 0 };
|
|
2521
2522
|
}
|
|
2522
|
-
const L =
|
|
2523
|
+
const L = Dt(j), le = Gt(j, Q);
|
|
2523
2524
|
this.sdkConfig.api = {
|
|
2524
2525
|
...this.sdkConfig.api,
|
|
2525
2526
|
brand: a,
|
|
@@ -2536,12 +2537,12 @@ class Ni extends ui {
|
|
|
2536
2537
|
coinValueInCents: L.contract.coinValueInCents,
|
|
2537
2538
|
gameHistoryUrl: g,
|
|
2538
2539
|
homeUrl: k,
|
|
2539
|
-
cashierUrl:
|
|
2540
|
+
cashierUrl: F,
|
|
2540
2541
|
backendSessionId: le.contract.sessionId,
|
|
2541
2542
|
lastRoundId: le.contract.roundId
|
|
2542
2543
|
};
|
|
2543
|
-
const A = e.get("languageCode");
|
|
2544
|
-
return A && (this.sdkConfig.ui.language = A.length === 3 ?
|
|
2544
|
+
const A = (ot = (Ee = e.get("languageCode")) == null ? void 0 : Ee.split("_")) == null ? void 0 : ot[0];
|
|
2545
|
+
return A && (this.sdkConfig.ui.language = A.length === 3 ? yi[A] ?? A : A), le;
|
|
2545
2546
|
}
|
|
2546
2547
|
async play(e) {
|
|
2547
2548
|
for (; !this.socket.socket; )
|
|
@@ -2563,9 +2564,9 @@ class Ni extends ui {
|
|
|
2563
2564
|
try {
|
|
2564
2565
|
g = await this.socket.sendAction(p, w);
|
|
2565
2566
|
} catch (k) {
|
|
2566
|
-
throw { type: k.type, data: k.type === "error" ?
|
|
2567
|
+
throw { type: k.type, data: k.type === "error" ? zt(k.data) : void 0 };
|
|
2567
2568
|
}
|
|
2568
|
-
return
|
|
2569
|
+
return Vt(g);
|
|
2569
2570
|
}
|
|
2570
2571
|
registerFromSdkEvents() {
|
|
2571
2572
|
this.on("history", () => {
|
|
@@ -2577,7 +2578,7 @@ class Ni extends ui {
|
|
|
2577
2578
|
});
|
|
2578
2579
|
}
|
|
2579
2580
|
}
|
|
2580
|
-
class
|
|
2581
|
+
class vi {
|
|
2581
2582
|
constructor(t, e, i) {
|
|
2582
2583
|
m(this, "trackers");
|
|
2583
2584
|
m(this, "config");
|
|
@@ -2594,14 +2595,14 @@ class ki {
|
|
|
2594
2595
|
this.trackers.forEach((i) => i.track(t, e));
|
|
2595
2596
|
}
|
|
2596
2597
|
}
|
|
2597
|
-
function
|
|
2598
|
+
function At(s) {
|
|
2598
2599
|
return s.reduce((t, e) => t + e, 0);
|
|
2599
2600
|
}
|
|
2600
|
-
function
|
|
2601
|
-
const t = s.length, e =
|
|
2601
|
+
function Ci(s) {
|
|
2602
|
+
const t = s.length, e = At(s) / t, i = s.map((o) => Math.pow(o - e, 2)), a = At(i) / t;
|
|
2602
2603
|
return Math.sqrt(a);
|
|
2603
2604
|
}
|
|
2604
|
-
class
|
|
2605
|
+
class Ot {
|
|
2605
2606
|
constructor() {
|
|
2606
2607
|
m(this, "rafId", -1);
|
|
2607
2608
|
m(this, "startTime", 0);
|
|
@@ -2612,7 +2613,7 @@ class Pt {
|
|
|
2612
2613
|
return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, i, a, o) => (o[a] !== o[a - 1] ? e.push(1) : e[e.length - 1]++, e), []).slice(0, t);
|
|
2613
2614
|
});
|
|
2614
2615
|
m(this, "getReport", () => {
|
|
2615
|
-
const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), i = t.length > 0 ? Math.max(...t) : e, a = t.length > 0 ? Math.min(...t) : e, o = t.length > 0 ?
|
|
2616
|
+
const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), i = t.length > 0 ? Math.max(...t) : e, a = t.length > 0 ? Math.min(...t) : e, o = t.length > 0 ? Ci(t) : 0;
|
|
2616
2617
|
return { fpsAvg: e, fpsMax: i, fpsMin: a, fpsStdDev: o };
|
|
2617
2618
|
});
|
|
2618
2619
|
m(this, "start", () => {
|
|
@@ -2626,8 +2627,8 @@ class Pt {
|
|
|
2626
2627
|
});
|
|
2627
2628
|
}
|
|
2628
2629
|
}
|
|
2629
|
-
const
|
|
2630
|
-
function
|
|
2630
|
+
const Mi = "landscape", Si = "portrait";
|
|
2631
|
+
function Ii() {
|
|
2631
2632
|
try {
|
|
2632
2633
|
const s = document.createElement("canvas");
|
|
2633
2634
|
return !!window.WebGLRenderingContext && (s.getContext("webgl") || s.getContext("experimental-webgl")) instanceof WebGLRenderingContext;
|
|
@@ -2635,7 +2636,7 @@ function Mi() {
|
|
|
2635
2636
|
return !1;
|
|
2636
2637
|
}
|
|
2637
2638
|
}
|
|
2638
|
-
async function
|
|
2639
|
+
async function Ti() {
|
|
2639
2640
|
if (!window.createImageBitmap)
|
|
2640
2641
|
return !1;
|
|
2641
2642
|
const e = await (await fetch("data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA=")).blob();
|
|
@@ -2645,29 +2646,29 @@ async function Si() {
|
|
|
2645
2646
|
return !1;
|
|
2646
2647
|
}
|
|
2647
2648
|
}
|
|
2648
|
-
function
|
|
2649
|
-
return window.innerWidth >= window.innerHeight ?
|
|
2649
|
+
function Ke() {
|
|
2650
|
+
return window.innerWidth >= window.innerHeight ? Mi : Si;
|
|
2650
2651
|
}
|
|
2651
|
-
var
|
|
2652
|
-
class
|
|
2652
|
+
var Ue, te, ie, se, ye, _e, ke, Be;
|
|
2653
|
+
class Vi extends vi {
|
|
2653
2654
|
constructor(...e) {
|
|
2654
2655
|
super(...e);
|
|
2655
2656
|
m(this, "FPS_SAMPLE_INTERVAL", 1e4);
|
|
2656
2657
|
// wrapper state
|
|
2657
|
-
C(this,
|
|
2658
|
+
C(this, Ue, 0);
|
|
2658
2659
|
C(this, te, void 0);
|
|
2659
2660
|
C(this, ie, void 0);
|
|
2660
2661
|
C(this, se, void 0);
|
|
2661
2662
|
C(this, ye, !1);
|
|
2662
|
-
C(this,
|
|
2663
|
+
C(this, _e, !1);
|
|
2663
2664
|
C(this, ke, "");
|
|
2664
|
-
C(this,
|
|
2665
|
+
C(this, Be, []);
|
|
2665
2666
|
E(this, ie, {}), E(this, se, this.deviceInfo()), E(this, te, this.config.gameVersion), this.on("state", ({ balance: i }) => {
|
|
2666
|
-
E(this,
|
|
2667
|
+
E(this, Ue, i);
|
|
2667
2668
|
}), this.on("autoplay", ({ action: i }) => {
|
|
2668
2669
|
["start", "resume"].includes(i) ? E(this, ye, !0) : E(this, ye, !1);
|
|
2669
2670
|
}), this.on("settings", ({ fastPlay: i }) => {
|
|
2670
|
-
i !== void 0 && E(this,
|
|
2671
|
+
i !== void 0 && E(this, _e, i);
|
|
2671
2672
|
}), this.registerEvents();
|
|
2672
2673
|
}
|
|
2673
2674
|
async registerEvents() {
|
|
@@ -2712,7 +2713,7 @@ class Gi extends ki {
|
|
|
2712
2713
|
// testVariants: '',
|
|
2713
2714
|
}), this.track("Game Open", y(this, ie));
|
|
2714
2715
|
}), this.on("playCycleEnd", async (e) => {
|
|
2715
|
-
const i = await y(this, se), { base: a, multiplier: o, specialAction: n } = e.contract.bet.lastPaid ?? {}, h = e.contract.balance.coins, p = e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier, w = e.contract.win.total, g = w - p, k = n || "spin",
|
|
2716
|
+
const i = await y(this, se), { base: a, multiplier: o, specialAction: n } = e.contract.bet.lastPaid ?? {}, h = e.contract.balance.coins, p = e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier, w = e.contract.win.total, g = w - p, k = n || "spin", F = e.contract.roundId;
|
|
2716
2717
|
this.track("Betting Activity", {
|
|
2717
2718
|
balance: h - g,
|
|
2718
2719
|
balanceAfter: h,
|
|
@@ -2730,18 +2731,18 @@ class Gi extends ki {
|
|
|
2730
2731
|
isMobile: i.isMobile,
|
|
2731
2732
|
netResult: g,
|
|
2732
2733
|
operatorName: "kalamba",
|
|
2733
|
-
orientation:
|
|
2734
|
+
orientation: Ke(),
|
|
2734
2735
|
partnerId: this.sdkConfig.api.brand,
|
|
2735
2736
|
partnerParentId: this.sdkConfig.api.integration,
|
|
2736
2737
|
platform: "WEB",
|
|
2737
2738
|
playMode: this.sdkConfig.api.playMode,
|
|
2738
|
-
roundId:
|
|
2739
|
+
roundId: F,
|
|
2739
2740
|
// TODO: uncomment when tracking TrackingEvent.GameSpin is implemented
|
|
2740
2741
|
// roundTypes: [...this.#roundTypes],
|
|
2741
2742
|
roundTypes: ["BaseGame"],
|
|
2742
2743
|
totalBet: p,
|
|
2743
2744
|
totalWin: w
|
|
2744
|
-
}), E(this,
|
|
2745
|
+
}), E(this, Be, []);
|
|
2745
2746
|
}), this.on("telemetry.click", (e) => {
|
|
2746
2747
|
this.track("UI Interaction", {
|
|
2747
2748
|
action: "click",
|
|
@@ -2756,7 +2757,7 @@ class Gi extends ki {
|
|
|
2756
2757
|
}), this.reportFpsSample(), this.reportFpsRound();
|
|
2757
2758
|
}
|
|
2758
2759
|
reportFpsSample() {
|
|
2759
|
-
const e = new
|
|
2760
|
+
const e = new Ot(), i = () => {
|
|
2760
2761
|
e.stop();
|
|
2761
2762
|
const o = e.getReport();
|
|
2762
2763
|
this.track("FPS Performance", { ...o, fpsType: "sample" }), a();
|
|
@@ -2766,7 +2767,7 @@ class Gi extends ki {
|
|
|
2766
2767
|
a();
|
|
2767
2768
|
}
|
|
2768
2769
|
reportFpsRound() {
|
|
2769
|
-
const e = new
|
|
2770
|
+
const e = new Ot();
|
|
2770
2771
|
this.on("playCycleStart", () => {
|
|
2771
2772
|
e.start();
|
|
2772
2773
|
}), this.on("playCycleEnd", () => {
|
|
@@ -2777,13 +2778,13 @@ class Gi extends ki {
|
|
|
2777
2778
|
}
|
|
2778
2779
|
getExtraUiInteractionData() {
|
|
2779
2780
|
return {
|
|
2780
|
-
orientation:
|
|
2781
|
+
orientation: Ke(),
|
|
2781
2782
|
stateType: y(this, ke)
|
|
2782
2783
|
};
|
|
2783
2784
|
}
|
|
2784
2785
|
async deviceInfo() {
|
|
2785
2786
|
var h;
|
|
2786
|
-
const { browser: e, device: i, os: a } = R(navigator.userAgent), o =
|
|
2787
|
+
const { browser: e, device: i, os: a } = R(navigator.userAgent), o = Ii(), n = await Ti();
|
|
2787
2788
|
return {
|
|
2788
2789
|
browserName: e.name,
|
|
2789
2790
|
browserVersion: e.version,
|
|
@@ -2796,7 +2797,7 @@ class Gi extends ki {
|
|
|
2796
2797
|
manufacturer: i.vendor,
|
|
2797
2798
|
operatingSystem: a.name,
|
|
2798
2799
|
operatingSystemVersion: a.version,
|
|
2799
|
-
orientation:
|
|
2800
|
+
orientation: Ke(),
|
|
2800
2801
|
pixelRatio: window.devicePixelRatio,
|
|
2801
2802
|
screenHeight: window.screen.height,
|
|
2802
2803
|
screenSize: `${window.screen.width}x${window.screen.height}`,
|
|
@@ -2808,33 +2809,33 @@ class Gi extends ki {
|
|
|
2808
2809
|
};
|
|
2809
2810
|
}
|
|
2810
2811
|
}
|
|
2811
|
-
|
|
2812
|
-
class
|
|
2812
|
+
Ue = new WeakMap(), te = new WeakMap(), ie = new WeakMap(), se = new WeakMap(), ye = new WeakMap(), _e = new WeakMap(), ke = new WeakMap(), Be = new WeakMap();
|
|
2813
|
+
class qt {
|
|
2813
2814
|
constructor(t, e) {
|
|
2814
2815
|
m(this, "config");
|
|
2815
2816
|
m(this, "sdkConfig");
|
|
2816
2817
|
this.config = t, this.sdkConfig = e;
|
|
2817
2818
|
}
|
|
2818
2819
|
}
|
|
2819
|
-
const
|
|
2820
|
-
var ae, ne, oe,
|
|
2821
|
-
class
|
|
2820
|
+
const xt = 25, Rt = 1e4;
|
|
2821
|
+
var ae, ne, oe, N;
|
|
2822
|
+
class zi extends qt {
|
|
2822
2823
|
constructor(...e) {
|
|
2823
2824
|
super(...e);
|
|
2824
2825
|
C(this, ae, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
|
|
2825
2826
|
C(this, ne, void 0);
|
|
2826
2827
|
C(this, oe, void 0);
|
|
2827
|
-
C(this,
|
|
2828
|
+
C(this, N, []);
|
|
2828
2829
|
m(this, "processQueueForced");
|
|
2829
|
-
E(this, ne, (/* @__PURE__ */ new Date()).getTime()), E(this,
|
|
2830
|
+
E(this, ne, (/* @__PURE__ */ new Date()).getTime()), E(this, N, []), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(y(this, ae), {
|
|
2830
2831
|
method: "OPTIONS"
|
|
2831
|
-
}).catch(
|
|
2832
|
+
}).catch(ct), this.subscribe();
|
|
2832
2833
|
}
|
|
2833
2834
|
subscribe() {
|
|
2834
2835
|
window.addEventListener("beforeunload", this.processQueueForced, !1), window.addEventListener("pagehide", this.processQueueForced, !1), window.addEventListener("visibilitychange", this.processQueueForced, !1);
|
|
2835
2836
|
}
|
|
2836
2837
|
schedule() {
|
|
2837
|
-
y(this, oe) && clearTimeout(y(this, oe)), E(this, oe, window.setTimeout(() => this.processQueue(),
|
|
2838
|
+
y(this, oe) && clearTimeout(y(this, oe)), E(this, oe, window.setTimeout(() => this.processQueue(), Rt));
|
|
2838
2839
|
}
|
|
2839
2840
|
send(e) {
|
|
2840
2841
|
E(this, ne, (/* @__PURE__ */ new Date()).getTime());
|
|
@@ -2848,17 +2849,17 @@ class Hi extends Vt {
|
|
|
2848
2849
|
"Content-Type": "application/json"
|
|
2849
2850
|
},
|
|
2850
2851
|
keepalive: !0
|
|
2851
|
-
}).catch(
|
|
2852
|
+
}).catch(ct);
|
|
2852
2853
|
}
|
|
2853
2854
|
this.schedule();
|
|
2854
2855
|
}
|
|
2855
2856
|
addToQueue(e) {
|
|
2856
|
-
y(this,
|
|
2857
|
+
y(this, N).push(e), this.processQueue();
|
|
2857
2858
|
}
|
|
2858
2859
|
processQueue(e = !1) {
|
|
2859
|
-
if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && y(this,
|
|
2860
|
-
for (; y(this,
|
|
2861
|
-
const i = y(this,
|
|
2860
|
+
if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && y(this, N).length < xt && (/* @__PURE__ */ new Date()).getTime() - y(this, ne) < Rt))
|
|
2861
|
+
for (; y(this, N).length; ) {
|
|
2862
|
+
const i = y(this, N).splice(0, xt).map((a) => ({
|
|
2862
2863
|
...a,
|
|
2863
2864
|
sessionID: this.sdkConfig.api.sessionId,
|
|
2864
2865
|
userID: this.sdkConfig.api.user
|
|
@@ -2871,33 +2872,33 @@ class Hi extends Vt {
|
|
|
2871
2872
|
eventName: e,
|
|
2872
2873
|
eventParams: i,
|
|
2873
2874
|
eventTimestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
2874
|
-
eventUUID:
|
|
2875
|
+
eventUUID: jt()
|
|
2875
2876
|
});
|
|
2876
2877
|
}
|
|
2877
2878
|
}
|
|
2878
|
-
ae = new WeakMap(), ne = new WeakMap(), oe = new WeakMap(),
|
|
2879
|
-
const
|
|
2880
|
-
class
|
|
2879
|
+
ae = new WeakMap(), ne = new WeakMap(), oe = new WeakMap(), N = new WeakMap();
|
|
2880
|
+
const Pi = O("LoggingTracker", "color:#000000;font-weight:bold;");
|
|
2881
|
+
class qi extends qt {
|
|
2881
2882
|
track(t, e) {
|
|
2882
|
-
|
|
2883
|
+
Pi(`@${this.sdkConfig.api.user}`, `[${t}]`, e);
|
|
2883
2884
|
}
|
|
2884
2885
|
}
|
|
2885
2886
|
export {
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2887
|
+
Ri as BasicPlugin,
|
|
2888
|
+
V as CasinoPlugin,
|
|
2889
|
+
Li as DebuggingPlugin,
|
|
2890
|
+
Ui as GigPlugin,
|
|
2891
|
+
Gi as KalambaBullseyeParsers,
|
|
2892
|
+
Hi as KalambaBullseyePlugin,
|
|
2893
|
+
Vi as KalambaStargazerPlugin,
|
|
2894
|
+
zi as KalambaStargazerTracker,
|
|
2895
|
+
qi as LoggingTracker,
|
|
2896
|
+
_i as OryxPlugin,
|
|
2897
|
+
Bi as PariplayPlugin,
|
|
2898
|
+
Ni as QuantaPlugin,
|
|
2899
|
+
Fi as RelaxFEIMPlugin,
|
|
2900
|
+
pi as RgsPlugin,
|
|
2901
|
+
vi as TelemetryPlugin,
|
|
2902
|
+
qt as Tracker,
|
|
2903
|
+
Di as TukoPlugin
|
|
2903
2904
|
};
|