@kalamba/sdk 0.19.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +26 -9
- package/dist/index.js +69 -59
- package/dist/plugins.cjs +1 -1
- package/dist/plugins.d.ts +55 -16
- package/dist/plugins.js +935 -800
- package/dist/wrapper.cjs +1 -1
- package/dist/wrapper.d.ts +36 -11
- package/dist/wrapper.js +1334 -1309
- package/package.json +1 -1
package/dist/plugins.js
CHANGED
|
@@ -2,35 +2,35 @@
|
|
|
2
2
|
* BSD 3-Clause License
|
|
3
3
|
* Copyright (c) 2025, Kalamba Games Limited
|
|
4
4
|
*/
|
|
5
|
-
var
|
|
6
|
-
var wt = (
|
|
7
|
-
throw TypeError(
|
|
5
|
+
var as = Object.defineProperty;
|
|
6
|
+
var wt = (i) => {
|
|
7
|
+
throw TypeError(i);
|
|
8
8
|
};
|
|
9
|
-
var
|
|
10
|
-
var b = (
|
|
11
|
-
var k = (
|
|
12
|
-
import { a as
|
|
13
|
-
import { d as bt, e as
|
|
14
|
-
import { r as
|
|
15
|
-
function
|
|
16
|
-
return (e, ...
|
|
17
|
-
console.log(`[%c${
|
|
9
|
+
var ns = (i, t, e) => t in i ? as(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
10
|
+
var b = (i, t, e) => ns(i, typeof t != "symbol" ? t + "" : t, e), mt = (i, t, e) => t.has(i) || wt("Cannot " + e);
|
|
11
|
+
var k = (i, t, e) => (mt(i, t, "read from private field"), e ? e.call(i) : t.get(i)), M = (i, t, e) => t.has(i) ? wt("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e), E = (i, t, e, s) => (mt(i, t, "write to private field"), s ? s.call(i, e) : t.set(i, e), e);
|
|
12
|
+
import { a as te } from "./errors-NnLrKjTz.js";
|
|
13
|
+
import { d as bt, e as os } from "./encoders-BDr7fjKQ.js";
|
|
14
|
+
import { r as rs, g as cs, v as ds } from "./v4-BfzDHJEo.js";
|
|
15
|
+
function P(i, t) {
|
|
16
|
+
return (e, ...s) => {
|
|
17
|
+
console.log(`[%c${i}\x1B[m] %s`, t, e, ...s);
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
return Math.round(
|
|
20
|
+
function jt(i, t) {
|
|
21
|
+
return Math.round(i * 100 / t);
|
|
22
22
|
}
|
|
23
|
-
class
|
|
23
|
+
class B {
|
|
24
24
|
constructor(t, e) {
|
|
25
25
|
b(this, "config");
|
|
26
26
|
b(this, "sdkConfig");
|
|
27
27
|
this.config = t, this.sdkConfig = e;
|
|
28
28
|
}
|
|
29
|
-
on(t, e,
|
|
30
|
-
const a = function(
|
|
31
|
-
|
|
29
|
+
on(t, e, s) {
|
|
30
|
+
const a = function(c) {
|
|
31
|
+
c.data.message !== `kalamba:wrapper-casino:${t}` && c.data.message !== `kalamba:wrapper:${t}` || e(c.data.payload);
|
|
32
32
|
};
|
|
33
|
-
window.addEventListener("message", a,
|
|
33
|
+
window.addEventListener("message", a, s);
|
|
34
34
|
}
|
|
35
35
|
send(t, ...[e]) {
|
|
36
36
|
window.postMessage({
|
|
@@ -39,22 +39,22 @@ class j {
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
const
|
|
43
|
-
class
|
|
42
|
+
const ls = P("BasicPlugin", "color:#000000;font-weight:bold;");
|
|
43
|
+
class Xs extends B {
|
|
44
44
|
constructor(...t) {
|
|
45
|
-
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
45
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), ls("configured");
|
|
46
46
|
}
|
|
47
47
|
registerToSdkEvents() {
|
|
48
48
|
window.addEventListener("message", (t) => {
|
|
49
49
|
try {
|
|
50
|
-
const { type: e, payload:
|
|
50
|
+
const { type: e, payload: s } = t.data;
|
|
51
51
|
switch (e) {
|
|
52
52
|
case "doAudioSettings":
|
|
53
|
-
this.send("settings", { music:
|
|
53
|
+
this.send("settings", { music: s == null ? void 0 : s.musicEnabled, sounds: s == null ? void 0 : s.soundEnabled });
|
|
54
54
|
return;
|
|
55
55
|
case "doBalanceUpdate":
|
|
56
|
-
const { currency: a, coinValueInCents:
|
|
57
|
-
|
|
56
|
+
const { currency: a, coinValueInCents: r } = this.sdkConfig.api;
|
|
57
|
+
s.currency === a && typeof s.balanceInCurrency == "number" ? this.send("balance", { balance: jt(s.balanceInCurrency, r) }) : (s.balanceInCoins, this.send("balance", { balance: s.balanceInCoins }));
|
|
58
58
|
return;
|
|
59
59
|
case "doGamePause":
|
|
60
60
|
this.send("freeze");
|
|
@@ -89,8 +89,8 @@ class Qi extends j {
|
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
-
const
|
|
93
|
-
class
|
|
92
|
+
const v = P("▼ DebuggingPlugin IN ▼", "color:#444444;font-weight:bold;"), us = P("▲ DebuggingPlugin OUT ▲", "color:#444444;font-weight:bold;");
|
|
93
|
+
class Js extends B {
|
|
94
94
|
constructor(...t) {
|
|
95
95
|
super(...t), this.registerDebugToSdkEvents(), this.registerSdkToDebugEvents();
|
|
96
96
|
}
|
|
@@ -111,22 +111,20 @@ class Ki extends j {
|
|
|
111
111
|
};
|
|
112
112
|
}
|
|
113
113
|
registerSdkToDebugEvents() {
|
|
114
|
-
this.on("autoplay", (t) =>
|
|
114
|
+
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));
|
|
115
115
|
}
|
|
116
116
|
_send(...t) {
|
|
117
|
-
|
|
117
|
+
us.apply(null, t), this.send.apply(this, t);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
const
|
|
121
|
-
class
|
|
120
|
+
const ft = P("GigPlugin", "color:#000000;font-weight:bold;");
|
|
121
|
+
class Ys extends B {
|
|
122
122
|
constructor(...t) {
|
|
123
|
-
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
123
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), ft("configured");
|
|
124
124
|
}
|
|
125
125
|
postMessage(t) {
|
|
126
|
-
const e = {
|
|
127
|
-
|
|
128
|
-
};
|
|
129
|
-
window.top.postMessage(e, "*");
|
|
126
|
+
const e = { event: t };
|
|
127
|
+
ft("postMessage", e), window.top.postMessage(e, "*");
|
|
130
128
|
}
|
|
131
129
|
registerToSdkEvents() {
|
|
132
130
|
window.addEventListener("message", (t) => {
|
|
@@ -168,18 +166,18 @@ class Xi extends j {
|
|
|
168
166
|
});
|
|
169
167
|
}
|
|
170
168
|
}
|
|
171
|
-
const
|
|
172
|
-
class
|
|
169
|
+
const hs = P("OryxPlugin", "color:#000000;font-weight:bold;");
|
|
170
|
+
class Zs extends B {
|
|
173
171
|
constructor(...t) {
|
|
174
|
-
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
172
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), hs("configured");
|
|
175
173
|
}
|
|
176
174
|
registerToSdkEvents() {
|
|
177
175
|
window.addEventListener("message", (t) => {
|
|
178
176
|
try {
|
|
179
|
-
const { type: e, param:
|
|
177
|
+
const { type: e, param: s } = t.data;
|
|
180
178
|
switch (e) {
|
|
181
179
|
case "doBalanceUpdate":
|
|
182
|
-
this.send("balance", { balance:
|
|
180
|
+
this.send("balance", { balance: s });
|
|
183
181
|
return;
|
|
184
182
|
case "doGamePause":
|
|
185
183
|
this.send("freeze");
|
|
@@ -223,62 +221,62 @@ class Ji extends j {
|
|
|
223
221
|
});
|
|
224
222
|
}
|
|
225
223
|
}
|
|
226
|
-
const qe =
|
|
227
|
-
function We(
|
|
224
|
+
const qe = P("PariplayPlugin", "color:#000000;font-weight:bold;");
|
|
225
|
+
function We(i) {
|
|
228
226
|
try {
|
|
229
|
-
window.top.location =
|
|
227
|
+
window.top.location = i;
|
|
230
228
|
} catch {
|
|
231
|
-
window.location =
|
|
229
|
+
window.location = i;
|
|
232
230
|
}
|
|
233
231
|
}
|
|
234
|
-
function je(
|
|
235
|
-
return new Promise(function(
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
},
|
|
232
|
+
function je(i, t) {
|
|
233
|
+
return new Promise(function(s, a) {
|
|
234
|
+
const r = new XMLHttpRequest();
|
|
235
|
+
r.onload = function() {
|
|
236
|
+
r.status >= 200 && r.status < 300 ? s(r.responseText) : a(r.responseText);
|
|
237
|
+
}, r.open(i, t), r.send();
|
|
240
238
|
});
|
|
241
239
|
}
|
|
242
240
|
function $e() {
|
|
243
241
|
}
|
|
244
|
-
function
|
|
245
|
-
return
|
|
242
|
+
function ps(i) {
|
|
243
|
+
return i.filter(function(e) {
|
|
246
244
|
return e.messageType.toUpperCase() === "DATA";
|
|
247
245
|
});
|
|
248
246
|
}
|
|
249
|
-
function
|
|
250
|
-
return
|
|
247
|
+
function Ke(i) {
|
|
248
|
+
return i.filter(function(e) {
|
|
251
249
|
return ["NOTIFICATION", "POPUP"].includes(e.messageType.toUpperCase());
|
|
252
250
|
});
|
|
253
251
|
}
|
|
254
|
-
function
|
|
252
|
+
function $t(i) {
|
|
255
253
|
try {
|
|
256
|
-
return JSON.parse(
|
|
254
|
+
return JSON.parse(i.text);
|
|
257
255
|
} catch {
|
|
258
256
|
return {};
|
|
259
257
|
}
|
|
260
258
|
}
|
|
261
|
-
function
|
|
262
|
-
return
|
|
259
|
+
function gs(i) {
|
|
260
|
+
return i.map($t).filter(Boolean).find(function(e) {
|
|
263
261
|
return e.betId != null && e.winId != null;
|
|
264
262
|
}) || {};
|
|
265
263
|
}
|
|
266
|
-
function
|
|
267
|
-
return
|
|
264
|
+
function ws(i) {
|
|
265
|
+
return i.map($t).filter(Boolean).find(function(e) {
|
|
268
266
|
return e.TotalBet != null && e.TotalWin != null;
|
|
269
267
|
}) || {};
|
|
270
268
|
}
|
|
271
|
-
class
|
|
269
|
+
class ei extends B {
|
|
272
270
|
constructor(...t) {
|
|
273
271
|
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), qe("configured");
|
|
274
272
|
}
|
|
275
273
|
postMessage(t, e) {
|
|
276
|
-
const
|
|
274
|
+
const s = {
|
|
277
275
|
lang: this.sdkConfig.ui.language,
|
|
278
276
|
sender: this.sdkConfig.api.game,
|
|
279
277
|
type: t
|
|
280
278
|
};
|
|
281
|
-
e != null && (
|
|
279
|
+
e != null && (s.data = e), qe("postMessage", s), window.parent.postMessage(s, "*");
|
|
282
280
|
}
|
|
283
281
|
coinsToCurrency(t) {
|
|
284
282
|
return t * this.sdkConfig.api.coinValueInCents / 100;
|
|
@@ -320,16 +318,16 @@ class Yi extends j {
|
|
|
320
318
|
};
|
|
321
319
|
}
|
|
322
320
|
processInfoUiMessages(t) {
|
|
323
|
-
return t.reduce((e,
|
|
324
|
-
const
|
|
325
|
-
buttons:
|
|
321
|
+
return t.reduce((e, s) => e.then(() => new Promise((a) => {
|
|
322
|
+
const r = Object.assign({}, s, {
|
|
323
|
+
buttons: s.buttons.filter((c) => c.action.toUpperCase() === "CASHIER" ? !!this.sdkConfig.api.cashierUrl : !0).map((c) => Object.assign({}, c, {
|
|
326
324
|
onRelease: () => {
|
|
327
|
-
const p =
|
|
328
|
-
h ? h(
|
|
325
|
+
const p = s.messageType.toUpperCase() === "POPUP" ? $e : a, h = this.buttonActions[c.action.toUpperCase()];
|
|
326
|
+
h ? h(c, p) : p();
|
|
329
327
|
}
|
|
330
328
|
}))
|
|
331
329
|
});
|
|
332
|
-
qe("showMessage",
|
|
330
|
+
qe("showMessage", r);
|
|
333
331
|
}).catch($e)), Promise.resolve()).then(() => {
|
|
334
332
|
}).catch($e);
|
|
335
333
|
}
|
|
@@ -359,26 +357,26 @@ class Yi extends j {
|
|
|
359
357
|
registerFromSdkEvents() {
|
|
360
358
|
let t = 0;
|
|
361
359
|
this.on("openGameResponse", (e) => {
|
|
362
|
-
let
|
|
360
|
+
let s;
|
|
363
361
|
try {
|
|
364
362
|
const a = JSON.parse(
|
|
365
363
|
JSON.parse(atob(this.sdkConfig.api.integrationData.token.split(".")[1])).token
|
|
366
|
-
),
|
|
367
|
-
|
|
364
|
+
), r = JSON.parse(a.integrationSpecificAttributes.sessionData || "{}");
|
|
365
|
+
s = {
|
|
368
366
|
ClientToken: a.integrationSpecificAttributes.clientToken,
|
|
369
367
|
CurrencyCode: a.currency,
|
|
370
368
|
PlayerTokenId: a.user,
|
|
371
|
-
SessionData:
|
|
369
|
+
SessionData: r
|
|
372
370
|
};
|
|
373
371
|
} catch {
|
|
374
|
-
|
|
372
|
+
s = void 0;
|
|
375
373
|
}
|
|
376
374
|
this.postMessage("gameDataLoaded", {
|
|
377
|
-
LoadGameData:
|
|
375
|
+
LoadGameData: s,
|
|
378
376
|
success: !0
|
|
379
377
|
});
|
|
380
378
|
try {
|
|
381
|
-
const a =
|
|
379
|
+
const a = Ke(e.contract.uiMessages);
|
|
382
380
|
this.processInfoUiMessages(a);
|
|
383
381
|
} catch {
|
|
384
382
|
}
|
|
@@ -401,8 +399,8 @@ class Yi extends j {
|
|
|
401
399
|
win: this.coinsToCurrency(e.contract.win.round)
|
|
402
400
|
});
|
|
403
401
|
try {
|
|
404
|
-
const
|
|
405
|
-
this.processInfoUiMessages(
|
|
402
|
+
const s = Ke(e.contract.uiMessages);
|
|
403
|
+
this.processInfoUiMessages(s);
|
|
406
404
|
} catch {
|
|
407
405
|
}
|
|
408
406
|
}), this.on("playError", (e) => {
|
|
@@ -420,13 +418,13 @@ class Yi extends j {
|
|
|
420
418
|
e.contract.balance.coins + e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier
|
|
421
419
|
)
|
|
422
420
|
});
|
|
423
|
-
const
|
|
421
|
+
const s = ["BaseGame", "PaidSpin"].includes(e.contract.stateType.thisRound), a = ps(e.contract.uiMessages), r = Ke(e.contract.uiMessages), c = gs(a), p = ws(a);
|
|
424
422
|
this.postMessage("ticketReceived", {
|
|
425
423
|
Balance: this.coinsToCurrency(e.contract.balance.coins),
|
|
426
|
-
BetAmount:
|
|
427
|
-
CreditTransactionId:
|
|
428
|
-
DebitTransactionId:
|
|
429
|
-
Message:
|
|
424
|
+
BetAmount: s ? this.coinsToCurrency(e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier) : 0,
|
|
425
|
+
CreditTransactionId: c.betId,
|
|
426
|
+
DebitTransactionId: c.winId,
|
|
427
|
+
Message: r,
|
|
430
428
|
SessionData: p,
|
|
431
429
|
Status: {
|
|
432
430
|
ErrCode: 0
|
|
@@ -446,14 +444,14 @@ class Yi extends j {
|
|
|
446
444
|
});
|
|
447
445
|
}
|
|
448
446
|
}
|
|
449
|
-
const
|
|
450
|
-
class
|
|
447
|
+
const me = P("RelaxFEIMPlugin", "color:#000000;font-weight:bold;");
|
|
448
|
+
class ti extends B {
|
|
451
449
|
constructor(...e) {
|
|
452
450
|
super(...e);
|
|
453
451
|
b(this, "VERSION", "1.17.0");
|
|
454
|
-
const
|
|
455
|
-
|
|
456
|
-
|
|
452
|
+
const s = document.createElement("script");
|
|
453
|
+
s.src = `https://d3nsdzdtjbr5ml.cloudfront.net/casino/relaxlibs/feim/${this.VERSION}/rlxfeim.min.js`, s.onload = () => {
|
|
454
|
+
me("loaded"), window.FEIM.configure({
|
|
457
455
|
p2pConfig: {
|
|
458
456
|
currency: this.sdkConfig.api.currency,
|
|
459
457
|
launchParams: {
|
|
@@ -461,14 +459,14 @@ class Zi extends j {
|
|
|
461
459
|
homeurl: "homeUrl"
|
|
462
460
|
}
|
|
463
461
|
}
|
|
464
|
-
}),
|
|
465
|
-
}, document.body.appendChild(
|
|
462
|
+
}), me("configured"), this.registerToSdkEvents(), this.registerFromSdkEvents();
|
|
463
|
+
}, document.body.appendChild(s);
|
|
466
464
|
}
|
|
467
465
|
registerToSdkEvents() {
|
|
468
|
-
window.FEIM.on.errorMessageDismissed(() => this.send("unfreeze")), window.FEIM.on.errorMessageDisplayed(() => this.send("freeze")), window.FEIM.on.exitingGame(() =>
|
|
469
|
-
this.send("help"
|
|
466
|
+
window.FEIM.on.errorMessageDismissed(() => this.send("unfreeze")), window.FEIM.on.errorMessageDisplayed(() => this.send("freeze")), window.FEIM.on.exitingGame(() => me("!!! NOT IMPLEMENTED: exitingGame !!!")), window.FEIM.on.freeze(() => this.send("freeze")), window.FEIM.on.initialized(() => me("!!! NOT IMPLEMENTED: initialized !!!")), window.FEIM.on.pauseAutoPlay(() => this.send("suspend")), window.FEIM.on.refreshBalance(() => me("!!! NOT IMPLEMENTED: refreshBalance !!!")), window.FEIM.on.toggleGameHelp(() => {
|
|
467
|
+
this.send("help");
|
|
470
468
|
}), window.FEIM.on.togglePaytable(() => {
|
|
471
|
-
this.send("paytable"
|
|
469
|
+
this.send("paytable");
|
|
472
470
|
}), window.FEIM.on.unfreeze(() => this.send("unfreeze")), window.FEIM.on.updateSettings(
|
|
473
471
|
({ payload: [e] }) => this.send("settings", { sounds: e.sounds, fastPlay: e.fastPlay })
|
|
474
472
|
);
|
|
@@ -485,11 +483,11 @@ class Zi extends j {
|
|
|
485
483
|
}
|
|
486
484
|
}), this.on("balance", ({ balance: e }) => {
|
|
487
485
|
window.FEIM.send.balanceUpdate(e);
|
|
488
|
-
}), this.on("bet", ({ base: e, multiplier:
|
|
489
|
-
window.FEIM.send.betUpdate(e *
|
|
486
|
+
}), this.on("bet", ({ base: e, multiplier: s }) => {
|
|
487
|
+
window.FEIM.send.betUpdate(e * s);
|
|
490
488
|
}), this.on("error", (e) => {
|
|
491
|
-
const
|
|
492
|
-
window.FEIM.send.errorMessage(
|
|
489
|
+
const s = "message" in e ? e.message : "Unknown error";
|
|
490
|
+
window.FEIM.send.errorMessage(s);
|
|
493
491
|
}), this.on("close", () => {
|
|
494
492
|
window.FEIM.send.exitGame();
|
|
495
493
|
}), this.on("loadEnd", () => {
|
|
@@ -501,20 +499,20 @@ class Zi extends j {
|
|
|
501
499
|
}), this.on("cashier", () => {
|
|
502
500
|
window.FEIM.send.openQuickDeposit();
|
|
503
501
|
}), this.on("playCycleEnd", (e) => {
|
|
504
|
-
const
|
|
502
|
+
const s = {
|
|
505
503
|
balance: e.contract.balance.coins,
|
|
506
504
|
bet: e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier,
|
|
507
505
|
win: {
|
|
508
506
|
win: e.contract.win.total
|
|
509
507
|
}
|
|
510
508
|
};
|
|
511
|
-
window.FEIM.send.roundFinished(
|
|
509
|
+
window.FEIM.send.roundFinished(s);
|
|
512
510
|
}), this.on("playResponse", (e) => {
|
|
513
|
-
const
|
|
511
|
+
const s = {
|
|
514
512
|
balance: e.contract.balance.coins,
|
|
515
513
|
playResponse: e.data
|
|
516
514
|
};
|
|
517
|
-
window.FEIM.send.roundStarted(
|
|
515
|
+
window.FEIM.send.roundStarted(s);
|
|
518
516
|
}), this.on("history", () => {
|
|
519
517
|
window.FEIM.send.showHistory();
|
|
520
518
|
}), this.on("settings", (e) => {
|
|
@@ -522,33 +520,33 @@ class Zi extends j {
|
|
|
522
520
|
});
|
|
523
521
|
}
|
|
524
522
|
}
|
|
525
|
-
const
|
|
526
|
-
class
|
|
523
|
+
const Qe = P("TukoPlugin", "color:#000000;font-weight:bold;");
|
|
524
|
+
class si extends B {
|
|
527
525
|
constructor(...e) {
|
|
528
526
|
super(...e);
|
|
529
527
|
b(this, "PING_INTERVAL", 1e4);
|
|
530
528
|
const a = new URLSearchParams(window.location.search).get("pingCallbackUrl");
|
|
531
529
|
a && window.setInterval(() => {
|
|
532
530
|
this.ping(a);
|
|
533
|
-
}, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(),
|
|
531
|
+
}, this.PING_INTERVAL), this.registerToSdkEvents(), this.registerFromSdkEvents(), Qe("configured");
|
|
534
532
|
}
|
|
535
533
|
ping(e) {
|
|
536
|
-
const
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
},
|
|
534
|
+
const s = new XMLHttpRequest();
|
|
535
|
+
s.onreadystatechange = function() {
|
|
536
|
+
s.readyState === XMLHttpRequest.DONE && (s.status === 0 || s.status >= 200 && s.status < 400 ? Qe("ping ok", s) : Qe("ping error", s));
|
|
537
|
+
}, s.open("GET", e), s.send();
|
|
540
538
|
}
|
|
541
539
|
registerToSdkEvents() {
|
|
542
540
|
window.addEventListener("message", (e) => {
|
|
543
541
|
try {
|
|
544
|
-
const { type:
|
|
545
|
-
switch (
|
|
542
|
+
const { type: s, payload: a } = e.data;
|
|
543
|
+
switch (s) {
|
|
546
544
|
case "doAudioSettings":
|
|
547
545
|
this.send("settings", { music: a == null ? void 0 : a.musicEnabled, sounds: a == null ? void 0 : a.soundEnabled });
|
|
548
546
|
return;
|
|
549
547
|
case "doBalanceUpdate":
|
|
550
|
-
const { currency:
|
|
551
|
-
a.currency ===
|
|
548
|
+
const { currency: r, coinValueInCents: c } = this.sdkConfig.api;
|
|
549
|
+
a.currency === r && typeof a.balanceInCurrency == "number" ? this.send("balance", { balance: jt(a.balanceInCurrency, c) }) : (a.balanceInCoins, this.send("balance", { balance: a.balanceInCoins }));
|
|
552
550
|
return;
|
|
553
551
|
case "doGamePause":
|
|
554
552
|
this.send("freeze");
|
|
@@ -583,14 +581,14 @@ class es extends j {
|
|
|
583
581
|
});
|
|
584
582
|
}
|
|
585
583
|
}
|
|
586
|
-
const
|
|
587
|
-
class
|
|
584
|
+
const yt = P("QuantaPlugin", "color:#000000;font-weight:bold;");
|
|
585
|
+
class ii extends B {
|
|
588
586
|
constructor(...t) {
|
|
589
|
-
super(...t), this.registerFromSdkEvents(),
|
|
587
|
+
super(...t), this.registerFromSdkEvents(), yt("configured");
|
|
590
588
|
}
|
|
591
589
|
postMessage(t) {
|
|
592
590
|
const e = { event: t };
|
|
593
|
-
|
|
591
|
+
yt("postMessage", e), window.parent.postMessage(e, "*");
|
|
594
592
|
}
|
|
595
593
|
registerFromSdkEvents() {
|
|
596
594
|
this.on("close", () => {
|
|
@@ -606,80 +604,168 @@ class ts extends j {
|
|
|
606
604
|
});
|
|
607
605
|
}
|
|
608
606
|
}
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
607
|
+
const kt = P("SoftSwissPlugin", "color:#000000;font-weight:bold;");
|
|
608
|
+
class ai extends B {
|
|
609
|
+
constructor(...t) {
|
|
610
|
+
super(...t), this.registerFromSdkEvents(), kt("configured");
|
|
611
|
+
}
|
|
612
|
+
postMessage(t, e) {
|
|
613
|
+
const s = { event: t, payload: e };
|
|
614
|
+
kt("postMessage", s), window.top.postMessage(s, "*");
|
|
615
|
+
}
|
|
616
|
+
registerFromSdkEvents() {
|
|
617
|
+
this.on("loadStart", () => {
|
|
618
|
+
this.postMessage("gameLoadStarted");
|
|
619
|
+
}), this.on("loadProgress", ({ progress: t }) => {
|
|
620
|
+
this.postMessage("gameLoadProgress", { progress: t });
|
|
621
|
+
}), this.on("loadEnd", () => {
|
|
622
|
+
this.postMessage("gameLoadCompleted");
|
|
623
|
+
}), this.on("playCycleStart", () => {
|
|
624
|
+
this.postMessage("gameAnimationStart");
|
|
625
|
+
}), this.on("playCycleEnd", (t) => {
|
|
626
|
+
this.postMessage("winUpdate", { win: t.contract.win.total }), this.postMessage("gameAnimationCompleted");
|
|
627
|
+
}), this.on("playError", () => {
|
|
628
|
+
this.postMessage("gameAnimationCompleted");
|
|
629
|
+
}), this.on("balance", ({ balance: t }) => {
|
|
630
|
+
this.postMessage("balanceUpdate", { balance: t });
|
|
631
|
+
}), this.on("bet", (t) => {
|
|
632
|
+
this.postMessage("stakeUpdate", { bet: t });
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
const Et = P("EveryMatrixPlugin", "color:#000000;font-weight:bold;");
|
|
637
|
+
class ni extends B {
|
|
638
|
+
constructor(...t) {
|
|
639
|
+
super(...t), this.registerToSdkEvents(), this.registerFromSdkEvents(), Et("configured");
|
|
640
|
+
}
|
|
641
|
+
postMessage(t, e) {
|
|
642
|
+
const s = { name: t, sender: "game", data: e };
|
|
643
|
+
Et("postMessage", s), window.top.postMessage(s, "*");
|
|
644
|
+
}
|
|
645
|
+
registerToSdkEvents() {
|
|
646
|
+
window.addEventListener("message", (t) => {
|
|
647
|
+
try {
|
|
648
|
+
const { name: e, sender: s } = t.data;
|
|
649
|
+
if (s !== "emwindow")
|
|
650
|
+
return;
|
|
651
|
+
switch (e) {
|
|
652
|
+
// TODO: add setAudio handle once everymatrix will
|
|
653
|
+
// let us know what will be coming in the payload
|
|
654
|
+
case "updateBalance":
|
|
655
|
+
this.send("getBalance");
|
|
656
|
+
return;
|
|
657
|
+
case "togglePaytable":
|
|
658
|
+
this.send("paytable");
|
|
659
|
+
return;
|
|
660
|
+
case "stopAutoplay":
|
|
661
|
+
this.send("suspend");
|
|
662
|
+
return;
|
|
663
|
+
case "showHelp":
|
|
664
|
+
this.send("help", { show: !0 });
|
|
665
|
+
return;
|
|
666
|
+
default:
|
|
667
|
+
return;
|
|
668
|
+
}
|
|
669
|
+
} catch {
|
|
670
|
+
}
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
registerFromSdkEvents() {
|
|
674
|
+
this.on("loadProgress", ({ progress: t }) => {
|
|
675
|
+
this.postMessage("loadProgress", { progress: t });
|
|
676
|
+
}), this.on("loadEnd", () => {
|
|
677
|
+
this.postMessage("loadCompleted");
|
|
678
|
+
}), this.on("settings", (t) => {
|
|
679
|
+
(t != null && t.music || t != null && t.sounds) && this.postMessage("audioToggle");
|
|
680
|
+
}), this.on("playCycleStart", () => {
|
|
681
|
+
this.postMessage("roundStart");
|
|
682
|
+
}), this.on("playCycleEnd", () => {
|
|
683
|
+
this.postMessage("roundEnd");
|
|
684
|
+
}), this.on("playError", () => {
|
|
685
|
+
this.postMessage("errorMessage");
|
|
686
|
+
}), this.on("error", () => {
|
|
687
|
+
this.postMessage("errorMessage");
|
|
688
|
+
}), this.on("close", () => {
|
|
689
|
+
this.postMessage("close");
|
|
690
|
+
}), this.on("bet", () => {
|
|
691
|
+
this.postMessage("stakeUpdate");
|
|
692
|
+
});
|
|
693
|
+
}
|
|
694
|
+
}
|
|
695
|
+
var ms = "2.0.3", ct = 500, vt = "user-agent", ue = "", Ct = "?", _e = "function", j = "undefined", he = "object", dt = "string", S = "browser", N = "cpu", R = "device", x = "engine", O = "os", se = "result", l = "name", n = "type", d = "vendor", u = "version", T = "architecture", Te = "major", o = "model", Me = "console", w = "mobile", f = "tablet", y = "smarttv", U = "wearable", Xe = "xr", Se = "embedded", be = "inapp", ht = "brands", Y = "formFactors", pt = "fullVersionList", ie = "platform", gt = "platformVersion", Ve = "bitness", $ = "sec-ch-ua", bs = $ + "-full-version-list", fs = $ + "-arch", ys = $ + "-" + Ve, ks = $ + "-form-factors", Es = $ + "-" + w, vs = $ + "-" + o, Kt = $ + "-" + ie, Cs = Kt + "-version", Qt = [ht, pt, w, o, ie, gt, T, Y, Ve], Ue = "Amazon", Z = "Apple", Mt = "ASUS", St = "BlackBerry", J = "Google", Tt = "Huawei", It = "Lenovo", At = "Honor", Re = "LG", Je = "Microsoft", Ye = "Motorola", Ze = "Nvidia", Pt = "OnePlus", et = "OPPO", fe = "Samsung", Ot = "Sharp", ye = "Sony", tt = "Xiaomi", st = "Zebra", xt = "Chrome", Ut = "Chromium", V = "Chromecast", Ms = "Edge", ke = "Firefox", Ee = "Opera", it = "Facebook", Rt = "Sogou", ee = "Mobile ", ve = " Browser", lt = "Windows", Ss = typeof window !== j, I = Ss && window.navigator ? window.navigator : void 0, z = I && I.userAgentData ? I.userAgentData : void 0, Ts = function(i, t) {
|
|
696
|
+
var e = {}, s = t;
|
|
697
|
+
if (!Ne(t)) {
|
|
698
|
+
s = {};
|
|
613
699
|
for (var a in t)
|
|
614
|
-
for (var
|
|
615
|
-
|
|
700
|
+
for (var r in t[a])
|
|
701
|
+
s[r] = t[a][r].concat(s[r] ? s[r] : []);
|
|
616
702
|
}
|
|
617
|
-
for (var
|
|
618
|
-
e[
|
|
703
|
+
for (var c in i)
|
|
704
|
+
e[c] = s[c] && s[c].length % 2 === 0 ? s[c].concat(i[c]) : i[c];
|
|
619
705
|
return e;
|
|
620
|
-
}, ze = function(
|
|
621
|
-
for (var t = {}, e = 0; e <
|
|
622
|
-
t[
|
|
706
|
+
}, ze = function(i) {
|
|
707
|
+
for (var t = {}, e = 0; e < i.length; e++)
|
|
708
|
+
t[i[e].toUpperCase()] = i[e];
|
|
623
709
|
return t;
|
|
624
|
-
}, ut = function(
|
|
625
|
-
if (typeof
|
|
626
|
-
for (var e in
|
|
627
|
-
if (F(
|
|
710
|
+
}, ut = function(i, t) {
|
|
711
|
+
if (typeof i === he && i.length > 0) {
|
|
712
|
+
for (var e in i)
|
|
713
|
+
if (F(i[e]) == F(t)) return !0;
|
|
628
714
|
return !1;
|
|
629
715
|
}
|
|
630
|
-
return
|
|
631
|
-
},
|
|
632
|
-
for (var e in
|
|
633
|
-
return /^(browser|cpu|device|engine|os)$/.test(e) || (t ?
|
|
634
|
-
},
|
|
635
|
-
return typeof
|
|
636
|
-
}, at = function(
|
|
637
|
-
if (
|
|
638
|
-
for (var t = [], e =
|
|
639
|
-
if (e[
|
|
640
|
-
var a = Ie(e[
|
|
641
|
-
t[
|
|
716
|
+
return ge(i) ? F(t).indexOf(F(i)) !== -1 : !1;
|
|
717
|
+
}, Ne = function(i, t) {
|
|
718
|
+
for (var e in i)
|
|
719
|
+
return /^(browser|cpu|device|engine|os)$/.test(e) || (t ? Ne(i[e]) : !1);
|
|
720
|
+
}, ge = function(i) {
|
|
721
|
+
return typeof i === dt;
|
|
722
|
+
}, at = function(i) {
|
|
723
|
+
if (i) {
|
|
724
|
+
for (var t = [], e = pe(/\\?\"/g, i).split(","), s = 0; s < e.length; s++)
|
|
725
|
+
if (e[s].indexOf(";") > -1) {
|
|
726
|
+
var a = Ie(e[s]).split(";v=");
|
|
727
|
+
t[s] = { brand: a[0], version: a[1] };
|
|
642
728
|
} else
|
|
643
|
-
t[
|
|
729
|
+
t[s] = Ie(e[s]);
|
|
644
730
|
return t;
|
|
645
731
|
}
|
|
646
|
-
}, F = function(
|
|
647
|
-
return
|
|
648
|
-
}, nt = function(
|
|
649
|
-
return
|
|
650
|
-
},
|
|
651
|
-
for (var t in
|
|
652
|
-
var e =
|
|
653
|
-
typeof e ==
|
|
732
|
+
}, F = function(i) {
|
|
733
|
+
return ge(i) ? i.toLowerCase() : i;
|
|
734
|
+
}, nt = function(i) {
|
|
735
|
+
return ge(i) ? pe(/[^\d\.]/g, i).split(".")[0] : void 0;
|
|
736
|
+
}, D = function(i) {
|
|
737
|
+
for (var t in i) {
|
|
738
|
+
var e = i[t];
|
|
739
|
+
typeof e == he && e.length == 2 ? this[e[0]] = e[1] : this[e] = void 0;
|
|
654
740
|
}
|
|
655
741
|
return this;
|
|
656
|
-
},
|
|
657
|
-
return
|
|
658
|
-
},
|
|
659
|
-
return
|
|
660
|
-
}, Ie = function(
|
|
661
|
-
if (
|
|
662
|
-
return
|
|
663
|
-
}, ot = function(
|
|
664
|
-
if (!(!
|
|
665
|
-
for (var e = 0,
|
|
742
|
+
}, pe = function(i, t) {
|
|
743
|
+
return ge(t) ? t.replace(i, ue) : t;
|
|
744
|
+
}, Ce = function(i) {
|
|
745
|
+
return pe(/\\?\"/g, i);
|
|
746
|
+
}, Ie = function(i, t) {
|
|
747
|
+
if (ge(i))
|
|
748
|
+
return i = pe(/^\s\s*/, i), typeof t === j ? i : i.substring(0, ct);
|
|
749
|
+
}, ot = function(i, t) {
|
|
750
|
+
if (!(!i || !t))
|
|
751
|
+
for (var e = 0, s, a, r, c, p, h; e < t.length && !p; ) {
|
|
666
752
|
var g = t[e], m = t[e + 1];
|
|
667
|
-
for (
|
|
668
|
-
if (p = g[
|
|
669
|
-
for (
|
|
670
|
-
h = p[++a],
|
|
753
|
+
for (s = a = 0; s < g.length && !p && g[s]; )
|
|
754
|
+
if (p = g[s++].exec(i), p)
|
|
755
|
+
for (r = 0; r < m.length; r++)
|
|
756
|
+
h = p[++a], c = m[r], typeof c === he && c.length > 0 ? c.length === 2 ? typeof c[1] == _e ? this[c[0]] = c[1].call(this, h) : this[c[0]] = c[1] : c.length === 3 ? typeof c[1] === _e && !(c[1].exec && c[1].test) ? this[c[0]] = h ? c[1].call(this, h, c[2]) : void 0 : this[c[0]] = h ? h.replace(c[1], c[2]) : void 0 : c.length === 4 && (this[c[0]] = h ? c[3].call(this, h.replace(c[1], c[2])) : void 0) : this[c] = h || void 0;
|
|
671
757
|
e += 2;
|
|
672
758
|
}
|
|
673
|
-
},
|
|
759
|
+
}, q = function(i, t) {
|
|
674
760
|
for (var e in t)
|
|
675
|
-
if (typeof t[e] ===
|
|
676
|
-
for (var
|
|
677
|
-
if (ut(t[e][
|
|
678
|
-
return e ===
|
|
679
|
-
} else if (ut(t[e],
|
|
680
|
-
return e ===
|
|
681
|
-
return t.hasOwnProperty("*") ? t["*"] :
|
|
682
|
-
},
|
|
761
|
+
if (typeof t[e] === he && t[e].length > 0) {
|
|
762
|
+
for (var s = 0; s < t[e].length; s++)
|
|
763
|
+
if (ut(t[e][s], i))
|
|
764
|
+
return e === Ct ? void 0 : e;
|
|
765
|
+
} else if (ut(t[e], i))
|
|
766
|
+
return e === Ct ? void 0 : e;
|
|
767
|
+
return t.hasOwnProperty("*") ? t["*"] : i;
|
|
768
|
+
}, Lt = {
|
|
683
769
|
ME: "4.90",
|
|
684
770
|
"NT 3.11": "NT3.51",
|
|
685
771
|
"NT 4.0": "NT4.0",
|
|
@@ -691,7 +777,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
691
777
|
"8.1": "NT 6.3",
|
|
692
778
|
10: ["NT 6.4", "NT 10.0"],
|
|
693
779
|
RT: "ARM"
|
|
694
|
-
},
|
|
780
|
+
}, Bt = {
|
|
695
781
|
embedded: "Automotive",
|
|
696
782
|
mobile: "Mobile",
|
|
697
783
|
tablet: ["Tablet", "EInk"],
|
|
@@ -700,7 +786,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
700
786
|
xr: ["VR", "XR"],
|
|
701
787
|
"?": ["Desktop", "Unknown"],
|
|
702
788
|
"*": void 0
|
|
703
|
-
},
|
|
789
|
+
}, _t = {
|
|
704
790
|
browser: [
|
|
705
791
|
[
|
|
706
792
|
// Most common regardless engine
|
|
@@ -727,17 +813,17 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
727
813
|
/opios[\/ ]+([\w\.]+)/i
|
|
728
814
|
// Opera mini on iphone >= 8.0
|
|
729
815
|
],
|
|
730
|
-
[u, [l,
|
|
816
|
+
[u, [l, Ee + " Mini"]],
|
|
731
817
|
[
|
|
732
818
|
/\bop(?:rg)?x\/([\w\.]+)/i
|
|
733
819
|
// Opera GX
|
|
734
820
|
],
|
|
735
|
-
[u, [l,
|
|
821
|
+
[u, [l, Ee + " GX"]],
|
|
736
822
|
[
|
|
737
823
|
/\bopr\/([\w\.]+)/i
|
|
738
824
|
// Opera Webkit
|
|
739
825
|
],
|
|
740
|
-
[u, [l,
|
|
826
|
+
[u, [l, Ee]],
|
|
741
827
|
[
|
|
742
828
|
// Mixed
|
|
743
829
|
/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i
|
|
@@ -810,7 +896,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
810
896
|
/slbrowser\/([\w\.]+)/i
|
|
811
897
|
// Smart Lenovo Browser
|
|
812
898
|
],
|
|
813
|
-
[u, [l, "Smart " +
|
|
899
|
+
[u, [l, "Smart " + It + ve]],
|
|
814
900
|
[
|
|
815
901
|
/(avast|avg)\/([\w\.]+)/i
|
|
816
902
|
// Avast/AVG Secure Browser
|
|
@@ -820,12 +906,12 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
820
906
|
/\bfocus\/([\w\.]+)/i
|
|
821
907
|
// Firefox Focus
|
|
822
908
|
],
|
|
823
|
-
[u, [l,
|
|
909
|
+
[u, [l, ke + " Focus"]],
|
|
824
910
|
[
|
|
825
911
|
/\bopt\/([\w\.]+)/i
|
|
826
912
|
// Opera Touch
|
|
827
913
|
],
|
|
828
|
-
[u, [l,
|
|
914
|
+
[u, [l, Ee + " Touch"]],
|
|
829
915
|
[
|
|
830
916
|
/coc_coc\w+\/([\w\.]+)/i
|
|
831
917
|
// Coc Coc Browser
|
|
@@ -840,7 +926,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
840
926
|
/coast\/([\w\.]+)/i
|
|
841
927
|
// Opera Coast
|
|
842
928
|
],
|
|
843
|
-
[u, [l,
|
|
929
|
+
[u, [l, Ee + " Coast"]],
|
|
844
930
|
[
|
|
845
931
|
/miuibrowser\/([\w\.]+)/i
|
|
846
932
|
// MIUI Browser
|
|
@@ -850,7 +936,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
850
936
|
/fxios\/([\w\.-]+)/i
|
|
851
937
|
// Firefox for iOS
|
|
852
938
|
],
|
|
853
|
-
[u, [l, ee +
|
|
939
|
+
[u, [l, ee + ke]],
|
|
854
940
|
[
|
|
855
941
|
/\bqihoobrowser\/?([\w\.]*)/i
|
|
856
942
|
// 360
|
|
@@ -870,17 +956,17 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
870
956
|
/samsungbrowser\/([\w\.]+)/i
|
|
871
957
|
// Samsung Internet
|
|
872
958
|
],
|
|
873
|
-
[u, [l,
|
|
959
|
+
[u, [l, fe + " Internet"]],
|
|
874
960
|
[
|
|
875
961
|
/metasr[\/ ]?([\d\.]+)/i
|
|
876
962
|
// Sogou Explorer
|
|
877
963
|
],
|
|
878
|
-
[u, [l,
|
|
964
|
+
[u, [l, Rt + " Explorer"]],
|
|
879
965
|
[
|
|
880
966
|
/(sogou)mo\w+\/([\d\.]+)/i
|
|
881
967
|
// Sogou Mobile
|
|
882
968
|
],
|
|
883
|
-
[[l,
|
|
969
|
+
[[l, Rt + " Mobile"], u],
|
|
884
970
|
[
|
|
885
971
|
/(electron)\/([\w\.]+) safari/i,
|
|
886
972
|
// Electron-based App
|
|
@@ -907,7 +993,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
907
993
|
/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i
|
|
908
994
|
// Facebook App for iOS & Android
|
|
909
995
|
],
|
|
910
|
-
[[l,
|
|
996
|
+
[[l, it], u, [n, be]],
|
|
911
997
|
[
|
|
912
998
|
/(Klarna)\/([\w\.]+)/i,
|
|
913
999
|
// Klarna Shopping Browser for iOS & Android
|
|
@@ -928,22 +1014,22 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
928
1014
|
/(instagram|snapchat)[\/ ]([-\w\.]+)/i
|
|
929
1015
|
// Instagram/Snapchat
|
|
930
1016
|
],
|
|
931
|
-
[l, u, [n,
|
|
1017
|
+
[l, u, [n, be]],
|
|
932
1018
|
[
|
|
933
1019
|
/\bgsa\/([\w\.]+) .*safari\//i
|
|
934
1020
|
// Google Search Appliance on iOS
|
|
935
1021
|
],
|
|
936
|
-
[u, [l, "GSA"], [n,
|
|
1022
|
+
[u, [l, "GSA"], [n, be]],
|
|
937
1023
|
[
|
|
938
1024
|
/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i
|
|
939
1025
|
// TikTok
|
|
940
1026
|
],
|
|
941
|
-
[u, [l, "TikTok"], [n,
|
|
1027
|
+
[u, [l, "TikTok"], [n, be]],
|
|
942
1028
|
[
|
|
943
1029
|
/\[(linkedin)app\]/i
|
|
944
1030
|
// LinkedIn App for iOS & Android
|
|
945
1031
|
],
|
|
946
|
-
[l, [n,
|
|
1032
|
+
[l, [n, be]],
|
|
947
1033
|
[
|
|
948
1034
|
/(chromium)[\/ ]([-\w\.]+)/i
|
|
949
1035
|
// Chromium
|
|
@@ -953,12 +1039,12 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
953
1039
|
/headlesschrome(?:\/([\w\.]+)| )/i
|
|
954
1040
|
// Chrome Headless
|
|
955
1041
|
],
|
|
956
|
-
[u, [l,
|
|
1042
|
+
[u, [l, xt + " Headless"]],
|
|
957
1043
|
[
|
|
958
1044
|
/ wv\).+(chrome)\/([\w\.]+)/i
|
|
959
1045
|
// Chrome WebView
|
|
960
1046
|
],
|
|
961
|
-
[[l,
|
|
1047
|
+
[[l, xt + " WebView"], u],
|
|
962
1048
|
[
|
|
963
1049
|
/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i
|
|
964
1050
|
// Android Browser
|
|
@@ -1002,7 +1088,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1002
1088
|
/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i
|
|
1003
1089
|
// Firefox Mobile
|
|
1004
1090
|
],
|
|
1005
|
-
[[l, ee +
|
|
1091
|
+
[[l, ee + ke], u],
|
|
1006
1092
|
[
|
|
1007
1093
|
/(navigator|netscape\d?)\/([-\w\.]+)/i
|
|
1008
1094
|
// Netscape
|
|
@@ -1017,7 +1103,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1017
1103
|
/mobile vr; rv:([\w\.]+)\).+firefox/i
|
|
1018
1104
|
// Firefox Reality
|
|
1019
1105
|
],
|
|
1020
|
-
[u, [l,
|
|
1106
|
+
[u, [l, ke + " Reality"]],
|
|
1021
1107
|
[
|
|
1022
1108
|
/ekiohf.+(flow)\/([\w\.]+)/i,
|
|
1023
1109
|
// Flow
|
|
@@ -1042,51 +1128,51 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1042
1128
|
/(cobalt)\/([\w\.]+)/i
|
|
1043
1129
|
// Cobalt
|
|
1044
1130
|
],
|
|
1045
|
-
[l, [u, /[^\d\.]+./,
|
|
1131
|
+
[l, [u, /[^\d\.]+./, ue]]
|
|
1046
1132
|
],
|
|
1047
1133
|
cpu: [
|
|
1048
1134
|
[
|
|
1049
1135
|
/\b((amd|x|x86[-_]?|wow|win)64)\b/i
|
|
1050
1136
|
// AMD64 (x64)
|
|
1051
1137
|
],
|
|
1052
|
-
[[
|
|
1138
|
+
[[T, "amd64"]],
|
|
1053
1139
|
[
|
|
1054
1140
|
/(ia32(?=;))/i,
|
|
1055
1141
|
// IA32 (quicktime)
|
|
1056
1142
|
/\b((i[346]|x)86)(pc)?\b/i
|
|
1057
1143
|
// IA32 (x86)
|
|
1058
1144
|
],
|
|
1059
|
-
[[
|
|
1145
|
+
[[T, "ia32"]],
|
|
1060
1146
|
[
|
|
1061
1147
|
/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i
|
|
1062
1148
|
// ARM64
|
|
1063
1149
|
],
|
|
1064
|
-
[[
|
|
1150
|
+
[[T, "arm64"]],
|
|
1065
1151
|
[
|
|
1066
1152
|
/\b(arm(v[67])?ht?n?[fl]p?)\b/i
|
|
1067
1153
|
// ARMHF
|
|
1068
1154
|
],
|
|
1069
|
-
[[
|
|
1155
|
+
[[T, "armhf"]],
|
|
1070
1156
|
[
|
|
1071
1157
|
// PocketPC mistakenly identified as PowerPC
|
|
1072
1158
|
/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i
|
|
1073
1159
|
],
|
|
1074
|
-
[[
|
|
1160
|
+
[[T, "arm"]],
|
|
1075
1161
|
[
|
|
1076
1162
|
/((ppc|powerpc)(64)?)( mac|;|\))/i
|
|
1077
1163
|
// PowerPC
|
|
1078
1164
|
],
|
|
1079
|
-
[[
|
|
1165
|
+
[[T, /ower/, ue, F]],
|
|
1080
1166
|
[
|
|
1081
1167
|
/ sun4\w[;\)]/i
|
|
1082
1168
|
// SPARC
|
|
1083
1169
|
],
|
|
1084
|
-
[[
|
|
1170
|
+
[[T, "sparc"]],
|
|
1085
1171
|
[
|
|
1086
1172
|
/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i
|
|
1087
1173
|
// IA64, 68K, ARM/64, AVR/32, IRIX/64, MIPS/64, SPARC/64, PA-RISC
|
|
1088
1174
|
],
|
|
1089
|
-
[[
|
|
1175
|
+
[[T, F]]
|
|
1090
1176
|
],
|
|
1091
1177
|
device: [
|
|
1092
1178
|
[
|
|
@@ -1096,61 +1182,61 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1096
1182
|
// Samsung
|
|
1097
1183
|
/\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
|
|
1098
1184
|
],
|
|
1099
|
-
[o, [
|
|
1185
|
+
[o, [d, fe], [n, f]],
|
|
1100
1186
|
[
|
|
1101
1187
|
/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
|
|
1102
1188
|
/samsung[- ]((?!sm-[lr])[-\w]+)/i,
|
|
1103
1189
|
/sec-(sgh\w+)/i
|
|
1104
1190
|
],
|
|
1105
|
-
[o, [
|
|
1191
|
+
[o, [d, fe], [n, w]],
|
|
1106
1192
|
[
|
|
1107
1193
|
// Apple
|
|
1108
1194
|
/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i
|
|
1109
1195
|
// iPod/iPhone
|
|
1110
1196
|
],
|
|
1111
|
-
[o, [
|
|
1197
|
+
[o, [d, Z], [n, w]],
|
|
1112
1198
|
[
|
|
1113
1199
|
/\((ipad);[-\w\),; ]+apple/i,
|
|
1114
1200
|
// iPad
|
|
1115
1201
|
/applecoremedia\/[\w\.]+ \((ipad)/i,
|
|
1116
1202
|
/\b(ipad)\d\d?,\d\d?[;\]].+ios/i
|
|
1117
1203
|
],
|
|
1118
|
-
[o, [
|
|
1204
|
+
[o, [d, Z], [n, f]],
|
|
1119
1205
|
[
|
|
1120
1206
|
/(macintosh);/i
|
|
1121
1207
|
],
|
|
1122
|
-
[o, [
|
|
1208
|
+
[o, [d, Z]],
|
|
1123
1209
|
[
|
|
1124
1210
|
// Sharp
|
|
1125
1211
|
/\b(sh-?[altvz]?\d\d[a-ekm]?)/i
|
|
1126
1212
|
],
|
|
1127
|
-
[o, [
|
|
1213
|
+
[o, [d, Ot], [n, w]],
|
|
1128
1214
|
[
|
|
1129
1215
|
// Honor
|
|
1130
1216
|
/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i
|
|
1131
1217
|
],
|
|
1132
|
-
[o, [
|
|
1218
|
+
[o, [d, At], [n, f]],
|
|
1133
1219
|
[
|
|
1134
1220
|
/honor([-\w ]+)[;\)]/i
|
|
1135
1221
|
],
|
|
1136
|
-
[o, [
|
|
1222
|
+
[o, [d, At], [n, w]],
|
|
1137
1223
|
[
|
|
1138
1224
|
// Huawei
|
|
1139
1225
|
/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i
|
|
1140
1226
|
],
|
|
1141
|
-
[o, [
|
|
1227
|
+
[o, [d, Tt], [n, f]],
|
|
1142
1228
|
[
|
|
1143
1229
|
/(?:huawei)([-\w ]+)[;\)]/i,
|
|
1144
1230
|
/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i
|
|
1145
1231
|
],
|
|
1146
|
-
[o, [
|
|
1232
|
+
[o, [d, Tt], [n, w]],
|
|
1147
1233
|
[
|
|
1148
1234
|
// Xiaomi
|
|
1149
1235
|
/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,
|
|
1150
1236
|
/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i
|
|
1151
1237
|
// Mi Pad tablets
|
|
1152
1238
|
],
|
|
1153
|
-
[[o, /_/g, " "], [
|
|
1239
|
+
[[o, /_/g, " "], [d, tt], [n, f]],
|
|
1154
1240
|
[
|
|
1155
1241
|
/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,
|
|
1156
1242
|
// Xiaomi POCO
|
|
@@ -1166,98 +1252,98 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1166
1252
|
// Xiaomi Mi
|
|
1167
1253
|
/ ([\w ]+) miui\/v?\d/i
|
|
1168
1254
|
],
|
|
1169
|
-
[[o, /_/g, " "], [
|
|
1255
|
+
[[o, /_/g, " "], [d, tt], [n, w]],
|
|
1170
1256
|
[
|
|
1171
1257
|
// OPPO
|
|
1172
1258
|
/; (\w+) bui.+ oppo/i,
|
|
1173
1259
|
/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i
|
|
1174
1260
|
],
|
|
1175
|
-
[o, [
|
|
1261
|
+
[o, [d, et], [n, w]],
|
|
1176
1262
|
[
|
|
1177
1263
|
/\b(opd2(\d{3}a?))(?: bui|\))/i
|
|
1178
1264
|
],
|
|
1179
|
-
[o, [
|
|
1265
|
+
[o, [d, q, { OnePlus: ["304", "403", "203"], "*": et }], [n, f]],
|
|
1180
1266
|
[
|
|
1181
1267
|
// BLU Vivo Series
|
|
1182
1268
|
/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i
|
|
1183
1269
|
],
|
|
1184
|
-
[o, [
|
|
1270
|
+
[o, [d, "BLU"], [n, w]],
|
|
1185
1271
|
[
|
|
1186
1272
|
// Vivo
|
|
1187
1273
|
/; vivo (\w+)(?: bui|\))/i,
|
|
1188
1274
|
/\b(v[12]\d{3}\w?[at])(?: bui|;)/i
|
|
1189
1275
|
],
|
|
1190
|
-
[o, [
|
|
1276
|
+
[o, [d, "Vivo"], [n, w]],
|
|
1191
1277
|
[
|
|
1192
1278
|
// Realme
|
|
1193
1279
|
/\b(rmx[1-3]\d{3})(?: bui|;|\))/i
|
|
1194
1280
|
],
|
|
1195
|
-
[o, [
|
|
1281
|
+
[o, [d, "Realme"], [n, w]],
|
|
1196
1282
|
[
|
|
1197
1283
|
// Motorola
|
|
1198
1284
|
/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
|
|
1199
1285
|
/\bmot(?:orola)?[- ](\w*)/i,
|
|
1200
1286
|
/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
|
|
1201
1287
|
],
|
|
1202
|
-
[o, [
|
|
1288
|
+
[o, [d, Ye], [n, w]],
|
|
1203
1289
|
[
|
|
1204
1290
|
/\b(mz60\d|xoom[2 ]{0,2}) build\//i
|
|
1205
1291
|
],
|
|
1206
|
-
[o, [
|
|
1292
|
+
[o, [d, Ye], [n, f]],
|
|
1207
1293
|
[
|
|
1208
1294
|
// LG
|
|
1209
1295
|
/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i
|
|
1210
1296
|
],
|
|
1211
|
-
[o, [
|
|
1297
|
+
[o, [d, Re], [n, f]],
|
|
1212
1298
|
[
|
|
1213
1299
|
/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
|
|
1214
1300
|
/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,
|
|
1215
1301
|
/\blg-?([\d\w]+) bui/i
|
|
1216
1302
|
],
|
|
1217
|
-
[o, [
|
|
1303
|
+
[o, [d, Re], [n, w]],
|
|
1218
1304
|
[
|
|
1219
1305
|
// Lenovo
|
|
1220
1306
|
/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,
|
|
1221
1307
|
/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i
|
|
1222
1308
|
],
|
|
1223
|
-
[o, [
|
|
1309
|
+
[o, [d, It], [n, f]],
|
|
1224
1310
|
[
|
|
1225
1311
|
// Nokia
|
|
1226
1312
|
/(nokia) (t[12][01])/i
|
|
1227
1313
|
],
|
|
1228
|
-
[
|
|
1314
|
+
[d, o, [n, f]],
|
|
1229
1315
|
[
|
|
1230
1316
|
/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,
|
|
1231
1317
|
/nokia[-_ ]?(([-\w\. ]*))/i
|
|
1232
1318
|
],
|
|
1233
|
-
[[o, /_/g, " "], [n, w], [
|
|
1319
|
+
[[o, /_/g, " "], [n, w], [d, "Nokia"]],
|
|
1234
1320
|
[
|
|
1235
1321
|
// Google
|
|
1236
1322
|
/(pixel (c|tablet))\b/i
|
|
1237
1323
|
// Google Pixel C/Tablet
|
|
1238
1324
|
],
|
|
1239
|
-
[o, [
|
|
1325
|
+
[o, [d, J], [n, f]],
|
|
1240
1326
|
[
|
|
1241
1327
|
/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i
|
|
1242
1328
|
// Google Pixel
|
|
1243
1329
|
],
|
|
1244
|
-
[o, [
|
|
1330
|
+
[o, [d, J], [n, w]],
|
|
1245
1331
|
[
|
|
1246
1332
|
// Sony
|
|
1247
1333
|
/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
|
|
1248
1334
|
],
|
|
1249
|
-
[o, [
|
|
1335
|
+
[o, [d, ye], [n, w]],
|
|
1250
1336
|
[
|
|
1251
1337
|
/sony tablet [ps]/i,
|
|
1252
1338
|
/\b(?:sony)?sgp\w+(?: bui|\))/i
|
|
1253
1339
|
],
|
|
1254
|
-
[[o, "Xperia Tablet"], [
|
|
1340
|
+
[[o, "Xperia Tablet"], [d, ye], [n, f]],
|
|
1255
1341
|
[
|
|
1256
1342
|
// OnePlus
|
|
1257
1343
|
/ (kb2005|in20[12]5|be20[12][59])\b/i,
|
|
1258
1344
|
/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i
|
|
1259
1345
|
],
|
|
1260
|
-
[o, [
|
|
1346
|
+
[o, [d, Pt], [n, w]],
|
|
1261
1347
|
[
|
|
1262
1348
|
// Amazon
|
|
1263
1349
|
/(alexa)webm/i,
|
|
@@ -1266,39 +1352,39 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1266
1352
|
/(kf[a-z]+)( bui|\)).+silk\//i
|
|
1267
1353
|
// Kindle Fire HD
|
|
1268
1354
|
],
|
|
1269
|
-
[o, [
|
|
1355
|
+
[o, [d, Ue], [n, f]],
|
|
1270
1356
|
[
|
|
1271
1357
|
/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i
|
|
1272
1358
|
// Fire Phone
|
|
1273
1359
|
],
|
|
1274
|
-
[[o, /(.+)/g, "Fire Phone $1"], [
|
|
1360
|
+
[[o, /(.+)/g, "Fire Phone $1"], [d, Ue], [n, w]],
|
|
1275
1361
|
[
|
|
1276
1362
|
// BlackBerry
|
|
1277
1363
|
/(playbook);[-\w\),; ]+(rim)/i
|
|
1278
1364
|
// BlackBerry PlayBook
|
|
1279
1365
|
],
|
|
1280
|
-
[o,
|
|
1366
|
+
[o, d, [n, f]],
|
|
1281
1367
|
[
|
|
1282
1368
|
/\b((?:bb[a-f]|st[hv])100-\d)/i,
|
|
1283
1369
|
/\(bb10; (\w+)/i
|
|
1284
1370
|
// BlackBerry 10
|
|
1285
1371
|
],
|
|
1286
|
-
[o, [
|
|
1372
|
+
[o, [d, St], [n, w]],
|
|
1287
1373
|
[
|
|
1288
1374
|
// Asus
|
|
1289
1375
|
/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i
|
|
1290
1376
|
],
|
|
1291
|
-
[o, [
|
|
1377
|
+
[o, [d, Mt], [n, f]],
|
|
1292
1378
|
[
|
|
1293
1379
|
/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i
|
|
1294
1380
|
],
|
|
1295
|
-
[o, [
|
|
1381
|
+
[o, [d, Mt], [n, w]],
|
|
1296
1382
|
[
|
|
1297
1383
|
// HTC
|
|
1298
1384
|
/(nexus 9)/i
|
|
1299
1385
|
// HTC Nexus 9
|
|
1300
1386
|
],
|
|
1301
|
-
[o, [
|
|
1387
|
+
[o, [d, "HTC"], [n, f]],
|
|
1302
1388
|
[
|
|
1303
1389
|
/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
|
|
1304
1390
|
// HTC
|
|
@@ -1307,71 +1393,71 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1307
1393
|
/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
|
|
1308
1394
|
// Alcatel/GeeksPhone/Nexian/Panasonic/Sony
|
|
1309
1395
|
],
|
|
1310
|
-
[
|
|
1396
|
+
[d, [o, /_/g, " "], [n, w]],
|
|
1311
1397
|
[
|
|
1312
1398
|
// TCL
|
|
1313
1399
|
/tcl (xess p17aa)/i,
|
|
1314
1400
|
/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i
|
|
1315
1401
|
],
|
|
1316
|
-
[o, [
|
|
1402
|
+
[o, [d, "TCL"], [n, f]],
|
|
1317
1403
|
[
|
|
1318
1404
|
/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i
|
|
1319
1405
|
],
|
|
1320
|
-
[o, [
|
|
1406
|
+
[o, [d, "TCL"], [n, w]],
|
|
1321
1407
|
[
|
|
1322
1408
|
// itel
|
|
1323
1409
|
/(itel) ((\w+))/i
|
|
1324
1410
|
],
|
|
1325
|
-
[[
|
|
1411
|
+
[[d, F], o, [n, q, { tablet: ["p10001l", "w7001"], "*": "mobile" }]],
|
|
1326
1412
|
[
|
|
1327
1413
|
// Acer
|
|
1328
1414
|
/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i
|
|
1329
1415
|
],
|
|
1330
|
-
[o, [
|
|
1416
|
+
[o, [d, "Acer"], [n, f]],
|
|
1331
1417
|
[
|
|
1332
1418
|
// Meizu
|
|
1333
1419
|
/droid.+; (m[1-5] note) bui/i,
|
|
1334
1420
|
/\bmz-([-\w]{2,})/i
|
|
1335
1421
|
],
|
|
1336
|
-
[o, [
|
|
1422
|
+
[o, [d, "Meizu"], [n, w]],
|
|
1337
1423
|
[
|
|
1338
1424
|
// Ulefone
|
|
1339
1425
|
/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i
|
|
1340
1426
|
],
|
|
1341
|
-
[o, [
|
|
1427
|
+
[o, [d, "Ulefone"], [n, w]],
|
|
1342
1428
|
[
|
|
1343
1429
|
// Energizer
|
|
1344
1430
|
/; (energy ?\w+)(?: bui|\))/i,
|
|
1345
1431
|
/; energizer ([\w ]+)(?: bui|\))/i
|
|
1346
1432
|
],
|
|
1347
|
-
[o, [
|
|
1433
|
+
[o, [d, "Energizer"], [n, w]],
|
|
1348
1434
|
[
|
|
1349
1435
|
// Cat
|
|
1350
1436
|
/; cat (b35);/i,
|
|
1351
1437
|
/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i
|
|
1352
1438
|
],
|
|
1353
|
-
[o, [
|
|
1439
|
+
[o, [d, "Cat"], [n, w]],
|
|
1354
1440
|
[
|
|
1355
1441
|
// Smartfren
|
|
1356
1442
|
/((?:new )?andromax[\w- ]+)(?: bui|\))/i
|
|
1357
1443
|
],
|
|
1358
|
-
[o, [
|
|
1444
|
+
[o, [d, "Smartfren"], [n, w]],
|
|
1359
1445
|
[
|
|
1360
1446
|
// Nothing
|
|
1361
1447
|
/droid.+; (a(?:015|06[35]|142p?))/i
|
|
1362
1448
|
],
|
|
1363
|
-
[o, [
|
|
1449
|
+
[o, [d, "Nothing"], [n, w]],
|
|
1364
1450
|
[
|
|
1365
1451
|
// Archos
|
|
1366
1452
|
/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,
|
|
1367
1453
|
/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i
|
|
1368
1454
|
],
|
|
1369
|
-
[o, [
|
|
1455
|
+
[o, [d, "Archos"], [n, f]],
|
|
1370
1456
|
[
|
|
1371
1457
|
/archos ([\w ]+)( b|\))/i,
|
|
1372
1458
|
/; (ac[3-6]\d\w{2,8})( b|\))/i
|
|
1373
1459
|
],
|
|
1374
|
-
[o, [
|
|
1460
|
+
[o, [d, "Archos"], [n, w]],
|
|
1375
1461
|
[
|
|
1376
1462
|
// MIXED
|
|
1377
1463
|
/(imo) (tab \w+)/i,
|
|
@@ -1379,7 +1465,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1379
1465
|
/(infinix) (x1101b?)/i
|
|
1380
1466
|
// Infinix XPad
|
|
1381
1467
|
],
|
|
1382
|
-
[
|
|
1468
|
+
[d, o, [n, f]],
|
|
1383
1469
|
[
|
|
1384
1470
|
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,
|
|
1385
1471
|
// BlackBerry/BenQ/Palm/Sony-Ericsson/Acer/Asus/Dell/Meizu/Motorola/Polytron/Infinix/Tecno/Micromax/Advan
|
|
@@ -1394,7 +1480,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1394
1480
|
/(oppo) ?([\w ]+) bui/i
|
|
1395
1481
|
// OPPO
|
|
1396
1482
|
],
|
|
1397
|
-
[
|
|
1483
|
+
[d, o, [n, w]],
|
|
1398
1484
|
[
|
|
1399
1485
|
/(kobo)\s(ereader|touch)/i,
|
|
1400
1486
|
// Kobo
|
|
@@ -1403,41 +1489,41 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1403
1489
|
/(kindle)\/([\w\.]+)/i
|
|
1404
1490
|
// Kindle
|
|
1405
1491
|
],
|
|
1406
|
-
[
|
|
1492
|
+
[d, o, [n, f]],
|
|
1407
1493
|
[
|
|
1408
1494
|
/(surface duo)/i
|
|
1409
1495
|
// Surface Duo
|
|
1410
1496
|
],
|
|
1411
|
-
[o, [
|
|
1497
|
+
[o, [d, Je], [n, f]],
|
|
1412
1498
|
[
|
|
1413
1499
|
/droid [\d\.]+; (fp\du?)(?: b|\))/i
|
|
1414
1500
|
// Fairphone
|
|
1415
1501
|
],
|
|
1416
|
-
[o, [
|
|
1502
|
+
[o, [d, "Fairphone"], [n, w]],
|
|
1417
1503
|
[
|
|
1418
1504
|
/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i
|
|
1419
1505
|
// Nvidia Tablets
|
|
1420
1506
|
],
|
|
1421
|
-
[o, [
|
|
1507
|
+
[o, [d, Ze], [n, f]],
|
|
1422
1508
|
[
|
|
1423
1509
|
/(sprint) (\w+)/i
|
|
1424
1510
|
// Sprint Phones
|
|
1425
1511
|
],
|
|
1426
|
-
[
|
|
1512
|
+
[d, o, [n, w]],
|
|
1427
1513
|
[
|
|
1428
1514
|
/(kin\.[onetw]{3})/i
|
|
1429
1515
|
// Microsoft Kin
|
|
1430
1516
|
],
|
|
1431
|
-
[[o, /\./g, " "], [
|
|
1517
|
+
[[o, /\./g, " "], [d, Je], [n, w]],
|
|
1432
1518
|
[
|
|
1433
1519
|
/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i
|
|
1434
1520
|
// Zebra
|
|
1435
1521
|
],
|
|
1436
|
-
[o, [
|
|
1522
|
+
[o, [d, st], [n, f]],
|
|
1437
1523
|
[
|
|
1438
1524
|
/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i
|
|
1439
1525
|
],
|
|
1440
|
-
[o, [
|
|
1526
|
+
[o, [d, st], [n, w]],
|
|
1441
1527
|
[
|
|
1442
1528
|
///////////////////
|
|
1443
1529
|
// SMARTTVS
|
|
@@ -1445,88 +1531,88 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1445
1531
|
/smart-tv.+(samsung)/i
|
|
1446
1532
|
// Samsung
|
|
1447
1533
|
],
|
|
1448
|
-
[
|
|
1534
|
+
[d, [n, y]],
|
|
1449
1535
|
[
|
|
1450
1536
|
/hbbtv.+maple;(\d+)/i
|
|
1451
1537
|
],
|
|
1452
|
-
[[o, /^/, "SmartTV"], [
|
|
1538
|
+
[[o, /^/, "SmartTV"], [d, fe], [n, y]],
|
|
1453
1539
|
[
|
|
1454
1540
|
/tcast.+(lg)e?. ([-\w]+)/i
|
|
1455
1541
|
// LG SmartTV
|
|
1456
1542
|
],
|
|
1457
|
-
[
|
|
1543
|
+
[d, o, [n, y]],
|
|
1458
1544
|
[
|
|
1459
1545
|
/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i
|
|
1460
1546
|
],
|
|
1461
|
-
[[
|
|
1547
|
+
[[d, Re], [n, y]],
|
|
1462
1548
|
[
|
|
1463
1549
|
/(apple) ?tv/i
|
|
1464
1550
|
// Apple TV
|
|
1465
1551
|
],
|
|
1466
|
-
[
|
|
1552
|
+
[d, [o, Z + " TV"], [n, y]],
|
|
1467
1553
|
[
|
|
1468
1554
|
/crkey.*devicetype\/chromecast/i
|
|
1469
1555
|
// Google Chromecast Third Generation
|
|
1470
1556
|
],
|
|
1471
|
-
[[o,
|
|
1557
|
+
[[o, V + " Third Generation"], [d, J], [n, y]],
|
|
1472
1558
|
[
|
|
1473
1559
|
/crkey.*devicetype\/([^/]*)/i
|
|
1474
1560
|
// Google Chromecast with specific device type
|
|
1475
1561
|
],
|
|
1476
|
-
[[o, /^/, "Chromecast "], [
|
|
1562
|
+
[[o, /^/, "Chromecast "], [d, J], [n, y]],
|
|
1477
1563
|
[
|
|
1478
1564
|
/fuchsia.*crkey/i
|
|
1479
1565
|
// Google Chromecast Nest Hub
|
|
1480
1566
|
],
|
|
1481
|
-
[[o,
|
|
1567
|
+
[[o, V + " Nest Hub"], [d, J], [n, y]],
|
|
1482
1568
|
[
|
|
1483
1569
|
/crkey/i
|
|
1484
1570
|
// Google Chromecast, Linux-based or unknown
|
|
1485
1571
|
],
|
|
1486
|
-
[[o,
|
|
1572
|
+
[[o, V], [d, J], [n, y]],
|
|
1487
1573
|
[
|
|
1488
1574
|
/(portaltv)/i
|
|
1489
1575
|
// Facebook Portal TV
|
|
1490
1576
|
],
|
|
1491
|
-
[o, [
|
|
1577
|
+
[o, [d, it], [n, y]],
|
|
1492
1578
|
[
|
|
1493
1579
|
/droid.+aft(\w+)( bui|\))/i
|
|
1494
1580
|
// Fire TV
|
|
1495
1581
|
],
|
|
1496
|
-
[o, [
|
|
1582
|
+
[o, [d, Ue], [n, y]],
|
|
1497
1583
|
[
|
|
1498
1584
|
/(shield \w+ tv)/i
|
|
1499
1585
|
// Nvidia Shield TV
|
|
1500
1586
|
],
|
|
1501
|
-
[o, [
|
|
1587
|
+
[o, [d, Ze], [n, y]],
|
|
1502
1588
|
[
|
|
1503
1589
|
/\(dtv[\);].+(aquos)/i,
|
|
1504
1590
|
/(aquos-tv[\w ]+)\)/i
|
|
1505
1591
|
// Sharp
|
|
1506
1592
|
],
|
|
1507
|
-
[o, [
|
|
1593
|
+
[o, [d, Ot], [n, y]],
|
|
1508
1594
|
[
|
|
1509
1595
|
/(bravia[\w ]+)( bui|\))/i
|
|
1510
1596
|
// Sony
|
|
1511
1597
|
],
|
|
1512
|
-
[o, [
|
|
1598
|
+
[o, [d, ye], [n, y]],
|
|
1513
1599
|
[
|
|
1514
1600
|
/(mi(tv|box)-?\w+) bui/i
|
|
1515
1601
|
// Xiaomi
|
|
1516
1602
|
],
|
|
1517
|
-
[o, [
|
|
1603
|
+
[o, [d, tt], [n, y]],
|
|
1518
1604
|
[
|
|
1519
1605
|
/Hbbtv.*(technisat) (.*);/i
|
|
1520
1606
|
// TechniSAT
|
|
1521
1607
|
],
|
|
1522
|
-
[
|
|
1608
|
+
[d, o, [n, y]],
|
|
1523
1609
|
[
|
|
1524
1610
|
/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,
|
|
1525
1611
|
// Roku
|
|
1526
1612
|
/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i
|
|
1527
1613
|
// HbbTV devices
|
|
1528
1614
|
],
|
|
1529
|
-
[[
|
|
1615
|
+
[[d, Ie], [o, Ie], [n, y]],
|
|
1530
1616
|
[
|
|
1531
1617
|
// SmartTV from Unidentified Vendors
|
|
1532
1618
|
/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i
|
|
@@ -1545,22 +1631,22 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1545
1631
|
/(nintendo) (\w+)/i
|
|
1546
1632
|
// Nintendo
|
|
1547
1633
|
],
|
|
1548
|
-
[
|
|
1634
|
+
[d, o, [n, Me]],
|
|
1549
1635
|
[
|
|
1550
1636
|
/droid.+; (shield)( bui|\))/i
|
|
1551
1637
|
// Nvidia Portable
|
|
1552
1638
|
],
|
|
1553
|
-
[o, [
|
|
1639
|
+
[o, [d, Ze], [n, Me]],
|
|
1554
1640
|
[
|
|
1555
1641
|
/(playstation \w+)/i
|
|
1556
1642
|
// Playstation
|
|
1557
1643
|
],
|
|
1558
|
-
[o, [
|
|
1644
|
+
[o, [d, ye], [n, Me]],
|
|
1559
1645
|
[
|
|
1560
1646
|
/\b(xbox(?: one)?(?!; xbox))[\); ]/i
|
|
1561
1647
|
// Microsoft Xbox
|
|
1562
1648
|
],
|
|
1563
|
-
[o, [
|
|
1649
|
+
[o, [d, Je], [n, Me]],
|
|
1564
1650
|
[
|
|
1565
1651
|
///////////////////
|
|
1566
1652
|
// WEARABLES
|
|
@@ -1568,48 +1654,48 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1568
1654
|
/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i
|
|
1569
1655
|
// Samsung Galaxy Watch
|
|
1570
1656
|
],
|
|
1571
|
-
[o, [
|
|
1657
|
+
[o, [d, fe], [n, U]],
|
|
1572
1658
|
[
|
|
1573
1659
|
/((pebble))app/i,
|
|
1574
1660
|
// Pebble
|
|
1575
1661
|
/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i
|
|
1576
1662
|
// Asus ZenWatch / LG Watch / Pixel Watch
|
|
1577
1663
|
],
|
|
1578
|
-
[
|
|
1664
|
+
[d, o, [n, U]],
|
|
1579
1665
|
[
|
|
1580
1666
|
/(ow(?:19|20)?we?[1-3]{1,3})/i
|
|
1581
1667
|
// Oppo Watch
|
|
1582
1668
|
],
|
|
1583
|
-
[o, [
|
|
1669
|
+
[o, [d, et], [n, U]],
|
|
1584
1670
|
[
|
|
1585
1671
|
/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i
|
|
1586
1672
|
// Apple Watch
|
|
1587
1673
|
],
|
|
1588
|
-
[o, [
|
|
1674
|
+
[o, [d, Z], [n, U]],
|
|
1589
1675
|
[
|
|
1590
1676
|
/(opwwe\d{3})/i
|
|
1591
1677
|
// OnePlus Watch
|
|
1592
1678
|
],
|
|
1593
|
-
[o, [
|
|
1679
|
+
[o, [d, Pt], [n, U]],
|
|
1594
1680
|
[
|
|
1595
1681
|
/(moto 360)/i
|
|
1596
1682
|
// Motorola 360
|
|
1597
1683
|
],
|
|
1598
|
-
[o, [
|
|
1684
|
+
[o, [d, Ye], [n, U]],
|
|
1599
1685
|
[
|
|
1600
1686
|
/(smartwatch 3)/i
|
|
1601
1687
|
// Sony SmartWatch
|
|
1602
1688
|
],
|
|
1603
|
-
[o, [
|
|
1689
|
+
[o, [d, ye], [n, U]],
|
|
1604
1690
|
[
|
|
1605
1691
|
/(g watch r)/i
|
|
1606
1692
|
// LG G Watch R
|
|
1607
1693
|
],
|
|
1608
|
-
[o, [
|
|
1694
|
+
[o, [d, Re], [n, U]],
|
|
1609
1695
|
[
|
|
1610
1696
|
/droid.+; (wt63?0{2,3})\)/i
|
|
1611
1697
|
],
|
|
1612
|
-
[o, [
|
|
1698
|
+
[o, [d, st], [n, U]],
|
|
1613
1699
|
[
|
|
1614
1700
|
///////////////////
|
|
1615
1701
|
// XR
|
|
@@ -1617,17 +1703,17 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1617
1703
|
/droid.+; (glass) \d/i
|
|
1618
1704
|
// Google Glass
|
|
1619
1705
|
],
|
|
1620
|
-
[o, [
|
|
1706
|
+
[o, [d, J], [n, Xe]],
|
|
1621
1707
|
[
|
|
1622
1708
|
/(pico) (4|neo3(?: link|pro)?)/i
|
|
1623
1709
|
// Pico
|
|
1624
1710
|
],
|
|
1625
|
-
[
|
|
1711
|
+
[d, o, [n, Xe]],
|
|
1626
1712
|
[
|
|
1627
1713
|
/(quest( \d| pro)?s?).+vr/i
|
|
1628
1714
|
// Meta Quest
|
|
1629
1715
|
],
|
|
1630
|
-
[o, [
|
|
1716
|
+
[o, [d, it], [n, Xe]],
|
|
1631
1717
|
[
|
|
1632
1718
|
///////////////////
|
|
1633
1719
|
// EMBEDDED
|
|
@@ -1635,28 +1721,28 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1635
1721
|
/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i
|
|
1636
1722
|
// Tesla
|
|
1637
1723
|
],
|
|
1638
|
-
[
|
|
1724
|
+
[d, [n, Se]],
|
|
1639
1725
|
[
|
|
1640
1726
|
/(aeobc)\b/i
|
|
1641
1727
|
// Echo Dot
|
|
1642
1728
|
],
|
|
1643
|
-
[o, [
|
|
1729
|
+
[o, [d, Ue], [n, Se]],
|
|
1644
1730
|
[
|
|
1645
1731
|
/(homepod).+mac os/i
|
|
1646
1732
|
// Apple HomePod
|
|
1647
1733
|
],
|
|
1648
|
-
[o, [
|
|
1734
|
+
[o, [d, Z], [n, Se]],
|
|
1649
1735
|
[
|
|
1650
1736
|
/windows iot/i
|
|
1651
1737
|
],
|
|
1652
|
-
[[n,
|
|
1738
|
+
[[n, Se]],
|
|
1653
1739
|
[
|
|
1654
1740
|
////////////////////
|
|
1655
1741
|
// MIXED (GENERIC)
|
|
1656
1742
|
///////////////////
|
|
1657
1743
|
/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i
|
|
1658
1744
|
],
|
|
1659
|
-
[o, [n,
|
|
1745
|
+
[o, [n, q, { mobile: "Mobile", xr: "VR", "*": f }]],
|
|
1660
1746
|
[
|
|
1661
1747
|
/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i
|
|
1662
1748
|
// Unidentifiable Tablet
|
|
@@ -1671,14 +1757,14 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1671
1757
|
/droid .+?; ([\w\. -]+)( bui|\))/i
|
|
1672
1758
|
// Generic Android Device
|
|
1673
1759
|
],
|
|
1674
|
-
[o, [
|
|
1760
|
+
[o, [d, "Generic"]]
|
|
1675
1761
|
],
|
|
1676
1762
|
engine: [
|
|
1677
1763
|
[
|
|
1678
1764
|
/windows.+ edge\/([\w\.]+)/i
|
|
1679
1765
|
// EdgeHTML
|
|
1680
1766
|
],
|
|
1681
|
-
[u, [l,
|
|
1767
|
+
[u, [l, Ms + "HTML"]],
|
|
1682
1768
|
[
|
|
1683
1769
|
/(arkweb)\/([\w\.]+)/i
|
|
1684
1770
|
// ArkWeb
|
|
@@ -1725,14 +1811,14 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1725
1811
|
/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i
|
|
1726
1812
|
// Windows Phone
|
|
1727
1813
|
],
|
|
1728
|
-
[l, [u,
|
|
1814
|
+
[l, [u, q, Lt]],
|
|
1729
1815
|
[
|
|
1730
1816
|
/windows nt 6\.2; (arm)/i,
|
|
1731
1817
|
// Windows RT
|
|
1732
1818
|
/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,
|
|
1733
1819
|
/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i
|
|
1734
1820
|
],
|
|
1735
|
-
[[u,
|
|
1821
|
+
[[u, q, Lt], [l, lt]],
|
|
1736
1822
|
[
|
|
1737
1823
|
// iOS/macOS
|
|
1738
1824
|
/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,
|
|
@@ -1752,27 +1838,27 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1752
1838
|
/android ([\d\.]+).*crkey/i
|
|
1753
1839
|
// Google Chromecast, Android-based
|
|
1754
1840
|
],
|
|
1755
|
-
[u, [l,
|
|
1841
|
+
[u, [l, V + " Android"]],
|
|
1756
1842
|
[
|
|
1757
1843
|
/fuchsia.*crkey\/([\d\.]+)/i
|
|
1758
1844
|
// Google Chromecast, Fuchsia-based
|
|
1759
1845
|
],
|
|
1760
|
-
[u, [l,
|
|
1846
|
+
[u, [l, V + " Fuchsia"]],
|
|
1761
1847
|
[
|
|
1762
1848
|
/crkey\/([\d\.]+).*devicetype\/smartspeaker/i
|
|
1763
1849
|
// Google Chromecast, Linux-based Smart Speaker
|
|
1764
1850
|
],
|
|
1765
|
-
[u, [l,
|
|
1851
|
+
[u, [l, V + " SmartSpeaker"]],
|
|
1766
1852
|
[
|
|
1767
1853
|
/linux.*crkey\/([\d\.]+)/i
|
|
1768
1854
|
// Google Chromecast, Legacy Linux-based
|
|
1769
1855
|
],
|
|
1770
|
-
[u, [l,
|
|
1856
|
+
[u, [l, V + " Linux"]],
|
|
1771
1857
|
[
|
|
1772
1858
|
/crkey\/([\d\.]+)/i
|
|
1773
1859
|
// Google Chromecast, unknown
|
|
1774
1860
|
],
|
|
1775
|
-
[u, [l,
|
|
1861
|
+
[u, [l, V]],
|
|
1776
1862
|
[
|
|
1777
1863
|
// Mobile OSes
|
|
1778
1864
|
/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i
|
|
@@ -1793,7 +1879,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1793
1879
|
/\(bb(10);/i
|
|
1794
1880
|
// BlackBerry 10
|
|
1795
1881
|
],
|
|
1796
|
-
[u, [l,
|
|
1882
|
+
[u, [l, St]],
|
|
1797
1883
|
[
|
|
1798
1884
|
/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i
|
|
1799
1885
|
// Symbian
|
|
@@ -1803,7 +1889,7 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1803
1889
|
/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i
|
|
1804
1890
|
// Firefox OS
|
|
1805
1891
|
],
|
|
1806
|
-
[u, [l,
|
|
1892
|
+
[u, [l, ke + " OS"]],
|
|
1807
1893
|
[
|
|
1808
1894
|
/web0s;.+rt(tv)/i,
|
|
1809
1895
|
/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i
|
|
@@ -1872,124 +1958,124 @@ var gi = "2.0.3", ct = 500, yt = "user-agent", le = "", kt = "?", _e = "function
|
|
|
1872
1958
|
],
|
|
1873
1959
|
[l, u]
|
|
1874
1960
|
]
|
|
1875
|
-
},
|
|
1876
|
-
var
|
|
1877
|
-
return
|
|
1878
|
-
[S, [l, u,
|
|
1879
|
-
[
|
|
1880
|
-
[R, [n, o,
|
|
1881
|
-
[
|
|
1882
|
-
[
|
|
1883
|
-
]),
|
|
1884
|
-
[S, [u,
|
|
1885
|
-
[
|
|
1886
|
-
[
|
|
1887
|
-
]),
|
|
1961
|
+
}, Le = function() {
|
|
1962
|
+
var i = { init: {}, isIgnore: {}, isIgnoreRgx: {}, toString: {} };
|
|
1963
|
+
return D.call(i.init, [
|
|
1964
|
+
[S, [l, u, Te, n]],
|
|
1965
|
+
[N, [T]],
|
|
1966
|
+
[R, [n, o, d]],
|
|
1967
|
+
[x, [l, u]],
|
|
1968
|
+
[O, [l, u]]
|
|
1969
|
+
]), D.call(i.isIgnore, [
|
|
1970
|
+
[S, [u, Te]],
|
|
1971
|
+
[x, [u]],
|
|
1972
|
+
[O, [u]]
|
|
1973
|
+
]), D.call(i.isIgnoreRgx, [
|
|
1888
1974
|
[S, / ?browser$/i],
|
|
1889
|
-
[
|
|
1890
|
-
]),
|
|
1975
|
+
[O, / ?os$/i]
|
|
1976
|
+
]), D.call(i.toString, [
|
|
1891
1977
|
[S, [l, u]],
|
|
1892
|
-
[
|
|
1893
|
-
[R, [
|
|
1894
|
-
[
|
|
1895
|
-
[
|
|
1896
|
-
]),
|
|
1897
|
-
}(),
|
|
1898
|
-
var e =
|
|
1899
|
-
function
|
|
1900
|
-
|
|
1901
|
-
}
|
|
1902
|
-
return
|
|
1903
|
-
return
|
|
1904
|
-
},
|
|
1905
|
-
return
|
|
1906
|
-
return
|
|
1907
|
-
}) :
|
|
1908
|
-
},
|
|
1909
|
-
return
|
|
1910
|
-
}, t !=
|
|
1978
|
+
[N, [T]],
|
|
1979
|
+
[R, [d, o]],
|
|
1980
|
+
[x, [l, u]],
|
|
1981
|
+
[O, [l, u]]
|
|
1982
|
+
]), i;
|
|
1983
|
+
}(), Is = function(i, t) {
|
|
1984
|
+
var e = Le.init[t], s = Le.isIgnore[t] || 0, a = Le.isIgnoreRgx[t] || 0, r = Le.toString[t] || 0;
|
|
1985
|
+
function c() {
|
|
1986
|
+
D.call(this, e);
|
|
1987
|
+
}
|
|
1988
|
+
return c.prototype.getItem = function() {
|
|
1989
|
+
return i;
|
|
1990
|
+
}, c.prototype.withClientHints = function() {
|
|
1991
|
+
return z ? z.getHighEntropyValues(Qt).then(function(p) {
|
|
1992
|
+
return i.setCH(new Xt(p, !1)).parseCH().get();
|
|
1993
|
+
}) : i.parseCH().get();
|
|
1994
|
+
}, c.prototype.withFeatureCheck = function() {
|
|
1995
|
+
return i.detectFeature().get();
|
|
1996
|
+
}, t != se && (c.prototype.is = function(p) {
|
|
1911
1997
|
var h = !1;
|
|
1912
1998
|
for (var g in this)
|
|
1913
|
-
if (this.hasOwnProperty(g) && !ut(
|
|
1914
|
-
if (h = !0, p !=
|
|
1915
|
-
} else if (p ==
|
|
1999
|
+
if (this.hasOwnProperty(g) && !ut(s, g) && F(a ? pe(a, this[g]) : this[g]) == F(a ? pe(a, p) : p)) {
|
|
2000
|
+
if (h = !0, p != j) break;
|
|
2001
|
+
} else if (p == j && h) {
|
|
1916
2002
|
h = !h;
|
|
1917
2003
|
break;
|
|
1918
2004
|
}
|
|
1919
2005
|
return h;
|
|
1920
|
-
},
|
|
1921
|
-
var p =
|
|
1922
|
-
for (var h in
|
|
1923
|
-
typeof this[
|
|
1924
|
-
return p ||
|
|
1925
|
-
}),
|
|
2006
|
+
}, c.prototype.toString = function() {
|
|
2007
|
+
var p = ue;
|
|
2008
|
+
for (var h in r)
|
|
2009
|
+
typeof this[r[h]] !== j && (p += (p ? " " : ue) + this[r[h]]);
|
|
2010
|
+
return p || j;
|
|
2011
|
+
}), z || (c.prototype.then = function(p) {
|
|
1926
2012
|
var h = this, g = function() {
|
|
1927
2013
|
for (var C in h)
|
|
1928
2014
|
h.hasOwnProperty(C) && (this[C] = h[C]);
|
|
1929
2015
|
};
|
|
1930
2016
|
g.prototype = {
|
|
1931
|
-
is:
|
|
1932
|
-
toString:
|
|
2017
|
+
is: c.prototype.is,
|
|
2018
|
+
toString: c.prototype.toString
|
|
1933
2019
|
};
|
|
1934
2020
|
var m = new g();
|
|
1935
2021
|
return p(m), m;
|
|
1936
|
-
}), new
|
|
2022
|
+
}), new c();
|
|
1937
2023
|
};
|
|
1938
|
-
function
|
|
1939
|
-
if (
|
|
1940
|
-
|
|
1941
|
-
[ht, at(
|
|
1942
|
-
[pt, at(
|
|
1943
|
-
[w, /\?1/.test(
|
|
1944
|
-
[o,
|
|
1945
|
-
[ie,
|
|
1946
|
-
[gt,
|
|
1947
|
-
[
|
|
1948
|
-
[Y, at(
|
|
1949
|
-
[Ve,
|
|
2024
|
+
function Xt(i, t) {
|
|
2025
|
+
if (i = i || {}, D.call(this, Qt), t)
|
|
2026
|
+
D.call(this, [
|
|
2027
|
+
[ht, at(i[$])],
|
|
2028
|
+
[pt, at(i[bs])],
|
|
2029
|
+
[w, /\?1/.test(i[Es])],
|
|
2030
|
+
[o, Ce(i[vs])],
|
|
2031
|
+
[ie, Ce(i[Kt])],
|
|
2032
|
+
[gt, Ce(i[Cs])],
|
|
2033
|
+
[T, Ce(i[fs])],
|
|
2034
|
+
[Y, at(i[ks])],
|
|
2035
|
+
[Ve, Ce(i[ys])]
|
|
1950
2036
|
]);
|
|
1951
2037
|
else
|
|
1952
|
-
for (var e in
|
|
1953
|
-
this.hasOwnProperty(e) && typeof
|
|
2038
|
+
for (var e in i)
|
|
2039
|
+
this.hasOwnProperty(e) && typeof i[e] !== j && (this[e] = i[e]);
|
|
1954
2040
|
}
|
|
1955
|
-
function
|
|
2041
|
+
function Nt(i, t, e, s) {
|
|
1956
2042
|
return this.get = function(a) {
|
|
1957
2043
|
return a ? this.data.hasOwnProperty(a) ? this.data[a] : void 0 : this.data;
|
|
1958
|
-
}, this.set = function(a,
|
|
1959
|
-
return this.data[a] =
|
|
2044
|
+
}, this.set = function(a, r) {
|
|
2045
|
+
return this.data[a] = r, this;
|
|
1960
2046
|
}, this.setCH = function(a) {
|
|
1961
2047
|
return this.uaCH = a, this;
|
|
1962
2048
|
}, this.detectFeature = function() {
|
|
1963
|
-
if (
|
|
2049
|
+
if (I && I.userAgent == this.ua)
|
|
1964
2050
|
switch (this.itemType) {
|
|
1965
2051
|
case S:
|
|
1966
|
-
|
|
2052
|
+
I.brave && typeof I.brave.isBrave == _e && this.set(l, "Brave");
|
|
1967
2053
|
break;
|
|
1968
2054
|
case R:
|
|
1969
|
-
!this.get(n) &&
|
|
2055
|
+
!this.get(n) && z && z[w] && this.set(n, w), this.get(o) == "Macintosh" && I && typeof I.standalone !== j && I.maxTouchPoints && I.maxTouchPoints > 2 && this.set(o, "iPad").set(n, f);
|
|
1970
2056
|
break;
|
|
1971
|
-
case
|
|
1972
|
-
!this.get(l) &&
|
|
2057
|
+
case O:
|
|
2058
|
+
!this.get(l) && z && z[ie] && this.set(l, z[ie]);
|
|
1973
2059
|
break;
|
|
1974
|
-
case
|
|
1975
|
-
var a = this.data,
|
|
1976
|
-
return a[
|
|
2060
|
+
case se:
|
|
2061
|
+
var a = this.data, r = function(c) {
|
|
2062
|
+
return a[c].getItem().detectFeature().get();
|
|
1977
2063
|
};
|
|
1978
|
-
this.set(S,
|
|
2064
|
+
this.set(S, r(S)).set(N, r(N)).set(R, r(R)).set(x, r(x)).set(O, r(O));
|
|
1979
2065
|
}
|
|
1980
2066
|
return this;
|
|
1981
2067
|
}, this.parseUA = function() {
|
|
1982
|
-
return this.itemType !=
|
|
2068
|
+
return this.itemType != se && ot.call(this.data, this.ua, this.rgxMap), this.itemType == S && this.set(Te, nt(this.get(u))), this;
|
|
1983
2069
|
}, this.parseCH = function() {
|
|
1984
|
-
var a = this.uaCH,
|
|
2070
|
+
var a = this.uaCH, r = this.rgxMap;
|
|
1985
2071
|
switch (this.itemType) {
|
|
1986
2072
|
case S:
|
|
1987
|
-
case
|
|
1988
|
-
var
|
|
1989
|
-
if (
|
|
1990
|
-
for (var h in
|
|
1991
|
-
var g =
|
|
1992
|
-
this.itemType == S && !/not.a.brand/i.test(g) && (!p || /chrom/i.test(p) && g !=
|
|
2073
|
+
case x:
|
|
2074
|
+
var c = a[pt] || a[ht], p;
|
|
2075
|
+
if (c)
|
|
2076
|
+
for (var h in c) {
|
|
2077
|
+
var g = c[h].brand || c[h], m = c[h].version;
|
|
2078
|
+
this.itemType == S && !/not.a.brand/i.test(g) && (!p || /chrom/i.test(p) && g != Ut) && (g = q(g, {
|
|
1993
2079
|
Chrome: "Google Chrome",
|
|
1994
2080
|
Edge: "Microsoft Edge",
|
|
1995
2081
|
"Chrome WebView": "Android WebView",
|
|
@@ -1998,107 +2084,139 @@ function Lt(s, t, e, i) {
|
|
|
1998
2084
|
"MIUI Browser": "Miui Browser",
|
|
1999
2085
|
"Opera Mobi": "OperaMobile",
|
|
2000
2086
|
Yandex: "YaBrowser"
|
|
2001
|
-
}), this.set(l, g).set(u, m).set(
|
|
2087
|
+
}), this.set(l, g).set(u, m).set(Te, nt(m)), p = g), this.itemType == x && g == Ut && this.set(u, m);
|
|
2002
2088
|
}
|
|
2003
2089
|
break;
|
|
2004
|
-
case
|
|
2005
|
-
var C = a[
|
|
2006
|
-
C && (C && a[Ve] == "64" && (C += "64"), ot.call(this.data, C + ";",
|
|
2090
|
+
case N:
|
|
2091
|
+
var C = a[T];
|
|
2092
|
+
C && (C && a[Ve] == "64" && (C += "64"), ot.call(this.data, C + ";", r));
|
|
2007
2093
|
break;
|
|
2008
2094
|
case R:
|
|
2009
|
-
if (a[w] && this.set(n, w), a[o] && (this.set(o, a[o]), !this.get(n) || !this.get(
|
|
2095
|
+
if (a[w] && this.set(n, w), a[o] && (this.set(o, a[o]), !this.get(n) || !this.get(d))) {
|
|
2010
2096
|
var A = {};
|
|
2011
|
-
ot.call(A, "droid 9; " + a[o] + ")",
|
|
2097
|
+
ot.call(A, "droid 9; " + a[o] + ")", r), !this.get(n) && A.type && this.set(n, A.type), !this.get(d) && A.vendor && this.set(d, A.vendor);
|
|
2012
2098
|
}
|
|
2013
2099
|
if (a[Y]) {
|
|
2014
|
-
var
|
|
2100
|
+
var G;
|
|
2015
2101
|
if (typeof a[Y] != "string")
|
|
2016
|
-
for (var
|
|
2017
|
-
|
|
2102
|
+
for (var we = 0; !G && we < a[Y].length; )
|
|
2103
|
+
G = q(a[Y][we++], Bt);
|
|
2018
2104
|
else
|
|
2019
|
-
|
|
2020
|
-
this.set(n,
|
|
2105
|
+
G = q(a[Y], Bt);
|
|
2106
|
+
this.set(n, G);
|
|
2021
2107
|
}
|
|
2022
2108
|
break;
|
|
2023
|
-
case
|
|
2109
|
+
case O:
|
|
2024
2110
|
var _ = a[ie];
|
|
2025
2111
|
if (_) {
|
|
2026
|
-
var
|
|
2027
|
-
_ == lt && (
|
|
2112
|
+
var K = a[gt];
|
|
2113
|
+
_ == lt && (K = parseInt(nt(K), 10) >= 13 ? "11" : "10"), this.set(l, _).set(u, K);
|
|
2028
2114
|
}
|
|
2029
2115
|
this.get(l) == lt && a[o] == "Xbox" && this.set(l, "Xbox").set(u, void 0);
|
|
2030
2116
|
break;
|
|
2031
|
-
case
|
|
2032
|
-
var
|
|
2033
|
-
return
|
|
2117
|
+
case se:
|
|
2118
|
+
var Q = this.data, H = function(xe) {
|
|
2119
|
+
return Q[xe].getItem().setCH(a).parseCH().get();
|
|
2034
2120
|
};
|
|
2035
|
-
this.set(S,
|
|
2121
|
+
this.set(S, H(S)).set(N, H(N)).set(R, H(R)).set(x, H(x)).set(O, H(O));
|
|
2036
2122
|
}
|
|
2037
2123
|
return this;
|
|
2038
|
-
},
|
|
2039
|
-
["itemType",
|
|
2124
|
+
}, D.call(this, [
|
|
2125
|
+
["itemType", i],
|
|
2040
2126
|
["ua", t],
|
|
2041
|
-
["uaCH",
|
|
2127
|
+
["uaCH", s],
|
|
2042
2128
|
["rgxMap", e],
|
|
2043
|
-
["data",
|
|
2129
|
+
["data", Is(this, i)]
|
|
2044
2130
|
]), this;
|
|
2045
2131
|
}
|
|
2046
|
-
function L(
|
|
2047
|
-
if (typeof
|
|
2048
|
-
var
|
|
2132
|
+
function L(i, t, e) {
|
|
2133
|
+
if (typeof i === he ? (Ne(i, !0) ? (typeof t === he && (e = t), t = i) : (e = i, t = void 0), i = void 0) : typeof i === dt && !Ne(t, !0) && (e = t, t = void 0), e && typeof e.append === _e) {
|
|
2134
|
+
var s = {};
|
|
2049
2135
|
e.forEach(function(h, g) {
|
|
2050
|
-
|
|
2051
|
-
}), e =
|
|
2136
|
+
s[g] = h;
|
|
2137
|
+
}), e = s;
|
|
2052
2138
|
}
|
|
2053
2139
|
if (!(this instanceof L))
|
|
2054
|
-
return new L(
|
|
2055
|
-
var a = typeof
|
|
2140
|
+
return new L(i, t, e).getResult();
|
|
2141
|
+
var a = typeof i === dt ? i : (
|
|
2056
2142
|
// Passed user-agent string
|
|
2057
|
-
e && e[
|
|
2143
|
+
e && e[vt] ? e[vt] : (
|
|
2058
2144
|
// User-Agent from passed headers
|
|
2059
|
-
|
|
2145
|
+
I && I.userAgent ? I.userAgent : (
|
|
2060
2146
|
// navigator.userAgent
|
|
2061
|
-
|
|
2147
|
+
ue
|
|
2062
2148
|
)
|
|
2063
2149
|
)
|
|
2064
|
-
),
|
|
2065
|
-
return h ==
|
|
2066
|
-
return new
|
|
2150
|
+
), r = new Xt(e, !0), c = t ? Ts(_t, t) : _t, p = function(h) {
|
|
2151
|
+
return h == se ? function() {
|
|
2152
|
+
return new Nt(h, a, c, r).set("ua", a).set(S, this.getBrowser()).set(N, this.getCPU()).set(R, this.getDevice()).set(x, this.getEngine()).set(O, this.getOS()).get();
|
|
2067
2153
|
} : function() {
|
|
2068
|
-
return new
|
|
2154
|
+
return new Nt(h, a, c[h], r).parseUA().get();
|
|
2069
2155
|
};
|
|
2070
2156
|
};
|
|
2071
|
-
return
|
|
2157
|
+
return D.call(this, [
|
|
2072
2158
|
["getBrowser", p(S)],
|
|
2073
|
-
["getCPU", p(
|
|
2159
|
+
["getCPU", p(N)],
|
|
2074
2160
|
["getDevice", p(R)],
|
|
2075
|
-
["getEngine", p(
|
|
2076
|
-
["getOS", p(
|
|
2077
|
-
["getResult", p(
|
|
2161
|
+
["getEngine", p(x)],
|
|
2162
|
+
["getOS", p(O)],
|
|
2163
|
+
["getResult", p(se)],
|
|
2078
2164
|
["getUA", function() {
|
|
2079
2165
|
return a;
|
|
2080
2166
|
}],
|
|
2081
2167
|
["setUA", function(h) {
|
|
2082
|
-
return
|
|
2168
|
+
return ge(h) && (a = h.length > ct ? Ie(h, ct) : h), this;
|
|
2083
2169
|
}]
|
|
2084
2170
|
]).setUA(a), this;
|
|
2085
2171
|
}
|
|
2086
|
-
L.VERSION =
|
|
2087
|
-
L.BROWSER = ze([l, u,
|
|
2088
|
-
L.CPU = ze([
|
|
2089
|
-
L.DEVICE = ze([o,
|
|
2172
|
+
L.VERSION = ms;
|
|
2173
|
+
L.BROWSER = ze([l, u, Te, n]);
|
|
2174
|
+
L.CPU = ze([T]);
|
|
2175
|
+
L.DEVICE = ze([o, d, n, Me, w, y, f, U, Se]);
|
|
2090
2176
|
L.ENGINE = L.OS = ze([l, u]);
|
|
2091
|
-
class
|
|
2177
|
+
class As {
|
|
2092
2178
|
constructor(t, e) {
|
|
2093
2179
|
b(this, "config");
|
|
2094
2180
|
b(this, "sdkConfig");
|
|
2095
|
-
this
|
|
2181
|
+
b(this, "error");
|
|
2182
|
+
this.config = t, this.sdkConfig = e, this.on("openGame", async () => {
|
|
2183
|
+
try {
|
|
2184
|
+
this.error = void 0;
|
|
2185
|
+
const s = await this.openGame();
|
|
2186
|
+
this.send("openGameResponse", s);
|
|
2187
|
+
} catch (s) {
|
|
2188
|
+
this.error = s, this.send("openGameError", this.error);
|
|
2189
|
+
}
|
|
2190
|
+
}), this.on("play", async (s) => {
|
|
2191
|
+
try {
|
|
2192
|
+
this.error = void 0;
|
|
2193
|
+
const a = await this.play(s);
|
|
2194
|
+
this.send("playResponse", a);
|
|
2195
|
+
} catch (a) {
|
|
2196
|
+
this.error = a, this.send("playError", this.error);
|
|
2197
|
+
}
|
|
2198
|
+
}), this.on("freeRounds", async (s) => {
|
|
2199
|
+
try {
|
|
2200
|
+
this.error = void 0;
|
|
2201
|
+
const a = await this.freeRounds(s);
|
|
2202
|
+
this.send("freeRoundsResponse", a);
|
|
2203
|
+
} catch (a) {
|
|
2204
|
+
this.error = a, this.send("freeRoundsError", this.error);
|
|
2205
|
+
}
|
|
2206
|
+
}), this.on("getBalance", async () => {
|
|
2207
|
+
try {
|
|
2208
|
+
this.error = void 0;
|
|
2209
|
+
const s = await this.getBalance();
|
|
2210
|
+
this.send("balance", s);
|
|
2211
|
+
} catch {
|
|
2212
|
+
}
|
|
2213
|
+
}), this.showHistory = this.showHistory.bind(this), this.on("history", this.showHistory);
|
|
2096
2214
|
}
|
|
2097
|
-
on(t, e,
|
|
2098
|
-
const a = function(
|
|
2099
|
-
|
|
2215
|
+
on(t, e, s) {
|
|
2216
|
+
const a = function(c) {
|
|
2217
|
+
c.data.message !== `kalamba:wrapper-rgs:${t}` && c.data.message !== `kalamba:wrapper:${t}` || e(c.data.payload);
|
|
2100
2218
|
};
|
|
2101
|
-
window.addEventListener("message", a,
|
|
2219
|
+
window.addEventListener("message", a, s);
|
|
2102
2220
|
}
|
|
2103
2221
|
send(t, ...[e]) {
|
|
2104
2222
|
window.postMessage({
|
|
@@ -2106,8 +2224,25 @@ class Ii {
|
|
|
2106
2224
|
payload: e
|
|
2107
2225
|
});
|
|
2108
2226
|
}
|
|
2227
|
+
async openGame() {
|
|
2228
|
+
throw new Error("Not implemented");
|
|
2229
|
+
}
|
|
2230
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2231
|
+
async play(t) {
|
|
2232
|
+
throw new Error("Not implemented");
|
|
2233
|
+
}
|
|
2234
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2235
|
+
async freeRounds(t) {
|
|
2236
|
+
throw new Error("Not implemented");
|
|
2237
|
+
}
|
|
2238
|
+
async getBalance() {
|
|
2239
|
+
throw new Error("Not implemented");
|
|
2240
|
+
}
|
|
2241
|
+
async showHistory() {
|
|
2242
|
+
throw new Error("Not implemented");
|
|
2243
|
+
}
|
|
2109
2244
|
}
|
|
2110
|
-
class
|
|
2245
|
+
class Ps {
|
|
2111
2246
|
constructor(t) {
|
|
2112
2247
|
b(this, "socket", null);
|
|
2113
2248
|
b(this, "webSocketUrl");
|
|
@@ -2121,8 +2256,8 @@ class Ti {
|
|
|
2121
2256
|
return t.addEventListener("message", this.handleMessage), new Promise((e) => {
|
|
2122
2257
|
t.addEventListener(
|
|
2123
2258
|
"open",
|
|
2124
|
-
(
|
|
2125
|
-
this.handleOpen(
|
|
2259
|
+
(s) => {
|
|
2260
|
+
this.handleOpen(s), e(this.socket);
|
|
2126
2261
|
},
|
|
2127
2262
|
{ once: !0 }
|
|
2128
2263
|
);
|
|
@@ -2163,36 +2298,36 @@ class Ti {
|
|
|
2163
2298
|
this.eventListeners[t].push(e);
|
|
2164
2299
|
}
|
|
2165
2300
|
removeEventListener(t, e) {
|
|
2166
|
-
const
|
|
2167
|
-
|
|
2301
|
+
const s = this.eventListeners[t].indexOf(e);
|
|
2302
|
+
s !== -1 && this.eventListeners[t].splice(s, 1);
|
|
2168
2303
|
}
|
|
2169
2304
|
}
|
|
2170
|
-
function
|
|
2171
|
-
return JSON.parse(
|
|
2305
|
+
function Be(i) {
|
|
2306
|
+
return JSON.parse(i == null ? void 0 : i.data);
|
|
2172
2307
|
}
|
|
2173
|
-
function
|
|
2308
|
+
function Os(i) {
|
|
2174
2309
|
var t;
|
|
2175
|
-
return ((t =
|
|
2310
|
+
return ((t = i == null ? void 0 : i.header) == null ? void 0 : t.name) === "Ping";
|
|
2176
2311
|
}
|
|
2177
|
-
function
|
|
2312
|
+
function Ft(i) {
|
|
2178
2313
|
var t;
|
|
2179
|
-
return ((t =
|
|
2314
|
+
return ((t = i == null ? void 0 : i.header) == null ? void 0 : t.name) === "RealityCheck";
|
|
2180
2315
|
}
|
|
2181
|
-
function Fe(
|
|
2182
|
-
return
|
|
2316
|
+
function Fe(i) {
|
|
2317
|
+
return i.header.name === "GameEvent";
|
|
2183
2318
|
}
|
|
2184
|
-
function
|
|
2185
|
-
return Fe(
|
|
2319
|
+
function xs(i) {
|
|
2320
|
+
return Fe(i) && i.body.event === "OPEN_GAME";
|
|
2186
2321
|
}
|
|
2187
|
-
function
|
|
2188
|
-
return
|
|
2322
|
+
function Dt(i) {
|
|
2323
|
+
return i.header.code !== 1;
|
|
2189
2324
|
}
|
|
2190
|
-
function
|
|
2191
|
-
return Fe(
|
|
2325
|
+
function Us(i) {
|
|
2326
|
+
return Fe(i) && i.body.event.includes("_RESULT");
|
|
2192
2327
|
}
|
|
2193
|
-
var
|
|
2194
|
-
class
|
|
2195
|
-
constructor(e,
|
|
2328
|
+
var ae, Ae;
|
|
2329
|
+
class Rs extends Ps {
|
|
2330
|
+
constructor(e, s) {
|
|
2196
2331
|
const a = new URL(e.apiUrl);
|
|
2197
2332
|
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);
|
|
2198
2333
|
super(a.toString());
|
|
@@ -2225,38 +2360,38 @@ class xi extends Ti {
|
|
|
2225
2360
|
*/
|
|
2226
2361
|
b(this, "seqId", 0);
|
|
2227
2362
|
b(this, "gameCode");
|
|
2228
|
-
M(this,
|
|
2229
|
-
M(this,
|
|
2363
|
+
M(this, ae);
|
|
2364
|
+
M(this, Ae);
|
|
2230
2365
|
b(this, "onMessage", (e) => {
|
|
2231
|
-
const
|
|
2232
|
-
(Fe(
|
|
2366
|
+
const s = Be(e);
|
|
2367
|
+
(Fe(s) || Os(s) || Ft(s)) && this.sendAcknowledgement(s), Ft(s) && this.handleRealityCheck(s);
|
|
2233
2368
|
});
|
|
2234
|
-
this.eventListeners.realityCheck = [], this.gameCode = e.gameCode,
|
|
2369
|
+
this.eventListeners.realityCheck = [], this.gameCode = e.gameCode, E(this, ae, s.requestTimeoutMs), E(this, Ae, s.gameVersion ?? "unknown"), this.addEventListener("message", this.onMessage);
|
|
2235
2370
|
}
|
|
2236
2371
|
handleRealityCheck(e) {
|
|
2237
|
-
this.eventListeners.realityCheck.forEach((
|
|
2238
|
-
|
|
2372
|
+
this.eventListeners.realityCheck.forEach((s) => {
|
|
2373
|
+
s(e.body);
|
|
2239
2374
|
});
|
|
2240
2375
|
}
|
|
2241
|
-
addEventListener(e,
|
|
2242
|
-
super.addEventListener(e,
|
|
2376
|
+
addEventListener(e, s) {
|
|
2377
|
+
super.addEventListener(e, s);
|
|
2243
2378
|
}
|
|
2244
|
-
removeEventListener(e,
|
|
2245
|
-
super.removeEventListener(e,
|
|
2379
|
+
removeEventListener(e, s) {
|
|
2380
|
+
super.removeEventListener(e, s);
|
|
2246
2381
|
}
|
|
2247
|
-
buildHeader(e,
|
|
2382
|
+
buildHeader(e, s = null) {
|
|
2248
2383
|
return {
|
|
2249
2384
|
// Assign new cId if it is not provided
|
|
2250
|
-
cId:
|
|
2251
|
-
code:
|
|
2385
|
+
cId: s ?? ++this.cId,
|
|
2386
|
+
code: s !== null ? 1 : void 0,
|
|
2252
2387
|
mId: ++this.mId,
|
|
2253
2388
|
name: e
|
|
2254
2389
|
};
|
|
2255
2390
|
}
|
|
2256
2391
|
// TODO infer body from header
|
|
2257
|
-
buildPayload(e,
|
|
2392
|
+
buildPayload(e, s) {
|
|
2258
2393
|
return JSON.stringify({
|
|
2259
|
-
body:
|
|
2394
|
+
body: s,
|
|
2260
2395
|
header: e
|
|
2261
2396
|
});
|
|
2262
2397
|
}
|
|
@@ -2266,71 +2401,78 @@ class xi extends Ti {
|
|
|
2266
2401
|
seqId: ++this.seqId
|
|
2267
2402
|
};
|
|
2268
2403
|
}
|
|
2269
|
-
request(e,
|
|
2270
|
-
const a = this.buildPayload(e,
|
|
2271
|
-
return new Promise((
|
|
2272
|
-
setTimeout(() =>
|
|
2404
|
+
request(e, s) {
|
|
2405
|
+
const a = this.buildPayload(e, s);
|
|
2406
|
+
return new Promise((r, c) => {
|
|
2407
|
+
setTimeout(() => c({ type: "timeout" }), k(this, ae));
|
|
2273
2408
|
const p = (h) => {
|
|
2274
|
-
const g =
|
|
2409
|
+
const g = Be(h);
|
|
2275
2410
|
try {
|
|
2276
|
-
e.cId === g.header.cId && (this.removeEventListener("message", p), g.header.code === 1 ?
|
|
2411
|
+
e.cId === g.header.cId && (this.removeEventListener("message", p), g.header.code === 1 ? r(g) : c({ message: g, type: "error" }));
|
|
2277
2412
|
} catch {
|
|
2278
|
-
|
|
2413
|
+
c({ message: g, type: "error" });
|
|
2279
2414
|
}
|
|
2280
2415
|
};
|
|
2281
2416
|
this.addEventListener("message", p), this.send(a);
|
|
2282
2417
|
});
|
|
2283
2418
|
}
|
|
2284
2419
|
freeRounds(e) {
|
|
2285
|
-
const
|
|
2286
|
-
return this.request(
|
|
2287
|
-
var
|
|
2288
|
-
throw { data: (
|
|
2420
|
+
const s = this.buildHeader("ActivateFreeRound");
|
|
2421
|
+
return this.request(s, e).then((a) => a.body).catch((a) => {
|
|
2422
|
+
var r;
|
|
2423
|
+
throw { data: (r = a == null ? void 0 : a.message) == null ? void 0 : r.body, type: a.type };
|
|
2289
2424
|
});
|
|
2290
2425
|
}
|
|
2291
2426
|
async authenticate(e = !1) {
|
|
2292
|
-
const
|
|
2427
|
+
const s = this.buildHeader("Authenticate"), a = {
|
|
2293
2428
|
clientType: 3,
|
|
2294
|
-
version: k(this,
|
|
2429
|
+
version: k(this, Ae),
|
|
2295
2430
|
reconnect: e
|
|
2296
2431
|
};
|
|
2297
|
-
return this.request(
|
|
2432
|
+
return this.request(s, a).then((r) => r.body).catch((r) => {
|
|
2433
|
+
var c;
|
|
2434
|
+
throw { data: (c = r == null ? void 0 : r.message) == null ? void 0 : c.body, type: r.type };
|
|
2435
|
+
});
|
|
2436
|
+
}
|
|
2437
|
+
async getBalance() {
|
|
2438
|
+
const e = this.buildHeader("GetBalance"), s = {};
|
|
2439
|
+
return this.request(e, s).then((a) => a.body).catch((a) => {
|
|
2298
2440
|
var r;
|
|
2299
|
-
throw { data: (r =
|
|
2441
|
+
throw { data: (r = a == null ? void 0 : a.message) == null ? void 0 : r.body, type: a.type };
|
|
2300
2442
|
});
|
|
2301
2443
|
}
|
|
2302
2444
|
async openGame() {
|
|
2303
|
-
const e = this.buildHeader("OpenGame"),
|
|
2445
|
+
const e = this.buildHeader("OpenGame"), s = {
|
|
2304
2446
|
gameCode: this.gameCode
|
|
2305
2447
|
};
|
|
2306
|
-
return new Promise((a,
|
|
2307
|
-
const
|
|
2308
|
-
const h =
|
|
2309
|
-
|
|
2448
|
+
return new Promise((a, r) => {
|
|
2449
|
+
const c = (p) => {
|
|
2450
|
+
const h = Be(p);
|
|
2451
|
+
xs(h) ? (this.removeEventListener("message", c), a(h.body)) : Dt(h) && r({ data: h.body, type: "error" });
|
|
2310
2452
|
};
|
|
2311
|
-
this.addEventListener("message",
|
|
2453
|
+
this.addEventListener("message", c), this.request(e, s).catch(
|
|
2312
2454
|
(p) => {
|
|
2313
2455
|
var h;
|
|
2314
|
-
return
|
|
2456
|
+
return r({ data: (h = p == null ? void 0 : p.message) == null ? void 0 : h.body, type: p.type });
|
|
2315
2457
|
}
|
|
2316
2458
|
);
|
|
2317
2459
|
});
|
|
2318
2460
|
}
|
|
2319
2461
|
sendAcknowledgement(e) {
|
|
2320
|
-
const { name:
|
|
2321
|
-
this.send(
|
|
2462
|
+
const { name: s, cId: a } = e.header, r = this.buildHeader(s, a), c = this.buildPayload(r, {});
|
|
2463
|
+
this.send(c);
|
|
2322
2464
|
}
|
|
2323
|
-
sendAction(e,
|
|
2324
|
-
const a = this.buildHeader("GameAction"),
|
|
2465
|
+
sendAction(e, s) {
|
|
2466
|
+
const a = this.buildHeader("GameAction"), r = {
|
|
2325
2467
|
...this.getBodyExtras(e),
|
|
2326
|
-
data:
|
|
2468
|
+
data: s
|
|
2327
2469
|
};
|
|
2328
|
-
return new Promise((
|
|
2470
|
+
return new Promise((c, p) => {
|
|
2329
2471
|
const h = (g) => {
|
|
2330
|
-
const m =
|
|
2331
|
-
Fe(m) &&
|
|
2472
|
+
const m = Be(g);
|
|
2473
|
+
Fe(m) && r.seqId === m.body.correlationSeqId && (this.removeEventListener("message", h), Us(m) ? c(m.body) : Dt(m) && p({ data: m.body, type: "error" }));
|
|
2332
2474
|
};
|
|
2333
|
-
this.addEventListener("message", h), this.request(a,
|
|
2475
|
+
this.addEventListener("message", h), this.request(a, r).catch(
|
|
2334
2476
|
(g) => {
|
|
2335
2477
|
var m;
|
|
2336
2478
|
return p({ data: (m = g == null ? void 0 : g.message) == null ? void 0 : m.body, type: g.type });
|
|
@@ -2339,11 +2481,11 @@ class xi extends Ti {
|
|
|
2339
2481
|
});
|
|
2340
2482
|
}
|
|
2341
2483
|
setRequestTimeoutMs(e) {
|
|
2342
|
-
|
|
2484
|
+
E(this, ae, e);
|
|
2343
2485
|
}
|
|
2344
2486
|
}
|
|
2345
|
-
|
|
2346
|
-
const
|
|
2487
|
+
ae = new WeakMap(), Ae = new WeakMap();
|
|
2488
|
+
const Ls = {
|
|
2347
2489
|
CA_BC: "CA",
|
|
2348
2490
|
CA_ON: "CA",
|
|
2349
2491
|
GER: "DE",
|
|
@@ -2352,11 +2494,11 @@ const Ui = {
|
|
|
2352
2494
|
US_NJ: "US",
|
|
2353
2495
|
USA: "US"
|
|
2354
2496
|
};
|
|
2355
|
-
function
|
|
2356
|
-
return !
|
|
2497
|
+
function Gt(i) {
|
|
2498
|
+
return !i || i === "NOT_APPLICABLE" ? null : Ls[i] ?? i;
|
|
2357
2499
|
}
|
|
2358
|
-
function
|
|
2359
|
-
const t =
|
|
2500
|
+
function Jt(i) {
|
|
2501
|
+
const t = i.contract;
|
|
2360
2502
|
return t ? {
|
|
2361
2503
|
contract: {
|
|
2362
2504
|
balance: {
|
|
@@ -2366,36 +2508,36 @@ function Qt(s) {
|
|
|
2366
2508
|
coinValueInCents: t.coinValueInCents,
|
|
2367
2509
|
country: t.countryCode,
|
|
2368
2510
|
currency: t.currencyCode,
|
|
2369
|
-
jurisdiction:
|
|
2511
|
+
jurisdiction: Gt(t.jurisdictionCode),
|
|
2370
2512
|
uiMessages: t.uiMessages,
|
|
2371
2513
|
username: t.username
|
|
2372
2514
|
}
|
|
2373
2515
|
} : {
|
|
2374
2516
|
contract: {
|
|
2375
2517
|
balance: {
|
|
2376
|
-
coins:
|
|
2377
|
-
version:
|
|
2518
|
+
coins: i.balance,
|
|
2519
|
+
version: i.balanceVersion
|
|
2378
2520
|
},
|
|
2379
|
-
coinValueInCents:
|
|
2380
|
-
country:
|
|
2381
|
-
currency:
|
|
2382
|
-
jurisdiction:
|
|
2383
|
-
uiMessages:
|
|
2384
|
-
username:
|
|
2521
|
+
coinValueInCents: i.coinValueInCents,
|
|
2522
|
+
country: i.countryCode,
|
|
2523
|
+
currency: i.currencyCode,
|
|
2524
|
+
jurisdiction: Gt(i.jurisdictionCode),
|
|
2525
|
+
uiMessages: i.uiMessages,
|
|
2526
|
+
username: i.username
|
|
2385
2527
|
}
|
|
2386
2528
|
};
|
|
2387
2529
|
}
|
|
2388
|
-
function
|
|
2530
|
+
function Yt(i) {
|
|
2389
2531
|
var t, e;
|
|
2390
2532
|
return {
|
|
2391
2533
|
// SDK error codes are the same as RGS error codes so we don't need any mapping here
|
|
2392
|
-
code: ((t =
|
|
2393
|
-
details: (e =
|
|
2534
|
+
code: ((t = i.data) == null ? void 0 : t.code) ?? te.UNKNOWN,
|
|
2535
|
+
details: (e = i.data) == null ? void 0 : e.details
|
|
2394
2536
|
};
|
|
2395
2537
|
}
|
|
2396
|
-
function
|
|
2397
|
-
const
|
|
2398
|
-
if (!
|
|
2538
|
+
function Zt(i, t, e) {
|
|
2539
|
+
const s = t.contract;
|
|
2540
|
+
if (!s) {
|
|
2399
2541
|
const a = t.data;
|
|
2400
2542
|
return {
|
|
2401
2543
|
contract: {
|
|
@@ -2419,22 +2561,22 @@ function Xt(s, t, e) {
|
|
|
2419
2561
|
coins: t.balance,
|
|
2420
2562
|
version: t.balanceVersion
|
|
2421
2563
|
},
|
|
2422
|
-
freeRounds: (a.FREE_ROUNDS ?? []).map((
|
|
2564
|
+
freeRounds: (a.FREE_ROUNDS ?? []).map((r) => ({
|
|
2423
2565
|
conf: {
|
|
2424
|
-
base:
|
|
2425
|
-
multiplier:
|
|
2426
|
-
numAwarded:
|
|
2566
|
+
base: r.conf.baseBet,
|
|
2567
|
+
multiplier: r.conf.betMultiplier,
|
|
2568
|
+
numAwarded: r.conf.numAwarded
|
|
2427
2569
|
},
|
|
2428
2570
|
data: {
|
|
2429
|
-
numPlayed:
|
|
2430
|
-
win:
|
|
2431
|
-
numLeft:
|
|
2571
|
+
numPlayed: r.data.numPlayed,
|
|
2572
|
+
win: r.data.winAmount,
|
|
2573
|
+
numLeft: r.data.numLeft
|
|
2432
2574
|
},
|
|
2433
|
-
id:
|
|
2434
|
-
rejectable:
|
|
2435
|
-
skippable:
|
|
2436
|
-
status:
|
|
2437
|
-
type:
|
|
2575
|
+
id: r.id,
|
|
2576
|
+
rejectable: r.rejectable,
|
|
2577
|
+
skippable: r.skippable,
|
|
2578
|
+
status: r.status,
|
|
2579
|
+
type: r.type
|
|
2438
2580
|
})),
|
|
2439
2581
|
gameModel: a.additionalConfigData.gameModelFile,
|
|
2440
2582
|
metaData: a.gameConfigData.metaData,
|
|
@@ -2445,7 +2587,7 @@ function Xt(s, t, e) {
|
|
|
2445
2587
|
thisRound: a.gameState.stateTypeThisRound,
|
|
2446
2588
|
nextRound: a.gameState.stateTypeNextRound
|
|
2447
2589
|
},
|
|
2448
|
-
uiMessages:
|
|
2590
|
+
uiMessages: i.uiMessages,
|
|
2449
2591
|
win: {
|
|
2450
2592
|
max: a.maxWin ?? null,
|
|
2451
2593
|
round: a.gameState.totalWinFromCurrentRound,
|
|
@@ -2458,26 +2600,26 @@ function Xt(s, t, e) {
|
|
|
2458
2600
|
return {
|
|
2459
2601
|
contract: {
|
|
2460
2602
|
bet: {
|
|
2461
|
-
available:
|
|
2603
|
+
available: s.availableMultipliersPerBaseBet,
|
|
2462
2604
|
default: {
|
|
2463
|
-
base:
|
|
2464
|
-
multiplier:
|
|
2605
|
+
base: s.defaultBet.baseBet,
|
|
2606
|
+
multiplier: s.defaultBet.betMultiplier
|
|
2465
2607
|
},
|
|
2466
|
-
max:
|
|
2467
|
-
last:
|
|
2468
|
-
base:
|
|
2469
|
-
multiplier:
|
|
2608
|
+
max: s.maxBetInCoins ?? null,
|
|
2609
|
+
last: s.lastBet ? {
|
|
2610
|
+
base: s.lastBet.baseBet,
|
|
2611
|
+
multiplier: s.lastBet.betMultiplier
|
|
2470
2612
|
} : null,
|
|
2471
|
-
lastPaid:
|
|
2472
|
-
base:
|
|
2473
|
-
multiplier:
|
|
2613
|
+
lastPaid: s.lastMainGameBet ? {
|
|
2614
|
+
base: s.lastMainGameBet.baseBet,
|
|
2615
|
+
multiplier: s.lastMainGameBet.betMultiplier
|
|
2474
2616
|
} : null
|
|
2475
2617
|
},
|
|
2476
2618
|
balance: {
|
|
2477
|
-
coins:
|
|
2478
|
-
version:
|
|
2619
|
+
coins: s.balanceInCoins,
|
|
2620
|
+
version: s.balanceVersion
|
|
2479
2621
|
},
|
|
2480
|
-
freeRounds: (
|
|
2622
|
+
freeRounds: (s.freeRounds ?? []).map((a) => ({
|
|
2481
2623
|
conf: {
|
|
2482
2624
|
base: a.conf.baseBet,
|
|
2483
2625
|
multiplier: a.conf.betMultiplier,
|
|
@@ -2494,54 +2636,54 @@ function Xt(s, t, e) {
|
|
|
2494
2636
|
status: a.status,
|
|
2495
2637
|
type: a.type
|
|
2496
2638
|
})),
|
|
2497
|
-
gameModel:
|
|
2498
|
-
metaData:
|
|
2499
|
-
roundId:
|
|
2500
|
-
serverTime:
|
|
2501
|
-
sessionId:
|
|
2639
|
+
gameModel: s.gameModelFile,
|
|
2640
|
+
metaData: s.metaData,
|
|
2641
|
+
roundId: s.roundId,
|
|
2642
|
+
serverTime: s.serverTime,
|
|
2643
|
+
sessionId: s.sessionId,
|
|
2502
2644
|
stateType: {
|
|
2503
|
-
thisRound:
|
|
2504
|
-
nextRound:
|
|
2645
|
+
thisRound: s.stateTypeThisRound,
|
|
2646
|
+
nextRound: s.stateTypeNextRound
|
|
2505
2647
|
},
|
|
2506
|
-
uiMessages:
|
|
2648
|
+
uiMessages: i.contract.uiMessages.concat(s.uiMessages),
|
|
2507
2649
|
win: {
|
|
2508
|
-
max:
|
|
2509
|
-
round:
|
|
2510
|
-
total:
|
|
2650
|
+
max: s.maxWinInCoins ?? null,
|
|
2651
|
+
round: s.roundWin,
|
|
2652
|
+
total: s.totalWin
|
|
2511
2653
|
}
|
|
2512
2654
|
},
|
|
2513
2655
|
data: e ? e(t.opaqueGameServerToUi) : t.opaqueGameServerToUi
|
|
2514
2656
|
};
|
|
2515
2657
|
}
|
|
2516
|
-
function
|
|
2658
|
+
function es(i) {
|
|
2517
2659
|
var t, e;
|
|
2518
2660
|
return {
|
|
2519
2661
|
// SDK error codes are the same as RGS error codes so we don't need any mapping here
|
|
2520
|
-
code: ((t =
|
|
2521
|
-
details: (e =
|
|
2662
|
+
code: ((t = i.data) == null ? void 0 : t.code) ?? te.UNKNOWN,
|
|
2663
|
+
details: (e = i.data) == null ? void 0 : e.details
|
|
2522
2664
|
};
|
|
2523
2665
|
}
|
|
2524
|
-
function
|
|
2525
|
-
const e =
|
|
2666
|
+
function ts(i, t) {
|
|
2667
|
+
const e = i.contract;
|
|
2526
2668
|
if (!e) {
|
|
2527
|
-
const
|
|
2669
|
+
const s = i.data;
|
|
2528
2670
|
return {
|
|
2529
2671
|
contract: {
|
|
2530
2672
|
bet: {
|
|
2531
|
-
last:
|
|
2532
|
-
base:
|
|
2533
|
-
multiplier:
|
|
2673
|
+
last: s.gameState.betFromCurrentRound ? {
|
|
2674
|
+
base: s.gameState.betFromCurrentRound.baseBet,
|
|
2675
|
+
multiplier: s.gameState.betFromCurrentRound.betMultiplier
|
|
2534
2676
|
} : null,
|
|
2535
2677
|
lastPaid: {
|
|
2536
|
-
base: (
|
|
2537
|
-
multiplier: (
|
|
2678
|
+
base: (s.gameState.lastPlacedMainGameBet ?? s.gameState.betFromCurrentRound).baseBet,
|
|
2679
|
+
multiplier: (s.gameState.lastPlacedMainGameBet ?? s.gameState.betFromCurrentRound).betMultiplier
|
|
2538
2680
|
}
|
|
2539
2681
|
},
|
|
2540
2682
|
balance: {
|
|
2541
|
-
coins:
|
|
2542
|
-
version:
|
|
2683
|
+
coins: i.balance,
|
|
2684
|
+
version: i.balanceVersion
|
|
2543
2685
|
},
|
|
2544
|
-
freeRounds: (
|
|
2686
|
+
freeRounds: (s.FREE_ROUNDS ?? []).map((a) => ({
|
|
2545
2687
|
conf: {
|
|
2546
2688
|
base: a.conf.baseBet,
|
|
2547
2689
|
multiplier: a.conf.betMultiplier,
|
|
@@ -2558,19 +2700,19 @@ function Yt(s, t) {
|
|
|
2558
2700
|
status: a.status,
|
|
2559
2701
|
type: a.type
|
|
2560
2702
|
})),
|
|
2561
|
-
serverTime:
|
|
2562
|
-
roundId:
|
|
2703
|
+
serverTime: i.balanceVersion,
|
|
2704
|
+
roundId: s.gameState.cycleId,
|
|
2563
2705
|
stateType: {
|
|
2564
|
-
thisRound:
|
|
2565
|
-
nextRound:
|
|
2706
|
+
thisRound: s.gameState.stateTypeThisRound,
|
|
2707
|
+
nextRound: s.gameState.stateTypeNextRound
|
|
2566
2708
|
},
|
|
2567
|
-
uiMessages:
|
|
2709
|
+
uiMessages: s.uiMessages,
|
|
2568
2710
|
win: {
|
|
2569
|
-
round:
|
|
2570
|
-
total:
|
|
2711
|
+
round: s.gameState.totalWinFromCurrentRound,
|
|
2712
|
+
total: s.gameState.totalWinFromCurrentGameCycle
|
|
2571
2713
|
}
|
|
2572
2714
|
},
|
|
2573
|
-
data:
|
|
2715
|
+
data: s
|
|
2574
2716
|
};
|
|
2575
2717
|
}
|
|
2576
2718
|
return {
|
|
@@ -2589,22 +2731,22 @@ function Yt(s, t) {
|
|
|
2589
2731
|
coins: e.balanceInCoins,
|
|
2590
2732
|
version: e.balanceVersion
|
|
2591
2733
|
},
|
|
2592
|
-
freeRounds: (e.freeRounds ?? []).map((
|
|
2734
|
+
freeRounds: (e.freeRounds ?? []).map((s) => ({
|
|
2593
2735
|
conf: {
|
|
2594
|
-
base:
|
|
2595
|
-
multiplier:
|
|
2596
|
-
numAwarded:
|
|
2736
|
+
base: s.conf.baseBet,
|
|
2737
|
+
multiplier: s.conf.betMultiplier,
|
|
2738
|
+
numAwarded: s.conf.numAwarded
|
|
2597
2739
|
},
|
|
2598
2740
|
data: {
|
|
2599
|
-
numPlayed:
|
|
2600
|
-
win:
|
|
2601
|
-
numLeft:
|
|
2741
|
+
numPlayed: s.data.numPlayed,
|
|
2742
|
+
win: s.data.winAmount,
|
|
2743
|
+
numLeft: s.data.numLeft
|
|
2602
2744
|
},
|
|
2603
|
-
id:
|
|
2604
|
-
rejectable:
|
|
2605
|
-
skippable:
|
|
2606
|
-
status:
|
|
2607
|
-
type:
|
|
2745
|
+
id: s.id,
|
|
2746
|
+
rejectable: s.rejectable,
|
|
2747
|
+
skippable: s.skippable,
|
|
2748
|
+
status: s.status,
|
|
2749
|
+
type: s.type
|
|
2608
2750
|
})),
|
|
2609
2751
|
serverTime: e.serverTime,
|
|
2610
2752
|
roundId: e.roundId,
|
|
@@ -2618,25 +2760,26 @@ function Yt(s, t) {
|
|
|
2618
2760
|
total: e.totalWin
|
|
2619
2761
|
}
|
|
2620
2762
|
},
|
|
2621
|
-
data: t ? t(
|
|
2763
|
+
data: t ? t(i.opaqueGameServerToUi) : i.opaqueGameServerToUi
|
|
2622
2764
|
};
|
|
2623
2765
|
}
|
|
2624
|
-
function
|
|
2766
|
+
function ss(i) {
|
|
2625
2767
|
var t, e;
|
|
2626
2768
|
return {
|
|
2627
2769
|
// SDK error codes are the same as RGS error codes so we don't need any mapping here
|
|
2628
|
-
code: ((t =
|
|
2629
|
-
details: (e =
|
|
2770
|
+
code: ((t = i.data) == null ? void 0 : t.code) ?? te.UNKNOWN,
|
|
2771
|
+
details: (e = i.data) == null ? void 0 : e.details
|
|
2630
2772
|
};
|
|
2631
2773
|
}
|
|
2632
|
-
const
|
|
2633
|
-
parseAuthenticateResponse:
|
|
2634
|
-
parseAuthenticateError:
|
|
2635
|
-
parseOpenGameResponse:
|
|
2636
|
-
parseOpenGameError:
|
|
2637
|
-
parsePlayResponse:
|
|
2638
|
-
parsePlayError:
|
|
2639
|
-
},
|
|
2774
|
+
const oi = {
|
|
2775
|
+
parseAuthenticateResponse: Jt,
|
|
2776
|
+
parseAuthenticateError: Yt,
|
|
2777
|
+
parseOpenGameResponse: Zt,
|
|
2778
|
+
parseOpenGameError: es,
|
|
2779
|
+
parsePlayResponse: ts,
|
|
2780
|
+
parsePlayError: ss
|
|
2781
|
+
}, Bs = {
|
|
2782
|
+
aze: "az",
|
|
2640
2783
|
bul: "bg",
|
|
2641
2784
|
chi: "zh",
|
|
2642
2785
|
zho: "zh",
|
|
@@ -2668,54 +2811,31 @@ const is = {
|
|
|
2668
2811
|
tur: "tr",
|
|
2669
2812
|
ukr: "uk",
|
|
2670
2813
|
vie: "vi"
|
|
2671
|
-
}, { device:
|
|
2672
|
-
class
|
|
2814
|
+
}, { device: _s } = L(navigator.userAgent), Ns = P("KalambaBullseyePlugin", "color:#000000;font-weight:bold;");
|
|
2815
|
+
class ri extends As {
|
|
2673
2816
|
constructor(...e) {
|
|
2674
2817
|
super(...e);
|
|
2675
2818
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2676
2819
|
// @ts-ignore
|
|
2677
2820
|
b(this, "socket");
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
this.error = void 0;
|
|
2682
|
-
const i = await this.openGame();
|
|
2683
|
-
this.send("openGameResponse", i);
|
|
2684
|
-
} catch (i) {
|
|
2685
|
-
this.error = i, this.send("openGameError", i);
|
|
2686
|
-
}
|
|
2687
|
-
}), this.on("play", async (i) => {
|
|
2688
|
-
try {
|
|
2689
|
-
this.error = void 0;
|
|
2690
|
-
const a = await this.play(i);
|
|
2691
|
-
this.send("playResponse", a);
|
|
2692
|
-
} catch (a) {
|
|
2693
|
-
this.error = a, this.send("playError", a);
|
|
2694
|
-
}
|
|
2695
|
-
}), this.on("freeRounds", async (i) => {
|
|
2696
|
-
try {
|
|
2697
|
-
this.error = void 0, await this.socket.freeRounds(i), this.send("freeRoundsResponse", i);
|
|
2698
|
-
} catch (a) {
|
|
2699
|
-
this.error = a, this.send("freeRoundsError", a);
|
|
2700
|
-
}
|
|
2701
|
-
}), this.on("configured", (i) => {
|
|
2702
|
-
this.socket.setRequestTimeoutMs(i.ui.requestTimeoutMs);
|
|
2703
|
-
}), this.registerFromSdkEvents();
|
|
2821
|
+
this.on("configured", (s) => {
|
|
2822
|
+
this.socket.setRequestTimeoutMs(s.ui.requestTimeoutMs);
|
|
2823
|
+
});
|
|
2704
2824
|
}
|
|
2705
2825
|
initialize(e) {
|
|
2706
|
-
this.socket = new
|
|
2826
|
+
this.socket = new Rs(e, {
|
|
2707
2827
|
gameVersion: this.config.gameVersion,
|
|
2708
2828
|
requestTimeoutMs: this.sdkConfig.ui.requestTimeoutMs
|
|
2709
|
-
}), ["fireboltroulette"].includes(e.gameCode) || (this.socket.addEventListener("close", (
|
|
2710
|
-
|
|
2829
|
+
}), ["fireboltroulette"].includes(e.gameCode) || (this.socket.addEventListener("close", (s) => {
|
|
2830
|
+
s.code === 1008 ? this.error || this.send("error", {
|
|
2711
2831
|
type: "CLOSE",
|
|
2712
2832
|
messageCode: "TOO_MANY_OPEN_GAMES",
|
|
2713
2833
|
messageKey: "RgsError.TOO_MANY_OPEN_GAMES"
|
|
2714
|
-
}) :
|
|
2715
|
-
}), ["mobile", "tablet"].includes(
|
|
2834
|
+
}) : s.code === 1011 ? this.error || this.send("error", { type: "CLOSE", messageCode: "UNKNOWN", messageKey: "RgsError.UNKNOWN" }) : this.reconnect();
|
|
2835
|
+
}), ["mobile", "tablet"].includes(_s.type ?? "") && document.addEventListener("visibilitychange", async () => {
|
|
2716
2836
|
document.hidden || (this.socket.socket ? this.socket.socket && [WebSocket.CONNECTING, WebSocket.OPEN].includes(this.socket.socket.readyState) && this.socket.close() : this.reconnect());
|
|
2717
|
-
})), this.socket.addEventListener("error", (
|
|
2718
|
-
this.send("realityCheck",
|
|
2837
|
+
})), this.socket.addEventListener("error", (s) => Ns("error", s)), this.socket.addEventListener("realityCheck", (s) => {
|
|
2838
|
+
this.send("realityCheck", s);
|
|
2719
2839
|
});
|
|
2720
2840
|
}
|
|
2721
2841
|
async reconnect() {
|
|
@@ -2726,36 +2846,36 @@ class ss extends Ii {
|
|
|
2726
2846
|
}
|
|
2727
2847
|
}
|
|
2728
2848
|
async openGame() {
|
|
2729
|
-
var
|
|
2730
|
-
const e = new URLSearchParams(window.location.search),
|
|
2731
|
-
this.initialize({ apiUrl:
|
|
2849
|
+
var H, xe;
|
|
2850
|
+
const e = new URLSearchParams(window.location.search), s = e.get("apiUrl"), a = e.get("cageCode"), r = e.get("gameCode"), c = e.get("operatorCode"), p = e.get("playMode"), h = e.get("token"), g = e.get("username"), m = e.get("gameHistoryUrl"), C = e.get("homeUrl") ?? void 0, A = e.get("cashierUrl") ?? void 0;
|
|
2851
|
+
this.initialize({ apiUrl: s, cageCode: a, gameCode: r, operatorCode: c, playMode: p, token: h, username: g });
|
|
2732
2852
|
try {
|
|
2733
2853
|
await this.socket.connect();
|
|
2734
2854
|
} catch {
|
|
2735
|
-
throw { type: "error", data: { code:
|
|
2855
|
+
throw { type: "error", data: { code: te.CONNECTION_ERROR } };
|
|
2736
2856
|
}
|
|
2737
|
-
let
|
|
2857
|
+
let G;
|
|
2738
2858
|
try {
|
|
2739
|
-
|
|
2859
|
+
G = await this.socket.authenticate();
|
|
2740
2860
|
} catch (X) {
|
|
2741
|
-
throw { type: X.type, data: X.type === "error" ?
|
|
2861
|
+
throw { type: X.type, data: X.type === "error" ? Yt(X.data) : void 0 };
|
|
2742
2862
|
}
|
|
2743
|
-
let
|
|
2863
|
+
let we;
|
|
2744
2864
|
try {
|
|
2745
|
-
|
|
2865
|
+
we = await this.socket.openGame();
|
|
2746
2866
|
} catch (X) {
|
|
2747
|
-
throw { type: X.type, data: X.type === "error" ?
|
|
2867
|
+
throw { type: X.type, data: X.type === "error" ? es(X.data) : void 0 };
|
|
2748
2868
|
}
|
|
2749
|
-
const _ =
|
|
2750
|
-
|
|
2751
|
-
|
|
2869
|
+
const _ = Jt(G), K = Zt(
|
|
2870
|
+
G,
|
|
2871
|
+
we,
|
|
2752
2872
|
this.config.dataDecoder && bt[this.config.dataDecoder]
|
|
2753
2873
|
);
|
|
2754
2874
|
this.sdkConfig.api = {
|
|
2755
2875
|
...this.sdkConfig.api,
|
|
2756
2876
|
brand: a,
|
|
2757
|
-
game:
|
|
2758
|
-
integration:
|
|
2877
|
+
game: r,
|
|
2878
|
+
integration: c,
|
|
2759
2879
|
jurisdiction: _.contract.jurisdiction,
|
|
2760
2880
|
playMode: p,
|
|
2761
2881
|
user: _.contract.username,
|
|
@@ -2768,71 +2888,84 @@ class ss extends Ii {
|
|
|
2768
2888
|
gameHistoryUrl: m,
|
|
2769
2889
|
homeUrl: C,
|
|
2770
2890
|
cashierUrl: A,
|
|
2771
|
-
backendSessionId:
|
|
2772
|
-
lastRoundId:
|
|
2891
|
+
backendSessionId: K.contract.sessionId,
|
|
2892
|
+
lastRoundId: K.contract.roundId
|
|
2773
2893
|
};
|
|
2774
|
-
const
|
|
2775
|
-
return
|
|
2894
|
+
const Q = (xe = (H = e.get("languageCode")) == null ? void 0 : H.split("_")) == null ? void 0 : xe[0];
|
|
2895
|
+
return Q && (this.sdkConfig.ui.language = Q.length === 3 ? Bs[Q] ?? Q : Q), K;
|
|
2776
2896
|
}
|
|
2777
2897
|
async play(e) {
|
|
2778
2898
|
for (; !this.socket.socket; )
|
|
2779
2899
|
await new Promise((A) => setTimeout(() => A(), 500));
|
|
2780
2900
|
const {
|
|
2781
|
-
contract: { bet:
|
|
2782
|
-
extra:
|
|
2901
|
+
contract: { bet: s, forcedOutcomes: a, ...r },
|
|
2902
|
+
extra: c,
|
|
2783
2903
|
payloadToInject: p,
|
|
2784
2904
|
actionType: h
|
|
2785
|
-
} = e, g = this.config.dataEncoder &&
|
|
2786
|
-
bet:
|
|
2905
|
+
} = e, g = this.config.dataEncoder && os[this.config.dataEncoder], m = {
|
|
2906
|
+
bet: s ? { baseBet: s.base, betMultiplier: s.multiplier } : void 0,
|
|
2787
2907
|
forcedOutcomes: a,
|
|
2788
2908
|
// TODO: get rid of contractRest - it' a legacy from old RGS
|
|
2789
|
-
...
|
|
2909
|
+
...r,
|
|
2790
2910
|
...p,
|
|
2791
|
-
opaqueUiToGameServer: g ? g(
|
|
2911
|
+
opaqueUiToGameServer: g ? g(c) : c
|
|
2792
2912
|
};
|
|
2793
2913
|
let C;
|
|
2794
2914
|
try {
|
|
2795
2915
|
C = await this.socket.sendAction(h, m);
|
|
2796
2916
|
} catch (A) {
|
|
2797
|
-
throw { type: A.type, data: A.type === "error" ?
|
|
2917
|
+
throw { type: A.type, data: A.type === "error" ? ss(A.data) : void 0 };
|
|
2798
2918
|
}
|
|
2799
|
-
return
|
|
2919
|
+
return ts(C, this.config.dataDecoder && bt[this.config.dataDecoder]);
|
|
2800
2920
|
}
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2921
|
+
async freeRounds(e) {
|
|
2922
|
+
try {
|
|
2923
|
+
await this.socket.freeRounds(e);
|
|
2924
|
+
} catch {
|
|
2925
|
+
throw { type: "error", data: { code: te.UNKNOWN } };
|
|
2926
|
+
}
|
|
2927
|
+
return e;
|
|
2928
|
+
}
|
|
2929
|
+
async getBalance() {
|
|
2930
|
+
try {
|
|
2931
|
+
return { balance: (await this.socket.getBalance()).balance };
|
|
2932
|
+
} catch {
|
|
2933
|
+
throw { type: "error", data: { code: te.UNKNOWN } };
|
|
2934
|
+
}
|
|
2935
|
+
}
|
|
2936
|
+
async showHistory() {
|
|
2937
|
+
const {
|
|
2938
|
+
api: { game: e, integration: s, integrationData: a, jurisdiction: r, user: c, gameHistoryUrl: p },
|
|
2939
|
+
ui: { language: h }
|
|
2940
|
+
} = this.sdkConfig, g = c.replace(/^user_/, "").replace(new RegExp(`_${s}$`), ""), m = new URL(window.location.href);
|
|
2941
|
+
m.hostname = m.hostname.replace(/^v\./, "").replace(/^play\./, "history."), m.pathname = m.pathname.replace(/(\/[0-9]+\.[0-9]+\.[0-9]+)?\/wrapper\.html/, "/list/index.html"), m.search = "", m.searchParams.set("apiUrl", new URL(p).origin), m.searchParams.set("gameCode", e), r && m.searchParams.set("jurisdiction", r), m.searchParams.set("operatorCode", s), m.searchParams.set("token", a.token), m.searchParams.set("username", g), m.searchParams.set("languageCode", h), this.config.gameHistoryUrl && m.searchParams.set("gameHistoryUrl", this.config.gameHistoryUrl), window.open(m.toString(), "_blank");
|
|
2809
2942
|
}
|
|
2810
2943
|
}
|
|
2811
|
-
class
|
|
2812
|
-
constructor(t, e,
|
|
2944
|
+
class Fs {
|
|
2945
|
+
constructor(t, e, s) {
|
|
2813
2946
|
b(this, "trackers");
|
|
2814
2947
|
b(this, "config");
|
|
2815
2948
|
b(this, "sdkConfig");
|
|
2816
|
-
this.trackers = t, this.config = e, this.sdkConfig =
|
|
2949
|
+
this.trackers = t, this.config = e, this.sdkConfig = s;
|
|
2817
2950
|
}
|
|
2818
|
-
on(t, e,
|
|
2819
|
-
const a = function(
|
|
2820
|
-
|
|
2951
|
+
on(t, e, s) {
|
|
2952
|
+
const a = function(c) {
|
|
2953
|
+
c.data.message !== `kalamba:wrapper-telemetry:${t}` && c.data.message !== `kalamba:wrapper:${t}` || e(c.data.payload);
|
|
2821
2954
|
};
|
|
2822
|
-
window.addEventListener("message", a,
|
|
2955
|
+
window.addEventListener("message", a, s);
|
|
2823
2956
|
}
|
|
2824
2957
|
track(t, e) {
|
|
2825
|
-
this.trackers.forEach((
|
|
2958
|
+
this.trackers.forEach((s) => s.track(t, e));
|
|
2826
2959
|
}
|
|
2827
2960
|
}
|
|
2828
|
-
function
|
|
2829
|
-
return
|
|
2961
|
+
function Ht(i) {
|
|
2962
|
+
return i.reduce((t, e) => t + e, 0);
|
|
2830
2963
|
}
|
|
2831
|
-
function
|
|
2832
|
-
const t =
|
|
2964
|
+
function Ds(i) {
|
|
2965
|
+
const t = i.length, e = Ht(i) / t, s = i.map((r) => Math.pow(r - e, 2)), a = Ht(s) / t;
|
|
2833
2966
|
return Math.sqrt(a);
|
|
2834
2967
|
}
|
|
2835
|
-
class
|
|
2968
|
+
class Vt {
|
|
2836
2969
|
constructor() {
|
|
2837
2970
|
b(this, "rafId", -1);
|
|
2838
2971
|
b(this, "startTime", 0);
|
|
@@ -2840,11 +2973,11 @@ class Dt {
|
|
|
2840
2973
|
b(this, "frames", []);
|
|
2841
2974
|
b(this, "calculateFPS", () => {
|
|
2842
2975
|
const t = Math.floor((this.stopTime - this.startTime) / 1e3);
|
|
2843
|
-
return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e,
|
|
2976
|
+
return this.frames.map((e) => Math.floor((e - this.startTime) / 1e3)).reduce((e, s, a, r) => (r[a] !== r[a - 1] ? e.push(1) : e[e.length - 1]++, e), []).slice(0, t);
|
|
2844
2977
|
});
|
|
2845
2978
|
b(this, "getReport", () => {
|
|
2846
|
-
const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)),
|
|
2847
|
-
return { fpsAvg: e, fpsMax:
|
|
2979
|
+
const t = this.calculateFPS(), e = Math.floor(this.frames.length / ((this.stopTime - this.startTime) / 1e3)), s = t.length > 0 ? Math.max(...t) : e, a = t.length > 0 ? Math.min(...t) : e, r = t.length > 0 ? Ds(t) : 0;
|
|
2980
|
+
return { fpsAvg: e, fpsMax: s, fpsMin: a, fpsStdDev: r };
|
|
2848
2981
|
});
|
|
2849
2982
|
b(this, "start", () => {
|
|
2850
2983
|
this.startTime = Date.now(), this.frames = [], this.trackFrames();
|
|
@@ -2857,16 +2990,16 @@ class Dt {
|
|
|
2857
2990
|
});
|
|
2858
2991
|
}
|
|
2859
2992
|
}
|
|
2860
|
-
const
|
|
2861
|
-
function
|
|
2993
|
+
const Gs = "landscape", Hs = "portrait";
|
|
2994
|
+
function Vs() {
|
|
2862
2995
|
try {
|
|
2863
|
-
const
|
|
2864
|
-
return !!window.WebGLRenderingContext && (
|
|
2996
|
+
const i = document.createElement("canvas");
|
|
2997
|
+
return !!window.WebGLRenderingContext && (i.getContext("webgl") || i.getContext("experimental-webgl")) instanceof WebGLRenderingContext;
|
|
2865
2998
|
} catch {
|
|
2866
2999
|
return !1;
|
|
2867
3000
|
}
|
|
2868
3001
|
}
|
|
2869
|
-
async function
|
|
3002
|
+
async function zs() {
|
|
2870
3003
|
if (!window.createImageBitmap)
|
|
2871
3004
|
return !1;
|
|
2872
3005
|
const e = await (await fetch("data:image/webp;base64,UklGRiQAAABXRUJQVlA4IBgAAAAwAQCdASoCAAEAAQAcJaQAA3AA/v3AgAA=")).blob();
|
|
@@ -2877,32 +3010,32 @@ async function Hi() {
|
|
|
2877
3010
|
}
|
|
2878
3011
|
}
|
|
2879
3012
|
function rt() {
|
|
2880
|
-
return window.innerWidth >= window.innerHeight ?
|
|
3013
|
+
return window.innerWidth >= window.innerHeight ? Gs : Hs;
|
|
2881
3014
|
}
|
|
2882
|
-
var
|
|
2883
|
-
class
|
|
3015
|
+
var De, ne, oe, re, Pe, Ge, Oe, He;
|
|
3016
|
+
class ci extends Fs {
|
|
2884
3017
|
constructor(...e) {
|
|
2885
3018
|
super(...e);
|
|
2886
3019
|
b(this, "FPS_SAMPLE_INTERVAL", 1e4);
|
|
2887
3020
|
// wrapper state
|
|
2888
|
-
M(this,
|
|
2889
|
-
M(this, ae);
|
|
3021
|
+
M(this, De, 0);
|
|
2890
3022
|
M(this, ne);
|
|
2891
3023
|
M(this, oe);
|
|
2892
|
-
M(this,
|
|
2893
|
-
M(this,
|
|
2894
|
-
M(this,
|
|
2895
|
-
M(this,
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
3024
|
+
M(this, re);
|
|
3025
|
+
M(this, Pe, !1);
|
|
3026
|
+
M(this, Ge, !1);
|
|
3027
|
+
M(this, Oe, "");
|
|
3028
|
+
M(this, He, []);
|
|
3029
|
+
E(this, oe, {}), E(this, re, this.deviceInfo()), E(this, ne, this.config.gameVersion), this.on("state", ({ balance: s }) => {
|
|
3030
|
+
E(this, De, s);
|
|
3031
|
+
}), this.on("autoplay", ({ action: s }) => {
|
|
3032
|
+
["start", "resume"].includes(s) ? E(this, Pe, !0) : E(this, Pe, !1);
|
|
3033
|
+
}), this.on("settings", ({ fastPlay: s }) => {
|
|
3034
|
+
s !== void 0 && E(this, Ge, s);
|
|
2902
3035
|
}), this.registerEvents();
|
|
2903
3036
|
}
|
|
2904
3037
|
async registerEvents() {
|
|
2905
|
-
k(this,
|
|
3038
|
+
k(this, re).then((e) => {
|
|
2906
3039
|
this.track("Device Information", e);
|
|
2907
3040
|
}), this.on("loadStart", () => {
|
|
2908
3041
|
this.track("Game Loading", { progress: 0, step: "initial" });
|
|
@@ -2916,9 +3049,9 @@ class as extends Bi {
|
|
|
2916
3049
|
systemMessageType: e.type
|
|
2917
3050
|
});
|
|
2918
3051
|
}), this.on("openGameResponse", async (e) => {
|
|
2919
|
-
|
|
3052
|
+
E(this, Oe, e.contract.stateType.nextRound), E(this, oe, {
|
|
2920
3053
|
balanceInCoins: e.contract.balance.coins,
|
|
2921
|
-
clientVersion: k(this,
|
|
3054
|
+
clientVersion: k(this, ne),
|
|
2922
3055
|
coinValueInCents: this.sdkConfig.api.coinValueInCents,
|
|
2923
3056
|
coinValueInCentsFloat: this.sdkConfig.api.coinValueInCents,
|
|
2924
3057
|
currency: this.sdkConfig.api.currency,
|
|
@@ -2941,24 +3074,24 @@ class as extends Bi {
|
|
|
2941
3074
|
// rtpVariant: 'unknown',
|
|
2942
3075
|
serverVersion: e.contract.metaData.version
|
|
2943
3076
|
// testVariants: '',
|
|
2944
|
-
}), this.track("Game Open", k(this,
|
|
3077
|
+
}), this.track("Game Open", k(this, oe));
|
|
2945
3078
|
}), this.on("playCycleEnd", async (e) => {
|
|
2946
|
-
const
|
|
3079
|
+
const s = await k(this, re), { base: a, multiplier: r } = e.contract.bet.lastPaid ?? {}, c = e.contract.balance.coins, p = e.contract.bet.lastPaid.base * e.contract.bet.lastPaid.multiplier, h = e.contract.win.total, g = h - p, m = "spin", C = e.contract.roundId;
|
|
2947
3080
|
this.track("Betting Activity", {
|
|
2948
|
-
balance:
|
|
2949
|
-
balanceAfter:
|
|
3081
|
+
balance: c - g,
|
|
3082
|
+
balanceAfter: c,
|
|
2950
3083
|
baseBet: a,
|
|
2951
3084
|
// baseBetIndex,
|
|
2952
|
-
betMultiplier:
|
|
3085
|
+
betMultiplier: r,
|
|
2953
3086
|
betType: m,
|
|
2954
|
-
gameVersion: k(this,
|
|
3087
|
+
gameVersion: k(this, ne),
|
|
2955
3088
|
coinValueInCents: this.sdkConfig.api.coinValueInCents,
|
|
2956
3089
|
coinValueInCentsFloat: this.sdkConfig.api.coinValueInCents,
|
|
2957
3090
|
currency: this.sdkConfig.api.currency,
|
|
2958
3091
|
environment: "release",
|
|
2959
3092
|
gameCode: this.sdkConfig.api.game,
|
|
2960
3093
|
gameCodeServer: this.sdkConfig.api.game,
|
|
2961
|
-
isMobile:
|
|
3094
|
+
isMobile: s.isMobile,
|
|
2962
3095
|
netResult: g,
|
|
2963
3096
|
operatorName: "kalamba",
|
|
2964
3097
|
orientation: rt(),
|
|
@@ -2972,7 +3105,7 @@ class as extends Bi {
|
|
|
2972
3105
|
roundTypes: ["BaseGame"],
|
|
2973
3106
|
totalBet: p,
|
|
2974
3107
|
totalWin: h
|
|
2975
|
-
}),
|
|
3108
|
+
}), E(this, He, []);
|
|
2976
3109
|
}), this.on("telemetry.click", (e) => {
|
|
2977
3110
|
this.track("UI Interaction", {
|
|
2978
3111
|
action: "click",
|
|
@@ -2987,44 +3120,44 @@ class as extends Bi {
|
|
|
2987
3120
|
}), this.reportFpsSample(), this.reportFpsRound();
|
|
2988
3121
|
}
|
|
2989
3122
|
reportFpsSample() {
|
|
2990
|
-
const e = new
|
|
3123
|
+
const e = new Vt(), s = () => {
|
|
2991
3124
|
e.stop();
|
|
2992
|
-
const
|
|
2993
|
-
this.track("FPS Performance", { ...
|
|
3125
|
+
const r = e.getReport();
|
|
3126
|
+
this.track("FPS Performance", { ...r, fpsType: "sample" }), a();
|
|
2994
3127
|
}, a = async () => {
|
|
2995
|
-
e.start(), setTimeout(
|
|
3128
|
+
e.start(), setTimeout(s, this.FPS_SAMPLE_INTERVAL);
|
|
2996
3129
|
};
|
|
2997
3130
|
a();
|
|
2998
3131
|
}
|
|
2999
3132
|
reportFpsRound() {
|
|
3000
|
-
const e = new
|
|
3133
|
+
const e = new Vt();
|
|
3001
3134
|
this.on("playCycleStart", () => {
|
|
3002
3135
|
e.start();
|
|
3003
3136
|
}), this.on("playCycleEnd", () => {
|
|
3004
3137
|
e.stop();
|
|
3005
|
-
const
|
|
3006
|
-
this.track("FPS Performance", { ...
|
|
3138
|
+
const s = e.getReport();
|
|
3139
|
+
this.track("FPS Performance", { ...s, fpsType: "playCycleStart->playCycleEnd" });
|
|
3007
3140
|
});
|
|
3008
3141
|
}
|
|
3009
3142
|
getExtraUiInteractionData() {
|
|
3010
3143
|
return {
|
|
3011
3144
|
orientation: rt(),
|
|
3012
|
-
stateType: k(this,
|
|
3145
|
+
stateType: k(this, Oe)
|
|
3013
3146
|
};
|
|
3014
3147
|
}
|
|
3015
3148
|
async deviceInfo() {
|
|
3016
3149
|
var p;
|
|
3017
|
-
const { browser: e, device:
|
|
3150
|
+
const { browser: e, device: s, os: a } = L(navigator.userAgent), r = Vs(), c = await zs();
|
|
3018
3151
|
return {
|
|
3019
3152
|
browserName: e.name,
|
|
3020
3153
|
browserVersion: e.version,
|
|
3021
3154
|
connection: (p = navigator.connection) == null ? void 0 : p.effectiveType,
|
|
3022
|
-
deviceName:
|
|
3023
|
-
deviceType:
|
|
3024
|
-
isMobile: ["mobile", "tablet"].includes(
|
|
3025
|
-
isWebGLSupported:
|
|
3026
|
-
isWebPSupported:
|
|
3027
|
-
manufacturer:
|
|
3155
|
+
deviceName: s.model,
|
|
3156
|
+
deviceType: s.type,
|
|
3157
|
+
isMobile: ["mobile", "tablet"].includes(s.type ?? ""),
|
|
3158
|
+
isWebGLSupported: r,
|
|
3159
|
+
isWebPSupported: c,
|
|
3160
|
+
manufacturer: s.vendor,
|
|
3028
3161
|
operatingSystem: a.name,
|
|
3029
3162
|
operatingSystemVersion: a.version,
|
|
3030
3163
|
orientation: rt(),
|
|
@@ -3039,98 +3172,100 @@ class as extends Bi {
|
|
|
3039
3172
|
};
|
|
3040
3173
|
}
|
|
3041
3174
|
}
|
|
3042
|
-
|
|
3043
|
-
var
|
|
3044
|
-
const
|
|
3045
|
-
class
|
|
3175
|
+
De = new WeakMap(), ne = new WeakMap(), oe = new WeakMap(), re = new WeakMap(), Pe = new WeakMap(), Ge = new WeakMap(), Oe = new WeakMap(), He = new WeakMap();
|
|
3176
|
+
var qs = rs();
|
|
3177
|
+
const zt = /* @__PURE__ */ cs(qs);
|
|
3178
|
+
class is {
|
|
3046
3179
|
constructor(t, e) {
|
|
3047
3180
|
b(this, "config");
|
|
3048
3181
|
b(this, "sdkConfig");
|
|
3049
3182
|
this.config = t, this.sdkConfig = e;
|
|
3050
3183
|
}
|
|
3051
3184
|
}
|
|
3052
|
-
const
|
|
3053
|
-
var
|
|
3054
|
-
class
|
|
3185
|
+
const qt = 25, Wt = 1e4;
|
|
3186
|
+
var ce, de, le, W;
|
|
3187
|
+
class di extends is {
|
|
3055
3188
|
constructor(...e) {
|
|
3056
3189
|
super(...e);
|
|
3057
|
-
M(this,
|
|
3058
|
-
M(this, ce);
|
|
3190
|
+
M(this, ce, "https://europe-west3-stargazer-328808.cloudfunctions.net/collect-events");
|
|
3059
3191
|
M(this, de);
|
|
3060
|
-
M(this,
|
|
3192
|
+
M(this, le);
|
|
3193
|
+
M(this, W, []);
|
|
3061
3194
|
b(this, "processQueueForced");
|
|
3062
|
-
|
|
3195
|
+
E(this, de, (/* @__PURE__ */ new Date()).getTime()), E(this, W, []), this.processQueueForced = this.processQueue.bind(this, !0), this.schedule(), fetch(k(this, ce), {
|
|
3063
3196
|
method: "OPTIONS"
|
|
3064
|
-
}).catch(
|
|
3197
|
+
}).catch(zt), this.subscribe();
|
|
3065
3198
|
}
|
|
3066
3199
|
subscribe() {
|
|
3067
3200
|
window.addEventListener("beforeunload", this.processQueueForced, !1), window.addEventListener("pagehide", this.processQueueForced, !1), window.addEventListener("visibilitychange", this.processQueueForced, !1);
|
|
3068
3201
|
}
|
|
3069
3202
|
schedule() {
|
|
3070
|
-
k(this,
|
|
3203
|
+
k(this, le) && clearTimeout(k(this, le)), E(this, le, window.setTimeout(() => this.processQueue(), Wt));
|
|
3071
3204
|
}
|
|
3072
3205
|
send(e) {
|
|
3073
|
-
|
|
3206
|
+
E(this, de, (/* @__PURE__ */ new Date()).getTime());
|
|
3074
3207
|
try {
|
|
3075
|
-
navigator.sendBeacon(k(this,
|
|
3208
|
+
navigator.sendBeacon(k(this, ce), JSON.stringify(e));
|
|
3076
3209
|
} catch {
|
|
3077
|
-
fetch(k(this,
|
|
3210
|
+
fetch(k(this, ce), {
|
|
3078
3211
|
body: JSON.stringify(e),
|
|
3079
3212
|
method: "POST",
|
|
3080
3213
|
headers: {
|
|
3081
3214
|
"Content-Type": "application/json"
|
|
3082
3215
|
},
|
|
3083
3216
|
keepalive: !0
|
|
3084
|
-
}).catch(
|
|
3217
|
+
}).catch(zt);
|
|
3085
3218
|
}
|
|
3086
3219
|
this.schedule();
|
|
3087
3220
|
}
|
|
3088
3221
|
addToQueue(e) {
|
|
3089
|
-
k(this,
|
|
3222
|
+
k(this, W).push(e), this.processQueue();
|
|
3090
3223
|
}
|
|
3091
3224
|
processQueue(e = !1) {
|
|
3092
|
-
if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && k(this,
|
|
3093
|
-
for (; k(this,
|
|
3094
|
-
const
|
|
3225
|
+
if (!(this.sdkConfig == null || !this.sdkConfig.ui.feature.allowTelemetry) && !(!e && k(this, W).length < qt && (/* @__PURE__ */ new Date()).getTime() - k(this, de) < Wt))
|
|
3226
|
+
for (; k(this, W).length; ) {
|
|
3227
|
+
const s = k(this, W).splice(0, qt).map((a) => ({
|
|
3095
3228
|
...a,
|
|
3096
3229
|
sessionID: this.sdkConfig.api.sessionId,
|
|
3097
3230
|
userID: this.sdkConfig.api.user
|
|
3098
3231
|
}));
|
|
3099
|
-
this.send(
|
|
3232
|
+
this.send(s);
|
|
3100
3233
|
}
|
|
3101
3234
|
}
|
|
3102
|
-
track(e,
|
|
3235
|
+
track(e, s) {
|
|
3103
3236
|
this.addToQueue({
|
|
3104
3237
|
eventName: e,
|
|
3105
|
-
eventParams:
|
|
3238
|
+
eventParams: s,
|
|
3106
3239
|
eventTimestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
3107
|
-
eventUUID:
|
|
3240
|
+
eventUUID: ds()
|
|
3108
3241
|
});
|
|
3109
3242
|
}
|
|
3110
3243
|
}
|
|
3111
|
-
|
|
3112
|
-
const
|
|
3113
|
-
class
|
|
3244
|
+
ce = new WeakMap(), de = new WeakMap(), le = new WeakMap(), W = new WeakMap();
|
|
3245
|
+
const Ws = P("LoggingTracker", "color:#000000;font-weight:bold;");
|
|
3246
|
+
class li extends is {
|
|
3114
3247
|
track(t, e) {
|
|
3115
|
-
|
|
3248
|
+
Ws(`@${this.sdkConfig.api.user}`, `[${t}]`, e);
|
|
3116
3249
|
}
|
|
3117
3250
|
}
|
|
3118
3251
|
export {
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3252
|
+
Xs as BasicPlugin,
|
|
3253
|
+
B as CasinoPlugin,
|
|
3254
|
+
Js as DebuggingPlugin,
|
|
3255
|
+
ni as EveryMatrixPlugin,
|
|
3256
|
+
Ys as GigPlugin,
|
|
3257
|
+
oi as KalambaBullseyeParsers,
|
|
3258
|
+
ri as KalambaBullseyePlugin,
|
|
3259
|
+
ci as KalambaStargazerPlugin,
|
|
3260
|
+
di as KalambaStargazerTracker,
|
|
3261
|
+
li as LoggingTracker,
|
|
3262
|
+
Zs as OryxPlugin,
|
|
3263
|
+
ei as PariplayPlugin,
|
|
3264
|
+
ii as QuantaPlugin,
|
|
3265
|
+
ti as RelaxFEIMPlugin,
|
|
3266
|
+
As as RgsPlugin,
|
|
3267
|
+
ai as SoftSwissPlugin,
|
|
3268
|
+
Fs as TelemetryPlugin,
|
|
3269
|
+
is as Tracker,
|
|
3270
|
+
si as TukoPlugin
|
|
3136
3271
|
};
|